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

Miklos Vajna vmiklos at collabora.co.uk
Mon Oct 2 10:09:13 UTC 2017


 sw/inc/fmtruby.hxx                 |   34 ++++++++++----------
 sw/source/core/txtnode/fmtatr2.cxx |   60 ++++++++++++++++++-------------------
 sw/source/core/txtnode/txtatr2.cxx |    2 -
 3 files changed, 48 insertions(+), 48 deletions(-)

New commits:
commit 0135d0df982772341bfeaeb8e3f4542847b1fb31
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Oct 2 08:26:44 2017 +0200

    sw: prefix members of SwFormatRuby
    
    Change-Id: I47ca2fa39f93ebb665ccc6b4640238d2686dc0fc
    Reviewed-on: https://gerrit.libreoffice.org/43026
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index dcd8cfe6caf8..db332969b337 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -28,12 +28,12 @@ class SW_DLLPUBLIC SwFormatRuby : public SfxPoolItem
 {
     friend class SwTextRuby;
 
-    OUString sRubyText;                     ///< The ruby txt.
-    OUString sCharFormatName;               ///< Name of the charformat.
-    SwTextRuby* pTextAttr;                  ///< The TextAttribute.
-    sal_uInt16 nCharFormatId;               ///< PoolId of the charformat.
-    sal_uInt16 nPosition;                   ///< Position of the Ruby-character.
-    css::text::RubyAdjust nAdjustment;      ///< Specific adjustment of the Ruby-ch.
+    OUString m_sRubyText;                     ///< The ruby text.
+    OUString m_sCharFormatName;               ///< Name of the charformat.
+    SwTextRuby* m_pTextAttr;                  ///< The TextAttribute.
+    sal_uInt16 m_nCharFormatId;               ///< PoolId of the charformat.
+    sal_uInt16 m_nPosition;                   ///< Position of the Ruby-character.
+    css::text::RubyAdjust m_eAdjustment;      ///< Specific adjustment of the Ruby-ch.
 
 public:
     SwFormatRuby( const OUString& rRubyText );
@@ -55,22 +55,22 @@ public:
     virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
     virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
 
-    const SwTextRuby* GetTextRuby() const         { return pTextAttr; }
+    const SwTextRuby* GetTextRuby() const         { return m_pTextAttr; }
 
-    const OUString& GetText() const                    { return sRubyText; }
-    void SetText( const OUString& rText )        { sRubyText = rText; }
+    const OUString& GetText() const                    { return m_sRubyText; }
+    void SetText( const OUString& rText )        { m_sRubyText = rText; }
 
-    const OUString& GetCharFormatName() const             { return sCharFormatName; }
-    void SetCharFormatName( const OUString& rNm )  { sCharFormatName = rNm; }
+    const OUString& GetCharFormatName() const             { return m_sCharFormatName; }
+    void SetCharFormatName( const OUString& rNm )  { m_sCharFormatName = rNm; }
 
-    sal_uInt16 GetCharFormatId() const                 { return nCharFormatId; }
-    void SetCharFormatId( sal_uInt16 nNew )            { nCharFormatId = nNew; }
+    sal_uInt16 GetCharFormatId() const                 { return m_nCharFormatId; }
+    void SetCharFormatId( sal_uInt16 nNew )            { m_nCharFormatId = nNew; }
 
-    sal_uInt16 GetPosition() const                  { return nPosition; }
-    void SetPosition( sal_uInt16 nNew )             { nPosition = nNew; }
+    sal_uInt16 GetPosition() const                  { return m_nPosition; }
+    void SetPosition( sal_uInt16 nNew )             { m_nPosition = nNew; }
 
-    css::text::RubyAdjust GetAdjustment() const       { return nAdjustment; }
-    void SetAdjustment( css::text::RubyAdjust nNew )  { nAdjustment = nNew; }
+    css::text::RubyAdjust GetAdjustment() const       { return m_eAdjustment; }
+    void SetAdjustment( css::text::RubyAdjust nNew )  { m_eAdjustment = nNew; }
 };
 
 #endif
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index c402166fee3d..e96dfd0f9166 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -396,22 +396,22 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 
 SwFormatRuby::SwFormatRuby( const OUString& rRubyText )
     : SfxPoolItem( RES_TXTATR_CJK_RUBY ),
-    sRubyText( rRubyText ),
-    pTextAttr( nullptr ),
-    nCharFormatId( 0 ),
-    nPosition( 0 ),
-    nAdjustment( css::text::RubyAdjust_LEFT )
+    m_sRubyText( rRubyText ),
+    m_pTextAttr( nullptr ),
+    m_nCharFormatId( 0 ),
+    m_nPosition( 0 ),
+    m_eAdjustment( css::text::RubyAdjust_LEFT )
 {
 }
 
 SwFormatRuby::SwFormatRuby( const SwFormatRuby& rAttr )
     : SfxPoolItem( RES_TXTATR_CJK_RUBY ),
-    sRubyText( rAttr.sRubyText ),
-    sCharFormatName( rAttr.sCharFormatName ),
-    pTextAttr( nullptr ),
-    nCharFormatId( rAttr.nCharFormatId),
-    nPosition( rAttr.nPosition ),
-    nAdjustment( rAttr.nAdjustment )
+    m_sRubyText( rAttr.m_sRubyText ),
+    m_sCharFormatName( rAttr.m_sCharFormatName ),
+    m_pTextAttr( nullptr ),
+    m_nCharFormatId( rAttr.m_nCharFormatId),
+    m_nPosition( rAttr.m_nPosition ),
+    m_eAdjustment( rAttr.m_eAdjustment )
 {
 }
 
@@ -421,23 +421,23 @@ SwFormatRuby::~SwFormatRuby()
 
 SwFormatRuby& SwFormatRuby::operator=( const SwFormatRuby& rAttr )
 {
-    sRubyText = rAttr.sRubyText;
-    sCharFormatName = rAttr.sCharFormatName;
-    nCharFormatId = rAttr.nCharFormatId;
-    nPosition = rAttr.nPosition;
-    nAdjustment = rAttr.nAdjustment;
-    pTextAttr =  nullptr;
+    m_sRubyText = rAttr.m_sRubyText;
+    m_sCharFormatName = rAttr.m_sCharFormatName;
+    m_nCharFormatId = rAttr.m_nCharFormatId;
+    m_nPosition = rAttr.m_nPosition;
+    m_eAdjustment = rAttr.m_eAdjustment;
+    m_pTextAttr =  nullptr;
     return *this;
 }
 
 bool SwFormatRuby::operator==( const SfxPoolItem& rAttr ) const
 {
     assert(SfxPoolItem::operator==(rAttr));
-    return sRubyText == static_cast<const SwFormatRuby&>(rAttr).sRubyText &&
-           sCharFormatName == static_cast<const SwFormatRuby&>(rAttr).sCharFormatName &&
-           nCharFormatId == static_cast<const SwFormatRuby&>(rAttr).nCharFormatId &&
-           nPosition == static_cast<const SwFormatRuby&>(rAttr).nPosition &&
-           nAdjustment == static_cast<const SwFormatRuby&>(rAttr).nAdjustment;
+    return m_sRubyText == static_cast<const SwFormatRuby&>(rAttr).m_sRubyText &&
+           m_sCharFormatName == static_cast<const SwFormatRuby&>(rAttr).m_sCharFormatName &&
+           m_nCharFormatId == static_cast<const SwFormatRuby&>(rAttr).m_nCharFormatId &&
+           m_nPosition == static_cast<const SwFormatRuby&>(rAttr).m_nPosition &&
+           m_eAdjustment == static_cast<const SwFormatRuby&>(rAttr).m_eAdjustment;
 }
 
 SfxPoolItem* SwFormatRuby::Clone( SfxItemPool* ) const
@@ -452,18 +452,18 @@ bool SwFormatRuby::QueryValue( uno::Any& rVal,
     nMemberId &= ~CONVERT_TWIPS;
     switch( nMemberId )
     {
-        case MID_RUBY_TEXT: rVal <<= sRubyText;                    break;
-        case MID_RUBY_ADJUST:  rVal <<= (sal_Int16)nAdjustment;    break;
+        case MID_RUBY_TEXT: rVal <<= m_sRubyText;                    break;
+        case MID_RUBY_ADJUST:  rVal <<= (sal_Int16)m_eAdjustment;    break;
         case MID_RUBY_CHARSTYLE:
         {
             OUString aString;
-            SwStyleNameMapper::FillProgName(sCharFormatName, aString, SwGetPoolIdFromName::ChrFmt, true );
+            SwStyleNameMapper::FillProgName(m_sCharFormatName, aString, SwGetPoolIdFromName::ChrFmt, true );
             rVal <<= aString;
         }
         break;
         case MID_RUBY_ABOVE:
         {
-            rVal <<= static_cast<bool>(!nPosition);
+            rVal <<= static_cast<bool>(!m_nPosition);
         }
         break;
         default:
@@ -482,7 +482,7 @@ bool SwFormatRuby::PutValue( const uno::Any& rVal,
         {
             OUString sTmp;
             bRet = rVal >>= sTmp;
-            sRubyText = sTmp;
+            m_sRubyText = sTmp;
         }
         break;
          case MID_RUBY_ADJUST:
@@ -490,7 +490,7 @@ bool SwFormatRuby::PutValue( const uno::Any& rVal,
             sal_Int16 nSet = 0;
             rVal >>= nSet;
             if(nSet >= (sal_Int16)text::RubyAdjust_LEFT && nSet <= (sal_Int16)text::RubyAdjust_INDENT_BLOCK)
-                nAdjustment = (text::RubyAdjust)nSet;
+                m_eAdjustment = (text::RubyAdjust)nSet;
             else
                 bRet = false;
         }
@@ -501,7 +501,7 @@ bool SwFormatRuby::PutValue( const uno::Any& rVal,
             if(rVal.hasValue() && rVal.getValueType() == rType)
             {
                 bool bAbove = *o3tl::doAccess<bool>(rVal);
-                nPosition = bAbove ? 0 : 1;
+                m_nPosition = bAbove ? 0 : 1;
             }
         }
         break;
@@ -510,7 +510,7 @@ bool SwFormatRuby::PutValue( const uno::Any& rVal,
             OUString sTmp;
             bRet = rVal >>= sTmp;
             if(bRet)
-                sCharFormatName = SwStyleNameMapper::GetUIName(sTmp, SwGetPoolIdFromName::ChrFmt );
+                m_sCharFormatName = SwStyleNameMapper::GetUIName(sTmp, SwGetPoolIdFromName::ChrFmt );
         }
         break;
         default:
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 69189e11f1f9..7879abfd302c 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -205,7 +205,7 @@ SwTextRuby::SwTextRuby( SwFormatRuby& rAttr,
     , SwClient( nullptr )
     , m_pTextNode( nullptr )
 {
-    rAttr.pTextAttr  = this;
+    rAttr.m_pTextAttr  = this;
 }
 
 SwTextRuby::~SwTextRuby()


More information about the Libreoffice-commits mailing list