incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mba...@apache.org
Subject svn commit: r1172350 - in /incubator/ooo/trunk/main: sfx2/inc/sfx2/docfile.hxx sfx2/source/doc/docfile.cxx sw/source/core/swg/SwXMLTextBlocks1.cxx
Date Sun, 18 Sep 2011 21:07:19 GMT
Author: mbauer
Date: Sun Sep 18 21:07:18 2011
New Revision: 1172350

URL: http://svn.apache.org/viewvc?rev=1172350&view=rev
Log:
cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow
to detect one

Modified:
    incubator/ooo/trunk/main/sfx2/inc/sfx2/docfile.hxx
    incubator/ooo/trunk/main/sfx2/source/doc/docfile.cxx
    incubator/ooo/trunk/main/sw/source/core/swg/SwXMLTextBlocks1.cxx

Modified: incubator/ooo/trunk/main/sfx2/inc/sfx2/docfile.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/inc/sfx2/docfile.hxx?rev=1172350&r1=1172349&r2=1172350&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/inc/sfx2/docfile.hxx (original)
+++ incubator/ooo/trunk/main/sfx2/inc/sfx2/docfile.hxx Sun Sep 18 21:07:18 2011
@@ -130,7 +130,13 @@ public:
                                     const SfxItemSet* pSet=0,
                                     sal_Bool bRoot = sal_False );
 
-                        SfxMedium( const SfxMedium &rMedium, sal_Bool bCreateTemporary
= sal_False );
+                        SfxMedium( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage
>& xStorage,
+                                    const String& rBaseURL,
+									const String& rTypeName,
+                                    const SfxItemSet* pSet=0,
+                                    sal_Bool bRoot = sal_False );
+
+									SfxMedium( const SfxMedium &rMedium, sal_Bool bCreateTemporary = sal_False );
                         SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue
>& aArgs );
 
 						~SfxMedium();

Modified: incubator/ooo/trunk/main/sfx2/source/doc/docfile.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/doc/docfile.cxx?rev=1172350&r1=1172349&r2=1172350&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/source/doc/docfile.cxx (original)
+++ incubator/ooo/trunk/main/sfx2/source/doc/docfile.cxx Sun Sep 18 21:07:18 2011
@@ -3030,6 +3030,24 @@ SfxMedium::SfxMedium( const uno::Referen
         GetItemSet()->Put( *p );
 }
 
+SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const String&
rBaseURL, const String& rTypeName, const SfxItemSet* p, sal_Bool bRootP )
+:   IMPL_CTOR( bRootP, 0 ),	// bRoot, pURLObj
+    pSet(0),
+    pImp( new SfxMedium_Impl( this ))
+{
+	pFilter = SFX_APP()->GetFilterMatcher().GetFilter4EA( rTypeName );
+    DBG_ASSERT( pFilter, "No Filter for storage found!" );
+
+    Init_Impl();
+    pImp->xStorage = rStor;
+    pImp->bDisposeStorage = sal_False;
+
+    // always take BaseURL first, could be overwritten by ItemSet
+    GetItemSet()->Put( SfxStringItem( SID_DOC_BASEURL, rBaseURL ) );
+    if ( p )
+        GetItemSet()->Put( *p );
+}
+
 //------------------------------------------------------------------
 
 SfxMedium::~SfxMedium()

Modified: incubator/ooo/trunk/main/sw/source/core/swg/SwXMLTextBlocks1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/swg/SwXMLTextBlocks1.cxx?rev=1172350&r1=1172349&r2=1172350&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/swg/SwXMLTextBlocks1.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/swg/SwXMLTextBlocks1.cxx Sun Sep 18 21:07:18 2011
@@ -74,7 +74,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_u
 		try
 		{
             xRoot = xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ
);
-            xMedium = new SfxMedium(xRoot, GetBaseURL());
+            xMedium = new SfxMedium(xRoot, GetBaseURL(), S2U("writer8"));
             SwReader aReader(*xMedium,aFolderName, pDoc );
             ReadXML->SetBlockMode( sal_True );
             aReader.Read( *ReadXML );



Mime
View raw message