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

Chris Sherlock chris.sherlock79 at gmail.com
Thu Dec 31 03:13:05 PST 2015


 vcl/inc/outfont.hxx        |    7 ++-----
 vcl/source/outdev/font.cxx |    4 ++--
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit ecd5252f43fa6e244253eee365a70133de183101
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu Dec 31 14:48:32 2015 +1100

    vcl: remove ImplFontAttributes equality operators
    
    I am removing the equality operators for ImplFontAttributes and replacing
    with a function you must call explicitly. This is in preparation for
    merging ImplFontAttributes with ImplDevFontAttributes.
    
    Change-Id: I2231ab242bfe080a0c4b8d72ae1903408c62376c
    Reviewed-on: https://gerrit.libreoffice.org/21017
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>

diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index 88d5d94..7c43986 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -60,11 +60,8 @@ public:
     void            SetWeight(const FontWeight eWeight )       { meWeight = eWeight; }
     void            SetWidthType(const FontWidth eWidthType)   { meWidthType = eWidthType; }
     void            SetSymbolFlag(const bool bSymbolFlag )     { mbSymbolFlag = bSymbolFlag; }
-    bool operator==(const ImplFontAttributes& rOther) const;
-    bool operator!=(const ImplFontAttributes& rOther) const
-    {
-        return !(*this == rOther);
-    }
+
+    bool            CompareDeviceIndependentFontAttributes(const ImplFontAttributes& rOther) const;
 
 private:
     OUString        maName;         // Font Family Name
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 4a3bffe..13cee10 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1142,7 +1142,7 @@ size_t FontSelectPatternAttributes::hashCode() const
 
 bool FontSelectPatternAttributes::operator==(const FontSelectPatternAttributes& rOther) const
 {
-    if (static_cast<const ImplFontAttributes&>(*this) != static_cast<const ImplFontAttributes&>(rOther))
+    if (!CompareDeviceIndependentFontAttributes(rOther))
         return false;
 
     if (maTargetName != rOther.maTargetName)
@@ -1707,7 +1707,7 @@ void OutputDevice::SetFontOrientation( ImplFontEntry* const pFontEntry ) const
     }
 }
 
-bool ImplFontAttributes::operator==(const ImplFontAttributes& rOther) const
+bool ImplFontAttributes::CompareDeviceIndependentFontAttributes(const ImplFontAttributes& rOther) const
 {
     if (maName != rOther.maName)
         return false;


More information about the Libreoffice-commits mailing list