Kaydet (Commit) b37c3442 authored tarafından Ulrich Gemkow's avatar Ulrich Gemkow Kaydeden (comit) Eike Rathke

Rename flag to less generic name to prepare adding more flags

Change-Id: I27663a42890bbae3279847a7da971cd367335cb3
Reviewed-on: https://gerrit.libreoffice.org/40736Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
üst 75539963
...@@ -52,7 +52,11 @@ WB_TOPBORDER and WB_3DTAB should be set instead of WB_BORDER. ...@@ -52,7 +52,11 @@ WB_TOPBORDER and WB_3DTAB should be set instead of WB_BORDER.
Allowed PageBits 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 Handlers
------- -------
...@@ -272,7 +276,7 @@ class Button; ...@@ -272,7 +276,7 @@ class Button;
typedef sal_uInt16 TabBarPageBits; typedef sal_uInt16 TabBarPageBits;
#define TPB_SPECIAL ((TabBarPageBits)0x0001) #define TPB_DISPLAY_NAME_BLUE ((TabBarPageBits)0x0001)
// - TabBar-Types - used in TabBar::AllowRenaming // - TabBar-Types - used in TabBar::AllowRenaming
......
...@@ -58,7 +58,7 @@ ScTabControl::ScTabControl( vcl::Window* pParent, ScViewData* pData ) ...@@ -58,7 +58,7 @@ ScTabControl::ScTabControl( vcl::Window* pParent, ScViewData* pData )
if (pDoc->GetName(i,aString)) if (pDoc->GetName(i,aString))
{ {
if ( pDoc->IsScenario(i) ) 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 else
InsertPage( static_cast<sal_uInt16>(i)+1, aString ); InsertPage( static_cast<sal_uInt16>(i)+1, aString );
if ( !pDoc->IsDefaultTabBgColor(i) ) if ( !pDoc->IsDefaultTabBgColor(i) )
...@@ -365,13 +365,13 @@ void ScTabControl::UpdateStatus() ...@@ -365,13 +365,13 @@ void ScTabControl::UpdateStatus()
if (pDoc->GetName(i,aString)) if (pDoc->GetName(i,aString))
{ {
if ( pDoc->IsScenario(i) ) 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 else
InsertPage( static_cast<sal_uInt16>(i)+1, aString ); InsertPage( static_cast<sal_uInt16>(i)+1, aString );
if ( !pDoc->IsDefaultTabBgColor(i) ) if ( !pDoc->IsDefaultTabBgColor(i) )
{ {
aTabBgColor = pDoc->GetTabBgColor(i); aTabBgColor = pDoc->GetTabBgColor(i);
SetTabBgColor( static_cast<sal_uInt16>(i)+1, aTabBgColor ); SetTabBgColor(static_cast<sal_uInt16>(i)+1, aTabBgColor );
} }
} }
} }
......
...@@ -1171,7 +1171,7 @@ void DrawViewShell::ResetActualLayer() ...@@ -1171,7 +1171,7 @@ void DrawViewShell::ResetActualLayer()
if (pPV && !pPV->IsLayerVisible(aName)) if (pPV && !pPV->IsLayerVisible(aName))
{ {
// invisible layers are displayed differently // invisible layers are displayed differently
nBits = TPB_SPECIAL; nBits = TPB_DISPLAY_NAME_BLUE;
} }
pLayerBar->SetPageBits(nLayerPos+1, nBits); pLayerBar->SetPageBits(nLayerPos+1, nBits);
...@@ -1189,7 +1189,7 @@ void DrawViewShell::ResetActualLayer() ...@@ -1189,7 +1189,7 @@ void DrawViewShell::ResetActualLayer()
if (!mpDrawView->GetSdrPageView()->IsLayerVisible(aName)) if (!mpDrawView->GetSdrPageView()->IsLayerVisible(aName))
{ {
// invisible layers are displayed differently // invisible layers are displayed differently
nBits = TPB_SPECIAL; nBits = TPB_DISPLAY_NAME_BLUE;
} }
pLayerBar->SetPageBits(nLayerPos+1, nBits); pLayerBar->SetPageBits(nLayerPos+1, nBits);
......
...@@ -193,7 +193,7 @@ void DrawViewShell::ModifyLayer ( ...@@ -193,7 +193,7 @@ void DrawViewShell::ModifyLayer (
if (!bIsVisible) if (!bIsVisible)
{ {
// invisible layers are presented different // invisible layers are presented different
nBits = TPB_SPECIAL; nBits = TPB_DISPLAY_NAME_BLUE;
} }
GetLayerTabControl()->SetPageBits(nCurPage, nBits); GetLayerTabControl()->SetPageBits(nCurPage, nBits);
......
...@@ -1192,7 +1192,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& r ...@@ -1192,7 +1192,7 @@ void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& r
bool bSelected = pItem->IsSelected(pCurItem); bool bSelected = pItem->IsSelected(pCurItem);
// We disable custom background color in high contrast mode. // We disable custom background color in high contrast mode.
bool bCustomBgColor = !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode(); 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; OUString aText = pItem->mbShort ? rRenderContext.GetEllipsisString(pItem->maText, mnCurMaxWidth) : pItem->maText;
aDrawer.setRect(aRect); aDrawer.setRect(aRect);
...@@ -1618,7 +1618,7 @@ void TabBar::InsertPage(sal_uInt16 nPageId, const OUString& rText, ...@@ -1618,7 +1618,7 @@ void TabBar::InsertPage(sal_uInt16 nPageId, const OUString& rText,
DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" ); DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" );
DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND, DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND,
"TabBar::InsertPage(): PageId already exists" ); "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 // create PageItem and insert in the item list
ImplTabBarItem* pItem = new ImplTabBarItem( nPageId, rText, nBits ); ImplTabBarItem* pItem = new ImplTabBarItem( nPageId, rText, nBits );
...@@ -2097,7 +2097,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId) ...@@ -2097,7 +2097,7 @@ bool TabBar::StartEditMode(sal_uInt16 nPageId)
aForegroundColor = aFaceTextColor; aForegroundColor = aFaceTextColor;
aBackgroundColor = aFaceColor; aBackgroundColor = aFaceColor;
} }
if (GetPageBits( mnEditId ) & TPB_SPECIAL) if (GetPageBits( mnEditId ) & TPB_DISPLAY_NAME_BLUE)
{ {
aForegroundColor = Color(COL_LIGHTBLUE); aForegroundColor = Color(COL_LIGHTBLUE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment