summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-09 11:58:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-09 11:58:54 +0100
commit7560f765b32bf9969b89b28c6733faa8098f1809 (patch)
tree36c24f5ed6c1a5446179f72d07f03edfdd642a1d /svx
parenta8dd49b9fc59371ff8edb31082bbd4f1b6179b1c (diff)
unify strip previews optimal size in one place
Change-Id: I6ae1073d013c9d9bbca39c505955436cd4950d1b
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx9
-rw-r--r--svx/source/dialog/fntctrl.cxx5
-rw-r--r--svx/source/dialog/measctrl.cxx8
3 files changed, 15 insertions, 7 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index d730ea99c640..14bf9cb505f2 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -20,7 +20,7 @@
#include <tools/shl.hxx>
#include <vcl/builder.hxx>
#include <vcl/svapp.hxx>
-
+#include <sfx2/dialoghelper.hxx>
#include <svx/xtable.hxx>
#include <svx/xpool.hxx>
#include <svx/dialogs.hrc>
@@ -107,7 +107,7 @@ void SvxRectCtl::SetControlSettings(RECT_POINT eRpt, sal_uInt16 nBorder, sal_uIn
Size SvxRectCtl::GetOptimalSize() const
{
- return LogicToPixel(Size(39, 39), MAP_APPFONT);
+ return LogicToPixel(Size(78, 39), MAP_APPFONT);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxRectCtl(Window *pParent, VclBuilder::stringmap &)
@@ -1838,6 +1838,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXLinePreview(Window *pPa
return new SvxXLinePreview(pParent);
}
+Size SvxXLinePreview::GetOptimalSize() const
+{
+ return getPreviewStripSize(this);
+}
+
SvxXLinePreview::~SvxXLinePreview()
{
SdrObject *pFoo = mpLineObjA;
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 04d175b59c7c..fc0e096048be 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sfx2/dialoghelper.hxx>
#include <sfx2/viewsh.hxx> // SfxViewShell
#include <sfx2/printer.hxx> // Printer
#include <vcl/builder.hxx>
@@ -502,14 +503,12 @@ void SvxFontPrevWindow::Init()
SvxFontPrevWindow::SvxFontPrevWindow( Window* pParent, const ResId& rId ) :
Window( pParent, rId )
{
- m_aInitialSize = GetSizePixel();
Init();
}
SvxFontPrevWindow::SvxFontPrevWindow(Window* pParent, WinBits nStyle)
: Window(pParent, nStyle)
{
- m_aInitialSize = LogicToPixel(Size(70 , 27), MapMode(MAP_APPFONT));
Init();
}
@@ -1499,7 +1498,7 @@ void SvxFontPrevWindow::SetFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp,
Size SvxFontPrevWindow::GetOptimalSize() const
{
- return m_aInitialSize;
+ return getPreviewStripSize(this);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 646decbf06d5..1a630eeb3236 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -17,13 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sfx2/dialoghelper.hxx>
#include <svx/svdomeas.hxx>
#include <svx/svdmodel.hxx>
-#include <vcl/builder.hxx>
-
#include "svx/measctrl.hxx"
#include <svx/dialmgr.hxx>
#include "svx/dlgutil.hxx"
+#include <vcl/builder.hxx>
SvxXMeasurePreview::SvxXMeasurePreview( Window* pParent,const ResId& rResId,const SfxItemSet& rInAttrs)
: Control ( pParent, rResId )
@@ -98,6 +98,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXMeasurePreview(Window *
return new SvxXMeasurePreview(pParent, nWinStyle);
}
+Size SvxXMeasurePreview::GetOptimalSize() const
+{
+ return getPreviewStripSize(this);
+}
SvxXMeasurePreview::~SvxXMeasurePreview()
{