summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2011-02-21 16:27:34 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-12-04 07:17:10 +0000
commit68dad00d0d548f94ae943fa585eb614cb6714d66 (patch)
tree9eb649a855dcf4c2cdeeb83334dd11354e34ff1f /sc/source/filter/xml
parent02d54922c060a42190bbb5757433fc7189008a33 (diff)
calc66: #i116940# update link URLs after CompileXML, count only
allocated sheet caches in link API Conflicts: sc/inc/externalrefmgr.hxx sc/source/ui/docshell/externalrefmgr.cxx sc/source/ui/unoobj/linkuno.cxx
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx9
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