Tag: cws_dev300_dba31b
User: oj      
Date: 2008-08-12 10:12:28+0000
Modified:
   dba/dbaccess/source/core/dataaccess/databasedocument.cxx

Log:
 #i91780# set StreamName

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: databasedocument.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasedocument.cxx?r1=1.47&r2=1.47.24.1
Delta lines:  +26 -2
--------------------
--- databasedocument.cxx        2008-06-25 12:31:38+0000        1.47
+++ databasedocument.cxx        2008-08-12 10:12:25+0000        1.47.24.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: databasedocument.cxx,v $
- * $Revision: 1.47 $
+ * $Revision: 1.47.24.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -40,6 +40,11 @@
 #include <comphelper/namedvaluecollection.hxx>
 #include <comphelper/enumhelper.hxx>
 #include <comphelper/numberedcollection.hxx>
+#include <comphelper/genericpropertyset.hxx>
+#include <comphelper/property.hxx>
+
+#include <svtools/saveopt.hxx>
+
 #include <framework/titlehelper.hxx>
 #ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HPP_
 #include <com/sun/star/embed/XTransactedObject.hpp>
@@ -121,6 +126,8 @@
 #include <algorithm>
 #include <functional>
 
+#define MAP_LEN(x) x, sizeof(x) - 1
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::frame;
@@ -1033,6 +1040,21 @@
     Reference< XStatusIndicator > xStatusIndicator;
     lcl_extractAndStartStatusIndicator( _rMediaDescriptor, xStatusIndicator, 
aDelegatorArguments );
 
+    /** property map for export info set */
+       comphelper::PropertyMapEntry aExportInfoMap[] =
+       {
+               { MAP_LEN( "UsePrettyPrinting" ), 0, 
&::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0},
+        { MAP_LEN( "StreamName"), 0,&::getCppuType( (::rtl::OUString *)0 
),beans::PropertyAttribute::MAYBEVOID, 0 },
+               { NULL, 0, 0, NULL, 0, 0 }
+       };
+       uno::Reference< beans::XPropertySet > xInfoSet( 
comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( 
aExportInfoMap ) ) );
+
+    SvtSaveOptions aSaveOpt;
+    
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")),
 uno::makeAny(aSaveOpt.IsPrettyPrinting()));
+    sal_Int32 nArgsLen = aDelegatorArguments.getLength();
+    aDelegatorArguments.realloc(nArgsLen+1);
+    aDelegatorArguments[nArgsLen++] <<= xInfoSet;
+
        Reference< XPropertySet > xProp( _rxTargetStorage, UNO_QUERY_THROW );
     xProp->setPropertyValue( INFO_MEDIATYPE, makeAny( 
(rtl::OUString)MIMETYPE_OASIS_OPENDOCUMENT_DATABASE ) );
 
@@ -1041,9 +1063,11 @@
     Sequence< PropertyValue > aMediaDescriptor;
     _rMediaDescriptor >>= aMediaDescriptor;
 
+    
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")),
 uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml"))));
     WriteThroughComponent( xComponent, "settings.xml", 
"com.sun.star.comp.sdb.XMLSettingsExporter",
         aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
 
+    
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")),
 uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml"))));
     WriteThroughComponent( xComponent, "content.xml", 
"com.sun.star.comp.sdb.DBExportFilter",
         aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to