summaryrefslogtreecommitdiffstats
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdpdf.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx8
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx4
3 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index b47a6aadc16c..020141784d13 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -971,7 +971,7 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const OUS
Size aSize(FRound(rSize.Width() * mfScaleX), FRound(rSize.Height() * mfScaleY));
if (eAlg == ALIGN_BASELINE)
- aPos.AdjustY(-(FRound(aFontMetric.GetAscent() * mfScaleY)));
+ aPos.AdjustY(-FRound(aFontMetric.GetAscent() * mfScaleY));
else if (eAlg == ALIGN_BOTTOM)
aPos.AdjustY(-nTextHeight);
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 238b8dda3c91..988341d528e1 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -764,10 +764,11 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(aStream.xStream));
if (bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData())
{
- if (aGraphic.hasPdfData())
+ const std::shared_ptr<uno::Sequence<sal_Int8>>& rPdfData = aGraphic.getPdfData();
+ if (rPdfData && rPdfData->hasElements())
{
// See if we have this PDF already, and avoid duplicate storage.
- auto aIt = maExportPdf.find(aGraphic.getPdfData().get());
+ auto aIt = maExportPdf.find(rPdfData.get());
if (aIt != maExportPdf.end())
{
auto const& aURLAndMimePair = aIt->second;
@@ -779,8 +780,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
// vcl::ImportPDF() possibly downgraded the PDF data from a
// higher PDF version, while aGfxLink still contains the
// original data provided by the user.
- std::shared_ptr<uno::Sequence<sal_Int8>> pPdfData = aGraphic.getPdfData();
- pStream->WriteBytes(pPdfData->getConstArray(), pPdfData->getLength());
+ pStream->WriteBytes(rPdfData->getConstArray(), rPdfData->getLength());
}
else
{
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index a37508c2fcd1..05998009e14a 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -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())
{
- std::shared_ptr<uno::Sequence<sal_Int8>> pPdfData = rGraphic.getPdfData();
- pOutStream->WriteBytes(pPdfData->getConstArray(), pPdfData->getLength());
+ const std::shared_ptr<uno::Sequence<sal_Int8>>& rPdfData = rGraphic.getPdfData();
+ pOutStream->WriteBytes(rPdfData->getConstArray(), rPdfData->getLength());
aMedium.Commit();
if (!aMedium.GetError())
nErr = ERRCODE_NONE;