summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/app
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-25 15:43:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-25 20:50:41 +0100
commitfea8976c0152632919587dd4e3225d6283e6691f (patch)
tree1f8417da7d6c27be2bb027ef792b62146837d029 /dbaccess/source/ui/app
parentf08faa70ccaa3bbf335b7b2ddff02a9f37efe125 (diff)
remove dbaccess bitmaps from .src files
Change-Id: I85e0d4bce7c2d1da2cc78c00e15e485152039c3e
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx26
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx4
-rw-r--r--dbaccess/source/ui/app/AppIconControl.cxx7
3 files changed, 18 insertions, 19 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 950fbe17ac46..7897e6692227 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -583,10 +583,9 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
setDetailPage(m_pLists[E_TABLE]);
}
-void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId)
+OUString OAppDetailPageHelper::getElementIcons(ElementType _eType)
{
ImageProvider aImageProvider;
- _rImageId = 0;
sal_Int32 nDatabaseObjectType( 0 );
switch(_eType )
@@ -596,16 +595,16 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm
case E_QUERY: nDatabaseObjectType = DatabaseObject::QUERY; break;
default:
OSL_FAIL( "OAppDetailPageHelper::GetElementIcons: invalid element type!" );
- return;
+ return OUString();
}
- _rImageId = ImageProvider::getDefaultImageResourceID( nDatabaseObjectType );
+
+ return ImageProvider::getDefaultImageResourceID(nDatabaseObjectType);
}
void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameAccess >& _xContainer)
{
OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed.");
- sal_uInt16 nImageId = 0;
OString sHelpId;
ImageProvider aImageProvider;
Image aFolderImage;
@@ -626,7 +625,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
default:
OSL_FAIL("Illegal call!");
}
- getElementIcons( _eType, nImageId );
+ OUString sImageId = getElementIcons(_eType);
if ( !m_pLists[_eType] )
{
@@ -637,7 +636,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
{
if ( !m_pLists[_eType]->GetEntryCount() && _xContainer.is() )
{
- fillNames( _xContainer, _eType, nImageId, nullptr );
+ fillNames( _xContainer, _eType, sImageId, nullptr );
m_pLists[_eType]->SelectAll(false);
}
@@ -682,7 +681,7 @@ namespace
}
void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType,
- const sal_uInt16 _nImageId, SvTreeListEntry* _pParent )
+ const OUString& rImageId, SvTreeListEntry* _pParent )
{
OSL_ENSURE(_xContainer.is(),"Data source is NULL! -> GPF");
OSL_ENSURE( ( _eType >= E_TABLE ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OAppDetailPageHelper::fillNames: invalid type!" );
@@ -707,13 +706,13 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
{
pEntry = pList->InsertEntry( *pIter, _pParent, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) );
- fillNames( xSubElements, _eType, _nImageId, pEntry );
+ fillNames( xSubElements, _eType, rImageId, pEntry );
}
else
{
pEntry = pList->InsertEntry( *pIter, _pParent );
- Image aImage{BitmapEx(ModuleRes(_nImageId))};
+ Image aImage{BitmapEx(rImageId)};
pList->SetExpandedEntryBmp(pEntry, aImage);
pList->SetCollapsedEntryBmp(pEntry, aImage);
}
@@ -829,20 +828,19 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS
}
}
- sal_uInt16 nImageId = 0;
- getElementIcons( _eType, nImageId );
+ OUString sImageId = getElementIcons(_eType);
Reference<XNameAccess> xContainer(_rObject,UNO_QUERY);
if ( xContainer.is() )
{
const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType );
pRet = pTreeView->InsertEntry( _rName, pEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
- fillNames( xContainer, _eType, nImageId, pRet );
+ fillNames( xContainer, _eType, sImageId, pRet );
}
else
{
pRet = pTreeView->InsertEntry( _rName, pEntry );
- Image aImage{BitmapEx(ModuleRes(nImageId))};
+ Image aImage{BitmapEx(sImageId)};
pTreeView->SetExpandedEntryBmp( pRet, aImage );
pTreeView->SetCollapsedEntryBmp( pRet, aImage );
}
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 0041f6c636d2..b6c05d50ec7f 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -105,7 +105,7 @@ namespace dbaui
/** retrieves the resource ids of the images representing elements of the given type
*/
- static void getElementIcons( ElementType _eType, sal_uInt16& _rImageId);
+ static OUString getElementIcons(ElementType _eType);
/** fills the names in the listbox
@param _xContainer
@@ -119,7 +119,7 @@ namespace dbaui
*/
void fillNames( const css::uno::Reference< css::container::XNameAccess >& _xContainer,
const ElementType _eType,
- const sal_uInt16 _nImageId,
+ const OUString& rImageId,
SvTreeListEntry* _pParent );
/** sets the detail page
diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx
index 4ac9205b108f..85c12fa3ddb8 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -22,6 +22,7 @@
#include "dbaccess_helpid.hrc"
#include "moduledbu.hxx"
#include "dbu_app.hrc"
+#include "bitmaps.hlst"
#include <vcl/image.hxx>
#include "callbacks.hxx"
#include "AppElementType.hxx"
@@ -38,9 +39,9 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
const struct CategoryDescriptor
{
- sal_uInt16 nLabelResId;
+ sal_uInt16 nLabelResId;
ElementType eType;
- sal_uInt16 nImageResId;
+ const char* aImageResId;
} aCategories[] = {
{ RID_STR_TABLES_CONTAINER, E_TABLE, BMP_TABLEFOLDER_TREE_L },
{ RID_STR_QUERIES_CONTAINER, E_QUERY, BMP_QUERYFOLDER_TREE_L },
@@ -51,7 +52,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
{
SvxIconChoiceCtrlEntry* pEntry = InsertEntry(
OUString( ModuleRes( aCategorie.nLabelResId ) ) ,
- Image(BitmapEx(ModuleRes(aCategorie.nImageResId))));
+ Image(BitmapEx(OUString::createFromAscii(aCategorie.aImageResId))));
if ( pEntry )
pEntry->SetUserData( new ElementType( aCategorie.eType ) );
}