summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-08 16:39:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-08 16:47:31 +0200
commit9600746f224470d06a8ec1d383ec16fefe847002 (patch)
tree185c38b7bebf3e23a9e38c24b2c33951b97e7e5e /dbaccess
parent45755853b8ccc11e4f52978337d0965675415b74 (diff)
loplugin:redundantcast: redundant static_casts in dbaccess
Change-Id: Ia959a92044ba2fb7fef1938bd236e4a3a9f55908
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx12
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx2
4 files changed, 9 insertions, 11 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index d608708fe570..1b8f13404017 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1312,7 +1312,7 @@ OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet
if(!m_pTables->hasByName(aComposedName))
{
::comphelper::UStringMixLess aTmp(m_aAdditiveIterator.getTables().key_comp());
- ::comphelper::UStringMixEqual aComp(static_cast< ::comphelper::UStringMixLess*>(&aTmp)->isCaseSensitive());
+ ::comphelper::UStringMixEqual aComp(aTmp.isCaseSensitive());
for(;pBegin != pEnd;++pBegin)
{
Reference<XPropertySet> xTableProp;
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index a2747862723a..e75a7449f211 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -189,14 +189,13 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )
{
SvTreeListBox::ModelHasEntryInvalidated( _pEntry );
- SvTreeListEntry* pLBEntry = static_cast<SvTreeListEntry*>(_pEntry);
- if (m_aSelectedEntries.find(pLBEntry) != m_aSelectedEntries.end())
+ if (m_aSelectedEntries.find(_pEntry) != m_aSelectedEntries.end())
{
- SvLBoxItem* pTextItem = pLBEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
+ SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
if ( pTextItem && !static_cast< OBoldListboxString* >( pTextItem )->isEmphasized() )
{
implStopSelectionTimer();
- m_aSelectedEntries.erase(pLBEntry);
+ m_aSelectedEntries.erase(_pEntry);
// ehm - why?
}
}
@@ -205,11 +204,10 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )
void DBTreeListBox::ModelHasRemoved( SvTreeListEntry* _pEntry )
{
SvTreeListBox::ModelHasRemoved(_pEntry);
- SvTreeListEntry* pLBEntry = static_cast<SvTreeListEntry*>(_pEntry);
- if (m_aSelectedEntries.find(pLBEntry) != m_aSelectedEntries.end())
+ if (m_aSelectedEntries.find(_pEntry) != m_aSelectedEntries.end())
{
implStopSelectionTimer();
- m_aSelectedEntries.erase(pLBEntry);
+ m_aSelectedEntries.erase(_pEntry);
}
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index da22b9c813cc..ac50e2a5aa75 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -140,7 +140,7 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt )
{
m_pTabWin->SetSizePixel(aSize);
- OJoinTableView* pView = static_cast<OJoinTableView*>(m_pTabWin->getTableView());
+ OJoinTableView* pView = m_pTabWin->getTableView();
OSL_ENSURE(pView,"No OJoinTableView!");
for (auto& conn : pView->getTableConnections())
conn->RecalcLines();
@@ -154,7 +154,7 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt )
{
Point aPos = rEvt.GetPosPixel();
aPos = OutputToScreenPixel( aPos );
- OJoinTableView* pView = static_cast<OJoinTableView*>(m_pTabWin->getTableView());
+ OJoinTableView* pView = m_pTabWin->getTableView();
OSL_ENSURE(pView,"No OJoinTableView!");
pView->NotifyTitleClicked( static_cast<OTableWindow*>(GetParent()), aPos );
}
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 48b219574401..f329f0b18743 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -114,7 +114,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
m_pLB_JoinType->SetSelectHdl(LINK(this,DlgQryJoin,LBChangeHdl));
m_pCBNatural->SetToggleHdl(LINK(this,DlgQryJoin,NaturalToggleHdl));
- if ( static_cast<OQueryTableView*>(pParent)->getDesignView()->getController().isReadOnly() )
+ if ( pParent->getDesignView()->getController().isReadOnly() )
{
m_pLB_JoinType->Disable();
m_pCBNatural->Disable();