summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-08 16:56:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-09 11:01:53 +0100
commite1bc666cda47eff1305253923ab16b9fd4eb3d42 (patch)
treec1db3d1b5fd5fde33af5c037055f874c37932e99 /sc
parent92f2ea382446d1a8e16db198dc1e1baa48769800 (diff)
convert data validation tab page to .ui
Change-Id: I1a4f1f4f06ec1ab0b28637380a8bfcb3bc64ee30
Diffstat (limited to 'sc')
-rw-r--r--sc/AllLangResTarget_sc.mk1
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/inc/scabstdlg.hxx2
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx14
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx323
-rw-r--r--sc/source/ui/dbgui/validate.src161
-rw-r--r--sc/source/ui/inc/validate.hrc61
-rw-r--r--sc/source/ui/inc/validate.hxx59
-rw-r--r--sc/source/ui/view/cellsh2.cxx3
-rw-r--r--sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui10
-rw-r--r--sc/uiconfig/scalc/ui/validationcriteriapage.ui371
12 files changed, 568 insertions, 440 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 92e425319d95..3a178588cf6c 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -49,7 +49,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/styleui/scstyles.src \
sc/source/ui/dbgui/pvfundlg.src \
sc/source/ui/dbgui/dapitype.src \
- sc/source/ui/dbgui/validate.src \
sc/source/ui/drawfunc/drformsh.src \
sc/source/ui/drawfunc/objdraw.src \
sc/source/ui/miscdlgs/retypepassdlg.src \
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 7035d2e379a8..15d515c4ba5a 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -176,6 +176,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/ttestdialog \
sc/uiconfig/scalc/ui/ungroupdialog \
sc/uiconfig/scalc/ui/validationdialog \
+ sc/uiconfig/scalc/ui/validationcriteriapage \
sc/uiconfig/scalc/ui/validationhelptabpage \
sc/uiconfig/scalc/ui/xmlsourcedialog \
))
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 04e0a4ebf595..2a067516843f 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -493,7 +493,7 @@ public:
// for tabpage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
- virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc() = 0;
protected:
~ScAbstractDialogFactory() {}
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 8afb4f7255ac..aa730924ad6c 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -56,7 +56,6 @@
#include "subtdlg.hxx"
#include "textdlgs.hxx"
#include "validate.hxx"
-#include "validate.hrc"
#include "sortdlg.hxx"
#include "textimportoptions.hxx"
#include "opredlin.hxx"
@@ -1061,18 +1060,9 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
return 0;
}
-GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
+GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc()
{
- switch ( nId )
- {
- case TP_VALIDATION_VALUES :
- return ScTPValidationValue::GetRanges;
- //break;
- default:
- break;
- }
-
- return 0;
+ return ScTPValidationValue::GetRanges;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 9b5625bb6ee0..7dd1b48dd6b5 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -562,7 +562,7 @@ public:
// For TabPage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) SAL_OVERRIDE;
- virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) SAL_OVERRIDE;
+ virtual GetTabPageRanges GetTabPageRangesFunc() SAL_OVERRIDE;
};
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index b53301e1d81d..83462faae305 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -38,7 +38,6 @@
#include "stringutil.hxx"
#include "validat.hxx"
-#include "validate.hrc"
#include "validate.hxx"
#include "compiler.hxx"
#include "formula/opcode.hxx"
@@ -49,6 +48,31 @@
#include <sfx2/childwin.hxx>
#include "reffact.hxx"
+/* Position indexes for "Allow" list box.
+ They do not map directly to ScValidationMode and can safely be modified to
+ change the order of the list box entries. */
+#define SC_VALIDDLG_ALLOW_ANY 0
+#define SC_VALIDDLG_ALLOW_WHOLE 1
+#define SC_VALIDDLG_ALLOW_DECIMAL 2
+#define SC_VALIDDLG_ALLOW_DATE 3
+#define SC_VALIDDLG_ALLOW_TIME 4
+#define SC_VALIDDLG_ALLOW_RANGE 5
+#define SC_VALIDDLG_ALLOW_LIST 6
+#define SC_VALIDDLG_ALLOW_TEXTLEN 7
+
+/* Position indexes for "Data" list box.
+ They do not map directly to ScConditionMode and can safely be modified to
+ change the order of the list box entries. */
+#define SC_VALIDDLG_DATA_EQUAL 0
+#define SC_VALIDDLG_DATA_LESS 1
+#define SC_VALIDDLG_DATA_GREATER 2
+#define SC_VALIDDLG_DATA_EQLESS 3
+#define SC_VALIDDLG_DATA_EQGREATER 4
+#define SC_VALIDDLG_DATA_NOTEQUAL 5
+#define SC_VALIDDLG_DATA_VALIDRANGE 6
+#define SC_VALIDDLG_DATA_INVALIDRANGE 7
+
+
static sal_uInt16 pValueRanges[] =
{
FID_VALID_MODE, FID_VALID_ERRTEXT,
@@ -97,44 +121,35 @@ void ScTPValidationValue:: SetActiveHdl()
}
}
-void ScTPValidationValue::RefInputStartPreHdl( formula::RefEdit* pEdit, formula::RefButton* pButton )
+void ScTPValidationValue::RefInputStartPreHdl( formula::RefEdit* pEdit, formula::RefButton* pButton )
{
if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
{
Window *pNewParent = pValidationDlg->get_refinput_shrink_parent();
if( pEdit == m_pRefEdit && m_pRefEdit->GetParent() != pNewParent )
{
- maRefEditPos = m_pRefEdit->GetPosPixel();
- maRefEditSize = m_pRefEdit->GetSizePixel();
m_pRefEdit->SetParent(pNewParent);
}
- if( pButton == &m_btnRef && m_btnRef.GetParent() != pNewParent )
+ if( pButton == m_pBtnRef && m_pBtnRef->GetParent() != pNewParent )
{
- maBtnRefPos = m_btnRef.GetPosPixel();
- maBtnRefSize = m_btnRef.GetSizePixel();
- m_btnRef.SetParent(pNewParent);
+ m_pBtnRef->SetParent(pNewParent);
}
pNewParent->Show();
}
}
-void ScTPValidationValue::RefInputDonePostHdl()
+void ScTPValidationValue::RefInputDonePostHdl()
{
- if( m_pRefEdit && m_pRefEdit->GetParent()!= this )
+ if( m_pRefEdit && m_pRefEdit->GetParent() != m_pRefGrid )
{
- m_pRefEdit->SetParent( this );
- m_pRefEdit->SetPosSizePixel( maRefEditPos, maRefEditSize );
-
- m_btnRef.SetParent( m_pRefEdit ); //if Edit SetParent but button not, the tab order will be incorrect, need button to setparent to anthor window and restore parent later in order to restore the tab order
+ m_pRefEdit->SetParent( m_pRefGrid );
+ m_pBtnRef->SetParent( m_pRefEdit ); //if Edit SetParent but button not, the tab order will be incorrect, need button to setparent to anthor window and restore parent later in order to restore the tab order
}
- if( m_btnRef.GetParent()!=this )
- {
- m_btnRef.SetParent( this );
- m_btnRef.SetPosSizePixel( maBtnRefPos, maBtnRefSize );
- }
+ if( m_pBtnRef->GetParent() != m_pRefGrid )
+ m_pBtnRef->SetParent( m_pRefGrid );
if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
pValidationDlg->get_refinput_shrink_parent()->Hide();
@@ -144,7 +159,6 @@ void ScTPValidationValue::RefInputDonePostHdl()
}
-
bool ScValidationDlg::Close()
{
if( m_bOwnRefHdlr )
@@ -295,57 +309,66 @@ bool lclGetStringListFromFormula( OUString& rStringList, const OUString& rFmlaSt
} // namespace
-ScTPValidationValue::ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet ) :
- SfxTabPage( pParent, ScResId( TP_VALIDATION_VALUES ), rArgSet ),
- maFtAllow ( this, ScResId( FT_ALLOW ) ),
- maLbAllow ( this, ScResId( LB_ALLOW ) ),
- maCbAllow ( this, ScResId( TSB_ALLOW_BLANKS ) ),
- maCbShow ( this, ScResId( CB_SHOWLIST ) ),
- maCbSort ( this, ScResId( CB_SORTLIST ) ),
- maFtValue ( this, ScResId( FT_VALUE ) ),
- maLbValue ( this, ScResId( LB_VALUE ) ),
- maFtMin ( this, ScResId( FT_MIN ) ),
- maEdMin ( this, NULL, &maFtMin, ScResId( EDT_MIN ) ),
- maEdList ( this, ScResId( EDT_LIST ) ),
- maFtMax ( this, ScResId( FT_MAX ) ),
- maEdMax ( this, NULL, &maFtMax, ScResId( EDT_MAX ) ),
- maFtHint ( this, ScResId( FT_SOURCEHINT ) ),
- maStrMin ( ScResId( SCSTR_VALID_MINIMUM ) ),
- maStrMax ( ScResId( SCSTR_VALID_MAXIMUM ) ),
- maStrValue( ScResId( SCSTR_VALID_VALUE ) ),
- maStrRange( ScResId( SCSTR_VALID_RANGE ) ),
- maStrList ( ScResId( SCSTR_VALID_LIST ) ),
- m_btnRef( this, ScResId( RB_VALIDITY_REF ) )
-{
+ScTPValidationValue::ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet )
+ : SfxTabPage( pParent, "ValidationCriteriaPage",
+ "modules/scalc/ui/validationcriteriapage.ui", rArgSet)
+ , maStrMin(ScResId(SCSTR_VALID_MINIMUM))
+ , maStrMax(ScResId(SCSTR_VALID_MAXIMUM))
+ , maStrValue(ScResId(SCSTR_VALID_VALUE))
+ , maStrRange(ScResId(SCSTR_VALID_RANGE))
+ , maStrList(ScResId(SCSTR_VALID_LIST))
+{
+ get(m_pLbAllow, "allow");
+ get(m_pCbAllow, "allowempty");
+ get(m_pCbShow, "showlist");
+ get(m_pCbSort, "sortascend");
+ get(m_pFtValue, "valueft");
+ get(m_pLbValue, "data");
+ get(m_pFtMin, "minft");
+ get(m_pMinGrid, "mingrid");
+ get(m_pEdMin, "min");
+ m_pEdMin->SetReferences(NULL, m_pFtMin);
+ get(m_pEdList, "minlist");
+ Size aSize(LogicToPixel(Size(174, 105), MAP_APPFONT));
+ m_pEdList->set_width_request(aSize.Width());
+ m_pEdList->set_height_request(aSize.Height());
+ get(m_pFtMax, "maxft");
+ get(m_pEdMax, "max");
+ m_pEdMax->SetReferences(NULL, m_pFtMax);
+ get(m_pFtHint, "hintft");
+ get(m_pBtnRef, "validref");
+ m_pBtnRef->SetParentPage(this);
+ get(m_pRefGrid, "refgrid");
+
+ //lock in the max size initial config
+ aSize = get_preferred_size();
+ set_width_request(aSize.Width());
+ set_height_request(aSize.Height());
+
Init();
- FreeResource();
// list separator in formulas
OUString aListSep = ::ScCompiler::GetNativeSymbol( ocSep );
OSL_ENSURE( aListSep.getLength() == 1, "ScTPValidationValue::ScTPValidationValue - list separator error" );
mcFmlaSep = aListSep.getLength() ? aListSep[0] : ';';
- m_btnRef.Hide(); // cell range picker
-}
-
-ScTPValidationValue::~ScTPValidationValue()
-{
+ m_pBtnRef->Hide(); // cell range picker
}
void ScTPValidationValue::Init()
{
- maLbAllow.SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
- maLbValue.SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
- maCbShow.SetClickHdl( LINK( this, ScTPValidationValue, CheckHdl ) );
+ m_pLbAllow->SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
+ m_pLbValue->SetSelectHdl( LINK( this, ScTPValidationValue, SelectHdl ) );
+ m_pCbShow->SetClickHdl( LINK( this, ScTPValidationValue, CheckHdl ) );
// cell range picker
- maEdMin.SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
- maEdMin.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
- maEdMax.SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
- m_btnRef.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
- maEdMax.SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
+ m_pEdMin->SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
+ m_pEdMin->SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
+ m_pEdMax->SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
+ m_pBtnRef->SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
+ m_pEdMax->SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillFocusHdl ) );
- maLbAllow.SelectEntryPos( SC_VALIDDLG_ALLOW_ANY );
- maLbValue.SelectEntryPos( SC_VALIDDLG_DATA_EQUAL );
+ m_pLbAllow->SelectEntryPos( SC_VALIDDLG_ALLOW_ANY );
+ m_pLbValue->SelectEntryPos( SC_VALIDDLG_DATA_EQUAL );
SelectHdl( NULL );
CheckHdl( NULL );
@@ -369,25 +392,25 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet )
if( rArgSet.GetItemState( FID_VALID_MODE, true, &pItem ) == SFX_ITEM_SET )
nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >(
static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
- maLbAllow.SelectEntryPos( nLbPos );
+ m_pLbAllow->SelectEntryPos( nLbPos );
nLbPos = SC_VALIDDLG_DATA_EQUAL;
if( rArgSet.GetItemState( FID_VALID_CONDMODE, true, &pItem ) == SFX_ITEM_SET )
nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >(
static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) );
- maLbValue.SelectEntryPos( nLbPos );
+ m_pLbValue->SelectEntryPos( nLbPos );
// *** check boxes ***
sal_Bool bCheck = sal_True;
if( rArgSet.GetItemState( FID_VALID_BLANK, true, &pItem ) == SFX_ITEM_SET )
bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue();
- maCbAllow.Check( bCheck );
+ m_pCbAllow->Check( bCheck );
sal_Int32 nListType = ValidListType::UNSORTED;
if( rArgSet.GetItemState( FID_VALID_LISTTYPE, true, &pItem ) == SFX_ITEM_SET )
nListType = static_cast< const SfxInt16Item* >( pItem )->GetValue();
- maCbShow.Check( nListType != ValidListType::INVISIBLE );
- maCbSort.Check( nListType == ValidListType::SORTEDASCENDING );
+ m_pCbShow->Check( nListType != ValidListType::INVISIBLE );
+ m_pCbSort->Check( nListType == ValidListType::SORTEDASCENDING );
// *** formulas ***
OUString aFmlaStr;
@@ -406,17 +429,17 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet )
bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet )
{
- sal_Int16 nListType = maCbShow.IsChecked() ?
- (maCbSort.IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) :
+ sal_Int16 nListType = m_pCbShow->IsChecked() ?
+ (m_pCbSort->IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) :
ValidListType::INVISIBLE;
rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
- lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) );
+ lclGetValModeFromPos( m_pLbAllow->GetSelectEntryPos() ) ) ) );
rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(
- lclGetCondModeFromPos( maLbValue.GetSelectEntryPos() ) ) ) );
+ lclGetCondModeFromPos( m_pLbValue->GetSelectEntryPos() ) ) ) );
rArgSet.Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) );
rArgSet.Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) );
- rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, maCbAllow.IsChecked() ) );
+ rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, m_pCbAllow->IsChecked() ) );
rArgSet.Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) );
return true;
}
@@ -424,40 +447,40 @@ bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet )
OUString ScTPValidationValue::GetFirstFormula() const
{
OUString aFmlaStr;
- if( maLbAllow.GetSelectEntryPos() == SC_VALIDDLG_ALLOW_LIST )
- lclGetFormulaFromStringList( aFmlaStr, maEdList.GetText(), mcFmlaSep );
+ if( m_pLbAllow->GetSelectEntryPos() == SC_VALIDDLG_ALLOW_LIST )
+ lclGetFormulaFromStringList( aFmlaStr, m_pEdList->GetText(), mcFmlaSep );
else
- aFmlaStr = maEdMin.GetText();
+ aFmlaStr = m_pEdMin->GetText();
return aFmlaStr;
}
OUString ScTPValidationValue::GetSecondFormula() const
{
- return maEdMax.GetText();
+ return m_pEdMax->GetText();
}
void ScTPValidationValue::SetFirstFormula( const OUString& rFmlaStr )
{
// try if formula is a string list, validation mode must already be set
OUString aStringList;
- if( (maLbAllow.GetSelectEntryPos() == SC_VALIDDLG_ALLOW_RANGE) &&
+ if( (m_pLbAllow->GetSelectEntryPos() == SC_VALIDDLG_ALLOW_RANGE) &&
lclGetStringListFromFormula( aStringList, rFmlaStr, mcFmlaSep ) )
{
- maEdList.SetText( aStringList );
- maEdMin.SetText( EMPTY_OUSTRING );
+ m_pEdList->SetText( aStringList );
+ m_pEdMin->SetText( EMPTY_OUSTRING );
// change validation mode to string list
- maLbAllow.SelectEntryPos( SC_VALIDDLG_ALLOW_LIST );
+ m_pLbAllow->SelectEntryPos( SC_VALIDDLG_ALLOW_LIST );
}
else
{
- maEdMin.SetText( rFmlaStr );
- maEdList.SetText( EMPTY_OUSTRING );
+ m_pEdMin->SetText( rFmlaStr );
+ m_pEdList->SetText( EMPTY_OUSTRING );
}
}
void ScTPValidationValue::SetSecondFormula( const OUString& rFmlaStr )
{
- maEdMax.SetText( rFmlaStr );
+ m_pEdMax->SetText( rFmlaStr );
}
ScValidationDlg * ScTPValidationValue::GetValidationDlg()
@@ -484,15 +507,15 @@ void ScTPValidationValue::SetupRefDlg()
Window *pLabel = NULL;
- if ( maEdMax.IsVisible() )
+ if ( m_pEdMax->IsVisible() )
{
- m_pRefEdit = &maEdMax;
- pLabel = &maFtMax;
+ m_pRefEdit = m_pEdMax;
+ pLabel = m_pFtMax;
}
- else if ( maEdMin.IsVisible() )
+ else if ( m_pEdMin->IsVisible() )
{
- m_pRefEdit = &maEdMin;
- pLabel = &maFtMin;
+ m_pRefEdit = m_pEdMin;
+ pLabel = m_pFtMin;
}
if( m_pRefEdit && !m_pRefEdit->HasFocus() )
@@ -501,7 +524,7 @@ void ScTPValidationValue::SetupRefDlg()
if( m_pRefEdit )
m_pRefEdit->SetReferences( pValidationDlg, pLabel );
- m_btnRef.SetReferences( pValidationDlg, m_pRefEdit );
+ m_pBtnRef->SetReferences( pValidationDlg, m_pRefEdit );
}
}
}
@@ -522,65 +545,14 @@ void ScTPValidationValue::RemoveRefDlg()
m_pRefEdit->SetReferences( NULL, NULL );
m_pRefEdit = NULL;
- m_btnRef.SetReferences( NULL, NULL );
-
-#if ! defined( WNT ) && !defined( _MSC_VER )
- TidyListBoxes();
-#endif
- }
- }
-}
-
-void ScTPValidationValue::TidyListBoxes()
-{
- if ( Window *pWnd = GetChild( 0 ) )
- {
- bool bFindLst = false;
- std::list<Window*> alstOrder;
-
- do{
- if( pWnd->GetParent() == this )
- {
- if ( !bFindLst )
- {
- try{
- if( dynamic_cast<ListBox*>(pWnd)||dynamic_cast<ListBox*>(pWnd->GetWindow(WINDOW_CLIENT) ) )
- bFindLst = true;
- }
- catch( ... )
- {
- if ( *(void**)pWnd == *(void**)&maLbValue )
- bFindLst = true;
- else if ( Window *pClient = pWnd->GetWindow( WINDOW_CLIENT ) )
- if ( *(void**)pClient == *(void**)&maLbValue )
- bFindLst = true;
- }
- }
-
- if ( bFindLst )
- alstOrder.push_back( pWnd->GetWindow( WINDOW_CLIENT ) );
- }
- }while( NULL != ( pWnd = pWnd->GetWindow( WINDOW_NEXT ) ) );
-
- pWnd = GetChild(0);
-
- while( std::find( alstOrder.begin(), alstOrder.end(), pWnd ) != alstOrder.end() && NULL != ( pWnd = pWnd->GetWindow( WINDOW_NEXT) ) ) ;
-
- if ( pWnd )
- {
- for ( std::list<Window*>::iterator i = alstOrder.begin(); i!=alstOrder.end(); ++i )
- {
- Window *pParent = (*i)->GetParent();
- (*i)->SetParent( pWnd );
- (*i)->SetParent( pParent );
- }
+ m_pBtnRef->SetReferences( NULL, NULL );
}
}
}
IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl)
{
- sal_uInt16 nPos=maLbAllow.GetSelectEntryPos();
+ sal_uInt16 nPos=m_pLbAllow->GetSelectEntryPos();
if ( nPos == SC_VALIDDLG_ALLOW_RANGE )
{
@@ -592,10 +564,10 @@ IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl)
IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd )
{
- if( pWnd == m_pRefEdit || pWnd == &m_btnRef )
+ if( pWnd == m_pRefEdit || pWnd == m_pBtnRef )
if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
if ( (pValidationDlg->IsActive() || pValidationDlg->IsChildFocus() ) && !pValidationDlg->IsRefInputting() )
- if( ( !m_pRefEdit || !m_pRefEdit->HasFocus()) && !m_btnRef.HasFocus() )
+ if( ( !m_pRefEdit || !m_pRefEdit->HasFocus()) && !m_pBtnRef->HasFocus() )
{
RemoveRefDlg();
}
@@ -605,61 +577,69 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd )
IMPL_LINK_NOARG(ScTPValidationValue, SelectHdl)
{
- sal_uInt16 nLbPos = maLbAllow.GetSelectEntryPos();
+ sal_uInt16 nLbPos = m_pLbAllow->GetSelectEntryPos();
bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY);
bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE);
bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST);
- maCbAllow.Enable( bEnable ); // Empty cell
- maFtValue.Enable( bEnable );
- maLbValue.Enable( bEnable );
- maFtMin.Enable( bEnable );
- maEdMin.Enable( bEnable );
- maEdList.Enable( bEnable );
- maFtMax.Enable( bEnable );
- maEdMax.Enable( bEnable );
+ m_pCbAllow->Enable( bEnable ); // Empty cell
+ m_pFtValue->Enable( bEnable );
+ m_pLbValue->Enable( bEnable );
+ m_pFtMin->Enable( bEnable );
+ m_pEdMin->Enable( bEnable );
+ m_pEdList->Enable( bEnable );
+ m_pFtMax->Enable( bEnable );
+ m_pEdMax->Enable( bEnable );
bool bShowMax = false;
if( bRange )
- maFtMin.SetText( maStrRange );
+ m_pFtMin->SetText( maStrRange );
else if( bList )
- maFtMin.SetText( maStrList );
+ m_pFtMin->SetText( maStrList );
else
{
- switch( maLbValue.GetSelectEntryPos() )
+ switch( m_pLbValue->GetSelectEntryPos() )
{
case SC_VALIDDLG_DATA_EQUAL:
- case SC_VALIDDLG_DATA_NOTEQUAL: maFtMin.SetText( maStrValue ); break;
+ case SC_VALIDDLG_DATA_NOTEQUAL: m_pFtMin->SetText( maStrValue ); break;
case SC_VALIDDLG_DATA_LESS:
- case SC_VALIDDLG_DATA_EQLESS: maFtMin.SetText( maStrMax ); break;
+ case SC_VALIDDLG_DATA_EQLESS: m_pFtMin->SetText( maStrMax ); break;
case SC_VALIDDLG_DATA_VALIDRANGE:
case SC_VALIDDLG_DATA_INVALIDRANGE: bShowMax = true; // fall through
case SC_VALIDDLG_DATA_GREATER:
- case SC_VALIDDLG_DATA_EQGREATER: maFtMin.SetText( maStrMin ); break;
+ case SC_VALIDDLG_DATA_EQGREATER: m_pFtMin->SetText( maStrMin ); break;
default:
OSL_FAIL( "ScTPValidationValue::SelectHdl - unknown condition mode" );
}
}
- maCbShow.Show( bRange || bList );
- maCbSort.Show( bRange || bList );
- maFtValue.Show( !bRange && !bList );
- maLbValue.Show( !bRange && !bList );
- maEdMin.Show( !bList );
- maEdList.Show( bList );
- maFtMax.Show( bShowMax );
- maEdMax.Show( bShowMax );
- maFtHint.Show( bRange );
- m_btnRef.Show( bRange ); // cell range picker
+ m_pCbShow->Show( bRange || bList );
+ m_pCbSort->Show( bRange || bList );
+ m_pFtValue->Show( !bRange && !bList );
+ m_pLbValue->Show( !bRange && !bList );
+ m_pEdMin->Show( !bList );
+ m_pEdList->Show( bList );
+ m_pMinGrid->set_vexpand( bList );
+ WinBits nBits = m_pFtMin->GetStyle();
+ nBits &= ~(WB_TOP | WB_VCENTER | WB_BOTTOM);
+ if (bList)
+ nBits |= WB_TOP;
+ else
+ nBits |= WB_VCENTER;
+ m_pFtMin->SetStyle( nBits );
+ m_pFtMax->Show( bShowMax );
+ m_pEdMax->Show( bShowMax );
+ m_pFtHint->Show( bRange );
+ m_pBtnRef->Show( bRange ); // cell range picker
return 0;
}
IMPL_LINK_NOARG(ScTPValidationValue, CheckHdl)
{
- maCbSort.Enable( maCbShow.IsChecked() );
+ m_pCbSort->Enable( m_pCbShow->IsChecked() );
return 0;
}
@@ -921,9 +901,14 @@ bool ScValidationDlg::RemoveRefDlg( bool bRestoreModal /* = true */ )
return true;
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScRefButtonEx(Window *pParent, VclBuilder::stringmap &)
+{
+ return new ScTPValidationValue::ScRefButtonEx(pParent, 0);
+}
+
void ScTPValidationValue::ScRefButtonEx::Click()
{
- if( ScTPValidationValue *pParent = dynamic_cast< ScTPValidationValue*>( GetParent() ) )
+ if( ScTPValidationValue *pParent = GetParentPage() )
pParent->OnClick( this );
formula::RefButton::Click();
@@ -931,7 +916,7 @@ void ScTPValidationValue::ScRefButtonEx::Click()
void ScTPValidationValue::OnClick( Button *pBtn )
{
- if( pBtn == &m_btnRef )
+ if( pBtn == m_pBtnRef )
SetupRefDlg();
}
diff --git a/sc/source/ui/dbgui/validate.src b/sc/source/ui/dbgui/validate.src
deleted file mode 100644
index aa24552ff639..000000000000
--- a/sc/source/ui/dbgui/validate.src
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sfx2/tabpage.hrc>
-
-#include "validate.hrc"
-
-#define OFFSET_X 30
-
-TabPage TP_VALIDATION_VALUES
-{
- HelpID = "sc:TabPage:TP_VALIDATION_VALUES";
- Hide = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Text [ en-US ] = "Values" ;
- FixedText FT_ALLOW
- {
- Pos = MAP_APPFONT ( 6 , 16 ) ;
- Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
- Text [ en-US ] = "~Allow" ;
- };
- ListBox LB_ALLOW
- {
- HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_ALLOW";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 14 ) ;
- Size = MAP_APPFONT ( 90 , 80 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "All values" ; SC_VALIDDLG_ALLOW_ANY ; > ;
- < "Whole Numbers" ; SC_VALIDDLG_ALLOW_WHOLE ; > ;
- < "Decimal" ; SC_VALIDDLG_ALLOW_DECIMAL ; > ;
- < "Date" ; SC_VALIDDLG_ALLOW_DATE ; > ;
- < "Time" ; SC_VALIDDLG_ALLOW_TIME ; > ;
- < "Cell range" ; SC_VALIDDLG_ALLOW_RANGE ; > ;
- < "List" ; SC_VALIDDLG_ALLOW_LIST ; > ;
- < "Text length" ; SC_VALIDDLG_ALLOW_TEXTLEN ; > ;
- };
- };
- FixedText FT_VALUE
- {
- Pos = MAP_APPFONT ( 6 , 58 ) ;
- Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
- Text [ en-US ] = "~Data" ;
- };
- ListBox LB_VALUE
- {
- HelpID = "sc:ListBox:TP_VALIDATION_VALUES:LB_VALUE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 56 ) ;
- Size = MAP_APPFONT ( 90 , 90 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- // Reihenfolge entspricht enum ScConditionMode
- StringList [ en-US ] =
- {
- < "equal" ; SC_VALIDDLG_DATA_EQUAL ; > ;
- < "less than" ; SC_VALIDDLG_DATA_LESS ; > ;
- < "greater than" ; SC_VALIDDLG_DATA_GREATER ; > ;
- < "less than or equal" ; SC_VALIDDLG_DATA_EQLESS ; > ;
- < "greater than or equal to" ; SC_VALIDDLG_DATA_EQGREATER ; > ;
- < "not equal" ; SC_VALIDDLG_DATA_NOTEQUAL ; > ;
- < "valid range" ; SC_VALIDDLG_DATA_VALIDRANGE ; > ;
- < "invalid range" ; SC_VALIDDLG_DATA_INVALIDRANGE ; > ;
- };
- };
- FixedText FT_MIN
- {
- Pos = MAP_APPFONT ( 6 , 76 ) ;
- Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
- Text [ en-US ] = "~Minimum" ;
- };
- Edit EDT_MIN
- {
- HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MIN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
- Size = MAP_APPFONT ( 90 , 12 ) ;
- TabStop = TRUE ;
- };
- MultiLineEdit EDT_LIST
- {
- HelpID = "sc:MultiLineEdit:TP_VALIDATION_VALUES:EDT_LIST";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 74 ) ;
- Size = MAP_APPFONT ( 174 + OFFSET_X , 105 ) ;
- VScroll = TRUE ;
- IgnoreTab = TRUE ;
- };
- FixedText FT_MAX
- {
- Pos = MAP_APPFONT ( 6 , 92 ) ;
- Size = MAP_APPFONT ( 70 - OFFSET_X , 8 ) ;
- Text [ en-US ] = "Ma~ximum" ;
- };
- Edit EDT_MAX
- {
- HelpID = "sc:Edit:TP_VALIDATION_VALUES:EDT_MAX";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 90 ) ;
- Size = MAP_APPFONT ( 90 , 12 ) ;
- TabStop = TRUE ;
- };
- CheckBox TSB_ALLOW_BLANKS
- {
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 30 ) ;
- Size = MAP_APPFONT ( 174 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Allow ~empty cells" ;
- };
- CheckBox CB_SHOWLIST
- {
- Pos = MAP_APPFONT ( 80 - OFFSET_X , 44 ) ;
- Size = MAP_APPFONT ( 174 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Show selection ~list" ;
- };
- CheckBox CB_SORTLIST
- {
- Pos = MAP_APPFONT ( 90 - OFFSET_X , 58 ) ;
- Size = MAP_APPFONT ( 164 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Sor~t entries ascending" ;
- };
- FixedText FT_SOURCEHINT
- {
- Pos = MAP_APPFONT ( 80 , 90 ) ;
- Size = MAP_APPFONT ( 174 , 64 ) ;
- WordBreak = TRUE ;
- Text [ en-US ] = "A valid source can only consist of a contiguous selection of rows and columns, or a formula that results in an area or array.";
- };
- ImageButton RB_VALIDITY_REF
- {
- HelpID = "sc:ImageButton:TP_VALIDATION_VALUES:RB_VALIDITY_REF";
- Pos = MAP_APPFONT ( 142 , 73 ) ;
- Size = MAP_APPFONT ( 13 , 14 ) ;
- TabStop = TRUE ;
- QuickHelpText [ en-US ] = "Shrink" ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/validate.hrc b/sc/source/ui/inc/validate.hrc
deleted file mode 100644
index 38362d1577a1..000000000000
--- a/sc/source/ui/inc/validate.hrc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#define TP_VALIDATION_VALUES 696
-
-#define FT_ALLOW 1
-#define LB_ALLOW 2
-#define TSB_ALLOW_BLANKS 3
-#define FT_VALUE 4
-#define LB_VALUE 5
-#define FT_MIN 6
-#define EDT_MIN 7
-#define FT_MAX 8
-#define EDT_MAX 9
-
-#define CB_SHOWLIST 27
-#define CB_SORTLIST 28
-#define EDT_LIST 29
-#define FT_SOURCEHINT 30
-#define RB_VALIDITY_REF 88
-
-/* Position indexes for "Allow" list box.
- They do not map directly to ScValidationMode and can safely be modified to
- change the order of the list box entries. */
-#define SC_VALIDDLG_ALLOW_ANY 0
-#define SC_VALIDDLG_ALLOW_WHOLE 1
-#define SC_VALIDDLG_ALLOW_DECIMAL 2
-#define SC_VALIDDLG_ALLOW_DATE 3
-#define SC_VALIDDLG_ALLOW_TIME 4
-#define SC_VALIDDLG_ALLOW_RANGE 5
-#define SC_VALIDDLG_ALLOW_LIST 6
-#define SC_VALIDDLG_ALLOW_TEXTLEN 7
-
-/* Position indexes for "Data" list box.
- They do not map directly to ScConditionMode and can safely be modified to
- change the order of the list box entries. */
-#define SC_VALIDDLG_DATA_EQUAL 0
-#define SC_VALIDDLG_DATA_LESS 1
-#define SC_VALIDDLG_DATA_GREATER 2
-#define SC_VALIDDLG_DATA_EQLESS 3
-#define SC_VALIDDLG_DATA_EQGREATER 4
-#define SC_VALIDDLG_DATA_NOTEQUAL 5
-#define SC_VALIDDLG_DATA_VALIDRANGE 6
-#define SC_VALIDDLG_DATA_INVALIDRANGE 7
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index c33a890a13f5..c27a52fffdb4 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -179,7 +179,6 @@ class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage
{
public:
explicit ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet );
- virtual ~ScTPValidationValue();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rArgSet );
static sal_uInt16* GetRanges();
@@ -199,19 +198,19 @@ private:
DECL_LINK(SelectHdl, void *);
DECL_LINK(CheckHdl, void *);
- FixedText maFtAllow;
- ListBox maLbAllow;
- CheckBox maCbAllow; /// Allow blank cells.
- CheckBox maCbShow; /// Show selection list in cell.
- CheckBox maCbSort; /// Sort selection list in cell.
- FixedText maFtValue;
- ListBox maLbValue;
- FixedText maFtMin;
- formula::RefEdit maEdMin;
- VclMultiLineEdit maEdList; /// Entries for explicit list
- FixedText maFtMax;
- formula::RefEdit maEdMax;
- FixedText maFtHint; /// Hint text for cell range validity.
+ ListBox* m_pLbAllow;
+ CheckBox* m_pCbAllow; /// Allow blank cells.
+ CheckBox* m_pCbShow; /// Show selection list in cell.
+ CheckBox* m_pCbSort; /// Sort selection list in cell.
+ FixedText* m_pFtValue;
+ ListBox* m_pLbValue;
+ FixedText* m_pFtMin;
+ VclContainer* m_pMinGrid;
+ formula::RefEdit* m_pEdMin;
+ VclMultiLineEdit* m_pEdList; /// Entries for explicit list
+ FixedText* m_pFtMax;
+ formula::RefEdit* m_pEdMax;
+ FixedText* m_pFtHint; /// Hint text for cell range validity.
OUString maStrMin;
OUString maStrMax;
@@ -220,33 +219,39 @@ private:
OUString maStrList;
sal_Unicode mcFmlaSep; /// List separator in formulas.
- Point maRefEditPos;
- Point maBtnRefPos;
- Size maRefEditSize;
- Size maBtnRefSize;
-
DECL_LINK(EditSetFocusHdl, void *);
DECL_LINK( KillFocusHdl, Window *);
void OnClick( Button *pBtn );
formula::RefEdit* m_pRefEdit;
- class ScRefButtonEx:public ::formula::RefButton
+public:
+ class ScRefButtonEx : public ::formula::RefButton
{
- void Click() SAL_OVERRIDE;
+ ScTPValidationValue* m_pPage;
+ virtual void Click() SAL_OVERRIDE;
public:
- ScRefButtonEx( Window* pParent, const ResId& rResId, formula::RefEdit* pEdit = NULL,
- ScRefHandler *pRefHdlr = NULL )
- : ::formula::RefButton( pParent, rResId, pEdit, pRefHdlr )
+ ScRefButtonEx(Window* pParent, WinBits nStyle)
+ : ::formula::RefButton(pParent, nStyle)
+ , m_pPage(NULL)
+ {
+ }
+ void SetParentPage(ScTPValidationValue *pPage)
{
+ m_pPage = pPage;
}
- }m_btnRef;
+ ScTPValidationValue* GetParentPage()
+ {
+ return m_pPage;
+ }
+ };
+private:
+ ScRefButtonEx* m_pBtnRef;
+ VclContainer* m_pRefGrid;
friend class ScRefButtonEx;
void SetReferenceHdl( const ScRange& , ScDocument* );
void SetActiveHdl();
void RefInputStartPreHdl( formula::RefEdit* pEdit, formula::RefButton* pButton );
void RefInputDonePostHdl();
ScValidationDlg * GetValidationDlg();
-
- void TidyListBoxes();
public:
sal_uInt16 GetAllowEntryPos();
OUString GetMinText();
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index b3e1de0781a0..44fdbed9e6fb 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -52,7 +52,6 @@
#include "validat.hxx"
#include "scresid.hxx"
-#include "validate.hrc"
#include "scui_def.hxx"
#include "scabstdlg.hxx"
#include "impex.hxx"
@@ -787,7 +786,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- ::GetTabPageRanges ScTPValidationValueGetRanges = pFact->GetTabPageRangesFunc(TP_VALIDATION_VALUES);
+ ::GetTabPageRanges ScTPValidationValueGetRanges = pFact->GetTabPageRangesFunc();
OSL_ENSURE(ScTPValidationValueGetRanges, "TabPage create fail!");
SfxItemSet aArgSet( GetPool(), (*ScTPValidationValueGetRanges)() );
ScValidationMode eMode = SC_VALID_ANY;
diff --git a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
index deb025f6ba7b..3af1f1966063 100644
--- a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
+++ b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui
@@ -119,7 +119,7 @@
</packing>
</child>
<child>
- <object class="scuilo-ScPivotLayoutTreeList" id="listbox-column">
+ <object class="sclo-ScPivotLayoutTreeList" id="listbox-column">
<property name="width_request">200</property>
<property name="height_request">100</property>
<property name="visible">True</property>
@@ -173,7 +173,7 @@
</packing>
</child>
<child>
- <object class="scuilo-ScPivotLayoutTreeListData" id="listbox-data">
+ <object class="sclo-ScPivotLayoutTreeListData" id="listbox-data">
<property name="width_request">240</property>
<property name="height_request">120</property>
<property name="visible">True</property>
@@ -225,7 +225,7 @@
</packing>
</child>
<child>
- <object class="scuilo-ScPivotLayoutTreeList" id="listbox-row">
+ <object class="sclo-ScPivotLayoutTreeList" id="listbox-row">
<property name="width_request">180</property>
<property name="height_request">100</property>
<property name="visible">True</property>
@@ -276,7 +276,7 @@
</packing>
</child>
<child>
- <object class="scuilo-ScPivotLayoutTreeList" id="listbox-page">
+ <object class="sclo-ScPivotLayoutTreeList" id="listbox-page">
<property name="width_request">200</property>
<property name="height_request">100</property>
<property name="visible">True</property>
@@ -338,7 +338,7 @@
</packing>
</child>
<child>
- <object class="scuilo-ScPivotLayoutTreeListLabel" id="listbox-fields">
+ <object class="sclo-ScPivotLayoutTreeListLabel" id="listbox-fields">
<property name="width_request">180</property>
<property name="height_request">150</property>
<property name="visible">True</property>
diff --git a/sc/uiconfig/scalc/ui/validationcriteriapage.ui b/sc/uiconfig/scalc/ui/validationcriteriapage.ui
new file mode 100644
index 000000000000..223e19d17372
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/validationcriteriapage.ui
@@ -0,0 +1,371 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name gint1 -->
+ <column type="gint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">All values</col>
+ <col id="1">0</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Whole Numbers</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Decimal</col>
+ <col id="1">2</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Date</col>
+ <col id="1">3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Time</col>
+ <col id="1">4</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Cell range</col>
+ <col id="1">5</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">List</col>
+ <col id="1">6</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Text length</col>
+ <col id="1">7</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore2">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name gint1 -->
+ <column type="gint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">equal</col>
+ <col id="1">0</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">less than</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">greater than</col>
+ <col id="1">2</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">less than or equal</col>
+ <col id="1">3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">greater than or equal to</col>
+ <col id="1">4</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">not equal</col>
+ <col id="1">5</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">valid range</col>
+ <col id="1">6</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">invalid range</col>
+ <col id="1">7</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkGrid" id="ValidationCriteriaPage">
+ <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="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Allow</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">allow</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="valueft">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Data</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">data</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="allow">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststore1</property>
+ </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>
+ <child>
+ <object class="GtkComboBox" id="data">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="model">liststore2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="minft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Minimum</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">mingrid</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="mingrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <child>
+ <object class="GtkGrid" id="refgrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="foruilo-RefEdit" id="min">
+ <property name="can_focus">True</property>
+ <property name="no_show_all">True</property>
+ <property name="hexpand">True</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="scuilo-ScRefButtonEx" id="validref">
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ </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>
+ <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="GtkScrolledWindow" id="scrolledwindow2">
+ <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="minlist: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">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="maxft">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Ma_ximum</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">max</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="allowempty">
+ <property name="label" translatable="yes">Allow _empty cells</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="showlist">
+ <property name="label" translatable="yes">Show selection _list</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="sortascend">
+ <property name="label" translatable="yes">Sor_t entries ascending</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_left">12</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="hintft">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">A valid source can only consist of a contiguous selection of rows and columns, or a formula that results in an area or array.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">50</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="foruilo-RefEdit" id="max">
+ <property name="can_focus">True</property>
+ <property name="no_show_all">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="label1"/>
+ <widget name="valueft"/>
+ <widget name="minft"/>
+ <widget name="maxft"/>
+ </widgets>
+ </object>
+</interface>