[Libreoffice-commits] .: 2 commits - package/inc package/prj package/source package/util

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Mar 29 06:12:28 PDT 2011


 package/inc/Deflater.hxx                    |   12 ++++++++----
 package/inc/Inflater.hxx                    |   13 +++++++++----
 package/inc/ZipFile.hxx                     |    2 +-
 package/inc/ZipOutputStream.hxx             |    2 +-
 package/inc/packagedllapi.hxx               |   15 +++++++++++++++
 package/prj/d.lst                           |    3 +++
 package/source/zipapi/Deflater.cxx          |    1 +
 package/source/zipapi/Inflater.cxx          |    1 +
 package/source/zipapi/XUnbufferedStream.hxx |    2 +-
 package/source/zipapi/ZipFile.cxx           |    1 +
 package/source/zipapi/makefile.mk           |    2 ++
 package/util/makefile.mk                    |    1 -
 package/util/package.pmk                    |    2 ++
 13 files changed, 45 insertions(+), 12 deletions(-)

New commits:
commit 5c4e1693122808fbf21dce161baa88fca0d7ef64
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Tue Mar 29 14:18:56 2011 +0200

    Namespace ZipUtils for the Inflater / Deflater classes.

diff --git a/package/inc/Deflater.hxx b/package/inc/Deflater.hxx
index 869a514..4950681 100644
--- a/package/inc/Deflater.hxx
+++ b/package/inc/Deflater.hxx
@@ -31,13 +31,14 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include "packagedllapi.hxx"
 
-extern "C" 
-{
-    typedef struct z_stream_s z_stream;
-}
+struct z_stream_s;
+
+namespace ZipUtils {
 
 class DLLPUBLIC_PACKAGE Deflater
 {
+    typedef struct z_stream_s z_stream;
+
 protected:
     com::sun::star::uno::Sequence< sal_Int8 > sInBuffer;
     sal_Bool				bFinish;
@@ -65,6 +66,8 @@ public:
     void SAL_CALL end(  );
 };
 
+}
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/inc/Inflater.hxx b/package/inc/Inflater.hxx
index 8c37641..2c3b68f 100644
--- a/package/inc/Inflater.hxx
+++ b/package/inc/Inflater.hxx
@@ -31,12 +31,14 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include "packagedllapi.hxx"
 
-extern "C"
-{
-    typedef struct z_stream_s z_stream;
-}
+struct z_stream_s;
+
+namespace ZipUtils {
+
 class DLLPUBLIC_PACKAGE Inflater
 {
+    typedef struct z_stream_s z_stream;
+
 protected:
     sal_Bool				bFinish, bFinished, bSetParams, bNeedDict;
     sal_Int32				nOffset, nLength, nLastInflateError;
@@ -56,6 +58,8 @@ public:
     sal_Int32 getLastInflateError() { return nLastInflateError; }
 };
 
+}
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 982ab18..c64500c 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -66,7 +66,7 @@ protected:
     ::rtl::OUString	sComment; 	  	/* zip file comment */
     EntryHash		aEntries;
     ByteGrabber 	aGrabber;
-    Inflater        aInflater;
+    ZipUtils::Inflater aInflater;
     com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
     com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xSeek;
     const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xFactory;
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index 53a6bd9..b36f4d2 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -49,7 +49,7 @@ protected:
     ::std::vector < ZipEntry * >			aZipList;
     com::sun::star::uno::Sequence < sal_Int8 > aBuffer, aEncryptionBuffer;
     ::rtl::OUString		sComment;
-    Deflater			aDeflater;
+    ZipUtils::Deflater	aDeflater;
     rtlCipher 			aCipher;
     rtlDigest 			aDigest;
     CRC32				aCRC;
diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx
index a0005f5..9a843a6 100644
--- a/package/source/zipapi/Deflater.cxx
+++ b/package/source/zipapi/Deflater.cxx
@@ -41,6 +41,7 @@
 
 using namespace com::sun::star::packages::zip::ZipConstants;
 using namespace com::sun::star;
+using namespace ZipUtils;
 
 /** Provides general purpose compression using the ZLIB compression
  * library.
diff --git a/package/source/zipapi/Inflater.cxx b/package/source/zipapi/Inflater.cxx
index 3987420..a3929a3 100644
--- a/package/source/zipapi/Inflater.cxx
+++ b/package/source/zipapi/Inflater.cxx
@@ -39,6 +39,7 @@
 #include <string.h> // for memset
 
 using namespace com::sun::star::uno;
+using namespace ZipUtils;
 
 /** Provides general purpose decompression using the ZLIB library */
 
diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx
index 86f7066..5cf7272 100644
--- a/package/source/zipapi/XUnbufferedStream.hxx
+++ b/package/source/zipapi/XUnbufferedStream.hxx
@@ -59,7 +59,7 @@ protected:
     ZipEntry maEntry;
     rtl::Reference < EncryptionData > mxData;
     rtlCipher maCipher;
-    Inflater maInflater;
+    ZipUtils::Inflater maInflater;
     sal_Bool mbRawStream, mbWrappedRaw, mbFinished;
     sal_Int16 mnHeaderToRead;
     sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent;
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index a237f92..2e9576b 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -62,6 +62,7 @@ using namespace com::sun::star::packages::zip;
 using namespace com::sun::star::packages::zip::ZipConstants;
 
 using rtl::OUString;
+using ZipUtils::Inflater;
 
 /** This class is used to read entries from a zip file
  */
commit b713934c0cdb57643f01f32080ff435fb18451ae
Author: Peter Jentsch <pjotr at guineapics.de>
Date:   Sat Mar 26 14:14:51 2011 +0100

    make Inflater and Deflater classes available for other packages to use
    
    Currently, those are used within an extension function used by the
    Word 2003 ML XSLT filters

diff --git a/package/inc/Deflater.hxx b/package/inc/Deflater.hxx
index 3f2c1fc..869a514 100644
--- a/package/inc/Deflater.hxx
+++ b/package/inc/Deflater.hxx
@@ -29,13 +29,14 @@
 #define _DEFLATER_HXX_
 
 #include <com/sun/star/uno/Sequence.hxx>
+#include "packagedllapi.hxx"
 
 extern "C" 
 {
     typedef struct z_stream_s z_stream;
 }
 
-class Deflater
+class DLLPUBLIC_PACKAGE Deflater
 {
 protected:
     com::sun::star::uno::Sequence< sal_Int8 > sInBuffer;
diff --git a/package/inc/Inflater.hxx b/package/inc/Inflater.hxx
index ee7efec..8c37641 100644
--- a/package/inc/Inflater.hxx
+++ b/package/inc/Inflater.hxx
@@ -29,12 +29,13 @@
 #define _INFLATER_HXX_
 
 #include <com/sun/star/uno/Sequence.hxx>
+#include "packagedllapi.hxx"
 
 extern "C"
 {
     typedef struct z_stream_s z_stream;
 }
-class Inflater
+class DLLPUBLIC_PACKAGE Inflater
 {
 protected:
     sal_Bool				bFinish, bFinished, bSetParams, bNeedDict;
diff --git a/package/inc/packagedllapi.hxx b/package/inc/packagedllapi.hxx
new file mode 100644
index 0000000..41e8efa
--- /dev/null
+++ b/package/inc/packagedllapi.hxx
@@ -0,0 +1,15 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#ifndef INCLUDED_PACKAGEDLLAPI_H
+#define INCLUDED_PACKAGEDLLAPI_H
+
+#include "sal/types.h"
+
+#if defined(DLLIMPLEMENTATION_PACKAGE)
+#define DLLPUBLIC_PACKAGE  SAL_DLLPUBLIC_EXPORT
+#else
+#define DLLPUBLIC_PACKAGE  SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif /* INCLUDED_PACKAGEDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/package/prj/d.lst b/package/prj/d.lst
index 919a171..85f8c19 100644
--- a/package/prj/d.lst
+++ b/package/prj/d.lst
@@ -5,3 +5,6 @@
 ..\dtd\*.dtd %_DEST%\bin%_EXT%\*.*
 ..\%__SRC%\misc\package2.component %_DEST%\xml%_EXT%\package2.component
 ..\%__SRC%\misc\xstor.component %_DEST%\xml%_EXT%\xstor.component
+..\inc\Inflater.hxx %_DEST%\inc%_EXT%\package\Inflater.hxx
+..\inc\Deflater.hxx %_DEST%\inc%_EXT%\package\Deflater.hxx
+..\inc\packagedllapi.hxx %_DEST%\inc%_EXT%\package\packagedllapi.hxx
diff --git a/package/source/zipapi/makefile.mk b/package/source/zipapi/makefile.mk
index 1b941fa..ec8d636 100644
--- a/package/source/zipapi/makefile.mk
+++ b/package/source/zipapi/makefile.mk
@@ -34,12 +34,14 @@ ENABLE_EXCEPTIONS=TRUE
 # --- Settings -----------------------------------------------------
 
 .INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/package.pmk
 
 # --- Files --------------------------------------------------------
 .IF "$(L10N_framework)"==""
 .IF "$(SYSTEM_ZLIB)" == "YES"
 CFLAGS+=-DSYSTEM_ZLIB
 .ENDIF
+
 SLOFILES= \
         $(SLO)$/CRC32.obj			\
         $(SLO)$/ByteChucker.obj		\
diff --git a/package/util/makefile.mk b/package/util/makefile.mk
index 344b2cf..827060a 100644
--- a/package/util/makefile.mk
+++ b/package/util/makefile.mk
@@ -55,7 +55,6 @@ LIB1FILES=	\
 
 SHL1TARGET=$(TARGET)$(MAJOR_VERSION)
 SHL1IMPLIB=i$(TARGET)
-SHL1VERSIONMAP=$(SOLARENV)$/src$/component.map
 
 SHL1STDLIBS=\
     $(CPPULIB)		\
diff --git a/package/util/package.pmk b/package/util/package.pmk
new file mode 100644
index 0000000..7d3d412
--- /dev/null
+++ b/package/util/package.pmk
@@ -0,0 +1,2 @@
+VISIBILITY_HIDDEN = TRUE
+CDEFS += -DDLLIMPLEMENTATION_PACKAGE
\ No newline at end of file


More information about the Libreoffice-commits mailing list