summaryrefslogtreecommitdiff
path: root/cui/source/factory
diff options
context:
space:
mode:
authorShubham Goyal <22shubh22@gmail.com>2019-07-24 10:31:04 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-08-01 22:32:11 +0200
commit02d16928bcd1eb2b6dfd7524ea9af591c0f5f2e0 (patch)
treedc92a0b8b4e940e8224a6ccef9ee37b4b29a328e /cui/source/factory
parent8fe5161a9e36d8285c489da7167d7cca27cb0f1d (diff)
Make QR Code callable in calc and writer
Change-Id: I73793100478c34a7721821cec1f8ccec0174d20c Reviewed-on: https://gerrit.libreoffice.org/74598 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'cui/source/factory')
-rw-r--r--cui/source/factory/dlgfact.cxx13
-rw-r--r--cui/source/factory/dlgfact.hxx18
2 files changed, 31 insertions, 0 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ce64ed27db69..37460b879aa0 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -61,6 +61,7 @@
#include <linkdlg.hxx>
#include <SignatureLineDialog.hxx>
#include <SignSignatureLineDialog.hxx>
+#include <QrCodeGenDialog.hxx>
#include <SpellDialog.hxx>
#include <cfg.hxx>
#include <numpages.hxx>
@@ -319,6 +320,11 @@ short AbstractSignSignatureLineDialog_Impl::Execute()
return m_xDlg->run();
}
+short AbstractQrCodeGenDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl);
short CuiAbstractTabController_Impl::Execute()
@@ -1622,6 +1628,13 @@ AbstractDialogFactory_Impl::CreateSignSignatureLineDialog(weld::Window* pParent,
std::make_unique<SignSignatureLineDialog>(pParent, xModel));
}
+VclPtr<AbstractQrCodeGenDialog> AbstractDialogFactory_Impl::CreateQrCodeGenDialog(
+ weld::Window* pParent, const Reference<XModel> xModel, bool bEditExisting)
+{
+ return VclPtr<AbstractQrCodeGenDialog_Impl>::Create(
+ std::make_unique<QrCodeGenDialog>(pParent, xModel, bEditExisting));
+}
+
VclPtr<AbstractTipOfTheDayDialog>
AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
{
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 68267c61a122..9948e71fcf24 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -48,6 +48,7 @@
#include <passwdomdlg.hxx>
#include <pastedlg.hxx>
#include <postdlg.hxx>
+#include <QrCodeGenDialog.hxx>
#include <screenshotannotationdlg.hxx>
#include <showcols.hxx>
#include <SignatureLineDialog.hxx>
@@ -698,6 +699,19 @@ public:
virtual short Execute() override;
};
+class QrCodeGenDialog;
+class AbstractQrCodeGenDialog_Impl : public AbstractQrCodeGenDialog
+{
+ std::unique_ptr<QrCodeGenDialog> m_xDlg;
+
+public:
+ explicit AbstractQrCodeGenDialog_Impl(std::unique_ptr<QrCodeGenDialog> p)
+ : m_xDlg(std::move(p))
+ {
+ }
+ virtual short Execute() override;
+};
+
class SignSignatureLineDialog;
class AbstractSignSignatureLineDialog_Impl : public AbstractSignSignatureLineDialog
{
@@ -907,6 +921,10 @@ public:
CreateSignSignatureLineDialog(weld::Window* pParent,
const css::uno::Reference<css::frame::XModel> xModel) override;
+ virtual VclPtr<AbstractQrCodeGenDialog>
+ CreateQrCodeGenDialog(weld::Window* pParent,
+ const css::uno::Reference<css::frame::XModel> xModel, bool bEditExisting) override;
+
virtual VclPtr<AbstractTipOfTheDayDialog> CreateTipOfTheDayDialog(weld::Window* pParent) override;
};