summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-07-19 17:31:57 +0300
committerPetr Mladek <pmladek@suse.cz>2011-07-25 18:11:09 +0200
commit8f6fa0b468d1873801fc1365263b922ee53e3a49 (patch)
treecb240b474e667f35a85baa81e0d7cb37ed46fd0a
parent1e04395cfe49ce0440dc2dd923eceb44ef52e22d (diff)
On recovery from an autosave file use DefaultFilter, seems to fix fdo#34805
Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch> Signed-off-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Michael Meeks <michael.meeks@novell.com>
-rw-r--r--framework/source/services/autorecovery.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 3420a4f798..100c1d75c7 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2639,7 +2639,10 @@ void AutoRecovery::implts_openOneDoc(const ::rtl::OUString& sURL
// put the filter name into the descriptor - we're not going to involve any type detection, so
// the document might be lost without the FilterName property
- lDescriptor[ ::comphelper::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.RealFilter;
+ if ( (rInfo.DocumentState & AutoRecovery::E_TRY_LOAD_ORIGINAL) == AutoRecovery::E_TRY_LOAD_ORIGINAL)
+ lDescriptor[ ::comphelper::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.RealFilter;
+ else
+ lDescriptor[ ::comphelper::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.DefaultFilter;
if ( sURL == rInfo.FactoryURL )
{