[Libreoffice-commits] core.git: sw/source vcl/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 14 14:07:30 UTC 2020
sw/source/uibase/dialog/watermarkdialog.cxx | 12 ++++++++++++
vcl/source/window/builder.cxx | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
New commits:
commit d52fab0e1cb80fb1be775887585fede5dfffb60f
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Mar 10 16:23:51 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Jul 14 16:06:44 2020 +0200
jsdialog: enable watermark dialog
Change-Id: I4badd0d2f6c9c0d2828152685aa14c2e1d358fea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97623
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98230
Tested-by: Jenkins
diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx
index d558d0c6de8f..46dc847c0746 100644
--- a/sw/source/uibase/dialog/watermarkdialog.cxx
+++ b/sw/source/uibase/dialog/watermarkdialog.cxx
@@ -19,6 +19,10 @@
#include <vcl/svapp.hxx>
#include <sfx2/watermarkitem.hxx>
#include <svtools/ctrltool.hxx>
+#include <comphelper/lok.hxx>
+#include <sfx2/lokhelper.hxx>
+
+#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && SfxViewShell::Current()->isLOKMobilePhone())
SwWatermarkDialog::SwWatermarkDialog(weld::Window* pParent, SfxBindings& rBindings)
: SfxDialogController(pParent, "modules/swriter/ui/watermarkdialog.ui", "WatermarkDialog")
@@ -31,6 +35,14 @@ SwWatermarkDialog::SwWatermarkDialog(weld::Window* pParent, SfxBindings& rBindin
, m_xColor(new ColorListBox(m_xBuilder->weld_menu_button("Color"), m_xDialog.get()))
{
InitFields();
+
+ if (IS_MOBILE)
+ {
+ m_xBuilder->weld_label("ColorLabel")->hide();
+ m_xColor->hide();
+ m_xBuilder->weld_button("cancel")->hide();
+ m_xBuilder->weld_button("help")->hide();
+ }
}
SwWatermarkDialog::~SwWatermarkDialog()
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index d6fa4a3dae60..5738891c6c7f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -164,7 +164,8 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString
if (bMobile)
{
if (rUIFile == "modules/swriter/ui/wordcount-mobile.ui" ||
- rUIFile == "svx/ui/findreplacedialog-mobile.ui")
+ rUIFile == "svx/ui/findreplacedialog-mobile.ui" ||
+ rUIFile == "modules/swriter/ui/watermarkdialog.ui")
bUseJSBuilder = true;
}
More information about the Libreoffice-commits
mailing list