summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-22 09:08:46 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-22 11:25:38 +0100
commitde4cb026b5fe3ecd1c9557817565cff4ca4e8408 (patch)
tree90072778d17ffc45e394760dc765f5e8d79bffd6 /svx
parent003b2d0c36c62800257c688c65109bf2fc7d4f32 (diff)
Generalize DegreeN
This potentially allows to introduce other degree fractions easily, like Degree<sal_Int64, 60000>, with automatically defined conversion functions. Change-Id: Id1c32d9e029943844bdc833178c1f99387ff87fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dialcontrol.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/svdraw/svdpdf.cxx2
5 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index fe88a426649d..e6c7c8e43b3b 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -77,7 +77,7 @@ void DialControlBmp::DrawElements( const OUString& rText, Degree100 nAngle )
// rotated text
vcl::Font aFont( GetFont() );
aFont.SetColor( GetTextColor() );
- aFont.SetOrientation( toDegree10(nAngle) ); // Font uses 1/10 degrees
+ aFont.SetOrientation( to<Degree10>(nAngle) ); // Font uses 1/10 degrees
aFont.SetWeight( WEIGHT_BOLD );
SetFont( aFont );
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 93c5da9278e1..94d54040cd03 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1051,7 +1051,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
aAttr.Put(XFillColorItem(OUString(), aFnt.GetFillColor()));
pText->SetMergedItemSet(aAttr);
}
- Degree100 nAngle = toDegree100(aFnt.GetOrientation());
+ Degree100 nAngle = to<Degree100>(aFnt.GetOrientation());
if ( nAngle )
pText->SdrAttrObj::NbcRotate(aPos,nAngle);
InsertObj( pText, false );
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 3b1612b15f68..52625388a32e 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1768,7 +1768,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
ShearPoint(aPoly[i],maRect.Center(), fTan );
}
if (maGeo.nRotationAngle)
- aPoly.Rotate( maRect.Center(), toDegree10(maGeo.nRotationAngle) );
+ aPoly.Rotate( maRect.Center(), to<Degree10>(maGeo.nRotationAngle) );
tools::Rectangle aBoundRect( aPoly.GetBoundRect() );
sal_Int32 nXDiff = aBoundRect.Left() - maRect.Left();
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 027301bedb43..67bd14cc8622 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -435,7 +435,7 @@ GraphicAttr SdrGrafObj::GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlag
}
if( bRotate )
- aActAttr.SetRotation( toDegree10(maGeo.nRotationAngle ) );
+ aActAttr.SetRotation( to<Degree10>(maGeo.nRotationAngle ) );
}
return aActAttr;
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 789e5d360477..4fcfb21fca7a 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -834,7 +834,7 @@ void ImpSdrPdfImport::InsertTextObject(const Point& rPos, const Size& rSize, con
aAttr.Put(XFillColorItem(OUString(), aFont.GetFillColor()));
pText->SetMergedItemSet(aAttr);
}
- Degree100 nAngle = toDegree100(aFont.GetOrientation());
+ Degree100 nAngle = to<Degree100>(aFont.GetOrientation());
if (nAngle)
pText->SdrAttrObj::NbcRotate(aPosition, nAngle);
InsertObj(pText, false);