[Libreoffice-commits] .: Branch 'feature/gnumake4' - sw/inc sw/Library_swd.mk sw/Library_sw.mk sw/Library_swui.mk sw/source

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Fri Jun 17 09:07:43 PDT 2011


 sw/Library_sw.mk                     |    2 +-
 sw/Library_swd.mk                    |    3 ++-
 sw/Library_swui.mk                   |    1 +
 sw/inc/iodetect.hxx                  |   16 ++++++++++------
 sw/source/filter/basflt/iodetect.cxx |    4 ++--
 5 files changed, 16 insertions(+), 10 deletions(-)

New commits:
commit cb2627f9629763e029543f543ad607139ebb909c
Author: Michael Stahl <mst at openoffice.org>
Date:   Fri Apr 15 17:27:07 2011 +0000

    gnumake4: #i117845#: sw: do not link objects into two libraries [hg:0c13175d5e5e]

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index caffa13..0b1ff66 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_Library_add_linked_libs,sw,\
     svt \
     svx \
     svxcore \
+	swd \
     tk \
     tl \
     ucbhelper \
@@ -472,7 +473,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
     sw/source/filter/ascii/wrtasc \
     sw/source/filter/basflt/docfact \
     sw/source/filter/basflt/fltini \
-    sw/source/filter/basflt/iodetect \
     sw/source/filter/basflt/shellio \
     sw/source/filter/html/SwAppletImpl \
     sw/source/filter/html/css1atr \
diff --git a/sw/Library_swd.mk b/sw/Library_swd.mk
index 67898f9..32bcc48 100644
--- a/sw/Library_swd.mk
+++ b/sw/Library_swd.mk
@@ -41,6 +41,8 @@ $(eval $(call gb_Library_set_include,swd,\
     -I$(OUTDIR)/inc/offuh \
 ))
 
+$(eval $(call gb_Library_add_defs,swd,\
+	-DSWD_DLLIMPLEMENTATION \
 $(eval $(call gb_Library_add_linked_libs,swd,\
     comphelper \
     cppu \
@@ -58,7 +60,6 @@ $(eval $(call gb_Library_add_linked_libs,swd,\
 ))
 
 $(eval $(call gb_Library_add_exception_objects,swd,\
-    sw/source/core/except/errhdl \
     sw/source/filter/basflt/iodetect \
     sw/source/ui/uno/detreg \
     sw/source/ui/uno/swdet2 \
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 9701339..386a10c 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_add_linked_libs,swui,\
     svx \
     svxcore \
     sw \
+	swd \
     tk \
     tl \
     ucbhelper \
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 81d61d0..094f174 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -34,7 +34,7 @@
 #include <osl/endian.h>
 #include <errhdl.hxx>		// for ASSERT
 #include <tools/string.hxx>
-#include <swdllapi.h>
+#include <swddllapi.h>
 
 #define FILTER_RTF      "RTF"       // RTF-Filter
 #define sRtfWH          "WH_RTF"
@@ -86,7 +86,7 @@ enum ReaderWriterEnum {
     MAXFILTER
 };
 
-extern SwIoDetect aFilterDetect[];
+extern SWD_DLLPUBLIC SwIoDetect aFilterDetect[];
 
 // Die folgende Klasse ist ein Wrappe fuer die Basic-I/O-Funktionen
 // des Writer 3.0. Alles ist statisch. Alle u.a. Filternamen sind die
@@ -97,13 +97,15 @@ class SwIoSystem
 {
 public:
     // suche ueber den internen FormatNamen den Filtereintrag
-    SW_DLLPUBLIC static const SfxFilter* GetFilterOfFormat( const String& rFormat,
+    SWD_DLLPUBLIC static const SfxFilter*
+        GetFilterOfFormat( const String& rFormat,
             const SfxFilterContainer* pCnt = 0 );
 
     // Feststellen des zu verwendenden Filters fuer die uebergebene
     // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter
     // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert!
-    static const SfxFilter* GetFileFilter( const String& rFileName,
+    SWD_DLLPUBLIC static const SfxFilter*
+        GetFileFilter( const String& rFileName,
             const String& rPrefFltName,
             SfxMedium* pMedium = 0 );
 
@@ -115,13 +117,15 @@ public:
     static sal_Bool IsValidStgFilter( SotStorage& , const SfxFilter& );
     static sal_Bool IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
 
-    static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen, 
+    SWD_DLLPUBLIC static bool
+        IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen,
             CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
     //    static bool IsDetectableW4W(const String& rFileName, const String& rUserData);
 
     static const SfxFilter* GetTextFilter( const sal_Char* pBuf, sal_uLong nLen );
 
-    static const String GetSubStorageName( const SfxFilter& rFltr );
+    SWD_DLLPUBLIC static const String
+        GetSubStorageName( const SfxFilter& rFltr );
 };
 
 #endif
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 171dd60..a66c4d2 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -201,9 +201,9 @@ sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter
 
 void TerminateBuffer(sal_Char *pBuffer, sal_uLong nBytesRead, sal_uLong nBufferLen)
 {
-    ASSERT(nBytesRead <= nBufferLen - 2,
+    OSL_ENSURE(nBytesRead <= nBufferLen - 2,
             "what you read must be less than the max + null termination");
-    ASSERT(!(nBufferLen & 0x00000001), "nMaxReadBuf must be an even number");
+    OSL_ENSURE(!(nBufferLen & 0x00000001),"nMaxReadBuf must be an even number");
     if (nBytesRead <= nBufferLen - 2)
     {
         pBuffer[nBytesRead] = '\0';


More information about the Libreoffice-commits mailing list