summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-04-30 13:18:21 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-06-08 13:43:26 +0200
commitae512835805da05cfa873eebf189fa7a2f927a20 (patch)
tree77cd6bf6ad05f0036a2d51b92814856c353825fd /svx/source/svdraw
parentab95f37716c031e4824ed9ff622ea2a613a56ad3 (diff)
SdrPdfImport: rename some variables to non-abbreviated names
Change-Id: I1cb004a8e426f8ea26bb930d4897db3763433b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93329 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 9e3da9e3bc7133972fae76c27f911fc19ca854b1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95781 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdpdf.cxx28
1 files changed, 15 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index a41caaeaba14..106718a34aa9 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -99,6 +99,7 @@ namespace
/// Here we effectively render at 96 DPI (to match
/// the image rendered in vcl::ImportPDF in pdfread.cxx).
double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; }
+
/// Convert from pixels to logic (twips).
long lcl_ToLogic(double value)
{
@@ -894,21 +895,22 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const OUS
// calc text box size, add 5% to make it fit safely
FontMetric aFontMetric(mpVD->GetFontMetric());
- vcl::Font aFnt(mpVD->GetFont());
- FontAlign eAlg(aFnt.GetAlignment());
+ vcl::Font aFont(mpVD->GetFont());
+ FontAlign eAlignment(aFont.GetAlignment());
// sal_Int32 nTextWidth = static_cast<sal_Int32>(mpVD->GetTextWidth(rStr) * mfScaleX);
sal_Int32 nTextHeight = static_cast<sal_Int32>(mpVD->GetTextHeight() * mfScaleY);
- Point aPos(FRound(rPos.X() * mfScaleX + maOfs.X()), FRound(rPos.Y() * mfScaleY + maOfs.Y()));
+ Point aPosition(FRound(rPos.X() * mfScaleX + maOfs.X()),
+ FRound(rPos.Y() * mfScaleY + maOfs.Y()));
Size aSize(FRound(rSize.Width() * mfScaleX), FRound(rSize.Height() * mfScaleY));
- if (eAlg == ALIGN_BASELINE)
- aPos.AdjustY(-FRound(aFontMetric.GetAscent() * mfScaleY));
- else if (eAlg == ALIGN_BOTTOM)
- aPos.AdjustY(-nTextHeight);
+ if (eAlignment == ALIGN_BASELINE)
+ aPosition.AdjustY(-FRound(aFontMetric.GetAscent() * mfScaleY));
+ else if (eAlignment == ALIGN_BOTTOM)
+ aPosition.AdjustY(-nTextHeight);
- tools::Rectangle aTextRect(aPos, aSize);
+ tools::Rectangle aTextRect(aPosition, aSize);
SdrRectObj* pText = new SdrRectObj(*mpModel, OBJ_TEXT, aTextRect);
pText->SetMergedItem(makeSdrTextUpperDistItem(0));
@@ -916,7 +918,7 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const OUS
pText->SetMergedItem(makeSdrTextRightDistItem(0));
pText->SetMergedItem(makeSdrTextLeftDistItem(0));
- if (aFnt.GetAverageFontWidth())
+ if (aFont.GetAverageFontWidth())
{
pText->ClearMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH);
pText->SetMergedItem(makeSdrTextAutoGrowHeightItem(false));
@@ -933,21 +935,21 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const OUS
SetAttributes(pText, true);
pText->SetSnapRect(aTextRect);
- if (!aFnt.IsTransparent())
+ if (!aFont.IsTransparent())
{
SfxItemSet aAttr(*mpFillAttr->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
aAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID));
- aAttr.Put(XFillColorItem(OUString(), aFnt.GetFillColor()));
+ aAttr.Put(XFillColorItem(OUString(), aFont.GetFillColor()));
pText->SetMergedItemSet(aAttr);
}
- sal_uInt32 nAngle = aFnt.GetOrientation();
+ sal_uInt32 nAngle = aFont.GetOrientation();
if (nAngle)
{
nAngle *= 10;
double a = nAngle * F_PI18000;
double nSin = sin(a);
double nCos = cos(a);
- pText->NbcRotate(aPos, nAngle, nSin, nCos);
+ pText->NbcRotate(aPosition, nAngle, nSin, nCos);
}
InsertObj(pText, false);
}