[Libreoffice-commits] core.git: sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 26 09:13:17 UTC 2021


 sw/source/filter/xml/xmliteme.cxx |   16 ++++++++--------
 sw/source/filter/xml/xmltble.cxx  |   14 +++++++-------
 sw/source/filter/xml/xmltbli.cxx  |    6 +++---
 sw/source/filter/xml/xmltexti.cxx |   36 ++++++++++++++++++------------------
 sw/source/filter/xml/xmltexti.hxx |    2 +-
 5 files changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 1cca6ad35e648ba7fa9a4b5814541c3525ef3a28
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jul 26 08:41:41 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jul 26 11:12:44 2021 +0200

    sw: prefix members of SwXMLTableColContext_Impl, SwXMLTableColumn_Impl, ...
    
    ... SwXMLTableItemMapper_Impl and SwXMLTextImportHelper
    
    See tdf#94879 for motivation.
    
    Change-Id: Iddb5f25ba54b877be494f915ae0ae2eebc3abb3c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119491
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 447abab52b67..d60cc12b7d12 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -44,11 +44,11 @@ namespace {
 
 class SwXMLTableItemMapper_Impl: public SvXMLExportItemMapper
 {
-    SwXMLBrushItemExport aBrushItemExport;
+    SwXMLBrushItemExport m_aBrushItemExport;
 
 protected:
 
-    sal_uInt32 nAbsWidth;
+    sal_uInt32 m_nAbsWidth;
 
     static void AddAttribute( sal_uInt16 nPrefix, enum XMLTokenEnum eLName,
                        const OUString& rValue,
@@ -81,8 +81,8 @@ SwXMLTableItemMapper_Impl::SwXMLTableItemMapper_Impl(
         SvXMLItemMapEntriesRef rMapEntries,
         SwXMLExport& rExp ) :
     SvXMLExportItemMapper( std::move(rMapEntries) ),
-    aBrushItemExport( rExp ),
-    nAbsWidth( USHRT_MAX )
+    m_aBrushItemExport( rExp ),
+    m_nAbsWidth( USHRT_MAX )
 {
 }
 
@@ -174,10 +174,10 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem(
             switch( nMemberId )
             {
             case MID_FRMSIZE_WIDTH:
-                if( nAbsWidth )
+                if( m_nAbsWidth )
                 {
                     OUStringBuffer sBuffer;
-                    rUnitConverter.convertMeasureToXML( sBuffer, nAbsWidth );
+                    rUnitConverter.convertMeasureToXML( sBuffer, m_nAbsWidth );
                     AddAttribute( rEntry.nNameSpace, rEntry.eLocalName,
                                   sBuffer.makeStringAndClear(),
                                   rNamespaceMap, rAttrList );
@@ -210,7 +210,7 @@ void SwXMLTableItemMapper_Impl::handleElementItem(
     {
     case RES_BACKGROUND:
         {
-            const_cast<SwXMLTableItemMapper_Impl *>(this)->aBrushItemExport.exportXML(
+            const_cast<SwXMLTableItemMapper_Impl *>(this)->m_aBrushItemExport.exportXML(
                                                 static_cast<const SvxBrushItem&>(rItem) );
         }
         break;
@@ -219,7 +219,7 @@ void SwXMLTableItemMapper_Impl::handleElementItem(
 
 inline void SwXMLTableItemMapper_Impl::SetAbsWidth( sal_uInt32 nAbs )
 {
-    nAbsWidth = nAbs;
+    m_nAbsWidth = nAbs;
 }
 
 void SwXMLExport::InitItemExport()
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 492eb5f7520a..90764b3ee19f 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -69,21 +69,21 @@ using std::advance;
 
 class SwXMLTableColumn_Impl : public SwWriteTableCol
 {
-    OUString    sStyleName;
-    sal_uInt32  nRelWidth;
+    OUString    m_sStyleName;
+    sal_uInt32  m_nRelWidth;
 
 public:
 
     explicit SwXMLTableColumn_Impl(sal_uInt32 nPosition)
         : SwWriteTableCol(nPosition)
-        , nRelWidth(0)
+        , m_nRelWidth(0)
     {};
 
-    void SetStyleName( const OUString& rName ) { sStyleName = rName; }
-    const OUString& GetStyleName() const { return sStyleName; }
+    void SetStyleName( const OUString& rName ) { m_sStyleName = rName; }
+    const OUString& GetStyleName() const { return m_sStyleName; }
 
-    void SetRelWidth( sal_uInt32 nSet ) { nRelWidth = nSet; }
-    sal_uInt32 GetRelWidth() const { return nRelWidth; }
+    void SetRelWidth( sal_uInt32 nSet ) { m_nRelWidth = nSet; }
+    sal_uInt32 GetRelWidth() const { return m_nRelWidth; }
 };
 
 namespace {
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 560fe1c81e1f..ffd284926fcf 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -639,9 +639,9 @@ namespace {
 
 class SwXMLTableColContext_Impl : public SvXMLImportContext
 {
-    SvXMLImportContextRef   xMyTable;
+    SvXMLImportContextRef   m_xMyTable;
 
-    SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
+    SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(m_xMyTable.get()); }
 
 public:
 
@@ -660,7 +660,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
         const Reference< xml::sax::XFastAttributeList > & xAttrList,
         SwXMLTableContext *pTable ) :
     SvXMLImportContext( rImport ),
-    xMyTable( pTable )
+    m_xMyTable( pTable )
 {
     sal_uInt32 nColRep = 1;
     OUString aStyleName, aDfltCellStyleName;
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 97b1fbd9e1f2..189e26bb57e1 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -157,10 +157,10 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
         bool bBlockM, bool bOrganizerM ) :
     XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, true/*bProgress*/,
                          bBlockM, bOrganizerM ),
-    pRedlineHelper( nullptr )
+    m_pRedlineHelper( nullptr )
 {
     uno::Reference<XPropertySet> xDocPropSet( rModel, UNO_QUERY );
-    pRedlineHelper = new XMLRedlineImportHelper(rImport,
+    m_pRedlineHelper = new XMLRedlineImportHelper(rImport,
         bInsertM || bBlockM, xDocPropSet, rInfoSet );
 }
 
@@ -170,7 +170,7 @@ SwXMLTextImportHelper::~SwXMLTextImportHelper()
     // and may throw an exception while doing so... catch this
     try
     {
-        delete pRedlineHelper;
+        delete m_pRedlineHelper;
     }
     catch ( const RuntimeException& )
     {
@@ -976,9 +976,9 @@ void SwXMLTextImportHelper::RedlineAdd(
     bool bMergeLastPara)
 {
     // create redline helper on demand
-    OSL_ENSURE(nullptr != pRedlineHelper, "helper should have been created in constructor");
-    if (nullptr != pRedlineHelper)
-        pRedlineHelper->Add(rType, rId, rAuthor, rComment, rDateTime,
+    OSL_ENSURE(nullptr != m_pRedlineHelper, "helper should have been created in constructor");
+    if (nullptr != m_pRedlineHelper)
+        m_pRedlineHelper->Add(rType, rId, rAuthor, rComment, rDateTime,
                             bMergeLastPara);
 }
 
@@ -988,9 +988,9 @@ uno::Reference<XTextCursor> SwXMLTextImportHelper::RedlineCreateText(
 {
     uno::Reference<XTextCursor> xRet;
 
-    if (nullptr != pRedlineHelper)
+    if (nullptr != m_pRedlineHelper)
     {
-        xRet = pRedlineHelper->CreateRedlineTextSection(rOldCursor, rId);
+        xRet = m_pRedlineHelper->CreateRedlineTextSection(rOldCursor, rId);
     }
 
     return xRet;
@@ -1001,9 +1001,9 @@ void SwXMLTextImportHelper::RedlineSetCursor(
     bool bStart,
     bool bIsOutsideOfParagraph)
 {
-    if (nullptr != pRedlineHelper) {
+    if (nullptr != m_pRedlineHelper) {
         uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
-        pRedlineHelper->SetCursor(rId, bStart, xTextRange,
+        m_pRedlineHelper->SetCursor(rId, bStart, xTextRange,
                                   bIsOutsideOfParagraph);
     }
     // else: ignore redline (wasn't added before, else we'd have a helper)
@@ -1012,9 +1012,9 @@ void SwXMLTextImportHelper::RedlineSetCursor(
 void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor()
 {
     OUString rId = GetOpenRedlineId();
-    if ((nullptr != pRedlineHelper) && !rId.isEmpty())
+    if ((nullptr != m_pRedlineHelper) && !rId.isEmpty())
     {
-        pRedlineHelper->AdjustStartNodeCursor(rId);
+        m_pRedlineHelper->AdjustStartNodeCursor(rId);
         ResetOpenRedlineId();
     }
     // else: ignore redline (wasn't added before, or no open redline ID
@@ -1022,21 +1022,21 @@ void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor()
 
 void SwXMLTextImportHelper::SetShowChanges( bool bShowChanges )
 {
-    if ( nullptr != pRedlineHelper )
-        pRedlineHelper->SetShowChanges( bShowChanges );
+    if ( nullptr != m_pRedlineHelper )
+        m_pRedlineHelper->SetShowChanges( bShowChanges );
 }
 
 void SwXMLTextImportHelper::SetRecordChanges( bool bRecordChanges )
 {
-    if ( nullptr != pRedlineHelper )
-        pRedlineHelper->SetRecordChanges( bRecordChanges );
+    if ( nullptr != m_pRedlineHelper )
+        m_pRedlineHelper->SetRecordChanges( bRecordChanges );
 }
 
 void SwXMLTextImportHelper::SetChangesProtectionKey(
     const Sequence<sal_Int8> & rKey )
 {
-    if ( nullptr != pRedlineHelper )
-        pRedlineHelper->SetProtectionKey( rKey );
+    if ( nullptr != m_pRedlineHelper )
+        m_pRedlineHelper->SetProtectionKey( rKey );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx
index 067472e5a98f..40d5b169f19d 100644
--- a/sw/source/filter/xml/xmltexti.hxx
+++ b/sw/source/filter/xml/xmltexti.hxx
@@ -26,7 +26,7 @@ class SvXMLImport;
 
 class SwXMLTextImportHelper : public XMLTextImportHelper
 {
-    XMLRedlineImportHelper *pRedlineHelper;
+    XMLRedlineImportHelper *m_pRedlineHelper;
 
 protected:
     virtual SvXMLImportContext *CreateTableChildContext(


More information about the Libreoffice-commits mailing list