1325 Commits
Author SHA1 Message Date
Michael Weghorn 6a023bacb9 Return std::unique_ptr in Application::CreateMessageDialog
The caller of Application::CreateMessageDialog owns the
returned message dialog.

So far, it was returned by a plain weld::MessageDialog*.

Return a unique_ptr instead, to make clear the ownership
semantics. (Also adjust SalInstance::CreateMessageDialog
accordingly, which is called by Application::CreateMessageDialog
and implements the actual logic to create a message dialog.)

Adjust callers where needed.
Most callers were already using a smart pointer for the
returned message dialog anyway.

Change-Id: I7c06bb24b611bd67f5af89800adb13bf22dcc6fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211013
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 10:35:19 +02:00
Xisco Fauli 9fd700da99 cid#1700593: Unchecked return value from library
Change-Id: I82c3ed257aae2147cae333cea4b0208a9917feaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210368
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-02 01:02:34 +02:00
Xisco Fauli 1d1cfdec9f cid#1700582: silence Unchecked return value from library
Change-Id: Ie4ff636f0b1da6a9e0209c4b9193e29b5a743950
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210279
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 15:55:02 +02:00
Andrea Gelmini 6bb724ef62 Fix typos
Change-Id: Ib6b614eb0c854676a859dfb6369b3c5f4c005a02

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209811
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:59:45 +02:00
Mike Kaganski a07b3ece98 tdf#171253: close socket gracefully
I believe that the problem was closing the socket too fast, before OS
could finish its IO; that resulted in TCP Reset (RST) instead of FIN,
and browser showed connection error.

This change implements a graceful shutdown, by closing the sending
half, then using an expiring wait for the peer's ACK/FIN. I suppose
that 5 s timeout is reasonable for local operations.

In fact, I wasn't able to reproduce the problem after commit id
I16efa58ba90b98e71b13a0081dcdcc9d660db0b6 (tdf#101630: Make local
HTTP server cross-platform, using boost/beast); but it could be only
because of HW performance, and I hope the change follows "best
practices".

Change-Id: Ic3e9cf4e841d254197129ea7905527e97cae481a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201715
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 40a71882e983ac28782293cc036479e405e66a1c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201821
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-28 23:23:47 +02:00
Mike Kaganski 645df7d9b7 tdf#101630: Make local HTTP server cross-platform, using boost/beast
Allows proper Google Drive authentication e.g. on Linux.

Change-Id: I16efa58ba90b98e71b13a0081dcdcc9d660db0b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201714
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201820
2026-07-28 23:23:28 +02:00
Michael Weghorn f1f6a505a0 weld: Pass weld::TextWidget& in text change callback/handler
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.

This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.

That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before

    Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jul 9 13:08:58 2026 +0200

        tdf#130857 weld: Don't signal about programmatic TextView text change
.)

Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-10 18:17:27 +02:00
Stephan Bergmann d8cd81b6cc Remove some broken gb_CppunitTest_set_include
...which all mentioned the wrong desktop_dialogs_test, so demonstratedly were
not missed by their respective CppunitTest_*.mk files, so can just go

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I8bbff02a50654c214d88635a3dc91553534a78e9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4969
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 99a2f9d3f14fa4c1247103a8dbafce439000c592)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207110
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-22 16:04:10 +02:00
Michael Weghorn dd79eebe34 Commit result of running ui-rules-enforcer
Commit changes automatically done when running
the the UI rules enforcer:

    for a in `git ls-files "*.ui"`; do bin/ui-rules-enforcer.py $a; done

Change-Id: I9c9bed95fc30fb1ba66056fc2508d96fa0d778f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206972
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-20 22:23:37 +02:00
Noel Grandin b1712dadb7 the depth parameter to the configmgr open call has never done anything
Change-Id: I74c803a93f561d09d6ec8cccc9bdc764596f321a
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3591
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 758e96b21b067487931bb1e1f3c49815e976955e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206438
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 11:17:33 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 8f7cf9c32c weld: Move weld::CheckButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Add missing includes/forward declarations in places
previously depending on transitive includes that
are now dropped.

Change-Id: I3215b358e0fa45ffce08756218c386e1a4d7ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205928
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-04 08:39:19 +02:00
Michael Weghorn 1d271b2c15 weld: Move weld::ToggleButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I52a953858a997f8549d12fa3d6ed23cc1fb236c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205904
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-03 23:20:02 +02:00
Michael Weghorn da1c7a5459 weld: Move weld::RadioButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I34876c5bef75e30e758029b0fe5afeecc92d509d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205903
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:54 +02:00
Xisco Fauli 8a91868e21 drop JSDialog machinery
It's no longer needed and not used internally

Change-Id: Iecb0d1055fd6c61d0c34ffb8afc670ab9d5fe899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205908
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:18 +02:00
Michael Weghorn 336f70f966 weld: Move weld::Label to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ide86f35543468a88288a068cc9f89eaf381ac52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205763
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-27 22:24:37 +02:00
Michael Weghorn b2ce99c623 weld: Move weld::Image to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I2eb564b2483b052f01d4af55fd4feb00b5ed6031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205472
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-22 21:55:53 +02:00
Michael Weghorn 3315556e6a weld: Move weld::LevelBar to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ie5bd9f20c6802301614a9ccbe327797a59e3932b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205465
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-05-22 21:55:31 +02:00
Michael Weghorn 3f1fb9d4b0 weld: Move weld::Window to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: If7cb4403f1861c465f44a1cae4065b0bf8dfad48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205323
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-05-19 09:10:43 +02:00
Michael Weghorn fbcfd00fb7 weld: Move weld::Dialog to own header/source
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ic47dac553fc065c5c9cddbf31e33012314dbe43d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199073
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-02-11 07:32:57 +01:00
Michael Weghorn ab3635b2f3 weld: Move weld::MessageDialog to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I5b23b02151c75bb49831a2bbf8d515eb0b54415e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199068
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-02-11 07:32:45 +01:00
Gabor Kelemen 495fa42afa tdf#146619 Use more forward declarations in include/vcl/weld/
after recent split of these headers

This shaves off another 150M input

Change-Id: Ia4e42781cdc6fd6e795c9fb55c6c24dd641b8f0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197339
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-31 11:06:42 +01:00
Xisco Fauli 84a59903e2 uui: simplify code a bit
* No need to use an array
* No need to call set_from_icon_name in the constructor.
Both toggles are not active at that point and
the .ui file already uses
<property name="icon-name">res/hidepass.png</property>
for both of them

Change-Id: I3e956c0d0101e8a8d1de6bccb7ec0e397f0aa712
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198007
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-01-23 18:57:19 +01:00
Gabor Kelemen 31ea498486 tdf#146619 Use more forward declarations in include/vcl/[q-w]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[q-w]*

This shaves off about 100M input

Change-Id: Ib4d0af44b383d34d856a9797fe70a974b359402f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196398
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-18 00:33:10 +01:00
Michael Weghorn ffc8326e99 weld: Move weld::Entry to own header/source
Move the class out of weld.hxx into its own header and source
file, in order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: I27033905fe8be1c3646c8cf08799c9bf53eeb471
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196448
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-01-04 15:03:39 +01:00
Michael Weghorn 5454b7ed94 weld: Move weld::DialogController and subclasses to own header/source
This is also in preparation of moving weld::Builder to
its own header.

Change-Id: Icb65ee85376d17e1abead2c6339f78b129112d0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195841
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-12-18 19:44:41 +01:00
Michael Weghorn 4e630100fd weld: Move weld::TreeView to its own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ifbd413fc8dcfe5e453a0fef8a04f3c396af4c836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195781
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-12-17 18:20:41 +01:00
Michael Weghorn 5b16b3acc6 weld: Move weld.hxx and weldutils.hxx to new include/vcl/weld subdir
This is in preparation of moving code out of weld.hxx
to separate headers/source files, in order to make it
easier to keep an overview and to avoid having to
recompile ~all UI code when anything changes.

Also move weldutils.cxx to a new vcl/source/weld
directory.

Change-Id: Ia75b42f21e560dd248307282a522f186a64cd742
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195777
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-12-17 18:20:13 +01:00
varshneydevansh 9bcc5970b7 tdf#132007: Refine password prompt dialog UI and text
Refines the password dialog for a cleaner user experience.

The main prompt now shows just the filename instead of the full path.
A the label clarifies whether a password to "open" or "edit" the
file is needed.

The OK button is disabled until a password is entered.

Change-Id: I1288fc94b81984b32f9ade33bd0cd52aa4439b1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163924
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2025-11-07 15:41:27 +01:00
Michael Weghorn fef506cb5c Bump minimum GTK version in .ui files to 3.24
... in line with previous commit

    Change-Id: Ib2b0d83b1a40b121660ffe04baf3eeb0bebe0da1
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Nov 5 17:44:57 2025 +0100

        gtk3: Require GTK >= 3.24

that makes it a requirement in code.

Change-Id: Ib2b9e6da2a834b0d9ddddd6b8a64142b8b5de153
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193478
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-11-05 23:31:08 +01:00
Mike Kaganski 964bcfa287 tdf#101630: Use redirect URL for browser-based OAuth2
To interact with an OAuth2 provider, we must open a browser with the
URL of the provider, and in that URL encode our target URL to use to
send information about the result of authentication (either failure,
or the access tokens).

The target URL can either be an HTTP URL, or a custom URI scheme [1].
The custom scheme looks attractive, because it doesn't need to listen
to HTTP, and would receive the data through command line arguments.
However, this technique requires to register a custom URI handler on
the system; and that can't be done temporarily, for the current app,
on some platforms; so if we decided to use the custom URI scheme, it
would only work for installed app, not for portable one.

Using HTTP URL, it can be either an external one (which would require
to run an online service for authentication, which would receive the
data from OAuth2 providers, and then communicate it to the app that
requested it - with all kinds of security implications), or it can be
a loopback URL to a local HTTP server. The latter option has no HTTPS
requirement (the sensitive data is sent through HTTP locally, never
leaving the host; the problem with HTTPS is that we would need a cert
for the local system, trusted by browsers); that is implemented here:
a local server is established by the app itself, before sending the
auth request.

This change only provides implementation for Windows. To have a cross-
platform solution, another HTTP server implementation is needed, e.g.
using boost/beast.

This also removes password prompt from the File Services dialog for
Google Drive and OneDrive, when the new method is implemented (i.e.,
currently only on Windows).

[1] https://www.oauth.com/oauth2-servers/oauth-native-apps/redirect-urls-for-native-apps/

Change-Id: I4684477c73a54370721e700fa95fc5f14344cf60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192253
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-26 16:54:25 +01:00
Mike Kaganski fdd24dabb6 tdf#145967: Initial support for docs with restricted embedded fonts
Previously, we silently discarded fonts which rights disallowed editing
of documents. This change introduces a choice, where user can opt to
either discard the restricted fonts, or switch to read-only mode.

1. When user opens a document with restricted embedded fonts, which are
   already installed on the system, those fonts are not considered as
   restricted.

2. Trying to switch to edit mode will show the dialog again, allowing
   to discard those fonts to allow editing.

3. Saving the document will discard restricted fonts not installed on
   the system in any case.

4. Even though saving discards those fonts from file, it doesn't switch
   to edit mode, because it doesn't reload the document, that is needed
   to reload embedded font data (and release respective font files).

5. Opening a document initially in read-only mode skips the dialog.

TODO: avoid showing those fonts in the font lists.

Change-Id: Ia7c9b6c3f727720e64e4df8d1c4a8e3641b067bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189366
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-08-12 14:14:52 +02:00
Michael Weghorn 6f1911197c clang-format uui/source/masterpassworddlg.cxx
It's almost conformant already.

Change-Id: I1313080acd3f61d73bf39e158eefa591e2987486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188879
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-08-04 09:00:56 +02:00
Michael Weghorn 9a3e9b8cf4 tdf#130857 uui: Don't show msg box in MasterPasswordDialog ctor
Move the logic to show the message dialog that the
password was previously entered incorrectly out of
the MasterPasswordDialog ctor and to the only caller
instead.

This avoids the issue seen with the qt6 VCL plugin
and SAL_VCL_QT_USE_WELDED_WIDGETS=1 as described in
previous commit

    Change-Id: Ibf12c9450902058271559b65b1307d4792901485
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sat Aug 2 23:20:52 2025 +0200

        tdf#130857 qt weld: Support "Enter Master Password" dialog

        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.

        The dialog can be triggered as follows:

        * "Tools" -> "Options"
        * "LibreOfficDev" -> "Security"
        * enable the "Persistenly save passwords for web connections"
          checkbox
        * type the same password twice and confirm to close the dialog
        * click the "Master Password" button

        When entering the wrong password, another instance
        of the dialog is currently shown right away, hiding
        the message dialog telling that the initially entered
        password is wrong. This will be addressed in a separate
        commit.

Change-Id: I57f3499c1a451e8a9b5d8855d3ed8b63d09192fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188878
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-08-04 09:00:50 +02:00
Gabor Kelemen 681b1e5db9 Remove obsolete fw declarations from UnoControls/ unotools/ unoxml/ uui/
found with bin/find-unneeded-includes --fwdecl

Change-Id: I0cd96494bc3e2bdee4d1ed7ee14762d06b702f8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184007
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-05-20 08:10:27 +02:00
Michael Weghorn f6a96d91e3 tdf#130857 uui: Move showing warning dialog out of PasswordDialog ctor
Move logic to show a warning dialog that the (previously entered)
password was incorrect from the PasswordDialog ctor to the
executePasswordDialog function which calls the ctor.

As the dialog is meant to be shown before the PasswordDialog,
there is no reason to have the logic in the ctor, and (while
the underlying issue is potentially a Qt bug) this
helps avoid the problem described in previous commit

Change-Id: I9d1ffeaf48380aa4849e3cb771f6ff517d588790
Author: Michael Weghorn <m.weghorn@posteo.de>
Date:   Mon Apr 7 15:23:02 2025 +0200

    tdf#130857 qt weld: Support PasswordDialog

> When typing an incorrect password and confirming using
> the OK button, the dialog is oddly shown as "Set Password"
> dialog on top of the warning dialog ("The password is incorrect.
> The file cannot be opened.") when using qt6, which is not the
> case for qt5.
> This will be addressed in a separate commit.

which is somehow caused by both dialogs using the same
parent.
(It wouldn't occur e.g. when not setting a parent for
one of them.)

Change-Id: Iba10d44294c5c94f3fb7f8ce7aaf9135d1113736
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183796
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-08 09:26:59 +02:00
Shardul Vikram Singh 85bfc66f54 tdf#74580 Simplify passing "Edit Filter Settings" to Filter Dialog
Simplify passing the checkbox state of "Edit Filter Settings" to
the Filter Dialog via ContextLayer.

Change-Id: I6dd581a530de9e8634d515295d2dab978b1c8f8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183646
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-04-03 22:57:01 +02:00
Shardul Vikram SinghandMike Kaganski bd1c60bcf2 [API CHANGE] tdf#74580 Add option to skip filter settings dialog
Introduce a new set of setting under org.openoffice.Office.UI/FilePicker
to control whether the settings dialogs of filters always appears. Add an
"Edit Filter Settings" checkbox to the File Open dialog, using the new API
constant FILEOPEN_READONLY_VERSION_FILTEROPTIONS (TemplateDescription.idl)
to show additional controls: "Read Only", "Filter Options", and "Version"
listbox.

Modify the Calc's Text Import filter settings dialog to include an "Always
Show on Import" checkbox.

Co-authored-by: Mike Kaganski <mike.kaganski@collabora.com>

Change-Id: Ic7bea0036ae2db8f8ab223f48499fb0cc8b18425
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183055
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2025-03-28 14:50:32 +01:00
Karthik bbd3f8063f tdf#146947 Add show/reveal toggle to "Enter Password" dialog
Implemented password visibility toggle button in "Enter Password" dialog. When you open an encrypted file you will see this dialog.

Change-Id: Id736a1224b5254d5f3c1ae3a96353ed65023d2c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182694
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2025-03-13 16:41:42 +01:00
Stephan Bergmann b811b283c2 Extend the Link DBG_UTIL support to non-member function Links
...so that they don't report "unknown" (and make empty links report "empty"
instead, for clarification).  This introduces a new LINK_NONMEMBER macro; the
non-default Link ctor should no longer be used directly, so make it private.

Change-Id: I4ae99758de57adb8569ce98cb3824e875b26c959
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180593
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-23 12:40:26 +01:00
Michael Weghorn c5f360a8f6 tdf#130857 uui: Drop empty GtkSizeGroup from password.ui
As the GtkSizeGroup [1] says:

> GtkSizeGroup provides a mechanism for grouping a number of widgets
> together so they all request the same amount of space. This is typically
> useful when you want a column of widgets to have the same size, but you
> can’t use a GtkGrid widget.

However, "sizegroup1" in this .ui file is empty, i.e.
doesn't group any widgets that should be the same size,
so drop it altogether.

[1] https://docs.gtk.org/gtk3/class.SizeGroup.html

Change-Id: I9ffa6d0d302c08c6668b40847dde04de11fb24cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176737
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-19 07:53:18 +01:00
Noel Grandin a34d9e3619 loplugin:reftotemp in scripting..uui
Change-Id: I6953958b4429dd0fa1a44d02b0b49618f97baf90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176500
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-13 06:35:19 +01:00
Miklos Vajna 5130d240be cool#9956 uui lok: avoid showing the password dialog for now
Select some HTML content on a password-protected webpage that has
images, copy, paste into Writer when it's in LOK mode -> hang.

What seems to happen is that the HTML content itself is on the
clipboard, but not resources referred by that content, like images.
Which means our code in SwHTMLParser::InsertImage() will at the end call
into ucb/ code to get the HTTP image, which will call into uui/ code to
ask for the password. This has multiple problems: 1) the popup dialog is
not async (and not trivial to convert to async) and the dialog hints
that the password can be saved, but LOK document edit sessions always
start from a clean profile, so that's not working. The non-async dialog
even results in a hang in practice.

Fix the problem by not showing the password dialog in the LOK case at
all: it's better to have an image placeholder in the paste result than
hanging your entire document edit session.

Non-password-protected images continue to work, unless
HostFilter::isForbidden() rejects the URL.

Change-Id: I1e55ab7adecd9c90ba38a97bcdc52b2b01f7ff2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172781
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-03 11:28:13 +02:00
Moritz Duge fb56e1e284 tdf#161909: Escape filepaths for password dialog.
For example needed for underscores which are removed by VCL=gtk3 when
interpreted as mnemonics.

Change-Id: Ic80b64efc81ab5a219b1db1395974a4b59c46833
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171497
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-07 09:29:06 +02:00
Moritz Duge 25331a0e4a Resave with newer Glade version
Change-Id: I225dba56297d8b8022eb02ea296cda72c57cd306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171496
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-08-05 21:13:08 +02:00
Michael Stahl 3b7b1fedd7 uui: improve Authentication dialog
"Remember password" will also remember whether the "Use system
credentials" was checked.  Rename it to "Remember credentials" and place
it at the bottom of the dialog.

Change-Id: I672715edfa2080a325a0c492b53d6461591e1192
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170752
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-07-19 19:53:09 +02:00
Bogdan Buzea 2ffd958fcd Resave with newer Glade version
Change-Id: I502cda571288fa8b4a1aeaffe78705e47de5d379
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169601
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2024-06-30 12:39:04 +02:00
Michael Stahl b02eb998c1 uui,ucb: webdav-curl: display curl error message on connection failure
Show this in the dialog, which requires extending DAVException to store
2 strings for this case.

Store it in the Exception::Message member of
InteractiveNetworkConnectException, which appears to be unused.

Add another UI string ERRCODE_INET_CONNECT_MSG so that the text can be
shown optionally in the dialog.

Change-Id: Iaf139d77051e7480113eb4df82ef40eb498f329e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169278
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-06-21 11:35:51 +02:00
Noel Grandin 4a19fefaee loplugin:ostr in uui
Change-Id: I17bab541e4efb6cff0818ee0fad48800d7ff73be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-16 08:49:53 +02:00
Gabor Kelemen 8cda679913 tdf#146619 Drop unused 'using namespace com::sun::star'
now that find-unused-includes was expanded with detecting these

Change-Id: I9f21ad1a85c1e3178cad98464b2ba407d909b62d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167638
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2024-05-16 08:35:34 +02:00