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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 12 15:37:34 UTC 2021


 sw/source/filter/xml/XMLRedlineImportHelper.cxx |   24 ++++++++++++------------
 sw/source/filter/xml/xmlfmt.cxx                 |   24 ++++++++++++------------
 sw/source/filter/xml/xmlfmte.cxx                |   18 +++++++++---------
 sw/source/filter/xml/xmlitem.cxx                |   24 ++++++++++++------------
 sw/source/filter/xml/xmlitem.hxx                |    8 ++++----
 5 files changed, 49 insertions(+), 49 deletions(-)

New commits:
commit 10e36bac8dcf25372467ef97a28ad859922e6a3c
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jul 12 09:07:29 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jul 12 17:37:00 2021 +0200

    sw: prefix members of SwXMLAutoStylePoolP, SwXMLConditionContext_Impl, ...
    
    ... SwXMLItemSetContext and XTextRangeOrNodeIndexPosition
    
    See tdf#94879 for motivation.
    
    Change-Id: Ied25f44dd03fa7760613d89e11003028ce60982a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118764
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 2a4d939b2d0b..803cc78a04bb 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -87,8 +87,8 @@ namespace {
 
 class XTextRangeOrNodeIndexPosition
 {
-    Reference<XTextRange> xRange;
-    std::unique_ptr<SwNodeIndex> pIndex;    // pIndex will point to the *previous* node
+    Reference<XTextRange> m_xRange;
+    std::unique_ptr<SwNodeIndex> m_pIndex;    // pIndex will point to the *previous* node
 
 public:
     XTextRangeOrNodeIndexPosition();
@@ -111,15 +111,15 @@ XTextRangeOrNodeIndexPosition::XTextRangeOrNodeIndexPosition()
 
 void XTextRangeOrNodeIndexPosition::Set( Reference<XTextRange> const & rRange )
 {
-    xRange = rRange->getStart();    // set bookmark
-    pIndex.reset();
+    m_xRange = rRange->getStart();    // set bookmark
+    m_pIndex.reset();
 }
 
 void XTextRangeOrNodeIndexPosition::Set( SwNodeIndex const & rIndex )
 {
-    pIndex.reset( new SwNodeIndex(rIndex) );
-    (*pIndex)-- ;   // previous node!!!
-    xRange = nullptr;
+    m_pIndex.reset( new SwNodeIndex(rIndex) );
+    (*m_pIndex)-- ;   // previous node!!!
+    m_xRange = nullptr;
 }
 
 void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
@@ -149,17 +149,17 @@ XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos, SwDoc & rDoc)
     OSL_ENSURE(IsValid(), "Can't get Position");
 
     // create PAM from start cursor (if no node index is present)
-    if (nullptr == pIndex)
+    if (nullptr == m_pIndex)
     {
         SwUnoInternalPaM aUnoPaM(rDoc);
-        bool bSuccess = ::sw::XTextRangeToSwPaM(aUnoPaM, xRange);
+        bool bSuccess = ::sw::XTextRangeToSwPaM(aUnoPaM, m_xRange);
         OSL_ENSURE(bSuccess, "illegal range");
 
         rPos = *aUnoPaM.GetPoint();
     }
     else
     {
-        rPos.nNode = *pIndex;
+        rPos.nNode = *m_pIndex;
         rPos.nNode++;           // pIndex points to previous index !!!
         rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), 0 );
     }
@@ -169,12 +169,12 @@ SwDoc* XTextRangeOrNodeIndexPosition::GetDoc()
 {
     OSL_ENSURE(IsValid(), "Can't get Doc");
 
-    return (nullptr != pIndex) ? &pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
+    return (nullptr != m_pIndex) ? &m_pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(m_xRange);
 }
 
 bool XTextRangeOrNodeIndexPosition::IsValid() const
 {
-    return ( xRange.is() || (pIndex != nullptr) );
+    return ( m_xRange.is() || (m_pIndex != nullptr) );
 }
 
 // RedlineInfo: temporary storage for redline data
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index b1d5c7f8a019..7472cd50b068 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -199,10 +199,10 @@ namespace {
 
 class SwXMLConditionContext_Impl : public SvXMLImportContext
 {
-    Master_CollCondition nCondition;
-    sal_uInt32 nSubCondition;
+    Master_CollCondition m_nCondition;
+    sal_uInt32 m_nSubCondition;
 
-    OUString sApplyStyle;
+    OUString m_sApplyStyle;
 
 public:
 
@@ -210,11 +210,11 @@ public:
             SvXMLImport& rImport, sal_Int32 nElement,
             const uno::Reference< xml::sax::XFastAttributeList > & xAttrList );
 
-    bool IsValid() const { return Master_CollCondition::NONE != nCondition; }
+    bool IsValid() const { return Master_CollCondition::NONE != m_nCondition; }
 
-    Master_CollCondition getCondition() const { return nCondition; }
-    sal_uInt32 getSubCondition() const { return nSubCondition; }
-    OUString const &getApplyStyle() const { return sApplyStyle; }
+    Master_CollCondition getCondition() const { return m_nCondition; }
+    sal_uInt32 getSubCondition() const { return m_nSubCondition; }
+    OUString const &getApplyStyle() const { return m_sApplyStyle; }
 };
 
 }
@@ -223,8 +223,8 @@ SwXMLConditionContext_Impl::SwXMLConditionContext_Impl(
             SvXMLImport& rImport, sal_Int32 /*nElement*/,
             const uno::Reference< xml::sax::XFastAttributeList > & xAttrList ) :
     SvXMLImportContext( rImport ),
-    nCondition( Master_CollCondition::NONE ),
-    nSubCondition( 0 )
+    m_nCondition( Master_CollCondition::NONE ),
+    m_nSubCondition( 0 )
 {
     for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
     {
@@ -236,13 +236,13 @@ SwXMLConditionContext_Impl::SwXMLConditionContext_Impl(
                 SwXMLConditionParser_Impl aCondParser( sValue );
                 if( aCondParser.IsValid() )
                 {
-                    nCondition = aCondParser.GetCondition();
-                    nSubCondition = aCondParser.GetSubCondition();
+                    m_nCondition = aCondParser.GetCondition();
+                    m_nSubCondition = aCondParser.GetSubCondition();
                 }
                 break;
             }
             case XML_ELEMENT(STYLE, XML_APPLY_STYLE_NAME):
-                sApplyStyle = sValue;
+                m_sApplyStyle = sValue;
                 break;
             default:
                 XMLOFF_WARN_UNKNOWN("sw", aIter);
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index fc582dd39eda..f7866c5290f8 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -263,9 +263,9 @@ namespace {
 
 class SwXMLAutoStylePoolP : public SvXMLAutoStylePoolP
 {
-    SvXMLExport& rExport;
-    const OUString sListStyleName;
-    const OUString sMasterPageName;
+    SvXMLExport& m_rExport;
+    const OUString m_sListStyleName;
+    const OUString m_sMasterPageName;
 
 protected:
 
@@ -312,12 +312,12 @@ void SwXMLAutoStylePoolP::exportStyleAttributes(
                     // #i70748# - export also empty list styles
                     if( !sStyleName.isEmpty() )
                     {
-                        OUString sTmp = rExport.GetTextParagraphExport()->GetListAutoStylePool().Find( sStyleName );
+                        OUString sTmp = m_rExport.GetTextParagraphExport()->GetListAutoStylePool().Find( sStyleName );
                         if( !sTmp.isEmpty() )
                             sStyleName = sTmp;
                     }
                     GetExport().AddAttribute( XML_NAMESPACE_STYLE,
-                          sListStyleName,
+                          m_sListStyleName,
                           GetExport().EncodeStyleName( sStyleName ) );
                 }
                 break;
@@ -326,7 +326,7 @@ void SwXMLAutoStylePoolP::exportStyleAttributes(
                     OUString sStyleName;
                     rProperty.maValue >>= sStyleName;
                     GetExport().AddAttribute( XML_NAMESPACE_STYLE,
-                                  sMasterPageName,
+                                  m_sMasterPageName,
                                   GetExport().EncodeStyleName( sStyleName ) );
                 }
                 break;
@@ -337,9 +337,9 @@ void SwXMLAutoStylePoolP::exportStyleAttributes(
 
 SwXMLAutoStylePoolP::SwXMLAutoStylePoolP(SvXMLExport& rExp ) :
     SvXMLAutoStylePoolP( rExp ),
-    rExport( rExp ),
-    sListStyleName( GetXMLToken( XML_LIST_STYLE_NAME ) ),
-    sMasterPageName( GetXMLToken( XML_MASTER_PAGE_NAME ) )
+    m_rExport( rExp ),
+    m_sListStyleName( GetXMLToken( XML_LIST_STYLE_NAME ) ),
+    m_sMasterPageName( GetXMLToken( XML_MASTER_PAGE_NAME ) )
 {
 }
 
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index e97eb5f6922d..3bd1bad6b234 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -33,21 +33,21 @@ SwXMLItemSetContext::SwXMLItemSetContext( SvXMLImport& rImp, sal_Int32 /*nElemen
                                           SvXMLImportItemMapper& rIMap,
                                           const SvXMLUnitConverter& rUnitConverter ):
     SvXMLImportContext( rImp ),
-    rItemSet( rISet ),
-    rIMapper( rIMap ),
-    rUnitConv( rUnitConverter )
+    m_rItemSet( rISet ),
+    m_rIMapper( rIMap ),
+    m_rUnitConv( rUnitConverter )
 {
-    rIMap.importXML( rItemSet, xAttrList, rUnitConv,
+    rIMap.importXML( m_rItemSet, xAttrList, m_rUnitConv,
                            GetImport().GetNamespaceMap() );
 }
 
 SwXMLItemSetContext::~SwXMLItemSetContext()
 {
-    if( xBackground.is() )
+    if( m_xBackground.is() )
     {
         const SvxBrushItem& rItem =
-            static_cast<SwXMLBrushItemImportContext*>(xBackground.get())->GetItem();
-        rItemSet.Put( rItem );
+            static_cast<SwXMLBrushItemImportContext*>(m_xBackground.get())->GetItem();
+        m_rItemSet.Put( rItem );
     }
 }
 
@@ -55,7 +55,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SwXMLItemSetContext::c
     sal_Int32 nElement,
     const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
 {
-    SvXMLItemMapEntriesRef xMapEntries = rIMapper.getMapEntries();
+    SvXMLItemMapEntriesRef xMapEntries = m_rIMapper.getMapEntries();
     SvXMLItemMapEntry const * pEntry = xMapEntries->getByName( nElement );
 
     if( pEntry && 0 != (pEntry->nMemberId & MID_SW_FLAG_ELEMENT_ITEM_IMPORT) )
@@ -82,20 +82,20 @@ SvXMLImportContextRef SwXMLItemSetContext::createFastChildContext( sal_Int32 nEl
     case RES_BACKGROUND:
         {
             const SfxPoolItem *pItem;
-            if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND,
+            if( SfxItemState::SET == m_rItemSet.GetItemState( RES_BACKGROUND,
                                                        false, &pItem ) )
             {
                 xContext = new SwXMLBrushItemImportContext(
                                 GetImport(), nElement, xAttrList,
-                                rUnitConv, *static_cast<const SvxBrushItem *>(pItem) );
+                                m_rUnitConv, *static_cast<const SvxBrushItem *>(pItem) );
             }
             else
             {
                 xContext = new SwXMLBrushItemImportContext(
                                 GetImport(), nElement, xAttrList,
-                                rUnitConv, RES_BACKGROUND );
+                                m_rUnitConv, RES_BACKGROUND );
             }
-            xBackground = xContext;
+            m_xBackground = xContext;
         }
         break;
     }
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index 2993ab2d0b7e..4cff6aaafb79 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -31,10 +31,10 @@ struct SvXMLItemMapEntry;
 
 class SwXMLItemSetContext final : public SvXMLImportContext
 {
-    SfxItemSet                  &rItemSet;
-    const SvXMLImportItemMapper &rIMapper;
-    const SvXMLUnitConverter    &rUnitConv;
-    SvXMLImportContextRef xBackground;
+    SfxItemSet                  &m_rItemSet;
+    const SvXMLImportItemMapper &m_rIMapper;
+    const SvXMLUnitConverter    &m_rUnitConv;
+    SvXMLImportContextRef m_xBackground;
 
 public:
 


More information about the Libreoffice-commits mailing list