diff options
author | Johnny_M <klasse@partyheld.de> | 2018-03-24 12:49:21 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-04-15 19:35:26 +0200 |
commit | 5d0f349b976073ab3b3e083adb87dd724f899697 (patch) | |
tree | 5630a9e8f2ede822bd7bfb320910e9712769b123 | |
parent | 04ee7404f3d00d6748324b6f60736a9326920b64 (diff) |
Translate German variable names
Akt -> Current in ww8
Change-Id: Ib25eb6b796f88441a39bdb71d72542c600f659e1
Reviewed-on: https://gerrit.libreoffice.org/51801
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 32 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.hxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 132 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 24 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 22 |
7 files changed, 119 insertions, 117 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 5fac320981de..549193949962 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -144,13 +144,13 @@ bool DocxExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich return true; } -void DocxExport::AppendBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void DocxExport::AppendBookmarks( const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen ) { std::vector< OUString > aStarts; std::vector< OUString > aEnds; IMarkVector aMarks; - if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarks ) ) + if ( GetBookmarks( rNode, nCurrentPos, nCurrentPos + nLen, aMarks ) ) { for ( IMarkVector::const_iterator it = aMarks.begin(), end = aMarks.end(); it != end; ++it ) @@ -160,10 +160,10 @@ void DocxExport::AppendBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sa const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if ( nStart == nAktPos ) + if ( nStart == nCurrentPos ) aStarts.push_back( pMark->GetName() ); - if ( nEnd == nAktPos ) + if ( nEnd == nCurrentPos ) aEnds.push_back( pMark->GetName() ); } } @@ -171,7 +171,7 @@ void DocxExport::AppendBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sa const OUString& aStr( rNode.GetText() ); const sal_Int32 nEnd = aStr.getLength(); - if ( nAktPos == nEnd ) + if ( nCurrentPos == nEnd ) m_pAttrOutput->WriteFinalBookmarks_Impl( aStarts, aEnds ); else m_pAttrOutput->WriteBookmarks_Impl( aStarts, aEnds ); @@ -188,13 +188,13 @@ void DocxExport::AppendBookmark( const OUString& rName ) m_pAttrOutput->WriteBookmarks_Impl( aStarts, aEnds ); } -void DocxExport::AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void DocxExport::AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen ) { std::vector< OUString > aStarts; std::vector< OUString > aEnds; IMarkVector aMarks; - if ( GetAnnotationMarks( rNode, nAktPos, nAktPos + nLen, aMarks ) ) + if ( GetAnnotationMarks( rNode, nCurrentPos, nCurrentPos + nLen, aMarks ) ) { for ( IMarkVector::const_iterator it = aMarks.begin(), end = aMarks.end(); it != end; ++it ) @@ -204,10 +204,10 @@ void DocxExport::AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktP const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if ( nStart == nAktPos ) + if ( nStart == nCurrentPos ) aStarts.push_back( pMark->GetName() ); - if ( nEnd == nAktPos ) + if ( nEnd == nCurrentPos ) aEnds.push_back( pMark->GetName() ); } } @@ -1504,35 +1504,35 @@ void DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTy AttrOutput().StartParagraph( ww8::WW8TableNodeInfo::Pointer_t()); rtl_TextEncoding eChrSet = aAttrIter.GetNodeCharSet(); OUString aStr( rEditObj.GetText( n )); - sal_Int32 nAktPos = 0; + sal_Int32 nCurrentPos = 0; const sal_Int32 nEnd = aStr.getLength(); do { AttrOutput().StartRun( nullptr, 0 ); const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd); rtl_TextEncoding eNextChrSet = aAttrIter.GetNextCharSet(); - bool bTextAtr = aAttrIter.IsTextAttr( nAktPos ); + bool bTextAtr = aAttrIter.IsTextAttr( nCurrentPos ); if( !bTextAtr ) { - if( nAktPos == 0 && nNextAttr - nAktPos == aStr.getLength()) + if( nCurrentPos == 0 && nNextAttr - nCurrentPos == aStr.getLength()) AttrOutput().RunText( aStr, eChrSet ); else { - OUString tmp( aStr.copy( nAktPos, nNextAttr - nAktPos )); + OUString tmp( aStr.copy( nCurrentPos, nNextAttr - nCurrentPos )); AttrOutput().RunText( tmp, eChrSet ); } } AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nAktPos ); + aAttrIter.OutAttr( nCurrentPos ); AttrOutput().EndRunProperties( nullptr ); - nAktPos = nNextAttr; + nCurrentPos = nNextAttr; eChrSet = eNextChrSet; aAttrIter.NextPos(); AttrOutput().EndRun( nullptr, 0 ); - } while( nAktPos < nEnd ); + } while( nCurrentPos < nEnd ); // aAttrIter.OutParaAttr(false); AttrOutput().EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t()); } diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 65cf02fe2a1d..12813a33f507 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -137,11 +137,11 @@ public: /// Guess the script (asian/western). virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) override; - virtual void AppendBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) override; + virtual void AppendBookmarks( const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen ) override; virtual void AppendBookmark( const OUString& rName ) override; - virtual void AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) override; + virtual void AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen ) override; virtual void ExportGrfBullet(const SwTextNode&) override; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index f6dcdf3cecf8..d2dfff0ffec7 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -109,23 +109,23 @@ bool RtfExport::CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) return true; } -void RtfExport::AppendBookmarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) +void RtfExport::AppendBookmarks(const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen) { std::vector<OUString> aStarts; std::vector<OUString> aEnds; IMarkVector aMarks; - if (GetBookmarks(rNode, nAktPos, nAktPos + nLen, aMarks)) + if (GetBookmarks(rNode, nCurrentPos, nCurrentPos + nLen, aMarks)) { for (const auto& pMark : aMarks) { const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if (nStart == nAktPos) + if (nStart == nCurrentPos) aStarts.push_back(pMark->GetName()); - if (nEnd == nAktPos) + if (nEnd == nCurrentPos) aEnds.push_back(pMark->GetName()); } } @@ -144,23 +144,24 @@ void RtfExport::AppendBookmark(const OUString& rName) m_pAttrOutput->WriteBookmarks_Impl(aStarts, aEnds); } -void RtfExport::AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) +void RtfExport::AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nCurrentPos, + sal_Int32 nLen) { std::vector<OUString> aStarts; std::vector<OUString> aEnds; IMarkVector aMarks; - if (GetAnnotationMarks(rNode, nAktPos, nAktPos + nLen, aMarks)) + if (GetAnnotationMarks(rNode, nCurrentPos, nCurrentPos + nLen, aMarks)) { for (const auto& pMark : aMarks) { const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if (nStart == nAktPos) + if (nStart == nCurrentPos) aStarts.push_back(pMark->GetName()); - if (nEnd == nAktPos) + if (nEnd == nCurrentPos) aEnds.push_back(pMark->GetName()); } } diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 50ba510f4a7d..03f06d5e22b1 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -69,11 +69,12 @@ public: /// Guess the script (asian/western). bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) override; - void AppendBookmarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) override; + void AppendBookmarks(const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen) override; void AppendBookmark(const OUString& rName) override; - void AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) override; + void AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nCurrentPos, + sal_Int32 nLen) override; //For i120928,add an interface to export graphic of bullet void ExportGrfBullet(const SwTextNode& rNd) override; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index fb8454dd1b83..1172caf8be1b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1700,13 +1700,13 @@ Convert characters that need to be converted, the basic replacements and the ridiculously complicated title case attribute mapping to hardcoded upper case because word doesn't have the feature */ -OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos, +OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos, sal_Int32 nLen) const { if (!nLen) return OUString(); - OUString aSnippet(rStr.copy(nAktPos, nLen)); + OUString aSnippet(rStr.copy(nCurrentPos, nLen)); // 0x0a ( Hard Line Break ) -> 0x0b // 0xad ( soft hyphen ) -> 0x1f // 0x2011 ( hard hyphen ) -> 0x1e @@ -1714,7 +1714,7 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos, aSnippet = aSnippet.replace(CHAR_HARDHYPHEN, 0x1e); aSnippet = aSnippet.replace(CHAR_SOFTHYPHEN, 0x1f); - m_rExport.m_aCurrentCharPropStarts.push( nAktPos ); + m_rExport.m_aCurrentCharPropStarts.push( nCurrentPos ); const SfxPoolItem &rItem = GetItem(RES_CHRATR_CASEMAP); if (SvxCaseMap::Capitalize == static_cast<const SvxCaseMapItem&>(rItem).GetValue()) @@ -1746,10 +1746,10 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos, //not done before doing the casemap because the sequence might start //with whitespace if (!g_pBreakIt->GetBreakIter()->isBeginWord( - rStr, nAktPos, g_pBreakIt->GetLocale(nLanguage), + rStr, nCurrentPos, g_pBreakIt->GetLocale(nLanguage), i18n::WordType::ANYWORD_IGNOREWHITESPACES ) ) { - aSnippet = OUStringLiteral1(rStr[nAktPos]) + aSnippet.copy(1); + aSnippet = OUStringLiteral1(rStr[nCurrentPos]) + aSnippet.copy(1); } } m_rExport.m_aCurrentCharPropStarts.pop(); @@ -1851,32 +1851,32 @@ void WW8AttributeOutput::FormatDrop( const SwTextNode& rNode, const SwFormatDrop m_rWW8Export.pO->clear(); } -sal_Int32 MSWordExportBase::GetNextPos( SwWW8AttrIter const * aAttrIter, const SwTextNode& rNode, sal_Int32 nAktPos ) +sal_Int32 MSWordExportBase::GetNextPos( SwWW8AttrIter const * aAttrIter, const SwTextNode& rNode, sal_Int32 nCurrentPos ) { // Get the bookmarks for the normal run const sal_Int32 nNextPos = aAttrIter->WhereNext(); sal_Int32 nNextBookmark = nNextPos; sal_Int32 nNextAnnotationMark = nNextPos; - if( nNextBookmark > nAktPos ) //no need to search for bookmarks otherwise (checked in UpdatePosition()) + if( nNextBookmark > nCurrentPos ) //no need to search for bookmarks otherwise (checked in UpdatePosition()) { - GetSortedBookmarks( rNode, nAktPos, nNextBookmark - nAktPos ); - NearestBookmark( nNextBookmark, nAktPos, false ); - GetSortedAnnotationMarks( rNode, nAktPos, nNextAnnotationMark - nAktPos ); - NearestAnnotationMark( nNextAnnotationMark, nAktPos, false ); + GetSortedBookmarks( rNode, nCurrentPos, nNextBookmark - nCurrentPos ); + NearestBookmark( nNextBookmark, nCurrentPos, false ); + GetSortedAnnotationMarks( rNode, nCurrentPos, nNextAnnotationMark - nCurrentPos ); + NearestAnnotationMark( nNextAnnotationMark, nCurrentPos, false ); } return std::min( nNextPos, std::min( nNextBookmark, nNextAnnotationMark ) ); } -void MSWordExportBase::UpdatePosition( SwWW8AttrIter* aAttrIter, sal_Int32 nAktPos ) +void MSWordExportBase::UpdatePosition( SwWW8AttrIter* aAttrIter, sal_Int32 nCurrentPos ) { sal_Int32 nNextPos; // go to next attribute if no bookmark is found or if the bookmark is after the next attribute position // It may happened that the WhereNext() wasn't used in the previous increment because there was a // bookmark before it. Use that position before trying to find another one. - bool bNextBookmark = NearestBookmark( nNextPos, nAktPos, true ); - if( nAktPos == aAttrIter->WhereNext() && ( !bNextBookmark || nNextPos > aAttrIter->WhereNext() ) ) + bool bNextBookmark = NearestBookmark( nNextPos, nCurrentPos, true ); + if( nCurrentPos == aAttrIter->WhereNext() && ( !bNextBookmark || nNextPos > aAttrIter->WhereNext() ) ) aAttrIter->NextPos(); } @@ -1964,7 +1964,7 @@ public: } }; -bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ) +bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly ) { bool bHasBookmark = false; @@ -1972,7 +1972,7 @@ bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAk { IMark* pMarkStart = m_rSortedBookmarksStart.front(); const sal_Int32 nNext = pMarkStart->GetMarkStart().nContent.GetIndex(); - if( !bNextPositionOnly || (nNext > nAktPos )) + if( !bNextPositionOnly || (nNext > nCurrentPos )) { rNearest = nNext; bHasBookmark = true; @@ -1983,7 +1983,7 @@ bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAk { IMark* pMarkEnd = m_rSortedBookmarksEnd[0]; const sal_Int32 nNext = pMarkEnd->GetMarkEnd().nContent.GetIndex(); - if( !bNextPositionOnly || nNext > nAktPos ) + if( !bNextPositionOnly || nNext > nCurrentPos ) { if ( !bHasBookmark ) rNearest = nNext; @@ -1996,7 +1996,7 @@ bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAk return bHasBookmark; } -void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ) +void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly ) { bool bHasAnnotationMark = false; @@ -2004,7 +2004,7 @@ void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int { IMark* pMarkStart = m_rSortedAnnotationMarksStart.front(); const sal_Int32 nNext = pMarkStart->GetMarkStart().nContent.GetIndex(); - if( !bNextPositionOnly || (nNext > nAktPos )) + if( !bNextPositionOnly || (nNext > nCurrentPos )) { rNearest = nNext; bHasAnnotationMark = true; @@ -2015,7 +2015,7 @@ void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int { IMark* pMarkEnd = m_rSortedAnnotationMarksEnd[0]; const sal_Int32 nNext = pMarkEnd->GetMarkEnd().nContent.GetIndex(); - if( !bNextPositionOnly || nNext > nAktPos ) + if( !bNextPositionOnly || nNext > nCurrentPos ) { if ( !bHasAnnotationMark ) rNearest = nNext; @@ -2025,10 +2025,10 @@ void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int } } -void MSWordExportBase::GetSortedAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void MSWordExportBase::GetSortedAnnotationMarks( const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen ) { IMarkVector aMarksStart; - if ( GetAnnotationMarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) + if ( GetAnnotationMarks( rNode, nCurrentPos, nCurrentPos + nLen, aMarksStart ) ) { IMarkVector aSortedEnd; IMarkVector aSortedStart; @@ -2041,10 +2041,10 @@ void MSWordExportBase::GetSortedAnnotationMarks( const SwTextNode& rNode, sal_In const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if ( nStart > nAktPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) + if ( nStart > nCurrentPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) aSortedStart.push_back( pMark ); - if ( nEnd > nAktPos && nEnd <= ( nAktPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) + if ( nEnd > nCurrentPos && nEnd <= ( nCurrentPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) aSortedEnd.push_back( pMark ); } @@ -2061,10 +2061,10 @@ void MSWordExportBase::GetSortedAnnotationMarks( const SwTextNode& rNode, sal_In } } -void MSWordExportBase::GetSortedBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void MSWordExportBase::GetSortedBookmarks( const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen ) { IMarkVector aMarksStart; - if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) + if ( GetBookmarks( rNode, nCurrentPos, nCurrentPos + nLen, aMarksStart ) ) { IMarkVector aSortedEnd; IMarkVector aSortedStart; @@ -2077,10 +2077,10 @@ void MSWordExportBase::GetSortedBookmarks( const SwTextNode& rNode, sal_Int32 nA const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().nContent.GetIndex(); - if ( nStart > nAktPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) + if ( nStart > nCurrentPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) aSortedStart.push_back( pMark ); - if ( nEnd > nAktPos && nEnd <= ( nAktPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) + if ( nEnd > nCurrentPos && nEnd <= ( nCurrentPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) aSortedEnd.push_back( pMark ); } @@ -2209,7 +2209,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) // iterate through portions on different pages do { - sal_Int32 nAktPos = *aBreakIt; + sal_Int32 nCurrentPos = *aBreakIt; if( softBreakList.size() > 1 ) // not for empty paragraph ++aBreakIt; @@ -2259,25 +2259,25 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) do { - const SwRedlineData* pRedlineData = aAttrIter.GetRunLevelRedline( nAktPos ); + const SwRedlineData* pRedlineData = aAttrIter.GetRunLevelRedline( nCurrentPos ); FlyProcessingState nStateOfFlyFrame = FLY_PROCESSED; bool bPostponeWritingText = false ; OUString aSavedSnippet ; - sal_Int32 nNextAttr = GetNextPos( &aAttrIter, rNode, nAktPos ); + sal_Int32 nNextAttr = GetNextPos( &aAttrIter, rNode, nCurrentPos ); // Skip un-exportable attributes. - if (!aAttrIter.IsExportableAttr(nAktPos)) + if (!aAttrIter.IsExportableAttr(nCurrentPos)) { - nAktPos = nNextAttr; - UpdatePosition(&aAttrIter, nAktPos); + nCurrentPos = nNextAttr; + UpdatePosition(&aAttrIter, nCurrentPos); eChrSet = aAttrIter.GetCharSet(); continue; } // Is this the only run in this paragraph and it's empty? - bool bSingleEmptyRun = nAktPos == 0 && nNextAttr == 0; - AttrOutput().StartRun( pRedlineData, nAktPos, bSingleEmptyRun ); + bool bSingleEmptyRun = nCurrentPos == 0 && nNextAttr == 0; + AttrOutput().StartRun( pRedlineData, nCurrentPos, bSingleEmptyRun ); if( nNextAttr > nEnd ) nNextAttr = nEnd; @@ -2286,8 +2286,8 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) { if( AttrOutput().FootnoteEndnoteRefTag() ) { - AttrOutput().EndRun( &rNode, nAktPos, nNextAttr == nEnd ); - AttrOutput().StartRun( pRedlineData, nAktPos, bSingleEmptyRun ); + AttrOutput().EndRun( &rNode, nCurrentPos, nNextAttr == nEnd ); + AttrOutput().StartRun( pRedlineData, nCurrentPos, bSingleEmptyRun ); } } @@ -2306,32 +2306,32 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) bPostponeWritingText = true ; } - nStateOfFlyFrame = aAttrIter.OutFlys( nAktPos ); + nStateOfFlyFrame = aAttrIter.OutFlys( nCurrentPos ); AttrOutput().SetStateOfFlyFrame( nStateOfFlyFrame ); AttrOutput().SetAnchorIsLinkedToNode( bPostponeWritingText && (FLY_POSTPONED != nStateOfFlyFrame) ); // Append bookmarks in this range after flys, exclusive of final // position of this range - AppendBookmarks( rNode, nAktPos, nNextAttr - nAktPos ); - AppendAnnotationMarks( rNode, nAktPos, nNextAttr - nAktPos ); + AppendBookmarks( rNode, nCurrentPos, nNextAttr - nCurrentPos ); + AppendAnnotationMarks( rNode, nCurrentPos, nNextAttr - nCurrentPos ); // At the moment smarttags are only written for paragraphs, at the // beginning of the paragraph. - if (nAktPos == 0) + if (nCurrentPos == 0) AppendSmartTags(rNode); - bool bTextAtr = aAttrIter.IsTextAttr( nAktPos ); - nOpenAttrWithRange += aAttrIter.OutAttrWithRange( rNode, nAktPos ); + bool bTextAtr = aAttrIter.IsTextAttr( nCurrentPos ); + nOpenAttrWithRange += aAttrIter.OutAttrWithRange( rNode, nCurrentPos ); - sal_Int32 nLen = nNextAttr - nAktPos; + sal_Int32 nLen = nNextAttr - nCurrentPos; if ( !bTextAtr && nLen ) { - sal_Unicode ch = aStr[nAktPos]; + sal_Unicode ch = aStr[nCurrentPos]; const sal_Int32 ofs = ( ch == CH_TXT_ATR_FIELDSTART || ch == CH_TXT_ATR_FIELDEND || ch == CH_TXT_ATR_FORMELEMENT? 1 : 0 ); IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); if ( ch == CH_TXT_ATR_FIELDSTART ) { - SwPosition aPosition( rNode, SwIndex( &rNode, nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( &rNode, nCurrentPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); @@ -2380,7 +2380,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) } else if ( ch == CH_TXT_ATR_FIELDEND ) { - SwPosition aPosition( rNode, SwIndex( &rNode, nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( &rNode, nCurrentPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" ); @@ -2404,7 +2404,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) } else if ( ch == CH_TXT_ATR_FORMELEMENT ) { - SwPosition aPosition( rNode, SwIndex( &rNode, nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( &rNode, nCurrentPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); @@ -2425,13 +2425,13 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) nLen -= ofs; // if paragraph needs to be split, write only until split position - assert(!bNeedParaSplit || nAktPos <= *aBreakIt); - if( bNeedParaSplit && nAktPos + ofs + nLen > *aBreakIt) - nLen = *aBreakIt - nAktPos - ofs; + assert(!bNeedParaSplit || nCurrentPos <= *aBreakIt); + if( bNeedParaSplit && nCurrentPos + ofs + nLen > *aBreakIt) + nLen = *aBreakIt - nCurrentPos - ofs; assert(0 <= nLen); - OUString aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + ofs, nLen ) ); - if ( ( m_nTextTyp == TXT_EDN || m_nTextTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 ) + OUString aSnippet( aAttrIter.GetSnippet( aStr, nCurrentPos + ofs, nLen ) ); + if ( ( m_nTextTyp == TXT_EDN || m_nTextTyp == TXT_FTN ) && nCurrentPos == 0 && nLen > 0 ) { // Allow MSO to emulate LO footnote text starting at left margin - only meaningful with hanging indent sal_Int32 nFirstLineIndent=0; @@ -2471,7 +2471,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) // Output the character attributes // #i51277# do this before writing flys at end of paragraph AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nAktPos ); + aAttrIter.OutAttr( nCurrentPos ); AttrOutput().EndRunProperties( pRedlineData ); } @@ -2514,7 +2514,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) // do it after WriteCR for an empty paragraph (otherwise // WW8_WrFkp::Append throws SPRMs away...) AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nAktPos ); + aAttrIter.OutAttr( nCurrentPos ); AttrOutput().EndRunProperties( pRedlineData ); } @@ -2524,7 +2524,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) OSL_ENSURE(nOpenAttrWithRange >= 0, "odd to see this happening, expected >= 0"); bool bAttrWithRange = (nOpenAttrWithRange > 0); - if ( nAktPos != nEnd ) + if ( nCurrentPos != nEnd ) { nOpenAttrWithRange += aAttrIter.OutAttrWithRange( rNode, nEnd ); OSL_ENSURE(nOpenAttrWithRange == 0, @@ -2575,34 +2575,34 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) if( bPostponeWritingText && FLY_PROCESSED == nStateOfFlyFrame ) { - AttrOutput().EndRun(&rNode, nAktPos, nNextAttr == nEnd); + AttrOutput().EndRun(&rNode, nCurrentPos, nNextAttr == nEnd); //write the postponed text run - AttrOutput().StartRun( pRedlineData, nAktPos, bSingleEmptyRun ); + AttrOutput().StartRun( pRedlineData, nCurrentPos, bSingleEmptyRun ); AttrOutput().SetAnchorIsLinkedToNode( false ); AttrOutput().ResetFlyProcessingFlag(); if (0 != nEnd) { AttrOutput().StartRunProperties(); - aAttrIter.OutAttr( nAktPos ); + aAttrIter.OutAttr( nCurrentPos ); AttrOutput().EndRunProperties( pRedlineData ); } AttrOutput().RunText( aSavedSnippet, eChrSet ); - AttrOutput().EndRun(&rNode, nAktPos, nNextAttr == nEnd); + AttrOutput().EndRun(&rNode, nCurrentPos, nNextAttr == nEnd); } else if( bPostponeWritingText && !aSavedSnippet.isEmpty() ) { //write the postponed text run AttrOutput().RunText( aSavedSnippet, eChrSet ); - AttrOutput().EndRun(&rNode, nAktPos, nNextAttr == nEnd); + AttrOutput().EndRun(&rNode, nCurrentPos, nNextAttr == nEnd); } else - AttrOutput().EndRun(&rNode, nAktPos, nNextAttr == nEnd); + AttrOutput().EndRun(&rNode, nCurrentPos, nNextAttr == nEnd); - nAktPos = nNextAttr; - UpdatePosition( &aAttrIter, nAktPos ); + nCurrentPos = nNextAttr; + UpdatePosition( &aAttrIter, nCurrentPos ); eChrSet = aAttrIter.GetCharSet(); } - while ( nAktPos < nEnd ); + while ( nCurrentPos < nEnd ); // if paragraph is split, put the section break between the parts if( bNeedParaSplit && *aBreakIt != rNode.GetText().getLength() ) diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 1f939e2e002d..b4734cf7d946 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1436,12 +1436,12 @@ WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const return nFc + m_Pcts.back()->GetStartCp(); } -void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) +void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) { std::vector< const ::sw::mark::IMark* > aArr; sal_uInt16 nContent; - const sal_Int32 nAktEnd = nAktPos + nLen; - if( GetWriter().GetBookmarks( rNd, nAktPos, nAktEnd, aArr )) + const sal_Int32 nCurrentEnd = nCurrentPos + nLen; + if( GetWriter().GetBookmarks( rNd, nCurrentPos, nCurrentEnd, aArr )) { sal_uLong nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() ); for(const ::sw::mark::IMark* p : aArr) @@ -1462,33 +1462,33 @@ void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_I } if( !pOPos || ( nNd == pPos->nNode.GetIndex() && - ( nContent = pPos->nContent.GetIndex() ) >= nAktPos && - nContent < nAktEnd ) ) + ( nContent = pPos->nContent.GetIndex() ) >= nCurrentPos && + nContent < nCurrentEnd ) ) { - sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos; + sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nCurrentPos; m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName())); } if( pOPos && nNd == pOPos->nNode.GetIndex() && - ( nContent = pOPos->nContent.GetIndex() ) >= nAktPos && - nContent < nAktEnd ) + ( nContent = pOPos->nContent.GetIndex() ) >= nCurrentPos && + nContent < nCurrentEnd ) { - sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos; + sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nCurrentPos; m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName())); } } } } -void WW8Export::AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) +void WW8Export::AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nCurrentPos, sal_Int32 nLen) { IMarkVector aMarks; - if (GetAnnotationMarks(rNode, nAktPos, nAktPos + nLen, aMarks)) + if (GetAnnotationMarks(rNode, nCurrentPos, nCurrentPos + nLen, aMarks)) { for (IMarkVector::const_iterator it = aMarks.begin(), end = aMarks.end(); it != end; ++it) { sw::mark::IMark* pMark = (*it); const sal_Int32 nStart = pMark->GetMarkStart().nContent.GetIndex(); - if (nStart == nAktPos) + if (nStart == nCurrentPos) { m_pAtn->AddRangeStartPosition(pMark->GetName(), Fc2Cp(Strm().Tell())); } diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 63f047ce8e44..1a7f9675976b 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -685,11 +685,11 @@ public: /// has two virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0; - virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) = 0; + virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0; virtual void AppendBookmark( const OUString& rName ) = 0; - virtual void AppendAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) = 0; + virtual void AppendAnnotationMarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0; virtual void AppendSmartTags(SwTextNode& /*rTextNode*/) { } @@ -802,10 +802,10 @@ protected: virtual void ExportDocument_Impl() = 0; /// Get the next position in the text node to output - sal_Int32 GetNextPos( SwWW8AttrIter const * pAttrIter, const SwTextNode& rNode, sal_Int32 nAktPos ); + sal_Int32 GetNextPos( SwWW8AttrIter const * pAttrIter, const SwTextNode& rNode, sal_Int32 nCurrentPos ); /// Update the information for GetNextPos(). - void UpdatePosition( SwWW8AttrIter* pAttrIter, sal_Int32 nAktPos ); + void UpdatePosition( SwWW8AttrIter* pAttrIter, sal_Int32 nCurrentPos ); /// Output SwTextNode virtual void OutputTextNode( SwTextNode& ); @@ -857,18 +857,18 @@ protected: /// Find the nearest bookmark from the current position. /// /// Returns false when there is no bookmark. - bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ); + bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly ); - void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); + void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ); bool GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ); /// Find the nearest annotation mark from the current position. /// - void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ); + void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly ); - void GetSortedAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); + void GetSortedAnnotationMarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ); bool GetAnnotationMarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ); @@ -1053,11 +1053,11 @@ public: bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const & xOleStg, tools::SvRef<SotStorage> xObjStg, OUString const &rStorageName, SwOLENode *pOLENd); - virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) override; + virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) override; virtual void AppendBookmark( const OUString& rName ) override; void AppendBookmarkEndWithCorrection( const OUString& rName ); - virtual void AppendAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) override; + virtual void AppendAnnotationMarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) override; virtual void AppendSmartTags(SwTextNode& rTextNode) override; @@ -1522,7 +1522,7 @@ public: sal_uInt16 GetScript() const { return mnScript; } bool IsParaRTL() const { return mbParaIsRTL; } rtl_TextEncoding GetCharSet() const { return meChrSet; } - OUString GetSnippet(const OUString &rStr, sal_Int32 nAktPos, + OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos, sal_Int32 nLen) const; const SwFormatDrop& GetSwFormatDrop() const { return mrSwFormatDrop; } |