Kaydet (Commit) ce445c50 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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
üst 5013d67f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment