summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-01-28 22:19:50 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-01-28 22:19:50 +0100
commitcfdb20d0ccd44014edbe406942914d5eef57de47 (patch)
tree24156f81fb65345f4b4ee41d242f001df479a4c4 /sfx2
parent1e62c8af7a8a76ecf89acb40ffc991f96f5c869a (diff)
autorecovery: move the responsibility for calling attachResource into recoverFromFile. This saves us from some problems with SFX-based documents, which change there Args during the load process (during macro confirmation), so a later attachResource from outside would overwrite those changed args
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 9454889760e2..47935392012f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1687,6 +1687,13 @@ void SAL_CALL SfxBaseModel::recoverFromFile( const ::rtl::OUString& i_SourceLoca
aMediaDescriptor.put( "URL", i_SourceLocation );
load( aMediaDescriptor.getPropertyValues() );
+
+ // Note: The XDocumentRecovery interface specification requires us to do an attachResource after loading.
+ // However, we will not do this here, as we know that our load implementation (respectively some method
+ // called from there) already did so.
+ // In particular, the load process might already have modified some elements of the media
+ // descriptor, for instance the MacroExecMode (in case the user was involved to decide about it), and we do
+ // not want to overwrite it with the "old" elements passed to this method here.
}
//________________________________________________________________________________________________________