Kaydet (Commit) 9600746f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:redundantcast: redundant static_casts in dbaccess

Change-Id: Ia959a92044ba2fb7fef1938bd236e4a3a9f55908
üst 45755853
......@@ -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;
......
......@@ -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);
}
}
......
......@@ -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 );
}
......
......@@ -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();
......
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