summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-02-10 14:40:25 +0200
committerNoel Grandin <noel@peralex.com>2014-02-10 14:44:58 +0200
commitc1dd14ba87c0223ae9ec14c381796cd859b4b713 (patch)
treea3b44e2be8390aacd2a06d8ebbd1bb7f731bc471 /sc
parentd359e422705c591d815daefaca3e1c9c53f64756 (diff)
sal_Bool->bool
and remove unused parameter from ScCopyPage Change-Id: Iba5a5adea8d5b4a56d77297325cc79d63465f15d
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/drwlayer.hxx29
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx47
-rw-r--r--sc/source/core/tool/detfunc.cxx8
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/oox/drawingfragment.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx6
7 files changed, 45 insertions, 51 deletions
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 095a27b4f851..750b8dfc5af6 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -84,9 +84,9 @@ private:
OUString aName;
ScDocument* pDoc;
SdrUndoGroup* pUndoGroup;
- sal_Bool bRecording;
- sal_Bool bAdjustEnabled;
- sal_Bool bHyphenatorSet;
+ bool bRecording;
+ bool bAdjustEnabled;
+ bool bHyphenatorSet;
private:
void MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
@@ -105,35 +105,34 @@ public:
virtual SdrLayerID GetControlExportLayerId( const SdrObject & ) const;
- sal_Bool HasObjects() const;
+ bool HasObjects() const;
- sal_Bool ScAddPage( SCTAB nTab );
+ bool ScAddPage( SCTAB nTab );
void ScRemovePage( SCTAB nTab );
void ScRenamePage( SCTAB nTab, const OUString& rNewName );
void ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos );
- // incl. content, bAlloc=FALSE -> only content
- void ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool bAlloc );
+ void ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos);
void ResetTab( SCTAB nStart, SCTAB nEnd );
ScDocument* GetDocument() const { return pDoc; }
void UseHyphenator();
- sal_Bool GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const;
+ bool GetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
// automatic adjustments
- void EnableAdjust( sal_Bool bSet = sal_True ) { bAdjustEnabled = bSet; }
+ void EnableAdjust( bool bSet = true ) { bAdjustEnabled = bSet; }
void BeginCalcUndo(bool bDisableTextEditUsesCommonUndoManager);
SdrUndoGroup* GetCalcUndo();
- sal_Bool IsRecording() const { return bRecording; }
+ bool IsRecording() const { return bRecording; }
void AddCalcUndo( SdrUndoAction* pUndo );
void MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
- SCsCOL nDx,SCsROW nDy, sal_Bool bInsDel, bool bUpdateNoteCaptionPos = true );
+ SCsCOL nDx,SCsROW nDy, bool bInsDel, bool bUpdateNoteCaptionPos = true );
- sal_Bool HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow );
+ bool HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow );
void DeleteObjectsInArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1,
SCCOL nCol2,SCROW nRow2 );
@@ -175,8 +174,8 @@ public:
static ScAnchorType GetAnchorType( const SdrObject& );
// positions for detektive lines
- static ScDrawObjData* GetObjData( SdrObject* pObj, sal_Bool bCreate=false );
- static ScDrawObjData* GetNonRotatedObjData( SdrObject* pObj, sal_Bool bCreate=false );
+ static ScDrawObjData* GetObjData( SdrObject* pObj, bool bCreate=false );
+ static ScDrawObjData* GetNonRotatedObjData( SdrObject* pObj, bool bCreate=false );
// The sheet information in ScDrawObjData isn't updated when sheets are inserted/deleted.
// Use this method to get an object with positions on the specified sheet (should be the
@@ -195,7 +194,7 @@ public:
static IMapObject* GetHitIMapObject( SdrObject* pObject,
const Point& rWinPoint, const Window& rCmpWnd );
- static ScMacroInfo* GetMacroInfo( SdrObject* pObj, sal_Bool bCreate = false );
+ static ScMacroInfo* GetMacroInfo( SdrObject* pObj, bool bCreate = false );
virtual ImageMap* GetImageMapForObject(SdrObject* pObj);
virtual sal_Int32 GetHyperlinkCount(SdrObject* pObj);
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 52a4547ccd2f..46450c99d8be 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -242,7 +242,7 @@ void ScDocument::DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
// angelegt wird die Page schon im ScTable ctor
- pDrawLayer->ScCopyPage( nOldPos, nNewPos, false );
+ pDrawLayer->ScCopyPage( nOldPos, nNewPos );
}
void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index b7aa8b505a2a..5fb2b86b0825 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -200,7 +200,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) :
pDoc( pDocument ),
pUndoGroup( NULL ),
bRecording( false ),
- bAdjustEnabled( sal_True ),
+ bAdjustEnabled( true ),
bHyphenatorSet( false )
{
pGlobalDrawPersist = NULL; // nur einmal benutzen
@@ -310,7 +310,7 @@ void ScDrawLayer::UseHyphenator()
GetDrawOutliner().SetHyphenator( xHyphenator );
GetHitTestOutliner().SetHyphenator( xHyphenator );
- bHyphenatorSet = sal_True;
+ bHyphenatorSet = true;
}
}
@@ -319,14 +319,14 @@ SdrPage* ScDrawLayer::AllocPage(bool bMasterPage)
return new ScDrawPage(*this, bMasterPage);
}
-sal_Bool ScDrawLayer::HasObjects() const
+bool ScDrawLayer::HasObjects() const
{
- sal_Bool bFound = false;
+ bool bFound = false;
sal_uInt16 nCount = GetPageCount();
for (sal_uInt16 i=0; i<nCount && !bFound; i++)
if (GetPage(i)->GetObjCount())
- bFound = sal_True;
+ bFound = true;
return bFound;
}
@@ -339,7 +339,7 @@ SdrModel* ScDrawLayer::AllocModel() const
return new ScDrawLayer( NULL, aName );
}
-sal_Bool ScDrawLayer::ScAddPage( SCTAB nTab )
+bool ScDrawLayer::ScAddPage( SCTAB nTab )
{
if (bDrawIsInUndo)
return false; // not inserted
@@ -385,15 +385,13 @@ void ScDrawLayer::ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
ResetTab(nMinPos, pDoc->GetTableCount()-1);
}
-void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool bAlloc )
+void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos)
{
- //! remove argument bAlloc (always sal_False)
-
if (bDrawIsInUndo)
return;
SdrPage* pOldPage = GetPage(nOldPos);
- SdrPage* pNewPage = bAlloc ? AllocPage(false) : GetPage(nNewPos);
+ SdrPage* pNewPage = GetPage(nNewPos);
// kopieren
@@ -432,9 +430,6 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool b
}
}
- if (bAlloc)
- InsertPage(pNewPage, nNewPos);
-
ResetTab(static_cast<SCTAB>(nNewPos), pDoc->GetTableCount()-1);
}
@@ -876,7 +871,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
}
}
-sal_Bool ScDrawLayer::GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool bSetVer ) const
+bool ScDrawLayer::GetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const
{
OSL_ENSURE( pDoc, "ScDrawLayer::GetPrintArea without document" );
if ( !pDoc )
@@ -887,7 +882,7 @@ sal_Bool ScDrawLayer::GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool
sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
- sal_Bool bAny = false;
+ bool bAny = false;
long nEndX = 0;
long nEndY = 0;
long nStartX = LONG_MAX;
@@ -954,7 +949,7 @@ sal_Bool ScDrawLayer::GetPrintArea( ScRange& rRange, sal_Bool bSetHor, sal_Bool
if (aObjRect.Top() < nStartY) nStartY = aObjRect.Top();
if (aObjRect.Bottom() > nEndY) nEndY = aObjRect.Bottom();
}
- bAny = sal_True;
+ bAny = true;
}
pObject = aIter.Next();
@@ -1034,7 +1029,7 @@ void ScDrawLayer::BeginCalcUndo(bool bDisableTextEditUsesCommonUndoManager)
{
SetDisableTextEditUsesCommonUndoManager(bDisableTextEditUsesCommonUndoManager);
DELETEZ(pUndoGroup);
- bRecording = sal_True;
+ bRecording = true;
}
SdrUndoGroup* ScDrawLayer::GetCalcUndo()
@@ -1047,7 +1042,7 @@ SdrUndoGroup* ScDrawLayer::GetCalcUndo()
}
void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2,
- SCsCOL nDx,SCsROW nDy, sal_Bool bInsDel, bool bUpdateNoteCaptionPos )
+ SCsCOL nDx,SCsROW nDy, bool bInsDel, bool bUpdateNoteCaptionPos )
{
OSL_ENSURE( pDoc, "ScDrawLayer::MoveArea without document" );
if ( !pDoc )
@@ -1094,7 +1089,7 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR
MoveCells( nTab, nCol1,nRow1, nCol2,nRow2, nDx,nDy, bUpdateNoteCaptionPos );
}
-sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
+bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow )
{
OSL_ENSURE( pDoc, "ScDrawLayer::HasObjectsInRows without document" );
if ( !pDoc )
@@ -1103,11 +1098,11 @@ sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndR
SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab));
OSL_ENSURE(pPage,"Page not found");
if (!pPage)
- return sal_False;
+ return false;
// for an empty page, there's no need to calculate the row heights
if (!pPage->GetObjCount())
- return sal_False;
+ return false;
Rectangle aTestRect;
@@ -1131,7 +1126,7 @@ sal_Bool ScDrawLayer::HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndR
if ( bNegativePage )
MirrorRectRTL( aTestRect );
- sal_Bool bFound = false;
+ bool bFound = false;
Rectangle aObjRect;
SdrObjListIter aIter( *pPage );
@@ -1893,7 +1888,7 @@ ScAnchorType ScDrawLayer::GetAnchorType( const SdrObject &rObj )
return ScDrawLayer::GetObjData(const_cast<SdrObject*>(&rObj)) ? SCA_CELL : SCA_PAGE;
}
-ScDrawObjData* ScDrawLayer::GetNonRotatedObjData( SdrObject* pObj, sal_Bool bCreate )
+ScDrawObjData* ScDrawLayer::GetNonRotatedObjData( SdrObject* pObj, bool bCreate )
{
sal_uInt16 nCount = pObj ? pObj->GetUserDataCount() : 0;
sal_uInt16 nFound = 0;
@@ -1912,7 +1907,7 @@ ScDrawObjData* ScDrawLayer::GetNonRotatedObjData( SdrObject* pObj, sal_Bool bCre
return 0;
}
-ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, sal_Bool bCreate )
+ScDrawObjData* ScDrawLayer::GetObjData( SdrObject* pObj, bool bCreate )
{
if (SdrObjUserData *pData = GetFirstUserDataOfType(pObj, SC_UD_OBJDATA))
return (ScDrawObjData*) pData;
@@ -2021,7 +2016,7 @@ IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
return pIMapObj;
}
-ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, sal_Bool bCreate )
+ScMacroInfo* ScDrawLayer::GetMacroInfo( SdrObject* pObj, bool bCreate )
{
if (SdrObjUserData *pData = GetFirstUserDataOfType(pObj, SC_UD_MACRODATA))
return (ScMacroInfo*) pData;
@@ -2048,7 +2043,7 @@ ImageMap* ScDrawLayer::GetImageMapForObject(SdrObject* pObj)
sal_Int32 ScDrawLayer::GetHyperlinkCount(SdrObject* pObj)
{
sal_Int32 nHLCount = 0;
- ScMacroInfo* pMacroInfo = GetMacroInfo(pObj, sal_False);
+ ScMacroInfo* pMacroInfo = GetMacroInfo(pObj, false);
if (pMacroInfo)
// MT IA2: GetHlink*( doesn|t exist in DEV300 anymore...
nHLCount = 0; // pMacroInfo->GetHlink().getLength() > 0 ? 1 : 0;
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 0ccd6960a0fe..5d2e11c444ff 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -475,7 +475,7 @@ bool ScDetectiveFunc::InsertArrow( SCCOL nCol, SCROW nRow,
pPage->InsertObject( pBox );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, sal_True );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, true );
pData->maStart.Set( nRefStartCol, nRefStartRow, nTab);
pData->maEnd.Set( nRefEndCol, nRefEndRow, nTab);
}
@@ -548,7 +548,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pPage->InsertObject( pBox );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pBox ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, sal_True );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pBox, true );
pData->maStart.Set( nStartCol, nStartRow, nTab);
pData->maEnd.Set( nEndCol, nEndRow, nTab);
}
@@ -582,7 +582,7 @@ bool ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow,
pPage->InsertObject( pArrow );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pArrow ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, sal_True );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pArrow, true );
pData->maStart.Set( nStartCol, nStartRow, nTab);
pData->maEnd.SetInvalid();
@@ -648,7 +648,7 @@ void ScDetectiveFunc::DrawCircle( SCCOL nCol, SCROW nRow, ScDetectiveData& rData
pPage->InsertObject( pCircle );
pModel->AddCalcUndo( new SdrUndoInsertObj( *pCircle ) );
- ScDrawObjData* pData = ScDrawLayer::GetObjData( pCircle, sal_True );
+ ScDrawObjData* pData = ScDrawLayer::GetObjData( pCircle, true );
pData->maStart.Set( nCol, nRow, nTab);
pData->maEnd.SetInvalid();
pData->meType = ScDrawObjData::ValidationCircle;
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 29dcb6f58129..01ceeded8c63 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -557,7 +557,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb
// removed oracle/sun check for mbSimpleMacro ( no idea what its for )
if (!maMacroName.isEmpty() || !maHyperlink.isEmpty())
{
- if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, sal_True ) )
+ if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, true ) )
{
pInfo->SetMacro( XclTools::GetSbMacroUrl( maMacroName, GetDocShell() ) );
pInfo->SetHlink( maHyperlink );
diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx
index dc879e202855..a3ca08f9425b 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -114,7 +114,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >&
SdrObject* pObj = SdrObject::getSdrObjectFromXShape( mxShape );
if ( pObj )
{
- if ( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ) )
+ if ( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true ) )
pInfo->SetHlink( sURL );
}
}
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 9697dce6017e..c8d11f50b0a1 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -320,7 +320,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
{
SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) );
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
if ( !pInfo->GetMacro().isEmpty() )
{
SvxMacroTableDtor aTab;
@@ -360,7 +360,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin )
sal_uLong nObj = pOL->GetObjCount();
for ( sal_uLong index=0; index<nObj; ++index )
{
- pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), sal_True );
+ pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), true );
pInfo->SetMacro( sMacro );
}
}
@@ -476,7 +476,7 @@ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk )
{
if ( pObj )
{
- ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True );
+ ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true );
pInfo->SetHlink( rHlnk );
lcl_setModified( GetObjectShell() );
}