summaryrefslogtreecommitdiff
path: root/cui/source/factory
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <grzegorz.araminowicz@collabora.com>2019-08-18 16:23:51 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-23 09:53:09 +0200
commit5457ddf2f529daf5962abcba76dbaeccff0de826 (patch)
treedde8f794d3c9349874d8fb0d573ef906855d7580 /cui/source/factory
parent1aed241deb816b2a6b9f3f97978443939f61d076 (diff)
SmartArt: add Edit Diagram dialog
Currently it displays only text representation of diagram. Change-Id: I3ff12c4abf2ed32f68ea9d7437905afc13279e62 Reviewed-on: https://gerrit.libreoffice.org/77873 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'cui/source/factory')
-rw-r--r--cui/source/factory/dlgfact.cxx13
-rw-r--r--cui/source/factory/dlgfact.hxx21
2 files changed, 34 insertions, 0 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 37460b879aa0..289c79ccf8be 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -87,6 +87,7 @@
#include <thesdlg.hxx>
#include <about.hxx>
#include <tipofthedaydlg.hxx>
+#include <DiagramDialog.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
@@ -1384,6 +1385,11 @@ short AbstractTipOfTheDayDialog_Impl::Execute()
return m_xDlg->run();
}
+short AbstractDiagramDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxMacroAssignDlg(
weld::Window* _pParent, const Reference< XFrame >& _rxDocumentFrame, const bool _bUnoDialogMode,
const Reference< XNameReplace >& _rxEvents, const sal_uInt16 _nInitiallySelectedEvent )
@@ -1641,4 +1647,11 @@ AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
return VclPtr<AbstractTipOfTheDayDialog_Impl>::Create(std::make_unique<TipOfTheDayDialog>(pParent));
}
+VclPtr<AbstractDiagramDialog>
+AbstractDialogFactory_Impl::CreateDiagramDialog(weld::Window* pParent, std::shared_ptr<DiagramDataInterface> pDiagramData)
+{
+ return VclPtr<AbstractDiagramDialog_Impl>::Create(
+ std::make_unique<DiagramDialog>(pParent, pDiagramData));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 9948e71fcf24..7d579b22ae20 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -37,6 +37,7 @@
#include <cuitabarea.hxx>
#include <cuitbxform.hxx>
#include <dlgname.hxx>
+#include <DiagramDialog.hxx>
#include <dstribut.hxx>
#include <hangulhanjadlg.hxx>
#include <hyphen.hxx>
@@ -740,6 +741,22 @@ public:
virtual short Execute() override;
};
+class DiagramDialog;
+
+/** Edit Diagram dialog */
+class AbstractDiagramDialog_Impl : public AbstractDiagramDialog
+{
+protected:
+ std::unique_ptr<DiagramDialog> m_xDlg;
+
+public:
+ explicit AbstractDiagramDialog_Impl(std::unique_ptr<DiagramDialog> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ virtual short Execute() override;
+};
+
//AbstractDialogFactory_Impl implementations
class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory
{
@@ -926,6 +943,10 @@ public:
const css::uno::Reference<css::frame::XModel> xModel, bool bEditExisting) override;
virtual VclPtr<AbstractTipOfTheDayDialog> CreateTipOfTheDayDialog(weld::Window* pParent) override;
+
+ virtual VclPtr<AbstractDiagramDialog> CreateDiagramDialog(
+ weld::Window* pParent,
+ std::shared_ptr<DiagramDataInterface> pDiagramData) override;
};
#endif