Kaydet (Commit) fea8976c authored tarafından Caolán McNamara's avatar Caolán McNamara

remove dbaccess bitmaps from .src files

Change-Id: I85e0d4bce7c2d1da2cc78c00e15e485152039c3e
üst f08faa70
...@@ -49,8 +49,4 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\ ...@@ -49,8 +49,4 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/uno/copytablewizard.src \ dbaccess/source/ui/uno/copytablewizard.src \
)) ))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,dbaccess/dbu,\
dbaccess/source/ui/imagelists/dbimagelists.src \
))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_DBACCESS_INC_BITMAPS_HRC
#define INCLUDED_DBACCESS_INC_BITMAPS_HRC
#define BMP_FORMFOLDER_TREE_L "dbaccess/res/forms_32.png"
#define BMP_REPORTFOLDER_TREE_L "dbaccess/res/reports_32.png"
#define BMP_QUERYFOLDER_TREE_L "dbaccess/res/queries_32.png"
#define BMP_TABLEFOLDER_TREE_L "dbaccess/res/tables_32.png"
#define DATABASE_TREE_ICON "dbaccess/res/db.png"
#define TABLE_TREE_ICON "res/sx03188.png"
#define TABLEFOLDER_TREE_ICON "res/sx03187.png"
#define VIEW_TREE_ICON "res/sx16670.png"
#define QUERY_TREE_ICON "res/sx03202.png"
#define QUERYFOLDER_TREE_ICON "res/sx03201.png"
#define FORM_TREE_ICON "dbaccess/res/form_16.png"
#define FORMFOLDER_TREE_ICON "dbaccess/res/forms_16.png"
#define REPORT_TREE_ICON "dbaccess/res/report_16.png"
#define REPORTFOLDER_TREE_ICON "dbaccess/res/reports_16.png"
#define BMP_NAVIGATION_BTN_UP_SC "res/fp010.png"
#define BMP_NAVIGATION_CREATEFOLDER_SC "res/fp015.png"
#define BMP_EXCEPTION_ERROR "dbaccess/res/exerror.png"
#define BMP_EXCEPTION_WARNING "dbaccess/res/exwarning.png"
#define BMP_EXCEPTION_INFO "dbaccess/res/exinfo.png"
#define BMP_PRIMARY_KEY "dbaccess/res/jo01.png"
#define BMP_PKEYICON "dbaccess/res/pkey.png"
#define BMP_UP "dbaccess/res/sortup.png"
#define BMP_DOWN "dbaccess/res/sortdown.png"
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
...@@ -583,10 +583,9 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon ...@@ -583,10 +583,9 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon
setDetailPage(m_pLists[E_TABLE]); setDetailPage(m_pLists[E_TABLE]);
} }
void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId) OUString OAppDetailPageHelper::getElementIcons(ElementType _eType)
{ {
ImageProvider aImageProvider; ImageProvider aImageProvider;
_rImageId = 0;
sal_Int32 nDatabaseObjectType( 0 ); sal_Int32 nDatabaseObjectType( 0 );
switch(_eType ) switch(_eType )
...@@ -596,16 +595,16 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm ...@@ -596,16 +595,16 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm
case E_QUERY: nDatabaseObjectType = DatabaseObject::QUERY; break; case E_QUERY: nDatabaseObjectType = DatabaseObject::QUERY; break;
default: default:
OSL_FAIL( "OAppDetailPageHelper::GetElementIcons: invalid element type!" ); 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) void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameAccess >& _xContainer)
{ {
OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed."); OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed.");
sal_uInt16 nImageId = 0;
OString sHelpId; OString sHelpId;
ImageProvider aImageProvider; ImageProvider aImageProvider;
Image aFolderImage; Image aFolderImage;
...@@ -626,7 +625,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA ...@@ -626,7 +625,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
default: default:
OSL_FAIL("Illegal call!"); OSL_FAIL("Illegal call!");
} }
getElementIcons( _eType, nImageId ); OUString sImageId = getElementIcons(_eType);
if ( !m_pLists[_eType] ) if ( !m_pLists[_eType] )
{ {
...@@ -637,7 +636,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA ...@@ -637,7 +636,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
{ {
if ( !m_pLists[_eType]->GetEntryCount() && _xContainer.is() ) if ( !m_pLists[_eType]->GetEntryCount() && _xContainer.is() )
{ {
fillNames( _xContainer, _eType, nImageId, nullptr ); fillNames( _xContainer, _eType, sImageId, nullptr );
m_pLists[_eType]->SelectAll(false); m_pLists[_eType]->SelectAll(false);
} }
...@@ -682,7 +681,7 @@ namespace ...@@ -682,7 +681,7 @@ namespace
} }
void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType, 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(_xContainer.is(),"Data source is NULL! -> GPF");
OSL_ENSURE( ( _eType >= E_TABLE ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OAppDetailPageHelper::fillNames: invalid type!" ); 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 ...@@ -707,13 +706,13 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
{ {
pEntry = pList->InsertEntry( *pIter, _pParent, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); pEntry = pList->InsertEntry( *pIter, _pParent, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) ); getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) );
fillNames( xSubElements, _eType, _nImageId, pEntry ); fillNames( xSubElements, _eType, rImageId, pEntry );
} }
else else
{ {
pEntry = pList->InsertEntry( *pIter, _pParent ); pEntry = pList->InsertEntry( *pIter, _pParent );
Image aImage{BitmapEx(ModuleRes(_nImageId))}; Image aImage{BitmapEx(rImageId)};
pList->SetExpandedEntryBmp(pEntry, aImage); pList->SetExpandedEntryBmp(pEntry, aImage);
pList->SetCollapsedEntryBmp(pEntry, aImage); pList->SetCollapsedEntryBmp(pEntry, aImage);
} }
...@@ -829,20 +828,19 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS ...@@ -829,20 +828,19 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS
} }
} }
sal_uInt16 nImageId = 0; OUString sImageId = getElementIcons(_eType);
getElementIcons( _eType, nImageId );
Reference<XNameAccess> xContainer(_rObject,UNO_QUERY); Reference<XNameAccess> xContainer(_rObject,UNO_QUERY);
if ( xContainer.is() ) if ( xContainer.is() )
{ {
const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType ); const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType );
pRet = pTreeView->InsertEntry( _rName, pEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); pRet = pTreeView->InsertEntry( _rName, pEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
fillNames( xContainer, _eType, nImageId, pRet ); fillNames( xContainer, _eType, sImageId, pRet );
} }
else else
{ {
pRet = pTreeView->InsertEntry( _rName, pEntry ); pRet = pTreeView->InsertEntry( _rName, pEntry );
Image aImage{BitmapEx(ModuleRes(nImageId))}; Image aImage{BitmapEx(sImageId)};
pTreeView->SetExpandedEntryBmp( pRet, aImage ); pTreeView->SetExpandedEntryBmp( pRet, aImage );
pTreeView->SetCollapsedEntryBmp( pRet, aImage ); pTreeView->SetCollapsedEntryBmp( pRet, aImage );
} }
......
...@@ -105,7 +105,7 @@ namespace dbaui ...@@ -105,7 +105,7 @@ namespace dbaui
/** retrieves the resource ids of the images representing elements of the given type /** 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 /** fills the names in the listbox
@param _xContainer @param _xContainer
...@@ -119,7 +119,7 @@ namespace dbaui ...@@ -119,7 +119,7 @@ namespace dbaui
*/ */
void fillNames( const css::uno::Reference< css::container::XNameAccess >& _xContainer, void fillNames( const css::uno::Reference< css::container::XNameAccess >& _xContainer,
const ElementType _eType, const ElementType _eType,
const sal_uInt16 _nImageId, const OUString& rImageId,
SvTreeListEntry* _pParent ); SvTreeListEntry* _pParent );
/** sets the detail page /** sets the detail page
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "dbaccess_helpid.hrc" #include "dbaccess_helpid.hrc"
#include "moduledbu.hxx" #include "moduledbu.hxx"
#include "dbu_app.hrc" #include "dbu_app.hrc"
#include "bitmaps.hlst"
#include <vcl/image.hxx> #include <vcl/image.hxx>
#include "callbacks.hxx" #include "callbacks.hxx"
#include "AppElementType.hxx" #include "AppElementType.hxx"
...@@ -38,9 +39,9 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent) ...@@ -38,9 +39,9 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
const struct CategoryDescriptor const struct CategoryDescriptor
{ {
sal_uInt16 nLabelResId; sal_uInt16 nLabelResId;
ElementType eType; ElementType eType;
sal_uInt16 nImageResId; const char* aImageResId;
} aCategories[] = { } aCategories[] = {
{ RID_STR_TABLES_CONTAINER, E_TABLE, BMP_TABLEFOLDER_TREE_L }, { RID_STR_TABLES_CONTAINER, E_TABLE, BMP_TABLEFOLDER_TREE_L },
{ RID_STR_QUERIES_CONTAINER, E_QUERY, BMP_QUERYFOLDER_TREE_L }, { RID_STR_QUERIES_CONTAINER, E_QUERY, BMP_QUERYFOLDER_TREE_L },
...@@ -51,7 +52,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent) ...@@ -51,7 +52,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
{ {
SvxIconChoiceCtrlEntry* pEntry = InsertEntry( SvxIconChoiceCtrlEntry* pEntry = InsertEntry(
OUString( ModuleRes( aCategorie.nLabelResId ) ) , OUString( ModuleRes( aCategorie.nLabelResId ) ) ,
Image(BitmapEx(ModuleRes(aCategorie.nImageResId)))); Image(BitmapEx(OUString::createFromAscii(aCategorie.aImageResId))));
if ( pEntry ) if ( pEntry )
pEntry->SetUserData( new ElementType( aCategorie.eType ) ); pEntry->SetUserData( new ElementType( aCategorie.eType ) );
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include "dbustrings.hrc" #include "dbustrings.hrc"
#include "bitmaps.hlst"
#include "UITools.hxx" #include "UITools.hxx"
#include <com/sun/star/container/XHierarchicalNameContainer.hpp> #include <com/sun/star/container/XHierarchicalNameContainer.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
...@@ -80,8 +81,8 @@ OCollectionView::OCollectionView( vcl::Window * pParent ...@@ -80,8 +81,8 @@ OCollectionView::OCollectionView( vcl::Window * pParent
m_pName->GrabFocus(); m_pName->GrabFocus();
m_pNewFolder->SetStyle( m_pNewFolder->GetStyle() | WB_NOPOINTERFOCUS ); m_pNewFolder->SetStyle( m_pNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
m_pUp->SetModeImage(Image(BitmapEx(ModuleRes(BMP_NAVIGATION_BTN_UP_SC)))); m_pUp->SetModeImage(Image(BitmapEx(BMP_NAVIGATION_BTN_UP_SC)));
m_pNewFolder->SetModeImage(Image(BitmapEx(ModuleRes(BMP_NAVIGATION_CREATEFOLDER_SC)))); m_pNewFolder->SetModeImage(Image(BitmapEx(BMP_NAVIGATION_CREATEFOLDER_SC)));
m_pView->SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) ); m_pView->SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) );
m_pView->EnableAutoResize(); m_pView->EnableAutoResize();
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "indexdialog.hxx" #include "indexdialog.hxx"
#include "dbu_dlg.hrc" #include "dbu_dlg.hrc"
#include "bitmaps.hlst"
#include "dbaccess_helpid.hrc" #include "dbaccess_helpid.hrc"
#include "indexfieldscontrol.hxx" #include "indexfieldscontrol.hxx"
#include "indexcollection.hxx" #include "indexcollection.hxx"
...@@ -281,7 +282,7 @@ namespace dbaui ...@@ -281,7 +282,7 @@ namespace dbaui
void DbaIndexDialog::fillIndexList() void DbaIndexDialog::fillIndexList()
{ {
Image aPKeyIcon(BitmapEx(ModuleRes(BMP_PKEYICON))); Image aPKeyIcon(BitmapEx(BMP_PKEYICON));
// fill the list with the index names // fill the list with the index names
m_pIndexList->Clear(); m_pIndexList->Clear();
Indexes::const_iterator aIndexLoop = m_pIndexes->begin(); Indexes::const_iterator aIndexLoop = m_pIndexes->begin();
......
...@@ -52,11 +52,6 @@ String STR_LOGICAL_INDEX_NAME ...@@ -52,11 +52,6 @@ String STR_LOGICAL_INDEX_NAME
Text [ en-US ] = "index"; Text [ en-US ] = "index";
}; };
Bitmap BMP_PKEYICON
{
File = "pkey.png";
};
String STR_NEED_INDEX_FIELDS String STR_NEED_INDEX_FIELDS
{ {
Text [ en-US ] = "The index must contain at least one field."; Text [ en-US ] = "The index must contain at least one field.";
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "sqlmessage.hxx" #include "sqlmessage.hxx"
#include "dbu_dlg.hrc" #include "dbu_dlg.hrc"
#include "bitmaps.hlst"
#include <com/sun/star/sdbc/SQLException.hpp> #include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdb/SQLContext.hpp> #include <com/sun/star/sdb/SQLContext.hpp>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
...@@ -58,12 +59,12 @@ namespace ...@@ -58,12 +59,12 @@ namespace
class ImageProvider class ImageProvider
{ {
private: private:
sal_uInt16 m_defaultImageID; OUString m_defaultImageID;
mutable Image m_defaultImage; mutable Image m_defaultImage;
public: public:
explicit ImageProvider( sal_uInt16 _defaultImageID ) explicit ImageProvider(const OUString& _defaultImageID)
:m_defaultImageID( _defaultImageID ) :m_defaultImageID( _defaultImageID )
{ {
} }
...@@ -71,7 +72,7 @@ namespace ...@@ -71,7 +72,7 @@ namespace
Image const & getImage() const Image const & getImage() const
{ {
if ( !m_defaultImage ) if ( !m_defaultImage )
m_defaultImage = Image(BitmapEx(ModuleRes(m_defaultImageID))); m_defaultImage = Image(BitmapEx(m_defaultImageID));
return m_defaultImage; return m_defaultImage;
} }
}; };
...@@ -110,18 +111,18 @@ namespace ...@@ -110,18 +111,18 @@ namespace
std::shared_ptr< ImageProvider > const & getImageProvider( SQLExceptionInfo::TYPE _eType ) const std::shared_ptr< ImageProvider > const & getImageProvider( SQLExceptionInfo::TYPE _eType ) const
{ {
std::shared_ptr< ImageProvider >* ppProvider( &m_pErrorImage ); std::shared_ptr< ImageProvider >* ppProvider( &m_pErrorImage );
sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR ); OUString sNormalImageID(BMP_EXCEPTION_ERROR);
switch ( _eType ) switch ( _eType )
{ {
case SQLExceptionInfo::TYPE::SQLWarning: case SQLExceptionInfo::TYPE::SQLWarning:
ppProvider = &m_pWarningsImage; ppProvider = &m_pWarningsImage;
nNormalImageID = BMP_EXCEPTION_WARNING; sNormalImageID = BMP_EXCEPTION_WARNING;
break; break;
case SQLExceptionInfo::TYPE::SQLContext: case SQLExceptionInfo::TYPE::SQLContext:
ppProvider = &m_pInfoImage; ppProvider = &m_pInfoImage;
nNormalImageID = BMP_EXCEPTION_INFO; sNormalImageID = BMP_EXCEPTION_INFO;
break; break;
default: default:
...@@ -129,7 +130,7 @@ namespace ...@@ -129,7 +130,7 @@ namespace
} }
if ( !ppProvider->get() ) if ( !ppProvider->get() )
ppProvider->reset( new ImageProvider( nNormalImageID ) ); ppProvider->reset(new ImageProvider(sNormalImageID));
return *ppProvider; return *ppProvider;
} }
......
...@@ -20,21 +20,6 @@ ...@@ -20,21 +20,6 @@
#include "dbaccess_helpid.hrc" #include "dbaccess_helpid.hrc"
#include "dbu_dlg.hrc" #include "dbu_dlg.hrc"
Bitmap BMP_EXCEPTION_ERROR
{
File = "exerror.png";
};
Bitmap BMP_EXCEPTION_WARNING
{
File = "exwarning.png";
};
Bitmap BMP_EXCEPTION_INFO
{
File = "exinfo.png";
};
String STR_EXCEPTION_STATUS String STR_EXCEPTION_STATUS
{ {
Text [ en-US ] = "SQL Status"; Text [ en-US ] = "SQL Status";
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "dbu_dlg.hrc"
#include "browserids.hxx"
Bitmap BMP_FORMFOLDER_TREE_L
{
File = "forms_32";
};
Bitmap BMP_REPORTFOLDER_TREE_L
{
File = "reports_32";
};
Bitmap BMP_QUERYFOLDER_TREE_L
{
File = "queries_32";
};
Bitmap BMP_TABLEFOLDER_TREE_L
{
File = "tables_32";
};
// database object icons
// the whole database
Bitmap DATABASE_TREE_ICON
{
File = "db.png";
};
// tables and table folders
Bitmap TABLE_TREE_ICON
{
File = "sx03188.png";
};
Bitmap TABLEFOLDER_TREE_ICON
{
File = "sx03187.png";
};
// views
Bitmap VIEW_TREE_ICON
{
File = "sx16670.png";
};
// queries and query folders
Bitmap QUERY_TREE_ICON
{
File = "sx03202.png";
};
Bitmap QUERYFOLDER_TREE_ICON
{
File = "sx03201.png";
};
// forms and form folders
Bitmap FORM_TREE_ICON
{
File = "form_16";
};
Bitmap FORMFOLDER_TREE_ICON
{
File = "forms_16";
};
// reports and report folders
Bitmap REPORT_TREE_ICON
{
File = "report_16";
};
Bitmap REPORTFOLDER_TREE_ICON
{
File = "reports_16";
};
// new folder and parent folder
Bitmap BMP_NAVIGATION_BTN_UP_SC
{
File = "fp010";
};
Bitmap BMP_NAVIGATION_CREATEFOLDER_SC
{
File = "fp015";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include "dbu_resource.hrc" #include "dbu_resource.hrc"
#define BMP_UP RID_STR_MISC_START + 0
#define BMP_DOWN RID_STR_MISC_START + 1
#define STR_WIZ_COLUMN_SELECT_TITEL RID_STR_MISC_START + 2 #define STR_WIZ_COLUMN_SELECT_TITEL RID_STR_MISC_START + 2
#define STR_WIZ_TYPE_SELECT_TITEL RID_STR_MISC_START + 3 #define STR_WIZ_TYPE_SELECT_TITEL RID_STR_MISC_START + 3
#define STR_WIZ_NAME_ALREADY_DEFINED RID_STR_MISC_START + 4 #define STR_WIZ_NAME_ALREADY_DEFINED RID_STR_MISC_START + 4
......
...@@ -94,33 +94,6 @@ ...@@ -94,33 +94,6 @@
// FREE // FREE
// images
#define TABLE_TREE_ICON RID_IMAGE_START + 0
#define VIEW_TREE_ICON RID_IMAGE_START + 1
#define TABLEFOLDER_TREE_ICON RID_IMAGE_START + 2
#define BMP_EXCEPTION_ERROR RID_IMAGE_START + 3
#define BMP_EXCEPTION_WARNING RID_IMAGE_START + 4
#define BMP_EXCEPTION_INFO RID_IMAGE_START + 5
#define QUERYFOLDER_TREE_ICON RID_IMAGE_START + 6
#define QUERY_TREE_ICON RID_IMAGE_START + 7
#define DATABASE_TREE_ICON RID_IMAGE_START + 8
#define BMP_PRIMARY_KEY RID_IMAGE_START + 9
// free
#define BMP_PKEYICON RID_IMAGE_START + 12
// free
#define REPORTFOLDER_TREE_ICON RID_IMAGE_START + 24
#define BMP_FORMFOLDER_TREE_L RID_IMAGE_START + 39
#define BMP_REPORTFOLDER_TREE_L RID_IMAGE_START + 40
#define BMP_QUERYFOLDER_TREE_L RID_IMAGE_START + 41
#define BMP_TABLEFOLDER_TREE_L RID_IMAGE_START + 42
#define BMP_NAVIGATION_BTN_UP_SC RID_IMAGE_START + 47
#define BMP_NAVIGATION_CREATEFOLDER_SC RID_IMAGE_START + 49
#define FORM_TREE_ICON RID_IMAGE_START + 51
#define REPORT_TREE_ICON RID_IMAGE_START + 52
// free
#define FORMFOLDER_TREE_ICON RID_IMAGE_START + 55
// strings // strings
#define STR_TBL_TITLE RID_STR_GEN_START #define STR_TBL_TITLE RID_STR_GEN_START
#define STR_ERROR_DURING_CREATION RID_STR_GEN_START + 1 #define STR_ERROR_DURING_CREATION RID_STR_GEN_START + 1
......
...@@ -106,9 +106,7 @@ namespace dbaui ...@@ -106,9 +106,7 @@ namespace dbaui
the resource ID image to be used for the object type. Must be fed into a the resource ID image to be used for the object type. Must be fed into a
ModuleRes instance to actually load the image. ModuleRes instance to actually load the image.
*/ */
static sal_uInt16 getDefaultImageResourceID( static OUString getDefaultImageResourceID(sal_Int32 _nDatabaseObjectType);
sal_Int32 _nDatabaseObjectType
);
/** retrieves the image to be used for folders of database objects /** retrieves the image to be used for folders of database objects
@param _nDatabaseObjectType @param _nDatabaseObjectType
......
...@@ -23,18 +23,21 @@ ...@@ -23,18 +23,21 @@
#include "WCopyTable.hxx" #include "WCopyTable.hxx"
#include "dbaccess_helpid.hrc" #include "dbaccess_helpid.hrc"
#include "dbu_misc.hrc" #include "dbu_misc.hrc"
#include "bitmaps.hlst"
#include <vcl/scrbar.hxx> #include <vcl/scrbar.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <vcl/builderfactory.hxx> #include <vcl/builderfactory.hxx>
#include "svtools/treelistentry.hxx" #include "svtools/treelistentry.hxx"
#include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/DataType.hpp>
#include <o3tl/make_unique.hxx> #include <o3tl/make_unique.hxx>
using namespace ::dbaui; using namespace ::dbaui;
// OWizColumnSelect // OWizColumnSelect
OWizNameMatching::OWizNameMatching( vcl::Window* pParent) OWizNameMatching::OWizNameMatching(vcl::Window* pParent)
:OWizardPage( pParent, "NameMatching", "dbaccess/ui/namematchingpage.ui" ) : OWizardPage(pParent, "NameMatching", "dbaccess/ui/namematchingpage.ui")
, m_aImgUp(BitmapEx(ModuleRes(BMP_UP))) , m_aImgUp(BitmapEx(BMP_UP))
, m_aImgDown(BitmapEx(ModuleRes(BMP_DOWN))) , m_aImgDown(BitmapEx(BMP_DOWN))
{ {
get(m_pTABLE_LEFT, "leftlabel"); get(m_pTABLE_LEFT, "leftlabel");
get(m_pTABLE_RIGHT, "rightlabel"); get(m_pTABLE_RIGHT, "rightlabel");
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "WTypeSelect.hxx" #include "WTypeSelect.hxx"
#include "dbustrings.hrc" #include "dbustrings.hrc"
#include "bitmaps.hlst"
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include "FieldDescriptions.hxx" #include "FieldDescriptions.hxx"
...@@ -234,7 +235,7 @@ OWizTypeSelect::OWizTypeSelect( vcl::Window* pParent, SvStream* _pStream ) ...@@ -234,7 +235,7 @@ OWizTypeSelect::OWizTypeSelect( vcl::Window* pParent, SvStream* _pStream )
m_pColumnNames->SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl)); m_pColumnNames->SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl));
m_imgPKey = Image(BitmapEx(ModuleRes(BMP_PRIMARY_KEY))); m_imgPKey = Image(BitmapEx(BMP_PRIMARY_KEY));
m_pTypeControl->Show(); m_pTypeControl->Show();
m_pTypeControl->Init(); m_pTypeControl->Init();
......
...@@ -56,16 +56,6 @@ String STR_WIZ_PB_OK ...@@ -56,16 +56,6 @@ String STR_WIZ_PB_OK
Text [ en-US ] = "C~reate"; Text [ en-US ] = "C~reate";
}; };
Bitmap BMP_UP
{
File = "sortup.png" ;
};
Bitmap BMP_DOWN
{
File = "sortdown.png" ;
};
String STR_WIZ_TABLE_COPY String STR_WIZ_TABLE_COPY
{ {
Text [ en-US ] = "Copy table" ; Text [ en-US ] = "Copy table" ;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "dbu_resource.hrc" #include "dbu_resource.hrc"
#include "moduledbu.hxx" #include "moduledbu.hxx"
#include "dbustrings.hrc" #include "dbustrings.hrc"
#include "bitmaps.hlst"
#include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/GraphicColorMode.hpp> #include <com/sun/star/graphic/GraphicColorMode.hpp>
...@@ -73,9 +74,9 @@ namespace dbaui ...@@ -73,9 +74,9 @@ namespace dbaui
} }
void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const OUString& _rName, void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const OUString& _rName,
sal_uInt16& _out_rResourceID) OUString& _out_rResourceID)
{ {
_out_rResourceID = 0; _out_rResourceID = OUString();
try try
{ {
bool bIsView = _rData.xViews.is() && _rData.xViews->hasByName( _rName ); bool bIsView = _rData.xViews.is() && _rData.xViews->hasByName( _rName );
...@@ -136,11 +137,11 @@ namespace dbaui ...@@ -136,11 +137,11 @@ namespace dbaui
if ( !_out_rImage ) if ( !_out_rImage )
{ {
// no -> determine by type // no -> determine by type
sal_uInt16 nImageResourceID = 0; OUString sImageResourceID;
lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID ); lcl_getTableImageResourceID_nothrow( *m_pData, _rName, sImageResourceID );
if ( nImageResourceID && !_out_rImage ) if (!sImageResourceID.isEmpty() && !_out_rImage)
_out_rImage = Image(BitmapEx(ModuleRes(nImageResourceID))); _out_rImage = Image(BitmapEx(sImageResourceID));
} }
} }
} }
...@@ -148,52 +149,52 @@ namespace dbaui ...@@ -148,52 +149,52 @@ namespace dbaui
Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType ) Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType )
{ {
Image aObjectImage; Image aObjectImage;
sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) ); OUString sImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType) );
if ( nImageResourceID ) if (!sImageResourceID.isEmpty())
aObjectImage = Image(BitmapEx(ModuleRes(nImageResourceID))); aObjectImage = Image(BitmapEx(sImageResourceID));
return aObjectImage; return aObjectImage;
} }
sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType) OUString ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType)
{ {
sal_uInt16 nImageResourceID( 0 ); OUString sImageResourceID;
switch ( _nDatabaseObjectType ) switch ( _nDatabaseObjectType )
{ {
case DatabaseObject::QUERY: case DatabaseObject::QUERY:
nImageResourceID = QUERY_TREE_ICON; sImageResourceID = QUERY_TREE_ICON;
break; break;
case DatabaseObject::FORM: case DatabaseObject::FORM:
nImageResourceID = FORM_TREE_ICON; sImageResourceID = FORM_TREE_ICON;
break; break;
case DatabaseObject::REPORT: case DatabaseObject::REPORT:
nImageResourceID = REPORT_TREE_ICON; sImageResourceID = REPORT_TREE_ICON;
break; break;
case DatabaseObject::TABLE: case DatabaseObject::TABLE:
nImageResourceID = TABLE_TREE_ICON; sImageResourceID = TABLE_TREE_ICON;
break; break;
default: default:
OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" ); OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break; break;
} }
return nImageResourceID; return sImageResourceID;
} }
Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType ) Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType )
{ {
sal_uInt16 nImageResourceID( 0 ); OUString sImageResourceID;
switch ( _nDatabaseObjectType ) switch ( _nDatabaseObjectType )
{ {
case DatabaseObject::QUERY: case DatabaseObject::QUERY:
nImageResourceID = QUERYFOLDER_TREE_ICON; sImageResourceID = QUERYFOLDER_TREE_ICON;
break; break;
case DatabaseObject::FORM: case DatabaseObject::FORM:
nImageResourceID = FORMFOLDER_TREE_ICON; sImageResourceID = FORMFOLDER_TREE_ICON;
break; break;
case DatabaseObject::REPORT: case DatabaseObject::REPORT:
nImageResourceID = REPORTFOLDER_TREE_ICON; sImageResourceID = REPORTFOLDER_TREE_ICON;
break; break;
case DatabaseObject::TABLE: case DatabaseObject::TABLE:
nImageResourceID = TABLEFOLDER_TREE_ICON; sImageResourceID = TABLEFOLDER_TREE_ICON;
break; break;
default: default:
OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" ); OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
...@@ -201,14 +202,14 @@ namespace dbaui ...@@ -201,14 +202,14 @@ namespace dbaui
} }
Image aFolderImage; Image aFolderImage;
if ( nImageResourceID ) if (!sImageResourceID.isEmpty())
aFolderImage = Image(BitmapEx(ModuleRes(nImageResourceID))); aFolderImage = Image(BitmapEx(sImageResourceID));
return aFolderImage; return aFolderImage;
} }
Image ImageProvider::getDatabaseImage() Image ImageProvider::getDatabaseImage()
{ {
return Image(BitmapEx(ModuleRes(DATABASE_TREE_ICON))); return Image(BitmapEx(DATABASE_TREE_ICON));
} }
} // namespace dbaui } // namespace dbaui
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "querycontroller.hxx" #include "querycontroller.hxx"
#include "dbu_qry.hrc" #include "dbu_qry.hrc"
#include "dbustrings.hrc" #include "dbustrings.hrc"
#include "bitmaps.hlst"
#include <comphelper/extract.hxx> #include <comphelper/extract.hxx>
#include "UITools.hxx" #include "UITools.hxx"
#include "TableWindowAccess.hxx" #include "TableWindowAccess.hxx"
...@@ -194,7 +195,7 @@ bool OTableWindow::FillListBox() ...@@ -194,7 +195,7 @@ bool OTableWindow::FillListBox()
} }
// mark all primary keys with special image // mark all primary keys with special image
Image aPrimKeyImage = Image(BitmapEx(ModuleRes(BMP_PRIMARY_KEY))); Image aPrimKeyImage = Image(BitmapEx(BMP_PRIMARY_KEY));
if (GetData()->IsShowAll()) if (GetData()->IsShowAll())
{ {
......
...@@ -21,11 +21,6 @@ ...@@ -21,11 +21,6 @@
#include "browserids.hxx" #include "browserids.hxx"
#include "dbaccess_helpid.hrc" #include "dbaccess_helpid.hrc"
Bitmap BMP_PRIMARY_KEY
{
File = "jo01.png";
};
String STR_QUERY_UNDO_TABWINSHOW String STR_QUERY_UNDO_TABWINSHOW
{ {
Text [ en-US ] = "Add Table Window" ; Text [ en-US ] = "Add Table Window" ;
......
...@@ -53,6 +53,7 @@ $(packimages_DIR)/sourceimagelist.ilst : \ ...@@ -53,6 +53,7 @@ $(packimages_DIR)/sourceimagelist.ilst : \
$(SRCDIR)/connectivity/inc/bitmaps.hlst \ $(SRCDIR)/connectivity/inc/bitmaps.hlst \
$(SRCDIR)/cui/inc/bitmaps.hlst \ $(SRCDIR)/cui/inc/bitmaps.hlst \
$(SRCDIR)/chart2/inc/bitmaps.hlst \ $(SRCDIR)/chart2/inc/bitmaps.hlst \
$(SRCDIR)/dbaccess/inc/bitmaps.hlst \
$(SRCDIR)/sfx2/inc/bitmaps.hlst \ $(SRCDIR)/sfx2/inc/bitmaps.hlst \
$(SRCDIR)/vcl/inc/bitmaps.hlst $(SRCDIR)/vcl/inc/bitmaps.hlst
grep res $^ | cut -d'"' -f2 | sed "s/^/%MODULE%\//" | sed "s/%MODULE%.res/%GLOBALRES%/g" > $@ grep res $^ | cut -d'"' -f2 | sed "s/^/%MODULE%\//" | sed "s/%MODULE%.res/%GLOBALRES%/g" > $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment