[Libreoffice-commits] core.git: vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 3 18:34:15 UTC 2020


 vcl/source/filter/GraphicNativeTransform.cxx |    2 ++
 vcl/source/filter/jpeg/Exif.cxx              |    2 ++
 vcl/source/filter/jpeg/Exif.hxx              |   10 ++++++----
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit a4438e09b4e04a1b1e9e5ecd27b1a22531b0bfbe
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Mar 3 16:10:46 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 3 19:33:36 2020 +0100

    fix ODR
    
    Orientation here clashes with Orientation in include/vcl/prntypes.hxx
    
    Change-Id: Ib68dec61990aebad6154eb2f5e00eb8680ebe196
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89888
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index 909795f45a90..ba6e6a194f63 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -28,6 +28,8 @@
 #include "jpeg/Exif.hxx"
 #include "jpeg/JpegTransform.hxx"
 
+using namespace ::exif;
+
 GraphicNativeTransform::GraphicNativeTransform(Graphic& rGraphic) :
     mrGraphic(rGraphic)
 {}
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 6dd3bd1b2baa..62e51e807063 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -22,6 +22,8 @@
 #include <osl/endian.h>
 #include <tools/stream.hxx>
 
+using namespace ::exif;
+
 Exif::Exif() :
     maOrientation(TOP_LEFT),
     mbExifPresent(false)
diff --git a/vcl/source/filter/jpeg/Exif.hxx b/vcl/source/filter/jpeg/Exif.hxx
index 7eb5a7da0009..07fdd9ab95e3 100644
--- a/vcl/source/filter/jpeg/Exif.hxx
+++ b/vcl/source/filter/jpeg/Exif.hxx
@@ -22,6 +22,7 @@
 
 #include <tools/stream.hxx>
 
+namespace exif {
 enum Orientation {
     TOP_LEFT        = 1,
     TOP_RIGHT       = 2,
@@ -32,6 +33,7 @@ enum Orientation {
     RIGHT_BOTTOM    = 7,
     LEFT_BOTTOM     = 8
 };
+};
 
 enum Tag {
     ORIENTATION         = 0x0112
@@ -40,7 +42,7 @@ enum Tag {
 class Exif final
 {
 private:
-    Orientation maOrientation;
+    exif::Orientation maOrientation;
     bool mbExifPresent;
 
     bool processJpeg(SvStream& rStream, bool bSetValue);
@@ -60,7 +62,7 @@ private:
         sal_uInt32 offset;
     };
 
-    static Orientation convertToOrientation(sal_Int32 value);
+    static exif::Orientation convertToOrientation(sal_Int32 value);
 
 public:
     Exif();
@@ -68,10 +70,10 @@ public:
 
     bool hasExif() const { return mbExifPresent;}
 
-    Orientation getOrientation() const { return maOrientation;}
+    exif::Orientation getOrientation() const { return maOrientation;}
     sal_Int32 getRotation() const;
 
-    void setOrientation(Orientation orientation);
+    void setOrientation(exif::Orientation orientation);
 
     bool read(SvStream& rStream);
     void write(SvStream& rStream);


More information about the Libreoffice-commits mailing list