summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-07-29 20:57:40 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-09-01 09:24:32 +0200
commita492113452c64194d93c0e12b6a02558fac860dd (patch)
tree01b8c6c6c3760910d3e86b45c913215dcb5da42d /include
parent2e601204c5d844ce5cd9d2e61fbbcff6ad59ee58 (diff)
vcl: save and load the page number when swapping the graphic
PDF vector graphic includes a page number, of the page that the graphic is rendering. This however isn't remembered when swapping out and back in the graphic, because the serialization format doesn't include it. This adds a version 2 of the serialization format, with an additional page number (page index) attribute. Also changes the GraphicTest to account for an additional 4 bytes written and the change of the checksum. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100836 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 28beaffba6a0ecaf351c84bed41443a6721d85b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100883 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit d6b4a0a9a3fed1ba07125d7e9517f0a663fc4018) Change-Id: Ic0fbfc4ad983f7880e06956da3b4664bd4b610d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101760 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/vectorgraphicdata.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx
index 75688d2b00a7..d37f313e941a 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -112,6 +112,11 @@ public:
sal_Int32 getPageIndex() const { return std::max(sal_Int32(0), mnPageIndex); }
+ void setPageIndex(sal_Int32 nPageIndex)
+ {
+ mnPageIndex = nPageIndex;
+ }
+
bool isPrimitiveSequenceCreated() const { return mbSequenceCreated; }
};