summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/dialog/pfiledlg.cxx5
-rw-r--r--svx/source/form/databaselocationinput.cxx2
-rw-r--r--svx/workben/msview/msview.cxx3
4 files changed, 8 insertions, 6 deletions
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index a1e097ef7058..e2c56dcdcab5 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -494,7 +494,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx )
void SvxIMapDlg::DoOpen()
{
- ::sfx2::FileDialogHelper aDlg(
+ ::sfx2::FileDialogHelper aDlg(
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
ImageMap aLoadIMap;
@@ -535,7 +535,7 @@ void SvxIMapDlg::DoOpen()
sal_Bool SvxIMapDlg::DoSave()
{
- ::sfx2::FileDialogHelper aDlg(
+ ::sfx2::FileDialogHelper aDlg(
com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
const String aBinFilter( DEFINE_CONST_UNICODE( IMAP_BINARY_FILTER ) );
diff --git a/svx/source/dialog/pfiledlg.cxx b/svx/source/dialog/pfiledlg.cxx
index 16e124236595..c57c016a572a 100644
--- a/svx/source/dialog/pfiledlg.cxx
+++ b/svx/source/dialog/pfiledlg.cxx
@@ -31,6 +31,7 @@
#include <sfx2/docfile.hxx>
#include <com/sun/star/plugin/PluginDescription.hpp>
#include <com/sun/star/plugin/XPluginManager.hpp>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <comphelper/processfactory.hxx>
@@ -58,8 +59,8 @@ String SvxPluginFileDlg::GetPath() const
return maFileDlg.GetPath();
}
-SvxPluginFileDlg::SvxPluginFileDlg (Window *, sal_uInt16 nKind ) :
- maFileDlg(SFXWB_INSERT)
+SvxPluginFileDlg::SvxPluginFileDlg (Window *, sal_uInt16 nKind )
+ : maFileDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, SFXWB_INSERT)
{
// set title of the dialogwindow
switch (nKind)
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index aa377bbd6bd6..4e148eccc868 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -247,7 +247,7 @@ namespace svx
{
::sfx2::FileDialogHelper aFileDlg(
TemplateDescription::FILESAVE_AUTOEXTENSION,
- WB_SAVEAS,
+ 0,
m_rLocationInput.GetSystemWindow()
);
aFileDlg.SetDisplayDirectory( impl_getCurrentURL() );
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index fe43765f01bb..34841761bdb0 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -865,7 +865,8 @@ void MSViewerWorkWindow::View( const PPTDocumentPtr& pDocument, int nPane )
PPTDocumentPtr MSViewerWorkWindow::Load()
{
- ::sfx2::FileDialogHelper aDlg( ::sfx2::FILEOPEN_SIMPLE, 0 );
+ ::sfx2::FileDialogHelper aDlg(
+ ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.ppt" ) );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
// INetURLObject aFile( SvtPathOptions().GetPalettePath() );