[Libreoffice-commits] core.git: drawinglayer/source solenv/clang-format

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Nov 23 09:36:50 UTC 2020


 drawinglayer/source/attribute/fontattribute.cxx |  295 +++++++++---------------
 solenv/clang-format/excludelist                 |    1 
 2 files changed, 122 insertions(+), 174 deletions(-)

New commits:
commit b576ca8d23abd42ac4bd6033598f2846ff52c175
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Oct 21 20:51:51 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Nov 23 10:35:51 2020 +0100

    remove fontattribute.cxx from clang-format excludelist
    
    Change-Id: I3720692af45920a4d084fe6ca4dd08bc0598ac13
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106385
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx
index 33903003f8c7..e423b8367f1c 100644
--- a/drawinglayer/source/attribute/fontattribute.cxx
+++ b/drawinglayer/source/attribute/fontattribute.cxx
@@ -21,182 +21,131 @@
 #include <rtl/instance.hxx>
 #include <rtl/ustring.hxx>
 
-
 namespace drawinglayer::attribute
 {
-        class ImpFontAttribute
-        {
-        public:
-            /// core data
-            OUString                                    maFamilyName;       // Font Family Name
-            OUString                                    maStyleName;        // Font Style Name
-            sal_uInt16                                  mnWeight;           // Font weight
-
-            bool                                        mbSymbol : 1;       // Symbol Font Flag
-            bool                                        mbVertical : 1;     // Vertical Text Flag
-            bool                                        mbItalic : 1;       // Italic Flag
-            bool                                        mbOutline : 1;      // Outline Flag
-            bool                                        mbRTL : 1;          // RTL Flag
-            bool                                        mbBiDiStrong : 1;   // BiDi Flag
-            bool                                        mbMonospaced : 1;
-
-            ImpFontAttribute(
-                const OUString& rFamilyName,
-                const OUString& rStyleName,
-                sal_uInt16 nWeight,
-                bool bSymbol,
-                bool bVertical,
-                bool bItalic,
-                bool bMonospaced,
-                bool bOutline,
-                bool bRTL,
-                bool bBiDiStrong)
-            :   maFamilyName(rFamilyName),
-                maStyleName(rStyleName),
-                mnWeight(nWeight),
-                mbSymbol(bSymbol),
-                mbVertical(bVertical),
-                mbItalic(bItalic),
-                mbOutline(bOutline),
-                mbRTL(bRTL),
-                mbBiDiStrong(bBiDiStrong),
-                mbMonospaced(bMonospaced)
-            {
-            }
-
-            ImpFontAttribute()
-            :   maFamilyName(),
-                maStyleName(),
-                mnWeight(0),
-                mbSymbol(false),
-                mbVertical(false),
-                mbItalic(false),
-                mbOutline(false),
-                mbRTL(false),
-                mbBiDiStrong(false),
-                mbMonospaced(false)
-            {
-            }
-
-            // data read access
-            const OUString& getFamilyName() const { return maFamilyName; }
-            const OUString& getStyleName() const { return maStyleName; }
-            sal_uInt16 getWeight() const { return mnWeight; }
-            bool getSymbol() const { return mbSymbol; }
-            bool getVertical() const { return mbVertical; }
-            bool getItalic() const { return mbItalic; }
-            bool getOutline() const { return mbOutline; }
-            bool getRTL() const { return mbRTL; }
-            bool getBiDiStrong() const { return mbBiDiStrong; }
-            bool getMonospaced() const { return mbMonospaced; }
-
-            bool operator==(const ImpFontAttribute& rCompare) const
-            {
-                return (getFamilyName() == rCompare.getFamilyName()
-                    && getStyleName() == rCompare.getStyleName()
-                    && getWeight() == rCompare.getWeight()
-                    && getSymbol() == rCompare.getSymbol()
-                    && getVertical() == rCompare.getVertical()
-                    && getItalic() == rCompare.getItalic()
-                    && getOutline() == rCompare.getOutline()
-                    && getRTL() == rCompare.getRTL()
-                    && getBiDiStrong() == rCompare.getBiDiStrong()
-                    && getMonospaced() == rCompare.getMonospaced());
-            }
-        };
-
-        namespace
-        {
-            struct theGlobalDefault :
-                public rtl::Static< FontAttribute::ImplType, theGlobalDefault > {};
-        }
-
-        FontAttribute::FontAttribute(
-            const OUString& rFamilyName,
-            const OUString& rStyleName,
-            sal_uInt16 nWeight,
-            bool bSymbol,
-            bool bVertical,
-            bool bItalic,
-            bool bMonospaced,
-            bool bOutline,
-            bool bRTL,
-            bool bBiDiStrong)
-        :   mpFontAttribute(ImpFontAttribute(
-                rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong))
-        {
-        }
-
-        FontAttribute::FontAttribute()
-        :   mpFontAttribute(theGlobalDefault::get())
-        {
-        }
-
-        FontAttribute::FontAttribute(const FontAttribute&) = default;
-
-        FontAttribute::FontAttribute(FontAttribute&&) = default;
-
-        FontAttribute::~FontAttribute() = default;
-
-        FontAttribute& FontAttribute::operator=(const FontAttribute&) = default;
-
-        FontAttribute& FontAttribute::operator=(FontAttribute&&) = default;
-
-        bool FontAttribute::operator==(const FontAttribute& rCandidate) const
-        {
-            return rCandidate.mpFontAttribute == mpFontAttribute;
-        }
-
-        const OUString& FontAttribute::getFamilyName() const
-        {
-            return mpFontAttribute->getFamilyName();
-        }
-
-        const OUString& FontAttribute::getStyleName() const
-        {
-            return mpFontAttribute->getStyleName();
-        }
-
-        sal_uInt16 FontAttribute::getWeight() const
-        {
-            return mpFontAttribute->getWeight();
-        }
-
-        bool FontAttribute::getSymbol() const
-        {
-            return mpFontAttribute->getSymbol();
-        }
-
-        bool FontAttribute::getVertical() const
-        {
-            return mpFontAttribute->getVertical();
-        }
-
-        bool FontAttribute::getItalic() const
-        {
-            return mpFontAttribute->getItalic();
-        }
-
-        bool FontAttribute::getOutline() const
-        {
-            return mpFontAttribute->getOutline();
-        }
-
-        bool FontAttribute::getRTL() const
-        {
-            return mpFontAttribute->getRTL();
-        }
-
-        bool FontAttribute::getBiDiStrong() const
-        {
-            return mpFontAttribute->getBiDiStrong();
-        }
-
-        bool FontAttribute::getMonospaced() const
-        {
-            return mpFontAttribute->getMonospaced();
-        }
+class ImpFontAttribute
+{
+public:
+    /// core data
+    OUString maFamilyName; // Font Family Name
+    OUString maStyleName; // Font Style Name
+    sal_uInt16 mnWeight; // Font weight
+
+    bool mbSymbol : 1; // Symbol Font Flag
+    bool mbVertical : 1; // Vertical Text Flag
+    bool mbItalic : 1; // Italic Flag
+    bool mbOutline : 1; // Outline Flag
+    bool mbRTL : 1; // RTL Flag
+    bool mbBiDiStrong : 1; // BiDi Flag
+    bool mbMonospaced : 1;
+
+    ImpFontAttribute(const OUString& rFamilyName, const OUString& rStyleName, sal_uInt16 nWeight,
+                     bool bSymbol, bool bVertical, bool bItalic, bool bMonospaced, bool bOutline,
+                     bool bRTL, bool bBiDiStrong)
+        : maFamilyName(rFamilyName)
+        , maStyleName(rStyleName)
+        , mnWeight(nWeight)
+        , mbSymbol(bSymbol)
+        , mbVertical(bVertical)
+        , mbItalic(bItalic)
+        , mbOutline(bOutline)
+        , mbRTL(bRTL)
+        , mbBiDiStrong(bBiDiStrong)
+        , mbMonospaced(bMonospaced)
+    {
+    }
+
+    ImpFontAttribute()
+        : maFamilyName()
+        , maStyleName()
+        , mnWeight(0)
+        , mbSymbol(false)
+        , mbVertical(false)
+        , mbItalic(false)
+        , mbOutline(false)
+        , mbRTL(false)
+        , mbBiDiStrong(false)
+        , mbMonospaced(false)
+    {
+    }
+
+    // data read access
+    const OUString& getFamilyName() const { return maFamilyName; }
+    const OUString& getStyleName() const { return maStyleName; }
+    sal_uInt16 getWeight() const { return mnWeight; }
+    bool getSymbol() const { return mbSymbol; }
+    bool getVertical() const { return mbVertical; }
+    bool getItalic() const { return mbItalic; }
+    bool getOutline() const { return mbOutline; }
+    bool getRTL() const { return mbRTL; }
+    bool getBiDiStrong() const { return mbBiDiStrong; }
+    bool getMonospaced() const { return mbMonospaced; }
+
+    bool operator==(const ImpFontAttribute& rCompare) const
+    {
+        return (getFamilyName() == rCompare.getFamilyName()
+                && getStyleName() == rCompare.getStyleName() && getWeight() == rCompare.getWeight()
+                && getSymbol() == rCompare.getSymbol() && getVertical() == rCompare.getVertical()
+                && getItalic() == rCompare.getItalic() && getOutline() == rCompare.getOutline()
+                && getRTL() == rCompare.getRTL() && getBiDiStrong() == rCompare.getBiDiStrong()
+                && getMonospaced() == rCompare.getMonospaced());
+    }
+};
+
+namespace
+{
+struct theGlobalDefault : public rtl::Static<FontAttribute::ImplType, theGlobalDefault>
+{
+};
+}
+
+FontAttribute::FontAttribute(const OUString& rFamilyName, const OUString& rStyleName,
+                             sal_uInt16 nWeight, bool bSymbol, bool bVertical, bool bItalic,
+                             bool bMonospaced, bool bOutline, bool bRTL, bool bBiDiStrong)
+    : mpFontAttribute(ImpFontAttribute(rFamilyName, rStyleName, nWeight, bSymbol, bVertical,
+                                       bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong))
+{
+}
+
+FontAttribute::FontAttribute()
+    : mpFontAttribute(theGlobalDefault::get())
+{
+}
+
+FontAttribute::FontAttribute(const FontAttribute&) = default;
+
+FontAttribute::FontAttribute(FontAttribute&&) = default;
+
+FontAttribute::~FontAttribute() = default;
+
+FontAttribute& FontAttribute::operator=(const FontAttribute&) = default;
+
+FontAttribute& FontAttribute::operator=(FontAttribute&&) = default;
+
+bool FontAttribute::operator==(const FontAttribute& rCandidate) const
+{
+    return rCandidate.mpFontAttribute == mpFontAttribute;
+}
+
+const OUString& FontAttribute::getFamilyName() const { return mpFontAttribute->getFamilyName(); }
+
+const OUString& FontAttribute::getStyleName() const { return mpFontAttribute->getStyleName(); }
+
+sal_uInt16 FontAttribute::getWeight() const { return mpFontAttribute->getWeight(); }
+
+bool FontAttribute::getSymbol() const { return mpFontAttribute->getSymbol(); }
+
+bool FontAttribute::getVertical() const { return mpFontAttribute->getVertical(); }
+
+bool FontAttribute::getItalic() const { return mpFontAttribute->getItalic(); }
+
+bool FontAttribute::getOutline() const { return mpFontAttribute->getOutline(); }
+
+bool FontAttribute::getRTL() const { return mpFontAttribute->getRTL(); }
+
+bool FontAttribute::getBiDiStrong() const { return mpFontAttribute->getBiDiStrong(); }
 
+bool FontAttribute::getMonospaced() const { return mpFontAttribute->getMonospaced(); }
 
 } // end of namespace
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 2ccf6ad44357..c14d8171fe8b 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -3334,7 +3334,6 @@ drawinglayer/source/animation/animationtiming.cxx
 drawinglayer/source/attribute/fillgradientattribute.cxx
 drawinglayer/source/attribute/fillgraphicattribute.cxx
 drawinglayer/source/attribute/fillhatchattribute.cxx
-drawinglayer/source/attribute/fontattribute.cxx
 drawinglayer/source/attribute/lineattribute.cxx
 drawinglayer/source/attribute/linestartendattribute.cxx
 drawinglayer/source/attribute/materialattribute3d.cxx


More information about the Libreoffice-commits mailing list