summaryrefslogtreecommitdiff
path: root/writerfilter/inc
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 20:09:46 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 20:09:46 +0200
commitae2ebf8fac893aeb2a328918ce1b12ef6834f16d (patch)
treed75f454c5866f8c605245814daadd7fafa1ec98d /writerfilter/inc
parent6e135ba19ae197fa6b1ca65034ad3dc8876a6be0 (diff)
parent7aedcad054e814a904e8378a75632b42a3295e92 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: filter/source/config/cache/filtercache.cxx filter/source/odfflatxml/makefile.mk oox/Library_oox.mk oox/Makefile oox/Module_oox.mk oox/Package_generated.mk oox/Package_inc.mk oox/prj/build.lst oox/prj/d.lst oox/prj/makefile.mk oox/source/dump/makefile.mk unoxml/Library_unordf.mk unoxml/Library_unoxml.mk writerfilter/CppunitTest_writerfilter_doctok.mk writerfilter/Library_writerfilter.mk writerfilter/Module_writerfilter.mk writerfilter/Package_inc.mk writerfilter/inc/resourcemodel/TagLogger.hxx writerfilter/inc/resourcemodel/WW8ResourceModel.hxx writerfilter/prj/build.lst writerfilter/prj/makefile.mk writerfilter/qa/complex/ooxml/makefile.mk writerfilter/qa/cppunittests/doctok/makefile.mk writerfilter/qa/cppunittests/doctok/testdoctok.cxx writerfilter/qa/cppunittests/xxml/testXXML.cxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapperTableHandler.cxx writerfilter/source/dmapper/DomainMapperTableManager.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/FontTable.cxx writerfilter/source/dmapper/GraphicHelpers.cxx writerfilter/source/dmapper/PropertyIds.cxx writerfilter/source/dmapper/PropertyMap.cxx writerfilter/source/dmapper/SettingsTable.cxx writerfilter/source/dmapper/StyleSheetTable.cxx writerfilter/source/dmapper/TablePropertiesHandler.cxx writerfilter/source/dmapper/TblStylePrHandler.cxx writerfilter/source/dmapper/ThemeTable.cxx writerfilter/source/doctok/WW8DocumentImpl.cxx writerfilter/source/doctok/resourcesimpl.xsl writerfilter/source/filter/WriterFilter.cxx writerfilter/source/generated.mk writerfilter/source/ooxml/OOXMLDocumentImpl.cxx writerfilter/source/ooxml/OOXMLFactory.cxx writerfilter/source/ooxml/OOXMLFactory.hxx writerfilter/source/ooxml/OOXMLStreamImpl.cxx writerfilter/source/ooxml/RefAndPointer.hxx writerfilter/source/resourcemodel/TagLogger.cxx writerfilter/unocomponent/component.cxx writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx
Diffstat (limited to 'writerfilter/inc')
-rw-r--r--writerfilter/inc/WriterFilterDllApi.hxx35
-rw-r--r--writerfilter/inc/dmapper/DomainMapper.hxx6
-rw-r--r--writerfilter/inc/doctok/WW8Document.hxx23
-rw-r--r--writerfilter/inc/ooxml/OOXMLDocument.hxx30
-rw-r--r--writerfilter/inc/resourcemodel/Fraction.hxx7
-rw-r--r--writerfilter/inc/resourcemodel/LoggedResources.hxx10
-rw-r--r--writerfilter/inc/resourcemodel/OutputWithDepth.hxx3
-rw-r--r--writerfilter/inc/resourcemodel/Protocol.hxx8
-rw-r--r--writerfilter/inc/resourcemodel/QNameToString.hxx7
-rw-r--r--writerfilter/inc/resourcemodel/ResourceModelHelper.hxx7
-rw-r--r--writerfilter/inc/resourcemodel/SubSequence.hxx5
-rw-r--r--writerfilter/inc/resourcemodel/TableData.hxx11
-rw-r--r--writerfilter/inc/resourcemodel/TableManager.hxx67
-rw-r--r--writerfilter/inc/resourcemodel/TagLogger.hxx117
-rw-r--r--writerfilter/inc/resourcemodel/TagLogger.hxx.orig116
-rw-r--r--writerfilter/inc/resourcemodel/WW8ResourceModel.hxx38
-rw-r--r--writerfilter/inc/resourcemodel/WW8ResourceModel.hxx.orig445
-rw-r--r--writerfilter/inc/resourcemodel/XPathLogger.hxx8
-rw-r--r--writerfilter/inc/resourcemodel/exceptions.hxx9
-rw-r--r--writerfilter/inc/resourcemodel/util.hxx9
-rw-r--r--writerfilter/inc/rtftok/RTFInputSource.hxx3
-rw-r--r--writerfilter/inc/rtftok/RTFParseException.hxx3
-rw-r--r--writerfilter/inc/rtftok/RTFScanner.hxx3
-rw-r--r--writerfilter/inc/rtftok/RTFScannerHandler.hxx3
24 files changed, 775 insertions, 198 deletions
diff --git a/writerfilter/inc/WriterFilterDllApi.hxx b/writerfilter/inc/WriterFilterDllApi.hxx
index dff806017c8a..98cb5d3776e0 100644
--- a/writerfilter/inc/WriterFilterDllApi.hxx
+++ b/writerfilter/inc/WriterFilterDllApi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,11 +31,39 @@
#include "sal/types.h"
-#if defined(WRITERFILTER_DLLIMPLEMENTATION)
-#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#if defined(WRITERFILTER_DOCTOK_DLLIMPLEMENTATION)
+#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
-#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
+
+#if defined(WRITERFILTER_OOXML_DLLIMPLEMENTATION)
+#define WRITERFILTER_OOXML_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define WRITERFILTER_OOXML_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#if defined(WRITERFILTER_RESOURCEMODEL_DLLIMPLEMENTATION)
+#define WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#if defined(WRITERFILTER_WRITERFILTER_DLLIMPLEMENTATION)
+#define WRITERFILTER_WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define WRITERFILTER_WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#if defined(WRITERFILTER_WRITERFILTER_UNO_DLLIMPLEMENTATION)
+#define WRITERFILTER_WRITERFILTER_UNO_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define WRITERFILTER_WRITERFILTER_UNO_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+// This one can be shared
#define WRITERFILTER_DLLPRIVATE SAL_DLLPRIVATE
#endif /* INCLUDED_WRITERFILTERDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index d7f6c005a5c4..31f5a667e4e3 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,7 +78,7 @@ enum SourceDocumentType
DOCUMENT_OOXML,
DOCUMENT_RTF
};
-class WRITERFILTER_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
+class WRITERFILTER_OOXML_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
public BinaryObj, public LoggedStream
{
DomainMapper_Impl *m_pImpl;
@@ -110,7 +111,6 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetCurrentTextRange();
::rtl::OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties );
- boost::shared_ptr< ListsManager > GetListTable( );
boost::shared_ptr< StyleSheetTable > GetStyleSheetTable( );
private:
@@ -154,3 +154,5 @@ private:
} // namespace dmapper
} // namespace writerfilter
#endif //
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/doctok/WW8Document.hxx b/writerfilter/inc/doctok/WW8Document.hxx
index e3915c628761..8fc3d1aca1f3 100644
--- a/writerfilter/inc/doctok/WW8Document.hxx
+++ b/writerfilter/inc/doctok/WW8Document.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,13 +34,9 @@
#include <com/sun/star/uno/Reference.hxx>
#include <resourcemodel/SubSequence.hxx>
#include <com/sun/star/io/XInputStream.hpp>
-#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEX_HPP_
#include <com/sun/star/uno/XComponentContext.hpp>
-#endif
-#ifndef INCLUDED_WW8_RESOURCE_MODEL_HXX
#include <resourcemodel/WW8ResourceModel.hxx>
-#endif
#include <resourcemodel/OutputWithDepth.hxx>
#include <WriterFilterDllApi.hxx>
@@ -56,7 +53,7 @@ using namespace ::com::sun::star;
stream consists of substreams that are identified by string
identifiers.
*/
-class WRITERFILTER_DLLPUBLIC WW8Stream
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Stream
{
public:
/**
@@ -110,7 +107,7 @@ public:
A property.
*/
-class WRITERFILTER_DLLPUBLIC WW8Property
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Property
{
public:
/**
@@ -157,7 +154,7 @@ public:
}
\endcode
*/
-class WRITERFILTER_DLLPUBLIC WW8PropertySetIterator
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8PropertySetIterator
{
public:
typedef boost::shared_ptr<WW8PropertySetIterator> Pointer_t;
@@ -194,7 +191,7 @@ bool operator != (const WW8PropertySetIterator & rA,
/**
A set of properties.
*/
-class WRITERFILTER_DLLPUBLIC WW8PropertySet
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8PropertySet
{
public:
typedef boost::shared_ptr<WW8PropertySet> Pointer_t;
@@ -281,7 +278,7 @@ enum PropertyType {
The use of the iterator is analogous to WW8PropertySetIterator.
*/
-class WRITERFILTER_DLLPUBLIC WW8DocumentIterator
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentIterator
{
public:
typedef boost::shared_ptr<WW8DocumentIterator> Pointer_t;
@@ -374,7 +371,7 @@ public:
bool operator == (const WW8DocumentIterator & rA,
const WW8DocumentIterator & rB);
-class WRITERFILTER_DLLPUBLIC SubDocumentId
+class SubDocumentId
{
public:
enum eType { FOOTNOTES, HEADERS, FOOTERS };
@@ -396,7 +393,7 @@ public:
/**
A Word 8 document.
*/
-class WRITERFILTER_DLLPUBLIC WW8Document :
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Document :
public writerfilter::Reference<Stream>
{
public:
@@ -428,7 +425,7 @@ public:
virtual WW8DocumentIterator::Pointer_t end() = 0;
};
-class WRITERFILTER_DLLPUBLIC WW8DocumentFactory
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentFactory
{
public:
static WW8Stream::Pointer_t
@@ -446,3 +443,5 @@ void doctokidsToXML(::std::iostream & out);
}}
#endif // INCLUDED_WW8_DOCUMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index cb5991c00929..7ce8052da2a5 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,17 +31,12 @@
#include <sal/types.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/io/XInputStream.hpp>
-#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEX_HPP_
#include <com/sun/star/uno/XComponentContext.hpp>
-#endif
-#ifndef INCLUDED_WW8_RESOURCE_MODEL_HXX
#include <resourcemodel/WW8ResourceModel.hxx>
-#endif
-#ifndef _COM_SUN_STAR_XML_SAX_XPARSER_HOO_
#include <com/sun/star/xml/sax/XParser.hpp>
-#endif
#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
+#include <com/sun/star/xml/sax/XFastShapeContextHandler.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -84,11 +80,11 @@ namespace ooxml
using namespace com::sun::star;
-class WRITERFILTER_DLLPUBLIC OOXMLStream
+class WRITERFILTER_OOXML_DLLPUBLIC OOXMLStream
{
public:
enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, FONTTABLE, NUMBERING,
- FOOTNOTES, ENDNOTES, COMMENTS, THEME, SETTINGS };
+ FOOTNOTES, ENDNOTES, COMMENTS, THEME, SETTINGS, VBAPROJECT };
typedef boost::shared_ptr<OOXMLStream> Pointer_t;
virtual ~OOXMLStream() {}
@@ -128,7 +124,7 @@ public:
};
-class WRITERFILTER_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
+class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
{
public:
/**
@@ -164,7 +160,7 @@ public:
*/
virtual void resolveFootnote(Stream & rStream,
const Id & rNoteType,
- const rtl::OUString & rNoteId) = 0;
+ const sal_Int32 nNoteId) = 0;
/**
Resolves an endnote to a stream handler.
@@ -177,7 +173,7 @@ public:
*/
virtual void resolveEndnote(Stream & rStream,
const Id & rNoteType,
- const rtl::OUString & rNoteId) = 0;
+ const sal_Int32 NoteId) = 0;
/**
Resolves a comment to a stream handler.
@@ -186,7 +182,7 @@ public:
@param rComment id of the comment to resolve
*/
virtual void resolveComment(Stream & rStream,
- const rtl::OUString & rCommentId) = 0;
+ const sal_Int32 nCommentId) = 0;
/**
Resolves a picture to a stream handler.
@@ -245,15 +241,17 @@ public:
virtual uno::Reference<io::XInputStream> getStorageStream() = 0;
virtual uno::Reference<io::XInputStream> getInputStreamForId
(const ::rtl::OUString & rId) = 0;
- virtual void setXNoteId(const rtl::OUString & rId) = 0;
- virtual const ::rtl::OUString & getXNoteId() const = 0;
+ virtual void setXNoteId(const sal_Int32 nId) = 0;
+ virtual sal_Int32 getXNoteId() const = 0;
virtual void setXNoteType(const Id & nId) = 0;
virtual const Id & getXNoteType() const = 0;
virtual const ::rtl::OUString & getTarget() const = 0;
+ virtual uno::Reference<xml::sax::XFastShapeContextHandler> getShapeContext( ) = 0;
+ virtual void setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext ) = 0;
};
-class WRITERFILTER_DLLPUBLIC OOXMLDocumentFactory
+class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocumentFactory
{
public:
static OOXMLStream::Pointer_t
@@ -277,3 +275,5 @@ void ooxmlidsToXML(::std::iostream & out);
}}
#endif // INCLUDED_OOXML_DOCUMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx
index a038d25c98f1..152e6a694d6d 100644
--- a/writerfilter/inc/resourcemodel/Fraction.hxx
+++ b/writerfilter/inc/resourcemodel/Fraction.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,10 +30,12 @@
#include <sal/types.h>
+#include <WriterFilterDllApi.hxx>
+
namespace writerfilter {
namespace resourcemodel {
-class Fraction
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Fraction
{
public:
explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1);
@@ -58,3 +61,5 @@ private:
};
}}
#endif // INCLUDED_FRACTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx
index be30c32fd85e..23129b8b4c93 100644
--- a/writerfilter/inc/resourcemodel/LoggedResources.hxx
+++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx
@@ -31,10 +31,12 @@
#include "WW8ResourceModel.hxx"
#include "TagLogger.hxx"
+#include <WriterFilterDllApi.hxx>
+
namespace writerfilter
{
-class LoggedResourcesHelper
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedResourcesHelper
{
public:
explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -54,7 +56,7 @@ private:
string msPrefix;
};
-class LoggedStream : public Stream
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedStream : public Stream
{
public:
explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -94,7 +96,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class LoggedProperties : public Properties
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedProperties : public Properties
{
public:
explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -110,7 +112,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class LoggedTable : public Table
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedTable : public Table
{
public:
explicit LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix);
diff --git a/writerfilter/inc/resourcemodel/OutputWithDepth.hxx b/writerfilter/inc/resourcemodel/OutputWithDepth.hxx
index b6c4d511ab7c..9442b46c5f4e 100644
--- a/writerfilter/inc/resourcemodel/OutputWithDepth.hxx
+++ b/writerfilter/inc/resourcemodel/OutputWithDepth.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,3 +129,5 @@ void OutputWithDepth<T>::outputGroup()
}
}
#endif // INCLUDED_OUTPUT_WITH_DEPTH
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/Protocol.hxx b/writerfilter/inc/resourcemodel/Protocol.hxx
index 2f4c9f6261ba..e63ddfbd5963 100644
--- a/writerfilter/inc/resourcemodel/Protocol.hxx
+++ b/writerfilter/inc/resourcemodel/Protocol.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -6,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: $
- * $Revision: $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -30,7 +28,7 @@
#ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX
#define INCLUDE_WRITERFILTER_PROTOCOL_HXX
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL > 1
#include <boost/shared_ptr.hpp>
#include "WW8ResourceModel.hxx"
@@ -100,3 +98,5 @@ public:
#endif // DEBUG
#endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/QNameToString.hxx b/writerfilter/inc/resourcemodel/QNameToString.hxx
index 2c562b74762d..7a8932b13bcb 100644
--- a/writerfilter/inc/resourcemodel/QNameToString.hxx
+++ b/writerfilter/inc/resourcemodel/QNameToString.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,7 +39,7 @@ namespace writerfilter
{
using namespace ::std;
-class WRITERFILTER_DLLPUBLIC QNameToString
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString
{
typedef boost::shared_ptr<QNameToString> Pointer_t;
typedef map < Id, string > Map;
@@ -62,7 +63,7 @@ public:
string operator()(Id qName);
};
-class WRITERFILTER_DLLPUBLIC SprmIdToString
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SprmIdToString
{
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
@@ -86,3 +87,5 @@ public:
}
#endif // INCLUDED_QNAME_TO_STRING_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
index c1c500545055..0289085dbe79 100644
--- a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
+++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,11 @@
namespace writerfilter {
namespace resourcemodel {
-void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
-void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
+void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
}}
#endif // INCLUDED_RESOURCE_MODEL_HELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/SubSequence.hxx b/writerfilter/inc/resourcemodel/SubSequence.hxx
index 5f03d6ba94bf..930d3c690f16 100644
--- a/writerfilter/inc/resourcemodel/SubSequence.hxx
+++ b/writerfilter/inc/resourcemodel/SubSequence.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,7 @@ void dumpLine(OutputWithDepth<string> & o, SubSequence<T> & rSeq,
sal_uInt32 nOffset, sal_uInt32 nStep);
template <class T>
-class WRITERFILTER_DLLPUBLIC SubSequence
+class SubSequence
{
typedef boost::shared_ptr<com::sun::star::uno::Sequence<T> >
SequencePointer;
@@ -349,3 +350,5 @@ void dumpLine(OutputWithDepth<string> & o, SubSequence<T> & rSeq,
}
#endif // INCLUDED_SUB_SEQUENCE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/TableData.hxx b/writerfilter/inc/resourcemodel/TableData.hxx
index aca4fce71064..9caa1654bffc 100644
--- a/writerfilter/inc/resourcemodel/TableData.hxx
+++ b/writerfilter/inc/resourcemodel/TableData.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,7 @@
#ifndef INCLUDED_TABLE_DATA
#define INCLUDED_TABLE_DATA
-#ifndef INCLUDED_WW8_RESOURCE_MODEL_HXX
#include <resourcemodel/WW8ResourceModel.hxx>
-#endif
#include <vector>
#include <boost/shared_ptr.hpp>
@@ -42,7 +41,7 @@ template <typename T, typename PropertiesPointer>
/**
Class containing the data to describe a table cell.
*/
-class WRITERFILTER_DLLPUBLIC CellData
+class CellData
{
/**
Handle to start of cell.
@@ -127,7 +126,7 @@ template <typename T, typename PropertiesPointer>
/**
Class to handle data of a table row.
*/
-class WRITERFILTER_DLLPUBLIC RowData
+class RowData
{
typedef typename CellData<T, PropertiesPointer>::Pointer_t
CellDataPointer_t;
@@ -276,7 +275,7 @@ template <typename T, typename PropertiesPointer>
/**
Class that holds the data of a table.
*/
-class WRITERFILTER_DLLPUBLIC TableData
+class TableData
{
typedef typename RowData<T, PropertiesPointer>::Pointer_t RowPointer_t;
typedef ::std::vector<RowPointer_t> Rows;
@@ -424,3 +423,5 @@ public:
}
#endif // INCLUDED_TABLE_DATA
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx
index fe43694d25d2..a0525d1b45d9 100644
--- a/writerfilter/inc/resourcemodel/TableManager.hxx
+++ b/writerfilter/inc/resourcemodel/TableManager.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,23 +29,21 @@
#ifndef INCLUDED_TABLE_MANAGER_HXX
#define INCLUDED_TABLE_MANAGER_HXX
-#ifndef INCLUDED_TABLE_DATA_HXX
#include <resourcemodel/TableData.hxx>
-#endif
-#ifndef INCLUDED_WW8_RESOURCE_MODEL_HXX
#include <resourcemodel/WW8ResourceModel.hxx>
-#endif
-#ifndef INCLUDED_SPRMIDS_HXX
#include <doctok/sprmids.hxx>
-#endif
#include <boost/shared_ptr.hpp>
#include <stack>
#include "util.hxx"
#include "TagLogger.hxx"
+#if OSL_DEBUG_LEVEL > 0
+# include <rtl/strbuf.hxx>
+#endif
+
namespace writerfilter
{
@@ -54,7 +53,7 @@ template <typename T, typename PropertiesPointer>
/**
Class to handle events generated by TableManager::resolveCurrentTable
*/
-class WRITERFILTER_DLLPUBLIC TableDataHandler
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TableDataHandler
{
public:
typedef boost::shared_ptr<TableDataHandler> Pointer_t;
@@ -222,7 +221,7 @@ class TableManager
void resetRowProps()
{
- mpCellProps.reset();
+ mpRowProps.reset();
}
void setRowProps(PropertiesPointer pProps)
@@ -547,7 +546,7 @@ public:
virtual void props(PropertiesPointer pProps);
/**
- Handle occurance of character 0x7.
+ Handle occurrence of character 0x7.
*/
virtual void handle0x7();
@@ -972,34 +971,46 @@ void TableManager<T, PropertiesPointer>::resolveCurrentTable()
if (mpTableDataHandler.get() != NULL)
{
- typename TableData<T, PropertiesPointer>::Pointer_t
- pTableData = mTableDataStack.top();
+ try
+ {
+ typename TableData<T, PropertiesPointer>::Pointer_t
+ pTableData = mTableDataStack.top();
- unsigned int nRows = pTableData->getRowCount();
+ unsigned int nRows = pTableData->getRowCount();
- mpTableDataHandler->startTable(nRows, pTableData->getDepth(), getTableProps());
+ mpTableDataHandler->startTable(nRows, pTableData->getDepth(), getTableProps());
- for (unsigned int nRow = 0; nRow < nRows; ++nRow)
- {
- typename RowData<T, PropertiesPointer>::Pointer_t pRowData = pTableData->getRow(nRow);
+ for (unsigned int nRow = 0; nRow < nRows; ++nRow)
+ {
+ typename RowData<T, PropertiesPointer>::Pointer_t pRowData = pTableData->getRow(nRow);
- unsigned int nCells = pRowData->getCellCount();
+ unsigned int nCells = pRowData->getCellCount();
- mpTableDataHandler->startRow(nCells, pRowData->getProperties());
+ mpTableDataHandler->startRow(nCells, pRowData->getProperties());
- for (unsigned int nCell = 0; nCell < nCells; ++nCell)
- {
- mpTableDataHandler->startCell
- (pRowData->getCellStart(nCell),
- pRowData->getCellProperties(nCell));
+ for (unsigned int nCell = 0; nCell < nCells; ++nCell)
+ {
+ mpTableDataHandler->startCell
+ (pRowData->getCellStart(nCell),
+ pRowData->getCellProperties(nCell));
- mpTableDataHandler->endCell(pRowData->getCellEnd(nCell));
+ mpTableDataHandler->endCell(pRowData->getCellEnd(nCell));
+ }
+
+ mpTableDataHandler->endRow();
}
- mpTableDataHandler->endRow();
+ mpTableDataHandler->endTable();
+ }
+ catch (uno::Exception const& e)
+ {
+ (void) e;
+#if OSL_DEBUG_LEVEL > 0
+ rtl::OStringBuffer aBuf("resolving of current table failed with: ");
+ aBuf.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
+ OSL_FAIL(aBuf.getStr());
+#endif
}
-
- mpTableDataHandler->endTable();
}
resetTableProps();
clearData();
@@ -1097,3 +1108,5 @@ void TableManager<T, PropertiesPointer>::ensureOpenCell(PropertiesPointer pProp
}
#endif // INCLUDED_TABLE_MANAGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx
index ff52c22a98fe..cbee3a8ae05d 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,124 +34,56 @@
#include <WriterFilterDllApi.hxx>
#include <resourcemodel/WW8ResourceModel.hxx>
#include <string>
-#include <vector>
-#include <stack>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
-#include <iostream>
+#include <libxml/xmlwriter.h>
namespace writerfilter
{
- using namespace::std;
-
- struct XMLAttribute
- {
- string mName;
- string mValue;
- public:
- XMLAttribute(string sName, string sValue)
- : mName(sName), mValue(sValue)
- {
- }
- };
-
- class WRITERFILTER_DLLPUBLIC XMLTag
+ class IdToString
{
public:
- enum eMode { START, END, COMPLETE };
- typedef boost::shared_ptr<XMLTag> Pointer_t;
- static Pointer_t NIL;
-
- private:
- string mTag;
- string mChars;
-
- typedef vector<XMLAttribute> XMLAttributes_t;
- XMLAttributes_t mAttrs;
- typedef vector<XMLTag::Pointer_t> XMLTags_t;
- XMLTags_t mTags;
- eMode mMode;
-
- public:
- XMLTag(string sTag, eMode mode = COMPLETE) : mTag(sTag), mMode(mode) {}
-
- void addAttr(string name, string value);
- void addAttr(string name, const ::rtl::OUString & value);
- void addAttr(string name, sal_uInt32 nValue);
- void addAttr(string name, uno::Any rAny);
- void addTag(Pointer_t pTag);
- void chars(const string & rChars);
- void chars(const ::rtl::OUString & rChars);
- const string & getTag() const;
- string toString() const;
+ typedef boost::shared_ptr<IdToString> Pointer_t;
+ virtual std::string toString(const Id & id) const = 0;
string toTree(const string & sIndent = "") const;
-
- ostream & output(ostream & o, const string & sIndent = "") const;
};
- class WRITERFILTER_DLLPUBLIC TagLogger
+ class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger
{
public:
- typedef boost::shared_ptr<TagLogger> Pointer_t;
+ typedef TagLogger* Pointer_t;
private:
- stack<XMLTag::Pointer_t> mTags;
- XMLTag::Pointer_t currentTag() const;
- XMLTag::Pointer_t mpRoot;
- string mFileName;
+ xmlTextWriterPtr pWriter;
+ const char* pName;
- TagLogger();
+ TagLogger(const char* name);
public:
~TagLogger();
static Pointer_t getInstance(const char * name);
- void setFileName(const string & rName);
+ void setFileName(const std::string & filename);
void startDocument();
- void element(const string & name);
- void startElement(const string & name);
- void attribute(const string & name, const string & value);
- void attribute(const string & name, const ::rtl::OUString & value);
- void attribute(const string & name, sal_uInt32 value);
- void attribute(const string & name, const uno::Any aAny);
- void addTag(XMLTag::Pointer_t pTag);
- void chars(const string & chars);
+ void element(const std::string & name);
+ void startElement(const std::string & name);
+ void attribute(const std::string & name, const std::string & value);
+ void attribute(const std::string & name, const ::rtl::OUString & value);
+ void attribute(const std::string & name, sal_uInt32 value);
+ void attribute(const std::string & name, const uno::Any aAny);
+ void chars(const std::string & chars);
void chars(const ::rtl::OUString & chars);
- void endElement(const string & name);
+ void endElement();
void endDocument();
- ostream & output(ostream & o) const;
- static void dump(const char * name);
- };
-
- class IdToString
- {
- public:
- typedef boost::shared_ptr<IdToString> Pointer_t;
- virtual string toString(const Id & id) const = 0;
+ void unoPropertySet(uno::Reference<beans::XPropertySet> rPropSet);
+ void propertySet(writerfilter::Reference<Properties>::Pointer_t props,
+ IdToString::Pointer_t pIdToString);
};
-
- class WRITERFILTER_DLLPUBLIC PropertySetToTagHandler : public Properties
- {
- XMLTag::Pointer_t mpTag;
- IdToString::Pointer_t mpIdToString;
-
- public:
- PropertySetToTagHandler(IdToString::Pointer_t pIdToString);
- virtual ~PropertySetToTagHandler();
-
- XMLTag::Pointer_t getTag() const { return mpTag; }
-
- void resolve(XMLTag & rTag,
- writerfilter::Reference<Properties>::Pointer_t props);
-
- virtual void attribute(Id name, Value & val);
- virtual void sprm(Sprm & sprm);
- };
-
-WRITERFILTER_DLLPUBLIC XMLTag::Pointer_t unoPropertySetToTag(uno::Reference<beans::XPropertySet> rPropSet);
}
#endif // INCLUDED_TAG_LOGGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx.orig b/writerfilter/inc/resourcemodel/TagLogger.hxx.orig
new file mode 100644
index 000000000000..e2a000425d8b
--- /dev/null
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx.orig
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_TAG_LOGGER_HXX
+#define INCLUDED_TAG_LOGGER_HXX
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <WriterFilterDllApi.hxx>
+#include <resourcemodel/WW8ResourceModel.hxx>
+#include <string>
+#include <boost/unordered_map.hpp>
+#include <boost/shared_ptr.hpp>
+#include <libxml/xmlwriter.h>
+
+namespace writerfilter
+{
+ class IdToString
+ {
+ public:
+ typedef boost::shared_ptr<IdToString> Pointer_t;
+ virtual std::string toString(const Id & id) const = 0;
+ };
+
+ class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger
+ {
+ public:
+ typedef TagLogger* Pointer_t;
+
+ private:
+<<<<<<< HEAD
+ string mTag;
+ string mChars;
+
+ typedef vector<XMLAttribute> XMLAttributes_t;
+ XMLAttributes_t mAttrs;
+ typedef vector<XMLTag::Pointer_t> XMLTags_t;
+ XMLTags_t mTags;
+ eMode mMode;
+
+ public:
+ XMLTag(string sTag, eMode mode = COMPLETE) : mTag(sTag), mMode(mode) {}
+
+ void addAttr(string name, string value);
+ void addAttr(string name, const ::rtl::OUString & value);
+ void addAttr(string name, sal_uInt32 nValue);
+ void addAttr(string name, uno::Any rAny);
+ void addTag(Pointer_t pTag);
+ void chars(const string & rChars);
+ void chars(const ::rtl::OUString & rChars);
+ const string & getTag() const;
+ string toString() const;
+ string toTree(const string & sIndent = "") const;
+
+ ostream & output(ostream & o, const string & sIndent = "") const;
+ };
+=======
+ xmlTextWriterPtr pWriter;
+ const char* pName;
+>>>>>>> master
+
+ TagLogger(const char* name);
+
+ public:
+ ~TagLogger();
+
+ static Pointer_t getInstance(const char * name);
+
+ void setFileName(const std::string & filename);
+
+ void startDocument();
+ void element(const std::string & name);
+ void startElement(const std::string & name);
+ void attribute(const std::string & name, const std::string & value);
+ void attribute(const std::string & name, const ::rtl::OUString & value);
+ void attribute(const std::string & name, sal_uInt32 value);
+ void attribute(const std::string & name, const uno::Any aAny);
+ void chars(const std::string & chars);
+ void chars(const ::rtl::OUString & chars);
+ void endElement();
+ void endDocument();
+
+ void unoPropertySet(uno::Reference<beans::XPropertySet> rPropSet);
+ void propertySet(writerfilter::Reference<Properties>::Pointer_t props,
+ IdToString::Pointer_t pIdToString);
+ };
+}
+
+#endif // INCLUDED_TAG_LOGGER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index 9acec7f4fee8..32cffdd35490 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,8 @@
*
************************************************************************/
-#ifndef INCLUDED_WW8_EVENT_HANDLER_HXX
-#define INCLUDED_WW8_EVENT_HANDLER_HXX
+#ifndef INCLUDED_WW8RESOURCEMODEL_HXX
+#define INCLUDED_WW8RESOURCEMODEL_HXX
#include <string>
#include <memory>
@@ -89,7 +90,7 @@ using namespace ::std;
*/
template <class T>
-class WRITERFILTER_DLLPUBLIC Reference
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
{
public:
/**
@@ -124,7 +125,7 @@ class Sprm;
/**
Handler for properties.
*/
-class WRITERFILTER_DLLPUBLIC Properties
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties
{
public:
/**
@@ -147,7 +148,7 @@ public:
/**
Handler for tables.
*/
-class WRITERFILTER_DLLPUBLIC Table
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table
{
public:
typedef boost::shared_ptr<Table> Pointer_t;
@@ -163,7 +164,7 @@ public:
/**
Handler for binary objects.
*/
-class WRITERFILTER_DLLPUBLIC BinaryObj
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj
{
public:
/**
@@ -180,7 +181,7 @@ public:
/**
Handler for a stream.
*/
-class WRITERFILTER_DLLPUBLIC Stream
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream
{
public:
/**
@@ -284,7 +285,7 @@ public:
makes no sense for a certain value, e.g. the integer value of a
string.
*/
-class WRITERFILTER_DLLPUBLIC Value
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Value
{
public:
/**
@@ -332,7 +333,7 @@ public:
An SPRM.
*/
-class WRITERFILTER_DLLPUBLIC Sprm
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Sprm
{
public:
typedef auto_ptr<Sprm> Pointer_t;
@@ -382,18 +383,18 @@ public:
/**
Creates handler for a stream.
*/
-Stream::Pointer_t WRITERFILTER_DLLPUBLIC createStreamHandler();
+Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createStreamHandler();
-void WRITERFILTER_DLLPUBLIC analyzerIds();
-Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds();
+ Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createAnalyzer();
-void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC logger(string prefix, string message);
-void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
-void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
-void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
const rtl::OUString & /*str*/);
-void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
class Token_t
{
@@ -425,5 +426,6 @@ struct TokenHash
}
+#endif // INCLUDED_WW8RESOURCEMODEL_HXX
-#endif // INCLUDED_WW8_EVENT_HANDLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx.orig b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx.orig
new file mode 100644
index 000000000000..41fe91a6461a
--- /dev/null
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx.orig
@@ -0,0 +1,445 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_WW8RESOURCEMODEL_HXX
+#define INCLUDED_WW8RESOURCEMODEL_HXX
+
+#include <string>
+#include <memory>
+#include <boost/shared_ptr.hpp>
+#include <sal/types.h>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <WriterFilterDllApi.hxx>
+#include <resourcemodel/OutputWithDepth.hxx>
+/**
+ @file WW8ResourceModel.hxx
+
+ The classes in this file define the interfaces for the resource
+ model of the DocTokenizer:
+
+ @image html doctok.png
+
+ A resource is a set of events that describe an object. A resource
+ is only an abstract concept. It is not instanciated to a class.
+
+ A reference to a resource represents the object that the resource
+ describes. The reference can be resolved thereby generating the
+ events of the resource.
+
+ A handler receives the events generated by resolving a
+ reference. There are several types of handlers each accepting their
+ specific set of events.
+
+ References always have a parameter determining the kind of handler
+ they send the events they generate to. The set of events generated
+ by resolving the reference is a subset of the events received by
+ the handler.
+*/
+
+
+typedef sal_uInt32 Id;
+
+namespace writerfilter {
+using namespace ::com::sun::star;
+using namespace ::std;
+
+/**
+ Reference to an resource that generates events and sends them to a
+ handler.
+
+ The reference can be resolved, i.e. the resource generates its
+ events. The events must be suitable for the handler type given by
+ the template parameter.
+
+ @attention The parameter of the template does not determine the
+ type of the reference's target. It determines the type of the handler!
+
+ Example:
+
+ A Word document can be represented as a stream of events. Event
+ types in a Word document are text, properties, tables, starts and
+ ends of groups. These can be handled by a stream handler (@see
+ Stream). Thus a reference to a Word document is resolved by
+ sending these events to a stream handler.
+*/
+
+template <class T>
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
+{
+public:
+ /**
+ Pointer to reference
+
+ @attention The ownership of a reference is transfered when
+ the reference is passed.
+ */
+ typedef boost::shared_ptr< Reference<T> > Pointer_t;
+
+ virtual ~Reference() {}
+
+ /**
+ Resolves the reference.
+
+ The events of the references target resource are generated and
+ send to a handler.
+
+ @param rHandler handler which receives the events
+ */
+ virtual void resolve(T & rHandler) = 0;
+
+ /**
+ Returns the type of the reference aka the name of the access class.
+ */
+ virtual string getType() const = 0;
+};
+
+class Value;
+class Sprm;
+
+/**
+ Handler for properties.
+ */
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties
+{
+public:
+ /**
+ Receives an attribute.
+
+ @param name name of the attribute
+ @param val value of the attribute
+ */
+ virtual void attribute(Id name, Value & val) = 0;
+
+ /**
+ Receives a SPRM.
+
+ @param sprm the SPRM received
+ */
+ virtual void sprm(Sprm & sprm) = 0;
+
+};
+
+/**
+ Handler for tables.
+ */
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table
+{
+public:
+ typedef boost::shared_ptr<Table> Pointer_t;
+ /**
+ Receives an entry of the table.
+
+ @param pos position of the entry in the table
+ @param ref reference to properties of the entry
+ */
+ virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0;
+};
+
+/**
+ Handler for binary objects.
+ */
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj
+{
+public:
+ /**
+ Receives binary data of the object.
+
+ @param buf pointer to buffer containing the data
+ @param len size of buffer
+ @param ref reference to properties of binary object
+ */
+ virtual void data(const sal_uInt8* buf, size_t len,
+ writerfilter::Reference<Properties>::Pointer_t ref) = 0;
+};
+
+/**
+ Handler for a stream.
+ */
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream
+{
+public:
+ /**
+ Pointer to this stream.
+ */
+ typedef boost::shared_ptr<Stream> Pointer_t;
+
+ /**
+ Receives start mark for group with the same section properties.
+ */
+ virtual void startSectionGroup() = 0;
+
+ /**
+ Receives end mark for group with the same section properties.
+ */
+ virtual void endSectionGroup() = 0;
+
+ /**
+ Receives start mark for group with the same paragraph properties.
+ */
+ virtual void startParagraphGroup() = 0;
+
+ /**
+ Receives end mark for group with the same paragraph properties.
+ */
+ virtual void endParagraphGroup() = 0;
+
+ virtual void markLastParagraphInSection( ) { };
+
+ /**
+ Receives start mark for group with the same character properties.
+ */
+ virtual void startCharacterGroup() = 0;
+
+ /**
+ Receives end mark for group with the same character properties.
+ */
+ virtual void endCharacterGroup() = 0;
+
+ /**
+ Receives a shape.
+ */
+ virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) = 0;
+
+ virtual void endShape( ) = 0;
+
+ /**
+ Receives 8-bit per character text.
+
+ @param data buffer containing the text
+ @param len number of characters in the text
+ */
+ virtual void text(const sal_uInt8 * data, size_t len) = 0;
+
+ /**
+ Receives 16-bit per character text.
+
+ @param data buffer containing the text
+ @param len number of characters in the text.
+ */
+ virtual void utext(const sal_uInt8 * data, size_t len) = 0;
+
+ /**
+ Receives properties of the current run of text.
+
+ @param ref reference to the properties
+ */
+ virtual void props(writerfilter::Reference<Properties>::Pointer_t ref) = 0;
+
+ /**
+ Receives table.
+
+ @param name name of the table
+ @param ref referecne to the table
+ */
+ virtual void table(Id name,
+ writerfilter::Reference<Table>::Pointer_t ref) = 0;
+
+ /**
+ Receives a substream.
+
+ @param name name of the substream
+ @param ref reference to the substream
+ */
+ virtual void substream(Id name,
+ writerfilter::Reference<Stream>::Pointer_t ref) = 0;
+
+
+ /**
+ Debugging: Receives information about current point in stream.
+
+ @param info the information
+ */
+ virtual void info(const string & info) = 0;
+};
+
+/**
+ A value.
+
+ The methods of this class may throw exceptions if a certain aspect
+ makes no sense for a certain value, e.g. the integer value of a
+ string.
+ */
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Value
+{
+public:
+ /**
+ Pointer to a value.
+ */
+ typedef auto_ptr<Value> Pointer_t;
+
+ /**
+ Returns integer representation of the value.
+ */
+ virtual int getInt() const = 0;
+
+ /**
+ Returns string representation of the value.
+ */
+ virtual ::rtl::OUString getString() const = 0;
+
+ /**
+ Returns representation of the value as uno::Any.
+ */
+ virtual uno::Any getAny() const = 0;
+
+ /**
+ Returns properties of this value.
+ */
+ virtual writerfilter::Reference<Properties>::Pointer_t getProperties() = 0;
+
+ /**
+ Returns stream of this value.
+ */
+ virtual writerfilter::Reference<Stream>::Pointer_t getStream() = 0;
+
+ /**
+ Returns binary object of this value.
+ */
+ virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() = 0;
+
+ /**
+ Returns string representation of this value.
+ */
+ virtual string toString() const = 0;
+};
+
+/**
+ An SPRM.
+
+ */
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Sprm
+{
+public:
+ typedef auto_ptr<Sprm> Pointer_t;
+ enum Kind { UNKNOWN, CHARACTER, PARAGRAPH, TABLE };
+ /**
+ Returns id of the SPRM.
+ */
+ virtual sal_uInt32 getId() const = 0;
+
+ /**
+ Returns value of the SPRM.
+ */
+ virtual Value::Pointer_t getValue() = 0;
+
+ /**
+ Returns reference to binary object contained in the SPRM.
+ */
+ virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() = 0;
+
+ /**
+ Returns reference to stream associated with the SPRM.
+ */
+ virtual writerfilter::Reference<Stream>::Pointer_t getStream() = 0;
+
+ /**
+ Returns reference to properties contained in the SPRM.
+
+ */
+ virtual writerfilter::Reference<Properties>::Pointer_t getProps() = 0;
+
+ /**
+ Returns the kind of this SPRM.
+ */
+ virtual Kind getKind() = 0;
+
+ /**
+ Returns name of sprm.
+ */
+ virtual string getName() const = 0;
+
+ /**
+ Returns string repesentation of sprm.
+ */
+ virtual string toString() const = 0;
+};
+
+/**
+ Creates handler for a stream.
+*/
+Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createStreamHandler();
+
+<<<<<<< HEAD
+void WRITERFILTER_DLLPUBLIC analyzerIds();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
+
+void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
+
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
+ const rtl::OUString & /*str*/);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+
+class Token_t
+{
+ sal_Int32 m_nId;
+#ifdef DEBUG
+ ::std::string m_string;
+#endif
+
+ void assign(sal_Int32 nId);
+
+public:
+ Token_t();
+ Token_t(sal_Int32 nId);
+ virtual ~Token_t();
+
+ sal_Int32 getId() const;
+ operator sal_Int32() const;
+ Token_t & operator = (sal_Int32 n);
+
+#ifdef DEBUG
+ ::std::string toString() const;
+#endif
+};
+
+struct TokenHash
+{
+ size_t operator()(const Token_t & rToken) const;
+};
+
+=======
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds();
+ Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createAnalyzer();
+
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC logger(string prefix, string message);
+
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
+ const rtl::OUString & /*str*/);
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+
+>>>>>>> master
+}
+
+#endif // INCLUDED_WW8RESOURCEMODEL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx
index 22e50fc15bb9..d5e97a2be563 100644
--- a/writerfilter/inc/resourcemodel/XPathLogger.hxx
+++ b/writerfilter/inc/resourcemodel/XPathLogger.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,23 +28,22 @@
#ifndef INCLUDED_XPATH_LOGGER_HXX
#define INCLUDED_XPATH_LOGGER_HXX
-#include <hash_map>
#include <stack>
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
+#include <boost/unordered_map.hpp>
#include <WriterFilterDllApi.hxx>
namespace writerfilter
{
-using ::std::hash_map;
using ::std::stack;
using ::std::string;
using ::std::vector;
-class WRITERFILTER_DLLPUBLIC XPathLogger
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC XPathLogger
{
- typedef hash_map<string, unsigned int> TokenMap_t;
+ typedef boost::unordered_map<string, unsigned int> TokenMap_t;
typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t;
TokenMapPointer_t mp_tokenMap;
diff --git a/writerfilter/inc/resourcemodel/exceptions.hxx b/writerfilter/inc/resourcemodel/exceptions.hxx
index 708355bff880..c6d3b5821758 100644
--- a/writerfilter/inc/resourcemodel/exceptions.hxx
+++ b/writerfilter/inc/resourcemodel/exceptions.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
namespace writerfilter {
using namespace ::std;
-class WRITERFILTER_DLLPUBLIC Exception
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Exception
{
string mText;
@@ -44,13 +45,13 @@ public:
const string & getText() const { return mText; }
};
-class WRITERFILTER_DLLPUBLIC ExceptionNotFound : public Exception
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionNotFound : public Exception
{
public:
ExceptionNotFound(string text) : Exception(text) {}
};
-class WRITERFILTER_DLLPUBLIC ExceptionOutOfBounds : public Exception
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionOutOfBounds : public Exception
{
public:
ExceptionOutOfBounds(string text) : Exception(text) {}
@@ -58,3 +59,5 @@ public:
}
#endif // _DOCTOK_EXCEPTIONS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx
index 0a700513576a..d89a4c063a91 100644
--- a/writerfilter/inc/resourcemodel/util.hxx
+++ b/writerfilter/inc/resourcemodel/util.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,10 +38,10 @@ namespace writerfilter
using namespace ::std;
using namespace ::com::sun::star;
- string WRITERFILTER_DLLPUBLIC xmlify(const string & str);
+ string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC xmlify(const string & str);
-#ifdef DEBUG
- string WRITERFILTER_DLLPUBLIC propertysetToString
+#if OSL_DEBUG_LEVEL > 1
+ string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC propertysetToString
(uno::Reference<beans::XPropertySet> const & rProps);
string toString(uno::Reference< text::XTextRange > textRange);
@@ -48,3 +49,5 @@ namespace writerfilter
#endif
}
#endif // INCLUDED_RESOURCEMODEL_UTIL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/rtftok/RTFInputSource.hxx b/writerfilter/inc/rtftok/RTFInputSource.hxx
index 7eb191431206..5a0ca071ab1a 100644
--- a/writerfilter/inc/rtftok/RTFInputSource.hxx
+++ b/writerfilter/inc/rtftok/RTFInputSource.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ public:
#endif /* INCLUDED_RTFINPUTSOURCE_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/rtftok/RTFParseException.hxx b/writerfilter/inc/rtftok/RTFParseException.hxx
index 558ecdc45cf3..338711e57cb7 100644
--- a/writerfilter/inc/rtftok/RTFParseException.hxx
+++ b/writerfilter/inc/rtftok/RTFParseException.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ public:
#endif /* INCLUDED_RTFPARSEEXCEPTION_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/rtftok/RTFScanner.hxx b/writerfilter/inc/rtftok/RTFScanner.hxx
index 56372dc27bb5..9f1e2c655402 100644
--- a/writerfilter/inc/rtftok/RTFScanner.hxx
+++ b/writerfilter/inc/rtftok/RTFScanner.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ public:
#endif /* INCLUDED_RTFSCANNER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/rtftok/RTFScannerHandler.hxx b/writerfilter/inc/rtftok/RTFScannerHandler.hxx
index c8e61903055c..aa423439fa53 100644
--- a/writerfilter/inc/rtftok/RTFScannerHandler.hxx
+++ b/writerfilter/inc/rtftok/RTFScannerHandler.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ public:
} } /* end namespace writerfilter::rtftok */
#endif /* INCLUDED_RTFSCANNERHANDLER_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */