summaryrefslogtreecommitdiff
path: root/sfx2/source/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-06 12:25:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-07 21:18:42 +0100
commit82925b574209d3971c05b9bd98a317683dd583a5 (patch)
tree7fedf333686a3c25942debf82328978e97d7a437 /sfx2/source/inc
parent64117f700ba3bd8c4b42488f582fa5e5c53487e6 (diff)
weld SfxNewFileDialog
Change-Id: I28b1aff90407bce7d04f10eed6a227c0970f9c0a Reviewed-on: https://gerrit.libreoffice.org/50878 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/inc')
-rw-r--r--sfx2/source/inc/preview.hxx26
1 files changed, 9 insertions, 17 deletions
diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
index 890d9b2298df..3a747db969f2 100644
--- a/sfx2/source/inc/preview.hxx
+++ b/sfx2/source/inc/preview.hxx
@@ -19,32 +19,24 @@
#ifndef INCLUDED_SFX2_SOURCE_INC_PREVIEW_HXX
#define INCLUDED_SFX2_SOURCE_INC_PREVIEW_HXX
-#include <sfx2/doctempl.hxx>
-#include <sfx2/basedlgs.hxx>
+#include <tools/link.hxx>
class SfxObjectShell;
class GDIMetaFile;
-class SfxPreviewBase_Impl : public vcl::Window
+class SfxPreviewWin_Impl
{
protected:
std::shared_ptr<GDIMetaFile> xMetaFile;
+ std::unique_ptr<weld::DrawingArea> m_xDrawingArea;
public:
- SfxPreviewBase_Impl(vcl::Window* pParent, WinBits nStyle);
+ SfxPreviewWin_Impl(weld::DrawingArea* pArea);
void SetObjectShell( SfxObjectShell const * pObj );
- virtual void Resize() override;
- virtual Size GetOptimalSize() const override;
-};
-
-class SfxPreviewWin_Impl: public SfxPreviewBase_Impl
-{
-protected:
- virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
-public:
- SfxPreviewWin_Impl(vcl::Window* pParent, WinBits nStyle)
- : SfxPreviewBase_Impl(pParent, nStyle)
- {}
-
+ DECL_LINK(DoPaint, vcl::RenderContext&, void);
+ DECL_LINK(DoResize, const Size& rSize, void);
+ void queue_draw() { m_xDrawingArea->queue_draw(); }
+ void show() { m_xDrawingArea->show(); }
+ void set_size_request(int nWidth, int nHeight) { m_xDrawingArea->set_size_request(nWidth, nHeight); }
static void ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFile* pFile);
};