summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/templateinfodlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/templateinfodlg.cxx')
-rw-r--r--sfx2/source/dialog/templateinfodlg.cxx28
1 files changed, 9 insertions, 19 deletions
diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx
index 9437f3308e11..45dcd7837a74 100644
--- a/sfx2/source/dialog/templateinfodlg.cxx
+++ b/sfx2/source/dialog/templateinfodlg.cxx
@@ -24,10 +24,6 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
-#include "templateinfodlg.hrc"
-
-#define DLG_BORDER_SIZE 12
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::document;
@@ -37,34 +33,28 @@ using namespace ::com::sun::star::task;
using namespace ::com::sun::star::util;
SfxTemplateInfoDlg::SfxTemplateInfoDlg (Window *pParent)
- : ModalDialog(pParent,SfxResId(DLG_TEMPLATE_INFORMATION)),
- maBtnClose(this,SfxResId(BTN_TEMPLATE_INFO_CLOSE)),
- mpPreviewView(new Window(this)),
- mpInfoView(new svtools::ODocumentInfoPreview(this,WB_LEFT | WB_VSCROLL | WB_READONLY | WB_BORDER | WB_3DLOOK))
+ : ModalDialog(pParent, "TemplateInfo", "sfx/ui/templateinfodialog.ui")
{
- maBtnClose.SetClickHdl(LINK(this,SfxTemplateInfoDlg,CloseHdl));
+ get(mpBtnClose, "close");
+ get(mpBox, "box");
+ get(mpInfoView, "infoDrawingArea");
+ mpPreviewView = new Window(mpBox);
- Size aWinSize = GetOutputSizePixel();
- aWinSize.setHeight( aWinSize.getHeight() - 3*DLG_BORDER_SIZE - maBtnClose.GetOutputHeightPixel() );
- aWinSize.setWidth( (aWinSize.getWidth() - 3*DLG_BORDER_SIZE)/2 );
- mpInfoView->SetPosSizePixel(Point(DLG_BORDER_SIZE,DLG_BORDER_SIZE),aWinSize);
+ Size aSize(LogicToPixel(Size(250, 160), MAP_APPFONT));
+ mpBox->set_width_request(aSize.Width());
+ mpBox->set_height_request(aSize.Height());
- mpPreviewView->SetPosSizePixel(Point(aWinSize.getWidth()+2*DLG_BORDER_SIZE,DLG_BORDER_SIZE),aWinSize);
+ mpBtnClose->SetClickHdl(LINK(this,SfxTemplateInfoDlg,CloseHdl));
xWindow = VCLUnoHelper::GetInterface(mpPreviewView);
m_xFrame = Frame::create( comphelper::getProcessComponentContext() );
m_xFrame->initialize( xWindow );
-
- mpPreviewView->Show();
- mpInfoView->Show();
}
SfxTemplateInfoDlg::~SfxTemplateInfoDlg()
{
m_xFrame->dispose();
-
- delete mpInfoView;
}
void SfxTemplateInfoDlg::loadDocument(const OUString &rURL)