19#ifndef INCLUDED_SFX2_FILEDLGHELPER_HXX
20#define INCLUDED_SFX2_FILEDLGHELPER_HXX
25#include <com/sun/star/uno/Sequence.hxx>
28#include <rtl/ustring.hxx>
42 struct FilePickerEvent;
43 struct DialogClosedEvent;
75class FileDialogHelper_Impl;
140 static OUString contextToString(Context context);
156 const OUString& rFactory,
163 const OUString& rFactory,
167 const OUString& rStandardDir,
168 const css::uno::Sequence< OUString >& rDenyList,
173 const OUString& aFilterUIName,
174 std::u16string_view aExtName,
175 const OUString& rStandardDir,
176 const css::uno::Sequence< OUString >& rDenyList,
187 sal_Int16 GetDialogType()
const;
188 bool IsPasswordEnabled()
const;
189 OUString GetRealFilter()
const;
191 void SetTitle(
const OUString& rNewTitle );
199 css::uno::Sequence< OUString > GetMPath()
const;
202 css::uno::Sequence< OUString > GetSelectedFiles()
const;
204 void AddFilter(
const OUString& rFilterName,
const OUString& rExtension );
205 void SetCurrentFilter(
const OUString& rFilter );
217 void SetDisplayDirectory(
const OUString& rPath );
228 void SetDisplayFolder(
const OUString& _rURL );
242 void SetFileName(
const OUString& _rFileName );
244 OUString GetCurrentFilter()
const;
245 OUString GetDisplayDirectory()
const;
248 const css::uno::Reference < css::ui::dialogs::XFilePicker3 >& GetFilePicker()
const;
251 void FileSelectionChanged();
252 void DirectoryChanged();
253 virtual void ControlStateChanged(
const css::ui::dialogs::FilePickerEvent& aEvent );
254 void DialogSizeChanged();
255 static OUString HelpRequested(
const css::ui::dialogs::FilePickerEvent& aEvent );
258 void DialogClosed(
const css::ui::dialogs::DialogClosedEvent& _rEvent );
268 void SetControlHelpIds(
const sal_Int16* _pControlId,
const char** _pHelpId );
269 void CreateMatcher(
const OUString& rName );
277 void SetContext( Context _eNewContext );
282 std::optional<SfxAllItemSet>& rpSet,
284 const OUString& rDirPath );
289#define SFX2_IMPL_DIALOG_CONFIG 0
290#define SFX2_IMPL_DIALOG_SYSTEM 1
291#define SFX2_IMPL_DIALOG_OOO 2
292#define SFX2_IMPL_DIALOG_REMOTE 3
295 sal_Int16 nDialogType,
297 std::vector<OUString>& rpURLList,
299 std::optional<SfxAllItemSet>& rpSet,
300 const OUString* pPath,
302 const OUString& rStandardDir,
303 const css::uno::Sequence< OUString >& rDenyList = css::uno::Sequence< OUString >());
307ErrCode RequestPassword(
const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString
const & aURL,
SfxItemSet* pSet,
const css::uno::Reference<css::awt::XWindow>& rParent);
309 const OUString& rPasswordToOpen, std::u16string_view rPasswordToModify,
310 bool bAllowPasswordReset =
false);
311bool IsOOXML(
const std::shared_ptr<const SfxFilter>& pCurrentFilter);
312bool IsMSType(
const std::shared_ptr<const SfxFilter>& pCurrentFilter);
@ WriterCreateAddressList
@ WriterRegisterDataSource
rtl::Reference< FileDialogHelper_Impl > mpImpl
DECL_DLLPRIVATE_LINK(ExecuteSystemFilePicker, void *, void)
FileDialogHelper(const FileDialogHelper &)=delete
FileDialogHelper & operator=(const FileDialogHelper &)=delete
Link< FileDialogHelper *, void > m_aDialogClosedLink
ErrCode const & GetError() const
virtual void SetTitle(const OUString &rNewTitle) override
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
virtual OUString GetPath() const override
constexpr OUStringLiteral FILEDIALOG_FILTER_ALL
@ InsertMerge
Special insertion ("Compare" caption)
@ SignPDF
Sign existing PDF.
bool IsMSType(const std::shared_ptr< const SfxFilter > &pCurrentFilter)
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > createFolderPicker(const css::uno::Reference< css::uno::XComponentContext > &rContext, weld::Window *pPreferredParent)
bool IsOOXML(const std::shared_ptr< const SfxFilter > &pCurrentFilter)
ErrCode SetPassword(const std::shared_ptr< const SfxFilter > &pCurrentFilter, SfxItemSet *pSet, const OUString &rPasswordToOpen, std::u16string_view rPasswordToModify, bool bAllowPasswordReset)
ErrCode RequestPassword(const std::shared_ptr< const SfxFilter > &pCurrentFilter, OUString const &aURL, SfxItemSet *pSet, const css::uno::Reference< css::awt::XWindow > &rParent)
ErrCode FileOpenDialog_Impl(weld::Window *pParent, sal_Int16 nDialogType, FileDialogFlags nFlags, std::vector< OUString > &rpURLList, OUString &rFilter, std::optional< SfxAllItemSet > &rpSet, const OUString *pPath, sal_Int16 nDialog, const OUString &rStandardDir, const css::uno::Sequence< OUString > &rDenyList)