[Libreoffice-commits] core.git: 5 commits - include/oox sw/source writerfilter/CustomTarget_source.mk writerfilter/Library_writerfilter.mk writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Aug 6 09:54:21 PDT 2014


 include/oox/core/fasttokenhandler.hxx               |    3 
 sw/source/filter/ww8/docxattributeoutput.cxx        |    4 
 writerfilter/CustomTarget_source.mk                 |   14 --
 writerfilter/Library_writerfilter.mk                |    1 
 writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx |  113 --------------------
 writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx |   60 ----------
 writerfilter/source/ooxml/OOXMLStreamImpl.cxx       |    4 
 writerfilter/source/ooxml/factoryimpl_ns.py         |    3 
 writerfilter/source/ooxml/gperffasttokenhandler.py  |   54 ---------
 writerfilter/source/ooxml/tokens-to-xml.sed         |   19 ---
 10 files changed, 9 insertions(+), 266 deletions(-)

New commits:
commit 998836222cc31aae9e36d695a911996f3972d6b2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Aug 6 18:51:16 2014 +0200

    fix C++11ism
    
    Change-Id: I93f8bbdc9b0b326fa6334640e1d65b862dba6f22

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 92b7b1e..7af991d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2787,7 +2787,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
     {
         const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag();
         std::map<OUString, uno::Any>::const_iterator it = rGrabBag.find("CellCnfStyle");
-        if (it != rGrabBag.cend())
+        if (it != rGrabBag.end())
         {
             uno::Sequence<beans::PropertyValue> aAttributes = it->second.get< uno::Sequence<beans::PropertyValue> >();
             m_pTableStyleExport->CnfStyle(aAttributes);
@@ -2927,7 +2927,7 @@ void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t p
     {
         const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag();
         std::map<OUString, uno::Any>::const_iterator it = rGrabBag.find("RowCnfStyle");
-        if (it != rGrabBag.cend())
+        if (it != rGrabBag.end())
         {
             uno::Sequence<beans::PropertyValue> aAttributes = it->second.get< uno::Sequence<beans::PropertyValue> >();
             m_pTableStyleExport->CnfStyle(aAttributes);
commit 9c0e846cd75c1a56e4dec6d55a6d8a0ea591e299
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Aug 6 17:56:42 2014 +0200

    pep8 fixes
    
    Change-Id: Iba89cca1dd06e133d7a23f1695b262209e13cec2

diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py b/writerfilter/source/ooxml/factoryimpl_ns.py
index 93db0eb..5263d9f 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.py
+++ b/writerfilter/source/ooxml/factoryimpl_ns.py
@@ -188,6 +188,7 @@ def idToLabel(idName):
     else:
         return idName
 
+
 def appendValueData(values, name, value):
     first = name[0:1]
 
@@ -196,6 +197,7 @@ def appendValueData(values, name, value):
 
     values[first].append([name, value])
 
+
 def printValueData(values):
     if "" in values:
         output_else = ""
@@ -221,6 +223,7 @@ def printValueData(values):
             print("            break;")
     print("        }")
 
+
 def factoryGetListValue(nsNode):
     print("""bool OOXMLFactory_%s::getListValue(Id nId, const OUString& rValue, sal_uInt32& rOutValue)
 {
commit 446af81d89d22d088415062f55a6dfb87e654223
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Aug 6 17:48:54 2014 +0200

    unused tokens-to-xml.sed
    
    Change-Id: I274cdeddde53472e1d4d2188f88269a70677a1fd

diff --git a/writerfilter/CustomTarget_source.mk b/writerfilter/CustomTarget_source.mk
index 6e01355..1ac643c 100644
--- a/writerfilter/CustomTarget_source.mk
+++ b/writerfilter/CustomTarget_source.mk
@@ -63,7 +63,6 @@ writerfilter_GEN_ooxml_Model_processed=$(writerfilter_WORK)/ooxml/model_preproce
 writerfilter_GEN_ooxml_NamespaceIds_hxx=$(writerfilter_WORK)/ooxml/OOXMLnamespaceids.hxx
 writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx
 writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx
-writerfilter_GEN_ooxml_Token_xml=$(writerfilter_WORK)/ooxml/token.xml
 writerfilter_SRC_ooxml_Model=$(writerfilter_SRC)/ooxml/model.xml
 writerfilter_SRC_ooxml_Preprocess_py=$(writerfilter_SRC)/ooxml/modelpreprocess.py
 writerfilter_SRC_ooxml_QNameToStr_py=$(writerfilter_SRC)/ooxml/qnametostr.py
@@ -93,11 +92,6 @@ $(writerfilter_GEN_ooxml_ResourceIds_hxx) : $(writerfilter_SRC_ooxml_ResourceIds
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
 	$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_ResourceIds_py) $(writerfilter_GEN_ooxml_Model_processed)) > $@
 
-$(writerfilter_GEN_ooxml_Token_xml) : $(SRCDIR)/oox/source/token/tokens.txt $(writerfilter_SRC)/ooxml/tokens-to-xml.sed | $(writerfilter_WORK)/ooxml/.dir
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,CAT,1)
-	sed -f $(writerfilter_SRC)/ooxml/tokens-to-xml.sed \
-		< $(SRCDIR)/oox/source/token/tokens.txt > $@
-
 $(writerfilter_WORK)/ooxml/OOXMLFactory%.cxx : $(writerfilter_SRC)/ooxml/factoryimpl_ns.py $(writerfilter_GEN_ooxml_Model_processed)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
 	$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $< $(writerfilter_GEN_ooxml_Model_processed) $@) > $@
diff --git a/writerfilter/source/ooxml/tokens-to-xml.sed b/writerfilter/source/ooxml/tokens-to-xml.sed
deleted file mode 100755
index e1e6545..0000000
--- a/writerfilter/source/ooxml/tokens-to-xml.sed
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /usr/bin/sed -f
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-# first line - insert <model>
-1i\
-<model>
-
-# last line - append </model>
-$a\
-</model>
-
-# everywhere - replace the input line with <fasttoken>...</fasttoken>
-s/\(.*\)/<fasttoken>\1<\/fasttoken>/
commit 2046fcd907fe8c0217c5cd43be8420859a0ad435
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Aug 6 17:45:55 2014 +0200

    unused writerfilter::ooxml::OOXMLFastTokenHandler
    
    This makes libwriterfilterlo.so smaller by 500KB in a stripped dbgutil
    build.
    
    Change-Id: I0046251a0fe83ceee6f585f17707e4ecf53996b6

diff --git a/writerfilter/CustomTarget_source.mk b/writerfilter/CustomTarget_source.mk
index 922e5a1..6e01355 100644
--- a/writerfilter/CustomTarget_source.mk
+++ b/writerfilter/CustomTarget_source.mk
@@ -48,7 +48,6 @@ writerfilter_ALL = \
 	$(writerfilter_GEN_ooxml_Factory_cxx) \
 	$(writerfilter_GEN_ooxml_Factory_hxx) \
 	$(writerfilter_GEN_ooxml_FactoryValues_hxx) \
-	$(writerfilter_GEN_ooxml_GperfFastToken_hxx) \
 	$(writerfilter_GEN_ooxml_NamespaceIds_hxx) \
 	$(writerfilter_GEN_ooxml_QNameToStr_cxx) \
 	$(writerfilter_GEN_ooxml_ResourceIds_hxx) \
@@ -60,13 +59,11 @@ writerfilter_DEP_ooxml_Namespaces_txt=$(call gb_CustomTarget_get_workdir,oox/gen
 writerfilter_GEN_ooxml_FactoryValues_hxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_values.hxx
 writerfilter_GEN_ooxml_Factory_cxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_generated.cxx
 writerfilter_GEN_ooxml_Factory_hxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_generated.hxx
-writerfilter_GEN_ooxml_GperfFastToken_hxx=$(writerfilter_WORK)/ooxml/gperffasttoken.hxx
 writerfilter_GEN_ooxml_Model_processed=$(writerfilter_WORK)/ooxml/model_preprocessed.xml
 writerfilter_GEN_ooxml_NamespaceIds_hxx=$(writerfilter_WORK)/ooxml/OOXMLnamespaceids.hxx
 writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx
 writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx
 writerfilter_GEN_ooxml_Token_xml=$(writerfilter_WORK)/ooxml/token.xml
-writerfilter_SRC_ooxml_GperfFastTokenHandler_py=$(writerfilter_SRC)/ooxml/gperffasttokenhandler.py
 writerfilter_SRC_ooxml_Model=$(writerfilter_SRC)/ooxml/model.xml
 writerfilter_SRC_ooxml_Preprocess_py=$(writerfilter_SRC)/ooxml/modelpreprocess.py
 writerfilter_SRC_ooxml_QNameToStr_py=$(writerfilter_SRC)/ooxml/qnametostr.py
@@ -80,11 +77,6 @@ $(writerfilter_GEN_ooxml_Factory_hxx) : $(writerfilter_SRC)/ooxml/factoryinc.py
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
 	$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
 
-$(writerfilter_GEN_ooxml_GperfFastToken_hxx) : $(writerfilter_SRC_ooxml_GperfFastTokenHandler_py) $(writerfilter_GEN_ooxml_Token_xml)
-	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,GPF,1)
-	$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_GperfFastTokenHandler_py) $(writerfilter_GEN_ooxml_Token_xml)) \
-	| tr -d '\r' | $(GPERF) -c -E -G -I  -LC++ -S1 -t  > $@
-
 $(writerfilter_GEN_ooxml_Model_processed) : $(writerfilter_SRC_ooxml_Preprocess_py) $(writerfilter_DEP_ooxml_Namespaces_txt) $(writerfilter_SRC_ooxml_Model) | $(writerfilter_WORK)/ooxml/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
 	$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_Preprocess_py) $(writerfilter_DEP_ooxml_Namespaces_txt) $(writerfilter_SRC_ooxml_Model)) > $@
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 0cc5ddd..4a7e3fb 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -117,7 +117,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
     writerfilter/source/ooxml/OOXMLFactory \
     writerfilter/source/ooxml/OOXMLFastContextHandler \
     writerfilter/source/ooxml/OOXMLFastDocumentHandler \
-    writerfilter/source/ooxml/OOXMLFastTokenHandler \
     writerfilter/source/ooxml/OOXMLParserState \
     writerfilter/source/ooxml/OOXMLPropertySetImpl \
     writerfilter/source/ooxml/OOXMLStreamImpl \
diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
deleted file mode 100644
index 1295716..0000000
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <iostream>
-#include <string.h>
-#include <ooxml/resourceids.hxx>
-#include "OOXMLFastTokenHandler.hxx"
-
-#if defined __clang__
-#if __has_warning("-Wdeprecated-register")
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-register"
-#endif
-#endif
-#include "ooxml/gperffasttoken.hxx"
-#if defined __clang__
-#if __has_warning("-Wdeprecated-register")
-#pragma GCC diagnostic pop
-#endif
-#endif
-
-namespace writerfilter {
-namespace ooxml
-{
-
-using namespace ::std;
-
-OOXMLFastTokenHandler::OOXMLFastTokenHandler()
-{
-}
-
-// ::com::sun::star::xml::sax::XFastTokenHandler:
-::sal_Int32 SAL_CALL OOXMLFastTokenHandler::getToken(const OUString & Identifier)
-    throw (css::uno::RuntimeException, std::exception)
-{
-    ::sal_Int32 nResult = oox::XML_TOKEN_COUNT;
-
-    struct tokenmap::token * pToken =
-        tokenmap::Perfect_Hash::in_word_set
-        (OUStringToOString(Identifier, RTL_TEXTENCODING_ASCII_US).getStr(),
-         Identifier.getLength());
-
-    if (pToken != NULL)
-        nResult = pToken->nToken;
-
-#ifdef DEBUG_TOKEN
-    clog << "getToken: "
-         << OUStringToOString(Identifier, RTL_TEXTENCODING_ASCII_US).getStr()
-         << ", " << nResult
-         << endl;
-#endif
-
-    return nResult;
-}
-
-OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32)
-    throw (css::uno::RuntimeException, std::exception)
-{
-    // we use a Boost tokenmap, but tokenmaps cannot be indexed by an integer
-    for (;;) { std::abort(); } // avoid "must return a value" warnings
-}
-
-css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32)
-    throw (css::uno::RuntimeException, std::exception)
-{
-    // we use a Boost tokenmap, but tokenmaps cannot be indexed by an integer
-    for (;;) { std::abort(); } // avoid "must return a value" warnings
-}
-
-sal_Int32 OOXMLFastTokenHandler::getTokenDirect( const char *pStr, sal_Int32 nLength ) const
-{
-    struct tokenmap::token * pToken =
-        tokenmap::Perfect_Hash::in_word_set( pStr, nLength );
-
-    sal_Int32 nResult = pToken != NULL ? pToken->nToken : oox::XML_TOKEN_COUNT;
-
-#ifdef DEBUG_TOKEN
-    clog << "getTokenFromUTF8: "
-         << string(pStr, nLength)
-         << ", " << nResult
-         << (pToken == NULL ? ", failed" : "") << endl;
-#endif
-
-    return nResult;
-}
-
-::sal_Int32 SAL_CALL OOXMLFastTokenHandler::getTokenFromUTF8
-(const css::uno::Sequence< ::sal_Int8 > & Identifier) throw (css::uno::RuntimeException, std::exception)
-{
-    return getTokenDirect(reinterpret_cast<const char *>
-                          (Identifier.getConstArray()),
-                          Identifier.getLength());
-}
-
-}}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx
deleted file mode 100644
index 9a79749..0000000
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   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_SOURCE_OOXML_OOXMLFASTTOKENHANDLER_HXX
-#define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLFASTTOKENHANDLER_HXX
-
-#include "sal/config.h"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "cppuhelper/implbase1.hxx"
-#include "com/sun/star/xml/sax/XFastTokenHandler.hpp"
-#include "sax/fastattribs.hxx"
-
-namespace writerfilter {
-namespace ooxml
-{
-
-class OOXMLFastTokenHandler:
-    public ::cppu::WeakImplHelper1<
-        css::xml::sax::XFastTokenHandler>,
-    public sax_fastparser::FastTokenHandlerBase
-{
-public:
-    explicit OOXMLFastTokenHandler();
-
-    // ::com::sun::star::xml::sax::XFastTokenHandler:
-    virtual ::sal_Int32 SAL_CALL getToken(const OUString & Identifier) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual OUString SAL_CALL getIdentifier(::sal_Int32 Token) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getUTF8Identifier(::sal_Int32 Token) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< ::sal_Int8 > & Identifier) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    // Much faster direct C++ shortcut to the method that matters
-    virtual sal_Int32 getTokenDirect( const char *pToken, sal_Int32 nLength ) const SAL_OVERRIDE;
-
-private:
-    OOXMLFastTokenHandler(OOXMLFastTokenHandler &); // not defined
-    void operator =(OOXMLFastTokenHandler &); // not defined
-
-    virtual ~OOXMLFastTokenHandler() {}
-};
-
-}}
-#endif // INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLFASTTOKENHANDLER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/gperffasttokenhandler.py b/writerfilter/source/ooxml/gperffasttokenhandler.py
deleted file mode 100644
index 4da3418..0000000
--- a/writerfilter/source/ooxml/gperffasttokenhandler.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-from __future__ import print_function
-import xml.sax
-import sys
-
-
-class ContentHandler(xml.sax.handler.ContentHandler):
-    def __init__(self):
-        self.inFasttoken = False
-        self.chars = []
-
-    def startElement(self, name, attrs):
-        if name == "fasttoken":
-            self.inFasttoken = True
-
-    def endElement(self, name):
-        if name == "fasttoken":
-            chars = "".join(self.chars)
-            token = chars.replace('-', '_')
-            print("%s, oox::XML_%s" % (token, token))
-            self.chars = []
-            self.inFasttoken = False
-
-    def characters(self, characters):
-        if self.inFasttoken:
-            self.chars.append(characters)
-
-print("""
-%{
-#include "oox/token/tokens.hxx"
-
-namespace writerfilter { namespace ooxml { namespace tokenmap {
-%}
-struct token { const char * name; Token_t nToken; };
-%%""")
-
-parser = xml.sax.make_parser()
-parser.setContentHandler(ContentHandler())
-parser.parse(sys.argv[1])
-
-print("""FAST_TOKENS_END, oox::XML_TOKEN_COUNT
-%%
-
-}}}""")
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
commit 63cb2c865371cafaab763be656695e9cc75b8a15
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Aug 6 17:42:39 2014 +0200

    writerfilter: switch to the oox FastTokenHandler
    
    Possibly they did something different in the past, but currently they do
    the same. This commit just switches the handler, the newly unused code
    will be removed in a later commit.
    
    Change-Id: Ic5bade876c264e025543728916d9bcd871e32b9b

diff --git a/include/oox/core/fasttokenhandler.hxx b/include/oox/core/fasttokenhandler.hxx
index 1730f73..23d2076 100644
--- a/include/oox/core/fasttokenhandler.hxx
+++ b/include/oox/core/fasttokenhandler.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_OOX_CORE_FASTTOKENHANDLER_HXX
 #define INCLUDED_OOX_CORE_FASTTOKENHANDLER_HXX
 
+#include <oox/dllapi.h>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
 #include <cppuhelper/implbase2.hxx>
@@ -37,7 +38,7 @@ typedef ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, ::com::su
 /** Wrapper implementing the com.sun.star.xml.sax.XFastTokenHandler API interface
     that provides access to the tokens generated from the internal token name list.
  */
-class FastTokenHandler : public FastTokenHandler_BASE,
+class OOX_DLLPUBLIC FastTokenHandler : public FastTokenHandler_BASE,
                          public sax_fastparser::FastTokenHandlerBase
 {
 public:
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 64b8f8e..a22a52f 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -18,7 +18,7 @@
  */
 
 #include "OOXMLStreamImpl.hxx"
-#include "OOXMLFastTokenHandler.hxx"
+#include "oox/core/fasttokenhandler.hxx"
 #include <iostream>
 
 #include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
@@ -412,7 +412,7 @@ uno::Reference<uno::XComponentContext> OOXMLStreamImpl::getContext()
 uno::Reference <xml::sax::XFastTokenHandler> OOXMLStreamImpl::getFastTokenHandler()
 {
     if (! mxFastTokenHandler.is())
-        mxFastTokenHandler.set(new OOXMLFastTokenHandler());
+        mxFastTokenHandler.set(new oox::core::FastTokenHandler());
 
     return mxFastTokenHandler;
 }


More information about the Libreoffice-commits mailing list