summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-03-17 15:33:54 -0400
committerJan Holesovsky <kendy@collabora.com>2018-06-07 10:45:17 +0200
commit9b11fdd36ec80f9d1ae0a05455745361e0ce9ced (patch)
tree857ad890a0ff1c96d707cb145fafd74b79d53603 /svx/source/xoutdev
parent99bbed5cd87af8ff1b7e3d197d937fb17af021e6 (diff)
pdf: share pdf data in Graphic
Change-Id: I8146aa4e206788afff71142e1877fd7a885f4652
Diffstat (limited to 'svx/source/xoutdev')
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 55128d08f7d8..a37508c2fcd1 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -173,7 +173,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
}
// Write PDF data in original form if possible.
- if (rGraphic.getPdfData().hasElements() && rFilterName.equalsIgnoreAsciiCase("pdf"))
+ if (rGraphic.hasPdfData() && rFilterName.equalsIgnoreAsciiCase("pdf"))
{
if (!(nFlags & XOutFlags::DontAddExtension))
aURL.setExtension(rFilterName);
@@ -182,8 +182,8 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE|StreamMode::SHARE_DENYNONE|StreamMode::TRUNC);
if (SvStream* pOutStream = aMedium.GetOutStream())
{
- uno::Sequence<sal_Int8> aPdfData = rGraphic.getPdfData();
- pOutStream->WriteBytes(aPdfData.getConstArray(), aPdfData.getLength());
+ std::shared_ptr<uno::Sequence<sal_Int8>> pPdfData = rGraphic.getPdfData();
+ pOutStream->WriteBytes(pPdfData->getConstArray(), pPdfData->getLength());
aMedium.Commit();
if (!aMedium.GetError())
nErr = ERRCODE_NONE;