diff options
Diffstat (limited to 'sw/source/core/text/txtfld.cxx')
-rw-r--r-- | sw/source/core/text/txtfld.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index da9aadf13d03..fd001b01e103 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -52,6 +52,7 @@ #include <flddat.hxx> #include <fmtautofmt.hxx> #include <IDocumentSettingAccess.hxx> +#include <sfx2/docfile.hxx> #include <svl/itemiter.hxx> static bool lcl_IsInBody( SwFrame const *pFrame ) @@ -483,8 +484,17 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() ) { + OUString referer; + if (auto const sh1 = rInf.GetVsh()) { + if (auto const doc = sh1->GetDoc()) { + auto const sh2 = doc->GetPersist(); + if (sh2 != nullptr && sh2->HasName()) { + referer = sh2->GetMedium()->GetName(); + } + } + } pRet = new SwGrfNumPortion( pTextNd->GetLabelFollowedBy(), - rNumFormat.GetBrush(), + rNumFormat.GetBrush(), referer, rNumFormat.GetGraphicOrientation(), rNumFormat.GetGraphicSize(), bLeft, bCenter, nMinDist, |