LibreOffice Module sfx2 (master) 1
|
#include <filedlghelper.hxx>
Public Member Functions | |
FileDialogHelper (sal_Int16 nDialogType, FileDialogFlags nFlags, weld::Window *pPreferredParent) | |
FileDialogHelper (sal_Int16 nDialogType, FileDialogFlags nFlags, const OUString &rFactory, SfxFilterFlags nMust, SfxFilterFlags nDont, weld::Window *pPreferredParent) | |
FileDialogHelper (sal_Int16 nDialogType, FileDialogFlags nFlags, const OUString &rFactory, sal_Int16 nDialog, SfxFilterFlags nMust, SfxFilterFlags nDont, const OUString &rStandardDir, const css::uno::Sequence< OUString > &rDenyList, weld::Window *pPreferredParent) | |
FileDialogHelper (sal_Int16 nDialogType, FileDialogFlags nFlags, const OUString &aFilterUIName, std::u16string_view aExtName, const OUString &rStandardDir, const css::uno::Sequence< OUString > &rDenyList, weld::Window *pPreferredParent) | |
virtual | ~FileDialogHelper () |
FileDialogHelper & | operator= (const FileDialogHelper &)=delete |
FileDialogHelper (const FileDialogHelper &)=delete | |
ErrCode | Execute () |
void | StartExecuteModal (const Link< FileDialogHelper *, void > &rEndDialogHdl) |
ErrCode const & | GetError () const |
sal_Int16 | GetDialogType () const |
bool | IsPasswordEnabled () const |
OUString | GetRealFilter () const |
void | SetTitle (const OUString &rNewTitle) |
OUString | GetPath () const |
css::uno::Sequence< OUString > | GetMPath () const |
css::uno::Sequence< OUString > | GetSelectedFiles () const |
Provides the selected files with full path information. More... | |
void | AddFilter (const OUString &rFilterName, const OUString &rExtension) |
void | SetCurrentFilter (const OUString &rFilter) |
void | SetDisplayDirectory (const OUString &rPath) |
sets an initial display directory/file name More... | |
void | SetDisplayFolder (const OUString &_rURL) |
sets a new folder whose content is to be displayed in the file picker More... | |
void | SetFileName (const OUString &_rFileName) |
sets an initial file name to display More... | |
OUString | GetCurrentFilter () const |
OUString | GetDisplayDirectory () const |
ErrCode | GetGraphic (Graphic &rGraphic) const |
const css::uno::Reference< css::ui::dialogs::XFilePicker3 > & | GetFilePicker () const |
void | FileSelectionChanged () |
void | DirectoryChanged () |
virtual void | ControlStateChanged (const css::ui::dialogs::FilePickerEvent &aEvent) |
void | DialogSizeChanged () |
void | DialogClosed (const css::ui::dialogs::DialogClosedEvent &_rEvent) |
void | SetControlHelpIds (const sal_Int16 *_pControlId, const char **_pHelpId) |
sets help ids for the controls in the dialog More... | |
void | CreateMatcher (const OUString &rName) |
void | SetContext (Context _eNewContext) |
sets the context of the dialog and trigger necessary actions e.g. More... | |
DECL_DLLPRIVATE_LINK (ExecuteSystemFilePicker, void *, void) | |
ErrCode | Execute (std::vector< OUString > &rpURLList, std::optional< SfxAllItemSet > &rpSet, OUString &rFilter, const OUString &rDirPath) |
ErrCode | Execute (std::optional< SfxAllItemSet > &rpSet, OUString &rFilter) |
Static Public Member Functions | |
static OUString | contextToString (Context context) |
static OUString | HelpRequested (const css::ui::dialogs::FilePickerEvent &aEvent) |
Private Attributes | |
Link< FileDialogHelper *, void > | m_aDialogClosedLink |
ErrCode | m_nError |
rtl::Reference< FileDialogHelper_Impl > | mpImpl |
Definition at line 77 of file filedlghelper.hxx.
Definition at line 81 of file filedlghelper.hxx.
sfx2::FileDialogHelper::FileDialogHelper | ( | sal_Int16 | nDialogType, |
FileDialogFlags | nFlags, | ||
weld::Window * | pPreferredParent | ||
) |
Definition at line 2392 of file filedlghelper.cxx.
sfx2::FileDialogHelper::FileDialogHelper | ( | sal_Int16 | nDialogType, |
FileDialogFlags | nFlags, | ||
const OUString & | rFactory, | ||
SfxFilterFlags | nMust, | ||
SfxFilterFlags | nDont, | ||
weld::Window * | pPreferredParent | ||
) |
Definition at line 2358 of file filedlghelper.cxx.
References SfxObjectShell::GetServiceNameFromFactory(), and mpImpl.
sfx2::FileDialogHelper::FileDialogHelper | ( | sal_Int16 | nDialogType, |
FileDialogFlags | nFlags, | ||
const OUString & | rFactory, | ||
sal_Int16 | nDialog, | ||
SfxFilterFlags | nMust, | ||
SfxFilterFlags | nDont, | ||
const OUString & | rStandardDir, | ||
const css::uno::Sequence< OUString > & | rDenyList, | ||
weld::Window * | pPreferredParent | ||
) |
Definition at line 2374 of file filedlghelper.cxx.
References SfxObjectShell::GetServiceNameFromFactory(), and mpImpl.
sfx2::FileDialogHelper::FileDialogHelper | ( | sal_Int16 | nDialogType, |
FileDialogFlags | nFlags, | ||
const OUString & | aFilterUIName, | ||
std::u16string_view | aExtName, | ||
const OUString & | rStandardDir, | ||
const css::uno::Sequence< OUString > & | rDenyList, | ||
weld::Window * | pPreferredParent | ||
) |
Definition at line 2398 of file filedlghelper.cxx.
References sfx2::addExtension(), AddFilter(), aWildcard, sfx2::lcl_OpenOrSave(), mpImpl, and OPEN.
|
virtual |
Definition at line 2426 of file filedlghelper.cxx.
References mpImpl.
|
delete |
References Execute().
void sfx2::FileDialogHelper::AddFilter | ( | const OUString & | rFilterName, |
const OUString & | rExtension | ||
) |
Definition at line 2782 of file filedlghelper.cxx.
References mpImpl.
Referenced by FileDialogHelper(), and SfxTemplateManagerDlg::OnTemplateImportCategory().
|
static |
Definition at line 2446 of file filedlghelper.cxx.
References AcceleratorConfig, AutoRedact, BaseDataSource, BaseSaveAs, BasicExportDialog, BasicExportPackage, BasicExportSource, BasicImportDialog, BasicImportSource, BasicInsertLib, BulletsAddImage, CalcDataProvider, CalcDataStream, CalcExport, CalcSaveAs, CalcXMLSource, DrawExport, DrawImpressInsertFile, DrawImpressOpenSound, DrawSaveAs, ExportImage, ExtensionManager, FormsAddInstance, FormsInsertImage, IconImport, ImageMap, ImpressClickAction, ImpressExport, ImpressPhotoDialog, ImpressSaveAs, InsertDoc, InsertImage, InsertMedia, InsertOLE, JavaClassPath, LinkClientFile, LinkClientOLE, ReportInsertImage, ScreenshotAnnotation, SignatureLine, TemplateImport, UnknownContext, WriterCreateAddressList, WriterExport, WriterImportAutotext, WriterInsertHyperlink, WriterInsertImage, WriterInsertScript, WriterLoadTemplate, WriterMailMerge, WriterMailMergeSaveAs, WriterNewHTMLGlobalDoc, WriterRegisterDataSource, WriterSaveAs, WriterSaveHTML, and XMLFilterSettings.
Referenced by sfx2::FileDialogHelper_Impl::getInitPath(), and sfx2::FileDialogHelper_Impl::saveConfig().
|
virtual |
Definition at line 2817 of file filedlghelper.cxx.
References aEvent, and mpImpl.
Referenced by sfx2::FileDialogHelper_Impl::controlStateChanged().
void sfx2::FileDialogHelper::CreateMatcher | ( | const OUString & | rName | ) |
Definition at line 2431 of file filedlghelper.cxx.
References SfxObjectShell::GetServiceNameFromFactory(), and mpImpl.
sfx2::FileDialogHelper::DECL_DLLPRIVATE_LINK | ( | ExecuteSystemFilePicker | , |
void * | , | ||
void | |||
) |
References Execute().
void sfx2::FileDialogHelper::DialogClosed | ( | const css::ui::dialogs::DialogClosedEvent & | _rEvent | ) |
Definition at line 2827 of file filedlghelper.cxx.
References ERRCODE_ABORT, ERRCODE_NONE, m_aDialogClosedLink, m_nError, and RET_OK.
Referenced by sfx2::FileDialogHelper_Impl::dialogClosed().
void sfx2::FileDialogHelper::DialogSizeChanged | ( | ) |
Definition at line 2822 of file filedlghelper.cxx.
References mpImpl.
Referenced by sfx2::FileDialogHelper_Impl::dialogSizeChanged().
void sfx2::FileDialogHelper::DirectoryChanged | ( | ) |
Definition at line 2807 of file filedlghelper.cxx.
References mpImpl.
Referenced by sfx2::FileDialogHelper_Impl::directoryChanged().
ErrCode sfx2::FileDialogHelper::Execute | ( | ) |
Definition at line 2584 of file filedlghelper.cxx.
References mpImpl.
Referenced by SfxTemplateManagerDlg::OnTemplateImportCategory().
ErrCode sfx2::FileDialogHelper::Execute | ( | std::optional< SfxAllItemSet > & | rpSet, |
OUString & | rFilter | ||
) |
Definition at line 2589 of file filedlghelper.cxx.
References mpImpl.
ErrCode sfx2::FileDialogHelper::Execute | ( | std::vector< OUString > & | rpURLList, |
std::optional< SfxAllItemSet > & | rpSet, | ||
OUString & | rFilter, | ||
const OUString & | rDirPath | ||
) |
Definition at line 2574 of file filedlghelper.cxx.
References mpImpl, and SetDisplayFolder().
void sfx2::FileDialogHelper::FileSelectionChanged | ( | ) |
Definition at line 2802 of file filedlghelper.cxx.
References mpImpl.
Referenced by sfx2::FileDialogHelper_Impl::fileSelectionChanged().
OUString sfx2::FileDialogHelper::GetCurrentFilter | ( | ) | const |
Definition at line 2707 of file filedlghelper.cxx.
References mpImpl.
sal_Int16 sfx2::FileDialogHelper::GetDialogType | ( | ) | const |
Definition at line 2608 of file filedlghelper.cxx.
References mpImpl.
OUString sfx2::FileDialogHelper::GetDisplayDirectory | ( | ) | const |
Definition at line 2702 of file filedlghelper.cxx.
References mpImpl.
|
inline |
Definition at line 186 of file filedlghelper.hxx.
const uno::Reference< XFilePicker3 > & sfx2::FileDialogHelper::GetFilePicker | ( | ) | const |
Definition at line 2796 of file filedlghelper.cxx.
References mpImpl.
Referenced by SvxOpenGrf_Impl::SvxOpenGrf_Impl().
Definition at line 2712 of file filedlghelper.cxx.
References mpImpl.
Sequence< OUString > sfx2::FileDialogHelper::GetMPath | ( | ) | const |
Definition at line 2649 of file filedlghelper.cxx.
References comphelper::containerToSequence(), and mpImpl.
OUString sfx2::FileDialogHelper::GetPath | ( | ) | const |
Definition at line 2629 of file filedlghelper.cxx.
References mpImpl.
OUString sfx2::FileDialogHelper::GetRealFilter | ( | ) | const |
Definition at line 2615 of file filedlghelper.cxx.
References mpImpl.
Sequence< OUString > sfx2::FileDialogHelper::GetSelectedFiles | ( | ) | const |
Provides the selected files with full path information.
Definition at line 2663 of file filedlghelper.cxx.
References INetURLObject::Append(), INetURLObject::GetMainURL(), i, mpImpl, INetURLObject::NONE, INetURLObject::setFinalSlash(), and INetURLObject::setName().
Referenced by sfx2::impl_FillURLList(), and SfxTemplateManagerDlg::OnTemplateImportCategory().
|
static |
Definition at line 2812 of file filedlghelper.cxx.
References aEvent, and sfx2::FileDialogHelper_Impl::handleHelpRequested().
Referenced by sfx2::FileDialogHelper_Impl::helpRequested().
bool sfx2::FileDialogHelper::IsPasswordEnabled | ( | ) | const |
Definition at line 2610 of file filedlghelper.cxx.
References mpImpl.
|
delete |
void sfx2::FileDialogHelper::SetContext | ( | Context | _eNewContext | ) |
sets the context of the dialog and trigger necessary actions e.g.
loading config, setting help id This will also store the last used directory for this context, so that the last directory gets preselected on next filepicker launch (with the same context)
_eNewContext | New context for the dialog. |
Definition at line 2441 of file filedlghelper.cxx.
References mpImpl.
Referenced by SvFileObject::Edit(), and SfxTemplateManagerDlg::OnTemplateImportCategory().
void sfx2::FileDialogHelper::SetControlHelpIds | ( | const sal_Int16 * | _pControlId, |
const char ** | _pHelpId | ||
) |
sets help ids for the controls in the dialog
_pControlId | Pointer to a 0-terminated array of control ids. They must be recruited from the CommonFilePickerElementIds and ExtendedFilePickerElementIds values. |
_pHelpId | Pointer to an array of help ids. For each element in _pControlId, there must be a corresponding element herein. |
Definition at line 2436 of file filedlghelper.cxx.
References mpImpl.
void sfx2::FileDialogHelper::SetCurrentFilter | ( | const OUString & | rFilter | ) |
Definition at line 2788 of file filedlghelper.cxx.
References mpImpl.
Referenced by SfxTemplateManagerDlg::OnTemplateImportCategory().
void sfx2::FileDialogHelper::SetDisplayDirectory | ( | const OUString & | rPath | ) |
sets an initial display directory/file name
Use SetDisplayFolder and SetFileName.
Definition at line 2736 of file filedlghelper.cxx.
References INetURLObject::GetLastName(), INetURLObject::GetMainURL(), sfx2::impl_isFolder(), mpImpl, INetURLObject::NONE, INetURLObject::removeSegment(), and INetURLObject::WithCharset.
void sfx2::FileDialogHelper::SetDisplayFolder | ( | const OUString & | _rURL | ) |
sets a new folder whose content is to be displayed in the file picker
_rURL | specifies the URL of the folder whose content is to be displayed. If the URL doesn't denote a valid (existent and accessible) folder, the request is silently dropped. |
css::uno::RuntimeException | if the invocation of any of the file picker or UCB methods throws a RuntimeException. |
Definition at line 2772 of file filedlghelper.cxx.
References mpImpl.
Referenced by Execute().
void sfx2::FileDialogHelper::SetFileName | ( | const OUString & | _rFileName | ) |
sets an initial file name to display
This method is usually used in "save-as" contexts, where the application should suggest an initial name for the file to save.
Calling this method is nearly equivalent to calling GetFilePicker().setDefaultName( _rFileName )
, with the following differences:
XFilePicker3
are caught and silenced. Definition at line 2777 of file filedlghelper.cxx.
References mpImpl.
void sfx2::FileDialogHelper::SetTitle | ( | const OUString & | rNewTitle | ) |
Definition at line 2623 of file filedlghelper.cxx.
References mpImpl.
void sfx2::FileDialogHelper::StartExecuteModal | ( | const Link< FileDialogHelper *, void > & | rEndDialogHdl | ) |
Definition at line 2598 of file filedlghelper.cxx.
References ERRCODE_NONE, LINK, m_aDialogClosedLink, m_nError, mpImpl, and Application::PostUserEvent().
Referenced by SvFileObject::Edit().
|
private |
Definition at line 143 of file filedlghelper.hxx.
Referenced by DialogClosed(), and StartExecuteModal().
|
private |
Definition at line 144 of file filedlghelper.hxx.
Referenced by DialogClosed(), and StartExecuteModal().
|
private |
Definition at line 146 of file filedlghelper.hxx.
Referenced by AddFilter(), ControlStateChanged(), CreateMatcher(), DialogSizeChanged(), DirectoryChanged(), Execute(), FileDialogHelper(), FileSelectionChanged(), GetCurrentFilter(), GetDialogType(), GetDisplayDirectory(), GetFilePicker(), GetGraphic(), GetMPath(), GetPath(), GetRealFilter(), GetSelectedFiles(), IsPasswordEnabled(), SetContext(), SetControlHelpIds(), SetCurrentFilter(), SetDisplayDirectory(), SetDisplayFolder(), SetFileName(), SetTitle(), StartExecuteModal(), and ~FileDialogHelper().