[Libreoffice-commits] core.git: 3 commits - basic/source bridges/test chart2/source connectivity/source dtrans/test editeng/source extensions/test external/twain sd/source sw/source vbahelper/source xmloff/source

Thomas Arnhold thomas at arnhold.org
Tue Apr 15 04:43:46 PDT 2014


 basic/source/classes/sbunoobj.cxx                               |   20 -
 bridges/test/testoffice.cxx                                     |    4 
 chart2/source/view/inc/VCoordinateSystem.hxx                    |    2 
 connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx |    2 
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx  |   20 -
 dtrans/test/win32/dnd/atlwindow.hxx                             |    4 
 dtrans/test/win32/dnd/dndTest.cxx                               |    4 
 editeng/source/misc/splwrap.cxx                                 |    2 
 extensions/test/ole/OleClient/clientTest.cxx                    |    2 
 extensions/test/ole/OleConverterVar1/convTest.cxx               |    2 
 extensions/test/ole/cppToUno/testcppuno.cxx                     |    2 
 extensions/test/ole/cpptest/cpptest.cxx                         |    4 
 extensions/test/ole/unloading/unloadTest.cxx                    |    2 
 extensions/test/ole/unoTocomCalls/Test/StdAfx.h                 |    4 
 external/twain/inc/twain/twain.h                                |  153 +++++++---
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx       |    2 
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx       |    2 
 sd/source/ui/accessibility/AccessibleOutlineView.cxx            |    2 
 sw/source/core/crsr/callnk.cxx                                  |    2 
 sw/source/core/unocore/unoidx.cxx                               |    6 
 vbahelper/source/vbahelper/vbashape.cxx                         |   14 
 vbahelper/source/vbahelper/vbashaperange.cxx                    |    2 
 xmloff/source/style/FillStyleContext.hxx                        |    2 
 23 files changed, 163 insertions(+), 96 deletions(-)

New commits:
commit 618a0f8c0349daa31cbaea097e2cc60e74f4076d
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Apr 15 13:43:13 2014 +0200

    whitespace for include statements
    
    Change-Id: I76bd0ef07a2fa134e948724cecdf539ffe6ccb8a

diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3d8de56..4e40042 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -83,16 +83,16 @@ using namespace com::sun::star::bridge;
 using namespace cppu;
 
 
-#include<basic/sbstar.hxx>
-#include<basic/sbuno.hxx>
-#include<basic/sberrors.hxx>
-#include<sbunoobj.hxx>
-#include"sbjsmod.hxx"
-#include<basic/basmgr.hxx>
-#include<sbintern.hxx>
-#include<runtime.hxx>
-
-#include<math.h>
+#include <basic/sbstar.hxx>
+#include <basic/sbuno.hxx>
+#include <basic/sberrors.hxx>
+#include <sbunoobj.hxx>
+#include "sbjsmod.hxx"
+#include <basic/basmgr.hxx>
+#include <sbintern.hxx>
+#include <runtime.hxx>
+
+#include <math.h>
 #include <boost/unordered_map.hpp>
 #include <com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp>
 #include <com/sun/star/reflection/XConstantsTypeDescription.hpp>
diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx
index 8c18fbf..4be87c6 100644
--- a/bridges/test/testoffice.cxx
+++ b/bridges/test/testoffice.cxx
@@ -96,8 +96,8 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
 //          OSL_ASSERT( 0 );
     }
 }
-#include<stdio.h>
-#include<string.h>
+#include <stdio.h>
+#include <string.h>
 
 void testWriter(  const Reference < XComponent > & rCmp )
 {
diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx
index 548c1c1..fa2ed6a 100644
--- a/chart2/source/view/inc/VCoordinateSystem.hxx
+++ b/chart2/source/view/inc/VCoordinateSystem.hxx
@@ -33,7 +33,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 
-#include<map>
+#include <map>
 #include <vector>
 #include <boost/shared_ptr.hpp>
 #include <boost/scoped_ptr.hpp>
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx
index 758983d..37c870e 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx
@@ -23,7 +23,7 @@
 
 #include <rtl/ustring.hxx>
 
-#include<string>
+#include <string>
 
 namespace connectivity
 {
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 1ee5a56..ac194d4 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -73,16 +73,16 @@
 
 #include <rtl/ustrbuf.hxx>
 
-#include<com/sun/star/sdbc/TransactionIsolation.hpp>
-#include<com/sun/star/sdbc/ResultSetType.hpp>
-#include<com/sun/star/sdbc/XPreparedStatement.hpp>
-#include<com/sun/star/sdbc/XParameters.hpp>
-#include<com/sun/star/sdbc/DataType.hpp>
-#include<com/sun/star/sdbc/IndexType.hpp>
-#include<com/sun/star/sdbc/ColumnValue.hpp>
-#include<com/sun/star/sdbc/ColumnSearch.hpp>
-#include<com/sun/star/sdbc/KeyRule.hpp>
-#include<com/sun/star/sdbc/Deferrability.hpp>
+#include <com/sun/star/sdbc/TransactionIsolation.hpp>
+#include <com/sun/star/sdbc/ResultSetType.hpp>
+#include <com/sun/star/sdbc/XPreparedStatement.hpp>
+#include <com/sun/star/sdbc/XParameters.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/sdbc/IndexType.hpp>
+#include <com/sun/star/sdbc/ColumnValue.hpp>
+#include <com/sun/star/sdbc/ColumnSearch.hpp>
+#include <com/sun/star/sdbc/KeyRule.hpp>
+#include <com/sun/star/sdbc/Deferrability.hpp>
 
 using ::osl::MutexGuard;
 
diff --git a/dtrans/test/win32/dnd/atlwindow.hxx b/dtrans/test/win32/dnd/atlwindow.hxx
index 21c5dad..6375657 100644
--- a/dtrans/test/win32/dnd/atlwindow.hxx
+++ b/dtrans/test/win32/dnd/atlwindow.hxx
@@ -20,8 +20,8 @@
 #define _WINDOW_HXX_
 #include <atlbase.h>
 extern CComModule _Module;
-#include<atlcom.h>
-#include<atlctl.h>
+#include <atlcom.h>
+#include <atlctl.h>
 #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
 #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
 #include <com/sun/star/datatransfer/XTransferable.hpp>
diff --git a/dtrans/test/win32/dnd/dndTest.cxx b/dtrans/test/win32/dnd/dndTest.cxx
index 084555e..d026132 100644
--- a/dtrans/test/win32/dnd/dndTest.cxx
+++ b/dtrans/test/win32/dnd/dndTest.cxx
@@ -25,8 +25,8 @@
 #include <tchar.h>
 #include <atlbase.h>
 CComModule _Module;
-#include<atlcom.h>
-#include<atlimpl.cpp>
+#include <atlcom.h>
+#include <atlimpl.cpp>
 #if defined _MSC_VER
 #pragma warning(pop)
 #endif
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index ba9166d..b633cac 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include<rtl/ustring.hxx>
+#include <rtl/ustring.hxx>
 #include <tools/shl.hxx>
 #include <vcl/wrkwin.hxx>
 #include <vcl/svapp.hxx>
diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx
index 3d00662..1177ebd 100644
--- a/extensions/test/ole/OleClient/clientTest.cxx
+++ b/extensions/test/ole/OleClient/clientTest.cxx
@@ -21,7 +21,7 @@
 #include <atlbase.h>
 
 CComModule _Module;
-#include<atlcom.h>
+#include <atlcom.h>
 #include <comdef.h>
 
 #include "axhost.hxx"
diff --git a/extensions/test/ole/OleConverterVar1/convTest.cxx b/extensions/test/ole/OleConverterVar1/convTest.cxx
index adfe3b6..a9d9580 100644
--- a/extensions/test/ole/OleConverterVar1/convTest.cxx
+++ b/extensions/test/ole/OleConverterVar1/convTest.cxx
@@ -24,7 +24,7 @@
 #include <tchar.h>
 #include <atlbase.h>
 extern CComModule _Module;
-#include<atlcom.h>
+#include <atlcom.h>
 
 #include <stdio.h>
 #include <com/sun/star/bridge/ModelDependent.hpp>
diff --git a/extensions/test/ole/cppToUno/testcppuno.cxx b/extensions/test/ole/cppToUno/testcppuno.cxx
index a12e707..1d067bd 100644
--- a/extensions/test/ole/cppToUno/testcppuno.cxx
+++ b/extensions/test/ole/cppToUno/testcppuno.cxx
@@ -23,7 +23,7 @@
 #include <comdef.h>
 #include <tchar.h>
 #include <atlbase.h>
-#include<atlcom.h>
+#include <atlcom.h>
 #include <stdio.h>
 #include <com/sun/star/bridge/ModelDependent.hpp>
 #include <com/sun/star/bridge/XBridgeSupplier2.hpp>
diff --git a/extensions/test/ole/cpptest/cpptest.cxx b/extensions/test/ole/cpptest/cpptest.cxx
index 451c357..2fd4139 100644
--- a/extensions/test/ole/cpptest/cpptest.cxx
+++ b/extensions/test/ole/cpptest/cpptest.cxx
@@ -26,8 +26,8 @@
 #pragma warning(disable: 4917)
 #include <comdef.h>
 #include <tchar.h>
-#include<atlbase.h>
-#include<atlcom.h>
+#include <atlbase.h>
+#include <atlcom.h>
 
 HRESULT doTest();
 
diff --git a/extensions/test/ole/unloading/unloadTest.cxx b/extensions/test/ole/unloading/unloadTest.cxx
index 23b4e0d..b81dd30 100644
--- a/extensions/test/ole/unloading/unloadTest.cxx
+++ b/extensions/test/ole/unloading/unloadTest.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include<osl/module.hxx>
+#include <osl/module.hxx>
 #include <osl/time.h>
 #include <rtl/ustring.hxx>
 #include <cppuhelper/factory.hxx>
diff --git a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h
index cb20f6e..93e2da1 100644
--- a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h
+++ b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h
@@ -36,8 +36,8 @@
 #include <tchar.h>
 #include <atlbase.h>
 extern CComModule _Module;
-#include<atlcom.h>
-#include<atlimpl.cpp>
+#include <atlcom.h>
+#include <atlimpl.cpp>
 
 // TODO: reference additional headers your program requires here
 
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 562d489..ef184b8 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -30,7 +30,7 @@
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <rtl/ustring.h>
-#include<sfx2/viewfrm.hxx>
+#include <sfx2/viewfrm.hxx>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <sfx2/objsh.hxx>
 #include <svx/AccessibleShape.hxx>
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 1ee0033..0088f5a 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -33,7 +33,7 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <comphelper/processfactory.hxx>
 #include <rtl/ustring.h>
-#include<sfx2/viewfrm.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <svx/AccessibleShape.hxx>
 
diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
index 63c547f..dddaeec 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx
@@ -29,7 +29,7 @@
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <rtl/ustring.h>
-#include<sfx2/viewfrm.hxx>
+#include <sfx2/viewfrm.hxx>
 
 #include <svx/AccessibleShape.hxx>
 
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index e089425..ba0d893 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -34,7 +34,7 @@
 #include <ndtxt.hxx>
 #include <flyfrm.hxx>
 #include <breakit.hxx>
-#include<vcl/window.hxx>
+#include <vcl/window.hxx>
 
 SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, sal_Int32 nAktCntnt,
                         sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection )
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index d78b090..9f7a3cd 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -16,14 +16,14 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#include<ooo/vba/office/MsoZOrderCmd.hpp>
-#include<ooo/vba/office/MsoScaleFrom.hpp>
-#include<com/sun/star/container/XNamed.hpp>
-#include<com/sun/star/drawing/ConnectorType.hpp>
+#include <ooo/vba/office/MsoZOrderCmd.hpp>
+#include <ooo/vba/office/MsoScaleFrom.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/ConnectorType.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
-#include<com/sun/star/drawing/XDrawPagesSupplier.hpp>
-#include<com/sun/star/drawing/XDrawPages.hpp>
-#include<com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/text/TextContentAnchorType.hpp>
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index 3ae554b..a5f45a3 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -19,7 +19,7 @@
 #include <com/sun/star/drawing/ShapeCollection.hpp>
 #include <com/sun/star/drawing/XShapeGrouper.hpp>
 #include <com/sun/star/drawing/XDrawPage.hpp>
-#include<com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
 
 #include <vbahelper/vbahelper.hxx>
 #include <vbahelper/vbashaperange.hxx>
diff --git a/xmloff/source/style/FillStyleContext.hxx b/xmloff/source/style/FillStyleContext.hxx
index 388561c..2db39fd 100644
--- a/xmloff/source/style/FillStyleContext.hxx
+++ b/xmloff/source/style/FillStyleContext.hxx
@@ -22,7 +22,7 @@
 
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <xmloff/xmlstyle.hxx>
-#include<rtl/ustring.hxx>
+#include <rtl/ustring.hxx>
 
 // draw:gardient context
 
commit e93417bf5d422261eb144b91dc43abad8ae6ccdc
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Apr 15 13:17:56 2014 +0200

    fix windows build
    
    seems this was caused by 8f7a1111abb35bbb25daf6ace2add902f98361fc
    
    Change-Id: I4e4b01de4f581134297b1c01220596ebd549b3d1

diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 2cf1eca..26a42ef 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -2798,12 +2798,12 @@ throw (uno::RuntimeException, std::exception)
             g_ServicesIndexTokenAccess);
 }
 
-struct TokenType {
+struct TokenType_ {
     const char *pName;
     enum FormTokenType eTokenType;
 };
 
-static const struct TokenType g_TokenTypes[] =
+static const struct TokenType_ g_TokenTypes[] =
 {
     { "TokenEntryNumber",           TOKEN_ENTRY_NO  },
     { "TokenEntryText",             TOKEN_ENTRY_TEXT },
@@ -2853,7 +2853,7 @@ throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException,
             {
                 const OUString sTokenType =
                         lcl_AnyToString(pProperties[j].Value);
-                for (TokenType const* pTokenType = g_TokenTypes;
+                for (TokenType_ const* pTokenType = g_TokenTypes;
                         pTokenType->pName; ++pTokenType)
                 {
                     if (sTokenType.equalsAscii(pTokenType->pName))
commit 3e608fbb15967d1fcf6a584c449f6b65d62d4988
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Apr 15 12:46:39 2014 +0200

    twain: Update twain to version 2.3
    
    Includes the mingw fixes from
    dc6c7e844a02a59133e96553000666be87b1a74e
    
    See original file changes at
    http://sourceforge.net/p/twain-dsm/code/127#diff-2

diff --git a/external/twain/inc/twain/twain.h b/external/twain/inc/twain/twain.h
index 6692760..fb08897 100644
--- a/external/twain/inc/twain/twain.h
+++ b/external/twain/inc/twain/twain.h
@@ -103,11 +103,11 @@
                                  CAP_POWERDOWNTIME
                                  ICAP_AUTODISCARDBLANKPAGES
                                * CAP_PAGEMULTIPLEACQUIRE - is CAP_REACQUIREALLOWED,
-                                 requires spec change.  JMH
+                               requires spec change.  JMH
                                  Added Mac structure packing modifications JMH
-    version 1.9  March 2000      Added new types and definations required
-                                 for 1.9 Specification MLM
-    version 1.9  March 2000      Added ICAP_JPEGQUALITY, TWJQ_ values,
+    version 1.9  March 2000  Added new types and definations required
+                             for 1.9 Specification MLM
+    version 1.9  March 2000  Added ICAP_JPEGQUALITY, TWJQ_ values,
                                  updated TWON_PROTOCOLMINOR for Release v1.9 MN
     version 1.91 August 2007     Added new types and definitions required
                                  for 1.91 Specification MLM
@@ -121,6 +121,8 @@
                                  for 2.1 Specification JMW
     version 2.2  Nov 2010        Added new types and definitions required
                                  for 2.2 Specification MSM
+    version 2.3  Feb 2013        Added new types and definitions required
+                                 for 2.3 Specification MLM
 \* ======================================================================== */
 
 #ifndef TWAIN
@@ -129,7 +131,7 @@
 /****************************************************************************
  * TWAIN Version                                                            *
  ****************************************************************************/
-#define TWON_PROTOCOLMINOR   2        /* Changed for Version 2.2            */
+#define TWON_PROTOCOLMINOR   3        /* Changed for Version 2.3            */
 #define TWON_PROTOCOLMAJOR   2
 
 /****************************************************************************
@@ -166,6 +168,7 @@
       #define TWH_32BIT
     #endif
 
+
 /* Borland C/C++ Compiler */
 #elif defined(__BORLAND__)
     #define TWH_CMP_BORLAND
@@ -232,12 +235,12 @@
     #pragma pack (push, before_twain)
     #pragma pack (2)
 #elif defined(TWH_CMP_GNU)
-   #pragma pack (push, before_twain)
-   #ifdef __APPLE__
-      //#pragma pack (4)
-   #else
-      #pragma pack (2)
-   #endif
+    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+        #pragma options align = power
+    #else
+        #pragma pack (push, before_twain)
+        #pragma pack (2)
+    #endif
 #elif defined(TWH_CMP_BORLAND)
     #pragma option -a2
 #endif
@@ -250,19 +253,34 @@
 /* String types. These include room for the strings and a NULL char,     *
  * or, on the Mac, a length byte followed by the string.                 *
  * TW_STR255 must hold less than 256 chars so length fits in first byte. */
-typedef char    TW_STR32[34],     FAR *pTW_STR32;
-typedef char    TW_STR64[66],     FAR *pTW_STR64;
-typedef char    TW_STR128[130],   FAR *pTW_STR128;
-typedef char    TW_STR255[256],   FAR *pTW_STR255;
+#if defined(__APPLE__)/* cf: Mac version of TWAIN.h */
+    typedef unsigned char TW_STR32[34],     FAR *pTW_STR32;
+    typedef unsigned char TW_STR64[66],     FAR *pTW_STR64;
+    typedef unsigned char TW_STR128[130],   FAR *pTW_STR128;
+    typedef unsigned char TW_STR255[256],   FAR *pTW_STR255;
+#else
+    typedef char          TW_STR32[34],     FAR *pTW_STR32;
+    typedef char          TW_STR64[66],     FAR *pTW_STR64;
+    typedef char          TW_STR128[130],   FAR *pTW_STR128;
+    typedef char          TW_STR255[256],   FAR *pTW_STR255;
+#endif
 
 /* Numeric types. */
-typedef char           TW_INT8,   FAR *pTW_INT8;
-typedef short          TW_INT16,  FAR *pTW_INT16;
-typedef long           TW_INT32,  FAR *pTW_INT32;
-typedef unsigned char  TW_UINT8,  FAR *pTW_UINT8;
-typedef unsigned short TW_UINT16, FAR *pTW_UINT16;
-typedef unsigned long  TW_UINT32, FAR *pTW_UINT32;
-typedef unsigned short TW_BOOL,   FAR *pTW_BOOL;
+typedef char           	  TW_INT8,          FAR *pTW_INT8;
+typedef short          	  TW_INT16,         FAR *pTW_INT16;
+#if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+    typedef int           TW_INT32,         FAR *pTW_INT32;
+#else
+    typedef long          TW_INT32,         FAR *pTW_INT32;
+#endif
+typedef unsigned char     TW_UINT8,         FAR *pTW_UINT8;
+typedef unsigned short    TW_UINT16,        FAR *pTW_UINT16;
+#if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+    typedef unsigned int  TW_UINT32,        FAR *pTW_UINT32;
+#else
+    typedef unsigned long TW_UINT32,        FAR *pTW_UINT32;
+#endif
+typedef unsigned short    TW_BOOL,          FAR *pTW_BOOL;
 
 
 /****************************************************************************
@@ -316,9 +334,13 @@ typedef struct {
 
 /* Used to register callbacks. */
 typedef struct  {
-    TW_MEMREF   CallBackProc;
-    TW_UINT32   RefCon;
-    TW_INT16    Message;
+    TW_MEMREF      CallBackProc;
+    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+        TW_MEMREF  RefCon;
+    #else
+        TW_UINT32  RefCon;
+    #endif
+    TW_INT16       Message;
 } TW_CALLBACK, FAR * pTW_CALLBACK;
 
 /* Used to register callbacks. */
@@ -406,7 +428,10 @@ typedef struct {
     TW_UINT16   InfoID;
     TW_UINT16   ItemType;
     TW_UINT16   NumItems;
-    TW_UINT16   ReturnCode;
+    union {
+        TW_UINT16   ReturnCode;
+        TW_UINT16   CondCode; // Deprecated, do not use
+    };
     TW_UINTPTR  Item;
 }TW_INFO, FAR* pTW_INFO;
 
@@ -421,12 +446,12 @@ typedef struct {
    TW_STR255  OutputName;
    TW_MEMREF  Context;
    union {
-         int            Recursive;
-         TW_BOOL        Subdirectories;
+	 int 	    Recursive;
+	 TW_BOOL	Subdirectories;
    };
    union {
-         TW_INT32       FileType;
-         TW_UINT32      FileSystemType;
+	 TW_INT32 	FileType;
+	 TW_UINT32	FileSystemType;
    };
    TW_UINT32  Size;
    TW_STR32   CreateTimeDate;
@@ -455,14 +480,18 @@ typedef struct {
 
 /* Provides identification information about a TWAIN entity.*/
 typedef struct {
-   TW_UINT32  Id;
-   TW_VERSION Version;
-   TW_UINT16  ProtocolMajor;
-   TW_UINT16  ProtocolMinor;
-   TW_UINT32  SupportedGroups;
-   TW_STR32   Manufacturer;
-   TW_STR32   ProductFamily;
-   TW_STR32   ProductName;
+    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+        TW_MEMREF  Id;
+    #else
+        TW_UINT32  Id;
+    #endif
+    TW_VERSION 	   Version;
+    TW_UINT16  	   ProtocolMajor;
+    TW_UINT16  	   ProtocolMinor;
+    TW_UINT32  	   SupportedGroups;
+    TW_STR32   	   Manufacturer;
+    TW_STR32   	   ProductFamily;
+    TW_STR32   	   ProductName;
 } TW_IDENTITY, FAR * pTW_IDENTITY;
 
 /* Describes the "real" image data, that is, the complete image being transferred between the Source and application. */
@@ -546,8 +575,14 @@ typedef struct {
 typedef struct {
    TW_UINT16 Count;
    union {
-      TW_UINT32 EOJ;
-      TW_UINT32 Reserved;
+       TW_UINT32 EOJ;
+       TW_UINT32 Reserved;
+       #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+           union {
+               TW_UINT32 EOJ;
+               TW_UINT32 Reserved;
+           } TW_JOBCONTROL;
+       #endif
    };
 } TW_PENDINGXFERS, FAR *pTW_PENDINGXFERS;
 
@@ -978,6 +1013,22 @@ typedef struct {
 #define TWPR_ENDORSERBOTTOMBEFORE   6
 #define TWPR_ENDORSERBOTTOMAFTER    7
 
+/* CAP_PRINTERFONTSTYLE Added 2.3 */
+#define TWPF_NORMAL              0
+#define TWPF_BOLD                1
+#define TWPF_ITALIC              2
+#define TWPF_LARGESIZE           3
+#define TWPF_SMALLSIZE           4
+
+/* CAP_PRINTERINDEXTRIGGER Added 2.3 */
+#define TWCT_PAGE                0
+#define TWCT_PATCH1              1
+#define TWCT_PATCH2              2
+#define TWCT_PATCH3              3
+#define TWCT_PATCH4              4
+#define TWCT_PATCHT              5
+#define TWCT_PATCH6              6
+
 /* CAP_POWERSUPPLY values */
 #define TWPS_EXTERNAL            0
 #define TWPS_BATTERY             1
@@ -1725,6 +1776,14 @@ typedef struct {
 #define CAP_INDICATORSMODE          0x1044
 #define CAP_PRINTERVERTICALOFFSET   0x1045
 #define CAP_POWERSAVETIME           0x1046
+#define CAP_PRINTERCHARROTATION	    0x1047
+#define CAP_PRINTERFONTSTYLE        0x1048
+#define CAP_PRINTERINDEXLEADCHAR    0x1049
+#define CAP_PRINTERINDEXMAXVALUE    0x104A
+#define CAP_PRINTERINDEXNUMDIGITS   0x104B
+#define CAP_PRINTERINDEXSTEP        0x104C
+#define CAP_PRINTERINDEXTRIGGER     0x104D
+#define CAP_PRINTERSTRINGPREVIEW    0x104E
 
 
 
@@ -1895,6 +1954,7 @@ typedef struct {
 #define TWEI_IMAGEMERGED            0x1247
 #define TWEI_MAGDATALENGTH          0x1248
 #define TWEI_PAPERCOUNT             0x1249
+#define TWEI_PRINTERTEXT            0x124A
 
 #define TWEJ_NONE                   0x0000
 #define TWEJ_MIDSEPARATOR           0x0001
@@ -1966,6 +2026,9 @@ typedef struct {
 #define TWQC_RESET            0x0010
 #define TWQC_SETCONSTRAINT    0x0020
 #define TWQC_CONSTRAINABLE    0x0040
+#define TWQC_GETHELP          0x0100
+#define TWQC_GETLABEL         0x0200
+#define TWQC_GETLABELENUM     0x0400
 
 /****************************************************************************
  * Depreciated Items                                                        *
@@ -1982,7 +2045,7 @@ typedef struct {
 typedef BYTE TW_HUGE * HPBYTE;
 typedef void TW_HUGE * HPVOID;
 
-typedef unsigned char     TW_STR1024[1026],   FAR *pTW_STR1026;
+typedef unsigned char     TW_STR1024[1026],   FAR *pTW_STR1026, FAR *pTW_STR1024;
 typedef wchar_t           TW_UNI512[512],     FAR *pTW_UNI512;
 
 #define TWTY_STR1024          0x000d
@@ -2001,7 +2064,7 @@ typedef wchar_t           TW_UNI512[512],     FAR *pTW_UNI512;
 #define CAP_POWERDOWNTIME         0x1034
 #define ACAP_AUDIOFILEFORMAT      0x1201
 
-#define MSG_CHECKSTATUS
+#define MSG_CHECKSTATUS       0x0201
 
 #define MSG_INVOKE_CALLBACK   0x0903    /* Mac Only, deprecated - use DAT_NULL and MSG_xxx instead */
 
@@ -2212,7 +2275,11 @@ typedef struct {
 #elif defined(TWH_CMP_MSC)
     #pragma pack (pop, before_twain)
 #elif defined(TWH_CMP_GNU)
-    #pragma pack (pop, before_twain)
+    #if defined(__APPLE__) /* cf: Mac version of TWAIN.h */
+        #pragma options align = reset
+    #else
+        #pragma pack (pop, before_twain)
+    #endif
 #elif defined(TWH_CMP_BORLAND)
     #pragma option -a.
 #endif


More information about the Libreoffice-commits mailing list