summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/pfiltdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/dbgui/pfiltdlg.cxx')
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx220
1 files changed, 110 insertions, 110 deletions
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index d590ffb83457..4dec09c0faa1 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,54 +56,54 @@
//==================================================================
-ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent,
- const SfxItemSet& rArgSet,
- SCTAB nSourceTab )
+ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent,
+ const SfxItemSet& rArgSet,
+ SCTAB nSourceTab )
- : ModalDialog ( pParent, ScResId( RID_SCDLG_PIVOTFILTER ) ),
+ : ModalDialog ( pParent, ScResId( RID_SCDLG_PIVOTFILTER ) ),
//
aFlCriteria ( this, ScResId( FL_CRITERIA ) ),
- aLbField1 ( this, ScResId( LB_FIELD1 ) ),
- aLbCond1 ( this, ScResId( LB_COND1 ) ),
- aEdVal1 ( this, ScResId( ED_VAL1 ) ),
- aLbConnect1 ( this, ScResId( LB_OP1 ) ),
- aLbField2 ( this, ScResId( LB_FIELD2 ) ),
- aLbCond2 ( this, ScResId( LB_COND2 ) ),
- aEdVal2 ( this, ScResId( ED_VAL2 ) ),
- aLbConnect2 ( this, ScResId( LB_OP2 ) ),
- aLbField3 ( this, ScResId( LB_FIELD3 ) ),
- aLbCond3 ( this, ScResId( LB_COND3 ) ),
- aEdVal3 ( this, ScResId( ED_VAL3 ) ),
- aFtConnect ( this, ScResId( FT_OP ) ),
- aFtField ( this, ScResId( FT_FIELD ) ),
- aFtCond ( this, ScResId( FT_COND ) ),
- aFtVal ( this, ScResId( FT_VAL ) ),
+ aLbField1 ( this, ScResId( LB_FIELD1 ) ),
+ aLbCond1 ( this, ScResId( LB_COND1 ) ),
+ aEdVal1 ( this, ScResId( ED_VAL1 ) ),
+ aLbConnect1 ( this, ScResId( LB_OP1 ) ),
+ aLbField2 ( this, ScResId( LB_FIELD2 ) ),
+ aLbCond2 ( this, ScResId( LB_COND2 ) ),
+ aEdVal2 ( this, ScResId( ED_VAL2 ) ),
+ aLbConnect2 ( this, ScResId( LB_OP2 ) ),
+ aLbField3 ( this, ScResId( LB_FIELD3 ) ),
+ aLbCond3 ( this, ScResId( LB_COND3 ) ),
+ aEdVal3 ( this, ScResId( ED_VAL3 ) ),
+ aFtConnect ( this, ScResId( FT_OP ) ),
+ aFtField ( this, ScResId( FT_FIELD ) ),
+ aFtCond ( this, ScResId( FT_COND ) ),
+ aFtVal ( this, ScResId( FT_VAL ) ),
aFlOptions ( this, ScResId( FL_OPTIONS ) ),
- aBtnCase ( this, ScResId( BTN_CASE ) ),
- aBtnRegExp ( this, ScResId( BTN_REGEXP ) ),
- aBtnUnique ( this, ScResId( BTN_UNIQUE ) ),
- aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ),
- aFtDbArea ( this, ScResId( FT_DBAREA ) ),
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) ),
- aBtnMore ( this, ScResId( BTN_MORE ) ),
- aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
- aStrNoName ( ScGlobal::GetRscString(STR_DB_NONAME) ),
- aStrNone ( ScResId( SCSTR_NONE ) ),
- aStrEmpty ( ScResId( SCSTR_EMPTY ) ),
- aStrNotEmpty ( ScResId( SCSTR_NOTEMPTY ) ),
- aStrRow ( ScResId( SCSTR_ROW ) ),
- aStrColumn ( ScResId( SCSTR_COLUMN ) ),
+ aBtnCase ( this, ScResId( BTN_CASE ) ),
+ aBtnRegExp ( this, ScResId( BTN_REGEXP ) ),
+ aBtnUnique ( this, ScResId( BTN_UNIQUE ) ),
+ aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ),
+ aFtDbArea ( this, ScResId( FT_DBAREA ) ),
+ aBtnOk ( this, ScResId( BTN_OK ) ),
+ aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
+ aBtnHelp ( this, ScResId( BTN_HELP ) ),
+ aBtnMore ( this, ScResId( BTN_MORE ) ),
+ aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ),
+ aStrNoName ( ScGlobal::GetRscString(STR_DB_NONAME) ),
+ aStrNone ( ScResId( SCSTR_NONE ) ),
+ aStrEmpty ( ScResId( SCSTR_EMPTY ) ),
+ aStrNotEmpty ( ScResId( SCSTR_NOTEMPTY ) ),
+ aStrRow ( ScResId( SCSTR_ROW ) ),
+ aStrColumn ( ScResId( SCSTR_COLUMN ) ),
//
- nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ),
- theQueryData ( ((const ScQueryItem&)
+ nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ),
+ theQueryData ( ((const ScQueryItem&)
rArgSet.Get( nWhichQuery )).GetQueryData() ),
- pOutItem ( NULL ),
- pViewData ( NULL ),
- pDoc ( NULL ),
- nSrcTab ( nSourceTab ), // ist nicht im QueryParam
- nFieldCount ( 0 )
+ pOutItem ( NULL ),
+ pViewData ( NULL ),
+ pDoc ( NULL ),
+ nSrcTab ( nSourceTab ), // ist nicht im QueryParam
+ nFieldCount ( 0 )
{
for (USHORT i=0; i<=MAXCOL; i++)
pEntryLists[i] = NULL;
@@ -130,11 +130,11 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
const ScQueryItem& rQueryItem = (const ScQueryItem&)
rArgSet.Get( nWhichQuery );
- aBtnCase.SetClickHdl ( LINK( this, ScPivotFilterDlg, CheckBoxHdl ) );
+ aBtnCase.SetClickHdl ( LINK( this, ScPivotFilterDlg, CheckBoxHdl ) );
- aLbField1.SetSelectHdl ( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
- aLbField2.SetSelectHdl ( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
- aLbField3.SetSelectHdl ( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
+ aLbField1.SetSelectHdl ( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
+ aLbField2.SetSelectHdl ( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
+ aLbField3.SetSelectHdl ( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
aLbConnect1.SetSelectHdl( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
aLbConnect2.SetSelectHdl( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
@@ -145,36 +145,36 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
aBtnMore.AddWindow( &aFtDbArea );
aBtnMore.AddWindow( &aFlOptions );
- aBtnCase .Check( theQueryData.bCaseSens );
- aBtnRegExp .Check( theQueryData.bRegExp );
- aBtnUnique .Check( !theQueryData.bDuplicate );
+ aBtnCase .Check( theQueryData.bCaseSens );
+ aBtnRegExp .Check( theQueryData.bRegExp );
+ aBtnUnique .Check( !theQueryData.bDuplicate );
- pViewData = rQueryItem.GetViewData();
- pDoc = pViewData ? pViewData->GetDocument() : NULL;
+ pViewData = rQueryItem.GetViewData();
+ pDoc = pViewData ? pViewData->GetDocument() : NULL;
// fuer leichteren Zugriff:
- aFieldLbArr [0] = &aLbField1;
- aFieldLbArr [1] = &aLbField2;
- aFieldLbArr [2] = &aLbField3;
- aValueEdArr [0] = &aEdVal1;
- aValueEdArr [1] = &aEdVal2;
- aValueEdArr [2] = &aEdVal3;
- aCondLbArr [0] = &aLbCond1;
- aCondLbArr [1] = &aLbCond2;
- aCondLbArr [2] = &aLbCond3;
+ aFieldLbArr [0] = &aLbField1;
+ aFieldLbArr [1] = &aLbField2;
+ aFieldLbArr [2] = &aLbField3;
+ aValueEdArr [0] = &aEdVal1;
+ aValueEdArr [1] = &aEdVal2;
+ aValueEdArr [2] = &aEdVal3;
+ aCondLbArr [0] = &aLbCond1;
+ aCondLbArr [1] = &aLbCond2;
+ aCondLbArr [2] = &aLbCond3;
if ( pViewData && pDoc )
{
- String theAreaStr;
- ScRange theCurArea ( ScAddress( theQueryData.nCol1,
+ String theAreaStr;
+ ScRange theCurArea ( ScAddress( theQueryData.nCol1,
theQueryData.nRow1,
nSrcTab ),
ScAddress( theQueryData.nCol2,
theQueryData.nRow2,
nSrcTab ) );
- ScDBCollection* pDBColl = pDoc->GetDBCollection();
- String theDbArea;
- String theDbName = aStrNoName;
+ ScDBCollection* pDBColl = pDoc->GetDBCollection();
+ String theDbArea;
+ String theDbName = aStrNoName;
/*
* Ueberpruefen, ob es sich bei dem uebergebenen
@@ -185,9 +185,9 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
if ( pDBColl )
{
- ScAddress& rStart = theCurArea.aStart;
- ScAddress& rEnd = theCurArea.aEnd;
- ScDBData* pDBData = pDBColl->GetDBAtArea( rStart.Tab(),
+ ScAddress& rStart = theCurArea.aStart;
+ ScAddress& rEnd = theCurArea.aEnd;
+ ScDBData* pDBData = pDBColl->GetDBAtArea( rStart.Tab(),
rStart.Col(), rStart.Row(),
rEnd.Col(), rEnd.Row() );
if ( pDBData )
@@ -214,7 +214,7 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
{
ScQueryEntry& rEntry = theQueryData.GetEntry(i);
- String aValStr = *rEntry.pStr;
+ String aValStr = *rEntry.pStr;
if (!rEntry.bQueryByString && aValStr == EMPTY_STRING)
{
if (rEntry.nVal == SC_EMPTYFIELDS)
@@ -222,8 +222,8 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
else if (rEntry.nVal == SC_NONEMPTYFIELDS)
aValStr = aStrNotEmpty;
}
- USHORT nCondPos = (USHORT)rEntry.eOp;
- USHORT nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
+ USHORT nCondPos = (USHORT)rEntry.eOp;
+ USHORT nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) );
aFieldLbArr[i]->SelectEntryPos( nFieldSelPos );
aCondLbArr [i]->SelectEntryPos( nCondPos );
@@ -296,13 +296,13 @@ void ScPivotFilterDlg::FillFieldLists()
if ( pDoc )
{
- String aFieldName;
- SCTAB nTab = nSrcTab;
- SCCOL nFirstCol = theQueryData.nCol1;
- SCROW nFirstRow = theQueryData.nRow1;
- SCCOL nMaxCol = theQueryData.nCol2;
- SCCOL col = 0;
- USHORT i=1;
+ String aFieldName;
+ SCTAB nTab = nSrcTab;
+ SCCOL nFirstCol = theQueryData.nCol1;
+ SCROW nFirstRow = theQueryData.nRow1;
+ SCCOL nMaxCol = theQueryData.nCol2;
+ SCCOL col = 0;
+ USHORT i=1;
for ( col=nFirstCol; col<=nMaxCol; col++ )
{
@@ -328,10 +328,10 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
{
if ( pDoc && nList>0 && nList<=3 )
{
- ComboBox* pValList = aValueEdArr[nList-1];
- USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
- USHORT nListPos = 0;
- String aCurValue = pValList->GetText();
+ ComboBox* pValList = aValueEdArr[nList-1];
+ USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos();
+ USHORT nListPos = 0;
+ String aCurValue = pValList->GetText();
pValList->Clear();
pValList->InsertEntry( aStrNotEmpty, 0 );
@@ -345,9 +345,9 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList )
{
WaitObject aWaiter( this );
- SCTAB nTab = nSrcTab;
- SCROW nFirstRow = theQueryData.nRow1;
- SCROW nLastRow = theQueryData.nRow2;
+ SCTAB nTab = nSrcTab;
+ SCROW nFirstRow = theQueryData.nRow1;
+ SCROW nLastRow = theQueryData.nRow2;
nFirstRow++;
bool bHasDates = false;
@@ -400,14 +400,14 @@ USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
{
- ScQueryParam theParam( theQueryData );
- USHORT nConnect1 = aLbConnect1.GetSelectEntryPos();
- USHORT nConnect2 = aLbConnect2.GetSelectEntryPos();
+ ScQueryParam theParam( theQueryData );
+ USHORT nConnect1 = aLbConnect1.GetSelectEntryPos();
+ USHORT nConnect2 = aLbConnect2.GetSelectEntryPos();
for ( SCSIZE i=0; i<3; i++ )
{
- USHORT nField = aFieldLbArr[i]->GetSelectEntryPos();
- ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos();
+ USHORT nField = aFieldLbArr[i]->GetSelectEntryPos();
+ ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos();
BOOL bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0);
theParam.GetEntry(i).bDoQuery = bDoThis;
@@ -425,26 +425,26 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
*/
if ( aStrVal == aStrEmpty )
{
- *rEntry.pStr = EMPTY_STRING;
- rEntry.nVal = SC_EMPTYFIELDS;
+ *rEntry.pStr = EMPTY_STRING;
+ rEntry.nVal = SC_EMPTYFIELDS;
rEntry.bQueryByString = FALSE;
}
else if ( aStrVal == aStrNotEmpty )
{
- *rEntry.pStr = EMPTY_STRING;
- rEntry.nVal = SC_NONEMPTYFIELDS;
+ *rEntry.pStr = EMPTY_STRING;
+ rEntry.nVal = SC_NONEMPTYFIELDS;
rEntry.bQueryByString = FALSE;
}
else
{
- *rEntry.pStr = aStrVal;
- rEntry.nVal = 0;
+ *rEntry.pStr = aStrVal;
+ rEntry.nVal = 0;
rEntry.bQueryByString = TRUE;
}
- rEntry.nField = nField ? (theQueryData.nCol1 +
+ rEntry.nField = nField ? (theQueryData.nCol1 +
static_cast<SCCOL>(nField) - 1) : static_cast<SCCOL>(0);
- rEntry.eOp = eOp;
+ rEntry.eOp = eOp;
}
}
@@ -456,13 +456,13 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
: SC_AND;
theParam.bInplace = FALSE;
- theParam.nDestTab = 0; // Woher kommen diese Werte?
- theParam.nDestCol = 0;
- theParam.nDestRow = 0;
+ theParam.nDestTab = 0; // Woher kommen diese Werte?
+ theParam.nDestCol = 0;
+ theParam.nDestRow = 0;
- theParam.bDuplicate = !aBtnUnique.IsChecked();
- theParam.bCaseSens = aBtnCase.IsChecked();
- theParam.bRegExp = aBtnRegExp.IsChecked();
+ theParam.bDuplicate = !aBtnUnique.IsChecked();
+ theParam.bCaseSens = aBtnCase.IsChecked();
+ theParam.bRegExp = aBtnRegExp.IsChecked();
if ( pOutItem ) DELETEZ( pOutItem );
pOutItem = new ScQueryItem( nWhichQuery, &theParam );
@@ -569,9 +569,9 @@ IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb )
IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox )
{
- // bei Gross-/Kleinschreibung die Werte-Listen aktualisieren
+ // bei Gross-/Kleinschreibung die Werte-Listen aktualisieren
- if ( pBox == &aBtnCase ) // Wertlisten
+ if ( pBox == &aBtnCase ) // Wertlisten
{
for (USHORT i=0; i<=MAXCOL; i++)
DELETEZ( pEntryLists[i] );
@@ -596,11 +596,11 @@ IMPL_LINK( ScPivotFilterDlg, ValModifyHdl, ComboBox*, pEd )
{
if ( pEd )
{
- String aStrVal = pEd->GetText();
- ListBox* pLb = &aLbCond1;
+ String aStrVal = pEd->GetText();
+ ListBox* pLb = &aLbCond1;
if ( pEd == &aEdVal2 ) pLb = &aLbCond2;
- else if ( pEd == &aEdVal3 ) pLb = &aLbCond3;
+ else if ( pEd == &aEdVal3 ) pLb = &aLbCond3;
// wenn einer der Sonderwerte leer/nicht-leer
// gewaehlt wird, so macht nur der =-Operator Sinn: