audit GetParent harder wrt GetParentDialog
weed out assumption that widgets are direct children of Dialogs Change-Id: Ib2cf0c8862bd5e82b13380634ed82ca7fcc746b8
This commit is contained in:
@@ -1422,7 +1422,7 @@ namespace svx
|
|||||||
rLoseFocusHdl.Call( this );
|
rLoseFocusHdl.Call( this );
|
||||||
m_rScrollBar.SetThumbPos( m_rScrollBar.GetThumbPos() + ( _bUp? -1 : 1 ) );
|
m_rScrollBar.SetThumbPos( m_rScrollBar.GetThumbPos() + ( _bUp? -1 : 1 ) );
|
||||||
|
|
||||||
( static_cast< HangulHanjaEditDictDialog* >( GetParent() ) )->UpdateScrollbar();
|
( static_cast< HangulHanjaEditDictDialog* >( GetParentDialog() ) )->UpdateScrollbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
SuggestionEdit::SuggestionEdit( Window* pParent, const ResId& rResId,
|
SuggestionEdit::SuggestionEdit( Window* pParent, const ResId& rResId,
|
||||||
|
@@ -52,11 +52,11 @@ void HyphenEdit::KeyInput( const KeyEvent& rKEvt )
|
|||||||
switch ( nCode )
|
switch ( nCode )
|
||||||
{
|
{
|
||||||
case KEY_LEFT:
|
case KEY_LEFT:
|
||||||
( (SvxHyphenWordDialog*)GetParent() )->SelLeft();
|
( (SvxHyphenWordDialog*)GetParentDialog() )->SelLeft();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_RIGHT:
|
case KEY_RIGHT:
|
||||||
( (SvxHyphenWordDialog*)GetParent() )->SelRight();
|
( (SvxHyphenWordDialog*)GetParentDialog() )->SelRight();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_TAB:
|
case KEY_TAB:
|
||||||
|
@@ -1119,7 +1119,7 @@ IMPL_LINK( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvxFontListBox*, pLb )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SfxNoLayoutSingleTabDialog* pParent = dynamic_cast< SfxNoLayoutSingleTabDialog* >( GetParent() );
|
SfxNoLayoutSingleTabDialog* pParent = dynamic_cast< SfxNoLayoutSingleTabDialog* >( GetParentDialog() );
|
||||||
OKButton* pOKButton = pParent ? pParent->GetOKButton() : NULL;
|
OKButton* pOKButton = pParent ? pParent->GetOKButton() : NULL;
|
||||||
if ( pOKButton )
|
if ( pOKButton )
|
||||||
pOKButton->Click();
|
pOKButton->Click();
|
||||||
|
@@ -71,13 +71,13 @@ namespace dbmm
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
const MacroMigrationDialog& MacroMigrationPage::getDialog() const
|
const MacroMigrationDialog& MacroMigrationPage::getDialog() const
|
||||||
{
|
{
|
||||||
return *dynamic_cast< const MacroMigrationDialog* >( GetParent() );
|
return *dynamic_cast< const MacroMigrationDialog* >( GetParentDialog() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
MacroMigrationDialog& MacroMigrationPage::getDialog()
|
MacroMigrationDialog& MacroMigrationPage::getDialog()
|
||||||
{
|
{
|
||||||
return *dynamic_cast< MacroMigrationDialog* >( GetParent() );
|
return *dynamic_cast< MacroMigrationDialog* >( GetParentDialog() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
@@ -322,7 +322,7 @@ namespace pcr
|
|||||||
{
|
{
|
||||||
SvTreeListBox::ModelHasMoved( _pSource );
|
SvTreeListBox::ModelHasMoved( _pSource );
|
||||||
|
|
||||||
((TabOrderDialog*)Window::GetParent())->SetModified();
|
((TabOrderDialog*)GetParentDialog())->SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
@@ -332,7 +332,7 @@ namespace pcr
|
|||||||
Image aImage;
|
Image aImage;
|
||||||
for (long i=0; i<labs(nRelPos); i++)
|
for (long i=0; i<labs(nRelPos); i++)
|
||||||
{
|
{
|
||||||
((TabOrderDialog*)Window::GetParent())->SetModified();
|
((TabOrderDialog*)GetParentDialog())->SetModified();
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// move entries
|
// move entries
|
||||||
|
@@ -290,7 +290,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
|
|||||||
pView->DeleteMarked();
|
pView->DeleteMarked();
|
||||||
bProc = sal_True;
|
bProc = sal_True;
|
||||||
if( !pView->AreObjectsMarked() )
|
if( !pView->AreObjectsMarked() )
|
||||||
((Dialog*)GetParent())->GrabFocusToFirstControl();
|
GetParentDialog()->GrabFocusToFirstControl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -314,12 +314,12 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
((Dialog*)GetParent())->GrabFocusToFirstControl();
|
GetParentDialog()->GrabFocusToFirstControl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
((Dialog*)GetParent())->GrabFocusToFirstControl();
|
GetParentDialog()->GrabFocusToFirstControl();
|
||||||
}
|
}
|
||||||
bProc = sal_True;
|
bProc = sal_True;
|
||||||
}
|
}
|
||||||
|
@@ -794,7 +794,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
|
|||||||
{
|
{
|
||||||
String sFldTypeName = aCategoryBox.GetText();
|
String sFldTypeName = aCategoryBox.GetText();
|
||||||
|
|
||||||
SfxNoLayoutSingleTabDialog *pDlg = dynamic_cast<SfxNoLayoutSingleTabDialog*>(GetParent());
|
SfxNoLayoutSingleTabDialog *pDlg = dynamic_cast<SfxNoLayoutSingleTabDialog*>(GetParentDialog());
|
||||||
PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
|
PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
|
||||||
if (pBtn)
|
if (pBtn)
|
||||||
pBtn->Enable(sFldTypeName.Len() != 0);
|
pBtn->Enable(sFldTypeName.Len() != 0);
|
||||||
|
@@ -189,7 +189,7 @@ void PrintDialog::PrintPreviewWindow::Command( const CommandEvent& rEvt )
|
|||||||
if( rEvt.GetCommand() == COMMAND_WHEEL )
|
if( rEvt.GetCommand() == COMMAND_WHEEL )
|
||||||
{
|
{
|
||||||
const CommandWheelData* pWheelData = rEvt.GetWheelData();
|
const CommandWheelData* pWheelData = rEvt.GetWheelData();
|
||||||
PrintDialog* pDlg = dynamic_cast<PrintDialog*>(GetParent());
|
PrintDialog* pDlg = dynamic_cast<PrintDialog*>(GetParentDialog());
|
||||||
if( pDlg )
|
if( pDlg )
|
||||||
{
|
{
|
||||||
if( pWheelData->GetDelta() > 0 )
|
if( pWheelData->GetDelta() > 0 )
|
||||||
|
Reference in New Issue
Block a user