summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg/docprev.cxx
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-06-20 02:35:05 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-23 12:14:14 +0000
commit9701a7ca9858f6a286a7c75fa83dcb5d89cb5033 (patch)
tree402685e9f51061295ea1dcd14dceed482b32e83b /sd/source/ui/dlg/docprev.cxx
parent707a648eb3d8b8c216d4ee1d1f738552c6ac50a0 (diff)
Convert DLG_ASS to .ui
Change-Id: I29ee55654391f24399aea24fc02c49c430c4e839 Reviewed-on: https://gerrit.libreoffice.org/9834 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/dlg/docprev.cxx')
-rw-r--r--sd/source/ui/dlg/docprev.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index c939d18e6436..6c15a684204a 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/presentation/FadeEffect.hpp>
#include <fadedef.h>
#include <vcl/ctrl.hxx>
+#include <vcl/builder.hxx>
#include <vcl/settings.hxx>
#include <svx/svdoutl.hxx>
#include <svx/svdpagv.hxx>
@@ -60,8 +61,19 @@ void SdDocPreviewWin::SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage
updateViewSettings();
}
-SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId )
-: Control(pParent, rResId), pMetaFile( 0 ), bInEffect(false), mpObj(NULL), mnShowPage(0)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSdDocPreviewWin(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ WinBits nWinStyle = 0;
+
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinStyle |= WB_BORDER;
+
+ return new SdDocPreviewWin(pParent, nWinStyle);
+}
+
+SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const WinBits nStyle )
+: Control(pParent, nStyle), pMetaFile( 0 ), bInEffect(false), mpObj(NULL), mnShowPage(0)
{
SetBorderStyle( WINDOW_BORDER_MONO );
svtools::ColorConfig aColorConfig;
@@ -74,6 +86,11 @@ SdDocPreviewWin::~SdDocPreviewWin()
delete pMetaFile;
}
+Size SdDocPreviewWin::GetOptimalSize() const
+{
+ return LogicToPixel(Size(122, 96), MAP_APPFONT);
+}
+
void SdDocPreviewWin::Resize()
{
Invalidate();