Kaydet (Commit) d0c166ad authored tarafından Manal Alhassoun's avatar Manal Alhassoun Kaydeden (comit) Caolán McNamara

erroralerttabpage.ui widgets

Change-Id: Ia0a11f636b864e5dd7c8ef6f4e8d1c3bb6f0a26f
Reviewed-on: https://gerrit.libreoffice.org/5507Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4c575c5f
......@@ -71,6 +71,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecontents \
sc/uiconfig/scalc/ui/descriptivestatisticsdialog \
sc/uiconfig/scalc/ui/erroralerttabpage \
sc/uiconfig/scalc/ui/externaldata \
sc/uiconfig/scalc/ui/filldlg \
sc/uiconfig/scalc/ui/footerdialog \
......
......@@ -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 );
......
......@@ -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: */
......@@ -31,18 +31,6 @@
#define FT_MAX 8
#define EDT_MAX 9
#define FL_CONTENT 10
#define FT_TITLE 12
#define EDT_TITLE 13
#define TSB_SHOW 21
#define FT_ACTION 22
#define FT_ERROR 23
#define LB_ACTION 24
#define EDT_ERROR 25
#define BTN_SEARCH 26
#define CB_SHOWLIST 27
#define CB_SORTLIST 28
#define EDT_LIST 29
......
......@@ -279,15 +279,12 @@ public:
class ScTPValidationError : public SfxTabPage
{
private:
TriStateBox aTsbShow;
FixedLine aFlContent;
FixedText aFtAction;
ListBox aLbAction;
PushButton aBtnSearch;
FixedText aFtTitle;
Edit aEdtTitle;
FixedText aFtError;
MultiLineEdit aEdError;
TriStateBox* m_pTsbShow;
ListBox* m_pLbAction;
PushButton* m_pBtnSearch;
Edit* m_pEdtTitle;
FixedText* m_pFtError;
VclMultiLineEdit* m_pEdError;
void Init();
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkBox" id="ErrorAlertTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkCheckButton" id="tsbshow">
<property name="label" translatable="yes">Show error _message when invalid values are entered</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="inconsistent">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="action_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Action:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">actionCB</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">_Title:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">title</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="vscrollbar_policy">always</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="errorMsg:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="title">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="errormsg_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">_Error message:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">errorMsg:border</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="browseBtn">
<property name="label" translatable="yes">_Browse...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="actionCB">
<property name="visible">True</property>
<property name="can_focus">False</property>
<items>
<item translatable="yes">Stop</item>
<item translatable="yes">Warning</item>
<item translatable="yes">Information</item>
<item translatable="yes">Macro</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Contents</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>
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