diff options
-rw-r--r-- | reportdesign/source/filter/xml/xmlfilter.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexternaltabi.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexternaltabi.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLSectionList.cxx | 16 |
4 files changed, 13 insertions, 20 deletions
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 00f7fe86a9c5..e4df625cacce 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -86,7 +86,7 @@ using namespace ::com::sun::star::util; class RptMLMasterStylesContext_Impl: public XMLTextMasterStylesContext { - ORptFilter& m_rImport; + ORptFilter& GetImport() { return static_cast<ORptFilter&>(XMLTextMasterStylesContext::GetImport()); } public: @@ -106,14 +106,13 @@ RptMLMasterStylesContext_Impl::RptMLMasterStylesContext_Impl( const OUString& rLName , const uno::Reference< xml::sax::XAttributeList > & xAttrList ) : XMLTextMasterStylesContext( rImport, nPrfx, rLName, xAttrList ) - ,m_rImport(rImport) { } void RptMLMasterStylesContext_Impl::EndElement() { FinishStyles( true ); - m_rImport.FinishStyles(); + GetImport().FinishStyles(); } /// read a component (file + filter version) diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx index 8d0a810dad09..5515fd835ba5 100644 --- a/sc/source/filter/xml/xmlexternaltabi.cxx +++ b/sc/source/filter/xml/xmlexternaltabi.cxx @@ -43,7 +43,6 @@ ScXMLExternalRefTabSourceContext::ScXMLExternalRefTabSourceContext( ScXMLImport& rImport, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, ScXMLExternalTabData& rRefInfo ) : ScXMLImportContext( rImport ), - mrScImport(rImport), mrExternalRefInfo(rRefInfo) { using namespace ::xmloff::token; @@ -98,7 +97,7 @@ static bool lcl_isValidRelativeURL(const OUString& rUrl) void SAL_CALL ScXMLExternalRefTabSourceContext::endFastElement( sal_Int32 /*nElement*/ ) { - ScDocument* pDoc = mrScImport.GetDocument(); + ScDocument* pDoc = GetScImport().GetDocument(); if (!pDoc) return; @@ -111,7 +110,6 @@ void SAL_CALL ScXMLExternalRefTabSourceContext::endFastElement( sal_Int32 /*nEle ScXMLExternalRefRowsContext::ScXMLExternalRefRowsContext( ScXMLImport& rImport, ScXMLExternalTabData& rRefInfo ) : ScXMLImportContext( rImport ), - mrScImport(rImport), mrExternalRefInfo(rRefInfo) { } @@ -126,7 +124,7 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowsContext::createFas // #i101319# row elements inside group, rows or header-rows // are treated like row elements directly in the table element - const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowsElemTokenMap(); + const SvXMLTokenMap& rTokenMap = GetScImport().GetTableRowsElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get( nElement ); sax_fastparser::FastAttributeList *pAttribList = sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList ); @@ -137,10 +135,10 @@ Reference< XFastContextHandler > SAL_CALL ScXMLExternalRefRowsContext::createFas case XML_TOK_TABLE_ROWS_HEADER_ROWS: case XML_TOK_TABLE_ROWS_ROWS: return new ScXMLExternalRefRowsContext( - mrScImport, mrExternalRefInfo); + GetScImport(), mrExternalRefInfo); case XML_TOK_TABLE_ROWS_ROW: return new ScXMLExternalRefRowContext( - mrScImport, pAttribList, mrExternalRefInfo); + GetScImport(), pAttribList, mrExternalRefInfo); default: ; } diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx index 08e3fb2d2686..5afb5c5f9bfc 100644 --- a/sc/source/filter/xml/xmlexternaltabi.hxx +++ b/sc/source/filter/xml/xmlexternaltabi.hxx @@ -40,7 +40,6 @@ public: virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; private: - ScXMLImport& mrScImport; ScXMLExternalTabData& mrExternalRefInfo; OUString maRelativeUrl; @@ -61,7 +60,6 @@ public: const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; private: - ScXMLImport& mrScImport; ScXMLExternalTabData& mrExternalRefInfo; }; diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx index 1940ebfea478..2f835bd606a3 100644 --- a/sw/source/core/swg/SwXMLSectionList.cxx +++ b/sw/source/core/swg/SwXMLSectionList.cxx @@ -29,7 +29,7 @@ using namespace ::xmloff::token; class SvXMLSectionListContext : public SvXMLImportContext { private: - SwXMLSectionList & m_rImport; + SwXMLSectionList & GetImport() { return static_cast<SwXMLSectionList&>(SvXMLImportContext::GetImport()); } public: SvXMLSectionListContext(SwXMLSectionList& rImport); @@ -42,12 +42,11 @@ public: class SwXMLParentContext : public SvXMLImportContext { private: - SwXMLSectionList & m_rImport; + SwXMLSectionList & GetImport() { return static_cast<SwXMLSectionList&>(SvXMLImportContext::GetImport()); } public: SwXMLParentContext(SwXMLSectionList& rImport) : SvXMLImportContext(rImport) - , m_rImport(rImport) { } @@ -65,11 +64,11 @@ public: Element == XML_ELEMENT(TEXT, XML_INSERTION) || Element == XML_ELEMENT(TEXT, XML_DELETION)) { - return new SvXMLSectionListContext(m_rImport); + return new SvXMLSectionListContext(GetImport()); } else { - return new SwXMLParentContext(m_rImport); + return new SwXMLParentContext(GetImport()); } } }; @@ -102,8 +101,7 @@ SvXMLImportContext * SwXMLSectionList::CreateFastContext( } SvXMLSectionListContext::SvXMLSectionListContext( SwXMLSectionList& rImport ) - : SvXMLImportContext ( rImport ), - m_rImport(rImport) + : SvXMLImportContext ( rImport ) { } @@ -124,10 +122,10 @@ css::uno::Reference<css::xml::sax::XFastContextHandler> SvXMLSectionListContext: if (aIter.getToken() == (XML_NAMESPACE_TEXT | XML_NAME)) sName = aIter.toString(); if ( !sName.isEmpty() ) - m_rImport.m_rSectionList.push_back(sName); + GetImport().m_rSectionList.push_back(sName); } - pContext = new SvXMLSectionListContext(m_rImport); + pContext = new SvXMLSectionListContext(GetImport()); return pContext; } |