diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-04-30 13:18:21 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-05-03 11:08:39 +0200 |
commit | 9e3da9e3bc7133972fae76c27f911fc19ca854b1 (patch) | |
tree | d80b17c206f3d2fbf911081c332df44f9ac5cc26 /svx | |
parent | 47cd34a60ff9048404075823e519f1abdd4b0e9a (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>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdpdf.cxx | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index c6a11c16d73f..806e82ebf5ac 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -85,6 +85,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) { @@ -883,21 +884,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)); @@ -905,7 +907,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)); @@ -922,21 +924,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); } |