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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 5 07:44:07 UTC 2021


 sw/source/filter/html/htmltab.cxx |   76 +++++++++++++++++++-------------------
 sw/source/filter/xml/xmlbrsh.cxx  |   30 +++++++--------
 sw/source/filter/xml/xmlbrshe.hxx |    4 +-
 sw/source/filter/xml/xmlbrshi.hxx |    4 +-
 4 files changed, 57 insertions(+), 57 deletions(-)

New commits:
commit a7558455f6661f370100cfee79d64b9c5fbd28d8
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jul 5 08:49:51 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jul 5 09:43:34 2021 +0200

    sw: prefix members of CaptionSaveStruct, HTMLTableRow, ...
    
    ... SwXMLBrushItemExport and SwXMLBrushItemImportContext
    
    See tdf#94879 for motivation.
    
    Change-Id: I502fd14d204aa9936d929c7cf8b6f0f16e8750fd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118397
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index a1177b711d8e..6c5ec09b2578 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -286,24 +286,24 @@ namespace {
 class HTMLTableRow
 {
     std::vector<HTMLTableCell> m_aCells;                ///< cells of the row
-    std::unique_ptr<SvxBrushItem> xBGBrush; // background of cell from STYLE
+    std::unique_ptr<SvxBrushItem> m_xBGBrush; // background of cell from STYLE
 
-    SvxAdjust eAdjust;
-    sal_uInt16 nHeight;                     // options of <TR>/<TD>
-    sal_uInt16 nEmptyRows;                  // number of empty rows are following
-    sal_Int16 eVertOri;
-    bool bIsEndOfGroup : 1;
-    bool bBottomBorder : 1;            // Is there a line after the row?
+    SvxAdjust m_eAdjust;
+    sal_uInt16 m_nHeight;                     // options of <TR>/<TD>
+    sal_uInt16 m_nEmptyRows;                  // number of empty rows are following
+    sal_Int16 m_eVertOri;
+    bool m_bIsEndOfGroup : 1;
+    bool m_bBottomBorder : 1;            // Is there a line after the row?
 
 public:
 
     explicit HTMLTableRow( sal_uInt16 nCells );    // cells of the row are empty
 
-    void SetBottomBorder(bool bIn) { bBottomBorder = bIn; }
-    bool GetBottomBorder() const { return bBottomBorder; }
+    void SetBottomBorder(bool bIn) { m_bBottomBorder = bIn; }
+    bool GetBottomBorder() const { return m_bBottomBorder; }
 
     inline void SetHeight( sal_uInt16 nHeight );
-    sal_uInt16 GetHeight() const { return nHeight; }
+    sal_uInt16 GetHeight() const { return m_nHeight; }
 
     const HTMLTableCell& GetCell(sal_uInt16 nCell) const;
     HTMLTableCell& GetCell(sal_uInt16 nCell)
@@ -311,20 +311,20 @@ public:
         return const_cast<HTMLTableCell&>(const_cast<const HTMLTableRow&>(*this).GetCell(nCell));
     }
 
-    void SetAdjust( SvxAdjust eAdj ) { eAdjust = eAdj; }
-    SvxAdjust GetAdjust() const { return eAdjust; }
+    void SetAdjust( SvxAdjust eAdj ) { m_eAdjust = eAdj; }
+    SvxAdjust GetAdjust() const { return m_eAdjust; }
 
-    void SetVertOri( sal_Int16 eV) { eVertOri = eV; }
-    sal_Int16 GetVertOri() const { return eVertOri; }
+    void SetVertOri( sal_Int16 eV) { m_eVertOri = eV; }
+    sal_Int16 GetVertOri() const { return m_eVertOri; }
 
-    void SetBGBrush(std::unique_ptr<SvxBrushItem>& rBrush ) { xBGBrush = std::move(rBrush); }
-    const std::unique_ptr<SvxBrushItem>& GetBGBrush() const { return xBGBrush; }
+    void SetBGBrush(std::unique_ptr<SvxBrushItem>& rBrush ) { m_xBGBrush = std::move(rBrush); }
+    const std::unique_ptr<SvxBrushItem>& GetBGBrush() const { return m_xBGBrush; }
 
-    void SetEndOfGroup() { bIsEndOfGroup = true; }
-    bool IsEndOfGroup() const { return bIsEndOfGroup; }
+    void SetEndOfGroup() { m_bIsEndOfGroup = true; }
+    bool IsEndOfGroup() const { return m_bIsEndOfGroup; }
 
-    void IncEmptyRows() { nEmptyRows++; }
-    sal_uInt16 GetEmptyRows() const { return nEmptyRows; }
+    void IncEmptyRows() { m_nEmptyRows++; }
+    sal_uInt16 GetEmptyRows() const { return m_nEmptyRows; }
 
     // Expand row by adding empty cells
     void Expand( sal_uInt16 nCells, bool bOneCell=false );
@@ -776,12 +776,12 @@ std::unique_ptr<SwHTMLTableLayoutCell> HTMLTableCell::CreateLayoutInfo()
 
 HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
     : m_aCells(nCells)
-    , eAdjust(SvxAdjust::End)
-    , nHeight(0)
-    , nEmptyRows(0)
-    , eVertOri(text::VertOrientation::TOP)
-    , bIsEndOfGroup(false)
-    , bBottomBorder(false)
+    , m_eAdjust(SvxAdjust::End)
+    , m_nHeight(0)
+    , m_nEmptyRows(0)
+    , m_eVertOri(text::VertOrientation::TOP)
+    , m_bIsEndOfGroup(false)
+    , m_bBottomBorder(false)
 {
     assert(nCells == m_aCells.size() &&
             "wrong Cell count in new HTML table row");
@@ -789,8 +789,8 @@ HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
 
 inline void HTMLTableRow::SetHeight( sal_uInt16 nHght )
 {
-    if( nHght > nHeight  )
-        nHeight = nHght;
+    if( nHght > m_nHeight  )
+        m_nHeight = nHght;
 }
 
 const HTMLTableCell& HTMLTableRow::GetCell(sal_uInt16 nCell) const
@@ -4463,25 +4463,25 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable,
 
 class CaptionSaveStruct : public SectionSaveStruct
 {
-    SwPosition aSavePos;
-    SwHTMLNumRuleInfo aNumRuleInfo; // valid numbering
+    SwPosition m_aSavePos;
+    SwHTMLNumRuleInfo m_aNumRuleInfo; // valid numbering
 
 public:
 
-    std::shared_ptr<HTMLAttrTable> xAttrTab;        // attributes
+    std::shared_ptr<HTMLAttrTable> m_xAttrTab;        // attributes
 
     CaptionSaveStruct( SwHTMLParser& rParser, const SwPosition& rPos ) :
-        SectionSaveStruct( rParser ), aSavePos( rPos ),
-        xAttrTab(std::make_shared<HTMLAttrTable>())
+        SectionSaveStruct( rParser ), m_aSavePos( rPos ),
+        m_xAttrTab(std::make_shared<HTMLAttrTable>())
     {
-        rParser.SaveAttrTab(xAttrTab);
+        rParser.SaveAttrTab(m_xAttrTab);
 
         // The current numbering was remembered and just needs to be closed
-        aNumRuleInfo.Set( rParser.GetNumInfo() );
+        m_aNumRuleInfo.Set( rParser.GetNumInfo() );
         rParser.GetNumInfo().Clear();
     }
 
-    const SwPosition& GetPos() const { return aSavePos; }
+    const SwPosition& GetPos() const { return m_aSavePos; }
 
     void RestoreAll( SwHTMLParser& rParser )
     {
@@ -4489,10 +4489,10 @@ public:
         Restore( rParser );
 
         // Recover the old attribute tables
-        rParser.RestoreAttrTab(xAttrTab);
+        rParser.RestoreAttrTab(m_xAttrTab);
 
         // Re-open the old numbering
-        rParser.GetNumInfo().Set( aNumRuleInfo );
+        rParser.GetNumInfo().Set( m_aNumRuleInfo );
     }
 };
 
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index 317e49bc2927..91104d4241a6 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -56,15 +56,15 @@ void SwXMLBrushItemImportContext::ProcessAttrs(
             break;
         case XML_ELEMENT(STYLE, XML_POSITION):
             SvXMLImportItemMapper::PutXMLValue(
-                *pItem, sValue, MID_GRAPHIC_POSITION, rUnitConv );
+                *m_pItem, sValue, MID_GRAPHIC_POSITION, rUnitConv );
             break;
         case XML_ELEMENT(STYLE, XML_REPEAT):
             SvXMLImportItemMapper::PutXMLValue(
-                *pItem, sValue, MID_GRAPHIC_REPEAT, rUnitConv );
+                *m_pItem, sValue, MID_GRAPHIC_REPEAT, rUnitConv );
             break;
         case XML_ELEMENT(STYLE, XML_FILTER_NAME):
             SvXMLImportItemMapper::PutXMLValue(
-                *pItem, sValue, MID_GRAPHIC_FILTER, rUnitConv );
+                *m_pItem, sValue, MID_GRAPHIC_FILTER, rUnitConv );
             break;
         default:
             XMLOFF_WARN_UNKNOWN("sw", aIter);
@@ -101,16 +101,16 @@ void SwXMLBrushItemImportContext::endFastElement(sal_Int32 )
     if (m_xGraphic.is())
     {
         Graphic aGraphic(m_xGraphic);
-        SvxGraphicPosition eOldGraphicPos = pItem->GetGraphicPos();
-        pItem->SetGraphic(aGraphic);
-        if (GPOS_NONE == eOldGraphicPos && GPOS_NONE != pItem->GetGraphicPos())
-            pItem->SetGraphicPos(GPOS_TILED);
+        SvxGraphicPosition eOldGraphicPos = m_pItem->GetGraphicPos();
+        m_pItem->SetGraphic(aGraphic);
+        if (GPOS_NONE == eOldGraphicPos && GPOS_NONE != m_pItem->GetGraphicPos())
+            m_pItem->SetGraphicPos(GPOS_TILED);
     }
 
-    if (!(pItem->GetGraphic()))
-        pItem->SetGraphicPos(GPOS_NONE);
-    else if (GPOS_NONE == pItem->GetGraphicPos())
-        pItem->SetGraphicPos(GPOS_TILED);
+    if (!(m_pItem->GetGraphic()))
+        m_pItem->SetGraphicPos(GPOS_NONE);
+    else if (GPOS_NONE == m_pItem->GetGraphicPos())
+        m_pItem->SetGraphicPos(GPOS_TILED);
 }
 
 SwXMLBrushItemImportContext::SwXMLBrushItemImportContext(
@@ -119,10 +119,10 @@ SwXMLBrushItemImportContext::SwXMLBrushItemImportContext(
         const SvXMLUnitConverter& rUnitConv,
         const SvxBrushItem& rItem ) :
     SvXMLImportContext( rImport ),
-    pItem( new SvxBrushItem( rItem ) )
+    m_pItem( new SvxBrushItem( rItem ) )
 {
     // delete any graphic that is existing
-    pItem->SetGraphicPos( GPOS_NONE );
+    m_pItem->SetGraphicPos( GPOS_NONE );
 
     ProcessAttrs( xAttrList, rUnitConv );
 }
@@ -133,7 +133,7 @@ SwXMLBrushItemImportContext::SwXMLBrushItemImportContext(
         const SvXMLUnitConverter& rUnitConv,
         sal_uInt16 nWhich ) :
     SvXMLImportContext( rImport ),
-    pItem( new SvxBrushItem( nWhich ) )
+    m_pItem( new SvxBrushItem( nWhich ) )
 {
     ProcessAttrs( xAttrList, rUnitConv );
 }
@@ -143,7 +143,7 @@ SwXMLBrushItemImportContext::~SwXMLBrushItemImportContext()
 }
 
 SwXMLBrushItemExport::SwXMLBrushItemExport( SwXMLExport& rExp ) :
-    rExport( rExp )
+    m_rExport( rExp )
 {
 }
 
diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx
index 807f454645f3..a5cb76f7068e 100644
--- a/sw/source/filter/xml/xmlbrshe.hxx
+++ b/sw/source/filter/xml/xmlbrshe.hxx
@@ -25,9 +25,9 @@ class SwXMLExport;
 
 class SwXMLBrushItemExport
 {
-    SwXMLExport& rExport;
+    SwXMLExport& m_rExport;
 
-    SwXMLExport& GetExport() { return rExport; }
+    SwXMLExport& GetExport() { return m_rExport; }
 
 public:
     explicit SwXMLBrushItemExport(SwXMLExport& rExport);
diff --git a/sw/source/filter/xml/xmlbrshi.hxx b/sw/source/filter/xml/xmlbrshi.hxx
index 117cfa0b34dd..0e5cb43c84e9 100644
--- a/sw/source/filter/xml/xmlbrshi.hxx
+++ b/sw/source/filter/xml/xmlbrshi.hxx
@@ -40,7 +40,7 @@ private:
     css::uno::Reference<css::io::XOutputStream> m_xBase64Stream;
     css::uno::Reference<css::graphic::XGraphic> m_xGraphic;
 
-    std::unique_ptr<SvxBrushItem> pItem;
+    std::unique_ptr<SvxBrushItem> m_pItem;
 
     void ProcessAttrs(
                const css::uno::Reference<css::xml::sax::XFastAttributeList > & xAttrList,
@@ -69,7 +69,7 @@ public:
 
     virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
-    const SvxBrushItem& GetItem() const { return *pItem; }
+    const SvxBrushItem& GetItem() const { return *m_pItem; }
 };
 
 #endif  //  _XMLBRSHI_HXX


More information about the Libreoffice-commits mailing list