summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 12:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-19 14:30:50 +0200
commitd4a066c3e4b7ebcdb16ffcb88b6b2c744c127ea1 (patch)
tree41042ca9f06117196e18d583d69cbdc9bafd445a /dbaccess
parentloplugin:unusedmethods also check for functions returning bool (diff)
downloadcore-d4a066c3e4b7ebcdb16ffcb88b6b2c744c127ea1.tar.gz
core-d4a066c3e4b7ebcdb16ffcb88b6b2c744c127ea1.zip
inline some defines
which don't add any value anymore Change-Id: I45977d972d4d02926630b749d3ec736416138cf5
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx8
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx2
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx4
-rw-r--r--dbaccess/source/ui/inc/listviewitems.hxx2
5 files changed, 9 insertions, 11 deletions
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 0df6b7bbcf68..74e07e2a7910 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -106,7 +106,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree
void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, bool _bSelect)
{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : nullptr;
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SvLBoxItemType::String) : nullptr;
if (pTextItem)
{
static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect);
@@ -128,7 +128,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, bool _bSelect)
bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry)
{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : nullptr;
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SvLBoxItemType::String) : nullptr;
if (pTextItem)
return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
else {
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 2f14c616b6a5..ca2dc64699fe 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2141,7 +2141,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent, bool)
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >(_pParent->GetUserData());
assert(pData && "SbaTableQueryBrowser::OnExpandEntry: No user data!");
#if OSL_DEBUG_LEVEL > 0
- SvLBoxString* pString = static_cast<SvLBoxString*>(pFirstParent->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ SvLBoxString* pString = static_cast<SvLBoxString*>(pFirstParent->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"SbaTableQueryBrowser::OnExpandEntry: No string item!");
#endif
@@ -2266,7 +2266,7 @@ bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry )
SvTreeListEntry* pParent = m_pTreeView->getListBox().GetParent(_pEntry);
if ( pParent != pDataSourceEntry )
{
- SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"There must be a string item!");
OUString aName(pString->GetText());
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pParent->GetUserData());
@@ -2517,7 +2517,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
Reference<XConnection> xOldConnection(xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
// the name of the table or query
- SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ SvLBoxString* pString = static_cast<SvLBoxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"There must be a string item!");
const OUString sSimpleName = pString->GetText();
OUStringBuffer sNameBuffer(sSimpleName);
@@ -2527,7 +2527,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
while( m_pTreeModel->GetParent(pTemp) != pConnection )
{
sNameBuffer.insert(0,'/');
- pString = static_cast<SvLBoxString*>(pTemp->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ pString = static_cast<SvLBoxString*>(pTemp->GetFirstItem(SvLBoxItemType::String));
OSL_ENSURE(pString,"There must be a string item!");
sNameBuffer.insert(0,pString->GetText());
pTemp = m_pTreeModel->GetParent(pTemp);
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index a8efa986d117..d5b169be3feb 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -191,7 +191,7 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )
if (m_aSelectedEntries.find(_pEntry) != m_aSelectedEntries.end())
{
- SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
+ SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SvLBoxItemType::String);
if ( pTextItem && !static_cast< OBoldListboxString* >( pTextItem )->isEmphasized() )
{
implStopSelectionTimer();
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index c8b52bab7100..73c1620f5f2a 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -318,7 +318,7 @@ bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry)
{
if (_pEntry)
{
- OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
if (pTextItem)
return pTextItem->isEmphasized();
}
@@ -359,7 +359,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked,
|| bAllObjectsEntryAffected // or it is the "all objects" entry
)
{
- OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
+ OBoldListboxString* pTextItem = static_cast<OBoldListboxString*>(_pEntry->GetFirstItem(SvLBoxItemType::String));
if (pTextItem)
pTextItem->emphasize(_bChecked);
diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx
index 15cc9c609eb2..9acbf5719a81 100644
--- a/dbaccess/source/ui/inc/listviewitems.hxx
+++ b/dbaccess/source/ui/inc/listviewitems.hxx
@@ -25,8 +25,6 @@
namespace dbaui
{
- #define SV_ITEM_ID_BOLDLBSTRING SvLBoxItemType::String
-
// OBoldListboxString
class OBoldListboxString : public SvLBoxString
{