diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2014-01-30 14:36:17 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2014-01-30 14:38:01 +0100 |
commit | ce445c50d64062ea1476404a226c369aa96fd1fa (patch) | |
tree | 58e1346fa466e6ba7a004428e9692bd25c6ebf0c /dbaccess | |
parent | 5013d67f0d2cc8bec46e76932a5f58d913962d7a (diff) |
merge property map for import and export
why would they ever need to be different?
There was maybe/probably a bug lurking behind their being different.
Change-Id: I5db7f1596aec0d2a504ec7901c001054fd7fd121
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 37e4688d9f62..7cf642b4d35f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -481,20 +481,25 @@ void ODatabaseDocument::impl_reset_nothrow() m_pImpl->m_bDocumentReadOnly = sal_False; } -void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentContext >& _rContext, const Reference< XInterface >& _rxTargetComponent, - const ::comphelper::NamedValueCollection& _rResource ) +namespace { - Sequence< Any > aFilterCreationArgs; - Reference< XStatusIndicator > xStatusIndicator; - lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs ); - - /** property map for import info set */ + /** property map for import/exmport info set */ comphelper::PropertyMapEntry const aExportInfoMap[] = { { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("UsePrettyPrinting"), 0, ::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; +} + +void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentContext >& _rContext, const Reference< XInterface >& _rxTargetComponent, + const ::comphelper::NamedValueCollection& _rResource ) +{ + Sequence< Any > aFilterCreationArgs; + Reference< XStatusIndicator > xStatusIndicator; + lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs ); + uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); xInfoSet->setPropertyValue("BaseURI", uno::makeAny(_rResource.getOrDefault("URL",OUString()))); xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("content.xml"))); @@ -1606,14 +1611,6 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r Sequence< Any > aDelegatorArguments; lcl_extractStatusIndicator( _rMediaDescriptor, aDelegatorArguments ); - /** property map for export info set */ - comphelper::PropertyMapEntry aExportInfoMap[] = - { - { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("UsePrettyPrinting"), 0, ::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString(), 0, css::uno::Type(), 0, 0 } - }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); SvtSaveOptions aSaveOpt; |