[Libreoffice-commits] core.git: 2 commits - writerfilter/inc writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Aug 6 01:39:57 PDT 2014
writerfilter/inc/ooxml/OOXMLDocument.hxx | 6 +++++-
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 6 ++----
writerfilter/source/ooxml/OOXMLFactory.cxx | 2 +-
writerfilter/source/ooxml/OOXMLFactory.hxx | 2 +-
writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx | 7 +++----
writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx | 4 +---
writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 6 ++----
writerfilter/source/ooxml/OOXMLStreamImpl.hxx | 3 +--
8 files changed, 16 insertions(+), 20 deletions(-)
New commits:
commit 4a93e2d99cd6b9ce554bc97ed2539d124b894c7b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Aug 6 10:38:32 2014 +0200
writerfilter: fix dbglevel=2 build
Change-Id: Ifd471e49cb167af48a9173762812164890e00791
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 9dda533..ab932c6 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -273,6 +273,10 @@ public:
void ooxmlidsToXML(::std::iostream & out);
+#ifdef DEBUG_DOMAINMAPPER
+std::string fastTokenToId(sal_uInt32 nToken);
+#endif
+
}}
#endif // INCLUDED_WRITERFILTER_INC_OOXML_OOXMLDOCUMENT_HXX
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 651cd6f..de24d2c 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -81,7 +81,7 @@ TokenToIdMapPointer OOXMLFactory_ns::getTokenToIdMap(Id nId)
}
#ifdef DEBUG_DOMAINMAPPER
-string OOXMLFactory_ns::getDefineName(Id /*nId*/) const
+std::string OOXMLFactory_ns::getDefineName(Id /*nId*/) const
{
return "";
}
diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx
index 567a392..bfa93c7 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.hxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.hxx
@@ -98,7 +98,7 @@ public:
virtual void endAction(OOXMLFastContextHandler * pHandler);
virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue);
#ifdef DEBUG_DOMAINMAPPER
- virtual string getDefineName(Id nId) const;
+ virtual std::string getDefineName(Id nId) const;
#endif
AttributeToResourceMapPointer getAttributeToResourceMap(Id nId);
commit c5613c51efcd4c97d5b2f33e11d635fb1484acd7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Aug 6 09:42:01 2014 +0200
OOXMLFastTokenHandler doesn't need an UNO context
Change-Id: I476d7e26d35e38d458f62c01f478ed2b54eed355
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 18c21da..9dda533 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -111,7 +111,7 @@ public:
virtual const OUString & getTarget() const = 0;
virtual css::uno::Reference<css::xml::sax::XFastTokenHandler>
- getFastTokenHandler(css::uno::Reference<css::uno::XComponentContext> rContext) = 0;
+ getFastTokenHandler() = 0;
};
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index aca59c1..1bef14e 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -94,8 +94,7 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler,
uno::Reference < xml::sax::XFastDocumentHandler > xDocumentHandler
(pDocHandler);
- uno::Reference < xml::sax::XFastTokenHandler > xTokenHandler
- (mpStream->getFastTokenHandler(xContext));
+ uno::Reference < xml::sax::XFastTokenHandler > xTokenHandler(mpStream->getFastTokenHandler());
xParser->setFastDocumentHandler(xDocumentHandler);
xParser->setTokenHandler(xTokenHandler);
@@ -471,8 +470,7 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
pDocHandler->setIsSubstream( mbIsSubstream );
uno::Reference < xml::sax::XFastDocumentHandler > xDocumentHandler
(pDocHandler);
- uno::Reference < xml::sax::XFastTokenHandler > xTokenHandler
- (mpStream->getFastTokenHandler(xContext));
+ uno::Reference < xml::sax::XFastTokenHandler > xTokenHandler(mpStream->getFastTokenHandler());
resolveFastSubStream(rStream, OOXMLStream::SETTINGS);
mxThemeDom = importSubStream(OOXMLStream::THEME);
diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
index b90b1e3..1295716 100644
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
@@ -41,10 +41,9 @@ namespace ooxml
using namespace ::std;
-OOXMLFastTokenHandler::OOXMLFastTokenHandler
-(css::uno::Reference< css::uno::XComponentContext > const & context)
-: m_xContext(context)
-{}
+OOXMLFastTokenHandler::OOXMLFastTokenHandler()
+{
+}
// ::com::sun::star::xml::sax::XFastTokenHandler:
::sal_Int32 SAL_CALL OOXMLFastTokenHandler::getToken(const OUString & Identifier)
diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx
index d1dc7e4..9a79749 100644
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx
@@ -36,7 +36,7 @@ class OOXMLFastTokenHandler:
public sax_fastparser::FastTokenHandlerBase
{
public:
- explicit OOXMLFastTokenHandler(css::uno::Reference< css::uno::XComponentContext > const & context);
+ 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;
@@ -52,8 +52,6 @@ private:
void operator =(OOXMLFastTokenHandler &); // not defined
virtual ~OOXMLFastTokenHandler() {}
-
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
};
}}
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 52b1028..64b8f8e 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -409,12 +409,10 @@ uno::Reference<uno::XComponentContext> OOXMLStreamImpl::getContext()
return mxContext;
}
-uno::Reference <xml::sax::XFastTokenHandler>
-OOXMLStreamImpl::getFastTokenHandler
-(uno::Reference<uno::XComponentContext> xContext)
+uno::Reference <xml::sax::XFastTokenHandler> OOXMLStreamImpl::getFastTokenHandler()
{
if (! mxFastTokenHandler.is())
- mxFastTokenHandler.set(new OOXMLFastTokenHandler(xContext));
+ mxFastTokenHandler.set(new OOXMLFastTokenHandler());
return mxFastTokenHandler;
}
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
index 5c83bfd..52224f3 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx
@@ -80,8 +80,7 @@ public:
virtual OUString getTargetForId(const OUString & rId) SAL_OVERRIDE;
virtual const OUString & getTarget() const SAL_OVERRIDE;
- virtual css::uno::Reference<css::xml::sax::XFastTokenHandler>
- getFastTokenHandler(css::uno::Reference<css::uno::XComponentContext> rContext) SAL_OVERRIDE;
+ virtual css::uno::Reference<css::xml::sax::XFastTokenHandler> getFastTokenHandler() SAL_OVERRIDE;
void setInputStream(css::uno::Reference<css::io::XInputStream> rxInputStream);
// Giving access to mxDocumentStream. It is needed by resolving custom xml to get list of customxml's used in document.
More information about the Libreoffice-commits
mailing list