summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx174
1 files changed, 87 insertions, 87 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 4d09ec0c9438..4fafac178e2f 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -90,13 +90,13 @@ using ::std::vector;
// former viewfunc/dbfunc methods
//
-void ScDocShell::ErrorMessage( USHORT nGlobStrId )
+void ScDocShell::ErrorMessage( sal_uInt16 nGlobStrId )
{
//! StopMarking an der (aktiven) View?
Window* pParent = GetActiveDialogParent();
ScWaitCursorOff aWaitOff( pParent );
- BOOL bFocus = pParent && pParent->HasFocus();
+ sal_Bool bFocus = pParent && pParent->HasFocus();
if(nGlobStrId==STR_PROTECTIONERR)
{
@@ -112,7 +112,7 @@ void ScDocShell::ErrorMessage( USHORT nGlobStrId )
pParent->GrabFocus();
}
-BOOL ScDocShell::IsEditable() const
+sal_Bool ScDocShell::IsEditable() const
{
// import into read-only document is possible - must be extended if other filters use api
// #i108547# MSOOXML filter uses "IsChangeReadOnlyEnabled" property
@@ -139,12 +139,12 @@ ScDBData* lcl_GetDBNearCursor( ScDBCollection* pColl, SCCOL nCol, SCROW nRow, SC
ScDBData* pNoNameData = NULL;
ScDBData* pNearData = NULL;
- USHORT nCount = pColl->GetCount();
+ sal_uInt16 nCount = pColl->GetCount();
String aNoName = ScGlobal::GetRscString( STR_DB_NONAME );
SCTAB nAreaTab;
SCCOL nStartCol, nEndCol;
SCROW nStartRow, nEndRow;
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
ScDBData* pDB = (*pColl)[i];
pDB->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow );
@@ -188,11 +188,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
if (!pData)
pData = lcl_GetDBNearCursor( aDocument.GetDBCollection(), nCol, nRow, nTab );
- BOOL bSelected = ( eSel == SC_DBSEL_FORCE_MARK ||
+ sal_Bool bSelected = ( eSel == SC_DBSEL_FORCE_MARK ||
(rMarked.aStart != rMarked.aEnd && eSel != SC_DBSEL_ROW_DOWN) );
bool bOnlyDown = (!bSelected && eSel == SC_DBSEL_ROW_DOWN && rMarked.aStart.Row() == rMarked.aEnd.Row());
- BOOL bUseThis = FALSE;
+ sal_Bool bUseThis = false;
if (pData)
{
// Bereich nehmen, wenn nichts anderes markiert
@@ -203,11 +203,11 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCCOL nOldCol2;
SCROW nOldRow2;
pData->GetArea( nDummy, nOldCol1,nOldRow1, nOldCol2,nOldRow2 );
- BOOL bIsNoName = ( pData->GetName() == ScGlobal::GetRscString( STR_DB_NONAME ) );
+ sal_Bool bIsNoName = ( pData->GetName() == ScGlobal::GetRscString( STR_DB_NONAME ) );
if (!bSelected)
{
- bUseThis = TRUE;
+ bUseThis = sal_True;
if ( bIsNoName && eMode == SC_DB_MAKE )
{
// If nothing marked or only one row marked, adapt
@@ -224,9 +224,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nEndCol = nStartCol;
nEndRow = nStartRow;
}
- aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
+ aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown );
if ( nOldCol1 != nStartCol || nOldCol2 != nEndCol || nOldRow1 != nStartRow )
- bUseThis = FALSE; // passt gar nicht
+ bUseThis = false; // passt gar nicht
else if ( nOldRow2 != nEndRow )
{
// Bereich auf neue End-Zeile erweitern
@@ -238,15 +238,15 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
{
if ( nOldCol1 == nStartCol && nOldRow1 == nStartRow &&
nOldCol2 == nEndCol && nOldRow2 == nEndRow ) // genau markiert?
- bUseThis = TRUE;
+ bUseThis = sal_True;
else
- bUseThis = FALSE; // immer Markierung nehmen (Bug 11964)
+ bUseThis = false; // immer Markierung nehmen (Bug 11964)
}
// fuer Import nie "unbenannt" nehmen
if ( bUseThis && eMode == SC_DB_IMPORT && bIsNoName )
- bUseThis = FALSE;
+ bUseThis = false;
}
if ( bUseThis )
@@ -277,13 +277,13 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
nEndCol = nStartCol;
nEndRow = nStartRow;
}
- aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, bOnlyDown );
+ aDocument.GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, false, bOnlyDown );
}
- BOOL bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
+ sal_Bool bHasHeader = aDocument.HasColHeader( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
ScDBData* pNoNameData;
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDBCollection* pColl = aDocument.GetDBCollection();
if ( eMode != SC_DB_IMPORT &&
pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -310,9 +310,9 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
pNoNameData->SetSubTotalParam( ScSubTotalParam() );
pNoNameData->SetArea( nTab, nStartCol,nStartRow, nEndCol,nEndRow ); // neu setzen
- pNoNameData->SetByRow( TRUE );
+ pNoNameData->SetByRow( sal_True );
pNoNameData->SetHeader( bHasHeader );
- pNoNameData->SetAutoFilter( FALSE );
+ pNoNameData->SetAutoFilter( false );
}
else
{
@@ -321,12 +321,12 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
String aNewName;
if (eMode==SC_DB_IMPORT)
{
- aDocument.CompileDBFormula( TRUE ); // CreateFormulaString
+ aDocument.CompileDBFormula( sal_True ); // CreateFormulaString
pUndoColl = new ScDBCollection( *pColl ); // Undo fuer Import1-Bereich
String aImport = ScGlobal::GetRscString( STR_DBNAME_IMPORT );
long nCount = 0;
- USHORT nDummy;
+ sal_uInt16 nDummy;
do
{
++nCount;
@@ -339,12 +339,12 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
aNewName = ScGlobal::GetRscString( STR_DB_NONAME );
pNoNameData = new ScDBData( aNewName, nTab,
nStartCol,nStartRow, nEndCol,nEndRow,
- TRUE, bHasHeader );
+ sal_True, bHasHeader );
pColl->Insert( pNoNameData );
if ( pUndoColl )
{
- aDocument.CompileDBFormula( FALSE ); // CompileFormulaString
+ aDocument.CompileDBFormula( false ); // CompileFormulaString
ScDBCollection* pRedoColl = new ScDBCollection( *pColl );
GetUndoManager()->AddUndoAction( new ScUndoDBData( this, pUndoColl, pRedoColl ) );
@@ -374,7 +374,7 @@ void ScDocShell::CancelAutoDBRange()
// called when dialog is cancelled
if ( pOldAutoDBRange )
{
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDBCollection* pColl = aDocument.GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
{
@@ -408,12 +408,12 @@ void ScDocShell::CancelAutoDBRange()
// Hoehen anpassen
//! mit docfunc zusammenfassen
-BOOL ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
+sal_Bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
{
ScSizeDeviceProvider aProv(this);
Fraction aZoom(1,1);
- BOOL bChange = aDocument.SetOptimalHeight( nStartRow,nEndRow, nTab, 0, aProv.GetDevice(),
- aProv.GetPPTX(),aProv.GetPPTY(), aZoom,aZoom, FALSE );
+ sal_Bool bChange = aDocument.SetOptimalHeight( nStartRow,nEndRow, nTab, 0, aProv.GetDevice(),
+ aProv.GetPPTX(),aProv.GetPPTY(), aZoom,aZoom, false );
if (bChange)
PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID|PAINT_LEFT );
@@ -431,8 +431,8 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark )
void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
{
- BOOL bIsUndoEnabled = aDocument.IsUndoEnabled();
- aDocument.EnableUndo( FALSE );
+ sal_Bool bIsUndoEnabled = aDocument.IsUndoEnabled();
+ aDocument.EnableUndo( false );
aDocument.LockStreamValid( true ); // ignore draw page size (but not formula results)
if ( bBefore ) // check all sheets up to nUpdateTab
{
@@ -444,7 +444,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
SCTAB nTab;
for (nTab=0; nTab<=nUpdateTab; ++nTab)
if ( aDocument.IsPendingRowHeights( nTab ) )
- aUpdateSheets.SelectTable( nTab, TRUE );
+ aUpdateSheets.SelectTable( nTab, sal_True );
if (aUpdateSheets.GetSelectCount())
UpdateAllRowHeights(&aUpdateSheets); // update with a single progress bar
@@ -453,7 +453,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
if ( aUpdateSheets.GetTableSelect( nTab ) )
{
aDocument.UpdatePageBreaks( nTab );
- aDocument.SetPendingRowHeights( nTab, FALSE );
+ aDocument.SetPendingRowHeights( nTab, false );
}
}
else // only nUpdateTab
@@ -462,7 +462,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore )
{
AdjustRowHeight( 0, MAXROW, nUpdateTab );
aDocument.UpdatePageBreaks( nUpdateTab );
- aDocument.SetPendingRowHeights( nUpdateTab, FALSE );
+ aDocument.SetPendingRowHeights( nUpdateTab, false );
}
}
aDocument.LockStreamValid( false );
@@ -479,8 +479,8 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
// DataPilotUpdate doesn't modify the collection order like PivotUpdate did,
// so a simple loop can be used.
- USHORT nCount = pColl->GetCount();
- for ( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pColl->GetCount();
+ for ( sal_uInt16 i=0; i<nCount; i++ )
{
ScDPObject* pOld = (*pColl)[i];
if ( pOld )
@@ -490,7 +490,7 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
{
ScDPObject* pNew = new ScDPObject( *pOld );
ScDBDocFunc aFunc( *this );
- aFunc.DataPilotUpdate( pOld, pNew, TRUE, FALSE );
+ aFunc.DataPilotUpdate( pOld, pNew, sal_True, false );
delete pNew; // DataPilotUpdate copies settings from "new" object
}
}
@@ -501,14 +501,14 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
{
String aName;
- BOOL bOk = FALSE;
+ sal_Bool bOk = false;
ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart,
pArea->nColEnd, pArea->nRowEnd );
if (pData)
{
pData->GetName( aName );
if ( aName != ScGlobal::GetRscString( STR_DB_NONAME ) )
- bOk = TRUE;
+ bOk = sal_True;
}
if (!bOk)
@@ -517,14 +517,14 @@ String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
return aName;
}
-void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
+void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bRecord )
{
ScConsData aData;
- USHORT nPos;
+ sal_uInt16 nPos;
SCCOL nColSize = 0;
SCROW nRowSize = 0;
- BOOL bErr = FALSE;
+ sal_Bool bErr = false;
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
ScArea* pArea = rParam.ppDataAreas[nPos];
@@ -534,7 +534,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
// Test, ob Quelldaten verschoben wuerden
if (rParam.bReferenceData)
if (pArea->nTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow)
- bErr = TRUE;
+ bErr = sal_True;
}
if (bErr)
@@ -551,7 +551,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
ScDocShellModificator aModificator( *this );
ScRange aOldDest;
- ScDBData* pDestData = aDocument.GetDBAtCursor( rParam.nCol, rParam.nRow, rParam.nTab, TRUE );
+ ScDBData* pDestData = aDocument.GetDBAtCursor( rParam.nCol, rParam.nRow, rParam.nTab, sal_True );
if (pDestData)
pDestData->GetArea(aOldDest);
@@ -594,28 +594,28 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
ScOutlineTable* pUndoTab = pTable ? new ScOutlineTable( *pTable ) : NULL;
ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
- pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, FALSE, TRUE );
+ pUndoDoc->InitUndo( &aDocument, 0, nTabCount-1, false, sal_True );
// Zeilenstatus
aDocument.CopyToDocument( 0,0,nDestTab, MAXCOL,MAXROW,nDestTab,
- IDF_NONE, FALSE, pUndoDoc );
+ IDF_NONE, false, pUndoDoc );
// alle Formeln
aDocument.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1,
- IDF_FORMULA, FALSE, pUndoDoc );
+ IDF_FORMULA, false, pUndoDoc );
// komplette Ausgangszeilen
aDocument.CopyToDocument( 0,aDestArea.nRowStart,nDestTab,
MAXCOL,aDestArea.nRowEnd,nDestTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- TRUE, nInsertCount, pUndoTab, pUndoData ) );
+ sal_True, nInsertCount, pUndoTab, pUndoData ) );
}
else
{
@@ -624,15 +624,15 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
aDocument.CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, aDestArea.nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, aDestArea.nTab,
- IDF_ALL, FALSE, pUndoDoc );
+ IDF_ALL, false, pUndoDoc );
// alten Ausgabebereich
if (pDestData)
- aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc );
+ aDocument.CopyToDocument( aOldDest, IDF_ALL, false, pUndoDoc );
GetUndoManager()->AddUndoAction(
new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc,
- FALSE, 0, NULL, pUndoData ) );
+ false, 0, NULL, pUndoData ) );
}
}
@@ -650,7 +650,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
SCROW nPaintStartRow = rParam.nRow;
SCCOL nPaintEndCol = nPaintStartCol + nColSize - 1;
SCROW nPaintEndRow = nPaintStartRow + nRowSize - 1;
- USHORT nPaintFlags = PAINT_GRID;
+ sal_uInt16 nPaintFlags = PAINT_GRID;
if (rParam.bByCol)
++nPaintEndRow;
if (rParam.bByRow)
@@ -674,7 +674,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord )
aModificator.SetDocumentModified();
}
-void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
+void ScDocShell::UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord )
{
if (!aDocument.IsScenario(nTab))
{
@@ -712,22 +712,22 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
pUndoDoc->InitUndo( &aDocument, nTab,nEndTab ); // auch alle Szenarien
// angezeigte Tabelle:
aDocument.CopyToDocument( nStartCol,nStartRow,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL,TRUE, pUndoDoc, &aScenMark );
+ nEndCol,nEndRow,nTab, IDF_ALL,sal_True, pUndoDoc, &aScenMark );
// Szenarien
for (SCTAB i=nTab+1; i<=nEndTab; i++)
{
- pUndoDoc->SetScenario( i, TRUE );
+ pUndoDoc->SetScenario( i, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
aDocument.GetScenarioData( i, aComment, aColor, nScenFlags );
pUndoDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
- BOOL bActive = aDocument.IsActiveScenario( i );
+ sal_Bool bActive = aDocument.IsActiveScenario( i );
pUndoDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
aDocument.CopyToDocument( 0,0,i, MAXCOL,MAXROW,i,
- IDF_ALL,FALSE, pUndoDoc );
+ IDF_ALL,false, pUndoDoc );
}
GetUndoManager()->AddUndoAction(
@@ -766,14 +766,14 @@ void ScDocShell::UseScenario( SCTAB nTab, const String& rName, BOOL bRecord )
}
void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags )
+ const Color& rColor, sal_uInt16 nFlags )
{
// Undo
String aOldName;
aDocument.GetName( nTab, aOldName );
String aOldComment;
Color aOldColor;
- USHORT nOldFlags;
+ sal_uInt16 nOldFlags;
aDocument.GetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
GetUndoManager()->AddUndoAction(
new ScUndoScenarioFlags( this, nTab,
@@ -796,8 +796,8 @@ void ScDocShell::ModifyScenario( SCTAB nTab, const String& rName, const String&
}
SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& rComment,
- const Color& rColor, USHORT nFlags,
- ScMarkData& rMark, BOOL bRecord )
+ const Color& rColor, sal_uInt16 nFlags,
+ ScMarkData& rMark, sal_Bool bRecord )
{
rMark.MarkToMulti();
if (rMark.IsMultiMarked())
@@ -806,7 +806,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
while (aDocument.IsScenario(nNewTab))
++nNewTab;
- BOOL bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
+ sal_Bool bCopyAll = ( (nFlags & SC_SCENARIO_COPYALL) != 0 );
const ScMarkData* pCopyMark = NULL;
if (!bCopyAll)
pCopyMark = &rMark;
@@ -825,8 +825,8 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
rName, rComment, rColor, nFlags, rMark ));
}
- aDocument.RenameTab( nNewTab, rName, FALSE ); // ohne Formel-Update
- aDocument.SetScenario( nNewTab, TRUE );
+ aDocument.RenameTab( nNewTab, rName, false ); // ohne Formel-Update
+ aDocument.SetScenario( nNewTab, sal_True );
aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags );
ScMarkData aDestMark = rMark;
@@ -835,19 +835,19 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
//! auf Filter / Buttons / Merging testen !
ScPatternAttr aProtPattern( aDocument.GetPool() );
- aProtPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aProtPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
aDocument.ApplyPatternAreaTab( 0,0, MAXCOL,MAXROW, nNewTab, aProtPattern );
ScPatternAttr aPattern( aDocument.GetPool() );
aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) );
- aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) );
+ aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) );
aDocument.ApplySelectionPattern( aPattern, aDestMark );
if (!bCopyAll)
- aDocument.SetVisible( nNewTab, FALSE );
+ aDocument.SetVisible( nNewTab, false );
// dies ist dann das aktive Szenario
- aDocument.CopyScenario( nNewTab, nTab, TRUE ); // TRUE - nicht aus Szenario kopieren
+ aDocument.CopyScenario( nNewTab, nTab, sal_True ); // sal_True - nicht aus Szenario kopieren
if (nFlags & SC_SCENARIO_SHOWFRAME)
PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); // Rahmen painten
@@ -862,13 +862,13 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r
return nTab;
}
-ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
- SCTAB nDestPos, BOOL bInsertNew,
- BOOL bNotifyAndPaint )
+sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
+ SCTAB nDestPos, sal_Bool bInsertNew,
+ sal_Bool bNotifyAndPaint )
{
ScDocument* pSrcDoc = rSrcDocShell.GetDocument();
- ULONG nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
+ sal_uLong nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
bInsertNew ); // no insert
// TransferTab doesn't copy drawing objects with bInsertNew=FALSE
@@ -879,15 +879,15 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
{
String aComment;
Color aColor;
- USHORT nFlags;
+ sal_uInt16 nFlags;
pSrcDoc->GetScenarioData( nSrcPos, aComment,aColor, nFlags);
- aDocument.SetScenario(nDestPos,TRUE);
+ aDocument.SetScenario(nDestPos,true);
aDocument.SetScenarioData(nDestPos,aComment,aColor,nFlags);
- BOOL bActive = pSrcDoc->IsActiveScenario(nSrcPos);
+ sal_Bool bActive = pSrcDoc->IsActiveScenario(nSrcPos);
aDocument.SetActiveScenario(nDestPos, bActive );
- BOOL bVisible=pSrcDoc->IsVisible(nSrcPos);
+ sal_Bool bVisible=pSrcDoc->IsVisible(nSrcPos);
aDocument.SetVisible(nDestPos,bVisible );
}
@@ -903,7 +903,7 @@ ULONG ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
return nErrVal;
}
-BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord )
+sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, sal_Bool bRecord )
{
ScDocShellModificator aModificator( *this );
@@ -922,7 +922,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if (!aDocument.CopyTab( nSrcTab, nDestTab ))
{
//! EndDrawUndo?
- return FALSE;
+ return false;
}
else
{
@@ -941,7 +941,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
new ScUndoCopyTab(this, pSrcList.release(), pDestList.release()));
}
- BOOL bVbaEnabled = aDocument.IsInVBAMode();
+ sal_Bool bVbaEnabled = aDocument.IsInVBAMode();
if ( bVbaEnabled )
{
String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
@@ -978,7 +978,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
else
{
if ( aDocument.GetChangeTrack() )
- return FALSE;
+ return false;
if ( nSrcTab<nDestTab && nDestTab!=SC_TAB_APPEND )
nDestTab--;
@@ -986,11 +986,11 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
if ( nSrcTab == nDestTab )
{
//! allow only for api calls?
- return TRUE; // nothing to do, but valid
+ return sal_True; // nothing to do, but valid
}
if (!aDocument.MoveTab( nSrcTab, nDestTab ))
- return FALSE;
+ return false;
else if (bRecord)
{
auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
@@ -1007,7 +1007,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- return TRUE;
+ return sal_True;
}
@@ -1015,7 +1015,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
{
ScDBDocFunc aFunc(*this);
- BOOL bContinue = TRUE;
+ sal_Bool bContinue = sal_True;
ScDBData* pDBData = static_cast<ScDBData*>(pRefreshTimer);
ScImportParam aImportParam;
pDBData->GetImportParam( aImportParam );
@@ -1024,11 +1024,11 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer )
ScRange aRange;
pDBData->GetArea( aRange );
Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
- bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( aRange.aStart.Tab(), aImportParam, xResultSet, NULL, true, false ); //! Api-Flag as parameter
// internal operations (sort, query, subtotal) only if no error
if (bContinue)
{
- aFunc.RepeatDB( pDBData->GetName(), TRUE, TRUE );
+ aFunc.RepeatDB( pDBData->GetName(), sal_True, sal_True );
RefreshPivotTables(aRange);
}
}