summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/sfiltdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/dbgui/sfiltdlg.cxx')
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx67
1 files changed, 36 insertions, 31 deletions
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index e7bfecfdea3d..e0fcb9936c96 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -71,8 +71,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
: ScAnyRefDlg ( pB, pCW, pParent, RID_SCDLG_SPEC_FILTER ),
//
- aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aFtFilterArea ( this, ScResId( FT_CRITERIA_AREA ) ),
+ aLbFilterArea ( this, ScResId( LB_CRITERIA_AREA ) ),
aEdFilterArea ( this, this, ScResId( ED_CRITERIA_AREA ) ),
aRbFilterArea ( this, ScResId( RB_CRITERIA_AREA ), &aEdFilterArea, this ),
//
@@ -91,7 +91,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
pViewData ( NULL ),
pDoc ( NULL ),
pRefInputEdit ( NULL ),
- bRefInputMode ( FALSE ),
+ bRefInputMode ( false ),
pTimer ( NULL )
{
Init( rArgSet );
@@ -104,6 +104,11 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
pTimer->SetTimeout( 50 ); // 50ms warten
pTimer->SetTimeoutHdl( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
pTimer->Start();
+
+ aLbCopyArea.SetAccessibleName(aBtnCopyResult.GetText());
+ aEdCopyArea.SetAccessibleName(aBtnCopyResult.GetText());
+ aLbCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
+ aEdCopyArea.SetAccessibleRelationLabeledBy(&aBtnCopyResult);
}
@@ -111,8 +116,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi
ScSpecialFilterDlg::~ScSpecialFilterDlg()
{
- USHORT nEntries = aLbFilterArea.GetEntryCount();
- USHORT i;
+ sal_uInt16 nEntries = aLbFilterArea.GetEntryCount();
+ sal_uInt16 i;
for ( i=1; i<nEntries; i++ )
delete (String*)aLbFilterArea.GetEntryData( i );
@@ -156,7 +161,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
if (!pRangeNames->empty())
{
ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end();
- USHORT nInsert = 0;
+ sal_uInt16 nInsert = 0;
for (; itr != itrEnd; ++itr)
{
if (!itr->HasType(RT_CRITERIA))
@@ -205,19 +210,19 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
aStrUndefined );
// Spezialfilter braucht immer Spaltenkoepfe
- aBtnHeader.Check(TRUE);
+ aBtnHeader.Check(true);
aBtnHeader.Disable();
// Modal-Modus einschalten
-// SetDispatcherLock( TRUE );
+// SetDispatcherLock( sal_True );
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg
}
//----------------------------------------------------------------------------
-BOOL ScSpecialFilterDlg::Close()
+sal_Bool ScSpecialFilterDlg::Close()
{
if (pViewData)
pViewData->GetDocShell()->CancelAutoDBRange();
@@ -290,7 +295,7 @@ ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam,
//----------------------------------------------------------------------------
-BOOL ScSpecialFilterDlg::IsRefInputMode() const
+sal_Bool ScSpecialFilterDlg::IsRefInputMode() const
{
return bRefInputMode;
}
@@ -310,8 +315,8 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
String theAreaStr( aEdFilterArea.GetText() );
ScQueryParam theOutParam( theQueryData );
ScAddress theAdrCopy;
- BOOL bEditInputOk = TRUE;
- BOOL bQueryOk = FALSE;
+ sal_Bool bEditInputOk = sal_True;
+ sal_Bool bQueryOk = false;
ScRange theFilterArea;
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
@@ -322,28 +327,28 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( STRING_NOTFOUND != nColonPos )
theCopyStr.Erase( nColonPos );
- USHORT nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
+ sal_uInt16 nResult = theAdrCopy.Parse( theCopyStr, pDoc, eConv );
if ( SCA_VALID != (nResult & SCA_VALID) )
{
if ( !aBtnMore.GetState() )
- aBtnMore.SetState( TRUE );
+ aBtnMore.SetState( sal_True );
ERRORBOX( STR_INVALID_TABREF );
aEdCopyArea.GrabFocus();
- bEditInputOk = FALSE;
+ bEditInputOk = false;
}
}
if ( bEditInputOk )
{
- USHORT nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
+ sal_uInt16 nResult = ScRange().Parse( theAreaStr, pDoc, eConv );
if ( SCA_VALID != (nResult & SCA_VALID) )
{
ERRORBOX( STR_INVALID_TABREF );
aEdFilterArea.GrabFocus();
- bEditInputOk = FALSE;
+ bEditInputOk = false;
}
}
@@ -355,7 +360,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
* ein ScQueryParam zu erzeugen:
*/
- USHORT nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
+ sal_uInt16 nResult = theFilterArea.Parse( theAreaStr, pDoc, eConv );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
@@ -364,21 +369,21 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( aBtnCopyResult.IsChecked() )
{
- theOutParam.bInplace = FALSE;
+ theOutParam.bInplace = false;
theOutParam.nDestTab = theAdrCopy.Tab();
theOutParam.nDestCol = theAdrCopy.Col();
theOutParam.nDestRow = theAdrCopy.Row();
}
else
{
- theOutParam.bInplace = TRUE;
+ theOutParam.bInplace = sal_True;
theOutParam.nDestTab = 0;
theOutParam.nDestCol = 0;
theOutParam.nDestRow = 0;
}
theOutParam.bHasHeader = aBtnHeader.IsChecked();
- theOutParam.bByRow = TRUE;
+ theOutParam.bByRow = sal_True;
theOutParam.bCaseSens = aBtnCase.IsChecked();
theOutParam.bRegExp = aBtnRegExp.IsChecked();
theOutParam.bDuplicate = !aBtnUnique.IsChecked();
@@ -398,7 +403,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( bQueryOk && theOutParam.GetEntryCount() > MAXQUERY &&
theOutParam.GetEntry(MAXQUERY).bDoQuery )
{
- bQueryOk = FALSE; // zu viele
+ bQueryOk = false; // zu viele
//! andere Fehlermeldung ??
}
}
@@ -406,7 +411,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn )
if ( bQueryOk )
{
- SetDispatcherLock( FALSE );
+ SetDispatcherLock( false );
SwitchToDocument();
GetBindings().GetDispatcher()->Execute( FID_FILTER_OK,
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
@@ -438,17 +443,17 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pTimer )
if( aEdCopyArea.HasFocus() || aRbCopyArea.HasFocus() )
{
pRefInputEdit = &aEdCopyArea;
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
else if( aEdFilterArea.HasFocus() || aRbFilterArea.HasFocus() )
{
pRefInputEdit = &aEdFilterArea;
- bRefInputMode = TRUE;
+ bRefInputMode = sal_True;
}
else if( bRefInputMode )
{
pRefInputEdit = NULL;
- bRefInputMode = FALSE;
+ bRefInputMode = false;
}
}
@@ -465,7 +470,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb )
if ( pLb == &aLbFilterArea )
{
String aString;
- USHORT nSelPos = aLbFilterArea.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aLbFilterArea.GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *(String*)aLbFilterArea.GetEntryData( nSelPos );
@@ -486,14 +491,14 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd )
if ( pDoc && pViewData )
{
String theCurAreaStr = pEd->GetText();
- USHORT nResult = ScRange().Parse( theCurAreaStr, pDoc );
+ sal_uInt16 nResult = ScRange().Parse( theCurAreaStr, pDoc );
if ( SCA_VALID == (nResult & SCA_VALID) )
{
String* pStr = NULL;
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = aLbFilterArea.GetEntryCount();
+ sal_Bool bFound = false;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = aLbFilterArea.GetEntryCount();
for ( i=1; i<nCount && !bFound; i++ )
{