summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-06-07 10:13:44 +0200
committerJoachim Lingner <jl@openoffice.org>2010-06-07 10:13:44 +0200
commit79dc6b2d075493f49875ea0a1308849fdc7a43d9 (patch)
treeca35012d50d6d12ca6847c36072cc30f2f6c343c /comphelper/source
parent0ddbd71a7ac5a25aa92666d26d5f264821c3bad8 (diff)
parentd21adcdca61a7c54b3bf1584d80746dc0d2d1fc0 (diff)
jl152 merge with DEV300_m80
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx6
-rw-r--r--comphelper/source/misc/storagehelper.cxx27
2 files changed, 30 insertions, 3 deletions
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 7e3be338992b..1710a43027cf 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -183,6 +183,12 @@ const ::rtl::OUString& MediaDescriptor::PROP_FORMAT()
return sProp;
}
+const ::rtl::OUString& MediaDescriptor::PROP_FRAME()
+{
+ static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("Frame"));
+ return sProp;
+}
+
const ::rtl::OUString& MediaDescriptor::PROP_FRAMENAME()
{
static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("FrameName"));
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index eda42ec98abb..e2557523f674 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -328,12 +328,19 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL(
const ::rtl::OUString& aFormat,
const ::rtl::OUString& aURL,
sal_Int32 nStorageMode,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const uno::Reference< lang::XMultiServiceFactory >& xFactory,
+ sal_Bool bRepairStorage )
throw ( uno::Exception )
{
uno::Sequence< beans::PropertyValue > aProps( 1 );
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
aProps[0].Value <<= aFormat;
+ if ( bRepairStorage )
+ {
+ aProps.realloc( 2 );
+ aProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) );
+ aProps[1].Value <<= bRepairStorage;
+ }
uno::Sequence< uno::Any > aArgs( 3 );
aArgs[0] <<= aURL;
@@ -352,12 +359,19 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromURL(
uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromInputStream(
const ::rtl::OUString& aFormat,
const uno::Reference < io::XInputStream >& xStream,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const uno::Reference< lang::XMultiServiceFactory >& xFactory,
+ sal_Bool bRepairStorage )
throw ( uno::Exception )
{
uno::Sequence< beans::PropertyValue > aProps( 1 );
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
aProps[0].Value <<= aFormat;
+ if ( bRepairStorage )
+ {
+ aProps.realloc( 2 );
+ aProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) );
+ aProps[1].Value <<= bRepairStorage;
+ }
uno::Sequence< uno::Any > aArgs( 3 );
aArgs[0] <<= xStream;
@@ -377,12 +391,19 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageOfFormatFromStream(
const ::rtl::OUString& aFormat,
const uno::Reference < io::XStream >& xStream,
sal_Int32 nStorageMode,
- const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+ const uno::Reference< lang::XMultiServiceFactory >& xFactory,
+ sal_Bool bRepairStorage )
throw ( uno::Exception )
{
uno::Sequence< beans::PropertyValue > aProps( 1 );
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StorageFormat" ) );
aProps[0].Value <<= aFormat;
+ if ( bRepairStorage )
+ {
+ aProps.realloc( 2 );
+ aProps[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepairPackage" ) );
+ aProps[1].Value <<= bRepairStorage;
+ }
uno::Sequence< uno::Any > aArgs( 3 );
aArgs[0] <<= xStream;