diff options
Diffstat (limited to 'sc/source/ui/view/dbfunc.cxx')
-rw-r--r-- | sc/source/ui/view/dbfunc.cxx | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 98b81701b805..3607a8dc7a2a 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -71,7 +71,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName ) ScDocument* pDoc = GetViewData()->GetDocument(); ScDBCollection* pDBCol = pDoc->GetDBCollection(); - USHORT nFoundAt = 0; + sal_uInt16 nFoundAt = 0; if ( pDBCol->SearchName( rDBName, nFoundAt ) ) { ScDBData* pData = (*pDBCol)[nFoundAt]; @@ -89,7 +89,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName ) SetTabNo( nTab ); MoveCursorAbs( nStartCol, nStartRow, ScFollowMode( SC_FOLLOW_JUMP ), - FALSE, FALSE ); // bShift,bControl + false, false ); // bShift,bControl DoneBlockMode(); InitBlockMode( nStartCol, nStartRow, nTab ); MarkCursor( nEndCol, nEndRow, nTab ); @@ -100,7 +100,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName ) // aktuellen Datenbereich fuer Sortieren / Filtern suchen -ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows ) +ScDBData* ScDBFunc::GetDBData( sal_Bool bMark, ScGetDBMode eMode, ScGetDBSelection eSel, bool /*bShrinkToData*/, bool bExpandRows ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDBData* pData = NULL; @@ -191,7 +191,7 @@ ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection e { ScRange aFound; pData->GetArea(aFound, bExpandRows); - MarkRange( aFound, FALSE ); + MarkRange( aFound, false ); } return pData; } @@ -207,7 +207,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& ScDBCollection* pOldColl = pDoc->GetDBCollection(); ScDBCollection* pUndoColl = NULL; ScDBCollection* pRedoColl = NULL; - const BOOL bRecord (pDoc->IsUndoEnabled()); + const sal_Bool bRecord (pDoc->IsUndoEnabled()); long nDelCount = rDelAreaList.Count(); for (long nDelPos=0; nDelPos<nDelCount; nDelPos++) @@ -231,9 +231,9 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& // neue Targets am SBA anmelden nicht mehr noetig - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString pDoc->SetDBCollection( new ScDBCollection( rNewColl ) ); - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + pDoc->CompileDBFormula( false ); // CompileFormulaString pOldColl = NULL; pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID ); aModificator.SetDocumentModified(); @@ -253,7 +253,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& // Sortieren -void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord ) +void ScDBFunc::UISort( const ScSortParam& rSortParam, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -280,12 +280,12 @@ void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord ) } } -void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint ) +void ScDBFunc::Sort( const ScSortParam& rSortParam, sal_Bool bRecord, sal_Bool bPaint ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); ScDBDocFunc aDBDocFunc( *pDocSh ); - BOOL bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, FALSE ); + sal_Bool bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, false ); if ( bSuccess && !rSortParam.bInplace ) { // Ziel markieren @@ -299,23 +299,23 @@ void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint ) // Filtern -void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, BOOL bRecord ) +void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); ScDBDocFunc aDBDocFunc( *pDocSh ); - BOOL bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, FALSE ); + sal_Bool bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, false ); if (bSuccess) { - BOOL bCopy = !rQueryParam.bInplace; + sal_Bool bCopy = !rQueryParam.bInplace; if (bCopy) { // Zielbereich markieren (DB-Bereich wurde ggf. angelegt) ScDocument* pDoc = pDocSh->GetDocument(); ScDBData* pDestData = pDoc->GetDBAtCursor( rQueryParam.nDestCol, rQueryParam.nDestRow, - rQueryParam.nDestTab, TRUE ); + rQueryParam.nDestTab, sal_True ); if (pDestData) { ScRange aDestRange; @@ -345,17 +345,17 @@ void ScDBFunc::ToggleAutoFilter() ScDocument* pDoc = GetViewData()->GetDocument(); ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, SC_DBSEL_ROW_DOWN, false, true); - pDBData->SetByRow( TRUE ); //! Undo, vorher abfragen ?? + pDBData->SetByRow( sal_True ); //! Undo, vorher abfragen ?? pDBData->GetQueryParam( aParam ); SCCOL nCol; SCROW nRow = aParam.nRow1; SCTAB nTab = GetViewData()->GetTabNo(); - INT16 nFlag; - BOOL bHasAuto = TRUE; - BOOL bHeader = pDBData->HasHeader(); - BOOL bPaint = FALSE; + sal_Int16 nFlag; + sal_Bool bHasAuto = sal_True; + sal_Bool bHeader = pDBData->HasHeader(); + sal_Bool bPaint = false; //! stattdessen aus DB-Bereich abfragen? @@ -365,7 +365,7 @@ void ScDBFunc::ToggleAutoFilter() GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue(); if ( (nFlag & SC_MF_AUTO) == 0 ) - bHasAuto = FALSE; + bHasAuto = false; } if (bHasAuto) // aufheben @@ -387,21 +387,21 @@ void ScDBFunc::ToggleAutoFilter() ScRange aRange; pDBData->GetArea( aRange ); pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) ); + new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), false ) ); - pDBData->SetAutoFilter(FALSE); + pDBData->SetAutoFilter(false); // Filter aufheben (incl. Paint / Undo) SCSIZE nEC = aParam.GetEntryCount(); for (SCSIZE i=0; i<nEC; i++) - aParam.GetEntry(i).bDoQuery = FALSE; - aParam.bDuplicate = TRUE; - Query( aParam, NULL, TRUE ); + aParam.GetEntry(i).bDoQuery = false; + aParam.bDuplicate = sal_True; + Query( aParam, NULL, sal_True ); pDocSh->GetUndoManager()->LeaveListAction(); - bPaint = TRUE; + bPaint = sal_True; } else // Filterknoepfe einblenden { @@ -416,17 +416,17 @@ void ScDBFunc::ToggleAutoFilter() ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile? ).Execute() == RET_YES ) { - pDBData->SetHeader( TRUE ); //! Undo ?? - bHeader = TRUE; + pDBData->SetHeader( sal_True ); //! Undo ?? + bHeader = sal_True; } } ScRange aRange; pDBData->GetArea( aRange ); pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), TRUE ) ); + new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), sal_True ) ); - pDBData->SetAutoFilter(TRUE); + pDBData->SetAutoFilter(sal_True); for (nCol=aParam.nCol1; nCol<=aParam.nCol2; nCol++) { @@ -436,7 +436,7 @@ void ScDBFunc::ToggleAutoFilter() } pDocSh->PostPaint( aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab, PAINT_GRID ); - bPaint = TRUE; + bPaint = sal_True; } else { @@ -466,7 +466,7 @@ void ScDBFunc::HideAutoFilter() ScDocument* pDoc = pDocSh->GetDocument(); ScQueryParam aParam; - ScDBData* pDBData = GetDBData( FALSE ); + ScDBData* pDBData = GetDBData( false ); SCTAB nTab; SCCOL nCol1, nCol2; @@ -475,7 +475,7 @@ void ScDBFunc::HideAutoFilter() for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++) { - INT16 nFlag = ((ScMergeFlagAttr*) pDoc-> + sal_Int16 nFlag = ((ScMergeFlagAttr*) pDoc-> GetAttr( nCol, nRow1, nTab, ATTR_MERGE_FLAG ))->GetValue(); pDoc->ApplyAttr( nCol, nRow1, nTab, ScMergeFlagAttr( nFlag & ~SC_MF_AUTO ) ); } @@ -483,9 +483,9 @@ void ScDBFunc::HideAutoFilter() ScRange aRange; pDBData->GetArea( aRange ); pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) ); + new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), false ) ); - pDBData->SetAutoFilter(FALSE); + pDBData->SetAutoFilter(false); pDocSh->PostPaint( nCol1,nRow1,nTab, nCol2,nRow1,nTab, PAINT_GRID ); aModificator.SetDocumentModified(); @@ -497,7 +497,7 @@ void ScDBFunc::HideAutoFilter() // Re-Import -BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord ) +sal_Bool ScDBFunc::ImportData( const ScImportParam& rParam, sal_Bool bRecord ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScEditableTester aTester( pDoc, GetViewData()->GetTabNo(), rParam.nCol1,rParam.nRow1, @@ -505,7 +505,7 @@ BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord ) if ( !aTester.IsEditable() ) { ErrorMessage(aTester.GetMessageId()); - return FALSE; + return false; } ScDBDocFunc aDBDocFunc( *GetViewData()->GetDocShell() ); |