summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-03 10:45:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-03 13:52:18 +0200
commit528dc27c3d97846bd0d73ef30e1c9c66daba425a (patch)
tree55c37dbbdfb96d402e6d37c5728a8724f6ffe5a2 /xmloff
parent22fda7524385225d9264e48ee3f4811674f8239c (diff)
rename Clear() to dispose() in SvXMLStylesContext
to make it "clearer" this is part of the memory cleanup on destruction process Change-Id: I789bdfa0323cf759ed4db2e2a657e73e581d9eed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99990 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx28
-rw-r--r--xmloff/source/draw/shapeimport.cxx4
-rw-r--r--xmloff/source/style/xmlstyle.cxx8
-rw-r--r--xmloff/source/text/txtimp.cxx2
4 files changed, 21 insertions, 21 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index e305e69bff5b..387b4a8de19a 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -433,13 +433,13 @@ void SvXMLImport::cleanup() throw ()
while (!maFastContexts.empty())
{
if (SvXMLStylesContext* pStylesContext = dynamic_cast<SvXMLStylesContext*>(maFastContexts.top().get()))
- pStylesContext->Clear();
+ pStylesContext->dispose();
maFastContexts.pop();
}
while (!maContexts.empty())
{
if (SvXMLStylesContext* pStylesContext = dynamic_cast<SvXMLStylesContext*>(maContexts.top().get()))
- pStylesContext->Clear();
+ pStylesContext->dispose();
maContexts.pop();
}
if( mxTextImport )
@@ -627,13 +627,13 @@ void SAL_CALL SvXMLImport::endDocument()
}
if( mxFontDecls.is() )
- static_cast<SvXMLStylesContext *>(mxFontDecls.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxFontDecls.get())->dispose();
if( mxStyles.is() )
- static_cast<SvXMLStylesContext *>(mxStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->dispose();
if( mxAutoStyles.is() )
- static_cast<SvXMLStylesContext *>(mxAutoStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxAutoStyles.get())->dispose();
if( mxMasterStyles.is() )
- static_cast<SvXMLStylesContext *>(mxMasterStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxMasterStyles.get())->dispose();
// possible form-layer related knittings which can only be done when
// the whole document exists
@@ -1622,14 +1622,14 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
void SvXMLImport::SetFontDecls( XMLFontStylesContext *pFontDecls )
{
if (mxFontDecls.is())
- static_cast<SvXMLStylesContext*>(mxFontDecls.get())->Clear();
+ static_cast<SvXMLStylesContext*>(mxFontDecls.get())->dispose();
mxFontDecls = pFontDecls;
}
void SvXMLImport::SetStyles( SvXMLStylesContext *pStyles )
{
if (mxStyles.is())
- static_cast<SvXMLStylesContext*>(mxStyles.get())->Clear();
+ static_cast<SvXMLStylesContext*>(mxStyles.get())->dispose();
mxStyles = pStyles;
}
@@ -1653,7 +1653,7 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles )
}
}
if (mxAutoStyles.is())
- static_cast<SvXMLStylesContext*>(mxAutoStyles.get())->Clear();
+ static_cast<SvXMLStylesContext*>(mxAutoStyles.get())->dispose();
mxAutoStyles = pAutoStyles;
GetTextImport()->SetAutoStyles( pAutoStyles );
GetShapeImport()->SetAutoStylesContext( pAutoStyles );
@@ -1664,7 +1664,7 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles )
void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles )
{
if (mxMasterStyles.is())
- static_cast<SvXMLStylesContext*>(mxMasterStyles.get())->Clear();
+ static_cast<SvXMLStylesContext*>(mxMasterStyles.get())->dispose();
mxMasterStyles = pMasterStyles;
}
@@ -1873,13 +1873,13 @@ void SvXMLImport::SetError(
void SvXMLImport::DisposingModel()
{
if( mxFontDecls.is() )
- static_cast<SvXMLStylesContext *>(mxFontDecls.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxFontDecls.get())->dispose();
if( mxStyles.is() )
- static_cast<SvXMLStylesContext *>(mxStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxStyles.get())->dispose();
if( mxAutoStyles.is() )
- static_cast<SvXMLStylesContext *>(mxAutoStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxAutoStyles.get())->dispose();
if( mxMasterStyles.is() )
- static_cast<SvXMLStylesContext *>(mxMasterStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(mxMasterStyles.get())->dispose();
mxModel.set(nullptr);
mxEventListener.set(nullptr);
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 83cfa3880485..9fcae5b8b6a4 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -166,10 +166,10 @@ XMLShapeImportHelper::~XMLShapeImportHelper()
// Styles or AutoStyles context?
if(mxStylesContext.is())
- mxStylesContext->Clear();
+ mxStylesContext->dispose();
if(mxAutoStylesContext.is())
- mxAutoStylesContext->Clear();
+ mxAutoStylesContext->dispose();
}
const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap()
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 46c0a43db57d..7bd910df2d99 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -276,7 +276,7 @@ public:
}
inline void AddStyle( SvXMLStyleContext *pStyle );
- void Clear();
+ void dispose();
const SvXMLStyleContext *FindStyleChildContext( XmlStyleFamily nFamily,
const OUString& rName,
@@ -298,7 +298,7 @@ inline void SvXMLStylesContext_Impl::AddStyle( SvXMLStyleContext *pStyle )
FlushIndex();
}
-void SvXMLStylesContext_Impl::Clear()
+void SvXMLStylesContext_Impl::dispose()
{
FlushIndex();
aStyles.clear();
@@ -806,9 +806,9 @@ void SvXMLStylesContext::AddStyle(SvXMLStyleContext& rNew)
mpImpl->AddStyle( &rNew );
}
-void SvXMLStylesContext::Clear()
+void SvXMLStylesContext::dispose()
{
- mpImpl->Clear();
+ mpImpl->dispose();
}
void SvXMLStylesContext::CopyAutoStylesToDoc()
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 961cda1bfac7..6e4fefaa0cd2 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1051,7 +1051,7 @@ XMLTextImportHelper::~XMLTextImportHelper()
void XMLTextImportHelper::dispose()
{
if (m_xImpl->m_xAutoStyles)
- static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->Clear();
+ static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->dispose();
}
SvXMLImportPropertyMapper *XMLTextImportHelper::CreateShapeExtPropMapper(SvXMLImport& rImport)