summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-08-14 12:17:35 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-08-14 16:07:03 -0430
commit0c03f7945e89e52a473a21267a4bd18970da52d3 (patch)
treee366ed16aea3281e1bb691b9ad9cbf486d024119 /sfx2
parent4fe7c4f3a98b97034e880ceebcea2b6fecd05852 (diff)
Display template preview and information when clicking properties.
Change-Id: I9a783c39f04a19cd65a292f3ebff923bb845f2c4
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/AllLangResTarget_sfx2.mk1
-rw-r--r--sfx2/Library_sfx.mk1
-rw-r--r--sfx2/Package_inc.mk1
-rw-r--r--sfx2/inc/sfx2/templateinfodlg.hxx38
-rw-r--r--sfx2/inc/templatedlg.hxx1
-rw-r--r--sfx2/source/dialog/templateinfodlg.cxx27
-rw-r--r--sfx2/source/dialog/templateinfodlg.hrc11
-rw-r--r--sfx2/source/dialog/templateinfodlg.src25
-rw-r--r--sfx2/source/doc/templatedlg.cxx3
9 files changed, 108 insertions, 0 deletions
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index ce9e93e8738e..0d16f680e95c 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/securitypage.src \
sfx2/source/dialog/srchdlg.src \
sfx2/source/dialog/taskpane.src \
+ sfx2/source/dialog/templateinfodlg.src \
sfx2/source/dialog/templdlg.src \
sfx2/source/dialog/titledockwin.src \
sfx2/source/dialog/versdlg.src \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 95c68e2c07f3..50e55219790d 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -171,6 +171,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/dialog/styledlg \
sfx2/source/dialog/tabdlg \
sfx2/source/dialog/taskpane \
+ sfx2/source/dialog/templateinfodlg \
sfx2/source/dialog/templdlg \
sfx2/source/dialog/titledockwin \
sfx2/source/dialog/tplcitem \
diff --git a/sfx2/Package_inc.mk b/sfx2/Package_inc.mk
index 1a71255c98b8..31f190dcf2ce 100644
--- a/sfx2/Package_inc.mk
+++ b/sfx2/Package_inc.mk
@@ -119,6 +119,7 @@ $(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/tbxctrl.hxx,sfx2/tbxctrl.hxx
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templdlg.hxx,sfx2/templdlg.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templatelocnames.hrc,sfx2/templatelocnames.hrc))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templateabstractview.hxx,sfx2/templateabstractview.hxx))
+$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templateinfodlg.hxx,sfx2/templateinfodlg.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templateview.hxx,sfx2/templateview.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templatelocalview.hxx,sfx2/templatelocalview.hxx))
$(eval $(call gb_Package_add_file,sfx2_inc,inc/sfx2/templatelocalviewitem.hxx,sfx2/templatelocalviewitem.hxx))
diff --git a/sfx2/inc/sfx2/templateinfodlg.hxx b/sfx2/inc/sfx2/templateinfodlg.hxx
new file mode 100644
index 000000000000..e827531dab9a
--- /dev/null
+++ b/sfx2/inc/sfx2/templateinfodlg.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#ifndef __SFX2_TEMPLATEINFODLG_HXX__
+#define __SFX2_TEMPLATEINFODLG_HXX__
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+
+namespace svtools {
+ class ODocumentInfoPreview;
+}
+
+class SfxTemplateInfoDlg : public ModalDialog
+{
+public:
+
+ SfxTemplateInfoDlg (Window *pParent = NULL);
+
+ ~SfxTemplateInfoDlg ();
+
+private:
+
+ PushButton maBtnClose;
+
+ Window *mpPreviewView;
+ svtools::ODocumentInfoPreview *mpInfoView;
+};
+
+#endif // __SFX2_TEMPLATEINFODLG_HXX__
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx
index bed10a6f1f0a..40fa0bfda139 100644
--- a/sfx2/inc/templatedlg.hxx
+++ b/sfx2/inc/templatedlg.hxx
@@ -17,6 +17,7 @@
class Edit;
class PopupMenu;
+class SfxTemplateInfoDlg;
class TemplateAbstractView;
class TemplateLocalView;
class TemplateOnlineView;
diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx
new file mode 100644
index 000000000000..a1535d2162eb
--- /dev/null
+++ b/sfx2/source/dialog/templateinfodlg.cxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#include <sfx2/templateinfodlg.hxx>
+
+#include <sfx2/sfxresid.hxx>
+#include <svtools/DocumentInfoPreview.hxx>
+
+#include "templateinfodlg.hrc"
+
+SfxTemplateInfoDlg::SfxTemplateInfoDlg (Window *pParent)
+ : ModalDialog(pParent,SfxResId(DLG_TEMPLATE_INFORMATION)),
+ maBtnClose(this,SfxResId(BTN_TEMPLATE_INFO_CLOSE))
+{
+}
+
+SfxTemplateInfoDlg::~SfxTemplateInfoDlg()
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/templateinfodlg.hrc b/sfx2/source/dialog/templateinfodlg.hrc
new file mode 100644
index 000000000000..e6069c1057d3
--- /dev/null
+++ b/sfx2/source/dialog/templateinfodlg.hrc
@@ -0,0 +1,11 @@
+/*
+ * Copyright 2012 LibreOffice contributors.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#define DLG_TEMPLATE_INFORMATION 400
+
+#define BTN_TEMPLATE_INFO_CLOSE 11
diff --git a/sfx2/source/dialog/templateinfodlg.src b/sfx2/source/dialog/templateinfodlg.src
new file mode 100644
index 000000000000..6126b219c072
--- /dev/null
+++ b/sfx2/source/dialog/templateinfodlg.src
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2012 LibreOffice contributors.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "templateinfodlg.hrc"
+
+ModalDialog DLG_TEMPLATE_INFORMATION
+{
+ OutputSize = TRUE;
+ SVLook = TRUE;
+ Size = MAP_APPFONT( 250, 180 );
+ Moveable = TRUE;
+ Closeable = TRUE;
+
+ PushButton BTN_TEMPLATE_INFO_CLOSE
+ {
+ Pos = MAP_APPFONT( 194, 160 );
+ Size = MAP_APPFONT( 50, 14 );
+ Text [ en-US ] = "Close";
+ };
+};
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index d93162a95cef..80aa1a91b632 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -20,6 +20,7 @@
#include <sfx2/fcontnr.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/sfxresid.hxx>
+#include <sfx2/templateinfodlg.hxx>
#include <sfx2/templatelocalview.hxx>
#include <sfx2/templatelocalviewitem.hxx>
#include <sfx2/templateonlineview.hxx>
@@ -946,6 +947,8 @@ void SfxTemplateManagerDlg::OnTemplateEdit ()
void SfxTemplateManagerDlg::OnTemplateProperties ()
{
+ SfxTemplateInfoDlg aDlg;
+ aDlg.Execute();
}
void SfxTemplateManagerDlg::OnTemplateDelete ()