From 5754213c709428b19c68d5242df54683bf83536e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 30 Nov 2011 16:08:23 +0100 Subject: sfx2::FileDialogHelper: refactor construction: There are currently 2 different ways to specify what kind of file dialog should be created: the nDialogType and nFlags ctor parameters. Simplify that by using the nDialogType for the API specified variety, and the nFlags only for options that cannot be specified by the API. This allows to get rid of 3 constructors, and the following constants: WB_OPEN, WB_SAVEAS, WB_PASSWORD, SFXWB_PASSWORD, SFXWB_SHOWSTYLES --- cui/source/options/doclinkdialog.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cui/source/options/doclinkdialog.cxx') diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index edebdab3f5ea..b34736623e74 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -28,6 +28,9 @@ #include "doclinkdialog.hxx" #include "doclinkdialog.hrc" + +#include + #include #include #include @@ -42,6 +45,7 @@ namespace svx { //...................................................................... + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::svt; @@ -166,7 +170,8 @@ namespace svx //------------------------------------------------------------------ IMPL_LINK( ODocumentLinkDialog, OnBrowseFile, void*, EMPTYARG ) { - ::sfx2::FileDialogHelper aFileDlg(0); + ::sfx2::FileDialogHelper aFileDlg( + ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0); static const String s_sDatabaseType = String::CreateFromAscii("StarOffice XML (Base)"); const SfxFilter* pFilter = SfxFilter::GetFilterByName( s_sDatabaseType); if ( pFilter ) -- cgit