diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-08 09:19:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-08 10:01:43 +0000 |
commit | 69a8f89cb90260b2333299451f29ffcdea39d059 (patch) | |
tree | 4f7a38a625c2b32e2a26c395be4137513d9e2256 /svx | |
parent | c52fbc04a9df0f2d894f11ef229d86dcf33edc7b (diff) |
refactor SetTwoLines a little
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/fntctrl.hxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 12 |
2 files changed, 13 insertions, 1 deletions
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; |