diff options
author | Manal Alhassoun <malhassoun@kacst.edu.sa> | 2013-08-19 10:01:25 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-19 11:21:22 +0000 |
commit | d0c166ad33042403c5ecf9367c3362542cb3549a (patch) | |
tree | d1a8150b91343f545a9c85317934861bb689e014 /sc/source/ui/dbgui | |
parent | 4c575c5f0bfbcd7dd0c16e849dfe0428cf4b8b0a (diff) |
erroralerttabpage.ui widgets
Change-Id: Ia0a11f636b864e5dd7c8ef6f4e8d1c3bb6f0a26f
Reviewed-on: https://gerrit.libreoffice.org/5507
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/validate.cxx | 62 | ||||
-rw-r--r-- | sc/source/ui/dbgui/validate.src | 84 |
2 files changed, 29 insertions, 117 deletions
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 83419aee7620..07c3c19e2f31 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -764,20 +764,16 @@ ScTPValidationError::ScTPValidationError( Window* pParent, const SfxItemSet& rArgSet ) : SfxTabPage ( pParent, - ScResId( TP_VALIDATION_ERROR ), - rArgSet ), - aTsbShow ( this, ScResId( TSB_SHOW ) ), - aFlContent ( this, ScResId( FL_CONTENT ) ), - aFtAction ( this, ScResId( FT_ACTION ) ), - aLbAction ( this, ScResId( LB_ACTION ) ), - aBtnSearch ( this, ScResId( BTN_SEARCH ) ), - aFtTitle ( this, ScResId( FT_TITLE ) ), - aEdtTitle ( this, ScResId( EDT_TITLE ) ), - aFtError ( this, ScResId( FT_ERROR ) ), - aEdError ( this, ScResId( EDT_ERROR ) ) + "ErrorAlertTabPage" , "modules/scalc/ui/erroralerttabpage.ui" , + rArgSet ) { + get(m_pTsbShow,"tsbshow"); + get(m_pLbAction,"actionCB"); + get(m_pBtnSearch,"browseBtn"); + get(m_pEdtTitle,"title"); + get(m_pFtError,"errormsg_label"); + get(m_pEdError,"errorMsg"); Init(); - FreeResource(); } // ----------------------------------------------------------------------- @@ -790,11 +786,11 @@ ScTPValidationError::~ScTPValidationError() void ScTPValidationError::Init() { - aLbAction.SetSelectHdl( LINK( this, ScTPValidationError, SelectActionHdl ) ); - aBtnSearch.SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) ); + m_pLbAction->SetSelectHdl( LINK( this, ScTPValidationError, SelectActionHdl ) ); + m_pBtnSearch->SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) ); - aLbAction.SelectEntryPos( 0 ); - aTsbShow.EnableTriState( false ); + m_pLbAction->SelectEntryPos( 0 ); + m_pTsbShow->EnableTriState( false ); SelectActionHdl( NULL ); } @@ -821,24 +817,24 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet ) const SfxPoolItem* pItem; if ( rArgSet.GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET ) - aTsbShow.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK ); + m_pTsbShow->SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK ); else - aTsbShow.SetState( STATE_CHECK ); // check by default + m_pTsbShow->SetState( STATE_CHECK ); // check by default if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET ) - aLbAction.SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() ); + m_pLbAction->SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() ); else - aLbAction.SelectEntryPos( 0 ); + m_pLbAction->SelectEntryPos( 0 ); if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) - aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() ); + m_pEdtTitle->SetText( ((const SfxStringItem*)pItem)->GetValue() ); else - aEdtTitle.SetText( EMPTY_STRING ); + m_pEdtTitle->SetText( EMPTY_STRING ); if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) - aEdError.SetText( ((const SfxStringItem*)pItem)->GetValue() ); + m_pEdError->SetText( ((const SfxStringItem*)pItem)->GetValue() ); else - aEdError.SetText( EMPTY_STRING ); + m_pEdError->SetText( EMPTY_STRING ); SelectActionHdl( NULL ); } @@ -847,10 +843,10 @@ void ScTPValidationError::Reset( const SfxItemSet& rArgSet ) sal_Bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) { - rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, aTsbShow.GetState() == STATE_CHECK ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, aLbAction.GetSelectEntryPos() ) ); - rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aEdtTitle.GetText() ) ); - rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aEdError.GetText() ) ); + rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, m_pTsbShow->GetState() == STATE_CHECK ) ); + rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, m_pLbAction->GetSelectEntryPos() ) ); + rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, m_pEdtTitle->GetText() ) ); + rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, m_pEdError->GetText() ) ); return sal_True; } @@ -859,12 +855,12 @@ sal_Bool ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) IMPL_LINK_NOARG(ScTPValidationError, SelectActionHdl) { - ScValidErrorStyle eStyle = (ScValidErrorStyle) aLbAction.GetSelectEntryPos(); + ScValidErrorStyle eStyle = (ScValidErrorStyle) m_pLbAction->GetSelectEntryPos(); sal_Bool bMacro = ( eStyle == SC_VALERR_MACRO ); - aBtnSearch.Enable( bMacro ); - aFtError.Enable( !bMacro ); - aEdError.Enable( !bMacro ); + m_pBtnSearch->Enable( bMacro ); + m_pFtError->Enable( !bMacro ); + m_pEdError->Enable( !bMacro ); return( 0L ); } @@ -884,7 +880,7 @@ IMPL_LINK_NOARG(ScTPValidationError, ClickSearchHdl) if ( aScriptURL != NULL && !aScriptURL.isEmpty() ) { - aEdtTitle.SetText( aScriptURL ); + m_pEdtTitle->SetText( aScriptURL ); } return( 0L ); diff --git a/sc/source/ui/dbgui/validate.src b/sc/source/ui/dbgui/validate.src index 7a6b79829090..01cfb9133ed7 100644 --- a/sc/source/ui/dbgui/validate.src +++ b/sc/source/ui/dbgui/validate.src @@ -193,88 +193,4 @@ TabPage TP_VALIDATION_VALUES }; }; -TabPage TP_VALIDATION_ERROR -{ - HelpID = "sc:TabPage:TP_VALIDATION_ERROR"; - Hide = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - FixedLine FL_CONTENT - { - Pos = MAP_APPFONT ( 6 , 22 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Contents" ; - }; - TriStateBox TSB_SHOW - { - HelpID = "sc:TriStateBox:TP_VALIDATION_ERROR:TSB_SHOW"; - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 248 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Show error ~message when invalid values are entered" ; - }; - MultiLineEdit EDT_ERROR - { - HelpID = "sc:MultiLineEdit:TP_VALIDATION_ERROR:EDT_ERROR"; - Border = TRUE ; - Pos = MAP_APPFONT ( 80 , 69 ) ; - Size = MAP_APPFONT ( 171 , 110 ) ; - TabStop = TRUE ; - VScroll = TRUE ; - IgnoreTab = TRUE ; - }; - Edit EDT_TITLE - { - HelpID = "sc:Edit:TP_VALIDATION_ERROR:EDT_TITLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 80 , 51 ) ; - Size = MAP_APPFONT ( 171 , 12 ) ; - TabStop = TRUE ; - }; - FixedText FT_ERROR - { - Pos = MAP_APPFONT ( 12 , 71 ) ; - Size = MAP_APPFONT ( 64 , 8 ) ; - Text [ en-US ] = "~Error message" ; - }; - FixedText FT_TITLE - { - Pos = MAP_APPFONT ( 12 , 53 ) ; - Size = MAP_APPFONT ( 64 , 8 ) ; - Text [ en-US ] = "~Title" ; - }; - FixedText FT_ACTION - { - Pos = MAP_APPFONT ( 12 , 35 ) ; - Size = MAP_APPFONT ( 64 , 8 ) ; - Text [ en-US ] = "~Action" ; - }; - ListBox LB_ACTION - { - HelpID = "sc:ListBox:TP_VALIDATION_ERROR:LB_ACTION"; - Border = TRUE ; - Pos = MAP_APPFONT ( 80 , 33 ) ; - Size = MAP_APPFONT ( 107 , 76 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - // Reihenfolge entspricht enum ScValidErrorStyle - StringList [ en-US ] = - { - < "Stop" ; Default ; > ; - < "Warning" ; Default ; > ; - < "Information" ; Default ; > ; - < "Macro" ; Default ; > ; - }; - }; - PushButton BTN_SEARCH - { - HelpID = "sc:PushButton:TP_VALIDATION_ERROR:BTN_SEARCH"; - Pos = MAP_APPFONT ( 191 , 32 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Browse..." ; - }; - Text [ en-US ] = "Error Alert" ; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |