summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-04 15:18:09 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-04 15:19:23 +0100
commit63ade823e2d854b60df76790e3628a5ab78f653a (patch)
tree69283e660118fb534f50ea1be7ba17b24c7b1c20
parent51caf9b45403b92deadf934347f2d6f9ffecdf08 (diff)
remove entry from unsaved ref container if doc is saved
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 536dea74183f..4ad9a911a87e 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2683,8 +2683,8 @@ sal_uInt32 ScExternalRefManager::getMappedNumberFormat(sal_uInt16 nFileId, sal_u
void ScExternalRefManager::transformUnsavedRefToSavedRef( SfxObjectShell* pShell )
{
- for(DocShellMap::iterator itr = maUnsavedDocShells.begin();
- itr != maUnsavedDocShells.end(); ++itr)
+ DocShellMap::iterator itr = maUnsavedDocShells.begin();
+ while( itr != maUnsavedDocShells.end() )
{
if (&(itr->second.maShell) == pShell)
{
@@ -2692,6 +2692,7 @@ void ScExternalRefManager::transformUnsavedRefToSavedRef( SfxObjectShell* pShell
rtl::OUString aFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI);
switchSrcFile(itr->first, aFileURL, rtl::OUString());
EndListening(*pShell);
+ maUnsavedDocShells.erase(itr++);
}
}
}