summaryrefslogtreecommitdiff
path: root/svx/inc
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-09-28 09:08:44 +0100
committerMichael Meeks <michael.meeks@suse.com>2011-09-28 09:09:12 +0100
commit7e276c3e0fa333348fa82e385feba3f5e61acdd0 (patch)
tree3a3b5c11b13cbf38ae32a2660f8ea7b68766335a /svx/inc
parent05bee2028291190e3413fa5815897f54b6060fd6 (diff)
re-work XPropertyList default extension handling to increase re-use
Diffstat (limited to 'svx/inc')
-rw-r--r--svx/inc/svx/xtable.hxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx
index e2ba7271fd3d..3cab49561625 100644
--- a/svx/inc/svx/xtable.hxx
+++ b/svx/inc/svx/xtable.hxx
@@ -238,9 +238,7 @@ protected:
bool bOwnPool;
bool bEmbedInDocument;
- XPropertyList( XPropertyListType t,
- const char *pDefaultExtension,
- const String& rPath,
+ XPropertyList( XPropertyListType t, const String& rPath,
XOutdevItemPool* pXPool = NULL );
void Clear();
@@ -264,13 +262,16 @@ public:
void SetName( const String& rString );
const String& GetPath() const { return aPath; }
void SetPath( const String& rString ) { aPath = rString; }
- String GetDefaultExt() const { return rtl::OUString::createFromAscii( pDefaultExt ); }
sal_Bool IsDirty() const { return bListDirty && bBitmapsDirty; }
void SetDirty( sal_Bool bDirty = sal_True )
{ bListDirty = bDirty; bBitmapsDirty = bDirty; }
bool IsEmbedInDocument() const { return bEmbedInDocument; }
void SetEmbedInDocument(bool b) { bEmbedInDocument = b; }
+ static rtl::OUString GetDefaultExt(XPropertyListType t);
+ static rtl::OUString GetDefaultExtFilter(XPropertyListType t);
+ rtl::OUString GetDefaultExt() const { return GetDefaultExt( eType ); }
+
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
createInstance() = 0;
bool Load();
@@ -290,6 +291,10 @@ public:
static XPropertyListRef CreatePropertyList( XPropertyListType t,
const String& rPath,
XOutdevItemPool* pXPool = NULL );
+ // as above but initializes name as expected
+ static XPropertyListRef CreatePropertyListFromURL( XPropertyListType t,
+ const rtl::OUString & rUrl,
+ XOutdevItemPool* pXPool = NULL );
// helper accessors
inline XDashListRef AsDashList();
@@ -309,7 +314,7 @@ class SVX_DLLPUBLIC XColorList : public XPropertyList
public:
explicit XColorList( const String& rPath,
XOutdevItemPool* pXInPool = NULL ) :
- XPropertyList( XCOLOR_LIST, "soc", rPath, pXInPool ) {}
+ XPropertyList( XCOLOR_LIST, rPath, pXInPool ) {}
using XPropertyList::Replace;
using XPropertyList::Remove;
@@ -464,7 +469,7 @@ class SVX_DLLPUBLIC XBitmapList : public XPropertyList
public:
explicit XBitmapList( const String& rPath,
XOutdevItemPool* pXInPool = NULL )
- : XPropertyList( XBITMAP_LIST, "sob", rPath, pXInPool ) {}
+ : XPropertyList( XBITMAP_LIST, rPath, pXInPool ) {}
using XPropertyList::Replace;
using XPropertyList::Remove;