summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-09-03 14:38:23 +0200
committerDavid Tardon <dtardon@redhat.com>2012-09-07 10:07:03 +0200
commit7e2f0392a8b4479541815818f5bcc8a54428b4c0 (patch)
tree8940a78b199c8c46df8def07fa698c19e7d12ae4 /sc
parent7fac82d6f4bfd632c13d6a2b6566aa9dc8809827 (diff)
fix crash on area link update
Example spreadsheet: http://www.gummy-stuff.org/Excel/Yahoo.xls Change-Id: Icd16ed4fb05986bc199ac3f913cee656c7a434ff
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen8.cxx3
-rw-r--r--sc/source/ui/docshell/arealink.cxx1
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 455f9c5df114..4b66d43b0031 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1358,8 +1358,7 @@ void ScDocument::UpdateAreaLinks()
if (GetLinkManager())
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- sal_uInt16 nCount = rLinks.size();
- for (sal_uInt16 i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<rLinks.size(); i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 1e7ac9432e3f..2c0857290921 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -143,6 +143,7 @@ void ScAreaLink::Edit(Window* pParent, const Link& /* rEndEditHdl */ )
SetName( aNewLinkName );
}
+ sfx2::SvBaseLinkRef const xThis(this); // keep yourself alive
Refresh( aFile, aFilter, aArea, GetRefreshDelay() );
}