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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jul 16 10:15:46 UTC 2018


 sw/inc/flddat.hxx                |    8 ++--
 sw/inc/paratr.hxx                |   30 ++++++++--------
 sw/source/core/fields/flddat.cxx |   38 ++++++++++-----------
 sw/source/core/para/paratr.cxx   |   70 +++++++++++++++++++--------------------
 4 files changed, 73 insertions(+), 73 deletions(-)

New commits:
commit a605762c579f2d9ee4ef8e5c1c0d4b603e0ce9bb
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Mon Jul 16 09:06:41 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Jul 16 12:15:24 2018 +0200

    sw: prefix members of SwDateTimeField and SwFormatDrop
    
    Change-Id: I8824da58ccbbe3cd377e8f258941676598145062
    Reviewed-on: https://gerrit.libreoffice.org/57477
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 9ffdc71c63ed..f2c0ca3435f5 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -42,8 +42,8 @@ public:
 
 class SW_DLLPUBLIC SwDateTimeField : public SwValueField
 {
-        sal_uInt16              nSubType;
-        long                nOffset;    // Offset in minutes.
+        sal_uInt16              m_nSubType;
+        long                m_nOffset;    // Offset in minutes.
 
         virtual OUString    Expand() const override;
         virtual std::unique_ptr<SwField> Copy() const override;
@@ -60,8 +60,8 @@ public:
         virtual void            SetPar2(const OUString& rStr) override;
         virtual OUString        GetPar2() const override;
 
-        void             SetOffset(long nMinutes)    { nOffset = nMinutes; }
-        long             GetOffset() const           { return nOffset; }
+        void             SetOffset(long nMinutes)    { m_nOffset = nMinutes; }
+        long             GetOffset() const           { return m_nOffset; }
 
         Date                    GetDate() const;
         tools::Time             GetTime() const;
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 477cb2ad5f4c..35a39a897202 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -49,12 +49,12 @@ class IntlWrapper;
    via the Modify of SwFormatDrop. */
 class SW_DLLPUBLIC SwFormatDrop: public SfxPoolItem, public SwClient
 {
-    SwModify* pDefinedIn;       /**< Modify-Object, that contains DropCaps.
+    SwModify* m_pDefinedIn;       /**< Modify-Object, that contains DropCaps.
                                   Can only be TextFormatCollection/TextNode. */
-    sal_uInt16 nDistance;       ///< Distance to beginning of text.
-    sal_uInt8  nLines;          ///< Line count.
-    sal_uInt8  nChars;          ///< Character count.
-    bool   bWholeWord;      ///< First word with initials.
+    sal_uInt16 m_nDistance;       ///< Distance to beginning of text.
+    sal_uInt8  m_nLines;          ///< Line count.
+    sal_uInt8  m_nChars;          ///< Character count.
+    bool   m_bWholeWord;      ///< First word with initials.
 public:
     static SfxPoolItem* CreateDefault();
 
@@ -83,17 +83,17 @@ 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;
 
-    sal_uInt8 GetLines() const { return nLines; }
-    sal_uInt8 &GetLines() { return nLines; }
+    sal_uInt8 GetLines() const { return m_nLines; }
+    sal_uInt8 &GetLines() { return m_nLines; }
 
-    sal_uInt8 GetChars() const { return nChars; }
-    sal_uInt8 &GetChars() { return nChars; }
+    sal_uInt8 GetChars() const { return m_nChars; }
+    sal_uInt8 &GetChars() { return m_nChars; }
 
-    bool GetWholeWord() const { return bWholeWord; }
-    bool &GetWholeWord() { return bWholeWord; }
+    bool GetWholeWord() const { return m_bWholeWord; }
+    bool &GetWholeWord() { return m_bWholeWord; }
 
-    sal_uInt16 GetDistance() const { return nDistance; }
-    sal_uInt16 &GetDistance() { return nDistance; }
+    sal_uInt16 GetDistance() const { return m_nDistance; }
+    sal_uInt16 &GetDistance() { return m_nDistance; }
 
     const SwCharFormat *GetCharFormat() const { return static_cast<const SwCharFormat*>(GetRegisteredIn()); }
     SwCharFormat *GetCharFormat()       { return static_cast<SwCharFormat*>(GetRegisteredIn()); }
@@ -102,9 +102,9 @@ public:
     virtual bool GetInfo( SfxPoolItem& ) const override;
 
     /// Get and set Modify pointer.
-    const SwModify* GetDefinedIn() const { return pDefinedIn; }
+    const SwModify* GetDefinedIn() const { return m_pDefinedIn; }
     void ChgDefinedIn( const SwModify* pNew )
-    { pDefinedIn = const_cast<SwModify*>(pNew); }
+    { m_pDefinedIn = const_cast<SwModify*>(pNew); }
 };
 
 class SwRegisterItem : public SfxBoolItem
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index b8350e0500b2..55b319f0421b 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -43,13 +43,13 @@ SwFieldType* SwDateTimeFieldType::Copy() const
 
 SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub, sal_uLong nFormat, LanguageType nLng)
     : SwValueField(pInitType, nFormat, nLng, 0.0),
-    nSubType(nSub),
-    nOffset(0)
+    m_nSubType(nSub),
+    m_nOffset(0)
 {
     if (!nFormat)
     {
         SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
-        if (nSubType & DATEFLD)
+        if (m_nSubType & DATEFLD)
             ChangeFormat(pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, GetLanguage()));
         else
             ChangeFormat(pFormatter->GetFormatIndex(NF_TIME_HHMMSS, GetLanguage()));
@@ -73,8 +73,8 @@ OUString SwDateTimeField::Expand() const
     else
         fVal = GetValue();
 
-    if (nOffset)
-        fVal += nOffset * ( 60 / 86400.0 );
+    if (m_nOffset)
+        fVal += m_nOffset * ( 60 / 86400.0 );
 
     return ExpandValue(fVal, GetFormat(), GetLanguage());
 }
@@ -82,11 +82,11 @@ OUString SwDateTimeField::Expand() const
 std::unique_ptr<SwField> SwDateTimeField::Copy() const
 {
     std::unique_ptr<SwDateTimeField> pTmp(
-        new SwDateTimeField(static_cast<SwDateTimeFieldType*>(GetTyp()), nSubType,
+        new SwDateTimeField(static_cast<SwDateTimeFieldType*>(GetTyp()), m_nSubType,
                                             GetFormat(), GetLanguage()) );
 
     pTmp->SetValue(GetValue());
-    pTmp->SetOffset(nOffset);
+    pTmp->SetOffset(m_nOffset);
     pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
 
     return std::unique_ptr<SwField>(pTmp.release());
@@ -94,23 +94,23 @@ std::unique_ptr<SwField> SwDateTimeField::Copy() const
 
 sal_uInt16 SwDateTimeField::GetSubType() const
 {
-    return nSubType;
+    return m_nSubType;
 }
 
 void SwDateTimeField::SetSubType(sal_uInt16 nType)
 {
-    nSubType = nType;
+    m_nSubType = nType;
 }
 
 void SwDateTimeField::SetPar2(const OUString& rStr)
 {
-    nOffset = rStr.toInt32();
+    m_nOffset = rStr.toInt32();
 }
 
 OUString SwDateTimeField::GetPar2() const
 {
-    if (nOffset)
-        return OUString::number(nOffset);
+    if (m_nOffset)
+        return OUString::number(m_nOffset);
     return OUString();
 }
 
@@ -165,13 +165,13 @@ bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
         rVal <<= IsFixed();
         break;
     case FIELD_PROP_BOOL2:
-        rVal <<= (nSubType & DATEFLD) != 0;
+        rVal <<= (m_nSubType & DATEFLD) != 0;
         break;
     case FIELD_PROP_FORMAT:
         rVal <<= static_cast<sal_Int32>(GetFormat());
         break;
     case FIELD_PROP_SUBTYPE:
-        rVal <<= static_cast<sal_Int32>(nOffset);
+        rVal <<= static_cast<sal_Int32>(m_nOffset);
         break;
     case FIELD_PROP_DATE_TIME:
         {
@@ -192,13 +192,13 @@ bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
     {
     case FIELD_PROP_BOOL1:
         if(*o3tl::doAccess<bool>(rVal))
-            nSubType |= FIXEDFLD;
+            m_nSubType |= FIXEDFLD;
         else
-            nSubType &= ~FIXEDFLD;
+            m_nSubType &= ~FIXEDFLD;
         break;
     case FIELD_PROP_BOOL2:
-        nSubType &=  ~(DATEFLD|TIMEFLD);
-        nSubType |= *o3tl::doAccess<bool>(rVal) ? DATEFLD : TIMEFLD;
+        m_nSubType &=  ~(DATEFLD|TIMEFLD);
+        m_nSubType |= *o3tl::doAccess<bool>(rVal) ? DATEFLD : TIMEFLD;
         break;
     case FIELD_PROP_FORMAT:
         rVal >>= nTmp;
@@ -206,7 +206,7 @@ bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
         break;
     case FIELD_PROP_SUBTYPE:
         rVal >>= nTmp;
-        nOffset = nTmp;
+        m_nOffset = nTmp;
         break;
     case FIELD_PROP_DATE_TIME:
         {
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index dc030a631b74..8a26d2f0780c 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -40,22 +40,22 @@ SfxPoolItem* SwNumRuleItem::CreateDefault() { return new SwNumRuleItem; }
 SwFormatDrop::SwFormatDrop()
     : SfxPoolItem( RES_PARATR_DROP ),
     SwClient( nullptr ),
-    pDefinedIn( nullptr ),
-    nDistance( 0 ),
-    nLines( 0 ),
-    nChars( 0 ),
-    bWholeWord( false )
+    m_pDefinedIn( nullptr ),
+    m_nDistance( 0 ),
+    m_nLines( 0 ),
+    m_nChars( 0 ),
+    m_bWholeWord( false )
 {
 }
 
 SwFormatDrop::SwFormatDrop( const SwFormatDrop &rCpy )
     : SfxPoolItem( RES_PARATR_DROP ),
     SwClient( rCpy.GetRegisteredInNonConst() ),
-    pDefinedIn( nullptr ),
-    nDistance( rCpy.GetDistance() ),
-    nLines( rCpy.GetLines() ),
-    nChars( rCpy.GetChars() ),
-    bWholeWord( rCpy.GetWholeWord() )
+    m_pDefinedIn( nullptr ),
+    m_nDistance( rCpy.GetDistance() ),
+    m_nLines( rCpy.GetLines() ),
+    m_nChars( rCpy.GetChars() ),
+    m_bWholeWord( rCpy.GetWholeWord() )
 {
 }
 
@@ -74,16 +74,16 @@ void SwFormatDrop::SetCharFormat( SwCharFormat *pNew )
 
 void SwFormatDrop::Modify( const SfxPoolItem*, const SfxPoolItem * )
 {
-    if( pDefinedIn )
+    if( m_pDefinedIn )
     {
-        if( dynamic_cast< const SwFormat *>( pDefinedIn ) ==  nullptr)
-            pDefinedIn->ModifyNotification( this, this );
-        else if( pDefinedIn->HasWriterListeners() &&
-                !pDefinedIn->IsModifyLocked() )
+        if( dynamic_cast< const SwFormat *>( m_pDefinedIn ) ==  nullptr)
+            m_pDefinedIn->ModifyNotification( this, this );
+        else if( m_pDefinedIn->HasWriterListeners() &&
+                !m_pDefinedIn->IsModifyLocked() )
         {
             // Notify those who are dependent on the format on our own.
             // The format itself wouldn't pass on the notify as it does not get past the check.
-            pDefinedIn->ModifyBroadcast( this, this );
+            m_pDefinedIn->ModifyBroadcast( this, this );
         }
     }
 }
@@ -96,12 +96,12 @@ bool SwFormatDrop::GetInfo( SfxPoolItem& ) const
 bool SwFormatDrop::operator==( const SfxPoolItem& rAttr ) const
 {
     assert(SfxPoolItem::operator==(rAttr));
-    return ( nLines == static_cast<const SwFormatDrop&>(rAttr).GetLines() &&
-             nChars == static_cast<const SwFormatDrop&>(rAttr).GetChars() &&
-             nDistance ==  static_cast<const SwFormatDrop&>(rAttr).GetDistance() &&
-             bWholeWord == static_cast<const SwFormatDrop&>(rAttr).GetWholeWord() &&
+    return ( m_nLines == static_cast<const SwFormatDrop&>(rAttr).GetLines() &&
+             m_nChars == static_cast<const SwFormatDrop&>(rAttr).GetChars() &&
+             m_nDistance ==  static_cast<const SwFormatDrop&>(rAttr).GetDistance() &&
+             m_bWholeWord == static_cast<const SwFormatDrop&>(rAttr).GetWholeWord() &&
              GetCharFormat() == static_cast<const SwFormatDrop&>(rAttr).GetCharFormat() &&
-             pDefinedIn == static_cast<const SwFormatDrop&>(rAttr).pDefinedIn );
+             m_pDefinedIn == static_cast<const SwFormatDrop&>(rAttr).m_pDefinedIn );
 }
 
 SfxPoolItem* SwFormatDrop::Clone( SfxItemPool* ) const
@@ -113,20 +113,20 @@ bool SwFormatDrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
 {
     switch(nMemberId&~CONVERT_TWIPS)
     {
-        case MID_DROPCAP_LINES : rVal <<= static_cast<sal_Int16>(nLines); break;
-        case MID_DROPCAP_COUNT : rVal <<= static_cast<sal_Int16>(nChars); break;
-        case MID_DROPCAP_DISTANCE : rVal <<= static_cast<sal_Int16>(convertTwipToMm100(nDistance)); break;
+        case MID_DROPCAP_LINES : rVal <<= static_cast<sal_Int16>(m_nLines); break;
+        case MID_DROPCAP_COUNT : rVal <<= static_cast<sal_Int16>(m_nChars); break;
+        case MID_DROPCAP_DISTANCE : rVal <<= static_cast<sal_Int16>(convertTwipToMm100(m_nDistance)); break;
         case MID_DROPCAP_FORMAT:
         {
              style::DropCapFormat aDrop;
-            aDrop.Lines = nLines   ;
-            aDrop.Count = nChars   ;
-            aDrop.Distance  = convertTwipToMm100(nDistance);
+            aDrop.Lines = m_nLines   ;
+            aDrop.Count = m_nChars   ;
+            aDrop.Distance  = convertTwipToMm100(m_nDistance);
             rVal <<= aDrop;
         }
         break;
         case MID_DROPCAP_WHOLE_WORD:
-            rVal <<= bWholeWord;
+            rVal <<= m_bWholeWord;
         break;
         case MID_DROPCAP_CHAR_STYLE_NAME :
         {
@@ -150,7 +150,7 @@ bool SwFormatDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
             sal_Int8 nTemp = 0;
             rVal >>= nTemp;
             if(nTemp >=1 && nTemp < 0x7f)
-                nLines = static_cast<sal_uInt8>(nTemp);
+                m_nLines = static_cast<sal_uInt8>(nTemp);
         }
         break;
         case MID_DROPCAP_COUNT :
@@ -158,14 +158,14 @@ bool SwFormatDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
             sal_Int16 nTemp = 0;
             rVal >>= nTemp;
             if(nTemp >=1 && nTemp < 0x7f)
-                nChars = static_cast<sal_uInt8>(nTemp);
+                m_nChars = static_cast<sal_uInt8>(nTemp);
         }
         break;
         case MID_DROPCAP_DISTANCE :
         {
             sal_Int16 nVal = 0;
             if ( rVal >>= nVal )
-                nDistance = static_cast<sal_Int16>(convertMm100ToTwip(static_cast<sal_Int32>(nVal)));
+                m_nDistance = static_cast<sal_Int16>(convertMm100ToTwip(static_cast<sal_Int32>(nVal)));
             else
                 return false;
             break;
@@ -175,14 +175,14 @@ bool SwFormatDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
             if(rVal.getValueType()  == ::cppu::UnoType<style::DropCapFormat>::get())
             {
                 auto pDrop = o3tl::doAccess<style::DropCapFormat>(rVal);
-                nLines      = pDrop->Lines;
-                nChars      = pDrop->Count;
-                nDistance   = convertMm100ToTwip(pDrop->Distance);
+                m_nLines      = pDrop->Lines;
+                m_nChars      = pDrop->Count;
+                m_nDistance   = convertMm100ToTwip(pDrop->Distance);
             }
         }
         break;
         case MID_DROPCAP_WHOLE_WORD:
-            bWholeWord = *o3tl::doAccess<bool>(rVal);
+            m_bWholeWord = *o3tl::doAccess<bool>(rVal);
         break;
         case MID_DROPCAP_CHAR_STYLE_NAME :
             OSL_FAIL("char format cannot be set in PutValue()!");


More information about the Libreoffice-commits mailing list