summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 08:56:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 09:39:03 +0200
commit598a65a3c1632c24f2aac38c5a2c9f6a55618cd6 (patch)
treeab510c8d34e95b8414c0a43726a0152073ed277d /dbaccess/source/ui/browser/dsEntriesNoExp.cxx
parentb9db7c7236ab75199c281a510546d6778d28e474 (diff)
loplugin:flatten in dbaccess
Change-Id: Ifcfd3637fbce6dc3a07a1859f102a6ac85149190 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/browser/dsEntriesNoExp.cxx')
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx84
1 files changed, 42 insertions, 42 deletions
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 1e3bfd3b57d13..7e9bfc8513600 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -195,59 +195,59 @@ sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType )
void SbaTableQueryBrowser::notifyHiContrastChanged()
{
- if ( m_pTreeView )
+ if ( !m_pTreeView )
+ return;
+
+ auto pTreeModel = m_pTreeView->GetTreeModel();
+ // change all bitmap entries
+ SvTreeListEntry* pEntryLoop = pTreeModel->First();
+ while ( pEntryLoop )
{
- auto pTreeModel = m_pTreeView->GetTreeModel();
- // change all bitmap entries
- SvTreeListEntry* pEntryLoop = pTreeModel->First();
- while ( pEntryLoop )
+ DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pEntryLoop->GetUserData());
+ if ( !pData )
{
- DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pEntryLoop->GetUserData());
- if ( !pData )
- {
- pEntryLoop = pTreeModel->Next(pEntryLoop);
- continue;
- }
+ pEntryLoop = pTreeModel->Next(pEntryLoop);
+ continue;
+ }
- // the connection to which this entry belongs, if any
- std::unique_ptr< ImageProvider > pImageProvider( getImageProviderFor( pEntryLoop ) );
+ // the connection to which this entry belongs, if any
+ std::unique_ptr< ImageProvider > pImageProvider( getImageProviderFor( pEntryLoop ) );
- // the images for this entry
- Image aImage;
- if ( pData->eType == etDatasource )
- aImage = ImageProvider::getDatabaseImage();
- else
+ // the images for this entry
+ Image aImage;
+ if ( pData->eType == etDatasource )
+ aImage = ImageProvider::getDatabaseImage();
+ else
+ {
+ bool bIsFolder = !isObject( pData->eType );
+ if ( bIsFolder )
{
- bool bIsFolder = !isObject( pData->eType );
- if ( bIsFolder )
- {
- sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
- aImage = ImageProvider::getFolderImage( nObjectType );
- }
- else
- {
- sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
- pImageProvider->getImages( GetEntryText( pEntryLoop ), nObjectType, aImage );
- }
+ sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
+ aImage = ImageProvider::getFolderImage( nObjectType );
}
-
- // find the proper item, and set its icons
- sal_uInt16 nCount = pEntryLoop->ItemCount();
- for (sal_uInt16 i=0;i<nCount;++i)
+ else
{
- SvLBoxItem& rItem = pEntryLoop->GetItem(i);
- if (rItem.GetType() != SvLBoxItemType::ContextBmp)
- continue;
+ sal_Int32 nObjectType( getDatabaseObjectType( pData->eType ) );
+ pImageProvider->getImages( GetEntryText( pEntryLoop ), nObjectType, aImage );
+ }
+ }
- SvLBoxContextBmp& rContextBitmapItem = static_cast< SvLBoxContextBmp& >( rItem );
+ // find the proper item, and set its icons
+ sal_uInt16 nCount = pEntryLoop->ItemCount();
+ for (sal_uInt16 i=0;i<nCount;++i)
+ {
+ SvLBoxItem& rItem = pEntryLoop->GetItem(i);
+ if (rItem.GetType() != SvLBoxItemType::ContextBmp)
+ continue;
- rContextBitmapItem.SetBitmap1( aImage );
- rContextBitmapItem.SetBitmap2( aImage );
- break;
- }
+ SvLBoxContextBmp& rContextBitmapItem = static_cast< SvLBoxContextBmp& >( rItem );
- pEntryLoop = pTreeModel->Next(pEntryLoop);
+ rContextBitmapItem.SetBitmap1( aImage );
+ rContextBitmapItem.SetBitmap2( aImage );
+ break;
}
+
+ pEntryLoop = pTreeModel->Next(pEntryLoop);
}
}