writerfilter: prefix members of DomainMapper, GraphicZOrderHelper, ...
... RTFSprms_compare and TagLogger See tdf#94879 for motivation. Change-Id: I94c432a3aa592f2deb32175938e19047cc65fa44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146852 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
||||
|
||||
private:
|
||||
using Items = std::map<sal_Int32, css::uno::Reference<css::beans::XPropertySet>>;
|
||||
Items items;
|
||||
Items m_items;
|
||||
};
|
||||
|
||||
} // namespace writerfilter::dmapper
|
||||
|
||||
@@ -4511,9 +4511,9 @@ SettingsTablePtr const & DomainMapper::GetSettingsTable()
|
||||
|
||||
GraphicZOrderHelper* DomainMapper::graphicZOrderHelper()
|
||||
{
|
||||
if (zOrderHelper == nullptr)
|
||||
zOrderHelper.reset( new GraphicZOrderHelper );
|
||||
return zOrderHelper.get();
|
||||
if (m_zOrderHelper == nullptr)
|
||||
m_zOrderHelper.reset( new GraphicZOrderHelper );
|
||||
return m_zOrderHelper.get();
|
||||
}
|
||||
|
||||
uno::Reference<drawing::XShape> DomainMapper::PopPendingShape()
|
||||
|
||||
@@ -183,7 +183,7 @@ private:
|
||||
bool mbIsSplitPara;
|
||||
bool mbHasControls;
|
||||
bool mbWasShapeInPara;
|
||||
std::unique_ptr< GraphicZOrderHelper > zOrderHelper;
|
||||
std::unique_ptr< GraphicZOrderHelper > m_zOrderHelper;
|
||||
OUString m_sGlossaryEntryName;
|
||||
};
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ text::WrapTextMode WrapHandler::getWrapMode( ) const
|
||||
|
||||
void GraphicZOrderHelper::addItem(uno::Reference<beans::XPropertySet> const& props, sal_Int32 const relativeHeight)
|
||||
{
|
||||
items[ relativeHeight ] = props;
|
||||
m_items[ relativeHeight ] = props;
|
||||
}
|
||||
|
||||
// The relativeHeight value in .docx is an arbitrary number, where only the relative ordering matters.
|
||||
@@ -281,7 +281,7 @@ void GraphicZOrderHelper::addItem(uno::Reference<beans::XPropertySet> const& pro
|
||||
sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldStyle )
|
||||
{
|
||||
// std::map is iterated sorted by key
|
||||
auto it = std::find_if(items.cbegin(), items.cend(),
|
||||
auto it = std::find_if(m_items.cbegin(), m_items.cend(),
|
||||
[relativeHeight, bOldStyle](const Items::value_type& rItem) {
|
||||
// Old-style ordering differs in what should happen when there is already an item with the same z-order:
|
||||
// we belong under it in case of new-style, but we belong above it in case of old-style.
|
||||
@@ -289,9 +289,9 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldSt
|
||||
}
|
||||
);
|
||||
sal_Int32 itemZOrderOffset(0); // before the item
|
||||
if( it == items.end()) // we're topmost
|
||||
if( it == m_items.end()) // we're topmost
|
||||
{
|
||||
if( items.empty())
|
||||
if( m_items.empty())
|
||||
return 0;
|
||||
--it;
|
||||
itemZOrderOffset = 1; // after the topmost
|
||||
|
||||
@@ -28,20 +28,20 @@ using namespace css;
|
||||
namespace writerfilter
|
||||
{
|
||||
TagLogger::TagLogger()
|
||||
: pWriter( nullptr ), pName( "DOMAINMAPPER" )
|
||||
: m_pWriter( nullptr ), m_pName( "DOMAINMAPPER" )
|
||||
{
|
||||
}
|
||||
|
||||
TagLogger::~TagLogger()
|
||||
{
|
||||
pWriter = nullptr;
|
||||
pName = nullptr;
|
||||
m_pWriter = nullptr;
|
||||
m_pName = nullptr;
|
||||
}
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
void TagLogger::setFileName( const std::string & filename )
|
||||
{
|
||||
if ( pWriter )
|
||||
if ( m_pWriter )
|
||||
endDocument();
|
||||
|
||||
std::string fileName;
|
||||
@@ -64,30 +64,30 @@ namespace writerfilter
|
||||
fileName += "/";
|
||||
fileName += sPrefix;
|
||||
fileName += ".";
|
||||
fileName += pName;
|
||||
fileName += m_pName;
|
||||
fileName += ".xml";
|
||||
|
||||
pWriter = xmlNewTextWriterFilename( fileName.c_str(), 0 );
|
||||
xmlTextWriterSetIndent(pWriter,1);
|
||||
(void)xmlTextWriterSetIndentString(pWriter, BAD_CAST(" "));
|
||||
xmlTextWriterSetIndent( pWriter, 4 );
|
||||
m_pWriter = xmlNewTextWriterFilename( fileName.c_str(), 0 );
|
||||
xmlTextWriterSetIndent(m_pWriter,1);
|
||||
(void)xmlTextWriterSetIndentString(m_pWriter, BAD_CAST(" "));
|
||||
xmlTextWriterSetIndent( m_pWriter, 4 );
|
||||
}
|
||||
|
||||
void TagLogger::startDocument()
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
(void)xmlTextWriterStartDocument( pWriter, nullptr, nullptr, nullptr );
|
||||
(void)xmlTextWriterStartElement( pWriter, BAD_CAST( "root" ) );
|
||||
(void)xmlTextWriterStartDocument( m_pWriter, nullptr, nullptr, nullptr );
|
||||
(void)xmlTextWriterStartElement( m_pWriter, BAD_CAST( "root" ) );
|
||||
}
|
||||
|
||||
void TagLogger::endDocument()
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
(void)xmlTextWriterEndDocument( pWriter );
|
||||
xmlFreeTextWriter( pWriter );
|
||||
pWriter = nullptr;
|
||||
(void)xmlTextWriterEndDocument( m_pWriter );
|
||||
xmlFreeTextWriter( m_pWriter );
|
||||
m_pWriter = nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -139,21 +139,21 @@ namespace writerfilter
|
||||
|
||||
void TagLogger::startElement(const std::string & name)
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
xmlChar* xmlName = xmlCharStrdup( name.c_str() );
|
||||
(void)xmlTextWriterStartElement( pWriter, xmlName );
|
||||
(void)xmlTextWriterStartElement( m_pWriter, xmlName );
|
||||
xmlFree( xmlName );
|
||||
}
|
||||
#endif
|
||||
|
||||
void TagLogger::attribute(const std::string & name, const std::string & value)
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
xmlChar* xmlName = xmlCharStrdup( name.c_str() );
|
||||
xmlChar* xmlValue = xmlCharStrdup( value.c_str() );
|
||||
(void)xmlTextWriterWriteAttribute( pWriter, xmlName, xmlValue );
|
||||
(void)xmlTextWriterWriteAttribute( m_pWriter, xmlName, xmlValue );
|
||||
|
||||
xmlFree( xmlValue );
|
||||
xmlFree( xmlName );
|
||||
@@ -167,27 +167,27 @@ namespace writerfilter
|
||||
|
||||
void TagLogger::attribute(const std::string & name, sal_uInt32 value)
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
xmlChar* xmlName = xmlCharStrdup( name.c_str() );
|
||||
(void)xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
|
||||
(void)xmlTextWriterWriteFormatAttribute( m_pWriter, xmlName,
|
||||
"%" SAL_PRIuUINT32, value );
|
||||
xmlFree( xmlName );
|
||||
}
|
||||
|
||||
void TagLogger::attribute(const std::string & name, float value)
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
xmlChar* xmlName = xmlCharStrdup( name.c_str() );
|
||||
(void)xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
|
||||
(void)xmlTextWriterWriteFormatAttribute( m_pWriter, xmlName,
|
||||
"%f", value );
|
||||
xmlFree( xmlName );
|
||||
}
|
||||
|
||||
void TagLogger::attribute(const std::string & name, const uno::Any& aAny)
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
|
||||
sal_Int32 nInt = 0;
|
||||
@@ -197,12 +197,12 @@ namespace writerfilter
|
||||
xmlChar* xmlName = xmlCharStrdup( name.c_str() );
|
||||
if ( aAny >>= nInt )
|
||||
{
|
||||
(void)xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
|
||||
(void)xmlTextWriterWriteFormatAttribute( m_pWriter, xmlName,
|
||||
"%" SAL_PRIdINT32, nInt );
|
||||
}
|
||||
else if ( aAny >>= nFloat )
|
||||
{
|
||||
(void)xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
|
||||
(void)xmlTextWriterWriteFormatAttribute( m_pWriter, xmlName,
|
||||
"%f", nFloat );
|
||||
}
|
||||
else if ( aAny >>= aStr )
|
||||
@@ -214,10 +214,10 @@ namespace writerfilter
|
||||
|
||||
void TagLogger::chars(const std::string & rChars)
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
xmlChar* xmlChars = xmlCharStrdup( rChars.c_str() );
|
||||
(void)xmlTextWriterWriteString( pWriter, xmlChars );
|
||||
(void)xmlTextWriterWriteString( m_pWriter, xmlChars );
|
||||
xmlFree( xmlChars );
|
||||
}
|
||||
|
||||
@@ -228,9 +228,9 @@ namespace writerfilter
|
||||
|
||||
void TagLogger::endElement()
|
||||
{
|
||||
if (!pWriter)
|
||||
if (!m_pWriter)
|
||||
return;
|
||||
(void)xmlTextWriterEndElement( pWriter );
|
||||
(void)xmlTextWriterEndElement( m_pWriter );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,8 +33,8 @@ namespace writerfilter
|
||||
class TagLogger
|
||||
{
|
||||
private:
|
||||
xmlTextWriterPtr pWriter;
|
||||
const char* pName;
|
||||
xmlTextWriterPtr m_pWriter;
|
||||
const char* m_pName;
|
||||
|
||||
public:
|
||||
explicit TagLogger();
|
||||
|
||||
@@ -59,16 +59,16 @@ namespace
|
||||
{
|
||||
class RTFSprms_compare
|
||||
{
|
||||
Id keyword;
|
||||
Id m_keyword;
|
||||
|
||||
public:
|
||||
RTFSprms_compare(Id kw)
|
||||
: keyword{ kw }
|
||||
RTFSprms_compare(Id keyword)
|
||||
: m_keyword{ keyword }
|
||||
{
|
||||
}
|
||||
bool operator()(const std::pair<Id, RTFValue::Pointer_t>& raPair) const
|
||||
{
|
||||
return raPair.first == keyword;
|
||||
return raPair.first == m_keyword;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user