[Libreoffice-commits] .: dbaccess/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Nov 16 12:50:52 PST 2010


 dbaccess/source/ui/app/AppDetailPageHelper.cxx |   31 +++++++++----------
 dbaccess/source/ui/app/AppDetailPageHelper.hxx |    5 ---
 dbaccess/source/ui/browser/dsEntriesNoExp.cxx  |   12 ++-----
 dbaccess/source/ui/browser/unodatbr.cxx        |   18 +++--------
 dbaccess/source/ui/control/dbtreelistbox.cxx   |    4 --
 dbaccess/source/ui/control/tabletree.cxx       |   15 ++++-----
 dbaccess/source/ui/dlg/adtabdlg.cxx            |    2 -
 dbaccess/source/ui/dlg/sqlmessage.cxx          |   29 +++++-------------
 dbaccess/source/ui/inc/UITools.hxx             |    8 -----
 dbaccess/source/ui/inc/dbu_resource.hrc        |    1 
 dbaccess/source/ui/inc/imageprovider.hxx       |   40 +++----------------------
 dbaccess/source/ui/inc/unodatbr.hxx            |    3 -
 dbaccess/source/ui/misc/UITools.cxx            |   16 ----------
 dbaccess/source/ui/misc/WTypeSelect.cxx        |    2 -
 dbaccess/source/ui/misc/imageprovider.cxx      |   34 +++++++--------------
 dbaccess/source/ui/querydesign/TableWindow.cxx |    8 ++---
 dbaccess/source/ui/querydesign/query.src       |   14 --------
 17 files changed, 64 insertions(+), 178 deletions(-)

New commits:
commit 890fe003c904143b4297c2989fc630c9a5492781
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 16 20:42:52 2010 +0000

    fix these again

diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 1cc79b7..2d3d55b 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -623,7 +623,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
 
         ImageProvider aImageProvider( _xConnection );
         createTree( pTreeView,
-            aImageProvider.getDefaultImage( DatabaseObject::TABLE, false )
+            aImageProvider.getDefaultImage( DatabaseObject::TABLE )
         );
 
         pTreeView->notifyHiContrastChanged();
@@ -643,10 +643,10 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
 }
 
 // -----------------------------------------------------------------------------
-void OAppDetailPageHelper::getElementIcons( ElementType _eType, USHORT& _rImageId, USHORT& _rHighContrastImageId )
+void OAppDetailPageHelper::getElementIcons( ElementType _eType, USHORT& _rImageId )
 {
     ImageProvider aImageProvider;
-    _rImageId = _rHighContrastImageId = 0;
+    _rImageId = 0;
 
     sal_Int32 nDatabaseObjectType( 0 );
     switch(_eType )
@@ -658,8 +658,7 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, USHORT& _rImageI
             OSL_ENSURE( sal_False, "OAppDetailPageHelper::GetElementIcons: invalid element type!" );
             return;
     }
-    _rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType, false );
-    _rHighContrastImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType, true );
+    _rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType );
 }
 
 // -----------------------------------------------------------------------------
@@ -667,27 +666,27 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
 {
     OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed.");
 
-    USHORT nHelpId = 0, nImageId = 0, nImageIdH = 0;
+    USHORT nHelpId = 0, nImageId = 0;
     ImageProvider aImageProvider;
     Image aFolderImage;
     switch( _eType )
     {
         case E_FORM:
             nHelpId = HID_APP_FORM_TREE;
-            aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false );
+            aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM );
             break;
         case E_REPORT:
             nHelpId = HID_APP_REPORT_TREE;
-            aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT, false );
+            aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT );
             break;
         case E_QUERY:
             nHelpId = HID_APP_QUERY_TREE;
-            aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY, false );
+            aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY );
             break;
         default:
             OSL_ENSURE(0,"Illegal call!");
     }
-    getElementIcons( _eType, nImageId, nImageIdH );
+    getElementIcons( _eType, nImageId );
 
     if ( !m_pLists[_eType] )
     {
@@ -698,7 +697,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
     {
         if ( !m_pLists[_eType]->GetEntryCount() && _xContainer.is() )
         {
-            fillNames( _xContainer, _eType, nImageId, nImageIdH, NULL );
+            fillNames( _xContainer, _eType, nImageId, NULL );
 
             m_pLists[_eType]->SelectAll(FALSE);
         }
@@ -746,7 +745,7 @@ namespace
 
 // -----------------------------------------------------------------------------
 void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType,
-                                      const USHORT _nImageId, const USHORT _nHighContrastImageId, SvLBoxEntry* _pParent )
+                                      const USHORT _nImageId, SvLBoxEntry* _pParent )
 {
     OSL_ENSURE(_xContainer.is(),"Data source is NULL! -> GPF");
     OSL_ENSURE( ( _eType >= E_TABLE ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OAppDetailPageHelper::fillNames: invalid type!" );
@@ -771,7 +770,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
             {
                 pEntry = pList->InsertEntry( *pIter, _pParent, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
                 getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) );
-                fillNames( xSubElements, _eType, _nImageId, _nHighContrastImageId, pEntry );
+                fillNames( xSubElements, _eType, _nImageId, pEntry );
             }
             else
             {
@@ -895,14 +894,14 @@ SvLBoxEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const ::rtl::
             }
         }
 
-        USHORT nImageId = 0, nImageIdH = 0;
-        getElementIcons( _eType, nImageId, nImageIdH );
+        USHORT nImageId = 0;
+        getElementIcons( _eType, nImageId );
         Reference<XNameAccess> xContainer(_rObject,UNO_QUERY);
         if ( xContainer.is() )
         {
             const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType );
             pRet = pTreeView->InsertEntry( _rName, pEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
-            fillNames( xContainer, _eType, nImageId, nImageIdH, pRet );
+            fillNames( xContainer, _eType, nImageId, pRet );
         }
         else
         {
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index e799d79..f52dc7b 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -119,7 +119,7 @@ namespace dbaui
 
         /** retrieves the resource ids of the images representing elements of the given type
         */
-        void getElementIcons( ElementType _eType, USHORT& _rImageId, USHORT& _rHighContrastImageId );
+        void getElementIcons( ElementType _eType, USHORT& _rImageId );
 
         /** fills the names in the listbox
             @param	_xContainer
@@ -128,15 +128,12 @@ namespace dbaui
                 the type of elements which are being filled
             @param _nImageId
                 the resource id of the image to use for non-container entries
-            @param _nHighContrastImageId
-                the resource id of the high contrast image to use for non-container entries
             @param	_pParent
                 The parent of the entries to be inserted.
         */
         void fillNames( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer,
                         const ElementType _eType,
                         const USHORT _nImageId,
-                        const USHORT _nHighContrastImageId,
                         SvLBoxEntry* _pParent );
 
         /** sets the detail page
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index d5f1510..ef2d668 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -224,25 +224,21 @@ void SbaTableQueryBrowser::notifyHiContrastChanged()
             ::std::auto_ptr< ImageProvider > pImageProvider( getImageProviderFor( pEntryLoop ) );
 
             // the images for this entry
-            Image aImage, aImageHC;
+            Image aImage;
             if ( pData->eType == etDatasource )
-            {
-                aImage = pImageProvider->getDatabaseImage( false );
-                aImageHC = pImageProvider->getDatabaseImage( true );
-            }
+                aImage = pImageProvider->getDatabaseImage();
             else
             {
                 bool bIsFolder = !isObject( pData->eType );
                 if ( bIsFolder )
                 {
                     sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
-                    aImage = pImageProvider->getFolderImage( nObjectType, false );
-                    aImageHC = pImageProvider->getFolderImage( nObjectType, true );
+                    aImage = pImageProvider->getFolderImage( nObjectType );
                 }
                 else
                 {
                     sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
-                    pImageProvider->getImages( GetEntryText( pEntryLoop ), nObjectType, aImage, aImageHC );
+                    pImageProvider->getImages( GetEntryText( pEntryLoop ), nObjectType, aImage );
                 }
             }
 
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 648c213..7a2c16f 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1980,12 +1980,12 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb
 
     ImageProvider aImageProvider;
     if (!_rQueryImage)
-        _rQueryImage = aImageProvider.getFolderImage( DatabaseObject::QUERY, isHiContrast() );
+        _rQueryImage = aImageProvider.getFolderImage( DatabaseObject::QUERY );
     if (!_rTableImage)
-        _rTableImage = aImageProvider.getFolderImage( DatabaseObject::TABLE, isHiContrast() );
+        _rTableImage = aImageProvider.getFolderImage( DatabaseObject::TABLE );
 
     if (!_rDbImage)
-        _rDbImage = aImageProvider.getDatabaseImage( isHiContrast() );
+        _rDbImage = aImageProvider.getDatabaseImage();
 
     // add the entry for the data source
     // special handling for data sources denoted by URLs - we do not want to display this ugly URL, do we?
@@ -2077,8 +2077,8 @@ SvLBoxEntry* SbaTableQueryBrowser::implAppendEntry( SvLBoxEntry* _pParent, const
 {
     ::std::auto_ptr< ImageProvider > pImageProvider( getImageProviderFor( _pParent ) );
 
-    Image aImage, aImageHC;
-    pImageProvider->getImages( _rName, getDatabaseObjectType( _eEntryType ), aImage, aImageHC );
+    Image aImage;
+    pImageProvider->getImages( _rName, getDatabaseObjectType( _eEntryType ), aImage );
 
     SvLBoxEntry* pNewEntry = m_pTreeView->getListBox().InsertEntry( _rName, _pParent, _eEntryType == etQueryContainer , LIST_APPEND, _pUserData );
 
@@ -3568,14 +3568,6 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _
     }
 }
 // -----------------------------------------------------------------------------
-sal_Bool SbaTableQueryBrowser::isHiContrast() const
-{
-    sal_Bool bRet = sal_False;
-    if ( m_pTreeView )
-        bRet = m_pTreeView->getListBox().GetSettings().GetStyleSettings().GetHighContrastMode();
-    return bRet;
-}
-// -----------------------------------------------------------------------------
 void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
 {
     if ( m_bShowMenu )
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index c2d0570..e763517 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -533,8 +533,6 @@ namespace
     }
     void lcl_insertMenuItemImages( Menu& _rMenu, IController& _rCommandController )
     {
-        const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
-        const BOOL bHiContrast = rSettings.GetHighContrastMode();
         uno::Reference< frame::XController > xController = _rCommandController.getXController();
         uno::Reference< frame::XFrame> xFrame;
         if ( xController.is() )
@@ -556,7 +554,7 @@ namespace
             } // if ( pPopup )
 
             if ( xFrame.is() )
-                _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,FALSE,bHiContrast));
+                _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,FALSE));
         }
     }
     // =========================================================================
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 7ef87bb..396a3f7 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -105,8 +105,8 @@ OTableTreeListBox::~OTableTreeListBox()
 void OTableTreeListBox::implSetDefaultImages()
 {
     ImageProvider aImageProvider;
-    SetDefaultExpandedEntryBmp(  aImageProvider.getFolderImage( DatabaseObject::TABLE, false ) );
-    SetDefaultCollapsedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE, false ) );
+    SetDefaultExpandedEntryBmp(  aImageProvider.getFolderImage( DatabaseObject::TABLE ) );
+    SetDefaultCollapsedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE ) );
 }
 
 // -----------------------------------------------------------------------------
@@ -137,16 +137,15 @@ void OTableTreeListBox::notifyHiContrastChanged()
             {
                 SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem );
 
-                Image aImage, aImageHC;
+                Image aImage;
                 if ( isFolderEntry( pEntryLoop ) )
                 {
-                    aImage = m_pImageProvider->getFolderImage( DatabaseObject::TABLE, false );
-                    aImageHC = m_pImageProvider->getFolderImage( DatabaseObject::TABLE, true );
+                    aImage = m_pImageProvider->getFolderImage( DatabaseObject::TABLE );
                 }
                 else
                 {
                     String sCompleteName( getQualifiedTableName( pEntryLoop ) );
-                    m_pImageProvider->getImages( sCompleteName, DatabaseObject::TABLE, aImage, aImageHC );
+                    m_pImageProvider->getImages( sCompleteName, DatabaseObject::TABLE, aImage );
                 }
 
                 pContextBitmapItem->SetBitmap1( aImage );
@@ -500,8 +499,8 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
     {
         pRet = InsertEntry( sName, pParentEntry, FALSE, LIST_APPEND );
 
-        Image aImage, aImageHC;
-        m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage, aImageHC );
+        Image aImage;
+        m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage );
 
         SetExpandedEntryBmp( pRet, aImage );
         SetCollapsedEntryBmp( pRet, aImage );
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 114a52a..2386674 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -298,7 +298,7 @@ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ )
     try
     {
         ImageProvider aImageProvider( m_xConnection );
-        Image aQueryImage( aImageProvider.getDefaultImage( DatabaseObject::QUERY, false ) );
+        Image aQueryImage( aImageProvider.getDefaultImage( DatabaseObject::QUERY ) );
 
         m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImage );
         m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImage );
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 4edc878..22bb460 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -70,7 +70,7 @@ namespace
     class IImageProvider
     {
     public:
-        virtual Image   getImage( bool _highContrast ) const = 0;
+        virtual Image   getImage() const = 0;
 
         virtual ~IImageProvider() { }
     };
@@ -89,27 +89,17 @@ namespace
     {
     private:
         USHORT  m_defaultImageID;
-        USHORT  m_highContrastImageID;
 
         mutable Image   m_defaultImage;
-        mutable Image   m_highContrastImage;
 
     public:
-        ImageProvider( USHORT _defaultImageID, USHORT _highContrastImageID )
+        ImageProvider( USHORT _defaultImageID )
             :m_defaultImageID( _defaultImageID )
-            ,m_highContrastImageID( _highContrastImageID )
         {
         }
 
-        virtual Image getImage( bool _highContrast ) const
+        virtual Image getImage() const
         {
-            if ( _highContrast )
-            {
-                if ( !m_highContrastImage )
-                    m_highContrastImage = Image( ModuleRes( m_highContrastImageID ) );
-                return m_highContrastImage;
-            }
-
             if ( !m_defaultImage )
                 m_defaultImage = Image( ModuleRes( m_defaultImageID ) );
             return m_defaultImage;
@@ -171,9 +161,7 @@ namespace
             }
 
             if ( !ppProvider->get() )
-                // FIXME: remove second arg from ImageProvider.
-                // FIXME: It used to be high contrast
-                ppProvider->reset( new ImageProvider( nNormalImageID, nNormalImageID ) );
+                ppProvider->reset( new ImageProvider( nNormalImageID ) );
             return *ppProvider;
         }
 
@@ -313,9 +301,9 @@ namespace
     }
 
     //------------------------------------------------------------------------------
-    void lcl_insertExceptionEntry( SvTreeListBox& _rList, bool _bHiContrast, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry )
+    void lcl_insertExceptionEntry( SvTreeListBox& _rList, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry )
     {
-        Image aEntryImage( _rEntry.pImageProvider->getImage( _bHiContrast ) );
+        Image aEntryImage( _rEntry.pImageProvider->getImage() );
         SvLBoxEntry* pListEntry =
             _rList.InsertEntry( _rEntry.pLabelProvider->getLabel(), aEntryImage, aEntryImage );
         pListEntry->SetUserData( reinterpret_cast< void* >( _nElementPos ) );
@@ -374,7 +362,6 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi
     m_aExceptionText.SetReadOnly(sal_True);
 
     bool bHave22018 = false;
-    bool bHiContrast = isHiContrast( this );
     size_t elementPos = 0;
 
     for (   ExceptionDisplayChain::const_iterator loop = m_aExceptions.begin();
@@ -382,7 +369,7 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi
             ++loop, ++elementPos
         )
     {
-        lcl_insertExceptionEntry( m_aExceptionList, bHiContrast, elementPos, *loop );
+        lcl_insertExceptionEntry( m_aExceptionList, elementPos, *loop );
         bHave22018 = loop->sSQLState.EqualsAscii( "22018" );
     }
 
@@ -398,7 +385,7 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi
         aInfo22018.pImageProvider = aProviderFactory.getImageProvider( SQLExceptionInfo::SQL_CONTEXT );
         m_aExceptions.push_back( aInfo22018 );
 
-        lcl_insertExceptionEntry( m_aExceptionList, bHiContrast, m_aExceptions.size() - 1, aInfo22018 );
+        lcl_insertExceptionEntry( m_aExceptionList, m_aExceptions.size() - 1, aInfo22018 );
     }
 }
 
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 6ecab05..3b573f1 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -266,14 +266,6 @@ namespace dbaui
     */
     void adjustToolBoxSize(ToolBox* _pToolBox);
 
-    /** isHiContrast check if we are in hi contrast mode.
-        @param	_pWindow
-            The window we have to check on.
-        @return
-            <TRUE/> if so, otherwise <FALSE/>
-    */
-    sal_Bool isHiContrast(Window* _pWindow);
-
     void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId );
 
     /** check if SQL92 name checking is enabled
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 7686d3d..af22fc4 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -256,7 +256,6 @@
 //  ...
 // free
 #define REPORTFOLDER_TREE_ICON          RID_IMAGE_START + 24
-#define	IMG_JOINS_H				RID_IMAGE_START + 32
 #define	IMG_FORMFOLDER_TREE_L			RID_IMAGE_START + 39
 #define	IMG_REPORTFOLDER_TREE_L			RID_IMAGE_START + 40
 #define	IMG_QUERYFOLDER_TREE_L			RID_IMAGE_START + 41
diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx
index 1ad4678..3e45239 100644
--- a/dbaccess/source/ui/inc/imageprovider.hxx
+++ b/dbaccess/source/ui/inc/imageprovider.hxx
@@ -87,16 +87,13 @@ namespace dbaui
                 the name of the object
             @param  _out_rImage
                 the normal image to use for the object
-            @param  _out_rImageHC
-                the high-contrast version of the image to use for the object
             @return
                 the image to be used for the object.
         */
         void getImages(
             const String& _rName,
             const sal_Int32 _nDatabaseObjectType,
-            Image& _out_rImage,
-            Image& _out_rImageHC
+            Image& _out_rImage
         );
 
         /** returns the default image to be used for a database object
@@ -108,18 +105,11 @@ namespace dbaui
             @param  _nDatabaseObjectType
                 the type of the object. Must be one of the css.sdb.application.DatabaseObject
                 constants.
-            @param  _bHighContrast
-                indicates whether High-Contrast icons should be used.
-                Note that normally, this would be some application-wide setting. However,
-                in current OOo, HC support is decided on a per-control basis, means every
-                control decides itself whether its images must be HC versions or not.
-                Thus callers need to specify this flag.
             @return
                 the image to be used for the object type.
         */
         Image getDefaultImage(
-            sal_Int32 _nDatabaseObjectType,
-            bool _bHighContrast
+            sal_Int32 _nDatabaseObjectType
         );
 
         /** returns the resource ID for the default image to be used for a database object
@@ -131,19 +121,12 @@ namespace dbaui
             @param  _nDatabaseObjectType
                 the type of the object. Must be one of the css.sdb.application.DatabaseObject
                 constants.
-            @param  _bHighContrast
-                indicates whether High-Contrast icons should be used.
-                Note that normally, this would be some application-wide setting. However,
-                in current OOo, HC support is decided on a per-control basis, means every
-                control decides itself whether its images must be HC versions or not.
-                Thus callers need to specify this flag.
             @return
                 the resource ID image to be used for the object type. Must be fed into a
                 ModuleRes instance to actually load the image.
         */
         USHORT getDefaultImageResourceID(
-            sal_Int32 _nDatabaseObjectType,
-            bool _bHighContrast
+            sal_Int32 _nDatabaseObjectType
         );
 
         /** retrieves the image to be used for folders of database objects
@@ -152,31 +135,18 @@ namespace dbaui
                 constants.
             @param  _rName
                 the name of the object
-            @param  _bHighContrast
-                indicates whether High-Contrast icons should be used.
-                Note that normally, this would be some application-wide setting. However,
-                in current OOo, HC support is decided on a per-control basis, means every
-                control decides itself whether its images must be HC versions or not.
-                Thus callers need to specify this flag.
             @return
                 the image to be used for folders of the given type
         */
         Image getFolderImage(
-            sal_Int32 _nDatabaseObjectType,
-            bool _bHighContrast
+            sal_Int32 _nDatabaseObjectType
         );
 
         /** retrieves the image to be used for a database as a whole.
-            @param  _bHighContrast
-                indicates whether High-Contrast icons should be used.
-                Note that normally, this would be some application-wide setting. However,
-                in current OOo, HC support is decided on a per-control basis, means every
-                control decides itself whether its images must be HC versions or not.
-                Thus callers need to specify this flag.
             @return
                 the image to be used for folders of this type
         */
-        Image getDatabaseImage( bool _bHighContrast );
+        Image getDatabaseImage();
     };
 
 //........................................................................
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 0d6ef5d..507003f 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -471,9 +471,6 @@ namespace dbaui
         // remove all grid columns and dispose them
         void clearGridColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xColContainer);
 
-        sal_Bool isHiContrast() const;
-
-
         /** checks if the currently displayed entry changed
             @param	_sName
                     Name of the changed entry
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 5ab191e..c7476d2 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1150,22 +1150,6 @@ void adjustToolBoxSize(ToolBox* _pToolBox)
     }
 }
 // -----------------------------------------------------------------------------
-sal_Bool isHiContrast(Window* _pWindow)
-{
-    OSL_ENSURE(_pWindow,"Window must be not null!");
-    Window* pIter = _pWindow;
-    //	while( pIter &&  pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT )
-    while( pIter )
-    {
-        if ( pIter->GetBackground().GetColor().GetColor() == COL_TRANSPARENT )
-            pIter = pIter->GetParent();
-        else
-            break;
-    }
-    return pIter && pIter->GetSettings().GetStyleSettings().GetHighContrastMode();
-}
-
-// -----------------------------------------------------------------------------
 void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId )
 {
     sal_Int32 nColSize = -1;
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index ea928c9..f7a02e3 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -246,7 +246,7 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream )
     DBG_CTOR(OWizTypeSelect,NULL);
     m_lbColumnNames.SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl));
 
-    ModuleRes aModuleRes(isHiContrast(&m_lbColumnNames) ? IMG_JOINS_H : IMG_JOINS);
+    ModuleRes aModuleRes(IMG_JOINS);
     ImageList aImageList(aModuleRes);
     m_imgPKey = aImageList.GetImage(IMG_PRIMARY_KEY);
 
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 9c05862..b49c254 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -82,15 +82,12 @@ namespace dbaui
     {
         //................................................................
         static void lcl_getConnectionProvidedTableIcon_nothrow(  const ImageProvider_Data& _rData,
-            const ::rtl::OUString& _rName, Reference< XGraphic >& _out_rxGraphic, Reference< XGraphic >& _out_rxGraphicHC )
+            const ::rtl::OUString& _rName, Reference< XGraphic >& _out_rxGraphic )
         {
             try
             {
                 if ( _rData.xTableUI.is() )
-                {
                     _out_rxGraphic = _rData.xTableUI->getTableIcon( _rName, GraphicColorMode::NORMAL );
-                    _out_rxGraphicHC = _rData.xTableUI->getTableIcon( _rName, GraphicColorMode::HIGH_CONTRAST );
-                }
             }
             catch( const Exception& )
             {
@@ -100,7 +97,7 @@ namespace dbaui
 
         //................................................................
         static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const ::rtl::OUString& _rName,
-            USHORT& _out_rResourceID, USHORT& _out_rResourceID_HC )
+            USHORT& _out_rResourceID )
         {
             _out_rResourceID = 0;
             try
@@ -150,52 +147,45 @@ namespace dbaui
     }
 
     //--------------------------------------------------------------------
-    void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage, Image& _out_rImageHC )
+    void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage )
     {
         if ( _nDatabaseObjectType != DatabaseObject::TABLE )
         {
             // for types other than tables, the icon does not depend on the concrete object
-            _out_rImage = getDefaultImage( _nDatabaseObjectType, false );
-            _out_rImageHC = getDefaultImage( _nDatabaseObjectType, true );
+            _out_rImage = getDefaultImage( _nDatabaseObjectType );
         }
         else
         {
             // check whether the connection can give us an icon
             Reference< XGraphic > xGraphic;
-            Reference< XGraphic > xGraphicHC;
-            lcl_getConnectionProvidedTableIcon_nothrow( *m_pData, _rName, xGraphic, xGraphicHC );
+            lcl_getConnectionProvidedTableIcon_nothrow( *m_pData, _rName, xGraphic );
             if ( xGraphic.is() )
                 _out_rImage = Image( xGraphic );
-            if ( xGraphicHC.is() )
-                _out_rImageHC = Image( xGraphicHC );
 
-            if ( !_out_rImage || !_out_rImageHC )
+            if ( !_out_rImage )
             {
                 // no -> determine by type
                 USHORT nImageResourceID = 0;
-                USHORT nImageResourceID_HC = 0;
-                lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID, nImageResourceID_HC );
+                lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID );
 
                 if ( nImageResourceID && !_out_rImage )
                     _out_rImage = Image( ModuleRes( nImageResourceID ) );
-                if ( nImageResourceID_HC && !_out_rImageHC )
-                    _out_rImageHC = Image( ModuleRes( nImageResourceID_HC ) );
             }
         }
     }
 
     //--------------------------------------------------------------------
-    Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast )
+    Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType )
     {
         Image aObjectImage;
-        USHORT nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType, _bHighContrast ) );
+        USHORT nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType ) );
         if ( nImageResourceID )
             aObjectImage = Image( ModuleRes( nImageResourceID ) );
         return aObjectImage;
     }
 
     //--------------------------------------------------------------------
-    USHORT ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType, bool /*_bHighContrast*/ )
+    USHORT ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType )
     {
         USHORT nImageResourceID( 0 );
         switch ( _nDatabaseObjectType )
@@ -220,7 +210,7 @@ namespace dbaui
     }
 
     //--------------------------------------------------------------------
-    Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType, bool _/*bHighContrast*/ )
+    Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType )
     {
         USHORT nImageResourceID( 0 );
         switch ( _nDatabaseObjectType )
@@ -249,7 +239,7 @@ namespace dbaui
     }
 
     //--------------------------------------------------------------------
-    Image ImageProvider::getDatabaseImage( bool /*_bHighContrast*/ )
+    Image ImageProvider::getDatabaseImage()
     {
         return Image( ModuleRes( DATABASE_TREE_ICON ) );
     }
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index c3f56de..0c7562a 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -188,7 +188,7 @@ BOOL OTableWindow::FillListBox()
             m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer);
     }
     // mark all primary keys with special image
-    ModuleRes TmpRes(isHiContrast(m_pListBox) ? IMG_JOINS_H : IMG_JOINS);
+    ModuleRes TmpRes(IMG_JOINS);
     ImageList aImageList(TmpRes);
     Image aPrimKeyImage = aImageList.GetImage(IMG_PRIMARY_KEY);
 
@@ -273,10 +273,10 @@ void OTableWindow::impl_updateImage()
 {
     ImageProvider aImageProvider( getDesignView()->getController().getConnection() );
 
-    Image aImage, aImageHC;
-    aImageProvider.getImages( GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE, aImage, aImageHC );
+    Image aImage;
+    aImageProvider.getImages( GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE, aImage );
 
-    if ( !aImage || !aImageHC )
+    if ( !aImage )
     {
         OSL_ENSURE( false, "OTableWindow::impl_updateImage: no images!" );
         return;
diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src
index 3dd1180..ea8ff40 100644
--- a/dbaccess/source/ui/querydesign/query.src
+++ b/dbaccess/source/ui/querydesign/query.src
@@ -110,20 +110,6 @@ ImageList IMG_JOINS
     };
     IdCount = { 2; };
 };
-ImageList IMG_JOINS_H
-{
-    Prefix = "joh";
-    MaskColor   = Color {
-            Red   = 0xffff;
-            Green = 0x0000;
-            Blue  = 0xffff;
-    };
-    IdList = {
-        IMG_PRIMARY_KEY; IMG_FOREIGN_KEY;
-    };
-    IdCount = { 2; };
-};
-
 String STR_QUERY_UNDO_TABWINSHOW
 {
     Text [ en-US ] = "Add Table Window" ;


More information about the Libreoffice-commits mailing list