writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 7 +++---- writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 4 ++-- writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx | 2 +- writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx | 4 ++-- writerfilter/source/ooxml/OOXMLParserState.cxx | 4 ++-- writerfilter/source/ooxml/OOXMLParserState.hxx | 8 ++++---- 6 files changed, 14 insertions(+), 15 deletions(-)
New commits: commit 359a7d4b7fe3ea2c8f18d1f2b4a17c60ac42ae1d Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Mar 21 12:40:40 2014 +0100 Remove unnecessary dynamic_cast OOXMLDocumentImpl is the only implementation of OOXMLDocument, though code outside the ooxml directory has no access to OOXMLDocumentImpl. However, in that directory passing OOXMLDocumentImpl* as OOXMLDocument*, then using dynamic_cast to get back OOXMLDocumentImpl* is quite pointless. Change-Id: I06dcf85180def1db33b57bd356749f5d92aefa80 diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index b735441..ce4b3a9 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -558,8 +558,7 @@ void OOXMLFastContextHandler::setParent OOXMLPropertySet * OOXMLFastContextHandler::getPicturePropSet (const OUString & rId) { - return dynamic_cast<OOXMLDocumentImpl *>(mpParserState->getDocument())-> - getPicturePropSet(rId); + return mpParserState->getDocument()->getPicturePropSet(rId); } void OOXMLFastContextHandler::sendTableDepth() const @@ -1148,12 +1147,12 @@ void OOXMLFastContextHandler::setDefaultStringValue() { } -void OOXMLFastContextHandler::setDocument(OOXMLDocument * pDocument) +void OOXMLFastContextHandler::setDocument(OOXMLDocumentImpl* pDocument) { mpParserState->setDocument(pDocument); } -OOXMLDocument * OOXMLFastContextHandler::getDocument() +OOXMLDocumentImpl* OOXMLFastContextHandler::getDocument() { return mpParserState->getDocument(); } diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 9217da6..c7e7729 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -168,8 +168,8 @@ public: (Token_t Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs); - void setDocument(OOXMLDocument * pDocument); - OOXMLDocument * getDocument(); + void setDocument(OOXMLDocumentImpl* pDocument); + OOXMLDocumentImpl* getDocument(); void setXNoteId(OOXMLValue::Pointer_t pValue); void setXNoteId(const sal_Int32 nId); sal_Int32 getXNoteId() const; diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index 4df3596..4ac9f80 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -38,7 +38,7 @@ using namespace ::std; OOXMLFastDocumentHandler::OOXMLFastDocumentHandler( uno::Reference< uno::XComponentContext > const & context, Stream* pStream, - OOXMLDocument* pDocument, + OOXMLDocumentImpl* pDocument, sal_Int32 nXNoteId ) : m_xContext(context) , mpStream( pStream ) diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx index 00cf859..78aa358 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx @@ -43,7 +43,7 @@ public: OOXMLFastDocumentHandler( uno::Reference< uno::XComponentContext > const & context, Stream* pStream, - OOXMLDocument* pDocument, + OOXMLDocumentImpl* pDocument, sal_Int32 nXNoteId ); virtual ~OOXMLFastDocumentHandler() {} @@ -98,7 +98,7 @@ private: #ifdef DEBUG_ELEMENT Stream::Pointer_t mpTmpStream; #endif - OOXMLDocument * mpDocument; + OOXMLDocumentImpl* mpDocument; sal_Int32 mnXNoteId; mutable boost::shared_ptr<OOXMLFastContextHandler> mpContextHandler; boost::shared_ptr<OOXMLFastContextHandler> getContextHandler() const; diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index d8b562b..235e089 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -113,12 +113,12 @@ void OOXMLParserState::setHandle() mnHandle = mnContexts; } -void OOXMLParserState::setDocument(OOXMLDocument * pDocument) +void OOXMLParserState::setDocument(OOXMLDocumentImpl* pDocument) { mpDocument = pDocument; } -OOXMLDocument * OOXMLParserState::getDocument() const +OOXMLDocumentImpl* OOXMLParserState::getDocument() const { return mpDocument; } diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index 5762f35..16996fc 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -20,7 +20,7 @@ #define INCLUDE_OOXML_PARSER_STATE_HXX #include <stack> -#include <ooxml/OOXMLDocument.hxx> +#include "OOXMLDocumentImpl.hxx" #include "OOXMLPropertySetImpl.hxx" #if OSL_DEBUG_LEVEL > 1 @@ -43,7 +43,7 @@ class OOXMLParserState bool mbForwardEvents; unsigned int mnContexts; unsigned int mnHandle; - OOXMLDocument * mpDocument; + OOXMLDocumentImpl* mpDocument; OUString msTarget; OOXMLPropertySet::Pointer_t mpCharacterProps; stack<OOXMLPropertySet::Pointer_t> mCellProps; @@ -82,8 +82,8 @@ public: const string getHandle() const; void setHandle(); - void setDocument(OOXMLDocument * pDocument); - OOXMLDocument * getDocument() const; + void setDocument(OOXMLDocumentImpl* pDocument); + OOXMLDocumentImpl* getDocument() const; void setXNoteId(const sal_Int32 rId); sal_Int32 getXNoteId() const; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits