diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-16 15:34:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-16 17:07:32 +0000 |
commit | 88919901be9d61a1f6992e6d6375f49ad77b4f74 (patch) | |
tree | cb6112b573db08b091b7a68fda4ea24e7d4ee781 /dbaccess | |
parent | f364dced8efbf3cfc455920e9f7cbd697751476c (diff) |
get this to build again
Diffstat (limited to 'dbaccess')
21 files changed, 73 insertions, 208 deletions
diff --git a/dbaccess/inc/ToolBoxHelper.hxx b/dbaccess/inc/ToolBoxHelper.hxx index 49d41b749..3784ff18b 100644 --- a/dbaccess/inc/ToolBoxHelper.hxx +++ b/dbaccess/inc/ToolBoxHelper.hxx @@ -43,7 +43,6 @@ namespace dbaui { class DBACCESS_DLLPUBLIC OToolBoxHelper { - sal_Bool m_bIsHiContrast;// true when the toolbox is in hi contrast mode sal_Int16 m_nSymbolsSize; // shows the toolbox large or small bitmaps ToolBox* m_pToolBox; // our toolbox (may be NULL) public: @@ -59,10 +58,8 @@ namespace dbaui /** will be called when the image list is needed. @param _eSymbolsSize <svtools/imgdef.hxx> - @param _bHiContast - <TRUE/> when in high contrast mode. */ - virtual ImageList getImageList(sal_Int16 _eSymbolsSize,sal_Bool _bHiContast) const = 0; + virtual ImageList getImageList(sal_Int16 _eSymbolsSize) const = 0; /** only the member will be set, derived classes can overload this function and do what need to be done. @param _pTB @@ -78,7 +75,6 @@ namespace dbaui */ void checkImageList(); - inline sal_Bool isToolBoxHiContrast() const { return m_bIsHiContrast; } protected: DECL_LINK(ConfigOptionsChanged, SvtMiscOptions*); DECL_LINK(SettingsChanged, VclWindowEvent* ); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 1cc79b7fe..2d3d55b15 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 e799d79c7..f52dc7b10 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 d5f1510e7..ef2d66816 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 648c213ae..7a2c16f45 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/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 7ef87bb61..eb7a69554 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,13 @@ 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 +497,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 114a52a84..238667498 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/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index b4a184815..17fcc6e85 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -888,14 +888,14 @@ DBG_NAME(DbaIndexDialog) } } //------------------------------------------------------------------ - ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet,sal_Bool /*_bHiContast*/) const + ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet) const { sal_Int16 nN = IMG_INDEX_DLG_SC; - if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE ) + if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE ) { nN = IMG_INDEX_DLG_LC; - } - return ImageList( nN ); + } // if ( _eBitmapSet == SFX_SYMBOLS_LARGE ) + return ImageList(ModuleRes( nN )); } //------------------------------------------------------------------ void DbaIndexDialog::resizeControls(const Size& _rDiff) diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 4edc878ec..22bb46041 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/imagelists/dbimagelists.src b/dbaccess/source/ui/imagelists/dbimagelists.src index 91bda098f..e296c6d0e 100644 --- a/dbaccess/source/ui/imagelists/dbimagelists.src +++ b/dbaccess/source/ui/imagelists/dbimagelists.src @@ -63,13 +63,6 @@ ImageList IMG_INDEX_DLG_LC IL_TOOL_2 ; }; -ImageList IMG_INDEX_DLG_LCH -{ - MASKCOLOR; - prefix = "lch"; - IL_TOOL_2 ; -}; - Image IMG_FORMFOLDER_TREE_L { ImageBitmap = Bitmap { File = "forms_32"; }; diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index 6ecab0555..3b573f1f8 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 ef5efc08b..af22fc44d 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -255,7 +255,7 @@ // free // ... // free -#define IMG_JOINS_H RID_IMAGE_START + 32 +#define REPORTFOLDER_TREE_ICON RID_IMAGE_START + 24 #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 1ad4678d5..b1a2c6c2e 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,19 +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 +120,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 +134,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/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index 965407e4e..88f7d2117 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -133,10 +133,8 @@ namespace dbaui /** will be called whenthe id of the image list is needed. @param _eBitmapSet <svtools/imgdef.hxx> - @param _bHiContast - <TRUE/> when in high contrast mode. */ - virtual ImageList getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const; + virtual ImageList getImageList(sal_Int16 _eBitmapSet) const; /** will be called when the controls need to be resized. */ diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 0d6ef5da4..507003f97 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/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx index 78b4fb71a..e3c664c49 100644 --- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx +++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx @@ -40,8 +40,7 @@ namespace dbaui { DBG_NAME(OToolBoxHelper) OToolBoxHelper::OToolBoxHelper() - : m_bIsHiContrast(sal_False) - ,m_nSymbolsSize(-1 ) + :m_nSymbolsSize(-1 ) ,m_pToolBox(NULL) { DBG_CTOR(OToolBoxHelper,NULL); @@ -64,14 +63,11 @@ namespace dbaui if ( m_pToolBox ) { sal_Int16 nCurSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize(); - if ( nCurSymbolsSize != m_nSymbolsSize || - m_bIsHiContrast != m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode() ) + if ( nCurSymbolsSize != m_nSymbolsSize ) { m_nSymbolsSize = nCurSymbolsSize; - m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode(); - - m_pToolBox->SetImageList( getImageList(m_nSymbolsSize,m_bIsHiContrast) ); + m_pToolBox->SetImageList( getImageList(m_nSymbolsSize) ); Size aTbOldSize = m_pToolBox->GetSizePixel(); adjustToolBoxSize(m_pToolBox); Size aTbNewSize = m_pToolBox->GetSizePixel(); @@ -117,7 +113,6 @@ namespace dbaui m_pToolBox = _pTB; if ( m_pToolBox ) { - // m_bIsHiContrast = m_pToolBox->GetSettings().GetStyleSettings().GetHighContrastMode(); ConfigOptionsChanged(NULL); if ( bFirstTime ) adjustToolBoxSize(m_pToolBox); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 5ab191e0c..52a9f5f1c 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1149,21 +1149,6 @@ void adjustToolBoxSize(ToolBox* _pToolBox) _pToolBox->Invalidate(); } } -// ----------------------------------------------------------------------------- -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 ) diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index ea928c91e..f7a02e3ca 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 f25af5865..568fb98a5 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,20 +97,16 @@ 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 { bool bIsView = _rData.xViews.is() && _rData.xViews->hasByName( _rName ); if ( bIsView ) - { _out_rResourceID = VIEW_TREE_ICON; - } else - { _out_rResourceID = TABLE_TREE_ICON; - } } catch( const Exception& ) { @@ -150,52 +143,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 +206,7 @@ namespace dbaui } //-------------------------------------------------------------------- - Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast ) + Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType ) { USHORT nImageResourceID( 0 ); switch ( _nDatabaseObjectType ) @@ -249,7 +235,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 c3f56de81..0c7562a72 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 3dd1180d8..ea8ff407b 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" ; |