diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:38:26 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:38:26 +0100 |
commit | 62abc842160313fbcdee8ff46c6b4fae6321f21d (patch) | |
tree | e64848c660027d77782a046e5da55d827c2e4b29 /writerfilter | |
parent | af9cd95a2499e602887352c833d3ac52ce9670f2 (diff) | |
parent | c08aba6a410bd7e85095a485486dcfb5bb6612b8 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
binfilter/bf_forms/source/component/forms_Filter.cxx
binfilter/bf_sw/source/core/inc/node2lay.hxx
binfilter/bf_sw/source/filter/xml/sw_swxml.cxx
binfilter/inc/bf_sw/swdbtoolsclient.hxx
filter/source/xsltdialog/xmlfileview.cxx
oox/source/ole/axcontrol.cxx
oox/source/vml/vmlformatting.cxx
oox/source/xls/autofiltercontext.cxx
oox/source/xls/externallinkfragment.cxx
oox/source/xls/formulaparser.cxx
oox/source/xls/pivotcachebuffer.cxx
oox/source/xls/pivotcachefragment.cxx
oox/source/xls/sheetdatacontext.cxx
writerfilter/source/dmapper/GraphicImport.cxx
writerfilter/source/dmapper/SettingsTable.cxx
writerfilter/source/ooxml/model.xml
Diffstat (limited to 'writerfilter')
88 files changed, 2922 insertions, 1814 deletions
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index b3ea929a30f7..d9d40aa32ad9 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -29,7 +29,7 @@ #define INCLUDED_DOMAINMAPPER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/text/FontEmphasis.hpp> #include <com/sun/star/style/TabAlign.hpp> @@ -78,8 +78,8 @@ enum SourceDocumentType DOCUMENT_OOXML, DOCUMENT_RTF }; -class WRITERFILTER_DLLPUBLIC DomainMapper : public Properties, public Table, - public BinaryObj, public Stream +class WRITERFILTER_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable, + public BinaryObj, public LoggedStream { DomainMapper_Impl *m_pImpl; @@ -90,38 +90,14 @@ public: SourceDocumentType eDocumentType ); virtual ~DomainMapper(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + // Stream + virtual void markLastParagraphInSection(); // BinaryObj virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref); - // Stream - virtual void startSectionGroup(); - virtual void endSectionGroup(); - virtual void startParagraphGroup(); - virtual void endParagraphGroup(); - virtual void markLastParagraphInSection(); - virtual void startCharacterGroup(); - virtual void endCharacterGroup(); - virtual void startShape( ::com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - virtual void endShape( ); - - virtual void text(const sal_uInt8 * data, size_t len); - virtual void utext(const sal_uInt8 * data, size_t len); - virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); - virtual void table(Id name, - writerfilter::Reference<Table>::Pointer_t ref); - virtual void substream(Id name, - ::writerfilter::Reference<Stream>::Pointer_t ref); - virtual void info(const string & info); - - void sprm( Sprm& sprm, ::boost::shared_ptr<PropertyMap> pContext, SprmType = SPRM_DEFAULT ); + void sprmWithProps( Sprm& sprm, ::boost::shared_ptr<PropertyMap> pContext, SprmType = SPRM_DEFAULT ); void PushStyleSheetProperties( ::boost::shared_ptr<PropertyMap> pStyleProperties, bool bAffectTableMngr = false ); void PopStyleSheetProperties( bool bAffectTableMngr = false ); @@ -138,6 +114,32 @@ public: boost::shared_ptr< StyleSheetTable > GetStyleSheetTable( ); private: + // Stream + virtual void lcl_startSectionGroup(); + virtual void lcl_endSectionGroup(); + virtual void lcl_startParagraphGroup(); + virtual void lcl_endParagraphGroup(); + virtual void lcl_startCharacterGroup(); + virtual void lcl_endCharacterGroup(); + virtual void lcl_startShape( ::com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + virtual void lcl_endShape( ); + + virtual void lcl_text(const sal_uInt8 * data, size_t len); + virtual void lcl_utext(const sal_uInt8 * data, size_t len); + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_table(Id name, + writerfilter::Reference<Table>::Pointer_t ref); + virtual void lcl_substream(Id name, + ::writerfilter::Reference<Stream>::Pointer_t ref); + virtual void lcl_info(const string & info); + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + void handleUnderlineType(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext); void handleParaJustification(const sal_Int32 nIntValue, const ::boost::shared_ptr<PropertyMap> pContext, const bool bExchangeLeftRight); bool getColorFromIndex(const sal_Int32 nIndex, sal_Int32 &nColor); diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx new file mode 100644 index 000000000000..65e5ef251d15 --- /dev/null +++ b/writerfilter/inc/resourcemodel/Fraction.hxx @@ -0,0 +1,63 @@ +/* -*- 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_FRACTION_HXX +#define INCLUDED_FRACTION_HXX + +#include <sal/types.h> + +namespace writerfilter { +namespace resourcemodel { + +class Fraction +{ +public: + explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1); + explicit Fraction(const Fraction & a, const Fraction & b); + virtual ~Fraction(); + + void init(sal_Int32 nNumerator, sal_Int32 nDenominator); + void assign(const Fraction & rFraction); + + Fraction inverse() const; + + Fraction operator=(const Fraction & rFraction); + Fraction operator+(const Fraction & rFraction) const; + Fraction operator-(const Fraction & rFraction) const; + Fraction operator*(const Fraction & rFraction) const; + Fraction operator/(const Fraction & rFraction) const; + operator sal_Int32() const; + operator float() const; + +private: + sal_Int32 mnNumerator; + sal_Int32 mnDenominator; +}; +}} +#endif // INCLUDED_FRACTION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx new file mode 100644 index 000000000000..be30c32fd85e --- /dev/null +++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * 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_LOGGED_RESOURCES_HXX +#define INCLUDED_LOGGED_RESOURCES_HXX + +#include "WW8ResourceModel.hxx" +#include "TagLogger.hxx" + +namespace writerfilter +{ + +class LoggedResourcesHelper +{ +public: + explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedResourcesHelper(); + + void startElement(const string & sElement); + void endElement(const string & sElement); + void chars(const ::rtl::OUString & rChars); + void chars(const string & rChars); + void attribute(const string & rName, const string & rValue); + void attribute(const string & rName, sal_uInt32 nValue); + + void setPrefix(const string & rPrefix); + +private: + TagLogger::Pointer_t mpLogger; + string msPrefix; +}; + +class LoggedStream : public Stream +{ +public: + explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedStream(); + + void startSectionGroup(); + void endSectionGroup(); + void startParagraphGroup(); + void endParagraphGroup(); + void startCharacterGroup(); + void endCharacterGroup(); + void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + void endShape(); + void text(const sal_uInt8 * data, size_t len); + void utext(const sal_uInt8 * data, size_t len); + void props(writerfilter::Reference<Properties>::Pointer_t ref); + void table(Id name, writerfilter::Reference<Table>::Pointer_t ref); + void substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref); + void info(const string & info); + +protected: + virtual void lcl_startSectionGroup() = 0; + virtual void lcl_endSectionGroup() = 0; + virtual void lcl_startParagraphGroup() = 0; + virtual void lcl_endParagraphGroup() = 0; + virtual void lcl_startCharacterGroup() = 0; + virtual void lcl_endCharacterGroup() = 0; + virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) = 0; + virtual void lcl_endShape() = 0; + virtual void lcl_text(const sal_uInt8 * data, size_t len) = 0; + virtual void lcl_utext(const sal_uInt8 * data, size_t len) = 0; + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) = 0; + virtual void lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref) = 0; + virtual void lcl_substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) = 0; + virtual void lcl_info(const string & info) = 0; + + LoggedResourcesHelper mHelper; +}; + +class LoggedProperties : public Properties +{ +public: + explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedProperties(); + + void attribute(Id name, Value & val); + void sprm(Sprm & sprm); + +protected: + virtual void lcl_attribute(Id name, Value & val) = 0; + virtual void lcl_sprm(Sprm & sprm) = 0; + + LoggedResourcesHelper mHelper; +}; + +class LoggedTable : public Table +{ +public: + explicit LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix); + virtual ~LoggedTable(); + + void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + +protected: + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0; + + LoggedResourcesHelper mHelper; +}; + +} +#endif // INCLUDED_LOGGED_RESOURCES_HXX diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index e6de7b8835fd..ffe3daca71e0 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -29,8 +29,6 @@ #ifndef INCLUDED_TAG_LOGGER_HXX #define INCLUDED_TAG_LOGGER_HXX -#if OSL_DEBUG_LEVEL > 1 - #include <rtl/ustring.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <WriterFilterDllApi.hxx> @@ -85,7 +83,6 @@ namespace writerfilter }; } -#endif // DEBUG #endif // INCLUDED_TAG_LOGGER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx new file mode 100644 index 000000000000..0173e9c8cdde --- /dev/null +++ b/writerfilter/inc/resourcemodel/XPathLogger.hxx @@ -0,0 +1,65 @@ +/* -*- 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_XPATH_LOGGER_HXX +#define INCLUDED_XPATH_LOGGER_HXX + +#include <stack> +#include <string> +#include <vector> +#include <boost/shared_ptr.hpp> +#include <boost/unordered_map.hpp> +#include <WriterFilterDllApi.hxx> + +namespace writerfilter +{ +using ::std::stack; +using ::std::string; +using ::std::vector; + +class WRITERFILTER_DLLPUBLIC XPathLogger +{ + typedef boost::unordered_map<string, unsigned int> TokenMap_t; + typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t; + + TokenMapPointer_t mp_tokenMap; + stack<TokenMapPointer_t> m_tokenMapStack; + vector<string> m_path; + string m_currentPath; + + void updateCurrentPath(); + +public: + explicit XPathLogger(); + virtual ~XPathLogger(); + + string getXPath() const; + void startElement(string _token); + void endElement(); +}; +} +#endif // INCLUDED_XPATH_LOGGER_HXX diff --git a/writerfilter/inc/writerfilter.mk b/writerfilter/inc/writerfilter.mk index 753850717b2b..0b0c5cae6292 100644 --- a/writerfilter/inc/writerfilter.mk +++ b/writerfilter/inc/writerfilter.mk @@ -31,3 +31,6 @@ CDEFS+=-DDEBUG_DOMAINMAPPER -DDEBUG_ELEMENT -DDEBUG_RESOLVE \ -DDEBUG_CONTEXT_STACK -DDEBUG_ATTRIBUTES -DDEBUG_PROPERTIES CFLAGS += $(LIBXML_CFLAGS) .ENDIF +.IF "$(SYSTEM_LIBXML)" == "YES" +CFLAGS+=-DSYSTEM_LIBXML $(LIBXML_CFLAGS) +.ENDIF diff --git a/writerfilter/prj/build.lst b/writerfilter/prj/build.lst index b97a22778f78..e70b99a052c5 100644 --- a/writerfilter/prj/build.lst +++ b/writerfilter/prj/build.lst @@ -1,4 +1,4 @@ -wf writerfilter : soltools sal BOOST:boost cppu cppuhelper ucbhelper tools svx LIBXSLT:libxslt oox xmloff NULL +wf writerfilter : soltools sal BOOST:boost cppu cppuhelper ucbhelper tools svx LIBXSLT:libxslt oox NULL wf writerfilter usr1 - all wf_mkout NULL wf writerfilter\source\resourcemodel nmake - all wf_resourcemodel NULL wf writerfilter\source\doctok nmake - all wf_doctok wf_resourcemodel NULL diff --git a/writerfilter/prj/d.lst b/writerfilter/prj/d.lst index f941f4266035..1d09ecf9ad2b 100644 --- a/writerfilter/prj/d.lst +++ b/writerfilter/prj/d.lst @@ -2,6 +2,7 @@ ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll ..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib +..\%__SRC%\misc\writerfilter.component %_DEST%\xml%_EXT%\writerfilter.component mkdir: %_DEST%\inc%_EXT%\writerfilter\doctok ..\%__SRC%\inc\doctok\sprmids.hxx %_DEST%\inc%_EXT%\writerfilter\doctok\sprmids.hxx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/Table5CellBorders.docx b/writerfilter/qa/complex/ooxml/testdocuments/Table5CellBorders.docx Binary files differnew file mode 100644 index 000000000000..6b278175601b --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/Table5CellBorders.docx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/TableDifferentColumns.docx b/writerfilter/qa/complex/ooxml/testdocuments/TableDifferentColumns.docx Binary files differnew file mode 100644 index 000000000000..0503327ddecd --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/TableDifferentColumns.docx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/TablePreferredWidth.docx b/writerfilter/qa/complex/ooxml/testdocuments/TablePreferredWidth.docx Binary files differnew file mode 100644 index 000000000000..719b3888a018 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/TablePreferredWidth.docx diff --git a/writerfilter/qa/complex/ooxml/testdocuments/TableRowProperties.docx b/writerfilter/qa/complex/ooxml/testdocuments/TableRowProperties.docx Binary files differnew file mode 100644 index 000000000000..775d63c97b34 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/testdocuments/TableRowProperties.docx diff --git a/writerfilter/qa/cppunittests/doctok/makefile.mk b/writerfilter/qa/cppunittests/doctok/makefile.mk index f4b012c51b7d..2896e297a43f 100644 --- a/writerfilter/qa/cppunittests/doctok/makefile.mk +++ b/writerfilter/qa/cppunittests/doctok/makefile.mk @@ -28,8 +28,6 @@ PRJ=..$/..$/.. PRJNAME=writerfilter TARGET=test-doctok -# this is removed at the moment because we need some enhancements -# TESTDIR=TRUE ENABLE_EXCEPTIONS=TRUE diff --git a/writerfilter/qa/cppunittests/qname/makefile.mk b/writerfilter/qa/cppunittests/qname/makefile.mk index bde10a119653..9877e271d821 100644 --- a/writerfilter/qa/cppunittests/qname/makefile.mk +++ b/writerfilter/qa/cppunittests/qname/makefile.mk @@ -28,8 +28,6 @@ PRJ=..$/..$/.. PRJNAME=writerfilter TARGET=test-qname -# this is removed at the moment because we need some enhancements -# TESTDIR=TRUE ENABLE_EXCEPTIONS=TRUE diff --git a/writerfilter/qa/cppunittests/sl/makefile.mk b/writerfilter/qa/cppunittests/sl/makefile.mk index df1a6ab32bb0..0ea9c4800641 100644 --- a/writerfilter/qa/cppunittests/sl/makefile.mk +++ b/writerfilter/qa/cppunittests/sl/makefile.mk @@ -28,8 +28,6 @@ PRJ=..$/..$/.. PRJNAME=writerfilter TARGET=test-od_sl -# this is removed at the moment because we need some enhancements -# TESTDIR=TRUE ENABLE_EXCEPTIONS=TRUE diff --git a/writerfilter/qa/cppunittests/xxml/makefile.mk b/writerfilter/qa/cppunittests/xxml/makefile.mk index d42426b61d34..fcce5dbec8dd 100644 --- a/writerfilter/qa/cppunittests/xxml/makefile.mk +++ b/writerfilter/qa/cppunittests/xxml/makefile.mk @@ -28,8 +28,6 @@ PRJ=..$/..$/.. PRJNAME=writerfilter TARGET=test-xxml -# this is removed at the moment because we need some enhancements -# TESTDIR=TRUE ENABLE_EXCEPTIONS=TRUE diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx index 9743625ae9d4..85fe714c25e3 100644 --- a/writerfilter/source/dmapper/BorderHandler.cxx +++ b/writerfilter/source/dmapper/BorderHandler.cxx @@ -42,12 +42,13 @@ using namespace ::com::sun::star; BorderHandler::BorderHandler( bool bOOXML ) : - m_nCurrentBorderPosition( BORDER_TOP ), - m_nLineWidth(0), - m_nLineType(0), - m_nLineColor(0), - m_nLineDistance(0), - m_bOOXML( bOOXML ) +LoggedProperties(dmapper_logger, "BorderHandler"), +m_nCurrentBorderPosition( BORDER_TOP ), +m_nLineWidth(0), +m_nLineType(0), +m_nLineColor(0), +m_nLineDistance(0), +m_bOOXML( bOOXML ) { const int nBorderCount(BORDER_COUNT); std::fill_n(m_aFilledLines, nBorderCount, false); @@ -58,14 +59,8 @@ BorderHandler::~BorderHandler() { } -void BorderHandler::attribute(Id rName, Value & rVal) +void BorderHandler::lcl_attribute(Id rName, Value & rVal) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("BorderHandler.attribute"); - dmapper_logger->attribute("id", (*QNameToString::Instance())(rName)); - dmapper_logger->endElement(); -#endif - sal_Int32 nIntValue = rVal.getInt(); switch( rName ) { @@ -109,13 +104,8 @@ void BorderHandler::attribute(Id rName, Value & rVal) } } -void BorderHandler::sprm(Sprm & rSprm) +void BorderHandler::lcl_sprm(Sprm & rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("BorderHandler.sprm"); - dmapper_logger->attribute("sprm", rSprm.toString()); -#endif - switch( rSprm.getId()) { case NS_ooxml::LN_CT_TblBorders_top: @@ -136,11 +126,6 @@ void BorderHandler::sprm(Sprm & rSprm) break; default:; } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif - } PropertyMapPtr BorderHandler::getProperties() diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx index 71c4b5e67510..6d23f123c2aa 100644 --- a/writerfilter/source/dmapper/BorderHandler.hxx +++ b/writerfilter/source/dmapper/BorderHandler.hxx @@ -29,7 +29,7 @@ #define INCLUDED_BORDERHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/table/BorderLine2.hpp> @@ -37,7 +37,7 @@ namespace writerfilter { namespace dmapper { class PropertyMap; -class WRITERFILTER_DLLPRIVATE BorderHandler : public Properties +class WRITERFILTER_DLLPRIVATE BorderHandler : public LoggedProperties { public: //todo: order is a guess @@ -64,14 +64,14 @@ private: bool m_aFilledLines[BORDER_COUNT]; ::com::sun::star::table::BorderLine2 m_aBorderLines[BORDER_COUNT]; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: BorderHandler( bool bOOXML ); virtual ~BorderHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - ::boost::shared_ptr<PropertyMap> getProperties(); ::com::sun::star::table::BorderLine2 getBorderLine(); sal_Int32 getLineDistance() const { return m_nLineDistance;} diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx index 1f1fdf1ecd7c..8b087e7bd3eb 100644 --- a/writerfilter/source/dmapper/CellColorHandler.cxx +++ b/writerfilter/source/dmapper/CellColorHandler.cxx @@ -31,6 +31,7 @@ #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> #include <sal/macros.h> +#include "dmapperLoggers.hxx" #define OOXML_COLOR_AUTO 0x0a //todo: AutoColor needs symbol @@ -42,9 +43,10 @@ using namespace ::writerfilter; CellColorHandler::CellColorHandler() : - m_nShadowType( 0 ), - m_nColor( 0xffffffff ), - m_nFillColor( 0xffffffff ), +LoggedProperties(dmapper_logger, "CellColorHandler"), +m_nShadowType( 0 ), +m_nColor( 0xffffffff ), +m_nFillColor( 0xffffffff ), m_OutputFormat( Form ) { } @@ -53,7 +55,7 @@ CellColorHandler::~CellColorHandler() { } -void CellColorHandler::attribute(Id rName, Value & rVal) +void CellColorHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); switch( rName ) @@ -92,7 +94,7 @@ void CellColorHandler::attribute(Id rName, Value & rVal) } } -void CellColorHandler::sprm(Sprm & rSprm) +void CellColorHandler::lcl_sprm(Sprm & rSprm) { (void)rSprm; } diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx index 3cdf730211b1..a745b8fcf73e 100644 --- a/writerfilter/source/dmapper/CellColorHandler.hxx +++ b/writerfilter/source/dmapper/CellColorHandler.hxx @@ -29,14 +29,14 @@ #define INCLUDED_CELLCOLORHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { namespace dmapper { class TablePropertyMap; -class WRITERFILTER_DLLPRIVATE CellColorHandler : public Properties +class WRITERFILTER_DLLPRIVATE CellColorHandler : public LoggedProperties { public: enum OutputFormat { Form, Paragraph, Character }; // for what part of the document @@ -46,14 +46,14 @@ private: sal_Int32 m_nFillColor; OutputFormat m_OutputFormat; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: CellColorHandler( ); virtual ~CellColorHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - ::boost::shared_ptr<TablePropertyMap> getProperties(); void setOutputFormat( OutputFormat format ) { m_OutputFormat = format; } diff --git a/writerfilter/source/dmapper/CellMarginHandler.cxx b/writerfilter/source/dmapper/CellMarginHandler.cxx index 670ff6005478..25c2530c1b4a 100644 --- a/writerfilter/source/dmapper/CellMarginHandler.cxx +++ b/writerfilter/source/dmapper/CellMarginHandler.cxx @@ -30,6 +30,7 @@ #include <doctok/resourceids.hxx> #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" namespace writerfilter { namespace dmapper { @@ -37,17 +38,17 @@ namespace dmapper { using namespace ::com::sun::star; using namespace ::writerfilter; - CellMarginHandler::CellMarginHandler() : - m_nValue( 0 ), - m_nLeftMargin( 0 ), - m_bLeftMarginValid( false ), - m_nRightMargin( 0 ), - m_bRightMarginValid( false ), - m_nTopMargin( 0 ), - m_bTopMarginValid( false ), - m_nBottomMargin( 0 ), - m_bBottomMarginValid( false ) +LoggedProperties(dmapper_logger, "CellMarginHandler"), +m_nValue( 0 ), +m_nLeftMargin( 0 ), +m_bLeftMarginValid( false ), +m_nRightMargin( 0 ), +m_bRightMarginValid( false ), +m_nTopMargin( 0 ), +m_bTopMarginValid( false ), +m_nBottomMargin( 0 ), +m_bBottomMarginValid( false ) { } @@ -55,7 +56,7 @@ CellMarginHandler::~CellMarginHandler() { } -void CellMarginHandler::attribute(Id rName, Value & rVal) +void CellMarginHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)nIntValue; @@ -73,7 +74,7 @@ void CellMarginHandler::attribute(Id rName, Value & rVal) } } -void CellMarginHandler::sprm(Sprm & rSprm) +void CellMarginHandler::lcl_sprm(Sprm & rSprm) { writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) diff --git a/writerfilter/source/dmapper/CellMarginHandler.hxx b/writerfilter/source/dmapper/CellMarginHandler.hxx index 4642f3a61b1b..7a36458a72c2 100644 --- a/writerfilter/source/dmapper/CellMarginHandler.hxx +++ b/writerfilter/source/dmapper/CellMarginHandler.hxx @@ -29,18 +29,22 @@ #define INCLUDED_CELLMARGINHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { namespace dmapper { class TablePropertyMap; -class WRITERFILTER_DLLPRIVATE CellMarginHandler : public Properties +class WRITERFILTER_DLLPRIVATE CellMarginHandler : public LoggedProperties { private: sal_Int32 m_nValue; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: sal_Int32 m_nLeftMargin; bool m_bLeftMarginValid; @@ -55,10 +59,6 @@ public: CellMarginHandler( ); virtual ~CellMarginHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - ::boost::shared_ptr<TablePropertyMap> getProperties(); }; diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 945ddd5d8c82..97131a48cfe4 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -87,15 +87,11 @@ #include <vector> #include <iostream> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/QNameToString.hxx> -#include <resourcemodel/util.hxx> -#include <resourcemodel/TagLogger.hxx> -#endif #if OSL_DEBUG_LEVEL > 0 #include <resourcemodel/QNameToString.hxx> #endif +#include <resourcemodel/TagLogger.hxx> using namespace ::com::sun::star; using namespace ::rtl; @@ -107,9 +103,7 @@ using resourcemodel::resolveAttributeProperties; namespace dmapper{ -#ifdef DEBUG_DOMAINMAPPER TagLogger::Pointer_t dmapper_logger(TagLogger::getInstance("DOMAINMAPPER")); -#endif struct _PageSz { @@ -124,6 +118,9 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon uno::Reference< io::XInputStream > xInputStream, uno::Reference< lang::XComponent > xModel, SourceDocumentType eDocumentType) : +LoggedProperties(dmapper_logger, "DomainMapper"), +LoggedTable(dmapper_logger, "DomainMapper"), +LoggedStream(dmapper_logger, "DomainMapper"), m_pImpl( new DomainMapper_Impl( *this, xContext, xModel, eDocumentType )), mnBackgroundColor(0), mbIsHighlightSet(false) { @@ -184,14 +181,8 @@ DomainMapper::~DomainMapper() delete m_pImpl; } -void DomainMapper::attribute(Id nName, Value & val) +void DomainMapper::lcl_attribute(Id nName, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); - dmapper_logger->attribute("value", val.toString()); - dmapper_logger->endElement(); -#endif static ::rtl::OUString sLocalBookmarkName; sal_Int32 nIntValue = val.getInt(); rtl::OUString sStringValue = val.getString(); @@ -1419,18 +1410,14 @@ void DomainMapper::attribute(Id nName, Value & val) } } -void DomainMapper::sprm(Sprm & rSprm) +void DomainMapper::lcl_sprm(Sprm & rSprm) { if( !m_pImpl->getTableManager().sprm(rSprm)) - DomainMapper::sprm( rSprm, m_pImpl->GetTopContext() ); + sprmWithProps( rSprm, m_pImpl->GetTopContext() ); } -void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType ) +void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("DomainMapper.sprm"); - dmapper_logger->chars(rSprm.toString()); -#endif OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!"); if(!rContext.get()) return ; @@ -1960,12 +1947,6 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp { uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("charWeight"); - dmapper_logger->attribute("weight", nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL); - dmapper_logger->endElement(); -#endif - rContext->Insert(ePropertyId, true, aBold ); if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold ); @@ -3136,26 +3117,13 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp #endif } } - -#ifdef DEBUG_DOMAINMAPPER - rContext->dumpXml(dmapper_logger); - dmapper_logger->endElement(); -#endif } -void DomainMapper::entry(int /*pos*/, +void DomainMapper::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("DomainMapper.entry"); -#endif - ref->resolve(*this); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } void DomainMapper::data(const sal_uInt8* /*buf*/, size_t /*len*/, @@ -3163,15 +3131,12 @@ void DomainMapper::data(const sal_uInt8* /*buf*/, size_t /*len*/, { } -void DomainMapper::startSectionGroup() +void DomainMapper::lcl_startSectionGroup() { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("section"); -#endif m_pImpl->PushProperties(CONTEXT_SECTION); } -void DomainMapper::endSectionGroup() +void DomainMapper::lcl_endSectionGroup() { PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_SECTION); SectionPropertyMap* pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() ); @@ -3179,18 +3144,10 @@ void DomainMapper::endSectionGroup() if(pSectionContext) pSectionContext->CloseSectionGroup( *m_pImpl ); m_pImpl->PopProperties(CONTEXT_SECTION); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void DomainMapper::startParagraphGroup() +void DomainMapper::lcl_startParagraphGroup() { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("paragraph"); -#endif - m_pImpl->getTableManager().startParagraphGroup(); m_pImpl->PushProperties(CONTEXT_PARAGRAPH); static ::rtl::OUString sDefault(RTL_CONSTASCII_USTRINGPARAM("Standard") ); @@ -3205,40 +3162,27 @@ void DomainMapper::startParagraphGroup() m_pImpl->clearDeferredBreaks(); } -void DomainMapper::endParagraphGroup() +void DomainMapper::lcl_endParagraphGroup() { m_pImpl->PopProperties(CONTEXT_PARAGRAPH); m_pImpl->getTableManager().endParagraphGroup(); //frame conversion has to be executed after table conversion m_pImpl->ExecuteFrameConversion(); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } void DomainMapper::markLastParagraphInSection( ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element( "markLastParagraphInSection" ); -#endif m_pImpl->SetIsLastParagraphInSection( true ); } -void DomainMapper::startShape( uno::Reference< drawing::XShape > xShape ) +void DomainMapper::lcl_startShape( uno::Reference< drawing::XShape > xShape ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("shape"); -#endif m_pImpl->PushShapeContext( xShape ); } -void DomainMapper::endShape( ) +void DomainMapper::lcl_endShape( ) { m_pImpl->PopShapeContext( ); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } void DomainMapper::PushStyleSheetProperties( PropertyMapPtr pStyleProperties, bool bAffectTableMngr ) @@ -3268,12 +3212,8 @@ void DomainMapper::PopListProperties() m_pImpl->PopProperties( CONTEXT_LIST ); } -void DomainMapper::startCharacterGroup() +void DomainMapper::lcl_startCharacterGroup() { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("charactergroup"); -#endif - m_pImpl->PushProperties(CONTEXT_CHARACTER); DomainMapperTableManager& rTableManager = m_pImpl->getTableManager(); if( rTableManager.getTableStyleName().getLength() ) @@ -3283,16 +3223,12 @@ void DomainMapper::startCharacterGroup() } } -void DomainMapper::endCharacterGroup() +void DomainMapper::lcl_endCharacterGroup() { m_pImpl->PopProperties(CONTEXT_CHARACTER); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void DomainMapper::text(const sal_uInt8 * data_, size_t len) +void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len) { //TODO: Determine the right text encoding (FIB?) ::rtl::OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 ); @@ -3372,19 +3308,13 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) } } -void DomainMapper::utext(const sal_uInt8 * data_, size_t len) +void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) { OUString sText; OUStringBuffer aBuffer = OUStringBuffer(len); aBuffer.append( (const sal_Unicode *) data_, len); sText = aBuffer.makeStringAndClear(); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("utext"); - dmapper_logger->chars(sText); - dmapper_logger->endElement(); -#endif - try { m_pImpl->getTableManager().utext(data_, len); @@ -3431,12 +3361,8 @@ void DomainMapper::utext(const sal_uInt8 * data_, size_t len) } } -void DomainMapper::props(writerfilter::Reference<Properties>::Pointer_t ref) +void DomainMapper::lcl_props(writerfilter::Reference<Properties>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("props"); -#endif - string sType = ref->getType(); if( sType == "PICF" ) { @@ -3448,18 +3374,10 @@ void DomainMapper::props(writerfilter::Reference<Properties>::Pointer_t ref) } else ref->resolve(*this); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void DomainMapper::table(Id name, writerfilter::Reference<Table>::Pointer_t ref) +void DomainMapper::lcl_table(Id name, writerfilter::Reference<Table>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("table"); - dmapper_logger->attribute("id", (*QNameToString::Instance())(name)); -#endif m_pImpl->SetAnyTableImport(true); switch(name) { @@ -3504,18 +3422,10 @@ void DomainMapper::table(Id name, writerfilter::Reference<Table>::Pointer_t ref) OSL_FAIL( "which table is to be filled here?"); } m_pImpl->SetAnyTableImport(false); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void DomainMapper::substream(Id rName, ::writerfilter::Reference<Stream>::Pointer_t ref) +void DomainMapper::lcl_substream(Id rName, ::writerfilter::Reference<Stream>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("substream"); -#endif - m_pImpl->appendTableManager( ); m_pImpl->getTableManager().startLevel(); @@ -3577,13 +3487,9 @@ void DomainMapper::substream(Id rName, ::writerfilter::Reference<Stream>::Pointe m_pImpl->getTableManager().endLevel(); m_pImpl->popTableManager( ); - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void DomainMapper::info(const string & /*info_*/) +void DomainMapper::lcl_info(const string & /*info_*/) { } diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 3093ff135cee..ebe7d41665f5 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/text/HoriOrientation.hpp> #include <dmapperLoggers.hxx> -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER #include <PropertyMapHelper.hxx> #endif @@ -51,7 +51,7 @@ using namespace ::std; #define DEF_BORDER_DIST 190 //0,19cm #define DEFAULT_CELL_MARGIN 108 //default cell margin, not documented -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER static void lcl_printProperties( PropertyMapPtr pProps ) { if( pProps.get() ) @@ -110,7 +110,7 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, m_pTableSeq = TableSequencePointer_t(new TableSequence_t(nRows)); m_nRowIndex = 0; -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("tablehandler.table"); dmapper_logger->attribute("rows", nRows); @@ -123,11 +123,6 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("lcl_SearchParentStyleSheetAndMergeProperties"); - pStyleSheet->dumpXml( dmapper_logger ); -#endif - PropertyMapPtr pRet; if( pStyleSheet->sBaseStyleIdentifier.getLength()) { @@ -141,10 +136,6 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr pRet->insert( pStyleSheet->pProperties, true ); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif - return pRet; } @@ -246,7 +237,7 @@ void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellP } } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER void lcl_debug_BorderLine(table::BorderLine & rLine) { @@ -362,7 +353,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo PropertyMapPtr pMergedProperties = lcl_SearchParentStyleSheetAndMergeProperties(pStyleSheet, pStyleSheetTable); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("mergedProps"); pMergedProperties->dumpXml( dmapper_logger ); dmapper_logger->endElement(); @@ -371,7 +362,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo m_aTableProperties->insert( pMergedProperties ); m_aTableProperties->insert( pTableProps ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("TableProperties"); m_aTableProperties->dumpXml( dmapper_logger ); dmapper_logger->endElement(); @@ -382,7 +373,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo // Set the table default attributes for the cells rInfo.pTableDefaults->insert( m_aTableProperties ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("TableDefaults"); rInfo.pTableDefaults->dumpXml( dmapper_logger ); dmapper_logger->endElement(); @@ -452,7 +443,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo m_aTableProperties->Insert( PROP_TABLE_BORDER, false, uno::makeAny( aTableBorder ) ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER lcl_debug_TableBorder(aTableBorder); #endif @@ -474,7 +465,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo rInfo.aTableProperties = m_aTableProperties->GetPropertyValues(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("debug.tableprops"); m_aTableProperties->dumpXml( dmapper_logger ); dmapper_logger->endElement(); @@ -487,7 +478,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(TableInfo & rInfo) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("getCellProperties"); #endif @@ -580,7 +571,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl pAllCellProps->insert( *aCellIterator ); aCellIterator->get( )->swap( *pAllCellProps.get( ) ); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("cell"); dmapper_logger->attribute("cell", nCell); dmapper_logger->attribute("row", nRow); @@ -613,14 +604,14 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) ); pSingleCellProperties[nCell] = aCellIterator->get()->GetPropertyValues(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement(); #endif } ++nCell; ++aCellIterator; } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER //-->debug cell properties { ::rtl::OUString sNames; @@ -647,7 +638,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl ++aRowOfCellsIterator; } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement(); #endif @@ -656,7 +647,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("getRowProperties"); #endif @@ -666,7 +657,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() sal_Int32 nRow = 0; while( aRowIter != aRowIterEnd ) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("rowProps.row"); #endif if( aRowIter->get() ) @@ -676,19 +667,19 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() aRowIter->get()->Insert( PROP_IS_SPLIT_ALLOWED, false, uno::makeAny(sal_True ) ); aRowProperties[nRow] = (*aRowIter)->GetPropertyValues(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER ((*aRowIter)->dumpXml( dmapper_logger )); lcl_DumpPropertyValues(dmapper_logger, aRowProperties[nRow]); #endif } ++nRow; ++aRowIter; -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement(); #endif } -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement(); #endif @@ -697,7 +688,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() void DomainMapperTableHandler::endTable() { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("tablehandler.endTable"); #endif @@ -709,7 +700,7 @@ void DomainMapperTableHandler::endTable() RowPropertyValuesSeq_t aRowProperties = endTableGetRowProperties(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER lcl_DumpPropertyValueSeq(dmapper_logger, aRowProperties); #endif @@ -726,25 +717,25 @@ void DomainMapperTableHandler::endTable() } catch (lang::IllegalArgumentException e) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->chars("failed to import table!"); #endif } -#ifdef DEBUG_DOMAINMAPPER catch ( uno::Exception e ) { +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("exception"); dmapper_logger->chars(rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( )); dmapper_logger->endElement(); - } #endif + } } m_aTableProperties.reset(); m_aCellProperties.clear(); m_aRowProperties.clear(); -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement(); dmapper_logger->endElement(); #endif @@ -756,7 +747,7 @@ void DomainMapperTableHandler::startRow(unsigned int nCells, m_aRowProperties.push_back( pProps ); m_aCellProperties.push_back( PropertyMapVector1() ); -#if DEBUG_DOMAINMAPPER +#if DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("table.row"); dmapper_logger->attribute("cells", nCells); if (pProps != NULL) @@ -772,7 +763,7 @@ void DomainMapperTableHandler::endRow() (*m_pTableSeq)[m_nRowIndex] = *m_pRowSeq; ++m_nRowIndex; m_nCellIndex = 0; -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->endElement(); #endif } @@ -791,7 +782,7 @@ void DomainMapperTableHandler::startCell(const Handle_t & start, m_aCellProperties[nRow - 1].push_back( pEmptyProps ); } -#if DEBUG_DOMAINMAPPER +#if DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("table.cell"); dmapper_logger->startElement("table.cell.start"); dmapper_logger->chars(toString(start)); @@ -808,7 +799,7 @@ void DomainMapperTableHandler::startCell(const Handle_t & start, void DomainMapperTableHandler::endCell(const Handle_t & end) { -#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_DMAPPER_TABLE_HANDLER dmapper_logger->startElement("table.cell.end"); dmapper_logger->chars(toString(end)); dmapper_logger->endElement(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 3b50b497b51b..49237d08cf79 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -701,10 +701,9 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) #ifdef DEBUG_DOMAINMAPPER dmapper_logger->attribute("isTextAppend", xTextAppend.is()); - dmapper_logger->attribute("isIgnor", getTableManager().isIgnore()); #endif - if(xTextAppend.is() && ! getTableManager( ).isIgnore()) + if(xTextAppend.is() && ! getTableManager( ).isIgnore() && pParaContext != NULL) { try { @@ -723,7 +722,10 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) old _and_ new DropCap must not occur */ - bool bIsDropCap = pParaContext->IsFrameMode() && sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none; + bool bIsDropCap = + pParaContext->IsFrameMode() && + sal::static_int_cast<Id>(pParaContext->GetDropCap()) != NS_ooxml::LN_Value_wordprocessingml_ST_DropCap_none; + style::DropCapFormat aDrop; ParagraphPropertiesPtr pToBeSavedProperties; bool bKeepLastParagraphProperties = false; @@ -2169,7 +2171,7 @@ void DomainMapper_Impl::handleToc // { //todo: entries can only be included completely // } -// \n Builds a table of contents or a range of entries, sucah as 1-9, in a table of contents without page numbers +// \n Builds a table of contents or a range of entries, sucah as �1-9�, in a table of contents without page numbers // if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue )) // { //todo: what does the description mean? diff --git a/writerfilter/source/dmapper/FFDataHandler.cxx b/writerfilter/source/dmapper/FFDataHandler.cxx index db2bf648250c..0b42591b9a5c 100644 --- a/writerfilter/source/dmapper/FFDataHandler.cxx +++ b/writerfilter/source/dmapper/FFDataHandler.cxx @@ -28,10 +28,8 @@ #include "FFDataHandler.hxx" #include <ooxml/resourceids.hxx> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/QNameToString.hxx> #include "dmapperLoggers.hxx" -#endif + namespace writerfilter { namespace dmapper { @@ -39,17 +37,18 @@ namespace dmapper { * class: FFDataHandler * ************************/ -FFDataHandler::FFDataHandler() -: m_bEnabled(false), - m_bCalcOnExit(false), - m_nHelpTextType(0), - m_nStatusTextType(0), - m_nCheckboxHeight(0), - m_bCheckboxAutoHeight(false), - m_bCheckboxDefault(false), - m_bCheckboxChecked(false), - m_nTextType(0), - m_nTextMaxLength(0) +FFDataHandler::FFDataHandler() : +LoggedProperties(dmapper_logger, "FFDataHandler"), +m_bEnabled(false), +m_bCalcOnExit(false), +m_nHelpTextType(0), +m_nStatusTextType(0), +m_nCheckboxHeight(0), +m_bCheckboxAutoHeight(false), +m_bCheckboxDefault(false), +m_bCheckboxChecked(false), +m_nTextType(0), +m_nTextMaxLength(0) { } @@ -239,12 +238,8 @@ void FFDataHandler::setTextFormat(const rtl::OUString & r_sTextFormat) } -void FFDataHandler::sprm(Sprm & r_Sprm) +void FFDataHandler::lcl_sprm(Sprm & r_Sprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("FFDataHandler.sprm"); - dmapper_logger->chars(r_Sprm.toString()); -#endif switch(r_Sprm.getId()) { case NS_ooxml::LN_CT_FFData_name: @@ -358,9 +353,6 @@ void FFDataHandler::sprm(Sprm & r_Sprm) #endif break; } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } void FFDataHandler::resolveSprm(Sprm & r_Sprm) @@ -370,14 +362,8 @@ void FFDataHandler::resolveSprm(Sprm & r_Sprm) pProperties->resolve(*this); } -void FFDataHandler::attribute(Id name, Value & val) +void FFDataHandler::lcl_attribute(Id name, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("FFDataHandler.attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(name)); - dmapper_logger->attribute("value", val.toString()); - dmapper_logger->endElement(); -#endif switch (name) { case NS_ooxml::LN_CT_FFHelpText_type: diff --git a/writerfilter/source/dmapper/FFDataHandler.hxx b/writerfilter/source/dmapper/FFDataHandler.hxx index 602bce7c4522..c340cd5ce886 100644 --- a/writerfilter/source/dmapper/FFDataHandler.hxx +++ b/writerfilter/source/dmapper/FFDataHandler.hxx @@ -27,11 +27,11 @@ ************************************************************************/ #ifndef INCLUDED_FFDataHandler_HXX #define INCLUDED_FFDataHandler_HXX -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <rtl/ustring.hxx> namespace writerfilter { namespace dmapper { -class FFDataHandler : public Properties +class FFDataHandler : public LoggedProperties { public: // typedefs @@ -116,12 +116,8 @@ public: void setTextFormat(const rtl::OUString & r_sTextFormat); // sprm - void sprm(Sprm & r_sprm); void resolveSprm(Sprm & r_sprm); - // attribute - void attribute(Id name, Value & val); - private: rtl::OUString m_sName; bool m_bEnabled; @@ -143,6 +139,12 @@ private: sal_uInt32 m_nTextMaxLength; rtl::OUString m_sTextDefault; rtl::OUString m_sTextFormat; + + // sprm + void lcl_sprm(Sprm & r_sprm); + + // attribute + void lcl_attribute(Id name, Value & val); }; diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx index 3459fedba359..310c99afa1c6 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -35,19 +35,24 @@ #include <stdio.h> #include <rtl/tencinfo.h> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { struct FontTable_Impl { - std::vector< FontEntry > aFontEntries; + std::vector< FontEntry::Pointer_t > aFontEntries; FontEntry::Pointer_t pCurrentEntry; FontTable_Impl() {} }; -FontTable::FontTable() : - m_pImpl( new FontTable_Impl ) +FontTable::FontTable() +: LoggedProperties(dmapper_logger, "FontTable") +, LoggedTable(dmapper_logger, "FontTable") +, LoggedStream(dmapper_logger, "FontTable") +, m_pImpl( new FontTable_Impl ) { } @@ -56,7 +61,7 @@ FontTable::~FontTable() delete m_pImpl; } -void FontTable::attribute(Id Name, Value & val) +void FontTable::lcl_attribute(Id Name, Value & val) { OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->pCurrentEntry) @@ -123,7 +128,7 @@ void FontTable::attribute(Id Name, Value & val) } } -void FontTable::sprm(Sprm& rSprm) +void FontTable::lcl_sprm(Sprm& rSprm) { OSL_ENSURE( m_pImpl->pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->pCurrentEntry) @@ -149,81 +154,78 @@ void FontTable::resolveSprm(Sprm & r_Sprm) pProperties->resolve(*this); } -void FontTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void FontTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { //create a new font entry OSL_ENSURE( !m_pImpl->pCurrentEntry, "current entry has to be NULL here"); m_pImpl->pCurrentEntry.reset(new FontEntry); ref->resolve(*this); //append it to the table - m_pImpl->aFontEntries.push_back( *m_pImpl->pCurrentEntry ); + m_pImpl->aFontEntries.push_back( m_pImpl->pCurrentEntry ); m_pImpl->pCurrentEntry.reset(); } -void FontTable::startSectionGroup() +void FontTable::lcl_startSectionGroup() { } -void FontTable::endSectionGroup() +void FontTable::lcl_endSectionGroup() { } -void FontTable::startParagraphGroup() +void FontTable::lcl_startParagraphGroup() { } -void FontTable::endParagraphGroup() +void FontTable::lcl_endParagraphGroup() { } -void FontTable::startCharacterGroup() +void FontTable::lcl_startCharacterGroup() { } -void FontTable::endCharacterGroup() +void FontTable::lcl_endCharacterGroup() { } -void FontTable::text(const sal_uInt8*, size_t ) +void FontTable::lcl_text(const sal_uInt8*, size_t ) { } -void FontTable::utext(const sal_uInt8* , size_t) +void FontTable::lcl_utext(const sal_uInt8* , size_t) { } -void FontTable::props(writerfilter::Reference<Properties>::Pointer_t) +void FontTable::lcl_props(writerfilter::Reference<Properties>::Pointer_t) { } -void FontTable::table(Id, writerfilter::Reference<Table>::Pointer_t) +void FontTable::lcl_table(Id, writerfilter::Reference<Table>::Pointer_t) { } -void FontTable::substream(Id, ::writerfilter::Reference<Stream>::Pointer_t) +void FontTable::lcl_substream(Id, ::writerfilter::Reference<Stream>::Pointer_t) { } -void FontTable::info(const string& ) +void FontTable::lcl_info(const string& ) { } -void FontTable::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > ) +void FontTable::lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > ) { } -void FontTable::endShape( ) +void FontTable::lcl_endShape( ) { } const FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex) { - FontEntry::Pointer_t pRet; - if(m_pImpl->aFontEntries.size() > nIndex) - { - pRet.reset(&m_pImpl->aFontEntries[nIndex]); - } - return pRet; + return (m_pImpl->aFontEntries.size() > nIndex) + ? m_pImpl->aFontEntries[nIndex] + : FontEntry::Pointer_t(); } sal_uInt32 FontTable::size() diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx index 226ad371ca64..d2849107558c 100644 --- a/writerfilter/source/dmapper/FontTable.hxx +++ b/writerfilter/source/dmapper/FontTable.hxx @@ -31,7 +31,7 @@ #include <boost/shared_ptr.hpp> #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> namespace writerfilter { @@ -63,43 +63,46 @@ struct FontEntry nAltFontIndex( 0 ) {} }; -class WRITERFILTER_DLLPRIVATE FontTable : public Properties, public Table - /*,public BinaryObj*/, public Stream + +class WRITERFILTER_DLLPRIVATE FontTable : public LoggedProperties, public LoggedTable + /*,public BinaryObj*/, public LoggedStream { FontTable_Impl *m_pImpl; -public: + public: FontTable(); virtual ~FontTable(); + sal_uInt32 size(); + const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex); + + private: // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); void resolveSprm(Sprm & r_sprm); // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); // Stream - virtual void startSectionGroup(); - virtual void endSectionGroup(); - virtual void startParagraphGroup(); - virtual void endParagraphGroup(); - virtual void startCharacterGroup(); - virtual void endCharacterGroup(); - virtual void text(const sal_uInt8 * data, size_t len); - virtual void utext(const sal_uInt8 * data, size_t len); - virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); - virtual void table(Id name, - writerfilter::Reference<Table>::Pointer_t ref); - virtual void substream(Id name, - ::writerfilter::Reference<Stream>::Pointer_t ref); - virtual void info(const string & info); - virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); - virtual void endShape( ); + virtual void lcl_startSectionGroup(); + virtual void lcl_endSectionGroup(); + virtual void lcl_startParagraphGroup(); + virtual void lcl_endParagraphGroup(); + virtual void lcl_startCharacterGroup(); + virtual void lcl_endCharacterGroup(); + virtual void lcl_text(const sal_uInt8 * data, size_t len); + virtual void lcl_utext(const sal_uInt8 * data, size_t len); + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_table(Id name, + writerfilter::Reference<Table>::Pointer_t ref); + virtual void lcl_substream(Id name, + ::writerfilter::Reference<Stream>::Pointer_t ref); + virtual void lcl_info(const string & info); + virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + virtual void lcl_endShape( ); - const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex); - sal_uInt32 size(); }; typedef boost::shared_ptr< FontTable > FontTablePtr; }} diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 571812951fb8..d3af9dac4c35 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -9,6 +9,8 @@ #include <com/sun/star/text/RelOrientation.hpp> #include <com/sun/star/text/WrapTextMode.hpp> +#include "dmapperLoggers.hxx" + #include <iostream> using namespace std; @@ -18,7 +20,7 @@ namespace dmapper { using namespace com::sun::star; PositionHandler::PositionHandler( ) : - Properties( ) +LoggedProperties(dmapper_logger, "PositionHandler") { m_nOrient = text::VertOrientation::NONE; m_nRelation = text::RelOrientation::FRAME; @@ -29,7 +31,7 @@ PositionHandler::~PositionHandler( ) { } -void PositionHandler::attribute( Id aName, Value& rVal ) +void PositionHandler::lcl_attribute( Id aName, Value& rVal ) { sal_Int32 nIntValue = rVal.getInt( ); switch ( aName ) @@ -86,11 +88,15 @@ void PositionHandler::attribute( Id aName, Value& rVal ) } } break; - default:; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; } } -void PositionHandler::sprm( Sprm& rSprm ) +void PositionHandler::lcl_sprm( Sprm& rSprm ) { Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue->getInt(); @@ -154,12 +160,16 @@ void PositionHandler::sprm( Sprm& rSprm ) case NS_ooxml::LN_CT_PosH_posOffset: case NS_ooxml::LN_CT_PosV_posOffset: m_nPosition = ConversionHelper::convertEMUToMM100( nIntValue ); - default:; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; } } WrapHandler::WrapHandler( ) : - Properties( ), +LoggedProperties(dmapper_logger, "WrapHandler"), m_nType( 0 ), m_nSide( 0 ) { @@ -169,7 +179,7 @@ WrapHandler::~WrapHandler( ) { } -void WrapHandler::attribute( Id aName, Value& rVal ) +void WrapHandler::lcl_attribute( Id aName, Value& rVal ) { switch ( aName ) { @@ -183,7 +193,7 @@ void WrapHandler::attribute( Id aName, Value& rVal ) } } -void WrapHandler::sprm( Sprm& ) +void WrapHandler::lcl_sprm( Sprm& ) { } diff --git a/writerfilter/source/dmapper/GraphicHelpers.hxx b/writerfilter/source/dmapper/GraphicHelpers.hxx index 911f2c9de155..c7761132359c 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.hxx +++ b/writerfilter/source/dmapper/GraphicHelpers.hxx @@ -5,7 +5,7 @@ #include "PropertyMap.hxx" #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> @@ -13,7 +13,7 @@ namespace writerfilter { namespace dmapper { -class WRITERFILTER_DLLPRIVATE PositionHandler: public Properties +class WRITERFILTER_DLLPRIVATE PositionHandler: public LoggedProperties { public: PositionHandler( ); @@ -23,12 +23,13 @@ public: sal_Int16 m_nRelation; sal_Int32 m_nPosition; - virtual void attribute( Id aName, Value& rVal ); - virtual void sprm( Sprm& rSprm ); + private: + virtual void lcl_attribute( Id aName, Value& rVal ); + virtual void lcl_sprm( Sprm& rSprm ); }; typedef boost::shared_ptr<PositionHandler> PositionHandlerPtr; -class WRITERFILTER_DLLPRIVATE WrapHandler: public Properties +class WRITERFILTER_DLLPRIVATE WrapHandler: public LoggedProperties { public: WrapHandler( ); @@ -39,8 +40,9 @@ public: sal_Int32 getWrapMode( ); - virtual void attribute( Id aName, Value& rVal ); - virtual void sprm( Sprm& rSprm ); + private: + virtual void lcl_attribute( Id aName, Value& rVal ); + virtual void lcl_sprm( Sprm& rSprm ); }; typedef boost::shared_ptr<WrapHandler> WrapHandlerPtr; diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 7b9a7524fc3f..e96bc1933234 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -26,54 +26,51 @@ * ************************************************************************/ -#include "GraphicImport.hxx" -#include "GraphicHelpers.hxx" +#include <string.h> -#include <dmapper/DomainMapper.hxx> -#include <PropertyMap.hxx> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <ConversionHelper.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/io/XInputStream.hpp> -#include <cppuhelper/implbase1.hxx> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/drawing/ColorMode.hpp> - -#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/text/GraphicCrop.hpp> -#include <com/sun/star/text/XTextContent.hpp> -#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> +#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/WrapTextMode.hpp> -#include <com/sun/star/drawing/XShape.hpp> -#include <rtl/ustrbuf.hxx> +#include <com/sun/star/text/XTextContent.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <cppuhelper/implbase1.hxx> +#include <rtl/ustrbuf.hxx> -#include <iostream> -#include <resourcemodel/QNameToString.hxx> -#include <string.h> +#include <dmapper/DomainMapper.hxx> +#include <doctok/resourceids.hxx> +#include <ooxml/resourceids.hxx> +#include <resourcemodel/ResourceModelHelper.hxx> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/TagLogger.hxx> -#endif +#include "ConversionHelper.hxx" +#include "GraphicHelpers.hxx" +#include "GraphicImport.hxx" +#include "PropertyMap.hxx" +#include "WrapPolygonHandler.hxx" +#include "dmapperLoggers.hxx" namespace writerfilter { + +using resourcemodel::resolveSprmProps; + namespace dmapper { using namespace ::std; using namespace ::com::sun::star; -#ifdef DEBUG_DOMAINMAPPER -extern TagLogger::Pointer_t dmapper_logger; -#endif - class XInputStreamHelper : public cppu::WeakImplHelper1 < io::XInputStream > { @@ -221,6 +218,8 @@ public: sal_Int32 nWrap; bool bOpaque; bool bContour; + bool bContourOutside; + WrapPolygon::Pointer_t mpWrapPolygon; bool bIgnoreWRK; sal_Int32 nLeftMargin; @@ -283,6 +282,7 @@ public: ,nWrap(0) ,bOpaque( true ) ,bContour(false) + ,bContourOutside(true) ,bIgnoreWRK(true) ,nLeftMargin(319) ,nRightMargin(319) @@ -344,9 +344,12 @@ GraphicImport::GraphicImport(uno::Reference < uno::XComponentContext > xCompo uno::Reference< lang::XMultiServiceFactory > xTextFactory, DomainMapper& rDMapper, GraphicImportType eImportType ) -: m_pImpl( new GraphicImport_Impl( eImportType, rDMapper )) - ,m_xComponentContext( xComponentContext ) - ,m_xTextFactory( xTextFactory) +: LoggedProperties(dmapper_logger, "GraphicImport") +, LoggedTable(dmapper_logger, "GraphicImport") +, LoggedStream(dmapper_logger, "GraphicImport") +, m_pImpl( new GraphicImport_Impl( eImportType, rDMapper )) +, m_xComponentContext( xComponentContext ) +, m_xTextFactory( xTextFactory) { } @@ -356,13 +359,30 @@ GraphicImport::~GraphicImport() delete m_pImpl; } +void GraphicImport::handleWrapTextValue(sal_uInt32 nVal) +{ + switch (nVal) + { + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides: // 90920; + m_pImpl->nWrap = text::WrapTextMode_PARALLEL; + break; + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left: // 90921; + m_pImpl->nWrap = text::WrapTextMode_LEFT; + break; + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right: // 90922; + m_pImpl->nWrap = text::WrapTextMode_RIGHT; + break; + case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest: // 90923; + m_pImpl->nWrap = text::WrapTextMode_DYNAMIC; + break; + default:; + } +} + + -void GraphicImport::attribute(Id nName, Value & val) +void GraphicImport::lcl_attribute(Id nName, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); -#endif sal_Int32 nIntValue = val.getInt(); switch( nName ) { @@ -834,25 +854,24 @@ void GraphicImport::attribute(Id nName, Value & val) break; case NS_ooxml::LN_CT_WrapTight_wrapText: // 90934; m_pImpl->bContour = true; - //no break; + m_pImpl->bContourOutside = true; + + handleWrapTextValue(val.getInt()); + + break; + case NS_ooxml::LN_CT_WrapThrough_wrapText: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + m_pImpl->bContour = true; + m_pImpl->bContourOutside = false; + + handleWrapTextValue(val.getInt()); + + break; case NS_ooxml::LN_CT_WrapSquare_wrapText: //90928; - switch ( val.getInt() ) - { - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides: // 90920; - m_pImpl->nWrap = text::WrapTextMode_PARALLEL; - break; - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left: // 90921; - m_pImpl->nWrap = text::WrapTextMode_LEFT; - break; - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right: // 90922; - m_pImpl->nWrap = text::WrapTextMode_RIGHT; - break; - case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest: // 90923; - m_pImpl->nWrap = text::WrapTextMode_DYNAMIC; - break; - default:; - } - break; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + + handleWrapTextValue(val.getInt()); + break; case NS_ooxml::LN_shape: { uno::Reference< drawing::XShape> xShape; @@ -942,18 +961,11 @@ void GraphicImport::attribute(Id nName, Value & val) //TODO: does it need to be handled? break; default: -#if OSL_DEBUG_LEVEL > 0 - ::rtl::OString sMessage( "GraphicImport::attribute() - Id: "); - sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 10 ); - sMessage += ::rtl::OString(" / 0x"); - sMessage += ::rtl::OString::valueOf( sal_Int32( nName ), 16 ); - OSL_FAIL( sMessage.getStr()) +#ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT + dmapper_logger->element("unhandled"); #endif ; } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } uno::Reference<text::XTextContent> GraphicImport::GetGraphicObject() @@ -1115,13 +1127,8 @@ void GraphicImport::ProcessShapeOptions(Value& val) } -void GraphicImport::sprm(Sprm & rSprm) +void GraphicImport::lcl_sprm(Sprm & rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("sprm"); - dmapper_logger->chars(rSprm.toString()); -#endif - sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -1143,12 +1150,12 @@ void GraphicImport::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_Anchor_effectExtent: // 90979; case NS_ooxml::LN_EG_WrapType_wrapSquare: // 90945; case NS_ooxml::LN_EG_WrapType_wrapTight: // 90946; + case NS_ooxml::LN_EG_WrapType_wrapThrough: case NS_ooxml::LN_CT_Anchor_docPr: // 90980; case NS_ooxml::LN_CT_Anchor_cNvGraphicFramePr: // 90981; case NS_ooxml::LN_CT_Anchor_a_graphic: // 90982; case NS_ooxml::LN_CT_WrapPath_start: // 90924; case NS_ooxml::LN_CT_WrapPath_lineTo: // 90925; - case NS_ooxml::LN_CT_WrapTight_wrapPolygon: // 90933; case NS_ooxml::LN_graphic_graphic: case NS_ooxml::LN_pic_pic: { @@ -1159,6 +1166,17 @@ void GraphicImport::sprm(Sprm & rSprm) } } break; + case NS_ooxml::LN_CT_WrapTight_wrapPolygon: + case NS_ooxml::LN_CT_WrapThrough_wrapPolygon: + /* WRITERFILTERSTATUS: done: 100, planned: 4, spent: 2 */ + { + WrapPolygonHandler aHandler; + + resolveSprmProps(aHandler, rSprm); + + m_pImpl->mpWrapPolygon = aHandler.getPolygon(); + } + break; case NS_ooxml::LN_CT_Anchor_positionH: // 90976; { // Use a special handler for the positionning @@ -1211,9 +1229,6 @@ void GraphicImport::sprm(Sprm & rSprm) case NS_ooxml::LN_EG_WrapType_wrapTopAndBottom: // 90948; m_pImpl->nWrap = text::WrapTextMode_NONE; break; - case NS_ooxml::LN_EG_WrapType_wrapThrough: // 90947; - m_pImpl->nWrap = text::WrapTextMode_THROUGHT; - break; case 0xf010: case 0xf011: //ignore - doesn't contain useful members @@ -1237,16 +1252,10 @@ void GraphicImport::sprm(Sprm & rSprm) #endif ; } - - - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void GraphicImport::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t /*ref*/) +void GraphicImport::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t /*ref*/) { } /*------------------------------------------------------------------------- @@ -1395,7 +1404,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SURROUND_CONTOUR ), uno::makeAny(m_pImpl->bContour)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_OUTSIDE ), - uno::makeAny(true)); + uno::makeAny(m_pImpl->bContourOutside)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_LEFT_MARGIN ), uno::makeAny(m_pImpl->nLeftMargin)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_RIGHT_MARGIN ), @@ -1405,8 +1414,6 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_BOTTOM_MARGIN ), uno::makeAny(m_pImpl->nBottomMargin)); - xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_POLY_POLYGON), - uno::Any()); if( m_pImpl->eColorMode == drawing::ColorMode_STANDARD && m_pImpl->nContrast == -70 && m_pImpl->nBrightness == 70 ) @@ -1434,16 +1441,31 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_HORI_MIRRORED_ON_ODD_PAGES ), uno::makeAny( m_pImpl->bHoriFlip )); } + if( m_pImpl->bVertFlip ) xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_VERT_MIRRORED ), uno::makeAny( m_pImpl->bVertFlip )); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_BACK_COLOR ), uno::makeAny( m_pImpl->nFillColor )); + //there seems to be no way to detect the original size via _real_ API uno::Reference< beans::XPropertySet > xGraphicProperties( xGraphic, uno::UNO_QUERY_THROW ); awt::Size aGraphicSize, aGraphicSizePixel; xGraphicProperties->getPropertyValue(rPropNameSupplier.GetName( PROP_SIZE100th_M_M )) >>= aGraphicSize; xGraphicProperties->getPropertyValue(rPropNameSupplier.GetName( PROP_SIZE_PIXEL )) >>= aGraphicSizePixel; + + uno::Any aContourPolyPolygon; + if( aGraphicSize.Width && aGraphicSize.Height && + m_pImpl->mpWrapPolygon.get() != NULL) + { + awt::Size aDstSize(m_pImpl->getXSize(), m_pImpl->getYSize()); + WrapPolygon::Pointer_t pCorrected = m_pImpl->mpWrapPolygon->correctWordWrapPolygon(aGraphicSize, aDstSize); + aContourPolyPolygon <<= pCorrected->getPointSequenceSequence(); + } + + xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_CONTOUR_POLY_POLYGON), + aContourPolyPolygon); + if( aGraphicSize.Width && aGraphicSize.Height ) { //todo: i71651 graphic size is not provided by the GraphicDescriptor @@ -1452,9 +1474,11 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b lcl_CalcCrop( m_pImpl->nLeftCrop, aGraphicSize.Width ); lcl_CalcCrop( m_pImpl->nRightCrop, aGraphicSize.Width ); + xGraphicProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_GRAPHIC_CROP ), uno::makeAny(text::GraphicCrop(m_pImpl->nTopCrop, m_pImpl->nBottomCrop, m_pImpl->nLeftCrop, m_pImpl->nRightCrop))); } + } if(m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_INLINE || m_pImpl->eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR) @@ -1500,70 +1524,70 @@ void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Referen } -void GraphicImport::startSectionGroup() +void GraphicImport::lcl_startSectionGroup() { } -void GraphicImport::endSectionGroup() +void GraphicImport::lcl_endSectionGroup() { } -void GraphicImport::startParagraphGroup() +void GraphicImport::lcl_startParagraphGroup() { } -void GraphicImport::endParagraphGroup() +void GraphicImport::lcl_endParagraphGroup() { } -void GraphicImport::startCharacterGroup() +void GraphicImport::lcl_startCharacterGroup() { } -void GraphicImport::endCharacterGroup() +void GraphicImport::lcl_endCharacterGroup() { } -void GraphicImport::text(const sal_uInt8 * /*_data*/, size_t /*len*/) +void GraphicImport::lcl_text(const sal_uInt8 * /*_data*/, size_t /*len*/) { } -void GraphicImport::utext(const sal_uInt8 * /*_data*/, size_t /*len*/) +void GraphicImport::lcl_utext(const sal_uInt8 * /*_data*/, size_t /*len*/) { } -void GraphicImport::props(writerfilter::Reference<Properties>::Pointer_t /*ref*/) +void GraphicImport::lcl_props(writerfilter::Reference<Properties>::Pointer_t /*ref*/) { } -void GraphicImport::table(Id /*name*/, writerfilter::Reference<Table>::Pointer_t /*ref*/) +void GraphicImport::lcl_table(Id /*name*/, writerfilter::Reference<Table>::Pointer_t /*ref*/) { } -void GraphicImport::substream(Id /*name*/, ::writerfilter::Reference<Stream>::Pointer_t /*ref*/) +void GraphicImport::lcl_substream(Id /*name*/, ::writerfilter::Reference<Stream>::Pointer_t /*ref*/) { } -void GraphicImport::info(const string & /*info*/) +void GraphicImport::lcl_info(const string & /*info*/) { } -void GraphicImport::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > /*xShape*/ ) +void GraphicImport::lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > /*xShape*/ ) { } -void GraphicImport::endShape( ) +void GraphicImport::lcl_endShape( ) { } diff --git a/writerfilter/source/dmapper/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx index 210343e214a8..cc609a705e40 100644 --- a/writerfilter/source/dmapper/GraphicImport.hxx +++ b/writerfilter/source/dmapper/GraphicImport.hxx @@ -28,7 +28,7 @@ #ifndef INCLUDED_GRAPHICIMPORT_HXX #define INCLUDED_GRAPHICIMPORT_HXX -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> namespace com{ namespace sun { namespace star { namespace uno{ @@ -67,8 +67,8 @@ enum GraphicImportType IMPORT_AS_DETECTED_ANCHOR }; -class WRITERFILTER_DLLPRIVATE GraphicImport : public Properties, public Table - ,public BinaryObj, public Stream +class WRITERFILTER_DLLPRIVATE GraphicImport : public LoggedProperties, public LoggedTable + ,public BinaryObj, public LoggedStream { GraphicImport_Impl* m_pImpl; ::com::sun::star::uno::Reference < ::com::sun::star::uno::XComponentContext > m_xComponentContext; @@ -89,37 +89,41 @@ public: GraphicImportType eGraphicImportType); virtual ~GraphicImport(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - // BinaryObj virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref); - // Stream - virtual void startSectionGroup(); - virtual void endSectionGroup(); - virtual void startParagraphGroup(); - virtual void endParagraphGroup(); - virtual void startCharacterGroup(); - virtual void endCharacterGroup(); - virtual void text(const sal_uInt8 * data, size_t len); - virtual void utext(const sal_uInt8 * data, size_t len); - virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); - virtual void table(Id name, - writerfilter::Reference<Table>::Pointer_t ref); - virtual void substream(Id name, - ::writerfilter::Reference<Stream>::Pointer_t ref); - virtual void info(const string & info); - virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); - virtual void endShape( ); - ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > GetGraphicObject(); bool IsGraphic() const; + + private: + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + + // Stream + virtual void lcl_startSectionGroup(); + virtual void lcl_endSectionGroup(); + virtual void lcl_startParagraphGroup(); + virtual void lcl_endParagraphGroup(); + virtual void lcl_startCharacterGroup(); + virtual void lcl_endCharacterGroup(); + virtual void lcl_text(const sal_uInt8 * data, size_t len); + virtual void lcl_utext(const sal_uInt8 * data, size_t len); + virtual void lcl_props(writerfilter::Reference<Properties>::Pointer_t ref); + virtual void lcl_table(Id name, + writerfilter::Reference<Table>::Pointer_t ref); + virtual void lcl_substream(Id name, + ::writerfilter::Reference<Stream>::Pointer_t ref); + virtual void lcl_info(const string & info); + virtual void lcl_startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + virtual void lcl_endShape( ); + + void handleWrapTextValue(sal_uInt32 nVal); }; + typedef boost::shared_ptr< GraphicImport > GraphicImportPtr; }} diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx index 8db7d7c139fd..51d351f10b3f 100644 --- a/writerfilter/source/dmapper/MeasureHandler.cxx +++ b/writerfilter/source/dmapper/MeasureHandler.cxx @@ -31,6 +31,7 @@ #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> #include <com/sun/star/text/SizeType.hpp> +#include "dmapperLoggers.hxx" namespace writerfilter { namespace dmapper { @@ -40,9 +41,10 @@ using namespace ::com::sun::star; MeasureHandler::MeasureHandler() : - m_nMeasureValue( 0 ), - m_nUnit( -1 ), - m_nRowHeightSizeType( text::SizeType::MIN ) +LoggedProperties(dmapper_logger, "MeasureHandler"), +m_nMeasureValue( 0 ), +m_nUnit( -1 ), +m_nRowHeightSizeType( text::SizeType::MIN ) { } @@ -52,7 +54,7 @@ MeasureHandler::~MeasureHandler() } -void MeasureHandler::attribute(Id rName, Value & rVal) +void MeasureHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)rName; @@ -89,7 +91,7 @@ void MeasureHandler::attribute(Id rName, Value & rVal) } -void MeasureHandler::sprm(Sprm & rSprm) +void MeasureHandler::lcl_sprm(Sprm & rSprm) { (void)rSprm; } diff --git a/writerfilter/source/dmapper/MeasureHandler.hxx b/writerfilter/source/dmapper/MeasureHandler.hxx index 2c95293f9421..1fc9ae96985c 100644 --- a/writerfilter/source/dmapper/MeasureHandler.hxx +++ b/writerfilter/source/dmapper/MeasureHandler.hxx @@ -29,7 +29,7 @@ #define INCLUDED_MEASUREHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { @@ -40,20 +40,20 @@ class PropertyMap; - Left indent of tables - Preferred width of tables */ -class WRITERFILTER_DLLPRIVATE MeasureHandler : public Properties +class WRITERFILTER_DLLPRIVATE MeasureHandler : public LoggedProperties { sal_Int32 m_nMeasureValue; sal_Int32 m_nUnit; sal_Int16 m_nRowHeightSizeType; //table row height type + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: MeasureHandler(); virtual ~MeasureHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - sal_Int32 getMeasureValue() const; //at least tables can have automatic width bool isAutoWidth() const; diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 818e8b06a599..fb2cd53f0190 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -20,6 +20,8 @@ #include <stdio.h> #endif +#include "dmapperLoggers.hxx" + using namespace com::sun::star; using ::rtl::OUString; @@ -618,10 +620,12 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, //------------------------------------- NumberingManager implementation -ListsManager::ListsManager( DomainMapper& rDMapper, - const uno::Reference< lang::XMultiServiceFactory > xFactory ) : - m_rDMapper( rDMapper ), - m_xFactory( xFactory ) +ListsManager::ListsManager(DomainMapper& rDMapper, + const uno::Reference< lang::XMultiServiceFactory > xFactory) : +LoggedProperties(dmapper_logger, "ListsManager"), +LoggedTable(dmapper_logger, "ListsManager"), +m_rDMapper( rDMapper ), +m_xFactory( xFactory ) { } @@ -629,7 +633,7 @@ ListsManager::~ListsManager( ) { } -void ListsManager::attribute( Id nName, Value& rVal ) +void ListsManager::lcl_attribute( Id nName, Value& rVal ) { OSL_ENSURE( m_pCurrentDefinition.get(), "current entry has to be set here"); if(!m_pCurrentDefinition.get()) @@ -750,7 +754,7 @@ void ListsManager::attribute( Id nName, Value& rVal ) } } -void ListsManager::sprm( Sprm& rSprm ) +void ListsManager::lcl_sprm( Sprm& rSprm ) { //fill the attributes of the style sheet sal_uInt32 nSprmId = rSprm.getId(); @@ -909,8 +913,8 @@ void ListsManager::sprm( Sprm& rSprm ) } } -void ListsManager::entry( int /* pos */, - writerfilter::Reference<Properties>::Pointer_t ref ) +void ListsManager::lcl_entry( int /* pos */, + writerfilter::Reference<Properties>::Pointer_t ref ) { if( m_rDMapper.IsOOXMLImport() ) { diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx index 82787622324d..d001805f4333 100644 --- a/writerfilter/source/dmapper/NumberingManager.hxx +++ b/writerfilter/source/dmapper/NumberingManager.hxx @@ -6,7 +6,7 @@ #include <WriterFilterDllApi.hxx> #include <dmapper/DomainMapper.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/container/XIndexReplace.hpp> @@ -171,8 +171,8 @@ public: /** This class provides access to the defined numbering styles. */ class ListsManager : - public Properties, - public Table + public LoggedProperties, + public LoggedTable { private: @@ -191,6 +191,13 @@ private: AbstractListDef::Pointer GetAbstractList( sal_Int32 nId ); + // Properties + virtual void lcl_attribute( Id nName, Value & rVal ); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + public: ListsManager( @@ -200,13 +207,6 @@ public: typedef boost::shared_ptr< ListsManager > Pointer; - // Properties - virtual void attribute( Id nName, Value & rVal ); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - // Config methods void SetLFOImport( bool bLFOImport ) { m_bIsLFOImport = bLFOImport; }; diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 79e940a45b35..1e89825550f0 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -45,6 +45,8 @@ #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -52,8 +54,9 @@ using namespace ::com::sun::star; OLEHandler::OLEHandler() : - m_nDxaOrig(0), - m_nDyaOrig(0), +LoggedProperties(dmapper_logger, "OLEHandler"), +m_nDxaOrig(0), +m_nDyaOrig(0), m_nWrapMode(1) { } @@ -64,7 +67,7 @@ OLEHandler::~OLEHandler() } -void OLEHandler::attribute(Id rName, Value & rVal) +void OLEHandler::lcl_attribute(Id rName, Value & rVal) { rtl::OUString sStringValue = rVal.getString(); (void)rName; @@ -135,7 +138,7 @@ void OLEHandler::attribute(Id rName, Value & rVal) } -void OLEHandler::sprm(Sprm & rSprm) +void OLEHandler::lcl_sprm(Sprm & rSprm) { sal_uInt32 nSprmId = rSprm.getId(); switch( nSprmId ) diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx index 61b408fbbdd4..7a40f53986db 100644 --- a/writerfilter/source/dmapper/OLEHandler.hxx +++ b/writerfilter/source/dmapper/OLEHandler.hxx @@ -29,7 +29,7 @@ #define INCLUDED_OLEHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/awt/Point.hpp> @@ -59,7 +59,7 @@ namespace dmapper //class PropertyMap; /** Handler for OLE objects */ -class WRITERFILTER_DLLPRIVATE OLEHandler : public Properties +class WRITERFILTER_DLLPRIVATE OLEHandler : public LoggedProperties { ::rtl::OUString m_sObjectType; ::rtl::OUString m_sProgId; @@ -80,14 +80,15 @@ class WRITERFILTER_DLLPRIVATE OLEHandler : public Properties ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xReplacement; ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: OLEHandler(); virtual ~OLEHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - inline ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getShape( ) { return m_xShape; }; inline bool isOLEObject( ) { return m_xInputStream.is( ); }; diff --git a/writerfilter/source/dmapper/PageBordersHandler.cxx b/writerfilter/source/dmapper/PageBordersHandler.cxx index ae607199f588..41469d6cf507 100644 --- a/writerfilter/source/dmapper/PageBordersHandler.cxx +++ b/writerfilter/source/dmapper/PageBordersHandler.cxx @@ -3,6 +3,8 @@ #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -17,8 +19,9 @@ _PgBorder::~_PgBorder( ) } PageBordersHandler::PageBordersHandler( ) : - m_nDisplay( 0 ), - m_nOffset( 0 ) +LoggedProperties(dmapper_logger, "PageBordersHandler"), +m_nDisplay( 0 ), +m_nOffset( 0 ) { } @@ -26,7 +29,7 @@ PageBordersHandler::~PageBordersHandler( ) { } -void PageBordersHandler::attribute( Id eName, Value& rVal ) +void PageBordersHandler::lcl_attribute( Id eName, Value& rVal ) { int nIntValue = rVal.getInt( ); switch ( eName ) @@ -66,7 +69,7 @@ void PageBordersHandler::attribute( Id eName, Value& rVal ) } } -void PageBordersHandler::sprm( Sprm& rSprm ) +void PageBordersHandler::lcl_sprm( Sprm& rSprm ) { switch ( rSprm.getId( ) ) { diff --git a/writerfilter/source/dmapper/PageBordersHandler.hxx b/writerfilter/source/dmapper/PageBordersHandler.hxx index 92a905c4f471..d238a71981d7 100644 --- a/writerfilter/source/dmapper/PageBordersHandler.hxx +++ b/writerfilter/source/dmapper/PageBordersHandler.hxx @@ -6,7 +6,7 @@ #include "PropertyMap.hxx" #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <com/sun/star/table/BorderLine2.hpp> @@ -28,7 +28,7 @@ public: ~_PgBorder( ); }; -class WRITERFILTER_DLLPRIVATE PageBordersHandler : public Properties +class WRITERFILTER_DLLPRIVATE PageBordersHandler : public LoggedProperties { private: @@ -37,14 +37,14 @@ private: sal_Int32 m_nOffset; vector<_PgBorder> m_aBorders; + // Properties + virtual void lcl_attribute( Id eName, Value& rVal ); + virtual void lcl_sprm( Sprm& rSprm ); + public: PageBordersHandler( ); ~PageBordersHandler( ); - // Properties - virtual void attribute( Id eName, Value& rVal ); - virtual void sprm( Sprm& rSprm ); - inline sal_Int32 GetDisplayOffset( ) { return ( m_nOffset << 5 ) + m_nDisplay; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index eea6d3c1ea22..6ddd1d86a16b 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -33,262 +33,262 @@ namespace rtl{ class OUString;} namespace writerfilter { namespace dmapper{ enum PropertyIds -{ + { PROP_ID_START = 1 - /* 1*/ ,PROP_CHAR_WEIGHT = PROP_ID_START - /* 2*/ ,PROP_CHAR_POSTURE - /* 3*/ ,PROP_CHAR_STRIKEOUT - /* 4*/ ,PROP_CHAR_CONTOURED - /* 5*/ ,PROP_CHAR_SHADOWED - /* 6*/ ,PROP_CHAR_CASE_MAP - /* 7*/ ,PROP_CHAR_COLOR - /* 8*/ ,PROP_CHAR_RELIEF - /* 9*/ ,PROP_CHAR_UNDERLINE - /*10*/ ,PROP_CHAR_WORD_MODE - /*11*/ ,PROP_CHAR_ESCAPEMENT - /*12*/ ,PROP_CHAR_ESCAPEMENT_HEIGHT - /*13*/ ,PROP_CHAR_HEIGHT - /*14*/ ,PROP_CHAR_HEIGHT_COMPLEX - /*15*/ ,PROP_CHAR_LOCALE - /*16*/ ,PROP_CHAR_LOCALE_ASIAN - /*17*/ ,PROP_CHAR_WEIGHT_COMPLEX - /*18*/ ,PROP_CHAR_POSTURE_COMPLEX - /*19*/ ,PROP_CHAR_AUTO_KERNING - /*20*/ ,PROP_CHAR_CHAR_KERNING - /*21*/ ,PROP_CHAR_SCALE_WIDTH - /*22*/ ,PROP_CHAR_LOCALE_COMPLEX - /*23*/ ,PROP_CHAR_UNDERLINE_COLOR -/*24*/ , PROP_CHAR_UNDERLINE_HAS_COLOR -/*25*/ , PROP_CHAR_FONT_NAME -/*26*/ , PROP_CHAR_FONT_STYLE -/*27*/ , PROP_CHAR_FONT_FAMILY -/*28*/ , PROP_CHAR_FONT_CHAR_SET -/*29*/ , PROP_CHAR_FONT_PITCH -/*30*/ , PROP_CHAR_FONT_NAME_ASIAN -/*31*/ , PROP_CHAR_HEIGHT_ASIAN -/*32*/ , PROP_CHAR_FONT_STYLE_ASIAN -/*33*/ , PROP_CHAR_FONT_FAMILY_ASIAN -/*34*/ , PROP_CHAR_FONT_CHAR_SET_ASIAN -/*35*/ , PROP_CHAR_FONT_PITCH_ASIAN -/*36*/ , PROP_CHAR_FONT_NAME_COMPLEX -/*37*/ , PROP_CHAR_FONT_STYLE_COMPLEX -/*38*/ , PROP_CHAR_FONT_FAMILY_COMPLEX -/*39*/ , PROP_CHAR_FONT_CHAR_SET_COMPLEX -/*40*/ , PROP_CHAR_FONT_PITCH_COMPLEX -/*41*/ , PROP_CHAR_HIDDEN -/*42*/ , PROP_CHAR_WEIGHT_ASIAN -/*43*/ , PROP_CHAR_POSTURE_ASIAN -/*44*/ , PROP_PARA_STYLE_NAME -/*45*/ , PROP_CHAR_STYLE_NAME -/*46*/ , PROP_PARA_ADJUST -/*47*/ , PROP_PARA_LAST_LINE_ADJUST -/*48*/ , PROP_PARA_RIGHT_MARGIN -/*49*/ , PROP_PARA_LEFT_MARGIN -/*50*/ , PROP_PARA_FIRST_LINE_INDENT -/*51*/ , PROP_PARA_KEEP_TOGETHER -/*52*/ , PROP_PARA_TOP_MARGIN -/*53*/ , PROP_PARA_BOTTOM_MARGIN -/*54*/ , PROP_PARA_IS_HYPHENATION -/*55*/ , PROP_PARA_LINE_NUMBER_COUNT -/*56*/ , PROP_PARA_IS_HANGING_PUNCTUATION -/*57*/ , PROP_PARA_LINE_SPACING -/*58*/ , PROP_PARA_TAB_STOPS -/*59*/ , PROP_PARA_WIDOWS -/*60*/ , PROP_PARA_ORPHANS -/*61*/ , PROP_PARA_LINE_NUMBER_START_VALUE -/*62*/ , PROP_NUMBERING_LEVEL -/*63*/ , PROP_NUMBERING_RULES -/*64*/ , PROP_NUMBERING_TYPE -/*65*/ , PROP_START_WITH -/*66*/ , PROP_ADJUST -/*67*/ , PROP_PARENT_NUMBERING -/*68*/ , PROP_LEFT_MARGIN -/*69*/ , PROP_RIGHT_MARGIN -/*70*/ , PROP_TOP_MARGIN -/*71*/ , PROP_BOTTOM_MARGIN -/*72*/ , PROP_FIRST_LINE_OFFSET -/*73*/ , PROP_LEFT_BORDER -/*74*/ , PROP_RIGHT_BORDER -/*75*/ , PROP_TOP_BORDER -/*76*/ , PROP_BOTTOM_BORDER -/*77*/ , PROP_TABLE_BORDER -/*78*/ , PROP_LEFT_BORDER_DISTANCE -/*79*/ , PROP_RIGHT_BORDER_DISTANCE -/*80*/ , PROP_TOP_BORDER_DISTANCE -/*81*/ , PROP_BOTTOM_BORDER_DISTANCE -/*82*/ , PROP_CURRENT_PRESENTATION -/*83*/ , PROP_IS_FIXED -/*84*/ , PROP_SUB_TYPE -/*85*/ , PROP_FILE_FORMAT -/*86*/ , PROP_HYPER_LINK_U_R_L -/*87*/ , PROP_NUMBER_FORMAT -/*88*/ , PROP_NAME -/*89*/ , PROP_IS_INPUT -/*90*/ , PROP_HINT -/*91*/ , PROP_FULL_NAME -/*92*/ , PROP_KEYWORDS -/*93*/ , PROP_DESCRIPTION -/*94*/ , PROP_MACRO_NAME -/*95*/ , PROP_SUBJECT -/*96*/ , PROP_USER_DATA_TYPE -/*97*/ , PROP_TITLE -/*98*/ , PROP_CONTENT -/*99*/ , PROP_DATA_COLUMN_NAME -/*100*/, PROP_INPUT_STREAM -/*101*/, PROP_GRAPHIC -/*102*/, PROP_ANCHOR_TYPE -/*103*/ ,PROP_SIZE -/*104*/ ,PROP_HORI_ORIENT -/*105*/ ,PROP_HORI_ORIENT_POSITION -/*106*/ ,PROP_HORI_ORIENT_RELATION -/*107*/ ,PROP_VERT_ORIENT -/*108*/ ,PROP_VERT_ORIENT_POSITION -/*109*/ ,PROP_VERT_ORIENT_RELATION -/*110*/ ,PROP_GRAPHIC_CROP -/*111*/ ,PROP_SIZE100th_M_M -/*112*/ ,PROP_SIZE_PIXEL -/*113*/ ,PROP_SURROUND -/*114*/ ,PROP_SURROUND_CONTOUR -/*115*/ ,PROP_ADJUST_CONTRAST -/*116*/ ,PROP_ADJUST_LUMINANCE -/*117*/ ,PROP_GRAPHIC_COLOR_MODE -/*118*/ ,PROP_GAMMA -/*119*/ ,PROP_HORI_MIRRORED_ON_EVEN_PAGES -/*120*/ ,PROP_HORI_MIRRORED_ON_ODD_PAGES -/*121*/ ,PROP_VERT_MIRRORED -/*122*/ ,PROP_CONTOUR_OUTSIDE -/*123*/ ,PROP_CONTOUR_POLY_POLYGON -/*124*/ ,PROP_PAGE_TOGGLE -/*125*/ ,PROP_BACK_COLOR -/*126*/ ,PROP_ALTERNATIVE_TEXT -/*127*/ ,PROP_HEADER_TEXT_LEFT -/*128*/ ,PROP_HEADER_TEXT -/*129*/ ,PROP_HEADER_IS_SHARED -/*130*/ ,PROP_HEADER_IS_ON -/*131*/ ,PROP_FOOTER_TEXT_LEFT -/*132*/ ,PROP_FOOTER_TEXT -/*133*/ ,PROP_FOOTER_IS_SHARED -/*134*/ ,PROP_FOOTER_IS_ON -/*135*/ ,PROP_WIDTH -/*136*/ ,PROP_HEIGHT -/*137*/ ,PROP_SEPARATOR_LINE_IS_ON -/*138*/ ,PROP_TEXT_COLUMNS -/*139*/ ,PROP_AUTOMATIC_DISTANCE -/*140*/ ,PROP_IS_LANDSCAPE -/*141*/ ,PROP_PRINTER_PAPER_TRAY_INDEX -/*142*/ ,PROP_FIRST_PAGE -/*143*/ ,PROP_DEFAULT -/*144*/ ,PROP_PAGE_DESC_NAME -/*145*/ ,PROP_PAGE_NUMBER_OFFSET -/*146*/ ,PROP_BREAK_TYPE -/*147*/ ,PROP_FOOTER_IS_DYNAMIC_HEIGHT -/*148*/ ,PROP_FOOTER_DYNAMIC_SPACING -/*149*/ ,PROP_FOOTER_HEIGHT -/*150*/ ,PROP_FOOTER_BODY_DISTANCE -/*151*/ ,PROP_HEADER_IS_DYNAMIC_HEIGHT -/*152*/ ,PROP_HEADER_DYNAMIC_SPACING -/*153*/ ,PROP_HEADER_HEIGHT -/*154*/ ,PROP_HEADER_BODY_DISTANCE -/*155*/ ,PROP_WRITING_MODE -/*156*/ ,PROP_GRID_MODE -/*157*/ ,PROP_GRID_DISPLAY -/*158*/ ,PROP_GRID_PRINT -/*159*/ ,PROP_ADD_EXTERNAL_LEADING -/*160*/ ,PROP_GRID_LINES -/*161*/ ,PROP_GRID_BASE_HEIGHT -/*162*/ ,PROP_GRID_RUBY_HEIGHT -/*163*/ ,PROP_IS_ON -/*164*/ ,PROP_RESTART_AT_EACH_PAGE -/*165*/ ,PROP_COUNT_EMPTY_LINES -/*166*/ ,PROP_COUNT_LINES_IN_FRAMES -/*167*/ ,PROP_INTERVAL -/*168*/ ,PROP_DISTANCE -/*169*/ ,PROP_NUMBER_POSITION -/*170*/ ,PROP_LEVEL -/*171*/ ,PROP_LEVEL_PARAGRAPH_STYLES -/*172*/ ,PROP_LEVEL_FORMAT -/*173*/ ,PROP_TOKEN_TYPE -/*174*/ ,PROP_TOKEN_HYPERLINK_START -/*175*/ ,PROP_TOKEN_HYPERLINK_END -/*176*/ ,PROP_TOKEN_CHAPTER_INFO -/*177*/ ,PROP_CHAPTER_FORMAT -/*178*/ ,PROP_TOKEN_TEXT -/*179*/ ,PROP_TEXT -/*180*/ ,PROP_CREATE_FROM_OUTLINE -/*181*/ ,PROP_CREATE_FROM_MARKS -/*182*/ ,PROP_STANDARD -/*183*/ ,PROP_CHAR_BACK_COLOR -/*184*/ ,PROP_CHAR_EMPHASIS -/*185*/ ,PROP_CHAR_COMBINE_IS_ON -/*186*/ ,PROP_CHAR_COMBINE_PREFIX -/*187*/ ,PROP_CHAR_COMBINE_SUFFIX -/*188*/ ,PROP_CHAR_ROTATION -/*189*/ ,PROP_CHAR_ROTATION_IS_FIT_TO_LINE -/*190*/ ,PROP_CHAR_FLASH -/*191*/ ,PROP_IS_SPLIT_ALLOWED -/*192*/ ,META_PROP_VERTICAL_BORDER -/*193*/ ,META_PROP_HORIZONTAL_BORDER -/*194*/ ,PROP_HEADER_ROW_COUNT -/*195*/ ,PROP_IS_AUTO_HEIGHT -/*196*/ ,PROP_SIZE_TYPE -/*197*/ ,PROP_TABLE_COLUMN_SEPARATORS -/*198*/ ,META_PROP_TABLE_STYLE_NAME -/*199*/ ,PROP_REDLINE_AUTHOR -/*200*/ ,PROP_REDLINE_DATE_TIME -/*201*/ ,PROP_REDLINE_COMMENT -/*202*/ ,PROP_REDLINE_TYPE -/*203*/ ,PROP_REDLINE_SUCCESSOR_DATA -/*204*/ ,PROP_REDLINE_IDENTIFIER -/*205*/ ,PROP_SIZE_PROTECTED -/*206*/ ,PROP_POSITION_PROTECTED -/*207*/ ,PROP_OPAQUE -/*208*/ ,PROP_VERTICAL_MERGE -/*209*/ ,PROP_BULLET_CHAR -/*210*/ ,PROP_BULLET_FONT_NAME -/*211*/ ,PROP_PARA_BACK_COLOR -/*212*/ ,PROP_TABS_RELATIVE_TO_INDENT -/*213*/ ,PROP_PREFIX -/*214*/ ,PROP_SUFFIX -/*215*/ ,PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES -/*216*/ ,PROP_DROP_CAP_FORMAT -/*217*/ , PROP_REFERENCE_FIELD_PART -/*218*/ ,PROP_SOURCE_NAME -/*219*/ ,PROP_REFERENCE_FIELD_SOURCE -/*220*/ ,PROP_WIDTH_TYPE -/*221*/ ,PROP_TEXT_RANGE -/*222*/ ,PROP_SERVICE_CHAR_STYLE -/*223*/ ,PROP_SERVICE_PARA_STYLE -/*224*/ ,PROP_CHARACTER_STYLES -/*225*/ ,PROP_PARAGRAPH_STYLES -/*226*/ ,PROP_TABLE_BORDER_DISTANCES -/*227*/ ,META_PROP_CELL_MAR_TOP -/*228*/ ,META_PROP_CELL_MAR_BOTTOM -/*229*/ ,META_PROP_CELL_MAR_LEFT -/*230*/ ,META_PROP_CELL_MAR_RIGHT -/*231*/ ,PROP_START_AT -/*232*/ ,PROP_ADD_PARA_TABLE_SPACING -/*233*/ ,PROP_CHAR_PROP_HEIGHT -/*234*/ ,PROP_CHAR_PROP_HEIGHT_ASIAN -/*235*/ ,PROP_CHAR_PROP_HEIGHT_COMPLEX -/*236*/ ,PROP_FORMAT -/*237*/ ,PROP_INSERT -/*238*/ ,PROP_DELETE -/*239*/ ,PROP_STREAM_NAME -/*240*/ ,PROP_BITMAP -/*241*/ ,PROP_IS_DATE -/*242*/ ,PROP_TAB_STOP_DISTANCE -/*243*/ ,PROP_CNF_STYLE -/*244*/ ,PROP_INDENT_AT -/*245*/ ,PROP_FIRST_LINE_INDENT -/*246*/ ,PROP_NUMBERING_STYLE_NAME -/*247*/ ,PROP_OUTLINE_LEVEL -/*248*/ ,PROP_LISTTAB_STOP_POSITION -/*249*/ ,PROP_POSITION_AND_SPACE_MODE -/*250*/ ,PROP_HEADING_STYLE_NAME -/*251*/ ,PROP_PARA_SPLIT -/*252*/ ,PROP_HELP + ,META_PROP_CELL_MAR_BOTTOM = PROP_ID_START + ,META_PROP_CELL_MAR_LEFT + ,META_PROP_CELL_MAR_RIGHT + ,META_PROP_CELL_MAR_TOP + ,META_PROP_HORIZONTAL_BORDER + ,META_PROP_TABLE_STYLE_NAME + ,META_PROP_VERTICAL_BORDER + ,PROP_ADD_EXTERNAL_LEADING + ,PROP_ADD_PARA_TABLE_SPACING + ,PROP_ADJUST + ,PROP_ADJUST_CONTRAST + ,PROP_ADJUST_LUMINANCE + ,PROP_ALTERNATIVE_TEXT + ,PROP_ANCHOR_TYPE + ,PROP_AUTOMATIC_DISTANCE + ,PROP_BACK_COLOR + ,PROP_BITMAP + ,PROP_BOTTOM_BORDER + ,PROP_BOTTOM_BORDER_DISTANCE + ,PROP_BOTTOM_MARGIN + ,PROP_BREAK_TYPE + ,PROP_BULLET_CHAR + ,PROP_BULLET_FONT_NAME + ,PROP_CHAPTER_FORMAT + ,PROP_CHARACTER_STYLES + ,PROP_CHAR_AUTO_KERNING + ,PROP_CHAR_BACK_COLOR + ,PROP_CHAR_CASE_MAP + ,PROP_CHAR_CHAR_KERNING + ,PROP_CHAR_COLOR + ,PROP_CHAR_COMBINE_IS_ON + ,PROP_CHAR_COMBINE_PREFIX + ,PROP_CHAR_COMBINE_SUFFIX + ,PROP_CHAR_CONTOURED + ,PROP_CHAR_EMPHASIS + ,PROP_CHAR_ESCAPEMENT + ,PROP_CHAR_ESCAPEMENT_HEIGHT + ,PROP_CHAR_FLASH + ,PROP_CHAR_FONT_CHAR_SET + ,PROP_CHAR_FONT_CHAR_SET_ASIAN + ,PROP_CHAR_FONT_CHAR_SET_COMPLEX + ,PROP_CHAR_FONT_FAMILY + ,PROP_CHAR_FONT_FAMILY_ASIAN + ,PROP_CHAR_FONT_FAMILY_COMPLEX + ,PROP_CHAR_FONT_NAME + ,PROP_CHAR_FONT_NAME_ASIAN + ,PROP_CHAR_FONT_NAME_COMPLEX + ,PROP_CHAR_FONT_PITCH + ,PROP_CHAR_FONT_PITCH_ASIAN + ,PROP_CHAR_FONT_PITCH_COMPLEX + ,PROP_CHAR_FONT_STYLE + ,PROP_CHAR_FONT_STYLE_ASIAN + ,PROP_CHAR_FONT_STYLE_COMPLEX + ,PROP_CHAR_HEIGHT + ,PROP_CHAR_HEIGHT_ASIAN + ,PROP_CHAR_HEIGHT_COMPLEX + ,PROP_CHAR_HIDDEN + ,PROP_CHAR_LOCALE + ,PROP_CHAR_LOCALE_ASIAN + ,PROP_CHAR_LOCALE_COMPLEX + ,PROP_CHAR_POSTURE + ,PROP_CHAR_POSTURE_ASIAN + ,PROP_CHAR_POSTURE_COMPLEX + ,PROP_CHAR_PROP_HEIGHT + ,PROP_CHAR_PROP_HEIGHT_ASIAN + ,PROP_CHAR_PROP_HEIGHT_COMPLEX + ,PROP_CHAR_RELIEF + ,PROP_CHAR_ROTATION + ,PROP_CHAR_ROTATION_IS_FIT_TO_LINE + ,PROP_CHAR_SCALE_WIDTH + ,PROP_CHAR_SHADOWED + ,PROP_CHAR_STRIKEOUT + ,PROP_CHAR_STYLE_NAME + ,PROP_CHAR_UNDERLINE + ,PROP_CHAR_UNDERLINE_COLOR + ,PROP_CHAR_UNDERLINE_HAS_COLOR + ,PROP_CHAR_WEIGHT + ,PROP_CHAR_WEIGHT_ASIAN + ,PROP_CHAR_WEIGHT_COMPLEX + ,PROP_CHAR_WORD_MODE + ,PROP_CNF_STYLE + ,PROP_CONTENT + ,PROP_CONTOUR_OUTSIDE + ,PROP_CONTOUR_POLY_POLYGON + ,PROP_COUNT_EMPTY_LINES + ,PROP_COUNT_LINES_IN_FRAMES + ,PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES + ,PROP_CREATE_FROM_MARKS + ,PROP_CREATE_FROM_OUTLINE + ,PROP_CURRENT_PRESENTATION + ,PROP_DATA_COLUMN_NAME + ,PROP_DEFAULT + ,PROP_DELETE + ,PROP_DESCRIPTION + ,PROP_DISTANCE + ,PROP_DROP_CAP_FORMAT + ,PROP_FILE_FORMAT + ,PROP_FIRST_LINE_INDENT + ,PROP_FIRST_LINE_OFFSET + ,PROP_FIRST_PAGE + ,PROP_FOOTER_BODY_DISTANCE + ,PROP_FOOTER_DYNAMIC_SPACING + ,PROP_FOOTER_HEIGHT + ,PROP_FOOTER_IS_DYNAMIC_HEIGHT + ,PROP_FOOTER_IS_ON + ,PROP_FOOTER_IS_SHARED + ,PROP_FOOTER_TEXT + ,PROP_FOOTER_TEXT_LEFT + ,PROP_FORMAT + ,PROP_FULL_NAME + ,PROP_GAMMA + ,PROP_GRAPHIC + ,PROP_GRAPHIC_COLOR_MODE + ,PROP_GRAPHIC_CROP + ,PROP_GRID_BASE_HEIGHT + ,PROP_GRID_DISPLAY + ,PROP_GRID_LINES + ,PROP_GRID_MODE + ,PROP_GRID_PRINT + ,PROP_GRID_RUBY_HEIGHT + ,PROP_HEADER_BODY_DISTANCE + ,PROP_HEADER_DYNAMIC_SPACING + ,PROP_HEADER_HEIGHT + ,PROP_HEADER_IS_DYNAMIC_HEIGHT + ,PROP_HEADER_IS_ON + ,PROP_HEADER_IS_SHARED + ,PROP_HEADER_ROW_COUNT + ,PROP_HEADER_TEXT + ,PROP_HEADER_TEXT_LEFT + ,PROP_HEADING_STYLE_NAME + ,PROP_HEIGHT + ,PROP_HELP + ,PROP_HINT + ,PROP_HORI_MIRRORED_ON_EVEN_PAGES + ,PROP_HORI_MIRRORED_ON_ODD_PAGES + ,PROP_HORI_ORIENT + ,PROP_HORI_ORIENT_POSITION + ,PROP_HORI_ORIENT_RELATION + ,PROP_HYPER_LINK_U_R_L + ,PROP_INDENT_AT + ,PROP_INPUT_STREAM + ,PROP_INSERT + ,PROP_INTERVAL + ,PROP_IS_AUTO_HEIGHT + ,PROP_IS_DATE + ,PROP_IS_FIXED + ,PROP_IS_INPUT + ,PROP_IS_LANDSCAPE + ,PROP_IS_ON + ,PROP_IS_SPLIT_ALLOWED + ,PROP_KEYWORDS + ,PROP_LEFT_BORDER + ,PROP_LEFT_BORDER_DISTANCE + ,PROP_LEFT_MARGIN + ,PROP_LEVEL + ,PROP_LEVEL_FORMAT + ,PROP_LEVEL_PARAGRAPH_STYLES + ,PROP_LISTTAB_STOP_POSITION + ,PROP_MACRO_NAME + ,PROP_NAME + ,PROP_NUMBERING_LEVEL + ,PROP_NUMBERING_RULES + ,PROP_NUMBERING_STYLE_NAME + ,PROP_NUMBERING_TYPE + ,PROP_NUMBER_FORMAT + ,PROP_NUMBER_POSITION + ,PROP_OPAQUE + ,PROP_OUTLINE_LEVEL + ,PROP_PAGE_DESC_NAME + ,PROP_PAGE_NUMBER_OFFSET + ,PROP_PAGE_TOGGLE + ,PROP_PARAGRAPH_STYLES + ,PROP_PARA_ADJUST + ,PROP_PARA_BACK_COLOR + ,PROP_PARA_BOTTOM_MARGIN + ,PROP_PARA_FIRST_LINE_INDENT + ,PROP_PARA_IS_HANGING_PUNCTUATION + ,PROP_PARA_IS_HYPHENATION + ,PROP_PARA_KEEP_TOGETHER + ,PROP_PARA_LAST_LINE_ADJUST + ,PROP_PARA_LEFT_MARGIN + ,PROP_PARA_LINE_NUMBER_COUNT + ,PROP_PARA_LINE_NUMBER_START_VALUE + ,PROP_PARA_LINE_SPACING + ,PROP_PARA_ORPHANS + ,PROP_PARA_RIGHT_MARGIN + ,PROP_PARA_SPLIT + ,PROP_PARA_STYLE_NAME + ,PROP_PARA_TAB_STOPS + ,PROP_PARA_TOP_MARGIN + ,PROP_PARA_WIDOWS + ,PROP_PARENT_NUMBERING + ,PROP_POSITION_AND_SPACE_MODE + ,PROP_POSITION_PROTECTED + ,PROP_PREFIX + ,PROP_PRINTER_PAPER_TRAY_INDEX + ,PROP_REDLINE_AUTHOR + ,PROP_REDLINE_COMMENT + ,PROP_REDLINE_DATE_TIME + ,PROP_REDLINE_IDENTIFIER + ,PROP_REDLINE_SUCCESSOR_DATA + ,PROP_REDLINE_TYPE + ,PROP_REFERENCE_FIELD_PART + ,PROP_REFERENCE_FIELD_SOURCE + ,PROP_RESTART_AT_EACH_PAGE + ,PROP_RIGHT_BORDER + ,PROP_RIGHT_BORDER_DISTANCE + ,PROP_RIGHT_MARGIN + ,PROP_SEPARATOR_LINE_IS_ON + ,PROP_SERVICE_CHAR_STYLE + ,PROP_SERVICE_PARA_STYLE + ,PROP_SIZE + ,PROP_SIZE100th_M_M + ,PROP_SIZE_PIXEL + ,PROP_SIZE_PROTECTED + ,PROP_SIZE_TYPE + ,PROP_SOURCE_NAME + ,PROP_STANDARD + ,PROP_START_AT + ,PROP_START_WITH + ,PROP_STREAM_NAME + ,PROP_SUBJECT + ,PROP_SUB_TYPE + ,PROP_SUFFIX + ,PROP_SURROUND + ,PROP_SURROUND_CONTOUR + ,PROP_TABLE_BORDER + ,PROP_TABLE_BORDER_DISTANCES + ,PROP_TABLE_COLUMN_SEPARATORS + ,PROP_TABS_RELATIVE_TO_INDENT + ,PROP_TAB_STOP_DISTANCE + ,PROP_TEXT + ,PROP_TEXT_COLUMNS + ,PROP_TEXT_RANGE + ,PROP_TITLE + ,PROP_TOKEN_CHAPTER_INFO + ,PROP_TOKEN_HYPERLINK_END + ,PROP_TOKEN_HYPERLINK_START + ,PROP_TOKEN_TEXT + ,PROP_TOKEN_TYPE + ,PROP_TOP_BORDER + ,PROP_TOP_BORDER_DISTANCE + ,PROP_TOP_MARGIN + ,PROP_USER_DATA_TYPE + ,PROP_VERTICAL_MERGE + ,PROP_VERT_MIRRORED + ,PROP_VERT_ORIENT + ,PROP_VERT_ORIENT_POSITION + ,PROP_VERT_ORIENT_RELATION + ,PROP_WIDTH + ,PROP_WIDTH_TYPE + ,PROP_WRITING_MODE /*253*/ ,PROP_FRM_DIRECTION -}; + }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier { diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index c0120cac427f..9ae05891e072 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -111,9 +111,43 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues() return m_aValues; } +#ifdef DEBUG_DMAPPER_PROPERTY_MAP +static void lcl_AnyToTag(const uno::Any & rAny) +{ + try { + sal_Int32 aInt = 0; + rAny >>= aInt; + dmapper_logger->attribute("value", aInt); + + sal_uInt32 auInt = 0; + rAny >>= auInt; + dmapper_logger->attribute("unsignedValue", auInt); + + float aFloat = 0.0f; + rAny >>= aFloat; + dmapper_logger->attribute("floatValue", aFloat); + + ::rtl::OUString aStr; + rAny >>= aStr; + dmapper_logger->attribute("stringValue", aStr); + } + catch (...) { + } +} +#endif void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any& rAny, bool bOverwrite ) { +#ifdef DEBUG_DMAPPER_PROPERTY_MAP + const ::rtl::OUString& rInsert = PropertyNameSupplier:: + GetPropertyNameSupplier().GetName(eId); + + dmapper_logger->startElement("propertyMap.insert"); + dmapper_logger->attribute("name", rInsert); + lcl_AnyToTag(rAny); + dmapper_logger->endElement(); +#endif + PropertyMap::iterator aElement = find(PropertyDefinition( eId, bIsTextProperty ) ); if( aElement != end()) { @@ -148,15 +182,15 @@ void PropertyMap::dumpXml( const TagLogger::Pointer_t pLogger ) const default: { try { - sal_Int32 aInt; + sal_Int32 aInt = 0; aMapIter->second >>= aInt; pLogger->attribute("value", aInt); - sal_uInt32 auInt; + sal_uInt32 auInt = 0; aMapIter->second >>= auInt; pLogger->attribute("unsignedValue", auInt); - float aFloat; + float aFloat = 0.0; aMapIter->second >>= aFloat; pLogger->attribute("floatValue", aFloat); diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 74a642867f02..351fc81296da 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -38,9 +38,7 @@ #include <map> #include <vector> -#ifdef DEBUG_DOMAINMAPPER #include <resourcemodel/TagLogger.hxx> -#endif namespace com{namespace sun{namespace star{ namespace beans{ diff --git a/writerfilter/source/dmapper/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx index c577c25ac771..d1832e6cc009 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.cxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx @@ -31,6 +31,8 @@ #include <ConversionHelper.hxx> #include <ooxml/resourceids.hxx> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -38,10 +40,11 @@ using namespace ::com::sun::star; SectionColumnHandler::SectionColumnHandler() : - bEqualWidth( false ), - nSpace( 0 ), - nNum( 0 ), - bSep( false ) +LoggedProperties(dmapper_logger, "SectionColumnHandler"), +bEqualWidth( false ), +nSpace( 0 ), +nNum( 0 ), +bSep( false ) { } @@ -49,7 +52,7 @@ SectionColumnHandler::~SectionColumnHandler() { } -void SectionColumnHandler::attribute(Id rName, Value & rVal) +void SectionColumnHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); switch( rName ) @@ -78,7 +81,7 @@ void SectionColumnHandler::attribute(Id rName, Value & rVal) } } -void SectionColumnHandler::sprm(Sprm & rSprm) +void SectionColumnHandler::lcl_sprm(Sprm & rSprm) { switch( rSprm.getId()) { diff --git a/writerfilter/source/dmapper/SectionColumnHandler.hxx b/writerfilter/source/dmapper/SectionColumnHandler.hxx index bdeebd61d96c..3a420c74526f 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.hxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.hxx @@ -29,7 +29,7 @@ #define INCLUDED_SECTIONCOLUMNHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> @@ -45,7 +45,7 @@ struct _Column }; -class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public Properties +class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public LoggedProperties { bool bEqualWidth; sal_Int32 nSpace; @@ -55,14 +55,14 @@ class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public Properties _Column aTempColumn; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: SectionColumnHandler(); virtual ~SectionColumnHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - bool IsEqualWidth() const { return bEqualWidth; } sal_Int32 GetSpace() const { return nSpace; } sal_Int32 GetNum() const { return nNum; } diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index ad856ef96a90..10a4e2568229 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -26,20 +26,17 @@ * ************************************************************************/ +#include <stdio.h> +#include <rtl/ustring.hxx> #include <resourcemodel/ResourceModelHelper.hxx> #include <com/sun/star/beans/XPropertySet.hpp> - #include <SettingsTable.hxx> +#include <resourcemodel/ResourceModelHelper.hxx> #include <doctok/resourceids.hxx> #include <ooxml/resourceids.hxx> -#include <stdio.h> #include <ConversionHelper.hxx> -#include <rtl/ustring.hxx> -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/QNameToString.hxx> #include "dmapperLoggers.hxx" -#endif namespace writerfilter { @@ -95,10 +92,13 @@ struct SettingsTable_Impl , m_nCryptAlgorithmType(NS_ooxml::LN_Value_wordprocessingml_ST_AlgType_typeAny) , m_nCryptSpinCount(0) {} + }; -SettingsTable::SettingsTable(DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory) : -m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) ) +SettingsTable::SettingsTable(DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory) +: LoggedProperties(dmapper_logger, "SettingsTable") +, LoggedTable(dmapper_logger, "SettingsTable") +, m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) ) { } @@ -108,14 +108,8 @@ SettingsTable::~SettingsTable() delete m_pImpl; } -void SettingsTable::attribute(Id nName, Value & val) +void SettingsTable::lcl_attribute(Id nName, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("SettingsTable.attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); - dmapper_logger->attribute("value", val.toString()); -#endif - (void) nName; int nIntValue = val.getInt(); (void)nIntValue; @@ -133,18 +127,10 @@ void SettingsTable::attribute(Id nName, Value & val) } } #endif -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void SettingsTable::sprm(Sprm& rSprm) +void SettingsTable::lcl_sprm(Sprm& rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("SettingsTable.sprm"); - dmapper_logger->chars(rSprm.toString()); -#endif - sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -211,16 +197,14 @@ void SettingsTable::sprm(Sprm& rSprm) break; default: { - OSL_FAIL( "unknown sprmid in SettingsTable::sprm()"); +#ifdef DEBUG_DMAPPER_SETTINGS_TABLE + dmapper_logger->element("unhandled"); +#endif } } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void SettingsTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void SettingsTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { ref->resolve(*this); } diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx index a0037eda0f4c..2b50d5112ee1 100644 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -30,7 +30,7 @@ #define INCLUDED_SETTINGSTABLE_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/text/XTextDocument.hpp> #include <map> @@ -51,7 +51,7 @@ using namespace std; struct SettingsTable_Impl; -class WRITERFILTER_DLLPRIVATE SettingsTable : public Properties, public Table +class WRITERFILTER_DLLPRIVATE SettingsTable : public LoggedProperties, public LoggedTable { SettingsTable_Impl *m_pImpl; @@ -61,18 +61,19 @@ class WRITERFILTER_DLLPRIVATE SettingsTable : public Properties, public Table ); virtual ~SettingsTable(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - //returns default TabStop in 1/100th mm int GetDefaultTabStop() const; void ApplyProperties( uno::Reference< text::XTextDocument > xDoc ); + private: + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + }; typedef boost::shared_ptr< SettingsTable > SettingsTablePtr; }} diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index c1a8e74f8f57..85b5d3f108df 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -49,10 +49,7 @@ #include <stdio.h> #include <rtl/ustrbuf.hxx> -#ifdef DEBUG_DOMAINMAPPER #include <dmapperLoggers.hxx> -#include <resourcemodel/QNameToString.hxx> -#endif using namespace ::com::sun::star; namespace writerfilter { @@ -83,32 +80,11 @@ StyleSheetEntry::~StyleSheetEntry() { } -#ifdef DEBUG_DOMAINMAPPER -void StyleSheetEntry::dumpXml( const TagLogger::Pointer_t pLogger ) -{ - pLogger->startElement("StyleSheetEntry"); - - pLogger->attribute("identifierI", sStyleIdentifierI); - pLogger->attribute("identifierD", sStyleIdentifierD); - pLogger->attribute("default", bIsDefaultStyle ? "true" : "false"); - pLogger->attribute("invalidHeight", bInvalidHeight ? "true" : "false"); - pLogger->attribute("hasUPE", bHasUPE ? "true" : "false"); - pLogger->attribute("styleType", nStyleTypeCode); - pLogger->attribute("baseStyle", sBaseStyleIdentifier); - pLogger->attribute("nextStyle", sNextStyleIdentifier); - pLogger->attribute("styleName", sStyleName); - pLogger->attribute("styleName1", sStyleName1); - pLogger->attribute("convertedName", sConvertedStyleName); - pProperties->dumpXml( pLogger ); - - pLogger->endElement(); -} -#endif - TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry, StyleSheetTable* pStyles ): StyleSheetEntry( ), m_pStyleSheet( pStyles ) { + bIsDefaultStyle = rEntry.bIsDefaultStyle; bInvalidHeight = rEntry.bInvalidHeight; bHasUPE = rEntry.bHasUPE; @@ -129,13 +105,6 @@ TableStyleSheetEntry::~TableStyleSheetEntry( ) void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pProps ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("AddTblStylePr"); - dmapper_logger->attribute("type", nType); - pProps->dumpXml(dmapper_logger); - dmapper_logger->endElement(); -#endif - static const TblStyleType pTypesToFix[] = { TBL_STYLE_FIRSTROW, @@ -181,7 +150,7 @@ void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pPr m_aStyles[nType] = pProps; } -PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) +PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack ) { PropertyMapPtr pProps( new PropertyMap ); @@ -190,8 +159,20 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) if ( pEntry.get( ) ) { + if (pStack.get() == NULL) + pStack.reset(new StyleSheetEntryDeque()); + + StyleSheetEntryDeque::const_iterator aIt = find(pStack->begin(), pStack->end(), pEntry); + + if (aIt != pStack->end()) + { + pStack->push_back(pEntry); + TableStyleSheetEntry* pParent = static_cast<TableStyleSheetEntry *>( pEntry.get( ) ); - pProps->insert( pParent->GetProperties( nMask ) ); + pProps->insert( pParent->GetProperties( nMask ), pStack ); + + pStack->pop_back(); + } } // And finally get the mask ones @@ -200,41 +181,6 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) return pProps; } -#ifdef DEBUG_DOMAINMAPPER -void TableStyleSheetEntry::dumpXml( const TagLogger::Pointer_t pLogger ) -{ - - pLogger->startElement("StyleSheetEntry"); - - pLogger->attribute("identifierI", sStyleIdentifierI); - pLogger->attribute("identifierD", sStyleIdentifierD); - pLogger->attribute("default", bIsDefaultStyle ? "true" : "false"); - pLogger->attribute("invalidHeight", bInvalidHeight ? "true" : "false"); - pLogger->attribute("hasUPE", bHasUPE ? "true" : "false"); - pLogger->attribute("styleType", nStyleTypeCode); - pLogger->attribute("baseStyle", sBaseStyleIdentifier); - pLogger->attribute("nextStyle", sNextStyleIdentifier); - pLogger->attribute("styleName", sStyleName); - pLogger->attribute("styleName1", sStyleName1); - pLogger->attribute("convertedName", sConvertedStyleName); - pProperties->dumpXml( pLogger ); - - for (sal_Int32 nBit = 0; nBit < 13; ++nBit) - { - pLogger->startElement("properties"); - - PropertyMapPtr pMap = GetProperties(1 << nBit); - - pMap->dumpXml( pLogger ); - pLogger->attribute("kind", nBit); - - pLogger->endElement(); - } - - pLogger->endElement(); -} -#endif - void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleType nStyleId ) { static const PropertyIds pPropsToCheck[] = @@ -410,8 +356,10 @@ StyleSheetTable_Impl::StyleSheetTable_Impl(DomainMapper& rDMapper, uno::Referenc } -StyleSheetTable::StyleSheetTable(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> xTextDocument) : - m_pImpl( new StyleSheetTable_Impl(rDMapper, xTextDocument) ) +StyleSheetTable::StyleSheetTable(DomainMapper& rDMapper, uno::Reference< text::XTextDocument> xTextDocument) +: LoggedProperties(dmapper_logger, "StyleSheetTable") +, LoggedTable(dmapper_logger, "StyleSheetTable") +, m_pImpl( new StyleSheetTable_Impl(rDMapper, xTextDocument) ) { } @@ -422,14 +370,8 @@ StyleSheetTable::~StyleSheetTable() } -void StyleSheetTable::attribute(Id Name, Value & val) +void StyleSheetTable::lcl_attribute(Id Name, Value & val) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("StyleSheetTable.attribute"); - dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); - dmapper_logger->attribute("value", val.toString()); -#endif - OSL_ENSURE( m_pImpl->m_pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->m_pCurrentEntry) return ; @@ -522,20 +464,11 @@ void StyleSheetTable::attribute(Id Name, Value & val) } break; } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } -void StyleSheetTable::sprm(Sprm & rSprm) +void StyleSheetTable::lcl_sprm(Sprm & rSprm) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("StyleSheetTable.sprm"); - dmapper_logger->attribute("sprm", rSprm.toString()); -#endif - sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue.get() ? pValue->getInt() : 0; @@ -600,15 +533,15 @@ void StyleSheetTable::sprm(Sprm & rSprm) } break; } - case NS_ooxml::LN_CT_DocDefaults_pPrDefault: case NS_ooxml::LN_CT_PPrDefault_pPr: + case NS_ooxml::LN_CT_DocDefaults_pPrDefault: m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps ); resourcemodel::resolveSprmProps( m_pImpl->m_rDMapper, rSprm ); m_pImpl->m_rDMapper.PopStyleSheetProperties(); applyDefaults( true ); break; - case NS_ooxml::LN_CT_DocDefaults_rPrDefault: case NS_ooxml::LN_CT_RPrDefault_rPr: + case NS_ooxml::LN_CT_DocDefaults_rPrDefault: m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps ); resourcemodel::resolveSprmProps( m_pImpl->m_rDMapper, rSprm ); m_pImpl->m_rDMapper.PopStyleSheetProperties(); @@ -645,6 +578,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) pTEntry->m_nColBandSize = nIntValue; } } + break; case NS_ooxml::LN_CT_TblPrBase_tblCellMar: //no cell margins in styles break; @@ -664,7 +598,7 @@ void StyleSheetTable::sprm(Sprm & rSprm) m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties ); PropertyMapPtr pProps(new PropertyMap()); - m_pImpl->m_rDMapper.sprm( rSprm, pProps ); + m_pImpl->m_rDMapper.sprmWithProps( rSprm, pProps ); m_pImpl->m_pCurrentEntry->pProperties->insert(pProps); @@ -672,20 +606,12 @@ void StyleSheetTable::sprm(Sprm & rSprm) } } break; - } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif +} } -void StyleSheetTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("StyleSheetTable.entry"); -#endif - //create a new style entry OSL_ENSURE( !m_pImpl->m_pCurrentEntry, "current entry has to be NULL here"); StyleSheetEntryPtr pNewEntry( new StyleSheetEntry ); @@ -704,16 +630,8 @@ void StyleSheetTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Po //TODO: this entry contains the default settings - they have to be added to the settings } -#ifdef DEBUG_DOMAINMAPPER - m_pImpl->m_pCurrentEntry->dumpXml( dmapper_logger ); -#endif - StyleSheetEntryPtr pEmptyEntry; m_pImpl->m_pCurrentEntry = pEmptyEntry; - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } /*------------------------------------------------------------------------- sorting helper @@ -772,10 +690,6 @@ uno::Sequence< ::rtl::OUString > PropValVector::getNames() void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("applyStyleSheets"); -#endif - try { uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW ); @@ -934,24 +848,13 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) PropValVector aSortedPropVals; for( sal_Int32 nProp = 0; nProp < aPropValues.getLength(); ++nProp) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("propvalue"); - dmapper_logger->attribute("name", aPropValues[nProp].Name); - dmapper_logger->attribute("value", aPropValues[nProp].Value); -#endif // Don't add the style name properties bool bIsParaStyleName = aPropValues[nProp].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ParaStyleName" ) ); bool bIsCharStyleName = aPropValues[nProp].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharStyleName" ) ); if ( !bIsParaStyleName && !bIsCharStyleName ) { -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element("insert"); -#endif aSortedPropVals.Insert( aPropValues[nProp] ); } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } if(bAddFollowStyle) { @@ -1002,12 +905,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) if(bInsert) { xStyles->insertByName( sConvertedStyleName, uno::makeAny( xStyle) ); -#ifdef DEBUG_DOMAINMAPPER - uno::Reference<beans::XPropertySet> xProps(xStyle, uno::UNO_QUERY); - dmapper_logger->startElement("insertStyle"); - dmapper_logger->unoPropertySet(xProps); - dmapper_logger->endElement(); -#endif } } ++aIt; @@ -1019,10 +916,6 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) (void)rEx; OSL_FAIL( "Styles could not be imported completely"); } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement(); -#endif } diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 47b211c1356c..8f3811b5066a 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -35,11 +35,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <PropertyMap.hxx> #include <FontTable.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> - -#ifdef DEBUG_DOMAINMAPPER -#include <resourcemodel/TagLogger.hxx> -#endif +#include <resourcemodel/LoggedResources.hxx> namespace com{ namespace sun { namespace star { namespace text{ class XTextDocument; @@ -77,20 +73,18 @@ public: PropertyMapPtr pProperties; ::rtl::OUString sConvertedStyleName; -#ifdef DEBUG_DOMAINMAPPER - virtual void dumpXml( const TagLogger::Pointer_t pLogger ); -#endif - StyleSheetEntry(); virtual ~StyleSheetEntry(); }; typedef boost::shared_ptr<StyleSheetEntry> StyleSheetEntryPtr; +typedef ::std::deque<StyleSheetEntryPtr> StyleSheetEntryDeque; +typedef boost::shared_ptr<StyleSheetEntryDeque> StyleSheetEntryDequePtr; class DomainMapper; class StyleSheetTable : - public Properties, - public Table + public LoggedProperties, + public LoggedTable { StyleSheetTable_Impl *m_pImpl; @@ -99,13 +93,6 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument> xTextDocument ); virtual ~StyleSheetTable(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - - // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - void ApplyStyleSheets( FontTablePtr rFontTable ); const StyleSheetEntryPtr FindStyleSheetByISTD(const ::rtl::OUString& sIndex); const StyleSheetEntryPtr FindStyleSheetByStyleName(const ::rtl::OUString& rIndex); @@ -119,6 +106,13 @@ public: ::rtl::OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties ); private: + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + + // Table + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); + void resolveAttributeProperties(Value & val); void resolveSprmProps(Sprm & sprm_); void applyDefaults(bool bParaProperties); @@ -147,11 +141,10 @@ public: // Gets all the properties // + corresponding to the mask, // + from the parent styles - PropertyMapPtr GetProperties( sal_Int32 nMask ); - -#ifdef DEBUG_DOMAINMAPPER - virtual void dumpXml( const TagLogger::Pointer_t pLogger ); -#endif + // + // @param mask mask describing which properties to return + // @param pStack already processed StyleSheetEntries + PropertyMapPtr GetProperties( sal_Int32 nMask, StyleSheetEntryDequePtr pStack = StyleSheetEntryDequePtr()); TableStyleSheetEntry( StyleSheetEntry& aEntry, StyleSheetTable* pStyles ); virtual ~TableStyleSheetEntry( ); diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx index 0f23be4220b1..c0a2f9c8add6 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.cxx +++ b/writerfilter/source/dmapper/TDefTableHandler.cxx @@ -34,6 +34,8 @@ #include <com/sun/star/text/TableColumnSeparator.hpp> #include <com/sun/star/text/VertOrientation.hpp> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { @@ -42,11 +44,12 @@ using namespace ::com::sun::star; TDefTableHandler::TDefTableHandler(bool bOOXML) : - m_nLineWidth(0), - m_nLineType(0), - m_nLineColor(0), - m_nLineDistance(0), - m_bOOXML( bOOXML ) +LoggedProperties(dmapper_logger, "TDefTableHandler"), +m_nLineWidth(0), +m_nLineType(0), +m_nLineColor(0), +m_nLineDistance(0), +m_bOOXML( bOOXML ) { } @@ -56,7 +59,7 @@ TDefTableHandler::~TDefTableHandler() } -void TDefTableHandler::attribute(Id rName, Value & rVal) +void TDefTableHandler::lcl_attribute(Id rName, Value & rVal) { sal_Int32 nIntValue = rVal.getInt(); (void)nIntValue; @@ -176,7 +179,7 @@ void TDefTableHandler::localResolve(Id rName, writerfilter::Reference<Properties } -void TDefTableHandler::sprm(Sprm & rSprm) +void TDefTableHandler::lcl_sprm(Sprm & rSprm) { switch( rSprm.getId() ) { diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx index 3776af84150e..8bbf07993fc3 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.hxx +++ b/writerfilter/source/dmapper/TDefTableHandler.hxx @@ -29,7 +29,7 @@ #define INCLUDED_TDEFTABLEHANDLER_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> #include <vector> namespace com{ namespace sun{ namespace star{namespace table { @@ -41,7 +41,7 @@ namespace dmapper { class PropertyMap; class TablePropertyMap; -class WRITERFILTER_DLLPRIVATE TDefTableHandler : public Properties +class WRITERFILTER_DLLPRIVATE TDefTableHandler : public LoggedProperties { public: @@ -67,14 +67,15 @@ private: bool m_bOOXML; void localResolve(Id Name, writerfilter::Reference<Properties>::Pointer_t pProperties); + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: TDefTableHandler( bool bOOXML ); virtual ~TDefTableHandler(); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - size_t getCellCount() const; void fillCellProperties( size_t nCell, ::boost::shared_ptr< TablePropertyMap > pCellProperties) const; ::boost::shared_ptr<PropertyMap> getRowProperties() const; diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx index a3ac89b6a258..cf8bda4a85cc 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.cxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx @@ -5,14 +5,17 @@ #include <dmapperLoggers.hxx> #include <resourcemodel/QNameToString.hxx> +#include "dmapperLoggers.hxx" + namespace writerfilter { namespace dmapper { TblStylePrHandler::TblStylePrHandler( DomainMapper & rDMapper ) : - m_rDMapper( rDMapper ), - m_pTablePropsHandler( new TablePropertiesHandler( true ) ), - m_nType( TBL_STYLE_UNKNOWN ), - m_pProperties( new PropertyMap ) +LoggedProperties(dmapper_logger, "TblStylePrHandler"), +m_rDMapper( rDMapper ), +m_pTablePropsHandler( new TablePropertiesHandler( true ) ), +m_nType( TBL_STYLE_UNKNOWN ), +m_pProperties( new PropertyMap ) { } @@ -21,7 +24,7 @@ TblStylePrHandler::~TblStylePrHandler( ) delete m_pTablePropsHandler, m_pTablePropsHandler = NULL; } -void TblStylePrHandler::attribute(Id rName, Value & rVal) +void TblStylePrHandler::lcl_attribute(Id rName, Value & rVal) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("TblStylePrHandler.attribute"); @@ -42,7 +45,7 @@ void TblStylePrHandler::attribute(Id rName, Value & rVal) } } -void TblStylePrHandler::sprm(Sprm & rSprm) +void TblStylePrHandler::lcl_sprm(Sprm & rSprm) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("TblStylePrHandler.sprm"); diff --git a/writerfilter/source/dmapper/TblStylePrHandler.hxx b/writerfilter/source/dmapper/TblStylePrHandler.hxx index b9442f62862b..b665aeb4be29 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.hxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.hxx @@ -6,7 +6,7 @@ #include <dmapper/DomainMapper.hxx> #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <boost/shared_ptr.hpp> namespace writerfilter { @@ -33,7 +33,7 @@ enum TblStyleType TBL_STYLE_SWCELL }; -class WRITERFILTER_DLLPRIVATE TblStylePrHandler : public Properties +class WRITERFILTER_DLLPRIVATE TblStylePrHandler : public LoggedProperties { private: DomainMapper & m_rDMapper; @@ -42,14 +42,14 @@ private: TblStyleType m_nType; PropertyMapPtr m_pProperties; + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + public: TblStylePrHandler( DomainMapper & rDMapper ); virtual ~TblStylePrHandler( ); - // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); - inline PropertyMapPtr getProperties() { return m_pProperties; }; inline TblStyleType getType() { return m_nType; }; diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx index 9138b8a12830..aca4672a1d5e 100644 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -31,11 +31,7 @@ #include <doctok/resourceids.hxx> #include <ooxml/resourceids.hxx> #endif -#include <stdio.h> -#ifdef DEBUG_DOMAINMAPPER #include "dmapperLoggers.hxx" -#include <resourcemodel/QNameToString.hxx> -#endif namespace writerfilter { namespace dmapper @@ -51,8 +47,10 @@ struct ThemeTable_Impl std::map<sal_uInt32, ::rtl::OUString> m_currentFontThemeEntry; }; -ThemeTable::ThemeTable() : - m_pImpl( new ThemeTable_Impl ) +ThemeTable::ThemeTable() +: LoggedProperties(dmapper_logger, "ThemeTable") +, LoggedTable(dmapper_logger, "ThemeTable") +, m_pImpl( new ThemeTable_Impl ) { } @@ -62,7 +60,7 @@ ThemeTable::~ThemeTable() delete m_pImpl; } -void ThemeTable::attribute(Id Name, Value & val) +void ThemeTable::lcl_attribute(Id Name, Value & val) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("ThemeTable.attribute"); @@ -88,7 +86,7 @@ void ThemeTable::attribute(Id Name, Value & val) #endif } -void ThemeTable::sprm(Sprm& rSprm) +void ThemeTable::lcl_sprm(Sprm& rSprm) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("ThemeTable.sprm"); @@ -144,7 +142,7 @@ void ThemeTable::sprm(Sprm& rSprm) #endif } -void ThemeTable::entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) +void ThemeTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>::Pointer_t ref) { #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("ThemeTable.entry"); diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx index f604c61e8289..0bd7bd9d584e 100644 --- a/writerfilter/source/dmapper/ThemeTable.hxx +++ b/writerfilter/source/dmapper/ThemeTable.hxx @@ -30,7 +30,7 @@ #define INCLUDED_THEMETABLE_HXX #include <WriterFilterDllApi.hxx> -#include <resourcemodel/WW8ResourceModel.hxx> +#include <resourcemodel/LoggedResources.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <map> @@ -40,7 +40,7 @@ namespace dmapper struct ThemeTable_Impl; -class WRITERFILTER_DLLPRIVATE ThemeTable : public Properties, public Table +class WRITERFILTER_DLLPRIVATE ThemeTable : public LoggedProperties, public LoggedTable { ThemeTable_Impl *m_pImpl; @@ -48,14 +48,15 @@ public: ThemeTable(); virtual ~ThemeTable(); + const ::rtl::OUString getFontNameForTheme(const Id id) const; + + private: // Properties - virtual void attribute(Id Name, Value & val); - virtual void sprm(Sprm & sprm); + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); // Table - virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); - - const ::rtl::OUString getFontNameForTheme(const Id id) const; + virtual void lcl_entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); }; typedef boost::shared_ptr< ThemeTable > ThemeTablePtr; }} diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.cxx b/writerfilter/source/dmapper/WrapPolygonHandler.cxx new file mode 100644 index 000000000000..2aabc1a375a9 --- /dev/null +++ b/writerfilter/source/dmapper/WrapPolygonHandler.cxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +#include <com/sun/star/drawing/PointSequence.hpp> + +#include <ooxml/resourceids.hxx> +#include <resourcemodel/ResourceModelHelper.hxx> + +#include "ConversionHelper.hxx" +#include "WrapPolygonHandler.hxx" +#include "dmapperLoggers.hxx" + +namespace writerfilter { + +using resourcemodel::resolveSprmProps; + +namespace dmapper { + +WrapPolygon::WrapPolygon() +{ +} + +WrapPolygon::~WrapPolygon() +{ +} + +void WrapPolygon::addPoint(const awt::Point & rPoint) +{ + mPoints.push_back(rPoint); +} + +WrapPolygon::Points_t::const_iterator WrapPolygon::begin() const +{ + return mPoints.begin(); +} + +WrapPolygon::Points_t::const_iterator WrapPolygon::end() const +{ + return mPoints.end(); +} + +WrapPolygon::Points_t::iterator WrapPolygon::begin() +{ + return mPoints.begin(); +} + +WrapPolygon::Points_t::iterator WrapPolygon::end() +{ + return mPoints.end(); +} + +size_t WrapPolygon::size() const +{ + return mPoints.size(); +} + +WrapPolygon::Pointer_t WrapPolygon::move(const awt::Point & rPoint) +{ + WrapPolygon::Pointer_t pResult(new WrapPolygon); + + Points_t::iterator aIt = begin(); + Points_t::iterator aItEnd = end(); + + while (aIt != aItEnd) + { + awt::Point aPoint(aIt->X + rPoint.X, aIt->Y + rPoint.Y); + pResult->addPoint(aPoint); + aIt++; + } + + return pResult; +} + +WrapPolygon::Pointer_t WrapPolygon::scale(const Fraction & rFractionX, const Fraction & rFractionY) +{ + WrapPolygon::Pointer_t pResult(new WrapPolygon); + + Points_t::iterator aIt = begin(); + Points_t::iterator aItEnd = end(); + + while (aIt != aItEnd) + { + awt::Point aPoint(Fraction(aIt->X) * rFractionX, Fraction(aIt->Y) * rFractionY); + pResult->addPoint(aPoint); + aIt++; + } + + return pResult; +} + +WrapPolygon::Pointer_t WrapPolygon::correctWordWrapPolygon(const awt::Size & rSrcSize, const awt::Size & rDstSize) +{ + WrapPolygon::Pointer_t pResult; + + const sal_uInt32 nWrap100Percent = 21600; + + Fraction aMove(nWrap100Percent, rSrcSize.Width); + aMove = aMove * Fraction(15, 1); + awt::Point aMovePoint(aMove, 0); + pResult = move(aMovePoint); + + Fraction aScaleX(nWrap100Percent, Fraction(nWrap100Percent) + aMove); + Fraction aScaleY(nWrap100Percent, Fraction(nWrap100Percent) - aMove); + pResult = pResult->scale(aScaleX, aScaleY); + + Fraction aScaleDestX(rDstSize.Width, nWrap100Percent); + Fraction aScaleDestY(rDstSize.Height, nWrap100Percent); + pResult = pResult->scale(aScaleDestX, aScaleDestY); + + return pResult; +} + +drawing::PointSequenceSequence WrapPolygon::getPointSequenceSequence() const +{ + drawing::PointSequenceSequence aPolyPolygon(1L); + drawing::PointSequence * pPolygon = aPolyPolygon.getArray(); + pPolygon->realloc(size()); + + sal_uInt32 n = 0; + Points_t::const_iterator aIt = begin(); + Points_t::const_iterator aItEnd = end(); + + while (aIt != aItEnd) + { + (*pPolygon)[n] = *aIt; + ++n; + aIt++; + } + + return aPolyPolygon; +} + +WrapPolygonHandler::WrapPolygonHandler() +: LoggedProperties(dmapper_logger, "WrapPolygonHandler") +, mpPolygon(new WrapPolygon) +{ +} + +WrapPolygonHandler::~WrapPolygonHandler() +{ +} + +void WrapPolygonHandler::lcl_attribute(Id Name, Value & val) +{ + sal_Int32 nIntValue = val.getInt(); + + switch(Name) + { + case NS_ooxml::LN_CT_Point2D_x: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + mnX = nIntValue; + break; + case NS_ooxml::LN_CT_Point2D_y: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + mnY = nIntValue; + break; + default: +#ifdef DEBUG_WRAP_POLYGON_HANDLER + dmapper_logger->element("unhandled"); +#endif + break; + } +} + +void WrapPolygonHandler::lcl_sprm(Sprm & _sprm) +{ + switch (_sprm.getId()) + { + case NS_ooxml::LN_CT_WrapPath_lineTo: + case NS_ooxml::LN_CT_WrapPath_start: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { + resolveSprmProps(*this, _sprm); + + awt::Point aPoint(mnX, mnY); + mpPolygon->addPoint(aPoint); + } + break; + default: +#ifdef DEBUG_WRAP_POLYGON_HANDLER + dmapper_logger->element("unhandled"); +#endif + break; + } +} + +WrapPolygon::Pointer_t WrapPolygonHandler::getPolygon() +{ + return mpPolygon; +} + +}} diff --git a/writerfilter/source/dmapper/WrapPolygonHandler.hxx b/writerfilter/source/dmapper/WrapPolygonHandler.hxx new file mode 100644 index 000000000000..4883ccb3081b --- /dev/null +++ b/writerfilter/source/dmapper/WrapPolygonHandler.hxx @@ -0,0 +1,92 @@ +/************************************************************************* + * + * 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 WRAP_POLYGON_HANDLER_HXX +#define WRAP_POLYGON_HANDLER_HXX + +#include <deque> +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <resourcemodel/LoggedResources.hxx> +#include <resourcemodel/Fraction.hxx> + +namespace writerfilter { +namespace dmapper { + +using namespace ::com::sun::star; +using resourcemodel::Fraction; + +class WrapPolygon +{ +public: + typedef ::std::deque<awt::Point> Points_t; + typedef ::boost::shared_ptr<WrapPolygon> Pointer_t; + +private: + Points_t mPoints; + +public: + WrapPolygon(); + virtual ~WrapPolygon(); + + void addPoint(const awt::Point & rPoint); + + Points_t::const_iterator begin() const; + Points_t::const_iterator end() const; + Points_t::iterator begin(); + Points_t::iterator end(); + + size_t size() const; + + WrapPolygon::Pointer_t move(const awt::Point & rMove); + WrapPolygon::Pointer_t scale(const Fraction & rFractionX, const Fraction & rFractionY); + WrapPolygon::Pointer_t correctWordWrapPolygon(const awt::Size & rSrcSize, const awt::Size & rDstSize); + drawing::PointSequenceSequence getPointSequenceSequence() const; +}; + +class WrapPolygonHandler : public LoggedProperties +{ +public: + WrapPolygonHandler(); + virtual ~WrapPolygonHandler(); + + WrapPolygon::Pointer_t getPolygon(); + +private: + WrapPolygon::Pointer_t mpPolygon; + + sal_uInt32 mnX; + sal_uInt32 mnY; + + // Properties + virtual void lcl_attribute(Id Name, Value & val); + virtual void lcl_sprm(Sprm & sprm); + +}; + +}} + +#endif // WRAP_POLYGON_HANDLER_HXX diff --git a/writerfilter/source/dmapper/dmapperLoggers.hxx b/writerfilter/source/dmapper/dmapperLoggers.hxx index ea34e6a7cd7f..f771a9717790 100644 --- a/writerfilter/source/dmapper/dmapperLoggers.hxx +++ b/writerfilter/source/dmapper/dmapperLoggers.hxx @@ -29,7 +29,6 @@ #ifndef INCLUDED_DMAPPER_LOGGERS_HXX #define INCLUDED_DMAPPER_LOGGERS_HXX -#if OSL_DEBUG_LEVEL > 1 #include <resourcemodel/TagLogger.hxx> namespace writerfilter { @@ -37,7 +36,7 @@ namespace writerfilter { extern TagLogger::Pointer_t dmapper_logger; } } -#endif // DEBUG + #endif // INCLUDED_DMAPPER_LOGGERS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/makefile.mk b/writerfilter/source/dmapper/makefile.mk index 300dfb31d959..a4b000411b4e 100644 --- a/writerfilter/source/dmapper/makefile.mk +++ b/writerfilter/source/dmapper/makefile.mk @@ -48,13 +48,13 @@ SLOFILES= \ $(SLO)$/DomainMapperTableManager.obj \ $(SLO)$/DomainMapper_Impl.obj \ $(SLO)$/FFDataHandler.obj \ - $(SLO)$/FormControlHelper.obj \ $(SLO)$/FontTable.obj \ + $(SLO)$/FormControlHelper.obj \ $(SLO)$/GraphicHelpers.obj \ $(SLO)$/GraphicImport.obj \ - $(SLO)$/NumberingManager.obj \ $(SLO)$/MeasureHandler.obj \ $(SLO)$/ModelEventListener.obj \ + $(SLO)$/NumberingManager.obj \ $(SLO)$/OLEHandler.obj \ $(SLO)$/PageBordersHandler.obj \ $(SLO)$/PropertyIds.obj \ @@ -66,7 +66,9 @@ SLOFILES= \ $(SLO)$/TDefTableHandler.obj \ $(SLO)$/TablePropertiesHandler.obj \ $(SLO)$/TblStylePrHandler.obj \ - $(SLO)$/ThemeTable.obj + $(SLO)$/ThemeTable.obj \ + $(SLO)$/WrapPolygonHandler.obj \ + # --- Targets ---------------------------------- diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 4eac9ed72279..1c2fad557d07 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -76,8 +76,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes try { // use the oox.core.FilterDetect implementation to extract the decrypted ZIP package - uno::Reference< lang::XMultiServiceFactory > xFactory( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - ::oox::core::FilterDetect aDetector( xFactory ); + ::oox::core::FilterDetect aDetector( m_xContext ); xInputStream = aDetector.extractUnencryptedPackage( aMediaDesc ); } catch( uno::Exception& ) @@ -89,7 +88,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes return sal_False; } -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_IMPORT OUString sURL = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() ); ::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr(); @@ -131,7 +130,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes oox::StorageRef xVbaPrjStrg( new ::oox::ole::OleStorage( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), pVBAProjectStream->getDocumentStream(), false ) ); if( xVbaPrjStrg.get() && xVbaPrjStrg->isStorage() ) { - ::oox::ole::VbaProject aVbaProject( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), xModel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Writer" ) ) ); + ::oox::ole::VbaProject aVbaProject( m_xContext, xModel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Writer" ) ) ); uno::Reference< frame::XFrame > xFrame = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_FRAME(), uno::Reference< frame::XFrame > () ); // if no XFrame try fallback to what we can glean from the Model @@ -141,7 +140,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes xFrame = xController.is() ? xController->getFrame() : NULL; } - oox::GraphicHelper gHelper( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), xFrame, xVbaPrjStrg ); + oox::GraphicHelper gHelper( m_xContext, xFrame, xVbaPrjStrg ); aVbaProject.importVbaProject( *xVbaPrjStrg, gHelper ); } } @@ -154,8 +153,8 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes } pStream.reset(); +#ifdef DEBUG_IMPORT -#ifdef DEBUG_ELEMENT dmapperLogger->endDocument(); debugLogger->endDocument(); #endif diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index fabc34f0ba26..0fe5d4b0bf3d 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -65,11 +65,6 @@ void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvType *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) -{ - return ::cppu::component_writeInfoHelper( xMgr, xRegistry, s_component_entries ); -} - void * SAL_CALL component_getFactory(sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) { return ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, s_component_entries ); diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx index 6fae09584d2a..994ac218f221 100644 --- a/writerfilter/source/filter/WriterFilterDetection.cxx +++ b/writerfilter/source/filter/WriterFilterDetection.cxx @@ -91,7 +91,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r if ( pStream && SotStorage::IsStorageFile(pStream) ) { - SotStorageRef xStg = new SotStorage( pStream, FALSE ); + SotStorageRef xStg = new SotStorage( pStream, sal_False ); bool bTable2 = xStg->IsContained( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1Table"))); SotStorageStreamRef xRef = diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index be29cf5bc39a..0dc29db2f0de 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -132,8 +132,8 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, if (pFactory.get() != NULL) { -#ifdef DEBUG_ATTRIBUTES - debug_logger->startElement("attributes"); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.attributes"); debug_logger->attribute("define", pFactory->getDefineName(nDefine)); char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), "%08" SAL_PRIxUINT32, nDefine); @@ -149,8 +149,8 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, for (aIt = pMap->begin(); aIt != aEndIt; ++aIt) { Id nId = (*pTokenToIdMap)[aIt->first]; -#ifdef DEBUG_ATTRIBUTES - debug_logger->startElement("attribute"); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.attribute"); debug_logger->attribute("name", fastTokenToId(aIt->first)); debug_logger->attribute("tokenid", (*QNameToString::Instance())(nId)); snprintf(sBuffer, sizeof(sBuffer), "%08" SAL_PRIxUINT32, nId); @@ -162,7 +162,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, { case RT_Boolean: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("boolean"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -174,7 +174,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_String: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("string"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -187,7 +187,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_Integer: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("integer"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -200,7 +200,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_Hex: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("hex"); #endif ::rtl::OUString aValue(Attribs->getValue(aIt->first)); @@ -213,7 +213,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, break; case RT_List: { -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->startElement("list"); #endif ListValueMapPointer pListValueMap = @@ -224,7 +224,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, ::rtl::OUString aValue(Attribs->getValue(aIt->first)); sal_uInt32 nValue = (*pListValueMap)[aValue]; -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->attribute("value", aValue); debug_logger->attribute("value-num", nValue); #endif @@ -235,24 +235,24 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(nValue)); pFactory->attributeAction(pHandler, aIt->first, pValue); } -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->endElement(); #endif } break; default: -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->element("unknown-attribute-type"); #endif break; } } -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->endElement(); #endif } -#ifdef DEBUG_ATTRIBUTES +#ifdef DEBUG_FACTORY debug_logger->endElement(); #endif } @@ -262,6 +262,11 @@ uno::Reference< xml::sax::XFastContextHandler> OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, Token_t Element) { +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.createFastChildContext"); + debug_logger->attribute("token", fastTokenToId(Element)); +#endif + Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); @@ -272,12 +277,21 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, if ((Element & 0xffff) < OOXML_FAST_TOKENS_END) ret = createFastChildContextFromFactory(pHandler, pFactory, Element); +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.createFastChildContext"); +#endif + return ret; } void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & rString) { +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.characters"); + debug_logger->chars(rString); +#endif + Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); @@ -285,6 +299,10 @@ void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, { pFactory->charactersAction(pHandler, rString); } + +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.characters"); +#endif } void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/) @@ -295,7 +313,7 @@ void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nTo if (pFactory.get() != NULL) { #ifdef DEBUG_ELEMENT - debug_logger->startElement("factory-startAction"); + debug_logger->startElement("factory.startAction"); #endif pFactory->startAction(pHandler); #ifdef DEBUG_ELEMENT @@ -312,7 +330,7 @@ void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, Token_t /*nToke if (pFactory.get() != NULL) { #ifdef DEBUG_ELEMENT - debug_logger->startElement("factory-endAction"); + debug_logger->startElement("factory.endAction"); #endif pFactory->endAction(pHandler); #ifdef DEBUG_ELEMENT @@ -337,6 +355,13 @@ void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLV { } +#ifdef DEBUG_FACTORY +string OOXMLFactory_ns::getName() const +{ + return "noname"; +} +#endif + } } diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx index f4510474c807..03d1a14b3fcf 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.hxx +++ b/writerfilter/source/ooxml/OOXMLFactory.hxx @@ -109,6 +109,9 @@ public: virtual void endAction(OOXMLFastContextHandler * pHandler); virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); virtual string getDefineName(Id nId) const; +#ifdef DEBUG_FACTORY + virtual string getName() const; +#endif AttributeToResourceMapPointer getAttributeToResourceMap(Id nId); ListValueMapPointer getListValueMap(Id nId); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 868f6359e7cb..df6c7deb063b 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -32,6 +32,7 @@ #include <rtl/uuid.h> #include <com/sun/star/drawing/XShapes.hpp> #include <resourcemodel/QNameToString.hxx> +#include <resourcemodel/XPathLogger.hxx> #include <resourcemodel/util.hxx> #include <ooxml/resourceids.hxx> #include <doctok/sprmids.hxx> @@ -183,52 +184,23 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler() aSetContexts.erase(this); } -#ifdef DEBUG_MEMORY -void SAL_CALL OOXMLFastContextHandler::acquire() - throw () -{ - mnRefCount++; - - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%ld: %s: aquire(%ld)", mnInstanceNumber, - getType().c_str(), mnRefCount); - logger("MEMORY", buffer); - - cppu::WeakImplHelper1<com::sun::star::xml::sax::XFastContextHandler>::acquire(); -} - -void SAL_CALL OOXMLFastContextHandler::release() - throw () -{ - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%s: release(%ld)", - getType().c_str(), mnRefCount); - logger("MEMORY", buffer); - - cppu::WeakImplHelper1<com::sun::star::xml::sax::XFastContextHandler>::release(); - mnRefCount--; -} -#endif - // ::com::sun::star::xml::sax::XFastContextHandler: void SAL_CALL OOXMLFastContextHandler::startFastElement (Token_t Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("element"); - debug_logger->attribute("token", fastTokenToId(Element)); - debug_logger->attribute("type",getType()); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.element"); + string sToken = fastTokenToId(Element); + mpParserState->getXPathLogger().startElement(sToken); + debug_logger->attribute("token", sToken); + debug_logger->attribute("type", getType()); + debug_logger->attribute("xpath", mpParserState->getXPathLogger().getXPath()); debug_logger->startElement("at-start"); dumpXml( debug_logger ); debug_logger->endElement(); #endif -#ifdef DEBUG_MEMORY - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%ld: startFastElement", mnInstanceNumber); - logger("MEMORY", buffer); -#endif attributes(Attribs); lcl_startFastElement(Element, Attribs); } @@ -238,10 +210,11 @@ void SAL_CALL OOXMLFastContextHandler::startUnknownElement const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - debug_logger->startElement("unknown-element"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.unknown-element"); debug_logger->attribute("namespace", Namespace); debug_logger->attribute("name", Name); + mpParserState->getXPathLogger().startElement("unknown"); #else (void) Namespace; (void) Name; @@ -251,19 +224,19 @@ throw (uno::RuntimeException, xml::sax::SAXException) void SAL_CALL OOXMLFastContextHandler::endFastElement(Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException) { +#ifdef DEBUG_CONTEXT_HANDLER + string sToken = fastTokenToId(Element); + (void) sToken; +#endif + lcl_endFastElement(Element); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->startElement("at-end"); dumpXml( debug_logger ); debug_logger->endElement(); debug_logger->endElement(); -#endif -#ifdef DEBUG_MEMORY - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%ld: %s:endFastElement", mnInstanceNumber, - getType().c_str()); - logger("MEMORY", buffer); + mpParserState->getXPathLogger().endElement(); #endif } @@ -279,14 +252,6 @@ void OOXMLFastContextHandler::lcl_endFastElement (Token_t Element) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - debug_logger->startElement("endAction"); - debug_logger->endElement(); - debug_logger->startElement("token"); - debug_logger->chars(fastTokenToId(Element)); - debug_logger->endElement(); -#endif - OOXMLFactory::getInstance()->endAction(this, Element); } @@ -294,9 +259,9 @@ void SAL_CALL OOXMLFastContextHandler::endUnknownElement (const ::rtl::OUString & , const ::rtl::OUString & ) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("unknown-element"); - debug_logger->endElement(); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.unknown-element"); + mpParserState->getXPathLogger().endElement(); #endif } @@ -306,8 +271,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_CONTEXT_STACK - debug_logger->startElement("createFastChildContext"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.createFastChildContext"); debug_logger->attribute("token", fastTokenToId(Element)); debug_logger->attribute("type", getType()); #endif @@ -315,7 +280,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL uno::Reference< xml::sax::XFastContextHandler > xResult (lcl_createFastChildContext(Element, Attribs)); -#ifdef DEBUG_CONTEXT_STACK +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif @@ -338,8 +303,8 @@ OOXMLFastContextHandler::createUnknownChildContext const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("createUnknownChildContext"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.createUnknownChildContext"); debug_logger->attribute("namespace", Namespace); debug_logger->attribute("name", Name); debug_logger->endElement(); @@ -405,11 +370,11 @@ void OOXMLFastContextHandler::attributes void OOXMLFastContextHandler::startAction(Token_t Element) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("startAction"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.startAction"); #endif lcl_startAction(Element); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } @@ -421,11 +386,11 @@ void OOXMLFastContextHandler::lcl_startAction(Token_t Element) void OOXMLFastContextHandler::endAction(Token_t Element) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("endAction"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.endAction"); #endif lcl_endAction(Element); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } @@ -473,14 +438,14 @@ string OOXMLFastContextHandler::getResourceString() const void OOXMLFastContextHandler::setId(Id rId) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("setId"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.setId"); static char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIuUINT32, rId); debug_logger->attribute("id", sBuffer); - debug_logger->chars((*QNameToString::Instance())(rId)); + debug_logger->attribute("name", (*QNameToString::Instance())(rId)); debug_logger->endElement(); #endif @@ -511,7 +476,7 @@ void OOXMLFastContextHandler::setToken(Token_t nToken) { mnToken = nToken; -#ifdef DEBUG_CONTEXT_STACK +#ifdef DEBUG_CONTEXT_HANDLER msTokenString = fastTokenToId(mnToken); #endif } @@ -527,11 +492,6 @@ void OOXMLFastContextHandler::mark(const Id & rId, OOXMLValue::Pointer_t pVal) OOXMLPropertyImpl::Pointer_t pProperty (new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE)); -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("mark"); - debug_logger->chars(xmlify(pProperty->toString())); - debug_logger->endElement(); -#endif pPropSet->add(pProperty); mpStream->props(pPropSet); } @@ -551,8 +511,8 @@ OOXMLPropertySet * OOXMLFastContextHandler::getPicturePropSet void OOXMLFastContextHandler::sendTableDepth() const { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendTableDepth"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendTableDepth"); #endif if (mnTableDepth > 0) @@ -573,14 +533,9 @@ void OOXMLFastContextHandler::sendTableDepth() const pProps->add(pProp); } -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("props"); - debug_logger->chars(pProps->toString()); - debug_logger->endElement(); -#endif mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); } -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } @@ -593,6 +548,10 @@ void OOXMLFastContextHandler::setHandle() void OOXMLFastContextHandler::startCharacterGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startCharacterGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInCharacterGroup()) @@ -603,10 +562,6 @@ void OOXMLFastContextHandler::startCharacterGroup() if (! mpParserState->isInCharacterGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("startCharacterGroup"); -#endif - mpStream->startCharacterGroup(); mpParserState->setInCharacterGroup(true); mpParserState->resolveCharacterProperties(*mpStream); @@ -616,12 +571,12 @@ void OOXMLFastContextHandler::startCharacterGroup() void OOXMLFastContextHandler::endCharacterGroup() { - if (isForwardEvents() && mpParserState->isInCharacterGroup()) - { -#ifdef DEBUG_ELEMENT - debug_logger->element("endCharacterGroup"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endCharacterGroup"); #endif + if (isForwardEvents() && mpParserState->isInCharacterGroup()) + { mpStream->endCharacterGroup(); mpParserState->setInCharacterGroup(false); } @@ -629,6 +584,10 @@ void OOXMLFastContextHandler::endCharacterGroup() void OOXMLFastContextHandler::startParagraphGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startParagraphGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInParagraphGroup()) @@ -639,10 +598,6 @@ void OOXMLFastContextHandler::startParagraphGroup() if (! mpParserState->isInParagraphGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("startParagraphGroup"); -#endif - mpStream->startParagraphGroup(); mpParserState->setInParagraphGroup(true); } @@ -651,6 +606,10 @@ void OOXMLFastContextHandler::startParagraphGroup() void OOXMLFastContextHandler::endParagraphGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endParagraphGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInCharacterGroup()) @@ -658,9 +617,6 @@ void OOXMLFastContextHandler::endParagraphGroup() if (mpParserState->isInParagraphGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("endParagraphGroup"); -#endif mpStream->endParagraphGroup(); mpParserState->setInParagraphGroup(false); } @@ -669,6 +625,10 @@ void OOXMLFastContextHandler::endParagraphGroup() void OOXMLFastContextHandler::startSectionGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startSectionGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInSectionGroup()) @@ -676,9 +636,6 @@ void OOXMLFastContextHandler::startSectionGroup() if (! mpParserState->isInSectionGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("startSectionGroup"); -#endif mpStream->info(mpParserState->getHandle()); mpStream->startSectionGroup(); mpParserState->setInSectionGroup(true); @@ -688,6 +645,10 @@ void OOXMLFastContextHandler::startSectionGroup() void OOXMLFastContextHandler::endSectionGroup() { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endSectionGroup"); +#endif + if (isForwardEvents()) { if (mpParserState->isInParagraphGroup()) @@ -695,9 +656,6 @@ void OOXMLFastContextHandler::endSectionGroup() if (mpParserState->isInSectionGroup()) { -#ifdef DEBUG_ELEMENT - debug_logger->element("endSectionGroup"); -#endif mpStream->endSectionGroup(); mpParserState->setInSectionGroup(false); } @@ -706,10 +664,6 @@ void OOXMLFastContextHandler::endSectionGroup() void OOXMLFastContextHandler::setLastParagraphInSection() { -#ifdef DEBUG_ELEMENT - debug_logger->element("setLastParagraphInSection"); -#endif - mpParserState->setLastParagraphInSection(true); mpStream->markLastParagraphInSection( ); } @@ -731,8 +685,8 @@ OOXMLPropertySet::Pointer_t OOXMLFastContextHandler::getPropertySet() const void OOXMLFastContextHandler::startField() { -#ifdef DEBUG_ELEMENT - debug_logger->element("startField"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.startField"); #endif startCharacterGroup(); if (isForwardEvents()) @@ -742,8 +696,8 @@ void OOXMLFastContextHandler::startField() void OOXMLFastContextHandler::fieldSeparator() { -#ifdef DEBUG_ELEMENT - debug_logger->element("fieldSeparator"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.fieldSeparator"); #endif startCharacterGroup(); if (isForwardEvents()) @@ -753,8 +707,8 @@ void OOXMLFastContextHandler::fieldSeparator() void OOXMLFastContextHandler::endField() { -#ifdef DEBUG_ELEMENT - debug_logger->element("endField"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endField"); #endif startCharacterGroup(); if (isForwardEvents()) @@ -764,8 +718,8 @@ void OOXMLFastContextHandler::endField() void OOXMLFastContextHandler::ftnednref() { -#ifdef DEBUG_ELEMENT - debug_logger->element("ftnednref"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.ftnednref"); #endif if (isForwardEvents()) mpStream->utext(sFtnEdnRef, 1); @@ -773,8 +727,8 @@ void OOXMLFastContextHandler::ftnednref() void OOXMLFastContextHandler::ftnednsep() { -#ifdef DEBUG_ELEMENT - debug_logger->element("ftnednsep"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.ftnednsep"); #endif if (isForwardEvents()) mpStream->utext(sFtnEdnSep, 1); @@ -782,8 +736,8 @@ void OOXMLFastContextHandler::ftnednsep() void OOXMLFastContextHandler::ftnedncont() { -#ifdef DEBUG_ELEMENT - debug_logger->element("ftnedncont"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.ftnedncont"); #endif if (isForwardEvents()) mpStream->text(sFtnEdnCont, 1); @@ -791,8 +745,8 @@ void OOXMLFastContextHandler::ftnedncont() void OOXMLFastContextHandler::pgNum() { -#ifdef DEBUG_ELEMENT - debug_logger->element("pgNum"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.pgNum"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sPgNum, 1); @@ -800,8 +754,8 @@ void OOXMLFastContextHandler::pgNum() void OOXMLFastContextHandler::tab() { -#ifdef DEBUG_ELEMENT - debug_logger->element("tab"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.tab"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sTab, 1); @@ -809,8 +763,8 @@ void OOXMLFastContextHandler::tab() void OOXMLFastContextHandler::cr() { -#ifdef DEBUG_ELEMENT - debug_logger->element("cr"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.cr"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sCR, 1); @@ -818,8 +772,8 @@ void OOXMLFastContextHandler::cr() void OOXMLFastContextHandler::noBreakHyphen() { -#ifdef DEBUG_ELEMENT - debug_logger->element("noBreakHyphen"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.noBreakHyphen"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sNoBreakHyphen, 1); @@ -827,8 +781,8 @@ void OOXMLFastContextHandler::noBreakHyphen() void OOXMLFastContextHandler::softHyphen() { -#ifdef DEBUG_ELEMENT - debug_logger->element("softHyphen"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.softHyphen"); #endif if (isForwardEvents()) mpStream->utext((const sal_uInt8*)sSoftHyphen, 1); @@ -836,8 +790,8 @@ void OOXMLFastContextHandler::softHyphen() void OOXMLFastContextHandler::handleLastParagraphInSection() { -#ifdef DEBUG_ELEMENT - debug_logger->element("handleLastParagraphInSection"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.handleLastParagraphInSection"); #endif if (mpParserState->isLastParagraphInSection()) @@ -849,8 +803,8 @@ void OOXMLFastContextHandler::handleLastParagraphInSection() void OOXMLFastContextHandler::endOfParagraph() { -#ifdef DEBUG_ELEMENT - debug_logger->element("endOfParagraph"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.endOfParagraph"); #endif if (! mpParserState->isInCharacterGroup()) startCharacterGroup(); @@ -860,8 +814,8 @@ void OOXMLFastContextHandler::endOfParagraph() void OOXMLFastContextHandler::text(const ::rtl::OUString & sText) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("text"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.text"); debug_logger->chars(sText); debug_logger->endElement(); #endif @@ -873,8 +827,8 @@ void OOXMLFastContextHandler::text(const ::rtl::OUString & sText) void OOXMLFastContextHandler::propagateCharacterProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propagateCharacterProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.propagateCharacterProperties"); debug_logger->propertySet(getPropertySet(), IdToString::Pointer_t(new OOXMLIdToString())); debug_logger->endElement(); @@ -885,8 +839,8 @@ void OOXMLFastContextHandler::propagateCharacterProperties() void OOXMLFastContextHandler::propagateCharacterPropertiesAsSet(const Id & rId) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propagateCharacterPropertiesAsSet"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.propagateCharacterPropertiesAsSet"); debug_logger->propertySet(getPropertySet(), IdToString::Pointer_t(new OOXMLIdToString())); debug_logger->endElement(); @@ -909,8 +863,8 @@ bool OOXMLFastContextHandler::propagatesProperties() const void OOXMLFastContextHandler::propagateCellProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->element("propagateCellProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.propagateCellProperties"); #endif mpParserState->setCellProperties(getPropertySet()); @@ -918,8 +872,8 @@ void OOXMLFastContextHandler::propagateCellProperties() void OOXMLFastContextHandler::propagateRowProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->element("propagateRowProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.propagateRowProperties"); #endif mpParserState->setRowProperties(getPropertySet()); @@ -928,8 +882,8 @@ void OOXMLFastContextHandler::propagateRowProperties() void OOXMLFastContextHandler::propagateTableProperties() { OOXMLPropertySet::Pointer_t pProps = getPropertySet(); -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propagateTableProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.propagateTableProperties"); debug_logger->propertySet(getPropertySet(), IdToString::Pointer_t(new OOXMLIdToString())); debug_logger->endElement(); @@ -940,47 +894,47 @@ void OOXMLFastContextHandler::propagateTableProperties() void OOXMLFastContextHandler::sendCellProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendCellProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendCellProperties"); #endif mpParserState->resolveCellProperties(*mpStream); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } void OOXMLFastContextHandler::sendRowProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendRowProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendRowProperties"); #endif mpParserState->resolveRowProperties(*mpStream); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } void OOXMLFastContextHandler::sendTableProperties() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendTableProperties"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendTableProperties"); #endif mpParserState->resolveTableProperties(*mpStream); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } void OOXMLFastContextHandler::clearTableProps() { -#ifdef DEBUG_ELEMENT - debug_logger->element("clearTableProps"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.clearTableProps"); #endif mpParserState->setTableProperties(OOXMLPropertySet::Pointer_t @@ -989,8 +943,8 @@ void OOXMLFastContextHandler::clearTableProps() void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendPropertiesWithId"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendPropertiesWithId"); debug_logger->attribute("id", fastTokenToId(rId)); #endif @@ -1003,7 +957,7 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) pPropertySet->add(pProp); mpStream->props(pPropertySet); -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->propertySet(getPropertySet(), IdToString::Pointer_t(new OOXMLIdToString())); debug_logger->endElement(); @@ -1012,8 +966,8 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) void OOXMLFastContextHandler::clearProps() { -#ifdef DEBUG_ELEMENT - debug_logger->element("clearProps"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->element("contexthandler.clearProps"); #endif setPropertySet(OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl())); @@ -1047,8 +1001,8 @@ OOXMLDocument * OOXMLFastContextHandler::getDocument() void OOXMLFastContextHandler::setForwardEvents(bool bForwardEvents) { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("setForwardEvents"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.setForwardEvents"); if (bForwardEvents) debug_logger->chars("true"); @@ -1138,7 +1092,7 @@ void OOXMLFastContextHandler::resolvePropertySetAttrs() void OOXMLFastContextHandler::sendPropertyToParent() { -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->element("sendPropertyToParent"); #endif @@ -1158,8 +1112,8 @@ void OOXMLFastContextHandler::sendPropertyToParent() void OOXMLFastContextHandler::sendPropertiesToParent() { -#ifdef DEBUG_ELEMENT - debug_logger->startElement("sendPropertiesToParent"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendPropertiesToParent"); #endif if (mpParent != NULL) { @@ -1177,24 +1131,13 @@ void OOXMLFastContextHandler::sendPropertiesToParent() OOXMLProperty::Pointer_t pProp (new OOXMLPropertyImpl(getId(), pValue, OOXMLPropertyImpl::SPRM)); -#ifdef DEBUG_ELEMENT - debug_logger->startElement("propertyForSet"); - debug_logger->chars(pProp->toString()); - debug_logger->endElement(); -#endif pParentProps->add(pProp); -#ifdef DEBUG_ELEMENT - debug_logger->startElement("parent"); - debug_logger->propertySet(pParentProps, - IdToString::Pointer_t(new OOXMLIdToString())); - debug_logger->endElement(); -#endif } } } -#ifdef DEBUG_ELEMENT +#ifdef DEBUG_CONTEXT_HANDLER debug_logger->endElement(); #endif } @@ -1234,8 +1177,8 @@ void OOXMLFastContextHandlerStream::newProperty(const Id & rId, void OOXMLFastContextHandlerStream::sendProperty(Id nId) { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("sendProperty"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.sendProperty"); debug_logger->attribute("id", (*QNameToString::Instance())(nId)); debug_logger->chars(xmlify(getPropertySetAttrs()->toString())); debug_logger->endElement(); @@ -1257,8 +1200,8 @@ OOXMLFastContextHandlerStream::getPropertySetAttrs() const void OOXMLFastContextHandlerStream::resolvePropertySetAttrs() { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("resolvePropertySetAttrs"); +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.resolvePropertySetAttrs"); debug_logger->chars(mpPropertySetAttrs->toString()); debug_logger->endElement(); #endif @@ -1310,13 +1253,7 @@ void OOXMLFastContextHandlerProperties::lcl_endFastElement { if (isForwardEvents()) { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("sendproperties"); -#endif mpStream->props(mpPropertySet); -#ifdef DEBUG_PROPERTIES - debug_logger->endElement(); -#endif } } else @@ -1537,7 +1474,16 @@ OOXMLFastContextHandlerValue::~OOXMLFastContextHandlerValue() void OOXMLFastContextHandlerValue::setValue(OOXMLValue::Pointer_t pValue) { +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->startElement("contexthandler.setValue"); + debug_logger->attribute("value", pValue->toString()); +#endif + mpValue = pValue; + +#ifdef DEBUG_CONTEXT_HANDLER + debug_logger->endElement("contexthandler.setValue"); +#endif } OOXMLValue::Pointer_t OOXMLFastContextHandlerValue::getValue() const diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 5e44eaf9dac3..7017e81e22ed 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -229,19 +229,14 @@ public: virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif -#ifdef DEBUG_MEMORY sal_uInt32 getInstanceNumber() { return mnInstanceNumber; } - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); -#endif - protected: OOXMLFastContextHandler * mpParent; Id mId; Id mnDefine; Token_t mnToken; -#ifdef DEBUG_CONTEXT_STACK +#ifdef DEBUG_CONTEXT_HANDLER string msTokenString; #endif diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index 321ec17042b6..f9555662041e 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -75,6 +75,12 @@ uno::Reference<XFastContextHandler> OOXMLFastHelper<T>::createAndSetParent (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId) { +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.createAndSetParent"); + debug_logger->attribute("context", pHandler->getType()); + debug_logger->attribute("id", (*QNameToString::Instance())(nId)); +#endif + OOXMLFastContextHandler * pTmp = new T(pHandler); pTmp->setToken(nToken); @@ -89,7 +95,7 @@ OOXMLFastHelper<T>::createAndSetParent debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); debug_logger->endElement("created"); - debug_logger->endElement("createAndSetParent"); + debug_logger->endElement("helper.createAndSetParent"); #endif uno::Reference<XFastContextHandler> aResult(pTmp); @@ -102,27 +108,29 @@ uno::Reference<XFastContextHandler> OOXMLFastHelper<T>::createAndSetParentAndDefine (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine) { - OOXMLFastContextHandler * pTmp = new T(pHandler); - - pTmp->setToken(nToken); - pTmp->setId(nId); - pTmp->setDefine(nDefine); - -#ifdef DEBUG_CREATE - debug_logger->startElement("createAndSetParentAndDefine"); +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.createAndSetParentAndDefine"); debug_logger->attribute("context", pHandler->getType()); - debug_logger->attribute("token", fastTokenToId(pTmp->getToken())); debug_logger->attribute("id", (*QNameToString::Instance())(nId)); static char buffer[16]; snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIxUINT32, nId); debug_logger->attribute("idnum", buffer); +#endif + + OOXMLFastContextHandler * pTmp = new T(pHandler); + + pTmp->setToken(nToken); + pTmp->setId(nId); + pTmp->setDefine(nDefine); + +#ifdef DEBUG_HELPER debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); debug_logger->endElement("created"); - debug_logger->endElement("createAndSetParentAndDefine"); + debug_logger->endElement("helper.createAndSetParentAndDefine"); #endif uno::Reference<XFastContextHandler> aResult(pTmp); @@ -136,6 +144,12 @@ OOXMLFastHelper<T>::createAndSetParentRef (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, const uno::Reference < xml::sax::XFastAttributeList > & Attribs) { +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.createAndSetParentRef"); + debug_logger->attribute("context", pHandler->getType()); + debug_logger->attribute("type", fastTokenToId(nToken)); +#endif + boost::shared_ptr<OOXMLFastContextHandler> pTmp(new T(pHandler)); uno::Reference<XFastContextHandler> xChild = @@ -150,15 +164,11 @@ OOXMLFastHelper<T>::createAndSetParentRef } -#ifdef DEBUG_CREATE - debug_logger->startElement("createAndSetParentRef"); - debug_logger->attribute("context", pHandler->getType()); - debug_logger->attribute("type", fastTokenToId(nToken)); - +#ifdef DEBUG_HELPER debug_logger->startElement("created"); - debug_logger->chars(pTmp->getType()); + debug_logger->addTag(pTmp->toTag()); debug_logger->endElement("created"); - debug_logger->endElement("createAndSetParentRef"); + debug_logger->endElement("helper.createAndSetParentRef"); #endif return xChild; @@ -171,7 +181,7 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, { OOXMLValue::Pointer_t pVal(new T(rValue)); -#ifdef DEBUG_PROPERTIES +#ifdef DEBUG_HELPER string aStr = (*QNameToString::Instance())(nId); debug_logger->startElement("newProperty-from-string"); @@ -183,11 +193,14 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, if (aStr.size() == 0) debug_logger->element( "unknown-qname" ); +#endif + pHandler->newProperty(nId, pVal); + +#ifdef DEBUG_HELPER debug_logger->endElement(); #endif - pHandler->newProperty(nId, pVal); } template <class T> @@ -197,10 +210,10 @@ void OOXMLFastHelper<T>::newProperty(OOXMLFastContextHandler * pHandler, { OOXMLValue::Pointer_t pVal(new T(nVal)); -#ifdef DEBUG_PROPERTIES +#ifdef DEBUG_HELPER string aStr = (*QNameToString::Instance())(nId); - debug_logger->startElement("newProperty-from-int"); + debug_logger->startElement("helper.newProperty-from-int"); debug_logger->attribute("name", aStr); debug_logger->attribute("value", pVal->toString()); @@ -222,8 +235,8 @@ void OOXMLFastHelper<T>::mark(OOXMLFastContextHandler * pHandler, string aStr = (*QNameToString::Instance())(nId); -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("mark"); +#ifdef DEBUG_HELPER + debug_logger->startElement("helper.mark"); debug_logger->attribute("name", aStr); debug_logger->attribute ("value", @@ -238,18 +251,6 @@ void OOXMLFastHelper<T>::mark(OOXMLFastContextHandler * pHandler, pHandler->mark(nId, pVal); } - -template <class T> -void OOXMLFastHelper<T>::attributes -(OOXMLFastContextHandler * pContext, - const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - { - T aContext(pContext); - - aContext.setPropertySet(pContext->getPropertySet()); - aContext.attributes(Attribs); -} - }} #endif // INCLUDED_FAST_HELPER_HXX diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index cd319dc44378..1e935104bcce 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -316,6 +316,11 @@ void OOXMLParserState::dumpXml( const TagLogger::Pointer_t& pLogger ) pLogger->endElement(); } + +XPathLogger & OOXMLParserState::getXPathLogger() +{ + return m_xPathLogger; +} #endif }} diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index 4a99b56fcbb4..58c35b0363c1 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -34,6 +34,7 @@ #if OSL_DEBUG_LEVEL > 1 #include <resourcemodel/TagLogger.hxx> +#include <resourcemodel/XPathLogger.hxx> #endif namespace writerfilter { @@ -58,6 +59,9 @@ class OOXMLParserState stack<OOXMLPropertySet::Pointer_t> mCellProps; stack<OOXMLPropertySet::Pointer_t> mRowProps; stack<OOXMLPropertySet::Pointer_t> mTableProps; +#ifdef DEBUG + XPathLogger m_xPathLogger; +#endif public: typedef boost::shared_ptr<OOXMLParserState> Pointer_t; @@ -109,6 +113,7 @@ public: public: unsigned int getContextCount() const; void dumpXml( const TagLogger::Pointer_t& pLogger ); + XPathLogger & getXPathLogger(); #endif }; diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index 1ccfe9545b58..c8e0aad9bc0a 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -35,8 +35,6 @@ #include <ooxml/OOXMLFastTokens.hxx> #include "ooxmlLoggers.hxx" -//#define DEBUG_RESOLVE - namespace writerfilter { namespace ooxml { @@ -475,15 +473,22 @@ string OOXMLPropertySetImpl::getType() const void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) { +#ifdef DEBUG_PROPERTY_SET + debug_logger->startElement("propertyset.add"); + debug_logger->chars(pProperty->toString()); +#endif + if (pProperty.get() != NULL && pProperty->getId() != 0x0) { mProperties.push_back(pProperty); } -#ifdef DEBUG_PROPERTIES +#ifdef DEBUG_PROPERTY_SET else { debug_logger->element("warning.property_not_added"); } + + debug_logger->endElement("propertyset.add"); #endif } diff --git a/writerfilter/source/ooxml/analyzemodel.xsl b/writerfilter/source/ooxml/analyzemodel.xsl index d887a9a178a6..3cce9795a947 100644 --- a/writerfilter/source/ooxml/analyzemodel.xsl +++ b/writerfilter/source/ooxml/analyzemodel.xsl @@ -98,6 +98,7 @@ </xsl:for-each> </xsl:when> </xsl:choose> + <xsl:copy-of select="@tag"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
\ No newline at end of file diff --git a/writerfilter/source/ooxml/effort.xsl b/writerfilter/source/ooxml/effort.xsl index 47f278a63f4f..3dfc102e0780 100644 --- a/writerfilter/source/ooxml/effort.xsl +++ b/writerfilter/source/ooxml/effort.xsl @@ -7,33 +7,40 @@ <xsl:output method="text"/> <xsl:template match="/"> - <xsl:text>Namespace,Define,Name,Done,Planned,qname-count
</xsl:text> - <xsl:for-each select="/todo/attribute|/todo/element"> - <xsl:for-each select=".//status"> - <xsl:for-each select="ancestor::attribute|ancestor::element"> - <xsl:value-of select="@namespace"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@define"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@name"/> - <xsl:text>,</xsl:text> - </xsl:for-each> - <xsl:value-of select="@done"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@planned"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@qname-count"/> - <xsl:text>
</xsl:text> - </xsl:for-each> - <xsl:if test="not(.//status)"> - <xsl:value-of select="@namespace"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@define"/> - <xsl:text>,</xsl:text> - <xsl:value-of select="@name"/> - <xsl:text>,0,0.5,1
</xsl:text> - </xsl:if> + <xsl:text>Namespace,Define,Name,Tag,Done,Planned,qname-count
</xsl:text> + <xsl:for-each select="/todo/attribute|/todo/element"> + <xsl:variable name="namespace" select="@namespace"/> + <xsl:variable name="define" select="@define"/> + <xsl:variable name="name" select="@name"/> + <xsl:variable name="tag" select="@tag"/> + + <xsl:for-each select=".//status"> + <xsl:value-of select="$namespace"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$define"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$name"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$tag"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="@done"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="@planned"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="@qname-count"/> + <xsl:text>
</xsl:text> </xsl:for-each> + <xsl:if test="not(.//status)"> + <xsl:value-of select="$namespace"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$define"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$name"/> + <xsl:text>,</xsl:text> + <xsl:value-of select="$tag"/> + <xsl:text>,0,0.5,1
</xsl:text> + </xsl:if> + </xsl:for-each> </xsl:template> </xsl:stylesheet>
\ No newline at end of file diff --git a/writerfilter/source/ooxml/factory_ns.xsl b/writerfilter/source/ooxml/factory_ns.xsl index 0716a1225b82..d0dd1ab503fd 100644 --- a/writerfilter/source/ooxml/factory_ns.xsl +++ b/writerfilter/source/ooxml/factory_ns.xsl @@ -65,19 +65,18 @@ <xsl:template name="factoryactiondecls"> <xsl:variable name="ns" select="@name"/> - <xsl:for-each select="resource/action"> + <xsl:for-each select="resource/action[not(@name='characters')]"> <xsl:sort select="@name"/> <xsl:if test="generate-id(key('actions', @name)[ancestor::namespace/@name=$ns][1]) = generate-id(.)"> <xsl:text> void </xsl:text> <xsl:value-of select="@name"/> <xsl:text>Action(OOXMLFastContextHandler * pHandler</xsl:text> - <xsl:if test="@name='characters'"> - <xsl:text>, const ::rtl::OUString & sText</xsl:text> - </xsl:if> <xsl:text>);</xsl:text> </xsl:if> </xsl:for-each> + <xsl:text> + virtual void charactersAction(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & sText);</xsl:text> </xsl:template> <!-- factorydecl --> @@ -102,6 +101,10 @@ public: virtual string getDefineName(Id nId) const;</xsl:text> <xsl:call-template name="factoryactiondecls"/> virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); + +#ifdef DEBUG_FACTORY + virtual string getName() const; +#endif <xsl:text> virtual ~</xsl:text> diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl index e3c169145ab3..e555ae1b7d6f 100644 --- a/writerfilter/source/ooxml/factoryimpl.xsl +++ b/writerfilter/source/ooxml/factoryimpl.xsl @@ -74,6 +74,10 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh uno::Reference < xml::sax::XFastContextHandler > aResult; Id nDefine = pHandler->getDefine(); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.createFastChildContextFromFactory"); +#endif + if (pFactory.get() != NULL) { CreateElementMapPointer pMap = pFactory->getCreateElementMap(nDefine); @@ -82,12 +86,13 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh if (pMap.get() != NULL) { Id nId = (*pTokenMap)[Element]; -#ifdef DEBUG_CREATE +#ifdef DEBUG_FACTORY + string sFactoryName(pFactory->getName()); string sDefine(pFactory->getDefineName(nDefine)); string sElement(fastTokenToId(Element)); string sQName((*QNameToString::Instance())(nId)); - debug_logger->startElement("createFastChildContextFromFactory"); + debug_logger->attribute("factory-name", sFactoryName); debug_logger->attribute("define", sDefine); debug_logger->attribute("element", sElement); debug_logger->attribute("qname", sQName); @@ -130,12 +135,13 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh break; } -#ifdef DEBUG_CREATE - debug_logger->endElement("createFastChildContextFromFactory"); -#endif } } +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.createFastChildContextFromFactory"); +#endif + return aResult; } </xsl:text> @@ -174,8 +180,8 @@ OOXMLFactory_ns::Pointer_t OOXMLFactory::getFactoryForNamespace(Id nId) uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastChildContextFromStart (OOXMLFastContextHandler * pHandler, Token_t Element) { -#ifdef DEBUG_CREATE - debug_logger->startElement("createFastChildContextFromStart"); +#ifdef DEBUG_FACTORY + debug_logger->startElement("factory.createFastChildContextFromStart"); #endif uno::Reference < xml::sax::XFastContextHandler > aResult; @@ -194,8 +200,8 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh </xsl:for-each> <xsl:text> -#ifdef DEBUG_CREATE - debug_logger->endElement("createFastChildContextFromStart"); +#ifdef DEBUG_FACTORY + debug_logger->endElement("factory.createFastChildContextFromStart"); #endif return aResult; } diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl index 8d5d014a92cc..243ca88b1851 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.xsl +++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl @@ -139,6 +139,53 @@ OOXMLFactory_ns::Pointer_t </xsl:text> </xsl:text> </xsl:template> +<!-- + Returns resource for attribute. +--> + +<xsl:template name="resourceforattribute"> + <xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/> + <xsl:for-each select="rng:ref"> + <xsl:variable name="name" select="@name"/> + <xsl:variable name="resource1"> + <xsl:for-each select="key('context-resource', @name)[generate-id(ancestor::namespace) = $mynsid]"> + <xsl:value-of select="@resource"/> + </xsl:for-each> + </xsl:variable> + <xsl:choose> + <xsl:when test="string-length($resource1) > 0"> + <xsl:value-of select="$resource1"/> + </xsl:when> + <xsl:otherwise> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:call-template name="resourceforattribute"/> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + <xsl:for-each select=".//rng:text"> + <xsl:text>String</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='base64Binary']"> + <xsl:text>String</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='boolean']"> + <xsl:text>Boolean</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='unsignedInt']"> + <xsl:text>Integer</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='int']"> + <xsl:text>Integer</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='integer']"> + <xsl:text>Integer</xsl:text> + </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='string']"> + <xsl:text>String</xsl:text> + </xsl:for-each> +</xsl:template> + <!-- creates code block in OOXMLFactory_<namespace>::createAttributeToResourceMap @@ -160,51 +207,30 @@ for a rng:define // </xsl:text> <xsl:value-of select="$defname"/> </xsl:if> - <xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/> <xsl:variable name="resource"> - <xsl:for-each select="rng:ref"> - <xsl:for-each select="key('context-resource', @name)[generate-id(ancestor::namespace) = $mynsid]"> - <xsl:value-of select="@resource"/> - </xsl:for-each> - </xsl:for-each> - <xsl:for-each select=".//rng:text"> - <xsl:text>String</xsl:text> - </xsl:for-each> - <xsl:for-each select=".//rng:data[@type='base64Binary']"> - <xsl:text>String</xsl:text> - </xsl:for-each> - <xsl:for-each select=".//rng:data[@type='boolean']"> - <xsl:text>Boolean</xsl:text> - </xsl:for-each> - <xsl:for-each select=".//rng:data[@type='string']"> - <xsl:text>String</xsl:text> - </xsl:for-each> - <xsl:for-each select=".//rng:data[@type='integer']"> - <xsl:text>Integer</xsl:text> - </xsl:for-each> - </xsl:variable> - - <xsl:variable name="refdefine1"> - <xsl:for-each select="rng:ref"> - <xsl:variable name="refname" select="@name"/> - <xsl:for-each select="ancestor::rng:grammar/rng:define[@name=$refname]"> - <xsl:call-template name="idfordefine"/> - </xsl:for-each> - </xsl:for-each> - </xsl:variable> - <xsl:variable name="refdefine"> - <xsl:choose> - <xsl:when test="string-length($refdefine1) > 0"> - <xsl:value-of select="$refdefine1"/> - </xsl:when> - <xsl:otherwise> - <xsl:text>0</xsl:text> - </xsl:otherwise> - </xsl:choose> + <xsl:call-template name="resourceforattribute"/> </xsl:variable> <xsl:choose> <xsl:when test="string-length($resource) > 0"> + <xsl:variable name="refdefine1"> + <xsl:for-each select="rng:ref"> + <xsl:variable name="refname" select="@name"/> + <xsl:for-each select="ancestor::rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="idfordefine"/> + </xsl:for-each> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="refdefine"> + <xsl:choose> + <xsl:when test="string-length($refdefine1) > 0"> + <xsl:value-of select="$refdefine1"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>0</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:text> (*pMap)[</xsl:text> <xsl:call-template name="fasttoken"/> @@ -546,42 +572,103 @@ CreateElementMapPointer </xsl:text> <!-- factoryaction --> <xsl:template name="factoryaction"> - <xsl:param name="action"/> - <xsl:text> -void </xsl:text> - <xsl:call-template name="factoryclassname"/> - <xsl:text>::</xsl:text> - <xsl:value-of select="$action"/> - <xsl:text>Action(OOXMLFastContextHandler * pHandler</xsl:text> + <xsl:param name="action"/> + <xsl:variable name="switchblock1"> + <xsl:for-each select="resource[action/@name=$action]"> + <xsl:text> + </xsl:text> + <xsl:call-template name="caselabeldefine"/> + <xsl:for-each select="action[@name=$action]"> + <xsl:call-template name="factorychooseaction"/> + </xsl:for-each> + <xsl:text> break;
</xsl:text> + </xsl:for-each> + </xsl:variable> + <xsl:variable name="switchblock2"> <xsl:if test="$action='characters'"> - <xsl:text>, const ::rtl::OUString & sText</xsl:text> + <xsl:for-each select="resource[@resource='Value']"> + <xsl:if test="count(attribute) = 0"> + <xsl:variable name="name" select="@name"/> + <xsl:text> </xsl:text> + <xsl:call-template name="caselabeldefine"/> + <xsl:text>
</xsl:text> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:for-each select="rng:ref"> + <xsl:call-template name="charactersactionforvalues"/> + </xsl:for-each> + </xsl:for-each> + <xsl:text> break;
</xsl:text> + </xsl:if> + </xsl:for-each> </xsl:if> - <xsl:text>) -{ - switch (pHandler->getDefine()) - {</xsl:text> - <xsl:for-each select="resource[action/@name=$action]"> - <xsl:text> - </xsl:text> - <xsl:call-template name="caselabeldefine"/> - <xsl:for-each select="action[@name=$action]"> - <xsl:call-template name="factorychooseaction"/> - </xsl:for-each> - <xsl:text> - break;</xsl:text> + </xsl:variable> + <xsl:text>

</xsl:text> + <xsl:text>void </xsl:text> + <xsl:call-template name="factoryclassname"/> + <xsl:text>::</xsl:text> + <xsl:value-of select="$action"/> + <xsl:text>Action(OOXMLFastContextHandler*</xsl:text> + <xsl:if test="string-length($switchblock1) > 0 or string-length($switchblock2) > 0"> + <xsl:text> pHandler</xsl:text> + </xsl:if> + <xsl:if test="$action='characters'"> + <xsl:text>, const ::rtl::OUString &</xsl:text> + <xsl:if test="contains($switchblock1, 'sText') or contains($switchblock2, 'sText')"> + <xsl:text> sText</xsl:text> + </xsl:if> + </xsl:if> + <xsl:text>)
</xsl:text> + <xsl:text>{
</xsl:text> + <xsl:if test="string-length($switchblock1) > 0 or string-length($switchblock2) > 0"> + <xsl:text> sal_uInt32 nDefine = pHandler->getDefine();
</xsl:text> + </xsl:if> + <xsl:if test="string-length($switchblock1) > 0"> + <xsl:text> switch (nDefine)
</xsl:text> + <xsl:text> {
</xsl:text> + <xsl:value-of select="$switchblock1"/> + <xsl:text> default:
</xsl:text> + <xsl:text> break;
</xsl:text> + <xsl:text> }
</xsl:text> + </xsl:if> + <xsl:if test="string-length($switchblock2) > 0"> + <xsl:text> OOXMLFastContextHandlerValue * pValueHandler = dynamic_cast<OOXMLFastContextHandlerValue *>(pHandler);
</xsl:text> + <xsl:text> switch (nDefine)
</xsl:text> + <xsl:text> {
</xsl:text> + <xsl:value-of select="$switchblock2"/> + <xsl:text> default:
</xsl:text> + <xsl:text> break;
</xsl:text> + <xsl:text> }
</xsl:text> + </xsl:if> + <xsl:text>}
</xsl:text> +</xsl:template> + +<xsl:template name="charactersactionforvalues"> + <xsl:variable name="name" select="@name"/> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:text> {
</xsl:text> + <xsl:text> // </xsl:text> + <xsl:value-of select="@name"/> + <xsl:text>
</xsl:text> + <xsl:for-each select="rng:data[@type='int']"> + <xsl:text> OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(sText));
</xsl:text> + <xsl:text> pValueHandler->setValue(pValue);
</xsl:text> </xsl:for-each> - <xsl:text> - default: - break; - } -} -</xsl:text> + <xsl:for-each select="rng:list"> + <xsl:text> ListValueMapPointer pListValueMap = getListValueMap(nDefine);
</xsl:text> + <xsl:text> if (pListValueMap.get() != NULL)
</xsl:text> + <xsl:text> {
</xsl:text> + <xsl:text> OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue((*pListValueMap)[sText]));
</xsl:text> + <xsl:text> pValueHandler->setValue(pValue);</xsl:text> + <xsl:text> }
</xsl:text> + </xsl:for-each> + <xsl:text> }
</xsl:text> + </xsl:for-each> </xsl:template> <!-- factoryactions --> <xsl:template name="factoryactions"> <xsl:variable name="ns" select="@name"/> - <xsl:for-each select="resource/action"> + <xsl:for-each select="resource/action[not(@name='characters')]"> <xsl:sort select="@name"/> <xsl:if test="generate-id(key('actions', @name)[ancestor::namespace/@name=$ns][1]) = generate-id(.)"> <xsl:variable name="name" select="@name"/> @@ -592,6 +679,9 @@ void </xsl:text> </xsl:for-each> </xsl:if> </xsl:for-each> + <xsl:call-template name="factoryaction"> + <xsl:with-param name="action">characters</xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template name="factorygetdefinename"> @@ -799,6 +889,22 @@ void </xsl:text> </xsl:choose> </xsl:template> +<xsl:template name="factorygetname"> + <xsl:param name="ns"/> + <xsl:text> +#ifdef DEBUG_FACTORY +string </xsl:text> +<xsl:call-template name="factoryclassname"/> +<xsl:text>::getName() const +{ + return "</xsl:text> + <xsl:value-of select="$ns"/> + <xsl:text>"; +} +#endif +</xsl:text> +</xsl:template> + <xsl:template match="/"> <xsl:variable name="ns" select="substring-before(substring-after($file, 'OOXMLFactory_'), '.cxx')"/> <xsl:text> @@ -828,6 +934,9 @@ namespace ooxml { <xsl:call-template name="factorygetdefinename"/> <xsl:call-template name="factorytokentoidmap"/> <xsl:call-template name="factoryattributeaction"/> + <xsl:call-template name="factorygetname"> + <xsl:with-param name="ns" select="$ns"/> + </xsl:call-template> </xsl:for-each> <xsl:text> /// @endcond diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index aa740aeaad0a..a394b2fd4671 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <model xmlns:rng="http://relaxng.org/ns/structure/1.0"> - <namespace-alias name="http://www.w3.org/XML/1998/namespace" alias="xml" id="XML"/> - <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/relationships" alias="relationships" id="RELATIONSHIPS"/> - <namespace-alias name="urn:schemas-microsoft-com:office:office" alias="office" id="OFFICE"/> - <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" alias="theme" id="THEME"/> - <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" alias="wordprocessingDrawing" id="DOC_DRAWINGML"/> - <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/main" alias="drawingml" id="DRAWINGML"/> - <namespace-alias name="urn:schemas-microsoft-com:vml" alias="vml" id="VML"/> - <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/picture" alias="picture" id="PICTURE"/> - <namespace-alias name="urn:schemas-microsoft-com:office:word" alias="vml_wordprocessingDrawing" id="VML_DOC"/> - <namespace-alias name="http://schemas.openxmlformats.org/wordprocessingml/2006/main" alias="wordprocessingml" id="DOC"/> - <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/math" alias="math" id="MATH"/> - <namespace-alias name="http://schemas.openxmlformats.org/schemaLibrary/2006/main" alias="schemaLibrary" id="SML"/> - <namespace-alias name="http://sprm" alias="sprm" id="SPRM"/> + <namespace-alias name="http://www.w3.org/XML/1998/namespace" alias="xml" id="xml"/> + <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/relationships" alias="relationships" id="officeRel"/> + <namespace-alias name="urn:schemas-microsoft-com:office:office" alias="office" id="vmlOffice"/> + <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" alias="theme" id="officeRelTheme"/> + <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" alias="wordprocessingDrawing" id="dmlWordDr"/> + <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/main" alias="drawingml" id="dml"/> + <namespace-alias name="urn:schemas-microsoft-com:vml" alias="vml" id="vml"/> + <namespace-alias name="http://schemas.openxmlformats.org/drawingml/2006/picture" alias="picture" id="dmlPicture"/> + <namespace-alias name="urn:schemas-microsoft-com:office:word" alias="vml_wordprocessingDrawing" id="vmlWord"/> + <namespace-alias name="http://schemas.openxmlformats.org/wordprocessingml/2006/main" alias="wordprocessingml" id="doc"/> + <namespace-alias name="http://schemas.openxmlformats.org/officeDocument/2006/math" alias="math" id="officeMath"/> + <namespace-alias name="http://schemas.openxmlformats.org/schemaLibrary/2006/main" alias="schemaLibrary" id="schema"/> + <namespace-alias name="http://sprm" alias="sprm" id="sprm"/> <token tokenid="ooxml:shape"/> <token tokenid="ooxml:token"/> <token tokenid="ooxml:inputstream"/> @@ -191,11 +191,11 @@ </define> </grammar> <resource name="CT_OfficeStyleSheet" resource="Table" tokenid="ooxml:THEMETABLE"/> - <resource name="theme" resource="Stream"> + <resource name="theme" resource="Stream" tag="theme"> <element name="theme" tokenid="ooxml:THEMETABLE"/> </resource> - <resource name="themeOverride" resource="Stream"/> - <resource name="themeManager" resource="Stream"/> + <resource name="themeOverride" resource="Stream" tag="theme"/> + <resource name="themeManager" resource="Stream" tag="theme"/> </namespace> <namespace name="dml-styleDefaults" file="dml-styleDefaults"> <grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="http://schemas.openxmlformats.org/drawingml/2006/main"> @@ -1114,7 +1114,7 @@ <value name="hlink" tokenid="ooxml:Value_drawingml_ST_ColorSchemeIndex_hlink">hlink</value> <value name="folHlink" tokenid="ooxml:Value_drawingml_ST_ColorSchemeIndex_folHlink">folHlink</value> </resource> - <resource name="CT_ColorScheme" resource="Properties"> + <resource name="CT_ColorScheme" resource="Properties" tag="theme"> <element name="dk1" tokenid="ooxml:CT_ColorScheme_dk1"/> <element name="lt1" tokenid="ooxml:CT_ColorScheme_lt1"/> <element name="dk2" tokenid="ooxml:CT_ColorScheme_dk2"/> @@ -1130,39 +1130,39 @@ <element name="extLst" tokenid="ooxml:CT_ColorScheme_extLst"/> <attribute name="name" tokenid="ooxml:CT_ColorScheme_name"/> </resource> - <resource name="CT_SupplementalFont" resource="Properties"> + <resource name="CT_SupplementalFont" resource="Properties" tag="theme"> <attribute name="script" tokenid="ooxml:CT_SupplementalFont_script"/> <attribute name="typeface" tokenid="ooxml:CT_SupplementalFont_typeface"/> </resource> - <resource name="CT_FontCollection" resource="Properties"> + <resource name="CT_FontCollection" resource="Properties" tag="theme"> <element name="latin" tokenid="ooxml:CT_FontCollection_latin"/> <element name="ea" tokenid="ooxml:CT_FontCollection_ea"/> <element name="cs" tokenid="ooxml:CT_FontCollection_cs"/> <element name="font" tokenid="ooxml:CT_FontCollection_font"/> <element name="extLst" tokenid="ooxml:CT_FontCollection_extLst"/> </resource> - <resource name="CT_FontScheme" resource="Properties"> + <resource name="CT_FontScheme" resource="Properties" tag="theme"> <element name="majorFont" tokenid="ooxml:CT_FontScheme_majorFont"/> <element name="minorFont" tokenid="ooxml:CT_FontScheme_minorFont"/> <element name="extLst" tokenid="ooxml:CT_FontScheme_extLst"/> <attribute name="name" tokenid="ooxml:CT_FontScheme_name"/> </resource> - <resource name="CT_FillStyleList" resource="Properties"/> - <resource name="CT_LineStyleList" resource="Properties"> + <resource name="CT_FillStyleList" resource="Properties" tag="theme"/> + <resource name="CT_LineStyleList" resource="Properties" tag="theme"> <element name="ln" tokenid="ooxml:CT_LineStyleList_ln"/> </resource> - <resource name="CT_EffectStyleList" resource="Properties"> + <resource name="CT_EffectStyleList" resource="Properties" tag="theme"> <element name="effectStyle" tokenid="ooxml:CT_EffectStyleList_effectStyle"/> </resource> - <resource name="CT_BackgroundFillStyleList" resource="Properties"/> - <resource name="CT_StyleMatrix" resource="Properties"> + <resource name="CT_BackgroundFillStyleList" resource="Properties" tag="theme"/> + <resource name="CT_StyleMatrix" resource="Properties" tag="theme"> <element name="fillStyleLst" tokenid="ooxml:CT_StyleMatrix_fillStyleLst"/> <element name="lnStyleLst" tokenid="ooxml:CT_StyleMatrix_lnStyleLst"/> <element name="effectStyleLst" tokenid="ooxml:CT_StyleMatrix_effectStyleLst"/> <element name="bgFillStyleLst" tokenid="ooxml:CT_StyleMatrix_bgFillStyleLst"/> <attribute name="name" tokenid="ooxml:CT_StyleMatrix_name"/> </resource> - <resource name="CT_BaseStyles" resource="Properties"> + <resource name="CT_BaseStyles" resource="Properties" tag="theme"> <element name="clrScheme" tokenid="ooxml:CT_BaseStyles_clrScheme"/> <element name="fontScheme" tokenid="ooxml:CT_BaseStyles_fontScheme"/> <element name="fmtScheme" tokenid="ooxml:CT_BaseStyles_fmtScheme"/> @@ -1541,7 +1541,7 @@ <resource name="ST_TextFontSize" resource="Integer" generated="yes"/> <resource name="ST_Panose" resource="Hex" generated="yes"/> <resource name="ST_TextTypeface" resource="String" generated="yes"/> - <resource name="CT_TextFont" resource="Properties"> + <resource name="CT_TextFont" resource="Properties" tag="character"> <attribute name="typeface" tokenid="ooxml:CT_TextFont_typeface"/> <attribute name="panose" tokenid="ooxml:CT_TextFont_panose"/> <attribute name="pitchFamily" tokenid="ooxml:CT_TextFont_pitchFamily"/> @@ -2738,7 +2738,7 @@ <value name="shdw19" tokenid="ooxml:Value_drawingml_ST_PresetShadowVal_shdw19">shdw19</value> <value name="shdw20" tokenid="ooxml:Value_drawingml_ST_PresetShadowVal_shdw20">shdw20</value> </resource> - <resource name="CT_SolidColorFillProperties" resource="Properties"/> + <resource name="CT_SolidColorFillProperties" resource="Properties" tag="shape"/> <resource name="ST_PathShadeType" resource="List" generated="yes"> <value name="shape" tokenid="ooxml:Value_drawingml_ST_PathShadeType_shape">shape</value> <value name="circle" tokenid="ooxml:Value_drawingml_ST_PathShadeType_circle">circle</value> @@ -2750,7 +2750,7 @@ <value name="y" tokenid="ooxml:Value_drawingml_ST_TileFlipMode_y">y</value> <value name="xy" tokenid="ooxml:Value_drawingml_ST_TileFlipMode_xy">xy</value> </resource> - <resource name="CT_GradientStop" resource="Properties"> + <resource name="CT_GradientStop" resource="Properties" tag="shape"> <attribute name="pos" tokenid="ooxml:CT_GradientStop_pos"/> </resource> <resource name="CT_TileInfoProperties" resource="Properties"> @@ -2761,10 +2761,10 @@ <attribute name="flip" tokenid="ooxml:CT_TileInfoProperties_flip"/> <attribute name="algn" tokenid="ooxml:CT_TileInfoProperties_algn"/> </resource> - <resource name="CT_StretchInfoProperties" resource="Properties"> + <resource name="CT_StretchInfoProperties" resource="Properties" tag="shape"> <element name="fillRect" tokenid="ooxml:CT_StretchInfoProperties_fillRect"/> </resource> - <resource name="EG_FillModeProperties" resource="Properties"> + <resource name="EG_FillModeProperties" resource="Properties" tag="shape"> <element name="tile" tokenid="ooxml:EG_FillModeProperties_tile"/> <element name="stretch" tokenid="ooxml:EG_FillModeProperties_stretch"/> </resource> @@ -2775,7 +2775,7 @@ <value name="hqprint" tokenid="ooxml:Value_drawingml_ST_BlipCompression_hqprint">hqprint</value> <value name="none" tokenid="ooxml:Value_drawingml_ST_BlipCompression_none">none</value> </resource> - <resource name="CT_Blip" resource="Properties"> + <resource name="CT_Blip" resource="Properties" tag="shape"> <element name="alphaBiLevel" tokenid="ooxml:CT_Blip_alphaBiLevel"/> <element name="alphaCeiling" tokenid="ooxml:CT_Blip_alphaCeiling"/> <element name="alphaFloor" tokenid="ooxml:CT_Blip_alphaFloor"/> @@ -2796,7 +2796,7 @@ <element name="extLst" tokenid="ooxml:CT_Blip_extLst"/> <attribute name="cstate" tokenid="ooxml:CT_Blip_cstate"/> </resource> - <resource name="CT_BlipFillProperties" resource="Properties"> + <resource name="CT_BlipFillProperties" resource="Properties" tag="shape"> <element name="blip" tokenid="ooxml:CT_BlipFillProperties_blip"/> <element name="srcRect" tokenid="ooxml:CT_BlipFillProperties_srcRect"/> <attribute name="dpi" tokenid="ooxml:CT_BlipFillProperties_dpi"/> @@ -2865,7 +2865,7 @@ <value name="darken" tokenid="ooxml:Value_drawingml_ST_BlendMode_darken">darken</value> <value name="lighten" tokenid="ooxml:Value_drawingml_ST_BlendMode_lighten">lighten</value> </resource> - <resource name="EG_Effect" resource="Properties"> + <resource name="EG_Effect" resource="Properties" tag="shape"> <element name="cont" tokenid="ooxml:EG_Effect_cont"/> <element name="effect" tokenid="ooxml:EG_Effect_effect"/> <element name="alphaBiLevel" tokenid="ooxml:EG_Effect_alphaBiLevel"/> @@ -2901,7 +2901,7 @@ <value name="sib" tokenid="ooxml:Value_drawingml_ST_EffectContainerType_sib">sib</value> <value name="tree" tokenid="ooxml:Value_drawingml_ST_EffectContainerType_tree">tree</value> </resource> - <resource name="CT_EffectContainer" resource="Properties"> + <resource name="CT_EffectContainer" resource="Properties" tag="shape"> <attribute name="type" tokenid="ooxml:CT_EffectContainer_type"/> <attribute name="name" tokenid="ooxml:CT_EffectContainer_name"/> </resource> @@ -3197,12 +3197,12 @@ <value name="med" tokenid="ooxml:Value_drawingml_ST_LineEndLength_med">med</value> <value name="lg" tokenid="ooxml:Value_drawingml_ST_LineEndLength_lg">lg</value> </resource> - <resource name="CT_LineEndProperties" resource="Properties"> + <resource name="CT_LineEndProperties" resource="Properties" tag="shape"> <attribute name="type" tokenid="ooxml:CT_LineEndProperties_type"/> <attribute name="w" tokenid="ooxml:CT_LineEndProperties_w"/> <attribute name="len" tokenid="ooxml:CT_LineEndProperties_len"/> </resource> - <resource name="EG_LineFillProperties" resource="Properties"> + <resource name="EG_LineFillProperties" resource="Properties" tag="shape"> <element name="noFill" tokenid="ooxml:EG_LineFillProperties_noFill"/> <element name="solidFill" tokenid="ooxml:EG_LineFillProperties_solidFill"/> <element name="gradFill" tokenid="ooxml:EG_LineFillProperties_gradFill"/> @@ -3237,7 +3237,7 @@ <value name="thinThick" tokenid="ooxml:Value_drawingml_ST_CompoundLine_thinThick">thinThick</value> <value name="tri" tokenid="ooxml:Value_drawingml_ST_CompoundLine_tri">tri</value> </resource> - <resource name="CT_LineProperties" resource="Properties"> + <resource name="CT_LineProperties" resource="Properties" tag="shape"> <element name="headEnd" tokenid="ooxml:CT_LineProperties_headEnd"/> <element name="tailEnd" tokenid="ooxml:CT_LineProperties_tailEnd"/> <element name="extLst" tokenid="ooxml:CT_LineProperties_extLst"/> @@ -3331,7 +3331,7 @@ </optional> </define> </grammar> - <resource name="CT_ShapeProperties" resource="Properties"> + <resource name="CT_ShapeProperties" resource="Properties" tag="shape"> <element name="xfrm" tokenid="ooxml:CT_ShapeProperties_xfrm"/> <element name="ln" tokenid="ooxml:CT_ShapeProperties_ln"/> <element name="scene3d" tokenid="ooxml:CT_ShapeProperties_scene3d"/> @@ -4429,41 +4429,41 @@ <attribute name="val" tokenid="ooxml:CT_Angle_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> - <resource name="CT_PositiveFixedAngle" resource="Value" generated="yes"> + <resource name="CT_PositiveFixedAngle" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PositiveFixedAngle_val" action="setValue"/> </resource> <resource name="ST_Percentage" resource="Integer" generated="yes"/> - <resource name="CT_Percentage" resource="Value" generated="yes"> + <resource name="CT_Percentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Percentage_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> - <resource name="CT_PositivePercentage" resource="Value" generated="yes"> + <resource name="CT_PositivePercentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PositivePercentage_val" action="setValue"/> </resource> - <resource name="CT_FixedPercentage" resource="Value" generated="yes"> + <resource name="CT_FixedPercentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_FixedPercentage_val" action="setValue"/> </resource> - <resource name="CT_PositiveFixedPercentage" resource="Value" generated="yes"> + <resource name="CT_PositiveFixedPercentage" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PositiveFixedPercentage_val" action="setValue"/> </resource> - <resource name="CT_Point2D" resource="Properties"> + <resource name="CT_Point2D" resource="Properties" tag="shape"> <attribute name="x" tokenid="ooxml:CT_Point2D_x"/> <attribute name="y" tokenid="ooxml:CT_Point2D_y"/> </resource> - <resource name="CT_PositiveSize2D" resource="Properties"> + <resource name="CT_PositiveSize2D" resource="Properties" tag="shape"> <attribute name="cx" tokenid="ooxml:CT_PositiveSize2D_cx"/> <attribute name="cy" tokenid="ooxml:CT_PositiveSize2D_cy"/> </resource> - <resource name="CT_ScRgbColor" resource="Properties"> + <resource name="CT_ScRgbColor" resource="Properties" tag="shape"> <attribute name="r" tokenid="ooxml:CT_ScRgbColor_r"/> <attribute name="g" tokenid="ooxml:CT_ScRgbColor_g"/> <attribute name="b" tokenid="ooxml:CT_ScRgbColor_b"/> </resource> <resource name="ST_HexBinary3" resource="Hex" generated="yes"/> - <resource name="CT_SRgbColor" resource="Properties"> + <resource name="CT_SRgbColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_SRgbColor_val"/> </resource> - <resource name="CT_HslColor" resource="Properties"> + <resource name="CT_HslColor" resource="Properties" tag="shape"> <attribute name="hue" tokenid="ooxml:CT_HslColor_hue"/> <attribute name="sat" tokenid="ooxml:CT_HslColor_sat"/> <attribute name="lum" tokenid="ooxml:CT_HslColor_lum"/> @@ -4500,7 +4500,7 @@ <value name="menuHighlight" tokenid="ooxml:Value_drawingml_ST_SystemColorVal_menuHighlight">menuHighlight</value> <value name="menuBar" tokenid="ooxml:Value_drawingml_ST_SystemColorVal_menuBar">menuBar</value> </resource> - <resource name="CT_SystemColor" resource="Properties"> + <resource name="CT_SystemColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_SystemColor_val"/> <attribute name="lastClr" tokenid="ooxml:CT_SytemColor_lastClr"/> </resource> @@ -4523,7 +4523,7 @@ <value name="dk2" tokenid="ooxml:Value_drawingml_ST_SchemeColorVal_dk2">dk2</value> <value name="lt2" tokenid="ooxml:Value_drawingml_ST_SchemeColorVal_lt2">lt2</value> </resource> - <resource name="CT_SchemeColor" resource="Properties"> + <resource name="CT_SchemeColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_SchemeColor_val"/> </resource> <resource name="ST_PresetColorVal" resource="List"> @@ -4668,10 +4668,10 @@ <value tokenid="0xffff00">yellow</value> <value tokenid="0x9acd32">yellowGreen</value> </resource> - <resource name="CT_PresetColor" resource="Properties"> + <resource name="CT_PresetColor" resource="Properties" tag="shape"> <attribute name="val" tokenid="ooxml:CT_PresetColor_val"/> </resource> - <resource name="CT_Transform2D" resource="Properties"> + <resource name="CT_Transform2D" resource="Properties" tag="shape"> <element name="off" tokenid="ooxml:CT_Transform2D_off"/> <element name="ext" tokenid="ooxml:CT_Transform2D_ext"/> <attribute name="rot" tokenid="ooxml:CT_Transform2D_rot"/> @@ -4690,7 +4690,7 @@ <value name="br" tokenid="ooxml:Value_drawingml_ST_RectAlignment_br">br</value> </resource> <resource name="ST_Guid" resource="String" generated="yes"/> - <resource name="EG_ColorChoice" resource="Properties"> + <resource name="EG_ColorChoice" resource="Properties" tag="shape"> <element name="scrgbClr" tokenid="ooxml:EG_ColorChoice_scrgbClr"/> <element name="srgbClr" tokenid="ooxml:EG_ColorChoice_srgbClr"/> <element name="hslClr" tokenid="ooxml:EG_ColorChoice_hslClr"/> @@ -4698,8 +4698,8 @@ <element name="schemeClr" tokenid="ooxml:EG_ColorChoice_schemeClr"/> <element name="prstClr" tokenid="ooxml:EG_ColorChoice_prstClr"/> </resource> - <resource name="CT_Color" resource="Properties"/> - <resource name="CT_ColorMRU" resource="Properties"/> + <resource name="CT_Color" resource="Properties" tag="shape"/> + <resource name="CT_ColorMRU" resource="Properties" tag="shape"/> <resource name="ST_BlackWhiteMode" resource="List" generated="yes"> <value name="clr" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_clr">clr</value> <value name="auto" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_auto">auto</value> @@ -4713,7 +4713,7 @@ <value name="white" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_white">white</value> <value name="hidden" tokenid="ooxml:Value_drawingml_ST_BlackWhiteMode_hidden">hidden</value> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="AG_Blob" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="AG_Blob" resource="Properties" tag="shape"> <attribute name="r:embed" tokenid="ooxml:AG_Blob_r_embed"/> <attribute name="r:link" tokenid="ooxml:AG_Blob_r_link"/> </resource> @@ -5100,7 +5100,7 @@ </optional> </define> </grammar> - <resource name="CT_GraphicalObjectFrameLocking" resource="Properties"> + <resource name="CT_GraphicalObjectFrameLocking" resource="Properties" tag="shape"> <element name="extLst" tokenid="ooxml:CT_GraphicalObjectFrameLocking_extLst"/> <attribute name="noGrp" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noGrp"/> <attribute name="noDrilldown" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noDrilldown"/> @@ -5109,7 +5109,7 @@ <attribute name="noMove" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noMove"/> <attribute name="noResize" tokenid="ooxml:CT_GraphicalObjectFrameLocking_noResize"/> </resource> - <resource name="CT_NonVisualDrawingProps" resource="Properties"> + <resource name="CT_NonVisualDrawingProps" resource="Properties" tag="shape"> <element name="hlinkClick" tokenid="ooxml:CT_NonVisualDrawingProps_hlinkClick"/> <element name="hlinkHover" tokenid="ooxml:CT_NonVisualDrawingProps_hlinkHover"/> <element name="extLst" tokenid="ooxml:CT_NonVisualDrawingProps_extLst"/> @@ -5118,12 +5118,12 @@ <attribute name="descr" tokenid="ooxml:CT_NonVisualDrawingProps_descr"/> <attribute name="hidden" tokenid="ooxml:CT_NonVisualDrawingProps_hidden"/> </resource> - <resource name="CT_NonVisualPictureProperties" resource="Properties"> + <resource name="CT_NonVisualPictureProperties" resource="Properties" tag="shape"> <element name="picLocks" tokenid="ooxml:CT_NonVisualPictureProperties_picLocks"/> <element name="extLst" tokenid="ooxml:CT_NonVisualPictureProperties_extLst"/> <attribute name="preferRelativeResize" tokenid="ooxml:CT_NonVisualPictureProperties_preferRelativeResize"/> </resource> - <resource name="CT_NonVisualGraphicFrameProperties" resource="Properties"> + <resource name="CT_NonVisualGraphicFrameProperties" resource="Properties" tag="shape"> <element name="graphicFrameLocks" tokenid="ooxml:CT_NonVisualGraphicFrameProperties_graphicFrameLocks"/> <element name="extLst" tokenid="ooxml:CT_NonVisualGraphicFrameProperties_extLst"/> </resource> @@ -5159,14 +5159,14 @@ </element> </define> </grammar> - <resource name="CT_GraphicalObjectData" resource="Properties"> + <resource name="CT_GraphicalObjectData" resource="Properties" tag="shape"> <element name="pic" tokenid="ooxml:CT_GraphicalObjectData_pic"/> <attribute name="uri" tokenid="ooxml:CT_GraphicalObjectData_uri"/> </resource> - <resource name="CT_GraphicalObject" resource="Properties"> + <resource name="CT_GraphicalObject" resource="Properties" tag="shape"> <element name="graphicData" tokenid="ooxml:CT_GraphicalObject_graphicData"/> </resource> - <resource name="graphic" resource="Properties"> + <resource name="graphic" resource="Properties" tag="shape"> <element name="graphic" tokenid="ooxml:graphic_graphic"/> </resource> </namespace> @@ -6271,7 +6271,7 @@ </resource> <resource name="ST_GeomGuideName" resource="String" generated="yes"/> <resource name="ST_GeomGuideFormula" resource="String" generated="yes"/> - <resource name="CT_GeomGuideList" resource="Properties"> + <resource name="CT_GeomGuideList" resource="Properties" tag="shape"> <element name="gd" tokenid="ooxml:CT_GeomGuideList_gd"/> </resource> <resource name="ST_PathFillMode" resource="List" generated="yes"> @@ -6282,11 +6282,11 @@ <value name="darken" tokenid="ooxml:Value_drawingml_ST_PathFillMode_darken">darken</value> <value name="darkenLess" tokenid="ooxml:Value_drawingml_ST_PathFillMode_darkenLess">darkenLess</value> </resource> - <resource name="CT_PresetGeometry2D" resource="Properties"> + <resource name="CT_PresetGeometry2D" resource="Properties" tag="shape"> <element name="avLst" tokenid="ooxml:CT_PresetGeometry2D_avLst"/> <attribute name="prst" tokenid="ooxml:CT_PresetGeometry2D_prst"/> </resource> - <resource name="CT_CustomGeometry2D" resource="Properties"> + <resource name="CT_CustomGeometry2D" resource="Properties" tag="shape"> <element name="avLst" tokenid="ooxml:CT_CustomGeometry2D_avLst"/> <element name="gdLst" tokenid="ooxml:CT_CustomGeometry2D_gdLst"/> <element name="ahLst" tokenid="ooxml:CT_CustomGeometry2D_ahLst"/> @@ -6294,7 +6294,7 @@ <element name="rect" tokenid="ooxml:CT_CustomGeometry2D_rect"/> <element name="pathLst" tokenid="ooxml:CT_CustomGeometry2D_pathLst"/> </resource> - <resource name="EG_Geometry" resource="Properties"> + <resource name="EG_Geometry" resource="Properties" tag="shape"> <element name="custGeom" tokenid="ooxml:EG_Geometry_custGeom"/> <element name="prstGeom" tokenid="ooxml:EG_Geometry_prstGeom"/> </resource> @@ -6755,14 +6755,14 @@ </element> </define> </grammar> - <resource name="CT_EffectExtent" resource="Properties"> + <resource name="CT_EffectExtent" resource="Properties" tag="shape"> <attribute name="l" tokenid="ooxml:CT_EffectExtent_l"/> <attribute name="t" tokenid="ooxml:CT_EffectExtent_t"/> <attribute name="r" tokenid="ooxml:CT_EffectExtent_r"/> <attribute name="b" tokenid="ooxml:CT_EffectExtent_b"/> </resource> <resource name="ST_WrapDistance" resource="Integer" generated="yes"/> - <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Inline" resource="Properties"> + <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Inline" resource="Properties" tag="shape"> <element name="extent" tokenid="ooxml:CT_Inline_extent"/> <element name="effectExtent" tokenid="ooxml:CT_Inline_effectExtent"/> <element name="docPr" tokenid="ooxml:CT_Inline_docPr"/> @@ -6779,13 +6779,13 @@ <value name="right" tokenid="ooxml:Value_wordprocessingDrawing_ST_WrapText_right">right</value> <value name="largest" tokenid="ooxml:Value_wordprocessingDrawing_ST_WrapText_largest">largest</value> </resource> - <resource name="CT_WrapPath" resource="Properties"> + <resource name="CT_WrapPath" resource="Properties" tag="shape"> <element name="start" tokenid="ooxml:CT_WrapPath_start"/> <element name="lineTo" tokenid="ooxml:CT_WrapPath_lineTo"/> <attribute name="edited" tokenid="ooxml:CT_WrapPath_edited"/> </resource> - <resource name="CT_WrapNone" resource="Properties"/> - <resource name="CT_WrapSquare" resource="Properties"> + <resource name="CT_WrapNone" resource="Properties" tag="shape"/> + <resource name="CT_WrapSquare" resource="Properties" tag="shape"> <element name="effectExtent" tokenid="ooxml:CT_WrapSquare_effectExtent"/> <attribute name="wrapText" tokenid="ooxml:CT_WrapSquare_wrapText"/> <attribute name="distT" tokenid="ooxml:CT_WrapSquare_distT"/> @@ -6793,24 +6793,24 @@ <attribute name="distL" tokenid="ooxml:CT_WrapSquare_distL"/> <attribute name="distR" tokenid="ooxml:CT_WrapSquare_distR"/> </resource> - <resource name="CT_WrapTight" resource="Properties"> + <resource name="CT_WrapTight" resource="Properties" tag="shape"> <element name="wrapPolygon" tokenid="ooxml:CT_WrapTight_wrapPolygon"/> <attribute name="wrapText" tokenid="ooxml:CT_WrapTight_wrapText"/> <attribute name="distL" tokenid="ooxml:CT_WrapTight_distL"/> <attribute name="distR" tokenid="ooxml:CT_WrapTight_distR"/> </resource> - <resource name="CT_WrapThrough" resource="Properties"> + <resource name="CT_WrapThrough" resource="Properties" tag="shape"> <element name="wrapPolygon" tokenid="ooxml:CT_WrapThrough_wrapPolygon"/> <attribute name="wrapText" tokenid="ooxml:CT_WrapThrough_wrapText"/> <attribute name="distL" tokenid="ooxml:CT_WrapThrough_distL"/> <attribute name="distR" tokenid="ooxml:CT_WrapThrough_distR"/> </resource> - <resource name="CT_WrapTopBottom" resource="Properties"> + <resource name="CT_WrapTopBottom" resource="Properties" tag="shape"> <element name="effectExtent" tokenid="ooxml:CT_WrapTopBottom_effectExtent"/> <attribute name="distT" tokenid="ooxml:CT_WrapTopBottom_distT"/> <attribute name="distB" tokenid="ooxml:CT_WrapTopBottom_distB"/> </resource> - <resource name="EG_WrapType" resource="Properties"> + <resource name="EG_WrapType" resource="Properties" tag="shape"> <element name="wrapNone" tokenid="ooxml:EG_WrapType_wrapNone"/> <element name="wrapSquare" tokenid="ooxml:EG_WrapType_wrapSquare"/> <element name="wrapTight" tokenid="ooxml:EG_WrapType_wrapTight"/> @@ -6818,7 +6818,7 @@ <element name="wrapTopAndBottom" tokenid="ooxml:EG_WrapType_wrapTopAndBottom"/> </resource> <resource name="ST_PositionOffset" resource="Integer" generated="yes"/> - <resource name="ST_AlignH" resource="List" generated="yes"> + <resource name="ST_AlignH" resource="List" generated="yes" tag="shape"> <value name="left" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignH_left">left</value> <value name="right" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignH_right">right</value> <value name="center" tokenid="ooxml:Value_wordprocessingDrawing_ST_AlignH_center">center</value> @@ -6835,7 +6835,7 @@ <value name="insideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromH_insideMargin">insideMargin</value> <value name="outsideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromH_outsideMargin">outsideMargin</value> </resource> - <resource name="CT_PosH" resource="Properties"> + <resource name="CT_PosH" resource="Properties" tag="shape"> <element name="align" tokenid="ooxml:CT_PosH_align"/> <element name="posOffset" tokenid="ooxml:CT_PosH_posOffset"/> <attribute name="relativeFrom" tokenid="ooxml:CT_PosH_relativeFrom"/> @@ -6857,12 +6857,12 @@ <value name="insideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromV_insideMargin">insideMargin</value> <value name="outsideMargin" tokenid="ooxml:Value_wordprocessingDrawing_ST_RelFromV_outsideMargin">outsideMargin</value> </resource> - <resource name="CT_PosV" resource="Properties"> + <resource name="CT_PosV" resource="Properties" tag="shape"> <element name="align" tokenid="ooxml:CT_PosV_align"/> <element name="posOffset" tokenid="ooxml:CT_PosV_posOffset"/> <attribute name="relativeFrom" tokenid="ooxml:CT_PosV_relativeFrom"/> </resource> - <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Anchor" resource="Properties"> + <resource xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="CT_Anchor" resource="Properties" tag="shape"> <element name="simplePos" tokenid="ooxml:CT_Anchor_simplePos_elem"/> <element name="positionH" tokenid="ooxml:CT_Anchor_positionH"/> <element name="positionV" tokenid="ooxml:CT_Anchor_positionV"/> @@ -6883,10 +6883,10 @@ <attribute name="hidden" tokenid="ooxml:CT_Anchor_hidden"/> <attribute name="allowOverlap" tokenid="ooxml:CT_Anchor_allowOverlap"/> </resource> - <resource name="inline" resource="Properties"> + <resource name="inline" resource="Properties" tag="shape"> <element name="inline" tokenid="ooxml:inline_inline"/> </resource> - <resource name="anchor" resource="Properties"> + <resource name="anchor" resource="Properties" tag="shape"> <element name="anchor" tokenid="ooxml:anchor_anchor"/> </resource> </namespace> @@ -8194,27 +8194,27 @@ </define> </grammar> <resource name="ST_Integer255" resource="Integer" generated="yes"/> - <resource name="CT_Integer255" resource="Value" generated="yes"> + <resource name="CT_Integer255" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Integer255_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_Integer2" resource="Integer" generated="yes"/> - <resource name="CT_Integer2" resource="Value" generated="yes"> + <resource name="CT_Integer2" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Integer2_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_SpacingRule" resource="Integer" generated="yes"/> - <resource name="CT_SpacingRule" resource="Value" generated="yes"> + <resource name="CT_SpacingRule" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_SpacingRule_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_UnSignedInteger" resource="Integer" generated="yes"/> - <resource name="CT_UnSignedInteger" resource="Value" generated="yes"> + <resource name="CT_UnSignedInteger" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_UnSignedInteger_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_Char" resource="String" generated="yes"/> - <resource name="CT_Char" resource="Value" generated="yes"> + <resource name="CT_Char" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Char_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -8222,12 +8222,12 @@ <value name="on" tokenid="ooxml:Value_math_ST_OnOff_on">on</value> <value name="off" tokenid="ooxml:Value_math_ST_OnOff_off">off</value> </resource> - <resource name="CT_OnOff" resource="Value"> + <resource name="CT_OnOff" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_OnOff_val" action="setValue"/> <action name="start" action="setDefaultBooleanValue"/> </resource> <resource name="ST_String" resource="String" generated="yes"/> - <resource name="CT_String" resource="Value" generated="yes"> + <resource name="CT_String" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_String_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -8236,7 +8236,7 @@ <value name="center" tokenid="ooxml:Value_math_ST_XAlign_center">center</value> <value name="right" tokenid="ooxml:Value_math_ST_XAlign_right">right</value> </resource> - <resource name="CT_XAlign" resource="Value" generated="yes"> + <resource name="CT_XAlign" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_XAlign_val" action="setValue"/> </resource> <resource name="ST_YAlign" resource="List" generated="yes"> @@ -8244,14 +8244,14 @@ <value name="center" tokenid="ooxml:Value_math_ST_YAlign_center">center</value> <value name="bot" tokenid="ooxml:Value_math_ST_YAlign_bot">bot</value> </resource> - <resource name="CT_YAlign" resource="Value" generated="yes"> + <resource name="CT_YAlign" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_YAlign_val" action="setValue"/> </resource> <resource name="ST_Shp" resource="List" generated="yes"> <value name="centered" tokenid="ooxml:Value_math_ST_Shp_centered">centered</value> <value name="match" tokenid="ooxml:Value_math_ST_Shp_match">match</value> </resource> - <resource name="CT_Shp" resource="Value" generated="yes"> + <resource name="CT_Shp" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_Shp_val" action="setValue"/> </resource> <resource name="ST_FType" resource="List" generated="yes"> @@ -8260,21 +8260,21 @@ <value name="lin" tokenid="ooxml:Value_math_ST_FType_lin">lin</value> <value name="noBar" tokenid="ooxml:Value_math_ST_FType_noBar">noBar</value> </resource> - <resource name="CT_FType" resource="Value" generated="yes"> + <resource name="CT_FType" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_FType_val" action="setValue"/> </resource> <resource name="ST_LimLoc" resource="List" generated="yes"> <value name="undOvr" tokenid="ooxml:Value_math_ST_LimLoc_undOvr">undOvr</value> <value name="subSup" tokenid="ooxml:Value_math_ST_LimLoc_subSup">subSup</value> </resource> - <resource name="CT_LimLoc" resource="Value" generated="yes"> + <resource name="CT_LimLoc" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_LimLoc_val" action="setValue"/> </resource> <resource name="ST_TopBot" resource="List" generated="yes"> <value name="top" tokenid="ooxml:Value_math_ST_TopBot_top">top</value> <value name="bot" tokenid="ooxml:Value_math_ST_TopBot_bot">bot</value> </resource> - <resource name="CT_TopBot" resource="Value" generated="yes"> + <resource name="CT_TopBot" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_TopBot_val" action="setValue"/> </resource> <resource name="ST_Script" resource="List" generated="yes"> @@ -8285,7 +8285,7 @@ <value name="sansmserif" tokenid="ooxml:Value_math_ST_Script_sansmserif">sans-serif</value> <value name="monospace" tokenid="ooxml:Value_math_ST_Script_monospace">monospace</value> </resource> - <resource name="CT_Script" resource="Value" generated="yes"> + <resource name="CT_Script" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_Script_val" action="setValue"/> </resource> <resource name="ST_Style" resource="List"> @@ -8294,7 +8294,7 @@ <value tokenid="ooxml:Value_ST_Style_i">i</value> <value tokenid="ooxml:Value_ST_Style_p">p</value> </resource> - <resource name="CT_Style" resource="Value"> + <resource name="CT_Style" resource="Value" tag="math"> <attribute name="val" tokenid="ooxml:CT_Style_val" action="setValue"/> </resource> <resource name="ST_Jc" resource="List" generated="yes"> @@ -8305,11 +8305,11 @@ <value name="center" tokenid="ooxml:Value_math_ST_Jc_center">center</value> <value name="centerGroup" tokenid="ooxml:Value_math_ST_Jc_centerGroup">centerGroup</value> </resource> - <resource name="CT_OMathJc" resource="Value" generated="yes"> + <resource name="CT_OMathJc" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_OMathJc_val" action="setValue"/> </resource> <resource name="ST_TwipsMeasure" resource="Integer" generated="yes"/> - <resource name="CT_TwipsMeasure" resource="Value" generated="yes"> + <resource name="CT_TwipsMeasure" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_TwipsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> @@ -8318,7 +8318,7 @@ <value name="after" tokenid="ooxml:Value_math_ST_BreakBin_after">after</value> <value name="repeat" tokenid="ooxml:Value_math_ST_BreakBin_repeat">repeat</value> </resource> - <resource name="CT_BreakBin" resource="Value" generated="yes"> + <resource name="CT_BreakBin" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_BreakBin_val" action="setValue"/> </resource> <resource name="ST_BreakBinSub" resource="List" generated="yes"> @@ -8326,7 +8326,7 @@ <value name="mp" tokenid="ooxml:Value_math_ST_BreakBinSub_mp">-+</value> <value name="pm" tokenid="ooxml:Value_math_ST_BreakBinSub_pm">+-</value> </resource> - <resource name="CT_BreakBinSub" resource="Value" generated="yes"> + <resource name="CT_BreakBinSub" resource="Value" generated="yes" tag="math"> <attribute name="val" tokenid="ooxml:CT_BreakBinSub_val" action="setValue"/> </resource> </namespace> @@ -8412,16 +8412,16 @@ </element> </define> </grammar> - <resource name="CT_PictureNonVisual" resource="Properties"> + <resource name="CT_PictureNonVisual" resource="Properties" tag="shape"> <element name="cNvPr" tokenid="ooxml:CT_PictureNonVisual_cNvPr"/> <element name="cNvPicPr" tokenid="ooxml:CT_PictureNonVisual_cNvPicPr"/> </resource> - <resource name="CT_Picture" resource="Shape"> + <resource name="CT_Picture" resource="Shape" tag="shape"> <element name="nvPicPr" tokenid="ooxml:CT_Picture_nvPicPr"/> <element name="blipFill" tokenid="ooxml:CT_Picture_blipFill"/> <element name="spPr" tokenid="ooxml:CT_Picture_spPr"/> </resource> - <resource name="pic" resource="Properties"> + <resource name="pic" resource="Properties" tag="shape"> <element name="pic" tokenid="ooxml:pic_pic"/> </resource> </namespace> @@ -11933,10 +11933,10 @@ </zeroOrMore> </define> </grammar> - <resource name="OLEObject" resource="Properties"> + <resource name="OLEObject" resource="Properties" tag="ole"> <element name="OLEObject" tokenid="ooxml:OLEObject_OLEObject"/> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_OLEObject" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_OLEObject" resource="Properties" tag="ole"> <element name="LinkType" tokenid="ooxml:CT_OLEObject_LinkType"/> <element name="LockedField" tokenid="ooxml:CT_OLEObject_LockedField"/> <element name="FieldCodes" tokenid="ooxml:CT_OLEObject_FieldCodes"/> @@ -12314,10 +12314,10 @@ </list> </define> </grammar> - <resource name="wrap" resource="Properties"> + <resource name="wrap" resource="Properties" tag="shape"> <element name="wrap" tokenid="ooxml:wrap_wrap"/> </resource> - <resource name="CT_Wrap" resource="Properties"> + <resource name="CT_Wrap" resource="Properties" tag="shape"> <attribute name="type" tokenid="ooxml:CT_Wrap_type"/> <attribute name="side" tokenid="ooxml:CT_Wrap_side"/> <attribute name="anchorx" tokenid="ooxml:CT_Wrap_anchorx"/> @@ -13984,6 +13984,11 @@ </choice> </list> </define> + <define name="ST_Percentage"> + <data type="int"> + <xs:documentation>Percentage</xs:documentation> + </data> + </define> <define name="CT_Zoom"> <optional> <attribute name="val"> @@ -21082,77 +21087,77 @@ </zeroOrMore> </define> </grammar> - <resource name="CT_Empty" resource="Stream"> + <resource name="CT_Empty" resource="Stream" tag="content"> <action name="end" tokenid="ooxml:EG_RunInnerContent_noBreakHyphen" action="noBreakHyphen"/> <action name="end" tokenid="ooxml:EG_RunInnerContent_softHyphen" action="softHyphen"/> <action name="end" tokenid="ooxml:EG_RunInnerContent_cr" action="cr"/> </resource> <resource name="ST_OnOff" resource="Boolean"/> - <resource name="CT_OnOff" resource="Value"> + <resource name="CT_OnOff" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_OnOff_val" action="setValue"/> <action name="start" action="setDefaultBooleanValue"/> </resource> <resource name="ST_LongHexNumber" resource="Hex"/> - <resource name="CT_LongHexNumber" resource="Value"> + <resource name="CT_LongHexNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_LongHexNumber_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> <resource name="ST_ShortHexNumber" resource="Hex"/> - <resource name="CT_ShortHexNumber" resource="Value"> + <resource name="CT_ShortHexNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_ShortHexNumber_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> <resource name="ST_UcharHexNumber" resource="Hex"/> - <resource name="CT_UcharHexNumber" resource="Value"> + <resource name="CT_UcharHexNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_UcharHexNumber_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> <resource name="ST_DecimalNumber" resource="Integer"/> - <resource name="CT_DecimalNumber" resource="Value"> + <resource name="CT_DecimalNumber" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_DecimalNumber_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_UnsignedDecimalNumber" resource="Integer" generated="yes"/> <resource name="ST_TwipsMeasure" resource="Integer"/> - <resource name="CT_TwipsMeasure" resource="Value"> + <resource name="CT_TwipsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_TwipsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_SignedTwipsMeasure" resource="Integer"/> - <resource name="CT_SignedTwipsMeasure" resource="Value"> + <resource name="CT_SignedTwipsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_SignedTwipsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_PixelsMeasure" resource="Integer" generated="yes"/> - <resource name="CT_PixelsMeasure" resource="Value"> + <resource name="CT_PixelsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_PixelsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_HpsMeasure" resource="Integer"/> - <resource name="CT_HpsMeasure" resource="Value"> + <resource name="CT_HpsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_HpsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_SignedHpsMeasure" resource="Integer"/> - <resource name="CT_SignedHpsMeasure" resource="Value"> + <resource name="CT_SignedHpsMeasure" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_SignedHpsMeasure_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_DateTime" resource="String" generated="yes"/> <resource name="ST_MacroName" resource="String" generated="yes"/> - <resource name="CT_MacroName" resource="Value" generated="yes"> + <resource name="CT_MacroName" resource="Value" generated="yes" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_MacroName_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> <resource name="ST_EighthPointMeasure" resource="Integer"/> <resource name="ST_PointMeasure" resource="Integer"/> <resource name="ST_String" resource="String"/> - <resource name="CT_String" resource="Value"> + <resource name="CT_String" resource="Value" tag="attribute" > <attribute name="val" tokenid="ooxml:CT_String_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> <resource name="ST_TextScale" resource="Integer"/> - <resource name="CT_TextScale" resource="Value"> + <resource name="CT_TextScale" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_TextScale_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> @@ -21175,7 +21180,7 @@ <value tokenid="16">lightGray</value> <value tokenid="0">none</value> </resource> - <resource name="CT_Highlight" resource="Value"> + <resource name="CT_Highlight" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Highlight_val" action="setValue"/> </resource> <resource name="ST_HexColorAuto" resource="List"> @@ -21183,7 +21188,7 @@ </resource> <resource name="ST_HexColorRGB" resource="Hex"/> <resource name="ST_HexColor" resource="Hex"/> - <resource name="CT_Color" resource="Properties"> + <resource name="CT_Color" resource="Properties" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Color_val"/> <attribute name="themeColor" tokenid="ooxml:CT_Color_themeColor"/> <attribute name="themeTint" tokenid="ooxml:CT_Color_themeTint"/> @@ -21191,12 +21196,12 @@ </resource> <resource name="ST_LangCode" resource="Hex" generated="yes"/> <resource name="ST_Lang" resource="String"/> - <resource name="CT_Lang" resource="Value"> + <resource name="CT_Lang" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Lang_val" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> <resource name="ST_Guid" resource="String"/> - <resource name="CT_Guid" resource="Value"> + <resource name="CT_Guid" resource="Value" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Guid_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21220,7 +21225,7 @@ <value tokenid="43">wavyDouble</value> <value tokenid="0">none</value> </resource> - <resource name="CT_Underline" resource="Properties"> + <resource name="CT_Underline" resource="Properties" tag="character"> <attribute name="val" tokenid="ooxml:CT_Underline_val" default="single"/> <attribute name="color" tokenid="ooxml:CT_Underline_color"/> <attribute name="themeColor" tokenid="ooxml:CT_Underline_themeColor"/> @@ -21236,7 +21241,7 @@ <value tokenid="5">antsRed</value> <value tokenid="6">shimmer</value> </resource> - <resource name="CT_TextEffect" resource="Value"> + <resource name="CT_TextEffect" resource="Value" tag="character"> <attribute name="val" tokenid="ooxml:CT_TextEffect_val" action="setValue"/> </resource> <resource name="ST_Border" resource="List"> @@ -21432,7 +21437,7 @@ <value tokenid="226">zigZag</value> <value tokenid="227">zigZagStitch</value> </resource> - <resource name="CT_Border" resource="Properties"> + <resource name="CT_Border" resource="Properties" tag="attribute"> <attribute name="val" tokenid="rtf:BRCTYPE"/> <attribute name="color" tokenid="ooxml:CT_Border_color"/> <attribute name="themeColor" tokenid="ooxml:CT_Border_themeColor"/> @@ -21483,7 +21488,7 @@ <value tokenid="13">pct90</value> <value tokenid="60">pct95</value> </resource> - <resource name="CT_Shd" resource="Properties"> + <resource name="CT_Shd" resource="Properties" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Shd_val"/> <attribute name="color" tokenid="ooxml:CT_Shd_color"/> <attribute name="themeColor" tokenid="ooxml:CT_Shd_themeColor"/> @@ -21494,16 +21499,16 @@ <attribute name="themeFillTint" tokenid="ooxml:CT_Shd_themeFillTint"/> <attribute name="themeFillShade" tokenid="ooxml:CT_Shd_themeFillShade"/> </resource> - <resource name="ST_VerticalAlignRun" resource="List" generated="yes"> + <resource name="ST_VerticalAlignRun" resource="List" generated="yes" tag="character"> <value name="baseline" tokenid="ooxml:Value_wordprocessingml_ST_VerticalAlignRun_baseline">baseline</value> <value name="superscript" tokenid="ooxml:Value_wordprocessingml_ST_VerticalAlignRun_superscript">superscript</value> <value name="subscript" tokenid="ooxml:Value_wordprocessingml_ST_VerticalAlignRun_subscript">subscript</value> </resource> - <resource name="CT_VerticalAlignRun" resource="Value" generated="yes"> + <resource name="CT_VerticalAlignRun" resource="Value" generated="yes" tag="character"> <attribute name="val" tokenid="ooxml:CT_VerticalAlignRun_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_FitText" resource="Properties"> + <resource name="CT_FitText" resource="Properties" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_FitText_val"/> <attribute name="id" tokenid="ooxml:CT_FitText_id"/> </resource> @@ -21514,10 +21519,10 @@ <value tokenid="3">circle</value> <value tokenid="4">underDot</value> </resource> - <resource name="CT_Em" resource="Value"> + <resource name="CT_Em" resource="Value" tag="character"> <attribute name="val" tokenid="ooxml:CT_Em_val" action="setValue"/> </resource> - <resource name="CT_Language" resource="Properties"> + <resource name="CT_Language" resource="Properties" tag="character"> <attribute name="val" tokenid="ooxml:CT_Language_val"/> <attribute name="eastAsia" tokenid="ooxml:CT_Language_eastAsia"/> <attribute name="bidi" tokenid="ooxml:CT_Language_bidi"/> @@ -21529,7 +21534,7 @@ <value tokenid="3">angle</value> <value tokenid="4">curly</value> </resource> - <resource name="CT_EastAsianLayout" resource="Properties"> + <resource name="CT_EastAsianLayout" resource="Properties" tag="character"> <attribute name="id" tokenid="ooxml:CT_EastAsianLayout_id"/> <attribute name="combine" tokenid="ooxml:CT_EastAsianLayout_combine"/> <attribute name="combineBrackets" tokenid="ooxml:CT_EastAsianLayout_combineBrackets"/> @@ -21579,7 +21584,7 @@ <value name="drop" tokenid="ooxml:Value_wordprocessingml_ST_DropCap_drop">drop</value> <value name="margin" tokenid="ooxml:Value_wordprocessingml_ST_DropCap_margin">margin</value> </resource> - <resource name="CT_FramePr" resource="Properties"> + <resource name="CT_FramePr" resource="Properties" tag="frame"> <kind name="paragraph"/> <attribute name="dropCap" tokenid="ooxml:CT_FramePr_dropCap"/> <attribute name="lines" tokenid="ooxml:CT_FramePr_lines"/> @@ -21614,7 +21619,7 @@ <value tokenid="4">heavy</value> <value tokenid="ooxml:Value_ST_TabTlc_middleDot">middleDot</value> </resource> - <resource name="CT_TabStop" resource="Properties"> + <resource name="CT_TabStop" resource="Properties" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_TabStop_val"/> <attribute name="leader" tokenid="ooxml:CT_TabStop_leader"/> <attribute name="pos" tokenid="ooxml:CT_TabStop_pos"/> @@ -21624,7 +21629,7 @@ <value name="exact" tokenid="ooxml:Value_wordprocessingml_ST_LineSpacingRule_exact">exact</value> <value name="atLeast" tokenid="ooxml:Value_wordprocessingml_ST_LineSpacingRule_atLeast">atLeast</value> </resource> - <resource name="CT_Spacing" resource="Properties"> + <resource name="CT_Spacing" resource="Properties" tag="paragraüh"> <attribute name="before" tokenid="ooxml:CT_Spacing_before"/> <attribute name="beforeLines" tokenid="ooxml:CT_Spacing_beforeLines"/> <attribute name="beforeAutospacing" tokenid="ooxml:CT_Spacing_beforeAutospacing"/> @@ -21634,7 +21639,7 @@ <attribute name="line" tokenid="ooxml:CT_Spacing_line"/> <attribute name="lineRule" tokenid="ooxml:CT_Spacing_lineRule"/> </resource> - <resource name="CT_Ind" resource="Properties"> + <resource name="CT_Ind" resource="Properties" tag="paragraph"> <attribute name="end" tokenid="ooxml:CT_Ind_end"/> <attribute name="endChars" tokenid="ooxml:CT_Ind_endChars"/> <attribute name="start" tokenid="ooxml:CT_Ind_start"/> @@ -21663,7 +21668,7 @@ <value tokenid="ooxml:Value_ST_Jc_lowKashida">lowKashida</value> <value tokenid="ooxml:Value_ST_Jc_thaiDistribute">thaiDistribute</value> </resource> - <resource name="CT_Jc" resource="Value"> + <resource name="CT_Jc" resource="Value" tag="character"> <attribute name="val" tokenid="ooxml:CT_Jc_val" action="setValue"/> </resource> <resource name="ST_View" resource="List" generated="yes"> @@ -21674,7 +21679,7 @@ <value name="normal" tokenid="ooxml:Value_wordprocessingml_ST_View_normal">normal</value> <value name="web" tokenid="ooxml:Value_wordprocessingml_ST_View_web">web</value> </resource> - <resource name="CT_View" resource="Properties"> + <resource name="CT_View" resource="Properties" tag="settings"> <attribute name="val" tokenid="ooxml:CT_View_val"/> </resource> <resource name="ST_Zoom" resource="List" generated="yes"> @@ -21683,11 +21688,11 @@ <value name="bestFit" tokenid="ooxml:Value_wordprocessingml_ST_Zoom_bestFit">bestFit</value> <value name="textFit" tokenid="ooxml:Value_wordprocessingml_ST_Zoom_textFit">textFit</value> </resource> - <resource name="CT_Zoom" resource="Properties"> + <resource name="CT_Zoom" resource="Properties" tag="settings"> <attribute name="val" tokenid="ooxml:CT_Zoom_val"/> <attribute name="percent" tokenid="ooxml:CT_Zoom_percent"/> </resource> - <resource name="CT_WritingStyle" resource="Properties"> + <resource name="CT_WritingStyle" resource="Properties" tag="settings"> <attribute name="lang" tokenid="ooxml:CT_WritingStyle_lang"/> <attribute name="vendorID" tokenid="ooxml:CT_WritingStyle_vendorID"/> <attribute name="dllVersion" tokenid="ooxml:CT_WritingStyle_dllVersion"/> @@ -21699,7 +21704,7 @@ <value name="clean" tokenid="ooxml:Value_wordprocessingml_ST_Proof_clean">clean</value> <value name="dirty" tokenid="ooxml:Value_wordprocessingml_ST_Proof_dirty">dirty</value> </resource> - <resource name="CT_Proof" resource="Properties"> + <resource name="CT_Proof" resource="Properties" tag="redline"> <attribute name="spelling" tokenid="ooxml:CT_Proof_spelling"/> <attribute name="grammar" tokenid="ooxml:CT_Proof_grammar"/> </resource> @@ -21708,7 +21713,7 @@ <value name="letter" tokenid="ooxml:Value_wordprocessingml_ST_DocType_letter">letter</value> <value name="eMail" tokenid="ooxml:Value_wordprocessingml_ST_DocType_eMail">eMail</value> </resource> - <resource name="CT_DocType" resource="Properties"> + <resource name="CT_DocType" resource="Properties" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocType_val"/> </resource> <resource name="ST_DocProtect" resource="List" generated="yes"> @@ -21742,7 +21747,7 @@ <attribute name="hash" tokenid="ooxml:AG_Password_hash"/> <attribute name="salt" tokenid="ooxml:AG_Password_salt"/> </resource> - <resource name="CT_DocProtect" resource="Properties"> + <resource name="CT_DocProtect" resource="Properties" tag="document"> <attribute name="edit" tokenid="ooxml:CT_DocProtect_edit"/> <attribute name="formatting" tokenid="ooxml:CT_DocProtect_formatting"/> <attribute name="enforcement" tokenid="ooxml:CT_DocProtect_enforcement"/> @@ -21755,7 +21760,7 @@ <value name="email" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDocType_email">email</value> <value name="fax" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDocType_fax">fax</value> </resource> - <resource name="CT_MailMergeDocType" resource="Value" generated="yes"> + <resource name="CT_MailMergeDocType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeDocType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21767,7 +21772,7 @@ <value name="odbc" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDataType_odbc">odbc</value> <value name="native" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDataType_native">native</value> </resource> - <resource name="CT_MailMergeDataType" resource="Value" generated="yes"> + <resource name="CT_MailMergeDataType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeDataType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21777,7 +21782,7 @@ <value name="email" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDest_email">email</value> <value name="fax" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeDest_fax">fax</value> </resource> - <resource name="CT_MailMergeDest" resource="Value" generated="yes"> + <resource name="CT_MailMergeDest" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeDest_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -21785,18 +21790,18 @@ <value name="null" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeOdsoFMDFieldType_null">null</value> <value name="dbColumn" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeOdsoFMDFieldType_dbColumn">dbColumn</value> </resource> - <resource name="CT_MailMergeOdsoFMDFieldType" resource="Value" generated="yes"> + <resource name="CT_MailMergeOdsoFMDFieldType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeOdsoFMDFieldType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_TrackChangesView" resource="Properties"> + <resource name="CT_TrackChangesView" resource="Properties" tag="redline"> <attribute name="markup" tokenid="ooxml:CT_TrackChangesView_markup"/> <attribute name="comments" tokenid="ooxml:CT_TrackChangesView_comments"/> <attribute name="insDel" tokenid="ooxml:CT_TrackChangesView_insDel"/> <attribute name="formatting" tokenid="ooxml:CT_TrackChangesView_formatting"/> <attribute name="inkAnnotations" tokenid="ooxml:CT_TrackChangesView_inkAnnotations"/> </resource> - <resource name="CT_Kinsoku" resource="Properties"> + <resource name="CT_Kinsoku" resource="Properties" tag="character"> <attribute name="lang" tokenid="ooxml:CT_Kinsoku_lang"/> <attribute name="val" tokenid="ooxml:CT_Kinsoku_val"/> </resource> @@ -21808,7 +21813,7 @@ <value tokenid="5">tbRlV</value> <value tokenid="ooxml:Value_ST_TextDirection_tbLrV">tbLrV</value> </resource> - <resource name="CT_TextDirection" resource="Value"> + <resource name="CT_TextDirection" resource="Value" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_TextDirection_val" action="setValue"/> </resource> <resource name="ST_TextAlignment" resource="List" generated="yes"> @@ -21818,7 +21823,7 @@ <value name="bottom" tokenid="ooxml:Value_wordprocessingml_ST_TextAlignment_bottom">bottom</value> <value name="auto" tokenid="ooxml:Value_wordprocessingml_ST_TextAlignment_auto">auto</value> </resource> - <resource name="CT_TextAlignment" resource="Value" generated="yes"> + <resource name="CT_TextAlignment" resource="Value" generated="yes" tag="paragraph"> <attribute name="val" tokenid="ooxml:CT_TextAlignment_val" action="setValue"/> </resource> <resource name="ST_DisplacedByCustomXml" resource="List" generated="yes"> @@ -21829,80 +21834,80 @@ <value name="cont" tokenid="ooxml:Value_wordprocessingml_ST_AnnotationVMerge_cont">cont</value> <value name="rest" tokenid="ooxml:Value_wordprocessingml_ST_AnnotationVMerge_rest">rest</value> </resource> - <resource name="CT_Markup" resource="Properties"> + <resource name="CT_Markup" resource="Properties" tag="redline"> <attribute name="id" tokenid="ooxml:CT_Markup_id"/> </resource> - <resource name="CT_TrackChange" resource="Properties"> + <resource name="CT_TrackChange" resource="Properties" tag="redline"> <attribute name="author" tokenid="ooxml:CT_TrackChange_author"/> <attribute name="date" tokenid="ooxml:CT_TrackChange_date"/> </resource> - <resource name="CT_CellMergeTrackChange" resource="Properties"> + <resource name="CT_CellMergeTrackChange" resource="Properties" tag="redline"> <attribute name="vMerge" tokenid="ooxml:CT_CellMergeTrackChange_vMerge"/> <attribute name="vMergeOrig" tokenid="ooxml:CT_CellMergeTrackChange_vMergeOrig"/> </resource> - <resource name="CT_TrackChangeRange" resource="Properties"> + <resource name="CT_TrackChangeRange" resource="Properties" tag="redline"> <attribute name="displacedByCustomXml" tokenid="ooxml:CT_TrackChangeRange_displacedByCustomXml"/> </resource> - <resource name="CT_MarkupRange" resource="Properties"> + <resource name="CT_MarkupRange" resource="Properties" tag="redline"> <attribute name="displacedByCustomXml" tokenid="ooxml:CT_MarkupRange_displacedByCustomXml"/> </resource> - <resource name="CT_MarkupRangeBookmark" resource="Properties"> + <resource name="CT_MarkupRangeBookmark" resource="Properties" tag="redline"> <attribute name="id" tokenid="rtf:IBKL"/> </resource> - <resource name="CT_BookmarkRange" resource="Properties"> + <resource name="CT_BookmarkRange" resource="Properties" tag="reference"> <type name="Bookmark"/> <attribute name="colFirst" tokenid="ooxml:CT_BookmarkRange_colFirst"/> <attribute name="colLast" tokenid="ooxml:CT_BookmarkRange_colLast"/> </resource> - <resource name="CT_Bookmark" resource="Properties"> + <resource name="CT_Bookmark" resource="Properties" tag="reference"> <type name="Bookmark"/> <attribute name="name" tokenid="rtf:BOOKMARKNAME"/> </resource> - <resource name="CT_MoveBookmark" resource="Properties"> + <resource name="CT_MoveBookmark" resource="Properties" tag="reference"> <attribute name="author" tokenid="ooxml:CT_MoveBookmark_author"/> <attribute name="date" tokenid="ooxml:CT_MoveBookmark_date"/> </resource> - <resource name="CT_Comment" resource="XNote"> + <resource name="CT_Comment" resource="XNote" tag="content"> <attribute name="id" action="checkId"/> <attribute name="initials" tokenid="ooxml:CT_Comment_initials"/> </resource> - <resource name="CT_TrackChangeNumbering" resource="Properties"> + <resource name="CT_TrackChangeNumbering" resource="Properties" tag="numbering"> <attribute name="original" tokenid="ooxml:CT_TrackChangeNumbering_original"/> </resource> - <resource name="CT_TblPrExChange" resource="Properties"> + <resource name="CT_TblPrExChange" resource="Properties" tag="table"> <element name="tblPrEx" tokenid="ooxml:CT_TblPrExChange_tblPrEx"/> </resource> - <resource name="CT_TcPrChange" resource="Properties"> + <resource name="CT_TcPrChange" resource="Properties" tag="table"> <element name="tcPr" tokenid="ooxml:CT_TcPrChange_tcPr"/> </resource> - <resource name="CT_TrPrChange" resource="Properties"> + <resource name="CT_TrPrChange" resource="Properties" tag="table"> <element name="trPr" tokenid="ooxml:CT_TrPrChange_trPr"/> </resource> - <resource name="CT_TblGridChange" resource="Properties"> + <resource name="CT_TblGridChange" resource="Properties" tag="table"> <element name="tblGrid" tokenid="ooxml:CT_TblGridChange_tblGrid"/> </resource> - <resource name="CT_TblPrChange" resource="Properties"> + <resource name="CT_TblPrChange" resource="Properties" tag="table"> <element name="tblPr" tokenid="ooxml:CT_TblPrChange_tblPr"/> </resource> - <resource name="CT_SectPrChange" resource="Properties"> + <resource name="CT_SectPrChange" resource="Properties" tag="section"> <element name="sectPr" tokenid="ooxml:CT_SectPrChange_sectPr"/> </resource> - <resource name="CT_PPrChange" resource="Properties"> + <resource name="CT_PPrChange" resource="Properties" tag="paragraph"> <element name="pPr" tokenid="ooxml:CT_PPrChange_pPr"/> </resource> - <resource name="CT_RPrChange" resource="Properties"> + <resource name="CT_RPrChange" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_RPrChange_rPr"/> </resource> - <resource name="CT_ParaRPrChange" resource="Properties"> + <resource name="CT_ParaRPrChange" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_ParaRPrChange_rPr"/> </resource> - <resource name="CT_RunTrackChange" resource="Stream"> + <resource name="CT_RunTrackChange" resource="Stream" tag="redlines"> <action name="start" action="tokenproperty"/> <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:trackchange"/> <action name="start" action="clearProps"/> <action name="end" action="mark" sendtokenid="ooxml:endtrackchange"/> </resource> - <resource name="EG_RangeMarkupElements" resource="Properties"> + <resource name="EG_RangeMarkupElements" resource="Properties" tag="redlines"> <element name="bookmarkStart" tokenid="ooxml:EG_RangeMarkupElements_bookmarkStart"/> <element name="bookmarkEnd" tokenid="ooxml:EG_RangeMarkupElements_bookmarkEnd"/> <element name="moveFromRangeStart" tokenid="ooxml:EG_RangeMarkupElements_moveFromRangeStart"/> @@ -21920,14 +21925,14 @@ <element name="customXmlMoveToRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart"/> <element name="customXmlMoveToRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd"/> </resource> - <resource name="CT_NumPr" resource="Properties"> + <resource name="CT_NumPr" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="ilvl" tokenid="sprm:PIlvl"/> <element name="numId" tokenid="sprm:PIlfo"/> <element name="numberingChange" tokenid="ooxml:CT_NumPr_numberingChange"/> <element name="ins" tokenid="ooxml:CT_NumPr_ins"/> </resource> - <resource name="CT_PBdr" resource="Properties"> + <resource name="CT_PBdr" resource="Properties" tag="paragraph"> <kind name="paragraph"/> <element name="top" tokenid="sprm:PBrcTop"/> <element name="left" tokenid="sprm:PBrcLeft"/> @@ -21936,7 +21941,7 @@ <element name="between" tokenid="sprm:PBrcBetween"/> <element name="bar" tokenid="sprm:PBrcBar"/> </resource> - <resource name="CT_Tabs" resource="Properties"> + <resource name="CT_Tabs" resource="Properties" tag="paragraph"> <element name="tab" tokenid="ooxml:CT_Tabs_tab"/> </resource> <resource name="ST_TextboxTightWrap" resource="List" generated="yes"> @@ -21946,11 +21951,11 @@ <value name="firstLineOnly" tokenid="ooxml:Value_wordprocessingml_ST_TextboxTightWrap_firstLineOnly">firstLineOnly</value> <value name="lastLineOnly" tokenid="ooxml:Value_wordprocessingml_ST_TextboxTightWrap_lastLineOnly">lastLineOnly</value> </resource> - <resource name="CT_TextboxTightWrap" resource="Value" generated="yes"> + <resource name="CT_TextboxTightWrap" resource="Value" generated="yes" tag="textbox"> <attribute name="val" tokenid="ooxml:CT_TextboxTightWrap_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_PPrBase" resource="Properties"> + <resource name="CT_PPrBase" resource="Properties" tag="paragraph"> <kind name="paragraph"/> <element name="pStyle" tokenid="ooxml:CT_PPrBase_pStyle"/> <element name="keepNext" tokenid="sprm:PFKeepFollow"/> @@ -21986,12 +21991,12 @@ <element name="divId" tokenid="ooxml:CT_PPrBase_divId"/> <element name="cnfStyle" tokenid="ooxml:CT_PPrBase_cnfStyle"/> </resource> - <resource name="CT_PPr" resource="Properties"> + <resource name="CT_PPr" resource="Properties" tag="paragraph"> <element name="rPr" tokenid="ooxml:CT_PPr_rPr"/> <element name="sectPr" tokenid="ooxml:CT_PPr_sectPr"/> <element name="pPrChange" tokenid="ooxml:CT_PPr_pPrChange"/> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Control" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Control" resource="Properties" tag="control"> <attribute name="name" tokenid="ooxml:CT_Control_name"/> <attribute name="shapeid" tokenid="ooxml:CT_Control_shapeid"/> <attribute name="r:id" tokenid="ooxml:CT_Control_r_id"/> @@ -22005,24 +22010,24 @@ <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Rel" resource="Properties"> <attribute name="r:id" tokenid="ooxml:CT_Rel_id"/> </resource> - <resource name="CT_PictureBase" resource="Properties"/> - <resource name="CT_Object" resource="Shape"> + <resource name="CT_PictureBase" resource="Properties" tag="shape"/> + <resource name="CT_Object" resource="Shape" tag="shape"> <element name="control" tokenid="ooxml:CT_Object_control"/> <attribute name="dxaOrig" tokenid="ooxml:CT_Object_dxaOrig"/> <attribute name="dyaOrig" tokenid="ooxml:CT_Object_dyaOrig"/> <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:object"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Picture" resource="Shape"> + <resource name="CT_Picture" resource="Shape" tag="shape"> <element name="movie" tokenid="ooxml:CT_Picture_movie"/> <element name="control" tokenid="ooxml:CT_Picture_control"/> <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:object"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Drawing" resource="Properties"> + <resource name="CT_Drawing" resource="Properties" tag="shape"> <action name="end" action="handlePicture"/> </resource> - <resource name="CT_SimpleField" resource="Stream"> + <resource name="CT_SimpleField" resource="Stream" tag="field"> <element name="fldData" tokenid="ooxml:CT_SimpleField_fldData"/> <attribute name="instr" tokenid="ooxml:CT_SimpleField_instr"/> <attribute name="fldLock" tokenid="ooxml:CT_SimpleField_fldLock"/> @@ -22054,15 +22059,15 @@ <value name="currentDate" tokenid="ooxml:Value_wordprocessingml_ST_FFTextType_currentDate">currentDate</value> <value name="calculated" tokenid="ooxml:Value_wordprocessingml_ST_FFTextType_calculated">calculated</value> </resource> - <resource name="CT_FFTextType" resource="Value" generated="yes"> + <resource name="CT_FFTextType" resource="Value" generated="yes" tag="field"> <attribute name="val" tokenid="ooxml:CT_FFTextType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_FFName" resource="Value" generated="yes"> + <resource name="CT_FFName" resource="Value" generated="yes" tag="field"> <attribute name="val" tokenid="ooxml:CT_FFName_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_FldChar" resource="Stream"> + <resource name="CT_FldChar" resource="Stream" tag="field"> <element name="fldData" tokenid="ooxml:CT_FldChar_fldData"/> <element name="ffData" tokenid="ooxml:CT_FldChar_ffData"/> <element name="numberingChange" tokenid="ooxml:CT_FldChar_numberingChange"/> @@ -22079,7 +22084,7 @@ <cond tokenid="ooxml:CT_FldChar_fldCharType" value="ooxml:Value_ST_FldCharType_end"/> </action> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Hyperlink" resource="Stream"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Hyperlink" resource="Stream" tag="link"> <attribute name="tgtFrame" tokenid="ooxml:CT_Hyperlink_tgtFrame"/> <attribute name="tooltip" tokenid="ooxml:CT_Hyperlink_tooltip"/> <attribute name="docLocation" tokenid="ooxml:CT_Hyperlink_docLocation"/> @@ -22091,7 +22096,7 @@ <action name="start" action="fieldsep"/> <action name="end" action="fieldend"/> </resource> - <resource name="CT_FFData" resource="Properties"> + <resource name="CT_FFData" resource="Properties" tag="field"> <element name="name" tokenid="ooxml:CT_FFData_name"/> <element name="enabled" tokenid="ooxml:CT_FFData_enabled"/> <element name="calcOnExit" tokenid="ooxml:CT_FFData_calcOnExit"/> @@ -22105,39 +22110,39 @@ <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_FFHelpText" resource="Properties"> + <resource name="CT_FFHelpText" resource="Properties" tag="field"> <attribute name="type" tokenid="ooxml:CT_FFHelpText_type"/> <attribute name="val" tokenid="ooxml:CT_FFHelpText_val"/> </resource> - <resource name="CT_FFStatusText" resource="Properties"> + <resource name="CT_FFStatusText" resource="Properties" tag="field"> <attribute name="type" tokenid="ooxml:CT_FFStatusText_type"/> <attribute name="val" tokenid="ooxml:CT_FFStatusText_val"/> </resource> - <resource name="CT_FFCheckBox" resource="Properties"> + <resource name="CT_FFCheckBox" resource="Properties" tag="field"> <element name="size" tokenid="ooxml:CT_FFCheckBox_size"/> <element name="sizeAuto" tokenid="ooxml:CT_FFCheckBox_sizeAuto"/> <element name="default" tokenid="ooxml:CT_FFCheckBox_default"/> <element name="checked" tokenid="ooxml:CT_FFCheckBox_checked"/> </resource> - <resource name="CT_FFDDList" resource="Properties"> + <resource name="CT_FFDDList" resource="Properties" tag="field"> <element name="result" tokenid="ooxml:CT_FFDDList_result"/> <element name="default" tokenid="ooxml:CT_FFDDList_default"/> <element name="listEntry" tokenid="ooxml:CT_FFDDList_listEntry"/> </resource> - <resource name="CT_FFTextInput" resource="Properties"> + <resource name="CT_FFTextInput" resource="Properties" tag="field"> <element name="type" tokenid="ooxml:CT_FFTextInput_type"/> <element name="default" tokenid="ooxml:CT_FFTextInput_default"/> <element name="maxLength" tokenid="ooxml:CT_FFTextInput_maxLength"/> <element name="format" tokenid="ooxml:CT_FFTextInput_format"/> </resource> - <resource name="ST_SectionMark" resource="List"> + <resource name="ST_SectionMark" resource="List" tag="section"> <value tokenid="0">continuous</value> <value tokenid="1">nextColumn</value> <value tokenid="2">nextPage</value> <value tokenid="3">evenPage</value> <value tokenid="4">oddPage</value> </resource> - <resource name="CT_SectType" resource="Value"> + <resource name="CT_SectType" resource="Value" tag="section"> <attribute name="val" tokenid="ooxml:CT_SectType_val" action="setValue"/> </resource> <resource name="ST_NumberFormat" resource="List"> @@ -22206,13 +22211,13 @@ <value tokenid="0">portrait</value> <value tokenid="1">landscape</value> </resource> - <resource name="CT_PageSz" resource="Properties"> + <resource name="CT_PageSz" resource="Properties" tag="page"> <attribute name="w" tokenid="ooxml:CT_PageSz_w"/> <attribute name="h" tokenid="ooxml:CT_PageSz_h"/> <attribute name="orient" tokenid="ooxml:CT_PageSz_orient"/> <attribute name="code" tokenid="ooxml:CT_PageSz_code"/> </resource> - <resource name="CT_PageMar" resource="Properties"> + <resource name="CT_PageMar" resource="Properties" tag="page"> <attribute name="top" tokenid="ooxml:CT_PageMar_top"/> <attribute name="right" tokenid="ooxml:CT_PageMar_right"/> <attribute name="bottom" tokenid="ooxml:CT_PageMar_bottom"/> @@ -22234,7 +22239,7 @@ <value name="page" tokenid="ooxml:Value_wordprocessingml_ST_PageBorderOffset_page">page</value> <value name="text" tokenid="ooxml:Value_wordprocessingml_ST_PageBorderOffset_text">text</value> </resource> - <resource name="CT_PageBorders" resource="Properties"> + <resource name="CT_PageBorders" resource="Properties" tag="page"> <element name="top" tokenid="ooxml:CT_PageBorders_top"/> <element name="left" tokenid="ooxml:CT_PageBorders_left"/> <element name="bottom" tokenid="ooxml:CT_PageBorders_bottom"/> @@ -22255,23 +22260,23 @@ <value tokenid="1">newSection</value> <value tokenid="2">continuous</value> </resource> - <resource name="CT_LineNumber" resource="Properties"> + <resource name="CT_LineNumber" resource="Properties" tag="section"> <attribute name="countBy" tokenid="ooxml:CT_LineNumber_countBy"/> <attribute name="start" tokenid="ooxml:CT_LineNumber_start"/> <attribute name="distance" tokenid="ooxml:CT_LineNumber_distance"/> <attribute name="restart" tokenid="ooxml:CT_LineNumber_restart"/> </resource> - <resource name="CT_PageNumber" resource="Properties"> + <resource name="CT_PageNumber" resource="Properties" tag="page"> <attribute name="fmt" tokenid="ooxml:CT_PageNumber_fmt"/> <attribute name="start" tokenid="ooxml:CT_PageNumber_start"/> <attribute name="chapStyle" tokenid="ooxml:CT_PageNumber_chapStyle"/> <attribute name="chapSep" tokenid="ooxml:CT_PageNumber_chapSep"/> </resource> - <resource name="CT_Column" resource="Properties"> + <resource name="CT_Column" resource="Properties" tag="page"> <attribute name="space" tokenid="ooxml:CT_Column_space"/> <attribute name="w" tokenid="ooxml:CT_Column_w"/> </resource> - <resource name="CT_Columns" resource="Properties"> + <resource name="CT_Columns" resource="Properties" tag="page"> <attribute name="equalWidth" tokenid="ooxml:CT_Columns_equalWidth"/> <attribute name="space" tokenid="ooxml:CT_Columns_space"/> <attribute name="num" tokenid="ooxml:CT_Columns_num"/> @@ -22284,7 +22289,7 @@ <value tokenid="2">both</value> <value tokenid="3">bottom</value> </resource> - <resource name="CT_VerticalJc" resource="Value"> + <resource name="CT_VerticalJc" resource="Value" tag="page"> <attribute name="val" tokenid="ooxml:CT_VerticalJc_val" action="setValue"/> </resource> <resource name="ST_DocGrid" resource="List" generated="yes"> @@ -22293,7 +22298,7 @@ <value name="linesAndChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_linesAndChars">linesAndChars</value> <value name="snapToChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_snapToChars">snapToChars</value> </resource> - <resource name="CT_DocGrid" resource="Properties"> + <resource name="CT_DocGrid" resource="Properties" tag="document"> <attribute name="type" tokenid="ooxml:CT_DocGrid_type"/> <attribute name="linePitch" tokenid="ooxml:CT_DocGrid_linePitch"/> <attribute name="charSpace" tokenid="ooxml:CT_DocGrid_charSpace"/> @@ -22309,17 +22314,17 @@ <value name="continuationSeparator" tokenid="ooxml:Value_wordprocessingml_ST_FtnEdn_continuationSeparator">continuationSeparator</value> <value name="continuationNotice" tokenid="ooxml:Value_wordprocessingml_ST_FtnEdn_continuationNotice">continuationNotice</value> </resource> - <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_HdrFtrRef" resource="Properties"> + <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_HdrFtrRef" resource="Properties" tag="header"> <attribute name="type" tokenid="ooxml:CT_HdrFtrRef_type"/> <attribute name="r:id" tokenid="ooxml:CT_HdrFtrRef_id"/> <action name="end" action="handleHdrFtr"/> </resource> - <resource name="EG_HdrFtrReferences" resource="Properties"> + <resource name="EG_HdrFtrReferences" resource="Properties" tag="header"> <element name="headerReference" tokenid="ooxml:EG_HdrFtrReferences_headerReference"/> <element name="footerReference" tokenid="ooxml:EG_HdrFtrReferences_footerReference"/> </resource> - <resource name="CT_HdrFtr" resource="Stream"/> - <resource name="EG_SectPrContents" resource="Properties"> + <resource name="CT_HdrFtr" resource="Stream" tag="header"/> + <resource name="EG_SectPrContents" resource="Properties" tag="section"> <element name="bidi" tokenid="ooxml:EG_SectPrContents_bidi"/> <element name="cols" tokenid="ooxml:EG_SectPrContents_cols"/> <element name="docGrid" tokenid="ooxml:EG_SectPrContents_docGrid"/> @@ -22340,8 +22345,8 @@ <element name="type" tokenid="sprm:SBkc"/> <element name="vAlign" tokenid="ooxml:EG_SectPrContents_vAlign"/> </resource> - <resource name="CT_SectPrBase" resource="Properties"/> - <resource name="CT_SectPr" resource="Properties"> + <resource name="CT_SectPrBase" resource="Properties" tag="section"/> + <resource name="CT_SectPr" resource="Properties" tag="section"> <element name="sectPrChange" tokenid="ooxml:CT_SectPr_sectPrChange"/> <action name="start" action="setLastParagraphInSection"/> </resource> @@ -22356,7 +22361,7 @@ <value tokenid="ooxml:Value_ST_BrClear_right">right</value> <value tokenid="ooxml:Value_ST_BrClear_all">all</value> </resource> - <resource name="CT_Br" resource="Properties"> + <resource name="CT_Br" resource="Properties" tag="content"> <attribute name="type" tokenid="ooxml:CT_Br_type"/> <attribute name="clear" tokenid="ooxml:CT_Br_clear"/> <action name="end" action="handleBreak"/> @@ -22377,13 +22382,13 @@ <value tokenid="ooxml:Value_ST_PTabLeader_underscore">underscore</value> <value tokenid="ooxml:Value_ST_PTabLeader_middleDot">middleDot</value> </resource> - <resource name="CT_PTab" resource="Stream"> + <resource name="CT_PTab" resource="Stream" tag="paragraph"> <attribute name="alignment" tokenid="ooxml:CT_PTab_alignment"/> <attribute name="relativeTo" tokenid="ooxml:CT_PTab_relativeTo"/> <attribute name="leader" tokenid="ooxml:CT_PTab_leader"/> <action name="end" action="tab"/> </resource> - <resource name="CT_Sym" resource="Properties"> + <resource name="CT_Sym" resource="Properties" tag="character"> <attribute name="font" tokenid="ooxml:CT_Sym_font"/> <attribute name="char" tokenid="ooxml:CT_Sym_char"/> </resource> @@ -22402,29 +22407,29 @@ <value name="owners" tokenid="ooxml:Value_wordprocessingml_ST_EdGrp_owners">owners</value> <value name="current" tokenid="ooxml:Value_wordprocessingml_ST_EdGrp_current">current</value> </resource> - <resource name="CT_Text" resource="Stream"> + <resource name="CT_Text" resource="Stream" tag="content"> <attribute name="xml:space" tokenid="ooxml:CT_Text_space"/> <action name="characters" action="text"/> </resource> - <resource name="CT_FtnEdnRefChar" resource="Stream"> + <resource name="CT_FtnEdnRefChar" resource="Stream" tag="reference"> <action name="end" action="ftnednref"/> </resource> - <resource name="CT_FtnEdnSep" resource="Stream"> + <resource name="CT_FtnEdnSep" resource="Stream" tag="reference"> <action name="end" action="ftnednsep"/> </resource> - <resource name="CT_FtnEdnCont" resource="Stream"> + <resource name="CT_FtnEdnCont" resource="Stream" tag="reference"> <action name="end" action="ftnedncont"/> </resource> - <resource name="CT_PgNum" resource="Stream"> + <resource name="CT_PgNum" resource="Stream" tag="reference"> <action name="end" action="pgNum"/> </resource> - <resource name="CT_Cr" resource="Stream"> + <resource name="CT_Cr" resource="Stream" tag="content"> <action name="end" action="endOfParagraph"/> </resource> - <resource name="CT_Tab" resource="Stream"> + <resource name="CT_Tab" resource="Stream" tag="content"> <action name="end" action="tab"/> </resource> - <resource name="EG_RunInnerContent" resource="Stream"> + <resource name="EG_RunInnerContent" resource="Stream" tag="content"> <element name="br" tokenid="ooxml:EG_RunInnerContent_br"/> <element name="t" tokenid="ooxml:EG_RunInnerContent_t"/> <element name="delText" tokenid="ooxml:EG_RunInnerContent_delText"/> @@ -22458,7 +22463,7 @@ <element name="ptab" tokenid="ooxml:EG_RunInnerContent_ptab"/> <element name="lastRenderedPageBreak" tokenid="ooxml:EG_RunInnerContent_lastRenderedPageBreak"/> </resource> - <resource name="CT_R" resource="Stream"> + <resource name="CT_R" resource="Stream" tag="content"> <action name="start" action="startCharacterGroup"/> </resource> <resource name="ST_Hint" resource="List"> @@ -22476,7 +22481,7 @@ <value tokenid="ooxml:Value_ST_Theme_minorAscii">minorAscii</value> <value tokenid="ooxml:Value_ST_Theme_minorHAnsi">minorHAnsi</value> </resource> - <resource name="CT_Fonts" resource="Properties"> + <resource name="CT_Fonts" resource="Properties" tag="font"> <attribute name="hint" tokenid="ooxml:CT_Fonts_hint"/> <attribute name="ascii" tokenid="ooxml:CT_Fonts_ascii"/> <attribute name="hAnsi" tokenid="ooxml:CT_Fonts_hAnsi"/> @@ -22487,7 +22492,7 @@ <attribute name="eastAsiaTheme" tokenid="ooxml:CT_Fonts_eastAsiaTheme"/> <attribute name="cstheme" tokenid="ooxml:CT_Fonts_cstheme"/> </resource> - <resource name="EG_RPrBase" resource="Properties"> + <resource name="EG_RPrBase" resource="Properties" tag="paragraph"> <kind name="paragraph"/> <element name="rStyle" tokenid="ooxml:EG_RPrBase_rStyle"/> <element name="rFonts" tokenid="ooxml:EG_RPrBase_rFonts"/> @@ -22529,19 +22534,19 @@ <element name="specVanish" tokenid="0x818"/> <element name="oMath" tokenid="ooxml:EG_RPrBase_oMath"/> </resource> - <resource name="EG_RPrContent" resource="Properties"> + <resource name="EG_RPrContent" resource="Properties" tag="character"> <element name="rPrChange" tokenid="ooxml:EG_RPrContent_rPrChange"/> </resource> - <resource name="CT_RPr" resource="Properties"> + <resource name="CT_RPr" resource="Properties" tag="character"> </resource> - <resource name="CT_RPrOriginal" resource="Properties"/> - <resource name="CT_ParaRPrOriginal" resource="Properties"/> - <resource name="CT_ParaRPr" resource="Properties"> + <resource name="CT_RPrOriginal" resource="Properties" tag="character"/> + <resource name="CT_ParaRPrOriginal" resource="Properties" tag="paragraph"/> + <resource name="CT_ParaRPr" resource="Properties" tag="redline"> <element name="ins" tokenid="ooxml:CT_ParaRPr_ins"/> <element name="del" tokenid="ooxml:CT_ParaRPr_del"/> <element name="rPrChange" tokenid="ooxml:CT_ParaRPr_rPrChange"/> </resource> - <resource name="CT_ParaTrackChange" resource="Properties"> + <resource name="CT_ParaTrackChange" resource="Properties" tag="redline"> <action name="start" action="tokenproperty"/> <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:paratrackchange"/> <action name="start" action="clearProps"/> @@ -22554,7 +22559,7 @@ <value name="right" tokenid="ooxml:Value_wordprocessingml_ST_RubyAlign_right">right</value> <value name="rightVertical" tokenid="ooxml:Value_wordprocessingml_ST_RubyAlign_rightVertical">rightVertical</value> </resource> - <resource name="CT_RubyAlign" resource="Value" generated="yes"> + <resource name="CT_RubyAlign" resource="Value" generated="yes" tag="character"> <attribute name="val" tokenid="ooxml:CT_RubyAlign_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -22564,7 +22569,7 @@ <value name="unlocked" tokenid="ooxml:Value_wordprocessingml_ST_Lock_unlocked">unlocked</value> <value name="sdtContentLocked" tokenid="ooxml:Value_wordprocessingml_ST_Lock_sdtContentLocked">sdtContentLocked</value> </resource> - <resource name="CT_Lock" resource="Value" generated="yes"> + <resource name="CT_Lock" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_Lock_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -22573,7 +22578,7 @@ <value name="date" tokenid="ooxml:Value_wordprocessingml_ST_SdtDateMappingType_date">date</value> <value name="dateTime" tokenid="ooxml:Value_wordprocessingml_ST_SdtDateMappingType_dateTime">dateTime</value> </resource> - <resource name="CT_SdtDateMappingType" resource="Value" generated="yes"> + <resource name="CT_SdtDateMappingType" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_SdtDateMappingType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -22589,27 +22594,27 @@ <value name="gregorianXlitEnglish" tokenid="ooxml:Value_wordprocessingml_ST_CalendarType_gregorianXlitEnglish">gregorianXlitEnglish</value> <value name="gregorianXlitFrench" tokenid="ooxml:Value_wordprocessingml_ST_CalendarType_gregorianXlitFrench">gregorianXlitFrench</value> </resource> - <resource name="CT_CalendarType" resource="Value" generated="yes"> + <resource name="CT_CalendarType" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_CalendarType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_SdtContentRun" resource="Properties"/> - <resource name="CT_Attr" resource="Properties"> + <resource name="CT_SdtContentRun" resource="Properties" tag="content"/> + <resource name="CT_Attr" resource="Properties" tag="content"> <attribute name="uri" tokenid="ooxml:CT_Attr_uri"/> <attribute name="name" tokenid="ooxml:CT_Attr_name"/> <attribute name="val" tokenid="ooxml:CT_Attr_val"/> </resource> - <resource name="CT_CustomXmlRun" resource="Properties"> + <resource name="CT_CustomXmlRun" resource="Properties" tag="content"> <element name="customXmlPr" tokenid="ooxml:CT_CustomXmlRun_customXmlPr"/> <attribute name="uri" tokenid="ooxml:CT_CustomXmlRun_uri"/> <attribute name="element" tokenid="ooxml:CT_CustomXmlRun_element"/> </resource> - <resource name="CT_SmartTagRun" resource="Properties"> + <resource name="CT_SmartTagRun" resource="Properties" tag="content"> <element name="smartTagPr" tokenid="ooxml:CT_SmartTagRun_smartTagPr"/> <attribute name="uri" tokenid="ooxml:CT_SmartTagRun_uri"/> <attribute name="element" tokenid="ooxml:CT_SmartTagRun_element"/> </resource> - <resource name="CT_SdtRun" resource="Properties"> + <resource name="EG_PContent" resource="Properties" tag="content"> <element name="sdtPr" tokenid="ooxml:CT_SdtPr"/> <element name="sdtEndPr" tokenid="ooxml:CT_SdtEndPr"/> <element name="sdtContent" tokenid="ooxml:CT_SdtContentRun"/> @@ -22620,12 +22625,12 @@ <element name="sdtContent" tokenid="ooxml:CT_SdtContentBlock"/> </resource> <resource name="CT_SdtContentBlock" resource="Properties"/> - <resource name="EG_PContent" resource="Properties"> + <resource name="EG_PContent" resource="Properties" tag ="content"> <element name="fldSimple" tokenid="ooxml:EG_PContent_fldSimple"/> <element name="hyperlink" tokenid="ooxml:EG_PContent_hyperlink"/> <element name="subDoc" tokenid="ooxml:EG_PContent_subDoc"/> </resource> - <resource name="CT_P" resource="Stream"> + <resource name="CT_P" resource="Stream" tag="content"> <action name="start" action="handleLastParagraphInSection"/> <action name="start" action="startParagraphGroup"/> <action name="start" action="setHandle"/> @@ -22638,27 +22643,27 @@ <value tokenid="ooxml:Value_ST_TblWidth_dxa">dxa</value> <value tokenid="ooxml:Value_ST_TblWidth_auto">auto</value> </resource> - <resource name="CT_Height" resource="Properties"> + <resource name="CT_Height" resource="Properties" tag="attribute"> <attribute name="val" tokenid="ooxml:CT_Height_val"/> <attribute name="hRule" tokenid="ooxml:CT_Height_hRule"/> </resource> - <resource name="CT_TblWidth" resource="Properties"> + <resource name="CT_TblWidth" resource="Properties" tag="table"> <attribute name="w" tokenid="ooxml:CT_TblWidth_w"/> <attribute name="type" tokenid="ooxml:CT_TblWidth_type"/> </resource> - <resource name="CT_TblGridCol" resource="Value"> + <resource name="CT_TblGridCol" resource="Value" tag="table"> <attribute name="w" tokenid="ooxml:CT_TblGridCol_w" action="setValue"/> <action name="start" action="setDefaultIntegerValue"/> </resource> - <resource name="CT_TblGridBase" resource="Properties"> + <resource name="CT_TblGridBase" resource="Properties" tag="table"> <element name="gridCol" tokenid="ooxml:CT_TblGridBase_gridCol"/> </resource> - <resource name="CT_TblGrid" resource="Properties"> + <resource name="CT_TblGrid" resource="Properties" tag="table"> <element name="tblGridChange" tokenid="ooxml:CT_TblGrid_tblGridChange"/> <action name="end" action="propagateTableProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_TcBorders" resource="Properties"> + <resource name="CT_TcBorders" resource="Properties" tag="table"> <kind name="table"/> <element name="top" tokenid="ooxml:CT_TcBorders_top"/> <element name="left" tokenid="ooxml:CT_TcBorders_left"/> @@ -22669,7 +22674,7 @@ <element name="tl2br" tokenid="ooxml:CT_TcBorders_tl2br"/> <element name="tr2bl" tokenid="ooxml:CT_TcBorders_tr2bl"/> </resource> - <resource name="CT_TcMar" resource="Properties"> + <resource name="CT_TcMar" resource="Properties" tag="table"> <kind name="table"/> <element name="top" tokenid="ooxml:CT_TcMar_top"/> <element name="left" tokenid="ooxml:CT_TcMar_left"/> @@ -22681,13 +22686,13 @@ <value tokenid="ooxml:Value_ST_Merge_restart">restart</value> <default tokenid="ooxml:Value_ST_Merge_continue"/> </resource> - <resource name="CT_VMerge" resource="Value"> + <resource name="CT_VMerge" resource="Value" tag="table"> <attribute name="val" tokenid="ooxml:CT_VMerge_val" action="setValue"/> </resource> - <resource name="CT_HMerge" resource="Value"> + <resource name="CT_HMerge" resource="Value" tag="table"> <attribute name="val" tokenid="ooxml:CT_HMerge_val" action="setValue"/> </resource> - <resource name="CT_TcPrBase" resource="Properties"> + <resource name="CT_TcPrBase" resource="Properties" tag="table"> <kind name="table"/> <element name="cnfStyle" tokenid="ooxml:CT_TcPrBase_cnfStyle"/> <element name="tcW" tokenid="ooxml:CT_TcPrBase_tcW"/> @@ -22703,12 +22708,12 @@ <element name="vAlign" tokenid="ooxml:CT_TcPrBase_vAlign"/> <element name="hideMark" tokenid="ooxml:CT_TcPrBase_hideMark"/> </resource> - <resource name="CT_TcPr" resource="Properties"> + <resource name="CT_TcPr" resource="Properties" tag="table"> <element name="tcPrChange" tokenid="ooxml:CT_TcPr_tcPrChange"/> <action name="end" action="propagateCellProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_TcPrInner" resource="Properties"/> + <resource name="CT_TcPrInner" resource="Properties" tag="table"/> <resource name="CT_Tc" resource="TextTableCell"> <action name="start" action="startCell"/> <action name="end" action="endCell"/> @@ -22716,11 +22721,11 @@ <action name="end" action="endParagraphGroup"/> </resource> <resource name="ST_Cnf" resource="String" generated="yes"/> - <resource name="CT_Cnf" resource="Value" generated="yes"> + <resource name="CT_Cnf" resource="Value" generated="yes" tag="content"> <attribute name="val" tokenid="ooxml:CT_Cnf_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_TrPrBase" resource="Properties"> + <resource name="CT_TrPrBase" resource="Properties" tag="table"> <kind name="table"/> <element name="cnfStyle" tokenid="ooxml:CT_TrPrBase_cnfStyle"/> <element name="divId" tokenid="ooxml:CT_TrPrBase_divId"/> @@ -22735,7 +22740,7 @@ <element name="jc" tokenid="ooxml:CT_TrPrBase_jc"/> <element name="hidden" tokenid="ooxml:CT_TrPrBase_hidden"/> </resource> - <resource name="CT_TrPr" resource="Properties"> + <resource name="CT_TrPr" resource="Properties" tag="table"> <kind name="table"/> <element name="ins" tokenid="ooxml:CT_TrPr_ins"/> <element name="del" tokenid="ooxml:CT_TrPr_del"/> @@ -22743,7 +22748,7 @@ <action name="end" action="propagateRowProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Row" resource="TextTableRow"> + <resource name="CT_Row" resource="TextTableRow" tag="table"> <action name="start" action="startRow"/> <action name="end" action="sendRowProperties"/> <action name="end" action="sendTableProperties"/> @@ -22757,16 +22762,16 @@ <value tokenid="ooxml:Value_ST_TblOverlap_never">never</value> <value tokenid="ooxml:Value_ST_TblOverlap_overlap">overlap</value> </resource> - <resource name="CT_TblOverlap" resource="Value"> + <resource name="CT_TblOverlap" resource="Value" tag="table"> <attribute name="val" tokenid="ooxml:CT_TblOverlap_val" action="setValue"/> </resource> - <resource name="CT_TblCellMar" resource="Properties"> + <resource name="CT_TblCellMar" resource="Properties" tag="table"> <element name="top" tokenid="ooxml:CT_TblCellMar_top"/> <element name="left" tokenid="ooxml:CT_TblCellMar_left"/> <element name="bottom" tokenid="ooxml:CT_TblCellMar_bottom"/> <element name="right" tokenid="ooxml:CT_TblCellMar_right"/> </resource> - <resource name="CT_TblBorders" resource="Properties"> + <resource name="CT_TblBorders" resource="Properties" tag="table"> <kind name="table"/> <element name="top" tokenid="ooxml:CT_TblBorders_top"/> <element name="left" tokenid="ooxml:CT_TblBorders_left"/> @@ -22775,7 +22780,7 @@ <element name="insideH" tokenid="ooxml:CT_TblBorders_insideH"/> <element name="insideV" tokenid="ooxml:CT_TblBorders_insideV"/> </resource> - <resource name="CT_TblPrBase" resource="Properties"> + <resource name="CT_TblPrBase" resource="Properties" tag="table"> <kind name="table"/> <element name="tblStyle" tokenid="ooxml:CT_TblPrBase_tblStyle"/> <element name="tblpPr" tokenid="ooxml:CT_TblPrBase_tblpPr"/> @@ -22793,30 +22798,30 @@ <element name="tblCellMar" tokenid="ooxml:CT_TblPrBase_tblCellMar"/> <element name="tblLook" tokenid="ooxml:CT_TblPrBase_tblLook"/> </resource> - <resource name="CT_TblPr" resource="Properties"> + <resource name="CT_TblPr" resource="Properties" tag="table"> <kind name="table"/> <element name="tblPrChange" tokenid="ooxml:CT_TblPr_tblPrChange"/> <action name="end" action="propagateTableProperties"/> <action name="end" action="clearProps"/> </resource> - <resource name="CT_Tbl" resource="TextTable"/> + <resource name="CT_Tbl" resource="TextTable" tag="table"/> <resource name="ST_FtnPos" resource="List"> <value tokenid="ooxml:Value_ST_FtnPos_pageBottom">pageBottom</value> <value tokenid="ooxml:Value_ST_FtnPos_beneathText">beneathText</value> <value tokenid="ooxml:Value_ST_FtnPos_sectEnd">sectEnd</value> <value tokenid="ooxml:Value_ST_FtnPos_docEnd">docEnd</value> </resource> - <resource name="CT_FtnPos" resource="Value"> + <resource name="CT_FtnPos" resource="Value" tag="reference"> <attribute name="val" tokenid="ooxml:CT_FtnPos_val" action="setValue"/> </resource> <resource name="ST_EdnPos" resource="List"> <value tokenid="ooxml:Value_ST_EdnPos_sectEnd">sectEnd</value> <value tokenid="ooxml:Value_ST_EdnPos_docEnd">docEnd</value> </resource> - <resource name="CT_EdnPos" resource="Value"> + <resource name="CT_EdnPos" resource="Value" tag="reference"> <attribute name="val" tokenid="ooxml:CT_EdnPos_val" action="setValue"/> </resource> - <resource name="CT_NumFmt" resource="Value"> + <resource name="CT_NumFmt" resource="Value" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_NumFmt_val" action="setValue"/> </resource> <resource name="ST_RestartNumber" resource="List"> @@ -22824,42 +22829,42 @@ <value tokenid="ooxml:Value_ST_RestartNumber_eachSect">eachSect</value> <value tokenid="ooxml:Value_ST_RestartNumber_eachPage">eachPage</value> </resource> - <resource name="CT_NumRestart" resource="Value"> + <resource name="CT_NumRestart" resource="Value" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_NumRestart_val" action="setValue"/> </resource> - <resource name="CT_FtnEdnRef" resource="Properties"> + <resource name="CT_FtnEdnRef" resource="Properties" tag="reference"> <attribute name="customMarkFollows" tokenid="ooxml:CT_FtnEdnRef_customMarkFollows"/> <attribute name="id" tokenid="ooxml:CT_FtnEdnRef_id" action="setXNoteId"/> <action name="end" action="handleXNotes"/> </resource> - <resource name="CT_FtnEdnSepRef" resource="Properties"> + <resource name="CT_FtnEdnSepRef" resource="Properties" tag="reference"> <attribute name="id" tokenid="ooxml:CT_FtnEdnSepRef_id"/> </resource> - <resource name="CT_FtnEdn" resource="XNote"> + <resource name="CT_FtnEdn" resource="XNote" tag="reference"> <attribute name="type" tokenid="ooxml:CT_FtnEdn_type"/> <attribute name="id" tokenid="ooxml:CT_FtnEdn_id" action="checkId"/> <action name="start" action="propagateCharacterProperties"/> <action name="end" action="endSectionGroup"/> </resource> - <resource name="CT_CommentRef" resource="Properties"> + <resource name="CT_CommentRef" resource="Properties" tag="reference"> <action name="end" action="handleComment"/> </resource> - <resource name="EG_FtnEdnNumProps" resource="Properties"> + <resource name="EG_FtnEdnNumProps" resource="Properties" tag="reference"> <element name="numStart" tokenid="ooxml:EG_FtnEdnNumProps_numStart"/> <element name="numRestart" tokenid="ooxml:EG_FtnEdnNumProps_numRestart"/> </resource> - <resource name="CT_FtnProps" resource="Properties"> + <resource name="CT_FtnProps" resource="Properties" tag="reference"> <element name="pos" tokenid="ooxml:CT_FtnProps_pos"/> <element name="numFmt" tokenid="ooxml:CT_FtnProps_numFmt"/> </resource> - <resource name="CT_EdnProps" resource="Properties"> + <resource name="CT_EdnProps" resource="Properties" tag="reference"> <element name="pos" tokenid="ooxml:CT_EdnProps_pos"/> <element name="numFmt" tokenid="ooxml:CT_EdnProps_numFmt"/> </resource> - <resource name="CT_FtnDocProps" resource="Properties"> + <resource name="CT_FtnDocProps" resource="Properties" tag="reference"> <element name="footnote" tokenid="ooxml:CT_FtnDocProps_footnote"/> </resource> - <resource name="CT_EdnDocProps" resource="Properties"> + <resource name="CT_EdnDocProps" resource="Properties" tag="reference"> <element name="endnote" tokenid="ooxml:CT_EdnDocProps_endnote"/> </resource> <resource name="ST_MailMergeSourceType" resource="List" generated="yes"> @@ -22873,11 +22878,11 @@ <value name="legacy" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeSourceType_legacy">legacy</value> <value name="master" tokenid="ooxml:Value_wordprocessingml_ST_MailMergeSourceType_master">master</value> </resource> - <resource name="CT_MailMergeSourceType" resource="Value" generated="yes"> + <resource name="CT_MailMergeSourceType" resource="Value" generated="yes" tag="mailmerge"> <attribute name="val" tokenid="ooxml:CT_MailMergeSourceType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_MailMerge" resource="Properties"> + <resource name="CT_MailMerge" resource="Properties" tag="mailmerge"> <element name="mainDocumentType" tokenid="ooxml:CT_MailMerge_mainDocumentType"/> <element name="linkToQuery" tokenid="ooxml:CT_MailMerge_linkToQuery"/> <element name="dataType" tokenid="ooxml:CT_MailMerge_dataType"/> @@ -22908,11 +22913,11 @@ <value name="1800x1440" tokenid="ooxml:Value_wordprocessingml_ST_TargetScreenSz_1800x1440">1800x1440</value> <value name="1920x1200" tokenid="ooxml:Value_wordprocessingml_ST_TargetScreenSz_1920x1200">1920x1200</value> </resource> - <resource name="CT_TargetScreenSz" resource="Value" generated="yes"> + <resource name="CT_TargetScreenSz" resource="Value" generated="yes" tag="settings"> <attribute name="val" tokenid="ooxml:CT_TargetScreenSz_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_Compat" resource="Properties"> + <resource name="CT_Compat" resource="Properties" tag="settings"> <element name="useSingleBorderforContiguousCells" tokenid="ooxml:CT_Compat_useSingleBorderforContiguousCells"/> <element name="wpJustification" tokenid="ooxml:CT_Compat_wpJustification"/> <element name="noTabHangInd" tokenid="ooxml:CT_Compat_noTabHangInd"/> @@ -22979,11 +22984,11 @@ <element name="useAnsiKerningPairs" tokenid="ooxml:CT_Compat_useAnsiKerningPairs"/> <element name="cachedColBalance" tokenid="ooxml:CT_Compat_cachedColBalance"/> </resource> - <resource name="CT_DocVar" resource="Properties"> + <resource name="CT_DocVar" resource="Properties" tag="document"> <attribute name="name" tokenid="ooxml:CT_DocVar_name"/> <attribute name="val" tokenid="ooxml:CT_DocVar_val"/> </resource> - <resource name="CT_DocRsids" resource="Properties"> + <resource name="CT_DocRsids" resource="Properties" tag="redline"> <element name="rsidRoot" tokenid="ooxml:CT_DocRsids_rsidRoot"/> <element name="rsid" tokenid="ooxml:CT_DocRsids_rsid"/> </resource> @@ -22992,21 +22997,21 @@ <value name="compressPunctuation" tokenid="ooxml:Value_wordprocessingml_ST_CharacterSpacing_compressPunctuation">compressPunctuation</value> <value name="compressPunctuationAndJapaneseKana" tokenid="ooxml:Value_wordprocessingml_ST_CharacterSpacing_compressPunctuationAndJapaneseKana">compressPunctuationAndJapaneseKana</value> </resource> - <resource name="CT_CharacterSpacing" resource="Value" generated="yes"> + <resource name="CT_CharacterSpacing" resource="Value" generated="yes" tag="character"> <attribute name="val" tokenid="ooxml:CT_CharacterSpacing_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_SaveThroughXslt" resource="Properties"> + <resource name="CT_SaveThroughXslt" resource="Properties" tag="settings"> <attribute name="r:id" tokenid="ooxml:CT_SaveThroughXslt_r_id"/> <attribute name="solutionID" tokenid="ooxml:CT_SaveThroughXslt_solutionID"/> </resource> - <resource name="CT_RPrDefault" resource="Properties"> + <resource name="CT_RPrDefault" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_RPrDefault_rPr"/> </resource> - <resource name="CT_PPrDefault" resource="Properties"> + <resource name="CT_PPrDefault" resource="Properties" tag="paragraph"> <element name="pPr" tokenid="ooxml:CT_PPrDefault_pPr"/> </resource> - <resource name="CT_DocDefaults" resource="Properties"> + <resource name="CT_DocDefaults" resource="Properties" tag="document"> <element name="pPrDefault" tokenid="ooxml:CT_DocDefaults_pPrDefault"/> <element name="rPrDefault" tokenid="ooxml:CT_DocDefaults_rPrDefault"/> </resource> @@ -23030,10 +23035,10 @@ <attribute name="h" tokenid="ooxml:CT_ReadingModeInkLockDown_h"/> <attribute name="fontSz" tokenid="ooxml:CT_ReadingModeInkLockDown_fontSz"/> </resource> - <resource name="CT_WriteProtection" resource="Properties"> + <resource name="CT_WriteProtection" resource="Properties" tag="document"> <attribute name="recommended" tokenid="ooxml:CT_WriteProtection_recommended"/> </resource> - <resource name="CT_Settings" resource="PropertyTable" tokenid="ooxml:SETTINGS"> + <resource name="CT_Settings" resource="PropertyTable" tokenid="ooxml:SETTINGS" tag="settings"> <element name="writeProtection" tokenid="ooxml:CT_Settings_writeProtection"/> <element name="view" tokenid="ooxml:CT_Settings_view"/> <element name="zoom" tokenid="ooxml:CT_Settings_zoom"/> @@ -23137,7 +23142,7 @@ <value name="off" tokenid="ooxml:Value_wordprocessingml_ST_FrameScrollbar_off">off</value> <value name="auto" tokenid="ooxml:Value_wordprocessingml_ST_FrameScrollbar_auto">auto</value> </resource> - <resource name="CT_FrameScrollbar" resource="Value" generated="yes"> + <resource name="CT_FrameScrollbar" resource="Value" generated="yes" tag="frame"> <attribute name="val" tokenid="ooxml:CT_FrameScrollbar_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23146,7 +23151,7 @@ <value name="cols" tokenid="ooxml:Value_wordprocessingml_ST_FrameLayout_cols">cols</value> <value name="none" tokenid="ooxml:Value_wordprocessingml_ST_FrameLayout_none">none</value> </resource> - <resource name="CT_FrameLayout" resource="Value" generated="yes"> + <resource name="CT_FrameLayout" resource="Value" generated="yes" tag="frame"> <attribute name="val" tokenid="ooxml:CT_FrameLayout_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23155,20 +23160,20 @@ <value name="space" tokenid="ooxml:Value_wordprocessingml_ST_LevelSuffix_space">space</value> <value name="nothing" tokenid="ooxml:Value_wordprocessingml_ST_LevelSuffix_nothing">nothing</value> </resource> - <resource name="CT_LevelSuffix" resource="Value" generated="yes"> + <resource name="CT_LevelSuffix" resource="Value" generated="yes" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_LevelSuffix_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_LevelText" resource="Properties"> + <resource name="CT_LevelText" resource="Properties" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_LevelText_val"/> <attribute name="null" tokenid="ooxml:CT_LevelText_null"/> </resource> - <resource name="CT_LvlLegacy" resource="Properties"> + <resource name="CT_LvlLegacy" resource="Properties" tag="numbering"> <attribute name="legacy" tokenid="ooxml:CT_LvlLegacy_legacy"/> <attribute name="legacySpace" tokenid="ooxml:CT_LvlLegacy_legacySpace"/> <attribute name="legacyIndent" tokenid="ooxml:CT_LvlLegacy_legacyIndent"/> </resource> - <resource name="CT_Lvl" resource="Properties"> + <resource name="CT_Lvl" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="start" tokenid="rtf:ISTARTAT"/> <element name="numFmt" tokenid="rtf:NFC"/> @@ -23186,15 +23191,15 @@ <attribute name="tplc" tokenid="ooxml:CT_Lvl_tplc"/> <attribute name="tentative" tokenid="ooxml:CT_Lvl_tentative"/> </resource> - <resource name="ST_MultiLevelType" resource="List"> + <resource name="ST_MultiLevelType" resource="List" tag="numbering"> <value tokenid="ooxml:Value_ST_MultiLevelType_singleLevel">singleLevel</value> <value tokenid="ooxml:Value_ST_MultiLevelType_multilevel">multilevel</value> <value tokenid="ooxml:Value_ST_MultiLevelType_hybridMultilevel">hybridMultilevel</value> </resource> - <resource name="CT_MultiLevelType" resource="Value"> + <resource name="CT_MultiLevelType" resource="Value" tag="numbering"> <attribute name="val" tokenid="ooxml:CT_MultiLevelType_val" action="setValue"/> </resource> - <resource name="CT_AbstractNum" resource="Properties"> + <resource name="CT_AbstractNum" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="nsid" tokenid="rtf:LSID"/> <element name="multiLevelType" tokenid="ooxml:CT_AbstractNum_multiLevelType"/> @@ -23205,19 +23210,19 @@ <element name="lvl" tokenid="ooxml:CT_AbstractNum_lvl"/> <attribute name="abstractNumId" tokenid="ooxml:CT_AbstractNum_abstractNumId"/> </resource> - <resource name="CT_NumLvl" resource="Properties"> + <resource name="CT_NumLvl" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="startOverride" tokenid="ooxml:CT_NumLvl_startOverride"/> <element name="lvl" tokenid="ooxml:CT_NumLvl_lvl"/> <attribute name="ilvl" tokenid="ooxml:CT_NumLvl_ilvl"/> </resource> - <resource name="CT_Num" resource="Properties"> + <resource name="CT_Num" resource="Properties" tag="numbering"> <kind name="paragraph"/> <element name="abstractNumId" tokenid="ooxml:CT_Num_abstractNumId"/> <element name="lvlOverride" tokenid="ooxml:CT_Num_lvlOverride"/> <attribute name="numId" tokenid="ooxml:CT_Num_numId"/> </resource> - <resource name="CT_Numbering" resource="PropertyTable" tokenid="ooxml:NUMBERING"> + <resource name="CT_Numbering" resource="PropertyTable" tokenid="ooxml:NUMBERING" tag="numbering"> <kind name="paragraph"/> <element name="numPicBullet" tokenid="ooxml:CT_Numbering_numPicBullet"/> <element name="abstractNum" tokenid="ooxml:CT_Numbering_abstractNum"/> @@ -23239,7 +23244,7 @@ <value tokenid="12">seCell</value> <value tokenid="13">swCell</value> </resource> - <resource name="CT_Style_tblStylePr" resource="Properties"> + <resource name="CT_Style_tblStylePr" resource="Properties" tag="style"> <element name="pPr" tokenid="ooxml:CT_PPrBase"/> <element name="rPr" tokenid="ooxml:EG_RPrBase"/> <element name="tblPr" tokenid="ooxml:CT_TblPrBase"/> @@ -23253,7 +23258,7 @@ <value tokenid="3">table</value> <value tokenid="4">numbering</value> </resource> - <resource name="CT_Style" resource="Properties"> + <resource name="CT_Style" resource="Properties" tag="style"> <element name="name" tokenid="ooxml:CT_Style_name"/> <element name="aliases" tokenid="ooxml:CT_Style_aliases"/> <element name="basedOn" tokenid="ooxml:CT_Style_basedOn"/> @@ -23281,9 +23286,9 @@ <attribute name="default" tokenid="ooxml:CT_Style_default"/> <attribute name="customStyle" tokenid="ooxml:CT_Style_customStyle"/> </resource> - <resource name="CT_Styles" resource="Table" tokenid="rtf:STYLESHEET"/> + <resource name="CT_Styles" resource="Table" tokenid="rtf:STYLESHEET" tag="style"/> <resource name="ST_Panose" resource="Hex"/> - <resource name="CT_Panose" resource="Value"> + <resource name="CT_Panose" resource="Value" tag="font"> <attribute name="val" tokenid="ooxml:CT_Panose_val" action="setValue"/> <action name="start" action="setDefaultHexValue"/> </resource> @@ -23299,7 +23304,7 @@ <value tokenid="ooxml:Value_ST_FontFamily_swiss">swiss</value> <value tokenid="ooxml:Value_ST_FontFamily_auto">auto</value> </resource> - <resource name="CT_FontFamily" resource="Value"> + <resource name="CT_FontFamily" resource="Value" tag="font"> <attribute name="val" tokenid="ooxml:CT_FontFamily_val" action="setValue"/> </resource> <resource name="ST_Pitch" resource="List"> @@ -23307,10 +23312,10 @@ <value tokenid="ooxml:Value_ST_Pitch_variable">variable</value> <value tokenid="ooxml:Value_ST_Pitch_default">default</value> </resource> - <resource name="CT_Pitch" resource="Value"> + <resource name="CT_Pitch" resource="Value" tag="font"> <attribute name="val" tokenid="ooxml:CT_Pitch_val" action="setValue"/> </resource> - <resource name="CT_FontSig" resource="Properties"> + <resource name="CT_FontSig" resource="Properties" tag="font"> <attribute name="usb0" tokenid="ooxml:CT_FontSig_usb0"/> <attribute name="usb1" tokenid="ooxml:CT_FontSig_usb1"/> <attribute name="usb2" tokenid="ooxml:CT_FontSig_usb2"/> @@ -23318,11 +23323,11 @@ <attribute name="csb0" tokenid="ooxml:CT_FontSig_csb0"/> <attribute name="csb1" tokenid="ooxml:CT_FontSig_csb1"/> </resource> - <resource name="CT_FontRel" resource="Properties"> + <resource name="CT_FontRel" resource="Properties" tag="font"> <attribute name="fontKey" tokenid="ooxml:CT_FontRel_fontKey"/> <attribute name="subsetted" tokenid="ooxml:CT_FontRel_subsetted"/> </resource> - <resource name="CT_Font" resource="Properties"> + <resource name="CT_Font" resource="Properties" tag="font"> <kind name="character"/> <element name="altName" tokenid="ooxml:CT_Font_altName"/> <element name="panose1" tokenid="ooxml:CT_Font_panose1"/> @@ -23338,8 +23343,8 @@ <element name="embedBoldItalic" tokenid="ooxml:CT_Font_embedBoldItalic"/> <attribute name="name" tokenid="ooxml:CT_Font_name"/> </resource> - <resource name="CT_FontsList" resource="Table" tokenid="rtf:FONTTABLE"/> - <resource name="EG_RunLevelElts" resource="Stream"> + <resource name="CT_FontsList" resource="Table" tokenid="rtf:FONTTABLE" tag="font"/> + <resource name="EG_RunLevelElts" resource="Stream" tag="character"> <element name="proofErr" tokenid="ooxml:EG_RunLevelElts_proofErr"/> <element name="permStart" tokenid="ooxml:EG_RunLevelElts_permStart"/> <element name="permEnd" tokenid="ooxml:EG_RunLevelElts_permEnd"/> @@ -23350,7 +23355,7 @@ <element name="moveFrom" tokenid="ooxml:EG_RunLevelElts_moveFrom"/> <element name="moveTo" tokenid="ooxml:EG_RunLevelElts_moveTo"/> </resource> - <resource name="CT_Body" resource="Stream"> + <resource name="CT_Body" resource="Stream" tag="content"> <action name="start" action="startSectionGroup"/> <!-- <action name="start" action="footnoteSeparator"/> @@ -23362,7 +23367,7 @@ <action name="end" action="endParagraphGroup"/> <action name="end" action="endSectionGroup"/> </resource> - <resource xmlns:v="urn:schemas-microsoft-com:vml" name="CT_ShapeDefaults" resource="Properties"> + <resource xmlns:v="urn:schemas-microsoft-com:vml" name="CT_ShapeDefaults" resource="Properties" tag="shape"> <element name="v:fill" tokenid="ooxml:CT_ShapeDefaults_v_fill"/> <element name="v:stroke" tokenid="ooxml:CT_ShapeDefaults_v_stroke"/> <element name="v:textbox" tokenid="ooxml:CT_ShapeDefaults_v_textbox"/> @@ -23377,15 +23382,15 @@ <attribute name="strokecolor" tokenid="ooxml:CT_ShapeDefaults_strokecolor"/> <attribute name="allowincell" tokenid="ooxml:CT_ShapeDefaults_allowincell"/> </resource> - <resource name="CT_Comments" resource="Stream"> + <resource name="CT_Comments" resource="Stream" tag="content"> <action name="start" action="startSectionGroup"/> <action name="end" action="endSectionGroup"/> </resource> - <resource name="CT_Footnotes" resource="Stream"/> - <resource name="footnotes" resource="Stream"/> - <resource name="CT_Endnotes" resource="Stream"/> - <resource name="endnotes" resource="Stream"/> - <resource name="CT_SmartTagType" resource="Properties"> + <resource name="CT_Footnotes" resource="Stream" tag="reference"/> + <resource name="footnotes" resource="Stream" tag="reference"/> + <resource name="CT_Endnotes" resource="Stream" tag="reference"/> + <resource name="endnotes" resource="Stream" tag="reference"/> + <resource name="CT_SmartTagType" resource="Properties" tag="content"> <attribute name="namespaceuri" tokenid="ooxml:CT_SmartTagType_namespaceuri"/> <attribute name="name" tokenid="ooxml:CT_SmartTagType_name"/> <attribute name="url" tokenid="ooxml:CT_SmartTagType_url"/> @@ -23414,7 +23419,7 @@ <value name="p" tokenid="ooxml:Value_wordprocessingml_ST_DocPartBehavior_p">p</value> <value name="pg" tokenid="ooxml:Value_wordprocessingml_ST_DocPartBehavior_pg">pg</value> </resource> - <resource name="CT_DocPartBehavior" resource="Value" generated="yes"> + <resource name="CT_DocPartBehavior" resource="Value" generated="yes" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartBehavior_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23427,7 +23432,7 @@ <value name="formFld" tokenid="ooxml:Value_wordprocessingml_ST_DocPartType_formFld">formFld</value> <value name="bbPlcHdr" tokenid="ooxml:Value_wordprocessingml_ST_DocPartType_bbPlcHdr">bbPlcHdr</value> </resource> - <resource name="CT_DocPartType" resource="Value" generated="yes"> + <resource name="CT_DocPartType" resource="Value" generated="yes" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartType_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> @@ -23471,24 +23476,24 @@ <value name="custom4" tokenid="ooxml:Value_wordprocessingml_ST_DocPartGallery_custom4">custom4</value> <value name="custom5" tokenid="ooxml:Value_wordprocessingml_ST_DocPartGallery_custom5">custom5</value> </resource> - <resource name="CT_DocPartGallery" resource="Value" generated="yes"> + <resource name="CT_DocPartGallery" resource="Value" generated="yes" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartGallery_val" action="setValue"/> <action name="start" action="setDefaultStringValue"/> </resource> - <resource name="CT_DocPartName" resource="Properties"> + <resource name="CT_DocPartName" resource="Properties" tag="document"> <attribute name="val" tokenid="ooxml:CT_DocPartName_val"/> <attribute name="decorated" tokenid="ooxml:CT_DocPartName_decorated"/> </resource> - <resource name="settings" resource="Stream"> + <resource name="settings" resource="Stream" tag="settings"> <element name="settings" tokenid="ooxml:settings_settings"/> </resource> - <resource name="fonts" resource="Stream"> + <resource name="fonts" resource="Stream" tag="font"> <element name="fonts" tokenid="rtf:FONTTABLE"/> </resource> - <resource name="numbering" resource="Stream"> + <resource name="numbering" resource="Stream" tag="numbering"> <element name="numbering" tokenid="ooxml:NUMBERING"/> </resource> - <resource name="styles" resource="Stream"> + <resource name="styles" resource="Stream" tag="style"> <element name="styles" tokenid="rtf:STYLESHEET"/> </resource> <resource name="ST_CaptionPos" resource="List" generated="yes"> @@ -23497,7 +23502,7 @@ <value name="left" tokenid="ooxml:Value_wordprocessingml_ST_CaptionPos_left">left</value> <value name="right" tokenid="ooxml:Value_wordprocessingml_ST_CaptionPos_right">right</value> </resource> - <resource name="CT_Caption" resource="Properties"> + <resource name="CT_Caption" resource="Properties" tag="content"> <attribute name="name" tokenid="ooxml:CT_Caption_name"/> <attribute name="pos" tokenid="ooxml:CT_Caption_pos"/> <attribute name="chapNum" tokenid="ooxml:CT_Caption_chapNum"/> @@ -23506,23 +23511,23 @@ <attribute name="numFmt" tokenid="ooxml:CT_Caption_numFmt"/> <attribute name="sep" tokenid="ooxml:CT_Caption_sep"/> </resource> - <resource name="CT_AutoCaption" resource="Properties"> + <resource name="CT_AutoCaption" resource="Properties" tag="content"> <attribute name="name" tokenid="ooxml:CT_AutoCaption_name"/> <attribute name="caption" tokenid="ooxml:CT_AutoCaption_caption"/> </resource> - <resource name="CT_AutoCaptions" resource="Properties"> + <resource name="CT_AutoCaptions" resource="Properties" tag="content"> <element name="autoCaption" tokenid="ooxml:CT_AutoCaptions_autoCaption"/> </resource> - <resource name="CT_Captions" resource="Properties"> + <resource name="CT_Captions" resource="Properties" tag="content"> <element name="caption" tokenid="ooxml:CT_Captions_caption"/> <element name="autoCaptions" tokenid="ooxml:CT_Captions_autoCaptions"/> </resource> - <resource name="CT_DocumentBase" resource="Properties"> + <resource name="CT_DocumentBase" resource="Properties" tag="content"> <element name="background" tokenid="ooxml:CT_DocumentBase_background"/> </resource> - <resource name="CT_Document" resource="Stream"/> - <resource name="CT_GlossaryDocument" resource="Stream"/> - <resource name="document" resource="Stream"/> - <resource name="glossaryDocument" resource="Stream"/> + <resource name="CT_Document" resource="Stream" tag="content"/> + <resource name="CT_GlossaryDocument" resource="Stream" tag="content"/> + <resource name="document" resource="Stream" tag="content"/> + <resource name="glossaryDocument" resource="Stream" tag="content"/> </namespace> </model> diff --git a/writerfilter/source/ooxml/namespaceids.xsl b/writerfilter/source/ooxml/namespaceids.xsl index 45828761da0c..4a1f3b2ba381 100644 --- a/writerfilter/source/ooxml/namespaceids.xsl +++ b/writerfilter/source/ooxml/namespaceids.xsl @@ -67,7 +67,7 @@ const sal_uInt32 </xsl:text> <xsl:call-template name="namespaceid"/> <xsl:text> = </xsl:text> <xsl:value-of select="@id"/> -<xsl:text> << 16;</xsl:text> +<xsl:text>;</xsl:text> </xsl:for-each> </xsl:template> diff --git a/writerfilter/source/resourcemodel/Fraction.cxx b/writerfilter/source/resourcemodel/Fraction.cxx new file mode 100644 index 000000000000..c50668a7db03 --- /dev/null +++ b/writerfilter/source/resourcemodel/Fraction.cxx @@ -0,0 +1,150 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +#include <resourcemodel/Fraction.hxx> + +namespace writerfilter { +namespace resourcemodel { + +sal_uInt32 gcd(sal_uInt32 a, sal_uInt32 b) +{ + if (a == 0 || b == 0) + return a | b; + + sal_uInt32 nShift = 0; + while (((a | b) & 1) == 0) + { + a >>= 1; + b >>= 1; + ++nShift; + } + + while ((a & 1) == 0) + a >>= 1; + + do + { + while ((b & 1) == 0) + b >>= 1; + + if (a < b) + { + b -= a; + } + else + { + sal_uInt32 nDiff = a - b; + a = b; + b = nDiff; + } + + b >>= 1; + } + while (b != 0); + + return a << nShift; +} + +sal_uInt32 lcm(sal_Int32 a, sal_Int32 b) +{ + return abs(a * b) / gcd(abs(a), abs(b)); +} + +Fraction::Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator) +{ + init(nNumerator, nDenominator); +} + +Fraction::Fraction(const Fraction & a, const Fraction & b) +{ + init(a.mnNumerator * b.mnDenominator, a.mnDenominator * b.mnNumerator); +} + +Fraction::~Fraction() +{ +} + +void Fraction::init(sal_Int32 nNumerator, sal_Int32 nDenominator) +{ + sal_uInt32 nGCD = gcd(nNumerator, nDenominator); + + mnNumerator = nNumerator/ nGCD; + mnDenominator = nDenominator / nGCD; +} + +void Fraction::assign(const Fraction & rFraction) +{ + init(rFraction.mnNumerator, rFraction.mnDenominator); +} + +Fraction Fraction::inverse() const +{ + return Fraction(mnDenominator, mnNumerator); +} + +Fraction Fraction::operator + (const Fraction & rFraction) const +{ + sal_uInt32 nLCM = lcm(mnDenominator, rFraction.mnDenominator); + + return Fraction(mnNumerator * nLCM / mnDenominator + rFraction.mnNumerator * nLCM / rFraction.mnDenominator, nLCM); +} + +Fraction Fraction::operator - (const Fraction & rFraction) const +{ + sal_uInt32 nLCM = lcm(mnDenominator, rFraction.mnDenominator); + + return Fraction(mnNumerator * nLCM / mnDenominator - rFraction.mnNumerator * nLCM / rFraction.mnDenominator, nLCM); +} + +Fraction Fraction::operator * (const Fraction & rFraction) const +{ + return Fraction(mnNumerator * rFraction.mnNumerator, mnDenominator * rFraction.mnDenominator); +} + +Fraction Fraction::operator / (const Fraction & rFraction) const +{ + return *this * rFraction.inverse(); +} + +Fraction Fraction::operator = (const Fraction & rFraction) +{ + assign(rFraction); + + return *this; +} + +Fraction::operator sal_Int32() const +{ + return mnNumerator / mnDenominator; +} + +Fraction::operator float() const +{ + return static_cast<float>(mnNumerator) / static_cast<float>(mnDenominator); +} + +}} diff --git a/writerfilter/source/resourcemodel/LoggedResources.cxx b/writerfilter/source/resourcemodel/LoggedResources.cxx new file mode 100644 index 000000000000..cd1910e7cac2 --- /dev/null +++ b/writerfilter/source/resourcemodel/LoggedResources.cxx @@ -0,0 +1,322 @@ +/************************************************************************* + * + * 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. + * + ************************************************************************/ + +#include <rtl/ustrbuf.hxx> +#include <resourcemodel/LoggedResources.hxx> +#include <resourcemodel/QNameToString.hxx> + +namespace writerfilter +{ + +// class: LoggedResourcesHelper + +LoggedResourcesHelper::LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mpLogger(pLogger), msPrefix(sPrefix) +{ +} + +LoggedResourcesHelper::~LoggedResourcesHelper() +{ +} + +void LoggedResourcesHelper::startElement(const string & sElement) +{ + mpLogger->startElement(msPrefix + "." + sElement); +} + +void LoggedResourcesHelper::endElement(const string & /*sElement*/) +{ + mpLogger->endElement(); +} + +void LoggedResourcesHelper::chars(const ::rtl::OUString & rChars) +{ + mpLogger->chars(rChars); +} + +void LoggedResourcesHelper::chars(const string & rChars) +{ + mpLogger->chars(rChars); +} + +void LoggedResourcesHelper::attribute(const string & rName, const string & rValue) +{ + mpLogger->attribute(rName, rValue); +} + +void LoggedResourcesHelper::attribute(const string & rName, sal_uInt32 nValue) +{ + mpLogger->attribute(rName, nValue); +} + +void LoggedResourcesHelper::setPrefix(const string & rPrefix) +{ + msPrefix = rPrefix; +} + +// class: LoggedStream + +LoggedStream::LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mHelper(pLogger, sPrefix) +{ +} + +LoggedStream::~LoggedStream() +{ +} + +void LoggedStream::startSectionGroup() +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("section"); +#endif + + lcl_startSectionGroup(); +} + +void LoggedStream::endSectionGroup() +{ + lcl_endSectionGroup(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("section"); +#endif +} + +void LoggedStream::startParagraphGroup() +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("paragraph"); +#endif + + lcl_startParagraphGroup(); +} + +void LoggedStream::endParagraphGroup() +{ + lcl_endParagraphGroup(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("paragraph"); +#endif +} + + +void LoggedStream::startCharacterGroup() +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("charactergroup"); +#endif + + lcl_startCharacterGroup(); +} + +void LoggedStream::endCharacterGroup() +{ + lcl_endCharacterGroup(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("charactergroup"); +#endif +} + +void LoggedStream::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("shape"); +#endif + + lcl_startShape(xShape); +} + +void LoggedStream::endShape() +{ + lcl_endShape(); + +#ifdef DEBUG_LOGGING + mHelper.endElement("shape"); +#endif +} + +void LoggedStream::text(const sal_uInt8 * data, size_t len) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("text"); + + ::rtl::OUString sText( (const sal_Char*) data, len, RTL_TEXTENCODING_MS_1252 ); + + mHelper.startElement("data"); + mHelper.chars(sText); + mHelper.endElement("data"); +#endif + + lcl_text(data, len); + +#ifdef DEBUG_LOGGING + mHelper.endElement("text"); +#endif +} + +void LoggedStream::utext(const sal_uInt8 * data, size_t len) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("utext"); + mHelper.startElement("data"); + + ::rtl::OUString sText; + ::rtl::OUStringBuffer aBuffer = ::rtl::OUStringBuffer(len); + aBuffer.append( (const sal_Unicode *) data, len); + sText = aBuffer.makeStringAndClear(); + + mHelper.chars(sText); + + mHelper.endElement("data"); +#endif + + lcl_utext(data, len); + +#ifdef DEBUG_LOGGING + mHelper.endElement("utext"); +#endif +} + +void LoggedStream::props(writerfilter::Reference<Properties>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("props"); +#endif + + lcl_props(ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("props"); +#endif +} + +void LoggedStream::table(Id name, writerfilter::Reference<Table>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("table"); + mHelper.attribute("name", (*QNameToString::Instance())(name)); +#endif + + lcl_table(name, ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("table"); +#endif +} + +void LoggedStream::substream(Id name, writerfilter::Reference<Stream>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("substream"); + mHelper.attribute("name", (*QNameToString::Instance())(name)); +#endif + + lcl_substream(name, ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("substream"); +#endif +} + +void LoggedStream::info(const string & _info) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("info"); + mHelper.attribute("text", _info); +#endif + + lcl_info(_info); + +#ifdef DEBUG_LOGGING + mHelper.endElement("info"); +#endif +} + +// class LoggedProperties +LoggedProperties::LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mHelper(pLogger, sPrefix) +{ +} + +LoggedProperties::~LoggedProperties() +{ +} + +void LoggedProperties::attribute(Id name, Value & val) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("attribute"); + mHelper.attribute("name", (*QNameToString::Instance())(name)); + mHelper.attribute("value", val.toString()); + mHelper.endElement("attribute"); +#endif + + lcl_attribute(name, val); +} + +void LoggedProperties::sprm(Sprm & _sprm) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("sprm"); + mHelper.attribute("name", (*QNameToString::Instance())(_sprm.getId())); + mHelper.chars(sprm.toString()); +#endif + + lcl_sprm(_sprm); + +#ifdef DEBUG_LOGGING + mHelper.endElement("sprm"); +#endif +} + +LoggedTable::LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix) +: mHelper(pLogger, sPrefix) +{ +} + +LoggedTable::~LoggedTable() +{ +} + +void LoggedTable::entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) +{ +#ifdef DEBUG_LOGGING + mHelper.startElement("entry"); + mHelper.attribute("pos", pos); +#endif + + lcl_entry(pos, ref); + +#ifdef DEBUG_LOGGING + mHelper.endElement("entry"); +#endif +} + +} diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index 15786951c131..9159898f2201 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -26,36 +26,36 @@ * ************************************************************************/ -#if OSL_DEBUG_LEVEL > 1 #include <libxml/xmlstring.h> #include <string.h> #include <resourcemodel/TagLogger.hxx> #include <resourcemodel/util.hxx> #include <resourcemodel/QNameToString.hxx> +#include <boost/unordered_map.hpp> namespace writerfilter { - struct eqstr +struct eqstr +{ + bool operator()(const char* s1, const char* s2) const { - bool operator()(const char* s1, const char* s2) const - { - return strcmp(s1, s2) == 0; - } - }; + return strcmp(s1, s2) == 0; + } +}; - typedef boost::unordered_map<const char *, TagLogger::Pointer_t, hash<const char *>, eqstr> TagLoggerHashMap_t; - static TagLoggerHashMap_t * tagLoggers = NULL; +typedef boost::unordered_map<const char *, TagLogger::Pointer_t> TagLoggerHashMap_t; +static TagLoggerHashMap_t * tagLoggers = NULL; TagLogger::TagLogger(const char* name) : pWriter( NULL ), pName( name ) - { - } +{ +} - TagLogger::~TagLogger() - { +TagLogger::~TagLogger() +{ pWriter = NULL; pName = NULL; - } +} void TagLogger::setFileName( const string & filename ) { @@ -205,7 +205,7 @@ namespace writerfilter class PropertySetDumpHandler : public Properties - { +{ IdToString::Pointer_t mpIdToString; TagLogger::Pointer_t m_pLogger; @@ -316,6 +316,5 @@ namespace writerfilter } } -#endif // DEBUG /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/resourcemodel/XPathLogger.cxx b/writerfilter/source/resourcemodel/XPathLogger.cxx new file mode 100644 index 000000000000..cc224a02bd78 --- /dev/null +++ b/writerfilter/source/resourcemodel/XPathLogger.cxx @@ -0,0 +1,93 @@ +/* -*- 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. + * + ************************************************************************/ + +#include <stdio.h> +#include <resourcemodel/XPathLogger.hxx> + +namespace writerfilter +{ +XPathLogger::XPathLogger() +: mp_tokenMap(new TokenMap_t) +{ +} + +XPathLogger::~XPathLogger() +{ +} + +string XPathLogger::getXPath() const +{ + return m_currentPath; +} + +void XPathLogger::updateCurrentPath() +{ + m_currentPath = ""; + + for (vector<string>::const_iterator aIt = m_path.begin(); + aIt != m_path.end(); + aIt++) + { + if (m_currentPath.size() > 0) + m_currentPath += "/"; + + m_currentPath += *aIt; + } +} + +void XPathLogger::startElement(string _token) +{ + TokenMap_t::const_iterator aIt = mp_tokenMap->find(_token); + + if (aIt == mp_tokenMap->end()) + (*mp_tokenMap)[_token] = 1; + else + (*mp_tokenMap)[_token]++; + + static char sBuffer[256]; + snprintf(sBuffer, sizeof(sBuffer), "[%d]", (*mp_tokenMap)[_token]); + m_path.push_back(_token + sBuffer); + + m_tokenMapStack.push(mp_tokenMap); + mp_tokenMap.reset(new TokenMap_t); + + updateCurrentPath(); +} + +void XPathLogger::endElement() +{ + mp_tokenMap = m_tokenMapStack.top(); + m_tokenMapStack.pop(); + m_path.pop_back(); + + updateCurrentPath(); +} + +} // namespace writerfilter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk index 927daf589190..73e049fa7bbf 100644 --- a/writerfilter/source/resourcemodel/makefile.mk +++ b/writerfilter/source/resourcemodel/makefile.mk @@ -44,14 +44,17 @@ NOOPTFILES= \ $(SLO)$/qnametostr.obj SLOFILES= \ + $(SLO)$/Fraction.obj \ + $(SLO)$/LoggedResources.obj \ + $(SLO)$/Protocol.obj \ + $(SLO)$/ResourceModelHelper.obj \ + $(SLO)$/TagLogger.obj \ + $(SLO)$/WW8Analyzer.obj \ + $(SLO)$/XPathLogger.obj \ $(SLO)$/qnametostr.obj \ - $(SLO)$/sprmcodetostr.obj \ $(SLO)$/resourcemodel.obj \ + $(SLO)$/sprmcodetostr.obj \ $(SLO)$/util.obj \ - $(SLO)$/TagLogger.obj \ - $(SLO)$/ResourceModelHelper.obj \ - $(SLO)$/WW8Analyzer.obj \ - $(SLO)$/Protocol.obj SHL1TARGET=$(TARGET) @@ -70,9 +73,9 @@ SHL1STDLIBS=$(SALLIB)\ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) -.IF "$(DBG_LEVEL)">="2" +# .IF "$(DBG_LEVEL)">="2" SHL1STDLIBS+= $(LIBXML2LIB) -.ENDIF +# .ENDIF SHL1IMPLIB=i$(SHL1TARGET) SHL1USE_EXPORTS=name diff --git a/writerfilter/source/resourcemodel/namespace_preprocess.pl b/writerfilter/source/resourcemodel/namespace_preprocess.pl index 22c172329f61..66644b70fd47 100644 --- a/writerfilter/source/resourcemodel/namespace_preprocess.pl +++ b/writerfilter/source/resourcemodel/namespace_preprocess.pl @@ -30,31 +30,16 @@ EOF # print the mapping open ( NAMESPACES, $ARGV0 ) || die "can't open namespace file: $!"; -$group = 0; -$i = 1; while ( <NAMESPACES> ) { chomp( $_ ); - $_ =~ s/\s*//g; - if ( $_ =~ m/^$/ ) - { - # Start a new group - $i = 0; - $group++; - } - elsif ( $_ =~ m/^[^#]/ ) - { - # Neither an empty line nor a comment - $_ =~ /^[a-zA-Z0-9-_]+$/ or die "Invalid namespace token $_"; - $_ =~ s/-/_/g; - $no = $group*10 + $i; - print <<EOF; - <xsl:when test="\$id = '$_'"> - <xsl:text>$no</xsl:text> + # line format is: numeric-id short-name namespace-URL + $_ =~ /^([0-9]+)\s+([a-zA-Z]+)\s+([a-zA-Z0-9-.:\/]+)\s*$/ or die "Error: invalid character in input data"; + print <<EOF; + <xsl:when test="\$id = '$2'"> + <xsl:text>$1</xsl:text> </xsl:when> EOF - ++$i; - } } print <<EOF; diff --git a/writerfilter/unocomponent/component.cxx b/writerfilter/unocomponent/component.cxx index 5ff7cff43ad4..a2f44a636460 100644 --- a/writerfilter/unocomponent/component.cxx +++ b/writerfilter/unocomponent/component.cxx @@ -62,12 +62,6 @@ static struct ::cppu::ImplementationEntry s_component_entries [] = *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) -{ - return ::cppu::component_writeInfoHelper( xMgr, xRegistry, s_component_entries ); -} - - void * SAL_CALL component_getFactory(sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry ) { fprintf(stderr, "Loading service: %s: ", implName); diff --git a/writerfilter/unocomponent/exports.dxp b/writerfilter/unocomponent/exports.dxp index 028ac4175990..f0e1c69934bc 100644 --- a/writerfilter/unocomponent/exports.dxp +++ b/writerfilter/unocomponent/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/writerfilter/util/makefile.mk b/writerfilter/util/makefile.mk index 805326730db2..241d00e5fc1c 100644 --- a/writerfilter/util/makefile.mk +++ b/writerfilter/util/makefile.mk @@ -62,9 +62,9 @@ SHL1STDLIBS=\ $(SALLIB) \ $(OOXLIB) -.IF "$(DBG_LEVEL)">="2" +# .IF "$(DBG_LEVEL)">="2" SHL1STDLIBS+= $(LIBXML2LIB) -.ENDIF +# .ENDIF SHL1DEPN= @@ -79,4 +79,10 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk +ALLTAR : $(MISC)/writerfilter.component +$(MISC)/writerfilter.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt writerfilter.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt writerfilter.component diff --git a/writerfilter/util/writerfilter.component b/writerfilter/util/writerfilter.component new file mode 100644 index 000000000000..7a81b6cc3a2b --- /dev/null +++ b/writerfilter/util/writerfilter.component @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.Writer.WriterFilter"> + <service name="com.sun.star.document.ExportFilter"/> + <service name="com.sun.star.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.WriterFilterDetector"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> + <implementation name="com.sun.star.comp.Writer.RtfFilter"> + <service name="com.sun.star.document.ImportFilter"/> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> +</component> |