[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Sun Dec 18 16:42:22 PST 2011


 sc/source/ui/inc/namemgrtable.hxx     |    2 +-
 sc/source/ui/namedlg/namemgrtable.cxx |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 3026c922304861471fd8b65af37ae370903756c6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Dec 19 01:29:42 2011 +0100

    don't set the current entry during initialisation

diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx
index 69bc102..3023e29 100644
--- a/sc/source/ui/inc/namemgrtable.hxx
+++ b/sc/source/ui/inc/namemgrtable.hxx
@@ -81,7 +81,7 @@ public:
     ScRangeManagerTable( Window* pParent, boost::ptr_map<rtl::OUString, ScRangeName>& aTabRangeNames );
     virtual ~ScRangeManagerTable();
 
-    void addEntry( const ScRangeNameLine& rLine );
+    void addEntry( const ScRangeNameLine& rLine, bool bSetCurEntry = true );
     void DeleteSelectedEntries();
     void SetEntry( const ScRangeNameLine& rLine );
 
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 99b1ea0..7f8eb6b 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -104,10 +104,11 @@ ScRangeManagerTable::~ScRangeManagerTable()
     Clear();
 }
 
-void ScRangeManagerTable::addEntry(const ScRangeNameLine& rLine)
+void ScRangeManagerTable::addEntry(const ScRangeNameLine& rLine, bool bSetCurEntry)
 {
     SvLBoxEntry* pEntry = InsertEntryToColumn( createEntryString(rLine), LIST_APPEND, 0xffff);
-    SetCurEntry(pEntry);
+    if (bSetCurEntry)
+        SetCurEntry(pEntry);
 }
 
 void ScRangeManagerTable::GetCurrentLine(ScRangeNameLine& rLine)
@@ -141,7 +142,7 @@ void ScRangeManagerTable::Init()
             if (!it->second->HasType(RT_DATABASE) && !it->second->HasType(RT_SHARED))
             {
                 aLine.aName = it->second->GetName();
-                addEntry(aLine);
+                addEntry(aLine, false);
             }
         }
     }


More information about the Libreoffice-commits mailing list