summaryrefslogtreecommitdiff
path: root/extensions/source/xmlextract/xmxtrct.cxx
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2000-12-07 18:14:31 +0000
committerKai Ahrens <ka@openoffice.org>2000-12-07 18:14:31 +0000
commitf20485ae794e10ef11d4115738aa10127388946c (patch)
treeecc9cd5bcb9e6a130e5101cce954e39383c8ca27 /extensions/source/xmlextract/xmxtrct.cxx
parent894635835ffc01951db55da785bbc787a885b1ef (diff)
#81316#: extract new stream format
Diffstat (limited to 'extensions/source/xmlextract/xmxtrct.cxx')
-rw-r--r--extensions/source/xmlextract/xmxtrct.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/extensions/source/xmlextract/xmxtrct.cxx b/extensions/source/xmlextract/xmxtrct.cxx
index cac9e41e7033..880d0fe359f4 100644
--- a/extensions/source/xmlextract/xmxtrct.cxx
+++ b/extensions/source/xmlextract/xmxtrct.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmxtrct.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:16:54 $
+ * last change: $Author: ka $ $Date: 2000-12-07 19:14:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -197,9 +197,16 @@ REF( NMSP_IO::XInputStream ) SAL_CALL XMLExtractor::extract( const REF( NMSP_IO:
{
SvStream aIStm( new XMXLockBytes( rxIStm ) );
SvStorageRef aStorage( new SvStorage( aIStm ) );
- const String aStmName( String::CreateFromAscii( "XMLFormat" ) );
+ String aStmName;
+ const String aFormat1( String::CreateFromAscii( "XMLFormat" ) );
+ const String aFormat2( String::CreateFromAscii( "XMLFormat2" ) );
- if( !aStorage->GetError() && aStorage->IsStream( aStmName ))
+ if( aStorage->IsContained( aFormat2 ) )
+ aStmName = aFormat2;
+ else if( aStorage->IsContained( aFormat1 ) )
+ aStmName = aFormat1;
+
+ if( !aStorage->GetError() && aStmName.Len() && aStorage->IsStream( aStmName ) )
{
SvStorageStreamRef xStream( aStorage->OpenStream( aStmName ) );