19#ifndef INCLUDED_SFX2_SOURCE_DIALOG_FILEDLGIMPL_HXX
20#define INCLUDED_SFX2_SOURCE_DIALOG_FILEDLGIMPL_HXX
26#include <com/sun/star/beans/StringPair.hpp>
27#include <com/sun/star/container/XNameAccess.hpp>
28#include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
29#include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
35class FileDialogHelper;
41 public ::cppu::WeakImplHelper<
42 css::ui::dialogs::XFilePickerListener,
43 css::ui::dialogs::XDialogClosedListener >
47 css::uno::Reference < css::ui::dialogs::XFilePicker3 >
mxFileDlg;
48 css::uno::Reference < css::container::XNameAccess >
mxFilterCFG;
101 void addFilter(
const OUString& rFilterName,
102 const OUString& rExtension );
141 std::vector<OUString>& rpURLList );
148 virtual void SAL_CALL
fileSelectionChanged(
const css::ui::dialogs::FilePickerEvent& aEvent )
override;
149 virtual void SAL_CALL
directoryChanged(
const css::ui::dialogs::FilePickerEvent& aEvent )
override;
150 virtual OUString SAL_CALL
helpRequested(
const css::ui::dialogs::FilePickerEvent& aEvent )
override;
151 virtual void SAL_CALL
controlStateChanged(
const css::ui::dialogs::FilePickerEvent& aEvent )
override;
155 virtual void SAL_CALL
dialogClosed(
const css::ui::dialogs::DialogClosedEvent& _rEvent )
override;
158 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
170 const sal_Int16 nDialogType,
175 const css::uno::Sequence< OUString >& rDenyList = css::uno::Sequence< OUString >()
180 std::optional<SfxAllItemSet>& rpSet,
184 void setFilter(
const OUString& rFilter );
203 const OUString& rFilterWithExtension );
204 OUString
getFilterName( std::u16string_view rFilterWithExtension )
const;
208 OUString
getInitPath( std::u16string_view _rFallback,
const sal_Int32 _nFallbackToken );
constexpr OUStringLiteral sStandardDir
virtual void SAL_CALL dialogSizeChanged() override
bool mbSelectionFltrEnabled
void updateExportButton()
virtual void SAL_CALL controlStateChanged(const css::ui::dialogs::FilePickerEvent &aEvent) override
SfxFilterFlags m_nMustFlags
weld::Window * mpFrameWeld
void createMatcher(const OUString &rFactory)
void updatePreviewState(bool _bUpdatePreviewWindow)
css::uno::Reference< css::awt::XWindow > GetFrameInterface()
OUString getFilterWithExtension(std::u16string_view rFilter) const
void displayFolder(const OUString &rPath)
sets the directory which should be browsed
FileDialogHelper::Context meContext
std::unique_ptr< GraphicFilter > mpGraphicFilter
virtual void SAL_CALL directoryChanged(const css::ui::dialogs::FilePickerEvent &aEvent) override
bool isShowFilterExtensionEnabled() const
bool m_bHaveFilterOptions
void handleDialogSizeChanged()
void handleDirectoryChanged()
void addFilterPair(const OUString &rFilter, const OUString &rFilterWithExtension)
ErrCode getGraphic(const OUString &rURL, Graphic &rGraphic) const
void getRealFilter(OUString &_rFilter) const
::std::vector< OUString > mlLastURLs
void setFileName(const OUString &_rFile)
void SetContext(FileDialogHelper::Context _eNewContext)
void implInitializeFileName()
void addFilters(const OUString &rFactory, SfxFilterFlags nMust, SfxFilterFlags nDont)
void addFilter(const OUString &rFilterName, const OUString &rExtension)
OUString getCurrentFilterUIName() const
void setControlHelpIds(const sal_Int16 *_pControlId, const char **_pHelpId)
void updateSelectionBox()
void implGetAndCacheFiles(const css::uno::Reference< XInterface > &xPicker, std::vector< OUString > &rpURLList)
OUString getInitPath(std::u16string_view _rFallback, const sal_Int32 _nFallbackToken)
sal_Int16 implDoExecute()
css::uno::Reference< css::container::XNameAccess > mxFilterCFG
virtual void SAL_CALL dialogClosed(const css::ui::dialogs::DialogClosedEvent &_rEvent) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
void LoadLastUsedFilter(const OUString &_rContextIdentifier)
void handleControlStateChanged(const css::ui::dialogs::FilePickerEvent &aEvent)
SfxFilterMatcher * mpMatcher
std::vector< css::beans::StringPair > maFilters
bool updateExtendedControl(sal_Int16 _nExtendedControlId, bool _bEnable)
DECL_LINK(TimeOutHdl_Impl, Timer *, void)
bool isAsyncFilePicker() const
void handleFileSelectionChanged()
FileDialogHelper_Impl(FileDialogHelper *_pAntiImpl, const sal_Int16 nDialogType, FileDialogFlags nFlags, sal_Int16 nDialog, weld::Window *pFrameWeld, const OUString &sStandardDir=OUString(), const css::uno::Sequence< OUString > &rDenyList=css::uno::Sequence< OUString >())
css::uno::Reference< css::ui::dialogs::XFilePicker3 > mxFileDlg
void postExecute(sal_Int16 _nResult)
OUString getFilter() const
virtual void SAL_CALL fileSelectionChanged(const css::ui::dialogs::FilePickerEvent &aEvent) override
FileDialogHelper * mpAntiImpl
virtual OUString SAL_CALL helpRequested(const css::ui::dialogs::FilePickerEvent &aEvent) override
void SaveLastUsedFilter()
SfxFilterFlags m_nDontFlags
void enablePasswordBox(bool bInit)
void updateFilterOptionsBox()
OUString getFilterName(std::u16string_view rFilterWithExtension) const
ImplSVEvent * mnPostUserEventId
virtual ~FileDialogHelper_Impl() override
DECL_LINK(InitControls, void *, void)
bool isInOpenMode() const
bool isPasswordEnabled() const
std::shared_ptr< const SfxFilter > getCurrentSfxFilter()
bool CheckFilterOptionsCapability(const std::shared_ptr< const SfxFilter > &_pFilter)
static OUString handleHelpRequested(const css::ui::dialogs::FilePickerEvent &aEvent)
void setFilter(const OUString &rFilter)
const short m_nDialogType