sw/inc/IDocumentOutlineNodes.hxx | 3 ++- sw/inc/doc.hxx | 3 ++- sw/inc/ndtxt.hxx | 3 ++- sw/source/core/doc/docnum.cxx | 5 +++-- sw/source/core/fields/chpfld.cxx | 2 +- sw/source/core/fields/reffld.cxx | 2 +- sw/source/core/text/EnhancedPDFExportHelper.cxx | 2 +- sw/source/core/txtnode/ndtxt.cxx | 10 ++++++---- sw/source/ui/fldui/fldref.cxx | 2 +- 9 files changed, 19 insertions(+), 13 deletions(-)
New commits: commit d665e058246631c8a838c3a731bdd0c56be27903 Author: László Németh <nem...@numbertext.org> Date: Wed Nov 20 07:55:57 2013 +0100 fdo#71645 remove footnote numbers in cross-references Change-Id: Ic3780e4389e450d8c7a69d2f0f2a6a7f81b8906e diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx index a522cea..f5ec75f 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 378c6b5..5898077 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 d8b23ff..d8e1fbb 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 256e308..8e54aa9 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 139b321..b878ccd 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 d9c03a3..96de783 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 d7f9611..fe8b0bd 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 6ccd35f..619e203 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 7777b97..7798e2e 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] ) ||
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits