summaryrefslogtreecommitdiff
path: root/shell/source/all
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-08-10 06:05:55 +0000
committerRelease Engineers <releng@openoffice.org>2009-08-10 06:05:55 +0000
commitf0775523f6a9e06b9e144c6a0d67610fd15f0347 (patch)
tree0c06d1a13fc02f14a2ca546f18c0d33a070cccbe /shell/source/all
parent368626827d51717b8f0c07be88181f0960282277 (diff)
CWS-TOOLING: integrate CWS tkr23
2009-07-21 15:03:57 +0200 tkr r274199 : #i64277# open file only if needed and close immediately after use 2009-07-17 12:25:41 +0200 tkr r274087 : #i96743# patch minizip to provide stream operations 2009-07-17 12:21:13 +0200 tkr r274086 : #i96743# add new ifilter interface: IPersistStream
Diffstat (limited to 'shell/source/all')
-rwxr-xr-xshell/source/all/makefile.mk2
-rw-r--r--shell/source/all/ooofilereader/basereader.cxx9
-rw-r--r--shell/source/all/ooofilereader/contentreader.cxx23
-rw-r--r--shell/source/all/ooofilereader/makefile.mk3
-rw-r--r--shell/source/all/ooofilereader/metainforeader.cxx42
-rw-r--r--shell/source/all/zipfile/makefile.mk7
-rw-r--r--shell/source/all/zipfile/zipfile.cxx22
7 files changed, 105 insertions, 3 deletions
diff --git a/shell/source/all/makefile.mk b/shell/source/all/makefile.mk
index 3695abae798c..623aad6d69c1 100755
--- a/shell/source/all/makefile.mk
+++ b/shell/source/all/makefile.mk
@@ -35,6 +35,7 @@ PRJNAME=shell
TARGET=xmlparser
ENABLE_EXCEPTIONS=TRUE
+
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
@@ -61,6 +62,7 @@ CFLAGS+=-DSYSTEM_EXPAT
.ENDIF
SLOFILES=$(SLO)$/xml_parser.obj
+
.IF "$(BUILD_X64)"!=""
SLOFILES_X64=$(SLO_X64)$/xml_parser.obj
.ENDIF # "$(BUILD_X64)"!=""
diff --git a/shell/source/all/ooofilereader/basereader.cxx b/shell/source/all/ooofilereader/basereader.cxx
index 8412de36e458..d9be6740f057 100644
--- a/shell/source/all/ooofilereader/basereader.cxx
+++ b/shell/source/all/ooofilereader/basereader.cxx
@@ -50,6 +50,15 @@ m_ZipFile( DocumentName )
//
//------------------------------
+CBaseReader::CBaseReader(void * sw, zlib_filefunc_def* fa):
+m_ZipFile( sw , fa )
+{
+}
+
+//------------------------------
+//
+//------------------------------
+
CBaseReader::~CBaseReader()
{
}
diff --git a/shell/source/all/ooofilereader/contentreader.cxx b/shell/source/all/ooofilereader/contentreader.cxx
index f1990c741721..111647e70ad6 100644
--- a/shell/source/all/ooofilereader/contentreader.cxx
+++ b/shell/source/all/ooofilereader/contentreader.cxx
@@ -61,6 +61,29 @@ CBaseReader( DocumentName )
}
}
+CContentReader::CContentReader( void* stream, LocaleSet_t const & DocumentLocale, zlib_filefunc_def* fa ) :
+CBaseReader( stream, fa )
+{
+try
+ {
+ m_DefaultLocale = DocumentLocale;
+ Initialize( DOC_CONTENT_NAME );
+ }
+ catch(xml_parser_exception&
+ #if OSL_DEBUG_LEVEL > 0
+ ex
+ #endif
+ )
+ {
+ ENSURE(false, ex.what());
+ }
+ catch(...)
+ {
+ ENSURE(false, "Unknown error");
+ }
+}
+
+
/** destructor.
*/
diff --git a/shell/source/all/ooofilereader/makefile.mk b/shell/source/all/ooofilereader/makefile.mk
index 1e9788cf3f17..b893db45d849 100644
--- a/shell/source/all/ooofilereader/makefile.mk
+++ b/shell/source/all/ooofilereader/makefile.mk
@@ -35,6 +35,7 @@ TARGET=ooofilereader
LIBTARGET=NO
ENABLE_EXCEPTIONS=TRUE
+
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
@@ -65,7 +66,7 @@ LIB1TARGET=$(SLB)$/$(TARGET).lib
LIB1OBJFILES=$(SLOFILES)
LIB1FILES=$(SLB)$/zipfile.lib\
$(SLB)$/xmlparser.lib
-
+
.IF "$(BUILD_X64)"!=""
SLOFILES_X64=$(SLO_X64)$/basereader.obj\
$(SLO_X64)$/metainforeader.obj\
diff --git a/shell/source/all/ooofilereader/metainforeader.cxx b/shell/source/all/ooofilereader/metainforeader.cxx
index f09d8b3e41d0..cec17b59d3c9 100644
--- a/shell/source/all/ooofilereader/metainforeader.cxx
+++ b/shell/source/all/ooofilereader/metainforeader.cxx
@@ -80,6 +80,48 @@ CBaseReader( DocumentName )
}
}
+CMetaInfoReader::CMetaInfoReader( void* stream, zlib_filefunc_def* fa) :
+CBaseReader( stream, fa)
+{
+try
+ {
+ m_pKeywords_Builder = new CKeywordsTag( );
+ m_pSimple_Builder = new CSimpleTag( );
+ m_pDummy_Builder = new CDummyTag( );
+
+ //retrieve all infomation that is useful
+ m_AllMetaInfo[META_INFO_AUTHOR] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_TITLE] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_SUBJECT] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_KEYWORDS] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_DESCRIPTION] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_DOCUMENT_STATISTIC] = EMPTY_XML_TAG;
+
+ m_AllMetaInfo[META_INFO_GENERATOR] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_CREATION] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_CREATOR] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_MODIFIED] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_LANGUAGE] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_DOCUMENT_NUMBER] = EMPTY_XML_TAG;
+ m_AllMetaInfo[META_INFO_EDITING_TIME] = EMPTY_XML_TAG;
+
+ Initialize( META_CONTENT_NAME );
+ }
+ catch(xml_parser_exception&
+ #if OSL_DEBUG_LEVEL > 0
+ ex
+ #endif
+ )
+ {
+ ENSURE(false, ex.what());
+ }
+ catch(...)
+ {
+ ENSURE(false, "Unknown error");
+ }
+
+}
+
/** destructor.
*/
diff --git a/shell/source/all/zipfile/makefile.mk b/shell/source/all/zipfile/makefile.mk
index a7f9c95b95cf..9f294ce7aad0 100644
--- a/shell/source/all/zipfile/makefile.mk
+++ b/shell/source/all/zipfile/makefile.mk
@@ -33,6 +33,9 @@ PRJ=..$/..$/..
PRJNAME=shell
TARGET=zipfile
ENABLE_EXCEPTIONS=TRUE
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+
+
# --- Settings -----------------------------------------------------
@@ -45,8 +48,8 @@ SLOFILES=$(SLO)$/zipfile.obj\
$(SLO)$/zipexcptn.obj
SLOFILES_X64=$(SLO_X64)$/zipfile.obj\
- $(SLO_X64)$/zipexcptn.obj
-
+ $(SLO_X64)$/zipexcptn.obj
+
# --- Targets ------------------------------------------------------
.INCLUDE : set_wntx64.mk
diff --git a/shell/source/all/zipfile/zipfile.cxx b/shell/source/all/zipfile/zipfile.cxx
index b174c7a023e3..06fb6cc934d3 100644
--- a/shell/source/all/zipfile/zipfile.cxx
+++ b/shell/source/all/zipfile/zipfile.cxx
@@ -79,6 +79,12 @@ bool ZipFile::IsZipFile(const std::string& /*FileName*/)
return true;
}
+bool ZipFile::IsZipFile(void* /*stream*/)
+{
+ return true;
+}
+
+
/** Returns wheter the version of the specified zip file may be uncompressed with the
currently used zlib version or not
@@ -99,6 +105,12 @@ bool ZipFile::IsValidZipFileVersionNumber(const std::string& /*FileName*/)
return true;
}
+bool ZipFile::IsValidZipFileVersionNumber(void* /* stream*/)
+{
+ return true;
+}
+
+
/** Constructs a zip file from a zip file
@precond The given parameter must be a string with length > 0
@@ -119,6 +131,16 @@ ZipFile::ZipFile(const std::string& FileName)
throw IOException(-1);
}
+ZipFile::ZipFile(void* stream, zlib_filefunc_def* fa)
+{
+ fa->opaque = stream;
+ m_uzFile = unzOpen2((const char *)NULL, fa);
+
+ if (0 == m_uzFile)
+ throw IOException(-1);
+}
+
+
/** Destroys a zip file
*/
ZipFile::~ZipFile()