summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unosett.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unosett.cxx')
-rw-r--r--sw/source/core/unocore/unosett.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 3a72361cdc49..02ae09e07886 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -60,6 +60,7 @@
#include <vcl/metric.hxx>
#include <vcl/graph.hxx>
#include <vcl/GraphicLoader.hxx>
+#include <sfx2/docfile.hxx>
#include <svtools/ctrltool.hxx>
#include <vcl/svapp.hxx>
#include <editeng/unofdesc.hxx>
@@ -1301,13 +1302,21 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
SwStyleNameMapper::FillProgName(sValue, aUString, SwGetPoolIdFromName::TxtColl);
}
- return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr);
+ OUString referer;
+ if (pDoc != nullptr) {
+ auto const sh = pDoc->GetPersist();
+ if (sh != nullptr && sh->HasName()) {
+ referer = sh->GetMedium()->GetName();
+ }
+ }
+ return GetPropertiesForNumFormat(
+ rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr, referer);
}
uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat(
const SwNumFormat& rFormat, OUString const& rCharFormatName,
- OUString const*const pHeadingStyleName)
+ OUString const*const pHeadingStyleName, OUString const & referer)
{
bool bChapterNum = pHeadingStyleName != nullptr;
@@ -1429,7 +1438,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
if (SVX_NUM_BITMAP == rFormat.GetNumberingType())
{
const SvxBrushItem* pBrush = rFormat.GetBrush();
- const Graphic* pGraphic = pBrush ? pBrush->GetGraphic() : nullptr;
+ const Graphic* pGraphic = pBrush ? pBrush->GetGraphic(referer) : nullptr;
if (pGraphic)
{
//GraphicBitmap