summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-04-23 16:22:26 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-04-27 06:57:28 +0200
commit83cf08b1cb2d493a4c12f88eb6bf0daf25fe5beb (patch)
treec82da8df4c941e90ccd650d0b5c17c598895a2ee /vcl/source/filter
parente294e29ab3bcd57c1d5d4f3fe372e26d5677a7ab (diff)
vcl: add tests for GraphicNativeMetadata
Test the rotation in JPEG metadata is what we expect. Change-Id: I5ee2d646a5257d5695c51f37fb6fe795dcb9af50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92948 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/GraphicNativeMetadata.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/vcl/source/filter/GraphicNativeMetadata.cxx b/vcl/source/filter/GraphicNativeMetadata.cxx
index 132a51a52391..6eb60cd67374 100644
--- a/vcl/source/filter/GraphicNativeMetadata.cxx
+++ b/vcl/source/filter/GraphicNativeMetadata.cxx
@@ -18,10 +18,7 @@
*/
#include <vcl/GraphicNativeMetadata.hxx>
-
#include <vcl/gfxlink.hxx>
-#include <tools/stream.hxx>
-
#include "jpeg/Exif.hxx"
#include <memory>
@@ -47,8 +44,15 @@ bool GraphicNativeMetadata::read(Graphic const& rGraphic)
memcpy(aBuffer.get(), aLink.GetData(), aDataSize);
SvMemoryStream aMemoryStream(aBuffer.get(), aDataSize, StreamMode::READ);
+ read(aMemoryStream);
+
+ return true;
+}
+
+bool GraphicNativeMetadata::read(SvStream& rStream)
+{
Exif aExif;
- aExif.read(aMemoryStream);
+ aExif.read(rStream);
mRotation = aExif.getRotation();
return true;