[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source vcl/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 2 06:24:03 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 2db1de7dd1b460ace3fe39bd8de8017bd48b00ff
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: Thu Jul 2 08:23:30 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>

diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx
index 09ac8ed94c70..19ee4ad78009 100644
--- a/sw/source/uibase/dialog/watermarkdialog.cxx
+++ b/sw/source/uibase/dialog/watermarkdialog.cxx
@@ -20,6 +20,10 @@
 #include <svl/eitem.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")
@@ -32,6 +36,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 a840305bc4fe..6cc2c91d137c 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -156,7 +156,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