uitest: set ids for a few UI objects created in code

Change-Id: I421b97448bb596b134908ca6ddd60d7b4f60b186
This commit is contained in:
Markus Mohrhard
2016-05-19 02:19:33 +02:00
parent f06c50870c
commit 742a1d7ea1
3 changed files with 12 additions and 0 deletions

View File

@@ -440,14 +440,20 @@ void SfxTabDialog::Init_Impl(bool bFmtFlag)
m_pResetBtn = m_pUIBuilder->get<PushButton>("reset");
m_bOwnsResetBtn = m_pResetBtn == nullptr;
if (m_bOwnsResetBtn)
{
m_pResetBtn = VclPtr<PushButton>::Create(m_pActionArea.get());
m_pResetBtn->set_id("reset");
}
else
m_pImpl->bHideResetBtn = !m_pResetBtn->IsVisible();
m_pBaseFmtBtn = m_pUIBuilder->get<PushButton>("standard");
m_bOwnsBaseFmtBtn = m_pBaseFmtBtn == nullptr;
if (m_bOwnsBaseFmtBtn)
{
m_pBaseFmtBtn = VclPtr<PushButton>::Create(m_pActionArea.get());
m_pBaseFmtBtn->set_id("standard");
}
m_pOKBtn->SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
m_pCancelBtn->SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );

View File

@@ -143,6 +143,7 @@ namespace svt
m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
m_pPrevPage->SetText(SVT_RESSTR(STR_WIZDLG_PREVIOUS));
m_pPrevPage->Show();
m_pPrevPage->set_id("previous");
if (_nButtonFlags & WizardButtonFlags::NEXT)
AddButton( m_pPrevPage, ( WIZARDDIALOG_BUTTON_SMALLSTDOFFSET_X) ); // half x-offset to the next button
@@ -160,6 +161,7 @@ namespace svt
m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
m_pNextPage->SetText(OUString(SVT_RESSTR(STR_WIZDLG_NEXT)));
m_pNextPage->Show();
m_pNextPage->set_id("next");
AddButton( m_pNextPage, WIZARDDIALOG_BUTTON_STDOFFSET_X );
SetNextButton( m_pNextPage );
@@ -173,6 +175,7 @@ namespace svt
m_pFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MAP_APPFONT ) );
m_pFinish->SetText(SVT_RESSTR(STR_WIZDLG_FINISH));
m_pFinish->Show();
m_pFinish->set_id("finish");
AddButton( m_pFinish, WIZARDDIALOG_BUTTON_STDOFFSET_X );
m_pFinish->SetClickHdl( LINK( this, OWizardMachine, OnFinish ) );

View File

@@ -1703,6 +1703,7 @@ void PushButton::ShowFocus(const Rectangle& rRect)
void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
set_id("ok");
PushButton::ImplInit( pParent, nStyle );
SetText( Button::GetStandardText( StandardButtonType::OK ) );
@@ -1748,6 +1749,7 @@ void OKButton::Click()
void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
set_id("cancel");
PushButton::ImplInit( pParent, nStyle );
SetText( Button::GetStandardText( StandardButtonType::Cancel ) );
@@ -1799,6 +1801,7 @@ CloseButton::CloseButton( vcl::Window* pParent, WinBits nStyle )
void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
set_id("help");
PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS );
SetText( Button::GetStandardText( StandardButtonType::Help ) );