summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/Library_vclplug_qt5.mk1
-rw-r--r--vcl/inc/qt5/Qt5System.hxx27
-rw-r--r--vcl/qt5/Qt5Instance.cxx4
-rw-r--r--vcl/qt5/Qt5System.cxx32
4 files changed, 62 insertions, 2 deletions
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 4fcd649e1777..1ad01555ed3a 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -96,6 +96,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
vcl/qt5/Qt5Object \
vcl/qt5/Qt5Painter \
vcl/qt5/Qt5Printer \
+ vcl/qt5/Qt5System \
vcl/qt5/Qt5Timer \
vcl/qt5/Qt5Tools \
vcl/qt5/Qt5VirtualDevice \
diff --git a/vcl/inc/qt5/Qt5System.hxx b/vcl/inc/qt5/Qt5System.hxx
new file mode 100644
index 000000000000..fbc753757b36
--- /dev/null
+++ b/vcl/inc/qt5/Qt5System.hxx
@@ -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/.
+ */
+
+#pragma once
+
+#include <vcl/sysdata.hxx>
+#include <unx/gensys.h>
+
+class Qt5System : public SalGenericSystem
+{
+public:
+ Qt5System();
+ virtual ~Qt5System() override;
+
+ virtual unsigned int GetDisplayScreenCount() override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel(unsigned int nScreen) override;
+ virtual int ShowNativeDialog(const OUString& rTitle, const OUString& rMessage,
+ const std::vector<OUString>& rButtons) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 6ea2610e03f7..fc06d47d317b 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -26,6 +26,7 @@
#include <Qt5Frame.hxx>
#include <Qt5Menu.hxx>
#include <Qt5Object.hxx>
+#include <Qt5System.hxx>
#include <Qt5Timer.hxx>
#include <Qt5VirtualDevice.hxx>
@@ -40,7 +41,6 @@
#include <sal/log.hxx>
#include <osl/process.h>
-#include <headless/svpdummies.hxx>
#include <headless/svpbmp.hxx>
Qt5Instance::Qt5Instance(SalYieldMutex* pMutex, bool bUseCairo)
@@ -128,7 +128,7 @@ std::unique_ptr<SalMenuItem> Qt5Instance::CreateMenuItem(const SalItemParams& rI
SalTimer* Qt5Instance::CreateSalTimer() { return new Qt5Timer(); }
-SalSystem* Qt5Instance::CreateSalSystem() { return new SvpSalSystem(); }
+SalSystem* Qt5Instance::CreateSalSystem() { return new Qt5System(); }
std::shared_ptr<SalBitmap> Qt5Instance::CreateSalBitmap()
{
diff --git a/vcl/qt5/Qt5System.cxx b/vcl/qt5/Qt5System.cxx
new file mode 100644
index 000000000000..0de1940d9eff
--- /dev/null
+++ b/vcl/qt5/Qt5System.cxx
@@ -0,0 +1,32 @@
+/* -*- 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 <string.h>
+#include <tools/gen.hxx>
+#include <Qt5System.hxx>
+
+Qt5System::Qt5System() {}
+Qt5System::~Qt5System() {}
+
+unsigned int Qt5System::GetDisplayScreenCount() { return 1; }
+
+tools::Rectangle Qt5System::GetDisplayScreenPosSizePixel(unsigned int nScreen)
+{
+ tools::Rectangle aRect;
+ if (nScreen == 0)
+ aRect = tools::Rectangle(Point(0, 0), Size(1024, 768));
+ return aRect;
+}
+
+int Qt5System::ShowNativeDialog(const OUString&, const OUString&, const std::vector<OUString>&)
+{
+ return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */