[Libreoffice-commits] core.git: include/xmloff xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 3 11:53:03 UTC 2020
include/xmloff/xmlstyle.hxx | 2 +-
xmloff/source/core/xmlimp.cxx | 28 ++++++++++++++--------------
xmloff/source/draw/shapeimport.cxx | 4 ++--
xmloff/source/style/xmlstyle.cxx | 8 ++++----
xmloff/source/text/txtimp.cxx | 2 +-
5 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit 528dc27c3d97846bd0d73ef30e1c9c66daba425a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 3 10:45:40 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 3 13:52:18 2020 +0200
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 at collabora.co.uk>
diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx
index e6de64251f34..017b2c56af47 100644
--- a/include/xmloff/xmlstyle.hxx
+++ b/include/xmloff/xmlstyle.hxx
@@ -238,7 +238,7 @@ public:
// This method must be called to release the references to all styles
// that are stored in the context.
- void Clear();
+ void dispose();
bool IsAutomaticStyle() const;
};
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)
More information about the Libreoffice-commits
mailing list