diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-12-28 10:03:18 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-01-13 07:22:31 +0100 |
commit | dcfac443c608aec2ce4e5fa30a3dd021b5a8bfd3 (patch) | |
tree | f1bd5d83427625eadb91d9e3685616efe43e7ada /include | |
parent | 68b1ae7b493eea4d77f36a0c8566ca0224f04798 (diff) |
vcl: use BinaryDataContianer in VectorGraphicData
This change is needed so we can use the same data in GfxLink and
in VectorGraphicData. Currently the data needed to be duplicated,
which is less than ideal.
Change-Id: I79419921d09681fa8f0b1ac4bf8ea84199d4aae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108440
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/vectorgraphicdata.hxx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx index f18def5b7316..21d86fa12b3d 100644 --- a/include/vcl/vectorgraphicdata.hxx +++ b/include/vcl/vectorgraphicdata.hxx @@ -23,6 +23,7 @@ #include <basegfx/range/b2drange.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <vcl/bitmapex.hxx> +#include <vcl/BinaryDataContainer.hxx> #include <rtl/ustring.hxx> #include <deque> #include <memory> @@ -55,7 +56,7 @@ class VCL_DLLPUBLIC VectorGraphicData { private: // the file and length - VectorGraphicDataArray maVectorGraphicDataArray; + BinaryDataContainer maDataContainer; // on demand created content bool mbSequenceCreated; @@ -90,6 +91,10 @@ public: VectorGraphicDataType eVectorDataType, sal_Int32 nPageIndex = -1); VectorGraphicData(const OUString& rPath, VectorGraphicDataType eVectorDataType); + VectorGraphicData( + const BinaryDataContainer& rDataContainer, + VectorGraphicDataType eVectorDataType, + sal_Int32 nPageIndex = -1); ~VectorGraphicData(); /// compare op @@ -99,8 +104,16 @@ public: void setWmfExternalHeader(const WmfExternal& aExtHeader); /// data read - const VectorGraphicDataArray& getVectorGraphicDataArray() const { return maVectorGraphicDataArray; } - sal_uInt32 getVectorGraphicDataArrayLength() const { return maVectorGraphicDataArray.getLength(); } + const BinaryDataContainer& getBinaryDataContainer() const + { + return maDataContainer; + } + + sal_uInt32 getVectorGraphicDataArrayLength() const + { + return maDataContainer.getSize(); + } + enum class State { UNPARSED, PARSED }; std::pair<State, size_t> getSizeBytes() const; |