[Libreoffice-commits] core.git: include/xmloff xmloff/source
Tomaž Vajngerl
tomaz.vajngerl at collabora.co.uk
Tue Jun 19 09:31:40 UTC 2018
include/xmloff/XMLFontAutoStylePool.hxx | 4 +--
xmloff/source/style/XMLFontAutoStylePool.cxx | 28 +++++++++++++--------------
2 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit 8db2426f36133d5e709f57be31e0c8630c30ed53
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date: Sat Jun 16 14:41:49 2018 +0200
xmloff: add m_ prefix to instance vars in XMLFontAutoStylePool
Change-Id: I42bb50f3857392ffb15741942bbe8cef255a41f7
Reviewed-on: https://gerrit.libreoffice.org/55930
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/xmloff/XMLFontAutoStylePool.hxx b/include/xmloff/XMLFontAutoStylePool.hxx
index dabb3e5759ff..e747bb8b20d8 100644
--- a/include/xmloff/XMLFontAutoStylePool.hxx
+++ b/include/xmloff/XMLFontAutoStylePool.hxx
@@ -35,9 +35,9 @@ class XMLOFF_DLLPUBLIC XMLFontAutoStylePool : public salhelper::SimpleReferenceO
{
SvXMLExport& rExport;
- std::unique_ptr<XMLFontAutoStylePool_Impl> pPool;
+ std::unique_ptr<XMLFontAutoStylePool_Impl> m_pFontAutoStylePool;
std::set<OUString> m_aNames;
- bool tryToEmbedFonts;
+ bool m_bTryToEmbedFonts;
OUString embedFontFile( const OUString& fontUrl );
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index c33956a591b5..9af923bc3036 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -137,10 +137,10 @@ public:
}
};
-XMLFontAutoStylePool::XMLFontAutoStylePool( SvXMLExport& rExp, bool _tryToEmbedFonts ) :
+XMLFontAutoStylePool::XMLFontAutoStylePool(SvXMLExport& rExp, bool bTryToEmbedFonts) :
rExport( rExp ),
- pPool( new XMLFontAutoStylePool_Impl ),
- tryToEmbedFonts( _tryToEmbedFonts )
+ m_pFontAutoStylePool( new XMLFontAutoStylePool_Impl ),
+ m_bTryToEmbedFonts( bTryToEmbedFonts )
{
}
@@ -158,8 +158,8 @@ OUString XMLFontAutoStylePool::Add(
OUString sPoolName;
XMLFontAutoStylePoolEntry_Impl aTmp( rFamilyName, rStyleName, nFamily,
nPitch, eEnc );
- XMLFontAutoStylePool_Impl::const_iterator it = pPool->find( &aTmp );
- if( it != pPool->end() )
+ XMLFontAutoStylePool_Impl::const_iterator it = m_pFontAutoStylePool->find( &aTmp );
+ if( it != m_pFontAutoStylePool->end() )
{
sPoolName = (*it)->GetName();
}
@@ -195,8 +195,9 @@ OUString XMLFontAutoStylePool::Add(
XMLFontAutoStylePoolEntry_Impl *pEntry =
new XMLFontAutoStylePoolEntry_Impl( sName, rFamilyName, rStyleName,
nFamily, nPitch, eEnc );
- pPool->insert( pEntry );
+ m_pFontAutoStylePool->insert( pEntry );
m_aNames.insert(sName);
+ printf ("%s\n", sName.toUtf8().getStr());
}
return sPoolName;
@@ -212,8 +213,8 @@ OUString XMLFontAutoStylePool::Find(
OUString sName;
XMLFontAutoStylePoolEntry_Impl aTmp( rFamilyName, rStyleName, nFamily,
nPitch, eEnc );
- XMLFontAutoStylePool_Impl::const_iterator it = pPool->find( &aTmp );
- if( it != pPool->end() )
+ XMLFontAutoStylePool_Impl::const_iterator it = m_pFontAutoStylePool->find( &aTmp );
+ if( it != m_pFontAutoStylePool->end() )
{
sName = (*it)->GetName();
}
@@ -299,10 +300,10 @@ void XMLFontAutoStylePool::exportXML()
const SvXMLUnitConverter& rUnitConv = GetExport().GetMM100UnitConverter();
std::map< OUString, OUString > fontFilesMap; // our url to document url
- sal_uInt32 nCount = pPool->size();
+ sal_uInt32 nCount = m_pFontAutoStylePool->size();
for( sal_uInt32 i=0; i<nCount; i++ )
{
- const XMLFontAutoStylePoolEntry_Impl *pEntry = (*pPool)[ i ];
+ const XMLFontAutoStylePoolEntry_Impl *pEntry = (*m_pFontAutoStylePool)[ i ];
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_NAME, pEntry->GetName() );
@@ -337,16 +338,15 @@ void XMLFontAutoStylePool::exportXML()
XML_FONT_FACE,
true, true );
- if( tryToEmbedFonts )
+ if (m_bTryToEmbedFonts)
{
const bool bExportFlat( GetExport().getExportFlags() & SvXMLExportFlags::EMBEDDED );
std::vector< EmbeddedFontInfo > aEmbeddedFonts;
static const FontWeight weight[] = { WEIGHT_NORMAL, WEIGHT_BOLD, WEIGHT_NORMAL, WEIGHT_BOLD };
static const FontItalic italic[] = { ITALIC_NONE, ITALIC_NONE, ITALIC_NORMAL, ITALIC_NORMAL };
assert( SAL_N_ELEMENTS( weight ) == SAL_N_ELEMENTS( italic ));
- for( unsigned int j = 0;
- j < SAL_N_ELEMENTS( weight );
- ++j )
+
+ for (unsigned int j = 0; j < SAL_N_ELEMENTS(weight); ++j)
{
// Embed font if at least viewing is allowed (in which case the opening app must check
// the font license rights too and open either read-only or not use the font for editing).
More information about the Libreoffice-commits
mailing list