[Libreoffice-commits] .: Branch 'libreoffice-3-4-2' - framework/source

Petr Mladek pmladek at kemper.freedesktop.org
Mon Jul 25 09:12:14 PDT 2011


 framework/source/services/autorecovery.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 8f6fa0b468d1873801fc1365263b922ee53e3a49
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Jul 19 17:31:57 2011 +0300

    On recovery from an autosave file use DefaultFilter, seems to fix fdo#34805
    
    Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
    Signed-off-by: Petr Mladek <pmladek at suse.cz>
    Signed-off-by: Michael Meeks <michael.meeks at novell.com>

diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 3420a4f..100c1d7 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 )
         {


More information about the Libreoffice-commits mailing list