diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-17 09:45:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-17 13:35:43 +0100 |
commit | 253f4ad388f3687140c2c5a03f895b326593d728 (patch) | |
tree | a59c8c79eba6255832d83728f1da348e743c8c63 | |
parent | 7a736cd3b7d3bc504dfc2ebea0cb55101d572610 (diff) |
make approximate_char_width private and use approximate_digit_width
Change-Id: I063cb5b9823d374014fd2c8129eba53384b96870
Reviewed-on: https://gerrit.libreoffice.org/85273
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 2 | ||||
-rw-r--r-- | include/vcl/outdev.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 4 | ||||
-rw-r--r-- | starmath/source/view.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 5ac30b14432b..868379bd955c 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -834,7 +834,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) // nLinepPage is not correct if there's a line break sal_Int32 nLinespPage = aPaperSz.Height()/nLineHeight; - long nXTextWidth = pPrinter->approximate_char_width(); + long nXTextWidth = pPrinter->approximate_digit_width(); sal_Int32 nCharspLine = aPaperSz.Width() / std::max<long>(nXTextWidth, 1); const sal_uInt32 nParas = GetEditEngine()->GetParagraphCount(); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index cd3c84d13305..d0578b39095a 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1140,7 +1140,6 @@ public: See also GetTextBoundRect() for more explanation + code examples. */ long GetTextHeight() const; - float approximate_char_width() const; float approximate_digit_width() const; void DrawTextArray( const Point& rStartPt, const OUString& rStr, @@ -1177,6 +1176,7 @@ protected: SAL_DLLPRIVATE void ImplInitAboveTextLineSize(); static SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout ); + SAL_DLLPRIVATE float approximate_char_width() const; private: SAL_DLLPRIVATE void ImplInitTextColor(); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 42b5055b0e5a..f4de034d7877 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -161,10 +161,10 @@ void CustomAnimationPane::initialize() mpLBAnimation->SetSelectHdl(LINK(this, CustomAnimationPane, AnimationSelectHdl)); get(mpCustomAnimationList, "custom_animation_list"); mpCustomAnimationList->setController( dynamic_cast<ICustomAnimationListController*> ( this ) ); - mpCustomAnimationList->set_width_request(mpCustomAnimationList->approximate_char_width() * 16); + mpCustomAnimationList->set_width_request(mpCustomAnimationList->approximate_digit_width() * 15); mpCustomAnimationList->set_height_request(mpCustomAnimationList->GetTextHeight() * 8); - mpLBAnimation->set_width_request(mpLBAnimation->approximate_char_width() * 16); + mpLBAnimation->set_width_request(mpLBAnimation->approximate_digit_width() * 15); mpLBAnimation->set_height_request(mpLBAnimation->GetTextHeight() * 8); get(mpPBMoveUp, "move_up"); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index bb12c5563d70..54e6122c8873 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -923,7 +923,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY ) Size SmViewShell::GetTextLineSize(OutputDevice const & rDevice, const OUString& rLine) { Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight()); - const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_char_width() * 8; + const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_digit_width() * 8; if (nTabPos) { @@ -1005,7 +1005,7 @@ Size SmViewShell::GetTextSize(OutputDevice const & rDevice, const OUString& rTex void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, const OUString& rLine) { Point aPoint(rPosition); - const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_char_width() * 8; + const long nTabPos = rLine.isEmpty() ? 0 : rDevice.approximate_digit_width() * 8; if (nTabPos) { diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 2aa0afdf547d..40a581b4abbe 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3650,8 +3650,8 @@ std::vector<long> SwEntryBrowseBox::GetOptimalColWidths() const { std::vector<long> aWidths; - long nStandardColMinWidth = approximate_char_width() * 16; - long nYesNoWidth = approximate_char_width() * 5; + long nStandardColMinWidth = approximate_digit_width() * 15; + long nYesNoWidth = approximate_digit_width() * 5; nYesNoWidth = std::max(nYesNoWidth, GetTextWidth(m_sYes)); nYesNoWidth = std::max(nYesNoWidth, GetTextWidth(m_sNo)); for (sal_uInt16 i = 1; i < 6; i++) |