summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2011-11-30 16:08:23 +0100
committerMichael Stahl <mstahl@redhat.com>2011-12-03 00:48:13 +0100
commit5754213c709428b19c68d5242df54683bf83536e (patch)
treea1f23a0e7218884f9186cd063ba46515a26cab6c /cui
parentdb74fdf5346c4f97256522ee2a3200fcdce1af5a (diff)
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
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/insdlg.cxx3
-rw-r--r--cui/source/options/doclinkdialog.cxx7
2 files changed, 8 insertions, 2 deletions
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index bc319cb00e39..325ca92bffd2 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -1032,7 +1032,8 @@ IMPL_STATIC_LINK( SfxInsertFloatingFrameDialog, OpenHdl, PushButton*, EMPTYARG )
Application::SetDefDialogParent( pThis );
// create the file dialog
- sfx2::FileDialogHelper aFileDlg( SFXWB_PASSWORD, String() );
+ sfx2::FileDialogHelper aFileDlg(
+ ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0, String() );
// set the title
aFileDlg.SetTitle( OUString( String( CUI_RES( MD_INSERT_OBJECT_IFRAME ) ) ) );
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 <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+
#include <cuires.hrc>
#include <tools/debug.hxx>
#include <svl/filenotation.hxx>
@@ -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 )