diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2009-09-17 15:48:04 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2009-09-17 15:48:04 -0400 |
commit | 8599da1e97948cfe7f5730c175b9dc67691a0752 (patch) | |
tree | 84bd6c37b6c756914f4f45a8c0d46a0fc3cffe3d /sc/source/ui/view/tabcont.cxx | |
parent | 3f03b4672c47e1cb561ca2fd4811e65ae3b95e56 (diff) |
#i5560# Applied & adjusted for the latest codebase the patches from go-oo.
The original patches were contributed by Daniel Watson.
Diffstat (limited to 'sc/source/ui/view/tabcont.cxx')
-rw-r--r-- | sc/source/ui/view/tabcont.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index db1a8952aeef..6b61c21788de 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -69,6 +69,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) : ScDocument* pDoc = pViewData->GetDocument(); String aString; + Color aTabBgColor; SCTAB nCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nCount; i++) { @@ -80,6 +81,12 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) : InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL ); else InsertPage( static_cast<sal_uInt16>(i)+1, aString ); + if ( !pViewData->IsDefaultTabBgColor(i) ) + { + aTabBgColor = pViewData->GetTabBgColor(i); + /*SetTabBgColor(static_cast<sal_uInt16>(i)+1, aTabBgColor, pViewData->IsDefaultTabBgColor(i) );*/ + SetTabBgColor( static_cast<sal_uInt16>(i)+1, aTabBgColor ); + } } } } @@ -265,6 +272,7 @@ void ScTabControl::Select() rBind.Invalidate( FID_DELETE_TABLE ); rBind.Invalidate( FID_TABLE_SHOW ); rBind.Invalidate( FID_TABLE_HIDE ); + rBind.Invalidate( FID_TAB_SET_TAB_BG_COLOR ); // SetReference nur wenn der Konsolidieren-Dialog offen ist // (fuer Referenzen ueber mehrere Tabellen) @@ -291,16 +299,22 @@ void ScTabControl::UpdateStatus() SCTAB i; String aString; SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) ); + Color aTabBgColor; BOOL bModified = FALSE; // Tabellen-Namen for (i=0; i<nMaxCnt && !bModified; i++) { if (pDoc->IsVisible(i)) + { pDoc->GetName(i,aString); + aTabBgColor = pViewData->GetTabBgColor(i); + } else + { aString.Erase(); + } - if (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) + if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) bModified = TRUE; } @@ -317,6 +331,11 @@ void ScTabControl::UpdateStatus() InsertPage( static_cast<sal_uInt16>(i)+1, aString, TPB_SPECIAL ); else InsertPage( static_cast<sal_uInt16>(i)+1, aString ); + if ( !pViewData->IsDefaultTabBgColor(i) ) + { + aTabBgColor = pViewData->GetTabBgColor(i); + SetTabBgColor( static_cast<sal_uInt16>(i)+1, aTabBgColor ); + } } } } |