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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon May 27 08:03:35 UTC 2019


 sw/source/filter/ww8/wrtww8.cxx   |   40 ++++++++++++++--------------
 sw/source/filter/ww8/ww8par.cxx   |   14 ++++-----
 sw/source/filter/ww8/ww8par6.cxx  |    2 -
 sw/source/filter/ww8/ww8scan.cxx  |   54 +++++++++++++++++++-------------------
 sw/source/filter/ww8/ww8struc.hxx |   20 +++++++-------
 5 files changed, 65 insertions(+), 65 deletions(-)

New commits:
commit 28fc6e2d66e166d354bbe99861f35e12978bcd97
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon May 27 09:05:34 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 27 10:02:31 2019 +0200

    sw: prefix members of WW8DopTypography
    
    Change-Id: I44565d1ba019f3639ef920f7ef7177a3cd89d117
    Reviewed-on: https://gerrit.libreoffice.org/73018
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 6108764e3353..09bf616a090b 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -699,14 +699,14 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
     */
 
     /*Our default Japanese Level is 2, this is a special MS hack to set this*/
-    rTypo.reserved2 = 1;
+    rTypo.m_reserved2 = 1;
 
-    for (rTypo.reserved1=8;rTypo.reserved1>0;rTypo.reserved1-=2)
+    for (rTypo.m_reserved1=8;rTypo.m_reserved1>0;rTypo.m_reserved1-=2)
     {
         if (nullptr != (pForbidden = m_pDoc->getIDocumentSettingAccess().getForbiddenCharacters(rTypo.GetConvertedLang(),
             false)))
         {
-            int nIdx = (rTypo.reserved1-2)/2;
+            int nIdx = (rTypo.m_reserved1-2)/2;
             if( lcl_CmpBeginEndChars( pForbidden->endLine,
                     aLangNotEnd[ nIdx ], sizeof(aLangNotEnd[ nIdx ]) ) ||
                 lcl_CmpBeginEndChars( pForbidden->beginLine,
@@ -732,7 +732,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
                             )
                         )
                     {
-                        rTypo.reserved2 = 0;
+                        rTypo.m_reserved2 = 0;
                         continue;
                     }
                 }
@@ -740,8 +740,8 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
                 if (!pUseMe)
                 {
                     pUseMe = pForbidden;
-                    nUseReserved = rTypo.reserved1;
-                    rTypo.iLevelOfKinsoku = 2;
+                    nUseReserved = rTypo.m_reserved1;
+                    rTypo.m_iLevelOfKinsoku = 2;
                 }
                 nNoNeeded++;
             }
@@ -749,30 +749,30 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
     }
 
     OSL_ENSURE( nNoNeeded<=1, "Example of unexportable forbidden chars" );
-    rTypo.reserved1=nUseReserved;
-    if (rTypo.iLevelOfKinsoku && pUseMe)
+    rTypo.m_reserved1=nUseReserved;
+    if (rTypo.m_iLevelOfKinsoku && pUseMe)
     {
-        rTypo.cchFollowingPunct = msword_cast<sal_Int16>
+        rTypo.m_cchFollowingPunct = msword_cast<sal_Int16>
             (pUseMe->beginLine.getLength());
-        if (rTypo.cchFollowingPunct > WW8DopTypography::nMaxFollowing - 1)
-            rTypo.cchFollowingPunct = WW8DopTypography::nMaxFollowing - 1;
+        if (rTypo.m_cchFollowingPunct > WW8DopTypography::nMaxFollowing - 1)
+            rTypo.m_cchFollowingPunct = WW8DopTypography::nMaxFollowing - 1;
 
-        rTypo.cchLeadingPunct = msword_cast<sal_Int16>
+        rTypo.m_cchLeadingPunct = msword_cast<sal_Int16>
             (pUseMe->endLine.getLength());
-        if (rTypo.cchLeadingPunct > WW8DopTypography::nMaxLeading - 1)
-            rTypo.cchLeadingPunct = WW8DopTypography::nMaxLeading -1;
+        if (rTypo.m_cchLeadingPunct > WW8DopTypography::nMaxLeading - 1)
+            rTypo.m_cchLeadingPunct = WW8DopTypography::nMaxLeading -1;
 
-        memcpy(rTypo.rgxchFPunct,pUseMe->beginLine.getStr(),
-            (rTypo.cchFollowingPunct+1)*2);
+        memcpy(rTypo.m_rgxchFPunct,pUseMe->beginLine.getStr(),
+            (rTypo.m_cchFollowingPunct+1)*2);
 
-        memcpy(rTypo.rgxchLPunct,pUseMe->endLine.getStr(),
-            (rTypo.cchLeadingPunct+1)*2);
+        memcpy(rTypo.m_rgxchLPunct,pUseMe->endLine.getStr(),
+            (rTypo.m_cchLeadingPunct+1)*2);
     }
 
     const IDocumentSettingAccess& rIDocumentSettingAccess = GetWriter().getIDocumentSettingAccess();
 
-    rTypo.fKerningPunct = sal_uInt16(rIDocumentSettingAccess.get(DocumentSettingId::KERN_ASIAN_PUNCTUATION));
-    rTypo.iJustification = sal_uInt16(m_pDoc->getIDocumentSettingAccess().getCharacterCompressionType());
+    rTypo.m_fKerningPunct = sal_uInt16(rIDocumentSettingAccess.get(DocumentSettingId::KERN_ASIAN_PUNCTUATION));
+    rTypo.m_iJustification = sal_uInt16(m_pDoc->getIDocumentSettingAccess().getCharacterCompressionType());
 }
 
 // It can only be found something with this method, if it is used within
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 60999be5060d..04b65f16c3f9 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1942,12 +1942,12 @@ void SwWW8ImplReader::ImportDop()
 
 void SwWW8ImplReader::ImportDopTypography(const WW8DopTypography &rTypo)
 {
-    switch (rTypo.iLevelOfKinsoku)
+    switch (rTypo.m_iLevelOfKinsoku)
     {
         case 2: // custom
             {
-                i18n::ForbiddenCharacters aForbidden(rTypo.rgxchFPunct,
-                    rTypo.rgxchLPunct);
+                i18n::ForbiddenCharacters aForbidden(rTypo.m_rgxchFPunct,
+                    rTypo.m_rgxchLPunct);
                 m_rDoc.getIDocumentSettingAccess().setForbiddenCharacters(rTypo.GetConvertedLang(),
                         aForbidden);
                 // Obviously cannot set the standard level 1 for japanese, so
@@ -1966,15 +1966,15 @@ void SwWW8ImplReader::ImportDopTypography(const WW8DopTypography &rTypo)
     hack in the writer. Its our default as well, but we can set it anyway
     as a flag for later.
     */
-    if (!rTypo.reserved2)
+    if (!rTypo.m_reserved2)
     {
         i18n::ForbiddenCharacters aForbidden(WW8DopTypography::GetJapanNotBeginLevel1(),
             WW8DopTypography::GetJapanNotEndLevel1());
         m_rDoc.getIDocumentSettingAccess().setForbiddenCharacters(LANGUAGE_JAPANESE,aForbidden);
     }
 
-    m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::KERN_ASIAN_PUNCTUATION, bool(rTypo.fKerningPunct));
-    m_rDoc.getIDocumentSettingAccess().setCharacterCompressionType(static_cast<CharCompressType>(rTypo.iJustification));
+    m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::KERN_ASIAN_PUNCTUATION, bool(rTypo.m_fKerningPunct));
+    m_rDoc.getIDocumentSettingAccess().setCharacterCompressionType(static_cast<CharCompressType>(rTypo.m_iJustification));
 }
 
 /**
@@ -4378,7 +4378,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection,
 void wwSectionManager::SetUseOn(wwSection &rSection)
 {
     bool bMirror = mrReader.m_xWDop->fMirrorMargins ||
-        mrReader.m_xWDop->doptypography.f2on1;
+        mrReader.m_xWDop->doptypography.m_f2on1;
 
     UseOnPage eUseBase = bMirror ? UseOnPage::Mirror : UseOnPage::All;
     UseOnPage eUse = eUseBase;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e98fc1b5b4b6..e7308ac7e60e 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1075,7 +1075,7 @@ void wwSectionManager::CreateSep(const long nTextPos)
     // #i31806# but only swap if 2page in 1sheet is enabled.
     // it's not clear if dmOrientPage is the correct member to
     // decide on this.
-    if(mrReader.m_xWDop->doptypography.f2on1 &&
+    if(mrReader.m_xWDop->doptypography.m_f2on1 &&
             aNewSection.maSep.dmOrientPage == 2)
         std::swap(aNewSection.maSep.dxaLeft, aNewSection.maSep.dxaRight);
 
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index cfbbd03b3401..19e0d81e7850 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -8251,52 +8251,52 @@ void WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
 void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
 {
     sal_uInt16 a16Bit = Get_UShort(pData);
-    fKerningPunct = (a16Bit & 0x0001);
-    iJustification = (a16Bit & 0x0006) >>  1;
-    iLevelOfKinsoku = (a16Bit & 0x0018) >>  3;
-    f2on1 = (a16Bit & 0x0020) >>  5;
-    reserved1 = (a16Bit & 0x03C0) >>  6;
-    reserved2 = (a16Bit & 0xFC00) >>  10;
+    m_fKerningPunct = (a16Bit & 0x0001);
+    m_iJustification = (a16Bit & 0x0006) >>  1;
+    m_iLevelOfKinsoku = (a16Bit & 0x0018) >>  3;
+    m_f2on1 = (a16Bit & 0x0020) >>  5;
+    m_reserved1 = (a16Bit & 0x03C0) >>  6;
+    m_reserved2 = (a16Bit & 0xFC00) >>  10;
 
-    cchFollowingPunct = Get_Short(pData);
-    cchLeadingPunct = Get_Short(pData);
+    m_cchFollowingPunct = Get_Short(pData);
+    m_cchLeadingPunct = Get_Short(pData);
 
     sal_Int16 i;
     for (i=0; i < nMaxFollowing; ++i)
-        rgxchFPunct[i] = Get_Short(pData);
+        m_rgxchFPunct[i] = Get_Short(pData);
     for (i=0; i < nMaxLeading; ++i)
-        rgxchLPunct[i] = Get_Short(pData);
+        m_rgxchLPunct[i] = Get_Short(pData);
 
-    if (cchFollowingPunct >= 0 && cchFollowingPunct < nMaxFollowing)
-        rgxchFPunct[cchFollowingPunct]=0;
+    if (m_cchFollowingPunct >= 0 && m_cchFollowingPunct < nMaxFollowing)
+        m_rgxchFPunct[m_cchFollowingPunct]=0;
     else
-        rgxchFPunct[nMaxFollowing - 1]=0;
+        m_rgxchFPunct[nMaxFollowing - 1]=0;
 
-    if (cchLeadingPunct >= 0 && cchLeadingPunct < nMaxLeading)
-        rgxchLPunct[cchLeadingPunct]=0;
+    if (m_cchLeadingPunct >= 0 && m_cchLeadingPunct < nMaxLeading)
+        m_rgxchLPunct[m_cchLeadingPunct]=0;
     else
-        rgxchLPunct[nMaxLeading - 1]=0;
+        m_rgxchLPunct[nMaxLeading - 1]=0;
 
 }
 
 void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
 {
-    sal_uInt16 a16Bit = sal_uInt16(fKerningPunct);
-    a16Bit |= (iJustification << 1) & 0x0006;
-    a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
-    a16Bit |= (int(f2on1) << 5) & 0x0020;
-    a16Bit |= (reserved1 << 6) & 0x03C0;
-    a16Bit |= (reserved2 << 10) & 0xFC00;
+    sal_uInt16 a16Bit = sal_uInt16(m_fKerningPunct);
+    a16Bit |= (m_iJustification << 1) & 0x0006;
+    a16Bit |= (m_iLevelOfKinsoku << 3) & 0x0018;
+    a16Bit |= (int(m_f2on1) << 5) & 0x0020;
+    a16Bit |= (m_reserved1 << 6) & 0x03C0;
+    a16Bit |= (m_reserved2 << 10) & 0xFC00;
     Set_UInt16(pData,a16Bit);
 
-    Set_UInt16(pData,cchFollowingPunct);
-    Set_UInt16(pData,cchLeadingPunct);
+    Set_UInt16(pData,m_cchFollowingPunct);
+    Set_UInt16(pData,m_cchLeadingPunct);
 
     sal_Int16 i;
     for (i=0; i < nMaxFollowing; ++i)
-        Set_UInt16(pData,rgxchFPunct[i]);
+        Set_UInt16(pData,m_rgxchFPunct[i]);
     for (i=0; i < nMaxLeading; ++i)
-        Set_UInt16(pData,rgxchLPunct[i]);
+        Set_UInt16(pData,m_rgxchLPunct[i]);
 }
 
 LanguageType WW8DopTypography::GetConvertedLang() const
@@ -8312,7 +8312,7 @@ LanguageType WW8DopTypography::GetConvertedLang() const
     is for some other use ?, or redundant. If more examples trigger the assert
     we might be able to figure it out.
     */
-    switch(reserved1 & 0xE)
+    switch(m_reserved1 & 0xE)
     {
         case 2:     //Japan
             nLang = LANGUAGE_JAPANESE;
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 0ce2304c1fa6..5e2a468947cc 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -380,18 +380,18 @@ public:
     //Maps what I think is the language this is to affect to the OOo language
     LanguageType GetConvertedLang() const;
 
-    sal_uInt16 fKerningPunct  : 1;  // true if we're kerning punctuation
-    sal_uInt16 iJustification : 2;  // Kinsoku method of justification:
+    sal_uInt16 m_fKerningPunct  : 1;  // true if we're kerning punctuation
+    sal_uInt16 m_iJustification : 2;  // Kinsoku method of justification:
                                 //  0 = always expand
                                 //  1 = compress punctuation
                                 //  2 = compress punctuation and kana.
-    sal_uInt16 iLevelOfKinsoku : 2; // Level of Kinsoku:
+    sal_uInt16 m_iLevelOfKinsoku : 2; // Level of Kinsoku:
                                 //  0 = Level 1
                                 //  1 = Level 2
                                 //  2 = Custom
-    sal_uInt16 f2on1          : 1;  // 2-page-on-1 feature is turned on.
-    sal_uInt16 reserved1      : 4;  // in 97 its marked as reserved BUT
-    sal_uInt16 reserved2      : 6;  // reserved ?
+    sal_uInt16 m_f2on1          : 1;  // 2-page-on-1 feature is turned on.
+    sal_uInt16 m_reserved1      : 4;  // in 97 its marked as reserved BUT
+    sal_uInt16 m_reserved2      : 6;  // reserved ?
     //we find that the following applies,
     //2 == Japanese
     //4 == Chinese (VR...
@@ -406,13 +406,13 @@ public:
     static const sal_Unicode * GetJapanNotBeginLevel1();
     static const sal_Unicode * GetJapanNotEndLevel1();
 
-    sal_Int16 cchFollowingPunct;    // length of rgxchFPunct
-    sal_Int16 cchLeadingPunct;      // length of rgxchLPunct
+    sal_Int16 m_cchFollowingPunct;    // length of rgxchFPunct
+    sal_Int16 m_cchLeadingPunct;      // length of rgxchLPunct
 
     // array of characters that should never appear at the start of a line
-    sal_Unicode rgxchFPunct[nMaxFollowing];
+    sal_Unicode m_rgxchFPunct[nMaxFollowing];
     // array of characters that should never appear at the end of a line
-    sal_Unicode rgxchLPunct[nMaxLeading];
+    sal_Unicode m_rgxchLPunct[nMaxLeading];
 };
 
 struct WW8_DOGRID


More information about the Libreoffice-commits mailing list