summaryrefslogtreecommitdiff
path: root/filter
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 /filter
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>
Diffstat (limited to 'filter')
-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
4 files changed, 9 insertions, 9 deletions
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