summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-21 13:50:30 +0000
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-11-06 12:05:31 +0100
commit9335945c7cb215f387ed1444e28533fac437c6e8 (patch)
treed4bdbf17d4272f9d4ee32d57275883f79ad200b8
parentf69be03d72fbaa535adc8b06475d2806283b79ab (diff)
KF5 initial VCL plugin
Something that compiles, basically just interface stubs. All used Svp classes don't use any cairo. Change-Id: I9a8858c930989438cc2a3f3346c01a7abc579d62
-rw-r--r--Repository.mk1
-rw-r--r--RepositoryExternal.mk31
-rw-r--r--config_host.mk.in7
-rw-r--r--configure.ac24
-rw-r--r--include/sal/log-areas.dox1
-rw-r--r--vcl/CustomTarget_kf5_moc.mk21
-rw-r--r--vcl/Library_vclplug_kf5.mk94
-rw-r--r--vcl/Module_vcl.mk6
-rw-r--r--vcl/inc/jobset.h2
-rw-r--r--vcl/inc/salgdi.hxx2
-rw-r--r--vcl/inc/unx/gendata.hxx2
-rw-r--r--vcl/inc/vclpluginapi.h6
-rw-r--r--vcl/unx/kf5/Kf5Data.cxx49
-rw-r--r--vcl/unx/kf5/Kf5Data.hxx34
-rw-r--r--vcl/unx/kf5/Kf5Frame.cxx224
-rw-r--r--vcl/unx/kf5/Kf5Frame.hxx86
-rw-r--r--vcl/unx/kf5/Kf5Graphics.cxx45
-rw-r--r--vcl/unx/kf5/Kf5Graphics.hxx167
-rw-r--r--vcl/unx/kf5/Kf5Graphics_Controls.cxx51
-rw-r--r--vcl/unx/kf5/Kf5Graphics_GDI.cxx223
-rw-r--r--vcl/unx/kf5/Kf5Graphics_Text.cxx100
-rw-r--r--vcl/unx/kf5/Kf5Instance.cxx144
-rw-r--r--vcl/unx/kf5/Kf5Instance.hxx75
-rw-r--r--vcl/unx/kf5/Kf5Instance_Print.cxx265
-rw-r--r--vcl/unx/kf5/Kf5Printer.cxx32
-rw-r--r--vcl/unx/kf5/Kf5Printer.hxx39
-rw-r--r--vcl/unx/kf5/Kf5Timer.cxx65
-rw-r--r--vcl/unx/kf5/Kf5Timer.hxx46
-rw-r--r--vcl/unx/kf5/Kf5VirtualDevice.cxx60
-rw-r--r--vcl/unx/kf5/Kf5VirtualDevice.hxx54
30 files changed, 1952 insertions, 4 deletions
diff --git a/Repository.mk b/Repository.mk
index fb880b126fcc..1f5a1529c69e 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -290,6 +290,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,kde, \
$(if $(ENABLE_KDE4),kde4be1) \
$(if $(USING_X11), \
$(if $(ENABLE_KDE4),vclplug_kde4) \
+ $(if $(ENABLE_KF5),vclplug_kf5) \
) \
))
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 026ab1879cf2..2fc8f3fbafb6 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3066,6 +3066,37 @@ endef
endif # ENABLE_KDE4
+ifeq ($(ENABLE_KF5),TRUE)
+
+define gb_LinkTarget__use_kf5
+$(call gb_LinkTarget_set_include,$(1),\
+ $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
+ $$(INCLUDE) \
+)
+
+$(call gb_LinkTarget_add_defs,$(1),\
+ $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
+)
+
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(KF5_LIBS) \
+)
+
+ifeq ($(COM),GCC)
+$(call gb_LinkTarget_add_cxxflags,$(1),\
+ -Wno-shadow \
+)
+endif
+
+endef
+
+else # !ENABLE_KF5
+
+define gb_LinkTarget__use_kf5
+
+endef
+
+endif # ENABLE_KF5
# PYTHON
# extra python_headers external because pyuno wrapper must not link python
diff --git a/config_host.mk.in b/config_host.mk.in
index 7fca9f3601d3..41f7fef8f7f6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -135,6 +135,7 @@ export ENABLE_GTK_PRINT=@ENABLE_GTK_PRINT@
export ENABLE_HEADLESS=@ENABLE_HEADLESS@
export ENABLE_JAVA=@ENABLE_JAVA@
export ENABLE_KDE4=@ENABLE_KDE4@
+export ENABLE_KF5=@ENABLE_KF5@
export ENABLE_LPSOLVE=@ENABLE_LPSOLVE@
export ENABLE_LTO=@ENABLE_LTO@
export ENABLE_LWP=@ENABLE_LWP@
@@ -291,6 +292,11 @@ export KDE4_LIBS=$(gb_SPACE)@KDE4_LIBS@
export KDE4_GLIB_CFLAGS=$(gb_SPACE)@KDE4_GLIB_CFLAGS@
export KDE4_GLIB_LIBS=$(gb_SPACE)@KDE4_GLIB_LIBS@
export KDE4_HAVE_GLIB=@KDE4_HAVE_GLIB@
+export KF5_CFLAGS=$(gb_SPACE)@KF5_CFLAGS@
+export KF5_GLIB_CFLAGS=$(gb_SPACE)@KF5_GLIB_CFLAGS@
+export KF5_GLIB_LIBS=$(gb_SPACE)@KF5_GLIB_LIBS@
+export KF5_HAVE_GLIB=@KF5_HAVE_GLIB@
+export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@
export KRB5_LIBS=@KRB5_LIBS@
export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@
export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
@@ -379,6 +385,7 @@ export MINGWCXX=@MINGWCXX@
export MINGWSTRIP=@MINGWSTRIP@
export ML_EXE=@ML_EXE@
export MOC4=@MOC4@
+export MOC5=@MOC5@
export MPL_SUBSET=@MPL_SUBSET@
export MSGFMT=@MSGFMT@
export MSGUNIQ=@MSGUNIQ@
diff --git a/configure.ac b/configure.ac
index e1ede555fd5c..0556a79631cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -571,6 +571,7 @@ linux-gnu*|k*bsd*-gnu*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
+ test_kf5=yes
if test "$enable_fuzzers" != yes; then
test_freetype=yes
test_fontconfig=yes
@@ -664,6 +665,7 @@ freebsd*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
+ test_kf5=yes
test_freetype=yes
AC_MSG_CHECKING([the FreeBSD operating system release])
if test -n "$with_os_version"; then
@@ -692,6 +694,7 @@ freebsd*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
+ test_kf5=yes
test_freetype=yes
PTHREAD_LIBS="-pthread -lpthread"
_os=NetBSD
@@ -717,6 +720,7 @@ dragonfly*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
+ test_kf5=yes
test_freetype=yes
PTHREAD_LIBS="-pthread"
_os=DragonFly
@@ -740,6 +744,7 @@ linux-android*)
test_freetype=no
test_gtk=no
test_kde4=no
+ test_kf5=no
test_randr=no
test_xrender=no
_os=Android
@@ -1177,6 +1182,12 @@ AC_ARG_ENABLE(kde4,
KDE4 are available.]),
,)
+AC_ARG_ENABLE(kf5,
+ AS_HELP_STRING([--enable-kf5],
+ [Determines whether to use Kf5 vclplug on platforms where Qt5 and
+ KF5 are available.]),
+,)
+
libo_FUZZ_ARG_ENABLE(gui,
AS_HELP_STRING([--disable-gui],
[Disable use of X11 or Wayland to reduce dependencies. Not related to the --headless
@@ -4500,6 +4511,7 @@ if test "$USING_X11" != TRUE; then
build_gstreamer_1_0=no
build_gstreamer_0_10=no
test_kde4=no
+ test_kf5=no
enable_cairo_canvas=no
fi
@@ -9746,6 +9758,14 @@ if test "x$enable_kde4" = "xyes"; then
fi
AC_SUBST(ENABLE_KDE4)
+ENABLE_KF5=""
+if test "x$enable_kf5" = "xyes"; then
+ ENABLE_KF5="TRUE"
+ AC_DEFINE(ENABLE_KF5)
+ R="$R kf5"
+fi
+AC_SUBST(ENABLE_KF5)
+
build_vcl_plugins="$R"
if test -z "$build_vcl_plugins"; then
@@ -10736,7 +10756,9 @@ MOC5="moc"
KF5_GLIB_CFLAGS=""
KF5_GLIB_LIBS=""
KF5_HAVE_GLIB=""
-if test "$test_kde5" = "yes" -a "$ENABLE_KDE5" = "TRUE"; then
+if test \( "$test_kde5" = "yes" -a "$ENABLE_KDE5" = "TRUE" \) \
+ -o \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \)
+then
qt5_incdirs="$QT5INC /usr/include/qt5 /usr/include $x_includes"
qt5_libdirs="$QT5LIB /usr/lib/qt5 /usr/lib $x_libraries"
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index ed93026f7d6b..6f4bc1478ec3 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -463,6 +463,7 @@ certain functionality.
@li @c vcl.icontest
@li @c vcl.kde4 - KDE4
@li @c vcl.kde5 - KDE5
+@li @c vcl.kf5 - KF5
@li @c vcl.layout - Widget layout
@li @c vcl.lazydelete
@li @c vcl.opengl
diff --git a/vcl/CustomTarget_kf5_moc.mk b/vcl/CustomTarget_kf5_moc.mk
new file mode 100644
index 000000000000..5be8f629ceec
--- /dev/null
+++ b/vcl/CustomTarget_kf5_moc.mk
@@ -0,0 +1,21 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kf5))
+
+$(call gb_CustomTarget_get_target,vcl/unx/kf5) : \
+ $(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/Kf5Timer.moc \
+
+$(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/%.moc : \
+ $(SRCDIR)/vcl/unx/kf5/%.hxx \
+ | $(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/.dir
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MOC,1)
+ $(MOC5) $< -o $@
+
+# vim: set noet sw=4:
diff --git a/vcl/Library_vclplug_kf5.mk b/vcl/Library_vclplug_kf5.mk
new file mode 100644
index 000000000000..9e993b2edb9d
--- /dev/null
+++ b/vcl/Library_vclplug_kf5.mk
@@ -0,0 +1,94 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+
+$(eval $(call gb_Library_Library,vclplug_kf5))
+
+$(eval $(call gb_Library_set_warnings_not_errors,vclplug_kf5))
+
+$(eval $(call gb_Library_use_custom_headers,vclplug_kf5,vcl/unx/kf5))
+
+$(eval $(call gb_Library_set_include,vclplug_kf5,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/vcl/inc \
+))
+
+$(eval $(call gb_Library_add_defs,vclplug_kf5,\
+ -DVCLPLUG_KF5_IMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_use_sdk_api,vclplug_kf5))
+
+$(eval $(call gb_Library_use_libraries,vclplug_kf5,\
+ vclplug_gen \
+ vcl \
+ tl \
+ utl \
+ sot \
+ ucbhelper \
+ basegfx \
+ comphelper \
+ cppuhelper \
+ i18nlangtag \
+ i18nutil \
+ $(if $(ENABLE_JAVA), \
+ jvmaccess) \
+ cppu \
+ sal \
+))
+
+$(eval $(call gb_Library_use_externals,vclplug_kf5,\
+ boost_headers \
+ icuuc \
+ kf5 \
+ epoxy \
+))
+
+ifneq ($(KF5_HAVE_GLIB),)
+$(eval $(call gb_Library_add_defs,vclplug_kf5,\
+ $(KF5_GLIB_CFLAGS) \
+))
+
+$(eval $(call gb_Library_add_libs,vclplug_kf5,\
+ $(KF5_GLIB_LIBS) \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,vclplug_kf5,\
+ vcl/unx/kf5/Kf5Data \
+ vcl/unx/kf5/Kf5Frame \
+ vcl/unx/kf5/Kf5Graphics \
+ vcl/unx/kf5/Kf5Graphics_Controls \
+ vcl/unx/kf5/Kf5Graphics_GDI \
+ vcl/unx/kf5/Kf5Graphics_Text \
+ vcl/unx/kf5/Kf5Instance \
+ vcl/unx/kf5/Kf5Instance_Print \
+ vcl/unx/kf5/Kf5Printer \
+ vcl/unx/kf5/Kf5Timer \
+ vcl/unx/kf5/Kf5VirtualDevice \
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,vclplug_kf5,\
+ -lm \
+ -ldl \
+ -lpthread \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 3000befcafb7..0587add8ce8c 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -87,6 +87,12 @@ $(eval $(call gb_Module_add_targets,vcl,\
Library_vclplug_kde5 \
))
endif
+ifneq ($(ENABLE_KF5),)
+$(eval $(call gb_Module_add_targets,vcl,\
+ CustomTarget_kf5_moc \
+ Library_vclplug_kf5 \
+))
+endif
endif
ifeq ($(OS),MACOSX)
diff --git a/vcl/inc/jobset.h b/vcl/inc/jobset.h
index 35a706536b45..dc04e9a54bd1 100644
--- a/vcl/inc/jobset.h
+++ b/vcl/inc/jobset.h
@@ -29,7 +29,7 @@
#define JOBSETUP_SYSTEM_UNIX 3
#define JOBSETUP_SYSTEM_MAC 4
-class ImplJobSetup
+class VCL_PLUGIN_PUBLIC ImplJobSetup
{
private:
sal_uInt16 mnSystem; //< System - JOBSETUP_SYSTEM_xxxx
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 1a9157ca9747..a368630ebd74 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_INC_SALGDI_HXX
#include <vcl/metric.hxx>
+#include <vcl/sysdata.hxx>
#include "impfontmetricdata.hxx"
#include "salgdiimpl.hxx"
@@ -45,7 +46,6 @@ class OpenGLContext;
class OutputDevice;
class FreetypeFont;
class CommonSalLayout;
-struct SystemGraphicsData;
#if ENABLE_CAIRO_CANVAS
struct SystemFontData;
diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx
index fda6680a962a..4410f435ba86 100644
--- a/vcl/inc/unx/gendata.hxx
+++ b/vcl/inc/unx/gendata.hxx
@@ -23,7 +23,7 @@ enum GenericUnixSalDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
SAL_DATA_KDE4, SAL_DATA_KDE5,
SAL_DATA_UNX, SAL_DATA_SVP,
SAL_DATA_ANDROID, SAL_DATA_IOS,
- SAL_DATA_HEADLESS };
+ SAL_DATA_HEADLESS, SAL_DATA_KF5 };
class VCL_DLLPUBLIC GenericUnixSalData : public SalData
{
diff --git a/vcl/inc/vclpluginapi.h b/vcl/inc/vclpluginapi.h
index 3901b1218d82..41567284c99e 100644
--- a/vcl/inc/vclpluginapi.h
+++ b/vcl/inc/vclpluginapi.h
@@ -41,6 +41,12 @@
#define VCLPLUG_KDE4_PUBLIC SAL_DLLPUBLIC_IMPORT
#endif
+#if defined VCLPLUG_KF5_IMPLEMENTATION
+#define VCLPLUG_KF5_PUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define VCLPLUG_KF5_PUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
#if defined VCLPLUG_SVP_IMPLEMENTATION
#define VCLPLUG_SVP_PUBLIC SAL_DLLPUBLIC_EXPORT
#else
diff --git a/vcl/unx/kf5/Kf5Data.cxx b/vcl/unx/kf5/Kf5Data.cxx
new file mode 100644
index 000000000000..b54054dc4cfe
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Data.cxx
@@ -0,0 +1,49 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <QtWidgets/QStyle>
+#include <QtWidgets/QApplication>
+
+#include "Kf5Data.hxx"
+
+Kf5Data::Kf5Data( SalInstance *pInstance )
+ : GenericUnixSalData( SAL_DATA_KF5, pInstance )
+{
+ ImplSVData *pSVData = ImplGetSVData();
+
+ // draw toolbars on separate lines
+ pSVData->maNWFData.mbDockingAreaSeparateTB = true;
+ // no borders for menu, theming does that
+ pSVData->maNWFData.mbFlatMenu = true;
+}
+
+Kf5Data::~Kf5Data()
+{
+}
+
+void Kf5Data::ErrorTrapPush()
+{
+}
+
+bool Kf5Data::ErrorTrapPop( bool bIgnoreError )
+{
+ return false;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Data.hxx b/vcl/unx/kf5/Kf5Data.hxx
new file mode 100644
index 000000000000..16f1e24ba710
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Data.hxx
@@ -0,0 +1,34 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <unx/gendata.hxx>
+
+class Kf5Data : public GenericUnixSalData
+{
+public:
+ explicit Kf5Data( SalInstance *pInstance );
+ virtual ~Kf5Data() override;
+
+ virtual void ErrorTrapPush() override;
+ virtual bool ErrorTrapPop( bool bIgnoreError = true ) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Frame.cxx b/vcl/unx/kf5/Kf5Frame.cxx
new file mode 100644
index 000000000000..c6326b564557
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Frame.cxx
@@ -0,0 +1,224 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Frame.hxx"
+
+Kf5Frame::Kf5Frame::Kf5Frame( Kf5Instance* pInstance,
+ SalFrame* pParent,
+ SalFrameStyleFlags nSalFrameStyle )
+{
+}
+
+Kf5Frame::~Kf5Frame()
+{
+}
+
+SalGraphics* Kf5Frame::AcquireGraphics()
+{
+ return nullptr;
+}
+
+void Kf5Frame::ReleaseGraphics( SalGraphics* pGraphics )
+{
+}
+
+
+bool Kf5Frame::PostEvent(ImplSVEvent* pData)
+{
+ return false;
+}
+
+void Kf5Frame::SetTitle( const OUString& rTitle )
+{
+}
+
+void Kf5Frame::SetIcon( sal_uInt16 nIcon )
+{
+}
+
+void Kf5Frame::SetMenu( SalMenu* pMenu )
+{
+}
+
+void Kf5Frame::DrawMenuBar()
+{
+}
+
+void Kf5Frame::SetExtendedFrameStyle( SalExtStyle nExtStyle )
+{
+}
+
+void Kf5Frame::Show( bool bVisible, bool bNoActivate )
+{
+}
+
+void Kf5Frame::SetMinClientSize( long nWidth, long nHeight )
+{
+}
+
+void Kf5Frame::SetMaxClientSize( long nWidth, long nHeight )
+{
+}
+
+void Kf5Frame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+{
+}
+
+void Kf5Frame::GetClientSize( long& rWidth, long& rHeight )
+{
+}
+
+void Kf5Frame::GetWorkArea( tools::Rectangle& rRect )
+{
+}
+
+SalFrame* Kf5Frame::GetParent() const
+{
+ return nullptr;
+}
+
+void Kf5Frame::SetWindowState( const SalFrameState* pState )
+{
+}
+
+bool Kf5Frame::GetWindowState( SalFrameState* pState )
+{
+ return false;
+}
+
+void Kf5Frame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
+{
+}
+
+void Kf5Frame::StartPresentation( bool bStart )
+{
+}
+
+void Kf5Frame::SetAlwaysOnTop( bool bOnTop )
+{
+}
+
+void Kf5Frame::ToTop( SalFrameToTop nFlags )
+{
+}
+
+void Kf5Frame::SetPointer( PointerStyle ePointerStyle )
+{
+}
+
+void Kf5Frame::CaptureMouse( bool bMouse )
+{
+}
+
+void Kf5Frame::SetPointerPos( long nX, long nY )
+{
+}
+
+void Kf5Frame::Flush()
+{
+}
+
+void Kf5Frame::Flush( const tools::Rectangle& rRect )
+{
+}
+
+void Kf5Frame::SetInputContext( SalInputContext* pContext )
+{
+}
+
+void Kf5Frame::EndExtTextInput( EndExtTextInputFlags nFlags )
+{
+}
+
+OUString Kf5Frame::GetKeyName( sal_uInt16 nKeyCode )
+{
+ return OUString();
+}
+
+bool Kf5Frame::MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode )
+{
+ return false;
+}
+
+LanguageType Kf5Frame::GetInputLanguage()
+{
+ return LANGUAGE_DONTKNOW;
+}
+
+void Kf5Frame::UpdateSettings( AllSettings& rSettings )
+{
+}
+
+void Kf5Frame::Beep()
+{
+}
+
+const SystemEnvData* Kf5Frame::GetSystemData() const
+{
+ return nullptr;
+}
+
+SalFrame::SalPointerState Kf5Frame::GetPointerState()
+{
+ return SalPointerState();
+}
+
+KeyIndicatorState Kf5Frame::GetIndicatorState()
+{
+ return KeyIndicatorState();
+}
+
+void Kf5Frame::SimulateKeyPress( sal_uInt16 nKeyCode )
+{
+}
+
+void Kf5Frame::SetParent( SalFrame* pNewParent )
+{
+}
+
+bool Kf5Frame::SetPluginParent( SystemParentData* pNewParent )
+{
+ return false;
+}
+
+void Kf5Frame::ResetClipRegion()
+{
+}
+
+void Kf5Frame::BeginSetClipRegion( sal_uLong nRects )
+{
+}
+
+void Kf5Frame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
+{
+}
+
+void Kf5Frame::EndSetClipRegion()
+{
+}
+
+void Kf5Frame::SetScreenNumber( unsigned int )
+{
+}
+
+void Kf5Frame::SetApplicationID(const OUString &)
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Frame.hxx b/vcl/unx/kf5/Kf5Frame.hxx
new file mode 100644
index 000000000000..d08040b23c71
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Frame.hxx
@@ -0,0 +1,86 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <salframe.hxx>
+
+class Kf5Instance;
+
+class VCL_DLLPUBLIC Kf5Frame : public SalFrame
+{
+public:
+ Kf5Frame( Kf5Instance* pInstance,
+ SalFrame* pParent,
+ SalFrameStyleFlags nSalFrameStyle );
+ virtual ~Kf5Frame() override;
+
+ virtual SalGraphics* AcquireGraphics() override;
+ virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
+
+ virtual bool PostEvent(ImplSVEvent* pData) override;
+
+ virtual void SetTitle( const OUString& rTitle ) override;
+ virtual void SetIcon( sal_uInt16 nIcon ) override;
+ virtual void SetMenu( SalMenu* pMenu ) override;
+ virtual void DrawMenuBar() override;
+
+ virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) override;
+ virtual void Show( bool bVisible, bool bNoActivate = false ) override;
+ virtual void SetMinClientSize( long nWidth, long nHeight ) override;
+ virtual void SetMaxClientSize( long nWidth, long nHeight ) override;
+ virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) override;
+ virtual void GetClientSize( long& rWidth, long& rHeight ) override;
+ virtual void GetWorkArea( tools::Rectangle& rRect ) override;
+ virtual SalFrame* GetParent() const override;
+ virtual void SetWindowState( const SalFrameState* pState ) override;
+ virtual bool GetWindowState( SalFrameState* pState ) override;
+ virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) override;
+ virtual void StartPresentation( bool bStart ) override;
+ virtual void SetAlwaysOnTop( bool bOnTop ) override;
+ virtual void ToTop( SalFrameToTop nFlags ) override;
+ virtual void SetPointer( PointerStyle ePointerStyle ) override;
+ virtual void CaptureMouse( bool bMouse ) override;
+ virtual void SetPointerPos( long nX, long nY ) override;
+ virtual void Flush() override;
+ virtual void Flush( const tools::Rectangle& rRect ) override;
+ virtual void SetInputContext( SalInputContext* pContext ) override;
+ virtual void EndExtTextInput( EndExtTextInputFlags nFlags ) override;
+ virtual OUString GetKeyName( sal_uInt16 nKeyCode ) override;
+ virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, vcl::KeyCode& rKeyCode ) override;
+ virtual LanguageType GetInputLanguage() override;
+ virtual void UpdateSettings( AllSettings& rSettings ) override;
+ virtual void Beep() override;
+ virtual const SystemEnvData* GetSystemData() const override;
+ virtual SalPointerState GetPointerState() override;
+ virtual KeyIndicatorState GetIndicatorState() override;
+ virtual void SimulateKeyPress( sal_uInt16 nKeyCode ) override;
+ virtual void SetParent( SalFrame* pNewParent ) override;
+ virtual bool SetPluginParent( SystemParentData* pNewParent ) override;
+ virtual void ResetClipRegion() override;
+ virtual void BeginSetClipRegion( sal_uLong nRects ) override;
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void EndSetClipRegion() override;
+
+ virtual void SetScreenNumber( unsigned int ) override;
+ virtual void SetApplicationID(const OUString &) override;
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Graphics.cxx b/vcl/unx/kf5/Kf5Graphics.cxx
new file mode 100644
index 000000000000..078fff82c31e
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Graphics.cxx
@@ -0,0 +1,45 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Graphics.hxx"
+
+Kf5Graphics::Kf5Graphics()
+{
+}
+
+Kf5Graphics::~Kf5Graphics()
+{
+}
+
+SalGraphicsImpl* Kf5Graphics::GetImpl() const
+{
+ return nullptr;
+}
+
+SystemGraphicsData Kf5Graphics::GetGraphicsData() const
+{
+ return SystemGraphicsData();
+}
+
+bool Kf5Graphics::supportsOperation( OutDevSupportType ) const
+{
+ return false;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Graphics.hxx b/vcl/unx/kf5/Kf5Graphics.hxx
new file mode 100644
index 000000000000..c3058f8f0bc0
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Graphics.hxx
@@ -0,0 +1,167 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <salgdi.hxx>
+
+class Kf5Frame;
+
+class Kf5Graphics : public SalGraphics
+{
+ Kf5Frame* mpFrame;
+
+public:
+ Kf5Graphics();
+ virtual ~Kf5Graphics() override;
+
+ virtual SalGraphicsImpl* GetImpl() const override;
+ virtual SystemGraphicsData
+ GetGraphicsData() const override;
+ virtual bool supportsOperation( OutDevSupportType ) const override;
+
+ virtual bool setClipRegion( const vcl::Region& ) override;
+ virtual void ResetClipRegion() override;
+
+ virtual void drawPixel( long nX, long nY ) override;
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor ) override;
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
+ virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
+ virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) override;
+ virtual bool drawPolyPolygon( const basegfx::B2DPolyPolygon&, double fTransparency ) override;
+ virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override;
+ virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override;
+ virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
+ virtual bool drawPolyLine(
+ const basegfx::B2DPolygon&,
+ double fTransparency,
+ const basegfx::B2DVector& rLineWidths,
+ basegfx::B2DLineJoin,
+ css::drawing::LineCap eLineCap,
+ double fMiterMinimumAngle) override;
+ virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override;
+
+ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ long nSrcHeight, bool bWindowInvalidate ) override;
+
+ virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
+ virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) override;
+ virtual void drawBitmap( const SalTwoRect& rPosAry,
+ const SalBitmap& rSalBitmap,
+ const SalBitmap& rTransparentBitmap ) override;
+ virtual void drawMask( const SalTwoRect& rPosAry,
+ const SalBitmap& rSalBitmap,
+ SalColor nMaskColor ) override;
+
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
+ virtual SalColor getPixel( long nX, long nY ) override;
+
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
+ virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
+
+ virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) override;
+
+ virtual bool blendBitmap( const SalTwoRect&,
+ const SalBitmap& rBitmap ) override;
+
+ virtual bool blendAlphaBitmap( const SalTwoRect&,
+ const SalBitmap& rSrcBitmap,
+ const SalBitmap& rMaskBitmap,
+ const SalBitmap& rAlphaBitmap ) override;
+
+ virtual bool drawAlphaBitmap( const SalTwoRect&,
+ const SalBitmap& rSourceBitmap,
+ const SalBitmap& rAlphaBitmap ) override;
+
+ bool drawTransformedBitmap(
+ const basegfx::B2DPoint& rNull,
+ const basegfx::B2DPoint& rX,
+ const basegfx::B2DPoint& rY,
+ const SalBitmap& rSourceBitmap,
+ const SalBitmap* pAlphaBitmap) override;
+
+ virtual bool drawAlphaRect( long nX, long nY, long nWidth,
+ long nHeight, sal_uInt8 nTransparency ) override;
+
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
+ virtual sal_uInt16 GetBitCount() const override;
+ virtual long GetGraphicsWidth() const override;
+
+ virtual void SetLineColor() override;
+ virtual void SetLineColor( SalColor nSalColor ) override;
+ virtual void SetFillColor() override;
+ virtual void SetFillColor( SalColor nSalColor ) override;
+ virtual void SetXORMode( bool bSet ) override;
+ virtual void SetROPLineColor( SalROPColor nROPColor ) override;
+ virtual void SetROPFillColor( SalROPColor nROPColor ) override;
+
+ // Text rendering + font support
+
+ virtual void SetTextColor( SalColor nSalColor ) override;
+ virtual void SetFont( const FontSelectPattern*, int nFallbackLevel ) override;
+ virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
+ virtual const FontCharMapRef GetFontCharMap() const override;
+ virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
+ virtual void GetDevFontList( PhysicalFontCollection* ) override;
+ virtual void ClearDevFontCache() override;
+ virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
+ virtual bool CreateFontSubset( const OUString& rToFile,
+ const PhysicalFontFace* pFont,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
+ sal_Int32* pWidths,
+ int nGlyphs,
+ FontSubsetInfo& rInfo // out parameter
+ ) override;
+
+ virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
+
+ virtual void GetGlyphWidths( const PhysicalFontFace*,
+ bool bVertical,
+ std::vector< sal_Int32 >& rWidths,
+ Ucs2UIntMap& rUnicodeEnc ) override;
+
+ virtual bool GetGlyphBoundRect(const GlyphItem&, tools::Rectangle&) override;
+ virtual bool GetGlyphOutline(const GlyphItem&, basegfx::B2DPolyPolygon&) override;
+
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) override;
+ virtual void DrawTextLayout( const CommonSalLayout& ) override;
+
+ // Native control support
+
+ virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) override;
+ virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart,
+ const tools::Rectangle& rControlRegion,
+ const Point& aPos, bool& rIsInside ) override;
+ virtual bool drawNativeControl( ControlType nType, ControlPart nPart,
+ const tools::Rectangle& rControlRegion,
+ ControlState nState, const ImplControlValue& aValue,
+ const OUString& aCaption ) override;
+ virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart,
+ const tools::Rectangle& rControlRegion, ControlState nState,
+ const ImplControlValue& aValue, const OUString& aCaption,
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion ) override;
+
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Graphics_Controls.cxx b/vcl/unx/kf5/Kf5Graphics_Controls.cxx
new file mode 100644
index 000000000000..b55f7f190e94
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Graphics_Controls.cxx
@@ -0,0 +1,51 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Graphics.hxx"
+
+bool Kf5Graphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
+{
+ return false;
+}
+
+bool Kf5Graphics::hitTestNativeControl( ControlType nType, ControlPart nPart,
+ const tools::Rectangle& rControlRegion,
+ const Point& aPos, bool& rIsInside )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawNativeControl( ControlType nType, ControlPart nPart,
+ const tools::Rectangle& rControlRegion,
+ ControlState nState, const ImplControlValue& aValue,
+ const OUString& aCaption )
+{
+ return false;
+}
+
+bool Kf5Graphics::getNativeControlRegion( ControlType nType, ControlPart nPart,
+ const tools::Rectangle& rControlRegion, ControlState nState,
+ const ImplControlValue& aValue, const OUString& aCaption,
+ tools::Rectangle &rNativeBoundingRegion,
+ tools::Rectangle &rNativeContentRegion )
+{
+ return false;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Graphics_GDI.cxx b/vcl/unx/kf5/Kf5Graphics_GDI.cxx
new file mode 100644
index 000000000000..7e4f6b0da183
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Graphics_GDI.cxx
@@ -0,0 +1,223 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Graphics.hxx"
+
+bool Kf5Graphics::setClipRegion( const vcl::Region& )
+{
+ return false;
+}
+
+void Kf5Graphics::ResetClipRegion()
+{
+}
+
+void Kf5Graphics::drawPixel( long nX, long nY )
+{
+}
+
+void Kf5Graphics::drawPixel( long nX, long nY, SalColor nSalColor )
+{
+}
+
+void Kf5Graphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
+{
+}
+
+void Kf5Graphics::drawRect( long nX, long nY, long nWidth, long nHeight )
+{
+}
+
+void Kf5Graphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry )
+{
+}
+
+void Kf5Graphics::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry )
+{
+}
+
+void Kf5Graphics::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry )
+{
+}
+
+bool Kf5Graphics::drawPolyPolygon( const basegfx::B2DPolyPolygon&, double fTransparency )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints,
+ const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawPolyLine(
+ const basegfx::B2DPolygon&,
+ double fTransparency,
+ const basegfx::B2DVector& rLineWidths,
+ basegfx::B2DLineJoin,
+ css::drawing::LineCap eLineCap,
+ double fMiterMinimumAngle)
+{
+ return false;
+}
+
+bool Kf5Graphics::drawGradient( const tools::PolyPolygon&, const Gradient& )
+{
+ return false;
+}
+
+void Kf5Graphics::copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ long nSrcHeight, bool bWindowInvalidate )
+{
+}
+
+void Kf5Graphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics )
+{
+}
+
+void Kf5Graphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
+{
+}
+
+void Kf5Graphics::drawBitmap( const SalTwoRect& rPosAry,
+ const SalBitmap& rSalBitmap,
+ const SalBitmap& rTransparentBitmap )
+{
+}
+
+void Kf5Graphics::drawMask( const SalTwoRect& rPosAry,
+ const SalBitmap& rSalBitmap,
+ SalColor nMaskColor )
+{
+}
+
+SalBitmap* Kf5Graphics::getBitmap( long nX, long nY, long nWidth, long nHeight )
+{
+ return nullptr;
+}
+
+SalColor Kf5Graphics::getPixel( long nX, long nY )
+{
+ return SalColor();
+}
+
+void Kf5Graphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags)
+{
+}
+
+void Kf5Graphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags )
+{
+}
+
+bool Kf5Graphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize )
+{
+ return false;
+}
+
+bool Kf5Graphics::blendBitmap( const SalTwoRect&,
+ const SalBitmap& rBitmap )
+{
+ return false;
+}
+
+bool Kf5Graphics::blendAlphaBitmap( const SalTwoRect&,
+ const SalBitmap& rSrcBitmap,
+ const SalBitmap& rMaskBitmap,
+ const SalBitmap& rAlphaBitmap )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawAlphaBitmap( const SalTwoRect&,
+ const SalBitmap& rSourceBitmap,
+ const SalBitmap& rAlphaBitmap )
+{
+ return false;
+}
+
+bool Kf5Graphics::drawTransformedBitmap(
+ const basegfx::B2DPoint& rNull,
+ const basegfx::B2DPoint& rX,
+ const basegfx::B2DPoint& rY,
+ const SalBitmap& rSourceBitmap,
+ const SalBitmap* pAlphaBitmap)
+{
+ return false;
+}
+
+bool Kf5Graphics::drawAlphaRect( long nX, long nY, long nWidth,
+ long nHeight, sal_uInt8 nTransparency )
+{
+ return false;
+}
+
+void Kf5Graphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
+{
+}
+
+sal_uInt16 Kf5Graphics::GetBitCount() const
+{
+ return 0;
+}
+
+long Kf5Graphics::GetGraphicsWidth() const
+{
+ return 0;
+}
+
+void Kf5Graphics::SetLineColor()
+{
+}
+
+void Kf5Graphics::SetLineColor( SalColor nSalColor )
+{
+}
+
+void Kf5Graphics::SetFillColor()
+{
+}
+
+void Kf5Graphics::SetFillColor( SalColor nSalColor )
+{
+}
+
+void Kf5Graphics::SetXORMode( bool bSet )
+{
+}
+
+void Kf5Graphics::SetROPLineColor( SalROPColor nROPColor )
+{
+}
+
+void Kf5Graphics::SetROPFillColor( SalROPColor nROPColor )
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Graphics_Text.cxx b/vcl/unx/kf5/Kf5Graphics_Text.cxx
new file mode 100644
index 000000000000..23eacc5ffda8
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Graphics_Text.cxx
@@ -0,0 +1,100 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Graphics.hxx"
+
+#include <vcl/fontcharmap.hxx>
+
+void Kf5Graphics::SetTextColor( SalColor nSalColor )
+{
+}
+
+void Kf5Graphics::SetFont( const FontSelectPattern*, int nFallbackLevel )
+{
+}
+
+void Kf5Graphics::GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel )
+{
+}
+
+const FontCharMapRef Kf5Graphics::GetFontCharMap() const
+{
+ return nullptr;
+}
+
+bool Kf5Graphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
+{
+ return false;
+}
+
+void Kf5Graphics::GetDevFontList( PhysicalFontCollection* )
+{
+}
+
+void Kf5Graphics::ClearDevFontCache()
+{
+}
+
+bool Kf5Graphics::AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName )
+{
+ return false;
+}
+
+bool Kf5Graphics::CreateFontSubset( const OUString& rToFile, const PhysicalFontFace* pFont,
+ const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding,
+ sal_Int32* pWidths, int nGlyphs, FontSubsetInfo& rInfo )
+{
+ return false;
+}
+
+const void* Kf5Graphics::GetEmbedFontData( const PhysicalFontFace*, long* pDataLen )
+{
+ return nullptr;
+}
+
+void Kf5Graphics::FreeEmbedFontData( const void* pData, long nDataLen )
+{
+}
+
+void Kf5Graphics::GetGlyphWidths( const PhysicalFontFace*, bool bVertical,
+ std::vector< sal_Int32 >& rWidths,
+ Ucs2UIntMap& rUnicodeEnc )
+{
+}
+
+bool Kf5Graphics::GetGlyphBoundRect( const GlyphItem&, tools::Rectangle& )
+{
+ return false;
+}
+
+bool Kf5Graphics::GetGlyphOutline( const GlyphItem&, basegfx::B2DPolyPolygon& )
+{
+ return false;
+}
+
+SalLayout* Kf5Graphics::GetTextLayout( ImplLayoutArgs&, int nFallbackLevel )
+{
+ return nullptr;
+}
+
+void Kf5Graphics::DrawTextLayout( const CommonSalLayout& )
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Instance.cxx b/vcl/unx/kf5/Kf5Instance.cxx
new file mode 100644
index 000000000000..344619994419
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Instance.cxx
@@ -0,0 +1,144 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <QtCore/QMetaType>
+#include <QtCore/QThread>
+#include <QtWidgets/QApplication>
+
+#include "Kf5Instance.hxx"
+#include "Kf5Frame.hxx"
+#include "Kf5Data.hxx"
+#include "Kf5Timer.hxx"
+#include "Kf5VirtualDevice.hxx"
+
+#include <vclpluginapi.h>
+#include <sal/log.hxx>
+
+#include <headless/svpdummies.hxx>
+#include <headless/svpbmp.hxx>
+
+Kf5Instance::Kf5Instance( SalYieldMutex* pMutex )
+ : SalGenericInstance( pMutex )
+{
+}
+
+Kf5Instance::~Kf5Instance()
+{
+}
+
+SalFrame* Kf5Instance::CreateChildFrame( SystemParentData* /*pParent*/, SalFrameStyleFlags nStyle )
+{
+ return new Kf5Frame( this, nullptr, nStyle );
+}
+
+SalFrame* Kf5Instance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
+{
+ return new Kf5Frame( this, pParent, nStyle );
+}
+
+void Kf5Instance::DestroyFrame( SalFrame* pFrame )
+{
+ delete pFrame;
+}
+
+SalObject* Kf5Instance::CreateObject( SalFrame*, SystemWindowData*, bool )
+{
+ return new SvpSalObject();
+}
+
+void Kf5Instance::DestroyObject( SalObject* pObject )
+{
+ delete pObject;
+}
+
+SalVirtualDevice* Kf5Instance::CreateVirtualDevice( SalGraphics* /* pGraphics */,
+ long &nDX, long &nDY,
+ DeviceFormat eFormat,
+ const SystemGraphicsData* /* pData */ )
+{
+ Kf5VirtualDevice* pVD = new Kf5VirtualDevice( eFormat, 1 );
+ pVD->SetSize( nDX, nDY );
+ return pVD;
+}
+
+SalTimer* Kf5Instance::CreateSalTimer()
+{
+ return new Kf5Timer();
+}
+
+SalSystem* Kf5Instance::CreateSalSystem()
+{
+ return new SvpSalSystem();
+}
+
+SalBitmap* Kf5Instance::CreateSalBitmap()
+{
+ return new SvpSalBitmap();
+}
+
+bool Kf5Instance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
+{
+ return false;
+}
+
+bool Kf5Instance::AnyInput( VclInputFlags nType )
+{
+ return false;
+}
+
+SalSession* Kf5Instance::CreateSalSession()
+{
+ return nullptr;
+}
+
+OUString Kf5Instance::GetConnectionIdentifier()
+{
+ return OUString();
+}
+
+void Kf5Instance::AddToRecentDocumentList(const OUString&, const OUString&, const OUString&)
+{
+}
+
+OpenGLContext* Kf5Instance::CreateOpenGLContext()
+{
+ return nullptr;
+}
+
+bool Kf5Instance::IsMainThread() const
+{
+ return qApp->thread() != QThread::currentThread();
+}
+
+extern "C" {
+ VCLPLUG_KF5_PUBLIC SalInstance* create_SalInstance()
+ {
+ OString aVersion( qVersion() );
+ SAL_INFO( "vcl.kf5", "qt version string is " << aVersion );
+
+ Kf5Instance* pInstance = new Kf5Instance( new SalYieldMutex() );
+
+ // initialize SalData
+ new Kf5Data( pInstance );
+
+ return pInstance;
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Instance.hxx b/vcl/unx/kf5/Kf5Instance.hxx
new file mode 100644
index 000000000000..56cc66677284
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Instance.hxx
@@ -0,0 +1,75 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <unx/geninst.h>
+
+class SalYieldMutex;
+class SalFrame;
+
+class Kf5Instance : public SalGenericInstance
+{
+public:
+ explicit Kf5Instance( SalYieldMutex* pMutex );
+ virtual ~Kf5Instance() override;
+
+ virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
+ virtual void DestroyFrame( SalFrame* pFrame ) override;
+
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) override;
+ virtual void DestroyObject( SalObject* pObject ) override;
+
+ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, long &nDX, long &nDY,
+ DeviceFormat eFormat, const SystemGraphicsData *pData = nullptr ) override;
+
+ virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
+ ImplJobSetup* pSetupData ) override;
+ virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) override;
+ virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) override;
+ virtual void DestroyPrinter( SalPrinter* pPrinter ) override;
+ virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) override;
+ virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) override;
+ virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) override;
+ virtual OUString GetDefaultPrinter() override;
+ virtual void PostPrintersChanged() override;
+
+ virtual SalTimer* CreateSalTimer() override;
+ virtual SalSystem* CreateSalSystem() override;
+ virtual SalBitmap* CreateSalBitmap() override;
+
+ virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override;
+ virtual bool AnyInput( VclInputFlags nType ) override;
+
+ virtual SalSession* CreateSalSession() override;
+
+ virtual OpenGLContext* CreateOpenGLContext() override;
+
+ virtual OUString GetConnectionIdentifier() override;
+
+ virtual void AddToRecentDocumentList( const OUString& rFileUrl, const OUString& rMimeType,
+ const OUString& rDocumentService ) override;
+
+ virtual GenPspGraphics *CreatePrintGraphics() override;
+
+ virtual bool IsMainThread() const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Instance_Print.cxx b/vcl/unx/kf5/Kf5Instance_Print.cxx
new file mode 100644
index 000000000000..e716c8953ec1
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Instance_Print.cxx
@@ -0,0 +1,265 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Instance.hxx"
+#include "Kf5Printer.hxx"
+
+#include <vcl/svapp.hxx>
+#include <vcl/timer.hxx>
+#include <printerinfomanager.hxx>
+
+#include <jobset.h>
+#include <print.h>
+#include <salptype.hxx>
+#include <saldatabasic.hxx>
+
+#include <unx/genpspgraphics.h>
+
+using namespace psp;
+
+/*
+ * static helpers
+ */
+
+static OUString getPdfDir( const PrinterInfo& rInfo )
+{
+ OUString aDir;
+ sal_Int32 nIndex = 0;
+ while( nIndex != -1 )
+ {
+ OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) );
+ if( aToken.startsWith( "pdf=" ) )
+ {
+ sal_Int32 nPos = 0;
+ aDir = aToken.getToken( 1, '=', nPos );
+ if( aDir.isEmpty() )
+ aDir = OStringToOUString( OString( getenv( "HOME" ) ), osl_getThreadTextEncoding() );
+ break;
+ }
+ }
+ return aDir;
+}
+
+inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); }
+
+static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
+{
+ pJobSetup->SetOrientation( rData.m_eOrientation == orientation::Landscape ? Orientation::Landscape : Orientation::Portrait );
+
+ // copy page size
+ OUString aPaper;
+ int width, height;
+
+ rData.m_aContext.getPageSize( aPaper, width, height );
+ pJobSetup->SetPaperFormat( PaperInfo::fromPSName(OUStringToOString( aPaper, RTL_TEXTENCODING_ISO_8859_1 )) );
+ pJobSetup->SetPaperWidth( 0 );
+ pJobSetup->SetPaperHeight( 0 );
+ if( pJobSetup->GetPaperFormat() == PAPER_USER )
+ {
+ // transform to 100dth mm
+ width = PtTo10Mu( width );
+ height = PtTo10Mu( height );
+
+ if( rData.m_eOrientation == psp::orientation::Portrait )
+ {
+ pJobSetup->SetPaperWidth( width );
+ pJobSetup->SetPaperHeight( height );
+ }
+ else
+ {
+ pJobSetup->SetPaperWidth( height );
+ pJobSetup->SetPaperHeight( width );
+ }
+ }
+
+ // copy input slot
+ const PPDKey* pKey = nullptr;
+ const PPDValue* pValue = nullptr;
+
+ pJobSetup->SetPaperBin( 0xffff );
+ if( rData.m_pParser )
+ pKey = rData.m_pParser->getKey( OUString( "InputSlot" ) );
+ if( pKey )
+ pValue = rData.m_aContext.getValue( pKey );
+ if( pKey && pValue )
+ {
+ int nPaperBin;
+ for( nPaperBin = 0;
+ pValue != pKey->getValue( nPaperBin ) &&
+ nPaperBin < pKey->countValues();
+ nPaperBin++ );
+ pJobSetup->SetPaperBin(
+ (nPaperBin == pKey->countValues()
+ || pValue == pKey->getDefaultValue())
+ ? 0xffff : nPaperBin);
+ }
+
+ // copy duplex
+ pKey = nullptr;
+ pValue = nullptr;
+
+ pJobSetup->SetDuplexMode( DuplexMode::Unknown );
+ if( rData.m_pParser )
+ pKey = rData.m_pParser->getKey( OUString( "Duplex" ) );
+ if( pKey )
+ pValue = rData.m_aContext.getValue( pKey );
+ if( pKey && pValue )
+ {
+ if( pValue->m_aOption.equalsIgnoreAsciiCase( "None" ) ||
+ pValue->m_aOption.startsWithIgnoreAsciiCase( "Simplex" )
+ )
+ {
+ pJobSetup->SetDuplexMode( DuplexMode::Off );
+ }
+ else if( pValue->m_aOption.equalsIgnoreAsciiCase( "DuplexNoTumble" ) )
+ {
+ pJobSetup->SetDuplexMode( DuplexMode::LongEdge );
+ }
+ else if( pValue->m_aOption.equalsIgnoreAsciiCase( "DuplexTumble" ) )
+ {
+ pJobSetup->SetDuplexMode( DuplexMode::ShortEdge );
+ }
+ }
+
+ // copy the whole context
+ if( pJobSetup->GetDriverData() )
+ rtl_freeMemory( const_cast<sal_uInt8*>(pJobSetup->GetDriverData()) );
+
+ sal_uInt32 nBytes;
+ void* pBuffer = nullptr;
+ if( rData.getStreamBuffer( pBuffer, nBytes ) )
+ {
+ pJobSetup->SetDriverDataLen( nBytes );
+ pJobSetup->SetDriverData( static_cast<sal_uInt8*>(pBuffer) );
+ }
+ else
+ {
+ pJobSetup->SetDriverDataLen( 0 );
+ pJobSetup->SetDriverData( nullptr );
+ }
+}
+
+SalInfoPrinter* Kf5Instance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
+ ImplJobSetup* pJobSetup )
+{
+ // create and initialize SalInfoPrinter
+ Kf5InfoPrinter* pPrinter = new Kf5InfoPrinter;
+
+ if( pJobSetup )
+ {
+ PrinterInfoManager& rManager( PrinterInfoManager::get() );
+ PrinterInfo aInfo( rManager.getPrinterInfo( pQueueInfo->maPrinterName ) );
+ pPrinter->m_aJobData = aInfo;
+ pPrinter->m_aPrinterGfx.Init( pPrinter->m_aJobData );
+
+ if( pJobSetup->GetDriverData() )
+ JobData::constructFromStreamBuffer( pJobSetup->GetDriverData(),
+ pJobSetup->GetDriverDataLen(), aInfo );
+
+ pJobSetup->SetSystem( JOBSETUP_SYSTEM_UNIX );
+ pJobSetup->SetPrinterName( pQueueInfo->maPrinterName );
+ pJobSetup->SetDriver( aInfo.m_aDriverName );
+ copyJobDataToJobSetup( pJobSetup, aInfo );
+ }
+
+ return pPrinter;
+}
+
+void Kf5Instance::DestroyInfoPrinter( SalInfoPrinter* pPrinter )
+{
+ delete pPrinter;
+}
+
+SalPrinter* Kf5Instance::CreatePrinter( SalInfoPrinter* pInfoPrinter )
+{
+ // create and initialize SalPrinter
+ Kf5Printer* pPrinter = new Kf5Printer( pInfoPrinter );
+ pPrinter->m_aJobData = static_cast<Kf5InfoPrinter*>(pInfoPrinter)->m_aJobData;
+
+ return pPrinter;
+}
+
+void Kf5Instance::DestroyPrinter( SalPrinter* pPrinter )
+{
+ delete pPrinter;
+}
+
+void Kf5Instance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
+{
+ PrinterInfoManager& rManager( PrinterInfoManager::get() );
+ static const char* pNoSyncDetection = getenv( "SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION" );
+ if( ! pNoSyncDetection || ! *pNoSyncDetection )
+ {
+ // #i62663# synchronize possible asynchronouse printer detection now
+ rManager.checkPrintersChanged( true );
+ }
+ ::std::vector< OUString > aPrinters;
+ rManager.listPrinters( aPrinters );
+
+ for( ::std::vector< OUString >::iterator it = aPrinters.begin(); it != aPrinters.end(); ++it )
+ {
+ const PrinterInfo& rInfo( rManager.getPrinterInfo( *it ) );
+ // create new entry
+ SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
+ pInfo->maPrinterName = *it;
+ pInfo->maDriver = rInfo.m_aDriverName;
+ pInfo->maLocation = rInfo.m_aLocation;
+ pInfo->maComment = rInfo.m_aComment;
+ pInfo->mpSysData = nullptr;
+
+ sal_Int32 nIndex = 0;
+ while( nIndex != -1 )
+ {
+ OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) );
+ if( aToken.startsWith( "pdf=" ) )
+ {
+ pInfo->maLocation = getPdfDir( rInfo );
+ break;
+ }
+ }
+
+ pList->Add( pInfo );
+ }
+}
+
+void Kf5Instance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
+{
+ delete pInfo;
+}
+
+void Kf5Instance::GetPrinterQueueState( SalPrinterQueueInfo* )
+{
+}
+
+OUString Kf5Instance::GetDefaultPrinter()
+{
+ PrinterInfoManager& rManager( PrinterInfoManager::get() );
+ return rManager.getDefaultPrinter();
+}
+
+void Kf5Instance::PostPrintersChanged()
+{
+}
+
+GenPspGraphics *Kf5Instance::CreatePrintGraphics()
+{
+ return new GenPspGraphics();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Printer.cxx b/vcl/unx/kf5/Kf5Printer.cxx
new file mode 100644
index 000000000000..ffa784280731
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Printer.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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Printer.hxx"
+
+bool Kf5InfoPrinter::Setup( SalFrame*, ImplJobSetup* )
+{
+ return false;
+}
+
+Kf5Printer::Kf5Printer( SalInfoPrinter* pInfoPrinter )
+ : PspSalPrinter( pInfoPrinter )
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Printer.hxx b/vcl/unx/kf5/Kf5Printer.hxx
new file mode 100644
index 000000000000..de1487db33a1
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Printer.hxx
@@ -0,0 +1,39 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <unx/genprn.h>
+
+class SalFrame;
+class ImplJobSetup;
+
+class Kf5InfoPrinter : public PspSalInfoPrinter
+{
+public:
+ virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) override;
+};
+
+class Kf5Printer : public PspSalPrinter
+{
+public:
+ Kf5Printer( SalInfoPrinter* pInfoPrinter );
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Timer.cxx b/vcl/unx/kf5/Kf5Timer.cxx
new file mode 100644
index 000000000000..4db725ec5ac3
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Timer.cxx
@@ -0,0 +1,65 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5Timer.hxx"
+#include <Kf5Timer.moc>
+
+#include <QtWidgets/QApplication>
+#include <QtCore/QThread>
+
+Kf5Timer::Kf5Timer()
+{
+ m_aTimer.setSingleShot( true );
+ // run the timer itself in the main / creator thread
+ connect( &m_aTimer, SIGNAL( timeout() ),
+ this, SLOT( timeoutActivated() ), Qt::QueuedConnection );
+ // QTimer::start() can be called only in its creator thread
+ connect( this, SIGNAL( startTimerSignal() ),
+ this, SLOT( startTimer() ), Qt::QueuedConnection );
+}
+
+Kf5Timer::~Kf5Timer()
+{
+}
+
+void Kf5Timer::timeoutActivated()
+{
+ CallCallback();
+}
+
+void Kf5Timer::startTimer()
+{
+ m_aTimer.start();
+}
+
+void Kf5Timer::Start( sal_uIntPtr nMS )
+{
+ m_aTimer.setInterval( nMS );
+ if( qApp->thread() == QThread::currentThread() )
+ startTimer();
+ else
+ Q_EMIT startTimerSignal();
+}
+
+void Kf5Timer::Stop()
+{
+ m_aTimer.stop();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5Timer.hxx b/vcl/unx/kf5/Kf5Timer.hxx
new file mode 100644
index 000000000000..0b08968743d9
--- /dev/null
+++ b/vcl/unx/kf5/Kf5Timer.hxx
@@ -0,0 +1,46 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <saltimer.hxx>
+#include <QtCore/QTimer>
+
+class Kf5Timer final : public QObject, public SalTimer
+{
+ Q_OBJECT
+
+ QTimer m_aTimer;
+
+private Q_SLOTS:
+ void timeoutActivated();
+ void startTimer();
+
+Q_SIGNALS:
+ void startTimerSignal();
+
+public:
+ Kf5Timer();
+ virtual ~Kf5Timer() override;
+
+ virtual void Start( sal_uIntPtr nMS ) override;
+ virtual void Stop() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5VirtualDevice.cxx b/vcl/unx/kf5/Kf5VirtualDevice.cxx
new file mode 100644
index 000000000000..866a49ba28d1
--- /dev/null
+++ b/vcl/unx/kf5/Kf5VirtualDevice.cxx
@@ -0,0 +1,60 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "Kf5VirtualDevice.hxx"
+
+Kf5VirtualDevice::Kf5VirtualDevice( DeviceFormat eFormat, double fScale )
+{
+}
+
+Kf5VirtualDevice::~Kf5VirtualDevice()
+{
+}
+
+SalGraphics* Kf5VirtualDevice::AcquireGraphics()
+{
+ return nullptr;
+}
+
+void Kf5VirtualDevice::ReleaseGraphics( SalGraphics* pGraphics )
+{
+}
+
+bool Kf5VirtualDevice::SetSize( long nNewDX, long nNewDY )
+{
+ return false;
+}
+
+bool Kf5VirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY,
+ sal_uInt8 * pBuffer )
+{
+ return false;
+}
+
+long Kf5VirtualDevice::GetWidth() const
+{
+ return 0;
+}
+
+long Kf5VirtualDevice::GetHeight() const
+{
+ return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kf5/Kf5VirtualDevice.hxx b/vcl/unx/kf5/Kf5VirtualDevice.hxx
new file mode 100644
index 000000000000..9bffaa12861b
--- /dev/null
+++ b/vcl/unx/kf5/Kf5VirtualDevice.hxx
@@ -0,0 +1,54 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <salvd.hxx>
+
+#include <basegfx/vector/b2ivector.hxx>
+
+#include <list>
+
+class Kf5Graphics;
+enum class DeviceFormat;
+
+class Kf5VirtualDevice : public SalVirtualDevice
+{
+ basegfx::B2IVector m_aFrameSize;
+ std::list< Kf5Graphics* > m_aGraphics;
+
+public:
+ Kf5VirtualDevice( DeviceFormat eFormat, double fScale );
+ virtual ~Kf5VirtualDevice() override;
+
+ // SalVirtualDevice
+ virtual SalGraphics* AcquireGraphics() override;
+ virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
+
+ virtual bool SetSize( long nNewDX, long nNewDY ) override;
+ virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY,
+ sal_uInt8 * pBuffer
+ ) override;
+
+ // SalGeometryProvider
+ virtual long GetWidth() const override;
+ virtual long GetHeight() const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */