summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-04-24 07:40:01 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-04-24 09:23:37 +0200
commit95aa39749b4dcc9cf06350dcb8c9a96373de5999 (patch)
treedb96f969cd50f24e79ec528c643a4bb8e49f97b0 /xmloff/source
parent12e23067fd0acad3e06df50cefaa0a2cd73df3b5 (diff)
sw: prefix members of XMLFontAutoStylePool, XMLPageExport, ...
... XMLStyleExport and XMLTextListAutoStylePool See tdf#94879 for motivation. Change-Id: If49190233b87bf86c83d56f02eedb1c010ef119c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150896 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx2
-rw-r--r--xmloff/source/style/XMLPageExport.cxx62
-rw-r--r--xmloff/source/style/styleexp.cxx8
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx44
4 files changed, 58 insertions, 58 deletions
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index e86709b6cc3d..5b00bbd7d97a 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -150,7 +150,7 @@ class XMLFontAutoStylePool_Impl : public o3tl::sorted_vector<std::unique_ptr<XML
};
XMLFontAutoStylePool::XMLFontAutoStylePool(SvXMLExport& rExp, bool bTryToEmbedFonts) :
- rExport( rExp ),
+ m_rExport( rExp ),
m_pFontAutoStylePool( new XMLFontAutoStylePool_Impl ),
m_bTryToEmbedFonts( bTryToEmbedFonts ),
m_bEmbedUsedOnly(false),
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 042a703982ba..a428cdf4c546 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -68,30 +68,30 @@ void XMLPageExport::collectPageMasterAutoStyle(
const Reference < XPropertySet > & rPropSet,
XMLPageExportNameEntry & rEntry)
{
- SAL_WARN_IF( !xPageMasterPropSetMapper.is(), "xmloff", "page master family/XMLPageMasterPropSetMapper not found" );
- if( xPageMasterPropSetMapper.is() )
+ SAL_WARN_IF( !m_xPageMasterPropSetMapper.is(), "xmloff", "page master family/XMLPageMasterPropSetMapper not found" );
+ if( m_xPageMasterPropSetMapper.is() )
{
- ::std::vector<XMLPropertyState> aPropStates = xPageMasterExportPropMapper->Filter(rExport, rPropSet);
+ ::std::vector<XMLPropertyState> aPropStates = m_xPageMasterExportPropMapper->Filter(m_rExport, rPropSet);
if( !aPropStates.empty())
{
OUString sParent;
- rEntry.sPageMasterName = rExport.GetAutoStylePool()->Find( XmlStyleFamily::PAGE_MASTER, sParent, aPropStates );
+ rEntry.sPageMasterName = m_rExport.GetAutoStylePool()->Find( XmlStyleFamily::PAGE_MASTER, sParent, aPropStates );
if (rEntry.sPageMasterName.isEmpty())
{
- rEntry.sPageMasterName = rExport.GetAutoStylePool()->Add(XmlStyleFamily::PAGE_MASTER, sParent, std::move(aPropStates));
+ rEntry.sPageMasterName = m_rExport.GetAutoStylePool()->Add(XmlStyleFamily::PAGE_MASTER, sParent, std::move(aPropStates));
}
}
}
assert(m_xPageMasterDrawingPageExportPropMapper.is());
::std::vector<XMLPropertyState> aPropStates(
- m_xPageMasterDrawingPageExportPropMapper->Filter(rExport, rPropSet));
+ m_xPageMasterDrawingPageExportPropMapper->Filter(m_rExport, rPropSet));
if (!aPropStates.empty())
{
OUString sParent;
- rEntry.sDrawingPageStyleName = rExport.GetAutoStylePool()->Find(XmlStyleFamily::SD_DRAWINGPAGE_ID, sParent, aPropStates);
+ rEntry.sDrawingPageStyleName = m_rExport.GetAutoStylePool()->Find(XmlStyleFamily::SD_DRAWINGPAGE_ID, sParent, aPropStates);
if (rEntry.sDrawingPageStyleName.isEmpty())
{
- rEntry.sDrawingPageStyleName = rExport.GetAutoStylePool()->Add(XmlStyleFamily::SD_DRAWINGPAGE_ID, sParent, std::move(aPropStates));
+ rEntry.sDrawingPageStyleName = m_rExport.GetAutoStylePool()->Add(XmlStyleFamily::SD_DRAWINGPAGE_ID, sParent, std::move(aPropStates));
}
}
}
@@ -124,7 +124,7 @@ bool XMLPageExport::exportStyle(
XMLPageExportNameEntry aEntry;
collectPageMasterAutoStyle(xPropSet, aEntry);
aEntry.sStyleName = rStyle->getName();
- aNameVector.push_back( aEntry );
+ m_aNameVector.push_back( aEntry );
exportMasterPageContent( xPropSet, true );
}
@@ -152,7 +152,7 @@ bool XMLPageExport::exportStyle(
sName);
XMLPageExportNameEntry entry;
- if (findPageMasterNameEntry(aNameVector, sName, entry))
+ if (findPageMasterNameEntry(m_aNameVector, sName, entry))
{
GetExport().AddAttribute(XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, GetExport().EncodeStyleName(entry.sPageMasterName));
if (!entry.sDrawingPageStyleName.isEmpty())
@@ -184,23 +184,23 @@ bool XMLPageExport::exportStyle(
}
XMLPageExport::XMLPageExport(SvXMLExport & rExp)
- : rExport(rExp)
- , xPageMasterPropHdlFactory(new XMLPageMasterPropHdlFactory)
- , xPageMasterPropSetMapper(new XMLPageMasterPropSetMapper(
+ : m_rExport(rExp)
+ , m_xPageMasterPropHdlFactory(new XMLPageMasterPropHdlFactory)
+ , m_xPageMasterPropSetMapper(new XMLPageMasterPropSetMapper(
aXMLPageMasterStyleMap,
- xPageMasterPropHdlFactory))
- , xPageMasterExportPropMapper(new XMLPageMasterExportPropMapper(
- xPageMasterPropSetMapper, rExp))
+ m_xPageMasterPropHdlFactory))
+ , m_xPageMasterExportPropMapper(new XMLPageMasterExportPropMapper(
+ m_xPageMasterPropSetMapper, rExp))
, m_xPageMasterDrawingPagePropSetMapper(new XMLPageMasterPropSetMapper(
g_XMLPageMasterDrawingPageStyleMap,
- xPageMasterPropHdlFactory))
+ m_xPageMasterPropHdlFactory))
// use same class but with different map, need its ContextFilter()
, m_xPageMasterDrawingPageExportPropMapper(new XMLPageMasterExportPropMapper(
m_xPageMasterDrawingPagePropSetMapper, rExp))
{
- rExport.GetAutoStylePool()->AddFamily( XmlStyleFamily::PAGE_MASTER, XML_STYLE_FAMILY_PAGE_MASTER_NAME,
- xPageMasterExportPropMapper, XML_STYLE_FAMILY_PAGE_MASTER_PREFIX, false );
- rExport.GetAutoStylePool()->AddFamily(XmlStyleFamily::SD_DRAWINGPAGE_ID, XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME,
+ m_rExport.GetAutoStylePool()->AddFamily( XmlStyleFamily::PAGE_MASTER, XML_STYLE_FAMILY_PAGE_MASTER_NAME,
+ m_xPageMasterExportPropMapper, XML_STYLE_FAMILY_PAGE_MASTER_PREFIX, false );
+ m_rExport.GetAutoStylePool()->AddFamily(XmlStyleFamily::SD_DRAWINGPAGE_ID, XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME,
m_xPageMasterDrawingPageExportPropMapper, XML_STYLE_FAMILY_SD_DRAWINGPAGE_PREFIX);
Reference< XStyleFamiliesSupplier > xFamiliesSupp( GetExport().GetModel(),
@@ -219,9 +219,9 @@ XMLPageExport::XMLPageExport(SvXMLExport & rExp)
if( xFamilies->hasByName( aPageStyleName ) )
{
- xPageStyles.set(xFamilies->getByName( aPageStyleName ),uno::UNO_QUERY);
+ m_xPageStyles.set(xFamilies->getByName( aPageStyleName ),uno::UNO_QUERY);
- SAL_WARN_IF( !xPageStyles.is(), "xmloff",
+ SAL_WARN_IF( !m_xPageStyles.is(), "xmloff",
"Page Styles not found for export!" );
}
}
@@ -242,7 +242,7 @@ XMLPageExport::XMLPageExport(SvXMLExport & rExp)
xProps->getPropertyValue("GutterAtTop") >>= bGutterAtTop;
if (bGutterAtTop)
{
- static_cast<XMLPageMasterExportPropMapper*>(xPageMasterExportPropMapper.get())
+ static_cast<XMLPageMasterExportPropMapper*>(m_xPageMasterExportPropMapper.get())
->SetGutterAtTop(true);
}
}
@@ -253,12 +253,12 @@ XMLPageExport::~XMLPageExport()
void XMLPageExport::exportStyles( bool bUsed, bool bAutoStyles )
{
- if( xPageStyles.is() )
+ if( m_xPageStyles.is() )
{
- const uno::Sequence< OUString> aSeq = xPageStyles->getElementNames();
+ const uno::Sequence< OUString> aSeq = m_xPageStyles->getElementNames();
for(const auto& rName : aSeq)
{
- Reference< XStyle > xStyle(xPageStyles->getByName( rName ),uno::UNO_QUERY);
+ Reference< XStyle > xStyle(m_xPageStyles->getByName( rName ),uno::UNO_QUERY);
if( !bUsed || xStyle->isInUse() )
exportStyle( xStyle, bAutoStyles );
}
@@ -267,10 +267,10 @@ void XMLPageExport::exportStyles( bool bUsed, bool bAutoStyles )
void XMLPageExport::exportAutoStyles()
{
- rExport.GetAutoStylePool()->exportXML(XmlStyleFamily::PAGE_MASTER);
+ m_rExport.GetAutoStylePool()->exportXML(XmlStyleFamily::PAGE_MASTER);
// tdf#103602 this is called by both Writer and Calc but Calc doesn't
// have fill properties yet
- rExport.GetAutoStylePool()->exportXML(XmlStyleFamily::SD_DRAWINGPAGE_ID);
+ m_rExport.GetAutoStylePool()->exportXML(XmlStyleFamily::SD_DRAWINGPAGE_ID);
}
void XMLPageExport::exportDefaultStyle()
@@ -287,10 +287,10 @@ void XMLPageExport::exportDefaultStyle()
GetExport().CheckAttrList();
::std::vector< XMLPropertyState > aPropStates =
- xPageMasterExportPropMapper->FilterDefaults(rExport, xPropSet);
+ m_xPageMasterExportPropMapper->FilterDefaults(m_rExport, xPropSet);
bool bExport = false;
- rtl::Reference < XMLPropertySetMapper > aPropMapper(xPageMasterExportPropMapper->getPropertySetMapper());
+ rtl::Reference < XMLPropertySetMapper > aPropMapper(m_xPageMasterExportPropMapper->getPropertySetMapper());
for( const auto& rProp : aPropStates )
{
sal_Int16 nContextId = aPropMapper->GetEntryContextId( rProp.mnIndex );
@@ -312,7 +312,7 @@ void XMLPageExport::exportDefaultStyle()
XML_DEFAULT_PAGE_LAYOUT,
true, true );
- xPageMasterExportPropMapper->exportXML( GetExport(), aPropStates,
+ m_xPageMasterExportPropMapper->exportXML( GetExport(), aPropStates,
SvXmlExportFlags::IGN_WS );
}
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 190ac47be5bc..aa3ad9719e8a 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -62,8 +62,8 @@ constexpr OUStringLiteral gsOutlineLevel( u"OutlineLevel" );
XMLStyleExport::XMLStyleExport(
SvXMLExport& rExp,
SvXMLAutoStylePoolP *pAutoStyleP ) :
- rExport( rExp ),
- pAutoStylePool( pAutoStyleP )
+ m_rExport( rExp ),
+ m_pAutoStylePool( pAutoStyleP )
{
}
@@ -526,8 +526,8 @@ void XMLStyleExport::exportStyleFamily(
// if an auto style pool is given, remember this style's name as a
// style name that must not be used by automatic styles.
- if (pAutoStylePool)
- pAutoStylePool->RegisterName( nFamily, xStyle->getName() );
+ if (m_pAutoStylePool)
+ m_pAutoStylePool->RegisterName( nFamily, xStyle->getName() );
}
if( !xExportedStyles )
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index 93a1f6794d5a..5f138010ec06 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -146,20 +146,20 @@ struct XMLTextListAutoStylePoolEntryCmp_Impl
class XMLTextListAutoStylePool_Impl : public o3tl::sorted_vector<std::unique_ptr<XMLTextListAutoStylePoolEntry_Impl>, XMLTextListAutoStylePoolEntryCmp_Impl> {};
XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) :
- rExport( rExp ),
- sPrefix( "L" ),
- pPool( new XMLTextListAutoStylePool_Impl ),
- nName( 0 )
+ m_rExport( rExp ),
+ m_sPrefix( "L" ),
+ m_pPool( new XMLTextListAutoStylePool_Impl ),
+ m_nName( 0 )
{
Reference<ucb::XAnyCompareFactory> xCompareFac( rExp.GetModel(), uno::UNO_QUERY );
if( xCompareFac.is() )
mxNumRuleCompare = xCompareFac->createAnyCompareByName( "NumberingRules" );
- SvXMLExportFlags nExportFlags = rExport.getExportFlags();
+ SvXMLExportFlags nExportFlags = m_rExport.getExportFlags();
bool bStylesOnly = (nExportFlags & SvXMLExportFlags::STYLES) && !(nExportFlags & SvXMLExportFlags::CONTENT);
if( bStylesOnly )
- sPrefix = "ML";
+ m_sPrefix = "ML";
- Reference<XStyleFamiliesSupplier> xFamiliesSupp(rExport.GetModel(), UNO_QUERY);
+ Reference<XStyleFamiliesSupplier> xFamiliesSupp(m_rExport.GetModel(), UNO_QUERY);
SAL_WARN_IF(!xFamiliesSupp.is(), "xmloff", "getStyleFamilies() from XModel failed for export!");
Reference< XNameAccess > xFamilies;
if (xFamiliesSupp.is())
@@ -192,14 +192,14 @@ sal_uInt32 XMLTextListAutoStylePool::Find( const XMLTextListAutoStylePoolEntry_I
{
if( !pEntry->IsNamed() && mxNumRuleCompare.is() )
{
- const sal_uInt32 nCount = pPool->size();
+ const sal_uInt32 nCount = m_pPool->size();
uno::Any aAny1, aAny2;
aAny1 <<= pEntry->GetNumRules();
for( sal_uInt32 nPos = 0; nPos < nCount; nPos++ )
{
- aAny2 <<= (*pPool)[nPos]->GetNumRules();
+ aAny2 <<= (*m_pPool)[nPos]->GetNumRules();
if( mxNumRuleCompare->compare( aAny1, aAny2 ) == 0 )
return nPos;
@@ -207,9 +207,9 @@ sal_uInt32 XMLTextListAutoStylePool::Find( const XMLTextListAutoStylePoolEntry_I
}
else
{
- XMLTextListAutoStylePool_Impl::const_iterator it = pPool->find( pEntry );
- if( it != pPool->end() )
- return it - pPool->begin();
+ XMLTextListAutoStylePool_Impl::const_iterator it = m_pPool->find( pEntry );
+ if( it != m_pPool->end() )
+ return it - m_pPool->begin();
}
return sal_uInt32(-1);
@@ -224,16 +224,16 @@ OUString XMLTextListAutoStylePool::Add(
sal_uInt32 nPos = Find( &aTmp );
if( nPos != sal_uInt32(-1) )
{
- sName = (*pPool)[ nPos ]->GetName();
+ sName = (*m_pPool)[ nPos ]->GetName();
}
else
{
std::unique_ptr<XMLTextListAutoStylePoolEntry_Impl> pEntry(
- new XMLTextListAutoStylePoolEntry_Impl( pPool->size(),
- rNumRules, m_aNames, sPrefix,
- nName ));
+ new XMLTextListAutoStylePoolEntry_Impl( m_pPool->size(),
+ rNumRules, m_aNames, m_sPrefix,
+ m_nName ));
sName = pEntry->GetName();
- pPool->insert( std::move(pEntry) );
+ m_pPool->insert( std::move(pEntry) );
}
return sName;
@@ -247,7 +247,7 @@ OUString XMLTextListAutoStylePool::Find(
sal_uInt32 nPos = Find( &aTmp );
if( nPos != sal_uInt32(-1) )
- sName = (*pPool)[ nPos ]->GetName();
+ sName = (*m_pPool)[ nPos ]->GetName();
return sName;
}
@@ -259,14 +259,14 @@ OUString XMLTextListAutoStylePool::Find(
XMLTextListAutoStylePoolEntry_Impl aTmp( rInternalName );
sal_uInt32 nPos = Find( &aTmp );
if( nPos != sal_uInt32(-1) )
- sName = (*pPool)[ nPos ]->GetName();
+ sName = (*m_pPool)[ nPos ]->GetName();
return sName;
}
void XMLTextListAutoStylePool::exportXML() const
{
- sal_uInt32 nCount = pPool->size();
+ sal_uInt32 nCount = m_pPool->size();
if( !nCount )
return;
@@ -275,12 +275,12 @@ void XMLTextListAutoStylePool::exportXML() const
sal_uInt32 i;
for( i=0; i < nCount; i++ )
{
- XMLTextListAutoStylePoolEntry_Impl *pEntry = (*pPool)[i].get();
+ XMLTextListAutoStylePoolEntry_Impl *pEntry = (*m_pPool)[i].get();
SAL_WARN_IF( pEntry->GetPos() >= nCount, "xmloff", "Illegal pos" );
aExpEntries[pEntry->GetPos()] = pEntry;
}
- SvxXMLNumRuleExport aNumRuleExp( rExport );
+ SvxXMLNumRuleExport aNumRuleExp( m_rExport );
for( i=0; i < nCount; i++ )
{