diff options
author | László Németh <nemeth@numbertext.org> | 2013-11-20 07:55:57 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2013-11-20 07:57:57 +0100 |
commit | d665e058246631c8a838c3a731bdd0c56be27903 (patch) | |
tree | 978f7d063b501978064e94b4c676fd286158c3b2 | |
parent | ada73e588fe0f948bf49591974f466602452fd10 (diff) |
fdo#71645 remove footnote numbers in cross-references
Change-Id: Ic3780e4389e450d8c7a69d2f0f2a6a7f81b8906e
-rw-r--r-- | sw/inc/IDocumentOutlineNodes.hxx | 3 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 3 | ||||
-rw-r--r-- | sw/inc/ndtxt.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/fields/chpfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/reffld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 2 |
9 files changed, 19 insertions, 13 deletions
diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx index a522cea02839..f5ec75fca5e6 100644 --- a/sw/inc/IDocumentOutlineNodes.hxx +++ b/sw/inc/IDocumentOutlineNodes.hxx @@ -37,7 +37,8 @@ public: virtual int getOutlineLevel( const sal_Int32 nIdx ) const = 0; virtual OUString getOutlineText( const sal_Int32 nIdx, const bool bWithNumber = true, - const bool bWithSpacesForLevel = false ) const = 0; + const bool bWithSpacesForLevel = false, + const bool bWithFtn = true ) const = 0; virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const = 0; virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const = 0; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 378c6b5ac7ef..58980778849d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -993,7 +993,8 @@ public: virtual int getOutlineLevel( const sal_Int32 nIdx ) const; virtual OUString getOutlineText( const sal_Int32 nIdx, const bool bWithNumber, - const bool bWithSpacesForLevel ) const; + const bool bWithSpacesForLevel, + const bool bWithFtn ) const; virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const; virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const; diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index d8b23ff60ecb..d8e1fbb2ad6c 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -682,7 +682,8 @@ public: const sal_Int32 nLen = -1, const bool bWithNum = false, const bool bAddSpaceAfterListLabelStr = false, - const bool bWithSpacesForLevel = false ) const; + const bool bWithSpacesForLevel = false, + const bool bWithFtn = true ) const; bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0, sal_Int32 nIdx = 0, sal_Int32 nLen = -1, bool bWithNum = false, bool bWithFtn = true, diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 256e30882703..8e54aa95bd6f 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -2422,11 +2422,12 @@ int SwDoc::getOutlineLevel( const sal_Int32 nIdx ) const OUString SwDoc::getOutlineText( const sal_Int32 nIdx, const bool bWithNumber, - const bool bWithSpacesForLevel ) const + const bool bWithSpacesForLevel, + const bool bWithFtn ) const { return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]-> GetTxtNode()->GetExpandTxt( 0, -1, bWithNumber, - bWithNumber, bWithSpacesForLevel ); + bWithNumber, bWithSpacesForLevel, bWithFtn ); } SwTxtNode* SwDoc::getOutlineNode( const sal_Int32 nIdx ) const diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx index 139b3213da54..b878ccd38dd4 100644 --- a/sw/source/core/fields/chpfld.cxx +++ b/sw/source/core/fields/chpfld.cxx @@ -213,7 +213,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum) sNumber = "??"; } - sTitle = removeControlChars(pTxtNd->GetExpandTxt()); + sTitle = removeControlChars(pTxtNd->GetExpandTxt(0, -1, false, false, false, false)); } } diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index d9c03a365175..96de7834e448 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -248,7 +248,7 @@ OUString SwGetRefField::GetExpandedTxtOfReferencedTxtNode() const { const SwTxtNode* pReferencedTxtNode( GetReferencedTxtNode() ); return pReferencedTxtNode - ? OUString(pReferencedTxtNode->GetExpandTxt( 0, -1, true, true )) + ? OUString(pReferencedTxtNode->GetExpandTxt( 0, -1, true, true, false, false )) : OUString(); } diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index d7f961106f67..fe8b0bd7c9a2 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -2024,7 +2024,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() pPDFExtOutDevData->CreateDest( rDestRect.SVRect(), nDestPageNum ); // Outline entry text - const OUString& rEntry = mrSh.getIDocumentOutlineNodesAccess()->getOutlineText( i ); + const OUString& rEntry = mrSh.getIDocumentOutlineNodesAccess()->getOutlineText( i, true, false, false ); // Create a new outline item: const sal_Int32 nOutlineId = diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 6ccd35fb323a..619e2031f2a4 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3022,7 +3022,7 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const static void Replace0xFF(SwTxtNode const& rNode, OUStringBuffer & rTxt, sal_Int32 & rTxtStt, - sal_Int32 nEndPos, sal_Bool const bExpandFlds) + sal_Int32 nEndPos, sal_Bool const bExpandFlds, sal_Bool const bExpandFtn = sal_True ) { if (rNode.GetpSwpHints()) { @@ -3054,7 +3054,7 @@ Replace0xFF(SwTxtNode const& rNode, OUStringBuffer & rTxt, sal_Int32 & rTxtStt, break; case RES_TXTATR_FTN: rTxt.remove(nPos, 1); - if( bExpandFlds ) + if( bExpandFlds && bExpandFtn ) { const SwFmtFtn& rFtn = pAttr->GetFtn(); OUString sExpand; @@ -3095,12 +3095,14 @@ OUString SwTxtNode::GetExpandTxt( const sal_Int32 nIdx, const sal_Int32 nLen, const bool bWithNum, const bool bAddSpaceAfterListLabelStr, - const bool bWithSpacesForLevel ) const + const bool bWithSpacesForLevel, + const bool bWithFtn ) const + { OUStringBuffer aTxt( (nLen == -1) ? GetTxt().copy(nIdx) : GetTxt().copy(nIdx, nLen)); sal_Int32 nTxtStt = nIdx; - Replace0xFF(*this, aTxt, nTxtStt, aTxt.getLength(), true); + Replace0xFF(*this, aTxt, nTxtStt, aTxt.getLength(), true, bWithFtn ); // remove dummy characters of Input Fields comphelper::string::remove(aTxt, CH_TXT_ATR_INPUTFIELDSTART); diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 7777b975606f..7798e2eadea4 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -541,7 +541,7 @@ void SwFldRefPage::UpdateSubType() for ( nOutlIdx = 0; nOutlIdx < maOutlineNodes.size(); ++nOutlIdx ) { pEntry = m_pSelectionToolTipLB->InsertEntry( - pIDoc->getOutlineText( nOutlIdx, true, true ) ); + pIDoc->getOutlineText( nOutlIdx, true, true, false ) ); pEntry->SetUserData( reinterpret_cast<void*>(nOutlIdx) ); if ( ( IsFldEdit() && pRefFld->GetReferencedTxtNode() == maOutlineNodes[nOutlIdx] ) || |