[Libreoffice-commits] core.git: include/svtools sc/source sd/source svtools/source

Ulrich Gemkow lobugs at ikr.uni-stuttgart.de
Fri Aug 18 09:35:52 UTC 2017


 include/svtools/tabbar.hxx        |    8 ++++++--
 sc/source/ui/view/tabcont.cxx     |    6 +++---
 sd/source/ui/view/drviews1.cxx    |    4 ++--
 sd/source/ui/view/drviewsb.cxx    |    2 +-
 svtools/source/control/tabbar.cxx |    6 +++---
 5 files changed, 15 insertions(+), 11 deletions(-)

New commits:
commit b37c344274072df92a8a9624c261aa51c9145217
Author: Ulrich Gemkow <lobugs at ikr.uni-stuttgart.de>
Date:   Thu Aug 3 20:51:26 2017 +0200

    Rename flag to less generic name to prepare adding more flags
    
    Change-Id: I27663a42890bbae3279847a7da971cd367335cb3
    Reviewed-on: https://gerrit.libreoffice.org/40736
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index 811c13529b6c..5be67be2efec 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -52,7 +52,11 @@ WB_TOPBORDER and WB_3DTAB should be set instead of WB_BORDER.
 Allowed PageBits
 -----------------
 
-TPB_SPECIAL     - Different display of the TabText, e.g. for scenario pages.
+Setting page bits modify the display attributes of the tab name
+
+TPB_DISPLAY_NAME_BLUE
+                - Display tab name in light blue, used in draw for
+                  invisible layers and in calc for scenario pages
 
 Handlers
 -------
@@ -272,7 +276,7 @@ class Button;
 
 typedef sal_uInt16 TabBarPageBits;
 
-#define TPB_SPECIAL         ((TabBarPageBits)0x0001)
+#define TPB_DISPLAY_NAME_BLUE      ((TabBarPageBits)0x0001)
 
 // - TabBar-Types - used in TabBar::AllowRenaming
 
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index de7a18ea4f72..d90551a882ca 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -58,7 +58,7 @@ ScTabControl::ScTabControl( vcl::Window* pParent, ScViewData* pData )
             if (pDoc->GetName(i,aString))
             {
                 if ( pDoc->IsScenario(i) )
-                    InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL );
+                    InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_DISPLAY_NAME_BLUE);
                 else
                     InsertPage( static_cast<sal_uInt16>(i)+1, aString );
                 if ( !pDoc->IsDefaultTabBgColor(i) )
@@ -365,13 +365,13 @@ void ScTabControl::UpdateStatus()
                 if (pDoc->GetName(i,aString))
                 {
                     if ( pDoc->IsScenario(i) )
-                        InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL );
+                        InsertPage(static_cast<sal_uInt16>(i)+1, aString, TPB_DISPLAY_NAME_BLUE);
                     else
                         InsertPage( static_cast<sal_uInt16>(i)+1, aString );
                     if ( !pDoc->IsDefaultTabBgColor(i) )
                     {
                         aTabBgColor = pDoc->GetTabBgColor(i);
-                        SetTabBgColor( static_cast<sal_uInt16>(i)+1, aTabBgColor );
+                        SetTabBgColor(static_cast<sal_uInt16>(i)+1, aTabBgColor );
                     }
                 }
             }
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 35cc430285a8..d2291058eac9 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -1171,7 +1171,7 @@ void DrawViewShell::ResetActualLayer()
                         if (pPV && !pPV->IsLayerVisible(aName))
                         {
                             // invisible layers are displayed differently
-                            nBits = TPB_SPECIAL;
+                            nBits = TPB_DISPLAY_NAME_BLUE;
                         }
 
                         pLayerBar->SetPageBits(nLayerPos+1, nBits);
@@ -1189,7 +1189,7 @@ void DrawViewShell::ResetActualLayer()
                         if (!mpDrawView->GetSdrPageView()->IsLayerVisible(aName))
                         {
                             // invisible layers are displayed differently
-                            nBits = TPB_SPECIAL;
+                            nBits = TPB_DISPLAY_NAME_BLUE;
                         }
 
                         pLayerBar->SetPageBits(nLayerPos+1, nBits);
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 1f3aa2759dfd..f6dc8f7cc7b1 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -193,7 +193,7 @@ void DrawViewShell::ModifyLayer (
         if (!bIsVisible)
         {
             // invisible layers are presented different
-            nBits = TPB_SPECIAL;
+            nBits = TPB_DISPLAY_NAME_BLUE;
         }
 
         GetLayerTabControl()->SetPageBits(nCurPage, nBits);
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 8d8bb6d9cdbd..a1d5218786a9 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1192,7 +1192,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& r
             bool bSelected = pItem->IsSelected(pCurItem);
             // We disable custom background color in high contrast mode.
             bool bCustomBgColor = !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode();
-            bool bSpecialTab = (pItem->mnBits & TPB_SPECIAL);
+            bool bSpecialTab = (pItem->mnBits & TPB_DISPLAY_NAME_BLUE);
             OUString aText = pItem->mbShort ? rRenderContext.GetEllipsisString(pItem->maText, mnCurMaxWidth) : pItem->maText;
 
             aDrawer.setRect(aRect);
@@ -1618,7 +1618,7 @@ void TabBar::InsertPage(sal_uInt16 nPageId, const OUString& rText,
     DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" );
     DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND,
                 "TabBar::InsertPage(): PageId already exists" );
-    DBG_ASSERT( nBits <= TPB_SPECIAL, "TabBar::InsertPage(): nBits is wrong" );
+    DBG_ASSERT( nBits <= TPB_DISPLAY_NAME_BLUE, "TabBar::InsertPage(): nBits is wrong" );
 
     // create PageItem and insert in the item list
     ImplTabBarItem* pItem = new ImplTabBarItem( nPageId, rText, nBits );
@@ -2097,7 +2097,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId)
             aForegroundColor = aFaceTextColor;
             aBackgroundColor = aFaceColor;
         }
-        if (GetPageBits( mnEditId ) & TPB_SPECIAL)
+        if (GetPageBits( mnEditId ) & TPB_DISPLAY_NAME_BLUE)
         {
             aForegroundColor = Color(COL_LIGHTBLUE);
         }


More information about the Libreoffice-commits mailing list