diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-09 17:10:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-12 12:20:05 +0200 |
commit | b050b7eeff089ead4dd121967cf323d683f171bc (patch) | |
tree | 8cc83bf6e63957bc3d0f38a2531361e7bbce75ee /vcl/source/filter | |
parent | ec9b4bf1b671fa1b14ca51f0275480ab17da3d20 (diff) |
update pches
Change-Id: I75602277a5a26b012a12f2c4f4b7ff5bb663b0b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98474
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/filter')
-rw-r--r-- | vcl/source/filter/GraphicNativeTransform.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/Exif.cxx | 36 |
2 files changed, 19 insertions, 25 deletions
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx index 8083dd4c2e77..b2d90f43e8d7 100644 --- a/vcl/source/filter/GraphicNativeTransform.cxx +++ b/vcl/source/filter/GraphicNativeTransform.cxx @@ -28,8 +28,6 @@ #include "jpeg/Exif.hxx" #include "jpeg/JpegTransform.hxx" -using namespace ::exif; - GraphicNativeTransform::GraphicNativeTransform(Graphic& rGraphic) : mrGraphic(rGraphic) { @@ -135,7 +133,7 @@ void GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) aSourceStream.WriteBytes(aLink.GetData(), aLink.GetDataSize()); aSourceStream.Seek(STREAM_SEEK_TO_BEGIN); - Orientation aOrientation = TOP_LEFT; + exif::Orientation aOrientation = exif::TOP_LEFT; Exif exif; if (exif.read(aSourceStream)) @@ -151,9 +149,9 @@ void GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation) aTargetStream.Seek(STREAM_SEEK_TO_BEGIN); // Reset orientation in exif if needed - if (exif.hasExif() && aOrientation != TOP_LEFT) + if (exif.hasExif() && aOrientation != exif::TOP_LEFT) { - exif.setOrientation(TOP_LEFT); + exif.setOrientation(exif::TOP_LEFT); exif.write(aTargetStream); } diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx index 8f282583fe8e..4f773a48bc24 100644 --- a/vcl/source/filter/jpeg/Exif.cxx +++ b/vcl/source/filter/jpeg/Exif.cxx @@ -22,46 +22,43 @@ #include <osl/endian.h> #include <tools/stream.hxx> -using namespace ::exif; - Exif::Exif() : - maOrientation(TOP_LEFT), + maOrientation(exif::TOP_LEFT), mbExifPresent(false) {} Exif::~Exif() {} - -void Exif::setOrientation(Orientation aOrientation) { +void Exif::setOrientation(exif::Orientation aOrientation) { maOrientation = aOrientation; } -Orientation Exif::convertToOrientation(sal_Int32 value) +exif::Orientation Exif::convertToOrientation(sal_Int32 value) { switch(value) { - case 1: return TOP_LEFT; - case 2: return TOP_RIGHT; - case 3: return BOTTOM_RIGHT; - case 4: return BOTTOM_LEFT; - case 5: return LEFT_TOP; - case 6: return RIGHT_TOP; - case 7: return RIGHT_BOTTOM; - case 8: return LEFT_BOTTOM; + case 1: return exif::TOP_LEFT; + case 2: return exif::TOP_RIGHT; + case 3: return exif::BOTTOM_RIGHT; + case 4: return exif::BOTTOM_LEFT; + case 5: return exif::LEFT_TOP; + case 6: return exif::RIGHT_TOP; + case 7: return exif::RIGHT_BOTTOM; + case 8: return exif::LEFT_BOTTOM; } - return TOP_LEFT; + return exif::TOP_LEFT; } sal_Int32 Exif::getRotation() const { switch(maOrientation) { - case TOP_LEFT: + case exif::TOP_LEFT: return 0; - case BOTTOM_RIGHT: + case exif::BOTTOM_RIGHT: return 1800; - case RIGHT_TOP: + case exif::RIGHT_TOP: return 2700; - case LEFT_BOTTOM: + case exif::LEFT_BOTTOM: return 900; default: break; @@ -69,7 +66,6 @@ sal_Int32 Exif::getRotation() const return 0; } - bool Exif::read(SvStream& rStream) { sal_Int32 nStreamPosition = rStream.Tell(); |