diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2022-06-29 00:06:03 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-07-11 11:06:53 +0200 |
commit | 934985becc567114c3f38a72322056a628aad7c9 (patch) | |
tree | 54530473a4d3a0a5876aff68b3727d51fa4dc88d /sfx2 | |
parent | a19e01812b60580c656cf31619e212803e2ca0fa (diff) |
tools: rename getHeight/Width() to GetOpenHeight/Width()
By default Rectangle uses closed interval, if we really want to use half
open intervals then we should specifically say as such in the name.
Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewitem.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index b7a6ba4adcea..9eea0e1c2488 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -229,7 +229,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rect if (maWelcomeImage.IsEmpty()) { - const tools::Long aWidth(aRect.GetWidth() > aRect.getHeight() ? aRect.GetHeight()/2 : aRect.GetWidth()/2); + const tools::Long aWidth(aRect.GetWidth() > aRect.getOpenHeight() ? aRect.GetHeight()/2 : aRect.GetWidth()/2); maWelcomeImage = SfxApplication::GetApplicationLogo(aWidth); } diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 158c27f29b79..36a33edc086b 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -218,7 +218,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai aTextEngine.SetFont(getVclFontFromFontAttribute(pAttrs->aFontAttr, pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(), 0, css::lang::Locale())); - aTextEngine.SetMaxTextWidth(maDrawArea.getWidth()); + aTextEngine.SetMaxTextWidth(maDrawArea.getOpenWidth()); aTextEngine.SetText(aOrigText); sal_Int32 nPrimitives = rSeq.size(); @@ -240,7 +240,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai double nDotsWidth = aTextDev.getTextWidth("...",0,3); sal_Int32 nLength = nLineLength - 1; - while ( nDotsWidth + aTextDev.getTextWidth(aText, nLineStart, nLength) > maDrawArea.getWidth() && nLength > 0) + while ( nDotsWidth + aTextDev.getTextWidth(aText, nLineStart, nLength) > maDrawArea.getOpenWidth() && nLength > 0) { --nLength; } @@ -249,7 +249,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai nLineLength = nLength + 3; } - double nLineX = maDrawArea.Left() + (maDrawArea.getWidth() - nLineWidth) / 2.0; + double nLineX = maDrawArea.Left() + (maDrawArea.getOpenWidth() - nLineWidth) / 2.0; basegfx::B2DHomMatrix aTextMatrix( createScaleTranslateB2DHomMatrix( pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(), |