diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-10-16 14:24:14 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:00 +0100 |
commit | bfaa4cc043f349dc64203c3fb27d4010cfca7746 (patch) | |
tree | 017a44c5c981586cb0ec68727d6832dbd3c45220 /sw/source/core/txtnode/atrftn.cxx | |
parent | fe1d3328997741b55202aca7b3dc566ca833a5f4 (diff) |
sw_redlinehide_3: use appropriate footnote number in text formatting
Add layout parameter to SwFormatFootnote::GetViewNumStr().
Change-Id: Iff9c9ff31d1793b66ba7e3ebdfa5cfe413324471
Diffstat (limited to 'sw/source/core/txtnode/atrftn.cxx')
-rw-r--r-- | sw/source/core/txtnode/atrftn.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 70ef5875f190..4e86ee932ff5 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -23,6 +23,7 @@ #include <DocumentContentOperationsManager.hxx> #include <IDocumentStylePoolAccess.hxx> #include <cntfrm.hxx> +#include <rootfrm.hxx> #include <pagefrm.hxx> #include <txtftn.hxx> #include <ftnidx.hxx> @@ -201,7 +202,8 @@ void SwFormatFootnote::GetFootnoteText( OUString& rStr ) const } /// return the view string of the foot/endnote -OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const +OUString SwFormatFootnote::GetViewNumStr(const SwDoc& rDoc, + SwRootFrame const*const pLayout, bool bInclStrings) const { OUString sRet( GetNumStr() ); if( sRet.isEmpty() ) @@ -211,6 +213,9 @@ OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) const SwSectionNode* pSectNd = m_pTextAttr ? SwUpdFootnoteEndNtAtEnd::FindSectNdWithEndAttr( *m_pTextAttr ) : nullptr; + sal_uInt16 const nNumber(pLayout && pLayout->IsHideRedlines() + ? GetNumberRLHidden() + : GetNumber()); if( pSectNd ) { @@ -223,7 +228,7 @@ OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFootnoteEnd.GetValue() ) { bMakeNum = false; - sRet = rFootnoteEnd.GetSwNumType().GetNumStr( GetNumber() ); + sRet = rFootnoteEnd.GetSwNumType().GetNumStr( nNumber ); if( bInclStrings ) { sRet = rFootnoteEnd.GetPrefix() + sRet + rFootnoteEnd.GetSuffix(); @@ -238,7 +243,7 @@ OUString SwFormatFootnote::GetViewNumStr( const SwDoc& rDoc, bool bInclStrings ) pInfo = &rDoc.GetEndNoteInfo(); else pInfo = &rDoc.GetFootnoteInfo(); - sRet = pInfo->aFormat.GetNumStr( GetNumber() ); + sRet = pInfo->aFormat.GetNumStr( nNumber ); if( bInclStrings ) { sRet = pInfo->GetPrefix() + sRet + pInfo->GetSuffix(); |