summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-23 14:09:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-24 12:00:07 +0100
commit88c0e46e139fe44f7f2a6f9fbaa6b3fd7a827a8d (patch)
treef41e0a3e856a8dd9dba6bbac7d08e62518b53420
parent17aea7c41c95186c03c173a8c6f26cd2ebce4c54 (diff)
custom literal for Degree10
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx4
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
-rw-r--r--editeng/source/editeng/impedit.hxx2
-rw-r--r--editeng/source/items/textitem.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx2
-rw-r--r--emfio/source/reader/mtftools.cxx2
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx8
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx4
-rw-r--r--include/editeng/charrotateitem.hxx8
-rw-r--r--include/editeng/editeng.hxx2
-rw-r--r--include/svx/xgrad.hxx2
-rw-r--r--include/svx/xhatch.hxx2
-rw-r--r--include/tools/degree.hxx4
-rw-r--r--include/vcl/GraphicAttributes.hxx2
-rw-r--r--include/vcl/cursor.hxx2
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx2
-rw-r--r--sc/source/ui/view/output.cxx4
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sd/source/core/drawdoc4.cxx4
-rw-r--r--svtools/source/control/ruler.cxx6
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx6
-rw-r--r--svx/source/dialog/rubydialog.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx2
-rw-r--r--svx/source/svdraw/svdattr.cxx2
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx12
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx6
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/core/crsr/viscrs.cxx2
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx2
-rw-r--r--sw/source/core/text/atrstck.cxx4
-rw-r--r--sw/source/core/text/frmpaint.cxx4
-rw-r--r--sw/source/core/text/inftxt.cxx8
-rw-r--r--sw/source/core/text/itrform2.cxx4
-rw-r--r--sw/source/core/text/porlin.cxx2
-rw-r--r--sw/source/core/text/pormulti.cxx4
-rw-r--r--sw/source/core/text/porrst.cxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx4
-rw-r--r--sw/source/core/text/txttab.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx4
-rw-r--r--sw/source/core/txtnode/swfont.cxx46
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx2
-rw-r--r--tools/source/generic/point.cxx10
-rw-r--r--tools/source/generic/poly.cxx2
-rw-r--r--tools/source/generic/poly2.cxx2
-rw-r--r--vcl/backendtest/outputdevice/gradient.cxx8
-rw-r--r--vcl/headless/svpgdi.cxx4
-rw-r--r--vcl/qa/cppunit/TypeSerializerTest.cxx2
-rw-r--r--vcl/qa/cppunit/svm/svmtest.cxx2
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx2
-rw-r--r--vcl/skia/gdiimpl.cxx8
-rw-r--r--vcl/source/bitmap/bitmappaint.cxx12
-rw-r--r--vcl/source/control/fixed.cxx2
-rw-r--r--vcl/source/filter/GraphicNativeTransform.cxx7
-rw-r--r--vcl/source/filter/jpeg/Exif.cxx10
-rw-r--r--vcl/source/font/PhysicalFontFace.cxx2
-rw-r--r--vcl/source/font/fontselect.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx4
-rw-r--r--vcl/source/gdi/gradient.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx10
-rw-r--r--vcl/source/gdi/sallayout.cxx2
-rw-r--r--vcl/source/gdi/wall.cxx2
-rw-r--r--vcl/source/graphic/GraphicObject.cxx4
-rw-r--r--vcl/source/graphic/GraphicObject2.cxx2
-rw-r--r--vcl/source/outdev/gradient.cxx8
-rw-r--r--vcl/source/outdev/hatch.cxx20
-rw-r--r--vcl/source/outdev/text.cxx12
-rw-r--r--vcl/source/window/cursor.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/toolbox2.cxx8
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx2
-rw-r--r--vcl/unx/generic/print/common_gfx.cxx2
-rw-r--r--vcl/unx/generic/print/text_gfx.cxx4
-rw-r--r--vcl/workben/svptest.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx8
82 files changed, 196 insertions, 195 deletions
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 96cf8e9ee5f4..c908d7a37b8a 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -2005,7 +2005,7 @@ namespace cppcanvas::internal
// will be rotated twice)
const vcl::Font aOrigFont( rVDev.GetFont() );
vcl::Font aUnrotatedFont( aOrigFont );
- aUnrotatedFont.SetOrientation(Degree10(0));
+ aUnrotatedFont.SetOrientation(0_deg10);
rVDev.SetFont( aUnrotatedFont );
// TODO(F3): Don't understand parameter semantics of
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 45aad05aef44..39cc697ff7ff 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2822,7 +2822,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
m_x270degRB->set_active(true);
else
{
- DBG_ASSERT( Degree10(0) == rItem.GetValue(), "incorrect value" );
+ DBG_ASSERT( 0_deg10 == rItem.GetValue(), "incorrect value" );
m_x0degRB->set_active(true);
}
m_xFitToLineCB->set_active(rItem.IsFitToLine());
@@ -2969,7 +2969,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
m_x270degRB->get_state_changed_from_saved() ||
m_xFitToLineCB->get_state_changed_from_saved() )
{
- SvxCharRotateItem aItem( Degree10(0), m_xFitToLineCB->get_active(), nWhich );
+ SvxCharRotateItem aItem( 0_deg10, m_xFitToLineCB->get_active(), nWhich );
if (m_x90degRB->get_active())
aItem.SetBottomToTop();
else if (m_x270degRB->get_active())
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index 9de4b8a80e64..2f029914bf19 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -68,7 +68,7 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
GraphicAttr aSuppressGraphicAttr(getGraphicAttr());
aSuppressGraphicAttr.SetCrop(0, 0, 0, 0);
- aSuppressGraphicAttr.SetRotation(Degree10(0));
+ aSuppressGraphicAttr.SetRotation(0_deg10);
aSuppressGraphicAttr.SetMirrorFlags(BmpMirrorFlags::NONE);
aSuppressGraphicAttr.SetTransparency(0);
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 526f00518910..8bf1d3977d79 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2118,7 +2118,7 @@ void VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(
aVCLGradient.SetStyle(GradientStyle::Linear);
aVCLGradient.SetStartColor(aTransColor);
aVCLGradient.SetEndColor(aTransColor);
- aVCLGradient.SetAngle(Degree10(0));
+ aVCLGradient.SetAngle(0_deg10);
aVCLGradient.SetBorder(0);
aVCLGradient.SetOfsX(0);
aVCLGradient.SetOfsY(0);
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index a874a51699e3..e5eb5b0703c0 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -835,7 +835,7 @@ public:
void FormatFullDoc();
void UpdateViews( EditView* pCurView = nullptr );
void Paint( ImpEditView* pView, const tools::Rectangle& rRect, OutputDevice* pTargetDevice );
- void Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, Degree10 nOrientation = Degree10(0) );
+ void Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, Degree10 nOrientation = 0_deg10 );
bool MouseButtonUp( const MouseEvent& rMouseEvent, EditView* pView );
bool MouseButtonDown( const MouseEvent& rMouseEvent, EditView* pView );
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index e1700df6e254..84cc8e743dec 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -99,7 +99,7 @@ SfxPoolItem* SvxEscapementItem::CreateDefault() {return new SvxEscapementItem(0)
SfxPoolItem* SvxLanguageItem::CreateDefault() {return new SvxLanguageItem(LANGUAGE_GERMAN, 0);}
SfxPoolItem* SvxBlinkItem::CreateDefault() {return new SvxBlinkItem(false, 0);}
SfxPoolItem* SvxEmphasisMarkItem::CreateDefault() {return new SvxEmphasisMarkItem(FontEmphasisMark::NONE, 0);}
-SfxPoolItem* SvxCharRotateItem::CreateDefault() {return new SvxCharRotateItem(Degree10(0), false, 0);}
+SfxPoolItem* SvxCharRotateItem::CreateDefault() {return new SvxCharRotateItem(0_deg10, false, 0);}
SfxPoolItem* SvxCharScaleWidthItem::CreateDefault() {return new SvxCharScaleWidthItem(100, 0);}
SfxPoolItem* SvxCharReliefItem::CreateDefault() {return new SvxCharReliefItem(FontRelief::NONE, 0);}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 5be9b0a7493e..de9a66d8eddc 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1039,7 +1039,7 @@ ATTR_SETEMPHASIS:
if( aPlainMap.nHorzVert )
{
// RTF knows only 90deg
- pSet->Put( SvxCharRotateItem( Degree10(900), 1 == nTokenValue,
+ pSet->Put( SvxCharRotateItem( 900_deg10, 1 == nTokenValue,
aPlainMap.nHorzVert ));
}
break;
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 778adeb429ba..e1e80ec8bb04 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -541,7 +541,7 @@ namespace emfio
sal_Int32 nResult;
const bool bFail = o3tl::checked_multiply(mnWinExtX, mnWinExtY, nResult);
if (!bFail && nResult < 0)
- rFont.SetOrientation( Degree10(3600) - rFont.GetOrientation() );
+ rFont.SetOrientation( 3600_deg10 - rFont.GetOrientation() );
}
tools::Polygon& MtfTools::ImplMap( tools::Polygon& rPolygon )
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 561cfc87599d..04fc15559a06 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2002,7 +2002,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const to
if ( mnTextMode == 0 ) // using glyph outlines
{
vcl::Font aNotRotatedFont( maFont );
- aNotRotatedFont.SetOrientation( Degree10(0) );
+ aNotRotatedFont.SetOrientation( 0_deg10 );
ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::BITMASK);
pVirDev->SetMapMode( rVDev.GetMapMode() );
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 3a7c6b7048ba..e82c6a21eb99 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2037,11 +2037,11 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
case GOrdSChAng: {
sal_Int32 nX = ReadCoord(bCoord32);
sal_Int32 nY = ReadCoord(bCoord32);
- if (nX>=0 && nY==0) aAttr.nChrAng=Degree10(0);
+ if (nX>=0 && nY==0) aAttr.nChrAng=0_deg10;
else {
aAttr.nChrAng = Degree10(static_cast<short>(atan2(static_cast<double>(nY),static_cast<double>(nX))/3.1415926539*1800.0));
- while (aAttr.nChrAng < Degree10(0)) aAttr.nChrAng += Degree10(3600);
- aAttr.nChrAng %= Degree10(3600);
+ while (aAttr.nChrAng < 0_deg10) aAttr.nChrAng += 3600_deg10;
+ aAttr.nChrAng %= 3600_deg10;
}
break;
}
@@ -2689,7 +2689,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
aDefAttr.nArcQ =1;
aDefAttr.nArcR =0;
aDefAttr.nArcS =0;
- aDefAttr.nChrAng =Degree10(0);
+ aDefAttr.nChrAng =0_deg10;
aDefAttr.aChrCellSize=Size(12,12);
aDefAttr.nChrSet =0;
aDefAttr.aCurPos =Point(0,0);
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 2abe9d372080..dc5a0c6bb7da 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1117,7 +1117,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
if( rPageSize.Width() < rPageSize.Height() )
{
nTextWidth = rPageSize.Height();
- aFont.SetOrientation( Degree10(2700) );
+ aFont.SetOrientation( 2700_deg10 );
}
// adjust font height for text to fit
@@ -1185,7 +1185,7 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& rWriter, const Size& rP
aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetAlignment( ALIGN_BOTTOM );
aFont.SetFontHeight(40);
- aFont.SetOrientation(Degree10(450));
+ aFont.SetOrientation(450_deg10);
OutputDevice* pDev = rWriter.GetReferenceDevice();
pDev->SetFont(aFont);
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 8e0c90ce2e4e..c9b80e918ef1 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -220,7 +220,7 @@ void SVGAttributeWriter::AddGradientDef( const tools::Rectangle& rObjRect, const
{
SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, true, true );
Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() );
- Degree10 nAngle = rGradient.GetAngle() % Degree10(3600);
+ Degree10 nAngle = rGradient.GetAngle() % 3600_deg10;
Point aObjRectCenter( rObjRect.Center() );
tools::Polygon aPoly( rObjRect );
static sal_Int32 nCurGradientId = 1;
@@ -2259,7 +2259,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
rGradient.GetBoundRect( rPolyPoly.GetBoundRect(), aTmpRect, aTmpCenter );
ImplMap( aTmpRect, aRect );
ImplMap( aTmpCenter, aCenter );
- const Degree10 nAngle = rGradient.GetAngle() % Degree10(3600);
+ const Degree10 nAngle = rGradient.GetAngle() % 3600_deg10;
tools::Polygon aPoly( 2 );
// Setting x value of a gradient vector to rotation center to
diff --git a/include/editeng/charrotateitem.hxx b/include/editeng/charrotateitem.hxx
index 093c84224fe5..49fb3f345bb3 100644
--- a/include/editeng/charrotateitem.hxx
+++ b/include/editeng/charrotateitem.hxx
@@ -52,10 +52,10 @@ public:
void SetValue(Degree10 val) { SfxUInt16Item::SetValue(val.get()); }
// our currently only degree values
- void SetTopToBottom() { SetValue(Degree10(2700)); }
- void SetBottomToTop() { SetValue(Degree10(900)); }
- bool IsTopToBottom() const { return Degree10(2700) == GetValue(); }
- bool IsBottomToTop() const { return Degree10(900) == GetValue(); }
+ void SetTopToBottom() { SetValue(2700_deg10); }
+ void SetBottomToTop() { SetValue(900_deg10); }
+ bool IsTopToBottom() const { return 2700_deg10 == GetValue(); }
+ bool IsBottomToTop() const { return 900_deg10 == GetValue(); }
bool IsVertical() const { return IsTopToBottom() || IsBottomToTop(); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 575e43d49e3f..cfa574d56cfb 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -374,7 +374,7 @@ public:
void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect );
void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos );
void Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip );
- void Draw( OutputDevice* pOutDev, const Point& rStartPos, Degree10 nOrientation = Degree10(0) );
+ void Draw( OutputDevice* pOutDev, const Point& rStartPos, Degree10 nOrientation = 0_deg10 );
ErrCode Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
void Write( SvStream& rOutput, EETextFormat );
diff --git a/include/svx/xgrad.hxx b/include/svx/xgrad.hxx
index e6331d7274c5..620b5abb4ff2 100644
--- a/include/svx/xgrad.hxx
+++ b/include/svx/xgrad.hxx
@@ -47,7 +47,7 @@ class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC XGradient final
public:
XGradient();
XGradient( const Color& rStart, const Color& rEnd,
- css::awt::GradientStyle eStyle = css::awt::GradientStyle_LINEAR, Degree10 nAngle = Degree10(0),
+ css::awt::GradientStyle eStyle = css::awt::GradientStyle_LINEAR, Degree10 nAngle = 0_deg10,
sal_uInt16 nXOfs = 50, sal_uInt16 nYOfs = 50, sal_uInt16 nBorder = 0,
sal_uInt16 nStartIntens = 100, sal_uInt16 nEndIntens = 100,
sal_uInt16 nSteps = 0 );
diff --git a/include/svx/xhatch.hxx b/include/svx/xhatch.hxx
index 91dea6e6c1e2..1553141e5950 100644
--- a/include/svx/xhatch.hxx
+++ b/include/svx/xhatch.hxx
@@ -39,7 +39,7 @@ class SVXCORE_DLLPUBLIC XHatch final
public:
XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), nDistance(0), nAngle(0) {}
XHatch(const Color& rCol, css::drawing::HatchStyle eStyle = css::drawing::HatchStyle_SINGLE,
- tools::Long nDistance = 20, Degree10 nAngle = Degree10(0));
+ tools::Long nDistance = 20, Degree10 nAngle = 0_deg10);
bool operator==(const XHatch& rHatch) const;
diff --git a/include/tools/degree.hxx b/include/tools/degree.hxx
index 7151abccb228..d7ff625b0de2 100644
--- a/include/tools/degree.hxx
+++ b/include/tools/degree.hxx
@@ -12,7 +12,9 @@
#include <o3tl/strong_int.hxx>
/** tenths of a Degree, normally rotation */
-
typedef o3tl::strong_int<sal_Int16, struct Degree10Tag> Degree10;
+/** custom literal */
+constexpr Degree10 operator""_deg10(unsigned long long n) { return Degree10{ n }; }
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx
index 5216d2934166..4fca512956c6 100644
--- a/include/vcl/GraphicAttributes.hxx
+++ b/include/vcl/GraphicAttributes.hxx
@@ -108,7 +108,7 @@ public:
{
return (mnLeftCrop != 0 || mnTopCrop != 0 || mnRightCrop != 0 || mnBottomCrop != 0);
}
- bool IsRotated() const { return ((mnRotate10 % Degree10(3600)) != Degree10(0)); }
+ bool IsRotated() const { return ((mnRotate10 % 3600_deg10) != 0_deg10); }
bool IsTransparent() const { return (mcTransparency > 0); }
bool IsAdjusted() const
{
diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx
index ff66326d90b9..b6adf4926ed5 100644
--- a/include/vcl/cursor.hxx
+++ b/include/vcl/cursor.hxx
@@ -87,7 +87,7 @@ public:
tools::Long GetWidth() const { return maSize.Width(); }
tools::Long GetHeight() const { return maSize.Height(); }
- void SetOrientation( Degree10 nOrientation = Degree10(0) );
+ void SetOrientation( Degree10 nOrientation = 0_deg10 );
void SetDirection( CursorDirection nDirection = CursorDirection::NONE );
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 4d81c4140a17..c4a0a2080e29 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -723,7 +723,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
new SvxBlinkItem(false,ITEMID_BLINK),
new SvxEmphasisMarkItem(FontEmphasisMark::NONE,ITEMID_EMPHASISMARK),
new SvxTwoLinesItem(true,0,0,ITEMID_TWOLINES),
- new SvxCharRotateItem(Degree10(0),false,ITEMID_CHARROTATE),
+ new SvxCharRotateItem(0_deg10,false,ITEMID_CHARROTATE),
new SvxCharScaleWidthItem(100,ITEMID_CHARSCALE_W),
new SvxCharReliefItem(FontRelief::NONE,ITEMID_CHARRELIEF),
new SvxCharHiddenItem(false,ITEMID_CHARHIDDEN),
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 8d95ed2a133c..d46c996a4bd1 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -861,9 +861,9 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD
aGradient.SetSteps(255);
if(pOldDataBarInfo->mnLength < 0)
- aGradient.SetAngle(Degree10(2700));
+ aGradient.SetAngle(2700_deg10);
else
- aGradient.SetAngle(Degree10(900));
+ aGradient.SetAngle(900_deg10);
rRenderContext.DrawGradient(aPaintRect, aGradient);
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 59c1ac497275..b0d5f2075c73 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -3452,7 +3452,7 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
}
}
- rParam.mpEngine->Draw(mpDev, aLogicStart, Degree10(900));
+ rParam.mpEngine->Draw(mpDev, aLogicStart, 900_deg10);
}
rParam.adjustForHyperlinkInPDF(aURLStart, mpDev);
@@ -3689,7 +3689,7 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
// bMoveClipped handling has been replaced by complete alignment
// handling (also extending to the left).
- rParam.mpEngine->Draw(mpDev, aLogicStart, Degree10(2700));
+ rParam.mpEngine->Draw(mpDev, aLogicStart, 2700_deg10);
}
rParam.adjustForHyperlinkInPDF(aURLStart, mpDev);
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index d1949de20fb2..f8cb995a5941 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -397,7 +397,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(drawing::FillStyle_GRADIENT)); // fill with gradient
aGradient.SetGradientStyle( ::awt::GradientStyle_RECT); // square type
- aGradient.SetAngle( Degree10(0) ); // 0° angle
+ aGradient.SetAngle( 0_deg10 ); // 0° angle
aGradient.SetStartColor( Color(0xcccccc) ); // white
aGradient.SetEndColor( COL_WHITE ); // light gray 3
aFillGradient.SetName( aShapesName );
@@ -417,7 +417,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
aGradient.SetGradientStyle( ::awt::GradientStyle_LINEAR );
- aGradient.SetAngle( Degree10(300) );
+ aGradient.SetAngle( 300_deg10 );
aGradient.SetStartColor( COL_WHITE ); // white
aGradient.SetEndColor( Color(0xcccccc) ); // light gray 3
aFillGradient.SetName( aName );
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 09c442bee020..2caa18a0f3bc 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -467,9 +467,9 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& rRenderContext, tools::Long nMin,
{
vcl::Font aFont = rRenderContext.GetFont();
if (mnWinStyle & WB_RIGHT_ALIGNED)
- aFont.SetOrientation(Degree10(2700));
+ aFont.SetOrientation(2700_deg10);
else
- aFont.SetOrientation(Degree10(900));
+ aFont.SetOrientation(900_deg10);
rRenderContext.SetFont(aFont);
nTickWidth = aPixSize.Height();
}
@@ -1033,7 +1033,7 @@ void Ruler::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
vcl::Font aFont = GetFont();
if (mnWinStyle & WB_VERT)
- aFont.SetOrientation(Degree10(900));
+ aFont.SetOrientation(900_deg10);
maVirDev->SetFont(aFont);
maVirDev->SetTextColor(GetTextColor());
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 23790a4438e1..7ea1dc3f29f1 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -189,7 +189,7 @@ static void CalculateHorizontalScalingFactor(
const SvxWeightItem& rWeightItem = rSdrObjCustomShape.GetMergedItem( EE_CHAR_WEIGHT );
aFont.SetWeight( rWeightItem.GetWeight() );
- aFont.SetOrientation( Degree10(0) );
+ aFont.SetOrientation( 0_deg10 );
// initializing virtual device
ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::BITMASK);
@@ -294,7 +294,7 @@ static void GetTextAreaOutline(
aFont.SetFamilyName( rFontItem.GetFamilyName() );
aFont.SetFamily( rFontItem.GetFamily() );
aFont.SetStyleName( rFontItem.GetStyleName() );
- aFont.SetOrientation( Degree10(0) );
+ aFont.SetOrientation( 0_deg10 );
const SvxPostureItem& rPostureItem = rSdrObjCustomShape.GetMergedItem( EE_CHAR_ITALIC );
aFont.SetItalic( rPostureItem.GetPosture() );
@@ -338,7 +338,7 @@ static void GetTextAreaOutline(
for ( auto& rOutline : aCharacterData.vOutlines )
{
// rotating
- rOutline.Rotate( Point( nTextWidth / 2, rFWData.nSingleLineHeight / 2 ), Degree10(900) );
+ rOutline.Rotate( Point( nTextWidth / 2, rFWData.nSingleLineHeight / 2 ), 900_deg10 );
aCharacterData.aBoundRect.Union( rOutline.GetBoundRect() );
}
for ( auto& rOutline : aCharacterData.vOutlines )
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 361a5828a2d3..2c74895c0bb1 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -760,7 +760,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
bRubyStretch = true;
aRubyFont.SetVertical(true);
- aRubyFont.SetOrientation(Degree10(2700));
+ aRubyFont.SetOrientation(2700_deg10);
}
tools::Long nYOutput;
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 6284e1e1b0cf..2f934d0cbf1d 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -148,7 +148,7 @@ namespace drawinglayer::primitive2d
maGraphicAttr(rGraphicAttr)
{
// reset some values from GraphicAttr which are part of transformation already
- maGraphicAttr.SetRotation(Degree10(0));
+ maGraphicAttr.SetRotation(0_deg10);
}
bool SdrGrafPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 8810427d926b..5f6411804d06 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -324,7 +324,7 @@ SdrItemPool::SdrItemPool(
rPoolDefaults[ SDRATTR_TABLE_BORDER_INNER - SDRATTR_START ] = pBoxInfoItem;
rPoolDefaults[ SDRATTR_TABLE_BORDER_TLBR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_TLBR );
rPoolDefaults[ SDRATTR_TABLE_BORDER_BLTR - SDRATTR_START ] = new SvxLineItem( SDRATTR_TABLE_BORDER_BLTR );
- rPoolDefaults[ SDRATTR_TABLE_TEXT_ROTATION - SDRATTR_START ] = new SvxTextRotateItem(Degree10(0), SDRATTR_TABLE_TEXT_ROTATION);
+ rPoolDefaults[ SDRATTR_TABLE_TEXT_ROTATION - SDRATTR_START ] = new SvxTextRotateItem(0_deg10, SDRATTR_TABLE_TEXT_ROTATION);
rPoolDefaults[ SDRATTR_GLOW_RADIUS - SDRATTR_START ] = new SdrMetricItem(SDRATTR_GLOW_RADIUS, 0);
rPoolDefaults[ SDRATTR_GLOW_COLOR - SDRATTR_START ] = new XColorItem(SDRATTR_GLOW_COLOR, aNullCol);
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 23bfc8313cb9..b730025c47d0 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -69,17 +69,17 @@ bool XGradientList::Create()
OUStringBuffer aStr(SvxResId(RID_SVXSTR_GRADIENT));
aStr.append(" 1");
sal_Int32 nLen = aStr.getLength() - 1;
- Insert(std::make_unique<XGradientEntry>(XGradient(COL_BLACK, COL_WHITE, css::awt::GradientStyle_LINEAR , Degree10(0),10,10, 0,100,100),aStr.toString()));
+ Insert(std::make_unique<XGradientEntry>(XGradient(COL_BLACK, COL_WHITE, css::awt::GradientStyle_LINEAR , 0_deg10,10,10, 0,100,100),aStr.toString()));
aStr[nLen] = '2';
- Insert(std::make_unique<XGradientEntry>(XGradient(COL_BLUE, COL_RED, css::awt::GradientStyle_AXIAL , Degree10(300),20,20,10,100,100),aStr.toString()));
+ Insert(std::make_unique<XGradientEntry>(XGradient(COL_BLUE, COL_RED, css::awt::GradientStyle_AXIAL , 300_deg10,20,20,10,100,100),aStr.toString()));
aStr[nLen] = '3';
- Insert(std::make_unique<XGradientEntry>(XGradient(COL_RED, COL_YELLOW,css::awt::GradientStyle_RADIAL , Degree10(600),30,30,20,100,100),aStr.toString()));
+ Insert(std::make_unique<XGradientEntry>(XGradient(COL_RED, COL_YELLOW,css::awt::GradientStyle_RADIAL , 600_deg10,30,30,20,100,100),aStr.toString()));
aStr[nLen] = '4';
- Insert(std::make_unique<XGradientEntry>(XGradient(COL_YELLOW , COL_GREEN, css::awt::GradientStyle_ELLIPTICAL, Degree10(900),40,40,30,100,100),aStr.toString()));
+ Insert(std::make_unique<XGradientEntry>(XGradient(COL_YELLOW , COL_GREEN, css::awt::GradientStyle_ELLIPTICAL, 900_deg10,40,40,30,100,100),aStr.toString()));
aStr[nLen] = '5';
- Insert(std::make_unique<XGradientEntry>(XGradient(COL_GREEN , COL_MAGENTA,css::awt::GradientStyle_SQUARE , Degree10(1200),50,50,40,100,100),aStr.toString()));
+ Insert(std::make_unique<XGradientEntry>(XGradient(COL_GREEN , COL_MAGENTA,css::awt::GradientStyle_SQUARE , 1200_deg10,50,50,40,100,100),aStr.toString()));
aStr[nLen] = '6';
- Insert(std::make_unique<XGradientEntry>(XGradient(COL_MAGENTA, COL_YELLOW ,css::awt::GradientStyle_RECT , Degree10(1900),60,60,50,100,100),aStr.toString()));
+ Insert(std::make_unique<XGradientEntry>(XGradient(COL_MAGENTA, COL_YELLOW ,css::awt::GradientStyle_RECT , 1900_deg10,60,60,50,100,100),aStr.toString()));
return true;
}
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 1c1e0e42ba2b..6c2bb3a4e294 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -67,11 +67,11 @@ bool XHatchList::Create()
aStr.append(" 1");
sal_Int32 nLen = aStr.getLength() - 1;
- Insert(std::make_unique<XHatchEntry>(XHatch(COL_BLACK,css::drawing::HatchStyle_SINGLE,100, Degree10(0)),aStr.toString()));
+ Insert(std::make_unique<XHatchEntry>(XHatch(COL_BLACK,css::drawing::HatchStyle_SINGLE,100, 0_deg10),aStr.toString()));
aStr[nLen] = '2';
- Insert(std::make_unique<XHatchEntry>(XHatch(COL_RED ,css::drawing::HatchStyle_DOUBLE, 80,Degree10(450)),aStr.toString()));
+ Insert(std::make_unique<XHatchEntry>(XHatch(COL_RED ,css::drawing::HatchStyle_DOUBLE, 80,450_deg10),aStr.toString()));
aStr[nLen] = '3';
- Insert(std::make_unique<XHatchEntry>(XHatch(COL_BLUE ,css::drawing::HatchStyle_TRIPLE,120, Degree10(0)),aStr.toString()));
+ Insert(std::make_unique<XHatchEntry>(XHatch(COL_BLUE ,css::drawing::HatchStyle_TRIPLE,120, 0_deg10),aStr.toString()));
return true;
}
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 1d59814cd810..61a6e982edb6 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -493,7 +493,7 @@ void InitCore()
aAttrTab[ RES_CHRATR_CTL_POSTURE - POOLATTR_BEGIN ] = new SvxPostureItem(ITALIC_NONE, RES_CHRATR_CTL_POSTURE );
aAttrTab[ RES_CHRATR_CTL_WEIGHT - POOLATTR_BEGIN ] = new SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_CTL_WEIGHT );
- aAttrTab[ RES_CHRATR_ROTATE - POOLATTR_BEGIN ] = new SvxCharRotateItem( Degree10(0), false, RES_CHRATR_ROTATE );
+ aAttrTab[ RES_CHRATR_ROTATE - POOLATTR_BEGIN ] = new SvxCharRotateItem( 0_deg10, false, RES_CHRATR_ROTATE );
aAttrTab[ RES_CHRATR_EMPHASIS_MARK - POOLATTR_BEGIN ] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, RES_CHRATR_EMPHASIS_MARK );
aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( false, 0, 0, RES_CHRATR_TWO_LINES );
aAttrTab[ RES_CHRATR_SCALEW - POOLATTR_BEGIN ] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW );
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 7a364b2ee83a..2813f162f1f6 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -133,7 +133,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell)
if( 0 > nTmpY )
{
nTmpY = -nTmpY;
- m_aTextCursor.SetOrientation( Degree10(900) );
+ m_aTextCursor.SetOrientation( 900_deg10 );
aRect = SwRect( m_pCursorShell->m_aCharRect.Pos(),
Size( m_pCursorShell->m_aCharRect.Height(), nTmpY ) );
aRect.Pos().setX(aRect.Pos().getX() + m_pCursorShell->m_aCursorHeight.getX());
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 68f122f443de..a8da344f1e5e 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1604,7 +1604,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
}
break;
case RES_POOLCHR_VERT_NUM:
- aSet.Put( SvxCharRotateItem( Degree10(900), false, RES_CHRATR_ROTATE ) );
+ aSet.Put( SvxCharRotateItem( 900_deg10, false, RES_CHRATR_ROTATE ) );
break;
case RES_POOLFRM_FRAME:
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index e30d03816da5..c5d29692719f 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -772,7 +772,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
// 2. attribute is active
if ( !bRuby && static_cast<const SvxTwoLinesItem&>(rItem).GetValue() )
{
- rFnt.SetVertical( Degree10(0), m_bVertLayout );
+ rFnt.SetVertical( 0_deg10, m_bVertLayout );
break;
}
@@ -798,7 +798,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, bool bPush )
break;
}
case RES_TXTATR_CJK_RUBY :
- rFnt.SetVertical( Degree10(0), m_bVertLayout );
+ rFnt.SetVertical( 0_deg10, m_bVertLayout );
break;
case RES_TXTATR_REFMARK :
if ( bPush )
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 706d265ab43e..1a402d842030 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -132,7 +132,7 @@ SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh,
m_pFnt.reset( new SwFont(&pFormat->GetAttrSet(), &pFrame->GetDoc().getIDocumentSettingAccess()) );
m_pFnt->Invalidate();
m_pFnt->ChgPhysFnt( m_pSh, *m_pSh->GetOut() );
- m_pFnt->SetVertical( Degree10(0), pFrame->IsVertical() );
+ m_pFnt->SetVertical( 0_deg10, pFrame->IsVertical() );
}
if( bLineNum )
@@ -550,7 +550,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
pFnt->SetStyleName(OUString(), SwFontScript::Latin);
pFnt->SetCharSet( RTL_TEXTENCODING_SYMBOL, SwFontScript::Latin );
}
- pFnt->SetVertical( Degree10(0), IsVertical() );
+ pFnt->SetVertical( 0_deg10, IsVertical() );
SwFrameSwapper aSwapper( this, true );
SwLayoutModeModifier aLayoutModeModifier( *pSh->GetOut() );
aLayoutModeModifier.Modify( IsRightToLeft() );
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ac0b61f29a79..8d6026886b35 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -607,7 +607,7 @@ SwTransparentTextGuard::~SwTransparentTextGuard()
aVCLGradient.SetStyle(GradientStyle::Linear);
aVCLGradient.SetStartColor(aTransColor);
aVCLGradient.SetEndColor(aTransColor);
- aVCLGradient.SetAngle(Degree10(0));
+ aVCLGradient.SetAngle(0_deg10);
aVCLGradient.SetBorder(0);
aVCLGradient.SetOfsX(0);
aVCLGradient.SetOfsY(0);
@@ -880,7 +880,7 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rTextPaintInfo, const SwLine
// Some of the current values are set at the font:
if ( ! bRotate )
- s_aFnt.SetVertical( Degree10(0), rTextPaintInfo.GetTextFrame()->IsVertical() );
+ s_aFnt.SetVertical( 0_deg10, rTextPaintInfo.GetTextFrame()->IsVertical() );
else
s_aFnt.SetVertical( pOldFnt->GetOrientation() );
@@ -896,11 +896,11 @@ static void lcl_DrawSpecial( const SwTextPaintInfo& rTextPaintInfo, const SwLine
// The maximum width depends on the current orientation
const Degree10 nDir = s_aFnt.GetOrientation( rTextPaintInfo.GetTextFrame()->IsVertical() );
SwTwips nMaxWidth;
- if (nDir == Degree10(900) || nDir == Degree10(2700))
+ if (nDir == 900_deg10 || nDir == 2700_deg10)
nMaxWidth = rRect.Height();
else
{
- assert(nDir == Degree10(0)); //Unknown direction set at font
+ assert(nDir == 0_deg10); //Unknown direction set at font
nMaxWidth = rRect.Width();
}
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index aa4ba00b8d8d..fdd4e276b951 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1504,7 +1504,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
{
delete pPor;
pPor = new SwRotatedPortion(rInf.GetIdx() + TextFrameIndex(1),
- Degree10(900) == nDir
+ 900_deg10 == nDir
? DIR_BOTTOM2TOP
: DIR_TOP2BOTTOM );
}
@@ -1520,7 +1520,7 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
if ( nDir )
{
delete pPor;
- pPor = new SwRotatedPortion(TextFrameIndex(0), Degree10(900) == nDir
+ pPor = new SwRotatedPortion(TextFrameIndex(0), 900_deg10 == nDir
? DIR_BOTTOM2TOP
: DIR_TOP2BOTTOM );
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 3a6177ef384e..b94d4b7896c9 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -97,7 +97,7 @@ void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf,
bool( ComplexTextLayoutFlags::BiDiRtl & rInf.GetOut()->GetLayoutMode() );
Degree10 nDir = bBidiPor ?
- Degree10(1800) :
+ 1800_deg10 :
rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() );
// pLast == this *only* for the 1st portion in the line so nLastWidth is 0;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 8050303942c2..74c3e22543c9 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -786,7 +786,7 @@ static bool lcl_CheckRotation(const SfxPoolItem *const pItem,
{
if ( pItem )
{
- rValue = static_cast<const SvxCharRotateItem*>(pItem)->GetValue() != Degree10(0);
+ rValue = static_cast<const SvxCharRotateItem*>(pItem)->GetValue() != 0_deg10;
if( !rpRef )
rpRef = static_cast<const SvxCharRotateItem*>(pItem);
else if( static_cast<const SvxCharRotateItem*>(pItem)->GetValue() !=
@@ -1731,7 +1731,7 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
{
// we do not allow any rotation inside a bidi portion
SwFont* pTmpFont = GetInfo().GetFont();
- pTmpFont->SetVertical( Degree10(0), GetInfo().GetTextFrame()->IsVertical() );
+ pTmpFont->SetVertical( 0_deg10, GetInfo().GetTextFrame()->IsVertical() );
}
if( pPor->IsMultiPortion() && static_cast<SwMultiPortion*>(pPor)->IsBidi() )
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index f31c597eac57..6326a2e7c9df 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -293,7 +293,7 @@ SwTwips SwTextFrame::EmptyHeight() const
}
if ( IsVertical() )
- pFnt->SetVertical( Degree10(2700) );
+ pFnt->SetVertical( 2700_deg10 );
OutputDevice* pOut = pSh ? pSh->GetOut() : nullptr;
if ( !pOut || !pSh->GetViewOptions()->getBrowseMode() ||
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 1a0eb5d292bc..8e4a72e6de60 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -405,7 +405,7 @@ void SwDropPortion::Paint( const SwTextPaintInfo &rInf ) const
if ( rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() ) )
{
pTmpFont.reset(new SwFont( *rInf.GetFont() ));
- pTmpFont->SetVertical( Degree10(0), rInf.GetTextFrame()->IsVertical() );
+ pTmpFont->SetVertical( 0_deg10, rInf.GetTextFrame()->IsVertical() );
}
SwFontSave aFontSave( rInf, pTmpFont.get() );
@@ -620,7 +620,7 @@ SwDropPortion *SwTextFormatter::NewDropPortion( SwTextFormatInfo &rInf )
}
// we do not allow a vertical font for the drop portion
- pTmpFnt->SetVertical( Degree10(0), rInf.GetTextFrame()->IsVertical() );
+ pTmpFnt->SetVertical( 0_deg10, rInf.GetTextFrame()->IsVertical() );
// find next attribute change / script change
const TextFrameIndex nTmpIdx = nNextChg;
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index e62fd8d17b87..56ae1a0c1ceb 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -358,7 +358,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf )
// #95477# Rotated tab stops get the width of one blank
const Degree10 nDir = rInf.GetFont()->GetOrientation( rInf.GetTextFrame()->IsVertical() );
- if( ! bFull && Degree10(0) == nDir )
+ if( ! bFull && 0_deg10 == nDir )
{
const PortionType nWhich = GetWhichPor();
switch( nWhich )
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 7f2e65230e65..5b8661b4cf5a 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -296,7 +296,7 @@ static void lcl_calcLinePos( const CalcLinePosData &rData,
sal_Int32 nKernStart = nStart ? rData.pKernArray[sal_Int32(nStart) - 1] : 0;
sal_Int32 nKernEnd = rData.pKernArray[sal_Int32(nEnd) - 1];
- const Degree10 nDir = rData.bBidiPor ? Degree10(1800)
+ const Degree10 nDir = rData.bBidiPor ? 1800_deg10
: UnMapDirection(rData.rFont.GetOrientation(),
rData.bSwitchH2V, rData.bSwitchH2VLRBT);
@@ -1736,7 +1736,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
tools::Long nKernVal = pKernArray[sal_Int32(rInf.GetLen()) - 1];
const Degree10 nDir = bBidiPor
- ? Degree10(1800)
+ ? 1800_deg10
: UnMapDirection(GetFont().GetOrientation(),
bSwitchH2V, bSwitchH2VLRBT);
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 2a2801c0517e..c1b94840d060 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -311,9 +311,9 @@ sal_uInt16 SwFont::CalcShadowSpace(const SvxShadowItemSide nShadow, const bool b
case SvxShadowItemSide::TOP:
if(( aLoc == SvxShadowLocation::TopLeft ||
aLoc == SvxShadowLocation::TopRight ) &&
- ( nOrient == Degree10(0) || nOrient == Degree10(1800) ||
- ( nOrient == Degree10(900) && !bSkipRight ) ||
- ( nOrient == Degree10(2700) && !bSkipLeft )))
+ ( nOrient == 0_deg10 || nOrient == 1800_deg10 ||
+ ( nOrient == 900_deg10 && !bSkipRight ) ||
+ ( nOrient == 2700_deg10 && !bSkipLeft )))
{
nSpace = m_nShadowWidth;
}
@@ -322,9 +322,9 @@ sal_uInt16 SwFont::CalcShadowSpace(const SvxShadowItemSide nShadow, const bool b
case SvxShadowItemSide::BOTTOM:
if(( aLoc == SvxShadowLocation::BottomLeft ||
aLoc == SvxShadowLocation::BottomRight ) &&
- ( nOrient == Degree10(0) || nOrient == Degree10(1800) ||
- ( nOrient == Degree10(900) && !bSkipLeft ) ||
- ( nOrient == Degree10(2700) && !bSkipRight )))
+ ( nOrient == 0_deg10 || nOrient == 1800_deg10 ||
+ ( nOrient == 900_deg10 && !bSkipLeft ) ||
+ ( nOrient == 2700_deg10 && !bSkipRight )))
{
nSpace = m_nShadowWidth;
}
@@ -333,9 +333,9 @@ sal_uInt16 SwFont::CalcShadowSpace(const SvxShadowItemSide nShadow, const bool b
case SvxShadowItemSide::LEFT:
if(( aLoc == SvxShadowLocation::TopLeft ||
aLoc == SvxShadowLocation::BottomLeft ) &&
- ( nOrient == Degree10(900) || nOrient == Degree10(2700) ||
- ( nOrient == Degree10(0) && !bSkipLeft ) ||
- ( nOrient == Degree10(1800) && !bSkipRight )))
+ ( nOrient == 900_deg10 || nOrient == 2700_deg10 ||
+ ( nOrient == 0_deg10 && !bSkipLeft ) ||
+ ( nOrient == 1800_deg10 && !bSkipRight )))
{
nSpace = m_nShadowWidth;
}
@@ -344,9 +344,9 @@ sal_uInt16 SwFont::CalcShadowSpace(const SvxShadowItemSide nShadow, const bool b
case SvxShadowItemSide::RIGHT:
if(( aLoc == SvxShadowLocation::TopRight ||
aLoc == SvxShadowLocation::BottomRight ) &&
- ( nOrient == Degree10(900) || nOrient == Degree10(2700) ||
- ( nOrient == Degree10(0) && !bSkipRight ) ||
- ( nOrient == Degree10(1800) && !bSkipLeft )))
+ ( nOrient == 900_deg10 || nOrient == 2700_deg10 ||
+ ( nOrient == 0_deg10 && !bSkipRight ) ||
+ ( nOrient == 1800_deg10 && !bSkipLeft )))
{
nSpace = m_nShadowWidth;
}
@@ -368,15 +368,15 @@ static Degree10 MapDirection(Degree10 nDir, const bool bVertFormat, const bool b
{
case 0 :
if (bVertFormatLRBT)
- nDir = Degree10(900);
+ nDir = 900_deg10;
else
- nDir = Degree10(2700);
+ nDir = 2700_deg10;
break;
case 900 :
- nDir = Degree10(0);
+ nDir = 0_deg10;
break;
case 2700 :
- nDir = Degree10(1800);
+ nDir = 1800_deg10;
break;
#if OSL_DEBUG_LEVEL > 0
default :
@@ -397,7 +397,7 @@ Degree10 UnMapDirection(Degree10 nDir, const bool bVertFormat, const bool bVertF
switch (nDir.get())
{
case 900:
- nDir = Degree10(0);
+ nDir = 0_deg10;
break;
default:
SAL_WARN("sw.core", "unsupported direction for VertLRBT");
@@ -411,13 +411,13 @@ Degree10 UnMapDirection(Degree10 nDir, const bool bVertFormat, const bool bVertF
switch ( nDir.get() )
{
case 0 :
- nDir = Degree10(900);
+ nDir = 900_deg10;
break;
case 1800 :
- nDir = Degree10(2700);
+ nDir = 2700_deg10;
break;
case 2700 :
- nDir = Degree10(0);
+ nDir = 0_deg10;
break;
#if OSL_DEBUG_LEVEL > 0
default :
@@ -695,7 +695,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
if( SfxItemState::SET ==
pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, true, &pTwoLinesItem ))
if ( static_cast<const SvxTwoLinesItem*>(pTwoLinesItem)->GetValue() )
- SetVertical( Degree10(0) );
+ SetVertical( 0_deg10 );
}
else
{
@@ -882,7 +882,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
if ( ! rTwoLinesItem.GetValue() )
SetVertical( pAttrSet->GetCharRotate().GetValue() );
else
- SetVertical( Degree10(0) );
+ SetVertical( 0_deg10 );
if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66 ))
{
m_aSub[ SwFontScript::Latin ].m_bSmallCapsPercentage66 = true;
@@ -1473,7 +1473,7 @@ void SwDrawTextInfo::Shift( Degree10 nDir )
bVert = GetFrame()->IsVertical();
bVertLRBT = GetFrame()->IsVertLRBT();
}
- nDir = bBidiPor ? Degree10(1800) : UnMapDirection(nDir, bVert, bVertLRBT);
+ nDir = bBidiPor ? 1800_deg10 : UnMapDirection(nDir, bVert, bVertLRBT);
switch ( nDir.get() )
{
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index bc2955566213..fb5eac573767 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4698,7 +4698,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
break;
case RES_CHRATR_ROTATE:
- bMustWrite = static_cast< const SvxCharRotateItem& >(rHt).GetValue() != Degree10(0);
+ bMustWrite = static_cast< const SvxCharRotateItem& >(rHt).GetValue() != 0_deg10;
break;
case RES_CHRATR_EMPHASIS_MARK:
bMustWrite = static_cast< const SvxEmphasisMarkItem& >(rHt).GetEmphasisMark() != FontEmphasisMark::NONE;
@@ -9149,7 +9149,7 @@ void DocxAttributeOutput::FormatFillGradient( const XFillGradientItem& rFillGrad
// /oox/source/vml/vmlformatting.cxx :: FillModel::pushToPropMap
// and also in
// /oox/source/drawingml/fillproperties.cxx :: FillProperties::pushToPropMap
- sal_Int32 nReverseAngle = (Degree10(4500) - rGradient.GetAngle()).get();
+ sal_Int32 nReverseAngle = (4500_deg10 - rGradient.GetAngle()).get();
nReverseAngle = nReverseAngle / 10;
nReverseAngle = (270 - nReverseAngle) % 360;
if (nReverseAngle != 0)
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index e325f331f6f0..70f2cd9c6f48 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2076,11 +2076,11 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR
if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem))
{
const SvxCharRotateItem * pRotate = static_cast<const SvxCharRotateItem*>(pRotItem);
- if(pRotate && pRotate->GetValue() == Degree10(900))
+ if(pRotate && pRotate->GetValue() == 900_deg10)
{
nFlags = nFlags | 0x0004 | 0x0008;
}
- else if(pRotate && pRotate->GetValue() == Degree10(2700) )
+ else if(pRotate && pRotate->GetValue() == 2700_deg10 )
{
nFlags = nFlags | 0x0004 | 0x0010;
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 0f812f917a0c..fe4a3ec91d61 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3566,7 +3566,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData
case 1: // rotated characters
{
bool bFitToLine = 0 != *(pData+1);
- NewAttr( SvxCharRotateItem( Degree10(900), bFitToLine, RES_CHRATR_ROTATE ));
+ NewAttr( SvxCharRotateItem( 900_deg10, bFitToLine, RES_CHRATR_ROTATE ));
}
break;
}
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 961053559eba..b69effc8542d 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -467,7 +467,7 @@ void SwView::GetState(SfxItemSet &rSet)
{
SfxImageItem aImageItem(nWhich);
if(m_pWrtShell->IsInVerticalText())
- aImageItem.SetRotation( Degree10(2700) );
+ aImageItem.SetRotation( 2700_deg10 );
if(m_pWrtShell->IsInRightToLeftText())
aImageItem.SetMirrored( true );
rSet.Put(aImageItem);
diff --git a/tools/source/generic/point.cxx b/tools/source/generic/point.cxx
index 13171a070228..7308d25f7878 100644
--- a/tools/source/generic/point.cxx
+++ b/tools/source/generic/point.cxx
@@ -36,23 +36,23 @@ void Point::RotateAround( tools::Long& rX, tools::Long& rY,
const tools::Long nOriginX = X();
const tools::Long nOriginY = Y();
- if ( (nOrientation >= Degree10(0)) && !(nOrientation % Degree10(900)) )
+ if ( (nOrientation >= 0_deg10) && !(nOrientation % 900_deg10) )
{
- if ( nOrientation >= Degree10(3600) )
- nOrientation %= Degree10(3600);
+ if ( nOrientation >= 3600_deg10 )
+ nOrientation %= 3600_deg10;
if ( nOrientation )
{
rX -= nOriginX;
rY -= nOriginY;
- if ( nOrientation == Degree10(900) )
+ if ( nOrientation == 900_deg10 )
{
tools::Long nTemp = rX;
rX = rY;
rY = -nTemp;
}
- else if ( nOrientation == Degree10(1800) )
+ else if ( nOrientation == 1800_deg10 )
{
rX = -rX;
rY = -rY;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index f4631dfb1d86..7e09e2a75566 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1398,7 +1398,7 @@ void Polygon::Scale( double fScaleX, double fScaleY )
void Polygon::Rotate( const Point& rCenter, Degree10 nAngle10 )
{
- nAngle10 %= Degree10(3600);
+ nAngle10 %= 3600_deg10;
if( nAngle10 )
{
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 8825ad049841..285044b6fcc6 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -257,7 +257,7 @@ void PolyPolygon::Scale( double fScaleX, double fScaleY )
void PolyPolygon::Rotate( const Point& rCenter, Degree10 nAngle10 )
{
- nAngle10 %= Degree10(3600);
+ nAngle10 %= 3600_deg10;
if( nAngle10 )
{
diff --git a/vcl/backendtest/outputdevice/gradient.cxx b/vcl/backendtest/outputdevice/gradient.cxx
index ec5e9079e028..ebb94fbaaf9b 100644
--- a/vcl/backendtest/outputdevice/gradient.cxx
+++ b/vcl/backendtest/outputdevice/gradient.cxx
@@ -18,7 +18,7 @@ Bitmap OutputDeviceTestGradient::setupLinearGradient()
initialSetup(12, 12, constBackgroundColor);
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
- aGradient.SetAngle(Degree10(900));
+ aGradient.SetAngle(900_deg10);
tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
@@ -31,7 +31,7 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientAngled()
initialSetup(12, 12, constBackgroundColor);
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
- aGradient.SetAngle(Degree10(450));
+ aGradient.SetAngle(450_deg10);
tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
@@ -70,7 +70,7 @@ Bitmap OutputDeviceTestGradient::setupLinearGradientSteps()
initialSetup(12, 12, constBackgroundColor);
Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
- aGradient.SetAngle(Degree10(900));
+ aGradient.SetAngle(900_deg10);
aGradient.SetSteps(4);
tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
@@ -84,7 +84,7 @@ Bitmap OutputDeviceTestGradient::setupAxialGradient()
initialSetup(13, 13, constBackgroundColor);
Gradient aGradient(GradientStyle::Axial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
- aGradient.SetAngle(Degree10(900));
+ aGradient.SetAngle(900_deg10);
tools::Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 40e2ad1542b1..825da3e5f415 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1947,7 +1947,7 @@ bool SvpSalGraphics::drawGradient(const tools::PolyPolygon& rPolyPolygon, const
tools::Rectangle aBoundRect;
Point aCenter;
- aGradient.SetAngle(aGradient.GetAngle() + Degree10(2700));
+ aGradient.SetAngle(aGradient.GetAngle() + 2700_deg10);
aGradient.GetBoundRect(aInputRect, aBoundRect, aCenter);
Color aStartColor = aGradient.GetStartColor();
Color aEndColor = aGradient.GetEndColor();
@@ -1956,7 +1956,7 @@ bool SvpSalGraphics::drawGradient(const tools::PolyPolygon& rPolyPolygon, const
if (rGradient.GetStyle() == GradientStyle::Linear)
{
tools::Polygon aPoly(aBoundRect);
- aPoly.Rotate(aCenter, aGradient.GetAngle() % Degree10(3600));
+ aPoly.Rotate(aCenter, aGradient.GetAngle() % 3600_deg10);
pattern = cairo_pattern_create_linear(aPoly[0].X(), aPoly[0].Y(), aPoly[1].X(), aPoly[1].Y());
}
else
diff --git a/vcl/qa/cppunit/TypeSerializerTest.cxx b/vcl/qa/cppunit/TypeSerializerTest.cxx
index fd45662bdf20..6b3445032309 100644
--- a/vcl/qa/cppunit/TypeSerializerTest.cxx
+++ b/vcl/qa/cppunit/TypeSerializerTest.cxx
@@ -87,7 +87,7 @@ TypeSerializerTest::~TypeSerializerTest()
void TypeSerializerTest::testGradient()
{
Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0x00, 0x00), Color(0x00, 0xFF, 0x00));
- aGradient.SetAngle(Degree10(900));
+ aGradient.SetAngle(900_deg10);
aGradient.SetBorder(5);
aGradient.SetOfsX(11);
aGradient.SetOfsY(12);
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 454a58b75d0c..6a435c708807 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -1287,7 +1287,7 @@ void SvmTest::testHatch()
tools::PolyPolygon aPolyPolygon(1);
aPolyPolygon.Insert(aPolygon);
- Hatch aHatch(HatchStyle::Single, COL_YELLOW, 15, Degree10(900));
+ Hatch aHatch(HatchStyle::Single, COL_YELLOW, 15, 900_deg10);
pVirtualDev->DrawHatch(aPolyPolygon, aHatch);
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 50bae31399ef..cfd148e8415e 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -305,7 +305,7 @@ void Qt5Graphics::DrawTextLayout(const GenericSalLayout& rLayout)
= static_cast<Qt5CommonSalLayout*>(const_cast<GenericSalLayout*>(&rLayout));
Degree10 nOrientation = rLayout.GetOrientation();
if (nOrientation)
- pQt5Layout->SetOrientation(Degree10(0));
+ pQt5Layout->SetOrientation(0_deg10);
Point aPos;
const GlyphItem* pGlyph;
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 773bdd2be1bf..9e7a441d3b86 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1880,7 +1880,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon,
Gradient aGradient(rGradient);
tools::Rectangle aBoundRect;
Point aCenter;
- aGradient.SetAngle(aGradient.GetAngle() + Degree10(2700));
+ aGradient.SetAngle(aGradient.GetAngle() + 2700_deg10);
aGradient.GetBoundRect(boundRect, aBoundRect, aCenter);
SkColor startColor
@@ -1891,7 +1891,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon,
if (rGradient.GetStyle() == GradientStyle::Linear)
{
tools::Polygon aPoly(aBoundRect);
- aPoly.Rotate(aCenter, aGradient.GetAngle() % Degree10(3600));
+ aPoly.Rotate(aCenter, aGradient.GetAngle() % 3600_deg10);
SkPoint points[2] = { SkPoint::Make(toSkX(aPoly[0].X()), toSkY(aPoly[0].Y())),
SkPoint::Make(toSkX(aPoly[1].X()), toSkY(aPoly[1].Y())) };
SkColor colors[2] = { startColor, endColor };
@@ -1901,7 +1901,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon,
else if (rGradient.GetStyle() == GradientStyle::Axial)
{
tools::Polygon aPoly(aBoundRect);
- aPoly.Rotate(aCenter, aGradient.GetAngle() % Degree10(3600));
+ aPoly.Rotate(aCenter, aGradient.GetAngle() % 3600_deg10);
SkPoint points[2] = { SkPoint::Make(toSkX(aPoly[0].X()), toSkY(aPoly[0].Y())),
SkPoint::Make(toSkX(aPoly[1].X()), toSkY(aPoly[1].Y())) };
SkColor colors[3] = { endColor, startColor, endColor };
@@ -1985,7 +1985,7 @@ void SkiaSalGraphicsImpl::drawGenericLayout(const GenericSalLayout& layout, Colo
{
angle = layout.GetOrientation();
if (pGlyph->IsVertical())
- angle += Degree10(900); // 90 degree
+ angle += 900_deg10; // 90 degree
}
SkRSXform form = SkRSXform::Make(toCos(angle), toSin(angle), aPos.X(), aPos.Y());
glyphForms.emplace_back(std::move(form));
diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx
index 98c4a37a435a..98d50d5f87bc 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -212,12 +212,12 @@ bool Bitmap::Rotate(Degree10 nAngle10, const Color& rFillColor)
{
bool bRet = false;
- nAngle10 %= Degree10(3600);
- nAngle10 = (nAngle10 < Degree10(0)) ? (Degree10(3599) + nAngle10) : nAngle10;
+ nAngle10 %= 3600_deg10;
+ nAngle10 = (nAngle10 < 0_deg10) ? (Degree10(3599) + nAngle10) : nAngle10;
if (!nAngle10)
bRet = true;
- else if (nAngle10 == Degree10(1800))
+ else if (nAngle10 == 1800_deg10)
bRet = Mirror(BmpMirrorFlags::Horizontal | BmpMirrorFlags::Vertical);
else
{
@@ -228,7 +228,7 @@ bool Bitmap::Rotate(Degree10 nAngle10, const Color& rFillColor)
{
const Size aSizePix(GetSizePixel());
- if (nAngle10 == Degree10(900) || nAngle10 == Degree10(2700))
+ if (nAngle10 == 900_deg10 || nAngle10 == 2700_deg10)
{
const Size aNewSizePix(aSizePix.Height(), aSizePix.Width());
Bitmap aNewBmp(aNewSizePix, GetBitCount(), &pReadAcc->GetPalette());
@@ -243,7 +243,7 @@ bool Bitmap::Rotate(Degree10 nAngle10, const Color& rFillColor)
const tools::Long nNewWidth = aNewSizePix.Width();
const tools::Long nNewHeight = aNewSizePix.Height();
- if (nAngle10 == Degree10(900))
+ if (nAngle10 == 900_deg10)
{
for (tools::Long nY = 0, nOtherX = nWidth1; nY < nNewHeight;
nY++, nOtherX--)
@@ -256,7 +256,7 @@ bool Bitmap::Rotate(Degree10 nAngle10, const Color& rFillColor)
}
}
}
- else if (nAngle10 == Degree10(2700))
+ else if (nAngle10 == 2700_deg10)
{
for (tools::Long nY = 0, nOtherX = 0; nY < nNewHeight; nY++, nOtherX++)
{
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index bb9831dcf425..9b8e6242e296 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -507,7 +507,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
tools::Long nWidth = rRenderContext.GetTextWidth(aText);
rRenderContext.Push(PushFlags::FONT);
vcl::Font aFont(rRenderContext.GetFont());
- aFont.SetOrientation(Degree10(900));
+ aFont.SetOrientation(900_deg10);
SetFont(aFont);
Point aStartPt(aOutSize.Width() / 2, aOutSize.Height() - 1);
if (nWinStyle & WB_VCENTER)
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index d1bb5abb547b..b591217edd91 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -38,14 +38,13 @@ GraphicNativeTransform::~GraphicNativeTransform() {}
void GraphicNativeTransform::rotate(Degree10 aInputRotation)
{
// Rotation can be between 0 and 3600
- Degree10 aRotation = aInputRotation % Degree10(3600);
+ Degree10 aRotation = aInputRotation % 3600_deg10;
- if (aRotation == Degree10(0))
+ if (aRotation == 0_deg10)
{
return; // No rotation is needed
}
- else if (aRotation != Degree10(900) && aRotation != Degree10(1800)
- && aRotation != Degree10(2700))
+ else if (aRotation != 900_deg10 && aRotation != 1800_deg10 && aRotation != 2700_deg10)
{
return;
}
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index b8760b63aef7..d23c6025185c 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -53,17 +53,17 @@ Degree10 Exif::getRotation() const
{
switch(maOrientation) {
case exif::TOP_LEFT:
- return Degree10(0);
+ return 0_deg10;
case exif::BOTTOM_RIGHT:
- return Degree10(1800);
+ return 1800_deg10;
case exif::RIGHT_TOP:
- return Degree10(2700);
+ return 2700_deg10;
case exif::LEFT_BOTTOM:
- return Degree10(900);
+ return 900_deg10;
default:
break;
}
- return Degree10(0);
+ return 0_deg10;
}
bool Exif::read(SvStream& rStream)
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index 9610c1268057..876d6dfbb924 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -161,7 +161,7 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt
int nHeightMatch = 0;
int nWidthMatch = 0;
- if( rFSD.mnOrientation != Degree10(0) )
+ if( rFSD.mnOrientation != 0_deg10 )
nMatch += 80;
else if( rFSD.mnWidth != 0 )
nMatch += 25;
diff --git a/vcl/source/font/fontselect.cxx b/vcl/source/font/fontselect.cxx
index 09fb90e8b15f..b592c71670a2 100644
--- a/vcl/source/font/fontselect.cxx
+++ b/vcl/source/font/fontselect.cxx
@@ -46,12 +46,12 @@ FontSelectPattern::FontSelectPattern( const vcl::Font& rFont,
rFont.GetFontAttributes( *this );
// normalize orientation between 0 and 3600
- if( mnOrientation < Degree10(0) || mnOrientation >= Degree10(3600) )
+ if( mnOrientation < 0_deg10 || mnOrientation >= 3600_deg10 )
{
- if( mnOrientation >= Degree10(0) )
- mnOrientation %= Degree10(3600);
+ if( mnOrientation >= 0_deg10 )
+ mnOrientation %= 3600_deg10;
else
- mnOrientation = Degree10(3600) - (-mnOrientation % Degree10(3600));
+ mnOrientation = 3600_deg10 - (-mnOrientation % 3600_deg10);
}
// normalize width and height
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 89390752d185..43cfa3070c1e 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -819,8 +819,8 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
void GDIMetaFile::Rotate( Degree10 nAngle10 )
{
- nAngle10 %= Degree10(3600);
- nAngle10 = ( nAngle10 < Degree10(0) ) ? ( Degree10(3599) + nAngle10 ) : nAngle10;
+ nAngle10 %= 3600_deg10;
+ nAngle10 = ( nAngle10 < 0_deg10 ) ? ( Degree10(3599) + nAngle10 ) : nAngle10;
if( !nAngle10 )
return;
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index b5c331e6953c..a3014abda46d 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -198,7 +198,7 @@ void Gradient::SetSteps( sal_uInt16 nSteps )
void Gradient::GetBoundRect( const tools::Rectangle& rRect, tools::Rectangle& rBoundRect, Point& rCenter ) const
{
tools::Rectangle aRect( rRect );
- Degree10 nAngle = GetAngle() % Degree10(3600);
+ Degree10 nAngle = GetAngle() % 3600_deg10;
if( GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial )
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 87b33685cc51..9b70300e5cc7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6062,9 +6062,9 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
Degree10 nAngle = m_aCurrentPDFState.m_aFont.GetOrientation();
// normalize angles
- while( nAngle < Degree10(0) )
- nAngle += Degree10(3600);
- nAngle = nAngle % Degree10(3600);
+ while( nAngle < 0_deg10 )
+ nAngle += 3600_deg10;
+ nAngle = nAngle % 3600_deg10;
double fAngle = static_cast<double>(nAngle.get()) * M_PI / 1800.0;
Matrix3 aRotScale;
@@ -8300,7 +8300,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject )
tools::Rectangle aBoundRect;
Point aCenter;
- Degree10 nAngle = rObject.m_aGradient.GetAngle() % Degree10(3600);
+ Degree10 nAngle = rObject.m_aGradient.GetAngle() % 3600_deg10;
rObject.m_aGradient.GetBoundRect( aRect, aBoundRect, aCenter );
const bool bLinear = (rObject.m_aGradient.GetStyle() == GradientStyle::Linear);
@@ -8326,7 +8326,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit const & rObject )
tools::Polygon aPoly( 2 );
aPoly[0] = aBoundRect.BottomCenter();
aPoly[1] = aBoundRect.TopCenter();
- aPoly.Rotate( aCenter, Degree10(3600) - nAngle );
+ aPoly.Rotate( aCenter, 3600_deg10 - nAngle );
aLine.append( static_cast<sal_Int32>(aPoly[0].X()) );
aLine.append( " " );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index eaa03d22e5f0..fc3338929ec5 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -562,7 +562,7 @@ Point SalLayout::GetDrawPosition( const Point& rRelative ) const
Point aPos = maDrawBase;
Point aOfs = rRelative + maDrawOffset;
- if( mnOrientation == Degree10(0) )
+ if( mnOrientation == 0_deg10 )
aPos += aOfs;
else
{
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 6b332e5c74fe..444b5441b202 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -282,7 +282,7 @@ bool Wallpaper::IsGradient() const
Gradient Wallpaper::ImplGetApplicationGradient()
{
Gradient g;
- g.SetAngle( Degree10(900) );
+ g.SetAngle( 900_deg10 );
g.SetStyle( GradientStyle::Linear );
g.SetStartColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
// no 'extreme' gradient when high contrast
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index aa5435d3ad50..ffb2cc776bc5 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -110,7 +110,7 @@ bool lclDrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
if( aGraphic.IsSupportedGraphic() )
{
- const Degree10 nRot10 = rAttr.GetRotation() % Degree10(3600);
+ const Degree10 nRot10 = rAttr.GetRotation() % 3600_deg10;
if( nRot10 )
{
@@ -353,7 +353,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si
if( GetType() != GraphicType::NONE )
{
tools::Polygon aClipPoly( tools::Rectangle( rPt, rSz ) );
- const Degree10 nRot10 = pAttr->GetRotation() % Degree10(3600);
+ const Degree10 nRot10 = pAttr->GetRotation() % 3600_deg10;
const Point aOldOrigin( rPt );
const MapMode aMap100( MapUnit::Map100thMM );
Size aSize100;
diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx
index 4153ff47a6ea..82ce4dd07fcf 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -484,7 +484,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
const Size aSizePixel( rBmpEx.GetSizePixel() );
- if( rAttr.GetRotation() == Degree10(0) || IsAnimated() )
+ if( rAttr.GetRotation() == 0_deg10 || IsAnimated() )
return;
if( !(aSizePixel.Width() && aSizePixel.Height() && rDstSize.Width() && rDstSize.Height()) )
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index ea8e8b1ca703..5e562c259d96 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -265,7 +265,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
// get BoundRect of rotated rectangle
tools::Rectangle aRect;
Point aCenter;
- Degree10 nAngle = rGradient.GetAngle() % Degree10(3600);
+ Degree10 nAngle = rGradient.GetAngle() % 3600_deg10;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -470,7 +470,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
tools::Long nRedSteps = nEndRed - nStartRed;
tools::Long nGreenSteps = nEndGreen - nStartGreen;
tools::Long nBlueSteps = nEndBlue - nStartBlue;
- Degree10 nAngle = rGradient.GetAngle() % Degree10(3600);
+ Degree10 nAngle = rGradient.GetAngle() % 3600_deg10;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -623,7 +623,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
// get BoundRect of rotated rectangle
tools::Rectangle aRect;
Point aCenter;
- Degree10 nAngle = rGradient.GetAngle() % Degree10(3600);
+ Degree10 nAngle = rGradient.GetAngle() % 3600_deg10;
rGradient.GetBoundRect( rRect, aRect, aCenter );
@@ -820,7 +820,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
tools::Long nRedSteps = nEndRed - nStartRed;
tools::Long nGreenSteps = nEndGreen - nStartGreen;
tools::Long nBlueSteps = nEndBlue - nStartBlue;
- Degree10 nAngle = rGradient.GetAngle() % Degree10(3600);
+ Degree10 nAngle = rGradient.GetAngle() % 3600_deg10;
rGradient.GetBoundRect( rRect, aRect, aCenter );
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index f2d234677331..775253bbba9a 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -187,7 +187,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
if( ( rHatch.GetStyle() == HatchStyle::Double ) || ( rHatch.GetStyle() == HatchStyle::Triple ) )
{
// Double hatch
- CalcHatchValues( aRect, nWidth, rHatch.GetAngle() + Degree10(900), aPt1, aPt2, aInc, aEndPt1 );
+ CalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 900_deg10, aPt1, aPt2, aInc, aEndPt1 );
do
{
DrawHatchLine( tools::Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer.get(), bMtf );
@@ -199,7 +199,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
if( rHatch.GetStyle() == HatchStyle::Triple )
{
// Triple hatch
- CalcHatchValues( aRect, nWidth, rHatch.GetAngle() + Degree10(450), aPt1, aPt2, aInc, aEndPt1 );
+ CalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 450_deg10, aPt1, aPt2, aInc, aEndPt1 );
do
{
DrawHatchLine( tools::Line( aPt1, aPt2 ), rPolyPoly, pPtBuffer.get(), bMtf );
@@ -216,15 +216,15 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
Point aRef;
- Degree10 nAngle = nAngle10 % Degree10(1800);
+ Degree10 nAngle = nAngle10 % 1800_deg10;
tools::Long nOffset = 0;
- if( nAngle > Degree10(900) )
- nAngle -= Degree10(1800);
+ if( nAngle > 900_deg10 )
+ nAngle -= 1800_deg10;
aRef = ( !IsRefPoint() ? rRect.TopLeft() : GetRefPoint() );
- if( Degree10(0) == nAngle )
+ if( 0_deg10 == nAngle )
{
rInc = Size( 0, nDist );
rPt1 = rRect.TopLeft();
@@ -239,7 +239,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
rPt1.AdjustY( -nOffset );
rPt2.AdjustY( -nOffset );
}
- else if( Degree10(900) == nAngle )
+ else if( 900_deg10 == nAngle )
{
rInc = Size( nDist, 0 );
rPt1 = rRect.TopLeft();
@@ -254,7 +254,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
rPt1.AdjustX( -nOffset );
rPt2.AdjustX( -nOffset );
}
- else if( nAngle >= Degree10(-450) && nAngle <= Degree10(450) )
+ else if( nAngle >= Degree10(-450) && nAngle <= 450_deg10 )
{
const double fAngle = F_PI1800 * std::abs( nAngle.get() );
const double fTan = tan( fAngle );
@@ -264,7 +264,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
nDist = FRound( nDist / cos( fAngle ) );
rInc = Size( 0, nDist );
- if( nAngle > Degree10(0) )
+ if( nAngle > 0_deg10 )
{
rPt1 = rRect.TopLeft();
rPt2 = Point( rRect.Right(), rRect.Top() - nYOff );
@@ -297,7 +297,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
nDist = FRound( nDist / sin( fAngle ) );
rInc = Size( nDist, 0 );
- if( nAngle > Degree10(0) )
+ if( nAngle > 0_deg10 )
{
rPt1 = rRect.TopLeft();
rPt2 = Point( rRect.Left() - nXOff, rRect.Bottom() );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 42a753f29e3f..c23f93b5ddfb 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -90,9 +90,9 @@ void OutputDevice::ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY,
if ( nOrientation )
{
// Rotate rect without rounding problems for 90 degree rotations
- if ( !(nOrientation % Degree10(900)) )
+ if ( !(nOrientation % 900_deg10) )
{
- if ( nOrientation == Degree10(900) )
+ if ( nOrientation == 900_deg10 )
{
tools::Long nTemp = nX;
nX = nY;
@@ -102,7 +102,7 @@ void OutputDevice::ImplDrawTextRect( tools::Long nBaseX, tools::Long nBaseY,
nHeight = nTemp;
nY -= nHeight;
}
- else if ( nOrientation == Degree10(1800) )
+ else if ( nOrientation == 1800_deg10 )
{
nX = -nX;
nY = -nY;
@@ -173,7 +173,7 @@ tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout
if ( mpFontInstance->mnOrientation )
{
tools::Long nBaseX = nX, nBaseY = nY;
- if ( !(mpFontInstance->mnOrientation % Degree10(900)) )
+ if ( !(mpFontInstance->mnOrientation % 900_deg10) )
{
tools::Long nX2 = nX+nWidth;
tools::Long nY2 = nY+nHeight;
@@ -225,7 +225,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
const FontSelectPattern& rPattern = mpFontInstance->GetFontSelectPattern();
vcl::Font aFont( GetFont() );
- aFont.SetOrientation( Degree10(0) );
+ aFont.SetOrientation( 0_deg10 );
aFont.SetFontSize( Size( rPattern.mnWidth, rPattern.mnHeight ) );
pVDev->SetFont( aFont );
pVDev->SetTextColor( COL_BLACK );
@@ -1230,7 +1230,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
// set layout options
ImplLayoutArgs aLayoutArgs(rStr, nMinIndex, nEndIndex, nLayoutFlags, maFont.GetLanguageTag(), pLayoutCache);
- Degree10 nOrientation = mpFontInstance ? mpFontInstance->mnOrientation : Degree10(0);
+ Degree10 nOrientation = mpFontInstance ? mpFontInstance->mnOrientation : 0_deg10;
aLayoutArgs.SetOrientation( nOrientation );
aLayoutArgs.SetLayoutWidth( nPixelWidth );
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 18773be22698..c8e9b5ab14ed 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -332,7 +332,7 @@ vcl::Cursor::Cursor()
{
mpData = nullptr;
mpWindow = nullptr;
- mnOrientation = Degree10(0);
+ mnOrientation = 0_deg10;
mnDirection = CursorDirection::NONE;
mnStyle = 0;
mbVisible = false;
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 6ea1182f2b7e..45ac01862829 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -158,7 +158,7 @@ void PrintDialog::PrintPreviewWindow::Paint(vcl::RenderContext& rRenderContext,
{
rRenderContext.Push(PushFlags::FONT);
vcl::Font aFont(rRenderContext.GetFont());
- aFont.SetOrientation(Degree10(900));
+ aFont.SetOrientation(900_deg10);
rRenderContext.SetFont(aFont);
auto nLeft = aOffset.X() - nTextHeight;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 289f9e522954..5f8df0453a20 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1146,7 +1146,7 @@ void ToolBox::ImplInitToolBoxData()
meTextPosition = ToolBoxTextPosition::Right;
mnLastFocusItemId = 0;
mnActivateCount = 0;
- mnImagesRotationAngle = Degree10(0);
+ mnImagesRotationAngle = 0_deg10;
mpStatusListener = new VclStatusListener<ToolBox>(this, ".uno:ImageOrientation");
mpStatusListener->startListening();
@@ -2700,7 +2700,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
bRotate = true;
vcl::Font aRotateFont = aOldFont;
- aRotateFont.SetOrientation( Degree10(2700) );
+ aRotateFont.SetOrientation( 2700_deg10 );
// center horizontally
nTextOffX += aTxtSize.Height();
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 360fa312640d..18cd1481d014 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -94,7 +94,7 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits,
mbBreak = false;
mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = Degree10(0);
+ mnImageAngle = 0_deg10;
mbMirrorMode = false;
mbVisibleText = false;
mbExpand = false;
@@ -978,9 +978,9 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, Degree10 nAngle10 )
ImplToolItem* pItem = &mpData->m_aItems[nPos];
Size aOldSize = pItem->maImage.GetSizePixel();
- Degree10 nDeltaAngle = (nAngle10 - pItem->mnImageAngle) % Degree10(3600);
- while( nDeltaAngle < Degree10(0) )
- nDeltaAngle += Degree10(3600);
+ Degree10 nDeltaAngle = (nAngle10 - pItem->mnImageAngle) % 3600_deg10;
+ while( nDeltaAngle < 0_deg10 )
+ nDeltaAngle += 3600_deg10;
pItem->mnImageAngle = nAngle10;
if( nDeltaAngle && !!pItem->maImage )
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index d3fd5f753983..9cd6afaf7e53 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -91,7 +91,7 @@ namespace
double toRadian(Degree10 nDegree10th)
{
- return (Degree10(3600) - nDegree10th).get() * M_PI / 1800.0;
+ return (3600_deg10 - nDegree10th).get() * M_PI / 1800.0;
}
cairo_t* syncCairoContext(cairo_t* cr)
diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx
index e39e4e331c76..b2ea22adb927 100644
--- a/vcl/unx/generic/print/common_gfx.cxx
+++ b/vcl/unx/generic/print/common_gfx.cxx
@@ -125,7 +125,7 @@ PrinterGfx::Clear()
mnDepth = 24;
mnPSLevel = 2;
mbColor = true;
- mnTextAngle = Degree10(0);
+ mnTextAngle = 0_deg10;
maClipRegion.clear();
maGraphicsStack.clear();
diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx
index f87fe2176f20..d847004ed5ad 100644
--- a/vcl/unx/generic/print/text_gfx.cxx
+++ b/vcl/unx/generic/print/text_gfx.cxx
@@ -90,7 +90,7 @@ void PrinterGfx::DrawGlyph(const Point& rPoint,
PSGSave ();
PSTranslate (rPoint);
PSRotate (nCurrentTextAngle);
- mnTextAngle = Degree10(0);
+ mnTextAngle = 0_deg10;
aPoint = Point( 0, 0 );
}
@@ -114,7 +114,7 @@ void PrinterGfx::DrawGlyph(const Point& rPoint,
maVirtualStatus.mnTextHeight = nTextWidth;
if( aPoint.X() || aPoint.Y() )
PSTranslate( aPoint );
- PSRotate (Degree10(900));
+ PSRotate (900_deg10);
// draw the rotated glyph
drawGlyph(aRotPoint, rGlyph.glyphId());
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 18192be64ed8..cc936cc44f58 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -264,7 +264,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR
Color const aDarkGreen(0, 0x40, 0);
Gradient aGradient(GradientStyle::Linear, aBlack, aWhite);
- aGradient.SetAngle(Degree10(900));
+ aGradient.SetAngle(900_deg10);
rRenderContext.DrawGradient(tools::Rectangle(Point(1000, 4500),
Size(aPaperSize.Width() - 2000, 500)),
aGradient);
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index d0a0aafdf7ea..9b6b719192a6 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -463,7 +463,7 @@ public:
aFontRect.AdjustTop(nHeight/2 );
aFontRect.AdjustBottom(nHeight );
- aFont.SetOrientation(Degree10(450)); // 45 degrees
+ aFont.SetOrientation(450_deg10); // 45 degrees
rDev.SetFont(aFont);
rDev.DrawText(aFontRect, aText);
@@ -679,7 +679,7 @@ public:
case 2:
{
tools::Polygon aPoly(aSub);
- aPoly.Rotate(aSub.Center(), Degree10(450));
+ aPoly.Rotate(aSub.Center(), 450_deg10);
aPoly.Clip(aSmaller);
aRegion = vcl::Region(aPoly);
break;
@@ -1035,7 +1035,7 @@ public:
case 3:
case 0: // 45degree rectangle.
aPoly = tools::Polygon(aPieces[i]);
- aPoly.Rotate(aPieces[i].Center(), Degree10(450));
+ aPoly.Rotate(aPieces[i].Center(), 450_deg10);
break;
case 1: // arc
aPoly = tools::Polygon(aPieces[i],
@@ -1046,7 +1046,7 @@ public:
aPoly = tools::Polygon(aPieces[i],
aPieces[i].GetWidth()/5,
aPieces[i].GetHeight()/5);
- aPoly.Rotate(aPieces[i].Center(), Degree10(450));
+ aPoly.Rotate(aPieces[i].Center(), 450_deg10);
break;
}
aClipRegion = vcl::Region(aPoly);