summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
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() );
}