From 69a8f89cb90260b2333299451f29ffcdea39d059 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 8 Nov 2011 09:19:23 +0000 Subject: refactor SetTwoLines a little --- svx/inc/svx/fntctrl.hxx | 2 ++ svx/source/dialog/fntctrl.cxx | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx index 723c2fd21f46..f625d6eb686e 100644 --- a/svx/inc/svx/fntctrl.hxx +++ b/svx/inc/svx/fntctrl.hxx @@ -78,6 +78,8 @@ public: void SetDrawBaseLine( sal_Bool bSet = sal_True ); void Paint( const Rectangle& ); + sal_Bool IsTwoLines() const; + void SetTwoLines(sal_Bool bSet); void SetNoLines(sal_Bool bSet); void SetBrackets(sal_Unicode cStart, sal_Unicode cEnd); diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 4c795fcd8b8f..33971f81cf3d 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -760,7 +760,7 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) long nStdAscent = pImpl->nAscent; nY += nStdAscent; - if(pImpl->bTwoLines) + if (IsTwoLines()) { SvxFont aSmallFont( rFont ); Size aOldSize = pImpl->aCJKFont.GetSize(); @@ -838,6 +838,16 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) } } +sal_Bool SvxFontPrevWindow::IsTwoLines() const +{ + return pImpl->bTwoLines; +} + +void SvxFontPrevWindow::SetTwoLines(sal_Bool bSet) +{ + pImpl->bTwoLines = bSet; +} + void SvxFontPrevWindow::SetNoLines(sal_Bool bSet) { pImpl->bNoLines = bSet; -- cgit