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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 13:51:15 PST 2012


 sc/source/ui/src/xmlsourcedlg.src       |    2 +-
 svtools/inc/svtools/viewdataentry.hxx   |    1 +
 svtools/source/contnr/treelist.cxx      |   10 +++-------
 svtools/source/contnr/viewdataentry.cxx |    8 ++++++++
 4 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 215ec266e11e1a45c24fe982cd28b4d360680d3c
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Nov 28 16:09:22 2012 -0500

    Try to reduce direct access/manipulation of the flag value.
    
    Change-Id: I252c1ad55099a821d3c1fec3c64255c4f26a0396

diff --git a/svtools/inc/svtools/viewdataentry.hxx b/svtools/inc/svtools/viewdataentry.hxx
index 35b9a58..7f49f63 100644
--- a/svtools/inc/svtools/viewdataentry.hxx
+++ b/svtools/inc/svtools/viewdataentry.hxx
@@ -64,6 +64,7 @@ public:
     bool IsSelectable() const;
     void SetFocus( bool bFocus );
     void SetCursored( bool bCursored );
+    void SetSelected( bool bSelected );
     sal_uInt16 GetFlags() const;
     void SetSelectable( bool bSelectable );
 
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 9d752ef..9d4b6f9 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -979,7 +979,7 @@ sal_Bool SvTreeList::Select( SvListView* pView, SvTreeListEntry* pEntry, sal_Boo
             return sal_False;
         else
         {
-            pViewData->nFlags |= SVLISTENTRYFLAG_SELECTED;
+            pViewData->SetSelected(true);
             pView->nSelectionCount++;
         }
     }
@@ -989,7 +989,7 @@ sal_Bool SvTreeList::Select( SvListView* pView, SvTreeListEntry* pEntry, sal_Boo
             return sal_False;
         else
         {
-            pViewData->nFlags &= ~( SVLISTENTRYFLAG_SELECTED );
+            pViewData->SetSelected(false);
             pView->nSelectionCount--;
         }
     }
@@ -1054,11 +1054,7 @@ void SvTreeList::SelectAll( SvListView* pView, sal_Bool bSelect )
     while ( pEntry )
     {
         SvViewDataEntry* pViewData = pView->GetViewData( pEntry );
-        if ( bSelect )
-            pViewData->nFlags |= SVLISTENTRYFLAG_SELECTED;
-        else
-            pViewData->nFlags &= (~SVLISTENTRYFLAG_SELECTED);
-
+        pViewData->SetSelected(bSelect);
         pEntry = Next( pEntry );
     }
     if ( bSelect )
diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx
index 5288466..9c3d2d3 100644
--- a/svtools/source/contnr/viewdataentry.cxx
+++ b/svtools/source/contnr/viewdataentry.cxx
@@ -86,6 +86,14 @@ void SvViewDataEntry::SetCursored( bool bCursored )
         nFlags |= SVLISTENTRYFLAG_CURSORED;
 }
 
+void SvViewDataEntry::SetSelected( bool bSelected )
+{
+    if ( !bSelected )
+        nFlags &= (~SVLISTENTRYFLAG_SELECTED);
+    else
+        nFlags |= SVLISTENTRYFLAG_SELECTED;
+}
+
 sal_uInt16 SvViewDataEntry::GetFlags() const
 {
     return nFlags;
commit 918fa06314554d70fbc227b4c6ccf1000a29bb22
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Nov 28 15:20:00 2012 -0500

    Let's call this mapped cell rather than linked cell.
    
    Change-Id: I861b3ad248ce680ae3ced4c10eee151883ed4a9e

diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index 009fc96..f690394 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -61,7 +61,7 @@ ModelessDialog RID_SCDLG_XML_SOURCE
         Pos = MAP_APPFONT( 145, 55 );
         Size = MAP_APPFONT ( 100 , 8 ) ;
 
-        Text [ en-US ] = "Linked cell";
+        Text [ en-US ] = "Mapped cell";
     };
 
     Edit ED_MAPPED_CELL


More information about the Libreoffice-commits mailing list