From a2c0236e6e6ad8016abc872d1f47084c34b34d95 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 14 Oct 2010 16:40:32 +0200 Subject: undoapi: first sketch of the listener API - not sure this will survive 'til the final version --- sc/source/ui/view/tabvwsha.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 7734f3e24ff8..4687ab14a2a9 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -768,9 +768,9 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) for (USHORT i=0; iUndo(0); + pUndoManager->Undo(); else - pUndoManager->Redo(0); + pUndoManager->Redo(); } if ( bLockPaint ) -- cgit From f713ee13886f4d3a6d3e90c8f1ed9b154e0cacda Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 20 Oct 2010 14:54:59 +0200 Subject: undoapi: made SfxUndoManager an implementation of the new, abstract ::svl::IUndoManager interface. Change the SfxShell's UndoManager attribute to be an IUndoManager. Did all the resulting changes up the source tree. This way, we'll hopefully be able to provide an IUndoManager implementation in Writer, which is not based on the SfxUndoManager, but on Writer's own Undo implementation. --- sc/source/ui/docshell/docfunc.cxx | 5 ++--- sc/source/ui/docshell/docsh.cxx | 2 +- sc/source/ui/drawfunc/drawsh2.cxx | 2 +- sc/source/ui/drawfunc/drtxtob.cxx | 2 +- sc/source/ui/drawfunc/futext3.cxx | 2 +- sc/source/ui/inc/docsh.hxx | 3 ++- sc/source/ui/inc/tabvwsh.hxx | 2 +- sc/source/ui/view/auditsh.cxx | 2 +- sc/source/ui/view/dbfunc3.cxx | 2 +- sc/source/ui/view/drawview.cxx | 2 +- sc/source/ui/view/editsh.cxx | 2 +- sc/source/ui/view/formatsh.cxx | 2 +- sc/source/ui/view/gridwin.cxx | 2 +- sc/source/ui/view/pgbrksh.cxx | 2 +- sc/source/ui/view/pivotsh.cxx | 2 +- sc/source/ui/view/tabvwsh4.cxx | 4 ++-- sc/source/ui/view/tabvwsha.cxx | 4 ++-- sc/source/ui/view/tabvwshf.cxx | 2 +- sc/source/ui/view/viewfun3.cxx | 4 ++-- 19 files changed, 24 insertions(+), 24 deletions(-) mode change 100755 => 100644 sc/source/ui/view/dbfunc3.cxx (limited to 'sc/source/ui') diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 36b6641d94a6..cdb24aaf9ace 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1132,7 +1132,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con if (aTester.IsEditable()) { ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer(); - SfxUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0; + ::svl::IUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0; ScNoteData aOldData; ScPostIt* pOldNote = rDoc.ReleaseNote( rPos ); @@ -1736,8 +1736,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, } rDocShell.GetUndoManager()->LeaveListAction(); - SfxUndoManager* pMgr = rDocShell.GetUndoManager(); - pMgr->RemoveLastUndoAction(); + rDocShell.GetUndoManager()->RemoveLastUndoAction(); delete pRefUndoDoc; delete pUndoData; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index d5d7f6e09292..76e23dc09d4f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2594,7 +2594,7 @@ __EXPORT ScDocShell::~ScDocShell() //------------------------------------------------------------------ -SfxUndoManager* __EXPORT ScDocShell::GetUndoManager() +::svl::IUndoManager* __EXPORT ScDocShell::GetUndoManager() { return aDocument.GetUndoManager(); } diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 7da571fc05a7..fc3ceadd3a92 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -68,7 +68,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) : pViewData( pData ) { SetPool( &pViewData->GetScDrawView()->GetModel()->GetItemPool() ); - SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); if ( !pViewData->GetDocument()->IsUndoEnabled() ) { diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index a5159d8a8043..df1c82b17c40 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -127,7 +127,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) : SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() ); // UndoManager wird beim Umschalten in den Edit-Modus umgesetzt... - SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); if ( !pViewData->GetDocument()->IsUndoEnabled() ) { diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx index 534e68705fa8..1800dc53a744 100644 --- a/sc/source/ui/drawfunc/futext3.cxx +++ b/sc/source/ui/drawfunc/futext3.cxx @@ -85,7 +85,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/) } ScDocShell* pDocShell = rViewData.GetDocShell(); - SfxUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0; + ::svl::IUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0; bool bNewNote = false; if( pNote && pUndoMgr ) { diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 19147cfaf61f..86d20eb0132a 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -188,7 +188,8 @@ public: virtual void Activate(); virtual void Deactivate(); - virtual SfxUndoManager* GetUndoManager(); + virtual ::svl::IUndoManager* + GetUndoManager(); virtual void FillClass( SvGlobalName * pClassName, sal_uInt32 * pFormat, diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 28cc2a823928..62adbeb9089a 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -346,7 +346,7 @@ public: BOOL IsDrawTextShell() const; BOOL IsAuditShell() const; - void SetDrawTextUndo( SfxUndoManager* pUndoMgr ); + void SetDrawTextUndo( ::svl::IUndoManager* pUndoMgr ); void FillFieldData( ScHeaderFieldData& rData ); diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index 2c80c154759d..ea081b6f2fa6 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -68,7 +68,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) : nFunction( SID_FILL_ADD_PRED ) { SetPool( &pViewData->GetViewShell()->GetPool() ); - SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); if ( !pViewData->GetDocument()->IsUndoEnabled() ) { diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx old mode 100755 new mode 100644 index dbdeae1ae0b1..1ac653f88b70 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -2187,7 +2187,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const SequenceGetCellArea( nNewTab, nEndCol, nEndRow ); pInsDoc->SetClipArea( ScRange( 0, 0, nNewTab, nEndCol, nEndRow, nNewTab ) ); - SfxUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager(); String aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE ); pMgr->EnterListAction( aUndo, aUndo ); diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 1d2b797b3a9b..b716d4a0ec03 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -767,7 +767,7 @@ void ScDrawView::DeleteMarked() (void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0; - SfxUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0; + ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0; bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled(); // remove the cell note from document, we are its owner now diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 848a0a3c7636..269017804c3c 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -1174,7 +1174,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet) EditView* pTopView = pHdl->GetTopView(); if (pTopView) { - SfxUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager(); + ::svl::IUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager(); if ( rTopMgr.GetUndoActionCount() == 0 ) rSet.DisableItem( SID_UNDO ); if ( rTopMgr.GetRedoActionCount() == 0 ) diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 12a1bb87211b..6f6b10f5e362 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -161,7 +161,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) : ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); SetPool( &pTabViewShell->GetPool() ); - SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); if ( !pViewData->GetDocument()->IsUndoEnabled() ) { diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0f07b8772254..d7f0be025574 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1884,7 +1884,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) if (nMouseStatus == SC_GM_WATERUNDO) // Undo im Giesskannenmodus { - SfxUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager(); if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE ) pMgr->Undo(); else diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx index 0e792b2bb279..d5e3450f3e5a 100644 --- a/sc/source/ui/view/pgbrksh.cxx +++ b/sc/source/ui/view/pgbrksh.cxx @@ -67,7 +67,7 @@ ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) : { SetPool( &pViewSh->GetPool() ); ScViewData* pViewData = pViewSh->GetViewData(); - SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); if ( !pViewData->GetDocument()->IsUndoEnabled() ) { diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index a65f86ffed2c..b7f2e2234438 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -76,7 +76,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) : { SetPool( &pViewSh->GetPool() ); ScViewData* pViewData = pViewSh->GetViewData(); - SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); + ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); if ( !pViewData->GetDocument()->IsUndoEnabled() ) { diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 0835d08de9fd..3be2d1daed89 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1117,7 +1117,7 @@ BOOL ScTabViewShell::IsAuditShell() const return ( pAuditingShell && ( GetMySubShell() == pAuditingShell ) ); } -void ScTabViewShell::SetDrawTextUndo( SfxUndoManager* pNewUndoMgr ) +void ScTabViewShell::SetDrawTextUndo( ::svl::IUndoManager* pNewUndoMgr ) { // Default: Undo-Manager der DocShell if (!pNewUndoMgr) @@ -1764,7 +1764,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) MakeDrawView( nForceDesignMode ); ViewOptionsHasChanged(FALSE); // legt auch evtl. DrawView an - SfxUndoManager* pMgr = pDocSh->GetUndoManager(); + ::svl::IUndoManager* pMgr = pDocSh->GetUndoManager(); SetUndoManager( pMgr ); pFormShell->SetUndoManager( pMgr ); if ( !pDoc->IsUndoEnabled() ) diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 4687ab14a2a9..4d1297d74557 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -741,7 +741,7 @@ void __EXPORT ScTabViewShell::GetSaveState( SfxItemSet& rSet ) void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) { SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0); - SfxUndoManager* pUndoManager = pSh->GetUndoManager(); + ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager(); const SfxItemSet* pReqArgs = rReq.GetArgs(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); @@ -787,7 +787,7 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) void ScTabViewShell::GetUndoState(SfxItemSet &rSet) { SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0); - SfxUndoManager* pUndoManager = pSh->GetUndoManager(); + ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager(); SfxWhichIter aIter(rSet); USHORT nWhich = aIter.FirstWhich(); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 20a10f149a3a..7e02d9fa3bb8 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -676,7 +676,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // handle several sheets - SfxUndoManager* pUndoManager = pDocSh->GetUndoManager(); + ::svl::IUndoManager* pUndoManager = pDocSh->GetUndoManager(); String aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL ); pUndoManager->EnterListAction( aUndo, aUndo ); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 3104b7ed8b8f..30d7030c8c8a 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -981,7 +981,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); - SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager(); + ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager(); const BOOL bRecord(pDoc->IsUndoEnabled()); ScDocShellModificator aModificator( *pDocSh ); @@ -1583,7 +1583,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( if (pDoc->IsUndoEnabled()) { - SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager(); + ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager(); String aUndo = ScGlobal::GetRscString( pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY); pUndoMgr->EnterListAction(aUndo, aUndo); -- cgit From 4ea1a253b2bb3fff8c682f893331e91a1af29d6c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 25 Oct 2010 11:48:17 +0200 Subject: undoapi: defined, implemented, and tested the exception handling for XUndoAction/Manager::Undo --- sc/source/ui/view/tabvwsha.cxx | 87 -------------------------------------- sc/source/ui/view/tabvwshb.cxx | 94 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 87 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 4d1297d74557..9700fe3dca3f 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -34,7 +34,6 @@ #define _ZFORLIST_DECLARE_TABLE #include "scitems.hxx" -#include #include #include #include @@ -736,92 +735,6 @@ void __EXPORT ScTabViewShell::GetSaveState( SfxItemSet& rSet ) } } -//------------------------------------------------------------------ - -void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) -{ - SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0); - ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager(); - - const SfxItemSet* pReqArgs = rReq.GetArgs(); - ScDocShell* pDocSh = GetViewData()->GetDocShell(); - - USHORT nSlot = rReq.GetSlot(); - switch ( nSlot ) - { - case SID_UNDO: - case SID_REDO: - if ( pUndoManager ) - { - BOOL bIsUndo = ( nSlot == SID_UNDO ); - - USHORT nCount = 1; - const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) - nCount = ((const SfxUInt16Item*)pItem)->GetValue(); - - // lock paint for more than one cell undo action (not for editing within a cell) - BOOL bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() ); - if ( bLockPaint ) - pDocSh->LockPaint(); - - for (USHORT i=0; iUndo(); - else - pUndoManager->Redo(); - } - - if ( bLockPaint ) - pDocSh->UnlockPaint(); - - GetViewFrame()->GetBindings().InvalidateAll(sal_False); - } - break; -// default: -// GetViewFrame()->ExecuteSlot( rReq ); - } -} - -void ScTabViewShell::GetUndoState(SfxItemSet &rSet) -{ - SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0); - ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager(); - - SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); - while ( nWhich ) - { - switch (nWhich) - { - case SID_GETUNDOSTRINGS: - case SID_GETREDOSTRINGS: - { - SfxStringListItem aStrLst( nWhich ); - if ( pUndoManager ) - { - List* pList = aStrLst.GetList(); - BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); - USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount(); - for (USHORT i=0; iInsert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) : - pUndoManager->GetRedoActionComment(i) ), - LIST_APPEND ); - } - rSet.Put( aStrLst ); - } - break; - default: - // get state from sfx view frame - GetViewFrame()->GetSlotState( nWhich, NULL, &rSet ); - } - - nWhich = aIter.NextWhich(); - } -} - - //------------------------------------------------------------------ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 8f4a203ea14d..1ad0680738e5 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -61,9 +61,11 @@ #include #include #include +#include #include #include #include +#include #include "tabvwsh.hxx" #include "globstr.hrc" @@ -496,5 +498,97 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet) } +//------------------------------------------------------------------ + +void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) +{ + SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0); + ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager(); + + const SfxItemSet* pReqArgs = rReq.GetArgs(); + ScDocShell* pDocSh = GetViewData()->GetDocShell(); + + USHORT nSlot = rReq.GetSlot(); + switch ( nSlot ) + { + case SID_UNDO: + case SID_REDO: + if ( pUndoManager ) + { + BOOL bIsUndo = ( nSlot == SID_UNDO ); + + USHORT nCount = 1; + const SfxPoolItem* pItem; + if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + nCount = ((const SfxUInt16Item*)pItem)->GetValue(); + + // lock paint for more than one cell undo action (not for editing within a cell) + BOOL bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() ); + if ( bLockPaint ) + pDocSh->LockPaint(); + + try + { + for (USHORT i=0; iUndo(); + else + pUndoManager->Redo(); + } + } + catch ( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + if ( bLockPaint ) + pDocSh->UnlockPaint(); + + GetViewFrame()->GetBindings().InvalidateAll(sal_False); + } + break; +// default: +// GetViewFrame()->ExecuteSlot( rReq ); + } +} + +void ScTabViewShell::GetUndoState(SfxItemSet &rSet) +{ + SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0); + ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager(); + + SfxWhichIter aIter(rSet); + USHORT nWhich = aIter.FirstWhich(); + while ( nWhich ) + { + switch (nWhich) + { + case SID_GETUNDOSTRINGS: + case SID_GETREDOSTRINGS: + { + SfxStringListItem aStrLst( nWhich ); + if ( pUndoManager ) + { + List* pList = aStrLst.GetList(); + BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); + USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount(); + for (USHORT i=0; iInsert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) : + pUndoManager->GetRedoActionComment(i) ), + LIST_APPEND ); + } + rSet.Put( aStrLst ); + } + break; + default: + // get state from sfx view frame + GetViewFrame()->GetSlotState( nWhich, NULL, &rSet ); + } + + nWhich = aIter.NextWhich(); + } +} + -- cgit From 736a03a2c01b28c3f5c88f691e193d52783de282 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 27 Oct 2010 12:49:06 +0200 Subject: undoapi: +SfxViewShell::EnterStandardMode (so far, only dummy implementations in the apps except sw) --- sc/source/ui/inc/tabvwsh.hxx | 1 + sc/source/ui/view/tabvwsh2.cxx | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'sc/source/ui') diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 62adbeb9089a..188b32febf6e 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -230,6 +230,7 @@ protected: virtual FASTBOOL KeyInput( const KeyEvent &rKeyEvent ); virtual SdrView* GetDrawView() const; + virtual void EnterStandardMode(); public: TYPEINFO_VISIBILITY(SC_DLLPUBLIC); diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index ca47535ad2cf..4d1041067e6b 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -75,6 +75,14 @@ SdrView* __EXPORT ScTabViewShell::GetDrawView() const return ((ScTabViewShell*)this)->GetScDrawView(); // GetScDrawView ist nicht-const } +void ScTabViewShell::EnterStandardMode() +{ + // TODO: + // - finish cell text editing + // - finish shape text editing + // - more? +} + void ScTabViewShell::WindowChanged() { Window* pWin = GetActiveWin(); -- cgit From 3d6f1fbb02ba073437cff962bd63ae35e18c0511 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 27 Oct 2010 13:20:24 +0200 Subject: undoapi: no need to assert (via DBG_UNHANDLED_EXCEPTION) exceptions caught while calling IUndoManager::Undo/Redo: by defnition, the manager handled this by clearing the stacks --- sc/source/ui/view/tabvwshb.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 1ad0680738e5..4b10a616c37c 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -539,7 +539,8 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) } catch ( const uno::Exception& ) { - DBG_UNHANDLED_EXCEPTION(); + // no need to handle. By definition, the UndoManager handled this by clearing the + // Undo/Redo stacks } if ( bLockPaint ) -- cgit From 3da958037834a99e595acd7f19b6122ddd56433f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 15:32:50 +0100 Subject: undoapi: Enter/LeaveBasicCall are no-ops nowadays - removed --- sc/source/ui/app/scmod.cxx | 4 ---- sc/source/ui/docshell/docfunc.cxx | 4 ---- sc/source/ui/vba/vbaapplication.cxx | 5 ----- 3 files changed, 13 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index f7a02e1577f7..a9bb93967d2d 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -392,9 +392,7 @@ void ScModule::Execute( SfxRequest& rReq ) String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles")); SfxApplication* pApp = SFX_APP(); - pApp->EnterBasicCall(); pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() ); - pApp->LeaveBasicCall(); } break; case SID_EURO_CONVERTER: @@ -402,9 +400,7 @@ void ScModule::Execute( SfxRequest& rReq ) String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main")); SfxApplication* pApp = SFX_APP(); - pApp->EnterBasicCall(); pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() ); - pApp->LeaveBasicCall(); } break; case SID_AUTOSPELL_CHECK: diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index cdb24aaf9ace..8896b357289c 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2612,7 +2612,6 @@ script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule ) void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sSource ) { - SFX_APP()->EnterBasicCall(); SfxObjectShell& rDocSh = *rDoc.GetDocumentShell(); uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer(); DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" ); @@ -2657,12 +2656,10 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String } } - SFX_APP()->LeaveBasicCall(); } void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ) { - SFX_APP()->EnterBasicCall(); uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer(); DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" ); @@ -2684,7 +2681,6 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ) xVBAModuleInfo->removeModuleInfo( sModuleName ); } - SFX_APP()->LeaveBasicCall(); } diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index f3965393e919..cb86ac074a32 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -450,7 +450,6 @@ void SAL_CALL ScVbaApplication::wait( double time ) throw (uno::RuntimeException) { StarBASIC* pBasic = SFX_APP()->GetBasic(); - SFX_APP()->EnterBasicCall(); SbxArrayRef aArgs = new SbxArray; SbxVariableRef aRef = new SbxVariable; aRef->PutDouble( time ); @@ -464,8 +463,6 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException) // forces a broadcast SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth)); } - SFX_APP()->LeaveBasicCall(); - } uno::Any SAL_CALL @@ -1133,7 +1130,6 @@ uno::Any SAL_CALL ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException ) { StarBASIC* pBasic = SFX_APP()->GetBasic(); - SFX_APP()->EnterBasicCall(); SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD ); uno::Any aRet; if ( pMeth ) @@ -1144,7 +1140,6 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() ); aRet = sbxToUnoValue( pNew ); } - SFX_APP()->LeaveBasicCall(); return aRet; } -- cgit From c9698b400d0dccfdc31dc56eb1124c375cb6324d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 15:32:53 +0100 Subject: undoapi: made the SfxMacroConfig event more slim, by removing unused methods. In turn, got rid of SfxMacroInfo, which is not used anymore --- sc/source/ui/app/scmod.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index a9bb93967d2d..44461b4d0362 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -392,7 +392,7 @@ void ScModule::Execute( SfxRequest& rReq ) String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles")); SfxApplication* pApp = SFX_APP(); - pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() ); + SfxMacroConfig::Call( NULL, aMacroName, pApp->GetBasicManager() ); } break; case SID_EURO_CONVERTER: @@ -400,7 +400,7 @@ void ScModule::Execute( SfxRequest& rReq ) String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main")); SfxApplication* pApp = SFX_APP(); - pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() ); + SfxMacroConfig::Call( NULL, aMacroName, pApp->GetBasicManager() ); } break; case SID_AUTOSPELL_CHECK: -- cgit From dcdf1f8facb8c5be9dee6a3f6607cbedb616b94a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 15:32:54 +0100 Subject: undoapi: moved the last remaining method of SfxMacroConfig (::Call) into the SfxApplication, and got rid of the class completely --- sc/source/ui/app/scmod.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 44461b4d0362..56cfb98afc9c 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include @@ -391,16 +390,14 @@ void ScModule::Execute( SfxRequest& rReq ) { String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles")); - SfxApplication* pApp = SFX_APP(); - SfxMacroConfig::Call( NULL, aMacroName, pApp->GetBasicManager() ); + SfxApplication::CallAppBasic( aMacroName ); } break; case SID_EURO_CONVERTER: { String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main")); - SfxApplication* pApp = SFX_APP(); - SfxMacroConfig::Call( NULL, aMacroName, pApp->GetBasicManager() ); + SfxApplication::CallAppBasic( aMacroName ); } break; case SID_AUTOSPELL_CHECK: -- cgit From ff89cf3166fd36111e205a994efa57feb99c1e2e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 18 Nov 2010 12:16:57 +0100 Subject: undoapi: don't do view updates when paints are locked --- sc/source/ui/inc/docsh.hxx | 2 ++ sc/source/ui/inc/undobase.hxx | 5 +++++ sc/source/ui/undo/undobase.cxx | 16 ++++++++++++++++ sc/source/ui/undo/undoblk.cxx | 5 ++--- sc/source/ui/undo/undoblk2.cxx | 20 ++++++-------------- sc/source/ui/undo/undoblk3.cxx | 29 +++++++++++------------------ sc/source/ui/undo/undotab.cxx | 5 ++--- sc/source/ui/undo/undoutil.cxx | 5 ++++- 8 files changed, 48 insertions(+), 39 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 86d20eb0132a..ba79cd8270ea 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -334,6 +334,8 @@ public: void PostPaintGridAll(); void PostPaintExtras(); + bool IsPaintLocked() const { return pPaintLockData != NULL; } + void PostDataChanged(); void UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx index 6f2bb3572832..ea7885b2859b 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -31,6 +31,7 @@ #include #include "global.hxx" #include "address.hxx" +#include "docsh.hxx" class ScDocument; class ScDocShell; @@ -53,6 +54,10 @@ protected: ScDocShell* pDocShell; SfxUndoAction* pDetectiveUndo; + bool IsPaintLocked() const { return pDocShell->IsPaintLocked(); } + + bool SetViewMarkData( const ScMarkData& rMarkData ); + void BeginUndo(); void EndUndo(); void BeginRedo(); diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index fffb76ebd061..793b416fbee4 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -66,6 +66,19 @@ __EXPORT ScSimpleUndo::~ScSimpleUndo() delete pDetectiveUndo; } +bool ScSimpleUndo::SetViewMarkData( const ScMarkData& rMarkData ) +{ + if ( IsPaintLocked() ) + return false; + + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); + if ( !pViewShell ) + return false; + + pViewShell->SetMarkData( rMarkData ); + return true; +} + BOOL __EXPORT ScSimpleUndo::Merge( SfxUndoAction *pNextAction ) { // Zu jeder Undo-Action kann eine SdrUndoGroup fuer das Aktualisieren @@ -253,6 +266,9 @@ BOOL ScBlockUndo::AdjustHeight() void ScBlockUndo::ShowBlock() { + if ( IsPaintLocked() ) + return; + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 3fb2c74a9954..556cd3c82d93 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1600,10 +1600,8 @@ String __EXPORT ScUndoSelectionStyle::GetComment() const void ScUndoSelectionStyle::DoChange( const BOOL bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); ScRange aWorkRange( aRange ); if ( pDoc->HasAttrib( aWorkRange, HASATTR_MERGED ) ) // zusammengefasste Zellen? @@ -1635,6 +1633,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo ) pDocShell->UpdatePaintExt( nExtFlags, aWorkRange ); + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) ) /*A*/ pDocShell->PostPaint( aWorkRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags ); diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 2ab03eb71923..a7ddfaf6f23f 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -113,18 +113,13 @@ void __EXPORT ScUndoWidthOrHeight::Undo() BeginUndo(); ScDocument* pDoc = pDocShell->GetDocument(); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); SCCOLROW nPaintStart = nStart > 0 ? nStart-1 : static_cast(0); if (eMode==SC_SIZE_OPTIMAL) { - if (pViewShell) - { - pViewShell->SetMarkData( aMarkData ); - + if ( SetViewMarkData( aMarkData ) ) nPaintStart = 0; // paint all, because of changed selection - } } //! outlines from all tables? @@ -155,6 +150,7 @@ void __EXPORT ScUndoWidthOrHeight::Undo() DoSdrUndoAction( pDrawUndo, pDoc ); + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { pViewShell->UpdateScrollBars(); @@ -171,19 +167,14 @@ void __EXPORT ScUndoWidthOrHeight::Redo() { BeginRedo(); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - BOOL bPaintAll = FALSE; if (eMode==SC_SIZE_OPTIMAL) { - if (pViewShell) - { - pViewShell->SetMarkData( aMarkData ); - + if ( SetViewMarkData( aMarkData ) ) bPaintAll = TRUE; // paint all, because of changed selection - } } + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { SCTAB nTab = pViewShell->GetViewData()->GetTabNo(); @@ -192,7 +183,8 @@ void __EXPORT ScUndoWidthOrHeight::Redo() } // SetWidthOrHeight aendert aktuelle Tabelle ! - pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData ); + if ( pViewShell ) + pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData ); // paint grid if selection was changed directly at the MarkData if (bPaintAll) diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 506afeac138e..6a9c7e12af23 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -147,10 +147,8 @@ void ScUndoDeleteContents::SetChangeTrack() void ScUndoDeleteContents::DoChange( const BOOL bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); USHORT nExtFlags = 0; @@ -195,6 +193,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo ) SetChangeTrack(); } + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( !( (pViewShell) && pViewShell->AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row() ) ) ) /*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags ); @@ -341,10 +340,8 @@ void ScUndoFillTable::SetChangeTrack() void ScUndoFillTable::DoChange( const BOOL bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); if (bUndo) // nur Undo { @@ -379,6 +376,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo ) // CellContentChanged kommt mit der Markierung + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { SCTAB nTab = pViewShell->GetViewData()->GetTabNo(); @@ -485,10 +483,8 @@ String __EXPORT ScUndoSelectionAttr::GetComment() const void ScUndoSelectionAttr::DoChange( const BOOL bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); ScRange aEffRange( aRange ); if ( pDoc->HasAttrib( aEffRange, HASATTR_MERGED ) ) // zusammengefasste Zellen? @@ -515,6 +511,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo ) pDoc->ApplySelectionFrame( aMarkData, pLineOuter, pLineInner ); } + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) ) /*A*/ pDocShell->PostPaint( aEffRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags ); @@ -1165,8 +1162,7 @@ void __EXPORT ScUndoReplace::Undo() DBG_ASSERT(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL, "ScUndoReplace:: Falscher Modus"); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); //! markierte Tabellen //! Bereich merken ? @@ -1243,7 +1239,7 @@ void __EXPORT ScUndoReplace::Redo() { if (pViewShell) { - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE ); } @@ -1466,9 +1462,7 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo ScDocument* pDoc = pDocShell->GetDocument(); ShowTable( rCursorPos.Tab() ); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); SCTAB nTabCount = pDoc->GetTableCount(); // Undo/Redo-doc has only selected tables @@ -1575,9 +1569,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc) ShowTable(aRange); - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); ScRange aCopyRange = aRange; SCTAB nTabCount = pDoc->GetTableCount(); @@ -1586,6 +1578,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc) pRefDoc->CopyToDocument( aCopyRange, nFlags, bMulti, pDoc, &aMarkData ); pDocShell->PostPaint( aRange, PAINT_GRID); pDocShell->PostDataChanged(); + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) pViewShell->CellContentChanged(); } diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 70845f6c0bc9..f7520c235e56 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -901,9 +901,7 @@ void ScUndoMakeScenario::Undo() void ScUndoMakeScenario::Redo() { - ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - if (pViewShell) - pViewShell->SetMarkData( aMarkData ); + SetViewMarkData( aMarkData ); RedoSdrUndoAction( pDrawUndo ); // Draw Redo first @@ -915,6 +913,7 @@ void ScUndoMakeScenario::Redo() bDrawIsInUndo = FALSE; pDocShell->SetInUndo( FALSE ); + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) pViewShell->SetTabNo( nDestTab, TRUE ); diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx index 168975cdda3a..9cd32381c8a5 100644 --- a/sc/source/ui/undo/undoutil.cxx +++ b/sc/source/ui/undo/undoutil.cxx @@ -43,10 +43,13 @@ #include "globstr.hrc" #include "global.hxx" -void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */, +void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ ) { + if ( pDocShell->IsPaintLocked() ) + return; + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { -- cgit From 0b39390afa09c22da1e3d047f3ff87c5e50c37c7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 19 Nov 2010 10:36:41 +0100 Subject: undoapi: removed EnterStandardMode, again. The requirements / results in the different applications are that different - it does make sense to have a single method doing this, as defining its semantics is rather impossible --- sc/source/ui/inc/tabvwsh.hxx | 1 - sc/source/ui/view/tabvwsh2.cxx | 8 -------- 2 files changed, 9 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 188b32febf6e..62adbeb9089a 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -230,7 +230,6 @@ protected: virtual FASTBOOL KeyInput( const KeyEvent &rKeyEvent ); virtual SdrView* GetDrawView() const; - virtual void EnterStandardMode(); public: TYPEINFO_VISIBILITY(SC_DLLPUBLIC); diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 4d1041067e6b..ca47535ad2cf 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -75,14 +75,6 @@ SdrView* __EXPORT ScTabViewShell::GetDrawView() const return ((ScTabViewShell*)this)->GetScDrawView(); // GetScDrawView ist nicht-const } -void ScTabViewShell::EnterStandardMode() -{ - // TODO: - // - finish cell text editing - // - finish shape text editing - // - more? -} - void ScTabViewShell::WindowChanged() { Window* pWin = GetActiveWin(); -- cgit From 63ef1c015c97d5c4cda0b8be76654a3e08d96324 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Wed, 8 Dec 2010 13:48:48 +0100 Subject: chart46: #i25706# implement date axis - detect manual date formats + corrected drop range dialog --- sc/source/ui/docshell/docsh4.cxx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index bba756b397cb..c88a28c96221 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -109,6 +109,7 @@ using namespace ::com::sun::star; #include "chgviset.hxx" #include "reffact.hxx" #include "chartlis.hxx" +#include "chartpos.hxx" #include "waitoff.hxx" #include "tablink.hxx" // ScDocumentLoader statics #include "drwlayer.hxx" @@ -378,19 +379,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) BOOL bOk = TRUE; if ( !bAddRange && ( !bColInit || !bRowInit ) ) { - // Spalten/Zeilenkoepfe testen wie in chartarr + ScChartPositioner aChartPositioner( &aDocument, nTab, nCol1,nRow1, nCol2,nRow2 ); if (!bColInit) - { - for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++) - if (aDocument.HasValueData( i, nRow1, nTab )) - bColHeaders = FALSE; - } + bColHeaders = aChartPositioner.HasColHeaders(); if (!bRowInit) - { - for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++) - if (aDocument.HasValueData( nCol1, i, nTab )) - bRowHeaders = FALSE; - } + bRowHeaders = aChartPositioner.HasRowHeaders(); //CHINA001 ScColRowLabelDlg aDlg( pParent, bRowHeaders, bColHeaders ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); -- cgit From 558e0532aefac886e814bf1cb237261cf21a5e45 Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Sat, 11 Dec 2010 16:08:03 +0100 Subject: ooo33gsl13: #i115906# obtain correct data range for external references * Apparently ScTable::GetFirstDataPos() never worked as intended and selected the first non-empty row of the first non-empty column instead of also taking following columns into account where non-empty rows may be on top of that. * Caller of ScDocument::ShrinkToDataArea() must check the return value, if false there is no data in the area passed and the values obtained may be out of bounds, not in order or unmodified. * In ScExternalRefMgr a call of ScDocument::ShrinkToUsedDataArea() was intended instead of ScDocument::ShrinkToDataArea(). For this changed the return of ShrinkToUsedDataArea() to flag if there is any data and added an out parameter to flag if the area was shrunk. * Sanitized arguments and slightly optimized ScTable::ShrinkToUsedDataArea() to not have to check for >0 and ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2)) + bool bShrunk; + if (!pSrcDoc->ShrinkToUsedDataArea( bShrunk, nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2, false)) // no data within specified range. continue; @@ -1708,8 +1709,8 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken( SCCOL nDataCol1 = 0, nDataCol2 = MAXCOL; SCROW nDataRow1 = 0, nDataRow2 = MAXROW; - pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2); - if (rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row()) + bool bData = pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2); + if (!bData || rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row()) { // requested cell is outside the data area. Don't even bother caching // this data, but add it to the cached range to prevent accessing the diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 1e5a6b9da4ae..f2a277b987df 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -159,7 +159,10 @@ ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection e ScDocument* pDoc = pDocSh->GetDocument(); SCCOL nCol1 = aRange.aStart.Col(), nCol2 = aRange.aEnd.Col(); SCROW nRow1 = aRange.aStart.Row(), nRow2 = aRange.aEnd.Row(); - if (pDoc->ShrinkToUsedDataArea( aRange.aStart.Tab(), nCol1, nRow1, nCol2, nRow2, bShrinkColumnsOnly)) + bool bShrunk; + pDoc->ShrinkToUsedDataArea( bShrunk, aRange.aStart.Tab(), + nCol1, nRow1, nCol2, nRow2, bShrinkColumnsOnly); + if (bShrunk) { aRange.aStart.SetCol(nCol1); aRange.aEnd.SetCol(nCol2); diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index c0af39226c3f..6034ac81ecba 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -97,7 +97,9 @@ String __EXPORT ScTabViewShell::GetSelectionText( BOOL bWholeWord ) SCROW nRow1, nRow2; SCTAB nTab1, nTab2; aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); - if (pDoc->ShrinkToUsedDataArea( nTab1, nCol1, nRow1, nCol2, nRow2, false)) + bool bShrunk; + pDoc->ShrinkToUsedDataArea( bShrunk, nTab1, nCol1, nRow1, nCol2, nRow2, false); + if (bShrunk) { aRange.aStart.SetCol( nCol1 ); aRange.aStart.SetRow( nRow1 ); -- cgit From fa47896d1aa97f7b796cdfe51f62b8398f767423 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 12:33:22 +0100 Subject: undoapi: (I|Sfx)UndoManager now working with size_t instead of USHORT --- sc/source/ui/view/tabvwshb.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 38daeccfa617..b13707a8378b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -564,8 +564,8 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet) { List* pList = aStrLst.GetList(); BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); - USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount(); - for (USHORT i=0; iGetUndoActionCount() : pUndoManager->GetRedoActionCount(); + for (size_t i=0; iInsert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) : pUndoManager->GetRedoActionComment(i) ), LIST_APPEND ); -- cgit From bd22a91eadd65c44a185347d6965802e75a3d630 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 12 Jan 2011 12:05:07 +0100 Subject: CWS gnumake3: #i116422#: convert svx to new build system --- sc/source/ui/view/cellsh.cxx | 3 --- sc/source/ui/view/formatsh.cxx | 3 --- sc/source/ui/view/tabvwsh.cxx | 3 --- 3 files changed, 9 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index c880a29f8067..c3f763cf1a77 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -71,9 +71,6 @@ #define CellMovement #include "scslots.hxx" -#define SearchSettings -#include - TYPEINIT1( ScCellShell, ScFormatShell ); SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) ) diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 12a1bb87211b..1ae8980ff21c 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -105,9 +105,6 @@ #define FormatForSelection #include "scslots.hxx" -#define Interior -#include - #include "scabstdlg.hxx" //CHINA001 namespace { diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx index 4b0060c88c4d..bdeb74a2d101 100644 --- a/sc/source/ui/view/tabvwsh.cxx +++ b/sc/source/ui/view/tabvwsh.cxx @@ -57,9 +57,6 @@ #define ScTabViewShell #include "scslots.hxx" -#define SearchSettings -#include - TYPEINIT2(ScTabViewShell,SfxViewShell,SfxListener); SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL)) -- cgit From cd42389ad67b403a07a0dda8e2a6e213def49251 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 17 Jan 2011 13:20:22 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from sc --- sc/source/ui/Accessibility/AccessibleCell.cxx | 2 +- sc/source/ui/Accessibility/AccessibleCellBase.cxx | 2 +- sc/source/ui/Accessibility/AccessibleDocument.cxx | 4 +- .../AccessibleDocumentPagePreview.cxx | 2 +- .../Accessibility/AccessiblePreviewHeaderCell.cxx | 2 +- .../ui/Accessibility/AccessiblePreviewTable.cxx | 2 +- sc/source/ui/Accessibility/AccessibleText.cxx | 66 +- sc/source/ui/app/client.cxx | 6 +- sc/source/ui/app/drwtrans.cxx | 46 +- sc/source/ui/app/inputhdl.cxx | 730 ++++++++-------- sc/source/ui/app/inputwin.cxx | 182 ++-- sc/source/ui/app/msgpool.cxx | 8 +- sc/source/ui/app/rfindlst.cxx | 4 +- sc/source/ui/app/scdll.cxx | 66 +- sc/source/ui/app/scmod.cxx | 240 +++--- sc/source/ui/app/scmod2.cxx | 12 +- sc/source/ui/app/seltrans.cxx | 26 +- sc/source/ui/app/template.cxx | 10 +- sc/source/ui/app/transobj.cxx | 74 +- sc/source/ui/app/uiitems.cxx | 50 +- sc/source/ui/attrdlg/attrdlg.cxx | 4 +- sc/source/ui/attrdlg/condfrmt.cxx | 44 +- sc/source/ui/attrdlg/scdlgfact.cxx | 140 ++-- sc/source/ui/attrdlg/scdlgfact.hxx | 142 ++-- sc/source/ui/attrdlg/tabpages.cxx | 32 +- sc/source/ui/cctrl/cbuttonw.cxx | 16 +- sc/source/ui/cctrl/dpcontrol.cxx | 8 +- sc/source/ui/cctrl/popmenu.cxx | 2 +- sc/source/ui/cctrl/tbinsert.cxx | 20 +- sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 46 +- sc/source/ui/dbgui/asciiopt.cxx | 64 +- sc/source/ui/dbgui/consdlg.cxx | 46 +- sc/source/ui/dbgui/csvgrid.cxx | 8 +- sc/source/ui/dbgui/csvruler.cxx | 2 +- sc/source/ui/dbgui/dapidata.cxx | 4 +- sc/source/ui/dbgui/dapitype.cxx | 6 +- sc/source/ui/dbgui/dbnamdlg.cxx | 82 +- sc/source/ui/dbgui/dpgroupdlg.cxx | 14 +- sc/source/ui/dbgui/fieldwnd.cxx | 22 +- sc/source/ui/dbgui/filtdlg.cxx | 232 ++--- sc/source/ui/dbgui/foptmgr.cxx | 26 +- sc/source/ui/dbgui/imoptdlg.cxx | 6 +- sc/source/ui/dbgui/pfiltdlg.cxx | 52 +- sc/source/ui/dbgui/pvfundlg.cxx | 64 +- sc/source/ui/dbgui/pvlaydlg.cxx | 154 ++-- sc/source/ui/dbgui/scendlg.cxx | 36 +- sc/source/ui/dbgui/scuiasciiopt.cxx | 20 +- sc/source/ui/dbgui/scuiimoptdlg.cxx | 24 +- sc/source/ui/dbgui/sfiltdlg.cxx | 64 +- sc/source/ui/dbgui/sortdlg.cxx | 8 +- sc/source/ui/dbgui/tpsort.cxx | 102 +-- sc/source/ui/dbgui/tpsubt.cxx | 108 +-- sc/source/ui/dbgui/validate.cxx | 98 +-- sc/source/ui/docshell/arealink.cxx | 60 +- sc/source/ui/docshell/autostyl.cxx | 50 +- sc/source/ui/docshell/dbdocfun.cxx | 312 +++---- sc/source/ui/docshell/dbdocimp.cxx | 104 +-- sc/source/ui/docshell/docfunc.cxx | 848 +++++++++---------- sc/source/ui/docshell/docsh.cxx | 360 ++++---- sc/source/ui/docshell/docsh2.cxx | 16 +- sc/source/ui/docshell/docsh3.cxx | 176 ++-- sc/source/ui/docshell/docsh4.cxx | 294 +++---- sc/source/ui/docshell/docsh5.cxx | 164 ++-- sc/source/ui/docshell/docsh6.cxx | 80 +- sc/source/ui/docshell/docsh8.cxx | 78 +- sc/source/ui/docshell/editable.cxx | 44 +- sc/source/ui/docshell/externalrefmgr.cxx | 8 +- sc/source/ui/docshell/impex.cxx | 314 +++---- sc/source/ui/docshell/olinefun.cxx | 226 ++--- sc/source/ui/docshell/pagedata.cxx | 14 +- sc/source/ui/docshell/pntlock.cxx | 6 +- sc/source/ui/docshell/servobj.cxx | 38 +- sc/source/ui/docshell/sizedev.cxx | 6 +- sc/source/ui/docshell/tablink.cxx | 106 +-- sc/source/ui/docshell/tpstat.cxx | 4 +- sc/source/ui/drawfunc/drawsh.cxx | 56 +- sc/source/ui/drawfunc/drawsh2.cxx | 52 +- sc/source/ui/drawfunc/drawsh4.cxx | 4 +- sc/source/ui/drawfunc/drawsh5.cxx | 52 +- sc/source/ui/drawfunc/drtxtob.cxx | 122 +-- sc/source/ui/drawfunc/drtxtob1.cxx | 10 +- sc/source/ui/drawfunc/drtxtob2.cxx | 28 +- sc/source/ui/drawfunc/fuconarc.cxx | 24 +- sc/source/ui/drawfunc/fuconcustomshape.cxx | 20 +- sc/source/ui/drawfunc/fuconpol.cxx | 38 +- sc/source/ui/drawfunc/fuconrec.cxx | 22 +- sc/source/ui/drawfunc/fuconstr.cxx | 48 +- sc/source/ui/drawfunc/fuconuno.cxx | 24 +- sc/source/ui/drawfunc/fudraw.cxx | 122 +-- sc/source/ui/drawfunc/fuins1.cxx | 24 +- sc/source/ui/drawfunc/fuins2.cxx | 44 +- sc/source/ui/drawfunc/fumark.cxx | 44 +- sc/source/ui/drawfunc/fupoor.cxx | 32 +- sc/source/ui/drawfunc/fusel.cxx | 88 +- sc/source/ui/drawfunc/fusel2.cxx | 20 +- sc/source/ui/drawfunc/futext.cxx | 92 +- sc/source/ui/drawfunc/futext3.cxx | 6 +- sc/source/ui/drawfunc/graphsh.cxx | 4 +- sc/source/ui/drawfunc/mediash.cxx | 4 +- sc/source/ui/formdlg/dwfunctr.cxx | 84 +- sc/source/ui/formdlg/formula.cxx | 78 +- sc/source/ui/formdlg/privsplt.cxx | 12 +- sc/source/ui/inc/IAnyRefDialog.hxx | 10 +- sc/source/ui/inc/acredlin.hxx | 60 +- sc/source/ui/inc/anyrefdg.hxx | 52 +- sc/source/ui/inc/areasave.hxx | 10 +- sc/source/ui/inc/areasdlg.hxx | 10 +- sc/source/ui/inc/asciiopt.hxx | 44 +- sc/source/ui/inc/attrdlg.hxx | 2 +- sc/source/ui/inc/auditsh.hxx | 2 +- sc/source/ui/inc/autofmt.hxx | 24 +- sc/source/ui/inc/autostyl.hxx | 10 +- sc/source/ui/inc/cbutton.hxx | 14 +- sc/source/ui/inc/cellsh.hxx | 4 +- sc/source/ui/inc/colrowba.hxx | 26 +- sc/source/ui/inc/condfrmt.hxx | 6 +- sc/source/ui/inc/conflictsdlg.hxx | 30 +- sc/source/ui/inc/consdlg.hxx | 16 +- sc/source/ui/inc/content.hxx | 48 +- sc/source/ui/inc/corodlg.hxx | 8 +- sc/source/ui/inc/crdlg.hxx | 2 +- sc/source/ui/inc/crnrdlg.hxx | 12 +- sc/source/ui/inc/csvruler.hxx | 6 +- sc/source/ui/inc/dapitype.hxx | 6 +- sc/source/ui/inc/dbdocfun.hxx | 36 +- sc/source/ui/inc/dbfunc.hxx | 64 +- sc/source/ui/inc/dbnamdlg.hxx | 8 +- sc/source/ui/inc/delcldlg.hxx | 2 +- sc/source/ui/inc/delcodlg.hxx | 12 +- sc/source/ui/inc/docfunc.hxx | 152 ++-- sc/source/ui/inc/docsh.hxx | 188 ++--- sc/source/ui/inc/dpcontrol.hxx | 2 +- sc/source/ui/inc/drawsh.hxx | 8 +- sc/source/ui/inc/drawview.hxx | 14 +- sc/source/ui/inc/drtxtob.hxx | 10 +- sc/source/ui/inc/drwtrans.hxx | 14 +- sc/source/ui/inc/dwfunctr.hxx | 22 +- sc/source/ui/inc/editable.hxx | 10 +- sc/source/ui/inc/editsh.hxx | 6 +- sc/source/ui/inc/fieldwnd.hxx | 14 +- sc/source/ui/inc/filldlg.hxx | 14 +- sc/source/ui/inc/filtdlg.hxx | 34 +- sc/source/ui/inc/foptmgr.hxx | 2 +- sc/source/ui/inc/formula.hxx | 22 +- sc/source/ui/inc/fuconarc.hxx | 8 +- sc/source/ui/inc/fuconcustomshape.hxx | 8 +- sc/source/ui/inc/fuconpol.hxx | 8 +- sc/source/ui/inc/fuconrec.hxx | 8 +- sc/source/ui/inc/fuconstr.hxx | 12 +- sc/source/ui/inc/fuconuno.hxx | 12 +- sc/source/ui/inc/fudraw.hxx | 10 +- sc/source/ui/inc/fuedipo.hxx | 8 +- sc/source/ui/inc/fumark.hxx | 14 +- sc/source/ui/inc/funcpage.hxx | 14 +- sc/source/ui/inc/funcutl.hxx | 6 +- sc/source/ui/inc/fupoor.hxx | 16 +- sc/source/ui/inc/fusel.hxx | 14 +- sc/source/ui/inc/futext.hxx | 14 +- sc/source/ui/inc/gridmerg.hxx | 4 +- sc/source/ui/inc/gridwin.hxx | 114 +-- sc/source/ui/inc/groupdlg.hxx | 8 +- sc/source/ui/inc/hdrcont.hxx | 36 +- sc/source/ui/inc/hfedtdlg.hxx | 4 +- sc/source/ui/inc/highred.hxx | 6 +- sc/source/ui/inc/hiranges.hxx | 4 +- sc/source/ui/inc/imoptdlg.hxx | 14 +- sc/source/ui/inc/impex.hxx | 86 +- sc/source/ui/inc/inputhdl.hxx | 102 +-- sc/source/ui/inc/inputwin.hxx | 36 +- sc/source/ui/inc/inscldlg.hxx | 2 +- sc/source/ui/inc/inscodlg.hxx | 40 +- sc/source/ui/inc/instbdlg.hxx | 12 +- sc/source/ui/inc/lbseldlg.hxx | 4 +- sc/source/ui/inc/linkarea.hxx | 4 +- sc/source/ui/inc/msgpool.hxx | 2 +- sc/source/ui/inc/mtrindlg.hxx | 4 +- sc/source/ui/inc/mvtabdlg.hxx | 12 +- sc/source/ui/inc/namecrea.hxx | 4 +- sc/source/ui/inc/namedlg.hxx | 10 +- sc/source/ui/inc/namepast.hxx | 2 +- sc/source/ui/inc/navcitem.hxx | 4 +- sc/source/ui/inc/navipi.hxx | 24 +- sc/source/ui/inc/navsett.hxx | 18 +- sc/source/ui/inc/notemark.hxx | 10 +- sc/source/ui/inc/olinefun.hxx | 24 +- sc/source/ui/inc/olinewin.hxx | 2 +- sc/source/ui/inc/opredlin.hxx | 2 +- sc/source/ui/inc/optload.hxx | 2 +- sc/source/ui/inc/optsolver.hxx | 20 +- sc/source/ui/inc/output.hxx | 86 +- sc/source/ui/inc/pagedata.hxx | 14 +- sc/source/ui/inc/parawin.hxx | 46 +- sc/source/ui/inc/pfiltdlg.hxx | 10 +- sc/source/ui/inc/pfuncache.hxx | 4 +- sc/source/ui/inc/pntlock.hxx | 24 +- sc/source/ui/inc/popmenu.hxx | 12 +- sc/source/ui/inc/preview.hxx | 64 +- sc/source/ui/inc/prevloc.hxx | 40 +- sc/source/ui/inc/prevwsh.hxx | 26 +- sc/source/ui/inc/printfun.hxx | 118 +-- sc/source/ui/inc/privsplt.hxx | 4 +- sc/source/ui/inc/pvfundlg.hxx | 10 +- sc/source/ui/inc/pvlaydlg.hxx | 26 +- sc/source/ui/inc/redcom.hxx | 2 +- sc/source/ui/inc/reffact.hxx | 16 +- sc/source/ui/inc/refundo.hxx | 2 +- sc/source/ui/inc/rfindlst.hxx | 16 +- sc/source/ui/inc/scendlg.hxx | 8 +- sc/source/ui/inc/scuiasciiopt.hxx | 12 +- sc/source/ui/inc/scuiautofmt.hxx | 8 +- sc/source/ui/inc/scuiimoptdlg.hxx | 10 +- sc/source/ui/inc/scuitphfedit.hxx | 16 +- sc/source/ui/inc/select.hxx | 24 +- sc/source/ui/inc/seltrans.hxx | 2 +- sc/source/ui/inc/servobj.hxx | 6 +- sc/source/ui/inc/shtabdlg.hxx | 8 +- sc/source/ui/inc/simpref.hxx | 22 +- sc/source/ui/inc/sizedev.hxx | 4 +- sc/source/ui/inc/solvrdlg.hxx | 8 +- sc/source/ui/inc/sortdlg.hxx | 20 +- sc/source/ui/inc/spelldialog.hxx | 2 +- sc/source/ui/inc/spelleng.hxx | 4 +- sc/source/ui/inc/styledlg.hxx | 6 +- sc/source/ui/inc/tabcont.hxx | 12 +- sc/source/ui/inc/tabopdlg.hxx | 6 +- sc/source/ui/inc/tabpages.hxx | 16 +- sc/source/ui/inc/tabsplit.hxx | 4 +- sc/source/ui/inc/tabview.hxx | 162 ++-- sc/source/ui/inc/tabvwsh.hxx | 142 ++-- sc/source/ui/inc/tbinsert.hxx | 10 +- sc/source/ui/inc/tbzoomsliderctrl.hxx | 10 +- sc/source/ui/inc/textdlgs.hxx | 4 +- sc/source/ui/inc/tpcalc.hxx | 6 +- sc/source/ui/inc/tphf.hxx | 12 +- sc/source/ui/inc/tphfedit.hxx | 20 +- sc/source/ui/inc/tpprint.hxx | 4 +- sc/source/ui/inc/tpsort.hxx | 24 +- sc/source/ui/inc/tpstat.hxx | 2 +- sc/source/ui/inc/tpsubt.hxx | 30 +- sc/source/ui/inc/tptable.hxx | 4 +- sc/source/ui/inc/tpusrlst.hxx | 22 +- sc/source/ui/inc/tpview.hxx | 4 +- sc/source/ui/inc/transobj.hxx | 14 +- sc/source/ui/inc/uiitems.hxx | 58 +- sc/source/ui/inc/undobase.hxx | 14 +- sc/source/ui/inc/undoblk.hxx | 258 +++--- sc/source/ui/inc/undocell.hxx | 76 +- sc/source/ui/inc/undodat.hxx | 108 +-- sc/source/ui/inc/undodraw.hxx | 10 +- sc/source/ui/inc/undoolk.hxx | 2 +- sc/source/ui/inc/undostyl.hxx | 4 +- sc/source/ui/inc/undotab.hxx | 92 +- sc/source/ui/inc/validate.hxx | 26 +- sc/source/ui/inc/viewdata.hxx | 122 +-- sc/source/ui/inc/viewfunc.hxx | 198 ++--- sc/source/ui/inc/viewutil.hxx | 16 +- sc/source/ui/miscdlgs/acredlin.cxx | 404 ++++----- sc/source/ui/miscdlgs/anyrefdg.cxx | 144 ++-- sc/source/ui/miscdlgs/autofmt.cxx | 88 +- sc/source/ui/miscdlgs/conflictsdlg.cxx | 38 +- sc/source/ui/miscdlgs/crdlg.cxx | 2 +- sc/source/ui/miscdlgs/crnrdlg.cxx | 106 +-- sc/source/ui/miscdlgs/delcldlg.cxx | 4 +- sc/source/ui/miscdlgs/delcodlg.cxx | 18 +- sc/source/ui/miscdlgs/filldlg.cxx | 30 +- sc/source/ui/miscdlgs/groupdlg.cxx | 8 +- sc/source/ui/miscdlgs/highred.cxx | 32 +- sc/source/ui/miscdlgs/inscldlg.cxx | 4 +- sc/source/ui/miscdlgs/inscodlg.cxx | 68 +- sc/source/ui/miscdlgs/instbdlg.cxx | 12 +- sc/source/ui/miscdlgs/lbseldlg.cxx | 4 +- sc/source/ui/miscdlgs/linkarea.cxx | 32 +- sc/source/ui/miscdlgs/mtrindlg.cxx | 10 +- sc/source/ui/miscdlgs/mvtabdlg.cxx | 32 +- sc/source/ui/miscdlgs/namecrea.cxx | 14 +- sc/source/ui/miscdlgs/namepast.cxx | 6 +- sc/source/ui/miscdlgs/optsolver.cxx | 30 +- sc/source/ui/miscdlgs/protectiondlg.cxx | 6 +- sc/source/ui/miscdlgs/redcom.cxx | 12 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 50 +- sc/source/ui/miscdlgs/sharedocdlg.cxx | 14 +- sc/source/ui/miscdlgs/shtabdlg.cxx | 8 +- sc/source/ui/miscdlgs/simpref.cxx | 34 +- sc/source/ui/miscdlgs/solveroptions.cxx | 26 +- sc/source/ui/miscdlgs/solvrdlg.cxx | 18 +- sc/source/ui/miscdlgs/tabbgcolordlg.cxx | 14 +- sc/source/ui/miscdlgs/tabopdlg.cxx | 18 +- sc/source/ui/miscdlgs/textdlgs.cxx | 4 +- sc/source/ui/miscdlgs/warnbox.cxx | 4 +- sc/source/ui/namedlg/namedlg.cxx | 78 +- sc/source/ui/navipi/content.cxx | 226 ++--- sc/source/ui/navipi/navcitem.cxx | 8 +- sc/source/ui/navipi/navipi.cxx | 104 +-- sc/source/ui/navipi/scenwnd.cxx | 10 +- sc/source/ui/optdlg/opredlin.cxx | 30 +- sc/source/ui/optdlg/tpcalc.cxx | 18 +- sc/source/ui/optdlg/tpprint.cxx | 16 +- sc/source/ui/optdlg/tpusrlst.cxx | 68 +- sc/source/ui/optdlg/tpview.cxx | 98 +-- sc/source/ui/pagedlg/areasdlg.cxx | 104 +-- sc/source/ui/pagedlg/hfedtdlg.cxx | 10 +- sc/source/ui/pagedlg/scuitphfedit.cxx | 34 +- sc/source/ui/pagedlg/tphf.cxx | 20 +- sc/source/ui/pagedlg/tphfedit.cxx | 58 +- sc/source/ui/pagedlg/tptable.cxx | 102 +-- sc/source/ui/styleui/styledlg.cxx | 8 +- sc/source/ui/undo/areasave.cxx | 34 +- sc/source/ui/undo/refundo.cxx | 6 +- sc/source/ui/undo/undobase.cxx | 58 +- sc/source/ui/undo/undoblk.cxx | 276 +++--- sc/source/ui/undo/undoblk2.cxx | 16 +- sc/source/ui/undo/undoblk3.cxx | 220 ++--- sc/source/ui/undo/undocell.cxx | 130 +-- sc/source/ui/undo/undodat.cxx | 298 +++---- sc/source/ui/undo/undodraw.cxx | 16 +- sc/source/ui/undo/undoolk.cxx | 2 +- sc/source/ui/undo/undostyl.cxx | 24 +- sc/source/ui/undo/undotab.cxx | 310 +++---- sc/source/ui/undo/undoutil.cxx | 10 +- sc/source/ui/unoobj/addruno.cxx | 6 +- sc/source/ui/unoobj/afmtuno.cxx | 10 +- sc/source/ui/unoobj/appluno.cxx | 92 +- sc/source/ui/unoobj/cellsuno.cxx | 930 ++++++++++----------- sc/source/ui/unoobj/chart2uno.cxx | 12 +- sc/source/ui/unoobj/chartuno.cxx | 26 +- sc/source/ui/unoobj/confuno.cxx | 6 +- sc/source/ui/unoobj/cursuno.cxx | 10 +- sc/source/ui/unoobj/dapiuno.cxx | 84 +- sc/source/ui/unoobj/datauno.cxx | 146 ++-- sc/source/ui/unoobj/defltuno.cxx | 2 +- sc/source/ui/unoobj/dispuno.cxx | 16 +- sc/source/ui/unoobj/docuno.cxx | 236 +++--- sc/source/ui/unoobj/editsrc.cxx | 16 +- sc/source/ui/unoobj/fielduno.cxx | 54 +- sc/source/ui/unoobj/fmtuno.cxx | 40 +- sc/source/ui/unoobj/funcuno.cxx | 52 +- sc/source/ui/unoobj/linkuno.cxx | 100 +-- sc/source/ui/unoobj/miscuno.cxx | 6 +- sc/source/ui/unoobj/nameuno.cxx | 18 +- sc/source/ui/unoobj/optuno.cxx | 6 +- sc/source/ui/unoobj/scdetect.cxx | 106 +-- sc/source/ui/unoobj/servuno.cxx | 2 +- sc/source/ui/unoobj/shapeuno.cxx | 22 +- sc/source/ui/unoobj/srchuno.cxx | 22 +- sc/source/ui/unoobj/styleuno.cxx | 122 +-- sc/source/ui/unoobj/targuno.cxx | 2 +- sc/source/ui/unoobj/textuno.cxx | 68 +- sc/source/ui/unoobj/viewuno.cxx | 188 ++--- sc/source/ui/vba/excelvbahelper.cxx | 6 +- sc/source/ui/vba/vbafont.cxx | 18 +- sc/source/ui/vba/vbaformat.cxx | 8 +- sc/source/ui/vba/vbahelper.cxx | 10 +- sc/source/ui/vba/vbahyperlinks.cxx | 2 +- sc/source/ui/vba/vbapagesetup.cxx | 12 +- sc/source/ui/vba/vbarange.cxx | 106 +-- sc/source/ui/vba/vbawindow.cxx | 2 +- sc/source/ui/vba/vbaworksheets.cxx | 2 +- sc/source/ui/view/auditsh.cxx | 12 +- sc/source/ui/view/cellsh.cxx | 106 +-- sc/source/ui/view/cellsh1.cxx | 214 ++--- sc/source/ui/view/cellsh2.cxx | 216 ++--- sc/source/ui/view/cellsh3.cxx | 116 +-- sc/source/ui/view/cellsh4.cxx | 52 +- sc/source/ui/view/colrowba.cxx | 50 +- sc/source/ui/view/dbfunc.cxx | 76 +- sc/source/ui/view/dbfunc2.cxx | 4 +- sc/source/ui/view/dbfunc3.cxx | 322 +++---- sc/source/ui/view/dbfunc4.cxx | 14 +- sc/source/ui/view/drawattr.cxx | 6 +- sc/source/ui/view/drawutil.cxx | 4 +- sc/source/ui/view/drawvie3.cxx | 22 +- sc/source/ui/view/drawvie4.cxx | 42 +- sc/source/ui/view/drawview.cxx | 106 +-- sc/source/ui/view/editsh.cxx | 130 +-- sc/source/ui/view/formatsh.cxx | 242 +++--- sc/source/ui/view/galwrap.cxx | 4 +- sc/source/ui/view/gridmerg.cxx | 6 +- sc/source/ui/view/gridwin.cxx | 686 +++++++-------- sc/source/ui/view/gridwin2.cxx | 164 ++-- sc/source/ui/view/gridwin3.cxx | 76 +- sc/source/ui/view/gridwin4.cxx | 242 +++--- sc/source/ui/view/gridwin5.cxx | 46 +- sc/source/ui/view/hdrcont.cxx | 134 +-- sc/source/ui/view/hintwin.cxx | 2 +- sc/source/ui/view/imapwrap.cxx | 2 +- sc/source/ui/view/invmerge.cxx | 6 +- sc/source/ui/view/notemark.cxx | 10 +- sc/source/ui/view/olinewin.cxx | 64 +- sc/source/ui/view/output.cxx | 298 +++---- sc/source/ui/view/output2.cxx | 566 ++++++------- sc/source/ui/view/output3.cxx | 8 +- sc/source/ui/view/pfuncache.cxx | 6 +- sc/source/ui/view/pivotsh.cxx | 6 +- sc/source/ui/view/preview.cxx | 254 +++--- sc/source/ui/view/prevloc.cxx | 186 ++--- sc/source/ui/view/prevwsh.cxx | 104 +-- sc/source/ui/view/prevwsh2.cxx | 14 +- sc/source/ui/view/printfun.cxx | 374 ++++----- sc/source/ui/view/reffact.cxx | 28 +- sc/source/ui/view/select.cxx | 202 ++--- sc/source/ui/view/selectionstate.cxx | 6 +- sc/source/ui/view/spelldialog.cxx | 8 +- sc/source/ui/view/spelleng.cxx | 14 +- sc/source/ui/view/tabcont.cxx | 80 +- sc/source/ui/view/tabsplit.cxx | 6 +- sc/source/ui/view/tabview.cxx | 274 +++--- sc/source/ui/view/tabview2.cxx | 132 +-- sc/source/ui/view/tabview3.cxx | 330 ++++---- sc/source/ui/view/tabview4.cxx | 52 +- sc/source/ui/view/tabview5.cxx | 68 +- sc/source/ui/view/tabvwsh2.cxx | 48 +- sc/source/ui/view/tabvwsh3.cxx | 156 ++-- sc/source/ui/view/tabvwsh4.cxx | 374 ++++----- sc/source/ui/view/tabvwsh5.cxx | 26 +- sc/source/ui/view/tabvwsh8.cxx | 6 +- sc/source/ui/view/tabvwsh9.cxx | 34 +- sc/source/ui/view/tabvwsha.cxx | 78 +- sc/source/ui/view/tabvwshb.cxx | 16 +- sc/source/ui/view/tabvwshc.cxx | 18 +- sc/source/ui/view/tabvwshd.cxx | 2 +- sc/source/ui/view/tabvwshe.cxx | 24 +- sc/source/ui/view/tabvwshf.cxx | 74 +- sc/source/ui/view/tabvwshh.cxx | 12 +- sc/source/ui/view/viewdata.cxx | 304 +++---- sc/source/ui/view/viewfun2.cxx | 478 +++++------ sc/source/ui/view/viewfun3.cxx | 206 ++--- sc/source/ui/view/viewfun4.cxx | 96 +-- sc/source/ui/view/viewfun5.cxx | 72 +- sc/source/ui/view/viewfun6.cxx | 16 +- sc/source/ui/view/viewfun7.cxx | 50 +- sc/source/ui/view/viewfunc.cxx | 520 ++++++------ sc/source/ui/view/viewutil.cxx | 86 +- 432 files changed, 13404 insertions(+), 13404 deletions(-) mode change 100755 => 100644 sc/source/ui/inc/fieldwnd.hxx mode change 100755 => 100644 sc/source/ui/unoobj/dapiuno.cxx (limited to 'sc/source/ui') diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index 434ea2dea40c..5621453ae006 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -179,7 +179,7 @@ Rectangle ScAccessibleCell::GetBoundingBox(void) const mpViewShell->GetViewData()->GetMergeSizePixel( maCellAddress.Col(), maCellAddress.Row(), nSizeX, nSizeY); aCellRect.SetSize(Size(nSizeX, nSizeY)); - aCellRect.SetPos(mpViewShell->GetViewData()->GetScrPos(maCellAddress.Col(), maCellAddress.Row(), meSplitPos, TRUE)); + aCellRect.SetPos(mpViewShell->GetViewData()->GetScrPos(maCellAddress.Col(), maCellAddress.Row(), meSplitPos, sal_True)); Window* pWindow = mpViewShell->GetWindowByPos(meSplitPos); if (pWindow) diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx index cc93d0a93350..4bd8a64434e6 100644 --- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx @@ -278,7 +278,7 @@ sal_Bool SAL_CALL { ScDocShell* pDocShell = (ScDocShell*) mpDoc->GetDocumentShell(); ScDocFunc aFunc(*pDocShell); - bResult = aFunc.PutCell( maCellAddress, new ScValueCell(fValue), TRUE ); + bResult = aFunc.PutCell( maCellAddress, new ScValueCell(fValue), sal_True ); } } return bResult; diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 4c65632fb45e..2bc7dba9c392 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -362,7 +362,7 @@ void ScChildrenShapes::SetDrawBroadcaster() SfxBroadcaster* pDrawBC = mpViewShell->GetViewData()->GetDocument()->GetDrawBroadcaster(); if (pDrawBC) { - StartListening(*pDrawBC, TRUE); + StartListening(*pDrawBC, sal_True); maShapeTreeInfo.SetModelBroadcaster( new ScDrawModelBroadcaster(mpViewShell->GetViewData()->GetDocument()->GetDrawLayer()) ); maShapeTreeInfo.SetSdrView(mpViewShell->GetViewData()->GetScDrawView()); @@ -1246,7 +1246,7 @@ ScAccessibleDocument::ScAccessibleDocument( if( pWin ) { pWin->AddChildEventListener( LINK( this, ScAccessibleDocument, WindowChildEventListener )); - USHORT nCount = pWin->GetChildCount(); + sal_uInt16 nCount = pWin->GetChildCount(); for( sal_uInt16 i=0; i < nCount; ++i ) { Window *pChildWin = pWin->GetChild( i ); diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 894e57d3802e..cccdd729c0b1 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -772,7 +772,7 @@ void ScShapeChilds::SetDrawBroadcaster() { SfxBroadcaster* pDrawBC = mpViewShell->GetDocument()->GetDrawBroadcaster(); if (pDrawBC) - StartListening(*pDrawBC, TRUE); + StartListening(*pDrawBC, sal_True); } } diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index 3bb66ae01d4f..1085c232538c 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -104,7 +104,7 @@ void ScAccessiblePreviewHeaderCell::Notify( SfxBroadcaster& rBC, const SfxHint& if (rHint.ISA( SfxSimpleHint )) { const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint; - ULONG nId = rRef.GetId(); + sal_uLong nId = rRef.GetId(); if (nId == SC_HINT_ACC_VISAREACHANGED) { if (mpTextHelper) diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index e3fe26f47b4d..c60a0b93b75a 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -102,7 +102,7 @@ void ScAccessiblePreviewTable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint if (rHint.ISA( SfxSimpleHint )) { const SfxSimpleHint& rRef = (const SfxSimpleHint&)rHint; - ULONG nId = rRef.GetId(); + sal_uLong nId = rRef.GetId(); if ( nId == SFX_HINT_DATACHANGED ) { // column / row layout may change with any document change, diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 4073e23f837f..a1dde515099d 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -66,7 +66,7 @@ public: ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell); virtual ~ScViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -86,7 +86,7 @@ ScViewForwarder::~ScViewForwarder() { } -BOOL ScViewForwarder::IsValid() const +sal_Bool ScViewForwarder::IsValid() const { return mpViewShell != NULL; } @@ -170,7 +170,7 @@ public: // <-- virtual ~ScEditObjectViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -192,7 +192,7 @@ ScEditObjectViewForwarder::~ScEditObjectViewForwarder() { } -BOOL ScEditObjectViewForwarder::IsValid() const +sal_Bool ScEditObjectViewForwarder::IsValid() const { return (mpWindow != NULL); } @@ -275,7 +275,7 @@ public: ScPreviewViewForwarder(ScPreviewShell* pViewShell); virtual ~ScPreviewViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -300,7 +300,7 @@ ScPreviewViewForwarder::~ScPreviewViewForwarder() delete mpTableInfo; } -BOOL ScPreviewViewForwarder::IsValid() const +sal_Bool ScPreviewViewForwarder::IsValid() const { return mpViewShell != NULL; } @@ -588,7 +588,7 @@ public: ScEditViewForwarder(EditView* pEditView, Window* pWin); virtual ~ScEditViewForwarder(); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -614,7 +614,7 @@ ScEditViewForwarder::~ScEditViewForwarder() { } -BOOL ScEditViewForwarder::IsValid() const +sal_Bool ScEditViewForwarder::IsValid() const { sal_Bool bResult(sal_False); if (mpWindow && mpEditView) @@ -777,7 +777,7 @@ void ScAccessibleCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { mpViewShell = NULL; // invalid now @@ -1092,7 +1092,7 @@ void ScAccessibleEditObjectTextData::Notify( SfxBroadcaster& rBC, const SfxHint& { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { mpWindow = NULL; @@ -1243,12 +1243,12 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); + mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); mbEditEngineCreated = sal_True; - // currently, GetPortions doesn't work if UpdateMode is FALSE, + // currently, GetPortions doesn't work if UpdateMode is sal_False, // this will be fixed (in EditEngine) by src600 - // pEditEngine->SetUpdateMode( FALSE ); - mpEditEngine->EnableUndo( FALSE ); + // pEditEngine->SetUpdateMode( sal_False ); + mpEditEngine->EnableUndo( sal_False ); mpEditEngine->SetRefMapMode( MAP_100TH_MM ); mpForwarder = new SvxEditEngineForwarder(*mpEditEngine); @@ -1363,7 +1363,7 @@ void ScAccessiblePreviewCellTextData::Notify( SfxBroadcaster& rBC, const SfxHint { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { mpViewShell = NULL; // invalid now @@ -1456,7 +1456,7 @@ void ScAccessiblePreviewHeaderCellTextData::Notify( SfxBroadcaster& rBC, const S { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { mpViewShell = NULL; // invalid now @@ -1485,12 +1485,12 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); + pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); } - // currently, GetPortions doesn't work if UpdateMode is FALSE, + // currently, GetPortions doesn't work if UpdateMode is sal_False, // this will be fixed (in EditEngine) by src600 -// pEditEngine->SetUpdateMode( FALSE ); - pEditEngine->EnableUndo( FALSE ); +// pEditEngine->SetUpdateMode( sal_False ); + pEditEngine->EnableUndo( sal_False ); if (pDocShell) pEditEngine->SetRefDevice(pDocShell->GetRefDevice()); else @@ -1520,7 +1520,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() pEditEngine->SetText( maText ); } - bDataValid = TRUE; + bDataValid = sal_True; if (pEditEngine) pEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) ); @@ -1599,7 +1599,7 @@ void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { mpViewShell = NULL;// invalid now @@ -1616,9 +1616,9 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, TRUE ); + ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, sal_True ); - pHdrEngine->EnableUndo( FALSE ); + pHdrEngine->EnableUndo( sal_False ); pHdrEngine->SetRefMapMode( MAP_TWIP ); // default font must be set, independently of document @@ -1716,7 +1716,7 @@ void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { mpViewShell = NULL;// invalid now @@ -1740,12 +1740,12 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); + mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); } - // currently, GetPortions doesn't work if UpdateMode is FALSE, + // currently, GetPortions doesn't work if UpdateMode is sal_False, // this will be fixed (in EditEngine) by src600 -// pEditEngine->SetUpdateMode( FALSE ); - mpEditEngine->EnableUndo( FALSE ); +// pEditEngine->SetUpdateMode( sal_False ); + mpEditEngine->EnableUndo( sal_False ); if (mpDocSh) mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice()); else @@ -1775,7 +1775,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() mpEditEngine->SetText( msText ); } - mbDataValid = TRUE; + mbDataValid = sal_True; if (mpEditEngine) mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) ); @@ -1801,7 +1801,7 @@ class ScCsvViewForwarder : public SvxViewForwarder public: explicit ScCsvViewForwarder( Window* pWindow, const Rectangle& rBoundBox ); - virtual BOOL IsValid() const; + virtual sal_Bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -1815,7 +1815,7 @@ ScCsvViewForwarder::ScCsvViewForwarder( Window* pWindow, const Rectangle& rBound { } -BOOL ScCsvViewForwarder::IsValid() const +sal_Bool ScCsvViewForwarder::IsValid() const { return mpWindow != NULL; } @@ -1863,7 +1863,7 @@ void ScAccessibleCsvTextData::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if( nId == SFX_HINT_DYING ) { mpWindow = NULL; diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index b1cb325ceb69..9dac737372ae 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -73,8 +73,8 @@ SdrOle2Obj* ScClient::GetDrawObj() SdrOle2Obj* pOle2Obj = NULL; String aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj ); - USHORT nPages = pModel->GetPageCount(); - for (USHORT nPNr=0; nPNrGetPageCount(); + for (sal_uInt16 nPNr=0; nPNrGetPage(nPNr); SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS ); @@ -114,7 +114,7 @@ void __EXPORT ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) aLogicRect.SetPos( aOldRect.TopLeft() ); } - USHORT nTab = pViewSh->GetViewData()->GetTabNo(); + sal_uInt16 nTab = pViewSh->GetViewData()->GetTabNo(); SdrPage* pPage = pModel->GetPage(static_cast(static_cast(nTab))); if ( pPage && aLogicRect != aOldRect ) { diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index b256233d7394..45a59a482587 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -96,12 +96,12 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain pModel( pClipModel ), aObjDesc( rDesc ), pBookmark( NULL ), - bGraphic( FALSE ), - bGrIsBit( FALSE ), - bOleObj( FALSE ), + bGraphic( sal_False ), + bGrIsBit( sal_False ), + bOleObj( sal_False ), pDragSourceView( NULL ), nDragSourceFlags( 0 ), - bDragWasInternal( FALSE ), + bDragWasInternal( sal_False ), nSourceDocID( 0 ) { // @@ -119,7 +119,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain // OLE object // - UINT16 nSdrObjKind = pObject->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObject->GetObjIdentifier(); if (nSdrObjKind == OBJ_OLE2) { // if object has no persistence it must be copied as a part of document @@ -127,7 +127,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain { uno::Reference< embed::XEmbedPersist > xPersObj( ((SdrOle2Obj*)pObject)->GetObjRef(), uno::UNO_QUERY ); if ( xPersObj.is() && xPersObj->hasEntry() ) - bOleObj = TRUE; + bOleObj = sal_True; } catch( uno::Exception& ) {} @@ -140,9 +140,9 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain if (nSdrObjKind == OBJ_GRAF) { - bGraphic = TRUE; + bGraphic = sal_True; if ( ((SdrGrafObj*)pObject)->GetGraphic().GetType() == GRAPHIC_BITMAP ) - bGrIsBit = TRUE; + bGrIsBit = sal_True; } // @@ -276,9 +276,9 @@ ScDrawTransferObj* ScDrawTransferObj::GetOwnClipboard( Window* ) return pObj; } -BOOL lcl_HasOnlyControls( SdrModel* pModel ) +sal_Bool lcl_HasOnlyControls( SdrModel* pModel ) { - BOOL bOnlyControls = FALSE; // default if there are no objects + sal_Bool bOnlyControls = sal_False; // default if there are no objects if ( pModel ) { @@ -289,12 +289,12 @@ BOOL lcl_HasOnlyControls( SdrModel* pModel ) SdrObject* pObj = aIter.Next(); if ( pObj ) { - bOnlyControls = TRUE; // only set if there are any objects at all + bOnlyControls = sal_True; // only set if there are any objects at all while ( pObj ) { if (!pObj->ISA(SdrUnoObj)) { - bOnlyControls = FALSE; + bOnlyControls = sal_False; break; } pObj = aIter.Next(); @@ -393,7 +393,7 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF if( aOleData.GetTransferable().is() && aOleData.HasFormat( rFlavor ) ) { - ULONG nOldSwapMode = 0; + sal_uLong nOldSwapMode = 0; if( pModel ) { @@ -429,9 +429,9 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF DBG_ASSERT( pPv, "pPv not there..." ); aView.MarkAllObj( pPv ); if ( nFormat == SOT_FORMAT_GDIMETAFILE ) - bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( TRUE ), rFlavor ); + bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( sal_True ), rFlavor ); else - bOK = SetBitmap( aView.GetAllMarkedBitmap( TRUE ), rFlavor ); + bOK = SetBitmap( aView.GetAllMarkedBitmap( sal_True ), rFlavor ); } else if ( nFormat == SOT_FORMATSTR_ID_SVXB ) { @@ -586,7 +586,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse // mba: no relative ULRs for clipboard! SfxMedium aMedium( xWorkStore, String() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); @@ -601,7 +601,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse delete pSrcStm; } - bRet = TRUE; + bRet = sal_True; xWorkStore->dispose(); xWorkStore = uno::Reference < embed::XStorage >(); @@ -660,8 +660,8 @@ void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB nTab ) DBG_ASSERT(pDestPV,"PageView ?"); const SdrMarkList& rMarkList = rSource.GetMarkedObjectList(); - ULONG nCount = rMarkList.GetMarkCount(); - for (ULONG i=0; iGetMarkedSdrObj(); @@ -690,14 +690,14 @@ void ScDrawTransferObj::SetDragSourceObj( SdrObject* pObj, SCTAB nTab ) //! add as listener with document, delete pDragSourceView if document gone } -void ScDrawTransferObj::SetDragSourceFlags( USHORT nFlags ) +void ScDrawTransferObj::SetDragSourceFlags( sal_uInt16 nFlags ) { nDragSourceFlags = nFlags; } void ScDrawTransferObj::SetDragWasInternal() { - bDragWasInternal = TRUE; + bDragWasInternal = sal_True; } SdrOle2Obj* ScDrawTransferObj::GetSingleObject() @@ -763,7 +763,7 @@ void ScDrawTransferObj::InitDocShell() pDocSh->SetVisArea( aDestArea ); ScViewOptions aViewOpt( pDestDoc->GetViewOptions() ); - aViewOpt.SetOption( VOPT_GRID, FALSE ); + aViewOpt.SetOption( VOPT_GRID, sal_False ); pDestDoc->SetViewOptions( aViewOpt ); ScViewData aViewData( pDocSh, NULL ); @@ -771,7 +771,7 @@ void ScDrawTransferObj::InitDocShell() aViewData.SetScreen( aDestArea ); aViewData.SetCurX( 0 ); aViewData.SetCurY( 0 ); - pDocSh->UpdateOle(&aViewData, TRUE); + pDocSh->UpdateOle(&aViewData, sal_True); } } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 55aa0986d2ec..ed4971fa00ee 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -97,8 +97,8 @@ using namespace formula; // STATIC DATA ----------------------------------------------------------- -BOOL ScInputHandler::bOptLoaded = FALSE; // App-Optionen ausgewertet -BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt +sal_Bool ScInputHandler::bOptLoaded = sal_False; // App-Optionen ausgewertet +sal_Bool ScInputHandler::bAutoComplete = sal_False; // wird in KeyInput gesetzt // delimiters (in addition to ScEditUtil) needed for range finder: // only characters that are allowed in formulas next to references @@ -106,7 +106,7 @@ BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt static const sal_Char __FAR_DATA pMinDelimiters[] = " !\""; -extern USHORT nEditAdjust; //! Member an ViewData +extern sal_uInt16 nEditAdjust; //! Member an ViewData //================================================================== @@ -142,7 +142,7 @@ void ScInputHandler::InitRangeFinder( const String& rFormula ) xub_StrLen nLen = rFormula.Len(); xub_StrLen nPos = 0; xub_StrLen nStart = 0; - USHORT nCount = 0; + sal_uInt16 nCount = 0; ScRange aRange; while ( nPos < nLen && nCount < RANGEFIND_MAX ) { @@ -180,7 +180,7 @@ handle_r1c1: { String aTest = rFormula.Copy( nStart, nPos-nStart ); const ScAddress::Details aAddrDetails( pDoc, aCursorPos ); - USHORT nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails ); + sal_uInt16 nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails ); if ( nFlags & SCA_VALID ) { // Tabelle setzen, wenn nicht angegeben @@ -193,13 +193,13 @@ handle_r1c1: { // #i73766# if a single ref was parsed, set the same "abs" flags for ref2, // so Format doesn't output a double ref because of different flags. - USHORT nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE ); + sal_uInt16 nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE ); nFlags |= nAbsFlags << 4; } if (!nCount) { - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); pRangeFindList = new ScRangeFindList( pDocSh->GetTitle() ); } @@ -220,7 +220,7 @@ handle_r1c1: if (nCount) { - pEngine->SetUpdateMode( TRUE ); + pEngine->SetUpdateMode( sal_True ); pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); } @@ -240,7 +240,7 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld // Dummy-InsertText fuer Update und Paint // dafuer muss oben die Selektion aufgehoben werden (vor QuickInsertText) - pView->InsertText( EMPTY_STRING, FALSE ); + pView->InsertText( EMPTY_STRING, sal_False ); xub_StrLen nLen = pEngine->GetTextLen(0); ESelection aSel( 0, nLen, 0, nLen ); @@ -248,7 +248,7 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld } } -void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew ) +void ScInputHandler::UpdateRange( sal_uInt16 nIndex, const ScRange& rNew ) { ScTabViewShell* pDocView = pRefViewSh ? pRefViewSh : pActiveViewSh; if ( pDocView && pRangeFindList && nIndex < pRangeFindList->Count() ) @@ -270,17 +270,17 @@ void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew ) lcl_Replace( pTopView, aNewStr, aOldSel ); lcl_Replace( pTableView, aNewStr, aOldSel ); - bInRangeUpdate = TRUE; + bInRangeUpdate = sal_True; DataChanged(); - bInRangeUpdate = FALSE; + bInRangeUpdate = sal_False; long nDiff = aNewStr.Len() - (long)(nOldEnd-nOldStart); pData->aRef = rNew; pData->nSelEnd = (xub_StrLen)(pData->nSelEnd + nDiff); - USHORT nCount = (USHORT) pRangeFindList->Count(); - for (USHORT i=nIndex+1; iCount(); + for (sal_uInt16 i=nIndex+1; iGetObject( i ); pNext->nSelStart = (xub_StrLen)(pNext->nSelStart + nDiff); @@ -299,7 +299,7 @@ void ScInputHandler::DeleteRangeFinder() if ( pRangeFindList && pPaintView ) { ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell(); - pRangeFindList->SetHidden(TRUE); + pRangeFindList->SetHidden(sal_True); pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); // wegnehmen DELETEZ(pRangeFindList); } @@ -375,7 +375,7 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos ) const sal_Unicode* p0 = rStr.GetBuffer(); register const sal_Unicode* p; const sal_Unicode* p1; - USHORT nQuotes = 0; + sal_uInt16 nQuotes = 0; if ( nPos < nLen / 2 ) { p = p0; @@ -392,11 +392,11 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos ) nQuotes++; } // Odd number of quotes that we find ourselves in a string - BOOL bLookInString = ((nQuotes % 2) != 0); - BOOL bInString = bLookInString; + sal_Bool bLookInString = ((nQuotes % 2) != 0); + sal_Bool bInString = bLookInString; p = p0 + nPos; p1 = (nDir < 0 ? p0 : p0 + nLen) ; - USHORT nLevel = 1; + sal_uInt16 nLevel = 1; while ( p != p1 && nLevel ) { p += nDir; @@ -434,23 +434,23 @@ ScInputHandler::ScInputHandler() pTipVisibleSecParent( NULL ), nTipVisibleSec( 0 ), nAutoPos( SCPOS_INVALID ), - bUseTab( FALSE ), - bTextValid( TRUE ), + bUseTab( sal_False ), + bTextValid( sal_True ), nFormSelStart( 0 ), nFormSelEnd( 0 ), nAutoPar( 0 ), eMode( SC_INPUT_NONE ), - bModified( FALSE ), - bSelIsRef( FALSE ), - bFormulaMode( FALSE ), - bInRangeUpdate( FALSE ), - bParenthesisShown( FALSE ), - bCreatingFuncView( FALSE ), - bInEnterHandler( FALSE ), - bCommandErrorShown( FALSE ), - bInOwnChange( FALSE ), - bProtected( FALSE ), - bCellHasPercentFormat( FALSE ), + bModified( sal_False ), + bSelIsRef( sal_False ), + bFormulaMode( sal_False ), + bInRangeUpdate( sal_False ), + bParenthesisShown( sal_False ), + bCreatingFuncView( sal_False ), + bInEnterHandler( sal_False ), + bCommandErrorShown( sal_False ), + bInOwnChange( sal_False ), + bProtected( sal_False ), + bCellHasPercentFormat( sal_False ), nValidation( 0 ), eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ), aScaleX( 1,1 ), @@ -458,7 +458,7 @@ ScInputHandler::ScInputHandler() pRefViewSh( NULL ), pLastPattern( NULL ), pEditDefaults( NULL ), - bLastIsSymbol( FALSE ), + bLastIsSymbol( sal_False ), pLastState( NULL ), pDelayTimer( NULL ), pRangeFindList( NULL ) @@ -513,7 +513,7 @@ void ScInputHandler::UpdateRefDevice() if (!pEngine) return; - BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); + sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if ( bTextWysiwyg && pActiveViewSh ) pEngine->SetRefDevice( pActiveViewSh->GetViewData()->GetDocument()->GetPrinter() ); else @@ -540,7 +540,7 @@ void ScInputHandler::ImplCreateEditEngine() pEngine = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); + pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) ); UpdateRefDevice(); // also sets MapMode pEngine->SetPaperSize( Size( 1000000, 1000000 ) ); @@ -553,12 +553,12 @@ void ScInputHandler::ImplCreateEditEngine() void ScInputHandler::UpdateAutoCorrFlag() { - ULONG nCntrl = pEngine->GetControlWord(); - ULONG nOld = nCntrl; + sal_uLong nCntrl = pEngine->GetControlWord(); + sal_uLong nOld = nCntrl; // don't use pLastPattern here (may be invalid because of AutoStyle) - BOOL bDisable = bLastIsSymbol || bFormulaMode; + sal_Bool bDisable = bLastIsSymbol || bFormulaMode; if ( bDisable ) nCntrl &= ~EE_CNTRL_AUTOCORRECT; else @@ -568,12 +568,12 @@ void ScInputHandler::UpdateAutoCorrFlag() pEngine->SetControlWord(nCntrl); } -void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) +void ScInputHandler::UpdateSpellSettings( sal_Bool bFromStartTab ) { if ( pActiveViewSh ) { ScViewData* pViewData = pActiveViewSh->GetViewData(); - BOOL bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell(); + sal_Bool bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell(); // SetDefaultLanguage is independent of the language attributes, // ScGlobal::GetEditDefaultLanguage is always used. @@ -586,8 +586,8 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) if ( bFromStartTab || eMode != SC_INPUT_NONE ) { - ULONG nCntrl = pEngine->GetControlWord(); - ULONG nOld = nCntrl; + sal_uLong nCntrl = pEngine->GetControlWord(); + sal_uLong nOld = nCntrl; if( bOnlineSpell ) nCntrl |= EE_CNTRL_ONLINESPELLING; else @@ -606,7 +606,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) pEngine->SetKernAsianPunctuation( pDoc->GetAsianKerning() ); pEngine->SetDefaultHorizontalTextDirection( (EEHorizontalTextDirection)pDoc->GetEditTextDirection( pViewData->GetTabNo() ) ); - pEngine->SetFirstWordCapitalization( FALSE ); + pEngine->SetFirstWordCapitalization( sal_False ); } // language is set separately, so the speller is needed only if online @@ -617,7 +617,7 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab ) pEngine->SetSpeller( xXSpellChecker1 ); } - BOOL bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue(); + sal_Bool bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue(); if ( bHyphen ) { com::sun::star::uno::Reference xXHyphenator( LinguMgr::GetHyphenator() ); pEngine->SetHyphenator( xXHyphenator ); @@ -652,16 +652,16 @@ void ScInputHandler::GetFormulaData() // wie in ScPosWnd::FillFunctions (inputwin.cxx) const ScAppOptions& rOpt = SC_MOD()->GetAppOptions(); - USHORT nMRUCount = rOpt.GetLRUFuncListCount(); - const USHORT* pMRUList = rOpt.GetLRUFuncList(); + sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount(); + const sal_uInt16* pMRUList = rOpt.GetLRUFuncList(); const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); - ULONG nListCount = pFuncList->GetCount(); + sal_uLong nListCount = pFuncList->GetCount(); if (pMRUList) { - for (USHORT i=0; iGetFunction( j ); if ( pDesc->nFIndex == nId && pDesc->pFuncName ) @@ -676,7 +676,7 @@ void ScInputHandler::GetFormulaData() } } } - for(ULONG i=0;iGetFunction( i ); if ( pDesc->pFuncName ) @@ -743,7 +743,7 @@ void ScInputHandler::ShowTipCursor() if ( bFormulaMode && pActiveView && pFormulaDataPara && pEngine->GetParagraphCount() == 1 ) { - String aFormula = pEngine->GetText( (USHORT) 0 ); + String aFormula = pEngine->GetText( (sal_uInt16) 0 ); ESelection aSel = pActiveView->GetSelection(); aSel.Adjust(); xub_StrLen nLeftParentPos = 0; @@ -758,8 +758,8 @@ void ScInputHandler::ShowTipCursor() xub_StrLen nArgPos = 0; const IFunctionDescription* ppFDesc; ::std::vector< ::rtl::OUString> aArgs; - USHORT nArgs; - BOOL bFound = FALSE; + sal_uInt16 nArgs; + sal_Bool bFound = sal_False; FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr()); while( !bFound ) @@ -771,32 +771,32 @@ void ScInputHandler::ShowTipCursor() sal_Unicode c = ( nLeftParentPos > 0 ) ? aSelText.GetChar( nLeftParentPos-1 ) : 0; if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z' )) ) continue; - nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, TRUE); - if( aHelper.GetNextFunc( aSelText, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) ) + nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, sal_True); + if( aHelper.GetNextFunc( aSelText, sal_False, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) ) { if( ppFDesc->getFunctionName().getLength() ) { nArgPos = aHelper.GetArgStart( aSelText, nNextFStart, 0 ); - nArgs = static_cast(ppFDesc->getParameterCount()); - - USHORT nActive = 0; - USHORT nCount = 0; - USHORT nCountSemicolon = 0; - USHORT nCountDot = 0; - USHORT nStartPosition = 0; - USHORT nEndPosition = 0; - BOOL bFlag = FALSE; + nArgs = static_cast(ppFDesc->getParameterCount()); + + sal_uInt16 nActive = 0; + sal_uInt16 nCount = 0; + sal_uInt16 nCountSemicolon = 0; + sal_uInt16 nCountDot = 0; + sal_uInt16 nStartPosition = 0; + sal_uInt16 nEndPosition = 0; + sal_Bool bFlag = sal_False; String aNew; - USHORT nParAutoPos = SCPOS_INVALID; - if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, FALSE ) ) + sal_uInt16 nParAutoPos = SCPOS_INVALID; + if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, sal_False ) ) { - for( USHORT i=0; i < nArgs; i++ ) + for( sal_uInt16 i=0; i < nArgs; i++ ) { xub_StrLen nLength = static_cast(aArgs[i].getLength()); if( nArgPos <= aSelText.Len()-1 ) { nActive = i+1; - bFlag = TRUE; + bFlag = sal_True; } nArgPos+=nLength+1; } @@ -807,7 +807,7 @@ void ScInputHandler::ShowTipCursor() if( !nCountSemicolon ) { - for( USHORT i = 0; i < aNew.Len(); i++ ) + for( sal_uInt16 i = 0; i < aNew.Len(); i++ ) { sal_Unicode cNext = aNew.GetChar( i ); if( cNext == '(' ) @@ -818,7 +818,7 @@ void ScInputHandler::ShowTipCursor() } else if( !nCountDot ) { - for( USHORT i = 0; i < aNew.Len(); i++ ) + for( sal_uInt16 i = 0; i < aNew.Len(); i++ ) { sal_Unicode cNext = aNew.GetChar( i ); if( cNext == '(' ) @@ -839,7 +839,7 @@ void ScInputHandler::ShowTipCursor() } else { - for( USHORT i = 0; i < aNew.Len(); i++ ) + for( sal_uInt16 i = 0; i < aNew.Len(); i++ ) { sal_Unicode cNext = aNew.GetChar( i ); if( cNext == '(' ) @@ -867,13 +867,13 @@ void ScInputHandler::ShowTipCursor() { aNew.Insert( 0x25BA, nStartPosition ); ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } else { ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } } @@ -881,21 +881,21 @@ void ScInputHandler::ShowTipCursor() } else { - USHORT nPosition = 0; + sal_uInt16 nPosition = 0; String aText = pEngine->GetWord( 0, aSel.nEndPos-1 ); if( aText.GetChar( aSel.nEndPos-1 ) == '=' ) { break; } String aNew; - USHORT nParAutoPos = SCPOS_INVALID; + sal_uInt16 nParAutoPos = SCPOS_INVALID; nPosition = aText.Len()+1; - if( pFormulaDataPara->FindText( aText, aNew, nParAutoPos, FALSE ) ) + if( pFormulaDataPara->FindText( aText, aNew, nParAutoPos, sal_False ) ) { if( aFormula.GetChar( nPosition ) =='(' ) { ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } else break; @@ -926,7 +926,7 @@ void ScInputHandler::ShowTip( const String& rText ) aPos = pTipVisibleParent->OutputToScreenPixel( aPos ); Rectangle aRect( aPos, aPos ); - USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM; + sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM; nTipVisible = Help::ShowTip(pTipVisibleParent, aRect, rText, nAlign); pTipVisibleParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) ); } @@ -950,7 +950,7 @@ void ScInputHandler::ShowTipBelow( const String& rText ) } aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos ); Rectangle aRect( aPos, aPos ); - USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER; + sal_uInt16 nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER; nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign); pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) ); } @@ -966,7 +966,7 @@ void ScInputHandler::UseFormulaData() // Formeln duerfen nur 1 Absatz haben if ( pActiveView && pFormulaData && pEngine->GetParagraphCount() == 1 ) { - String aTotal = pEngine->GetText( (USHORT) 0 ); + String aTotal = pEngine->GetText( (sal_uInt16) 0 ); ESelection aSel = pActiveView->GetSelection(); aSel.Adjust(); @@ -989,15 +989,15 @@ void ScInputHandler::UseFormulaData() xub_StrLen nArgPos = 0; const IFunctionDescription* ppFDesc; ::std::vector< ::rtl::OUString> aArgs; - USHORT nArgs; - BOOL bFound = FALSE; + sal_uInt16 nArgs; + sal_Bool bFound = sal_False; String aText = pEngine->GetWord( 0, aSel.nEndPos-1 ); if ( aText.Len() ) { String aNew; nAutoPos = SCPOS_INVALID; - if ( pFormulaData->FindText( aText, aNew, nAutoPos, FALSE ) ) + if ( pFormulaData->FindText( aText, aNew, nAutoPos, sal_False ) ) { ShowTip( aNew ); aAutoSearch = aText; @@ -1016,32 +1016,32 @@ void ScInputHandler::UseFormulaData() sal_Unicode c = ( nLeftParentPos > 0 ) ? aFormula.GetChar( nLeftParentPos-1 ) : 0; if( !((c >= 'A' && c<= 'Z') || (c>= 'a' && c<= 'z') ) ) continue; - nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, TRUE); - if( aHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) ) + nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, sal_True); + if( aHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) ) { if( ppFDesc->getFunctionName().getLength() ) { nArgPos = aHelper.GetArgStart( aFormula, nNextFStart, 0 ); - nArgs = static_cast(ppFDesc->getParameterCount()); - - USHORT nActive = 0; - USHORT nCount = 0; - USHORT nCountSemicolon = 0; - USHORT nCountDot = 0; - USHORT nStartPosition = 0; - USHORT nEndPosition = 0; - BOOL bFlag = FALSE; + nArgs = static_cast(ppFDesc->getParameterCount()); + + sal_uInt16 nActive = 0; + sal_uInt16 nCount = 0; + sal_uInt16 nCountSemicolon = 0; + sal_uInt16 nCountDot = 0; + sal_uInt16 nStartPosition = 0; + sal_uInt16 nEndPosition = 0; + sal_Bool bFlag = sal_False; String aNew; - USHORT nParAutoPos = SCPOS_INVALID; - if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, FALSE ) ) + sal_uInt16 nParAutoPos = SCPOS_INVALID; + if( pFormulaDataPara->FindText( ppFDesc->getFunctionName(), aNew, nParAutoPos, sal_False ) ) { - for( USHORT i=0; i < nArgs; i++ ) + for( sal_uInt16 i=0; i < nArgs; i++ ) { xub_StrLen nLength = static_cast(aArgs[i].getLength()); if( nArgPos <= aFormula.Len()-1 ) { nActive = i+1; - bFlag = TRUE; + bFlag = sal_True; } nArgPos+=nLength+1; } @@ -1052,7 +1052,7 @@ void ScInputHandler::UseFormulaData() if( !nCountSemicolon ) { - for( USHORT i = 0; i < aNew.Len(); i++ ) + for( sal_uInt16 i = 0; i < aNew.Len(); i++ ) { sal_Unicode cNext = aNew.GetChar( i ); if( cNext == '(' ) @@ -1063,7 +1063,7 @@ void ScInputHandler::UseFormulaData() } else if( !nCountDot ) { - for( USHORT i = 0; i < aNew.Len(); i++ ) + for( sal_uInt16 i = 0; i < aNew.Len(); i++ ) { sal_Unicode cNext = aNew.GetChar( i ); if( cNext == '(' ) @@ -1084,7 +1084,7 @@ void ScInputHandler::UseFormulaData() } else { - for( USHORT i = 0; i < aNew.Len(); i++ ) + for( sal_uInt16 i = 0; i < aNew.Len(); i++ ) { sal_Unicode cNext = aNew.GetChar( i ); if( cNext == '(' ) @@ -1112,13 +1112,13 @@ void ScInputHandler::UseFormulaData() { aNew.Insert( 0x25BA, nStartPosition ); ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } else { ShowTipBelow( aNew ); - bFound = TRUE; + bFound = sal_True; } } } @@ -1128,7 +1128,7 @@ void ScInputHandler::UseFormulaData() } } -void ScInputHandler::NextFormulaEntry( BOOL bBack ) +void ScInputHandler::NextFormulaEntry( sal_Bool bBack ) { EditView* pActiveView = pTopView ? pTopView : pTableView; if ( pActiveView && pFormulaData ) @@ -1144,7 +1144,7 @@ void ScInputHandler::NextFormulaEntry( BOOL bBack ) pActiveView->ShowCursor(); } -void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParInserted ) +void lcl_CompleteFunction( EditView* pView, const String& rInsert, sal_Bool& rParInserted ) { if (pView) { @@ -1156,7 +1156,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns String aInsStr = rInsert; xub_StrLen nInsLen = aInsStr.Len(); - BOOL bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '(' + sal_Bool bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '(' && aInsStr.GetChar(nInsLen-1) == ')' ); if ( bDoParen ) { @@ -1165,16 +1165,16 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns // #39393#). ESelection aWordSel = pView->GetSelection(); - String aOld = pView->GetEditEngine()->GetText((USHORT)0); + String aOld = pView->GetEditEngine()->GetText((sal_uInt16)0); sal_Unicode cNext = aOld.GetChar(aWordSel.nEndPos); if ( cNext == '(' ) { - bDoParen = FALSE; + bDoParen = sal_False; aInsStr.Erase( nInsLen - 2 ); // Klammern weglassen } } - pView->InsertText( aInsStr, FALSE ); + pView->InsertText( aInsStr, sal_False ); if ( bDoParen ) // Cursor zwischen die Klammern setzen { @@ -1183,7 +1183,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns --aSel.nEndPos; pView->SetSelection(aSel); - rParInserted = TRUE; + rParInserted = sal_True; } } } @@ -1196,7 +1196,7 @@ void ScInputHandler::PasteFunctionData() if (pData) { String aInsert = pData->GetString(); - BOOL bParInserted = FALSE; + sal_Bool bParInserted = sal_False; DataChanging(); // kann nicht neu sein lcl_CompleteFunction( pTopView, aInsert, bParInserted ); @@ -1235,7 +1235,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress // wenn ein Name eigentlich als Bereich in die Gesamt-Formel // eingefuegt wird, bei der Einzeldarstellung aber als // single-Zellbezug interpretiert wird - BOOL bColRowName = pCell->HasColRowName(); + sal_Bool bColRowName = pCell->HasColRowName(); if ( bColRowName ) { // ColRowName im RPN-Code? @@ -1249,10 +1249,10 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress pCell = new ScFormulaCell( pDoc, rPos, aBraced ); } else - bColRowName = FALSE; + bColRowName = sal_False; } - USHORT nErrCode = pCell->GetErrCode(); + sal_uInt16 nErrCode = pCell->GetErrCode(); if ( nErrCode == 0 ) { SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable()); @@ -1260,7 +1260,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress if ( pCell->IsValue() ) { double n = pCell->GetValue(); - ULONG nFormat = aFormatter.GetStandardFormat( n, 0, + sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0, pCell->GetFormatType(), ScGlobal::eLnge ); aFormatter.GetInputLineString( n, nFormat, aValue ); //! display OutputString but insert InputLineString @@ -1270,7 +1270,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress String aStr; pCell->GetString( aStr ); - ULONG nFormat = aFormatter.GetStandardFormat( + sal_uLong nFormat = aFormatter.GetStandardFormat( pCell->GetFormatType(), ScGlobal::eLnge); aFormatter.GetOutputString( aStr, nFormat, aValue, &pColor ); @@ -1300,7 +1300,7 @@ void ScInputHandler::FormulaPreview() { String aPart = pActiveView->GetSelected(); if (!aPart.Len()) - aPart = pEngine->GetText((USHORT)0); + aPart = pEngine->GetText((sal_uInt16)0); ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument(); aValue = lcl_Calculate( aPart, pDoc, aCursorPos ); } @@ -1363,9 +1363,9 @@ void ScInputHandler::PasteManualTip() } } if ( pTopView ) - pTopView->InsertText( aInsert, TRUE ); + pTopView->InsertText( aInsert, sal_True ); if ( pTableView ) - pTableView->InsertText( aInsert, TRUE ); + pTableView->InsertText( aInsert, sal_True ); DataChanged(); } @@ -1383,7 +1383,7 @@ void ScInputHandler::AutoParAdded() ++nAutoPar; // closing parenthesis can be overwritten } -BOOL ScInputHandler::CursorAtClosingPar() +sal_Bool ScInputHandler::CursorAtClosingPar() { // test if the cursor is before a closing parenthesis @@ -1393,11 +1393,11 @@ BOOL ScInputHandler::CursorAtClosingPar() { ESelection aSel = pActiveView->GetSelection(); xub_StrLen nPos = aSel.nStartPos; - String aFormula = pEngine->GetText((USHORT)0); + String aFormula = pEngine->GetText((sal_uInt16)0); if ( nPos < aFormula.Len() && aFormula.GetChar(nPos) == ')' ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ScInputHandler::SkipClosingPar() @@ -1440,11 +1440,11 @@ void ScInputHandler::GetColData() else { pColumnData = new TypedScStrCollection; - pColumnData->SetCaseSensitive( TRUE ); // equal strings are handled in FindText + pColumnData->SetCaseSensitive( sal_True ); // equal strings are handled in FindText } pDoc->GetDataEntries( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), - *pColumnData, TRUE ); + *pColumnData, sal_True ); } } @@ -1458,7 +1458,7 @@ void ScInputHandler::UseColData() // beim Tippen ESelection aSel = pActiveView->GetSelection(); aSel.Adjust(); - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); if ( aSel.nEndPara+1 == nParCnt ) { xub_StrLen nParLen = pEngine->GetTextLen( aSel.nEndPara ); @@ -1469,7 +1469,7 @@ void ScInputHandler::UseColData() // beim Tippen { String aNew; nAutoPos = SCPOS_INVALID; // nix - if ( pColumnData->FindText( aText, aNew, nAutoPos, FALSE ) ) + if ( pColumnData->FindText( aText, aNew, nAutoPos, sal_False ) ) { // #45434# durch dBase Import etc. koennen Umbrueche im String sein, // das wuerde hier mehrere Absaetze ergeben -> nicht gut @@ -1480,7 +1480,7 @@ void ScInputHandler::UseColData() // beim Tippen //! genaue Ersetzung im EnterHandler !!! // ein Space zwischen Absaetzen: - ULONG nEdLen = pEngine->GetTextLen() + nParCnt - 1; + sal_uLong nEdLen = pEngine->GetTextLen() + nParCnt - 1; String aIns = aNew.Copy( (xub_StrLen)nEdLen ); // selection must be "backwards", so the cursor stays behind the last @@ -1491,12 +1491,12 @@ void ScInputHandler::UseColData() // beim Tippen // when editing in input line, apply to both edit views if ( pTableView ) { - pTableView->InsertText( aIns, FALSE ); + pTableView->InsertText( aIns, sal_False ); pTableView->SetSelection( aSelection ); } if ( pTopView ) { - pTopView->InsertText( aIns, FALSE ); + pTopView->InsertText( aIns, sal_False ); pTopView->SetSelection( aSelection ); } @@ -1508,11 +1508,11 @@ void ScInputHandler::UseColData() // beim Tippen // verschlucken, wenn noch etwas kommt String aDummy; - USHORT nNextPos = nAutoPos; - bUseTab = pColumnData->FindText( aText, aDummy, nNextPos, FALSE ); + sal_uInt16 nNextPos = nAutoPos; + bUseTab = pColumnData->FindText( aText, aDummy, nNextPos, sal_False ); } else - bUseTab = TRUE; + bUseTab = sal_True; } } } @@ -1520,7 +1520,7 @@ void ScInputHandler::UseColData() // beim Tippen } } -void ScInputHandler::NextAutoEntry( BOOL bBack ) +void ScInputHandler::NextAutoEntry( sal_Bool bBack ) { EditView* pActiveView = pTopView ? pTopView : pTableView; if ( pActiveView && pColumnData ) @@ -1531,7 +1531,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack ) ESelection aSel = pActiveView->GetSelection(); aSel.Adjust(); - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); if ( aSel.nEndPara+1 == nParCnt && aSel.nStartPara == aSel.nEndPara ) { String aText = GetEditText(pEngine); @@ -1542,7 +1542,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack ) String aNew; if ( pColumnData->FindText( aAutoSearch, aNew, nAutoPos, bBack ) ) { - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) lcl_RemoveLineEnd( aNew ); String aIns = aNew.Copy( aAutoSearch.Len() ); @@ -1551,7 +1551,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack ) if ( pTableView ) { pTableView->DeleteSelected(); - pTableView->InsertText( aIns, FALSE ); + pTableView->InsertText( aIns, sal_False ); pTableView->SetSelection( ESelection( aSel.nEndPara, aSel.nStartPos + aIns.Len(), aSel.nEndPara, aSel.nStartPos ) ); @@ -1559,13 +1559,13 @@ void ScInputHandler::NextAutoEntry( BOOL bBack ) if ( pTopView ) { pTopView->DeleteSelected(); - pTopView->InsertText( aIns, FALSE ); + pTopView->InsertText( aIns, sal_False ); pTopView->SetSelection( ESelection( aSel.nEndPara, aSel.nStartPos + aIns.Len(), aSel.nEndPara, aSel.nStartPos ) ); } - bInOwnChange = FALSE; + bInOwnChange = sal_False; } else { @@ -1594,7 +1594,7 @@ void ScInputHandler::UpdateParenthesis() //! Klammer-Hervorhebung einzeln abschaltbar ???? - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( bFormulaMode && eMode != SC_INPUT_TOP ) { if ( pTableView && !pTableView->HasSelection() ) // Selektion ist immer unten @@ -1605,7 +1605,7 @@ void ScInputHandler::UpdateParenthesis() // Das Zeichen links vom Cursor wird angeschaut xub_StrLen nPos = aSel.nStartPos - 1; - String aFormula = pEngine->GetText((USHORT)0); + String aFormula = pEngine->GetText((sal_uInt16)0); sal_Unicode c = aFormula.GetChar(nPos); if ( c == '(' || c == ')' ) { @@ -1619,8 +1619,8 @@ void ScInputHandler::UpdateParenthesis() if (bParenthesisShown) { // alte Hervorhebung wegnehmen - USHORT nCount = pEngine->GetParagraphCount(); - for (USHORT i=0; iGetParagraphCount(); + for (sal_uInt16 i=0; iQuickRemoveCharAttribs( i, EE_CHAR_WEIGHT ); } @@ -1630,9 +1630,9 @@ void ScInputHandler::UpdateParenthesis() pEngine->QuickSetAttribs( aSet, aSelOther ); // Dummy-InsertText fuer Update und Paint (Selektion ist leer) - pTableView->InsertText( EMPTY_STRING, FALSE ); + pTableView->InsertText( EMPTY_STRING, sal_False ); - bFound = TRUE; + bFound = sal_True; } } } @@ -1646,8 +1646,8 @@ void ScInputHandler::UpdateParenthesis() if ( bParenthesisShown && !bFound && pTableView ) { - USHORT nCount = pEngine->GetParagraphCount(); - for (USHORT i=0; iGetParagraphCount(); + for (sal_uInt16 i=0; iRemoveCharAttribs( i, EE_CHAR_WEIGHT ); } @@ -1669,12 +1669,12 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron // Trotzdem wird immerhin der Editmodus beendet EnterHandler(); - bFormulaMode = FALSE; + bFormulaMode = sal_False; pRefViewSh = NULL; SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } @@ -1703,11 +1703,11 @@ void ScInputHandler::UpdateActiveView() pActiveViewSh->GetWindowByPos( pActiveViewSh->GetViewData()->GetEditActivePart() ) : NULL; - USHORT nCount = pEngine->GetViewCount(); + sal_uInt16 nCount = pEngine->GetViewCount(); if (nCount > 0) { pTableView = pEngine->GetView(0); - for (USHORT i=1; iGetView(i); Window* pWin = pThis->GetWindow(); @@ -1724,7 +1724,7 @@ void ScInputHandler::UpdateActiveView() pTopView = NULL; } -void ScInputHandler::StopInputWinEngine( BOOL bAll ) +void ScInputHandler::StopInputWinEngine( sal_Bool bAll ) { if (pInputWin) pInputWin->StopEditEngine( bAll ); @@ -1742,9 +1742,9 @@ void ScInputHandler::ForgetLastPattern() { pLastPattern = NULL; if ( !pLastState && pActiveViewSh ) - pActiveViewSh->UpdateInputHandler( TRUE ); // Status neu holen + pActiveViewSh->UpdateInputHandler( sal_True ); // Status neu holen else - NotifyChange( pLastState, TRUE ); + NotifyChange( pLastState, sal_True ); } void ScInputHandler::UpdateAdjust( sal_Unicode cTyped ) @@ -1754,7 +1754,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped ) { case SVX_HOR_JUSTIFY_STANDARD: { - BOOL bNumber = FALSE; + sal_Bool bNumber = sal_False; if (cTyped) // neu angefangen bNumber = (cTyped>='0' && cTyped<='9'); // nur Ziffern sind Zahlen else if ( pActiveViewSh ) @@ -1779,7 +1779,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped ) break; } - BOOL bAsianVertical = pLastPattern && + sal_Bool bAsianVertical = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem( ATTR_STACKED )).GetValue() && ((const SfxBoolItem&)pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue(); if ( bAsianVertical ) @@ -1791,7 +1791,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped ) pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) ); pEngine->SetDefaults( *pEditDefaults ); - nEditAdjust = sal::static_int_cast(eSvxAdjust); //! set at ViewData or with PostEditView + nEditAdjust = sal::static_int_cast(eSvxAdjust); //! set at ViewData or with PostEditView pEngine->SetVertical( bAsianVertical ); } @@ -1800,15 +1800,15 @@ void ScInputHandler::RemoveAdjust() { // harte Ausrichtungs-Attribute loeschen - BOOL bUndo = pEngine->IsUndoEnabled(); + sal_Bool bUndo = pEngine->IsUndoEnabled(); if ( bUndo ) - pEngine->EnableUndo( FALSE ); + pEngine->EnableUndo( sal_False ); // RemoveParaAttribs removes all paragraph attributes, including EE_PARA_JUST #if 0 - BOOL bChange = FALSE; - USHORT nCount = pEngine->GetParagraphCount(); - for (USHORT i=0; iGetParagraphCount(); + for (sal_uInt16 i=0; iGetParaAttribs( i ); if ( rOld.GetItemState( EE_PARA_JUST ) == SFX_ITEM_SET ) @@ -1816,7 +1816,7 @@ void ScInputHandler::RemoveAdjust() SfxItemSet aNew( rOld ); aNew.ClearItem( EE_PARA_JUST ); pEngine->SetParaAttribs( i, aNew ); - bChange = TRUE; + bChange = sal_True; } } #endif @@ -1826,14 +1826,14 @@ void ScInputHandler::RemoveAdjust() pEngine->RemoveParaAttribs(); if ( bUndo ) - pEngine->EnableUndo( TRUE ); + pEngine->EnableUndo( sal_True ); // ER 31.08.00 Only called in EnterHandler, don't change view anymore. #if 0 if (bChange) { EditView* pActiveView = pTopView ? pTopView : pTableView; - pActiveView->ShowCursor( FALSE, TRUE ); + pActiveView->ShowCursor( sal_False, sal_True ); } #endif } @@ -1842,23 +1842,23 @@ void ScInputHandler::RemoveRangeFinder() { // pRangeFindList und Farben loeschen - pEngine->SetUpdateMode(FALSE); - USHORT nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein - for (USHORT i=0; iSetUpdateMode(sal_False); + sal_uInt16 nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein + for (sal_uInt16 i=0; iQuickRemoveCharAttribs( i, EE_CHAR_COLOR ); - pEngine->SetUpdateMode(TRUE); + pEngine->SetUpdateMode(sal_True); EditView* pActiveView = pTopView ? pTopView : pTableView; - pActiveView->ShowCursor( FALSE, TRUE ); + pActiveView->ShowCursor( sal_False, sal_True ); DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle } -BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) +sal_Bool ScInputHandler::StartTable( sal_Unicode cTyped, sal_Bool bFromCommand ) { - // returns TRUE if a new edit mode was started + // returns sal_True if a new edit mode was started - BOOL bNewTable = FALSE; + sal_Bool bNewTable = sal_False; if (!bModified && ValidCol(aCursorPos.Col())) { @@ -1880,7 +1880,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) if ( aTester.IsEditable() ) { // UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise) - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); // Attribute in EditEngine uebernehmen @@ -1894,18 +1894,18 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) const SfxItemSet& rAttrSet = pPattern->GetItemSet(); const SfxPoolItem* pItem; - if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) ) + if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, sal_True, &pItem ) ) { - ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); + sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT == pDoc->GetFormatTable()->GetType( nFormat ) ); } else - bCellHasPercentFormat = FALSE; // Default: kein Prozent + bCellHasPercentFormat = sal_False; // Default: kein Prozent // Gueltigkeit angegeben? - if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) ) + if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, sal_True, &pItem ) ) nValidation = ((const SfxUInt32Item*)pItem)->GetValue(); else nValidation = 0; @@ -1931,7 +1931,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) Color aBackCol = ((const SvxBrushItem&) pPattern->GetItem( ATTR_BACKGROUND )).GetColor(); ScModule* pScMod = SC_MOD(); - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) if ( aBackCol.GetTransparency() > 0 || Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); @@ -1952,7 +1952,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) // UpdateSpellSettings enables online spelling if needed // -> also call if attributes are unchanged - UpdateSpellSettings( TRUE ); // uses pLastPattern + UpdateSpellSettings( sal_True ); // uses pLastPattern // Edit-Engine fuellen @@ -1961,7 +1961,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) { pEngine->SetText(aCurrentText); aStr = aCurrentText; - bTextValid = FALSE; + bTextValid = sal_False; aCurrentText.Erase(); } else @@ -1988,13 +1988,13 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) !cTyped && !bCreatingFuncView ) InitRangeFinder(aStr); // Formel wird editiert -> RangeFinder - bNewTable = TRUE; // -> PostEditView-Aufruf + bNewTable = sal_True; // -> PostEditView-Aufruf } else { - bProtected = TRUE; + bProtected = sal_True; eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); UpdateFormulaMode(); if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) ) { @@ -2003,7 +2003,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand ) // Set the flag before showing the error message because the command handler // for the next IME command may be called when showing the dialog. if ( bFromCommand ) - bCommandErrorShown = TRUE; + bCommandErrorShown = sal_True; pActiveViewSh->GetActiveWin()->GrabFocus(); pActiveViewSh->ErrorMessage(aTester.GetMessageId()); @@ -2023,7 +2023,7 @@ void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel ) DBG_ASSERT( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" ); EditEngine* pEngine = pEditView->GetEditEngine(); - USHORT nCount = pEngine->GetParagraphCount(); + sal_uInt16 nCount = pEngine->GetParagraphCount(); if (nCount > 1) { xub_StrLen nParLen = pEngine->GetTextLen(rSel.nStartPara); @@ -2082,17 +2082,17 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG ) return 0; } -BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand ) // return TRUE = new view created +sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand ) // return sal_True = new view created { - bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged) + bInOwnChange = sal_True; // disable ModifyHdl (reset in DataChanged) if ( eMode == SC_INPUT_NONE ) return StartTable( cTyped, bFromCommand ); else - return FALSE; + return sal_False; } -void ScInputHandler::DataChanged( BOOL bFromTopNotify ) +void ScInputHandler::DataChanged( sal_Bool bFromTopNotify ) { ImplCreateEditEngine(); @@ -2103,7 +2103,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify ) { // table EditEngine is formatted below, input line needs formatting after paste // #i20282# not when called from the input line's modify handler - pTopView->GetEditEngine()->QuickFormatDoc( TRUE ); + pTopView->GetEditEngine()->QuickFormatDoc( sal_True ); // #i23720# QuickFormatDoc hides the cursor, but can't show it again because it // can't safely access the EditEngine's current view, so the cursor has to be @@ -2111,8 +2111,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify ) pTopView->ShowCursor(); } - bModified = TRUE; - bSelIsRef = FALSE; + bModified = sal_True; + bSelIsRef = sal_False; if ( pRangeFindList && !bInRangeUpdate ) RemoveRangeFinder(); // Attribute und Markierung loeschen @@ -2144,7 +2144,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify ) { ScViewData* pViewData = pActiveViewSh->GetViewData(); - BOOL bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer + sal_Bool bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer if (!bNeedGrow) { // Cursor vor dem Ende? @@ -2165,8 +2165,8 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify ) } UpdateFormulaMode(); - bTextValid = FALSE; // Aenderungen sind nur in der Edit-Engine - bInOwnChange = FALSE; + bTextValid = sal_False; // Aenderungen sind nur in der Edit-Engine + bInOwnChange = sal_False; } void ScInputHandler::UpdateFormulaMode() @@ -2174,19 +2174,19 @@ void ScInputHandler::UpdateFormulaMode() SfxApplication* pSfxApp = SFX_APP(); if ( pEngine->GetParagraphCount() == 1 && - ( pEngine->GetText((USHORT)0).GetChar(0) == '=' || - pEngine->GetText((USHORT)0).GetChar(0) == '+' || - pEngine->GetText((USHORT)0).GetChar(0) == '-' ) && + ( pEngine->GetText((sal_uInt16)0).GetChar(0) == '=' || + pEngine->GetText((sal_uInt16)0).GetChar(0) == '+' || + pEngine->GetText((sal_uInt16)0).GetChar(0) == '-' ) && !bProtected ) { if (!bFormulaMode) { - bFormulaMode = TRUE; + bFormulaMode = sal_True; pRefViewSh = pActiveViewSh; pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(this); if (pInputWin) - pInputWin->SetFormulaMode(TRUE); + pInputWin->SetFormulaMode(sal_True); if ( bAutoComplete ) GetFormulaData(); @@ -2200,12 +2200,12 @@ void ScInputHandler::UpdateFormulaMode() if (bFormulaMode) { ShowRefFrame(); - bFormulaMode = FALSE; + bFormulaMode = sal_False; pRefViewSh = NULL; pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } } @@ -2219,13 +2219,13 @@ void ScInputHandler::ShowRefFrame() ScTabViewShell* pVisibleSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); if ( pRefViewSh && pRefViewSh != pVisibleSh ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SfxViewFrame* pRefFrame = pRefViewSh->GetViewFrame(); SfxViewFrame* pOneFrame = SfxViewFrame::GetFirst(); while ( pOneFrame && !bFound ) { if ( pOneFrame == pRefFrame ) - bFound = TRUE; + bFound = sal_True; pOneFrame = SfxViewFrame::GetNext( *pOneFrame ); } @@ -2298,35 +2298,35 @@ void ScInputHandler::SetMode( ScInputMode eNewMode ) if (bProtected) { eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); if (pActiveViewSh) pActiveViewSh->GetActiveWin()->GrabFocus(); return; } - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) ScInputMode eOldMode = eMode; eMode = eNewMode; if (eOldMode == SC_INPUT_TOP && eNewMode != eOldMode) - StopInputWinEngine( FALSE ); + StopInputWinEngine( sal_False ); if (eMode==SC_INPUT_TOP || eMode==SC_INPUT_TABLE) { if (eOldMode == SC_INPUT_NONE) // not when switching between modes { - if (StartTable(0, FALSE)) // 0 = look at existing document content for text or number + if (StartTable(0, sal_False)) // 0 = look at existing document content for text or number { if (pActiveViewSh) pActiveViewSh->GetViewData()->GetDocShell()->PostEditView( pEngine, aCursorPos ); } } - USHORT nPara = pEngine->GetParagraphCount()-1; + sal_uInt16 nPara = pEngine->GetParagraphCount()-1; xub_StrLen nLen = pEngine->GetText(nPara).Len(); - USHORT nCount = pEngine->GetViewCount(); + sal_uInt16 nCount = pEngine->GetViewCount(); - for (USHORT i=0; iGetView(i)-> SetSelection( ESelection( nPara, nLen, nPara, nLen ) ); } - pEngine->GetView(i)->ShowCursor(FALSE); + pEngine->GetView(i)->ShowCursor(sal_False); } } @@ -2345,34 +2345,34 @@ void ScInputHandler::SetMode( ScInputMode eNewMode ) if (eMode==SC_INPUT_TABLE || eMode==SC_INPUT_TYPE) { if (pTableView) - pTableView->SetEditEngineUpdateMode(TRUE); + pTableView->SetEditEngineUpdateMode(sal_True); } else { if (pTopView) - pTopView->SetEditEngineUpdateMode(TRUE); + pTopView->SetEditEngineUpdateMode(sal_True); } if (eNewMode != eOldMode) UpdateFormulaMode(); - bInOwnChange = FALSE; + bInOwnChange = sal_False; } //---------------------------------------------------------------------------------------- -// lcl_IsNumber - TRUE, wenn nur Ziffern (dann keine Autokorrektur) +// lcl_IsNumber - sal_True, wenn nur Ziffern (dann keine Autokorrektur) -BOOL lcl_IsNumber(const String& rString) +sal_Bool lcl_IsNumber(const String& rString) { xub_StrLen nLen = rString.Len(); for (xub_StrLen i=0; i '9' ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } void lcl_SelectionToEnd( EditView* pView ) @@ -2380,7 +2380,7 @@ void lcl_SelectionToEnd( EditView* pView ) if ( pView ) { EditEngine* pEngine = pView->GetEditEngine(); - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); if ( nParCnt == 0 ) nParCnt = 1; ESelection aSel( nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); // empty selection, cursor at the end @@ -2388,24 +2388,24 @@ void lcl_SelectionToEnd( EditView* pView ) } } -void ScInputHandler::EnterHandler( BYTE nBlockMode ) +void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) { // #62806# Bei Makro-Aufrufen fuer Gueltigkeit kann Tod und Teufel passieren, // darum dafuer sorgen, dass EnterHandler nicht verschachtelt gerufen wird: if (bInEnterHandler) return; - bInEnterHandler = TRUE; - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInEnterHandler = sal_True; + bInOwnChange = sal_True; // disable ModifyHdl (reset below) ImplCreateEditEngine(); - BOOL bMatrix = ( nBlockMode == SC_ENTER_MATRIX ); + sal_Bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX ); SfxApplication* pSfxApp = SFX_APP(); EditTextObject* pObject = NULL; ScPatternAttr* pCellAttrs = NULL; - BOOL bAttrib = FALSE; // Formatierung vorhanden ? - BOOL bForget = FALSE; // wegen Gueltigkeit streichen ? + sal_Bool bAttrib = sal_False; // Formatierung vorhanden ? + sal_Bool bForget = sal_False; // wegen Gueltigkeit streichen ? String aString = GetEditText(pEngine); EditView* pActiveView = pTopView ? pTopView : pTableView; @@ -2438,7 +2438,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) { // #i67990# don't use pLastPattern in EnterHandler const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() ); - BOOL bOk = pData->IsDataValid( aString, *pPattern, aCursorPos ); + sal_Bool bOk = pData->IsDataValid( aString, *pPattern, aCursorPos ); if (!bOk) { @@ -2450,7 +2450,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) Window* pParent = Application::GetDefDialogParent(); if ( pData->DoError( pParent, aString, aCursorPos ) ) - bForget = TRUE; // Eingabe nicht uebernehmen + bForget = sal_True; // Eingabe nicht uebernehmen } } } @@ -2467,12 +2467,12 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) // or an invalid action - normal cell input is always aborted pActiveViewSh->DataPilotInput( aCursorPos, aString ); - bForget = TRUE; + bForget = sal_True; } } pEngine->CompleteOnlineSpelling(); - BOOL bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors(); + sal_Bool bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors(); if ( bSpellErrors ) { // #i3820# If the spell checker flags numerical input as error, @@ -2489,7 +2489,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) double nVal; if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) ) { - bSpellErrors = FALSE; // ignore the spelling errors + bSpellErrors = sal_False; // ignore the spelling errors } } } @@ -2497,11 +2497,11 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) // After RemoveAdjust, the EditView must not be repainted (has wrong font size etc). // SetUpdateMode must come after CompleteOnlineSpelling. // The view is hidden in any case below (Broadcast). - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); if ( bModified && !bForget ) // was wird eingeben (Text/Objekt) ? { - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); if ( nParCnt == 0 ) nParCnt = 1; ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); @@ -2513,9 +2513,9 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) if ( pActiveViewSh ) { SfxItemSet* pCommonAttrs = NULL; - for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++) + for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++) { - SfxItemState eState = aOldAttribs.GetItemState( nId, FALSE, &pItem ); + SfxItemState eState = aOldAttribs.GetItemState( nId, sal_False, &pItem ); if ( eState == SFX_ITEM_SET && nId != EE_CHAR_ESCAPEMENT && nId != EE_CHAR_PAIRKERNING && nId != EE_CHAR_KERNING && nId != EE_CHAR_XMLATTRIBS && @@ -2543,14 +2543,14 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) // check if EditObject is needed if ( bSpellErrors || nParCnt > 1 ) - bAttrib = TRUE; + bAttrib = sal_True; else { - for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++) + for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++) { - SfxItemState eState = aOldAttribs.GetItemState( nId, FALSE, &pItem ); + SfxItemState eState = aOldAttribs.GetItemState( nId, sal_False, &pItem ); if (eState == SFX_ITEM_DONTCARE) - bAttrib = TRUE; + bAttrib = sal_True; else if (eState == SFX_ITEM_SET) { // keep same items in EditEngine as in ScEditAttrTester @@ -2558,34 +2558,34 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS ) { if ( *pItem != pEditDefaults->Get(nId) ) - bAttrib = TRUE; + bAttrib = sal_True; } } } // Feldbefehle enthalten? - SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, FALSE ); + SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, sal_False ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) - bAttrib = TRUE; + bAttrib = sal_True; // not converted characters? - SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, FALSE ); + SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, sal_False ); if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET ) - bAttrib = TRUE; + bAttrib = sal_True; // Formeln immer als Formeln erkennen (#38309#) // (der Test vorher ist trotzdem noetig wegen Zell-Attributen) } if (bMatrix) - bAttrib = FALSE; + bAttrib = sal_False; if (bAttrib) { - ULONG nCtrl = pEngine->GetControlWord(); - ULONG nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0; + sal_uLong nCtrl = pEngine->GetControlWord(); + sal_uLong nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0; if ( ( nCtrl & EE_CNTRL_ALLOWBIGOBJS ) != nWantBig ) pEngine->SetControlWord( (nCtrl & ~EE_CNTRL_ALLOWBIGOBJS) | nWantBig ); pObject = pEngine->CreateTextObject(); @@ -2597,7 +2597,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) //! effizienter in der Liste suchen (ScUserList, nur einmal ToUpper) - USHORT nIndex; + sal_uInt16 nIndex; ScUserListData* pData = ScGlobal::GetUserList()->GetData(aString); if ( pData && pData->GetSubIndex( aString, nIndex ) ) aString = pData->GetSubStr( nIndex ); @@ -2619,23 +2619,23 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) pExecuteSh->ActiveGrabFocus(); } - bFormulaMode = FALSE; + bFormulaMode = sal_False; pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP DeleteRangeFinder(); ResetAutoPar(); - BOOL bOldMod = bModified; + sal_Bool bOldMod = bModified; - bModified = FALSE; - bSelIsRef = FALSE; + bModified = sal_False; + bSelIsRef = sal_False; eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); // #123344# Text input (through number formats) or ApplySelectionPattern modify // the cell's attributes, so pLastPattern is no longer valid @@ -2682,7 +2682,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) { SfxBindings& rBindings = pExecuteSh->GetViewFrame()->GetBindings(); - USHORT nId = FID_INPUTLINE_ENTER; + sal_uInt16 nId = FID_INPUTLINE_ENTER; if ( nBlockMode == SC_ENTER_BLOCK ) nId = FID_INPUTLINE_BLOCK; else if ( nBlockMode == SC_ENTER_MATRIX ) @@ -2706,7 +2706,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) if ( bOldMod && pExecuteSh && pCellAttrs && !bForget ) { // mit Eingabe zusammenfassen ? - pExecuteSh->ApplySelectionPattern( *pCellAttrs, TRUE, TRUE ); + pExecuteSh->ApplySelectionPattern( *pCellAttrs, sal_True, sal_True ); pExecuteSh->AdjustBlockHeight(); } @@ -2719,17 +2719,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) nFormSelStart = nFormSelEnd = 0; aFormText.Erase(); - bInOwnChange = FALSE; - bInEnterHandler = FALSE; + bInOwnChange = sal_False; + bInEnterHandler = sal_False; } void ScInputHandler::CancelHandler() { - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) ImplCreateEditEngine(); - bModified = FALSE; + bModified = sal_False; // don't rely on ShowRefFrame switching the active view synchronously // execute the function directly on the correct view's bindings instead @@ -2744,11 +2744,11 @@ void ScInputHandler::CancelHandler() pExecuteSh->SetTabNo(aCursorPos.Tab()); pExecuteSh->ActiveGrabFocus(); } - bFormulaMode = FALSE; + bFormulaMode = sal_False; SFX_APP()->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) ); SC_MOD()->SetRefInputHdl(NULL); if (pInputWin) - pInputWin->SetFormulaMode(FALSE); + pInputWin->SetFormulaMode(sal_False); UpdateAutoCorrFlag(); } pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP @@ -2756,7 +2756,7 @@ void ScInputHandler::CancelHandler() ResetAutoPar(); eMode = SC_INPUT_NONE; - StopInputWinEngine( TRUE ); + StopInputWinEngine( sal_True ); if (pExecuteSh) pExecuteSh->StopEditShell(); @@ -2764,17 +2764,17 @@ void ScInputHandler::CancelHandler() pEngine->SetText(String()); if ( !pLastState && pExecuteSh ) - pExecuteSh->UpdateInputHandler( TRUE ); // Status neu holen + pExecuteSh->UpdateInputHandler( sal_True ); // Status neu holen else - NotifyChange( pLastState, TRUE ); + NotifyChange( pLastState, sal_True ); nFormSelStart = nFormSelEnd = 0; aFormText.Erase(); - bInOwnChange = FALSE; + bInOwnChange = sal_False; } -BOOL ScInputHandler::IsModalMode( SfxObjectShell* pDocSh ) +sal_Bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh ) { // Referenzen auf unbenanntes Dokument gehen nicht @@ -2794,9 +2794,9 @@ void ScInputHandler::AddRefEntry() RemoveSelection(); if (pTableView) - pTableView->InsertText( cSep, FALSE ); + pTableView->InsertText( cSep, sal_False ); if (pTopView) - pTopView->InsertText( cSep, FALSE ); + pTopView->InsertText( cSep, sal_False ); DataChanged(); } @@ -2805,7 +2805,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc ) { HideTip(); - BOOL bOtherDoc = ( pRefViewSh && + sal_Bool bOtherDoc = ( pRefViewSh && pRefViewSh->GetViewData()->GetDocument() != pDoc ); if (bOtherDoc) if (!pDoc->GetDocumentShell()->HasName()) @@ -2885,17 +2885,17 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc ) if (pTableView || pTopView) { if (pTableView) - pTableView->InsertText( aRefStr, TRUE ); + pTableView->InsertText( aRefStr, sal_True ); if (pTopView) - pTopView->InsertText( aRefStr, TRUE ); + pTopView->InsertText( aRefStr, sal_True ); DataChanged(); } - bSelIsRef = TRUE; + bSelIsRef = sal_True; } -void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar ) +void ScInputHandler::InsertFunction( const String& rFuncName, sal_Bool bAddPar ) { if ( eMode == SC_INPUT_NONE ) { @@ -2915,7 +2915,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar ) if (pTableView) { - pTableView->InsertText( aText, FALSE ); + pTableView->InsertText( aText, sal_False ); if (bAddPar) { ESelection aSel = pTableView->GetSelection(); @@ -2926,7 +2926,7 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar ) } if (pTopView) { - pTopView->InsertText( aText, FALSE ); + pTopView->InsertText( aText, sal_False ); if (bAddPar) { ESelection aSel = pTopView->GetSelection(); @@ -2971,51 +2971,51 @@ void ScInputHandler::ClearText() DataChanged(); } -BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE */ ) +sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /* = sal_False */ ) { if (!bOptLoaded) { bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete(); - bOptLoaded = TRUE; + bOptLoaded = sal_True; } KeyCode aCode = rKEvt.GetKeyCode(); - USHORT nModi = aCode.GetModifier(); - BOOL bShift = aCode.IsShift(); - BOOL bControl = aCode.IsMod1(); - BOOL bAlt = aCode.IsMod2(); - USHORT nCode = aCode.GetCode(); + sal_uInt16 nModi = aCode.GetModifier(); + sal_Bool bShift = aCode.IsShift(); + sal_Bool bControl = aCode.IsMod1(); + sal_Bool bAlt = aCode.IsMod2(); + sal_uInt16 nCode = aCode.GetCode(); sal_Unicode nChar = rKEvt.GetCharCode(); // Alt-Return is accepted, everything else with ALT, or CTRL-TAB are not: if (( bAlt && !bControl && nCode != KEY_RETURN ) || ( bControl && aCode.GetCode() == KEY_TAB )) - return FALSE; + return sal_False; - BOOL bInputLine = ( eMode==SC_INPUT_TOP ); + sal_Bool bInputLine = ( eMode==SC_INPUT_TOP ); - BOOL bUsed = FALSE; - BOOL bSkip = FALSE; - BOOL bDoEnter = FALSE; + sal_Bool bUsed = sal_False; + sal_Bool bSkip = sal_False; + sal_Bool bDoEnter = sal_False; switch ( nCode ) { case KEY_RETURN: if (bControl && !bShift && !bInputLine) - bDoEnter = TRUE; + bDoEnter = sal_True; else if ( nModi == 0 && nTipVisible && pFormulaData && nAutoPos != SCPOS_INVALID ) { PasteFunctionData(); - bUsed = TRUE; + bUsed = sal_True; } else if ( nModi == 0 && nTipVisible && aManualTip.Len() ) { PasteManualTip(); - bUsed = TRUE; + bUsed = sal_True; } else { - BYTE nMode = SC_ENTER_NORMAL; + sal_uInt8 nMode = SC_ENTER_NORMAL; if ( bShift && bControl ) nMode = SC_ENTER_MATRIX; else if ( bAlt ) @@ -3025,7 +3025,7 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (pActiveViewSh) pActiveViewSh->MoveCursorEnter( bShift && !bControl ); - bUsed = TRUE; + bUsed = sal_True; } break; case KEY_TAB: @@ -3052,33 +3052,33 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (pActiveViewSh) pActiveViewSh->FindNextUnprot( bShift ); } - bUsed = TRUE; + bUsed = sal_True; } break; case KEY_ESCAPE: if ( nTipVisible ) { HideTip(); - bUsed = TRUE; + bUsed = sal_True; } else if( nTipVisibleSec ) { HideTipBelow(); - bUsed = TRUE; + bUsed = sal_True; } else if (eMode != SC_INPUT_NONE) { CancelHandler(); - bUsed = TRUE; + bUsed = sal_True; } else - bSkip = TRUE; + bSkip = sal_True; break; case KEY_F2: if ( !bShift && !bControl && !bAlt && eMode == SC_INPUT_TABLE ) { eMode = SC_INPUT_TYPE; - bUsed = TRUE; + bUsed = sal_True; } break; } @@ -3086,8 +3086,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE // Cursortasten nur ausfuehren, wenn schon im Edit-Modus // z.B. wegen Shift-Ctrl-PageDn (ist nicht als Accelerator definiert) - BOOL bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt); - BOOL bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln + sal_Bool bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt); + sal_Bool bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln if ( !bUsed && !bSkip && ( bDoEnter || EditEngine::DoesKeyChangeText(rKEvt) || ( eMode != SC_INPUT_NONE && ( bCursorKey || bInsKey ) ) ) ) { @@ -3097,14 +3097,14 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (bSelIsRef) { RemoveSelection(); - bSelIsRef = FALSE; + bSelIsRef = sal_False; } UpdateActiveView(); - BOOL bNewView = DataChanging( nChar ); + sal_Bool bNewView = DataChanging( nChar ); if (bProtected) // Zelle geschuetzt? - bUsed = TRUE; // Key-Event nicht weiterleiten + bUsed = sal_True; // Key-Event nicht weiterleiten else // Aenderungen erlaubt { if (bNewView ) // neu anlegen @@ -3141,37 +3141,37 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE if (pTableView || pTopView) { -// pActiveView->SetEditEngineUpdateMode(TRUE); //! gibt Muell !!!! +// pActiveView->SetEditEngineUpdateMode(sal_True); //! gibt Muell !!!! if (bDoEnter) { if (pTableView) if( pTableView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) ) - bUsed = TRUE; + bUsed = sal_True; if (pTopView) if( pTopView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) ) - bUsed = TRUE; + bUsed = sal_True; } else if ( nAutoPar && nChar == ')' && CursorAtClosingPar() ) { SkipClosingPar(); - bUsed = TRUE; + bUsed = sal_True; } else { if (pTableView) if ( pTableView->PostKeyEvent( rKEvt ) ) - bUsed = TRUE; + bUsed = sal_True; if (pTopView) if ( pTopView->PostKeyEvent( rKEvt ) ) - bUsed = TRUE; + bUsed = sal_True; } // Auto-Eingabe: if ( bUsed && bAutoComplete ) { - bUseTab = FALSE; + bUseTab = sal_False; nAutoPos = SCPOS_INVALID; // do not search further KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); @@ -3213,9 +3213,9 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE return bUsed; } -BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) +sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForce ) { - BOOL bUsed = FALSE; + sal_Bool bUsed = sal_False; if ( rCEvt.GetCommand() == COMMAND_CURSORPOS ) { @@ -3230,7 +3230,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) pTableView->Command( rCEvt ); else if (pTopView) // call only once pTopView->Command( rCEvt ); - bUsed = TRUE; + bUsed = sal_True; } } } @@ -3241,7 +3241,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) if (!bOptLoaded) { bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete(); - bOptLoaded = TRUE; + bOptLoaded = sal_True; } HideTip(); @@ -3250,14 +3250,14 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) if ( bSelIsRef ) { RemoveSelection(); - bSelIsRef = FALSE; + bSelIsRef = sal_False; } UpdateActiveView(); - BOOL bNewView = DataChanging( 0, TRUE ); + sal_Bool bNewView = DataChanging( 0, sal_True ); if (bProtected) // cell protected - bUsed = TRUE; // event is used + bUsed = sal_True; // event is used else // changes allowed { if (bNewView) // create new edit view @@ -3290,7 +3290,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) if (pTopView) pTopView->Command( rCEvt ); - bUsed = TRUE; + bUsed = sal_True; if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT ) { @@ -3317,26 +3317,26 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce ) } void ScInputHandler::NotifyChange( const ScInputHdlState* pState, - BOOL bForce, ScTabViewShell* pSourceSh, - BOOL bStopEditing) + sal_Bool bForce, ScTabViewShell* pSourceSh, + sal_Bool bStopEditing) { // #62806# Wenn der Aufruf aus einem Makro-Aufruf im EnterHandler kommt, // gleich abbrechen und nicht den Status durcheinander bringen if (bInEnterHandler) return; - BOOL bRepeat = (pState == pLastState); + sal_Bool bRepeat = (pState == pLastState); if (!bRepeat && pState && pLastState) - bRepeat = sal::static_int_cast(*pState == *pLastState); + bRepeat = sal::static_int_cast(*pState == *pLastState); if (bRepeat && !bForce) return; - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) if ( pState && !pLastState ) // wieder enablen - bForce = TRUE; + bForce = sal_True; - BOOL bHadObject = pLastState && pLastState->GetEditData(); + sal_Bool bHadObject = pLastState && pLastState->GetEditData(); //! Before EditEngine gets eventually created (so it gets the right pools) if ( pSourceSh ) @@ -3358,7 +3358,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, if ( pState ) { - BOOL bIgnore = FALSE; + sal_Bool bIgnore = sal_False; // hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP), // FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird: @@ -3373,7 +3373,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, EnterHandler(); } else - bIgnore = TRUE; + bIgnore = sal_True; } if ( !bIgnore /* || bRepeat */ ) @@ -3382,16 +3382,16 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, const ScAddress& rEPos = pState->GetEndPos(); const EditTextObject* pData = pState->GetEditData(); String aString = pState->GetString(); - BOOL bTxtMod = FALSE; + sal_Bool bTxtMod = sal_False; ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); aCursorPos = pState->GetPos(); if ( pData /* || bRepeat */ ) - bTxtMod = TRUE; + bTxtMod = sal_True; else if ( bHadObject ) - bTxtMod = TRUE; + bTxtMod = sal_True; else if ( bTextValid ) bTxtMod = ( aString != aCurrentText ); else @@ -3404,13 +3404,13 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, pEngine->SetText( *pData ); aString = GetEditText(pEngine); lcl_RemoveTabs(aString); - bTextValid = FALSE; + bTextValid = sal_False; aCurrentText.Erase(); } else { aCurrentText = aString; - bTextValid = TRUE; //! erst nur als String merken + bTextValid = sal_True; //! erst nur als String merken } if ( pInputWin ) @@ -3431,7 +3431,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, if ( !aPosStr.Len() ) // kein Name -> formatieren { - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if( aAddrDetails.eConv == formula::FormulaGrammar::CONV_XL_R1C1 ) nFlags |= SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE; if ( rSPos != rEPos ) @@ -3455,19 +3455,19 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, // Online spelling is turned back on in StartTable, after setting // the right language from cell attributes. - ULONG nCntrl = pEngine->GetControlWord(); + sal_uLong nCntrl = pEngine->GetControlWord(); if ( nCntrl & EE_CNTRL_ONLINESPELLING ) pEngine->SetControlWord( nCntrl & ~EE_CNTRL_ONLINESPELLING ); - bModified = FALSE; - bSelIsRef = FALSE; - bProtected = FALSE; - bCommandErrorShown = FALSE; + bModified = sal_False; + bSelIsRef = sal_False; + bProtected = sal_False; + bCommandErrorShown = sal_False; } } } -// bProtected = FALSE; +// bProtected = sal_False; if ( pInputWin) { @@ -3507,7 +3507,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, HideTip(); HideTipBelow(); - bInOwnChange = FALSE; + bInOwnChange = sal_False; } void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust ) @@ -3544,13 +3544,13 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer ) { if ( pInputWin) { - pInputWin->EnableButtons( FALSE ); + pInputWin->EnableButtons( sal_False ); pInputWin->Disable(); } } else if ( !bFormulaMode ) // #39210# Formel auch z.B. bei Hilfe behalten { - bInOwnChange = TRUE; // disable ModifyHdl (reset below) + bInOwnChange = sal_True; // disable ModifyHdl (reset below) pActiveViewSh = NULL; pEngine->SetText( EMPTY_STRING ); @@ -3561,7 +3561,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer ) pInputWin->Disable(); } - bInOwnChange = FALSE; + bInOwnChange = sal_False; } } } @@ -3578,20 +3578,20 @@ void ScInputHandler::InputSelection( EditView* pView ) ResetAutoPar(); } -void ScInputHandler::InputChanged( EditView* pView, BOOL bFromNotify ) +void ScInputHandler::InputChanged( EditView* pView, sal_Bool bFromNotify ) { ESelection aSelection = pView->GetSelection(); UpdateActiveView(); // #i20282# DataChanged needs to know if this is from the input line's modify handler - BOOL bFromTopNotify = ( bFromNotify && pView == pTopView ); + sal_Bool bFromTopNotify = ( bFromNotify && pView == pTopView ); - BOOL bNewView = DataChanging(); //! kann das hier ueberhaupt sein? + sal_Bool bNewView = DataChanging(); //! kann das hier ueberhaupt sein? aCurrentText = pView->GetEditEngine()->GetText(); // auch den String merken pEngine->SetText( aCurrentText ); DataChanged( bFromTopNotify ); - bTextValid = TRUE; // wird in DataChanged auf FALSE gesetzt + bTextValid = sal_True; // wird in DataChanged auf sal_False gesetzt if ( pActiveViewSh ) { @@ -3611,7 +3611,7 @@ const String& ScInputHandler::GetEditString() if (pEngine) { aCurrentText = pEngine->GetText(); // immer neu aus Engine - bTextValid = TRUE; + bTextValid = sal_True; } return aCurrentText; @@ -3626,16 +3626,16 @@ Size ScInputHandler::GetTextSize() return aSize; } -BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) +sal_Bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (pEngine) { // Feldbefehle enthalten? - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); SfxItemSet aSet = pEngine->GetAttribs( ESelection(0,0,nParCnt,0) ); - SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE ); + SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, sal_False ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) { // Inhalt kopieren @@ -3646,20 +3646,20 @@ BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine ) // Attribute loeschen - for (USHORT i=0; i 1 ) { - xub_StrLen nLen = rDestEngine.GetTextLen( (USHORT)0 ); + xub_StrLen nLen = rDestEngine.GetTextLen( (sal_uInt16)0 ); ESelection aSel( 0,nLen, 1,0 ); rDestEngine.QuickInsertText( ' ', aSel ); // Umbruch durch Space ersetzen --nParCnt; } - bRet = TRUE; + bRet = sal_True; } } return bRet; @@ -3693,9 +3693,9 @@ EditView* ScInputHandler::GetFuncEditView() { if ( eMode != SC_INPUT_TABLE ) { - bCreatingFuncView = TRUE; // RangeFinder nicht anzeigen + bCreatingFuncView = sal_True; // RangeFinder nicht anzeigen SetMode( SC_INPUT_TABLE ); - bCreatingFuncView = FALSE; + bCreatingFuncView = sal_False; if ( pTableView ) pTableView->GetEditEngine()->SetText( EMPTY_STRING ); } @@ -3724,7 +3724,7 @@ void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd ) if (pView) pView->SetSelection( ESelection(0,nStart, 0,nEnd) ); - bModified = TRUE; + bModified = sal_True; } //------------------------------------------------------------------------ @@ -3747,13 +3747,13 @@ void ScInputHandler::InputReplaceSelection( const String& rStr ) EditView* pView = GetFuncEditView(); if (pView) { - pView->SetEditEngineUpdateMode( FALSE ); -// pView->InsertText( rStr, TRUE ); + pView->SetEditEngineUpdateMode( sal_False ); +// pView->InsertText( rStr, sal_True ); pView->GetEditEngine()->SetText( aFormText ); pView->SetSelection( ESelection(0,nFormSelStart, 0,nFormSelEnd) ); - pView->SetEditEngineUpdateMode( TRUE ); + pView->SetEditEngineUpdateMode( sal_True ); } - bModified = TRUE; + bModified = sal_True; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index b028a0a153ce..f686ffdc2929 100755 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -100,7 +100,7 @@ enum ScNameInputType SFX_IMPL_CHILDWINDOW(ScInputWindowWrapper,FID_INPUTLINE_STATUS) ScInputWindowWrapper::ScInputWindowWrapper( Window* pParentP, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* /* pInfo */ ) : SfxChildWindow( pParentP, nId ) @@ -148,7 +148,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ), aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ), aTextEqual ( ScResId( SCSTR_QHELP_BTNEQUAL ) ), - bIsOkCancelMode ( FALSE ) + bIsOkCancelMode ( sal_False ) { ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); @@ -165,7 +165,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : } DBG_ASSERT( pViewSh, "no view shell for input window" ); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // Positionsfenster, 3 Buttons, Eingabefenster InsertWindow ( 1, &aWndPos, 0, 0 ); @@ -197,7 +197,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : aWndPos .Show(); aTextWindow .Show(); - pInputHdl = SC_MOD()->GetInputHdl( pViewSh, FALSE ); // use own handler even if ref-handler is set + pInputHdl = SC_MOD()->GetInputHdl( pViewSh, sal_False ); // use own handler even if ref-handler is set if (pInputHdl) pInputHdl->SetInputWindow( this ); @@ -220,14 +220,14 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten } else if ( pViewSh ) - pViewSh->UpdateInputHandler( TRUE ); // unbedingtes Update + pViewSh->UpdateInputHandler( sal_True ); // unbedingtes Update pImgMgr->RegisterToolBox( this ); } __EXPORT ScInputWindow::~ScInputWindow() { - BOOL bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? + sal_Bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? // if any view's input handler has a pointer to this input window, reset it // (may be several ones, #74522#) @@ -243,7 +243,7 @@ __EXPORT ScInputWindow::~ScInputWindow() if ( pHdl && pHdl->GetInputWindow() == this ) { pHdl->SetInputWindow( NULL ); - pHdl->StopInputWinEngine( FALSE ); // #125841# reset pTopView pointer + pHdl->StopInputWinEngine( sal_False ); // #125841# reset pTopView pointer } pSh = SfxViewShell::GetNext( *pSh, &aScType ); } @@ -371,13 +371,13 @@ void __EXPORT ScInputWindow::Select() if ( rMark.IsMarked() || rMark.IsMultiMarked() ) { ScRangeList aMarkRangeList; - rMark.FillRangeListWithMarks( &aMarkRangeList, FALSE ); + rMark.FillRangeListWithMarks( &aMarkRangeList, sal_False ); ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); // check if one of the marked ranges is empty bool bEmpty = false; - const ULONG nCount = aMarkRangeList.Count(); - for ( ULONG i = 0; i < nCount; ++i ) + const sal_uLong nCount = aMarkRangeList.Count(); + for ( sal_uLong i = 0; i < nCount; ++i ) { const ScRange aRange( *aMarkRangeList.GetObject( i ) ); if ( pDoc->IsBlockEmpty( aRange.aStart.Tab(), @@ -392,7 +392,7 @@ void __EXPORT ScInputWindow::Select() if ( bEmpty ) { ScRangeList aRangeList; - const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); if ( bDataFound ) { const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) ); @@ -402,14 +402,14 @@ void __EXPORT ScInputWindow::Select() else { const sal_Bool bSubTotal( UseSubTotal( &aMarkRangeList ) ); - for ( ULONG i = 0; i < nCount; ++i ) + for ( sal_uLong i = 0; i < nCount; ++i ) { const ScRange aRange( *aMarkRangeList.GetObject( i ) ); const bool bSetCursor = ( i == nCount - 1 ? true : false ); const bool bContinue = ( i != 0 ? true : false ); if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) ) { - pViewSh->MarkRange( aRange, FALSE, FALSE ); + pViewSh->MarkRange( aRange, sal_False, sal_False ); pViewSh->SetCursor( aRange.aEnd.Col(), aRange.aEnd.Row() ); const ScRangeList aRangeList; const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal ); @@ -422,7 +422,7 @@ void __EXPORT ScInputWindow::Select() else // nur in Eingabezeile einfuegen { ScRangeList aRangeList; - const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) ); const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal ); SetFuncString( aFormula ); @@ -472,7 +472,7 @@ void __EXPORT ScInputWindow::Select() pView->SetSelection( ESelection(0,1, 0,1) ); pScMod->InputChanged(pView); SetOkCancelMode(); - pView->SetEditEngineUpdateMode(TRUE); + pView->SetEditEngineUpdateMode(sal_True); } } break; @@ -493,7 +493,7 @@ void __EXPORT ScInputWindow::Resize() aTextWindow.Invalidate(); } -void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit ) +void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit ) { //! new method at ScModule to query if function autopilot is open SfxViewFrame* pViewFrm = SfxViewFrame::Current(); @@ -521,7 +521,7 @@ void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit ) if ( bDoEdit ) SetOkCancelMode(); // nicht, wenn gleich hinterher Enter/Cancel - pView->SetEditEngineUpdateMode(TRUE); + pView->SetEditEngineUpdateMode(sal_True); } } } @@ -553,7 +553,7 @@ void ScInputWindow::SetOkCancelMode() SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); if (!bIsOkCancelMode) { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); RemoveItem( 3 ); // SID_INPUT_SUM und SID_INPUT_EQUAL entfernen RemoveItem( 3 ); @@ -563,7 +563,7 @@ void ScInputWindow::SetOkCancelMode() SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL ); SetItemText ( SID_INPUT_OK, aTextOk ); SetHelpId ( SID_INPUT_OK, HID_INSWIN_OK ); - bIsOkCancelMode = TRUE; + bIsOkCancelMode = sal_True; } } @@ -577,7 +577,7 @@ void ScInputWindow::SetSumAssignMode() SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); if (bIsOkCancelMode) { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // SID_INPUT_CANCEL, und SID_INPUT_OK entfernen RemoveItem( 3 ); @@ -588,13 +588,13 @@ void ScInputWindow::SetSumAssignMode() SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); SetItemText ( SID_INPUT_EQUAL, aTextEqual ); SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC ); - bIsOkCancelMode = FALSE; + bIsOkCancelMode = sal_False; - SetFormulaMode(FALSE); // kein editieren -> keine Formel + SetFormulaMode(sal_False); // kein editieren -> keine Formel } } -void ScInputWindow::SetFormulaMode( BOOL bSet ) +void ScInputWindow::SetFormulaMode( sal_Bool bSet ) { aWndPos.SetFormulaMode(bSet); aTextWindow.SetFormulaMode(bSet); @@ -625,7 +625,7 @@ String __EXPORT ScInputWindow::GetText() const //UNUSED2008-05 return aTextWindow.GetEditView(); //UNUSED2008-05 } -BOOL ScInputWindow::IsInputActive() +sal_Bool ScInputWindow::IsInputActive() { return aTextWindow.IsInputActive(); } @@ -640,7 +640,7 @@ void ScInputWindow::MakeDialogEditView() aTextWindow.MakeDialogEditView(); } -void ScInputWindow::StopEditEngine( BOOL bAll ) +void ScInputWindow::StopEditEngine( sal_Bool bAll ) { aTextWindow.StopEditEngine( bAll ); } @@ -678,7 +678,7 @@ void ScInputWindow::PosGrabFocus() aWndPos.GrabFocus(); } -void ScInputWindow::EnableButtons( BOOL bEnable ) +void ScInputWindow::EnableButtons( sal_Bool bEnable ) { // when enabling buttons, always also enable the input window itself if ( bEnable && !IsEnabled() ) @@ -705,7 +705,7 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // IMAGE macro uses pScMod, pImgMgr, bHC SetItemImage( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ) ); @@ -733,11 +733,11 @@ ScTextWnd::ScTextWnd( Window* pParent ) DragSourceHelper( this ), pEditEngine ( NULL ), pEditView ( NULL ), - bIsInsertMode( TRUE ), - bFormulaMode ( FALSE ), - bInputMode ( FALSE ) + bIsInsertMode( sal_True ), + bFormulaMode ( sal_False ), + bInputMode ( sal_False ) { - EnableRTL( FALSE ); // #106269# EditEngine can't be used with VCL EnableRTL + EnableRTL( sal_False ); // #106269# EditEngine can't be used with VCL EnableRTL bIsRTL = GetSettings().GetLayoutRTL(); @@ -751,7 +751,7 @@ ScTextWnd::ScTextWnd( Window* pParent ) Color aBgColor= rStyleSettings.GetWindowColor(); Color aTxtColor= rStyleSettings.GetWindowTextColor(); - aTextFont.SetTransparent ( TRUE ); + aTextFont.SetTransparent ( sal_True ); aTextFont.SetFillColor ( aBgColor ); //aTextFont.SetColor ( COL_FIELDTEXT ); aTextFont.SetColor (aTxtColor); @@ -841,7 +841,7 @@ void __EXPORT ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) if (pEditView) { - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pEditView->MouseButtonDown( rMEvt ); } } @@ -864,8 +864,8 @@ void __EXPORT ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt ) void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) { - bInputMode = TRUE; - USHORT nCommand = rCEvt.GetCommand(); + bInputMode = sal_True; + sal_uInt16 nCommand = rCEvt.GetCommand(); if ( pEditView /* && ( nCommand == COMMAND_STARTDRAG || nCommand == COMMAND_VOICE ) */ ) { ScModule* pScMod = SC_MOD(); @@ -875,9 +875,9 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) // already set in StartEditEngine when the EditEngine is created // #63263# verhindern, dass die EditView beim View-Umschalten wegkommt - pScMod->SetInEditCommand( TRUE ); + pScMod->SetInEditCommand( sal_True ); pEditView->Command( rCEvt ); - pScMod->SetInEditCommand( FALSE ); + pScMod->SetInEditCommand( sal_False ); // #48929# COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde // darum in dem Fall kein InputChanged @@ -921,14 +921,14 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) else Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern... - bInputMode = FALSE; + bInputMode = sal_False; } void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) { if ( pEditView ) { - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE ); + CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True ); pEditView->Command( aDragEvent ); // handling of d&d to different view (CancelHandler) can't be done here, @@ -938,24 +938,24 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) void __EXPORT ScTextWnd::KeyInput(const KeyEvent& rKEvt) { - bInputMode = TRUE; + bInputMode = sal_True; if (!SC_MOD()->InputKeyEvent( rKEvt )) { - BOOL bUsed = FALSE; + sal_Bool bUsed = sal_False; ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe if (!bUsed) Window::KeyInput( rKEvt ); } - bInputMode = FALSE; + bInputMode = sal_False; } void __EXPORT ScTextWnd::GetFocus() { ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) - pViewSh->SetFormShellAtTop( FALSE ); // focus in input line -> FormShell no longer on top + pViewSh->SetFormShellAtTop( sal_False ); // focus in input line -> FormShell no longer on top } void __EXPORT ScTextWnd::LoseFocus() @@ -972,7 +972,7 @@ String __EXPORT ScTextWnd::GetText() const return GetTextString(); } -void ScTextWnd::SetFormulaMode( BOOL bSet ) +void ScTextWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -985,8 +985,8 @@ void ScTextWnd::UpdateAutoCorrFlag() { if ( pEditEngine ) { - ULONG nControl = pEditEngine->GetControlWord(); - ULONG nOld = nControl; + sal_uLong nControl = pEditEngine->GetControlWord(); + sal_uLong nOld = nControl; if ( bFormulaMode ) nControl &= ~EE_CNTRL_AUTOCORRECT; // keine Autokorrektur in Formeln else @@ -1023,7 +1023,7 @@ void lcl_ModifyRTLDefaults( SfxItemSet& rSet ) //rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) ); // PaperSize width is limited to USHRT_MAX in RTL mode (because of EditEngine's - // USHORT values in EditLine), so the text may be wrapped and line spacing must be + // sal_uInt16 values in EditLine), so the text may be wrapped and line spacing must be // increased to not see the beginning of the next line. SvxLineSpacingItem aItem( SVX_LINESPACE_TWO_LINES, EE_PARA_SBL ); aItem.SetPropLineSpace( 200 ); @@ -1057,11 +1057,11 @@ void ScTextWnd::StartEditEngine() pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); - pNew->SetExecuteURL( FALSE ); + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew->SetExecuteURL( sal_False ); pEditEngine = pNew; - pEditEngine->SetUpdateMode( FALSE ); + pEditEngine->SetUpdateMode( sal_False ); pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) ); pEditEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) ); @@ -1073,7 +1073,7 @@ void ScTextWnd::StartEditEngine() pEditEngine->SetFontInfoInItemSet( *pSet, aTextFont ); lcl_ExtendEditFontAttribs( *pSet ); // turn off script spacing to match DrawText output - pSet->Put( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) ); + pSet->Put( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) ); if ( bIsRTL ) lcl_ModifyRTLDefaults( *pSet ); pEditEngine->SetDefaults( pSet ); @@ -1082,12 +1082,12 @@ void ScTextWnd::StartEditEngine() // #57254# Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. - BOOL bFilled = FALSE; + sal_Bool bFilled = sal_False; ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? bFilled = pHdl->GetTextAndFields( *pEditEngine ); - pEditEngine->SetUpdateMode( TRUE ); + pEditEngine->SetUpdateMode( sal_True ); // aString ist die Wahrheit... if ( bFilled && pEditEngine->GetText() == aString ) @@ -1099,7 +1099,7 @@ void ScTextWnd::StartEditEngine() pEditView->SetInsertMode(bIsInsertMode); // Text aus Clipboard wird als ASCII einzeilig uebernommen - ULONG n = pEditView->GetControlWord(); + sal_uLong n = pEditView->GetControlWord(); pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE ); pEditEngine->InsertView( pEditView, EE_APPEND ); @@ -1120,7 +1120,7 @@ void ScTextWnd::StartEditEngine() if ( pObjSh && pObjSh->ISA(ScDocShell) ) { ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document - BYTE nScript = pDoc->GetStringScriptType( aString ); + sal_uInt8 nScript = pDoc->GetStringScriptType( aString ); if ( nScript & SCRIPTTYPE_COMPLEX ) Invalidate(); } @@ -1143,13 +1143,13 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify*, EMPTYARG) // while an InputHandler method is modifying the EditEngine content if ( pHdl && !pHdl->IsInOwnChange() ) - pHdl->InputChanged( pEditView, TRUE ); // #i20282# InputChanged must know if called from modify handler + pHdl->InputChanged( pEditView, sal_True ); // #i20282# InputChanged must know if called from modify handler } return 0; } -void ScTextWnd::StopEditEngine( BOOL bAll ) +void ScTextWnd::StopEditEngine( sal_Bool bAll ) { if (pEditView) { @@ -1162,7 +1162,7 @@ void ScTextWnd::StopEditEngine( BOOL bAll ) pScMod->InputSelection( pEditView ); aString = pEditEngine->GetText(); bIsInsertMode = pEditView->IsInsertMode(); - BOOL bSelection = pEditView->HasSelection(); + sal_Bool bSelection = pEditView->HasSelection(); pEditEngine->SetModifyHdl(Link()); DELETEZ(pEditView); DELETEZ(pEditEngine); @@ -1183,7 +1183,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) { if ( rNewString != aString ) { - bInputMode = TRUE; + bInputMode = sal_True; // Position der Aenderung suchen, nur Rest painten @@ -1193,14 +1193,14 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (!pEditEngine) { - BOOL bPaintAll; + sal_Bool bPaintAll; if ( bIsRTL ) - bPaintAll = TRUE; + bPaintAll = sal_True; else { // test if CTL script type is involved - BYTE nOldScript = 0; - BYTE nNewScript = 0; + sal_uInt8 nOldScript = 0; + sal_uInt8 nNewScript = 0; SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && pObjSh->ISA(ScDocShell) ) { @@ -1242,7 +1242,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (nDifPos) nInvPos += GetTextWidth(aString,0,nDifPos); - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( nDifPos == aString.Len() ) // only new characters appended nFlags = INVALIDATE_NOERASE; // then background is already clear @@ -1261,7 +1261,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (!maAccTextDatas.empty()) maAccTextDatas.back()->TextChanged(); - bInputMode = FALSE; + bInputMode = sal_False; } } @@ -1270,7 +1270,7 @@ const String& ScTextWnd::GetTextString() const return aString; } -BOOL ScTextWnd::IsInputActive() +sal_Bool ScTextWnd::IsInputActive() { return HasFocus(); } @@ -1292,11 +1292,11 @@ void ScTextWnd::MakeDialogEditView() pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); - pNew->SetExecuteURL( FALSE ); + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew->SetExecuteURL( sal_False ); pEditEngine = pNew; - pEditEngine->SetUpdateMode( FALSE ); + pEditEngine->SetUpdateMode( sal_False ); pEditEngine->SetWordDelimiters( pEditEngine->GetWordDelimiters() += '=' ); pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) ); @@ -1306,7 +1306,7 @@ void ScTextWnd::MakeDialogEditView() if ( bIsRTL ) lcl_ModifyRTLDefaults( *pSet ); pEditEngine->SetDefaults( pSet ); - pEditEngine->SetUpdateMode( TRUE ); + pEditEngine->SetUpdateMode( sal_True ); pEditView = new EditView( pEditEngine, this ); pEditEngine->InsertView( pEditView, EE_APPEND ); @@ -1381,7 +1381,7 @@ ScPosWnd::ScPosWnd( Window* pParent ) : ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ), pAccel ( NULL ), nTipVisible ( 0 ), - bFormulaMode( FALSE ) + bFormulaMode( sal_False ) { Size aSize( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GW99999:GW99999")) ), GetTextHeight() ); @@ -1403,7 +1403,7 @@ __EXPORT ScPosWnd::~ScPosWnd() delete pAccel; } -void ScPosWnd::SetFormulaMode( BOOL bSet ) +void ScPosWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -1439,12 +1439,12 @@ void ScPosWnd::FillRangeNames() // per Hand sortieren, weil Funktionen nicht sortiert werden: ScRangeName* pRangeNames = pDoc->GetRangeName(); - USHORT nCount = pRangeNames->GetCount(); + sal_uInt16 nCount = pRangeNames->GetCount(); if ( nCount > 0 ) { - USHORT nValidCount = 0; + sal_uInt16 nValidCount = 0; ScRange aDummy; - USHORT i; + sal_uInt16 i; for ( i=0; iGetAppOptions(); - USHORT nMRUCount = rOpt.GetLRUFuncListCount(); - const USHORT* pMRUList = rOpt.GetLRUFuncList(); + sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount(); + const sal_uInt16* pMRUList = rOpt.GetLRUFuncList(); if (pMRUList) { const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); - ULONG nListCount = pFuncList->GetCount(); - for (USHORT i=0; iGetCount(); + for (sal_uInt16 i=0; iGetFunction( j ); if ( pDesc->nFIndex == nId && pDesc->pFuncName ) @@ -1522,13 +1522,13 @@ void __EXPORT ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( rHint.ISA(SfxSimpleHint) ) { - ULONG nHintId = ((SfxSimpleHint&)rHint).GetId(); + sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId(); if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL) FillRangeNames(); } else if ( rHint.ISA(SfxEventHint) ) { - ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId(); if ( nEventId == SFX_EVENT_ACTIVATEDOC ) FillRangeNames(); } @@ -1602,7 +1602,7 @@ void ScPosWnd::Modify() // determine the action that would be taken for the current input ScNameInputType eType = lcl_GetInputType( GetText() ); // uses current view - USHORT nStrId = 0; + sal_uInt16 nStrId = 0; switch ( eType ) { case SC_NAME_INPUT_CELL: @@ -1644,7 +1644,7 @@ void ScPosWnd::Modify() Rectangle aRect( aPos, aPos ); String aText = ScGlobal::GetRscString( nStrId ); - USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM; + sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM; nTipVisible = Help::ShowTip(pWin, aRect, aText, nAlign); } } @@ -1697,7 +1697,7 @@ void ScPosWnd::DoEnter() ScNameInputType eType = lcl_GetInputType( aText ); if ( eType == SC_NAME_INPUT_BAD_NAME || eType == SC_NAME_INPUT_BAD_SELECTION ) { - USHORT nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION; + sal_uInt16 nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION; pViewSh->ErrorMessage( nId ); } else if ( eType == SC_NAME_INPUT_DEFINE ) @@ -1707,7 +1707,7 @@ void ScPosWnd::DoEnter() ScDocument* pDoc = pDocShell->GetDocument(); ScRangeName* pNames = pDoc->GetRangeName(); ScRange aSelection; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; if ( pNames && !pNames->SearchName( aText, nIndex ) && (pViewData->GetSimpleArea( aSelection ) == SC_MARK_SIMPLE) ) { @@ -1719,8 +1719,8 @@ void ScPosWnd::DoEnter() if ( aNewRanges.Insert(pNew) ) { ScDocFunc aFunc(*pDocShell); - aFunc.ModifyRangeNames( aNewRanges, FALSE ); - pViewSh->UpdateInputHandler(TRUE); + aFunc.ModifyRangeNames( aNewRanges, sal_False ); + pViewSh->UpdateInputHandler(sal_True); } else delete pNew; // shouldn't happen @@ -1731,7 +1731,7 @@ void ScPosWnd::DoEnter() // for all selection types, excecute the SID_CURRENTCELL slot SfxStringItem aPosItem( SID_CURRENTCELL, aText ); - SfxBoolItem aUnmarkItem( FN_PARAM_1, TRUE ); // remove existing selection + SfxBoolItem aUnmarkItem( FN_PARAM_1, sal_True ); // remove existing selection pViewSh->GetViewData()->GetDispatcher().Execute( SID_CURRENTCELL, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx index 78cb70fa64f0..6f471ebaa91b 100644 --- a/sc/source/ui/app/msgpool.cxx +++ b/sc/source/ui/app/msgpool.cxx @@ -66,11 +66,11 @@ ScMessagePool::ScMessagePool() aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ), aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ), aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ), - aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, FALSE ) ), + aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, sal_False ) ), aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ), aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ), // - aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) ) + aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, sal_False ) ) { ppPoolDefaults = new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1]; @@ -98,7 +98,7 @@ __EXPORT ScMessagePool::~ScMessagePool() Delete(); SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults) - for ( USHORT i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ ) + for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ ) SetRefCount( *ppPoolDefaults[i], 0 ); delete[] ppPoolDefaults; @@ -107,7 +107,7 @@ __EXPORT ScMessagePool::~ScMessagePool() } -SfxMapUnit __EXPORT ScMessagePool::GetMetric( USHORT nWhich ) const +SfxMapUnit __EXPORT ScMessagePool::GetMetric( sal_uInt16 nWhich ) const { // eigene Attribute: Twips, alles andere 1/100 mm diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx index 3d62c0396b51..4f61fdb23263 100644 --- a/sc/source/ui/app/rfindlst.cxx +++ b/sc/source/ui/app/rfindlst.cxx @@ -44,7 +44,7 @@ static ColorData aColNames[SC_RANGECOLORS] = ScRangeFindList::ScRangeFindList(const String& rName) : aDocName( rName ), - bHidden( FALSE ) + bHidden( sal_False ) { } @@ -58,7 +58,7 @@ ScRangeFindList::~ScRangeFindList() } } -ColorData ScRangeFindList::GetColorName( USHORT nIndex ) // static +ColorData ScRangeFindList::GetColorName( sal_uInt16 nIndex ) // static { return aColNames[nIndex % SC_RANGECOLORS]; } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 8051399d06fa..9a1858fe5170 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -135,11 +135,11 @@ //UNUSED2008-05 //UNUSED2008-05 class ScLibOptions : public utl::ConfigItem //UNUSED2008-05 { -//UNUSED2008-05 BOOL bWK3Flag; +//UNUSED2008-05 sal_Bool bWK3Flag; //UNUSED2008-05 //UNUSED2008-05 public: //UNUSED2008-05 ScLibOptions(); -//UNUSED2008-05 BOOL GetWK3Flag() const { return bWK3Flag; } +//UNUSED2008-05 sal_Bool GetWK3Flag() const { return bWK3Flag; } //UNUSED2008-05 }; //UNUSED2008-05 //UNUSED2008-05 #define CFGPATH_LIBFILTER "Office.Calc/Filter/Import/Lotus123" @@ -147,7 +147,7 @@ //UNUSED2008-05 //UNUSED2008-05 ScLibOptions::ScLibOptions() : //UNUSED2008-05 ConfigItem( rtl::OUString::createFromAscii( CFGPATH_LIBFILTER ) ), -//UNUSED2008-05 bWK3Flag( FALSE ) +//UNUSED2008-05 bWK3Flag( sal_False ) //UNUSED2008-05 { //UNUSED2008-05 com::sun::star::uno::Sequence aNames(1); //UNUSED2008-05 aNames[0] = rtl::OUString::createFromAscii( ENTRYSTR_WK3 ); @@ -158,7 +158,7 @@ //------------------------------------------------------------------ -ScResId::ScResId( USHORT nId ) : +ScResId::ScResId( sal_uInt16 nId ) : ResId( nId, *SC_MOD()->GetResMgr() ) { } @@ -265,7 +265,7 @@ void ScDLL::Init() ::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod ); // common SFX controller - ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod ); + ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod ); // Svx-StatusBar-Controller SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod); @@ -291,39 +291,39 @@ void ScDLL::Init() ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK); ScNavigatorDialogWrapper ::RegisterChildWindowContext( sal::static_int_cast(ScTabViewShell::GetInterfaceId()), pMod); - ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScOptSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod); - ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScColRowNameRangesDlgWrapper::RegisterChildWindow(FALSE, pMod); - ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScOptSolverDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScNameDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScPivotLayoutWrapper ::RegisterChildWindow(sal_False, pMod); + ScTabOpDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScSpecialFilterDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScDbNameDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScConsolidateDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScPrintAreasDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScCondFormatDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScColRowNameRangesDlgWrapper::RegisterChildWindow(sal_False, pMod); + ScFormulaDlgWrapper ::RegisterChildWindow(sal_False, pMod); // First docking Window for Calc - ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod); + ScFunctionChildWindow ::RegisterChildWindow(sal_False, pMod); // Redlining- Window - ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScSimpleRefDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE ); - ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod); - - SvxSearchDialogWrapper ::RegisterChildWindow(FALSE, pMod); - SvxHlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod); - SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod); - SvxHyperlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_FORCEDOCK); - SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod); - GalleryChildWindow ::RegisterChildWindow(FALSE, pMod); - ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod); - ::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod); + ScAcceptChgDlgWrapper ::RegisterChildWindow(sal_False, pMod); + ScSimpleRefDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE ); + ScHighlightChgDlgWrapper ::RegisterChildWindow(sal_False, pMod); + + SvxSearchDialogWrapper ::RegisterChildWindow(sal_False, pMod); + SvxHlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod); + SvxFontWorkChildWindow ::RegisterChildWindow(sal_False, pMod); + SvxHyperlinkDlgWrapper ::RegisterChildWindow(sal_False, pMod, SFX_CHILDWIN_FORCEDOCK); + SvxIMapDlgChildWindow ::RegisterChildWindow(sal_False, pMod); + GalleryChildWindow ::RegisterChildWindow(sal_False, pMod); + ScSpellDialogChildWindow ::RegisterChildWindow(sal_False, pMod); + ::avmedia::MediaPlayer ::RegisterChildWindow(sal_False, pMod); //Added by PengYunQuan for Validity Cell Range Picker // Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init @@ -346,7 +346,7 @@ void ScDLL::Init() // ::com::sun::star::form::component::Form-Objekt-Factory eintragen FmFormObjFactory(); - pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast(pMod->GetAppOptions().GetAppMetric()) ) ); + pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast(pMod->GetAppOptions().GetAppMetric()) ) ); // StarOne Services are now handled in the registry } diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index f7a02e1577f7..563f83a431ce 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -122,7 +122,7 @@ #define SC_IDLE_STEP 75 #define SC_IDLE_COUNT 50 -static USHORT nIdleCount = 0; +static sal_uInt16 nIdleCount = 0; //------------------------------------------------------------------ @@ -137,7 +137,7 @@ SFX_IMPL_INTERFACE( ScModule, SfxShell, ScResId(RID_APPTITLE) ) //------------------------------------------------------------------ ScModule::ScModule( SfxObjectFactory* pFact ) : - SfxModule( SfxApplication::CreateResManager( "sc" ), FALSE, pFact, NULL ), + SfxModule( SfxApplication::CreateResManager( "sc" ), sal_False, pFact, NULL ), pSelTransfer( NULL ), pMessagePool( NULL ), pRefInputHandler( NULL ), @@ -156,9 +156,9 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : pSvxErrorHdl( NULL ), pFormEditData( NULL ), nCurRefDlgId( 0 ), - bIsWaterCan( FALSE ), - bIsInEditCommand( FALSE ), - bIsInExecuteDrop( FALSE ), + bIsWaterCan( sal_False ), + bIsInEditCommand( sal_False ), + bIsInExecuteDrop( sal_False ), mbIsInSharedDocLoading( false ), mbIsInSharedDocSaving( false ) { @@ -221,10 +221,10 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 if ( ScDetectiveFunc::IsColorsInitialized() ) { const svtools::ColorConfig& rColors = GetColorConfig(); - BOOL bArrows = + sal_Bool bArrows = ( ScDetectiveFunc::GetArrowColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVE).nColor || ScDetectiveFunc::GetErrorColor() != (ColorData)rColors.GetColorValue(svtools::CALCDETECTIVEERROR).nColor ); - BOOL bComments = + sal_Bool bComments = ( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor ); if ( bArrows || bComments ) { @@ -329,7 +329,7 @@ void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.ISA(SfxSimpleHint) ) { - ULONG nHintId = ((SfxSimpleHint&)rHint).GetId(); + sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId(); if ( nHintId == SFX_HINT_DEINITIALIZING ) { // ConfigItems must be removed before ConfigManager @@ -383,7 +383,7 @@ void ScModule::Execute( SfxRequest& rReq ) SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL; const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -409,9 +409,9 @@ void ScModule::Execute( SfxRequest& rReq ) break; case SID_AUTOSPELL_CHECK: { - BOOL bSet; + sal_Bool bSet; const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) ) + if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); else { // Toggle @@ -432,7 +432,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_ATTR_METRIC: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) ) + if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) ) { FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) @@ -462,7 +462,7 @@ void ScModule::Execute( SfxRequest& rReq ) case FID_AUTOCOMPLETE: { ScAppOptions aNewOpts( GetAppOptions() ); - BOOL bNew = !aNewOpts.GetAutoComplete(); + sal_Bool bNew = !aNewOpts.GetAutoComplete(); aNewOpts.SetAutoComplete( bNew ); SetAppOptions( aNewOpts ); ScInputHandler::SetAutoComplete( bNew ); @@ -475,7 +475,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_DETECTIVE_AUTO: { ScAppOptions aNewOpts( GetAppOptions() ); - BOOL bNew = !aNewOpts.GetDetectiveAuto(); + sal_Bool bNew = !aNewOpts.GetDetectiveAuto(); SFX_REQUEST_ARG( rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO, sal_False ); if ( pAuto ) bNew = pAuto->GetValue(); @@ -516,7 +516,7 @@ void ScModule::Execute( SfxRequest& rReq ) case SID_ATTR_CHAR_CTL_LANGUAGE: { const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), TRUE, &pItem ) ) + if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( GetPool().GetWhich(nSlot), sal_True, &pItem ) ) { ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL; @@ -590,7 +590,7 @@ void ScModule::Execute( SfxRequest& rReq ) void ScModule::GetState( SfxItemSet& rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -605,17 +605,17 @@ void ScModule::GetState( SfxItemSet& rSet ) rSet.Put( SfxUInt16Item( nWhich, GetAppOptions().GetStatusFunc() ) ); break; case SID_ATTR_METRIC: - rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast(GetAppOptions().GetAppMetric()) ) ); + rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast(GetAppOptions().GetAppMetric()) ) ); break; case SID_AUTOSPELL_CHECK: { - BOOL bAuto; + sal_Bool bAuto; ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); if ( pDocSh ) bAuto = pDocSh->GetDocument()->GetDocOptions().IsAutoSpell(); else { - USHORT nDummyLang, nDummyCjk, nDummyCtl; + sal_uInt16 nDummyLang, nDummyCjk, nDummyCtl; GetSpellSettings( nDummyLang, nDummyCjk, nDummyCtl, bAuto ); } rSet.Put( SfxBoolItem( nWhich, bAuto ) ); @@ -650,7 +650,7 @@ void ScModule::HideDisabledSlots( SfxItemSet& rSet ) { SfxBindings& rBindings = pViewFrm->GetBindings(); SfxWhichIter aIter( rSet ); - for( USHORT nWhich = aIter.FirstWhich(); nWhich != 0; nWhich = aIter.NextWhich() ) + for( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich != 0; nWhich = aIter.NextWhich() ) { ScViewUtil::HideDisabledSlot( rSet, rBindings, nWhich ); // always disable the slots @@ -778,22 +778,22 @@ const ScDocOptions& ScModule::GetDocOptions() #define LRU_MAX 10 #endif -void ScModule::InsertEntryToLRUList(USHORT nFIndex) +void ScModule::InsertEntryToLRUList(sal_uInt16 nFIndex) { if(nFIndex != 0) { const ScAppOptions& rAppOpt = GetAppOptions(); - USHORT nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (USHORT)LRU_MAX ); - USHORT* pLRUListIds = rAppOpt.GetLRUFuncList(); + sal_uInt16 nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX ); + sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList(); - USHORT aIdxList[LRU_MAX]; - USHORT n = 0; - BOOL bFound = FALSE; + sal_uInt16 aIdxList[LRU_MAX]; + sal_uInt16 n = 0; + sal_Bool bFound = sal_False; while ((n < LRU_MAX) && nGetDocument() : NULL; const SfxPoolItem* pItem = NULL; - BOOL bRepaint = FALSE; - BOOL bUpdateMarks = FALSE; - BOOL bUpdateRefDev = FALSE; - BOOL bCalcAll = FALSE; - BOOL bSaveSpellCheck = FALSE; - BOOL bSaveAppOptions = FALSE; - BOOL bSaveInputOptions = FALSE; + sal_Bool bRepaint = sal_False; + sal_Bool bUpdateMarks = sal_False; + sal_Bool bUpdateRefDev = sal_False; + sal_Bool bCalcAll = sal_False; + sal_Bool bSaveSpellCheck = sal_False; + sal_Bool bSaveAppOptions = sal_False; + sal_Bool bSaveInputOptions = sal_False; //-------------------------------------------------------------------------- @@ -1002,19 +1002,19 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) { PutItem( *pItem ); pAppCfg->SetAppMetric( (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue() ); - bSaveAppOptions = TRUE; + bSaveAppOptions = sal_True; } if ( IS_AVAILABLE(SCITEM_USERLIST,pItem) ) { ScGlobal::SetUserList( ((const ScUserListItem*)pItem)->GetUserList() ); - bSaveAppOptions = TRUE; + bSaveAppOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_OPT_SYNCZOOM,pItem) ) { pAppCfg->SetSynchronizeZoom( static_cast(pItem)->GetValue() ); - bSaveAppOptions = TRUE; + bSaveAppOptions = sal_True; } //============================================ @@ -1030,7 +1030,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) ScViewData* pViewData = pViewSh->GetViewData(); const ScViewOptions& rOldOpt = pViewData->GetOptions(); - BOOL bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) != + sal_Bool bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) != rNewOpt.GetOption( VOPT_ANCHOR ) ); if ( rOldOpt != rNewOpt ) @@ -1038,7 +1038,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) pViewData->SetOptions( rNewOpt ); // veraendert rOldOpt pViewData->GetDocument()->SetViewOptions( rNewOpt ); pDocSh->SetDocumentModified(); - bRepaint = TRUE; + bRepaint = sal_True; } if ( bAnchorList ) pViewSh->UpdateAnchorHandles(); @@ -1069,7 +1069,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) pViewData->SetOptions( aNewViewOpt ); pViewData->GetDocument()->SetViewOptions( aNewViewOpt ); pDocSh->SetDocumentModified(); - bRepaint = TRUE; + bRepaint = sal_True; } } ScViewOptions aNewViewOpt ( GetViewOptions() ); @@ -1117,7 +1117,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) // nach den eigentlichen DocOptions auch noch die TabDistance setzen if ( IS_AVAILABLE(SID_ATTR_DEFTABSTOP,pItem) ) { - USHORT nTabDist = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nTabDist = ((SfxUInt16Item*)pItem)->GetValue(); ScDocOptions aOpt(GetDocOptions()); aOpt.SetTabDistance(nTabDist); SetDocOptions( aOpt ); @@ -1137,7 +1137,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( IS_AVAILABLE(SID_AUTOSPELL_CHECK,pItem) ) // an Doc-Options { - BOOL bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue(); if (pDoc) { @@ -1158,7 +1158,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) //#92038#; don't set document modified, because this flag is no longer saved // pDocSh->SetDocumentModified(); - bRepaint = TRUE; // weil HideAutoSpell evtl. ungueltig + bRepaint = sal_True; // weil HideAutoSpell evtl. ungueltig //! alle Views painten ??? } } @@ -1166,7 +1166,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( bOldAutoSpell != bDoAutoSpell ) { SetAutoSpellProperty( bDoAutoSpell ); - bSaveSpellCheck = TRUE; + bSaveSpellCheck = sal_True; } if ( pDocSh ) pDocSh->PostPaintGridAll(); // wegen Markierungen @@ -1187,53 +1187,53 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( IS_AVAILABLE(SID_SC_INPUT_SELECTIONPOS,pItem) ) { pInputCfg->SetMoveDir( ((const SfxUInt16Item*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_SELECTION,pItem) ) { pInputCfg->SetMoveSelection( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_EDITMODE,pItem) ) { pInputCfg->SetEnterEdit( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_FMT_EXPAND,pItem) ) { pInputCfg->SetExtendFormat( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_RANGEFINDER,pItem) ) { pInputCfg->SetRangeFinder( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_REF_EXPAND,pItem) ) { pInputCfg->SetExpandRefs( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_MARK_HEADER,pItem) ) { pInputCfg->SetMarkHeader( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; - bUpdateMarks = TRUE; + bSaveInputOptions = sal_True; + bUpdateMarks = sal_True; } if ( IS_AVAILABLE(SID_SC_INPUT_TEXTWYSIWYG,pItem) ) { - BOOL bNew = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bNew = ((const SfxBoolItem*)pItem)->GetValue(); if ( bNew != pInputCfg->GetTextWysiwyg() ) { pInputCfg->SetTextWysiwyg( bNew ); - bSaveInputOptions = TRUE; - bUpdateRefDev = TRUE; + bSaveInputOptions = sal_True; + bUpdateRefDev = sal_True; } } if( IS_AVAILABLE( SID_SC_INPUT_REPLCELLSWARN, pItem ) ) { pInputCfg->SetReplaceCellsWarn( ((const SfxBoolItem*)pItem)->GetValue() ); - bSaveInputOptions = TRUE; + bSaveInputOptions = sal_True; } //============================================ @@ -1270,9 +1270,9 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) WaitObject aWait( pDocSh->GetActiveDialogParent() ); pDoc->CalcAll(); if ( pViewSh ) - pViewSh->UpdateCharts( TRUE ); + pViewSh->UpdateCharts( sal_True ); else - ScDBFunc::DoUpdateCharts( ScAddress(), pDoc, TRUE ); + ScDBFunc::DoUpdateCharts( ScAddress(), pDoc, sal_True ); if (pBindings) pBindings->Invalidate( SID_ATTR_SIZE ); //SvxPosSize-StatusControl-Update } @@ -1330,7 +1330,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) // update view scale ScViewData* pViewData = pOneViewSh->GetViewData(); - pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), FALSE ); + pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), sal_False ); // repaint pOneViewSh->PaintGrid(); @@ -1350,7 +1350,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) // //------------------------------------------------------------------ -ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, BOOL bUseRef ) +ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, sal_Bool bUseRef ) { if ( pRefInputHandler && bUseRef ) return pRefInputHandler; @@ -1389,25 +1389,25 @@ void ScModule::SetInputMode( ScInputMode eMode ) pHdl->SetMode( eMode ); } -BOOL ScModule::IsEditMode() +sal_Bool ScModule::IsEditMode() { ScInputHandler* pHdl = GetInputHdl(); return pHdl && pHdl->IsEditMode(); } -BOOL ScModule::IsInputMode() +sal_Bool ScModule::IsInputMode() { ScInputHandler* pHdl = GetInputHdl(); return pHdl && pHdl->IsInputMode(); } -BOOL ScModule::InputKeyEvent( const KeyEvent& rKEvt, BOOL bStartEdit ) +sal_Bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, sal_Bool bStartEdit ) { ScInputHandler* pHdl = GetInputHdl(); - return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : FALSE ); + return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : sal_False ); } -void ScModule::InputEnterHandler( BYTE nBlockMode ) +void ScModule::InputEnterHandler( sal_uInt8 nBlockMode ) { if ( !SFX_APP()->IsDowning() ) // nicht beim Programmende { @@ -1488,7 +1488,7 @@ String ScModule::InputGetFormulaStr() return aStr; } -void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix ) +void ScModule::ActivateInputWindow( const String* pStrFormula, sal_Bool bMatrix ) { ScInputHandler* pHdl = GetInputHdl(); if ( pHdl ) @@ -1499,10 +1499,10 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix ) // Formel uebernehmen if ( pWin ) { - pWin->SetFuncString( *pStrFormula, FALSE ); - // SetSumAssignMode wegen FALSE nicht noetig + pWin->SetFuncString( *pStrFormula, sal_False ); + // SetSumAssignMode wegen sal_False nicht noetig } - BYTE nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL; + sal_uInt8 nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL; pHdl->EnterHandler( nMode ); // ohne Invalidate bleibt die Selektion stehen, wenn die Formel unveraendert ist @@ -1514,8 +1514,8 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix ) // Abbrechen if ( pWin ) { - pWin->SetFuncString( EMPTY_STRING, FALSE ); - // SetSumAssignMode wegen FALSE nicht noetig + pWin->SetFuncString( EMPTY_STRING, sal_False ); + // SetSumAssignMode wegen sal_False nicht noetig } pHdl->CancelHandler(); } @@ -1528,7 +1528,7 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix ) // //------------------------------------------------------------------ -void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) +void ScModule::SetRefDialog( sal_uInt16 nId, sal_Bool bVis, SfxViewFrame* pViewFrm ) { //! move reference dialog handling to view //! (only keep function autopilot here for references to other documents) @@ -1554,7 +1554,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) else { // no ScTabViewShell - possible for example from a Basic macro - bVis = FALSE; + bVis = sal_False; nCurRefDlgId = 0; // don't set nCurRefDlgId if no dialog is created } @@ -1566,7 +1566,7 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) } } -SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId ) +SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId ) { // first try the current view @@ -1592,12 +1592,12 @@ SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId ) return NULL; // none found } -BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh) +sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh) { //! move reference dialog handling to view //! (only keep function autopilot here for references to other documents) - BOOL bIsModal = FALSE; + sal_Bool bIsModal = sal_False; if ( nCurRefDlgId ) { @@ -1613,7 +1613,7 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh) // in 592 and above, the dialog isn't visible in other views // if the dialog is open but can't be accessed, disable input - bIsModal = TRUE; + bIsModal = sal_True; } // pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten @@ -1629,12 +1629,12 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh) return bIsModal; } -BOOL ScModule::IsTableLocked() +sal_Bool ScModule::IsTableLocked() { //! move reference dialog handling to view //! (only keep function autopilot here for references to other documents) - BOOL bLocked = FALSE; + sal_Bool bLocked = sal_False; // bisher nur bei ScAnyRefDlg @@ -1644,18 +1644,18 @@ BOOL ScModule::IsTableLocked() if ( pChildWnd ) bLocked = dynamic_cast(pChildWnd->GetWindow())->IsTableLocked(); else - bLocked = TRUE; // for other views, see IsModalMode + bLocked = sal_True; // for other views, see IsModalMode } return bLocked; } -BOOL ScModule::IsRefDialogOpen() +sal_Bool ScModule::IsRefDialogOpen() { //! move reference dialog handling to view //! (only keep function autopilot here for references to other documents) - BOOL bIsOpen = FALSE; + sal_Bool bIsOpen = sal_False; if ( nCurRefDlgId ) { @@ -1663,18 +1663,18 @@ BOOL ScModule::IsRefDialogOpen() if ( pChildWnd ) bIsOpen = pChildWnd->IsVisible(); else - bIsOpen = TRUE; // for other views, see IsModalMode + bIsOpen = sal_True; // for other views, see IsModalMode } return bIsOpen; } -BOOL ScModule::IsFormulaMode() +sal_Bool ScModule::IsFormulaMode() { //! move reference dialog handling to view //! (only keep function autopilot here for references to other documents) - BOOL bIsFormula = FALSE; + sal_Bool bIsFormula = sal_False; if ( nCurRefDlgId ) { @@ -1693,7 +1693,7 @@ BOOL ScModule::IsFormulaMode() } if (bIsInEditCommand) - bIsFormula = TRUE; + bIsFormula = sal_True; return bIsFormula; } @@ -1702,14 +1702,14 @@ void lcl_MarkedTabs( const ScMarkData& rMark, SCTAB& rStartTab, SCTAB& rEndTab ) { if (rMark.GetSelectCount() > 1) { - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; for (SCTAB i=0; i<=MAXTAB; i++) if (rMark.GetTableSelect(i)) { if (bFirst) rStartTab = i; rEndTab = i; - bFirst = FALSE; + bFirst = sal_False; } } } @@ -1744,8 +1744,8 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, IAnyRefDialog* pRefDlg = dynamic_cast(pChildWnd->GetWindow()); // hide the (color) selection now instead of later from LoseFocus, - // don't abort the ref input that causes this call (bDoneRefMode = FALSE) - pRefDlg->HideReference( FALSE ); + // don't abort the ref input that causes this call (bDoneRefMode = sal_False) + pRefDlg->HideReference( sal_False ); pRefDlg->SetReference( aNew, pDoc ); } } @@ -1813,7 +1813,7 @@ void ScModule::EndReference() void ScModule::AnythingChanged() { - ULONG nOldTime = aIdleTimer.GetTimeout(); + sal_uLong nOldTime = aIdleTimer.GetTimeout(); if ( nOldTime != SC_IDLE_MIN ) aIdleTimer.SetTimeout( SC_IDLE_MIN ); @@ -1841,15 +1841,15 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG ) return 0; } - BOOL bMore = FALSE; + sal_Bool bMore = sal_False; ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() ); if ( pDocSh ) { ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bLinks = pDoc->IdleCheckLinks(); - BOOL bWidth = pDoc->IdleCalcTextWidth(); - BOOL bSpell = pDoc->ContinueOnlineSpelling(); + sal_Bool bLinks = pDoc->IdleCheckLinks(); + sal_Bool bWidth = pDoc->IdleCalcTextWidth(); + sal_Bool bSpell = pDoc->ContinueOnlineSpelling(); if ( bSpell ) aSpellTimer.Start(); // da ist noch was @@ -1861,8 +1861,8 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG ) lcl_CheckNeedsRepaint( pDocSh ); } - ULONG nOldTime = aIdleTimer.GetTimeout(); - ULONG nNewTime = nOldTime; + sal_uLong nOldTime = aIdleTimer.GetTimeout(); + sal_uLong nNewTime = nOldTime; if ( bMore ) { nNewTime = SC_IDLE_MIN; @@ -1907,7 +1907,7 @@ IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG ) } //virtuelle Methoden fuer den Optionendialog -SfxItemSet* ScModule::CreateItemSet( USHORT nId ) +SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) { SfxItemSet* pRet = 0; if(SID_SC_EDITOPTIONS == nId) @@ -1951,7 +1951,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId ) // SFX_APP()->GetOptions( aSet ); pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, - sal::static_int_cast(GetAppOptions().GetAppMetric()) ) ); + sal::static_int_cast(GetAppOptions().GetAppMetric()) ) ); // TP_CALC pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, @@ -2000,7 +2000,7 @@ SfxItemSet* ScModule::CreateItemSet( USHORT nId ) return pRet; } -void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) +void ScModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ) { if(SID_SC_EDITOPTIONS == nId) { @@ -2008,7 +2008,7 @@ void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } } -SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ) +SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet ) { SfxTabPage* pRet = NULL; ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -2128,59 +2128,59 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo ) return 0; } -BOOL ScModule::RegisterRefWindow( USHORT nSlotId, Window *pWnd ) +sal_Bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) { std::list & rlRefWindow = m_mapRefWindow[nSlotId]; if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() ) { rlRefWindow.push_back( pWnd ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScModule::UnregisterRefWindow( USHORT nSlotId, Window *pWnd ) +sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) { - std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return FALSE; + return sal_False; std::list & rlRefWindow = iSlot->second; std::list::iterator i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ); if( i == rlRefWindow.end() ) - return FALSE; + return sal_False; rlRefWindow.erase( i ); if( !rlRefWindow.size() ) m_mapRefWindow.erase( nSlotId ); - return TRUE; + return sal_True; } -BOOL ScModule::IsAliveRefDlg( USHORT nSlotId, Window *pWnd ) +sal_Bool ScModule::IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd ) { - std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return FALSE; + return sal_False; std::list & rlRefWindow = iSlot->second; return rlRefWindow.end() != std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ); } -Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor ) +Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, Window *pWndAncestor ) { if (!pWndAncestor) return NULL; - std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) return NULL; @@ -2203,7 +2203,7 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor ) while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent; - for( std::map >::iterator i = m_mapRefWindow.begin(); + for( std::map >::iterator i = m_mapRefWindow.begin(); i!=m_mapRefWindow.end(); i++ ) for( std::list::iterator j = i->second.begin(); j!=i->second.end(); j++ ) if ( pWndAncestor->IsWindowOrChild( *j, (*j)->IsSystemWindow() ) ) diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx index c92f0bf5d206..9ac668b9d4a3 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -50,8 +50,8 @@ using namespace com::sun::star; //------------------------------------------------------------------ // static -void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang, - BOOL& rAutoSpell ) +void ScModule::GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang, + sal_Bool& rAutoSpell ) { // use SvtLinguConfig instead of service LinguProperties to avoid // loading the linguistic component @@ -67,7 +67,7 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt } // static -void ScModule::SetAutoSpellProperty( BOOL bSet ) +void ScModule::SetAutoSpellProperty( sal_Bool bSet ) { // use SvtLinguConfig instead of service LinguProperties to avoid // loading the linguistic component @@ -81,15 +81,15 @@ void ScModule::SetAutoSpellProperty( BOOL bSet ) // static -BOOL ScModule::HasThesaurusLanguage( USHORT nLang ) +sal_Bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang ) { if ( nLang == LANGUAGE_NONE ) - return FALSE; + return sal_False; lang::Locale aLocale; SvxLanguageToLocale( aLocale, nLang ); - BOOL bHasLang = FALSE; + sal_Bool bHasLang = sal_False; try { uno::Reference< linguistic2::XThesaurus > xThes(LinguMgr::GetThesaurus()); diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 0b213709863d..f6872ef38f09 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -55,9 +55,9 @@ using namespace com::sun::star; // ----------------------------------------------------------------------- -BOOL lcl_IsURLButton( SdrObject* pObject ) +sal_Bool lcl_IsURLButton( SdrObject* pObject ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObject); if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) @@ -75,7 +75,7 @@ BOOL lcl_IsURLButton( SdrObject* pObject ) uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType ); form::FormButtonType eTmp; if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL ) - bRet = TRUE; + bRet = sal_True; } } } @@ -98,13 +98,13 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView { // handle selection on drawing layer const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if ( nMarkCount ) { if ( nMarkCount == 1 ) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); if ( nSdrObjKind == OBJ_GRAF ) { @@ -176,11 +176,11 @@ ScSelectionTransferObj::~ScSelectionTransferObj() DBG_ASSERT( !pView, "ScSelectionTransferObj dtor: ForgetView not called" ); } -BOOL ScSelectionTransferObj::StillValid() +sal_Bool ScSelectionTransferObj::StillValid() { //! check if view still has same cell selection - //! (but return FALSE if data has changed inbetween) - return FALSE; + //! (but return sal_False if data has changed inbetween) + return sal_False; } void ScSelectionTransferObj::ForgetView() @@ -296,10 +296,10 @@ void ScSelectionTransferObj::CreateCellData() ScDrawLayer::SetGlobalDrawPersist(aDragShellRef); ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); - // bApi = TRUE -> no error mesages - // #i18364# bStopEdit = FALSE -> don't end edit mode + // bApi = sal_True -> no error mesages + // #i18364# bStopEdit = sal_False -> don't end edit mode // (this may be called from pasting into the edit line) - BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE, TRUE, FALSE ); + sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, sal_False, sal_True, sal_True, sal_False ); ScDrawLayer::SetGlobalDrawPersist(NULL); @@ -332,7 +332,7 @@ void ScSelectionTransferObj::CreateCellData() } //! make static member of ScDrawView -extern void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle ); +extern void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle ); void ScSelectionTransferObj::CreateDrawData() { @@ -344,7 +344,7 @@ void ScSelectionTransferObj::CreateDrawData() ScDrawView* pDrawView = pView->GetScDrawView(); if ( pDrawView ) { - BOOL bAnyOle, bOneOle; + sal_Bool bAnyOle, bOneOle; const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList(); lcl_CheckOle( rMarkList, bAnyOle, bOneOle ); diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx index 80dc667c5de6..806ea0bc61dd 100644 --- a/sc/source/ui/app/template.cxx +++ b/sc/source/ui/app/template.cxx @@ -34,7 +34,7 @@ //------------------------------------------------------------------------ -ScTemplateDlg::ScTemplateDlg(Window * pParent, USHORT nAppResource) : +ScTemplateDlg::ScTemplateDlg(Window * pParent, sal_uInt16 nAppResource) : // SfxTemplateDlg( pParent, nAppResource ) SfxTemplateDialog( pParent ) { @@ -48,9 +48,9 @@ __EXPORT ScTemplateDlg::~ScTemplateDlg() //------------------------------------------------------------------------ -BOOL ScTemplateDlg::New(String &rNewName) +sal_Bool ScTemplateDlg::New(String &rNewName) { - return TRUE; + return sal_True; } @@ -59,9 +59,9 @@ void ScTemplateDlg::Edit(const String &) } -BOOL ScTemplateDlg::Delete(const String &) +sal_Bool ScTemplateDlg::Delete(const String &) { - return TRUE; + return sal_True; } diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index e6b8b3b5049a..1f9d0d4986bc 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -107,7 +107,7 @@ void ScTransferObj::GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCR // static void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor, - const ScRange& rBlock, BOOL bMetaFile ) + const ScRange& rBlock, sal_Bool bMetaFile ) { if (!pDoc) return; @@ -133,8 +133,8 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc nDragHandleX( 0 ), nDragHandleY( 0 ), nDragSourceFlags( 0 ), - bDragWasInternal( FALSE ), - bUsedForLink( FALSE ), + bDragWasInternal( sal_False ), + bUsedForLink( sal_False ), bUseInApi( false ) { DBG_ASSERT(pDoc->IsClipboard(), "wrong document"); @@ -148,25 +148,25 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc SCCOL nCol2; SCROW nRow2; pDoc->GetClipStart( nCol1, nRow1 ); - pDoc->GetClipArea( nCol2, nRow2, TRUE ); // real source area - include filtered rows + pDoc->GetClipArea( nCol2, nRow2, sal_True ); // real source area - include filtered rows nCol2 = sal::static_int_cast( nCol2 + nCol1 ); nRow2 = sal::static_int_cast( nRow2 + nRow1 ); SCCOL nDummy; - pDoc->GetClipArea( nDummy, nNonFiltered, FALSE ); + pDoc->GetClipArea( nDummy, nNonFiltered, sal_False ); bHasFiltered = (nNonFiltered < (nRow2 - nRow1)); ++nNonFiltered; // to get count instead of diff SCTAB nTab1=0; SCTAB nTab2=0; - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; for (SCTAB i=0; i<=MAXTAB; i++) if (pDoc->HasTable(i)) { if (bFirst) nTab1 = i; nTab2 = i; - bFirst = FALSE; + bFirst = sal_False; } DBG_ASSERT(!bFirst, "no sheet selected"); @@ -306,9 +306,9 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) // if this transfer object was used to create a DDE link, filtered rows // have to be included for subsequent calls (to be consistent with link data) if ( nFormat == SOT_FORMATSTR_ID_LINK ) - bUsedForLink = TRUE; + bUsedForLink = sal_True; - BOOL bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink; + sal_Bool bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink; ScImportExport aObj( pDoc, aBlock ); if ( bUsedForLink ) @@ -342,7 +342,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) VirtualDevice aVirtDev; aVirtDev.SetOutputSizePixel( aVirtDev.LogicToPixel( aMMRect.GetSize(), MAP_100TH_MM ) ); - PaintToDev( &aVirtDev, pDoc, 1.0, aBlock, FALSE ); + PaintToDev( &aVirtDev, pDoc, 1.0, aBlock, sal_False ); aVirtDev.SetMapMode( MapMode( MAP_PIXEL ) ); Bitmap aBmp = aVirtDev.GetBitmap( Point(), aVirtDev.GetOutputSize() ); @@ -360,7 +360,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) MapMode aMapMode( pEmbObj->GetMapUnit() ); Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); - aVDev.EnableOutput( FALSE ); + aVDev.EnableOutput( sal_False ); aVDev.SetMapMode( aMapMode ); aMtf.SetPrefSize( aVisArea.GetSize() ); aMtf.SetPrefMapMode( aMapMode ); @@ -419,7 +419,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj // write old format without support for unicode characters. // Get the data from the EditEngine's transferable instead. - USHORT nParCnt = pEngine->GetParagraphCount(); + sal_uInt16 nParCnt = pEngine->GetParagraphCount(); if ( nParCnt == 0 ) nParCnt = 1; ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); @@ -446,7 +446,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj // mba: no relative ULRs for clipboard! SfxMedium aMedium( xWorkStore, String() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE ); + bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); @@ -461,7 +461,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj delete pSrcStm; } - bRet = TRUE; + bRet = sal_True; xWorkStore->dispose(); xWorkStore = uno::Reference < embed::XStorage >(); @@ -494,8 +494,8 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction ) { ScMarkData aMarkData = GetSourceMarkData(); // external drag&drop doesn't copy objects, so they also aren't deleted: - // #105703# bApi=TRUE, don't show error messages from drag&drop - pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, TRUE, TRUE ); + // #105703# bApi=sal_True, don't show error messages from drag&drop + pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, sal_True, sal_True ); } } @@ -527,18 +527,18 @@ void ScTransferObj::SetDrawPersist( const SfxObjectShellRef& rRef ) void ScTransferObj::SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark ) { ScRangeList aRanges; - rMark.FillRangeListWithMarks( &aRanges, FALSE ); + rMark.FillRangeListWithMarks( &aRanges, sal_False ); xDragSourceRanges = new ScCellRangesObj( pSourceShell, aRanges ); } -void ScTransferObj::SetDragSourceFlags( USHORT nFlags ) +void ScTransferObj::SetDragSourceFlags( sal_uInt16 nFlags ) { nDragSourceFlags = nFlags; } void ScTransferObj::SetDragWasInternal() { - bDragWasInternal = TRUE; + bDragWasInternal = sal_True; } void ScTransferObj::SetUseInApi( bool bSet ) @@ -570,7 +570,7 @@ ScMarkData ScTransferObj::GetSourceMarkData() if (pRangesObj) { const ScRangeList& rRanges = pRangesObj->GetRangeList(); - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); } return aMarkData; } @@ -590,13 +590,13 @@ void ScTransferObj::InitDocShell() ScDocument* pDestDoc = pDocSh->GetDocument(); ScMarkData aDestMark; - aDestMark.SelectTable( 0, TRUE ); + aDestMark.SelectTable( 0, sal_True ); pDestDoc->SetDocOptions( pDoc->GetDocOptions() ); // #i42666# String aTabName; pDoc->GetName( aBlock.aStart.Tab(), aTabName ); - pDestDoc->RenameTab( 0, aTabName, FALSE ); // no UpdateRef (empty) + pDestDoc->RenameTab( 0, aTabName, sal_False ); // no UpdateRef (empty) pDestDoc->CopyStdStylesFrom( pDoc ); @@ -613,19 +613,19 @@ void ScTransferObj::InitDocShell() pDestDoc->SetLayoutRTL(0, pDoc->IsLayoutRTL(nSrcTab)); for (nCol=nStartX; nCol<=nEndX; nCol++) if ( pDoc->ColHidden(nCol, nSrcTab, nLastCol) ) - pDestDoc->ShowCol( nCol, 0, FALSE ); + pDestDoc->ShowCol( nCol, 0, sal_False ); else pDestDoc->SetColWidth( nCol, 0, pDoc->GetColWidth( nCol, nSrcTab ) ); - ScBitMaskCompressedArray< SCROW, BYTE> & rDestRowFlags = + ScBitMaskCompressedArray< SCROW, sal_uInt8> & rDestRowFlags = pDestDoc->GetRowFlagsArrayModifiable(0); for (SCROW nRow = nStartY; nRow <= nEndY; ++nRow) { - BYTE nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab); + sal_uInt8 nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab); SCROW nLastRow = -1; if ( pDoc->RowHidden(nRow, nSrcTab, nLastRow) ) - pDestDoc->ShowRow( nRow, 0, FALSE ); + pDestDoc->ShowRow( nRow, 0, sal_False ); else { pDestDoc->SetRowHeight( nRow, 0, pDoc->GetOriginalHeight( nRow, nSrcTab ) ); @@ -644,16 +644,16 @@ void ScTransferObj::InitDocShell() // pDoc is always a Clipboard-document ScRange aDestRange( nStartX,nStartY,0, nEndX,nEndY,0 ); - BOOL bWasCut = pDoc->IsCutMode(); + sal_Bool bWasCut = pDoc->IsCutMode(); if (!bWasCut) - pDoc->SetClipArea( aDestRange, TRUE ); // Cut - pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, FALSE ); + pDoc->SetClipArea( aDestRange, sal_True ); // Cut + pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, sal_False ); pDoc->SetClipArea( aDestRange, bWasCut ); StripRefs( pDoc, nStartX,nStartY, nEndX,nEndY, pDestDoc, 0,0 ); ScRange aMergeRange = aDestRange; - pDestDoc->ExtendMerge( aMergeRange, TRUE ); + pDestDoc->ExtendMerge( aMergeRange, sal_True ); pDoc->CopyDdeLinks( pDestDoc ); // copy values of DDE Links @@ -722,7 +722,7 @@ void ScTransferObj::InitDocShell() //pDocSh->SvInPlaceObject::SetVisArea( aNewArea ); pDocSh->SetVisArea( aNewArea ); - pDocSh->UpdateOle(&aViewData, TRUE); + pDocSh->UpdateOle(&aViewData, sal_True); //! SetDocumentModified? if ( pDestDoc->IsChartListenerCollectionNeedsUpdate() ) @@ -731,7 +731,7 @@ void ScTransferObj::InitDocShell() } // static -SfxObjectShell* ScTransferObj::SetDrawClipDoc( BOOL bAnyOle ) +SfxObjectShell* ScTransferObj::SetDrawClipDoc( sal_Bool bAnyOle ) { // update ScGlobal::pDrawClipDocShellRef @@ -786,14 +786,14 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, if (pCell->GetCellType() == CELLTYPE_FORMULA) { ScFormulaCell* pFCell = (ScFormulaCell*) pCell; - BOOL bOut = FALSE; + sal_Bool bOut = sal_False; ScDetectiveRefIter aRefIter( pFCell ); while ( !bOut && aRefIter.GetNextRef( aRef ) ) { if ( aRef.aStart.Tab() != nSrcTab || aRef.aEnd.Tab() != nSrcTab || aRef.aStart.Col() < nStartX || aRef.aEnd.Col() > nEndX || aRef.aStart.Row() < nStartY || aRef.aEnd.Row() > nEndY ) - bOut = TRUE; + bOut = sal_True; } if (bOut) { @@ -801,7 +801,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, SCROW nRow = aIter.GetRow() - nSubY; ScBaseCell* pNew = 0; - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); if (nErrCode) { pNew = new ScStringCell( ScGlobal::GetErrorString(nErrCode) ); @@ -829,11 +829,11 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, // number formats - ULONG nOldFormat = ((const SfxUInt32Item*) + sal_uLong nOldFormat = ((const SfxUInt32Item*) pDestDoc->GetAttr(nCol,nRow,nDestTab, ATTR_VALUE_FORMAT))->GetValue(); if ( (nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 ) { - ULONG nNewFormat = pFCell->GetStandardFormat( *pFormatter, + sal_uLong nNewFormat = pFCell->GetStandardFormat( *pFormatter, nOldFormat ); pDestDoc->ApplyAttr( nCol,nRow,nDestTab, SfxUInt32Item(ATTR_VALUE_FORMAT, nNewFormat) ); diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index a63491f0929b..75a21a5a7700 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -57,7 +57,7 @@ TYPEINIT1(ScIndexHint, SfxHint); // ScInputStatusItem - Status-Update fuer Eingabezeile // ----------------------------------------------------------------------- -//UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, +//UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, //UNUSED2008-05 SCTAB nTab, //UNUSED2008-05 SCCOL nCol, SCROW nRow, //UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow, @@ -73,7 +73,7 @@ TYPEINIT1(ScIndexHint, SfxHint); //UNUSED2008-05 { //UNUSED2008-05 } -ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, +ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, @@ -132,7 +132,7 @@ SfxPoolItem* __EXPORT ScInputStatusItem::Clone( SfxItemPool * ) const // ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht // ----------------------------------------------------------------------- -ScTablesHint::ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2) : +ScTablesHint::ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2) : nId( nNewId ), nTab1( nTable1 ), nTab2( nTable2 ) @@ -148,7 +148,7 @@ ScTablesHint::~ScTablesHint() // ScIndexHint // ----------------------------------------------------------------------- -ScIndexHint::ScIndexHint(USHORT nNewId, USHORT nIdx) : +ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) : nId( nNewId ), nIndex( nIdx ) { @@ -177,7 +177,7 @@ ScEditViewHint::~ScEditViewHint() // ScSortItem - Daten fuer den Sortierdialog // ----------------------------------------------------------------------- -ScSortItem::ScSortItem( USHORT nWhichP, +ScSortItem::ScSortItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), @@ -188,7 +188,7 @@ ScSortItem::ScSortItem( USHORT nWhichP, //------------------------------------------------------------------------ -ScSortItem::ScSortItem( USHORT nWhichP, +ScSortItem::ScSortItem( sal_uInt16 nWhichP, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) @@ -237,7 +237,7 @@ SfxPoolItem* __EXPORT ScSortItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const +sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const { // Return empty value as there is no useful conversion rVal = com::sun::star::uno::Any(); @@ -248,23 +248,23 @@ sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMember // ScQueryItem - Daten fuer den Filterdialog // ----------------------------------------------------------------------- -ScQueryItem::ScQueryItem( USHORT nWhichP, +ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( ptrViewData ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( sal_False ) { if ( pQueryData ) theQueryData = *pQueryData; } //------------------------------------------------------------------------ -ScQueryItem::ScQueryItem( USHORT nWhichP, +ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( sal_False ) { if ( pQueryData ) theQueryData = *pQueryData; } @@ -291,13 +291,13 @@ void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource) if (pSource) { aAdvSource = *pSource; - bIsAdvanced = TRUE; + bIsAdvanced = sal_True; } else - bIsAdvanced = FALSE; + bIsAdvanced = sal_False; } -BOOL ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const +sal_Bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const { rSource = aAdvSource; return bIsAdvanced; @@ -335,7 +335,7 @@ SfxPoolItem* __EXPORT ScQueryItem::Clone( SfxItemPool * ) const // ScSubTotalItem - Daten fuer den Zwischenergebnisdialog // ----------------------------------------------------------------------- -ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, +ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), @@ -346,7 +346,7 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, //------------------------------------------------------------------------ -ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, +ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) @@ -395,7 +395,7 @@ SfxPoolItem* __EXPORT ScSubTotalItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const +sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const { // Return empty value as there is no useful conversion rVal = com::sun::star::uno::Any(); @@ -406,7 +406,7 @@ sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMe // ScUserListItem - Transporter fuer den Benutzerlisten-TabPage // ----------------------------------------------------------------------- -ScUserListItem::ScUserListItem( USHORT nWhichP ) +ScUserListItem::ScUserListItem( sal_uInt16 nWhichP ) : SfxPoolItem ( nWhichP ), pUserList ( NULL ) { @@ -442,7 +442,7 @@ int __EXPORT ScUserListItem::operator==( const SfxPoolItem& rItem ) const DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScUserListItem& r = (const ScUserListItem&)rItem; - BOOL bEqual = FALSE; + sal_Bool bEqual = sal_False; if ( !pUserList || !(r.pUserList) ) bEqual = ( !pUserList && !(r.pUserList) ); @@ -473,7 +473,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList ) // ----------------------------------------------------------------------- ScConsolidateItem::ScConsolidateItem( - USHORT nWhichP, + sal_uInt16 nWhichP, const ScConsolidateParam* pConsolidateData ) : SfxPoolItem ( nWhichP ) { @@ -524,8 +524,8 @@ SfxPoolItem* __EXPORT ScConsolidateItem::Clone( SfxItemPool * ) const // ScPivotItem - Daten fuer den Pivot-Dialog // ----------------------------------------------------------------------- -ScPivotItem::ScPivotItem( USHORT nWhichP, const ScDPSaveData* pData, - const ScRange* pRange, BOOL bNew ) : +ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData, + const ScRange* pRange, sal_Bool bNew ) : SfxPoolItem ( nWhichP ) { // pSaveData must always exist @@ -587,7 +587,7 @@ SfxPoolItem* __EXPORT ScPivotItem::Clone( SfxItemPool * ) const // ScSolveItem - Daten fuer den Solver-Dialog // ----------------------------------------------------------------------- -ScSolveItem::ScSolveItem( USHORT nWhichP, +ScSolveItem::ScSolveItem( sal_uInt16 nWhichP, const ScSolveParam* pSolveData ) : SfxPoolItem ( nWhichP ) { @@ -637,7 +637,7 @@ SfxPoolItem* __EXPORT ScSolveItem::Clone( SfxItemPool * ) const // ScTabOpItem - Daten fuer den TabOp-Dialog // ----------------------------------------------------------------------- -ScTabOpItem::ScTabOpItem( USHORT nWhichP, +ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP, const ScTabOpParam* pTabOpData ) : SfxPoolItem ( nWhichP ) { @@ -688,7 +688,7 @@ SfxPoolItem* __EXPORT ScTabOpItem::Clone( SfxItemPool * ) const // ScCondFrmtItem - Daten fuer den Dialog bedingte Formatierung // ----------------------------------------------------------------------- -ScCondFrmtItem::ScCondFrmtItem( USHORT nWhichP, +ScCondFrmtItem::ScCondFrmtItem( sal_uInt16 nWhichP, //! const ScConditionalFormat* pCondFrmt ) const ScConditionalFormat& rCondFrmt ) : SfxPoolItem ( nWhichP ), diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index ca62ebb887a5..ed23044bf85c 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -78,7 +78,7 @@ ScAttrDlg::ScAttrDlg( SfxViewFrame* pFrameP, AddTabPage( TP_NUMBER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), 0 ); //CHINA001 AddTabPage( TP_NUMBER, SvxNumberFormatTabPage::Create, 0 ); #else String number = rtl::OUString::createFromAscii ("Numbers"); - AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, FALSE, TAB_APPEND); + AddTabPage( TP_NUMBER, number, pFact->GetTabPageCreatorFunc (RID_SVXPAGE_NUMBERFORMAT), 0, sal_False, TAB_APPEND); #endif DBG_ASSERT(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");//CHINA001 AddTabPage( TP_FONT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 ); //CHINA001 AddTabPage( TP_FONT, SvxCharNamePage::Create, 0 ); @@ -112,7 +112,7 @@ __EXPORT ScAttrDlg::~ScAttrDlg() // ----------------------------------------------------------------------- -void __EXPORT ScAttrDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) +void __EXPORT ScAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); //CHINA001 diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx index 5e3b23af8afa..8a7c4b05454d 100644 --- a/sc/source/ui/attrdlg/condfrmt.cxx +++ b/sc/source/ui/attrdlg/condfrmt.cxx @@ -102,7 +102,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), pEdActive ( NULL ), - bDlgLostFocus ( FALSE ), + bDlgLostFocus ( sal_False ), pDoc ( pCurDoc ) { @@ -187,7 +187,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aCond2Size2 = Size( aPos.X() - aCond2Pos2.X(), aCond2Size3.Height() ); aCond2Size1 = Size( aPos.X() - aCond2Pos1.X(), aCond2Size3.Height() ); - aCbxCond2.Check( FALSE ); + aCbxCond2.Check( sal_False ); aLbCond21.SelectEntryPos( 0 ); aLbCond22.SelectEntryPos( 0 ); @@ -202,7 +202,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( aCond3Size2 = Size( aPos.X() - aCond3Pos2.X(), aCond3Size3.Height() ); aCond3Size1 = Size( aPos.X() - aCond3Pos1.X(), aCond3Size3.Height() ); - aCbxCond3.Check( FALSE ); + aCbxCond3.Check( sal_False ); aLbCond31.SelectEntryPos( 0 ); aLbCond32.SelectEntryPos( 0 ); @@ -255,7 +255,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( ; else // via Werte { - aLbCond12.SelectEntryPos( sal::static_int_cast( eMode ) ); + aLbCond12.SelectEntryPos( sal::static_int_cast( eMode ) ); if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) ) aEdtCond12.SetText( pEntry->GetExpression( aCurPos, 1 ) ); } @@ -264,7 +264,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( if ( pCurrentFormat->Count() > 1 ) { - aCbxCond2.Check( TRUE ); + aCbxCond2.Check( sal_True ); pEntry= pCurrentFormat->GetEntry( 1 ); aEdtCond21.SetText( pEntry->GetExpression( aCurPos, 0 ) ); aLbCond2Template.SelectEntry( pEntry->GetStyle() ); @@ -279,7 +279,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( ; else // via Werte { - aLbCond22.SelectEntryPos( sal::static_int_cast( eMode ) ); + aLbCond22.SelectEntryPos( sal::static_int_cast( eMode ) ); if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) ) aEdtCond22.SetText( pEntry->GetExpression( aCurPos, 1 ) ); } @@ -287,7 +287,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( if ( pCurrentFormat->Count() > 2 ) { - aCbxCond3.Check( TRUE ); + aCbxCond3.Check( sal_True ); pEntry= pCurrentFormat->GetEntry( 2 ); aEdtCond31.SetText( pEntry->GetExpression( aCurPos, 0 ) ); aLbCond3Template.SelectEntry( pEntry->GetStyle() ); @@ -302,7 +302,7 @@ ScConditionalFormatDlg::ScConditionalFormatDlg( ; else // via Werte { - aLbCond32.SelectEntryPos( sal::static_int_cast( eMode ) ); + aLbCond32.SelectEntryPos( sal::static_int_cast( eMode ) ); if ( ( eMode == SC_COND_BETWEEN ) || ( eMode == SC_COND_NOTBETWEEN ) ) aEdtCond32.SetText( pEntry->GetExpression( aCurPos, 1 ) ); } @@ -374,7 +374,7 @@ void ScConditionalFormatDlg::AddRefEntry() //---------------------------------------------------------------------------- -BOOL ScConditionalFormatDlg::IsRefInputMode() const +sal_Bool ScConditionalFormatDlg::IsRefInputMode() const { return (pEdActive != NULL); } @@ -386,7 +386,7 @@ void ScConditionalFormatDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if( pEdActive ) pEdActive->GrabFocus(); } @@ -459,7 +459,7 @@ void ScConditionalFormatDlg::GetConditionalFormat( ScConditionalFormat& rCndFmt //---------------------------------------------------------------------------- // Zerstoert den Dialog -BOOL ScConditionalFormatDlg::Close() +sal_Bool ScConditionalFormatDlg::Close() { return DoClose( ScCondFormatDlgWrapper::GetChildWindowId() ); } @@ -473,7 +473,7 @@ BOOL ScConditionalFormatDlg::Close() IMPL_LINK( ScConditionalFormatDlg, ClickCond1Hdl, void *, EMPTYARG ) { - BOOL bChecked = aCbxCond1.IsChecked(); + sal_Bool bChecked = aCbxCond1.IsChecked(); aLbCond11.Enable( bChecked ); aLbCond12.Enable( bChecked ); @@ -495,7 +495,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond1Hdl, void *, EMPTYARG ) IMPL_LINK( ScConditionalFormatDlg, ChangeCond11Hdl, void *, EMPTYARG ) { - USHORT nPos = aLbCond11.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond11.GetSelectEntryPos(); if( nPos == 0 ) // Zellwert { @@ -525,7 +525,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG ) { if( aLbCond12.IsVisible() ) { - USHORT nPos = aLbCond12.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond12.GetSelectEntryPos(); if( nPos == 6 || nPos == 7 ) // zwischen, n. zwischen { @@ -554,7 +554,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond12Hdl, void *, EMPTYARG ) IMPL_LINK( ScConditionalFormatDlg, ClickCond2Hdl, void *, EMPTYARG ) { - BOOL bChecked = aCbxCond2.IsChecked(); + sal_Bool bChecked = aCbxCond2.IsChecked(); aLbCond21.Enable( bChecked ); aLbCond22.Enable( bChecked ); @@ -576,7 +576,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond2Hdl, void *, EMPTYARG ) IMPL_LINK( ScConditionalFormatDlg, ChangeCond21Hdl, void *, EMPTYARG ) { - USHORT nPos = aLbCond21.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond21.GetSelectEntryPos(); if( nPos == 0 ) // Zellwert { @@ -606,7 +606,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG ) { if( aLbCond22.IsVisible() ) { - USHORT nPos = aLbCond22.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond22.GetSelectEntryPos(); if( nPos == 6 || nPos == 7 ) // zwischen, n. zwischen { @@ -635,7 +635,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond22Hdl, void *, EMPTYARG ) IMPL_LINK( ScConditionalFormatDlg, ClickCond3Hdl, void *, EMPTYARG ) { - BOOL bChecked = aCbxCond3.IsChecked(); + sal_Bool bChecked = aCbxCond3.IsChecked(); aLbCond31.Enable( bChecked ); aLbCond32.Enable( bChecked ); @@ -657,7 +657,7 @@ IMPL_LINK( ScConditionalFormatDlg, ClickCond3Hdl, void *, EMPTYARG ) IMPL_LINK( ScConditionalFormatDlg, ChangeCond31Hdl, void *, EMPTYARG ) { - USHORT nPos = aLbCond31.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond31.GetSelectEntryPos(); if( nPos == 0 ) // Zellwert { @@ -687,7 +687,7 @@ IMPL_LINK( ScConditionalFormatDlg, ChangeCond32Hdl, void *, EMPTYARG ) { if( aLbCond32.IsVisible() ) { - USHORT nPos = aLbCond32.GetSelectEntryPos(); + sal_uInt16 nPos = aLbCond32.GetSelectEntryPos(); if( nPos == 6 || nPos == 7 ) // zwischen, n. zwischen { @@ -757,7 +757,7 @@ IMPL_LINK( ScConditionalFormatDlg, BtnHdl, PushButton*, pBtn ) GetConditionalFormat( aCondFrmt ); ScCondFrmtItem aOutItem( FID_CONDITIONAL_FORMAT, aCondFrmt ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_CONDITIONAL_FORMAT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -781,7 +781,7 @@ IMPL_LINK( ScConditionalFormatDlg, NewBtnHdl, PushButton*, pBtn ) // unlock the dispatcher so SID_STYLE_NEW can be executed // (SetDispatcherLock would affect all Calc documents) SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - BOOL bLocked = pDisp->IsLocked(); + sal_Bool bLocked = pDisp->IsLocked(); if (bLocked) pDisp->Lock(sal_False); diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 812b43645fc4..45f1ff7d549a 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -119,7 +119,7 @@ IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl); IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg // AbstractTabDialog_Impl begin -void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -129,7 +129,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } //add by CHINA001 -const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -154,7 +154,7 @@ namespace layout IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg // AbstractTabDialog_Impl begin -void AbstractTabDialog_Impl::SetCurPageId( USHORT nId ) +void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } @@ -164,7 +164,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const return pDlg->GetOutputItemSet(); } //add by CHINA001 -const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } @@ -205,7 +205,7 @@ void AbstractScImportAsciiDlg_Impl::SaveParameters() // AbstractScImportAsciiDlg_Impl end //AbstractScAutoFormatDlg_Impl begin -USHORT AbstractScAutoFormatDlg_Impl::GetIndex() const +sal_uInt16 AbstractScAutoFormatDlg_Impl::GetIndex() const { return pDlg->GetIndex(); } @@ -220,11 +220,11 @@ String AbstractScAutoFormatDlg_Impl::GetCurrFormatName() //AbstractScColRowLabelDlg_Impl begin -BOOL AbstractScColRowLabelDlg_Impl::IsCol() +sal_Bool AbstractScColRowLabelDlg_Impl::IsCol() { return pDlg->IsCol(); } -BOOL AbstractScColRowLabelDlg_Impl::IsRow() +sal_Bool AbstractScColRowLabelDlg_Impl::IsRow() { return pDlg->IsRow(); } @@ -244,12 +244,12 @@ void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc ) //AbstractScDataPilotSourceTypeDlg_Impl begin -BOOL AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const +sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsDatabase() const { return pDlg->IsDatabase(); } -BOOL AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const +sal_Bool AbstractScDataPilotSourceTypeDlg_Impl::IsExternal() const { return pDlg->IsExternal(); } @@ -294,7 +294,7 @@ void AbstractScDeleteContentsDlg_Impl::DisableObjects() { pDlg->DisableObjects(); } -USHORT AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const +sal_uInt16 AbstractScDeleteContentsDlg_Impl::GetDelContentsCmdBits() const { return pDlg->GetDelContentsCmdBits(); } @@ -332,14 +332,14 @@ String AbstractScFillSeriesDlg_Impl::GetStartStr() const { return pDlg->GetStartStr(); } -void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(BOOL bFlag) +void AbstractScFillSeriesDlg_Impl::SetEdStartValEnabled(sal_Bool bFlag) { pDlg->SetEdStartValEnabled(bFlag); } //add for AbstractScFillSeriesDlg_Impl end //add for AbstractScGroupDlg_Impl begin -BOOL AbstractScGroupDlg_Impl::GetColsChecked() const +sal_Bool AbstractScGroupDlg_Impl::GetColsChecked() const { return pDlg->GetColsChecked(); } @@ -356,39 +356,39 @@ InsCellCmd AbstractScInsertCellDlg_Impl::GetInsCellCmd() const //add for AbstractScInsertContentsDlg_Impl begin -USHORT AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const +sal_uInt16 AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() const { return pDlg->GetInsContentsCmdBits(); } -USHORT AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const +sal_uInt16 AbstractScInsertContentsDlg_Impl::GetFormulaCmdBits() const { return pDlg->GetFormulaCmdBits(); } -BOOL AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const +sal_Bool AbstractScInsertContentsDlg_Impl::IsSkipEmptyCells() const { return pDlg->IsSkipEmptyCells(); } -BOOL AbstractScInsertContentsDlg_Impl::IsLink() const +sal_Bool AbstractScInsertContentsDlg_Impl::IsLink() const { return pDlg->IsLink(); } -void AbstractScInsertContentsDlg_Impl::SetFillMode( BOOL bSet ) +void AbstractScInsertContentsDlg_Impl::SetFillMode( sal_Bool bSet ) { pDlg->SetFillMode( bSet ); } -void AbstractScInsertContentsDlg_Impl::SetOtherDoc( BOOL bSet ) +void AbstractScInsertContentsDlg_Impl::SetOtherDoc( sal_Bool bSet ) { pDlg->SetOtherDoc( bSet ); } -BOOL AbstractScInsertContentsDlg_Impl::IsTranspose() const +sal_Bool AbstractScInsertContentsDlg_Impl::IsTranspose() const { return pDlg->IsTranspose(); } -void AbstractScInsertContentsDlg_Impl::SetChangeTrack( BOOL bSet ) +void AbstractScInsertContentsDlg_Impl::SetChangeTrack( sal_Bool bSet ) { pDlg->SetChangeTrack( bSet ); } @@ -405,16 +405,16 @@ InsCellCmd AbstractScInsertContentsDlg_Impl::GetMoveMode() //add for AbstractScInsertTableDlg_Impl begin -BOOL AbstractScInsertTableDlg_Impl::GetTablesFromFile() +sal_Bool AbstractScInsertTableDlg_Impl::GetTablesFromFile() { return pDlg->GetTablesFromFile(); } -BOOL AbstractScInsertTableDlg_Impl::GetTablesAsLink() +sal_Bool AbstractScInsertTableDlg_Impl::GetTablesAsLink() { return pDlg->GetTablesAsLink(); } -const String* AbstractScInsertTableDlg_Impl::GetFirstTable( USHORT* pN ) +const String* AbstractScInsertTableDlg_Impl::GetFirstTable( sal_uInt16* pN ) { return pDlg->GetFirstTable( pN ); } @@ -422,15 +422,15 @@ ScDocShell* AbstractScInsertTableDlg_Impl::GetDocShellTables() { return pDlg->GetDocShellTables(); } -BOOL AbstractScInsertTableDlg_Impl::IsTableBefore() +sal_Bool AbstractScInsertTableDlg_Impl::IsTableBefore() { return pDlg->IsTableBefore(); } -USHORT AbstractScInsertTableDlg_Impl::GetTableCount() +sal_uInt16 AbstractScInsertTableDlg_Impl::GetTableCount() { return pDlg->GetTableCount(); } -const String* AbstractScInsertTableDlg_Impl::GetNextTable( USHORT* pN ) +const String* AbstractScInsertTableDlg_Impl::GetNextTable( sal_uInt16* pN ) { return pDlg->GetNextTable( pN ); } @@ -446,7 +446,7 @@ String AbstractScSelEntryDlg_Impl::GetSelectEntry() const //add for AbstractScLinkedAreaDlg_Impl begin void AbstractScLinkedAreaDlg_Impl::InitFromOldLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - ULONG nRefresh ) + sal_uLong nRefresh ) { pDlg->InitFromOldLink( rFile, rFilter, rOptions, rSource, nRefresh); } @@ -467,7 +467,7 @@ String AbstractScLinkedAreaDlg_Impl::GetSource() { return pDlg->GetSource(); } -ULONG AbstractScLinkedAreaDlg_Impl::GetRefresh() +sal_uLong AbstractScLinkedAreaDlg_Impl::GetRefresh() { return pDlg->GetRefresh(); } @@ -483,31 +483,31 @@ long AbstractScMetricInputDlg_Impl::GetInputValue( FieldUnit eUnit ) const //add for AbstractScMetricInputDlg_Impl end //add for AbstractScMoveTableDlg_Impl begin -USHORT AbstractScMoveTableDlg_Impl::GetSelectedDocument() const //add for ScMoveTableDlg +sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedDocument() const //add for ScMoveTableDlg { return pDlg->GetSelectedDocument(); } -USHORT AbstractScMoveTableDlg_Impl::GetSelectedTable() const +sal_uInt16 AbstractScMoveTableDlg_Impl::GetSelectedTable() const { return pDlg->GetSelectedTable(); } -BOOL AbstractScMoveTableDlg_Impl::GetCopyTable() const +sal_Bool AbstractScMoveTableDlg_Impl::GetCopyTable() const { return pDlg->GetCopyTable(); } -void AbstractScMoveTableDlg_Impl::SetCopyTable(BOOL bFla) +void AbstractScMoveTableDlg_Impl::SetCopyTable(sal_Bool bFla) { return pDlg->SetCopyTable( bFla ); } -void AbstractScMoveTableDlg_Impl::EnableCopyTable(BOOL bFlag) +void AbstractScMoveTableDlg_Impl::EnableCopyTable(sal_Bool bFlag) { return pDlg->EnableCopyTable( bFlag); } //add for AbstractScMoveTableDlg_Impl end //add for AbstractScNameCreateDlg_Impl begin -USHORT AbstractScNameCreateDlg_Impl::GetFlags() const //add for ScNameCreateDlg +sal_uInt16 AbstractScNameCreateDlg_Impl::GetFlags() const //add for ScNameCreateDlg { return pDlg->GetFlags(); } @@ -529,7 +529,7 @@ const ScQueryItem& AbstractScPivotFilterDlg_Impl::GetOutputItem() //add for S //add for AbstractScPivotFilterDlg_Impl end //add for AbstractScDPFunctionDlg_Impl begin -USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionDlg +sal_uInt16 AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionDlg { return pDlg->GetFuncMask(); } @@ -540,7 +540,7 @@ USHORT AbstractScDPFunctionDlg_Impl::GetFuncMask() const //add for ScDPFunctionD //add for AbstractScDPFunctionDlg_Impl end //add for AbstractScDPSubtotalDlg_Impl begin -USHORT AbstractScDPSubtotalDlg_Impl::GetFuncMask() const //add for ScDPSubtotalDlg +sal_uInt16 AbstractScDPSubtotalDlg_Impl::GetFuncMask() const //add for ScDPSubtotalDlg { return pDlg->GetFuncMask(); } @@ -574,13 +574,13 @@ String AbstractScDPShowDetailDlg_Impl::GetDimensionName() const //add for AbstractScNewScenarioDlg_Impl begin void AbstractScNewScenarioDlg_Impl::SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ) + const Color& rColor, sal_uInt16 nFlags ) { pDlg->SetScenarioData(rName,rComment, rColor,nFlags); } void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rComment, - Color& rColor, USHORT& rFlags ) const + Color& rColor, sal_uInt16& rFlags ) const { pDlg->GetScenarioData( rName,rComment,rColor,rFlags); } @@ -588,12 +588,12 @@ void AbstractScNewScenarioDlg_Impl::GetScenarioData( String& rName, String& rCom //add for AbstractScNewScenarioDlg_Impl end //add for AbstractScShowTabDlg_Impl begin -void AbstractScShowTabDlg_Impl::Insert( const String& rString, BOOL bSelected ) //add for ScShowTabDlg +void AbstractScShowTabDlg_Impl::Insert( const String& rString, sal_Bool bSelected ) //add for ScShowTabDlg { pDlg->Insert( rString, bSelected); } -USHORT AbstractScShowTabDlg_Impl::GetSelectEntryCount() const +sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryCount() const { return pDlg->GetSelectEntryCount(); } @@ -603,11 +603,11 @@ void AbstractScShowTabDlg_Impl::SetDescription( { pDlg->SetDescription( rTitle, rFixedText, sDlgHelpId, sLbHelpId ); } -USHORT AbstractScShowTabDlg_Impl::GetSelectEntryPos(USHORT nPos) const +sal_uInt16 AbstractScShowTabDlg_Impl::GetSelectEntryPos(sal_uInt16 nPos) const { return pDlg->GetSelectEntryPos( nPos); } -String AbstractScShowTabDlg_Impl::GetSelectEntry(USHORT nPos) const +String AbstractScShowTabDlg_Impl::GetSelectEntry(sal_uInt16 nPos) const { return pDlg->GetSelectEntry(nPos); } @@ -713,8 +713,8 @@ AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( W AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent, //add for ScColRowLabelDlg int nId, - BOOL bCol , - BOOL bRow) + sal_Bool bCol , + sal_Bool bRow) { ScColRowLabelDlg* pDlg=NULL; switch ( nId ) @@ -739,7 +739,7 @@ VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window* const String& rStrTitle, const String& rStrLabel, int nId, - BOOL bColDefault) + sal_Bool bColDefault) { Dialog * pDlg=NULL; switch ( nId ) @@ -799,7 +799,7 @@ AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilo //add for ScDataPilotSourceTypeDlg begin AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSourceTypeDlg( Window* pParent, - BOOL bEnableExternal, + sal_Bool bEnableExternal, int nId ) { ScDataPilotSourceTypeDlg * pDlg=NULL; @@ -844,7 +844,7 @@ AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotSe //add for ScDeleteCellDlg begin AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Window* pParent, int nId, - BOOL bDisallowCellMove ) + sal_Bool bDisallowCellMove ) { ScDeleteCellDlg * pDlg=NULL; switch ( nId ) @@ -865,7 +865,7 @@ AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Wi //add for ScDeleteContentsDlg begin AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg - USHORT nCheckDefaults ) + sal_uInt16 nCheckDefaults ) { ScDeleteContentsDlg * pDlg=NULL; switch ( nId ) @@ -893,7 +893,7 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi String aStartStr, double fStep, double fMax, - USHORT nPossDir, + sal_uInt16 nPossDir, int nId) { ScFillSeriesDlg * pDlg=NULL; @@ -915,10 +915,10 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi //add for ScGroupDlg begin AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, int nId, - BOOL bUnGroup , - BOOL bRows ) + sal_Bool bUnGroup , + sal_Bool bRows ) { ScGroupDlg * pDlg=NULL; switch ( nId ) @@ -942,7 +942,7 @@ AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Wind //add for ScInsertCellDlg begin AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg int nId, - BOOL bDisallowCellMove ) + sal_Bool bDisallowCellMove ) { ScInsertCellDlg * pDlg=NULL; switch ( nId ) @@ -964,7 +964,7 @@ AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( W //add for ScInsertContentsDlg begin AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( Window* pParent, int nId, - USHORT nCheckDefaults, + sal_uInt16 nCheckDefaults, const String* pStrTitle ) { ScInsertContentsDlg * pDlg=NULL; @@ -1005,7 +1005,7 @@ AbstractScInsertTableDlg * ScAbstractDialogFactory_Impl::CreateScInsertTableDlg // add for ScSelEntryDlg begin AbstractScSelEntryDlg * ScAbstractDialogFactory_Impl::CreateScSelEntryDlg ( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const String& aTitle, const String& aLbTitle, List& aEntryList, @@ -1049,12 +1049,12 @@ AbstractScLinkedAreaDlg * ScAbstractDialogFactory_Impl::CreateScLinkedAreaDlg ( //add for ScMetricInputDlg begin AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg ( Window* pParent, - USHORT nResId, // Ableitung fuer jeden Dialog! + sal_uInt16 nResId, // Ableitung fuer jeden Dialog! long nCurrent, long nDefault, int nId , FieldUnit eFUnit, - USHORT nDecimals, + sal_uInt16 nDecimals, long nMaximum , long nMinimum, long nFirst, @@ -1102,7 +1102,7 @@ AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Wi //add for ScNameCreateDlg begin -AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ) +AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ) { ScNameCreateDlg * pDlg=NULL; switch ( nId ) @@ -1123,7 +1123,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( //add for ScNamePasteDlg begin AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, - int nId , BOOL bInsList ) + int nId , sal_Bool bInsList ) { ScNamePasteDlg * pDlg=NULL; switch ( nId ) @@ -1143,7 +1143,7 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( //add for ScPivotFilterDlg begin AbstractScPivotFilterDlg * ScAbstractDialogFactory_Impl::CreateScPivotFilterDlg ( Window* pParent, - const SfxItemSet& rArgSet, USHORT nSourceTab , int nId ) + const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ) { ScPivotFilterDlg * pDlg=NULL; switch ( nId ) @@ -1229,7 +1229,7 @@ AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg( //add for ScDPShowDetailDlg begin AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg ( - Window* pParent, int nId, ScDPObject& rDPObj, USHORT nOrient ) + Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient ) { if( nId == RID_SCDLG_DPSHOWDETAIL ) return new AbstractScDPShowDetailDlg_Impl( new ScDPShowDetailDlg( pParent, rDPObj, nOrient ) ); @@ -1240,7 +1240,7 @@ AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDl //add for ScNewScenarioDlg begin AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg ( Window* pParent, const String& rName, int nId, - BOOL bEdit , BOOL bSheetProtected ) + sal_Bool bEdit , sal_Bool bSheetProtected ) { ScNewScenarioDlg * pDlg=NULL; switch ( nId ) @@ -1331,12 +1331,12 @@ return 0; //add for ScImportOptionsDlg begin AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* pParent, int nId, - BOOL bAscii, + sal_Bool bAscii, const ScImportOptions* pOptions, const String* pStrTitle, - BOOL bMultiByte, - BOOL bOnlyDbtoolsEncodings, - BOOL bImport ) + sal_Bool bMultiByte, + sal_Bool bOnlyDbtoolsEncodings, + sal_Bool bImport ) { ScImportOptionsDlg * pDlg=NULL; switch ( nId ) @@ -1389,7 +1389,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF const SfxItemSet& rCoreSet, const String& rPageStyle, int nId, - USHORT nResId ) + sal_uInt16 nResId ) { SfxTabDialog* pDlg=NULL; switch ( nId ) @@ -1410,7 +1410,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScHFEditDlg( SfxViewF //add for ScStyleDlg begin SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScStyleDlg( Window* pParent, SfxStyleSheetBase& rStyleBase, - USHORT nRscId, + sal_uInt16 nRscId, int nId) { SfxTabDialog* pDlg=NULL; @@ -1544,7 +1544,7 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window* //add for ScSortDlg end //------------------ Factories for TabPages-------------------- -CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) +CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId ) { switch ( nId ) { @@ -1577,7 +1577,7 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId ) return 0; } -GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId ) +GetTabPageRanges ScAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) { switch ( nId ) { diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index b121e82cb58d..86aebfc03287 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -72,7 +72,7 @@ public: \ {} \ virtual ~Class(); \ virtual short Execute() ; -// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 ) +// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 ) #define DECL_ABSTDLG2_BASE(Class,DialogClass) \ DialogClass* pDlg; \ @@ -124,15 +124,15 @@ class AbstractScImportAsciiDlg_Impl : public AbstractScImportAsciiDlg //add for class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg //add for ScAutoFormatDlg { DECL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl, ScAutoFormatDlg) - virtual USHORT GetIndex() const; + virtual sal_uInt16 GetIndex() const; virtual String GetCurrFormatName(); }; class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg //add for ScColRowLabelDlg { DECL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl,ScColRowLabelDlg) - virtual BOOL IsCol(); - virtual BOOL IsRow(); + virtual sal_Bool IsCol(); + virtual sal_Bool IsRow(); }; class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDlg //add for ScDataPilotDatabaseDlg @@ -144,8 +144,8 @@ class AbstractScDataPilotDatabaseDlg_Impl :public AbstractScDataPilotDatabaseDl class AbstractScDataPilotSourceTypeDlg_Impl :public AbstractScDataPilotSourceTypeDlg //add for ScDataPilotSourceTypeDlg { DECL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl, ScDataPilotSourceTypeDlg) - virtual BOOL IsDatabase() const; - virtual BOOL IsExternal() const; + virtual sal_Bool IsDatabase() const; + virtual sal_Bool IsExternal() const; }; class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg //add for ScDataPilotServiceDlg @@ -168,7 +168,7 @@ class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg //a { DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg) virtual void DisableObjects(); - virtual USHORT GetDelContentsCmdBits() const; + virtual sal_uInt16 GetDelContentsCmdBits() const; }; class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg //add for ScFillSeriesDlg @@ -181,13 +181,13 @@ class AbstractScFillSeriesDlg_Impl:public AbstractScFillSeriesDlg //add for ScF virtual double GetStep() const; virtual double GetMax() const; virtual String GetStartStr() const; - virtual void SetEdStartValEnabled(BOOL bFlag=FALSE); + virtual void SetEdStartValEnabled(sal_Bool bFlag=sal_False); }; class AbstractScGroupDlg_Impl : public AbstractScGroupDlg //add for ScGroupDlg { DECL_ABSTDLG_BASE( AbstractScGroupDlg_Impl, ScGroupDlg) - virtual BOOL GetColsChecked() const; + virtual sal_Bool GetColsChecked() const; }; class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg //add for ScInsertCellDlg @@ -199,14 +199,14 @@ class AbstractScInsertCellDlg_Impl : public AbstractScInsertCellDlg //add for S class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg //add for ScInsertContentsDlg { DECL_ABSTDLG_BASE(AbstractScInsertContentsDlg_Impl, ScInsertContentsDlg) - virtual USHORT GetInsContentsCmdBits() const; - virtual USHORT GetFormulaCmdBits() const; - virtual BOOL IsSkipEmptyCells() const; - virtual BOOL IsLink() const; - virtual void SetFillMode( BOOL bSet ); - virtual void SetOtherDoc( BOOL bSet ); - virtual BOOL IsTranspose() const; - virtual void SetChangeTrack( BOOL bSet ); + virtual sal_uInt16 GetInsContentsCmdBits() const; + virtual sal_uInt16 GetFormulaCmdBits() const; + virtual sal_Bool IsSkipEmptyCells() const; + virtual sal_Bool IsLink() const; + virtual void SetFillMode( sal_Bool bSet ); + virtual void SetOtherDoc( sal_Bool bSet ); + virtual sal_Bool IsTranspose() const; + virtual void SetChangeTrack( sal_Bool bSet ); virtual void SetCellShiftDisabled( int nDisable ); virtual InsCellCmd GetMoveMode(); }; @@ -214,13 +214,13 @@ class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg //a class AbstractScInsertTableDlg_Impl : public AbstractScInsertTableDlg //add for ScInsertTableDlg { DECL_ABSTDLG_BASE( AbstractScInsertTableDlg_Impl, ScInsertTableDlg) - virtual BOOL GetTablesFromFile(); - virtual BOOL GetTablesAsLink(); - virtual const String* GetFirstTable( USHORT* pN = NULL ); + virtual sal_Bool GetTablesFromFile(); + virtual sal_Bool GetTablesAsLink(); + virtual const String* GetFirstTable( sal_uInt16* pN = NULL ); virtual ScDocShell* GetDocShellTables(); - virtual BOOL IsTableBefore(); - virtual USHORT GetTableCount(); - virtual const String* GetNextTable( USHORT* pN = NULL ); + virtual sal_Bool IsTableBefore(); + virtual sal_uInt16 GetTableCount(); + virtual const String* GetNextTable( sal_uInt16* pN = NULL ); }; @@ -236,12 +236,12 @@ class AbstractScLinkedAreaDlg_Impl : public AbstractScLinkedAreaDlg //add for S virtual void InitFromOldLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - ULONG nRefresh ); + sal_uLong nRefresh ); virtual String GetURL(); virtual String GetFilter(); // may be empty virtual String GetOptions(); // filter options virtual String GetSource(); // separated by ";" - virtual ULONG GetRefresh(); // 0 if disabled + virtual sal_uLong GetRefresh(); // 0 if disabled }; class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg //add for ScMetricInputDlg @@ -253,17 +253,17 @@ class AbstractScMetricInputDlg_Impl : public AbstractScMetricInputDlg //add for class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg //add for ScMoveTableDlg { DECL_ABSTDLG_BASE( AbstractScMoveTableDlg_Impl, ScMoveTableDlg) - virtual USHORT GetSelectedDocument () const; - virtual USHORT GetSelectedTable () const; - virtual BOOL GetCopyTable () const; - virtual void SetCopyTable (BOOL bFlag=TRUE); - virtual void EnableCopyTable (BOOL bFlag=TRUE); + virtual sal_uInt16 GetSelectedDocument () const; + virtual sal_uInt16 GetSelectedTable () const; + virtual sal_Bool GetCopyTable () const; + virtual void SetCopyTable (sal_Bool bFlag=sal_True); + virtual void EnableCopyTable (sal_Bool bFlag=sal_True); }; class AbstractScNameCreateDlg_Impl : public AbstractScNameCreateDlg //add for ScNameCreateDlg { DECL_ABSTDLG_BASE( AbstractScNameCreateDlg_Impl, ScNameCreateDlg) - virtual USHORT GetFlags() const; + virtual sal_uInt16 GetFlags() const; }; class AbstractScNamePasteDlg_Impl : public AbstractScNamePasteDlg //add for ScNamePasteDlg @@ -281,14 +281,14 @@ class AbstractScPivotFilterDlg_Impl : public AbstractScPivotFilterDlg //add for class AbstractScDPFunctionDlg_Impl : public AbstractScDPFunctionDlg //add for ScDPFunctionDlg { DECL_ABSTDLG_BASE( AbstractScDPFunctionDlg_Impl, ScDPFunctionDlg) - virtual USHORT GetFuncMask() const; + virtual sal_uInt16 GetFuncMask() const; virtual ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const; }; class AbstractScDPSubtotalDlg_Impl : public AbstractScDPSubtotalDlg //add for ScDPSubtotalDlg { DECL_ABSTDLG_BASE( AbstractScDPSubtotalDlg_Impl, ScDPSubtotalDlg) - virtual USHORT GetFuncMask() const; + virtual sal_uInt16 GetFuncMask() const; virtual void FillLabelData( ScDPLabelData& rLabelData ) const; }; @@ -315,20 +315,20 @@ class AbstractScNewScenarioDlg_Impl : public AbstractScNewScenarioDlg //add for { DECL_ABSTDLG_BASE( AbstractScNewScenarioDlg_Impl, ScNewScenarioDlg ) virtual void SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ); + const Color& rColor, sal_uInt16 nFlags ); virtual void GetScenarioData( String& rName, String& rComment, - Color& rColor, USHORT& rFlags ) const; + Color& rColor, sal_uInt16& rFlags ) const; }; class AbstractScShowTabDlg_Impl : public AbstractScShowTabDlg //add for ScShowTabDlg { DECL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl,ScShowTabDlg) - virtual void Insert( const String& rString, BOOL bSelected ); - virtual USHORT GetSelectEntryCount() const; + virtual void Insert( const String& rString, sal_Bool bSelected ); + virtual sal_uInt16 GetSelectEntryCount() const; virtual void SetDescription(const String& rTitle, const String& rFixedText, const rtl::OString& sDlgHelpId, const rtl::OString& sLbHelpId ); - virtual String GetSelectEntry(USHORT nPos) const; - virtual USHORT GetSelectEntryPos(USHORT nPos) const; + virtual String GetSelectEntry(sal_uInt16 nPos) const; + virtual sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const; }; class AbstractScStringInputDlg_Impl : public AbstractScStringInputDlg //add for ScStringInputDlg @@ -360,9 +360,9 @@ class AbstractScTextImportOptionsDlg_Impl : public AbstractScTextImportOptionsDl class AbstractTabDialog_Impl : public SfxAbstractTabDialog { DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog ) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 virtual void SetInputSet( const SfxItemSet* pInSet ); //add by CHINA001 //From class Window. virtual void SetText( const XubString& rStr ); //add by CHINA001 @@ -375,9 +375,9 @@ namespace layout class AbstractTabDialog_Impl : public SfxAbstractTabDialog { DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog ) - virtual void SetCurPageId( USHORT nId ); + virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; - virtual const USHORT* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 + virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); //add by CHINA001 virtual void SetInputSet( const SfxItemSet* pInSet ); //add by CHINA001 //From class Window. virtual void SetText( const XubString& rStr ); //add by CHINA001 @@ -406,29 +406,29 @@ public: int nId); virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, //add for ScColRowLabelDlg int nId, - BOOL bCol = FALSE, - BOOL bRow = FALSE); + sal_Bool bCol = sal_False, + sal_Bool bRow = sal_False); virtual VclAbstractDialog * CreateScColOrRowDlg( Window* pParent, //add for ScColOrRowDlg const String& rStrTitle, const String& rStrLabel, int nId, - BOOL bColDefault = TRUE ); + sal_Bool bColDefault = sal_True ); virtual VclAbstractDialog * CreateScSortWarningDlg( Window* pParent, const String& rExtendText, const String& rCurrentText, int nId ); virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg (Window* pParent ,int nId ); //add for ScDataPilotDatabaseDlg - virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, BOOL bEnableExternal, int nId ) ; //add for ScDataPilotSourceTypeDlg + virtual AbstractScDataPilotSourceTypeDlg * CreateScDataPilotSourceTypeDlg ( Window* pParent, sal_Bool bEnableExternal, int nId ) ; //add for ScDataPilotSourceTypeDlg virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( Window* pParent, //add for ScDataPilotServiceDlg const com::sun::star::uno::Sequence& rServices, int nId ); virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, - BOOL bDisallowCellMove = FALSE ); //add for ScDeleteCellDlg + sal_Bool bDisallowCellMove = sal_False ); //add for ScDeleteCellDlg virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg - USHORT nCheckDefaults = 0 ); + sal_uInt16 nCheckDefaults = 0 ); virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg ScDocument& rDocument, @@ -438,28 +438,28 @@ public: String aStartStr, double fStep, double fMax, - USHORT nPossDir, + sal_uInt16 nPossDir, int nId); virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg - USHORT nResId, + sal_uInt16 nResId, int nId, - BOOL bUnGroup = FALSE, - BOOL bRows = TRUE ); + sal_Bool bUnGroup = sal_False, + sal_Bool bRows = sal_True ); virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( Window* pParent, //add for ScInsertCellDlg int nId, - BOOL bDisallowCellMove = FALSE ); + sal_Bool bDisallowCellMove = sal_False ); virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( Window* pParent, //add for ScInsertContentsDlg int nId, - USHORT nCheckDefaults = 0, + sal_uInt16 nCheckDefaults = 0, const String* pStrTitle = NULL ); virtual AbstractScInsertTableDlg * CreateScInsertTableDlg ( Window* pParent, ScViewData& rViewData, //add for ScInsertTableDlg SCTAB nTabCount, bool bFromFile, int nId); virtual AbstractScSelEntryDlg * CreateScSelEntryDlg ( Window* pParent, // add for ScSelEntryDlg - USHORT nResId, + sal_uInt16 nResId, const String& aTitle, const String& aLbTitle, List& aEntryList, @@ -469,25 +469,25 @@ public: int nId); virtual AbstractScMetricInputDlg * CreateScMetricInputDlg ( Window* pParent, //add for ScMetricInputDlg - USHORT nResId, // Ableitung fuer jeden Dialog! + sal_uInt16 nResId, // Ableitung fuer jeden Dialog! long nCurrent, long nDefault, int nId , FieldUnit eFUnit = FUNIT_MM, - USHORT nDecimals = 2, + sal_uInt16 nDecimals = 2, long nMaximum = 1000, long nMinimum = 0, long nFirst = 1, long nLast = 100 ); virtual AbstractScMoveTableDlg * CreateScMoveTableDlg( Window* pParent, int nId ); //add for ScMoveTableDlg - virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, USHORT nFlags, int nId ); //add for ScNameCreateDlg + virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ); //add for ScNameCreateDlg virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg - int nId , BOOL bInsList=TRUE ); + int nId , sal_Bool bInsList=sal_True ); virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg - const SfxItemSet& rArgSet, USHORT nSourceTab , int nId ); + const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ); virtual AbstractScDPFunctionDlg * CreateScDPFunctionDlg( Window* pParent, int nId, const ScDPLabelDataVec& rLabelVec, @@ -513,11 +513,11 @@ public: virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( Window* pParent, int nId, ScDPObject& rDPObj, - USHORT nOrient ); + sal_uInt16 nOrient ); virtual AbstractScNewScenarioDlg * CreateScNewScenarioDlg ( Window* pParent, const String& rName, //add for ScNewScenarioDlg int nId, - BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE ); + sal_Bool bEdit = sal_False, sal_Bool bSheetProtected = sal_False ); virtual AbstractScShowTabDlg * CreateScShowTabDlg ( Window* pParent, int nId ); //add for ScShowTabDlg virtual AbstractScStringInputDlg * CreateScStringInputDlg ( Window* pParent, //add for ScStringInputDlg @@ -536,12 +536,12 @@ public: virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent, //add for ScImportOptionsDlg int nId, - BOOL bAscii = TRUE, + sal_Bool bAscii = sal_True, const ScImportOptions* pOptions = NULL, const String* pStrTitle = NULL, - BOOL bMultiByte = FALSE, - BOOL bOnlyDbtoolsEncodings = FALSE, - BOOL bImport = TRUE ); + sal_Bool bMultiByte = sal_False, + sal_Bool bOnlyDbtoolsEncodings = sal_False, + sal_Bool bImport = sal_True ); virtual SfxAbstractTabDialog * CreateScAttrDlg( SfxViewFrame* pFrame, //add for ScAttrDlg Window* pParent, const SfxItemSet* pCellAttrs, @@ -552,11 +552,11 @@ public: const SfxItemSet& rCoreSet, const String& rPageStyle, int nId, - USHORT nResId = RID_SCDLG_HFEDIT ); + sal_uInt16 nResId = RID_SCDLG_HFEDIT ); virtual SfxAbstractTabDialog * CreateScStyleDlg( Window* pParent,//add for ScStyleDlg SfxStyleSheetBase& rStyleBase, - USHORT nRscId, + sal_uInt16 nRscId, int nId); virtual SfxAbstractTabDialog * CreateScSubTotalDlg( Window* pParent, //add for ScSubTotalDlg @@ -577,9 +577,9 @@ public: virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg const SfxItemSet* pArgSet,int nId ); // For TabPage - virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ); + virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ); - virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ); + virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ); }; diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index 21c769cf0603..c18f166f6e5d 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -43,7 +43,7 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pProtectionRanges[] = +static sal_uInt16 pProtectionRanges[] = { SID_SCATTR_PROTECTION, SID_SCATTR_PROTECTION, @@ -73,7 +73,7 @@ ScTabPageProtection::ScTabPageProtection( Window* pParent, SetExchangeSupport(); // States werden in Reset gesetzt - bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = FALSE; + bTriEnabled = bDontCare = bProtect = bHideForm = bHideCell = bHidePrint = sal_False; aBtnProtect.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); aBtnHideCell.SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); @@ -91,7 +91,7 @@ __EXPORT ScTabPageProtection::~ScTabPageProtection() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageProtection::GetRanges() +sal_uInt16* __EXPORT ScTabPageProtection::GetRanges() { return pProtectionRanges; } @@ -110,9 +110,9 @@ void __EXPORT ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs ) { // Variablen initialisieren - USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION ); + sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION ); const ScProtectionAttr* pProtAttr = NULL; - SfxItemState eItemState = rCoreAttrs.GetItemState( nWhich, FALSE, + SfxItemState eItemState = rCoreAttrs.GetItemState( nWhich, sal_False, (const SfxPoolItem**)&pProtAttr ); // handelt es sich um ein Default-Item? @@ -127,8 +127,8 @@ void __EXPORT ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs ) // Defaults, die erscheinen wenn ein TriState weggeklickt wird: // (weil alles zusammen ein Attribut ist, kann auch nur alles zusammen // auf DontCare stehen - #38543#) - bProtect = TRUE; - bHideForm = bHideCell = bHidePrint = FALSE; + bProtect = sal_True; + bHideForm = bHideCell = bHidePrint = sal_False; } else { @@ -150,13 +150,13 @@ void __EXPORT ScTabPageProtection::Reset( const SfxItemSet& rCoreAttrs ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool __EXPORT ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) { - BOOL bAttrsChanged = FALSE; - USHORT nWhich = GetWhich( SID_SCATTR_PROTECTION ); + sal_Bool bAttrsChanged = sal_False; + sal_uInt16 nWhich = GetWhich( SID_SCATTR_PROTECTION ); const SfxPoolItem* pOldItem = GetOldItem( rCoreAttrs, SID_SCATTR_PROTECTION ); const SfxItemSet& rOldSet = GetItemSet(); - SfxItemState eItemState = rOldSet.GetItemState( nWhich, FALSE ); + SfxItemState eItemState = rOldSet.GetItemState( nWhich, sal_False ); ScProtectionAttr aProtAttr; if ( !bDontCare ) @@ -167,7 +167,7 @@ BOOL __EXPORT ScTabPageProtection::FillItemSet( SfxItemSet& rCoreAttrs ) aProtAttr.SetHidePrint( bHidePrint ); if ( bTriEnabled ) - bAttrsChanged = TRUE; // DontCare -> richtiger Wert + bAttrsChanged = sal_True; // DontCare -> richtiger Wert else bAttrsChanged = !pOldItem || !( aProtAttr == *(const ScProtectionAttr*)pOldItem ); } @@ -198,11 +198,11 @@ IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox ) { TriState eState = pBox->GetState(); if ( eState == STATE_DONTKNOW ) - bDontCare = TRUE; // alles zusammen auf DontCare + bDontCare = sal_True; // alles zusammen auf DontCare else { - bDontCare = FALSE; // DontCare ueberall aus - BOOL bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert + bDontCare = sal_False; // DontCare ueberall aus + sal_Bool bOn = ( eState == STATE_CHECK ); // ausgewaehlter Wert if ( pBox == &aBtnProtect ) bProtect = bOn; @@ -242,7 +242,7 @@ void ScTabPageProtection::UpdateButtons() aBtnHidePrint.SetState( bHidePrint ? STATE_CHECK : STATE_NOCHECK ); } - BOOL bEnable = ( aBtnHideCell.GetState() != STATE_CHECK ); + sal_Bool bEnable = ( aBtnHideCell.GetState() != STATE_CHECK ); { aBtnProtect.Enable( bEnable ); aBtnHideFormula.Enable( bEnable ); diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx index 6004fdfcfc51..79b9e4cb302f 100644 --- a/sc/source/ui/cctrl/cbuttonw.cxx +++ b/sc/source/ui/cctrl/cbuttonw.cxx @@ -70,28 +70,28 @@ void ScDDComboBoxButton::SetOptSizePixel() void ScDDComboBoxButton::Draw( const Point& rAt, const Size& rSize, - BOOL bState, - BOOL bBtnIn /* = FALSE */ ) + sal_Bool bState, + sal_Bool bBtnIn /* = sal_False */ ) { if ( rSize.Width() == 0 || rSize.Height() == 0 ) return; // #i43092# rectangle with size 0 would have RECT_EMPTY as end position // save old state - BOOL bHadFill = pOut->IsFillColor(); + sal_Bool bHadFill = pOut->IsFillColor(); Color aOldFill = pOut->GetFillColor(); - BOOL bHadLine = pOut->IsLineColor(); + sal_Bool bHadLine = pOut->IsLineColor(); Color aOldLine = pOut->GetLineColor(); - BOOL bOldEnable = pOut->IsMapModeEnabled(); + sal_Bool bOldEnable = pOut->IsMapModeEnabled(); Size aLogPix( 1, 1 ); Rectangle aBtnRect( rAt, rSize ); Rectangle aInnerRect = aBtnRect; - pOut->EnableMapMode( FALSE ); + pOut->EnableMapMode( sal_False ); DecorationView aDecoView( pOut); - USHORT nButtonStyle = BUTTON_DRAW_DEFAULT; + sal_uInt16 nButtonStyle = BUTTON_DRAW_DEFAULT; if( bBtnIn ) // gedrueckt? { nButtonStyle = BUTTON_DRAW_PRESSED; @@ -129,7 +129,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt, //------------------------------------------------------------------------ void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect, - BOOL bState ) + sal_Bool bState ) { // no need to save old line and fill color here (is restored after the call) diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index b90a51ed6bee..0066af5938e2 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -306,7 +306,7 @@ IMPL_LINK( ScMenuFloatingWindow::SubMenuItemData, TimeoutHdl, void*, EMPTYARG ) size_t ScMenuFloatingWindow::MENU_NOT_SELECTED = 999; -ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel) : +ScMenuFloatingWindow::ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel) : PopupMenuFloatingWindow(pParent), maOpenTimer(this), maCloseTimer(this), @@ -1160,7 +1160,7 @@ void ScDPFieldPopupWindow::setAllMemberState(bool bSet) { size_t n = maMembers.size(); for (size_t i = 0; i < n; ++i) - maChecks.CheckEntryPos(static_cast< USHORT >( i ), bSet); + maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), bSet); } void ScDPFieldPopupWindow::selectCurrentMemberOnly(bool bSet) @@ -1356,7 +1356,7 @@ void ScDPFieldPopupWindow::initMembers() for (size_t i = 0; i < n; ++i) { maChecks.InsertEntry(maMembers[i].maName); - maChecks.CheckEntryPos(static_cast< USHORT >( i ), maMembers[i].mbVisible); + maChecks.CheckEntryPos(static_cast< sal_uInt16 >( i ), maMembers[i].mbVisible); if (maMembers[i].mbVisible) ++nVisMemCount; } @@ -1391,7 +1391,7 @@ void ScDPFieldPopupWindow::getResult(hash_map& rRe size_t n = maMembers.size(); for (size_t i = 0; i < n; ++i) { - bool bState = maChecks.IsChecked(static_cast< USHORT >( i )); + bool bState = maChecks.IsChecked(static_cast< sal_uInt16 >( i )); aResult.insert(ResultMap::value_type(maMembers[i].maName, bState)); } rResult.swap(aResult); diff --git a/sc/source/ui/cctrl/popmenu.cxx b/sc/source/ui/cctrl/popmenu.cxx index 6510fff87ead..f7eb8aa1f4e9 100644 --- a/sc/source/ui/cctrl/popmenu.cxx +++ b/sc/source/ui/cctrl/popmenu.cxx @@ -41,7 +41,7 @@ void __EXPORT ScPopupMenu::Select() { nSel = GetCurItemId(); - bHit = TRUE; + bHit = sal_True; } diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx index e27baecec115..930bddb0799f 100644 --- a/sc/source/ui/cctrl/tbinsert.cxx +++ b/sc/source/ui/cctrl/tbinsert.cxx @@ -62,7 +62,7 @@ SFX_IMPL_TOOLBOX_CONTROL( ScTbxInsertCtrl, SfxUInt16Item); // //------------------------------------------------------------------ -ScTbxInsertCtrl::ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +ScTbxInsertCtrl::ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), nLastSlotId(0) { @@ -73,7 +73,7 @@ __EXPORT ScTbxInsertCtrl::~ScTbxInsertCtrl() { } -void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eState, +void __EXPORT ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); @@ -85,7 +85,7 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt if(pItem) { nLastSlotId = pItem->GetValue(); - USHORT nImageId = nLastSlotId ? nLastSlotId : GetSlotId(); + sal_uInt16 nImageId = nLastSlotId ? nLastSlotId : GetSlotId(); rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nImageId )); Image aImage = GetImage( m_xFrame, @@ -99,8 +99,8 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() { -// USHORT nWinResId, nTbxResId; - USHORT nSlotId = GetSlotId(); +// sal_uInt16 nWinResId, nTbxResId; + sal_uInt16 nSlotId = GetSlotId(); if (nSlotId == SID_TBXCTL_INSERT) { rtl::OUString aInsertBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" )); @@ -126,7 +126,7 @@ SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() WindowAlign eNewAlign = ( GetToolBox().IsHorizontal() ) ? WINDOWALIGN_LEFT : WINDOWALIGN_TOP; ScTbxInsertPopup *pWin = new ScTbxInsertPopup( nSlotId, eNewAlign, ScResId(nWinResId), ScResId(nTbxResId), GetBindings() ); - pWin->StartPopupMode(&GetToolBox(), TRUE); + pWin->StartPopupMode(&GetToolBox(), sal_True); pWin->StartSelection(); pWin->Show(); return pWin; @@ -139,7 +139,7 @@ SfxPopupWindowType __EXPORT ScTbxInsertCtrl::GetPopupWindowType() const return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK; } -void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) +void __EXPORT ScTbxInsertCtrl::Select( sal_Bool /* bMod1 */ ) { SfxViewShell* pCurSh( SfxViewShell::Current() ); SfxDispatcher* pDispatch( 0 ); @@ -161,7 +161,7 @@ void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) // //------------------------------------------------------------------ -ScTbxInsertPopup::ScTbxInsertPopup( USHORT nId, WindowAlign eNewAlign, +ScTbxInsertPopup::ScTbxInsertPopup( sal_uInt16 nId, WindowAlign eNewAlign, const ResId& rRIdWin, const ResId& rRIdTbx, SfxBindings& rBindings ) : SfxPopupWindow ( nId, rRIdWin, rBindings), @@ -204,7 +204,7 @@ IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) { EndPopupMode(); - USHORT nLastSlotId = pBox->GetCurItemId(); + sal_uInt16 nLastSlotId = pBox->GetCurItemId(); SfxUInt16Item aItem( GetId(), nLastSlotId ); SfxDispatcher* pDisp = GetBindings().GetDispatcher(); pDisp->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); @@ -214,7 +214,7 @@ IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) IMPL_LINK(ScTbxInsertPopup, TbxClickHdl, ToolBox*, pBox) { - USHORT nLastSlotId = pBox->GetCurItemId(); + sal_uInt16 nLastSlotId = pBox->GetCurItemId(); SfxUInt16Item aItem( GetId(), nLastSlotId ); GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); if(aTbxClickHdl.IsSet()) diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 7d43b31e0b30..f2557d16e4de 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -63,8 +63,8 @@ SFX_IMPL_TOOLBOX_CONTROL( ScZoomSliderControl, SvxZoomSliderItem ); // ----------------------------------------------------------------------- ScZoomSliderControl::ScZoomSliderControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) :SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -80,10 +80,10 @@ __EXPORT ScZoomSliderControl::~ScZoomSliderControl() // ----------------------------------------------------------------------- -void ScZoomSliderControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, +void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId )); DBG_ASSERT( pBox ,"Control not found!" ); @@ -122,19 +122,19 @@ Window* ScZoomSliderControl::CreateItemWindow( Window *pParent ) struct ScZoomSliderWnd::ScZoomSliderWnd_Impl { - USHORT mnCurrentZoom; - USHORT mnMinZoom; - USHORT mnMaxZoom; - USHORT mnSliderCenter; + sal_uInt16 mnCurrentZoom; + sal_uInt16 mnMinZoom; + sal_uInt16 mnMaxZoom; + sal_uInt16 mnSliderCenter; std::vector< long > maSnappingPointOffsets; - std::vector< USHORT > maSnappingPointZooms; + std::vector< sal_uInt16 > maSnappingPointZooms; Image maSliderButton; Image maIncreaseButton; Image maDecreaseButton; bool mbValuesSet; bool mbOmitPaint; - ScZoomSliderWnd_Impl( USHORT nCurrentZoom ) : + ScZoomSliderWnd_Impl( sal_uInt16 nCurrentZoom ) : mnCurrentZoom( nCurrentZoom ), mnMinZoom( 10 ), mnMaxZoom( 400 ), @@ -167,11 +167,11 @@ const long nSnappingPointsMinDist = nSnappingEpsilon; // minimum distance of two // ----------------------------------------------------------------------- -USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const +sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const { Size aSliderWindowSize = GetOutputSizePixel(); const long nControlWidth = aSliderWindowSize.Width(); - USHORT nRet = 0; + sal_uInt16 nRet = 0; if( nOffset < nSliderXOffset ) return mpImpl->mnMinZoom; @@ -179,7 +179,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const return mpImpl->mnMaxZoom; // check for snapping points: - USHORT nCount = 0; + sal_uInt16 nCount = 0; std::vector< long >::iterator aSnappingPointIter; for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin(); aSnappingPointIter != mpImpl->maSnappingPointOffsets.end(); @@ -204,7 +204,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth; const long nOffsetToSliderLeft = nOffset - nSliderXOffset; - nRet = mpImpl->mnMinZoom + USHORT( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); + nRet = mpImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); } else { @@ -213,7 +213,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth; const long nOffsetToSliderCenter = nOffset - nControlWidth/2; - nRet = mpImpl->mnSliderCenter + USHORT( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); + nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); } } @@ -228,7 +228,7 @@ USHORT ScZoomSliderWnd::Offset2Zoom( long nOffset ) const // ----------------------------------------------------------------------- -long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const +long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 nCurrentZoom ) const { Size aSliderWindowSize = GetOutputSizePixel(); const long nControlWidth = aSliderWindowSize.Width(); @@ -258,14 +258,14 @@ long ScZoomSliderWnd::Zoom2Offset( USHORT nCurrentZoom ) const ScZoomSliderWnd::ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom ): + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom ): Window( pParent ), mpImpl( new ScZoomSliderWnd_Impl( nCurrentZoom ) ), aLogicalSize( 115, 40 ), m_xDispatchProvider( rDispatchProvider ), m_xFrame( _xFrame ) { - BOOL bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bIsHC = GetSettings().GetStyleSettings().GetHighContrastMode(); mpImpl->maSliderButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); mpImpl->maIncreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); mpImpl->maDecreaseButton = Image( SVX_RES( bIsHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); @@ -400,20 +400,20 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ) mpImpl->maSnappingPointZooms.clear(); // get all snapping points: - std::set< USHORT > aTmpSnappingPoints; - for ( USHORT j = 0; j < rSnappingPoints.getLength(); ++j ) + std::set< sal_uInt16 > aTmpSnappingPoints; + for ( sal_uInt16 j = 0; j < rSnappingPoints.getLength(); ++j ) { const sal_Int32 nSnappingPoint = rSnappingPoints[j]; - aTmpSnappingPoints.insert( (USHORT)nSnappingPoint ); + aTmpSnappingPoints.insert( (sal_uInt16)nSnappingPoint ); } // remove snapping points that are to close to each other: - std::set< USHORT >::iterator aSnappingPointIter; + std::set< sal_uInt16 >::iterator aSnappingPointIter; long nLastOffset = 0; for ( aSnappingPointIter = aTmpSnappingPoints.begin(); aSnappingPointIter != aTmpSnappingPoints.end(); ++aSnappingPointIter ) { - const USHORT nCurrent = *aSnappingPointIter; + const sal_uInt16 nCurrent = *aSnappingPointIter; const long nCurrentOffset = Zoom2Offset( nCurrent ); if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist ) diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index a22953ade25b..4e6c61f2e4d0 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -50,15 +50,15 @@ static const sal_Char __FAR_DATA pStrMrg[] = "MRG"; // ============================================================================ ScAsciiOptions::ScAsciiOptions() : - bFixedLen ( FALSE ), + bFixedLen ( sal_False ), aFieldSeps ( ';' ), - bMergeFieldSeps ( FALSE ), + bMergeFieldSeps ( sal_False ), bQuotedFieldAsText(false), bDetectSpecialNumber(false), cTextSep ( cDefaultTextSep ), eCharSet ( gsl_getSystemTextEncoding() ), eLang ( LANGUAGE_SYSTEM ), - bCharSetSystem ( FALSE ), + bCharSetSystem ( sal_False ), nStartRow ( 1 ), nInfoCount ( 0 ), pColStart ( NULL ), @@ -83,8 +83,8 @@ ScAsciiOptions::ScAsciiOptions(const ScAsciiOptions& rOpt) : if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT i=0; i= 1 ) { - bFixedLen = bMergeFieldSeps = FALSE; + bFixedLen = bMergeFieldSeps = sal_False; aFieldSeps.Erase(); aToken = rString.GetToken(0,','); if ( aToken.EqualsAscii(pStrFix) ) - bFixedLen = TRUE; + bFixedLen = sal_True; nSub = aToken.GetTokenCount('/'); for ( i=0; iGetRangeName(); ScDBCollection* pDbNames = pDoc->GetDBCollection(); - const USHORT nRangeCount = pRangeNames ? pRangeNames->GetCount() : 0; - const USHORT nDbCount = pDbNames ? pDbNames ->GetCount() : 0; + const sal_uInt16 nRangeCount = pRangeNames ? pRangeNames->GetCount() : 0; + const sal_uInt16 nDbCount = pDbNames ? pDbNames ->GetCount() : 0; nAreaDataCount = nRangeCount+nDbCount; pAreaData = NULL; @@ -233,7 +233,7 @@ void ScConsolidateDlg::Init() String aStrName; String aStrArea; - USHORT nAt = 0; + sal_uInt16 nAt = 0; ScRange aRange; ScAreaNameIterator aIter( pDoc ); while ( aIter.Next( aStrName, aRange ) ) @@ -268,7 +268,7 @@ void ScConsolidateDlg::FillAreaLists() { String aString; - for ( USHORT i=0; + for ( sal_uInt16 i=0; (i0); i++ ) { @@ -294,7 +294,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) RefInputStart( pRefInputEdit ); String aStr; - USHORT nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch + sal_uInt16 nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch const formula::FormulaGrammar::AddressConvention eConv = pDocP->GetAddressConvention(); if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) @@ -314,7 +314,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScConsolidateDlg::Close() +sal_Bool __EXPORT ScConsolidateDlg::Close() { return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() ); } @@ -326,7 +326,7 @@ void ScConsolidateDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if ( pRefInputEdit ) { @@ -345,20 +345,20 @@ void ScConsolidateDlg::SetActive() void __EXPORT ScConsolidateDlg::Deactivate() { - bDlgLostFocus = TRUE; + bDlgLostFocus = sal_True; } //---------------------------------------------------------------------------- -BOOL ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) +sal_Bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) { if ( !pRangeUtil || !pDoc || !pViewData || ((pEd != &aEdDataArea) && (pEd != &aEdDestArea)) ) - return FALSE; + return sal_False; SCTAB nTab = pViewData->GetTabNo(); - BOOL bEditOk = FALSE; + sal_Bool bEditOk = sal_False; String theCompleteStr; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -410,7 +410,7 @@ IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr ) IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG ) { - USHORT nDataAreaCount = aLbConsAreas.GetEntryCount(); + sal_uInt16 nDataAreaCount = aLbConsAreas.GetEntryCount(); if ( nDataAreaCount > 0 ) { @@ -424,7 +424,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG ) ScConsolidateParam theOutParam( theConsData ); ScArea** ppDataAreas = new ScArea*[nDataAreaCount]; ScArea* pArea; - USHORT i=0; + sal_uInt16 i=0; for ( i=0; iExecute( SID_CONSOLIDATE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -480,16 +480,16 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn ) { String aNewEntry( aEdDataArea.GetText() ); ScArea** ppAreas = NULL; - USHORT nAreaCount = 0; + sal_uInt16 nAreaCount = 0; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE, eConv ) ) + if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, sal_True, eConv ) ) { // IsAbsTabArea() legt ein Array von ScArea-Zeigern an, // welche ebenfalls dynamisch erzeugt wurden. // Diese Objekte muessen hier abgeraeumt werden. - for ( USHORT i=0; iGetSelectEntryPos(); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); if ( pRangeUtil && (nSelPos > 0) @@ -609,7 +609,7 @@ IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd ) // auch noch in tpsubt bzw. ueberall, wo StarCalc-Funktionen // auswaehlbar sind. -ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos ) +ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos ) { switch ( nPos ) { @@ -632,7 +632,7 @@ ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( USHORT nPos ) //---------------------------------------------------------------------------- -USHORT ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc ) +sal_uInt16 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc ) { switch ( eFunc ) { diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index d271022a987c..92a25c326641 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -76,7 +76,7 @@ struct Func_Select ScCsvGrid::ScCsvGrid( ScCsvControl& rParent ) : ScCsvControl( rParent ), mrColorConfig( SC_MOD()->GetColorConfig() ), - mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ) ), + mpEditEngine( new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True ) ), maHeaderFont( GetFont() ), maColStates( 1 ), maTypeNames( 1 ), @@ -235,7 +235,7 @@ void ScCsvGrid::InitFonts() aDefSet.Put( aComplexItem ); // set Asian/Complex font size to height of character in Latin font - ULONG nFontHt = static_cast< ULONG >( maMonoFont.GetSize().Height() ); + sal_uLong nFontHt = static_cast< sal_uLong >( maMonoFont.GetSize().Height() ); aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CJK ) ); aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CTL ) ); @@ -886,8 +886,8 @@ void ScCsvGrid::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = rKCode.GetCode(); - bool bShift = rKCode.IsShift() == TRUE; - bool bMod1 = rKCode.IsMod1() == TRUE; + bool bShift = rKCode.IsShift() == sal_True; + bool bMod1 = rKCode.IsMod1() == sal_True; if( !rKCode.IsMod2() ) { diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 56aa2a50a835..a8f75992cb7f 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -127,7 +127,7 @@ ScCsvRuler::~ScCsvRuler() // common ruler handling ------------------------------------------------------ void ScCsvRuler::SetPosSizePixel( - long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) + long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { if( nFlags & WINDOW_POSSIZE_HEIGHT ) nHeight = GetTextHeight() + mnSplitSize + 2; diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx index 976e0ae23039..56e80e9f2d50 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -124,7 +124,7 @@ ScDataPilotDatabaseDlg::~ScDataPilotDatabaseDlg() void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc ) { - USHORT nSelect = aLbType.GetSelectEntryPos(); + sal_uInt16 nSelect = aLbType.GetSelectEntryPos(); rDesc.aDBName = aLbDatabase.GetSelectEntry(); rDesc.aObject = aCbObject.GetText(); @@ -155,7 +155,7 @@ void ScDataPilotDatabaseDlg::FillObjects() if (!aDatabaseName.Len()) return; - USHORT nSelect = aLbType.GetSelectEntryPos(); + sal_uInt16 nSelect = aLbType.GetSelectEntryPos(); if ( nSelect > DP_TYPELIST_QUERY ) return; // only tables and queries diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx index 31aafbcb13da..e275a34b8b88 100644 --- a/sc/source/ui/dbgui/dapitype.cxx +++ b/sc/source/ui/dbgui/dapitype.cxx @@ -43,7 +43,7 @@ using namespace com::sun::star; //------------------------------------------------------------------------- -ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ) : +ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DAPITYPE ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), @@ -66,12 +66,12 @@ ScDataPilotSourceTypeDlg::~ScDataPilotSourceTypeDlg() { } -BOOL ScDataPilotSourceTypeDlg::IsDatabase() const +sal_Bool ScDataPilotSourceTypeDlg::IsDatabase() const { return aBtnDatabase.IsChecked(); } -BOOL ScDataPilotSourceTypeDlg::IsExternal() const +sal_Bool ScDataPilotSourceTypeDlg::IsExternal() const { return aBtnExternal.IsChecked(); } diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index a2f4d61af537..a4a7c6826daa 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -77,7 +77,7 @@ public: : rEdAssign(rEd), rBtnHeader(rHdr), rBtnSize(rSize), rBtnFormat(rFmt), rBtnStrip(rStrip), rCurArea(rArea), - bHeader(FALSE), bSize(FALSE), bFormat(FALSE), bDirty(FALSE) {} + bHeader(sal_False), bSize(sal_False), bFormat(sal_False), bDirty(sal_False) {} void Save(); void Restore(); @@ -90,11 +90,11 @@ private: ScRange& rCurArea; String aStr; ScRange aArea; - BOOL bHeader:1; - BOOL bSize:1; - BOOL bFormat:1; - BOOL bStrip:1; - BOOL bDirty:1; + sal_Bool bHeader:1; + sal_Bool bSize:1; + sal_Bool bFormat:1; + sal_Bool bStrip:1; + sal_Bool bDirty:1; }; @@ -109,7 +109,7 @@ void DBSaveData::Save() bSize = rBtnSize.IsChecked(); bFormat = rBtnFormat.IsChecked(); bStrip = rBtnStrip.IsChecked(); - bDirty = TRUE; + bDirty = sal_True; } @@ -125,7 +125,7 @@ void DBSaveData::Restore() rBtnSize.Check ( bSize ); rBtnFormat.Check ( bFormat ); rBtnStrip.Check ( bStrip ); - bDirty = FALSE; + bDirty = sal_False; } } @@ -169,7 +169,7 @@ ScDbNameDlg::ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, // pViewData ( ptrViewData ), pDoc ( ptrViewData->GetDocument() ), - bRefInputMode ( FALSE ), + bRefInputMode ( sal_False ), aAddrDetails ( pDoc->GetAddressConvention(), 0, 0 ), aLocalDbCol ( *(pDoc->GetDBCollection()) ) { @@ -208,7 +208,7 @@ __EXPORT ScDbNameDlg::~ScDbNameDlg() void ScDbNameDlg::Init() { - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen aBtnMore.AddWindow( &aFlOptions ); aBtnMore.AddWindow( &aBtnHeader ); @@ -250,7 +250,7 @@ void ScDbNameDlg::Init() if ( pDBColl ) { // Feststellen, ob definierter DB-Bereich markiert wurde: - pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, TRUE ); + pDBData = pDBColl->GetDBAtCursor( nStartCol, nStartRow, nStartTab, sal_True ); if ( pDBData ) { String theDbName; @@ -285,7 +285,7 @@ void ScDbNameDlg::Init() aEdAssign.SetText( theAreaStr ); aEdName.GrabFocus(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); NameModifyHdl( 0 ); } @@ -333,7 +333,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) aFTSource.Enable(); aFTOperations.Enable(); aBtnAdd.Enable(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); } } @@ -341,7 +341,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScDbNameDlg::Close() +sal_Bool __EXPORT ScDbNameDlg::Close() { return DoClose( ScDbNameDlgWrapper::GetChildWindowId() ); } @@ -363,9 +363,9 @@ void ScDbNameDlg::SetActive() void ScDbNameDlg::UpdateNames() { - USHORT nNameCount = aLocalDbCol.GetCount(); + sal_uInt16 nNameCount = aLocalDbCol.GetCount(); - aEdName.SetUpdateMode( FALSE ); + aEdName.SetUpdateMode( sal_False ); //----------------------------------------------------------- aEdName.Clear(); aEdAssign.SetText( EMPTY_STRING ); @@ -375,7 +375,7 @@ void ScDbNameDlg::UpdateNames() ScDBData* pDbData = NULL; String aString; - for ( USHORT i=0; iMoveTo( aStart.Tab(), aStart.Col(), aStart.Row(), aEnd.Col(), aEnd.Row() ); - pOldEntry->SetByRow( TRUE ); + pOldEntry->SetByRow( sal_True ); pOldEntry->SetHeader( aBtnHeader.IsChecked() ); pOldEntry->SetDoSize( aBtnDoSize.IsChecked() ); pOldEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() ); @@ -522,7 +522,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) ScDBData* pNewEntry = new ScDBData( aNewName, aStart.Tab(), aStart.Col(), aStart.Row(), aEnd.Col(), aEnd.Row(), - TRUE, aBtnHeader.IsChecked() ); + sal_True, aBtnHeader.IsChecked() ); pNewEntry->SetDoSize( aBtnDoSize.IsChecked() ); pNewEntry->SetKeepFmt( aBtnKeepFmt.IsChecked() ); pNewEntry->SetStripData( aBtnStripData.IsChecked() ); @@ -539,13 +539,13 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) aBtnAdd.Disable(); aBtnRemove.Disable(); aEdAssign.SetText( EMPTY_STRING ); - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen - aBtnDoSize.Check( FALSE ); - aBtnKeepFmt.Check( FALSE ); - aBtnStripData.Check( FALSE ); + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen + aBtnDoSize.Check( sal_False ); + aBtnKeepFmt.Check( sal_False ); + aBtnStripData.Check( sal_False ); SetInfoStrings( NULL ); // leer theCurArea = ScRange(); - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); NameModifyHdl( 0 ); } @@ -570,7 +570,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG ) { - USHORT nRemoveAt = 0; + sal_uInt16 nRemoveAt = 0; const String aStrEntry = aEdName.GetText(); if ( aLocalDbCol.SearchName( aStrEntry, nRemoveAt ) ) @@ -606,12 +606,12 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG ) aBtnRemove.Disable(); aEdAssign.SetText( EMPTY_STRING ); theCurArea = ScRange(); - aBtnHeader.Check( TRUE ); // Default: mit Spaltenkoepfen - aBtnDoSize.Check( FALSE ); - aBtnKeepFmt.Check( FALSE ); - aBtnStripData.Check( FALSE ); + aBtnHeader.Check( sal_True ); // Default: mit Spaltenkoepfen + aBtnDoSize.Check( sal_False ); + aBtnKeepFmt.Check( sal_False ); + aBtnStripData.Check( sal_False ); SetInfoStrings( NULL ); // leer - bSaved=FALSE; + bSaved=sal_False; pSaveObj->Restore(); NameModifyHdl( 0 ); } @@ -624,7 +624,7 @@ IMPL_LINK( ScDbNameDlg, RemoveBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) { String theName = aEdName.GetText(); - BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND + sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND != aEdName.GetEntryPos( theName )); if ( theName.Len() == 0 ) @@ -642,11 +642,11 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) aFTOperations.Disable(); aEdAssign .Disable(); aRbAssign .Disable(); - //bSaved=FALSE; + //bSaved=sal_False; //pSaveObj->Restore(); //@BugID 54702 Enablen/Disablen nur noch in Basisklasse - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg - bRefInputMode = FALSE; + //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg + bRefInputMode = sal_False; } else { @@ -657,7 +657,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) if(!bSaved) { - bSaved=TRUE; + bSaved=sal_True; pSaveObj->Save(); } UpdateDBData( theName ); @@ -667,7 +667,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) if ( aBtnAdd.GetText() != aStrAdd ) aBtnAdd.SetText( aStrAdd ); - bSaved=FALSE; + bSaved=sal_False; pSaveObj->Restore(); if ( aEdAssign.GetText().Len() > 0 ) @@ -699,7 +699,7 @@ IMPL_LINK( ScDbNameDlg, NameModifyHdl, void *, EMPTYARG ) //@BugID 54702 Enablen/Disablen nur noch in Basisklasse //SFX_APPWINDOW->Enable(); - bRefInputMode = TRUE; + bRefInputMode = sal_True; } return 0; } diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx index 4ac3fb8d68ad..420a3bc2005b 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.cxx +++ b/sc/source/ui/dbgui/dpgroupdlg.cxx @@ -242,21 +242,21 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent, { maLbUnits.SetHelpId( HID_SC_DPDATEGROUP_LB ); ResStringArray aArr( ScResId( STR_UNITS ) ); - for( USHORT nIdx = 0, nCount = sal::static_int_cast(aArr.Count()); nIdx < nCount; ++nIdx ) + for( sal_uInt16 nIdx = 0, nCount = sal::static_int_cast(aArr.Count()); nIdx < nCount; ++nIdx ) maLbUnits.InsertEntry( aArr.GetString( nIdx ) ); FreeResource(); - maEdStart.SetShowDateCentury( TRUE ); - maEdEnd.SetShowDateCentury( TRUE ); + maEdStart.SetShowDateCentury( sal_True ); + maEdEnd.SetShowDateCentury( sal_True ); maStartHelper.SetValue( rInfo.AutoStart, rInfo.Start ); maEndHelper.SetValue( rInfo.AutoEnd, rInfo.End ); if( nDatePart == 0 ) nDatePart = com::sun::star::sheet::DataPilotFieldGroupBy::MONTHS; - for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) - maLbUnits.CheckEntryPos( static_cast< USHORT >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 ); + for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) + maLbUnits.CheckEntryPos( static_cast< sal_uInt16 >( nIdx ), (nDatePart & spnDateParts[ nIdx ]) != 0 ); if( rInfo.DateValues ) { @@ -320,8 +320,8 @@ sal_Int32 ScDPDateGroupDlg::GetDatePart() const // return listbox contents for "units" mode sal_Int32 nDatePart = 0; - for( ULONG nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) - if( maLbUnits.IsChecked( static_cast< USHORT >( nIdx ) ) ) + for( sal_uLong nIdx = 0, nCount = maLbUnits.GetEntryCount(); nIdx < nCount; ++nIdx ) + if( maLbUnits.IsChecked( static_cast< sal_uInt16 >( nIdx ) ) ) nDatePart |= spnDateParts[ nIdx ]; return nDatePart; } diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index d4b477cd4b33..8016c20eff34 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -282,7 +282,7 @@ void ScDPFieldWindow::Redraw() Point aPos0; Size aSize( GetSizePixel() ); Font aFont( GetFont() ); // Font vom Window - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aVirDev.SetFont( aFont ); aVirDev.SetOutputSizePixel( aSize ); @@ -402,7 +402,7 @@ void ScDPFieldWindow::SetSelectionEnd() } } -void ScDPFieldWindow::MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY ) +void ScDPFieldWindow::MoveSelection( sal_uInt16 nKeyCode, SCsCOL nDX, SCsROW nDY ) { size_t nNewIndex = CalcNewFieldIndex( nDX, nDY ); if( (eType == TYPE_SELECT) && (nNewIndex == nFieldSelected) ) @@ -541,12 +541,12 @@ void __EXPORT ScDPFieldWindow::MouseMove( const MouseEvent& rMEvt ) void __EXPORT ScDPFieldWindow::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKeyCode = rKEvt.GetKeyCode(); - USHORT nCode = rKeyCode.GetCode(); - BOOL bKeyEvaluated = FALSE; + sal_uInt16 nCode = rKeyCode.GetCode(); + sal_Bool bKeyEvaluated = sal_False; if( rKeyCode.IsMod1() && (eType != TYPE_SELECT) ) { - bKeyEvaluated = TRUE; + bKeyEvaluated = sal_True; switch( nCode ) { case KEY_UP: MoveFieldRel( 0, -1 ); break; @@ -555,12 +555,12 @@ void __EXPORT ScDPFieldWindow::KeyInput( const KeyEvent& rKEvt ) case KEY_RIGHT: MoveFieldRel( 1, 0 ); break; case KEY_HOME: MoveField( 0 ); break; case KEY_END: MoveField( aFieldArr.size() - 1 ); break; - default: bKeyEvaluated = FALSE; + default: bKeyEvaluated = sal_False; } } else { - bKeyEvaluated = TRUE; + bKeyEvaluated = sal_True; switch( nCode ) { case KEY_UP: MoveSelection( nCode, 0, -1 ); break; @@ -571,7 +571,7 @@ void __EXPORT ScDPFieldWindow::KeyInput( const KeyEvent& rKEvt ) case KEY_END: SetSelectionEnd(); break; case KEY_DELETE: pDlg->NotifyRemoveField( eType, nFieldSelected ); break; - default: bKeyEvaluated = FALSE; + default: bKeyEvaluated = sal_False; } } @@ -586,7 +586,7 @@ void __EXPORT ScDPFieldWindow::GetFocus() if( GetGetFocusFlags() & GETFOCUS_MNEMONIC ) // move field on shortcut pDlg->NotifyMoveField( eType ); else // else change focus - pDlg->NotifyFieldFocus( eType, TRUE ); + pDlg->NotifyFieldFocus( eType, sal_True ); if (pAccessible) { @@ -602,7 +602,7 @@ void __EXPORT ScDPFieldWindow::LoseFocus() { Control::LoseFocus(); Redraw(); - pDlg->NotifyFieldFocus( eType, FALSE ); + pDlg->NotifyFieldFocus( eType, sal_False ); if (pAccessible) { @@ -695,7 +695,7 @@ const String& ScDPFieldWindow::GetFieldText( size_t nIndex ) const bool ScDPFieldWindow::AddField( const String& rText, const Point& rPos, size_t& rnIndex ) { if ( aFieldArr.size() == nFieldSize ) - return FALSE; + return sal_False; size_t nNewIndex = 0; if( GetFieldIndex( rPos, nNewIndex ) ) diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index b5dd2f3242c2..5b2b7b47fdd2 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -114,14 +114,14 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pDoc ( NULL ), nSrcTab ( 0 ), nFieldCount ( 0 ), - bRefInputMode ( FALSE ), + bRefInputMode ( sal_False ), pTimer ( NULL ) { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) pEntryLists[i] = NULL; for (SCSIZE i=0;i(rEntry.nField) ); if ( rEntry.nVal == SC_EMPTYFIELDS && !rEntry.bQueryByString && *rEntry.pStr == EMPTY_STRING ) { @@ -255,15 +255,15 @@ void __EXPORT ScFilterDlg::Init( const SfxItemSet& rArgSet ) nFieldSelPos = GetFieldSelPos( pViewData->GetCurX() ); rEntry.nField = nFieldSelPos ? (theQueryData.nCol1 + static_cast(nFieldSelPos) - 1) : static_cast(0); - rEntry.bDoQuery=TRUE; - bRefreshExceptQuery[i]=TRUE; + rEntry.bDoQuery=sal_True; + bRefreshExceptQuery[i]=sal_True; } aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); aValueEdArr[i]->SetText( aValStr ); aValueEdArr[i]->SetModifyHdl( LINK( this, ScFilterDlg, ValModifyHdl ) ); - UpdateValueList( static_cast(i+1) ); + UpdateValueList( static_cast(i+1) ); } aScrollBar.SetEndScrollHdl( LINK( this, ScFilterDlg, ScrollHdl ) ); @@ -276,17 +276,17 @@ void __EXPORT ScFilterDlg::Init( const SfxItemSet& rArgSet ) (aLbField1.GetSelectEntryPos() != 0) && (aLbField2.GetSelectEntryPos() != 0) - ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect ) + ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect ) : aLbConnect2.SetNoSelection(); (aLbField2.GetSelectEntryPos() != 0) && (aLbField3.GetSelectEntryPos() != 0) - ? aLbConnect3.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect ) + ? aLbConnect3.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect ) : aLbConnect3.SetNoSelection(); (aLbField3.GetSelectEntryPos() != 0) && (aLbField4.GetSelectEntryPos() != 0) - ? aLbConnect4.SelectEntryPos( (USHORT)theQueryData.GetEntry(3).eConnect ) + ? aLbConnect4.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(3).eConnect ) : aLbConnect4.SetNoSelection(); if ( aLbField1.GetSelectEntryPos() == 0 ) { @@ -332,15 +332,15 @@ void __EXPORT ScFilterDlg::Init( const SfxItemSet& rArgSet ) if(pDoc!=NULL && pDoc->GetChangeTrack()!=NULL) aBtnCopyResult.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 __EXPORT ScFilterDlg::Close() +sal_Bool __EXPORT ScFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); @@ -403,7 +403,7 @@ void ScFilterDlg::FillFieldLists() SCROW nFirstRow = theQueryData.nRow1; SCCOL nMaxCol = theQueryData.nCol2; SCCOL col = 0; - USHORT i=1; + sal_uInt16 i=1; for ( col=nFirstCol; col<=nMaxCol; col++ ) { @@ -427,13 +427,13 @@ void ScFilterDlg::FillFieldLists() //---------------------------------------------------------------------------- -void ScFilterDlg::UpdateValueList( USHORT nList ) +void ScFilterDlg::UpdateValueList( sal_uInt16 nList ) { if ( pDoc && nList>0 && nList<=4 ) { ComboBox* pValList = aValueEdArr[nList-1]; - USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); - USHORT nListPos = 0; + sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); + sal_uInt16 nListPos = 0; String aCurValue = pValList->GetText(); pValList->Clear(); @@ -448,7 +448,7 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) SCCOL nColumn = theQueryData.nCol1 + static_cast(nFieldSelPos) - 1; if (!pEntryLists[nColumn]) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); SCTAB nTab = nSrcTab; SCROW nFirstRow = theQueryData.nRow1; SCROW nLastRow = theQueryData.nRow2; @@ -485,10 +485,10 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) } TypedScStrCollection* pColl = pEntryLists[nColumn]; - USHORT nValueCount = pColl->GetCount(); + sal_uInt16 nValueCount = pColl->GetCount(); if ( nValueCount > 0 ) { - for ( USHORT i=0; iInsertEntry( (*pColl)[i]->GetString(), nListPos ); nListPos++; @@ -501,30 +501,30 @@ void ScFilterDlg::UpdateValueList( USHORT nList ) UpdateHdrInValueList( nList ); } -void ScFilterDlg::UpdateHdrInValueList( USHORT nList ) +void ScFilterDlg::UpdateHdrInValueList( sal_uInt16 nList ) { //! GetText / SetText ?? if ( pDoc && nList>0 && nList<=4 ) { - USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); + sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); if ( nFieldSelPos ) { SCCOL nColumn = theQueryData.nCol1 + static_cast(nFieldSelPos) - 1; if ( pEntryLists[nColumn] ) { - USHORT nPos = nHeaderPos[nColumn]; + sal_uInt16 nPos = nHeaderPos[nColumn]; if ( nPos != USHRT_MAX ) { ComboBox* pValList = aValueEdArr[nList-1]; - USHORT nListPos = nPos + 2; // nach "leer" und "nicht leer" + sal_uInt16 nListPos = nPos + 2; // nach "leer" und "nicht leer" TypedStrData* pHdrEntry = (*pEntryLists[nColumn])[nPos]; if ( pHdrEntry ) { String aHdrStr = pHdrEntry->GetString(); - BOOL bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr ); - BOOL bInclude = !aBtnHeader.IsChecked(); + sal_Bool bWasThere = ( pValList->GetEntry(nListPos) == aHdrStr ); + sal_Bool bInclude = !aBtnHeader.IsChecked(); if (bInclude) // Eintrag aufnehmen { @@ -553,7 +553,7 @@ void ScFilterDlg::UpdateHdrInValueList( USHORT nList ) //---------------------------------------------------------------------------- -void ScFilterDlg::ClearValueList( USHORT nList ) +void ScFilterDlg::ClearValueList( sal_uInt16 nList ) { if ( nList>0 && nList<=4 ) { @@ -568,10 +568,10 @@ void ScFilterDlg::ClearValueList( USHORT nList ) //---------------------------------------------------------------------------- -USHORT ScFilterDlg::GetFieldSelPos( SCCOL nField ) +sal_uInt16 ScFilterDlg::GetFieldSelPos( SCCOL nField ) { if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 ) - return static_cast(nField - theQueryData.nCol1 + 1); + return static_cast(nField - theQueryData.nCol1 + 1); else return 0; } @@ -582,7 +582,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem() { ScAddress theCopyPos; ScQueryParam theParam( theQueryData ); - BOOL bCopyPosOk = FALSE; + sal_Bool bCopyPosOk = sal_False; if ( aBtnCopyResult.IsChecked() ) { @@ -592,27 +592,27 @@ ScQueryItem* ScFilterDlg::GetOutputItem() if ( STRING_NOTFOUND != nColonPos ) theCopyStr.Erase( nColonPos ); - USHORT nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = theCopyPos.Parse( theCopyStr, pDoc, pDoc->GetAddressConvention() ); bCopyPosOk = ( SCA_VALID == (nResult & SCA_VALID) ); } if ( aBtnCopyResult.IsChecked() && bCopyPosOk ) { - theParam.bInplace = FALSE; + theParam.bInplace = sal_False; theParam.nDestTab = theCopyPos.Tab(); theParam.nDestCol = theCopyPos.Col(); theParam.nDestRow = theCopyPos.Row(); } else { - theParam.bInplace = TRUE; + theParam.bInplace = sal_True; theParam.nDestTab = 0; theParam.nDestCol = 0; theParam.nDestRow = 0; } theParam.bHasHeader = aBtnHeader.IsChecked(); - theParam.bByRow = TRUE; + theParam.bByRow = sal_True; theParam.bDuplicate = !aBtnUnique.IsChecked(); theParam.bCaseSens = aBtnCase.IsChecked(); theParam.bRegExp = aBtnRegExp.IsChecked(); @@ -629,7 +629,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem() //---------------------------------------------------------------------------- -BOOL ScFilterDlg::IsRefInputMode() const +sal_Bool ScFilterDlg::IsRefInputMode() const { return bRefInputMode; } @@ -643,24 +643,24 @@ IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn ) { if ( pBtn == &aBtnOk ) { - BOOL bAreaInputOk = TRUE; + sal_Bool bAreaInputOk = sal_True; if ( aBtnCopyResult.IsChecked() ) { if ( !pOptionsMgr->VerifyPosStr( aEdCopyArea.GetText() ) ) { if ( !aBtnMore.GetState() ) - aBtnMore.SetState( TRUE ); + aBtnMore.SetState( sal_True ); ERRORBOX( STR_INVALID_TABREF ); aEdCopyArea.GrabFocus(); - bAreaInputOk = FALSE; + bAreaInputOk = sal_False; } } if ( bAreaInputOk ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -686,9 +686,9 @@ IMPL_LINK( ScFilterDlg, MoreClickHdl, MoreButton*, EMPTYARG ) else { pTimer->Stop(); - bRefInputMode = FALSE; + bRefInputMode = sal_False; //@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 } return 0; } @@ -718,7 +718,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) * Behandlung der Enable/Disable-Logik, * abhaengig davon, welche ListBox angefasst wurde: */ - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); if ( pLb == &aLbConnect1 ) { @@ -726,10 +726,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond1.Enable(); aEdVal1.Enable(); - USHORT nConnect1 = aLbConnect1.GetSelectEntryPos(); - USHORT nQE = nOffset; + sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos(); + sal_uInt16 nQE = nOffset; theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect1; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbConnect2 ) @@ -738,10 +738,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond2.Enable(); aEdVal2.Enable(); - USHORT nConnect2 = aLbConnect2.GetSelectEntryPos(); - USHORT nQE = 1+nOffset; + sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos(); + sal_uInt16 nQE = 1+nOffset; theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect2; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbConnect3 ) { @@ -749,10 +749,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond3.Enable(); aEdVal3.Enable(); - USHORT nConnect3 = aLbConnect3.GetSelectEntryPos(); - USHORT nQE = 2+nOffset; + sal_uInt16 nConnect3 = aLbConnect3.GetSelectEntryPos(); + sal_uInt16 nQE = 2+nOffset; theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect3; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbConnect4 ) @@ -761,10 +761,10 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond4.Enable(); aEdVal4.Enable(); - USHORT nConnect4 = aLbConnect4.GetSelectEntryPos(); - USHORT nQE = 3+nOffset; + sal_uInt16 nConnect4 = aLbConnect4.GetSelectEntryPos(); + sal_uInt16 nQE = 3+nOffset; theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect4; - bRefreshExceptQuery[nQE]=TRUE; + bRefreshExceptQuery[nQE]=sal_True; } else if ( pLb == &aLbField1 ) @@ -797,13 +797,13 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aEdVal2.Disable(); aEdVal3.Disable(); aEdVal4.Disable(); - for (USHORT i= nOffset; i< MAXQUERY; i++) + for (sal_uInt16 i= nOffset; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nOffset] =TRUE; + bRefreshExceptQuery[nOffset] =sal_True; } else { @@ -812,8 +812,8 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) { aLbConnect2.Enable(); } - theQueryData.GetEntry(nOffset).bDoQuery = TRUE; - USHORT nField = pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nOffset).bDoQuery = sal_True; + sal_uInt16 nField = pLb->GetSelectEntryPos(); theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } } @@ -840,14 +840,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aEdVal3.Disable(); aEdVal4.Disable(); - USHORT nTemp=nOffset+1; - for (USHORT i= nTemp; i< MAXQUERY; i++) + sal_uInt16 nTemp=nOffset+1; + for (sal_uInt16 i= nTemp; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { @@ -856,9 +856,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) { aLbConnect3.Enable(); } - USHORT nField = pLb->GetSelectEntryPos(); - USHORT nQ=1+nOffset; - theQueryData.GetEntry(nQ).bDoQuery = TRUE; + sal_uInt16 nField = pLb->GetSelectEntryPos(); + sal_uInt16 nQ=1+nOffset; + theQueryData.GetEntry(nQ).bDoQuery = sal_True; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } } @@ -877,14 +877,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbCond4.Disable(); aEdVal4.Disable(); - USHORT nTemp=nOffset+2; - for (USHORT i= nTemp; i< MAXQUERY; i++) + sal_uInt16 nTemp=nOffset+2; + for (sal_uInt16 i= nTemp; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { @@ -894,9 +894,9 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) aLbConnect4.Enable(); } - USHORT nField = pLb->GetSelectEntryPos(); - USHORT nQ=2+nOffset; - theQueryData.GetEntry(nQ).bDoQuery = TRUE; + sal_uInt16 nField = pLb->GetSelectEntryPos(); + sal_uInt16 nQ=2+nOffset; + theQueryData.GetEntry(nQ).bDoQuery = sal_True; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } @@ -906,21 +906,21 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) if ( aLbField4.GetSelectEntryPos() == 0 ) { ClearValueList( 4 ); - USHORT nTemp=nOffset+3; - for (USHORT i= nTemp; i< MAXQUERY; i++) + sal_uInt16 nTemp=nOffset+3; + for (sal_uInt16 i= nTemp; i< MAXQUERY; i++) { - theQueryData.GetEntry(i).bDoQuery = FALSE; - bRefreshExceptQuery[i]=FALSE; + theQueryData.GetEntry(i).bDoQuery = sal_False; + bRefreshExceptQuery[i]=sal_False; theQueryData.GetEntry(i).nField = static_cast(0); } - bRefreshExceptQuery[nTemp]=TRUE; + bRefreshExceptQuery[nTemp]=sal_True; } else { UpdateValueList( 4 ); - USHORT nField = pLb->GetSelectEntryPos(); - USHORT nQ=3+nOffset; - theQueryData.GetEntry(nQ).bDoQuery = TRUE; + sal_uInt16 nField = pLb->GetSelectEntryPos(); + sal_uInt16 nQ=3+nOffset; + theQueryData.GetEntry(nQ).bDoQuery = sal_True; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } @@ -931,17 +931,17 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) } else if ( pLb == &aLbCond2) { - USHORT nQ=1+nOffset; + sal_uInt16 nQ=1+nOffset; theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); } else if ( pLb == &aLbCond3) { - USHORT nQ=2+nOffset; + sal_uInt16 nQ=2+nOffset; theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); } else { - USHORT nQ=3+nOffset; + sal_uInt16 nQ=3+nOffset; theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); } @@ -961,10 +961,10 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) if ( pBox == &aBtnHeader ) // Feldlisten und Wertlisten { - USHORT nCurSel1 = aLbField1.GetSelectEntryPos(); - USHORT nCurSel2 = aLbField2.GetSelectEntryPos(); - USHORT nCurSel3 = aLbField3.GetSelectEntryPos(); - USHORT nCurSel4 = aLbField4.GetSelectEntryPos(); + sal_uInt16 nCurSel1 = aLbField1.GetSelectEntryPos(); + sal_uInt16 nCurSel2 = aLbField2.GetSelectEntryPos(); + sal_uInt16 nCurSel3 = aLbField3.GetSelectEntryPos(); + sal_uInt16 nCurSel4 = aLbField4.GetSelectEntryPos(); FillFieldLists(); aLbField1.SelectEntryPos( nCurSel1 ); aLbField2.SelectEntryPos( nCurSel2 ); @@ -979,7 +979,7 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) if ( pBox == &aBtnCase ) // Wertlisten komplett { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) DELETEZ( pEntryLists[i] ); UpdateValueList( 1 ); // aktueller Text wird gemerkt @@ -996,9 +996,9 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) { - USHORT nOffset = GetSliderPos(); - USHORT i=0; - USHORT nQE =i + nOffset; + sal_uInt16 nOffset = GetSliderPos(); + sal_uInt16 i=0; + sal_uInt16 nQE =i + nOffset; if ( pEd ) { String aStrVal = pEd->GetText(); @@ -1035,7 +1035,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) pLbCond->Enable(); ScQueryEntry& rEntry = theQueryData.GetEntry( nQE ); - BOOL bDoThis = (pLbField->GetSelectEntryPos() != 0); + sal_Bool bDoThis = (pLbField->GetSelectEntryPos() != 0); rEntry.bDoQuery = bDoThis; if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] ) @@ -1044,22 +1044,22 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) { rEntry.pStr->Erase(); rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else if ( aStrVal == aStrNotEmpty ) { rEntry.pStr->Erase(); rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else { *rEntry.pStr = aStrVal; rEntry.nVal = 0; - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; } - USHORT nField = pLbField->GetSelectEntryPos(); + sal_uInt16 nField = pLbField->GetSelectEntryPos(); rEntry.nField = nField ? (theQueryData.nCol1 + static_cast(nField) - 1) : static_cast(0); @@ -1081,31 +1081,31 @@ IMPL_LINK( ScFilterDlg, ScrollHdl, ScrollBar*, EMPTYARG ) void ScFilterDlg::SliderMoved() { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); RefreshEditRow( nOffset); } -USHORT ScFilterDlg::GetSliderPos() +sal_uInt16 ScFilterDlg::GetSliderPos() { - return (USHORT) aScrollBar.GetThumbPos(); + return (sal_uInt16) aScrollBar.GetThumbPos(); } -void ScFilterDlg::RefreshEditRow( USHORT nOffset ) +void ScFilterDlg::RefreshEditRow( sal_uInt16 nOffset ) { if (nOffset==0) aConnLbArr[0]->Hide(); else aConnLbArr[0]->Show(); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) { String aValStr; - USHORT nCondPos = 0; - USHORT nFieldSelPos = 0; - USHORT nQE = i+nOffset; + sal_uInt16 nCondPos = 0; + sal_uInt16 nFieldSelPos = 0; + sal_uInt16 nQE = i+nOffset; ScQueryEntry& rEntry = theQueryData.GetEntry( nQE); if ( rEntry.bDoQuery || bRefreshExceptQuery[nQE] ) { - nCondPos = (USHORT)rEntry.eOp; + nCondPos = (sal_uInt16)rEntry.eOp; if(rEntry.bDoQuery) nFieldSelPos = GetFieldSelPos( static_cast(rEntry.nField) ); @@ -1135,9 +1135,9 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aConnLbArr[i+1]->Enable(); else aConnLbArr[i+1]->Disable(); - USHORT nQENext = nQE+1; + sal_uInt16 nQENext = nQE+1; if(theQueryData.GetEntry(nQENext).bDoQuery || bRefreshExceptQuery[nQENext]) - aConnLbArr[i+1]->SelectEntryPos( (USHORT) theQueryData.GetEntry(nQENext).eConnect ); + aConnLbArr[i+1]->SelectEntryPos( (sal_uInt16) theQueryData.GetEntry(nQENext).eConnect ); else aConnLbArr[i+1]->SetNoSelection(); } @@ -1150,7 +1150,7 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aConnLbArr[i]->Disable(); if(rEntry.bDoQuery || bRefreshExceptQuery[nQE]) - aConnLbArr[i]->SelectEntryPos( (USHORT) rEntry.eConnect ); + aConnLbArr[i]->SelectEntryPos( (sal_uInt16) rEntry.eConnect ); else aConnLbArr[i]->SetNoSelection(); } @@ -1181,6 +1181,6 @@ void ScFilterDlg::RefreshEditRow( USHORT nOffset ) aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); aValueEdArr[i]->SetText( aValStr ); - UpdateValueList( static_cast(i+1) ); + UpdateValueList( static_cast(i+1) ); } } diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 1e274690c31c..8028158cef88 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -98,8 +98,8 @@ ScFilterOptionsMgr::ScFilterOptionsMgr( ScFilterOptionsMgr::~ScFilterOptionsMgr() { - USHORT nEntries = rLbCopyPos.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = rLbCopyPos.GetEntryCount(); + sal_uInt16 i; for ( i=2; iGetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() ); return ( SCA_VALID == (nResult & SCA_VALID) ); } @@ -263,7 +263,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbPosSelHdl, ListBox*, pLb ) if ( pLb == &rLbCopyPos ) { String aString; - USHORT nSelPos = rLbCopyPos.GetSelectEntryPos(); + sal_uInt16 nSelPos = rLbCopyPos.GetSelectEntryPos(); if ( nSelPos > 0 ) aString = *(String*)rLbCopyPos.GetEntryData( nSelPos ); @@ -282,14 +282,14 @@ IMPL_LINK( ScFilterOptionsMgr, EdPosModifyHdl, Edit*, pEd ) if ( pEd == &rEdCopyPos ) { String theCurPosStr = pEd->GetText(); - USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = rLbCopyPos.GetEntryCount(); + sal_Bool bFound = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = rLbCopyPos.GetEntryCount(); for ( i=2; i= 3 ) { String aToken( rStr.GetToken( 0, ',' ) ); if( aToken.EqualsIgnoreCaseAscii( pStrFix ) ) - bFixedWidth = TRUE; + bFixedWidth = sal_True; else nFieldSepCode = (sal_Unicode) aToken.ToInt32(); nTextSepCode = (sal_Unicode) rStr.GetToken(1,',').ToInt32(); aStrFont = rStr.GetToken(2,','); eCharSet = ScGlobal::GetCharsetValue(aStrFont); - bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? TRUE : FALSE); + bSaveAsShown = (rStr.GetToken( 3, ',' ).ToInt32() ? sal_True : sal_False); } } diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index d590ffb83457..d08d13fcb001 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -105,7 +105,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent, nSrcTab ( nSourceTab ), // ist nicht im QueryParam nFieldCount ( 0 ) { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) pEntryLists[i] = NULL; Init( rArgSet ); @@ -116,7 +116,7 @@ ScPivotFilterDlg::ScPivotFilterDlg( Window* pParent, __EXPORT ScPivotFilterDlg::~ScPivotFilterDlg() { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) delete pEntryLists[i]; if ( pOutItem ) @@ -222,12 +222,12 @@ 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(rEntry.nField) ); + sal_uInt16 nCondPos = (sal_uInt16)rEntry.eOp; + sal_uInt16 nFieldSelPos = GetFieldSelPos( static_cast(rEntry.nField) ); aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); - UpdateValueList( static_cast(i+1) ); + UpdateValueList( static_cast(i+1) ); aValueEdArr[i]->SetText( aValStr ); if (aValStr == aStrEmpty || aValStr == aStrNotEmpty) aCondLbArr[i]->Disable(); @@ -236,7 +236,7 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) { aFieldLbArr[i]->SelectEntryPos( 0 ); // "keiner" selektieren aCondLbArr [i]->SelectEntryPos( 0 ); // "=" selektieren - UpdateValueList( static_cast(i) ); + UpdateValueList( static_cast(i) ); aValueEdArr[i]->SetText( EMPTY_STRING ); } aValueEdArr[i]->SetModifyHdl( LINK( this, ScPivotFilterDlg, ValModifyHdl ) ); @@ -246,12 +246,12 @@ void __EXPORT ScPivotFilterDlg::Init( const SfxItemSet& rArgSet ) (aLbField1.GetSelectEntryPos() != 0) && (aLbField2.GetSelectEntryPos() != 0) - ? aLbConnect1.SelectEntryPos( (USHORT)theQueryData.GetEntry(1).eConnect ) + ? aLbConnect1.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(1).eConnect ) : aLbConnect1.SetNoSelection(); (aLbField2.GetSelectEntryPos() != 0) && (aLbField3.GetSelectEntryPos() != 0) - ? aLbConnect2.SelectEntryPos( (USHORT)theQueryData.GetEntry(2).eConnect ) + ? aLbConnect2.SelectEntryPos( (sal_uInt16)theQueryData.GetEntry(2).eConnect ) : aLbConnect2.SetNoSelection(); if ( aLbField1.GetSelectEntryPos() == 0 ) @@ -302,7 +302,7 @@ void ScPivotFilterDlg::FillFieldLists() SCROW nFirstRow = theQueryData.nRow1; SCCOL nMaxCol = theQueryData.nCol2; SCCOL col = 0; - USHORT i=1; + sal_uInt16 i=1; for ( col=nFirstCol; col<=nMaxCol; col++ ) { @@ -324,13 +324,13 @@ void ScPivotFilterDlg::FillFieldLists() //------------------------------------------------------------------------ -void ScPivotFilterDlg::UpdateValueList( USHORT nList ) +void ScPivotFilterDlg::UpdateValueList( sal_uInt16 nList ) { if ( pDoc && nList>0 && nList<=3 ) { ComboBox* pValList = aValueEdArr[nList-1]; - USHORT nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); - USHORT nListPos = 0; + sal_uInt16 nFieldSelPos = aFieldLbArr[nList-1]->GetSelectEntryPos(); + sal_uInt16 nListPos = 0; String aCurValue = pValList->GetText(); pValList->Clear(); @@ -358,10 +358,10 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList ) } TypedScStrCollection* pColl = pEntryLists[nColumn]; - USHORT nValueCount = pColl->GetCount(); + sal_uInt16 nValueCount = pColl->GetCount(); if ( nValueCount > 0 ) { - for ( USHORT i=0; iInsertEntry( (*pColl)[i]->GetString(), nListPos ); nListPos++; @@ -374,7 +374,7 @@ void ScPivotFilterDlg::UpdateValueList( USHORT nList ) //------------------------------------------------------------------------ -void ScPivotFilterDlg::ClearValueList( USHORT nList ) +void ScPivotFilterDlg::ClearValueList( sal_uInt16 nList ) { if ( nList>0 && nList<=3 ) { @@ -388,10 +388,10 @@ void ScPivotFilterDlg::ClearValueList( USHORT nList ) //------------------------------------------------------------------------ -USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField ) +sal_uInt16 ScPivotFilterDlg::GetFieldSelPos( SCCOL nField ) { if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 ) - return static_cast(nField - theQueryData.nCol1 + 1); + return static_cast(nField - theQueryData.nCol1 + 1); else return 0; } @@ -401,15 +401,15 @@ USHORT ScPivotFilterDlg::GetFieldSelPos( SCCOL nField ) const ScQueryItem& ScPivotFilterDlg::GetOutputItem() { ScQueryParam theParam( theQueryData ); - USHORT nConnect1 = aLbConnect1.GetSelectEntryPos(); - USHORT nConnect2 = aLbConnect2.GetSelectEntryPos(); + sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos(); + sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos(); for ( SCSIZE i=0; i<3; i++ ) { - USHORT nField = aFieldLbArr[i]->GetSelectEntryPos(); + sal_uInt16 nField = aFieldLbArr[i]->GetSelectEntryPos(); ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos(); - BOOL bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0); + sal_Bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0); theParam.GetEntry(i).bDoQuery = bDoThis; if ( bDoThis ) @@ -427,19 +427,19 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() { *rEntry.pStr = EMPTY_STRING; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else if ( aStrVal == aStrNotEmpty ) { *rEntry.pStr = EMPTY_STRING; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; } else { *rEntry.pStr = aStrVal; rEntry.nVal = 0; - rEntry.bQueryByString = TRUE; + rEntry.bQueryByString = sal_True; } rEntry.nField = nField ? (theQueryData.nCol1 + @@ -455,7 +455,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() ? (ScQueryConnect)nConnect2 : SC_AND; - theParam.bInplace = FALSE; + theParam.bInplace = sal_False; theParam.nDestTab = 0; // Woher kommen diese Werte? theParam.nDestCol = 0; theParam.nDestRow = 0; @@ -573,7 +573,7 @@ IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox ) if ( pBox == &aBtnCase ) // Wertlisten { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) DELETEZ( pEntryLists[i] ); String aCurVal1 = aEdVal1.GetText(); diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index b5a19ef0ec9b..794e7361338e 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -69,7 +69,7 @@ namespace { @return true = The passed string list contains an empty string entry. */ template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; if( const OUString* pStr = rStrings.getConstArray() ) @@ -89,7 +89,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, U } template< typename ListBoxType > -bool lclFillListBox( ListBoxType& rLBox, const vector& rMembers, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const vector& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; vector::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end(); @@ -108,16 +108,16 @@ bool lclFillListBox( ListBoxType& rLBox, const vector& rM } /** Searches for a listbox entry, starts search at specified position. */ -USHORT lclFindListBoxEntry( const ListBox& rLBox, const String& rEntry, USHORT nStartPos ) +sal_uInt16 lclFindListBoxEntry( const ListBox& rLBox, const String& rEntry, sal_uInt16 nStartPos ) { - USHORT nPos = nStartPos; + sal_uInt16 nPos = nStartPos; while( (nPos < rLBox.GetEntryCount()) && (rLBox.GetEntry( nPos ) != rEntry) ) ++nPos; return (nPos < rLBox.GetEntryCount()) ? nPos : LISTBOX_ENTRY_NOTFOUND; } /** This table represents the order of the strings in the resource string array. */ -static const USHORT spnFunctions[] = +static const sal_uInt16 spnFunctions[] = { PIVOT_FUNC_SUM, PIVOT_FUNC_COUNT, @@ -132,12 +132,12 @@ static const USHORT spnFunctions[] = PIVOT_FUNC_STD_VARP }; -const USHORT SC_BASEITEM_PREV_POS = 0; -const USHORT SC_BASEITEM_NEXT_POS = 1; -const USHORT SC_BASEITEM_USER_POS = 2; +const sal_uInt16 SC_BASEITEM_PREV_POS = 0; +const sal_uInt16 SC_BASEITEM_NEXT_POS = 1; +const sal_uInt16 SC_BASEITEM_USER_POS = 2; -const USHORT SC_SORTNAME_POS = 0; -const USHORT SC_SORTDATA_POS = 1; +const sal_uInt16 SC_SORTNAME_POS = 0; +const sal_uInt16 SC_SORTDATA_POS = 1; const long SC_SHOW_DEFAULT = 10; @@ -180,19 +180,19 @@ ScDPFunctionListBox::ScDPFunctionListBox( Window* pParent, const ResId& rResId ) FillFunctionNames(); } -void ScDPFunctionListBox::SetSelection( USHORT nFuncMask ) +void ScDPFunctionListBox::SetSelection( sal_uInt16 nFuncMask ) { if( (nFuncMask == PIVOT_FUNC_NONE) || (nFuncMask == PIVOT_FUNC_AUTO) ) SetNoSelection(); else - for( USHORT nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) + for( sal_uInt16 nEntry = 0, nCount = GetEntryCount(); nEntry < nCount; ++nEntry ) SelectEntryPos( nEntry, (nFuncMask & spnFunctions[ nEntry ]) != 0 ); } -USHORT ScDPFunctionListBox::GetSelection() const +sal_uInt16 ScDPFunctionListBox::GetSelection() const { - USHORT nFuncMask = PIVOT_FUNC_NONE; - for( USHORT nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) + sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; + for( sal_uInt16 nSel = 0, nCount = GetSelectEntryCount(); nSel < nCount; ++nSel ) nFuncMask |= spnFunctions[ GetSelectEntryPos( nSel ) ]; return nFuncMask; } @@ -202,7 +202,7 @@ void ScDPFunctionListBox::FillFunctionNames() DBG_ASSERT( !GetEntryCount(), "ScDPFunctionListBox::FillFunctionNames - do not add texts to resource" ); Clear(); ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) ); - for( USHORT nIndex = 0, nCount = sal::static_int_cast(aArr.Count()); nIndex < nCount; ++nIndex ) + for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast(aArr.Count()); nIndex < nCount; ++nIndex ) InsertEntry( aArr.GetString( nIndex ) ); } @@ -235,7 +235,7 @@ ScDPFunctionDlg::ScDPFunctionDlg( Init( rLabelData, rFuncData ); } -USHORT ScDPFunctionDlg::GetFuncMask() const +sal_uInt16 ScDPFunctionDlg::GetFuncMask() const { return maLbFunc.GetSelection(); } @@ -247,7 +247,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const aRef.ReferenceType = maLbTypeWrp.GetControlValue(); aRef.ReferenceField = maLbBaseField.GetSelectEntry(); - USHORT nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); + sal_uInt16 nBaseItemPos = maLbBaseItem.GetSelectEntryPos(); switch( nBaseItemPos ) { case SC_BASEITEM_PREV_POS: @@ -270,7 +270,7 @@ DataPilotFieldReference ScDPFunctionDlg::GetFieldRef() const void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ) { // list box - USHORT nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask; + sal_uInt16 nFuncMask = (rFuncData.mnFuncMask == PIVOT_FUNC_NONE) ? PIVOT_FUNC_SUM : rFuncData.mnFuncMask; maLbFunc.SetSelection( nFuncMask ); // field name @@ -325,8 +325,8 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScDPFuncData& } else { - USHORT nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; - USHORT nPos = lclFindListBoxEntry( maLbBaseItem, rFuncData.maFieldRef.ReferenceItemName, nStartPos ); + sal_uInt16 nStartPos = mbEmptyItem ? (SC_BASEITEM_USER_POS + 1) : SC_BASEITEM_USER_POS; + sal_uInt16 nPos = lclFindListBoxEntry( maLbBaseItem, rFuncData.maFieldRef.ReferenceItemName, nStartPos ); if( nPos >= maLbBaseItem.GetEntryCount() ) nPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; maLbBaseItem.SelectEntryPos( nPos ); @@ -378,7 +378,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) mbEmptyItem = lclFillListBox( maLbBaseItem, mrLabelVec[ nBasePos ].maMembers, SC_BASEITEM_USER_POS ); // select base item - USHORT nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; + sal_uInt16 nItemPos = (maLbBaseItem.GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; maLbBaseItem.SelectEntryPos( nItemPos ); } return 0; @@ -417,9 +417,9 @@ ScDPSubtotalDlg::ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj, Init( rLabelData, rFuncData ); } -USHORT ScDPSubtotalDlg::GetFuncMask() const +sal_uInt16 ScDPSubtotalDlg::GetFuncMask() const { - USHORT nFuncMask = PIVOT_FUNC_NONE; + sal_uInt16 nFuncMask = PIVOT_FUNC_NONE; if( maRbAuto.IsChecked() ) nFuncMask = PIVOT_FUNC_AUTO; @@ -565,8 +565,8 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const // *** HIDDEN ITEMS *** rLabelData.maMembers = maLabelData.maMembers; - ULONG nVisCount = maLbHide.GetEntryCount(); - for( USHORT nPos = 0; nPos < nVisCount; ++nPos ) + sal_uLong nVisCount = maLbHide.GetEntryCount(); + for( sal_uInt16 nPos = 0; nPos < nVisCount; ++nPos ) rLabelData.maMembers[nPos].mbVisible = !maLbHide.IsChecked(nPos); // *** HIERARCHY *** @@ -591,7 +591,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou if( maLbSortBy.GetEntryCount() > SC_SORTDATA_POS ) maLbSortBy.SetSeparatorPos( SC_SORTDATA_POS - 1 ); - USHORT nSortPos = SC_SORTNAME_POS; + sal_uInt16 nSortPos = SC_SORTNAME_POS; if( nSortMode == DataPilotFieldSortMode::DATA ) { nSortPos = lclFindListBoxEntry( maLbSortBy, maLabelData.maSortInfo.Field, SC_SORTDATA_POS ); @@ -661,7 +661,7 @@ void ScDPSubtotalOptDlg::Init( const ScDPNameVec& rDataFields, bool bEnableLayou lclFillListBox( maLbHierarchy, maLabelData.maHiers ); sal_Int32 nHier = maLabelData.mnUsedHier; if( (nHier < 0) || (nHier >= maLabelData.maHiers.getLength()) ) nHier = 0; - maLbHierarchy.SelectEntryPos( static_cast< USHORT >( nHier ) ); + maLbHierarchy.SelectEntryPos( static_cast< sal_uInt16 >( nHier ) ); maLbHierarchy.SetSelectHdl( LINK( this, ScDPSubtotalOptDlg, SelectHdl ) ); } else @@ -677,7 +677,7 @@ void ScDPSubtotalOptDlg::InitHideListBox() lclFillListBox( maLbHide, maLabelData.maMembers ); size_t n = maLabelData.maMembers.size(); for (size_t i = 0; i < n; ++i) - maLbHide.CheckEntryPos(static_cast(i), !maLabelData.maMembers[i].mbVisible); + maLbHide.CheckEntryPos(static_cast(i), !maLabelData.maMembers[i].mbVisible); bool bEnable = maLbHide.GetEntryCount() > 0; maFlHide.Enable( bEnable ); maLbHide.Enable( bEnable ); @@ -718,7 +718,7 @@ IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox ) // ============================================================================ -ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient ) : +ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DPSHOWDETAIL ) ), maFtDims ( this, ScResId( FT_DIMS ) ), maLbDims ( this, ScResId( LB_DIMS ) ), @@ -734,7 +734,7 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR long nDimCount = rDPObj.GetDimCount(); for (long nDim=0; nDimsecond; - BOOL bIsDataLayout = false; + sal_Bool bIsDataLayout = false; return mrDPObj.GetDimName(nDim, bIsDataLayout); } diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 56d7e3550cda..10134e696571 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -147,7 +147,7 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), aStrNewTable ( ScResId( SCSTR_NEWTABLE ) ), - bIsDrag ( FALSE ), + bIsDrag ( sal_False ), pEditActive ( NULL ), @@ -159,10 +159,10 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar GetViewData() ), pDoc ( ((ScTabViewShell*)SfxViewShell::Current())-> GetViewData()->GetDocument() ), - bRefInputMode ( FALSE ) + bRefInputMode ( sal_False ) { - xDlgDPObject->SetAlive( TRUE ); // needed to get structure information - xDlgDPObject->FillOldParam( thePivotData, FALSE ); + xDlgDPObject->SetAlive( sal_True ); // needed to get structure information + xDlgDPObject->FillOldParam( thePivotData, sal_False ); xDlgDPObject->FillLabelData( thePivotData ); Init(); @@ -174,8 +174,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pPar ScDPLayoutDlg::~ScDPLayoutDlg() { - USHORT nEntries = aLbOutPos.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = aLbOutPos.GetEntryCount(); + sal_uInt16 i; for ( i=2; iGetAddressConvention() ); aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) ); @@ -340,16 +340,16 @@ void __EXPORT ScDPLayoutDlg::Init() InitFocus(); -// SetDispatcherLock( TRUE ); // Modal-Modus einschalten +// SetDispatcherLock( sal_True ); // Modal-Modus einschalten //@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 __EXPORT ScDPLayoutDlg::Close() +sal_Bool __EXPORT ScDPLayoutDlg::Close() { return DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); } @@ -407,7 +407,7 @@ void ScDPLayoutDlg::InitWnd( PivotField* pArr, long nCount, ScDPFieldType eType { ScDPFuncDataVec* pInitArr = NULL; ScDPFieldWindow* pInitWnd = NULL; - BOOL bDataArr = FALSE; + sal_Bool bDataArr = sal_False; switch ( eType ) { @@ -429,7 +429,7 @@ void ScDPLayoutDlg::InitWnd( PivotField* pArr, long nCount, ScDPFieldType eType case TYPE_DATA: pInitArr = &aDataArr; pInitWnd = &aWndData; - bDataArr = TRUE; + bDataArr = sal_True; break; default: break; @@ -441,7 +441,7 @@ void ScDPLayoutDlg::InitWnd( PivotField* pArr, long nCount, ScDPFieldType eType for ( long i=0; (isize()) && ((*pArr)[i].get() != NULL) && !bFound ) @@ -1259,14 +1259,14 @@ bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType ) case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break; case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break; } - bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags ); + bAllowed = ScDPObject::IsOrientationAllowed( (sal_uInt16)eOrient, pData->mnFlags ); } return bAllowed; } //---------------------------------------------------------------------------- -String ScDPLayoutDlg::GetFuncString( USHORT& rFuncMask, BOOL bIsValue ) +String ScDPLayoutDlg::GetFuncString( sal_uInt16& rFuncMask, sal_Bool bIsValue ) { String aStr; @@ -1352,17 +1352,17 @@ void ScDPLayoutDlg::CalcWndSizes() //---------------------------------------------------------------------------- -BOOL ScDPLayoutDlg::GetPivotArrays( PivotField* pPageArr, +sal_Bool ScDPLayoutDlg::GetPivotArrays( PivotField* pPageArr, PivotField* pColArr, PivotField* pRowArr, PivotField* pDataArr, - USHORT& rPageCount, - USHORT& rColCount, - USHORT& rRowCount, - USHORT& rDataCount ) + sal_uInt16& rPageCount, + sal_uInt16& rColCount, + sal_uInt16& rRowCount, + sal_uInt16& rDataCount ) { - BOOL bFit = TRUE; - USHORT i=0; + sal_Bool bFit = sal_True; + sal_uInt16 i=0; for ( i=0; (iGetAddressConvention()); + sal_uInt16 nResult = ScRange().Parse(theCurPosStr, pDoc, pDoc->GetAddressConvention()); if ( SCA_VALID != (nResult & SCA_VALID) ) // invalid source range. @@ -1411,7 +1411,7 @@ void ScDPLayoutDlg::UpdateSrcRange() ScTabViewShell * pTabViewShell = pViewData->GetViewShell(); inSheet.aSourceRange = aNewRange; xDlgDPObject->SetSheetDesc(inSheet); - xDlgDPObject->FillOldParam( thePivotData, FALSE ); + xDlgDPObject->FillOldParam( thePivotData, sal_False ); xDlgDPObject->FillLabelData(thePivotData); pTabViewShell->SetDialogDPObject(xDlgDPObject.get()); @@ -1512,8 +1512,8 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) { String aOutPosStr( aEdOutPos.GetText() ); ScAddress aAdrDest; - BOOL bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1); - USHORT nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0; + sal_Bool bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1); + sal_uInt16 nResult = !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0; if ( bToNewTable || ( (aOutPosStr.Len() > 0) && (SCA_VALID == (nResult & SCA_VALID)) ) ) @@ -1526,12 +1526,12 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) PivotFieldArr aColFieldArr; PivotFieldArr aRowFieldArr; PivotFieldArr aDataFieldArr; - USHORT nPageCount; - USHORT nColCount; - USHORT nRowCount; - USHORT nDataCount; + sal_uInt16 nPageCount; + sal_uInt16 nColCount; + sal_uInt16 nRowCount; + sal_uInt16 nDataCount; - BOOL bFit = GetPivotArrays( aPageFieldArr, aColFieldArr, aRowFieldArr, aDataFieldArr, + sal_Bool bFit = GetPivotArrays( aPageFieldArr, aColFieldArr, aRowFieldArr, aDataFieldArr, nPageCount, nColCount, nRowCount, nDataCount ); if ( bFit ) { @@ -1550,13 +1550,13 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) uno::Reference xSource = xDlgDPObject->GetSource(); ScDPObject::ConvertOrientation( aSaveData, aPageFieldArr, nPageCount, - sheet::DataPilotFieldOrientation_PAGE, NULL, 0, 0, xSource, FALSE ); + sheet::DataPilotFieldOrientation_PAGE, NULL, 0, 0, xSource, sal_False ); ScDPObject::ConvertOrientation( aSaveData, aColFieldArr, nColCount, - sheet::DataPilotFieldOrientation_COLUMN, NULL, 0, 0, xSource, FALSE ); + sheet::DataPilotFieldOrientation_COLUMN, NULL, 0, 0, xSource, sal_False ); ScDPObject::ConvertOrientation( aSaveData, aRowFieldArr, nRowCount, - sheet::DataPilotFieldOrientation_ROW, NULL, 0, 0, xSource, FALSE ); + sheet::DataPilotFieldOrientation_ROW, NULL, 0, 0, xSource, sal_False ); ScDPObject::ConvertOrientation( aSaveData, aDataFieldArr, nDataCount, - sheet::DataPilotFieldOrientation_DATA, NULL, 0, 0, xSource, FALSE, + sheet::DataPilotFieldOrientation_DATA, NULL, 0, 0, xSource, sal_False, aColFieldArr, nColCount, aRowFieldArr, nRowCount, aPageFieldArr, nPageCount ); for( ScDPLabelDataVec::const_iterator aIt = aLabelDataArr.begin(), aEnd = aLabelDataArr.end(); aIt != aEnd; ++aIt ) @@ -1626,12 +1626,12 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) } } - USHORT nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE ); + sal_uInt16 nWhichPivot = SC_MOD()->GetPool().GetWhich( SID_PIVOT_TABLE ); ScPivotItem aOutItem( nWhichPivot, &aSaveData, &aOutRange, bToNewTable ); - bRefInputMode = FALSE; // to allow deselecting when switching sheets + bRefInputMode = sal_False; // to allow deselecting when switching sheets - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); // #95513# don't hide the dialog before executing the slot, instead it is used as @@ -1667,7 +1667,7 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG ) else { if ( !aBtnMore.GetState() ) - aBtnMore.SetState( TRUE ); + aBtnMore.SetState( sal_True ); ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ), ScGlobal::GetRscString( STR_INVALID_TABREF ) @@ -1693,7 +1693,7 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) { if ( aBtnMore.GetState() ) { - bRefInputMode = TRUE; + bRefInputMode = sal_True; //@BugID 54702 Enablen/Disablen nur noch in Basisklasse //SFX_APPWINDOW->Enable(); if ( aEdInPos.IsEnabled() ) @@ -1711,9 +1711,9 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) } else { - bRefInputMode = FALSE; + bRefInputMode = sal_False; //@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 } return 0; } @@ -1724,14 +1724,14 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, MoreButton *, EMPTYARG ) IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, Edit *, EMPTYARG ) { String theCurPosStr = aEdOutPos.GetText(); - USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = aLbOutPos.GetEntryCount(); + sal_Bool bFound = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbOutPos.GetEntryCount(); for ( i=2; i 1 ) { diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 96c9f120f5b1..f1f35a4fbf48 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -51,7 +51,7 @@ //======================================================================== -ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit, BOOL bSheetProtected) +ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit, sal_Bool bSheetProtected) : ModalDialog ( pParent, ScResId( RID_SCDLG_NEWSCENARIO ) ), aFlName ( this, ScResId( FL_NAME )), @@ -85,14 +85,14 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b XColorTable* pColorTable = ((SvxColorTableItem*)pItem)->GetColorTable(); if (pColorTable) { - aLbColor.SetUpdateMode( FALSE ); + aLbColor.SetUpdateMode( sal_False ); long nCount = pColorTable->Count(); for ( long n=0; nGetColor(n); aLbColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - aLbColor.SetUpdateMode( TRUE ); + aLbColor.SetUpdateMode( sal_True ); } } } @@ -120,27 +120,27 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const String& rName, BOOL b FreeResource(); aLbColor.SelectEntry( Color( COL_LIGHTGRAY ) ); - aCbShowFrame.Check(TRUE); - //aCbPrintFrame.Check(TRUE); - aCbTwoWay.Check(TRUE); - //aCbAttrib.Check(FALSE); - //aCbValue.Check(FALSE); - aCbCopyAll.Check(FALSE); - aCbProtect.Check(TRUE); + aCbShowFrame.Check(sal_True); + //aCbPrintFrame.Check(sal_True); + aCbTwoWay.Check(sal_True); + //aCbAttrib.Check(sal_False); + //aCbValue.Check(sal_False); + aCbCopyAll.Check(sal_False); + aCbProtect.Check(sal_True); if (bIsEdit) - aCbCopyAll.Enable(FALSE); + aCbCopyAll.Enable(sal_False); // If the Sheet is protected then we disable the Scenario Protect input // and default it to true above. Note we are in 'Add' mode here as: if // Sheet && scenario protection are true, then we cannot edit this dialog. if (bSheetProtected) - aCbProtect.Enable(FALSE); + aCbProtect.Enable(sal_False); //! die drei funktionieren noch nicht... /* - aCbPrintFrame.Enable(FALSE); - aCbAttrib.Enable(FALSE); - aCbValue.Enable(FALSE); + aCbPrintFrame.Enable(sal_False); + aCbAttrib.Enable(sal_False); + aCbValue.Enable(sal_False); */ } @@ -153,7 +153,7 @@ __EXPORT ScNewScenarioDlg::~ScNewScenarioDlg() //------------------------------------------------------------------------ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, - Color& rColor, USHORT& rFlags ) const + Color& rColor, sal_uInt16& rFlags ) const { rComment = aEdComment.GetText(); rName = aEdName.GetText(); @@ -162,7 +162,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, rName = aDefScenarioName; rColor = aLbColor.GetSelectEntryColor(); - USHORT nBits = 0; + sal_uInt16 nBits = 0; if (aCbShowFrame.IsChecked()) nBits |= SC_SCENARIO_SHOWFRAME; /* @@ -185,7 +185,7 @@ void ScNewScenarioDlg::GetScenarioData( String& rName, String& rComment, } void ScNewScenarioDlg::SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ) + const Color& rColor, sal_uInt16 nFlags ) { aEdComment.SetText(rComment); aEdName.SetText(rName); diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 42f2a2d86933..abbda7b995e7 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -322,12 +322,12 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, { Seek( 0 ); mpDatStream->StartReadingUnicodeText(); - ULONG nUniPos = mpDatStream->Tell(); + sal_uLong nUniPos = mpDatStream->Tell(); if ( nUniPos > 0 ) - bPreselectUnicode = TRUE; // read 0xfeff/0xfffe + bPreselectUnicode = sal_True; // read 0xfeff/0xfffe else { - UINT16 n; + sal_uInt16 n; *mpDatStream >> n; // Assume that normal ASCII/ANSI/ISO/etc. text doesn't start with // control characters except CR,LF,TAB @@ -340,7 +340,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, case 0x0d00 : break; default: - bPreselectUnicode = TRUE; + bPreselectUnicode = sal_True; } } mpDatStream->Seek(0); @@ -369,7 +369,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, // *** text encoding ListBox *** // all encodings allowed, including Unicode, but subsets are excluded - aLbCharSet.FillFromTextEncodingTable( TRUE ); + aLbCharSet.FillFromTextEncodingTable( sal_True ); // Insert one "SYSTEM" entry for compatibility in AsciiOptions and system // independent document linkage. aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); @@ -377,7 +377,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, RTL_TEXTENCODING_UNICODE : gsl_getSystemTextEncoding() ); if( nCharSet >= 0 ) - aLbCharSet.SelectEntryPos( static_cast(nCharSet) ); + aLbCharSet.SelectEntryPos( static_cast(nCharSet) ); SetSelectedCharSet(); aLbCharSet.SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) ); @@ -421,7 +421,7 @@ ScImportAsciiDlg::~ScImportAsciiDlg() // ---------------------------------------------------------------------------- -bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText ) +bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText ) { if (nLine >= ASCIIDLG_MAXROWS || !mpDatStream) return false; @@ -430,7 +430,7 @@ bool ScImportAsciiDlg::GetLine( ULONG nLine, String &rText ) bool bFixed = aRbFixed.IsChecked(); if (!mpRowPosArray) - mpRowPosArray = new ULONG[ASCIIDLG_MAXROWS + 2]; + mpRowPosArray = new sal_uLong[ASCIIDLG_MAXROWS + 2]; if (!mnRowPosCount) // complete re-fresh { @@ -568,7 +568,7 @@ String ScImportAsciiDlg::GetSeparators() const void ScImportAsciiDlg::SetupSeparatorCtrls() { - BOOL bEnable = aRbSeparated.IsChecked(); + sal_Bool bEnable = aRbSeparated.IsChecked(); aCkbTab.Enable( bEnable ); aCkbSemicolon.Enable( bEnable ); aCkbComma.Enable( bEnable ); @@ -688,7 +688,7 @@ IMPL_LINK( ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox*, EMPTYARG ) maPreviewLine[i].Erase(); maTableBox.Execute( CSVCMD_SETLINECOUNT, mnRowPosCount); - bool bMergeSep = (aCkbAsOnce.IsChecked() == TRUE); + bool bMergeSep = (aCkbAsOnce.IsChecked() == sal_True); maTableBox.SetUniStrings( maPreviewLine, maFieldSeparators, mcTextSep, bMergeSep); return 0; diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 5440f515c86a..3bca3a8ade22 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -50,7 +50,7 @@ public: nIter ( 0 ) {} - USHORT GetCode( const String& rDelimiter ) const; + sal_uInt16 GetCode( const String& rDelimiter ) const; String GetDelimiter( sal_Unicode nCode ) const; String FirstDel() { nIter = 0; return theDelTab.GetToken( nIter, cSep ); } @@ -65,7 +65,7 @@ private: //------------------------------------------------------------------------ -USHORT ScDelimiterTable::GetCode( const String& rDel ) const +sal_uInt16 ScDelimiterTable::GetCode( const String& rDel ) const { sal_Unicode nCode = 0; xub_StrLen i = 0; @@ -117,12 +117,12 @@ String ScDelimiterTable::GetDelimiter( sal_Unicode nCode ) const ScImportOptionsDlg::ScImportOptionsDlg( Window* pParent, - BOOL bAscii, + sal_Bool bAscii, const ScImportOptions* pOptions, const String* pStrTitle, - BOOL bMultiByte, - BOOL bOnlyDbtoolsEncodings, - BOOL bImport ) + sal_Bool bMultiByte, + sal_Bool bOnlyDbtoolsEncodings, + sal_Bool bImport ) : ModalDialog ( pParent, ScResId( RID_SCDLG_IMPORTOPT ) ), aFlFieldOpt ( this, ScResId( FL_FIELDOPT ) ), @@ -211,9 +211,9 @@ ScImportOptionsDlg::ScImportOptionsDlg( SetSizePixel( aWinSize ); aCbFixed.Show(); aCbFixed.SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) ); - aCbFixed.Check( FALSE ); + aCbFixed.Check( sal_False ); aCbShown.Show(); - aCbShown.Check( TRUE ); + aCbShown.Check( sal_True ); } else { @@ -264,11 +264,11 @@ void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const //------------------------------------------------------------------------ -USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const +sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const { ScDelimiterTable* pTab; String aStr( rEd.GetText() ); - USHORT nCode; + sal_uInt16 nCode; if ( &rEd == &aEdTextSep ) pTab = pTextSepTab; @@ -284,7 +284,7 @@ USHORT ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const nCode = pTab->GetCode( aStr ); if ( nCode == 0 ) - nCode = (USHORT)aStr.GetChar(0); + nCode = (sal_uInt16)aStr.GetChar(0); } return nCode; @@ -296,7 +296,7 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) { if( pCheckBox == &aCbFixed ) { - BOOL bEnable = !aCbFixed.IsChecked(); + sal_Bool bEnable = !aCbFixed.IsChecked(); aFtFieldSep.Enable( bEnable ); aEdFieldSep.Enable( bEnable ); aFtTextSep.Enable( bEnable ); diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index f70fbb094c92..24751946253f 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -90,7 +90,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi pViewData ( NULL ), pDoc ( NULL ), pRefInputEdit ( NULL ), - bRefInputMode ( FALSE ), + bRefInputMode ( sal_False ), pTimer ( NULL ) { Init( rArgSet ); @@ -110,8 +110,8 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Wi __EXPORT ScSpecialFilterDlg::~ScSpecialFilterDlg() { - USHORT nEntries = aLbFilterArea.GetEntryCount(); - USHORT i; + sal_uInt16 nEntries = aLbFilterArea.GetEntryCount(); + sal_uInt16 i; for ( i=1; iGetChangeTrack()!=NULL) aBtnCopyResult.Disable(); ScRangeName* pRangeNames = pDoc->GetRangeName(); - const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0; + const sal_uInt16 nCount = pRangeNames ? pRangeNames->GetCount() : 0; /* * Aus den RangeNames des Dokumentes werden nun die @@ -163,9 +163,9 @@ void __EXPORT ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) { String aString; ScRangeData* pData = NULL; - USHORT nInsert = 0; + sal_uInt16 nInsert = 0; - for ( USHORT i=0; iAt( i )); if ( pData ) @@ -218,19 +218,19 @@ void __EXPORT ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) aStrUndefined ); // #35206# Spezialfilter braucht immer Spaltenkoepfe - aBtnHeader.Check(TRUE); + aBtnHeader.Check(sal_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 __EXPORT ScSpecialFilterDlg::Close() +sal_Bool __EXPORT ScSpecialFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); @@ -303,7 +303,7 @@ ScQueryItem* ScSpecialFilterDlg::GetOutputItem( const ScQueryParam& rParam, //---------------------------------------------------------------------------- -BOOL ScSpecialFilterDlg::IsRefInputMode() const +sal_Bool ScSpecialFilterDlg::IsRefInputMode() const { return bRefInputMode; } @@ -323,8 +323,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 = sal_False; ScRange theFilterArea; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -335,28 +335,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 = sal_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 = sal_False; } } @@ -368,7 +368,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) ) { @@ -377,21 +377,21 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( aBtnCopyResult.IsChecked() ) { - theOutParam.bInplace = FALSE; + theOutParam.bInplace = sal_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(); @@ -411,7 +411,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( bQueryOk && theOutParam.GetEntryCount() > MAXQUERY && theOutParam.GetEntry(MAXQUERY).bDoQuery ) { - bQueryOk = FALSE; // zu viele + bQueryOk = sal_False; // zu viele //! andere Fehlermeldung ?? } } @@ -419,7 +419,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) if ( bQueryOk ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( FID_FILTER_OK, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -451,17 +451,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 = sal_False; } } @@ -478,7 +478,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 ); @@ -499,14 +499,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 = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbFilterArea.GetEntryCount(); for ( i=1; i return TRUE; + * virtual sal_Bool HasExchangeSupport() const; -> return sal_True; * virtual void ActivatePage(const SfxItemSet &); * virtual int DeactivatePage(SfxItemSet * = 0); * @@ -127,8 +127,8 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent, rArgSet.Get( nWhichSort )). GetSortData() ), nFieldCount ( 0 ), - bHasHeader ( FALSE ), - bSortByRows ( FALSE ) + bHasHeader ( sal_False ), + bSortByRows ( sal_False ) { Init(); FreeResource(); @@ -179,7 +179,7 @@ void ScTabPageSortFields::Init() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageSortFields::GetRanges() +sal_uInt16* __EXPORT ScTabPageSortFields::GetRanges() { return pSortRanges; } @@ -206,7 +206,7 @@ void __EXPORT ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) if ( rSortData.bDoSort[0] ) { - for ( USHORT i=0; i<3; i++ ) + for ( sal_uInt16 i=0; i<3; i++ ) { if ( rSortData.bDoSort[i] ) { @@ -241,7 +241,7 @@ void __EXPORT ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) else if( nCol > rSortData.nCol2 ) nCol = rSortData.nCol2; - USHORT nSort1Pos = nCol - rSortData.nCol1+1; + sal_uInt16 nSort1Pos = nCol - rSortData.nCol1+1; aLbSort1.SelectEntryPos( nSort1Pos ); aLbSort2.SelectEntryPos( 0 ); aLbSort3.SelectEntryPos( 0 ); @@ -262,20 +262,20 @@ void __EXPORT ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam theSortData = rSortData; if (pDlg) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET ) theSortData = ((const ScSortItem*)pItem)->GetSortData(); } - USHORT nSort1Pos = aLbSort1.GetSelectEntryPos(); - USHORT nSort2Pos = aLbSort2.GetSelectEntryPos(); - USHORT nSort3Pos = aLbSort3.GetSelectEntryPos(); + sal_uInt16 nSort1Pos = aLbSort1.GetSelectEntryPos(); + sal_uInt16 nSort2Pos = aLbSort2.GetSelectEntryPos(); + sal_uInt16 nSort3Pos = aLbSort3.GetSelectEntryPos(); DBG_ASSERT( (nSort1Pos <= SC_MAXFIELDS) && (nSort2Pos <= SC_MAXFIELDS) @@ -320,12 +320,12 @@ BOOL __EXPORT ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) { theSortData.bDoSort[0] = theSortData.bDoSort[1] = - theSortData.bDoSort[2] = FALSE; + theSortData.bDoSort[2] = sal_False; } rArgSet.Put( ScSortItem( SCITEM_SORTDATA, NULL, &theSortData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -340,9 +340,9 @@ void __EXPORT ScTabPageSortFields::ActivatePage() if ( bHasHeader != pDlg->GetHeaders() || bSortByRows != pDlg->GetByRows() ) { - USHORT nCurSel1 = aLbSort1.GetSelectEntryPos(); - USHORT nCurSel2 = aLbSort2.GetSelectEntryPos(); - USHORT nCurSel3 = aLbSort3.GetSelectEntryPos(); + sal_uInt16 nCurSel1 = aLbSort1.GetSelectEntryPos(); + sal_uInt16 nCurSel2 = aLbSort2.GetSelectEntryPos(); + sal_uInt16 nCurSel3 = aLbSort3.GetSelectEntryPos(); bHasHeader = pDlg->GetHeaders(); bSortByRows = pDlg->GetByRows(); @@ -375,7 +375,7 @@ int __EXPORT ScTabPageSortFields::DeactivatePage( SfxItemSet* pSetP ) // ----------------------------------------------------------------------- -void ScTabPageSortFields::DisableField( USHORT nField ) +void ScTabPageSortFields::DisableField( sal_uInt16 nField ) { nField--; @@ -390,7 +390,7 @@ void ScTabPageSortFields::DisableField( USHORT nField ) // ----------------------------------------------------------------------- -void ScTabPageSortFields::EnableField( USHORT nField ) +void ScTabPageSortFields::EnableField( sal_uInt16 nField ) { nField--; @@ -423,7 +423,7 @@ void ScTabPageSortFields::FillFieldLists() SCCOL nFirstSortCol = rSortData.nCol1; SCROW nFirstSortRow = rSortData.nRow1; SCTAB nTab = pViewData->GetTabNo(); - USHORT i = 1; + sal_uInt16 i = 1; if ( bSortByRows ) { @@ -476,17 +476,17 @@ void ScTabPageSortFields::FillFieldLists() //------------------------------------------------------------------------ -USHORT ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField ) +sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW nField ) { - USHORT nFieldPos = 0; - BOOL bFound = FALSE; + sal_uInt16 nFieldPos = 0; + sal_Bool bFound = sal_False; - for ( USHORT n=1; nGetTabNo()) + sal_uInt16 nFormat = (rSortData.nDestTab != pViewData->GetTabNo()) ? SCR_ABS_3D : SCR_ABS; @@ -794,7 +794,7 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) } else { - aBtnCopyResult.Check( FALSE ); + aBtnCopyResult.Check( sal_False ); aLbOutPos.Disable(); aEdOutPos.Disable(); aEdOutPos.SetText( EMPTY_STRING ); @@ -803,14 +803,14 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) { ScSortParam theSortData = rSortData; if (pDlg) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSort, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSort, sal_True, &pItem ) == SFX_ITEM_SET ) theSortData = ((const ScSortItem*)pItem)->GetSortData(); } @@ -837,7 +837,7 @@ BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) { uno::Sequence aAlgos = pColWrap->listCollatorAlgorithms( theSortData.aCollatorLocale ); - USHORT nSel = aLbAlgorithm.GetSelectEntryPos(); + sal_uInt16 nSel = aLbAlgorithm.GetSelectEntryPos(); if ( nSel < aAlgos.getLength() ) sAlg = aAlgos[nSel]; } @@ -845,7 +845,7 @@ BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet ) rArgSet.Put( ScSortItem( SCITEM_SORTDATA, &theSortData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -877,7 +877,7 @@ void __EXPORT ScTabPageSortOptions::ActivatePage() int __EXPORT ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) { - BOOL bPosInputOk = TRUE; + sal_Bool bPosInputOk = sal_True; if ( aBtnCopyResult.IsChecked() ) { @@ -895,7 +895,7 @@ int __EXPORT ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) thePos.SetTab( pViewData->GetTabNo() ); } - USHORT nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = thePos.Parse( thePosStr, pDoc, pDoc->GetAddressConvention() ); bPosInputOk = ( SCA_VALID == (nResult & SCA_VALID) ); @@ -938,9 +938,9 @@ void ScTabPageSortOptions::FillUserSortListBox() aLbSortUser.Clear(); if ( pUserLists ) { - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); if ( nCount > 0 ) - for ( USHORT i=0; iGetString() ); } } @@ -984,7 +984,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) if ( pLb == &aLbOutPos ) { String aString; - USHORT nSelPos = aLbOutPos.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbOutPos.GetSelectEntryPos(); if ( nSelPos > 0 ) aString = *(String*)aLbOutPos.GetEntryData( nSelPos ); @@ -1016,14 +1016,14 @@ void __EXPORT ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) if ( pEd == &aEdOutPos ) { String theCurPosStr = aEdOutPos.GetText(); - USHORT nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); + sal_uInt16 nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() ); if ( SCA_VALID == (nResult & SCA_VALID) ) { String* pStr = NULL; - BOOL bFound = FALSE; - USHORT i = 0; - USHORT nCount = aLbOutPos.GetEntryCount(); + sal_Bool bFound = sal_False; + sal_uInt16 i = 0; + sal_uInt16 nCount = aLbOutPos.GetEntryCount(); for ( i=2; i leave list box empty if LANGUAGE_SYSTEM is selected - aFtAlgorithm.Enable( FALSE ); // nothing to select - aLbAlgorithm.Enable( FALSE ); // nothing to select + aFtAlgorithm.Enable( sal_False ); // nothing to select + aLbAlgorithm.Enable( sal_False ); // nothing to select } else { @@ -1073,7 +1073,7 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) aLbAlgorithm.Enable( nCount > 1 ); // enable only if there is a choice } - aLbAlgorithm.SetUpdateMode( TRUE ); + aLbAlgorithm.SetUpdateMode( sal_True ); return 0; } diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index fbada165b55d..070167f8ff95 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -47,7 +47,7 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pSubTotalsRanges[] = +static sal_uInt16 pSubTotalsRanges[] = { SID_SUBTOTALS, SID_SUBTOTALS, @@ -57,7 +57,7 @@ static USHORT pSubTotalsRanges[] = //======================================================================== // Zwischenergebnisgruppen-Tabpage: -ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId, +ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rArgSet ) : SfxTabPage ( pParent, ScResId( nResId ), @@ -94,15 +94,15 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent, USHORT nResId, __EXPORT ScTpSubTotalGroup::~ScTpSubTotalGroup() { - USHORT nCount = (USHORT)aLbColumns.GetEntryCount(); + sal_uInt16 nCount = (sal_uInt16)aLbColumns.GetEntryCount(); if ( nCount > 0 ) { - USHORT* pData = NULL; + sal_uInt16* pData = NULL; - for ( USHORT i=0; i0), "Invalid group" ); if ( (nGroupNo > 3) || (nGroupNo == 0) ) - return FALSE; + return sal_False; else nGroupIdx = nGroupNo-1; //---------------------------------------------------------- // #79058# first we have to clear the listboxes... - for ( USHORT nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry ) + for ( sal_uInt16 nLbEntry = 0; nLbEntry < aLbColumns.GetEntryCount(); ++nLbEntry ) { - aLbColumns.CheckEntryPos( nLbEntry, FALSE ); - *((USHORT*)aLbColumns.GetEntryData( nLbEntry )) = 0; + aLbColumns.CheckEntryPos( nLbEntry, sal_False ); + *((sal_uInt16*)aLbColumns.GetEntryData( nLbEntry )) = 0; } aLbFunctions.SelectEntryPos( 0 ); @@ -175,10 +175,10 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, aLbGroup.SelectEntryPos( GetFieldSelPos( nField )+1 ); - for ( USHORT i=0; i0), "Invalid group" ); DBG_ASSERT( (aLbGroup.GetEntryCount() > 0) @@ -214,7 +214,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, || (aLbColumns.GetEntryCount() == 0) || (aLbFunctions.GetEntryCount() == 0) ) - return FALSE; + return sal_False; else nGroupIdx = nGroupNo-1; @@ -226,15 +226,15 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET ) theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData(); } ScSubTotalFunc* pFunctions = NULL; SCCOL* pSubTotals = NULL; - USHORT nGroup = aLbGroup.GetSelectEntryPos(); - USHORT nEntryCount = (USHORT)aLbColumns.GetEntryCount(); - USHORT nCheckCount = aLbColumns.GetCheckedEntryCount(); + sal_uInt16 nGroup = aLbGroup.GetSelectEntryPos(); + sal_uInt16 nEntryCount = (sal_uInt16)aLbColumns.GetEntryCount(); + sal_uInt16 nCheckCount = aLbColumns.GetCheckedEntryCount(); theSubTotalData.nCol1 = rSubTotalData.nCol1; theSubTotalData.nRow1 = rSubTotalData.nRow1; @@ -247,18 +247,18 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, if ( nEntryCount>0 && nCheckCount>0 && nGroup!=0 ) { - USHORT nFunction = 0; + sal_uInt16 nFunction = 0; pSubTotals = new SCCOL [nCheckCount]; pFunctions = new ScSubTotalFunc [nCheckCount]; - for ( USHORT i=0, nCheck=0; iGetTabNo(); SCCOL nMaxCol = rSubTotalData.nCol2; SCCOL col; - USHORT i=0; + sal_uInt16 i=0; String aFieldName; aLbGroup.Clear(); @@ -312,27 +312,27 @@ void ScTpSubTotalGroup::FillListBoxes() nFieldArr[i] = col; aLbGroup.InsertEntry( aFieldName, i+1 ); aLbColumns.InsertEntry( aFieldName, i ); - aLbColumns.SetEntryData( i, new USHORT(0) ); + aLbColumns.SetEntryData( i, new sal_uInt16(0) ); i++; } // Nachtraegliche "Konstanteninitialisierung": - (USHORT&)nFieldCount = i; + (sal_uInt16&)nFieldCount = i; } } // ----------------------------------------------------------------------- -USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField ) +sal_uInt16 ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField ) { - USHORT nFieldPos = 0; - BOOL bFound = FALSE; + sal_uInt16 nFieldPos = 0; + sal_Bool bFound = sal_False; - for ( USHORT n=0; n 0) && (aLbColumns.GetSelectionCount() > 0) ) { - USHORT nFunction = aLbFunctions.GetSelectEntryPos(); - USHORT nColumn = aLbColumns.GetSelectEntryPos(); - USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nColumn ); + sal_uInt16 nFunction = aLbFunctions.GetSelectEntryPos(); + sal_uInt16 nColumn = aLbColumns.GetSelectEntryPos(); + sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nColumn ); DBG_ASSERT( pFunction, "EntryData nicht gefunden!" ); if ( !pFunction ) @@ -412,7 +412,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb ) { *pFunction = nFunction; // aLbColumns.CheckEntryPos( nColumn, (nFunction != 0) );//XXX - aLbColumns.CheckEntryPos( nColumn, TRUE ); + aLbColumns.CheckEntryPos( nColumn, sal_True ); } } return 0; @@ -428,7 +428,7 @@ IMPL_LINK( ScTpSubTotalGroup, CheckHdl, ListBox *, pLb ) if ( pEntry ) { - aLbColumns.SelectEntryPos( (USHORT)aLbColumns.GetModel()->GetAbsPos( pEntry ) ); + aLbColumns.SelectEntryPos( (sal_uInt16)aLbColumns.GetModel()->GetAbsPos( pEntry ) ); SelectHdl( pLb ); } } @@ -485,11 +485,11 @@ void __EXPORT ScTpSubTotalGroup3::Reset( const SfxItemSet& rArgSet ) { RESET(3); #define FILLSET(i) (ScTpSubTotalGroup::DoFillItemSet( (i), rArgSet )) -BOOL __EXPORT ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } +sal_Bool __EXPORT ScTpSubTotalGroup1::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(1); } -BOOL __EXPORT ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } +sal_Bool __EXPORT ScTpSubTotalGroup2::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(2); } -BOOL __EXPORT ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } +sal_Bool __EXPORT ScTpSubTotalGroup3::FillItemSet( SfxItemSet& rArgSet ) { return FILLSET(3); } #undef FILL @@ -570,13 +570,13 @@ void __EXPORT ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ ) if ( rSubTotalData.bUserDef ) { - aBtnUserDef.Check( TRUE ); + aBtnUserDef.Check( sal_True ); aLbUserDef.Enable(); aLbUserDef.SelectEntryPos( rSubTotalData.nUserIndex ); } else { - aBtnUserDef.Check( FALSE ); + aBtnUserDef.Check( sal_False ); aLbUserDef.Disable(); aLbUserDef.SelectEntryPos( 0 ); } @@ -586,7 +586,7 @@ void __EXPORT ScTpSubTotalOptions::Reset( const SfxItemSet& /* rArgSet */ ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) { ScSubTotalParam theSubTotalData; // auslesen, wenn schon teilweise gefuellt SfxTabDialog* pDlg = GetTabDialog(); @@ -594,12 +594,12 @@ BOOL __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) { const SfxItemSet* pExample = pDlg->GetExampleSet(); const SfxPoolItem* pItem; - if ( pExample && pExample->GetItemState( nWhichSubTotals, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pExample && pExample->GetItemState( nWhichSubTotals, sal_True, &pItem ) == SFX_ITEM_SET ) theSubTotalData = ((const ScSubTotalItem*)pItem)->GetSubTotalData(); } theSubTotalData.bPagebreak = aBtnPagebreak.IsChecked(); - theSubTotalData.bReplace = TRUE; + theSubTotalData.bReplace = sal_True; theSubTotalData.bCaseSens = aBtnCase.IsChecked(); theSubTotalData.bIncludePattern = aBtnFormats.IsChecked(); theSubTotalData.bDoSort = aBtnSort.IsChecked(); @@ -611,7 +611,7 @@ BOOL __EXPORT ScTpSubTotalOptions::FillItemSet( SfxItemSet& rArgSet ) rArgSet.Put( ScSubTotalItem( nWhichSubTotals, &theSubTotalData ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -623,9 +623,9 @@ void ScTpSubTotalOptions::FillUserSortListBox() aLbUserDef.Clear(); if ( pUserLists ) { - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); if ( nCount > 0 ) - for ( USHORT i=0; iGetString() ); } } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 1ee02badefe1..8207d18c5709 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -59,7 +59,7 @@ // ============================================================================ -static USHORT pValueRanges[] = +static sal_uInt16 pValueRanges[] = { FID_VALID_MODE, FID_VALID_ERRTEXT, FID_VALID_LISTTYPE, FID_VALID_LISTTYPE, @@ -167,7 +167,7 @@ void ScTPValidationValue::RefInputDonePostHdl() } -BOOL ScValidationDlg::Close() +sal_Bool ScValidationDlg::Close() { if( m_bOwnRefHdlr ) if( SfxTabPage* pPage = GetTabPage( TP_VALIDATION_VALUES ) ) @@ -181,7 +181,7 @@ ScValidationDlg::~ScValidationDlg() { //Added by PengYunQuan for Validity Cell Range Picker } @@ -191,9 +191,9 @@ ScValidationDlg::~ScValidationDlg() namespace { /** Converts the passed ScValidationMode to the position in the list box. */ -USHORT lclGetPosFromValMode( ScValidationMode eValMode ) +sal_uInt16 lclGetPosFromValMode( ScValidationMode eValMode ) { - USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY; + sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY; switch( eValMode ) { case SC_VALID_ANY: nLbPos = SC_VALIDDLG_ALLOW_ANY; break; @@ -210,7 +210,7 @@ USHORT lclGetPosFromValMode( ScValidationMode eValMode ) } /** Converts the passed list box position to an ScValidationMode. */ -ScValidationMode lclGetValModeFromPos( USHORT nLbPos ) +ScValidationMode lclGetValModeFromPos( sal_uInt16 nLbPos ) { ScValidationMode eValMode = SC_VALID_ANY; switch( nLbPos ) @@ -229,9 +229,9 @@ ScValidationMode lclGetValModeFromPos( USHORT nLbPos ) } /** Converts the passed ScConditionMode to the position in the list box. */ -USHORT lclGetPosFromCondMode( ScConditionMode eCondMode ) +sal_uInt16 lclGetPosFromCondMode( ScConditionMode eCondMode ) { - USHORT nLbPos = SC_VALIDDLG_DATA_EQUAL; + sal_uInt16 nLbPos = SC_VALIDDLG_DATA_EQUAL; switch( eCondMode ) { case SC_COND_NONE: // #111771# may occur in old XML files after Excel import @@ -249,7 +249,7 @@ USHORT lclGetPosFromCondMode( ScConditionMode eCondMode ) } /** Converts the passed list box position to an ScConditionMode. */ -ScConditionMode lclGetCondModeFromPos( USHORT nLbPos ) +ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos ) { ScConditionMode eCondMode = SC_COND_EQUAL; switch( nLbPos ) @@ -389,7 +389,7 @@ SfxTabPage* ScTPValidationValue::Create( Window* pParent, const SfxItemSet& rArg return( new ScTPValidationValue( pParent, rArgSet ) ); } -USHORT* ScTPValidationValue::GetRanges() +sal_uInt16* ScTPValidationValue::GetRanges() { return pValueRanges; } @@ -398,38 +398,38 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet ) { const SfxPoolItem* pItem; - USHORT nLbPos = SC_VALIDDLG_ALLOW_ANY; - if( rArgSet.GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY; + if( rArgSet.GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET ) nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >( static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) ); maLbAllow.SelectEntryPos( nLbPos ); nLbPos = SC_VALIDDLG_DATA_EQUAL; - if( rArgSet.GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET ) + if( rArgSet.GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET ) nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >( static_cast< const SfxAllEnumItem* >( pItem )->GetValue() ) ); maLbValue.SelectEntryPos( nLbPos ); // *** check boxes *** - BOOL bCheck = TRUE; - if( rArgSet.GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_Bool bCheck = sal_True; + if( rArgSet.GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem* >( pItem )->GetValue(); maCbAllow.Check( bCheck ); sal_Int32 nListType = ValidListType::UNSORTED; - if( rArgSet.GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET ) + if( rArgSet.GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET ) nListType = static_cast< const SfxInt16Item* >( pItem )->GetValue(); maCbShow.Check( nListType != ValidListType::INVISIBLE ); maCbSort.Check( nListType == ValidListType::SORTEDASCENDING ); // *** formulas *** String aFmlaStr; - if ( rArgSet.GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetFirstFormula( aFmlaStr ); aFmlaStr.Erase(); - if ( rArgSet.GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetSecondFormula( aFmlaStr ); @@ -437,21 +437,21 @@ void ScTPValidationValue::Reset( const SfxItemSet& rArgSet ) CheckHdl( NULL ); } -BOOL ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool ScTPValidationValue::FillItemSet( SfxItemSet& rArgSet ) { sal_Int16 nListType = maCbShow.IsChecked() ? (maCbSort.IsChecked() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) : ValidListType::INVISIBLE; - rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast( + rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast( lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast( + rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast( lclGetCondModeFromPos( maLbValue.GetSelectEntryPos() ) ) ) ); rArgSet.Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) ); rArgSet.Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) ); rArgSet.Put( SfxBoolItem( FID_VALID_BLANK, maCbAllow.IsChecked() ) ); rArgSet.Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) ); - return TRUE; + return sal_True; } String ScTPValidationValue::GetFirstFormula() const @@ -597,7 +597,7 @@ void ScTPValidationValue::TidyListBoxes() IMPL_LINK( ScTPValidationValue, EditSetFocusHdl, Edit *, /*pEdit*/ ) { - USHORT nPos=maLbAllow.GetSelectEntryPos(); + sal_uInt16 nPos=maLbAllow.GetSelectEntryPos(); if ( nPos == SC_VALIDDLG_ALLOW_RANGE ) { @@ -625,7 +625,7 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, Window *, pWnd ) IMPL_LINK( ScTPValidationValue, SelectHdl, ListBox*, EMPTYARG ) { - USHORT nLbPos = maLbAllow.GetSelectEntryPos(); + sal_uInt16 nLbPos = maLbAllow.GetSelectEntryPos(); bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY); bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE); bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST); @@ -721,12 +721,12 @@ void ScTPValidationHelp::Init() { //aLb.SetSelectHdl( LINK( this, ScTPValidationHelp, SelectHdl ) ); - aTsbHelp.EnableTriState( FALSE ); + aTsbHelp.EnableTriState( sal_False ); } //------------------------------------------------------------------------ -USHORT* __EXPORT ScTPValidationHelp::GetRanges() +sal_uInt16* __EXPORT ScTPValidationHelp::GetRanges() { return pValueRanges; } @@ -745,17 +745,17 @@ void __EXPORT ScTPValidationHelp::Reset( const SfxItemSet& rArgSet ) { const SfxPoolItem* pItem; - if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET ) aTsbHelp.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK ); else aTsbHelp.SetState( STATE_NOCHECK ); - if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdtTitle.SetText( EMPTY_STRING ); - if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) aEdInputHelp.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdInputHelp.SetText( EMPTY_STRING ); @@ -763,13 +763,13 @@ void __EXPORT ScTPValidationHelp::Reset( const SfxItemSet& rArgSet ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT ScTPValidationHelp::FillItemSet( SfxItemSet& rArgSet ) { rArgSet.Put( SfxBoolItem( FID_VALID_SHOWHELP, aTsbHelp.GetState() == STATE_CHECK ) ); rArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aEdtTitle.GetText() ) ); rArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aEdInputHelp.GetText() ) ); - return TRUE; + return sal_True; } //======================================================================== @@ -812,14 +812,14 @@ void ScTPValidationError::Init() aBtnSearch.SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl ) ); aLbAction.SelectEntryPos( 0 ); - aTsbShow.EnableTriState( FALSE ); + aTsbShow.EnableTriState( sal_False ); SelectActionHdl( NULL ); } //------------------------------------------------------------------------ -USHORT* __EXPORT ScTPValidationError::GetRanges() +sal_uInt16* __EXPORT ScTPValidationError::GetRanges() { return pValueRanges; } @@ -838,22 +838,22 @@ void __EXPORT ScTPValidationError::Reset( const SfxItemSet& rArgSet ) { const SfxPoolItem* pItem; - if ( rArgSet.GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET ) aTsbShow.SetState( ((const SfxBoolItem*)pItem)->GetValue() ? STATE_CHECK : STATE_NOCHECK ); else aTsbShow.SetState( STATE_CHECK ); // #111720# check by default - if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET ) aLbAction.SelectEntryPos( ((const SfxAllEnumItem*)pItem)->GetValue() ); else aLbAction.SelectEntryPos( 0 ); - if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) aEdtTitle.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdtTitle.SetText( EMPTY_STRING ); - if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( rArgSet.GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) aEdError.SetText( ((const SfxStringItem*)pItem)->GetValue() ); else aEdError.SetText( EMPTY_STRING ); @@ -863,14 +863,14 @@ void __EXPORT ScTPValidationError::Reset( const SfxItemSet& rArgSet ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) +sal_Bool __EXPORT ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) { rArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, aTsbShow.GetState() == STATE_CHECK ) ); rArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, aLbAction.GetSelectEntryPos() ) ); rArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aEdtTitle.GetText() ) ); rArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aEdError.GetText() ) ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -878,7 +878,7 @@ BOOL __EXPORT ScTPValidationError::FillItemSet( SfxItemSet& rArgSet ) IMPL_LINK( ScTPValidationError, SelectActionHdl, ListBox*, EMPTYARG ) { ScValidErrorStyle eStyle = (ScValidErrorStyle) aLbAction.GetSelectEntryPos(); - BOOL bMacro = ( eStyle == SC_VALERR_MACRO ); + sal_Bool bMacro = ( eStyle == SC_VALERR_MACRO ); aBtnSearch.Enable( bMacro ); aFtError.Enable( !bMacro ); @@ -915,13 +915,13 @@ bool ScValidationDlg::EnterRefStatus() if( !pTabViewShell ) return false; - USHORT nId = SLOTID; + sal_uInt16 nId = SLOTID; SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); if ( pWnd && pWnd->GetWindow()!= this ) pWnd = NULL; - SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + SC_MOD()->SetRefDialog( nId, pWnd ? sal_False : sal_True ); return true; } @@ -932,7 +932,7 @@ bool ScValidationDlg::LeaveRefStatus() if( !pTabViewShell ) return false; - USHORT nId = SLOTID; + sal_uInt16 nId = SLOTID; SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); //SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); if ( pViewFrm->GetChildWindow( nId ) ) @@ -947,14 +947,14 @@ bool ScValidationDlg::SetupRefDlg() if ( m_bOwnRefHdlr ) return false; if( EnterRefMode() ) { - SetModal( FALSE ); + SetModal( sal_False ); return /*SetChkShell( GetDocShell() ),*/ m_bOwnRefHdlr = true && EnterRefStatus(); } return false; } -bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ ) +bool ScValidationDlg::RemoveRefDlg( sal_Bool bRestoreModal /* = sal_True */ ) { bool bVisLock = false; bool bFreeWindowLock = false; @@ -975,7 +975,7 @@ bool ScValidationDlg::RemoveRefDlg( BOOL bRestoreModal /* = TRUE */ ) m_bOwnRefHdlr = false; if( bRestoreModal ) - SetModal( TRUE ); + SetModal( sal_True ); } if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame()->GetChildWindow( SID_VALIDITY_REFERENCE ) ) @@ -1003,14 +1003,14 @@ void ScTPValidationValue::OnClick( Button *pBtn ) SetupRefDlg(); } -BOOL ScValidationDlg::IsChildFocus() +sal_Bool ScValidationDlg::IsChildFocus() { if ( const Window *pWin = Application::GetFocusWindow() ) while( NULL != ( pWin = pWin->GetParent() ) ) if( pWin == this ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index d819785c843b..6182ada4836e 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -77,7 +77,7 @@ TYPEINIT1(ScAreaLink,::sfx2::SvBaseLink); ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile, const String& rFilter, const String& rOpt, const String& rArea, const ScRange& rDest, - ULONG nRefresh ) : + sal_uLong nRefresh ) : ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), ScRefreshTimer ( nRefresh ), pImpl ( new AreaLink_Impl() ), @@ -86,9 +86,9 @@ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const String& rFile, aOptions (rOpt), aSourceArea (rArea), aDestArea (rDest), - bAddUndo (TRUE), - bInCreate (FALSE), - bDoInsert (TRUE) + bAddUndo (sal_True), + bInCreate (sal_False), + bDoInsert (sal_True) { DBG_ASSERT(pShell->ISA(ScDocShell), "ScAreaLink mit falscher ObjectShell"); pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell ); @@ -159,19 +159,19 @@ void __EXPORT ScAreaLink::Closed() // Verknuepfung loeschen: Undo ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); if (bAddUndo && bUndo) { pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveAreaLink( pImpl->m_pDocSh, aFileName, aFilterName, aOptions, aSourceArea, aDestArea, GetRefreshDelay() ) ); - bAddUndo = FALSE; // nur einmal + bAddUndo = sal_False; // nur einmal } SCTAB nDestTab = aDestArea.aStart.Tab(); if (pDoc->IsStreamValid(nDestTab)) - pDoc->SetStreamValid(nDestTab, FALSE); + pDoc->SetStreamValid(nDestTab, sal_False); SvBaseLink::Closed(); } @@ -195,7 +195,7 @@ void ScAreaLink::SetSource(const String& rDoc, const String& rFlt, const String& SetName( aNewLinkName ); } -BOOL ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const String& rOpt, +sal_Bool ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const String& rOpt, const String& rSource, const ScRange& rDest ) const { return aFileName == rFile && aFilterName == rFilter && aOptions == rOpt && @@ -203,16 +203,16 @@ BOOL ScAreaLink::IsEqual( const String& rFile, const String& rFilter, const Stri } // find a range with name >rAreaName< in >pSrcDoc<, return it in >rRange< -BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName ) +sal_Bool ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const String& rAreaName ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScRangeName* pNames = pSrcDoc->GetRangeName(); - USHORT nPos; + sal_uInt16 nPos; if (pNames) // benannte Bereiche { if (pNames->SearchName( rAreaName, nPos )) if ( (*pNames)[nPos]->IsValidReference( rRange ) ) - bFound = TRUE; + bFound = sal_True; } if (!bFound) // Datenbankbereiche { @@ -225,39 +225,39 @@ BOOL ScAreaLink::FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const Strin SCROW nRow1, nRow2; (*pDBColl)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2); rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab ); - bFound = TRUE; + bFound = sal_True; } } if (!bFound) // direct reference (range or cell) { ScAddress::Details aDetails(pSrcDoc->GetAddressConvention(), 0, 0); if ( rRange.ParseAny( rAreaName, pSrcDoc, aDetails ) & SCA_VALID ) - bFound = TRUE; + bFound = sal_True; } return bFound; } // ausfuehren: -BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, - const String& rNewArea, ULONG nNewRefresh ) +sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, + const String& rNewArea, sal_uLong nNewRefresh ) { // Dokument laden - wie TabLink if (!rNewFile.Len() || !rNewFilter.Len()) - return FALSE; + return sal_False; String aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) ); - BOOL bNewUrlName = (aNewUrl != aFileName); + sal_Bool bNewUrlName = (aNewUrl != aFileName); const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter); if (!pFilter) - return FALSE; + return sal_False; ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); - pDoc->SetInLinkUpdate( TRUE ); + sal_Bool bUndo (pDoc->IsUndoEnabled()); + pDoc->SetInLinkUpdate( sal_True ); // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen if ( rNewFilter != aFilterName ) @@ -268,7 +268,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, if ( aOptions.Len() ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); - SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter); + SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, sal_False, pFilter); ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); //REMOVE SvEmbeddedObjectRef aRef = pSrcShell; @@ -326,7 +326,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, } //! check CanFitBlock only if bDoInsert is set? - BOOL bCanDo = ValidColRow( aNewRange.aEnd.Col(), aNewRange.aEnd.Row() ) && + sal_Bool bCanDo = ValidColRow( aNewRange.aEnd.Col(), aNewRange.aEnd.Row() ) && pDoc->CanFitBlock( aOldRange, aNewRange ); if (bCanDo) { @@ -352,16 +352,16 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, { pUndoDoc->InitUndo( pDoc, 0, pDoc->GetTableCount()-1 ); pDoc->CopyToDocument( 0,0,0,MAXCOL,MAXROW,MAXTAB, - IDF_FORMULA, FALSE, pUndoDoc ); // alle Formeln + IDF_FORMULA, sal_False, pUndoDoc ); // alle Formeln } else pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle - pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, sal_False, pUndoDoc ); } else // ohne Einfuegen { pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab ); // nur Zieltabelle - pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aMaxRange, IDF_ALL & ~IDF_NOTE, sal_False, pUndoDoc ); } } @@ -410,7 +410,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, ScMarkData aDestMark; aDestMark.SelectOneTable( nDestTab ); aDestMark.SetMarkArea( aNewTokenRange ); - pDoc->CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, FALSE ); + pDoc->CopyFromClip( aNewTokenRange, aDestMark, IDF_ALL, NULL, &aClipDoc, sal_False ); aNewTokenRange.aStart.SetRow( aNewTokenRange.aEnd.Row() + 2 ); } } @@ -427,7 +427,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, { pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); pRedoDoc->InitUndo( pDoc, nDestTab, nDestTab ); - pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc ); + pDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, sal_False, pRedoDoc ); pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoUpdateAreaLink( pImpl->m_pDocSh, @@ -470,7 +470,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, } else { - // CanFitBlock FALSE -> Probleme mit zusammengefassten Zellen + // CanFitBlock sal_False -> Probleme mit zusammengefassten Zellen // oder Tabellengrenze erreicht! //! Zellschutz ??? @@ -485,7 +485,7 @@ BOOL ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter, aRef->DoClose(); - pDoc->SetInLinkUpdate( FALSE ); + pDoc->SetInLinkUpdate( sal_False ); if (bCanDo) { diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index 61683e169f02..305eea2618d9 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -45,28 +45,28 @@ struct ScAutoStyleInitData { ScRange aRange; String aStyle1; - ULONG nTimeout; + sal_uLong nTimeout; String aStyle2; - ScAutoStyleInitData( const ScRange& rR, const String& rSt1, ULONG nT, const String& rSt2 ) : + ScAutoStyleInitData( const ScRange& rR, const String& rSt1, sal_uLong nT, const String& rSt2 ) : aRange(rR), aStyle1(rSt1), nTimeout(nT), aStyle2(rSt2) {} }; struct ScAutoStyleData { - ULONG nTimeout; + sal_uLong nTimeout; ScRange aRange; String aStyle; - ScAutoStyleData( ULONG nT, const ScRange& rR, const String& rT ) : + ScAutoStyleData( sal_uLong nT, const ScRange& rR, const String& rT ) : nTimeout(nT), aRange(rR), aStyle(rT) {} }; //================================================================== -inline ULONG TimeNow() // Sekunden +inline sal_uLong TimeNow() // Sekunden { - return (ULONG) time(0); + return (sal_uLong) time(0); } //================================================================== @@ -81,8 +81,8 @@ ScAutoStyleList::ScAutoStyleList(ScDocShell* pShell) : ScAutoStyleList::~ScAutoStyleList() { - ULONG i; - ULONG nCount = aEntries.Count(); + sal_uLong i; + sal_uLong nCount = aEntries.Count(); for (i=0; inTimeout) nPos = i; @@ -171,10 +171,10 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str StartTimer(nNow); } -void ScAutoStyleList::AdjustEntries( ULONG nDiff ) // Millisekunden +void ScAutoStyleList::AdjustEntries( sal_uLong nDiff ) // Millisekunden { - ULONG nCount = aEntries.Count(); - for (ULONG i=0; inTimeout <= nDiff ) @@ -192,7 +192,7 @@ void ScAutoStyleList::ExecuteEntries() pDocSh->DoAutoStyle( pData->aRange, pData->aStyle ); //! oder Request ??? delete pData; - aEntries.Remove((ULONG)0); + aEntries.Remove((sal_uLong)0); } } @@ -200,8 +200,8 @@ void ScAutoStyleList::ExecuteAllNow() { aTimer.Stop(); - ULONG nCount = aEntries.Count(); - for (ULONG i=0; inTimeout == 0 ) ++nPos; @@ -231,7 +231,7 @@ void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden IMPL_LINK( ScAutoStyleList, TimerHdl, Timer*, EMPTYARG ) { - ULONG nNow = TimeNow(); + sal_uLong nNow = TimeNow(); AdjustEntries(aTimer.GetTimeout()); // eingestellte Wartezeit ExecuteEntries(); StartTimer(nNow); diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index cf149d258062..cf114cf8479e 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -60,14 +60,14 @@ // ----------------------------------------------------------------- -BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL /* bApi */ ) +sal_Bool ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, sal_Bool /* bApi */ ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); ScDBCollection* pDocColl = pDoc->GetDBCollection(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDBCollection* pUndoColl = NULL; if (bUndo) @@ -80,19 +80,19 @@ BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL / // #i55926# While loading XML, formula cells only have a single string token, // so CompileDBFormula would never find any name (index) tokens, and would // unnecessarily loop through all cells. - BOOL bCompile = !pDoc->IsImportingXML(); + sal_Bool bCompile = !pDoc->IsImportingXML(); if ( bCompile ) - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString - BOOL bOk = pDocColl->Insert( pNew ); + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString + sal_Bool bOk = pDocColl->Insert( pNew ); if ( bCompile ) - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + pDoc->CompileDBFormula( sal_False ); // CompileFormulaString if (!bOk) { delete pNew; delete pUndoColl; - return FALSE; + return sal_False; } if (bUndo) @@ -104,17 +104,17 @@ BOOL ScDBDocFunc::AddDBRange( const String& rName, const ScRange& rRange, BOOL / aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); - return TRUE; + return sal_True; } -BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ ) +sal_Bool ScDBDocFunc::DeleteDBRange( const String& rName, sal_Bool /* bApi */ ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); ScDBCollection* pDocColl = pDoc->GetDBCollection(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pDocColl->SearchName( rName, nPos )) { ScDocShellModificator aModificator( rDocShell ); @@ -123,9 +123,9 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ ) if (bUndo) pUndoColl = new ScDBCollection( *pDocColl ); - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString pDocColl->AtFree( nPos ); - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + pDoc->CompileDBFormula( sal_False ); // CompileFormulaString if (bUndo) { @@ -136,21 +136,21 @@ BOOL ScDBDocFunc::DeleteDBRange( const String& rName, BOOL /* bApi */ ) aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); - bDone = TRUE; + bDone = sal_True; } return bDone; } -BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /* bApi */ ) +sal_Bool ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, sal_Bool /* bApi */ ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); ScDBCollection* pDocColl = pDoc->GetDBCollection(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); - USHORT nPos = 0; - USHORT nDummy = 0; + sal_uInt16 nPos = 0; + sal_uInt16 nDummy = 0; if ( pDocColl->SearchName( rOld, nPos ) && !pDocColl->SearchName( rNew, nDummy ) ) { @@ -162,15 +162,15 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /* ScDBCollection* pUndoColl = new ScDBCollection( *pDocColl ); - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString pDocColl->AtFree( nPos ); - BOOL bInserted = pDocColl->Insert( pNewData ); + sal_Bool bInserted = pDocColl->Insert( pNewData ); if (!bInserted) // Fehler -> alten Zustand wiederherstellen { delete pNewData; pDoc->SetDBCollection( pUndoColl ); // gehoert dann dem Dokument } - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + pDoc->CompileDBFormula( sal_False ); // CompileFormulaString if (bInserted) // Einfuegen hat geklappt { @@ -185,21 +185,21 @@ BOOL ScDBDocFunc::RenameDBRange( const String& rOld, const String& rNew, BOOL /* aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); - bDone = TRUE; + bDone = sal_True; } } return bDone; } -BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ ) +sal_Bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, sal_Bool /* bApi */ ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); ScDBCollection* pDocColl = pDoc->GetDBCollection(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pDocColl->SearchName( rNewData.GetName(), nPos )) { ScDocShellModificator aModificator( rDocShell ); @@ -209,7 +209,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ ) ScRange aOldRange, aNewRange; pData->GetArea(aOldRange); rNewData.GetArea(aNewRange); - BOOL bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden + sal_Bool bAreaChanged = ( aOldRange != aNewRange ); // dann muss neu compiliert werden ScDBCollection* pUndoColl = NULL; if (bUndo) @@ -227,7 +227,7 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ ) } aModificator.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; } return bDone; @@ -235,45 +235,45 @@ BOOL ScDBDocFunc::ModifyDBData( const ScDBData& rNewData, BOOL /* bApi */ ) // ----------------------------------------------------------------- -BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) +sal_Bool ScDBDocFunc::RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi ) { //! auch fuer ScDBFunc::RepeatDB benutzen! - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBCollection* pColl = pDoc->GetDBCollection(); - USHORT nIndex; + sal_uInt16 nIndex; if ( pColl && pColl->SearchName( rDBName, nIndex ) ) { ScDBData* pDBData = (*pColl)[nIndex]; ScQueryParam aQueryParam; pDBData->GetQueryParam( aQueryParam ); - BOOL bQuery = aQueryParam.GetEntry(0).bDoQuery; + sal_Bool bQuery = aQueryParam.GetEntry(0).bDoQuery; ScSortParam aSortParam; pDBData->GetSortParam( aSortParam ); - BOOL bSort = aSortParam.bDoSort[0]; + sal_Bool bSort = aSortParam.bDoSort[0]; ScSubTotalParam aSubTotalParam; pDBData->GetSubTotalParam( aSubTotalParam ); - BOOL bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly; + sal_Bool bSubTotal = aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly; if ( bQuery || bSort || bSubTotal ) { - BOOL bQuerySize = FALSE; + sal_Bool bQuerySize = sal_False; ScRange aOldQuery; ScRange aNewQuery; if (bQuery && !aQueryParam.bInplace) { ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow, - aQueryParam.nDestTab, TRUE ); + aQueryParam.nDestTab, sal_True ); if (pDest && pDest->IsDoSize()) { pDest->GetArea( aOldQuery ); - bQuerySize = TRUE; + bQuerySize = sal_True; } } @@ -306,22 +306,22 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol ); pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); pDoc->CopyToDocument( static_cast(nOutStartCol), 0, nTab, static_cast(nOutEndCol), MAXROW, nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); pDoc->CopyToDocument( 0, static_cast(nOutStartRow), nTab, MAXCOL, static_cast(nOutEndRow), nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); } else - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); // Datenbereich sichern - incl. Filter-Ergebnis - pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc ); + pDoc->CopyToDocument( 0,nStartRow,nTab, MAXCOL,nEndRow,nTab, IDF_ALL, sal_False, pUndoDoc ); // alle Formeln wegen Referenzen - pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, FALSE, pUndoDoc ); + pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, IDF_FORMULA, sal_False, pUndoDoc ); // DB- und andere Bereiche ScRangeName* pDocRange = pDoc->GetRangeName(); @@ -336,23 +336,23 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) { // Sortieren ohne SubTotals - aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt - DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi ); + aSubTotalParam.bRemoveOnly = sal_True; // wird unten wieder zurueckgesetzt + DoSubTotals( nTab, aSubTotalParam, NULL, sal_False, bApi ); } if (bSort) { pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben - Sort( nTab, aSortParam, FALSE, FALSE, bApi ); + Sort( nTab, aSortParam, sal_False, sal_False, bApi ); } if (bQuery) { pDBData->GetQueryParam( aQueryParam ); // Bereich kann sich geaendert haben ScRange aAdvSource; if (pDBData->GetAdvancedQuerySource(aAdvSource)) - Query( nTab, aQueryParam, &aAdvSource, FALSE, bApi ); + Query( nTab, aQueryParam, &aAdvSource, sal_False, bApi ); else - Query( nTab, aQueryParam, NULL, FALSE, bApi ); + Query( nTab, aQueryParam, NULL, sal_False, bApi ); // bei nicht-inplace kann die Tabelle umgestellt worden sein // if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab ) @@ -361,8 +361,8 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) if (bSubTotal) { pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben - aSubTotalParam.bRemoveOnly = FALSE; - DoSubTotals( nTab, aSubTotalParam, NULL, FALSE, bApi ); + aSubTotalParam.bRemoveOnly = sal_False; + DoSubTotals( nTab, aSubTotalParam, NULL, sal_False, bApi ); } if (bRecord) @@ -378,7 +378,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) if (bQuerySize) { ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow, - aQueryParam.nDestTab, TRUE ); + aQueryParam.nDestTab, sal_True ); if (pDest) { pDest->GetArea( aNewQuery ); @@ -400,7 +400,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); - bDone = TRUE; + bDone = sal_True; } else if (!bApi) // "Keine Operationen auszufuehren" rDocShell.ErrorMessage(STR_MSSG_REPEATDB_0); @@ -411,14 +411,14 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ) // ----------------------------------------------------------------- -BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, - BOOL bRecord, BOOL bPaint, BOOL bApi ) +sal_Bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; SCTAB nSrcTab = nTab; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); @@ -427,15 +427,15 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, if (!pDBData) { DBG_ERROR( "Sort: keine DBData" ); - return FALSE; + return sal_False; } ScDBData* pDestData = NULL; ScRange aOldDest; - BOOL bCopy = !rSortParam.bInplace; + sal_Bool bCopy = !rSortParam.bInplace; if ( bCopy && rSortParam.nDestCol == rSortParam.nCol1 && rSortParam.nDestRow == rSortParam.nRow1 && rSortParam.nDestTab == nTab ) - bCopy = FALSE; + bCopy = sal_False; ScSortParam aLocalParam( rSortParam ); if ( bCopy ) { @@ -444,12 +444,12 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, { if (!bApi) rDocShell.ErrorMessage(STR_PASTE_FULL); - return FALSE; + return sal_False; } nTab = rSortParam.nDestTab; pDestData = pDoc->GetDBAtCursor( rSortParam.nDestCol, rSortParam.nDestRow, - rSortParam.nDestTab, TRUE ); + rSortParam.nDestTab, sal_True ); if (pDestData) pDestData->GetArea(aOldDest); } @@ -460,7 +460,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if ( aLocalParam.bIncludePattern && pDoc->HasAttrib( @@ -471,7 +471,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, // Merge-Attribute wuerden beim Sortieren durcheinanderkommen if (!bApi) rDocShell.ErrorMessage(STR_SORT_ERR_MERGED); - return FALSE; + return sal_False; } @@ -479,11 +479,11 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - BOOL bRepeatQuery = FALSE; // bestehenden Filter wiederholen? + sal_Bool bRepeatQuery = sal_False; // bestehenden Filter wiederholen? ScQueryParam aQueryParam; pDBData->GetQueryParam( aQueryParam ); if ( aQueryParam.GetEntry(0).bDoQuery ) - bRepeatQuery = TRUE; + bRepeatQuery = sal_True; if (bRepeatQuery && bCopy) { @@ -491,7 +491,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, aQueryParam.nDestCol != rSortParam.nDestCol || aQueryParam.nDestRow != rSortParam.nDestRow || aQueryParam.nDestTab != rSortParam.nDestTab ) // Query auf selben Zielbereich? - bRepeatQuery = FALSE; + bRepeatQuery = sal_False; } ScUndoSort* pUndoAction = 0; @@ -502,7 +502,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); // Zeilenhoehen immer (wegen automatischer Anpassung) //! auf ScBlockUndo umstellen - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); /* #i59745# Do not copy note captions to undo document. All existing caption objects will be repositioned while sorting which is tracked @@ -511,7 +511,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, existing captions) will be copied back into the source document. */ pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nTab, aLocalParam.nCol2, aLocalParam.nRow2, nTab, - IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc ); + IDF_ALL|IDF_NOCAPTIONS, sal_False, pUndoDoc ); const ScRange* pR = 0; if (pDestData) @@ -522,7 +522,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, caption objects are reinserted with drawing undo, and the cells with the old notes (which still refer to the existing captions) will be copied back into the source document. */ - pDoc->CopyToDocument( aOldDest, IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aOldDest, IDF_ALL|IDF_NOCAPTIONS, sal_False, pUndoDoc ); pR = &aOldDest; } @@ -530,7 +530,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, //! auf ScBlockUndo umstellen // if (bRepeatQuery) pDoc->CopyToDocument( 0, aLocalParam.nRow1, nTab, MAXCOL, aLocalParam.nRow2, nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); ScDBCollection* pUndoDB = NULL; ScDBCollection* pDocDB = pDoc->GetDBCollection(); @@ -554,21 +554,21 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, rSortParam.nCol2,rSortParam.nRow2,nSrcTab ); ScAddress aDest( rSortParam.nDestCol, rSortParam.nDestRow, rSortParam.nDestTab ); - rDocShell.GetDocFunc().MoveBlock( aSource, aDest, FALSE, FALSE, FALSE, TRUE ); + rDocShell.GetDocFunc().MoveBlock( aSource, aDest, sal_False, sal_False, sal_False, sal_True ); } // #105780# don't call ScDocument::Sort with an empty SortParam (may be empty here if bCopy is set) if ( aLocalParam.bDoSort[0] ) pDoc->Sort( nTab, aLocalParam, bRepeatQuery ); - BOOL bSave = TRUE; + sal_Bool bSave = sal_True; if (bCopy) { ScSortParam aOldSortParam; pDBData->GetSortParam( aOldSortParam ); if ( aOldSortParam.bDoSort[0] && aOldSortParam.bInplace ) // Inplace-Sortierung gemerkt? { - bSave = FALSE; + bSave = sal_False; aOldSortParam.nDestCol = rSortParam.nDestCol; aOldSortParam.nDestRow = rSortParam.nDestRow; aOldSortParam.nDestTab = rSortParam.nDestTab; @@ -615,7 +615,7 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, if (bPaint) { - USHORT nPaint = PAINT_GRID; + sal_uInt16 nPaint = PAINT_GRID; SCCOL nStartX = aLocalParam.nCol1; SCROW nStartY = aLocalParam.nRow1; SCCOL nEndX = aLocalParam.nCol2; @@ -645,25 +645,25 @@ BOOL ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } // ----------------------------------------------------------------- -BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, - const ScRange* pAdvSource, BOOL bRecord, BOOL bApi ) +sal_Bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, + const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rQueryParam.nCol1, rQueryParam.nRow1, rQueryParam.nCol2, rQueryParam.nRow2 ); if (!pDBData) { DBG_ERROR( "Query: keine DBData" ); - return FALSE; + return sal_False; } // Wechsel von Inplace auf nicht-Inplace, dann erst Inplace aufheben: @@ -679,23 +679,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, SCSIZE nEC = aOldQuery.GetEntryCount(); for (SCSIZE i=0; iGetDBAtCursor( rQueryParam.nDestCol, rQueryParam.nDestRow, - rQueryParam.nDestTab, TRUE ); + rQueryParam.nDestTab, sal_True ); if (pDestData) { pDestData->GetArea( aOldDest ); @@ -746,7 +746,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, { if (!bApi) rDocShell.ErrorMessage(STR_MSSG_DOSUBTOTALS_2); // kann keine Zeilen einfuegen - return FALSE; + return sal_False; } } } @@ -755,14 +755,14 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, WaitObject aWait( rDocShell.GetActiveDialogParent() ); - BOOL bKeepSub = FALSE; // bestehende Teilergebnisse wiederholen? + sal_Bool bKeepSub = sal_False; // bestehende Teilergebnisse wiederholen? ScSubTotalParam aSubTotalParam; if (rQueryParam.GetEntry(0).bDoQuery) // nicht beim Aufheben { pDBData->GetSubTotalParam( aSubTotalParam ); // Teilergebnisse vorhanden? if ( aSubTotalParam.bGroupActive[0] && !aSubTotalParam.bRemoveOnly ) - bKeepSub = TRUE; + bKeepSub = sal_True; } ScDocument* pUndoDoc = NULL; @@ -774,23 +774,23 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); if (bCopy) { - pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nDestTab, nDestTab, sal_False, sal_True ); pDoc->CopyToDocument( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab, aLocalParam.nCol2, aLocalParam.nRow2, nDestTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); // Attribute sichern, falls beim Filtern mitkopiert if (pDestData) { - pDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aOldDest, IDF_ALL, sal_False, pUndoDoc ); pOld = &aOldDest; } } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); pDoc->CopyToDocument( 0, rQueryParam.nRow1, nTab, MAXCOL, rQueryParam.nRow2, nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); } ScDBCollection* pDocDB = pDoc->GetDBCollection(); @@ -817,8 +817,8 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, aAttribRange.aEnd.SetCol( aAttribRange.aEnd.Col() + nFormulaCols ); pAttribDoc = new ScDocument( SCDOCMODE_UNDO ); - pAttribDoc->InitUndo( pDoc, nDestTab, nDestTab, FALSE, TRUE ); - pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, FALSE, pAttribDoc ); + pAttribDoc->InitUndo( pDoc, nDestTab, nDestTab, sal_False, sal_True ); + pDoc->CopyToDocument( aAttribRange, IDF_ATTRIB, sal_False, pAttribDoc ); } if ( bDoSize ) @@ -842,7 +842,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, ScRange aNewDest( aLocalParam.nCol1, aLocalParam.nRow1, nDestTab, aLocalParam.nCol2, aLocalParam.nRow2, nDestTab ); - pDoc->FitBlock( aDestTotal, aNewDest, FALSE ); // FALSE - nicht loeschen + pDoc->FitBlock( aDestTotal, aNewDest, sal_False ); // sal_False - nicht loeschen if ( nFormulaCols > 0 ) { @@ -853,7 +853,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, aLocalParam.nCol2+nFormulaCols, aLocalParam.nRow2, nDestTab ); ScRange aOldForm = aNewForm; aOldForm.aEnd.SetRow( aOldDest.aEnd.Row() ); - pDoc->FitBlock( aOldForm, aNewForm, FALSE ); + pDoc->FitBlock( aOldForm, aNewForm, sal_False ); ScMarkData aMark; aMark.SelectOneTable(nDestTab); @@ -872,7 +872,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, { ScRange aHdrRange = aAttribRange; aHdrRange.aEnd.SetRow( aHdrRange.aStart.Row() ); - pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, FALSE, pDoc ); + pAttribDoc->CopyToDocument( aHdrRange, IDF_ATTRIB, sal_False, pDoc ); } // Daten @@ -899,7 +899,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, // speichern: Inplace immer, sonst je nach Einstellung // alter Inplace-Filter ist ggf. schon aufgehoben - BOOL bSave = rQueryParam.bInplace || rQueryParam.bDestPers; + sal_Bool bSave = rQueryParam.bInplace || rQueryParam.bDestPers; if (bSave) // merken { pDBData->SetQueryParam( rQueryParam ); @@ -977,31 +977,31 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, PAINT_GRID | PAINT_LEFT ); aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } // ----------------------------------------------------------------- -BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, - const ScSortParam* pForceNewSort, BOOL bRecord, BOOL bApi ) +sal_Bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, + const ScSortParam* pForceNewSort, sal_Bool bRecord, sal_Bool bApi ) { //! auch fuer ScDBFunc::DoSubTotals benutzen! // dann bleibt aussen: // - neuen Bereich (aus DBData) markieren // - SelectionChanged (?) - BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen - BOOL bRet = FALSE; + sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen + sal_Bool bRet = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1, rParam.nCol2, rParam.nRow2 ); if (!pDBData) { DBG_ERROR( "SubTotals: keine DBData" ); - return FALSE; + return sal_False; } ScEditableTester aTester( pDoc, nTab, 0,rParam.nRow1+1, MAXCOL,MAXROW ); @@ -1009,7 +1009,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if (pDoc->HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab, @@ -1017,15 +1017,15 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, { if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen - return FALSE; + return sal_False; } - BOOL bOk = TRUE; - BOOL bDelete = FALSE; + sal_Bool bOk = sal_True; + sal_Bool bDelete = sal_False; if (rParam.bReplace) if (pDoc->TestRemoveSubTotals( nTab, rParam )) { - bDelete = TRUE; + bDelete = sal_True; bOk = ( MessBox( rDocShell.GetActiveDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), @@ -1047,7 +1047,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (bRecord) // alte Daten sichern { - BOOL bOldFilter = bDo && rParam.bDoSort; + sal_Bool bOldFilter = bDo && rParam.bDoSort; nTabCount = pDoc->GetTableCount(); pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -1062,20 +1062,20 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol ); pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( static_cast(nOutStartCol), 0, nTab, static_cast(nOutEndCol), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); - pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( static_cast(nOutStartCol), 0, nTab, static_cast(nOutEndCol), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); } else - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, bOldFilter ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, bOldFilter ); // Datenbereich sichern - incl. Filter-Ergebnis pDoc->CopyToDocument( 0,rParam.nRow1+1,nTab, MAXCOL,rParam.nRow2,nTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); // alle Formeln wegen Referenzen pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, - IDF_FORMULA, FALSE, pUndoDoc ); + IDF_FORMULA, sal_False, pUndoDoc ); // DB- und andere Bereiche ScRangeName* pDocRange = pDoc->GetRangeName(); @@ -1093,7 +1093,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (rParam.bReplace) pDoc->RemoveSubTotals( nTab, aNewParam ); - BOOL bSuccess = TRUE; + sal_Bool bSuccess = sal_True; if (bDo) { // Sortieren @@ -1107,7 +1107,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, ScSortParam aOldSort; pDBData->GetSortParam( aOldSort ); ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort ); - Sort( nTab, aSortParam, FALSE, FALSE, bApi ); + Sort( nTab, aSortParam, sal_False, sal_False, bApi ); } bSuccess = pDoc->DoSubTotals( nTab, aNewParam ); @@ -1149,7 +1149,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, //================================================================== -BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rExcept ) +sal_Bool lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rExcept ) { ScCellIterator aIter( pDoc, rRange ); ScBaseCell* pCell = aIter.GetFirst(); @@ -1158,23 +1158,23 @@ BOOL lcl_EmptyExcept( ScDocument* pDoc, const ScRange& rRange, const ScRange& rE if ( !pCell->IsBlank() ) // real content? { if ( !rExcept.In( ScAddress( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ) ) ) - return FALSE; // cell found + return sal_False; // cell found } pCell = aIter.GetNext(); } - return TRUE; // nothing found - empty + return sal_True; // nothing found - empty } -BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj, - BOOL bRecord, BOOL bApi, BOOL bAllowMove ) +sal_Bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj, + sal_Bool bRecord, sal_Bool bApi, sal_Bool bAllowMove ) { ScDocShellModificator aModificator( rDocShell ); WaitObject aWait( rDocShell.GetActiveDialogParent() ); - BOOL bDone = FALSE; - BOOL bUndoSelf = FALSE; - USHORT nErrId = 0; + sal_Bool bDone = sal_False; + sal_Bool bUndoSelf = sal_False; + sal_uInt16 nErrId = 0; ScDocument* pOldUndoDoc = NULL; ScDocument* pNewUndoDoc = NULL; @@ -1184,7 +1184,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if ( !rDocShell.IsEditable() || pDoc->GetChangeTrack() ) { // not recorded -> disallow @@ -1225,7 +1225,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb { pOldUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pOldUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pOldUndoDoc ); + pDoc->CopyToDocument( aRange, IDF_ALL, sal_False, pOldUndoDoc ); } pDoc->DeleteAreaTab( aRange.aStart.Col(), aRange.aStart.Row(), @@ -1241,7 +1241,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb rDocShell.PostPaint( aRange.aStart.Col(), aRange.aStart.Row(), nTab, aRange.aEnd.Col(), aRange.aEnd.Row(), nTab, PAINT_GRID ); - bDone = TRUE; + bDone = sal_True; } else if ( pNewObj ) { @@ -1253,7 +1253,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb SCTAB nTab = aRange.aStart.Tab(); pOldUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pOldUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pOldUndoDoc ); + pDoc->CopyToDocument( aRange, IDF_ALL, sal_False, pOldUndoDoc ); } if ( pNewObj == pOldObj ) @@ -1285,7 +1285,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb if ( pDoc->GetDPCollection()->GetByName(pDestObj->GetName()) ) pDestObj->SetName( String() ); // ignore the invalid name, create a new name below - pDestObj->SetAlive(TRUE); + pDestObj->SetAlive(sal_True); if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) ) { DBG_ERROR("cannot insert DPObject"); @@ -1306,7 +1306,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb if ( !pDestObj->GetName().Len() ) pDestObj->SetName( pDoc->GetDPCollection()->CreateNewName() ); - BOOL bOverflow = FALSE; + sal_Bool bOverflow = sal_False; ScRange aNewOut = pDestObj->GetNewOutputRange( bOverflow ); //! test for overlap with other data pilot tables @@ -1320,7 +1320,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb aNewOut.aStart.SetRow( aOldRange.aStart.Row() ); aNewOut.aEnd.SetRow( aNewOut.aEnd.Row()+nDiff ); if( !ValidRow( aNewOut.aStart.Row() ) || !ValidRow( aNewOut.aEnd.Row() ) ) - bOverflow = TRUE; + bOverflow = sal_True; } } @@ -1328,7 +1328,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb { // like with STR_PROTECTIONERR, use undo to reverse everything DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" ); - bUndoSelf = TRUE; + bUndoSelf = sal_True; nErrId = STR_PIVOT_ERROR; } else @@ -1342,7 +1342,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb // quick solution: proceed to end, use undo action // to reverse everything: DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" ); - bUndoSelf = TRUE; + bUndoSelf = sal_True; nErrId = aTester.GetMessageId(); } } @@ -1350,7 +1350,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb // test if new output area is empty except for old area if ( !bApi ) { - BOOL bEmpty; + sal_Bool bEmpty; if ( pOldObj ) // OutRange of pOldObj (pDestObj) is still old area bEmpty = lcl_EmptyExcept( pDoc, aNewOut, pOldObj->GetOutRange() ); else @@ -1366,7 +1366,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb { //! like above (not editable), use undo to reverse everything DBG_ASSERT( bRecord, "DataPilotUpdate: can't undo" ); - bUndoSelf = TRUE; + bUndoSelf = sal_True; } } } @@ -1376,13 +1376,13 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb SCTAB nTab = aNewOut.aStart.Tab(); pNewUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pNewUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( aNewOut, IDF_ALL, FALSE, pNewUndoDoc ); + pDoc->CopyToDocument( aNewOut, IDF_ALL, sal_False, pNewUndoDoc ); } pDestObj->Output( aNewOut.aStart ); rDocShell.PostPaintGridAll(); //! only necessary parts - bDone = TRUE; + bDone = sal_True; } } // else nothing (no old, no new) @@ -1403,7 +1403,7 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb pAction->Undo(); delete pAction; - bDone = FALSE; + bDone = sal_False; } else rDocShell.GetUndoManager()->AddUndoAction( pAction ); @@ -1432,8 +1432,8 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb // Datenbank-Import... void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName, - const String& rTableName, const String& rStatement, BOOL bNative, - BYTE nType, const ::com::sun::star::uno::Reference< + const String& rTableName, const String& rStatement, sal_Bool bNative, + sal_uInt8 nType, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& xResultSet, const SbaSelectionList* pSelection ) { @@ -1443,13 +1443,13 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName, ScDBCollection& rDBColl = *pDoc->GetDBCollection(); ScDBData* pData = NULL; ScImportParam aImportParam; - BOOL bFound = FALSE; - USHORT nCount = rDBColl.GetCount(); - for (USHORT i=0; iGetName() == rTarget) - bFound = TRUE; + bFound = sal_True; } if (!bFound) { @@ -1465,15 +1465,15 @@ void ScDBDocFunc::UpdateImport( const String& rTarget, const String& rDBName, pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow ); pData->GetImportParam( aImportParam ); - BOOL bSql = ( rStatement.Len() != 0 ); + sal_Bool bSql = ( rStatement.Len() != 0 ); aImportParam.aDBName = rDBName; aImportParam.bSql = bSql; aImportParam.aStatement = bSql ? rStatement : rTableName; aImportParam.bNative = bNative; aImportParam.nType = nType; - aImportParam.bImport = TRUE; - BOOL bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, TRUE ); + aImportParam.bImport = sal_True; + sal_Bool bContinue = DoImport( nTab, aImportParam, xResultSet, pSelection, sal_True ); // DB-Operationen wiederholen diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index a073e50d105c..2537bfa0be56 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -118,15 +118,15 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram // ----------------------------------------------------------------- -BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, +sal_Bool ScDBDocFunc::DoImportUno( const ScAddress& rPos, const uno::Sequence& aArgs ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScImportParam aImParam; aImParam.nCol1 = aImParam.nCol2 = rPos.Col(); aImParam.nRow1 = aImParam.nRow2 = rPos.Row(); - aImParam.bImport = TRUE; + aImParam.bImport = sal_True; uno::Reference xResSet; uno::Sequence aSelection; @@ -156,7 +156,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, if ( rProp.Value >>= nType ) { aImParam.bSql = ( nType == sdb::CommandType::COMMAND ); - aImParam.nType = sal::static_int_cast( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable ); + aImParam.nType = sal::static_int_cast( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable ); // nType is ignored if bSql is set } } @@ -179,10 +179,10 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, aList.Insert( (void*)nEntry, LIST_APPEND ); } - BOOL bAddrInsert = FALSE; //!??? + sal_Bool bAddrInsert = sal_False; //!??? if ( bAddrInsert ) { - bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, TRUE, bAddrInsert ); + bDone = DoImport( rPos.Tab(), aImParam, xResSet, &aList, sal_True, bAddrInsert ); } else { @@ -203,7 +203,7 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, UpdateImport( sTarget, aImParam.aDBName, aTableName, aStatement, aImParam.bNative, aImParam.nType, xResSet, &aList ); - bDone = TRUE; + bDone = sal_True; } return bDone; @@ -211,14 +211,14 @@ BOOL ScDBDocFunc::DoImportUno( const ScAddress& rPos, // ----------------------------------------------------------------- -BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, +sal_Bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, const uno::Reference< sdbc::XResultSet >& xResultSet, - const SbaSelectionList* pSelection, BOOL bRecord, BOOL bAddrInsert ) + const SbaSelectionList* pSelection, sal_Bool bRecord, sal_Bool bAddrInsert ) { ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBData* pDBData = 0; if ( !bAddrInsert ) @@ -228,7 +228,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (!pDBData) { DBG_ERROR( "DoImport: no DBData" ); - return FALSE; + return sal_False; } } @@ -237,10 +237,10 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, pWaitWin->EnterWait(); ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; - BOOL bApi = FALSE; //! pass as argument - BOOL bTruncated = FALSE; // for warning - USHORT nErrStringId = 0; + sal_Bool bSuccess = sal_False; + sal_Bool bApi = sal_False; //! pass as argument + sal_Bool bTruncated = sal_False; // for warning + sal_uInt16 nErrStringId = 0; String aErrorMessage; SCCOL nCol = rParam.nCol1; @@ -249,23 +249,23 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, SCROW nEndRow = nRow; long i; - BOOL bDoSelection = FALSE; - BOOL bRealSelection = FALSE; // TRUE if not everything is selected - ULONG nListPos = 0; - ULONG nRowsRead = 0; - ULONG nListCount = 0; + sal_Bool bDoSelection = sal_False; + sal_Bool bRealSelection = sal_False; // sal_True if not everything is selected + sal_uLong nListPos = 0; + sal_uLong nRowsRead = 0; + sal_uLong nListCount = 0; // -1 is special if ( pSelection && pSelection->Count() && (long)pSelection->GetObject(0) != -1L ) { - bDoSelection = TRUE; + bDoSelection = sal_True; nListCount = pSelection->Count(); } // ImportDoc - also used for Redo ScDocument* pImportDoc = new ScDocument( SCDOCMODE_UNDO ); pImportDoc->InitUndo( pDoc, nTab, nTab ); - ScColumn::bDoubleAlloc = TRUE; + ScColumn::bDoubleAlloc = sal_True; // // get data from database into import document @@ -276,7 +276,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, // progress bar // only text (title is still needed, for the cancel button) ScProgress aProgress( &rDocShell, ScGlobal::GetRscString(STR_UNDO_IMPORTDATA), 0 ); - USHORT nInserted = 0; + sal_uInt16 nInserted = 0; uno::Reference xRowSet = uno::Reference( xResultSet, uno::UNO_QUERY ); @@ -373,7 +373,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, ++nRow; } - BOOL bEnd = FALSE; + sal_Bool bEnd = sal_False; if ( !bDoSelection ) xRowSet->beforeFirst(); while ( !bEnd ) @@ -381,23 +381,23 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, // skip rows that are not selected if ( !bDoSelection ) { - if ( (bEnd = !xRowSet->next()) == FALSE ) + if ( (bEnd = !xRowSet->next()) == sal_False ) ++nRowsRead; } else { if (nListPos < nListCount) { - ULONG nNextRow = (ULONG) pSelection->GetObject(nListPos); + sal_uLong nNextRow = (sal_uLong) pSelection->GetObject(nListPos); if ( nRowsRead+1 < nNextRow ) - bRealSelection = TRUE; + bRealSelection = sal_True; bEnd = !xRowSet->absolute(nRowsRead = nNextRow); ++nListPos; } else { bRealSelection = xRowSet->next(); - bEnd = TRUE; // more data available but not used + bEnd = sal_True; // more data available but not used } } @@ -427,21 +427,21 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (!aProgress.SetStateText( 0, aText )) // stopped by user? { - bEnd = TRUE; - bSuccess = FALSE; + bEnd = sal_True; + bSuccess = sal_False; nErrStringId = STR_DATABASE_ABORTED; } } } else // past the end of the spreadsheet { - bEnd = TRUE; // don't continue - bTruncated = TRUE; // warning flag + bEnd = sal_True; // don't continue + bTruncated = sal_True; // warning flag } } } - bSuccess = TRUE; + bSuccess = sal_True; } if ( bDispose ) @@ -457,15 +457,15 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, DBG_ERROR("Unexpected exception in database"); } - ScColumn::bDoubleAlloc = FALSE; + ScColumn::bDoubleAlloc = sal_False; pImportDoc->DoColResize( nTab, rParam.nCol1,nEndCol, 0 ); // // test for cell protection // - BOOL bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt(); - BOOL bMoveCells = !bAddrInsert && pDBData->IsDoSize(); + sal_Bool bKeepFormat = !bAddrInsert && pDBData->IsKeepFmt(); + sal_Bool bMoveCells = !bAddrInsert && pDBData->IsDoSize(); SCCOL nFormulaCols = 0; // columns to be filled with formulas if (bMoveCells && nEndCol == rParam.nCol2) { @@ -488,12 +488,12 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if ( !aTester.IsEditable() ) { nErrStringId = aTester.GetMessageId(); - bSuccess = FALSE; + bSuccess = sal_False; } else if ( pDoc->GetChangeTrack() != NULL ) { nErrStringId = STR_PROTECTIONERR; - bSuccess = FALSE; + bSuccess = sal_False; } } @@ -506,7 +506,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (!pDoc->CanFitBlock( aOld, aNew )) { nErrStringId = STR_MSSG_DOSUBTOTALS_2; // can't insert cells - bSuccess = FALSE; + bSuccess = sal_False; } } @@ -526,7 +526,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, IDF_ATTRIB ); pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab, nMinEndCol, rParam.nRow1, nTab, - IDF_ATTRIB, FALSE, pImportDoc ); + IDF_ATTRIB, sal_False, pImportDoc ); SCROW nDataStartRow = rParam.nRow1+1; for (SCCOL nCopyCol=rParam.nCol1; nCopyCol<=nMinEndCol; nCopyCol++) @@ -546,7 +546,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (pDoc->IsTabProtected(nTab)) { ScPatternAttr aPattern(pImportDoc->GetPool()); - aPattern.GetItemSet().Put( ScProtectionAttr( FALSE,FALSE,FALSE,FALSE ) ); + aPattern.GetItemSet().Put( ScProtectionAttr( sal_False,sal_False,sal_False,sal_False ) ); pImportDoc->ApplyPatternAreaTab( 0,0,MAXCOL,MAXROW, nTab, aPattern ); } @@ -579,15 +579,15 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, // nFormulaCols is set only if column count is unchanged pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab, nEndCol+nFormulaCols, nEndRow, nTab, - nCopyFlags, FALSE, pUndoDoc ); + nCopyFlags, sal_False, pUndoDoc ); if ( rParam.nCol2 > nEndCol ) pDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab, nUndoEndCol, nUndoEndRow, nTab, - nCopyFlags, FALSE, pUndoDoc ); + nCopyFlags, sal_False, pUndoDoc ); if ( rParam.nRow2 > nEndRow ) pDoc->CopyToDocument( rParam.nCol1, nEndRow+1, nTab, nUndoEndCol+nFormulaCols, nUndoEndRow, nTab, - nCopyFlags, FALSE, pUndoDoc ); + nCopyFlags, sal_False, pUndoDoc ); } // @@ -607,7 +607,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, rParam.nCol2+nFormulaCols, rParam.nRow2, nTab ); ScRange aNew( rParam.nCol1, rParam.nRow1, nTab, nEndCol+nFormulaCols, nEndRow, nTab ); - pDoc->FitBlock( aOld, aNew, FALSE ); // Formeln nicht loeschen + pDoc->FitBlock( aOld, aNew, sal_False ); // Formeln nicht loeschen } else if ( nEndCol < rParam.nCol2 ) // DeleteArea calls PutInOrder pDoc->DeleteArea( nEndCol+1, rParam.nRow1, rParam.nCol2, rParam.nRow2, @@ -617,12 +617,12 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, pDoc->DeleteAreaTab( rParam.nCol1, rParam.nRow1, nEndCol, nEndRow, nTab, IDF_CONTENTS & ~IDF_NOTE ); // #41216# remove each column from ImportDoc after copying to reduce memory usage - BOOL bOldAutoCalc = pDoc->GetAutoCalc(); - pDoc->SetAutoCalc( FALSE ); // outside of the loop + sal_Bool bOldAutoCalc = pDoc->GetAutoCalc(); + pDoc->SetAutoCalc( sal_False ); // outside of the loop for (SCCOL nCopyCol = rParam.nCol1; nCopyCol <= nEndCol; nCopyCol++) { pImportDoc->CopyToDocument( nCopyCol, rParam.nRow1, nTab, nCopyCol, nEndRow, nTab, - IDF_ALL, FALSE, pDoc ); + IDF_ALL, sal_False, pDoc ); pImportDoc->DeleteAreaTab( nCopyCol, rParam.nRow1, nCopyCol, nEndRow, nTab, IDF_CONTENTS ); pImportDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 ); } @@ -633,7 +633,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (bKeepFormat) // formats for formulas pImportDoc->CopyToDocument( nEndCol+1, rParam.nRow1, nTab, nEndCol+nFormulaCols, nEndRow, nTab, - IDF_ATTRIB, FALSE, pDoc ); + IDF_ATTRIB, sal_False, pDoc ); // fill formulas ScMarkData aMark; aMark.SelectOneTable(nTab); @@ -656,8 +656,8 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if( !bAddrInsert ) // update database range { pDBData->SetImportParam( rParam ); - pDBData->SetHeader( TRUE ); - pDBData->SetByRow( TRUE ); + pDBData->SetHeader( sal_True ); + pDBData->SetByRow( sal_True ); pDBData->SetArea( nTab, rParam.nCol1,rParam.nRow1, nEndCol,nEndRow ); pDBData->SetImportSelection( bRealSelection ); pDoc->CompileDBFormula(); @@ -671,7 +671,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if (nFormulaCols > 0) // include filled formulas for redo pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab, nEndCol+nFormulaCols, nEndRow, nTab, - IDF_ALL & ~IDF_NOTE, FALSE, pRedoDoc ); + IDF_ALL & ~IDF_NOTE, sal_False, pRedoDoc ); ScDBData* pRedoDBData = pDBData ? new ScDBData( *pDBData ) : NULL; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 038d0a72e824..fa219689d933 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -126,7 +126,7 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction ) SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTabIsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); return 0; } @@ -148,17 +148,17 @@ void lcl_PaintAbove( ScDocShell& rDocShell, const ScRange& rRange ) //------------------------------------------------------------------------ -BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint ) +sal_Bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint ) { ScDocument* pDoc = rDocShell.GetDocument(); if ( pDoc->IsImportingXML() ) { // for XML import, all row heights are updated together after importing - return FALSE; + return sal_False; } if ( !pDoc->IsAdjustHeightEnabled() ) { - return FALSE; + return sal_False; } SCTAB nTab = rRange.aStart.Tab(); @@ -168,8 +168,8 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint ) ScSizeDeviceProvider aProv( &rDocShell ); Fraction aOne(1,1); - BOOL bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(), - aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, FALSE ); + sal_Bool bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(), + aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, sal_False ); if ( bPaint && bChanged ) rDocShell.PostPaint( 0, nStartRow, nTab, MAXCOL, MAXROW, nTab, @@ -181,13 +181,13 @@ BOOL ScDocFunc::AdjustRowHeight( const ScRange& rRange, BOOL bPaint ) //------------------------------------------------------------------------ -BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos) +sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos) { ScDocShellModificator aModificator( rDocShell ); rDocShell.MakeDrawLayer(); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); SCCOL nCol = rPos.Col(); SCROW nRow = rPos.Row(); @@ -195,7 +195,7 @@ BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos) if (bUndo) pModel->BeginCalcUndo(); - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow ); + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -219,14 +219,14 @@ BOOL ScDocFunc::DetectiveAddPred(const ScAddress& rPos) return bDone; } -BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos) +sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos) { ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) - return FALSE; + return sal_False; ScDocShellModificator aModificator( rDocShell ); @@ -236,7 +236,7 @@ BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos) if (bUndo) pModel->BeginCalcUndo(); - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow ); + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -260,14 +260,14 @@ BOOL ScDocFunc::DetectiveDelPred(const ScAddress& rPos) return bDone; } -BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) +sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) { ScDocShellModificator aModificator( rDocShell ); rDocShell.MakeDrawLayer(); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); SCCOL nCol = rPos.Col(); SCROW nRow = rPos.Row(); @@ -275,7 +275,7 @@ BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) if (bUndo) pModel->BeginCalcUndo(); - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow ); + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -299,14 +299,14 @@ BOOL ScDocFunc::DetectiveAddSucc(const ScAddress& rPos) return bDone; } -BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) +sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) { ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) - return FALSE; + return sal_False; ScDocShellModificator aModificator( rDocShell ); @@ -316,7 +316,7 @@ BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) if (bUndo) pModel->BeginCalcUndo(); - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow ); + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -340,14 +340,14 @@ BOOL ScDocFunc::DetectiveDelSucc(const ScAddress& rPos) return bDone; } -BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos) +sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos) { ScDocShellModificator aModificator( rDocShell ); rDocShell.MakeDrawLayer(); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); SCCOL nCol = rPos.Col(); SCROW nRow = rPos.Row(); @@ -355,7 +355,7 @@ BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos) if (bUndo) pModel->BeginCalcUndo(); - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow ); + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -379,14 +379,14 @@ BOOL ScDocFunc::DetectiveAddError(const ScAddress& rPos) return bDone; } -BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) +sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) { ScDocShellModificator aModificator( rDocShell ); rDocShell.MakeDrawLayer(); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); Window* pWaitWin = rDocShell.GetActiveDialogParent(); @@ -394,8 +394,8 @@ BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) pWaitWin->EnterWait(); if (bUndo) pModel->BeginCalcUndo(); - BOOL bOverflow; - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow ); + sal_Bool bOverflow; + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -421,20 +421,20 @@ BOOL ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) return bDone; } -BOOL ScDocFunc::DetectiveDelAll(SCTAB nTab) +sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab) { ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) - return FALSE; + return sal_False; ScDocShellModificator aModificator( rDocShell ); if (bUndo) pModel->BeginCalcUndo(); - BOOL bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE ); + sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE ); SdrUndoGroup* pUndo = NULL; if (bUndo) pUndo = pModel->GetCalcUndo(); @@ -463,12 +463,12 @@ BOOL ScDocFunc::DetectiveDelAll(SCTAB nTab) return bDone; } -BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic ) +sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScDetOpList* pList = pDoc->GetDetOpList(); if ( pList && pList->Count() ) { @@ -485,8 +485,8 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic ) // Wiederholen - USHORT nCount = pList->Count(); - for (USHORT i=0; iCount(); + for (sal_uInt16 i=0; iIsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScEditableTester aTester( pDoc, rMark ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScRange aMarkRange; - BOOL bSimple = FALSE; + sal_Bool bSimple = sal_False; ScMarkData aMultiMark = rMark; - aMultiMark.SetMarking(FALSE); // fuer MarkToMulti + aMultiMark.SetMarking(sal_False); // fuer MarkToMulti ScDocument* pUndoDoc = NULL; - BOOL bMulti = !bSimple && aMultiMark.IsMultiMarked(); + sal_Bool bMulti = !bSimple && aMultiMark.IsMultiMarked(); if (!bSimple) { aMultiMark.MarkToMulti(); @@ -578,22 +578,22 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags, ScRange aExtendedRange(aMarkRange); if (!bSimple) { - if ( pDoc->ExtendMerge( aExtendedRange, TRUE ) ) - bMulti = FALSE; + if ( pDoc->ExtendMerge( aExtendedRange, sal_True ) ) + bMulti = sal_False; } // keine Objekte auf geschuetzten Tabellen - BOOL bObjects = FALSE; + sal_Bool bObjects = sal_False; if ( nFlags & IDF_OBJECTS ) { - bObjects = TRUE; + bObjects = sal_True; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTabIsTabProtected(nTab)) - bObjects = FALSE; + bObjects = sal_False; } - USHORT nExtFlags = 0; // extra flags are needed only if attributes are deleted + sal_uInt16 nExtFlags = 0; // extra flags are needed only if attributes are deleted if ( nFlags & IDF_ATTRIB ) rDocShell.UpdatePaintExt( nExtFlags, aMarkRange ); @@ -624,7 +624,7 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags, // bei "Format/Standard" alle Attribute kopieren, weil CopyToDocument // nur mit IDF_HARDATTR zu langsam ist: - USHORT nUndoDocFlags = nFlags; + sal_uInt16 nUndoDocFlags = nFlags; if (nFlags & IDF_ATTRIB) nUndoDocFlags |= IDF_ATTRIB; if (nFlags & IDF_EDITATTR) // Edit-Engine-Attribute @@ -674,31 +674,31 @@ BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags, } #endif - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, - BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, + sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScEditableTester aTester( pDoc, rMark ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScRange aMarkRange; ScMarkData aMultiMark = rMark; - aMultiMark.SetMarking(FALSE); // for MarkToMulti + aMultiMark.SetMarking(sal_False); // for MarkToMulti aMultiMark.MarkToMulti(); aMultiMark.GetMultiMarkArea( aMarkRange ); @@ -716,7 +716,7 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pUndoDoc, &aMultiMark ); + pDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pUndoDoc, &aMultiMark ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoTransliterate( &rDocShell, aMultiMark, pUndoDoc, nType ) ); @@ -729,31 +729,31 @@ BOOL ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi ) +sal_Bool ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScEditableTester aTester( pDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } SCTAB* pTabs = NULL; ScBaseCell** ppOldCells = NULL; - BOOL* pHasFormat = NULL; - ULONG* pOldFormats = NULL; + sal_Bool* pHasFormat = NULL; + sal_uLong* pOldFormats = NULL; ScBaseCell* pDocCell = pDoc->GetCell( rPos ); - BOOL bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT); + sal_Bool bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT); if (bUndo) { pTabs = new SCTAB[1]; @@ -761,18 +761,18 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO ppOldCells = new ScBaseCell*[1]; ppOldCells[0] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0; - pHasFormat = new BOOL[1]; - pOldFormats = new ULONG[1]; + pHasFormat = new sal_Bool[1]; + pOldFormats = new sal_uLong[1]; const SfxPoolItem* pItem; const ScPatternAttr* pPattern = pDoc->GetPattern( rPos.Col(),rPos.Row(),rPos.Tab() ); if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState( - ATTR_VALUE_FORMAT,FALSE,&pItem) ) + ATTR_VALUE_FORMAT,sal_False,&pItem) ) { - pHasFormat[0] = TRUE; + pHasFormat[0] = sal_True; pOldFormats[0] = ((const SfxUInt32Item*)pItem)->GetValue(); } else - pHasFormat[0] = FALSE; + pHasFormat[0] = sal_False; } pDoc->SetString( rPos.Col(), rPos.Row(), rPos.Tab(), rText ); @@ -794,15 +794,15 @@ BOOL ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText, BOO if (bApi) NotifyInputHandler( rPos ); - return TRUE; + return sal_True; } -BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi ) +sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); - BOOL bXMLLoading(pDoc->IsImportingXML()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); + sal_Bool bXMLLoading(pDoc->IsImportingXML()); // #i925#; it is not neccessary to test whether the cell is editable on loading a XML document if (!bXMLLoading) @@ -813,14 +813,14 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); pNewCell->Delete(); - return FALSE; + return sal_False; } } - BOOL bEditCell = ( pNewCell->GetCellType() == CELLTYPE_EDIT ); + sal_Bool bEditCell = ( pNewCell->GetCellType() == CELLTYPE_EDIT ); ScBaseCell* pDocCell = pDoc->GetCell( rPos ); - BOOL bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT); - BOOL bHeight = ( bEditDeleted || bEditCell || + sal_Bool bEditDeleted = (pDocCell && pDocCell->GetCellType() == CELLTYPE_EDIT); + sal_Bool bHeight = ( bEditDeleted || bEditCell || pDoc->HasAttrib( ScRange(rPos), HASATTR_NEEDHEIGHT ) ); ScBaseCell* pUndoCell = (bUndo && pDocCell) ? pDocCell->CloneWithoutNote( *pDoc, rPos ) : 0; @@ -848,7 +848,7 @@ BOOL ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi if (bApi && !bXMLLoading) NotifyInputHandler( rPos ); - return TRUE; + return sal_True; } void ScDocFunc::NotifyInputHandler( const ScAddress& rPos ) @@ -865,30 +865,30 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& rPos ) // (the cell shows the same like the InputWindow) if (bIsEditMode) pInputHdl->SetModified(); - pViewSh->UpdateInputHandler(FALSE, !bIsEditMode); + pViewSh->UpdateInputHandler(sal_False, !bIsEditMode); } } } struct ScMyRememberItem { - USHORT nIndex; + sal_uInt16 nIndex; SfxItemSet aItemSet; - ScMyRememberItem(const SfxItemSet& rItemSet, USHORT nTempIndex) : + ScMyRememberItem(const SfxItemSet& rItemSet, sal_uInt16 nTempIndex) : nIndex(nTempIndex), aItemSet(rItemSet) {} }; typedef ::std::list ScMyRememberItemList; -BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, BOOL bInterpret, BOOL bApi ) +sal_Bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, sal_Bool bInterpret, sal_Bool bApi ) { // PutData ruft PutCell oder SetNormalString - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); ScEditAttrTester aTester( &rEngine ); - BOOL bEditCell = aTester.NeedsObject(); + sal_Bool bEditCell = aTester.NeedsObject(); if ( bEditCell ) { // #i61702# With bLoseContent set, the content of rEngine isn't restored @@ -907,8 +907,8 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, // not only alignment, so the object doesn't contain the cell attributes as // paragraph attributes. Before remove the attributes store they in a list to // set they back to the EditEngine. - USHORT nCount = rEngine.GetParagraphCount(); - for (USHORT i=0; i 0 ) { ScMarkData aMark; - aMark.SelectTable( rPos.Tab(), TRUE ); + aMark.SelectTable( rPos.Tab(), sal_True ); aMark.SetMarkArea( ScRange( rPos ) ); - ApplyAttributes( aMark, aPattern, TRUE, bApi ); + ApplyAttributes( aMark, aPattern, sal_True, bApi ); } } @@ -1037,8 +1037,8 @@ ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos, } -BOOL ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText, - BOOL bInterpret, BOOL bEnglish, BOOL bApi, +sal_Bool ScDocFunc::SetCellText( const ScAddress& rPos, const String& rText, + sal_Bool bInterpret, sal_Bool bEnglish, sal_Bool bApi, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { // SetCellText ruft PutCell oder SetNormalString @@ -1086,7 +1086,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow ) rDocShell.GetUndoManager()->AddUndoAction( new ScUndoShowHideNote( rDocShell, rPos, bShow ) ); if (rDoc.IsStreamValid(rPos.Tab())) - rDoc.SetStreamValid(rPos.Tab(), FALSE); + rDoc.SetStreamValid(rPos.Tab(), sal_False); rDocShell.SetDocumentModified(); @@ -1095,7 +1095,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow ) //------------------------------------------------------------------------ -bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bApi ) +bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -1117,7 +1117,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA //! Undo !!! if (pDoc->IsStreamValid(rPos.Tab())) - pDoc->SetStreamValid(rPos.Tab(), FALSE); + pDoc->SetStreamValid(rPos.Tab(), sal_False); rDocShell.PostPaintCell( rPos ); aModificator.SetDocumentModified(); @@ -1127,7 +1127,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const String& rText, BOOL bA //------------------------------------------------------------------------ -bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi ) +bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, sal_Bool bApi ) { bool bDone = false; @@ -1174,7 +1174,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con rDocShell.PostPaintCell( rPos ); if (rDoc.IsStreamValid(rPos.Tab())) - rDoc.SetStreamValid(rPos.Tab(), FALSE); + rDoc.SetStreamValid(rPos.Tab(), sal_False); aModificator.SetDocumentModified(); bDone = true; @@ -1189,23 +1189,23 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con //------------------------------------------------------------------------ -BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, - BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, + sal_Bool bRecord, sal_Bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) - bRecord = FALSE; + bRecord = sal_False; - BOOL bImportingXML = pDoc->IsImportingXML(); + sal_Bool bImportingXML = pDoc->IsImportingXML(); // Cell formats can still be set if the range isn't editable only because of matrix formulas. // #i62483# When loading XML, the check can be skipped altogether. - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !bImportingXML && !pDoc->IsSelectionEditable( rMark, &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); - return FALSE; + return sal_False; } ScDocShellModificator aModificator( rDocShell ); @@ -1213,7 +1213,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r //! Umrandung ScRange aMultiRange; - BOOL bMulti = rMark.IsMultiMarked(); + sal_Bool bMulti = rMark.IsMultiMarked(); if ( bMulti ) rMark.GetMultiMarkArea( aMultiRange ); else @@ -1234,7 +1234,7 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r } // While loading XML it is not neccessary to ask HasAttrib. It needs too much time. - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; if ( !bImportingXML ) rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content before the change pDoc->ApplySelectionPattern( rPattern, rMark ); @@ -1248,38 +1248,38 @@ BOOL ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } -BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName, - BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName, + sal_Bool bRecord, sal_Bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) - bRecord = FALSE; + bRecord = sal_False; - BOOL bImportingXML = pDoc->IsImportingXML(); + sal_Bool bImportingXML = pDoc->IsImportingXML(); // Cell formats can still be set if the range isn't editable only because of matrix formulas. // #i62483# When loading XML, the check can be skipped altogether. - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !bImportingXML && !pDoc->IsSelectionEditable( rMark, &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); - return FALSE; + return sal_False; } ScStyleSheet* pStyleSheet = (ScStyleSheet*) pDoc->GetStyleSheetPool()->Find( rStyleName, SFX_STYLE_FAMILY_PARA ); if (!pStyleSheet) - return FALSE; + return sal_False; ScDocShellModificator aModificator( rDocShell ); ScRange aMultiRange; - BOOL bMulti = rMark.IsMultiMarked(); + sal_Bool bMulti = rMark.IsMultiMarked(); if ( bMulti ) rMark.GetMultiMarkArea( aMultiRange ); else @@ -1306,15 +1306,15 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName, } -// BOOL bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT ); +// sal_Bool bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT ); // pDoc->ApplySelectionPattern( rPattern, rMark ); pDoc->ApplySelectionStyle( (ScStyleSheet&)*pStyleSheet, rMark ); // if (!bPaintExt) // bPaintExt = pDoc->HasAttrib( aMultiRange, HASATTR_PAINTEXT ); -// USHORT nExtFlags = bPaintExt ? SC_PF_LINES : 0; - USHORT nExtFlags = 0; +// sal_uInt16 nExtFlags = bPaintExt ? SC_PF_LINES : 0; + sal_uInt16 nExtFlags = 0; if (!AdjustRowHeight( aMultiRange )) rDocShell.PostPaint( aMultiRange, PAINT_GRID, nExtFlags ); else if (nExtFlags & SC_PF_LINES) @@ -1322,13 +1322,13 @@ BOOL ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleName, aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, InsCellCmd eCmd, - BOOL bRecord, BOOL bApi, BOOL bPartOfPaste ) +sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, InsCellCmd eCmd, + sal_Bool bRecord, sal_Bool bApi, sal_Bool bPartOfPaste ) { ScDocShellModificator aModificator( rDocShell ); @@ -1342,7 +1342,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) ) { DBG_ERROR("invalid row in InsertCells"); - return FALSE; + return sal_False; } ScDocument* pDoc = rDocShell.GetDocument(); @@ -1351,8 +1351,8 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, SCROW nPaintStartY = nStartRow; SCCOL nPaintEndX = nEndCol; SCROW nPaintEndY = nEndRow; - USHORT nPaintFlags = PAINT_GRID; - BOOL bSuccess; + sal_uInt16 nPaintFlags = PAINT_GRID; + sal_Bool bSuccess; SCTAB i; ScTabViewShell* pViewSh = rDocShell.GetBestViewShell(); //preserve current cursor position @@ -1365,7 +1365,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, } if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -1380,7 +1380,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, nCount++; if( nCount == nEndTab+1 ) { - aMark.SelectTable( i, TRUE ); + aMark.SelectTable( i, sal_True ); break; } } @@ -1392,7 +1392,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if( aMark.GetTableSelect( i ) ) { for( SCTAB j = i+1; jIsScenario(j); j++ ) - aFullMark.SelectTable( j, TRUE ); + aFullMark.SelectTable( j, sal_True ); } SCTAB nSelCount = aMark.GetSelectCount(); @@ -1432,7 +1432,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( eCmd == INS_CELLSRIGHT ) nMergeTestEndX = MAXCOL; - BOOL bNeedRefresh = FALSE; + sal_Bool bNeedRefresh = sal_False; SCCOL nEditTestEndX = (eCmd==INS_INSCOLS) ? MAXCOL : nMergeTestEndX; SCROW nEditTestEndY = (eCmd==INS_INSROWS) ? MAXROW : nMergeTestEndY; @@ -1441,7 +1441,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } WaitObject aWait( rDocShell.GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference @@ -1451,7 +1451,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( bRecord ) { pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE ); + pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, sal_False, sal_False ); // pRefUndoDoc is filled in InsertCol / InsertRow @@ -1462,7 +1462,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, // #i8302 : we unmerge overwhelming ranges, before insertion all the actions are put in the same ListAction // the patch comes from mloiseleur and maoyg - BOOL bInsertMerge = FALSE; + sal_Bool bInsertMerge = sal_False; std::vector qIncreaseRange; String aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTCELLS ); if (bRecord) @@ -1475,7 +1475,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if( pDoc->HasAttrib( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) { if (eCmd==INS_CELLSRIGHT) - bNeedRefresh = TRUE; + bNeedRefresh = sal_True; SCCOL nMergeStartX = nMergeTestStartX; SCROW nMergeStartY = nMergeTestStartY; @@ -1491,7 +1491,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } SCCOL nTestCol = -1; @@ -1507,12 +1507,12 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, { pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem(ATTR_MERGE); pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG); - INT16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); + sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER ) { ScRange aRange( nTestCol, nTestRow1, i ); pDoc->ExtendOverlapped(aRange); - pDoc->ExtendMerge(aRange, TRUE, TRUE); + pDoc->ExtendMerge(aRange, sal_True, sal_True); if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR ) { @@ -1520,12 +1520,12 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, { ScRange aTestRange( nTestCol, nTestRow, i ); pDoc->ExtendOverlapped( aTestRange ); - pDoc->ExtendMerge( aTestRange, TRUE, TRUE); + pDoc->ExtendMerge( aTestRange, sal_True, sal_True); ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i ); if( !aExtendRange.In( aMergeRange ) ) { qIncreaseRange.push_back( aTestRange ); - bInsertMerge = TRUE; + bInsertMerge = sal_True; } } } @@ -1536,7 +1536,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, { qIncreaseRange.push_back( aRange ); } - bInsertMerge = TRUE; + bInsertMerge = sal_True; } } } @@ -1579,7 +1579,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, ScRange aRange( *iIter ); if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { - UnmergeCells( aRange, TRUE, TRUE ); + UnmergeCells( aRange, sal_True, sal_True ); } } } @@ -1589,7 +1589,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } } } @@ -1621,7 +1621,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, break; default: DBG_ERROR("Falscher Code beim Einfuegen"); - bSuccess = FALSE; + bSuccess = sal_False; break; } @@ -1680,7 +1680,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, default: break; } - MergeCells(aRange, FALSE, TRUE, TRUE); + MergeCells(aRange, sal_False, sal_True, sal_True); } qIncreaseRange.pop_back(); } @@ -1693,14 +1693,14 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, if( aMark.GetTableSelect( i ) ) { if (bNeedRefresh) - pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, TRUE ); + pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, sal_True ); else pDoc->RefreshAutoFilter( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i ); if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS ) pDoc->UpdatePageBreaks( i ); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i ); SCTAB nScenarioCount = 0; @@ -1708,7 +1708,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, for( SCTAB j = i+1; jIsScenario(j); j++ ) nScenarioCount ++; - BOOL bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) : + sal_Bool bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) : AdjustRowHeight(ScRange(0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount )); if (bAdjusted) { @@ -1729,13 +1729,13 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, while( !qIncreaseRange.empty() ) { ScRange aRange = qIncreaseRange.back(); - MergeCells(aRange, FALSE, TRUE, TRUE); + MergeCells(aRange, sal_False, sal_True, sal_True); qIncreaseRange.pop_back(); } if( pViewSh ) { - pViewSh->MarkRange( rRange, FALSE ); + pViewSh->MarkRange( rRange, sal_False ); pViewSh->SetCursor( nCursorCol, nCursorRow ); } } @@ -1756,8 +1756,8 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, return bSuccess; } -BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd, - BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, DelCellCmd eCmd, + sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -1771,7 +1771,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) ) { DBG_ERROR("invalid row in DeleteCells"); - return FALSE; + return sal_False; } ScDocument* pDoc = rDocShell.GetDocument(); @@ -1780,11 +1780,11 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, SCROW nPaintStartY = nStartRow; SCCOL nPaintEndX = nEndCol; SCROW nPaintEndY = nEndRow; - USHORT nPaintFlags = PAINT_GRID; + sal_uInt16 nPaintFlags = PAINT_GRID; SCTAB i; if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -1799,7 +1799,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, nCount++; if( nCount == nEndTab+1 ) { - aMark.SelectTable( i, TRUE ); + aMark.SelectTable( i, sal_True ); break; } } @@ -1811,7 +1811,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( aMark.GetTableSelect( i ) ) { for( SCTAB j = i+1; jIsScenario(j); j++ ) - aFullMark.SelectTable( j, TRUE ); + aFullMark.SelectTable( j, sal_True ); } SCTAB nSelCount = aMark.GetSelectCount(); @@ -1856,7 +1856,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } // Test zusammengefasste @@ -1865,12 +1865,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, SCROW nMergeTestEndY = (eCmd==DEL_CELLSUP) ? MAXROW : nUndoEndY; SCCOL nExtendStartCol = nUndoStartX; SCROW nExtendStartRow = nUndoStartY; - BOOL bNeedRefresh = FALSE; + sal_Bool bNeedRefresh = sal_False; //Issue 8302 want to be able to insert into the middle of merged cells //the patch comes from maoyg ::std::vector qDecreaseRange; - BOOL bDeletingMerge = FALSE; + sal_Bool bDeletingMerge = sal_False; String aUndo = ScGlobal::GetRscString( STR_UNDO_DELETECELLS ); if (bRecord) rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo ); @@ -1894,7 +1894,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } nExtendStartCol = nMergeStartX; @@ -1912,12 +1912,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem( ATTR_MERGE ); pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem( ATTR_MERGE_FLAG ); - INT16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); + sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER ) { ScRange aRange( nTestCol, nTestRow1, i ); pDoc->ExtendOverlapped( aRange ); - pDoc->ExtendMerge( aRange, TRUE, TRUE ); + pDoc->ExtendMerge( aRange, sal_True, sal_True ); if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR ) { @@ -1925,12 +1925,12 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { ScRange aTestRange( nTestCol, nTestRow, i ); pDoc->ExtendOverlapped( aTestRange ); - pDoc->ExtendMerge( aTestRange, TRUE, TRUE); + pDoc->ExtendMerge( aTestRange, sal_True, sal_True); ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i ); if( !aExtendRange.In( aMergeRange ) ) { qDecreaseRange.push_back( aTestRange ); - bDeletingMerge = TRUE; + bDeletingMerge = sal_True; } } } @@ -1941,7 +1941,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { qDecreaseRange.push_back( aRange ); } - bDeletingMerge = TRUE; + bDeletingMerge = sal_True; } } } @@ -1953,7 +1953,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, { nStartRow = aExtendMergeRange.aStart.Row(); nEndRow = aExtendMergeRange.aEnd.Row(); - bNeedRefresh = TRUE; + bNeedRefresh = sal_True; if( eCmd == DEL_CELLSUP ) { @@ -1973,7 +1973,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( eCmd == DEL_CELLSLEFT ) { nEndRow = aExtendMergeRange.aEnd.Row(); - bNeedRefresh = TRUE; + bNeedRefresh = sal_True; } else { @@ -1989,7 +1989,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, ScRange aRange( *iIter ); if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { - UnmergeCells( aRange, TRUE, TRUE ); + UnmergeCells( aRange, sal_True, sal_True ); } } } @@ -1999,7 +1999,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); rDocShell.GetUndoManager()->LeaveListAction(); - return FALSE; + return sal_False; } } } @@ -2031,26 +2031,26 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, nScenarioCount ++; pDoc->CopyToDocument( nUndoStartX, nUndoStartY, i, nUndoEndX, nUndoEndY, i+nScenarioCount, - IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc ); + IDF_ALL | IDF_NOCAPTIONS, sal_False, pUndoDoc ); } } pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE ); + pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, sal_False, sal_False ); pUndoData = new ScRefUndoData( pDoc ); pDoc->BeginDrawUndo(); } - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; for( i=0; iDeleteAreaTab(nUndoStartX,nUndoStartY,nUndoEndX,nUndoEndY, i, IDF_ALL); // alle Tabellen anlegen, damit Formeln kopiert werden koennen: - pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE ); + pUndoDoc->AddUndoTab( 0, nTabCount-1, sal_False, sal_False ); - // kopieren mit bColRowFlags=FALSE (#54194#) - pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,FALSE,pUndoDoc,NULL,FALSE); + // kopieren mit bColRowFlags=sal_False (#54194#) + pRefUndoDoc->CopyToDocument(0,0,0,MAXCOL,MAXROW,MAXTAB,IDF_FORMULA,sal_False,pUndoDoc,NULL,sal_False); delete pRefUndoDoc; SCTAB* pTabs = new SCTAB[nSelCount]; @@ -2167,7 +2167,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, if( !pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { - MergeCells( aRange, FALSE, TRUE, TRUE ); + MergeCells( aRange, sal_False, sal_True, sal_True ); } qDecreaseRange.pop_back(); } @@ -2199,7 +2199,7 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, nScenarioCount ++; ScRange aMergedRange( nExtendStartCol, nExtendStartRow, i, nMergeTestEndX, nMergeTestEndY, i+nScenarioCount ); - pDoc->ExtendMerge( aMergedRange, TRUE ); + pDoc->ExtendMerge( aMergedRange, sal_True ); } } } @@ -2235,11 +2235,11 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); - return TRUE; + return sal_True; } -BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, - BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi ) +sal_Bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, + sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -2256,21 +2256,21 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if ( !ValidRow(nStartRow) || !ValidRow(nEndRow) || !ValidRow(nDestRow) ) { DBG_ERROR("invalid row in MoveBlock"); - return FALSE; + return sal_False; } // zugehoerige Szenarien auch anpassen - nur wenn innerhalb einer Tabelle verschoben wird! - BOOL bScenariosAdded = FALSE; + sal_Bool bScenariosAdded = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; SCTAB nTabCount = pDoc->GetTableCount(); if ( nDestTab == nStartTab && !pDoc->IsScenario(nEndTab) ) while ( nEndTab+1 < nTabCount && pDoc->IsScenario(nEndTab+1) ) { ++nEndTab; - bScenariosAdded = TRUE; + bScenariosAdded = sal_True; } SCTAB nSrcTabCount = nEndTab-nStartTab+1; @@ -2281,7 +2281,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, ScMarkData aSourceMark; for (nTab=nStartTab; nTab<=nEndTab; nTab++) - aSourceMark.SelectTable( nTab, TRUE ); // Source selektieren + aSourceMark.SelectTable( nTab, sal_True ); // Source selektieren aSourceMark.SetMarkArea( rSource ); ScDocShellRef aDragShellRef; @@ -2299,13 +2299,13 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, SCCOL nOldEndCol = nEndCol; SCROW nOldEndRow = nEndRow; - BOOL bClipOver = FALSE; + sal_Bool bClipOver = sal_False; for (nTab=nStartTab; nTab<=nEndTab; nTab++) { SCCOL nTmpEndCol = nOldEndCol; SCROW nTmpEndRow = nOldEndRow; if (pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab )) - bClipOver = TRUE; + bClipOver = sal_True; if ( nTmpEndCol > nEndCol ) nEndCol = nTmpEndCol; if ( nTmpEndRow > nEndRow ) nEndRow = nTmpEndRow; } @@ -2316,14 +2316,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, SCCOL nUndoEndCol = nDestCol + ( nEndCol-nStartCol ); // erweitert im Zielblock SCROW nUndoEndRow = nDestRow + ( nEndRow-nStartRow ); - BOOL bIncludeFiltered = bCut; + sal_Bool bIncludeFiltered = bCut; if ( !bIncludeFiltered ) { // adjust sizes to include only non-filtered rows SCCOL nClipX; SCROW nClipY; - pClipDoc->GetClipArea( nClipX, nClipY, FALSE ); + pClipDoc->GetClipArea( nClipX, nClipY, sal_False ); SCROW nUndoAdd = nUndoEndRow - nDestEndRow; nDestEndRow = nDestRow + nClipY; nUndoEndRow = nDestEndRow + nUndoAdd; @@ -2334,7 +2334,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (!bApi) rDocShell.ErrorMessage(STR_PASTE_FULL); delete pClipDoc; - return FALSE; + return sal_False; } // Test auf Zellschutz @@ -2351,7 +2351,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); delete pClipDoc; - return FALSE; + return sal_False; } // Test auf zusammengefasste - beim Verschieben erst nach dem Loeschen @@ -2363,14 +2363,14 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (!bApi) rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0); delete pClipDoc; - return FALSE; + return sal_False; } // Are there borders in the cells? (for painting) - USHORT nSourceExt = 0; + sal_uInt16 nSourceExt = 0; rDocShell.UpdatePaintExt( nSourceExt, nStartCol,nStartRow,nStartTab, nEndCol,nEndRow,nEndTab ); - USHORT nDestExt = 0; + sal_uInt16 nDestExt = 0; rDocShell.UpdatePaintExt( nDestExt, nDestCol,nDestRow,nDestTab, nDestEndCol,nDestEndRow,nDestEndTab ); // @@ -2382,9 +2382,9 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, ScRefUndoData* pUndoData = NULL; if (bRecord) { - BOOL bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW ); - BOOL bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL ); - USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; + sal_Bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW ); + sal_Bool bWholeRows = ( nStartCol == 0 && nEndCol == MAXCOL ); + sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab, bWholeCols, bWholeRows ); @@ -2392,30 +2392,30 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, if (bCut) { pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab, - nUndoFlags, FALSE, pUndoDoc ); + nUndoFlags, sal_False, pUndoDoc ); pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, FALSE, FALSE ); + pRefUndoDoc->InitUndo( pDoc, 0, nTabCount-1, sal_False, sal_False ); } if ( nDestTab != nStartTab ) pUndoDoc->AddUndoTab( nDestTab, nDestEndTab, bWholeCols, bWholeRows ); pDoc->CopyToDocument( nDestCol, nDestRow, nDestTab, nDestEndCol, nDestEndRow, nDestEndTab, - nUndoFlags, FALSE, pUndoDoc ); + nUndoFlags, sal_False, pUndoDoc ); pUndoData = new ScRefUndoData( pDoc ); pDoc->BeginDrawUndo(); } - BOOL bSourceHeight = FALSE; // Hoehen angepasst? + sal_Bool bSourceHeight = sal_False; // Hoehen angepasst? if (bCut) { ScMarkData aDelMark; // only for tables for (nTab=nStartTab; nTab<=nEndTab; nTab++) { pDoc->DeleteAreaTab( nStartCol,nStartRow, nOldEndCol,nOldEndRow, nTab, IDF_ALL ); - aDelMark.SelectTable( nTab, TRUE ); + aDelMark.SelectTable( nTab, sal_True ); } pDoc->DeleteObjectsInArea( nStartCol,nStartRow, nOldEndCol,nOldEndRow, aDelMark ); @@ -2431,7 +2431,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, { SCCOL nTmpEndCol = nEndCol; SCROW nTmpEndRow = nEndRow; - pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, TRUE ); + pDoc->ExtendMerge( nStartCol, nStartRow, nTmpEndCol, nTmpEndRow, nTab, sal_True ); } // Fehlermeldung erst nach dem Wiederherstellen des Inhalts @@ -2442,17 +2442,17 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, delete pRefUndoDoc; delete pUndoData; delete pClipDoc; - return FALSE; + return sal_False; } - bSourceHeight = AdjustRowHeight( rSource, FALSE ); + bSourceHeight = AdjustRowHeight( rSource, sal_False ); } ScRange aPasteDest( nDestCol, nDestRow, nDestTab, nDestEndCol, nDestEndRow, nDestEndTab ); ScMarkData aDestMark; for (nTab=nDestTab; nTab<=nDestEndTab; nTab++) - aDestMark.SelectTable( nTab, TRUE ); // Destination selektieren + aDestMark.SelectTable( nTab, sal_True ); // Destination selektieren aDestMark.SetMarkArea( aPasteDest ); /* Do not copy cell notes and drawing objects here. While pasting, the @@ -2461,16 +2461,16 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, positions (e.g. if source and destination range overlaps). Cell notes and drawing objects are pasted below after doing all adjusting. */ pDoc->CopyFromClip( aPasteDest, aDestMark, IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS), - pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered ); + pRefUndoDoc, pClipDoc, sal_True, sal_False, bIncludeFiltered ); // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - UnmergeCells( aPasteDest, FALSE, TRUE ); + UnmergeCells( aPasteDest, sal_False, sal_True ); VirtualDevice aVirtDev; - BOOL bDestHeight = AdjustRowHeight( + sal_Bool bDestHeight = AdjustRowHeight( ScRange( 0,nDestRow,nDestTab, MAXCOL,nDestEndRow,nDestEndTab ), - FALSE ); + sal_False ); /* Paste cell notes and drawing objects after adjusting formula references and row heights. There are no cell notes or drawing objects, if the @@ -2481,19 +2481,19 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, touch existing cells. */ if ( pClipDoc->GetDrawLayer() ) pDoc->CopyFromClip( aPasteDest, aDestMark, IDF_NOTE | IDF_ADDNOTES | IDF_OBJECTS, - pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered ); + pRefUndoDoc, pClipDoc, sal_True, sal_False, bIncludeFiltered ); if (bRecord) { if (pRefUndoDoc) { // alle Tabellen anlegen, damit Formeln kopiert werden koennen: - pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE ); + pUndoDoc->AddUndoTab( 0, nTabCount-1, sal_False, sal_False ); pRefUndoDoc->DeleteArea( nDestCol, nDestRow, nDestEndCol, nDestEndRow, aSourceMark, IDF_ALL ); - // kopieren mit bColRowFlags=FALSE (#54194#) + // kopieren mit bColRowFlags=sal_False (#54194#) pRefUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB, - IDF_FORMULA, FALSE, pUndoDoc, NULL, FALSE ); + IDF_FORMULA, sal_False, pUndoDoc, NULL, sal_False ); delete pRefUndoDoc; } @@ -2511,7 +2511,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, { SCCOL nTmpEndCol = nDestEndCol; SCROW nTmpEndRow = nDestEndRow; - pDoc->ExtendMerge( nDestCol, nDestRow, nTmpEndCol, nTmpEndRow, nTab, TRUE ); + pDoc->ExtendMerge( nDestCol, nDestRow, nTmpEndCol, nTmpEndRow, nTab, sal_True ); if (nTmpEndCol > nDestPaintEndCol) nDestPaintEndCol = nTmpEndCol; if (nTmpEndRow > nDestPaintEndRow) nDestPaintEndRow = nTmpEndRow; } @@ -2528,7 +2528,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, SCROW nPaintStartY = nDestRow; SCCOL nPaintEndX = nDestPaintEndCol; SCROW nPaintEndY = nDestPaintEndRow; - USHORT nFlags = PAINT_GRID; + sal_uInt16 nFlags = PAINT_GRID; if ( nStartRow==0 && nEndRow==MAXROW ) // Breiten mitkopiert? { @@ -2590,7 +2590,7 @@ BOOL ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); delete pClipDoc; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -2693,9 +2693,9 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ) } -BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; WaitObject aWait( rDocShell.GetActiveDialogParent() ); ScDocShellModificator aModificator( rDocShell ); @@ -2705,20 +2705,20 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL // Strange loop, also basic is loaded too early ( InsertTable ) // is called via the xml import for sheets in described in odf - BOOL bInsertDocModule = false; + sal_Bool bInsertDocModule = false; if( !rDocShell.GetDocument()->IsImportingXML() ) { bInsertDocModule = pDoc ? pDoc->IsInVBAMode() : false; } if ( bInsertDocModule || ( bRecord && !pDoc->IsUndoEnabled() ) ) - bRecord = FALSE; + bRecord = sal_False; if (bRecord) pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage SCTAB nTabCount = pDoc->GetTableCount(); - BOOL bAppend = ( nTab >= nTabCount ); + sal_Bool bAppend = ( nTab >= nTabCount ); if ( bAppend ) nTab = nTabCount; // wichtig fuer Undo @@ -2740,7 +2740,7 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL rDocShell.PostPaintExtras(); aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) rDocShell.ErrorMessage(STR_TABINSERT_ERROR); @@ -2748,20 +2748,20 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL return bSuccess; } -BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ ) +sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi */ ) { WaitObject aWait( rDocShell.GetActiveDialogParent() ); ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false; + sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : false; if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if ( bVbaEnabled ) - bRecord = FALSE; - BOOL bWasLinked = pDoc->IsLinked(nTab); + bRecord = sal_False; + sal_Bool bWasLinked = pDoc->IsLinked(nTab); ScDocument* pUndoDoc = NULL; ScRefUndoData* pUndoData = NULL; if (bRecord) @@ -2769,13 +2769,13 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ ) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); SCTAB nCount = pDoc->GetTableCount(); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); // nur nTab mit Flags + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); // nur nTab mit Flags pUndoDoc->AddUndoTab( 0, nCount-1 ); // alle Tabs fuer Referenzen - pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pUndoDoc ); + pDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,sal_False, pUndoDoc ); String aOldName; pDoc->GetName( nTab, aOldName ); - pUndoDoc->RenameTab( nTab, aOldName, FALSE ); + pUndoDoc->RenameTab( nTab, aOldName, sal_False ); if (bWasLinked) pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab), pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab), @@ -2784,13 +2784,13 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ ) if ( pDoc->IsScenario(nTab) ) { - pUndoDoc->SetScenario( nTab, TRUE ); + pUndoDoc->SetScenario( nTab, sal_True ); String aComment; Color aColor; - USHORT nScenFlags; + sal_uInt16 nScenFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); pUndoDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags ); - BOOL bActive = pDoc->IsActiveScenario( nTab ); + sal_Bool bActive = pDoc->IsActiveScenario( nTab ); pUndoDoc->SetActiveScenario( nTab, bActive ); } pUndoDoc->SetVisible( nTab, pDoc->IsVisible( nTab ) ); @@ -2804,7 +2804,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ ) } String sCodeName; - BOOL bHasCodeName = pDoc->GetCodeName( nTab, sCodeName ); + sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName ); if (pDoc->DeleteTab( nTab, pUndoDoc )) { if (bRecord) @@ -2840,7 +2840,7 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ ) pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); - bSuccess = TRUE; + bSuccess = sal_True; } else { @@ -2850,18 +2850,18 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ ) return bSuccess; } -BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi ) +sal_Bool ScDocFunc::SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( pDoc->IsVisible( nTab ) == bVisible ) - return TRUE; // nichts zu tun - ok + return sal_True; // nichts zu tun - ok if ( !pDoc->IsDocEditable() ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); - return FALSE; + return sal_False; } ScDocShellModificator aModificator( rDocShell ); @@ -2870,7 +2870,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi ) { // nicht alle Tabellen ausblenden - USHORT nVisCount = 0; + sal_uInt16 nVisCount = 0; SCTAB nCount = pDoc->GetTableCount(); for (SCTAB i=0; iIsVisible(i)) @@ -2880,7 +2880,7 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung? - return FALSE; + return sal_False; } } @@ -2896,15 +2896,15 @@ BOOL ScDocFunc::SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi ) rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } -BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) +sal_Bool ScDocFunc::SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool /* bApi */ ) { ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( pDoc->IsLayoutRTL( nTab ) == bRTL ) - return TRUE; // nothing to do - ok + return sal_True; // nothing to do - ok //! protection (sheet or document?) @@ -2927,17 +2927,17 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) pBindings->Invalidate( SID_ATTR_SIZE ); } - return TRUE; + return sal_True; } -//UNUSED2009-05 BOOL ScDocFunc::SetGrammar( formula::FormulaGrammar::Grammar eGrammar ) +//UNUSED2009-05 sal_Bool ScDocFunc::SetGrammar( formula::FormulaGrammar::Grammar eGrammar ) //UNUSED2009-05 { //UNUSED2009-05 ScDocument* pDoc = rDocShell.GetDocument(); //UNUSED2009-05 //UNUSED2009-05 if ( pDoc->GetGrammar() == eGrammar ) -//UNUSED2009-05 return TRUE; +//UNUSED2009-05 return sal_True; //UNUSED2009-05 -//UNUSED2009-05 BOOL bUndo(pDoc->IsUndoEnabled()); +//UNUSED2009-05 sal_Bool bUndo(pDoc->IsUndoEnabled()); //UNUSED2009-05 ScDocShellModificator aModificator( rDocShell ); //UNUSED2009-05 //UNUSED2009-05 pDoc->SetGrammar( eGrammar ); @@ -2952,7 +2952,7 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) //UNUSED2009-05 ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); //UNUSED2009-05 if (NULL != pViewSh) //UNUSED2009-05 { -//UNUSED2009-05 pViewSh->UpdateInputHandler( FALSE, FALSE ); +//UNUSED2009-05 pViewSh->UpdateInputHandler( sal_False, sal_False ); //UNUSED2009-05 } //UNUSED2009-05 //UNUSED2009-05 aModificator.SetDocumentModified(); @@ -2964,24 +2964,24 @@ BOOL ScDocFunc::SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL /* bApi */ ) //UNUSED2009-05 //pBindings->Invalidate( FID_TAB_USE_R1C1 ); //UNUSED2009-05 } //UNUSED2009-05 -//UNUSED2009-05 return TRUE; +//UNUSED2009-05 return sal_True; //UNUSED2009-05 } -BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::RenameTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if ( !pDoc->IsDocEditable() ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); - return FALSE; + return sal_False; } ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; String sOldName; pDoc->GetName(nTab, sOldName); if (pDoc->RenameTab( nTab, rName )) @@ -2995,7 +2995,7 @@ BOOL ScDocFunc::RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - bSuccess = TRUE; + bSuccess = sal_True; } return bSuccess; } @@ -3051,7 +3051,7 @@ bool ScDocFunc::SetTabBgColor( return false; } - USHORT nTab; + sal_uInt16 nTab; Color aNewTabBgColor; bool bSuccess = true; size_t nTabProtectCount = 0; @@ -3105,9 +3105,9 @@ bool ScDocFunc::SetTabBgColor( //! - Optimale Hoehe fuer Edit-Zellen ist unterschiedlich zwischen Drucker und Bildschirm //! - Optimale Breite braucht Selektion, um evtl. nur selektierte Zellen zu beruecksichtigen -USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BOOL bFormula ) +sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, sal_Bool bFormula ) { - USHORT nTwips = 0; + sal_uInt16 nTwips = 0; ScSizeDeviceProvider aProv(&rDocShell); OutputDevice* pDev = aProv.GetDevice(); // has pixel MapMode @@ -3122,30 +3122,30 @@ USHORT lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCTAB nTab, BO return nTwips; } -BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab, - ScSizeMode eMode, USHORT nSizeTwips, - BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, SCTAB nTab, + ScSizeMode eMode, sal_uInt16 nSizeTwips, + sal_Bool bRecord, sal_Bool bApi ) { if (!nRangeCnt) - return TRUE; + return sal_True; ScDocument* pDoc = rDocShell.GetDocument(); if ( bRecord && !pDoc->IsUndoEnabled() ) - bRecord = FALSE; + bRecord = sal_False; // import into read-only document is possible if ( !pDoc->IsChangeReadOnlyEnabled() && !rDocShell.IsEditable() ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung? - return FALSE; + return sal_False; } - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; SCCOLROW nStart = pRanges[0]; SCCOLROW nEnd = pRanges[2*nRangeCnt-1]; - BOOL bFormula = FALSE; + sal_Bool bFormula = sal_False; if ( eMode == SC_SIZE_OPTIMAL ) { //! Option "Formeln anzeigen" - woher nehmen? @@ -3162,13 +3162,13 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); if (bWidth) { - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE ); - pDoc->CopyToDocument( static_cast(nStart), 0, nTab, static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); + pDoc->CopyToDocument( static_cast(nStart), 0, nTab, static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, static_cast(nStart), nTab, MAXCOL, static_cast(nEnd), nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, static_cast(nStart), nTab, MAXCOL, static_cast(nEnd), nTab, IDF_NONE, sal_False, pUndoDoc ); } pUndoRanges = new SCCOLROW[ 2*nRangeCnt ]; @@ -3179,8 +3179,8 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa pUndoTab = new ScOutlineTable( *pTable ); } - BOOL bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT; - BOOL bOutline = FALSE; + sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT; + sal_Bool bOutline = sal_False; pDoc->IncSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln for (SCCOLROW nRangeNo=0; nRangeNoGetRowFlags(nRow,nTab); + sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab); SCROW nLastRow = -1; bool bHidden = pDoc->RowHidden(nRow, nTab, nLastRow); if ( !bHidden && ( nOld & CR_MANUALSIZE ) ) @@ -3213,9 +3213,9 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, bAll ); if (bAll) - pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE ); + pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); - // Manual-Flag wird bei bAll=TRUE schon in SetOptimalHeight gesetzt + // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt // (an bei Extra-Height, sonst aus). } else if ( eMode==SC_SIZE_DIRECT || eMode==SC_SIZE_ORIGINAL ) @@ -3223,14 +3223,14 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa if (nSizeTwips) { pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips ); - pDoc->SetManualHeight( nStartNo, nEndNo, nTab, TRUE ); // height was set manually + pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually } if ( eMode != SC_SIZE_ORIGINAL ) pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 ); } else if ( eMode==SC_SIZE_SHOW ) { - pDoc->ShowRows( nStartNo, nEndNo, nTab, TRUE ); + pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); } } else // Spaltenbreiten @@ -3240,7 +3240,7 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa SCCOL nLastCol = -1; if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab, nLastCol) ) { - USHORT nThisSize = nSizeTwips; + sal_uInt16 nThisSize = nSizeTwips; if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) nThisSize = nSizeTwips + @@ -3292,21 +3292,21 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa } -BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos, - BOOL bRecord, BOOL bSetModified, BOOL /* bApi */ ) +sal_Bool ScDocFunc::InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos, + sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; SCTAB nTab = rPos.Tab(); SfxBindings* pBindings = rDocShell.GetViewBindings(); SCCOLROW nPos = bColumn ? static_cast(rPos.Col()) : static_cast(rPos.Row()); if (nPos == 0) - return FALSE; // erste Spalte / Zeile + return sal_False; // erste Spalte / Zeile ScBreakType nBreak = bColumn ? pDoc->HasColBreak(static_cast(nPos), nTab) : @@ -3316,7 +3316,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos, if (bRecord) rDocShell.GetUndoManager()->AddUndoAction( - new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, TRUE ) ); + new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, sal_True ) ); if (bColumn) pDoc->SetColBreak(static_cast(nPos), nTab, false, true); @@ -3327,7 +3327,7 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos, pDoc->UpdatePageBreaks( nTab ); if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); if (bColumn) { @@ -3353,17 +3353,17 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos, if (bSetModified) aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } -BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, - BOOL bRecord, BOOL bSetModified, BOOL /* bApi */ ) +sal_Bool ScDocFunc::RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos, + sal_Bool bRecord, sal_Bool bSetModified, sal_Bool /* bApi */ ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; SCTAB nTab = rPos.Tab(); SfxBindings* pBindings = rDocShell.GetViewBindings(); @@ -3381,7 +3381,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, if (bRecord) rDocShell.GetUndoManager()->AddUndoAction( - new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, FALSE ) ); + new ScUndoPageBreak( &rDocShell, rPos.Col(), rPos.Row(), nTab, bColumn, sal_False ) ); if (bColumn) pDoc->RemoveColBreak(static_cast(nPos), nTab, false, true); @@ -3391,7 +3391,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, pDoc->UpdatePageBreaks( nTab ); if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); if (bColumn) { @@ -3417,7 +3417,7 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, if (bSetModified) aModificator.SetDocumentModified(); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -3447,7 +3447,7 @@ void ScDocFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ) aModificator.SetDocumentModified(); } -BOOL ScDocFunc::Protect( SCTAB nTab, const String& rPassword, BOOL /*bApi*/ ) +sal_Bool ScDocFunc::Protect( SCTAB nTab, const String& rPassword, sal_Bool /*bApi*/ ) { ScDocument* pDoc = rDocShell.GetDocument(); if (nTab == TABLEID_DOC) @@ -3501,7 +3501,7 @@ BOOL ScDocFunc::Protect( SCTAB nTab, const String& rPassword, BOOL /*bApi*/ ) return true; } -BOOL ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi ) +sal_Bool ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, sal_Bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); @@ -3576,18 +3576,18 @@ BOOL ScDocFunc::Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi ) //------------------------------------------------------------------------ -BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi ) +sal_Bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScEditableTester aTester( pDoc, rMark ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } // #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached @@ -3596,7 +3596,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL ScRange aMarkRange; ScMarkData aMultiMark = rMark; - aMultiMark.SetMarking(FALSE); // for MarkToMulti + aMultiMark.SetMarking(sal_False); // for MarkToMulti aMultiMark.MarkToMulti(); aMultiMark.GetMultiMarkArea( aMarkRange ); @@ -3608,7 +3608,7 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab ); - pDoc->CopyToDocument( aMarkRange, IDF_ATTRIB, TRUE, pUndoDoc, (ScMarkData*)&aMultiMark ); + pDoc->CopyToDocument( aMarkRange, IDF_ATTRIB, sal_True, pUndoDoc, (ScMarkData*)&aMultiMark ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoClearItems( &rDocShell, aMultiMark, pUndoDoc, pWhich ) ); @@ -3621,21 +3621,21 @@ BOOL ScDocFunc::ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL //! Bindings-Invalidate etc.? - return TRUE; + return sal_True; } -BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi ) +sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScEditableTester aTester( pDoc, rMark ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScRange aMarkRange; @@ -3656,7 +3656,7 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pUndoDoc, (ScMarkData*)&rMark ); + pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, (ScMarkData*)&rMark ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoIndent( &rDocShell, rMark, pUndoDoc, bIncrement ) ); @@ -3682,15 +3682,15 @@ BOOL ScDocFunc::ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bAp pBindings->Invalidate( SID_ALIGN_ANY_JUSTIFIED ); } - return TRUE; + return sal_True; } -BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, - USHORT nFormatNo, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, + sal_uInt16 nFormatNo, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -3700,14 +3700,14 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) aMark = *pTabMark; else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScAutoFormat* pAutoFormat = ScGlobal::GetAutoFormat(); @@ -3716,7 +3716,7 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, { WaitObject aWait( rDocShell.GetActiveDialogParent() ); - BOOL bSize = (*pAutoFormat)[nFormatNo]->GetIncludeWidthHeight(); + sal_Bool bSize = (*pAutoFormat)[nFormatNo]->GetIncludeWidthHeight(); SCTAB nTabCount = pDoc->GetTableCount(); ScDocument* pUndoDoc = NULL; @@ -3731,13 +3731,13 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, ScRange aCopyRange = rRange; aCopyRange.aStart.SetTab(0); aCopyRange.aStart.SetTab(nTabCount-1); - pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pUndoDoc, &aMark ); + pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_False, pUndoDoc, &aMark ); if (bSize) { pDoc->CopyToDocument( nStartCol,0,0, nEndCol,MAXROW,nTabCount-1, - IDF_NONE, FALSE, pUndoDoc, &aMark ); + IDF_NONE, sal_False, pUndoDoc, &aMark ); pDoc->CopyToDocument( 0,nStartRow,0, MAXCOL,nEndRow,nTabCount-1, - IDF_NONE, FALSE, pUndoDoc, &aMark ); + IDF_NONE, sal_False, pUndoDoc, &aMark ); } pDoc->BeginDrawUndo(); } @@ -3759,8 +3759,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, for (SCTAB nTab=0; nTabIsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScMarkData aMark; if (pTabMark) @@ -3820,7 +3820,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark ); @@ -3835,7 +3835,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, //! auch bei Undo selektierte Tabellen beruecksichtigen pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab ); - pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc ); + pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, sal_False, pUndoDoc ); } // use TokenArray if given, string (and flags) otherwise @@ -3877,7 +3877,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, rDocShell.PostPaint( nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab, PAINT_GRID ); aModificator.SetDocumentModified(); - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -3887,12 +3887,12 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, //------------------------------------------------------------------------ -BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, - const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, + const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -3902,7 +3902,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -3910,7 +3910,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark ); @@ -3923,7 +3923,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, //! auch bei Undo selektierte Tabellen beruecksichtigen ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab ); - pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, FALSE, pUndoDoc ); + pDoc->CopyToDocument( rRange, IDF_ALL & ~IDF_NOTE, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoTabOp( &rDocShell, @@ -3938,7 +3938,7 @@ BOOL ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark, pDoc->InsertTableOp(rParam, nStartCol, nStartRow, nEndCol, nEndRow, aMark); rDocShell.PostPaintGridAll(); aModificator.SetDocumentModified(); - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -3960,12 +3960,12 @@ inline ScDirection DirFromFillDir( FillDir eDir ) return DIR_LEFT; } -BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, - FillDir eDir, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, + FillDir eDir, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -3975,7 +3975,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -3983,7 +3983,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark ); @@ -4030,7 +4030,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, ScRange aCopyRange = aDestArea; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, FALSE, pUndoDoc, &aMark ); + pDoc->CopyToDocument( aCopyRange, IDF_AUTOFILL, sal_False, pUndoDoc, &aMark ); } pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), @@ -4050,7 +4050,7 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, // rDocShell.PostPaintDataChanged(); aModificator.SetDocumentModified(); - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4058,14 +4058,14 @@ BOOL ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, return bSuccess; } -BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, +sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, double fStart, double fStep, double fMax, - BOOL bRecord, BOOL bApi ) + sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -4075,7 +4075,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -4083,7 +4083,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScEditableTester aTester( pDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark ); @@ -4137,7 +4137,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, pDoc->CopyToDocument( aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0, aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1, - IDF_AUTOFILL, FALSE, pUndoDoc, &aMark ); + IDF_AUTOFILL, sal_False, pUndoDoc, &aMark ); } if (aDestArea.aStart.Col() <= aDestArea.aEnd.Col() && @@ -4168,7 +4168,7 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, pDoc->GetRangeName()->GetSharedMaxIndex()+1 ) ); } - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4176,8 +4176,8 @@ BOOL ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, return bSuccess; } -BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, - FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, + FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -4190,7 +4190,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, SCTAB nEndTab = rRange.aEnd.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScMarkData aMark; if (pTabMark) @@ -4198,7 +4198,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, else { for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++) - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); } ScRange aSourceArea = rRange; @@ -4215,7 +4215,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, aDestArea.aEnd.SetRow( sal::static_int_cast( aSourceArea.aEnd.Row() + nCount ) ); break; case FILL_TO_TOP: - if (nCount > sal::static_int_cast( aSourceArea.aStart.Row() )) + if (nCount > sal::static_int_cast( aSourceArea.aStart.Row() )) { DBG_ERROR("FillAuto: Row < 0"); nCount = aSourceArea.aStart.Row(); @@ -4226,7 +4226,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, aDestArea.aEnd.SetCol( sal::static_int_cast( aSourceArea.aEnd.Col() + nCount ) ); break; case FILL_TO_LEFT: - if (nCount > sal::static_int_cast( aSourceArea.aStart.Col() )) + if (nCount > sal::static_int_cast( aSourceArea.aStart.Col() )) { DBG_ERROR("FillAuto: Col < 0"); nCount = aSourceArea.aStart.Col(); @@ -4247,7 +4247,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if ( pDoc->HasSelectedBlockMatrixFragment( nStartCol, nStartRow, @@ -4255,7 +4255,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, { if (!bApi) rDocShell.ErrorMessage(STR_MATRIXFRAGMENTERR); - return FALSE; + return sal_False; } WaitObject aWait( rDocShell.GetActiveDialogParent() ); @@ -4276,7 +4276,7 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, pDoc->CopyToDocument( aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0, aDestArea.aEnd.Col(), aDestArea.aEnd.Row(), nTabCount-1, - IDF_AUTOFILL, FALSE, pUndoDoc, &aMark ); + IDF_AUTOFILL, sal_False, pUndoDoc, &aMark ); } pDoc->Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), @@ -4298,12 +4298,12 @@ BOOL ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, aModificator.SetDocumentModified(); rRange = aDestArea; // Zielbereich zurueckgeben (zum Markieren) - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::MergeCells( const ScRange& rRange, sal_Bool bContents, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -4315,20 +4315,20 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, SCTAB nTab = rRange.aStart.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScEditableTester aTester( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); if (!aTester.IsEditable()) { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } if ( nStartCol == nEndCol && nStartRow == nEndRow ) { // nichts zu tun - return TRUE; + return sal_True; } if ( pDoc->HasAttrib( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, @@ -4337,10 +4337,10 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, // "Zusammenfassen nicht verschachteln !" if (!bApi) rDocShell.ErrorMessage(STR_MSSG_MERGECELLS_0); - return FALSE; + return sal_False; } - BOOL bNeedContents = bContents && + sal_Bool bNeedContents = bContents && ( !pDoc->IsBlockEmpty( nTab, nStartCol,nStartRow+1, nStartCol,nEndRow, true ) || !pDoc->IsBlockEmpty( nTab, nStartCol+1,nStartRow, nEndCol,nEndRow, true ) ); @@ -4359,7 +4359,7 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, pUndoDoc->InitUndo( pDoc, nTab, nTab ); // note captions are collected by drawing undo pDoc->CopyToDocument( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, - IDF_ALL|IDF_NOCAPTIONS, FALSE, pUndoDoc ); + IDF_ALL|IDF_NOCAPTIONS, sal_False, pUndoDoc ); } if( bHasNotes ) pDoc->BeginDrawUndo(); @@ -4393,10 +4393,10 @@ BOOL ScDocFunc::MergeCells( const ScRange& rRange, BOOL bContents, BOOL bRecord, pBindings->Invalidate( FID_MERGE_TOGGLE ); } - return TRUE; + return sal_True; } -BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -4404,7 +4404,7 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) SCTAB nTab = rRange.aStart.Tab(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if ( pDoc->HasAttrib( rRange, HASATTR_MERGED ) ) { @@ -4417,7 +4417,7 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) { ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( aExtended, IDF_ATTRIB, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aExtended, IDF_ATTRIB, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoRemoveMerge( &rDocShell, rRange, pUndoDoc ) ); } @@ -4433,32 +4433,32 @@ BOOL ScDocFunc::UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ) aExtended.aEnd.Col(), aExtended.aEnd.Row(), nTab, SC_MF_HOR | SC_MF_VER ); - pDoc->ExtendMerge( aRefresh, TRUE, FALSE ); + pDoc->ExtendMerge( aRefresh, sal_True, sal_False ); if ( !AdjustRowHeight( aExtended ) ) rDocShell.PostPaint( aExtended, PAINT_GRID ); aModificator.SetDocumentModified(); } else if (!bApi) - Sound::Beep(); //! FALSE zurueck??? + Sound::Beep(); //! sal_False zurueck??? - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, BOOL bApi ) +sal_Bool ScDocFunc::ModifyRangeNames( const ScRangeName& rNewRanges, sal_Bool bApi ) { return SetNewRangeNames( new ScRangeName( rNewRanges ), bApi ); } -BOOL ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, BOOL /* bApi */ ) // takes ownership of pNewRanges +sal_Bool ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, sal_Bool /* bApi */ ) // takes ownership of pNewRanges { ScDocShellModificator aModificator( rDocShell ); DBG_ASSERT( pNewRanges, "pNewRanges is 0" ); ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { @@ -4472,18 +4472,18 @@ BOOL ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, BOOL /* bApi */ ) // #i55926# While loading XML, formula cells only have a single string token, // so CompileNameFormula would never find any name (index) tokens, and would // unnecessarily loop through all cells. - BOOL bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 ); + sal_Bool bCompile = ( !pDoc->IsImportingXML() && pDoc->GetNamedRangesLockCount() == 0 ); if ( bCompile ) - pDoc->CompileNameFormula( TRUE ); // CreateFormulaString + pDoc->CompileNameFormula( sal_True ); // CreateFormulaString pDoc->SetRangeName( pNewRanges ); // takes ownership if ( bCompile ) - pDoc->CompileNameFormula( FALSE ); // CompileFormulaString + pDoc->CompileNameFormula( sal_False ); // CompileFormulaString aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -4491,7 +4491,7 @@ BOOL ScDocFunc::SetNewRangeNames( ScRangeName* pNewRanges, BOOL /* bApi */ ) void ScDocFunc::CreateOneName( ScRangeName& rList, SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL& rCancel, BOOL bApi ) + sal_Bool& rCancel, sal_Bool bApi ) { if (rCancel) return; @@ -4507,8 +4507,8 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, String aContent; ScRange( nX1, nY1, nTab, nX2, nY2, nTab ).Format( aContent, SCR_ABS_3D, pDoc ); - BOOL bInsert = FALSE; - USHORT nOldPos; + sal_Bool bInsert = sal_False; + sal_uInt16 nOldPos; if (rList.SearchName( aName, nOldPos )) // vorhanden ? { ScRangeData* pOld = rList[nOldPos]; @@ -4517,7 +4517,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, if (aOldStr != aContent) { if (bApi) - bInsert = TRUE; // per API nicht nachfragen + bInsert = sal_True; // per API nicht nachfragen else { String aTemplate = ScGlobal::GetRscString( STR_CREATENAME_REPLACE ); @@ -4532,15 +4532,15 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, if ( nResult == RET_YES ) { rList.AtFree(nOldPos); - bInsert = TRUE; + bInsert = sal_True; } else if ( nResult == RET_CANCEL ) - rCancel = TRUE; + rCancel = sal_True; } } } else - bInsert = TRUE; + bInsert = sal_True; if (bInsert) { @@ -4556,14 +4556,14 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, } } -BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi ) +sal_Bool ScDocFunc::CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi ) { if (!nFlags) - return FALSE; // war nix + return sal_False; // war nix ScDocShellModificator aModificator( rDocShell ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -4571,26 +4571,26 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi ) SCTAB nTab = rRange.aStart.Tab(); DBG_ASSERT(rRange.aEnd.Tab() == nTab, "CreateNames: mehrere Tabellen geht nicht"); - BOOL bValid = TRUE; + sal_Bool bValid = sal_True; if ( nFlags & ( NAME_TOP | NAME_BOTTOM ) ) if ( nStartRow == nEndRow ) - bValid = FALSE; + bValid = sal_False; if ( nFlags & ( NAME_LEFT | NAME_RIGHT ) ) if ( nStartCol == nEndCol ) - bValid = FALSE; + bValid = sal_False; if (bValid) { ScDocument* pDoc = rDocShell.GetDocument(); ScRangeName* pNames = pDoc->GetRangeName(); if (!pNames) - return FALSE; // soll nicht sein + return sal_False; // soll nicht sein ScRangeName aNewRanges( *pNames ); - BOOL bTop = ( ( nFlags & NAME_TOP ) != 0 ); - BOOL bLeft = ( ( nFlags & NAME_LEFT ) != 0 ); - BOOL bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 ); - BOOL bRight = ( ( nFlags & NAME_RIGHT ) != 0 ); + sal_Bool bTop = ( ( nFlags & NAME_TOP ) != 0 ); + sal_Bool bLeft = ( ( nFlags & NAME_LEFT ) != 0 ); + sal_Bool bBottom = ( ( nFlags & NAME_BOTTOM ) != 0 ); + sal_Bool bRight = ( ( nFlags & NAME_RIGHT ) != 0 ); SCCOL nContX1 = nStartCol; SCROW nContY1 = nStartRow; @@ -4606,7 +4606,7 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi ) if ( bRight ) --nContX2; - BOOL bCancel = FALSE; + sal_Bool bCancel = sal_False; SCCOL i; SCROW j; @@ -4643,21 +4643,21 @@ BOOL ScDocFunc::CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi ) //------------------------------------------------------------------------ -BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi ) +sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); - const BOOL bRecord = pDoc->IsUndoEnabled(); + const sal_Bool bRecord = pDoc->IsUndoEnabled(); SCTAB nTab = rStartPos.Tab(); ScDocument* pUndoDoc = NULL; ScRangeName* pList = pDoc->GetRangeName(); - USHORT nCount = pList->GetCount(); - USHORT nValidCount = 0; - USHORT i; + sal_uInt16 nCount = pList->GetCount(); + sal_uInt16 nValidCount = 0; + sal_uInt16 i; for (i=0; iInitUndo( pDoc, nTab, nTab ); pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); pDoc->BeginDrawUndo(); // wegen Hoehenanpassung } ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ]; - USHORT j = 0; + sal_uInt16 j = 0; for (i=0; iInitUndo( pDoc, nTab, nTab ); pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, - IDF_ALL, FALSE, pRedoDoc ); + IDF_ALL, sal_False, pRedoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoListNames( &rDocShell, @@ -4736,7 +4736,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi ) rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PAINT_GRID ); //! rDocShell.UpdateOle(GetViewData()); aModificator.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; } else if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); @@ -4746,16 +4746,16 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi ) //------------------------------------------------------------------------ -BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi ) +sal_Bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi ) { ScDocument* pDoc = rDocShell.GetDocument(); SCCOL nStartCol = rOldRange.aStart.Col(); SCROW nStartRow = rOldRange.aStart.Row(); SCTAB nTab = rOldRange.aStart.Tab(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String aFormula; pDoc->GetFormula( nStartCol, nStartRow, nTab, aFormula ); @@ -4770,17 +4770,17 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd ScMarkData aMark; aMark.SetMarkArea( rOldRange ); - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); ScRange aNewRange( rOldRange.aStart, rNewEnd ); - if ( DeleteContents( aMark, IDF_CONTENTS, TRUE, bApi ) ) + if ( DeleteContents( aMark, IDF_CONTENTS, sal_True, bApi ) ) { // GRAM_PODF_A1 for API compatibility. - bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + bRet = EnterMatrix( aNewRange, &aMark, NULL, aFormula, bApi, sal_False, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); if (!bRet) { // versuchen, alten Zustand wiederherzustellen - EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + EnterMatrix( rOldRange, &aMark, NULL, aFormula, bApi, sal_False, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } } @@ -4793,15 +4793,15 @@ BOOL ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd //------------------------------------------------------------------------ -BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, +sal_Bool ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - const ScRange& rDestRange, ULONG nRefresh, - BOOL bFitBlock, BOOL bApi ) + const ScRange& rDestRange, sal_uLong nRefresh, + sal_Bool bFitBlock, sal_Bool bApi ) { //! auch fuer ScViewFunc::InsertAreaLink benutzen! ScDocument* pDoc = rDocShell.GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); @@ -4809,9 +4809,9 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, // remove them first (file format specifies only one link definition // for a cell) - USHORT nLinkCount = pLinkManager->GetLinks().Count(); - USHORT nRemoved = 0; - USHORT nLinkPos = 0; + sal_uInt16 nLinkCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nRemoved = 0; + sal_uInt16 nLinkPos = 0; while (nLinkPosGetLinks()[nLinkPos]; @@ -4844,7 +4844,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, String aFilterName = rFilter; String aNewOptions = rOptions; if (!aFilterName.Len()) - ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, TRUE, !bApi ); + ScDocumentLoader::GetFilterName( rFile, aFilterName, aNewOptions, sal_True, !bApi ); // remove application prefix from filter name here, so the filter options // aren't reset when the filter name is changed in ScAreaLink::DataChanged @@ -4869,7 +4869,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, pLink->SetDoInsert(bFitBlock); // beim ersten Update ggf. nichts einfuegen pLink->Update(); // kein SetInCreate -> Update ausfuehren - pLink->SetDoInsert(TRUE); // Default = TRUE + pLink->SetDoInsert(sal_True); // Default = TRUE SfxBindings* pBindings = rDocShell.GetViewBindings(); if (pBindings) @@ -4877,7 +4877,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator - return TRUE; + return sal_True; } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index e7089349fdb7..9ded868e872d 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -274,17 +274,17 @@ sal_uInt16 ScDocShell::GetHiddenInformationState( sal_uInt16 nStates ) void ScDocShell::BeforeXMLLoading() { - aDocument.DisableIdle( TRUE ); + aDocument.DisableIdle( sal_True ); // prevent unnecessary broadcasts and updates DBG_ASSERT(pModificator == NULL, "The Modificator should not exist"); pModificator = new ScDocShellModificator( *this ); - aDocument.SetImportingXML( TRUE ); + aDocument.SetImportingXML( sal_True ); aDocument.EnableExecuteLink( false ); // #i101304# to be safe, prevent nested loading from external references - aDocument.EnableUndo( FALSE ); + aDocument.EnableUndo( sal_False ); // prevent unnecessary broadcasts and "half way listeners" - aDocument.SetInsertingFromOtherDoc( TRUE ); + aDocument.SetInsertingFromOtherDoc( sal_True ); if (GetCreateMode() != SFX_CREATE_MODE_ORGANIZER) ScColumn::bDoubleAlloc = sal_True; @@ -296,7 +296,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) { UpdateLinks(); // don't prevent establishing of listeners anymore - aDocument.SetInsertingFromOtherDoc( FALSE ); + aDocument.SetInsertingFromOtherDoc( sal_False ); if ( bRet ) { ScChartListenerCollection* pChartListener = aDocument.GetChartListenerCollection(); @@ -323,12 +323,12 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) ScGlobal::UnicodeStrChr( pNameBuffer, SC_COMPILER_FILE_TAB_SEP ) ) { rtl::OUStringBuffer aDocURLBuffer; - BOOL bQuote = TRUE; // Dokumentenname ist immer quoted + sal_Bool bQuote = sal_True; // Dokumentenname ist immer quoted ++pNameBuffer; while ( bQuote && *pNameBuffer ) { if ( *pNameBuffer == '\'' && *(pNameBuffer-1) != '\\' ) - bQuote = FALSE; + bQuote = sal_False; else if( !(*pNameBuffer == '\\' && *(pNameBuffer+1) == '\'') ) aDocURLBuffer.append(*pNameBuffer); // falls escaped Quote: nur Quote in den Namen ++pNameBuffer; @@ -344,7 +344,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) !aINetURLObject.HasError()) // the docname should be a valid URL { aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) ); - aDocument.RenameTab(i, aName, TRUE, TRUE); + aDocument.RenameTab(i, aName, sal_True, sal_True); } // else; nothing has to happen, because it is a user given name } @@ -361,8 +361,8 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) ScDPCollection* pDPCollection = aDocument.GetDPCollection(); if ( pDPCollection ) { - USHORT nDPCount = pDPCollection->GetCount(); - for (USHORT nDP=0; nDPGetCount(); + for (sal_uInt16 nDP=0; nDPGetName().Len() ) @@ -373,12 +373,12 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) ScColumn::bDoubleAlloc = sal_False; } else - aDocument.SetInsertingFromOtherDoc( FALSE ); + aDocument.SetInsertingFromOtherDoc( sal_False ); - aDocument.SetImportingXML( FALSE ); + aDocument.SetImportingXML( sal_False ); aDocument.EnableExecuteLink( true ); - aDocument.EnableUndo( TRUE ); - bIsEmpty = FALSE; + aDocument.EnableUndo( sal_True ); + bIsEmpty = sal_False; if (pModificator) { @@ -390,10 +390,10 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) DBG_ERROR("The Modificator should exist"); } - aDocument.DisableIdle( FALSE ); + aDocument.DisableIdle( sal_False ); } -BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor ) +sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::LoadXML" ); @@ -406,7 +406,7 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R // #i62677# BeforeXMLLoading is also called from ScXMLImport::startDocument when invoked // from an external component. The XMLFromWrapper flag is only set here, when called // through ScDocShell. - aDocument.SetXMLFromWrapper( TRUE ); + aDocument.SetXMLFromWrapper( sal_True ); ScXMLImportWrapper aImport( aDocument, pLoadMedium, xStor ); @@ -420,7 +420,7 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R if ( nError ) pLoadMedium->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); - aDocument.SetXMLFromWrapper( FALSE ); + aDocument.SetXMLFromWrapper( sal_False ); AfterXMLLoading(bRet); //! row heights... @@ -428,11 +428,11 @@ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::R return bRet; } -BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor ) +sal_Bool ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::SaveXML" ); - aDocument.DisableIdle( TRUE ); + aDocument.DisableIdle( sal_True ); ScXMLImportWrapper aImport( aDocument, pSaveMedium, xStor ); sal_Bool bRet(sal_False); @@ -441,12 +441,12 @@ BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R else bRet = aImport.Export(sal_True); - aDocument.DisableIdle( FALSE ); + aDocument.DisableIdle( sal_False ); return bRet; } -BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::Load( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" ); @@ -458,7 +458,7 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium ) GetUndoManager()->Clear(); - BOOL bRet = SfxObjectShell::Load( rMedium ); + sal_Bool bRet = SfxObjectShell::Load( rMedium ); if( bRet ) { if (GetMedium()) @@ -491,7 +491,7 @@ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium ) if ( bRet ) aDocument.InvalidateTableArea(); - bIsEmpty = FALSE; + bIsEmpty = sal_False; FinishedLoading( SFX_LOADED_MAINDOCUMENT | SFX_LOADED_IMAGES ); return bRet; } @@ -514,7 +514,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxEventHint ) ) { - ULONG nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId(); + sal_uLong nEventId = static_cast< const SfxEventHint& >( rHint ).GetEventId(); switch ( nEventId ) { case SFX_EVENT_ACTIVATEDOC: @@ -569,7 +569,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if (rHint.ISA(SfxSimpleHint)) // ohne Parameter { - ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nSlot = ((const SfxSimpleHint&)rHint).GetId(); switch ( nSlot ) { case SFX_HINT_TITLECHANGED: @@ -593,7 +593,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScRange aRange = rStlHint.GetRange(); String aName1 = rStlHint.GetStyle1(); String aName2 = rStlHint.GetStyle2(); - UINT32 nTimeout = rStlHint.GetTimeout(); + sal_uInt32 nTimeout = rStlHint.GetTimeout(); if (!pAutoStyleList) pAutoStyleList = new ScAutoStyleList(this); @@ -601,7 +601,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxEventHint ) ) { - ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId(); switch ( nEventId ) { case SFX_EVENT_LOADFINISHED: @@ -638,7 +638,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScGlobal::GetRscString( STR_SHARED_DOC_WARNING ) ); aBox.SetDefaultCheckBoxText(); aBox.Execute(); - BOOL bChecked = aBox.GetCheckBoxState(); + sal_Bool bChecked = aBox.GetCheckBoxState(); if ( bChecked ) { aAppOptions.SetShowSharedDocumentWarning( !bChecked ); @@ -795,8 +795,8 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) ScChangeViewSettings* pChangeViewSet = aDocument.GetChangeViewSettings(); if ( pChangeViewSet && pChangeViewSet->ShowChanges() ) { - pChangeViewSet->SetShowChanges( FALSE ); - pChangeViewSet->SetShowAccepted( FALSE ); + pChangeViewSet->SetShowChanges( sal_False ); + pChangeViewSet->SetShowAccepted( sal_False ); aDocument.SetChangeViewSettings( *pChangeViewSet ); bChangedViewSettings = true; } @@ -821,8 +821,8 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( bChangedViewSettings ) { - pChangeViewSet->SetShowChanges( TRUE ); - pChangeViewSet->SetShowAccepted( TRUE ); + pChangeViewSet->SetShowChanges( sal_True ); + pChangeViewSet->SetShowAccepted( sal_True ); aDocument.SetChangeViewSettings( *pChangeViewSet ); } } @@ -917,7 +917,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) // Inhalte fuer Organizer laden -BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::LoadFrom" ); @@ -925,7 +925,7 @@ BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium ) WaitObject aWait( GetActiveDialogParent() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if (GetMedium()) { @@ -993,13 +993,13 @@ private: } -BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertFrom" ); LoadMediumGuard aLoadGuard(&aDocument); - BOOL bRet = FALSE; // FALSE heisst Benutzerabbruch !! + sal_Bool bRet = sal_False; // sal_False heisst Benutzerabbruch !! // bei Fehler: Fehler am Stream setzen!! ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() ); @@ -1007,13 +1007,13 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) GetUndoManager()->Clear(); // ob nach dem Import optimale Spaltenbreiten gesetzt werden sollen - BOOL bSetColWidths = FALSE; - BOOL bSetSimpleTextColWidths = FALSE; - BOOL bSimpleColWidth[MAXCOLCOUNT]; - memset( bSimpleColWidth, 1, (MAXCOLCOUNT) * sizeof(BOOL) ); + sal_Bool bSetColWidths = sal_False; + sal_Bool bSetSimpleTextColWidths = sal_False; + sal_Bool bSimpleColWidth[MAXCOLCOUNT]; + memset( bSimpleColWidth, 1, (MAXCOLCOUNT) * sizeof(sal_Bool) ); ScRange aColWidthRange; // ob nach dem Import optimale Zeilenhoehen gesetzt werden sollen - BOOL bSetRowHeights = FALSE; + sal_Bool bSetRowHeights = sal_False; aConvFilterName.Erase(); //@ #BugId 54198 @@ -1032,10 +1032,10 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) aConvFilterName=aFltName; //@ #BugId 54198 - BOOL bCalc3 = ( aFltName.EqualsAscii(pFilterSc30) ); - BOOL bCalc4 = ( aFltName.EqualsAscii(pFilterSc40) ); + sal_Bool bCalc3 = ( aFltName.EqualsAscii(pFilterSc30) ); + sal_Bool bCalc4 = ( aFltName.EqualsAscii(pFilterSc40) ); if (!bCalc3 && !bCalc4) - aDocument.SetInsertingFromOtherDoc( TRUE ); + aDocument.SetInsertingFromOtherDoc( sal_True ); if (aFltName.EqualsAscii(pFilterXML)) bRet = LoadXML( &rMedium, NULL ); @@ -1051,7 +1051,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); } else - bRet = TRUE; + bRet = sal_True; } } else if (aFltName.EqualsAscii(pFilterLotus)) @@ -1060,7 +1060,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); } @@ -1072,22 +1072,22 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_437 ); } - ScColumn::bDoubleAlloc = TRUE; + ScColumn::bDoubleAlloc = sal_True; FltError eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &aDocument, ScGlobal::GetCharsetValue(sItStr)); - ScColumn::bDoubleAlloc = FALSE; + ScColumn::bDoubleAlloc = sal_False; if (eError != eERR_OK) { if (!GetError()) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; - bSetColWidths = TRUE; - bSetRowHeights = TRUE; + bRet = sal_True; + bSetColWidths = sal_True; + bSetRowHeights = sal_True; } else if ( aFltName.EqualsAscii(pFilterExcel4) || aFltName.EqualsAscii(pFilterExcel5) || aFltName.EqualsAscii(pFilterExcel95) || aFltName.EqualsAscii(pFilterExcel97) || @@ -1105,9 +1105,9 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) MakeDrawLayer(); //! im Filter CalcOutputFactor(); // #93255# prepare update of row height - ScColumn::bDoubleAlloc = TRUE; + ScColumn::bDoubleAlloc = sal_True; FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat ); - ScColumn::bDoubleAlloc = FALSE; + ScColumn::bDoubleAlloc = sal_False; aDocument.UpdateFontCharSet(); if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) aDocument.UpdateChartListenerCollection(); //! fuer alle Importe? @@ -1119,7 +1119,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) { if (!GetError()) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); - bRet = TRUE; + bRet = sal_True; } else if (eError != eERR_OK) { @@ -1127,23 +1127,23 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); } else - bRet = TRUE; + bRet = sal_True; // #93255# update of row height done inside of Excel filter to speed up chart import -// bSetRowHeights = TRUE; // #75357# optimal row heights must be updated +// bSetRowHeights = sal_True; // #75357# optimal row heights must be updated } else if (aFltName.EqualsAscii(pFilterAscii)) { SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; ScAsciiOptions aOptions; - BOOL bOptInit = FALSE; + sal_Bool bOptInit = sal_False; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { aOptions.ReadFromString( ((const SfxStringItem*)pItem)->GetValue() ); - bOptInit = TRUE; + bOptInit = sal_True; } if ( !bOptInit ) @@ -1157,7 +1157,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) } FltError eError = eERR_OK; - BOOL bOverflow = FALSE; + sal_Bool bOverflow = sal_False; if( ! rMedium.IsStorage() ) { @@ -1191,8 +1191,8 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (!GetError()) SetError(SCWARN_IMPORT_RANGE_OVERFLOW, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); } - bSetColWidths = TRUE; - bSetSimpleTextColWidths = TRUE; + bSetColWidths = sal_True; + bSetSimpleTextColWidths = sal_True; } else if (aFltName.EqualsAscii(pFilterDBase)) { @@ -1200,7 +1200,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); } @@ -1213,7 +1213,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_850 ); } - ULONG eError = DBaseImport( rMedium.GetPhysicalName(), + sal_uLong eError = DBaseImport( rMedium.GetPhysicalName(), ScGlobal::GetCharsetValue(sItStr), bSimpleColWidth ); if (eError != eERR_OK) @@ -1223,16 +1223,16 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) bRet = ( eError == SCWARN_IMPORT_RANGE_OVERFLOW ); } else - bRet = TRUE; + bRet = sal_True; aColWidthRange.aStart.SetRow( 1 ); // Spaltenheader nicht - bSetColWidths = TRUE; - bSetSimpleTextColWidths = TRUE; + bSetColWidths = sal_True; + bSetSimpleTextColWidths = sal_True; // Memo-Felder fuehren zu einem bSimpleColWidth[nCol]==FALSE for ( SCCOL nCol=0; nCol <= MAXCOL && !bSetRowHeights; nCol++ ) { if ( !bSimpleColWidth[nCol] ) - bSetRowHeights = TRUE; + bSetRowHeights = sal_True; } } else if (aFltName.EqualsAscii(pFilterDif)) @@ -1245,7 +1245,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); } @@ -1266,14 +1266,14 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; + bRet = sal_True; } - bSetColWidths = TRUE; - bSetSimpleTextColWidths = TRUE; - bSetRowHeights = TRUE; + bSetColWidths = sal_True; + bSetSimpleTextColWidths = sal_True; + bSetRowHeights = sal_True; } else if (aFltName.EqualsAscii(pFilterSylk)) { @@ -1299,29 +1299,29 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) if ( eError != eERR_OK && !GetError() ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); - bSetColWidths = TRUE; - bSetSimpleTextColWidths = TRUE; - bSetRowHeights = TRUE; + bSetColWidths = sal_True; + bSetSimpleTextColWidths = sal_True; + bSetRowHeights = sal_True; } else if (aFltName.EqualsAscii(pFilterQPro6)) { - ScColumn::bDoubleAlloc = TRUE; + ScColumn::bDoubleAlloc = sal_True; FltError eError = ScFormatFilter::Get().ScImportQuattroPro( rMedium, &aDocument); - ScColumn::bDoubleAlloc = FALSE; + ScColumn::bDoubleAlloc = sal_False; if (eError != eERR_OK) { if (!GetError()) SetError( eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; + bRet = sal_True; // TODO: Filter should set column widths. Not doing it here, it may // result in very narrow or wide columns, depending on content. // Setting row heights makes cells with font size attribution or // wrapping enabled look nicer.. - bSetRowHeights = TRUE; + bSetRowHeights = sal_True; } else if (aFltName.EqualsAscii(pFilterRtf)) { @@ -1340,14 +1340,14 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; + bRet = sal_True; aDocument.StartAllListeners(); aDocument.SetDirty(); - bSetColWidths = TRUE; - bSetRowHeights = TRUE; + bSetColWidths = sal_True; + bSetRowHeights = sal_True; } else { @@ -1361,7 +1361,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) else if (aFltName.EqualsAscii(pFilterHtml) || aFltName.EqualsAscii(pFilterHtmlWebQ)) { FltError eError = SCERR_IMPORT_UNKNOWN; - BOOL bWebQuery = aFltName.EqualsAscii(pFilterHtmlWebQ); + sal_Bool bWebQuery = aFltName.EqualsAscii(pFilterHtmlWebQ); if( !rMedium.IsStorage() ) { SvStream* pInStream = rMedium.GetInStream(); @@ -1372,7 +1372,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { String aFilterOption = (static_cast(pItem))->GetValue(); lcl_parseHtmlFilterOption(aFilterOption, eLang, bDateConvert); @@ -1391,10 +1391,10 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) SetError(eError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) )); if( ( eError & ERRCODE_WARNING_MASK ) == ERRCODE_WARNING_MASK ) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; + bRet = sal_True; aDocument.StartAllListeners(); aDocument.SetDirty(); } @@ -1414,7 +1414,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) } if (!bCalc3) - aDocument.SetInsertingFromOtherDoc( FALSE ); + aDocument.SetInsertingFromOtherDoc( sal_False ); } else { @@ -1447,18 +1447,18 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) { for ( SCCOL nCol=0; nCol <= nEndCol; nCol++ ) { - USHORT nWidth = aDocument.GetOptimalColWidth( - nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoom, aZoom, FALSE, &aMark, + sal_uInt16 nWidth = aDocument.GetOptimalColWidth( + nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoom, aZoom, sal_False, &aMark, (bSetSimpleTextColWidths && bSimpleColWidth[nCol]) ); aDocument.SetColWidth( nCol, nTab, - nWidth + (USHORT)ScGlobal::nLastColWidthExtra ); + nWidth + (sal_uInt16)ScGlobal::nLastColWidthExtra ); } } // if ( bSetRowHeights ) // { // // nExtra must be 0 // aDocument.SetOptimalHeight( 0, nEndRow, nTab, 0, &aVirtDev, -// nPPTX, nPPTY, aZoom, aZoom, FALSE ); +// nPPTX, nPPTY, aZoom, aZoom, sal_False ); // } } if ( bSetRowHeights ) @@ -1470,7 +1470,7 @@ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium ) if ( bRet ) aDocument.InvalidateTableArea(); - bIsEmpty = FALSE; + bIsEmpty = sal_False; return bRet; } @@ -1514,7 +1514,7 @@ ScDocShell::PrepareSaveGuard::~PrepareSaveGuard() } -BOOL __EXPORT ScDocShell::Save() +sal_Bool __EXPORT ScDocShell::Save() { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Save" ); @@ -1523,14 +1523,14 @@ BOOL __EXPORT ScDocShell::Save() PrepareSaveGuard aPrepareGuard( *this); // wait cursor is handled with progress bar - BOOL bRet = SfxObjectShell::Save(); + sal_Bool bRet = SfxObjectShell::Save(); if( bRet ) bRet = SaveXML( GetMedium(), NULL ); return bRet; } -BOOL __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) +sal_Bool __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::SaveAs" ); @@ -1549,7 +1549,7 @@ BOOL __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) PrepareSaveGuard aPrepareGuard( *this); // wait cursor is handled with progress bar - BOOL bRet = SfxObjectShell::SaveAs( rMedium ); + sal_Bool bRet = SfxObjectShell::SaveAs( rMedium ); if( bRet ) bRet = SaveXML( &rMedium, NULL ); @@ -1557,13 +1557,13 @@ BOOL __EXPORT ScDocShell::SaveAs( SfxMedium& rMedium ) } -BOOL __EXPORT ScDocShell::IsInformationLost() +sal_Bool __EXPORT ScDocShell::IsInformationLost() { /* const SfxFilter *pFilt = GetMedium()->GetFilter(); - BOOL bRet = pFilt && pFilt->IsAlienFormat() && bNoInformLost; + sal_Bool bRet = pFilt && pFilt->IsAlienFormat() && bNoInformLost; if (bNoInformLost) // nur einmal!! - bNoInformLost = FALSE; + bNoInformLost = sal_False; return bRet; */ //!!! bei Gelegenheit ein korrekte eigene Behandlung einbauen @@ -1573,7 +1573,7 @@ BOOL __EXPORT ScDocShell::IsInformationLost() // Xcl-like column width measured in characters of standard font. -xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth ) +xub_StrLen lcl_ScDocShell_GetColWidthInChars( sal_uInt16 nWidth ) { // double fColScale = 1.0; double f = nWidth; @@ -1588,7 +1588,7 @@ xub_StrLen lcl_ScDocShell_GetColWidthInChars( USHORT nWidth ) void lcl_ScDocShell_GetFixedWidthString( String& rStr, const ScDocument& rDoc, - SCTAB nTab, SCCOL nCol, BOOL bValue, SvxCellHorJustify eHorJust ) + SCTAB nTab, SCCOL nCol, sal_Bool bValue, SvxCellHorJustify eHorJust ) { xub_StrLen nLen = lcl_ScDocShell_GetColWidthInChars( rDoc.GetColWidth( nCol, nTab ) ); @@ -1631,7 +1631,7 @@ void lcl_ScDocShell_WriteEmptyFixedWidthString( SvStream& rStream, const ScDocument& rDoc, SCTAB nTab, SCCOL nCol ) { String aString; - lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, FALSE, + lcl_ScDocShell_GetFixedWidthString( aString, rDoc, nTab, nCol, sal_False, SVX_HOR_JUSTIFY_STANDARD ); rStream.WriteUnicodeOrByteText( aString ); } @@ -1642,19 +1642,19 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt sal_Unicode cDelim = rAsciiOpt.nFieldSepCode; sal_Unicode cStrDelim = rAsciiOpt.nTextSepCode; CharSet eCharSet = rAsciiOpt.eCharSet; - BOOL bFixedWidth = rAsciiOpt.bFixedWidth; - BOOL bSaveAsShown = rAsciiOpt.bSaveAsShown; + sal_Bool bFixedWidth = rAsciiOpt.bFixedWidth; + sal_Bool bSaveAsShown = rAsciiOpt.bSaveAsShown; CharSet eOldCharSet = rStream.GetStreamCharSet(); rStream.SetStreamCharSet( eCharSet ); - USHORT nOldNumberFormatInt = rStream.GetNumberFormatInt(); + sal_uInt16 nOldNumberFormatInt = rStream.GetNumberFormatInt(); ByteString aStrDelimEncoded; // only used if not Unicode UniString aStrDelimDecoded; // only used if context encoding - BOOL bContextOrNotAsciiEncoding; + sal_Bool bContextOrNotAsciiEncoding; if ( eCharSet == RTL_TEXTENCODING_UNICODE ) { rStream.StartWritingUnicodeText(); - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = sal_False; } else { @@ -1670,7 +1670,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt aStrDelimDecoded = String( aStrDelimEncoded, eCharSet ); } else - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = sal_False; } SCCOL nStartCol = 0; @@ -1688,8 +1688,8 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt const ScViewOptions& rOpt = (pViewSh) ? pViewSh->GetViewData()->GetOptions() : aDocument.GetViewOptions(); - BOOL bShowFormulas = rOpt.GetOption( VOPT_FORMULAS ); - BOOL bTabProtect = aDocument.IsTabProtected( nTab ); + sal_Bool bShowFormulas = rOpt.GetOption( VOPT_FORMULAS ); + sal_Bool bTabProtect = aDocument.IsTabProtected( nTab ); SCCOL nCol; SCROW nRow; @@ -1704,10 +1704,10 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt ScBaseCell* pCell; while ( ( pCell = aIter.GetNext( nCol, nRow ) ) != NULL ) { - BOOL bProgress = FALSE; // only upon line change + sal_Bool bProgress = sal_False; // only upon line change if ( nNextRow < nRow ) { // empty rows or/and empty columns up to end of row - bProgress = TRUE; + bProgress = sal_True; for ( nEmptyCol = nNextCol; nEmptyCol < nEndCol; nEmptyCol++ ) { // remaining columns of last row if ( bFixedWidth ) @@ -1753,7 +1753,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt } if ( nCol == nEndCol ) { - bProgress = TRUE; + bProgress = sal_True; nNextCol = nStartCol; nNextRow = nRow + 1; } @@ -1771,26 +1771,26 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt pProtAttr->GetHideFormula() ) ) eType = CELLTYPE_NONE; // hide } - BOOL bString; + sal_Bool bString; switch ( eType ) { case CELLTYPE_NOTE: case CELLTYPE_NONE: aString.Erase(); - bString = FALSE; + bString = sal_False; break; case CELLTYPE_FORMULA : { - USHORT nErrCode; + sal_uInt16 nErrCode; if ( bShowFormulas ) { ((ScFormulaCell*)pCell)->GetFormula( aString ); - bString = TRUE; + bString = sal_True; } else if ( ( nErrCode = ((ScFormulaCell*)pCell)->GetErrCode() ) != 0 ) { aString = ScGlobal::GetErrorString( nErrCode ); - bString = TRUE; + bString = sal_True; } else if ( ((ScFormulaCell*)pCell)->IsValue() ) { @@ -1805,7 +1805,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt else { ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter ); - bString = FALSE; + bString = sal_False; } } else @@ -1819,7 +1819,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt } else ((ScFormulaCell*)pCell)->GetString( aString ); - bString = TRUE; + bString = sal_True; } } break; @@ -1833,7 +1833,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt } else ((ScStringCell*)pCell)->GetString( aString ); - bString = TRUE; + bString = sal_True; break; case CELLTYPE_EDIT : { @@ -1842,7 +1842,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt EditEngine& rEngine = aDocument.GetEditEngine(); rEngine.SetText( *pObj); aString = rEngine.GetText(); // including LF - bString = TRUE; + bString = sal_True; } break; case CELLTYPE_VALUE : @@ -1858,14 +1858,14 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt else { ScCellFormat::GetInputString( pCell, nFormat, aString, rFormatter ); - bString = FALSE; + bString = sal_False; } } break; default: DBG_ERROR( "ScDocShell::AsciiSave: unknown CellType" ); aString.Erase(); - bString = FALSE; + bString = sal_False; } if ( bFixedWidth ) @@ -2009,7 +2009,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt rStream.SetNumberFormatInt( nOldNumberFormatInt ); } -BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) +sal_Bool __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertTo" ); @@ -2025,7 +2025,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) DBG_ASSERT( rMed.GetFilter(), "Filter == 0" ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String aFltName = rMed.GetFilter()->GetFilterName(); /* @@ -2117,7 +2117,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) SfxItemSet* pSet = rMed.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); } @@ -2134,7 +2134,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) WaitObject aWait( GetActiveDialogParent() ); ScImportOptions aOptions( sItStr ); AsciiSave( *pStream, aOptions ); - bRet = TRUE; + bRet = sal_True; if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) @@ -2147,7 +2147,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) SfxItemSet* pSet = rMed.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { sCharSet = ((const SfxStringItem*)pItem)->GetValue(); } @@ -2163,9 +2163,9 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) WaitObject aWait( GetActiveDialogParent() ); // HACK damit Sba geoffnetes TempFile ueberschreiben kann rMed.CloseOutStream(); - BOOL bHasMemo = FALSE; + sal_Bool bHasMemo = sal_False; - ULONG eError = DBaseExport( rMed.GetPhysicalName(), + sal_uLong eError = DBaseExport( rMed.GetPhysicalName(), ScGlobal::GetCharsetValue(sCharSet), bHasMemo ); if ( eError != eERR_OK && (eError & ERRCODE_WARNING_MASK) ) @@ -2189,7 +2189,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) } else { - bRet = TRUE; + bRet = sal_True; if ( bHasMemo ) { SfxStringItem* pNameItem = @@ -2197,9 +2197,9 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) INetURLObject aDbtFile( pNameItem->GetValue(), INET_PROT_FILE ); aDbtFile.setExtension( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("dbt")) ); if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) ) - bRet = FALSE; + bRet = sal_False; if ( bRet && !MoveFile( aTmpFile, aDbtFile ) ) - bRet = FALSE; + bRet = sal_False; if ( !bRet ) { KillFile( aTmpFile ); @@ -2218,7 +2218,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) SfxItemSet* pSet = rMed.GetItemSet(); const SfxPoolItem* pItem; if ( pSet && SFX_ITEM_SET == - pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) { sItStr = ((const SfxStringItem*)pItem)->GetValue(); } @@ -2234,7 +2234,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) WaitObject aWait( GetActiveDialogParent() ); ScFormatFilter::Get().ScExportDif( *pStream, &aDocument, ScAddress(0,0,0), ScGlobal::GetCharsetValue(sItStr) ); - bRet = TRUE; + bRet = sal_True; if (aDocument.GetTableCount() > 1) if (!rMed.GetError()) @@ -2254,7 +2254,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) ScRange aRange( 0,0,0, nEndCol,nEndRow,0 ); ScImportExport aImExport( &aDocument, aRange ); - aImExport.SetFormulas( TRUE ); + aImExport.SetFormulas( sal_True ); bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SOT_FORMATSTR_ID_SYLK ); } } @@ -2283,15 +2283,15 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed ) } -BOOL __EXPORT ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) +sal_Bool __EXPORT ScDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor ) { return SfxObjectShell::SaveCompleted( xStor ); } -BOOL __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) +sal_Bool __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) { - BOOL bRet = SfxObjectShell::DoSaveCompleted( pNewStor ); + sal_Bool bRet = SfxObjectShell::DoSaveCompleted( pNewStor ); // SC_HINT_DOC_SAVED fuer Wechsel ReadOnly -> Read/Write Broadcast( SfxSimpleHint( SC_HINT_DOC_SAVED ) ); @@ -2299,7 +2299,7 @@ BOOL __EXPORT ScDocShell::DoSaveCompleted( SfxMedium * pNewStor ) } -sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId ) +sal_Bool ScDocShell::QuerySlotExecutable( sal_uInt16 nSlotId ) { // #i112634# ask VBA event handlers whether to save or print the document @@ -2338,7 +2338,7 @@ sal_Bool ScDocShell::QuerySlotExecutable( USHORT nSlotId ) } -USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) +sal_uInt16 __EXPORT ScDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) { if(SC_MOD()->GetCurRefDlgId()>0) { @@ -2354,12 +2354,12 @@ USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } } - return FALSE; + return sal_False; } if ( aDocument.IsInLinkUpdate() || aDocument.IsInInterpreter() ) { ErrorMessage(STR_CLOSE_ERROR_LINK); - return FALSE; + return sal_False; } DoEnterHandler(); @@ -2384,9 +2384,9 @@ USHORT __EXPORT ScDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing ) } // end handler code - USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing ); - if (nRet == TRUE) // TRUE = schliessen - aDocument.DisableIdle(TRUE); // nicht mehr drin rumpfuschen !!! + sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing ); + if (nRet == sal_True) // sal_True = schliessen + aDocument.DisableIdle(sal_True); // nicht mehr drin rumpfuschen !!! return nRet; } @@ -2440,9 +2440,9 @@ String ScDocShell::GetDifFilterName() // static return String::CreateFromAscii(pFilterDif); } -BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static +sal_Bool ScDocShell::HasAutomaticTableName( const String& rFilter ) // static { - // TRUE for those filters that keep the default table name + // sal_True for those filters that keep the default table name // (which is language specific) return rFilter.EqualsAscii( pFilterAscii ) @@ -2463,15 +2463,15 @@ BOOL ScDocShell::HasAutomaticTableName( const String& rFilter ) // static aDdeTextFmt(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TEXT"))), \ nPrtToScreenFactor( 1.0 ), \ pImpl ( new DocShell_Impl ), \ - bHeaderOn ( TRUE ), \ - bFooterOn ( TRUE ), \ - bNoInformLost ( TRUE ), \ - bIsEmpty ( TRUE ), \ - bIsInUndo ( FALSE ), \ - bDocumentModifiedPending( FALSE ), \ + bHeaderOn ( sal_True ), \ + bFooterOn ( sal_True ), \ + bNoInformLost ( sal_True ), \ + bIsEmpty ( sal_True ), \ + bIsInUndo ( sal_False ), \ + bDocumentModifiedPending( sal_False ), \ nDocumentLock ( 0 ), \ nCanUpdate (com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG), \ - bUpdateEnabled ( TRUE ), \ + bUpdateEnabled ( sal_True ), \ pOldAutoDBRange ( NULL ), \ pDocHelper ( NULL ), \ pAutoStyleList ( NULL ), \ @@ -2586,7 +2586,7 @@ SfxUndoManager* __EXPORT ScDocShell::GetUndoManager() return aDocument.GetUndoManager(); } -void ScDocShell::SetModified( BOOL bModified ) +void ScDocShell::SetModified( sal_Bool bModified ) { if ( SfxObjectShell::IsEnableSetModified() ) { @@ -2596,7 +2596,7 @@ void ScDocShell::SetModified( BOOL bModified ) } -void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ ) +void ScDocShell::SetDocumentModified( sal_Bool bIsModified /* = sal_True */ ) { // BroadcastUno muss auch mit pPaintLockData sofort passieren //! auch bei SetDrawModified, wenn Drawing angebunden ist @@ -2616,16 +2616,16 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ ) if ( bIsModified ) { if ( aDocument.IsAutoCalcShellDisabled() ) - SetDocumentModifiedPending( TRUE ); + SetDocumentModifiedPending( sal_True ); else { - SetDocumentModifiedPending( FALSE ); + SetDocumentModifiedPending( sal_False ); aDocument.InvalidateStyleSheetUsage(); aDocument.InvalidateTableArea(); aDocument.InvalidateLastTableOpParams(); aDocument.Broadcast( SC_HINT_DATACHANGED, BCA_BRDCST_ALWAYS, NULL ); if ( aDocument.IsForcedFormulaPending() && aDocument.GetAutoCalc() ) - aDocument.CalcFormulaTree( TRUE ); + aDocument.CalcFormulaTree( sal_True ); PostDataChanged(); // Detective AutoUpdate: @@ -2637,9 +2637,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ ) if ( pList && ( aDocument.IsDetectiveDirty() || pList->HasAddError() ) && pList->Count() && !IsInUndo() && SC_MOD()->GetAppOptions().GetDetectiveAuto() ) { - GetDocFunc().DetectiveRefresh(TRUE); // TRUE = caused by automatic update + GetDocFunc().DetectiveRefresh(sal_True); // sal_True = caused by automatic update } - aDocument.SetDetectiveDirty(FALSE); // always reset, also if not refreshed + aDocument.SetDetectiveDirty(sal_False); // always reset, also if not refreshed } // #b6697848# notify UNO objects after BCA_BRDCST_ALWAYS etc. @@ -2651,9 +2651,9 @@ void ScDocShell::SetDocumentModified( BOOL bIsModified /* = TRUE */ ) // (Drawing muss auch beim normalen SetDocumentModified upgedated werden, // z.B. bei Tabelle loeschen etc.) -void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ ) +void ScDocShell::SetDrawModified( sal_Bool bIsModified /* = sal_True */ ) { - BOOL bUpdate = ( bIsModified != IsModified() ); + sal_Bool bUpdate = ( bIsModified != IsModified() ); SetModified( bIsModified ); @@ -2688,7 +2688,7 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ ) } } -void ScDocShell::SetInUndo(BOOL bSet) +void ScDocShell::SetInUndo(sal_Bool bSet) { bIsInUndo = bSet; } @@ -2703,8 +2703,8 @@ void ScDocShell::GetDocStat( ScDocStat& rDocStat ) if ( pPrinter ) for ( SCTAB i=0; i( rDocStat.nPageCount + - (USHORT) ScPrintFunc( this, pPrinter, i ).GetTotalPages() ); + rDocStat.nPageCount = sal::static_int_cast( rDocStat.nPageCount + + (sal_uInt16) ScPrintFunc( this, pPrinter, i ).GetTotalPages() ); } @@ -2778,7 +2778,7 @@ void ScDocShell::UseSheetSaveEntries() for (nTab = 0; nTab < nTabCount; ++nTab) if (aDocument.IsStreamValid(nTab)) - aDocument.SetStreamValid(nTab, FALSE); + aDocument.SetStreamValid(nTab, sal_False); } } } @@ -2793,8 +2793,8 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& rDS ) ScDocument* pDoc = rDocShell.GetDocument(); bAutoCalcShellDisabled = pDoc->IsAutoCalcShellDisabled(); bIdleDisabled = pDoc->IsIdleDisabled(); - pDoc->SetAutoCalcShellDisabled( TRUE ); - pDoc->DisableIdle( TRUE ); + pDoc->SetAutoCalcShellDisabled( sal_True ); + pDoc->DisableIdle( sal_True ); } @@ -2814,7 +2814,7 @@ void ScDocShellModificator::SetDocumentModified() if ( !pDoc->IsImportingXML() ) { // AutoCalcShellDisabled temporaer restaurieren - BOOL bDisabled = pDoc->IsAutoCalcShellDisabled(); + sal_Bool bDisabled = pDoc->IsAutoCalcShellDisabled(); pDoc->SetAutoCalcShellDisabled( bAutoCalcShellDisabled ); rDocShell.SetDocumentModified(); pDoc->SetAutoCalcShellDisabled( bDisabled ); @@ -2866,7 +2866,7 @@ void ScDocShell::SetChangeRecording( bool bActivate ) { aDocument.StartChangeTracking(); ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); aDocument.SetChangeViewSettings(aChangeViewSet); } else @@ -2881,7 +2881,7 @@ void ScDocShell::SetChangeRecording( bool bActivate ) // Slots invalidieren SfxBindings* pBindings = GetViewBindings(); if (pBindings) - pBindings->InvalidateAll(FALSE); + pBindings->InvalidateAll(sal_False); } } diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 14ff7622818c..084e35b610ba 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -72,22 +72,22 @@ using namespace com::sun::star; //------------------------------------------------------------------ -BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) +sal_Bool __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) { RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::InitNew" ); - BOOL bRet = SfxObjectShell::InitNew( xStor ); + sal_Bool bRet = SfxObjectShell::InitNew( xStor ); aDocument.MakeTable(0); // zusaetzliche Tabellen werden von der ersten View angelegt, - // wenn bIsEmpty dann noch TRUE ist + // wenn bIsEmpty dann noch sal_True ist if( bRet ) { Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ), (long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) ); // hier muss auch der Start angepasst werden - SetVisAreaOrSize( Rectangle( Point(), aSize ), TRUE ); + SetVisAreaOrSize( Rectangle( Point(), aSize ), sal_True ); } aDocument.SetDrawDefaults(); // drawing layer defaults that are set only in InitNew @@ -129,13 +129,13 @@ BOOL __EXPORT ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xSt //------------------------------------------------------------------ -BOOL ScDocShell::IsEmpty() const +sal_Bool ScDocShell::IsEmpty() const { return bIsEmpty; } -void ScDocShell::SetEmpty(BOOL bSet) +void ScDocShell::SetEmpty(sal_Bool bSet) { bIsEmpty = bSet; } @@ -211,7 +211,7 @@ void ScDocShell::InitItems() if ( !aDocument.IsValidAsianCompression() ) { // set compression mode from configuration if not already set (e.g. XML import) - aDocument.SetAsianCompression( sal::static_int_cast( aAsian.GetCharDistanceCompression() ) ); + aDocument.SetAsianCompression( sal::static_int_cast( aAsian.GetCharDistanceCompression() ) ); } if ( !aDocument.IsValidAsianKerning() ) @@ -257,7 +257,7 @@ ScDrawLayer* ScDocShell::MakeDrawLayer() InitItems(); // incl. Undo und Basic Broadcast( SfxSimpleHint( SC_HINT_DRWLAYER_NEW ) ); if (nDocumentLock) - pDrawLayer->setLock(TRUE); + pDrawLayer->setLock(sal_True); } return pDrawLayer; } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 233843935bbd..ec23a1b3a21a 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -115,8 +115,8 @@ void ScDocShell::PostDataChanged() } void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, - SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart, - USHORT nExtFlags ) + SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart, + sal_uInt16 nExtFlags ) { if (!ValidCol(nStartCol)) nStartCol = MAXCOL; if (!ValidRow(nStartRow)) nStartRow = MAXROW; @@ -127,7 +127,7 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, { // #i54081# PAINT_EXTRAS still has to be brodcast because it changes the // current sheet if it's invalid. All other flags added to pPaintLockData. - USHORT nLockPart = nPart & ~PAINT_EXTRAS; + sal_uInt16 nLockPart = nPart & ~PAINT_EXTRAS; if ( nLockPart ) { //! nExtFlags ??? @@ -177,7 +177,7 @@ void ScDocShell::PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, aDocument.ResetChanged( ScRange(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) ); } -void ScDocShell::PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags ) +void ScDocShell::PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags ) { PostPaint( rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab(), @@ -204,7 +204,7 @@ void ScDocShell::PostPaintExtras() PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS ); } -void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange ) +void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange ) { if ( ( rExtFlags & SC_PF_LINES ) == 0 && aDocument.HasAttrib( rRange, HASATTR_PAINTEXT ) ) { @@ -228,7 +228,7 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange ) } } -void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, +void ScDocShell::UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab ) { UpdatePaintExt( rExtFlags, ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ) ); @@ -236,14 +236,14 @@ void ScDocShell::UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStar //------------------------------------------------------------------ -void ScDocShell::LockPaint_Impl(BOOL bDoc) +void ScDocShell::LockPaint_Impl(sal_Bool bDoc) { if ( !pPaintLockData ) pPaintLockData = new ScPaintLockData(0); //! Modus... pPaintLockData->IncLevel(bDoc); } -void ScDocShell::UnlockPaint_Impl(BOOL bDoc) +void ScDocShell::UnlockPaint_Impl(sal_Bool bDoc) { if ( pPaintLockData ) { @@ -259,9 +259,9 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc) ScRangeListRef xRangeList = pPaint->GetRangeList(); if (xRangeList) { - USHORT nParts = pPaint->GetParts(); - ULONG nCount = xRangeList->Count(); - for ( ULONG i=0; iGetParts(); + sal_uLong nCount = xRangeList->Count(); + for ( sal_uLong i=0; iGetObject(i); @@ -283,63 +283,63 @@ void ScDocShell::UnlockPaint_Impl(BOOL bDoc) } } -void ScDocShell::LockDocument_Impl(USHORT nNew) +void ScDocShell::LockDocument_Impl(sal_uInt16 nNew) { if (!nDocumentLock) { ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer(); if (pDrawLayer) - pDrawLayer->setLock(TRUE); + pDrawLayer->setLock(sal_True); } nDocumentLock = nNew; } -void ScDocShell::UnlockDocument_Impl(USHORT nNew) +void ScDocShell::UnlockDocument_Impl(sal_uInt16 nNew) { nDocumentLock = nNew; if (!nDocumentLock) { ScDrawLayer* pDrawLayer = aDocument.GetDrawLayer(); if (pDrawLayer) - pDrawLayer->setLock(FALSE); + pDrawLayer->setLock(sal_False); } } -USHORT ScDocShell::GetLockCount() const +sal_uInt16 ScDocShell::GetLockCount() const { return nDocumentLock; } -void ScDocShell::SetLockCount(USHORT nNew) +void ScDocShell::SetLockCount(sal_uInt16 nNew) { if (nNew) // setzen { if ( !pPaintLockData ) pPaintLockData = new ScPaintLockData(0); //! Modus... - pPaintLockData->SetLevel(nNew-1, TRUE); + pPaintLockData->SetLevel(nNew-1, sal_True); LockDocument_Impl(nNew); } else if (pPaintLockData) // loeschen { - pPaintLockData->SetLevel(0, TRUE); // bei Unlock sofort ausfuehren - UnlockPaint_Impl(TRUE); // jetzt + pPaintLockData->SetLevel(0, sal_True); // bei Unlock sofort ausfuehren + UnlockPaint_Impl(sal_True); // jetzt UnlockDocument_Impl(0); } } void ScDocShell::LockPaint() { - LockPaint_Impl(FALSE); + LockPaint_Impl(sal_False); } void ScDocShell::UnlockPaint() { - UnlockPaint_Impl(FALSE); + UnlockPaint_Impl(sal_False); } void ScDocShell::LockDocument() { - LockPaint_Impl(TRUE); + LockPaint_Impl(sal_True); LockDocument_Impl(nDocumentLock + 1); } @@ -347,7 +347,7 @@ void ScDocShell::UnlockDocument() { if (nDocumentLock) { - UnlockPaint_Impl(TRUE); + UnlockPaint_Impl(sal_True); UnlockDocument_Impl(nDocumentLock - 1); } else @@ -358,7 +358,7 @@ void ScDocShell::UnlockDocument() //------------------------------------------------------------------ -void ScDocShell::SetInplace( BOOL bInplace ) +void ScDocShell::SetInplace( sal_Bool bInplace ) { if (bIsInplace != bInplace) { @@ -375,7 +375,7 @@ void ScDocShell::CalcOutputFactor() return; } - BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); + sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if (bTextWysiwyg) { nPrtToScreenFactor = 1.0; @@ -428,8 +428,8 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L { // Einstellungen aus dem SpellCheckCfg kommen in Doc- und ViewOptions - USHORT nDefLang, nCjkLang, nCtlLang; - BOOL bAutoSpell; + sal_uInt16 nDefLang, nCjkLang, nCtlLang; + sal_Bool bAutoSpell; ScModule::GetSpellSettings( nDefLang, nCjkLang, nCtlLang, bAutoSpell ); ScModule* pScMod = SC_MOD(); @@ -438,7 +438,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L aDocOpt.SetAutoSpell( bAutoSpell ); // zweistellige Jahreszahleneingabe aus Extras->Optionen->Allgemein->Sonstiges - aDocOpt.SetYear2000( sal::static_int_cast( ::utl::MiscCfg().GetYear2000() ) ); + aDocOpt.SetYear2000( sal::static_int_cast( ::utl::MiscCfg().GetYear2000() ) ); if (bForLoading) { @@ -463,7 +463,7 @@ Printer* ScDocShell::GetDocumentPrinter() // fuer OLE return aDocument.GetPrinter(); } -SfxPrinter* ScDocShell::GetPrinter(BOOL bCreateIfNotExist) +SfxPrinter* ScDocShell::GetPrinter(sal_Bool bCreateIfNotExist) { return aDocument.GetPrinter(bCreateIfNotExist); } @@ -472,7 +472,7 @@ void ScDocShell::UpdateFontList() { delete pImpl->pFontList; // pImpl->pFontList = new FontList( GetPrinter(), Application::GetDefaultDevice() ); - pImpl->pFontList = new FontList( GetRefDevice(), NULL, FALSE ); // FALSE or TRUE??? + pImpl->pFontList = new FontList( GetRefDevice(), NULL, sal_False ); // sal_False or sal_True??? SvxFontListItem aFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST ); PutItem( aFontListItem ); @@ -484,9 +484,9 @@ OutputDevice* ScDocShell::GetRefDevice() return aDocument.GetRefDevice(); } -USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags ) +sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags ) { - SfxPrinter *pOld = aDocument.GetPrinter( FALSE ); + SfxPrinter *pOld = aDocument.GetPrinter( sal_False ); if ( pOld && pOld->IsPrinting() ) return SFX_PRINTERROR_BUSY; @@ -557,8 +557,8 @@ USHORT ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags ) if (nDiffFlags & SFX_PRINTER_CHG_ORIENTATION) { const SvxPageItem& rOldItem = (const SvxPageItem&)rSet.Get(ATTR_PAGE); - BOOL bWasLand = rOldItem.IsLandscape(); - BOOL bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); + sal_Bool bWasLand = rOldItem.IsLandscape(); + sal_Bool bNewLand = ( pNewPrinter->GetOrientation() == ORIENTATION_LANDSCAPE ); if (bNewLand != bWasLand) { SvxPageItem aNewItem( rOldItem ); @@ -665,13 +665,13 @@ void ScDocShell::SetChangeComment( ScChangeAction* pAction, const String& rComme ScChangeTrack* pTrack = GetDocument()->GetChangeTrack(); if (pTrack) { - ULONG nNumber = pAction->GetActionNumber(); + sal_uLong nNumber = pAction->GetActionNumber(); pTrack->NotifyModified( SC_CTM_CHANGE, nNumber, nNumber ); } } } -void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext) +void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,sal_Bool bPrevNext) { if (!pAction) return; // ohne Aktion ist nichts.. @@ -681,7 +681,7 @@ void ScDocShell::ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pP DateTime aDT = pAction->GetDateTime(); String aDate = ScGlobal::pLocaleData->getDate( aDT ); aDate += ' '; - aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE ); + aDate += ScGlobal::pLocaleData->getTime( aDT, sal_False, sal_False ); SfxItemSet aSet( GetPool(), SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_AUTHOR, @@ -733,7 +733,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc ) if (pOtherMed) aOtherFile = pOtherMed->GetName(); } - BOOL bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() ); + sal_Bool bSameDoc = ( aThisFile == aOtherFile && aThisFile.Len() ); if ( !bSameDoc ) { // create change actions from comparing with the name of the user @@ -769,7 +769,7 @@ void ScDocShell::CompareDocument( ScDocument& rOtherDoc ) // //--------------------------------------------------------------------- -inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL bIgnore100Sec ) +inline sal_Bool lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, sal_Bool bIgnore100Sec ) { return pA && pB && pA->GetActionNumber() == pB->GetActionNumber() && @@ -781,14 +781,14 @@ inline BOOL lcl_Equal( const ScChangeAction* pA, const ScChangeAction* pB, BOOL // State nicht vergleichen, falls eine alte Aenderung akzeptiert wurde } -bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, BOOL bIgnore100Sec ) +bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument* pSearchDoc, const ScChangeAction* pFirstSearchAction, const ScChangeAction* pLastSearchAction, sal_Bool bIgnore100Sec ) { if ( !pDoc || !pAction || !pSearchDoc || !pFirstSearchAction || !pLastSearchAction ) { return false; } - ULONG nLastSearchAction = pLastSearchAction->GetActionNumber(); + sal_uLong nLastSearchAction = pLastSearchAction->GetActionNumber(); const ScChangeAction* pA = pFirstSearchAction; while ( pA && pA->GetActionNumber() <= nLastSearchAction ) { @@ -800,9 +800,9 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument pAction->GetBigRange() == pA->GetBigRange() ) { String aActionDesc; - pAction->GetDescription( aActionDesc, pDoc, TRUE ); + pAction->GetDescription( aActionDesc, pDoc, sal_True ); String aADesc; - pA->GetDescription( aADesc, pSearchDoc, TRUE ); + pA->GetDescription( aADesc, pSearchDoc, sal_True ); if ( aActionDesc.Equals( aADesc ) ) { DBG_ERROR( "lcl_FindAction(): found equal action!" ); @@ -815,9 +815,9 @@ bool lcl_FindAction( ScDocument* pDoc, const ScChangeAction* pAction, ScDocument return false; } -void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheckDuplicates, ULONG nOffset, ScChangeActionMergeMap* pMergeMap, bool bInverseMap ) +void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheckDuplicates, sal_uLong nOffset, ScChangeActionMergeMap* pMergeMap, bool bInverseMap ) { - ScTabViewShell* pViewSh = GetBestViewShell( FALSE ); //! Funktionen an die DocShell + ScTabViewShell* pViewSh = GetBestViewShell( sal_False ); //! Funktionen an die DocShell if (!pViewSh) return; @@ -835,17 +835,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck { // #51138# visuelles RedLining einschalten ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); aDocument.SetChangeViewSettings(aChangeViewSet); } } // #97286# include 100th seconds in compare? - BOOL bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() || + sal_Bool bIgnore100Sec = !pSourceTrack->IsTime100thSeconds() || !pThisTrack->IsTime100thSeconds(); // gemeinsame Ausgangsposition suchen - ULONG nFirstNewNumber = 0; + sal_uLong nFirstNewNumber = 0; const ScChangeAction* pSourceAction = pSourceTrack->GetFirst(); const ScChangeAction* pThisAction = pThisTrack->GetFirst(); // skip identical actions @@ -868,7 +868,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck const ScChangeAction* pLastSearchAction = pThisTrack->GetLast(); // MergeChangeData aus den folgenden Aktionen erzeugen - ULONG nNewActionCount = 0; + sal_uLong nNewActionCount = 0; const ScChangeAction* pCount = pSourceAction; while ( pCount ) { @@ -884,7 +884,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")), nNewActionCount ); - ULONG nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber(); + sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber(); // UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand pSourceTrack->MergePrepare( (ScChangeAction*) pFirstMergeAction, bShared ); @@ -910,7 +910,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck const ScChangeActionDel* pDel = (const ScChangeActionDel*) pThisAction; if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() ) { // deleted Table enthaelt deleted Cols, die nicht - ULONG nStart, nEnd; + sal_uLong nStart, nEnd; pSourceTrack->AppendDeleteRange( pDel->GetOverAllRange().MakeRange(), NULL, nStart, nEnd ); } @@ -935,9 +935,9 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck LockPaint(); // #i73877# no repainting after each action // MergeChangeData in das aktuelle Dokument uebernehmen - BOOL bHasRejected = FALSE; + sal_Bool bHasRejected = sal_False; String aOldUser = pThisTrack->GetUser(); - pThisTrack->SetUseFixDateTime( TRUE ); + pThisTrack->SetUseFixDateTime( sal_True ); ScMarkData& rMarkData = pViewSh->GetViewData()->GetMarkData(); ScMarkData aOldMarkData( rMarkData ); pSourceAction = pFirstMergeAction; @@ -986,10 +986,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck pThisTrack->SetUser( pSourceAction->GetUser() ); pThisTrack->SetFixDateTimeUTC( pSourceAction->GetDateTimeUTC() ); - ULONG nOldActionMax = pThisTrack->GetActionMax(); + sal_uLong nOldActionMax = pThisTrack->GetActionMax(); bool bExecute = true; - ULONG nReject = pSourceAction->GetRejectAction(); + sal_uLong nReject = pSourceAction->GetRejectAction(); if ( nReject ) { if ( bShared ) @@ -1002,7 +1002,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck if ( pOldAction && pOldAction->IsVirgin() ) { pThisTrack->Reject( pOldAction ); - bHasRejected = TRUE; + bHasRejected = sal_True; bExecute = false; } } @@ -1017,7 +1017,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck //! oder Reject-Aenderung normal ausfuehren pThisTrack->Reject(pOldAction); - bHasRejected = TRUE; // fuer Paint + bHasRejected = sal_True; // fuer Paint } bExecute = false; } @@ -1039,7 +1039,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck ScAddress aPos = aSourceRange.aStart; String aValue; ((const ScChangeActionContent*)pSourceAction)->GetNewString( aValue ); - BYTE eMatrix = MM_NONE; + sal_uInt8 eMatrix = MM_NONE; const ScBaseCell* pCell = ((const ScChangeActionContent*)pSourceAction)->GetNewCell(); if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) eMatrix = ((const ScFormulaCell*)pCell)->GetMatrixFlag(); @@ -1058,7 +1058,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck aValue.Erase( 0, 1 ); aValue.Erase( aValue.Len()-1, 1 ); GetDocFunc().EnterMatrix( aSourceRange, - NULL, NULL, aValue, FALSE, FALSE, + NULL, NULL, aValue, sal_False, sal_False, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT ); } break; @@ -1077,17 +1077,17 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck { String aName; aDocument.CreateValidTabName( aName ); - GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, TRUE, FALSE ); + GetDocFunc().InsertTable( aSourceRange.aStart.Tab(), aName, sal_True, sal_False ); } break; case SC_CAT_INSERT_ROWS: - GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, TRUE, FALSE ); + GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSROWS, sal_True, sal_False ); break; case SC_CAT_INSERT_COLS: - GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, TRUE, FALSE ); + GetDocFunc().InsertCells( aSourceRange, NULL, INS_INSCOLS, sal_True, sal_False ); break; case SC_CAT_DELETE_TABS : - GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), TRUE, FALSE ); + GetDocFunc().DeleteTable( aSourceRange.aStart.Tab(), sal_True, sal_False ); break; case SC_CAT_DELETE_ROWS: { @@ -1095,7 +1095,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck if ( pDel->IsTopDelete() ) { aSourceRange = pDel->GetOverAllRange().MakeRange(); - GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELROWS, TRUE, FALSE ); + GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELROWS, sal_True, sal_False ); // #i101099# [Collaboration] Changes are not correctly shown if ( bShared ) @@ -1115,7 +1115,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck if ( pDel->IsTopDelete() && !pDel->IsTabDeleteCol() ) { // deleted Table enthaelt deleted Cols, die nicht aSourceRange = pDel->GetOverAllRange().MakeRange(); - GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELCOLS, TRUE, FALSE ); + GetDocFunc().DeleteCells( aSourceRange, NULL, DEL_DELCOLS, sal_True, sal_False ); } } break; @@ -1124,7 +1124,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck const ScChangeActionMove* pMove = (const ScChangeActionMove*) pSourceAction; ScRange aFromRange( pMove->GetFromRange().MakeRange() ); GetDocFunc().MoveBlock( aFromRange, - aSourceRange.aStart, TRUE, TRUE, FALSE, FALSE ); + aSourceRange.aStart, sal_True, sal_True, sal_False, sal_False ); } break; default: @@ -1164,10 +1164,10 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck ScChangeAction* pAct = pThisTrack->GetLast(); if ( pAct && pAct->GetActionNumber() > nOldActionMax ) { - ULONG nActionMax = pAct->GetActionNumber(); - ULONG nActionCount = nActionMax - nOldActionMax; - ULONG nAction = nActionMax - nActionCount + 1; - ULONG nSourceAction = pSourceAction->GetActionNumber() - nActionCount + 1; + sal_uLong nActionMax = pAct->GetActionNumber(); + sal_uLong nActionCount = nActionMax - nOldActionMax; + sal_uLong nAction = nActionMax - nActionCount + 1; + sal_uLong nSourceAction = pSourceAction->GetActionNumber() - nActionCount + 1; while ( nAction <= nActionMax ) { if ( bInverseMap ) @@ -1189,7 +1189,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck rMarkData = aOldMarkData; pThisTrack->SetUser(aOldUser); - pThisTrack->SetUseFixDateTime( FALSE ); + pThisTrack->SetUseFixDateTime( sal_False ); pSourceTrack->Clear(); //! der ist jetzt verhunzt @@ -1230,11 +1230,11 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) // reset show changes ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( FALSE ); + aChangeViewSet.SetShowChanges( sal_False ); aDocument.SetChangeViewSettings( aChangeViewSet ); // find first merge action in this document - BOOL bIgnore100Sec = !pThisTrack->IsTime100thSeconds() || !pSharedTrack->IsTime100thSeconds(); + sal_Bool bIgnore100Sec = !pThisTrack->IsTime100thSeconds() || !pSharedTrack->IsTime100thSeconds(); ScChangeAction* pThisAction = pThisTrack->GetFirst(); ScChangeAction* pSharedAction = pSharedTrack->GetFirst(); while ( lcl_Equal( pThisAction, pSharedAction, bIgnore100Sec ) ) @@ -1248,8 +1248,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) if ( pThisAction ) { // merge own changes into shared document - ULONG nActStartShared = pSharedAction->GetActionNumber(); - ULONG nActEndShared = pSharedTrack->GetActionMax(); + sal_uLong nActStartShared = pSharedAction->GetActionNumber(); + sal_uLong nActEndShared = pSharedTrack->GetActionMax(); ScDocument* pTmpDoc = new ScDocument; for ( sal_Int32 nIndex = 0; nIndex < aDocument.GetTableCount(); ++nIndex ) { @@ -1261,8 +1261,8 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) ScChangeActionMergeMap aOwnInverseMergeMap; pSharedDocShell->MergeDocument( *pTmpDoc, true, true, 0, &aOwnInverseMergeMap, true ); delete pTmpDoc; - ULONG nActStartOwn = nActEndShared + 1; - ULONG nActEndOwn = pSharedTrack->GetActionMax(); + sal_uLong nActStartOwn = nActEndShared + 1; + sal_uLong nActEndOwn = pSharedTrack->GetActionMax(); // find conflicts ScConflictsList aConflictsList; @@ -1305,7 +1305,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) pThisTrack->Clone( pTmpDoc ); // undo own changes since last save in own document - ULONG nStartShared = pThisAction->GetActionNumber(); + sal_uLong nStartShared = pThisAction->GetActionNumber(); ScChangeAction* pAction = pThisTrack->GetLast(); while ( pAction && pAction->GetActionNumber() >= nStartShared ) { @@ -1319,7 +1319,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) // merge shared changes into own document ScChangeActionMergeMap aSharedMergeMap; MergeDocument( rSharedDoc, true, true, 0, &aSharedMergeMap ); - ULONG nEndShared = pThisTrack->GetActionMax(); + sal_uLong nEndShared = pThisTrack->GetActionMax(); // resolve conflicts for shared non-content actions if ( !aConflictsList.empty() ) @@ -1337,18 +1337,18 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) nEndShared = pThisTrack->GetActionMax(); // only show changes from shared document - aChangeViewSet.SetShowChanges( TRUE ); - aChangeViewSet.SetShowAccepted( TRUE ); + aChangeViewSet.SetShowChanges( sal_True ); + aChangeViewSet.SetShowAccepted( sal_True ); aChangeViewSet.SetHasActionRange( true ); aChangeViewSet.SetTheActionRange( nStartShared, nEndShared ); aDocument.SetChangeViewSettings( aChangeViewSet ); // merge own changes back into own document - ULONG nStartOwn = nEndShared + 1; + sal_uLong nStartOwn = nEndShared + 1; ScChangeActionMergeMap aOwnMergeMap; MergeDocument( *pTmpDoc, true, true, nEndShared - nStartShared + 1, &aOwnMergeMap ); delete pTmpDoc; - ULONG nEndOwn = pThisTrack->GetActionMax(); + sal_uLong nEndOwn = pThisTrack->GetActionMax(); // resolve conflicts for shared content actions and own actions if ( !aConflictsList.empty() ) @@ -1376,13 +1376,13 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) else { // merge shared changes into own document - ULONG nStartShared = pThisTrack->GetActionMax() + 1; + sal_uLong nStartShared = pThisTrack->GetActionMax() + 1; MergeDocument( rSharedDoc, true, true ); - ULONG nEndShared = pThisTrack->GetActionMax(); + sal_uLong nEndShared = pThisTrack->GetActionMax(); // only show changes from shared document - aChangeViewSet.SetShowChanges( TRUE ); - aChangeViewSet.SetShowAccepted( TRUE ); + aChangeViewSet.SetShowChanges( sal_True ); + aChangeViewSet.SetShowAccepted( sal_True ); aChangeViewSet.SetHasActionRange( true ); aChangeViewSet.SetTheActionRange( nStartShared, nEndShared ); aDocument.SetChangeViewSettings( aChangeViewSet ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index bba756b397cb..fe147466bd80 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -138,7 +138,7 @@ using namespace ::com::sun::star; Get(ATTR_PAGE_SHARED)).GetValue() #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) #define SC_PREVIEW_SIZE_X 10000 #define SC_PREVIEW_SIZE_Y 12400 @@ -154,9 +154,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxItemSet* pReqArgs = rReq.GetArgs(); SfxBindings* pBindings = GetViewBindings(); - BOOL bUndo (aDocument.IsUndoEnabled()); + sal_Bool bUndo (aDocument.IsUndoEnabled()); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_SC_SETTEXT: @@ -211,18 +211,18 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxPoolItem* pItem; String sSbaData, sTarget; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) sSbaData = ((const SfxStringItem*)pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET ) sTarget = ((const SfxStringItem*)pItem)->GetValue(); - BOOL bIsNewArea = TRUE; // Default TRUE (keine Nachfrage) - if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_Bool bIsNewArea = sal_True; // Default sal_True (keine Nachfrage) + if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET ) bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue(); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xResultSet; - if ( pReqArgs->GetItemState( FN_PARAM_3, FALSE, &pItem ) == SFX_ITEM_SET && pItem ) + if ( pReqArgs->GetItemState( FN_PARAM_3, sal_False, &pItem ) == SFX_ITEM_SET && pItem ) xResultSet.set(((const SfxUsrAnyItem*)pItem)->GetValue(),::com::sun::star::uno::UNO_QUERY); String sDBName = sSbaData.GetToken(0,cSbaSep); // Datenbankname @@ -230,7 +230,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) String sTabFlag = sSbaData.GetToken(2,cSbaSep); String sDBSql = sSbaData.GetToken(3,cSbaSep); // SQL im Klartext - BYTE nType = ScDbTable; // "0" oder "1" + sal_uInt8 nType = ScDbTable; // "0" oder "1" if ( sTabFlag.EqualsAscii("0") ) // "0" = Query, "1" = Table (Default) nType = ScDbQuery; @@ -248,17 +248,17 @@ void ScDocShell::Execute( SfxRequest& rReq ) } // bei Bedarf neuen Datenbankbereich anlegen - BOOL bMakeArea = FALSE; + sal_Bool bMakeArea = sal_False; if (bIsNewArea) { ScDBCollection* pDBColl = aDocument.GetDBCollection(); - USHORT nDummy; + sal_uInt16 nDummy; if ( !pDBColl || !pDBColl->SearchName( sTarget, nDummy ) ) { ScAddress aPos; if ( aPos.Parse( sTarget, &aDocument, aDocument.GetAddressConvention() ) & SCA_VALID ) { - bMakeArea = TRUE; + bMakeArea = sal_True; if (bUndo) { String aStrImport = ScGlobal::GetRscString( STR_UNDO_IMPORTDATA ); @@ -273,7 +273,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } // nachfragen, bevor alter DB-Bereich ueberschrieben wird - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; if (!bIsNewArea) { String aTemplate = ScGlobal::GetRscString( STR_IMPORT_REPLACE ); @@ -288,7 +288,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (bDo) { ScDBDocFunc(*this).UpdateImport( sTarget, sDBName, - sDBTable, sDBSql, TRUE, nType, xResultSet, + sDBTable, sDBSql, sal_True, nType, xResultSet, pSelectionList ); rReq.Done(); @@ -312,19 +312,19 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pReqArgs) { ScDocument* pDoc = GetDocument(); -// BOOL bUndo (pDoc->IsUndoEnabled()); +// sal_Bool bUndo (pDoc->IsUndoEnabled()); const SfxPoolItem* pItem; String aChartName, aRangeName; ScRange aSingleRange; ScRangeListRef aRangeListRef; - BOOL bMultiRange = FALSE; + sal_Bool bMultiRange = sal_False; - BOOL bColHeaders = TRUE; - BOOL bRowHeaders = TRUE; - BOOL bColInit = FALSE; - BOOL bRowInit = FALSE; - BOOL bAddRange = (nSlot == SID_CHART_ADDSOURCE); + sal_Bool bColHeaders = sal_True; + sal_Bool bRowHeaders = sal_True; + sal_Bool bColInit = sal_False; + sal_Bool bRowInit = sal_False; + sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE); if( IS_AVAILABLE( SID_CHART_NAME, &pItem ) ) aChartName = ((const SfxStringItem*)pItem)->GetValue(); @@ -335,25 +335,25 @@ void ScDocShell::Execute( SfxRequest& rReq ) if( IS_AVAILABLE( FN_PARAM_1, &pItem ) ) { bColHeaders = ((const SfxBoolItem*)pItem)->GetValue(); - bColInit = TRUE; + bColInit = sal_True; } if( IS_AVAILABLE( FN_PARAM_2, &pItem ) ) { bRowHeaders = ((const SfxBoolItem*)pItem)->GetValue(); - bRowInit = TRUE; + bRowInit = sal_True; } ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0); - BOOL bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0; + sal_Bool bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0; if (!bValid) { aRangeListRef = new ScRangeList; aRangeListRef->Parse( aRangeName, pDoc ); if ( aRangeListRef->Count() ) { - bMultiRange = TRUE; + bMultiRange = sal_True; aSingleRange = *aRangeListRef->GetObject(0); // fuer Header - bValid = TRUE; + bValid = sal_True; } else aRangeListRef.Clear(); @@ -375,7 +375,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 ); // Dialog fuer Spalten/Zeilenkoepfe - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( !bAddRange && ( !bColInit || !bRowInit ) ) { // Spalten/Zeilenkoepfe testen wie in chartarr @@ -383,13 +383,13 @@ void ScDocShell::Execute( SfxRequest& rReq ) { for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++) if (aDocument.HasValueData( i, nRow1, nTab )) - bColHeaders = FALSE; + bColHeaders = sal_False; } if (!bRowInit) { for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++) if (aDocument.HasValueData( nCol1, i, nTab )) - bRowHeaders = FALSE; + bRowHeaders = sal_False; } //CHINA001 ScColRowLabelDlg aDlg( pParent, bRowHeaders, bColHeaders ); @@ -407,7 +407,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) rReq.AppendItem(SfxBoolItem(FN_PARAM_2, bRowHeaders)); } else - bOk = FALSE; + bOk = sal_False; delete pDlg; //CHINA001 } @@ -452,9 +452,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) case FID_AUTO_CALC: { - BOOL bNewVal; + sal_Bool bNewVal; const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) ) + if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) ) bNewVal = ((const SfxBoolItem*)pItem)->GetValue(); else bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue @@ -483,7 +483,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScLkUpdMode nSet=pDoc->GetLinkMode(); - USHORT nDlgRet=RET_NO; + sal_uInt16 nDlgRet=RET_NO; if(nSet==LM_UNKNOWN) { ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); @@ -526,7 +526,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // wird nach dem Laden aufgerufen, wenn DB-Bereiche mit // weggelassenen Daten enthalten sind - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDBCollection* pDBColl = aDocument.GetDBCollection(); if ((nCanUpdate != com::sun::star::document::UpdateDocMode::NO_UPDATE) && @@ -541,7 +541,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) ); if (aBox.Execute() == RET_YES) { - for (USHORT i=0; iGetCount(); i++) + for (sal_uInt16 i=0; iGetCount(); i++) { ScDBData* pDBData = (*pDBColl)[i]; if ( pDBData->IsStripData() && @@ -555,7 +555,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); - BOOL bContinue = pViewSh->ImportData( aImportParam ); + sal_Bool bContinue = pViewSh->ImportData( aImportParam ); pDBData->SetImportParam( aImportParam ); // markieren (Groesse kann sich geaendert haben) @@ -576,7 +576,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } } } - bDone = TRUE; + bDone = sal_True; } } } @@ -618,18 +618,18 @@ void ScDocShell::Execute( SfxRequest& rReq ) { // get argument (recorded macro) SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, sal_False ); - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; // xmlsec05/06: // getting real parent window when called from Security-Options TP Window* pParent = NULL; const SfxPoolItem* pParentItem; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); // desired state ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); - BOOL bActivateTracking = (pChangeTrack == 0); // toggle + sal_Bool bActivateTracking = (pChangeTrack == 0); // toggle if ( pItem ) bActivateTracking = pItem->GetValue(); // from argument @@ -659,7 +659,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { pDoc->StartChangeTracking(); ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); pDoc->SetChangeViewSettings(aChangeViewSet); } @@ -669,7 +669,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // Slots invalidieren if (pBindings) - pBindings->InvalidateAll(FALSE); + pBindings->InvalidateAll(sal_False); if ( !pItem ) rReq.AppendItem( SfxBoolItem( FID_CHG_RECORD, bActivateTracking ) ); rReq.Done(); @@ -684,7 +684,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { Window* pParent = NULL; const SfxPoolItem* pParentItem; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); if ( ExecuteChangeProtectionDialog( pParent ) ) { @@ -699,7 +699,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_DOCUMENT_MERGE: case SID_DOCUMENT_COMPARE: { - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); if ( pChangeTrack && !pImpl->bIgnoreLostRedliningWarning ) { @@ -709,12 +709,12 @@ void ScDocShell::Execute( SfxRequest& rReq ) WinBits(WB_YES_NO | WB_DEF_NO), ScGlobal::GetRscString( STR_END_REDLINING ) ); if( aBox.Execute() == RET_YES ) - bDo = ExecuteChangeProtectionDialog( NULL, TRUE ); + bDo = ExecuteChangeProtectionDialog( NULL, sal_True ); else - bDo = FALSE; + bDo = sal_False; } else // merge might reject some actions - bDo = ExecuteChangeProtectionDialog( NULL, TRUE ); + bDo = ExecuteChangeProtectionDialog( NULL, sal_True ); } if ( !bDo ) { @@ -725,25 +725,25 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxPoolItem* pItem; SfxMedium* pMed = NULL; if ( pReqArgs && - pReqArgs->GetItemState( SID_FILE_NAME, TRUE, &pItem ) == SFX_ITEM_SET && + pReqArgs->GetItemState( SID_FILE_NAME, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxStringItem) ) { String aFileName = ((const SfxStringItem*)pItem)->GetValue(); String aFilterName; - if ( pReqArgs->GetItemState( SID_FILTER_NAME, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_FILTER_NAME, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxStringItem) ) { aFilterName = ((const SfxStringItem*)pItem)->GetValue(); } String aOptions; - if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxStringItem) ) { aOptions = ((const SfxStringItem*)pItem)->GetValue(); } short nVersion = 0; - if ( pReqArgs->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxInt16Item) ) { nVersion = ((const SfxInt16Item*)pItem)->GetValue(); @@ -751,7 +751,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // kein Filter angegeben -> Detection if ( !aFilterName.Len() ) - ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, TRUE, FALSE ); + ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, sal_True, sal_False ); // filter name from dialog contains application prefix, // GetFilter needs name without the prefix. @@ -763,7 +763,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); if ( nVersion != 0 ) pSet->Put( SfxInt16Item( SID_VERSION, nVersion ) ); - pMed = new SfxMedium( aFileName, STREAM_STD_READ, FALSE, pFilter, pSet ); + pMed = new SfxMedium( aFileName, STREAM_STD_READ, sal_False, pFilter, pSet ); } else { @@ -785,14 +785,14 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScDocShell* pOtherDocSh = new ScDocShell; SfxObjectShellRef aDocShTablesRef = pOtherDocSh; pOtherDocSh->DoLoad( pMed ); - ULONG nErr = pOtherDocSh->GetErrorCode(); + sal_uLong nErr = pOtherDocSh->GetErrorCode(); if (nErr) ErrorHandler::HandleError( nErr ); // auch Warnings if ( !pOtherDocSh->GetError() ) // nur Errors { - BOOL bHadTrack = ( aDocument.GetChangeTrack() != NULL ); - ULONG nStart = 0; + sal_Bool bHadTrack = ( aDocument.GetChangeTrack() != NULL ); + sal_uLong nStart = 0; if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack ) { nStart = pChangeTrack->GetActionMax() + 1; @@ -810,7 +810,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if ( pViewFrm ) { - pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), TRUE ); //@51669 + pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), sal_True ); //@51669 } if ( pBindings ) { @@ -827,19 +827,19 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( !pOldSet || !pOldSet->ShowChanges() ) { ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); aDocument.SetChangeViewSettings(aChangeViewSet); } } else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack ) { - ULONG nEnd = pChangeTrack->GetActionMax(); + sal_uLong nEnd = pChangeTrack->GetActionMax(); if ( nEnd >= nStart ) { // only show changes from merged document ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( TRUE ); - aChangeViewSet.SetShowAccepted( TRUE ); + aChangeViewSet.SetShowChanges( sal_True ); + aChangeViewSet.SetShowAccepted( sal_True ); aChangeViewSet.SetHasActionRange( true ); aChangeViewSet.SetTheActionRange( nStart, nEnd ); aDocument.SetChangeViewSettings( aChangeViewSet ); @@ -859,7 +859,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pReqArgs) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) { if ( pItem->ISA(SfxStringItem) ) { @@ -887,7 +887,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_EDIT_SCENARIO: { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) { if ( pItem->ISA(SfxStringItem) ) { @@ -899,7 +899,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; aDocument.GetScenarioData( nTab, aComment, aColor, nFlags ); // Determine if the Sheet that the Scenario was created on @@ -911,15 +911,15 @@ void ScDocShell::Execute( SfxRequest& rReq ) nActualTab--; } while(aDocument.IsScenario(nActualTab)); - BOOL bSheetProtected = aDocument.IsTabProtected(nActualTab); + sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab); //! anderen Titel am Dialog setzen //CHINA001 ScNewScenarioDlg* pNewDlg = -//CHINA001 new ScNewScenarioDlg( GetActiveDialogParent(), aName, TRUE, bSheetProtected); +//CHINA001 new ScNewScenarioDlg( GetActiveDialogParent(), aName, sal_True, bSheetProtected); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, TRUE,bSheetProtected); + AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, sal_True,bSheetProtected); DBG_ASSERT(pNewDlg, "Dialog create fail!");//CHINA001 pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags ); if ( pNewDlg->Execute() == RET_OK ) @@ -939,11 +939,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_ATTR_YEAR2000 : { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) { if ( pItem->ISA(SfxUInt16Item) ) { - UINT16 nY2k = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nY2k = ((SfxUInt16Item*)pItem)->GetValue(); // immer an den DocOptions setzen, damit das auch fuer SO50 // gespeichert wird (und alle Abfragen bisher auch darauf laufen). // SetDocOptions propagiert das an den NumberFormatter @@ -1170,15 +1170,15 @@ void UpdateAcceptChangesDialog() //------------------------------------------------------------------ -BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected ) +sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); if ( pChangeTrack ) { - BOOL bProtected = pChangeTrack->IsProtected(); + sal_Bool bProtected = pChangeTrack->IsProtected(); if ( bJustQueryIfProtected && !bProtected ) - return TRUE; + return sal_True; String aTitle( ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) ); String aText( ScResId( SCSTR_PASSWORD ) ); @@ -1203,7 +1203,7 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer if ( SvPasswordHelper::CompareHashPassword(pChangeTrack->GetProtection(), aPassword) ) { if ( bJustQueryIfProtected ) - bDone = TRUE; + bDone = sal_True; else pChangeTrack->SetProtection( com::sun::star::uno::Sequence< sal_Int8 > (0) ); @@ -1224,21 +1224,21 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer if ( bProtected != pChangeTrack->IsProtected() ) { UpdateAcceptChangesDialog(); - bDone = TRUE; + bDone = sal_True; } } } else if ( bJustQueryIfProtected ) - bDone = TRUE; + bDone = sal_True; return bDone; } //------------------------------------------------------------------ -void ScDocShell::DoRecalc( BOOL bApi ) +void ScDocShell::DoRecalc( sal_Bool bApi ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScTabViewShell* pSh = GetBestViewShell(); if ( pSh ) { @@ -1246,7 +1246,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi ) { pHdl->FormulaPreview(); // Teilergebnis als QuickHelp - bDone = TRUE; + bDone = sal_True; } else { @@ -1259,7 +1259,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) WaitObject aWaitObj( GetActiveDialogParent() ); aDocument.CalcFormulaTree(); if ( pSh ) - pSh->UpdateCharts(TRUE); + pSh->UpdateCharts(sal_True); aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) ); @@ -1275,7 +1275,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) } } -void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) +void ScDocShell::DoHardRecalc( sal_Bool /* bApi */ ) { WaitObject aWaitObj( GetActiveDialogParent() ); ScTabViewShell* pSh = GetBestViewShell(); @@ -1287,7 +1287,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) aDocument.CalcAll(); GetDocFunc().DetectiveRefresh(); // erzeugt eigenes Undo if ( pSh ) - pSh->UpdateCharts(TRUE); + pSh->UpdateCharts(sal_True); // set notification flags for "calculate" event (used in SFX_HINT_DATACHANGED broadcast) // (might check for the presence of any formulas on each sheet) @@ -1306,7 +1306,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) // (somewhat consistent with charts) for (nTab=0; nTabGetName(); String aOldName = aNewName; - BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? + sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); @@ -1391,7 +1391,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) { String aNewName = pStyle->GetName(); String aOldName = aNewName; - BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); + sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); if ( aNewName != aOldName ) @@ -1409,9 +1409,9 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) // wie in printfun.cxx #define ZOOM_MIN 10 -void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ) +void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages ) { - BOOL bUndo(aDocument.IsUndoEnabled()); + sal_Bool bUndo(aDocument.IsUndoEnabled()); String aStyleName = aDocument.GetPageStyle( nTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); @@ -1423,8 +1423,8 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ) SfxItemSet& rSet = pStyleSheet->GetItemSet(); if (bUndo) { - USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); - USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); + sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); + sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); GetUndoManager()->AddUndoAction( new ScUndoPrintZoom( this, nTab, nOldScale, nOldPages, nScale, nPages ) ); } @@ -1442,9 +1442,9 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ) } } -BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) +sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange ) { - BOOL bChange = FALSE; + sal_Bool bChange = sal_False; SCTAB nTab = rRange.aStart.Tab(); String aStyleName = aDocument.GetPageStyle( nTab ); @@ -1454,15 +1454,15 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) if ( pStyleSheet ) { SfxItemSet& rSet = pStyleSheet->GetItemSet(); - BOOL bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue(); - USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); - USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); + sal_Bool bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue(); + sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); + sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); const ScRange* pRepeatCol = aDocument.GetRepeatColRange( nTab ); const ScRange* pRepeatRow = aDocument.GetRepeatRowRange( nTab ); // benoetigte Skalierung fuer Selektion ausrechnen - USHORT nNewScale = nOldScale; + sal_uInt16 nNewScale = nOldScale; long nBlkTwipsX = 0; if (bHeaders) @@ -1512,7 +1512,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) if ( nNeeded < ZOOM_MIN ) nNeeded = ZOOM_MIN; // Begrenzung if ( nNeeded < (long) nNewScale ) - nNewScale = (USHORT) nNeeded; + nNewScale = (sal_uInt16) nNeeded; bChange = ( nNewScale != nOldScale || nOldPages != 0 ); if ( bChange ) @@ -1521,11 +1521,11 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) return bChange; } -void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi ) +void ScDocShell::PageStyleModified( const String& rStyleName, sal_Bool bApi ) { ScDocShellModificator aModificator( *this ); - BOOL bWarn = FALSE; + sal_Bool bWarn = sal_False; SCTAB nTabCount = aDocument.GetTableCount(); SCTAB nUseTab = MAXTAB+1; @@ -1539,7 +1539,7 @@ void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi ) { ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs - bWarn = TRUE; + bWarn = sal_True; if (bWarn && !bApi) { @@ -1577,7 +1577,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, } else if ( pReqArgs == NULL ) { - BOOL bUndo(aDocument.IsUndoEnabled()); + sal_Bool bUndo(aDocument.IsUndoEnabled()); String aOldName = aDocument.GetPageStyle( nCurTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet @@ -1637,7 +1637,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, aOldData, aNewData ) ); } - PageStyleModified( aNewName, FALSE ); + PageStyleModified( aNewName, sal_False ); rReq.Done(); } delete pDlg; @@ -1673,9 +1673,9 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, SvxPageUsage( ((const SvxPageItem&) rStyleSet.Get( ATTR_PAGE )). GetPageUsage() ); - BOOL bShareHeader = IS_SHARE_HEADER(rStyleSet); - BOOL bShareFooter = IS_SHARE_FOOTER(rStyleSet); - USHORT nResId = 0; + sal_Bool bShareHeader = IS_SHARE_HEADER(rStyleSet); + sal_Bool bShareFooter = IS_SHARE_FOOTER(rStyleSet); + sal_uInt16 nResId = 0; switch ( eUsage ) { @@ -1794,7 +1794,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */, SCTAB nCurTab ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) @@ -1839,7 +1839,7 @@ void lcl_GetPrintData( ScDocShell* pDocShell /*in*/, // get settings from print options sub-dialog const SfxItemSet& rOptionSet = pPrinter->GetOptions(); const SfxPoolItem* pItem; - rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET ); + rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, sal_False, &pItem ) == SFX_ITEM_SET ); if ( rbHasOptions ) { rOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions(); @@ -1977,7 +1977,7 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages, aPageArr, aPageRanges, &pMarkedRange ); - BOOL bFound = FALSE; // erste Seite gefunden + sal_Bool bFound = sal_False; // erste Seite gefunden long nTabStart = 0; SCTAB nTabCount = aDocument.GetTableCount(); for ( SCTAB nTab=0; nTabGetTableSelect( nTab ) ) { long nNext = nTabStart + aPageArr[nTab]; - BOOL bSelected = FALSE; + sal_Bool bSelected = sal_False; for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert? - bSelected = TRUE; + bSelected = sal_True; if (bSelected) { ScPrintFunc aPrintFunc( this, pPrinter, nTab ); aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle - bFound = TRUE; + bFound = sal_True; } nTabStart = nNext; } @@ -2004,9 +2004,9 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData delete pMarkedRange; } -BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) +sal_Bool lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); if (pDrawLayer) { @@ -2029,10 +2029,10 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) { Rectangle aObjRect = pObject->GetLogicRect(); if ( aObjRect.IsOver( aMMRect ) ) - bFound = TRUE; + bFound = sal_True; } else - bFound = TRUE; + bFound = sal_True; } pObject = aIter.Next(); @@ -2044,7 +2044,7 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) } void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, - ScMarkData* pMarkData, Window* pDialogParent, BOOL bForceSelected, BOOL bIsAPI ) + ScMarkData* pMarkData, Window* pDialogParent, sal_Bool bForceSelected, sal_Bool bIsAPI ) { SfxPrinter* pPrinter = GetPrinter(); if ( !pPrinter ) @@ -2064,14 +2064,14 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages, aPageArr, aPageRanges, &pMarkedRange ); - USHORT nCollateCopies = 1; + sal_uInt16 nCollateCopies = 1; if ( pPrintDialog && pPrintDialog->IsCollateEnabled() && pPrintDialog->IsCollateChecked() ) nCollateCopies = pPrintDialog->GetCopyCount(); // test if printed range contains transparent objects - BOOL bHasTransp = FALSE; - BOOL bAnyPrintRanges = aDocument.HasPrintRange(); + sal_Bool bHasTransp = sal_False; + sal_Bool bAnyPrintRanges = aDocument.HasPrintRange(); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SCTAB nTabCount = aDocument.GetTableCount(); for ( SCTAB nTab=0; nTabInitJob( pDialogParent, !bIsAPI && bHasTransp ); + sal_Bool bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp ); if ( bContinue ) { - for ( USHORT n=0; nShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetPrintPreview( sal_True ); } ScPrintFunc aPrintFunc( this, pPrinter, nTab, nAttrPage, nTotalPages, pMarkedRange, &aOptions ); aPrintFunc.SetDrawView( pDrawView ); - nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, TRUE, &rProgress, NULL ); + nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, sal_True, &rProgress, NULL ); nTabStart += aPageArr[nTab]; if ( aDocument.NeedPageResetAfterTab(nTab) ) @@ -2198,13 +2198,13 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, void ScDocShell::GetState( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) { case FID_AUTO_CALC: - if ( (BOOL) aDocument.GetHardRecalcState() ) + if ( (sal_Bool) aDocument.GetHardRecalcState() ) rSet.DisableItem( nWhich ); else rSet.Put( SfxBoolItem( nWhich, aDocument.GetAutoCalc() ) ); @@ -2292,15 +2292,15 @@ void ScDocShell::GetSbxState( SfxItemSet &rSet ) pVisibleSh->GetState( rSet ); } -void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect ) +void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uInt16 nAspect ) { -// bIsOle = TRUE; // jetzt ueber den CreateMode +// bIsOle = sal_True; // jetzt ueber den CreateMode SCTAB nVisTab = aDocument.GetVisibleTab(); if (!aDocument.HasTable(nVisTab)) return; - ULONG nOldLayoutMode = pDev->GetLayoutMode(); + sal_uLong nOldLayoutMode = pDev->GetLayoutMode(); pDev->SetLayoutMode( TEXT_LAYOUT_DEFAULT ); // even if it's the same, to get the metafile action if ( nAspect == ASPECT_THUMBNAIL ) @@ -2310,7 +2310,7 @@ void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup * aTmpData.SetTabNo(nVisTab); aDocument.SnapVisArea( aBoundRect ); aTmpData.SetScreen( aBoundRect ); - ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE ); + ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True ); } else { @@ -2319,13 +2319,13 @@ void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup * aTmpData.SetTabNo(nVisTab); aDocument.SnapVisArea( aBoundRect ); aTmpData.SetScreen( aBoundRect ); - ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE ); + ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True ); } pDev->SetLayoutMode( nOldLayoutMode ); } -Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const +Rectangle __EXPORT ScDocShell::GetVisArea( sal_uInt16 nAspect ) const { SfxObjectCreateMode eShellMode = GetCreateMode(); if ( eShellMode == SFX_CREATE_MODE_ORGANIZER ) @@ -2339,7 +2339,7 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const { // Rectangle aArea( 0,0, 3175,3175 ); // 120x120 Pixel in 1:1 Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X,SC_PREVIEW_SIZE_Y ); - BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); + sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); if ( bNegativePage ) ScDrawLayer::MirrorRectRTL( aArea ); aDocument.SnapVisArea( aArea ); @@ -2377,8 +2377,8 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, SCTAB nCurTab, - BOOL& rbHeader, - BOOL& rbFooter ) + sal_Bool& rbHeader, + sal_Bool& rbFooter ) { if ( !pStyleSet ) { @@ -2392,7 +2392,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, if ( pStyleSheet ) pStyleSet = &pStyleSheet->GetItemSet(); else - rbHeader = rbFooter = FALSE; + rbHeader = rbFooter = sal_False; } DBG_ASSERT( pStyleSet, "PageStyle-Set not found! :-(" ); @@ -2430,7 +2430,7 @@ long __EXPORT ScDocShell::DdeGetData( const String& rItem, return 0; // ungueltiger Bereich if( aDdeTextFmt.GetChar(0) == 'F' ) - aObj.SetFormulas( TRUE ); + aObj.SetFormulas( sal_True ); if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { @@ -2477,7 +2477,7 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem, } ScImportExport aObj( &aDocument, rItem ); if( aDdeTextFmt.GetChar(0) == 'F' ) - aObj.SetFormulas( TRUE ); + aObj.SetFormulas( sal_True ); if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { @@ -2508,7 +2508,7 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem, ScRangeName* pRange = aDocument.GetRangeName(); if( pRange ) { - USHORT nPos; + sal_uInt16 nPos; if( pRange->SearchName( aPos, nPos ) ) { ScRangeData* pData = (*pRange)[ nPos ]; @@ -2556,7 +2556,7 @@ SCTAB ScDocShell::GetCurTab() return pViewData ? pViewData->GetTabNo() : static_cast(0); } -ScTabViewShell* ScDocShell::GetBestViewShell( BOOL bOnlyVisible ) +ScTabViewShell* ScDocShell::GetBestViewShell( sal_Bool bOnlyVisible ) { ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); // falsches Doc? @@ -2588,11 +2588,11 @@ SfxBindings* ScDocShell::GetViewBindings() //------------------------------------------------------------------ -ScDocShell* ScDocShell::GetShellByNum( USHORT nDocNo ) // static +ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static { ScDocShell* pFound = NULL; SfxObjectShell* pShell = SfxObjectShell::GetFirst(); - USHORT nShellCnt = 0; + sal_uInt16 nShellCnt = 0; while ( pShell && !pFound ) { @@ -2618,7 +2618,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) if ( ERRCODE_NONE == _pFileDlg->GetError() ) { - USHORT nSlot = pImpl->pRequest->GetSlot(); + sal_uInt16 nSlot = pImpl->pRequest->GetSlot(); SfxMedium* pMed = pImpl->pDocInserter->CreateMedium(); // #i87094# If a .odt was selected pMed is NULL. if (pMed) @@ -2636,7 +2636,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) const SfxPoolItem* pItem = NULL; SfxItemSet* pSet = pMed->GetItemSet(); if ( pSet && - pSet->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET && + pSet->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxInt16Item ) ) { pImpl->pRequest->AppendItem( *pItem ); @@ -2662,7 +2662,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable ) aDocument.StartChangeTracking(); // hide accept or reject changes dialog - USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrame = SfxViewFrame::Current(); if ( pViewFrame && pViewFrame->HasChildWindow( nId ) ) { @@ -2680,7 +2680,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable ) } ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( FALSE ); + aChangeViewSet.SetShowChanges( sal_False ); aDocument.SetChangeViewSettings( aChangeViewSet ); } diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 013511ab0acb..fb5c30c5826e 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -77,13 +77,13 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String // ehemalige viewfunc/dbfunc Methoden // -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) { @@ -99,7 +99,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 @@ -126,12 +126,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 ); @@ -175,11 +175,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 = sal_False; if (pData) { // Bereich nehmen, wenn nichts anderes markiert @@ -190,11 +190,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 @@ -211,9 +211,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, sal_False, bOnlyDown ); if ( nOldCol1 != nStartCol || nOldCol2 != nEndCol || nOldRow1 != nStartRow ) - bUseThis = FALSE; // passt gar nicht + bUseThis = sal_False; // passt gar nicht else if ( nOldRow2 != nEndRow ) { // Bereich auf neue End-Zeile erweitern @@ -225,15 +225,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 = sal_False; // immer Markierung nehmen (Bug 11964) } // fuer Import nie "unbenannt" nehmen if ( bUseThis && eMode == SC_DB_IMPORT && bIsNoName ) - bUseThis = FALSE; + bUseThis = sal_False; } if ( bUseThis ) @@ -247,13 +247,13 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe nStartCol = nEndCol = nCol; nStartRow = nEndRow = nRow; nStartTab = nEndTab = nTab; -// bMark = FALSE; // nichts zu markieren +// bMark = sal_False; // nichts zu markieren } else { if ( bSelected ) { -// bMark = FALSE; +// bMark = sal_False; } else { // zusammenhaengender Bereich @@ -269,13 +269,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, sal_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 ) ) @@ -302,9 +302,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( sal_False ); } else { @@ -313,12 +313,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; @@ -331,12 +331,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( sal_False ); // CompileFormulaString ScDBCollection* pRedoColl = new ScDBCollection( *pColl ); GetUndoManager()->AddUndoAction( new ScUndoDBData( this, pUndoColl, pRedoColl ) ); @@ -352,7 +352,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe } // if (bMark) -// MarkRange( ScRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ), FALSE ); +// MarkRange( ScRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ), sal_False ); return pData; } @@ -369,7 +369,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 ) ) { @@ -403,12 +403,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, sal_False ); if (bChange) PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID|PAINT_LEFT ); @@ -426,8 +426,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( sal_False ); aDocument.LockStreamValid( true ); // ignore draw page size (but not formula results) if ( bBefore ) // check all sheets up to nUpdateTab { @@ -439,7 +439,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 @@ -448,7 +448,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore ) if ( aUpdateSheets.GetTableSelect( nTab ) ) { aDocument.UpdatePageBreaks( nTab ); - aDocument.SetPendingRowHeights( nTab, FALSE ); + aDocument.SetPendingRowHeights( nTab, sal_False ); } } else // only nUpdateTab @@ -457,7 +457,7 @@ void ScDocShell::UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore ) { AdjustRowHeight( 0, MAXROW, nUpdateTab ); aDocument.UpdatePageBreaks( nUpdateTab ); - aDocument.SetPendingRowHeights( nUpdateTab, FALSE ); + aDocument.SetPendingRowHeights( nUpdateTab, sal_False ); } } aDocument.LockStreamValid( false ); @@ -474,8 +474,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; iGetCount(); + for ( sal_uInt16 i=0; iGetDBAtArea( 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) @@ -512,14 +512,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 = sal_False; for (nPos=0; nPosnTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow) - bErr = TRUE; + bErr = sal_True; } if (bErr) @@ -546,7 +546,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); @@ -589,28 +589,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, sal_False, sal_True ); // Zeilenstatus aDocument.CopyToDocument( 0,0,nDestTab, MAXCOL,MAXROW,nDestTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); // alle Formeln aDocument.CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, - IDF_FORMULA, FALSE, pUndoDoc ); + IDF_FORMULA, sal_False, pUndoDoc ); // komplette Ausgangszeilen aDocument.CopyToDocument( 0,aDestArea.nRowStart,nDestTab, MAXCOL,aDestArea.nRowEnd,nDestTab, - IDF_ALL, FALSE, pUndoDoc ); + IDF_ALL, sal_False, pUndoDoc ); // alten Ausgabebereich if (pDestData) - aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc ); + aDocument.CopyToDocument( aOldDest, IDF_ALL, sal_False, pUndoDoc ); GetUndoManager()->AddUndoAction( new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc, - TRUE, nInsertCount, pUndoTab, pUndoData ) ); + sal_True, nInsertCount, pUndoTab, pUndoData ) ); } else { @@ -619,15 +619,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, sal_False, pUndoDoc ); // alten Ausgabebereich if (pDestData) - aDocument.CopyToDocument( aOldDest, IDF_ALL, FALSE, pUndoDoc ); + aDocument.CopyToDocument( aOldDest, IDF_ALL, sal_False, pUndoDoc ); GetUndoManager()->AddUndoAction( new ScUndoConsolidate( this, aDestArea, rParam, pUndoDoc, - FALSE, 0, NULL, pUndoData ) ); + sal_False, 0, NULL, pUndoData ) ); } } @@ -645,7 +645,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) @@ -669,7 +669,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)) { @@ -707,22 +707,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,sal_False, pUndoDoc ); } GetUndoManager()->AddUndoAction( @@ -761,14 +761,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, @@ -791,8 +791,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()) @@ -801,7 +801,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; @@ -820,8 +820,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, sal_False ); // ohne Formel-Update + aDocument.SetScenario( nNewTab, sal_True ); aDocument.SetScenarioData( nNewTab, rComment, rColor, nFlags ); ScMarkData aDestMark = rMark; @@ -830,19 +830,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, sal_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 @@ -857,7 +857,7 @@ SCTAB ScDocShell::MakeScenario( SCTAB nTab, const String& rName, const String& r return nTab; } -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 ); @@ -876,7 +876,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec if (!aDocument.CopyTab( nSrcTab, nDestTab )) { //! EndDrawUndo? - return FALSE; + return sal_False; } else { @@ -897,7 +897,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec new ScUndoCopyTab( this, aSrcList, aDestList ) ); } - BOOL bVbaEnabled = aDocument.IsInVBAMode(); + sal_Bool bVbaEnabled = aDocument.IsInVBAMode(); if ( bVbaEnabled ) { StarBASIC* pStarBASIC = GetBasic(); @@ -933,7 +933,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec else { if ( aDocument.GetChangeTrack() ) - return FALSE; + return sal_False; if ( nSrcTabBroadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return TRUE; + return sal_True; } @@ -972,7 +972,7 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer ) { ScDBDocFunc aFunc(*this); - BOOL bContinue = TRUE; + sal_Bool bContinue = sal_True; ScDBData* pDBData = static_cast(pRefreshTimer); ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); @@ -981,11 +981,11 @@ IMPL_LINK( ScDocShell, RefreshDBDataHdl, ScRefreshTimer*, pRefreshTimer ) ScRange aRange; pDBData->GetArea( aRange ); ::com::sun::star::uno::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, sal_True, sal_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); } } diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index fbb6dc8ead35..a199c697ea43 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -73,7 +73,7 @@ void __EXPORT ScDocShell::SetVisArea( const Rectangle & rVisArea ) { // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always // use both the size and position of the VisArea - SetVisAreaOrSize( rVisArea, TRUE ); + SetVisAreaOrSize( rVisArea, sal_True ); } void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) @@ -85,9 +85,9 @@ void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) rRect.Bottom() = rPos.Y() + aSize.Height() - 1; } -void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart ) +void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifyStart ) { - BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); + sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); Rectangle aArea = rVisArea; if (bModifyStart) @@ -172,12 +172,12 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart } } -BOOL ScDocShell::IsOle() +sal_Bool ScDocShell::IsOle() { return (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED); } -void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) +void ScDocShell::UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize ) { // wenn's gar nicht Ole ist, kann man sich die Berechnungen sparen // (VisArea wird dann beim Save wieder zurueckgesetzt) @@ -190,8 +190,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) Rectangle aOldArea = SfxObjectShell::GetVisArea(); Rectangle aNewArea = aOldArea; - BOOL bChange = FALSE; - BOOL bEmbedded = aDocument.IsEmbedded(); + sal_Bool bChange = sal_False; + sal_Bool bEmbedded = aDocument.IsEmbedded(); if (bEmbedded) aNewArea = aDocument.GetEmbeddedRect(); else @@ -200,10 +200,10 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) if ( nTab != aDocument.GetVisibleTab() ) { aDocument.SetVisibleTab( nTab ); - bChange = TRUE; + bChange = sal_True; } - BOOL bNegativePage = aDocument.IsNegativePage( nTab ); + sal_Bool bNegativePage = aDocument.IsNegativePage( nTab ); SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT); SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM); Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); @@ -217,8 +217,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, BOOL bSnapSize ) if (aNewArea != aOldArea) { - SetVisAreaOrSize( aNewArea, TRUE ); // hier muss auch der Start angepasst werden - bChange = TRUE; + SetVisAreaOrSize( aNewArea, sal_True ); // hier muss auch der Start angepasst werden + bChange = sal_True; } // if (bChange) @@ -248,14 +248,14 @@ void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool ) SfxItemSet& rStyleSet = pStyle->GetItemSet(); const SfxPoolItem* pItem; - if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,FALSE,&pItem) == SFX_ITEM_SET) + if (rStyleSet.GetItemState(ATTR_PAGE_HEADERSET,sal_False,&pItem) == SFX_ITEM_SET) { SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet(); SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges()); pDestSet->Put(rSrcSet); rStyleSet.Put(SvxSetItem(ATTR_PAGE_HEADERSET,pDestSet)); } - if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,FALSE,&pItem) == SFX_ITEM_SET) + if (rStyleSet.GetItemState(ATTR_PAGE_FOOTERSET,sal_False,&pItem) == SFX_ITEM_SET) { SfxItemSet& rSrcSet = ((SvxSetItem*)pItem)->GetItemSet(); SfxItemSet* pDestSet = new SfxItemSet(*rStyleSet.GetPool(),rSrcSet.GetRanges()); @@ -283,7 +283,7 @@ void __EXPORT ScDocShell::LoadStyles( SfxObjectShell &rSource ) PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_LEFT ); } -void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles ) +void ScDocShell::LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles ) { // similar to LoadStyles, but with selectable behavior for XStyleLoader::loadStylesFromURL call @@ -297,12 +297,12 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS ( bPageStyles ? SFX_STYLE_FAMILY_ALL : SFX_STYLE_FAMILY_PARA ) : SFX_STYLE_FAMILY_PAGE; SfxStyleSheetIterator aIter( pSourcePool, eFamily ); - USHORT nSourceCount = aIter.Count(); + sal_uInt16 nSourceCount = aIter.Count(); if ( nSourceCount == 0 ) return; // no source styles ScStylePair* pStyles = new ScStylePair[ nSourceCount ]; - USHORT nFound = 0; + sal_uInt16 nFound = 0; // first create all new styles @@ -333,7 +333,7 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS // then copy contents (after inserting all styles, for parent etc.) - for ( USHORT i = 0; i < nFound; ++i ) + for ( sal_uInt16 i = 0; i < nFound; ++i ) { pStyles[i].pDest->GetItemSet().PutExtended( pStyles[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT); @@ -350,11 +350,11 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellS } -BOOL __EXPORT ScDocShell::Insert( SfxObjectShell &rSource, - USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3, - USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted ) +sal_Bool __EXPORT ScDocShell::Insert( SfxObjectShell &rSource, + sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3, + sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted ) { - BOOL bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3, + sal_Bool bRet = SfxObjectShell::Insert( rSource, nSourceIdx1, nSourceIdx2, nSourceIdx3, nIdx1, nIdx2, nIdx3, rIdxDeleted ); if (bRet) lcl_AdjustPool( GetStyleSheetPool() ); // SetItems anpassen @@ -369,8 +369,8 @@ void ScDocShell::UpdateLinks() // nicht mehr benutzte Links raus - USHORT nCount = pLinkManager->GetLinks().Count(); - for (USHORT k=nCount; k>0; ) + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 k=nCount; k>0; ) { --k; ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[k]; @@ -385,7 +385,7 @@ void ScDocShell::UpdateLinks() } else // nicht mehr benutzt -> loeschen { - pTabLink->SetAddUndo(TRUE); + pTabLink->SetAddUndo(sal_True); pLinkManager->Remove(k); } } @@ -401,8 +401,8 @@ void ScDocShell::UpdateLinks() String aDocName = aDocument.GetLinkDoc(i); String aFltName = aDocument.GetLinkFlt(i); String aOptions = aDocument.GetLinkOpt(i); - ULONG nRefresh = aDocument.GetLinkRefreshDelay(i); - BOOL bThere = FALSE; + sal_uLong nRefresh = aDocument.GetLinkRefreshDelay(i); + sal_Bool bThere = sal_False; for (SCTAB j=0; jSetInCreate( TRUE ); + pLink->SetInCreate( sal_True ); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName ); pLink->Update(); - pLink->SetInCreate( FALSE ); + pLink->SetInCreate( sal_False ); } } } -BOOL ScDocShell::ReloadTabLinks() +sal_Bool ScDocShell::ReloadTabLinks() { sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); - BOOL bAny = FALSE; - USHORT nCount = pLinkManager->GetLinks().Count(); - for (USHORT i=0; iGetLinks().Count(); + for (sal_uInt16 i=0; iGetLinks()[i]; if (pBase->ISA(ScTableLink)) { ScTableLink* pTabLink = (ScTableLink*)pBase; -// pTabLink->SetAddUndo(FALSE); //! Undo's zusammenfassen - pTabLink->SetPaint(FALSE); // Paint nur einmal am Ende +// pTabLink->SetAddUndo(sal_False); //! Undo's zusammenfassen + pTabLink->SetPaint(sal_False); // Paint nur einmal am Ende pTabLink->Update(); - pTabLink->SetPaint(TRUE); -// pTabLink->SetAddUndo(TRUE); - bAny = TRUE; + pTabLink->SetPaint(sal_True); +// pTabLink->SetAddUndo(sal_True); + bAny = sal_True; } } @@ -463,7 +463,7 @@ BOOL ScDocShell::ReloadTabLinks() SetDocumentModified(); } - return TRUE; //! Fehler erkennen + return sal_True; //! Fehler erkennen } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index cb9d625da70c..93101e802651 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -104,7 +104,7 @@ using namespace com::sun::star; namespace { - ULONG lcl_getDBaseConnection(uno::Reference& _rDrvMgr,uno::Reference& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet) + sal_uLong lcl_getDBaseConnection(uno::Reference& _rDrvMgr,uno::Reference& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet) { INetURLObject aURL; aURL.SetSmartProtocol( INET_PROT_FILE ); @@ -161,7 +161,7 @@ namespace // MoveFile/KillFile/IsDocument: similar to SfxContentHelper // static -BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& rDestObj ) +sal_Bool ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& rDestObj ) { sal_Bool bMoveData = sal_True; sal_Bool bRet = sal_True, bKillSource = sal_False; @@ -206,7 +206,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& // static -BOOL ScDocShell::KillFile( const INetURLObject& rURL ) +sal_Bool ScDocShell::KillFile( const INetURLObject& rURL ) { sal_Bool bRet = sal_True; try @@ -226,7 +226,7 @@ BOOL ScDocShell::KillFile( const INetURLObject& rURL ) } // static -BOOL ScDocShell::IsDocument( const INetURLObject& rURL ) +sal_Bool ScDocShell::IsDocument( const INetURLObject& rURL ) { sal_Bool bRet = sal_False; try @@ -246,10 +246,10 @@ BOOL ScDocShell::IsDocument( const INetURLObject& rURL ) // ----------------------------------------------------------------------- -ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, - BOOL bSimpleColWidth[MAXCOLCOUNT] ) +sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, + sal_Bool bSimpleColWidth[MAXCOLCOUNT] ) { - ULONG nErr = eERR_OK; + sal_uLong nErr = eERR_OK; long i; try @@ -257,7 +257,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, String aTabName; uno::Reference xDrvMan; uno::Reference xConnection; - ULONG nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet); + sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet); if ( !xConnection.is() || !xDrvMan.is() ) return nRet; ::utl::DisposableComponent aConnectionHelper(xConnection); @@ -364,7 +364,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, } SCROW nRow = 1; // 0 is column titles - BOOL bEnd = FALSE; + sal_Bool bEnd = sal_False; while ( !bEnd && xRowSet->next() ) { if ( nRow <= MAXROW ) @@ -373,7 +373,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, for (i=0; iGetFormatTable(); @@ -440,8 +440,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, SCROW nFirstDataRow = ( bHasFieldNames ? nFirstRow + 1 : nFirstRow ); for ( SCCOL nCol = nFirstCol; nCol <= nLastCol; nCol++ ) { - BOOL bTypeDefined = FALSE; - BOOL bPrecDefined = FALSE; + sal_Bool bTypeDefined = sal_False; + sal_Bool bPrecDefined = sal_False; sal_Int32 nFieldLen = 0; sal_Int32 nPrecision = 0; sal_Int32 nDbType = sdbc::DataType::SQLNULL; @@ -463,30 +463,30 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, case 'L' : nDbType = sdbc::DataType::BIT; nFieldLen = 1; - bTypeDefined = TRUE; - bPrecDefined = TRUE; + bTypeDefined = sal_True; + bPrecDefined = sal_True; break; case 'D' : nDbType = sdbc::DataType::DATE; nFieldLen = 8; - bTypeDefined = TRUE; - bPrecDefined = TRUE; + bTypeDefined = sal_True; + bPrecDefined = sal_True; break; case 'M' : nDbType = sdbc::DataType::LONGVARCHAR; nFieldLen = 10; - bTypeDefined = TRUE; - bPrecDefined = TRUE; - bHasMemo = TRUE; + bTypeDefined = sal_True; + bPrecDefined = sal_True; + bHasMemo = sal_True; break; case 'C' : nDbType = sdbc::DataType::VARCHAR; - bTypeDefined = TRUE; - bPrecDefined = TRUE; + bTypeDefined = sal_True; + bPrecDefined = sal_True; break; case 'N' : nDbType = sdbc::DataType::DECIMAL; - bTypeDefined = TRUE; + bTypeDefined = sal_True; break; } if ( bTypeDefined && !nFieldLen && nToken > 2 ) @@ -498,7 +498,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, if ( CharClass::isAsciiNumeric(aTmp) ) { nPrecision = aTmp.ToInt32(); - bPrecDefined = TRUE; + bPrecDefined = sal_True; } } } @@ -528,7 +528,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, StrData* pStrData = new StrData( aFieldName ); if ( !aFieldNamesCollection.Insert( pStrData ) ) { // doppelter Feldname, numerisch erweitern - USHORT nSub = 1; + sal_uInt16 nSub = 1; String aFixPart( aFieldName ); do { @@ -584,8 +584,8 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, } } } - BOOL bSdbLenAdjusted = FALSE; - BOOL bSdbLenBad = FALSE; + sal_Bool bSdbLenAdjusted = sal_False; + sal_Bool bSdbLenBad = sal_False; // Feldlaenge if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen ) { // maximale Feldbreite bestimmen @@ -627,9 +627,9 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, //! CAVEAT! There is no way to define a numeric field with a length //! of 1 and no decimals! if ( nFieldLen == 1 && nPrecision == 0 ) - bSdbLenBad = TRUE; + bSdbLenBad = sal_True; nFieldLen = SvDbaseConverter::ConvertPrecisionToOdbc( nFieldLen, nPrecision ); - bSdbLenAdjusted = TRUE; + bSdbLenAdjusted = sal_True; } if ( nFieldLen > 254 ) { @@ -637,7 +637,7 @@ void lcl_GetColumnTypes( ScDocShell& rDocShell, { // zu lang fuer normales Textfeld => Memofeld nDbType = sdbc::DataType::LONGVARCHAR; nFieldLen = 10; - bHasMemo = TRUE; + bHasMemo = sal_True; } else nFieldLen = 254; // dumm gelaufen.. @@ -709,13 +709,13 @@ inline void lcl_getLongVarCharString( String& rString, ScBaseCell* pCell, } -ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BOOL& bHasMemo ) +sal_uLong ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, sal_Bool& bHasMemo ) { // remove the file so the dBase driver doesn't find an invalid file INetURLObject aDeleteObj( rFullFileName, INET_PROT_FILE ); KillFile( aDeleteObj ); - ULONG nErr = eERR_OK; + sal_uLong nErr = eERR_OK; uno::Any aAny; SCCOL nFirstCol, nLastCol; @@ -731,11 +731,11 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO nLastRow - nFirstRow ); SvNumberFormatter* pNumFmt = aDocument.GetFormatTable(); - BOOL bHasFieldNames = TRUE; + sal_Bool bHasFieldNames = sal_True; for ( SCCOL nDocCol = nFirstCol; nDocCol <= nLastCol && bHasFieldNames; nDocCol++ ) { // nur Strings in erster Zeile => sind Feldnamen if ( !aDocument.HasStringData( nDocCol, nFirstRow, nTab ) ) - bHasFieldNames = FALSE; + bHasFieldNames = sal_False; } long nColCount = nLastCol - nFirstCol + 1; @@ -759,7 +759,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO { uno::Reference xDrvMan; uno::Reference xConnection; - ULONG nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet); + sal_uLong nRet = lcl_getDBaseConnection(xDrvMan,xConnection,aTabName,rFullFileName,eCharSet); if ( !xConnection.is() || !xDrvMan.is() ) return nRet; ::utl::DisposableComponent aConnectionHelper(xConnection); @@ -928,7 +928,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO { aDocument.GetValue( nDocCol, nDocRow, nTab, fVal ); // #39274# zwischen 0 Wert und 0 kein Wert unterscheiden - BOOL bIsNull = (fVal == 0.0); + sal_Bool bIsNull = (fVal == 0.0); if ( bIsNull ) bIsNull = !aDocument.HasValueData( nDocCol, nDocRow, nTab ); if ( bIsNull ) diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx index d381ff067a99..4c58e2ad9c86 100644 --- a/sc/source/ui/docshell/editable.cxx +++ b/sc/source/ui/docshell/editable.cxx @@ -38,15 +38,15 @@ //------------------------------------------------------------------ ScEditableTester::ScEditableTester() : - bIsEditable( TRUE ), - bOnlyMatrix( TRUE ) + bIsEditable( sal_True ), + bOnlyMatrix( sal_True ) { } ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) : - bIsEditable( TRUE ), - bOnlyMatrix( TRUE ) + bIsEditable( sal_True ), + bOnlyMatrix( sal_True ) { TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); } @@ -54,29 +54,29 @@ ScEditableTester::ScEditableTester( ScDocument* pDoc, SCTAB nTab, ScEditableTester::ScEditableTester( ScDocument* pDoc, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData& rMark ) : - bIsEditable( TRUE ), - bOnlyMatrix( TRUE ) + bIsEditable( sal_True ), + bOnlyMatrix( sal_True ) { TestSelectedBlock( pDoc, nStartCol, nStartRow, nEndCol, nEndRow, rMark ); } ScEditableTester::ScEditableTester( ScDocument* pDoc, const ScRange& rRange ) : - bIsEditable( TRUE ), - bOnlyMatrix( TRUE ) + bIsEditable( sal_True ), + bOnlyMatrix( sal_True ) { TestRange( pDoc, rRange ); } ScEditableTester::ScEditableTester( ScDocument* pDoc, const ScMarkData& rMark ) : - bIsEditable( TRUE ), - bOnlyMatrix( TRUE ) + bIsEditable( sal_True ), + bOnlyMatrix( sal_True ) { TestSelection( pDoc, rMark ); } ScEditableTester::ScEditableTester( ScViewFunc* pView ) : - bIsEditable( TRUE ), - bOnlyMatrix( TRUE ) + bIsEditable( sal_True ), + bOnlyMatrix( sal_True ) { TestView( pView ); } @@ -88,12 +88,12 @@ void ScEditableTester::TestBlock( ScDocument* pDoc, SCTAB nTab, { if ( bIsEditable || bOnlyMatrix ) { - BOOL bThisMatrix; + sal_Bool bThisMatrix; if ( !pDoc->IsBlockEditable( nTab, nStartCol, nStartRow, nEndCol, nEndRow, &bThisMatrix ) ) { - bIsEditable = FALSE; + bIsEditable = sal_False; if ( !bThisMatrix ) - bOnlyMatrix = FALSE; + bOnlyMatrix = sal_False; } } } @@ -124,12 +124,12 @@ void ScEditableTester::TestSelection( ScDocument* pDoc, const ScMarkData& rMark { if ( bIsEditable || bOnlyMatrix ) { - BOOL bThisMatrix; + sal_Bool bThisMatrix; if ( !pDoc->IsSelectionEditable( rMark, &bThisMatrix ) ) { - bIsEditable = FALSE; + bIsEditable = sal_False; if ( !bThisMatrix ) - bOnlyMatrix = FALSE; + bOnlyMatrix = sal_False; } } } @@ -138,19 +138,19 @@ void ScEditableTester::TestView( ScViewFunc* pView ) { if ( bIsEditable || bOnlyMatrix ) { - BOOL bThisMatrix; + sal_Bool bThisMatrix; if ( !pView->SelectionEditable( &bThisMatrix ) ) { - bIsEditable = FALSE; + bIsEditable = sal_False; if ( !bThisMatrix ) - bOnlyMatrix = FALSE; + bOnlyMatrix = sal_False; } } } //------------------------------------------------------------------ -USHORT ScEditableTester::GetMessageId() const +sal_uInt16 ScEditableTester::GetMessageId() const { if (bIsEditable) return 0; diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 7fa31246275a..2fb4c01741c9 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1339,7 +1339,7 @@ static FormulaToken* lcl_convertToToken(ScBaseCell* pCell) case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = static_cast(pCell); - USHORT nError = pFCell->GetErrCode(); + sal_uInt16 nError = pFCell->GetErrCode(); if (nError) return new FormulaErrorToken( nError); else if (pFCell->IsValue()) @@ -1442,7 +1442,7 @@ static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, ScRange& rRang case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = static_cast(pCell); - USHORT nError = pFCell->GetErrCode(); + sal_uInt16 nError = pFCell->GetErrCode(); if (nError) xMat->PutDouble( CreateDoubleError( nError), nC, nR); else if (pFCell->IsValue()) @@ -1846,7 +1846,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getRangeNameTokens(sal_u ScRangeName* pExtNames = pSrcDoc->GetRangeName(); String aUpperName = ScGlobal::pCharClass->upper(rName); - USHORT n; + sal_uInt16 n; bool bRes = pExtNames->SearchNameUpper(aUpperName, n); if (!bRes) return ScExternalRefCache::TokenArrayRef(); @@ -2045,7 +2045,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions)); // make medium hidden to prevent assertion from progress bar - pSet->Put( SfxBoolItem( SID_HIDDEN, TRUE ) ); + pSet->Put( SfxBoolItem( SID_HIDDEN, sal_True ) ); auto_ptr pMedium(new SfxMedium(aFile, STREAM_STD_READ, false, pFilter, pSet)); if (pMedium->GetError() != ERRCODE_NONE) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index a17279f409a9..244f80dd0d5a 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -112,9 +112,9 @@ enum SylkVersion ScImportExport::ScImportExport( ScDocument* p ) : pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ), nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ), - bFormulas( FALSE ), bIncludeFiltered( TRUE ), - bAll( TRUE ), bSingle( TRUE ), bUndo( FALSE ), - bOverflow( FALSE ), mbApi( true ), mExportTextOptions() + bFormulas( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_True ), bSingle( sal_True ), bUndo( sal_False ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -127,9 +127,9 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt ) : pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ), aRange( rPt ), nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ), - bFormulas( FALSE ), bIncludeFiltered( TRUE ), - bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ), - bOverflow( FALSE ), mbApi( true ), mExportTextOptions() + bFormulas( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_False ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -137,15 +137,15 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt ) // ctor with a range is only used for export -//! ctor with a string (and bSingle=TRUE) is also used for DdeSetData +//! ctor with a string (and bSingle=sal_True) is also used for DdeSetData ScImportExport::ScImportExport( ScDocument* p, const ScRange& r ) : pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ), aRange( r ), nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ), - bFormulas( FALSE ), bIncludeFiltered( TRUE ), - bAll( FALSE ), bSingle( FALSE ), bUndo( BOOL( pDocSh != NULL ) ), - bOverflow( FALSE ), mbApi( true ), mExportTextOptions() + bFormulas( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_False ), bSingle( sal_False ), bUndo( sal_Bool( pDocSh != NULL ) ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -160,9 +160,9 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r ) ScImportExport::ScImportExport( ScDocument* p, const String& rPos ) : pDocSh( PTR_CAST(ScDocShell,p->GetDocumentShell()) ), pDoc( p ), nSizeLimit( 0 ), cSep( '\t' ), cStr( '"' ), - bFormulas( FALSE ), bIncludeFiltered( TRUE ), - bAll( FALSE ), bSingle( TRUE ), bUndo( BOOL( pDocSh != NULL ) ), - bOverflow( FALSE ), mbApi( true ), mExportTextOptions() + bFormulas( sal_False ), bIncludeFiltered( sal_True ), + bAll( sal_False ), bSingle( sal_True ), bUndo( sal_Bool( pDocSh != NULL ) ), + bOverflow( sal_False ), mbApi( true ), mExportTextOptions() { pUndoDoc = NULL; pExtOptions = NULL; @@ -174,7 +174,7 @@ ScImportExport::ScImportExport( ScDocument* p, const String& rPos ) ScRangeName* pRange = pDoc->GetRangeName(); if( pRange ) { - USHORT nPos; + sal_uInt16 nPos; if( pRange->SearchName( aPos, nPos ) ) { ScRangeData* pData = (*pRange)[ nPos ]; @@ -187,12 +187,12 @@ ScImportExport::ScImportExport( ScDocument* p, const String& rPos ) formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); // Bereich? if( aRange.Parse( aPos, pDoc, eConv ) & SCA_VALID ) - bSingle = FALSE; + bSingle = sal_False; // Zelle? else if( aRange.aStart.Parse( aPos, pDoc, eConv ) & SCA_VALID ) aRange.aEnd = aRange.aStart; else - bAll = TRUE; + bAll = sal_True; } @@ -217,9 +217,9 @@ void ScImportExport::SetExtOptions( const ScAsciiOptions& rOpt ) } -BOOL ScImportExport::IsFormatSupported( ULONG nFormat ) +sal_Bool ScImportExport::IsFormatSupported( sal_uLong nFormat ) { - return BOOL( nFormat == FORMAT_STRING + return sal_Bool( nFormat == FORMAT_STRING || nFormat == SOT_FORMATSTR_ID_SYLK || nFormat == SOT_FORMATSTR_ID_LINK || nFormat == SOT_FORMATSTR_ID_HTML @@ -233,7 +233,7 @@ BOOL ScImportExport::IsFormatSupported( ULONG nFormat ) // Vorbereitung fuer Undo: Undo-Dokument erzeugen -BOOL ScImportExport::StartPaste() +sal_Bool ScImportExport::StartPaste() { if ( !bAll ) { @@ -243,16 +243,16 @@ BOOL ScImportExport::StartPaste() InfoBox aInfoBox(Application::GetDefDialogParent(), ScGlobal::GetRscString( aTester.GetMessageId() ) ); aInfoBox.Execute(); - return FALSE; + return sal_False; } } if( bUndo && pDocSh && pDoc->IsUndoEnabled()) { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() ); - pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, sal_False, pUndoDoc ); } - return TRUE; + return sal_True; } // Nachbereitung Insert: Undo/Redo-Aktionen erzeugen, Invalidate/Repaint @@ -260,14 +260,14 @@ BOOL ScImportExport::StartPaste() void ScImportExport::EndPaste() { - BOOL bHeight = pDocSh && pDocSh->AdjustRowHeight( + sal_Bool bHeight = pDocSh && pDocSh->AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row(), aRange.aStart.Tab() ); if( pUndoDoc && pDoc->IsUndoEnabled() ) { ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() ); - pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, FALSE, pRedoDoc ); + pDoc->CopyToDocument( aRange, IDF_ALL | IDF_NOCAPTIONS, sal_False, pRedoDoc ); ScMarkData aDestMark; aDestMark.SelectOneTable( aRange.aStart.Tab() ); pDocSh->GetUndoManager()->AddUndoAction( @@ -293,9 +293,9 @@ void ScImportExport::EndPaste() #if 0 -BOOL ScImportExport::ImportData( SvData& rData ) +sal_Bool ScImportExport::ImportData( SvData& rData ) { - ULONG nFmt = rData.GetFormat(); + sal_uLong nFmt = rData.GetFormat(); if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE ) { MSE40HTMLClipFormatObj aMSE40ClpObj; @@ -304,12 +304,12 @@ BOOL ScImportExport::ImportData( SvData& rData ) SvStream* pStream = aMSE40ClpObj.GetStream(); return ImportStream( *pStream, nFmt ); } - return FALSE; + return sal_False; } else { void* pMem; - ULONG nSize = rData.GetMinMemorySize(); + sal_uLong nSize = rData.GetMinMemorySize(); rData.GetData( &pMem, TRANSFER_REFERENCE ); if( nFmt == FORMAT_STRING || nFmt == FORMAT_RTF @@ -336,14 +336,14 @@ BOOL ScImportExport::ImportData( SvData& rData ) #endif -BOOL ScImportExport::ImportData( const String& /* rMimeType */, +sal_Bool ScImportExport::ImportData( const String& /* rMimeType */, const ::com::sun::star::uno::Any & /* rValue */ ) { DBG_ASSERT( !this, "Implementation is missing" ); - return FALSE; + return sal_False; } -BOOL ScImportExport::ExportData( const String& rMimeType, +sal_Bool ScImportExport::ExportData( const String& rMimeType, ::com::sun::star::uno::Any & rValue ) { SvMemoryStream aStrm; @@ -351,17 +351,17 @@ BOOL ScImportExport::ExportData( const String& rMimeType, if( ExportStream( aStrm, String(), SotExchange::GetFormatIdFromMimeType( rMimeType ) )) { - aStrm << (BYTE) 0; + aStrm << (sal_uInt8) 0; rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( (sal_Int8*)aStrm.GetData(), aStrm.Seek( STREAM_SEEK_TO_END ) ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt ) +sal_Bool ScImportExport::ImportString( const ::rtl::OUString& rText, sal_uLong nFmt ) { switch ( nFmt ) { @@ -386,14 +386,14 @@ BOOL ScImportExport::ImportString( const ::rtl::OUString& rText, ULONG nFmt ) } -BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt ) +sal_Bool ScImportExport::ExportString( ::rtl::OUString& rText, sal_uLong nFmt ) { DBG_ASSERT( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" ); if ( nFmt != FORMAT_STRING ) { rtl_TextEncoding eEnc = gsl_getSystemTextEncoding(); ByteString aTmp; - BOOL bOk = ExportByteString( aTmp, eEnc, nFmt ); + sal_Bool bOk = ExportByteString( aTmp, eEnc, nFmt ); rText = UniString( aTmp, eEnc ); return bOk; } @@ -409,16 +409,16 @@ BOOL ScImportExport::ExportString( ::rtl::OUString& rText, ULONG nFmt ) aStrm.Seek( STREAM_SEEK_TO_END ); rText = rtl::OUString( (const sal_Unicode*) aStrm.GetData() ); - return TRUE; + return sal_True; } rText = rtl::OUString(); - return FALSE; + return sal_False; // ExportStream must handle RTL_TEXTENCODING_UNICODE } -BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, ULONG nFmt ) +sal_Bool ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt ) { DBG_ASSERT( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" ); if ( eEnc == RTL_TEXTENCODING_UNICODE ) @@ -436,74 +436,74 @@ BOOL ScImportExport::ExportByteString( ByteString& rText, rtl_TextEncoding eEnc, aStrm << (sal_Char) 0; aStrm.Seek( STREAM_SEEK_TO_END ); // Sicherheits-Check: - if( aStrm.Tell() <= (ULONG) STRING_MAXLEN ) + if( aStrm.Tell() <= (sal_uLong) STRING_MAXLEN ) { rText = (const sal_Char*) aStrm.GetData(); - return TRUE; + return sal_True; } } rText.Erase(); - return FALSE; + return sal_False; } -BOOL ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, ULONG nFmt ) +sal_Bool ScImportExport::ImportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt ) { if( nFmt == FORMAT_STRING ) { if( ExtText2Doc( rStrm ) ) // pExtOptions auswerten - return TRUE; + return sal_True; } if( nFmt == SOT_FORMATSTR_ID_SYLK ) { if( Sylk2Doc( rStrm ) ) - return TRUE; + return sal_True; } if( nFmt == SOT_FORMATSTR_ID_DIF ) { if( Dif2Doc( rStrm ) ) - return TRUE; + return sal_True; } if( nFmt == FORMAT_RTF ) { if( RTF2Doc( rStrm, rBaseURL ) ) - return TRUE; + return sal_True; } if( nFmt == SOT_FORMATSTR_ID_LINK ) - return TRUE; // Link-Import? + return sal_True; // Link-Import? if ( nFmt == SOT_FORMATSTR_ID_HTML ) { if( HTML2Doc( rStrm, rBaseURL ) ) - return TRUE; + return sal_True; } if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE ) { MSE40HTMLClipFormatObj aMSE40ClpObj; // needed to skip the header data SvStream* pHTML = aMSE40ClpObj.IsValid( rStrm ); if ( pHTML && HTML2Doc( *pHTML, rBaseURL ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULONG nFmt ) +sal_Bool ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, sal_uLong nFmt ) { if( nFmt == FORMAT_STRING ) { if( Doc2Text( rStrm ) ) - return TRUE; + return sal_True; } if( nFmt == SOT_FORMATSTR_ID_SYLK ) { if( Doc2Sylk( rStrm ) ) - return TRUE; + return sal_True; } if( nFmt == SOT_FORMATSTR_ID_DIF ) { if( Doc2Dif( rStrm ) ) - return TRUE; + return sal_True; } if( nFmt == SOT_FORMATSTR_ID_LINK && !bAll ) { @@ -521,7 +521,7 @@ BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULON if( aDocName.Len() ) { String aRefName; - USHORT nFlags = SCA_VALID | SCA_TAB_3D; + sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D; if( bSingle ) aRange.aStart.Format( aRefName, nFlags, pDoc, pDoc->GetAddressConvention() ); else @@ -532,33 +532,33 @@ BOOL ScImportExport::ExportStream( SvStream& rStrm, const String& rBaseURL, ULON } String aAppName = Application::GetAppName(); - WriteUnicodeOrByteString( rStrm, aAppName, TRUE ); - WriteUnicodeOrByteString( rStrm, aDocName, TRUE ); - WriteUnicodeOrByteString( rStrm, aRefName, TRUE ); + WriteUnicodeOrByteString( rStrm, aAppName, sal_True ); + WriteUnicodeOrByteString( rStrm, aDocName, sal_True ); + WriteUnicodeOrByteString( rStrm, aRefName, sal_True ); if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) rStrm << sal_Unicode(0); else rStrm << sal_Char(0); - return BOOL( rStrm.GetError() == SVSTREAM_OK ); + return sal_Bool( rStrm.GetError() == SVSTREAM_OK ); } } if( nFmt == SOT_FORMATSTR_ID_HTML ) { if( Doc2HTML( rStrm, rBaseURL ) ) - return TRUE; + return sal_True; } if( nFmt == FORMAT_RTF ) { if( Doc2RTF( rStrm ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //static -void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero ) +void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, sal_Bool bZero ) { rtl_TextEncoding eEnc = rStrm.GetStreamCharSet(); if ( eEnc == RTL_TEXTENCODING_UNICODE ) @@ -622,10 +622,10 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString, sal_Unicode cStr, DoubledQuoteMode eMode ) { p++; //! jump over opening quote - BOOL bCont; + sal_Bool bCont; do { - bCont = FALSE; + bCont = sal_False; const sal_Unicode* p0 = p; for( ;; ) { @@ -643,7 +643,7 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, String& rString, break; case DQM_ESCAPE : p++; // one for us (breaking for-loop) - bCont = TRUE; // and more + bCont = sal_True; // and more break; case DQM_CONCAT : if ( p0+1 < p ) @@ -817,18 +817,18 @@ inline void lcl_WriteSimpleString( SvStream& rStrm, const String& rString ) ////////////////////////////////////////////////////////////////////////////// -BOOL ScImportExport::Text2Doc( SvStream& rStrm ) +sal_Bool ScImportExport::Text2Doc( SvStream& rStrm ) { - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; SCCOL nStartCol = aRange.aStart.Col(); SCROW nStartRow = aRange.aStart.Row(); SCCOL nEndCol = aRange.aEnd.Col(); SCROW nEndRow = aRange.aEnd.Row(); - ULONG nOldPos = rStrm.Tell(); + sal_uLong nOldPos = rStrm.Tell(); if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) rStrm.StartReadingUnicodeText(); - BOOL bData = BOOL( !bSingle ); + sal_Bool bData = sal_Bool( !bSingle ); if( !bSingle) bOk = StartPaste(); @@ -876,7 +876,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm ) pDoc->SetString( nCol, nRow, aRange.aStart.Tab(), aCell ); } else // zuviele Spalten/Zeilen - bOverflow = TRUE; // beim Import Warnung ausgeben + bOverflow = sal_True; // beim Import Warnung ausgeben ++nCol; } ++nRow; @@ -887,7 +887,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm ) aRange.aEnd.SetCol( nEndCol ); aRange.aEnd.SetRow( nEndRow ); bOk = StartPaste(); - bData = TRUE; + bData = sal_True; } else break; @@ -903,7 +903,7 @@ BOOL ScImportExport::Text2Doc( SvStream& rStrm ) static bool lcl_PutString( - ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, BYTE nColFormat, + ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rStr, sal_uInt8 nColFormat, SvNumberFormatter* pFormatter, bool bDetectNumFormat, ::utl::TransliterationWrapper& rTransliteration, CalendarWrapper& rCalendar, ::utl::TransliterationWrapper* pSecondTransliteration, CalendarWrapper* pSecondCalendar ) @@ -935,12 +935,12 @@ static bool lcl_PutString( } else if ( nColFormat != SC_COL_STANDARD ) // Datumsformate { - const USHORT nMaxNumberParts = 7; // Y-M-D h:m:s.t + const sal_uInt16 nMaxNumberParts = 7; // Y-M-D h:m:s.t xub_StrLen nLen = rStr.Len(); xub_StrLen nStart[nMaxNumberParts]; xub_StrLen nEnd[nMaxNumberParts]; - USHORT nDP, nMP, nYP; + sal_uInt16 nDP, nMP, nYP; switch ( nColFormat ) { case SC_COL_YMD: nDP = 2; nMP = 1; nYP = 0; break; @@ -949,28 +949,28 @@ static bool lcl_PutString( default: nDP = 0; nMP = 1; nYP = 2; break; } - USHORT nFound = 0; - BOOL bInNum = FALSE; + sal_uInt16 nFound = 0; + sal_Bool bInNum = sal_False; for ( xub_StrLen nPos=0; nPosisLetterNumeric( rStr, nPos)) || ScGlobal::pCharClass->isDigit( rStr, nPos)) { if (!bInNum) { - bInNum = TRUE; + bInNum = sal_True; nStart[nFound] = nPos; ++nFound; } nEnd[nFound-1] = nPos; } else - bInNum = FALSE; + bInNum = sal_False; } if ( nFound == 1 ) @@ -987,13 +987,13 @@ static bool lcl_PutString( // 8 digits: 4 for year, 2 each for day and month // 5 or 7 digits: first field is shortened by 1 - BOOL bLongYear = ( nDateLen >= 7 ); - BOOL bShortFirst = ( nDateLen == 5 || nDateLen == 7 ); + sal_Bool bLongYear = ( nDateLen >= 7 ); + sal_Bool bShortFirst = ( nDateLen == 5 || nDateLen == 7 ); - USHORT nFieldStart = nDateStart; - for (USHORT nPos=0; nPos<3; nPos++) + sal_uInt16 nFieldStart = nDateStart; + for (sal_uInt16 nPos=0; nPos<3; nPos++) { - USHORT nFieldEnd = nFieldStart + 1; // default: 2 digits + sal_uInt16 nFieldEnd = nFieldStart + 1; // default: 2 digits if ( bLongYear && nPos == nYP ) nFieldEnd += 2; // 2 extra digits for long year if ( bShortFirst && nPos == 0 ) @@ -1010,9 +1010,9 @@ static bool lcl_PutString( if ( nFound >= 3 ) { using namespace ::com::sun::star; - BOOL bSecondCal = FALSE; - USHORT nDay = (USHORT) rStr.Copy( nStart[nDP], nEnd[nDP]+1-nStart[nDP] ).ToInt32(); - USHORT nYear = (USHORT) rStr.Copy( nStart[nYP], nEnd[nYP]+1-nStart[nYP] ).ToInt32(); + sal_Bool bSecondCal = sal_False; + sal_uInt16 nDay = (sal_uInt16) rStr.Copy( nStart[nDP], nEnd[nDP]+1-nStart[nDP] ).ToInt32(); + sal_uInt16 nYear = (sal_uInt16) rStr.Copy( nStart[nYP], nEnd[nYP]+1-nStart[nYP] ).ToInt32(); String aMStr = rStr.Copy( nStart[nMP], nEnd[nMP]+1-nStart[nMP] ); sal_Int16 nMonth = (sal_Int16) aMStr.ToInt32(); if (!nMonth) @@ -1048,14 +1048,14 @@ static bool lcl_PutString( pSecondTransliteration->isEqual( aMStr, xMonths[i].AbbrevName ) ) { nMonth = sal::static_int_cast( i+1 ); - bSecondCal = TRUE; + bSecondCal = sal_True; } else if ( i == 8 && pSecondTransliteration->isEqual( aMStr, aSepShortened ) ) { // #102136# correct English abbreviation is SEPT, // but data mostly contains SEP only nMonth = sal::static_int_cast( i+1 ); - bSecondCal = TRUE; + bSecondCal = sal_True; } } } @@ -1111,12 +1111,12 @@ static bool lcl_PutString( LanguageType eDocLang = eLatin; //! which language for date formats? short nType = (nFound > 3 ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE); - ULONG nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang ); + sal_uLong nFormat = pDocFormatter->GetStandardFormat( nType, eDocLang ); // maybe there is a special format including seconds or milliseconds if (nFound > 5) nFormat = pDocFormatter->GetStandardFormat( fDays, nFormat, nType, eDocLang); - pDoc->PutCell( nCol, nRow, nTab, new ScValueCell(fDays), nFormat, FALSE ); + pDoc->PutCell( nCol, nRow, nTab, new ScValueCell(fDays), nFormat, sal_False ); return bMultiLine; // success } @@ -1157,12 +1157,12 @@ String lcl_GetFixed( const String& rLine, xub_StrLen nStart, xub_StrLen nNext, b return rLine.Copy(nStart, nSpace-nStart); } -BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) +sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm ) { if (!pExtOptions) return Text2Doc( rStrm ); - ULONG nOldPos = rStrm.Tell(); + sal_uLong nOldPos = rStrm.Tell(); rStrm.Seek( STREAM_SEEK_TO_END ); ::std::auto_ptr xProgress( new ScProgress( pDocSh, ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos )); @@ -1170,21 +1170,21 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if ( rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ) rStrm.StartReadingUnicodeText(); - BOOL bOld = ScColumn::bDoubleAlloc; - ScColumn::bDoubleAlloc = TRUE; + sal_Bool bOld = ScColumn::bDoubleAlloc; + ScColumn::bDoubleAlloc = sal_True; SCCOL nStartCol = aRange.aStart.Col(); SCCOL nEndCol = aRange.aEnd.Col(); SCROW nStartRow = aRange.aStart.Row(); SCTAB nTab = aRange.aStart.Tab(); - BOOL bFixed = pExtOptions->IsFixedLen(); + sal_Bool bFixed = pExtOptions->IsFixedLen(); const String& rSeps = pExtOptions->GetFieldSeps(); const sal_Unicode* pSeps = rSeps.GetBuffer(); - BOOL bMerge = pExtOptions->IsMergeSeps(); - USHORT nInfoCount = pExtOptions->GetInfoCount(); + sal_Bool bMerge = pExtOptions->IsMergeSeps(); + sal_uInt16 nInfoCount = pExtOptions->GetInfoCount(); const xub_StrLen* pColStart = pExtOptions->GetColStart(); - const BYTE* pColFormat = pExtOptions->GetColFormat(); + const sal_uInt8* pColFormat = pExtOptions->GetColFormat(); long nSkipLines = pExtOptions->GetStartRow(); LanguageType eDocLang = pExtOptions->GetLanguage(); @@ -1211,7 +1211,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) } String aLine, aCell; - USHORT i; + sal_uInt16 i; SCROW nRow = nStartRow; while(--nSkipLines>0) @@ -1233,7 +1233,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) bool bQuotedAsText = pExtOptions && pExtOptions->IsQuotedAsText(); - ULONG nOriginalStreamPos = rStrm.Tell(); + sal_uLong nOriginalStreamPos = rStrm.Tell(); do { @@ -1254,11 +1254,11 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) // SC_COL_SKIP. for ( i=0; i MAXCOL) - bOverflow = TRUE; // display warning on import + bOverflow = sal_True; // display warning on import else if (!bDetermineRange) { xub_StrLen nStart = pColStart[i]; @@ -1280,7 +1280,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) else // Nach Trennzeichen suchen { SCCOL nSourceCol = 0; - USHORT nInfoStart = 0; + sal_uInt16 nInfoStart = 0; const sal_Unicode* p = aLine.GetBuffer(); // Yes, the check is nCol<=MAXCOL+1, +1 because it is only an // overflow if there is really data following to be put behind @@ -1291,7 +1291,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) bool bIsQuoted = false; p = ScImportExport::ScanNextFieldFromString( p, aCell, cStr, pSeps, bMerge, bIsQuoted ); - BYTE nFmt = SC_COL_STANDARD; + sal_uInt8 nFmt = SC_COL_STANDARD; for ( i=nInfoStart; i MAXCOL) - bOverflow = TRUE; // display warning on import + bOverflow = sal_True; // display warning on import else if (!bDetermineRange) { if (bIsQuoted && bQuotedAsText) @@ -1333,7 +1333,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) ++nRow; if ( nRow > MAXROW ) { - bOverflow = TRUE; // display warning on import + bOverflow = sal_True; // display warning on import break; // for } } @@ -1356,7 +1356,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) { delete pEnglishTransliteration; delete pEnglishCalendar; - return FALSE; + return sal_False; } } @@ -1365,7 +1365,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if (!StartPaste()) { EndPaste(); - return FALSE; + return sal_False; } } @@ -1382,7 +1382,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if (bRangeIsDetermined) EndPaste(); - return TRUE; + return sal_True; } @@ -1428,7 +1428,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p // -BOOL ScImportExport::Doc2Text( SvStream& rStrm ) +sal_Bool ScImportExport::Doc2Text( SvStream& rStrm ) { SCCOL nCol; SCROW nRow; @@ -1453,7 +1453,7 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm ) { if (bFormulas) { - pDoc->GetFormula( nCol, nRow, aRange.aStart.Tab(), aCell, TRUE ); + pDoc->GetFormula( nCol, nRow, aRange.aStart.Tab(), aCell, sal_True ); if( aCell.Search( cSep ) != STRING_NOTFOUND ) lcl_WriteString( rStrm, aCell, cStr, cStr ); else @@ -1525,14 +1525,14 @@ BOOL ScImportExport::Doc2Text( SvStream& rStrm ) } } - return BOOL( rStrm.GetError() == SVSTREAM_OK ); + return sal_Bool( rStrm.GetError() == SVSTREAM_OK ); } -BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) +sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) { - BOOL bOk = TRUE; - BOOL bMyDoc = FALSE; + sal_Bool bOk = sal_True; + sal_Bool bMyDoc = sal_False; SylkVersion eVersion = SYLK_OTHER; // US-English separators for StringToDouble @@ -1543,8 +1543,8 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) SCROW nStartRow = aRange.aStart.Row(); SCCOL nEndCol = aRange.aEnd.Col(); SCROW nEndRow = aRange.aEnd.Row(); - ULONG nOldPos = rStrm.Tell(); - BOOL bData = BOOL( !bSingle ); + sal_uLong nOldPos = rStrm.Tell(); + sal_Bool bData = sal_Bool( !bSingle ); SvULongs aFormats; if( !bSingle) @@ -1572,7 +1572,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) if( cTag == 'C' ) // Content { if( *p++ != ';' ) - return FALSE; + return sal_False; while( *p ) { sal_Unicode ch = *p++; @@ -1606,15 +1606,15 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) nEndCol = nCol; break; } - BOOL bText; + sal_Bool bText; if( *p == '"' ) { - bText = TRUE; + bText = sal_True; aText.Erase(); p = lcl_ScanSylkString( p, aText, eVersion); } else - bText = FALSE; + bText = sal_False; const sal_Unicode* q = p; while( *q && *q != ';' ) q++; @@ -1624,7 +1624,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) { pDoc->PutCell( nCol, nRow, aRange.aStart.Tab(), ScBaseCell::CreateTextCell( aText, pDoc), - (BOOL) TRUE); + (sal_Bool) sal_True); } else { @@ -1668,7 +1668,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) if ( ch == 'M' ) { ScMarkData aMark; - aMark.SelectTable( aPos.Tab(), TRUE ); + aMark.SelectTable( aPos.Tab(), sal_True ); pDoc->InsertMatrixFormula( nCol, nRow, nRefCol, nRefRow, aMark, EMPTY_STRING, pCode ); } @@ -1691,7 +1691,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) else if( cTag == 'F' ) // Format { if( *p++ != ';' ) - return FALSE; + return sal_False; sal_Int32 nFormat = -1; while( *p ) { @@ -1733,7 +1733,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) } if ( 0 <= nFormat && nFormat < aFormats.Count() ) { - ULONG nKey = aFormats[(USHORT)nFormat]; + sal_uLong nKey = aFormats[(sal_uInt16)nFormat]; pDoc->ApplyAttr( nCol, nRow, aRange.aStart.Tab(), SfxUInt32Item( ATTR_VALUE_FORMAT, nKey ) ); } @@ -1780,7 +1780,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) aRange.aEnd.SetCol( nEndCol ); aRange.aEnd.SetRow( nEndRow ); bOk = StartPaste(); - bData = TRUE; + bData = sal_True; } else break; @@ -1791,7 +1791,7 @@ BOOL ScImportExport::Sylk2Doc( SvStream& rStrm ) } -BOOL ScImportExport::Doc2Sylk( SvStream& rStrm ) +sal_Bool ScImportExport::Doc2Sylk( SvStream& rStrm ) { SCCOL nCol; SCROW nRow; @@ -1811,7 +1811,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm ) { String aBufStr; double nVal; - BOOL bForm = FALSE; + sal_Bool bForm = sal_False; SCROW r = nRow - nStartRow + 1; SCCOL c = nCol - nStartCol + 1; ScBaseCell* pCell; @@ -1832,7 +1832,7 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm ) aValStr = ::rtl::math::doubleToUString( nVal, rtl_math_StringFormat_Automatic, - rtl_math_DecimalPlaces_Max, '.', TRUE ); + rtl_math_DecimalPlaces_Max, '.', sal_True ); aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" )); aBufStr += String::CreateFromInt32( c ); @@ -1931,35 +1931,35 @@ BOOL ScImportExport::Doc2Sylk( SvStream& rStrm ) } lcl_WriteSimpleString( rStrm, String( 'E' ) ); WriteUnicodeOrByteEndl( rStrm ); - return BOOL( rStrm.GetError() == SVSTREAM_OK ); + return sal_Bool( rStrm.GetError() == SVSTREAM_OK ); } -BOOL ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL ) +sal_Bool ScImportExport::Doc2HTML( SvStream& rStrm, const String& rBaseURL ) { // CharSet is ignored in ScExportHTML, read from Load/Save HTML options ScFormatFilter::Get().ScExportHTML( rStrm, rBaseURL, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW, bAll, aStreamPath, aNonConvertibleChars ); - return BOOL( rStrm.GetError() == SVSTREAM_OK ); + return sal_Bool( rStrm.GetError() == SVSTREAM_OK ); } -BOOL ScImportExport::Doc2RTF( SvStream& rStrm ) +sal_Bool ScImportExport::Doc2RTF( SvStream& rStrm ) { // CharSet is ignored in ScExportRTF ScFormatFilter::Get().ScExportRTF( rStrm, pDoc, aRange, RTL_TEXTENCODING_DONTKNOW ); - return BOOL( rStrm.GetError() == SVSTREAM_OK ); + return sal_Bool( rStrm.GetError() == SVSTREAM_OK ); } -BOOL ScImportExport::Doc2Dif( SvStream& rStrm ) +sal_Bool ScImportExport::Doc2Dif( SvStream& rStrm ) { // for DIF in the clipboard, IBM_850 is always used ScFormatFilter::Get().ScExportDif( rStrm, pDoc, aRange, RTL_TEXTENCODING_IBM_850 ); - return TRUE; + return sal_True; } -BOOL ScImportExport::Dif2Doc( SvStream& rStrm ) +sal_Bool ScImportExport::Dif2Doc( SvStream& rStrm ) { SCTAB nTab = aRange.aStart.Tab(); ScDocument* pImportDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -1978,12 +1978,12 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm ) nEndRow = aRange.aStart.Row(); aRange.aEnd = ScAddress( nEndCol, nEndRow, nTab ); - BOOL bOk = StartPaste(); + sal_Bool bOk = StartPaste(); if (bOk) { - USHORT nFlags = IDF_ALL & ~IDF_STYLES; + sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES; pDoc->DeleteAreaTab( aRange, nFlags ); - pImportDoc->CopyToDocument( aRange, nFlags, FALSE, pDoc ); + pImportDoc->CopyToDocument( aRange, nFlags, sal_False, pDoc ); EndPaste(); } @@ -1993,7 +1993,7 @@ BOOL ScImportExport::Dif2Doc( SvStream& rStrm ) } -BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL ) +sal_Bool ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL ) { ScEEAbsImport *pImp = ScFormatFilter::Get().CreateRTFImport( pDoc, aRange ); if (!pImp) @@ -2001,10 +2001,10 @@ BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL ) pImp->Read( rStrm, rBaseURL ); aRange = pImp->GetRange(); - BOOL bOk = StartPaste(); + sal_Bool bOk = StartPaste(); if (bOk) { - USHORT nFlags = IDF_ALL & ~IDF_STYLES; + sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES; pDoc->DeleteAreaTab( aRange, nFlags ); pImp->WriteToDocument(); EndPaste(); @@ -2014,15 +2014,15 @@ BOOL ScImportExport::RTF2Doc( SvStream& rStrm, const String& rBaseURL ) } -BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL ) +sal_Bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL ) { - ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, TRUE); + ScEEAbsImport *pImp = ScFormatFilter::Get().CreateHTMLImport( pDoc, rBaseURL, aRange, sal_True); if (!pImp) return false; pImp->Read( rStrm, rBaseURL ); aRange = pImp->GetRange(); - BOOL bOk = StartPaste(); + sal_Bool bOk = StartPaste(); if (bOk) { // ScHTMLImport may call ScDocument::InitDrawLayer, resulting in @@ -2030,7 +2030,7 @@ BOOL ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL ) if (pDocSh) pDocSh->MakeDrawLayer(); - USHORT nFlags = IDF_ALL & ~IDF_STYLES; + sal_uInt16 nFlags = IDF_ALL & ~IDF_STYLES; pDoc->DeleteAreaTab( aRange, nFlags ); pImp->WriteToDocument(); EndPaste(); @@ -2051,21 +2051,21 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) RETURN_ERROR virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) RETURN_ERROR virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&, - const CharSet, UINT32 ) RETURN_ERROR + const CharSet, sal_uInt32 ) RETURN_ERROR virtual FltError ScImportRTF( SvStream&, const String&, ScDocument*, ScRange& ) RETURN_ERROR - virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, BOOL, SvNumberFormatter*, bool ) RETURN_ERROR + virtual FltError ScImportHTML( SvStream&, const String&, ScDocument*, ScRange&, double, sal_Bool, SvNumberFormatter*, bool ) RETURN_ERROR virtual ScEEAbsImport *CreateRTFImport( ScDocument*, const ScRange& ) { return NULL; } - virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, BOOL ) { return NULL; } + virtual ScEEAbsImport *CreateHTMLImport( ScDocument*, const String&, const ScRange&, sal_Bool ) { return NULL; } virtual String GetHTMLRangeNameList( ScDocument*, const String& ) { return String(); } #if ENABLE_LOTUS123_EXPORT virtual FltError ScExportLotus123( SvStream&, ScDocument*, ExportFormatLotus, CharSet ) RETURN_ERROR #endif virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, CharSet ) RETURN_ERROR - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, UINT32 ) RETURN_ERROR - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, UINT32 ) RETURN_ERROR - virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, BOOL, + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, sal_uInt32 ) RETURN_ERROR + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, sal_uInt32 ) RETURN_ERROR + virtual FltError ScExportHTML( SvStream&, const String&, ScDocument*, const ScRange&, const CharSet, sal_Bool, const String&, String& ) RETURN_ERROR virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const CharSet ) RETURN_ERROR }; diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index 822c74800ab2..5e2503f94e15 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -64,11 +64,11 @@ void lcl_InvalidateOutliner( SfxBindings* pBindings ) //! PaintWidthHeight zur DocShell verschieben? void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab, - BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd ) + sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd ) { ScDocument* pDoc = rDocShell.GetDocument(); - USHORT nParts = PAINT_GRID; + sal_uInt16 nParts = PAINT_GRID; SCCOL nStartCol = 0; SCROW nStartRow = 0; SCCOL nEndCol = MAXCOL; // fuer Test auf Merge @@ -96,9 +96,9 @@ void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab, //------------------------------------------------------------------------ -BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi ) +sal_Bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -106,19 +106,19 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b SCTAB nTab = rRange.aStart.Tab(); ScDocument* pDoc = rDocShell.GetDocument(); - ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab, TRUE ); + ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab, sal_True ); ScOutlineTable* pUndoTab = NULL; if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if (bRecord) pUndoTab = new ScOutlineTable( *pTable ); ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); - BOOL bRes; - BOOL bSize = FALSE; + sal_Bool bRes; + sal_Bool bSize = sal_False; if ( bColumns ) bRes = pArray->Insert( nStartCol, nEndCol, bSize ); else @@ -131,13 +131,13 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b rDocShell.GetUndoManager()->AddUndoAction( new ScUndoMakeOutline( &rDocShell, nStartCol,nStartRow,nTab,nEndCol,nEndRow,nTab, - pUndoTab, bColumns, TRUE ) ); + pUndoTab, bColumns, sal_True ) ); } if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); - USHORT nParts = 0; // Datenbereich nicht geaendert + sal_uInt16 nParts = 0; // Datenbereich nicht geaendert if ( bColumns ) nParts |= PAINT_TOP; else @@ -148,7 +148,7 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - bSuccess = TRUE; + bSuccess = sal_True; } else { @@ -160,9 +160,9 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b return bSuccess; } -BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi ) +sal_Bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -173,7 +173,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) { @@ -183,8 +183,8 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); - BOOL bRes; - BOOL bSize = FALSE; + sal_Bool bRes; + sal_Bool bSize = sal_False; if ( bColumns ) bRes = pArray->Remove( nStartCol, nEndCol, bSize ); else @@ -197,13 +197,13 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL rDocShell.GetUndoManager()->AddUndoAction( new ScUndoMakeOutline( &rDocShell, nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, - pUndoTab, bColumns, FALSE ) ); + pUndoTab, bColumns, sal_False ) ); } if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); - USHORT nParts = 0; // Datenbereich nicht geaendert + sal_uInt16 nParts = 0; // Datenbereich nicht geaendert if ( bColumns ) nParts |= PAINT_TOP; else @@ -213,7 +213,7 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts ); rDocShell.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); // es wird nicht wieder eingeblendet -> kein UpdatePageBreaks @@ -228,13 +228,13 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL return bDone; } -BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi ) +sal_Bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi ) { - BOOL bSuccess = FALSE; + sal_Bool bSuccess = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) { @@ -249,9 +249,9 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi ) SCROW nEndRow = nRow2; ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); - pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable ); @@ -262,20 +262,20 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi ) pUndoDoc, pUndoTab ) ); } - SelectLevel( nTab, TRUE, pTable->GetColArray()->GetDepth(), FALSE, FALSE, bApi ); - SelectLevel( nTab, FALSE, pTable->GetRowArray()->GetDepth(), FALSE, FALSE, bApi ); + SelectLevel( nTab, sal_True, pTable->GetColArray()->GetDepth(), sal_False, sal_False, bApi ); + SelectLevel( nTab, sal_False, pTable->GetRowArray()->GetDepth(), sal_False, sal_False, bApi ); pDoc->SetOutlineTable( nTab, NULL ); pDoc->UpdatePageBreaks( nTab ); if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - bSuccess = TRUE; + bSuccess = sal_True; } else if (!bApi) Sound::Beep(); @@ -285,7 +285,7 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi ) //------------------------------------------------------------------------ -BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi ) +sal_Bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ) { SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -296,7 +296,7 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); ScDocument* pUndoDoc = NULL; @@ -317,14 +317,14 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA SCROW nOutEndRow = nRow2; pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); - pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( nOutStartCol, 0, nTab, nOutEndCol, MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nOutStartRow, nTab, MAXCOL, nOutEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); } // einblenden - SelectLevel( nTab, TRUE, pTable->GetColArray()->GetDepth(), FALSE, FALSE, bApi ); - SelectLevel( nTab, FALSE, pTable->GetRowArray()->GetDepth(), FALSE, FALSE, bApi ); + SelectLevel( nTab, sal_True, pTable->GetColArray()->GetDepth(), sal_False, sal_False, bApi ); + SelectLevel( nTab, sal_False, pTable->GetRowArray()->GetDepth(), sal_False, sal_False, bApi ); pDoc->SetOutlineTable( nTab, NULL ); } @@ -340,30 +340,30 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA } if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel, - BOOL bRecord, BOOL bPaint, BOOL /* bApi */ ) +sal_Bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ ) { ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); // ist schon da if (!pTable) - return FALSE; + return sal_False; ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); if (!pArray) - return FALSE; + return sal_False; SCCOLROW nStart, nEnd; pArray->GetRange( nStart, nEnd ); @@ -374,15 +374,15 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel, ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); if (bColumns) { - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); pDoc->CopyToDocument( static_cast(nStart), 0, nTab, - static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pUndoDoc ); } rDocShell.GetUndoManager()->AddUndoAction( @@ -396,21 +396,21 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel, ScOutlineEntry* pEntry; while ((pEntry=aIter.GetNext()) != NULL) { - USHORT nThisLevel = aIter.LastLevel(); - BOOL bShow = (nThisLevel < nLevel); + sal_uInt16 nThisLevel = aIter.LastLevel(); + sal_Bool bShow = (nThisLevel < nLevel); if (bShow) // einblenden { - pEntry->SetHidden( FALSE ); - pEntry->SetVisible( TRUE ); + pEntry->SetHidden( sal_False ); + pEntry->SetVisible( sal_True ); } else if ( nThisLevel == nLevel ) // ausblenden { - pEntry->SetHidden( TRUE ); - pEntry->SetVisible( TRUE ); + pEntry->SetHidden( sal_True ); + pEntry->SetVisible( sal_True ); } else // verdeckt { - pEntry->SetVisible( FALSE ); + pEntry->SetVisible( sal_False ); } SCCOLROW nThisStart = pEntry->GetStart(); @@ -433,14 +433,14 @@ BOOL ScOutlineDocFunc::SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel, rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi ) +sal_Bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -451,7 +451,7 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) @@ -468,14 +468,14 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, { ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable ); ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); - pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoOutlineBlock( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, - pUndoDoc, pUndoTab, TRUE ) ); + pUndoDoc, pUndoTab, sal_True ) ); } // Spalten @@ -490,14 +490,14 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, nEnd = pEntry->GetEnd(); if ( nStart>=nStartCol && nEnd<=nEndCol ) { - pEntry->SetHidden( FALSE ); - pEntry->SetVisible( TRUE ); + pEntry->SetHidden( sal_False ); + pEntry->SetVisible( sal_True ); if (nStartnMax) nMax=nEnd; } } for ( i=nMin; i<=nMax; i++ ) - pDoc->ShowCol( static_cast(i), nTab, TRUE ); + pDoc->ShowCol( static_cast(i), nTab, sal_True ); // Zeilen @@ -511,22 +511,22 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, nEnd = pEntry->GetEnd(); if ( nStart>=nStartRow && nEnd<=nEndRow ) { - pEntry->SetHidden( FALSE ); - pEntry->SetVisible( TRUE ); + pEntry->SetHidden( sal_False ); + pEntry->SetVisible( sal_True ); if (nStartnMax) nMax=nEnd; } } for ( i=nMin; i<=nMax; i++ ) if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden - pDoc->ShowRow( i, nTab, TRUE ); + pDoc->ShowRow( i, nTab, sal_True ); pDoc->UpdatePageBreaks( nTab ); rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP ); rDocShell.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); } @@ -537,9 +537,9 @@ BOOL ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, return bDone; } -BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi ) +sal_Bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -550,18 +550,18 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); if (pTable) { ScOutlineEntry* pEntry; - USHORT nColLevel; - USHORT nRowLevel; - USHORT nCount; + sal_uInt16 nColLevel; + sal_uInt16 nRowLevel; + sal_uInt16 nCount; SCCOLROW nStart; SCCOLROW nEnd; - USHORT i; + sal_uInt16 i; SCCOLROW nEffStartCol = nStartCol; SCCOLROW nEffEndCol = nEndCol; @@ -578,16 +578,16 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, { ScOutlineTable* pUndoTab = new ScOutlineTable( *pTable ); ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); pDoc->CopyToDocument( static_cast(nEffStartCol), 0, nTab, static_cast(nEffEndCol), MAXROW, nTab, IDF_NONE, - FALSE, pUndoDoc ); - pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, FALSE, pUndoDoc ); + sal_False, pUndoDoc ); + pDoc->CopyToDocument( 0, nEffStartRow, nTab, MAXCOL, nEffEndRow, nTab, IDF_NONE, sal_False, pUndoDoc ); rDocShell.GetUndoManager()->AddUndoAction( new ScUndoOutlineBlock( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, - pUndoDoc, pUndoTab, FALSE ) ); + pUndoDoc, pUndoTab, sal_False ) ); } // Spalten @@ -600,7 +600,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, nEnd = pEntry->GetEnd(); if ( static_cast(nStartCol)<=nEnd && static_cast(nEndCol)>=nStart ) - HideOutline( nTab, TRUE, nColLevel, i, FALSE, FALSE, bApi ); + HideOutline( nTab, sal_True, nColLevel, i, sal_False, sal_False, bApi ); } // Zeilen @@ -613,7 +613,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, nEnd = pEntry->GetEnd(); if ( nStartRow<=nEnd && nEndRow>=nStart ) - HideOutline( nTab, FALSE, nRowLevel, i, FALSE, FALSE, bApi ); + HideOutline( nTab, sal_False, nRowLevel, i, sal_False, sal_False, bApi ); } pDoc->UpdatePageBreaks( nTab ); @@ -621,7 +621,7 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP ); rDocShell.SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); } @@ -634,12 +634,12 @@ BOOL ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, //------------------------------------------------------------------------ -BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry, - BOOL bRecord, BOOL bPaint, BOOL /* bApi */ ) +sal_Bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ ) { ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); @@ -652,34 +652,34 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); if (bColumns) { - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); pDoc->CopyToDocument( static_cast(nStart), 0, nTab, - static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pUndoDoc ); } rDocShell.GetUndoManager()->AddUndoAction( new ScUndoDoOutline( &rDocShell, nStart, nEnd, nTab, pUndoDoc, //! start und end berechnen - bColumns, nLevel, nEntry, TRUE ) ); + bColumns, nLevel, nEntry, sal_True ) ); } //! HideCursor(); - pEntry->SetHidden(FALSE); + pEntry->SetHidden(sal_False); SCCOLROW i; for ( i = nStart; i <= nEnd; i++ ) { if ( bColumns ) - pDoc->ShowCol( static_cast(i), nTab, TRUE ); + pDoc->ShowCol( static_cast(i), nTab, sal_True ); else if ( !pDoc->RowFiltered( i,nTab ) ) // weggefilterte nicht einblenden - pDoc->ShowRow( i, nTab, TRUE ); + pDoc->ShowRow( i, nTab, sal_True ); } ScSubOutlineIterator aIter( pArray, nLevel, nEntry ); @@ -692,14 +692,14 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US for ( i = nSubStart; i <= nSubEnd; i++ ) { if ( bColumns ) - pDoc->ShowCol( static_cast(i), nTab, FALSE ); + pDoc->ShowCol( static_cast(i), nTab, sal_False ); else - pDoc->ShowRow( i, nTab, FALSE ); + pDoc->ShowRow( i, nTab, sal_False ); } } } - pArray->SetVisibleBelow( nLevel, nEntry, TRUE, TRUE ); + pArray->SetVisibleBelow( nLevel, nEntry, sal_True, sal_True ); pDoc->InvalidatePageBreaks(nTab); pDoc->UpdatePageBreaks( nTab ); @@ -715,15 +715,15 @@ BOOL ScOutlineDocFunc::ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - return TRUE; //! immer ??? + return sal_True; //! immer ??? } -BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry, - BOOL bRecord, BOOL bPaint, BOOL /* bApi */ ) +sal_Bool ScOutlineDocFunc::HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool /* bApi */ ) { ScDocument* pDoc = rDocShell.GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScOutlineTable* pTable = pDoc->GetOutlineTable( nTab ); ScOutlineArray* pArray = bColumns ? pTable->GetColArray() : pTable->GetRowArray(); @@ -736,36 +736,36 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); if (bColumns) { - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); pDoc->CopyToDocument( static_cast(nStart), 0, nTab, - static_cast(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pUndoDoc ); } rDocShell.GetUndoManager()->AddUndoAction( new ScUndoDoOutline( &rDocShell, nStart, nEnd, nTab, pUndoDoc, - bColumns, nLevel, nEntry, FALSE ) ); + bColumns, nLevel, nEntry, sal_False ) ); } //! HideCursor(); - pEntry->SetHidden(TRUE); + pEntry->SetHidden(sal_True); SCCOLROW i; for ( i = nStart; i <= nEnd; i++ ) { if ( bColumns ) - pDoc->ShowCol( static_cast(i), nTab, FALSE ); + pDoc->ShowCol( static_cast(i), nTab, sal_False ); else - pDoc->ShowRow( i, nTab, FALSE ); + pDoc->ShowRow( i, nTab, sal_False ); } - pArray->SetVisibleBelow( nLevel, nEntry, FALSE ); + pArray->SetVisibleBelow( nLevel, nEntry, sal_False ); pDoc->InvalidatePageBreaks(nTab); pDoc->UpdatePageBreaks( nTab ); @@ -781,7 +781,7 @@ BOOL ScOutlineDocFunc::HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, US lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - return TRUE; //! immer ??? + return sal_True; //! immer ??? } diff --git a/sc/source/ui/docshell/pagedata.cxx b/sc/source/ui/docshell/pagedata.cxx index db55c2364305..68076f04ce77 100644 --- a/sc/source/ui/docshell/pagedata.cxx +++ b/sc/source/ui/docshell/pagedata.cxx @@ -42,7 +42,7 @@ ScPrintRangeData::ScPrintRangeData() nPagesX = nPagesY = 0; pPageEndX = NULL; pPageEndY = NULL; - bTopDown = bAutomatic = TRUE; + bTopDown = bAutomatic = sal_True; nFirstPage = 1; } @@ -108,18 +108,18 @@ ScPrintRangeData& ScPageBreakData::GetData(size_t nPos) return pData[nPos]; } -BOOL ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const +sal_Bool ScPageBreakData::IsEqual( const ScPageBreakData& rOther ) const { if ( nUsed != rOther.nUsed ) - return FALSE; + return sal_False; - for (USHORT i=0; i 1 ) { long nPage = pData[0].GetFirstPage(); - for (USHORT i=0; sal::static_int_cast(i+1)(i+1)GetRangeName(); if (pNames) { - USHORT nPos; + sal_uInt16 nPos; if( pNames->SearchName( rName, nPos ) ) { ScRangeData* pData = (*pNames)[ nPos ]; if ( pData->IsValidReference( rRange ) ) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } ScServerObjectSvtListenerForwarder::ScServerObjectSvtListenerForwarder( @@ -82,7 +82,7 @@ void ScServerObjectSvtListenerForwarder::Notify( SvtBroadcaster& /* rBC */, cons ScServerObject::ScServerObject( ScDocShell* pShell, const String& rItem ) : aForwarder( this ), pDocSh( pShell ), - bRefreshListener( FALSE ) + bRefreshListener( sal_False ) { // parse item string @@ -144,12 +144,12 @@ void ScServerObject::EndListeningAll() SfxListener::EndListeningAll(); } -BOOL __EXPORT ScServerObject::GetData( +sal_Bool __EXPORT ScServerObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/, - const String & rMimeType, BOOL /* bSynchron */ ) + const String & rMimeType, sal_Bool /* bSynchron */ ) { if (!pDocSh) - return FALSE; + return sal_False; // named ranges may have changed -> update aRange if ( aItemStr.Len() ) @@ -158,7 +158,7 @@ BOOL __EXPORT ScServerObject::GetData( if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange ) { aRange = aNew; - bRefreshListener = TRUE; + bRefreshListener = sal_True; } } @@ -170,7 +170,7 @@ BOOL __EXPORT ScServerObject::GetData( pDocSh->GetDocument()->StartListeningArea( aRange, &aForwarder ); StartListening(*pDocSh); StartListening(*SFX_APP()); - bRefreshListener = FALSE; + bRefreshListener = sal_False; } String aDdeTextFmt = pDocSh->GetDdeTextFmt(); @@ -180,7 +180,7 @@ BOOL __EXPORT ScServerObject::GetData( { ScImportExport aObj( pDoc, aRange ); if( aDdeTextFmt.GetChar(0) == 'F' ) - aObj.SetFormulas( TRUE ); + aObj.SetFormulas( sal_True ); if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { @@ -210,7 +210,7 @@ BOOL __EXPORT ScServerObject::GetData( void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { - BOOL bDataChanged = FALSE; + sal_Bool bDataChanged = sal_False; // DocShell can't be tested via type info, because SFX_HINT_DYING comes from the dtor if ( &rBC == pDocSh ) @@ -231,7 +231,7 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint // check if named range was modified ScRange aNew; if ( lcl_FillRangeFromName( aNew, pDocSh, aItemStr ) && aNew != aRange ) - bDataChanged = TRUE; + bDataChanged = sal_True; } } else @@ -240,25 +240,25 @@ void __EXPORT ScServerObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint const ScHint* pScHint = PTR_CAST( ScHint, &rHint ); if( pScHint && (pScHint->GetId() & (SC_HINT_DATACHANGED | SC_HINT_DYING)) ) - bDataChanged = TRUE; + bDataChanged = sal_True; else if (rHint.ISA(ScAreaChangedHint)) // position of broadcaster changed { ScRange aNewRange = ((const ScAreaChangedHint&)rHint).GetRange(); if ( aRange != aNewRange ) { - bRefreshListener = TRUE; - bDataChanged = TRUE; + bRefreshListener = sal_True; + bDataChanged = sal_True; } } else if (rHint.ISA(SfxSimpleHint)) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if (nId == SFX_HINT_DYING) { // If the range is being deleted, listening must be restarted // after the deletion is complete (done in GetData) - bRefreshListener = TRUE; - bDataChanged = TRUE; + bRefreshListener = sal_True; + bDataChanged = sal_True; } } } diff --git a/sc/source/ui/docshell/sizedev.cxx b/sc/source/ui/docshell/sizedev.cxx index d89009540156..405437e5c18f 100644 --- a/sc/source/ui/docshell/sizedev.cxx +++ b/sc/source/ui/docshell/sizedev.cxx @@ -42,11 +42,11 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh ) { - BOOL bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); + sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg(); if ( bTextWysiwyg ) { pDevice = pDocSh->GetPrinter(); - bOwner = FALSE; + bOwner = sal_False; aOldMapMode = pDevice->GetMapMode(); pDevice->SetMapMode( MAP_PIXEL ); // GetNeededSize needs pixel MapMode @@ -56,7 +56,7 @@ ScSizeDeviceProvider::ScSizeDeviceProvider( ScDocShell* pDocSh ) { pDevice = new VirtualDevice; pDevice->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); - bOwner = TRUE; + bOwner = sal_True; } Point aLogic = pDevice->LogicToPixel( Point(1000,1000), MAP_TWIP ); diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 697b39052b9f..f794f3fb7e54 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -78,34 +78,34 @@ TYPEINIT1(ScTableLink, ::sfx2::SvBaseLink); ScTableLink::ScTableLink(ScDocShell* pDocSh, const String& rFile, const String& rFilter, const String& rOpt, - ULONG nRefresh ): + sal_uLong nRefresh ): ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), ScRefreshTimer( nRefresh ), pImpl( new TableLink_Impl ), aFileName(rFile), aFilterName(rFilter), aOptions(rOpt), - bInCreate( FALSE ), - bInEdit( FALSE ), - bAddUndo( TRUE ), - bDoPaint( TRUE ) + bInCreate( sal_False ), + bInEdit( sal_False ), + bAddUndo( sal_True ), + bDoPaint( sal_True ) { pImpl->m_pDocSh = pDocSh; } ScTableLink::ScTableLink(SfxObjectShell* pShell, const String& rFile, const String& rFilter, const String& rOpt, - ULONG nRefresh ): + sal_uLong nRefresh ): ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), ScRefreshTimer( nRefresh ), pImpl( new TableLink_Impl ), aFileName(rFile), aFilterName(rFilter), aOptions(rOpt), - bInCreate( FALSE ), - bInEdit( FALSE ), - bAddUndo( TRUE ), - bDoPaint( TRUE ) + bInCreate( sal_False ), + bInEdit( sal_False ), + bAddUndo( sal_True ), + bDoPaint( sal_True ) { pImpl->m_pDocSh = static_cast< ScDocShell* >( pShell ); SetRefreshHandler( LINK( this, ScTableLink, RefreshHdl ) ); @@ -136,7 +136,7 @@ void __EXPORT ScTableLink::Edit( Window* pParent, const Link& rEndEditHdl ) if (pParent) Application::SetDefDialogParent(pParent); - bInEdit = TRUE; + bInEdit = sal_True; SvBaseLink::Edit( pParent, LINK( this, ScTableLink, TableEndEditHdl ) ); } @@ -163,14 +163,14 @@ void __EXPORT ScTableLink::Closed() { // Verknuepfung loeschen: Undo ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); if (bAddUndo && bUndo) { pImpl->m_pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveLink( pImpl->m_pDocSh, aFileName ) ); - bAddUndo = FALSE; // nur einmal + bAddUndo = sal_False; // nur einmal } // Verbindung wird im dtor aufgehoben @@ -178,30 +178,30 @@ void __EXPORT ScTableLink::Closed() SvBaseLink::Closed(); } -BOOL ScTableLink::IsUsed() const +sal_Bool ScTableLink::IsUsed() const { return pImpl->m_pDocSh->GetDocument()->HasLink( aFileName, aFilterName, aOptions ); } -BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, - const String* pNewOptions, ULONG nNewRefresh ) +sal_Bool ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, + const String* pNewOptions, sal_uLong nNewRefresh ) { // Dokument laden if (!rNewFile.Len() || !rNewFilter.Len()) - return FALSE; + return sal_False; String aNewUrl( ScGlobal::GetAbsDocName( rNewFile, pImpl->m_pDocSh ) ); - BOOL bNewUrlName = (aNewUrl != aFileName); + sal_Bool bNewUrlName = (aNewUrl != aFileName); const SfxFilter* pFilter = pImpl->m_pDocSh->GetFactory().GetFilterContainer()->GetFilter4FilterName(rNewFilter); if (!pFilter) - return FALSE; + return sal_False; ScDocument* pDoc = pImpl->m_pDocSh->GetDocument(); - pDoc->SetInLinkUpdate( TRUE ); + pDoc->SetInLinkUpdate( sal_True ); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); // wenn neuer Filter ausgewaehlt wurde, Optionen vergessen if ( rNewFilter != aFilterName ) @@ -214,10 +214,10 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, if ( aOptions.Len() ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); - SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, FALSE, pFilter, pSet); + SfxMedium* pMed = new SfxMedium(aNewUrl, STREAM_STD_READ, sal_False, pFilter, pSet); if ( bInEdit ) // only if using the edit dialog, - pMed->UseInteractionHandler( TRUE ); // enable the filter options dialog + pMed->UseInteractionHandler( sal_True ); // enable the filter options dialog ScDocShell* pSrcShell = new ScDocShell(SFX_CREATE_MODE_INTERNAL); SfxObjectShellRef aRef = pSrcShell; @@ -231,7 +231,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, // Undo... ScDocument* pUndoDoc = NULL; - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; if (bAddUndo && bUndo) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -239,18 +239,18 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, ScDocShellModificator aModificator( *pImpl->m_pDocSh ); - BOOL bNotFound = FALSE; + sal_Bool bNotFound = sal_False; ScDocument* pSrcDoc = pSrcShell->GetDocument(); // #74835# from text filters that don't set the table name, // use the one table regardless of link table name - BOOL bAutoTab = (pSrcDoc->GetTableCount() == 1) && + sal_Bool bAutoTab = (pSrcDoc->GetTableCount() == 1) && ScDocShell::HasAutomaticTableName( rNewFilter ); SCTAB nCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTabGetLinkMode(nTab); + sal_uInt8 nMode = pDoc->GetLinkMode(nTab); if (nMode && pDoc->GetLinkDoc(nTab)==aFileName) { String aTabName = pDoc->GetLinkTab(nTab); @@ -260,12 +260,12 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, if (bAddUndo && bUndo) { if (bFirst) - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); else - pUndoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE ); - bFirst = FALSE; + pUndoDoc->AddUndoTab( nTab, nTab, sal_True, sal_True ); + bFirst = sal_False; ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab); - pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pUndoDoc); + pDoc->CopyToDocument(aRange, IDF_ALL, sal_False, pUndoDoc); pUndoDoc->TransferDrawPage( pDoc, nTab, nTab ); pUndoDoc->SetLink( nTab, nMode, aFileName, aFilterName, aOptions, aTabName, GetRefreshDelay() ); @@ -282,7 +282,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, { pDoc->RenameTab( nTab, ScGlobal::GetDocTabName( aNewUrl, aTabName ), - FALSE, TRUE ); // kein RefUpdate, kein ValidTabName + sal_False, sal_True ); // kein RefUpdate, kein ValidTabName } } @@ -303,7 +303,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, } if (bFound) - pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, FALSE, // nicht neu einfuegen + pDoc->TransferTab( pSrcDoc, nSrcTab, nTab, sal_False, // nicht neu einfuegen (nMode == SC_LINK_VALUE) ); // nur Werte? else { @@ -340,7 +340,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, pCell = aCellIter.GetNext(); } - ULONG nRanges = aErrorCells.Count(); + sal_uLong nRanges = aErrorCells.Count(); if ( nRanges ) // found any? { ScTokenArray aTokenArr; @@ -349,7 +349,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, aTokenArr.AddOpCode( ocClose ); aTokenArr.AddOpCode( ocStop ); - for (ULONG nPos=0; nPosaStart.Col(); @@ -381,7 +381,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, pDoc->SetString( 1,2,nTab, aTabName ); } - bNotFound = TRUE; + bNotFound = sal_True; } if ( bNewUrlName || rNewFilter != aFilterName || @@ -426,7 +426,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, //! Fehler ausgeben ? } - pDoc->SetInLinkUpdate( FALSE ); + pDoc->SetInLinkUpdate( sal_False ); // notify Uno objects (for XRefreshListener) //! also notify Uno objects if file name was changed! @@ -434,7 +434,7 @@ BOOL ScTableLink::Refresh(const String& rNewFile, const String& rNewFilter, aHint.SetSheetLink( aFileName ); pDoc->BroadcastUno( aHint ); - return TRUE; + return sal_True; } IMPL_LINK( ScTableLink, RefreshHdl, ScTableLink*, EMPTYARG ) @@ -447,7 +447,7 @@ IMPL_LINK( ScTableLink, TableEndEditHdl, ::sfx2::SvBaseLink*, pLink ) { if ( pImpl->m_aEndEditLink.IsSet() ) pImpl->m_aEndEditLink.Call( pLink ); - bInEdit = FALSE; + bInEdit = sal_False; Application::SetDefDialogParent( pImpl->m_pOldParent ); return 0; } @@ -458,15 +458,15 @@ String ScDocumentLoader::GetOptions( SfxMedium& rMedium ) // static { SfxItemSet* pSet = rMedium.GetItemSet(); const SfxPoolItem* pItem; - if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) ) + if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) ) return ((const SfxStringItem*)pItem)->GetValue(); return EMPTY_STRING; } -BOOL ScDocumentLoader::GetFilterName( const String& rFileName, +sal_Bool ScDocumentLoader::GetFilterName( const String& rFileName, String& rFilter, String& rOptions, - BOOL bWithContent, BOOL bWithInteraction ) // static + sal_Bool bWithContent, sal_Bool bWithInteraction ) // static { TypeId aScType = TYPE(ScDocShell); SfxObjectShell* pDocSh = SfxObjectShell::GetFirst( &aScType ); @@ -479,7 +479,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName, { rFilter = pMed->GetFilter()->GetFilterName(); rOptions = GetOptions(*pMed); - return TRUE; + return sal_True; } } pDocSh = SfxObjectShell::GetNext( *pDocSh, &aScType ); @@ -488,16 +488,16 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName, INetURLObject aUrl( rFileName ); INetProtocol eProt = aUrl.GetProtocol(); if ( eProt == INET_PROT_NOT_VALID ) // invalid URL? - return FALSE; // abort without creating a medium + return sal_False; // abort without creating a medium // Filter-Detection const SfxFilter* pSfxFilter = NULL; - SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE ); + SfxMedium* pMedium = new SfxMedium( rFileName, STREAM_STD_READ, sal_False ); if ( pMedium->GetError() == ERRCODE_NONE ) { if ( bWithInteraction ) - pMedium->UseInteractionHandler(TRUE); // #i73992# no longer called from GuessFilter + pMedium->UseInteractionHandler(sal_True); // #i73992# no longer called from GuessFilter SfxFilterMatcher aMatcher( String::CreateFromAscii("scalc") ); if( bWithContent ) @@ -506,7 +506,7 @@ BOOL ScDocumentLoader::GetFilterName( const String& rFileName, aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter ); } - BOOL bOK = FALSE; + sal_Bool bOK = sal_False; if ( pMedium->GetError() == ERRCODE_NONE ) { if ( pSfxFilter ) @@ -531,12 +531,12 @@ void ScDocumentLoader::RemoveAppPrefix( String& rFilterName ) // static ScDocumentLoader::ScDocumentLoader( const String& rFileName, String& rFilterName, String& rOptions, - UINT32 nRekCnt, BOOL bWithInteraction ) : + sal_uInt32 nRekCnt, sal_Bool bWithInteraction ) : pDocShell(0), pMedium(0) { if ( !rFilterName.Len() ) - GetFilterName( rFileName, rFilterName, rOptions, TRUE, bWithInteraction ); + GetFilterName( rFileName, rFilterName, rOptions, sal_True, bWithInteraction ); const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( rFilterName ); @@ -545,12 +545,12 @@ ScDocumentLoader::ScDocumentLoader( const String& rFileName, if ( rOptions.Len() ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, rOptions ) ); - pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE, pFilter, pSet ); + pMedium = new SfxMedium( rFileName, STREAM_STD_READ, sal_False, pFilter, pSet ); if ( pMedium->GetError() != ERRCODE_NONE ) return ; if ( bWithInteraction ) - pMedium->UseInteractionHandler( TRUE ); // to enable the filter options dialog + pMedium->UseInteractionHandler( sal_True ); // to enable the filter options dialog pDocShell = new ScDocShell( SFX_CREATE_MODE_INTERNAL ); aRef = pDocShell; @@ -603,12 +603,12 @@ ScDocument* ScDocumentLoader::GetDocument() return pDocShell ? pDocShell->GetDocument() : 0; } -BOOL ScDocumentLoader::IsError() const +sal_Bool ScDocumentLoader::IsError() const { if ( pDocShell && pMedium ) return pMedium->GetError() != ERRCODE_NONE; else - return TRUE; + return sal_True; } String ScDocumentLoader::GetTitle() const diff --git a/sc/source/ui/docshell/tpstat.cxx b/sc/source/ui/docshell/tpstat.cxx index 1072af30c7a1..396522fb0121 100644 --- a/sc/source/ui/docshell/tpstat.cxx +++ b/sc/source/ui/docshell/tpstat.cxx @@ -85,9 +85,9 @@ __EXPORT ScDocStatPage::~ScDocStatPage() //------------------------------------------------------------------------ -BOOL __EXPORT ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ ) +sal_Bool __EXPORT ScDocStatPage::FillItemSet( SfxItemSet& /* rSet */ ) { - return FALSE; + return sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index e2f70432d679..6e621d1dec55 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -92,7 +92,7 @@ SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) ) void ScDrawShell::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -113,14 +113,14 @@ void lcl_setModified( SfxObjectShell* pShell ) void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); Window* pWin = pViewData->GetActiveWin(); // SfxViewFrame* pViewFrame = SfxViewShell::Current()->GetViewFrame(); //!!! koennte knallen ScDrawView* pView = pViewData->GetScDrawView(); SdrModel* pDoc = pViewData->GetDocument()->GetDrawLayer(); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); SdrObject* pSingleSelectedObj = NULL; if ( nMarkCount > 0 ) pSingleSelectedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); @@ -137,7 +137,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) case SID_TEXT_STANDARD: // Harte Textattributierung loeschen { SfxItemSet aEmptyAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END); - pView->SetAttributes(aEmptyAttr, TRUE); + pView->SetAttributes(aEmptyAttr, sal_True); } break; @@ -189,9 +189,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) } if( pView->AreObjectsMarked() ) - pView->SetAttrToMarked( *rReq.GetArgs(), FALSE ); + pView->SetAttrToMarked( *rReq.GetArgs(), sal_False ); else - pView->SetDefaultAttr( *rReq.GetArgs(), FALSE); + pView->SetDefaultAttr( *rReq.GetArgs(), sal_False); pView->InvalidateAttribs(); } break; @@ -265,7 +265,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) { SfxAbstractTabDialog *pDlg = pFact->CreateCaptionDialog( pWin, pView ); - const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); + const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); aCombSet.Put( aNewAttr ); aCombSet.Put( aNewGeoAttr ); @@ -316,7 +316,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, TRUE ); + ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ); if ( pInfo->GetMacro().getLength() > 0 ) { SvxMacroTableDtor aTab; @@ -343,7 +343,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) { const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet(); const SfxPoolItem* pItem; - if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem )) + if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, sal_False, &pItem )) { rtl::OUString sMacro; SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT ); @@ -353,10 +353,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) if ( pObj->IsGroupObject() ) { SdrObjList* pOL = pObj->GetSubList(); - ULONG nObj = pOL->GetObjCount(); - for ( ULONG index=0; indexGetObjCount(); + for ( sal_uLong index=0; indexGetObj(index), TRUE ); + pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), sal_True ); pInfo->SetMacro( sMacro ); } } @@ -370,10 +370,10 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) delete pItemSet; } -void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage ) +void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) { ScDrawView* pView = pViewData->GetScDrawView(); - BOOL bHasMarked = pView->AreObjectsMarked(); + sal_Bool bHasMarked = pView->AreObjectsMarked(); const SdrObject* pObj = NULL; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); @@ -382,7 +382,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage ) SfxItemSet aNewAttr( pView->GetDefaultAttr() ); if( bHasMarked ) - pView->MergeAttrFromMarked( aNewAttr, FALSE ); + pView->MergeAttrFromMarked( aNewAttr, sal_False ); //CHINA001 SvxLineTabDialog* pDlg //CHINA001 = new SvxLineTabDialog( pViewData->GetDialogParent(), @@ -404,9 +404,9 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage ) if ( pDlg->Execute() == RET_OK ) { if( bHasMarked ) - pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), sal_False ); else - pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), sal_False ); pView->InvalidateAttribs(); rReq.Done(); @@ -415,14 +415,14 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage ) delete pDlg; } -void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage ) +void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) { ScDrawView* pView = pViewData->GetScDrawView(); - BOOL bHasMarked = pView->AreObjectsMarked(); + sal_Bool bHasMarked = pView->AreObjectsMarked(); SfxItemSet aNewAttr( pView->GetDefaultAttr() ); if( bHasMarked ) - pView->MergeAttrFromMarked( aNewAttr, FALSE ); + pView->MergeAttrFromMarked( aNewAttr, sal_False ); //CHINA001 SvxAreaTabDialog* pDlg //CHINA001 = new SvxAreaTabDialog( pViewData->GetDialogParent(), @@ -451,9 +451,9 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage ) if ( pDlg->Execute() == RET_OK ) { if( bHasMarked ) - pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetAttrToMarked( *pDlg->GetOutputItemSet(), sal_False ); else - pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), sal_False ); pView->InvalidateAttribs(); rReq.Done(); @@ -462,26 +462,26 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage ) delete pDlg; } -void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, USHORT /* nTabPage */ ) +void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 /* nTabPage */ ) { ScDrawView* pView = pViewData->GetScDrawView(); - BOOL bHasMarked = pView->AreObjectsMarked(); + sal_Bool bHasMarked = pView->AreObjectsMarked(); SfxItemSet aNewAttr ( pView->GetDefaultAttr() ); if( bHasMarked ) - pView->MergeAttrFromMarked( aNewAttr, FALSE ); + pView->MergeAttrFromMarked( aNewAttr, sal_False ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView ); - USHORT nResult = pDlg->Execute(); + sal_uInt16 nResult = pDlg->Execute(); if ( RET_OK == nResult ) { if ( bHasMarked ) pView->SetAttributes( *pDlg->GetOutputItemSet() ); else - pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), FALSE ); + pView->SetDefaultAttr( *pDlg->GetOutputItemSet(), sal_False ); pView->InvalidateAttribs(); rReq.Done(); @@ -494,7 +494,7 @@ void ScDrawShell::SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk { if ( pObj ) { - ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE ); + ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ); pInfo->SetHlink( rHlnk ); lcl_setModified( GetObjectShell() ); } diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 7da571fc05a7..4aeffad840fe 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -57,7 +57,7 @@ #include #include -USHORT ScGetFontWorkId(); // in drtxtob +sal_uInt16 ScGetFontWorkId(); // in drtxtob using namespace com::sun::star; @@ -91,14 +91,14 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles rSet.Put( SfxBoolItem( SID_OBJECT_MIRROR, eMode == SDRDRAG_MIRROR ) ); rSet.Put( SfxBoolItem( SID_BEZIER_EDIT, !pView->IsFrameDragSingles() ) ); - USHORT nFWId = ScGetFontWorkId(); + sal_uInt16 nFWId = ScGetFontWorkId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); rSet.Put(SfxBoolItem(SID_FONTWORK, pViewFrm->HasChildWindow(nFWId))); // Notes always default to Page anchor. bool bDisableAnchor = false; const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if ( nMarkCount == 1 ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); @@ -115,18 +115,18 @@ void ScDrawShell::GetState( SfxItemSet& rSet ) // Zustaende / Toggles switch( pView->GetAnchor() ) { case SCA_PAGE: - rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, TRUE ) ); - rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, sal_True ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, sal_False ) ); break; case SCA_CELL: - rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) ); - rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, TRUE ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, sal_False ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, sal_True ) ); break; default: - rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, FALSE ) ); - rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, FALSE ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_PAGE, sal_False ) ); + rSet.Put( SfxBoolItem( SID_ANCHOR_CELL, sal_False ) ); break; } } @@ -138,14 +138,14 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl // #111711# call IsMirrorAllowed first to make sure ForcePossibilities (and thus CheckMarked) // is called before GetMarkCount, so the nMarkCount value is valid for the rest of this method. - if (!pView->IsMirrorAllowed(TRUE,TRUE)) + if (!pView->IsMirrorAllowed(sal_True,sal_True)) { rSet.DisableItem( SID_MIRROR_HORIZONTAL ); rSet.DisableItem( SID_MIRROR_VERTICAL ); } const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if ( nMarkCount <= 1 || !pView->IsGroupPossible() ) rSet.DisableItem( SID_GROUP ); @@ -194,7 +194,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl } } - BOOL bCanRename = FALSE; + sal_Bool bCanRename = sal_False; if ( nMarkCount > 1 ) { #ifdef ISSUE66550_HLINK_FOR_SHAPES @@ -217,10 +217,10 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl #endif SdrLayerID nLayerID = pObj->GetLayer(); if ( nLayerID != SC_LAYER_INTERN ) - bCanRename = TRUE; // #i51351# anything except internal objects can be renamed + bCanRename = sal_True; // #i51351# anything except internal objects can be renamed // #91929#; don't show original size entry if not possible - UINT16 nObjType = pObj->GetObjIdentifier(); + sal_uInt16 nObjType = pObj->GetObjIdentifier(); if ( nObjType == OBJ_OLE2 ) { SdrOle2Obj* pOleObj = static_cast(rMarkList.GetMark( 0 )->GetMarkedSdrObj()); @@ -273,7 +273,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl pView->GetAttributes( aAttrs ); if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) { - BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); + sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); } } @@ -292,17 +292,17 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) Window* pWindow = pViewData->GetActiveWin(); ScDrawView* pDrView = pViewData->GetScDrawView(); Point aPos = pWindow->PixelToLogic(aMousePos); - BOOL bHasMarked = pDrView->AreObjectsMarked(); + sal_Bool bHasMarked = pDrView->AreObjectsMarked(); if( bHasMarked ) { - rSet.Put( pDrView->GetAttrFromMarked(FALSE) ); + rSet.Put( pDrView->GetAttrFromMarked(sal_False) ); // Wenn die View selektierte Objekte besitzt, muessen entspr. Items // von SFX_ITEM_DEFAULT (_ON) auf SFX_ITEM_DISABLED geaendert werden SfxWhichIter aIter( rSet, XATTR_LINE_FIRST, XATTR_FILL_LAST ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { if( SFX_ITEM_DEFAULT == rSet.GetItemState( nWhich ) ) @@ -325,7 +325,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) // #i34458# The SvxSizeItem in SID_TABLE_CELL is no longer needed by // SvxPosSizeStatusBarControl, it's enough to have it in SID_ATTR_SIZE. - BOOL bActionItem = FALSE; + sal_Bool bActionItem = sal_False; if ( pDrView->IsAction() ) // action rectangle { Rectangle aRect; @@ -336,7 +336,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet ) rSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) ); Size aSize( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ); rSet.Put( SvxSizeItem( SID_ATTR_SIZE, aSize ) ); - bActionItem = TRUE; + bActionItem = sal_True; } } if ( !bActionItem ) @@ -365,7 +365,7 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet) // Dialoge fuer Draw-Attribute disablen, wenn noetig ScDrawView* pDrView = pViewData->GetScDrawView(); - SfxItemSet aViewSet = pDrView->GetAttrFromMarked(FALSE); + SfxItemSet aViewSet = pDrView->GetAttrFromMarked(sal_False); if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SFX_ITEM_DEFAULT ) { @@ -377,18 +377,18 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet) rSet.DisableItem( SID_ATTRIBUTES_AREA ); } -BOOL ScDrawShell::AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark) +sal_Bool ScDrawShell::AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark) { - BOOL bResult=TRUE; - ULONG nCount = rMark.GetMarkCount(); - for (ULONG i=0; iGetMarkedSdrObj(); if ( !pObj->ISA(SdrUnoObj) ) { if(nLayerNo!=pObj->GetLayer()) { - bResult=FALSE; + bResult=sal_False; break; } } diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx index 45b26584f29a..0b6e790ea9a4 100644 --- a/sc/source/ui/drawfunc/drawsh4.cxx +++ b/sc/source/ui/drawfunc/drawsh4.cxx @@ -55,7 +55,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet) SvxFontWorkDialog* pDlg = NULL; ScDrawView* pDrView = pViewData->GetScDrawView(); const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); - USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if ( pViewFrm->HasChildWindow(nId) ) @@ -68,7 +68,7 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet) !((SdrTextObj*) pObj)->HasText() ) { if ( pDlg ) - pDlg->SetActive(FALSE); + pDlg->SetActive(sal_False); rSet.DisableItem(XATTR_FORMTXTSTYLE); rSet.DisableItem(XATTR_FORMTXTADJUST); diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index e79097ef8874..3130e39b79f1 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -83,7 +83,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink { ScDrawView* pView = pViewData->GetScDrawView(); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); // Hyperlink @@ -163,14 +163,14 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_HYPERLINK_SETLINK: if( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET ) { const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem; const String& rName = pHyper->GetName(); @@ -178,7 +178,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) const String& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( eMode == HLINK_FIELD || eMode == HLINK_BUTTON ) { ScDrawView* pView = pViewData->GetScDrawView(); @@ -239,14 +239,14 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) //! Undo ??? pViewData->GetDocShell()->SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; } } #ifdef ISSUE66550_HLINK_FOR_SHAPES else { SetHlinkForObject( pObj, rURL ); - bDone = TRUE; + bDone = sal_True; } #endif } @@ -254,7 +254,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) if (!bDone) pViewData->GetViewShell()-> - InsertURL( rName, rURL, rTarget, (USHORT) eMode ); + InsertURL( rName, rURL, rTarget, (sal_uInt16) eMode ); // InsertURL an der ViewShell schaltet bei "Text" die DrawShell ab !!! } @@ -265,7 +265,7 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) } } -USHORT ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2 +sal_uInt16 ScGetFontWorkId(); // wegen CLOOKs - in drtxtob2 //------------------------------------------------------------------ @@ -279,7 +279,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) ScTabView* pTabView = pViewData->GetView(); ScDrawView* pView = pTabView->GetScDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); //!!! // wer weiss, wie lange das funktioniert? (->vom Abreisscontrol funktioniert es) @@ -300,7 +300,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) rBindings.Invalidate(SID_OBJECT_HELL); // leave draw shell if nothing selected (layer may be locked) if ( pView->GetMarkedObjectList().GetMarkCount() == 0 ) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_FRAME_TO_TOP: @@ -371,13 +371,13 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) case SID_DELETE_CONTENTS: pView->DeleteMarked(); if (!pTabView->IsDrawSelMode()) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_CUT: pView->DoCut(); if (!pTabView->IsDrawSelMode()) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_COPY: @@ -433,7 +433,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) rBindings.Invalidate( SID_OBJECT_MIRROR ); if (eMode == SDRDRAG_ROTATE && !pView->IsFrameDragSingles()) { - pView->SetFrameDragSingles( TRUE ); + pView->SetFrameDragSingles( sal_True ); rBindings.Invalidate( SID_BEZIER_EDIT ); } } @@ -450,14 +450,14 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) rBindings.Invalidate( SID_OBJECT_MIRROR ); if (eMode == SDRDRAG_MIRROR && !pView->IsFrameDragSingles()) { - pView->SetFrameDragSingles( TRUE ); + pView->SetFrameDragSingles( sal_True ); rBindings.Invalidate( SID_BEZIER_EDIT ); } } break; case SID_BEZIER_EDIT: { - BOOL bOld = pView->IsFrameDragSingles(); + sal_Bool bOld = pView->IsFrameDragSingles(); pView->SetFrameDragSingles( !bOld ); rBindings.Invalidate( SID_BEZIER_EDIT ); if (bOld && pView->GetDragMode() != SDRDRAG_MOVE) @@ -471,7 +471,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) case SID_FONTWORK: { - USHORT nId = ScGetFontWorkId(); + sal_uInt16 nId = ScGetFontWorkId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if ( rReq.GetArgs() ) @@ -493,11 +493,11 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) case SID_ENABLE_HYPHENATION: { - SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, FALSE); + SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, sal_False); if( pItem ) { SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); - BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue(); + sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue(); aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) ); pView->SetAttributes( aSet ); } @@ -565,7 +565,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) } // ChartListenerCollectionNeedsUpdate is needed for Navigator update - pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE ); + pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True ); pDocSh->SetDrawModified(); } @@ -604,7 +604,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) pSelected->SetDescription(aDescription); // ChartListenerCollectionNeedsUpdate is needed for Navigator update - pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( TRUE ); + pDocSh->GetDocument()->SetChartListenerCollectionNeedsUpdate( sal_True ); pDocSh->SetDrawModified(); } @@ -690,12 +690,12 @@ void ScDrawShell::ExecFormText(SfxRequest& rReq) pDrView->ScEndTextEdit(); if ( SFX_ITEM_SET == - rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) + rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) && XFTFORM_NONE != ((const XFormTextStdFormItem*) pItem)->GetValue() ) { - USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*) (pViewFrm-> @@ -723,7 +723,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) } else { - BOOL bLock = FALSE; + sal_Bool bLock = sal_False; const SfxItemSet *pArgs = rReq.GetArgs(); if( pArgs && pArgs->Count() >= 1 ) bLock = static_cast(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue(); @@ -731,7 +731,7 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) ScDrawView* pDrawView = pViewData->GetScDrawView(); if ( pDrawView && pDrawView->AreObjectsMarked() ) { - BOOL bOnlyHardAttr = TRUE; + sal_Bool bOnlyHardAttr = sal_True; SfxItemSet* pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) ); pView->SetDrawBrushSet( pItemSet, bLock ); } @@ -741,8 +741,8 @@ void ScDrawShell::ExecFormatPaintbrush( SfxRequest& rReq ) void ScDrawShell::StateFormatPaintbrush( SfxItemSet& rSet ) { ScDrawView* pDrawView = pViewData->GetScDrawView(); - BOOL bSelection = pDrawView && pDrawView->AreObjectsMarked(); - BOOL bHasPaintBrush = pViewData->GetView()->HasPaintBrush(); + sal_Bool bSelection = pDrawView && pDrawView->AreObjectsMarked(); + sal_Bool bHasPaintBrush = pViewData->GetView()->HasPaintBrush(); if ( !bHasPaintBrush && !bSelection ) rSet.DisableItem( SID_FORMATPAINTBRUSH ); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index a5159d8a8043..68d8557039af 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -109,7 +109,7 @@ TYPEINIT1( ScDrawTextObjectBar, SfxShell ); void ScDrawTextObjectBar::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -122,7 +122,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) : SfxShell(pData->GetViewShell()), pViewData(pData), pClipEvtLstnr(NULL), - bPastePossible(FALSE) + bPastePossible(sal_False) { SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() ); @@ -142,7 +142,7 @@ __EXPORT ScDrawTextObjectBar::~ScDrawTextObjectBar() { if ( pClipEvtLstnr ) { - pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), FALSE ); + pClipEvtLstnr->AddRemoveListener( pViewData->GetActiveWin(), sal_False ); // #122057# The listener may just now be waiting for the SolarMutex and call the link // afterwards, in spite of RemoveListener. So the link has to be reset, too. @@ -171,7 +171,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) } const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_COPY: @@ -188,10 +188,10 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) case SID_CLIPBOARD_FORMAT_ITEMS: { - ULONG nFormat = 0; + sal_uLong nFormat = 0; const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET && + pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET && pItem->ISA(SfxUInt32Item) ) { nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); @@ -213,8 +213,8 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) case SID_SELECTALL: { - ULONG nCount = pOutliner->GetParagraphCount(); - ESelection aSel( 0,0,(USHORT)nCount,0 ); + sal_uLong nCount = pOutliner->GetParagraphCount(); + ESelection aSel( 0,0,(sal_uInt16)nCount,0 ); pOutView->SetSelection( aSel ); } break; @@ -230,13 +230,13 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem); + pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem); if ( pItem ) { aString = ((const SfxStringItem*)pItem)->GetValue(); const SfxPoolItem* pFtItem = NULL; - pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem); + pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem); const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem ); if ( pFontItem ) { @@ -269,7 +269,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) if( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_HYPERLINK_SETLINK, sal_True, &pItem ) == SFX_ITEM_SET ) { const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem; const String& rName = pHyper->GetName(); @@ -277,7 +277,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) const String& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pOutView && ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) ) { const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection(); @@ -314,7 +314,7 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) pOutView->SetSelection( aSel ); } - bDone = TRUE; + bDone = sal_True; } if (!bDone) @@ -396,13 +396,13 @@ void __EXPORT ScDrawTextObjectBar::Execute( SfxRequest &rReq ) void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) { SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); - BOOL bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK); - BOOL bDisableFontWork = FALSE; + sal_Bool bHasFontWork = pViewFrm->HasChildWindow(SID_FONTWORK); + sal_Bool bDisableFontWork = sal_False; if (IsNoteEdit()) { // #i21255# notes now support rich text formatting (#i74140# but not fontwork) - bDisableFontWork = TRUE; + bDisableFontWork = sal_True; } if ( bDisableFontWork ) @@ -417,7 +417,7 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) OutlinerView* pOutView = pView->GetTextEditOutlinerView(); if ( pOutView ) { - BOOL bField = FALSE; + sal_Bool bField = sal_False; const SvxFieldItem* pFieldItem = pOutView->GetFieldAtSelection(); if (pFieldItem) { @@ -428,7 +428,7 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) aHLinkItem.SetName( pURLField->GetRepresentation() ); aHLinkItem.SetURL( pURLField->GetURL() ); aHLinkItem.SetTargetFrame( pURLField->GetTargetFrame() ); - bField = TRUE; + bField = sal_True; } } if (!bField) @@ -477,7 +477,7 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) pView->GetAttributes( aAttrs ); if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE ) { - BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); + sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue(); rSet.Put( SfxBoolItem( SID_ENABLE_HYPHENATION, bValue ) ); } } @@ -499,7 +499,7 @@ void __EXPORT ScDrawTextObjectBar::GetState( SfxItemSet& rSet ) rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); // disable thesaurus main menu and context menu entry if there is nothing to look up - BOOL bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); + sal_Bool bCanDoThesaurus = ScModule::HasThesaurusLanguage( nLang ); if (!bIsLookUpWord || !bCanDoThesaurus) rSet.DisableItem( SID_THES ); if (!bCanDoThesaurus) @@ -536,7 +536,7 @@ void __EXPORT ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet ) pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScDrawTextObjectBar, ClipboardChanged ) ); pClipEvtLstnr->acquire(); Window* pWin = pViewData->GetActiveWin(); - pClipEvtLstnr->AddRemoveListener( pWin, TRUE ); + pClipEvtLstnr->AddRemoveListener( pWin, sal_True ); // get initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); @@ -544,7 +544,7 @@ void __EXPORT ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet ) } SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) @@ -588,7 +588,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq ) SdrView* pView = pViewData->GetScDrawView(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SfxItemSet aSet( pView->GetDefaultAttr() ); @@ -635,41 +635,41 @@ void lcl_RemoveFields( OutlinerView& rOutView ) aSel.Adjust(); xub_StrLen nNewEnd = aSel.nEndPos; - BOOL bUpdate = pOutliner->GetUpdateMode(); - BOOL bChanged = FALSE; + sal_Bool bUpdate = pOutliner->GetUpdateMode(); + sal_Bool bChanged = sal_False; //! GetPortions and GetAttribs should be const! EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine(); - ULONG nParCount = pOutliner->GetParagraphCount(); - for (ULONG nPar=0; nParGetParagraphCount(); + for (sal_uLong nPar=0; nPar= aSel.nStartPara && nPar <= aSel.nEndPara ) { SvUShorts aPortions; - rEditEng.GetPortions( (USHORT)nPar, aPortions ); + rEditEng.GetPortions( (sal_uInt16)nPar, aPortions ); //! GetPortions should use xub_StrLen instead of USHORT - for ( USHORT nPos = aPortions.Count(); nPos; ) + for ( sal_uInt16 nPos = aPortions.Count(); nPos; ) { --nPos; - USHORT nEnd = aPortions.GetObject( nPos ); - USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0; + sal_uInt16 nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0; // fields are single characters if ( nEnd == nStart+1 && ( nPar > aSel.nStartPara || nStart >= aSel.nStartPos ) && ( nPar < aSel.nEndPara || nEnd <= aSel.nEndPos ) ) { - ESelection aFieldSel( (USHORT)nPar, nStart, (USHORT)nPar, nEnd ); + ESelection aFieldSel( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd ); SfxItemSet aSet = rEditEng.GetAttribs( aFieldSel ); if ( aSet.GetItemState( EE_FEATURE_FIELD ) == SFX_ITEM_ON ) { if (!bChanged) { if (bUpdate) - pOutliner->SetUpdateMode( FALSE ); + pOutliner->SetUpdateMode( sal_False ); String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); pOutliner->GetUndoManager().EnterListAction( aName, aName ); - bChanged = TRUE; + bChanged = sal_True; } String aFieldText = rEditEng.GetText( aFieldSel ); @@ -687,7 +687,7 @@ void lcl_RemoveFields( OutlinerView& rOutView ) if (bUpdate && bChanged) { pOutliner->GetUndoManager().LeaveListAction(); - pOutliner->SetUpdateMode( TRUE ); + pOutliner->SetUpdateMode( sal_True ); } if ( aOldSel.IsEqual( aSel ) ) // aSel is adjusted @@ -701,15 +701,15 @@ void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) { SdrView* pView = pViewData->GetScDrawView(); const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); - BOOL bArgsInReq = ( pArgs != NULL ); + sal_Bool bArgsInReq = ( pArgs != NULL ); if ( !bArgsInReq ) { SfxItemSet aEditAttr(pView->GetModel()->GetItemPool()); pView->GetAttributes(aEditAttr); SfxItemSet aNewAttr( *aEditAttr.GetPool(), aEditAttr.GetRanges() ); - BOOL bDone = TRUE; + sal_Bool bDone = sal_True; switch ( nSlot ) { @@ -721,7 +721,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) pOutView->Paint( Rectangle() ); SfxItemSet aEmptyAttr( *aEditAttr.GetPool(), EE_ITEMS_START, EE_ITEMS_END ); - pView->SetAttributes( aEmptyAttr, TRUE ); + pView->SetAttributes( aEmptyAttr, sal_True ); if ( pOutView ) { @@ -731,7 +731,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) rReq.Done( aEmptyAttr ); pViewData->GetScDrawView()->InvalidateDrawTextAttrs(); - bDone = FALSE; // bereits hier passiert + bDone = sal_False; // bereits hier passiert } break; @@ -875,13 +875,13 @@ void __EXPORT ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) // font items from toolbox controller have to be applied for the right script type // #i78017 establish the same behaviour as in Writer - USHORT nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt16 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; if (nSlot == SID_ATTR_CHAR_FONT) nScript = pView->GetScriptType(); SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - USHORT nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhich( nSlot ); aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) ); pView->SetAttributes( aSetItem.GetItemSet() ); @@ -904,8 +904,8 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } SvtLanguageOptions aLangOpt; - BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); - BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); + sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); + sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); SdrView* pView = pViewData->GetScDrawView(); SfxItemSet aAttrSet(pView->GetModel()->GetItemPool()); @@ -917,10 +917,10 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) // choose font info according to selection script type - USHORT nScript = pView->GetScriptType(); + sal_uInt16 nScript = pView->GetScriptType(); // #i55929# input-language-dependent script type (depends on input language if nothing selected) - USHORT nInputScript = nScript; + sal_uInt16 nInputScript = nScript; OutlinerView* pOutView = pView->GetTextEditOutlinerView(); if (pOutView && !pOutView->GetSelection().HasRange()) { @@ -945,16 +945,16 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) switch( eAdj ) { case SVX_ADJUST_LEFT: - rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, sal_True ) ); break; case SVX_ADJUST_CENTER: - rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, sal_True ) ); break; case SVX_ADJUST_RIGHT: - rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, sal_True ) ); break; case SVX_ADJUST_BLOCK: - rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, sal_True ) ); break; default: { @@ -969,19 +969,19 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) // Zeilenabstand - USHORT nLineSpace = (USHORT) + sal_uInt16 nLineSpace = (sal_uInt16) ((const SvxLineSpacingItem&)aAttrSet. Get( EE_PARA_SBL )).GetPropLineSpace(); switch( nLineSpace ) { case 100: - rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, sal_True ) ); break; case 150: - rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, sal_True ) ); break; case 200: - rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, sal_True ) ); break; } @@ -990,13 +990,13 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&) aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT ) - rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) ); else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT ) - rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, TRUE ) ); + rDestSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) ); // Unterstreichung - SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, TRUE ); + SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, sal_True ); if ( eState == SFX_ITEM_DONTCARE ) { rDestSet.InvalidateItem( SID_ULINE_VAL_NONE ); @@ -1008,7 +1008,7 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) { FontUnderline eUnderline = ((const SvxUnderlineItem&) aAttrSet.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); - USHORT nId = SID_ULINE_VAL_NONE; + sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { case UNDERLINE_SINGLE: nId = SID_ULINE_VAL_SINGLE; break; @@ -1017,18 +1017,18 @@ void __EXPORT ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) default: break; } - rDestSet.Put( SfxBoolItem( nId, TRUE ) ); + rDestSet.Put( SfxBoolItem( nId, sal_True ) ); } // horizontal / vertical - BOOL bLeftToRight = TRUE; + sal_Bool bLeftToRight = sal_True; SdrOutliner* pOutl = pView->GetTextEditOutliner(); if( pOutl ) { if( pOutl->IsVertical() ) - bLeftToRight = FALSE; + bLeftToRight = sal_False; } else bLeftToRight = ( (const SvxWritingModeItem&) aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB; diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 61fbf3d0f96e..31a9049aeadb 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -56,7 +56,7 @@ #include "scabstdlg.hxx" //CHINA00 //------------------------------------------------------------------------ -BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, +sal_Bool ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ) { //CHINA001 ScCharDlg* pDlg = new ScCharDlg( pViewData->GetDialogParent(), @@ -69,7 +69,7 @@ BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( pViewData->GetDialogParent(), &rArgs, pViewData->GetSfxDocShell(),RID_SCDLG_CHAR ); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 - BOOL bRet = ( pDlg->Execute() == RET_OK ); + sal_Bool bRet = ( pDlg->Execute() == RET_OK ); if ( bRet ) { @@ -82,7 +82,7 @@ BOOL ScDrawTextObjectBar::ExecuteCharDlg( const SfxItemSet& rArgs, return bRet; } -BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, +sal_Bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ) { SfxItemPool* pArgPool = rArgs.GetPool(); @@ -114,7 +114,7 @@ BOOL ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr, RID_SCDLG_PARAGRAPH); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 - BOOL bRet = ( pDlg->Execute() == RET_OK ); + sal_Bool bRet = ( pDlg->Execute() == RET_OK ); if ( bRet ) { @@ -139,7 +139,7 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ ) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); - ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); + sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); //! test if outliner view is still valid diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx index 27f1a3dbb77f..137ddfa654d2 100644 --- a/sc/source/ui/drawfunc/drtxtob2.cxx +++ b/sc/source/ui/drawfunc/drtxtob2.cxx @@ -57,12 +57,12 @@ //------------------------------------------------------------------------ -USHORT ScGetFontWorkId() +sal_uInt16 ScGetFontWorkId() { return SvxFontWorkChildWindow::GetChildWindowId(); } -BOOL ScDrawTextObjectBar::IsNoteEdit() +sal_Bool ScDrawTextObjectBar::IsNoteEdit() { return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetSdrView()->GetTextEditObject() ); } @@ -74,7 +74,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq ) ScTabView* pTabView = pViewData->GetView(); ScDrawView* pView = pTabView->GetScDrawView(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_COPY: @@ -84,7 +84,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq ) case SID_CUT: pView->DoCut(); if (!pTabView->IsDrawSelMode()) - pViewData->GetViewShell()->SetDrawShell( FALSE ); + pViewData->GetViewShell()->SetDrawShell( sal_False ); break; case SID_PASTE: @@ -118,11 +118,11 @@ void __EXPORT ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq ) case SID_ENABLE_HYPHENATION: { - SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, FALSE); + SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION, sal_False); if( pItem ) { SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE ); - BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue(); + sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue(); aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) ); pView->SetAttributes( aSet ); } @@ -139,7 +139,7 @@ void ScDrawTextObjectBar::GetGlobalClipState( SfxItemSet& rSet ) //! move paste etc. to view shell? SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { rSet.DisableItem( nWhich ); @@ -152,12 +152,12 @@ void __EXPORT ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq ) ScTabView* pTabView = pViewData->GetView(); ScDrawView* pView = pTabView->GetScDrawView(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_FONTWORK: { - USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if ( rReq.GetArgs() ) @@ -180,7 +180,7 @@ void __EXPORT ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq ) EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR, EE_PARA_JUST, EE_PARA_JUST, 0 ); - BOOL bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ); + sal_Bool bLeft = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ); aAttr.Put( SvxFrameDirectionItem( bLeft ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) ); @@ -211,12 +211,12 @@ void ScDrawTextObjectBar::ExecFormText(SfxRequest& rReq) pDrView->ScEndTextEdit(); if ( SFX_ITEM_SET == - rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) + rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) && XFTFORM_NONE != ((const XFormTextStdFormItem*) pItem)->GetValue() ) { - USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*) (pViewFrm-> @@ -238,7 +238,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet) SvxFontWorkDialog* pDlg = NULL; ScDrawView* pDrView = pViewData->GetView()->GetScDrawView(); const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); - USHORT nId = SvxFontWorkChildWindow::GetChildWindowId(); + sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if ( pViewFrm->HasChildWindow(nId) ) @@ -251,7 +251,7 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet) !((SdrTextObj*) pObj)->HasText() ) { if ( pDlg ) - pDlg->SetActive(FALSE); + pDlg->SetActive(sal_False); rSet.DisableItem(XATTR_FORMTXTSTYLE); rSet.DisableItem(XATTR_FORMTXTADJUST); diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx index 20daacffac0e..5e40fcea171d 100644 --- a/sc/source/ui/drawfunc/fuconarc.cxx +++ b/sc/source/ui/drawfunc/fuconarc.cxx @@ -65,19 +65,19 @@ FuConstArc::~FuConstArc() |* \************************************************************************/ -BOOL __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuConstruct::MouseButtonDown( rMEvt ); + sal_Bool bReturn = FuConstruct::MouseButtonDown( rMEvt ); if ( rMEvt.IsLeft() && !pView->IsAction() ) { Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pWindow->CaptureMouse(); pView->BegCreateObj( aPnt ); - bReturn = TRUE; + bReturn = sal_True; } return bReturn; } @@ -88,7 +88,7 @@ BOOL __EXPORT FuConstArc::MouseButtonDown( const MouseEvent& rMEvt ) |* \************************************************************************/ -BOOL __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt ) +sal_Bool __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt ) { return FuConstruct::MouseMove(rMEvt); } @@ -99,25 +99,25 @@ BOOL __EXPORT FuConstArc::MouseMove( const MouseEvent& rMEvt ) |* \************************************************************************/ -BOOL __EXPORT FuConstArc::MouseButtonUp( const MouseEvent& rMEvt ) +sal_Bool __EXPORT FuConstArc::MouseButtonUp( const MouseEvent& rMEvt ) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->IsCreateObj() && rMEvt.IsLeft() ) { // Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->EndCreateObj( SDRCREATE_NEXTPOINT ); - bReturn = TRUE; + bReturn = sal_True; } /* else if ( pView->IsCreateObj() && rMEvt.IsRight() ) { // Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->EndCreateObj( SDRCREATE_FORCEEND ); - bReturn = TRUE; + bReturn = sal_True; } */ return (FuConstruct::MouseButtonUp(rMEvt) || bReturn); @@ -127,14 +127,14 @@ BOOL __EXPORT FuConstArc::MouseButtonUp( const MouseEvent& rMEvt ) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuConstArc::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstArc::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } @@ -171,7 +171,7 @@ void FuConstArc::Activate() break; } - pView->SetCurrentObj( sal::static_int_cast( aObjKind ) ); + pView->SetCurrentObj( sal::static_int_cast( aObjKind ) ); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 69a47f0584d0..be8dd2bf2188 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -75,12 +75,12 @@ FuConstCustomShape::~FuConstCustomShape() |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt); if ( rMEvt.IsLeft() && !pView->IsAction() ) { Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); @@ -102,7 +102,7 @@ BOOL __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) pObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); } - bReturn = TRUE; + bReturn = sal_True; } return bReturn; } @@ -113,7 +113,7 @@ BOOL __EXPORT FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstCustomShape::MouseMove(const MouseEvent& rMEvt) { return FuConstruct::MouseMove(rMEvt); } @@ -124,18 +124,18 @@ BOOL __EXPORT FuConstCustomShape::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->IsCreateObj() && rMEvt.IsLeft() ) { Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->EndCreateObj(SDRCREATE_FORCEEND); - bReturn = TRUE; + bReturn = sal_True; } return (FuConstruct::MouseButtonUp(rMEvt) || bReturn); } @@ -144,14 +144,14 @@ BOOL __EXPORT FuConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuConstCustomShape::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstCustomShape::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx index 440f49f41326..58075d5fc1ce 100644 --- a/sc/source/ui/drawfunc/fuconpol.cxx +++ b/sc/source/ui/drawfunc/fuconpol.cxx @@ -73,12 +73,12 @@ FuConstPolygon::~FuConstPolygon() |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt); SdrViewEvent aVEvt; (void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); @@ -86,15 +86,15 @@ BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) { // Texteingabe hier nicht zulassen aVEvt.eEvent = SDREVENT_BEGDRAGOBJ; - pView->EnableExtendedMouseEventDispatcher(FALSE); + pView->EnableExtendedMouseEventDispatcher(sal_False); } else { - pView->EnableExtendedMouseEventDispatcher(TRUE); + pView->EnableExtendedMouseEventDispatcher(sal_True); } if ( pView->MouseButtonDown(rMEvt, pWindow) ) - bReturn = TRUE; + bReturn = sal_True; return bReturn; } @@ -105,10 +105,10 @@ BOOL __EXPORT FuConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt) { pView->MouseMove(rMEvt, pWindow); - BOOL bReturn = FuConstruct::MouseMove(rMEvt); + sal_Bool bReturn = FuConstruct::MouseMove(rMEvt); return bReturn; } @@ -118,13 +118,13 @@ BOOL __EXPORT FuConstPolygon::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; - BOOL bSimple = FALSE; + sal_Bool bReturn = sal_False; + sal_Bool bSimple = sal_False; SdrViewEvent aVEvt; (void)pView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt); @@ -133,11 +133,11 @@ BOOL __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) if (aVEvt.eEvent == SDREVENT_ENDCREATE) { - bReturn = TRUE; - bSimple = TRUE; // Doppelklick nicht weiterreichen + bReturn = sal_True; + bSimple = sal_True; // Doppelklick nicht weiterreichen } - BOOL bParent; + sal_Bool bParent; if (bSimple) bParent = FuConstruct::SimpleMouseButtonUp(rMEvt); else @@ -150,14 +150,14 @@ BOOL __EXPORT FuConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } @@ -170,7 +170,7 @@ BOOL __EXPORT FuConstPolygon::KeyInput(const KeyEvent& rKEvt) void FuConstPolygon::Activate() { - pView->EnableExtendedMouseEventDispatcher(TRUE); + pView->EnableExtendedMouseEventDispatcher(sal_True); SdrObjKind eKind; @@ -221,7 +221,7 @@ void FuConstPolygon::Activate() break; } - pView->SetCurrentObj(sal::static_int_cast(eKind)); + pView->SetCurrentObj(sal::static_int_cast(eKind)); pView->SetEditMode(SDREDITMODE_CREATE); @@ -242,7 +242,7 @@ void FuConstPolygon::Deactivate() { pView->SetEditMode(SDREDITMODE_EDIT); - pView->EnableExtendedMouseEventDispatcher(FALSE); + pView->EnableExtendedMouseEventDispatcher(sal_False); FuConstruct::Deactivate(); diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index 733c6fe08b45..19106e891389 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -73,12 +73,12 @@ FuConstRectangle::~FuConstRectangle() |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt); if ( rMEvt.IsLeft() && !pView->IsAction() ) { @@ -106,7 +106,7 @@ BOOL __EXPORT FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt) { return FuConstruct::MouseMove(rMEvt); } @@ -117,12 +117,12 @@ BOOL __EXPORT FuConstRectangle::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->IsCreateObj() && rMEvt.IsLeft() ) { @@ -142,11 +142,11 @@ BOOL __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) ((SdrTextObj*)pObj)->ForceOutlinerParaObject(); OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); if( pOPO && !pOPO->IsVertical() ) - pOPO->SetVertical( TRUE ); + pOPO->SetVertical( sal_True ); } } - bReturn = TRUE; + bReturn = sal_True; } return (FuConstruct::MouseButtonUp(rMEvt) || bReturn); } @@ -155,14 +155,14 @@ BOOL __EXPORT FuConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuConstRectangle::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstRectangle::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } @@ -205,7 +205,7 @@ void FuConstRectangle::Activate() break; } - pView->SetCurrentObj(sal::static_int_cast(aObjKind)); + pView->SetCurrentObj(sal::static_int_cast(aObjKind)); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index bb918e9005ae..25a6e556e43e 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -69,7 +69,7 @@ FuConstruct::~FuConstruct() { } -BYTE FuConstruct::Command(const CommandEvent& rCEvt) +sal_uInt8 FuConstruct::Command(const CommandEvent& rCEvt) { // special code for non-VCL OS2/UNX removed @@ -82,18 +82,18 @@ BYTE FuConstruct::Command(const CommandEvent& rCEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuDraw::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt); if ( pView->IsAction() ) { if ( rMEvt.IsRight() ) pView->BckAction(); - return TRUE; + return sal_True; } aDragTimer.Start(); @@ -109,16 +109,16 @@ BOOL __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) if ( pHdl != NULL || pView->IsMarkedHit(aMDPos) ) { pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, 1); - bReturn = TRUE; + bReturn = sal_True; } else if ( pView->AreObjectsMarked() ) { pView->UnmarkAll(); - bReturn = TRUE; + bReturn = sal_True; } } - bIsInDragMode = FALSE; + bIsInDragMode = sal_False; return bReturn; } @@ -129,7 +129,7 @@ BOOL __EXPORT FuConstruct::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) { FuDraw::MouseMove(rMEvt); @@ -167,7 +167,7 @@ BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) pViewShell->SetActivePointer( aNewPointer ); } } - return TRUE; + return sal_True; } /************************************************************************* @@ -176,16 +176,16 @@ BOOL __EXPORT FuConstruct::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = SimpleMouseButtonUp( rMEvt ); + sal_Bool bReturn = SimpleMouseButtonUp( rMEvt ); // Doppelklick auf Textobjekt? (->fusel) - USHORT nClicks = rMEvt.GetClicks(); + sal_uInt16 nClicks = rMEvt.GetClicks(); if ( nClicks == 2 && rMEvt.IsLeft() ) { if ( pView->AreObjectsMarked() ) @@ -200,8 +200,8 @@ BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) ) { OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - BOOL bVertical = ( pOPO && pOPO->IsVertical() ); - USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; + sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); + sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; pViewShell->GetViewData()->GetDispatcher(). Execute(nTextSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); @@ -214,7 +214,7 @@ BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) Point aMousePixel = rMEvt.GetPosPixel(); pText->SetInEditMode( pObj, &aMousePixel ); } - bReturn = TRUE; + bReturn = sal_True; } } } @@ -227,9 +227,9 @@ BOOL __EXPORT FuConstruct::MouseButtonUp(const MouseEvent& rMEvt) // SimpleMouseButtonUp - ohne Test auf Doppelklick -BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) +sal_Bool FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) { - BOOL bReturn = TRUE; + sal_Bool bReturn = sal_True; if (aDragTimer.IsActive() ) { @@ -244,7 +244,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) else if ( pView->IsMarkObj() ) pView->EndMarkObj(); - else bReturn = FALSE; + else bReturn = sal_False; if ( !pView->IsAction() ) { @@ -252,7 +252,7 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 ) { - pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()); + pView->MarkObj(aPnt, -2, sal_False, rMEvt.IsMod1()); SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher(); if ( pView->AreObjectsMarked() ) @@ -269,14 +269,14 @@ BOOL FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; switch ( rKEvt.GetKeyCode().GetCode() ) { @@ -285,7 +285,7 @@ BOOL __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) { pView->BrkAction(); pWindow->ReleaseMouse(); - bReturn = TRUE; + bReturn = sal_True; } else // Zeichenmodus beenden { @@ -296,7 +296,7 @@ BOOL __EXPORT FuConstruct::KeyInput(const KeyEvent& rKEvt) case KEY_DELETE: pView->DeleteMarked(); - bReturn = TRUE; + bReturn = sal_True; break; } diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index c1212d4d9699..4f499f519298 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -43,8 +43,8 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDr SdrModel* pDoc, SfxRequest& rReq) : FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq) { - SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, FALSE ); - SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, FALSE ); + SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, sal_False ); + SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, sal_False ); if( pInventorItem ) nInventor = pInventorItem->GetValue(); if( pIdentifierItem ) @@ -67,19 +67,19 @@ FuConstUnoControl::~FuConstUnoControl() |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt); if ( rMEvt.IsLeft() && !pView->IsAction() ) { Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pWindow->CaptureMouse(); pView->BegCreateObj(aPnt); - bReturn = TRUE; + bReturn = sal_True; } return bReturn; } @@ -90,7 +90,7 @@ BOOL __EXPORT FuConstUnoControl::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt) { return FuConstruct::MouseMove(rMEvt); } @@ -101,18 +101,18 @@ BOOL __EXPORT FuConstUnoControl::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->IsCreateObj() && rMEvt.IsLeft() ) { Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); pView->EndCreateObj(SDRCREATE_FORCEEND); - bReturn = TRUE; + bReturn = sal_True; } return (FuConstruct::MouseButtonUp(rMEvt) || bReturn); } @@ -121,14 +121,14 @@ BOOL __EXPORT FuConstUnoControl::MouseButtonUp(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuConstUnoControl::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuConstUnoControl::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FuConstruct::KeyInput(rKEvt); + sal_Bool bReturn = FuConstruct::KeyInput(rKEvt); return(bReturn); } diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index bad23bf26ed1..219d3ab4a4af 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -90,19 +90,19 @@ void FuDraw::DoModifiers(const MouseEvent& rMEvt) // Control = Snap (Toggle) // Alt = zentrisch - BOOL bShift = rMEvt.IsShift(); -// BOOL bCtrl = rMEvt.IsMod1(); - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bShift = rMEvt.IsShift(); +// sal_Bool bCtrl = rMEvt.IsMod1(); + sal_Bool bAlt = rMEvt.IsMod2(); // ScViewData* pViewData = pViewShell->GetViewData(); // const ScViewOptions& rOpt = pViewData->GetOptions(); // const ScGridOptions& rGrid = rOpt.GetGridOptions(); -// BOOL bGridOpt = rGrid.GetUseGridSnap(); +// sal_Bool bGridOpt = rGrid.GetUseGridSnap(); - BOOL bOrtho = bShift; - BOOL bAngleSnap = bShift; -// BOOL bGridSnap = ( bGridOpt != bCtrl ); // andere Snap's nicht unterstuetzt - BOOL bCenter = bAlt; + sal_Bool bOrtho = bShift; + sal_Bool bAngleSnap = bShift; +// sal_Bool bGridSnap = ( bGridOpt != bCtrl ); // andere Snap's nicht unterstuetzt + sal_Bool bCenter = bAlt; // #i33136# if(doConstructOrthogonal()) @@ -134,12 +134,12 @@ void FuDraw::ResetModifiers() ScViewData* pViewData = pViewShell->GetViewData(); const ScViewOptions& rOpt = pViewData->GetOptions(); const ScGridOptions& rGrid = rOpt.GetGridOptions(); - BOOL bGridOpt = rGrid.GetUseGridSnap(); + sal_Bool bGridOpt = rGrid.GetUseGridSnap(); if (pView->IsOrtho()) - pView->SetOrtho(FALSE); + pView->SetOrtho(sal_False); if (pView->IsAngleSnapEnabled()) - pView->SetAngleSnapEnabled(FALSE); + pView->SetAngleSnapEnabled(sal_False); if (pView->IsGridSnap() != bGridOpt) pView->SetGridSnap(bGridOpt); @@ -147,9 +147,9 @@ void FuDraw::ResetModifiers() pView->SetSnapEnabled(bGridOpt); if (pView->IsCreate1stPointAsCenter()) - pView->SetCreate1stPointAsCenter(FALSE); + pView->SetCreate1stPointAsCenter(sal_False); if (pView->IsResizeAtCenter()) - pView->SetResizeAtCenter(FALSE); + pView->SetResizeAtCenter(sal_False); } /************************************************************************* @@ -158,13 +158,13 @@ void FuDraw::ResetModifiers() |* \************************************************************************/ -BOOL __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); DoModifiers( rMEvt ); - return FALSE; + return sal_False; } /************************************************************************* @@ -173,14 +173,14 @@ BOOL __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt) { // #106438# evaluate modifiers only if in a drawing layer action // (don't interfere with keyboard shortcut handling) if (pView->IsAction()) DoModifiers( rMEvt ); - return FALSE; + return sal_False; } /************************************************************************* @@ -189,35 +189,35 @@ BOOL __EXPORT FuDraw::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuDraw::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuDraw::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); ResetModifiers(); - return FALSE; + return sal_False; } /************************************************************************* |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey ) +sal_Bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEvent* pInitialKey ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pObj && pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) ) { // start text edit - like FuSelection::MouseButtonUp, // but with bCursorToEnd instead of mouse position OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - BOOL bVertical = ( pOPO && pOPO->IsVertical() ); - USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; + sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); + sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; // don't switch shells if text shell is already active FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr(); @@ -232,17 +232,17 @@ BOOL lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const KeyEven if ( pPoor && pPoor->GetSlotID() == nTextSlotId ) // no RTTI { FuText* pText = (FuText*)pPoor; - pText->SetInEditMode( pObj, NULL, TRUE, pInitialKey ); + pText->SetInEditMode( pObj, NULL, sal_True, pInitialKey ); //! set cursor to end of text } - bReturn = TRUE; + bReturn = sal_True; } return bReturn; } -BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; ScViewData& rViewData = *pViewShell->GetViewData(); switch ( rKEvt.GetKeyCode().GetCode() ) @@ -255,14 +255,14 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) * { * pView->BrkAction(); * pWindow->ReleaseMouse(); - * bReturn = TRUE; + * bReturn = sal_True; * } * else if ( pView->IsTextEdit() ) * { * pView->EndTextEdit(); * pView->SetCreateMode(); * pViewShell->GetScDrawView()->InvalidateDrawTextAttrs(); - * bReturn = TRUE; + * bReturn = sal_True; * } * else */ @@ -271,13 +271,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { // in normale Draw-Shell, wenn Objekt selektiert, sonst Zeichnen aus rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); - bReturn = TRUE; + bReturn = sal_True; } else if ( pViewShell->IsDrawSelMode() ) { pView->UnmarkAll(); rViewData.GetDispatcher().Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); - bReturn = TRUE; + bReturn = sal_True; } else if ( pView->AreObjectsMarked() ) { @@ -290,15 +290,15 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) // Beim Bezier-Editieren ist jetzt wieder das Objekt selektiert if (!pView->AreObjectsMarked()) - pViewShell->SetDrawShell( FALSE ); + pViewShell->SetDrawShell( sal_False ); - bReturn = TRUE; + bReturn = sal_True; } break; case KEY_DELETE: //! ueber Accelerator pView->DeleteMarked(); - bReturn = TRUE; + bReturn = sal_True; break; case KEY_RETURN: @@ -310,7 +310,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() ) { - BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); if( pObj && pObj->ISA( SdrOle2Obj ) && !bOle ) { @@ -318,10 +318,10 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) pViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 ); // consumed - bReturn = TRUE; + bReturn = sal_True; } else if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object - bReturn = TRUE; + bReturn = sal_True; } } } @@ -338,7 +338,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); if ( lcl_KeyEditMode( pObj, pViewShell, NULL ) ) // start text edit for suitable object - bReturn = TRUE; + bReturn = sal_True; } } } @@ -368,7 +368,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->AreObjectsMarked()) pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } // #98994# handle Mod1 and Mod2 to get travelling running on different systems @@ -391,7 +391,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) } // consumed - bReturn = TRUE; + bReturn = sal_True; } } } @@ -410,13 +410,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { // #97016# mark last object pView->UnmarkAllObj(); - pView->MarkNextObj(FALSE); + pView->MarkNextObj(sal_False); // #97016# II if(pView->AreObjectsMarked()) pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -435,13 +435,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) { // #97016# mark first object pView->UnmarkAllObj(); - pView->MarkNextObj(TRUE); + pView->MarkNextObj(sal_True); // #97016# II if(pView->AreObjectsMarked()) pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -470,7 +470,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) long nX = 0; long nY = 0; - USHORT nCode = rKEvt.GetKeyCode().GetCode(); + sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); if (nCode == KEY_UP) { @@ -497,7 +497,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) nY = 0; } - BOOL bReadOnly = rViewData.GetDocShell()->IsReadOnly(); + sal_Bool bReadOnly = rViewData.GetDocShell()->IsReadOnly(); if(!rKEvt.GetKeyCode().IsMod1() && !bReadOnly) { @@ -565,7 +565,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) // #97016# II pView->MakeVisible(pView->GetAllMarkedRect(), *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } else @@ -584,13 +584,13 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) if(pView->IsDragObj()) { FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); - BOOL bWasSnapEnabled = pView->IsSnapEnabled(); + sal_Bool bWasSnapEnabled = pView->IsSnapEnabled(); // switch snapping off if(!bWasNoSnap) - ((SdrDragStat&)rDragStat).SetNoSnap(TRUE); + ((SdrDragStat&)rDragStat).SetNoSnap(sal_True); if(bWasSnapEnabled) - pView->SetSnapEnabled(FALSE); + pView->SetSnapEnabled(sal_False); pView->MovAction(aEndPoint); pView->EndDragObj(); @@ -606,7 +606,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200)); pView->MakeVisible(aVisRect, *pWindow); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -673,7 +673,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) } } - bReturn = TRUE; + bReturn = sal_True; } } } @@ -697,7 +697,7 @@ BOOL __EXPORT FuDraw::KeyInput(const KeyEvent& rKEvt) // start text edit for suitable object, pass key event to OutlinerView if ( lcl_KeyEditMode( pObj, pViewShell, &rKEvt ) ) - bReturn = TRUE; + bReturn = sal_True; } } @@ -761,7 +761,7 @@ void FuDraw::Deactivate() |* \************************************************************************/ -BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow ) +sal_Bool lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow ) { SdrViewEvent aVEvt; MouseEvent aMEvt( rPosPixel, 1, 0, MOUSE_LEFT ); @@ -771,13 +771,13 @@ BOOL lcl_UrlHit( SdrView* pView, const Point& rPosPixel, Window* pWindow ) { if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) && ScDrawLayer::GetHitIMapObject( aVEvt.pObj, pWindow->PixelToLogic(rPosPixel), *pWindow ) ) - return TRUE; + return sal_True; if ( aVEvt.eEvent == SDREVENT_EXECUTEURL ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void FuDraw::ForcePointer(const MouseEvent* pMEvt) @@ -785,7 +785,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) if ( !pView->IsAction() ) { Point aPosPixel = pWindow->GetPointerPosPixel(); - BOOL bAlt = pMEvt && pMEvt->IsMod2(); + sal_Bool bAlt = pMEvt && pMEvt->IsMod2(); Point aPnt = pWindow->PixelToLogic( aPosPixel ); SdrHdl* pHdl = pView->PickHandle(aPnt); SdrObject* pObj; @@ -841,9 +841,9 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) } } -BOOL FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const +sal_Bool FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const { - BOOL bIsSizingOrMoving = FALSE; + sal_Bool bIsSizingOrMoving = sal_False; if ( rMEvt.IsLeft() ) { const SdrMarkList& rNoteMarkList = pView->GetMarkedObjectList(); diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 53a44f058dda..4cc08ececd49 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -106,7 +106,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r return; Size aPageSize = rPage; - BOOL bNegative = aPageSize.Width() < 0; + sal_Bool bNegative = aPageSize.Width() < 0; if ( bNegative ) { // make everything positive temporarily @@ -148,7 +148,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r //------------------------------------------------------------------------ void lcl_InsertGraphic( const Graphic& rGraphic, - const String& rFileName, const String& rFilterName, BOOL bAsLink, BOOL bApi, + const String& rFileName, const String& rFilterName, sal_Bool bAsLink, sal_Bool bApi, ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView ) { // #74778# set the size so the graphic has its original pixel size @@ -193,7 +193,7 @@ void lcl_InsertGraphic( const Graphic& rGraphic, pObj->SetName(aName); // don't select if from (dispatch) API, to allow subsequent cell operations - ULONG nInsOptions = bApi ? SDRINSERT_DONTMARK : 0; + sal_uLong nInsOptions = bApi ? SDRINSERT_DONTMARK : 0; pView->InsertObjectAtView( pObj, *pPV, nInsOptions ); // #118522# SetGraphicLink has to be used after inserting the object, @@ -256,23 +256,23 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, const SfxItemSet* pReqArgs = rReq.GetArgs(); const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState( SID_INSERT_GRAPHIC, TRUE, &pItem ) == SFX_ITEM_SET ) + pReqArgs->GetItemState( SID_INSERT_GRAPHIC, sal_True, &pItem ) == SFX_ITEM_SET ) { String aFileName = ((const SfxStringItem*)pItem)->GetValue(); String aFilterName; - if ( pReqArgs->GetItemState( FN_PARAM_FILTER, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_FILTER, sal_True, &pItem ) == SFX_ITEM_SET ) aFilterName = ((const SfxStringItem*)pItem)->GetValue(); - BOOL bAsLink = FALSE; - if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_Bool bAsLink = sal_False; + if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET ) bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); Graphic aGraphic; int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, GraphicFilter::GetGraphicFilter() ); if ( nError == GRFILTER_OK ) { - lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, TRUE, pViewSh, pWindow, pView ); + lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_True, pViewSh, pWindow, pView ); } } else @@ -287,9 +287,9 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, { String aFileName = aDlg.GetPath(); String aFilterName = aDlg.GetCurrentFilter(); - BOOL bAsLink = aDlg.IsAsLink(); + sal_Bool bAsLink = aDlg.IsAsLink(); - lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, FALSE, pViewSh, pWindow, pView ); + lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_False, pViewSh, pWindow, pView ); // append items for recording rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) ); @@ -302,7 +302,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, // error is handled in SvxOpenGraphicDialog::GetGraphic #if 0 - USHORT nRes = 0; + sal_uInt16 nRes = 0; switch ( nError ) { case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break; @@ -319,7 +319,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, } else { - ULONG nStreamError = GetGrfFilter()->GetLastError().nStreamError; + sal_uLong nStreamError = GetGrfFilter()->GetLastError().nStreamError; if( ERRCODE_NONE != nStreamError ) ErrorHandler::HandleError( nStreamError ); } diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 297e8fa38651..0c68c871ece1 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -98,7 +98,7 @@ extern SdrObject* pSkipPaintObj; // output.cxx - dieses Objekt nicht //------------------------------------------------------------------------ #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScViewData* pViewData, const rtl::OUString& rRangeParam ) @@ -118,7 +118,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie ScMarkData& rMark = pViewData->GetMarkData(); if ( !rMark.IsMarked() ) - pViewData->GetView()->MarkDataArea( TRUE ); + pViewData->GetView()->MarkDataArea( sal_True ); if ( pViewData->GetSimpleArea( nCol1,nRow1,nTab1, nCol2,nRow2,nTab2 ) == SC_MARK_SIMPLE ) { @@ -228,7 +228,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie uno::Reference < embed::XEmbeddedObject > xObj; uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage(); - BOOL bIsFromFile = FALSE; + sal_Bool bIsFromFile = sal_False; ::rtl::OUString aName; sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; @@ -236,7 +236,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie uno::Reference< io::XInputStream > xIconMetaFile; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False ); if ( nSlot == SID_INSERT_OBJECT && pNameItem ) { @@ -427,7 +427,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie if (bIsFromFile) { // #45012# Objekt ist selektiert, also Draw-Shell aktivieren - pViewShell->SetDrawShell( TRUE ); + pViewShell->SetDrawShell( sal_True ); } else { @@ -516,7 +516,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* bool bAutomaticMark = false; if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) { - pViewSh->GetViewData()->GetView()->MarkDataArea( TRUE ); + pViewSh->GetViewData()->GetView()->MarkDataArea( sal_True ); bAutomaticMark = true; } @@ -524,18 +524,18 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* aMultiMark.MarkToMulti(); ScRangeList aRanges; - aMultiMark.FillRangeListWithMarks( &aRanges, FALSE ); + aMultiMark.FillRangeListWithMarks( &aRanges, sal_False ); String aStr; ScDocument* pDocument = pViewSh->GetViewData()->GetDocument(); aRanges.Format( aStr, SCR_ABS_3D, pDocument, pDocument->GetAddressConvention() ); aRangeString = aStr; // get "total" range for positioning - ULONG nCount = aRanges.Count(); + sal_uLong nCount = aRanges.Count(); if ( nCount > 0 ) { aPositionRange = *aRanges.GetObject(0); - for (ULONG i=1; iGetChartArea( aDummy, aMarkDest, nMarkTab ); + sal_Bool bDrawRect = pViewShell->GetChartArea( aDummy, aMarkDest, nMarkTab ); // Objekt-Groesse awt::Size aSz = xObj->getVisualAreaSize( nAspect ); @@ -574,17 +574,17 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) ); - BOOL bSizeCh = FALSE; + sal_Bool bSizeCh = sal_False; if (bDrawRect && !aMarkDest.IsEmpty()) { aSize = aMarkDest.GetSize(); - bSizeCh = TRUE; + bSizeCh = sal_True; } if (aSize.Height() <= 0 || aSize.Width() <= 0) { aSize.Width() = 5000; aSize.Height() = 5000; - bSizeCh = TRUE; + bSizeCh = sal_True; } if (bSizeCh) { @@ -597,12 +597,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* ScViewData* pData = pViewSh->GetViewData(); ScDocShell* pScDocSh = pData->GetDocShell(); ScDocument* pScDoc = pScDocSh->GetDocument(); - BOOL bUndo (pScDoc->IsUndoEnabled()); + sal_Bool bUndo (pScDoc->IsUndoEnabled()); if( pReqArgs ) { const SfxPoolItem* pItem; - UINT16 nToTable = 0; + sal_uInt16 nToTable = 0; if( IS_AVAILABLE( FN_PARAM_4, &pItem ) ) { @@ -614,15 +614,15 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* // -> wenn gesetzt, neue Tabelle, sonst aktuelle Tabelle if ( ((const SfxBoolItem*)pItem)->GetValue() ) - nToTable = static_cast(pScDoc->GetTableCount()); + nToTable = static_cast(pScDoc->GetTableCount()); else - nToTable = static_cast(pData->GetTabNo()); + nToTable = static_cast(pData->GetTabNo()); } } else { if (bDrawRect) - nToTable = static_cast(nMarkTab); + nToTable = static_cast(nMarkTab); rReq.AppendItem( SfxUInt16Item( FN_PARAM_4, nToTable ) ); } @@ -637,7 +637,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* if ( pScDoc->InsertTab( nNewTab, aTabName ) ) { - BOOL bAppend = TRUE; + sal_Bool bAppend = sal_True; if (bUndo) { @@ -647,7 +647,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* } pScDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ) ); - pViewSh->SetTabNo( nNewTab, TRUE ); + pViewSh->SetTabNo( nNewTab, sal_True ); pScDocSh->PostPaintExtras(); //! erst hinterher ??? } else @@ -657,7 +657,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* } else if ( nToTable != pData->GetTabNo() ) { - pViewSh->SetTabNo( nToTable, TRUE ); + pViewSh->SetTabNo( nToTable, sal_True ); } } @@ -788,7 +788,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* bAddUndo = false; // don't create the undo action for inserting // leave the draw shell - pViewShell->SetDrawShell( FALSE ); + pViewShell->SetDrawShell( sal_False ); } else { diff --git a/sc/source/ui/drawfunc/fumark.cxx b/sc/source/ui/drawfunc/fumark.cxx index 02554c495729..929f3cfd5b4e 100644 --- a/sc/source/ui/drawfunc/fumark.cxx +++ b/sc/source/ui/drawfunc/fumark.cxx @@ -51,8 +51,8 @@ FuMarkRect::FuMarkRect(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq) : FuPoor(pViewSh, pWin, pViewP, pDoc, rReq), - bVisible(FALSE), - bStartDrag(FALSE) + bVisible(sal_False), + bStartDrag(sal_False) { } @@ -72,18 +72,18 @@ FuMarkRect::~FuMarkRect() |* \************************************************************************/ -BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); pWindow->CaptureMouse(); pView->UnmarkAll(); // der Einheitlichkeit halber und wegen #50558# - bStartDrag = TRUE; + bStartDrag = sal_True; aBeginPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() ); aZoomRect = Rectangle( aBeginPos, Size() ); - return TRUE; + return sal_True; } /************************************************************************* @@ -92,7 +92,7 @@ BOOL FuMarkRect::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt) +sal_Bool FuMarkRect::MouseMove(const MouseEvent& rMEvt) { if ( bStartDrag ) { @@ -106,7 +106,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt) aZoomRect = aRect; aZoomRect.Justify(); pViewShell->DrawMarkRect(aZoomRect); - bVisible = TRUE; + bVisible = sal_True; } ForcePointer(&rMEvt); @@ -120,7 +120,7 @@ BOOL FuMarkRect::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); @@ -129,12 +129,12 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) { // Hide ZoomRect pViewShell->DrawMarkRect(aZoomRect); - bVisible = FALSE; + bVisible = sal_False; } Size aZoomSizePixel = pWindow->LogicToPixel(aZoomRect).GetSize(); - USHORT nMinMove = pView->GetMinMoveDistancePixel(); + sal_uInt16 nMinMove = pView->GetMinMoveDistancePixel(); if ( aZoomSizePixel.Width() < nMinMove || aZoomSizePixel.Height() < nMinMove ) { // Klick auf der Stelle @@ -142,7 +142,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) aZoomRect.SetSize(Size()); // dann ganz leer } - bStartDrag = FALSE; + bStartDrag = sal_False; pWindow->ReleaseMouse(); pViewShell->GetViewData()->GetDispatcher(). @@ -154,11 +154,11 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) // Chart-Dialog starten: -// USHORT nId = ScChartDlgWrapper::GetChildWindowId(); +// sal_uInt16 nId = ScChartDlgWrapper::GetChildWindowId(); // SfxChildWindow* pWnd = pViewShell->GetViewFrame()->GetChildWindow( nId ); -// SC_MOD()->SetRefDialog( nId, pWnd ? FALSE : TRUE ); +// SC_MOD()->SetRefDialog( nId, pWnd ? sal_False : sal_True ); - return TRUE; + return sal_True; } /************************************************************************* @@ -167,7 +167,7 @@ BOOL FuMarkRect::MouseButtonUp(const MouseEvent& rMEvt) |* \************************************************************************/ -BYTE FuMarkRect::Command(const CommandEvent& rCEvt) +sal_uInt8 FuMarkRect::Command(const CommandEvent& rCEvt) { if ( COMMAND_STARTDRAG == rCEvt.GetCommand() ) { @@ -183,14 +183,14 @@ BYTE FuMarkRect::Command(const CommandEvent& rCEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt) +sal_Bool FuMarkRect::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; switch ( rKEvt.GetKeyCode().GetCode() ) { @@ -198,7 +198,7 @@ BOOL FuMarkRect::KeyInput(const KeyEvent& rKEvt) // beenden pViewShell->GetViewData()->GetDispatcher(). Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); - bReturn = TRUE; + bReturn = sal_True; break; } @@ -246,7 +246,7 @@ void FuMarkRect::Activate() ScMarkData& rMark = pViewData->GetMarkData(); if ( !rMark.IsMultiMarked() && !rMark.IsMarked() ) - pViewShell->MarkDataArea( TRUE ); + pViewShell->MarkDataArea( sal_True ); pViewData->GetMultiArea( aSourceRange ); // Mehrfachselektion erlaubt @@ -269,8 +269,8 @@ void FuMarkRect::Deactivate() { // Hide ZoomRect pViewShell->DrawMarkRect(aZoomRect); - bVisible = FALSE; - bStartDrag = FALSE; + bVisible = sal_False; + bStartDrag = sal_False; } } diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index 0bffdfe7ef84..dabda66355ab 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -55,7 +55,7 @@ FuPoor::FuPoor(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, pDrDoc(pDoc), aSfxRequest(rReq), pDialog(NULL), - bIsInDragMode(FALSE), + bIsInDragMode(sal_False), // #95491# remember MouseButton state mnCode(0) { @@ -178,21 +178,21 @@ IMPL_LINK_INLINE_START( FuPoor, ScrollHdl, Timer *, EMPTYARG ) IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer ) // #95491# moved from inline to *.cxx -BOOL FuPoor::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool FuPoor::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - return FALSE; + return sal_False; } // #95491# moved from inline to *.cxx -BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - return FALSE; + return sal_False; } /************************************************************************* @@ -207,25 +207,25 @@ BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL FuPoor::KeyInput(const KeyEvent& /* rKEvt */) +sal_Bool FuPoor::KeyInput(const KeyEvent& /* rKEvt */) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; return(bReturn); } -BYTE FuPoor::Command(const CommandEvent& rCEvt) +sal_uInt8 FuPoor::Command(const CommandEvent& rCEvt) { if ( COMMAND_STARTDRAG == rCEvt.GetCommand() ) { //!!! sollte Joe eigentlich machen: // nur, wenn im Outliner was selektiert ist, darf - // Command TRUE zurueckliefern: + // Command sal_True zurueckliefern: OutlinerView* pOutView = pView->GetTextEditOutlinerView(); @@ -306,7 +306,7 @@ IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG ) if ( pHdl==NULL && pView->IsMarkedHit(aMDPos) ) { pWindow->ReleaseMouse(); - bIsInDragMode = TRUE; + bIsInDragMode = sal_True; // pView->BeginDrag(pWindow, aMDPos); pViewShell->GetScDrawView()->BeginDrag(pWindow, aMDPos); @@ -316,24 +316,24 @@ IMPL_LINK( FuPoor, DragHdl, void *, EMPTYARG ) // Detektiv-Linie -BOOL FuPoor::IsDetectiveHit( const Point& rLogicPos ) +sal_Bool FuPoor::IsDetectiveHit( const Point& rLogicPos ) { SdrPageView* pPV = pView->GetSdrPageView(); if (!pPV) - return FALSE; + return sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT ); SdrObject* pObject = aIter.Next(); while (pObject && !bFound) { if (ScDetectiveFunc::IsNonAlienArrow( pObject )) { - USHORT nHitLog = (USHORT) pWindow->PixelToLogic( + sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic( Size(pView->GetHitTolerancePixel(),0)).Width(); if(SdrObjectPrimitiveHit(*pObject, rLogicPos, nHitLog, *pPV, 0, false)) { - bFound = TRUE; + bFound = sal_True; } } diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index 4a456522003c..964e9cb5081e 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -80,7 +80,7 @@ using namespace com::sun::star; FuSelection::FuSelection(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq ) : FuDraw(pViewSh, pWin, pViewP, pDoc, rReq), - bVCAction(FALSE) + bVCAction(sal_False) { } @@ -94,7 +94,7 @@ FuSelection::~FuSelection() { } -BYTE FuSelection::Command(const CommandEvent& rCEvt) +sal_uInt8 FuSelection::Command(const CommandEvent& rCEvt) { // special code for non-VCL OS2/UNX removed @@ -107,7 +107,7 @@ BYTE FuSelection::Command(const CommandEvent& rCEvt) |* \************************************************************************/ -BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); @@ -116,13 +116,13 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { if ( bSelectionOnly ) pView->BckAction(); - return TRUE; + return sal_True; } - bVCAction = FALSE; - bIsInDragMode = FALSE; // irgendwo muss es ja zurueckgesetzt werden (#50033#) + bVCAction = sal_False; + bIsInDragMode = sal_False; // irgendwo muss es ja zurueckgesetzt werden (#50033#) - BOOL bReturn = FuDraw::MouseButtonDown(rMEvt); + sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt); aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() ); @@ -162,16 +162,16 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { aDragTimer.Start(); pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); - bReturn = TRUE; + bReturn = sal_True; } } else { - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bAlt = rMEvt.IsMod2(); if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) { pView->BegMacroObj(aMDPos, pObj, pPV, pWindow); - bReturn = TRUE; + bReturn = sal_True; } else { @@ -201,7 +201,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) pObj = pHit; } - ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, TRUE ); + ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ); #ifdef ISSUE66550_HLINK_FOR_SHAPES // For interoperability favour links over macros if both are defined if ( pInfo->GetHlink().getLength() > 0 ) @@ -225,7 +225,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) pObjSh->CallXScript( pInfo->GetMacro(), *pInArgs, aRet, aOutArgsIndex, aOutArgs); pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() ); - return TRUE; // kein CaptureMouse etc. + return sal_True; // kein CaptureMouse etc. } } } @@ -259,13 +259,13 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { ScGlobal::OpenURL( sURL, sTarget ); pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() ); - return TRUE; // kein CaptureMouse etc. + return sal_True; // kein CaptureMouse etc. } // Is another object being edited in this view? // (Editing is ended in MarkListHasChanged - test before UnmarkAll) SfxInPlaceClient* pClient = pViewShell->GetIPClient(); - BOOL bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); + sal_Bool bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); // Markieren @@ -280,7 +280,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) pView->UnlockInternalLayer(); // try to select the clicked object - if ( pView->MarkObj( aMDPos, -2, FALSE, rMEvt.IsMod1() ) ) + if ( pView->MarkObj( aMDPos, -2, sal_False, rMEvt.IsMod1() ) ) { //********************************************************* //Objekt verschieben @@ -296,11 +296,11 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) pHdl=pView->PickHandle(aMDPos); pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); - bReturn = TRUE; + bReturn = sal_True; } else // Objekt am Rand getroffen if (pViewShell->IsDrawSelMode()) - bReturn = TRUE; + bReturn = sal_True; } else { @@ -312,7 +312,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) //Objekt selektieren //******************************************************** pView->BegMarkObj(aMDPos); - bReturn = TRUE; + bReturn = sal_True; } } } @@ -336,9 +336,9 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) { - BOOL bReturn = FuDraw::MouseMove(rMEvt); + sal_Bool bReturn = FuDraw::MouseMove(rMEvt); if (aDragTimer.IsActive() ) { @@ -356,7 +356,7 @@ BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) ForceScroll(aPix); pView->MovAction(aPnt); - bReturn = TRUE; + bReturn = sal_True; } // Ein VCControl ist aktiv @@ -369,7 +369,7 @@ BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) //VCSbxForm* pForm = (VCSbxForm*)(SbxObject*)(pPage->GetSbxForm()); //((VCManager*)(pForm->GetVCContainer()))-> // MouseMove( pWindow, rMEvt ); - bReturn = TRUE; + bReturn = sal_True; } ForcePointer(&rMEvt); @@ -383,14 +383,14 @@ BOOL __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FuDraw::MouseButtonUp(rMEvt); -// BOOL bOle = pViewShell->GetViewData()->IsOle(); - BOOL bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt); +// sal_Bool bOle = pViewShell->GetViewData()->IsOle(); + sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); if (aDragTimer.IsActive() ) { @@ -418,7 +418,7 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) FuText* pText = static_cast(pPoor); pText->StopDragMode(pObj ); } - bReturn = TRUE; + bReturn = sal_True; } else if (pView->IsAction() ) { @@ -427,16 +427,16 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) pView->EndAction(); if ( pView->AreObjectsMarked() ) { - bReturn = TRUE; + bReturn = sal_True; /* if multi-selection contains a note caption object, remove all other objects from selection. */ const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - ULONG nCount = rMarkList.GetMarkCount(); + sal_uLong nCount = rMarkList.GetMarkCount(); if( nCount > 1 ) { bool bFound = false; - for( ULONG nIdx = 0; !bFound && (nIdx < nCount); ++nIdx ) + for( sal_uLong nIdx = 0; !bFound && (nIdx < nCount); ++nIdx ) { SdrObject* pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj(); bFound = ScDrawLayer::IsNoteCaption( pObj ); @@ -454,9 +454,9 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) /* if ( pView->IsObjEdit() ) { - BOOL bShowCursor = TRUE; + sal_Bool bShowCursor = sal_True; //! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor); - bReturn = TRUE; + bReturn = sal_True; } */ /************************************************************************** @@ -473,7 +473,7 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) pIPClient->DeactivateObject(); } - USHORT nClicks = rMEvt.GetClicks(); + sal_uInt16 nClicks = rMEvt.GetClicks(); if ( nClicks == 2 && rMEvt.IsLeft() ) { if ( pView->AreObjectsMarked() ) @@ -491,7 +491,7 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); if ( eHit != SDRHIT_NONE && aVEvt.pObj == pObj ) { - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); // // OLE: aktivieren @@ -517,8 +517,8 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) else if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) && !pObj->ISA(SdrMediaObj) ) { OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); - BOOL bVertical = ( pOPO && pOPO->IsVertical() ); - USHORT nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; + sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); + sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; pViewShell->GetViewData()->GetDispatcher(). Execute(nTextSlotId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD); @@ -531,13 +531,13 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) Point aMousePixel = rMEvt.GetPosPixel(); pText->SetInEditMode( pObj, &aMousePixel ); } - bReturn = TRUE; + bReturn = sal_True; } } } } else if ( TestDetective( pView->GetSdrPageView(), aPnt ) ) - bReturn = TRUE; + bReturn = sal_True; } // Ein VCControl ist aktiv @@ -551,8 +551,8 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) //((VCManager*)(pForm->GetVCContainer()))-> // MouseButtonUp( pWindow, rMEvt ); //HMHpView->ShowMarkHdl(); - bVCAction = FALSE; - bReturn = TRUE; + bVCAction = sal_False; + bReturn = sal_True; } ForcePointer(&rMEvt); @@ -573,14 +573,14 @@ BOOL __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL FuSelection::KeyInput(const KeyEvent& rKEvt) +sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if (!bReturn) { @@ -631,7 +631,7 @@ void FuSelection::Deactivate() /************************************************************************** * Hide Cursor **************************************************************************/ -// BOOL bShowCursor = FALSE; +// sal_Bool bShowCursor = sal_False; //! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor); // pView->SetDragMode(SDRDRAG_MOVE); diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx index 402143ac0a8c..503235e865a6 100644 --- a/sc/source/ui/drawfunc/fusel2.cxx +++ b/sc/source/ui/drawfunc/fusel2.cxx @@ -63,19 +63,19 @@ inline long Diff( const Point& rP1, const Point& rP2 ) return nX+nY; } -BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos ) +sal_Bool FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos ) { if (!pPV) - return FALSE; + return sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT ); SdrObject* pObject = aIter.Next(); while (pObject && !bFound) { if (ScDetectiveFunc::IsNonAlienArrow( pObject )) { - USHORT nHitLog = (USHORT) pWindow->PixelToLogic( + sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic( Size(pView->GetHitTolerancePixel(),0)).Width(); if (SdrObjectPrimitiveHit(*pObject, rPos, nHitLog, *pPV, 0, false)) { @@ -93,11 +93,11 @@ BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos ) pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow ); SCsCOL nCurX = (SCsCOL) pViewData->GetCurX(); SCsROW nCurY = (SCsROW) pViewData->GetCurY(); - BOOL bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) ); + sal_Bool bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) ); if ( nCurX == nStartCol && nCurY == nStartRow ) - bStart = FALSE; + bStart = sal_False; else if ( nCurX == nEndCol && nCurY == nEndRow ) - bStart = TRUE; + bStart = sal_True; SCsCOL nDifX; SCsROW nDifY; @@ -111,9 +111,9 @@ BOOL FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos ) nDifX = nEndCol - nCurX; nDifY = nEndRow - nCurY; } - pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, FALSE ); + pViewShell->MoveCursorRel( nDifX, nDifY, SC_FOLLOW_JUMP, sal_False ); - bFound = TRUE; + bFound = sal_True; } } @@ -148,7 +148,7 @@ bool FuSelection::IsNoteCaptionClicked( const Point& rPos ) const bool bProtectDoc = rDoc.IsTabProtected( nTab ) || (pDocSh && pDocSh->IsReadOnly()); // search the last object (on top) in the object list - SdrObjListIter aIter( *pPageView->GetObjList(), IM_DEEPNOGROUPS, TRUE ); + SdrObjListIter aIter( *pPageView->GetObjList(), IM_DEEPNOGROUPS, sal_True ); for( SdrObject* pObj = aIter.Next(); pObj; pObj = aIter.Next() ) { if( pObj->GetLogicRect().IsInside( rPos ) ) diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index a13cfc61d1c6..99aab320e16d 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -131,13 +131,13 @@ FuText::~FuText() |* \************************************************************************/ -BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); if ( pView->MouseButtonDown(rMEvt, pWindow) ) - return (TRUE); // Event von der SdrView ausgewertet + return (sal_True); // Event von der SdrView ausgewertet if ( pView->IsTextEdit() ) { @@ -152,13 +152,13 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) { SdrHdl* pHdl = pView->PickHandle(aMDPos); - ULONG nHdlNum = pView->GetHdlNum(pHdl); + sal_uLong nHdlNum = pView->GetHdlNum(pHdl); if (pHdl != NULL) { if (pView->HasMarkablePoints() && pView->IsPointMarkable(*pHdl)) { - BOOL bPointMarked=pView->IsPointMarked(*pHdl); + sal_Bool bPointMarked=pView->IsPointMarked(*pHdl); if ( rMEvt.IsShift() ) { @@ -198,8 +198,8 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) // vertical flag: // deduced from slot ids only if text object has no content - USHORT nSlotID = aSfxRequest.GetSlot(); - BOOL bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); + sal_uInt16 nSlotID = aSfxRequest.GetSlot(); + sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); if ( pOPO ) bVertical = pOPO->IsVertical(); // content wins @@ -213,7 +213,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) OutlinerView* pOLV = pView->GetTextEditOutlinerView(); if ( pOLV->MouseButtonDown(rMEvt) ) - return (TRUE); // Event an den Outliner + return (sal_True); // Event an den Outliner } } else @@ -244,7 +244,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) } else { - BOOL bMacro = FALSE; + sal_Bool bMacro = sal_False; // if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV)) if (bMacro && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) @@ -256,7 +256,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) { if (pView->IsEditMode()) { - BOOL bPointMode=pView->HasMarkablePoints(); + sal_Bool bPointMode=pView->HasMarkablePoints(); if (!rMEvt.IsShift()) { @@ -276,7 +276,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) pHdl=pView->GetHdl(nHdlNum); } - if ( pView->MarkObj(aMDPos, -2, FALSE, rMEvt.IsMod1()) ) + if ( pView->MarkObj(aMDPos, -2, sal_False, rMEvt.IsMod1()) ) { aDragTimer.Start(); @@ -333,7 +333,7 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) pWindow->PixelToLogic(rMEvt.GetPosPixel()), pWindow )); // return (bReturn); - return TRUE; + return sal_True; } /************************************************************************* @@ -342,9 +342,9 @@ BOOL __EXPORT FuText::MouseButtonDown(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; // pViewShell->SetActivePointer(aNewPointer); @@ -361,7 +361,7 @@ BOOL __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) } if ( pView->MouseMove(rMEvt, pWindow) ) - return (TRUE); // Event von der SdrView ausgewertet + return (sal_True); // Event von der SdrView ausgewertet if ( pView->IsAction() ) { @@ -386,12 +386,12 @@ BOOL __EXPORT FuText::MouseMove(const MouseEvent& rMEvt) |* \************************************************************************/ -BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) +sal_Bool __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) { // #95491# remember button state for creation of own MouseEvents SetMouseButtonCode(rMEvt.GetButtons()); - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if (aDragTimer.IsActive() ) { @@ -403,7 +403,7 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); if ( pView->MouseButtonUp(rMEvt, pWindow) ) - return (TRUE); // Event von der SdrView ausgewertet + return (sal_True); // Event von der SdrView ausgewertet if ( pView->IsDragObj() ) { @@ -437,20 +437,20 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) SfxItemSet aItemSet( pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) ); + aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) ); + aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aItemSet.Put( SdrTextAniCountItem( 1 ) ); aItemSet.Put( SdrTextAniAmountItem( - (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) ); + (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aItemSet); } } // #93382# init object different when vertical writing sal_uInt16 nSlotID(aSfxRequest.GetSlot()); - BOOL bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID); + sal_Bool bVertical = (SID_DRAW_TEXT_VERTICAL == nSlotID); if(bVertical) { const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); @@ -462,10 +462,10 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) SdrTextObj* pText = (SdrTextObj*)pObj; SfxItemSet aSet(pDrDoc->GetItemPool()); - pText->SetVerticalWriting(TRUE); + pText->SetVerticalWriting(sal_True); - aSet.Put(SdrTextAutoGrowWidthItem(TRUE)); - aSet.Put(SdrTextAutoGrowHeightItem(FALSE)); + aSet.Put(SdrTextAutoGrowWidthItem(sal_True)); + aSet.Put(SdrTextAutoGrowHeightItem(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -481,7 +481,7 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) if ( !pView->AreObjectsMarked() ) { - pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()); + pView->MarkObj(aPnt, -2, sal_False, rMEvt.IsMod1()); SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher(); if ( pView->AreObjectsMarked() ) @@ -501,7 +501,7 @@ BOOL __EXPORT FuText::MouseButtonUp(const MouseEvent& rMEvt) if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 ) { - pView->MarkObj(aPnt, -2, FALSE, rMEvt.IsMod1()); + pView->MarkObj(aPnt, -2, sal_False, rMEvt.IsMod1()); SfxDispatcher& rDisp = pViewShell->GetViewData()->GetDispatcher(); if ( pView->AreObjectsMarked() ) @@ -574,18 +574,18 @@ void FuText::ForcePointer(const MouseEvent* /* pMEvt */) |* |* Tastaturereignisse bearbeiten |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls +|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls |* FALSE. |* \************************************************************************/ -BOOL __EXPORT FuText::KeyInput(const KeyEvent& rKEvt) +sal_Bool __EXPORT FuText::KeyInput(const KeyEvent& rKEvt) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( pView->KeyInput(rKEvt, pWindow) ) { - bReturn = TRUE; + bReturn = sal_True; lcl_InvalidateAttribs( pViewShell->GetViewFrame()->GetBindings() ); } else @@ -619,10 +619,10 @@ void FuText::Activate() /********************************************************************** * Kein Textobjekt im EditMode, daher CreateMode setzen **********************************************************************/ - USHORT nObj = OBJ_TEXT; + sal_uInt16 nObj = OBJ_TEXT; -/* UINT16 nIdent; - UINT32 nInvent; +/* sal_uInt16 nIdent; + sal_uInt32 nInvent; pView->TakeCurrentObj(nIdent, nInvent); */ pView->SetCurrentObj(nObj); @@ -678,7 +678,7 @@ void FuText::SelectionHasChanged() SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); if (nSdrObjKind == OBJ_TEXT || nSdrObjKind == OBJ_TITLETEXT || @@ -695,9 +695,9 @@ void FuText::SelectionHasChanged() /********************************************************************** * Kein Textobjekt im EditMode, daher CreateMode setzen **********************************************************************/ - USHORT nObj = OBJ_TEXT; - UINT16 nIdent; - UINT32 nInvent; + sal_uInt16 nObj = OBJ_TEXT; + sal_uInt16 nIdent; + sal_uInt32 nInvent; pView->TakeCurrentObj(nIdent, nInvent); // if (! pView->IsEditMode() ) @@ -729,7 +729,7 @@ void FuText::SelectionHasChanged() \************************************************************************/ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel, - BOOL bCursorToEnd, const KeyEvent* pInitialKey) + sal_Bool bCursorToEnd, const KeyEvent* pInitialKey) { /* It is possible to pass a special (unselected) object in pObj, e.g. the caption object of a cell note. If pObj is 0, then the selected object @@ -751,7 +751,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel, if ( pObj ) { - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); if (nSdrObjKind == OBJ_TEXT || nSdrObjKind == OBJ_TITLETEXT || @@ -770,8 +770,8 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel, // vertical flag: // deduced from slot ids only if text object has no content - USHORT nSlotID = aSfxRequest.GetSlot(); - BOOL bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); + sal_uInt16 nSlotID = aSfxRequest.GetSlot(); + sal_Bool bVertical = ( nSlotID == SID_DRAW_TEXT_VERTICAL ); OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); if ( pOPO ) bVertical = pOPO->IsVertical(); // content wins @@ -847,8 +847,8 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR { SfxItemSet aSet(pDrDoc->GetItemPool()); - aSet.Put(SdrTextAutoGrowWidthItem(TRUE)); - aSet.Put(SdrTextAutoGrowHeightItem(FALSE)); + aSet.Put(SdrTextAutoGrowWidthItem(sal_True)); + aSet.Put(SdrTextAutoGrowHeightItem(sal_False)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -859,12 +859,12 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR { SfxItemSet aSet(pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) ); - aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) ); + aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) ); + aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) ); aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aSet.Put( SdrTextAniCountItem( 1 ) ); - aSet.Put( SdrTextAniAmountItem( (INT16)pWindow->PixelToLogic(Size(2,1)).Width()) ); + aSet.Put( SdrTextAniAmountItem( (sal_Int16)pWindow->PixelToLogic(Size(2,1)).Width()) ); pObj->SetMergedItemSetAndBroadcast(aSet); } diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx index 534e68705fa8..e61289f00710 100644 --- a/sc/source/ui/drawfunc/futext3.cxx +++ b/sc/source/ui/drawfunc/futext3.cxx @@ -58,10 +58,10 @@ // Editieren von Notiz-Legendenobjekten muss immer ueber StopEditMode beendet werden, // damit die Aenderungen ins Dokument uebernommen werden! // (Fontwork-Execute in drawsh und drtxtob passiert nicht fuer Legendenobjekte) -// bTextDirection=TRUE means that this function is called from SID_TEXTDIRECTION_XXX(drtxtob.cxx). +// bTextDirection=sal_True means that this function is called from SID_TEXTDIRECTION_XXX(drtxtob.cxx). // ------------------------------------------------------------------------------------ -void FuText::StopEditMode(BOOL /*bTextDirection*/) +void FuText::StopEditMode(sal_Bool /*bTextDirection*/) { SdrObject* pObject = pView->GetTextEditObject(); if( !pObject ) return; @@ -187,7 +187,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/) // invalidate stream positions only for the affected sheet rDoc.LockStreamValid(false); if (rDoc.IsStreamValid(aNotePos.Tab())) - rDoc.SetStreamValid(aNotePos.Tab(), FALSE); + rDoc.SetStreamValid(aNotePos.Tab(), sal_False); } } diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 25cda28aaa9d..add82f255f05 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -95,14 +95,14 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet ) { ScDrawView* pView = GetViewData()->GetScDrawView(); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if( rMarkList.GetMarkCount() == 1 ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); if( pObj && pObj->ISA( SdrGrafObj ) && ( ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) ) - bEnable = TRUE; + bEnable = sal_True; } if( !bEnable ) diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx index 78948550aea6..9aec72095c1e 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -74,7 +74,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet ) if( pView ) { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { @@ -117,7 +117,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) ) + if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) ) pItem = NULL; if( pItem ) diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 1d522fb3211e..99cc1c14688f 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -75,7 +75,7 @@ SFX_IMPL_DOCKINGWINDOW( ScFunctionChildWindow, FID_FUNCTION_BOX ) #************************************************************************/ __EXPORT ScFunctionChildWindow::ScFunctionChildWindow( Window* pParentP, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentP, nId ) @@ -124,13 +124,13 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, eSfxNewAlignment=GetAlignment(); eSfxOldAlignment=eSfxNewAlignment; - aFiFuncDesc.SetUpdateMode(TRUE); + aFiFuncDesc.SetUpdateMode(sal_True); pAllFuncList=&aFuncList; aDDFuncList.Disable(); aDDFuncList.Hide(); nArgs=0; nDockMode=0; - bSizeFlag=FALSE; + bSizeFlag=sal_False; aCatBox.SetDropDownLineCount(9); Font aFont=aFiFuncDesc.GetFont(); aFont.SetColor(Color(COL_BLACK)); @@ -150,7 +150,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, Link a3Link=LINK( this, ScFunctionDockWin, SetSplitHdl); aPrivatSplit.SetCtrModifiedHdl(a3Link); - StartListening( *pBindingsP, TRUE ); + StartListening( *pBindingsP, sal_True ); Point aTopLeft=aCatBox.GetPosPixel(); //String aString=aCatBox.GetEntry( 0)+String("www"); @@ -165,7 +165,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, GetOutputSizePixel().Height()-2*aTxtSize.Height()); aPrivatSplit.SetYRange(aYRange); SelHdl(&aCatBox); - bInit=TRUE; + bInit=sal_True; } /************************************************************************* @@ -205,10 +205,10 @@ __EXPORT ScFunctionDockWin::~ScFunctionDockWin() void ScFunctionDockWin::InitLRUList() { const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions(); - USHORT nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (USHORT)LRU_MAX ); - USHORT* pLRUListIds = rAppOpt.GetLRUFuncList(); + sal_uInt16 nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX ); + sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList(); - USHORT i; + sal_uInt16 i; for ( i=0; iGet( pLRUListIds[i] ); } - USHORT nSelPos = aCatBox.GetSelectEntryPos(); + sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos(); if(nSelPos == 0) UpdateFunctionList(); @@ -265,7 +265,7 @@ void ScFunctionDockWin::UpdateLRUList() void ScFunctionDockWin::SetSize() { - USHORT nSelEntry=0; + sal_uInt16 nSelEntry=0; SfxChildAlignment aChildAlign=eSfxOldAlignment;//GetAlignment(); short nNewDockMode; switch(aChildAlign) @@ -343,16 +343,16 @@ void ScFunctionDockWin::SetSize() void ScFunctionDockWin::SetLeftRightSize() { - if(bSizeFlag==FALSE) + if(bSizeFlag==sal_False) { - bSizeFlag=TRUE; + bSizeFlag=sal_True; Size aDiffSize=GetSizePixel(); Size aNewSize=GetOutputSizePixel(); aDiffSize.Width()-=aNewSize.Width(); aDiffSize.Height()-=aNewSize.Height(); - //@ SetUpdateMode( FALSE); + //@ SetUpdateMode( sal_False); String aString = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ww")); @@ -373,8 +373,8 @@ void ScFunctionDockWin::SetLeftRightSize() aNewSize.Width()+=aDiffSize.Width(); aNewSize.Height()+=aDiffSize.Height(); //SetSizePixel(aNewSize); - //@ SetUpdateMode( TRUE); - bSizeFlag=FALSE; + //@ SetUpdateMode( sal_True); + bSizeFlag=sal_False; } } @@ -395,9 +395,9 @@ void ScFunctionDockWin::SetLeftRightSize() void ScFunctionDockWin::SetTopBottonSize() { - if(bSizeFlag==FALSE) + if(bSizeFlag==sal_False) { - bSizeFlag=TRUE; + bSizeFlag=sal_True; Size aDiffSize=GetSizePixel(); Size aNewSize=GetOutputSizePixel(); aDiffSize.Width()-=aNewSize.Width(); @@ -409,8 +409,8 @@ void ScFunctionDockWin::SetTopBottonSize() aNewSize.Width()+=aDiffSize.Width(); aNewSize.Height()+=aDiffSize.Height(); //SetSizePixel(aNewSize); - //@ SetUpdateMode( TRUE); - bSizeFlag=FALSE; + //@ SetUpdateMode( sal_True); + bSizeFlag=sal_False; } } @@ -431,7 +431,7 @@ void ScFunctionDockWin::SetTopBottonSize() void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize) { - if((ULONG)aNewSize.Width()Execute( FID_FUNCTION_BOX, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, @@ -673,7 +673,7 @@ BOOL __EXPORT ScFunctionDockWin::Close() SfxDockingWindow::Close(); - return( TRUE ); + return( sal_True ); } @@ -703,7 +703,7 @@ SfxChildAlignment __EXPORT ScFunctionDockWin::CheckAlignment(SfxChildAlignment / } else { - bInit=FALSE; + bInit=sal_False; eSfxOldAlignment=aChildAlign; eSfxNewAlignment=aChildAlign; } @@ -815,12 +815,12 @@ void __EXPORT ScFunctionDockWin::Resize() void ScFunctionDockWin::UpdateFunctionList() { - USHORT nSelPos = aCatBox.GetSelectEntryPos(); - USHORT nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) + sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos(); + sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) ? (nSelPos-1) : 0; pAllFuncList->Clear(); - pAllFuncList->SetUpdateMode( FALSE ); + pAllFuncList->SetUpdateMode( sal_False ); if ( nSelPos > 0 ) { @@ -837,7 +837,7 @@ void ScFunctionDockWin::UpdateFunctionList() } else // LRU-Liste { - for ( USHORT i=0; iSetEntryData( @@ -848,7 +848,7 @@ void ScFunctionDockWin::UpdateFunctionList() //------------------------------------------------------ - pAllFuncList->SetUpdateMode( TRUE ); + pAllFuncList->SetUpdateMode( sal_True ); if ( pAllFuncList->GetEntryCount() > 0 ) { @@ -877,7 +877,7 @@ void ScFunctionDockWin::UpdateFunctionList() #* #************************************************************************/ -void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ??? +void ScFunctionDockWin::DoEnter(sal_Bool /* bOk */) //@@ ??? { String aFirstArgStr; String aParaStr; @@ -919,8 +919,8 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ??? if ( nArgs != VAR_ARGS ) { // no VarArgs or Fix plus VarArgs, but not VarArgs only String aArgSep = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "; " )); - USHORT nFix = ( nArgs < VAR_ARGS ? nArgs : nArgs - VAR_ARGS + 1 ); - for ( USHORT nArg = 1; + sal_uInt16 nFix = ( nArgs < VAR_ARGS ? nArgs : nArgs - VAR_ARGS + 1 ); + for ( sal_uInt16 nArg = 1; nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ ) { if (!pDesc->pDefArgFlags[nArg].bSuppress) @@ -948,7 +948,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ??? if(nArgs>0) { pHdl->InsertFunction(aString); - pEdView->InsertText(aArgStr,TRUE); + pEdView->InsertText(aArgStr,sal_True); ESelection aESel=pEdView->GetSelection(); aESel.nEndPos=aESel.nStartPos+aFirstArgStr.Len(); pEdView->SetSelection(aESel); @@ -957,7 +957,7 @@ void ScFunctionDockWin::DoEnter(BOOL /* bOk */) //@@ ??? else { aString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "()" )); - pEdView->InsertText(aString,FALSE); + pEdView->InsertText(aString,sal_False); pHdl->DataChanged(); } } @@ -1030,7 +1030,7 @@ IMPL_LINK( ScFunctionDockWin, SetSelectionHdl, void*, pCtrl ) if ((ImageButton *)pCtrl == &aInsertButton || (ListBox *)pCtrl == &aFuncList) { - DoEnter(TRUE); // Uebernimmt die Eingabe + DoEnter(sal_True); // Uebernimmt die Eingabe } //... @@ -1133,10 +1133,10 @@ void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo) if ( aStr.Len()) { aSplitterInitPos=aPrivatSplit.GetPosPixel(); - aSplitterInitPos.Y()=(USHORT) aStr.ToInt32(); + aSplitterInitPos.Y()=(sal_uInt16) aStr.ToInt32(); xub_StrLen n1 = aStr.Search(';'); aStr.Erase(0, n1+1); - USHORT nSelPos=sal::static_int_cast( aStr.ToInt32() ); + sal_uInt16 nSelPos=sal::static_int_cast( aStr.ToInt32() ); aCatBox.SelectEntryPos(nSelPos); SelHdl(&aCatBox); diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 2d9cdef1b54e..845bf1adfa5a 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -107,7 +107,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, { pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() ); if( pScViewShell ) - pScViewShell->UpdateInputHandler(TRUE); + pScViewShell->UpdateInputHandler(sal_True); pParentDoc = pMyViewFrm->GetObjectShell(); } } @@ -132,10 +132,10 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, if ( pInputHdl ) pInputHdl->NotifyChange( NULL ); - m_aHelper.enableInput( FALSE ); + m_aHelper.enableInput( sal_False ); m_aHelper.EnableSpreadsheets(); m_aHelper.Init(); - m_aHelper.SetDispatcherLock( TRUE ); + m_aHelper.SetDispatcherLock( sal_True ); notifyChange(); fill(); @@ -165,26 +165,26 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, String aFormula; pDoc->GetFormula( nCol, nRow, nTab, aFormula ); - BOOL bEdit = ( aFormula.Len() > 1 ); - BOOL bMatrix = FALSE; + sal_Bool bEdit = ( aFormula.Len() > 1 ); + sal_Bool bMatrix = sal_False; if ( bEdit ) { bMatrix = CheckMatrix(aFormula); xub_StrLen nFStart = 0; xub_StrLen nFEnd = 0; - if ( GetFormulaHelper().GetNextFunc( aFormula, FALSE, nFStart, &nFEnd) ) + if ( GetFormulaHelper().GetNextFunc( aFormula, sal_False, nFStart, &nFEnd) ) { pScMod->InputReplaceSelection( aFormula ); pScMod->InputSetSelection( nFStart, nFEnd ); xub_StrLen PrivStart, PrivEnd; pScMod->InputGetSelection( PrivStart, PrivEnd); - eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,TRUE,TRUE); + eMode = SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_True,sal_True); pData->SetFStart( nFStart ); } else - bEdit = FALSE; + bEdit = sal_False; } if ( !bEdit ) @@ -197,12 +197,12 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW, pScMod->InputSetSelection( 1, aNewFormula.Len()+1 ); xub_StrLen PrivStart, PrivEnd; pScMod->InputGetSelection( PrivStart, PrivEnd); - SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,FALSE,FALSE); + SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,sal_False,sal_False); pData->SetFStart( 1 ); // hinter dem "=" } - pData->SetMode( (USHORT) eMode ); + pData->SetMode( (sal_uInt16) eMode ); String rStrExp = GetMeText(); pCell = new ScFormulaCell( pDoc, aCursorPos, rStrExp ); @@ -284,9 +284,9 @@ __EXPORT ScFormulaDlg::~ScFormulaDlg() delete pCell; } -BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) +sal_Bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) { - BOOL bAlive = FALSE; + sal_Bool bAlive = sal_False; // gehoert der InputHandler zu irgendeiner ViewShell ? @@ -295,7 +295,7 @@ BOOL ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl) while ( pSh && !bAlive ) { if (((ScTabViewShell*)pSh)->GetInputHandler() == pHdl) - bAlive = TRUE; + bAlive = sal_True; pSh = SfxViewShell::GetNext( *pSh, &aScType ); } @@ -325,10 +325,10 @@ ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell,PtrTabVi } -BOOL __EXPORT ScFormulaDlg::Close() +sal_Bool __EXPORT ScFormulaDlg::Close() { - DoEnter(FALSE); - return TRUE; + DoEnter(sal_False); + return sal_True; } // -------------------------------------------------------------------------- @@ -336,7 +336,7 @@ BOOL __EXPORT ScFormulaDlg::Close() // -------------------------------------------------------------------------- bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; ::std::auto_ptr pFCell( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) ); @@ -344,7 +344,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) // wenn ein Name eigentlich als Bereich in die Gesamt-Formel // eingefuegt wird, bei der Einzeldarstellung aber als // single-Zellbezug interpretiert wird - BOOL bColRowName = pCell->HasColRowName(); + sal_Bool bColRowName = pCell->HasColRowName(); if ( bColRowName ) { // ColRowName im RPN-Code? @@ -357,10 +357,10 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced ) ); } else - bColRowName = FALSE; + bColRowName = sal_False; } - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); if ( nErrCode == 0 ) { SvNumberFormatter& aFormatter = *(pDoc->GetFormatTable()); @@ -368,7 +368,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) if ( pFCell->IsValue() ) { double n = pFCell->GetValue(); - ULONG nFormat = aFormatter.GetStandardFormat( n, 0, + sal_uLong nFormat = aFormatter.GetStandardFormat( n, 0, pFCell->GetFormatType(), ScGlobal::eLnge ); aFormatter.GetOutputString( n, nFormat, rStrResult, &pColor ); @@ -378,7 +378,7 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult ) String aStr; pFCell->GetString( aStr ); - ULONG nFormat = aFormatter.GetStandardFormat( + sal_uLong nFormat = aFormatter.GetStandardFormat( pFCell->GetFormatType(), ScGlobal::eLnge); aFormatter.GetOutputString( aStr, nFormat, rStrResult, &pColor ); @@ -409,7 +409,7 @@ void ScFormulaDlg::RefInputStart( formula::RefEdit* pEdit, formula::RefButton* p m_aHelper.RefInputStart( aPair.second, aPair.first); RefInputStartAfter( aPair.second, aPair.first ); } -void ScFormulaDlg::RefInputDone( BOOL bForced ) +void ScFormulaDlg::RefInputDone( sal_Bool bForced ) { m_aHelper.RefInputDone( bForced ); RefInputDoneAfter( bForced ); @@ -421,7 +421,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) if ( pFunc && pFunc->getSuppressedArgumentCount() > 0 ) { Selection theSel; - BOOL bRefNull = UpdateParaWin(theSel); + sal_Bool bRefNull = UpdateParaWin(theSel); if ( rRef.aStart != rRef.aEnd && bRefNull ) { @@ -429,7 +429,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } String aRefStr; - BOOL bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() ); + sal_Bool bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() ); if ( bOtherDoc ) { // Referenz auf anderes Dokument - wie inputhdl.cxx @@ -452,7 +452,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } else { - USHORT nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() ) + sal_uInt16 nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() ) ? SCA_VALID : SCA_VALID | SCA_TAB_3D; rRef.Format( aRefStr, nFmt, pRefDoc, pRefDoc->GetAddressConvention() ); @@ -462,21 +462,21 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) } } -BOOL ScFormulaDlg::IsRefInputMode() const +sal_Bool ScFormulaDlg::IsRefInputMode() const { const IFunctionDescription* pDesc = getCurrentFunctionDescription(); - BOOL bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL); + sal_Bool bRef = (pDesc && (pDesc->getSuppressedArgumentCount() > 0)) && (pDoc!=NULL); return bRef; } -BOOL ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const +sal_Bool ScFormulaDlg::IsDocAllowed(SfxObjectShell* pDocSh) const { // not allowed: different from this doc, and no name // pDocSh is always a ScDocShell if ( pDocSh && ((ScDocShell*)pDocSh)->GetDocument() != pDoc && !pDocSh->HasName() ) - return FALSE; + return sal_False; - return TRUE; // everything else is allowed + return sal_True; // everything else is allowed } void ScFormulaDlg::SetActive() @@ -498,7 +498,7 @@ void ScFormulaDlg::SaveLRUEntry(const ScFuncDesc* pFuncDescP) } } -void ScFormulaDlg::doClose(BOOL /*_bOk*/) +void ScFormulaDlg::doClose(sal_Bool /*_bOk*/) { m_aHelper.DoClose( ScFormulaDlgWrapper::GetChildWindowId() ); } @@ -515,7 +515,7 @@ void ScFormulaDlg::ShowReference(const String& _sFormula) { m_aHelper.ShowReference(_sFormula); } -void ScFormulaDlg::HideReference( BOOL bDoneRefMode ) +void ScFormulaDlg::HideReference( sal_Bool bDoneRefMode ) { m_aHelper.HideReference(bDoneRefMode); } @@ -527,10 +527,10 @@ void ScFormulaDlg::AddRefEntry( ) { } -BOOL ScFormulaDlg::IsTableLocked( ) const +sal_Bool ScFormulaDlg::IsTableLocked( ) const { // per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden - return FALSE; + return sal_False; } void ScFormulaDlg::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton) { @@ -540,7 +540,7 @@ void ScFormulaDlg::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB { m_aHelper.ReleaseFocus(pEdit,pButton); } -void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked) +void ScFormulaDlg::dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked) { SfxBoolItem aRetItem( SID_DLG_RETOK, _bOK ); SfxBoolItem aMatItem( SID_DLG_MATRIX, _bMartixChecked ); @@ -549,9 +549,9 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked) // Wenn durch Dokument-Umschalterei die Eingabezeile weg war/ist, // ist der String leer. Dann nicht die alte Formel loeschen. if ( !aStrItem.GetValue().Len() ) - aRetItem.SetValue( FALSE ); // FALSE = Cancel + aRetItem.SetValue( sal_False ); // sal_False = Cancel - m_aHelper.SetDispatcherLock( FALSE ); // Modal-Modus ausschalten + m_aHelper.SetDispatcherLock( sal_False ); // Modal-Modus ausschalten clear(); @@ -559,7 +559,7 @@ void ScFormulaDlg::dispatch(BOOL _bOK,BOOL _bMartixChecked) SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aRetItem, &aStrItem, &aMatItem, 0L ); } -void ScFormulaDlg::setDispatcherLock( BOOL bLock ) +void ScFormulaDlg::setDispatcherLock( sal_Bool bLock ) { m_aHelper.SetDispatcherLock( bLock ); } diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx index a3b27ba21b1d..860b1bb23249 100644 --- a/sc/source/ui/formdlg/privsplt.cxx +++ b/sc/source/ui/formdlg/privsplt.cxx @@ -63,7 +63,7 @@ ScPrivatSplit::ScPrivatSplit( Window* pParent, const ResId& rResId, aWinPointer=GetPointer(); - aMovingFlag=FALSE; + aMovingFlag=sal_False; if(eScSplit==SC_SPLIT_HORZ) { aWinPointer=Pointer(POINTER_HSPLIT); @@ -349,7 +349,7 @@ void ScPrivatSplit::MoveSplitTo(Point aPos) } -void ScPrivatSplit::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ) +void ScPrivatSplit::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -388,17 +388,17 @@ void ScPrivatSplit::StateChanged( StateChangedType nType ) if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( TRUE, FALSE, FALSE ); + ImplInitSettings( sal_True, sal_False, sal_False ); Invalidate(); } if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( FALSE, TRUE, FALSE ); + ImplInitSettings( sal_False, sal_True, sal_False ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( FALSE, FALSE, TRUE ); + ImplInitSettings( sal_False, sal_False, sal_True ); Invalidate(); } @@ -412,7 +412,7 @@ void ScPrivatSplit::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( TRUE, TRUE, TRUE ); + ImplInitSettings( sal_True, sal_True, sal_True ); Invalidate(); } else diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx index 70731ac8a1f7..ffd86491da5d 100644 --- a/sc/source/ui/inc/IAnyRefDialog.hxx +++ b/sc/source/ui/inc/IAnyRefDialog.hxx @@ -44,18 +44,18 @@ public: virtual ~IAnyRefDialog(){} //virtual void ShowReference(const String& _sRef) = 0; - //virtual void HideReference( BOOL bDoneRefMode = TRUE ) = 0; + //virtual void HideReference( sal_Bool bDoneRefMode = sal_True ) = 0; //virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0; //virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0; virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0; virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0; - virtual void RefInputDone( BOOL bForced = FALSE ) = 0; - virtual BOOL IsTableLocked() const = 0; - virtual BOOL IsRefInputMode() const = 0; + virtual void RefInputDone( sal_Bool bForced = sal_False ) = 0; + virtual sal_Bool IsTableLocked() const = 0; + virtual sal_Bool IsRefInputMode() const = 0; - virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const = 0; + virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const = 0; virtual void AddRefEntry() = 0; virtual void SetActive() = 0; virtual void ViewShellChanged( ScTabViewShell* pScViewShell ) = 0; diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index a077129c374c..16e3117c7cd3 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -114,10 +114,10 @@ public: SCTAB nTable; SCCOL nCol; SCROW nRow; - ULONG nActionNo; - ULONG nInfo; - BOOL bIsRejectable; - BOOL bIsAcceptable; + sal_uLong nActionNo; + sal_uLong nInfo; + sal_Bool bIsRejectable; + sal_Bool bIsAcceptable; }; typedef long LExpNum; @@ -160,15 +160,15 @@ private: String aStrChildContent; String aStrChildOrgContent; String aStrEmpty; - ULONG nAcceptCount; - ULONG nRejectCount; - BOOL bAcceptEnableFlag; - BOOL bRejectEnableFlag; - BOOL bNeedsUpdate; - BOOL bIgnoreMsg; - BOOL bNoSelection; - BOOL bHasFilterEntry; - BOOL bUseColor; + sal_uLong nAcceptCount; + sal_uLong nRejectCount; + sal_Bool bAcceptEnableFlag; + sal_Bool bRejectEnableFlag; + sal_Bool bNeedsUpdate; + sal_Bool bIgnoreMsg; + sal_Bool bNoSelection; + sal_Bool bHasFilterEntry; + sal_Bool bUseColor; //ScChgTrackExps aExpandArray; void Init(); @@ -198,51 +198,51 @@ private: protected: virtual void Resize(); - virtual BOOL Close(); + virtual sal_Bool Close(); void RejectFiltered(); void AcceptFiltered(); - BOOL IsValidAction(const ScChangeAction* pScChangeAction); + sal_Bool IsValidAction(const ScChangeAction* pScChangeAction); String* MakeTypeString(ScChangeActionType eType); SvLBoxEntry* InsertChangeAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState, - SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE, - BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND); + SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=sal_False, + sal_Bool bDisabled=sal_False,sal_uLong nPos=LIST_APPEND); SvLBoxEntry* InsertFilteredAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState, - SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE, - BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND); + SvLBoxEntry* pParent=NULL,sal_Bool bDelMaster=sal_False, + sal_Bool bDisabled=sal_False,sal_uLong nPos=LIST_APPEND); SvLBoxEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction, - SvLBoxEntry* pParent,ULONG nSpecial); + SvLBoxEntry* pParent,sal_uLong nSpecial); void GetDependents( const ScChangeAction* pScChangeAction, ScChangeActionTable& aActionTable, SvLBoxEntry* pEntry); - BOOL InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent); + sal_Bool InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent); - BOOL InsertAcceptedORejected(SvLBoxEntry* pParent); + sal_Bool InsertAcceptedORejected(SvLBoxEntry* pParent); - BOOL InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable, + sal_Bool InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable, SvLBoxEntry* pParent); - BOOL InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent); + sal_Bool InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent); - void AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, ULONG nEndAction, - ULONG nPos=LIST_APPEND); + void AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction, + sal_uLong nPos=LIST_APPEND); - void RemoveEntrys(ULONG nStartAction,ULONG nEndAction); - void UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction); + void RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction); + void UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction); void UpdateView(); void ClearView(); - BOOL Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction, - SvLBoxEntry* pEntry, BOOL bFilter=FALSE); + sal_Bool Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction, + SvLBoxEntry* pEntry, sal_Bool bFilter=sal_False); public: ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 62f7bfd865e7..ecbeed14ef42 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -72,7 +72,7 @@ class ScFormulaReferenceHelper SfxBindings* m_pBindings; ::std::auto_ptr pAccel; // fuer Enter/Escape - BOOL* pHiddenMarks; // Merkfeld fuer versteckte Controls + sal_Bool* pHiddenMarks; // Merkfeld fuer versteckte Controls SCTAB nRefTab; // used for ShowReference String sOldDialogText; // Originaltitel des Dialogfensters @@ -81,9 +81,9 @@ class ScFormulaReferenceHelper Size aOldEditSize; // Originalgroesse des Eingabefeldes Point aOldButtonPos; // Originalpositiuon des Buttons - BOOL bEnableColorRef; - BOOL bHighLightRef; - BOOL bAccInserted; + sal_Bool bEnableColorRef; + sal_Bool bHighLightRef; + sal_Bool bAccInserted; DECL_LINK( AccelSelectHdl, Accelerator* ); @@ -98,24 +98,24 @@ public: void ShowReference( const XubString& rStr ); void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); - void HideReference( BOOL bDoneRefMode = TRUE ); + void HideReference( sal_Bool bDoneRefMode = sal_True ); void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); - void RefInputDone( BOOL bForced = FALSE ); + void RefInputDone( sal_Bool bForced = sal_False ); void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); inline void SetWindow(Window* _pWindow) { m_pWindow = _pWindow; } - BOOL DoClose( USHORT nId ); - void SetDispatcherLock( BOOL bLock ); - void EnableSpreadsheets( BOOL bFlag = TRUE, BOOL bChilds = TRUE ); + sal_Bool DoClose( sal_uInt16 nId ); + void SetDispatcherLock( sal_Bool bLock ); + void EnableSpreadsheets( sal_Bool bFlag = sal_True, sal_Bool bChilds = sal_True ); void ViewShellChanged( ScTabViewShell* pScViewShell ); - static void enableInput(BOOL _bInput); + static void enableInput(sal_Bool _bInput); //Added by PengYunQuan for Validity Cell Range Picker }; @@ -225,12 +225,12 @@ private: template template ScRefHdlrImplBase::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW, - TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast( nResId ) ) ), ScRefHandler( *static_cast(this), pB, bBindRef ){} + TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast( nResId ) ) ), ScRefHandler( *static_cast(this), pB, bBindRef ){} template template ScRefHdlrImplBase::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ ) -:TWindow( pParent, ScResId(static_cast( nResIdP )), rArg ), ScRefHandler( *static_cast(this), pB, bBindRef ){} +:TWindow( pParent, ScResId(static_cast( nResIdP )), rArg ), ScRefHandler( *static_cast(this), pB, bBindRef ){} template ScRefHdlrImplBase::~ScRefHdlrImplBase(){} @@ -244,12 +244,12 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase template ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase(rt1, rt2, rt3, rt4 ) { - SC_MOD()->RegisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); + SC_MOD()->RegisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); } ~ScRefHdlrImpl() { - SC_MOD()->UnregisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); + SC_MOD()->UnregisterRefWindow( static_cast( static_cast(this)->SLOTID ), this ); } }; //============================================================================ @@ -265,7 +265,7 @@ inline bool ScRefHandler::CanInputStart( const ScRefEdit *pEdit ) return m_aHelper.CanInputStart( pEdit ); } -inline bool ScRefHandler::CanInputDone( BOOL bForced ) +inline bool ScRefHandler::CanInputDone( sal_Bool bForced ) { return m_aHelper.CanInputDone( bForced ); } diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx index 608f95a3bb51..115a4f739363 100644 --- a/sc/source/ui/inc/areasave.hxx +++ b/sc/source/ui/inc/areasave.hxx @@ -44,7 +44,7 @@ private: String aOptions; String aSourceArea; ScRange aDestArea; - ULONG nRefresh; + sal_uLong nRefresh; public: ScAreaLinkSaver( const ScAreaLink& rSource ); @@ -53,8 +53,8 @@ public: virtual ScDataObject* Clone() const; - BOOL IsEqual( const ScAreaLink& rCompare ) const; - BOOL IsEqualSource( const ScAreaLink& rCompare ) const; + sal_Bool IsEqual( const ScAreaLink& rCompare ) const; + sal_Bool IsEqualSource( const ScAreaLink& rCompare ) const; void WriteToLink( ScAreaLink& rLink ) const; void InsertNewLink( ScDocument* pDoc ) const; @@ -70,9 +70,9 @@ public: virtual ScDataObject* Clone() const; - ScAreaLinkSaver* operator[](USHORT nIndex) const {return (ScAreaLinkSaver*)At(nIndex);} + ScAreaLinkSaver* operator[](sal_uInt16 nIndex) const {return (ScAreaLinkSaver*)At(nIndex);} - BOOL IsEqual( const ScDocument* pDoc ) const; + sal_Bool IsEqual( const ScDocument* pDoc ) const; void Restore( ScDocument* pDoc ) const; // returns NULL if empty diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index 08c6e3cf0a91..c5e0e4cde789 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -55,11 +55,11 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual void AddRefEntry(); - virtual BOOL IsTableLocked() const; + virtual sal_Bool IsTableLocked() const; virtual void SetActive(); virtual void Deactivate(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: ListBox aLbPrintArea; @@ -81,7 +81,7 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; formula::RefEdit* pRefInputEdit; ScDocument* pDoc; ScViewData* pViewData; @@ -90,9 +90,9 @@ private: #ifdef _AREASDLG_CXX private: void Impl_Reset(); - BOOL Impl_CheckRefStrings(); + sal_Bool Impl_CheckRefStrings(); void Impl_FillLists(); - BOOL Impl_GetItem( Edit* pEd, SfxStringItem& rItem ); + sal_Bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem ); // Handler: DECL_LINK( Impl_SelectHdl, ListBox* ); diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx index a5c7a2b554b4..a8bd1dfa81ee 100644 --- a/sc/source/ui/inc/asciiopt.hxx +++ b/sc/source/ui/inc/asciiopt.hxx @@ -59,19 +59,19 @@ class ScAsciiOptions { private: - BOOL bFixedLen; + sal_Bool bFixedLen; String aFieldSeps; - BOOL bMergeFieldSeps; + sal_Bool bMergeFieldSeps; bool bQuotedFieldAsText; bool bDetectSpecialNumber; sal_Unicode cTextSep; CharSet eCharSet; LanguageType eLang; - BOOL bCharSetSystem; + sal_Bool bCharSetSystem; long nStartRow; - USHORT nInfoCount; + sal_uInt16 nInfoCount; xub_StrLen* pColStart; //! TODO replace with vector - BYTE* pColFormat; //! TODO replace with vector + sal_uInt8* pColFormat; //! TODO replace with vector public: ScAsciiOptions(); @@ -82,7 +82,7 @@ public: ScAsciiOptions& operator=( const ScAsciiOptions& rCpy ); - BOOL operator==( const ScAsciiOptions& rCmp ) const; + sal_Bool operator==( const ScAsciiOptions& rCmp ) const; void ReadFromString( const String& rString ); String WriteToString() const; @@ -90,31 +90,31 @@ public: void InterpretColumnList( const String& rString ); CharSet GetCharSet() const { return eCharSet; } - BOOL GetCharSetSystem() const { return bCharSetSystem; } + sal_Bool GetCharSetSystem() const { return bCharSetSystem; } const String& GetFieldSeps() const { return aFieldSeps; } - BOOL IsMergeSeps() const { return bMergeFieldSeps; } + sal_Bool IsMergeSeps() const { return bMergeFieldSeps; } bool IsQuotedAsText() const { return bQuotedFieldAsText; } bool IsDetectSpecialNumber() const { return bDetectSpecialNumber; } sal_Unicode GetTextSep() const { return cTextSep; } - BOOL IsFixedLen() const { return bFixedLen; } - USHORT GetInfoCount() const { return nInfoCount; } + sal_Bool IsFixedLen() const { return bFixedLen; } + sal_uInt16 GetInfoCount() const { return nInfoCount; } const xub_StrLen* GetColStart() const { return pColStart; } - const BYTE* GetColFormat() const { return pColFormat; } + const sal_uInt8* GetColFormat() const { return pColFormat; } long GetStartRow() const { return nStartRow; } LanguageType GetLanguage() const { return eLang; } void SetCharSet( CharSet eNew ) { eCharSet = eNew; } - void SetCharSetSystem( BOOL bSet ) { bCharSetSystem = bSet; } - void SetFixedLen( BOOL bSet ) { bFixedLen = bSet; } + void SetCharSetSystem( sal_Bool bSet ) { bCharSetSystem = bSet; } + void SetFixedLen( sal_Bool bSet ) { bFixedLen = bSet; } void SetFieldSeps( const String& rStr ) { aFieldSeps = rStr; } - void SetMergeSeps( BOOL bSet ) { bMergeFieldSeps = bSet; } + void SetMergeSeps( sal_Bool bSet ) { bMergeFieldSeps = bSet; } void SetQuotedAsText(bool bSet) { bQuotedFieldAsText = bSet; } void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; } void SetTextSep( sal_Unicode c ) { cTextSep = c; } void SetStartRow( long nRow) { nStartRow= nRow; } void SetLanguage(LanguageType e) { eLang = e; } - void SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat ); + void SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat ); void SetColumnInfo( const ScCsvExpDataVec& rDataVec ); }; @@ -124,13 +124,13 @@ public: //CHINA001 class ScImportAsciiDlg : public ModalDialog //CHINA001 { //CHINA001 SvStream* pDatStream; -//CHINA001 ULONG* pRowPosArray; -//CHINA001 ULONG* pRowPosArrayUnicode; -//CHINA001 USHORT nArrayEndPos; -//CHINA001 USHORT nArrayEndPosUnicode; -//CHINA001 ULONG nStreamPos; -//CHINA001 ULONG nStreamPosUnicode; -//CHINA001 BOOL bVFlag; +//CHINA001 sal_uLong* pRowPosArray; +//CHINA001 sal_uLong* pRowPosArrayUnicode; +//CHINA001 sal_uInt16 nArrayEndPos; +//CHINA001 sal_uInt16 nArrayEndPosUnicode; +//CHINA001 sal_uLong nStreamPos; +//CHINA001 sal_uLong nStreamPosUnicode; +//CHINA001 sal_Bool bVFlag; //CHINA001 //CHINA001 FixedLine aFlFieldOpt; //CHINA001 FixedText aFtCharSet; diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx index 752ee01ddd62..de95dfcdaa2c 100644 --- a/sc/source/ui/inc/attrdlg.hxx +++ b/sc/source/ui/inc/attrdlg.hxx @@ -54,7 +54,7 @@ public: ~ScAttrDlg(); protected: - virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage ); + virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ); private: DECL_LINK( OkHandler, void* ); // fuer DoppelClick-Beenden in TabPages diff --git a/sc/source/ui/inc/auditsh.hxx b/sc/source/ui/inc/auditsh.hxx index 75059f4f88cc..d396857930f8 100644 --- a/sc/source/ui/inc/auditsh.hxx +++ b/sc/source/ui/inc/auditsh.hxx @@ -39,7 +39,7 @@ class ScAuditingShell : public SfxShell { private: ScViewData* pViewData; - USHORT nFunction; + sal_uInt16 nFunction; public: TYPEINFO(); diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx index 52a033c202b2..6ea0f6c7f358 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -75,7 +75,7 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; //CHINA001 ScDocument* pDoc ); //CHINA001 ~ScAutoFormatDlg(); //CHINA001 -//CHINA001 USHORT GetIndex() const { return nIndex; } +//CHINA001 sal_uInt16 GetIndex() const { return nIndex; } //CHINA001 String GetCurrFormatName(); //CHINA001 //CHINA001 private: @@ -106,9 +106,9 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; //CHINA001 //------------------------ //CHINA001 ScAutoFormat* pFormat; //CHINA001 const ScAutoFormatData* pSelFmtData; -//CHINA001 USHORT nIndex; -//CHINA001 BOOL bCoreDataChanged; -//CHINA001 BOOL bFmtInserted; +//CHINA001 sal_uInt16 nIndex; +//CHINA001 sal_Bool bCoreDataChanged; +//CHINA001 sal_Bool bFmtInserted; //CHINA001 //CHINA001 void Init (); //CHINA001 void UpdateChecks (); @@ -141,7 +141,7 @@ private: VirtualDevice aVD; SvtScriptedTextHelper aScriptedText; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBreakIter; - BOOL bFitWidth; + sal_Bool bFitWidth; svx::frame::Array maArray; /// Implementation to draw the frame borders. bool mbRTL; Size aPrvSize; @@ -160,7 +160,7 @@ private: //------------------------------------------- SC_DLLPRIVATE void Init (); SC_DLLPRIVATE void DoPaint ( const Rectangle& rRect ); - SC_DLLPRIVATE void CalcCellArray ( BOOL bFitWidth ); + SC_DLLPRIVATE void CalcCellArray ( sal_Bool bFitWidth ); SC_DLLPRIVATE void CalcLineMap (); SC_DLLPRIVATE void PaintCells (); @@ -168,7 +168,7 @@ private: conjunction with class svx::frame::Array (svx/framelinkarray.hxx), which expects size_t coordinates. */ - SC_DLLPRIVATE USHORT GetFormatIndex( size_t nCol, size_t nRow ) const; + SC_DLLPRIVATE sal_uInt16 GetFormatIndex( size_t nCol, size_t nRow ) const; SC_DLLPRIVATE const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const; SC_DLLPRIVATE const SvxLineItem& GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const; @@ -176,26 +176,26 @@ private: SC_DLLPRIVATE void DrawStrings(); SC_DLLPRIVATE void DrawBackground(); - SC_DLLPRIVATE void MakeFonts ( USHORT nIndex, + SC_DLLPRIVATE void MakeFonts ( sal_uInt16 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ); - SC_DLLPRIVATE String MakeNumberString( String cellString, BOOL bAddDec ); + SC_DLLPRIVATE String MakeNumberString( String cellString, sal_Bool bAddDec ); SC_DLLPRIVATE void DrawFrameLine ( const SvxBorderLine& rLineD, Point from, Point to, - BOOL bHorizontal, + sal_Bool bHorizontal, const SvxBorderLine& rLineLT, const SvxBorderLine& rLineL, const SvxBorderLine& rLineLB, const SvxBorderLine& rLineRT, const SvxBorderLine& rLineR, const SvxBorderLine& rLineRB ); - SC_DLLPRIVATE void CheckPriority ( USHORT nCurLine, + SC_DLLPRIVATE void CheckPriority ( sal_uInt16 nCurLine, AutoFmtLine eLine, SvxBorderLine& rLine ); - SC_DLLPRIVATE void GetLines ( USHORT nIndex, AutoFmtLine eLine, + SC_DLLPRIVATE void GetLines ( sal_uInt16 nIndex, AutoFmtLine eLine, SvxBorderLine& rLineD, SvxBorderLine& rLineLT, SvxBorderLine& rLineL, diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx index 5540ecf87aac..3423876f0616 100644 --- a/sc/source/ui/inc/autostyl.hxx +++ b/sc/source/ui/inc/autostyl.hxx @@ -41,13 +41,13 @@ private: ScDocShell* pDocSh; Timer aTimer; Timer aInitTimer; - ULONG nTimerStart; + sal_uLong nTimerStart; List aEntries; List aInitials; void ExecuteEntries(); - void AdjustEntries(ULONG nDiff); - void StartTimer(ULONG nNow); + void AdjustEntries(sal_uLong nDiff); + void StartTimer(sal_uLong nNow); DECL_LINK( TimerHdl, Timer* ); DECL_LINK( InitHdl, Timer* ); @@ -56,8 +56,8 @@ public: ~ScAutoStyleList(); void AddInitial( const ScRange& rRange, const String& rStyle1, - ULONG nTimeout, const String& rStyle2 ); - void AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle ); + sal_uLong nTimeout, const String& rStyle2 ); + void AddEntry( sal_uLong nTimeout, const ScRange& rRange, const String& rStyle ); void ExecuteAllNow(); }; diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx index 8de5dafe7768..a6e37137f62c 100644 --- a/sc/source/ui/inc/cbutton.hxx +++ b/sc/source/ui/inc/cbutton.hxx @@ -48,16 +48,16 @@ public: void Draw( const Point& rAt, const Size& rSize, - BOOL bState, - BOOL bBtnIn = FALSE ); + sal_Bool bState, + sal_Bool bBtnIn = sal_False ); void Draw( const Point& rAt, - BOOL bState, - BOOL bBtnIn = FALSE ) + sal_Bool bState, + sal_Bool bBtnIn = sal_False ) { Draw( rAt, aBtnSize, bState, bBtnIn ); } - void Draw( BOOL bState, - BOOL bBtnIn = FALSE ) + void Draw( sal_Bool bState, + sal_Bool bBtnIn = sal_False ) { Draw( aBtnPos, aBtnSize, bState, bBtnIn ); } void SetOptSizePixel(); @@ -70,7 +70,7 @@ public: private: void ImpDrawArrow( const Rectangle& rRect, - BOOL bState ); + sal_Bool bState ); protected: OutputDevice* pOut; diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx index 563e18d96656..113574297368 100644 --- a/sc/source/ui/inc/cellsh.hxx +++ b/sc/source/ui/inc/cellsh.hxx @@ -57,12 +57,12 @@ class ScCellShell: public ScFormatShell { private: CellShell_Impl* pImpl; - BOOL bPastePossible; + sal_Bool bPastePossible; void GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ); void ExecuteExternalSource( const String& _rFile, const String& _rFilter, const String& _rOptions, - const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest ); + const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest ); DECL_LINK( ClipboardChanged, TransferableDataHelper* ); DECL_LINK( DialogClosed, AbstractScLinkedAreaDlg* ); diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx index 587412defea2..5616817b3679 100644 --- a/sc/source/ui/inc/colrowba.hxx +++ b/sc/source/ui/inc/colrowba.hxx @@ -50,24 +50,24 @@ public: ~ScColBar(); virtual SCCOLROW GetPos(); - virtual USHORT GetEntrySize( SCCOLROW nEntryNo ); + virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ); virtual String GetEntryText( SCCOLROW nEntryNo ); - virtual BOOL IsLayoutRTL(); // only for columns + virtual sal_Bool IsLayoutRTL(); // only for columns - virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize ); + virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ); virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ); - virtual void SetMarking( BOOL bSet ); + virtual void SetMarking( sal_Bool bSet ); virtual void SelectWindow(); - virtual BOOL IsDisabled(); - virtual BOOL ResizeAllowed(); + virtual sal_Bool IsDisabled(); + virtual sal_Bool ResizeAllowed(); virtual void DrawInvert( long nDragPos ); virtual String GetDragHelp( long nVal ); - BOOL UseNumericHeader() const; + sal_Bool UseNumericHeader() const; }; @@ -84,19 +84,19 @@ public: ~ScRowBar(); virtual SCCOLROW GetPos(); - virtual USHORT GetEntrySize( SCCOLROW nEntryNo ); + virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ); virtual String GetEntryText( SCCOLROW nEntryNo ); - virtual BOOL IsMirrored(); // only for columns + virtual sal_Bool IsMirrored(); // only for columns virtual SCROW GetHiddenCount( SCROW nEntryNo ); // only for columns - virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize ); + virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ); virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ); - virtual void SetMarking( BOOL bSet ); + virtual void SetMarking( sal_Bool bSet ); virtual void SelectWindow(); - virtual BOOL IsDisabled(); - virtual BOOL ResizeAllowed(); + virtual sal_Bool IsDisabled(); + virtual sal_Bool ResizeAllowed(); virtual void DrawInvert( long nDragPos ); diff --git a/sc/source/ui/inc/condfrmt.hxx b/sc/source/ui/inc/condfrmt.hxx index ecd4c529d57a..3909792d753d 100644 --- a/sc/source/ui/inc/condfrmt.hxx +++ b/sc/source/ui/inc/condfrmt.hxx @@ -53,9 +53,9 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual void AddRefEntry(); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: CheckBox aCbxCond1; @@ -125,7 +125,7 @@ private: Size aCond3Size3; formula::RefEdit* pEdActive; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; ScDocument* pDoc; #ifdef _CONDFRMT_CXX diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index faeecb370c78..342de87f7bbe 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -49,7 +49,7 @@ enum ScConflictAction SC_CONFLICT_ACTION_KEEP_OTHER }; -typedef ::std::vector< ULONG > ScChangeActionList; +typedef ::std::vector< sal_uLong > ScChangeActionList; //============================================================================= @@ -62,8 +62,8 @@ struct ScConflictsListEntry ScChangeActionList maSharedActions; ScChangeActionList maOwnActions; - bool HasSharedAction( ULONG nSharedAction ) const; - bool HasOwnAction( ULONG nOwnAction ) const; + bool HasSharedAction( sal_uLong nSharedAction ) const; + bool HasOwnAction( sal_uLong nOwnAction ) const; }; @@ -82,11 +82,11 @@ private: static void Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap ); public: -//UNUSED2008-05 static bool HasSharedAction( ScConflictsList& rConflictsList, ULONG nSharedAction ); - static bool HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction ); +//UNUSED2008-05 static bool HasSharedAction( ScConflictsList& rConflictsList, sal_uLong nSharedAction ); + static bool HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction ); - static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction ); - static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction ); + static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, sal_uLong nSharedAction ); + static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction ); static void TransformConflictsList( ScConflictsList& rConflictsList, ScChangeActionMergeMap* pSharedMap, ScChangeActionMergeMap* pOwnMap ); @@ -101,19 +101,19 @@ class ScConflictsFinder { private: ScChangeTrack* mpTrack; - ULONG mnStartShared; - ULONG mnEndShared; - ULONG mnStartOwn; - ULONG mnEndOwn; + sal_uLong mnStartShared; + sal_uLong mnEndShared; + sal_uLong mnStartOwn; + sal_uLong mnEndOwn; ScConflictsList& mrConflictsList; static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 ); ScConflictsListEntry* GetIntersectingEntry( const ScChangeAction* pAction ) const; - ScConflictsListEntry* GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions ); + ScConflictsListEntry* GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions ); public: - ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared, - ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList ); + ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared, + sal_uLong nStartOwn, sal_uLong nEndOwn, ScConflictsList& rConflictsList ); virtual ~ScConflictsFinder(); bool Find(); @@ -152,7 +152,7 @@ public: ScConflictsListBox( Window* pParent, const ResId& rResId ); ~ScConflictsListBox(); -//UNUSED2008-05 ULONG GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const; +//UNUSED2008-05 sal_uLong GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const; }; //============================================================================= diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index e82e2619cce0..fc53a377420d 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -60,10 +60,10 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const { return TRUE; } + virtual sal_Bool IsRefInputMode() const { return sal_True; } virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); protected: virtual void Deactivate(); @@ -107,17 +107,17 @@ private: ScDocument* pDoc; ScRangeUtil* pRangeUtil; ScAreaData* pAreaData; - USHORT nAreaDataCount; - USHORT nWhichCons; + sal_uInt16 nAreaDataCount; + sal_uInt16 nWhichCons; formula::RefEdit* pRefInputEdit; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; #ifdef _CONSDLG_CXX private: void Init (); void FillAreaLists (); - BOOL VerifyEdit ( formula::RefEdit* pEd ); + sal_Bool VerifyEdit ( formula::RefEdit* pEd ); DECL_LINK( OkHdl, void* ); DECL_LINK( ClickHdl, PushButton* ); @@ -125,8 +125,8 @@ private: DECL_LINK( ModifyHdl, formula::RefEdit* ); DECL_LINK( SelectHdl, ListBox* ); - ScSubTotalFunc LbPosToFunc( USHORT nPos ); - USHORT FuncToLbPos( ScSubTotalFunc eFunc ); + ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos ); + sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc ); #endif // _CONSDLG_CXX }; diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index b7d4d292c406..1e775345d42e 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -50,7 +50,7 @@ class ScAreaLink; #define SC_CONTENT_DRAWING 8 #define SC_CONTENT_COUNT 9 -const ULONG SC_CONTENT_NOCHILD = ~0UL; +const sal_uLong SC_CONTENT_NOCHILD = ~0UL; // // TreeListBox fuer Inhalte @@ -62,24 +62,24 @@ class ScContentTree : public SvTreeListBox ImageList aEntryImages; ImageList aHCEntryImages; SvLBoxEntry* pRootNodes[SC_CONTENT_COUNT]; - USHORT nRootType; // als Root eingestellt + sal_uInt16 nRootType; // als Root eingestellt String aManualDoc; // im Navigator umgeschaltet (Title) - BOOL bHiddenDoc; // verstecktes aktiv? + sal_Bool bHiddenDoc; // verstecktes aktiv? String aHiddenName; // URL zum Laden String aHiddenTitle; // fuer Anzeige ScDocument* pHiddenDocument; // temporaer - USHORT pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge + sal_uInt16 pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge - static BOOL bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird + static sal_Bool bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird ScDocShell* GetManualOrCurrent(); - void InitRoot(USHORT nType); - void ClearType(USHORT nType); + void InitRoot(sal_uInt16 nType); + void ClearType(sal_uInt16 nType); void ClearAll(); - void InsertContent( USHORT nType, const String& rValue ); - void GetDrawNames( USHORT nType ); + void InsertContent( sal_uInt16 nType, const String& rValue ); + void GetDrawNames( sal_uInt16 nType ); void GetTableNames(); void GetAreaNames(); @@ -90,24 +90,24 @@ class ScContentTree : public SvTreeListBox void GetDrawingNames(); void GetNoteStrings(); - static bool IsPartOfType( USHORT nContentType, USHORT nObjIdentifier ); + static bool IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier ); - BOOL DrawNamesChanged( USHORT nType ); - BOOL NoteStringsChanged(); + sal_Bool DrawNamesChanged( sal_uInt16 nType ); + sal_Bool NoteStringsChanged(); - ScAddress GetNotePos( ULONG nIndex ); - const ScAreaLink* GetLink( ULONG nIndex ); + ScAddress GetNotePos( sal_uLong nIndex ); + const ScAreaLink* GetLink( sal_uLong nIndex ); /** Returns the indexes of the specified listbox entry. @param rnRootIndex Root index of specified entry is returned. @param rnChildIndex Index of the entry inside its root is returned (or SC_CONTENT_NOCHILD if entry is root). @param pEntry The entry to examine. */ - void GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const; + void GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const; /** Returns the child index of the specified listbox entry. @param pEntry The entry to examine or NULL for the selected entry. @return Index of the entry inside its root or SC_CONTENT_NOCHILD if entry is root. */ - ULONG GetChildIndex( SvLBoxEntry* pEntry ) const; + sal_uLong GetChildIndex( SvLBoxEntry* pEntry ) const; void DoDrag(); //UNUSED2008-05 void AdjustTitle(); @@ -118,8 +118,8 @@ class ScContentTree : public SvTreeListBox DECL_STATIC_LINK( ScContentTree, ExecDragHdl, void* ); protected: -// virtual BOOL Drop( const DropEvent& rEvt ); -// virtual BOOL QueryDrop( DropEvent& rEvt ); +// virtual sal_Bool Drop( const DropEvent& rEvt ); +// virtual sal_Bool QueryDrop( DropEvent& rEvt ); using SvTreeListBox::ExecuteDrop; @@ -138,18 +138,18 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void KeyInput( const KeyEvent& rKEvt ); - void InitWindowBits( BOOL bButtons ); + void InitWindowBits( sal_Bool bButtons ); - void Refresh( USHORT nType = 0 ); + void Refresh( sal_uInt16 nType = 0 ); void ToggleRoot(); - void SetRootType( USHORT nNew ); - USHORT GetRootType() const { return nRootType; } + void SetRootType( sal_uInt16 nNew ); + sal_uInt16 GetRootType() const { return nRootType; } void ActiveDocChanged(); void ResetManualDoc(); void SetManualDoc(const String& rName); - BOOL LoadFile(const String& rUrl); + sal_Bool LoadFile(const String& rUrl); void SelectDoc(const String& rName); const String& GetHiddenTitle() const { return aHiddenTitle; } @@ -159,7 +159,7 @@ public: /** Stores the current listbox state in the navigator settings. */ void StoreSettings() const; - static BOOL IsInDrag() { return bIsInDrag; } + static sal_Bool IsInDrag() { return bIsInDrag; } }; diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx index 424326565619..0d7d68913a61 100644 --- a/sc/source/ui/inc/corodlg.hxx +++ b/sc/source/ui/inc/corodlg.hxx @@ -47,8 +47,8 @@ class ScColRowLabelDlg : public ModalDialog { public: ScColRowLabelDlg( Window* pParent, - BOOL bCol = FALSE, - BOOL bRow = FALSE ) + sal_Bool bCol = sal_False, + sal_Bool bRow = sal_False ) : ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ), aFlColRow ( this, ScResId(6) ), aBtnRow ( this, ScResId(2) ), @@ -62,8 +62,8 @@ public: aBtnRow.Check( bRow ); } - BOOL IsCol() { return aBtnCol.IsChecked(); } - BOOL IsRow() { return aBtnRow.IsChecked(); } + sal_Bool IsCol() { return aBtnCol.IsChecked(); } + sal_Bool IsRow() { return aBtnRow.IsChecked(); } private: FixedLine aFlColRow; diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx index 77d844d161b3..6b920c31afa6 100644 --- a/sc/source/ui/inc/crdlg.hxx +++ b/sc/source/ui/inc/crdlg.hxx @@ -45,7 +45,7 @@ public: ScColOrRowDlg( Window* pParent, const String& rStrTitle, const String& rStrLabel, - BOOL bColDefault = TRUE ); + sal_Bool bColDefault = sal_True ); ~ScColOrRowDlg(); private: diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index e45ff4403633..cfb859b82895 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -50,9 +50,9 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: FixedLine aFlAssign; @@ -83,15 +83,15 @@ private: ScViewData* pViewData; ScDocument* pDoc; formula::RefEdit* pEdActive; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; #ifdef _CRNRDLG_CXX private: void Init (); void UpdateNames (); - void UpdateRangeData ( const ScRange& rRange, BOOL bColName ); - void SetColRowData( const ScRange& rLabelRange,BOOL bRef=FALSE); - void AdjustColRowData( const ScRange& rDataRange,BOOL bRef=FALSE); + void UpdateRangeData ( const ScRange& rRange, sal_Bool bColName ); + void SetColRowData( const ScRange& rLabelRange,sal_Bool bRef=sal_False); + void AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef=sal_False); DECL_LINK( CancelBtnHdl, void * ); DECL_LINK( OkBtnHdl, void * ); DECL_LINK( AddBtnHdl, void * ); diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx index 52be4b4ebd8c..0ae09022d3f7 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -77,7 +77,7 @@ public: virtual void SetPosSizePixel( long nX, long nY, long nWidth, long nHeight, - USHORT nFlags = WINDOW_POSSIZE_ALL ); + sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); /** Apply current layout data to the ruler. */ void ApplyLayout( const ScCsvLayoutData& rOldData ); @@ -89,7 +89,7 @@ private: SC_DLLPRIVATE void InitSizeData(); /** Moves cursor to a new position. - @param bScroll TRUE = The method may scroll the ruler. */ + @param bScroll sal_True = The method may scroll the ruler. */ SC_DLLPRIVATE void MoveCursor( sal_Int32 nPos, bool bScroll = true ); /** Moves cursor to the given direction. */ SC_DLLPRIVATE void MoveCursorRel( ScMoveMode eDir ); @@ -150,7 +150,7 @@ private: /** Moves tracking to a new position. */ SC_DLLPRIVATE void MoveMouseTracking( sal_Int32 nPos ); /** Applies tracking action for the current tracking position. - @param bApply TRUE = apply action, FALSE = cancel action. */ + @param bApply sal_True = apply action, sal_False = cancel action. */ SC_DLLPRIVATE void EndMouseTracking( bool bApply ); // painting --------------------------------------------------------------- diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx index 07659b1dbc59..4222bc0bfec6 100644 --- a/sc/source/ui/inc/dapitype.hxx +++ b/sc/source/ui/inc/dapitype.hxx @@ -51,11 +51,11 @@ private: HelpButton aBtnHelp; public: - ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal ); + ScDataPilotSourceTypeDlg( Window* pParent, sal_Bool bEnableExternal ); ~ScDataPilotSourceTypeDlg(); - BOOL IsDatabase() const; - BOOL IsExternal() const; + sal_Bool IsDatabase() const; + sal_Bool IsExternal() const; }; diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx index efdd29b44738..c443be157f8c 100644 --- a/sc/source/ui/inc/dbdocfun.hxx +++ b/sc/source/ui/inc/dbdocfun.hxx @@ -81,42 +81,42 @@ public: void UpdateImport( const String& rTarget, const String& rDBName, const String& rTableName, const String& rStatement, - BOOL bNative, BYTE nType, + sal_Bool bNative, sal_uInt8 nType, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& xResultSet, const SbaSelectionList* pSelection ); - BOOL DoImport( SCTAB nTab, const ScImportParam& rParam, + sal_Bool DoImport( SCTAB nTab, const ScImportParam& rParam, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& xResultSet, - const SbaSelectionList* pSelection, BOOL bRecord, - BOOL bAddrInsert = FALSE ); + const SbaSelectionList* pSelection, sal_Bool bRecord, + sal_Bool bAddrInsert = sal_False ); - BOOL DoImportUno( const ScAddress& rPos, + sal_Bool DoImportUno( const ScAddress& rPos, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue>& aArgs ); static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame ); - BOOL Sort( SCTAB nTab, const ScSortParam& rSortParam, - BOOL bRecord, BOOL bPaint, BOOL bApi ); + sal_Bool Sort( SCTAB nTab, const ScSortParam& rSortParam, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); - SC_DLLPUBLIC BOOL Query( SCTAB nTab, const ScQueryParam& rQueryParam, - const ScRange* pAdvSource, BOOL bRecord, BOOL bApi ); + SC_DLLPUBLIC sal_Bool Query( SCTAB nTab, const ScQueryParam& rQueryParam, + const ScRange* pAdvSource, sal_Bool bRecord, sal_Bool bApi ); - BOOL DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, + sal_Bool DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, const ScSortParam* pForceNewSort, - BOOL bRecord, BOOL bApi ); + sal_Bool bRecord, sal_Bool bApi ); - BOOL AddDBRange( const String& rName, const ScRange& rRange, BOOL bApi ); - BOOL DeleteDBRange( const String& rName, BOOL bApi ); - BOOL RenameDBRange( const String& rOld, const String& rNew, BOOL bApi ); - BOOL ModifyDBData( const ScDBData& rNewData, BOOL bApi ); // Name unveraendert + sal_Bool AddDBRange( const String& rName, const ScRange& rRange, sal_Bool bApi ); + sal_Bool DeleteDBRange( const String& rName, sal_Bool bApi ); + sal_Bool RenameDBRange( const String& rOld, const String& rNew, sal_Bool bApi ); + sal_Bool ModifyDBData( const ScDBData& rNewData, sal_Bool bApi ); // Name unveraendert - BOOL RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi ); + sal_Bool RepeatDB( const String& rDBName, sal_Bool bRecord, sal_Bool bApi ); - BOOL DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj, - BOOL bRecord, BOOL bApi, BOOL bAllowMove = FALSE ); + sal_Bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj, + sal_Bool bRecord, sal_Bool bApi, sal_Bool bAllowMove = sal_False ); }; diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index baadae0a64dc..46d12646f13f 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -58,40 +58,40 @@ public: // nur UISort wiederholt bei Bedarf die Teilergebnisse void UISort( const ScSortParam& rSortParam, - BOOL bRecord = TRUE ); + sal_Bool bRecord = sal_True ); void Sort( const ScSortParam& rSortParam, - BOOL bRecord = TRUE, BOOL bPaint = TRUE ); + sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam, - const ScRange* pAdvSource, BOOL bRecord ); - void DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord = TRUE, + const ScRange* pAdvSource, sal_Bool bRecord ); + void DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord = sal_True, const ScSortParam* pForceNewSort = NULL ); void ToggleAutoFilter(); void HideAutoFilter(); - void RepeatDB( BOOL bRecord = TRUE ); + void RepeatDB( sal_Bool bRecord = sal_True ); - BOOL ImportData( const ScImportParam& rParam, BOOL bRecord = TRUE ); + sal_Bool ImportData( const ScImportParam& rParam, sal_Bool bRecord = sal_True ); void GotoDBArea( const String& rDBName ); // DB-Bereich vom Cursor - ScDBData* GetDBData( BOOL bMarkArea = TRUE, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP ); + ScDBData* GetDBData( sal_Bool bMarkArea = sal_True, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP ); void NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& rDelAreaList ); - void Consolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE ); + void Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True ); - bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable, - const ScDPObject& rSource, BOOL bApi = FALSE ); + bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable, + const ScDPObject& rSource, sal_Bool bApi = sal_False ); void DeletePivotTable(); // Wang Xu Ming -- 2009-6-17 // DataPilot Migration - ULONG RecalcPivotTable(); + sal_uLong RecalcPivotTable(); // End Comments - BOOL HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts ); - BOOL HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ); + sal_Bool HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts ); + sal_Bool HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ); void GroupDataPilot(); void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts ); void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo ); @@ -99,35 +99,35 @@ public: void DataPilotInput( const ScAddress& rPos, const String& rString ); bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL ); - BOOL DataPilotMove( const ScRange& rSource, const ScAddress& rDest ); + sal_Bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest ); - BOOL HasSelectionForDrillDown( USHORT& rOrientation ); - void SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName = NULL ); + sal_Bool HasSelectionForDrillDown( sal_uInt16& rOrientation ); + void SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName = NULL ); void ShowDataPilotSourceData( ScDPObject& rDPObj, const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters ); - void MakeOutline( BOOL bColumns, BOOL bRecord = TRUE ); - void RemoveOutline( BOOL bColumns, BOOL bRecord = TRUE ); - void RemoveAllOutlines( BOOL bRecord = TRUE ); - void TestRemoveOutline( BOOL& rCol, BOOL& rRow ); + void MakeOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True ); + void RemoveOutline( sal_Bool bColumns, sal_Bool bRecord = sal_True ); + void RemoveAllOutlines( sal_Bool bRecord = sal_True ); + void TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow ); - void AutoOutline( BOOL bRecord = TRUE ); + void AutoOutline( sal_Bool bRecord = sal_True ); - void SelectLevel( BOOL bColumns, USHORT nLevel, - BOOL bRecord = TRUE, BOOL bPaint = TRUE ); - void ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, - BOOL bRecord = TRUE, BOOL bPaint = TRUE ); - void HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, - BOOL bRecord = TRUE, BOOL bPaint = TRUE ); + void SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel, + sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); + void ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); + void HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); - void ShowMarkedOutlines( BOOL bRecord = TRUE ); - void HideMarkedOutlines( BOOL bRecord = TRUE ); - BOOL OutlinePossible(BOOL bHide); + void ShowMarkedOutlines( sal_Bool bRecord = sal_True ); + void HideMarkedOutlines( sal_Bool bRecord = sal_True ); + sal_Bool OutlinePossible(sal_Bool bHide); - void UpdateCharts(BOOL bAllCharts = FALSE); // Default: am Cursor + void UpdateCharts(sal_Bool bAllCharts = sal_False); // Default: am Cursor - static USHORT DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts ); + static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts ); }; diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx index cd878c651d6c..604a9b828984 100644 --- a/sc/source/ui/inc/dbnamdlg.hxx +++ b/sc/source/ui/inc/dbnamdlg.hxx @@ -58,9 +58,9 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: FixedLine aFlName; @@ -85,7 +85,7 @@ private: PushButton aBtnRemove; MoreButton aBtnMore; - BOOL bSaved; + sal_Bool bSaved; const String aStrAdd; // "Hinzufuegen" @@ -98,7 +98,7 @@ private: ScViewData* pViewData; ScDocument* pDoc; - BOOL bRefInputMode; + sal_Bool bRefInputMode; ScAddress::Details aAddrDetails; ScDBCollection aLocalDbCol; diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx index ae5cb565b4e7..d3a07ffcc482 100644 --- a/sc/source/ui/inc/delcldlg.hxx +++ b/sc/source/ui/inc/delcldlg.hxx @@ -52,7 +52,7 @@ private: public: - ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove = FALSE ); + ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove = sal_False ); ~ScDeleteCellDlg(); DelCellCmd GetDelCellCmd() const; diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx index 3991184d7c5e..7491dfab0e27 100644 --- a/sc/source/ui/inc/delcodlg.hxx +++ b/sc/source/ui/inc/delcodlg.hxx @@ -51,21 +51,21 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - BOOL bObjectsDisabled; + sal_Bool bObjectsDisabled; - static BOOL bPreviousAllCheck; - static USHORT nPreviousChecks; + static sal_Bool bPreviousAllCheck; + static sal_uInt16 nPreviousChecks; - void DisableChecks( BOOL bDelAllChecked = TRUE ); + void DisableChecks( sal_Bool bDelAllChecked = sal_True ); DECL_LINK( DelAllHdl, void * ); public: ScDeleteContentsDlg( Window* pParent, - USHORT nCheckDefaults = 0 ); + sal_uInt16 nCheckDefaults = 0 ); ~ScDeleteContentsDlg(); void DisableObjects(); - USHORT GetDelContentsCmdBits() const; + sal_uInt16 GetDelContentsCmdBits() const; }; diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx index e36e1a9af92f..7424f03e138d 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -53,11 +53,11 @@ class ScDocFunc private: ScDocShell& rDocShell; - BOOL AdjustRowHeight( const ScRange& rRange, BOOL bPaint = TRUE ); + sal_Bool AdjustRowHeight( const ScRange& rRange, sal_Bool bPaint = sal_True ); void CreateOneName( ScRangeName& rList, SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL& rCancel, BOOL bApi ); + sal_Bool& rCancel, sal_Bool bApi ); void NotifyInputHandler( const ScAddress& rPos ); public: @@ -66,27 +66,27 @@ public: DECL_LINK( NotifyDrawUndo, SdrUndoAction* ); - BOOL DetectiveAddPred(const ScAddress& rPos); - BOOL DetectiveDelPred(const ScAddress& rPos); - BOOL DetectiveAddSucc(const ScAddress& rPos); - BOOL DetectiveDelSucc(const ScAddress& rPos); - BOOL DetectiveAddError(const ScAddress& rPos); - BOOL DetectiveMarkInvalid(SCTAB nTab); - BOOL DetectiveDelAll(SCTAB nTab); - BOOL DetectiveRefresh(BOOL bAutomatic = FALSE); - - BOOL DeleteContents( const ScMarkData& rMark, USHORT nFlags, - BOOL bRecord, BOOL bApi ); - - BOOL TransliterateText( const ScMarkData& rMark, sal_Int32 nType, - BOOL bRecord, BOOL bApi ); - - BOOL SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi ); - BOOL PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi ); - BOOL PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, - BOOL bInterpret, BOOL bApi ); - BOOL SetCellText( const ScAddress& rPos, const String& rText, - BOOL bInterpret, BOOL bEnglish, BOOL bApi, + sal_Bool DetectiveAddPred(const ScAddress& rPos); + sal_Bool DetectiveDelPred(const ScAddress& rPos); + sal_Bool DetectiveAddSucc(const ScAddress& rPos); + sal_Bool DetectiveDelSucc(const ScAddress& rPos); + sal_Bool DetectiveAddError(const ScAddress& rPos); + sal_Bool DetectiveMarkInvalid(SCTAB nTab); + sal_Bool DetectiveDelAll(SCTAB nTab); + sal_Bool DetectiveRefresh(sal_Bool bAutomatic = sal_False); + + sal_Bool DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, + sal_Bool bRecord, sal_Bool bApi ); + + sal_Bool TransliterateText( const ScMarkData& rMark, sal_Int32 nType, + sal_Bool bRecord, sal_Bool bApi ); + + sal_Bool SetNormalString( const ScAddress& rPos, const String& rText, sal_Bool bApi ); + sal_Bool PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi ); + sal_Bool PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, + sal_Bool bInterpret, sal_Bool bApi ); + sal_Bool SetCellText( const ScAddress& rPos, const String& rText, + sal_Bool bInterpret, sal_Bool bEnglish, sal_Bool bApi, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ); @@ -98,90 +98,90 @@ public: bool ShowNote( const ScAddress& rPos, bool bShow = true ); inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); } - bool SetNoteText( const ScAddress& rPos, const String& rNoteText, BOOL bApi ); - bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi ); + bool SetNoteText( const ScAddress& rPos, const String& rNoteText, sal_Bool bApi ); + bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, sal_Bool bApi ); - BOOL ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, - BOOL bRecord, BOOL bApi ); - BOOL ApplyStyle( const ScMarkData& rMark, const String& rStyleName, - BOOL bRecord, BOOL bApi ); + sal_Bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, + sal_Bool bRecord, sal_Bool bApi ); + sal_Bool ApplyStyle( const ScMarkData& rMark, const String& rStyleName, + sal_Bool bRecord, sal_Bool bApi ); - BOOL InsertCells( const ScRange& rRange,const ScMarkData* pTabMark, - InsCellCmd eCmd, BOOL bRecord, BOOL bApi, - BOOL bPartOfPaste = FALSE ); - BOOL DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, - DelCellCmd eCmd, BOOL bRecord, BOOL bApi ); + sal_Bool InsertCells( const ScRange& rRange,const ScMarkData* pTabMark, + InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bApi, + sal_Bool bPartOfPaste = sal_False ); + sal_Bool DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, + DelCellCmd eCmd, sal_Bool bRecord, sal_Bool bApi ); - BOOL MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, - BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi ); + sal_Bool MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, + sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); - BOOL InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi ); - BOOL RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi ); - BOOL DeleteTable( SCTAB nTab, BOOL bRecord, BOOL bApi ); + sal_Bool InsertTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool RenameTable( SCTAB nTab, const String& rName, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi ); bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi ); bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi ); - BOOL SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi ); + sal_Bool SetTableVisible( SCTAB nTab, sal_Bool bVisible, sal_Bool bApi ); - BOOL SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi ); + sal_Bool SetLayoutRTL( SCTAB nTab, sal_Bool bRTL, sal_Bool bApi ); -//UNUSED2009-05 BOOL SetGrammar( formula::FormulaGrammar::Grammar eGrammar ); +//UNUSED2009-05 sal_Bool SetGrammar( formula::FormulaGrammar::Grammar eGrammar ); - SC_DLLPUBLIC BOOL SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, - SCTAB nTab, ScSizeMode eMode, USHORT nSizeTwips, - BOOL bRecord, BOOL bApi ); + SC_DLLPUBLIC sal_Bool SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, + SCTAB nTab, ScSizeMode eMode, sal_uInt16 nSizeTwips, + sal_Bool bRecord, sal_Bool bApi ); - BOOL InsertPageBreak( BOOL bColumn, const ScAddress& rPos, - BOOL bRecord, BOOL bSetModified, BOOL bApi ); - BOOL RemovePageBreak( BOOL bColumn, const ScAddress& rPos, - BOOL bRecord, BOOL bSetModified, BOOL bApi ); + sal_Bool InsertPageBreak( sal_Bool bColumn, const ScAddress& rPos, + sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi ); + sal_Bool RemovePageBreak( sal_Bool bColumn, const ScAddress& rPos, + sal_Bool bRecord, sal_Bool bSetModified, sal_Bool bApi ); void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ); - BOOL Protect( SCTAB nTab, const String& rPassword, BOOL bApi ); - BOOL Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi ); + sal_Bool Protect( SCTAB nTab, const String& rPassword, sal_Bool bApi ); + sal_Bool Unprotect( SCTAB nTab, const String& rPassword, sal_Bool bApi ); - BOOL ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi ); - BOOL ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi ); - BOOL AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, - USHORT nFormatNo, BOOL bRecord, BOOL bApi ); + sal_Bool ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, sal_Bool bApi ); + sal_Bool ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, sal_Bool bApi ); + sal_Bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, + sal_uInt16 nFormatNo, sal_Bool bRecord, sal_Bool bApi ); - BOOL EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, + sal_Bool EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, const ScTokenArray* pTokenArray, - const String& rString, BOOL bApi, BOOL bEnglish, + const String& rString, sal_Bool bApi, sal_Bool bEnglish, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar ); - BOOL TabOp( const ScRange& rRange, const ScMarkData* pTabMark, - const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi ); + sal_Bool TabOp( const ScRange& rRange, const ScMarkData* pTabMark, + const ScTabOpParam& rParam, sal_Bool bRecord, sal_Bool bApi ); - BOOL FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, - FillDir eDir, BOOL bRecord, BOOL bApi ); - BOOL FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, + sal_Bool FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, + FillDir eDir, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, double fStart, double fStep, double fMax, - BOOL bRecord, BOOL bApi ); + sal_Bool bRecord, sal_Bool bApi ); // FillAuto: rRange wird von Source-Range auf Dest-Range angepasst - BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark, - FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi ); + sal_Bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, + FillDir eDir, sal_uLong nCount, sal_Bool bRecord, sal_Bool bApi ); - BOOL ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi ); + sal_Bool ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, sal_Bool bApi ); - BOOL MergeCells( const ScRange& rRange, BOOL bContents, - BOOL bRecord, BOOL bApi ); - BOOL UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi ); + sal_Bool MergeCells( const ScRange& rRange, sal_Bool bContents, + sal_Bool bRecord, sal_Bool bApi ); + sal_Bool UnmergeCells( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ); - BOOL SetNewRangeNames( ScRangeName* pNewRanges, BOOL bApi ); // takes ownership of pNewRanges - BOOL ModifyRangeNames( const ScRangeName& rNewRanges, BOOL bApi ); + sal_Bool SetNewRangeNames( ScRangeName* pNewRanges, sal_Bool bApi ); // takes ownership of pNewRanges + sal_Bool ModifyRangeNames( const ScRangeName& rNewRanges, sal_Bool bApi ); - BOOL CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi ); - BOOL InsertNameList( const ScAddress& rStartPos, BOOL bApi ); + sal_Bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, sal_Bool bApi ); + sal_Bool InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ); - BOOL InsertAreaLink( const String& rFile, const String& rFilter, + sal_Bool InsertAreaLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - const ScRange& rDestRange, ULONG nRefresh, - BOOL bFitBlock, BOOL bApi ); + const ScRange& rDestRange, sal_uLong nRefresh, + sal_Bool bFitBlock, sal_Bool bApi ); }; diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 19147cfaf61f..03a086223742 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -72,7 +72,7 @@ class ScSheetSaveData; namespace sfx2 { class FileDialogHelper; } struct DocShell_Impl; -typedef ::std::hash_map< ULONG, ULONG > ScChangeActionMergeMap; +typedef ::std::hash_map< sal_uLong, sal_uLong > ScChangeActionMergeMap; //================================================================== @@ -100,16 +100,16 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener //SfxObjectCreateMode eShellMode; - BOOL bIsInplace; // wird von der View gesetzt - BOOL bHeaderOn; - BOOL bFooterOn; - BOOL bNoInformLost; - BOOL bIsEmpty; - BOOL bIsInUndo; - BOOL bDocumentModifiedPending; - USHORT nDocumentLock; + sal_Bool bIsInplace; // wird von der View gesetzt + sal_Bool bHeaderOn; + sal_Bool bFooterOn; + sal_Bool bNoInformLost; + sal_Bool bIsEmpty; + sal_Bool bIsInUndo; + sal_Bool bDocumentModifiedPending; + sal_uInt16 nDocumentLock; sal_Int16 nCanUpdate; // stores the UpdateDocMode from loading a document till update links - BOOL bUpdateEnabled; + sal_Bool bUpdateEnabled; ScDBData* pOldAutoDBRange; @@ -143,23 +143,23 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener ScDocShell & mrDocShell; }; - SC_DLLPRIVATE BOOL LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); - SC_DLLPRIVATE BOOL SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); + SC_DLLPRIVATE sal_Bool LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); + SC_DLLPRIVATE sal_Bool SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); SC_DLLPRIVATE SCTAB GetSaveTab(); - SC_DLLPRIVATE ULONG DBaseImport( const String& rFullFileName, CharSet eCharSet, - BOOL bSimpleColWidth[MAXCOLCOUNT] ); - SC_DLLPRIVATE ULONG DBaseExport( const String& rFullFileName, CharSet eCharSet, - BOOL& bHasMemo ); + SC_DLLPRIVATE sal_uLong DBaseImport( const String& rFullFileName, CharSet eCharSet, + sal_Bool bSimpleColWidth[MAXCOLCOUNT] ); + SC_DLLPRIVATE sal_uLong DBaseExport( const String& rFullFileName, CharSet eCharSet, + sal_Bool& bHasMemo ); - SC_DLLPRIVATE static BOOL MoveFile( const INetURLObject& rSource, const INetURLObject& rDest ); - SC_DLLPRIVATE static BOOL KillFile( const INetURLObject& rURL ); - SC_DLLPRIVATE static BOOL IsDocument( const INetURLObject& rURL ); + SC_DLLPRIVATE static sal_Bool MoveFile( const INetURLObject& rSource, const INetURLObject& rDest ); + SC_DLLPRIVATE static sal_Bool KillFile( const INetURLObject& rURL ); + SC_DLLPRIVATE static sal_Bool IsDocument( const INetURLObject& rURL ); - SC_DLLPRIVATE void LockPaint_Impl(BOOL bDoc); - SC_DLLPRIVATE void UnlockPaint_Impl(BOOL bDoc); - SC_DLLPRIVATE void LockDocument_Impl(USHORT nNew); - SC_DLLPRIVATE void UnlockDocument_Impl(USHORT nNew); + SC_DLLPRIVATE void LockPaint_Impl(sal_Bool bDoc); + SC_DLLPRIVATE void UnlockPaint_Impl(sal_Bool bDoc); + SC_DLLPRIVATE void LockDocument_Impl(sal_uInt16 nNew); + SC_DLLPRIVATE void UnlockDocument_Impl(sal_uInt16 nNew); SC_DLLPRIVATE void EnableSharedSettings( bool bEnable ); SC_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > LoadSharedDocument(); @@ -181,8 +181,8 @@ public: ~ScDocShell(); using SotObject::GetInterface; - using SfxShell::Activate; // with BOOL bMDI - using SfxShell::Deactivate; // with BOOL bMDI + using SfxShell::Activate; // with sal_Bool bMDI + using SfxShell::Deactivate; // with sal_Bool bMDI using SfxObjectShell::Print; // print styles virtual void Activate(); @@ -198,38 +198,38 @@ public: sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const; - virtual BOOL InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); - virtual BOOL Load( SfxMedium& rMedium ); - virtual BOOL LoadFrom( SfxMedium& rMedium ); - virtual BOOL ConvertFrom( SfxMedium &rMedium ); - virtual BOOL Save(); - virtual BOOL SaveAs( SfxMedium& rMedium ); - virtual BOOL ConvertTo( SfxMedium &rMedium ); - virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE ); + virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); + virtual sal_Bool Load( SfxMedium& rMedium ); + virtual sal_Bool LoadFrom( SfxMedium& rMedium ); + virtual sal_Bool ConvertFrom( SfxMedium &rMedium ); + virtual sal_Bool Save(); + virtual sal_Bool SaveAs( SfxMedium& rMedium ); + virtual sal_Bool ConvertTo( SfxMedium &rMedium ); + virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); virtual void PrepareReload(); - virtual BOOL IsInformationLost(); + virtual sal_Bool IsInformationLost(); virtual void LoadStyles( SfxObjectShell &rSource ); - virtual BOOL Insert( SfxObjectShell &rSource, - USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3, - USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted ); + virtual sal_Bool Insert( SfxObjectShell &rSource, + sal_uInt16 nSourceIdx1, sal_uInt16 nSourceIdx2, sal_uInt16 nSourceIdx3, + sal_uInt16 &nIdx1, sal_uInt16 &nIdx2, sal_uInt16 &nIdx3, sal_uInt16 &rIdxDeleted ); - virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject - virtual BOOL DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell - virtual sal_Bool QuerySlotExecutable( USHORT nSlotId ); + virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject + virtual sal_Bool DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell + virtual sal_Bool QuerySlotExecutable( sal_uInt16 nSlotId ); virtual void Draw( OutputDevice *, const JobSetup & rSetup, - USHORT nAspect = ASPECT_CONTENT ); + sal_uInt16 nAspect = ASPECT_CONTENT ); virtual void SetVisArea( const Rectangle & rVisArea ); using SfxObjectShell::GetVisArea; - virtual Rectangle GetVisArea( USHORT nAspect ) const; + virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const; virtual Printer* GetDocumentPrinter(); - virtual void SetModified( BOOL = TRUE ); + virtual void SetModified( sal_Bool = sal_True ); - void SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart ); + void SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifyStart ); virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( Window *pParent, const SfxItemSet &rSet ); @@ -239,8 +239,8 @@ public: ScDocument* GetDocument() { return &aDocument; } ScDocFunc& GetDocFunc() { return *pDocFunc; } - SfxPrinter* GetPrinter( BOOL bCreateIfNotExist = TRUE ); - USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL ); + SfxPrinter* GetPrinter( sal_Bool bCreateIfNotExist = sal_True ); + sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL ); void UpdateFontList(); @@ -259,59 +259,59 @@ public: void GetStatePageStyle( SfxViewShell& rCaller, SfxItemSet& rSet, SCTAB nCurTab ); void CompareDocument( ScDocument& rOtherDoc ); - void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, ULONG nOffset = 0, ScChangeActionMergeMap* pMergeMap = NULL, bool bInverseMap = false ); + void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, sal_uLong nOffset = 0, ScChangeActionMergeMap* pMergeMap = NULL, bool bInverseMap = false ); bool MergeSharedDocument( ScDocShell* pSharedDocShell ); ScChangeAction* GetChangeAction( const ScAddress& rPos ); void SetChangeComment( ScChangeAction* pAction, const String& rComment ); - void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext=TRUE ); + void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,sal_Bool bPrevNext=sal_True ); /// Protect/unprotect ChangeTrack and return if /// protection was successfully changed. - /// If bJustQueryIfProtected==TRUE protection is not + /// If bJustQueryIfProtected==sal_True protection is not /// changed and is returned if not protected or /// password was entered correctly. - BOOL ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected = FALSE ); + sal_Bool ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected = sal_False ); - void SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ); - BOOL AdjustPrintZoom( const ScRange& rRange ); + void SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages ); + sal_Bool AdjustPrintZoom( const ScRange& rRange ); - void LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles ); + void LoadStylesArgs( ScDocShell& rSource, sal_Bool bReplace, sal_Bool bCellStyles, sal_Bool bPageStyles ); - void PageStyleModified( const String& rStyleName, BOOL bApi ); + void PageStyleModified( const String& rStyleName, sal_Bool bApi ); void NotifyStyle( const SfxStyleSheetHint& rHint ); void DoAutoStyle( const ScRange& rRange, const String& rStyle ); Window* GetActiveDialogParent(); - void ErrorMessage( USHORT nGlobStrId ); - BOOL IsEditable() const; + void ErrorMessage( sal_uInt16 nGlobStrId ); + sal_Bool IsEditable() const; - BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ); + sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ); void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL ); void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false ); void RefreshPivotTables( const ScRange& rSource ); - void DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE ); - void UseScenario( SCTAB nTab, const String& rName, BOOL bRecord = TRUE ); + void DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bRecord = sal_True ); + void UseScenario( SCTAB nTab, const String& rName, sal_Bool bRecord = sal_True ); SCTAB MakeScenario( SCTAB nTab, const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags, - ScMarkData& rMark, BOOL bRecord = TRUE ); + const Color& rColor, sal_uInt16 nFlags, + ScMarkData& rMark, sal_Bool bRecord = sal_True ); void ModifyScenario( SCTAB nTab, const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ); - BOOL MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord ); + const Color& rColor, sal_uInt16 nFlags ); + sal_Bool MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, sal_Bool bRecord ); - void DoRecalc( BOOL bApi ); - void DoHardRecalc( BOOL bApi ); + void DoRecalc( sal_Bool bApi ); + void DoHardRecalc( sal_Bool bApi ); bool CheckPrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData, bool bForceSelected, bool bIsAPI ); void PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData ); void Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, ScMarkData* pMarkData, Window* pDialogParent, - BOOL bForceSelected, BOOL bIsAPI ); + sal_Bool bForceSelected, sal_Bool bIsAPI ); - void UpdateOle( const ScViewData* pViewData, BOOL bSnapSize = FALSE ); - BOOL IsOle(); + void UpdateOle( const ScViewData* pViewData, sal_Bool bSnapSize = sal_False ); + sal_Bool IsOle(); void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel ); @@ -319,14 +319,14 @@ public: void CancelAutoDBRange(); // called when dialog is cancelled void UpdateLinks(); // Link-Eintraege aktuallisieren - BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren) + sal_Bool ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren) void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos ); void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, - SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart, - USHORT nExtFlags = 0 ); - void PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags = 0 ); + SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, sal_uInt16 nPart, + sal_uInt16 nExtFlags = 0 ); + void PostPaint( const ScRange& rRange, sal_uInt16 nPart, sal_uInt16 nExtFlags = 0 ); void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab ); void PostPaintCell( const ScAddress& rPos ); @@ -335,17 +335,17 @@ public: void PostDataChanged(); - void UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, + void UpdatePaintExt( sal_uInt16& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab ); - void UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange ); + void UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange ); - void SetDocumentModified( BOOL bIsModified = TRUE ); - void SetDrawModified( BOOL bIsModified = TRUE ); + void SetDocumentModified( sal_Bool bIsModified = sal_True ); + void SetDrawModified( sal_Bool bIsModified = sal_True ); void LockPaint(); void UnlockPaint(); - USHORT GetLockCount() const; - void SetLockCount(USHORT nNew); + sal_uInt16 GetLockCount() const; + void SetLockCount(sal_uInt16 nNew); void LockDocument(); void UnlockDocument(); @@ -354,19 +354,19 @@ public: virtual SfxStyleSheetBasePool* GetStyleSheetPool(); - void SetInplace( BOOL bInplace ); - BOOL IsEmpty() const; - void SetEmpty(BOOL bSet); + void SetInplace( sal_Bool bInplace ); + sal_Bool IsEmpty() const; + void SetEmpty(sal_Bool bSet); - BOOL IsInUndo() const { return bIsInUndo; } - void SetInUndo(BOOL bSet); + sal_Bool IsInUndo() const { return bIsInUndo; } + void SetInUndo(sal_Bool bSet); void CalcOutputFactor(); double GetOutputFactor() const; void GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, SCTAB nCurTab, - BOOL& rbHeader, - BOOL& rbFooter ); + sal_Bool& rbHeader, + sal_Bool& rbFooter ); virtual long DdeGetData( const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any & rValue ); @@ -378,17 +378,17 @@ public: SfxBindings* GetViewBindings(); - ScTabViewShell* GetBestViewShell( BOOL bOnlyVisible = TRUE ); + ScTabViewShell* GetBestViewShell( sal_Bool bOnlyVisible = sal_True ); ScSbxDocHelper* GetDocHelperObject() { return pDocHelper; } - void SetDocumentModifiedPending( BOOL bVal ) + void SetDocumentModifiedPending( sal_Bool bVal ) { bDocumentModifiedPending = bVal; } - BOOL IsDocumentModifiedPending() const + sal_Bool IsDocumentModifiedPending() const { return bDocumentModifiedPending; } - BOOL IsUpdateEnabled() const + sal_Bool IsUpdateEnabled() const { return bUpdateEnabled; } - void SetUpdateEnabled(BOOL bValue) + void SetUpdateEnabled(sal_Bool bValue) { bUpdateEnabled = bValue; } OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice... @@ -396,7 +396,7 @@ public: static ScViewData* GetViewData(); static SCTAB GetCurTab(); - static ScDocShell* GetShellByNum( USHORT nDocNo ); + static ScDocShell* GetShellByNum( sal_uInt16 nDocNo ); static String GetOwnFilterName(); static String GetHtmlFilterName(); static String GetWebQueryFilterName(); @@ -404,7 +404,7 @@ public: static String GetLotusFilterName(); static String GetDBaseFilterName(); static String GetDifFilterName(); - static BOOL HasAutomaticTableName( const String& rFilter ); + static sal_Bool HasAutomaticTableName( const String& rFilter ); DECL_LINK( RefreshDBDataHdl, ScRefreshTimer* ); @@ -448,8 +448,8 @@ class SC_DLLPUBLIC ScDocShellModificator { ScDocShell& rDocShell; ScRefreshTimerProtector aProtector; - BOOL bAutoCalcShellDisabled; - BOOL bIdleDisabled; + sal_Bool bAutoCalcShellDisabled; + sal_Bool bIdleDisabled; // not implemented ScDocShellModificator( const ScDocShellModificator& ); diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx index 25cb3e05acac..c3da78d9b91a 100644 --- a/sc/source/ui/inc/dpcontrol.hxx +++ b/sc/source/ui/inc/dpcontrol.hxx @@ -114,7 +114,7 @@ public: virtual void execute() = 0; }; - explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel = 0); + explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, sal_uInt16 nMenuStackLevel = 0); virtual ~ScMenuFloatingWindow(); virtual void MouseMove(const MouseEvent& rMEvt); diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx index d417d1427dda..433d46100de9 100644 --- a/sc/source/ui/inc/drawsh.hxx +++ b/sc/source/ui/inc/drawsh.hxx @@ -78,13 +78,13 @@ public: void StateFormatPaintbrush(SfxItemSet& rSet); void ExecuteMacroAssign( SdrObject* pObj, Window* pWin ); - void ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff ); - void ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff ); - void ExecuteTextAttrDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff ); + void ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff ); + void ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff ); + void ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff ); ScDrawView* GetDrawView(); - BOOL AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark); + sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark); }; diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index fa6b03638551..7112fbacddf9 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -48,7 +48,7 @@ class ScDrawView: public FmFormView Fraction aScaleY; SdrDropMarkerOverlay* pDropMarker; SdrObject* pDropMarkObj; - BOOL bInConstruct; + sal_Bool bInConstruct; //HMHBOOL bDisableHdl; void Construct(); @@ -81,12 +81,12 @@ public: //HMHBOOL IsDisableHdl() const { return bDisableHdl; } - void SetMarkedToLayer( BYTE nLayerNo ); + void SetMarkedToLayer( sal_uInt8 nLayerNo ); void InvalidateAttribs(); void InvalidateDrawTextAttrs(); - BOOL BeginDrag( Window* pWindow, const Point& rStartPos ); + sal_Bool BeginDrag( Window* pWindow, const Point& rStartPos ); void DoCut(); void DoCopy(); @@ -105,17 +105,17 @@ public: void UpdateIMap( SdrObject* pObj ); - USHORT GetPopupMenuId(); + sal_uInt16 GetPopupMenuId(); void UpdateUserViewOptions(); void SetMarkedOriginalSize(); - BOOL SelectObject( const String& rName ); + sal_Bool SelectObject( const String& rName ); //UNUSED2008-05 String GetSelectedChartName() const; bool HasMarkedControl() const; bool HasMarkedInternal() const; - FASTBOOL InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0); + FASTBOOL InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, sal_uLong nOptions=0); /** Returns the selected object, if it is the caption object of a cell note. @param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */ @@ -140,7 +140,7 @@ public: inline void UnlockInternalLayer() { LockInternalLayer( false ); } SdrEndTextEditKind ScEndTextEdit(); // ruft SetDrawTextUndo(0) -//UNUSED2009-05 void CaptionTextDirection(USHORT nSlot); +//UNUSED2009-05 void CaptionTextDirection(sal_uInt16 nSlot); ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CopyToTransferable(); }; diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx index 5c493df2f769..332d28b89c9f 100644 --- a/sc/source/ui/inc/drtxtob.hxx +++ b/sc/source/ui/inc/drtxtob.hxx @@ -37,7 +37,7 @@ #include "shellids.hxx" -USHORT ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId() +sal_uInt16 ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId() class ScViewData; class TransferableDataHelper; @@ -47,7 +47,7 @@ class ScDrawTextObjectBar : public SfxShell { ScViewData* pViewData; TransferableClipboardListener* pClipEvtLstnr; - BOOL bPastePossible; + sal_Bool bPastePossible; DECL_LINK( ClipboardChanged, TransferableDataHelper* ); @@ -69,8 +69,8 @@ public: void GetAttrState( SfxItemSet& rSet ); void ExecuteToggle( SfxRequest &rReq ); - BOOL ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ); - BOOL ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ); + sal_Bool ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ); + sal_Bool ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet ); void ExecuteExtra( SfxRequest &rReq ); void ExecFormText(SfxRequest& rReq); // StarFontWork @@ -80,7 +80,7 @@ private: void ExecuteGlobal( SfxRequest &rReq ); // von Execute gerufen fuer ganze Objekte void GetGlobalClipState( SfxItemSet& rSet ); void ExecutePasteContents( SfxRequest &rReq ); - BOOL IsNoteEdit(); + sal_Bool IsNoteEdit(); }; diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx index 9a1175d3310d..157c0d01fa81 100644 --- a/sc/source/ui/inc/drwtrans.hxx +++ b/sc/source/ui/inc/drwtrans.hxx @@ -58,14 +58,14 @@ private: // extracted from model in ctor: Size aSrcSize; INetBookmark* pBookmark; - BOOL bGraphic; - BOOL bGrIsBit; - BOOL bOleObj; + sal_Bool bGraphic; + sal_Bool bGrIsBit; + sal_Bool bOleObj; // source information for drag&drop: // (view is needed to handle drawing obejcts) SdrView* pDragSourceView; - USHORT nDragSourceFlags; - BOOL bDragWasInternal; + sal_uInt16 nDragSourceFlags; + sal_Bool bDragWasInternal; sal_uInt32 nSourceDocID; @@ -91,11 +91,11 @@ public: void SetDrawPersist( const SfxObjectShellRef& rRef ); void SetDragSource( ScDrawView* pView ); void SetDragSourceObj( SdrObject* pObj, SCTAB nTab ); - void SetDragSourceFlags( USHORT nFlags ); + void SetDragSourceFlags( sal_uInt16 nFlags ); void SetDragWasInternal(); SdrView* GetDragSourceView() { return pDragSourceView; } - USHORT GetDragSourceFlags() const { return nDragSourceFlags; } + sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; } void SetSourceDocID( sal_uInt32 nVal ) { nSourceDocID = nVal; } diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index 5d23172f7d8c..f308c2815113 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -60,7 +60,7 @@ class ScFunctionChildWindow : public SfxChildWindow { public: - ScFunctionChildWindow( Window*, USHORT, SfxBindings*, + ScFunctionChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); SFX_DECL_CHILDWINDOW(ScFunctionChildWindow); @@ -87,17 +87,17 @@ private: SfxChildAlignment eSfxOldAlignment; ImageButton aInsertButton; FixedText aFiFuncDesc; - USHORT nLeftSlot; - USHORT nRightSlot; - ULONG nMinWidth; - ULONG nMinHeight; + sal_uInt16 nLeftSlot; + sal_uInt16 nRightSlot; + sal_uLong nMinWidth; + sal_uLong nMinHeight; Size aOldSize; - BOOL bSizeFlag; - BOOL bInit; + sal_Bool bSizeFlag; + sal_Bool bInit; short nDockMode; Point aSplitterInitPos; const ScFuncDesc* pFuncDesc; - USHORT nArgs; + sal_uInt16 nArgs; String** pArgArr; @@ -105,7 +105,7 @@ private: void UpdateFunctionList(); void UpdateLRUList(); - void DoEnter(BOOL bOk); //@@ ??? + void DoEnter(sal_Bool bOk); //@@ ??? void SetDescription(); void SetLeftRightSize(); void SetTopBottonSize(); @@ -122,7 +122,7 @@ private: protected: - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void Resize(); virtual void Resizing( Size& rSize ); virtual void SetSize(); @@ -144,7 +144,7 @@ public: using SfxDockingWindow::Notify; virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - void SetSlotIDs( USHORT nLeft, USHORT nRight ) + void SetSlotIDs( sal_uInt16 nLeft, sal_uInt16 nRight ) { nLeftSlot = nLeft; nRightSlot = nRight; } void InitLRUList(); diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx index 4b6e8d0596bc..d2f7487edef2 100644 --- a/sc/source/ui/inc/editable.hxx +++ b/sc/source/ui/inc/editable.hxx @@ -39,8 +39,8 @@ class ScRange; class ScEditableTester { - BOOL bIsEditable; - BOOL bOnlyMatrix; + sal_Bool bIsEditable; + sal_Bool bOnlyMatrix; public: // no test in ctor @@ -77,9 +77,9 @@ public: void TestSelection( ScDocument* pDoc, const ScMarkData& rMark ); void TestView( ScViewFunc* pView ); - BOOL IsEditable() const { return bIsEditable; } - BOOL IsFormatEditable() const { return bIsEditable || bOnlyMatrix; } - USHORT GetMessageId() const; + sal_Bool IsEditable() const { return bIsEditable; } + sal_Bool IsFormatEditable() const { return bIsEditable || bOnlyMatrix; } + sal_uInt16 GetMessageId() const; }; #endif diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx index ebada82a32fb..3c1792c3333b 100644 --- a/sc/source/ui/inc/editsh.hxx +++ b/sc/source/ui/inc/editsh.hxx @@ -48,8 +48,8 @@ private: EditView* pEditView; ScViewData* pViewData; TransferableClipboardListener* pClipEvtLstnr; - BOOL bPastePossible; - BOOL bIsInsertMode; + sal_Bool bPastePossible; + sal_Bool bIsInsertMode; const SvxURLField* GetURLField(); ScInputHandler* GetMyInputHdl(); @@ -77,7 +77,7 @@ public: void ExecuteUndo(SfxRequest& rReq); void GetUndoState(SfxItemSet &rSet); - String GetSelectionText( BOOL bWholeWord ); + String GetSelectionText( sal_Bool bWholeWord ); }; diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx old mode 100755 new mode 100644 index 539dbe54e275..5c74777edf47 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -98,11 +98,11 @@ private: FieldString& rText, bool bFocus ); - /** @return TRUE, if the field index is inside of the control area. */ + /** @return sal_True, if the field index is inside of the control area. */ bool IsValidIndex( size_t nIndex ) const; - /** @return TRUE, if the field with the given index exists. */ + /** @return sal_True, if the field with the given index exists. */ bool IsExistingIndex( size_t nIndex ) const; - /** @return TRUE, if the field with the given index exists and the text is + /** @return sal_True, if the field with the given index exists and the text is too long for the button control. */ bool IsShortenedText( size_t nIndex ) const; /** @return The new selection index after moving to the given direction. */ @@ -115,7 +115,7 @@ private: /** Sets selection to last field. */ void SetSelectionEnd(); /** Sets selection to new position relative to current. */ - void MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY ); + void MoveSelection( sal_uInt16 nKeyCode, SCsCOL nDX, SCsROW nDY ); /** Moves the selected field to nDestIndex. */ void MoveField( size_t nDestIndex ); @@ -183,16 +183,16 @@ public: /** Inserts a field using the specified pixel position. @param rPos The coordinates to insert the field. @param rnIndex The new index of the field is returned here. - @return TRUE, if the field has been created. */ + @return sal_True, if the field has been created. */ bool AddField( const String& rText, const Point& rPos, size_t& rnIndex ); /** Calculates the field index at a specific pixel position. @param rnIndex The index of the field is returned here. - @return TRUE, if the index value is valid. */ + @return sal_True, if the index value is valid. */ bool GetFieldIndex( const Point& rPos, size_t& rnIndex ) const; /** Calculates a field index at a specific pixel position. Returns in every case the index of an existing field. @param rnIndex The index of the field is returned here. - @return TRUE, if the index value is valid. */ + @return sal_True, if the index value is valid. */ void GetExistingIndex( const Point& rPos, size_t& rnIndex ); /** Notifies this control that the offset of the first field has been changed. diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx index 7f2fb046093c..2bdc42b90881 100644 --- a/sc/source/ui/inc/filldlg.hxx +++ b/sc/source/ui/inc/filldlg.hxx @@ -64,7 +64,7 @@ public: String aStartStr, double fStep, double fMax, - USHORT nPossDir ); + sal_uInt16 nPossDir ); ~ScFillSeriesDlg(); FillDir GetFillDir() const { return theFillDir; } @@ -76,7 +76,7 @@ public: String GetStartStr() const { return aEdStartVal.GetText(); } - void SetEdStartValEnabled(BOOL bFlag=FALSE); + void SetEdStartValEnabled(sal_Bool bFlag=sal_False); private: FixedLine aFlDirection; @@ -99,7 +99,7 @@ private: RadioButton aBtnMonth; RadioButton aBtnYear; - BOOL bStartValFlag; + sal_Bool bStartValFlag; FixedText aFtStartVal; Edit aEdStartVal; String aStartStrVal; @@ -128,10 +128,10 @@ private: #ifdef _FILLDLG_CXX private: - void Init( USHORT nPossDir ); - BOOL CheckStartVal(); - BOOL CheckIncrementVal(); - BOOL CheckEndVal(); + void Init( sal_uInt16 nPossDir ); + sal_Bool CheckStartVal(); + sal_Bool CheckIncrementVal(); + sal_Bool CheckEndVal(); DECL_LINK( OKHdl, void * ); DECL_LINK( DisableHdl, Button * ); diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index 31e0e3a5d4b1..885a5b68e7e2 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -99,13 +99,13 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); void SliderMoved(); - USHORT GetSliderPos(); - void RefreshEditRow( USHORT nOffset ); + sal_uInt16 GetSliderPos(); + void RefreshEditRow( sal_uInt16 nOffset ); private: FixedLine aFlCriteria; @@ -153,7 +153,7 @@ private: ScFilterOptionsMgr* pOptionsMgr; - const USHORT nWhichQuery; + const sal_uInt16 nWhichQuery; const ScQueryParam theQueryData; ScQueryItem* pOutItem; ScViewData* pViewData; @@ -165,12 +165,12 @@ private: ListBox* aCondLbArr[4]; ListBox* aConnLbArr[4]; bool mbHasDates[MAXQUERY]; - BOOL bRefreshExceptQuery[MAXQUERY]; - USHORT nFieldCount; - BOOL bRefInputMode; + sal_Bool bRefreshExceptQuery[MAXQUERY]; + sal_uInt16 nFieldCount; + sal_Bool bRefInputMode; TypedScStrCollection* pEntryLists[MAXCOLCOUNT]; - USHORT nHeaderPos[MAXCOLCOUNT]; + sal_uInt16 nHeaderPos[MAXCOLCOUNT]; // Hack: RefInput-Kontrolle Timer* pTimer; @@ -180,10 +180,10 @@ private: void Init ( const SfxItemSet& rArgSet ); void FillFieldLists (); void FillAreaList (); - void UpdateValueList ( USHORT nList ); - void UpdateHdrInValueList( USHORT nList ); - void ClearValueList ( USHORT nList ); - USHORT GetFieldSelPos ( SCCOL nField ); + void UpdateValueList ( sal_uInt16 nList ); + void UpdateHdrInValueList( sal_uInt16 nList ); + void ClearValueList ( sal_uInt16 nList ); + sal_uInt16 GetFieldSelPos ( SCCOL nField ); ScQueryItem* GetOutputItem (); // Handler: @@ -210,10 +210,10 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: ListBox aLbFilterArea; @@ -232,14 +232,14 @@ private: ScFilterOptionsMgr* pOptionsMgr; - const USHORT nWhichQuery; + const sal_uInt16 nWhichQuery; const ScQueryParam theQueryData; ScQueryItem* pOutItem; ScViewData* pViewData; ScDocument* pDoc; formula::RefEdit* pRefInputEdit; - BOOL bRefInputMode; + sal_Bool bRefInputMode; // Hack: RefInput-Kontrolle Timer* pTimer; diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx index 92e3833dff7d..d72679a47ca2 100644 --- a/sc/source/ui/inc/foptmgr.hxx +++ b/sc/source/ui/inc/foptmgr.hxx @@ -79,7 +79,7 @@ public: const String& refStrUndefined ); ~ScFilterOptionsMgr(); - BOOL VerifyPosStr ( const String& rPosStr ) const; + sal_Bool VerifyPosStr ( const String& rPosStr ) const; private: Dialog* pDlg; diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx index f863662f7cd0..18b8fa24c6a4 100644 --- a/sc/source/ui/inc/formula.hxx +++ b/sc/source/ui/inc/formula.hxx @@ -83,11 +83,11 @@ public: virtual void notifyChange(); virtual void fill(); virtual bool calculateValue(const String& _sExpression,String& _rResult); - virtual void doClose(BOOL _bOk); + virtual void doClose(sal_Bool _bOk); virtual void insertEntryToLRUList(const formula::IFunctionDescription* pDesc); virtual void showReference(const String& _sFormula); - virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked); - virtual void setDispatcherLock( BOOL bLock ); + virtual void dispatch(sal_Bool _bOK,sal_Bool _bMartixChecked); + virtual void setDispatcherLock( sal_Bool bLock ); virtual void setReferenceInput(const formula::FormEditData* _pData); virtual void deleteFormData(); virtual void clear(); @@ -104,31 +104,31 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const; virtual ::com::sun::star::table::CellAddress getReferencePosition() const; - virtual BOOL Close(); + virtual sal_Bool Close(); // sc::IAnyRefDialog virtual void ShowReference(const String& _sRef); - virtual void HideReference( BOOL bDoneRefMode = TRUE ); + virtual void HideReference( sal_Bool bDoneRefMode = sal_True ); virtual void SetReference( const ScRange& rRef, ScDocument* pD ); virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); - virtual void RefInputDone( BOOL bForced = FALSE ); - virtual BOOL IsTableLocked() const; - virtual BOOL IsRefInputMode() const; + virtual void RefInputDone( sal_Bool bForced = sal_False ); + virtual sal_Bool IsTableLocked() const; + virtual sal_Bool IsRefInputMode() const; - virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const; + virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const; virtual void AddRefEntry(); virtual void SetActive(); virtual void ViewShellChanged( ScTabViewShell* pScViewShell ); protected: virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); - ULONG FindFocusWin(Window *pWin); + sal_uLong FindFocusWin(Window *pWin); void SaveLRUEntry(const ScFuncDesc* pFuncDesc); void HighlightFunctionParas(const String& aFormula); - BOOL IsInputHdl(ScInputHandler* pHdl); + sal_Bool IsInputHdl(ScInputHandler* pHdl); ScInputHandler* GetNextInputHandler(ScDocShell* pDocShell,PtrTabViewShell* ppViewSh); }; diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx index 686f2a00ae5b..e643b92397e9 100644 --- a/sc/source/ui/inc/fuconarc.hxx +++ b/sc/source/ui/inc/fuconarc.hxx @@ -44,10 +44,10 @@ class FuConstArc : public FuConstruct virtual ~FuConstArc(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx index e6ecbfb2e2c3..3980bfef7b3f 100644 --- a/sc/source/ui/inc/fuconcustomshape.hxx +++ b/sc/source/ui/inc/fuconcustomshape.hxx @@ -42,10 +42,10 @@ public: virtual ~FuConstCustomShape(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx index 3a27ffcc2f69..ef82acdf3b04 100644 --- a/sc/source/ui/inc/fuconpol.hxx +++ b/sc/source/ui/inc/fuconpol.hxx @@ -46,10 +46,10 @@ class FuConstPolygon : public FuConstruct virtual ~FuConstPolygon(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx index fb609e4a7681..e98c823e0d15 100644 --- a/sc/source/ui/inc/fuconrec.hxx +++ b/sc/source/ui/inc/fuconrec.hxx @@ -44,10 +44,10 @@ class FuConstRectangle : public FuConstruct virtual ~FuConstRectangle(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fuconstr.hxx b/sc/source/ui/inc/fuconstr.hxx index 28b20c7a94df..994aa1ac48b2 100644 --- a/sc/source/ui/inc/fuconstr.hxx +++ b/sc/source/ui/inc/fuconstr.hxx @@ -50,13 +50,13 @@ class FuConstruct : public FuDraw virtual ~FuConstruct(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); - virtual BYTE Command(const CommandEvent& rCEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_uInt8 Command(const CommandEvent& rCEvt); - BOOL SimpleMouseButtonUp(const MouseEvent& rMEvt); + sal_Bool SimpleMouseButtonUp(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx index ffe2c1e9722b..de3fcb4a5f65 100644 --- a/sc/source/ui/inc/fuconuno.hxx +++ b/sc/source/ui/inc/fuconuno.hxx @@ -40,8 +40,8 @@ class FuConstUnoControl : public FuConstruct { protected: - UINT32 nInventor; - UINT16 nIdentifier; + sal_uInt32 nInventor; + sal_uInt16 nIdentifier; public: FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView, @@ -49,10 +49,10 @@ public: virtual ~FuConstUnoControl(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx index 2344ca629c2f..80b33dca50e9 100644 --- a/sc/source/ui/inc/fudraw.hxx +++ b/sc/source/ui/inc/fudraw.hxx @@ -48,7 +48,7 @@ class FuDraw : public FuPoor SdrModel* pDoc, SfxRequest& rReq); virtual ~FuDraw(); - virtual BOOL KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); virtual void ScrollStart(); virtual void ScrollEnd(); @@ -58,14 +58,14 @@ class FuDraw : public FuPoor virtual void ForcePointer(const MouseEvent* pMEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); // #97016# II virtual void SelectionHasChanged(); - BOOL IsSizingOrMovingNote( const MouseEvent& rMEvt ) const; + sal_Bool IsSizingOrMovingNote( const MouseEvent& rMEvt ) const; private: void DoModifiers(const MouseEvent& rMEvt); diff --git a/sc/source/ui/inc/fuedipo.hxx b/sc/source/ui/inc/fuedipo.hxx index 5138a134cc2e..fe54e7027426 100644 --- a/sc/source/ui/inc/fuedipo.hxx +++ b/sc/source/ui/inc/fuedipo.hxx @@ -45,10 +45,10 @@ class FuEditPoints : public FuDraw virtual ~FuEditPoints(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren diff --git a/sc/source/ui/inc/fumark.hxx b/sc/source/ui/inc/fumark.hxx index fcadc54768e8..8156656fe794 100644 --- a/sc/source/ui/inc/fumark.hxx +++ b/sc/source/ui/inc/fumark.hxx @@ -43,8 +43,8 @@ class FuMarkRect : public FuPoor protected: Point aBeginPos; Rectangle aZoomRect; - BOOL bVisible; - BOOL bStartDrag; + sal_Bool bVisible; + sal_Bool bStartDrag; ScRangeListRef aSourceRange; public: @@ -52,7 +52,7 @@ class FuMarkRect : public FuPoor SdrModel* pDoc, SfxRequest& rReq); virtual ~FuMarkRect(); - virtual BOOL KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); virtual void ScrollStart(); virtual void ScrollEnd(); @@ -62,10 +62,10 @@ class FuMarkRect : public FuPoor virtual void ForcePointer(const MouseEvent* pMEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); - virtual BYTE Command(const CommandEvent& rCEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_uInt8 Command(const CommandEvent& rCEvt); }; diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx index d8b5c7796971..224e5e19d850 100644 --- a/sc/source/ui/inc/funcpage.hxx +++ b/sc/source/ui/inc/funcpage.hxx @@ -104,15 +104,15 @@ public: ScFuncPage( Window* pParent); - void SetCategory(USHORT nCat); - void SetFunction(USHORT nFunc); + void SetCategory(sal_uInt16 nCat); + void SetFunction(sal_uInt16 nFunc); void SetFocus(); - USHORT GetCategory(); - USHORT GetFunction(); - USHORT GetFunctionEntryCount(); + sal_uInt16 GetCategory(); + sal_uInt16 GetFunction(); + sal_uInt16 GetFunctionEntryCount(); - USHORT GetFuncPos(const ScFuncDesc*); - const ScFuncDesc* GetFuncDesc( USHORT nPos ) const; + sal_uInt16 GetFuncPos(const ScFuncDesc*); + const ScFuncDesc* GetFuncDesc( sal_uInt16 nPos ) const; String GetSelFunctionName() const; void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; } diff --git a/sc/source/ui/inc/funcutl.hxx b/sc/source/ui/inc/funcutl.hxx index 715c9d36a101..084cc6271700 100644 --- a/sc/source/ui/inc/funcutl.hxx +++ b/sc/source/ui/inc/funcutl.hxx @@ -67,7 +67,7 @@ private: MultiLineEdit* pMEdit; Link aSelChangedLink; Selection aOldSel; - BOOL bMouseFlag; + sal_Bool bMouseFlag; DECL_LINK( ChangedHdl, ScEditBox* ); protected: @@ -102,7 +102,7 @@ public: ArgEdit( Window* pParent, const ResId& rResId ); void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, - ScrollBar& rArgSlider, USHORT nArgCount ); + ScrollBar& rArgSlider, sal_uInt16 nArgCount ); protected: virtual void KeyInput( const KeyEvent& rKEvt ); @@ -111,7 +111,7 @@ private: ArgEdit* pEdPrev; ArgEdit* pEdNext; ScrollBar* pSlider; - USHORT nArgs; + sal_uInt16 nArgs; }; diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index 6d9b7ae2af5a..3f41c9f15535 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -70,7 +70,7 @@ protected: Timer aDragTimer; // fuer Drag&Drop DECL_LINK( DragTimerHdl, Timer * ); DECL_LINK( DragHdl, void * ); - BOOL bIsInDragMode; + sal_Bool bIsInDragMode; Point aMDPos; // Position von MouseButtonDown // #95491# member to hold state of the mouse buttons for creation @@ -94,16 +94,16 @@ public: virtual void DoPaste(); // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent&) { return FALSE; } + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent&) { return sal_False; } // #95491# moved from inline to *.cxx - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; } + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); // { return sal_False; } // #95491# moved from inline to *.cxx - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; } + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); // { return sal_False; } - virtual BYTE Command(const CommandEvent& rCEvt); + virtual sal_uInt8 Command(const CommandEvent& rCEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren @@ -113,9 +113,9 @@ public: void SetWindow(Window* pWin) { pWindow = pWin; } - USHORT GetSlotID() const { return( aSfxRequest.GetSlot() ); } + sal_uInt16 GetSlotID() const { return( aSfxRequest.GetSlot() ); } - BOOL IsDetectiveHit( const Point& rLogicPos ); + sal_Bool IsDetectiveHit( const Point& rLogicPos ); void StopDragTimer(); diff --git a/sc/source/ui/inc/fusel.hxx b/sc/source/ui/inc/fusel.hxx index c12b5739d61c..8dae89c71b63 100644 --- a/sc/source/ui/inc/fusel.hxx +++ b/sc/source/ui/inc/fusel.hxx @@ -52,11 +52,11 @@ public: virtual ~FuSelection(); // Mouse- & Key-Events - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); - virtual BYTE Command(const CommandEvent& rCEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_uInt8 Command(const CommandEvent& rCEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren @@ -66,10 +66,10 @@ public: protected: // Outliner* pOutliner; // OutlinerView* pOutlinerView; - BOOL bVCAction; + sal_Bool bVCAction; private: - BOOL TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2 + sal_Bool TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2 bool IsNoteCaptionMarked() const; bool IsNoteCaptionClicked( const Point& rPos ) const; diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx index 41a41b054554..b25d4792b755 100644 --- a/sc/source/ui/inc/futext.hxx +++ b/sc/source/ui/inc/futext.hxx @@ -42,7 +42,7 @@ class SdrOutliner; class FuText : public FuConstruct { protected: -// USHORT nOldObjectBar; +// sal_uInt16 nOldObjectBar; SdrTextObj* pTextObj; public: @@ -51,10 +51,10 @@ public: virtual ~FuText(); - virtual BOOL KeyInput(const KeyEvent& rKEvt); - virtual BOOL MouseMove(const MouseEvent& rMEvt); - virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); - virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); + virtual sal_Bool KeyInput(const KeyEvent& rKEvt); + virtual sal_Bool MouseMove(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); + virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); virtual void Activate(); // Function aktivieren virtual void Deactivate(); // Function deaktivieren @@ -64,8 +64,8 @@ public: virtual void SelectionHasChanged(); void SetInEditMode( SdrObject* pObj = NULL, const Point* pMousePixel = NULL, - BOOL bCursorToEnd = FALSE, const KeyEvent* pInitialKey = NULL ); - void StopEditMode(BOOL bTextDirection = FALSE); + sal_Bool bCursorToEnd = sal_False, const KeyEvent* pInitialKey = NULL ); + void StopEditMode(sal_Bool bTextDirection = sal_False); void StopDragMode(SdrObject* pObject); // #98185# Create default drawing objects via keyboard diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx index dd656b948a6b..3f0fae61b658 100644 --- a/sc/source/ui/inc/gridmerg.hxx +++ b/sc/source/ui/inc/gridmerg.hxx @@ -43,8 +43,8 @@ private: long nVarStart; long nVarDiff; long nCount; - BOOL bVertical; - BOOL bOptimize; + sal_Bool bVertical; + sal_Bool bOptimize; void AddLine( long nStart, long nEnd, long nPos ); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index a2283bf2b7de..aad45058de2c 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -145,61 +145,61 @@ private: ::std::auto_ptr mpDPFieldPopup; ::std::auto_ptr mpFilterButton; - USHORT nCursorHideCount; + sal_uInt16 nCursorHideCount; - BOOL bMarking; + sal_Bool bMarking; - USHORT nButtonDown; - BOOL bEEMouse; // Edit-Engine hat Maus - BYTE nMouseStatus; - BYTE nNestedButtonState; // track nested button up/down calls + sal_uInt16 nButtonDown; + sal_Bool bEEMouse; // Edit-Engine hat Maus + sal_uInt8 nMouseStatus; + sal_uInt8 nNestedButtonState; // track nested button up/down calls - BOOL bDPMouse; // DataPilot-D&D (neue Pivottabellen) + sal_Bool bDPMouse; // DataPilot-D&D (neue Pivottabellen) long nDPField; ScDPObject* pDragDPObj; //! name? - BOOL bRFMouse; // RangeFinder-Drag - BOOL bRFSize; - USHORT nRFIndex; + sal_Bool bRFMouse; // RangeFinder-Drag + sal_Bool bRFSize; + sal_uInt16 nRFIndex; SCsCOL nRFAddX; SCsROW nRFAddY; - USHORT nPagebreakMouse; // Pagebreak-Modus Drag + sal_uInt16 nPagebreakMouse; // Pagebreak-Modus Drag SCCOLROW nPagebreakBreak; SCCOLROW nPagebreakPrev; ScRange aPagebreakSource; ScRange aPagebreakDrag; - BOOL bPagebreakDrawn; + sal_Bool bPagebreakDrawn; - BYTE nPageScript; + sal_uInt8 nPageScript; long nLastClickX; long nLastClickY; - BOOL bDragRect; + sal_Bool bDragRect; SCCOL nDragStartX; SCROW nDragStartY; SCCOL nDragEndX; SCROW nDragEndY; InsCellCmd meDragInsertMode; - USHORT nCurrentPointer; + sal_uInt16 nCurrentPointer; - BOOL bIsInScroll; - BOOL bIsInPaint; + sal_Bool bIsInScroll; + sal_Bool bIsInPaint; ScDDComboBoxButton aComboButton; Point aCurMousePos; - USHORT nPaintCount; + sal_uInt16 nPaintCount; Rectangle aRepaintPixel; - BOOL bNeedsRepaint; + sal_Bool bNeedsRepaint; - BOOL bAutoMarkVisible; + sal_Bool bAutoMarkVisible; ScAddress aAutoMarkPos; - BOOL bListValButton; + sal_Bool bListValButton; ScAddress aListValPos; Rectangle aInvertRect; @@ -207,15 +207,15 @@ private: DECL_LINK( PopupModeEndHdl, FloatingWindow* ); DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* ); - BOOL TestMouse( const MouseEvent& rMEvt, BOOL bAction ); + sal_Bool TestMouse( const MouseEvent& rMEvt, sal_Bool bAction ); - BOOL DoPageFieldSelection( SCCOL nCol, SCROW nRow ); + sal_Bool DoPageFieldSelection( SCCOL nCol, SCROW nRow ); bool DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ); void DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ); void DPMouseMove( const MouseEvent& rMEvt ); void DPMouseButtonUp( const MouseEvent& rMEvt ); - void DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ); + void DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove ); /** * Check if the mouse click is on a field popup button. @@ -227,24 +227,24 @@ private: void DPLaunchFieldPopupMenu( const Point& rScrPos, const Size& rScrSize, const ScAddress& rPos, ScDPObject* pDPObj); - void RFMouseMove( const MouseEvent& rMEvt, BOOL bUp ); + void RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp ); - void PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ); + void PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp ); - void UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect ); + void UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect ); - BOOL IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ); - void ExecFilter( ULONG nSel, SCCOL nCol, SCROW nRow, + sal_Bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ); + void ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow, const String& aValue, bool bCheckForDates ); - void FilterSelect( ULONG nSel ); + void FilterSelect( sal_uLong nSel ); void ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr ); - void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr ); + void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr ); - BOOL HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange ); + sal_Bool HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange ); - BOOL DropScroll( const Point& rMousePos ); + sal_Bool DropScroll( const Point& rMousePos ); sal_Int8 AcceptPrivateDrop( const AcceptDropEvent& rEvt ); sal_Int8 ExecutePrivateDrop( const ExecuteDropEvent& rEvt ); @@ -253,42 +253,42 @@ private: void HandleMouseButtonDown( const MouseEvent& rMEvt ); - BOOL DrawMouseButtonDown(const MouseEvent& rMEvt); - BOOL DrawMouseButtonUp(const MouseEvent& rMEvt); - BOOL DrawMouseMove(const MouseEvent& rMEvt); - BOOL DrawKeyInput(const KeyEvent& rKEvt); - BOOL DrawCommand(const CommandEvent& rCEvt); - BOOL DrawHasMarkedObj(); + sal_Bool DrawMouseButtonDown(const MouseEvent& rMEvt); + sal_Bool DrawMouseButtonUp(const MouseEvent& rMEvt); + sal_Bool DrawMouseMove(const MouseEvent& rMEvt); + sal_Bool DrawKeyInput(const KeyEvent& rKEvt); + sal_Bool DrawCommand(const CommandEvent& rCEvt); + sal_Bool DrawHasMarkedObj(); void DrawEndAction(); void DrawMarkDropObj( SdrObject* pObj ); SdrObject* GetEditObject(); - BOOL IsMyModel(SdrEditView* pSdrView); + sal_Bool IsMyModel(SdrEditView* pSdrView); //void DrawStartTimer(); - void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer ); + void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer ); void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev ); - //BOOL DrawBeforeScroll(); - void DrawAfterScroll(/*BOOL bVal*/); + //sal_Bool DrawBeforeScroll(); + void DrawAfterScroll(/*sal_Bool bVal*/); //void DrawMarks(); - //BOOL NeedDrawMarks(); + //sal_Bool NeedDrawMarks(); void DrawComboButton( const Point& rCellPos, long nCellSizeX, long nCellSizeY, - BOOL bArrowState, - BOOL bBtnIn = FALSE ); + sal_Bool bArrowState, + sal_Bool bBtnIn = sal_False ); Rectangle GetListValButtonRect( const ScAddress& rButtonPos ); void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, OutputDevice* pContentDev ); - BOOL GetEditUrl( const Point& rPos, + sal_Bool GetEditUrl( const Point& rPos, String* pName=0, String* pUrl=0, String* pTarget=0 ); - BOOL GetEditUrlOrError( BOOL bSpellErr, const Point& rPos, + sal_Bool GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos, String* pName=0, String* pUrl=0, String* pTarget=0 ); - BOOL HitRangeFinder( const Point& rMouse, BOOL& rCorner, USHORT* pIndex = NULL, + sal_Bool HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, sal_uInt16* pIndex = NULL, SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL ); - USHORT HitPageBreak( const Point& rMouse, ScRange* pSource = NULL, + sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource = NULL, SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL ); void PasteSelection( const Point& rPosPixel ); @@ -347,7 +347,7 @@ public: void UpdateFormulas(); - void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ); + void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect ); void DoScenarioMenue( const ScRange& rScenRange ); void LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ); @@ -363,7 +363,7 @@ public: ScUpdateMode eMode = SC_UPDATE_ALL ); void InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL bTestMerge = FALSE, BOOL bRepeat = FALSE ); + sal_Bool bTestMerge = sal_False, sal_Bool bRepeat = sal_False ); //UNUSED2008-05 void DrawDragRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); @@ -373,21 +373,21 @@ public: void ShowCursor(); void DrawCursor(); void DrawAutoFillMark(); - void UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange); + void UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange); - void UpdateListValPos( BOOL bVisible, const ScAddress& rPos ); + void UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos ); - BOOL ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ); + sal_Bool ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard ); void HideNoteMarker(); - MapMode GetDrawMapMode( BOOL bForce = FALSE ); + MapMode GetDrawMapMode( sal_Bool bForce = sal_False ); void ContinueDrag(); void StopMarking(); void UpdateInputContext(); - void CheckInverted() { if (nPaintCount) bNeedsRepaint = TRUE; } + void CheckInverted() { if (nPaintCount) bNeedsRepaint = sal_True; } void DoInvertRect( const Rectangle& rPixel ); diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx index 03f05ab0705d..7dc0d6aad615 100644 --- a/sc/source/ui/inc/groupdlg.hxx +++ b/sc/source/ui/inc/groupdlg.hxx @@ -39,12 +39,12 @@ class ScGroupDlg : public ModalDialog { public: ScGroupDlg( Window* pParent, - USHORT nResId, - BOOL bUnGroup = FALSE, - BOOL bRows = TRUE ); + sal_uInt16 nResId, + sal_Bool bUnGroup = sal_False, + sal_Bool bRows = sal_True ); ~ScGroupDlg(); - BOOL GetColsChecked() const; + sal_Bool GetColsChecked() const; private: FixedLine aFlFrame; diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index ec4dd49705d1..4c7140b23eb2 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -52,10 +52,10 @@ private: SelectionEngine* pSelEngine; Font aNormFont; Font aBoldFont; - BOOL bBoldSet; + sal_Bool bBoldSet; - USHORT nFlags; - BOOL bVertical; // Vertikal = Zeilenheader + sal_uInt16 nFlags; + sal_Bool bVertical; // Vertikal = Zeilenheader long nWidth; long nSmallWidth; @@ -65,18 +65,18 @@ private: SCCOLROW nMarkStart; SCCOLROW nMarkEnd; - BOOL bMarkRange; + sal_Bool bMarkRange; - BOOL bDragging; // Groessen aendern + sal_Bool bDragging; // Groessen aendern SCCOLROW nDragNo; long nDragStart; long nDragPos; - BOOL bDragMoved; + sal_Bool bDragMoved; - BOOL bIgnoreMove; + sal_Bool bIgnoreMove; long GetScrPos( SCCOLROW nEntryNo ); - SCCOLROW GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder ); + SCCOLROW GetMousePos( const MouseEvent& rMEvt, sal_Bool& rBorder ); bool IsSelectionAllowed(SCCOLROW nPos) const; void ShowDragHelp(); @@ -99,20 +99,20 @@ protected: // neue Methoden virtual SCCOLROW GetPos() = 0; // aktuelle Position (Scrolling) - virtual USHORT GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel) + virtual sal_uInt16 GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel) virtual String GetEntryText( SCCOLROW nEntryNo ) = 0; virtual SCCOLROW GetHiddenCount( SCCOLROW nEntryNo ); - virtual BOOL IsLayoutRTL(); - virtual BOOL IsMirrored(); + virtual sal_Bool IsLayoutRTL(); + virtual sal_Bool IsMirrored(); - virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewWidth ) = 0; + virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewWidth ) = 0; virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) = 0; - virtual void SetMarking( BOOL bSet ); + virtual void SetMarking( sal_Bool bSet ); virtual void SelectWindow(); - virtual BOOL IsDisabled(); - virtual BOOL ResizeAllowed(); + virtual sal_Bool IsDisabled(); + virtual sal_Bool ResizeAllowed(); virtual String GetDragHelp( long nVal ); virtual void DrawInvert( long nDragPos ); @@ -120,14 +120,14 @@ protected: public: ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine, - SCCOLROW nNewSize, USHORT nNewFlags ); + SCCOLROW nNewSize, sal_uInt16 nNewFlags ); ~ScHeaderControl(); - void SetIgnoreMove(BOOL bSet) { bIgnoreMove = bSet; } + void SetIgnoreMove(sal_Bool bSet) { bIgnoreMove = bSet; } void StopMarking(); - void SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd ); + void SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd ); long GetWidth() const { return nWidth; } long GetSmallWidth() const { return nSmallWidth; } diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx index 1f1ea7242b17..67a9868952e2 100644 --- a/sc/source/ui/inc/hfedtdlg.hxx +++ b/sc/source/ui/inc/hfedtdlg.hxx @@ -45,11 +45,11 @@ public: Window* pParent, const SfxItemSet& rCoreSet, const String& rPageStyle, - USHORT nResId = RID_SCDLG_HFEDIT ); + sal_uInt16 nResId = RID_SCDLG_HFEDIT ); ~ScHFEditDlg(); - virtual void PageCreated( USHORT nId, SfxTabPage& rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage ); }; diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx index b500473b2071..b0699f7f5b5a 100644 --- a/sc/source/ui/inc/highred.hxx +++ b/sc/source/ui/inc/highred.hxx @@ -104,7 +104,7 @@ private: protected: - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); public: ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, @@ -114,8 +114,8 @@ public: virtual void SetActive(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL Close(); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool Close(); + virtual sal_Bool IsRefInputMode() const; }; diff --git a/sc/source/ui/inc/hiranges.hxx b/sc/source/ui/inc/hiranges.hxx index 6182d30dc96e..ed4d66b79408 100644 --- a/sc/source/ui/inc/hiranges.hxx +++ b/sc/source/ui/inc/hiranges.hxx @@ -51,9 +51,9 @@ public: ScHighlightRanges(); ~ScHighlightRanges(); - ULONG Count() const { return aEntries.Count(); } + sal_uLong Count() const { return aEntries.Count(); } void Insert( ScHighlightEntry* pNew ) { aEntries.Insert(pNew, LIST_APPEND); } - ScHighlightEntry* GetObject( ULONG nIndex ) const + ScHighlightEntry* GetObject( sal_uLong nIndex ) const { return (ScHighlightEntry*)aEntries.GetObject(nIndex); } }; diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx index d959069c46b6..eba954ee76ea 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -44,19 +44,19 @@ class SC_DLLPUBLIC ScImportOptions public: ScImportOptions() : nFieldSepCode(0), nTextSepCode(0), - eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(FALSE), - bSaveAsShown(FALSE) + eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(sal_False), + bSaveAsShown(sal_False) {} ScImportOptions( const String& rStr ); ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr), - bFixedWidth(FALSE), bSaveAsShown(FALSE) + bFixedWidth(sal_False), bSaveAsShown(sal_False) { eCharSet = ScGlobal::GetCharsetValue(aStrFont); } ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), - bFixedWidth(FALSE), bSaveAsShown(FALSE) + bFixedWidth(sal_False), bSaveAsShown(sal_False) { SetTextEncoding( nEnc ); } ScImportOptions( const ScImportOptions& rCpy ) @@ -79,7 +79,7 @@ public: return *this; } - BOOL operator==( const ScImportOptions& rCmp ) + sal_Bool operator==( const ScImportOptions& rCmp ) { return nFieldSepCode == rCmp.nFieldSepCode @@ -97,8 +97,8 @@ public: sal_Unicode nTextSepCode; String aStrFont; CharSet eCharSet; - BOOL bFixedWidth; - BOOL bSaveAsShown; + sal_Bool bFixedWidth; + sal_Bool bSaveAsShown; }; diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index 86a91216edcc..25b33b525362 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -58,33 +58,33 @@ class ScImportExport ScRange aRange; String aStreamPath; String aNonConvertibleChars; - ULONG nSizeLimit; + sal_uLong nSizeLimit; sal_Unicode cSep; // Separator sal_Unicode cStr; // String Delimiter - BOOL bFormulas; // Formeln im Text? - BOOL bIncludeFiltered; // include filtered rows? (default true) - BOOL bAll; // keine Selektion - BOOL bSingle; // Einfachselektion - BOOL bUndo; // Mit Undo? - BOOL bOverflow; // zuviele Zeilen/Spalten + sal_Bool bFormulas; // Formeln im Text? + sal_Bool bIncludeFiltered; // include filtered rows? (default true) + sal_Bool bAll; // keine Selektion + sal_Bool bSingle; // Einfachselektion + sal_Bool bUndo; // Mit Undo? + sal_Bool bOverflow; // zuviele Zeilen/Spalten bool mbApi; ScExportTextOptions mExportTextOptions; ScAsciiOptions* pExtOptions; // erweiterte Optionen - BOOL StartPaste(); // Protect-Check, Undo einrichten + sal_Bool StartPaste(); // Protect-Check, Undo einrichten void EndPaste(); // Undo/Redo-Aktionen, Repaint - BOOL Doc2Text( SvStream& ); - BOOL Text2Doc( SvStream& ); - BOOL Doc2Sylk( SvStream& ); - BOOL Sylk2Doc( SvStream& ); - BOOL Doc2HTML( SvStream&, const String& ); - BOOL Doc2RTF( SvStream& ); - BOOL Doc2Dif( SvStream& ); - BOOL Dif2Doc( SvStream& ); - BOOL ExtText2Doc( SvStream& ); // mit pExtOptions - BOOL RTF2Doc( SvStream&, const String& rBaseURL ); - BOOL HTML2Doc( SvStream&, const String& rBaseURL ); + sal_Bool Doc2Text( SvStream& ); + sal_Bool Text2Doc( SvStream& ); + sal_Bool Doc2Sylk( SvStream& ); + sal_Bool Sylk2Doc( SvStream& ); + sal_Bool Doc2HTML( SvStream&, const String& ); + sal_Bool Doc2RTF( SvStream& ); + sal_Bool Doc2Dif( SvStream& ); + sal_Bool Dif2Doc( SvStream& ); + sal_Bool ExtText2Doc( SvStream& ); // mit pExtOptions + sal_Bool RTF2Doc( SvStream&, const String& rBaseURL ); + sal_Bool HTML2Doc( SvStream&, const String& rBaseURL ); public: ScImportExport( ScDocument* ); // Gesamtdokument @@ -95,22 +95,22 @@ public: void SetExtOptions( const ScAsciiOptions& rOpt ); - BOOL IsDoubleRef() const { return BOOL( !( bAll || bSingle ) ); } - BOOL IsSingleRef() const { return bSingle; } - BOOL IsNoRef() const { return bAll; } - BOOL IsRef() const { return BOOL( !bAll ); } + sal_Bool IsDoubleRef() const { return sal_Bool( !( bAll || bSingle ) ); } + sal_Bool IsSingleRef() const { return bSingle; } + sal_Bool IsNoRef() const { return bAll; } + sal_Bool IsRef() const { return sal_Bool( !bAll ); } const ScRange& GetRange() const { return aRange; } - BOOL IsUndo() const { return bUndo; } - void SetUndo( BOOL b ) { bUndo = b; } + sal_Bool IsUndo() const { return bUndo; } + void SetUndo( sal_Bool b ) { bUndo = b; } - static BOOL IsFormatSupported( ULONG nFormat ); + static sal_Bool IsFormatSupported( sal_uLong nFormat ); static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p, String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted ); - static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero = FALSE ); + static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, sal_Bool bZero = sal_False ); static void WriteUnicodeOrByteEndl( SvStream& rStrm ); - static inline BOOL IsEndianSwap( const SvStream& rStrm ); + static inline sal_Bool IsEndianSwap( const SvStream& rStrm ); //! only if stream is only used in own (!) memory static inline void SetNoEndianSwap( SvStream& rStrm ); @@ -119,29 +119,29 @@ public: void SetSeparator( sal_Unicode c ) { cSep = c; } sal_Unicode GetDelimiter() const { return cStr; } void SetDelimiter( sal_Unicode c ) { cStr = c; } - BOOL IsFormulas() const { return bFormulas; } - void SetFormulas( BOOL b ) { bFormulas = b; } - BOOL IsIncludeFiltered() const { return bIncludeFiltered; } - void SetIncludeFiltered( BOOL b ) { bIncludeFiltered = b; } + sal_Bool IsFormulas() const { return bFormulas; } + void SetFormulas( sal_Bool b ) { bFormulas = b; } + sal_Bool IsIncludeFiltered() const { return bIncludeFiltered; } + void SetIncludeFiltered( sal_Bool b ) { bIncludeFiltered = b; } - void SetSizeLimit( ULONG nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii + void SetSizeLimit( sal_uLong nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii void SetStreamPath( const String& rPath ) { aStreamPath = rPath; } const String& GetStreamPath() const { return aStreamPath; } - BOOL ImportString( const ::rtl::OUString&, ULONG=FORMAT_STRING ); - BOOL ExportString( ::rtl::OUString&, ULONG=FORMAT_STRING ); - BOOL ExportByteString( ByteString&, rtl_TextEncoding, ULONG=FORMAT_STRING ); + sal_Bool ImportString( const ::rtl::OUString&, sal_uLong=FORMAT_STRING ); + sal_Bool ExportString( ::rtl::OUString&, sal_uLong=FORMAT_STRING ); + sal_Bool ExportByteString( ByteString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING ); - BOOL ImportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING ); - BOOL ExportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING ); + sal_Bool ImportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING ); + sal_Bool ExportStream( SvStream&, const String& rBaseURL, sal_uLong=FORMAT_STRING ); - BOOL ImportData( const String& rMimeType, + sal_Bool ImportData( const String& rMimeType, const ::com::sun::star::uno::Any & rValue ); - BOOL ExportData( const String& rMimeType, + sal_Bool ExportData( const String& rMimeType, ::com::sun::star::uno::Any & rValue ); - BOOL IsOverflow() const { return bOverflow; } // nach dem Importieren + sal_Bool IsOverflow() const { return bOverflow; } // nach dem Importieren const String& GetNonConvertibleChars() const { return aNonConvertibleChars; } @@ -153,7 +153,7 @@ public: // static -inline BOOL ScImportExport::IsEndianSwap( const SvStream& rStrm ) +inline sal_Bool ScImportExport::IsEndianSwap( const SvStream& rStrm ) { #ifdef OSL_BIGENDIAN return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN; @@ -182,7 +182,7 @@ public: rStr.getLength() * sizeof(sal_Unicode), STREAM_READ) { SetStreamCharSet( RTL_TEXTENCODING_UNICODE ); - SetEndianSwap( FALSE ); + SetEndianSwap( sal_False ); } }; diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index f3eba8b26f6b..8291877bbc57 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -69,38 +69,38 @@ private: TypedScStrCollection* pFormulaData; TypedScStrCollection* pFormulaDataPara; Window* pTipVisibleParent; - ULONG nTipVisible; + sal_uLong nTipVisible; Window* pTipVisibleSecParent; - ULONG nTipVisibleSec; + sal_uLong nTipVisibleSec; String aManualTip; String aAutoSearch; - USHORT nAutoPos; - BOOL bUseTab; // Blaettern moeglich + sal_uInt16 nAutoPos; + sal_Bool bUseTab; // Blaettern moeglich - BOOL bTextValid; // Text noch nicht in Edit-Engine + sal_Bool bTextValid; // Text noch nicht in Edit-Engine String aCurrentText; String aFormText; // fuer Funktions-Autopilot xub_StrLen nFormSelStart; // Selektion fuer Funktions-Autopilot xub_StrLen nFormSelEnd; - USHORT nAutoPar; // autom.parentheses than can be overwritten + sal_uInt16 nAutoPar; // autom.parentheses than can be overwritten ScAddress aCursorPos; ScInputMode eMode; - BOOL bModified; - BOOL bSelIsRef; - BOOL bFormulaMode; - BOOL bInRangeUpdate; - BOOL bParenthesisShown; - BOOL bCreatingFuncView; - BOOL bInEnterHandler; - BOOL bCommandErrorShown; - BOOL bInOwnChange; - - BOOL bProtected; - BOOL bCellHasPercentFormat; - ULONG nValidation; + sal_Bool bModified; + sal_Bool bSelIsRef; + sal_Bool bFormulaMode; + sal_Bool bInRangeUpdate; + sal_Bool bParenthesisShown; + sal_Bool bCreatingFuncView; + sal_Bool bInEnterHandler; + sal_Bool bCommandErrorShown; + sal_Bool bInOwnChange; + + sal_Bool bProtected; + sal_Bool bCellHasPercentFormat; + sal_uLong nValidation; SvxCellHorJustify eAttrAdjust; Fraction aScaleX; // fuer Ref-MapMode @@ -111,21 +111,21 @@ private: const ScPatternAttr* pLastPattern; SfxItemSet* pEditDefaults; - BOOL bLastIsSymbol; + sal_Bool bLastIsSymbol; ScInputHdlState* pLastState; Timer* pDelayTimer; ScRangeFindList* pRangeFindList; - static BOOL bAutoComplete; // aus App-Optionen - static BOOL bOptLoaded; + static sal_Bool bAutoComplete; // aus App-Optionen + static sal_Bool bOptLoaded; #ifdef _INPUTHDL_CXX private: void UpdateActiveView(); void SyncViews( EditView* pSourceView = NULL ); - BOOL StartTable( sal_Unicode cTyped, BOOL bFromCommand ); + sal_Bool StartTable( sal_Unicode cTyped, sal_Bool bFromCommand ); void RemoveSelection(); void UpdateFormulaMode(); void InvalidateAttribs(); @@ -133,11 +133,11 @@ private: DECL_LINK( DelayTimer, Timer* ); void GetColData(); void UseColData(); - void NextAutoEntry( BOOL bBack ); + void NextAutoEntry( sal_Bool bBack ); void UpdateAdjust( sal_Unicode cTyped ); void GetFormulaData(); void UseFormulaData(); - void NextFormulaEntry( BOOL bBack ); + void NextFormulaEntry( sal_Bool bBack ); void PasteFunctionData(); void PasteManualTip(); EditView* GetFuncEditView(); @@ -148,7 +148,7 @@ private: void UpdateAutoCorrFlag(); void ResetAutoPar(); void AutoParAdded(); - BOOL CursorAtClosingPar(); + sal_Bool CursorAtClosingPar(); void SkipClosingPar(); DECL_LINK( ModifyHdl, void* ); DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* ); @@ -160,39 +160,39 @@ public: virtual ~ScInputHandler(); void SetMode( ScInputMode eNewMode ); - BOOL IsInputMode() const { return (eMode != SC_INPUT_NONE); } - BOOL IsEditMode() const { return (eMode != SC_INPUT_NONE && + sal_Bool IsInputMode() const { return (eMode != SC_INPUT_NONE); } + sal_Bool IsEditMode() const { return (eMode != SC_INPUT_NONE && eMode != SC_INPUT_TYPE); } - BOOL IsTopMode() const { return (eMode == SC_INPUT_TOP); } + sal_Bool IsTopMode() const { return (eMode == SC_INPUT_TOP); } const String& GetEditString(); const String& GetFormString() const { return aFormText; } const ScAddress& GetCursorPos() const { return aCursorPos; } - BOOL GetTextAndFields( ScEditEngineDefaulter& rDestEngine ); + sal_Bool GetTextAndFields( ScEditEngineDefaulter& rDestEngine ); - BOOL KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit = FALSE ); - void EnterHandler( BYTE nBlockMode = 0 ); + sal_Bool KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit = sal_False ); + void EnterHandler( sal_uInt8 nBlockMode = 0 ); void CancelHandler(); void SetReference( const ScRange& rRef, ScDocument* pDoc ); void AddRefEntry(); - BOOL InputCommand( const CommandEvent& rCEvt, BOOL bForce ); + sal_Bool InputCommand( const CommandEvent& rCEvt, sal_Bool bForce ); - void InsertFunction( const String& rFuncName, BOOL bAddPar = TRUE ); + void InsertFunction( const String& rFuncName, sal_Bool bAddPar = sal_True ); void ClearText(); void InputSelection( EditView* pView ); - void InputChanged( EditView* pView, BOOL bFromNotify = FALSE ); + void InputChanged( EditView* pView, sal_Bool bFromNotify = sal_False ); void ViewShellGone(ScTabViewShell* pViewSh); void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;} - void NotifyChange( const ScInputHdlState* pState, BOOL bForce = FALSE, + void NotifyChange( const ScInputHdlState* pState, sal_Bool bForce = sal_False, ScTabViewShell* pSourceSh = NULL, - BOOL bStopEditing = TRUE); + sal_Bool bStopEditing = sal_True); void UpdateCellAdjust( SvxCellHorJustify eJust ); void ResetDelayTimer(); //BugId 54702 @@ -210,21 +210,21 @@ public: EditView* GetTableView() { return pTableView; } EditView* GetTopView() { return pTopView; } - BOOL DataChanging( sal_Unicode cTyped = 0, BOOL bFromCommand = FALSE ); - void DataChanged( BOOL bFromTopNotify = FALSE ); + sal_Bool DataChanging( sal_Unicode cTyped = 0, sal_Bool bFromCommand = sal_False ); + void DataChanged( sal_Bool bFromTopNotify = sal_False ); - BOOL TakesReturn() const { return ( nTipVisible != 0 ); } + sal_Bool TakesReturn() const { return ( nTipVisible != 0 ); } - void SetModified() { bModified = TRUE; } + void SetModified() { bModified = sal_True; } - BOOL GetSelIsRef() const { return bSelIsRef; } - void SetSelIsRef(BOOL bSet) { bSelIsRef = bSet; } + sal_Bool GetSelIsRef() const { return bSelIsRef; } + void SetSelIsRef(sal_Bool bSet) { bSelIsRef = bSet; } void ShowRefFrame(); ScRangeFindList* GetRangeFindList() { return pRangeFindList; } - void UpdateRange( USHORT nIndex, const ScRange& rNew ); + void UpdateRange( sal_uInt16 nIndex, const ScRange& rNew ); // Kommunikation mit Funktionsautopilot void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd ); @@ -232,19 +232,19 @@ public: void InputReplaceSelection ( const String& rStr ); String InputGetFormulaStr (); - BOOL IsFormulaMode() const { return bFormulaMode; } + sal_Bool IsFormulaMode() const { return bFormulaMode; } ScInputWindow* GetInputWindow() { return pInputWin; } void SetInputWindow( ScInputWindow* pNew ) { pInputWin = pNew; } - void StopInputWinEngine( BOOL bAll ); + void StopInputWinEngine( sal_Bool bAll ); - BOOL IsInEnterHandler() const { return bInEnterHandler; } - BOOL IsInOwnChange() const { return bInOwnChange; } + sal_Bool IsInEnterHandler() const { return bInEnterHandler; } + sal_Bool IsInOwnChange() const { return bInOwnChange; } - BOOL IsModalMode( SfxObjectShell* pDocSh ); + sal_Bool IsModalMode( SfxObjectShell* pDocSh ); void ForgetLastPattern(); - void UpdateSpellSettings( BOOL bFromStartTab = FALSE ); + void UpdateSpellSettings( sal_Bool bFromStartTab = sal_False ); void FormulaPreview(); @@ -253,7 +253,7 @@ public: // eigentlich private, fuer SID_INPUT_SUM public void InitRangeFinder( const String& rFormula ); - static void SetAutoComplete(BOOL bSet) { bAutoComplete = bSet; } + static void SetAutoComplete(sal_Bool bSet) { bAutoComplete = bSet; } }; //======================================================================== diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 236d34a8254f..60a6896cf696 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -55,18 +55,18 @@ public: void SetTextString( const String& rString ); const String& GetTextString() const; - BOOL IsInputActive(); + sal_Bool IsInputActive(); EditView* GetEditView(); // fuer FunktionsAutopiloten void MakeDialogEditView(); void StartEditEngine(); - void StopEditEngine( BOOL bAll ); + void StopEditEngine( sal_Bool bAll ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - void SetFormulaMode( BOOL bSet ); + void SetFormulaMode( sal_Bool bSet ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); @@ -103,13 +103,13 @@ private: ScEditEngineDefaulter* pEditEngine; // erst bei Bedarf angelegt EditView* pEditView; AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies - BOOL bIsRTL; - BOOL bIsInsertMode; - BOOL bFormulaMode; + sal_Bool bIsRTL; + sal_Bool bIsInsertMode; + sal_Bool bFormulaMode; // #102710#; this flag should be true if a key input or a command is handled // it prevents the call of InputChanged in the ModifyHandler of the EditEngine - BOOL bInputMode; + sal_Bool bInputMode; }; //======================================================================== @@ -119,16 +119,16 @@ class ScPosWnd : public ComboBox, public SfxListener // Positionsanzeige private: String aPosStr; Accelerator* pAccel; - ULONG nTipVisible; - BOOL bFormulaMode; - BOOL bTopHadFocus; + sal_uLong nTipVisible; + sal_Bool bFormulaMode; + sal_Bool bTopHadFocus; public: ScPosWnd( Window* pParent ); virtual ~ScPosWnd(); void SetPos( const String& rPosStr ); // angezeigter Text - void SetFormulaMode( BOOL bSet ); + void SetFormulaMode( sal_Bool bSet ); protected: virtual void Select(); @@ -158,17 +158,17 @@ public: virtual void Resize(); virtual void Select(); - void SetFuncString( const String& rString, BOOL bDoEdit = TRUE ); + void SetFuncString( const String& rString, sal_Bool bDoEdit = sal_True ); void SetPosString( const String& rStr ); void SetTextString( const String& rString ); void SetOkCancelMode(); void SetSumAssignMode(); - void EnableButtons( BOOL bEnable = TRUE ); + void EnableButtons( sal_Bool bEnable = sal_True ); - void SetFormulaMode( BOOL bSet ); + void SetFormulaMode( sal_Bool bSet ); - BOOL IsInputActive(); + sal_Bool IsInputActive(); EditView* GetEditView(); //UNUSED2008-05 EditView* ActivateEdit( const String& rText, //UNUSED2008-05 const ESelection& rSel ); @@ -182,7 +182,7 @@ public: // Fuer FunktionsAutopiloten void MakeDialogEditView(); - void StopEditEngine( BOOL bAll ); + void StopEditEngine( sal_Bool bAll ); void SetInputHandler( ScInputHandler* pNew ); @@ -207,7 +207,7 @@ private: String aTextCancel; String aTextSum; String aTextEqual; - BOOL bIsOkCancelMode; + sal_Bool bIsOkCancelMode; }; //================================================================== @@ -216,7 +216,7 @@ class ScInputWindowWrapper : public SfxChildWindow { public: ScInputWindowWrapper( Window* pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx index 110c914f294c..e4b0d2b9d03e 100644 --- a/sc/source/ui/inc/inscldlg.hxx +++ b/sc/source/ui/inc/inscldlg.hxx @@ -50,7 +50,7 @@ private: HelpButton aBtnHelp; public: - ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove = FALSE ); + ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = sal_False ); ~ScInsertCellDlg(); InsCellCmd GetInsCellCmd() const; diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx index cf8008809d52..debd448c422f 100644 --- a/sc/source/ui/inc/inscodlg.hxx +++ b/sc/source/ui/inc/inscodlg.hxx @@ -46,20 +46,20 @@ class ScInsertContentsDlg : public ModalDialog { public: ScInsertContentsDlg( Window* pParent, - USHORT nCheckDefaults = 0, + sal_uInt16 nCheckDefaults = 0, const String* pStrTitle = NULL ); ~ScInsertContentsDlg(); - USHORT GetInsContentsCmdBits() const; - USHORT GetFormulaCmdBits() const; - BOOL IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();} - BOOL IsTranspose() const {return aBtnTranspose.IsChecked();} - BOOL IsLink() const {return aBtnLink.IsChecked();} + sal_uInt16 GetInsContentsCmdBits() const; + sal_uInt16 GetFormulaCmdBits() const; + sal_Bool IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();} + sal_Bool IsTranspose() const {return aBtnTranspose.IsChecked();} + sal_Bool IsLink() const {return aBtnLink.IsChecked();} InsCellCmd GetMoveMode(); - void SetOtherDoc( BOOL bSet ); - void SetFillMode( BOOL bSet ); - void SetChangeTrack( BOOL bSet ); + void SetOtherDoc( sal_Bool bSet ); + void SetFillMode( sal_Bool bSet ); + void SetChangeTrack( sal_Bool bSet ); void SetCellShiftDisabled( int nDisable ); private: @@ -96,19 +96,19 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - BOOL bOtherDoc; - BOOL bFillMode; - BOOL bChangeTrack; - BOOL bMoveDownDisabled; - BOOL bMoveRightDisabled; + sal_Bool bOtherDoc; + sal_Bool bFillMode; + sal_Bool bChangeTrack; + sal_Bool bMoveDownDisabled; + sal_Bool bMoveRightDisabled; - static BOOL bPreviousAllCheck; - static USHORT nPreviousChecks; - static USHORT nPreviousChecks2; - static USHORT nPreviousFormulaChecks; - static USHORT nPreviousMoveMode; // enum InsCellCmd + static sal_Bool bPreviousAllCheck; + static sal_uInt16 nPreviousChecks; + static sal_uInt16 nPreviousChecks2; + static sal_uInt16 nPreviousFormulaChecks; + static sal_uInt16 nPreviousMoveMode; // enum InsCellCmd - void DisableChecks( BOOL bInsAllChecked = TRUE ); + void DisableChecks( sal_Bool bInsAllChecked = sal_True ); void TestModes(); // Handler diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index 660d16b62cca..73e07f0d79fc 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -73,13 +73,13 @@ public: virtual short Execute(); // ueberladen, um Dialog-Parent zu setzen - BOOL GetTablesFromFile() { return aBtnFromFile.IsChecked(); } - BOOL GetTablesAsLink() { return aBtnLink.IsChecked(); } + sal_Bool GetTablesFromFile() { return aBtnFromFile.IsChecked(); } + sal_Bool GetTablesAsLink() { return aBtnLink.IsChecked(); } - const String* GetFirstTable( USHORT* pN = NULL ); - const String* GetNextTable( USHORT* pN = NULL ); + const String* GetFirstTable( sal_uInt16* pN = NULL ); + const String* GetNextTable( sal_uInt16* pN = NULL ); ScDocShell* GetDocShellTables() { return pDocShTables; } - BOOL IsTableBefore() { return aBtnBefore.IsChecked(); } + sal_Bool IsTableBefore() { return aBtnBefore.IsChecked(); } SCTAB GetTableCount() { return nTableCount;} private: @@ -109,7 +109,7 @@ private: SfxObjectShellRef aDocShTablesRef; bool bMustClose; - USHORT nSelTabIndex; // fuer GetFirstTable() / GetNextTable() + sal_uInt16 nSelTabIndex; // fuer GetFirstTable() / GetNextTable() String aStrCurSelTable; SCTAB nTableCount; diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx index fa288c609070..7ee7de254414 100644 --- a/sc/source/ui/inc/lbseldlg.hxx +++ b/sc/source/ui/inc/lbseldlg.hxx @@ -54,14 +54,14 @@ private: public: ScSelEntryDlg( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const String& aTitle, const String& aLbTitle, List& aEntryList ); ~ScSelEntryDlg(); String GetSelectEntry() const; -//UNUSED2008-05 USHORT GetSelectEntryPos() const; +//UNUSED2008-05 sal_uInt16 GetSelectEntryPos() const; }; diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index c90e1ea47e94..ee4896e4b8b9 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -91,7 +91,7 @@ public: void InitFromOldLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - ULONG nRefresh ); + sal_uLong nRefresh ); virtual short Execute(); // overwritten to set dialog parent @@ -99,7 +99,7 @@ public: String GetFilter(); // may be empty String GetOptions(); // filter options String GetSource(); // separated by ";" - ULONG GetRefresh(); // 0 if disabled + sal_uLong GetRefresh(); // 0 if disabled }; #endif diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx index 7bc33b3af96b..bf769c397b82 100644 --- a/sc/source/ui/inc/msgpool.hxx +++ b/sc/source/ui/inc/msgpool.hxx @@ -69,7 +69,7 @@ protected: virtual ~ScMessagePool(); public: - virtual SfxMapUnit GetMetric( USHORT nWhich ) const; + virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const; }; diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx index c9249f9fe945..092457d4a1da 100644 --- a/sc/source/ui/inc/mtrindlg.hxx +++ b/sc/source/ui/inc/mtrindlg.hxx @@ -40,11 +40,11 @@ class ScMetricInputDlg : public ModalDialog { public: ScMetricInputDlg( Window* pParent, - USHORT nResId, // Ableitung fuer jeden Dialog! + sal_uInt16 nResId, // Ableitung fuer jeden Dialog! long nCurrent, long nDefault, FieldUnit eFUnit = FUNIT_MM, - USHORT nDecimals = 2, + sal_uInt16 nDecimals = 2, long nMaximum = 1000, long nMinimum = 0, long nFirst = 1, diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index 6ca196a4fbb5..e05795518555 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -46,11 +46,11 @@ public: ScMoveTableDlg( Window* pParent ); ~ScMoveTableDlg(); - USHORT GetSelectedDocument () const; + sal_uInt16 GetSelectedDocument () const; SCTAB GetSelectedTable () const; - BOOL GetCopyTable () const; - void SetCopyTable (BOOL bFlag=TRUE); - void EnableCopyTable (BOOL bFlag=TRUE); + sal_Bool GetCopyTable () const; + void SetCopyTable (sal_Bool bFlag=sal_True); + void EnableCopyTable (sal_Bool bFlag=sal_True); private: FixedText aFtDoc; @@ -62,9 +62,9 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; - USHORT nDocument; + sal_uInt16 nDocument; SCTAB nTable; - BOOL bCopyTable; + sal_Bool bCopyTable; //-------------------------------------- void Init (); void InitDocListBox (); diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx index 8f2e90bcacfc..eea0dd01ec6f 100644 --- a/sc/source/ui/inc/namecrea.hxx +++ b/sc/source/ui/inc/namecrea.hxx @@ -50,9 +50,9 @@ protected: CancelButton aCancelButton; HelpButton aHelpButton; public: - ScNameCreateDlg( Window * pParent, USHORT nFlags ); + ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags ); - USHORT GetFlags() const; + sal_uInt16 GetFlags() const; }; diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index b122c57a19fd..f83e7f0ad3e5 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -69,7 +69,7 @@ private: PushButton aBtnAdd; PushButton aBtnRemove; MoreButton aBtnMore; - BOOL bSaved; + sal_Bool bSaved; const String aStrAdd; // "Hinzufuegen" const String aStrModify; // "Aendern" @@ -86,7 +86,7 @@ private: void Init(); void UpdateChecks(); void UpdateNames(); - void CalcCurTableAssign( String& aAssign, USHORT nPos ); + void CalcCurTableAssign( String& aAssign, sal_uInt16 nPos ); // Handler: DECL_LINK( OkBtnHdl, void * ); @@ -100,7 +100,7 @@ private: protected: - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); public: @@ -110,10 +110,10 @@ public: ~ScNameDlg(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); }; diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx index c3e408d0c373..ad98d257ba46 100644 --- a/sc/source/ui/inc/namepast.hxx +++ b/sc/source/ui/inc/namepast.hxx @@ -53,7 +53,7 @@ protected: HelpButton aHelpButton; PushButton aInsListButton; public: - ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList=TRUE ); + ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList=sal_True ); String GetSelectedName() const; }; diff --git a/sc/source/ui/inc/navcitem.hxx b/sc/source/ui/inc/navcitem.hxx index b464bd6cc9ad..0a8971491cf7 100644 --- a/sc/source/ui/inc/navcitem.hxx +++ b/sc/source/ui/inc/navcitem.hxx @@ -39,11 +39,11 @@ class ScNavigatorDlg; class ScNavigatorControllerItem : public SfxControllerItem { public: - ScNavigatorControllerItem( USHORT nId, + ScNavigatorControllerItem( sal_uInt16 nId, ScNavigatorDlg& rDlg, SfxBindings& rBindings ); protected: - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pItem ); private: diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index 8d53742b6f1e..bf034b27c618 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -93,7 +93,7 @@ private: private: const ScenarioEntry* GetSelectedEntry() const; - void ExecuteScenarioSlot( USHORT nSlotId ); + void ExecuteScenarioSlot( sal_uInt16 nSlotId ); void SelectScenario(); void EditScenario(); void DeleteScenario( bool bQueryBox ); @@ -150,7 +150,7 @@ protected: private: ScNavigatorDlg& rDlg; SCCOL nCol; - USHORT nKeyGroup; + sal_uInt16 nKeyGroup; void EvalText (); void ExecuteCol (); @@ -209,7 +209,7 @@ public: CommandToolBox( ScNavigatorDlg* pParent, const ResId& rResId ); ~CommandToolBox(); - void Select( USHORT nId ); + void Select( sal_uInt16 nId ); void UpdateButtons(); void InitImageList(); @@ -272,11 +272,11 @@ private: long nListModeHeight; long nInitListHeight; NavListMode eListMode; - USHORT nDropMode; + sal_uInt16 nDropMode; SCCOL nCurCol; SCROW nCurRow; SCTAB nCurTab; - BOOL bFirstBig; + sal_Bool bFirstBig; ScNavigatorControllerItem** ppBoundItems; @@ -296,7 +296,7 @@ private: ScTabViewShell* GetTabViewShell() const; ScNavigatorSettings* GetNavigatorSettings(); - BOOL GetViewData(); + sal_Bool GetViewData(); void UpdateColumn ( const SCCOL* pCol = NULL ); void UpdateRow ( const SCROW* pRow = NULL ); @@ -305,12 +305,12 @@ private: void GetDocNames(const String* pSelEntry = NULL); - void SetListMode ( NavListMode eMode, BOOL bSetSize = TRUE ); - void ShowList ( BOOL bShow, BOOL bSetSize ); - void ShowScenarios ( BOOL bShow, BOOL bSetSize ); + void SetListMode ( NavListMode eMode, sal_Bool bSetSize = sal_True ); + void ShowList ( sal_Bool bShow, sal_Bool bSetSize ); + void ShowScenarios ( sal_Bool bShow, sal_Bool bSetSize ); - void SetDropMode(USHORT nNew); - USHORT GetDropMode() const { return nDropMode; } + void SetDropMode(sal_uInt16 nNew); + sal_uInt16 GetDropMode() const { return nDropMode; } const String& GetStrDragMode() const { return aStrDragMode; } const String& GetStrDisplay() const { return aStrDisplay; } @@ -348,7 +348,7 @@ class ScNavigatorDialogWrapper: public SfxChildWindowContext { public: ScNavigatorDialogWrapper( Window* pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); diff --git a/sc/source/ui/inc/navsett.hxx b/sc/source/ui/inc/navsett.hxx index 896c64606646..4332ee8cf454 100644 --- a/sc/source/ui/inc/navsett.hxx +++ b/sc/source/ui/inc/navsett.hxx @@ -37,21 +37,21 @@ class ScNavigatorSettings { private: - ::std::vector< BOOL > maExpandedVec; /// Array of Booleans for expand state. - USHORT mnRootSelected; /// Index of selected root entry. - ULONG mnChildSelected; /// Index of selected child entry. + ::std::vector< sal_Bool > maExpandedVec; /// Array of Booleans for expand state. + sal_uInt16 mnRootSelected; /// Index of selected root entry. + sal_uLong mnChildSelected; /// Index of selected child entry. public: ScNavigatorSettings(); - inline void SetExpanded( USHORT nIndex, BOOL bExpand ) { maExpandedVec[ nIndex ] = bExpand; } - inline BOOL IsExpanded( USHORT nIndex ) const { return maExpandedVec[ nIndex ]; } + inline void SetExpanded( sal_uInt16 nIndex, sal_Bool bExpand ) { maExpandedVec[ nIndex ] = bExpand; } + inline sal_Bool IsExpanded( sal_uInt16 nIndex ) const { return maExpandedVec[ nIndex ]; } - inline void SetRootSelected( USHORT nIndex ) { mnRootSelected = nIndex; } - inline USHORT GetRootSelected() const { return mnRootSelected; } + inline void SetRootSelected( sal_uInt16 nIndex ) { mnRootSelected = nIndex; } + inline sal_uInt16 GetRootSelected() const { return mnRootSelected; } - inline void SetChildSelected( ULONG nIndex ) { mnChildSelected = nIndex; } - inline ULONG GetChildSelected() const { return mnChildSelected; } + inline void SetChildSelected( sal_uLong nIndex ) { mnChildSelected = nIndex; } + inline sal_uLong GetChildSelected() const { return mnChildSelected; } }; diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index 65e36565ceb8..3523259d84b4 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -51,27 +51,27 @@ private: Rectangle aVisRect; Timer aTimer; MapMode aMapMode; - BOOL bLeft; - BOOL bByKeyboard; + sal_Bool bLeft; + sal_Bool bByKeyboard; Rectangle aRect; SdrModel* pModel; SdrObject* pObject; - BOOL bVisible; + sal_Bool bVisible; DECL_LINK( TimeHdl, Timer* ); public: ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal, ScDocument* pD, ScAddress aPos, const String& rUser, - const MapMode& rMap, BOOL bLeftEdge, BOOL bForce, BOOL bKeyboard ); + const MapMode& rMap, sal_Bool bLeftEdge, sal_Bool bForce, sal_Bool bKeyboard ); ~ScNoteMarker(); void Draw(); void InvalidateWin(); ScAddress GetDocPos() const { return aDocPos; } - BOOL IsByKeyboard() const { return bByKeyboard; } + sal_Bool IsByKeyboard() const { return bByKeyboard; } }; diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx index 444774ed2068..acdbf5e25a37 100644 --- a/sc/source/ui/inc/olinefun.hxx +++ b/sc/source/ui/inc/olinefun.hxx @@ -45,21 +45,21 @@ public: ScOutlineDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {} ~ScOutlineDocFunc() {} - BOOL MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi ); - BOOL RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi ); - BOOL RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi ); - BOOL AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi ); + sal_Bool MakeOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool RemoveOutline( const ScRange& rRange, sal_Bool bColumns, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool AutoOutline( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ); - BOOL SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel, - BOOL bRecord, BOOL bPaint, BOOL bApi ); + sal_Bool SelectLevel( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); - BOOL ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi ); - BOOL HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi ); + sal_Bool ShowMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ); + sal_Bool HideMarkedOutlines( const ScRange& rRange, sal_Bool bRecord, sal_Bool bApi ); - BOOL ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry, - BOOL bRecord, BOOL bPaint, BOOL bApi ); - BOOL HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry, - BOOL bRecord, BOOL bPaint, BOOL bApi ); + sal_Bool ShowOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); + sal_Bool HideOutline( SCTAB nTab, sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, + sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); }; diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx index 104f9e8f11da..8aa62084c7fd 100644 --- a/sc/source/ui/inc/olinewin.hxx +++ b/sc/source/ui/inc/olinewin.hxx @@ -208,7 +208,7 @@ private: long nLevelStart, long nEntryStart, long nLevelEnd, long nEntryEnd ); /** Draws the specified image unpressed. */ - void DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId ); + void DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId ); /** Draws a pressed or unpressed border. */ void DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed ); diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx index 0573ecb86f1e..df0377517ded 100644 --- a/sc/source/ui/inc/opredlin.hxx +++ b/sc/source/ui/inc/opredlin.hxx @@ -78,7 +78,7 @@ public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; #endif diff --git a/sc/source/ui/inc/optload.hxx b/sc/source/ui/inc/optload.hxx index 93d5fefa8358..25a3c8abe7c9 100644 --- a/sc/source/ui/inc/optload.hxx +++ b/sc/source/ui/inc/optload.hxx @@ -59,7 +59,7 @@ public: void SetDocument(ScDocument*); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); }; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index bbd98f1d1818..652fd7fc8fc9 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -62,7 +62,7 @@ protected: struct ScOptConditionRow { String aLeftStr; - USHORT nOperator; + sal_uInt16 nOperator; String aRightStr; ScOptConditionRow() : nOperator(0) {} @@ -73,9 +73,9 @@ struct ScOptConditionRow class ScOptSolverSave { String maObjective; - BOOL mbMax; - BOOL mbMin; - BOOL mbValue; + sal_Bool mbMax; + sal_Bool mbMin; + sal_Bool mbValue; String maTarget; String maVariable; std::vector maConditions; @@ -83,16 +83,16 @@ class ScOptSolverSave com::sun::star::uno::Sequence maProperties; public: - ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue, + ScOptSolverSave( const String& rObjective, sal_Bool bMax, sal_Bool bMin, sal_Bool bValue, const String& rTarget, const String& rVariable, const std::vector& rConditions, const String& rEngine, const com::sun::star::uno::Sequence& rProperties ); const String& GetObjective() const { return maObjective; } - BOOL GetMax() const { return mbMax; } - BOOL GetMin() const { return mbMin; } - BOOL GetValue() const { return mbValue; } + sal_Bool GetMax() const { return mbMax; } + sal_Bool GetMin() const { return mbMin; } + sal_Bool GetValue() const { return mbValue; } const String& GetTarget() const { return maTarget; } const String& GetVariable() const { return maVariable; } const std::vector& GetConditions() const { return maConditions; } @@ -109,9 +109,9 @@ public: ~ScOptSolverDlg(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: FixedText maFtObjectiveCell; diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index 42844513af92..26d2262b5a8e 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -106,7 +106,7 @@ private: ScOutputType eType; // Bildschirm/Drucker ... double nPPTX; // Pixel per Twips double nPPTY; -// USHORT nZoom; // Zoom-Faktor (Prozent) - fuer GetFont +// sal_uInt16 nZoom; // Zoom-Faktor (Prozent) - fuer GetFont Fraction aZoomX; Fraction aZoomY; @@ -117,61 +117,61 @@ private: // #114135# FmFormView* pDrawView; // SdrView to paint to - BOOL bEditMode; // InPlace editierte Zelle - nicht ausgeben + sal_Bool bEditMode; // InPlace editierte Zelle - nicht ausgeben SCCOL nEditCol; SCROW nEditRow; - BOOL bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!) - BOOL bSingleGrid; // beim Gitter bChanged auswerten + sal_Bool bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!) + sal_Bool bSingleGrid; // beim Gitter bChanged auswerten - BOOL bPagebreakMode; // Seitenumbruch-Vorschau - BOOL bSolidBackground; // weiss statt transparent + sal_Bool bPagebreakMode; // Seitenumbruch-Vorschau + sal_Bool bSolidBackground; // weiss statt transparent - BOOL bUseStyleColor; - BOOL bForceAutoColor; + sal_Bool bUseStyleColor; + sal_Bool bForceAutoColor; - BOOL bSyntaxMode; // Syntax-Highlighting + sal_Bool bSyntaxMode; // Syntax-Highlighting Color* pValueColor; Color* pTextColor; Color* pFormulaColor; Color aGridColor; - BOOL bShowNullValues; - BOOL bShowFormulas; - BOOL bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen - BOOL bMarkClipped; + sal_Bool bShowNullValues; + sal_Bool bShowFormulas; + sal_Bool bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen + sal_Bool bMarkClipped; - BOOL bSnapPixel; + sal_Bool bSnapPixel; - BOOL bAnyRotated; // intern - BOOL bAnyClipped; // intern - BOOL bTabProtected; - BYTE nTabTextDirection; // EEHorizontalTextDirection values - BOOL bLayoutRTL; + sal_Bool bAnyRotated; // intern + sal_Bool bAnyClipped; // intern + sal_Bool bTabProtected; + sal_uInt8 nTabTextDirection; // EEHorizontalTextDirection values + sal_Bool bLayoutRTL; // #i74769# use SdrPaintWindow direct, remember it during BeginDrawLayers/EndDrawLayers SdrPaintWindow* mpTargetPaintWindow; // private methods - BOOL GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, - SCCOL& rOverX, SCROW& rOverY, BOOL bVisRowChanged ); - BOOL IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY ); + sal_Bool GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, + SCCOL& rOverX, SCROW& rOverY, sal_Bool bVisRowChanged ); + sal_Bool IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY ); void GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell ); - BOOL IsAvailable( SCCOL nX, SCROW nY ); + sal_Bool IsAvailable( SCCOL nX, SCROW nY ); void GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY, SCCOL nCellX, SCROW nCellY, long nNeeded, const ScPatternAttr& rPattern, - USHORT nHorJustify, bool bCellIsValue, + sal_uInt16 nHorJustify, bool bCellIsValue, bool bBreak, bool bOverwrite, OutputAreaParam& rParam ); void ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect, long nLeftM, long nTopM, long nRightM, long nBottomM, - BOOL bWidth, USHORT nOrient, long nAttrRotate, BOOL bPixelToLogic, + sal_Bool bWidth, sal_uInt16 nOrient, long nAttrRotate, sal_Bool bPixelToLogic, long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip ); @@ -203,36 +203,36 @@ public: // #114135# void SetDrawView( FmFormView* pNew ) { pDrawView = pNew; } - void SetSolidBackground( BOOL bSet ) { bSolidBackground = bSet; } - void SetUseStyleColor( BOOL bSet ) { bUseStyleColor = bSet; } + void SetSolidBackground( sal_Bool bSet ) { bSolidBackground = bSet; } + void SetUseStyleColor( sal_Bool bSet ) { bUseStyleColor = bSet; } void SetEditCell( SCCOL nCol, SCROW nRow ); - void SetSyntaxMode( BOOL bNewMode ); - void SetMetaFileMode( BOOL bNewMode ); - void SetSingleGrid( BOOL bNewMode ); + void SetSyntaxMode( sal_Bool bNewMode ); + void SetMetaFileMode( sal_Bool bNewMode ); + void SetSingleGrid( sal_Bool bNewMode ); void SetGridColor( const Color& rColor ); - void SetMarkClipped( BOOL bSet ); - void SetShowNullValues ( BOOL bSet = TRUE ); - void SetShowFormulas ( BOOL bSet = TRUE ); - void SetShowSpellErrors( BOOL bSet = TRUE ); + void SetMarkClipped( sal_Bool bSet ); + void SetShowNullValues ( sal_Bool bSet = sal_True ); + void SetShowFormulas ( sal_Bool bSet = sal_True ); + void SetShowSpellErrors( sal_Bool bSet = sal_True ); void SetMirrorWidth( long nNew ); long GetScrW() const { return nScrW; } long GetScrH() const { return nScrH; } - void SetSnapPixel( BOOL bSet = TRUE ); + void SetSnapPixel( sal_Bool bSet = sal_True ); - void DrawGrid( BOOL bGrid, BOOL bPage ); - void DrawStrings( BOOL bPixelToLogic = FALSE ); + void DrawGrid( sal_Bool bGrid, sal_Bool bPage ); + void DrawStrings( sal_Bool bPixelToLogic = sal_False ); void DrawBackground(); void DrawShadow(); - void DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom); + void DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom); void DrawFrame(); // with logic MapMode set! - void DrawEdit(BOOL bPixelToLogic); + void DrawEdit(sal_Bool bPixelToLogic); void FindRotated(); - void DrawRotated(BOOL bPixelToLogic); // logisch + void DrawRotated(sal_Bool bPixelToLogic); // logisch void DrawClear(); @@ -245,7 +245,7 @@ public: void DrawingSingle(const sal_uInt16 nLayer); void DrawSelectiveObjects(const sal_uInt16 nLayer); - BOOL SetChangedClip(); // FALSE = nix + sal_Bool SetChangedClip(); // sal_False = nix PolyPolygon GetChangedArea(); void FindChanged(); @@ -255,10 +255,10 @@ public: #endif void DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, - const Color& rColor, BOOL bHandle ); + const Color& rColor, sal_Bool bHandle ); void DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, - const Color& rColor, USHORT nType ); + const Color& rColor, sal_uInt16 nType ); void DrawChangeTrack(); void DrawClipMarks(); diff --git a/sc/source/ui/inc/pagedata.hxx b/sc/source/ui/inc/pagedata.hxx index bcd85c8f5a96..85160b22c7a8 100644 --- a/sc/source/ui/inc/pagedata.hxx +++ b/sc/source/ui/inc/pagedata.hxx @@ -44,8 +44,8 @@ private: size_t nPagesY; SCROW* pPageEndY; long nFirstPage; - BOOL bTopDown; - BOOL bAutomatic; + sal_Bool bTopDown; + sal_Bool bAutomatic; public: ScPrintRangeData(); @@ -64,10 +64,10 @@ public: void SetFirstPage( long nNew ) { nFirstPage = nNew; } long GetFirstPage() const { return nFirstPage; } - void SetTopDown( BOOL bSet ) { bTopDown = bSet; } - BOOL IsTopDown() const { return bTopDown; } - void SetAutomatic( BOOL bSet ) { bAutomatic = bSet; } - BOOL IsAutomatic() const { return bAutomatic; } + void SetTopDown( sal_Bool bSet ) { bTopDown = bSet; } + sal_Bool IsTopDown() const { return bTopDown; } + void SetAutomatic( sal_Bool bSet ) { bAutomatic = bSet; } + sal_Bool IsAutomatic() const { return bAutomatic; } }; class ScPageBreakData @@ -84,7 +84,7 @@ public: size_t GetCount() const { return nUsed; } ScPrintRangeData& GetData(size_t i); - BOOL IsEqual( const ScPageBreakData& rOther ) const; + sal_Bool IsEqual( const ScPageBreakData& rOther ) const; void AddPages(); }; diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx index ae02fdb38114..fa79312a8536 100644 --- a/sc/source/ui/inc/parawin.hxx +++ b/sc/source/ui/inc/parawin.hxx @@ -62,10 +62,10 @@ private: Link aFxLink; Link aArgModifiedLink; - ::std::vector aVisibleArgMapping; + ::std::vector aVisibleArgMapping; const ScFuncDesc* pFuncDesc; ScAnyRefDlg* pMyParent; - USHORT nArgs; // unsuppressed arguments + sal_uInt16 nArgs; // unsuppressed arguments Font aFntBold; Font aFntLight; @@ -90,10 +90,10 @@ private: ArgEdit aEdArg4; formula::RefButton aRefBtn4; ScrollBar aSlider; - BOOL bRefMode; + sal_Bool bRefMode; - USHORT nEdFocus; - USHORT nActiveLine; + sal_uInt16 nEdFocus; + sal_uInt16 nActiveLine; ArgInput aArgInput[4]; String aDefaultString; @@ -110,7 +110,7 @@ protected: virtual void ArgumentModified(); virtual void FxClick(); - void InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx, + void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, ArgEdit& rEdArg, formula::RefButton& rRefBtn); void DelParaArray(); @@ -118,40 +118,40 @@ protected: void SetArgumentText(const String& aText); - void SetArgName (USHORT no,const String &aArg); - void SetArgNameFont (USHORT no,const Font&); - void SetArgVal (USHORT no,const String &aArg); + void SetArgName (sal_uInt16 no,const String &aArg); + void SetArgNameFont (sal_uInt16 no,const Font&); + void SetArgVal (sal_uInt16 no,const String &aArg); - void HideParaLine(USHORT no); - void ShowParaLine(USHORT no); - void UpdateArgDesc( USHORT nArg ); - void UpdateArgInput( USHORT nOffset, USHORT i ); + void HideParaLine(sal_uInt16 no); + void ShowParaLine(sal_uInt16 no); + void UpdateArgDesc( sal_uInt16 nArg ); + void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ); public: ScParaWin(ScAnyRefDlg* pParent,Point aPos); ~ScParaWin(); void SetFunctionDesc(const ScFuncDesc* pFDesc); - void SetArgumentOffset(USHORT nOffset); + void SetArgumentOffset(sal_uInt16 nOffset); void SetEditDesc(const String& aText); void UpdateParas(); void ClearAll(); - BOOL IsRefMode() {return bRefMode;} - void SetRefMode(BOOL bFlag) {bRefMode=bFlag;} + sal_Bool IsRefMode() {return bRefMode;} + void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;} - USHORT GetActiveLine(); - void SetActiveLine(USHORT no); + sal_uInt16 GetActiveLine(); + void SetActiveLine(sal_uInt16 no); formula::RefEdit* GetActiveEdit(); String GetActiveArgName(); - String GetArgument(USHORT no); - void SetArgument(USHORT no, const String& aString); + String GetArgument(sal_uInt16 no); + void SetArgument(sal_uInt16 no, const String& aString); void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont); - void SetEdFocus(USHORT nEditLine); //Sichtbare Editzeilen - USHORT GetSliderPos(); - void SetSliderPos(USHORT nSliderPos); + void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen + sal_uInt16 GetSliderPos(); + void SetSliderPos(sal_uInt16 nSliderPos); void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; } const Link& GetScrollHdl() const { return aScrollLink; } diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index 426f95399b33..4733f8bae6b0 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -111,14 +111,14 @@ private: const String aStrRow; const String aStrColumn; - const USHORT nWhichQuery; + const sal_uInt16 nWhichQuery; const ScQueryParam theQueryData; ScQueryItem* pOutItem; ScViewData* pViewData; ScDocument* pDoc; SCTAB nSrcTab; - USHORT nFieldCount; + sal_uInt16 nFieldCount; ComboBox* aValueEdArr[3]; ListBox* aFieldLbArr[3]; ListBox* aCondLbArr[3]; @@ -129,9 +129,9 @@ private: private: void Init ( const SfxItemSet& rArgSet ); void FillFieldLists (); - void UpdateValueList ( USHORT nList ); - void ClearValueList ( USHORT nList ); - USHORT GetFieldSelPos ( SCCOL nField ); + void UpdateValueList ( sal_uInt16 nList ); + void ClearValueList ( sal_uInt16 nList ); + sal_uInt16 GetFieldSelPos ( SCCOL nField ); // Handler: DECL_LINK( LbSelectHdl, ListBox* ); diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx index 365df0acc38b..5736377cef17 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -66,7 +66,7 @@ public: void SetRanges(const ScRangeList& rNew) { aRanges = rNew; } void SetOptions(const ScPrintOptions& rNew) { aOptions = rNew; } - BOOL operator==(const ScPrintSelectionStatus& rOther) const + sal_Bool operator==(const ScPrintSelectionStatus& rOther) const { return eMode == rOther.eMode && aRanges == rOther.aRanges && aOptions == rOther.aOptions; } ScPrintSelectionMode GetMode() const { return eMode; } @@ -109,7 +109,7 @@ public: const ScPrintSelectionStatus& rStatus ); ~ScPrintFuncCache(); - BOOL IsSameSelection( const ScPrintSelectionStatus& rStatus ) const; + sal_Bool IsSameSelection( const ScPrintSelectionStatus& rStatus ) const; void InitLocations( const ScMarkData& rMark, OutputDevice* pDev ); bool FindLocation( const ScAddress& rCell, ScPrintPageLocation& rLocation ) const; diff --git a/sc/source/ui/inc/pntlock.hxx b/sc/source/ui/inc/pntlock.hxx index 60a7502c9734..888a11f5596e 100644 --- a/sc/source/ui/inc/pntlock.hxx +++ b/sc/source/ui/inc/pntlock.hxx @@ -34,32 +34,32 @@ class ScPaintLockData { private: ScRangeListRef xRangeList; - USHORT nMode; - USHORT nLevel; - USHORT nDocLevel; - USHORT nParts; - BOOL bModified; + sal_uInt16 nMode; + sal_uInt16 nLevel; + sal_uInt16 nDocLevel; + sal_uInt16 nParts; + sal_Bool bModified; public: - ScPaintLockData(USHORT nNewMode); + ScPaintLockData(sal_uInt16 nNewMode); ~ScPaintLockData(); - void AddRange( const ScRange& rRange, USHORT nP ); + void AddRange( const ScRange& rRange, sal_uInt16 nP ); - void SetModified() { bModified = TRUE; } + void SetModified() { bModified = sal_True; } void IncLevel(sal_Bool bDoc) { if (bDoc) ++nDocLevel; else ++nLevel; } void DecLevel(sal_Bool bDoc) { if (bDoc) --nDocLevel; else --nLevel; } const ScRangeListRef& GetRangeList() const { return xRangeList; } - USHORT GetParts() const { return nParts; } - USHORT GetLevel(sal_Bool bDoc) const + sal_uInt16 GetParts() const { return nParts; } + sal_uInt16 GetLevel(sal_Bool bDoc) const { return bDoc ? nDocLevel : nLevel; } - BOOL GetModified() const { return bModified; } + sal_Bool GetModified() const { return bModified; } // fuer Wiederherstellen nach Reset - void SetLevel(USHORT nNew, sal_Bool bDoc) + void SetLevel(sal_uInt16 nNew, sal_Bool bDoc) { if (bDoc) nDocLevel = nNew; else nLevel = nNew; } }; diff --git a/sc/source/ui/inc/popmenu.hxx b/sc/source/ui/inc/popmenu.hxx index 8ac0fba4e80d..bc1f6c094d84 100644 --- a/sc/source/ui/inc/popmenu.hxx +++ b/sc/source/ui/inc/popmenu.hxx @@ -36,15 +36,15 @@ class SC_DLLPUBLIC ScPopupMenu : public PopupMenu { private: - USHORT nSel; - BOOL bHit; + sal_uInt16 nSel; + sal_Bool bHit; protected: virtual void Select(); public: - ScPopupMenu() : nSel(0),bHit(FALSE) {} - ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(FALSE) {} - USHORT GetSelected() const { return nSel; } - BOOL WasHit() const { return bHit; } + ScPopupMenu() : nSel(0),bHit(sal_False) {} + ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(sal_False) {} + sal_uInt16 GetSelected() const { return nSel; } + sal_Bool WasHit() const { return bHit; } }; diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx index 87d15dcdaf86..e5f901720b36 100644 --- a/sc/source/ui/inc/preview.hxx +++ b/sc/source/ui/inc/preview.hxx @@ -40,11 +40,11 @@ class ScPreview : public Window private: // eingestellt: long nPageNo; // Seite im Dokument - USHORT nZoom; // eingestellter Zoom + sal_uInt16 nZoom; // eingestellter Zoom Point aOffset; // positiv // berechnet: - BOOL bValid; // folgende Werte gueltig + sal_Bool bValid; // folgende Werte gueltig SCTAB nTabCount; SCTAB nTabsTested; // fuer wieviele Tabellen ist nPages gueltig? long nPages[MAXTABCOUNT]; @@ -57,33 +57,33 @@ private: Time aTime; long nTotalPages; Size aPageSize; // fuer GetOptimalZoom - BOOL bStateValid; - BOOL bLocationValid; + sal_Bool bStateValid; + sal_Bool bLocationValid; ScPrintState aState; ScPreviewLocationData* pLocationData; // stores table layout for accessibility API FmFormView* pDrawView; // intern: - BOOL bInPaint; - BOOL bInGetState; + sal_Bool bInPaint; + sal_Bool bInGetState; ScDocShell* pDocShell; ScPreviewShell* pViewShell; - BOOL bLeftRulerMove; - BOOL bRightRulerMove; - BOOL bTopRulerMove; - BOOL bBottomRulerMove; - BOOL bHeaderRulerMove; - BOOL bFooterRulerMove; - - BOOL bLeftRulerChange; - BOOL bRightRulerChange; - BOOL bTopRulerChange; - BOOL bBottomRulerChange; - BOOL bHeaderRulerChange; - BOOL bFooterRulerChange; - BOOL bPageMargin; - BOOL bColRulerMove; + sal_Bool bLeftRulerMove; + sal_Bool bRightRulerMove; + sal_Bool bTopRulerMove; + sal_Bool bBottomRulerMove; + sal_Bool bHeaderRulerMove; + sal_Bool bFooterRulerMove; + + sal_Bool bLeftRulerChange; + sal_Bool bRightRulerChange; + sal_Bool bTopRulerChange; + sal_Bool bBottomRulerChange; + sal_Bool bHeaderRulerChange; + sal_Bool bFooterRulerChange; + sal_Bool bPageMargin; + sal_Bool bColRulerMove; ScRange aPageArea; long nRight[ MAXCOL+1 ]; long nLeftPosition; @@ -101,7 +101,7 @@ private: void UpdateDrawView(); void DoPrint( ScPreviewLocationData* pFillLocation ); - void InvalidateLocationData( ULONG nId ); + void InvalidateLocationData( sal_uLong nId ); using Window::SetZoom; @@ -124,18 +124,18 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ); - void DataChanged(BOOL bNewTime = FALSE); // statt Invalidate rufen + void DataChanged(sal_Bool bNewTime = sal_False); // statt Invalidate rufen void DoInvalidate(); void SetXOffset( long nX ); void SetYOffset( long nY ); - void SetZoom(USHORT nNewZoom); + void SetZoom(sal_uInt16 nNewZoom); void SetPageNo( long nPage ); - BOOL GetPageMargins()const { return bPageMargin; } - void SetPageMargins( BOOL bVal ) { bPageMargin = bVal; } - void DrawInvert( long nDragPos, USHORT nFlags ); - void DragMove( long nDragMovePos, USHORT nFlags ); + sal_Bool GetPageMargins()const { return bPageMargin; } + void SetPageMargins( sal_Bool bVal ) { bPageMargin = bVal; } + void DrawInvert( long nDragPos, sal_uInt16 nFlags ); + void DragMove( long nDragMovePos, sal_uInt16 nFlags ); const ScPreviewLocationData& GetLocationData(); @@ -143,19 +143,19 @@ public: String GetPosString(); long GetPageNo() const { return nPageNo; } - USHORT GetZoom() const { return nZoom; } + sal_uInt16 GetZoom() const { return nZoom; } Point GetOffset() const { return aOffset; } SCTAB GetTab() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTab; } long GetTotalPages() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTotalPages; } - BOOL AllTested() const { return bValid && nTabsTested >= nTabCount; } + sal_Bool AllTested() const { return bValid && nTabsTested >= nTabCount; } - USHORT GetOptimalZoom(BOOL bWidthOnly); + sal_uInt16 GetOptimalZoom(sal_Bool bWidthOnly); long GetFirstPage(SCTAB nTab); void CalcAll() { CalcPages(MAXTAB); } - void SetInGetState(BOOL bSet) { bInGetState = bSet; } + void SetInGetState(sal_Bool bSet) { bInGetState = bSet; } DECL_STATIC_LINK( ScPreview, InvalidateHdl, void* ); static void StaticInvalidate(); diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx index 15b477abad3c..d32ea007e737 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -50,12 +50,12 @@ class ScDocument; struct ScPreviewColRowInfo { - BOOL bIsHeader; + sal_Bool bIsHeader; SCCOLROW nDocIndex; long nPixelStart; long nPixelEnd; - void Set( BOOL bHeader, SCCOLROW nIndex, long nStart, long nEnd ) + void Set( sal_Bool bHeader, SCCOLROW nIndex, long nStart, long nEnd ) { bIsHeader = bHeader; nDocIndex = nIndex; @@ -97,7 +97,7 @@ class ScPreviewLocationData MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES]; Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES]; sal_uInt8 aDrawRangeId[SC_PREVIEW_MAXRANGES]; - USHORT nDrawRanges; + sal_uInt16 nDrawRanges; SCTAB nPrintTab; List aEntries; @@ -111,11 +111,11 @@ public: void SetCellMapMode( const MapMode& rMapMode ); void SetPrintTab( SCTAB nNew ); void Clear(); - void AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow, + void AddCellRange( const Rectangle& rRect, const ScRange& rRange, sal_Bool bRepCol, sal_Bool bRepRow, const MapMode& rDrawMap ); - void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol ); - void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow ); - void AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft ); + void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, sal_Bool bRepCol ); + void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, sal_Bool bRepRow ); + void AddHeaderFooter( const Rectangle& rRect, sal_Bool bHeader, sal_Bool bLeft ); void AddNoteMark( const Rectangle& rRect, const ScAddress& rPos ); void AddNoteText( const Rectangle& rRect, const ScAddress& rPos ); @@ -124,24 +124,24 @@ public: // Get info on visible columns/rows in the visible area void GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const; - USHORT GetDrawRanges() const { return nDrawRanges; } - void GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const; + sal_uInt16 GetDrawRanges() const { return nDrawRanges; } + void GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const; - BOOL GetHeaderPosition( Rectangle& rHeaderRect ) const; - BOOL GetFooterPosition( Rectangle& rFooterRect ) const; - BOOL IsHeaderLeft() const; - BOOL IsFooterLeft() const; + sal_Bool GetHeaderPosition( Rectangle& rHeaderRect ) const; + sal_Bool GetFooterPosition( Rectangle& rFooterRect ) const; + sal_Bool IsHeaderLeft() const; + sal_Bool IsFooterLeft() const; - long GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const; - BOOL GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks, + long GetNoteCountInRange( const Rectangle& rVisiblePixel, sal_Bool bNoteMarks ) const; + sal_Bool GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, sal_Bool bNoteMarks, ScAddress& rCellPos, Rectangle& rNoteRect ) const; - Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks, + Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, sal_Bool bNoteMarks, const ScAddress& aCellPos) const; // Check if any cells (including column/row headers) are in the visible area - BOOL HasCellsInRange( const Rectangle& rVisiblePixel ) const; + sal_Bool HasCellsInRange( const Rectangle& rVisiblePixel ) const; - BOOL GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const; + sal_Bool GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const; // returns the rectangle where the EditEngine draws the text of a Header Cell // if bColHeader is true it returns the rectangle of the header of the column in rCellPos @@ -150,8 +150,8 @@ public: Rectangle GetCellOutputRect(const ScAddress& rCellPos) const; // Query the range and rectangle of the main (non-repeat) cell range. - // Returns FALSE if not contained. - BOOL GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const; + // Returns sal_False if not contained. + sal_Bool GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const; }; #endif diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index 7ff97f8d0152..e77b7c6bc9fe 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -57,7 +57,7 @@ class ScPreviewShell: public SfxViewShell Window* pCorner; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData - BYTE nSourceDesignMode; // form design mode from TabView + sal_uInt8 nSourceDesignMode; // form design mode from TabView SvxZoomType eZoom; long nMaxVertPos; @@ -66,11 +66,11 @@ class ScPreviewShell: public SfxViewShell private: void Construct( Window* pParent ); DECL_LINK(ScrollHandler, ScrollBar* ); - void DoScroll( USHORT nMode ); + void DoScroll( sal_uInt16 nMode ); protected: - virtual void Activate(BOOL bMDI); - virtual void Deactivate(BOOL bMDI); + virtual void Activate(sal_Bool bMDI); + virtual void Deactivate(sal_Bool bMDI); virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize ); @@ -81,8 +81,8 @@ protected: virtual String GetDescription() const; - virtual void WriteUserData(String &, BOOL bBrowse = FALSE); - virtual void ReadUserData(const String &, BOOL bBrowse = FALSE); + virtual void WriteUserData(String &, sal_Bool bBrowse = sal_False); + virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_False); virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); @@ -101,7 +101,7 @@ public: void InitStartTable(SCTAB nTab); void UpdateScrollBars(); - BOOL ScrollCommand( const CommandEvent& rCEvt ); + sal_Bool ScrollCommand( const CommandEvent& rCEvt ); void Execute( SfxRequest& rReq ); void GetState( SfxItemSet& rSet ); @@ -110,22 +110,22 @@ public: ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > GetSourceData() const { return aSourceData; } - BYTE GetSourceDesignMode() const { return nSourceDesignMode; } + sal_uInt8 GetSourceDesignMode() const { return nSourceDesignMode; } virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - virtual USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); + virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False ); + virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); virtual PrintDialog* CreatePrintDialog( Window* pParent ); virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); virtual void PreparePrint( PrintDialog* pPrintDialog = NULL ); - virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI ); - virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL ); + virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI ); + virtual sal_uInt16 Print( SfxProgress& rProgress, sal_Bool bIsAPI, PrintDialog* pPrintDialog = NULL ); void AddAccessibilityObject( SfxListener& rObject ); void RemoveAccessibilityObject( SfxListener& rObject ); void BroadcastAccessibility( const SfxHint &rHint ); - BOOL HasAccessibilityObjects(); + sal_Bool HasAccessibilityObjects(); const ScPreviewLocationData& GetLocationData(); ScDocument* GetDocument(); diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx index e3966bdc3d37..601496c315eb 100644 --- a/sc/source/ui/inc/printfun.hxx +++ b/sc/source/ui/inc/printfun.hxx @@ -64,14 +64,14 @@ class FmFormView; // Einstellungen fuer Kopf-/Fusszeilen struct ScPrintHFParam { - BOOL bEnable; - BOOL bDynamic; - BOOL bShared; + sal_Bool bEnable; + sal_Bool bDynamic; + sal_Bool bShared; long nHeight; // insgesamt (Hoehe+Abstand+Rahmen) long nManHeight; // eingestellte Groesse (Min. bei dynamisch) - USHORT nDistance; - USHORT nLeft; // Raender - USHORT nRight; + sal_uInt16 nDistance; + sal_uInt16 nLeft; // Raender + sal_uInt16 nRight; const ScPageHFItem* pLeft; const ScPageHFItem* pRight; const SvxBoxItem* pBorder; @@ -91,7 +91,7 @@ public: MapMode aUserMapMode; Paper ePaper; Orientation eOrientation; - USHORT nPaperBin; + sal_uInt16 nPaperBin; }; struct ScPrintState // Variablen aus ScPrintFunc retten @@ -101,7 +101,7 @@ struct ScPrintState // Variablen aus ScPrintFunc retten SCROW nStartRow; SCCOL nEndCol; SCROW nEndRow; - USHORT nZoom; + sal_uInt16 nZoom; size_t nPagesX; size_t nPagesY; long nTabPages; @@ -116,7 +116,7 @@ private: SCROW nStartRow; SCROW nEndRow; size_t nPagesX; - BOOL* pHidden; + sal_Bool* pHidden; //! Anzahl wirklich sichtbarer cachen??? public: @@ -134,7 +134,7 @@ public: void SetPagesX(size_t nNew); void SetHidden(size_t nX); - BOOL IsHidden(size_t nX) const; + sal_Bool IsHidden(size_t nX) const; size_t CountVisible() const; }; @@ -152,10 +152,10 @@ private: Point aSrcOffset; // Papier-1/100 mm Point aOffset; // mit Faktor aus Seitenformat skaliert - USHORT nManualZoom; // Zoom in Preview (Prozent) - BOOL bClearWin; // Ausgabe vorher loeschen - BOOL bUseStyleColor; - BOOL bIsRender; + sal_uInt16 nManualZoom; // Zoom in Preview (Prozent) + sal_Bool bClearWin; // Ausgabe vorher loeschen + sal_Bool bUseStyleColor; + sal_Bool bIsRender; SCTAB nPrintTab; long nPageStart; // Offset fuer erste Seite @@ -164,19 +164,19 @@ private: const ScRange* pUserArea; // Selektion, wenn im Dialog eingestellt const SfxItemSet* pParamSet; // eingestellte Vorlage - BOOL bState; // aus State-struct erzeugt + sal_Bool bState; // aus State-struct erzeugt // Parameter aus Vorlage: - USHORT nLeftMargin; - USHORT nTopMargin; - USHORT nRightMargin; - USHORT nBottomMargin; - BOOL bCenterHor; - BOOL bCenterVer; - BOOL bLandscape; - BOOL bSourceRangeValid; - - USHORT nPageUsage; + sal_uInt16 nLeftMargin; + sal_uInt16 nTopMargin; + sal_uInt16 nRightMargin; + sal_uInt16 nBottomMargin; + sal_Bool bCenterHor; + sal_Bool bCenterVer; + sal_Bool bLandscape; + sal_Bool bSourceRangeValid; + + sal_uInt16 nPageUsage; Size aPageSize; // Drucker-Twips const SvxBoxItem* pBorderItem; const SvxBrushItem* pBackgroundItem; @@ -189,9 +189,9 @@ private: ScPageAreaParam aAreaParam; // berechnete Werte: - USHORT nZoom; - BOOL bPrintCurrentTable; - BOOL bMultiArea; + sal_uInt16 nZoom; + sal_Bool bPrintCurrentTable; + sal_Bool bMultiArea; long nTabPages; long nTotalPages; @@ -258,27 +258,27 @@ public: ~ScPrintFunc(); static void DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double nPrintFactor, - const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile ); + const Rectangle& rBound, ScViewData* pViewData, sal_Bool bMetaFile ); void SetDrawView( FmFormView* pNew ); void SetOffset( const Point& rOfs ); - void SetManualZoom( USHORT nNewZoom ); + void SetManualZoom( sal_uInt16 nNewZoom ); void SetDateTime( const Date& rDate, const Time& rTime ); - void SetClearFlag( BOOL bFlag ); - void SetUseStyleColor( BOOL bFlag ); - void SetRenderFlag( BOOL bFlag ); + void SetClearFlag( sal_Bool bFlag ); + void SetUseStyleColor( sal_Bool bFlag ); + void SetRenderFlag( sal_Bool bFlag ); void SetExclusivelyDrawOleAndDrawObjects();//for printing selected objects without surrounding cell contents - BOOL UpdatePages(); + sal_Bool UpdatePages(); void ApplyPrintSettings(); // aus DoPrint() schon gerufen long DoPrint( const MultiSelection& rPageRanges, - /*long nStartPage, long nDisplayStart, BOOL bDoPrint, + /*long nStartPage, long nDisplayStart, sal_Bool bDoPrint, SfxProgress* pProgress, ScPreviewLocationData* pLocationData );*/ - long nStartPage, long nDisplayStart, BOOL bDoPrint = TRUE, + long nStartPage, long nDisplayStart, sal_Bool bDoPrint = sal_True, SfxProgress* pProgress = NULL, ScPreviewLocationData* pLocationData = NULL); // Werte abfragen - sofort @@ -293,32 +293,32 @@ public: double GetScaleX() const { return nScaleX; } double GetScaleY() const { return nScaleY; } long GetTotalPages() const { return nTotalPages; } - USHORT GetZoom() const { return nZoom; } + sal_uInt16 GetZoom() const { return nZoom; } void ResetBreaks( SCTAB nTab ); void GetPrintState( ScPrintState& rState ); - BOOL GetLastSourceRange( ScRange& rRange ) const; - USHORT GetLeftMargin() const{return nLeftMargin;} - USHORT GetRightMargin() const{return nRightMargin;} - USHORT GetTopMargin() const{return nTopMargin;} - USHORT GetBottomMargin() const{return nBottomMargin;} - void SetLeftMargin(USHORT nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; } - void SetRightMargin(USHORT nRulerRightDistance){ nRightMargin = nRulerRightDistance; } - void SetTopMargin(USHORT nRulerTopDistance){ nTopMargin = nRulerTopDistance; } - void SetBottomMargin(USHORT nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; } + sal_Bool GetLastSourceRange( ScRange& rRange ) const; + sal_uInt16 GetLeftMargin() const{return nLeftMargin;} + sal_uInt16 GetRightMargin() const{return nRightMargin;} + sal_uInt16 GetTopMargin() const{return nTopMargin;} + sal_uInt16 GetBottomMargin() const{return nBottomMargin;} + void SetLeftMargin(sal_uInt16 nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; } + void SetRightMargin(sal_uInt16 nRulerRightDistance){ nRightMargin = nRulerRightDistance; } + void SetTopMargin(sal_uInt16 nRulerTopDistance){ nTopMargin = nRulerTopDistance; } + void SetBottomMargin(sal_uInt16 nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; } ScPrintHFParam GetHeader(){return aHdr;} ScPrintHFParam GetFooter(){return aFtr;} private: void Construct( const ScPrintOptions* pOptions ); void InitParam( const ScPrintOptions* pOptions ); - void CalcZoom( USHORT nRangeNo ); + void CalcZoom( sal_uInt16 nRangeNo ); void CalcPages(); long CountPages(); long CountNotePages(); - BOOL AdjustPrintArea( BOOL bNew ); + sal_Bool AdjustPrintArea( sal_Bool bNew ); Size GetDocPageSize(); @@ -328,31 +328,31 @@ private: void InitModes(); - BOOL IsLeft( long nPageNo ); - BOOL IsMirror( long nPageNo ); + sal_Bool IsLeft( long nPageNo ); + sal_Bool IsMirror( long nPageNo ); void ReplaceFields( long nPageNo ); // aendert Text in pEditEngine void MakeTableString(); // setzt aTableStr void PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL bDoPrint, ScPreviewLocationData* pLocationData ); + sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ); void PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, long nScrX, long nScrY, - BOOL bShLeft, BOOL bShTop, BOOL bShRight, BOOL bShBottom ); + sal_Bool bShLeft, sal_Bool bShTop, sal_Bool bShRight, sal_Bool bShBottom ); void LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - long nScrX, long nScrY, BOOL bRepCol, BOOL bRepRow, + long nScrX, long nScrY, sal_Bool bRepCol, sal_Bool bRepRow, ScPreviewLocationData& rLocationData ); void PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY ); void PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY ); void LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY, - BOOL bRepCol, ScPreviewLocationData& rLocationData ); + sal_Bool bRepCol, ScPreviewLocationData& rLocationData ); void LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY, - BOOL bRepRow, ScPreviewLocationData& rLocationData ); - void PrintHF( long nPageNo, BOOL bHeader, long nStartY, - BOOL bDoPrint, ScPreviewLocationData* pLocationData ); + sal_Bool bRepRow, ScPreviewLocationData& rLocationData ); + void PrintHF( long nPageNo, sal_Bool bHeader, long nStartY, + sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ); - long PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData ); - long DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData ); + long PrintNotes( long nPageNo, long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ); + long DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ); void DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, const SvxBoxItem* pBorderData, diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx index 6194a4342849..375f176222b3 100644 --- a/sc/source/ui/inc/privsplt.hxx +++ b/sc/source/ui/inc/privsplt.hxx @@ -37,7 +37,7 @@ class ScPrivatSplit : public Control private: Link aCtrModifiedLink; - BOOL aMovingFlag; + sal_Bool aMovingFlag; Pointer aWinPointer; SC_SPLIT_DIRECTION eScSplit; short nOldX; @@ -52,7 +52,7 @@ class ScPrivatSplit : public Control short nDeltaY; using Control::ImplInitSettings; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index ef245ebf26cf..cd691211dbfb 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -67,8 +67,8 @@ class ScDPFunctionListBox : public MultiListBox public: explicit ScDPFunctionListBox( Window* pParent, const ResId& rResId ); - void SetSelection( USHORT nFuncMask ); - USHORT GetSelection() const; + void SetSelection( sal_uInt16 nFuncMask ); + sal_uInt16 GetSelection() const; private: void FillFunctionNames(); @@ -82,7 +82,7 @@ public: explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVec& rLabelVec, const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData ); - USHORT GetFuncMask() const; + sal_uInt16 GetFuncMask() const; ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const; private: @@ -123,7 +123,7 @@ public: const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData, const ScDPNameVec& rDataFields, bool bEnableLayout ); - USHORT GetFuncMask() const; + sal_uInt16 GetFuncMask() const; void FillLabelData( ScDPLabelData& rLabelData ) const; @@ -212,7 +212,7 @@ private: class ScDPShowDetailDlg : public ModalDialog { public: - explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient ); + explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ); virtual short Execute(); diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx index e16c3266510e..45eef2f364fb 100644 --- a/sc/source/ui/inc/pvlaydlg.hxx +++ b/sc/source/ui/inc/pvlaydlg.hxx @@ -91,19 +91,19 @@ public: virtual ~ScDPLayoutDlg(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const { return bRefInputMode; } + virtual sal_Bool IsRefInputMode() const { return bRefInputMode; } virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void StateChanged( StateChangedType nStateChange ); void NotifyDoubleClick ( ScDPFieldType eType, size_t nFieldIndex ); PointerStyle NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex ); void NotifyMouseButtonUp ( const Point& rAt ); PointerStyle NotifyMouseMove ( const Point& rAt ); - void NotifyFieldFocus ( ScDPFieldType eType, BOOL bGotFocus ); + void NotifyFieldFocus ( ScDPFieldType eType, sal_Bool bGotFocus ); void NotifyMoveField ( ScDPFieldType eToType ); void NotifyRemoveField ( ScDPFieldType eType, size_t nFieldIndex ); - BOOL NotifyMoveSlider ( USHORT nKeyCode ); // return TRUE, if position changed + sal_Bool NotifyMoveSlider ( sal_uInt16 nKeyCode ); // return sal_True, if position changed protected: virtual void Deactivate(); @@ -159,7 +159,7 @@ private: ScDPFieldType eDnDFromType; size_t nDnDFromIndex; - BOOL bIsDrag; + sal_Bool bIsDrag; ::formula::RefEdit* pEditActive; @@ -185,7 +185,7 @@ private: ScPivotParam thePivotData; ScViewData* pViewData; ScDocument* pDoc; - BOOL bRefInputMode; + sal_Bool bRefInputMode; private: ScDPFieldWindow& GetFieldWindow ( ScDPFieldType eType ); @@ -199,8 +199,8 @@ private: ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL ); String GetLabelString ( SCsCOL nCol ); bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType ); - String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE ); - BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt ); + String GetFuncString ( sal_uInt16& rFuncMask, sal_Bool bIsValue = sal_True ); + sal_Bool Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt ); void Remove ( ScDPFuncDataVec* pArr, size_t nAt ); void Insert ( ScDPFuncDataVec* pArr, const ScDPFuncData& rFData, size_t nAt ); @@ -210,14 +210,14 @@ private: ScDPFieldType eToType, const Point& rAtPos ); void RemoveField ( ScDPFieldType eRemType, size_t nRemIndex ); - BOOL GetPivotArrays ( PivotField* pPageArr, + sal_Bool GetPivotArrays ( PivotField* pPageArr, PivotField* pColArr, PivotField* pRowArr, PivotField* pDataArr, - USHORT& rPageCount, - USHORT& rColCount, - USHORT& rRowCount, - USHORT& rDataCount ); + sal_uInt16& rPageCount, + sal_uInt16& rColCount, + sal_uInt16& rRowCount, + sal_uInt16& rDataCount ); void UpdateSrcRange(); diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx index e7e064359349..a891fde67bec 100644 --- a/sc/source/ui/inc/redcom.hxx +++ b/sc/source/ui/inc/redcom.hxx @@ -60,7 +60,7 @@ protected: public: ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet, - ScDocShell *,ScChangeAction *,BOOL bPrevNext = FALSE); + ScDocShell *,ScChangeAction *,sal_Bool bPrevNext = sal_False); ~ScRedComDialog(); short Execute(); diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx index 617d7c0a669a..1798c7287922 100644 --- a/sc/source/ui/inc/reffact.hxx +++ b/sc/source/ui/inc/reffact.hxx @@ -36,7 +36,7 @@ class Class : public SfxChildWindow \ { \ public: \ - Class( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); \ + Class( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); \ SFX_DECL_CHILDWINDOW(Class); \ }; @@ -68,7 +68,7 @@ class ScAcceptChgDlgWrapper: public SfxChildWindow { public: ScAcceptChgDlgWrapper( Window*, - USHORT, + sal_uInt16, SfxBindings*, SfxChildWinInfo* ); @@ -81,20 +81,20 @@ class ScSimpleRefDlgWrapper: public SfxChildWindow { public: ScSimpleRefDlgWrapper( Window*, - USHORT, + sal_uInt16, SfxBindings*, SfxChildWinInfo* ); SFX_DECL_CHILDWINDOW(Class); - static void SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet=TRUE); + static void SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet=sal_True); virtual String GetRefString(); virtual void SetRefString(const String& rStr); void SetCloseHdl( const Link& rLink ); void SetUnoLinks( const Link& rDone, const Link& rAbort, const Link& rChange ); - void SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection ); - static void SetAutoReOpen(BOOL bFlag); + void SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ); + static void SetAutoReOpen(sal_Bool bFlag); void StartRefInput(); }; @@ -106,13 +106,13 @@ class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow bool m_bFreeWindowLock:1; Window * m_pSavedWndParent; public: - ScValidityRefChildWin( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); + ScValidityRefChildWin( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); SFX_DECL_CHILDWINDOW(ScValidityRefChildWin); ~ScValidityRefChildWin(); bool LockVisible( bool bLock ){ bool bVis = m_bVisibleLock; m_bVisibleLock = bLock; return bVis; } bool LockFreeWindow( bool bLock ){ bool bFreeWindow = m_bFreeWindowLock; m_bFreeWindowLock = bLock; return bFreeWindow; } void Hide(){ if( !m_bVisibleLock) SfxChildWindow::Hide(); } - void Show( USHORT nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); } + void Show( sal_uInt16 nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); } }; //-->Added by PengYunQuan for Validity Cell Range Picker diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx index 87b5330e0f96..5c80ab2d557e 100644 --- a/sc/source/ui/inc/refundo.hxx +++ b/sc/source/ui/inc/refundo.hxx @@ -60,7 +60,7 @@ public: ~ScRefUndoData(); void DeleteUnchanged( const ScDocument* pDoc ); - void DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst ); + void DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst ); }; diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx index 225fd01451df..42699c5edae8 100644 --- a/sc/source/ui/inc/rfindlst.hxx +++ b/sc/source/ui/inc/rfindlst.hxx @@ -37,11 +37,11 @@ struct ScRangeFindData { ScRange aRef; - USHORT nFlags; + sal_uInt16 nFlags; xub_StrLen nSelStart; xub_StrLen nSelEnd; - ScRangeFindData( const ScRange& rR, USHORT nF, xub_StrLen nS, xub_StrLen nE ) : + ScRangeFindData( const ScRange& rR, sal_uInt16 nF, xub_StrLen nS, xub_StrLen nE ) : aRef(rR), nFlags(nF), nSelStart(nS), nSelEnd(nE) {} }; @@ -49,23 +49,23 @@ class ScRangeFindList { List aEntries; String aDocName; - BOOL bHidden; + sal_Bool bHidden; public: ScRangeFindList(const String& rName); ~ScRangeFindList(); - ULONG Count() const { return aEntries.Count(); } + sal_uLong Count() const { return aEntries.Count(); } void Insert( ScRangeFindData* pNew ) { aEntries.Insert(pNew, LIST_APPEND); } - ScRangeFindData* GetObject( ULONG nIndex ) const + ScRangeFindData* GetObject( sal_uLong nIndex ) const { return (ScRangeFindData*)aEntries.GetObject(nIndex); } - void SetHidden( BOOL bSet ) { bHidden = bSet; } + void SetHidden( sal_Bool bSet ) { bHidden = bSet; } const String& GetDocName() const { return aDocName; } - BOOL IsHidden() const { return bHidden; } + sal_Bool IsHidden() const { return bHidden; } - static ColorData GetColorName( USHORT nIndex ); + static ColorData GetColorName( sal_uInt16 nIndex ); }; diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx index 5be21d87a6f2..2a673d6d9c77 100644 --- a/sc/source/ui/inc/scendlg.hxx +++ b/sc/source/ui/inc/scendlg.hxx @@ -41,14 +41,14 @@ class ScNewScenarioDlg : public ModalDialog { public: - ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE ); + ScNewScenarioDlg( Window* pParent, const String& rName, sal_Bool bEdit = sal_False, sal_Bool bSheetProtected = sal_False ); ~ScNewScenarioDlg(); void SetScenarioData( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ); + const Color& rColor, sal_uInt16 nFlags ); void GetScenarioData( String& rName, String& rComment, - Color& rColor, USHORT& rFlags ) const; + Color& rColor, sal_uInt16& rFlags ) const; private: FixedLine aFlName; @@ -68,7 +68,7 @@ private: CancelButton aBtnCancel; HelpButton aBtnHelp; const String aDefScenarioName; - BOOL bIsEdit; + sal_Bool bIsEdit; DECL_LINK( OkHdl, OKButton * ); DECL_LINK( EnableHdl, CheckBox * ); diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index 3e1a7db38fb2..07b37dd6a61d 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -39,9 +39,9 @@ class ScImportAsciiDlg : public ModalDialog { SvStream* mpDatStream; - ULONG mnStreamPos; - ULONG* mpRowPosArray; - ULONG mnRowPosCount; + sal_uLong mnStreamPos; + sal_uLong* mpRowPosArray; + sal_uLong mnRowPosCount; String maPreviewLine[ CSV_PREVIEW_LINES ]; @@ -116,9 +116,9 @@ private: void SetupSeparatorCtrls(); - bool GetLine( ULONG nLine, String &rText ); + bool GetLine( sal_uLong nLine, String &rText ); void UpdateVertical(); - inline bool Seek( ULONG nPos ); // synced to and from mnStreamPos + inline bool Seek( sal_uLong nPos ); // synced to and from mnStreamPos DECL_LINK( CharSetHdl, SvxTextEncodingBox* ); DECL_LINK( FirstRowHdl, NumericField* ); @@ -130,7 +130,7 @@ private: }; -inline bool ScImportAsciiDlg::Seek(ULONG nPos) +inline bool ScImportAsciiDlg::Seek(sal_uLong nPos) { bool bSuccess = true; if (nPos != mnStreamPos && mpDatStream) diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx index 84a408267b20..455ad68ecfb1 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -37,7 +37,7 @@ public: ScDocument* pDoc ); ~ScAutoFormatDlg(); - USHORT GetIndex() const { return nIndex; } + sal_uInt16 GetIndex() const { return nIndex; } String GetCurrFormatName(); private: @@ -68,9 +68,9 @@ private: //------------------------ ScAutoFormat* pFormat; const ScAutoFormatData* pSelFmtData; - USHORT nIndex; - BOOL bCoreDataChanged; - BOOL bFmtInserted; + sal_uInt16 nIndex; + sal_Bool bCoreDataChanged; + sal_Bool bFmtInserted; void Init (); void UpdateChecks (); diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index 957d174a3deb..5b92f31baa51 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -39,12 +39,12 @@ class ScImportOptionsDlg : public ModalDialog { public: ScImportOptionsDlg( Window* pParent, - BOOL bAscii = TRUE, + sal_Bool bAscii = sal_True, const ScImportOptions* pOptions = NULL, const String* pStrTitle = NULL, - BOOL bMultiByte = FALSE, - BOOL bOnlyDbtoolsEncodings = FALSE, - BOOL bImport = TRUE ); + sal_Bool bMultiByte = sal_False, + sal_Bool bOnlyDbtoolsEncodings = sal_False, + sal_Bool bImport = sal_True ); ~ScImportOptionsDlg(); @@ -68,7 +68,7 @@ private: ScDelimiterTable* pTextSepTab; private: - USHORT GetCodeFromCombo( const ComboBox& rEd ) const; + sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const; DECL_LINK( FixedWidthHdl, CheckBox* ); DECL_LINK( DoubleClickHdl, ListBox* ); diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx index 99bd6c2a805a..84fb33e7a6ef 100644 --- a/sc/source/ui/inc/scuitphfedit.hxx +++ b/sc/source/ui/inc/scuitphfedit.hxx @@ -59,7 +59,7 @@ class ScAccessibleEditObject; class ScHFEditPage : public SfxTabPage { public: - virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); virtual void Reset ( const SfxItemSet& rCoreSet ); void SetNumType(SvxNumType eNumType); @@ -67,9 +67,9 @@ public: protected: ScHFEditPage( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const SfxItemSet& rCoreSet, - USHORT nWhich, bool bHeader ); + sal_uInt16 nWhich, bool bHeader ); virtual ~ScHFEditPage(); private: @@ -93,7 +93,7 @@ private: FixedInfo aFtInfo; ScPopupMenu aPopUpFile; - USHORT nWhich; + sal_uInt16 nWhich; String aCmdArr[6]; private: @@ -119,7 +119,7 @@ class ScRightHeaderEditPage : public ScHFEditPage { public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); private: ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -131,7 +131,7 @@ class ScLeftHeaderEditPage : public ScHFEditPage { public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); private: ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -143,7 +143,7 @@ class ScRightFooterEditPage : public ScHFEditPage { public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); private: ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -155,7 +155,7 @@ class ScLeftFooterEditPage : public ScHFEditPage { public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); private: ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet ); diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx index ad12d9c743ad..fa7718abd4bc 100644 --- a/sc/source/ui/inc/select.hxx +++ b/sc/source/ui/inc/select.hxx @@ -59,8 +59,8 @@ private: ScViewData* pViewData; ScViewSelectionEngine* pEngine; - BOOL bAnchor; - BOOL bStarted; + sal_Bool bAnchor; + sal_Bool bStarted; ScAddress aAnchorPos; ScSplitPos GetWhich(); @@ -71,17 +71,17 @@ public: void SetSelectionEngine( ScViewSelectionEngine* pSelEngine ); void SetAnchor( SCCOL nPosX, SCROW nPosY ); - void SetAnchorFlag( BOOL bSet ); + void SetAnchorFlag( sal_Bool bSet ); virtual void BeginDrag(); virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE ); - virtual BOOL IsSelectionAtPoint( const Point& rPointPixel ); + virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); + virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); - BOOL SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll ); + sal_Bool SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll ); }; @@ -92,27 +92,27 @@ class ScHeaderFunctionSet : public FunctionSet // Spalten- / Zeilenkoep { private: ScViewData* pViewData; - BOOL bColumn; // Col- / Rowbar + sal_Bool bColumn; // Col- / Rowbar ScSplitPos eWhich; - BOOL bAnchor; + sal_Bool bAnchor; SCCOLROW nCursorPos; public: ScHeaderFunctionSet( ScViewData* pNewViewData ); - void SetColumn( BOOL bSet ); + void SetColumn( sal_Bool bSet ); void SetWhich( ScSplitPos eNew ); virtual void BeginDrag(); virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE ); - virtual BOOL IsSelectionAtPoint( const Point& rPointPixel ); + virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); + virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); - void SetAnchorFlag(BOOL bSet) { bAnchor = bSet; } + void SetAnchorFlag(sal_Bool bSet) { bAnchor = bSet; } }; diff --git a/sc/source/ui/inc/seltrans.hxx b/sc/source/ui/inc/seltrans.hxx index c695c918dad0..3df2420f0ca3 100644 --- a/sc/source/ui/inc/seltrans.hxx +++ b/sc/source/ui/inc/seltrans.hxx @@ -66,7 +66,7 @@ public: virtual ~ScSelectionTransferObj(); void ForgetView(); - BOOL StillValid(); + sal_Bool StillValid(); ScTabView* GetView() const { return pView; } ScTransferObj* GetCellData(); diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx index 68e807461cad..2a3fa940037a 100644 --- a/sc/source/ui/inc/servobj.hxx +++ b/sc/source/ui/inc/servobj.hxx @@ -54,7 +54,7 @@ private: ScDocShell* pDocSh; ScRange aRange; String aItemStr; - BOOL bRefreshListener; + sal_Bool bRefreshListener; void Clear(); @@ -62,9 +62,9 @@ public: ScServerObject( ScDocShell* pShell, const String& rItem ); virtual ~ScServerObject(); - virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/, + virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData /*out param*/, const String & rMimeType, - BOOL bSynchron = FALSE ); + sal_Bool bSynchron = sal_False ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); void EndListeningAll(); diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx index 00ebb8a7c480..6da486588cee 100644 --- a/sc/source/ui/inc/shtabdlg.hxx +++ b/sc/source/ui/inc/shtabdlg.hxx @@ -62,11 +62,11 @@ public: const ::rtl::OString& nDlgHelpId, const rtl::OString& nLbHelpId ); /** Inserts a string into the ListBox. */ - void Insert( const String& rString, BOOL bSelected ); + void Insert( const String& rString, sal_Bool bSelected ); - USHORT GetSelectEntryCount() const; - String GetSelectEntry(USHORT nPos) const; - USHORT GetSelectEntryPos(USHORT nPos) const; + sal_uInt16 GetSelectEntryCount() const; + String GetSelectEntry(sal_uInt16 nPos) const; + sal_uInt16 GetSelectEntryPos(sal_uInt16 nPos) const; }; diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx index ba5b8ca287c3..dc268901d30a 100644 --- a/sc/source/ui/inc/simpref.hxx +++ b/sc/source/ui/inc/simpref.hxx @@ -71,14 +71,14 @@ private: ScViewData* pViewData; ScDocument* pDoc; - BOOL bRefInputMode; + sal_Bool bRefInputMode; ScRange theCurArea; - BOOL bCloseFlag; - BOOL bAutoReOpen; - BOOL bCloseOnButtonUp; - BOOL bSingleCell; - BOOL bMultiSelection; + sal_Bool bCloseFlag; + sal_Bool bAutoReOpen; + sal_Bool bCloseOnButtonUp; + sal_Bool bSingleCell; + sal_Bool bMultiSelection; void Init(); @@ -88,7 +88,7 @@ private: protected: - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); public: ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, @@ -97,9 +97,9 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); void StartRefInput(); @@ -111,9 +111,9 @@ public: void SetUnoLinks( const Link& rDone, const Link& rAbort, const Link& rChange ); - void SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection ); + void SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection ); - void SetAutoReOpen(BOOL bFlag) {bAutoReOpen=bFlag;} + void SetAutoReOpen(sal_Bool bFlag) {bAutoReOpen=bFlag;} }; diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx index 615755be0240..2221396c97e2 100644 --- a/sc/source/ui/inc/sizedev.hxx +++ b/sc/source/ui/inc/sizedev.hxx @@ -36,7 +36,7 @@ class ScDocShell; class ScSizeDeviceProvider { OutputDevice* pDevice; - BOOL bOwner; + sal_Bool bOwner; double nPPTX; double nPPTY; MapMode aOldMapMode; @@ -48,7 +48,7 @@ public: OutputDevice* GetDevice() const { return pDevice; } double GetPPTX() const { return nPPTX; } double GetPPTY() const { return nPPTY; } - BOOL IsPrinter() const { return !bOwner; } + sal_Bool IsPrinter() const { return !bOwner; } }; #endif diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx index fa1b9eb6341c..18923980c437 100644 --- a/sc/source/ui/inc/solvrdlg.hxx +++ b/sc/source/ui/inc/solvrdlg.hxx @@ -58,9 +58,9 @@ public: ~ScSolverDlg(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const; + virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: FixedLine aFlVariables; @@ -86,7 +86,7 @@ private: ScDocument* pDoc; const SCTAB nCurTab; formula::RefEdit* pEdActive; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; const String errMsgInvalidVar; const String errMsgInvalidForm; const String errMsgNoFormula; @@ -95,7 +95,7 @@ private: #ifdef _SOLVRDLG_CXX void Init(); - BOOL CheckTargetValue( String& rStrVal ); + sal_Bool CheckTargetValue( String& rStrVal ); void RaiseError( ScSolverErr eError ); DECL_LINK( BtnHdl, PushButton* ); diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx index e6f9ab1bf0c8..da7beb3f1b46 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -50,21 +50,21 @@ public: const SfxItemSet* pArgSet ); ~ScSortDlg(); - void SetHeaders( BOOL bHeaders ); - void SetByRows ( BOOL bByRows ); - BOOL GetHeaders() const; - BOOL GetByRows () const; + void SetHeaders( sal_Bool bHeaders ); + void SetByRows ( sal_Bool bByRows ); + sal_Bool GetHeaders() const; + sal_Bool GetByRows () const; private: - BOOL bIsHeaders; - BOOL bIsByRows; + sal_Bool bIsHeaders; + sal_Bool bIsByRows; }; -inline void ScSortDlg::SetHeaders( BOOL bHeaders ) { bIsHeaders = bHeaders; } -inline void ScSortDlg::SetByRows ( BOOL bByRows ) { bIsByRows = bByRows; } -inline BOOL ScSortDlg::GetHeaders() const { return bIsHeaders; } -inline BOOL ScSortDlg::GetByRows () const { return bIsByRows; } +inline void ScSortDlg::SetHeaders( sal_Bool bHeaders ) { bIsHeaders = bHeaders; } +inline void ScSortDlg::SetByRows ( sal_Bool bByRows ) { bIsByRows = bByRows; } +inline sal_Bool ScSortDlg::GetHeaders() const { return bIsHeaders; } +inline sal_Bool ScSortDlg::GetByRows () const { return bIsByRows; } class ScSortWarningDlg : public ModalDialog { diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx index eef0d170c2c8..67f7a197c4ad 100644 --- a/sc/source/ui/inc/spelldialog.hxx +++ b/sc/source/ui/inc/spelldialog.hxx @@ -51,7 +51,7 @@ class ScSpellDialogChildWindow : public ::svx::SpellDialogChildWindow public: SFX_DECL_CHILDWINDOW( ScSpellDialogChildWindow ); - explicit ScSpellDialogChildWindow( Window* pParent, USHORT nId, + explicit ScSpellDialogChildWindow( Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); virtual ~ScSpellDialogChildWindow(); diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx index f44d4a8f7094..92f97164aaef 100644 --- a/sc/source/ui/inc/spelleng.hxx +++ b/sc/source/ui/inc/spelleng.hxx @@ -120,7 +120,7 @@ public: protected: /** Callback from edit engine to check the next cell. */ - virtual BOOL SpellNextDocument(); + virtual sal_Bool SpellNextDocument(); /** Returns true, if the current text contains a spelling error. */ virtual bool NeedsConversion(); @@ -154,7 +154,7 @@ public: protected: /** Callback from edit engine to convert the next cell. */ - virtual BOOL ConvertNextDocument(); + virtual sal_Bool ConvertNextDocument(); /** Returns true, if the current text contains text to convert. */ virtual bool NeedsConversion(); diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx index 63e37becf188..93eb54dd5ddd 100644 --- a/sc/source/ui/inc/styledlg.hxx +++ b/sc/source/ui/inc/styledlg.hxx @@ -42,15 +42,15 @@ class ScStyleDlg : public SfxStyleDialog public: ScStyleDlg( Window* pParent, SfxStyleSheetBase& rStyleBase, - USHORT nRscId ); + sal_uInt16 nRscId ); ~ScStyleDlg(); protected: - virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage ); + virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ); virtual const SfxItemSet* GetRefreshedSet(); private: - USHORT nDlgRsc; + sal_uInt16 nDlgRsc; }; diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx index d77ee812fdb3..e1bb3809207e 100644 --- a/sc/source/ui/inc/tabcont.hxx +++ b/sc/source/ui/inc/tabcont.hxx @@ -45,13 +45,13 @@ class ScTabControl : public TabBar, public DropTargetHelper, public DragSourceHe { private: ScViewData* pViewData; - USHORT nMouseClickPageId; /// Last page ID after mouse button down/up - USHORT nSelPageIdByMouse; /// Selected page ID, if selected with mouse - BOOL bErrorShown; + sal_uInt16 nMouseClickPageId; /// Last page ID after mouse button down/up + sal_uInt16 nSelPageIdByMouse; /// Selected page ID, if selected with mouse + sal_Bool bErrorShown; void DoDrag( const Region& rRegion ); - USHORT GetMaxId() const; + sal_uInt16 GetMaxId() const; SCTAB GetPrivatDropPos(const Point& rPos ); protected: @@ -77,9 +77,9 @@ public: using TabBar::StartDrag; void UpdateStatus(); - void ActivateView(BOOL bActivate); + void ActivateView(sal_Bool bActivate); - void SetSheetLayoutRTL( BOOL bSheetRTL ); + void SetSheetLayoutRTL( sal_Bool bSheetRTL ); }; diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx index e9286ca5ee96..088f6c28a140 100644 --- a/sc/source/ui/inc/tabopdlg.hxx +++ b/sc/source/ui/inc/tabopdlg.hxx @@ -59,10 +59,10 @@ public: ~ScTabOpDlg(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual BOOL IsRefInputMode() const { return TRUE; } + virtual sal_Bool IsRefInputMode() const { return sal_True; } virtual void SetActive(); - virtual BOOL Close(); + virtual sal_Bool Close(); private: FixedLine aFlVariables; @@ -90,7 +90,7 @@ private: ScDocument* pDoc; const SCTAB nCurTab; formula::RefEdit* pEdActive; - BOOL bDlgLostFocus; + sal_Bool bDlgLostFocus; const String errMsgNoFormula; const String errMsgNoColRow; const String errMsgWrongFormula; diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx index 71d62f964fef..742519fc8929 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -41,8 +41,8 @@ class ScTabPageProtection : public SfxTabPage public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rAttrSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreAttrs ); virtual void Reset ( const SfxItemSet& ); protected: @@ -66,12 +66,12 @@ private: FixedInfo aTxtHint2; // aktueller Status: - BOOL bTriEnabled; // wenn vorher Dont-Care - BOOL bDontCare; // alles auf TriState - BOOL bProtect; // einzelne Einstellungen ueber TriState sichern - BOOL bHideForm; - BOOL bHideCell; - BOOL bHidePrint; + sal_Bool bTriEnabled; // wenn vorher Dont-Care + sal_Bool bDontCare; // alles auf TriState + sal_Bool bProtect; // einzelne Einstellungen ueber TriState sichern + sal_Bool bHideForm; + sal_Bool bHideCell; + sal_Bool bHidePrint; // Handler: DECL_LINK( ButtonClickHdl, TriStateBox* pBox ); diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx index a06664c7c4ee..751df38a598b 100644 --- a/sc/source/ui/inc/tabsplit.hxx +++ b/sc/source/ui/inc/tabsplit.hxx @@ -37,7 +37,7 @@ class ScTabSplitter : public Splitter { private: ScViewData* pViewData; - BOOL bFixed; + sal_Bool bFixed; protected: virtual void MouseMove( const MouseEvent& rMEvt ); @@ -51,7 +51,7 @@ public: ScViewData* pData ); ~ScTabSplitter(); - void SetFixed(BOOL bSet); + void SetFixed(sal_Bool bSet); }; diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index ab21a6161752..9c3327805a88 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -75,14 +75,14 @@ class ScCornerButton : public Window { private: ScViewData* pViewData; - BOOL bAdd; + sal_Bool bAdd; protected: virtual void Paint( const Rectangle& rRect ); virtual void Resize(); virtual void MouseButtonDown( const MouseEvent& rMEvt ); public: - ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional ); + ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional ); ~ScCornerButton(); virtual void StateChanged( StateChangedType nType ); @@ -111,7 +111,7 @@ private: Size aFrameSize; // wie bei DoResize uebergeben Point aBorderPos; - BOOL bDrawSelMode; // nur Zeichenobjekte selektieren ? + sal_Bool bDrawSelMode; // nur Zeichenobjekte selektieren ? FuPoor* pDrawActual; FuPoor* pDrawOld; @@ -139,21 +139,21 @@ private: ScDocument* pBrushDocument; // cell formats for format paint brush SfxItemSet* pDrawBrushSet; // drawing object attributes for paint brush - BOOL bLockPaintBrush; // keep for more than one use? + sal_Bool bLockPaintBrush; // keep for more than one use? Timer aScrollTimer; ScGridWindow* pTimerWindow; MouseEvent aTimerMEvt; - ULONG nTipVisible; + sal_uLong nTipVisible; - BOOL bDragging; // fuer Scrollbars + sal_Bool bDragging; // fuer Scrollbars long nPrevDragPos; - BOOL bIsBlockMode; // Block markieren - BOOL bBlockNeg; // wird Markierung aufgehoben? - BOOL bBlockCols; // werden ganze Spalten markiert? - BOOL bBlockRows; // werden ganze Zeilen markiert? + sal_Bool bIsBlockMode; // Block markieren + sal_Bool bBlockNeg; // wird Markierung aufgehoben? + sal_Bool bBlockCols; // werden ganze Spalten markiert? + sal_Bool bBlockRows; // werden ganze Zeilen markiert? SCCOL nBlockStartX; SCCOL nBlockStartXOrig; @@ -171,12 +171,12 @@ private: double mfPendingTabBarWidth; // Tab bar width relative to frame window width. - BOOL bMinimized; - BOOL bInUpdateHeader; - BOOL bInActivatePart; - BOOL bInZoomUpdate; - BOOL bMoveIsShift; - BOOL bNewStartIfMarking; + sal_Bool bMinimized; + sal_Bool bInUpdateHeader; + sal_Bool bInActivatePart; + sal_Bool bInZoomUpdate; + sal_Bool bMoveIsShift; + sal_Bool bNewStartIfMarking; void Init(); @@ -194,8 +194,8 @@ private: void UpdateVarZoom(); - static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL ); - static long GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL ); + static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL ); + static long GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL ); protected: void UpdateHeaderWidth( const ScVSplitPos* pWhich = NULL, @@ -209,11 +209,11 @@ protected: void GetBorderSize( SvBorder& rBorder, const Size& rSize ); void ResetDrawDragMode(); - BOOL IsDrawTextEdit() const; - void DrawEnableAnim(BOOL bSet); - //HMHvoid DrawShowMarkHdl(BOOL bShow); + sal_Bool IsDrawTextEdit() const; + void DrawEnableAnim(sal_Bool bSet); + //HMHvoid DrawShowMarkHdl(sal_Bool bShow); - void MakeDrawView( BYTE nForceDesignMode = SC_FORCEMODE_NONE ); + void MakeDrawView( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE ); void HideNoteMarker(); @@ -228,7 +228,7 @@ public: void HideListBox(); - BOOL HasHintWindow() const { return pInputHintWindow != NULL; } + sal_Bool HasHintWindow() const { return pInputHintWindow != NULL; } void RemoveHintWindow(); void TestHintWindow(); @@ -249,13 +249,13 @@ public: /** Returns the pending tab bar width relative to the frame window width (0.0 ... 1.0). */ double GetPendingRelTabBarWidth() const; - void DoResize( const Point& rOffset, const Size& rSize, BOOL bInner = FALSE ); - void RepeatResize( BOOL bUpdateFix = TRUE ); + void DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner = sal_False ); + void RepeatResize( sal_Bool bUpdateFix = sal_True ); void UpdateFixPos(); Point GetGridOffset() const; - BOOL IsDrawSelMode() const { return bDrawSelMode; } - void SetDrawSelMode(BOOL bNew) { bDrawSelMode = bNew; } + sal_Bool IsDrawSelMode() const { return bDrawSelMode; } + void SetDrawSelMode(sal_Bool bNew) { bDrawSelMode = bNew; } void SetDrawFuncPtr(FuPoor* pFuncPtr) { pDrawActual = pFuncPtr; } void SetDrawFuncOldPtr(FuPoor* pFuncPtr) { pDrawOld = pFuncPtr; } @@ -270,7 +270,7 @@ public: ScPageBreakData* GetPageBreakData() { return pPageBreakData; } ScHighlightRanges* GetHighlightRanges() { return pHighlightRanges; } - void UpdatePageBreakData( BOOL bForcePaint = FALSE ); + void UpdatePageBreakData( sal_Bool bForcePaint = sal_False ); void DrawMarkRect( const Rectangle& rRect ); @@ -280,18 +280,18 @@ public: ScViewFunctionSet* GetFunctionSet() { return &aFunctionSet; } ScViewSelectionEngine* GetSelEngine() { return pSelEngine; } - BOOL SelMouseButtonDown( const MouseEvent& rMEvt ); + sal_Bool SelMouseButtonDown( const MouseEvent& rMEvt ); ScDrawView* GetScDrawView() { return pDrawView; } SdrView* GetSdrView(); // gegen CLOKs - BOOL IsMinimized() const { return bMinimized; } + sal_Bool IsMinimized() const { return bMinimized; } // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet void TabChanged( bool bSameTabButMoved = false ); - void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll ); + void SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll ); SC_DLLPUBLIC void RefreshZoom(); - void SetPagebreakMode( BOOL bSet ); + void SetPagebreakMode( sal_Bool bSet ); void UpdateLayerLocks(); @@ -301,8 +301,8 @@ public: void UpdateInputLine(); void InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, - BOOL bPaint = TRUE ); - void DoneRefMode( BOOL bContinue = FALSE ); + sal_Bool bPaint = sal_True ); + void DoneRefMode( sal_Bool bContinue = sal_False ); void UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ); void StopRefMode(); @@ -323,9 +323,9 @@ public: //UNUSED2008-05 void ActiveReleaseMouse(); //UNUSED2008-05 Point ActivePixelToLogic( const Point& rDevicePoint ); - void ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl ); + void ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl ); - SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew = FALSE ); + SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew = sal_False ); SC_DLLPUBLIC void CellContentChanged(); void SelectionChanged(); @@ -353,10 +353,10 @@ public: const ScSplitPos* pWhich = NULL ); SvxZoomType GetZoomType() const; - void SetZoomType( SvxZoomType eNew, BOOL bAll ); - USHORT CalcZoom( SvxZoomType eType, USHORT nOldZoom ); + void SetZoomType( SvxZoomType eNew, sal_Bool bAll ); + sal_uInt16 CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom ); -// void CalcZoom( SvxZoomType eType, USHORT& rZoom, SCCOL& rCol, SCROW& rRow ); +// void CalcZoom( SvxZoomType eType, sal_uInt16& rZoom, SCCOL& rCol, SCROW& rRow ); sal_Bool HasPageFieldDataAtCursor() const; void StartDataSelect(); @@ -368,42 +368,42 @@ public: // MoveCursorEnd - links oben / benutzter Bereich SC_DLLPUBLIC void MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, - BOOL bShift, BOOL bControl, - BOOL bKeepOld = FALSE, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bControl, + sal_Bool bKeepOld = sal_False, sal_Bool bKeepSel = sal_False ); void MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bKeepSel = sal_False ); void MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bKeepSel = sal_False ); void MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); + sal_Bool bShift, sal_Bool bKeepSel = sal_False ); void MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel = FALSE ); - void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift ); + sal_Bool bShift, sal_Bool bKeepSel = sal_False ); + void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift ); - void MoveCursorEnter( BOOL bShift ); // Shift fuer Richtung (kein Markieren) + void MoveCursorEnter( sal_Bool bShift ); // Shift fuer Richtung (kein Markieren) - BOOL MoveCursorKeyInput( const KeyEvent& rKeyEvent ); + sal_Bool MoveCursorKeyInput( const KeyEvent& rKeyEvent ); - void FindNextUnprot( BOOL bShift, BOOL bInSelection = TRUE ); + void FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection = sal_True ); void SetNewStartIfMarking(); // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet - SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE, bool bSameTabButMoved = false ); - void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE ); + SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = sal_False, sal_Bool bExtendSelection = sal_False, bool bSameTabButMoved = false ); + void SelectNextTab( short nDir, sal_Bool bExtendSelection = sal_False ); - void ActivateView( BOOL bActivate, BOOL bFirst ); + void ActivateView( sal_Bool bActivate, sal_Bool bFirst ); void ActivatePart( ScSplitPos eWhich ); - BOOL IsInActivatePart() const { return bInActivatePart; } + sal_Bool IsInActivatePart() const { return bInActivatePart; } void SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt ); void ResetTimer(); - void ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars = TRUE ); - void ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars = TRUE ); + void ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars = sal_True ); + void ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars = sal_True ); SC_DLLPUBLIC void ScrollLines( long nDeltaX, long nDeltaY ); // aktives - BOOL ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ); + sal_Bool ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ); void ScrollToObject( SdrObject* pDrawObj ); void MakeVisible( const Rectangle& rHMMRect ); @@ -430,7 +430,7 @@ public: void PaintLeftArea( SCROW nStartRow, SCROW nEndRow ); void PaintLeft(); - BOOL PaintExtras(); + sal_Bool PaintExtras(); void RecalcPPT(); @@ -460,69 +460,69 @@ public: void InvalidateAttribs(); void MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW nRow ); - void KillEditView( BOOL bNoPaint ); + void KillEditView( sal_Bool bNoPaint ); void UpdateEditView(); // Bloecke - void SelectAll( BOOL bContinue = FALSE ); + void SelectAll( sal_Bool bContinue = sal_False ); void SelectAllTables(); void DeselectAllTables(); void MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - BOOL bCols = FALSE, BOOL bRows = FALSE, BOOL bCellSelection = FALSE ); + sal_Bool bCols = sal_False, sal_Bool bRows = sal_False, sal_Bool bCellSelection = sal_False ); void InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - BOOL bTestNeg = FALSE, - BOOL bCols = FALSE, BOOL bRows = FALSE ); + sal_Bool bTestNeg = sal_False, + sal_Bool bCols = sal_False, sal_Bool bRows = sal_False ); void InitOwnBlockMode(); - void DoneBlockMode( BOOL bContinue = FALSE ); + void DoneBlockMode( sal_Bool bContinue = sal_False ); - BOOL IsBlockMode() const { return bIsBlockMode; } + sal_Bool IsBlockMode() const { return bIsBlockMode; } void MarkColumns(); void MarkRows(); - void MarkDataArea( BOOL bIncludeCursor = TRUE ); + void MarkDataArea( sal_Bool bIncludeCursor = sal_True ); void MarkMatrixFormula(); void Unmark(); - void MarkRange( const ScRange& rRange, BOOL bSetCursor = TRUE, BOOL bContinue = FALSE ); + void MarkRange( const ScRange& rRange, sal_Bool bSetCursor = sal_True, sal_Bool bContinue = sal_False ); - BOOL IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; + sal_Bool IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const; void PaintMarks( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); - void PaintBlock( BOOL bReset = FALSE ); + void PaintBlock( sal_Bool bReset = sal_False ); void SetMarkData( const ScMarkData& rNew ); void MarkDataChanged(); - void LockModifiers( USHORT nModifiers ); - USHORT GetLockedModifiers() const; - void ViewOptionsHasChanged( BOOL bHScrollChanged, - BOOL bGraphicsChanged = FALSE); + void LockModifiers( sal_uInt16 nModifiers ); + sal_uInt16 GetLockedModifiers() const; + void ViewOptionsHasChanged( sal_Bool bHScrollChanged, + sal_Bool bGraphicsChanged = sal_False); Point GetMousePosPixel(); void SnapSplitPos( Point& rScreenPosPixel ); - void FreezeSplitters( BOOL bFreeze ); + void FreezeSplitters( sal_Bool bFreeze ); void RemoveSplit(); void SplitAtCursor(); - void SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer ); + void SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer ); void InvalidateSplit(); - void ErrorMessage( USHORT nGlobStrId ); - Window* GetParentOrChild( USHORT nChildId ); + void ErrorMessage( sal_uInt16 nGlobStrId ); + Window* GetParentOrChild( sal_uInt16 nChildId ); - void EnableRefInput(BOOL bFlag=TRUE); + void EnableRefInput(sal_Bool bFlag=sal_True); Window* GetFrameWin() const { return pFrameWin; } - BOOL HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; } + sal_Bool HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; } ScDocument* GetBrushDocument() const { return pBrushDocument; } SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet; } - BOOL IsPaintBrushLocked() const { return bLockPaintBrush; } - void SetBrushDocument( ScDocument* pNew, BOOL bLock ); - void SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock ); + sal_Bool IsPaintBrushLocked() const { return bLockPaintBrush; } + void SetBrushDocument( ScDocument* pNew, sal_Bool bLock ); + void SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock ); void ResetBrushDocument(); }; diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 28cc2a823928..6d69b50ad2a9 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -100,15 +100,15 @@ enum ObjectSelectionType class ScTabViewShell: public SfxViewShell, public ScDBFunc { private: - static USHORT nInsertCtrlState; - static USHORT nInsCellsCtrlState; - static USHORT nInsObjCtrlState; + static sal_uInt16 nInsertCtrlState; + static sal_uInt16 nInsCellsCtrlState; + static sal_uInt16 nInsObjCtrlState; SvxHtmlOptions aHTMLOpt; ObjectSelectionType eCurOST; - USHORT nDrawSfxId; - USHORT nCtrlSfxId; - USHORT nFormSfxId; + sal_uInt16 nDrawSfxId; + sal_uInt16 nCtrlSfxId; + sal_uInt16 nFormSfxId; String sDrawCustom; // current custom shape type ScDrawShell* pDrawShell; ScDrawTextObjectBar* pDrawTextShell; @@ -144,37 +144,37 @@ private: ScNavigatorSettings* pNavSettings; // used in first Activate - BOOL bFirstActivate; + sal_Bool bFirstActivate; - BOOL bActiveDrawSh; - BOOL bActiveDrawTextSh; - BOOL bActivePivotSh; - BOOL bActiveAuditingSh; - BOOL bActiveDrawFormSh; - BOOL bActiveOleObjectSh; - BOOL bActiveChartSh; - BOOL bActiveGraphicSh; - BOOL bActiveMediaSh; - BOOL bActiveEditSh; + sal_Bool bActiveDrawSh; + sal_Bool bActiveDrawTextSh; + sal_Bool bActivePivotSh; + sal_Bool bActiveAuditingSh; + sal_Bool bActiveDrawFormSh; + sal_Bool bActiveOleObjectSh; + sal_Bool bActiveChartSh; + sal_Bool bActiveGraphicSh; + sal_Bool bActiveMediaSh; + sal_Bool bActiveEditSh; - BOOL bFormShellAtTop; // does the FormShell need to be on top? + sal_Bool bFormShellAtTop; // does the FormShell need to be on top? - BOOL bDontSwitch; // EditShell nicht abschalten - BOOL bInFormatDialog; // fuer GetSelectionText - BOOL bPrintSelected; // for result of SvxPrtQryBox + sal_Bool bDontSwitch; // EditShell nicht abschalten + sal_Bool bInFormatDialog; // fuer GetSelectionText + sal_Bool bPrintSelected; // for result of SvxPrtQryBox - BOOL bReadOnly; // um Status-Aenderungen zu erkennen + sal_Bool bReadOnly; // um Status-Aenderungen zu erkennen SbxObject* pScSbxObject; -//UNUSED2008-05 BOOL bChartDlgIsEdit; // Datenbereich aendern - BOOL bChartAreaValid; // wenn Chart aufgezogen wird +//UNUSED2008-05 sal_Bool bChartDlgIsEdit; // Datenbereich aendern + sal_Bool bChartAreaValid; // wenn Chart aufgezogen wird String aEditChartName; ScRangeListRef aChartSource; Rectangle aChartPos; SCTAB nChartDestTab; - USHORT nCurRefDlgId; + sal_uInt16 nCurRefDlgId; SfxBroadcaster* pAccessibilityBroadcaster; @@ -182,7 +182,7 @@ private: String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ]; private: - void Construct( BYTE nForceDesignMode = SC_FORCEMODE_NONE ); + void Construct( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE ); //UNUSED2008-05 void SetMySubShell( SfxShell* pShell ); SfxShell* GetMySubShell() const; @@ -199,9 +199,9 @@ private: DECL_LINK( HtmlOptionsHdl, void * ); protected: - virtual void Activate(BOOL bMDI); - virtual void Deactivate(BOOL bMDI); - virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE ); + virtual void Activate(sal_Bool bMDI); + virtual void Deactivate(sal_Bool bMDI); + virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False ); virtual void ShowCursor(FASTBOOL bOn); @@ -217,12 +217,12 @@ protected: virtual Size GetOptimalSizePixel() const; - virtual String GetSelectionText( BOOL bWholeWord ); - virtual BOOL HasSelection( BOOL bText ) const; + virtual String GetSelectionText( sal_Bool bWholeWord ); + virtual sal_Bool HasSelection( sal_Bool bText ) const; virtual String GetDescription() const; - virtual void WriteUserData(String &, BOOL bBrowse = FALSE); - virtual void ReadUserData(const String &, BOOL bBrowse = FALSE); + virtual void WriteUserData(String &, sal_Bool bBrowse = sal_False); + virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_False); virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); @@ -257,10 +257,10 @@ public: void ExecuteInputDirect(); ScInputHandler* GetInputHandler() const; - void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE ); + void UpdateInputHandler( sal_Bool bForce = sal_False, sal_Bool bStopEditing = sal_True ); void UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust ); - BOOL TabKeyInput(const KeyEvent& rKEvt); - BOOL SfxKeyInput(const KeyEvent& rKEvt); + sal_Bool TabKeyInput(const KeyEvent& rKEvt); + sal_Bool SfxKeyInput(const KeyEvent& rKEvt); void SetActive(); @@ -310,32 +310,32 @@ public: void GetDrawOptState(SfxItemSet &rSet); - void SetDrawShell( BOOL bActive ); - void SetDrawTextShell( BOOL bActive ); + void SetDrawShell( sal_Bool bActive ); + void SetDrawTextShell( sal_Bool bActive ); - void SetPivotShell( BOOL bActive ); + void SetPivotShell( sal_Bool bActive ); ScArea* GetPivotSource(){return pPivotSource;} void SetPivotSource(ScArea* pSrc){pPivotSource=pSrc;} void SetDialogDPObject( const ScDPObject* pObj ); const ScDPObject* GetDialogDPObject() const { return pDialogDPObject; } - BOOL GetDontSwitch(){return bDontSwitch;} - void SetDontSwitch(BOOL bFlag){bDontSwitch=bFlag;} + sal_Bool GetDontSwitch(){return bDontSwitch;} + void SetDontSwitch(sal_Bool bFlag){bDontSwitch=bFlag;} - void SetAuditShell( BOOL bActive ); - void SetDrawFormShell( BOOL bActive ); - void SetEditShell(EditView* pView, BOOL bActive ); - void SetOleObjectShell( BOOL bActive ); - void SetChartShell( BOOL bActive ); - void SetGraphicShell( BOOL bActive ); - void SetMediaShell( BOOL bActive ); + void SetAuditShell( sal_Bool bActive ); + void SetDrawFormShell( sal_Bool bActive ); + void SetEditShell(EditView* pView, sal_Bool bActive ); + void SetOleObjectShell( sal_Bool bActive ); + void SetChartShell( sal_Bool bActive ); + void SetGraphicShell( sal_Bool bActive ); + void SetMediaShell( sal_Bool bActive ); void SetDrawShellOrSub(); - void SetCurSubShell( ObjectSelectionType eOST, BOOL bForce = FALSE ); + void SetCurSubShell( ObjectSelectionType eOST, sal_Bool bForce = sal_False ); - void SetFormShellAtTop( BOOL bSet ); + void SetFormShellAtTop( sal_Bool bSet ); ObjectSelectionType GetCurObjectSelectionType(); @@ -343,8 +343,8 @@ public: void StopEditShell(); - BOOL IsDrawTextShell() const; - BOOL IsAuditShell() const; + sal_Bool IsDrawTextShell() const; + sal_Bool IsAuditShell() const; void SetDrawTextUndo( SfxUndoManager* pUndoMgr ); @@ -352,10 +352,10 @@ public: //UNUSED2008-05 void ResetChartArea(); void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest ); - BOOL GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; + sal_Bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; -//UNUSED2008-05 BOOL IsChartDlgEdit() const; -//UNUSED2008-05 void SetChartDlgEdit(BOOL bFlag){bChartDlgIsEdit=bFlag;} +//UNUSED2008-05 sal_Bool IsChartDlgEdit() const; +//UNUSED2008-05 void SetChartDlgEdit(sal_Bool bFlag){bChartDlgIsEdit=bFlag;} void SetEditChartName(const String& aStr){aEditChartName=aStr;} //UNUSED2008-05 const String& GetEditChartName() const; @@ -365,27 +365,27 @@ public: ScNavigatorSettings* GetNavigatorSettings(); // Drucken: - virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - virtual USHORT SetPrinter( SfxPrinter* pNewPrinter, - USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ); + virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False ); + virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, + sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ); virtual PrintDialog* CreatePrintDialog( Window* pParent ); virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); virtual void PreparePrint( PrintDialog* pPrintDialog = NULL ); virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, - BOOL bSilent, BOOL bIsAPI ); - virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL ); + sal_Bool bSilent, sal_Bool bIsAPI ); + virtual sal_uInt16 Print( SfxProgress& rProgress, sal_Bool bIsAPI, PrintDialog* pPrintDialog = NULL ); void ConnectObject( SdrOle2Obj* pObj ); - BOOL ActivateObject( SdrOle2Obj* pObj, long nVerb ); + sal_Bool ActivateObject( SdrOle2Obj* pObj, long nVerb ); void DeactivateOle(); SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell(); SfxModelessDialog* CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW, SfxChildWinInfo* pInfo, - Window* pParent, USHORT nSlotId ); + Window* pParent, sal_uInt16 nSlotId ); void UpdateOleZoom(); inline SbxObject* GetScSbxObject() const @@ -396,15 +396,15 @@ public: FmFormShell* GetFormShell() const { return pFormShell; } void InsertURL( const String& rName, const String& rURL, const String& rTarget, - USHORT nMode ); + sal_uInt16 nMode ); void InsertURLButton( const String& rName, const String& rURL, const String& rTarget, const Point* pInsPos = NULL ); void InsertURLField( const String& rName, const String& rURL, const String& rTarget ); - BOOL SelectObject( const String& rName ); + sal_Bool SelectObject( const String& rName ); - void SetInFormatDialog(BOOL bFlag) {bInFormatDialog=bFlag;} - BOOL IsInFormatDialog() {return bInFormatDialog;} + void SetInFormatDialog(sal_Bool bFlag) {bInFormatDialog=bFlag;} + sal_Bool IsInFormatDialog() {return bInFormatDialog;} void ForceMove() { Move(); } @@ -415,20 +415,20 @@ public: void UpdateNumberFormatter ( ScDocument* pDoc, const SvxNumberInfoItem& rInfoItem ); - void ExecuteCellFormatDlg ( SfxRequest& rReq, USHORT nTabPage = 0xffff ); + void ExecuteCellFormatDlg ( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff ); - BOOL GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 ); + sal_Bool GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 ); void StartSimpleRefDialog( const String& rTitle, const String& rInitVal, - BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection ); + sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ); void StopSimpleRefDialog(); - void SetCurRefDlgId( USHORT nNew ); + void SetCurRefDlgId( sal_uInt16 nNew ); void AddAccessibilityObject( SfxListener& rObject ); void RemoveAccessibilityObject( SfxListener& rObject ); void BroadcastAccessibility( const SfxHint &rHint ); - BOOL HasAccessibilityObjects(); + sal_Bool HasAccessibilityObjects(); bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash); diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx index a056da0a982c..27b9ceff8520 100644 --- a/sc/source/ui/inc/tbinsert.hxx +++ b/sc/source/ui/inc/tbinsert.hxx @@ -36,20 +36,20 @@ class ScTbxInsertCtrl : public SfxToolBoxControl { - USHORT nLastSlotId; + sal_uInt16 nLastSlotId; using SfxToolBoxControl::Select; - virtual void Select( BOOL bMod1 = FALSE ); + virtual void Select( sal_Bool bMod1 = sal_False ); public: SFX_DECL_TOOLBOX_CONTROL(); - ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rBox ); + ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox ); ~ScTbxInsertCtrl(); virtual SfxPopupWindowType GetPopupWindowType() const; virtual SfxPopupWindow* CreatePopupWindow(); - virtual void StateChanged( USHORT nSID, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); }; @@ -73,7 +73,7 @@ protected: virtual void PopupModeEnd(); public: - ScTbxInsertPopup( USHORT nId, WindowAlign eAlign, + ScTbxInsertPopup( sal_uInt16 nId, WindowAlign eAlign, const ResId& rRIdWin, const ResId& rRIdTbx, SfxBindings& rBindings ); ~ScTbxInsertPopup(); diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index 6ea4f6e169ed..c442c3e7c0ac 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -50,10 +50,10 @@ class ScZoomSliderControl: public SfxToolBoxControl { public: SFX_DECL_TOOLBOX_CONTROL(); - ScZoomSliderControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ScZoomSliderControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~ScZoomSliderControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual Window* CreateItemWindow( Window *pParent ); }; @@ -69,13 +69,13 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; - USHORT Offset2Zoom( long nOffset ) const; - long Zoom2Offset( USHORT nZoom ) const; + sal_uInt16 Offset2Zoom( long nOffset ) const; + long Zoom2Offset( sal_uInt16 nZoom ) const; void DoPaint( const Rectangle& rRect ); public: ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom ); + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , sal_uInt16 nCurrentZoom ); ~ScZoomSliderWnd(); void UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ); diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx index 302b5de5ffd2..de580944ef26 100644 --- a/sc/source/ui/inc/textdlgs.hxx +++ b/sc/source/ui/inc/textdlgs.hxx @@ -42,7 +42,7 @@ private: const SfxItemSet& rOutAttrs; const SfxObjectShell& rDocShell; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: ScCharDlg( Window* pParent, const SfxItemSet* pAttr, @@ -59,7 +59,7 @@ class ScParagraphDlg : public SfxTabDialog private: const SfxItemSet& rOutAttrs; - virtual void PageCreated( USHORT nId, SfxTabPage &rPage ); + virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); public: ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ); diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index 31f2c9458c83..1c664ecb8f1f 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -45,8 +45,8 @@ class ScTpCalcOptions : public SfxTabPage public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); virtual void Reset ( const SfxItemSet& rCoreSet ); using SfxTabPage::DeactivatePage; virtual int DeactivatePage ( SfxItemSet* pSet = NULL ); @@ -83,7 +83,7 @@ private: ScDocOptions* pOldOptions; ScDocOptions* pLocalOptions; - USHORT nWhichCalc; + sal_uInt16 nWhichCalc; #ifdef _TPCALC_CXX private: diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx index efd681a688a6..e63985d300e8 100644 --- a/sc/source/ui/inc/tphf.hxx +++ b/sc/source/ui/inc/tphf.hxx @@ -41,16 +41,16 @@ public: virtual ~ScHFPage(); virtual void Reset( const SfxItemSet& rSet ); - virtual BOOL FillItemSet( SfxItemSet& rOutSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutSet ); void SetPageStyle( const String& rName ) { aStrPageStyle = rName; } void SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; } protected: ScHFPage( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const SfxItemSet& rSet, - USHORT nSetId ); + sal_uInt16 nSetId ); // using SvxHFPage::ActivatePage; // using SvxHFPage::DeactivatePage; @@ -63,7 +63,7 @@ private: PushButton aBtnEdit; SfxItemSet aDataSet; String aStrPageStyle; - USHORT nPageUsage; + sal_uInt16 nPageUsage; const ScStyleDlg* pStyleDlg; #ifdef _TPHF_CXX @@ -80,7 +80,7 @@ class ScHeaderPage : public ScHFPage { public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); private: ScHeaderPage( Window* pParent, const SfxItemSet& rSet ); @@ -92,7 +92,7 @@ class ScFooterPage : public ScHFPage { public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); private: ScFooterPage( Window* pParent, const SfxItemSet& rSet ); diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index d9d26d2111cd..3cdc6e91c882 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -110,7 +110,7 @@ private: Timer aTimer; ScPopupMenu* pPopupMenu; Link aMLink; - USHORT nSelected; + sal_uInt16 nSelected; SC_DLLPRIVATE DECL_LINK( TimerHdl, Timer*); @@ -130,7 +130,7 @@ public: void SetPopupMenu(ScPopupMenu* pPopUp); - USHORT GetSelected(); + sal_uInt16 GetSelected(); void SetMenuHdl( const Link& rLink ) { aMLink = rLink; } const Link& GetMenuHdl() const { return aMLink; } @@ -144,16 +144,16 @@ public: //CHINA001 class ScHFEditPage : public SfxTabPage //CHINA001 { //CHINA001 public: -//CHINA001 virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); +//CHINA001 virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); //CHINA001 virtual void Reset ( const SfxItemSet& rCoreSet ); //CHINA001 //CHINA001 void SetNumType(SvxNumType eNumType); //CHINA001 //CHINA001 protected: //CHINA001 ScHFEditPage( Window* pParent, -//CHINA001 USHORT nResId, +//CHINA001 sal_uInt16 nResId, //CHINA001 const SfxItemSet& rCoreSet, -//CHINA001 USHORT nWhich ); +//CHINA001 sal_uInt16 nWhich ); //CHINA001 virtual ~ScHFEditPage(); //CHINA001 //CHINA001 private: @@ -174,7 +174,7 @@ public: //CHINA001 FixedInfo aFtInfo; //CHINA001 ScPopupMenu aPopUpFile; //CHINA001 -//CHINA001 USHORT nWhich; +//CHINA001 sal_uInt16 nWhich; //CHINA001 String aCmdArr[6]; //CHINA001 //CHINA001 private: @@ -191,7 +191,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -203,7 +203,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -215,7 +215,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet ); @@ -227,7 +227,7 @@ public: //CHINA001 { //CHINA001 public: //CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); -//CHINA001 static USHORT* GetRanges(); +//CHINA001 static sal_uInt16* GetRanges(); //CHINA001 //CHINA001 private: //CHINA001 ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet ); diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx index 358c29f83d97..3eae915e0768 100644 --- a/sc/source/ui/inc/tpprint.hxx +++ b/sc/source/ui/inc/tpprint.hxx @@ -45,8 +45,8 @@ class ScTpPrintOptions : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rCoreSet ); + static sal_uInt16* GetRanges(); + virtual sal_Bool FillItemSet( SfxItemSet& rCoreSet ); virtual void Reset( const SfxItemSet& rCoreSet ); using SfxTabPage::DeactivatePage; virtual int DeactivatePage( SfxItemSet* pSet = NULL ); diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index d1ba772a8ca2..83769422e2a7 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -61,8 +61,8 @@ public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); protected: @@ -93,16 +93,16 @@ private: String aStrColumn; String aStrRow; - const USHORT nWhichSort; + const sal_uInt16 nWhichSort; ScSortDlg* pDlg; ScViewData* pViewData; const ScSortParam& rSortData; SCCOLROW nFieldArr[SC_MAXFIELDS]; - USHORT nFieldCount; + sal_uInt16 nFieldCount; SCCOL nFirstCol; SCROW nFirstRow; - BOOL bHasHeader; - BOOL bSortByRows; + sal_Bool bHasHeader; + sal_Bool bSortByRows; ListBox* aSortLbArr[3]; RadioButton* aDirBtnArr[3][2]; @@ -111,10 +111,10 @@ private: #ifdef _TPSORT_CXX private: void Init (); - void DisableField ( USHORT nField ); - void EnableField ( USHORT nField ); + void DisableField ( sal_uInt16 nField ); + void EnableField ( sal_uInt16 nField ); void FillFieldLists (); - USHORT GetFieldSelPos ( SCCOLROW nField ); + sal_uInt16 GetFieldSelPos ( SCCOLROW nField ); // Handler ------------------------ DECL_LINK( SelectHdl, ListBox * ); @@ -147,8 +147,8 @@ public: #define SfxTabPage ::SfxTabPage static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); protected: @@ -189,7 +189,7 @@ private: String aStrNoName; String aStrAreaLabel; - const USHORT nWhichSort; + const sal_uInt16 nWhichSort; const ScSortParam& rSortData; ScViewData* pViewData; ScDocument* pDoc; diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx index 1c928ff2ef13..3725f58d8637 100644 --- a/sc/source/ui/inc/tpstat.hxx +++ b/sc/source/ui/inc/tpstat.hxx @@ -47,7 +47,7 @@ private: ~ScDocStatPage(); protected: - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset ( const SfxItemSet& rSet ); private: diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx index 6dd640e7925e..a370e73934ba 100644 --- a/sc/source/ui/inc/tpsubt.hxx +++ b/sc/source/ui/inc/tpsubt.hxx @@ -47,16 +47,16 @@ class ScDocument; class ScTpSubTotalGroup : public SfxTabPage { protected: - ScTpSubTotalGroup( Window* pParent, USHORT nResId, + ScTpSubTotalGroup( Window* pParent, sal_uInt16 nResId, const SfxItemSet& rArgSet ); public: virtual ~ScTpSubTotalGroup(); - static USHORT* GetRanges (); - BOOL DoReset ( USHORT nGroupNo, + static sal_uInt16* GetRanges (); + sal_Bool DoReset ( sal_uInt16 nGroupNo, const SfxItemSet& rArgSet ); - BOOL DoFillItemSet ( USHORT nGroupNo, + sal_Bool DoFillItemSet ( sal_uInt16 nGroupNo, SfxItemSet& rArgSet ); protected: FixedText aFtGroup; @@ -71,17 +71,17 @@ protected: ScViewData* pViewData; ScDocument* pDoc; - const USHORT nWhichSubTotals; + const sal_uInt16 nWhichSubTotals; const ScSubTotalParam& rSubTotalData; SCCOL nFieldArr[SC_MAXFIELDS]; - const USHORT nFieldCount; + const sal_uInt16 nFieldCount; private: void Init (); void FillListBoxes (); - ScSubTotalFunc LbPosToFunc ( USHORT nPos ); - USHORT FuncToLbPos ( ScSubTotalFunc eFunc ); - USHORT GetFieldSelPos ( SCCOL nField ); + ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos ); + sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc ); + sal_uInt16 GetFieldSelPos ( SCCOL nField ); // Handler ------------------------ DECL_LINK( SelectHdl, ListBox * ); @@ -101,7 +101,7 @@ public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); }; @@ -118,7 +118,7 @@ public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); }; @@ -135,7 +135,7 @@ public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); }; @@ -151,10 +151,10 @@ protected: public: virtual ~ScTpSubTotalOptions(); - static USHORT* GetRanges (); + static sal_uInt16* GetRanges (); static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); private: @@ -171,7 +171,7 @@ private: ScViewData* pViewData; ScDocument* pDoc; - const USHORT nWhichSubTotals; + const sal_uInt16 nWhichSubTotals; const ScSubTotalParam& rSubTotalData; private: diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx index 980a574dc61d..0e0eea20efdb 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -57,8 +57,8 @@ class ScTablePage : public SfxTabPage public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rCoreSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); virtual void Reset ( const SfxItemSet& rCoreSet ); using SfxTabPage::DeactivatePage; virtual int DeactivatePage ( SfxItemSet* pSet = NULL ); diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx index f26e48889f1d..99d5b21f8db9 100644 --- a/sc/source/ui/inc/tpusrlst.hxx +++ b/sc/source/ui/inc/tpusrlst.hxx @@ -46,8 +46,8 @@ class ScTpUserLists : public SfxTabPage public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rAttrSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreAttrs ); virtual void Reset ( const SfxItemSet& rCoreAttrs ); using SfxTabPage::DeactivatePage; virtual int DeactivatePage ( SfxItemSet* pSet = NULL ); @@ -78,7 +78,7 @@ private: const String aStrCopyFrom; const String aStrCopyErr; - const USHORT nWhichUserLists; + const sal_uInt16 nWhichUserLists; ScUserList* pUserLists; ScDocument* pDoc; @@ -86,20 +86,20 @@ private: ScRangeUtil* pRangeUtil; String aStrSelectedArea; - BOOL bModifyMode; - BOOL bCancelMode; - BOOL bCopyDone; - USHORT nCancelPos; + sal_Bool bModifyMode; + sal_Bool bCancelMode; + sal_Bool bCopyDone; + sal_uInt16 nCancelPos; #ifdef _TPUSRLST_CXX private: void Init (); - USHORT UpdateUserListBox (); - void UpdateEntries ( USHORT nList ); + sal_uInt16 UpdateUserListBox (); + void UpdateEntries ( sal_uInt16 nList ); void MakeListStr ( String& rListStr ); void AddNewList ( const String& rEntriesStr ); - void RemoveList ( USHORT nList ); - void ModifyList ( USHORT nSelList, + void RemoveList ( sal_uInt16 nList ); + void ModifyList ( sal_uInt16 nSelList, const String& rEntriesStr ); void CopyListFromArea ( const ScRefAddress& rStartPos, const ScRefAddress& rEndPos ); diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index 81760eb66c67..0c839c513c2a 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -99,7 +99,7 @@ class ScTpContentOptions : public SfxTabPage public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rCoreSet ); - virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); virtual void Reset ( const SfxItemSet& rCoreSet ); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -155,7 +155,7 @@ class ScTpLayoutOptions : public SfxTabPage public: static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rCoreSet ); - virtual BOOL FillItemSet ( SfxItemSet& rCoreSet ); + virtual sal_Bool FillItemSet ( SfxItemSet& rCoreSet ); virtual void Reset ( const SfxItemSet& rCoreSet ); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx index 546637c726d0..4cfbc4ba1673 100644 --- a/sc/source/ui/inc/transobj.hxx +++ b/sc/source/ui/inc/transobj.hxx @@ -60,9 +60,9 @@ private: SCCOL nDragHandleX; SCROW nDragHandleY; SCTAB nVisibleTab; - USHORT nDragSourceFlags; - BOOL bDragWasInternal; - BOOL bUsedForLink; + sal_uInt16 nDragSourceFlags; + sal_Bool bDragWasInternal; + sal_Bool bUsedForLink; bool bHasFiltered; // if has filtered rows bool bUseInApi; // to recognize clipboard content copied from API @@ -72,7 +72,7 @@ private: ScDocument* pDestDoc=0, SCCOL nSubX=0, SCROW nSubY=0 ); static void PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor, - const ScRange& rBlock, BOOL bMetaFile ); + const ScRange& rBlock, sal_Bool bMetaFile ); static void GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ); public: @@ -92,7 +92,7 @@ public: SCCOL GetDragHandleX() const { return nDragHandleX; } SCROW GetDragHandleY() const { return nDragHandleY; } SCTAB GetVisibleTab() const { return nVisibleTab; } - USHORT GetDragSourceFlags() const { return nDragSourceFlags; } + sal_uInt16 GetDragSourceFlags() const { return nDragSourceFlags; } bool HasFilteredRows() const { return bHasFiltered; } bool GetUseInApi() const { return bUseInApi; } ScDocShell* GetSourceDocShell(); @@ -103,13 +103,13 @@ public: void SetDragHandlePos( SCCOL nX, SCROW nY ); void SetVisibleTab( SCTAB nNew ); void SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark ); - void SetDragSourceFlags( USHORT nFlags ); + void SetDragSourceFlags( sal_uInt16 nFlags ); void SetDragWasInternal(); SC_DLLPUBLIC void SetUseInApi( bool bSet ); static SC_DLLPUBLIC ScTransferObj* GetOwnClipboard( Window* pUIWin ); - static SfxObjectShell* SetDrawClipDoc( BOOL bAnyOle ); // update ScGlobal::pDrawClipDocShellRef + static SfxObjectShell* SetDrawClipDoc( sal_Bool bAnyOle ); // update ScGlobal::pDrawClipDocShellRef virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException ); static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); }; diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx index 770411b63e1b..1b86a5722e54 100644 --- a/sc/source/ui/inc/uiitems.hxx +++ b/sc/source/ui/inc/uiitems.hxx @@ -54,7 +54,7 @@ class ScInputStatusItem : public SfxPoolItem public: TYPEINFO(); -//UNUSED2008-05 ScInputStatusItem( USHORT nWhich, +//UNUSED2008-05 ScInputStatusItem( sal_uInt16 nWhich, //UNUSED2008-05 SCTAB nTab, //UNUSED2008-05 SCCOL nCol, SCROW nRow, //UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow, @@ -62,7 +62,7 @@ public: //UNUSED2008-05 const String& rString, //UNUSED2008-05 const EditTextObject* pData ); - ScInputStatusItem( USHORT nWhich, + ScInputStatusItem( sal_uInt16 nWhich, const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, @@ -100,16 +100,16 @@ public: class ScTablesHint : public SfxHint { - USHORT nId; + sal_uInt16 nId; SCTAB nTab1; SCTAB nTab2; public: TYPEINFO(); - ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2=0); + ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2=0); ~ScTablesHint(); - USHORT GetId() const { return nId; } + sal_uInt16 GetId() const { return nId; } SCTAB GetTab1() const { return nTab1; } SCTAB GetTab2() const { return nTab2; } }; @@ -135,16 +135,16 @@ private: class ScIndexHint : public SfxHint { - USHORT nId; - USHORT nIndex; + sal_uInt16 nId; + sal_uInt16 nIndex; public: TYPEINFO(); - ScIndexHint(USHORT nNewId, USHORT nIdx); + ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx); ~ScIndexHint(); - USHORT GetId() const { return nId; } - USHORT GetIndex() const { return nIndex; } + sal_uInt16 GetId() const { return nId; } + sal_uInt16 GetIndex() const { return nIndex; } }; //---------------------------------------------------------------------------- @@ -154,10 +154,10 @@ class SC_DLLPUBLIC ScSortItem : public SfxPoolItem { public: TYPEINFO(); - ScSortItem( USHORT nWhich, + ScSortItem( sal_uInt16 nWhich, ScViewData* ptrViewData, const ScSortParam* pSortData ); - ScSortItem( USHORT nWhich, + ScSortItem( sal_uInt16 nWhich, const ScSortParam* pSortData ); ScSortItem( const ScSortItem& rItem ); ~ScSortItem(); @@ -165,7 +165,7 @@ public: virtual String GetValueText() const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const; ScViewData* GetViewData () const { return pViewData; } const ScSortParam& GetSortData () const { return theSortData; } @@ -182,10 +182,10 @@ class SC_DLLPUBLIC ScQueryItem : public SfxPoolItem { public: TYPEINFO(); - ScQueryItem( USHORT nWhich, + ScQueryItem( sal_uInt16 nWhich, ScViewData* ptrViewData, const ScQueryParam* pQueryData ); - ScQueryItem( USHORT nWhich, + ScQueryItem( sal_uInt16 nWhich, const ScQueryParam* pQueryData ); ScQueryItem( const ScQueryItem& rItem ); ~ScQueryItem(); @@ -197,13 +197,13 @@ public: ScViewData* GetViewData () const { return pViewData; } const ScQueryParam& GetQueryData() const { return theQueryData; } - BOOL GetAdvancedQuerySource(ScRange& rSource) const; + sal_Bool GetAdvancedQuerySource(ScRange& rSource) const; void SetAdvancedQuerySource(const ScRange* pSource); private: ScViewData* pViewData; ScQueryParam theQueryData; - BOOL bIsAdvanced; + sal_Bool bIsAdvanced; ScRange aAdvSource; }; @@ -214,10 +214,10 @@ class SC_DLLPUBLIC ScSubTotalItem : public SfxPoolItem { public: TYPEINFO(); - ScSubTotalItem( USHORT nWhich, + ScSubTotalItem( sal_uInt16 nWhich, ScViewData* ptrViewData, const ScSubTotalParam* pSubTotalData ); - ScSubTotalItem( USHORT nWhich, + ScSubTotalItem( sal_uInt16 nWhich, const ScSubTotalParam* pSubTotalData ); ScSubTotalItem( const ScSubTotalItem& rItem ); ~ScSubTotalItem(); @@ -225,7 +225,7 @@ public: virtual String GetValueText() const; virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const; + virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberUd ) const; ScViewData* GetViewData () const { return pViewData; } const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; } @@ -242,7 +242,7 @@ class SC_DLLPUBLIC ScUserListItem : public SfxPoolItem { public: TYPEINFO(); - ScUserListItem( USHORT nWhich ); + ScUserListItem( sal_uInt16 nWhich ); ScUserListItem( const ScUserListItem& rItem ); ~ScUserListItem(); @@ -264,7 +264,7 @@ class ScConsolidateItem : public SfxPoolItem { public: TYPEINFO(); - ScConsolidateItem( USHORT nWhich, + ScConsolidateItem( sal_uInt16 nWhich, const ScConsolidateParam* pParam ); ScConsolidateItem( const ScConsolidateItem& rItem ); ~ScConsolidateItem(); @@ -286,8 +286,8 @@ class ScPivotItem : public SfxPoolItem { public: TYPEINFO(); - ScPivotItem( USHORT nWhich, const ScDPSaveData* pData, - const ScRange* pRange, BOOL bNew ); + ScPivotItem( sal_uInt16 nWhich, const ScDPSaveData* pData, + const ScRange* pRange, sal_Bool bNew ); ScPivotItem( const ScPivotItem& rItem ); ~ScPivotItem(); @@ -297,12 +297,12 @@ public: const ScDPSaveData& GetData() const { return *pSaveData; } const ScRange& GetDestRange() const { return aDestRange; } - BOOL IsNewSheet() const { return bNewSheet; } + sal_Bool IsNewSheet() const { return bNewSheet; } private: ScDPSaveData* pSaveData; ScRange aDestRange; - BOOL bNewSheet; + sal_Bool bNewSheet; }; //---------------------------------------------------------------------------- @@ -312,7 +312,7 @@ class ScSolveItem : public SfxPoolItem { public: TYPEINFO(); - ScSolveItem( USHORT nWhich, + ScSolveItem( sal_uInt16 nWhich, const ScSolveParam* pParam ); ScSolveItem( const ScSolveItem& rItem ); ~ScSolveItem(); @@ -334,7 +334,7 @@ class ScTabOpItem : public SfxPoolItem { public: TYPEINFO(); - ScTabOpItem( USHORT nWhich, + ScTabOpItem( sal_uInt16 nWhich, const ScTabOpParam* pParam ); ScTabOpItem( const ScTabOpItem& rItem ); ~ScTabOpItem(); @@ -356,7 +356,7 @@ class ScCondFrmtItem : public SfxPoolItem { public: TYPEINFO(); - ScCondFrmtItem( USHORT nWhich, + ScCondFrmtItem( sal_uInt16 nWhich, //! const ScConditionalFormat* pCondFrmt ); const ScConditionalFormat& rCondFrmt ); ScCondFrmtItem( const ScCondFrmtItem& rItem ); diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx index 6f2bb3572832..c97fd53d431f 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -47,7 +47,7 @@ public: ScSimpleUndo( ScDocShell* pDocSh ); virtual ~ScSimpleUndo(); - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); protected: ScDocShell* pDocShell; @@ -84,7 +84,7 @@ protected: // void BeginRedo(); void EndRedo(); - BOOL AdjustHeight(); + sal_Bool AdjustHeight(); void ShowBlock(); }; @@ -154,16 +154,16 @@ public: SfxUndoAction* GetWrappedUndo() { return pWrappedUndo; } void ForgetWrappedUndo(); - virtual BOOL IsLinked(); - virtual void SetLinked( BOOL bIsLinked ); + virtual sal_Bool IsLinked(); + virtual void SetLinked( sal_Bool bIsLinked ); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); virtual String GetComment() const; virtual String GetRepeatComment(SfxRepeatTarget&) const; - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; }; diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 574926ecbf52..c04ebb575f46 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -54,29 +54,29 @@ public: ScUndoInsertCells( ScDocShell* pNewDocShell, const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios, InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData, - BOOL bNewPartOfPaste ); + sal_Bool bNewPartOfPaste ); virtual ~ScUndoInsertCells(); virtual void Undo(); virtual void Redo(); virtual void Repeat( SfxRepeatTarget& rTarget ); - virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const; + virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const; virtual String GetComment() const; - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); private: ScRange aEffRange; SCTAB nCount; SCTAB* pTabs; SCTAB* pScenarios; - ULONG nEndChangeAction; + sal_uLong nEndChangeAction; InsCellCmd eCmd; - BOOL bPartOfPaste; + sal_Bool bPartOfPaste; SfxUndoAction* pPasteUndo; - void DoChange ( const BOOL bUndo ); + void DoChange ( const sal_Bool bUndo ); void SetChangeTrack(); }; @@ -93,7 +93,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -102,11 +102,11 @@ private: SCTAB nCount; SCTAB* pTabs; SCTAB* pScenarios; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; DelCellCmd eCmd; - void DoChange ( const BOOL bUndo ); + void DoChange ( const sal_Bool bUndo ); void SetChangeTrack(); }; @@ -116,7 +116,7 @@ class ScUndoDeleteMulti: public ScMoveUndo public: TYPEINFO(); ScUndoDeleteMulti( ScDocShell* pNewDocShell, - BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab, + sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab, const SCCOLROW* pRng, SCCOLROW nRngCnt, ScDocument* pUndoDocument, ScRefUndoData* pRefData ); virtual ~ScUndoDeleteMulti(); @@ -124,18 +124,18 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: - BOOL bRows; - BOOL bRefresh; + sal_Bool bRows; + sal_Bool bRefresh; SCTAB nTab; SCCOLROW* pRanges; SCCOLROW nRangeCnt; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; void DoChange() const; void SetChangeTrack(); @@ -156,7 +156,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -164,27 +164,27 @@ private: ScMarkData aMarkData; ScDocument* pUndoDoc; ScRange aExtendedRange; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); void SetChangeTrack(); }; struct ScUndoPasteOptions { - USHORT nFunction; - BOOL bSkipEmpty; - BOOL bTranspose; - BOOL bAsLink; + sal_uInt16 nFunction; + sal_Bool bSkipEmpty; + sal_Bool bTranspose; + sal_Bool bAsLink; InsCellCmd eMoveMode; ScUndoPasteOptions() : nFunction( PASTE_NOFUNC ), - bSkipEmpty( FALSE ), - bTranspose( FALSE ), - bAsLink( FALSE ), + bSkipEmpty( sal_False ), + bTranspose( sal_False ), + bAsLink( sal_False ), eMoveMode( INS_NONE ) {} }; @@ -198,16 +198,16 @@ public: SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, const ScMarkData& rMark, ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, - USHORT nNewFlags, + sal_uInt16 nNewFlags, ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3, - BOOL bRedoIsFilled = TRUE, + sal_Bool bRedoIsFilled = sal_True, const ScUndoPasteOptions* pOptions = NULL ); virtual ~ScUndoPaste(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -215,15 +215,15 @@ private: ScMarkData aMarkData; ScDocument* pUndoDoc; ScDocument* pRedoDoc; - USHORT nFlags; + sal_uInt16 nFlags; ScRefUndoData* pRefUndoData; ScRefUndoData* pRefRedoData; - ULONG nStartChangeAction; - ULONG nEndChangeAction; - BOOL bRedoFilled; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + sal_Bool bRedoFilled; ScUndoPasteOptions aPasteOptions; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); void SetChangeTrack(); }; @@ -233,27 +233,27 @@ class ScUndoDragDrop: public ScMoveUndo public: TYPEINFO(); ScUndoDragDrop( ScDocShell* pNewDocShell, - const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut, + const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut, ScDocument* pUndoDocument, ScRefUndoData* pRefData, - BOOL bScenario ); + sal_Bool bScenario ); virtual ~ScUndoDragDrop(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: ScRange aSrcRange; ScRange aDestRange; - ULONG nStartChangeAction; - ULONG nEndChangeAction; - BOOL bCut; - BOOL bKeepScenarioFlags; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + sal_Bool bCut; + sal_Bool bKeepScenarioFlags; - void PaintArea( ScRange aRange, USHORT nExtFlags ) const; + void PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const; void DoUndo( ScRange aRange ) const; void SetChangeTrack(); @@ -267,14 +267,14 @@ public: ScUndoDeleteContents( ScDocShell* pNewDocShell, const ScMarkData& rMark, const ScRange& rRange, - ScDocument* pNewUndoDoc, BOOL bNewMulti, - USHORT nNewFlags, BOOL bObjects ); + ScDocument* pNewUndoDoc, sal_Bool bNewMulti, + sal_uInt16 nNewFlags, sal_Bool bObjects ); virtual ~ScUndoDeleteContents(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -283,12 +283,12 @@ private: ScMarkData aMarkData; ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten SdrUndoAction* pDrawUndo; // geloeschte Objekte - ULONG nStartChangeAction; - ULONG nEndChangeAction; - USHORT nFlags; - BOOL bMulti; // Mehrfachselektion + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + sal_uInt16 nFlags; + sal_Bool bMulti; // Mehrfachselektion - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); void SetChangeTrack(); }; @@ -301,14 +301,14 @@ public: const ScMarkData& rMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, - ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc, - USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink ); + ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc, + sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink ); virtual ~ScUndoFillTable(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -316,16 +316,16 @@ private: ScRange aRange; ScMarkData aMarkData; ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten - ULONG nStartChangeAction; - ULONG nEndChangeAction; - USHORT nFlags; - USHORT nFunction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + sal_uInt16 nFlags; + sal_uInt16 nFunction; SCTAB nSrcTab; - BOOL bMulti; // Mehrfachselektion - BOOL bSkipEmpty; - BOOL bAsLink; + sal_Bool bMulti; // Mehrfachselektion + sal_Bool bSkipEmpty; + sal_Bool bAsLink; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); void SetChangeTrack(); }; @@ -338,7 +338,7 @@ public: const ScMarkData& rMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, - ScDocument* pNewUndoDoc, BOOL bNewMulti, + ScDocument* pNewUndoDoc, sal_Bool bNewMulti, const ScPatternAttr* pNewApply, const SvxBoxItem* pNewOuter = NULL, const SvxBoxInfoItem* pNewInner = NULL ); @@ -347,7 +347,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -355,12 +355,12 @@ private: ScMarkData aMarkData; ScRange aRange; ScDocument* pUndoDoc; - BOOL bMulti; + sal_Bool bMulti; ScPatternAttr* pApplyPattern; SvxBoxItem* pLineOuter; SvxBoxInfoItem* pLineInner; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); }; @@ -375,14 +375,14 @@ public: ScDocument* pNewUndoDoc, SCCOLROW nNewCnt, SCCOLROW* pNewRanges, ScOutlineTable* pNewUndoTab, - ScSizeMode eNewMode, USHORT nNewSizeTwips, - BOOL bNewWidth ); + ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, + sal_Bool bNewWidth ); virtual ~ScUndoWidthOrHeight(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -396,8 +396,8 @@ private: ScOutlineTable* pUndoTab; SCCOLROW nRangeCnt; SCCOLROW* pRanges; - USHORT nNewSize; - BOOL bWidth; + sal_uInt16 nNewSize; + sal_Bool bWidth; ScSizeMode eMode; SdrUndoAction* pDrawUndo; }; @@ -413,13 +413,13 @@ public: FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd, double fNewStartValue, double fNewStepValue, double fNewMaxValue, - USHORT nMaxShIndex ); + sal_uInt16 nMaxShIndex ); virtual ~ScUndoAutoFill(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -433,9 +433,9 @@ private: double fStartValue; double fStepValue; double fMaxValue; - ULONG nStartChangeAction; - ULONG nEndChangeAction; - USHORT nMaxSharedIndex; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + sal_uInt16 nMaxSharedIndex; void SetChangeTrack(); }; @@ -454,7 +454,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -475,21 +475,21 @@ public: ScUndoAutoFormat( ScDocShell* pNewDocShell, const ScRange& rRange, ScDocument* pNewUndoDoc, const ScMarkData& rMark, - BOOL bNewSize, USHORT nNewFormatNo ); + sal_Bool bNewSize, sal_uInt16 nNewFormatNo ); virtual ~ScUndoAutoFormat(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: ScDocument* pUndoDoc; // geloeschte Daten ScMarkData aMarkData; - BOOL bSize; - USHORT nFormatNo; + sal_Bool bSize; + sal_uInt16 nFormatNo; }; @@ -507,7 +507,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -517,8 +517,8 @@ private: String aUndoStr; // Daten bei Einfachmarkierung ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten SvxSearchItem* pSearchItem; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; void SetChangeTrack(); }; @@ -536,13 +536,13 @@ public: const ScRefAddress& rFormulaEnd, const ScRefAddress& rRowCell, const ScRefAddress& rColCell, - BYTE nMode ); + sal_uInt8 nMode ); virtual ~ScUndoTabOp(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -553,7 +553,7 @@ private: ScRefAddress theFormulaEnd; ScRefAddress theRowCell; ScRefAddress theColCell; - BYTE nMode; + sal_uInt8 nMode; }; @@ -572,7 +572,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -582,8 +582,8 @@ private: ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten ScAddress aNewCursorPos; ScDocument* pRedoDoc; // Blockmarkierung und neue Daten - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; ScConversionParam maConvParam; /// Conversion type and parameters. void DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPos ); @@ -596,13 +596,13 @@ public: TYPEINFO(); ScUndoRefConversion( ScDocShell* pNewDocShell, const ScRange& aMarkRange, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag); + ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag); virtual ~ScUndoRefConversion(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -611,10 +611,10 @@ private: ScDocument* pUndoDoc; ScDocument* pRedoDoc; ScRange aRange; - BOOL bMulti; - USHORT nFlags; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_Bool bMulti; + sal_uInt16 nFlags; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; void DoChange( ScDocument* pRefDoc); void SetChangeTrack(); @@ -632,7 +632,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -657,7 +657,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -683,10 +683,10 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; private: ScMarkData aMarkData; @@ -694,7 +694,7 @@ private: String aStyleName; ScRange aRange; - void DoChange( const BOOL bUndo ); + void DoChange( const sal_Bool bUndo ); }; @@ -709,7 +709,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -732,7 +732,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -740,8 +740,8 @@ private: ScDocument* pUndoDoc; String aFormula; formula::FormulaGrammar::AddressConvention eConv; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; void SetChangeTrack(); }; @@ -755,13 +755,13 @@ public: const String& rDoc, const String& rFlt, const String& rOpt, const String& rArea, const ScRange& rDestRange, - ULONG nRefreshDelay ); + sal_uLong nRefreshDelay ); virtual ~ScUndoInsertAreaLink(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -771,7 +771,7 @@ private: String aOptions; String aAreaName; ScRange aRange; - ULONG nRefreshDelay; + sal_uLong nRefreshDelay; }; @@ -783,13 +783,13 @@ public: const String& rDoc, const String& rFlt, const String& rOpt, const String& rArea, const ScRange& rDestRange, - ULONG nRefreshDelay ); + sal_uLong nRefreshDelay ); virtual ~ScUndoRemoveAreaLink(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -799,7 +799,7 @@ private: String aOptions; String aAreaName; ScRange aRange; - ULONG nRefreshDelay; + sal_uLong nRefreshDelay; }; @@ -811,19 +811,19 @@ public: const String& rOldD, const String& rOldF, const String& rOldO, const String& rOldA, const ScRange& rOldR, - ULONG nOldRD, + sal_uLong nOldRD, const String& rNewD, const String& rNewF, const String& rNewO, const String& rNewA, const ScRange& rNewR, - ULONG nNewRD, + sal_uLong nNewRD, ScDocument* pUndo, ScDocument* pRedo, - BOOL bDoInsert ); + sal_Bool bDoInsert ); virtual ~ScUndoUpdateAreaLink(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -840,11 +840,11 @@ private: ScRange aNewRange; ScDocument* pUndoDoc; ScDocument* pRedoDoc; - ULONG nOldRefresh; - ULONG nNewRefresh; - BOOL bWithInsert; + sal_uLong nOldRefresh; + sal_uLong nNewRefresh; + sal_Bool bWithInsert; - void DoChange( const BOOL bUndo ) const; + void DoChange( const sal_Bool bUndo ) const; }; @@ -853,20 +853,20 @@ class ScUndoIndent: public ScBlockUndo public: TYPEINFO(); ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, BOOL bIncrement ); + ScDocument* pNewUndoDoc, sal_Bool bIncrement ); virtual ~ScUndoIndent(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: ScMarkData aMarkData; ScDocument* pUndoDoc; - BOOL bIsIncrement; + sal_Bool bIsIncrement; }; @@ -881,7 +881,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -897,20 +897,20 @@ class ScUndoClearItems: public ScBlockUndo public: TYPEINFO(); ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, const USHORT* pW ); + ScDocument* pNewUndoDoc, const sal_uInt16* pW ); virtual ~ScUndoClearItems(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: ScMarkData aMarkData; ScDocument* pUndoDoc; - USHORT* pWhich; + sal_uInt16* pWhich; }; @@ -925,7 +925,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -947,7 +947,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -970,7 +970,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx index 53f129166d10..965cb3daebae 100644 --- a/sc/source/ui/inc/undocell.hxx +++ b/sc/source/ui/inc/undocell.hxx @@ -49,13 +49,13 @@ public: ScUndoCursorAttr( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat, - const ScPatternAttr* pApplyPat, BOOL bAutomatic ); + const ScPatternAttr* pApplyPat, sal_Bool bAutomatic ); virtual ~ScUndoCursorAttr(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -66,7 +66,7 @@ private: ScPatternAttr* pOldPattern; ScPatternAttr* pNewPattern; ScPatternAttr* pApplyPattern; - BOOL bIsAutomatic; + sal_Bool bIsAutomatic; void DoChange( const ScPatternAttr* pWhichPattern ) const; }; @@ -79,14 +79,14 @@ public: ScUndoEnterData( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, SCTAB nNewCount, SCTAB* pNewTabs, - ScBaseCell** ppOldData, BOOL* pHasForm, ULONG* pOldForm, + ScBaseCell** ppOldData, sal_Bool* pHasForm, sal_uLong* pOldForm, const String& rNewStr, EditTextObject* pObj = NULL ); virtual ~ScUndoEnterData(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -94,10 +94,10 @@ private: String aNewString; SCTAB* pTabs; ScBaseCell** ppOldCells; - BOOL* pHasFormat; - ULONG* pOldFormats; + sal_Bool* pHasFormat; + sal_uLong* pOldFormats; EditTextObject* pNewEditData; - ULONG nEndChangeAction; + sal_uLong nEndChangeAction; SCCOL nCol; SCROW nRow; SCTAB nTab; @@ -114,13 +114,13 @@ public: TYPEINFO(); ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - ScBaseCell* pUndoCell, double nVal, BOOL bHeight ); + ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight ); virtual ~ScUndoEnterValue(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -128,8 +128,8 @@ private: ScAddress aPos; ScBaseCell* pOldCell; double nValue; - ULONG nEndChangeAction; - BOOL bNeedHeight; + sal_uLong nEndChangeAction; + sal_Bool bNeedHeight; void SetChangeTrack(); }; @@ -141,13 +141,13 @@ public: TYPEINFO(); ScUndoPutCell( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight ); + ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight ); virtual ~ScUndoPutCell(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -155,8 +155,8 @@ private: ScAddress aPos; ScBaseCell* pOldCell; ScBaseCell* pEnteredCell; - ULONG nEndChangeAction; - BOOL bNeedHeight; + sal_uLong nEndChangeAction; + sal_Bool bNeedHeight; void SetChangeTrack(); }; @@ -168,13 +168,13 @@ public: TYPEINFO(); ScUndoPageBreak( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, - BOOL bNewColumn, BOOL bNewInsert ); + sal_Bool bNewColumn, sal_Bool bNewInsert ); virtual ~ScUndoPageBreak(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -182,10 +182,10 @@ private: SCCOL nCol; SCROW nRow; SCTAB nTab; - BOOL bColumn; // Spalten- oder Zeilenumbruch - BOOL bInsert; // Einfuegen oder Loeschen + sal_Bool bColumn; // Spalten- oder Zeilenumbruch + sal_Bool bInsert; // Einfuegen oder Loeschen - void DoChange( BOOL bInsert ) const; + void DoChange( sal_Bool bInsert ) const; }; class ScUndoPrintZoom: public ScSimpleUndo @@ -193,24 +193,24 @@ class ScUndoPrintZoom: public ScSimpleUndo public: TYPEINFO(); ScUndoPrintZoom( ScDocShell* pNewDocShell, SCTAB nT, - USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP ); + sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP ); virtual ~ScUndoPrintZoom(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: SCTAB nTab; - USHORT nOldScale; - USHORT nOldPages; - USHORT nNewScale; - USHORT nNewPages; + sal_uInt16 nOldScale; + sal_uInt16 nOldPages; + sal_uInt16 nNewScale; + sal_uInt16 nNewPages; - void DoChange( BOOL bUndo ); + void DoChange( sal_Bool bUndo ); }; class ScUndoThesaurus: public ScSimpleUndo @@ -226,7 +226,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -238,9 +238,9 @@ private: EditTextObject* pUndoTObject; // bei EditZelle String aRedoStr; EditTextObject* pRedoTObject; - ULONG nEndChangeAction; + sal_uLong nEndChangeAction; - void DoChange( BOOL bUndo, const String& rStr, + void DoChange( sal_Bool bUndo, const String& rStr, const EditTextObject* pTObj ); void SetChangeTrack( ScBaseCell* pOldCell ); }; @@ -274,7 +274,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat( SfxRepeatTarget& rTarget ); - virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const; + virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const; virtual String GetComment() const; @@ -302,7 +302,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat( SfxRepeatTarget& rTarget ); - virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const; + virtual sal_Bool CanRepeat( SfxRepeatTarget& rTarget ) const; virtual String GetComment() const; @@ -325,14 +325,14 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: - BOOL bIsDelete; + sal_Bool bIsDelete; ScDetOpList* pOldList; - USHORT nAction; + sal_uInt16 nAction; ScAddress aPos; SdrUndoAction* pDrawUndo; }; @@ -349,7 +349,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -357,7 +357,7 @@ private: ScRangeName* pOldRanges; ScRangeName* pNewRanges; - void DoChange( BOOL bUndo ); + void DoChange( sal_Bool bUndo ); }; diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index a2fcd392e9b4..90e486a505be 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -53,14 +53,14 @@ public: TYPEINFO(); ScUndoDoOutline( ScDocShell* pNewDocShell, SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab, - ScDocument* pNewUndoDoc, BOOL bNewColumns, - USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow ); + ScDocument* pNewUndoDoc, sal_Bool bNewColumns, + sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow ); virtual ~ScUndoDoOutline(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -69,10 +69,10 @@ private: SCCOLROW nEnd; SCTAB nTab; ScDocument* pUndoDoc; - BOOL bColumns; - USHORT nLevel; - USHORT nEntry; - BOOL bShow; + sal_Bool bColumns; + sal_uInt16 nLevel; + sal_uInt16 nEntry; + sal_Bool bShow; }; @@ -84,13 +84,13 @@ public: SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScOutlineTable* pNewUndoTab, - BOOL bNewColumns, BOOL bNewMake ); + sal_Bool bNewColumns, sal_Bool bNewMake ); virtual ~ScUndoMakeOutline(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -98,8 +98,8 @@ private: ScAddress aBlockStart; ScAddress aBlockEnd; ScOutlineTable* pUndoTable; - BOOL bColumns; - BOOL bMake; + sal_Bool bColumns; + sal_Bool bMake; }; @@ -110,13 +110,13 @@ public: ScUndoOutlineLevel( ScDocShell* pNewDocShell, SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab, ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, - BOOL bNewColumns, USHORT nNewLevel ); + sal_Bool bNewColumns, sal_uInt16 nNewLevel ); virtual ~ScUndoOutlineLevel(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -126,8 +126,8 @@ private: SCTAB nTab; ScDocument* pUndoDoc; ScOutlineTable* pUndoTable; - BOOL bColumns; - USHORT nLevel; + sal_Bool bColumns; + sal_uInt16 nLevel; }; @@ -139,13 +139,13 @@ public: SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, - BOOL bNewShow ); + sal_Bool bNewShow ); virtual ~ScUndoOutlineBlock(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -154,7 +154,7 @@ private: ScAddress aBlockEnd; ScDocument* pUndoDoc; ScOutlineTable* pUndoTable; - BOOL bShow; + sal_Bool bShow; }; @@ -171,7 +171,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -196,7 +196,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -222,7 +222,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -244,24 +244,24 @@ public: TYPEINFO(); ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScSortParam& rParam, - BOOL bQuery, ScDocument* pNewUndoDoc, + sal_Bool bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB, const ScRange* pDest = NULL ); virtual ~ScUndoSort(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: SCTAB nTab; ScSortParam aSortParam; - BOOL bRepeatQuery; + sal_Bool bRepeatQuery; ScDocument* pUndoDoc; ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich - BOOL bDestArea; + sal_Bool bDestArea; ScRange aDestRange; }; @@ -273,13 +273,13 @@ public: ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQueryParam& rParam, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB, const ScRange* pOld, - BOOL bSize, const ScRange* pAdvSrc ); + sal_Bool bSize, const ScRange* pAdvSrc ); virtual ~ScUndoQuery(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -291,9 +291,9 @@ private: ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich ScRange aOldDest; ScRange aAdvSource; - BOOL bIsAdvanced; - BOOL bDestArea; - BOOL bDoSize; + sal_Bool bIsAdvanced; + sal_Bool bDestArea; + sal_Bool bDoSize; }; @@ -301,20 +301,20 @@ class ScUndoAutoFilter: public ScDBFuncUndo { private: String aDBName; - BOOL bFilterSet; + sal_Bool bFilterSet; - void DoChange( BOOL bUndo ); + void DoChange( sal_Bool bUndo ); public: TYPEINFO(); ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange, - const String& rName, BOOL bSet ); + const String& rName, sal_Bool bSet ); virtual ~ScUndoAutoFilter(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; }; @@ -331,7 +331,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -355,7 +355,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -369,7 +369,7 @@ private: ScDBData* pUndoDBData; ScDBData* pRedoDBData; SCCOL nFormulaCols; - BOOL bRedoFilled; + sal_Bool bRedoFilled; }; @@ -388,7 +388,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -403,7 +403,7 @@ private: ScDBCollection* pUndoDB; ScRange aOldQuery; ScRange aNewQuery; - BOOL bQuerySize; + sal_Bool bQuerySize; }; //UNUSED2008-05 class ScUndoPivot: public ScSimpleUndo @@ -419,7 +419,7 @@ private: //UNUSED2008-05 virtual void Undo(); //UNUSED2008-05 virtual void Redo(); //UNUSED2008-05 virtual void Repeat(SfxRepeatTarget& rTarget); -//UNUSED2008-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; +//UNUSED2008-05 virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; //UNUSED2008-05 //UNUSED2008-05 virtual String GetComment() const; //UNUSED2008-05 @@ -447,13 +447,13 @@ public: ScUndoDataPilot( ScDocShell* pNewDocShell, ScDocument* pOldDoc, ScDocument* pNewDoc, const ScDPObject* pOldObj, const ScDPObject* pNewObj, - BOOL bMove ); + sal_Bool bMove ); virtual ~ScUndoDataPilot(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -462,7 +462,7 @@ private: ScDocument* pNewUndoDoc; ScDPObject* pOldDPObject; ScDPObject* pNewDPObject; - BOOL bAllowMove; + sal_Bool bAllowMove; }; @@ -472,7 +472,7 @@ public: TYPEINFO(); ScUndoConsolidate( ScDocShell* pNewDocShell, const ScArea& rArea, const ScConsolidateParam& rPar, - ScDocument* pNewUndoDoc, BOOL bReference, + ScDocument* pNewUndoDoc, sal_Bool bReference, SCROW nInsCount, ScOutlineTable* pTab, ScDBData* pData ); virtual ~ScUndoConsolidate(); @@ -480,7 +480,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -488,7 +488,7 @@ private: ScArea aDestArea; ScDocument* pUndoDoc; ScConsolidateParam aParam; - BOOL bInsRef; + sal_Bool bInsRef; SCSIZE nInsertCount; ScOutlineTable* pUndoTab; ScDBData* pUndoData; @@ -501,29 +501,29 @@ public: TYPEINFO(); ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, const ScRange& rNew, - BOOL bColHdr, BOOL bRowHdr, BOOL bAdd ); + sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd ); ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, const ScRangeListRef& rNew, - BOOL bColHdr, BOOL bRowHdr, BOOL bAdd ); + sal_Bool bColHdr, sal_Bool bRowHdr, sal_Bool bAdd ); virtual ~ScUndoChartData(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: String aChartName; ScRangeListRef aOldRangeListRef; - BOOL bOldColHeaders; - BOOL bOldRowHeaders; + sal_Bool bOldColHeaders; + sal_Bool bOldRowHeaders; // ScRange aNewRange; ScRangeListRef aNewRangeListRef; - BOOL bNewColHeaders; - BOOL bNewRowHeaders; - BOOL bAddRange; + sal_Bool bNewColHeaders; + sal_Bool bNewRowHeaders; + sal_Bool bAddRange; void Init(); }; diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx index a2647985af9f..20db8643e3ca 100644 --- a/sc/source/ui/inc/undodraw.hxx +++ b/sc/source/ui/inc/undodraw.hxx @@ -45,16 +45,16 @@ public: SfxUndoAction* GetDrawUndo() { return pDrawUndo; } void ForgetDrawUndo(); - virtual BOOL IsLinked(); - virtual void SetLinked( BOOL bIsLinked ); + virtual sal_Bool IsLinked(); + virtual void SetLinked( sal_Bool bIsLinked ); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; - virtual BOOL Merge( SfxUndoAction *pNextAction ); + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool Merge( SfxUndoAction *pNextAction ); virtual String GetComment() const; virtual String GetRepeatComment(SfxRepeatTarget&) const; - virtual USHORT GetId() const; + virtual sal_uInt16 GetId() const; }; diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx index 527c973b6705..0f986396c89d 100644 --- a/sc/source/ui/inc/undoolk.hxx +++ b/sc/source/ui/inc/undoolk.hxx @@ -37,7 +37,7 @@ SdrUndoAction* GetSdrUndoAction ( ScDocument* pDoc ); void DoSdrUndoAction ( SdrUndoAction* pUndoAction, ScDocument* pDoc ); void RedoSdrUndoAction ( SdrUndoAction* pUndoAction ); void DeleteSdrUndoAction ( SdrUndoAction* pUndoAction ); -void EnableDrawAdjust ( ScDocument* pDoc, BOOL bEnable ); +void EnableDrawAdjust ( ScDocument* pDoc, sal_Bool bEnable ); diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx index 5e7b86449722..b22554f1eeaa 100644 --- a/sc/source/ui/inc/undostyl.hxx +++ b/sc/source/ui/inc/undostyl.hxx @@ -78,7 +78,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; }; @@ -95,7 +95,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx index c8d135070ab1..24e36c0f8d97 100644 --- a/sc/source/ui/inc/undotab.hxx +++ b/sc/source/ui/inc/undotab.hxx @@ -69,23 +69,23 @@ public: ScUndoInsertTab( ScDocShell* pNewDocShell, SCTAB nTabNum, - BOOL bApp, + sal_Bool bApp, const String& rNewName); virtual ~ScUndoInsertTab(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: String sNewName; SdrUndoAction* pDrawUndo; - ULONG nEndChangeAction; + sal_uLong nEndChangeAction; SCTAB nTab; - BOOL bAppend; + sal_Bool bAppend; void SetChangeTrack(); }; @@ -97,14 +97,14 @@ public: ScUndoInsertTables( ScDocShell* pNewDocShell, SCTAB nTabNum, - BOOL bApp, + sal_Bool bApp, SvStrings *pNewNameList); virtual ~ScUndoInsertTables(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -112,10 +112,10 @@ private: SdrUndoAction* pDrawUndo; SvStrings* pNameList; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; SCTAB nTab; - BOOL bAppend; + sal_Bool bAppend; void SetChangeTrack(); }; @@ -135,14 +135,14 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: SvShorts theTabs; - ULONG nStartChangeAction; - ULONG nEndChangeAction; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; void SetChangeTrack(); }; @@ -162,7 +162,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -187,7 +187,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -195,7 +195,7 @@ private: SvShorts theOldTabs; SvShorts theNewTabs; - void DoChange( BOOL bUndo ) const; + void DoChange( sal_Bool bUndo ) const; }; @@ -212,7 +212,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -241,7 +241,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -260,14 +260,14 @@ public: ScDocShell* pNewDocShell, SCTAB nSrc, SCTAB nDest, const String& rN, const String& rC, - const Color& rCol, USHORT nF, + const Color& rCol, sal_uInt16 nF, const ScMarkData& rMark ); virtual ~ScUndoMakeScenario(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -277,7 +277,7 @@ private: String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; ScMarkData aMarkData; SdrUndoAction* pDrawUndo; }; @@ -290,20 +290,20 @@ public: ScUndoImportTab( ScDocShell* pShell, SCTAB nNewTab, SCTAB nNewCount, - BOOL bNewLink ); + sal_Bool bNewLink ); virtual ~ScUndoImportTab(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: SCTAB nTab; SCTAB nCount; - BOOL bLink; + sal_Bool bLink; ScDocument* pRedoDoc; SdrUndoAction* pDrawUndo; @@ -323,7 +323,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -331,13 +331,13 @@ private: String aDocName; String aFltName; String aOptions; - ULONG nRefreshDelay; - USHORT nCount; + sal_uLong nRefreshDelay; + sal_uInt16 nCount; SCTAB* pTabs; - BYTE* pModes; + sal_uInt8* pModes; String* pTabNames; - void DoChange( BOOL bLink ) const; + void DoChange( sal_Bool bLink ) const; }; @@ -347,21 +347,21 @@ public: TYPEINFO(); ScUndoShowHideTab( ScDocShell* pShell, - SCTAB nNewTab, BOOL bNewShow ); + SCTAB nNewTab, sal_Bool bNewShow ); virtual ~ScUndoShowHideTab(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: SCTAB nTab; - BOOL bShow; + sal_Bool bShow; - void DoChange( BOOL bShow ) const; + void DoChange( sal_Bool bShow ) const; }; // ============================================================================ @@ -377,7 +377,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -401,7 +401,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -424,7 +424,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -433,7 +433,7 @@ private: ScPrintRangeSaver* pOldRanges; ScPrintRangeSaver* pNewRanges; - void DoChange( BOOL bUndo ); + void DoChange( sal_Bool bUndo ); }; @@ -446,14 +446,14 @@ public: const String& rON, const String& rNN, const String& rOC, const String& rNC, const Color& rOCol, const Color& rNCol, - USHORT nOF, USHORT nNF ); + sal_uInt16 nOF, sal_uInt16 nNF ); virtual ~ScUndoScenarioFlags(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -465,8 +465,8 @@ private: String aNewComment; Color aOldColor; Color aNewColor; - USHORT nOldFlags; - USHORT nNewFlags; + sal_uInt16 nOldFlags; + sal_uInt16 nNewFlags; }; @@ -483,7 +483,7 @@ public: virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; @@ -500,21 +500,21 @@ class ScUndoLayoutRTL : public ScSimpleUndo { public: TYPEINFO(); - ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL ); + ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL ); virtual ~ScUndoLayoutRTL(); virtual void Undo(); virtual void Redo(); virtual void Repeat(SfxRepeatTarget& rTarget); - virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; + virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; virtual String GetComment() const; private: SCTAB nTab; - BOOL bRTL; + sal_Bool bRTL; - void DoChange( BOOL bNew ); + void DoChange( sal_Bool bNew ); }; @@ -529,7 +529,7 @@ private: //UNUSED2009-05 virtual void Undo(); //UNUSED2009-05 virtual void Redo(); //UNUSED2009-05 virtual void Repeat(SfxRepeatTarget& rTarget); -//UNUSED2009-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const; +//UNUSED2009-05 virtual sal_Bool CanRepeat(SfxRepeatTarget& rTarget) const; //UNUSED2009-05 //UNUSED2009-05 virtual String GetComment() const; //UNUSED2009-05 diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index f7cb9af23b63..ffe44b1e2061 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -119,9 +119,9 @@ public: inline ScTabViewShell * GetTabViewShell(); bool SetupRefDlg(); - bool RemoveRefDlg( BOOL bRestoreModal = TRUE ); + bool RemoveRefDlg( sal_Bool bRestoreModal = sal_True ); - virtual void SetModal( BOOL bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); } + virtual void SetModal( sal_Bool bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); } virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) { @@ -140,7 +140,7 @@ public: DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" ); if ( IsInExecute() ) - EndDialog( FALSE ); + EndDialog( sal_False ); else if ( GetStyle() & WB_CLOSEABLE ) Close(); } @@ -160,7 +160,7 @@ public: (m_pHandler->*m_pRefInputStartPostHdl)( pEdit, pButton ); } - virtual void RefInputDone( BOOL bForced = FALSE ) + virtual void RefInputDone( sal_Bool bForced = sal_False ) { if( !CanInputDone( bForced ) ) return; @@ -175,11 +175,11 @@ public: (m_pHandler->*m_pRefInputDonePostHdl)(); } - BOOL IsChildFocus(); + sal_Bool IsChildFocus(); enum { SLOTID = SID_VALIDITY_REFERENCE }; - BOOL Close(); + sal_Bool Close(); //-->Added by PengYunQuan for Validity Cell Range Picker }; @@ -197,9 +197,9 @@ public: virtual ~ScTPValidationValue(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rArgSet ); - static USHORT* GetRanges(); + static sal_uInt16* GetRanges(); - virtual BOOL FillItemSet( SfxItemSet& rArgSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rArgSet ); virtual void Reset( const SfxItemSet& rArgSet ); private: @@ -262,7 +262,7 @@ private: //TYPEINFO(); void TidyListBoxes(); public: - USHORT GetAllowEntryPos(); + sal_uInt16 GetAllowEntryPos(); String GetMinText(); void SetupRefDlg(); void RemoveRefDlg(); @@ -294,8 +294,8 @@ public: ~ScTPValidationHelp(); static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); }; @@ -327,8 +327,8 @@ public: ~ScTPValidationError(); static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet ); - static USHORT* GetRanges (); - virtual BOOL FillItemSet ( SfxItemSet& rArgSet ); + static sal_uInt16* GetRanges (); + virtual sal_Bool FillItemSet ( SfxItemSet& rArgSet ); virtual void Reset ( const SfxItemSet& rArgSet ); }; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index fb9c674a4488..6df6497dde0d 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -139,7 +139,7 @@ private: SCCOL nPosX[2]; SCROW nPosY[2]; - BOOL bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten + sal_Bool bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten ScViewDataTable(); ~ScViewDataTable(); @@ -208,14 +208,14 @@ private: ScRange aDelRange; // fuer AutoFill-Loeschen ScSplitPos eEditActivePart; // the part that was active when edit mode was started - BOOL bEditActive[4]; // aktiv? - BOOL bActive; // aktives Fenster ? - BOOL bIsRefMode; // Referenzeingabe - BOOL bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL - BYTE nFillMode; // Modus - BOOL bPagebreak; // Seitenumbruch-Vorschaumodus + sal_Bool bEditActive[4]; // aktiv? + sal_Bool bActive; // aktives Fenster ? + sal_Bool bIsRefMode; // Referenzeingabe + sal_Bool bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL + sal_uInt8 nFillMode; // Modus + sal_Bool bPagebreak; // Seitenumbruch-Vorschaumodus - BOOL bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click + sal_Bool bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click SC_DLLPRIVATE DECL_LINK (EmptyEditHdl, EditStatus*); SC_DLLPRIVATE DECL_LINK (EditEngineHdl, EditStatus*); @@ -249,9 +249,9 @@ public: Window* GetDialogParent(); // von tabvwsh weitergeleitet Window* GetActiveWin(); // von View ScDrawView* GetScDrawView(); // von View - BOOL IsMinimized(); // von View + sal_Bool IsMinimized(); // von View - void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE ); + void UpdateInputHandler( sal_Bool bForce = sal_False, sal_Bool bStopEditing = sal_True ); void WriteUserData(String& rData); void ReadUserData(const String& rData); @@ -264,8 +264,8 @@ public: void SetViewShell( ScTabViewShell* pViewSh ); - BOOL IsActive() const { return bActive; } - void Activate(BOOL bActivate) { bActive = bActivate; } + sal_Bool IsActive() const { return bActive; } + void Activate(sal_Bool bActivate) { bActive = bActivate; } void UpdateThis(); @@ -283,7 +283,7 @@ public: SCROW GetPosY( ScVSplitPos eWhich ) const { return pThisTab->nPosY[eWhich]; } SCCOL GetCurX() const { return pThisTab->nCurX; } SCROW GetCurY() const { return pThisTab->nCurY; } - BOOL HasOldCursor() const { return pThisTab->bOldCurValid; } + sal_Bool HasOldCursor() const { return pThisTab->bOldCurValid; } SCCOL GetOldCurX() const; SCROW GetOldCurY() const; ScSplitMode GetHSplitMode() const { return pThisTab->eHSplitMode; } @@ -292,7 +292,7 @@ public: long GetVSplitPos() const { return pThisTab->nVSplitPos; } SCCOL GetFixPosX() const { return pThisTab->nFixPosX; } SCROW GetFixPosY() const { return pThisTab->nFixPosY; } - BOOL IsPagebreakMode() const { return bPagebreak; } + sal_Bool IsPagebreakMode() const { return bPagebreak; } void SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX ); void SetPosY( ScVSplitPos eWhich, SCROW nNewPosY ); @@ -306,15 +306,15 @@ public: void SetVSplitPos( long nPos ) { pThisTab->nVSplitPos = nPos; } void SetFixPosX( SCCOL nPos ) { pThisTab->nFixPosX = nPos; } void SetFixPosY( SCROW nPos ) { pThisTab->nFixPosY = nPos; } - void SetPagebreakMode( BOOL bSet ); + void SetPagebreakMode( sal_Bool bSet ); - void SetZoomType( SvxZoomType eNew, BOOL bAll ); + void SetZoomType( SvxZoomType eNew, sal_Bool bAll ); void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs ); void SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs ); - void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll ); + void SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll ); void RefreshZoom(); - void SetSelCtrlMouseClick( BOOL bTmp ) { bSelCtrlMouseClick = bTmp; } + void SetSelCtrlMouseClick( sal_Bool bTmp ) { bSelCtrlMouseClick = bTmp; } SvxZoomType GetZoomType() const { return pThisTab->eZoomType; } const Fraction& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; } @@ -336,31 +336,31 @@ public: ScMarkType GetSimpleArea( ScRange & rRange, ScMarkData & rNewMark ) const; void GetMultiArea( ScRangeListRef& rRange ) const; - BOOL SimpleColMarked(); - BOOL SimpleRowMarked(); + sal_Bool SimpleColMarked(); + sal_Bool SimpleRowMarked(); - BOOL IsMultiMarked(); + sal_Bool IsMultiMarked(); void SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ); void SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - BYTE nMode ); + sal_uInt8 nMode ); void GetFillData( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ); void ResetFillMode(); - BOOL IsAnyFillMode() { return nFillMode != SC_FILL_NONE; } - BOOL IsFillMode() { return nFillMode == SC_FILL_FILL; } - BYTE GetFillMode() { return nFillMode; } + sal_Bool IsAnyFillMode() { return nFillMode != SC_FILL_NONE; } + sal_Bool IsFillMode() { return nFillMode == SC_FILL_FILL; } + sal_uInt8 GetFillMode() { return nFillMode; } // TRUE: Zelle ist zusammengefasst - BOOL GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ); - BOOL GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, + sal_Bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ); + sal_Bool GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, SCsCOL& rPosX, SCsROW& rPosY, - BOOL bTestMerge = TRUE, BOOL bRepair = FALSE, - BOOL bNextIfLarge = TRUE ); + sal_Bool bTestMerge = sal_True, sal_Bool bRepair = sal_False, + sal_Bool bNextIfLarge = sal_True ); void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich, - SCsCOL nPosX, SCsROW nPosY, BOOL& rLeft, BOOL& rTop ); + SCsCOL nPosX, SCsROW nPosY, sal_Bool& rLeft, sal_Bool& rTop ); - BOOL IsRefMode() const { return bIsRefMode; } + sal_Bool IsRefMode() const { return bIsRefMode; } ScRefType GetRefType() const { return eRefType; } SCCOL GetRefStartX() const { return nRefStartX; } SCROW GetRefStartY() const { return nRefStartY; } @@ -369,7 +369,7 @@ public: SCROW GetRefEndY() const { return nRefEndY; } SCTAB GetRefEndZ() const { return nRefEndZ; } - void SetRefMode( BOOL bNewMode, ScRefType eNewType ) + void SetRefMode( sal_Bool bNewMode, ScRefType eNewType ) { bIsRefMode = bNewMode; eRefType = eNewType; } void SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ ) @@ -377,11 +377,11 @@ public: void SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ ) { nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = nNewZ; } - void ResetDelMark() { bDelMarkValid = FALSE; } + void ResetDelMark() { bDelMarkValid = sal_False; } void SetDelMark( const ScRange& rRange ) - { aDelRange = rRange; bDelMarkValid = TRUE; } + { aDelRange = rRange; bDelMarkValid = sal_True; } - BOOL GetDelMark( ScRange& rRange ) const + sal_Bool GetDelMark( ScRange& rRange ) const { rRange = aDelRange; return bDelMarkValid; } inline void GetMoveCursor( SCCOL& rCurX, SCROW& rCurY ); @@ -389,20 +389,20 @@ public: const ScViewOptions& GetOptions() const { return *pOptions; } void SetOptions( const ScViewOptions& rOpt ); - BOOL IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); } - void SetGridMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); } - BOOL IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); } - void SetSyntaxMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); } - BOOL IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); } - void SetHeaderMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); } - BOOL IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); } - void SetTabMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); } - BOOL IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); } - void SetVScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); } - BOOL IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); } - void SetHScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); } - BOOL IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); } - void SetOutlineMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); } + sal_Bool IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); } + void SetGridMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); } + sal_Bool IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); } + void SetSyntaxMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); } + sal_Bool IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); } + void SetHeaderMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); } + sal_Bool IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); } + void SetTabMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); } + sal_Bool IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); } + void SetVScrollMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); } + sal_Bool IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); } + void SetHScrollMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); } + sal_Bool IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); } + void SetOutlineMode ( sal_Bool bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); } void KillEditView(); void ResetEditView(); @@ -410,13 +410,13 @@ public: ScEditEngineDefaulter* pNewEngine, Window* pWin, SCCOL nNewX, SCROW nNewY ); void GetEditView( ScSplitPos eWhich, EditView*& rViewPtr, SCCOL& rCol, SCROW& rRow ); - BOOL HasEditView( ScSplitPos eWhich ) const + sal_Bool HasEditView( ScSplitPos eWhich ) const { return pEditView[eWhich] && bEditActive[eWhich]; } EditView* GetEditView( ScSplitPos eWhich ) const { return pEditView[eWhich]; } void EditGrowX(); - void EditGrowY( BOOL bInitial = FALSE ); + void EditGrowY( sal_Bool bInitial = sal_False ); ScSplitPos GetEditActivePart() const { return eEditActivePart; } SCCOL GetEditViewCol() const { return nEditCol; } @@ -427,18 +427,18 @@ public: SCROW GetEditEndRow() const { return nEditEndRow; } Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, Window* pWin, - const ScPatternAttr* pPattern, BOOL bForceToTop ); + const ScPatternAttr* pPattern, sal_Bool bForceToTop ); void SetTabNo( SCTAB nNewTab ); void SetActivePart( ScSplitPos eNewActive ); Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, - BOOL bAllowNeg = FALSE ) const; + sal_Bool bAllowNeg = sal_False ) const; Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const; Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const; - SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeY = SC_SIZE_NONE ) const; - SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeX = SC_SIZE_NONE ) const; + SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY = SC_SIZE_NONE ) const; + SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX = SC_SIZE_NONE ) const; SCCOL VisibleCellsX( ScHSplitPos eWhichX ) const; // angezeigte komplette Zellen SCROW VisibleCellsY( ScVSplitPos eWhichY ) const; @@ -447,7 +447,7 @@ public: //UNUSED2008-05 SCCOL LastCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der letzten Seite //UNUSED2008-05 SCROW LastCellsY( ScVSplitPos eWhichY ) const; - BOOL IsOle(); + sal_Bool IsOle(); //UNUSED2008-05 void UpdateOle( ScSplitPos eWhich ); void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void SetScreen( const Rectangle& rVisArea ); @@ -468,8 +468,8 @@ public: Point GetMousePosPixel(); - BOOL UpdateFixX(SCTAB nTab = MAXTAB+1); - BOOL UpdateFixY(SCTAB nTab = MAXTAB+1); + sal_Bool UpdateFixX(SCTAB nTab = MAXTAB+1); + sal_Bool UpdateFixY(SCTAB nTab = MAXTAB+1); SCCOL GetTabStartCol() const { return nTabStartCol; } void SetTabStartCol(SCCOL nNew) { nTabStartCol = nNew; } @@ -479,9 +479,9 @@ public: const Size& GetScenButSize() const { return aScenButSize; } void SetScenButSize(const Size& rNew) { aScenButSize = rNew; } - BOOL IsSelCtrlMouseClick() { return bSelCtrlMouseClick; } + sal_Bool IsSelCtrlMouseClick() { return bSelCtrlMouseClick; } - static inline long ToPixel( USHORT nTwips, double nFactor ); + static inline long ToPixel( sal_uInt16 nTwips, double nFactor ); /** while (rScrY <= nEndPixels && rPosY <= nEndRow) add pixels of row heights converted with nPPTY to rScrY, optimized for row height @@ -505,7 +505,7 @@ public: // --------------------------------------------------------------------------- -inline long ScViewData::ToPixel( USHORT nTwips, double nFactor ) +inline long ScViewData::ToPixel( sal_uInt16 nTwips, double nFactor ) { long nRet = (long)( nTwips * nFactor ); if ( !nRet && nTwips ) diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 59da2966cc60..4e6aa7bb0b74 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -79,7 +79,7 @@ class ScViewFunc : public ScTabView private: ScAddress aFormatSource; // fuer automatisches Erweitern von Formatierung ScRange aFormatArea; - BOOL bFormatValid; + sal_Bool bFormatValid; public: ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ); @@ -90,190 +90,190 @@ public: void GetSelectionFrame ( SvxBoxItem& rLineOuter, SvxBoxInfoItem& rLineInner ); - BYTE GetSelectionScriptType(); + sal_uInt8 GetSelectionScriptType(); - BOOL GetAutoSumArea(ScRangeList& rRangeList); + sal_Bool GetAutoSumArea(ScRangeList& rRangeList); void EnterAutoSum(const ScRangeList& rRangeList, sal_Bool bSubTotal); bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue ); String GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal ); void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, - BOOL bRecord = TRUE, const EditTextObject* pData = NULL ); + sal_Bool bRecord = sal_True, const EditTextObject* pData = NULL ); void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue ); void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData, - BOOL bRecord = TRUE, BOOL bTestSimple = FALSE ); + sal_Bool bRecord = sal_True, sal_Bool bTestSimple = sal_False ); void EnterMatrix( const String& rString ); void EnterBlock( const String& rString, const EditTextObject* pData ); void EnterDataAtCursor( const String& rString ); //! nicht benutzt ? - SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, BOOL bIncludeObjects = FALSE ); - SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc = NULL, BOOL bCut = FALSE, BOOL bApi = FALSE, - BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE ); + SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, sal_Bool bIncludeObjects = sal_False ); + SC_DLLPUBLIC sal_Bool CopyToClip( ScDocument* pClipDoc = NULL, sal_Bool bCut = sal_False, sal_Bool bApi = sal_False, + sal_Bool bIncludeObjects = sal_False, sal_Bool bStopEdit = sal_True ); ScTransferObj* CopyToTransferable(); - SC_DLLPUBLIC BOOL PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, - USHORT nFunction = PASTE_NOFUNC, BOOL bSkipEmpty = FALSE, - BOOL bTranspose = FALSE, BOOL bAsLink = FALSE, + SC_DLLPUBLIC sal_Bool PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, + sal_uInt16 nFunction = PASTE_NOFUNC, sal_Bool bSkipEmpty = sal_False, + sal_Bool bTranspose = sal_False, sal_Bool bAsLink = sal_False, InsCellCmd eMoveMode = INS_NONE, - USHORT nUndoExtraFlags = IDF_NONE, - BOOL bAllowDialogs = FALSE ); + sal_uInt16 nUndoExtraFlags = IDF_NONE, + sal_Bool bAllowDialogs = sal_False ); - void FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink ); + void FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink ); SC_DLLPUBLIC void PasteFromSystem(); - SC_DLLPUBLIC BOOL PasteFromSystem( ULONG nFormatId, BOOL bApi = FALSE ); + SC_DLLPUBLIC sal_Bool PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi = sal_False ); void PasteFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); void PasteDraw(); void PasteDraw( const Point& rLogicPos, SdrModel* pModel, - BOOL bGroup = FALSE, BOOL bSameDocClipboard = FALSE ); + sal_Bool bGroup = sal_False, sal_Bool bSameDocClipboard = sal_False ); - BOOL PasteOnDrawObject( const ::com::sun::star::uno::Reference< + sal_Bool PasteOnDrawObject( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, - SdrObject* pHitObj, BOOL bLink ); + SdrObject* pHitObj, sal_Bool bLink ); - BOOL PasteDataFormat( ULONG nFormatId, + sal_Bool PasteDataFormat( sal_uLong nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL, - BOOL bLink = FALSE, BOOL bAllowDialogs = FALSE ); + sal_Bool bLink = sal_False, sal_Bool bAllowDialogs = sal_False ); - BOOL PasteFile( const Point&, const String&, BOOL bLink=FALSE ); - BOOL PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT ); - BOOL PasteBitmap( const Point&, const Bitmap& ); - BOOL PasteMetaFile( const Point&, const GDIMetaFile& ); - BOOL PasteGraphic( const Point& rPos, const Graphic& rGraphic, + sal_Bool PasteFile( const Point&, const String&, sal_Bool bLink=sal_False ); + sal_Bool PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT ); + sal_Bool PasteBitmap( const Point&, const Bitmap& ); + sal_Bool PasteMetaFile( const Point&, const GDIMetaFile& ); + sal_Bool PasteGraphic( const Point& rPos, const Graphic& rGraphic, const String& rFile, const String& rFilter ); - BOOL PasteBookmark( ULONG nFormatId, + sal_Bool PasteBookmark( sal_uLong nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY ); - BOOL PasteDDE( const ::com::sun::star::uno::Reference< + sal_Bool PasteDDE( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); - BOOL ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic ); + sal_Bool ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic ); void InsertBookmark( const String& rDescription, const String& rURL, SCCOL nPosX, SCROW nPosY, const String* pTarget = NULL, - BOOL bTryReplace = FALSE ); - BOOL HasBookmarkAtCursor( SvxHyperlinkItem* pContent ); + sal_Bool bTryReplace = sal_False ); + sal_Bool HasBookmarkAtCursor( SvxHyperlinkItem* pContent ); long DropRequestHdl( Exchange* pExchange ); - BOOL MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, - BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi ); + sal_Bool MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, + sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ); - BOOL LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi ); + sal_Bool LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi ); - void CreateNames( USHORT nFlags ); - USHORT GetCreateNameFlags(); + void CreateNames( sal_uInt16 nFlags ); + sal_uInt16 GetCreateNameFlags(); void InsertNameList(); - BOOL InsertName( const String& rName, const String& rSymbol, + sal_Bool InsertName( const String& rName, const String& rSymbol, const String& rType ); void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet, - BOOL bRecord = TRUE ); + sal_Bool bRecord = sal_True ); void ApplyAttr( const SfxPoolItem& rAttrItem ); void ApplySelectionPattern( const ScPatternAttr& rAttr, - BOOL bRecord = TRUE, - BOOL bCursorOnly = FALSE ); + sal_Bool bRecord = sal_True, + sal_Bool bCursorOnly = sal_False ); void ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter, - const SvxBoxInfoItem* pNewInner, BOOL bRecord = TRUE ); + const SvxBoxInfoItem* pNewInner, sal_Bool bRecord = sal_True ); void ApplyUserItemSet( const SfxItemSet& rItemSet ); const SfxStyleSheet* GetStyleSheetFromMarked(); void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, - BOOL bRecord = TRUE ); + sal_Bool bRecord = sal_True ); void RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet ); void UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet ); - void SetNumberFormat( short nFormatType, ULONG nAdd = 0 ); + void SetNumberFormat( short nFormatType, sal_uLong nAdd = 0 ); void SetNumFmtByStr( const String& rCode ); - void ChangeNumFmtDecimals( BOOL bIncrement ); + void ChangeNumFmtDecimals( sal_Bool bIncrement ); void SetConditionalFormat( const ScConditionalFormat& rNew ); void SetValidation( const ScValidationData& rNew ); - void ChangeIndent( BOOL bIncrement ); + void ChangeIndent( sal_Bool bIncrement ); void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ); void Protect( SCTAB nTab, const String& rPassword ); - BOOL Unprotect( SCTAB nTab, const String& rPassword ); + sal_Bool Unprotect( SCTAB nTab, const String& rPassword ); - void DeleteCells( DelCellCmd eCmd, BOOL bRecord = TRUE ); - BOOL InsertCells( InsCellCmd eCmd, BOOL bRecord = TRUE, BOOL bPartOfPaste = FALSE ); - void DeleteMulti( BOOL bRows, BOOL bRecord = TRUE ); + void DeleteCells( DelCellCmd eCmd, sal_Bool bRecord = sal_True ); + sal_Bool InsertCells( InsCellCmd eCmd, sal_Bool bRecord = sal_True, sal_Bool bPartOfPaste = sal_False ); + void DeleteMulti( sal_Bool bRows, sal_Bool bRecord = sal_True ); - void DeleteContents( USHORT nFlags, BOOL bRecord = TRUE ); + void DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord = sal_True ); - void SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, - ScSizeMode eMode, USHORT nSizeTwips, - BOOL bRecord = TRUE, BOOL bPaint = TRUE, + void SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, + ScSizeMode eMode, sal_uInt16 nSizeTwips, + sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL ); - void SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips, - BOOL bRecord = TRUE, BOOL bPaint = TRUE ); - void ShowMarkedColumns( BOOL bShow, BOOL bRecord = TRUE ); - void ShowMarkedRows( BOOL bShow, BOOL bRecord = TRUE ); + void SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, + sal_Bool bRecord = sal_True, sal_Bool bPaint = sal_True ); + void ShowMarkedColumns( sal_Bool bShow, sal_Bool bRecord = sal_True ); + void ShowMarkedRows( sal_Bool bShow, sal_Bool bRecord = sal_True ); - BOOL AdjustBlockHeight( BOOL bPaint = TRUE, ScMarkData* pMarkData = NULL ); - BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint = TRUE ); + sal_Bool AdjustBlockHeight( sal_Bool bPaint = sal_True, ScMarkData* pMarkData = NULL ); + sal_Bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint = sal_True ); - void ModifyCellSize( ScDirection eDir, BOOL bOptimal ); + void ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ); - SC_DLLPUBLIC void InsertPageBreak( BOOL bColumn, BOOL bRecord = TRUE, + SC_DLLPUBLIC void InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True, const ScAddress* pPos = NULL, - BOOL bSetModified = TRUE ); - SC_DLLPUBLIC void DeletePageBreak( BOOL bColumn, BOOL bRecord = TRUE, + sal_Bool bSetModified = sal_True ); + SC_DLLPUBLIC void DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord = sal_True, const ScAddress* pPos = NULL, - BOOL bSetModified = TRUE ); + sal_Bool bSetModified = sal_True ); void RemoveManualBreaks(); - void SetPrintZoom(USHORT nScale, USHORT nPages); + void SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages); void AdjustPrintZoom(); - BOOL TestMergeCells(); - BOOL TestRemoveMerge(); + sal_Bool TestMergeCells(); + sal_Bool TestRemoveMerge(); - BOOL MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord = TRUE ); - BOOL RemoveMerge( BOOL bRecord = TRUE ); + sal_Bool MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord = sal_True ); + sal_Bool RemoveMerge( sal_Bool bRecord = sal_True ); - void FillSimple( FillDir eDir, BOOL bRecord = TRUE ); + void FillSimple( FillDir eDir, sal_Bool bRecord = sal_True ); void FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, - double fStart, double fStep, double fMax, BOOL bRecord = TRUE ); + double fStart, double fStep, double fMax, sal_Bool bRecord = sal_True ); void FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord = TRUE ); + SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord = sal_True ); void FillCrossDblClick(); void TransliterateText( sal_Int32 nType ); ScAutoFormatData* CreateAutoFormatData(); - void AutoFormat( USHORT nFormatNo, BOOL bRecord = TRUE ); + void AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord = sal_True ); void SearchAndReplace( const SvxSearchItem* pSearchItem, - BOOL bAddUndo, BOOL bIsApi ); + sal_Bool bAddUndo, sal_Bool bIsApi ); void Solve( const ScSolveParam& rParam ); - void TabOp( const ScTabOpParam& rParam, BOOL bRecord = TRUE ); + void TabOp( const ScTabOpParam& rParam, sal_Bool bRecord = sal_True ); - BOOL InsertTable( const String& rName, SCTAB nTabNr, BOOL bRecord = TRUE ); - BOOL InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, BOOL bRecord = TRUE); + sal_Bool InsertTable( const String& rName, SCTAB nTabNr, sal_Bool bRecord = sal_True ); + sal_Bool InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, sal_Bool bRecord = sal_True); - BOOL AppendTable( const String& rName, BOOL bRecord = TRUE ); + sal_Bool AppendTable( const String& rName, sal_Bool bRecord = sal_True ); - BOOL DeleteTable( SCTAB nTabNr, BOOL bRecord = TRUE ); - BOOL DeleteTables(const SvShorts &TheTabs, BOOL bRecord = TRUE ); + sal_Bool DeleteTable( SCTAB nTabNr, sal_Bool bRecord = sal_True ); + sal_Bool DeleteTables(const SvShorts &TheTabs, sal_Bool bRecord = sal_True ); - BOOL RenameTable( const String& rName, SCTAB nTabNr ); - void MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ); + sal_Bool RenameTable( const String& rName, SCTAB nTabNr ); + void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy ); void ImportTables( ScDocShell* pSrcShell, SCTAB nCount, const SCTAB* pSrcTabs, - BOOL bLink,SCTAB nTab); + sal_Bool bLink,SCTAB nTab); bool SetTabBgColor( const Color& rColor, SCTAB nTabNr ); bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList ); @@ -283,13 +283,13 @@ public: const String& rTabName ); void InsertAreaLink( const String& rFile, const String& rFilter, const String& rOptions, - const String& rSource, ULONG nRefresh ); + const String& rSource, sal_uLong nRefresh ); void ShowTable( const String& rName ); void HideTable( SCTAB nTabNr ); void MakeScenario( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ); + const Color& rColor, sal_uInt16 nFlags ); void ExtendScenario(); void UseScenario( const String& rName ); @@ -301,24 +301,24 @@ public: void InsertDraw(); void SetSelectionFrameLines( const SvxBorderLine* pLine, - BOOL bColorOnly ); + sal_Bool bColorOnly ); void SetNoteText( const ScAddress& rPos, const String& rNoteText ); void ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate ); - void DoRefConversion( BOOL bRecord = TRUE ); + void DoRefConversion( sal_Bool bRecord = sal_True ); -//UNUSED2008-05 void DoSpellingChecker( BOOL bRecord = TRUE ); - void DoHangulHanjaConversion( BOOL bRecord = TRUE ); - void DoThesaurus( BOOL bRecord = TRUE ); +//UNUSED2008-05 void DoSpellingChecker( sal_Bool bRecord = sal_True ); + void DoHangulHanjaConversion( sal_Bool bRecord = sal_True ); + void DoThesaurus( sal_Bool bRecord = sal_True ); //UNUSED2008-05 DECL_LINK( SpellError, void * ); /** Generic implementation of sheet conversion functions. */ - void DoSheetConversion( const ScConversionParam& rParam, BOOL bRecord = TRUE ); + void DoSheetConversion( const ScConversionParam& rParam, sal_Bool bRecord = sal_True ); - void SetPrintRanges( BOOL bEntireSheet, + void SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint, const String* pRepCol, const String* pRepRow, - BOOL bAddPrint ); + sal_Bool bAddPrint ); void DetectiveAddPred(); void DetectiveDelPred(); @@ -333,17 +333,17 @@ public: inline void HideNote() { ShowNote( false ); } void EditNote(); - void ForgetFormatArea() { bFormatValid = FALSE; } - BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL ); + void ForgetFormatArea() { bFormatValid = sal_False; } + sal_Bool SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix = NULL ); // interne Hilfsfunktionen protected: void UpdateLineAttrs( SvxBorderLine& rLine, const SvxBorderLine* pDestLine, const SvxBorderLine* pSrcLine, - BOOL bColor ); + sal_Bool bColor ); -//UNUSED2008-05 void PaintWidthHeight( BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd ); +//UNUSED2008-05 void PaintWidthHeight( sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd ); private: @@ -355,12 +355,12 @@ private: InsCellCmd eMoveMode, sal_uInt16 nCondFlags, sal_uInt16 nUndoFlags ); void PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& rMark); - USHORT GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula ); + sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula ); void StartFormatArea(); - BOOL TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged ); + sal_Bool TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged ); void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, - BOOL bAttrChanged, BOOL bAddUndo ); + sal_Bool bAttrChanged, sal_Bool bAddUndo ); }; diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index eb1c6df2f902..503b86976d39 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -52,21 +52,21 @@ enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS }; class ScViewUtil // static Methoden { public: - static BOOL ExecuteCharMap( const SvxFontItem& rOldFont, + static sal_Bool ExecuteCharMap( const SvxFontItem& rOldFont, SfxViewFrame& rFrame, SvxFontItem& rNewFont, String& rString ); - static BOOL IsActionShown( const ScChangeAction& rAction, + static sal_Bool IsActionShown( const ScChangeAction& rAction, const ScChangeViewSettings& rSettings, ScDocument& rDocument ); static void PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet, - USHORT nWhichId, USHORT nScript ); + sal_uInt16 nWhichId, sal_uInt16 nScript ); - static USHORT GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ); + static sal_uInt16 GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ); - static sal_Int32 GetTransliterationType( USHORT nSlotID ); + static sal_Int32 GetTransliterationType( sal_uInt16 nSlotID ); static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc ); /** Fit a range to cover nRows number of unfiltered rows. @@ -74,7 +74,7 @@ public: static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows ); static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ); - static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId ); + static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId ); /** Returns true, if the passed view shell is in full screen mode. */ static bool IsFullScreen( SfxViewShell& rViewShell ); @@ -102,9 +102,9 @@ private: public: ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ); - BOOL GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); + sal_Bool GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); #ifdef OLD_SELECTION_PAINT - BOOL GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont ); + sal_Bool GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, sal_Bool& rCont ); void GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ); #endif }; diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index d2cc5a7390cf..1f95a3db251d 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -68,7 +68,7 @@ #define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute(); -inline void EnableDisable( Window& rWin, BOOL bEnable ) +inline void EnableDisable( Window& rWin, sal_Bool bEnable ) { if (bEnable) rWin.Enable(); @@ -90,9 +90,9 @@ ScRedlinData::ScRedlinData() nInfo=RD_SPECIAL_NONE; nActionNo=0; pData=NULL; - bDisabled=FALSE; - bIsRejectable=FALSE; - bIsAcceptable=FALSE; + bDisabled=sal_False; + bIsRejectable=sal_False; + bIsAcceptable=sal_False; nTable=SCTAB_MAX; nCol=SCCOL_MAX; nRow=SCROW_MAX; @@ -103,9 +103,9 @@ ScRedlinData::~ScRedlinData() nInfo=RD_SPECIAL_NONE; nActionNo=0; pData=NULL; - bDisabled=FALSE; - bIsRejectable=FALSE; - bIsAcceptable=FALSE; + bDisabled=sal_False; + bIsRejectable=sal_False; + bIsAcceptable=sal_False; } @@ -141,16 +141,16 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP aStrEmpty ( ScResId( STR_EMPTY )) { FreeResource(); -// bScAcceptChgDlgIsDead=FALSE; - bNoSelection=FALSE; - bNeedsUpdate=FALSE; - bIgnoreMsg=FALSE; +// bScAcceptChgDlgIsDead=sal_False; + bNoSelection=sal_False; + bNeedsUpdate=sal_False; + bIgnoreMsg=sal_False; nAcceptCount=0; nRejectCount=0; - bAcceptEnableFlag=TRUE; - bRejectEnableFlag=TRUE; - bHasFilterEntry=FALSE; - bUseColor=FALSE; + bAcceptEnableFlag=sal_True; + bRejectEnableFlag=sal_True; + bHasFilterEntry=sal_False; + bUseColor=sal_False; aReOpenTimer.SetTimeout(50); aReOpenTimer.SetTimeoutHdl(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl )); @@ -172,7 +172,7 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP pTPFilter->SetReadyHdl(LINK( this, ScAcceptChgDlg, FilterHandle )); pTPFilter->SetRefHdl(LINK( this, ScAcceptChgDlg, RefHandle )); pTPFilter->SetModifyHdl(LINK( this, ScAcceptChgDlg, FilterModified)); - pTPFilter->HideRange(FALSE); + pTPFilter->HideRange(sal_False); pTPView->InsertCalcHeader(); pTPView->SetRejectClickHdl( LINK( this, ScAcceptChgDlg,RejectHandle)); pTPView->SetAcceptClickHdl( LINK(this, ScAcceptChgDlg, AcceptHandle)); @@ -201,7 +201,7 @@ ScAcceptChgDlg::ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP } ScAcceptChgDlg::~ScAcceptChgDlg() { -// bScAcceptChgDlgIsDead=TRUE; +// bScAcceptChgDlgIsDead=sal_True; ClearView(); ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -224,13 +224,13 @@ void ScAcceptChgDlg::ReInit(ScViewData* ptrViewData) pDoc=NULL; } - bNoSelection=FALSE; - bNeedsUpdate=FALSE; - bIgnoreMsg=FALSE; + bNoSelection=sal_False; + bNeedsUpdate=sal_False; + bIgnoreMsg=sal_False; nAcceptCount=0; nRejectCount=0; - bAcceptEnableFlag=TRUE; - bRejectEnableFlag=TRUE; + bAcceptEnableFlag=sal_True; + bRejectEnableFlag=sal_True; // #91781# don't call Init here (switching between views), just set link below // (dialog is just hidden, not deleted anymore, when switching views) @@ -260,7 +260,7 @@ void __EXPORT ScAcceptChgDlg::Init() aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser()); pTPFilter->ClearAuthors(); ScStrCollection aUserColl=pChanges->GetUserCollection(); - for(USHORT i=0;iInsertAuthor(aUserColl[i]->GetString()); } @@ -275,7 +275,7 @@ void __EXPORT ScAcceptChgDlg::Init() pTPFilter->SetFirstTime(aChangeViewSet.GetTheFirstDateTime()); pTPFilter->SetLastDate(aChangeViewSet.GetTheLastDateTime()); pTPFilter->SetLastTime(aChangeViewSet.GetTheLastDateTime()); - pTPFilter->SetDateMode((USHORT)aChangeViewSet.GetTheDateMode()); + pTPFilter->SetDateMode((sal_uInt16)aChangeViewSet.GetTheDateMode()); pTPFilter->CheckComment(aChangeViewSet.HasComment()); pTPFilter->SetComment(aChangeViewSet.GetTheComment()); @@ -318,10 +318,10 @@ void ScAcceptChgDlg::ClearView() { nAcceptCount=0; nRejectCount=0; - pTheView->SetUpdateMode(FALSE); + pTheView->SetUpdateMode(sal_False); pTheView->Clear(); - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); } String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType) @@ -355,11 +355,11 @@ String* ScAcceptChgDlg::MakeTypeString(ScChangeActionType eType) } -BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) +sal_Bool ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) { - if(pScChangeAction==NULL) return FALSE; + if(pScChangeAction==NULL) return sal_False; - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -376,7 +376,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) { if(!pScChangeAction->IsDialogParent()) { - pScChangeAction->GetDescription( aDesc, pDoc, TRUE); + pScChangeAction->GetDescription( aDesc, pDoc, sal_True); } } else @@ -405,12 +405,12 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) if(pRangeEntry!=NULL) { - bFlag=TRUE; + bFlag=sal_True; } } else { - bFlag=TRUE; + bFlag=sal_True; } } @@ -419,7 +419,7 @@ BOOL ScAcceptChgDlg::IsValidAction(const ScChangeAction* pScChangeAction) SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeAction, ScChangeActionState /* eState */, SvLBoxEntry* pParent, - BOOL bDelMaster,BOOL bDisabled,ULONG nPos) + sal_Bool bDelMaster,sal_Bool bDisabled,sal_uLong nPos) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); @@ -427,7 +427,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA SvLBoxEntry* pEntry=NULL; - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -455,13 +455,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA { aString=aStrContentWithChild; pNewData->nInfo=RD_SPECIAL_VISCONTENT; - pNewData->bIsRejectable=FALSE; - pNewData->bIsAcceptable=FALSE; + pNewData->bIsRejectable=sal_False; + pNewData->bIsAcceptable=sal_False; } else { aString=*MakeTypeString(eType); - pScChangeAction->GetDescription( aDesc, pDoc, TRUE); + pScChangeAction->GetDescription( aDesc, pDoc, sal_True); } } else @@ -470,9 +470,9 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA if(bDelMaster) { - pScChangeAction->GetDescription( aDesc, pDoc,TRUE); - pNewData->bDisabled=TRUE; - pNewData->bIsRejectable=FALSE; + pScChangeAction->GetDescription( aDesc, pDoc,sal_True); + pNewData->bDisabled=sal_True; + pNewData->bIsRejectable=sal_False; } else pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete()); @@ -480,11 +480,11 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA } aString+='\t'; - pScChangeAction->GetRefString(aRefStr, pDoc, TRUE); + pScChangeAction->GetRefString(aRefStr, pDoc, sal_True); aString+=aRefStr; aString+='\t'; - BOOL bIsGenerated; + sal_Bool bIsGenerated; if(!pChanges->IsGenerated(pScChangeAction->GetActionNumber())) { @@ -495,13 +495,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA aString+=' '; aString+=ScGlobal::pLocaleData->getTime(aDateTime); aString+='\t'; - bIsGenerated=FALSE; + bIsGenerated=sal_False; } else { aString+='\t'; aString+='\t'; - bIsGenerated=TRUE; + bIsGenerated=sal_True; } String aComment=pScChangeAction->GetComment(); @@ -531,14 +531,14 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA //SC_CAS_VIRGIN,SC_CAS_ACCEPTED,SC_CAS_REJECTED if(pRangeEntry!=NULL) { - bHasFilterEntry=TRUE; - bFlag=TRUE; + bHasFilterEntry=sal_True; + bFlag=sal_True; } } else if(!bIsGenerated) { - bHasFilterEntry=TRUE; - bFlag=TRUE; + bHasFilterEntry=sal_True; + bFlag=sal_True; } } } @@ -570,18 +570,18 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeAction(const ScChangeAction* pScChangeA SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChangeAction, ScChangeActionState eState,SvLBoxEntry* pParent, - BOOL bDelMaster,BOOL bDisabled,ULONG nPos) + sal_Bool bDelMaster,sal_Bool bDisabled,sal_uLong nPos) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pScChangeAction==NULL || pChanges==NULL) return NULL; - BOOL bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber()); + sal_Bool bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber()); SvLBoxEntry* pEntry=NULL; - int bFlag=FALSE; + int bFlag=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -602,12 +602,12 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang if(pRangeEntry!=NULL && pScChangeAction->GetState()==eState) { - bFlag=TRUE; + bFlag=sal_True; } } else if(pScChangeAction->GetState()==eState && !bIsGenerated) { - bFlag=TRUE; + bFlag=sal_True; } } @@ -637,13 +637,13 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang { aString=aStrContentWithChild; pNewData->nInfo=RD_SPECIAL_VISCONTENT; - pNewData->bIsRejectable=FALSE; - pNewData->bIsAcceptable=FALSE; + pNewData->bIsRejectable=sal_False; + pNewData->bIsAcceptable=sal_False; } else { aString=*MakeTypeString(eType); - pScChangeAction->GetDescription( aDesc, pDoc, TRUE); + pScChangeAction->GetDescription( aDesc, pDoc, sal_True); } } else @@ -652,9 +652,9 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang if(bDelMaster) { - pScChangeAction->GetDescription( aDesc, pDoc,TRUE); - pNewData->bDisabled=TRUE; - pNewData->bIsRejectable=FALSE; + pScChangeAction->GetDescription( aDesc, pDoc,sal_True); + pNewData->bDisabled=sal_True; + pNewData->bIsRejectable=sal_False; } else pScChangeAction->GetDescription( aDesc, pDoc,!pScChangeAction->IsMasterDelete()); @@ -662,7 +662,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang } aString+='\t'; - pScChangeAction->GetRefString(aRefStr, pDoc, TRUE); + pScChangeAction->GetRefString(aRefStr, pDoc, sal_True); aString+=aRefStr; aString+='\t'; @@ -701,16 +701,16 @@ SvLBoxEntry* ScAcceptChgDlg::InsertFilteredAction(const ScChangeAction* pScChang } SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionContent* pScChangeAction, - SvLBoxEntry* pParent, ULONG nSpecial) + SvLBoxEntry* pParent, sal_uLong nSpecial) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); SvLBoxEntry* pEntry=NULL; if(pScChangeAction==NULL || pChanges==NULL) return NULL; - BOOL bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber()); + sal_Bool bIsGenerated=pChanges->IsGenerated(pScChangeAction->GetActionNumber()); - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; ScRange aRef=pScChangeAction->GetBigRange().MakeRange(); String aUser=pScChangeAction->GetUser(); @@ -730,11 +730,11 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte //SC_CAS_VIRGIN,SC_CAS_ACCEPTED,SC_CAS_REJECTED if(pRangeEntry!=NULL) { - bFlag=TRUE; + bFlag=sal_True; } } else if(!bIsGenerated) - bFlag=TRUE; + bFlag=sal_True; } String aRefStr; @@ -775,7 +775,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte aDesc+=a2String; aString+='\t'; - pScChangeAction->GetRefString(aRefStr, pDoc, TRUE); + pScChangeAction->GetRefString(aRefStr, pDoc, sal_True); aString+=aRefStr; aString+='\t'; @@ -811,7 +811,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte pNewData->pData=(void *)pScChangeAction; pNewData->nActionNo=pScChangeAction->GetActionNumber(); pNewData->bIsAcceptable=pScChangeAction->IsClickable(); - pNewData->bIsRejectable=FALSE; + pNewData->bIsRejectable=sal_False; pNewData->bDisabled=!pNewData->bIsAcceptable; pNewData->aDateTime=aDateTime; pNewData->nRow = aRef.aStart.Row(); @@ -820,7 +820,7 @@ SvLBoxEntry* ScAcceptChgDlg::InsertChangeActionContent(const ScChangeActionConte if(pTheView->IsValidComment(&aComment) && bFlag) { - bHasFilterEntry=TRUE; + bHasFilterEntry=sal_True; pEntry=pTheView->InsertEntry(aString,pNewData,pParent); } else @@ -834,7 +834,7 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt ) { ClearView(); UpdateView(); - bNoSelection=FALSE; + bNoSelection=sal_False; } return SfxModelessDialog::PreNotify(rNEvt); @@ -843,16 +843,16 @@ long ScAcceptChgDlg::PreNotify( NotifyEvent& rNEvt ) void ScAcceptChgDlg::UpdateView() { - bNeedsUpdate=FALSE; + bNeedsUpdate=sal_False; DateTime aDateTime; SvLBoxEntry* pParent=NULL; ScChangeTrack* pChanges=NULL; const ScChangeAction* pScChangeAction=NULL; - bAcceptEnableFlag=TRUE; - bRejectEnableFlag=TRUE; + bAcceptEnableFlag=sal_True; + bRejectEnableFlag=sal_True; SetPointer(Pointer(POINTER_WAIT)); - pTheView->SetUpdateMode(FALSE); - BOOL bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()|| + pTheView->SetUpdateMode(sal_False); + sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()|| pTPFilter->IsAuthor()||pTPFilter->IsComment(); bUseColor=bFilterFlag; @@ -866,11 +866,11 @@ void ScAcceptChgDlg::UpdateView() } } ScChangeActionTable ActionTable; - BOOL bTheFlag=FALSE; + sal_Bool bTheFlag=sal_False; while(pScChangeAction!=NULL) { - bHasFilterEntry=FALSE; + bHasFilterEntry=sal_False; switch(pScChangeAction->GetState()) { case SC_CAS_VIRGIN: @@ -885,7 +885,7 @@ void ScAcceptChgDlg::UpdateView() else pParent=NULL; - bTheFlag=TRUE; + bTheFlag=sal_True; break; case SC_CAS_ACCEPTED: @@ -903,12 +903,12 @@ void ScAcceptChgDlg::UpdateView() { if(!bFilterFlag) { - pParent->EnableChildsOnDemand(TRUE); + pParent->EnableChildsOnDemand(sal_True); } else { - BOOL bTestFlag=bHasFilterEntry; - bHasFilterEntry=FALSE; + sal_Bool bTestFlag=bHasFilterEntry; + bHasFilterEntry=sal_False; if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag) pTheView->RemoveEntry(pParent); } @@ -918,7 +918,7 @@ void ScAcceptChgDlg::UpdateView() } if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) ) - bTheFlag=FALSE; + bTheFlag=sal_False; pTPView->EnableAccept(bTheFlag); pTPView->EnableAcceptAll(bTheFlag); @@ -930,16 +930,16 @@ void ScAcceptChgDlg::UpdateView() pParent=pTheView->InsertEntry( aStrAllAccepted, static_cast< RedlinData * >(NULL), static_cast< SvLBoxEntry * >(NULL)); - pParent->EnableChildsOnDemand(TRUE); + pParent->EnableChildsOnDemand(sal_True); } if(nRejectCount>0) { pParent=pTheView->InsertEntry( aStrAllRejected, static_cast< RedlinData * >(NULL), static_cast< SvLBoxEntry * >(NULL)); - pParent->EnableChildsOnDemand(TRUE); + pParent->EnableChildsOnDemand(sal_True); } - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); SetPointer(Pointer(POINTER_ARROW)); SvLBoxEntry* pEntry=pTheView->First(); if(pEntry!=NULL) @@ -949,7 +949,7 @@ void ScAcceptChgDlg::UpdateView() } //---------------------------------------------------------------------------- -BOOL ScAcceptChgDlg::Close() +sal_Bool ScAcceptChgDlg::Close() { return SfxModelessDialog::Close(); } @@ -973,23 +973,23 @@ IMPL_LINK( ScAcceptChgDlg, MinSizeHandle, SvxAcceptChgCtr*, pCtr ) IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG ) { - USHORT nId =ScSimpleRefDlgWrapper::GetChildWindowId(); + sal_uInt16 nId =ScSimpleRefDlgWrapper::GetChildWindowId(); - ScSimpleRefDlgWrapper::SetDefaultPosSize(GetPosPixel(),GetSizePixel(),TRUE); + ScSimpleRefDlgWrapper::SetDefaultPosSize(GetPosPixel(),GetSizePixel(),sal_True); - SC_MOD()->SetRefDialog( nId, TRUE ); + SC_MOD()->SetRefDialog( nId, sal_True ); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); ScSimpleRefDlgWrapper* pWnd =(ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId ); if(pWnd!=NULL) { -// bSimpleRefDlgStarted=TRUE; - USHORT nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId(); - pViewFrm->ShowChildWindow(nAcceptId,FALSE); +// bSimpleRefDlgStarted=sal_True; + sal_uInt16 nAcceptId=ScAcceptChgDlgWrapper::GetChildWindowId(); + pViewFrm->ShowChildWindow(nAcceptId,sal_False); pWnd->SetCloseHdl(LINK( this, ScAcceptChgDlg,RefInfoHandle)); pWnd->SetRefString(pTPFilter->GetRange()); - pWnd->SetAutoReOpen(FALSE); + pWnd->SetAutoReOpen(sal_False); Window* pWin=pWnd->GetWindow(); pWin->SetPosSizePixel(GetPosPixel(),GetSizePixel()); Hide(); @@ -1001,10 +1001,10 @@ IMPL_LINK( ScAcceptChgDlg, RefHandle, SvxTPFilter*, EMPTYARG ) IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult) { - USHORT nId; + sal_uInt16 nId; -// bSimpleRefDlgStarted=FALSE; - ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE); +// bSimpleRefDlgStarted=sal_False; + ScSimpleRefDlgWrapper::SetAutoReOpen(sal_True); SfxViewFrame* pViewFrm = pViewData->GetViewShell()->GetViewFrame(); if(pResult!=NULL) @@ -1024,12 +1024,12 @@ IMPL_LINK( ScAcceptChgDlg, RefInfoHandle, String*, pResult) Invalidate(); } nId = ScAcceptChgDlgWrapper::GetChildWindowId(); - pViewFrm->ShowChildWindow( nId, TRUE ); + pViewFrm->ShowChildWindow( nId, sal_True ); } else { nId = ScAcceptChgDlgWrapper::GetChildWindowId(); - pViewFrm->SetChildWindow( nId, FALSE ); + pViewFrm->SetChildWindow( nId, sal_False ); } return 0; } @@ -1050,7 +1050,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef ) { SetPointer(Pointer(POINTER_WAIT)); - bIgnoreMsg=TRUE; + bIgnoreMsg=sal_True; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pRef!=NULL) @@ -1082,7 +1082,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectHandle, SvxTPView*, pRef ) } SetPointer(Pointer(POINTER_ARROW)); - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; return 0; } IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) @@ -1090,7 +1090,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) SetPointer(Pointer(POINTER_WAIT)); ScChangeTrack* pChanges=pDoc->GetChangeTrack(); - bIgnoreMsg=TRUE; + bIgnoreMsg=sal_True; if(pRef!=NULL) { SvLBoxEntry* pEntry=pTheView->FirstSelected(); @@ -1105,7 +1105,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) { if(pEntryData->nInfo==RD_SPECIAL_CONTENT) { - pChanges->SelectContent(pScChangeAction,TRUE); + pChanges->SelectContent(pScChangeAction,sal_True); } else { @@ -1124,7 +1124,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptHandle, SvxTPView*, pRef ) ClearView(); UpdateView(); } - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; return 0; } @@ -1179,7 +1179,7 @@ void ScAcceptChgDlg::AcceptFiltered() IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG ) { SetPointer(Pointer(POINTER_WAIT)); - bIgnoreMsg=TRUE; + bIgnoreMsg=sal_True; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pChanges!=NULL) { @@ -1203,7 +1203,7 @@ IMPL_LINK( ScAcceptChgDlg, RejectAllHandle, SvxTPView*, EMPTYARG ) } SetPointer(Pointer(POINTER_ARROW)); - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; return 0; } @@ -1212,7 +1212,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG ) { SetPointer(Pointer(POINTER_WAIT)); - bIgnoreMsg=TRUE; + bIgnoreMsg=sal_True; ScChangeTrack* pChanges=pDoc->GetChangeTrack(); if(pChanges!=NULL) { @@ -1231,7 +1231,7 @@ IMPL_LINK( ScAcceptChgDlg, AcceptAllHandle, SvxTPView*, EMPTYARG ) ClearView(); UpdateView(); } - bIgnoreMsg=FALSE; + bIgnoreMsg=sal_False; SetPointer(Pointer(POINTER_ARROW)); return 0; @@ -1243,7 +1243,7 @@ IMPL_LINK( ScAcceptChgDlg, SelectHandle, SvxRedlinTable*, EMPTYARG ) { aSelectionTimer.Start(); } - bNoSelection=FALSE; + bNoSelection=sal_False; return 0; } @@ -1276,12 +1276,12 @@ void ScAcceptChgDlg::GetDependents( const ScChangeAction* pScChangeAction, } } -BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent) +sal_Bool ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent) { - BOOL bTheTestFlag=TRUE; + sal_Bool bTheTestFlag=sal_True; ScRedlinData *pEntryData=(ScRedlinData *)(pParent->GetUserData()); const ScChangeAction* pScChangeAction = (ScChangeAction*) pEntryData->pData; - BOOL bParentInserted = FALSE; + sal_Bool bParentInserted = sal_False; // If the parent is a MatrixOrigin then place it in the right order before // the MatrixReferences. Also if it is the first content change at this // position don't insert the first dependent MatrixReference as the special @@ -1292,7 +1292,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo { pActionTable->Insert( pScChangeAction->GetActionNumber(), (ScChangeAction*) pScChangeAction ); - bParentInserted = TRUE; + bParentInserted = sal_True; } SvLBoxEntry* pEntry=NULL; @@ -1304,18 +1304,18 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo pCChild=(const ScChangeActionContent*)pActionTable->Next(); } - if(pCChild==NULL) return TRUE; + if(pCChild==NULL) return sal_True; SvLBoxEntry* pOriginal=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_CONTENT); if(pOriginal!=NULL) { - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; ScRedlinData *pParentData=(ScRedlinData *)(pOriginal->GetUserData()); pParentData->pData=(void *)pScChangeAction; pParentData->nActionNo=pScChangeAction->GetActionNumber(); pParentData->bIsAcceptable=pScChangeAction->IsRejectable(); // select old value - pParentData->bIsRejectable=FALSE; - pParentData->bDisabled=FALSE; + pParentData->bIsRejectable=sal_False; + pParentData->bDisabled=sal_False; } while(pCChild!=NULL) { @@ -1324,7 +1324,7 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo pEntry=InsertChangeActionContent(pCChild,pParent,RD_SPECIAL_NONE); if(pEntry!=NULL) - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; } pCChild=(const ScChangeActionContent*)pActionTable->Next(); } @@ -1336,13 +1336,13 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo if(pEntry!=NULL) { - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; ScRedlinData *pParentData=(ScRedlinData *)(pEntry->GetUserData()); pParentData->pData=(void *)pScChangeAction; pParentData->nActionNo=pScChangeAction->GetActionNumber(); pParentData->bIsAcceptable=pScChangeAction->IsClickable(); - pParentData->bIsRejectable=FALSE; - pParentData->bDisabled=FALSE; + pParentData->bIsRejectable=sal_False; + pParentData->bDisabled=sal_False; } } @@ -1350,10 +1350,10 @@ BOOL ScAcceptChgDlg::InsertContentChilds(ScChangeActionTable* pActionTable,SvLBo } -BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent) +sal_Bool ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); - BOOL bTheTestFlag=TRUE; + sal_Bool bTheTestFlag=sal_True; ScChangeActionState eState = SC_CAS_VIRGIN; String aString=pTheView->GetEntryText( pParent); @@ -1376,35 +1376,35 @@ BOOL ScAcceptChgDlg::InsertAcceptedORejected(SvLBoxEntry* pParent) { if(pScChangeAction->GetState()==eState && InsertFilteredAction(pScChangeAction,eState,pParent)!=NULL) - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; pScChangeAction=pScChangeAction->GetNext(); } return bTheTestFlag; } -BOOL ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent) +sal_Bool ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); - BOOL bTheTestFlag=TRUE; + sal_Bool bTheTestFlag=sal_True; SvLBoxEntry* pEntry=NULL; const ScChangeAction* pChild=(const ScChangeAction*)pActionTable->First(); while(pChild!=NULL) { - pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,FALSE,TRUE); + pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,sal_False,sal_True); if(pEntry!=NULL) { - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData()); - pEntryData->bIsRejectable=FALSE; - pEntryData->bIsAcceptable=FALSE; - pEntryData->bDisabled=TRUE; + pEntryData->bIsRejectable=sal_False; + pEntryData->bIsAcceptable=sal_False; + pEntryData->bDisabled=sal_True; if(pChild->IsDialogParent()) { - //pEntry->EnableChildsOnDemand(TRUE); + //pEntry->EnableChildsOnDemand(sal_True); Expand(pChanges,pChild,pEntry); } } @@ -1412,11 +1412,11 @@ BOOL ScAcceptChgDlg::InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* } return bTheTestFlag; } -BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction, +sal_Bool ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction, ScChangeActionTable* pActionTable,SvLBoxEntry* pParent) { ScChangeTrack* pChanges=pDoc->GetChangeTrack(); - BOOL bTheTestFlag=TRUE; + sal_Bool bTheTestFlag=sal_True; SvLBoxEntry* pEntry=NULL; ScChangeActionTable aDelActionTable; const ScChangeAction* pChild=(const ScChangeAction*)pActionTable->First(); @@ -1425,18 +1425,18 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction, { if(pScChangeAction!=pChild) - pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,FALSE,TRUE); + pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,sal_False,sal_True); else - pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,TRUE,TRUE); + pEntry=InsertChangeAction(pChild,SC_CAS_VIRGIN,pParent,sal_True,sal_True); if(pEntry!=NULL) { ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData()); - pEntryData->bIsRejectable=FALSE; - pEntryData->bIsAcceptable=FALSE; - pEntryData->bDisabled=TRUE; + pEntryData->bIsRejectable=sal_False; + pEntryData->bIsAcceptable=sal_False; + pEntryData->bDisabled=sal_True; - bTheTestFlag=FALSE; + bTheTestFlag=sal_False; if ( pChild->IsDialogParent() ) { Expand(pChanges,pChild,pEntry); @@ -1444,7 +1444,7 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction, pChanges->GetDependents((ScChangeAction*) pChild,aDelActionTable); if(aDelActionTable.First()!=NULL) { - pEntry->EnableChildsOnDemand(TRUE); + pEntry->EnableChildsOnDemand(sal_True); } aDelActionTable.Clear(); */ @@ -1455,10 +1455,10 @@ BOOL ScAcceptChgDlg::InsertDeletedChilds(const ScChangeAction* pScChangeAction, return bTheTestFlag; } -BOOL ScAcceptChgDlg::Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction, - SvLBoxEntry* pEntry,BOOL bFilter) +sal_Bool ScAcceptChgDlg::Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction, + SvLBoxEntry* pEntry,sal_Bool bFilter) { - BOOL bTheTestFlag=TRUE; + sal_Bool bTheTestFlag=sal_True; if(pChanges!=NULL &&pEntry!=NULL &&pScChangeAction!=NULL) { @@ -1513,8 +1513,8 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable ) if(pEntry->HasChildsOnDemand()) { - BOOL bTheTestFlag=TRUE; - pEntry->EnableChildsOnDemand(FALSE); + sal_Bool bTheTestFlag=sal_True; + pEntry->EnableChildsOnDemand(sal_False); pTheView->RemoveEntry(pTheView->FirstChild(pEntry)); if(pEntryData!=NULL) @@ -1556,32 +1556,32 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvxRedlinTable*, pTable ) } } SetPointer(Pointer(POINTER_ARROW)); - return (ULONG) TRUE; + return (sal_uLong) sal_True; } -void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, - ULONG nEndAction, ULONG /* nPos */) +void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, + sal_uLong nEndAction, sal_uLong /* nPos */) { if(pChanges!=NULL) { DateTime aDateTime; SvLBoxEntry* pParent=NULL; const ScChangeAction* pScChangeAction=NULL; - bAcceptEnableFlag=TRUE; - bRejectEnableFlag=TRUE; + bAcceptEnableFlag=sal_True; + bRejectEnableFlag=sal_True; SetPointer(Pointer(POINTER_WAIT)); - pTheView->SetUpdateMode(FALSE); + pTheView->SetUpdateMode(sal_False); ScChangeActionTable ActionTable; - BOOL bTheFlag=FALSE; + sal_Bool bTheFlag=sal_False; - BOOL bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()|| + sal_Bool bFilterFlag=pTPFilter->IsDate()||pTPFilter->IsRange()|| pTPFilter->IsAuthor()||pTPFilter->IsComment(); bUseColor=bFilterFlag; - for(ULONG i=nStartAction;i<=nEndAction;i++) + for(sal_uLong i=nStartAction;i<=nEndAction;i++) { pScChangeAction=pChanges->GetAction(i); if(pScChangeAction==NULL) continue; @@ -1601,7 +1601,7 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, else pParent=NULL; - bTheFlag=TRUE; + bTheFlag=sal_True; break; case SC_CAS_ACCEPTED: @@ -1619,12 +1619,12 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, { if(!bFilterFlag) { - pParent->EnableChildsOnDemand(TRUE); + pParent->EnableChildsOnDemand(sal_True); } else { - BOOL bTestFlag=bHasFilterEntry; - bHasFilterEntry=FALSE; + sal_Bool bTestFlag=bHasFilterEntry; + bHasFilterEntry=sal_False; if(Expand(pChanges,pScChangeAction,pParent,!bTestFlag)&&!bTestFlag) pTheView->RemoveEntry(pParent); } @@ -1634,22 +1634,22 @@ void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, } if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) ) - bTheFlag=FALSE; + bTheFlag=sal_False; pTPView->EnableAccept(bTheFlag); pTPView->EnableAcceptAll(bTheFlag); pTPView->EnableReject(bTheFlag); pTPView->EnableRejectAll(bTheFlag); - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); SetPointer(Pointer(POINTER_ARROW)); } } -void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction) +void ScAcceptChgDlg::RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction) { - pTheView->SetUpdateMode(FALSE); + pTheView->SetUpdateMode(sal_False); SvLBoxEntry* pEntry=pTheView->GetCurEntry(); @@ -1658,7 +1658,7 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction) if(pEntry!=NULL) pEntryData=(ScRedlinData *)(pEntry->GetUserData()); - ULONG nAction=0; + sal_uLong nAction=0; if(pEntryData!=NULL) { nAction=pEntryData->nActionNo; @@ -1669,19 +1669,19 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction) pTheView->SetCurEntry(pTheView->GetModel()->GetEntry(0)); } - BOOL bRemove=FALSE; + sal_Bool bRemove=sal_False; // MUST do it backwards, don't delete parents before children and GPF pEntry=pTheView->Last(); while(pEntry!=NULL) { - bRemove=FALSE; + bRemove=sal_False; pEntryData=(ScRedlinData *)(pEntry->GetUserData()); if(pEntryData!=NULL) { nAction=pEntryData->nActionNo; - if(nStartAction<=nAction && nAction<=nEndAction) bRemove=TRUE; + if(nStartAction<=nAction && nAction<=nEndAction) bRemove=sal_True; } @@ -1694,33 +1694,33 @@ void ScAcceptChgDlg::RemoveEntrys(ULONG nStartAction,ULONG nEndAction) } pEntry=pPrevEntry; } - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); } -void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction) +void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction) { - pTheView->SetUpdateMode(FALSE); + pTheView->SetUpdateMode(sal_False); - ULONG nPos=LIST_APPEND; + sal_uLong nPos=LIST_APPEND; - BOOL bRemove=FALSE; + sal_Bool bRemove=sal_False; SvLBoxEntry* pEntry=pTheView->First(); SvLBoxEntry* pNextEntry = (pEntry ? pTheView->NextSibling(pEntry) : NULL); SvLBoxEntry* pLastEntry=NULL; while(pEntry!=NULL) { - bRemove=FALSE; + bRemove=sal_False; ScRedlinData *pEntryData=(ScRedlinData *)(pEntry->GetUserData()); if(pEntryData!=NULL) { ScChangeAction* pScChangeAction= (ScChangeAction*) pEntryData->pData; - ULONG nAction=pScChangeAction->GetActionNumber(); + sal_uLong nAction=pScChangeAction->GetActionNumber(); - if(nStartAction<=nAction && nAction<=nEndAction) bRemove=TRUE; + if(nStartAction<=nAction && nAction<=nEndAction) bRemove=sal_True; } if(bRemove) @@ -1756,7 +1756,7 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,U else AppendChanges(pChgTrack,nStartAction,nEndAction); - pTheView->SetUpdateMode(TRUE); + pTheView->SetUpdateMode(sal_True); } @@ -1767,8 +1767,8 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) ScChangeTrackMsgQueue& aMsgQueue= pChgTrack->GetMsgQueue(); ScChangeTrackMsgInfo* pTrackInfo=aMsgQueue.Get(); - ULONG nStartAction; - ULONG nEndAction; + sal_uLong nStartAction; + sal_uLong nEndAction; while(pTrackInfo!=NULL) { @@ -1777,7 +1777,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) if(!bIgnoreMsg) { - bNoSelection=TRUE; + bNoSelection=sal_True; switch(pTrackInfo->eMsgType) { @@ -1786,7 +1786,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) case SC_CTM_REMOVE: RemoveEntrys(nStartAction,nEndAction); break; case SC_CTM_PARENT: - case SC_CTM_CHANGE: //bNeedsUpdate=TRUE; + case SC_CTM_CHANGE: //bNeedsUpdate=sal_True; UpdateEntrys(pChgTrack,nStartAction,nEndAction); break; default: @@ -1803,7 +1803,7 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) } IMPL_LINK( ScAcceptChgDlg, ReOpenTimerHdl, Timer*, EMPTYARG ) { - ScSimpleRefDlgWrapper::SetAutoReOpen(TRUE); + ScSimpleRefDlgWrapper::SetAutoReOpen(sal_True); aAcceptChgCtr.ShowFilterPage(); RefHandle(NULL); @@ -1814,9 +1814,9 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG ) { ScTabView* pTabView = pViewData->GetView(); - BOOL bAcceptFlag = TRUE; - BOOL bRejectFlag = TRUE; - BOOL bContMark = FALSE; + sal_Bool bAcceptFlag = sal_True; + sal_Bool bRejectFlag = sal_True; + sal_Bool bContMark = sal_False; pTabView->DoneBlockMode(); // clears old marking SvLBoxEntry* pEntry = pTheView->FirstSelected(); @@ -1835,16 +1835,16 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG ) const ScBigRange& rBigRange = pScChangeAction->GetBigRange(); if( rBigRange.IsValid( pDoc ) && IsActive() ) { - BOOL bSetCursor = !pTheView->NextSelected( pEntry ); + sal_Bool bSetCursor = !pTheView->NextSelected( pEntry ); pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark ); - bContMark = TRUE; + bContMark = sal_True; } } } else { - bAcceptFlag = FALSE; - bRejectFlag = FALSE; + bAcceptFlag = sal_False; + bRejectFlag = sal_False; } bAcceptEnableFlag = bAcceptFlag; bRejectEnableFlag = bRejectFlag; @@ -1853,7 +1853,7 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG ) } ScChangeTrack* pChanges = pDoc->GetChangeTrack(); - BOOL bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected(); + sal_Bool bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected(); pTPView->EnableAccept( bAcceptFlag && bEnable ); pTPView->EnableReject( bRejectFlag && bEnable ); @@ -1881,11 +1881,11 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) aPopup.Deactivate(); } - USHORT nSortedCol= pTheView->GetSortedCol(); + sal_uInt16 nSortedCol= pTheView->GetSortedCol(); if(nSortedCol!=0xFFFF) { - USHORT nItemId=nSortedCol+SC_SUB_SORT+1; + sal_uInt16 nItemId=nSortedCol+SC_SUB_SORT+1; aPopup.CheckItem(nItemId); @@ -1896,7 +1896,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) } } - aPopup.EnableItem(SC_CHANGES_COMMENT,FALSE); + aPopup.EnableItem(SC_CHANGES_COMMENT,sal_False); if(pDoc->IsDocEditable() && pEntry!=NULL) { @@ -1910,7 +1910,7 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) } } - USHORT nCommand=aPopup.Execute( this, GetPointerPosPixel() ); + sal_uInt16 nCommand=aPopup.Execute( this, GetPointerPosPixel() ); if(nCommand) @@ -1925,14 +1925,14 @@ IMPL_LINK( ScAcceptChgDlg, CommandHdl, Control*, EMPTYARG ) ScChangeAction* pScChangeAction= (ScChangeAction*) pEntryData->pData; - pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,FALSE); + pViewData->GetDocShell()->ExecuteChangeCommentDialog( pScChangeAction, this,sal_False); } } } else { - BOOL bSortDir=pTheView->GetSortDirection(); - USHORT nDialogCol=nCommand-SC_SUB_SORT-1; + sal_Bool bSortDir=pTheView->GetSortDirection(); + sal_uInt16 nDialogCol=nCommand-SC_SUB_SORT-1; if(nSortedCol==nDialogCol) bSortDir=!bSortDir; pTheView->SortByCol(nDialogCol,bSortDir); /* @@ -1982,13 +1982,13 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo) if ( aStr.Len()) { - USHORT nCount=(USHORT)aStr.ToInt32(); + sal_uInt16 nCount=(sal_uInt16)aStr.ToInt32(); - for(USHORT i=0;iSetTab(i,(USHORT)aStr.ToInt32(),MAP_PIXEL); + pTheView->SetTab(i,(sal_uInt16)aStr.ToInt32(),MAP_PIXEL); } } } @@ -2000,11 +2000,11 @@ void ScAcceptChgDlg::FillInfo(SfxChildWinInfo& rInfo) const SfxModelessDialog::FillInfo(rInfo); rInfo.aExtraString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "AcceptChgDat:(" )); - USHORT nCount=pTheView->TabCount(); + sal_uInt16 nCount=pTheView->TabCount(); rInfo.aExtraString += String::CreateFromInt32(nCount); rInfo.aExtraString += ';'; - for(USHORT i=0;iGetTab(i)); rInfo.aExtraString += ';'; @@ -2029,7 +2029,7 @@ void ScAcceptChgDlg::InitFilter() pTheView->SetFilterComment(pTPFilter->IsComment()); utl::SearchParam aSearchParam( pTPFilter->GetComment(), - utl::SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE ); + utl::SearchParam::SRCH_REGEXP,sal_False,sal_False,sal_False ); pTheView->SetCommentParams(&aSearchParam); @@ -2118,8 +2118,8 @@ IMPL_LINK( ScAcceptChgDlg, ColCompareHdl, SvSortData*, pSortData ) if(pLeftItem != NULL && pRightItem != NULL) { - USHORT nLeftKind=pLeftItem->IsA(); - USHORT nRightKind=pRightItem->IsA(); + sal_uInt16 nLeftKind=pLeftItem->IsA(); + sal_uInt16 nRightKind=pRightItem->IsA(); if(nRightKind == SV_ITEM_ID_LBOXSTRING && nLeftKind == SV_ITEM_ID_LBOXSTRING ) diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 4c544954b2bc..bd058da042cb 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -70,8 +70,8 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi , pAccel( NULL ) , pHiddenMarks(NULL) , nRefTab(0) - , bHighLightRef( FALSE ) - , bAccInserted( FALSE ) + , bHighLightRef( sal_False ) + , bAccInserted( sal_False ) { ScInputOptions aInputOption=SC_MOD()->GetInputOptions(); bEnableColorRef=aInputOption.GetRangeFinder(); @@ -85,14 +85,14 @@ ScFormulaReferenceHelper::~ScFormulaReferenceHelper() // common cleanup for ScAnyRefDlg and ScFormulaDlg is done here HideReference(); - enableInput( TRUE ); + enableInput( sal_True ); ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(); if ( pInputHdl ) pInputHdl->ResetDelayTimer(); // stop the timer for disabling the input line } // ----------------------------------------------------------------------------- -void ScFormulaReferenceHelper::enableInput( BOOL bEnable ) +void ScFormulaReferenceHelper::enableInput( sal_Bool bEnable ) { TypeId aType(TYPE(ScDocShell)); ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType); @@ -114,8 +114,8 @@ void ScFormulaReferenceHelper::enableInput( BOOL bEnable ) Window *pParent=pWin->GetParent(); if(pParent) { - pParent->EnableInput(bEnable,TRUE /* FALSE */); - if(TRUE /*bChilds*/) + pParent->EnableInput(bEnable,sal_True /* sal_False */); + if(sal_True /*bChilds*/) pViewSh->EnableRefInput(bEnable); } } @@ -132,7 +132,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr ) { if( /*!pRefEdit &&*/ bEnableColorRef ) { - bHighLightRef=TRUE; + bHighLightRef=sal_True; ScViewData* pViewData=ScDocShell::GetViewData(); if ( pViewData ) { @@ -141,14 +141,14 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr ) ScRangeList aRangeList; - pTabViewShell->DoneRefMode( FALSE ); + pTabViewShell->DoneRefMode( sal_False ); pTabViewShell->ClearHighlightRanges(); if( ParseWithNames( aRangeList, rStr, pDoc ) ) { ScRange* pRangeEntry = aRangeList.First(); - USHORT nIndex=0; + sal_uInt16 nIndex=0; while(pRangeEntry != NULL) { ColorData aColName = ScRangeFindList::GetColorName(nIndex++); @@ -174,7 +174,7 @@ bool ScFormulaReferenceHelper::ParseWithNames( ScRangeList& rRanges, const Strin ScRange aRange; String aRangeStr( rStr.GetToken( nToken ) ); - USHORT nFlags = aRange.ParseAny( aRangeStr, pDoc, aDetails ); + sal_uInt16 nFlags = aRange.ParseAny( aRangeStr, pDoc, aDetails ); if ( nFlags & SCA_VALID ) { if ( (nFlags & SCA_TAB_3D) == 0 ) @@ -196,7 +196,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr ) { if( /*!pRefEdit &&*/ bEnableColorRef) { - bHighLightRef=TRUE; + bHighLightRef=sal_True; ScViewData* pViewData=ScDocShell::GetViewData(); if ( pViewData && pRefComp.get() ) { @@ -211,17 +211,17 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr ) if(pTabViewShell!=NULL && pScTokA!=NULL) { - pTabViewShell->DoneRefMode( FALSE ); + pTabViewShell->DoneRefMode( sal_False ); pTabViewShell->ClearHighlightRanges(); pScTokA->Reset(); const ScToken* pToken = static_cast(pScTokA->GetNextReference()); - USHORT nIndex=0; + sal_uInt16 nIndex=0; while(pToken!=NULL) { - BOOL bDoubleRef=(pToken->GetType()==formula::svDoubleRef); + sal_Bool bDoubleRef=(pToken->GetType()==formula::svDoubleRef); if(pToken->GetType()==formula::svSingleRef || bDoubleRef) @@ -253,7 +253,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr ) } } // ----------------------------------------------------------------------------- -void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode ) +void ScFormulaReferenceHelper::HideReference( sal_Bool bDoneRefMode ) { ScViewData* pViewData=ScDocShell::GetViewData(); @@ -263,14 +263,14 @@ void ScFormulaReferenceHelper::HideReference( BOOL bDoneRefMode ) if(pTabViewShell!=NULL) { - // bDoneRefMode is FALSE when called from before SetReference. + // bDoneRefMode is sal_False when called from before SetReference. // In that case, RefMode was just started and must not be ended now. if ( bDoneRefMode ) - pTabViewShell->DoneRefMode( FALSE ); + pTabViewShell->DoneRefMode( sal_False ); pTabViewShell->ClearHighlightRanges(); } - bHighLightRef=FALSE; + bHighLightRef=sal_False; } } // ----------------------------------------------------------------------------- @@ -323,9 +323,9 @@ void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::R { pViewShell->SetTabNo( pRange->aStart.Tab() ); pViewShell->MoveCursorAbs( pRange->aStart.Col(), - pRange->aStart.Row(), SC_FOLLOW_JUMP, FALSE, FALSE ); + pRange->aStart.Row(), SC_FOLLOW_JUMP, sal_False, sal_False ); pViewShell->MoveCursorAbs( pRange->aEnd.Col(), - pRange->aEnd.Row(), SC_FOLLOW_JUMP, TRUE, FALSE ); + pRange->aEnd.Row(), SC_FOLLOW_JUMP, sal_True, sal_False ); m_pDlg->SetReference( *pRange, pDoc ); } } @@ -348,7 +348,7 @@ void ScFormulaReferenceHelper::Init() pRefCell.reset( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) ); pRefComp.reset( new ScCompiler( pDoc, aCursorPos) ); pRefComp->SetGrammar( pDoc->GetGrammar() ); - pRefComp->SetCompileForFAP(TRUE); + pRefComp->SetCompileForFAP(sal_True); nRefTab = nTab; } // if ( pViewData ) @@ -365,13 +365,13 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel ) case KEY_ESCAPE: if( pRefEdit ) pRefEdit->GrabFocus(); - m_pDlg->RefInputDone( TRUE ); + m_pDlg->RefInputDone( sal_True ); break; } - return TRUE; + return sal_True; } //---------------------------------------------------------------------------- -void ScFormulaReferenceHelper::RefInputDone( BOOL bForced ) +void ScFormulaReferenceHelper::RefInputDone( sal_Bool bForced ) { //