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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 7 09:28:31 UTC 2021


 sw/source/filter/html/htmlatr.cxx |   25 ++++++++++++-------------
 sw/source/filter/html/htmlfly.cxx |   30 +++++++++++++++---------------
 sw/source/filter/html/htmlfly.hxx |   26 +++++++++++++-------------
 sw/source/filter/html/parcss1.cxx |    2 +-
 sw/source/filter/html/parcss1.hxx |   16 ++++++++--------
 sw/source/filter/html/svxcss1.cxx |    4 ++--
 sw/source/filter/html/svxcss1.hxx |   12 ++++++------
 7 files changed, 57 insertions(+), 58 deletions(-)

New commits:
commit cc99d43295322a2d6b4abc9b9a8f2e03e3db89f2
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jun 7 09:00:36 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jun 7 11:27:47 2021 +0200

    sw: prefix members of CSS1Selector, HTMLStartEndPos, SvxCSS1MapEntry and ...
    
    ... SwHTMLPosFlyFrame
    
    See tdf#94879 for motivation.
    
    Change-Id: I4d1a427653aea5c6414f79c8eaea71336150bab7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116773
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index b3d56597ebf7..935c1db9e92e 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1029,30 +1029,29 @@ namespace {
 
 class HTMLStartEndPos
 {
-    sal_Int32 nStart;
-    sal_Int32 nEnd;
-    std::unique_ptr<SfxPoolItem> pItem;
+    sal_Int32 m_nStart;
+    sal_Int32 m_nEnd;
+    std::unique_ptr<SfxPoolItem> m_pItem;
 
 public:
 
     HTMLStartEndPos( const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE );
 
-    const SfxPoolItem *GetItem() const { return pItem.get(); }
+    const SfxPoolItem* GetItem() const { return m_pItem.get(); }
 
-    void SetStart( sal_Int32 nStt ) { nStart = nStt; }
-    sal_Int32 GetStart() const { return nStart; }
+    void SetStart(sal_Int32 nStt) { m_nStart = nStt; }
+    sal_Int32 GetStart() const { return m_nStart; }
 
-    sal_Int32 GetEnd() const { return nEnd; }
-    void SetEnd( sal_Int32 nE ) { nEnd = nE; }
+    sal_Int32 GetEnd() const { return m_nEnd; }
+    void SetEnd(sal_Int32 nE) { m_nEnd = nE; }
 };
 
 }
 
-HTMLStartEndPos::HTMLStartEndPos( const SfxPoolItem& rItem, sal_Int32 nStt,
-                                                        sal_Int32 nE ) :
-    nStart( nStt ),
-    nEnd( nE ),
-    pItem( rItem.Clone() )
+HTMLStartEndPos::HTMLStartEndPos(const SfxPoolItem& rItem, sal_Int32 nStt, sal_Int32 nE)
+    : m_nStart(nStt)
+    , m_nEnd(nE)
+    , m_pItem(rItem.Clone())
 {}
 
 typedef std::vector<HTMLStartEndPos *> HTMLStartEndPositions;
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 771a449ec90a..df8eb9116ccc 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -33,12 +33,12 @@ using namespace css;
 SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
                                   const SdrObject *pSdrObj,
                                   AllHtmlFlags nFlags ) :
-    pFrameFormat( &rPosFly.GetFormat() ),
-    pSdrObject( pSdrObj ),
-    pNdIdx( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
-    nOrdNum( rPosFly.GetOrdNum() ),
-    nContentIdx( 0 ),
-    nAllFlags( nFlags )
+    m_pFrameFormat( &rPosFly.GetFormat() ),
+    m_pSdrObject( pSdrObj ),
+    m_pNodeIdex( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
+    m_nOrdNum( rPosFly.GetOrdNum() ),
+    m_nContentIndex( 0 ),
+    m_nAllFlags( nFlags )
 {
     const SwFormatAnchor& rAnchor = rPosFly.GetFormat().GetAnchor();
     if ((RndStdIds::FLY_AT_CHAR != rAnchor.GetAnchorId()) ||
@@ -51,34 +51,34 @@ SwHTMLPosFlyFrame::SwHTMLPosFlyFrame( const SwPosFlyFrame& rPosFly,
     if( !rAnchor.GetContentAnchor() )
         return;
 
-    nContentIdx = rAnchor.GetContentAnchor()->nContent.GetIndex();
+    m_nContentIndex = rAnchor.GetContentAnchor()->nContent.GetIndex();
     sal_Int16 eHoriRel = rPosFly.GetFormat().GetHoriOrient().
                                         GetRelationOrient();
     if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel )
     {
-        const SwContentNode *pCNd = pNdIdx->GetNode().GetContentNode();
+        const SwContentNode *pCNd = m_pNodeIdex->GetNode().GetContentNode();
         OSL_ENSURE( pCNd, "No Content-Node at PaM position" );
-        if( pCNd && nContentIdx < pCNd->Len() )
-            nContentIdx++;
+        if( pCNd && m_nContentIndex < pCNd->Len() )
+            m_nContentIndex++;
     }
 }
 
 bool SwHTMLPosFlyFrame::operator<( const SwHTMLPosFlyFrame& rFrame ) const
 {
-    if( pNdIdx->GetIndex() == rFrame.pNdIdx->GetIndex() )
+    if( m_pNodeIdex->GetIndex() == rFrame.m_pNodeIdex->GetIndex() )
     {
-        if( nContentIdx == rFrame.nContentIdx )
+        if( m_nContentIndex == rFrame.m_nContentIndex )
         {
             if( GetOutPos() == rFrame.GetOutPos() )
-                return nOrdNum < rFrame.nOrdNum;
+                return m_nOrdNum < rFrame.m_nOrdNum;
             else
                 return GetOutPos() < rFrame.GetOutPos();
         }
         else
-            return nContentIdx < rFrame.nContentIdx;
+            return m_nContentIndex < rFrame.m_nContentIndex;
     }
     else
-        return pNdIdx->GetIndex() < rFrame.pNdIdx->GetIndex();
+        return m_pNodeIdex->GetIndex() < rFrame.m_pNodeIdex->GetIndex();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 5036509a5ba4..47047f1aed57 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -96,12 +96,12 @@ extern AllHtmlFlags const aHTMLOutFrameAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
 
 class SwHTMLPosFlyFrame
 {
-    const SwFrameFormat    *pFrameFormat;  // the frame
-    const SdrObject        *pSdrObject;    // maybe Sdr-Object
-    std::unique_ptr<SwNodeIndex> pNdIdx;        // Node-Index
-    sal_uInt32              nOrdNum;       // from SwPosFlyFrame
-    sal_Int32               nContentIdx;   // its position in content
-    AllHtmlFlags            nAllFlags;
+    const SwFrameFormat    *m_pFrameFormat;  // the frame
+    const SdrObject        *m_pSdrObject;    // maybe Sdr-Object
+    std::unique_ptr<SwNodeIndex> m_pNodeIdex;        // Node-Index
+    sal_uInt32              m_nOrdNum;       // from SwPosFlyFrame
+    sal_Int32               m_nContentIndex;   // its position in content
+    AllHtmlFlags            m_nAllFlags;
 
     SwHTMLPosFlyFrame(const SwHTMLPosFlyFrame&) = delete;
     SwHTMLPosFlyFrame& operator=(const SwHTMLPosFlyFrame&) = delete;
@@ -113,13 +113,13 @@ public:
 
     bool operator<( const SwHTMLPosFlyFrame& ) const;
 
-    const SwFrameFormat& GetFormat() const       { return *pFrameFormat; }
-    const SdrObject*     GetSdrObject() const    { return pSdrObject; }
-    const SwNodeIndex&   GetNdIndex() const      { return *pNdIdx; }
-    sal_Int32            GetContentIndex() const { return nContentIdx; }
-    AllHtmlFlags const & GetOutMode() const      { return nAllFlags; }
-    HtmlOut              GetOutFn() const        { return nAllFlags.nOut; }
-    HtmlPosition         GetOutPos() const       { return nAllFlags.nPosition; }
+    const SwFrameFormat& GetFormat() const       { return *m_pFrameFormat; }
+    const SdrObject*     GetSdrObject() const    { return m_pSdrObject; }
+    const SwNodeIndex&   GetNdIndex() const      { return *m_pNodeIdex; }
+    sal_Int32            GetContentIndex() const { return m_nContentIndex; }
+    AllHtmlFlags const & GetOutMode() const      { return m_nAllFlags; }
+    HtmlOut              GetOutFn() const        { return m_nAllFlags.nOut; }
+    HtmlPosition         GetOutPos() const       { return m_nAllFlags.nPosition; }
 };
 
 class SwHTMLPosFlyFrames
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 39038ab8b91c..e0b20ef4168e 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -1200,7 +1200,7 @@ void CSS1Parser::DeclarationParsed( const OUString& /*rProperty*/,
 
 CSS1Selector::~CSS1Selector()
 {
-    delete pNext;
+    delete m_pNext;
 }
 
 CSS1Expression::~CSS1Expression()
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index 6e2d50426d4c..355ef2cf2097 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -90,22 +90,22 @@ enum CSS1SelectorType
  */
 class CSS1Selector
 {
-    CSS1SelectorType eType; // the type
-    OUString aSelector;     // the selector itself
-    CSS1Selector *pNext;    // the following component
+    CSS1SelectorType m_eType; // the type
+    OUString m_aSelector;     // the selector itself
+    CSS1Selector *m_pNext;    // the following component
 
 public:
     CSS1Selector( CSS1SelectorType eTyp, const OUString &rSel )
-        : eType(eTyp), aSelector( rSel ), pNext( nullptr )
+        : m_eType(eTyp), m_aSelector( rSel ), m_pNext( nullptr )
     {}
 
     ~CSS1Selector();
 
-    CSS1SelectorType GetType() const { return eType; }
-    const OUString& GetString() const { return aSelector; }
+    CSS1SelectorType GetType() const { return m_eType; }
+    const OUString& GetString() const { return m_aSelector; }
 
-    void SetNext( CSS1Selector *pNxt ) { pNext = pNxt; }
-    const CSS1Selector *GetNext() const { return pNext; }
+    void SetNext( CSS1Selector *pNxt ) { m_pNext = pNxt; }
+    const CSS1Selector *GetNext() const { return m_pNext; }
 };
 
 /** a subexpression of a CSS1 declaration
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index ecb8729de900..3a0594d7adbd 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -663,8 +663,8 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
 
 SvxCSS1MapEntry::SvxCSS1MapEntry( const SfxItemSet& rItemSet,
                                   const SvxCSS1PropertyInfo& rProp ) :
-    aItemSet( rItemSet ),
-    aPropInfo( rProp )
+    m_aItemSet( rItemSet ),
+    m_aPropInfo( rProp )
 {}
 
 void SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index e7888ff39813..5cf8140f97c3 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -163,18 +163,18 @@ public:
 
 class SvxCSS1MapEntry
 {
-    SfxItemSet aItemSet;
-    SvxCSS1PropertyInfo aPropInfo;
+    SfxItemSet m_aItemSet;
+    SvxCSS1PropertyInfo m_aPropInfo;
 
 public:
     SvxCSS1MapEntry( const SfxItemSet& rItemSet,
                      const SvxCSS1PropertyInfo& rProp );
 
-    const SfxItemSet& GetItemSet() const { return aItemSet; }
-    SfxItemSet& GetItemSet() { return aItemSet; }
+    const SfxItemSet& GetItemSet() const { return m_aItemSet; }
+    SfxItemSet& GetItemSet() { return m_aItemSet; }
 
-    const SvxCSS1PropertyInfo& GetPropertyInfo() const { return aPropInfo; }
-    SvxCSS1PropertyInfo& GetPropertyInfo() { return aPropInfo; }
+    const SvxCSS1PropertyInfo& GetPropertyInfo() const { return m_aPropInfo; }
+    SvxCSS1PropertyInfo& GetPropertyInfo() { return m_aPropInfo; }
 };
 
 // Class is processing the CSS1-Parser output by converting the CSS1 properties


More information about the Libreoffice-commits mailing list