[Libreoffice-commits] .: 2 commits - sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Wed Jan 4 06:20:48 PST 2012


 sc/source/ui/docshell/docsh8.cxx         |    2 +-
 sc/source/ui/docshell/externalrefmgr.cxx |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 63ade823e2d854b60df76790e3628a5ab78f653a
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jan 4 15:18:09 2012 +0100

    remove entry from unsaved ref container if doc is saved

diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 536dea7..4ad9a91 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++);
         }
     }
 }
commit 51caf9b45403b92deadf934347f2d6f9ffecdf08
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Dec 29 13:05:33 2011 +0100

    don't show generic error message if a better one is available, fdo#43911

diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 207f0f0..6de8364 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -364,7 +364,7 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet
         if ( nColCount > MAXCOL+1 )
         {
             nColCount = MAXCOL+1;
-            nErr = SCWARN_IMPORT_RANGE_OVERFLOW;    // warning
+            nErr = SCWARN_IMPORT_COLUMN_OVERFLOW;    // warning
         }
 
         uno::Reference<sdbc::XRow> xRow( xRowSet, uno::UNO_QUERY );


More information about the Libreoffice-commits mailing list