diff options
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 688000e64138..a15a57baf989 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -71,6 +71,7 @@ #include "rangeutl.hxx" #include "postit.hxx" #include "formulaparserpool.hxx" +#include "externalrefmgr.hxx" #include <comphelper/extract.hxx> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> @@ -3121,8 +3122,16 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE } GetProgressBarHelper()->End(); // make room for subsequent SfxProgressBars if (pDoc) + { pDoc->CompileXML(); + // After CompileXML, links must be completely changed to the new URLs. + // Otherwise, hasExternalFile for API wouldn't work (#i116940#), + // and typing a new formula would create a second link with the same "real" file name. + if (pDoc->HasExternalRefManager()) + pDoc->GetExternalRefManager()->updateAbsAfterLoad(); + } + if (pDoc && GetModel().is()) { // set "valid stream" flags after loading (before UpdateRowHeights, so changed formula results |