summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-01 10:29:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-01 15:00:16 +0200
commit5021a10f75870e7fa8f34e58512fd7c027debc68 (patch)
tree0c1d2e4d67a564ed09f206e79259ee41b500def4 /include/sfx2
parent5c23560ba39fe17c75cafe3d495af743238e4d67 (diff)
sfx2::FileDialogHelper allocate SfxItemSet on stack
and pass around the explicit sub-type, instead of doing static_cast in various places Change-Id: I28ba8fd6f5c9e2a1ffbf5ec091bcf0ebdd1d18b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/filedlghelper.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 356beb49c4ff..4985b7bf045e 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -32,6 +32,7 @@
#include <o3tl/typed_flags_set.hxx>
#include <memory>
+#include <optional>
#include <vector>
namespace com::sun::star::ui::dialogs
@@ -49,6 +50,7 @@ namespace weld { class Window; }
class Graphic;
class SfxFilter;
class SfxItemSet;
+class SfxAllItemSet;
enum class FileDialogFlags {
NONE = 0x00,
@@ -222,10 +224,10 @@ public:
DECL_LINK( ExecuteSystemFilePicker, void*, void );
ErrCode Execute( std::vector<OUString>& rpURLList,
- std::unique_ptr<SfxItemSet>& rpSet,
+ std::optional<SfxAllItemSet>& rpSet,
OUString& rFilter,
const OUString& rDirPath );
- ErrCode Execute( std::unique_ptr<SfxItemSet>& rpSet,
+ ErrCode Execute( std::optional<SfxAllItemSet>& rpSet,
OUString& rFilter );
};
@@ -239,7 +241,7 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent,
FileDialogFlags nFlags,
std::vector<OUString>& rpURLList,
OUString& rFilter,
- std::unique_ptr<SfxItemSet>& rpSet,
+ std::optional<SfxAllItemSet>& rpSet,
const OUString* pPath,
sal_Int16 nDialog,
const OUString& rStandardDir,