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@gmail.com>
This commit is contained in:
committed by
Tomaž Vajngerl
parent
e469ba3ba9
commit
b576ca8d23
@@ -21,182 +21,131 @@
|
|||||||
#include <rtl/instance.hxx>
|
#include <rtl/instance.hxx>
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
|
|
||||||
|
|
||||||
namespace drawinglayer::attribute
|
namespace drawinglayer::attribute
|
||||||
{
|
{
|
||||||
class ImpFontAttribute
|
class ImpFontAttribute
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// core data
|
/// core data
|
||||||
OUString maFamilyName; // Font Family Name
|
OUString maFamilyName; // Font Family Name
|
||||||
OUString maStyleName; // Font Style Name
|
OUString maStyleName; // Font Style Name
|
||||||
sal_uInt16 mnWeight; // Font weight
|
sal_uInt16 mnWeight; // Font weight
|
||||||
|
|
||||||
bool mbSymbol : 1; // Symbol Font Flag
|
bool mbSymbol : 1; // Symbol Font Flag
|
||||||
bool mbVertical : 1; // Vertical Text Flag
|
bool mbVertical : 1; // Vertical Text Flag
|
||||||
bool mbItalic : 1; // Italic Flag
|
bool mbItalic : 1; // Italic Flag
|
||||||
bool mbOutline : 1; // Outline Flag
|
bool mbOutline : 1; // Outline Flag
|
||||||
bool mbRTL : 1; // RTL Flag
|
bool mbRTL : 1; // RTL Flag
|
||||||
bool mbBiDiStrong : 1; // BiDi Flag
|
bool mbBiDiStrong : 1; // BiDi Flag
|
||||||
bool mbMonospaced : 1;
|
bool mbMonospaced : 1;
|
||||||
|
|
||||||
ImpFontAttribute(
|
ImpFontAttribute(const OUString& rFamilyName, const OUString& rStyleName, sal_uInt16 nWeight,
|
||||||
const OUString& rFamilyName,
|
bool bSymbol, bool bVertical, bool bItalic, bool bMonospaced, bool bOutline,
|
||||||
const OUString& rStyleName,
|
bool bRTL, bool bBiDiStrong)
|
||||||
sal_uInt16 nWeight,
|
: maFamilyName(rFamilyName)
|
||||||
bool bSymbol,
|
, maStyleName(rStyleName)
|
||||||
bool bVertical,
|
, mnWeight(nWeight)
|
||||||
bool bItalic,
|
, mbSymbol(bSymbol)
|
||||||
bool bMonospaced,
|
, mbVertical(bVertical)
|
||||||
bool bOutline,
|
, mbItalic(bItalic)
|
||||||
bool bRTL,
|
, mbOutline(bOutline)
|
||||||
bool bBiDiStrong)
|
, mbRTL(bRTL)
|
||||||
: maFamilyName(rFamilyName),
|
, mbBiDiStrong(bBiDiStrong)
|
||||||
maStyleName(rStyleName),
|
, mbMonospaced(bMonospaced)
|
||||||
mnWeight(nWeight),
|
{
|
||||||
mbSymbol(bSymbol),
|
}
|
||||||
mbVertical(bVertical),
|
|
||||||
mbItalic(bItalic),
|
|
||||||
mbOutline(bOutline),
|
|
||||||
mbRTL(bRTL),
|
|
||||||
mbBiDiStrong(bBiDiStrong),
|
|
||||||
mbMonospaced(bMonospaced)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ImpFontAttribute()
|
ImpFontAttribute()
|
||||||
: maFamilyName(),
|
: maFamilyName()
|
||||||
maStyleName(),
|
, maStyleName()
|
||||||
mnWeight(0),
|
, mnWeight(0)
|
||||||
mbSymbol(false),
|
, mbSymbol(false)
|
||||||
mbVertical(false),
|
, mbVertical(false)
|
||||||
mbItalic(false),
|
, mbItalic(false)
|
||||||
mbOutline(false),
|
, mbOutline(false)
|
||||||
mbRTL(false),
|
, mbRTL(false)
|
||||||
mbBiDiStrong(false),
|
, mbBiDiStrong(false)
|
||||||
mbMonospaced(false)
|
, mbMonospaced(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// data read access
|
// data read access
|
||||||
const OUString& getFamilyName() const { return maFamilyName; }
|
const OUString& getFamilyName() const { return maFamilyName; }
|
||||||
const OUString& getStyleName() const { return maStyleName; }
|
const OUString& getStyleName() const { return maStyleName; }
|
||||||
sal_uInt16 getWeight() const { return mnWeight; }
|
sal_uInt16 getWeight() const { return mnWeight; }
|
||||||
bool getSymbol() const { return mbSymbol; }
|
bool getSymbol() const { return mbSymbol; }
|
||||||
bool getVertical() const { return mbVertical; }
|
bool getVertical() const { return mbVertical; }
|
||||||
bool getItalic() const { return mbItalic; }
|
bool getItalic() const { return mbItalic; }
|
||||||
bool getOutline() const { return mbOutline; }
|
bool getOutline() const { return mbOutline; }
|
||||||
bool getRTL() const { return mbRTL; }
|
bool getRTL() const { return mbRTL; }
|
||||||
bool getBiDiStrong() const { return mbBiDiStrong; }
|
bool getBiDiStrong() const { return mbBiDiStrong; }
|
||||||
bool getMonospaced() const { return mbMonospaced; }
|
bool getMonospaced() const { return mbMonospaced; }
|
||||||
|
|
||||||
bool operator==(const ImpFontAttribute& rCompare) const
|
bool operator==(const ImpFontAttribute& rCompare) const
|
||||||
{
|
{
|
||||||
return (getFamilyName() == rCompare.getFamilyName()
|
return (getFamilyName() == rCompare.getFamilyName()
|
||||||
&& getStyleName() == rCompare.getStyleName()
|
&& getStyleName() == rCompare.getStyleName() && getWeight() == rCompare.getWeight()
|
||||||
&& getWeight() == rCompare.getWeight()
|
&& getSymbol() == rCompare.getSymbol() && getVertical() == rCompare.getVertical()
|
||||||
&& getSymbol() == rCompare.getSymbol()
|
&& getItalic() == rCompare.getItalic() && getOutline() == rCompare.getOutline()
|
||||||
&& getVertical() == rCompare.getVertical()
|
&& getRTL() == rCompare.getRTL() && getBiDiStrong() == rCompare.getBiDiStrong()
|
||||||
&& getItalic() == rCompare.getItalic()
|
&& getMonospaced() == rCompare.getMonospaced());
|
||||||
&& getOutline() == rCompare.getOutline()
|
}
|
||||||
&& getRTL() == rCompare.getRTL()
|
};
|
||||||
&& getBiDiStrong() == rCompare.getBiDiStrong()
|
|
||||||
&& getMonospaced() == rCompare.getMonospaced());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
struct theGlobalDefault :
|
struct theGlobalDefault : public rtl::Static<FontAttribute::ImplType, theGlobalDefault>
|
||||||
public rtl::Static< FontAttribute::ImplType, theGlobalDefault > {};
|
{
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
|
||||||
FontAttribute::FontAttribute(
|
FontAttribute::FontAttribute(const OUString& rFamilyName, const OUString& rStyleName,
|
||||||
const OUString& rFamilyName,
|
sal_uInt16 nWeight, bool bSymbol, bool bVertical, bool bItalic,
|
||||||
const OUString& rStyleName,
|
bool bMonospaced, bool bOutline, bool bRTL, bool bBiDiStrong)
|
||||||
sal_uInt16 nWeight,
|
: mpFontAttribute(ImpFontAttribute(rFamilyName, rStyleName, nWeight, bSymbol, bVertical,
|
||||||
bool bSymbol,
|
bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong))
|
||||||
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()
|
FontAttribute::FontAttribute()
|
||||||
: mpFontAttribute(theGlobalDefault::get())
|
: mpFontAttribute(theGlobalDefault::get())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FontAttribute::FontAttribute(const FontAttribute&) = default;
|
FontAttribute::FontAttribute(const FontAttribute&) = default;
|
||||||
|
|
||||||
FontAttribute::FontAttribute(FontAttribute&&) = default;
|
FontAttribute::FontAttribute(FontAttribute&&) = default;
|
||||||
|
|
||||||
FontAttribute::~FontAttribute() = default;
|
FontAttribute::~FontAttribute() = default;
|
||||||
|
|
||||||
FontAttribute& FontAttribute::operator=(const FontAttribute&) = default;
|
FontAttribute& FontAttribute::operator=(const FontAttribute&) = default;
|
||||||
|
|
||||||
FontAttribute& FontAttribute::operator=(FontAttribute&&) = default;
|
FontAttribute& FontAttribute::operator=(FontAttribute&&) = default;
|
||||||
|
|
||||||
bool FontAttribute::operator==(const FontAttribute& rCandidate) const
|
bool FontAttribute::operator==(const FontAttribute& rCandidate) const
|
||||||
{
|
{
|
||||||
return rCandidate.mpFontAttribute == mpFontAttribute;
|
return rCandidate.mpFontAttribute == mpFontAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OUString& FontAttribute::getFamilyName() const
|
const OUString& FontAttribute::getFamilyName() const { return mpFontAttribute->getFamilyName(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getFamilyName();
|
|
||||||
}
|
|
||||||
|
|
||||||
const OUString& FontAttribute::getStyleName() const
|
const OUString& FontAttribute::getStyleName() const { return mpFontAttribute->getStyleName(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getStyleName();
|
|
||||||
}
|
|
||||||
|
|
||||||
sal_uInt16 FontAttribute::getWeight() const
|
sal_uInt16 FontAttribute::getWeight() const { return mpFontAttribute->getWeight(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getWeight();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getSymbol() const
|
bool FontAttribute::getSymbol() const { return mpFontAttribute->getSymbol(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getSymbol();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getVertical() const
|
bool FontAttribute::getVertical() const { return mpFontAttribute->getVertical(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getVertical();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getItalic() const
|
bool FontAttribute::getItalic() const { return mpFontAttribute->getItalic(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getItalic();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getOutline() const
|
bool FontAttribute::getOutline() const { return mpFontAttribute->getOutline(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getOutline();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getRTL() const
|
bool FontAttribute::getRTL() const { return mpFontAttribute->getRTL(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getRTL();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getBiDiStrong() const
|
bool FontAttribute::getBiDiStrong() const { return mpFontAttribute->getBiDiStrong(); }
|
||||||
{
|
|
||||||
return mpFontAttribute->getBiDiStrong();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FontAttribute::getMonospaced() const
|
|
||||||
{
|
|
||||||
return mpFontAttribute->getMonospaced();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
bool FontAttribute::getMonospaced() const { return mpFontAttribute->getMonospaced(); }
|
||||||
|
|
||||||
} // end of namespace
|
} // end of namespace
|
||||||
|
|
||||||
|
@@ -3334,7 +3334,6 @@ drawinglayer/source/animation/animationtiming.cxx
|
|||||||
drawinglayer/source/attribute/fillgradientattribute.cxx
|
drawinglayer/source/attribute/fillgradientattribute.cxx
|
||||||
drawinglayer/source/attribute/fillgraphicattribute.cxx
|
drawinglayer/source/attribute/fillgraphicattribute.cxx
|
||||||
drawinglayer/source/attribute/fillhatchattribute.cxx
|
drawinglayer/source/attribute/fillhatchattribute.cxx
|
||||||
drawinglayer/source/attribute/fontattribute.cxx
|
|
||||||
drawinglayer/source/attribute/lineattribute.cxx
|
drawinglayer/source/attribute/lineattribute.cxx
|
||||||
drawinglayer/source/attribute/linestartendattribute.cxx
|
drawinglayer/source/attribute/linestartendattribute.cxx
|
||||||
drawinglayer/source/attribute/materialattribute3d.cxx
|
drawinglayer/source/attribute/materialattribute3d.cxx
|
||||||
|
Reference in New Issue
Block a user