vcl/inc/qt5/QtInstanceWidget.hxx |    1 +
 vcl/qt5/QtInstanceBuilder.cxx    |    2 ++
 vcl/qt5/QtInstanceEntry.cxx      |    2 +-
 vcl/qt5/QtInstanceLabel.cxx      |    2 +-
 vcl/qt5/QtInstanceTextView.cxx   |    2 +-
 vcl/qt5/QtInstanceWidget.cxx     |   11 +++++++++++
 6 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit c9d250ef724a358b9c7ab56d2188cd7e23cd121d
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Jan 22 23:28:17 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Jan 23 08:29:52 2025 +0100

    tdf#130857 qt weld: Support "Java Start Parameters" dialog
    
    Declare support for the InputDialog that can be triggered like
    this:
    
    1) "Tools" -> "Options" -> "Advanced"
    2) "Parameters"
    
    This means that native Qt widgets are used for that dialog
    now when using the qt5 or qt6 VCL plugin and starting LO with
    environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
    
    Change-Id: I8dd405bd2957bed8d0c58247285f8df848a89a48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180614
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx
index 0b6befb15f2f..08e3a49d09be 100644
--- a/vcl/qt5/QtInstanceBuilder.cxx
+++ b/vcl/qt5/QtInstanceBuilder.cxx
@@ -62,6 +62,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& 
rUIFile)
     static std::unordered_set<OUString> aSupportedUIFiles = {
         u"cui/ui/aboutdialog.ui"_ustr,
         u"cui/ui/insertrowcolumn.ui"_ustr,
+        u"cui/ui/javastartparametersdialog.ui"_ustr,
         u"cui/ui/namedialog.ui"_ustr,
         u"cui/ui/objecttitledescdialog.ui"_ustr,
         u"cui/ui/optnewdictionarydialog.ui"_ustr,
commit 89904461809e41262233ef9be73aa3c45d14c394
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Jan 22 23:23:39 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Jan 23 08:29:46 2025 +0100

    tdf#130857 qt weld: Support InputDialog
    
    Declare support for the InputDialog that can be triggered e.g. like
    this:
    
    1) "Tools" -> "Options" -> "Advanced"
    2) "Parameters"
    3) type anything in the "Java start parameter" edit
    4) confirm using "OK" button
    5) select the param in the list
    6) press the "Edit" button
    
    This means that native Qt widgets are used for that dialog
    now when using the qt5 or qt6 VCL plugin and starting LO with
    environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
    
    Change-Id: I74299b2a920a91508add971e09cc95d4c3c3b3b6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180613
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx
index 9f84c8ffcaac..0b6befb15f2f 100644
--- a/vcl/qt5/QtInstanceBuilder.cxx
+++ b/vcl/qt5/QtInstanceBuilder.cxx
@@ -90,6 +90,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& 
rUIFile)
         u"modules/swriter/ui/splittable.ui"_ustr,
         u"modules/swriter/ui/wordcount.ui"_ustr,
         u"sfx/ui/helpmanual.ui"_ustr,
+        u"sfx/ui/inputdialog.ui"_ustr,
         u"sfx/ui/licensedialog.ui"_ustr,
         u"sfx/ui/password.ui"_ustr,
         u"sfx/ui/querysavedialog.ui"_ustr,
commit a4ef8bb7cab6e4845b0ded20097e004530595275
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Jan 22 23:00:28 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu Jan 23 08:29:39 2025 +0100

    tdf#130857 qt weld: Implement setting font color
    
    Similar to the existing QtInstanceWidget::set_background,
    add a helper method QtInstanceWidget::setFontColor
    to set the font/foreground color, and call it from the
    subclasses that have a set_font_color method.
    
    With this in place, the "warningmsg" label in
    the "Security Level" tab
    (xmlsecurity/uiconfig/ui/securitylevelpage.ui)
    of the macro security dialog now shows with
    the font color that gets set in
    MacroSecurityLevelTP::SetWarningLabel in a WIP
    branch where support for that dialog is declared
    in QtInstanceBuilder.
    
    Change-Id: I100d4c708bd6d19e99870cd0c2158ce542326480
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180612
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/inc/qt5/QtInstanceWidget.hxx b/vcl/inc/qt5/QtInstanceWidget.hxx
index d20812f998c4..d2bc8823ecd4 100644
--- a/vcl/inc/qt5/QtInstanceWidget.hxx
+++ b/vcl/inc/qt5/QtInstanceWidget.hxx
@@ -168,6 +168,7 @@ public:
 
     virtual void set_highlight_background() override;
 
+    void setFontColor(const Color& rFontColor);
     virtual void set_background(const Color& rBackColor) override;
 
     virtual void draw(OutputDevice&, const Point&, const Size&) override;
diff --git a/vcl/qt5/QtInstanceEntry.cxx b/vcl/qt5/QtInstanceEntry.cxx
index bb27c84b6083..2228b9b67223 100644
--- a/vcl/qt5/QtInstanceEntry.cxx
+++ b/vcl/qt5/QtInstanceEntry.cxx
@@ -175,7 +175,7 @@ bool QtInstanceEntry::get_overwrite_mode() const
 
 void QtInstanceEntry::set_font(const vcl::Font&) { assert(false && "Not 
implemented yet"); }
 
-void QtInstanceEntry::set_font_color(const Color&) { assert(false && "Not 
implemented yet"); }
+void QtInstanceEntry::set_font_color(const Color& rColor) { 
setFontColor(rColor); }
 
 void QtInstanceEntry::cut_clipboard() { assert(false && "Not implemented 
yet"); }
 
diff --git a/vcl/qt5/QtInstanceLabel.cxx b/vcl/qt5/QtInstanceLabel.cxx
index d498e2000e7e..6e4029138bb7 100644
--- a/vcl/qt5/QtInstanceLabel.cxx
+++ b/vcl/qt5/QtInstanceLabel.cxx
@@ -49,6 +49,6 @@ void QtInstanceLabel::set_font(const vcl::Font&) { 
assert(false && "Not implemen
 
 void QtInstanceLabel::set_label_type(weld::LabelType) { assert(false && "Not 
implemented yet"); }
 
-void QtInstanceLabel::set_font_color(const Color&) { assert(false && "Not 
implemented yet"); }
+void QtInstanceLabel::set_font_color(const Color& rColor) { 
setFontColor(rColor); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/qt5/QtInstanceTextView.cxx b/vcl/qt5/QtInstanceTextView.cxx
index dc85c9850d01..8d771269b1e1 100644
--- a/vcl/qt5/QtInstanceTextView.cxx
+++ b/vcl/qt5/QtInstanceTextView.cxx
@@ -92,7 +92,7 @@ void QtInstanceTextView::set_max_length(int) { assert(false 
&& "Not implemented
 
 void QtInstanceTextView::set_font(const vcl::Font&) { assert(false && "Not 
implemented yet"); }
 
-void QtInstanceTextView::set_font_color(const Color&) { assert(false && "Not 
implemented yet"); }
+void QtInstanceTextView::set_font_color(const Color& rColor) { 
setFontColor(rColor); }
 
 bool QtInstanceTextView::can_move_cursor_with_up() const
 {
diff --git a/vcl/qt5/QtInstanceWidget.cxx b/vcl/qt5/QtInstanceWidget.cxx
index ab7782757cfd..7b4a1c79128e 100644
--- a/vcl/qt5/QtInstanceWidget.cxx
+++ b/vcl/qt5/QtInstanceWidget.cxx
@@ -590,6 +590,17 @@ void QtInstanceWidget::set_toolbar_background() { 
assert(false && "Not implement
 
 void QtInstanceWidget::set_highlight_background() { assert(false && "Not 
implemented yet"); }
 
+void QtInstanceWidget::setFontColor(const Color& rFontColor)
+{
+    SolarMutexGuard g;
+
+    GetQtInstance().RunInMainThread([&] {
+        QPalette aPalette = getQWidget()->palette();
+        aPalette.setColor(getQWidget()->foregroundRole(), 
toQColor(rFontColor));
+        getQWidget()->setPalette(aPalette);
+    });
+}
+
 void QtInstanceWidget::set_background(const Color& rBackColor)
 {
     SolarMutexGuard g;

Reply via email to