[Libreoffice-commits] .: sw/source

Sebastian Spaeth spaetz at kemper.freedesktop.org
Wed Nov 10 01:05:19 PST 2010


 sw/source/ui/dbui/dbtree.cxx       |   24 ++++--------------------
 sw/source/ui/dialog/uiregionsw.cxx |   34 +++++++++++-----------------------
 sw/source/ui/fldui/changedb.cxx    |   19 ++-----------------
 sw/source/ui/inc/dbtree.hxx        |    5 ++---
 4 files changed, 19 insertions(+), 63 deletions(-)

New commits:
commit fd98e923c5d9626ed2fb67b78cc0dc5bbe56cf93
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Nov 9 20:12:53 2010 -0800

    Bitmap Tree Cleanup - writer
    
    Removed all references to HIGHCONTRAST mode from svtools classes:
    	SvImpLBox
    	SvTreeListBox
    
    The reset is just fall out.

diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index a717f84..ae57a84 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -195,7 +195,6 @@ SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
 
     SvTreeListBox	(pParent, rResId),
     aImageList      (SW_RES(ILIST_DB_DLG    )),
-    aImageListHC    (SW_RES(ILIST_DB_DLG_HC )),
     sDefDBName		(rDefDBName),
     bInitialized    (FALSE),
     bShowColumns	(bShowCol),
@@ -221,9 +220,7 @@ void SwDBTreeList::InitTreeList()
     // Font nicht setzen, damit der Font des Controls uebernommen wird!
     SetSpaceBetweenEntries(0);
     SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE),
-                    aImageList.GetImage(IMG_EXPAND  ), BMP_COLOR_NORMAL );
-    SetNodeBitmaps( aImageListHC.GetImage(IMG_COLLAPSE),
-                    aImageListHC.GetImage(IMG_EXPAND  ), BMP_COLOR_HIGHCONTRAST );
+                    aImageList.GetImage(IMG_EXPAND  ) );
 
     SetDragDropMode(SV_DRAGDROP_APP_COPY);
 
@@ -234,30 +231,23 @@ void SwDBTreeList::InitTreeList()
     long nCount = aDBNames.getLength();
 
     Image aImg = aImageList.GetImage(IMG_DB);
-    Image aHCImg = aImageListHC.GetImage(IMG_DB);
     for(long i = 0; i < nCount; i++)
     {
         String sDBName(pDBNames[i]);
-        SvLBoxEntry* pEntry = InsertEntry(sDBName, aImg, aImg, NULL, TRUE);
-        SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-        SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
+        InsertEntry(sDBName, aImg, aImg, NULL, TRUE);
     }
     String sDBName(sDefDBName.GetToken(0, DB_DELIM));
     String sTableName(sDefDBName.GetToken(1, DB_DELIM));
     String sColumnName(sDefDBName.GetToken(2, DB_DELIM));
     Select(sDBName, sTableName, sColumnName);
 
-
     bInitialized = TRUE;
 }
 
 void    SwDBTreeList::AddDataSource(const String& rSource)
 {
     Image aImg = aImageList.GetImage(IMG_DB);
-    Image aHCImg = aImageListHC.GetImage(IMG_DB);
     SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, TRUE);
-    SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-    SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
     SvTreeListBox::Select(pEntry);
 }
 
@@ -386,15 +376,12 @@ void  SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
                         long nCount = aTblNames.getLength();
                         const ::rtl::OUString* pTblNames = aTblNames.getConstArray();
                         Image aImg = aImageList.GetImage(IMG_DBTABLE);
-                        Image aHCImg = aImageListHC.GetImage(IMG_DBTABLE);
                         for (long i = 0; i < nCount; i++)
                         {
                             sTableName = pTblNames[i];
                             SvLBoxEntry* pTableEntry = InsertEntry(sTableName, aImg, aImg, pParent, bShowColumns);
                             //to discriminate between queries and tables the user data of table entries is set
                             pTableEntry->SetUserData((void*)0);
-                            SetExpandedEntryBmp(pTableEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-                            SetCollapsedEntryBmp(pTableEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
                         }
                     }
 
@@ -407,14 +394,11 @@ void  SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
                         long nCount = aQueryNames.getLength();
                         const ::rtl::OUString* pQueryNames = aQueryNames.getConstArray();
                         Image aImg = aImageList.GetImage(IMG_DBQUERY);
-                        Image aHCImg = aImageListHC.GetImage(IMG_DBQUERY);
                         for (long i = 0; i < nCount; i++)
                         {
                             sQueryName = pQueryNames[i];
                             SvLBoxEntry* pQueryEntry = InsertEntry(sQueryName, aImg, aImg, pParent, bShowColumns);
                             pQueryEntry->SetUserData((void*)1);
-                            SetExpandedEntryBmp(pQueryEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-                            SetCollapsedEntryBmp( pQueryEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
                         }
                     }
                 }
@@ -543,7 +527,7 @@ sal_Int8 SwDBTreeList::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
     return DND_ACTION_NONE;
 }
 
-void    SwDBTreeList::SetWrtShell(SwWrtShell& rSh)
+void SwDBTreeList::SetWrtShell(SwWrtShell& rSh)
 {
     pImpl->SetWrtShell(rSh);
     if (IsVisible() && !bInitialized)
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 3505d4a..806b23b 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -143,7 +143,7 @@ void lcl_FillSubRegionList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pA
         ppMark != pMarkAccess->getMarksEnd();
         ppMark++)
     {
-        const ::sw::mark::IMark* pBkmk = ppMark->get(); 
+        const ::sw::mark::IMark* pBkmk = ppMark->get();
         if( pBkmk->IsExpanded() )
             rSubRegions.InsertEntry( pBkmk->GetName() );
     }
@@ -517,9 +517,6 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
                                             *(pSect=pFmt->GetSection()) );
                 Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), FALSE);
                 pEntry = aTree.InsertEntry(pSect->GetSectionName(), aImg, aImg);
-                Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
-                aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-                aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
                 pEntry->SetUserData(pSectRepr);
                 RecurseList( pFmt, pEntry );
                 if (pEntry->HasChilds())
@@ -551,9 +548,6 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
                                             pSect->IsHidden(), FALSE);
                     pNEntry = aTree.InsertEntry(
                         pSect->GetSectionName(), aImage, aImage, pEntry);
-                    Image aHCImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden(), TRUE);
-                    aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-                    aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
                     pNEntry->SetUserData(pSectRepr);
                     RecurseList( aTmpArr[n]->GetFmt(), pNEntry );
                     if( pNEntry->HasChilds())
@@ -919,11 +913,8 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
         pRepr->GetSectionData().SetProtectFlag(bCheck);
         Image aImage = BuildBitmap( bCheck,
                                     STATE_CHECK == aHideCB.GetState(), FALSE);
-        aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
-        aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
-        Image aHCImg = BuildBitmap( bCheck, STATE_CHECK == aHideCB.GetState(), TRUE);
-        aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-        aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
+        aTree.SetExpandedEntryBmp(  pEntry, aImage );
+        aTree.SetCollapsedEntryBmp( pEntry, aImage );
         pEntry = aTree.NextSelected(pEntry);
     }
     aPasswdCB.Enable(bCheck);
@@ -945,14 +936,11 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
     {
         SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
         pRepr->GetSectionData().SetHidden(STATE_CHECK == pBox->GetState());
+
         Image aImage = BuildBitmap(STATE_CHECK == aProtectCB.GetState(),
                                     STATE_CHECK == pBox->GetState(), FALSE);
-        aTree.SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
-        aTree.SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
-        Image aHCImg = BuildBitmap( STATE_CHECK == aProtectCB.GetState(),
-                                    STATE_CHECK == pBox->GetState(), TRUE);
-        aTree.SetExpandedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
-        aTree.SetCollapsedEntryBmp(pEntry, aHCImg, BMP_COLOR_HIGHCONTRAST);
+        aTree.SetExpandedEntryBmp(  pEntry, aImage );
+        aTree.SetCollapsedEntryBmp( pEntry, aImage );
 
         pEntry = aTree.NextSelected(pEntry);
     }
@@ -1470,8 +1458,8 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
 {
     if( !bSubRegionsFilled && pEvent && pEvent->GetId() == VCLEVENT_DROPDOWN_PRE_OPEN )
     {
-        //if necessary fill the names bookmarks/sections/tables now 
-        
+        //if necessary fill the names bookmarks/sections/tables now
+
         rtl::OUString sFileName = aFileNameED.GetText();
         if(sFileName.getLength())
         {
@@ -1486,11 +1474,11 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
             SfxMedium aMedium( sFileName, STREAM_STD_READ );
             sFileName = aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
             ::lcl_ReadSections( aMedium, aSubRegionED );
-        }    
+        }
         else
             lcl_FillSubRegionList( rSh, aSubRegionED, 0 );
         bSubRegionsFilled = true;
-    }    
+    }
     return 0;
 }
 
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index a4d78ca..5ecb5b0 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -85,7 +85,6 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
     aOKBT		(this, SW_RES(BT_OK      	)),
     aCancelBT	(this, SW_RES(BT_CANCEL  	)),
     aHelpBT		(this, SW_RES(BT_HELP    	)),
-//	aChangeBT	(this, SW_RES(BT_CHANGEDB    )),
     aImageList      (SW_RES(ILIST_DB_DLG    )),
     aImageListHC    (SW_RES(ILIST_DB_DLG_HC )),
 
@@ -104,11 +103,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
     aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION);
     aUsedDBTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
     aUsedDBTLB.SetSpaceBetweenEntries(0);
-
-    aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE),
-                    aImageList.GetImage(IMG_EXPAND  ), BMP_COLOR_NORMAL );
-    aUsedDBTLB.SetNodeBitmaps( aImageListHC.GetImage(IMG_COLLAPSE),
-                    aImageListHC.GetImage(IMG_EXPAND  ), BMP_COLOR_HIGHCONTRAST );
+    aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), aImageList.GetImage(IMG_EXPAND));
 
     Link aLink = LINK(this, SwChangeDBDlg, TreeSelectHdl);
 
@@ -187,11 +182,7 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
     Image aTableImg = aImageList.GetImage(IMG_DBTABLE);
     Image aDBImg = aImageList.GetImage(IMG_DB);
     Image aQueryImg = aImageList.GetImage(IMG_DBQUERY);
-    Image aHCTableImg = aImageListHC.GetImage(IMG_DBTABLE);
-    Image aHCDBImg = aImageListHC.GetImage(IMG_DB);
-    Image aHCQueryImg = aImageListHC.GetImage(IMG_DBQUERY);
     Image& rToInsert = nCommandType ? aQueryImg : aTableImg;
-    Image& rHCToInsert = nCommandType ? aHCQueryImg : aHCTableImg;
     while ((pParent = aUsedDBTLB.GetEntry(nParent++)) != NULL)
     {
         if (sDBName == aUsedDBTLB.GetEntryText(pParent))
@@ -202,19 +193,13 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
                     return pChild;
             }
             SvLBoxEntry* pRet = aUsedDBTLB.InsertEntry(sTableName, rToInsert, rToInsert, pParent);
-            aUsedDBTLB.SetExpandedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
-            aUsedDBTLB.SetCollapsedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
             pRet->SetUserData((void*)nCommandType);
             return pRet;
         }
     }
     pParent = aUsedDBTLB.InsertEntry(sDBName, aDBImg, aDBImg);
-    aUsedDBTLB.SetExpandedEntryBmp(pParent, aHCDBImg, BMP_COLOR_HIGHCONTRAST);
-    aUsedDBTLB.SetCollapsedEntryBmp(pParent, aHCDBImg, BMP_COLOR_HIGHCONTRAST);
 
     SvLBoxEntry* pRet = aUsedDBTLB.InsertEntry(sTableName, rToInsert, rToInsert, pParent);
-    aUsedDBTLB.SetExpandedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
-    aUsedDBTLB.SetCollapsedEntryBmp(pRet, rHCToInsert, BMP_COLOR_HIGHCONTRAST);
     pRet->SetUserData((void*)nCommandType);
     return pRet;
 }
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index 6a87459..8ab0c2c 100644
--- a/sw/source/ui/inc/dbtree.hxx
+++ b/sw/source/ui/inc/dbtree.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,6 @@ class SwWrtShell;
 class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
 {
     ImageList       aImageList;
-    ImageList       aImageListHC;
     Image			aDBBMP;
     Image			aTableBMP;
     Image			aQueryBMP;
@@ -79,7 +78,7 @@ public:
 
     void	ShowColumns(BOOL bShowCol);
     void    SetWrtShell(SwWrtShell& rSh);
-    
+
     void    AddDataSource(const String& rSource);
 };
 


More information about the Libreoffice-commits mailing list