summaryrefslogtreecommitdiff
path: root/sfx2/inc
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 /sfx2/inc
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 'sfx2/inc')
-rw-r--r--sfx2/inc/sfx2/filedlghelper.hxx44
1 files changed, 10 insertions, 34 deletions
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index edc3b091fc4a..a96f54055b0a 100644
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -72,20 +72,12 @@ class SvStringsDtor;
class Window;
//-----------------------------------------------------------------------------
-/*
-#define WB_OPEN 0x00200000L
-#define WB_SAVEAS 0x00400000L
-#define WB_PASSWORD 0x01000000L
-*/
-
-#define SFXWB_INSERT ( 0x04000000L | WB_OPEN ) // ((WinBits)0x00200000)
-#define SFXWB_PASSWORD WB_PASSWORD // ((WinBits)0x01000000)
-#define SFXWB_MULTISELECTION 0x20000000L
-
-#define SFXWB_GRAPHIC 0x00800000L // FileOpen with link and preview box
-#define SFXWB_SHOWSTYLES 0x01000000L // FileOpen with link and preview box and styles
-#define SFXWB_EXPORT ( 0x040000000L | WB_SAVEAS ) // Export dialog
+// the SFXWB constants are for the nFlags parameter of the constructor
+#define SFXWB_INSERT 0x04000000L // turn Open into Insert dialog
+#define SFXWB_EXPORT 0x40000000L // turn Save into Export dialog
+#define SFXWB_MULTISELECTION 0x20000000L
+#define SFXWB_GRAPHIC 0x00800000L // register graphic formats
#define FILEDIALOG_FILTER_ALL "*.*"
@@ -127,21 +119,10 @@ private:
FileDialogHelper_Impl *mpImp;
- SAL_DLLPRIVATE sal_Int16 getDialogType( sal_Int64 nFlags ) const;
-
public:
- FileDialogHelper( sal_Int64 nFlags,
- const String& rFact,
- sal_Int16 nDialog,
- SfxFilterFlags nMust,
- SfxFilterFlags nDont,
- const String& rStandardDir,
- const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList);
-
- FileDialogHelper( sal_Int64 nFlags,
- const String& rFactory,
- SfxFilterFlags nMust = 0,
- SfxFilterFlags nDont = 0 );
+ FileDialogHelper( sal_Int16 nDialogType,
+ sal_Int64 nFlags,
+ Window* _pPreferredParent = NULL );
FileDialogHelper( sal_Int16 nDialogType,
sal_Int64 nFlags,
@@ -158,12 +139,6 @@ public:
const String& rStandardDir,
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList);
- FileDialogHelper( sal_Int64 nFlags );
-
- FileDialogHelper( sal_Int16 nDialogType,
- sal_Int64 nFlags,
- Window* _pPreferredParent = NULL );
-
FileDialogHelper( sal_Int16 nDialogType,
sal_Int64 nFlags,
const ::rtl::OUString& aFilterUIName,
@@ -286,7 +261,8 @@ public:
#define SFX2_IMPL_DIALOG_SYSTEM 1
#define SFX2_IMPL_DIALOG_OOO 2
-ErrCode FileOpenDialog_Impl( sal_Int64 nFlags,
+ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
+ sal_Int64 nFlags,
const String& rFact,
SvStringsDtor *& rpURLList,
String& rFilter,