diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-03-05 09:27:00 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-03-05 09:30:39 +0100 |
commit | 702e08d1130f1e323926e37104853c7e8469db5a (patch) | |
tree | af5382759a522f8a92eeb37f717d9a807342d860 /sfx2 | |
parent | 553a4d154ba37df80a0240b4ff114c274d461051 (diff) |
make sure we always set the filter name in the media descriptor
Change-Id: I659c87a0f0856a95a5f9c71180b1d595f0dc09fa
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 76e9f13d8969..34eaddab5485 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2370,6 +2370,7 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) sal_Bool bHasOutputStream = sal_False; sal_Bool bHasStream = sal_False; sal_Bool bHasBaseURL = sal_False; + bool bHasFilterName = false; sal_Int32 i; sal_Int32 nEnd = aOldArgs.getLength(); @@ -2384,6 +2385,8 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) bHasStream = sal_True; else if ( pOldValue[i].Name == "DocumentBaseURL" ) bHasBaseURL = sal_True; + else if( pOldValue[i].Name == "FilterName" ) + bHasFilterName = true; } if ( !bHasOutputStream ) @@ -2408,6 +2411,13 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium ) aArgs[nEnd-1].Value <<= rMedium.GetBaseURL( true ); } + if( !bHasFilterName ) + { + aArgs.realloc( ++nEnd ); + aArgs[nEnd-1].Name = "FilterName"; + aArgs[nEnd-1].Value <<= aFilterName; + } + return xFilter->filter( aArgs ); }catch(const uno::Exception&) {} |