diff options
-rw-r--r-- | include/vcl/graph.hxx | 1 | ||||
-rw-r--r-- | sd/qa/unit/data/pdf/multipage.pdf | bin | 0 -> 9121 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 11 | ||||
-rw-r--r-- | vcl/inc/impgraph.hxx | 1 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 5 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 5 |
6 files changed, 21 insertions, 2 deletions
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index af77fc9cad1f..5f80a8c4ccd3 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -215,6 +215,7 @@ private: public: void SetGfxLink(const std::shared_ptr<GfxLink>& rGfxLink); + std::shared_ptr<GfxLink> GetSharedGfxLink() const; GfxLink GetGfxLink() const; bool IsGfxLink() const; diff --git a/sd/qa/unit/data/pdf/multipage.pdf b/sd/qa/unit/data/pdf/multipage.pdf Binary files differnew file mode 100644 index 000000000000..5cd8b4e4e569 --- /dev/null +++ b/sd/qa/unit/data/pdf/multipage.pdf diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 69a945281e95..615ee2736d4e 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -82,6 +82,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/graphicmimetype.hxx> +#include <comphelper/lok.hxx> #include <vcl/pngread.hxx> #include <vcl/bitmapaccess.hxx> #include <vcl/dibtools.hxx> @@ -140,10 +141,13 @@ public: void testTableBorderLineStyle(); void testBnc862510_6(); void testBnc862510_7(); -#if ENABLE_PDFIMPORT && defined(IMPORT_PDF_ELEMENTS) +#if ENABLE_PDFIMPORT + void testPDFImportShared(); +#if defined(IMPORT_PDF_ELEMENTS) void testPDFImport(); void testPDFImportSkipImages(); #endif +#endif void testBulletSuffix(); void testBnc910045(); void testRowHeight(); @@ -232,10 +236,13 @@ public: CPPUNIT_TEST(testTableBorderLineStyle); CPPUNIT_TEST(testBnc862510_6); CPPUNIT_TEST(testBnc862510_7); -#if ENABLE_PDFIMPORT && defined(IMPORT_PDF_ELEMENTS) +#if ENABLE_PDFIMPORT + CPPUNIT_TEST(testPDFImportShared); +#if defined(IMPORT_PDF_ELEMENTS) CPPUNIT_TEST(testPDFImport); CPPUNIT_TEST(testPDFImportSkipImages); #endif +#endif CPPUNIT_TEST(testBulletSuffix); CPPUNIT_TEST(testBnc910045); CPPUNIT_TEST(testRowHeight); diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index c01b28334ce5..4b13463c949f 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -199,6 +199,7 @@ private: bool ImplIsSwapOut() const { return mbSwapOut;} bool ImplIsDummyContext() const { return mbDummyContext; } void ImplSetLink( const std::shared_ptr<GfxLink>& ); + std::shared_ptr<GfxLink> ImplGetSharedGfxLink() const; GfxLink ImplGetLink(); bool ImplIsLink() const; diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 0599091f8996..421ef1a0b09e 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -534,6 +534,11 @@ void Graphic::SetGfxLink( const std::shared_ptr<GfxLink>& rGfxLink ) mxImpGraphic->ImplSetLink( rGfxLink ); } +std::shared_ptr<GfxLink> Graphic::GetSharedGfxLink() const +{ + return mxImpGraphic->ImplGetSharedGfxLink(); +} + GfxLink Graphic::GetGfxLink() const { return mxImpGraphic->ImplGetLink(); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index c700358312c5..e885e2a103e5 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1620,6 +1620,11 @@ void ImpGraphic::ImplSetLink(const std::shared_ptr<GfxLink>& rGfxLink) mpGfxLink->SwapOut(); } +std::shared_ptr<GfxLink> ImpGraphic::ImplGetSharedGfxLink() const +{ + return mpGfxLink; +} + GfxLink ImpGraphic::ImplGetLink() { ensureAvailable(); |