summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/docfile.hxx4
-rw-r--r--sfx2/source/doc/docfile.cxx19
2 files changed, 22 insertions, 1 deletions
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 9b347e0475e6..f989fdefb77b 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -99,6 +99,10 @@ public:
SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const String& rBaseURL,
const SfxItemSet* pSet=0 );
+ SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
+ const String& rBaseURL,
+ const String& rTypeName,
+ const SfxItemSet* pSet=0 );
SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
~SfxMedium();
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b1f3541c22d2..2287e9ea1cf6 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2885,7 +2885,6 @@ SfxMedium::SfxMedium(const String &rName, StreamMode nOpenMode, const SfxFilter
Init_Impl();
}
-
SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) :
pImp(new SfxMedium_Impl(this))
{
@@ -2958,6 +2957,24 @@ SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const Str
//------------------------------------------------------------------
+SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const String& rBaseURL, const String &rTypeName, const SfxItemSet* p ) :
+ pImp(new SfxMedium_Impl(this))
+{
+ pImp->m_pFilter = SFX_APP()->GetFilterMatcher().GetFilter4EA( rTypeName );
+ DBG_ASSERT( pImp->m_pFilter, "No Filter for storage found!" );
+
+ Init_Impl();
+ pImp->xStorage = rStor;
+ pImp->bDisposeStorage = false;
+
+ // always take BaseURL first, could be overwritten by ItemSet
+ GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, rBaseURL ) );
+ if ( p )
+ GetItemSet()->Put( *p );
+}
+
+//------------------------------------------------------------------
+
SfxMedium::~SfxMedium()
{
// if there is a requirement to clean the backup this is the last possibility to do it