summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-08 15:15:43 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-14 18:42:15 +0100
commit71aec8511c8f934619c52d151346badf00c2d169 (patch)
tree5f1280d5c765287dbf9d1ed9e6641cfefb01f14f
parent2a8fe7ad8f53abe40f190c735f88887dd192f453 (diff)
sw_redlinehide_3: SwGetRefField::GetExpandedTextOfReferencedTextNode
Change-Id: I98530004f2d75b10fc4cd3241b06d513ed57675b
-rw-r--r--sw/inc/reffld.hxx3
-rw-r--r--sw/source/core/fields/reffld.cxx5
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
3 files changed, 6 insertions, 4 deletions
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 7e02260d5ba6..bd08703640ce 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -25,6 +25,7 @@ class SfxPoolItem;
class SwDoc;
class SwTextNode;
class SwTextField;
+class SwRootFrame;
bool IsFrameBehind( const SwTextNode& rMyNd, sal_Int32 nMySttPos,
const SwTextNode& rBehindNd, sal_Int32 nSttPos );
@@ -122,7 +123,7 @@ public:
bool IsRefToNumItemCrossRefBookmark() const;
const SwTextNode* GetReferencedTextNode() const;
// #i85090#
- OUString GetExpandedTextOfReferencedTextNode() const;
+ OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const& rLayout) const;
/// Get/set SequenceNo (of interest only for REF_SEQUENCEFLD).
sal_uInt16 GetSeqNo() const { return m_nSeqNo; }
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 171434590ad3..b117e21730a0 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -401,11 +401,12 @@ const SwTextNode* SwGetRefField::GetReferencedTextNode() const
}
// #i85090#
-OUString SwGetRefField::GetExpandedTextOfReferencedTextNode() const
+OUString SwGetRefField::GetExpandedTextOfReferencedTextNode(
+ SwRootFrame const& rLayout) const
{
const SwTextNode* pReferencedTextNode( GetReferencedTextNode() );
return pReferencedTextNode
- ? pReferencedTextNode->GetExpandText(nullptr/*TODO*/, 0, -1, true, true, false)
+ ? sw::GetExpandTextMerged(&rLayout, *pReferencedTextNode, true, false, ExpandMode(0))
: OUString();
}
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index e1b8afaef0df..cb6e4d07181f 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -346,7 +346,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if ( pRefField->IsRefToHeadingCrossRefBookmark() ||
pRefField->IsRefToNumItemCrossRefBookmark() )
{
- sText = pRefField->GetExpandedTextOfReferencedTextNode();
+ sText = pRefField->GetExpandedTextOfReferencedTextNode(*rSh.GetLayout());
if ( sText.getLength() > 80 )
{
sText = sText.copy(0, 80) + "...";