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

Johnny_M klasse at partyheld.de
Mon Feb 12 09:49:32 UTC 2018


 sw/source/filter/ww8/ww8par.cxx  |    4 +-
 sw/source/filter/ww8/ww8scan.cxx |   66 +++++++++++++++++++--------------------
 sw/source/filter/ww8/ww8scan.hxx |   18 +++++-----
 3 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit dcbe5eda8f3f698e4717e1458b2c1efb589b8ed6
Author: Johnny_M <klasse at partyheld.de>
Date:   Sat Feb 10 14:24:46 2018 +0100

    Translate German variable names
    
    Akt -> Current in ww8
    
    Note: Similar translation of function name parts will be done later,
    to prevent a Git conflict
    
    Change-Id: I0db585749bb8f83a31c2c02deb33e097bb212a9e
    Reviewed-on: https://gerrit.libreoffice.org/49539
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e6aca96267fd..5b5c9a91042f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3728,7 +3728,7 @@ void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
     {
         bool bReSync;
         // Frame/Table/Autonumbering List Level
-        bTabRowEnd = ProcessSpecial(bReSync, rRes.nAktCp + m_xPlcxMan->GetCpOfs());
+        bTabRowEnd = ProcessSpecial(bReSync, rRes.nCurrentCp + m_xPlcxMan->GetCpOfs());
         if( bReSync )
             *pStartAttr = m_xPlcxMan->Get( &rRes ); // Get Attribut-Pos again
     }
@@ -3749,7 +3749,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, long nTextEnd, bool& rbStar
 
     OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode");
     bool bStartAttr = m_xPlcxMan->Get(&aRes); // Get Attribute position again
-    aRes.nAktCp = rTextPos;                  // Current Cp position
+    aRes.nCurrentCp = rTextPos;                  // Current Cp position
 
     bool bNewSection = (aRes.nFlags & MAN_MASK_NEW_SEP) && !m_bIgnoreText;
     if ( bNewSection ) // New Section
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 9b9949f484aa..ef25e6353e46 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -886,7 +886,7 @@ void WW8SprmIter::advance()
 {
     if (nRemLen > 0 )
     {
-        sal_uInt16 nSize = nAktSize;
+        sal_uInt16 nSize = nCurrentSize;
         if (nSize > nRemLen)
             nSize = nRemLen;
         pSprms += nSize;
@@ -901,18 +901,18 @@ void WW8SprmIter::UpdateMyMembers()
 
     if (bValid)
     {
-        nAktId = mrSprmParser.GetSprmId(pSprms);
-        nAktSize = mrSprmParser.GetSprmSize(nAktId, pSprms, nRemLen);
-        pAktParams = pSprms + mrSprmParser.DistanceToData(nAktId);
-        bValid = nAktSize <= nRemLen;
+        nCurrentId = mrSprmParser.GetSprmId(pSprms);
+        nCurrentSize = mrSprmParser.GetSprmSize(nCurrentId, pSprms, nRemLen);
+        pCurrentParams = pSprms + mrSprmParser.DistanceToData(nCurrentId);
+        bValid = nCurrentSize <= nRemLen;
         SAL_WARN_IF(!bValid, "sw.ww8", "sprm longer than remaining bytes, doc or parser is wrong");
     }
 
     if (!bValid)
     {
-        nAktId = 0;
-        pAktParams = nullptr;
-        nAktSize = 0;
+        nCurrentId = 0;
+        pCurrentParams = nullptr;
+        nCurrentSize = 0;
         nRemLen = 0;
     }
 }
@@ -2031,21 +2031,21 @@ OUString read_uInt16_BeltAndBracesString(SvStream& rStrm)
 }
 
 sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr,
-    WW8_CP nAktStartCp, long nTotalLen, rtl_TextEncoding eEnc ) const
+    WW8_CP nCurrentStartCp, long nTotalLen, rtl_TextEncoding eEnc ) const
 {
     // Read in plain text, which can extend over several pieces
     rStr.clear();
 
-    if (nAktStartCp < 0 || nTotalLen < 0)
+    if (nCurrentStartCp < 0 || nTotalLen < 0)
         return 0;
 
-    WW8_CP nBehindTextCp = nAktStartCp + nTotalLen;
+    WW8_CP nBehindTextCp = nCurrentStartCp + nTotalLen;
     WW8_CP nNextPieceCp  = nBehindTextCp; // Initialization, important for Ver6
     long nTotalRead = 0;
     do
     {
         bool bIsUnicode(false), bPosOk(false);
-        WW8_FC fcAct = WW8Cp2Fc(nAktStartCp,&bIsUnicode,&nNextPieceCp,&bPosOk);
+        WW8_FC fcAct = WW8Cp2Fc(nCurrentStartCp,&bIsUnicode,&nNextPieceCp,&bPosOk);
 
         // Probably aimed beyond file end, doesn't matter!
         if( !bPosOk )
@@ -2058,7 +2058,7 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr,
         WW8_CP nEnd = (nNextPieceCp < nBehindTextCp) ? nNextPieceCp
             : nBehindTextCp;
         WW8_CP nLen;
-        const bool bFail = o3tl::checked_sub(nEnd, nAktStartCp, nLen);
+        const bool bFail = o3tl::checked_sub(nEnd, nCurrentStartCp, nLen);
         if (bFail)
             break;
 
@@ -2070,7 +2070,7 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr,
              : read_uInt8s_ToOUString(rStrm, nLen, eEnc);
 
         nTotalRead  += nLen;
-        nAktStartCp += nLen;
+        nCurrentStartCp += nLen;
         if ( nTotalRead != rStr.getLength() )
             break;
     }
@@ -3027,8 +3027,8 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
     long nPo = SVBT16ToShort( static_cast<sal_uInt8 *>(pPage) );
     nPo <<= 9;                                  // shift as LONG
 
-    long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
-    if (nAktFkpFilePos == nPo)
+    long nCurrentFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
+    if (nCurrentFkpFilePos == nPo)
         pFkp->Reset(GetStartFc());
     else
     {
@@ -3763,9 +3763,9 @@ bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,s
     while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
     {
         // Sprm found?
-        const sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
+        const sal_uInt16 nCurrentId = maSprmParser.GetSprmId(pSp);
         sal_Int32 nRemLen = nSprmSiz - i;
-        const sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp, nRemLen);
+        const sal_uInt16 x = maSprmParser.GetSprmSize(nCurrentId, pSp, nRemLen);
         bool bValid = x <= nRemLen;
         if (!bValid)
         {
@@ -3773,22 +3773,22 @@ bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,s
             break;
         }
         bool bOk = true;
-        if( nAktId  == nId1 )
+        if( nCurrentId  == nId1 )
         {
             sal_uInt16 nFixedLen = maSprmParser.DistanceToData(nId1);
             r1 = SprmResult(pSp + nFixedLen, x - nFixedLen);
         }
-        else if( nAktId  == nId2 )
+        else if( nCurrentId  == nId2 )
         {
             sal_uInt16 nFixedLen = maSprmParser.DistanceToData(nId2);
             r2 = SprmResult(pSp + nFixedLen, x - nFixedLen);
         }
-        else if( nAktId  == nId3 )
+        else if( nCurrentId  == nId3 )
         {
             sal_uInt16 nFixedLen = maSprmParser.DistanceToData(nId3);
             r3 = SprmResult(pSp + nFixedLen, x - nFixedLen);
         }
-        else if( nAktId  == nId4 )
+        else if( nCurrentId  == nId4 )
         {
             sal_uInt16 nFixedLen = maSprmParser.DistanceToData(nId4);
             r4 = SprmResult(pSp + nFixedLen, x - nFixedLen);
@@ -3813,9 +3813,9 @@ SprmResult WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
     while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
     {
         // Sprm found?
-        const sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
-        const sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp, nSprmSiz - i);
-        if (nAktId == nId)
+        const sal_uInt16 nCurrentId = maSprmParser.GetSprmId(pSp);
+        const sal_uInt16 x = maSprmParser.GetSprmSize(nCurrentId, pSp, nSprmSiz - i);
+        if (nCurrentId == nId)
         {
             sal_uInt16 nFixedLen =  maSprmParser.DistanceToData(nId);
             const sal_uInt8 *pRet = pSp + nFixedLen;
@@ -4412,13 +4412,13 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
     sal_uInt16 i = 0;
     if (pBook[0] && pBook[1])
     {
-        WW8_CP nStartAkt, nEndAkt;
+        WW8_CP nStartCurrent, nEndCurrent;
         while (sal::static_int_cast<decltype(aBookNames)::size_type>(i) < aBookNames.size())
         {
             void* p;
             sal_uInt16 nEndIdx;
 
-            if( pBook[0]->GetData( i, nStartAkt, p ) && p )
+            if( pBook[0]->GetData( i, nStartCurrent, p ) && p )
                 nEndIdx = SVBT16ToShort( *static_cast<SVBT16*>(p) );
             else
             {
@@ -4426,9 +4426,9 @@ OUString WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
                 nEndIdx = i;
             }
 
-            nEndAkt = pBook[1]->GetPos( nEndIdx );
+            nEndCurrent = pBook[1]->GetPos( nEndIdx );
 
-            if ((nStartAkt >= nStart) && (nEndAkt <= nEnd))
+            if ((nStartCurrent >= nStart) && (nEndCurrent <= nEnd))
             {
                 nIndex = i;
                 bFound=true;
@@ -8335,17 +8335,17 @@ SprmResult wwSprmParser::findSprmData(sal_uInt16 nId, sal_uInt8* pSprms,
 {
     while (nLen >= MinSprmLen())
     {
-        const sal_uInt16 nAktId = GetSprmId(pSprms);
+        const sal_uInt16 nCurrentId = GetSprmId(pSprms);
         // set pointer to data
-        sal_uInt16 nSize = GetSprmSize(nAktId, pSprms, nLen);
+        sal_uInt16 nSize = GetSprmSize(nCurrentId, pSprms, nLen);
 
         bool bValid = nSize <= nLen;
 
         SAL_WARN_IF(!bValid, "sw.ww8",
-            "sprm 0x" << std::hex << nAktId << std::dec << " longer than remaining bytes, " <<
+            "sprm 0x" << std::hex << nCurrentId << std::dec << " longer than remaining bytes, " <<
             nSize << " vs " << nLen << "doc or parser is wrong");
 
-        if (nAktId == nId && bValid) // Sprm found
+        if (nCurrentId == nId && bValid) // Sprm found
         {
             sal_uInt16 nFixedLen = DistanceToData(nId);
             return SprmResult(pSprms + nFixedLen, nSize - nFixedLen);
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index f9135144b7ec..b78cb2121686 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -269,12 +269,12 @@ class WW8SprmIter
 private:
     const wwSprmParser &mrSprmParser;
     // these members will be updated
-    const sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
-    const sal_uInt8* pAktParams; // start of akt. SPRM's parameters
-    sal_uInt16 nAktId;
-    sal_uInt16 nAktSize;
+    const sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of current SPRM)
+    const sal_uInt8* pCurrentParams; // start of current SPRM's parameters
+    sal_uInt16 nCurrentId;
+    sal_uInt16 nCurrentSize;
 
-    sal_Int32 nRemLen;   // length of remaining SPRMs (including akt. SPRM)
+    sal_Int32 nRemLen;   // length of remaining SPRMs (including current SPRM)
 
     void UpdateMyMembers();
 
@@ -286,8 +286,8 @@ public:
     void  advance();
     const sal_uInt8* GetSprms() const
         { return ( pSprms && (0 < nRemLen) ) ? pSprms : nullptr; }
-    const sal_uInt8* GetAktParams() const { return pAktParams; }
-    sal_uInt16 GetAktId() const { return nAktId; }
+    const sal_uInt8* GetAktParams() const { return pCurrentParams; }
+    sal_uInt16 GetAktId() const { return nCurrentId; }
     sal_Int32 GetRemLen() const { return nRemLen; }
 
 private:
@@ -855,7 +855,7 @@ struct WW8PLCFManResult
     WW8_CP nCpPos;      // attribute starting position
     long nMemLen;       // length for previous
     long nCp2OrIdx;     // footnote-textpos or index in PLCF
-    WW8_CP nAktCp;      // only used by caller
+    WW8_CP nCurrentCp;  // only used by caller
     const sal_uInt8* pMemPos;// Mem-Pos for Sprms
     sal_uInt16 nSprmId;     // Sprm-Id ( 0 = invalid Id -> skip! )
                         // (2..255) or pseudo-Sprm-Id (256..260)
@@ -1092,7 +1092,7 @@ public:
     WW8_FC WW8Cp2Fc(WW8_CP nCpPos, bool* pIsUnicode = nullptr,
         WW8_CP* pNextPieceCp = nullptr, bool* pTestFlag = nullptr) const;
 
-    sal_Int32 WW8ReadString(SvStream& rStrm, OUString& rStr, WW8_CP nAktStartCp,
+    sal_Int32 WW8ReadString(SvStream& rStrm, OUString& rStr, WW8_CP nCurrentStartCp,
         long nTotalLen, rtl_TextEncoding eEnc ) const;
 
 };


More information about the Libreoffice-commits mailing list