[Libreoffice-commits] core.git: 3 commits - writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Dec 9 11:51:59 PST 2014


 writerfilter/Library_writerfilter.mk                  |    2 
 writerfilter/inc/dmapper/DomainMapper.hxx             |    1 
 writerfilter/inc/ooxml/QNameToString.hxx              |   59 ++++++++++++++++++
 writerfilter/inc/resourcemodel/QNameToString.hxx      |   59 ------------------
 writerfilter/source/dmapper/DomainMapper.cxx          |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx     |    1 
 writerfilter/source/dmapper/TblStylePrHandler.cxx     |    7 --
 writerfilter/source/dmapper/ThemeTable.cxx            |   12 ---
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    2 
 writerfilter/source/ooxml/OOXMLFastHelper.hxx         |    2 
 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx    |    2 
 writerfilter/source/ooxml/qnametostr.py               |    4 -
 writerfilter/source/ooxml/qnametostrcore.cxx          |   55 ++++++++++++++++
 writerfilter/source/resourcemodel/LoggedResources.cxx |    2 
 writerfilter/source/resourcemodel/TagLogger.cxx       |    2 
 writerfilter/source/resourcemodel/qnametostrcore.cxx  |   55 ----------------
 writerfilter/source/rtftok/rtfsprm.cxx                |    2 
 17 files changed, 124 insertions(+), 145 deletions(-)

New commits:
commit b089c1091dcd854ad83152ebf602a9a8e32485d6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 9 20:18:51 2014 +0100

    writerfilter: move QNameToString to the OOXML tokenizer
    
    It's filled with contents in the OOXML tokenizer anyway, keeping its
    interface outside of it is pointless.
    
    Change-Id: I10051c5b41a1247417bfb3dd3170a76bf20925aa

diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 8377e19..63d17f0 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -122,10 +122,10 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
     writerfilter/source/ooxml/OOXMLParserState \
     writerfilter/source/ooxml/OOXMLPropertySetImpl \
     writerfilter/source/ooxml/OOXMLStreamImpl \
+    writerfilter/source/ooxml/qnametostrcore \
     writerfilter/source/resourcemodel/LoggedResources \
     writerfilter/source/resourcemodel/ResourceModelHelper \
     writerfilter/source/resourcemodel/TagLogger \
-    writerfilter/source/resourcemodel/qnametostrcore \
 ))
 
 $(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\
diff --git a/writerfilter/inc/resourcemodel/QNameToString.hxx b/writerfilter/inc/ooxml/QNameToString.hxx
similarity index 86%
rename from writerfilter/inc/resourcemodel/QNameToString.hxx
rename to writerfilter/inc/ooxml/QNameToString.hxx
index 0218984..89ddcf7 100644
--- a/writerfilter/inc/resourcemodel/QNameToString.hxx
+++ b/writerfilter/inc/ooxml/QNameToString.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_QNAMETOSTRING_HXX
-#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_QNAMETOSTRING_HXX
+#ifndef INCLUDED_WRITERFILTER_INC_OOXML_QNAMETOSTRING_HXX
+#define INCLUDED_WRITERFILTER_INC_OOXML_QNAMETOSTRING_HXX
 
 #include <boost/shared_ptr.hpp>
 #include <map>
@@ -36,7 +36,7 @@ class QNameToString
 
     static Pointer_t pInstance;
 
-    void init_ooxml();
+    void init();
 
     Map mMap;
 
@@ -54,6 +54,6 @@ public:
 
 }
 
-#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_QNAMETOSTRING_HXX
+#endif // INCLUDED_WRITERFILTER_INC_OOXML_QNAMETOSTRING_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 30caf26..bb0c977 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -23,7 +23,7 @@
 #include <comphelper/servicehelper.hxx>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/xml/sax/FastShapeContextHandler.hpp>
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 #include <ooxml/resourceids.hxx>
 #include <oox/token/namespaces.hxx>
 #include <dmapper/DomainMapper.hxx>
diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
index 4d5b971..88e5c23 100644
--- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
@@ -20,7 +20,7 @@
 #define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLFASTHELPER_HXX
 
 #include <iostream>
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 #include "OOXMLFastContextHandler.hxx"
 
 namespace writerfilter {
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index 01b8b4d..52e7550 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -20,7 +20,7 @@
 #include "OOXMLPropertySetImpl.hxx"
 #include <stdio.h>
 #include <iostream>
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <oox/token/tokens.hxx>
 
diff --git a/writerfilter/source/ooxml/qnametostr.py b/writerfilter/source/ooxml/qnametostr.py
index 4a98d4f..7b6f8de 100644
--- a/writerfilter/source/ooxml/qnametostr.py
+++ b/writerfilter/source/ooxml/qnametostr.py
@@ -19,12 +19,12 @@ class ContentHandler(xml.sax.handler.ContentHandler):
     def startDocument(self):
         print("""
 #include "ooxml/resourceids.hxx"
-#include "resourcemodel/QNameToString.hxx"
+#include "ooxml/QNameToString.hxx"
 
 namespace writerfilter
 {
 
-void QNameToString::init_ooxml()
+void QNameToString::init()
 {
 #ifdef DEBUG_WRITERFILTER
     /* ooxml */
diff --git a/writerfilter/source/resourcemodel/qnametostrcore.cxx b/writerfilter/source/ooxml/qnametostrcore.cxx
similarity index 96%
rename from writerfilter/source/resourcemodel/qnametostrcore.cxx
rename to writerfilter/source/ooxml/qnametostrcore.cxx
index 861e994..2cf1370 100644
--- a/writerfilter/source/resourcemodel/qnametostrcore.cxx
+++ b/writerfilter/source/ooxml/qnametostrcore.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 
 namespace writerfilter
 {
@@ -47,7 +47,7 @@ std::string QNameToString::operator()(Id qName)
 
 QNameToString::QNameToString()
 {
-    init_ooxml();
+    init();
 }
 
 }
diff --git a/writerfilter/source/resourcemodel/LoggedResources.cxx b/writerfilter/source/resourcemodel/LoggedResources.cxx
index 3b730bd..6aa834b 100644
--- a/writerfilter/source/resourcemodel/LoggedResources.cxx
+++ b/writerfilter/source/resourcemodel/LoggedResources.cxx
@@ -19,7 +19,7 @@
 
 #include <rtl/ustrbuf.hxx>
 #include <resourcemodel/LoggedResources.hxx>
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 
 using namespace ::com::sun::star;
 
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx
index d10610c..d6c17b5 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -20,7 +20,7 @@
 #include <libxml/xmlstring.h>
 #include <string.h>
 #include <resourcemodel/TagLogger.hxx>
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 #include <boost/unordered_map.hpp>
 
 using namespace css;
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index dbd84d9..b4e1e2e 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -12,7 +12,7 @@
 #include <rtl/strbuf.hxx>
 
 #include <ooxml/resourceids.hxx>
-#include <resourcemodel/QNameToString.hxx>
+#include <ooxml/QNameToString.hxx>
 
 
 namespace writerfilter
commit b3f1d8af89b015df0108a82ce7f19bfc957e0f69
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 9 19:57:34 2014 +0100

    writerfilter: no need to include QNameToString in dmapper
    
    All dmapper handler classes inherit from LoggedProperties, which takes
    care of logging already, and QNameToString is only useful to turn the
    numerical IDs into dmapper token strings.
    
    Change-Id: I437f2c815293caeda0dabbe65cf9458ae5a60566

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index e22ebbb..28f43fb 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -18,7 +18,6 @@
  */
 #include "PageBordersHandler.hxx"
 
-#include <resourcemodel/QNameToString.hxx>
 #include <resourcemodel/ResourceModelHelper.hxx>
 #include <SdtHelper.hxx>
 #include <TDefTableHandler.hxx>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 6c7bbdb..27901f7 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -70,7 +70,6 @@
 #include <GraphicHelpers.hxx>
 
 #ifdef DEBUG_WRITERFILTER
-#include <resourcemodel/QNameToString.hxx>
 #include <dmapperLoggers.hxx>
 #endif
 #include <oox/token/tokens.hxx>
diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx
index 21ffa8e..553e108 100644
--- a/writerfilter/source/dmapper/TblStylePrHandler.cxx
+++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx
@@ -20,7 +20,6 @@
 #include <TblStylePrHandler.hxx>
 #include <PropertyMap.hxx>
 #include <ooxml/resourceids.hxx>
-#include <resourcemodel/QNameToString.hxx>
 
 #include "dmapperLoggers.hxx"
 
@@ -67,12 +66,6 @@ OUString TblStylePrHandler::getTypeString()
 
 void TblStylePrHandler::lcl_attribute(Id rName, Value & rVal)
 {
-#ifdef DEBUG_WRITERFILTER
-    dmapper_logger->startElement("TblStylePrHandler.attribute");
-    dmapper_logger->attribute("name", (*QNameToString::Instance())(rName));
-    dmapper_logger->chars(rVal.toString());
-    dmapper_logger->endElement();
-#endif
 
     switch ( rName )
     {
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index f7d8c3c..cb33e3a 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -21,10 +21,6 @@
 #include <ooxml/resourceids.hxx>
 #include "dmapperLoggers.hxx"
 
-#ifdef DEBUG_WRITERFILTER
-#include <resourcemodel/QNameToString.hxx>
-#endif
-
 using namespace com::sun::star;
 
 namespace writerfilter {
@@ -62,11 +58,6 @@ ThemeTable::~ThemeTable()
 
 void ThemeTable::lcl_attribute(Id Name, Value & val)
 {
-#ifdef DEBUG_WRITERFILTER
-    dmapper_logger->startElement("ThemeTable.attribute");
-    dmapper_logger->attribute("name", (*QNameToString::Instance())(Name));
-    dmapper_logger->attribute("value", val.toString());
-#endif
     OUString sValue = val.getString();
     switch(Name)
     {
@@ -100,9 +91,6 @@ void ThemeTable::lcl_attribute(Id Name, Value & val)
         m_pImpl->m_supplementalFontName = "";
         m_pImpl->m_supplementalFontId = 0;
     }
-#ifdef DEBUG_WRITERFILTER
-    dmapper_logger->endElement();
-#endif
 }
 
 void ThemeTable::lcl_sprm(Sprm& rSprm)
commit 315c1bad14a56985c889d227dd832ef9ab89a494
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 9 19:48:19 2014 +0100

    writerfilter: move include to the implementation
    
    Change-Id: I27b3c5276c5bfd1a29d8edadc6078c71cfbf2609

diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index 6c44d02..94f233f 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -21,7 +21,6 @@
 
 #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>
 
 #include <map>
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 3285d7e..e22ebbb 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -60,6 +60,7 @@
 #include <com/sun/star/text/XFootnote.hpp>
 #include <com/sun/star/text/XTextColumns.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/text/FontEmphasis.hpp>
 #include <comphelper/types.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <filter/msfilter/util.hxx>


More information about the Libreoffice-commits mailing list