summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-15 11:26:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-15 11:26:57 +0100
commit2e63bf23c29abd7a3b32902ee3acb889d8c04f35 (patch)
treeeaa828553eae75e79560e8f701bf4a89150e0664 /sc/source/ui
parent986644335c3f9e99ec3c6bebc0b75cca0acdf79b (diff)
Referer check for Calc background image
Change-Id: I69f69e4fa790969ac4e338dd6294ff9ef951d5b6
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/view/printfun.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 6ab7d1e5a933..87c508bf8e26 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1085,10 +1085,11 @@ static void lcl_DrawGraphic( const Graphic &rGraphic, OutputDevice *pOut,
}
static void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevice* pRefDev,
- const Rectangle &rOrg, const Rectangle &rOut )
+ const Rectangle &rOrg, const Rectangle &rOut,
+ OUString const & referer )
{
Size aGrfSize(0,0);
- const Graphic *pGraphic = rBrush.GetGraphic();
+ const Graphic *pGraphic = rBrush.GetGraphic(referer);
SvxGraphicPosition ePos;
if ( pGraphic && pGraphic->IsSupportedGraphic() )
{
@@ -1260,8 +1261,11 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
pRefDev = pDev; // don't use printer for PDF
else
pRefDev = pDoc->GetPrinter(); // use printer also for preview
-
- lcl_DrawGraphic( *pBackground, pDev, pRefDev, aFrameRect, aFrameRect );
+ OUString referer;
+ if (pDocShell->HasName()) {
+ referer = pDocShell->GetMedium()->GetName();
+ }
+ lcl_DrawGraphic( *pBackground, pDev, pRefDev, aFrameRect, aFrameRect, referer );
}
else
{