diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2022-09-12 12:58:20 +0300 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-11-21 11:45:10 +0100 |
commit | 67eb60672936a10fba840078e6aca918c3331f52 (patch) | |
tree | be75c38f175d682aa4834d9064cb11171604c13a /include | |
parent | 2adaac8bf01a6caffd0eedb9f456eeadc43f1759 (diff) |
lok: make properties>change password dialog async
* We now can set a password through properties->change password
without having to have a password initially only for online
because it needs a created file already, online works with files
that are created before loading but the desktop does not need this.
* The same dialog is still used as non-async for desktop version
because it goes through an InteractionHandler and the result is
expected not from the dialog but from the interaction handler.
Therefore, making it async there did not make sense.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I3d02822be0b71836b1592abca191b3b1c5f6374e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139884
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142991
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/dinfdlg.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/filedlghelper.hxx | 4 | ||||
-rw-r--r-- | include/vcl/abstdlg.hxx | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 7cbf5433eaa7..4d7487f554f4 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -39,6 +39,7 @@ #include <optional> #include <memory> +#include <vcl/abstdlg.hxx> namespace com::sun::star::beans { struct PropertyValue; } @@ -197,6 +198,7 @@ private: virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet* ) override; + VclPtr<AbstractPasswordToOpenModifyDialog> m_xPasswordDialog; public: SfxDocumentPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&); diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index 13593bae0358..c89da31ab953 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -306,6 +306,10 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent, css::uno::Reference<css::ui::dialogs::XFolderPicker2> SFX2_DLLPUBLIC createFolderPicker(const css::uno::Reference<css::uno::XComponentContext>& rContext, weld::Window* pPreferredParent); ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString const & aURL, SfxItemSet* pSet, const css::uno::Reference<css::awt::XWindow>& rParent); +ErrCode SetPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, + SfxItemSet* pSet, const OUString& rPasswordToOpen, std::u16string_view rPasswordToModify); +bool IsOOXML(const std::shared_ptr<const SfxFilter>& pCurrentFilter); +bool IsMSType(const std::shared_ptr<const SfxFilter>& pCurrentFilter); } #endif diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx index 79b2b32a9836..cb4de91f88e4 100644 --- a/include/vcl/abstdlg.hxx +++ b/include/vcl/abstdlg.hxx @@ -99,6 +99,7 @@ public: virtual OUString GetPasswordToOpen() const = 0; virtual OUString GetPasswordToModify() const = 0; virtual bool IsRecommendToOpenReadonly() const = 0; + virtual void Response(sal_Int32) = 0; }; class VCL_DLLPUBLIC AbstractScreenshotAnnotationDlg : public VclAbstractDialog |