summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/impgraph.cxx7
-rw-r--r--vcl/source/graphic/Manager.cxx9
2 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index dc0122de050d..de3cbefc4d79 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1349,6 +1349,13 @@ bool ImpGraphic::ImplSwapOut()
{
bool bRet = false;
+ // Hack / Workaround - ignore swap out PDF files
+ if (maVectorGraphicData &&
+ maVectorGraphicData->getVectorGraphicDataType() == VectorGraphicDataType::Pdf)
+ {
+ return false;
+ }
+
if( !ImplIsSwapOut() )
{
::utl::TempFile aTempFile;
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 5942b5cb8784..1be52a7e987c 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -109,6 +109,15 @@ sal_Int64 Manager::getGraphicSizeBytes(const ImpGraphic* pImpGraphic)
{
if (!pImpGraphic->isAvailable())
return 0;
+
+ // Hack / Workaround - don't count PDF vector graphic to preven swapping
+ if (pImpGraphic->getVectorGraphicData()
+ && pImpGraphic->getVectorGraphicData()->getVectorGraphicDataType()
+ == VectorGraphicDataType::Pdf)
+ {
+ return 0;
+ }
+
return pImpGraphic->ImplGetSizeBytes();
}