diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-02-13 08:37:14 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-02-13 08:20:15 +0000 |
commit | 24f0e121b06252b323e237d9e7f47fcb28bff41e (patch) | |
tree | d4948898b782683a03ef32977a2e766a211a647a | |
parent | ce3d8f7e082afbc4a3139c723cb4533579523fe2 (diff) |
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
-rw-r--r-- | writerfilter/inc/dmapper/GraphicZOrderHelper.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/GraphicHelpers.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TagLogger.cxx | 62 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TagLogger.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.cxx | 8 |
7 files changed, 46 insertions, 46 deletions
diff --git a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx index a6458333b560..c6a308ddf819 100644 --- a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx +++ b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx @@ -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 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 61b4d6d114d4..c2e84cf1534a 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -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() diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index cb68954c7929..b9771b8ad749 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -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; }; diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 44949e28e754..67739d4986e5 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -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 diff --git a/writerfilter/source/dmapper/TagLogger.cxx b/writerfilter/source/dmapper/TagLogger.cxx index 69ffbbc09f39..7116ef2a5e58 100644 --- a/writerfilter/source/dmapper/TagLogger.cxx +++ b/writerfilter/source/dmapper/TagLogger.cxx @@ -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 diff --git a/writerfilter/source/dmapper/TagLogger.hxx b/writerfilter/source/dmapper/TagLogger.hxx index f3ab1575dba3..f6d38096255f 100644 --- a/writerfilter/source/dmapper/TagLogger.hxx +++ b/writerfilter/source/dmapper/TagLogger.hxx @@ -33,8 +33,8 @@ namespace writerfilter class TagLogger { private: - xmlTextWriterPtr pWriter; - const char* pName; + xmlTextWriterPtr m_pWriter; + const char* m_pName; public: explicit TagLogger(); diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx index 7a3e4d454687..d25c643071a6 100644 --- a/writerfilter/source/rtftok/rtfsprm.cxx +++ b/writerfilter/source/rtftok/rtfsprm.cxx @@ -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; } }; } |