summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-12 08:53:09 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-12 20:04:43 +0200
commit5e55d482b19812e2fc3063eb7e718d7013635b33 (patch)
tree3d665136a377c767722df565f8a8bc5e510e6c65 /svx/source
parent6f0f0bbaebfc0added603a04918324df58b6c27b (diff)
cid#1555962 Use of auto that causes a copy
and cid#1556100 Use of auto that causes a copy cid#1556199 Use of auto that causes a copy cid#1556239 Use of auto that causes a copy cid#1556313 Use of auto that causes a copy cid#1556373 Use of auto that causes a copy cid#1556680 Use of auto that causes a copy cid#1557020 Use of auto that causes a copy cid#1557099 Use of auto that causes a copy cid#1557251 Use of auto that causes a copy cid#1557334 Use of auto that causes a copy cid#1557468 Use of auto that causes a copy Change-Id: Ib5ab5b33eabcac3d18899ceaaa9119e13b0139f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170412 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdotxdr.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index b758b75fe59c..b5348094a295 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -44,21 +44,21 @@ void SdrTextObj::AddToHdlList(SdrHdlList& rHdlList) const
{
Point aPnt;
SdrHdlKind eKind = SdrHdlKind::UpperLeft;
- auto aRectangle = getRectangle();
+ const tools::Rectangle rRectangle = getRectangle();
switch (nHdlNum) {
- case 0: aPnt = aRectangle.TopLeft(); eKind=SdrHdlKind::UpperLeft; break;
- case 1: aPnt = aRectangle.TopCenter(); eKind=SdrHdlKind::Upper; break;
- case 2: aPnt = aRectangle.TopRight(); eKind=SdrHdlKind::UpperRight; break;
- case 3: aPnt = aRectangle.LeftCenter(); eKind=SdrHdlKind::Left ; break;
- case 4: aPnt = aRectangle.RightCenter(); eKind=SdrHdlKind::Right; break;
- case 5: aPnt = aRectangle.BottomLeft(); eKind=SdrHdlKind::LowerLeft; break;
- case 6: aPnt = aRectangle.BottomCenter(); eKind=SdrHdlKind::Lower; break;
- case 7: aPnt = aRectangle.BottomRight(); eKind=SdrHdlKind::LowerRight; break;
+ case 0: aPnt = rRectangle.TopLeft(); eKind=SdrHdlKind::UpperLeft; break;
+ case 1: aPnt = rRectangle.TopCenter(); eKind=SdrHdlKind::Upper; break;
+ case 2: aPnt = rRectangle.TopRight(); eKind=SdrHdlKind::UpperRight; break;
+ case 3: aPnt = rRectangle.LeftCenter(); eKind=SdrHdlKind::Left ; break;
+ case 4: aPnt = rRectangle.RightCenter(); eKind=SdrHdlKind::Right; break;
+ case 5: aPnt = rRectangle.BottomLeft(); eKind=SdrHdlKind::LowerLeft; break;
+ case 6: aPnt = rRectangle.BottomCenter(); eKind=SdrHdlKind::Lower; break;
+ case 7: aPnt = rRectangle.BottomRight(); eKind=SdrHdlKind::LowerRight; break;
}
if (maGeo.m_nShearAngle)
- ShearPoint(aPnt, aRectangle.TopLeft(), maGeo.mfTanShearAngle);
+ ShearPoint(aPnt, rRectangle.TopLeft(), maGeo.mfTanShearAngle);
if (maGeo.m_nRotationAngle)
- RotatePoint(aPnt, aRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle);
+ RotatePoint(aPnt, rRectangle.TopLeft(), maGeo.mfSinRotationAngle, maGeo.mfCosRotationAngle);
std::unique_ptr<SdrHdl> pH(new SdrHdl(aPnt,eKind));
pH->SetObj(const_cast<SdrTextObj*>(this));
pH->SetRotationAngle(maGeo.m_nRotationAngle);
@@ -66,7 +66,6 @@ void SdrTextObj::AddToHdlList(SdrHdlList& rHdlList) const
}
}
-
bool SdrTextObj::hasSpecialDrag() const
{
return true;