diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-14 10:40:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-14 16:04:17 +0000 |
commit | 830f44b1ca0e121d3e27a031054313e3f194ab1d (patch) | |
tree | 5e278495b667b8ca36d10770dc07d32134954e80 /svx | |
parent | d652af7d071bb5e5c3f7592d6dc7e7c400e711d3 (diff) |
we only ever want the preferred window size from GetOptimalSize
so remove the MAX and MIN options and simplify the whole lot
Change-Id: Iaaf350c37e01f7fce434af760bcddb9b7d7135ea
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/fntctrl.hxx | 2 | ||||
-rw-r--r-- | svx/inc/svx/pagectrl.hxx | 2 | ||||
-rw-r--r-- | svx/inc/svx/rubydialog.hxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 5 | ||||
-rw-r--r-- | svx/source/dialog/pagectrl.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 6 |
6 files changed, 9 insertions, 16 deletions
diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx index 3df73a88fabc..e801eebaa7b4 100644 --- a/svx/inc/svx/fntctrl.hxx +++ b/svx/inc/svx/fntctrl.hxx @@ -89,7 +89,7 @@ public: void SetFromItemSet( const SfxItemSet &rSet, bool bPreviewBackgroundToCharacter = false ); - virtual Size GetOptimalSize(WindowSizeType eType) const; + virtual Size GetOptimalSize() const; }; #endif // #ifndef _SVX_FNTCTRL_HXX diff --git a/svx/inc/svx/pagectrl.hxx b/svx/inc/svx/pagectrl.hxx index 252d3ae5de44..9a6e2ca90821 100644 --- a/svx/inc/svx/pagectrl.hxx +++ b/svx/inc/svx/pagectrl.hxx @@ -155,7 +155,7 @@ public: void ResetBackground(); - virtual Size GetOptimalSize(WindowSizeType eType) const; + virtual Size GetOptimalSize() const; }; #endif // #ifndef _SVX_PAGECTRL_HXX diff --git a/svx/inc/svx/rubydialog.hxx b/svx/inc/svx/rubydialog.hxx index ea7b313d35c3..f1538a32c3ec 100644 --- a/svx/inc/svx/rubydialog.hxx +++ b/svx/inc/svx/rubydialog.hxx @@ -52,7 +52,7 @@ public: { m_pParentDlg = pParentDlg; } - virtual Size GetOptimalSize(WindowSizeType eType) const; + virtual Size GetOptimalSize() const; }; class SVX_DLLPUBLIC SvxRubyChildWindow : public SfxChildWindow diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index d32ef0aa171d..d40ecb0cdfa3 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -1489,11 +1489,8 @@ void SvxFontPrevWindow::SetFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, Invalidate(); } -Size SvxFontPrevWindow::GetOptimalSize(WindowSizeType eType) const +Size SvxFontPrevWindow::GetOptimalSize() const { - if (eType == WINDOWSIZE_MAXIMUM) - return Window::GetOptimalSize(eType); - return m_aInitialSize; } diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 0fadd16e876b..3dba3d404a54 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -129,7 +129,7 @@ SvxPageWindow::SvxPageWindow( Window* pParent ) : // Count in Twips by default SetMapMode( MapMode( MAP_TWIP ) ); - aWinSize = GetOptimalSize(WINDOWSIZE_PREFERRED); + aWinSize = GetOptimalSize(); aWinSize.Height() -= 4; aWinSize.Width() -= 4; @@ -437,11 +437,9 @@ void SvxPageWindow::ResetBackground() pImpl->bResetBackground = sal_True; } -Size SvxPageWindow::GetOptimalSize(WindowSizeType eType) const +Size SvxPageWindow::GetOptimalSize() const { - if (eType == WINDOWSIZE_PREFERRED) - return LogicToPixel(Size(75, 46), MapMode(MAP_APPFONT)); - return Window::GetOptimalSize(eType); + return LogicToPixel(Size(75, 46), MapMode(MAP_APPFONT)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 8f049b5da8cf..00d0ff002fd6 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -878,11 +878,9 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ ) SetFont(aSaveFont); } -Size RubyPreview::GetOptimalSize(WindowSizeType eType) const +Size RubyPreview::GetOptimalSize() const { - if (eType == WINDOWSIZE_PREFERRED) - return LogicToPixel(Size(215, 50), MapMode(MAP_APPFONT)); - return Window::GetOptimalSize(eType); + return LogicToPixel(Size(215, 50), MapMode(MAP_APPFONT)); } void RubyEdit::GetFocus() |