diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-17 13:20:22 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-17 13:20:22 +0100 |
commit | 9ebb52084f9a9f87389366d9680760c23d6ce57b (patch) | |
tree | 2887c14c3fef3f594c5d9864f0825bd4a57bc409 /sc/source/ui | |
parent | d0c714e4d43c06705686156c66817234a1f70206 (diff) |
removetooltypes01: #i112600# remove tooltypes from sc
Diffstat (limited to 'sc/source/ui')
432 files changed, 13403 insertions, 13403 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index bb7b0eac0..0e1c208a7 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 666d88f6b..02ac960df 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 85c44fe3a..711e62e55 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 60a0b46a7..085811c00 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 65d87a044..dcb5f13ca 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 98c7e5a0d..822fbfa7e 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 50e248466..d36925c37 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 8a55721e0..45f805b5f 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; nPNr<nPages && !pOle2Obj; nPNr++) + sal_uInt16 nPages = pModel->GetPageCount(); + for (sal_uInt16 nPNr=0; nPNr<nPages && !pOle2Obj; nPNr++) { SdrPage* pPage = pModel->GetPage(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<sal_uInt16>(static_cast<sal_Int16>(nTab))); if ( pPage && aLogicRect != aOldRect ) { diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 85ad39189..038998cc4 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; i<nCount; i++) + sal_uLong nCount = rMarkList.GetMarkCount(); + for (sal_uLong i=0; i<nCount; i++) { SdrMark* pMark = rMarkList.GetMark(i); SdrObject* pObj = pMark->GetMarkedSdrObj(); @@ -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 685ea3978..7d9ea8465 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; i<nCount; i++) + sal_uInt16 nCount = (sal_uInt16) pRangeFindList->Count(); + for (sal_uInt16 i=nIndex+1; i<nCount; i++) { ScRangeFindData* pNext = pRangeFindList->GetObject( 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<com::sun::star::linguistic2::XHyphenator> 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; i<nMRUCount; i++) + for (sal_uInt16 i=0; i<nMRUCount; i++) { - USHORT nId = pMRUList[i]; - for (ULONG j=0; j<nListCount; j++) + sal_uInt16 nId = pMRUList[i]; + for (sal_uLong j=0; j<nListCount; j++) { const ScFuncDesc* pDesc = pFuncList->GetFunction( j ); if ( pDesc->nFIndex == nId && pDesc->pFuncName ) @@ -676,7 +676,7 @@ void ScInputHandler::GetFormulaData() } } } - for(ULONG i=0;i<nListCount;i++) + for(sal_uLong i=0;i<nListCount;i++) { const ScFuncDesc* pDesc = pFuncList->GetFunction( 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<USHORT>(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<sal_uInt16>(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<xub_StrLen>(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<USHORT>(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<sal_uInt16>(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<xub_StrLen>(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; i<nCount; i++) + sal_uInt16 nCount = pEngine->GetParagraphCount(); + for (sal_uInt16 i=0; i<nCount; i++) pEngine->QuickRemoveCharAttribs( 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; i<nCount; i++) + sal_uInt16 nCount = pEngine->GetParagraphCount(); + for (sal_uInt16 i=0; i<nCount; i++) pTableView->RemoveCharAttribs( i, EE_CHAR_WEIGHT ); } @@ -1669,12 +1669,12 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron au // 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; i<nCount; i++) + for (sal_uInt16 i=1; i<nCount; i++) { EditView* pThis = pEngine->GetView(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<USHORT>(eSvxAdjust); //! set at ViewData or with PostEditView + nEditAdjust = sal::static_int_cast<sal_uInt16>(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; i<nCount; i++) + sal_Bool bChange = sal_False; + sal_uInt16 nCount = pEngine->GetParagraphCount(); + for (sal_uInt16 i=0; i<nCount; i++) { const SfxItemSet& rOld = pEngine->GetParaAttribs( 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; i<nCount; i++) + pEngine->SetUpdateMode(sal_False); + sal_uInt16 nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein + for (sal_uInt16 i=0; i<nCount; i++) pEngine->QuickRemoveCharAttribs( 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; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { if ( eMode == SC_INPUT_TABLE && eOldMode == SC_INPUT_TOP ) { @@ -2337,7 +2337,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode ) pEngine->GetView(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<nLen; i++) { sal_Unicode c = rString.GetChar(i); if ( c < '0' || c > '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<BOOL>(*pState == *pLastState); + bRepeat = sal::static_int_cast<sal_Bool>(*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<nParCnt; i++) + for (sal_uInt16 i=0; i<nParCnt; i++) rDestEngine.QuickRemoveCharAttribs( i ); // Absaetze zusammenfassen while ( nParCnt > 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 0f8fb4050..6a4e4b0d1 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; i<nCount; i++ ) { ScRangeData* pData = (*pRangeNames)[i]; @@ -1454,7 +1454,7 @@ void ScPosWnd::FillRangeNames() if ( nValidCount ) { ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ]; - USHORT j; + sal_uInt16 j; for ( i=0, j=0; i<nCount; i++ ) { ScRangeData* pData = (*pRangeNames)[i]; @@ -1483,16 +1483,16 @@ void ScPosWnd::FillFunctions() String aFirstName; 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(); if (pMRUList) { const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); - ULONG nListCount = pFuncList->GetCount(); - for (USHORT i=0; i<nMRUCount; i++) + sal_uLong nListCount = pFuncList->GetCount(); + for (sal_uInt16 i=0; i<nMRUCount; i++) { - USHORT nId = pMRUList[i]; - for (ULONG j=0; j<nListCount; j++) + sal_uInt16 nId = pMRUList[i]; + for (sal_uLong j=0; j<nListCount; j++) { const ScFuncDesc* pDesc = pFuncList->GetFunction( 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 75e1c9b48..d69850698 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 50c2bfd15..8dbf3451d 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 fc1ffce6e..d87bad6d7 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<rtl::OUString> 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<sal_uInt16>(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 - ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod); + ScValidityRefChildWin::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<UINT16>(pMod->GetAppOptions().GetAppMetric()) ) ); + pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<sal_uInt16>(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 65ebb1ea1..5109c0dff 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<UINT16>(GetAppOptions().GetAppMetric()) ) ); + rSet.Put( SfxUInt16Item( nWhich, sal::static_int_cast<sal_uInt16>(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) && n<nLRUFuncCount) // alte Liste abklappern { if (!bFound && (pLRUListIds[n]== nFIndex)) - bFound = TRUE; // erster! Treffer + bFound = sal_True; // erster! Treffer else if (bFound) aIdxList[n ] = pLRUListIds[n]; // hinter Treffer kopieren else if ((n+1) < LRU_MAX) @@ -815,7 +815,7 @@ void ScModule::InsertEntryToLRUList(USHORT nFIndex) void ScModule::RecentFunctionsChanged() { // update function list window - USHORT nFuncListID = ScFunctionChildWindow::GetChildWindowId(); + sal_uInt16 nFuncListID = ScFunctionChildWindow::GetChildWindowId(); //! notify all views SfxViewFrame* pViewFrm = SfxViewFrame::Current(); @@ -940,7 +940,7 @@ SvtUserOptions& ScModule::GetUserOptions() return *pUserOptions; } -USHORT ScModule::GetOptDigitLanguage() +sal_uInt16 ScModule::GetOptDigitLanguage() { SvtCTLOptions::TextNumerals eNumerals = GetCTLOptions().GetCTLTextNumerals(); return ( eNumerals == SvtCTLOptions::NUMERALS_ARABIC ) ? LANGUAGE_ENGLISH_US : @@ -959,12 +959,12 @@ USHORT ScModule::GetOptDigitLanguage() // und SID_AUTOSPELL_CHECK // -#define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),TRUE,&item)) +#define IS_AVAILABLE(w,item) (SFX_ITEM_SET==rOptSet.GetItemState((w),sal_True,&item)) void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) { - USHORT nOldSpellLang, nOldCjkLang, nOldCtlLang; - BOOL bOldAutoSpell; + sal_uInt16 nOldSpellLang, nOldCjkLang, nOldCtlLang; + sal_Bool bOldAutoSpell; GetSpellSettings( nOldSpellLang, nOldCjkLang, nOldCtlLang, bOldAutoSpell ); if (!pAppCfg) @@ -984,13 +984,13 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : 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<const SfxBoolItem*>(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<IAnyRefDialog*>(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<IAnyRefDialog*>(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<UINT16>(GetAppOptions().GetAppMetric()) ) ); + sal::static_int_cast<sal_uInt16>(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<Window*> & 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<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return FALSE; + return sal_False; std::list<Window*> & rlRefWindow = iSlot->second; std::list<Window*>::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<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return FALSE; + return sal_False; std::list<Window*> & 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<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); + std::map<sal_uInt16, std::list<Window*> >::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<USHORT, std::list<Window*> >::iterator i = m_mapRefWindow.begin(); + for( std::map<sal_uInt16, std::list<Window*> >::iterator i = m_mapRefWindow.begin(); i!=m_mapRefWindow.end(); i++ ) for( std::list<Window*>::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 0e042cfd7..be1bcb702 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 a357a128a..5b5f3f3cc 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 3f49cb3a6..01cc0506c 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 be9bf5de3..ea22ea3db 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<SCCOL>( nCol2 + nCol1 ); nRow2 = sal::static_int_cast<SCROW>( 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 36eab35ca..a9f66bf8a 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 65fa88ea0..64844b429 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 f8df8ed49..1f6185bfb 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<USHORT>( eMode ) ); + aLbCond12.SelectEntryPos( sal::static_int_cast<sal_uInt16>( 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<USHORT>( eMode ) ); + aLbCond22.SelectEntryPos( sal::static_int_cast<sal_uInt16>( 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<USHORT>( eMode ) ); + aLbCond32.SelectEntryPos( sal::static_int_cast<sal_uInt16>( 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 65623e6e7..89ff4e7c6 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 Sc //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 31a044d55..75b89ce11 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<rtl::OUString>& 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 2783ef5be..3fc4e08a2 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 4874d8ab1..867d562b4 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 5bc12d7b4..ca10c5a46 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<OUString, bool, OUStringHash>& 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 3656c6691..8eb9ca99d 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 1676a1883..caf643f4a 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 04d2d1c4e..4cf9b3fa7 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 54bc80746..3b7ef5b22 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<nInfoCount; i++) + pColFormat = new sal_uInt8[nInfoCount]; + for (sal_uInt16 i=0; i<nInfoCount; i++) { pColStart[i] = rOpt.pColStart[i]; pColFormat[i] = rOpt.pColFormat[i]; @@ -105,7 +105,7 @@ ScAsciiOptions::~ScAsciiOptions() } -void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat ) +void ScAsciiOptions::SetColInfo( sal_uInt16 nCount, const xub_StrLen* pStart, const sal_uInt8* pFormat ) { delete[] pColStart; delete[] pColFormat; @@ -115,8 +115,8 @@ void ScAsciiOptions::SetColInfo( USHORT nCount, const xub_StrLen* pStart, const if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT i=0; i<nInfoCount; i++) + pColFormat = new sal_uInt8[nInfoCount]; + for (sal_uInt16 i=0; i<nInfoCount; i++) { pColStart[i] = pStart[i]; pColFormat[i] = pFormat[i]; @@ -168,7 +168,7 @@ ScAsciiOptions& ScAsciiOptions::operator=( const ScAsciiOptions& rCpy ) } -BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const +sal_Bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const { if ( bFixedLen == rCmp.bFixedLen && aFieldSeps == rCmp.aFieldSeps && @@ -182,14 +182,14 @@ BOOL ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const { DBG_ASSERT( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat), "0-Zeiger in ScAsciiOptions" ); - for (USHORT i=0; i<nInfoCount; i++) + for (sal_uInt16 i=0; i<nInfoCount; i++) if ( pColStart[i] != rCmp.pColStart[i] || pColFormat[i] != rCmp.pColFormat[i] ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // @@ -211,18 +211,18 @@ void ScAsciiOptions::ReadFromString( const String& rString ) if ( nCount >= 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; i<nSub; i++ ) { String aCode = aToken.GetToken( i, '/' ); if ( aCode.EqualsAscii(pStrMrg) ) - bMergeFieldSeps = TRUE; + bMergeFieldSeps = sal_True; else { sal_Int32 nVal = aCode.ToInt32(); @@ -278,11 +278,11 @@ void ScAsciiOptions::ReadFromString( const String& rString ) if (nInfoCount) { pColStart = new xub_StrLen[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; - for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++) + pColFormat = new sal_uInt8[nInfoCount]; + for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++) { pColStart[nInfo] = (xub_StrLen) aToken.GetToken( 2*nInfo, '/' ).ToInt32(); - pColFormat[nInfo] = (BYTE) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32(); + pColFormat[nInfo] = (sal_uInt8) aToken.GetToken( 2*nInfo+1, '/' ).ToInt32(); } } else @@ -374,7 +374,7 @@ String ScAsciiOptions::WriteToString() const // DBG_ASSERT( !nInfoCount || (pColStart && pColFormat), "0-Zeiger in ScAsciiOptions" ); - for (USHORT nInfo=0; nInfo<nInfoCount; nInfo++) + for (sal_uInt16 nInfo=0; nInfo<nInfoCount; nInfo++) { if (nInfo) aOutStr += '/'; @@ -413,36 +413,36 @@ void ScAsciiOptions::InterpretColumnList( const String& rString ) // Kommas durch Semikolon ersetzen String aSemiStr = rString; - USHORT nPos = 0; + sal_uInt16 nPos = 0; do nPos = aSemiStr.SearchAndReplace( ',', ';', nPos ); while ( nPos != STRING_NOTFOUND ); // Eintraege sortieren - USHORT nCount = aSemiStr.GetTokenCount(); - USHORT* pTemp = new USHORT[nCount+1]; + sal_uInt16 nCount = aSemiStr.GetTokenCount(); + sal_uInt16* pTemp = new sal_uInt16[nCount+1]; pTemp[0] = 1; // erste Spalte faengt immer bei 1 an - USHORT nFound = 1; - USHORT i,j; + sal_uInt16 nFound = 1; + sal_uInt16 i,j; for (i=0; i<nCount; i++) { - USHORT nVal = (USHORT) aSemiStr.GetToken(i); + sal_uInt16 nVal = (sal_uInt16) aSemiStr.GetToken(i); if (nVal) { - BOOL bThere = FALSE; + sal_Bool bThere = sal_False; nPos = 0; for (j=0; j<nFound; j++) { if ( pTemp[j] == nVal ) - bThere = TRUE; + bThere = sal_True; else if ( pTemp[j] < nVal ) nPos = j+1; } if ( !bThere ) { if ( nPos < nFound ) - memmove( &pTemp[nPos+1], &pTemp[nPos], (nFound-nPos)*sizeof(USHORT) ); + memmove( &pTemp[nPos+1], &pTemp[nPos], (nFound-nPos)*sizeof(sal_uInt16) ); pTemp[nPos] = nVal; ++nFound; } @@ -456,8 +456,8 @@ void ScAsciiOptions::InterpretColumnList( const String& rString ) nInfoCount = nFound; if (nInfoCount) { - pColStart = new USHORT[nInfoCount]; - pColFormat = new BYTE[nInfoCount]; + pColStart = new sal_uInt16[nInfoCount]; + pColFormat = new sal_uInt8[nInfoCount]; for (i=0; i<nInfoCount; i++) { pColStart[i] = pTemp[i] - 1; @@ -470,7 +470,7 @@ void ScAsciiOptions::InterpretColumnList( const String& rString ) pColFormat = NULL; } - bFixedLen = TRUE; // sonst macht's keinen Sinn + bFixedLen = sal_True; // sonst macht's keinen Sinn // aufraeumen diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 22d8318fa..8d39d67ec 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -64,7 +64,7 @@ public: ScAreaData() {} ~ScAreaData() {} - void Set( const String& rName, const String& rArea, BOOL bDb ) + void Set( const String& rName, const String& rArea, sal_Bool bDb ) { aStrName = rName; aStrArea = rArea; @@ -73,7 +73,7 @@ public: String aStrName; String aStrArea; - BOOL bIsDbArea; + sal_Bool bIsDbArea; }; @@ -155,7 +155,7 @@ void ScConsolidateDlg::Init() DBG_ASSERT( pViewData && pDoc && pRangeUtil, "Error in Ctor" ); String aStr; - USHORT i=0; + sal_uInt16 i=0; aEdDataArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); aEdDestArea .SetGetFocusHdl( LINK( this, ScConsolidateDlg, GetFocusHdl ) ); @@ -221,8 +221,8 @@ void ScConsolidateDlg::Init() ScRangeName* pRangeNames = pDoc->GetRangeName(); 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; (i<nAreaDataCount) && (pAreaData[i].aStrName.Len()>0); 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; i<nDataAreaCount; i++ ) { @@ -449,7 +449,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void*, EMPTYARG ) ScConsolidateItem aOutItem( nWhichCons, &theOutParam ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( 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; i<nAreaCount; i++ ) + for ( sal_uInt16 i=0; i<nAreaCount; i++ ) { String aNewArea; @@ -550,7 +550,7 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb ) else if ( (pLb == &aLbDataArea) || (pLb == &aLbDestArea) ) { Edit* pEd = (pLb == &aLbDataArea) ? &aEdDataArea : &aEdDestArea; - USHORT nSelPos = pLb->GetSelectEntryPos(); + 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 2a43cb06f..b26836916 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 7b2f2f75c..696baf416 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 c656b8239..8e9cf635c 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 f076a7c02..37f3651d9 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 2db216539..3a08a68d6 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; i<nNameCount; i++ ) + for ( sal_uInt16 i=0; i<nNameCount; i++ ) { pDbData = (ScDBData*)(aLocalDbCol.At( i )); if ( pDbData ) @@ -393,7 +393,7 @@ void ScDbNameDlg::UpdateNames() aBtnRemove.Disable(); } //----------------------------------------------------------- - aEdName.SetUpdateMode( TRUE ); + aEdName.SetUpdateMode( sal_True ); aEdName.Invalidate(); } @@ -402,7 +402,7 @@ void ScDbNameDlg::UpdateNames() void ScDbNameDlg::UpdateDBData( const String& rStrName ) { String theArea; - USHORT nAt; + sal_uInt16 nAt; ScDBData* pData; aLocalDbCol.SearchName( rStrName, nAt ); @@ -443,7 +443,7 @@ void ScDbNameDlg::UpdateDBData( const String& rStrName ) //------------------------------------------------------------------------ -BOOL ScDbNameDlg::IsRefInputMode() const +sal_Bool ScDbNameDlg::IsRefInputMode() const { return bRefInputMode; } @@ -500,7 +500,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) ScAddress aEnd = theCurArea.aEnd; ScDBData* pOldEntry = NULL; - USHORT nFoundAt = 0; + sal_uInt16 nFoundAt = 0; if ( aLocalDbCol.SearchName( aNewName, nFoundAt ) ) pOldEntry = aLocalDbCol[nFoundAt]; if (pOldEntry) @@ -509,7 +509,7 @@ IMPL_LINK( ScDbNameDlg, AddBtnHdl, void *, EMPTYARG ) pOldEntry->MoveTo( 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 487a0b848..7cbf3650d 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<USHORT>(aArr.Count()); nIdx < nCount; ++nIdx ) + for( sal_uInt16 nIdx = 0, nCount = sal::static_int_cast<sal_uInt16>(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 723cd81d1..91a214d4e 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 728bf216e..d711694d5 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<MAXQUERY;i++) { - bRefreshExceptQuery[i]=FALSE; + bRefreshExceptQuery[i]=sal_False; } aBtnMore.SetMoreText( String(ScResId( SCSTR_MOREBTN_MOREOPTIONS )) ); aBtnMore.SetLessText( String(ScResId( SCSTR_MOREBTN_FEWEROPTIONS )) ); @@ -139,7 +139,7 @@ ScFilterDlg::ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, __EXPORT ScFilterDlg::~ScFilterDlg() { - for (USHORT i=0; i<=MAXCOL; i++) + for (sal_uInt16 i=0; i<=MAXCOL; i++) delete pEntryLists[i]; delete pOptionsMgr; @@ -229,13 +229,13 @@ void __EXPORT ScFilterDlg::Init( const SfxItemSet& rArgSet ) for ( SCSIZE i=0; i<4; i++ ) { String aValStr; - USHORT nCondPos = 0; - USHORT nFieldSelPos = 0; + sal_uInt16 nCondPos = 0; + sal_uInt16 nFieldSelPos = 0; ScQueryEntry& rEntry = theQueryData.GetEntry(i); if ( rEntry.bDoQuery ) { - nCondPos = (USHORT)rEntry.eOp; + nCondPos = (sal_uInt16)rEntry.eOp; nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(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<SCCOL>(nFieldSelPos) - 1) : static_cast<SCCOL>(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<USHORT>(i+1) ); + UpdateValueList( static_cast<sal_uInt16>(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<SCCOL>(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; i<nValueCount; i++ ) + for ( sal_uInt16 i=0; i<nValueCount; i++ ) { pValList->InsertEntry( (*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<SCCOL>(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<USHORT>(nField - theQueryData.nCol1 + 1); + return static_cast<sal_uInt16>(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<SCCOL>(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<SCCOL>(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<SCCOL>(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<SCCOL>(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<SCCOL>(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<SCCOL>(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<SCCOL>(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<SCCOL>(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<SCCOL>(nField) - 1) : static_cast<SCCOL>(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<SCCOL>(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<USHORT>(i+1) ); + UpdateValueList( static_cast<sal_uInt16>(i+1) ); } } diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 6f56fc0ff..b94ff19c9 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; i<nEntries; i++ ) delete (String*)rLbCopyPos.GetEntryData( i ); @@ -161,13 +161,13 @@ void ScFilterOptionsMgr::Init() String aRefStr; while ( aIter.Next( aName, aRange ) ) { - USHORT nInsert = rLbCopyPos.InsertEntry( aName ); + sal_uInt16 nInsert = rLbCopyPos.InsertEntry( aName ); aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv ); rLbCopyPos.SetEntryData( nInsert, new String( aRefStr ) ); } - rBtnDestPers.Check( TRUE ); // beim Aufruf immer an + rBtnDestPers.Check( sal_True ); // beim Aufruf immer an rLbCopyPos.SelectEntryPos( 0 ); rEdCopyPos.SetText( EMPTY_STRING ); @@ -214,7 +214,7 @@ void ScFilterOptionsMgr::Init() rQueryData.nDestTab ).Format( aString, SCA_ABS_3D, pDoc, eConv ); - rBtnCopyResult.Check( TRUE ); + rBtnCopyResult.Check( sal_True ); rEdCopyPos.SetText( aString ); EdPosModifyHdl( &rEdCopyPos ); rLbCopyPos.Enable(); @@ -224,7 +224,7 @@ void ScFilterOptionsMgr::Init() } else { - rBtnCopyResult.Check( FALSE ); + rBtnCopyResult.Check( sal_False ); rEdCopyPos.SetText( EMPTY_STRING ); rLbCopyPos.Disable(); rEdCopyPos.Disable(); @@ -239,7 +239,7 @@ void ScFilterOptionsMgr::Init() //---------------------------------------------------------------------------- -BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const +sal_Bool ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const { String aPosStr( rPosStr ); xub_StrLen nColonPos = aPosStr.Search( ':' ); @@ -247,7 +247,7 @@ BOOL ScFilterOptionsMgr::VerifyPosStr( const String& rPosStr ) const if ( STRING_NOTFOUND != nColonPos ) aPosStr.Erase( nColonPos ); - USHORT nResult = ScAddress().Parse( aPosStr, pDoc, pDoc->GetAddressConvention() ); + 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<nCount && !bFound; i++ ) { diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index ce5874688..23ece03b2 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -44,19 +44,19 @@ static const sal_Char pStrFix[] = "FIX"; ScImportOptions::ScImportOptions( const String& rStr ) { - bFixedWidth = FALSE; + bFixedWidth = sal_False; nFieldSepCode = 0; if ( rStr.GetTokenCount(',') >= 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 4dec09c0f..094c200a5 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<SCCOL>(rEntry.nField) ); + sal_uInt16 nCondPos = (sal_uInt16)rEntry.eOp; + sal_uInt16 nFieldSelPos = GetFieldSelPos( static_cast<SCCOL>(rEntry.nField) ); aFieldLbArr[i]->SelectEntryPos( nFieldSelPos ); aCondLbArr [i]->SelectEntryPos( nCondPos ); - UpdateValueList( static_cast<USHORT>(i+1) ); + UpdateValueList( static_cast<sal_uInt16>(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<USHORT>(i) ); + UpdateValueList( static_cast<sal_uInt16>(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; i<nValueCount; i++ ) + for ( sal_uInt16 i=0; i<nValueCount; i++ ) { pValList->InsertEntry( (*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<USHORT>(nField - theQueryData.nCol1 + 1); + return static_cast<sal_uInt16>(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 c0dfde8de..040f101ae 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<ScDPLabelData::Member>& rMembers, USHORT nEmptyPos = LISTBOX_APPEND ) +bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND ) { bool bEmpty = false; vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end(); @@ -108,16 +108,16 @@ bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& 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<USHORT>(aArr.Count()); nIndex < nCount; ++nIndex ) + for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(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<USHORT>(i), !maLabelData.maMembers[i].mbVisible); + maLbHide.CheckEntryPos(static_cast<sal_uInt16>(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; nDim<nDimCount; nDim++) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; sal_Int32 nDimFlags = 0; String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags ); if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) ) @@ -775,7 +775,7 @@ String ScDPShowDetailDlg::GetDimensionName() const return aSelectedName; long nDim = itr->second; - 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 c62882bdc..19ebeeff3 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; i<nEntries; i++ ) delete (String*)aLbOutPos.GetEntryData( i ); @@ -209,7 +209,7 @@ void __EXPORT ScDPLayoutDlg::Init() aBtnOptions.SetClickHdl( LINK( this, ScDPLayoutDlg, ClickHdl ) ); aFuncNameArr.reserve( FUNC_COUNT ); - for ( USHORT i = 0; i < FUNC_COUNT; ++i ) + for ( sal_uInt16 i = 0; i < FUNC_COUNT; ++i ) aFuncNameArr.push_back( String( ScResId( i + 1 ) ) ); aBtnMore.AddWindow( &aFlAreas ); @@ -293,7 +293,7 @@ void __EXPORT ScDPLayoutDlg::Init() { if ( !aIter.WasDBName() ) // hier keine DB-Bereiche ! { - USHORT nInsert = aLbOutPos.InsertEntry( aName ); + sal_uInt16 nInsert = aLbOutPos.InsertEntry( aName ); aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, pDoc->GetAddressConvention() ); 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; (i<nCount); i++ ) { SCCOL nCol = pArr[i].nCol; - USHORT nMask = pArr[i].nFuncMask; + sal_uInt16 nMask = pArr[i].nFuncMask; if ( nCol != PIVOT_DATA_FIELD ) { @@ -483,7 +483,7 @@ void ScDPLayoutDlg::InitFocus() if( aWndSelect.IsEmpty() ) { aBtnOk.GrabFocus(); - NotifyFieldFocus( TYPE_SELECT, FALSE ); + NotifyFieldFocus( TYPE_SELECT, sal_False ); } else aWndSelect.GrabFocus(); @@ -524,7 +524,7 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po ScDPFuncDataVec* toArr = NULL; ScDPFuncDataVec* rmArr1 = NULL; ScDPFuncDataVec* rmArr2 = NULL; - BOOL bDataArr = FALSE; + sal_Bool bDataArr = sal_False; switch ( eToType ) { @@ -558,7 +558,7 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po case TYPE_DATA: toWnd = &aWndData; toArr = &aDataArr; - bDataArr = TRUE; + bDataArr = sal_True; break; default: @@ -605,7 +605,7 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po } else { - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; OUString aStr = GetFuncString( nMask, rData.mbIsValue ); aStr += rData.getDisplayName(); @@ -641,7 +641,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF ScDPFuncDataVec* rmArr1 = NULL; ScDPFuncDataVec* rmArr2 = NULL; size_t nAt = 0; - BOOL bDataArr = FALSE; + sal_Bool bDataArr = sal_False; switch ( eFromType ) { @@ -703,7 +703,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF case TYPE_DATA: toWnd = &aWndData; toArr = &aDataArr; - bDataArr = TRUE; + bDataArr = sal_True; break; default: @@ -757,7 +757,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF else { String aStr; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; aStr = GetFuncString( nMask ); aStr += GetLabelString( fData.mnCol ); @@ -781,7 +781,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF size_t nAt = 0; size_t nToIndex = 0; Point aToPos; - BOOL bDataArr = FALSE; + sal_Bool bDataArr = sal_False; switch ( eFromType ) { @@ -803,7 +803,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF case TYPE_DATA: theWnd = &aWndData; theArr = &aDataArr; - bDataArr = TRUE; + bDataArr = sal_True; break; default: @@ -838,7 +838,7 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF else { String aStr; - USHORT nMask = fData.mnFuncMask; + sal_uInt16 nMask = fData.mnFuncMask; aStr = GetFuncString( nMask ); aStr += GetLabelString( fData.mnCol ); @@ -887,39 +887,39 @@ void ScDPLayoutDlg::NotifyMouseButtonUp( const Point& rAt ) { if ( bIsDrag ) { - bIsDrag = FALSE; + bIsDrag = sal_False; ScDPFieldType eDnDToType = TYPE_SELECT; Point aPos = ScreenToOutputPixel( rAt ); - BOOL bDel = FALSE; + sal_Bool bDel = sal_False; if ( aRectPage.IsInside( aPos ) ) { eDnDToType = TYPE_PAGE; - bDel = FALSE; + bDel = sal_False; } else if ( aRectCol.IsInside( aPos ) ) { eDnDToType = TYPE_COL; - bDel = FALSE; + bDel = sal_False; } else if ( aRectRow.IsInside( aPos ) ) { eDnDToType = TYPE_ROW; - bDel = FALSE; + bDel = sal_False; } else if ( aRectData.IsInside( aPos ) ) { eDnDToType = TYPE_DATA; - bDel = FALSE; + bDel = sal_False; } else if ( aRectSelect.IsInside( aPos ) ) { eDnDToType = TYPE_SELECT; - bDel = TRUE; + bDel = sal_True; } else - bDel = TRUE; + bDel = sal_True; if ( bDel ) RemoveField( eDnDFromType, nDnDFromIndex ); @@ -983,7 +983,7 @@ PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt ) PointerStyle ScDPLayoutDlg::NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex ) { - bIsDrag = TRUE; + bIsDrag = sal_True; eDnDFromType = eType; nDnDFromIndex = nFieldIndex; return lclGetPointerForField( eType ); @@ -1083,18 +1083,18 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex ) //---------------------------------------------------------------------------- -void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bGotFocus ) +void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, sal_Bool bGotFocus ) { /* Enable Remove/Options buttons on GetFocus in field window. #107616# Enable them also, if dialog is deactivated (click into document). The !IsActive() condition handles the case that a LoseFocus event of a field window would follow the Deactivate event of this dialog. */ - BOOL bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT); + sal_Bool bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT); // #128113# The TestTool may set the focus into an empty field. // Then the Remove/Options buttons must be disabled. if ( bEnable && bGotFocus && GetFieldWindow( eType ).IsEmpty() ) - bEnable = FALSE; + bEnable = sal_False; aBtnRemove.Enable( bEnable ); aBtnOptions.Enable( bEnable ); @@ -1111,7 +1111,7 @@ void ScDPLayoutDlg::NotifyMoveField( ScDPFieldType eToType ) { MoveField( eLastActiveType, rWnd.GetSelectedField(), eToType, GetFieldWindow( eToType ).GetLastPosition() ); if( rWnd.IsEmpty() ) - NotifyFieldFocus( eToType, TRUE ); + NotifyFieldFocus( eToType, sal_True ); else rWnd.GrabFocus(); if( eLastActiveType == TYPE_SELECT ) @@ -1131,7 +1131,7 @@ void ScDPLayoutDlg::NotifyRemoveField( ScDPFieldType eType, size_t nFieldIndex ) //---------------------------------------------------------------------------- -BOOL ScDPLayoutDlg::NotifyMoveSlider( USHORT nKeyCode ) +sal_Bool ScDPLayoutDlg::NotifyMoveSlider( sal_uInt16 nKeyCode ) { long nOldPos = aSlider.GetThumbPos(); switch( nKeyCode ) @@ -1154,17 +1154,17 @@ void ScDPLayoutDlg::Deactivate() event from field window disables Remove/Options buttons. Re-enable them here by simulating a GetFocus event. Event order of LoseFocus and Deactivate is not important. The last event will enable the buttons in both cases (see NotifyFieldFocus). */ - NotifyFieldFocus( eLastActiveType, TRUE ); + NotifyFieldFocus( eLastActiveType, sal_True ); } //---------------------------------------------------------------------------- -BOOL ScDPLayoutDlg::Contains( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt ) +sal_Bool ScDPLayoutDlg::Contains( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt ) { if ( !pArr ) - return FALSE; + return sal_False; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; size_t i = 0; while ( (i<pArr->size()) && ((*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; (i<aDataArr.size()) && (aDataArr[i].get() != NULL ); i++ ) lcl_FillToPivotField( pDataArr[i], *aDataArr[i] ); @@ -1385,7 +1385,7 @@ BOOL ScDPLayoutDlg::GetPivotArrays( PivotField* pPageArr, else if ( rColCount < aColArr.size() ) pColArr[rColCount++].nCol = PIVOT_DATA_FIELD; else - bFit = FALSE; // kein Platz fuer Datenfeld + bFit = sal_False; // kein Platz fuer Datenfeld return bFit; } @@ -1393,7 +1393,7 @@ BOOL ScDPLayoutDlg::GetPivotArrays( PivotField* pPageArr, void ScDPLayoutDlg::UpdateSrcRange() { String theCurPosStr = aEdInPos.GetText(); - USHORT nResult = ScRange().Parse(theCurPosStr, pDoc, pDoc->GetAddressConvention()); + 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<sheet::XDimensionsSupplier> 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<nCount && !bFound; i++ ) { @@ -1760,7 +1760,7 @@ IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG ) IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG ) { String aString; - USHORT nSelPos = aLbOutPos.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbOutPos.GetSelectEntryPos(); if ( nSelPos > 1 ) { diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 709056d8d..922a8f974 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; n<nCount; n++ ) { XColorEntry* pEntry = pColorTable->GetColor(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 7414e672f..7dbe9b24b 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<USHORT>(nCharSet) ); + aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(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 3edb76f0b..59df08a66 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 34949ae51..0d6cff1c4 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; i<nEntries; i++ ) delete (String*)aLbFilterArea.GetEntryData( i ); @@ -149,7 +149,7 @@ void __EXPORT ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) if(pDoc->GetChangeTrack()!=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; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) { pData = (ScRangeData*)(pRangeNames->At( 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<nCount && !bFound; i++ ) { diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index 93ad45737..9b39032bd 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -46,8 +46,8 @@ ScSortDlg::ScSortDlg( Window* pParent, SfxTabDialog( pParent, ScResId( RID_SCDLG_SORT ), pArgSet ), - bIsHeaders ( FALSE ), - bIsByRows ( FALSE ) + bIsHeaders ( sal_False ), + bIsByRows ( sal_False ) { #if LAYOUT_SFX_TABDIALOG_BROKEN @@ -55,9 +55,9 @@ ScSortDlg::ScSortDlg( Window* pParent, AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 ); #else String fields = rtl::OUString::createFromAscii ("fields"); - AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND); + AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, sal_False, TAB_APPEND); String options = rtl::OUString::createFromAscii ("options"); - AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND); + AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, sal_False, TAB_APPEND); #endif FreeResource(); } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 0a222c545..1d3b4628a 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -62,7 +62,7 @@ using namespace com::sun::star; // STATIC DATA ----------------------------------------------------------- -static USHORT pSortRanges[] = +static sal_uInt16 pSortRanges[] = { SID_SORT, SID_SORT, @@ -83,7 +83,7 @@ static USHORT pSortRanges[] = * 31.01.95: * Die Klasse SfxTabPage bietet mittlerweile ein Verfahren an: * - * virtual BOOL HasExchangeSupport() const; -> 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; n<nFieldCount && !bFound; n++ ) + for ( sal_uInt16 n=1; n<nFieldCount && !bFound; n++ ) { if ( nFieldArr[n] == nField ) { nFieldPos = n; - bFound = TRUE; + bFound = sal_True; } } @@ -606,9 +606,9 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent, __EXPORT ScTabPageSortOptions::~ScTabPageSortOptions() { - USHORT nEntries = aLbOutPos.GetEntryCount(); + sal_uInt16 nEntries = aLbOutPos.GetEntryCount(); - for ( USHORT i=1; i<nEntries; i++ ) + for ( sal_uInt16 i=1; i<nEntries; i++ ) delete (String*)aLbOutPos.GetEntryData( i ); delete pColRes; @@ -662,7 +662,7 @@ void ScTabPageSortOptions::Init() String aRefStr; while ( aIter.Next( aName, aRange ) ) { - USHORT nInsert = aLbOutPos.InsertEntry( aName ); + sal_uInt16 nInsert = aLbOutPos.InsertEntry( aName ); aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, eConv ); aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) ); @@ -709,13 +709,13 @@ void ScTabPageSortOptions::Init() // get available languages - aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, FALSE ); + aLbLanguage.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_False ); aLbLanguage.InsertLanguage( LANGUAGE_SYSTEM ); } //------------------------------------------------------------------------ -USHORT* __EXPORT ScTabPageSortOptions::GetRanges() +sal_uInt16* __EXPORT ScTabPageSortOptions::GetRanges() { return pSortRanges; } @@ -738,13 +738,13 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) { if ( rSortData.bUserDef ) { - aBtnSortUser.Check( TRUE ); + aBtnSortUser.Check( sal_True ); aLbSortUser.Enable(); aLbSortUser.SelectEntryPos( rSortData.nUserIndex ); } else { - aBtnSortUser.Check( FALSE ); + aBtnSortUser.Check( sal_False ); aLbSortUser.Disable(); aLbSortUser.SelectEntryPos( 0 ); } @@ -775,7 +775,7 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) if ( pDoc && !rSortData.bInplace ) { String aStr; - USHORT nFormat = (rSortData.nDestTab != pViewData->GetTabNo()) + 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<rtl::OUString> 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; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) aLbSortUser.InsertEntry( (*pUserLists)[i]->GetString() ); } } @@ -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<nCount && !bFound; i++ ) { @@ -1043,7 +1043,7 @@ void __EXPORT ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) { - aLbAlgorithm.SetUpdateMode( FALSE ); + aLbAlgorithm.SetUpdateMode( sal_False ); aLbAlgorithm.Clear(); LanguageType eLang = aLbLanguage.GetSelectLanguage(); @@ -1052,8 +1052,8 @@ IMPL_LINK( ScTabPageSortOptions, FillAlgorHdl, void *, EMPTYARG ) // for LANGUAGE_SYSTEM no algorithm can be selected because // it wouldn't necessarily exist for other languages // -> 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 54c0d5b2b..a7b348e71 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; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) { - pData = (USHORT*)(aLbColumns.GetEntryData( i )); + pData = (sal_uInt16*)(aLbColumns.GetEntryData( i )); DBG_ASSERT( pData, "EntryData not found" ); delete pData; @@ -133,32 +133,32 @@ void ScTpSubTotalGroup::Init() //------------------------------------------------------------------------ -USHORT* __EXPORT ScTpSubTotalGroup::GetRanges() +sal_uInt16* __EXPORT ScTpSubTotalGroup::GetRanges() { return pSubTotalsRanges; } // ----------------------------------------------------------------------- -BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, +sal_Bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo, const SfxItemSet& rArgSet ) { - USHORT nGroupIdx = 0; + sal_uInt16 nGroupIdx = 0; DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "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; i<nSubTotals; i++ ) + for ( sal_uInt16 i=0; i<nSubTotals; i++ ) { - USHORT nCheckPos = GetFieldSelPos( pSubTotals[i] ); - USHORT* pFunction = (USHORT*)aLbColumns.GetEntryData( nCheckPos ); + sal_uInt16 nCheckPos = GetFieldSelPos( pSubTotals[i] ); + sal_uInt16* pFunction = (sal_uInt16*)aLbColumns.GetEntryData( nCheckPos ); aLbColumns.CheckEntryPos( nCheckPos ); *pFunction = FuncToLbPos( pFunctions[i] ); @@ -192,15 +192,15 @@ BOOL ScTpSubTotalGroup::DoReset( USHORT nGroupNo, aLbFunctions.SelectEntryPos( 0 ); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, +sal_Bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo, SfxItemSet& rArgSet ) { - USHORT nGroupIdx = 0; + sal_uInt16 nGroupIdx = 0; DBG_ASSERT( (nGroupNo<=3) && (nGroupNo>0), "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; i<nEntryCount; i++ ) + for ( sal_uInt16 i=0, nCheck=0; i<nEntryCount; i++ ) { if ( aLbColumns.IsChecked( i ) ) { DBG_ASSERT( nCheck <= nCheckCount, "Range error :-(" ); - nFunction = *((USHORT*)aLbColumns.GetEntryData( i )); + nFunction = *((sal_uInt16*)aLbColumns.GetEntryData( i )); pSubTotals[nCheck] = nFieldArr[i]; pFunctions[nCheck] = LbPosToFunc( nFunction ); nCheck++; @@ -276,7 +276,7 @@ BOOL ScTpSubTotalGroup::DoFillItemSet( USHORT nGroupNo, if ( pSubTotals ) delete [] pSubTotals; if ( pFunctions ) delete [] pFunctions; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -292,7 +292,7 @@ void ScTpSubTotalGroup::FillListBoxes() SCTAB nTab = pViewData->GetTabNo(); 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<nFieldCount && !bFound; n++ ) + for ( sal_uInt16 n=0; n<nFieldCount && !bFound; n++ ) { if ( nFieldArr[n] == nField ) { nFieldPos = n; - bFound = TRUE; + bFound = sal_True; } } @@ -341,7 +341,7 @@ USHORT ScTpSubTotalGroup::GetFieldSelPos( SCCOL nField ) // ----------------------------------------------------------------------- -ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos ) +ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( sal_uInt16 nPos ) { switch ( nPos ) { @@ -365,7 +365,7 @@ ScSubTotalFunc ScTpSubTotalGroup::LbPosToFunc( USHORT nPos ) // ----------------------------------------------------------------------- -USHORT ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc ) +sal_uInt16 ScTpSubTotalGroup::FuncToLbPos( ScSubTotalFunc eFunc ) { switch ( eFunc ) { @@ -396,9 +396,9 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, ListBox *, pLb ) if ( (aLbColumns.GetEntryCount() > 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; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) aLbUserDef.InsertEntry( (*pUserLists)[i]->GetString() ); } } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 532a16b1f..f3b9f91a5 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 if( m_bOwnRefHdlr ) - RemoveRefDlg( FALSE ); + RemoveRefDlg( sal_False ); //-->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<USHORT>( + rArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>( lclGetValModeFromPos( maLbAllow.GetSelectEntryPos() ) ) ) ); - rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>( + rArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( 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 9c4655fa7..0088548f3 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 a38eb742e..28863a0c9 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; i<nCount; i++) delete (ScAutoStyleData*) aEntries.GetObject(i); nCount = aInitials.Count(); @@ -95,7 +95,7 @@ ScAutoStyleList::~ScAutoStyleList() // initial short delay (asynchronous call) void ScAutoStyleList::AddInitial( const ScRange& rRange, const String& rStyle1, - ULONG nTimeout, const String& rStyle2 ) + sal_uLong nTimeout, const String& rStyle2 ) { ScAutoStyleInitData* pNew = new ScAutoStyleInitData( rRange, rStyle1, nTimeout, rStyle2 ); @@ -105,8 +105,8 @@ void ScAutoStyleList::AddInitial( const ScRange& rRange, const String& rStyle1, IMPL_LINK( ScAutoStyleList, InitHdl, Timer*, EMPTYARG ) { - ULONG nCount = aInitials.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aInitials.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScAutoStyleInitData* pData = (ScAutoStyleInitData*) aInitials.GetObject(i); @@ -126,15 +126,15 @@ IMPL_LINK( ScAutoStyleList, InitHdl, Timer*, EMPTYARG ) //================================================================== -void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle ) +void ScAutoStyleList::AddEntry( sal_uLong nTimeout, const ScRange& rRange, const String& rStyle ) { aTimer.Stop(); - ULONG nNow = TimeNow(); + sal_uLong nNow = TimeNow(); // alten Eintrag loeschen - ULONG nCount = aEntries.Count(); - ULONG i; + sal_uLong nCount = aEntries.Count(); + sal_uLong i; for (i=0; i<nCount; i++) { ScAutoStyleData* pData = (ScAutoStyleData*) aEntries.GetObject(i); @@ -157,7 +157,7 @@ void ScAutoStyleList::AddEntry( ULONG nTimeout, const ScRange& rRange, const Str // Einfuege-Position suchen - ULONG nPos = LIST_APPEND; + sal_uLong nPos = LIST_APPEND; for (i=0; i<nCount && nPos == LIST_APPEND; i++) if (nTimeout <= ((ScAutoStyleData*) aEntries.GetObject(i))->nTimeout) 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; i<nCount; i++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScAutoStyleData* pData = (ScAutoStyleData*) aEntries.GetObject(i); if ( pData->nTimeout <= 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; i<nCount; i++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScAutoStyleData* pData = (ScAutoStyleData*) aEntries.GetObject(i); @@ -212,11 +212,11 @@ void ScAutoStyleList::ExecuteAllNow() aEntries.Clear(); } -void ScAutoStyleList::StartTimer( ULONG nNow ) // Sekunden +void ScAutoStyleList::StartTimer( sal_uLong nNow ) // Sekunden { // ersten Eintrag mit Timeout != 0 suchen - ULONG nPos = 0; + sal_uLong nPos = 0; ScAutoStyleData* pData; while ( (pData = (ScAutoStyleData*) aEntries.GetObject(nPos)) != NULL && pData->nTimeout == 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 ca09bc8ec..ba601238c 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<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(nOutEndCol), MAXROW, nTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); pDoc->CopyToDocument( 0, static_cast<SCROW>(nOutStartRow), nTab, MAXCOL, static_cast<SCROW>(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; i<nEC; i++) - aOldQuery.GetEntry(i).bDoQuery = FALSE; - aOldQuery.bDuplicate = TRUE; + aOldQuery.GetEntry(i).bDoQuery = sal_False; + aOldQuery.bDuplicate = sal_True; Query( nTab, aOldQuery, NULL, bRecord, bApi ); } } ScQueryParam aLocalParam( rQueryParam ); // fuer Paint / Zielbereich - BOOL bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query + sal_Bool bCopy = !rQueryParam.bInplace; // kopiert wird in Table::Query ScDBData* pDestData = NULL; // Bereich, in den kopiert wird - BOOL bDoSize = FALSE; // Zielgroesse anpassen (einf./loeschen) + sal_Bool bDoSize = sal_False; // Zielgroesse anpassen (einf./loeschen) SCCOL nFormulaCols = 0; // nur bei bDoSize - BOOL bKeepFmt = FALSE; + sal_Bool bKeepFmt = sal_False; ScRange aOldDest; ScRange aDestTotal; if ( bCopy && rQueryParam.nDestCol == rQueryParam.nCol1 && rQueryParam.nDestRow == rQueryParam.nRow1 && rQueryParam.nDestTab == nTab ) - bCopy = FALSE; + bCopy = sal_False; SCTAB nDestTab = nTab; if ( bCopy ) { @@ -705,7 +705,7 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, { if (!bApi) rDocShell.ErrorMessage(STR_PASTE_FULL); - return FALSE; + return sal_False; } ScEditableTester aTester( pDoc, nDestTab, aLocalParam.nCol1,aLocalParam.nRow1, @@ -714,11 +714,11 @@ BOOL ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } pDestData = pDoc->GetDBAtCursor( 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<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(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<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(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; i<nCount && !bFound; i++) + sal_Bool bFound = sal_False; + sal_uInt16 nCount = rDBColl.GetCount(); + for (sal_uInt16 i=0; i<nCount && !bFound; i++) { pData = rDBColl[i]; if (pData->GetName() == 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 6a91431c1..dffad5748 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<beans::PropertyValue>& 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<sdbc::XResultSet> xResSet; uno::Sequence<uno::Any> 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<BYTE>( ( nType == sdb::CommandType::QUERY ) ? ScDbQuery : ScDbTable ); + aImParam.nType = sal::static_int_cast<sal_uInt8>( ( 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<sdbc::XRowSet> xRowSet = uno::Reference<sdbc::XRowSet>( 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 900aa71aa..49786537d 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; nTab<nTabCount; nTab++) if (pDoc->IsStreamValid(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; i<nCount; i++) + sal_uInt16 nCount = pList->Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDetOpData* pData = (*pList)[i]; if (pData) @@ -531,45 +531,45 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic ) } } rDocShell.SetDrawModified(); - bDone = TRUE; + bDone = sal_True; } return bDone; } //------------------------------------------------------------------------ -BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags, - BOOL bRecord, BOOL bApi ) +sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, + sal_Bool bRecord, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) { DBG_ERROR("ScDocFunc::DeleteContents ohne Markierung"); - return FALSE; + return sal_False; } 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; - 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; nTab<nTabCount; nTab++) if (aMultiMark.GetTableSelect(nTab) && pDoc->IsTabProtected(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<ScMyRememberItem*> 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<nCount; i++) + sal_uInt16 nCount = rEngine.GetParagraphCount(); + for (sal_uInt16 i=0; i<nCount; i++) { const SfxItemSet& rOld = rEngine.GetParaAttribs( i ); if ( rOld.Count() ) @@ -965,9 +965,9 @@ BOOL ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, if ( aPattern.GetItemSet().Count() > 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; j<nTabCount && pDoc->IsScenario(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<ScRange> 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; j<nTabCount && pDoc->IsScenario(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; j<nTabCount && pDoc->IsScenario(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<ScRange> 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; i<nTabCount; i++ ) { if( aMark.GetTableSelect( i ) ) rDocShell.UpdatePaintExt( nExtFlags, nStartCol, nStartRow, i, nEndCol, nEndRow, i ); } - BOOL bUndoOutline = FALSE; + sal_Bool bUndoOutline = sal_False; switch (eCmd) { case DEL_CELLSUP: @@ -2089,10 +2089,10 @@ BOOL ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, pRefUndoDoc->DeleteAreaTab(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; i<nCount; i++) if (pDoc->IsVisible(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<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); + pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pUndoDoc ); } else { - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(nEnd), nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, static_cast<SCROW>(nStart), nTab, MAXCOL, static_cast<SCROW>(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; nRangeNo<nRangeCnt; nRangeNo++) @@ -3192,14 +3192,14 @@ BOOL ScDocFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRa { if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) { - BOOL bAll = ( eMode==SC_SIZE_OPTIMAL ); + sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL ); if (!bAll) { // fuer alle eingeblendeten CR_MANUALSIZE loeschen, // dann SetOptimalHeight mit bShrink = FALSE for (SCROW nRow=nStartNo; nRow<=nEndNo; nRow++) { - BYTE nOld = pDoc->GetRowFlags(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<SCCOLROW>(rPos.Col()) : static_cast<SCCOLROW>(rPos.Row()); if (nPos == 0) - return FALSE; // erste Spalte / Zeile + return sal_False; // erste Spalte / Zeile ScBreakType nBreak = bColumn ? pDoc->HasColBreak(static_cast<SCCOL>(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<SCCOL>(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<SCCOL>(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; nTab<nTabCount; nTab++) if (aMark.GetTableSelect(nTab)) { - SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, FALSE, TRUE); - SetWidthOrHeight( FALSE,1,nRows, nTab, SC_SIZE_VISOPT, 0, FALSE, FALSE); + SetWidthOrHeight( sal_True, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, sal_False, sal_True); + SetWidthOrHeight( sal_False,1,nRows, nTab, SC_SIZE_VISOPT, 0, sal_False, sal_False); rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP ); } @@ -3770,8 +3770,8 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, for (SCTAB nTab=0; nTab<nTabCount; nTab++) if (aMark.GetTableSelect(nTab)) { - BOOL bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab, - nEndCol, nEndRow, nTab), FALSE ); + sal_Bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab, + nEndCol, nEndRow, nTab), sal_False ); if (bAdj) rDocShell.PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT ); @@ -3797,13 +3797,13 @@ BOOL ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, //------------------------------------------------------------------------ -BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, - const ScTokenArray* pTokenArray, const String& rString, BOOL bApi, BOOL bEnglish, +sal_Bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, + const ScTokenArray* pTokenArray, const String& rString, sal_Bool bApi, sal_Bool bEnglish, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { 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(); @@ -3812,7 +3812,7 @@ BOOL ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark, SCROW nEndRow = rRange.aEnd.Row(); SCTAB nEndTab = rRange.aEnd.Tab(); - BOOL bUndo(pDoc->IsUndoEnabled()); + 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<SCROW>( aSourceArea.aEnd.Row() + nCount ) ); break; case FILL_TO_TOP: - if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Row() )) + if (nCount > sal::static_int_cast<sal_uLong>( 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<SCCOL>( aSourceArea.aEnd.Col() + nCount ) ); break; case FILL_TO_LEFT: - if (nCount > sal::static_int_cast<ULONG>( aSourceArea.aStart.Col() )) + if (nCount > sal::static_int_cast<sal_uLong>( 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; i<nCount; i++) { ScRangeData* pData = (*pList)[i]; @@ -4680,13 +4680,13 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi ) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( 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; i<nCount; i++) { ScRangeData* pData = (*pList)[i]; @@ -4724,7 +4724,7 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi ) ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); pRedoDoc->InitUndo( 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 (nLinkPos<nLinkCount) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[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 e934e2993..fd0149f75 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; nDP<nDPCount; nDP++) + sal_uInt16 nDPCount = pDPCollection->GetCount(); + for (sal_uInt16 nDP=0; nDP<nDPCount; nDP++) { ScDPObject* pDPObj = (*pDPCollection)[nDP]; if ( !pDPObj->GetName().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<const SfxStringItem*>(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.nTableCount; i++ ) - rDocStat.nPageCount = sal::static_int_cast<USHORT>( rDocStat.nPageCount + - (USHORT) ScPrintFunc( this, pPrinter, i ).GetTotalPages() ); + rDocStat.nPageCount = sal::static_int_cast<sal_uInt16>( 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 33bd6fbb1..7ab559efa 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<BYTE>( aAsian.GetCharDistanceCompression() ) ); + aDocument.SetAsianCompression( sal::static_int_cast<sal_uInt8>( 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 2567408bb..41685a95a 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; i<nCount; i++ ) + sal_uInt16 nParts = pPaint->GetParts(); + sal_uLong nCount = xRangeList->Count(); + for ( sal_uLong i=0; i<nCount; i++ ) { //! nExtFlags ??? ScRange aRange = *xRangeList->GetObject(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<USHORT>( ::utl::MiscCfg().GetYear2000() ) ); + aDocOpt.SetYear2000( sal::static_int_cast<sal_uInt16>( ::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 39277f06f..632bcfa27 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; i<pDBColl->GetCount(); i++) + for (sal_uInt16 i=0; i<pDBColl->GetCount(); 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; nTab<nTabCount; nTab++) if (aDocument.IsStreamValid(nTab)) - aDocument.SetStreamValid(nTab, FALSE); + aDocument.SetStreamValid(nTab, sal_False); PostPaintGridAll(); } @@ -1340,7 +1340,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const String& rStyle ) void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) { - USHORT nId = rHint.GetHint(); + sal_uInt16 nId = rHint.GetHint(); const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet(); if (!pStyle) return; @@ -1353,7 +1353,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) String aNewName = pStyle->GetName(); 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; nTab<nTabCount && !bFound; nTab++ ) @@ -1985,17 +1985,17 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( 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; nTab<nTabCount && !bHasTransp; nTab++ ) @@ -2091,8 +2091,8 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, pMarkedRange ); else if ( aDocument.GetPrintRangeCount(nTab) ) { - USHORT nRangeCount = aDocument.GetPrintRangeCount(nTab); - for (USHORT i=0; i<nRangeCount; i++) + sal_uInt16 nRangeCount = aDocument.GetPrintRangeCount(nTab); + for (sal_uInt16 i=0; i<nRangeCount; i++) bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, aDocument.GetPrintRange( nTab, i ) ); } @@ -2103,11 +2103,11 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, } } - BOOL bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp ); + sal_Bool bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp ); if ( bContinue ) { - for ( USHORT n=0; n<nCollateCopies; n++ ) + for ( sal_uInt16 n=0; n<nCollateCopies; n++ ) { long nTabStart = 0; long nDisplayStart = 0; @@ -2128,12 +2128,12 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, { pDrawView = new FmFormView( pModel, pPrinter ); pDrawView->ShowSdrPage(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<SCTAB>(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 ac2a4132b..34d4b86ca 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; i<nCount; i++ ) + sal_uInt16 nCount = pColl->GetCount(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { ScDPObject* pOld = (*pColl)[i]; if ( pOld ) @@ -485,7 +485,7 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource ) { ScDPObject* pNew = new ScDPObject( *pOld ); ScDBDocFunc aFunc( *this ); - aFunc.DataPilotUpdate( pOld, pNew, TRUE, FALSE ); + aFunc.DataPilotUpdate( pOld, pNew, sal_True, sal_False ); delete pNew; // DataPilotUpdate copies settings from "new" object } } @@ -496,14 +496,14 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource ) String lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea ) { String aName; - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart, pArea->nColEnd, pArea->nRowEnd ); if (pData) { pData->GetName( aName ); if ( aName != ScGlobal::GetRscString( STR_DB_NONAME ) ) - bOk = TRUE; + bOk = sal_True; } if (!bOk) @@ -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; nPos<rParam.nDataAreaCount; nPos++) { ScArea* pArea = rParam.ppDataAreas[nPos]; @@ -529,7 +529,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord ) // Test, ob Quelldaten verschoben wuerden if (rParam.bReferenceData) if (pArea->nTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow) - bErr = TRUE; + bErr = sal_True; } if (bErr) @@ -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 ( nSrcTab<nDestTab && nDestTab!=SC_TAB_APPEND ) nDestTab--; @@ -941,11 +941,11 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec if ( nSrcTab == nDestTab ) { //! allow only for api calls? - return TRUE; // nothing to do, but valid + return sal_True; // nothing to do, but valid } if (!aDocument.MoveTab( nSrcTab, nDestTab )) - return FALSE; + return sal_False; else if (bRecord) { SvShorts aSrcList; @@ -964,7 +964,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return TRUE; + return sal_True; } @@ -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<ScDBData*>(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 5c6a411bc..5136d5e2c 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; j<i && !bThere; j++) // im Dokument mehrfach? if (aDocument.IsLinked(j) && aDocument.GetLinkDoc(j) == aDocName @@ -411,7 +411,7 @@ void ScDocShell::UpdateLinks() // Ignore refresh delay in compare, it should be the // same for identical links and we don't want dupes // if it ain't. - bThere = TRUE; + bThere = sal_True; if (!bThere) // schon als Filter eingetragen? { @@ -419,38 +419,38 @@ void ScDocShell::UpdateLinks() if (!aNames.Insert(pData)) { delete pData; - bThere = TRUE; + bThere = sal_True; } } if (!bThere) { ScTableLink* pLink = new ScTableLink( this, aDocName, aFltName, aOptions, nRefresh ); - pLink->SetInCreate( 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; i<nCount; i++ ) + sal_Bool bAny = sal_False; + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[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 589b0c67a..44a3444aa 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<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet) + sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _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<sdbc::XDriverManager> xDrvMan; uno::Reference<sdbc::XConnection> 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; i<nColCount; i++) { ScDatabaseDocUtil::PutData( &aDocument, nCol, nRow, 0, - xRow, i+1, pTypeArr[i], FALSE, + xRow, i+1, pTypeArr[i], sal_False, &bSimpleColWidth[nCol] ); ++nCol; } @@ -381,7 +381,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, } else // past the end of the spreadsheet { - bEnd = TRUE; // don't continue + bEnd = sal_True; // don't continue nErr = SCWARN_IMPORT_RANGE_OVERFLOW; // warning message } @@ -415,15 +415,15 @@ inline sal_Bool IsAsciiAlpha( sal_Unicode c ) } void lcl_GetColumnTypes( ScDocShell& rDocShell, - const ScRange& rDataRange, BOOL bHasFieldNames, + const ScRange& rDataRange, sal_Bool bHasFieldNames, rtl::OUString* pColNames, sal_Int32* pColTypes, sal_Int32* pColLengths, sal_Int32* pColScales, - BOOL& bHasMemo, CharSet eCharSet ) + sal_Bool& bHasMemo, CharSet eCharSet ) { // updating of column titles didn't work in 5.2 and isn't always wanted // (saving normally shouldn't modify the document) //! read flag from configuration - BOOL bUpdateTitles = FALSE; + sal_Bool bUpdateTitles = sal_False; ScDocument* pDoc = rDocShell.GetDocument(); SvNumberFormatter* pNumFmt = pDoc->GetFormatTable(); @@ -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<sdbc::XDriverManager> xDrvMan; uno::Reference<sdbc::XConnection> 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 103889520..b2fbcd396 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 269c3d585..32553dcda 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<ScFormulaCell*>(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<ScFormulaCell*>(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<SfxMedium> 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 1edfc2d2e..e5c7d4e45 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; nPos<nLen && (bInNum || nFound<nMaxNumberParts); nPos++ ) { if (bInNum && nFound == 3 && nColFormat == SC_COL_YMD && nPos <= nStart[nFound]+2 && rStr.GetChar(nPos) == 'T') - bInNum = FALSE; // ISO-8601: YYYY-MM-DDThh:mm... + bInNum = sal_False; // ISO-8601: YYYY-MM-DDThh:mm... else if ((((!bInNum && nFound==nMP) || (bInNum && nFound==nMP+1)) && ScGlobal::pCharClass->isLetterNumeric( 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<sal_Int16>( 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<sal_Int16>( 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<ScProgress> 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<nInfoCount && nCol <= MAXCOL+1; i++ ) { - BYTE nFmt = pColFormat[i]; + sal_uInt8 nFmt = pColFormat[i]; if (nFmt != SC_COL_SKIP) // sonst auch nCol nicht hochzaehlen { if (nCol > 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<nInfoCount; i++ ) { if ( pColStart[i] == nSourceCol + 1 ) // pColStart ist 1-basiert @@ -1304,7 +1304,7 @@ BOOL ScImportExport::ExtText2Doc( SvStream& rStrm ) if ( nFmt != SC_COL_SKIP ) { if (nCol > 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 105783b8c..19e5f9279 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<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast<SCCOL>(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 (nStart<nMin) nMin=nStart; if (nEnd>nMax) nMax=nEnd; } } for ( i=nMin; i<=nMax; i++ ) - pDoc->ShowCol( static_cast<SCCOL>(i), nTab, TRUE ); + pDoc->ShowCol( static_cast<SCCOL>(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 (nStart<nMin) nMin=nStart; if (nEnd>nMax) 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<SCCOL>(nEffStartCol), 0, nTab, static_cast<SCCOL>(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<SCCOLROW>(nStartCol)<=nEnd && static_cast<SCCOLROW>(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<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast<SCCOL>(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<SCCOL>(i), nTab, TRUE ); + pDoc->ShowCol( static_cast<SCCOL>(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<SCCOL>(i), nTab, FALSE ); + pDoc->ShowCol( static_cast<SCCOL>(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<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, + static_cast<SCCOL>(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<SCCOL>(i), nTab, FALSE ); + pDoc->ShowCol( static_cast<SCCOL>(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 26721bb35..f13b64697 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<nUsed; i++) + for (sal_uInt16 i=0; i<nUsed; i++) if ( pData[i].GetPrintRange() != rOther.pData[i].GetPrintRange() ) - return FALSE; + return sal_False; //! ScPrintRangeData komplett vergleichen ?? - return TRUE; + return sal_True; } void ScPageBreakData::AddPages() @@ -127,7 +127,7 @@ void ScPageBreakData::AddPages() if ( nUsed > 1 ) { long nPage = pData[0].GetFirstPage(); - for (USHORT i=0; sal::static_int_cast<size_t>(i+1)<nUsed; i++) + for (sal_uInt16 i=0; sal::static_int_cast<size_t>(i+1)<nUsed; i++) { nPage += ((long)pData[i].GetPagesX())*pData[i].GetPagesY(); pData[i+1].SetFirstPage( nPage ); diff --git a/sc/source/ui/docshell/pntlock.cxx b/sc/source/ui/docshell/pntlock.cxx index 2b8bc5b11..830a57e71 100644 --- a/sc/source/ui/docshell/pntlock.cxx +++ b/sc/source/ui/docshell/pntlock.cxx @@ -34,12 +34,12 @@ //------------------------------------------------------------------------ -ScPaintLockData::ScPaintLockData(USHORT nNewMode) : +ScPaintLockData::ScPaintLockData(sal_uInt16 nNewMode) : nMode( nNewMode ), nLevel( 0 ), nDocLevel( 0 ), nParts( 0 ), - bModified( FALSE ) + bModified( sal_False ) { } @@ -47,7 +47,7 @@ ScPaintLockData::~ScPaintLockData() { } -void ScPaintLockData::AddRange( const ScRange& rRange, USHORT nP ) +void ScPaintLockData::AddRange( const ScRange& rRange, sal_uInt16 nP ) { if (!xRangeList.Is()) xRangeList = new ScRangeList; diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index 1d69e2661..ecc740b6b 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -43,7 +43,7 @@ // ----------------------------------------------------------------------- -BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName ) +sal_Bool lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& rName ) { if (pDocSh) { @@ -51,16 +51,16 @@ BOOL lcl_FillRangeFromName( ScRange& rRange, ScDocShell* pDocSh, const String& r ScRangeName* pNames = pDoc->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 a207f963f..0c91f6e5d 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 a0a8ad759..6fa098575 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; nTab<nCount; nTab++) { - BYTE nMode = pDoc->GetLinkMode(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; nPos<nRanges; nPos++) + for (sal_uLong nPos=0; nPos<nRanges; nPos++) { const ScRange* pRange = aErrorCells.GetObject(nPos); SCCOL nStartCol = pRange->aStart.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 59af90ebc..cc87a99af 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 d1ab807a1..c7ba2d956 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; index<nObj; ++index ) + sal_uLong nObj = pOL->GetObjCount(); + for ( sal_uLong index=0; index<nObj; ++index ) { - pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(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 7d1392ba0..19d72d68d 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -57,7 +57,7 @@ #include <svx/svdoole2.hxx> #include <svx/svdocapt.hxx> -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 disablen // #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 disablen } } - 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 disablen #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<SdrOle2Obj*>(rMarkList.GetMark( 0 )->GetMarkedSdrObj()); @@ -273,7 +273,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disablen 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; i<nCount; i++) + sal_Bool bResult=sal_True; + sal_uLong nCount = rMark.GetMarkCount(); + for (sal_uLong i=0; i<nCount; i++) { SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj(); 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 e613437d4..15203714e 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 2908af8dd..d5bbef227 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<const SfxBoolItem&>(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 7373142a9..37689379c 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; nPar<nParCount; nPar++) + sal_uLong nParCount = pOutliner->GetParagraphCount(); + for (sal_uLong nPar=0; nPar<nParCount; nPar++) if ( 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 2a06767d5..8e678380c 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 7f21071b5..3520f4676 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 9af9aad22..9d0108317 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<UINT16>( aObjKind ) ); + pView->SetCurrentObj( sal::static_int_cast<sal_uInt16>( aObjKind ) ); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 96d1eb9e1..55a0392bb 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 47c2c9234..f49cbd0fd 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<UINT16>(eKind)); + pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(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 61a35df31..6a64ad54c 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<UINT16>(aObjKind)); + pView->SetCurrentObj(sal::static_int_cast<sal_uInt16>(aObjKind)); aOldPointer = pWindow->GetPointer(); pViewShell->SetActivePointer( aNewPointer ); diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index ca1378011..527bb3c6b 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 0cbbb9199..7f5325100 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 4cbd08dae..cb94b0cb5 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 80d6324c8..e697113c1 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 c199324db..bf765344a 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 zeichnen //------------------------------------------------------------------------ #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; i<nCount; i++) + for (sal_uLong i=1; i<nCount; i++) aPositionRange.ExtendTo( *aRanges.GetObject(i) ); } @@ -566,7 +566,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* ScRangeListRef aDummy; Rectangle aMarkDest; SCTAB nMarkTab; - BOOL bDrawRect = pViewShell->GetChartArea( 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<UINT16>(pScDoc->GetTableCount()); + nToTable = static_cast<sal_uInt16>(pScDoc->GetTableCount()); else - nToTable = static_cast<UINT16>(pData->GetTabNo()); + nToTable = static_cast<sal_uInt16>(pData->GetTabNo()); } } else { if (bDrawRect) - nToTable = static_cast<UINT16>(nMarkTab); + nToTable = static_cast<sal_uInt16>(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 c3602ce0e..9ff17507b 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 314b16b2a..001cc7bbd 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 2c284d3df..05a1ffe81 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<FuText*>(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 36d2f1cbb..7f4512ec7 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 11f7574f0..477fabf79 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 dd6c80f17..f76d0094a 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 e38dba336..70beb996d 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 92d8b6c5a..9965850a6 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 a19b3e984..55cb53dc3 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; i<LRU_MAX; i++ ) aLRUList[i] = NULL; @@ -219,7 +219,7 @@ void ScFunctionDockWin::InitLRUList() aLRUList[i] = pFuncMgr->Get( 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()<nMinWidth) aNewSize.Width()=nMinWidth; + if((sal_uLong)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth; Size aCDSize=aCatBox.GetSizePixel(); Size aFLSize=aFuncList.GetSizePixel(); @@ -471,7 +471,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize) void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize) { - if((ULONG)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight; + if((sal_uLong)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight; Size aFLSize=aFuncList.GetSizePixel(); Size aSplitterSize=aPrivatSplit.GetSizePixel(); @@ -520,7 +520,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize) void ScFunctionDockWin::SetMyWidthToBo(Size &aNewSize) { - if((ULONG)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth; + if((sal_uLong)aNewSize.Width()<nMinWidth) aNewSize.Width()=nMinWidth; Size aCDSize=aCatBox.GetSizePixel(); Size aDdFLSize=aDDFuncList.GetSizePixel(); @@ -561,7 +561,7 @@ void ScFunctionDockWin::SetMyWidthToBo(Size &aNewSize) void ScFunctionDockWin::SetMyHeightToBo(Size &aNewSize) { - if((ULONG)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight; + if((sal_uLong)aNewSize.Height()<nMinHeight) aNewSize.Height()=nMinHeight; Size aFDSize=aFiFuncDesc.GetSizePixel(); @@ -644,8 +644,8 @@ void ScFunctionDockWin::SetDescription() void __EXPORT ScFunctionDockWin::Resizing( Size& rNewSize ) { - if((ULONG)rNewSize.Width()<nMinWidth) rNewSize.Width()=nMinWidth; - if((ULONG)rNewSize.Height()<nMinHeight) rNewSize.Height()=nMinHeight; + if((sal_uLong)rNewSize.Width()<nMinWidth) rNewSize.Width()=nMinWidth; + if((sal_uLong)rNewSize.Height()<nMinHeight) rNewSize.Height()=nMinHeight; } @@ -663,9 +663,9 @@ void __EXPORT ScFunctionDockWin::Resizing( Size& rNewSize ) #* #************************************************************************/ -BOOL __EXPORT ScFunctionDockWin::Close() +sal_Bool __EXPORT ScFunctionDockWin::Close() { - SfxBoolItem aItem( FID_FUNCTION_BOX, FALSE ); + SfxBoolItem aItem( FID_FUNCTION_BOX, sal_False ); GetBindings().GetDispatcher()->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; i<LRU_MAX && aLRUList[i]; i++ ) + for ( sal_uInt16 i=0; i<LRU_MAX && aLRUList[i]; i++ ) { const ScFuncDesc* pDesc = aLRUList[i]; pAllFuncList->SetEntryData( @@ -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<USHORT>( aStr.ToInt32() ); + sal_uInt16 nSelPos=sal::static_int_cast<sal_uInt16>( aStr.ToInt32() ); aCatBox.SelectEntryPos(nSelPos); SelHdl(&aCatBox); diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index a0847374b..a8b58707e 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<ScFormulaCell> 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 8c8a970be..11609dc04 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 05be4a010..50d6d813b 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 6593dc563..4966ae428 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 42be09305..40f816ce2 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<Accelerator> 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 protected: Window * GetWindow(){ return m_pWindow; } public: bool CanInputStart( const ScRefEdit *pEdit ){ return !!pEdit; } - bool CanInputDone( BOOL bForced ){ return pRefEdit && (bForced || !pRefBtn); } + bool CanInputDone( sal_Bool bForced ){ return pRefEdit && (bForced || !pRefBtn); } //<!--Added by PengYunQuan for Validity Cell Range Picker }; //============================================================================ @@ -148,15 +148,15 @@ private: protected: - virtual BOOL DoClose( USHORT nId ); + virtual sal_Bool DoClose( sal_uInt16 nId ); - void SetDispatcherLock( BOOL bLock ); + void SetDispatcherLock( sal_Bool bLock ); //Overwrite TWindow will implemented by ScRefHdlrImplBase //virtual long PreNotify( NotifyEvent& rNEvt ); virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); - virtual void RefInputDone( BOOL bForced = FALSE ); + virtual void RefInputDone( sal_Bool bForced = sal_False ); void ShowSimpleReference( const XubString& rStr ); void ShowFormulaReference( const XubString& rStr ); @@ -164,18 +164,18 @@ protected: public: ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW, - Window* pParent, USHORT nResId*/, bool bBindRef ); + Window* pParent, sal_uInt16 nResId*/, bool bBindRef ); virtual ~ScRefHandler(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0; virtual void AddRefEntry(); - virtual BOOL IsRefInputMode() const; - virtual BOOL IsTableLocked() const; - virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const; + virtual sal_Bool IsRefInputMode() const; + virtual sal_Bool IsTableLocked() const; + virtual sal_Bool IsDocAllowed( SfxObjectShell* pDocSh ) const; virtual void ShowReference( const XubString& rStr ); - virtual void HideReference( BOOL bDoneRefMode = TRUE ); + virtual void HideReference( sal_Bool bDoneRefMode = sal_True ); virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ); @@ -185,7 +185,7 @@ public: //SfxBindings& GetBindings(); virtual void SetActive() = 0; -// virtual BOOL Close(); +// virtual sal_Bool Close(); //Overwrite TWindow will implemented by ScRefHdlrImplBase //virtual void StateChanged( StateChangedType nStateChange ); @@ -194,7 +194,7 @@ public: bool EnterRefMode(); bool LeaveRefMode(); inline bool CanInputStart( const ScRefEdit *pEdit ); - inline bool CanInputDone( BOOL bForced ); + inline bool CanInputDone( sal_Bool bForced ); //-->Added by PengYunQuan for Validity Cell Range Picker }; @@ -225,12 +225,12 @@ private: template<class TWindow, bool bBindRef> template<class TBindings, class TChildWindow, class TParentWindow, class TResId> ScRefHdlrImplBase<TWindow, bBindRef>::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW, - TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<USHORT>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){} + TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<sal_uInt16>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){} template<class TWindow, bool bBindRef > template<class TParentWindow, class TResId, class TArg> ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ ) -:TWindow( pParent, ScResId(static_cast<USHORT>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){} +:TWindow( pParent, ScResId(static_cast<sal_uInt16>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){} template<class TWindow, bool bBindRef > ScRefHdlrImplBase<TWindow,bBindRef>::~ScRefHdlrImplBase(){} @@ -244,12 +244,12 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase<TBase, bBindRef > template<class T1, class T2, class T3, class T4> ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4 ) { - SC_MOD()->RegisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this ); + SC_MOD()->RegisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(this)->SLOTID ), this ); } ~ScRefHdlrImpl() { - SC_MOD()->UnregisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this ); + SC_MOD()->UnregisterRefWindow( static_cast<sal_uInt16>( static_cast<TDerived*>(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 27305dcdc..78e459041 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 0d4597a1c..4a3c19ed6 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 0c6df4b39..b2317381d 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 a450329a5..718bdec10 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 4e3e7956e..f0afdb5a4 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 b6eb80112..009b72761 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 f33f31114..b4b2c1d8f 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 c9f2936d9..10ea3418a 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 9202c39e4..13e648a52 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 28d5a6d3f..13072ab06 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 fe4f38d4a..6835dda7d 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 454ef7028..28ee20beb 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 9048a03ba..73ee39ca2 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 929df0f98..5070a32cf 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 36d1e1236..47e406211 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 206374f8a..3ff1b9b9d 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 5cee52d5a..b11faea35 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 33af9f9d2..945c208c4 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 2962df9fd..5ab238c38 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 4346d2a85..3955b5580 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 65805c84f..31c40607a 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 4e72c12d3..651af7627 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 86c6cfc25..2e91fd215 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 cd1383e0c..6c96c72e1 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 772b7fa60..f13ede95f 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 b1b1b0b8b..f45794ed4 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 <TRUE/> if /// protection was successfully changed. - /// If bJustQueryIfProtected==TRUE protection is not + /// If bJustQueryIfProtected==sal_True protection is not /// changed and <TRUE/> 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 6cdcd6c7c..f3a9ed45b 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 47ea4ce1c..b81fd7f61 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 b86c8d178..6a4e80f43 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 49c2f93a5..6627b8334 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 bccbce553..46a68b22f 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 286828015..c6baf2e66 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 025ffff4e..6e9cce596 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 ce08dea63..96f2dfac6 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 index 4fe56d6f1..6dc64a194 100755..100644 --- 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 e270b341a..7bcfacd5a 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 2e5cd9762..fad756ba6 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 9e1129f26..ad0b4e783 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 9896dd0a2..f4cbd9753 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 de0918618..c13a232fe 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 b20043a91..99c48045c 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 b96c20562..f599b0bb4 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 ab8770ab0..930cf17f9 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 b0cca7238..bd1ca0b83 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 b9f148f2f..29d8a81b9 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 5333b0d13..bd1f93e07 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 49acc7cd4..ec8ea6ebd 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 0bfa32631..e71ae0528 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 f9a24438a..0569c2f92 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 b5fd76f55..b3d77367b 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 96d27913f..939756bf4 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 c168d025e..6c28da30b 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 1a01abcf5..e1a1de3d7 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 c18532e26..8db98784c 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 368db6bbf..317cb9224 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -145,61 +145,61 @@ private: ::std::auto_ptr<ScDPFieldPopupWindow> mpDPFieldPopup; ::std::auto_ptr<ScDPFieldButton> 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 77ceecf47..b7dcef39c 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 502b036e5..0e346d8ff 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 b690d03f0..443af1d1c 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 cd406ddd2..27f6b39f6 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 308613887..558adb20f 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 39c5c40be..b212f497c 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 e28b34e89..ccc651abd 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 d31fca3e2..f7602bb61 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 856a97250..e8c3b2ff2 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 34600b4ec..da234fcda 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 c65962558..ae7cb1114 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 814fd2344..ba7b59c54 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 6b420430c..519840d3e 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 cbcba4f8a..e734dc3b8 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 7fe407abc..dd3c2f878 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 08c26fb83..30f1d989b 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 63924a168..76523ed08 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 b3db3bf69..a2d7d0dca 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 66976c69f..f86deab97 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 8c0d425c1..85b36270d 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 2801c7d69..9bdd5d064 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 a19ec51dd..4a6f7b4fc 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 28fcd8ecb..bd54c25dd 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 02a1835bc..28d054f79 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 f1b75ea82..27f2460d9 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 b8a0623b8..a7fd3286c 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 7dd486770..463cadcb2 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 0eed9f6fc..e26bff779 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 cffb4f1d8..e694ca7f5 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<ScOptConditionRow> maConditions; @@ -83,16 +83,16 @@ class ScOptSolverSave com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> 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<ScOptConditionRow>& rConditions, const String& rEngine, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& 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<ScOptConditionRow>& 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 1e2716200..54ccb10ec 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 1fa4abb19..29f08d3ef 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 74324bb95..b588dacbb 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<USHORT> aVisibleArgMapping; + ::std::vector<sal_uInt16> 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 096bb53d9..ab5f94b08 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 bf26bf085..485f92733 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 11afb42fb..755298f72 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 e4c611f52..125af76e6 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 51370b605..f82ffc55d 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; + sal_Bool bLeftRulerMove; + sal_Bool bRightRulerMove; + sal_Bool bTopRulerMove; + sal_Bool bBottomRulerMove; + sal_Bool bHeaderRulerMove; + sal_Bool bFooterRulerMove; - BOOL bLeftRulerChange; - BOOL bRightRulerChange; - BOOL bTopRulerChange; - BOOL bBottomRulerChange; - BOOL bHeaderRulerChange; - BOOL bFooterRulerChange; - BOOL bPageMargin; - BOOL bColRulerMove; + 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 1e34d96d7..ab0826c7a 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 eb533079a..ae678a0f8 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 a4cb1645f..f69baa971 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 369db1191..487d79b47 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 2c813cc36..36070ed35 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 b7d3e52e9..e135998b9 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 e4613d874..ae2bb159f 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 79c15d2d5..7869d0796 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 668adbe07..629588eb4 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 6f9aa0d73..31a692697 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 a1ca9c38b..b34659d1f 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 b89e7aeea..98a3792eb 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 857ca2f3f..8e7e17764 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 bba9fefec..fe304da78 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 715097df1..386105287 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 47d1669ca..d3e071e10 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- / Zeilenkoepfe { 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 4d06c24a7..05c8dda7b 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 cf7fd66ec..c03dd3661 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 838467b79..101305336 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 1030d2c01..389c9beca 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 5b5010684..35ec33fa6 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 4ab38adc8..47b621c8d 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 f6b2231f6..5e6906e53 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 d77ccc7df..59f8528bc 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 85b54daa4..12f12cb63 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 35ef4986d..31cef922f 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 77dfecc3e..77cc4d59f 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 5ecd5fbdd..949c8cc22 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 a69ad206e..e5c8af0d4 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 e6574322f..94041df21 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 497caaded..7b061141a 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 68cbfe5d5..170079891 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 5ef748848..96326d4d7 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 358be7084..13a9c2fba 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 accd124c2..e25693bf3 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 3fe9b76db..81fd2d7bd 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 79db18ba7..ce82f3741 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 90ee43cf6..eb9dd800e 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 434b83a65..57a4f23b3 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 f197ca6d5..797e4afcf 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 d02d3e22e..74ee2fce8 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 b2f164d24..8ac8a9d33 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 83a693eaa..ec8ec80d2 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 ff4e114dd..046eacf63 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 8556911f8..25c830a4c 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 c27b59f80..7ca354830 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 579f9dfa8..95241add4 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 4bb22d42f..f0950e1c7 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 350a41620..2e0ef16ec 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 8bded7d83..88621e89a 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 81da22ed9..560010845 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 16dddd99c..d46c0ee07 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 0ad489cf6..70846a574 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 6869fc8cd..cb52c46fc 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 1be7962dd..9c659b830 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 11f6f1aba..efae45485 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 114601d82..ddfb2ecc5 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 1f969dafb..f04fc307a 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 9d17f866a..93e5a1f70 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 cd09a35d3..a78300127 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;i<aUserColl.GetCount();i++) + for(sal_uInt16 i=0;i<aUserColl.GetCount();i++) pTPFilter->InsertAuthor(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;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { xub_StrLen n1 = aStr.Search(';'); aStr.Erase(0, n1+1); - pTheView->SetTab(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;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { rInfo.aExtraString += String::CreateFromInt32(pTheView->GetTab(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 8d061b20d..f210fc536 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<const ScToken*>(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 ) { //<!--Modified by PengYunQuan for Validity Cell Range Picker //if (pRefEdit && (bForced || !pRefBtn)) @@ -381,7 +381,7 @@ void ScFormulaReferenceHelper::RefInputDone( BOOL bForced ) if (bAccInserted) // Accelerator wieder abschalten { Application::RemoveAccel( pAccel.get() ); - bAccInserted = FALSE; + bAccInserted = sal_False; } // Fenstertitel anpassen @@ -401,8 +401,8 @@ void ScFormulaReferenceHelper::RefInputDone( BOOL bForced ) } // Alle anderen: Show(); - USHORT nChildren = m_pWindow->GetChildCount(); - for ( USHORT i = 0; i < nChildren; i++ ) + sal_uInt16 nChildren = m_pWindow->GetChildCount(); + for ( sal_uInt16 i = 0; i < nChildren; i++ ) if (pHiddenMarks[i]) { m_pWindow->GetChild(i)->GetWindow( WINDOW_CLIENT )->Show(); @@ -428,11 +428,11 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: sNewDialogText.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ": " )); // Alle Elemente ausser EditCell und Button verstecken - USHORT nChildren = m_pWindow->GetChildCount(); - pHiddenMarks = new BOOL [nChildren]; - for (USHORT i = 0; i < nChildren; i++) + sal_uInt16 nChildren = m_pWindow->GetChildCount(); + pHiddenMarks = new sal_Bool [nChildren]; + for (sal_uInt16 i = 0; i < nChildren; i++) { - pHiddenMarks[i] = FALSE; + pHiddenMarks[i] = sal_False; Window* pWin = m_pWindow->GetChild(i); pWin = pWin->GetWindow( WINDOW_CLIENT ); if (pWin == (Window*)pRefEdit) @@ -443,7 +443,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: ; // do nothing else if (pWin->IsVisible()) { - pHiddenMarks[i] = TRUE; + pHiddenMarks[i] = sal_True; pWin->Hide(); } } @@ -497,7 +497,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: pAccel->SetSelectHdl( LINK( this, ScFormulaReferenceHelper, AccelSelectHdl ) ); } Application::InsertAccel( pAccel.get() ); - bAccInserted = TRUE; + bAccInserted = sal_True; // } } } @@ -509,11 +509,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula if( pRefEdit == pEdit ) // is this the active ref edit field? { pRefEdit->GrabFocus(); // before RefInputDone() - m_pDlg->RefInputDone( TRUE ); // finish ref input + m_pDlg->RefInputDone( sal_True ); // finish ref input } else { - m_pDlg->RefInputDone( TRUE ); // another active ref edit? + m_pDlg->RefInputDone( sal_True ); // another active ref edit? m_pDlg->RefInputStart( pEdit, pButton ); // start ref input // pRefEdit might differ from pEdit after RefInputStart() (i.e. ScFormulaDlg) if( pRefEdit ) @@ -522,11 +522,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula } } // ----------------------------------------------------------------------------- -BOOL ScFormulaReferenceHelper::DoClose( USHORT nId ) +sal_Bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId ) { SfxApplication* pSfxApp = SFX_APP(); - SetDispatcherLock( FALSE ); //! here and in dtor ? + SetDispatcherLock( sal_False ); //! here and in dtor ? SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if ( pViewFrm && pViewFrm->HasChildWindow(FID_INPUTLINE_STATUS) ) @@ -550,17 +550,17 @@ BOOL ScFormulaReferenceHelper::DoClose( USHORT nId ) if (pMyDisp) pMyViewFrm = pMyDisp->GetFrame(); } - SC_MOD()->SetRefDialog( nId, FALSE, pMyViewFrm ); + SC_MOD()->SetRefDialog( nId, sal_False, pMyViewFrm ); pSfxApp->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) ); ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); if ( pScViewShell ) - pScViewShell->UpdateInputHandler(TRUE); + pScViewShell->UpdateInputHandler(sal_True); - return TRUE; + return sal_True; } -void ScFormulaReferenceHelper::SetDispatcherLock( BOOL bLock ) +void ScFormulaReferenceHelper::SetDispatcherLock( sal_Bool bLock ) { // lock / unlock only the dispatchers of Calc documents @@ -587,11 +587,11 @@ void ScFormulaReferenceHelper::SetDispatcherLock( BOOL bLock ) // ----------------------------------------------------------------------------- void ScFormulaReferenceHelper::ViewShellChanged(ScTabViewShell* /* pScViewShell */) { - enableInput( FALSE ); + enableInput( sal_False ); EnableSpreadsheets(); } -void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds) +void ScFormulaReferenceHelper::EnableSpreadsheets(sal_Bool bFlag, sal_Bool bChilds) { TypeId aType(TYPE(ScDocShell)); ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType); @@ -613,7 +613,7 @@ void ScFormulaReferenceHelper::EnableSpreadsheets(BOOL bFlag, BOOL bChilds) Window *pParent=pWin->GetParent(); if(pParent) { - pParent->EnableInput(bFlag,FALSE); + pParent->EnableInput(bFlag,sal_False); if(bChilds) pViewSh->EnableRefInput(bFlag); } @@ -681,7 +681,7 @@ void lcl_HideAllReferences() //---------------------------------------------------------------------------- ScRefHandler::ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW, - Window* pParent, USHORT nResId*/, bool bBindRef ) + Window* pParent, sal_uInt16 nResId*/, bool bBindRef ) : //SfxModelessDialog ( pB, pCW, pParent, ScResId( nResId ) ), m_rWindow( rWindow ), m_bInRefMode( false ), @@ -723,7 +723,7 @@ bool ScRefHandler::EnterRefMode() { pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() ); if( pScViewShell ) - pScViewShell->UpdateInputHandler(TRUE); + pScViewShell->UpdateInputHandler(sal_True); pParentDoc = pMyViewFrm->GetObjectShell(); } } @@ -740,15 +740,15 @@ bool ScRefHandler::EnterRefMode() 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 ); //@Test - //SFX_APPWINDOW->Disable(TRUE); //@BugID 54702 + //SFX_APPWINDOW->Disable(sal_True); //@BugID 54702 return m_bInRefMode = true; } @@ -767,14 +767,14 @@ bool ScRefHandler::LeaveRefMode() lcl_HideAllReferences(); if( Dialog *pDlg = dynamic_cast<Dialog*>( static_cast<Window*>(*this) ) ) - pDlg->SetModalInputMode(FALSE); - SetDispatcherLock( FALSE ); //! here and in DoClose ? + pDlg->SetModalInputMode(sal_False); + SetDispatcherLock( sal_False ); //! here and in DoClose ? ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); if( pScViewShell ) - pScViewShell->UpdateInputHandler(TRUE); + pScViewShell->UpdateInputHandler(sal_True); - //SFX_APPWINDOW->Enable(TRUE,TRUE); + //SFX_APPWINDOW->Enable(sal_True,sal_True); lcl_InvalidateWindows(); m_bInRefMode = false; @@ -822,7 +822,7 @@ void ScRefHandler::SwitchToDocument() //---------------------------------------------------------------------------- -BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0 +sal_Bool ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0 { // default: allow only same document (overridden in function dialog) String aCmpName; @@ -835,20 +835,20 @@ BOOL ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) const // pDocSh may be 0 //---------------------------------------------------------------------------- -BOOL __EXPORT ScRefHandler::IsRefInputMode() const +sal_Bool __EXPORT ScRefHandler::IsRefInputMode() const { return m_rWindow.IsVisible(); // nur wer sichtbar ist kann auch Referenzen bekommen } //---------------------------------------------------------------------------- -BOOL __EXPORT ScRefHandler::DoClose( USHORT nId ) +sal_Bool __EXPORT ScRefHandler::DoClose( sal_uInt16 nId ) { m_aHelper.DoClose(nId); - return TRUE; + return sal_True; } -void ScRefHandler::SetDispatcherLock( BOOL bLock ) +void ScRefHandler::SetDispatcherLock( sal_Bool bLock ) { m_aHelper.SetDispatcherLock( bLock ); } @@ -869,11 +869,11 @@ void ScRefHandler::AddRefEntry() //---------------------------------------------------------------------------- -BOOL __EXPORT ScRefHandler::IsTableLocked() const +sal_Bool __EXPORT ScRefHandler::IsTableLocked() const { // per Default kann bei Referenzeingabe auch die Tabelle umgeschaltet werden - return FALSE; + return sal_False; } //---------------------------------------------------------------------------- @@ -897,7 +897,7 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* //The two following function is commentted out by PengYunQuan for Validity Cell Range Picker //long ScAnyRefDlg::PreNotify( NotifyEvent& rNEvt ) //{ -// USHORT nSwitch=rNEvt.GetType(); +// sal_uInt16 nSwitch=rNEvt.GetType(); // if(nSwitch==EVENT_GETFOCUS) // { // pActiveWin=rNEvt.GetWindow(); @@ -913,15 +913,15 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* // { // if(IsVisible()) // { -// m_aHelper.enableInput( FALSE ); +// m_aHelper.enableInput( sal_False ); // m_aHelper.EnableSpreadsheets(); -// m_aHelper.SetDispatcherLock( TRUE ); +// m_aHelper.SetDispatcherLock( sal_True ); // aTimer.Start(); // } // else // { -// m_aHelper.enableInput( TRUE ); -// m_aHelper.SetDispatcherLock( FALSE ); //! here and in DoClose ? +// m_aHelper.enableInput( sal_True ); +// m_aHelper.SetDispatcherLock( sal_False ); //! here and in DoClose ? // } // } //} @@ -937,7 +937,7 @@ INTRODUCE_TEMPLATE long ScRefHdlrImplBase<TWindow,bBindRef>::PreNotify( NotifyEv {\ if( bBindRef || m_bInRefMode )\ {\ - USHORT nSwitch=rNEvt.GetType();\ + sal_uInt16 nSwitch=rNEvt.GetType();\ if(nSwitch==EVENT_GETFOCUS)\ {\ pActiveWin=rNEvt.GetWindow();\ @@ -957,15 +957,15 @@ INTRODUCE_TEMPLATE void ScRefHdlrImplBase<TWindow,bBindRef>::StateChanged( State {\ if(m_rWindow.IsVisible())\ {\ - m_aHelper.enableInput( FALSE );\ + m_aHelper.enableInput( sal_False );\ m_aHelper.EnableSpreadsheets();\ - m_aHelper.SetDispatcherLock( TRUE );\ + m_aHelper.SetDispatcherLock( sal_True );\ aTimer.Start();\ }\ else\ {\ - m_aHelper.enableInput( TRUE );\ - m_aHelper.SetDispatcherLock( FALSE ); /*//! here and in DoClose ?*/\ + m_aHelper.enableInput( sal_True );\ + m_aHelper.SetDispatcherLock( sal_False ); /*//! here and in DoClose ?*/\ }\ }\ } @@ -989,7 +989,7 @@ bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const String& rStr, ScD return m_aHelper.ParseWithNames( rRanges, rStr, pDoc ); } // ----------------------------------------------------------------------------- -void ScRefHandler::HideReference( BOOL bDoneRefMode ) +void ScRefHandler::HideReference( sal_Bool bDoneRefMode ) { m_aHelper.HideReference( bDoneRefMode ); } @@ -1004,7 +1004,7 @@ void ScRefHandler::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pB m_aHelper.ReleaseFocus( pEdit,pButton ); } //---------------------------------------------------------------------------- -void ScRefHandler::RefInputDone( BOOL bForced ) +void ScRefHandler::RefInputDone( sal_Bool bForced ) { m_aHelper.RefInputDone( bForced ); } diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index ceed2e048..31bce08f6 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -104,8 +104,8 @@ //CHINA001 aStrDelMsg ( ScResId( STR_DEL_MSG ) ) , //CHINA001 // //CHINA001 nIndex ( 0 ), -//CHINA001 bFmtInserted ( FALSE ), -//CHINA001 bCoreDataChanged( FALSE ), +//CHINA001 bFmtInserted ( sal_False ), +//CHINA001 bCoreDataChanged( sal_False ), //CHINA001 pFormat ( pAutoFormat ), //CHINA001 pSelFmtData ( pSelFormatData ) //CHINA001 { @@ -125,7 +125,7 @@ //CHINA001 //CHINA001 void ScAutoFormatDlg::Init() //CHINA001 { -//CHINA001 USHORT nCount; +//CHINA001 sal_uInt16 nCount; //CHINA001 String aEntry; //CHINA001 //CHINA001 aLbFormat .SetSelectHdl( LINK( this, ScAutoFormatDlg, SelFmtHdl ) ); @@ -153,7 +153,7 @@ //CHINA001 //CHINA001 nCount = pFormat->GetCount(); //CHINA001 -//CHINA001 for ( USHORT i = 0; i < nCount; i++ ) +//CHINA001 for ( sal_uInt16 i = 0; i < nCount; i++ ) //CHINA001 { //CHINA001 ((*pFormat)[i])->GetName( aEntry ); //CHINA001 aLbFormat.InsertEntry( aEntry ); @@ -173,7 +173,7 @@ //CHINA001 { //CHINA001 aBtnAdd.Disable(); //CHINA001 aBtnRemove.Disable(); -//CHINA001 bFmtInserted = TRUE; +//CHINA001 bFmtInserted = sal_True; //CHINA001 } //CHINA001 } //CHINA001 @@ -224,7 +224,7 @@ //CHINA001 IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn ) //CHINA001 { //CHINA001 ScAutoFormatData* pData = (*pFormat)[nIndex]; -//CHINA001 BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(); +//CHINA001 sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(); //CHINA001 //CHINA001 if ( pBtn == &aBtnNumFormat ) //CHINA001 pData->SetIncludeValueFormat( bCheck ); @@ -242,7 +242,7 @@ //CHINA001 if ( !bCoreDataChanged ) //CHINA001 { //CHINA001 aBtnCancel.SetText( aStrClose ); -//CHINA001 bCoreDataChanged = TRUE; +//CHINA001 bCoreDataChanged = sal_True; //CHINA001 } //CHINA001 //CHINA001 pWndPreview->NotifyChange( pData ); @@ -259,7 +259,7 @@ //CHINA001 String aStrStandard( ScResId(STR_STANDARD) ); //CHINA001 String aFormatName; //CHINA001 ScStringInputDlg* pDlg; -//CHINA001 BOOL bOk = FALSE; +//CHINA001 sal_Bool bOk = sal_False; //CHINA001 //CHINA001 while ( !bOk ) //CHINA001 { @@ -283,7 +283,7 @@ //CHINA001 //CHINA001 if ( bFmtInserted ) //CHINA001 { -//CHINA001 USHORT nAt = pFormat->IndexOf( pNewData ); +//CHINA001 sal_uInt16 nAt = pFormat->IndexOf( pNewData ); //CHINA001 //CHINA001 aLbFormat.InsertEntry( aFormatName, nAt ); //CHINA001 aLbFormat.SelectEntry( aFormatName ); @@ -292,11 +292,11 @@ //CHINA001 if ( !bCoreDataChanged ) //CHINA001 { //CHINA001 aBtnCancel.SetText( aStrClose ); -//CHINA001 bCoreDataChanged = TRUE; +//CHINA001 bCoreDataChanged = sal_True; //CHINA001 } //CHINA001 //CHINA001 SelFmtHdl( 0 ); -//CHINA001 bOk = TRUE; +//CHINA001 bOk = sal_True; //CHINA001 } //CHINA001 else //CHINA001 delete pNewData; @@ -305,7 +305,7 @@ //CHINA001 //CHINA001 if ( !bFmtInserted ) //CHINA001 { -//CHINA001 USHORT nRet = ErrorBox( this, +//CHINA001 sal_uInt16 nRet = ErrorBox( this, //CHINA001 WinBits( WB_OK_CANCEL | WB_DEF_OK), //CHINA001 ScGlobal::GetRscString(STR_INVALID_AFNAME) //CHINA001 ).Execute(); @@ -314,7 +314,7 @@ //CHINA001 } //CHINA001 } //CHINA001 else -//CHINA001 bOk = TRUE; +//CHINA001 bOk = sal_True; //CHINA001 //CHINA001 delete pDlg; //CHINA001 } @@ -346,7 +346,7 @@ //CHINA001 if ( !bCoreDataChanged ) //CHINA001 { //CHINA001 aBtnCancel.SetText( aStrClose ); -//CHINA001 bCoreDataChanged = TRUE; +//CHINA001 bCoreDataChanged = sal_True; //CHINA001 } //CHINA001 //CHINA001 pFormat->AtFree( nIndex ); // in der Core loeschen @@ -363,7 +363,7 @@ //CHINA001 //CHINA001 IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, pBtn) //CHINA001 { -//CHINA001 BOOL bOk = FALSE; +//CHINA001 sal_Bool bOk = sal_False; //CHINA001 while( !bOk ) //CHINA001 { //CHINA001 @@ -377,9 +377,9 @@ //CHINA001 HID_SC_RENAME_AUTOFMT ); //CHINA001 if( pDlg->Execute() == RET_OK ) //CHINA001 { -//CHINA001 BOOL bFmtRenamed = FALSE; +//CHINA001 sal_Bool bFmtRenamed = sal_False; //CHINA001 pDlg->GetInputString( aFormatName ); -//CHINA001 USHORT n; +//CHINA001 sal_uInt16 n; //CHINA001 //CHINA001 if ( aFormatName.Len() > 0 ) //CHINA001 { @@ -405,29 +405,29 @@ //CHINA001 //CHINA001 pFormat->Insert( pNewData); //CHINA001 -//CHINA001 USHORT nCount = pFormat->GetCount(); +//CHINA001 sal_uInt16 nCount = pFormat->GetCount(); //CHINA001 -//CHINA001 aLbFormat.SetUpdateMode(FALSE); +//CHINA001 aLbFormat.SetUpdateMode(sal_False); //CHINA001 aLbFormat.Clear(); -//CHINA001 for ( USHORT i = 0; i < nCount; i++ ) +//CHINA001 for ( sal_uInt16 i = 0; i < nCount; i++ ) //CHINA001 { //CHINA001 ((*pFormat)[i])->GetName( aEntry ); //CHINA001 aLbFormat.InsertEntry( aEntry ); //CHINA001 } //CHINA001 -//CHINA001 aLbFormat.SetUpdateMode( TRUE); +//CHINA001 aLbFormat.SetUpdateMode( sal_True); //CHINA001 aLbFormat.SelectEntry( aFormatName); //CHINA001 //CHINA001 if ( !bCoreDataChanged ) //CHINA001 { //CHINA001 aBtnCancel.SetText( aStrClose ); -//CHINA001 bCoreDataChanged = TRUE; +//CHINA001 bCoreDataChanged = sal_True; //CHINA001 } //CHINA001 //CHINA001 //CHINA001 SelFmtHdl( 0 ); -//CHINA001 bOk = TRUE; -//CHINA001 bFmtRenamed = TRUE; +//CHINA001 bOk = sal_True; +//CHINA001 bFmtRenamed = sal_True; //CHINA001 } //CHINA001 } //CHINA001 if( !bFmtRenamed ) @@ -439,7 +439,7 @@ //CHINA001 } //CHINA001 } //CHINA001 else -//CHINA001 bOk = TRUE; +//CHINA001 bOk = sal_True; //CHINA001 delete pDlg; //CHINA001 } //CHINA001 @@ -489,7 +489,7 @@ ScAutoFmtPreview::ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocume aVD ( *this ), aScriptedText ( aVD ), xBreakIter ( pDoc->GetBreakIterator() ), - bFitWidth ( FALSE ), + bFitWidth ( sal_False ), mbRTL ( false ), aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ), mnLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ), @@ -532,7 +532,7 @@ void lcl_SetFontProperties( rFont.SetItalic ( (FontItalic)rPostureItem.GetValue() ); } -void ScAutoFmtPreview::MakeFonts( USHORT nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) +void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) { if ( pCurData ) { @@ -573,7 +573,7 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va SETONALLFONTS( SetShadow, pShadowedItem->GetValue() ) SETONALLFONTS( SetColor, aColor ) SETONALLFONTS( SetSize, aFontSize ) - SETONALLFONTS( SetTransparent, TRUE ) + SETONALLFONTS( SetTransparent, sal_True ) #undef SETONALLFONTS } @@ -581,9 +581,9 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va //------------------------------------------------------------------------ -USHORT ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const +sal_uInt16 ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const { - static const USHORT pnFmtMap[] = + static const sal_uInt16 pnFmtMap[] = { 0, 1, 2, 1, 3, 4, 5, 6, 5, 7, @@ -617,11 +617,11 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) //------------------------ String cellString; - BOOL bNumFormat = pCurData->GetIncludeValueFormat(); - ULONG nNum; + sal_Bool bNumFormat = pCurData->GetIncludeValueFormat(); + sal_uLong nNum; double nVal; Color* pDummy = NULL; - USHORT nIndex = static_cast< USHORT >( maArray.GetCellIndex( nCol, nRow, mbRTL ) ); + sal_uInt16 nIndex = static_cast< sal_uInt16 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) ); switch( nIndex ) { @@ -660,7 +660,7 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) mknum: if( bNumFormat ) { - ScNumFormatAbbrev& rNumFormat = (ScNumFormatAbbrev&)pCurData->GetNumFormat( (USHORT) nNum ); + ScNumFormatAbbrev& rNumFormat = (ScNumFormatAbbrev&)pCurData->GetNumFormat( (sal_uInt16) nNum ); nNum = rNumFormat.GetFormatIndex( *pNumFmt ); } else @@ -672,11 +672,11 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) if ( cellString.Len() > 0 ) { Size aStrSize; - USHORT nFmtIndex = GetFormatIndex( nCol, nRow ); + sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow ); Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); - USHORT nRightX = 0; - BOOL bJustify = pCurData->GetIncludeJustify(); + sal_uInt16 nRightX = 0; + sal_Bool bJustify = pCurData->GetIncludeJustify(); SvxHorJustifyItem aHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ); SvxCellHorJustify eJustification; @@ -729,21 +729,21 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) aStrSize = aScriptedText.GetTextSize(); } - nRightX = (USHORT)( cellRect.GetWidth() + nRightX = (sal_uInt16)( cellRect.GetWidth() - aStrSize.Width() - FRAME_OFFSET ); //----------------------------- // vertikal (immer zentrieren): //----------------------------- - aPos.Y() += (mnRowHeight - (USHORT)aStrSize.Height()) / 2; + aPos.Y() += (mnRowHeight - (sal_uInt16)aStrSize.Height()) / 2; //----------- // horizontal //----------- if ( eJustification != SVX_HOR_JUSTIFY_STANDARD ) { - USHORT nHorPos = (USHORT) + sal_uInt16 nHorPos = (sal_uInt16) ((cellRect.GetWidth()-aStrSize.Width())/2); switch ( eJustification ) @@ -849,7 +849,7 @@ void ScAutoFmtPreview::Init() SetBorderStyle( WINDOW_BORDER_MONO ); maArray.Initialize( 5, 5 ); maArray.SetUseDiagDoubleClipping( false ); - CalcCellArray( FALSE ); + CalcCellArray( sal_False ); CalcLineMap(); TypeId aType(TYPE(ScDocShell)); @@ -865,7 +865,7 @@ void ScAutoFmtPreview::Init() //------------------------------------------------------------------------ -void ScAutoFmtPreview::CalcCellArray( BOOL bFitWidthP ) +void ScAutoFmtPreview::CalcCellArray( sal_Bool bFitWidthP ) { maArray.SetXOffset( 2 ); maArray.SetAllColWidths( bFitWidthP ? mnDataColWidth2 : mnDataColWidth1 ); @@ -940,7 +940,7 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData ) void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ ) { sal_uInt32 nOldDrawMode = aVD.GetDrawMode(); - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) if( GetSettings().GetStyleSettings().GetHighContrastMode() ) aVD.SetDrawMode( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); @@ -950,7 +950,7 @@ void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ ) Point aTmpPoint; Rectangle aRect( aTmpPoint, aWndSize ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aVD.SetFont( aFont ); aVD.SetLineColor(); aVD.SetFillColor( aBackCol ); diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 776ddb62d..7fc3b3dc3 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -43,7 +43,7 @@ // struct ScConflictsListEntry //============================================================================= -bool ScConflictsListEntry::HasSharedAction( ULONG nSharedAction ) const +bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const { ScChangeActionList::const_iterator aEnd = maSharedActions.end(); for ( ScChangeActionList::const_iterator aItr = maSharedActions.begin(); aItr != aEnd; ++aItr ) @@ -57,7 +57,7 @@ bool ScConflictsListEntry::HasSharedAction( ULONG nSharedAction ) const return false; } -bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const +bool ScConflictsListEntry::HasOwnAction( sal_uLong nOwnAction ) const { ScChangeActionList::const_iterator aEnd = maOwnActions.end(); for ( ScChangeActionList::const_iterator aItr = maOwnActions.begin(); aItr != aEnd; ++aItr ) @@ -76,7 +76,7 @@ bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const // class ScConflictsListHelper //============================================================================= -//UNUSED2008-05 bool ScConflictsListHelper::HasSharedAction( ScConflictsList& rConflictsList, ULONG nSharedAction ) +//UNUSED2008-05 bool ScConflictsListHelper::HasSharedAction( ScConflictsList& rConflictsList, sal_uLong nSharedAction ) //UNUSED2008-05 { //UNUSED2008-05 ScConflictsList::const_iterator aEnd = rConflictsList.end(); //UNUSED2008-05 for ( ScConflictsList::const_iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr ) @@ -90,7 +90,7 @@ bool ScConflictsListEntry::HasOwnAction( ULONG nOwnAction ) const //UNUSED2008-05 return false; //UNUSED2008-05 } -bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction ) +bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction ) { ScConflictsList::const_iterator aEnd = rConflictsList.end(); for ( ScConflictsList::const_iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr ) @@ -104,7 +104,7 @@ bool ScConflictsListHelper::HasOwnAction( ScConflictsList& rConflictsList, ULONG return false; } -ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction ) +ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsList& rConflictsList, sal_uLong nSharedAction ) { ScConflictsList::iterator aEnd = rConflictsList.end(); for ( ScConflictsList::iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr ) @@ -118,7 +118,7 @@ ScConflictsListEntry* ScConflictsListHelper::GetSharedActionEntry( ScConflictsLi return NULL; } -ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction ) +ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& rConflictsList, sal_uLong nOwnAction ) { ScConflictsList::iterator aEnd = rConflictsList.end(); for ( ScConflictsList::iterator aItr = rConflictsList.begin(); aItr != aEnd; ++aItr ) @@ -178,8 +178,8 @@ void ScConflictsListHelper::TransformConflictsList( ScConflictsList& rConflictsL // class ScConflictsFinder //============================================================================= -ScConflictsFinder::ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared, - ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList ) +ScConflictsFinder::ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared, + sal_uLong nStartOwn, sal_uLong nEndOwn, ScConflictsList& rConflictsList ) :mpTrack( pTrack ) ,mnStartShared( nStartShared ) ,mnEndShared( nEndShared ) @@ -229,7 +229,7 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct return NULL; } -ScConflictsListEntry* ScConflictsFinder::GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions ) +ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions ) { // try to get a list entry which already contains the shared action ScConflictsListEntry* pEntry = ScConflictsListHelper::GetSharedActionEntry( mrConflictsList, nSharedAction ); @@ -444,9 +444,9 @@ ScConflictsListBox::~ScConflictsListBox() { } -//UNUSED2008-05 ULONG ScConflictsListBox::GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const +//UNUSED2008-05 sal_uLong ScConflictsListBox::GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const //UNUSED2008-05 { -//UNUSED2008-05 ULONG nPos = 0; +//UNUSED2008-05 sal_uLong nPos = 0; //UNUSED2008-05 SvLBoxEntry* pEntry = GetRootLevelParent( First() ); //UNUSED2008-05 while ( pEntry ) //UNUSED2008-05 { @@ -566,7 +566,7 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen if ( pAction && pDoc ) { String aDesc; - pAction->GetDescription( aDesc, pDoc, TRUE, false ); + pAction->GetDescription( aDesc, pDoc, sal_True, false ); aString += aDesc; aString += '\t'; @@ -582,7 +582,7 @@ String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocumen DateTime aDateTime = pAction->GetDateTime(); aString += ScGlobal::pLocaleData->getDate( aDateTime ); aString += ' '; - aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE ); + aString += ScGlobal::pLocaleData->getTime( aDateTime, sal_False ); aString += '\t'; } @@ -606,7 +606,7 @@ void ScConflictsDlg::HandleListBoxSelection( bool bSelectHandle ) { if ( bSelectHandle ) { - maLbConflicts.SelectAll( FALSE ); + maLbConflicts.SelectAll( sal_False ); } if ( !maLbConflicts.IsSelected( pRootEntry ) ) { @@ -662,7 +662,7 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG ) ScTabView* pTabView = mpViewData->GetView(); pTabView->DoneBlockMode(); - BOOL bContMark = FALSE; + sal_Bool bContMark = sal_False; SvLBoxEntry* pEntry = maLbConflicts.FirstSelected(); while ( pEntry ) { @@ -678,9 +678,9 @@ IMPL_LINK( ScConflictsDlg, UpdateSelectionHdl, Timer*, EMPTYARG ) const ScBigRange& rBigRange = ( static_cast< const ScChangeAction* >( pAction ) )->GetBigRange(); if ( rBigRange.IsValid( mpOwnDoc ) ) { - BOOL bSetCursor = !maLbConflicts.NextSelected( pEntry ); + sal_Bool bSetCursor = !maLbConflicts.NextSelected( pEntry ); pTabView->MarkRange( rBigRange.MakeRange(), bSetCursor, bContMark ); - bContMark = TRUE; + bContMark = sal_True; } } } @@ -735,9 +735,9 @@ void ScConflictsDlg::KeepAllHandler( bool bMine ) SetConflictAction( pRootEntry, eConflictAction ); pRootEntry = maLbConflicts.NextSibling( pRootEntry ); } - maLbConflicts.SetUpdateMode( FALSE ); + maLbConflicts.SetUpdateMode( sal_False ); maLbConflicts.Clear(); - maLbConflicts.SetUpdateMode( TRUE ); + maLbConflicts.SetUpdateMode( sal_True ); SetPointer( Pointer( POINTER_ARROW ) ); EndDialog( RET_OK ); } diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx index 38b539265..d15a036a4 100644 --- a/sc/source/ui/miscdlgs/crdlg.cxx +++ b/sc/source/ui/miscdlgs/crdlg.cxx @@ -44,7 +44,7 @@ ScColOrRowDlg::ScColOrRowDlg( Window* pParent, const String& rStrTitle, const String& rStrLabel, - BOOL bColDefault ) + sal_Bool bColDefault ) : ModalDialog ( pParent, ScResId( RID_SCDLG_COLORROW ) ), // diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index f2fa6eb77..1916bf15f 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -52,9 +52,9 @@ #define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute() #define QUERYBOX(m) QueryBox(this,WinBits(WB_YES_NO|WB_DEF_YES),m).Execute() -const ULONG nEntryDataCol = 0; -const ULONG nEntryDataRow = 1; -const ULONG nEntryDataDelim = 2; +const sal_uLong nEntryDataCol = 0; +const sal_uLong nEntryDataRow = 1; +const sal_uLong nEntryDataDelim = 2; //============================================================================ @@ -108,7 +108,7 @@ ScColRowNameRangesDlg::ScColRowNameRangesDlg( SfxBindings* pB, pDoc ( ptrViewData->GetDocument() ), pEdActive ( NULL ), - bDlgLostFocus ( FALSE ) + bDlgLostFocus ( sal_False ) { xColNameRanges = pDoc->GetColNameRanges()->Clone(); xRowNameRanges = pDoc->GetRowNameRanges()->Clone(); @@ -196,8 +196,8 @@ void ScColRowNameRangesDlg::Init() } else { - aBtnColHead.Check( TRUE ); - aBtnRowHead.Check( FALSE ); + aBtnColHead.Check( sal_True ); + aBtnRowHead.Check( sal_False ); aEdAssign.SetText( EMPTY_STRING ); aEdAssign2.SetText( EMPTY_STRING ); } @@ -231,22 +231,22 @@ void ScColRowNameRangesDlg::Init() #* #************************************************************************/ -void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef) +void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,sal_Bool bRef) { theCurData = theCurArea = rLabelRange; - BOOL bValid = TRUE; + sal_Bool bValid = sal_True; SCCOL nCol1 = theCurArea.aStart.Col(); SCCOL nCol2 = theCurArea.aEnd.Col(); SCROW nRow1 = theCurArea.aStart.Row(); SCROW nRow2 = theCurArea.aEnd.Row(); if ( (static_cast<SCCOLROW>(nCol2 - nCol1) >= nRow2 - nRow1) || (nCol1 == 0 && nCol2 == MAXCOL) ) { // Spaltenkoepfe und Grenzfall gesamte Tabelle - aBtnColHead.Check( TRUE ); - aBtnRowHead.Check( FALSE ); + aBtnColHead.Check( sal_True ); + aBtnRowHead.Check( sal_False ); if ( nRow2 == MAXROW ) { if ( nRow1 == 0 ) - bValid = FALSE; // Grenzfall gesamte Tabelle + bValid = sal_False; // Grenzfall gesamte Tabelle else { // Head unten, Data oben theCurData.aStart.SetRow( 0 ); @@ -261,8 +261,8 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef) } else { // Zeilenkoepfe - aBtnRowHead.Check( TRUE ); - aBtnColHead.Check( FALSE ); + aBtnRowHead.Check( sal_True ); + aBtnColHead.Check( sal_False ); if ( nCol2 == MAXCOL ) { // Head rechts, Data links theCurData.aStart.SetCol( 0 ); @@ -331,7 +331,7 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange,BOOL bRef) #* #************************************************************************/ -void ScColRowNameRangesDlg::AdjustColRowData( const ScRange& rDataRange,BOOL bRef) +void ScColRowNameRangesDlg::AdjustColRowData( const ScRange& rDataRange,sal_Bool bRef) { theCurData = rDataRange; if ( aBtnColHead.IsChecked() ) @@ -418,9 +418,9 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD String aRefStr; if ( pEdActive == &aEdAssign ) - SetColRowData( rRef, TRUE ); + SetColRowData( rRef, sal_True ); else - AdjustColRowData( rRef, TRUE ); + AdjustColRowData( rRef, sal_True ); aBtnColHead.Enable(); aBtnRowHead.Enable(); aBtnAdd.Enable(); @@ -443,7 +443,7 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD #* #************************************************************************/ -BOOL __EXPORT ScColRowNameRangesDlg::Close() +sal_Bool __EXPORT ScColRowNameRangesDlg::Close() { return DoClose( ScColRowNameRangesDlgWrapper::GetChildWindowId() ); } @@ -467,7 +467,7 @@ void ScColRowNameRangesDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if( pEdActive ) pEdActive->GrabFocus(); } @@ -499,14 +499,14 @@ void ScColRowNameRangesDlg::SetActive() void ScColRowNameRangesDlg::UpdateNames() { - aLbRange.SetUpdateMode( FALSE ); + aLbRange.SetUpdateMode( sal_False ); //----------------------------------------------------------- aLbRange.Clear(); aRangeMap.clear(); aEdAssign.SetText( EMPTY_STRING ); - ULONG nCount, j; - USHORT nPos; //@008 Hilfsvariable q eingefuegt + sal_uLong nCount, j; + sal_uInt16 nPos; //@008 Hilfsvariable q eingefuegt SCCOL nCol1; //@008 04.09.97 SCROW nRow1; //Erweiterung fuer Bereichsnamen @@ -613,7 +613,7 @@ void ScColRowNameRangesDlg::UpdateNames() delete [] ppSortArray; } //----------------------------------------------------------- - aLbRange.SetUpdateMode( TRUE ); + aLbRange.SetUpdateMode( sal_True ); aLbRange.Invalidate(); } @@ -633,14 +633,14 @@ void ScColRowNameRangesDlg::UpdateNames() #* #************************************************************************/ -void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColName ) +void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, sal_Bool bColName ) { ScRangePair* pPair = NULL; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL ) - bFound = TRUE; + bFound = sal_True; else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL ) - bFound = TRUE; + bFound = sal_True; if ( bFound ) { @@ -684,7 +684,7 @@ void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColNam #* #************************************************************************/ -BOOL ScColRowNameRangesDlg::IsRefInputMode() const +sal_Bool ScColRowNameRangesDlg::IsRefInputMode() const { return (pEdActive != NULL); } @@ -774,8 +774,8 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG ) { const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); ScRange aRange1, aRange2; - BOOL bOk1; - if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != FALSE + sal_Bool bOk1; + if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != sal_False && ((aRange2.ParseAny( aNewData, pDoc, eConv ) & SCA_VALID) == SCA_VALID) ) { theCurArea = aRange1; @@ -802,8 +802,8 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG ) aBtnAdd.Disable(); aBtnRemove.Disable(); aEdAssign.SetText( EMPTY_STRING ); - aBtnColHead.Check( TRUE ); - aBtnRowHead.Check( FALSE ); + aBtnColHead.Check( sal_True ); + aBtnRowHead.Check( sal_False ); aEdAssign2.SetText( EMPTY_STRING ); theCurArea = ScRange(); theCurData = theCurArea; @@ -840,20 +840,20 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG ) { String aRangeStr = aLbRange.GetSelectEntry(); - USHORT nSelectPos = aLbRange.GetSelectEntryPos(); - BOOL bColName = - ((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol); + sal_uInt16 nSelectPos = aLbRange.GetSelectEntryPos(); + sal_Bool bColName = + ((sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol); NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr); if (itr == aRangeMap.end()) return 0; const ScRange& rRange = itr->second; ScRangePair* pPair = NULL; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL ) - bFound = TRUE; + bFound = sal_True; else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL ) - bFound = TRUE; + bFound = sal_True; if ( bFound ) { String aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY ); @@ -871,7 +871,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG ) delete pPair; UpdateNames(); - USHORT nCnt = aLbRange.GetEntryCount(); + sal_uInt16 nCnt = aLbRange.GetEntryCount(); if ( nSelectPos >= nCnt ) { if ( nCnt ) @@ -881,7 +881,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG ) } aLbRange.SelectEntryPos( nSelectPos ); if ( nSelectPos && - (ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim ) + (sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim ) aLbRange.SelectEntryPos( --nSelectPos ); // ---Zeile--- aLbRange.GrabFocus(); @@ -889,8 +889,8 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG ) aBtnRemove.Disable(); aEdAssign.SetText( EMPTY_STRING ); theCurArea = theCurData = ScRange(); - aBtnColHead.Check( TRUE ); - aBtnRowHead.Check( FALSE ); + aBtnColHead.Check( sal_True ); + aBtnRowHead.Check( sal_False ); aEdAssign2.SetText( EMPTY_STRING ); Range1SelectHdl( 0 ); } @@ -917,11 +917,11 @@ IMPL_LINK( ScColRowNameRangesDlg, RemoveBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG ) { - USHORT nSelectPos = aLbRange.GetSelectEntryPos(); - USHORT nCnt = aLbRange.GetEntryCount(); - USHORT nMoves = 0; + sal_uInt16 nSelectPos = aLbRange.GetSelectEntryPos(); + sal_uInt16 nCnt = aLbRange.GetEntryCount(); + sal_uInt16 nMoves = 0; while ( nSelectPos < nCnt - && (ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim ) + && (sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataDelim ) { // skip Delimiter ++nMoves; aLbRange.SelectEntryPos( ++nSelectPos ); @@ -947,8 +947,8 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG ) NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr); if ( itr != aRangeMap.end() ) { - BOOL bColName = - ((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol); + sal_Bool bColName = + ((sal_uLong)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol); UpdateRangeData( itr->second, bColName ); aBtnAdd.Disable(); aBtnRemove.Enable(); @@ -1005,14 +1005,14 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1SelectHdl, void *, EMPTYARG ) IMPL_LINK( ScColRowNameRangesDlg, Range1DataModifyHdl, void *, EMPTYARG ) { String aNewArea( aEdAssign.GetText() ); - BOOL bValid = FALSE; + sal_Bool bValid = sal_False; if ( aNewArea.Len() > 0 ) { ScRange aRange; if ( (aRange.ParseAny( aNewArea, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID) == SCA_VALID ) { SetColRowData( aRange ); - bValid = TRUE; + bValid = sal_True; } } if ( bValid ) @@ -1093,8 +1093,8 @@ IMPL_LINK( ScColRowNameRangesDlg, ColClickHdl, void *, EMPTYARG ) { if ( !aBtnColHead.GetSavedValue() ) { - aBtnColHead.Check( TRUE ); - aBtnRowHead.Check( FALSE ); + aBtnColHead.Check( sal_True ); + aBtnRowHead.Check( sal_False ); if ( theCurArea.aStart.Row() == 0 && theCurArea.aEnd.Row() == MAXROW ) { theCurArea.aEnd.SetRow( MAXROW - 1 ); @@ -1131,8 +1131,8 @@ IMPL_LINK( ScColRowNameRangesDlg, RowClickHdl, void *, EMPTYARG ) { if ( !aBtnRowHead.GetSavedValue() ) { - aBtnRowHead.Check( TRUE ); - aBtnColHead.Check( FALSE ); + aBtnRowHead.Check( sal_True ); + aBtnColHead.Check( sal_False ); if ( theCurArea.aStart.Col() == 0 && theCurArea.aEnd.Col() == MAXCOL ) { theCurArea.aEnd.SetCol( MAXCOL - 1 ); diff --git a/sc/source/ui/miscdlgs/delcldlg.cxx b/sc/source/ui/miscdlgs/delcldlg.cxx index e3fc21672..222994ef5 100644 --- a/sc/source/ui/miscdlgs/delcldlg.cxx +++ b/sc/source/ui/miscdlgs/delcldlg.cxx @@ -39,11 +39,11 @@ #include "miscdlgs.hrc" -static BYTE nDelItemChecked=0; +static sal_uInt8 nDelItemChecked=0; //================================================================== -ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove ) : +ScDeleteCellDlg::ScDeleteCellDlg( Window* pParent, sal_Bool bDisallowCellMove ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DELCELL ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx index 1811a1eee..14cc979b9 100644 --- a/sc/source/ui/miscdlgs/delcodlg.cxx +++ b/sc/source/ui/miscdlgs/delcodlg.cxx @@ -41,15 +41,15 @@ //================================================================== -BOOL ScDeleteContentsDlg::bPreviousAllCheck = FALSE; -USHORT ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING | +sal_Bool ScDeleteContentsDlg::bPreviousAllCheck = sal_False; +sal_uInt16 ScDeleteContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_VALUE); //----------------------------------------------------------------------- ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent, - USHORT nCheckDefaults ) : + sal_uInt16 nCheckDefaults ) : ModalDialog ( pParent, ScResId( RID_SCDLG_DELCONT ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), @@ -64,12 +64,12 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent, aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), - bObjectsDisabled( FALSE ) + bObjectsDisabled( sal_False ) { if ( nCheckDefaults != 0 ) { ScDeleteContentsDlg::nPreviousChecks = nCheckDefaults; - ScDeleteContentsDlg::bPreviousAllCheck = FALSE; + ScDeleteContentsDlg::bPreviousAllCheck = sal_False; } aBtnDelAll.Check ( ScDeleteContentsDlg::bPreviousAllCheck ); @@ -98,7 +98,7 @@ ScDeleteContentsDlg::ScDeleteContentsDlg( Window* pParent, //------------------------------------------------------------------------ -USHORT ScDeleteContentsDlg::GetDelContentsCmdBits() const +sal_uInt16 ScDeleteContentsDlg::GetDelContentsCmdBits() const { ScDeleteContentsDlg::nPreviousChecks = 0; @@ -126,7 +126,7 @@ USHORT ScDeleteContentsDlg::GetDelContentsCmdBits() const //------------------------------------------------------------------------ -void ScDeleteContentsDlg::DisableChecks( BOOL bDelAllChecked ) +void ScDeleteContentsDlg::DisableChecks( sal_Bool bDelAllChecked ) { if ( bDelAllChecked ) { @@ -157,8 +157,8 @@ void ScDeleteContentsDlg::DisableChecks( BOOL bDelAllChecked ) void ScDeleteContentsDlg::DisableObjects() { - bObjectsDisabled = TRUE; - aBtnDelObjects.Check(FALSE); + bObjectsDisabled = sal_True; + aBtnDelObjects.Check(sal_False); aBtnDelObjects.Disable(); } diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 63cb85480..66b80e878 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -61,7 +61,7 @@ ScFillSeriesDlg::ScFillSeriesDlg( Window* pParent, String aStartStr, double fStep, double fMax, - USHORT nPossDir ) + sal_uInt16 nPossDir ) : ModalDialog ( pParent, ScResId( RID_SCDLG_FILLSERIES ) ), @@ -115,7 +115,7 @@ __EXPORT ScFillSeriesDlg::~ScFillSeriesDlg() //---------------------------------------------------------------------------- -void ScFillSeriesDlg::SetEdStartValEnabled(BOOL bFlag) +void ScFillSeriesDlg::SetEdStartValEnabled(sal_Bool bFlag) { bStartValFlag=bFlag; if(bFlag) @@ -132,7 +132,7 @@ void ScFillSeriesDlg::SetEdStartValEnabled(BOOL bFlag) //---------------------------------------------------------------------------- -void ScFillSeriesDlg::Init( USHORT nPossDir ) +void ScFillSeriesDlg::Init( sal_uInt16 nPossDir ) { aBtnOk.SetClickHdl ( LINK( this, ScFillSeriesDlg, OKHdl ) ); aBtnArithmetic.SetClickHdl ( LINK( this, ScFillSeriesDlg, DisableHdl ) ); @@ -221,7 +221,7 @@ void ScFillSeriesDlg::Init( USHORT nPossDir ) rDoc.GetFormatTable()->GetInputLineString( fEndVal, 0, aEndTxt ); aEdEndVal.SetText( aEndTxt ); - bStartValFlag=FALSE; + bStartValFlag=sal_False; aFlSep1.SetStyle( aFlSep1.GetStyle() | WB_VERT ); aFlSep2.SetStyle( aFlSep2.GetStyle() | WB_VERT ); @@ -230,16 +230,16 @@ void ScFillSeriesDlg::Init( USHORT nPossDir ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScFillSeriesDlg::CheckStartVal() +sal_Bool __EXPORT ScFillSeriesDlg::CheckStartVal() { - BOOL bValOk = FALSE; + sal_Bool bValOk = sal_False; sal_uInt32 nKey = 0; String aStr( aEdStartVal.GetText() ); if ( aStr.Len() == 0 || aBtnAutoFill.IsChecked()) { fStartVal = MAXDOUBLE; - bValOk = TRUE; + bValOk = sal_True; } else bValOk = rDoc.GetFormatTable()->IsNumberFormat( aStr, nKey, fStartVal ); @@ -250,7 +250,7 @@ BOOL __EXPORT ScFillSeriesDlg::CheckStartVal() //---------------------------------------------------------------------------- -BOOL __EXPORT ScFillSeriesDlg::CheckIncrementVal() +sal_Bool __EXPORT ScFillSeriesDlg::CheckIncrementVal() { sal_uInt32 nKey = 0; String aStr( aEdIncrement.GetText() ); @@ -261,16 +261,16 @@ BOOL __EXPORT ScFillSeriesDlg::CheckIncrementVal() //---------------------------------------------------------------------------- -BOOL __EXPORT ScFillSeriesDlg::CheckEndVal() +sal_Bool __EXPORT ScFillSeriesDlg::CheckEndVal() { - BOOL bValOk = FALSE; + sal_Bool bValOk = sal_False; sal_uInt32 nKey = 0; String aStr( aEdEndVal.GetText() ); if ( aStr.Len() == 0 ) { fEndVal = (fIncrement < 0) ? -MAXDOUBLE : MAXDOUBLE; - bValOk = TRUE; + bValOk = sal_True; } else bValOk = rDoc.GetFormatTable()->IsNumberFormat( aStr, nKey, fEndVal ); @@ -339,21 +339,21 @@ IMPL_LINK( ScFillSeriesDlg, OKHdl, void *, EMPTYARG ) else if ( aBtnMonth.IsChecked() ) theFillDateCmd = FILL_MONTH; else if ( aBtnYear.IsChecked() ) theFillDateCmd = FILL_YEAR; - BOOL bAllOk = TRUE; + sal_Bool bAllOk = sal_True; Edit* pEdWrong = NULL; if ( !CheckStartVal() ) { - bAllOk = FALSE; + bAllOk = sal_False; pEdWrong = &aEdStartVal; } else if ( !CheckIncrementVal() ) { - bAllOk = FALSE; + bAllOk = sal_False; pEdWrong = &aEdIncrement; } else if ( !CheckEndVal() ) { - bAllOk = FALSE; + bAllOk = sal_False; pEdWrong = &aEdEndVal; } if ( bAllOk ) diff --git a/sc/source/ui/miscdlgs/groupdlg.cxx b/sc/source/ui/miscdlgs/groupdlg.cxx index 60513d76e..87b57371e 100644 --- a/sc/source/ui/miscdlgs/groupdlg.cxx +++ b/sc/source/ui/miscdlgs/groupdlg.cxx @@ -42,9 +42,9 @@ //================================================================== ScGroupDlg::ScGroupDlg( Window* pParent, - USHORT nResId, - BOOL bUngroup, - BOOL bRows ) : + sal_uInt16 nResId, + sal_Bool bUngroup, + sal_Bool bRows ) : ModalDialog ( pParent, ScResId( nResId ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), @@ -68,7 +68,7 @@ ScGroupDlg::ScGroupDlg( Window* pParent, //------------------------------------------------------------------------ -BOOL ScGroupDlg::GetColsChecked() const +sal_Bool ScGroupDlg::GetColsChecked() const { return aBtnCols.IsChecked(); } diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx index 57af65470..691895e9c 100644 --- a/sc/source/ui/miscdlgs/highred.cxx +++ b/sc/source/ui/miscdlgs/highred.cxx @@ -59,7 +59,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(); @@ -102,17 +102,17 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind aOkButton.SetClickHdl(LINK( this, ScHighlightChgDlg, OKBtnHdl)); aHighlightBox.SetClickHdl(LINK( this, ScHighlightChgDlg, HighLightHandle )); aFilterCtr.SetRefHdl(LINK( this, ScHighlightChgDlg, RefHandle )); - aFilterCtr.HideRange(FALSE); + aFilterCtr.HideRange(sal_False); aFilterCtr.Show(); - SetDispatcherLock( TRUE ); - //SFX_APPWINDOW->Disable(FALSE); + SetDispatcherLock( sal_True ); + //SFX_APPWINDOW->Disable(sal_False); Init(); } ScHighlightChgDlg::~ScHighlightChgDlg() { - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); //SFX_APPWINDOW->Enable(); } @@ -129,7 +129,7 @@ void __EXPORT ScHighlightChgDlg::Init() aChangeViewSet.SetTheAuthorToShow(pChanges->GetUser()); aFilterCtr.ClearAuthors(); ScStrCollection aUserColl=pChanges->GetUserCollection(); - for(USHORT i=0;i<aUserColl.GetCount();i++) + for(sal_uInt16 i=0;i<aUserColl.GetCount();i++) aFilterCtr.InsertAuthor(aUserColl[i]->GetString()); } @@ -144,7 +144,7 @@ void __EXPORT ScHighlightChgDlg::Init() aFilterCtr.SetFirstTime(aChangeViewSet.GetTheFirstDateTime()); aFilterCtr.SetLastDate(aChangeViewSet.GetTheLastDateTime()); aFilterCtr.SetLastTime(aChangeViewSet.GetTheLastDateTime()); - aFilterCtr.SetDateMode((USHORT)aChangeViewSet.GetTheDateMode()); + aFilterCtr.SetDateMode((sal_uInt16)aChangeViewSet.GetTheDateMode()); aFilterCtr.CheckAuthor(aChangeViewSet.HasAuthor()); aFilterCtr.CheckComment(aChangeViewSet.HasComment()); aFilterCtr.SetComment(aChangeViewSet.GetTheComment()); @@ -172,7 +172,7 @@ void __EXPORT ScHighlightChgDlg::Init() pRangeEntry->Format( aRefStr, ABS_DREF3D, pDoc ); aFilterCtr.SetRange(aRefStr); } - aFilterCtr.Enable(TRUE,TRUE); + aFilterCtr.Enable(sal_True,sal_True); HighLightHandle(&aHighlightBox); } @@ -194,12 +194,12 @@ void ScHighlightChgDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) } //---------------------------------------------------------------------------- -BOOL __EXPORT ScHighlightChgDlg::Close() +sal_Bool __EXPORT ScHighlightChgDlg::Close() { return DoClose( ScHighlightChgDlgWrapper::GetChildWindowId() ); } -void ScHighlightChgDlg::RefInputDone( BOOL bForced) +void ScHighlightChgDlg::RefInputDone( sal_Bool bForced) { ScAnyRefDlg::RefInputDone(bForced); if(bForced || !aRbAssign.IsVisible()) @@ -220,13 +220,13 @@ void ScHighlightChgDlg::SetActive() aEdAssign.Hide(); aRbAssign.Hide(); SFX_APPWINDOW->Enable(); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); } //RefInputDone(); */ } -BOOL ScHighlightChgDlg::IsRefInputMode() const +sal_Bool ScHighlightChgDlg::IsRefInputMode() const { return aEdAssign.IsVisible(); } @@ -237,13 +237,13 @@ IMPL_LINK( ScHighlightChgDlg, HighLightHandle, CheckBox*, pCb ) { if(aHighlightBox.IsChecked()) { - aFilterCtr.Enable(TRUE,TRUE); + aFilterCtr.Enable(sal_True,sal_True); aCbAccept.Enable(); aCbReject.Enable(); } else { - aFilterCtr.Disable(TRUE); + aFilterCtr.Disable(sal_True); aCbAccept.Disable(); aCbReject.Disable(); } @@ -255,8 +255,8 @@ IMPL_LINK( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef ) { if(pRef!=NULL) { - SetDispatcherLock( TRUE ); - //SFX_APPWINDOW->Disable(FALSE); + SetDispatcherLock( sal_True ); + //SFX_APPWINDOW->Disable(sal_False); aEdAssign.Show(); aRbAssign.Show(); aEdAssign.SetText(aFilterCtr.GetRange()); diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx index 20a501700..7121f8190 100644 --- a/sc/source/ui/miscdlgs/inscldlg.cxx +++ b/sc/source/ui/miscdlgs/inscldlg.cxx @@ -39,11 +39,11 @@ #include "miscdlgs.hrc" -static BYTE nInsItemChecked=0; +static sal_uInt8 nInsItemChecked=0; //================================================================== -ScInsertCellDlg::ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove) : +ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) : ModalDialog ( pParent, ScResId( RID_SCDLG_INSCELL ) ), // aFlFrame ( this, ScResId( FL_FRAME ) ), diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 39332abe7..c02e2f78f 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -41,18 +41,18 @@ //================================================================== -BOOL ScInsertContentsDlg::bPreviousAllCheck = TRUE; -USHORT ScInsertContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING | +sal_Bool ScInsertContentsDlg::bPreviousAllCheck = sal_True; +sal_uInt16 ScInsertContentsDlg::nPreviousChecks = (IDF_DATETIME | IDF_STRING | IDF_NOTE | IDF_FORMULA | IDF_ATTRIB | IDF_OBJECTS); -USHORT ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC; -USHORT ScInsertContentsDlg::nPreviousChecks2 = 0; -USHORT ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd +sal_uInt16 ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC; +sal_uInt16 ScInsertContentsDlg::nPreviousChecks2 = 0; +sal_uInt16 ScInsertContentsDlg::nPreviousMoveMode = INS_NONE; // enum InsCellCmd //----------------------------------------------------------------------- ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent, - USHORT nCheckDefaults, + sal_uInt16 nCheckDefaults, const String* pStrTitle ) : ModalDialog ( pParent, ScResId( RID_SCDLG_INSCONT ) ), @@ -85,11 +85,11 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent, aBtnOk ( this, ScResId( BTN_OK ) ), aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), - bOtherDoc ( FALSE ), - bFillMode ( FALSE ), - bChangeTrack ( FALSE ), - bMoveDownDisabled( FALSE ), - bMoveRightDisabled( FALSE ) + bOtherDoc ( sal_False ), + bFillMode ( sal_False ), + bChangeTrack ( sal_False ), + bMoveDownDisabled( sal_False ), + bMoveRightDisabled( sal_False ) { if ( pStrTitle ) SetText( *pStrTitle ); @@ -97,7 +97,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent, if ( nCheckDefaults != 0 ) { ScInsertContentsDlg::nPreviousChecks = nCheckDefaults; - ScInsertContentsDlg::bPreviousAllCheck = FALSE; + ScInsertContentsDlg::bPreviousAllCheck = sal_False; ScInsertContentsDlg::nPreviousChecks2 = 0; } @@ -119,18 +119,18 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent, switch( ScInsertContentsDlg::nPreviousFormulaChecks ) { - case PASTE_NOFUNC: aRbNoOp.Check(TRUE); break; - case PASTE_ADD: aRbAdd.Check(TRUE); break; - case PASTE_SUB: aRbSub.Check(TRUE); break; - case PASTE_MUL: aRbMul.Check(TRUE); break; - case PASTE_DIV: aRbDiv.Check(TRUE); break; + case PASTE_NOFUNC: aRbNoOp.Check(sal_True); break; + case PASTE_ADD: aRbAdd.Check(sal_True); break; + case PASTE_SUB: aRbSub.Check(sal_True); break; + case PASTE_MUL: aRbMul.Check(sal_True); break; + case PASTE_DIV: aRbDiv.Check(sal_True); break; } switch( ScInsertContentsDlg::nPreviousMoveMode ) { - case INS_NONE: aRbMoveNone.Check(TRUE); break; - case INS_CELLSDOWN: aRbMoveDown.Check(TRUE); break; - case INS_CELLSRIGHT: aRbMoveRight.Check(TRUE); break; + case INS_NONE: aRbMoveNone.Check(sal_True); break; + case INS_CELLSDOWN: aRbMoveDown.Check(sal_True); break; + case INS_CELLSRIGHT: aRbMoveRight.Check(sal_True); break; } aBtnSkipEmptyCells.Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_NOEMPTY ) != 0); @@ -151,7 +151,7 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent, //------------------------------------------------------------------------ -USHORT ScInsertContentsDlg::GetInsContentsCmdBits() const +sal_uInt16 ScInsertContentsDlg::GetInsContentsCmdBits() const { ScInsertContentsDlg::nPreviousChecks = 0; @@ -191,7 +191,7 @@ InsCellCmd ScInsertContentsDlg::GetMoveMode() //------------------------------------------------------------------------ -void ScInsertContentsDlg::DisableChecks( BOOL bInsAllChecked ) +void ScInsertContentsDlg::DisableChecks( sal_Bool bInsAllChecked ) { if ( bInsAllChecked ) { @@ -242,7 +242,7 @@ void ScInsertContentsDlg::TestModes() aFlFrame.Disable(); aBtnInsAll.Disable(); - DisableChecks(TRUE); + DisableChecks(sal_True); } else { @@ -266,52 +266,52 @@ void ScInsertContentsDlg::TestModes() } } -void ScInsertContentsDlg::SetOtherDoc( BOOL bSet ) +void ScInsertContentsDlg::SetOtherDoc( sal_Bool bSet ) { if ( bSet != bOtherDoc ) { bOtherDoc = bSet; TestModes(); if ( bSet ) - aRbMoveNone.Check(TRUE); + aRbMoveNone.Check(sal_True); } } -void ScInsertContentsDlg::SetFillMode( BOOL bSet ) +void ScInsertContentsDlg::SetFillMode( sal_Bool bSet ) { if ( bSet != bFillMode ) { bFillMode = bSet; TestModes(); if ( bSet ) - aRbMoveNone.Check(TRUE); + aRbMoveNone.Check(sal_True); } } -void ScInsertContentsDlg::SetChangeTrack( BOOL bSet ) +void ScInsertContentsDlg::SetChangeTrack( sal_Bool bSet ) { if ( bSet != bChangeTrack ) { bChangeTrack = bSet; TestModes(); if ( bSet ) - aRbMoveNone.Check(TRUE); + aRbMoveNone.Check(sal_True); } } void ScInsertContentsDlg::SetCellShiftDisabled( int nDisable ) { - BOOL bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0); - BOOL bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0); + sal_Bool bDown = ((nDisable & SC_CELL_SHIFT_DISABLE_DOWN) != 0); + sal_Bool bRight = ((nDisable & SC_CELL_SHIFT_DISABLE_RIGHT) != 0); if ( bDown != bMoveDownDisabled || bRight != bMoveRightDisabled ) { bMoveDownDisabled = bDown; bMoveRightDisabled = bRight; TestModes(); if ( bMoveDownDisabled && aRbMoveDown.IsChecked() ) - aRbMoveNone.Check(TRUE); + aRbMoveNone.Check(sal_True); if ( bMoveRightDisabled && aRbMoveRight.IsChecked() ) - aRbMoveNone.Check(TRUE); + aRbMoveNone.Check(sal_True); } } @@ -353,7 +353,7 @@ __EXPORT ScInsertContentsDlg::~ScInsertContentsDlg() } } -USHORT ScInsertContentsDlg::GetFormulaCmdBits() const +sal_uInt16 ScInsertContentsDlg::GetFormulaCmdBits() const { ScInsertContentsDlg::nPreviousFormulaChecks = PASTE_NOFUNC; if(aRbAdd.IsChecked()) diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 2bb75ad5b..0c330bfa0 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -225,7 +225,7 @@ void ScInsertTableDlg::SetFromTo_Impl() void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc ) { - aLbTables.SetUpdateMode( FALSE ); + aLbTables.SetUpdateMode( sal_False ); aLbTables.Clear(); if ( pSrcDoc ) @@ -240,7 +240,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc ) } } - aLbTables.SetUpdateMode( TRUE ); + aLbTables.SetUpdateMode( sal_True ); if(aLbTables.GetEntryCount()==1) aLbTables.SelectEntryPos(0); @@ -248,7 +248,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc ) //------------------------------------------------------------------------ -const String* ScInsertTableDlg::GetFirstTable( USHORT* pN ) +const String* ScInsertTableDlg::GetFirstTable( sal_uInt16* pN ) { const String* pStr = NULL; @@ -271,7 +271,7 @@ const String* ScInsertTableDlg::GetFirstTable( USHORT* pN ) //------------------------------------------------------------------------ -const String* ScInsertTableDlg::GetNextTable( USHORT* pN ) +const String* ScInsertTableDlg::GetNextTable( sal_uInt16* pN ) { const String* pStr = NULL; @@ -392,7 +392,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg if ( pDocShTables ) pDocShTables->DoClose(); // delete passiert beim Zuweisen auf die Ref - pMed->UseInteractionHandler( TRUE ); // to enable the filter options dialog + pMed->UseInteractionHandler( sal_True ); // to enable the filter options dialog pDocShTables = new ScDocShell; aDocShTablesRef = pDocShTables; @@ -402,7 +402,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg pDocShTables->DoLoad( pMed ); SetPointer( aOldPtr ); - ULONG nErr = pDocShTables->GetErrorCode(); + sal_uLong nErr = pDocShTables->GetErrorCode(); if ( nErr ) ErrorHandler::HandleError( nErr ); // auch Warnings diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx index eb010b414..d042efd41 100644 --- a/sc/source/ui/miscdlgs/lbseldlg.cxx +++ b/sc/source/ui/miscdlgs/lbseldlg.cxx @@ -44,7 +44,7 @@ //================================================================== ScSelEntryDlg::ScSelEntryDlg( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const String& aTitle, const String& aLbTitle, List& aEntryList ) : @@ -84,7 +84,7 @@ String ScSelEntryDlg::GetSelectEntry() const //------------------------------------------------------------------------ -//UNUSED2008-05 USHORT ScSelEntryDlg::GetSelectEntryPos() const +//UNUSED2008-05 sal_uInt16 ScSelEntryDlg::GetSelectEntryPos() const //UNUSED2008-05 { //UNUSED2008-05 return aLb.GetSelectEntryPos(); //UNUSED2008-05 } diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index d16a829cb..6efc4a19f 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -130,9 +130,9 @@ IMPL_LINK( ScLinkedAreaDlg, FileHdl, ComboBox*, EMPTYARG ) String aFilter; String aOptions; - // get filter name by looking at the file content (bWithContent = TRUE) + // get filter name by looking at the file content (bWithContent = sal_True) // Break operation if any error occured inside. - if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, TRUE, TRUE )) + if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, sal_True, sal_True )) return 0; // #i53241# replace HTML filter with DataQuery filter @@ -165,11 +165,11 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter, SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, rFile ); - ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, TRUE ); // with interaction + ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, sal_True ); // with interaction pSourceShell = aLoader.GetDocShell(); if ( pSourceShell ) { - ULONG nErr = pSourceShell->GetErrorCode(); + sal_uLong nErr = pSourceShell->GetErrorCode(); if (nErr) ErrorHandler::HandleError( nErr ); // including warnings @@ -181,7 +181,7 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter, void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilter, const String& rOptions, const String& rSource, - ULONG nRefresh ) + sal_uLong nRefresh ) { LoadDocument( rFile, rFilter, rOptions ); if (pSourceShell) @@ -201,7 +201,7 @@ void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilte aLbRanges.SelectEntry( aRange ); } - BOOL bDoRefresh = ( nRefresh != 0 ); + sal_Bool bDoRefresh = ( nRefresh != 0 ); aBtnReload.Check( bDoRefresh ); if (bDoRefresh) aNfDelay.SetValue( nRefresh ); @@ -250,13 +250,13 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg if (pSourceShell) pSourceShell->DoClose(); // deleted when assigning aSourceRef - pMed->UseInteractionHandler( TRUE ); // to enable the filter options dialog + pMed->UseInteractionHandler( sal_True ); // to enable the filter options dialog pSourceShell = new ScDocShell; aSourceRef = pSourceShell; pSourceShell->DoLoad( pMed ); - ULONG nErr = pSourceShell->GetErrorCode(); + sal_uLong nErr = pSourceShell->GetErrorCode(); if (nErr) ErrorHandler::HandleError( nErr ); // including warnings @@ -285,7 +285,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg void ScLinkedAreaDlg::UpdateSourceRanges() { - aLbRanges.SetUpdateMode( FALSE ); + aLbRanges.SetUpdateMode( sal_False ); aLbRanges.Clear(); if ( pSourceShell ) @@ -297,7 +297,7 @@ void ScLinkedAreaDlg::UpdateSourceRanges() aLbRanges.InsertEntry( aName ); } - aLbRanges.SetUpdateMode( TRUE ); + aLbRanges.SetUpdateMode( sal_True ); if ( aLbRanges.GetEntryCount() == 1 ) aLbRanges.SelectEntryPos(0); @@ -305,10 +305,10 @@ void ScLinkedAreaDlg::UpdateSourceRanges() void ScLinkedAreaDlg::UpdateEnable() { - BOOL bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() ); + sal_Bool bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() ); aBtnOk.Enable( bEnable ); - BOOL bReload = aBtnReload.IsChecked(); + sal_Bool bReload = aBtnReload.IsChecked(); aNfDelay.Enable( bReload ); aFtSeconds.Enable( bReload ); } @@ -346,8 +346,8 @@ String ScLinkedAreaDlg::GetOptions() String ScLinkedAreaDlg::GetSource() { String aSource; - USHORT nCount = aLbRanges.GetSelectEntryCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = aLbRanges.GetSelectEntryCount(); + for (sal_uInt16 i=0; i<nCount; i++) { if (i > 0) aSource.Append( (sal_Unicode) ';' ); @@ -356,10 +356,10 @@ String ScLinkedAreaDlg::GetSource() return aSource; } -ULONG ScLinkedAreaDlg::GetRefresh() +sal_uLong ScLinkedAreaDlg::GetRefresh() { if ( aBtnReload.IsChecked() ) - return sal::static_int_cast<ULONG>( aNfDelay.GetValue() ); + return sal::static_int_cast<sal_uLong>( aNfDelay.GetValue() ); else return 0; // disabled } diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx index ceb96573e..c3430e618 100644 --- a/sc/source/ui/miscdlgs/mtrindlg.cxx +++ b/sc/source/ui/miscdlgs/mtrindlg.cxx @@ -42,11 +42,11 @@ //================================================================== ScMetricInputDlg::ScMetricInputDlg( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, long nCurrent, long nDefault, FieldUnit eFUnit, - USHORT nDecimals, + sal_uInt16 nDecimals, long nMaximum, long nMinimum, long nFirst, @@ -98,14 +98,14 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const mit Nachkommastellen: double nVal = aEdValue.GetValue( eUnit ); - USHORT nDecs = aEdValue.GetDecimalDigits(); + sal_uInt16 nDecs = aEdValue.GetDecimalDigits(); double nFactor = 0.0; - // static long ImpPower10( USHORT nDecs ) + // static long ImpPower10( sal_uInt16 nDecs ) { nFactor = 1.0; - for ( USHORT i=0; i < nDecs; i++ ) + for ( sal_uInt16 i=0; i < nDecs; i++ ) nFactor *= 10.0; } diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 37405ee1d..9b27b91cd 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -70,7 +70,7 @@ ScMoveTableDlg::ScMoveTableDlg( Window* pParent ) // nDocument ( 0 ), nTable ( 0 ), - bCopyTable ( FALSE ) + bCopyTable ( sal_False ) { #if ENABLE_LAYOUT #undef ScResId @@ -88,17 +88,17 @@ __EXPORT ScMoveTableDlg::~ScMoveTableDlg() //------------------------------------------------------------------------ -USHORT ScMoveTableDlg::GetSelectedDocument () const { return nDocument; } +sal_uInt16 ScMoveTableDlg::GetSelectedDocument () const { return nDocument; } SCTAB ScMoveTableDlg::GetSelectedTable () const { return nTable; } -BOOL ScMoveTableDlg::GetCopyTable () const { return bCopyTable; } +sal_Bool ScMoveTableDlg::GetCopyTable () const { return bCopyTable; } -void ScMoveTableDlg::SetCopyTable(BOOL bFlag) +void ScMoveTableDlg::SetCopyTable(sal_Bool bFlag) { aBtnCopy.Check(bFlag); } -void ScMoveTableDlg::EnableCopyTable(BOOL bFlag) +void ScMoveTableDlg::EnableCopyTable(sal_Bool bFlag) { if(bFlag) aBtnCopy.Enable(); @@ -113,7 +113,7 @@ void __EXPORT ScMoveTableDlg::Init() { aBtnOk.SetClickHdl ( LINK( this, ScMoveTableDlg, OkHdl ) ); aLbDoc.SetSelectHdl ( LINK( this, ScMoveTableDlg, SelHdl ) ); - aBtnCopy.Check( FALSE ); + aBtnCopy.Check( sal_False ); InitDocListBox(); SelHdl( &aLbDoc ); } @@ -124,11 +124,11 @@ void ScMoveTableDlg::InitDocListBox() { SfxObjectShell* pSh = SfxObjectShell::GetFirst(); ScDocShell* pScSh = NULL; - USHORT nSelPos = 0; - USHORT i = 0; + sal_uInt16 nSelPos = 0; + sal_uInt16 i = 0; aLbDoc.Clear(); - aLbDoc.SetUpdateMode( FALSE ); + aLbDoc.SetUpdateMode( sal_False ); while ( pSh ) { @@ -147,7 +147,7 @@ void ScMoveTableDlg::InitDocListBox() pSh = SfxObjectShell::GetNext( *pSh ); } - aLbDoc.SetUpdateMode( TRUE ); + aLbDoc.SetUpdateMode( sal_True ); aLbDoc.InsertEntry( String( ScResId( STR_NEWDOC ) ) ); aLbDoc.SelectEntryPos( nSelPos ); } @@ -158,10 +158,10 @@ void ScMoveTableDlg::InitDocListBox() IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG ) { - USHORT nDocSel = aLbDoc.GetSelectEntryPos(); - USHORT nDocLast = aLbDoc.GetEntryCount()-1; - USHORT nTabSel = aLbTable.GetSelectEntryPos(); - USHORT nTabLast = aLbTable.GetEntryCount()-1; + sal_uInt16 nDocSel = aLbDoc.GetSelectEntryPos(); + sal_uInt16 nDocLast = aLbDoc.GetEntryCount()-1; + sal_uInt16 nTabSel = aLbTable.GetSelectEntryPos(); + sal_uInt16 nTabLast = aLbTable.GetEntryCount()-1; nDocument = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW; nTable = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND; @@ -183,7 +183,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) String aName; aLbTable.Clear(); - aLbTable.SetUpdateMode( FALSE ); + aLbTable.SetUpdateMode( sal_False ); if ( pDoc ) { nLast = pDoc->GetTableCount()-1; @@ -194,7 +194,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) } } aLbTable.InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) ); - aLbTable.SetUpdateMode( TRUE ); + aLbTable.SetUpdateMode( sal_True ); aLbTable.SelectEntryPos( 0 ); } diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx index 770551e33..77d4f03b9 100644 --- a/sc/source/ui/miscdlgs/namecrea.cxx +++ b/sc/source/ui/miscdlgs/namecrea.cxx @@ -41,7 +41,7 @@ //================================================================== -ScNameCreateDlg::ScNameCreateDlg( Window * pParent, USHORT nFlags ) +ScNameCreateDlg::ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags ) : ModalDialog( pParent, ScResId(RID_SCDLG_NAMES_CREATE) ), aFixedLine ( this, ScResId( FL_FRAME ) ), aTopBox ( this, ScResId( BTN_TOP ) ), @@ -52,19 +52,19 @@ ScNameCreateDlg::ScNameCreateDlg( Window * pParent, USHORT nFlags ) aCancelButton ( this, ScResId( BTN_CANCEL ) ), aHelpButton ( this, ScResId( BTN_HELP ) ) { - aTopBox.Check ( (nFlags & NAME_TOP) ? TRUE : FALSE ); - aLeftBox.Check ( (nFlags & NAME_LEFT) ? TRUE : FALSE ); - aBottomBox.Check( (nFlags & NAME_BOTTOM)? TRUE : FALSE ); - aRightBox.Check ( (nFlags & NAME_RIGHT) ? TRUE : FALSE ); + aTopBox.Check ( (nFlags & NAME_TOP) ? sal_True : sal_False ); + aLeftBox.Check ( (nFlags & NAME_LEFT) ? sal_True : sal_False ); + aBottomBox.Check( (nFlags & NAME_BOTTOM)? sal_True : sal_False ); + aRightBox.Check ( (nFlags & NAME_RIGHT) ? sal_True : sal_False ); FreeResource(); } //------------------------------------------------------------------ -USHORT ScNameCreateDlg::GetFlags() const +sal_uInt16 ScNameCreateDlg::GetFlags() const { - USHORT nResult = 0; + sal_uInt16 nResult = 0; nResult |= aTopBox.IsChecked() ? NAME_TOP: 0 ; nResult |= aLeftBox.IsChecked() ? NAME_LEFT: 0 ; diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx index d72d86d2b..0d55b0362 100644 --- a/sc/source/ui/miscdlgs/namepast.cxx +++ b/sc/source/ui/miscdlgs/namepast.cxx @@ -42,7 +42,7 @@ //================================================================== -ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList ) +ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList ) : ModalDialog( pParent, ScResId( RID_SCDLG_NAMES_PASTE ) ), aLabelText ( this, ScResId( FT_LABEL ) ), aNameList ( this, ScResId( LB_ENTRYLIST ) ), @@ -59,10 +59,10 @@ ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL aNameList.SetSelectHdl( LINK( this,ScNamePasteDlg,ListSelHdl) ); aNameList.SetDoubleClickHdl( LINK( this,ScNamePasteDlg,ListDblClickHdl) ); - USHORT nCnt = pList->GetCount(); + sal_uInt16 nCnt = pList->GetCount(); String aText; - for( USHORT i=0 ; i<nCnt ; i++ ) + for( sal_uInt16 i=0 ; i<nCnt ; i++ ) { ScRangeData* pData = (*pList)[ i ]; diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index ca91292dd..59188b2b8 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -67,7 +67,7 @@ ScSolverProgressDialog::ScSolverProgressDialog( Window* pParent ) maFlButtons ( this, ScResId( FL_BUTTONS ) ), maBtnOk ( this, ScResId( BTN_OK ) ) { - maBtnOk.Enable(FALSE); + maBtnOk.Enable(sal_False); FreeResource(); } @@ -159,7 +159,7 @@ void ScCursorRefEdit::KeyInput( const KeyEvent& rKEvt ) //---------------------------------------------------------------------------- -ScOptSolverSave::ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue, +ScOptSolverSave::ScOptSolverSave( const String& rObjective, sal_Bool bMax, sal_Bool bMin, sal_Bool bValue, const String& rTarget, const String& rVariable, const std::vector<ScOptConditionRow>& rConditions, const String& rEngine, @@ -289,8 +289,8 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos) rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_DEL_ROWS ) ); uno::Reference<frame::XFrame> xFrame = GetBindings().GetActiveFrame(); - Image aDelNm = ::GetImage( xFrame, aSlotURL, FALSE, FALSE ); - Image aDelHC = ::GetImage( xFrame, aSlotURL, FALSE, TRUE ); // high contrast + Image aDelNm = ::GetImage( xFrame, aSlotURL, sal_False, sal_False ); + Image aDelHC = ::GetImage( xFrame, aSlotURL, sal_False, sal_True ); // high contrast for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow ) { @@ -451,7 +451,7 @@ void ScOptSolverDlg::EnableButtons() //---------------------------------------------------------------------------- -BOOL ScOptSolverDlg::Close() +sal_Bool ScOptSolverDlg::Close() { return DoClose( ScOptSolverDlgWrapper::GetChildWindowId() ); } @@ -496,7 +496,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) aStr = aName; else // format cell/range reference { - USHORT nFmt = ( aAdr.Tab() == mnCurTab ) ? SCA_ABS : SCA_ABS_3D; + sal_uInt16 nFmt = ( aAdr.Tab() == mnCurTab ) ? SCA_ABS : SCA_ABS_3D; if ( bSingle ) aAdr.Format( aStr, nFmt, pDocP, pDocP->GetAddressConvention() ); else @@ -529,7 +529,7 @@ void ScOptSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL ScOptSolverDlg::IsRefInputMode() const +sal_Bool ScOptSolverDlg::IsRefInputMode() const { return mpEdActive != NULL; } @@ -543,7 +543,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn ) { bool bSolve = ( pBtn == &maBtnSolve ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); bool bClose = true; @@ -563,7 +563,7 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn ) else { // no solution -> dialog is kept open - SetDispatcherLock( TRUE ); + SetDispatcherLock( sal_True ); } } else if ( pBtn == &maBtnOpt ) @@ -628,7 +628,7 @@ IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn ) for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow ) if( pBtn == mpDelButton[nRow] ) { - BOOL bHadFocus = pBtn->HasFocus(); + sal_Bool bHadFocus = pBtn->HasFocus(); ReadConditions(); long nVecPos = nScrollPos + nRow; @@ -771,7 +771,7 @@ bool ScOptSolverDlg::ParseRef( ScRange& rRange, const String& rInput, bool bAllo { ScRangeUtil aRangeUtil; ScAddress::Details aDetails(mpDoc->GetAddressConvention(), 0, 0); - USHORT nFlags = rRange.ParseAny( rInput, mpDoc, aDetails ); + sal_uInt16 nFlags = rRange.ParseAny( rInput, mpDoc, aDetails ); if ( nFlags & SCA_VALID ) { if ( (nFlags & SCA_TAB_3D) == 0 ) @@ -842,8 +842,8 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal } uno::Sequence<table::CellAddress> aVariables; sal_Int32 nVarPos = 0; - ULONG nRangeCount = aVarRanges.Count(); - for (ULONG nRangePos=0; nRangePos<nRangeCount; ++nRangePos) + sal_uLong nRangeCount = aVarRanges.Count(); + for (sal_uLong nRangePos=0; nRangePos<nRangeCount; ++nRangePos) { ScRange aRange(*aVarRanges.GetObject(nRangePos)); aRange.Justify(); @@ -1021,7 +1021,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal { ScAddress aCellPos; ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] ); - aFunc.PutCell( aCellPos, new ScValueCell( aSolution[nVarPos] ), TRUE ); + aFunc.PutCell( aCellPos, new ScValueCell( aSolution[nVarPos] ), sal_True ); } mpDocShell->UnlockPaint(); } @@ -1056,7 +1056,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal { ScAddress aCellPos; ScUnoConversion::FillScAddress( aCellPos, aVariables[nVarPos] ); - aFunc.PutCell( aCellPos, new ScValueCell( aOldValues[nVarPos] ), TRUE ); + aFunc.PutCell( aCellPos, new ScValueCell( aOldValues[nVarPos] ), sal_True ); } mpDocShell->UnlockPaint(); } diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx index 79d53b9c8..0068a8306 100644 --- a/sc/source/ui/miscdlgs/protectiondlg.cxx +++ b/sc/source/ui/miscdlgs/protectiondlg.cxx @@ -41,7 +41,7 @@ static const ScTableProtection::Option aOptions[] = { ScTableProtection::SELECT_LOCKED_CELLS, ScTableProtection::SELECT_UNLOCKED_CELLS, }; -static const USHORT nOptionCount = sizeof(aOptions)/sizeof(aOptions[0]); +static const sal_uInt16 nOptionCount = sizeof(aOptions)/sizeof(aOptions[0]); ScTableProtectionDlg::ScTableProtectionDlg(Window* pParent) : @@ -78,7 +78,7 @@ short ScTableProtectionDlg::Execute() void ScTableProtectionDlg::SetDialogData(const ScTableProtection& rData) { - for (USHORT i = 0; i < nOptionCount; ++i) + for (sal_uInt16 i = 0; i < nOptionCount; ++i) maOptionsListBox.CheckEntryPos(i, rData.isOptionEnabled(aOptions[i])); } @@ -89,7 +89,7 @@ void ScTableProtectionDlg::WriteData(ScTableProtection& rData) const // We assume that the two password texts match. rData.setPassword(maPassword1Edit.GetText()); - for (USHORT i = 0; i < nOptionCount; ++i) + for (sal_uInt16 i = 0; i < nOptionCount; ++i) rData.setOption(aOptions[i], maOptionsListBox.IsChecked(i)); } diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx index f1004a3fa..78d4a55a4 100644 --- a/sc/source/ui/miscdlgs/redcom.cxx +++ b/sc/source/ui/miscdlgs/redcom.cxx @@ -40,13 +40,13 @@ //------------------------------------------------------------------------ ScRedComDialog::ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet, - ScDocShell *pShell,ScChangeAction *pAction,BOOL bPrevNext) + ScDocShell *pShell,ScChangeAction *pAction,sal_Bool bPrevNext) { - //CHINA001 pDlg = new SvxPostItDialog(pParent,rCoreSet,bPrevNext,TRUE); + //CHINA001 pDlg = new SvxPostItDialog(pParent,rCoreSet,bPrevNext,sal_True); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, TRUE ); + pDlg = pFact->CreateSvxPostItDialog( pParent, rCoreSet, bPrevNext, sal_True ); DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 pDocShell=pShell; pDlg->DontChangeAuthor(); @@ -116,8 +116,8 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction) pDlg->SetText(aTitle); aComment=pChangeAction->GetComment(); - BOOL bNext=FindNext(pChangeAction)!=NULL; - BOOL bPrev=FindPrev(pChangeAction)!=NULL; + sal_Bool bNext=FindNext(pChangeAction)!=NULL; + sal_Bool bPrev=FindPrev(pChangeAction)!=NULL; pDlg->EnableTravel(bNext,bPrev); String aAuthor = pChangeAction->GetUser(); @@ -125,7 +125,7 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction) DateTime aDT = pChangeAction->GetDateTime(); String aDate = ScGlobal::pLocaleData->getDate( aDT ); aDate += ' '; - aDate += ScGlobal::pLocaleData->getTime( aDT, FALSE, FALSE ); + aDate += ScGlobal::pLocaleData->getTime( aDT, sal_False, sal_False ); pDlg->ShowLastAuthor(aAuthor, aDate); pDlg->SetNote(aComment); diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 628b50bfd..6e4585193 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -101,8 +101,8 @@ ScAutoFormatDlg::ScAutoFormatDlg( Window* pParent, pFormat ( pAutoFormat ), pSelFmtData ( pSelFormatData ), nIndex ( 0 ), - bCoreDataChanged( FALSE ), - bFmtInserted ( FALSE ) + bCoreDataChanged( sal_False ), + bFmtInserted ( sal_False ) { Init(); pWndPreview->NotifyChange( (*pFormat)[0] ); @@ -120,7 +120,7 @@ __EXPORT ScAutoFormatDlg::~ScAutoFormatDlg() void ScAutoFormatDlg::Init() { - USHORT nCount; + sal_uInt16 nCount; String aEntry; aLbFormat .SetSelectHdl( LINK( this, ScAutoFormatDlg, SelFmtHdl ) ); @@ -148,7 +148,7 @@ void ScAutoFormatDlg::Init() nCount = pFormat->GetCount(); - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) { ((*pFormat)[i])->GetName( aEntry ); aLbFormat.InsertEntry( aEntry ); @@ -168,7 +168,7 @@ void ScAutoFormatDlg::Init() { aBtnAdd.Disable(); aBtnRemove.Disable(); - bFmtInserted = TRUE; + bFmtInserted = sal_True; } } @@ -219,7 +219,7 @@ IMPL_LINK_INLINE_END( ScAutoFormatDlg, DblClkHdl, void *, EMPTYARG ) IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn ) { ScAutoFormatData* pData = (*pFormat)[nIndex]; - BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(); + sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(); if ( pBtn == &aBtnNumFormat ) pData->SetIncludeValueFormat( bCheck ); @@ -237,7 +237,7 @@ IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn ) if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } pWndPreview->NotifyChange( pData ); @@ -254,7 +254,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) String aStrStandard( SfxResId(STR_STANDARD) ); String aFormatName; ScStringInputDlg* pDlg; - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; while ( !bOk ) { @@ -278,7 +278,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) if ( bFmtInserted ) { - USHORT nAt = pFormat->IndexOf( pNewData ); + sal_uInt16 nAt = pFormat->IndexOf( pNewData ); aLbFormat.InsertEntry( aFormatName, nAt ); aLbFormat.SelectEntry( aFormatName ); @@ -287,11 +287,11 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } SelFmtHdl( 0 ); - bOk = TRUE; + bOk = sal_True; } else delete pNewData; @@ -300,7 +300,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) if ( !bFmtInserted ) { - USHORT nRet = ErrorBox( this, + sal_uInt16 nRet = ErrorBox( this, WinBits( WB_OK_CANCEL | WB_DEF_OK), ScGlobal::GetRscString(STR_INVALID_AFNAME) ).Execute(); @@ -309,7 +309,7 @@ IMPL_LINK( ScAutoFormatDlg, AddHdl, void *, EMPTYARG ) } } else - bOk = TRUE; + bOk = sal_True; delete pDlg; } @@ -341,7 +341,7 @@ IMPL_LINK( ScAutoFormatDlg, RemoveHdl, void *, EMPTYARG ) if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } pFormat->AtFree( nIndex ); // in der Core loeschen @@ -358,7 +358,7 @@ IMPL_LINK( ScAutoFormatDlg, RemoveHdl, void *, EMPTYARG ) IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; while( !bOk ) { @@ -372,9 +372,9 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG ) HID_SC_REN_AFMT_DLG, HID_SC_REN_AFMT_NAME ); if( pDlg->Execute() == RET_OK ) { - BOOL bFmtRenamed = FALSE; + sal_Bool bFmtRenamed = sal_False; pDlg->GetInputString( aFormatName ); - USHORT n; + sal_uInt16 n; if ( aFormatName.Len() > 0 ) { @@ -400,29 +400,29 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG ) pFormat->Insert( pNewData); - USHORT nCount = pFormat->GetCount(); + sal_uInt16 nCount = pFormat->GetCount(); - aLbFormat.SetUpdateMode(FALSE); + aLbFormat.SetUpdateMode(sal_False); aLbFormat.Clear(); - for ( USHORT i = 0; i < nCount; i++ ) + for ( sal_uInt16 i = 0; i < nCount; i++ ) { ((*pFormat)[i])->GetName( aEntry ); aLbFormat.InsertEntry( aEntry ); } - aLbFormat.SetUpdateMode( TRUE); + aLbFormat.SetUpdateMode( sal_True); aLbFormat.SelectEntry( aFormatName); if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } SelFmtHdl( 0 ); - bOk = TRUE; - bFmtRenamed = TRUE; + bOk = sal_True; + bFmtRenamed = sal_True; } } if( !bFmtRenamed ) @@ -434,7 +434,7 @@ IMPL_LINK( ScAutoFormatDlg, RenameHdl, void *, EMPTYARG ) } } else - bOk = TRUE; + bOk = sal_True; delete pDlg; } diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx index 96d5ded3b..26043b900 100644 --- a/sc/source/ui/miscdlgs/sharedocdlg.cxx +++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx @@ -158,12 +158,12 @@ void ScShareDocumentDlg::UpdateView() ::rtl::OUString aDateStr = aDateTimeStr.getToken( 0, ' ', nIndex ); ::rtl::OUString aTimeStr = aDateTimeStr.getToken( 0, ' ', nIndex ); nIndex = 0; - USHORT nDay = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); - USHORT nMonth = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); - USHORT nYear = sal::static_int_cast< USHORT >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); + sal_uInt16 nDay = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); + sal_uInt16 nMonth = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); + sal_uInt16 nYear = sal::static_int_cast< sal_uInt16 >( aDateStr.getToken( 0, '.', nIndex ).toInt32() ); nIndex = 0; - USHORT nHours = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); - USHORT nMinutes = sal::static_int_cast< USHORT >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); + sal_uInt16 nHours = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); + sal_uInt16 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() ); Date aDate( nDay, nMonth, nYear ); Time aTime( nHours, nMinutes ); DateTime aDateTime( aDate, aTime ); @@ -172,7 +172,7 @@ void ScShareDocumentDlg::UpdateView() aString += '\t'; aString += ScGlobal::pLocaleData->getDate( aDateTime ); aString += ' '; - aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE ); + aString += ScGlobal::pLocaleData->getTime( aDateTime, sal_False ); maLbUsers.InsertEntry( aString, NULL ); } @@ -228,7 +228,7 @@ void ScShareDocumentDlg::UpdateView() aString += ScGlobal::pLocaleData->getDate( aDateTime ); aString += ' '; - aString += ScGlobal::pLocaleData->getTime( aDateTime, FALSE ); + aString += ScGlobal::pLocaleData->getTime( aDateTime, sal_False ); maLbUsers.InsertEntry( aString, NULL ); } diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx index 7a06c4c94..fde9832dd 100644 --- a/sc/source/ui/miscdlgs/shtabdlg.cxx +++ b/sc/source/ui/miscdlgs/shtabdlg.cxx @@ -70,7 +70,7 @@ void ScShowTabDlg::SetDescription( aLb.SetHelpId( sLbHelpId ); } -void ScShowTabDlg::Insert( const String& rString, BOOL bSelected ) +void ScShowTabDlg::Insert( const String& rString, sal_Bool bSelected ) { aLb.InsertEntry( rString ); if( bSelected ) @@ -79,17 +79,17 @@ void ScShowTabDlg::Insert( const String& rString, BOOL bSelected ) //------------------------------------------------------------------------ -USHORT ScShowTabDlg::GetSelectEntryCount() const +sal_uInt16 ScShowTabDlg::GetSelectEntryCount() const { return aLb.GetSelectEntryCount(); } -String ScShowTabDlg::GetSelectEntry(USHORT nPos) const +String ScShowTabDlg::GetSelectEntry(sal_uInt16 nPos) const { return aLb.GetSelectEntry(nPos); } -USHORT ScShowTabDlg::GetSelectEntryPos(USHORT nPos) const +sal_uInt16 ScShowTabDlg::GetSelectEntryPos(sal_uInt16 nPos) const { return aLb.GetSelectEntryPos(nPos); } diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx index 9dfc1af2d..c8d076bc7 100644 --- a/sc/source/ui/miscdlgs/simpref.cxx +++ b/sc/source/ui/miscdlgs/simpref.cxx @@ -80,22 +80,22 @@ ScSimpleRefDlg::ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pP // pViewData ( ptrViewData ), pDoc ( ptrViewData->GetDocument() ), - bRefInputMode ( FALSE ), - bAutoReOpen ( TRUE ), - bCloseOnButtonUp( FALSE ), - bSingleCell ( FALSE ), - bMultiSelection ( FALSE ) + bRefInputMode ( sal_False ), + bAutoReOpen ( sal_True ), + bCloseOnButtonUp( sal_False ), + bSingleCell ( sal_False ), + bMultiSelection ( sal_False ) { // damit die Strings in der Resource bei den FixedTexten bleiben koennen: Init(); FreeResource(); - SetDispatcherLock( TRUE ); // Modal-Modus einschalten + SetDispatcherLock( sal_True ); // Modal-Modus einschalten } //---------------------------------------------------------------------------- __EXPORT ScSimpleRefDlg::~ScSimpleRefDlg() { - SetDispatcherLock( FALSE ); // Modal-Modus einschalten + SetDispatcherLock( sal_False ); // Modal-Modus einschalten } //---------------------------------------------------------------------------- @@ -116,7 +116,7 @@ void ScSimpleRefDlg::Init() { aBtnOk.SetClickHdl ( LINK( this, ScSimpleRefDlg, OkBtnHdl ) ); aBtnCancel.SetClickHdl ( LINK( this, ScSimpleRefDlg, CancelBtnHdl ) ); - bCloseFlag=FALSE; + bCloseFlag=sal_False; } //---------------------------------------------------------------------------- @@ -159,10 +159,10 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScSimpleRefDlg::Close() +sal_Bool __EXPORT ScSimpleRefDlg::Close() { CancelBtnHdl(&aBtnCancel); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -177,9 +177,9 @@ void ScSimpleRefDlg::SetActive() RefInputDone(); } //------------------------------------------------------------------------ -BOOL ScSimpleRefDlg::IsRefInputMode() const +sal_Bool ScSimpleRefDlg::IsRefInputMode() const { - return TRUE; + return sal_True; } String ScSimpleRefDlg::GetRefString() const @@ -200,7 +200,7 @@ void ScSimpleRefDlg::SetUnoLinks( const Link& rDone, const Link& rAbort, aChangeHdl = rChange; } -void ScSimpleRefDlg::SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection ) +void ScSimpleRefDlg::SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection ) { bCloseOnButtonUp = bSetCloseOnButtonUp; bSingleCell = bSetSingleCell; @@ -216,10 +216,10 @@ void ScSimpleRefDlg::StartRefInput() } aRbAssign.DoRef(); - bCloseFlag=TRUE; + bCloseFlag=sal_True; } -void ScSimpleRefDlg::RefInputDone( BOOL bForced) +void ScSimpleRefDlg::RefInputDone( sal_Bool bForced) { ScAnyRefDlg::RefInputDone(bForced); if ( (bForced || bCloseOnButtonUp) && bCloseFlag ) @@ -230,7 +230,7 @@ void ScSimpleRefDlg::RefInputDone( BOOL bForced) // ======== IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG ) { - bAutoReOpen=FALSE; + bAutoReOpen=sal_False; String aResult=aEdAssign.GetText(); aCloseHdl.Call(&aResult); Link aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose @@ -242,7 +242,7 @@ IMPL_LINK( ScSimpleRefDlg, OkBtnHdl, void *, EMPTYARG ) //------------------------------------------------------------------------ IMPL_LINK( ScSimpleRefDlg, CancelBtnHdl, void *, EMPTYARG ) { - bAutoReOpen=FALSE; + bAutoReOpen=sal_False; String aResult=aEdAssign.GetText(); aCloseHdl.Call(NULL); Link aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 2f5244329..7b661d171 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -76,7 +76,7 @@ class ScSolverOptionsString : public SvLBoxString sal_Int32 mnIntValue; public: - ScSolverOptionsString( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) : + ScSolverOptionsString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rStr ) : SvLBoxString( pEntry, nFlags, rStr ), mbIsDouble( false ), mfDoubleValue( 0.0 ), @@ -89,10 +89,10 @@ public: void SetDoubleValue( double fNew ) { mbIsDouble = true; mfDoubleValue = fNew; } void SetIntValue( sal_Int32 nNew ) { mbIsDouble = false; mnIntValue = nNew; } - virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry ); + virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; -void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* /* pEntry */ ) +void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* /* pEntry */ ) { //! move position? (SvxLinguTabPage: aPos.X() += 20) String aNormalStr( GetText() ); @@ -174,7 +174,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog( Window* pParent, maProperties.realloc(0); // don't use options from different engine } if ( nSelect >= 0 ) // select in list box - maLbEngine.SelectEntryPos( static_cast<USHORT>(nSelect) ); + maLbEngine.SelectEntryPos( static_cast<sal_uInt16>(nSelect) ); if ( !maProperties.getLength() ) ReadFromComponent(); // fill maProperties from component (using maEngine) @@ -207,8 +207,8 @@ const uno::Sequence<beans::PropertyValue>& ScSolverOptionsDialog::GetProperties( SvLBoxEntry* pEntry = pModel->GetEntry(nEntryPos); bool bHasData = false; - USHORT nItemCount = pEntry->ItemCount(); - for (USHORT nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos) + sal_uInt16 nItemCount = pEntry->ItemCount(); + for (sal_uInt16 nItemPos=0; nItemPos<nItemCount && !bHasData; ++nItemPos) { SvLBoxItem* pItem = pEntry->GetItem( nItemPos ); ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(pItem); @@ -264,7 +264,7 @@ void ScSolverOptionsDialog::FillListBox() // fill the list box - maLbSettings.SetUpdateMode(FALSE); + maLbSettings.SetUpdateMode(sal_False); maLbSettings.Clear(); String sEmpty; @@ -317,7 +317,7 @@ void ScSolverOptionsDialog::FillListBox() pModel->Insert( pEntry ); } - maLbSettings.SetUpdateMode(TRUE); + maLbSettings.SetUpdateMode(sal_True); } void ScSolverOptionsDialog::ReadFromComponent() @@ -330,8 +330,8 @@ void ScSolverOptionsDialog::EditOption() SvLBoxEntry* pEntry = maLbSettings.GetCurEntry(); if (pEntry) { - USHORT nItemCount = pEntry->ItemCount(); - for (USHORT nPos=0; nPos<nItemCount; ++nPos) + sal_uInt16 nItemCount = pEntry->ItemCount(); + for (sal_uInt16 nPos=0; nPos<nItemCount; ++nPos) { SvLBoxItem* pItem = pEntry->GetItem( nPos ); ScSolverOptionsString* pStringItem = dynamic_cast<ScSolverOptionsString*>(pItem); @@ -380,7 +380,7 @@ IMPL_LINK( ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListBox*, EMPTYA IMPL_LINK( ScSolverOptionsDialog, EngineSelectHdl, ListBox*, EMPTYARG ) { - USHORT nSelectPos = maLbEngine.GetSelectEntryPos(); + sal_uInt16 nSelectPos = maLbEngine.GetSelectEntryPos(); if ( nSelectPos < maImplNames.getLength() ) { String aNewEngine( maImplNames[nSelectPos] ); @@ -396,14 +396,14 @@ IMPL_LINK( ScSolverOptionsDialog, EngineSelectHdl, ListBox*, EMPTYARG ) IMPL_LINK( ScSolverOptionsDialog, SettingsSelHdl, SvxCheckListBox*, EMPTYARG ) { - BOOL bCheckbox = FALSE; + sal_Bool bCheckbox = sal_False; SvLBoxEntry* pEntry = maLbSettings.GetCurEntry(); if (pEntry) { SvLBoxItem* pItem = pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON); if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXBUTTON ) - bCheckbox = TRUE; + bCheckbox = sal_True; } maBtnEdit.Enable( !bCheckbox ); diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index c430fce89..d643ddbed 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -80,7 +80,7 @@ ScSolverDlg::ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pDoc ( pDocument ), nCurTab ( aCursorPos.Tab() ), pEdActive ( NULL ), - bDlgLostFocus ( FALSE ), + bDlgLostFocus ( sal_False ), errMsgInvalidVar ( ScResId( STR_INVALIDVAR ) ), errMsgInvalidForm ( ScResId( STR_INVALIDFORM ) ), errMsgNoFormula ( ScResId( STR_NOFORMULA ) ), @@ -127,7 +127,7 @@ void __EXPORT ScSolverDlg::Init() //---------------------------------------------------------------------------- -BOOL __EXPORT ScSolverDlg::Close() +sal_Bool __EXPORT ScSolverDlg::Close() { return DoClose( ScSolverDlgWrapper::GetChildWindowId() ); } @@ -138,7 +138,7 @@ void ScSolverDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if( pEdActive ) pEdActive->GrabFocus(); } @@ -160,7 +160,7 @@ void ScSolverDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) String aStr; ScAddress aAdr = rRef.aStart; - USHORT nFmt = ( aAdr.Tab() == nCurTab ) + sal_uInt16 nFmt = ( aAdr.Tab() == nCurTab ) ? SCA_ABS : SCA_ABS_3D; @@ -204,14 +204,14 @@ void ScSolverDlg::RaiseError( ScSolverErr eError ) //---------------------------------------------------------------------------- -BOOL ScSolverDlg::IsRefInputMode() const +sal_Bool ScSolverDlg::IsRefInputMode() const { return pEdActive != NULL; } //---------------------------------------------------------------------------- -BOOL __EXPORT ScSolverDlg::CheckTargetValue( String& rStrVal ) +sal_Bool __EXPORT ScSolverDlg::CheckTargetValue( String& rStrVal ) { sal_uInt32 n1 = 0; double n2; @@ -234,8 +234,8 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn ) // 3. wurde ein korrekter Zielwert eingegeben const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - USHORT nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv ); - USHORT nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv ); + sal_uInt16 nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv ); + sal_uInt16 nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv ); if ( SCA_VALID == ( nRes1 & SCA_VALID ) ) { @@ -256,7 +256,7 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn ) theTargetValStr ); ScSolveItem aOutItem( SCITEM_SOLVEDATA, &aOutParam ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( SID_SOLVE, diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx index b5ba7899e..adb56b229 100644 --- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx +++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx @@ -102,7 +102,7 @@ void ScTabBgColorDlg::FillColorValueSets_Impl() const Size aSize15x15 = Size( 15, 15 ); const Size aSize10x10 = Size( 10, 10 ); const Size aSize5x5 = Size( 5, 5 ); - USHORT nSelectedItem = 0; + sal_uInt16 nSelectedItem = 0; DBG_ASSERT( pDocSh, "DocShell not found!" ); @@ -155,10 +155,10 @@ IMPL_LINK( ScTabBgColorDlg, TabBgColorDblClickHdl_Impl, ValueSet*, EMPTYARG ) Handler, called when color selection is changed */ { - USHORT nItemId = aTabBgColorSet.GetSelectItemId(); + sal_uInt16 nItemId = aTabBgColorSet.GetSelectItemId(); Color aColor = nItemId ? ( aTabBgColorSet.GetItemColor( nItemId ) ) : Color( COL_AUTO ); aTabBgColor = aColor; - EndDialog( TRUE ); + EndDialog( sal_True ); return 0; } @@ -167,10 +167,10 @@ IMPL_LINK( ScTabBgColorDlg, TabBgColorOKHdl_Impl, OKButton*, EMPTYARG ) // Handler, called when the OK button is pushed - USHORT nItemId = aTabBgColorSet.GetSelectItemId(); + sal_uInt16 nItemId = aTabBgColorSet.GetSelectItemId(); Color aColor = nItemId ? ( aTabBgColorSet.GetItemColor( nItemId ) ) : Color( COL_AUTO ); aTabBgColor = aColor; - EndDialog( TRUE ); + EndDialog( sal_True ); return 0; } @@ -187,10 +187,10 @@ void ScTabBgColorDlg::ScTabBgColorValueSet::KeyInput( const KeyEvent& rKEvt ) case KEY_SPACE: case KEY_RETURN: { - USHORT nItemId = GetSelectItemId(); + sal_uInt16 nItemId = GetSelectItemId(); const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) : Color( COL_AUTO ); aTabBgColorDlg->aTabBgColor = aColor; - aTabBgColorDlg->EndDialog(TRUE); + aTabBgColorDlg->EndDialog(sal_True); } break; } diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 884560c55..8036637a8 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -76,7 +76,7 @@ ScTabOpDlg::ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, pDoc ( pDocument ), nCurTab ( theFormulaCell.Tab() ), pEdActive ( NULL ), - bDlgLostFocus ( FALSE ), + bDlgLostFocus ( sal_False ), errMsgNoFormula ( ScResId( STR_NOFORMULA ) ), errMsgNoColRow ( ScResId( STR_NOCOLROW ) ), errMsgWrongFormula ( ScResId( STR_WRONGFORMULA ) ), @@ -127,7 +127,7 @@ void __EXPORT ScTabOpDlg::Init() //---------------------------------------------------------------------------- -BOOL __EXPORT ScTabOpDlg::Close() +sal_Bool __EXPORT ScTabOpDlg::Close() { return DoClose( ScTabOpDlgWrapper::GetChildWindowId() ); } @@ -138,7 +138,7 @@ void ScTabOpDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if( pEdActive ) pEdActive->GrabFocus(); } @@ -160,7 +160,7 @@ void ScTabOpDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) RefInputStart(pEdActive); String aStr; - USHORT nFmt = ( rRef.aStart.Tab() == nCurTab ) + sal_uInt16 nFmt = ( rRef.aStart.Tab() == nCurTab ) ? SCR_ABS : SCR_ABS_3D; @@ -236,10 +236,10 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError ) //---------------------------------------------------------------------------- -BOOL lcl_Parse( const String& rString, ScDocument* pDoc, SCTAB nCurTab, +sal_Bool lcl_Parse( const String& rString, ScDocument* pDoc, SCTAB nCurTab, ScRefAddress& rStart, ScRefAddress& rEnd ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); if ( rString.Search(':') != STRING_NOTFOUND ) bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv ); @@ -258,8 +258,8 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn ) { if ( pBtn == &aBtnOk ) { - BYTE nMode = 3; - USHORT nError = 0; + sal_uInt8 nMode = 3; + sal_uInt16 nError = 0; // Zu ueberpruefen: // 1. enthalten die Strings korrekte Tabellenkoordinaten/def.Namen? @@ -324,7 +324,7 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn ) nMode ); ScTabOpItem aOutItem( SID_TABOP, &aOutParam ); - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( SID_TABOP, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx index 7c48cf288..4bfe6264e 100644 --- a/sc/source/ui/miscdlgs/textdlgs.cxx +++ b/sc/source/ui/miscdlgs/textdlgs.cxx @@ -68,7 +68,7 @@ ScCharDlg::ScCharDlg( Window* pParent, const SfxItemSet* pAttr, // ----------------------------------------------------------------------- -void __EXPORT ScCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) +void __EXPORT ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); //CHINA001 switch( nId ) @@ -118,7 +118,7 @@ ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) : // ----------------------------------------------------------------------- -void __EXPORT ScParagraphDlg::PageCreated( USHORT nId, SfxTabPage &rPage ) +void __EXPORT ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { switch( nId ) { diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx index 3d970e4e5..f6b0f8b5d 100644 --- a/sc/source/ui/miscdlgs/warnbox.cxx +++ b/sc/source/ui/miscdlgs/warnbox.cxx @@ -75,14 +75,14 @@ ScReplaceWarnBox::ScReplaceWarnBox( Window* pParent ) : bool ScReplaceWarnBox::IsDialogEnabled() { - return SC_MOD()->GetInputOptions().GetReplaceCellsWarn() == TRUE; + return SC_MOD()->GetInputOptions().GetReplaceCellsWarn() == sal_True; } void ScReplaceWarnBox::DisableDialog() { ScModule* pScMod = SC_MOD(); ScInputOptions aInputOpt( pScMod->GetInputOptions() ); - aInputOpt.SetReplaceCellsWarn( FALSE ); + aInputOpt.SetReplaceCellsWarn( sal_False ); pScMod->SetInputOptions( aInputOpt ); } diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index 1e1ebd7ee..164684687 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -66,24 +66,24 @@ struct SaveData { SaveData() - : bCriteria(FALSE),bPrintArea(FALSE), - bColHeader(FALSE),bRowHeader(FALSE), - bDirty(FALSE) {} + : bCriteria(sal_False),bPrintArea(sal_False), + bColHeader(sal_False),bRowHeader(sal_False), + bDirty(sal_False) {} void Clear() { aStrSymbol.Erase(); bCriteria = bPrintArea = - bColHeader = bRowHeader = FALSE; - bDirty = TRUE; + bColHeader = bRowHeader = sal_False; + bDirty = sal_True; } String aStrSymbol; - BOOL bCriteria:1; - BOOL bPrintArea:1; - BOOL bColHeader:1; - BOOL bRowHeader:1; - BOOL bDirty:1; + sal_Bool bCriteria:1; + sal_Bool bPrintArea:1; + sal_Bool bColHeader:1; + sal_Bool bRowHeader:1; + sal_Bool bDirty:1; }; static SaveData* pSaveObj = NULL; @@ -94,7 +94,7 @@ static SaveData* pSaveObj = NULL; pSaveObj->bPrintArea = aBtnPrintArea.IsChecked(); \ pSaveObj->bColHeader = aBtnColHeader.IsChecked(); \ pSaveObj->bRowHeader = aBtnRowHeader.IsChecked(); \ - pSaveObj->bDirty = TRUE; + pSaveObj->bDirty = sal_True; #define RESTORE_DATA() \ if ( pSaveObj->bDirty ) \ @@ -104,7 +104,7 @@ static SaveData* pSaveObj = NULL; aBtnPrintArea.Check( pSaveObj->bPrintArea ); \ aBtnColHeader.Check( pSaveObj->bColHeader ); \ aBtnRowHeader.Check( pSaveObj->bRowHeader ); \ - pSaveObj->bDirty = FALSE; \ + pSaveObj->bDirty = sal_False; \ } #define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute(); @@ -141,7 +141,7 @@ ScNameDlg::ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, aBtnRemove ( this, ScResId( BTN_REMOVE ) ), aBtnMore ( this, ScResId( BTN_MORE ) ), // - bSaved (FALSE), + bSaved (sal_False), aStrAdd ( ScResId( STR_ADD ) ), aStrModify ( ScResId( STR_MODIFY ) ), errMsgInvalidSym( ScResId( STR_INVALIDSYMBOL ) ), @@ -213,20 +213,20 @@ void __EXPORT ScNameDlg::Init() UpdateChecks(); EdModifyHdl( 0 ); - bSaved=TRUE; + bSaved=sal_True; SAVE_DATA() //@BugID 54702 - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg + //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg } //---------------------------------------------------------------------------- -BOOL ScNameDlg::IsRefInputMode() const +sal_Bool ScNameDlg::IsRefInputMode() const { return aEdAssign.IsEnabled(); } -void ScNameDlg::RefInputDone( BOOL bForced) +void ScNameDlg::RefInputDone( sal_Bool bForced) { ScAnyRefDlg::RefInputDone(bForced); EdModifyHdl(&aEdAssign); @@ -251,7 +251,7 @@ void ScNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -BOOL __EXPORT ScNameDlg::Close() +sal_Bool __EXPORT ScNameDlg::Close() { return DoClose( ScNameDlgWrapper::GetChildWindowId() ); } @@ -270,7 +270,7 @@ void ScNameDlg::SetActive() void __EXPORT ScNameDlg::UpdateChecks() { - USHORT nCurPos=0; + sal_uInt16 nCurPos=0; if(aLocalRangeName.SearchName( aEdName.GetText(), nCurPos)) { @@ -315,11 +315,11 @@ void __EXPORT ScNameDlg::UpdateChecks() void __EXPORT ScNameDlg::UpdateNames() { - USHORT nRangeCount = aLocalRangeName.GetCount(); + sal_uInt16 nRangeCount = aLocalRangeName.GetCount(); - aEdName.SetUpdateMode( FALSE ); + aEdName.SetUpdateMode( sal_False ); //----------------------------------------------------------- - USHORT nNamePos = aEdName.GetTopEntry(); + sal_uInt16 nNamePos = aEdName.GetTopEntry(); aEdName.Clear(); aEdAssign.SetText( EMPTY_STRING ); @@ -329,7 +329,7 @@ void __EXPORT ScNameDlg::UpdateNames() ScRangeData* pRangeData = NULL; String aString; - for ( USHORT i=0; i<nRangeCount; i++ ) + for ( sal_uInt16 i=0; i<nRangeCount; i++ ) { pRangeData = (ScRangeData*)(aLocalRangeName.At( i )); if ( pRangeData ) @@ -350,7 +350,7 @@ void __EXPORT ScNameDlg::UpdateNames() aBtnRemove.Disable(); } //----------------------------------------------------------- - aEdName.SetUpdateMode( TRUE ); + aEdName.SetUpdateMode( sal_True ); aEdName.SetTopEntry(nNamePos); aEdName.Invalidate(); } @@ -358,7 +358,7 @@ void __EXPORT ScNameDlg::UpdateNames() //---------------------------------------------------------------------------- -void __EXPORT ScNameDlg::CalcCurTableAssign( String& aAssign, USHORT nCurPos ) +void __EXPORT ScNameDlg::CalcCurTableAssign( String& aAssign, sal_uInt16 nCurPos ) { ScRangeData* pRangeData = (ScRangeData*)(aLocalRangeName.At( nCurPos )); @@ -388,7 +388,7 @@ IMPL_LINK( ScNameDlg, OkBtnHdl, void *, EMPTYARG ) { ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocFunc aFunc(*pDocSh); - aFunc.ModifyRangeNames( aLocalRangeName, FALSE ); + aFunc.ModifyRangeNames( aLocalRangeName, sal_False ); Close(); } return 0; @@ -409,9 +409,9 @@ IMPL_LINK_INLINE_END( ScNameDlg, CancelBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG ) { - BOOL bAdded = FALSE; + sal_Bool bAdded = sal_False; String aNewEntry = aEdName.GetText(); - USHORT nNamePos = aEdName.GetTopEntry(); + sal_uInt16 nNamePos = aEdName.GetTopEntry(); aNewEntry.EraseLeadingChars( ' ' ); aNewEntry.EraseTrailingChars( ' ' ); @@ -423,7 +423,7 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG ) { ScRangeData* pNewEntry = NULL; RangeType nType = RT_NAME; - USHORT nFoundAt = 0; + sal_uInt16 nFoundAt = 0; String theSymbol = aEdAssign.GetText(); String aStrPos; String aStrArea; @@ -462,7 +462,7 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG ) delete pNewEntry; UpdateNames(); - bSaved=FALSE; + bSaved=sal_False; RESTORE_DATA() aEdName.SetText(EMPTY_STRING); aEdName.GrabFocus(); @@ -472,9 +472,9 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG ) aBtnRemove.Disable(); //@BugID 54702 raus mit dem Sch. - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg + //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg - bAdded = TRUE; + bAdded = sal_True; } else // theSymbol ungueltig { @@ -502,7 +502,7 @@ IMPL_LINK( ScNameDlg, AddBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScNameDlg, RemoveBtnHdl, void *, EMPTYARG ) { - USHORT nRemoveAt = 0; + sal_uInt16 nRemoveAt = 0; const String aStrEntry = aEdName.GetText(); if ( aLocalRangeName.SearchName( aStrEntry, nRemoveAt ) ) @@ -519,7 +519,7 @@ IMPL_LINK( ScNameDlg, RemoveBtnHdl, void *, EMPTYARG ) aLocalRangeName.AtFree( nRemoveAt ); UpdateNames(); UpdateChecks(); - bSaved=FALSE; + bSaved=sal_False; RESTORE_DATA() theCurSel = Selection( 0, SELECTION_MAX ); aBtnAdd.SetText( aStrAdd ); @@ -535,7 +535,7 @@ IMPL_LINK( ScNameDlg, RemoveBtnHdl, void *, EMPTYARG ) IMPL_LINK( ScNameDlg, NameSelectHdl, void *, EMPTYARG ) { - USHORT nAtPos; + sal_uInt16 nAtPos; if ( aLocalRangeName.SearchName( aEdName.GetText(), nAtPos ) ) { @@ -562,7 +562,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd ) { String theName = aEdName.GetText(); String theSymbol = aEdAssign.GetText(); - BOOL bNameFound = (COMBOBOX_ENTRY_NOTFOUND + sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND != aEdName.GetEntryPos( theName )); if ( pEd == &aEdName ) @@ -577,7 +577,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd ) aEdAssign.Disable(); aRbAssign.Disable(); //@BugID 54702 raus mit dem Sch. - //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg + //SFX_APPWINDOW->Disable(sal_False); //! allgemeine Methode im ScAnyRefDlg } else { @@ -590,7 +590,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd ) if(!bSaved) { - bSaved=TRUE; + bSaved=sal_True; SAVE_DATA() } NameSelectHdl( 0 ); @@ -601,7 +601,7 @@ IMPL_LINK( ScNameDlg, EdModifyHdl, Edit *, pEd ) aBtnAdd.SetText( aStrAdd ); aBtnRemove.Disable(); - bSaved=FALSE; + bSaved=sal_False; RESTORE_DATA() } theSymbol = aEdAssign.GetText(); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 6d31c0856..52c1baeee 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -74,7 +74,7 @@ using namespace com::sun::star; // Reihenfolge der Kategorien im Navigator ------------------------------------- -static USHORT pTypeList[SC_CONTENT_COUNT] = +static sal_uInt16 pTypeList[SC_CONTENT_COUNT] = { SC_CONTENT_ROOT, // ROOT (0) muss vorne stehen SC_CONTENT_TABLE, @@ -87,7 +87,7 @@ static USHORT pTypeList[SC_CONTENT_COUNT] = SC_CONTENT_DRAWING }; -BOOL ScContentTree::bIsInDrag = FALSE; +sal_Bool ScContentTree::bIsInDrag = sal_False; ScDocShell* ScContentTree::GetManualOrCurrent() @@ -129,10 +129,10 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) : aEntryImages ( ScResId( RID_IMAGELIST_NAVCONT ) ), aHCEntryImages ( ScResId( RID_IMAGELIST_H_NAVCONT ) ), nRootType ( SC_CONTENT_ROOT ), - bHiddenDoc ( FALSE ), + bHiddenDoc ( sal_False ), pHiddenDocument ( NULL ) { - USHORT i; + sal_uInt16 i; for (i=0; i<SC_CONTENT_COUNT; i++) pPosList[pTypeList[i]] = i; // invers zum suchen @@ -153,7 +153,7 @@ ScContentTree::~ScContentTree() { } -void ScContentTree::InitRoot( USHORT nType ) +void ScContentTree::InitRoot( sal_uInt16 nType ) { if ( !nType ) return; @@ -167,8 +167,8 @@ void ScContentTree::InitRoot( USHORT nType ) const Image& rImage = aEntryImages.GetImage( nType ); String aName( ScResId( SCSTR_CONTENT_ROOT + nType ) ); // wieder an die richtige Position: - USHORT nPos = nRootType ? 0 : pPosList[nType]-1; - SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, FALSE, nPos ); + sal_uInt16 nPos = nRootType ? 0 : pPosList[nType]-1; + SvLBoxEntry* pNew = InsertEntry( aName, rImage, rImage, NULL, sal_False, nPos ); const Image& rHCImage = aHCEntryImages.GetImage( nType ); SetExpandedEntryBmp( pNew, rHCImage, BMP_COLOR_HIGHCONTRAST ); @@ -180,11 +180,11 @@ void ScContentTree::InitRoot( USHORT nType ) void ScContentTree::ClearAll() { Clear(); - for (USHORT i=1; i<SC_CONTENT_COUNT; i++) + for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++) InitRoot(i); } -void ScContentTree::ClearType(USHORT nType) +void ScContentTree::ClearType(sal_uInt16 nType) { if (!nType) ClearAll(); @@ -200,7 +200,7 @@ void ScContentTree::ClearType(USHORT nType) } } -void ScContentTree::InsertContent( USHORT nType, const String& rValue ) +void ScContentTree::InsertContent( sal_uInt16 nType, const String& rValue ) { if (nType >= SC_CONTENT_COUNT) { @@ -217,7 +217,7 @@ void ScContentTree::InsertContent( USHORT nType, const String& rValue ) } } -void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const +void ScContentTree::GetEntryIndexes( sal_uInt16& rnRootIndex, sal_uLong& rnChildIndex, SvLBoxEntry* pEntry ) const { rnRootIndex = SC_CONTENT_ROOT; rnChildIndex = SC_CONTENT_NOCHILD; @@ -227,7 +227,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S SvLBoxEntry* pParent = GetParent( pEntry ); bool bFound = false; - for( USHORT nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot ) + for( sal_uInt16 nRoot = 1; !bFound && (nRoot < SC_CONTENT_COUNT); ++nRoot ) { if( pEntry == pRootNodes[ nRoot ] ) { @@ -240,7 +240,7 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S rnRootIndex = nRoot; // search the entry in all child entries of the parent - ULONG nEntry = 0; + sal_uLong nEntry = 0; SvLBoxEntry* pIterEntry = FirstChild( pParent ); while( !bFound && pIterEntry ) { @@ -258,10 +258,10 @@ void ScContentTree::GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, S } } -ULONG ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const +sal_uLong ScContentTree::GetChildIndex( SvLBoxEntry* pEntry ) const { - USHORT nRoot; - ULONG nChild; + sal_uInt16 nRoot; + sal_uLong nChild; GetEntryIndexes( nRoot, nChild, pEntry ); return nChild; } @@ -272,8 +272,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName ) if (pDoc) { ScDBCollection* pDbNames = pDoc->GetDBCollection(); - USHORT nCount = pDbNames->GetCount(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = pDbNames->GetCount(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { ScDBData* pData = (*pDbNames)[i]; if ( pData->GetName() == rDBName ) @@ -290,8 +290,8 @@ String lcl_GetDBAreaRange( ScDocument* pDoc, const String& rDBName ) IMPL_LINK( ScContentTree, ContentDoubleClickHdl, ScContentTree *, EMPTYARG ) { - USHORT nType; - ULONG nChild; + sal_uInt16 nType; + sal_uLong nChild; SvLBoxEntry* pEntry = GetCurEntry(); GetEntryIndexes( nType, nChild, pEntry ); @@ -370,7 +370,7 @@ void ScContentTree::MouseButtonDown( const MouseEvent& rMEvt ) void ScContentTree::KeyInput( const KeyEvent& rKEvt ) { - BOOL bUsed = FALSE; + sal_Bool bUsed = sal_False; const KeyCode aCode = rKEvt.GetKeyCode(); if (aCode.GetCode() == KEY_RETURN) @@ -379,15 +379,15 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) { case KEY_MOD1: ToggleRoot(); // toggle root mode (as in Writer) - bUsed = TRUE; + bUsed = sal_True; break; case 0: { SvLBoxEntry* pEntry = GetCurEntry(); if( pEntry ) { - USHORT nType; - ULONG nChild; + sal_uInt16 nType; + sal_uLong nChild; GetEntryIndexes( nType, nChild, pEntry ); if( (nType != SC_CONTENT_ROOT) && (nChild == SC_CONTENT_NOCHILD) ) @@ -402,7 +402,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) ContentDoubleClickHdl(0); // select content as if double clicked } - bUsed = TRUE; + bUsed = sal_True; } break; } @@ -413,12 +413,12 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) SvTreeListBox::KeyInput(rKEvt); } -//BOOL __EXPORT ScContentTree::Drop( const DropEvent& rEvt ) +//sal_Bool __EXPORT ScContentTree::Drop( const DropEvent& rEvt ) //{ // return pParentWindow->Drop(rEvt); // Drop auf Navigator //} -//BOOL __EXPORT ScContentTree::QueryDrop( DropEvent& rEvt ) +//sal_Bool __EXPORT ScContentTree::QueryDrop( DropEvent& rEvt ) //{ // return pParentWindow->QueryDrop(rEvt); // Drop auf Navigator //} @@ -444,7 +444,7 @@ void ScContentTree::DragFinished( sal_Int8 /* nAction */ ) void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; switch ( rCEvt.GetCommand() ) { @@ -458,7 +458,7 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt ) Application::PostUserEvent( STATIC_LINK( this, ScContentTree, ExecDragHdl ) ); - bDone = TRUE; + bDone = sal_True; break; case COMMAND_CONTEXTMENU: @@ -475,8 +475,8 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt ) ScPopupMenu aDocMenu; aDocMenu.SetMenuFlags( aDocMenu.GetMenuFlags() | MENU_FLAG_NOAUTOMNEMONICS ); - USHORT i=0; - USHORT nPos=0; + sal_uInt16 i=0; + sal_uInt16 nPos=0; // geladene Dokumente ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() ); SfxObjectShell* pSh = SfxObjectShell::GetFirst(); @@ -519,13 +519,13 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt ) if ( aDropMenu.WasHit() ) // Drag-Drop Modus { - USHORT nId = aDropMenu.GetSelected(); + sal_uInt16 nId = aDropMenu.GetSelected(); if ( nId >= RID_DROPMODE_URL && nId <= RID_DROPMODE_COPY ) pParentWindow->SetDropMode( nId - RID_DROPMODE_URL ); } else if ( aDocMenu.WasHit() ) // angezeigtes Dokument { - USHORT nId = aDocMenu.GetSelected(); + sal_uInt16 nId = aDocMenu.GetSelected(); String aName = aDocMenu.GetItemText(nId); SelectDoc( aName ); } @@ -539,14 +539,14 @@ void __EXPORT ScContentTree::Command( const CommandEvent& rCEvt ) void __EXPORT ScContentTree::RequestHelp( const HelpEvent& rHEvt ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if( rHEvt.GetMode() & HELPMODE_QUICK ) { Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() )); SvLBoxEntry* pEntry = GetEntry( aPos ); if ( pEntry ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; String aHelpText; SvLBoxEntry* pParent = GetParent(pEntry); if ( !pParent ) // Top-Level ? @@ -554,23 +554,23 @@ void __EXPORT ScContentTree::RequestHelp( const HelpEvent& rHEvt ) aHelpText = String::CreateFromInt32( GetChildCount(pEntry) ); aHelpText += ' '; aHelpText += GetEntryText(pEntry); - bRet = TRUE; + bRet = sal_True; } else if ( pParent == pRootNodes[SC_CONTENT_NOTE] ) { aHelpText = GetEntryText(pEntry); // Notizen als Help-Text - bRet = TRUE; + bRet = sal_True; } else if ( pParent == pRootNodes[SC_CONTENT_AREALINK] ) { - ULONG nIndex = GetChildIndex(pEntry); + sal_uLong nIndex = GetChildIndex(pEntry); if( nIndex != SC_CONTENT_NOCHILD ) { const ScAreaLink* pLink = GetLink(nIndex); if (pLink) { aHelpText = pLink->GetFile(); // Source-Datei als Help-Text - bRet = TRUE; + bRet = sal_True; } } } @@ -588,7 +588,7 @@ void __EXPORT ScContentTree::RequestHelp( const HelpEvent& rHEvt ) Rectangle aItemRect( aPos, aSize ); Help::ShowQuickHelp( this, aItemRect, aHelpText ); - bDone = TRUE; + bDone = sal_True; } } } @@ -611,7 +611,7 @@ ScDocument* ScContentTree::GetSourceDocument() return NULL; } -void ScContentTree::Refresh( USHORT nType ) +void ScContentTree::Refresh( sal_uInt16 nType ) { if ( bHiddenDoc && !pHiddenDocument ) return; // anderes Dokument angezeigt @@ -631,7 +631,7 @@ void ScContentTree::Refresh( USHORT nType ) if (!DrawNamesChanged(SC_CONTENT_DRAWING)) return; - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); ClearType( nType ); @@ -653,7 +653,7 @@ void ScContentTree::Refresh( USHORT nType ) GetLinkNames(); ApplySettings(); - SetUpdateMode(TRUE); + SetUpdateMode(sal_True); } void ScContentTree::GetTableNames() @@ -684,12 +684,12 @@ void ScContentTree::GetAreaNames() return; 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; i<nCount; i++ ) { ScRangeData* pData = (*pRangeNames)[i]; @@ -699,7 +699,7 @@ void ScContentTree::GetAreaNames() if ( nValidCount ) { ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ]; - USHORT j; + sal_uInt16 j; for ( i=0, j=0; i<nCount; i++ ) { ScRangeData* pData = (*pRangeNames)[i]; @@ -730,11 +730,11 @@ void ScContentTree::GetDbNames() return; ScDBCollection* pDbNames = pDoc->GetDBCollection(); - USHORT nCount = pDbNames->GetCount(); + sal_uInt16 nCount = pDbNames->GetCount(); if ( nCount > 0 ) { String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) ); - for ( USHORT i=0; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) { ScDBData* pData = (*pDbNames)[i]; String aStrName = pData->GetName(); @@ -744,7 +744,7 @@ void ScContentTree::GetDbNames() } } -bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier ) // static +bool ScContentTree::IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier ) // static { bool bRet = false; switch ( nContentType ) @@ -764,7 +764,7 @@ bool ScContentTree::IsPartOfType( USHORT nContentType, USHORT nObjIdentifier ) return bRet; } -void ScContentTree::GetDrawNames( USHORT nType ) +void ScContentTree::GetDrawNames( sal_uInt16 nType ) { if ( nRootType && nRootType != nType ) // ausgeblendet ? return; @@ -832,8 +832,8 @@ void ScContentTree::GetLinkNames() sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?"); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = rLinks.Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) @@ -843,18 +843,18 @@ void ScContentTree::GetLinkNames() } } -const ScAreaLink* ScContentTree::GetLink( ULONG nIndex ) +const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex ) { ScDocument* pDoc = GetSourceDocument(); if (!pDoc) return NULL; - ULONG nFound = 0; + sal_uLong nFound = 0; sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?"); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = rLinks.Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = rLinks.Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) @@ -897,13 +897,13 @@ void ScContentTree::GetNoteStrings() } } -ScAddress ScContentTree::GetNotePos( ULONG nIndex ) +ScAddress ScContentTree::GetNotePos( sal_uLong nIndex ) { ScDocument* pDoc = GetSourceDocument(); if (!pDoc) return ScAddress(); - ULONG nFound = 0; + sal_uLong nFound = 0; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) { @@ -925,19 +925,19 @@ ScAddress ScContentTree::GetNotePos( ULONG nIndex ) return ScAddress(); } -BOOL ScContentTree::NoteStringsChanged() +sal_Bool ScContentTree::NoteStringsChanged() { ScDocument* pDoc = GetSourceDocument(); if (!pDoc) - return FALSE; + return sal_False; SvLBoxEntry* pParent = pRootNodes[SC_CONTENT_NOTE]; if (!pParent) - return FALSE; + return sal_False; SvLBoxEntry* pEntry = FirstChild( pParent ); - BOOL bEqual = TRUE; + sal_Bool bEqual = sal_True; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount && bEqual; nTab++) { @@ -948,11 +948,11 @@ BOOL ScContentTree::NoteStringsChanged() if( const ScPostIt* pNote = pCell->GetNote() ) { if ( !pEntry ) - bEqual = FALSE; + bEqual = sal_False; else { if ( lcl_NoteString( *pNote ) != GetEntryText(pEntry) ) - bEqual = FALSE; + bEqual = sal_False; pEntry = NextSibling( pEntry ); } @@ -962,27 +962,27 @@ BOOL ScContentTree::NoteStringsChanged() } if ( pEntry ) - bEqual = FALSE; // kommt noch was + bEqual = sal_False; // kommt noch was return !bEqual; } -BOOL ScContentTree::DrawNamesChanged( USHORT nType ) +sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType ) { ScDocument* pDoc = GetSourceDocument(); if (!pDoc) - return FALSE; + return sal_False; SvLBoxEntry* pParent = pRootNodes[nType]; if (!pParent) - return FALSE; + return sal_False; SvLBoxEntry* pEntry = FirstChild( pParent ); // iterate in flat mode for groups SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS; - BOOL bEqual = TRUE; + sal_Bool bEqual = sal_True; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); SfxObjectShell* pShell = pDoc->GetDocumentShell(); if (pDrawLayer && pShell) @@ -1001,11 +1001,11 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType ) if ( IsPartOfType( nType, pObject->GetObjIdentifier() ) ) { if ( !pEntry ) - bEqual = FALSE; + bEqual = sal_False; else { if ( ScDrawLayer::GetVisibleName( pObject ) != GetEntryText(pEntry) ) - bEqual = FALSE; + bEqual = sal_False; pEntry = NextSibling( pEntry ); } @@ -1017,15 +1017,15 @@ BOOL ScContentTree::DrawNamesChanged( USHORT nType ) } if ( pEntry ) - bEqual = FALSE; // kommt noch was + bEqual = sal_False; // kommt noch was return !bEqual; } -BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange& rRange ) +sal_Bool lcl_GetRange( ScDocument* pDoc, sal_uInt16 nType, const String& rName, ScRange& rRange ) { - BOOL bFound = FALSE; - USHORT nPos; + sal_Bool bFound = sal_False; + sal_uInt16 nPos; if ( nType == SC_CONTENT_RANGENAME ) { @@ -1033,7 +1033,7 @@ BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange& if (pList) if (pList->SearchName( rName, nPos )) if ( (*pList)[nPos]->IsValidReference( rRange ) ) - bFound = TRUE; + bFound = sal_True; } else if ( nType == SC_CONTENT_DBAREA ) { @@ -1046,22 +1046,22 @@ BOOL lcl_GetRange( ScDocument* pDoc, USHORT nType, const String& rName, ScRange& SCROW nRow1, nRow2; (*pList)[nPos]->GetArea(nTab,nCol1,nRow1,nCol2,nRow2); rRange = ScRange( nCol1,nRow1,nTab, nCol2,nRow2,nTab ); - bFound = TRUE; + bFound = sal_True; } } return bFound; } -void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType, Window* pWin ) +void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, sal_uInt16 nType, Window* pWin ) { ScDocument* pSrcDoc = pSrcShell->GetDocument(); ScDrawLayer* pModel = pSrcDoc->GetDrawLayer(); if (pModel) { - BOOL bOle = ( nType == SC_CONTENT_OLEOBJECT ); - BOOL bGraf = ( nType == SC_CONTENT_GRAPHIC ); - USHORT nDrawId = sal::static_int_cast<USHORT>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) ); + sal_Bool bOle = ( nType == SC_CONTENT_OLEOBJECT ); + sal_Bool bGraf = ( nType == SC_CONTENT_GRAPHIC ); + sal_uInt16 nDrawId = sal::static_int_cast<sal_uInt16>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) ); SCTAB nTab = 0; SdrObject* pObject = pModel->GetNamedObject( rName, nDrawId, nTab ); if (pObject) @@ -1091,10 +1091,10 @@ void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, USHORT nType, } } -void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlags, Window* pWin ) +void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_uInt16 nFlags, Window* pWin ) { ScMarkData aMark; - aMark.SelectTable( rRange.aStart.Tab(), TRUE ); + aMark.SelectTable( rRange.aStart.Tab(), sal_True ); aMark.SetMarkArea( rRange ); ScDocument* pSrcDoc = pSrcShell->GetDocument(); @@ -1105,7 +1105,7 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); ScClipParam aClipParam(rRange, false); pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark); - // pClipDoc->ExtendMerge( rRange, TRUE ); + // pClipDoc->ExtendMerge( rRange, sal_True ); TransferableObjectDescriptor aObjDesc; pSrcShell->FillTransferableObjectDescriptor( aObjDesc ); @@ -1127,12 +1127,12 @@ void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, USHORT nFlag void ScContentTree::DoDrag() { ScDocumentLoader* pDocLoader = NULL; - bIsInDrag = TRUE; + bIsInDrag = sal_True; ScModule* pScMod = SC_MOD(); - USHORT nType; - ULONG nChild; + sal_uInt16 nType; + sal_uLong nChild; SvLBoxEntry* pEntry = GetCurEntry(); GetEntryIndexes( nType, nChild, pEntry ); @@ -1160,11 +1160,11 @@ void ScContentTree::DoDrag() } } - BOOL bDoLinkTrans = FALSE; // use ScLinkTransferObj + sal_Bool bDoLinkTrans = sal_False; // use ScLinkTransferObj String aLinkURL; // for ScLinkTransferObj String aLinkText; - USHORT nDropMode = pParentWindow->GetDropMode(); + sal_uInt16 nDropMode = pParentWindow->GetDropMode(); switch ( nDropMode ) { case SC_DROPMODE_URL: @@ -1183,7 +1183,7 @@ void ScContentTree::DoDrag() aLinkURL = aUrl; aLinkText = aText; } - bDoLinkTrans = TRUE; + bDoLinkTrans = sal_True; } break; case SC_DROPMODE_LINK: @@ -1196,12 +1196,12 @@ void ScContentTree::DoDrag() { case SC_CONTENT_TABLE: pScMod->SetDragLink( aDocName, aText, EMPTY_STRING ); - bDoLinkTrans = TRUE; + bDoLinkTrans = sal_True; break; case SC_CONTENT_RANGENAME: case SC_CONTENT_DBAREA: pScMod->SetDragLink( aDocName, EMPTY_STRING, aText ); - bDoLinkTrans = TRUE; + bDoLinkTrans = sal_True; break; // other types cannot be linked @@ -1270,7 +1270,7 @@ void ScContentTree::DoDrag() } } - bIsInDrag = FALSE; // static Member + bIsInDrag = sal_False; // static Member delete pDocLoader; // falls Dokument zum Draggen geladen wurde } @@ -1295,19 +1295,19 @@ IMPL_STATIC_LINK(ScContentTree, ExecDragHdl, void*, EMPTYARG) //UNUSED2008-05 pParentWindow->SetText(aTitle); //UNUSED2008-05 } -BOOL ScContentTree::LoadFile( const String& rUrl ) +sal_Bool ScContentTree::LoadFile( const String& rUrl ) { String aDocName = rUrl; xub_StrLen nPos = aDocName.Search('#'); if ( nPos != STRING_NOTFOUND ) aDocName.Erase(nPos); // nur der Name, ohne #... - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; String aFilter, aOptions; ScDocumentLoader aLoader( aDocName, aFilter, aOptions ); if ( !aLoader.IsError() ) { - bHiddenDoc = TRUE; + bHiddenDoc = sal_True; aHiddenName = aDocName; aHiddenTitle = aLoader.GetTitle(); pHiddenDocument = aLoader.GetDocument(); @@ -1327,7 +1327,7 @@ BOOL ScContentTree::LoadFile( const String& rUrl ) return bReturn; } -void ScContentTree::InitWindowBits( BOOL bButtons ) +void ScContentTree::InitWindowBits( sal_Bool bButtons ) { WinBits nFlags = GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL; if (bButtons) @@ -1336,7 +1336,7 @@ void ScContentTree::InitWindowBits( BOOL bButtons ) SetStyle( nFlags ); } -void ScContentTree::SetRootType( USHORT nNew ) +void ScContentTree::SetRootType( sal_uInt16 nNew ) { if ( nNew != nRootType ) { @@ -1351,14 +1351,14 @@ void ScContentTree::SetRootType( USHORT nNew ) void ScContentTree::ToggleRoot() // nach Selektion { - USHORT nNew = SC_CONTENT_ROOT; + sal_uInt16 nNew = SC_CONTENT_ROOT; if ( nRootType == SC_CONTENT_ROOT ) { SvLBoxEntry* pEntry = GetCurEntry(); if (pEntry) { SvLBoxEntry* pParent = GetParent(pEntry); - for (USHORT i=1; i<SC_CONTENT_COUNT; i++) + for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++) if ( pEntry == pRootNodes[i] || pParent == pRootNodes[i] ) nNew = i; } @@ -1370,7 +1370,7 @@ void ScContentTree::ToggleRoot() // nach Selektion void ScContentTree::ResetManualDoc() { aManualDoc.Erase(); - bHiddenDoc = FALSE; + bHiddenDoc = sal_False; ActiveDocChanged(); } @@ -1435,7 +1435,7 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Listbo // - BOOL bLoaded = FALSE; + sal_Bool bLoaded = sal_False; // ist es ein normal geladenes Doc ? @@ -1444,13 +1444,13 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Listbo { if ( pSh->ISA(ScDocShell) ) if ( pSh->GetTitle() == aRealName ) - bLoaded = TRUE; + bLoaded = sal_True; pSh = SfxObjectShell::GetNext( *pSh ); } if (bLoaded) { - bHiddenDoc = FALSE; + bHiddenDoc = sal_False; SetManualDoc(aRealName); } else if (aHiddenTitle.Len()) // verstecktes ausgewaehlt @@ -1469,15 +1469,15 @@ void ScContentTree::ApplySettings() const ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings(); if( pSettings ) { - USHORT nRootSel = pSettings->GetRootSelected(); - ULONG nChildSel = pSettings->GetChildSelected(); + sal_uInt16 nRootSel = pSettings->GetRootSelected(); + sal_uLong nChildSel = pSettings->GetChildSelected(); - for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry ) + for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry ) { if( pRootNodes[ nEntry ] ) { // expand - BOOL bExp = pSettings->IsExpanded( nEntry ); + sal_Bool bExp = pSettings->IsExpanded( nEntry ); if( bExp != IsExpanded( pRootNodes[ nEntry ] ) ) { if( bExp ) @@ -1504,13 +1504,13 @@ void ScContentTree::StoreSettings() const ScNavigatorSettings* pSettings = pParentWindow->GetNavigatorSettings(); if( pSettings ) { - for( USHORT nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry ) + for( sal_uInt16 nEntry = 1; nEntry < SC_CONTENT_COUNT; ++nEntry ) { - BOOL bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] ); + sal_Bool bExp = pRootNodes[ nEntry ] && IsExpanded( pRootNodes[ nEntry ] ); pSettings->SetExpanded( nEntry, bExp ); } - USHORT nRoot; - ULONG nChild; + sal_uInt16 nRoot; + sal_uLong nChild; GetEntryIndexes( nRoot, nChild, GetCurEntry() ); pSettings->SetRootSelected( nRoot ); pSettings->SetChildSelected( nChild ); diff --git a/sc/source/ui/navipi/navcitem.cxx b/sc/source/ui/navipi/navcitem.cxx index 280538011..6d6e6ed68 100644 --- a/sc/source/ui/navipi/navcitem.cxx +++ b/sc/source/ui/navipi/navcitem.cxx @@ -45,7 +45,7 @@ //------------------------------------------------------------------------ -ScNavigatorControllerItem::ScNavigatorControllerItem( USHORT nIdP, +ScNavigatorControllerItem::ScNavigatorControllerItem( sal_uInt16 nIdP, ScNavigatorDlg& rDlg, SfxBindings& rBindings ) : SfxControllerItem ( nIdP, rBindings ), @@ -55,7 +55,7 @@ ScNavigatorControllerItem::ScNavigatorControllerItem( USHORT nIdP, //------------------------------------------------------------------------ -void __EXPORT ScNavigatorControllerItem::StateChanged( USHORT /* nSID */, SfxItemState /* eState */, +void __EXPORT ScNavigatorControllerItem::StateChanged( sal_uInt16 /* nSID */, SfxItemState /* eState */, const SfxPoolItem* pItem ) { switch( GetId() ) @@ -77,8 +77,8 @@ void __EXPORT ScNavigatorControllerItem::StateChanged( USHORT /* nSID */, SfxIte SCCOL nCol = aScAddress.Col()+1; SCROW nRow = aScAddress.Row()+1; -// SCCOL nCol = (USHORT)pCellPosItem->GetValue().X()+1; -// SCROW nRow = (USHORT)pCellPosItem->GetValue().Y()+1; +// SCCOL nCol = (sal_uInt16)pCellPosItem->GetValue().X()+1; +// SCROW nRow = (sal_uInt16)pCellPosItem->GetValue().Y()+1; rNavigatorDlg.UpdateColumn( &nCol ); rNavigatorDlg.UpdateRow ( &nRow ); diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index d01ee0375..f07851ee0 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -115,7 +115,7 @@ long __EXPORT ColumnEdit::Notify( NotifyEvent& rNEvt ) { long nHandled = SpinField::Notify( rNEvt ); - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( nType == EVENT_KEYINPUT ) { const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); @@ -397,8 +397,8 @@ CommandToolBox::CommandToolBox( ScNavigatorDlg* pParent, const ResId& rResId ) SetSizePixel( CalcWindowSizePixel() ); SetDropdownClickHdl( LINK(this, CommandToolBox, ToolBoxDropdownClickHdl) ); SetItemBits( IID_DROPMODE, GetItemBits( IID_DROPMODE ) | TIB_DROPDOWNONLY ); -// EnableItem( IID_UP, FALSE ); -// EnableItem( IID_DOWN, FALSE ); +// EnableItem( IID_UP, sal_False ); +// EnableItem( IID_DOWN, sal_False ); } //------------------------------------------------------------------------ @@ -409,7 +409,7 @@ __EXPORT CommandToolBox::~CommandToolBox() //------------------------------------------------------------------------ -void CommandToolBox::Select( USHORT nSelId ) +void CommandToolBox::Select( sal_uInt16 nSelId ) { // Modus umschalten ? @@ -478,7 +478,7 @@ IMPL_LINK( CommandToolBox, ToolBoxDropdownClickHdl, ToolBox*, EMPTYARG ) ScPopupMenu aPop( ScResId( RID_POPUP_DROPMODE ) ); aPop.CheckItem( RID_DROPMODE_URL + rDlg.GetDropMode() ); aPop.Execute( this, GetItemRect(IID_DROPMODE), POPUPMENU_EXECUTE_DOWN ); - USHORT nId = aPop.GetSelected(); + sal_uInt16 nId = aPop.GetSelected(); EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage) @@ -505,19 +505,19 @@ void CommandToolBox::UpdateButtons() // Umschalten-Button: if ( eMode == NAV_LMODE_SCENARIOS || eMode == NAV_LMODE_NONE ) { - EnableItem( IID_CHANGEROOT, FALSE ); - CheckItem( IID_CHANGEROOT, FALSE ); + EnableItem( IID_CHANGEROOT, sal_False ); + CheckItem( IID_CHANGEROOT, sal_False ); } else { - EnableItem( IID_CHANGEROOT, TRUE ); - BOOL bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT; + EnableItem( IID_CHANGEROOT, sal_True ); + sal_Bool bRootSet = rDlg.aLbEntries.GetRootType() != SC_CONTENT_ROOT; CheckItem( IID_CHANGEROOT, bRootSet ); } - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); - USHORT nImageId = 0; + sal_uInt16 nImageId = 0; switch ( rDlg.nDropMode ) { case SC_DROPMODE_URL: nImageId = bHC ? RID_IMG_H_DROP_URL : RID_IMG_DROP_URL; break; @@ -529,14 +529,14 @@ void CommandToolBox::UpdateButtons() void CommandToolBox::InitImageList() { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList& rImgLst = bHC ? rDlg.aCmdImageListH : rDlg.aCmdImageList; - USHORT nCount = GetItemCount(); - for (USHORT i = 0; i < nCount; i++) + sal_uInt16 nCount = GetItemCount(); + for (sal_uInt16 i = 0; i < nCount; i++) { - USHORT nId = GetItemId(i); + sal_uInt16 nId = GetItemId(i); SetItemImage( nId, rImgLst.GetImage( nId ) ); } } @@ -559,7 +559,7 @@ void CommandToolBox::DataChanged( const DataChangedEvent& rDCEvt ) //================================================================== ScNavigatorSettings::ScNavigatorSettings() : - maExpandedVec( SC_CONTENT_COUNT, FALSE ), + maExpandedVec( SC_CONTENT_COUNT, sal_False ), mnRootSelected( SC_CONTENT_ROOT ), mnChildSelected( SC_CONTENT_NOCHILD ) { @@ -575,7 +575,7 @@ SFX_IMPL_CHILDWINDOWCONTEXT( ScNavigatorDialogWrapper, SID_NAVIGATOR ) ScNavigatorDialogWrapper::ScNavigatorDialogWrapper( Window* pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBind, SfxChildWinInfo* /* pInfo */ ) : SfxChildWindowContext( nId ) @@ -597,7 +597,7 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper( // deshalb muessen in Abhaengigkeit von der momentanen Groesse die // Inhalte eingeblendet werden oder nicht - BOOL bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL ); + sal_Bool bSmall = ( aInfoSize.Height() <= pNavigator->aInitSize.Height() + SCNAV_MINTOL ); NavListMode eNavMode = NAV_LMODE_NONE; if (!bSmall) { @@ -611,12 +611,12 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper( eNavMode = NAV_LMODE_AREAS; } - // Die Groesse des Floats nicht neu setzen (FALSE bei SetListMode), damit der + // Die Groesse des Floats nicht neu setzen (sal_False bei SetListMode), damit der // Navigator nicht aufgeklappt wird, wenn er minimiert war (#38872#). - pNavigator->SetListMode( eNavMode, FALSE ); // FALSE: Groesse des Float nicht setzen + pNavigator->SetListMode( eNavMode, sal_False ); // FALSE: Groesse des Float nicht setzen - USHORT nCmdId; + sal_uInt16 nCmdId; switch (eNavMode) { case NAV_LMODE_DOCS: nCmdId = IID_DOCS; break; @@ -682,7 +682,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win nCurCol ( 0 ), nCurRow ( 0 ), nCurTab ( 0 ), - bFirstBig ( FALSE ) + bFirstBig ( sal_False ) { ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg(); nDropMode = rCfg.GetDragMode(); @@ -738,7 +738,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win aLbDocuments.Hide(); // bei NAV_LMODE_NONE gibts die nicht - aLbEntries.InitWindowBits(TRUE); + aLbEntries.InitWindowBits(sal_True); aLbEntries.SetSpaceBetweenEntries(0); aLbEntries.SetSelectionMode( SINGLE_SELECTION ); @@ -747,7 +747,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win SV_DRAGDROP_ENABLE_TOP ); // war eine Kategorie als Root ausgewaehlt? - USHORT nLastRoot = rCfg.GetRootType(); + sal_uInt16 nLastRoot = rCfg.GetRootType(); if ( nLastRoot ) aLbEntries.SetRootType( nLastRoot ); @@ -775,7 +775,7 @@ __EXPORT ScNavigatorDlg::~ScNavigatorDlg() { aContentTimer.Stop(); - USHORT i; + sal_uInt16 i; for ( i=0; i<CTRL_ITEMS; i++ ) delete ppBoundItems[i]; @@ -853,18 +853,18 @@ void ScNavigatorDlg::DoResize() // #41403# bei angedocktem Navigator wird das Fenster evtl. erst klein erzeugt, // dann kommt ein Resize auf die wirkliche Groesse -> dann Inhalte einschalten - BOOL bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL ); + sal_Bool bSmall = ( nTotalHeight <= aInitSize.Height() + SCNAV_MINTOL ); if ( !bSmall && bFirstBig ) { // Inhalte laut Config wieder einschalten - bFirstBig = FALSE; + bFirstBig = sal_False; NavListMode eNavMode = NAV_LMODE_AREAS; ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg(); NavListMode eLastMode = (NavListMode) rCfg.GetListMode(); if ( eLastMode == NAV_LMODE_SCENARIOS ) eNavMode = NAV_LMODE_SCENARIOS; - SetListMode( eNavMode, FALSE ); // FALSE: Groesse des Float nicht setzen + SetListMode( eNavMode, sal_False ); // FALSE: Groesse des Float nicht setzen } // auch wenn die Inhalte nicht sichtbar sind, die Groessen anpassen, @@ -896,7 +896,7 @@ void ScNavigatorDlg::DoResize() //@@ 03.11.97 end - BOOL bListMode = (eListMode != NAV_LMODE_NONE); + sal_Bool bListMode = (eListMode != NAV_LMODE_NONE); FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); if ( pFloat && bListMode ) nListModeHeight = nTotalHeight; @@ -908,7 +908,7 @@ void __EXPORT ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.ISA(SfxSimpleHint) ) { - ULONG nHintId = ((SfxSimpleHint&)rHint).GetId(); + sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId(); if ( nHintId == SC_HINT_DOCNAME_CHANGED ) { @@ -962,7 +962,7 @@ void __EXPORT ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA(SfxEventHint) ) { - ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId(); if ( nEventId == SFX_EVENT_ACTIVATEDOC ) { aLbEntries.ActiveDocChanged(); @@ -984,7 +984,7 @@ IMPL_LINK( ScNavigatorDlg, TimeHdl, Timer*, pTimer ) //------------------------------------------------------------------------ -void ScNavigatorDlg::SetDropMode(USHORT nNew) +void ScNavigatorDlg::SetDropMode(sal_uInt16 nNew) { nDropMode = nNew; aTbxCmd.UpdateButtons(); @@ -1017,7 +1017,7 @@ void ScNavigatorDlg::SetCurrentCell( SCCOL nColNo, SCROW nRowNo ) String aAddr; aScAddress.Format( aAddr, SCA_ABS ); - BOOL bUnmark = FALSE; + sal_Bool bUnmark = sal_False; if ( GetViewData() ) bUnmark = !pViewData->GetMarkData().IsCellMarked( nColNo, nRowNo ); @@ -1117,7 +1117,7 @@ ScNavigatorSettings* ScNavigatorDlg::GetNavigatorSettings() //------------------------------------------------------------------------ -BOOL ScNavigatorDlg::GetViewData() +sal_Bool ScNavigatorDlg::GetViewData() { ScTabViewShell* pViewSh = GetTabViewShell(); pViewData = pViewSh ? pViewSh->GetViewData() : NULL; @@ -1189,30 +1189,30 @@ void ScNavigatorDlg::UpdateAll() //------------------------------------------------------------------------ -void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize ) +void ScNavigatorDlg::SetListMode( NavListMode eMode, sal_Bool bSetSize ) { if ( eMode != eListMode ) { if ( eMode != NAV_LMODE_NONE ) - bFirstBig = FALSE; // nicht mehr automatisch umschalten + bFirstBig = sal_False; // nicht mehr automatisch umschalten eListMode = eMode; switch ( eMode ) { case NAV_LMODE_NONE: - ShowList( FALSE, bSetSize ); + ShowList( sal_False, bSetSize ); break; case NAV_LMODE_AREAS: case NAV_LMODE_DBAREAS: case NAV_LMODE_DOCS: aLbEntries.Refresh(); - ShowList( TRUE, bSetSize ); + ShowList( sal_True, bSetSize ); break; case NAV_LMODE_SCENARIOS: - ShowScenarios( TRUE, bSetSize ); + ShowScenarios( sal_True, bSetSize ); break; } @@ -1221,7 +1221,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize ) if ( eMode != NAV_LMODE_NONE ) { ScNavipiCfg& rCfg = SC_MOD()->GetNavipiCfg(); - rCfg.SetListMode( (USHORT) eMode ); + rCfg.SetListMode( (sal_uInt16) eMode ); } } @@ -1231,7 +1231,7 @@ void ScNavigatorDlg::SetListMode( NavListMode eMode, BOOL bSetSize ) //------------------------------------------------------------------------ -void ScNavigatorDlg::ShowList( BOOL bShow, BOOL bSetSize ) +void ScNavigatorDlg::ShowList( sal_Bool bShow, sal_Bool bSetSize ) { FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); Size aSize = GetParent()->GetOutputSizePixel(); @@ -1276,7 +1276,7 @@ void ScNavigatorDlg::ShowList( BOOL bShow, BOOL bSetSize ) //------------------------------------------------------------------------ -void ScNavigatorDlg::ShowScenarios( BOOL bShow, BOOL bSetSize ) +void ScNavigatorDlg::ShowScenarios( sal_Bool bShow, sal_Bool bSetSize ) { FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); Size aSize = GetParent()->GetOutputSizePixel(); @@ -1332,7 +1332,7 @@ void ScNavigatorDlg::ShowScenarios( BOOL bShow, BOOL bSetSize ) void ScNavigatorDlg::GetDocNames( const String* pManualSel ) { aLbDocuments.Clear(); - aLbDocuments.SetUpdateMode( FALSE ); + aLbDocuments.SetUpdateMode( sal_False ); ScDocShell* pCurrentSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() ); @@ -1371,7 +1371,7 @@ void ScNavigatorDlg::GetDocNames( const String* pManualSel ) aSelEntry = aEntry; } - aLbDocuments.SetUpdateMode( TRUE ); + aLbDocuments.SetUpdateMode( sal_True ); aLbDocuments.SelectEntry( aSelEntry ); } @@ -1512,9 +1512,9 @@ SfxChildAlignment __EXPORT ScNavigatorDlg::CheckAlignment( //------------------------------------------------------------------------ #if 0 -BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt ) +sal_Bool __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox { @@ -1522,7 +1522,7 @@ BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt ) SvScDataObjectRef pObject = SvScDataObject::PasteDragServer(rEvt); - ULONG nFormat = INetBookmark::HasFormat(*pObject); + sal_uLong nFormat = INetBookmark::HasFormat(*pObject); INetBookmark aBookmark; if (aBookmark.Paste(*pObject,nFormat)) aFileName = aBookmark.GetURL(); @@ -1530,8 +1530,8 @@ BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt ) { // FORMAT_FILE direkt aus DragServer - USHORT nCount = DragServer::GetItemCount(); - for ( USHORT i = 0; i < nCount && !aFileName.Len(); ++i ) + sal_uInt16 nCount = DragServer::GetItemCount(); + for ( sal_uInt16 i = 0; i < nCount && !aFileName.Len(); ++i ) if (DragServer::HasFormat( i, FORMAT_FILE )) aFileName = DragServer::PasteFile( i ); } @@ -1542,9 +1542,9 @@ BOOL __EXPORT ScNavigatorDlg::Drop( const DropEvent& rEvt ) return bReturn; } -BOOL __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt ) +sal_Bool __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( !aLbEntries.IsInDrag() ) // kein Verschieben innerhalb der TreeListBox { @@ -1553,7 +1553,7 @@ BOOL __EXPORT ScNavigatorDlg::QueryDrop( DropEvent& rEvt ) || INetBookmark::HasFormat(*pObject) ) { rEvt.SetAction(DROP_COPY); // Kopier-Cursor anzeigen - bReturn = TRUE; + bReturn = sal_True; } } diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index bb496059a..283e646bd 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -54,7 +54,7 @@ ScScenarioListBox::ScScenarioListBox( ScScenarioWindow& rParent ) : mrParent( rParent ) { Font aFont( GetFont() ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetWeight( WEIGHT_LIGHT ); SetFont( aFont ); } @@ -87,7 +87,7 @@ void ScScenarioListBox::UpdateEntries( List* pNewEntryList ) { // sheet contains scenarios DBG_ASSERT( pNewEntryList->Count() % 3 == 0, "ScScenarioListBox::UpdateEntries - wrong list size" ); - SetUpdateMode( FALSE ); + SetUpdateMode( sal_False ); String* pEntry = static_cast< String* >( pNewEntryList->First() ); while( pEntry ) { @@ -106,7 +106,7 @@ void ScScenarioListBox::UpdateEntries( List* pNewEntryList ) InsertEntry( aEntry.maName, LISTBOX_APPEND ); pEntry = static_cast< String* >( pNewEntryList->Next() ); } - SetUpdateMode( TRUE ); + SetUpdateMode( sal_True ); SetNoSelection(); mrParent.SetComment( EMPTY_STRING ); } @@ -181,7 +181,7 @@ const ScScenarioListBox::ScenarioEntry* ScScenarioListBox::GetSelectedEntry() co return (nPos < maEntries.size()) ? &maEntries[ nPos ] : 0; } -void ScScenarioListBox::ExecuteScenarioSlot( USHORT nSlotId ) +void ScScenarioListBox::ExecuteScenarioSlot( sal_uInt16 nSlotId ) { if( SfxViewFrame* pViewFrm = SfxViewFrame::Current() ) { @@ -220,7 +220,7 @@ ScScenarioWindow::ScScenarioWindow( Window* pParent,const String& aQH_List, aEdComment ( this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP ) { Font aFont( GetFont() ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aFont.SetWeight( WEIGHT_LIGHT ); aEdComment.SetFont( aFont ); aEdComment.SetMaxTextLen( 512 ); diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx index 1147bd43f..f632d5a2d 100644 --- a/sc/source/ui/optdlg/opredlin.cxx +++ b/sc/source/ui/optdlg/opredlin.cxx @@ -101,12 +101,12 @@ SfxTabPage* __EXPORT ScRedlineOptionsTabPage::Create( Window* pParent, const Sfx Beschreibung: -----------------------------------------------------------------------*/ -BOOL __EXPORT ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ ) +sal_Bool __EXPORT ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ ) { ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); - ULONG nNew=0; - USHORT nPos=0; + sal_uLong nNew=0; + sal_uInt16 nPos=0; nPos = aContentColorLB.GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND) @@ -165,7 +165,7 @@ BOOL __EXPORT ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ ) if (pDocSh) pDocSh->PostPaintGridAll(); - return FALSE; + return sal_False; } /*----------------------------------------------------------------------- @@ -181,12 +181,12 @@ void __EXPORT ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ ) aInsertColorLB.InsertEntry(aAuthorStr); aRemoveColorLB.InsertEntry(aAuthorStr); - aContentColorLB.SetUpdateMode( FALSE); - aMoveColorLB.SetUpdateMode( FALSE); - aInsertColorLB.SetUpdateMode( FALSE); - aRemoveColorLB.SetUpdateMode( FALSE); + aContentColorLB.SetUpdateMode( sal_False); + aMoveColorLB.SetUpdateMode( sal_False); + aInsertColorLB.SetUpdateMode( sal_False); + aRemoveColorLB.SetUpdateMode( sal_False); - for( USHORT i = 0; i < pColorTbl->Count(); ++i ) + for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i ) { XColorEntry* pEntry = pColorTbl->GetColor( i ); Color aColor = pEntry->GetColor(); @@ -197,15 +197,15 @@ void __EXPORT ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ ) aInsertColorLB.InsertEntry( aColor, sName ); aRemoveColorLB.InsertEntry( aColor, sName ); } - aContentColorLB.SetUpdateMode( TRUE ); - aMoveColorLB.SetUpdateMode( TRUE ); - aInsertColorLB.SetUpdateMode( TRUE ); - aRemoveColorLB.SetUpdateMode( TRUE ); + aContentColorLB.SetUpdateMode( sal_True ); + aMoveColorLB.SetUpdateMode( sal_True ); + aInsertColorLB.SetUpdateMode( sal_True ); + aRemoveColorLB.SetUpdateMode( sal_True ); ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); - ULONG nColor = aAppOptions.GetTrackContentColor(); + sal_uLong nColor = aAppOptions.GetTrackContentColor(); if (nColor == COL_TRANSPARENT) aContentColorLB.SelectEntryPos(0); else @@ -252,7 +252,7 @@ IMPL_LINK( ScRedlineOptionsTabPage, ColorHdl, ColorListBox *, EMPTYARG ) } SvxFont& rFont = pPrev->GetFont(); - USHORT nPos = pLB->GetSelectEntryPos(); + sal_uInt16 nPos = pLB->GetSelectEntryPos(); if (nPos == LISTBOX_ENTRY_NOTFOUND) nPos = 0; diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index a82900205..16a614d5d 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -55,7 +55,7 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pCalcOptRanges[] = +static sal_uInt16 pCalcOptRanges[] = { SID_SCDOCOPTIONS, SID_SCDOCOPTIONS, @@ -125,7 +125,7 @@ void ScTpCalcOptions::Init() //----------------------------------------------------------------------- -USHORT* __EXPORT ScTpCalcOptions::GetRanges() +sal_uInt16* __EXPORT ScTpCalcOptions::GetRanges() { return pCalcOptRanges; } @@ -141,7 +141,7 @@ SfxTabPage* __EXPORT ScTpCalcOptions::Create( Window* pParent, const SfxItemSet& void __EXPORT ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ ) { - USHORT d,m,y; + sal_uInt16 d,m,y; *pLocalOptions = *pOldOptions; @@ -190,10 +190,10 @@ void __EXPORT ScTpCalcOptions::Reset( const SfxItemSet& /* rCoreAttrs */ ) //----------------------------------------------------------------------- -BOOL __EXPORT ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool __EXPORT ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs ) { // alle weiteren Optionen werden in den Handlern aktualisiert - pLocalOptions->SetIterCount( (USHORT)aEdSteps.GetValue() ); + pLocalOptions->SetIterCount( (sal_uInt16)aEdSteps.GetValue() ); pLocalOptions->SetIgnoreCase( !aBtnCase.IsChecked() ); pLocalOptions->SetCalcAsShown( aBtnCalc.IsChecked() ); pLocalOptions->SetMatchWholeCell( aBtnMatch.IsChecked() ); @@ -209,10 +209,10 @@ BOOL __EXPORT ScTpCalcOptions::FillItemSet( SfxItemSet& rCoreAttrs ) if ( *pLocalOptions != *pOldOptions ) { rCoreAttrs.Put( ScTpCalcItem( nWhichCalc, *pLocalOptions ) ); - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -285,13 +285,13 @@ IMPL_LINK( ScTpCalcOptions, CheckClickHdl, CheckBox*, pBtn ) { if ( pBtn->IsChecked() ) { - pLocalOptions->SetIter( TRUE ); + pLocalOptions->SetIter( sal_True ); aFtSteps.Enable(); aEdSteps.Enable(); aFtEps .Enable(); aEdEps .Enable(); } else { - pLocalOptions->SetIter( FALSE ); + pLocalOptions->SetIter( sal_False ); aFtSteps.Disable(); aEdSteps.Disable(); aFtEps .Disable(); aEdEps .Disable(); } diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx index d0b317d96..b155466a7 100644 --- a/sc/source/ui/optdlg/tpprint.cxx +++ b/sc/source/ui/optdlg/tpprint.cxx @@ -41,7 +41,7 @@ // ----------------------------------------------------------------------- -static USHORT pPrintOptRanges[] = +static sal_uInt16 pPrintOptRanges[] = { SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS, @@ -67,7 +67,7 @@ ScTpPrintOptions::~ScTpPrintOptions() { } -USHORT* ScTpPrintOptions::GetRanges() +sal_uInt16* ScTpPrintOptions::GetRanges() { return pPrintOptRanges; } @@ -92,7 +92,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet ) ScPrintOptions aOptions; const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, FALSE , &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCPRINTOPTIONS, sal_False , &pItem)) aOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions(); else { @@ -100,9 +100,9 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet ) aOptions = SC_MOD()->GetPrintOptions(); } - if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, FALSE , &pItem ) ) + if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, sal_False , &pItem ) ) { - BOOL bChecked = ( (const SfxBoolItem*)pItem )->GetValue(); + sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue(); aSelectedSheetsCB.Check( bChecked ); } else @@ -117,7 +117,7 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet ) // ----------------------------------------------------------------------- -BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs ) { rCoreAttrs.ClearItem( SID_PRINT_SELECTEDSHEET ); @@ -134,11 +134,11 @@ BOOL ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs ) { rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, aSelectedSheetsCB.IsChecked() ) ); } - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index ae16bb781..344fc9d07 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -63,7 +63,7 @@ #define CR (sal_Unicode)13 #define LF (sal_Unicode)10 -static USHORT pUserListsRanges[] = +static sal_uInt16 pUserListsRanges[] = { SID_SCUSERLISTS, SID_SCUSERLISTS, @@ -107,9 +107,9 @@ ScTpUserLists::ScTpUserLists( Window* pParent, pDoc ( NULL ), pViewData ( NULL ), pRangeUtil ( new ScRangeUtil ), - bModifyMode ( FALSE ), - bCancelMode ( FALSE ), - bCopyDone ( FALSE ), + bModifyMode ( sal_False ), + bCancelMode ( sal_False ), + bCopyDone ( sal_False ), nCancelPos ( 0 ) { SetExchangeSupport(); @@ -177,7 +177,7 @@ void ScTpUserLists::Init() // ----------------------------------------------------------------------- -USHORT* __EXPORT ScTpUserLists::GetRanges() +sal_uInt16* __EXPORT ScTpUserLists::GetRanges() { return pUserListsRanges; } @@ -242,7 +242,7 @@ void __EXPORT ScTpUserLists::Reset( const SfxItemSet& rCoreAttrs ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs ) +sal_Bool __EXPORT ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs ) { // Modifikationen noch nicht uebernommen? // -> Click auf Add-Button simulieren @@ -254,18 +254,18 @@ BOOL __EXPORT ScTpUserLists::FillItemSet( SfxItemSet& rCoreAttrs ) GetItemSet().Get( nWhichUserLists ); ScUserList* pCoreList = rUserListItem.GetUserList(); - BOOL bDataModified = FALSE; + sal_Bool bDataModified = sal_False; if ( (pUserLists == NULL) && (pCoreList == NULL) ) { - bDataModified = FALSE; + bDataModified = sal_False; } else if ( pUserLists != NULL ) { if ( pCoreList != NULL ) bDataModified = (*pUserLists != *pCoreList); else - bDataModified = TRUE; + bDataModified = sal_True; } if ( bDataModified ) @@ -293,7 +293,7 @@ int __EXPORT ScTpUserLists::DeactivatePage( SfxItemSet* pSetP ) // ----------------------------------------------------------------------- -USHORT ScTpUserLists::UpdateUserListBox() +sal_uInt16 ScTpUserLists::UpdateUserListBox() { aLbLists.Clear(); @@ -301,12 +301,12 @@ USHORT ScTpUserLists::UpdateUserListBox() //---------------------------------------------------------- - USHORT nCount = pUserLists->GetCount(); + sal_uInt16 nCount = pUserLists->GetCount(); String aEntry; if ( nCount > 0 ) { - for ( USHORT i=0; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) { aEntry = (*pUserLists)[i]->GetString(); DBG_ASSERT( aEntry.Len() > 0, "Empty UserList-entry :-/" ); @@ -319,7 +319,7 @@ USHORT ScTpUserLists::UpdateUserListBox() // ----------------------------------------------------------------------- -void ScTpUserLists::UpdateEntries( USHORT nList ) +void ScTpUserLists::UpdateEntries( sal_uInt16 nList ) { if ( !pUserLists ) return; @@ -328,10 +328,10 @@ void ScTpUserLists::UpdateEntries( USHORT nList ) if ( nList < pUserLists->GetCount() ) { ScUserListData* pList = (*pUserLists)[nList]; - USHORT nSubCount = pList->GetSubCount(); + sal_uInt16 nSubCount = pList->GetSubCount(); String aEntryListStr; - for ( USHORT i=0; i<nSubCount; i++ ) + for ( sal_uInt16 i=0; i<nSubCount; i++ ) { if ( i!=0 ) aEntryListStr += CR; @@ -438,8 +438,8 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, SCROW nStartRow = rStartPos.Row(); SCCOL nEndCol = rEndPos.Col(); SCROW nEndRow = rEndPos.Row(); - USHORT nCellDir = SCRET_COLS; - BOOL bValueIgnored = FALSE; + sal_uInt16 nCellDir = SCRET_COLS; + sal_Bool bValueIgnored = sal_False; if ( (nStartCol != nEndCol) && (nStartRow != nEndRow) ) { @@ -479,7 +479,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, } } else - bValueIgnored = TRUE; + bValueIgnored = sal_True; } if ( aStrList.Len() > 0 ) AddNewList( aStrList ); @@ -503,7 +503,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, } } else - bValueIgnored = TRUE; + bValueIgnored = sal_True; } if ( aStrList.Len() > 0 ) AddNewList( aStrList ); @@ -519,13 +519,13 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, //---------------------------------------------------------- - bCopyDone = TRUE; + bCopyDone = sal_True; } // ----------------------------------------------------------------------- -void ScTpUserLists::ModifyList( USHORT nSelList, +void ScTpUserLists::ModifyList( sal_uInt16 nSelList, const String& rEntriesStr ) { if ( !pUserLists ) return; @@ -541,7 +541,7 @@ void ScTpUserLists::ModifyList( USHORT nSelList, // ----------------------------------------------------------------------- -void ScTpUserLists::RemoveList( USHORT nList ) +void ScTpUserLists::RemoveList( sal_uInt16 nList ) { if ( pUserLists ) pUserLists->AtFree( nList ); } @@ -554,7 +554,7 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb ) { if ( pLb == &aLbLists ) { - USHORT nSelPos = aLbLists.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbLists.GetSelectEntryPos(); if ( nSelPos != LISTBOX_ENTRY_NOTFOUND ) { if ( !aFtEntries.IsEnabled() ) aFtEntries.Enable(); @@ -597,7 +597,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) aEdCopyFrom.Disable(); } aBtnNew.SetText( aStrCancel ); - bCancelMode = TRUE; + bCancelMode = sal_True; } else // if ( bCancelMode ) { @@ -624,8 +624,8 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) aEdCopyFrom.Enable(); } aBtnNew.SetText( aStrNew ); - bCancelMode = FALSE; - bModifyMode = FALSE; + bCancelMode = sal_False; + bModifyMode = sal_False; } } else if ( pBtn == &aBtnAdd ) @@ -657,11 +657,11 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) aBtnAdd.Disable(); aBtnRemove.Enable(); aBtnNew.SetText( aStrNew ); - bCancelMode = FALSE; + bCancelMode = sal_False; } else // if ( bModifyMode ) { - USHORT nSelList = aLbLists.GetSelectEntryPos(); + sal_uInt16 nSelList = aLbLists.GetSelectEntryPos(); DBG_ASSERT( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" ); @@ -677,8 +677,8 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) LbSelectHdl( &aLbLists ); } - aBtnNew.SetText( aStrNew ); bCancelMode = FALSE; - aBtnAdd.SetText( aStrAdd ); bModifyMode = FALSE; + aBtnNew.SetText( aStrNew ); bCancelMode = sal_False; + aBtnAdd.SetText( aStrAdd ); bModifyMode = sal_False; aBtnAdd.Disable(); aBtnRemove.Enable(); aFtLists.Enable(); @@ -696,7 +696,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) { if ( aLbLists.GetEntryCount() > 0 ) { - USHORT nRemovePos = aLbLists.GetSelectEntryPos(); + sal_uInt16 nRemovePos = aLbLists.GetSelectEntryPos(); String aMsg ( aStrQueryRemove.GetToken( 0, '#' ) ); aMsg += aLbLists.GetEntry( nRemovePos ); @@ -748,7 +748,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) ScRefAddress theStartPos; ScRefAddress theEndPos; String theAreaStr( aEdCopyFrom.GetText() ); - BOOL bAreaOk = FALSE; + sal_Bool bAreaOk = sal_False; if ( theAreaStr.Len() > 0 ) { @@ -815,8 +815,8 @@ IMPL_LINK( ScTpUserLists, EdEntriesModHdl, MultiLineEdit*, pEd ) { if ( !bCancelMode && !bModifyMode ) { - aBtnNew.SetText( aStrCancel ); bCancelMode = TRUE; - aBtnAdd.SetText( aStrModify ); bModifyMode = TRUE; + aBtnNew.SetText( aStrCancel ); bCancelMode = sal_True; + aBtnAdd.SetText( aStrModify ); bModifyMode = sal_True; aBtnAdd.Enable(); aBtnRemove.Disable(); aFtLists.Disable(); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 0ab4c76f6..0861200d1 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -152,9 +152,9 @@ SfxTabPage* ScTpContentOptions::Create( Window* pParent, /*-----------------11.01.97 10.52------------------- --------------------------------------------------*/ -BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( aFormulaCB .GetSavedValue() != aFormulaCB .IsChecked() || aNilCB .GetSavedValue() != aNilCB .IsChecked() || aAnnotCB .GetSavedValue() != aAnnotCB .IsChecked() || @@ -179,17 +179,17 @@ BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) pLocalOptions->SetGridColor( aColorLB.GetSelectEntryColor(), aColorLB.GetSelectEntry() ); rCoreSet.Put(ScTpViewItem(SID_SCVIEWOPTIONS, *pLocalOptions)); - bRet = TRUE; + bRet = sal_True; } if(aRangeFindCB.GetSavedValue() != aRangeFindCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_RANGEFINDER, aRangeFindCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if(aSyncZoomCB.GetSavedValue() != aSyncZoomCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_OPT_SYNCZOOM, aSyncZoomCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } @@ -202,7 +202,7 @@ BOOL ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet ) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, FALSE , &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SCVIEWOPTIONS, sal_False , &pItem)) pLocalOptions = new ScViewOptions( ((const ScTpViewItem*)pItem)->GetViewOptions() ); else @@ -214,9 +214,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet ) aAnchorCB .Check(pLocalOptions->GetOption(VOPT_ANCHOR)); aClipMarkCB .Check(pLocalOptions->GetOption(VOPT_CLIPMARKS)); - aObjGrfLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_OLE) ); - aDiagramLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_CHART) ); - aDrawLB .SelectEntryPos( (USHORT)pLocalOptions->GetObjMode(VOBJ_TYPE_DRAW) ); + aObjGrfLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_OLE) ); + aDiagramLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_CHART) ); + aDrawLB .SelectEntryPos( (sal_uInt16)pLocalOptions->GetObjMode(VOBJ_TYPE_DRAW) ); aRowColHeaderCB.Check( pLocalOptions->GetOption(VOPT_HEADER) ); aHScrollCB .Check( pLocalOptions->GetOption(VOPT_HSCROLL) ); @@ -231,9 +231,9 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet ) aHandleCB.Check( !pLocalOptions->GetOption(VOPT_SOLIDHANDLES) ); // inverted aBigHandleCB.Check( pLocalOptions->GetOption(VOPT_BIGHANDLES) ); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_RANGEFINDER, sal_False, &pItem)) aRangeFindCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_OPT_SYNCZOOM, sal_False, &pItem)) aSyncZoomCB.Check(((const SfxBoolItem*)pItem)->GetValue()); aRangeFindCB.SaveValue(); @@ -267,7 +267,7 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet ) void ScTpContentOptions::ActivatePage( const SfxItemSet& rSet) { const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, FALSE , &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_SCVIEWOPTIONS, sal_False , &pItem)) *pLocalOptions = ((const ScTpViewItem*)pItem)->GetViewOptions(); } /*-----------------11.01.97 12.45------------------- @@ -286,7 +286,7 @@ int ScTpContentOptions::DeactivatePage( SfxItemSet* pSetP ) IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb ) { - USHORT nSelPos = pLb->GetSelectEntryPos(); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); ScVObjMode eMode = ScVObjMode(nSelPos); ScVObjType eType = VOBJ_TYPE_OLE; @@ -307,7 +307,7 @@ IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb ) IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) { ScViewOption eOption = VOPT_FORMULAS; - BOOL bChecked = pBtn->IsChecked(); + sal_Bool bChecked = pBtn->IsChecked(); if ( &aFormulaCB == pBtn ) eOption = VOPT_FORMULAS; else if ( &aNilCB == pBtn ) eOption = VOPT_NULLVALS; @@ -340,7 +340,7 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) void ScTpContentOptions::InitGridOpt() { - BOOL bGrid = pLocalOptions->GetOption( VOPT_GRID ); + sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); aGridCB.Check( bGrid ); @@ -372,7 +372,7 @@ void ScTpContentOptions::InitGridOpt() //------------------------------------------------------ - aColorLB.SetUpdateMode( FALSE ); + aColorLB.SetUpdateMode( sal_False ); // Eintraege aus der Colortable @@ -390,7 +390,7 @@ void ScTpContentOptions::InitGridOpt() aColorLB.GetEntryPos( aStdCol ) ) aColorLB.InsertEntry( aStdCol, ScGlobal::GetRscString( STR_GRIDCOLOR ) ); - aColorLB.SetUpdateMode( TRUE ); + aColorLB.SetUpdateMode( sal_True ); Invalidate(); } @@ -399,7 +399,7 @@ void ScTpContentOptions::InitGridOpt() String aName; Color aCol = pLocalOptions->GetGridColor( &aName ); - USHORT nSelPos = aColorLB.GetEntryPos( aCol ); + sal_uInt16 nSelPos = aColorLB.GetEntryPos( aCol ); if ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) aColorLB.SelectEntryPos( nSelPos ); @@ -412,7 +412,7 @@ void ScTpContentOptions::InitGridOpt() IMPL_LINK( ScTpContentOptions, GridHdl, CheckBox*, pBox ) { - BOOL bChecked = pBox->IsChecked(); + sal_Bool bChecked = pBox->IsChecked(); aColorFT.Enable(bChecked); aColorLB.Enable(bChecked); pLocalOptions->SetOption( VOPT_GRID, bChecked ); @@ -458,7 +458,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent, aAlignCB.SetClickHdl(LINK(this, ScTpLayoutOptions, AlignHdl)); - for ( USHORT i = 0; i < aUnitArr.Count(); ++i ) + for ( sal_uInt16 i = 0; i < aUnitArr.Count(); ++i ) { String sMetric = aUnitArr.GetStringByPos( i ); FieldUnit eFUnit = (FieldUnit)aUnitArr.GetValue( i ); @@ -472,7 +472,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent, case FUNIT_INCH: { // nur diese Metriken benutzen - USHORT nPos = aUnitLB.InsertEntry( sMetric ); + sal_uInt16 nPos = aUnitLB.InsertEntry( sMetric ); aUnitLB.SetEntryData( nPos, (void*)(long)eFUnit ); } break; @@ -509,23 +509,23 @@ SfxTabPage* ScTpLayoutOptions::Create( Window* pParent, --------------------------------------------------*/ -BOOL ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet ) { - BOOL bRet = TRUE; - const USHORT nMPos = aUnitLB.GetSelectEntryPos(); + sal_Bool bRet = sal_True; + const sal_uInt16 nMPos = aUnitLB.GetSelectEntryPos(); if ( nMPos != aUnitLB.GetSavedValue() ) { - USHORT nFieldUnit = (USHORT)(long)aUnitLB.GetEntryData( nMPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)aUnitLB.GetEntryData( nMPos ); rCoreSet.Put( SfxUInt16Item( SID_ATTR_METRIC, - (UINT16)nFieldUnit ) ); - bRet = TRUE; + (sal_uInt16)nFieldUnit ) ); + bRet = sal_True; } if(aTabMF.GetText() != aTabMF.GetSavedValue()) { rCoreSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP, - sal::static_int_cast<UINT16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) ))); - bRet = TRUE; + sal::static_int_cast<sal_uInt16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) ))); + bRet = sal_True; } ScLkUpdMode nSet=LM_ALWAYS; @@ -547,55 +547,55 @@ BOOL ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet ) ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); aAppOptions.SetLinkMode(nSet ); SC_MOD()->SetAppOptions(aAppOptions); - bRet = TRUE; + bRet = sal_True; } if(aAlignCB.GetSavedValue() != aAlignCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_SELECTION, aAlignCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if(aAlignLB.GetSavedValue() != aAlignLB.GetSelectEntryPos()) { rCoreSet.Put(SfxUInt16Item(SID_SC_INPUT_SELECTIONPOS, aAlignLB.GetSelectEntryPos())); - bRet = TRUE; + bRet = sal_True; } if(aEditModeCB.GetSavedValue() != aEditModeCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_EDITMODE, aEditModeCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if(aFormatCB.GetSavedValue() != aFormatCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_FMT_EXPAND, aFormatCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if(aExpRefCB.GetSavedValue() != aExpRefCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_REF_EXPAND, aExpRefCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if(aMarkHdrCB.GetSavedValue() != aMarkHdrCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_MARK_HEADER, aMarkHdrCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if(aTextFmtCB.GetSavedValue() != aTextFmtCB.IsChecked()) { rCoreSet.Put(SfxBoolItem(SID_SC_INPUT_TEXTWYSIWYG, aTextFmtCB.IsChecked())); - bRet = TRUE; + bRet = sal_True; } if( aReplWarnCB.GetSavedValue() != aReplWarnCB.IsChecked() ) { rCoreSet.Put( SfxBoolItem( SID_SC_INPUT_REPLCELLSWARN, aReplWarnCB.IsChecked() ) ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -612,7 +612,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet ) const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet.Get( SID_ATTR_METRIC ); FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue(); - for ( USHORT i = 0; i < aUnitLB.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < aUnitLB.GetEntryCount(); ++i ) { if ( (FieldUnit)(long)aUnitLB.GetEntryData( i ) == eFieldUnit ) { @@ -625,7 +625,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet ) aUnitLB.SaveValue(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem)) aTabMF.SetValue(aTabMF.Normalize(((SfxUInt16Item*)pItem)->GetValue()), FUNIT_TWIP); aTabMF.SaveValue(); @@ -655,29 +655,29 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet ) // added to avoid warnings } } - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTION, sal_False, &pItem)) aAlignCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_SELECTIONPOS, sal_False, &pItem)) aAlignLB.SelectEntryPos(((const SfxUInt16Item*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_EDITMODE, sal_False, &pItem)) aEditModeCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_FMT_EXPAND, sal_False, &pItem)) aFormatCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_REF_EXPAND, sal_False, &pItem)) aExpRefCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_MARK_HEADER, sal_False, &pItem)) aMarkHdrCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, FALSE, &pItem)) + if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_SC_INPUT_TEXTWYSIWYG, sal_False, &pItem)) aTextFmtCB.Check(((const SfxBoolItem*)pItem)->GetValue()); - if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, FALSE, &pItem ) ) + if( SFX_ITEM_SET == rCoreSet.GetItemState( SID_SC_INPUT_REPLCELLSWARN, sal_False, &pItem ) ) aReplWarnCB.Check( ( (const SfxBoolItem*)pItem)->GetValue() ); aAlignCB .SaveValue(); @@ -721,7 +721,7 @@ int ScTpLayoutOptions::DeactivatePage( SfxItemSet* pSetP ) IMPL_LINK(ScTpLayoutOptions, MetricHdl, ListBox*, EMPTYARG) { - const USHORT nMPos = aUnitLB.GetSelectEntryPos(); + const sal_uInt16 nMPos = aUnitLB.GetSelectEntryPos(); if(nMPos != USHRT_MAX) { FieldUnit eFieldUnit = (FieldUnit)(long)aUnitLB.GetEntryData( nMPos ); diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 3ab86455f..51c69a282 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -55,16 +55,16 @@ // STATIC DATA --------------------------------------------------------------- // List box positions for print range (PR) -const USHORT SC_AREASDLG_PR_NONE = 0; -const USHORT SC_AREASDLG_PR_ENTIRE = 1; -const USHORT SC_AREASDLG_PR_USER = 2; -const USHORT SC_AREASDLG_PR_SELECT = 3; -const USHORT SC_AREASDLG_PR_OFFSET = 4; +const sal_uInt16 SC_AREASDLG_PR_NONE = 0; +const sal_uInt16 SC_AREASDLG_PR_ENTIRE = 1; +const sal_uInt16 SC_AREASDLG_PR_USER = 2; +const sal_uInt16 SC_AREASDLG_PR_SELECT = 3; +const sal_uInt16 SC_AREASDLG_PR_OFFSET = 4; // List box positions for repeat ranges (RR) -const USHORT SC_AREASDLG_RR_NONE = 0; -const USHORT SC_AREASDLG_RR_USER = 1; -const USHORT SC_AREASDLG_RR_OFFSET = 2; +const sal_uInt16 SC_AREASDLG_RR_NONE = 0; +const sal_uInt16 SC_AREASDLG_RR_USER = 1; +const sal_uInt16 SC_AREASDLG_RR_OFFSET = 2; //============================================================================ @@ -79,7 +79,7 @@ bool lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bIsRow void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr ); #if 0 -static void printAddressFlags(USHORT nFlag) +static void printAddressFlags(sal_uInt16 nFlag) { if ((nFlag & SCA_COL_ABSOLUTE ) == SCA_COL_ABSOLUTE ) printf("SCA_COL_ABSOLUTE \n"); if ((nFlag & SCA_ROW_ABSOLUTE ) == SCA_ROW_ABSOLUTE ) printf("SCA_ROW_ABSOLUTE \n"); @@ -131,7 +131,7 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* aBtnCancel ( this, ScResId( BTN_CANCEL ) ), aBtnHelp ( this, ScResId( BTN_HELP ) ), // - bDlgLostFocus ( FALSE ), + bDlgLostFocus ( sal_False ), pRefInputEdit ( &aEdPrintArea ), pDoc ( NULL ), pViewData ( NULL ), @@ -166,10 +166,10 @@ ScPrintAreasDlg::~ScPrintAreasDlg() // Extra-Data an ListBox-Entries abraeumen ListBox* pLb[3] = { &aLbPrintArea, &aLbRepeatRow, &aLbRepeatCol }; - for ( USHORT i=0; i<3; i++ ) + for ( sal_uInt16 i=0; i<3; i++ ) { - USHORT nCount = pLb[i]->GetEntryCount(); - for ( USHORT j=0; j<nCount; j++ ) + sal_uInt16 nCount = pLb[i]->GetEntryCount(); + for ( sal_uInt16 j=0; j<nCount; j++ ) delete (String*)pLb[i]->GetEntryData(j); } } @@ -177,7 +177,7 @@ ScPrintAreasDlg::~ScPrintAreasDlg() //---------------------------------------------------------------------------- -BOOL ScPrintAreasDlg::Close() +sal_Bool ScPrintAreasDlg::Close() { return DoClose( ScPrintAreasDlgWrapper::GetChildWindowId() ); } @@ -185,12 +185,12 @@ BOOL ScPrintAreasDlg::Close() //---------------------------------------------------------------------------- -BOOL ScPrintAreasDlg::IsTableLocked() const +sal_Bool ScPrintAreasDlg::IsTableLocked() const { // Druckbereiche gelten pro Tabelle, darum macht es keinen Sinn, // bei der Eingabe die Tabelle umzuschalten - return TRUE; + return sal_True; } @@ -223,7 +223,7 @@ void ScPrintAreasDlg::SetReference( const ScRange& rRef, ScDocument* /* pDoc */ } else { - BOOL bRow = ( &aEdRepeatRow == pRefInputEdit ); + sal_Bool bRow = ( &aEdRepeatRow == pRefInputEdit ); lcl_GetRepeatRangeString(&rRef, pDoc, bRow, aStr); pRefInputEdit->SetRefString( aStr ); } @@ -256,7 +256,7 @@ void ScPrintAreasDlg::AddRefEntry() void ScPrintAreasDlg::Deactivate() { - bDlgLostFocus = TRUE; + bDlgLostFocus = sal_True; } @@ -266,7 +266,7 @@ void ScPrintAreasDlg::SetActive() { if ( bDlgLostFocus ) { - bDlgLostFocus = FALSE; + bDlgLostFocus = sal_False; if ( pRefInputEdit ) { @@ -313,8 +313,8 @@ void ScPrintAreasDlg::Impl_Reset() String aOne; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); - USHORT nRangeCount = pDoc->GetPrintRangeCount( nCurTab ); - for (USHORT i=0; i<nRangeCount; i++) + sal_uInt16 nRangeCount = pDoc->GetPrintRangeCount( nCurTab ); + for (sal_uInt16 i=0; i<nRangeCount; i++) { const ScRange* pPrintRange = pDoc->GetPrintRange( nCurTab, i ); if (pPrintRange) @@ -353,10 +353,10 @@ void ScPrintAreasDlg::Impl_Reset() //---------------------------------------------------------------------------- -BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem ) +sal_Bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem ) { String aRangeStr = pEd->GetText(); - BOOL bDataChanged = (pEd->GetSavedValue() != aRangeStr); + sal_Bool bDataChanged = (pEd->GetSavedValue() != aRangeStr); if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd ) { @@ -374,18 +374,18 @@ BOOL ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem ) //---------------------------------------------------------------------------- -BOOL ScPrintAreasDlg::Impl_CheckRefStrings() +sal_Bool ScPrintAreasDlg::Impl_CheckRefStrings() { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; String aStrPrintArea = aEdPrintArea.GetText(); String aStrRepeatRow = aEdRepeatRow.GetText(); String aStrRepeatCol = aEdRepeatCol.GetText(); - BOOL bPrintAreaOk = TRUE; + sal_Bool bPrintAreaOk = sal_True; if ( aStrPrintArea.Len() ) { - const USHORT nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL; - const USHORT nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2; + const sal_uInt16 nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL; + const sal_uInt16 nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); // const sal_Unicode rsep = ScCompiler::GetNativeSymbol(ocRange).GetChar(0); @@ -396,21 +396,21 @@ BOOL ScPrintAreasDlg::Impl_CheckRefStrings() for ( xub_StrLen i = 0; i < nSepCount && bPrintAreaOk; ++i ) { String aOne = aStrPrintArea.GetToken(i, sep); - USHORT nResult = aRange.Parse( aOne, pDoc, eConv ); + sal_uInt16 nResult = aRange.Parse( aOne, pDoc, eConv ); if ((nResult & nValidRange) != nValidRange) { - USHORT nAddrResult = aAddr.Parse( aOne, pDoc, eConv ); + sal_uInt16 nAddrResult = aAddr.Parse( aOne, pDoc, eConv ); if ((nAddrResult & nValidAddr) != nValidAddr) - bPrintAreaOk = FALSE; + bPrintAreaOk = sal_False; } } } - BOOL bRepeatRowOk = (aStrRepeatRow.Len() == 0); + sal_Bool bRepeatRowOk = (aStrRepeatRow.Len() == 0); if ( !bRepeatRowOk ) bRepeatRowOk = lcl_CheckRepeatString(aStrRepeatRow, pDoc, true, NULL); - BOOL bRepeatColOk = (aStrRepeatCol.Len() == 0); + sal_Bool bRepeatColOk = (aStrRepeatCol.Len() == 0); if ( !bRepeatColOk ) bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, NULL); @@ -443,7 +443,7 @@ void ScPrintAreasDlg::Impl_FillLists() //------------------------------------------------------ ScRange aRange; String aStrRange; - BOOL bSimple = TRUE; + sal_Bool bSimple = sal_True; if ( pViewData ) bSimple = (pViewData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE); @@ -455,7 +455,7 @@ void ScPrintAreasDlg::Impl_FillLists() else { ScRangeListRef aList( new ScRangeList ); - pViewData->GetMarkData().FillRangeListWithMarks( aList, FALSE ); + pViewData->GetMarkData().FillRangeListWithMarks( aList, sal_False ); aList->Format( aStrRange, SCR_ABS, pDoc, eConv ); } @@ -465,7 +465,7 @@ void ScPrintAreasDlg::Impl_FillLists() // Ranges holen und in ListBoxen merken //------------------------------------------------------ ScRangeName* pRangeNames = pDoc->GetRangeName(); - const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0; + const sal_uInt16 nCount = pRangeNames ? pRangeNames->GetCount() : 0; if ( nCount > 0 ) { @@ -474,7 +474,7 @@ void ScPrintAreasDlg::Impl_FillLists() // ScRange aRange; ScRangeData* pData = NULL; - for ( USHORT i=0; i<nCount; i++ ) + for ( sal_uInt16 i=0; i<nCount; i++ ) { pData = (ScRangeData*)(pRangeNames->At( i )); if ( pData ) @@ -528,7 +528,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn ) { if ( Impl_CheckRefStrings() ) { - BOOL bDataChanged = FALSE; + sal_Bool bDataChanged = sal_False; String aStr; SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr ); SfxStringItem aRepeatRow( FN_PARAM_2, aStr ); @@ -539,7 +539,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn ) //------------------------- // first try the list box, if "Entite sheet" is selected - BOOL bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE); + sal_Bool bEntireSheet = (aLbPrintArea.GetSelectEntryPos() == SC_AREASDLG_PR_ENTIRE); SfxBoolItem aEntireSheet( FN_PARAM_4, bEntireSheet ); bDataChanged = bEntireSheet != pDoc->IsPrintEntireSheet( nCurTab ); @@ -561,7 +561,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn ) if ( bDataChanged ) { - SetDispatcherLock( FALSE ); + SetDispatcherLock( sal_False ); SwitchToDocument(); GetBindings().GetDispatcher()->Execute( SID_CHANGE_PRINTAREA, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -609,13 +609,13 @@ IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr ) IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb ) { - USHORT nSelPos = pLb->GetSelectEntryPos(); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); Edit* pEd = NULL; // list box positions of specific entries, default to "repeat row/column" list boxes - USHORT nAllSheetPos = SC_AREASDLG_RR_NONE; - USHORT nUserDefPos = SC_AREASDLG_RR_USER; - USHORT nFirstCustomPos = SC_AREASDLG_RR_OFFSET; + sal_uInt16 nAllSheetPos = SC_AREASDLG_RR_NONE; + sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER; + sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET; // find edit field for list box, and list box positions if( pLb == &aLbPrintArea ) @@ -651,8 +651,8 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd ) ListBox* pLb = NULL; // list box positions of specific entries, default to "repeat row/column" list boxes - USHORT nUserDefPos = SC_AREASDLG_RR_USER; - USHORT nFirstCustomPos = SC_AREASDLG_RR_OFFSET; + sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER; + sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET; if( pEd == &aEdPrintArea ) { @@ -668,16 +668,16 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd ) return 0; // set list box selection according to edit field - USHORT nEntryCount = pLb->GetEntryCount(); + sal_uInt16 nEntryCount = pLb->GetEntryCount(); String aStrEd( pEd->GetText() ); String aEdUpper = aStrEd; aEdUpper.ToUpperAscii(); if ( (nEntryCount > nFirstCustomPos) && aStrEd.Len() > 0 ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; String* pSymbol = NULL; - USHORT i; + sal_uInt16 i; for ( i=nFirstCustomPos; i<nEntryCount && !bFound; i++ ) { @@ -710,7 +710,7 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal ) String aStr = rStr; xub_StrLen nLen = aStr.Len(); SCCOLROW nNum = 0; - BOOL bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) ); + sal_Bool bStrOk = ( nLen > 0 ) && ( bIsRow ? ( nLen < 6 ) : ( nLen < 4 ) ); if ( bStrOk ) { @@ -725,7 +725,7 @@ bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal ) { sal_Int32 n = aStr.ToInt32(); - if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != FALSE ) + if ( ( bStrOk = (n > 0) && ( n <= MAXROWCOUNT ) ) != sal_False ) nNum = static_cast<SCCOLROW>(n - 1); } } @@ -892,7 +892,7 @@ void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIs const ScAddress& rStart = pRange->aStart; const ScAddress& rEnd = pRange->aEnd; - const USHORT nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE); + const sal_uInt16 nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE); String aTmpStr; rStart.Format(aTmpStr, nFmt, pDoc, eConv); rStr += aTmpStr; diff --git a/sc/source/ui/pagedlg/hfedtdlg.cxx b/sc/source/ui/pagedlg/hfedtdlg.cxx index c155ef3a8..57e8f54c2 100644 --- a/sc/source/ui/pagedlg/hfedtdlg.cxx +++ b/sc/source/ui/pagedlg/hfedtdlg.cxx @@ -65,7 +65,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP, Window* pParent, const SfxItemSet& rCoreSet, const String& rPageStyle, - USHORT nResIdP ) + sal_uInt16 nResIdP ) : SfxTabDialog( pFrameP, pParent, ScResId( nResIdP ), &rCoreSet ) { eNumType = ((const SvxPageItem&)rCoreSet.Get(ATTR_PAGE)).GetNumType(); @@ -135,7 +135,7 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP, rCoreSet.Get( rCoreSet.GetPool()->GetWhich(SID_ATTR_PAGE) ); - BOOL bRightPage = ( SVX_PAGE_LEFT != + sal_Bool bRightPage = ( SVX_PAGE_LEFT != SvxPageUsage(rPageItem.GetPageUsage()) ); if ( bRightPage ) @@ -147,13 +147,13 @@ ScHFEditDlg::ScHFEditDlg( SfxViewFrame* pFrameP, { // #69193a# respect "shared" setting - BOOL bShareHeader = IS_SHARE_HEADER(rCoreSet); + sal_Bool bShareHeader = IS_SHARE_HEADER(rCoreSet); if ( bShareHeader ) AddTabPage( 1, ScRightHeaderEditPage::Create, NULL ); else AddTabPage( 1, ScLeftHeaderEditPage::Create, NULL ); - BOOL bShareFooter = IS_SHARE_FOOTER(rCoreSet); + sal_Bool bShareFooter = IS_SHARE_FOOTER(rCoreSet); if ( bShareFooter ) AddTabPage( 2, ScRightFooterEditPage::Create, NULL ); else @@ -174,7 +174,7 @@ __EXPORT ScHFEditDlg::~ScHFEditDlg() // ----------------------------------------------------------------------- -void __EXPORT ScHFEditDlg::PageCreated( USHORT /* nId */, SfxTabPage& rPage ) +void __EXPORT ScHFEditDlg::PageCreated( sal_uInt16 /* nId */, SfxTabPage& rPage ) { // kann ja nur ne ScHFEditPage sein... diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index 2c897cb51..6a56550c4 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -70,19 +70,19 @@ // STATIC DATA ----------------------------------------------------------- -static USHORT pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT, +static sal_uInt16 pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT, SID_SCATTR_PAGE_HEADERRIGHT, 0 }; -static USHORT pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT, +static sal_uInt16 pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT, SID_SCATTR_PAGE_FOOTERRIGHT, 0 }; -static USHORT pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT, +static sal_uInt16 pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT, SID_SCATTR_PAGE_HEADERLEFT, 0 }; -static USHORT pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT, +static sal_uInt16 pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT, SID_SCATTR_PAGE_FOOTERLEFT, 0 }; @@ -95,9 +95,9 @@ static ScEditWindow* pActiveEdWnd = NULL; // ScHFEditPage::ScHFEditPage( Window* pParent, - USHORT nResId, + sal_uInt16 nResId, const SfxItemSet& rCoreAttrs, - USHORT nWhichId, + sal_uInt16 nWhichId, bool bHeader ) : SfxTabPage ( pParent, ScResId( nResId ), rCoreAttrs ), @@ -217,7 +217,7 @@ void __EXPORT ScHFEditPage::Reset( const SfxItemSet& rCoreSet ) // ----------------------------------------------------------------------- -BOOL __EXPORT ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool __EXPORT ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) { ScPageHFItem aItem( nWhich ); EditTextObject* pLeft = aWndLeft .CreateTextObject(); @@ -233,7 +233,7 @@ BOOL __EXPORT ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) rCoreSet.Put( aItem ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- @@ -345,7 +345,7 @@ void ScHFEditPage::InitPreDefinedList() void ScHFEditPage::InsertToDefinedList() { - USHORT nCount = maLbDefined.GetEntryCount(); + sal_uInt16 nCount = maLbDefined.GetEntryCount(); if(nCount == eEntryCount) { String aCustomizedEntry(ScGlobal::GetRscString( STR_HF_CUSTOMIZED ) ); @@ -356,7 +356,7 @@ void ScHFEditPage::InsertToDefinedList() void ScHFEditPage::RemoveFromDefinedList() { - USHORT nCount = maLbDefined.GetEntryCount(); + sal_uInt16 nCount = maLbDefined.GetEntryCount(); if(nCount > eEntryCount ) maLbDefined.RemoveEntry( nCount-1); } @@ -383,8 +383,8 @@ void ScHFEditPage::SetSelectDefinedList() bool bFound = false; - USHORT i; - USHORT nCount = maLbDefined.GetEntryCount(); + sal_uInt16 i; + sal_uInt16 nCount = maLbDefined.GetEntryCount(); for(i = 0; i < nCount && !bFound; i++) { switch(static_cast<ScHFEntryId>(i)) @@ -551,7 +551,7 @@ void ScHFEditPage::SetSelectDefinedList() if(eSelectEntry == eEntryCount) InsertToDefinedList(); - maLbDefined.SelectEntryPos( sal::static_int_cast<USHORT>( eSelectEntry ) ); + maLbDefined.SelectEntryPos( sal::static_int_cast<sal_uInt16>( eSelectEntry ) ); } bool ScHFEditPage::IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj) @@ -934,7 +934,7 @@ ScRightHeaderEditPage::ScRightHeaderEditPage( Window* pParent, const SfxItemSet& // ----------------------------------------------------------------------- -USHORT* __EXPORT ScRightHeaderEditPage::GetRanges() +sal_uInt16* __EXPORT ScRightHeaderEditPage::GetRanges() { return pPageRightHeaderRanges; } // ----------------------------------------------------------------------- @@ -954,7 +954,7 @@ ScLeftHeaderEditPage::ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& r // ----------------------------------------------------------------------- -USHORT* __EXPORT ScLeftHeaderEditPage::GetRanges() +sal_uInt16* __EXPORT ScLeftHeaderEditPage::GetRanges() { return pPageLeftHeaderRanges; } // ----------------------------------------------------------------------- @@ -973,7 +973,7 @@ ScRightFooterEditPage::ScRightFooterEditPage( Window* pParent, const SfxItemSet& // ----------------------------------------------------------------------- -USHORT* __EXPORT ScRightFooterEditPage::GetRanges() +sal_uInt16* __EXPORT ScRightFooterEditPage::GetRanges() { return pPageRightFooterRanges; } // ----------------------------------------------------------------------- @@ -992,7 +992,7 @@ ScLeftFooterEditPage::ScLeftFooterEditPage( Window* pParent, const SfxItemSet& r // ----------------------------------------------------------------------- -USHORT* __EXPORT ScLeftFooterEditPage::GetRanges() +sal_uInt16* __EXPORT ScLeftFooterEditPage::GetRanges() { return pPageLeftFooterRanges; } // ----------------------------------------------------------------------- diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index 059535e80..604cde4ea 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -60,15 +60,15 @@ // class ScHFPage //================================================================== -ScHFPage::ScHFPage( Window* pParent, USHORT nResId, - const SfxItemSet& rSet, USHORT nSetId ) +ScHFPage::ScHFPage( Window* pParent, sal_uInt16 nResId, + const SfxItemSet& rSet, sal_uInt16 nSetId ) : SvxHFPage ( pParent, nResId, rSet, nSetId ), aBtnEdit ( this, ScResId( RID_SCBTN_HFEDIT ) ), aDataSet ( *rSet.GetPool(), ATTR_PAGE_HEADERLEFT, ATTR_PAGE_FOOTERRIGHT, ATTR_PAGE, ATTR_PAGE, 0 ), - nPageUsage ( (USHORT)SVX_PAGE_ALL ), + nPageUsage ( (sal_uInt16)SVX_PAGE_ALL ), pStyleDlg ( NULL ) { SetExchangeSupport(); @@ -119,9 +119,9 @@ void __EXPORT ScHFPage::Reset( const SfxItemSet& rSet ) //------------------------------------------------------------------ -BOOL __EXPORT ScHFPage::FillItemSet( SfxItemSet& rOutSet ) +sal_Bool __EXPORT ScHFPage::FillItemSet( SfxItemSet& rOutSet ) { - BOOL bResult = SvxHFPage::FillItemSet( rOutSet ); + sal_Bool bResult = SvxHFPage::FillItemSet( rOutSet ); if ( nId == SID_ATTR_PAGE_HEADERSET ) { @@ -141,7 +141,7 @@ BOOL __EXPORT ScHFPage::FillItemSet( SfxItemSet& rOutSet ) void __EXPORT ScHFPage::ActivatePage( const SfxItemSet& rSet ) { - USHORT nPageWhich = GetWhich( SID_ATTR_PAGE ); + sal_uInt16 nPageWhich = GetWhich( SID_ATTR_PAGE ); const SvxPageItem& rPageItem = (const SvxPageItem&) rSet.Get(nPageWhich); @@ -219,7 +219,7 @@ IMPL_LINK( ScHFPage, HFEditHdl, void*, EMPTYARG ) if ( aCntSharedBox.IsEnabled() && !aCntSharedBox.IsChecked() ) { - USHORT nResId = ( nId == SID_ATTR_PAGE_HEADERSET ) + sal_uInt16 nResId = ( nId == SID_ATTR_PAGE_HEADERSET ) ? RID_SCDLG_HFED_HEADER : RID_SCDLG_HFED_FOOTER; @@ -238,7 +238,7 @@ IMPL_LINK( ScHFPage, HFEditHdl, void*, EMPTYARG ) { String aText; SfxSingleTabDialog* pDlg = new SfxSingleTabDialog( this, aDataSet, 42 ); - BOOL bRightPage = aCntSharedBox.IsChecked() + sal_Bool bRightPage = aCntSharedBox.IsChecked() || ( SVX_PAGE_LEFT != SvxPageUsage(nPageUsage) ); if ( nId == SID_ATTR_PAGE_HEADERSET ) @@ -298,7 +298,7 @@ SfxTabPage* __EXPORT ScHeaderPage::Create( Window* pParent, const SfxItemSet& rC //------------------------------------------------------------------ -USHORT* __EXPORT ScHeaderPage::GetRanges() +sal_uInt16* __EXPORT ScHeaderPage::GetRanges() { return SvxHeaderPage::GetRanges(); } @@ -321,7 +321,7 @@ SfxTabPage* __EXPORT ScFooterPage::Create( Window* pParent, const SfxItemSet& rC //------------------------------------------------------------------ -USHORT* __EXPORT ScFooterPage::GetRanges() +sal_uInt16* __EXPORT ScFooterPage::GetRanges() { return SvxHeaderPage::GetRanges(); } diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index baaf85e08..67b365f4e 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -74,19 +74,19 @@ ScEditWindow* GetScEditWindow () } //CHINA001 -//CHINA001 static USHORT pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT, +//CHINA001 static sal_uInt16 pPageRightHeaderRanges[] = { SID_SCATTR_PAGE_HEADERRIGHT, //CHINA001 SID_SCATTR_PAGE_HEADERRIGHT, //CHINA001 0 }; //CHINA001 -//CHINA001 static USHORT pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT, +//CHINA001 static sal_uInt16 pPageRightFooterRanges[] = { SID_SCATTR_PAGE_FOOTERRIGHT, //CHINA001 SID_SCATTR_PAGE_FOOTERRIGHT, //CHINA001 0 }; //CHINA001 -//CHINA001 static USHORT pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT, +//CHINA001 static sal_uInt16 pPageLeftHeaderRanges[] = { SID_SCATTR_PAGE_HEADERLEFT, //CHINA001 SID_SCATTR_PAGE_HEADERLEFT, //CHINA001 0 }; //CHINA001 -//CHINA001 static USHORT pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT, +//CHINA001 static sal_uInt16 pPageLeftFooterRanges[] = { SID_SCATTR_PAGE_FOOTERLEFT, //CHINA001 SID_SCATTR_PAGE_FOOTERLEFT, //CHINA001 0 }; //CHINA001 @@ -99,9 +99,9 @@ ScEditWindow* GetScEditWindow () //CHINA001 // //CHINA001 //CHINA001 ScHFEditPage::ScHFEditPage( Window* pParent, -//CHINA001 USHORT nResId, +//CHINA001 sal_uInt16 nResId, //CHINA001 const SfxItemSet& rCoreAttrs, -//CHINA001 USHORT nWhichId ) +//CHINA001 sal_uInt16 nWhichId ) //CHINA001 //CHINA001 : SfxTabPage ( pParent, ScResId( nResId ), rCoreAttrs ), //CHINA001 @@ -198,7 +198,7 @@ ScEditWindow* GetScEditWindow () //CHINA001 //CHINA001 // ----------------------------------------------------------------------- //CHINA001 -//CHINA001 BOOL __EXPORT ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) +//CHINA001 sal_Bool __EXPORT ScHFEditPage::FillItemSet( SfxItemSet& rCoreSet ) //CHINA001 { //CHINA001 ScPageHFItem aItem( nWhich ); //CHINA001 EditTextObject* pLeft = aWndLeft .CreateTextObject(); @@ -214,7 +214,7 @@ ScEditWindow* GetScEditWindow () //CHINA001 //CHINA001 rCoreSet.Put( aItem ); //CHINA001 -//CHINA001 return TRUE; +//CHINA001 return sal_True; //CHINA001 } //CHINA001 //CHINA001 // ----------------------------------------------------------------------- @@ -313,7 +313,7 @@ ScEditWindow* GetScEditWindow () //CHINA001 //CHINA001 // ----------------------------------------------------------------------- //CHINA001 -//CHINA001 USHORT* __EXPORT ScRightHeaderEditPage::GetRanges() +//CHINA001 sal_uInt16* __EXPORT ScRightHeaderEditPage::GetRanges() //CHINA001 { return pPageRightHeaderRanges; } //CHINA001 //CHINA001 // ----------------------------------------------------------------------- @@ -333,7 +333,7 @@ ScEditWindow* GetScEditWindow () //CHINA001 //CHINA001 // ----------------------------------------------------------------------- //CHINA001 -//CHINA001 USHORT* __EXPORT ScLeftHeaderEditPage::GetRanges() +//CHINA001 sal_uInt16* __EXPORT ScLeftHeaderEditPage::GetRanges() //CHINA001 { return pPageLeftHeaderRanges; } //CHINA001 //CHINA001 // ----------------------------------------------------------------------- @@ -352,7 +352,7 @@ ScEditWindow* GetScEditWindow () //CHINA001 //CHINA001 // ----------------------------------------------------------------------- //CHINA001 -//CHINA001 USHORT* __EXPORT ScRightFooterEditPage::GetRanges() +//CHINA001 sal_uInt16* __EXPORT ScRightFooterEditPage::GetRanges() //CHINA001 { return pPageRightFooterRanges; } //CHINA001 //CHINA001 // ----------------------------------------------------------------------- @@ -371,7 +371,7 @@ ScEditWindow* GetScEditWindow () //CHINA001 //CHINA001 // ----------------------------------------------------------------------- //CHINA001 -//CHINA001 USHORT* __EXPORT ScLeftFooterEditPage::GetRanges() +//CHINA001 sal_uInt16* __EXPORT ScLeftFooterEditPage::GetRanges() //CHINA001 { return pPageLeftFooterRanges; } //CHINA001 //CHINA001 // ----------------------------------------------------------------------- @@ -402,7 +402,7 @@ ScEditWindow::ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLo eLocation(eLoc), pAcc(NULL) { - EnableRTL(FALSE); + EnableRTL(sal_False); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); Color aBgColor = rStyleSettings.GetWindowColor(); @@ -414,7 +414,7 @@ ScEditWindow::ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLo Size aSize( GetOutputSize() ); aSize.Height() *= 4; - pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE ); + pEdEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True ); pEdEngine->SetPaperSize( aSize ); pEdEngine->SetRefDevice( this ); @@ -466,8 +466,8 @@ EditTextObject* __EXPORT ScEditWindow::CreateTextObject() // (GetAttribs beim Format-Dialog-Aufruf gibt immer gesetzte Items zurueck) const SfxItemSet& rEmpty = pEdEngine->GetEmptyItemSet(); - USHORT nParCnt = pEdEngine->GetParagraphCount(); - for (USHORT i=0; i<nParCnt; i++) + sal_uInt16 nParCnt = pEdEngine->GetParagraphCount(); + for (sal_uInt16 i=0; i<nParCnt; i++) pEdEngine->SetParaAttribs( i, rEmpty ); return pEdEngine->CreateTextObject(); @@ -519,7 +519,7 @@ void ScEditWindow::SetCharAttriutes() if ( pDocSh && pViewSh ) { - if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(TRUE); + if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(sal_True); SfxItemSet aSet( pEdView->GetAttribs() ); @@ -538,7 +538,7 @@ void ScEditWindow::SetCharAttriutes() pEdView->SetAttribs( aSet ); } - if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(FALSE); + if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(sal_False); delete pDlg; } } @@ -587,7 +587,7 @@ void __EXPORT ScEditWindow::MouseButtonUp( const MouseEvent& rMEvt ) void __EXPORT ScEditWindow::KeyInput( const KeyEvent& rKEvt ) { - USHORT nKey = rKEvt.GetKeyCode().GetModifier() + sal_uInt16 nKey = rKEvt.GetKeyCode().GetModifier() + rKEvt.GetKeyCode().GetCode(); if ( nKey == KEY_TAB || nKey == KEY_TAB + KEY_SHIFT ) @@ -692,7 +692,7 @@ public: void SetPopupMenu(ScPopupMenu* pPopUp); - USHORT GetSelected(); + sal_uInt16 GetSelected(); void SetMenuHdl( const Link& rLink ) { aFxLink = rLink; } const Link& GetMenuHdl() const { return aFxLink; } @@ -705,7 +705,7 @@ ScExtIButton::ScExtIButton(Window* pParent, const ResId& rResId ) { nSelected=0; aTimer.SetTimeout(600); - SetDropDown( TRUE); + SetDropDown( sal_True); // DrawArrow(); } @@ -715,7 +715,7 @@ void ScExtIButton::SetPopupMenu(ScPopupMenu* pPopUp) pPopupMenu=pPopUp; } -USHORT ScExtIButton::GetSelected() +sal_uInt16 ScExtIButton::GetSelected() { return nSelected; } @@ -750,7 +750,7 @@ void ScExtIButton::StartPopup() if(pPopupMenu!=NULL) { - SetPressed( TRUE ); + SetPressed( sal_True ); EndSelection(); Point aPoint(0,0); aPoint.Y()=GetOutputSizePixel().Height(); @@ -761,13 +761,13 @@ void ScExtIButton::StartPopup() { aMLink.Call(this); } - SetPressed( FALSE); + SetPressed( sal_False); } } long ScExtIButton::PreNotify( NotifyEvent& rNEvt ) { - USHORT nSwitch=rNEvt.GetType(); + sal_uInt16 nSwitch=rNEvt.GetType(); if(nSwitch==EVENT_MOUSEBUTTONUP) { MouseButtonUp(*rNEvt.GetMouseEvent()); @@ -783,8 +783,8 @@ IMPL_LINK( ScExtIButton, TimerHdl, Timer*, EMPTYARG ) } /* -static void ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, BOOL bBlack, - BOOL bLeft = FALSE, BOOL bTop = FALSE ) +static void ImplDrawToolArrow( ToolBox* pBox, long nX, long nY, sal_Bool bBlack, + sal_Bool bLeft = sal_False, sal_Bool bTop = sal_False ) { Color aOldFillColor = pBox->GetFillColor(); WindowAlign eAlign = pBox->meAlign; @@ -862,10 +862,10 @@ Click Timer if ( ??? ) { - - SetPressed( TRUE ); + - SetPressed( sal_True ); - EndSelection(); - Menu anzeigen - - SetPressed( FALSE ); + - SetPressed( sal_False ); } diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index cae675222..8a3a3dcab 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -70,38 +70,38 @@ sal_Int64 EmptyNumericField::GetValue() const // STATIC DATA ----------------------------------------------------------- -static USHORT pPageTableRanges[] = +static sal_uInt16 pPageTableRanges[] = { ATTR_PAGE_NOTES, ATTR_PAGE_FIRSTPAGENO, 0 }; -BOOL lcl_PutVObjModeItem( USHORT nWhich, +sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const CheckBox& rBtn ); -BOOL lcl_PutScaleItem( USHORT nWhich, +sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, - USHORT nLBEntry, + sal_uInt16 nLBEntry, const SpinField& rEd, - UINT16 nValue ); + sal_uInt16 nValue ); -BOOL lcl_PutScaleItem2( USHORT nWhich, +sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, - USHORT nLBEntry, + sal_uInt16 nLBEntry, const NumericField& rEd1, const NumericField& rEd2 ); -BOOL lcl_PutBoolItem( USHORT nWhich, +sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, - BOOL bIsChecked, - BOOL bSavedValue ); + sal_Bool bIsChecked, + sal_Bool bSavedValue ); //------------------------------------------------------------------------ @@ -109,9 +109,9 @@ BOOL lcl_PutBoolItem( USHORT nWhich, #define PAGEDIR_HDL LINK(this,ScTablePage,PageDirHdl) #define SCALE_HDL LINK(this,ScTablePage,ScaleHdl) -#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),TRUE)) +#define WAS_DEFAULT(w,s) (SFX_ITEM_DEFAULT==(s).GetItemState((w),sal_True)) #define GET_BOOL(sid,set) ((const SfxBoolItem&)((set).Get(GetWhich((sid))))).GetValue() -#define GET_USHORT(sid,set) (USHORT)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue() +#define GET_USHORT(sid,set) (sal_uInt16)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue() #define GET_SHOW(sid,set) ( ScVObjMode( ((const ScViewObjectModeItem&)((set).Get(GetWhich((sid))))).GetValue() ) \ == VOBJ_MODE_SHOW ) @@ -183,7 +183,7 @@ ScTablePage::~ScTablePage() //------------------------------------------------------------------------ -USHORT* ScTablePage::GetRanges() +sal_uInt16* ScTablePage::GetRanges() { return pPageTableRanges; } @@ -199,11 +199,11 @@ SfxTabPage* ScTablePage::Create( Window* pParent, const SfxItemSet& rCoreSet ) void ScTablePage::Reset( const SfxItemSet& rCoreSet ) { - BOOL bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet ); - USHORT nWhich = 0; + sal_Bool bTopDown = GET_BOOL( SID_SCATTR_PAGE_TOPDOWN, rCoreSet ); + sal_uInt16 nWhich = 0; //----------- - // BOOL-Flags + // sal_Bool-Flags //----------- aBtnNotes .Check( GET_BOOL(SID_SCATTR_PAGE_NOTES,rCoreSet) ); aBtnGrid .Check( GET_BOOL(SID_SCATTR_PAGE_GRID,rCoreSet) ); @@ -216,7 +216,7 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) //------------------ // Erste Druckseite: //------------------ - USHORT nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet); + sal_uInt16 nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet); aBtnPageNo.Check( nPage != 0 ); aEdPageNo.SetValue( (nPage != 0) ? nPage : 1 ); PageNoHdl( NULL ); @@ -233,20 +233,20 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) //------------ nWhich = GetWhich(SID_SCATTR_PAGE_SCALE); - if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { - USHORT nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue(); + sal_uInt16 nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue(); if( nScale > 0 ) aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); aEdScaleAll.SetValue( (nScale > 0) ? nScale : 100 ); } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETO); - if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { const ScPageScaleToItem& rItem = static_cast< const ScPageScaleToItem& >( rCoreSet.Get( nWhich ) ); - USHORT nWidth = rItem.GetWidth(); - USHORT nHeight = rItem.GetHeight(); + sal_uInt16 nWidth = rItem.GetWidth(); + sal_uInt16 nHeight = rItem.GetHeight(); /* width==0 and height==0 is invalid state, used as "not selected". Dialog shows width=height=1 then. */ @@ -258,9 +258,9 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETOPAGES); - if ( rCoreSet.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE ) + if ( rCoreSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { - USHORT nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue(); + sal_uInt16 nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue(); if( nPages > 0 ) aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_TO_PAGES ); aEdScalePageNum.SetValue( (nPages > 0) ? nPages : 1 ); @@ -299,14 +299,14 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) // ----------------------------------------------------------------------- -BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) { const SfxItemSet& rOldSet = GetItemSet(); - USHORT nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO); - BOOL bDataChanged = FALSE; + sal_uInt16 nWhichPageNo = GetWhich(SID_SCATTR_PAGE_FIRSTPAGENO); + sal_Bool bDataChanged = sal_False; //----------- - // BOOL-Flags + // sal_Bool-Flags //----------- bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES), @@ -342,7 +342,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) //------------------ // Erste Druckseite: //------------------ - BOOL bUseValue = aBtnPageNo.IsChecked(); + sal_Bool bUseValue = aBtnPageNo.IsChecked(); if ( WAS_DEFAULT(nWhichPageNo,rOldSet) && ( (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue()) @@ -353,12 +353,12 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) } else { - UINT16 nPage = (UINT16)( aBtnPageNo.IsChecked() + sal_uInt16 nPage = (sal_uInt16)( aBtnPageNo.IsChecked() ? aEdPageNo.GetValue() : 0 ); rCoreSet.Put( SfxUInt16Item( nWhichPageNo, nPage ) ); - bDataChanged = TRUE; + bDataChanged = sal_True; } //------------------- @@ -387,7 +387,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALE), rCoreSet, rOldSet, aLbScaleMode, SC_TPTABLE_SCALE_PERCENT, - aEdScaleAll, (UINT16)aEdScaleAll.GetValue() ); + aEdScaleAll, (sal_uInt16)aEdScaleAll.GetValue() ); bDataChanged |= lcl_PutScaleItem2( GetWhich(SID_SCATTR_PAGE_SCALETO), rCoreSet, rOldSet, @@ -397,7 +397,7 @@ BOOL ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALETOPAGES), rCoreSet, rOldSet, aLbScaleMode, SC_TPTABLE_SCALE_TO_PAGES, - aEdScalePageNum, (UINT16)aEdScalePageNum.GetValue() ); + aEdScalePageNum, (sal_uInt16)aEdScalePageNum.GetValue() ); return bDataChanged; } @@ -475,13 +475,13 @@ IMPL_LINK( ScTablePage, ScaleHdl, ListBox*, EMPTYARG ) // Hilfsfunktionen fuer FillItemSet: //======================================================================== -BOOL lcl_PutBoolItem( USHORT nWhich, +sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, - BOOL bIsChecked, - BOOL bSavedValue ) + sal_Bool bIsChecked, + sal_Bool bSavedValue ) { - BOOL bDataChanged = ( bSavedValue == bIsChecked + sal_Bool bDataChanged = ( bSavedValue == bIsChecked && WAS_DEFAULT(nWhich,rOldSet) ); if ( bDataChanged ) @@ -494,13 +494,13 @@ BOOL lcl_PutBoolItem( USHORT nWhich, //------------------------------------------------------------------------ -BOOL lcl_PutVObjModeItem( USHORT nWhich, +sal_Bool lcl_PutVObjModeItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const CheckBox& rBtn ) { - BOOL bIsChecked = rBtn.IsChecked(); - BOOL bDataChanged = ( rBtn.GetSavedValue() == bIsChecked + sal_Bool bIsChecked = rBtn.IsChecked(); + sal_Bool bDataChanged = ( rBtn.GetSavedValue() == bIsChecked && WAS_DEFAULT(nWhich,rOldSet) ); if ( bDataChanged ) @@ -515,16 +515,16 @@ BOOL lcl_PutVObjModeItem( USHORT nWhich, //------------------------------------------------------------------------ -BOOL lcl_PutScaleItem( USHORT nWhich, +sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, - USHORT nLBEntry, + sal_uInt16 nLBEntry, const SpinField& rEd, - UINT16 nValue ) + sal_uInt16 nValue ) { - BOOL bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); - BOOL bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || + sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); + sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || (rEd.GetSavedValue() != rEd.GetText()) || !WAS_DEFAULT( nWhich, rOldSet ); @@ -537,18 +537,18 @@ BOOL lcl_PutScaleItem( USHORT nWhich, } -BOOL lcl_PutScaleItem2( USHORT nWhich, +sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich, SfxItemSet& rCoreSet, const SfxItemSet& rOldSet, const ListBox& rListBox, - USHORT nLBEntry, + sal_uInt16 nLBEntry, const NumericField& rEd1, const NumericField& rEd2 ) { - UINT16 nValue1 = (UINT16)rEd1.GetValue(); - UINT16 nValue2 = (UINT16)rEd2.GetValue(); - BOOL bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); - BOOL bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || + sal_uInt16 nValue1 = (sal_uInt16)rEd1.GetValue(); + sal_uInt16 nValue2 = (sal_uInt16)rEd2.GetValue(); + sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry); + sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) || (rEd1.GetSavedValue() != rEd1.GetText()) || (rEd2.GetSavedValue() != rEd2.GetText()) || !WAS_DEFAULT( nWhich, rOldSet ); diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx index 6d5c2d336..3dc1dd047 100644 --- a/sc/source/ui/styleui/styledlg.cxx +++ b/sc/source/ui/styleui/styledlg.cxx @@ -65,12 +65,12 @@ ScStyleDlg::ScStyleDlg( Window* pParent, SfxStyleSheetBase& rStyleBase, - USHORT nRscId ) + sal_uInt16 nRscId ) : SfxStyleDialog ( pParent, ScResId( nRscId ), rStyleBase, - FALSE ), + sal_False ), nDlgRsc ( nRscId ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); //CHINA001 @@ -145,7 +145,7 @@ __EXPORT ScStyleDlg::~ScStyleDlg() // ----------------------------------------------------------------------- -void __EXPORT ScStyleDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) +void __EXPORT ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { if ( nDlgRsc == RID_SCDLG_STYLES_PAR ) { @@ -194,7 +194,7 @@ void __EXPORT ScStyleDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage ) { case TP_PAGE_STD: //CHINA001 ((SvxPageDescPage&)rTabPage).SetMode( SVX_PAGE_MODE_CENTER ); - aSet.Put (SfxAllEnumItem((const USHORT)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_CENTER)); //CHINA001 + aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_CENTER)); //CHINA001 rTabPage.PageCreated(aSet); //CHINA001 break; diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx index 77cae60a8..583777a7f 100644 --- a/sc/source/ui/undo/areasave.cxx +++ b/sc/source/ui/undo/areasave.cxx @@ -73,7 +73,7 @@ ScDataObject* ScAreaLinkSaver::Clone() const return new ScAreaLinkSaver( *this ); } -BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const +sal_Bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const { return ( aFileName == rCompare.GetFile() && aFilterName == rCompare.GetFilter() && @@ -82,7 +82,7 @@ BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const nRefresh == rCompare.GetRefreshDelay() ); } -BOOL ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const +sal_Bool ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const { return ( IsEqualSource( rCompare ) && aDestArea == rCompare.GetDestArea() ); @@ -104,11 +104,11 @@ void ScAreaLinkSaver::InsertNewLink( ScDocument* pDoc ) const { ScAreaLink* pLink = new ScAreaLink( pObjSh, aFileName, aFilterName, aOptions, aSourceArea, aDestArea.aStart, nRefresh ); - pLink->SetInCreate( TRUE ); + pLink->SetInCreate( sal_True ); pLink->SetDestArea( aDestArea ); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName, &aSourceArea ); pLink->Update(); - pLink->SetInCreate( FALSE ); + pLink->SetInCreate( sal_False ); } } @@ -132,7 +132,7 @@ ScDataObject* ScAreaLinkSaveCollection::Clone() const return new ScAreaLinkSaveCollection( *this ); } -BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const +sal_Bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const { // IsEqual can be checked in sequence. // Neither ref-update nor removing links will change the order. @@ -140,31 +140,31 @@ BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager(); if (pLinkManager) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nLinkCount = rLinks.Count(); - for (USHORT i=0; i<nLinkCount; i++) + sal_uInt16 nLinkCount = rLinks.Count(); + for (sal_uInt16 i=0; i<nLinkCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) { if ( nPos >= GetCount() || !(*this)[nPos]->IsEqual( *(ScAreaLink*)pBase ) ) - return FALSE; + return sal_False; ++nPos; } } if ( nPos < GetCount() ) - return FALSE; // fewer links in the document than in the save collection + return sal_False; // fewer links in the document than in the save collection } - return TRUE; + return sal_True; } ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver ) { - USHORT nLinkCount = rLinks.Count(); - for (USHORT i=0; i<nLinkCount; i++) + sal_uInt16 nLinkCount = rLinks.Count(); + for (sal_uInt16 i=0; i<nLinkCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; if ( pBase->ISA(ScAreaLink) && @@ -187,8 +187,8 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc ) const if (pLinkManager) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nSaveCount = GetCount(); - for (USHORT nPos=0; nPos<nSaveCount; nPos++) + sal_uInt16 nSaveCount = GetCount(); + for (sal_uInt16 nPos=0; nPos<nSaveCount; nPos++) { ScAreaLinkSaver* pSaver = (*this)[nPos]; ScAreaLink* pLink = lcl_FindLink( rLinks, *pSaver ); @@ -209,8 +209,8 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum if (pLinkManager) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nLinkCount = rLinks.Count(); - for (USHORT i=0; i<nLinkCount; i++) + sal_uInt16 nLinkCount = rLinks.Count(); + for (sal_uInt16 i=0; i<nLinkCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx index 69344dffa..e9bd35f10 100644 --- a/sc/source/ui/undo/refundo.cxx +++ b/sc/source/ui/undo/refundo.cxx @@ -166,7 +166,7 @@ void ScRefUndoData::DeleteUnchanged( const ScDocument* pDoc ) } } -void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst ) +void ScRefUndoData::DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst ) { if (pDBCollection) pDoc->SetDBCollection( new ScDBCollection(*pDBCollection) ); @@ -195,8 +195,8 @@ void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst ) if (pDBCollection || pRangeName) { - BOOL bOldAutoCalc = pDoc->GetAutoCalc(); - pDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden + sal_Bool bOldAutoCalc = pDoc->GetAutoCalc(); + pDoc->SetAutoCalc( sal_False ); // Mehrfachberechnungen vermeiden pDoc->CompileAll(); pDoc->SetDirty(); pDoc->SetAutoCalc( bOldAutoCalc ); diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index 3798d7f76..8da6144c9 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -66,14 +66,14 @@ __EXPORT ScSimpleUndo::~ScSimpleUndo() delete pDetectiveUndo; } -BOOL __EXPORT ScSimpleUndo::Merge( SfxUndoAction *pNextAction ) +sal_Bool __EXPORT ScSimpleUndo::Merge( SfxUndoAction *pNextAction ) { // Zu jeder Undo-Action kann eine SdrUndoGroup fuer das Aktualisieren // der Detektiv-Pfeile gehoeren. // DetectiveRefresh kommt immer hinterher, die SdrUndoGroup ist in // eine ScUndoDraw Action verpackt. // Nur beim automatischen Aktualisieren wird AddUndoAction mit - // bTryMerg=TRUE gerufen. + // bTryMerg=sal_True gerufen. if ( !pDetectiveUndo && pNextAction->ISA(ScUndoDraw) ) { @@ -83,15 +83,15 @@ BOOL __EXPORT ScSimpleUndo::Merge( SfxUndoAction *pNextAction ) ScUndoDraw* pCalcUndo = (ScUndoDraw*)pNextAction; pDetectiveUndo = pCalcUndo->GetDrawUndo(); pCalcUndo->ForgetDrawUndo(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ScSimpleUndo::BeginUndo() { - pDocShell->SetInUndo( TRUE ); + pDocShell->SetInUndo( sal_True ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) @@ -114,12 +114,12 @@ void ScSimpleUndo::EndUndo() pViewShell->ShowAllCursors(); } - pDocShell->SetInUndo( FALSE ); + pDocShell->SetInUndo( sal_False ); } void ScSimpleUndo::BeginRedo() { - pDocShell->SetInUndo( TRUE ); //! eigenes Flag fuer Redo? + pDocShell->SetInUndo( sal_True ); //! eigenes Flag fuer Redo? ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) @@ -141,7 +141,7 @@ void ScSimpleUndo::EndRedo() pViewShell->ShowAllCursors(); } - pDocShell->SetInUndo( FALSE ); + pDocShell->SetInUndo( sal_False ); } void ScSimpleUndo::ShowTable( SCTAB nTab ) // static @@ -184,7 +184,7 @@ __EXPORT ScBlockUndo::~ScBlockUndo() void ScBlockUndo::BeginUndo() { ScSimpleUndo::BeginUndo(); - EnableDrawAdjust( pDocShell->GetDocument(), FALSE ); + EnableDrawAdjust( pDocShell->GetDocument(), sal_False ); } void ScBlockUndo::EndUndo() @@ -192,7 +192,7 @@ void ScBlockUndo::EndUndo() if (eMode == SC_UNDO_AUTOHEIGHT) AdjustHeight(); - EnableDrawAdjust( pDocShell->GetDocument(), TRUE ); + EnableDrawAdjust( pDocShell->GetDocument(), sal_True ); DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() ); ShowBlock(); @@ -215,7 +215,7 @@ void ScBlockUndo::EndRedo() ScSimpleUndo::EndRedo(); } -BOOL ScBlockUndo::AdjustHeight() +sal_Bool ScBlockUndo::AdjustHeight() { ScDocument* pDoc = pDocShell->GetDocument(); @@ -239,9 +239,9 @@ BOOL ScBlockUndo::AdjustHeight() nPPTY = ScGlobal::nScreenPPTY; } - BOOL bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(), + sal_Bool bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(), /*!*/ aBlockRange.aStart.Tab(), 0, &aVirtDev, - nPPTX, nPPTY, aZoomX, aZoomY, FALSE ); + nPPTX, nPPTY, aZoomX, aZoomY, sal_False ); if (bRet) pDocShell->PostPaint( 0, aBlockRange.aStart.Row(), aBlockRange.aStart.Tab(), @@ -258,7 +258,7 @@ void ScBlockUndo::ShowBlock() { ShowTable( aBlockRange ); // bei mehreren Tabs im Range ist jede davon gut pViewShell->MoveCursorAbs( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(), - SC_FOLLOW_JUMP, FALSE, FALSE ); + SC_FOLLOW_JUMP, sal_False, sal_False ); SCTAB nTab = pViewShell->GetViewData()->GetTabNo(); ScRange aRange = aBlockRange; aRange.aStart.SetTab( nTab ); @@ -296,7 +296,7 @@ void ScMoveUndo::UndoRef() { ScDocument* pDoc = pDocShell->GetDocument(); ScRange aRange(0,0,0, MAXCOL,MAXROW,pRefUndoDoc->GetTableCount()-1); - pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, FALSE, pDoc, NULL, FALSE ); + pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, sal_False, pDoc, NULL, sal_False ); if (pRefUndoData) pRefUndoData->DoUndo( pDoc, (eMode == SC_UNDO_REFFIRST) ); // #65055# HACK: ScDragDropUndo ist der einzige mit REFFIRST. @@ -308,7 +308,7 @@ void ScMoveUndo::BeginUndo() { ScSimpleUndo::BeginUndo(); - EnableDrawAdjust( pDocShell->GetDocument(), FALSE ); + EnableDrawAdjust( pDocShell->GetDocument(), sal_False ); if (pRefUndoDoc && eMode == SC_UNDO_REFFIRST) UndoRef(); @@ -322,7 +322,7 @@ void ScMoveUndo::EndUndo() if (pRefUndoDoc && eMode == SC_UNDO_REFLAST) UndoRef(); - EnableDrawAdjust( pDocShell->GetDocument(), TRUE ); + EnableDrawAdjust( pDocShell->GetDocument(), sal_True ); ScSimpleUndo::EndUndo(); } @@ -375,7 +375,7 @@ void ScDBFuncUndo::EndUndo() if ( pAutoDBRange ) { - USHORT nNoNameIndex; + sal_uInt16 nNoNameIndex; ScDocument* pDoc = pDocShell->GetDocument(); ScDBCollection* pColl = pDoc->GetDBCollection(); if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) ) @@ -410,7 +410,7 @@ void ScDBFuncUndo::BeginRedo() { // move the database range to this function's position again (see ScDocShell::GetDBData) - USHORT nNoNameIndex; + sal_uInt16 nNoNameIndex; ScDocument* pDoc = pDocShell->GetDocument(); ScDBCollection* pColl = pDoc->GetDBCollection(); if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) ) @@ -433,8 +433,8 @@ void ScDBFuncUndo::BeginRedo() aOriginalRange.aStart.Col(), aOriginalRange.aStart.Row(), aOriginalRange.aEnd.Col(), aOriginalRange.aEnd.Row() ); - pNoNameData->SetByRow( TRUE ); - pNoNameData->SetAutoFilter( FALSE ); + pNoNameData->SetByRow( sal_True ); + pNoNameData->SetAutoFilter( sal_False ); // header is always set with the operation in redo } } @@ -480,7 +480,7 @@ String ScUndoWrapper::GetRepeatComment(SfxRepeatTarget& rTarget) const return String(); } -USHORT ScUndoWrapper::GetId() const +sal_uInt16 ScUndoWrapper::GetId() const { if (pWrappedUndo) return pWrappedUndo->GetId(); @@ -488,26 +488,26 @@ USHORT ScUndoWrapper::GetId() const return 0; } -BOOL ScUndoWrapper::IsLinked() +sal_Bool ScUndoWrapper::IsLinked() { if (pWrappedUndo) return pWrappedUndo->IsLinked(); else - return FALSE; + return sal_False; } -void ScUndoWrapper::SetLinked( BOOL bIsLinked ) +void ScUndoWrapper::SetLinked( sal_Bool bIsLinked ) { if (pWrappedUndo) pWrappedUndo->SetLinked(bIsLinked); } -BOOL ScUndoWrapper::Merge( SfxUndoAction* pNextAction ) +sal_Bool ScUndoWrapper::Merge( SfxUndoAction* pNextAction ) { if (pWrappedUndo) return pWrappedUndo->Merge(pNextAction); else - return FALSE; + return sal_False; } void ScUndoWrapper::Undo() @@ -528,12 +528,12 @@ void ScUndoWrapper::Repeat(SfxRepeatTarget& rTarget) pWrappedUndo->Repeat(rTarget); } -BOOL ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const { if (pWrappedUndo) return pWrappedUndo->CanRepeat(rTarget); else - return FALSE; + return sal_False; } diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 6c096c99f..ed7b4f2cc 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -103,7 +103,7 @@ TYPEINIT1(ScUndoBorder, ScBlockUndo); ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell, const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios, InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData, - BOOL bNewPartOfPaste ) : + sal_Bool bNewPartOfPaste ) : ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ), aEffRange( rRange ), nCount( nNewCount ), @@ -140,7 +140,7 @@ String __EXPORT ScUndoInsertCells::GetComment() const return ScGlobal::GetRscString( pPasteUndo ? STR_UNDO_PASTE : STR_UNDO_INSERTCELLS ); } -BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction ) +sal_Bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction ) { // If a paste undo action has already been added, append (detective) action there. if ( pPasteUndo ) @@ -157,7 +157,7 @@ BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction ) pPasteUndo = pWrappedAction; pWrapper->ForgetWrappedUndo(); // pWrapper is deleted by UndoManager - return TRUE; + return sal_True; } } @@ -177,7 +177,7 @@ void ScUndoInsertCells::SetChangeTrack() nEndChangeAction = 0; } -void ScUndoInsertCells::DoChange( const BOOL bUndo ) +void ScUndoInsertCells::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); SCTAB i; @@ -235,13 +235,13 @@ void ScUndoInsertCells::DoChange( const BOOL bUndo ) { SCCOL nEndCol = aWorkRange.aEnd.Col(); SCROW nEndRow = aWorkRange.aEnd.Row(); - pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE ); + pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True ); } } //? Undo fuer herausgeschobene Attribute ? - USHORT nPaint = PAINT_GRID; + sal_uInt16 nPaint = PAINT_GRID; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); switch (eCmd) { @@ -298,7 +298,7 @@ void __EXPORT ScUndoInsertCells::Undo() WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } @@ -306,7 +306,7 @@ void __EXPORT ScUndoInsertCells::Redo() { WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); if ( pPasteUndo ) @@ -325,11 +325,11 @@ void __EXPORT ScUndoInsertCells::Repeat(SfxRepeatTarget& rTarget) pPasteUndo->Repeat( rTarget ); } else - ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, sal_True ); } } -BOOL __EXPORT ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -388,7 +388,7 @@ void ScUndoDeleteCells::SetChangeTrack() nStartChangeAction = nEndChangeAction = 0; } -void ScUndoDeleteCells::DoChange( const BOOL bUndo ) +void ScUndoDeleteCells::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); SCTAB i; @@ -439,7 +439,7 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo ) for( i=0; i<nCount && bUndo; i++ ) { pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i], - IDF_ALL | IDF_NOCAPTIONS, FALSE, pDoc ); + IDF_ALL | IDF_NOCAPTIONS, sal_False, pDoc ); } ScRange aWorkRange( aEffRange ); @@ -471,12 +471,12 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo ) SCCOL nEndCol = aWorkRange.aEnd.Col(); SCROW nEndRow = aWorkRange.aEnd.Row(); - pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE ); + pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True ); } } // Zeichnen - USHORT nPaint = PAINT_GRID; + sal_uInt16 nPaint = PAINT_GRID; switch (eCmd) { case DEL_DELROWS: @@ -530,7 +530,7 @@ void __EXPORT ScUndoDeleteCells::Undo() { WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -549,7 +549,7 @@ void __EXPORT ScUndoDeleteCells::Redo() { WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference BeginRedo(); - DoChange( FALSE); + DoChange( sal_False); EndRedo(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -561,10 +561,10 @@ void __EXPORT ScUndoDeleteCells::Redo() void __EXPORT ScUndoDeleteCells::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, sal_True ); } -BOOL __EXPORT ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -576,7 +576,7 @@ BOOL __EXPORT ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const // ScUndoDeleteMulti::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 ) : ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ), @@ -604,7 +604,7 @@ void ScUndoDeleteMulti::DoChange() const { SCCOL nStartCol; SCROW nStartRow; - USHORT nPaint; + sal_uInt16 nPaint; if (bRows) { nStartCol = 0; @@ -624,7 +624,7 @@ void ScUndoDeleteMulti::DoChange() const SCCOL nEndCol = MAXCOL; SCROW nEndRow = MAXROW; pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER ); - pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE ); + pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True ); } pDocShell->PostPaint( nStartCol, nStartRow, nTab, MAXCOL, MAXROW, nTab, nPaint ); @@ -663,7 +663,7 @@ void ScUndoDeleteMulti::SetChangeTrack() aRange.aStart.SetCol( static_cast<SCCOL>(nStart) ); aRange.aEnd.SetCol( static_cast<SCCOL>(nEnd) ); } - ULONG nDummyStart; + sal_uLong nDummyStart; pChangeTrack->AppendDeleteRange( aRange, pRefUndoDoc, nDummyStart, nEndChangeAction ); } @@ -699,10 +699,10 @@ void __EXPORT ScUndoDeleteMulti::Undo() SCCOLROW nStart = *(pOneRange++); SCCOLROW nEnd = *(pOneRange++); if (bRows) - pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pDoc ); + pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,sal_False,pDoc ); else pRefUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab, - static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,FALSE,pDoc ); + static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,sal_False,pDoc ); } ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); @@ -754,10 +754,10 @@ void __EXPORT ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget) { // DeleteCells, falls einfache Selektion if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, sal_True ); } -BOOL __EXPORT ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -799,13 +799,13 @@ void ScUndoCut::SetChangeTrack() nStartChangeAction = nEndChangeAction = 0; } -void ScUndoCut::DoChange( const BOOL bUndo ) +void ScUndoCut::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; // do not undo/redo objects and note captions, they are handled via drawing undo - USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; + sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; if (bUndo) // nur bei Undo { @@ -814,7 +814,7 @@ void ScUndoCut::DoChange( const BOOL bUndo ) ScRange aCopyRange = aExtendedRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, sal_False, pDoc ); ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); if ( pChangeTrack ) pChangeTrack->Undo( nStartChangeAction, nEndChangeAction ); @@ -842,7 +842,7 @@ void ScUndoCut::DoChange( const BOOL bUndo ) void __EXPORT ScUndoCut::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } @@ -850,19 +850,19 @@ void __EXPORT ScUndoCut::Redo() { BeginRedo(); ScDocument* pDoc = pDocShell->GetDocument(); - EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo? - DoChange( FALSE ); - EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo? + EnableDrawAdjust( pDoc, sal_False ); //! include in ScBlockUndo? + DoChange( sal_False ); + EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo? EndRedo(); } void __EXPORT ScUndoCut::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, sal_True ); } -BOOL __EXPORT ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -878,10 +878,10 @@ ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell, 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, const ScUndoPasteOptions* pOptions ) : + sal_Bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) : ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ), aMarkData( rMark ), pUndoDoc( pNewUndoDoc ), @@ -930,20 +930,20 @@ void ScUndoPaste::SetChangeTrack() nStartChangeAction = nEndChangeAction = 0; } -void ScUndoPaste::DoChange( const BOOL bUndo ) +void ScUndoPaste::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); // RefUndoData for redo is created before first undo // (with DeleteUnchanged after the DoUndo call) - BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData ); + sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData ); if ( bCreateRedoData ) pRefRedoData = new ScRefUndoData( pDoc ); ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData; // fuer Undo immer alle oder keine Inhalte sichern - USHORT nUndoFlags = IDF_NONE; + sal_uInt16 nUndoFlags = IDF_NONE; if (nFlags & IDF_CONTENTS) nUndoFlags |= IDF_CONTENTS; if (nFlags & IDF_ATTRIB) @@ -952,7 +952,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) // do not undo/redo objects and note captions, they are handled via drawing undo (nUndoFlags &= ~IDF_OBJECTS) |= IDF_NOCAPTIONS; - BOOL bPaintAll = FALSE; + sal_Bool bPaintAll = sal_False; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -964,8 +964,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) { if (!pRedoDoc) { - BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW ); - BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL ); + sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW ); + sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL ); pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo ); @@ -975,11 +975,11 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) ScRange aCopyRange = aBlockRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pRedoDoc ); - bRedoFilled = TRUE; + pDoc->CopyToDocument( aCopyRange, nUndoFlags, sal_False, pRedoDoc ); + bRedoFilled = sal_True; } - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aBlockRange ); aMarkData.MarkToMulti(); @@ -994,21 +994,21 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) { aTabSelectRange.aStart.SetTab( nFirstSelected ); aTabSelectRange.aEnd.SetTab( nFirstSelected ); - pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc ); + pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, sal_False, pDoc ); for (nTab=0; nTab<nTabCount; nTab++) if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab)) { aTabSelectRange.aStart.SetTab( nTab ); aTabSelectRange.aEnd.SetTab( nTab ); - pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc ); + pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, sal_False, pDoc ); } } if (pWorkRefData) { - pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection + pWorkRefData->DoUndo( pDoc, sal_True ); // sal_True = bSetChartRangeLists for SetChartListenerCollection if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) ) - bPaintAll = TRUE; + bPaintAll = sal_True; } if ( bCreateRedoData && pRefRedoData ) @@ -1018,13 +1018,13 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) { aTabSelectRange.aStart.SetTab( nFirstSelected ); aTabSelectRange.aEnd.SetTab( nFirstSelected ); - pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc ); + pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, sal_False, pDoc ); for (nTab=0; nTab<nTabCount; nTab++) if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab)) { aTabSelectRange.aStart.SetTab( nTab ); aTabSelectRange.aEnd.SetTab( nTab ); - pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc ); + pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, sal_False, pDoc ); } } @@ -1038,8 +1038,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) SetChangeTrack(); ScRange aDrawRange( aBlockRange ); - pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.) - USHORT nPaint = PAINT_GRID; + pDoc->ExtendMerge( aDrawRange, sal_True ); // only needed for single sheet (text/rtf etc.) + sal_uInt16 nPaint = PAINT_GRID; if (bPaintAll) { aDrawRange.aStart.SetCol(0); @@ -1048,7 +1048,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) aDrawRange.aEnd.SetRow(MAXROW); nPaint |= PAINT_TOP | PAINT_LEFT; /*A*/ if (pViewShell) - pViewShell->AdjustBlockHeight(FALSE); + pViewShell->AdjustBlockHeight(sal_False); } else { @@ -1062,7 +1062,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) nPaint |= PAINT_LEFT; aDrawRange.aEnd.SetRow(MAXROW); } -/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE)) +/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(sal_False)) { aDrawRange.aStart.SetCol(0); aDrawRange.aStart.SetRow(0); @@ -1086,7 +1086,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo ) void __EXPORT ScUndoPaste::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); ShowTable( aBlockRange ); EndUndo(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -1096,9 +1096,9 @@ void __EXPORT ScUndoPaste::Redo() { BeginRedo(); ScDocument* pDoc = pDocShell->GetDocument(); - EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo? - DoChange( FALSE ); - EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo? + EnableDrawAdjust( pDoc, sal_False ); //! include in ScBlockUndo? + DoChange( sal_False ); + EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo? EndRedo(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); } @@ -1116,12 +1116,12 @@ void __EXPORT ScUndoPaste::Repeat(SfxRepeatTarget& rTarget) pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(), aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose, aPasteOptions.bAsLink, aPasteOptions.eMoveMode, IDF_NONE, - TRUE ); // allow warning dialog + sal_True ); // allow warning dialog } } } -BOOL __EXPORT ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1133,8 +1133,8 @@ BOOL __EXPORT ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const // ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell, - const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut, - ScDocument* pUndoDocument, ScRefUndoData* pRefData, BOOL bScenario ) : + const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut, + ScDocument* pUndoDocument, ScRefUndoData* pRefData, sal_Bool bScenario ) : ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFFIRST ), aSrcRange( rRange ), bCut( bNewCut ), @@ -1145,7 +1145,7 @@ ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell, aDestEnd.IncCol(aSrcRange.aEnd.Col() - aSrcRange.aStart.Col()); aDestEnd.IncTab(aSrcRange.aEnd.Tab() - aSrcRange.aStart.Tab()); - BOOL bIncludeFiltered = bCut; + sal_Bool bIncludeFiltered = bCut; if ( !bIncludeFiltered ) { // find number of non-filtered rows @@ -1193,9 +1193,9 @@ void ScUndoDragDrop::SetChangeTrack() nStartChangeAction = nEndChangeAction = 0; } -void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const +void ScUndoDragDrop::PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const { - USHORT nPaint = PAINT_GRID; + sal_uInt16 nPaint = PAINT_GRID; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); ScDocument* pDoc = pDocShell->GetDocument(); @@ -1208,7 +1208,7 @@ void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const aRange.aStart.Tab(), 0, &aVirtDev, pViewData->GetPPTX(), pViewData->GetPPTY(), pViewData->GetZoomX(), pViewData->GetZoomY(), - FALSE ) ) + sal_False ) ) { aRange.aStart.SetCol(0); aRange.aEnd.SetCol(MAXCOL); @@ -1255,16 +1255,16 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) const ScRange aPaintRange = aRange; pDoc->ExtendMerge( aPaintRange ); // before deleting - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aPaintRange ); // do not undo objects and note captions, they are handled via drawing undo - USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; + sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; pDoc->DeleteAreaTab( aRange, nUndoFlags ); - pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, FALSE, pDoc ); + pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, sal_False, pDoc ); if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) ) - pDoc->ExtendMerge( aRange, TRUE ); + pDoc->ExtendMerge( aRange, sal_True ); aPaintRange.aEnd.SetCol( Max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) ); aPaintRange.aEnd.SetRow( Max( aPaintRange.aEnd.Row(), aRange.aEnd.Row() ) ); @@ -1290,10 +1290,10 @@ void __EXPORT ScUndoDragDrop::Redo() ScDocument* pDoc = pDocShell->GetDocument(); ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); - EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo? + EnableDrawAdjust( pDoc, sal_False ); //! include in ScBlockUndo? // do not undo/redo objects and note captions, they are handled via drawing undo - USHORT nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; + sal_uInt16 nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS; /* TODO: Redoing note captions is quite tricky due to the fact that a helper clip document is used. While (re-)pasting the contents to the @@ -1311,7 +1311,7 @@ void __EXPORT ScUndoDragDrop::Redo() SCTAB nTab; ScMarkData aSourceMark; for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++) - aSourceMark.SelectTable( nTab, TRUE ); + aSourceMark.SelectTable( nTab, sal_True ); // do not clone objects and note captions into clipdoc (see above) ScClipParam aClipParam(aSrcRange, bCut); @@ -1321,7 +1321,7 @@ void __EXPORT ScUndoDragDrop::Redo() { ScRange aSrcPaintRange = aSrcRange; pDoc->ExtendMerge( aSrcPaintRange ); // before deleting - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aSrcPaintRange ); pDoc->DeleteAreaTab( aSrcRange, nRedoFlags ); PaintArea( aSrcPaintRange, nExtFlags ); @@ -1329,11 +1329,11 @@ void __EXPORT ScUndoDragDrop::Redo() ScMarkData aDestMark; for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++) - aDestMark.SelectTable( nTab, TRUE ); + aDestMark.SelectTable( nTab, sal_True ); - BOOL bIncludeFiltered = bCut; + sal_Bool bIncludeFiltered = bCut; // TODO: restore old note captions instead of cloning new captions... - pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, TRUE, FALSE, bIncludeFiltered ); + pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, sal_True, sal_False, bIncludeFiltered ); if (bCut) for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++) @@ -1342,14 +1342,14 @@ void __EXPORT ScUndoDragDrop::Redo() // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - pDocShell->GetDocFunc().UnmergeCells( aDestRange, FALSE, TRUE ); + pDocShell->GetDocFunc().UnmergeCells( aDestRange, sal_False, sal_True ); for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++) { SCCOL nEndCol = aDestRange.aEnd.Col(); SCROW nEndRow = aDestRange.aEnd.Row(); pDoc->ExtendMerge( aDestRange.aStart.Col(), aDestRange.aStart.Row(), - nEndCol, nEndRow, nTab, TRUE ); + nEndCol, nEndRow, nTab, sal_True ); PaintArea( ScRange( aDestRange.aStart.Col(), aDestRange.aStart.Row(), nTab, nEndCol, nEndRow, nTab ), 0 ); } @@ -1360,7 +1360,7 @@ void __EXPORT ScUndoDragDrop::Redo() ShowTable( aDestRange.aStart.Tab() ); RedoSdrUndoAction( pDrawUndo ); //! include in ScBlockUndo? - EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo? + EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo? EndRedo(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); @@ -1370,9 +1370,9 @@ void __EXPORT ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // geht nicht + return sal_False; // geht nicht } @@ -1406,7 +1406,7 @@ void ScUndoListNames::DoChange( ScDocument* pSrcDoc ) const ScDocument* pDoc = pDocShell->GetDocument(); pDoc->DeleteAreaTab( aBlockRange, IDF_ALL ); - pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, FALSE, pDoc ); + pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, sal_False, pDoc ); pDocShell->PostPaint( aBlockRange, PAINT_GRID ); pDocShell->PostDataChanged(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -1434,7 +1434,7 @@ void __EXPORT ScUndoListNames::Repeat(SfxRepeatTarget& rTarget) ((ScTabViewTarget&)rTarget).GetViewShell()->InsertNameList(); } -BOOL __EXPORT ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1487,10 +1487,10 @@ void __EXPORT ScUndoUseScenario::Undo() ScDocument* pDoc = pDocShell->GetDocument(); pDoc->DeleteSelection( IDF_ALL, aMarkData ); - pUndoDoc->CopyToDocument( aRange, IDF_ALL, TRUE, pDoc, &aMarkData ); + pUndoDoc->CopyToDocument( aRange, IDF_ALL, sal_True, pDoc, &aMarkData ); // Szenario-Tabellen - BOOL bFrame = FALSE; + sal_Bool bFrame = sal_False; SCTAB nTab = aRange.aStart.Tab(); SCTAB nEndTab = nTab; while ( pUndoDoc->HasTable(nEndTab+1) && pUndoDoc->IsScenario(nEndTab+1) ) @@ -1500,19 +1500,19 @@ void __EXPORT ScUndoUseScenario::Undo() // Flags immer String aComment; Color aColor; - USHORT nScenFlags; + sal_uInt16 nScenFlags; pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags ); pDoc->SetScenarioData( i, aComment, aColor, nScenFlags ); - BOOL bActive = pUndoDoc->IsActiveScenario( i ); + sal_Bool bActive = pUndoDoc->IsActiveScenario( i ); pDoc->SetActiveScenario( i, bActive ); // Bei Zurueckkopier-Szenarios auch Inhalte if ( nScenFlags & SC_SCENARIO_TWOWAY ) { pDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, IDF_ALL ); - pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,sal_False, pDoc ); } if ( nScenFlags & SC_SCENARIO_SHOWFRAME ) - bFrame = TRUE; + bFrame = sal_True; } // Wenn sichtbare Rahmen, dann alles painten @@ -1542,7 +1542,7 @@ void __EXPORT ScUndoUseScenario::Redo() pViewShell->InitOwnBlockMode(); } - pDocShell->UseScenario( nTab, aName, FALSE ); + pDocShell->UseScenario( nTab, aName, sal_False ); EndRedo(); } @@ -1556,14 +1556,14 @@ void __EXPORT ScUndoUseScenario::Repeat(SfxRepeatTarget& rTarget) } } -BOOL __EXPORT ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const { if (rTarget.ISA(ScTabViewTarget)) { ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData(); return !pViewData->GetDocument()->IsScenario( pViewData->GetTabNo() ); } - return FALSE; + return sal_False; } @@ -1597,7 +1597,7 @@ String __EXPORT ScUndoSelectionStyle::GetComment() const return ScGlobal::GetRscString( STR_UNDO_APPLYCELLSTYLE ); } -void ScUndoSelectionStyle::DoChange( const BOOL bUndo ) +void ScUndoSelectionStyle::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -1607,9 +1607,9 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo ) ScRange aWorkRange( aRange ); if ( pDoc->HasAttrib( aWorkRange, HASATTR_MERGED ) ) // zusammengefasste Zellen? - pDoc->ExtendMerge( aWorkRange, TRUE ); + pDoc->ExtendMerge( aWorkRange, sal_True ); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aWorkRange ); if (bUndo) // bei Undo alte Daten wieder reinschubsen @@ -1618,7 +1618,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo ) ScRange aCopyRange = aWorkRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData ); + pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData ); } else // bei Redo Style wieder zuweisen { @@ -1644,14 +1644,14 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo ) void __EXPORT ScUndoSelectionStyle::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } void __EXPORT ScUndoSelectionStyle::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); } @@ -1670,16 +1670,16 @@ void __EXPORT ScUndoSelectionStyle::Repeat(SfxRepeatTarget& rTarget) } ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); - rViewShell.SetStyleSheetToMarked( pStyleSheet, TRUE ); + rViewShell.SetStyleSheetToMarked( pStyleSheet, sal_True ); } } -BOOL __EXPORT ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } -USHORT __EXPORT ScUndoSelectionStyle::GetId() const +sal_uInt16 __EXPORT ScUndoSelectionStyle::GetId() const { return STR_UNDO_APPLYCELLSTYLE; } @@ -1727,7 +1727,7 @@ void __EXPORT ScUndoEnterMatrix::Undo() ScDocument* pDoc = pDocShell->GetDocument(); pDoc->DeleteAreaTab( aBlockRange, IDF_ALL & ~IDF_NOTE ); - pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); pDocShell->PostPaint( aBlockRange, PAINT_GRID ); pDocShell->PostDataChanged(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -1770,7 +1770,7 @@ void __EXPORT ScUndoEnterMatrix::Repeat(SfxRepeatTarget& rTarget) } } -BOOL __EXPORT ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1790,7 +1790,7 @@ ScRange lcl_GetMultiMarkRange( const ScMarkData& rMark ) } ScUndoIndent::ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, BOOL bIncrement ) : + ScDocument* pNewUndoDoc, sal_Bool bIncrement ) : ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ), aMarkData( rMark ), pUndoDoc( pNewUndoDoc ), @@ -1805,7 +1805,7 @@ __EXPORT ScUndoIndent::~ScUndoIndent() String __EXPORT ScUndoIndent::GetComment() const { - USHORT nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT; + sal_uInt16 nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT; return ScGlobal::GetRscString( nId ); } @@ -1818,7 +1818,7 @@ void __EXPORT ScUndoIndent::Undo() ScRange aCopyRange = aBlockRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData ); + pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData ); pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE ); EndUndo(); @@ -1841,7 +1841,7 @@ void __EXPORT ScUndoIndent::Repeat(SfxRepeatTarget& rTarget) ((ScTabViewTarget&)rTarget).GetViewShell()->ChangeIndent( bIsIncrement ); } -BOOL __EXPORT ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1879,7 +1879,7 @@ void __EXPORT ScUndoTransliterate::Undo() ScRange aCopyRange = aBlockRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pDoc, &aMarkData ); + pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pDoc, &aMarkData ); pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE ); EndUndo(); @@ -1902,7 +1902,7 @@ void __EXPORT ScUndoTransliterate::Repeat(SfxRepeatTarget& rTarget) ((ScTabViewTarget&)rTarget).GetViewShell()->TransliterateText( nTransliterationType ); } -BOOL __EXPORT ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1913,7 +1913,7 @@ BOOL __EXPORT ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const // ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, const USHORT* pW ) : + ScDocument* pNewUndoDoc, const sal_uInt16* pW ) : ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ), aMarkData( rMark ), pUndoDoc( pNewUndoDoc ), @@ -1921,11 +1921,11 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& { DBG_ASSERT( pW, "ScUndoClearItems: Which-Pointer ist 0" ); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( pW[nCount] ) ++nCount; - pWhich = new USHORT[nCount+1]; - for (USHORT i=0; i<=nCount; i++) + pWhich = new sal_uInt16[nCount+1]; + for (sal_uInt16 i=0; i<=nCount; i++) pWhich[i] = pW[i]; } @@ -1945,7 +1945,7 @@ void __EXPORT ScUndoClearItems::Undo() BeginUndo(); ScDocument* pDoc = pDocShell->GetDocument(); - pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData ); + pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData ); pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE ); EndUndo(); @@ -1968,11 +1968,11 @@ void __EXPORT ScUndoClearItems::Repeat(SfxRepeatTarget& rTarget) { ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData(); ScDocFunc aFunc(*pViewData->GetDocShell()); - aFunc.ClearItems( pViewData->GetMarkData(), pWhich, FALSE ); + aFunc.ClearItems( pViewData->GetMarkData(), pWhich, sal_False ); } } -BOOL __EXPORT ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -2007,9 +2007,9 @@ void __EXPORT ScUndoRemoveBreaks::Undo() ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, sal_False, pDoc ); if (pViewShell) - pViewShell->UpdatePageBreakData( TRUE ); + pViewShell->UpdatePageBreakData( sal_True ); pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); EndUndo(); @@ -2025,7 +2025,7 @@ void __EXPORT ScUndoRemoveBreaks::Redo() pDoc->RemoveManualBreaks(nTab); pDoc->UpdatePageBreaks(nTab); if (pViewShell) - pViewShell->UpdatePageBreakData( TRUE ); + pViewShell->UpdatePageBreakData( sal_True ); pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); EndRedo(); @@ -2040,7 +2040,7 @@ void __EXPORT ScUndoRemoveBreaks::Repeat(SfxRepeatTarget& rTarget) } } -BOOL __EXPORT ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -2077,9 +2077,9 @@ void __EXPORT ScUndoRemoveMerge::Undo() pUndoDoc->ExtendMerge( aExtended ); pDoc->DeleteAreaTab( aExtended, IDF_ATTRIB ); - pUndoDoc->CopyToDocument( aExtended, IDF_ATTRIB, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aExtended, IDF_ATTRIB, sal_False, pDoc ); - BOOL bDidPaint = FALSE; + sal_Bool bDidPaint = sal_False; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( pViewShell ) { @@ -2116,11 +2116,11 @@ void __EXPORT ScUndoRemoveMerge::Redo() 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 ); // Paint - BOOL bDidPaint = FALSE; + sal_Bool bDidPaint = sal_False; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( pViewShell ) { @@ -2139,7 +2139,7 @@ void __EXPORT ScUndoRemoveMerge::Repeat(SfxRepeatTarget& rTarget) ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveMerge(); } -BOOL __EXPORT ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -2152,8 +2152,8 @@ BOOL __EXPORT ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const ScRange lcl_TotalRange( const ScRangeList& rRanges ) { ScRange aTotal; - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *rRanges.GetObject(i); if (i==0) @@ -2207,8 +2207,8 @@ void __EXPORT ScUndoBorder::Undo() ScDocument* pDoc = pDocShell->GetDocument(); ScMarkData aMarkData; - aMarkData.MarkFromRangeList( *pRanges, FALSE ); - pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData ); + aMarkData.MarkFromRangeList( *pRanges, sal_False ); + pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData ); pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE ); EndUndo(); @@ -2219,8 +2219,8 @@ void __EXPORT ScUndoBorder::Redo() BeginRedo(); ScDocument* pDoc = pDocShell->GetDocument(); //! Funktion an docfunc aufrufen - ULONG nCount = pRanges->Count(); - ULONG i; + sal_uLong nCount = pRanges->Count(); + sal_uLong i; for (i=0; i<nCount; i++) { ScRange aRange = *pRanges->GetObject(i); @@ -2228,7 +2228,7 @@ void __EXPORT ScUndoBorder::Redo() ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); pDoc->ApplySelectionFrame( aMark, pOuter, pInner ); } @@ -2243,9 +2243,9 @@ void __EXPORT ScUndoBorder::Repeat(SfxRepeatTarget& /* rTarget */) //! spaeter (wenn die Funktion aus cellsuno nach docfunc gewandert ist) } -BOOL __EXPORT ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // s.o. + return sal_False; // s.o. } diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index bf9540ce7..281c62d9f 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -67,7 +67,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell, SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab, ScDocument* pNewUndoDoc, SCCOLROW nNewCnt, SCCOLROW* pNewRanges, ScOutlineTable* pNewUndoTab, - ScSizeMode eNewMode, USHORT nNewSizeTwips, BOOL bNewWidth ) : + ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, sal_Bool bNewWidth ) : ScSimpleUndo( pNewDocShell ), aMarkData( rMark ), nStart( nNewStart ), @@ -140,14 +140,14 @@ void __EXPORT ScUndoWidthOrHeight::Undo() { pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, - FALSE, pDoc ); + sal_False, pDoc ); pDoc->UpdatePageBreaks( nTab ); pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP ); } else // Height { - pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pDoc ); pDoc->UpdatePageBreaks( nTab ); pDocShell->PostPaint( 0, nPaintStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT ); } @@ -173,14 +173,14 @@ void __EXPORT ScUndoWidthOrHeight::Redo() ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - BOOL bPaintAll = FALSE; + sal_Bool bPaintAll = sal_False; if (eMode==SC_SIZE_OPTIMAL) { if (pViewShell) { pViewShell->SetMarkData( aMarkData ); - bPaintAll = TRUE; // paint all, because of changed selection + bPaintAll = sal_True; // paint all, because of changed selection } } @@ -192,7 +192,7 @@ void __EXPORT ScUndoWidthOrHeight::Redo() } // SetWidthOrHeight aendert aktuelle Tabelle ! - pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData ); + pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, sal_False, sal_True, &aMarkData ); // paint grid if selection was changed directly at the MarkData if (bPaintAll) @@ -204,10 +204,10 @@ void __EXPORT ScUndoWidthOrHeight::Redo() void __EXPORT ScUndoWidthOrHeight::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, sal_True ); } -BOOL __EXPORT ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 0a6325198..e2951c759 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -92,8 +92,8 @@ TYPEINIT1(ScUndoUpdateAreaLink, SfxUndoAction); ScUndoDeleteContents::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 ) // : ScSimpleUndo( pNewDocShell ), // @@ -144,7 +144,7 @@ void ScUndoDeleteContents::SetChangeTrack() //---------------------------------------------------------------------------- -void ScUndoDeleteContents::DoChange( const BOOL bUndo ) +void ScUndoDeleteContents::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -152,11 +152,11 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo ) if (pViewShell) pViewShell->SetMarkData( aMarkData ); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; if (bUndo) // nur Undo { - USHORT nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren + sal_uInt16 nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren if (nFlags & IDF_CONTENTS) // (es sind nur die richtigen ins UndoDoc kopiert worden) nUndoFlags |= IDF_CONTENTS; if (nFlags & IDF_ATTRIB) @@ -188,7 +188,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo ) aMarkData.MarkToMulti(); RedoSdrUndoAction( pDrawUndo ); // do not delete objects and note captions, they have been removed via drawing undo - USHORT nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS; + sal_uInt16 nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS; pDoc->DeleteSelection( nRedoFlags, aMarkData ); aMarkData.MarkToSimple(); @@ -212,7 +212,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo ) void __EXPORT ScUndoDeleteContents::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); // #i97876# Spreadsheet data changes are not notified @@ -231,7 +231,7 @@ void __EXPORT ScUndoDeleteContents::Undo() void __EXPORT ScUndoDeleteContents::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); // #i97876# Spreadsheet data changes are not notified @@ -250,13 +250,13 @@ void __EXPORT ScUndoDeleteContents::Redo() void __EXPORT ScUndoDeleteContents::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, sal_True ); } //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -274,8 +274,8 @@ ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell, 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 ) // : ScSimpleUndo( pNewDocShell ), // @@ -317,7 +317,7 @@ void ScUndoFillTable::SetChangeTrack() SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); ScRange aWorkRange(aRange); nStartChangeAction = 0; - ULONG nTmpAction; + sal_uLong nTmpAction; for ( SCTAB i = 0; i < nTabCount; i++ ) { if (i != nSrcTab && aMarkData.GetTableSelect(i)) @@ -338,7 +338,7 @@ void ScUndoFillTable::SetChangeTrack() //---------------------------------------------------------------------------- -void ScUndoFillTable::DoChange( const BOOL bUndo ) +void ScUndoFillTable::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -395,7 +395,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo ) void __EXPORT ScUndoFillTable::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } @@ -405,7 +405,7 @@ void __EXPORT ScUndoFillTable::Undo() void __EXPORT ScUndoFillTable::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); } @@ -421,7 +421,7 @@ void __EXPORT ScUndoFillTable::Repeat(SfxRepeatTarget& rTarget) //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -438,7 +438,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell, 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, const SvxBoxInfoItem* pNewInner ) // @@ -482,7 +482,7 @@ String __EXPORT ScUndoSelectionAttr::GetComment() const //---------------------------------------------------------------------------- -void ScUndoSelectionAttr::DoChange( const BOOL bUndo ) +void ScUndoSelectionAttr::DoChange( const sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -494,7 +494,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo ) if ( pDoc->HasAttrib( aEffRange, HASATTR_MERGED ) ) // zusammengefasste Zellen? pDoc->ExtendMerge( aEffRange ); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aEffRange ); if (bUndo) // nur bei Undo @@ -527,7 +527,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo ) void __EXPORT ScUndoSelectionAttr::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } @@ -537,7 +537,7 @@ void __EXPORT ScUndoSelectionAttr::Undo() void __EXPORT ScUndoSelectionAttr::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); } @@ -550,16 +550,16 @@ void __EXPORT ScUndoSelectionAttr::Repeat(SfxRepeatTarget& rTarget) { ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); if (pLineOuter) - rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, TRUE ); + rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, sal_True ); else - rViewShell.ApplySelectionPattern( *pApplyPattern, TRUE ); + rViewShell.ApplySelectionPattern( *pApplyPattern, sal_True ); } } //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -577,7 +577,7 @@ ScUndoAutoFill::ScUndoAutoFill( ScDocShell* pNewDocShell, ScDocument* pNewUndoDoc, const ScMarkData& rMark, FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd, double fNewStartValue, double fNewStepValue, double fNewMaxValue, - USHORT nMaxShIndex ) + sal_uInt16 nMaxShIndex ) // : ScBlockUndo( pNewDocShell, rRange, SC_UNDO_AUTOHEIGHT ), // @@ -641,12 +641,12 @@ void __EXPORT ScUndoAutoFill::Undo() aWorkRange.aStart.SetTab(nTab); aWorkRange.aEnd.SetTab(nTab); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aWorkRange ); pDoc->DeleteAreaTab( aWorkRange, IDF_AUTOFILL ); - pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, sal_False, pDoc ); - pDoc->ExtendMerge( aWorkRange, TRUE ); + pDoc->ExtendMerge( aWorkRange, sal_True ); pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags ); } } @@ -664,8 +664,8 @@ void __EXPORT ScUndoAutoFill::Undo() aName += String::CreateFromInt32(nMaxSharedIndex); aName += '_'; ScRangeName* pRangeName = pDoc->GetRangeName(); - BOOL bHasFound = FALSE; - for (USHORT i = 0; i < pRangeName->GetCount(); i++) + sal_Bool bHasFound = sal_False; + for (sal_uInt16 i = 0; i < pRangeName->GetCount(); i++) { ScRangeData* pRangeData = (*pRangeName)[i]; if (pRangeData) @@ -675,7 +675,7 @@ void __EXPORT ScUndoAutoFill::Undo() if (aRName.Search(aName) != STRING_NOTFOUND) { pRangeName->AtFree(i); - bHasFound = TRUE; + bHasFound = sal_True; } } } @@ -749,17 +749,17 @@ void __EXPORT ScUndoAutoFill::Repeat(SfxRepeatTarget& rTarget) { ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); if (eFillCmd==FILL_SIMPLE) - rViewShell.FillSimple( eFillDir, TRUE ); + rViewShell.FillSimple( eFillDir, sal_True ); else rViewShell.FillSeries( eFillDir, eFillCmd, eFillDateCmd, - fStartValue, fStepValue, fMaxValue, TRUE ); + fStartValue, fStepValue, fMaxValue, sal_True ); } } //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -825,7 +825,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const if (bUndo && mpUndoDoc) { pDoc->DeleteAreaTab( maRange, IDF_CONTENTS|IDF_NOCAPTIONS ); - mpUndoDoc->CopyToDocument( maRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc ); + mpUndoDoc->CopyToDocument( maRange, IDF_ALL|IDF_NOCAPTIONS, sal_False, pDoc ); } // redo -> merge contents again @@ -841,7 +841,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const else RedoSdrUndoAction( mpDrawUndo ); - BOOL bDidPaint = FALSE; + sal_Bool bDidPaint = sal_False; ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( pViewShell ) { @@ -883,15 +883,15 @@ void ScUndoMerge::Repeat(SfxRepeatTarget& rTarget) if (rTarget.ISA(ScTabViewTarget)) { ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); - BOOL bCont = FALSE; - rViewShell.MergeCells( FALSE, bCont, TRUE ); + sal_Bool bCont = sal_False; + rViewShell.MergeCells( sal_False, bCont, sal_True ); } } //---------------------------------------------------------------------------- -BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -906,7 +906,7 @@ BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoAutoFormat::ScUndoAutoFormat( ScDocShell* pNewDocShell, const ScRange& rRange, ScDocument* pNewUndoDoc, - const ScMarkData& rMark, BOOL bNewSize, USHORT nNewFormatNo ) + const ScMarkData& rMark, sal_Bool bNewSize, sal_uInt16 nNewFormatNo ) // : ScBlockUndo( pNewDocShell, rRange, bNewSize ? SC_UNDO_MANUALHEIGHT : SC_UNDO_AUTOHEIGHT ), // @@ -944,7 +944,7 @@ void __EXPORT ScUndoAutoFormat::Undo() // Attribute // pDoc->DeleteAreaTab( aBlockRange, IDF_ATTRIB ); -// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, FALSE, pDoc ); +// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_False, pDoc ); SCTAB nTabCount = pDoc->GetTableCount(); pDoc->DeleteArea( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(), @@ -953,7 +953,7 @@ void __EXPORT ScUndoAutoFormat::Undo() ScRange aCopyRange = aBlockRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pDoc, &aMarkData ); + pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_False, pDoc, &aMarkData ); // Zellhoehen und -breiten (IDF_NONE) if (bSize) @@ -966,9 +966,9 @@ void __EXPORT ScUndoAutoFormat::Undo() SCTAB nEndZ = aBlockRange.aEnd.Tab(); pUndoDoc->CopyToDocument( nStartX, 0, 0, nEndX, MAXROW, nTabCount-1, - IDF_NONE, FALSE, pDoc, &aMarkData ); + IDF_NONE, sal_False, pDoc, &aMarkData ); pUndoDoc->CopyToDocument( 0, nStartY, 0, MAXCOL, nEndY, nTabCount-1, - IDF_NONE, FALSE, pDoc, &aMarkData ); + IDF_NONE, sal_False, pDoc, &aMarkData ); pDocShell->PostPaint( 0, 0, nStartZ, MAXCOL, MAXROW, nEndZ, PAINT_GRID | PAINT_LEFT | PAINT_TOP, SC_PF_LINES ); } @@ -1018,7 +1018,7 @@ void __EXPORT ScUndoAutoFormat::Redo() nPPTY = ScGlobal::nScreenPPTY; } - BOOL bFormula = FALSE; //! merken + sal_Bool bFormula = sal_False; //! merken for (SCTAB nTab=nStartZ; nTab<=nEndZ; nTab++) { @@ -1031,23 +1031,23 @@ void __EXPORT ScUndoAutoFormat::Redo() SCROW nLastRow = -1; for (SCROW nRow=nStartY; nRow<=nEndY; nRow++) { - BYTE nOld = pDoc->GetRowFlags(nRow,nTab); + sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab); bool bHidden = pDoc->RowHidden(nRow, nTab, nLastRow); if ( !bHidden && ( nOld & CR_MANUALSIZE ) ) pDoc->SetRowFlags( nRow, nTab, nOld & ~CR_MANUALSIZE ); } pDoc->SetOptimalHeight( nStartY, nEndY, nTab, 0, &aVirtDev, - nPPTX, nPPTY, aZoomX, aZoomY, FALSE ); + nPPTX, nPPTY, aZoomX, aZoomY, sal_False ); SCCOL nLastCol = -1; for (SCCOL nCol=nStartX; nCol<=nEndX; nCol++) if (!pDoc->ColHidden(nCol, nTab, nLastCol)) { - USHORT nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab, + sal_uInt16 nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab, &aVirtDev, nPPTX, nPPTY, aZoomX, aZoomY, bFormula, &aDestMark ); pDoc->SetColWidth( nCol, nTab, nThisSize ); - pDoc->ShowCol( nCol, nTab, TRUE ); + pDoc->ShowCol( nCol, nTab, sal_True ); } } @@ -1067,13 +1067,13 @@ void __EXPORT ScUndoAutoFormat::Redo() void __EXPORT ScUndoAutoFormat::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, sal_True ); } //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1174,10 +1174,10 @@ void __EXPORT ScUndoReplace::Undo() // Undo-Dokument hat keine Zeilen-/Spalten-Infos, also mit bColRowFlags = FALSE // kopieren, um Outline-Gruppen nicht kaputtzumachen. - USHORT nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS; + sal_uInt16 nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS; pUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB, - nUndoFlags, FALSE, pDoc, NULL, FALSE ); // ohne Row-Flags + nUndoFlags, sal_False, pDoc, NULL, sal_False ); // ohne Row-Flags pDocShell->PostPaintGridAll(); } else if (pSearchItem->GetPattern() && @@ -1188,12 +1188,12 @@ void __EXPORT ScUndoReplace::Undo() pSearchItem->SetReplaceString(aTempStr); pDoc->ReplaceStyle( *pSearchItem, aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), - aMarkData, TRUE); + aMarkData, sal_True); pSearchItem->SetReplaceString(pSearchItem->GetSearchString()); pSearchItem->SetSearchString(aTempStr); if (pViewShell) pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(), - SC_FOLLOW_JUMP, FALSE, FALSE ); + SC_FOLLOW_JUMP, sal_False, sal_False ); pDocShell->PostPaintGridAll(); } else if (pSearchItem->GetCellType() == SVX_SEARCHIN_NOTE) @@ -1204,7 +1204,7 @@ void __EXPORT ScUndoReplace::Undo() pNote->SetText( aCursorPos, aUndoStr ); if (pViewShell) pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(), - SC_FOLLOW_JUMP, FALSE, FALSE ); + SC_FOLLOW_JUMP, sal_False, sal_False ); } else { @@ -1215,7 +1215,7 @@ void __EXPORT ScUndoReplace::Undo() pDoc->SetString( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aUndoStr ); if (pViewShell) pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(), - SC_FOLLOW_JUMP, FALSE, FALSE ); + SC_FOLLOW_JUMP, sal_False, sal_False ); pDocShell->PostPaintGridAll(); } @@ -1238,14 +1238,14 @@ void __EXPORT ScUndoReplace::Redo() if (pViewShell) pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(), - SC_FOLLOW_JUMP, FALSE, FALSE ); + SC_FOLLOW_JUMP, sal_False, sal_False ); if (pUndoDoc) { if (pViewShell) { pViewShell->SetMarkData( aMarkData ); - pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE ); + pViewShell->SearchAndReplace( pSearchItem, sal_False, sal_True ); } } else if (pSearchItem->GetPattern() && @@ -1253,12 +1253,12 @@ void __EXPORT ScUndoReplace::Redo() { pDoc->ReplaceStyle( *pSearchItem, aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), - aMarkData, TRUE); + aMarkData, sal_True); pDocShell->PostPaintGridAll(); } else if (pViewShell) - pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE ); + pViewShell->SearchAndReplace( pSearchItem, sal_False, sal_True ); SetChangeTrack(); @@ -1271,13 +1271,13 @@ void __EXPORT ScUndoReplace::Redo() void __EXPORT ScUndoReplace::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, TRUE, FALSE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, sal_True, sal_False ); } //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1297,7 +1297,7 @@ ScUndoTabOp::ScUndoTabOp( ScDocShell* pNewDocShell, const ScRefAddress& rFormulaEnd, const ScRefAddress& rRowCell, const ScRefAddress& rColCell, - BYTE nMd ) + sal_uInt8 nMd ) // : ScSimpleUndo( pNewDocShell ), // @@ -1336,12 +1336,12 @@ void __EXPORT ScUndoTabOp::Undo() ScUndoUtil::MarkSimpleBlock( pDocShell, aRange ); - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocShell->UpdatePaintExt( nExtFlags, aRange ); ScDocument* pDoc = pDocShell->GetDocument(); pDoc->DeleteAreaTab( aRange,IDF_ALL & ~IDF_NOTE ); - pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); pDocShell->PostPaint( aRange, PAINT_GRID, nExtFlags ); pDocShell->PostDataChanged(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -1366,7 +1366,7 @@ void __EXPORT ScUndoTabOp::Redo() ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) - pViewShell->TabOp( aParam, FALSE); + pViewShell->TabOp( aParam, sal_False); EndRedo(); } @@ -1381,9 +1381,9 @@ void __EXPORT ScUndoTabOp::Repeat(SfxRepeatTarget& /* rTarget */) //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -1473,7 +1473,7 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo SCTAB nTabCount = pDoc->GetTableCount(); // Undo/Redo-doc has only selected tables - BOOL bMulti = aMarkData.IsMultiMarked(); + sal_Bool bMulti = aMarkData.IsMultiMarked(); pRefDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, nTabCount-1, IDF_CONTENTS, bMulti, pDoc, &aMarkData ); @@ -1515,13 +1515,13 @@ void ScUndoConversion::Redo() void ScUndoConversion::Repeat( SfxRepeatTarget& rTarget ) { if( rTarget.ISA( ScTabViewTarget ) ) - ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, sal_True ); } //---------------------------------------------------------------------------- -BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const { return rTarget.ISA( ScTabViewTarget ); } @@ -1536,7 +1536,7 @@ BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoRefConversion::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) : ScSimpleUndo( pNewDocShell ), aMarkData ( rMark ), pUndoDoc ( pNewUndoDoc ), @@ -1615,7 +1615,7 @@ void __EXPORT ScUndoRefConversion::Repeat(SfxRepeatTarget& rTarget) ((ScTabViewTarget&)rTarget).GetViewShell()->DoRefConversion(); } -BOOL __EXPORT ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1660,11 +1660,11 @@ void __EXPORT ScUndoRefreshLink::Undo() { BeginUndo(); - BOOL bMakeRedo = !pRedoDoc; + sal_Bool bMakeRedo = !pRedoDoc; if (bMakeRedo) pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nCount; nTab++) @@ -1674,11 +1674,11 @@ void __EXPORT ScUndoRefreshLink::Undo() if (bMakeRedo) { if (bFirst) - pRedoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); + pRedoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); else - pRedoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE ); - bFirst = FALSE; - pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pRedoDoc); + pRedoDoc->AddUndoTab( nTab, nTab, sal_True, sal_True ); + bFirst = sal_False; + pDoc->CopyToDocument(aRange, IDF_ALL, sal_False, pRedoDoc); // pRedoDoc->TransferDrawPage( pDoc, nTab, nTab ); pRedoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), @@ -1690,7 +1690,7 @@ void __EXPORT ScUndoRefreshLink::Undo() } pDoc->DeleteAreaTab( aRange,IDF_ALL ); - pUndoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aRange, IDF_ALL, sal_False, pDoc ); // pDoc->TransferDrawPage( pUndoDoc, nTab, nTab ); pDoc->SetLink( nTab, pUndoDoc->GetLinkMode(nTab), pUndoDoc->GetLinkDoc(nTab), pUndoDoc->GetLinkFlt(nTab), pUndoDoc->GetLinkOpt(nTab), @@ -1720,7 +1720,7 @@ void __EXPORT ScUndoRefreshLink::Redo() ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab); pDoc->DeleteAreaTab( aRange, IDF_ALL ); - pRedoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc ); + pRedoDoc->CopyToDocument( aRange, IDF_ALL, sal_False, pDoc ); // pDoc->TransferDrawPage( pRedoDoc, nTab, nTab ); pDoc->SetLink( nTab, pRedoDoc->GetLinkMode(nTab), @@ -1747,9 +1747,9 @@ void __EXPORT ScUndoRefreshLink::Repeat(SfxRepeatTarget& /* rTarget */) //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -1760,8 +1760,8 @@ ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDo const String& rSrc, const ScRange& rDest ) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - USHORT nCount = pLinkManager->GetLinks().Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; if (pBase->ISA(ScAreaLink)) @@ -1785,7 +1785,7 @@ ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell, const String& rDoc, const String& rFlt, const String& rOpt, const String& rArea, const ScRange& rDestRange, - ULONG nRefresh ) + sal_uLong nRefresh ) // : ScSimpleUndo ( pShell ), // @@ -1839,11 +1839,11 @@ void __EXPORT ScUndoInsertAreaLink::Redo() ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions, aAreaName, aRange.aStart, nRefreshDelay ); - pLink->SetInCreate( TRUE ); + pLink->SetInCreate( sal_True ); pLink->SetDestArea( aRange ); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName ); pLink->Update(); - pLink->SetInCreate( FALSE ); + pLink->SetInCreate( sal_False ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } @@ -1859,9 +1859,9 @@ void __EXPORT ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */) //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -1875,7 +1875,7 @@ BOOL __EXPORT ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) co ScUndoRemoveAreaLink::ScUndoRemoveAreaLink( ScDocShell* pShell, const String& rDoc, const String& rFlt, const String& rOpt, const String& rArea, const ScRange& rDestRange, - ULONG nRefresh ) + sal_uLong nRefresh ) // : ScSimpleUndo ( pShell ), // @@ -1913,11 +1913,11 @@ void __EXPORT ScUndoRemoveAreaLink::Undo() ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions, aAreaName, aRange.aStart, nRefreshDelay ); - pLink->SetInCreate( TRUE ); + pLink->SetInCreate( sal_True ); pLink->SetDestArea( aRange ); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName ); pLink->Update(); - pLink->SetInCreate( FALSE ); + pLink->SetInCreate( sal_False ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator } @@ -1949,9 +1949,9 @@ void __EXPORT ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */) //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -1964,10 +1964,10 @@ BOOL __EXPORT ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) co ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell, const String& rOldD, const String& rOldF, const String& rOldO, - const String& rOldA, const ScRange& rOldR, ULONG nOldRD, + const String& rOldA, const ScRange& rOldR, sal_uLong nOldRD, const String& rNewD, const String& rNewF, const String& rNewO, - const String& rNewA, const ScRange& rNewR, ULONG nNewRD, - ScDocument* pUndo, ScDocument* pRedo, BOOL bDoInsert ) + const String& rNewA, const ScRange& rNewR, sal_uLong nNewRD, + ScDocument* pUndo, ScDocument* pRedo, sal_Bool bDoInsert ) // : ScSimpleUndo( pShell ), // @@ -2010,7 +2010,7 @@ String __EXPORT ScUndoUpdateAreaLink::GetComment() const //---------------------------------------------------------------------------- -void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const +void ScUndoUpdateAreaLink::DoChange( const sal_Bool bUndo ) const { ScDocument* pDoc = pDocShell->GetDocument(); @@ -2024,13 +2024,13 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const { pDoc->FitBlock( aNewRange, aOldRange ); pDoc->DeleteAreaTab( aOldRange, IDF_ALL & ~IDF_NOTE ); - pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); } else { ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) ); pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE ); - pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); } } else @@ -2039,18 +2039,18 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const { pDoc->FitBlock( aOldRange, aNewRange ); pDoc->DeleteAreaTab( aNewRange, IDF_ALL & ~IDF_NOTE ); - pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); } else { ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) ); pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE ); - pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); } } ScRange aWorkRange( aNewRange.aStart, ScAddress( nEndX, nEndY, nEndZ ) ); - pDoc->ExtendMerge( aWorkRange, TRUE ); + pDoc->ExtendMerge( aWorkRange, sal_True ); // Paint @@ -2084,7 +2084,7 @@ void __EXPORT ScUndoUpdateAreaLink::Undo() pLink->SetRefreshDelay( nOldRefresh ); } - DoChange(TRUE); + DoChange(sal_True); } @@ -2103,7 +2103,7 @@ void __EXPORT ScUndoUpdateAreaLink::Redo() pLink->SetRefreshDelay( nNewRefresh ); } - DoChange(FALSE); + DoChange(sal_False); } @@ -2117,9 +2117,9 @@ void __EXPORT ScUndoUpdateAreaLink::Repeat(SfxRepeatTarget& /* rTarget */) //---------------------------------------------------------------------------- -BOOL __EXPORT ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 453bd15ee..ffea37bd7 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -77,7 +77,7 @@ TYPEINIT1(ScUndoRangeNames, ScSimpleUndo); ScUndoCursorAttr::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 ) : ScSimpleUndo( pNewDocShell ), nCol( nNewCol ), nRow( nNewRow ), @@ -102,28 +102,28 @@ String __EXPORT ScUndoCursorAttr::GetComment() const { //! eigener Text fuer automatische Attributierung - USHORT nId = STR_UNDO_CURSORATTR; // "Attribute" + sal_uInt16 nId = STR_UNDO_CURSORATTR; // "Attribute" return ScGlobal::GetRscString( nId ); } void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern ) const { - pDocShell->GetDocument()->SetPattern( nCol, nRow, nTab, *pWhichPattern, TRUE ); + pDocShell->GetDocument()->SetPattern( nCol, nRow, nTab, *pWhichPattern, sal_True ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { pViewShell->SetTabNo( nTab ); - pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE ); + pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, sal_False, sal_False ); pViewShell->AdjustBlockHeight(); } const SfxItemSet& rApplySet = pApplyPattern->GetItemSet(); - BOOL bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, TRUE ) != SFX_ITEM_DEFAULT || - rApplySet.GetItemState( ATTR_CONDITIONAL, TRUE ) != SFX_ITEM_DEFAULT ); - BOOL bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) != SFX_ITEM_DEFAULT ); + sal_Bool bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, sal_True ) != SFX_ITEM_DEFAULT || + rApplySet.GetItemState( ATTR_CONDITIONAL, sal_True ) != SFX_ITEM_DEFAULT ); + sal_Bool bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) != SFX_ITEM_DEFAULT ); - USHORT nFlags = SC_PF_TESTMERGE; + sal_uInt16 nFlags = SC_PF_TESTMERGE; if (bPaintExt) nFlags |= SC_PF_LINES; if (bPaintRows) @@ -162,7 +162,7 @@ void __EXPORT ScUndoCursorAttr::Repeat(SfxRepeatTarget& rTarget) ((ScTabViewTarget&)rTarget).GetViewShell()->ApplySelectionPattern( *pApplyPattern ); } -BOOL __EXPORT ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -176,7 +176,7 @@ BOOL __EXPORT ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, SCTAB nNewCount, SCTAB* pNewTabs, ScBaseCell** ppOldData, - BOOL* pHasForm, ULONG* pOldForm, + sal_Bool* pHasForm, sal_uLong* pOldForm, const String& rNewStr, EditTextObject* pObj ) : ScSimpleUndo( pNewDocShell ), aNewString( rNewStr ), @@ -195,7 +195,7 @@ ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell, __EXPORT ScUndoEnterData::~ScUndoEnterData() { - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) if (ppOldCells[i]) ppOldCells[i]->Delete(); delete[] ppOldCells; @@ -216,14 +216,14 @@ void ScUndoEnterData::DoChange() const { // Zeilenhoehe anpassen //! nur wenn noetig (alte oder neue EditZelle, oder Attribute) ?? - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) pDocShell->AdjustRowHeight( nRow, nRow, pTabs[i] ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { pViewShell->SetTabNo( nTab ); - pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE ); + pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, sal_False, sal_False ); } pDocShell->PostDataChanged(); @@ -236,10 +236,10 @@ void ScUndoEnterData::SetChangeTrack() { nEndChangeAction = pChangeTrack->GetActionMax() + 1; ScAddress aPos( nCol, nRow, nTab ); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { aPos.SetTab( pTabs[i] ); - ULONG nFormat = 0; + sal_uLong nFormat = 0; if ( pHasFormat && pOldFormats ) { if ( pHasFormat[i] ) @@ -259,7 +259,7 @@ void __EXPORT ScUndoEnterData::Undo() BeginUndo(); ScDocument* pDoc = pDocShell->GetDocument(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScBaseCell* pNewCell = ppOldCells[i] ? ppOldCells[i]->CloneWithoutNote( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0; pDoc->PutCell( nCol, nRow, pTabs[i], pNewCell ); @@ -273,14 +273,14 @@ void __EXPORT ScUndoEnterData::Undo() { ScPatternAttr aPattern( *pDoc->GetPattern( nCol, nRow, pTabs[i] ) ); aPattern.GetItemSet().ClearItem( ATTR_VALUE_FORMAT ); - pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, TRUE ); + pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, sal_True ); } } pDocShell->PostPaintCell( nCol, nRow, pTabs[i] ); } ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); - if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<ULONG>(nCount) ) + if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<sal_uLong>(nCount) ) pChangeTrack->Undo( nEndChangeAction - nCount + 1, nEndChangeAction ); DoChange(); @@ -291,7 +291,7 @@ void __EXPORT ScUndoEnterData::Undo() if ( pModelObj && pModelObj->HasChangesListeners() ) { ScRangeList aChangeRanges; - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) ); } @@ -304,7 +304,7 @@ void __EXPORT ScUndoEnterData::Redo() BeginRedo(); ScDocument* pDoc = pDocShell->GetDocument(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { if (pNewEditData) pDoc->PutCell( nCol, nRow, pTabs[i], new ScEditCell( pNewEditData, @@ -324,7 +324,7 @@ void __EXPORT ScUndoEnterData::Redo() if ( pModelObj && pModelObj->HasChangesListeners() ) { ScRangeList aChangeRanges; - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) ); } @@ -341,7 +341,7 @@ void __EXPORT ScUndoEnterData::Repeat(SfxRepeatTarget& rTarget) } } -BOOL __EXPORT ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -353,7 +353,7 @@ BOOL __EXPORT ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const // ScUndoEnterValue::ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - ScBaseCell* pUndoCell, double nVal, BOOL bHeight ) : + ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight ) : ScSimpleUndo( pNewDocShell ), aPos ( rNewPos ), pOldCell ( pUndoCell ), @@ -425,9 +425,9 @@ void __EXPORT ScUndoEnterValue::Repeat(SfxRepeatTarget& /* rTarget */) // gippsnich } -BOOL __EXPORT ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -437,7 +437,7 @@ BOOL __EXPORT ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const // ScUndoPutCell::ScUndoPutCell( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight ) : + ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight ) : ScSimpleUndo( pNewDocShell ), aPos ( rNewPos ), pOldCell ( pUndoCell ), @@ -514,9 +514,9 @@ void __EXPORT ScUndoPutCell::Repeat(SfxRepeatTarget& /* rTarget */) // gippsnich } -BOOL __EXPORT ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -527,7 +527,7 @@ BOOL __EXPORT ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoPageBreak::ScUndoPageBreak( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, - BOOL bNewColumn, BOOL bNewInsert ) : + sal_Bool bNewColumn, sal_Bool bNewInsert ) : ScSimpleUndo( pNewDocShell ), nCol( nNewCol ), nRow( nNewRow ), @@ -555,19 +555,19 @@ String __EXPORT ScUndoPageBreak::GetComment() const ) ); } -void ScUndoPageBreak::DoChange( BOOL bInsertP ) const +void ScUndoPageBreak::DoChange( sal_Bool bInsertP ) const { ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) { pViewShell->SetTabNo( nTab ); - pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE ); + pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, sal_False, sal_False ); if (bInsertP) - pViewShell->InsertPageBreak(bColumn, FALSE); + pViewShell->InsertPageBreak(bColumn, sal_False); else - pViewShell->DeletePageBreak(bColumn, FALSE); + pViewShell->DeletePageBreak(bColumn, sal_False); pDocShell->GetDocument()->InvalidatePageBreaks(nTab); } @@ -594,13 +594,13 @@ void __EXPORT ScUndoPageBreak::Repeat(SfxRepeatTarget& rTarget) ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); if (bInsert) - rViewShell.InsertPageBreak(bColumn, TRUE); + rViewShell.InsertPageBreak(bColumn, sal_True); else - rViewShell.DeletePageBreak(bColumn, TRUE); + rViewShell.DeletePageBreak(bColumn, sal_True); } } -BOOL __EXPORT ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -611,7 +611,7 @@ BOOL __EXPORT ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const // ScUndoPrintZoom::ScUndoPrintZoom( ScDocShell* pNewDocShell, - SCTAB nT, USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP ) : + SCTAB nT, sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP ) : ScSimpleUndo( pNewDocShell ), nTab( nT ), nOldScale( nOS ), @@ -630,10 +630,10 @@ String __EXPORT ScUndoPrintZoom::GetComment() const return ScGlobal::GetRscString( STR_UNDO_PRINTSCALE ); } -void ScUndoPrintZoom::DoChange( BOOL bUndo ) +void ScUndoPrintZoom::DoChange( sal_Bool bUndo ) { - USHORT nScale = bUndo ? nOldScale : nNewScale; - USHORT nPages = bUndo ? nOldPages : nNewPages; + sal_uInt16 nScale = bUndo ? nOldScale : nNewScale; + sal_uInt16 nPages = bUndo ? nOldPages : nNewPages; ScDocument* pDoc = pDocShell->GetDocument(); String aStyleName = pDoc->GetPageStyle( nTab ); @@ -654,14 +654,14 @@ void ScUndoPrintZoom::DoChange( BOOL bUndo ) void __EXPORT ScUndoPrintZoom::Undo() { BeginUndo(); - DoChange(TRUE); + DoChange(sal_True); EndUndo(); } void __EXPORT ScUndoPrintZoom::Redo() { BeginRedo(); - DoChange(FALSE); + DoChange(sal_False); EndRedo(); } @@ -675,7 +675,7 @@ void __EXPORT ScUndoPrintZoom::Repeat(SfxRepeatTarget& rTarget) } } -BOOL __EXPORT ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -734,7 +734,7 @@ void ScUndoThesaurus::SetChangeTrack( ScBaseCell* pOldCell ) nEndChangeAction = 0; } -void __EXPORT ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr, +void __EXPORT ScUndoThesaurus::DoChange( sal_Bool bUndo, const String& rStr, const EditTextObject* pTObj ) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -743,7 +743,7 @@ void __EXPORT ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr, if (pViewShell) { pViewShell->SetTabNo( nTab ); - pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE ); + pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, sal_False, sal_False ); } if (pTObj) @@ -781,7 +781,7 @@ void __EXPORT ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr, void __EXPORT ScUndoThesaurus::Undo() { BeginUndo(); - DoChange( TRUE, aUndoStr, pUndoTObject ); + DoChange( sal_True, aUndoStr, pUndoTObject ); ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack(); if ( pChangeTrack ) pChangeTrack->Undo( nEndChangeAction, nEndChangeAction ); @@ -791,17 +791,17 @@ void __EXPORT ScUndoThesaurus::Undo() void __EXPORT ScUndoThesaurus::Redo() { BeginRedo(); - DoChange( FALSE, aRedoStr, pRedoTObject ); + DoChange( sal_False, aRedoStr, pRedoTObject ); EndRedo(); } void __EXPORT ScUndoThesaurus::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( sal_True ); } -BOOL __EXPORT ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -866,9 +866,9 @@ void ScUndoReplaceNote::Repeat( SfxRepeatTarget& /*rTarget*/ ) { } -BOOL ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const +sal_Bool ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const { - return FALSE; + return sal_False; } String ScUndoReplaceNote::GetComment() const @@ -938,9 +938,9 @@ void ScUndoShowHideNote::Repeat( SfxRepeatTarget& /*rTarget*/ ) { } -BOOL ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const +sal_Bool ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const { - return FALSE; + return sal_False; } String ScUndoShowHideNote::GetComment() const @@ -966,7 +966,7 @@ ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell, bIsDelete = ( pOperation == NULL ); if (!bIsDelete) { - nAction = (USHORT) pOperation->GetOperation(); + nAction = (sal_uInt16) pOperation->GetOperation(); aPos = pOperation->GetPos(); } } @@ -979,7 +979,7 @@ __EXPORT ScUndoDetective::~ScUndoDetective() String __EXPORT ScUndoDetective::GetComment() const { - USHORT nId = STR_UNDO_DETDELALL; + sal_uInt16 nId = STR_UNDO_DETDELALL; if ( !bIsDelete ) switch ( (ScDetOpType) nAction ) { @@ -1013,7 +1013,7 @@ void __EXPORT ScUndoDetective::Undo() ScDetOpList* pList = pDoc->GetDetOpList(); if (pList && pList->Count()) { - USHORT nPos = pList->Count() - 1; + sal_uInt16 nPos = pList->Count() - 1; ScDetOpData* pData = (*pList)[nPos]; if ( pData->GetOperation() == (ScDetOpType) nAction && pData->GetPos() == aPos ) pList->DeleteAndDestroy( nPos, 1 ); @@ -1056,9 +1056,9 @@ void __EXPORT ScUndoDetective::Repeat(SfxRepeatTarget& /* rTarget */) // hammanich } -BOOL __EXPORT ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -1085,17 +1085,17 @@ String __EXPORT ScUndoRangeNames::GetComment() const return ScGlobal::GetRscString( STR_UNDO_RANGENAMES ); } -void ScUndoRangeNames::DoChange( BOOL bUndo ) +void ScUndoRangeNames::DoChange( sal_Bool bUndo ) { ScDocument* pDoc = pDocShell->GetDocument(); - pDoc->CompileNameFormula( TRUE ); // CreateFormulaString + pDoc->CompileNameFormula( sal_True ); // CreateFormulaString if ( bUndo ) pDoc->SetRangeName( new ScRangeName( *pOldRanges ) ); else pDoc->SetRangeName( new ScRangeName( *pNewRanges ) ); - pDoc->CompileNameFormula( FALSE ); // CompileFormulaString + pDoc->CompileNameFormula( sal_False ); // CompileFormulaString SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } @@ -1103,14 +1103,14 @@ void ScUndoRangeNames::DoChange( BOOL bUndo ) void __EXPORT ScUndoRangeNames::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } void __EXPORT ScUndoRangeNames::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); } @@ -1119,9 +1119,9 @@ void __EXPORT ScUndoRangeNames::Repeat(SfxRepeatTarget& /* rTarget */) // hammanich } -BOOL __EXPORT ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index d42dc6486..3625c941c 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -82,8 +82,8 @@ TYPEINIT1(ScUndoChartData, ScSimpleUndo); ScUndoDoOutline::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 ) : ScSimpleUndo( pNewDocShell ), nStart( nNewStart ), nEnd( nNewEnd ), @@ -124,17 +124,17 @@ void __EXPORT ScUndoDoOutline::Undo() // inverse Funktion ausfuehren if (bShow) - pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE, FALSE ); + pViewShell->HideOutline( bColumns, nLevel, nEntry, sal_False, sal_False ); else - pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE, FALSE ); + pViewShell->ShowOutline( bColumns, nLevel, nEntry, sal_False, sal_False ); // Original Spalten-/Zeilenstatus if (bColumns) pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc); + static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pDoc); else - pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pDoc ); pViewShell->UpdateScrollBars(); @@ -156,9 +156,9 @@ void __EXPORT ScUndoDoOutline::Redo() pViewShell->SetTabNo( nTab ); if (bShow) - pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE ); + pViewShell->ShowOutline( bColumns, nLevel, nEntry, sal_False ); else - pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE ); + pViewShell->HideOutline( bColumns, nLevel, nEntry, sal_False ); EndRedo(); } @@ -167,9 +167,9 @@ void __EXPORT ScUndoDoOutline::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // geht nicht + return sal_False; // geht nicht } // @@ -179,7 +179,7 @@ BOOL __EXPORT ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoMakeOutline::ScUndoMakeOutline( ScDocShell* pNewDocShell, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, - ScOutlineTable* pNewUndoTab, BOOL bNewColumns, BOOL bNewMake ) : + ScOutlineTable* pNewUndoTab, sal_Bool bNewColumns, sal_Bool bNewMake ) : ScSimpleUndo( pNewDocShell ), aBlockStart( nStartX, nStartY, nStartZ ), aBlockEnd( nEndX, nEndY, nEndZ ), @@ -231,9 +231,9 @@ void __EXPORT ScUndoMakeOutline::Redo() ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd ); if (bMake) - pViewShell->MakeOutline( bColumns, FALSE ); + pViewShell->MakeOutline( bColumns, sal_False ); else - pViewShell->RemoveOutline( bColumns, FALSE ); + pViewShell->RemoveOutline( bColumns, sal_False ); pDocShell->PostPaint(0,0,aBlockStart.Tab(),MAXCOL,MAXROW,aBlockEnd.Tab(),PAINT_GRID); @@ -247,13 +247,13 @@ void __EXPORT ScUndoMakeOutline::Repeat(SfxRepeatTarget& rTarget) ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); if (bMake) - rViewShell.MakeOutline( bColumns, TRUE ); + rViewShell.MakeOutline( bColumns, sal_True ); else - rViewShell.RemoveOutline( bColumns, TRUE ); + rViewShell.RemoveOutline( bColumns, sal_True ); } } -BOOL __EXPORT ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -265,7 +265,7 @@ BOOL __EXPORT ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoOutlineLevel::ScUndoOutlineLevel( ScDocShell* pNewDocShell, SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab, ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, - BOOL bNewColumns, USHORT nNewLevel ) : + sal_Bool bNewColumns, sal_uInt16 nNewLevel ) : ScSimpleUndo( pNewDocShell ), nStart( nNewStart ), nEnd( nNewEnd ), @@ -303,9 +303,9 @@ void __EXPORT ScUndoOutlineLevel::Undo() if (bColumns) pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc); + static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, sal_False, pDoc); else - pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pDoc ); pDoc->UpdatePageBreaks( nTab ); @@ -332,7 +332,7 @@ void __EXPORT ScUndoOutlineLevel::Redo() if ( nVisTab != nTab ) pViewShell->SetTabNo( nTab ); - pViewShell->SelectLevel( bColumns, nLevel, FALSE ); + pViewShell->SelectLevel( bColumns, nLevel, sal_False ); EndRedo(); } @@ -340,10 +340,10 @@ void __EXPORT ScUndoOutlineLevel::Redo() void __EXPORT ScUndoOutlineLevel::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, sal_True ); } -BOOL __EXPORT ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -355,7 +355,7 @@ BOOL __EXPORT ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoOutlineBlock::ScUndoOutlineBlock( ScDocShell* pNewDocShell, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, - ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, BOOL bNewShow ) : + ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, sal_Bool bNewShow ) : ScSimpleUndo( pNewDocShell ), aBlockStart( nStartX, nStartY, nStartZ ), aBlockEnd( nEndX, nEndY, nEndZ ), @@ -399,7 +399,7 @@ void __EXPORT ScUndoOutlineBlock::Undo() if (!bShow) { // Groesse des ausgeblendeten Blocks - USHORT nLevel; + sal_uInt16 nLevel; pUndoTable->GetColArray()->FindTouchedLevel( nStartCol, nEndCol, nLevel ); pUndoTable->GetColArray()->ExtendBlock( nLevel, nStartCol, nEndCol ); pUndoTable->GetRowArray()->FindTouchedLevel( nStartRow, nEndRow, nLevel ); @@ -407,8 +407,8 @@ void __EXPORT ScUndoOutlineBlock::Undo() } pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab, - static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, pDoc ); - pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc ); + static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, sal_False, pDoc ); + pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pDoc ); pDoc->UpdatePageBreaks( nTab ); @@ -431,9 +431,9 @@ void __EXPORT ScUndoOutlineBlock::Redo() ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd ); if (bShow) - pViewShell->ShowMarkedOutlines( FALSE ); + pViewShell->ShowMarkedOutlines( sal_False ); else - pViewShell->HideMarkedOutlines( FALSE ); + pViewShell->HideMarkedOutlines( sal_False ); EndRedo(); } @@ -445,13 +445,13 @@ void __EXPORT ScUndoOutlineBlock::Repeat(SfxRepeatTarget& rTarget) ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell(); if (bShow) - rViewShell.ShowMarkedOutlines( TRUE ); + rViewShell.ShowMarkedOutlines( sal_True ); else - rViewShell.HideMarkedOutlines( TRUE ); + rViewShell.HideMarkedOutlines( sal_True ); } } -BOOL __EXPORT ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -502,8 +502,8 @@ void __EXPORT ScUndoRemoveAllOutlines::Undo() SCROW nStartRow = aBlockStart.Row(); SCROW nEndRow = aBlockEnd.Row(); - pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pDoc ); - pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, sal_False, pDoc ); + pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pDoc ); pDoc->UpdatePageBreaks( nTab ); @@ -531,7 +531,7 @@ void __EXPORT ScUndoRemoveAllOutlines::Redo() if ( nVisTab != nTab ) pViewShell->SetTabNo( nTab ); - pViewShell->RemoveAllOutlines( FALSE ); + pViewShell->RemoveAllOutlines( sal_False ); EndRedo(); } @@ -539,10 +539,10 @@ void __EXPORT ScUndoRemoveAllOutlines::Redo() void __EXPORT ScUndoRemoveAllOutlines::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( sal_True ); } -BOOL __EXPORT ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -598,9 +598,9 @@ void __EXPORT ScUndoAutoOutline::Undo() pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow ); pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab, - static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, + static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, sal_False, pDoc); - pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pDoc ); pViewShell->UpdateScrollBars(); } @@ -633,7 +633,7 @@ void __EXPORT ScUndoAutoOutline::Redo() ScRange aRange( aBlockStart.Col(), aBlockStart.Row(), nTab, aBlockEnd.Col(), aBlockEnd.Row(), nTab ); ScOutlineDocFunc aFunc( *pDocShell ); - aFunc.AutoOutline( aRange, FALSE, FALSE ); + aFunc.AutoOutline( aRange, sal_False, sal_False ); // auf der View markieren // Wenn's beim Aufruf eine Mehrfachselektion war, ist es jetzt der @@ -648,10 +648,10 @@ void __EXPORT ScUndoAutoOutline::Redo() void __EXPORT ScUndoAutoOutline::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( sal_True ); } -BOOL __EXPORT ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -727,9 +727,9 @@ void __EXPORT ScUndoSubTotals::Undo() pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow ); pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab, - static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, + static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, sal_False, pDoc); - pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pDoc ); pViewShell->UpdateScrollBars(); } @@ -742,9 +742,9 @@ void __EXPORT ScUndoSubTotals::Undo() pDoc->DeleteAreaTab( 0,aParam.nRow1+1, MAXCOL,aParam.nRow2, nTab, IDF_ALL ); pUndoDoc->CopyToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab, - IDF_NONE, FALSE, pDoc ); // Flags + IDF_NONE, sal_False, pDoc ); // Flags pUndoDoc->UndoToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab, - IDF_ALL, FALSE, pDoc ); + IDF_ALL, sal_False, pDoc ); ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab, aParam.nCol2,aParam.nRow2,nTab ); @@ -755,7 +755,7 @@ void __EXPORT ScUndoSubTotals::Undo() if (pUndoRange) pDoc->SetRangeName( new ScRangeName( *pUndoRange ) ); if (pUndoDB) - pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE ); + pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True ); SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo(); if ( nVisTab != nTab ) @@ -779,7 +779,7 @@ void __EXPORT ScUndoSubTotals::Redo() ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab, aParam.nCol2,aParam.nRow2,nTab ); - pViewShell->DoSubTotals( aParam, FALSE ); + pViewShell->DoSubTotals( aParam, sal_False ); EndRedo(); } @@ -788,9 +788,9 @@ void __EXPORT ScUndoSubTotals::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // geht nicht wegen Spaltennummern + return sal_False; // geht nicht wegen Spaltennummern } // @@ -799,7 +799,7 @@ BOOL __EXPORT ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScSortParam& rParam, - BOOL bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB, + sal_Bool bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB, const ScRange* pDest ) : ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab, rParam.nCol2, rParam.nRow2, nNewTab ) ), @@ -808,11 +808,11 @@ ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell, bRepeatQuery( bQuery ), pUndoDoc( pNewUndoDoc ), pUndoDB( pNewUndoDB ), - bDestArea( FALSE ) + bDestArea( sal_False ) { if ( pDest ) { - bDestArea = TRUE; + bDestArea = sal_True; aDestRange = *pDest; } } @@ -855,23 +855,23 @@ void __EXPORT ScUndoSort::Undo() // do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo) pDoc->DeleteAreaTab( nStartCol,nStartRow, nEndCol,nEndRow, nSortTab, IDF_ALL|IDF_NOCAPTIONS ); pUndoDoc->CopyToDocument( nStartCol, nStartRow, nSortTab, nEndCol, nEndRow, nSortTab, - IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc ); + IDF_ALL|IDF_NOCAPTIONS, sal_False, pDoc ); if (bDestArea) { // do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo) pDoc->DeleteAreaTab( aDestRange, IDF_ALL|IDF_NOCAPTIONS ); - pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, sal_False, pDoc ); } // Zeilenhoehen immer (wegen automatischer Anpassung) //! auf ScBlockUndo umstellen // if (bRepeatQuery) pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab, - IDF_NONE, FALSE, pDoc ); + IDF_NONE, sal_False, pDoc ); if (pUndoDB) - pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE ); + pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True ); SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo(); if ( nVisTab != nSortTab ) @@ -900,7 +900,7 @@ void __EXPORT ScUndoSort::Redo() pViewShell->MarkRange( ScRange( aSortParam.nCol1, aSortParam.nRow1, nTab, aSortParam.nCol2, aSortParam.nRow2, nTab ) ); - pViewShell->Sort( aSortParam, FALSE ); + pViewShell->Sort( aSortParam, sal_False ); // Quellbereich painten wegen Markierung if ( !aSortParam.bInplace ) @@ -914,9 +914,9 @@ void __EXPORT ScUndoSort::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // geht nicht wegen Spaltennummern + return sal_False; // geht nicht wegen Spaltennummern } // @@ -925,7 +925,7 @@ BOOL __EXPORT ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQueryParam& rParam, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB, - const ScRange* pOld, BOOL bSize, const ScRange* pAdvSrc ) : + const ScRange* pOld, sal_Bool bSize, const ScRange* pAdvSrc ) : ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab, rParam.nCol2, rParam.nRow2, nNewTab ) ), pDrawUndo( NULL ), @@ -934,18 +934,18 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery pUndoDoc( pNewUndoDoc ), // pUndoDBData( pNewData ) pUndoDB( pNewUndoDB ), - bIsAdvanced( FALSE ), - bDestArea( FALSE ), + bIsAdvanced( sal_False ), + bDestArea( sal_False ), bDoSize( bSize ) { if ( pOld ) { - bDestArea = TRUE; + bDestArea = sal_True; aOldDest = *pOld; } if ( pAdvSrc ) { - bIsAdvanced = TRUE; + bIsAdvanced = sal_True; aAdvSource = *pAdvSrc; } @@ -972,7 +972,7 @@ void __EXPORT ScUndoQuery::Undo() ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); - BOOL bCopy = !aQueryParam.bInplace; + sal_Bool bCopy = !aQueryParam.bInplace; SCCOL nDestEndCol = 0; SCROW nDestEndRow = 0; if (bCopy) @@ -981,7 +981,7 @@ void __EXPORT ScUndoQuery::Undo() nDestEndRow = aQueryParam.nDestRow + ( aQueryParam.nRow2-aQueryParam.nRow1 ); ScDBData* pData = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow, - aQueryParam.nDestTab, TRUE ); + aQueryParam.nDestTab, sal_True ); if (pData) { ScRange aNewDest; @@ -1009,22 +1009,22 @@ void __EXPORT ScUndoQuery::Undo() pUndoDoc->CopyToDocument( aQueryParam.nDestCol, aQueryParam.nDestRow, aQueryParam.nDestTab, nDestEndCol, nDestEndRow, aQueryParam.nDestTab, - IDF_ALL, FALSE, pDoc ); + IDF_ALL, sal_False, pDoc ); // Attribute werden immer mitkopiert (#49287#) // Rest von altem Bereich if ( bDestArea && !bDoSize ) { pDoc->DeleteAreaTab( aOldDest, IDF_ALL ); - pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pDoc ); + pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, sal_False, pDoc ); } } else pUndoDoc->CopyToDocument( 0, aQueryParam.nRow1, nTab, MAXCOL, aQueryParam.nRow2, nTab, - IDF_NONE, FALSE, pDoc ); + IDF_NONE, sal_False, pDoc ); if (pUndoDB) - pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE ); + pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True ); if (!bCopy) { @@ -1079,9 +1079,9 @@ void __EXPORT ScUndoQuery::Redo() pViewShell->SetTabNo( nTab ); if ( bIsAdvanced ) - pViewShell->Query( aQueryParam, &aAdvSource, FALSE ); + pViewShell->Query( aQueryParam, &aAdvSource, sal_False ); else - pViewShell->Query( aQueryParam, NULL, FALSE ); + pViewShell->Query( aQueryParam, NULL, sal_False ); EndRedo(); } @@ -1090,9 +1090,9 @@ void __EXPORT ScUndoQuery::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // geht nicht wegen Spaltennummern + return sal_False; // geht nicht wegen Spaltennummern } // @@ -1100,7 +1100,7 @@ BOOL __EXPORT ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const // ScUndoAutoFilter::ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange, - const String& rName, BOOL bSet ) : + const String& rName, sal_Bool bSet ) : ScDBFuncUndo( pNewDocShell, rRange ), aDBName( rName ), bFilterSet( bSet ) @@ -1116,11 +1116,11 @@ String ScUndoAutoFilter::GetComment() const return ScGlobal::GetRscString( STR_UNDO_QUERY ); // same as ScUndoQuery } -void ScUndoAutoFilter::DoChange( BOOL bUndo ) +void ScUndoAutoFilter::DoChange( sal_Bool bUndo ) { - BOOL bNewFilter = bUndo ? !bFilterSet : bFilterSet; + sal_Bool bNewFilter = bUndo ? !bFilterSet : bFilterSet; - USHORT nIndex; + sal_uInt16 nIndex; ScDocument* pDoc = pDocShell->GetDocument(); ScDBCollection* pColl = pDoc->GetDBCollection(); if ( pColl->SearchName( aDBName, nIndex ) ) @@ -1147,14 +1147,14 @@ void ScUndoAutoFilter::DoChange( BOOL bUndo ) void ScUndoAutoFilter::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } void ScUndoAutoFilter::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); } @@ -1162,9 +1162,9 @@ void ScUndoAutoFilter::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } // @@ -1196,11 +1196,11 @@ void __EXPORT ScUndoDBData::Undo() ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bOldAutoCalc = pDoc->GetAutoCalc(); - pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString - pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), TRUE ); - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + sal_Bool bOldAutoCalc = pDoc->GetAutoCalc(); + pDoc->SetAutoCalc( sal_False ); // unnoetige Berechnungen vermeiden + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString + pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), sal_True ); + pDoc->CompileDBFormula( sal_False ); // CompileFormulaString pDoc->SetAutoCalc( bOldAutoCalc ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); @@ -1214,11 +1214,11 @@ void __EXPORT ScUndoDBData::Redo() ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bOldAutoCalc = pDoc->GetAutoCalc(); - pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString - pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), TRUE ); - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + sal_Bool bOldAutoCalc = pDoc->GetAutoCalc(); + pDoc->SetAutoCalc( sal_False ); // unnoetige Berechnungen vermeiden + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString + pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), sal_True ); + pDoc->CompileDBFormula( sal_False ); // CompileFormulaString pDoc->SetAutoCalc( bOldAutoCalc ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); @@ -1230,9 +1230,9 @@ void __EXPORT ScUndoDBData::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // geht nicht + return sal_False; // geht nicht } // @@ -1254,7 +1254,7 @@ ScUndoImportData::ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab, pUndoDBData( pNewUndoData ), pRedoDBData( pNewRedoData ), nFormulaCols( nNewFormula ), - bRedoFilled( FALSE ) + bRedoFilled( sal_False ) { // redo doc doesn't contain imported data (but everything else) } @@ -1298,20 +1298,20 @@ void __EXPORT ScUndoImportData::Undo() // imported data is deleted later anyway, // so now delete each column after copying to save memory (#41216#) - 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 = nCol1; nCopyCol <= nCol2; nCopyCol++) { pDoc->CopyToDocument( nCopyCol,nRow1,nTab, nCopyCol,nRow2,nTab, - IDF_CONTENTS & ~IDF_NOTE, FALSE, pRedoDoc ); + IDF_CONTENTS & ~IDF_NOTE, sal_False, pRedoDoc ); pDoc->DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS & ~IDF_NOTE ); pDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 ); } pDoc->SetAutoCalc( bOldAutoCalc ); - bRedoFilled = TRUE; + bRedoFilled = sal_True; } } - BOOL bMoveCells = pUndoDBData && pRedoDBData && + sal_Bool bMoveCells = pUndoDBData && pRedoDBData && pRedoDBData->IsDoSize(); // in alt und neu gleich if (bMoveCells) { @@ -1326,7 +1326,7 @@ void __EXPORT ScUndoImportData::Undo() aOld.aEnd.SetCol( aOld.aEnd.Col() + nFormulaCols ); // FitBlock auch fuer Formeln aNew.aEnd.SetCol( aNew.aEnd.Col() + nFormulaCols ); - pDoc->FitBlock( aNew, aOld, FALSE ); // rueckwaerts + pDoc->FitBlock( aNew, aOld, sal_False ); // rueckwaerts } else pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1, @@ -1334,7 +1334,7 @@ void __EXPORT ScUndoImportData::Undo() pUndoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab, nEndCol+nFormulaCols,nEndRow,nTab, - IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); if (pCurrentData) { @@ -1381,7 +1381,7 @@ void __EXPORT ScUndoImportData::Redo() pCurrentData = ScUndoUtil::GetOldDBData( pUndoDBData, pDoc, nTab, nCol1, nRow1, nCol2, nRow2 ); } - BOOL bMoveCells = pUndoDBData && pRedoDBData && + sal_Bool bMoveCells = pUndoDBData && pRedoDBData && pRedoDBData->IsDoSize(); // in alt und neu gleich if (bMoveCells) { @@ -1398,14 +1398,14 @@ void __EXPORT ScUndoImportData::Redo() pDoc->DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(), aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE ); - pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); // incl. Formeln + pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); // incl. Formeln } else { pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1, nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE ); pRedoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab, - nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); + nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, sal_False, pDoc ); } if (pCurrentData) @@ -1448,14 +1448,14 @@ void __EXPORT ScUndoImportData::Repeat(SfxRepeatTarget& rTarget) } } -BOOL __EXPORT ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const { // Repeat nur fuer Import per DB-Bereich, dann ist pUndoDBData gesetzt if (pUndoDBData) return (rTarget.ISA(ScTabViewTarget)); else - return FALSE; // Adressbuch + return sal_False; // Adressbuch } // @@ -1477,13 +1477,13 @@ ScUndoRepeatDB::ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab, pUndoTable( pNewUndoTab ), pUndoRange( pNewUndoRange ), pUndoDB( pNewUndoDB ), - bQuerySize( FALSE ) + bQuerySize( sal_False ) { if ( pOldQ && pNewQ ) { aOldQuery = *pOldQ; aNewQuery = *pNewQ; - bQuerySize = TRUE;; + bQuerySize = sal_True;; } } @@ -1510,7 +1510,7 @@ void __EXPORT ScUndoRepeatDB::Undo() if (bQuerySize) { - pDoc->FitBlock( aNewQuery, aOldQuery, FALSE ); + pDoc->FitBlock( aNewQuery, aOldQuery, sal_False ); if ( aNewQuery.aEnd.Col() == aOldQuery.aEnd.Col() ) { @@ -1528,7 +1528,7 @@ void __EXPORT ScUndoRepeatDB::Undo() aOldForm.aEnd.SetCol( aOldQuery.aEnd.Col() + nFormulaCols ); ScRange aNewForm = aOldForm; aNewForm.aEnd.SetRow( aNewQuery.aEnd.Row() ); - pDoc->FitBlock( aNewForm, aOldForm, FALSE ); + pDoc->FitBlock( aNewForm, aOldForm, sal_False ); } } } @@ -1560,9 +1560,9 @@ void __EXPORT ScUndoRepeatDB::Undo() pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow ); pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab, - static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, + static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, sal_False, pDoc ); - pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, sal_False, pDoc ); pViewShell->UpdateScrollBars(); } @@ -1575,9 +1575,9 @@ void __EXPORT ScUndoRepeatDB::Undo() MAXCOL, aBlockEnd.Row(), nTab, IDF_ALL ); pUndoDoc->CopyToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab, - IDF_NONE, FALSE, pDoc ); // Flags + IDF_NONE, sal_False, pDoc ); // Flags pUndoDoc->UndoToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab, - IDF_ALL, FALSE, pDoc ); + IDF_ALL, sal_False, pDoc ); ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart.Col(),aBlockStart.Row(),nTab, aBlockEnd.Col(),aBlockEnd.Row(),nTab ); @@ -1585,7 +1585,7 @@ void __EXPORT ScUndoRepeatDB::Undo() if (pUndoRange) pDoc->SetRangeName( new ScRangeName( *pUndoRange ) ); if (pUndoDB) - pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE ); + pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True ); // erack! it's broadcasted // pDoc->SetDirty(); @@ -1615,7 +1615,7 @@ void __EXPORT ScUndoRepeatDB::Redo() aBlockEnd.Col(),aBlockEnd.Row(),nTab ); pViewShell->SetCursor( aCursorPos.Col(), aCursorPos.Row() ); - pViewShell->RepeatDB( FALSE ); + pViewShell->RepeatDB( sal_False ); EndRedo(); } @@ -1623,10 +1623,10 @@ void __EXPORT ScUndoRepeatDB::Redo() void __EXPORT ScUndoRepeatDB::Repeat(SfxRepeatTarget& rTarget) { if (rTarget.ISA(ScTabViewTarget)) - ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( TRUE ); + ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( sal_True ); } -BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1667,7 +1667,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2008-05 //UNUSED2008-05 String __EXPORT ScUndoPivot::GetComment() const //UNUSED2008-05 { -//UNUSED2008-05 USHORT nIndex; +//UNUSED2008-05 sal_uInt16 nIndex; //UNUSED2008-05 if ( pOldUndoDoc && pNewUndoDoc ) //UNUSED2008-05 nIndex = STR_UNDO_PIVOT_MODIFY; //UNUSED2008-05 else if ( pNewUndoDoc ) @@ -1690,7 +1690,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2008-05 aNewArea.nColEnd,aNewArea.nRowEnd, aNewArea.nTab, IDF_ALL ); //UNUSED2008-05 pNewUndoDoc->CopyToDocument( aNewArea.nColStart, aNewArea.nRowStart, aNewArea.nTab, //UNUSED2008-05 aNewArea.nColEnd, aNewArea.nRowEnd, aNewArea.nTab, -//UNUSED2008-05 IDF_ALL, FALSE, pDoc ); +//UNUSED2008-05 IDF_ALL, sal_False, pDoc ); //UNUSED2008-05 } //UNUSED2008-05 if (pOldUndoDoc) //UNUSED2008-05 { @@ -1698,7 +1698,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2008-05 aOldArea.nColEnd,aOldArea.nRowEnd, aOldArea.nTab, IDF_ALL ); //UNUSED2008-05 pOldUndoDoc->CopyToDocument( aOldArea.nColStart, aOldArea.nRowStart, aOldArea.nTab, //UNUSED2008-05 aOldArea.nColEnd, aOldArea.nRowEnd, aOldArea.nTab, -//UNUSED2008-05 IDF_ALL, FALSE, pDoc ); +//UNUSED2008-05 IDF_ALL, sal_False, pDoc ); //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 ScPivotCollection* pPivotCollection = pDoc->GetPivotCollection(); @@ -1769,7 +1769,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2008-05 pNewPivot->SetTag( aNewTag ); //UNUSED2008-05 } //UNUSED2008-05 -//UNUSED2008-05 pDocShell->PivotUpdate( pOldPivot, pNewPivot, FALSE ); +//UNUSED2008-05 pDocShell->PivotUpdate( pOldPivot, pNewPivot, sal_False ); //UNUSED2008-05 //UNUSED2008-05 EndRedo(); //UNUSED2008-05 } @@ -1782,7 +1782,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2008-05 ((ScTabViewTarget&)rTarget).GetViewShell()->DeletePivotTable(); //UNUSED2008-05 } //UNUSED2008-05 -//UNUSED2008-05 BOOL __EXPORT ScUndoPivot::CanRepeat(SfxRepeatTarget& rTarget) const +//UNUSED2008-05 sal_Bool __EXPORT ScUndoPivot::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2008-05 { //UNUSED2008-05 // Wiederholen: nur loeschen //UNUSED2008-05 @@ -1795,7 +1795,7 @@ BOOL __EXPORT ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell, ScDocument* pOldDoc, ScDocument* pNewDoc, - const ScDPObject* pOldObj, const ScDPObject* pNewObj, BOOL bMove ) : + const ScDPObject* pOldObj, const ScDPObject* pNewObj, sal_Bool bMove ) : ScSimpleUndo( pNewDocShell ), pOldUndoDoc( pOldDoc ), pNewUndoDoc( pNewDoc ), @@ -1819,7 +1819,7 @@ __EXPORT ScUndoDataPilot::~ScUndoDataPilot() String __EXPORT ScUndoDataPilot::GetComment() const { - USHORT nIndex; + sal_uInt16 nIndex; if ( pOldUndoDoc && pNewUndoDoc ) nIndex = STR_UNDO_PIVOT_MODIFY; else if ( pNewUndoDoc ) @@ -1843,13 +1843,13 @@ void __EXPORT ScUndoDataPilot::Undo() { aNewRange = pNewDPObject->GetOutRange(); pDoc->DeleteAreaTab( aNewRange, IDF_ALL ); - pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, FALSE, pDoc ); + pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, sal_False, pDoc ); } if ( pOldDPObject && pOldUndoDoc ) { aOldRange = pOldDPObject->GetOutRange(); pDoc->DeleteAreaTab( aOldRange, IDF_ALL ); - pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, FALSE, pDoc ); + pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, sal_False, pDoc ); } // update objects in collection @@ -1886,7 +1886,7 @@ void __EXPORT ScUndoDataPilot::Undo() // re-insert deleted object ScDPObject* pDestObj = new ScDPObject( *pOldDPObject ); - pDestObj->SetAlive(TRUE); + pDestObj->SetAlive(sal_True); if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) ) { DBG_ERROR("cannot insert DPObject"); @@ -1937,7 +1937,7 @@ void __EXPORT ScUndoDataPilot::Redo() } ScDBDocFunc aFunc( *pDocShell ); - aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, FALSE, FALSE, bAllowMove ); // no new undo action + aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, sal_False, sal_False, bAllowMove ); // no new undo action EndRedo(); } @@ -1947,10 +1947,10 @@ void __EXPORT ScUndoDataPilot::Repeat(SfxRepeatTarget& /* rTarget */) //! allow deletion } -BOOL __EXPORT ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const { //! allow deletion - return FALSE; + return sal_False; } @@ -1960,7 +1960,7 @@ BOOL __EXPORT ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoConsolidate::ScUndoConsolidate( ScDocShell* pNewDocShell, const ScArea& rArea, const ScConsolidateParam& rPar, ScDocument* pNewUndoDoc, - BOOL bReference, SCROW nInsCount, ScOutlineTable* pTab, + sal_Bool bReference, SCROW nInsCount, ScOutlineTable* pTab, ScDBData* pData ) : ScSimpleUndo( pNewDocShell ), aDestArea( rArea ), @@ -2005,19 +2005,19 @@ void __EXPORT ScUndoConsolidate::Undo() pDoc->SetOutlineTable( nTab, pUndoTab ); // Zeilenstatus - pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc ); + pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, sal_False, pDoc ); // Daten & Referenzen pDoc->DeleteAreaTab( 0,aDestArea.nRowStart, MAXCOL,aDestArea.nRowEnd, nTab, IDF_ALL ); pUndoDoc->UndoToDocument( 0, aDestArea.nRowStart, nTab, MAXCOL, aDestArea.nRowEnd, nTab, - IDF_ALL, FALSE, pDoc ); + IDF_ALL, sal_False, pDoc ); // Original-Bereich if (pUndoData) { pDoc->DeleteAreaTab(aOldRange, IDF_ALL); - pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc); + pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, sal_False, pDoc); } pDocShell->PostPaint( 0,aDestArea.nRowStart,nTab, MAXCOL,MAXROW,nTab, @@ -2029,13 +2029,13 @@ void __EXPORT ScUndoConsolidate::Undo() aDestArea.nColEnd,aDestArea.nRowEnd, nTab, IDF_ALL ); pUndoDoc->CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, nTab, aDestArea.nColEnd, aDestArea.nRowEnd, nTab, - IDF_ALL, FALSE, pDoc ); + IDF_ALL, sal_False, pDoc ); // Original-Bereich if (pUndoData) { pDoc->DeleteAreaTab(aOldRange, IDF_ALL); - pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc); + pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, sal_False, pDoc); } SCCOL nEndX = aDestArea.nColEnd; @@ -2057,7 +2057,7 @@ void __EXPORT ScUndoConsolidate::Undo() ScDBCollection* pColl = pDoc->GetDBCollection(); if (pColl) { - USHORT nIndex; + sal_uInt16 nIndex; if (pColl->SearchName( pUndoData->GetName(), nIndex )) { ScDBData* pDocData = (*pColl)[nIndex]; @@ -2086,7 +2086,7 @@ void __EXPORT ScUndoConsolidate::Redo() { BeginRedo(); - pDocShell->DoConsolidate( aParam, FALSE ); + pDocShell->DoConsolidate( aParam, sal_False ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) @@ -2103,9 +2103,9 @@ void __EXPORT ScUndoConsolidate::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -2121,8 +2121,8 @@ void ScUndoChartData::Init() } ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, - const ScRange& rNew, BOOL bColHdr, BOOL bRowHdr, - BOOL bAdd ) : + const ScRange& rNew, sal_Bool bColHdr, sal_Bool bRowHdr, + sal_Bool bAdd ) : ScSimpleUndo( pNewDocShell ), aChartName( rName ), bNewColHeaders( bColHdr ), @@ -2136,8 +2136,8 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, } ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName, - const ScRangeListRef& rNew, BOOL bColHdr, BOOL bRowHdr, - BOOL bAdd ) : + const ScRangeListRef& rNew, sal_Bool bColHdr, sal_Bool bRowHdr, + sal_Bool bAdd ) : ScSimpleUndo( pNewDocShell ), aChartName( rName ), aNewRangeListRef( rNew ), @@ -2162,7 +2162,7 @@ void __EXPORT ScUndoChartData::Undo() BeginUndo(); pDocShell->GetDocument()->UpdateChartArea( aChartName, aOldRangeListRef, - bOldColHeaders, bOldRowHeaders, FALSE ); + bOldColHeaders, bOldRowHeaders, sal_False ); EndUndo(); } @@ -2181,9 +2181,9 @@ void __EXPORT ScUndoChartData::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL __EXPORT ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool __EXPORT ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx index 458cabec8..e8069c676 100644 --- a/sc/source/ui/undo/undodraw.cxx +++ b/sc/source/ui/undo/undodraw.cxx @@ -203,7 +203,7 @@ String __EXPORT ScUndoDraw::GetRepeatComment(SfxRepeatTarget& rTarget) const return String(); } -USHORT __EXPORT ScUndoDraw::GetId() const +sal_uInt16 __EXPORT ScUndoDraw::GetId() const { if (pDrawUndo) return pDrawUndo->GetId(); @@ -211,26 +211,26 @@ USHORT __EXPORT ScUndoDraw::GetId() const return 0; } -BOOL __EXPORT ScUndoDraw::IsLinked() +sal_Bool __EXPORT ScUndoDraw::IsLinked() { if (pDrawUndo) return pDrawUndo->IsLinked(); else - return FALSE; + return sal_False; } -void __EXPORT ScUndoDraw::SetLinked( BOOL bIsLinked ) +void __EXPORT ScUndoDraw::SetLinked( sal_Bool bIsLinked ) { if (pDrawUndo) pDrawUndo->SetLinked(bIsLinked); } -BOOL __EXPORT ScUndoDraw::Merge( SfxUndoAction* pNextAction ) +sal_Bool __EXPORT ScUndoDraw::Merge( SfxUndoAction* pNextAction ) { if (pDrawUndo) return pDrawUndo->Merge(pNextAction); else - return FALSE; + return sal_False; } void __EXPORT ScUndoDraw::Undo() @@ -257,12 +257,12 @@ void __EXPORT ScUndoDraw::Repeat(SfxRepeatTarget& rTarget) pDrawUndo->Repeat(rTarget); } -BOOL __EXPORT ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool __EXPORT ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const { if (pDrawUndo) return pDrawUndo->CanRepeat(rTarget); else - return FALSE; + return sal_False; } diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx index 8053f472c..95186e405 100644 --- a/sc/source/ui/undo/undoolk.cxx +++ b/sc/source/ui/undo/undoolk.cxx @@ -91,7 +91,7 @@ void DeleteSdrUndoAction( SdrUndoAction* pUndoAction ) delete pUndoAction; } -void EnableDrawAdjust( ScDocument* pDoc, BOOL bEnable ) +void EnableDrawAdjust( ScDocument* pDoc, sal_Bool bEnable ) { ScDrawLayer* pLayer = pDoc->GetDrawLayer(); if (pLayer) diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx index 7f85a38ad..b9b6be613 100644 --- a/sc/source/ui/undo/undostyl.cxx +++ b/sc/source/ui/undo/undostyl.cxx @@ -118,13 +118,13 @@ ScUndoModifyStyle::~ScUndoModifyStyle() String ScUndoModifyStyle::GetComment() const { - USHORT nId = (eFamily == SFX_STYLE_FAMILY_PARA) ? + sal_uInt16 nId = (eFamily == SFX_STYLE_FAMILY_PARA) ? STR_UNDO_EDITCELLSTYLE : STR_UNDO_EDITPAGESTYLE; return ScGlobal::GetRscString( nId ); } -void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, BOOL bRemoved ) +void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, sal_Bool bRemoved ) { //! move to document or docshell @@ -147,8 +147,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName, ScDocument* pDoc = pDocSh->GetDocument(); ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool(); String aNewName = rData.GetName(); - BOOL bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style - BOOL bNew = ( rName.Len() == 0 && !bDelete ); // creating new style + sal_Bool bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style + sal_Bool bNew = ( rName.Len() == 0 && !bDelete ); // creating new style SfxStyleSheetBase* pStyle = NULL; if ( rName.Len() ) @@ -177,7 +177,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName, if ( bDelete ) { if ( eStyleFamily == SFX_STYLE_FAMILY_PARA ) - lcl_DocStyleChanged( pDoc, pStyle, TRUE ); // TRUE: remove usage of style + lcl_DocStyleChanged( pDoc, pStyle, sal_True ); // TRUE: remove usage of style else pDoc->RemovePageStyleInUse( rName ); @@ -196,11 +196,11 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName, const SfxItemSet* pNewSet = rData.GetItems(); DBG_ASSERT( pNewSet, "no ItemSet for style" ); if (pNewSet) - rStyleSet.Set( *pNewSet, FALSE ); + rStyleSet.Set( *pNewSet, sal_False ); if ( eStyleFamily == SFX_STYLE_FAMILY_PARA ) { - lcl_DocStyleChanged( pDoc, pStyle, FALSE ); // cell styles: row heights + lcl_DocStyleChanged( pDoc, pStyle, sal_False ); // cell styles: row heights } else { @@ -212,7 +212,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName, if (pNewSet) pDoc->ModifyStyleSheet( *pStyle, *pNewSet ); - pDocSh->PageStyleModified( aNewName, TRUE ); + pDocSh->PageStyleModified( aNewName, sal_True ); } } } @@ -241,9 +241,9 @@ void ScUndoModifyStyle::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // no repeat possible + return sal_False; // no repeat possible } // ----------------------------------------------------------------------- @@ -303,9 +303,9 @@ void ScUndoApplyPageStyle::Repeat(SfxRepeatTarget& /* rTarget */) //! set same page style to current tab } -BOOL ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index 595be642a..b8ebe7dcf 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -56,7 +56,7 @@ #include "drwlayer.hxx" #include "scresid.hxx" -extern BOOL bDrawIsInUndo; //! irgendwo als Member !!! +extern sal_Bool bDrawIsInUndo; //! irgendwo als Member !!! using namespace com::sun::star; using ::com::sun::star::uno::Sequence; @@ -89,7 +89,7 @@ TYPEINIT1(ScUndoTabColor, SfxUndoAction); ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell, SCTAB nTabNum, - BOOL bApp, + sal_Bool bApp, const String& rNewName) : ScSimpleUndo( pNewDocShell ), sNewName( rNewName ), @@ -132,11 +132,11 @@ void ScUndoInsertTab::Undo() ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); pViewShell->SetTabNo(nTab); - pDocShell->SetInUndo( TRUE ); //! BeginUndo - bDrawIsInUndo = TRUE; - pViewShell->DeleteTable( nTab, FALSE ); - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( FALSE ); //! EndUndo + pDocShell->SetInUndo( sal_True ); //! BeginUndo + bDrawIsInUndo = sal_True; + pViewShell->DeleteTable( nTab, sal_False ); + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_False ); //! EndUndo DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() ); @@ -144,7 +144,7 @@ void ScUndoInsertTab::Undo() if ( pChangeTrack ) pChangeTrack->Undo( nEndChangeAction, nEndChangeAction ); - // SetTabNo(...,TRUE) for all views to sync with drawing layer pages + // SetTabNo(...,sal_True) for all views to sync with drawing layer pages pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) ); } @@ -154,17 +154,17 @@ void ScUndoInsertTab::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first - pDocShell->SetInUndo( TRUE ); //! BeginRedo - bDrawIsInUndo = TRUE; + pDocShell->SetInUndo( sal_True ); //! BeginRedo + bDrawIsInUndo = sal_True; if (bAppend) - pViewShell->AppendTable( sNewName, FALSE ); + pViewShell->AppendTable( sNewName, sal_False ); else { pViewShell->SetTabNo(nTab); - pViewShell->InsertTable( sNewName, nTab, FALSE ); + pViewShell->InsertTable( sNewName, nTab, sal_False ); } - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( FALSE ); //! EndRedo + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_False ); //! EndRedo SetChangeTrack(); } @@ -176,7 +176,7 @@ void ScUndoInsertTab::Repeat(SfxRepeatTarget& rTarget) Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); } -BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -188,7 +188,7 @@ BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell, SCTAB nTabNum, - BOOL bApp,SvStrings *pNewNameList) : + sal_Bool bApp,SvStrings *pNewNameList) : ScSimpleUndo( pNewDocShell ), pDrawUndo( NULL ), nTab( nTabNum ), @@ -207,7 +207,7 @@ ScUndoInsertTables::~ScUndoInsertTables() { for(int i=0;i<pNameList->Count();i++) { - pStr=pNameList->GetObject(sal::static_int_cast<USHORT>(i)); + pStr=pNameList->GetObject(sal::static_int_cast<sal_uInt16>(i)); delete pStr; } pNameList->Remove(0,pNameList->Count()); @@ -246,8 +246,8 @@ void ScUndoInsertTables::Undo() ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); pViewShell->SetTabNo(nTab); - pDocShell->SetInUndo( TRUE ); //! BeginUndo - bDrawIsInUndo = TRUE; + pDocShell->SetInUndo( sal_True ); //! BeginUndo + bDrawIsInUndo = sal_True; SvShorts TheTabs; for(int i=0;i<pNameList->Count();i++) @@ -255,11 +255,11 @@ void ScUndoInsertTables::Undo() TheTabs.push_back( sal::static_int_cast<short>(nTab+i) ); } - pViewShell->DeleteTables( TheTabs, FALSE ); + pViewShell->DeleteTables( TheTabs, sal_False ); TheTabs.clear(); - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( FALSE ); //! EndUndo + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_False ); //! EndUndo DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() ); @@ -267,7 +267,7 @@ void ScUndoInsertTables::Undo() if ( pChangeTrack ) pChangeTrack->Undo( nStartChangeAction, nEndChangeAction ); - // SetTabNo(...,TRUE) for all views to sync with drawing layer pages + // SetTabNo(...,sal_True) for all views to sync with drawing layer pages pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) ); } @@ -277,13 +277,13 @@ void ScUndoInsertTables::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first - pDocShell->SetInUndo( TRUE ); //! BeginRedo - bDrawIsInUndo = TRUE; + pDocShell->SetInUndo( sal_True ); //! BeginRedo + bDrawIsInUndo = sal_True; pViewShell->SetTabNo(nTab); - pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),FALSE ); + pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),sal_False ); - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( FALSE ); //! EndRedo + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_False ); //! EndRedo SetChangeTrack(); } @@ -295,7 +295,7 @@ void ScUndoInsertTables::Repeat(SfxRepeatTarget& rTarget) Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); } -BOOL ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -330,14 +330,14 @@ void ScUndoDeleteTab::SetChangeTrack() ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack(); if ( pChangeTrack ) { - ULONG nTmpChangeAction; + sal_uLong nTmpChangeAction; nStartChangeAction = pChangeTrack->GetActionMax() + 1; nEndChangeAction = 0; ScRange aRange( 0, 0, 0, MAXCOL, MAXROW, 0 ); for ( size_t i = 0; i < theTabs.size(); i++ ) { - aRange.aStart.SetTab( theTabs[sal::static_int_cast<USHORT>(i)] ); - aRange.aEnd.SetTab( theTabs[sal::static_int_cast<USHORT>(i)] ); + aRange.aStart.SetTab( theTabs[sal::static_int_cast<sal_uInt16>(i)] ); + aRange.aEnd.SetTab( theTabs[sal::static_int_cast<sal_uInt16>(i)] ); pChangeTrack->AppendDeleteRange( aRange, pRefUndoDoc, nTmpChangeAction, nEndChangeAction, (short) i ); } @@ -360,43 +360,43 @@ void ScUndoDeleteTab::Undo() size_t i=0; ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bLink = FALSE; + sal_Bool bLink = sal_False; String aName; for(i=0;i<theTabs.size();i++) { - SCTAB nTab = theTabs[sal::static_int_cast<USHORT>(i)]; + SCTAB nTab = theTabs[sal::static_int_cast<sal_uInt16>(i)]; pRefUndoDoc->GetName( nTab, aName ); - bDrawIsInUndo = TRUE; - BOOL bOk = pDoc->InsertTab( nTab, aName ); - bDrawIsInUndo = FALSE; + bDrawIsInUndo = sal_True; + sal_Bool bOk = pDoc->InsertTab( nTab, aName ); + bDrawIsInUndo = sal_False; if (bOk) { // Ref-Undo passiert in EndUndo - // pUndoDoc->UndoToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pDoc ); - pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pDoc ); + // pUndoDoc->UndoToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,sal_False, pDoc ); + pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,sal_False, pDoc ); String aOldName; pRefUndoDoc->GetName( nTab, aOldName ); - pDoc->RenameTab( nTab, aOldName, FALSE ); + pDoc->RenameTab( nTab, aOldName, sal_False ); if (pRefUndoDoc->IsLinked(nTab)) { pDoc->SetLink( nTab, pRefUndoDoc->GetLinkMode(nTab), pRefUndoDoc->GetLinkDoc(nTab), pRefUndoDoc->GetLinkFlt(nTab), pRefUndoDoc->GetLinkOpt(nTab), pRefUndoDoc->GetLinkTab(nTab), pRefUndoDoc->GetLinkRefreshDelay(nTab) ); - bLink = TRUE; + bLink = sal_True; } if ( pRefUndoDoc->IsScenario(nTab) ) { - pDoc->SetScenario( nTab, TRUE ); + pDoc->SetScenario( nTab, sal_True ); String aComment; Color aColor; - USHORT nScenFlags; + sal_uInt16 nScenFlags; pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags ); pDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags ); - BOOL bActive = pRefUndoDoc->IsActiveScenario( nTab ); + sal_Bool bActive = pRefUndoDoc->IsActiveScenario( nTab ); pDoc->SetActiveScenario( nTab, bActive ); } pDoc->SetVisible( nTab, pRefUndoDoc->IsVisible( nTab ) ); @@ -423,7 +423,7 @@ void ScUndoDeleteTab::Undo() for(i=0;i<theTabs.size();i++) { - pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[sal::static_int_cast<USHORT>(i)]) ); + pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[sal::static_int_cast<sal_uInt16>(i)]) ); } SfxApplication* pSfxApp = SFX_APP(); // Navigator pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); @@ -432,10 +432,10 @@ void ScUndoDeleteTab::Undo() pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_ALL ); // incl. Extras - // nicht ShowTable wegen SetTabNo(..., TRUE): + // nicht ShowTable wegen SetTabNo(..., sal_True): ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) - pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs.front() ), TRUE ); + pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs.front() ), sal_True ); // EndUndo(); } @@ -447,15 +447,15 @@ void ScUndoDeleteTab::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first - pDocShell->SetInUndo( TRUE ); //! BeginRedo - bDrawIsInUndo = TRUE; - pViewShell->DeleteTables( theTabs, FALSE ); - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( TRUE ); //! EndRedo + pDocShell->SetInUndo( sal_True ); //! BeginRedo + bDrawIsInUndo = sal_True; + pViewShell->DeleteTables( theTabs, sal_False ); + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_True ); //! EndRedo SetChangeTrack(); - // SetTabNo(...,TRUE) for all views to sync with drawing layer pages + // SetTabNo(...,sal_True) for all views to sync with drawing layer pages pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) ); } @@ -464,11 +464,11 @@ void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget) if (rTarget.ISA(ScTabViewTarget)) { ScTabViewShell* pViewShell = ((ScTabViewTarget&)rTarget).GetViewShell(); - pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), TRUE ); + pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), sal_True ); } } -BOOL ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -531,9 +531,9 @@ void ScUndoRenameTab::Repeat(SfxRepeatTarget& /* rTarget */) // Repeat macht keinen Sinn } -BOOL ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -562,7 +562,7 @@ String ScUndoMoveTab::GetComment() const return ScGlobal::GetRscString( STR_UNDO_MOVE_TAB ); } -void ScUndoMoveTab::DoChange( BOOL bUndo ) const +void ScUndoMoveTab::DoChange( sal_Bool bUndo ) const { ScDocument* pDoc = pDocShell->GetDocument(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); @@ -578,7 +578,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const pDoc->MoveTab( nDestTab, nOldTab ); pViewShell->GetViewData()->MoveTab( nDestTab, nOldTab ); - pViewShell->SetTabNo( nOldTab, TRUE ); + pViewShell->SetTabNo( nOldTab, sal_True ); } } else @@ -593,7 +593,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const pDoc->MoveTab( nOldTab, nNewTab ); pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab ); - pViewShell->SetTabNo( nDestTab, TRUE ); + pViewShell->SetTabNo( nDestTab, sal_True ); } } @@ -606,12 +606,12 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const void ScUndoMoveTab::Undo() { - DoChange( TRUE ); + DoChange( sal_True ); } void ScUndoMoveTab::Redo() { - DoChange( FALSE ); + DoChange( sal_False ); } void ScUndoMoveTab::Repeat(SfxRepeatTarget& /* rTarget */) @@ -619,9 +619,9 @@ void ScUndoMoveTab::Repeat(SfxRepeatTarget& /* rTarget */) // No Repeat ! ? ! } -BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -657,7 +657,7 @@ void ScUndoCopyTab::DoChange() const ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) - pViewShell->SetTabNo(theOldTabs.front(),TRUE); + pViewShell->SetTabNo(theOldTabs.front(),sal_True); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator @@ -678,9 +678,9 @@ void ScUndoCopyTab::Undo() if (nDestTab > MAXTAB) // append? nDestTab = pDoc->GetTableCount() - 1; - bDrawIsInUndo = TRUE; + bDrawIsInUndo = sal_True; pDoc->DeleteTab(nDestTab); - bDrawIsInUndo = FALSE; + bDrawIsInUndo = sal_False; } // ScTablesHint broadcasts after all sheets have been deleted, @@ -712,9 +712,9 @@ void ScUndoCopyTab::Redo() if (nDestTab > MAXTAB) // append ? nDestTab = pDoc->GetTableCount() - 1; - bDrawIsInUndo = TRUE; + bDrawIsInUndo = sal_True; pDoc->CopyTab( nOldTab, nNewTab ); - bDrawIsInUndo = FALSE; + bDrawIsInUndo = sal_False; pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab ); @@ -724,15 +724,15 @@ void ScUndoCopyTab::Redo() if ( pDoc->IsScenario(nAdjSource) ) { - pDoc->SetScenario(nNewTab, TRUE ); + pDoc->SetScenario(nNewTab, sal_True ); String aComment; Color aColor; - USHORT nScenFlags; + sal_uInt16 nScenFlags; pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags ); pDoc->SetScenarioData(nNewTab, aComment, aColor, nScenFlags ); - BOOL bActive = pDoc->IsActiveScenario(nAdjSource); + sal_Bool bActive = pDoc->IsActiveScenario(nAdjSource); pDoc->SetActiveScenario(nNewTab, bActive ); - BOOL bVisible=pDoc->IsVisible(nAdjSource); + sal_Bool bVisible=pDoc->IsVisible(nAdjSource); pDoc->SetVisible(nNewTab,bVisible ); } @@ -742,7 +742,7 @@ void ScUndoCopyTab::Redo() RedoSdrUndoAction( pDrawUndo ); // after the sheets are inserted - pViewShell->SetTabNo( nDestTab, TRUE ); // after draw-undo + pViewShell->SetTabNo( nDestTab, sal_True ); // after draw-undo DoChange(); @@ -753,9 +753,9 @@ void ScUndoCopyTab::Repeat(SfxRepeatTarget& /* rTarget */) // kein Repeat ! ? ! } -BOOL ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } //--------------------------------------------------------------------------------- @@ -826,9 +826,9 @@ void ScUndoTabColor::Repeat(SfxRepeatTarget& /* rTarget */) // No Repeat } -BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -839,7 +839,7 @@ BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoMakeScenario::ScUndoMakeScenario( 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 ) : ScSimpleUndo( pNewDocShell ), nSrcTab( nSrc ), @@ -868,11 +868,11 @@ void ScUndoMakeScenario::Undo() { ScDocument* pDoc = pDocShell->GetDocument(); - pDocShell->SetInUndo( TRUE ); - bDrawIsInUndo = TRUE; + pDocShell->SetInUndo( sal_True ); + bDrawIsInUndo = sal_True; pDoc->DeleteTab( nDestTab ); - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( FALSE ); + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_False ); DoSdrUndoAction( pDrawUndo, pDoc ); @@ -881,11 +881,11 @@ void ScUndoMakeScenario::Undo() ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) - pViewShell->SetTabNo( nSrcTab, TRUE ); + pViewShell->SetTabNo( nSrcTab, sal_True ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - // SetTabNo(...,TRUE) for all views to sync with drawing layer pages + // SetTabNo(...,sal_True) for all views to sync with drawing layer pages pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) ); } @@ -897,16 +897,16 @@ void ScUndoMakeScenario::Redo() RedoSdrUndoAction( pDrawUndo ); // Draw Redo first - pDocShell->SetInUndo( TRUE ); - bDrawIsInUndo = TRUE; + pDocShell->SetInUndo( sal_True ); + bDrawIsInUndo = sal_True; - pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, FALSE ); + pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, sal_False ); - bDrawIsInUndo = FALSE; - pDocShell->SetInUndo( FALSE ); + bDrawIsInUndo = sal_False; + pDocShell->SetInUndo( sal_False ); if (pViewShell) - pViewShell->SetTabNo( nDestTab, TRUE ); + pViewShell->SetTabNo( nDestTab, sal_True ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); } @@ -919,7 +919,7 @@ void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget) } } -BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -931,7 +931,7 @@ BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const // ScUndoImportTab::ScUndoImportTab( ScDocShell* pShell, - SCTAB nNewTab, SCTAB nNewCount, BOOL bNewLink ) : + SCTAB nNewTab, SCTAB nNewCount, sal_Bool bNewLink ) : ScSimpleUndo( pShell ), nTab( nNewTab ), nCount( nNewCount ), @@ -962,11 +962,11 @@ void ScUndoImportTab::DoChange() const { if(nTab<nTabCount) { - pViewShell->SetTabNo(nTab,TRUE); + pViewShell->SetTabNo(nTab,sal_True); } else { - pViewShell->SetTabNo(nTab-1,TRUE); + pViewShell->SetTabNo(nTab-1,sal_True); } } @@ -981,32 +981,32 @@ void ScUndoImportTab::Undo() SCTAB i; ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bMakeRedo = !pRedoDoc; + sal_Bool bMakeRedo = !pRedoDoc; if (bMakeRedo) { pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); - pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, TRUE,TRUE ); + pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True ); String aOldName; for (i=0; i<nCount; i++) { SCTAB nTabPos=nTab+i; - pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pRedoDoc ); + pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,sal_False, pRedoDoc ); pDoc->GetName( nTabPos, aOldName ); - pRedoDoc->RenameTab( nTabPos, aOldName, FALSE ); + pRedoDoc->RenameTab( nTabPos, aOldName, sal_False ); if ( pDoc->IsScenario(nTabPos) ) { - pRedoDoc->SetScenario(nTabPos, TRUE ); + pRedoDoc->SetScenario(nTabPos, sal_True ); String aComment; Color aColor; - USHORT nScenFlags; + sal_uInt16 nScenFlags; pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags ); pRedoDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags ); - BOOL bActive = pDoc->IsActiveScenario(nTabPos); + sal_Bool bActive = pDoc->IsActiveScenario(nTabPos); pRedoDoc->SetActiveScenario(nTabPos, bActive ); - BOOL bVisible=pDoc->IsVisible(nTabPos); + sal_Bool bVisible=pDoc->IsVisible(nTabPos); pRedoDoc->SetVisible(nTabPos,bVisible ); } @@ -1018,10 +1018,10 @@ void ScUndoImportTab::Undo() DoSdrUndoAction( pDrawUndo, pDoc ); // before the sheets are deleted - bDrawIsInUndo = TRUE; + bDrawIsInUndo = sal_True; for (i=0; i<nCount; i++) pDoc->DeleteTab( nTab ); - bDrawIsInUndo = FALSE; + bDrawIsInUndo = sal_False; DoChange(); } @@ -1041,26 +1041,26 @@ void ScUndoImportTab::Redo() { SCTAB nTabPos=nTab+i; pRedoDoc->GetName(nTabPos,aName); - bDrawIsInUndo = TRUE; + bDrawIsInUndo = sal_True; pDoc->InsertTab(nTabPos,aName); - bDrawIsInUndo = FALSE; + bDrawIsInUndo = sal_False; } for (i=0; i<nCount; i++) // then copy into inserted sheets { SCTAB nTabPos=nTab+i; - pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pDoc ); + pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,sal_False, pDoc ); if ( pRedoDoc->IsScenario(nTabPos) ) { - pDoc->SetScenario(nTabPos, TRUE ); + pDoc->SetScenario(nTabPos, sal_True ); String aComment; Color aColor; - USHORT nScenFlags; + sal_uInt16 nScenFlags; pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags ); pDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags ); - BOOL bActive = pRedoDoc->IsActiveScenario(nTabPos); + sal_Bool bActive = pRedoDoc->IsActiveScenario(nTabPos); pDoc->SetActiveScenario(nTabPos, bActive ); - BOOL bVisible=pRedoDoc->IsVisible(nTabPos); + sal_Bool bVisible=pRedoDoc->IsVisible(nTabPos); pDoc->SetVisible(nTabPos,bVisible ); } @@ -1080,7 +1080,7 @@ void ScUndoImportTab::Repeat(SfxRepeatTarget& rTarget) Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); } -BOOL ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1099,12 +1099,12 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) : ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); pTabs = new SCTAB[nTabCount]; - pModes = new BYTE[nTabCount]; + pModes = new sal_uInt8[nTabCount]; pTabNames = new String[nTabCount]; for (SCTAB i=0; i<nTabCount; i++) { - BYTE nMode = pDoc->GetLinkMode(i); + sal_uInt8 nMode = pDoc->GetLinkMode(i); if (nMode) if (pDoc->GetLinkDoc(i) == aDocName) { @@ -1140,11 +1140,11 @@ String ScUndoRemoveLink::GetComment() const return ScGlobal::GetRscString( STR_UNDO_REMOVELINK ); } -void ScUndoRemoveLink::DoChange( BOOL bLink ) const +void ScUndoRemoveLink::DoChange( sal_Bool bLink ) const { ScDocument* pDoc = pDocShell->GetDocument(); String aEmpty; - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) if (bLink) // establish link pDoc->SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay ); else // remove link @@ -1154,12 +1154,12 @@ void ScUndoRemoveLink::DoChange( BOOL bLink ) const void ScUndoRemoveLink::Undo() { - DoChange( TRUE ); + DoChange( sal_True ); } void ScUndoRemoveLink::Redo() { - DoChange( FALSE ); + DoChange( sal_False ); } void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */) @@ -1167,9 +1167,9 @@ void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */) // gippsnich } -BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -1178,7 +1178,7 @@ BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const // Tabellen ein-/ausblenden // -ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewShow ) : +ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewShow ) : ScSimpleUndo( pShell ), nTab( nNewTab ), bShow( bNewShow ) @@ -1189,14 +1189,14 @@ ScUndoShowHideTab::~ScUndoShowHideTab() { } -void ScUndoShowHideTab::DoChange( BOOL bShowP ) const +void ScUndoShowHideTab::DoChange( sal_Bool bShowP ) const { ScDocument* pDoc = pDocShell->GetDocument(); pDoc->SetVisible( nTab, bShowP ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) - pViewShell->SetTabNo(nTab,TRUE); + pViewShell->SetTabNo(nTab,sal_True); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pDocShell->SetDocumentModified(); @@ -1220,14 +1220,14 @@ void ScUndoShowHideTab::Repeat(SfxRepeatTarget& rTarget) SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); } -BOOL ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } String ScUndoShowHideTab::GetComment() const { - USHORT nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB; + sal_uInt16 nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB; return ScGlobal::GetRscString( nId ); } @@ -1264,7 +1264,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect) if (pViewShell) { pViewShell->UpdateLayerLocks(); - pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann + pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann } pDocShell->PostPaintGridAll(); @@ -1289,14 +1289,14 @@ void ScUndoDocProtect::Repeat(SfxRepeatTarget& /* rTarget */) // gippsnich } -BOOL ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // gippsnich + return sal_False; // gippsnich } String ScUndoDocProtect::GetComment() const { - USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC; + sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC; return ScGlobal::GetRscString( nId ); } @@ -1334,7 +1334,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect) if (pViewShell) { pViewShell->UpdateLayerLocks(); - pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann + pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann } pDocShell->PostPaintGridAll(); @@ -1359,14 +1359,14 @@ void ScUndoTabProtect::Repeat(SfxRepeatTarget& /* rTarget */) // gippsnich } -BOOL ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // gippsnich + return sal_False; // gippsnich } String ScUndoTabProtect::GetComment() const { - USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB; + sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB; return ScGlobal::GetRscString( nId ); } @@ -1390,7 +1390,7 @@ ScUndoPrintRange::~ScUndoPrintRange() delete pNewRanges; } -void ScUndoPrintRange::DoChange(BOOL bUndo) +void ScUndoPrintRange::DoChange(sal_Bool bUndo) { ScDocument* pDoc = pDocShell->GetDocument(); if (bUndo) @@ -1410,14 +1410,14 @@ void ScUndoPrintRange::DoChange(BOOL bUndo) void ScUndoPrintRange::Undo() { BeginUndo(); - DoChange( TRUE ); + DoChange( sal_True ); EndUndo(); } void ScUndoPrintRange::Redo() { BeginRedo(); - DoChange( FALSE ); + DoChange( sal_False ); EndRedo(); } @@ -1426,9 +1426,9 @@ void ScUndoPrintRange::Repeat(SfxRepeatTarget& /* rTarget */) // gippsnich } -BOOL ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; // gippsnich + return sal_False; // gippsnich } String ScUndoPrintRange::GetComment() const @@ -1446,7 +1446,7 @@ String ScUndoPrintRange::GetComment() const ScUndoScenarioFlags::ScUndoScenarioFlags( ScDocShell* pNewDocShell, SCTAB nT, const String& rON, const String& rNN, const String& rOC, const String& rNC, - const Color& rOCol, const Color& rNCol, USHORT nOF, USHORT nNF ) : + const Color& rOCol, const Color& rNCol, sal_uInt16 nOF, sal_uInt16 nNF ) : ScSimpleUndo( pNewDocShell ), nTab ( nT ), aOldName ( rON ), @@ -1508,9 +1508,9 @@ void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */) // Repeat macht keinen Sinn } -BOOL ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } @@ -1545,8 +1545,8 @@ SdrObject* ScUndoRenameObject::GetObject() ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); if ( pDrawLayer ) { - USHORT nCount = pDrawLayer->GetPageCount(); - for (USHORT nTab=0; nTab<nCount; nTab++) + sal_uInt16 nCount = pDrawLayer->GetPageCount(); + for (sal_uInt16 nTab=0; nTab<nCount; nTab++) { SdrPage* pPage = pDrawLayer->GetPage(nTab); DBG_ASSERT(pPage,"Page ?"); @@ -1591,9 +1591,9 @@ void ScUndoRenameObject::Repeat(SfxRepeatTarget& /* rTarget */) { } -BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const +sal_Bool ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const { - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -1601,7 +1601,7 @@ BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const // Switch sheet between left-to-right and right-to-left // -ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL ) : +ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL ) : ScSimpleUndo( pShell ), nTab( nNewTab ), bRTL( bNewRTL ) @@ -1612,20 +1612,20 @@ ScUndoLayoutRTL::~ScUndoLayoutRTL() { } -void ScUndoLayoutRTL::DoChange( BOOL bNew ) +void ScUndoLayoutRTL::DoChange( sal_Bool bNew ) { - pDocShell->SetInUndo( TRUE ); + pDocShell->SetInUndo( sal_True ); ScDocument* pDoc = pDocShell->GetDocument(); pDoc->SetLayoutRTL( nTab, bNew ); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if (pViewShell) - pViewShell->SetTabNo(nTab,TRUE); + pViewShell->SetTabNo(nTab,sal_True); pDocShell->SetDocumentModified(); - pDocShell->SetInUndo( FALSE ); + pDocShell->SetInUndo( sal_False ); } void ScUndoLayoutRTL::Undo() @@ -1645,7 +1645,7 @@ void ScUndoLayoutRTL::Repeat(SfxRepeatTarget& rTarget) Execute( FID_TAB_RTL, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); } -BOOL ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const +sal_Bool ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const { return (rTarget.ISA(ScTabViewTarget)); } @@ -1676,11 +1676,11 @@ String ScUndoLayoutRTL::GetComment() const //UNUSED2009-05 //UNUSED2009-05 void ScUndoSetGrammar::DoChange( formula::FormulaGrammar::Grammar eGrammar ) //UNUSED2009-05 { -//UNUSED2009-05 pDocShell->SetInUndo( TRUE ); +//UNUSED2009-05 pDocShell->SetInUndo( sal_True ); //UNUSED2009-05 ScDocument* pDoc = pDocShell->GetDocument(); //UNUSED2009-05 pDoc->SetGrammar( eGrammar ); //UNUSED2009-05 pDocShell->SetDocumentModified(); -//UNUSED2009-05 pDocShell->SetInUndo( FALSE ); +//UNUSED2009-05 pDocShell->SetInUndo( sal_False ); //UNUSED2009-05 } //UNUSED2009-05 //UNUSED2009-05 void __EXPORT ScUndoSetGrammar::Undo() @@ -1703,7 +1703,7 @@ String ScUndoLayoutRTL::GetComment() const //UNUSED2009-05 #endif //UNUSED2009-05 } //UNUSED2009-05 -//UNUSED2009-05 BOOL __EXPORT ScUndoSetGrammar::CanRepeat(SfxRepeatTarget& rTarget) const +//UNUSED2009-05 sal_Bool __EXPORT ScUndoSetGrammar::CanRepeat(SfxRepeatTarget& rTarget) const //UNUSED2009-05 { //UNUSED2009-05 return (rTarget.ISA(ScTabViewTarget)); //UNUSED2009-05 } diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx index c87fd8a54..9be58c149 100644 --- a/sc/source/ui/undo/undoutil.cxx +++ b/sc/source/ui/undo/undoutil.cxx @@ -55,7 +55,7 @@ void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */, pViewShell->SetTabNo( nStartZ ); pViewShell->DoneBlockMode(); - pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, FALSE, FALSE ); + pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, sal_False, sal_False ); pViewShell->InitOwnBlockMode(); pViewShell->GetViewData()->GetMarkData(). SetMarkArea( ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ) ); @@ -89,24 +89,24 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB if (!pRet) { - BOOL bWasTemp = FALSE; + sal_Bool bWasTemp = sal_False; if ( pUndoData ) { String aName; pUndoData->GetName( aName ); if ( aName == ScGlobal::GetRscString( STR_DB_NONAME ) ) - bWasTemp = TRUE; + bWasTemp = sal_True; } DBG_ASSERT(bWasTemp, "Undo: didn't find database range"); - USHORT nIndex; + sal_uInt16 nIndex; ScDBCollection* pColl = pDoc->GetDBCollection(); if (pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nIndex )) pRet = (*pColl)[nIndex]; else { pRet = new ScDBData( ScGlobal::GetRscString( STR_DB_NONAME ), nTab, - nCol1,nRow1, nCol2,nRow2, TRUE, + nCol1,nRow1, nCol2,nRow2, sal_True, pDoc->HasColHeader( nCol1,nRow1,nCol2,nRow2,nTab ) ); pColl->Insert( pRet ); } diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx index 4bea38e7c..5ee7674d3 100644 --- a/sc/source/ui/unoobj/addruno.cxx +++ b/sc/source/ui/unoobj/addruno.cxx @@ -78,7 +78,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString ) sal_Bool bSuccess = sal_False; if ( bIsRange ) { - USHORT nResult = aRange.ParseAny( rUIString, pDoc ); + sal_uInt16 nResult = aRange.ParseAny( rUIString, pDoc ); if ( nResult & SCA_VALID ) { if ( ( nResult & SCA_TAB_3D ) == 0 ) @@ -92,7 +92,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString ) } else { - USHORT nResult = aRange.aStart.Parse( rUIString, pDoc ); + sal_uInt16 nResult = aRange.aStart.Parse( rUIString, pDoc ); if ( nResult & SCA_VALID ) { if ( ( nResult & SCA_TAB_3D ) == 0 ) @@ -256,7 +256,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString& { // generate UI representation string - include sheet only if different from ref sheet String aFormatStr; - USHORT nFlags = SCA_VALID; + sal_uInt16 nFlags = SCA_VALID; if ( aRange.aStart.Tab() != nRefSheet ) nFlags |= SCA_TAB_3D; if ( bIsRange ) diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 0a174c00f..a46d002d2 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -756,18 +756,18 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue( switch( eOrient ) { case table::CellOrientation_STANDARD: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_False ) ); break; case table::CellOrientation_TOPBOTTOM: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_False ) ); pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); break; case table::CellOrientation_BOTTOMTOP: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_False ) ); pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); break; case table::CellOrientation_STACKED: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, TRUE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_True ) ); break; default: { @@ -840,7 +840,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a { const SfxInt32Item* pRotItem = (const SfxInt32Item*)pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE ); sal_Int32 nRot = pRotItem ? pRotItem->GetValue() : 0; - BOOL bStacked = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bStacked = ((const SfxBoolItem*)pItem)->GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aVal ); } break; diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 778a64bc0..8e28af168 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -418,74 +418,74 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( ScModule* pScMod = SC_MOD(); ScAppOptions aAppOpt(pScMod->GetAppOptions()); ScInputOptions aInpOpt(pScMod->GetInputOptions()); - BOOL bSaveApp = FALSE; - BOOL bSaveInp = FALSE; + sal_Bool bSaveApp = sal_False; + sal_Bool bSaveInp = sal_False; // print options aren't loaded until needed if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP )) { aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_ENTERED )) { aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_EXPREF )) { aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_EXTFMT )) { aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_LINKUPD )) { aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MARKHDR )) { aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MOVESEL )) { aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN )) { aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_USETABCOL )) { aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS )) { aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_REPLWARN )) { aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_METRIC )) { aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR )) { aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_SCALE )) { @@ -506,12 +506,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( aAppOpt.SetZoom( nVal ); aAppOpt.SetZoomType( SVX_ZOOM_PERCENT ); } - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) { aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_ULISTS )) { @@ -523,16 +523,16 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( // mehr tut ScGlobal::SetUserList auch nicht pUserList->FreeAll(); // alle Eintraege raus - USHORT nCount = (USHORT)aSeq.getLength(); + sal_uInt16 nCount = (sal_uInt16)aSeq.getLength(); const rtl::OUString* pAry = aSeq.getConstArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { String aEntry = pAry[i]; ScUserListData* pData = new ScUserListData(aEntry); if (!pUserList->Insert(pData)) // hinten anhaengen delete pData; // sollte nicht vorkommen } - bSaveApp = TRUE; // Liste wird mit den App-Optionen gespeichert + bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert } } else if (aString.EqualsAscii( SC_UNONAME_PRALLSH )) @@ -584,7 +584,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString& else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc(); else if (aString.EqualsAscii( SC_UNONAME_SCALE )) { - INT16 nZoomVal = 0; + sal_Int16 nZoomVal = 0; switch ( aAppOpt.GetZoomType() ) { case SVX_ZOOM_PERCENT: nZoomVal = aAppOpt.GetZoom(); break; @@ -603,10 +603,10 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString& ScUserList* pUserList = ScGlobal::GetUserList(); if (pUserList) { - USHORT nCount = pUserList->GetCount(); + sal_uInt16 nCount = pUserList->GetCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { String aEntry((*pUserList)[i]->GetString()); pAry[i] = aEntry; @@ -665,13 +665,13 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds() { ScUnoGuard aGuard; const ScAppOptions& rOpt = SC_MOD()->GetAppOptions(); - USHORT nCount = rOpt.GetLRUFuncListCount(); - const USHORT* pFuncs = rOpt.GetLRUFuncList(); + sal_uInt16 nCount = rOpt.GetLRUFuncListCount(); + const sal_uInt16* pFuncs = rOpt.GetLRUFuncList(); if (pFuncs) { uno::Sequence<sal_Int32> aSeq(nCount); sal_Int32* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) pAry[i] = pFuncs[i]; return aSeq; } @@ -683,12 +683,12 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX ); - const INT32* pAry = aRecentFunctionIds.getConstArray(); + sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX ); + const sal_Int32* pAry = aRecentFunctionIds.getConstArray(); - USHORT* pFuncs = nCount ? new USHORT[nCount] : NULL; - for (USHORT i=0; i<nCount; i++) - pFuncs[i] = (USHORT)pAry[i]; //! auf gueltige Werte testen? + sal_uInt16* pFuncs = nCount ? new sal_uInt16[nCount] : NULL; + for (sal_uInt16 i=0; i<nCount; i++) + pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen? ScModule* pScMod = SC_MOD(); ScAppOptions aNewOpts(pScMod->GetAppOptions()); @@ -765,10 +765,10 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co pArray[4].Name = rtl::OUString::createFromAscii( SC_UNONAME_ARGUMENTS ); if (rDesc.ppDefArgNames && rDesc.ppDefArgDescs && rDesc.pDefArgFlags ) { - USHORT nCount = rDesc.nArgCount; + sal_uInt16 nCount = rDesc.nArgCount; if (nCount >= VAR_ARGS) nCount -= VAR_ARGS - 1; - USHORT nSeqCount = rDesc.GetSuppressedArgCount(); + sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount(); if (nSeqCount >= VAR_ARGS) nSeqCount -= VAR_ARGS - 1; @@ -776,7 +776,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co { uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount); sheet::FunctionArgument* pArgAry = aArgSeq.getArray(); - for (USHORT i=0, j=0; i<nCount; i++) + for (sal_uInt16 i=0, j=0; i<nCount; i++) { if (!rDesc.pDefArgFlags[i].bSuppress) { @@ -805,8 +805,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); if ( pDesc && pDesc->nFIndex == nId ) @@ -836,8 +836,8 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName ) const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); //! Case-insensitiv ??? @@ -862,10 +862,10 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName ) sal_Int32 SAL_CALL ScFunctionListObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = 0; + sal_uInt16 nCount = 0; const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) - nCount = (USHORT)pFuncList->GetCount(); + nCount = (sal_uInt16)pFuncList->GetCount(); return nCount; } @@ -925,10 +925,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScFunctionListObj::getElementNames() throw const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); if ( pDesc && pDesc->pFuncName ) @@ -947,16 +947,16 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName ) const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); //! Case-insensitiv ??? if ( pDesc && pDesc->pFuncName && aNameStr == *pDesc->pFuncName ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 23bde9d8b..874ad9b15 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -854,8 +854,8 @@ void lcl_CopyProperties( beans::XPropertySet& rDest, beans::XPropertySet& rSourc { uno::Sequence<beans::Property> aSeq(xInfo->getProperties()); const beans::Property* pAry = aSeq.getConstArray(); - ULONG nCount = aSeq.getLength(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aSeq.getLength(); + for (sal_uLong i=0; i<nCount; i++) { rtl::OUString aName(pAry[i].Name); rDest.setPropertyValue( aName, rSource.getPropertyValue( aName ) ); @@ -873,16 +873,16 @@ SCTAB lcl_FirstTab( const ScRangeList& rRanges ) return 0; // soll nicht sein } -BOOL lcl_WholeSheet( const ScRangeList& rRanges ) +sal_Bool lcl_WholeSheet( const ScRangeList& rRanges ) { if ( rRanges.Count() == 1 ) { ScRange* pRange = rRanges.GetObject(0); if ( pRange && pRange->aStart.Col() == 0 && pRange->aEnd.Col() == MAXCOL && pRange->aStart.Row() == 0 && pRange->aEnd.Row() == MAXROW ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -941,9 +941,9 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con { // Calc braucht Twips, im Uno-Struct sind 1/100mm - rLine.SetOutWidth( (USHORT)HMMToTwips( rStruct.OuterLineWidth ) ); - rLine.SetInWidth( (USHORT)HMMToTwips( rStruct.InnerLineWidth ) ); - rLine.SetDistance( (USHORT)HMMToTwips( rStruct.LineDistance ) ); + rLine.SetOutWidth( (sal_uInt16)HMMToTwips( rStruct.OuterLineWidth ) ); + rLine.SetInWidth( (sal_uInt16)HMMToTwips( rStruct.InnerLineWidth ) ); + rLine.SetDistance( (sal_uInt16)HMMToTwips( rStruct.LineDistance ) ); rLine.SetColor( ColorData( rStruct.Color ) ); if ( rLine.GetOutWidth() || rLine.GetInWidth() || rLine.GetDistance() ) @@ -955,7 +955,7 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const table::TableBorder& rBorder ) { SvxBorderLine aLine; - rOuter.SetDistance( (USHORT)HMMToTwips( rBorder.Distance ) ); + rOuter.SetDistance( (sal_uInt16)HMMToTwips( rBorder.Distance ) ); rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.TopLine ), BOX_LINE_TOP ); rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.BottomLine ), BOX_LINE_BOTTOM ); rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.LeftLine ), BOX_LINE_LEFT ); @@ -969,7 +969,7 @@ void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner rInner.SetValid( VALID_HORI, rBorder.IsHorizontalLineValid ); rInner.SetValid( VALID_VERT, rBorder.IsVerticalLineValid ); rInner.SetValid( VALID_DISTANCE, rBorder.IsDistanceValid ); - rInner.SetTable( TRUE ); + rInner.SetTable( sal_True ); } void ScHelperFunctions::FillBorderLine( table::BorderLine& rStruct, const SvxBorderLine* pLine ) @@ -1014,12 +1014,12 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner ) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScDocument* pUndoDoc = NULL; if (bUndo) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - ULONG nCount = rRanges.Count(); - ULONG i; + sal_uLong nCount = rRanges.Count(); + sal_uLong i; for (i=0; i<nCount; i++) { ScRange aRange(*rRanges.GetObject(i)); @@ -1031,12 +1031,12 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r pUndoDoc->InitUndo( pDoc, nTab, nTab ); else pUndoDoc->AddUndoTab( nTab, nTab ); - pDoc->CopyToDocument( aRange, IDF_ATTRIB, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aRange, IDF_ATTRIB, sal_False, pUndoDoc ); } ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); pDoc->ApplySelectionFrame( aMark, &rOuter, &rInner ); // RowHeight bei Umrandung alleine nicht noetig @@ -1057,10 +1057,10 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r //! move lcl_PutDataArray to docfunc? //! merge loop with ScFunctionAccess::callFunction -BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, +sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, const uno::Sequence< uno::Sequence<uno::Any> >& aData ) { -// BOOL bApi = TRUE; +// sal_Bool bApi = sal_True; ScDocument* pDoc = rDocShell.GetDocument(); SCTAB nTab = rRange.aStart.Tab(); @@ -1068,12 +1068,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); SCROW nEndRow = rRange.aEnd.Row(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) ) { //! error message - return FALSE; + return sal_False; } long nCols = 0; @@ -1085,7 +1085,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 ) { //! error message? - return FALSE; + return sal_False; } ScDocument* pUndoDoc = NULL; @@ -1093,12 +1093,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, sal_False, pUndoDoc ); } pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS ); - BOOL bError = FALSE; + sal_Bool bError = sal_False; SCROW nDocRow = nStartRow; for (long nRow=0; nRow<nRows; nRow++) { @@ -1138,18 +1138,18 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, pDoc->PutCell( nDocCol, nDocRow, nTab, new ScStringCell( aUStr ) ); } else - bError = TRUE; // invalid type + bError = sal_True; // invalid type ++nDocCol; } } else - bError = TRUE; // wrong size + bError = sal_True; // wrong size ++nDocRow; } - BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); + sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); if ( pUndoDoc ) { @@ -1158,7 +1158,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, rDocShell.GetUndoManager()->AddUndoAction( new ScUndoPaste( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark, - pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) ); + pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, sal_False ) ); } if (!bHeight) @@ -1169,11 +1169,11 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, return !bError; } -BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, +sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, const uno::Sequence< uno::Sequence<rtl::OUString> >& aData, const ::rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { -// BOOL bApi = TRUE; +// sal_Bool bApi = sal_True; ScDocument* pDoc = rDocShell.GetDocument(); SCTAB nTab = rRange.aStart.Tab(); @@ -1181,12 +1181,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); SCROW nEndRow = rRange.aEnd.Row(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) ) { //! error message - return FALSE; + return sal_False; } long nCols = 0; @@ -1198,7 +1198,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 ) { //! error message? - return FALSE; + return sal_False; } ScDocument* pUndoDoc = NULL; @@ -1206,14 +1206,14 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( rRange, IDF_CONTENTS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( rRange, IDF_CONTENTS, sal_False, pUndoDoc ); } pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS ); ScDocFunc aFunc( rDocShell ); // for InterpretEnglishString - BOOL bError = FALSE; + sal_Bool bError = sal_False; SCROW nDocRow = nStartRow; for (long nRow=0; nRow<nRows; nRow++) { @@ -1233,12 +1233,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, } } else - bError = TRUE; // wrong size + bError = sal_True; // wrong size ++nDocRow; } - BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); + sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); if ( pUndoDoc ) { @@ -1247,7 +1247,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, rDocShell.GetUndoManager()->AddUndoAction( new ScUndoPaste( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark, - pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) ); + pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, sal_False ) ); } if (!bHeight) @@ -1259,7 +1259,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, } // used in ScCellRangeObj::getFormulaArray and ScCellObj::GetInputString_Impl -String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, BOOL bEnglish ) +String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, sal_Bool bEnglish ) { String aVal; if ( pDoc ) @@ -1334,10 +1334,10 @@ ScCellRangesBase::ScCellRangesBase() : pNoDfltCurrentDataSet( NULL ), pMarkData( NULL ), nObjectId( 0 ), - bChartColAsHdr( FALSE ), - bChartRowAsHdr( FALSE ), - bCursorOnly( FALSE ), - bGotDataChangedHint( FALSE ), + bChartColAsHdr( sal_False ), + bChartRowAsHdr( sal_False ), + bCursorOnly( sal_False ), + bGotDataChangedHint( sal_False ), aValueListeners( 0 ) { } @@ -1352,10 +1352,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) : pNoDfltCurrentDataSet( NULL ), pMarkData( NULL ), nObjectId( 0 ), - bChartColAsHdr( FALSE ), - bChartRowAsHdr( FALSE ), - bCursorOnly( FALSE ), - bGotDataChangedHint( FALSE ), + bChartColAsHdr( sal_False ), + bChartRowAsHdr( sal_False ), + bCursorOnly( sal_False ), + bGotDataChangedHint( sal_False ), aValueListeners( 0 ) { ScRange aCellRange(rR); @@ -1381,10 +1381,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) : pMarkData( NULL ), aRanges( rR ), nObjectId( 0 ), - bChartColAsHdr( FALSE ), - bChartRowAsHdr( FALSE ), - bCursorOnly( FALSE ), - bGotDataChangedHint( FALSE ), + bChartColAsHdr( sal_False ), + bChartRowAsHdr( sal_False ), + bCursorOnly( sal_False ), + bGotDataChangedHint( sal_False ), aValueListeners( 0 ) { if (pDocShell) // Null if created with createInstance @@ -1439,7 +1439,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat() if ( !pCurrentFlat && pDocShell ) { ScDocument* pDoc = pDocShell->GetDocument(); - pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), FALSE ); + pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), sal_False ); } return pCurrentFlat; } @@ -1451,7 +1451,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsDeep() if ( !pCurrentDeep && pDocShell ) { ScDocument* pDoc = pDocShell->GetDocument(); - pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), TRUE ); + pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), sal_True ); } return pCurrentDeep; } @@ -1477,7 +1477,7 @@ const ScMarkData* ScCellRangesBase::GetMarkData() if (!pMarkData) { pMarkData = new ScMarkData(); - pMarkData->MarkFromRangeList( aRanges, FALSE ); + pMarkData->MarkFromRangeList( aRanges, sal_False ); } return pMarkData; } @@ -1514,7 +1514,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // #129050# any change of the range address is broadcast to value (modify) listeners if ( aValueListeners.Count() ) - bGotDataChangedHint = TRUE; + bGotDataChangedHint = sal_True; if ( pUndoRanges ) pDoc->AddUnoRefChange( nObjectId, *pUndoRanges ); @@ -1524,7 +1524,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { ForgetCurrentAttrs(); @@ -1536,7 +1536,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) lang::EventObject aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aValueListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ ) (*aValueListeners[n])->disposing( aEvent ); aValueListeners.DeleteAndDestroy( 0, aValueListeners.Count() ); @@ -1566,10 +1566,10 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // the EventObject holds a Ref to this object until after the listener calls ScDocument* pDoc = pDocShell->GetDocument(); - for ( USHORT n=0; n<aValueListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ ) pDoc->AddUnoListenerCall( *aValueListeners[n], aEvent ); - bGotDataChangedHint = FALSE; + bGotDataChangedHint = sal_False; } } else if ( nId == SC_HINT_CALCALL ) @@ -1578,7 +1578,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // (SFX_HINT_DATACHANGED follows separately) if ( aValueListeners.Count() ) - bGotDataChangedHint = TRUE; + bGotDataChangedHint = sal_True; } } else if ( rHint.ISA( ScUnoRefUndoHint ) ) @@ -1592,7 +1592,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) RefChanged(); if ( aValueListeners.Count() ) - bGotDataChangedHint = TRUE; // need to broadcast the undo, too + bGotDataChangedHint = sal_True; // need to broadcast the undo, too } } } @@ -1606,8 +1606,8 @@ void ScCellRangesBase::RefChanged() pValueListener->EndListeningAll(); ScDocument* pDoc = pDocShell->GetDocument(); - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) pDoc->StartListeningArea( *aRanges.GetObject(i), pValueListener ); } @@ -1665,7 +1665,7 @@ void ScCellRangesBase::SetNewRanges(const ScRangeList& rNew) RefChanged(); } -void ScCellRangesBase::SetCursorOnly( BOOL bSet ) +void ScCellRangesBase::SetCursorOnly( sal_Bool bSet ) { // set for a selection object that is created from the cursor position // without anything selected (may contain several sheets) @@ -1744,10 +1744,10 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellRangesBase::getImplementationId() // --- -void ScCellRangesBase::PaintRanges_Impl( USHORT nPart ) +void ScCellRangesBase::PaintRanges_Impl( sal_uInt16 nPart ) { - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) pDocShell->PostPaint( *aRanges.GetObject(i), nPart ); } @@ -1760,7 +1760,7 @@ double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunct ScMarkData aMark(*GetMarkData()); aMark.MarkToSimple(); if (!aMark.IsMarked()) - aMark.SetMarkNegative(TRUE); // um Dummy Position angeben zu koennen + aMark.SetMarkNegative(sal_True); // um Dummy Position angeben zu koennen ScAddress aDummy; // wenn nicht Marked, ignoriert wegen Negative double fVal; @@ -1780,12 +1780,12 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u if ( aRanges.Count() ) { // only for clearContents: EDITATTR is only used if no contents are deleted - USHORT nDelFlags = static_cast< USHORT >( nContentFlags & IDF_ALL ); + sal_uInt16 nDelFlags = static_cast< sal_uInt16 >( nContentFlags & IDF_ALL ); if ( ( nContentFlags & IDF_EDITATTR ) && ( nContentFlags & IDF_CONTENTS ) == 0 ) nDelFlags |= IDF_EDITATTR; ScDocFunc aFunc(*pDocShell); - aFunc.DeleteContents( *GetMarkData(), nDelFlags, TRUE, TRUE ); + aFunc.DeleteContents( *GetMarkData(), nDelFlags, sal_True, sal_True ); } // sonst ist nichts zu tun } @@ -1798,7 +1798,7 @@ const SfxItemPropertyMap* ScCellRangesBase::GetItemPropertyMap() } void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry, - USHORT& rItemWhich ) + sal_uInt16& rItemWhich ) { // Which-ID des betroffenen Items, auch wenn das Item die Property // nicht alleine behandeln kann @@ -1827,7 +1827,7 @@ void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry, } -beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry ) +beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry ) { beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE; if ( nItemWhich ) // item wid (from map or special case) @@ -1839,15 +1839,15 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c const ScPatternAttr* pPattern = GetCurrentAttrsFlat(); if ( pPattern ) { - SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, FALSE ); + SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, sal_False ); // // if no rotate value is set, look at orientation // //! also for a fixed value of 0 (in case orientation is ambiguous)? // if ( nItemWhich == ATTR_ROTATE_VALUE && eState == SFX_ITEM_DEFAULT ) -// eState = pPattern->GetItemSet().GetItemState( ATTR_ORIENTATION, FALSE ); +// eState = pPattern->GetItemSet().GetItemState( ATTR_ORIENTATION, sal_False ); if ( nItemWhich == ATTR_VALUE_FORMAT && eState == SFX_ITEM_DEFAULT ) - eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, FALSE ); + eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, sal_False ); if ( eState == SFX_ITEM_SET ) eRet = beans::PropertyState_DIRECT_VALUE; @@ -1888,7 +1888,7 @@ beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState( const rtl::OUS throw uno::RuntimeException(); const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName ); lcl_GetPropertyWhich( pEntry, nItemWhich ); return GetOnePropertyState( nItemWhich, pEntry ); @@ -1904,9 +1904,9 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength()); beans::PropertyState* pStates = aRet.getArray(); - for(INT32 i = 0; i < aPropertyNames.getLength(); i++) + for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++) { - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); lcl_GetPropertyWhich( pEntry, nItemWhich ); pStates[i] = GetOnePropertyState(nItemWhich, pEntry); @@ -1921,7 +1921,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp if ( pDocShell ) { const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName ); lcl_GetPropertyWhich( pEntry, nItemWhich ); if ( nItemWhich ) // item wid (from map or special case) @@ -1935,7 +1935,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp // //! for ATTR_ROTATE_VALUE, also reset ATTR_ORIENTATION? - USHORT aWIDs[3]; + sal_uInt16 aWIDs[3]; aWIDs[0] = nItemWhich; if ( nItemWhich == ATTR_VALUE_FORMAT ) { @@ -1944,19 +1944,19 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp } else aWIDs[1] = 0; - aFunc.ClearItems( *GetMarkData(), aWIDs, TRUE ); + aFunc.ClearItems( *GetMarkData(), aWIDs, sal_True ); } } else if ( pEntry ) { if ( pEntry->nWID == SC_WID_UNO_CHCOLHDR ) - bChartColAsHdr = FALSE; + bChartColAsHdr = sal_False; else if ( pEntry->nWID == SC_WID_UNO_CHROWHDR ) - bChartRowAsHdr = FALSE; + bChartRowAsHdr = sal_False; else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL ) { ScDocFunc aFunc(*pDocShell); - aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), TRUE, TRUE ); + aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), sal_True, sal_True ); } } } @@ -2005,7 +2005,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr { case SC_WID_UNO_CHCOLHDR: case SC_WID_UNO_CHROWHDR: - ScUnoHelpFunctions::SetBoolInAny( aAny, FALSE ); + ScUnoHelpFunctions::SetBoolInAny( aAny, sal_False ); break; case SC_WID_UNO_CELLSTYL: aAny <<= rtl::OUString( ScStyleNameConversion::DisplayToProgrammaticName( @@ -2028,8 +2028,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr case SC_WID_UNO_CONDLOC: case SC_WID_UNO_CONDXML: { - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2042,8 +2042,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr case SC_WID_UNO_VALILOC: case SC_WID_UNO_VALIXML: { - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2078,7 +2078,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySe void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rValue, ScPatternAttr& rPattern, ScDocument* pDoc, - USHORT& rFirstItemId, USHORT& rSecondItemId ) + sal_uInt16& rFirstItemId, sal_uInt16& rSecondItemId ) { rFirstItemId = rEntry.nWID; rSecondItemId = 0; @@ -2090,14 +2090,14 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A { // #67847# language for number formats SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); - ULONG nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue(); + sal_uLong nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&)rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); nOldFormat = pFormatter->GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang ); sal_Int32 nIntVal = 0; if ( rValue >>= nIntVal ) { - ULONG nNewFormat = (ULONG)nIntVal; + sal_uLong nNewFormat = (sal_uLong)nIntVal; rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); const SvNumberformat* pNewEntry = pFormatter->GetEntry( nNewFormat ); @@ -2109,7 +2109,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A // #40606# if only language is changed, // don't touch number format attribute - ULONG nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET; + sal_uLong nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET; if ( nNewMod == ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) && nNewMod <= SV_MAX_ANZ_STANDARD_FORMATE ) { @@ -2127,7 +2127,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A { sal_Int16 nIntVal = 0; if ( rValue >>= nIntVal ) - rSet.Put( SfxUInt16Item( rEntry.nWID, (USHORT)HMMToTwips(nIntVal) ) ); + rSet.Put( SfxUInt16Item( rEntry.nWID, (sal_uInt16)HMMToTwips(nIntVal) ) ); else throw lang::IllegalArgumentException(); } @@ -2156,20 +2156,20 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A switch( eOrient ) { case table::CellOrientation_STANDARD: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); break; case table::CellOrientation_TOPBOTTOM: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); rSecondItemId = ATTR_ROTATE_VALUE; break; case table::CellOrientation_BOTTOMTOP: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); rSecondItemId = ATTR_ROTATE_VALUE; break; case table::CellOrientation_STACKED: - rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) ); break; default: { @@ -2228,14 +2228,14 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE SfxItemSet& rSet = aPattern.GetItemSet(); rSet.ClearInvalidItems(); - USHORT nFirstItem, nSecondItem; + sal_uInt16 nFirstItem, nSecondItem; lcl_SetCellProperty( *pEntry, aValue, aPattern, pDoc, nFirstItem, nSecondItem ); - for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++) + for (sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++) if ( nWhich != nFirstItem && nWhich != nSecondItem ) rSet.ClearItem(nWhich); - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } else // implemented here @@ -2255,7 +2255,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aStrVal, SFX_STYLE_FAMILY_PARA )); ScDocFunc aFunc(*pDocShell); - aFunc.ApplyStyle( *GetMarkData(), aString, TRUE, TRUE ); + aFunc.ApplyStyle( *GetMarkData(), aString, sal_True, sal_True ); } break; case SC_WID_UNO_TBLBORD: @@ -2283,21 +2283,21 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if (pFormat) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); ScConditionalFormat aNew( 0, pDoc ); // Index wird beim Einfuegen gesetzt pFormat->FillFormat( aNew, pDoc, eGrammar ); - ULONG nIndex = pDoc->AddCondFormat( aNew ); + sal_uLong nIndex = pDoc->AddCondFormat( aNew ); ScDocFunc aFunc(*pDocShell); ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nIndex ) ); - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } } @@ -2314,22 +2314,22 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if (pValidObj) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); ScValidationData* pNewData = pValidObj->CreateValidationData( pDoc, eGrammar ); - ULONG nIndex = pDoc->AddValidationEntry( *pNewData ); + sal_uLong nIndex = pDoc->AddValidationEntry( *pNewData ); delete pNewData; ScDocFunc aFunc(*pDocShell); ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) ); - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } } @@ -2375,7 +2375,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE { ScDocument* pDoc = pDocShell->GetDocument(); - ULONG nOldFormat = ((const SfxUInt32Item&) + sal_uLong nOldFormat = ((const SfxUInt32Item&) pDataSet->Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&) pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); @@ -2391,7 +2391,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE case ATTR_STACKED: { sal_Int32 nRot = ((const SfxInt32Item&)pDataSet->Get(ATTR_ROTATE_VALUE)).GetValue(); - BOOL bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue(); + sal_Bool bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( rAny ); } break; @@ -2431,7 +2431,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE ScDocument* pDoc = pDocShell->GetDocument(); ScMarkData aMark; aMark.SetMarkArea( *pFirst ); - aMark.SelectTable( pFirst->aStart.Tab(), TRUE ); + aMark.SelectTable( pFirst->aStart.Tab(), sal_True ); pDoc->GetSelectionFrame( aMark, aOuter, aInner ); table::TableBorder aBorder; @@ -2448,12 +2448,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pPattern ) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); - ULONG nIndex = ((const SfxUInt32Item&) + sal_uLong nIndex = ((const SfxUInt32Item&) pPattern->GetItem(ATTR_CONDITIONAL)).GetValue(); rAny <<= uno::Reference<sheet::XSheetConditionalEntries>( new ScTableConditionalFormat( pDoc, nIndex, eGrammar )); @@ -2468,12 +2468,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pPattern ) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); - ULONG nIndex = ((const SfxUInt32Item&) + sal_uLong nIndex = ((const SfxUInt32Item&) pPattern->GetItem(ATTR_VALIDDATA)).GetValue(); rAny <<= uno::Reference<beans::XPropertySet>( new ScTableValidationObj( pDoc, nIndex, eGrammar )); @@ -2606,7 +2606,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS // collect items in pNewPattern, apply with one call after the loop - USHORT nFirstItem, nSecondItem; + sal_uInt16 nFirstItem, nSecondItem; lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem ); // put only affected items into new set @@ -2626,7 +2626,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS if ( pNewPattern && aRanges.Count() ) { ScDocFunc aFunc(*pDocShell); - aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True ); } delete pNewPattern; @@ -2645,7 +2645,7 @@ uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues( uno::Sequence<uno::Any> aRet(aPropertyNames.getLength()); uno::Any* pProperties = aRet.getArray(); - for(INT32 i = 0; i < aPropertyNames.getLength(); i++) + for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++) { const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); GetOnePropertyValue( pEntry, pProperties[i] ); @@ -2682,7 +2682,7 @@ IMPL_LINK( ScCellRangesBase, ValueListenerHdl, SfxHint*, pHint ) // in the range are notified. So only a flag is set that is checked when // SFX_HINT_DATACHANGED is received. - bGotDataChangedHint = TRUE; + bGotDataChangedHint = sal_True; } return 0; } @@ -2757,7 +2757,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set // collect items in pNewPattern, apply with one call after the loop - USHORT nFirstItem, nSecondItem; + sal_uInt16 nFirstItem, nSecondItem; try { lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem ); @@ -2801,7 +2801,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set if ( pNewPattern && aRanges.Count() ) { ScDocFunc aFunc(*pDocShell); - aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True ); } delete pNewPattern; @@ -2826,7 +2826,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class - for(INT32 i = 0; i < nCount; i++) + for(sal_Int32 i = 0; i < nCount; i++) { const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); if (!pEntry) @@ -2835,7 +2835,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get } else { - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; lcl_GetPropertyWhich( pEntry, nItemWhich ); pReturns[i].State = GetOnePropertyState( nItemWhich, pEntry ); GetOnePropertyValue( pEntry, pReturns[i].Value ); @@ -2856,8 +2856,8 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class - INT32 j = 0; - for(INT32 i = 0; i < nCount; i++) + sal_Int32 j = 0; + for(sal_Int32 i = 0; i < nCount; i++) { const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); if (!pEntry) @@ -2866,7 +2866,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas } else { - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; lcl_GetPropertyWhich( pEntry, nItemWhich ); pReturns[j].State = GetOnePropertyState( nItemWhich, pEntry ); if (pReturns[j].State == beans::PropertyState_DIRECT_VALUE) @@ -2894,7 +2894,7 @@ void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::R //#97041#; put only MultiMarked ScMarkData in ChangeIndent ScMarkData aMarkData(*GetMarkData()); aMarkData.MarkToMulti(); - aFunc.ChangeIndent( aMarkData, FALSE, TRUE ); + aFunc.ChangeIndent( aMarkData, sal_False, sal_True ); } } @@ -2907,7 +2907,7 @@ void SAL_CALL ScCellRangesBase::incrementIndent() throw(::com::sun::star::uno::R //#97041#; put only MultiMarked ScMarkData in ChangeIndent ScMarkData aMarkData(*GetMarkData()); aMarkData.MarkToMulti(); - aFunc.ChangeIndent( aMarkData, TRUE, TRUE ); + aFunc.ChangeIndent( aMarkData, sal_True, sal_True ); } } @@ -3028,7 +3028,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; long nRowCount = aData.getLength(); long nColCount = nRowCount ? aData[0].getLength() : 0; ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount ); @@ -3068,7 +3068,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = TRUE; + bDone = sal_True; } } } @@ -3101,7 +3101,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions( throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bChartColAsHdr ) { long nRowCount = aRowDescriptions.getLength(); @@ -3135,7 +3135,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions( PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = TRUE; + bDone = sal_True; } } } @@ -3169,7 +3169,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions( throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bChartRowAsHdr ) { long nColCount = aColumnDescriptions.getLength(); @@ -3203,7 +3203,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions( PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = TRUE; + bDone = sal_True; } } } @@ -3223,8 +3223,8 @@ void ScCellRangesBase::ForceChartListener_Impl() ScChartListenerCollection* pColl = pDocShell->GetDocument()->GetChartListenerCollection(); if ( pColl ) { - USHORT nCollCount = pColl->GetCount(); - for ( USHORT nIndex = 0; nIndex < nCollCount; nIndex++ ) + sal_uInt16 nCollCount = pColl->GetCount(); + for ( sal_uInt16 nIndex = 0; nIndex < nCollCount; nIndex++ ) { ScChartListener* pChartListener = (ScChartListener*)pColl->At(nIndex); if ( pChartListener && @@ -3239,16 +3239,16 @@ void ScCellRangesBase::ForceChartListener_Impl() String lcl_UniqueName( ScStrCollection& rColl, const String& rPrefix ) { long nNumber = 1; - USHORT nCollCount = rColl.GetCount(); - while (TRUE) + sal_uInt16 nCollCount = rColl.GetCount(); + while (sal_True) { String aName(rPrefix); aName += String::CreateFromInt32( nNumber ); - BOOL bFound = FALSE; - for (USHORT i=0; i<nCollCount; i++) + sal_Bool bFound = sal_False; + for (sal_uInt16 i=0; i<nCollCount; i++) if ( rColl[i]->GetString() == aName ) { - bFound = TRUE; + bFound = sal_True; break; } if (!bFound) @@ -3322,8 +3322,8 @@ void SAL_CALL ScCellRangesBase::addModifyListener( const uno::Reference<util::XM pValueListener = new ScLinkListener( LINK( this, ScCellRangesBase, ValueListenerHdl ) ); ScDocument* pDoc = pDocShell->GetDocument(); - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) pDoc->StartListeningArea( *aRanges.GetObject(i), pValueListener ); acquire(); // don't lose this object (one ref for all listeners) @@ -3340,8 +3340,8 @@ void SAL_CALL ScCellRangesBase::removeModifyListener( const uno::Reference<util: acquire(); // in case the listeners have the last ref - released below - USHORT nCount = aValueListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aValueListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XModifyListener> *pObj = aValueListeners[n]; if ( *pObj == aListener ) @@ -3398,7 +3398,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC } ScRangeList aNewRanges; - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); } @@ -3416,8 +3416,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel ScMarkData aMarkData(*GetMarkData()); // belegte Zellen wegmarkieren - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); @@ -3429,7 +3429,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel if ( !pCell->IsBlank() ) aMarkData.SetMultiMarkArea( ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ), - FALSE ); + sal_False ); pCell = aIter.GetNext(); } @@ -3438,7 +3438,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel ScRangeList aNewRanges; // IsMultiMarked reicht hier nicht (wird beim deselektieren nicht zurueckgesetzt) if (aMarkData.HasAnyMultiMarks()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3458,8 +3458,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC ScMarkData aMarkData; // passende Zellen selektieren - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); @@ -3467,33 +3467,33 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC ScBaseCell* pCell = aIter.GetFirst(); while (pCell) { - BOOL bAdd = FALSE; + sal_Bool bAdd = sal_False; if ( pCell->HasNote() && ( nContentFlags & sheet::CellFlags::ANNOTATION ) ) - bAdd = TRUE; + bAdd = sal_True; else switch ( pCell->GetCellType() ) { case CELLTYPE_STRING: if ( nContentFlags & sheet::CellFlags::STRING ) - bAdd = TRUE; + bAdd = sal_True; break; case CELLTYPE_EDIT: if ( (nContentFlags & sheet::CellFlags::STRING) || (nContentFlags & sheet::CellFlags::FORMATTED) ) - bAdd = TRUE; + bAdd = sal_True; break; case CELLTYPE_FORMULA: if ( nContentFlags & sheet::CellFlags::FORMULA ) - bAdd = TRUE; + bAdd = sal_True; break; case CELLTYPE_VALUE: if ( (nContentFlags & (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME)) == (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME) ) - bAdd = TRUE; + bAdd = sal_True; else { // Date/Time Erkennung - ULONG nIndex = (ULONG)((SfxUInt32Item*)pDoc->GetAttr( + sal_uLong nIndex = (sal_uLong)((SfxUInt32Item*)pDoc->GetAttr( aIter.GetCol(), aIter.GetRow(), aIter.GetTab(), ATTR_VALUE_FORMAT ))->GetValue(); short nTyp = pDoc->GetFormatTable()->GetType(nIndex); @@ -3501,12 +3501,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC (nTyp == NUMBERFORMAT_DATETIME)) { if ( nContentFlags & sheet::CellFlags::DATETIME ) - bAdd = TRUE; + bAdd = sal_True; } else { if ( nContentFlags & sheet::CellFlags::VALUE ) - bAdd = TRUE; + bAdd = sal_True; } } break; @@ -3519,7 +3519,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC if (bAdd) aMarkData.SetMultiMarkArea( ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ), - TRUE ); + sal_True ); pCell = aIter.GetNext(); } @@ -3527,7 +3527,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC ScRangeList aNewRanges; if (aMarkData.IsMultiMarked()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3547,8 +3547,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC ScMarkData aMarkData; // passende Zellen selektieren - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); @@ -3559,27 +3559,27 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC if (pCell->GetCellType() == CELLTYPE_FORMULA) { ScFormulaCell* pFCell = (ScFormulaCell*)pCell; - BOOL bAdd = FALSE; + sal_Bool bAdd = sal_False; if (pFCell->GetErrCode()) { if ( nResultFlags & sheet::FormulaResult::ERROR ) - bAdd = TRUE; + bAdd = sal_True; } else if (pFCell->IsValue()) { if ( nResultFlags & sheet::FormulaResult::VALUE ) - bAdd = TRUE; + bAdd = sal_True; } else // String { if ( nResultFlags & sheet::FormulaResult::STRING ) - bAdd = TRUE; + bAdd = sal_True; } if (bAdd) aMarkData.SetMultiMarkArea( ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ), - TRUE ); + sal_True ); } pCell = aIter.GetNext(); @@ -3588,7 +3588,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC ScRangeList aNewRanges; if (aMarkData.IsMultiMarked()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3597,12 +3597,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC } uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( - const table::CellAddress& aCompare, BOOL bColumnDiff) + const table::CellAddress& aCompare, sal_Bool bColumnDiff) { if (pDocShell) { - ULONG nRangeCount = aRanges.Count(); - ULONG i; + sal_uLong nRangeCount = aRanges.Count(); + sal_uLong i; ScDocument* pDoc = pDocShell->GetDocument(); ScMarkData aMarkData; @@ -3674,7 +3674,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( if ( !ScBaseCell::CellEqual( pCell, pOtherCell ) ) aMarkData.SetMultiMarkArea( aOneRange ); else - aMarkData.SetMultiMarkArea( aOneRange, FALSE ); // deselect + aMarkData.SetMultiMarkArea( aOneRange, sal_False ); // deselect pCell = aIter.GetNext(); } @@ -3682,7 +3682,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( ScRangeList aNewRanges; if (aMarkData.IsMultiMarked()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3693,14 +3693,14 @@ uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnD const table::CellAddress& aCompare ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - return QueryDifferences_Impl( aCompare, TRUE ); + return QueryDifferences_Impl( aCompare, sal_True ); } uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryRowDifferences( const table::CellAddress& aCompare ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - return QueryDifferences_Impl( aCompare, FALSE ); + return QueryDifferences_Impl( aCompare, sal_False ); } uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersection( @@ -3711,8 +3711,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersec (SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet ); ScRangeList aNew; - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aTemp(*aRanges.GetObject(i)); if ( aTemp.Intersects( aMask ) ) @@ -3738,18 +3738,18 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden ScDocument* pDoc = pDocShell->GetDocument(); ScRangeList aNewRanges(aRanges); - BOOL bFound; + sal_Bool bFound; do { - bFound = FALSE; + bFound = sal_False; // #97205# aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used ScMarkData aMarkData; - aMarkData.MarkFromRangeList( aNewRanges, FALSE ); + aMarkData.MarkFromRangeList( aNewRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked - ULONG nCount = aNewRanges.Count(); - for (ULONG nR=0; nR<nCount; nR++) + sal_uLong nCount = aNewRanges.Count(); + for (sal_uLong nR=0; nR<nCount; nR++) { ScRange aRange(*aNewRanges.GetObject(nR)); ScCellIterator aIter( pDoc, aRange ); @@ -3765,15 +3765,15 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden while ( aRefIter.GetNextRef( aRefRange) ) { if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aRefRange ) ) - bFound = TRUE; - aMarkData.SetMultiMarkArea( aRefRange, TRUE ); + bFound = sal_True; + aMarkData.SetMultiMarkArea( aRefRange, sal_True ); } } pCell = aIter.GetNext(); } } - aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True ); } while ( bRecursive && bFound ); @@ -3792,15 +3792,15 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen ScDocument* pDoc = pDocShell->GetDocument(); ScRangeList aNewRanges(aRanges); - BOOL bFound; + sal_Bool bFound; do { - bFound = FALSE; - ULONG nRangesCount = aNewRanges.Count(); + bFound = sal_False; + sal_uLong nRangesCount = aNewRanges.Count(); // #97205# aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used ScMarkData aMarkData; - aMarkData.MarkFromRangeList( aNewRanges, FALSE ); + aMarkData.MarkFromRangeList( aNewRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked SCTAB nTab = lcl_FirstTab(aNewRanges); //! alle Tabellen @@ -3811,16 +3811,16 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen { if (pCell->GetCellType() == CELLTYPE_FORMULA) { - BOOL bMark = FALSE; + sal_Bool bMark = sal_False; ScDetectiveRefIter aIter( (ScFormulaCell*) pCell ); ScRange aRefRange; while ( aIter.GetNextRef( aRefRange) ) { - for (ULONG nR=0; nR<nRangesCount; nR++) + for (sal_uLong nR=0; nR<nRangesCount; nR++) { ScRange aRange(*aNewRanges.GetObject(nR)); if (aRange.Intersects(aRefRange)) - bMark = TRUE; // von Teil des Ranges abhaengig + bMark = sal_True; // von Teil des Ranges abhaengig } } if (bMark) @@ -3829,14 +3829,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen aCellIter.GetRow(), aCellIter.GetTab() ); if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aCellRange ) ) - bFound = TRUE; - aMarkData.SetMultiMarkArea( aCellRange, TRUE ); + bFound = sal_True; + aMarkData.SetMultiMarkArea( aCellRange, sal_True ); } } pCell = aCellIter.GetNext(); } - aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True ); } while ( bRecursive && bFound ); @@ -3880,12 +3880,12 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll( SCCOL nCol = 0; SCROW nRow = 0; SCTAB nTab = 0; - BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, + sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, aMark, aDummyUndo, NULL ); if (bFound) { ScRangeList aNewRanges; - aMark.FillRangeListWithMarks( &aNewRanges, TRUE ); + aMark.FillRangeListWithMarks( &aNewRanges, sal_True ); // bei findAll immer CellRanges, egal wieviel gefunden wurde xRet.set(new ScCellRangesObj( pDocShell, aNewRanges )); } @@ -3927,7 +3927,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl( } String aDummyUndo; - BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, + sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, aMark, aDummyUndo, NULL ); if (bFound) { @@ -3983,7 +3983,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nReplaced = 0; + sal_Int32 nReplaced = 0; if ( pDocShell && xDesc.is() ) { ScCellSearchObj* pSearch = ScCellSearchObj::getImplementation( xDesc ); @@ -3993,7 +3993,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea if (pSearchItem) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE_ALL ); // immer nur innerhalb dieses Objekts pSearchItem->SetSelection( !lcl_WholeSheet(aRanges) ); @@ -4001,10 +4001,10 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea ScMarkData aMark(*GetMarkData()); SCTAB nTabCount = pDoc->GetTableCount(); - BOOL bProtected = !pDocShell->IsEditable(); + sal_Bool bProtected = !pDocShell->IsEditable(); for (SCTAB i=0; i<nTabCount; i++) if ( aMark.GetTableSelect(i) && pDoc->IsTabProtected(i) ) - bProtected = TRUE; + bProtected = sal_True; if (bProtected) { //! Exception, oder was? @@ -4029,7 +4029,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea if (bUndo) pUndoMark = new ScMarkData(aMark); - BOOL bFound(FALSE); + sal_Bool bFound(sal_False); if (bUndo) bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, aMark, aUndoStr, pUndoDoc ); @@ -4198,7 +4198,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddress ScUnoGuard aGuard; ScDocShell* pDocSh = GetDocShell(); const ScRangeList& rRanges = GetRangeList(); - ULONG nCount = rRanges.Count(); + sal_uLong nCount = rRanges.Count(); if ( pDocSh && nCount ) { table::CellRangeAddress aRangeAddress; @@ -4262,8 +4262,8 @@ void SAL_CALL ScCellRangesObj::addRangeAddress( const table::CellRangeAddress& r void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange ) { - USHORT nCount = rNamedEntries.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = rNamedEntries.Count(); + for ( sal_uInt16 n=nCount; n--; ) if ( rNamedEntries[n]->GetRange() == rRange ) rNamedEntries.DeleteAndDestroy( n ); } @@ -4289,7 +4289,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress } } ScMarkData aMarkData; - aMarkData.MarkFromRangeList( aSheetRanges, FALSE ); + aMarkData.MarkFromRangeList( aSheetRanges, sal_False ); ScRange aRange(static_cast<SCCOL>(rRange.StartColumn), static_cast<SCROW>(rRange.StartRow), static_cast<SCTAB>(rRange.Sheet), @@ -4301,7 +4301,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress aMarkData.MarkToMulti(); if (aMarkData.IsAllMarked( aRange ) ) { - aMarkData.SetMultiMarkArea( aRange, FALSE ); + aMarkData.SetMultiMarkArea( aRange, sal_False ); lcl_RemoveNamedEntry(aNamedEntries, aRange); } else @@ -4309,7 +4309,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress } SetNewRanges(aNotSheetRanges); ScRangeList aNew; - aMarkData.FillRangeListWithMarks( &aNew, FALSE ); + aMarkData.FillRangeListWithMarks( &aNew, sal_False ); for (sal_uInt32 j = 0; j < aNew.Count(); ++j) { AddRange(*aNew.GetObject(j), sal_False); @@ -4362,8 +4362,8 @@ void SAL_CALL ScCellRangesObj::removeRangeAddresses( const uno::Sequence<table:: void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const String& rName ) { - USHORT nCount = rNamedEntries.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = rNamedEntries.Count(); + for ( sal_uInt16 n=nCount; n--; ) if ( rNamedEntries[n]->GetName() == rName ) rNamedEntries.DeleteAndDestroy( n ); } @@ -4374,7 +4374,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u { ScUnoGuard aGuard; ScDocShell* pDocSh = GetDocShell(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; //! Type of aElement can be some specific interface instead of XInterface @@ -4389,19 +4389,19 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u String aNamStr(aName); if ( aNamStr.Len() ) { - USHORT nNamedCount = aNamedEntries.Count(); - for (USHORT n=0; n<nNamedCount; n++) + sal_uInt16 nNamedCount = aNamedEntries.Count(); + for (sal_uInt16 n=0; n<nNamedCount; n++) if ( aNamedEntries[n]->GetName() == aNamStr ) throw container::ElementExistException(); } ScRangeList aNew(GetRangeList()); const ScRangeList& rAddRanges = pRangesImp->GetRangeList(); - ULONG nAddCount = rAddRanges.Count(); - for (ULONG i=0; i<nAddCount; i++) + sal_uLong nAddCount = rAddRanges.Count(); + for (sal_uLong i=0; i<nAddCount; i++) aNew.Join( *rAddRanges.GetObject(i) ); SetNewRanges(aNew); - bDone = TRUE; + bDone = sal_True; if ( aName.getLength() && nAddCount == 1 ) { @@ -4422,53 +4422,53 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u } } -BOOL lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh, - const String& rName, ULONG& rIndex ) +sal_Bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh, + const String& rName, sal_uLong& rIndex ) { if (pDocSh) { String aRangeStr; ScDocument* pDoc = pDocSh->GetDocument(); - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { rRanges.GetObject(i)->Format( aRangeStr, SCA_VALID | SCA_TAB_3D, pDoc ); if ( aRangeStr == rName ) { rIndex = i; - return TRUE; + return sal_True; } } } - return FALSE; // nicht gefunden + return sal_False; // nicht gefunden } -BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, +sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, const ScRangeList& rRanges, ScDocShell* pDocSh, const String& rName, ScRange& rFound ) { // exact range in list? - ULONG nIndex = 0; + sal_uLong nIndex = 0; if ( lcl_FindRangeByName( rRanges, pDocSh, rName, nIndex ) ) { rFound = *rRanges.GetObject(nIndex); - return TRUE; + return sal_True; } // range contained in selection? (sheet must be specified) ScRange aCellRange; - USHORT nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() ); + sal_uInt16 nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() ); if ( ( nParse & ( SCA_VALID | SCA_TAB_3D ) ) == ( SCA_VALID | SCA_TAB_3D ) ) { ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked if ( aMarkData.IsAllMarked( aCellRange ) ) { rFound = aCellRange; - return TRUE; + return sal_True; } } @@ -4476,24 +4476,24 @@ BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, if ( rNamedEntries.Count() ) { - for ( USHORT n=0; n<rNamedEntries.Count(); n++ ) + for ( sal_uInt16 n=0; n<rNamedEntries.Count(); n++ ) if ( rNamedEntries[n]->GetName() == rName ) { // test if named entry is contained in rRanges const ScRange& rComp = rNamedEntries[n]->GetRange(); ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked if ( aMarkData.IsAllMarked( rComp ) ) { rFound = rComp; - return TRUE; + return sal_True; } } } - return FALSE; // not found + return sal_False; // not found } void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName ) @@ -4501,56 +4501,56 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; String aNameStr(aName); ScDocShell* pDocSh = GetDocShell(); const ScRangeList& rRanges = GetRangeList(); - ULONG nIndex = 0; + sal_uLong nIndex = 0; if ( lcl_FindRangeByName( rRanges, pDocSh, aNameStr, nIndex ) ) { // einzelnen Range weglassen ScRangeList aNew; - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) if (i != nIndex) aNew.Append( *rRanges.GetObject(i) ); SetNewRanges(aNew); - bDone = TRUE; + bDone = sal_True; } else if (pDocSh) { // deselect any ranges (parsed or named entry) ScRangeList aDiff; - BOOL bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0; + sal_Bool bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0; if ( !bValid && aNamedEntries.Count() ) { - USHORT nCount = aNamedEntries.Count(); - for (USHORT n=0; n<nCount && !bValid; n++) + sal_uInt16 nCount = aNamedEntries.Count(); + for (sal_uInt16 n=0; n<nCount && !bValid; n++) if (aNamedEntries[n]->GetName() == aNameStr) { aDiff.RemoveAll(); aDiff.Append( aNamedEntries[n]->GetRange() ); - bValid = TRUE; + bValid = sal_True; } } if ( bValid ) { ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); - ULONG nDiffCount = aDiff.Count(); - for (ULONG i=0; i<nDiffCount; i++) + sal_uLong nDiffCount = aDiff.Count(); + for (sal_uLong i=0; i<nDiffCount; i++) { ScRange* pDiffRange = aDiff.GetObject(i); if (aMarkData.GetTableSelect( pDiffRange->aStart.Tab() )) - aMarkData.SetMultiMarkArea( *pDiffRange, FALSE ); + aMarkData.SetMultiMarkArea( *pDiffRange, sal_False ); } ScRangeList aNew; - aMarkData.FillRangeListWithMarks( &aNew, FALSE ); + aMarkData.FillRangeListWithMarks( &aNew, sal_False ); SetNewRanges(aNew); - bDone = TRUE; //! error if range was not selected before? + bDone = sal_True; //! error if range was not selected before? } } @@ -4600,17 +4600,17 @@ uno::Any SAL_CALL ScCellRangesObj::getByName( const rtl::OUString& aName ) return aRet; } -BOOL lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, +sal_Bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange, String& rName ) { - USHORT nCount = rNamedEntries.Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = rNamedEntries.Count(); + for (sal_uInt16 i=0; i<nCount; i++) if (rNamedEntries[i]->GetRange() == rRange) { rName = rNamedEntries[i]->GetName(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames() @@ -4624,11 +4624,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames() { String aRangeStr; ScDocument* pDoc = pDocSh->GetDocument(); - ULONG nCount = rRanges.Count(); + sal_uLong nCount = rRanges.Count(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (ULONG i=0; i<nCount; i++) + for (sal_uLong i=0; i<nCount; i++) { // use given name if for exactly this range, otherwise just format ScRange aRange = *rRanges.GetObject(i); @@ -4936,9 +4936,9 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName( SCTAB nTab = aRange.aStart.Tab(); ScRange aCellRange; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; String aString(aName); - USHORT nParse = aCellRange.ParseAny( aString, pDoc, rDetails ); + sal_uInt16 nParse = aCellRange.ParseAny( aString, pDoc, rDetails ); if ( nParse & SCA_VALID ) { if ( !(nParse & SCA_TAB_3D) ) // keine Tabelle angegeben -> auf dieser Tabelle @@ -4946,20 +4946,20 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName( aCellRange.aStart.SetTab(nTab); aCellRange.aEnd.SetTab(nTab); } - bFound = TRUE; + bFound = sal_True; } else { ScRangeUtil aRangeUtil; if ( aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_NAMES ) || aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_DBASE ) ) - bFound = TRUE; + bFound = sal_True; } if (bFound) // valid only if within this object's range { if (!aRange.In(aCellRange)) - bFound = FALSE; + bFound = sal_False; } if (bFound) @@ -5074,15 +5074,15 @@ void ScCellRangeObj::SetArrayFormula_Impl( const rtl::OUString& rFormula, throw uno::RuntimeException(); } - aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, TRUE, TRUE, rFormulaNmsp, eGrammar ); + aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, sal_True, sal_True, rFormulaNmsp, eGrammar ); } else { // empty string -> erase array formula ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( aRange.aStart.Tab(), TRUE ); - aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE ); + aMark.SelectTable( aRange.aStart.Tab(), sal_True ); + aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True ); } } } @@ -5159,15 +5159,15 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula // Actually GRAM_PODF_A1 is a don't-care here because of the token // array being set, it fits with other API compatibility grammars // though. - aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, TRUE, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, sal_True, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } else { // empty sequence -> erase array formula ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( aRange.aStart.Tab(), TRUE ); - aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE ); + aMark.SelectTable( aRange.aStart.Tab(), sal_True ); + aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True ); } } } @@ -5190,7 +5190,7 @@ uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray() { uno::Any aAny; // bAllowNV = TRUE: errors as void - if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, TRUE ) ) + if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, sal_True ) ) { uno::Sequence< uno::Sequence<uno::Any> > aSeq; if ( aAny >>= aSeq ) @@ -5208,7 +5208,7 @@ void SAL_CALL ScCellRangeObj::setDataArray( { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -5252,7 +5252,7 @@ uno::Sequence< uno::Sequence<rtl::OUString> > SAL_CALL ScCellRangeObj::getFormul rtl::OUString* pColAry = aColSeq.getArray(); for (SCCOL nColIndex = 0; nColIndex < nColCount; nColIndex++) pColAry[nColIndex] = lcl_GetInputString( pDocSh->GetDocument(), - ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), TRUE ); + ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), sal_True ); pRowAry[nRowIndex] = aColSeq; } @@ -5270,7 +5270,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray( { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -5296,20 +5296,20 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress& ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { - BOOL bError = FALSE; + sal_Bool bError = sal_False; ScTabOpParam aParam; aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn, (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn, (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column, (SCROW)aRowCell.Row, aRowCell.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column, (SCROW)aColumnCell.Row, aColumnCell.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); switch (nMode) { case sheet::TableOperationMode_COLUMN: @@ -5322,13 +5322,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress& aParam.nMode = 2; break; default: - bError = TRUE; + bError = sal_True; } if (!bError) { ScDocFunc aFunc(*pDocSh); - aFunc.TabOp( aRange, NULL, aParam, TRUE, TRUE ); + aFunc.TabOp( aRange, NULL, aParam, sal_True, sal_True ); } } } @@ -5343,9 +5343,9 @@ void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeExcepti { ScDocFunc aFunc(*pDocSh); if ( bMerge ) - aFunc.MergeCells( aRange, FALSE, TRUE, TRUE ); + aFunc.MergeCells( aRange, sal_False, sal_True, sal_True ); else - aFunc.UnmergeCells( aRange, TRUE, TRUE ); + aFunc.UnmergeCells( aRange, sal_True, sal_True ); //! Fehler abfangen? } @@ -5368,7 +5368,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bError = FALSE; + sal_Bool bError = sal_False; FillDir eDir = FILL_TO_BOTTOM; switch (nFillDirection) @@ -5386,7 +5386,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eDir = FILL_TO_LEFT; break; default: - bError = TRUE; + bError = sal_True; } FillCmd eCmd = FILL_SIMPLE; @@ -5408,7 +5408,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eCmd = FILL_AUTO; break; default: - bError = TRUE; + bError = sal_True; } FillDateCmd eDateCmd = FILL_DAY; @@ -5427,14 +5427,14 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eDateCmd = FILL_YEAR; break; default: - bError = TRUE; + bError = sal_True; } if (!bError) { ScDocFunc aFunc(*pDocSh); aFunc.FillSeries( aRange, NULL, eDir, eCmd, eDateCmd, - MAXDOUBLE, fStep, fEndValue, TRUE, TRUE ); + MAXDOUBLE, fStep, fEndValue, sal_True, sal_True ); } } } @@ -5449,7 +5449,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, ScRange aSourceRange(aRange); SCsCOLROW nCount = 0; // "Dest-Count" FillDir eDir = FILL_TO_BOTTOM; - BOOL bError = FALSE; + sal_Bool bError = sal_False; switch (nFillDirection) { case sheet::FillDirection_TO_BOTTOM: @@ -5473,15 +5473,15 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, eDir = FILL_TO_LEFT; break; default: - bError = TRUE; + bError = sal_True; } if (nCount < 0 || nCount > MAXROW) // overflow - bError = TRUE; + bError = sal_True; if (!bError) { ScDocFunc aFunc(*pDocSh); - aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, TRUE, TRUE ); + aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, sal_True, sal_True ); } } } @@ -5497,8 +5497,8 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName ) if ( pDocSh && pAutoFormat ) { String aNameString(aName); - USHORT nCount = pAutoFormat->GetCount(); - USHORT nIndex; + sal_uInt16 nCount = pAutoFormat->GetCount(); + sal_uInt16 nIndex; String aCompare; for (nIndex=0; nIndex<nCount; nIndex++) { @@ -5509,7 +5509,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName ) if (nIndex<nCount) { ScDocFunc aFunc(*pDocSh); - aFunc.AutoFormat( aRange, NULL, nIndex, TRUE, TRUE ); + aFunc.AutoFormat( aRange, NULL, nIndex, sal_True, sal_True ); } else throw lang::IllegalArgumentException(); @@ -5538,7 +5538,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createSortDescripto SCCOLROW nFieldStart = aParam.bByRow ? static_cast<SCCOLROW>(aDBRange.aStart.Col()) : static_cast<SCCOLROW>(aDBRange.aStart.Row()); - for (USHORT i=0; i<MAXSORT; i++) + for (sal_uInt16 i=0; i<MAXSORT; i++) if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart ) aParam.nField[i] -= nFieldStart; } @@ -5556,7 +5556,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { - USHORT i; + sal_uInt16 i; ScSortParam aParam; ScDBData* pData = pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen if (pData) @@ -5590,7 +5590,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein - aFunc.Sort( nTab, aParam, TRUE, TRUE, TRUE ); + aFunc.Sort( nTab, aParam, sal_True, sal_True, sal_True ); } } @@ -5693,7 +5693,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe //! if created by createFilterDescriptorByObject ??? ScDBDocFunc aFunc(*pDocSh); - aFunc.Query( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein + aFunc.Query( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein } } @@ -5718,10 +5718,10 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil //! Test, ob xObject im selben Dokument ist ScFilterDescriptor* pNew = new ScFilterDescriptor(pDocSh); //! stattdessen vom Objekt? - //XSheetFilterDescriptorRef xNew = xObject->createFilterDescriptor(TRUE); + //XSheetFilterDescriptorRef xNew = xObject->createFilterDescriptor(sal_True); ScQueryParam aParam = pNew->GetParam(); - aParam.bHasHeader = TRUE; + aParam.bHasHeader = sal_True; table::CellRangeAddress aDataAddress(xAddr->getRangeAddress()); aParam.nCol1 = (SCCOL)aDataAddress.StartColumn; @@ -5731,7 +5731,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil aParam.nTab = aDataAddress.Sheet; ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bOk = pDoc->CreateQueryParam( + sal_Bool bOk = pDoc->CreateQueryParam( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab(), aParam ); @@ -5783,7 +5783,7 @@ uno::Reference<sheet::XSubTotalDescriptor> SAL_CALL ScCellRangeObj::createSubTot ScRange aDBRange; pData->GetArea(aDBRange); SCCOL nFieldStart = aDBRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( aParam.bGroupActive[i] ) { @@ -5819,7 +5819,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals( // im SubTotalDescriptor sind die Fields innerhalb des Bereichs gezaehlt SCCOL nFieldStart = aRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( aParam.bGroupActive[i] ) { @@ -5840,7 +5840,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals( pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); - aFunc.DoSubTotals( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein + aFunc.DoSubTotals( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein } } @@ -5856,7 +5856,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException) if (pData) pData->GetSubTotalParam(aParam); // auch bei Remove die Feld-Eintraege behalten - aParam.bRemoveOnly = TRUE; + aParam.bRemoveOnly = sal_True; SCTAB nTab = aRange.aStart.Tab(); aParam.nCol1 = aRange.aStart.Col(); @@ -5867,7 +5867,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException) pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); - aFunc.DoSubTotals( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein + aFunc.DoSubTotals( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein } } @@ -5912,7 +5912,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein - aFunc.DoImport( nTab, aParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag als Parameter + aFunc.DoImport( nTab, aParam, xResultSet, NULL, sal_True, sal_False ); //! Api-Flag als Parameter } } @@ -6157,7 +6157,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellObj::getImplementationId() throw(uno::Run // Hilfsfunktionen -String ScCellObj::GetInputString_Impl(BOOL bEnglish) const // fuer getFormula / FormulaLocal +String ScCellObj::GetInputString_Impl(sal_Bool bEnglish) const // fuer getFormula / FormulaLocal { if (GetDocShell()) return lcl_GetInputString( GetDocShell()->GetDocument(), aCellPos, bEnglish ); @@ -6190,7 +6190,7 @@ String ScCellObj::GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aCellP { // wie in GetString am Dokument (column) Color* pColor; - ULONG nNumFmt = pDoc->GetNumberFormat( aCellPos ); + sal_uLong nNumFmt = pDoc->GetNumberFormat( aCellPos ); ScCellFormat::GetString( pCell, nNumFmt, aVal, &pColor, *pDoc->GetFormatTable() ); } } @@ -6207,14 +6207,14 @@ String ScCellObj::GetOutputString_Impl() const return aVal; } -void ScCellObj::SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish) +void ScCellObj::SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish) { ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { ScDocFunc aFunc(*pDocSh); // GRAM_PODF_A1 for API compatibility. - (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } } @@ -6233,7 +6233,7 @@ void ScCellObj::SetValue_Impl(double fValue) if ( pDocSh ) { ScDocFunc aFunc(*pDocSh); - (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), TRUE ); + (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), sal_True ); } } @@ -6268,7 +6268,7 @@ void ScCellObj::SetFormulaWithGrammar( const ::rtl::OUString& rFormula, if ( pDocSh ) { ScDocFunc aFunc(*pDocSh); - aFunc.SetCellText( aCellPos, rFormula, TRUE, TRUE, TRUE, rFormulaNmsp, eGrammar); + aFunc.SetCellText( aCellPos, rFormula, sal_True, sal_True, sal_True, rFormulaNmsp, eGrammar); } } @@ -6287,7 +6287,7 @@ void ScCellObj::InputEnglishString( const ::rtl::OUString& rText ) sal_uInt32 nOldFormat = pDoc->GetNumberFormat( aCellPos ); if ( pFormatter->GetType( nOldFormat ) == NUMBERFORMAT_TEXT ) { - SetString_Impl(aString, FALSE, FALSE); // text cell + SetString_Impl(aString, sal_False, sal_False); // text cell } else { @@ -6306,15 +6306,15 @@ void ScCellObj::InputEnglishString( const ::rtl::OUString& rText ) ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); // ATTR_LANGUAGE_FORMAT remains unchanged - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } // put the cell into the document // (after applying the format, so possible formula recalculation already uses the new format) - (void)aFunc.PutCell( aCellPos, pNewCell, TRUE ); + (void)aFunc.PutCell( aCellPos, pNewCell, sal_True ); } else - SetString_Impl(aString, FALSE, FALSE); // no cell from InterpretEnglishString, probably empty string + SetString_Impl(aString, sal_False, sal_False); // no cell from InterpretEnglishString, probably empty string } } } @@ -6361,7 +6361,7 @@ void SAL_CALL ScCellObj::setString( const rtl::OUString& aText ) throw(uno::Runt { ScUnoGuard aGuard; String aString(aText); - SetString_Impl(aString, FALSE, FALSE); // immer Text + SetString_Impl(aString, sal_False, sal_False); // immer Text // don't create pUnoText here if not there if (pUnoText) @@ -6431,7 +6431,7 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang aSelection.nEndPos = aSelection.nStartPos + 1; pCellField->InitDoc( pDocSh, aCellPos, aSelection ); - // #91431# for bAbsorb=FALSE, the new selection must be behind the inserted content + // #91431# for bAbsorb=sal_False, the new selection must be behind the inserted content // (the xml filter relies on this) if (!bAbsorb) aSelection.nStartPos = aSelection.nEndPos; @@ -6503,15 +6503,15 @@ sal_Bool SAL_CALL ScCellObj::hasElements() throw(uno::RuntimeException) rtl::OUString SAL_CALL ScCellObj::getFormula() throw(uno::RuntimeException) { ScUnoGuard aGuard; - // TRUE = englisch - return GetInputString_Impl(TRUE); + // sal_True = englisch + return GetInputString_Impl(sal_True); } void SAL_CALL ScCellObj::setFormula( const rtl::OUString& aFormula ) throw(uno::RuntimeException) { ScUnoGuard aGuard; String aString(aFormula); - SetString_Impl(aString, TRUE, TRUE); // englisch interpretieren + SetString_Impl(aString, sal_True, sal_True); // englisch interpretieren } double SAL_CALL ScCellObj::getValue() throw(uno::RuntimeException) @@ -6566,7 +6566,7 @@ table::CellContentType ScCellObj::GetResultType_Impl() ScBaseCell* pCell = pDocSh->GetDocument()->GetCell(aCellPos); if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) { - BOOL bValue = ((ScFormulaCell*)pCell)->IsValue(); + sal_Bool bValue = ((ScFormulaCell*)pCell)->IsValue(); return bValue ? table::CellContentType_VALUE : table::CellContentType_TEXT; } } @@ -6576,7 +6576,7 @@ table::CellContentType ScCellObj::GetResultType_Impl() sal_Int32 SAL_CALL ScCellObj::getError() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nError = 0; + sal_uInt16 nError = 0; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -6626,7 +6626,7 @@ void SAL_CALL ScCellObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rT ScDocFunc aFunc( *pDocSh ); ScBaseCell* pNewCell = new ScFormulaCell( pDoc, aCellPos, &aTokenArray ); - (void)aFunc.PutCell( aCellPos, pNewCell, TRUE ); + (void)aFunc.PutCell( aCellPos, pNewCell, sal_True ); } } @@ -6697,7 +6697,7 @@ void ScCellObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, c rtl::OUString aStrVal; aValue >>= aStrVal; String aString(aStrVal); - SetString_Impl(aString, TRUE, FALSE); // lokal interpretieren + SetString_Impl(aString, sal_True, sal_False); // lokal interpretieren } else if ( pEntry->nWID == SC_WID_UNO_FORMRT ) { @@ -6717,8 +6717,8 @@ void ScCellObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, { if ( pEntry->nWID == SC_WID_UNO_FORMLOC ) { - // FALSE = lokal - rAny <<= rtl::OUString( GetInputString_Impl(FALSE) ); + // sal_False = lokal + rAny <<= rtl::OUString( GetInputString_Impl(sal_False) ); } else if ( pEntry->nWID == SC_WID_UNO_FORMRT ) { @@ -6841,7 +6841,7 @@ void SAL_CALL ScCellObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeExc sal_Int16 SAL_CALL ScCellObj::resetActionLocks() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nRet(nActionLockCount); + sal_uInt16 nRet(nActionLockCount); if (pUnoText) { ScSharedCellEditSource* pEditSource = @@ -7114,7 +7114,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPage sheet::TablePageBreakData aData; uno::Sequence<sheet::TablePageBreakData> aSeq(nCount); sheet::TablePageBreakData* pAry = aSeq.getArray(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; for (nCol=0; nCol<=MAXCOL; nCol++) { ScBreakType nBreak = pDoc->HasColBreak(nCol, nTab); @@ -7164,14 +7164,14 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc //! docfunc Funktion, auch fuer ScViewFunc::RemoveManualBreaks ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); SCTAB nTab = GetTab_Impl(); if (bUndo) { ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, sal_False, pUndoDoc ); pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) ); } @@ -7179,7 +7179,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc pDoc->RemoveManualBreaks(nTab); pDoc->UpdatePageBreaks(nTab); - //? UpdatePageBreakData( TRUE ); + //? UpdatePageBreakData( sal_True ); pDocSh->SetDocumentModified(); pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); } @@ -7206,7 +7206,7 @@ void SAL_CALL ScTableSheetObj::setName( const rtl::OUString& aNewName ) { String aString(aNewName); ScDocFunc aFunc( *pDocSh ); - aFunc.RenameTable( GetTab_Impl(), aString, TRUE, TRUE ); + aFunc.RenameTable( GetTab_Impl(), aString, sal_True, sal_True ); } } @@ -7243,18 +7243,18 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; InsCellCmd eCmd = INS_NONE; switch (nMode) { - case sheet::CellInsertMode_NONE: bDo = FALSE; break; + case sheet::CellInsertMode_NONE: bDo = sal_False; break; case sheet::CellInsertMode_DOWN: eCmd = INS_CELLSDOWN; break; case sheet::CellInsertMode_RIGHT: eCmd = INS_CELLSRIGHT; break; case sheet::CellInsertMode_ROWS: eCmd = INS_INSROWS; break; case sheet::CellInsertMode_COLUMNS: eCmd = INS_INSCOLS; break; default: DBG_ERROR("insertCells: falscher Mode"); - bDo = FALSE; + bDo = sal_False; } if (bDo) @@ -7263,7 +7263,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang ScRange aScRange; ScUnoConversion::FillScRange( aScRange, rRangeAddress ); ScDocFunc aFunc(*pDocSh); - aFunc.InsertCells( aScRange, NULL, eCmd, TRUE, TRUE ); + aFunc.InsertCells( aScRange, NULL, eCmd, sal_True, sal_True ); } } } @@ -7275,18 +7275,18 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; DelCellCmd eCmd = DEL_NONE; switch (nMode) { - case sheet::CellDeleteMode_NONE: bDo = FALSE; break; + case sheet::CellDeleteMode_NONE: bDo = sal_False; break; case sheet::CellDeleteMode_UP: eCmd = DEL_CELLSUP; break; case sheet::CellDeleteMode_LEFT: eCmd = DEL_CELLSLEFT; break; case sheet::CellDeleteMode_ROWS: eCmd = DEL_DELROWS; break; case sheet::CellDeleteMode_COLUMNS: eCmd = DEL_DELCOLS; break; default: DBG_ERROR("deleteCells: falscher Mode"); - bDo = FALSE; + bDo = sal_False; } if (bDo) @@ -7295,7 +7295,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang ScRange aScRange; ScUnoConversion::FillScRange( aScRange, rRangeAddress ); ScDocFunc aFunc(*pDocSh); - aFunc.DeleteCells( aScRange, NULL, eCmd, TRUE, TRUE ); + aFunc.DeleteCells( aScRange, NULL, eCmd, sal_True, sal_True ); } } } @@ -7313,7 +7313,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination ScUnoConversion::FillScRange( aSourceRange, aSource ); ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet ); ScDocFunc aFunc(*pDocSh); - aFunc.MoveBlock( aSourceRange, aDestPos, TRUE, TRUE, TRUE, TRUE ); + aFunc.MoveBlock( aSourceRange, aDestPos, sal_True, sal_True, sal_True, sal_True ); } } @@ -7330,7 +7330,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination ScUnoConversion::FillScRange( aSourceRange, aSource ); ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet ); ScDocFunc aFunc(*pDocSh); - aFunc.MoveBlock( aSourceRange, aDestPos, FALSE, TRUE, TRUE, TRUE ); + aFunc.MoveBlock( aSourceRange, aDestPos, sal_False, sal_True, sal_True, sal_True ); } } @@ -7344,7 +7344,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges ) if ( pDocSh ) { ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); SCTAB nTab = GetTab_Impl(); ScPrintRangeSaver* pNewRanges = pDoc->CreatePrintRangeSaver(); @@ -7375,12 +7375,12 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScTableSheetObj::getPrintAreas() { ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetTab_Impl(); - USHORT nCount = pDoc->GetPrintRangeCount( nTab ); + sal_uInt16 nCount = pDoc->GetPrintRangeCount( nTab ); table::CellRangeAddress aRangeAddress; uno::Sequence<table::CellRangeAddress> aSeq(nCount); table::CellRangeAddress* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { const ScRange* pRange = pDoc->GetPrintRange( nTab, i ); DBG_ASSERT(pRange,"wo ist der Druckbereich"); @@ -7409,13 +7409,13 @@ void SAL_CALL ScTableSheetObj::setPrintAreas( ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver(); - USHORT nCount = (USHORT) aPrintAreas.getLength(); + sal_uInt16 nCount = (sal_uInt16) aPrintAreas.getLength(); pDoc->ClearPrintRanges( nTab ); if (nCount) { ScRange aPrintRange; const table::CellRangeAddress* pAry = aPrintAreas.getConstArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScUnoConversion::FillScRange( aPrintRange, pAry[i] ); pDoc->AddPrintRange( nTab, aPrintRange ); @@ -7436,7 +7436,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce SCTAB nTab = GetTab_Impl(); return ( pDoc->GetRepeatColRange(nTab) != NULL ); } - return FALSE; + return sal_False; } void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns ) @@ -7517,7 +7517,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti SCTAB nTab = GetTab_Impl(); return ( pDoc->GetRepeatRowRange(nTab) != NULL ); } - return FALSE; + return sal_False; } void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows ) @@ -7597,7 +7597,7 @@ sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeE ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BYTE nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() ); + sal_uInt8 nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() ); if ( nMode == SC_LINK_NORMAL ) eRet = sheet::SheetLinkMode_NORMAL; else if ( nMode == SC_LINK_VALUE ) @@ -7686,19 +7686,19 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr aFileString = ScGlobal::GetAbsDocName( aFileString, pDocSh ); if ( !aFilterString.Len() ) - ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, TRUE, FALSE ); + ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, sal_True, sal_False ); // remove application prefix from filter name here, so the filter options // aren't reset when the filter name is changed in ScTableLink::DataChanged ScDocumentLoader::RemoveAppPrefix( aFilterString ); - BYTE nLinkMode = SC_LINK_NONE; + sal_uInt8 nLinkMode = SC_LINK_NONE; if ( nMode == sheet::SheetLinkMode_NORMAL ) nLinkMode = SC_LINK_NORMAL; else if ( nMode == sheet::SheetLinkMode_VALUE ) nLinkMode = SC_LINK_VALUE; - ULONG nRefresh = 0; + sal_uLong nRefresh = 0; pDoc->SetLink( nTab, nLinkMode, aFileString, aFilterString, aOptString, aSheetString, nRefresh ); pDocSh->UpdateLinks(); // ggf. Link eintragen oder loeschen @@ -7714,8 +7714,8 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr //! Update nur fuer die betroffene Tabelle??? sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); - USHORT nCount = pLinkManager->GetLinks().Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) @@ -7748,7 +7748,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveDelSucc( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPosition ) @@ -7764,7 +7764,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveDelPred( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPosition ) @@ -7780,7 +7780,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveAddSucc( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPosition ) @@ -7796,7 +7796,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveAddPred( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPosition ) @@ -7812,7 +7812,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPositi ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveAddError( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException) @@ -7824,7 +7824,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException) ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveMarkInvalid( GetTab_Impl() ); } - return FALSE; + return sal_False; } void SAL_CALL ScTableSheetObj::clearArrows() throw(uno::RuntimeException) @@ -7848,11 +7848,11 @@ void SAL_CALL ScTableSheetObj::group( const table::CellRangeAddress& rGroupRange ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); ScRange aGroupRange; ScUnoConversion::FillScRange( aGroupRange, rGroupRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.MakeOutline( aGroupRange, bColumns, TRUE, TRUE ); + aFunc.MakeOutline( aGroupRange, bColumns, sal_True, sal_True ); } } @@ -7864,11 +7864,11 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); ScRange aGroupRange; ScUnoConversion::FillScRange( aGroupRange, rGroupRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.RemoveOutline( aGroupRange, bColumns, TRUE, TRUE ); + aFunc.RemoveOutline( aGroupRange, bColumns, sal_True, sal_True ); } } @@ -7882,7 +7882,7 @@ void SAL_CALL ScTableSheetObj::autoOutline( const table::CellRangeAddress& rCell ScRange aFormulaRange; ScUnoConversion::FillScRange( aFormulaRange, rCellRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.AutoOutline( aFormulaRange, TRUE, TRUE ); + aFunc.AutoOutline( aFormulaRange, sal_True, sal_True ); } } @@ -7894,7 +7894,7 @@ void SAL_CALL ScTableSheetObj::clearOutline() throw(uno::RuntimeException) { SCTAB nTab = GetTab_Impl(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.RemoveAllOutlines( nTab, TRUE, TRUE ); + aFunc.RemoveAllOutlines( nTab, sal_True, sal_True ); } } @@ -7908,7 +7908,7 @@ void SAL_CALL ScTableSheetObj::hideDetail( const table::CellRangeAddress& rCellR ScRange aMarkRange; ScUnoConversion::FillScRange( aMarkRange, rCellRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.HideMarkedOutlines( aMarkRange, TRUE, TRUE ); + aFunc.HideMarkedOutlines( aMarkRange, sal_True, sal_True ); } } @@ -7922,7 +7922,7 @@ void SAL_CALL ScTableSheetObj::showDetail( const table::CellRangeAddress& rCellR ScRange aMarkRange; ScUnoConversion::FillScRange( aMarkRange, rCellRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.ShowMarkedOutlines( aMarkRange, TRUE, TRUE ); + aFunc.ShowMarkedOutlines( aMarkRange, sal_True, sal_True ); } } @@ -7933,10 +7933,10 @@ void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientat ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); SCTAB nTab = GetTab_Impl(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.SelectLevel( nTab, bColumns, nLevel, TRUE, TRUE, TRUE ); + aFunc.SelectLevel( nTab, bColumns, nLevel, sal_True, sal_True, sal_True ); } } @@ -7952,7 +7952,7 @@ void SAL_CALL ScTableSheetObj::protect( const rtl::OUString& aPassword ) { String aString(aPassword); ScDocFunc aFunc(*pDocSh); - aFunc.Protect( GetTab_Impl(), aString, TRUE ); + aFunc.Protect( GetTab_Impl(), aString, sal_True ); } } @@ -7965,7 +7965,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const rtl::OUString& aPassword ) { String aString(aPassword); ScDocFunc aFunc(*pDocSh); - BOOL bDone = aFunc.Unprotect( GetTab_Impl(), aString, TRUE ); + sal_Bool bDone = aFunc.Unprotect( GetTab_Impl(), aString, sal_True ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -7979,7 +7979,7 @@ sal_Bool SAL_CALL ScTableSheetObj::isProtected() throw(uno::RuntimeException) return pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() ); DBG_ERROR("keine DocShell"); //! Exception oder so? - return FALSE; + return sal_False; } // XScenario @@ -7991,7 +7991,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getIsScenario() throw(uno::RuntimeException) if ( pDocSh ) return pDocSh->GetDocument()->IsScenario( GetTab_Impl() ); - return FALSE; + return sal_False; } rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeException) @@ -8002,7 +8002,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags ); return aComment; } @@ -8022,7 +8022,7 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8045,13 +8045,13 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd if (pDoc->IsScenario(nTab)) { ScMarkData aMarkData; - aMarkData.SelectTable( nTab, TRUE ); + aMarkData.SelectTable( nTab, sal_True ); - USHORT nRangeCount = (USHORT)rScenRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)rScenRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = rScenRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" ); ScRange aOneRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab, @@ -8064,51 +8064,51 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd // Szenario-Ranges sind durch Attribut gekennzeichnet ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) ); - aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) ); + aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) ); ScDocFunc aFunc(*pDocSh); - aFunc.ApplyAttributes( aMarkData, aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( aMarkData, aPattern, sal_True, sal_True ); } // don't use. We should use therefor a private interface, so we can also set the flags. /* else if (nTab > 0 && pDoc->IsImportingXML()) // make this sheet as an scenario and only if it is not the first sheet and only if it is ImportingXML, // because than no UNDO and repaint is necessary. { - USHORT nRangeCount = (USHORT)rScenRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)rScenRanges.getLength(); if (nRangeCount) { - pDoc->SetScenario( nTab, TRUE ); + pDoc->SetScenario( nTab, sal_True ); // default flags Color aColor( COL_LIGHTGRAY ); // Default - USHORT nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY; + sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY; String aComment; pDoc->SetScenarioData( nTab, aComment, aColor, nFlags ); const table::CellRangeAddress* pAry = rScenRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" ); - pDoc->ApplyFlagsTab( (USHORT)pAry[i].StartColumn, (USHORT)pAry[i].StartRow, - (USHORT)pAry[i].EndColumn, (USHORT)pAry[i].EndRow, nTab, SC_MF_SCENARIO ); + pDoc->ApplyFlagsTab( (sal_uInt16)pAry[i].StartColumn, (sal_uInt16)pAry[i].StartRow, + (sal_uInt16)pAry[i].EndColumn, (sal_uInt16)pAry[i].EndRow, nTab, SC_MF_SCENARIO ); } - pDoc->SetActiveScenario( nTab, TRUE ); + pDoc->SetActiveScenario( nTab, sal_True ); // set to next visible tab - USHORT j = nTab - 1; - BOOL bFinished = FALSE; + sal_uInt16 j = nTab - 1; + sal_Bool bFinished = sal_False; while (j < nTab && !bFinished) { if (pDoc->IsVisible(j)) { pDoc->SetVisibleTab(j); - bFinished = TRUE; + bFinished = sal_True; } else --j; } ScDocFunc aFunc(*pDocSh); - aFunc.SetTableVisible( nTab, FALSE, TRUE ); + aFunc.SetTableVisible( nTab, sal_False, sal_True ); } }*/ } @@ -8184,7 +8184,7 @@ void ScTableSheetObj::setExternalName( const ::rtl::OUString& aUrl, const ::rtl: const SCTAB nTab = GetTab_Impl(); const String aAbsDocName( ScGlobal::GetAbsDocName( aUrl, pDocSh ) ); const String aDocTabName( ScGlobal::GetDocTabName( aAbsDocName, aSheetName ) ); - if ( !pDoc->RenameTab( nTab, aDocTabName, FALSE /*bUpdateRef*/, TRUE /*bExternalDocument*/ ) ) + if ( !pDoc->RenameTab( nTab, aDocTabName, sal_False /*bUpdateRef*/, sal_True /*bExternalDocument*/ ) ) { throw container::ElementExistException( ::rtl::OUString(), *this ); } @@ -8267,8 +8267,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); - aFunc.SetTableVisible( nTab, bVis, TRUE ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + aFunc.SetTableVisible( nTab, bVis, sal_True ); } else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE ) { @@ -8285,7 +8285,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8302,7 +8302,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8335,7 +8335,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8368,7 +8368,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8401,7 +8401,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8434,7 +8434,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8467,7 +8467,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8506,7 +8506,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) { - BOOL bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bAutoPrint) pDoc->SetPrintEntireSheet( nTab ); // clears all print ranges else @@ -8556,7 +8556,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = pDoc->IsVisible( nTab ); + sal_Bool bVis = pDoc->IsVisible( nTab ); ScUnoHelpFunctions::SetBoolInAny( rAny, bVis ); } else if ( pEntry->nWID == SC_WID_UNO_LINKDISPBIT ) @@ -8580,7 +8580,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); rAny <<= static_cast<sal_Int32>(aColor.GetColor()); @@ -8592,7 +8592,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PROTECT) != 0 ); @@ -8604,7 +8604,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_SHOWFRAME) != 0 ); @@ -8616,7 +8616,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PRINTFRAME) != 0 ); @@ -8628,7 +8628,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_TWOWAY) != 0 ); @@ -8640,7 +8640,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_ATTRIB) != 0 ); @@ -8652,7 +8652,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, !(nFlags & SC_SCENARIO_VALUE)); @@ -8667,7 +8667,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) { - BOOL bAutoPrint = pDoc->IsPrintEntireSheet( nTab ); + sal_Bool bAutoPrint = pDoc->IsPrintEntireSheet( nTab ); ScUnoHelpFunctions::SetBoolInAny( rAny, bAutoPrint ); } else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR ) @@ -8891,32 +8891,32 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE { // property is 1/100mm, column width is twips nNewWidth = HMMToTwips(nNewWidth); - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)nNewWidth, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)nNewWidth, sal_True, sal_True ); } } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, - SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE ); - // FALSE bei Spalten momentan ohne Auswirkung + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, + SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True ); + // sal_False bei Spalten momentan ohne Auswirkung } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) - aFunc.InsertPageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True ); } else ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID @@ -8942,9 +8942,9 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pEntry->nWID == SC_WID_UNO_CELLWID ) { // for hidden column, return original height - USHORT nWidth = pDoc->GetOriginalWidth( nCol, nTab ); + sal_uInt16 nWidth = pDoc->GetOriginalWidth( nCol, nTab ); // property is 1/100mm, column width is twips - nWidth = (USHORT) TwipsToHMM(nWidth); + nWidth = (sal_uInt16) TwipsToHMM(nWidth); rAny <<= (sal_Int32)( nWidth ); } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) @@ -8956,7 +8956,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { //! momentan immer gesetzt ??!?! - BOOL bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt ); } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) @@ -9036,44 +9036,44 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr { // property is 1/100mm, row height is twips nNewHeight = HMMToTwips(nNewHeight); - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)nNewHeight, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)nNewHeight, sal_True, sal_True ); } } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_CELLFILT ) { - BOOL bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue ); // ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; -// aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE ); +// aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus pDoc->SetRowFiltered(nRow, nRow, nTab, bFil); } else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT ) { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True ); else { // set current height again manually - USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab ); - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, TRUE, TRUE ); + sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, sal_True, sal_True ); } } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) - aFunc.InsertPageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_False, rRange.aStart, sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_False, rRange.aStart, sal_True, sal_True, sal_True ); } else ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID @@ -9098,9 +9098,9 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr if ( pEntry->nWID == SC_WID_UNO_CELLHGT ) { // for hidden row, return original height - USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab ); + sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab ); // property is 1/100mm, row height is twips - nHeight = (USHORT) TwipsToHMM(nHeight); + nHeight = (sal_uInt16) TwipsToHMM(nHeight); rAny <<= (sal_Int32)( nHeight ); } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) @@ -9116,7 +9116,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr } else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT ) { - BOOL bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt ); } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) @@ -9189,7 +9189,7 @@ uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException) sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bHas = FALSE; + sal_Bool bHas = sal_False; if ( pDocShell ) { //! schneller selber testen? @@ -9206,13 +9206,13 @@ ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR pDocShell( pDocSh ), aRanges( rR ), pMark( NULL ), - bAtEnd( FALSE ) + bAtEnd( sal_False ) { ScDocument* pDoc = pDocShell->GetDocument(); pDoc->AddUnoObject(*this); if ( aRanges.Count() == 0 ) - bAtEnd = TRUE; + bAtEnd = sal_True; else { SCTAB nTab = 0; @@ -9228,7 +9228,7 @@ void ScCellsEnumeration::CheckPos_Impl() { if (pDocShell) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScDocument* pDoc = pDocShell->GetDocument(); ScBaseCell* pCell = pDoc->GetCell(aPos); if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE ) @@ -9236,7 +9236,7 @@ void ScCellsEnumeration::CheckPos_Impl() if (!pMark) { pMark = new ScMarkData; - pMark->MarkFromRangeList( aRanges, FALSE ); + pMark->MarkFromRangeList( aRanges, sal_False ); pMark->MarkToMulti(); // needed for GetNextMarkedCell } bFound = pMark->IsCellMarked( aPos.Col(), aPos.Row() ); @@ -9259,18 +9259,18 @@ void ScCellsEnumeration::Advance_Impl() if (!pMark) { pMark = new ScMarkData; - pMark->MarkFromRangeList( aRanges, FALSE ); + pMark->MarkFromRangeList( aRanges, sal_False ); pMark->MarkToMulti(); // needed for GetNextMarkedCell } SCCOL nCol = aPos.Col(); SCROW nRow = aPos.Row(); SCTAB nTab = aPos.Tab(); - BOOL bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark ); + sal_Bool bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark ); if (bFound) aPos.Set( nCol, nRow, nTab ); else - bAtEnd = TRUE; // kommt nix mehr + bAtEnd = sal_True; // kommt nix mehr } void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) @@ -9461,8 +9461,8 @@ ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScR pDocShell( pDocSh ), nTab( rRange.aStart.Tab() ), pIter( NULL ), - bAtEnd( FALSE ), - bDirty( FALSE ) + bAtEnd( sal_False ), + bDirty( sal_False ) { ScDocument* pDoc = pDocShell->GetDocument(); pDoc->AddUnoObject(*this); @@ -9492,7 +9492,7 @@ void ScCellFormatsEnumeration::Advance_Impl() if ( bDirty ) { pIter->DataChanged(); // AttrArray-Index neu suchen - bDirty = FALSE; + bDirty = sal_False; } SCCOL nCol1, nCol2; @@ -9500,10 +9500,10 @@ void ScCellFormatsEnumeration::Advance_Impl() if ( pIter->GetNext( nCol1, nCol2, nRow1, nRow2 ) ) aNext = ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab ); else - bAtEnd = TRUE; // kommt nix mehr + bAtEnd = sal_True; // kommt nix mehr } else - bAtEnd = TRUE; // Dok weggekommen oder so + bAtEnd = sal_True; // Dok weggekommen oder so } ScCellRangeObj* ScCellFormatsEnumeration::NextObject_Impl() @@ -9528,7 +9528,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // ungueltig geworden @@ -9537,7 +9537,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( nId == SFX_HINT_DATACHANGED ) { - bDirty = TRUE; // AttrArray-Index evtl. ungueltig geworden + bDirty = sal_True; // AttrArray-Index evtl. ungueltig geworden } } } @@ -9591,7 +9591,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) pDocShell = NULL; // ungueltig geworden } @@ -9858,7 +9858,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) pDocShell = NULL; // ungueltig geworden } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index cd7984d02..a61f32b5f 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1099,7 +1099,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScSharedTokenRef>& rRefTokens, SCROW nMaxRow = 0; SCTAB nTab = 0; - USHORT nFileId = 0; + sal_uInt16 nFileId = 0; String aExtTabName; bool bExternal = false; @@ -2617,7 +2617,7 @@ void ScChart2DataSequence::BuildDataCache() case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); - USHORT nErr = pFCell->GetErrCode(); + sal_uInt16 nErr = pFCell->GetErrCode(); if (nErr) break; @@ -2834,7 +2834,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); + sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); if ( nId ==SFX_HINT_DYING ) { m_pDocument = NULL; @@ -2851,7 +2851,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint if( m_pDocument ) { - for ( USHORT n=0; n<m_aValueListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<m_aValueListeners.Count(); n++ ) m_pDocument->AddUnoListenerCall( *m_aValueListeners[n], aEvent ); } @@ -3409,8 +3409,8 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference< acquire(); // in case the listeners have the last ref - released below - USHORT nCount = m_aValueListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = m_aValueListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XModifyListener> *pObj = m_aValueListeners[n]; if ( *pObj == aListener ) diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index b64834b6b..a92b62c50 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -208,11 +208,11 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, } ScRangeList* pList = new ScRangeList; - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet, static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet ); @@ -339,7 +339,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScChartsObj::createEnumeration( sal_Int32 SAL_CALL ScChartsObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nCount = 0; + sal_Int32 nCount = 0; if ( pDocShell ) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -553,14 +553,14 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { pDocShell->GetUndoManager()->AddUndoAction( - new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ) ); + new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, sal_False ) ); } - pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ); + pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, sal_False ); } } @@ -616,7 +616,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con if ( pDoc ) { ScRange aEmptyRange; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; ScChartListener aSearcher( aChartName, pDoc, aEmptyRange ); ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection(); if ( pCollection && pCollection->Search( &aSearcher, nIndex ) ) @@ -627,10 +627,10 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con const ScRangeListRef& rRangeList = pListener->GetRangeList(); if ( rRangeList.Is() ) { - ULONG nCount = rRangeList->Count(); + sal_uLong nCount = rRangeList->Count(); uno::Sequence< table::CellRangeAddress > aCellRanges( nCount ); table::CellRangeAddress* pCellRanges = aCellRanges.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { ScRange aRange( *rRangeList->GetObject( i ) ); table::CellRangeAddress aCellRange; @@ -725,12 +725,12 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScChartObj::getRanges() throw(un GetData_Impl( xRanges, bColHeaders, bRowHeaders ); if ( xRanges.Is() ) { - ULONG nCount = xRanges->Count(); + sal_uLong nCount = xRanges->Count(); table::CellRangeAddress aRangeAddress; uno::Sequence<table::CellRangeAddress> aSeq(nCount); table::CellRangeAddress* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScRange aRange(*xRanges->GetObject(i)); @@ -758,11 +758,11 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress GetData_Impl( xOldRanges, bColHeaders, bRowHeaders ); ScRangeList* pList = new ScRangeList; - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet, static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet ); diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 6b33d1e01..5b879bd1c 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -244,7 +244,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( { // Int16 contains CharacterCompressionType values sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue ); - pDoc->SetAsianCompression( (BYTE) nUno ); + pDoc->SetAsianCompression( (sal_uInt8) nUno ); bUpdateHeights = sal_True; } else if ( aPropertyName.compareToAscii( SC_UNO_ASIANKERN ) == 0 ) @@ -379,7 +379,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString { // #i75610# don't create the printer, return empty string if no printer created yet // (as in SwXDocumentSettings) - SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE ); + SfxPrinter* pPrinter = pDoc->GetPrinter( sal_False ); if (pPrinter) aRet <<= rtl::OUString ( pPrinter->GetName()); else @@ -389,7 +389,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString { // #i75610# don't create the printer, return empty sequence if no printer created yet // (as in SwXDocumentSettings) - SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE ); + SfxPrinter* pPrinter = pDoc->GetPrinter( sal_False ); if (pPrinter) { SvMemoryStream aStream; diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx index 638efe0b3..135e3e8bc 100644 --- a/sc/source/ui/unoobj/cursuno.cxx +++ b/sc/source/ui/unoobj/cursuno.cxx @@ -133,7 +133,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep SCTAB nTab = aOneRange.aStart.Tab(); pDocSh->GetDocument()->GetDataArea( - nTab, nStartCol, nStartRow, nEndCol, nEndRow, TRUE, false ); + nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, false ); ScRange aNew( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ); SetNewRange( aNew ); @@ -331,7 +331,7 @@ void SAL_CALL ScCellCursorObj::gotoStart() throw(uno::RuntimeException) SCTAB nTab = aOneRange.aStart.Tab(); pDocSh->GetDocument()->GetDataArea( - nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false ); + nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_False, false ); ScRange aNew( nStartCol, nStartRow, nTab ); SetNewRange( aNew ); @@ -359,7 +359,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException) SCTAB nTab = aOneRange.aStart.Tab(); pDocSh->GetDocument()->GetDataArea( - nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false ); + nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_False, false ); ScRange aNew( nEndCol, nEndRow, nTab ); SetNewRange( aNew ); @@ -382,7 +382,7 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException) SCTAB nTab = aCursor.Tab(); ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) - pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, FALSE,TRUE, aMark ); + pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, sal_False,sal_True, aMark ); //! sonst Exception oder so SetNewRange( ScRange( nNewX, nNewY, nTab ) ); @@ -404,7 +404,7 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException) SCTAB nTab = aCursor.Tab(); ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) - pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, FALSE,TRUE, aMark ); + pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, sal_False,sal_True, aMark ); //! sonst Exception oder so SetNewRange( ScRange( nNewX, nNewY, nTab ) ); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 2812e6831..3f893f710 100755..100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -202,7 +202,7 @@ SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupItemObj, "ScDataPilotFieldGroupItem //------------------------------------------------------------------------ -GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits ) +GeneralFunction ScDataPilotConversion::FirstFunc( sal_uInt16 nBits ) { if ( nBits & PIVOT_FUNC_SUM ) return GeneralFunction_SUM; if ( nBits & PIVOT_FUNC_COUNT ) return GeneralFunction_COUNT; @@ -219,9 +219,9 @@ GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits ) return GeneralFunction_NONE; } -USHORT ScDataPilotConversion::FunctionBit( GeneralFunction eFunc ) +sal_uInt16 ScDataPilotConversion::FunctionBit( GeneralFunction eFunc ) { - USHORT nRet = PIVOT_FUNC_NONE; // 0 + sal_uInt16 nRet = PIVOT_FUNC_NONE; // 0 switch (eFunc) { case GeneralFunction_SUM: nRet = PIVOT_FUNC_SUM; break; @@ -264,8 +264,8 @@ ScDPObject* lcl_GetDPObject( ScDocShell* pDocShell, SCTAB nTab, const String& rN ScDPCollection* pColl = pDoc->GetDPCollection(); if ( pColl ) { - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab && @@ -297,7 +297,7 @@ sal_Int32 lcl_GetObjectIndex( ScDPObject* pDPObj, const ScFieldIdentifier& rFiel sal_Int32 nCount = pDPObj->GetDimCount(); for ( sal_Int32 nDim = 0; nDim < nCount; ++nDim ) { - BOOL bIsDataLayout = FALSE; + sal_Bool bIsDataLayout = sal_False; OUString aDimName( pDPObj->GetDimName( nDim, bIsDataLayout ) ); if ( rFieldId.mbDataLayout ? bIsDataLayout : (aDimName == rFieldId.maFieldName) ) return nDim; @@ -346,8 +346,8 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd // api only handles sheet data at this time //! allow all data sources!!! sal_Int32 nFound = 0; - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -430,7 +430,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, if ( aNewName.getLength() && hasByName( aNewName ) ) throw RuntimeException(); // no other exceptions specified - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDataPilotDescriptorBase* pImp = ScDataPilotDescriptorBase::getImplementation( xDescriptor ); if ( pDocShell && pImp ) { @@ -451,7 +451,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, // todo: handle double fields (for more information see ScDPObject ScDBDocFunc aFunc(*pDocShell); - bDone = aFunc.DataPilotUpdate( NULL, pNewObj, TRUE, TRUE ); + bDone = aFunc.DataPilotUpdate( NULL, pNewObj, sal_True, sal_True ); } } @@ -468,7 +468,7 @@ void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName ) if (pDPObj && pDocShell) { ScDBDocFunc aFunc(*pDocShell); - aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, TRUE ); // remove - incl. undo etc. + aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, sal_True ); // remove - incl. undo etc. } else throw RuntimeException(); // no other exceptions specified @@ -497,9 +497,9 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException) // api only handles sheet data at this time //! allow all data sources!!! - USHORT nFound = 0; - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nFound = 0; + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -560,9 +560,9 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() // api only handles sheet data at this time //! allow all data sources!!! - USHORT nFound = 0; - USHORT nCount = pColl->GetCount(); - USHORT i; + sal_uInt16 nFound = 0; + sal_uInt16 nCount = pColl->GetCount(); + sal_uInt16 i; for (i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; @@ -570,7 +570,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() ++nFound; } - USHORT nPos = 0; + sal_uInt16 nPos = 0; Sequence<OUString> aSeq(nFound); OUString* pAry = aSeq.getArray(); for (i=0; i<nCount; i++) @@ -597,8 +597,8 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName ) if ( pColl ) { String aNamStr(aName); - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { // api only handles sheet data at this time //! allow all data sources!!! @@ -606,11 +606,11 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName ) ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab && pDPObj->GetName() == aNamStr ) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -838,7 +838,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp ScImportParam aParam; ScImportDescriptor::FillImportParam( aParam, aArgSeq ); - USHORT nNewType = sheet::DataImportMode_NONE; + sal_uInt16 nNewType = sheet::DataImportMode_NONE; if ( aParam.bImport ) { if ( aParam.bSql ) @@ -979,7 +979,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope aParam.aStatement = pImportDesc->aObject; aParam.bNative = pImportDesc->bNative; aParam.bSql = ( pImportDesc->nType == sheet::DataImportMode_SQL ); - aParam.nType = static_cast<BYTE>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable); + aParam.nType = static_cast<sal_uInt8>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable); uno::Sequence<beans::PropertyValue> aSeq( ScImportDescriptor::GetPropertyCount() ); ScImportDescriptor::FillProperties( aSeq, aParam ); @@ -1198,7 +1198,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject ) if ( pDPObj && pDocSh ) { ScDBDocFunc aFunc(*pDocSh); - aFunc.DataPilotUpdate( pDPObj, pDPObject, TRUE, TRUE ); + aFunc.DataPilotUpdate( pDPObj, pDPObject, sal_True, sal_True ); } } @@ -1274,18 +1274,18 @@ CellRangeAddress SAL_CALL ScDataPilotTableObj::getOutputRange() throw(RuntimeExc return aRet; } -ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, BOOL bRecord, BOOL bApi ); +sal_uLong RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, sal_Bool bRecord, sal_Bool bApi ); void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException) { ScUnoGuard aGuard; if( ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName) ) - RefreshDPObject( pDPObj, NULL, GetDocShell(), TRUE, TRUE ); + RefreshDPObject( pDPObj, NULL, GetDocShell(), sal_True, sal_True ); //if (pDPObj) //{ // ScDPObject* pNew = new ScDPObject(*pDPObj); // ScDBDocFunc aFunc(*GetDocShell()); - // aFunc.DataPilotUpdate( pDPObj, pNew, TRUE, TRUE ); + // aFunc.DataPilotUpdate( pDPObj, pNew, sal_True, sal_True ); // delete pNew; // DataPilotUpdate copies settings from "new" object //} @@ -1367,8 +1367,8 @@ void SAL_CALL ScDataPilotTableObj::removeModifyListener( const uno::Reference<ut acquire(); // in case the listeners have the last ref - released below - USHORT nCount = aModifyListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aModifyListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XModifyListener> *pObj = aModifyListeners[n]; if ( *pObj == aListener ) @@ -1406,7 +1406,7 @@ void ScDataPilotTableObj::Refreshed_Impl() // the EventObject holds a Ref to this object until after the listener calls ScDocument* pDoc = GetDocShell()->GetDocument(); - for ( USHORT n=0; n<aModifyListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aModifyListeners.Count(); n++ ) pDoc->AddUnoListenerCall( *aModifyListeners[n], aEvent ); } @@ -1523,9 +1523,9 @@ ScDPSaveDimension* ScDataPilotChildObjBase::GetDPDimension( ScDPObject** ppDPObj // find dimension with specified index (search in duplicated dimensions) String aFieldName = maFieldId.maFieldName; // needed for comparison const List& rDimensions = pSaveData->GetDimensions(); - ULONG nDimCount = rDimensions.Count(); + sal_uLong nDimCount = rDimensions.Count(); sal_Int32 nFoundIdx = 0; - for( ULONG nDim = 0; nDim < nDimCount; ++nDim ) + for( sal_uLong nDim = 0; nDim < nDimCount; ++nDim ) { ScDPSaveDimension* pDim = static_cast< ScDPSaveDimension* >( rDimensions.GetObject( nDim ) ); if( !pDim->IsDataLayout() && (pDim->GetName() == aFieldName) ) @@ -1611,10 +1611,10 @@ sal_Int32 lcl_GetFieldCount( const Reference<XDimensionsSupplier>& rSource, cons return nRet; } -BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, +sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, const Any& rOrient, SCSIZE nIndex, ScFieldIdentifier& rFieldId ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; SCSIZE nPos = 0; sal_Int32 nDimIndex = 0; @@ -1695,7 +1695,7 @@ BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, return bOk; } -BOOL lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId ) +sal_Bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId ) { // "By name" is always the first match. // The name "Data" always refers to the data layout field. @@ -2107,7 +2107,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew) pDim = pNewDim; } - pDim->SetOrientation(sal::static_int_cast<USHORT>(eNew)); + pDim->SetOrientation(sal::static_int_cast<sal_uInt16>(eNew)); // move changed field behind all other fields (make it the last field in dimension) pSaveData->SetPosition( pDim, pSaveData->GetDimensions().Count() ); @@ -2151,12 +2151,12 @@ void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc) pDim->SetSubTotals( 0, NULL ); else { - USHORT nFunc = sal::static_int_cast<USHORT>( eNewFunc ); + sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( eNewFunc ); pDim->SetSubTotals( 1, &nFunc ); } } else - pDim->SetFunction( sal::static_int_cast<USHORT>( eNewFunc ) ); + pDim->SetFunction( sal::static_int_cast<sal_uInt16>( eNewFunc ) ); SetDPObject( pDPObj ); } } @@ -2198,21 +2198,21 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt pDim->SetSubTotals( 0, NULL ); else { - USHORT nFunc = sal::static_int_cast<USHORT>( rSubtotals[ 0 ] ); + sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( rSubtotals[ 0 ] ); pDim->SetSubTotals( 1, &nFunc ); } } else if( nCount > 1 ) { // set multiple functions, ignore NONE and AUTO in this case - ::std::vector< USHORT > aSubt; + ::std::vector< sal_uInt16 > aSubt; for( sal_Int32 nIdx = 0; nIdx < nCount; ++nIdx ) { GeneralFunction eFunc = rSubtotals[ nIdx ]; if( (eFunc != GeneralFunction_NONE) && (eFunc != GeneralFunction_AUTO) ) { // do not insert functions twice - USHORT nFunc = static_cast< USHORT >( eFunc ); + sal_uInt16 nFunc = static_cast< sal_uInt16 >( eFunc ); if( ::std::find( aSubt.begin(), aSubt.end(), nFunc ) == aSubt.end() ) aSubt.push_back( nFunc ); } diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 68bd1dd0f..e11faf742 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -286,25 +286,25 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ switch (eMode) { case sheet::DataImportMode_NONE: - rParam.bImport = FALSE; + rParam.bImport = sal_False; break; case sheet::DataImportMode_SQL: - rParam.bImport = TRUE; - rParam.bSql = TRUE; + rParam.bImport = sal_True; + rParam.bSql = sal_True; break; case sheet::DataImportMode_TABLE: - rParam.bImport = TRUE; - rParam.bSql = FALSE; + rParam.bImport = sal_True; + rParam.bSql = sal_False; rParam.nType = ScDbTable; break; case sheet::DataImportMode_QUERY: - rParam.bImport = TRUE; - rParam.bSql = FALSE; + rParam.bImport = sal_True; + rParam.bSql = sal_False; rParam.nType = ScDbQuery; break; default: DBG_ERROR("falscher Mode"); - rParam.bImport = FALSE; + rParam.bImport = sal_False; } } } @@ -334,7 +334,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq aOutPos.Column = rParam.nDestCol; aOutPos.Row = rParam.nDestRow; - USHORT nSortCount = 0; + sal_uInt16 nSortCount = 0; while ( nSortCount < MAXSORT && rParam.bDoSort[nSortCount] ) ++nSortCount; @@ -342,7 +342,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq if (nSortCount) { table::TableSortField* pFieldArray = aFields.getArray(); - for (USHORT i=0; i<nSortCount; i++) + for (sal_uInt16 i=0; i<nSortCount; i++) { pFieldArray[i].Field = rParam.nField[i]; pFieldArray[i].IsAscending = rParam.bAscending[i]; @@ -425,8 +425,8 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b if ( rProp.Value >>= aSeq ) { bOldSortDescriptor = sal_True; - INT32 nCount = aSeq.getLength(); - INT32 i; + sal_Int32 nCount = aSeq.getLength(); + sal_Int32 i; if ( nCount > MAXSORT ) { DBG_ERROR("Zu viele Sortierfelder"); @@ -439,16 +439,16 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b rParam.bAscending[i] = pFieldArray[i].SortAscending; // FieldType wird ignoriert - rParam.bDoSort[i] = TRUE; + rParam.bDoSort[i] = sal_True; } for (i=nCount; i<MAXSORT; i++) - rParam.bDoSort[i] = FALSE; + rParam.bDoSort[i] = sal_False; } else if ( rProp.Value >>= aNewSeq ) { bNewSortDescriptor = sal_True; - INT32 nCount = aNewSeq.getLength(); - INT32 i; + sal_Int32 nCount = aNewSeq.getLength(); + sal_Int32 i; if ( nCount > MAXSORT ) { DBG_ERROR("Zu viele Sortierfelder"); @@ -466,10 +466,10 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b rParam.aCollatorAlgorithm = pFieldArray[i].CollatorAlgorithm; // FieldType wird ignoriert - rParam.bDoSort[i] = TRUE; + rParam.bDoSort[i] = sal_True; } for (i=nCount; i<MAXSORT; i++) - rParam.bDoSort[i] = FALSE; + rParam.bDoSort[i] = sal_False; } } else if (aPropName.EqualsAscii( SC_UNONAME_ISCASE )) @@ -497,7 +497,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b { sal_Int32 nVal = 0; if ( rProp.Value >>= nVal ) - rParam.nUserIndex = (USHORT)nVal; + rParam.nUserIndex = (sal_uInt16)nVal; } else if (aPropName.EqualsAscii( SC_UNONAME_COLLLOC )) { @@ -516,7 +516,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b //------------------------------------------------------------------------ -ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, USHORT nP ) : +ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP ) : xRef( pDesc ), // Objekt festhalten rParent( *pDesc ), nPos( nP ) @@ -577,8 +577,8 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns( ScSubTotalParam aParam; rParent.GetData(aParam); - UINT32 nColCount = aSubTotalColumns.getLength(); - if ( nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) ) + sal_uInt32 nColCount = aSubTotalColumns.getLength(); + if ( nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) ) { SCCOL nCount = static_cast<SCCOL>(nColCount); aParam.nSubTotals[nPos] = nCount; @@ -631,7 +631,7 @@ void ScSubTotalDescriptorBase::PutData( const ScSubTotalParam& /* rParam */ ) // XSubTotalDesctiptor -ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(USHORT nIndex) +ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 nIndex) { if ( nIndex < getCount() ) return new ScSubTotalFieldObj( this, nIndex ); @@ -644,8 +644,8 @@ void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException) ScSubTotalParam aParam; GetData(aParam); - for (USHORT i=0; i<MAXSUBTOTAL; i++) - aParam.bGroupActive[i] = FALSE; + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) + aParam.bGroupActive[i] = sal_False; //! Notify oder so fuer die Field-Objekte??? @@ -660,15 +660,15 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew( ScSubTotalParam aParam; GetData(aParam); - USHORT nPos = 0; + sal_uInt16 nPos = 0; while ( nPos < MAXSUBTOTAL && aParam.bGroupActive[nPos] ) ++nPos; - UINT32 nColCount = aSubTotalColumns.getLength(); + sal_uInt32 nColCount = aSubTotalColumns.getLength(); - if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) ) + if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) ) { - aParam.bGroupActive[nPos] = TRUE; + aParam.bGroupActive[nPos] = sal_True; aParam.nField[nPos] = static_cast<SCCOL>(nGroupColumn); delete aParam.pSubTotals[nPos]; @@ -720,7 +720,7 @@ sal_Int32 SAL_CALL ScSubTotalDescriptorBase::getCount() throw(uno::RuntimeExcept ScSubTotalParam aParam; GetData(aParam); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( nCount < MAXSUBTOTAL && aParam.bGroupActive[nCount] ) ++nCount; return nCount; @@ -731,7 +731,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xField.is()) return uno::makeAny(xField); else @@ -792,7 +792,7 @@ void SAL_CALL ScSubTotalDescriptorBase::setPropertyValue( { sal_Int32 nVal = 0; if ( aValue >>= nVal ) - aParam.nUserIndex = (USHORT)nVal; + aParam.nUserIndex = (sal_uInt16)nVal; } else if (aString.EqualsAscii( SC_UNONAME_MAXFLD )) { @@ -969,13 +969,13 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScConsolidationDescriptor::getSo throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aParam.nDataAreaCount; + sal_uInt16 nCount = aParam.nDataAreaCount; if (!aParam.ppDataAreas) nCount = 0; table::CellRangeAddress aRange; uno::Sequence<table::CellRangeAddress> aSeq(nCount); table::CellRangeAddress* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScArea* pArea = aParam.ppDataAreas[i]; if (pArea) @@ -996,12 +996,12 @@ void SAL_CALL ScConsolidationDescriptor::setSources( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = (USHORT)aSources.getLength(); + sal_uInt16 nCount = (sal_uInt16)aSources.getLength(); if (nCount) { const table::CellRangeAddress* pAry = aSources.getConstArray(); ScArea** pNew = new ScArea*[nCount]; - USHORT i; + sal_uInt16 i; for (i=0; i<nCount; i++) pNew[i] = new ScArea( pAry[i].Sheet, static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, @@ -1097,7 +1097,7 @@ void ScFilterDescriptorBase::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 ) { pDocSh = NULL; // invalid @@ -1271,7 +1271,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( if (!rEntry.pStr) rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein) - rEntry.bDoQuery = TRUE; + rEntry.bDoQuery = sal_True; rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR; rEntry.nField = pAry[i].Field; rEntry.bQueryByString = !pAry[i].IsNumeric; @@ -1299,7 +1299,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1307,7 +1307,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1319,7 +1319,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized for (i=nCount; i<nParamCount; i++) - aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen + aParam.GetEntry(i).bDoQuery = sal_False; // ueberzaehlige Felder zuruecksetzen PutData(aParam); } @@ -1345,7 +1345,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( if (!rEntry.pStr) rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein) - rEntry.bDoQuery = TRUE; + rEntry.bDoQuery = sal_True; rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR; rEntry.nField = pAry[i].Field; rEntry.bQueryByString = !pAry[i].IsNumeric; @@ -1379,7 +1379,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1387,7 +1387,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1399,7 +1399,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized for (i=nCount; i<nParamCount; i++) - aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen + aParam.GetEntry(i).bDoQuery = sal_False; // ueberzaehlige Felder zuruecksetzen PutData(aParam); } @@ -1654,7 +1654,7 @@ ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection(); if (pNames) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pNames->SearchName( aName, nPos )) pRet = (*pNames)[nPos]; } @@ -1678,7 +1678,7 @@ void SAL_CALL ScDatabaseRangeObj::setName( const rtl::OUString& aNewName ) { ScDBDocFunc aFunc(*pDocShell); String aNewStr(aNewName); - BOOL bOk = aFunc.RenameDBRange( aName, aNewStr, TRUE ); + sal_Bool bOk = aFunc.RenameDBRange( aName, aNewStr, sal_True ); if (bOk) aName = aNewStr; } @@ -1716,7 +1716,7 @@ void SAL_CALL ScDatabaseRangeObj::setDataArea( const table::CellRangeAddress& aD aNewData.SetArea( aDataArea.Sheet, (SCCOL)aDataArea.StartColumn, (SCROW)aDataArea.StartRow, (SCCOL)aDataArea.EndColumn, (SCROW)aDataArea.EndRow ); ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } @@ -1734,7 +1734,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getSortDescript ScRange aDBRange; pData->GetArea(aDBRange); SCCOLROW nFieldStart = aParam.bByRow ? static_cast<SCCOLROW>(aDBRange.aStart.Col()) : static_cast<SCCOLROW>(aDBRange.aStart.Row()); - for (USHORT i=0; i<MAXSORT; i++) + for (sal_uInt16 i=0; i<MAXSORT; i++) if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart ) aParam.nField[i] -= nFieldStart; } @@ -1788,7 +1788,7 @@ void ScDatabaseRangeObj::SetQueryParam(const ScQueryParam& rQueryParam) aNewData.SetQueryParam(aParam); aNewData.SetHeader(aParam.bHasHeader); // not in ScDBData::SetQueryParam ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } @@ -1810,7 +1810,7 @@ void ScDatabaseRangeObj::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const ScRange aDBRange; pData->GetArea(aDBRange); SCCOL nFieldStart = aDBRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( rSubTotalParam.bGroupActive[i] ) { @@ -1835,7 +1835,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam) ScRange aDBRange; pData->GetArea(aDBRange); SCCOL nFieldStart = aDBRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( aParam.bGroupActive[i] ) { @@ -1848,7 +1848,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam) ScDBData aNewData( *pData ); aNewData.SetSubTotalParam(aParam); ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } @@ -1884,7 +1884,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException) ScDBDocFunc aFunc(*pDocShell); // Import zu wiederholen? - BOOL bContinue = TRUE; + sal_Bool bContinue = sal_True; ScImportParam aImportParam; pData->GetImportParam( aImportParam ); if (aImportParam.bImport && !pData->HasImportSelection()) @@ -1894,12 +1894,12 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException) SCROW nDummyRow; pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow ); uno::Reference< sdbc::XResultSet > xResultSet; - bContinue = aFunc.DoImport( nTab, aImportParam, xResultSet, NULL, TRUE, FALSE ); //! Api-Flag als Parameter + bContinue = aFunc.DoImport( nTab, aImportParam, xResultSet, NULL, sal_True, sal_False ); //! Api-Flag als Parameter } // interne Operationen (sort, query, subtotal) nur, wenn kein Fehler if (bContinue) - aFunc.RepeatDB( pData->GetName(), TRUE, TRUE ); + aFunc.RepeatDB( pData->GetName(), sal_True, sal_True ); } } @@ -1922,8 +1922,8 @@ void SAL_CALL ScDatabaseRangeObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -1940,7 +1940,7 @@ void ScDatabaseRangeObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source = (cppu::OWeakObject*)this; - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -1987,7 +1987,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue( if ( pDocShell && pData ) { ScDBData aNewData( *pData ); - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; String aString(aPropertyName); if ( aString.EqualsAscii( SC_UNONAME_KEEPFORM ) ) @@ -2059,12 +2059,12 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue( { } else - bDo = FALSE; + bDo = sal_False; if (bDo) { ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } } @@ -2195,7 +2195,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XDatabaseRanges -ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(USHORT nIndex) +ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) { if (pDocShell) { @@ -2222,7 +2222,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName, throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDBDocFunc aFunc(*pDocShell); @@ -2230,7 +2230,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName, String aString(aName); ScRange aNameRange( (SCCOL)aRange.StartColumn, (SCROW)aRange.StartRow, aRange.Sheet, (SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet ); - bDone = aFunc.AddDBRange( aString, aNameRange, TRUE ); + bDone = aFunc.AddDBRange( aString, aNameRange, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2240,12 +2240,12 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const rtl::OUString& aName ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDBDocFunc aFunc(*pDocShell); String aString(aName); - bDone = aFunc.DeleteDBRange( aString, TRUE ); + bDone = aFunc.DeleteDBRange( aString, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2282,7 +2282,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xRange.is()) return uno::makeAny(xRange); else @@ -2329,11 +2329,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDatabaseRangesObj::getElementNames() ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection(); if (pNames) { - USHORT nCount = pNames->GetCount(); + sal_uInt16 nCount = pNames->GetCount(); String aName; uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) pAry[i] = (*pNames)[i]->GetName(); return aSeq; @@ -2355,12 +2355,12 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const rtl::OUString& aName ) if (pNames) { String aString(aName); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pNames->SearchName( aString, nPos )) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx index c174db80f..c85f6e1f7 100644 --- a/sc/source/ui/unoobj/defltuno.cxx +++ b/sc/source/ui/unoobj/defltuno.cxx @@ -302,7 +302,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const rtl::OUS beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE; - USHORT nWID = pEntry->nWID; + sal_uInt16 nWID = pEntry->nWID; if ( nWID == ATTR_FONT || nWID == ATTR_CJK_FONT || nWID == ATTR_CTL_FONT || !nWID ) { // static default for font is system-dependent, diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index 6696132fa..d206cf4dd 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -215,7 +215,7 @@ void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject& ScDispatch::ScDispatch(ScTabViewShell* pViewSh) : pViewShell( pViewSh ), - bListeningToView( FALSE ) + bListeningToView( sal_False ) { if (pViewShell) StartListening(*pViewShell); @@ -249,7 +249,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL, { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) ) { ScViewData* pViewData = pViewShell->GetViewData(); @@ -321,7 +321,7 @@ void SAL_CALL ScDispatch::addStatusListener( bListeningToView = sal_True; } - ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD); + ScDBData* pDBData = pViewShell->GetDBData(sal_False,SC_DB_OLD); if ( pDBData ) pDBData->GetImportParam( aLastImport ); lcl_FillDataSource( aEvent, aLastImport ); // modifies State, IsEnabled @@ -340,8 +340,8 @@ void SAL_CALL ScDispatch::removeStatusListener( if ( !aURL.Complete.compareToAscii(cURLDocDataSource) ) { - USHORT nCount = aDataSourceListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aDataSourceListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<frame::XStatusListener> *pObj = aDataSourceListeners[n]; if ( *pObj == xListener ) @@ -371,7 +371,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO if ( pViewShell ) { ScImportParam aNewImport; - ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD); + ScDBData* pDBData = pViewShell->GetDBData(sal_False,SC_DB_OLD); if ( pDBData ) pDBData->GetImportParam( aNewImport ); @@ -388,7 +388,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO lcl_FillDataSource( aEvent, aNewImport ); // modifies State, IsEnabled - for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ ) (*aDataSourceListeners[n])->statusChanged( aEvent ); aLastImport = aNewImport; @@ -407,7 +407,7 @@ void SAL_CALL ScDispatch::disposing( const ::com::sun::star::lang::EventObject& lang::EventObject aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ ) (*aDataSourceListeners[n])->disposing( aEvent ); pViewShell = NULL; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index a570d56b2..e9c548076 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -567,7 +567,7 @@ void ScModelObj::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 ) { pDocShell = NULL; // has become invalid @@ -609,7 +609,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if ( rHint.ISA( ScPointerChangedHint ) ) { - USHORT nFlags = ((const ScPointerChangedHint&)rHint).GetFlags(); + sal_uInt16 nFlags = ((const ScPointerChangedHint&)rHint).GetFlags(); if (nFlags & SC_POINTERCHANGED_NUMFMT) { // NumberFormatter-Pointer am Uno-Objekt neu setzen @@ -760,7 +760,7 @@ bool lcl_ParseTarget( const String& rTarget, ScRange& rTargetRange, Rectangle& r return bRangeValid; } -BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, +sal_Bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, const uno::Sequence< beans::PropertyValue >& rOptions, ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const @@ -768,7 +768,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, DBG_ASSERT( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" ); DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; uno::Reference<frame::XController> xView; @@ -821,11 +821,11 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY ); if ( pSelObj && pSelObj->GetDocShell() == pDocShell ) { - BOOL bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL ); - BOOL bCursor = pSelObj->IsCursorOnly(); + sal_Bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL ); + sal_Bool bCursor = pSelObj->IsCursorOnly(); const ScRangeList& rRanges = pSelObj->GetRangeList(); - rMark.MarkFromRangeList( rRanges, FALSE ); + rMark.MarkFromRangeList( rRanges, sal_False ); rMark.MarkToSimple(); if ( rMark.IsMultiMarked() ) @@ -851,7 +851,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, rStatus.SetMode( SC_PRINTSEL_RANGE ); rStatus.SetRanges( rRanges ); - bDone = TRUE; + bDone = sal_True; } // multi selection isn't supported } @@ -880,7 +880,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, if( rMark.IsMarked() && !rMark.IsMultiMarked() ) { rStatus.SetMode( SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS ); - bDone = TRUE; + bDone = sal_True; } } } @@ -894,9 +894,9 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); for (SCTAB nTab = 0; nTab < nTabCount; nTab++) - rMark.SelectTable( nTab, TRUE ); + rMark.SelectTable( nTab, sal_True ); rStatus.SetMode( SC_PRINTSEL_DOCUMENT ); - bDone = TRUE; + bDone = sal_True; } // other selection types aren't supported } @@ -914,7 +914,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); for (SCTAB nTab = 0; nTab < nTabCount; nTab++) if (!rViewMark.GetTableSelect(nTab)) - rMark.SelectTable( nTab, FALSE ); + rMark.SelectTable( nTab, sal_False ); } } } @@ -1049,7 +1049,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 } ScPrintFunc aFunc( pDocShell, pDocShell->GetPrinter(), nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() ); - aFunc.SetRenderFlag( TRUE ); + aFunc.SetRenderFlag( sal_True ); Range aPageRange( nRenderer+1, nRenderer+1 ); MultiSelection aPage( aPageRange ); @@ -1059,10 +1059,10 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab ); long nTabStart = pPrintFuncCache->GetTabStart( nTab ); - (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, FALSE, NULL, NULL ); + (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_False, NULL, NULL ); ScRange aCellRange; - BOOL bWasCellRange = aFunc.GetLastSourceRange( aCellRange ); + sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange ); Size aTwips = aFunc.GetPageSize(); awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM( aTwips.Height() ) ); @@ -1137,7 +1137,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec { pDrawView = new FmFormView( pModel, pDev ); pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetPrintPreview( sal_True ); } ScRange aRange; @@ -1153,7 +1153,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec ScPrintFunc aFunc( pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() ); aFunc.SetDrawView( pDrawView ); - aFunc.SetRenderFlag( TRUE ); + aFunc.SetRenderFlag( sal_True ); if( aStatus.GetMode() == SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS ) aFunc.SetExclusivelyDrawOleAndDrawObjects(); @@ -1193,7 +1193,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec //<---i56629 } - (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, TRUE, NULL, NULL ); + (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_True, NULL, NULL ); // resolve the hyperlinks for PDF export @@ -1308,7 +1308,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bLocked = FALSE; + sal_Bool bLocked = sal_False; if (pDocShell) bLocked = ( pDocShell->GetLockCount() != 0 ); return bLocked; @@ -1338,7 +1338,7 @@ void SAL_CALL ScModelObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeEx sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nRet = 0; + sal_uInt16 nRet = 0; if (pDocShell) { nRet = pDocShell->GetLockCount(); @@ -1372,7 +1372,7 @@ void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException) { ScUnoGuard aGuard; if (pDocShell) - pDocShell->DoRecalc(TRUE); + pDocShell->DoRecalc(sal_True); else { DBG_ERROR("keine DocShell"); //! Exception oder so? @@ -1383,7 +1383,7 @@ void SAL_CALL ScModelObj::calculateAll() throw(uno::RuntimeException) { ScUnoGuard aGuard; if (pDocShell) - pDocShell->DoHardRecalc(TRUE); + pDocShell->DoHardRecalc(sal_True); else { DBG_ERROR("keine DocShell"); //! Exception oder so? @@ -1397,7 +1397,7 @@ sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime return pDocShell->GetDocument()->GetAutoCalc(); DBG_ERROR("keine DocShell"); //! Exception oder so? - return FALSE; + return sal_False; } void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled ) @@ -1430,7 +1430,7 @@ void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword ) throw(uno::R String aString(aPassword); ScDocFunc aFunc(*pDocShell); - aFunc.Protect( TABLEID_DOC, aString, TRUE ); + aFunc.Protect( TABLEID_DOC, aString, sal_True ); } } @@ -1443,7 +1443,7 @@ void SAL_CALL ScModelObj::unprotect( const rtl::OUString& aPassword ) String aString(aPassword); ScDocFunc aFunc(*pDocShell); - BOOL bDone = aFunc.Unprotect( TABLEID_DOC, aString, TRUE ); + sal_Bool bDone = aFunc.Unprotect( TABLEID_DOC, aString, sal_True ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -1456,7 +1456,7 @@ sal_Bool SAL_CALL ScModelObj::isProtected() throw(uno::RuntimeException) return pDocShell->GetDocument()->IsDocProtected(); DBG_ERROR("keine DocShell"); //! Exception oder so? - return FALSE; + return sal_False; } // XDrawPagesSupplier @@ -1543,7 +1543,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal( String aGoalString(aGoalValue); ScDocument* pDoc = pDocShell->GetDocument(); double fValue = 0.0; - BOOL bFound = pDoc->Solver( + sal_Bool bFound = pDoc->Solver( (SCCOL)aFormulaPosition.Column, (SCROW)aFormulaPosition.Row, aFormulaPosition.Sheet, (SCCOL)aVariablePosition.Column, (SCROW)aVariablePosition.Row, aVariablePosition.Sheet, aGoalString, fValue ); @@ -1592,7 +1592,7 @@ void SAL_CALL ScModelObj::consolidate( if (pDocShell) { const ScConsolidateParam& rParam = aImpl.GetParam(); - pDocShell->DoConsolidate( rParam, TRUE ); + pDocShell->DoConsolidate( rParam, sal_True ); pDocShell->GetDocument()->SetConsolidateDlgData( &rParam ); } } @@ -1668,7 +1668,7 @@ void SAL_CALL ScModelObj::setPropertyValue( const ScDocOptions& rOldOpt = pDoc->GetDocOptions(); ScDocOptions aNewOpt = rOldOpt; - BOOL bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue ); + sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue ); if (bOpt) { // done... @@ -1738,10 +1738,10 @@ void SAL_CALL ScModelObj::setPropertyValue( } else if ( aString.EqualsAscii( SC_UNO_ISUNDOENABLED ) ) { - BOOL bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); pDoc->EnableUndo( bUndoEnabled ); - USHORT nCount = ( bUndoEnabled ? - static_cast< USHORT >( SvtUndoOptions().GetUndoCount() ) : 0 ); + sal_uInt16 nCount = ( bUndoEnabled ? + static_cast< sal_uInt16 >( SvtUndoOptions().GetUndoCount() ) : 0 ); pDocShell->GetUndoManager()->SetMaxUndoActionCount( nCount ); } else if ( aString.EqualsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) ) @@ -1782,7 +1782,7 @@ void SAL_CALL ScModelObj::setPropertyValue( // Recalculation after loading is handled separately. //! Recalc only for options that need it? if ( !pDoc->IsImportingXML() ) - pDocShell->DoHardRecalc( TRUE ); + pDocShell->DoHardRecalc( sal_True ); pDocShell->SetDocumentModified(); } } @@ -1848,11 +1848,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa } else if ( aString.EqualsAscii( SC_UNO_COLLABELRNG ) ) { - aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, TRUE )); + aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, sal_True )); } else if ( aString.EqualsAscii( SC_UNO_ROWLABELRNG ) ) { - aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, FALSE )); + aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, sal_False )); } else if ( aString.EqualsAscii( SC_UNO_AREALINKS ) ) { @@ -1958,7 +1958,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance( ScUnoGuard aGuard; uno::Reference<uno::XInterface> xRet; String aNameStr(aServiceSpecifier); - USHORT nType = ScServiceProvider::GetProviderType(aNameStr); + sal_uInt16 nType = ScServiceProvider::GetProviderType(aNameStr); if ( nType != SC_SERVICE_INVALID ) { // drawing layer tables must be kept as long as the model is alive @@ -2195,9 +2195,9 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange aEvent.Source.set( static_cast< cppu::OWeakObject* >( this ) ); aEvent.Base <<= aEvent.Source; - ULONG nRangeCount = rRanges.Count(); + sal_uLong nRangeCount = rRanges.Count(); aEvent.Changes.realloc( static_cast< sal_Int32 >( nRangeCount ) ); - for ( ULONG nIndex = 0; nIndex < nRangeCount; ++nIndex ) + for ( sal_uLong nIndex = 0; nIndex < nRangeCount; ++nIndex ) { uno::Reference< table::XCellRange > xRangeObj; @@ -2235,7 +2235,7 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange if ( rOperation.compareToAscii("cell-change") == 0 && pDocShell ) { ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab = 0; nTab < nTabCount; nTab++) @@ -2248,14 +2248,14 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange if (pScript) { ScRangeList aTabRanges; // collect ranges on this sheet - ULONG nRangeCount = rRanges.Count(); - for ( ULONG nIndex = 0; nIndex < nRangeCount; ++nIndex ) + sal_uLong nRangeCount = rRanges.Count(); + for ( sal_uLong nIndex = 0; nIndex < nRangeCount; ++nIndex ) { ScRange aRange( *rRanges.GetObject( nIndex ) ); if ( aRange.aStart.Tab() == nTab ) aTabRanges.Append( aRange ); } - ULONG nTabRangeCount = aTabRanges.Count(); + sal_uLong nTabRangeCount = aTabRanges.Count(); if ( nTabRangeCount > 0 ) { uno::Reference<uno::XInterface> xTarget; @@ -2353,7 +2353,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } -uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 nIndex) const +uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const { if (pDocShell) { @@ -2361,7 +2361,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 n DBG_ASSERT(pDrawLayer,"kann Draw-Layer nicht anlegen"); if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument()->GetTableCount() ) { - SdrPage* pPage = pDrawLayer->GetPage((USHORT)nIndex); + SdrPage* pPage = pDrawLayer->GetPage((sal_uInt16)nIndex); DBG_ASSERT(pPage,"Draw-Page nicht gefunden"); if (pPage) { @@ -2384,7 +2384,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa String aNewName; pDocShell->GetDocument()->CreateValidTabName(aNewName); ScDocFunc aFunc(*pDocShell); - if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, TRUE, TRUE ) ) + if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, sal_True, sal_True ) ) xRet.set(GetObjectByIndex_Impl( nPos )); } return xRet; @@ -2402,7 +2402,7 @@ void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>& { SCTAB nPageNum = static_cast<SCTAB>(pPage->GetPageNum()); ScDocFunc aFunc(*pDocShell); - aFunc.DeleteTable( nPageNum, TRUE, TRUE ); + aFunc.DeleteTable( nPageNum, sal_True, sal_True ); } } } @@ -2493,12 +2493,12 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const rtl::OUString& aName, sal throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { String aNamStr(aName); ScDocFunc aFunc(*pDocShell); - bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE ); + bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2508,13 +2508,13 @@ void SAL_CALL ScTableSheetsObj::moveByName( const rtl::OUString& aName, sal_Int1 throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { String aNamStr(aName); SCTAB nSource; if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) ) - bDone = pDocShell->MoveTable( nSource, nDestination, FALSE, TRUE ); + bDone = pDocShell->MoveTable( nSource, nDestination, sal_False, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2525,7 +2525,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName, throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { String aNamStr(aName); @@ -2533,7 +2533,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName, SCTAB nSource; if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) ) { - bDone = pDocShell->MoveTable( nSource, nDestination, TRUE, TRUE ); + bDone = pDocShell->MoveTable( nSource, nDestination, sal_True, sal_True ); if (bDone) { // #i92477# any index past the last sheet means "append" in MoveTable @@ -2543,7 +2543,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName, nResultTab = nTabCount - 1; ScDocFunc aFunc(*pDocShell); - bDone = aFunc.RenameTable( nResultTab, aNewStr, TRUE, TRUE ); + bDone = aFunc.RenameTable( nResultTab, aNewStr, sal_True, sal_True ); } } } @@ -2556,8 +2556,8 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; - BOOL bIllArg = FALSE; + sal_Bool bDone = sal_False; + sal_Bool bIllArg = sal_False; //! Type of aElement can be some specific interface instead of XInterface @@ -2581,17 +2581,17 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const { SCTAB nPosition = pDoc->GetTableCount(); ScDocFunc aFunc(*pDocShell); - bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE ); + bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True ); if (bDone) pSheetObj->InitInsertSheet( pDocShell, nPosition ); // Dokument und neuen Range am Objekt setzen } } else - bIllArg = TRUE; + bIllArg = sal_True; } else - bIllArg = TRUE; + bIllArg = sal_True; } if (!bDone) @@ -2608,8 +2608,8 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; - BOOL bIllArg = FALSE; + sal_Bool bDone = sal_False; + sal_Bool bIllArg = sal_False; //! Type of aElement can be some specific interface instead of XInterface @@ -2626,10 +2626,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const if ( pDocShell->GetDocument()->GetTable( aNamStr, nPosition ) ) { ScDocFunc aFunc(*pDocShell); - if ( aFunc.DeleteTable( nPosition, TRUE, TRUE ) ) + if ( aFunc.DeleteTable( nPosition, sal_True, sal_True ) ) { // InsertTable kann jetzt eigentlich nicht schiefgehen... - bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE ); + bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True ); if (bDone) pSheetObj->InitInsertSheet( pDocShell, nPosition ); } @@ -2641,10 +2641,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const } } else - bIllArg = TRUE; + bIllArg = sal_True; } else - bIllArg = TRUE; + bIllArg = sal_True; } if (!bDone) @@ -2661,7 +2661,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { SCTAB nIndex; @@ -2669,7 +2669,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName ) if ( pDocShell->GetDocument()->GetTable( aString, nIndex ) ) { ScDocFunc aFunc(*pDocShell); - bDone = aFunc.DeleteTable( nIndex, TRUE, TRUE ); + bDone = aFunc.DeleteTable( nIndex, sal_True, sal_True ); } else { @@ -2688,7 +2688,7 @@ uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition( sal throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet))); + uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet))); if (! xSheet.is()) throw lang::IndexOutOfBoundsException(); @@ -2699,7 +2699,7 @@ uno::Reference< table::XCellRange > SAL_CALL ScTableSheetsObj::getCellRangeByPos throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet))); + uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet))); if (! xSheet.is()) throw lang::IndexOutOfBoundsException(); @@ -2823,9 +2823,9 @@ sal_Bool SAL_CALL ScTableSheetsObj::hasByName( const rtl::OUString& aName ) { SCTAB nIndex; if ( pDocShell->GetDocument()->GetTable( String(aName), nIndex ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -2886,14 +2886,14 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartCol+nPosition <= nEndCol && nStartCol+nPosition+nCount-1 <= MAXCOL ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab, (SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab ); - bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, TRUE, TRUE ); + bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2903,14 +2903,14 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Der zu loeschende Bereich muss innerhalb des Objekts liegen if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartCol+nIndex+nCount-1 <= nEndCol ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab, (SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab ); - bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, TRUE, TRUE ); + bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2992,9 +2992,9 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const rtl::OUString& aName ) String aString(aName); if ( ::AlphaToCol( nCol, aString) ) if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol ) - return TRUE; + return sal_True; - return FALSE; // nicht gefunden + return sal_False; // nicht gefunden } // XPropertySet @@ -3028,33 +3028,33 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue( { sal_Int32 nNewWidth = 0; if ( aValue >>= nNewWidth ) - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)HMMToTwips(nNewWidth), TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)HMMToTwips(nNewWidth), sal_True, sal_True ); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) ) { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, - SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE ); - // FALSE for columns currently has no effect + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, + SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True ); + // sal_False for columns currently has no effect } else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE ) ) { //! single function to set/remove all breaks? - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++) if (bSet) - aFunc.InsertPageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True ); } } @@ -3075,7 +3075,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro if ( aNameString.EqualsAscii( SC_UNONAME_CELLWID ) ) { // for hidden column, return original height - USHORT nWidth = pDoc->GetOriginalWidth( nStartCol, nTab ); + sal_uInt16 nWidth = pDoc->GetOriginalWidth( nStartCol, nTab ); aAny <<= (sal_Int32)TwipsToHMM(nWidth); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) @@ -3086,7 +3086,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro } else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) ) { - BOOL bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt ); } else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) ) @@ -3152,14 +3152,14 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartRow+nPosition <= nEndRow && nStartRow+nPosition+nCount-1 <= MAXROW ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab, MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab ); - bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, TRUE, TRUE ); + bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -3169,14 +3169,14 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Der zu loeschende Bereich muss innerhalb des Objekts liegen if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartRow+nIndex+nCount-1 <= nEndRow ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab, MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab ); - bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, TRUE, TRUE ); + bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -3261,13 +3261,13 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( // TODO: It's probably cleaner to use a different property name // for this. - pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (USHORT)HMMToTwips(nNewHeight) ); + pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (sal_uInt16)HMMToTwips(nNewHeight) ); } else { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True ); else { //! manually set old heights again? @@ -3278,14 +3278,14 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( { sal_Int32 nNewHeight = 0; if ( aValue >>= nNewHeight ) - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)HMMToTwips(nNewHeight), TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True ); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLFILT ) ) @@ -3299,12 +3299,12 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE) ) { //! single function to set/remove all breaks? - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++) if (bSet) - aFunc.InsertPageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_False, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_False, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True ); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLBACK ) || aNameString.EqualsAscii( SC_UNONAME_CELLTRAN ) ) { @@ -3337,7 +3337,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper if ( aNameString.EqualsAscii( SC_UNONAME_CELLHGT ) ) { // for hidden row, return original height - USHORT nHeight = pDoc->GetOriginalHeight( nStartRow, nTab ); + sal_uInt16 nHeight = pDoc->GetOriginalHeight( nStartRow, nTab ); aAny <<= (sal_Int32)TwipsToHMM(nHeight); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) @@ -3353,7 +3353,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper } else if ( aNameString.EqualsAscii( SC_UNONAME_OHEIGHT ) ) { - BOOL bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt ); } else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) ) @@ -3507,7 +3507,7 @@ void SAL_CALL ScAnnotationsObj::insertNew( ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab ); ScDocFunc aFunc( *pDocShell ); - aFunc.ReplaceNote( aPos, rText, 0, 0, TRUE ); + aFunc.ReplaceNote( aPos, rText, 0, 0, sal_True ); } } @@ -3520,11 +3520,11 @@ void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Run if ( GetAddressByIndex_Impl( nIndex, aPos ) ) { ScMarkData aMarkData; - aMarkData.SelectTable( aPos.Tab(), TRUE ); + aMarkData.SelectTable( aPos.Tab(), sal_True ); aMarkData.SetMultiMarkArea( ScRange(aPos) ); ScDocFunc aFunc(*pDocShell); - aFunc.DeleteContents( aMarkData, IDF_NOTE, TRUE, TRUE ); + aFunc.DeleteContents( aMarkData, IDF_NOTE, sal_True, sal_True ); } } } @@ -3545,7 +3545,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - ULONG nCount = 0; + sal_uLong nCount = 0; if (pDocShell) { ScCellIterator aCellIter( pDocShell->GetDocument(), 0,0, nTab, MAXCOL,MAXROW, nTab ); @@ -3613,7 +3613,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XScenarios -BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex ) +sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex ) { //! Case-insensitiv ???? @@ -3629,16 +3629,16 @@ BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& r if ( aTabName == aString ) { rIndex = i; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { - USHORT nCount = (USHORT)getCount(); + sal_uInt16 nCount = (sal_uInt16)getCount(); if ( pDocShell && nIndex >= 0 && nIndex < nCount ) return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 ); @@ -3663,13 +3663,13 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName, if ( pDocShell ) { ScMarkData aMarkData; - aMarkData.SelectTable( nTab, TRUE ); + aMarkData.SelectTable( nTab, sal_True ); - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { DBG_ASSERT( pAry[i].Sheet == nTab, "addScenario mit falscher Tab" ); ScRange aRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab, @@ -3683,7 +3683,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName, String aCommStr(aComment); Color aColor( COL_LIGHTGRAY ); // Default - USHORT nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT; + sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT; pDocShell->MakeScenario( nTab, aNameStr, aCommStr, aColor, nFlags, aMarkData ); } @@ -3697,7 +3697,7 @@ void SAL_CALL ScScenariosObj::removeByName( const rtl::OUString& aName ) if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) ) { ScDocFunc aFunc(*pDocShell); - aFunc.DeleteTable( nTab+nIndex+1, TRUE, TRUE ); + aFunc.DeleteTable( nTab+nIndex+1, sal_True, sal_True ); } } diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx index b7adabd64..dabe216d6 100644 --- a/sc/source/ui/unoobj/editsrc.cxx +++ b/sc/source/ui/unoobj/editsrc.cxx @@ -55,7 +55,7 @@ TYPEINIT1( ScHeaderFooterChangedHint, SfxHint ); -ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(USHORT nP) : +ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(sal_uInt16 nP) : nPart( nP ) { } @@ -103,13 +103,13 @@ ScEditEngineDefaulter* ScSharedHeaderFooterEditSource::GetEditEngine() // each ScHeaderFooterEditSource object has its own ScHeaderFooterTextData ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj* pContent, - USHORT nP ) : + sal_uInt16 nP ) : ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( *pContent, nP ) ) { } ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj& rContent, - USHORT nP ) : + sal_uInt16 nP ) : ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( rContent, nP ) ) { } @@ -196,7 +196,7 @@ ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddre aCellPos( rP ), pEditEngine( NULL ), pForwarder( NULL ), - bDataValid( FALSE ) + bDataValid( sal_False ) { if (pDocShell) pDocShell->GetDocument()->AddUnoObject(*this); @@ -237,7 +237,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScEditEngineDefaulter( pEnginePool, TRUE ); + pEditEngine = new ScEditEngineDefaulter( pEnginePool, sal_True ); } pForwarder = new SvxEditEngineForwarder(*pEditEngine); } @@ -250,7 +250,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder() if ( const EditTextObject* pEditObj = pNote->GetEditTextObject() ) pEditEngine->SetText( *pEditObj ); // incl. Umbrueche - bDataValid = TRUE; + bDataValid = sal_True; return pForwarder; } @@ -288,7 +288,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // ungueltig geworden @@ -297,7 +297,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint ) DELETEZ( pEditEngine ); // EditEngine uses document's pool } else if ( nId == SFX_HINT_DATACHANGED ) - bDataValid = FALSE; // Text muss neu geholt werden + bDataValid = sal_False; // Text muss neu geholt werden } } diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 94e22b67c..c04ea766f 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -126,26 +126,26 @@ enum ScUnoCollectMode class ScUnoEditEngine : public ScEditEngineDefaulter { ScUnoCollectMode eMode; - USHORT nFieldCount; + sal_uInt16 nFieldCount; TypeId aFieldType; SvxFieldData* pFound; // lokale Kopie - USHORT nFieldPar; + sal_uInt16 nFieldPar; xub_StrLen nFieldPos; - USHORT nFieldIndex; + sal_uInt16 nFieldIndex; public: ScUnoEditEngine(ScEditEngineDefaulter* pSource); ~ScUnoEditEngine(); //! nPos should be xub_StrLen - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ); - USHORT CountFields(TypeId aType); - SvxFieldData* FindByIndex(USHORT nIndex, TypeId aType); - SvxFieldData* FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType); + sal_uInt16 CountFields(TypeId aType); + SvxFieldData* FindByIndex(sal_uInt16 nIndex, TypeId aType); + SvxFieldData* FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType); - USHORT GetFieldPar() const { return nFieldPar; } + sal_uInt16 GetFieldPar() const { return nFieldPar; } xub_StrLen GetFieldPos() const { return nFieldPos; } }; @@ -170,7 +170,7 @@ ScUnoEditEngine::~ScUnoEditEngine() } String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField, - USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ) + sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ) { String aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor )); if (eMode != SC_UNO_COLLECT_NONE) @@ -199,7 +199,7 @@ String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField, return aRet; } -USHORT ScUnoEditEngine::CountFields(TypeId aType) +sal_uInt16 ScUnoEditEngine::CountFields(TypeId aType) { eMode = SC_UNO_COLLECT_COUNT; aFieldType = aType; @@ -211,7 +211,7 @@ USHORT ScUnoEditEngine::CountFields(TypeId aType) return nFieldCount; } -SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType) +SvxFieldData* ScUnoEditEngine::FindByIndex(sal_uInt16 nIndex, TypeId aType) { eMode = SC_UNO_COLLECT_FINDINDEX; nFieldIndex = nIndex; @@ -224,7 +224,7 @@ SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType) return pFound; } -SvxFieldData* ScUnoEditEngine::FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType) +SvxFieldData* ScUnoEditEngine::FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType) { eMode = SC_UNO_COLLECT_FINDPOS; nFieldPar = nPar; @@ -291,15 +291,15 @@ void ScCellFieldsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XIndexAccess (via XTextFields) -ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(INT32 Index) const +ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const { //! Feld-Funktionen muessen an den Forwarder !!! ScEditEngineDefaulter* pEditEngine = ((ScCellEditSource*)pEditSource)->GetEditEngine(); ScUnoEditEngine aTempEngine(pEditEngine); - if ( aTempEngine.FindByIndex( (USHORT)Index, NULL ) ) // in der Zelle ist der Typ egal + if ( aTempEngine.FindByIndex( (sal_uInt16)Index, NULL ) ) // in der Zelle ist der Typ egal { - USHORT nPar = aTempEngine.GetFieldPar(); + sal_uInt16 nPar = aTempEngine.GetFieldPar(); xub_StrLen nPos = aTempEngine.GetFieldPos(); ESelection aSelection( nPar, nPos, nPar, nPos+1 ); // Feld ist 1 Zeichen return new ScCellFieldObj( pDocShell, aCellPos, aSelection ); @@ -634,7 +634,7 @@ void SAL_CALL ScCellFieldObj::attach( const uno::Reference<text::XTextRange>& xT uno::Reference<text::XText> xText(xTextRange->getText()); if (xText.is()) { - xText->insertTextContent( xTextRange, this, TRUE ); + xText->insertTextContent( xTextRange, this, sal_True ); } } } @@ -700,7 +700,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue( { SvxURLField* pURL = (SvxURLField*)pField; // ist eine Kopie in der ScUnoEditEngine - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( aNameString.EqualsAscii( SC_UNONAME_URL ) ) { if (aValue >>= aStrVal) @@ -717,7 +717,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue( pURL->SetTargetFrame( aStrVal ); } else - bOk = FALSE; + bOk = sal_False; if (bOk) { @@ -870,7 +870,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellFieldObj::getSupportedServiceNames() //------------------------------------------------------------------------ -ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, USHORT nP, USHORT nT) : +ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, sal_uInt16 nT) : pContentObj( pContent ), nPart( nP ), nType( nT ), @@ -911,7 +911,7 @@ ScHeaderFieldsObj::~ScHeaderFieldsObj() // XIndexAccess (via XTextFields) -ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const +ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const { //! Feld-Funktionen muessen an den Forwarder !!! ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)pEditSource)->GetEditEngine(); @@ -929,13 +929,13 @@ ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const case SC_SERVICE_SHEETFIELD: aTypeId = TYPE(SvxTableField); break; // bei SC_SERVICE_INVALID bleibt TypeId Null } - SvxFieldData* pData = aTempEngine.FindByIndex( (USHORT)Index, aTypeId ); + SvxFieldData* pData = aTempEngine.FindByIndex( (sal_uInt16)Index, aTypeId ); if ( pData ) { - USHORT nPar = aTempEngine.GetFieldPar(); + sal_uInt16 nPar = aTempEngine.GetFieldPar(); xub_StrLen nPos = aTempEngine.GetFieldPos(); - USHORT nFieldType = nType; + sal_uInt16 nFieldType = nType; if ( nFieldType == SC_SERVICE_INVALID ) { if ( pData->ISA( SvxPageField ) ) nFieldType = SC_SERVICE_PAGEFIELD; @@ -1125,8 +1125,8 @@ sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue ) //UNUSED2008-05 pEditSource = NULL; //UNUSED2008-05 } -ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, USHORT nP, - USHORT nT, const ESelection& rSel) : +ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, + sal_uInt16 nT, const ESelection& rSel) : OComponentHelper( getMutex() ), pPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertySet() : lcl_GetHeaderFieldPropertySet() ), pContentObj( pContent ), @@ -1208,7 +1208,7 @@ void SAL_CALL ScHeaderFieldObj::release() throw() OComponentHelper::release(); } -void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, USHORT nP, +void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, sal_uInt16 nP, const ESelection& rSel ) { if ( pContent && !pEditSource ) @@ -1328,7 +1328,7 @@ void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>& uno::Reference<text::XText> xText(xTextRange->getText()); if (xText.is()) { - xText->insertTextContent( xTextRange, this, TRUE ); + xText->insertTextContent( xTextRange, this, sal_True ); } } } diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index 38bda7df8..4acbf3a0b 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -137,7 +137,7 @@ ScCondFormatEntryItem::ScCondFormatEntryItem() : //------------------------------------------------------------------------ ScTableConditionalFormat::ScTableConditionalFormat( - ScDocument* pDoc, ULONG nKey, FormulaGrammar::Grammar eGrammar) + ScDocument* pDoc, sal_uLong nKey, FormulaGrammar::Grammar eGrammar) { // Eintrag aus dem Dokument lesen... @@ -153,8 +153,8 @@ ScTableConditionalFormat::ScTableConditionalFormat( if (pDoc->IsInExternalReferenceMarking()) pFormat->MarkUsedExternalReferences(); - USHORT nEntryCount = pFormat->Count(); - for (USHORT i=0; i<nEntryCount; i++) + sal_uInt16 nEntryCount = pFormat->Count(); + for (sal_uInt16 i=0; i<nEntryCount; i++) { ScCondFormatEntryItem aItem; const ScCondFormatEntry* pFormatEntry = pFormat->GetEntry(i); @@ -190,8 +190,8 @@ void ScTableConditionalFormat::FillFormat( ScConditionalFormat& rFormat, // ScConditionalFormat = Core-Struktur, muss leer sein DBG_ASSERT( rFormat.IsEmpty(), "FillFormat: Format nicht leer" ); - USHORT nCount = (USHORT)aEntries.Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = (sal_uInt16)aEntries.Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ScTableConditionalEntry* pEntry = (ScTableConditionalEntry*)aEntries.GetObject(i); if ( !pEntry ) @@ -248,7 +248,7 @@ void ScTableConditionalFormat::DataChanged() // XSheetConditionalFormat -ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(USHORT nIndex) const +ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const { return (ScTableConditionalEntry*)aEntries.GetObject(nIndex); } @@ -397,7 +397,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xEntry.is()) return uno::makeAny(xEntry); else @@ -438,7 +438,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const rtl::OUString& aNam for (long i=0; i<nCount; i++) if ( aName == lcl_GetEntryNameFromIndex(i) ) { - xEntry.set(GetObjectByIndex_Impl((USHORT)i)); + xEntry.set(GetObjectByIndex_Impl((sal_uInt16)i)); break; } @@ -471,9 +471,9 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const rtl::OUString& aNam long nCount = aEntries.Count(); for (long i=0; i<nCount; i++) if ( aName == lcl_GetEntryNameFromIndex(i) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } // XUnoTunnel @@ -631,30 +631,30 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const rtl::OUString& aStyle //------------------------------------------------------------------------ -ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey, +ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey, const formula::FormulaGrammar::Grammar eGrammar) : aPropSet( lcl_GetValidatePropertyMap() ) { // Eintrag aus dem Dokument lesen... - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( pDoc && nKey ) { const ScValidationData* pData = pDoc->GetValidationEntry( nKey ); if (pData) { - nMode = sal::static_int_cast<USHORT>( pData->GetOperation() ); + nMode = sal::static_int_cast<sal_uInt16>( pData->GetOperation() ); aSrcPos = pData->GetValidSrcPos(); // #b4974740# valid pos for expressions aExpr1 = pData->GetExpression( aSrcPos, 0, 0, eGrammar ); aExpr2 = pData->GetExpression( aSrcPos, 1, 0, eGrammar ); meGrammar1 = meGrammar2 = eGrammar; - nValMode = sal::static_int_cast<USHORT>( pData->GetDataMode() ); + nValMode = sal::static_int_cast<sal_uInt16>( pData->GetDataMode() ); bIgnoreBlank = pData->IsIgnoreBlank(); nShowList = pData->GetListType(); bShowInput = pData->GetInput( aInputTitle, aInputMessage ); ScValidErrorStyle eStyle; bShowError = pData->GetErrMsg( aErrorTitle, aErrorMessage, eStyle ); - nErrorStyle = sal::static_int_cast<USHORT>( eStyle ); + nErrorStyle = sal::static_int_cast<sal_uInt16>( eStyle ); // During save to XML, sheet::ValidationType_ANY formulas are not // saved, even if in the list, see @@ -663,7 +663,7 @@ ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey, if (nValMode != SC_VALID_ANY && pDoc->IsInExternalReferenceMarking()) pData->MarkUsedExternalReferences(); - bFound = TRUE; + bFound = sal_True; } } if (!bFound) @@ -718,10 +718,10 @@ void ScTableValidationObj::ClearData_Impl() { nMode = SC_COND_NONE; nValMode = SC_VALID_ANY; - bIgnoreBlank = TRUE; + bIgnoreBlank = sal_True; nShowList = sheet::TableValidationVisibility::UNSORTED; - bShowInput = FALSE; - bShowError = FALSE; + bShowInput = sal_False; + bShowError = sal_False; nErrorStyle = SC_VALERR_STOP; aSrcPos.Set(0,0,0); aExpr1.Erase(); @@ -757,7 +757,7 @@ void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOpera throw(uno::RuntimeException) { ScUnoGuard aGuard; - nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToMode( nOperator ) ); + nMode = sal::static_int_cast<sal_uInt16>( lcl_ConditionOperatorToMode( nOperator ) ); DataChanged(); } diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index bcac6e286..07f2eafe2 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -105,7 +105,7 @@ ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) : pTempDoc = CreateDocument(); else { - rCache.SetInUse( TRUE ); + rCache.SetInUse( sal_True ); if ( !rCache.GetDocument() ) rCache.SetDocument( CreateDocument() ); } @@ -116,7 +116,7 @@ ScTempDocSource::~ScTempDocSource() if ( pTempDoc ) delete pTempDoc; else - rCache.SetInUse( FALSE ); + rCache.SetInUse( sal_False ); } ScDocument* ScTempDocSource::GetDocument() @@ -131,7 +131,7 @@ ScDocument* ScTempDocSource::GetDocument() ScTempDocCache::ScTempDocCache() : pDoc( NULL ), - bInUse( FALSE ) + bInUse( sal_False ) { } @@ -160,7 +160,7 @@ void ScTempDocCache::Clear() //! merge this with ScAreaLink::Refresh //! copy directly without a clipboard document? -BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, +sal_Bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, ScDocument* pDestDoc, const ScAddress& rDestPos ) { SCTAB nSrcTab = rSrcRange.aStart.Tab(); @@ -200,7 +200,7 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 ) { ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); if ( nErrCode == 0 && pFCell->IsValue() ) { sal_uInt32 nNewFormat = pFCell->GetStandardFormat( *pClipDoc->GetFormatTable(), nFormat ); @@ -216,10 +216,10 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, ScMarkData aDestMark; aDestMark.SelectOneTable( nDestTab ); aDestMark.SetMarkArea( aNewRange ); - pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, FALSE ); + pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, sal_False ); delete pClipDoc; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -329,7 +329,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue( // options aren't initialized from configuration - always get the same default behaviour - BOOL bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue ); + sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue ); if (!bDone) throw beans::UnknownPropertyException(); } @@ -356,7 +356,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess ) // XFunctionAccess -BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler ) +sal_Bool lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler ) { // function names are always case-insensitive String aUpper( ScGlobal::pCharClass->upper( rName ) ); @@ -368,28 +368,28 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,cons if ( eOp != ocNone ) { rArray.AddOpCode( eOp ); - return TRUE; + return sal_True; } // 2. old add in functions - USHORT nIndex; + sal_uInt16 nIndex; if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) ) { rArray.AddExternal( aUpper.GetBuffer() ); - return TRUE; + return sal_True; } // 3. new (uno) add in functions - String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE )); + String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, sal_False )); if (aIntName.Len()) { rArray.AddExternal( aIntName.GetBuffer() ); // international name - return TRUE; + return sal_True; } - return FALSE; // no valid function name + return sal_False; // no valid function name } void lcl_AddRef( ScTokenArray& rArray, long nStartRow, long nColCount, long nRowCount ) @@ -521,7 +521,7 @@ class ArrayOfArrayProc { public: static void processSequences( ScDocument* pDoc, const uno::Any& rArg, ScTokenArray& rTokenArr, - long& rDocRow, BOOL& rArgErr, BOOL& rOverflow ) + long& rDocRow, sal_Bool& rArgErr, sal_Bool& rOverflow ) { SequencesContainer< T > aContainer( rArg, rTokenArr, rDocRow, pDoc ); aContainer.process(); @@ -579,8 +579,8 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, // add arguments to token array // - BOOL bArgErr = FALSE; - BOOL bOverflow = FALSE; + sal_Bool bArgErr = sal_False; + sal_Bool bOverflow = sal_False; long nDocRow = 0; long nArgCount = aArguments.getLength(); const uno::Any* pArgArr = aArguments.getConstArray(); @@ -656,12 +656,12 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, long nRowCount = aSrcRange.aEnd.Row() - aSrcRange.aStart.Row() + 1; if ( nStartRow + nRowCount > MAXROWCOUNT ) - bOverflow = TRUE; + bOverflow = sal_True; else { // copy data if ( !lcl_CopyData( pSrcDoc, aSrcRange, pDoc, ScAddress( 0, (SCROW)nDocRow, 0 ) ) ) - bOverflow = TRUE; + bOverflow = sal_True; } nDocRow += nRowCount; @@ -669,13 +669,13 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, lcl_AddRef( aTokenArr, nStartRow, nColCount, nRowCount ); } else - bArgErr = TRUE; + bArgErr = sal_True; } else - bArgErr = TRUE; + bArgErr = sal_True; } else - bArgErr = TRUE; // invalid type + bArgErr = sal_True; // invalid type } aTokenArr.AddOpCode(ocClose); aTokenArr.AddOpCode(ocStop); @@ -691,14 +691,14 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, // GRAM_PODF_A1 doesn't really matter for the token array but fits with // other API compatibility grammars. ScFormulaCell* pFormula = new ScFormulaCell( pDoc, aFormulaPos, - &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (BYTE)(mbArray ? MM_FORMULA : MM_NONE) ); + &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (sal_uInt8)(mbArray ? MM_FORMULA : MM_NONE) ); pDoc->PutCell( aFormulaPos, pFormula ); //! necessary? // call GetMatrix before GetErrCode because GetMatrix always recalculates // if there is no matrix result const ScMatrix* pMat = mbArray ? pFormula->GetMatrix() : 0; - USHORT nErrCode = pFormula->GetErrCode(); + sal_uInt16 nErrCode = pFormula->GetErrCode(); if ( nErrCode == 0 ) { if ( pMat ) @@ -726,7 +726,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, else { // any other error: IllegalArgumentException - bArgErr = TRUE; + bArgErr = sal_True; } pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, IDF_ALL ); diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index b6dd5d039..55afa871a 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -129,8 +129,8 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - USHORT nCount = pLinkManager->GetLinks().Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) @@ -187,8 +187,8 @@ void SAL_CALL ScSheetLinkObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -205,7 +205,7 @@ void ScSheetLinkObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -213,7 +213,7 @@ void ScSheetLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh ) { ScTableLink* pLink = GetLink_Impl(); if( pLink ) - pLink->SetRefreshDelay( (ULONG) nRefresh ); + pLink->SetRefreshDelay( (sal_uLong) nRefresh ); } // XPropertySet @@ -417,11 +417,11 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XSheetLinks -ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(INT32 nIndex) +ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { if (pDocShell) { - INT32 nCount = 0; + sal_Int32 nCount = 0; ScStrCollection aNames; // um doppelte wegzulassen ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); @@ -480,7 +480,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScSheetLinksObj::createEnumerat sal_Int32 SAL_CALL ScSheetLinksObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nCount = 0; + sal_Int32 nCount = 0; if (pDocShell) { ScStrCollection aNames; // um doppelte wegzulassen @@ -556,10 +556,10 @@ sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const rtl::OUString& aName ) //! case-insensitiv ??? String aLinkDoc(pDoc->GetLinkDoc( nTab )); if ( aLinkDoc == aNameStr ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(uno::RuntimeException) @@ -574,10 +574,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u SCTAB nTabCount = pDoc->GetTableCount(); String aName; - INT32 nLinkCount = getCount(); + sal_Int32 nLinkCount = getCount(); uno::Sequence<rtl::OUString> aSeq(nLinkCount); rtl::OUString* pAry = aSeq.getArray(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; for (SCTAB nTab=0; nTab<nTabCount; nTab++) { if (pDoc->IsLinked(nTab)) @@ -598,14 +598,14 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u //------------------------------------------------------------------------ -ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos ) +ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, sal_uInt16 nPos ) { if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - USHORT nTotalCount = pLinkManager->GetLinks().Count(); - USHORT nAreaCount = 0; - for (USHORT i=0; i<nTotalCount; i++) + sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nAreaCount = 0; + for (sal_uInt16 i=0; i<nTotalCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScAreaLink)) @@ -619,7 +619,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos ) return NULL; // nicht gefunden } -ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, USHORT nP) : +ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, sal_uInt16 nP) : aPropSet( lcl_GetSheetLinkMap() ), pDocShell( pDocSh ), nPos( nP ) @@ -670,7 +670,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr String aOptions (pLink->GetOptions()); String aSource (pLink->GetSource()); ScRange aDest (pLink->GetDestArea()); - ULONG nRefresh = pLink->GetRefreshDelay(); + sal_uLong nRefresh = pLink->GetRefreshDelay(); //! Undo fuer Loeschen //! Undo zusammenfassen @@ -679,7 +679,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr pLinkManager->Remove( pLink ); pLink = NULL; // bei Remove geloescht - BOOL bFitBlock = TRUE; // verschieben, wenn durch Update Groesse geaendert + sal_Bool bFitBlock = sal_True; // verschieben, wenn durch Update Groesse geaendert if (pNewFile) { aFile = String( *pNewFile ); @@ -694,11 +694,11 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr if (pNewDest) { ScUnoConversion::FillScRange( aDest, *pNewDest ); - bFitBlock = FALSE; // neuer Bereich angegeben -> keine Inhalte verschieben + bFitBlock = sal_False; // neuer Bereich angegeben -> keine Inhalte verschieben } ScDocFunc aFunc(*pDocShell); - aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, TRUE ); + aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, sal_True ); } } @@ -706,7 +706,7 @@ void ScAreaLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh ) { ScAreaLink* pLink = lcl_GetAreaLink( pDocShell, nPos ); if( pLink ) - pLink->SetRefreshDelay( (ULONG) nRefresh ); + pLink->SetRefreshDelay( (sal_uLong) nRefresh ); } // XRefreshable @@ -738,8 +738,8 @@ void SAL_CALL ScAreaLinkObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -756,7 +756,7 @@ void ScAreaLinkObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -960,10 +960,10 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XAreaLinks -ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(INT32 nIndex) +ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { if ( pDocShell && nIndex >= 0 && nIndex < getCount() ) - return new ScAreaLinkObj( pDocShell, (USHORT)nIndex ); + return new ScAreaLinkObj( pDocShell, (sal_uInt16)nIndex ); return NULL; // nicht gefunden } @@ -989,14 +989,14 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP ScDocFunc aFunc(*pDocShell); aFunc.InsertAreaLink( aFileStr, aFilterStr, aOptionStr, aSourceStr, ScRange(aDestAddr), - 0, FALSE, TRUE ); // keine Inhalte verschieben + 0, sal_False, sal_True ); // keine Inhalte verschieben } } void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (USHORT)nIndex); + ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (sal_uInt16)nIndex); if (pLink) { //! SetAddUndo oder so @@ -1020,12 +1020,12 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAreaLinksObj::createEnumerati sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nAreaCount = 0; + sal_Int32 nAreaCount = 0; if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - USHORT nTotalCount = pLinkManager->GetLinks().Count(); - for (USHORT i=0; i<nTotalCount; i++) + sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 i=0; i<nTotalCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScAreaLink)) @@ -1182,8 +1182,8 @@ void SAL_CALL ScDDELinkObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -1210,7 +1210,7 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( ) ScDocument* pDoc = pDocShell->GetDocument(); if ( pDoc ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) ) { const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix( nPos ); @@ -1248,7 +1248,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >& ScDocument* pDoc = pDocShell->GetDocument(); if ( pDoc ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) ) { uno::Any aAny; @@ -1271,7 +1271,7 @@ void ScDDELinkObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -1302,13 +1302,13 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XDDELinks -ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(INT32 nIndex) +ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { if (pDocShell) { String aAppl, aTopic, aItem; if ( nIndex <= USHRT_MAX && - pDocShell->GetDocument()->GetDdeLinkData( (USHORT)nIndex, aAppl, aTopic, aItem ) ) + pDocShell->GetDocument()->GetDdeLinkData( (sal_uInt16)nIndex, aAppl, aTopic, aItem ) ) return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem ); } return NULL; @@ -1322,8 +1322,8 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const rtl::OUString& aName) String aAppl, aTopic, aItem; ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nCount = pDoc->GetDdeLinkCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pDoc->GetDdeLinkCount(); + for (sal_uInt16 i=0; i<nCount; i++) { pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem ); if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr ) @@ -1347,7 +1347,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScDDELinksObj::createEnumeratio sal_Int32 SAL_CALL ScDDELinksObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nAreaCount = 0; + sal_Int32 nAreaCount = 0; if (pDocShell) nAreaCount = pDocShell->GetDocument()->GetDdeLinkCount(); return nAreaCount; @@ -1399,11 +1399,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno String aAppl, aTopic, aItem; ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nCount = pDoc->GetDdeLinkCount(); + sal_uInt16 nCount = pDoc->GetDdeLinkCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem ); pAry[i] = lcl_BuildDDEName(aAppl, aTopic, aItem); @@ -1423,15 +1423,15 @@ sal_Bool SAL_CALL ScDDELinksObj::hasByName( const rtl::OUString& aName ) String aAppl, aTopic, aItem; ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nCount = pDoc->GetDdeLinkCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pDoc->GetDdeLinkCount(); + for (sal_uInt16 i=0; i<nCount; i++) { pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem ); if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // XDDELinks @@ -1449,7 +1449,7 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink( ScDocument* pDoc = pDocShell->GetDocument(); if ( pDoc ) { - BYTE nMod = SC_DDE_DEFAULT; + sal_uInt8 nMod = SC_DDE_DEFAULT; switch ( nMode ) { case sheet::DDELinkMode_DEFAULT: diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx index 84b6d4a2e..a16b9cb49 100644 --- a/sc/source/ui/unoobj/miscuno.cxx +++ b/sc/source/ui/unoobj/miscuno.cxx @@ -162,7 +162,7 @@ sal_Bool ScUnoHelpFunctions::GetBoolFromAny( const uno::Any& aAny ) { if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN ) return *(sal_Bool*)aAny.getValue(); - return FALSE; + return sal_False; } // static @@ -301,7 +301,7 @@ sal_Bool SAL_CALL ScIndexEnumeration::supportsService( const ::rtl::OUString& Se //UNUSED2008-05 //UNUSED2008-05 sal_Bool SAL_CALL ScEmptyEnumerationAccess::hasElements() throw(uno::RuntimeException) //UNUSED2008-05 { -//UNUSED2008-05 return FALSE; +//UNUSED2008-05 return sal_False; //UNUSED2008-05 } //------------------------------------------------------------------------ @@ -319,7 +319,7 @@ sal_Bool SAL_CALL ScIndexEnumeration::supportsService( const ::rtl::OUString& Se //UNUSED2008-05 sal_Bool SAL_CALL ScEmptyEnumeration::hasMoreElements() throw(uno::RuntimeException) //UNUSED2008-05 { //UNUSED2008-05 ScUnoGuard aGuard; -//UNUSED2008-05 return FALSE; +//UNUSED2008-05 return sal_False; //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 uno::Any SAL_CALL ScEmptyEnumeration::nextElement() throw(container::NoSuchElementException, diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 6f2f60556..17f5b862c 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -548,12 +548,12 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName, if ( nUnoType & sheet::NamedRangeFlag::COLUMN_HEADER ) nNewType |= RT_COLHEADER; if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); ScRangeName* pNames = pDoc->GetRangeName(); - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; if (pNames && !pNames->SearchName(aNameStr, nIndex)) { ScRangeName* pNewRanges = new ScRangeName( *pNames ); @@ -564,7 +564,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName, { ScDocFunc aFunc(*pDocShell); aFunc.SetNewRangeNames( pNewRanges, sal_True ); - bDone = TRUE; + bDone = sal_True; } else { @@ -609,7 +609,7 @@ void SAL_CALL ScNamedRangesObj::removeByName( const rtl::OUString& aName ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScRangeName* pNames = pDocShell->GetDocument()->GetRangeName(); @@ -624,7 +624,7 @@ void SAL_CALL ScNamedRangesObj::removeByName( const rtl::OUString& aName ) pNewRanges->AtFree(nPos); ScDocFunc aFunc(*pDocShell); aFunc.SetNewRangeNames( pNewRanges, sal_True ); - bDone = TRUE; + bDone = sal_True; } } } @@ -761,13 +761,13 @@ sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const rtl::OUString& aName ) /** called from the XActionLockable interface methods on initial locking */ void ScNamedRangesObj::lock() { - pDocShell->GetDocument()->CompileNameFormula( TRUE ); // CreateFormulaString + pDocShell->GetDocument()->CompileNameFormula( sal_True ); // CreateFormulaString } /** called from the XActionLockable interface methods on final unlock */ void ScNamedRangesObj::unlock() { - pDocShell->GetDocument()->CompileNameFormula( FALSE ); // CompileFormulaString + pDocShell->GetDocument()->CompileNameFormula( sal_False ); // CompileFormulaString } // document::XActionLockable @@ -1041,7 +1041,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -1065,7 +1065,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) pDoc->CompileColRowNameFormula(); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID ); pDocShell->SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; //! Undo ?!?! (hier und aus Dialog) } diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx index f98a0b53f..e0117f34a 100644 --- a/sc/source/ui/unoobj/optuno.cxx +++ b/sc/source/ui/unoobj/optuno.cxx @@ -97,7 +97,7 @@ sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions, { sal_Int32 nIntVal = 0; if ( aValue >>= nIntVal ) - rOptions.SetIterCount( (USHORT)nIntVal ); + rOptions.SetIterCount( (sal_uInt16)nIntVal ); } break; case PROP_UNO_ITEREPSILON : @@ -176,7 +176,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue( break; case PROP_UNO_NULLDATE: { - USHORT nD, nM, nY; + sal_uInt16 nD, nM, nY; rOptions.GetDate( nD, nM, nY ); util::Date aDate( nD, nM, nY ); aRet <<= aDate; @@ -216,7 +216,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue( { ScUnoGuard aGuard; - BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue ); + sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue ); if (!bDone) ScModelObj::setPropertyValue( aPropertyName, aValue ); diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index a38b6b719..5f5eb8ea1 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -125,7 +125,7 @@ static const sal_Char __FAR_DATA pFilterHtmlWeb[] = "calc_HTML_WebQuery"; static const sal_Char __FAR_DATA pFilterRtf[] = "Rich Text Format (StarCalc)"; -static BOOL lcl_MayBeAscii( SvStream& rStream ) +static sal_Bool lcl_MayBeAscii( SvStream& rStream ) { // ASCII/CSV is considered possible if there are no null bytes, or a Byte // Order Mark is present, or if, for Unicode UCS2/UTF-16, all null bytes @@ -136,12 +136,12 @@ static BOOL lcl_MayBeAscii( SvStream& rStream ) const size_t nBufSize = 2048; sal_uInt16 aBuffer[ nBufSize ]; sal_uInt8* pByte = reinterpret_cast<sal_uInt8*>(aBuffer); - ULONG nBytesRead = rStream.Read( pByte, nBufSize*2); + sal_uLong nBytesRead = rStream.Read( pByte, nBufSize*2); if ( nBytesRead >= 2 && (aBuffer[0] == 0xfffe || aBuffer[0] == 0xfeff) ) { // Unicode BOM file may contain null bytes. - return TRUE; + return sal_True; } const sal_uInt16* p = aBuffer; @@ -159,13 +159,13 @@ static BOOL lcl_MayBeAscii( SvStream& rStream ) return nMask != 0; } -static BOOL lcl_MayBeDBase( SvStream& rStream ) +static sal_Bool lcl_MayBeDBase( SvStream& rStream ) { // Look for dbf marker, see connectivity/source/inc/dbase/DTable.hxx // DBFType for values. - const BYTE nValidMarks[] = { + const sal_uInt8 nValidMarks[] = { 0x03, 0x04, 0x05, 0x30, 0x43, 0xB3, 0x83, 0x8b, 0x8e, 0xf5 }; - BYTE nMark; + sal_uInt8 nMark; rStream.Seek(STREAM_SEEK_TO_BEGIN); rStream >> nMark; bool bValidMark = false; @@ -175,24 +175,24 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) bValidMark = true; } if ( !bValidMark ) - return FALSE; + return sal_False; const size_t nHeaderBlockSize = 32; // Empty dbf is >= 32*2+1 bytes in size. const size_t nEmptyDbf = nHeaderBlockSize * 2 + 1; rStream.Seek(STREAM_SEEK_TO_END); - ULONG nSize = rStream.Tell(); + sal_uLong nSize = rStream.Tell(); if ( nSize < nEmptyDbf ) - return FALSE; + return sal_False; // length of header starts at 8 rStream.Seek(8); - USHORT nHeaderLen; + sal_uInt16 nHeaderLen; rStream >> nHeaderLen; if ( nHeaderLen < nEmptyDbf || nSize < nHeaderLen ) - return FALSE; + return sal_False; // Last byte of header must be 0x0d, this is how it's specified. // #i9581#,#i26407# but some applications don't follow the specification @@ -200,8 +200,8 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) // even boundary. Some (#i88577# ) even pad more or pad using a 0x1a ^Z // control character (#i8857#). This results in: // Last byte of header must be 0x0d on 32 bytes boundary. - USHORT nBlocks = (nHeaderLen - 1) / nHeaderBlockSize; - BYTE nEndFlag = 0; + sal_uInt16 nBlocks = (nHeaderLen - 1) / nHeaderBlockSize; + sal_uInt8 nEndFlag = 0; while ( nBlocks > 1 && nEndFlag != 0x0d ) { rStream.Seek( nBlocks-- * nHeaderBlockSize ); rStream >> nEndFlag; @@ -211,12 +211,12 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) } #if 0 -static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) +static sal_Bool lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) { if ( !pFilter ) - return FALSE; + return sal_False; - // TRUE for XML file or template + // sal_True for XML file or template // (template filter has no internal name -> allow configuration key names) String aName(pFilter->GetFilterName()); @@ -310,7 +310,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) SfxAllItemSet *pSet = new SfxAllItemSet( SFX_APP()->GetPool() ); TransformParameters( SID_OPENDOC, lDescriptor, *pSet ); - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); bWasReadOnly = pItem && pItem->GetValue(); @@ -333,10 +333,10 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pFilter = aMatcher.GetFilter4EA( aTypeName ); // ctor of SfxMedium uses owner transition of ItemSet - SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet ); - aMedium.UseInteractionHandler( TRUE ); + SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet ); + aMedium.UseInteractionHandler( sal_True ); - BOOL bIsStorage = aMedium.IsStorage(); + sal_Bool bIsStorage = aMedium.IsStorage(); if ( aMedium.GetErrorCode() == ERRCODE_NONE ) { // remember input stream and content and put them into the descriptor later @@ -380,7 +380,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) String aFilterName; if ( pFilter ) aFilterName = pFilter->GetName(); - aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : FALSE, &aFilterName ); + aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : sal_False, &aFilterName ); } catch( lang::WrappedTargetException& aWrap ) { @@ -441,22 +441,22 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pFilter = 0; if ( pStream ) { - SotStorageRef aStorage = new SotStorage ( pStream, FALSE ); + SotStorageRef aStorage = new SotStorage ( pStream, sal_False ); if ( !aStorage->GetError() ) { // Excel-5: detect through contained streams // there are some "excel" formats from 3rd party vendors that need to be distinguished String aStreamName(RTL_CONSTASCII_STRINGPARAM("Workbook")); - BOOL bExcel97Stream = ( aStorage->IsStream( aStreamName ) ); + sal_Bool bExcel97Stream = ( aStorage->IsStream( aStreamName ) ); aStreamName = String(RTL_CONSTASCII_STRINGPARAM("Book")); - BOOL bExcel5Stream = ( aStorage->IsStream( aStreamName ) ); + sal_Bool bExcel5Stream = ( aStorage->IsStream( aStreamName ) ); if ( bExcel97Stream || bExcel5Stream ) { if ( bExcel97Stream ) { String aOldName; - BOOL bIsCalcFilter = TRUE; + sal_Bool bIsCalcFilter = sal_True; if ( pPreselectedFilter ) { // cross filter; now this should be a type detection only, not a filter detection @@ -485,7 +485,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) else if ( bExcel5Stream ) { String aOldName; - BOOL bIsCalcFilter = TRUE; + sal_Bool bIsCalcFilter = sal_True; if ( pPreselectedFilter ) { // cross filter; now this should be a type detection only, not a filter detection @@ -529,18 +529,18 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) #define M_ALT(ANZ) (0x0200+(ANZ)) #define M_ENDE 0x8000 - static const UINT16 pLotus[] = // Lotus 1/1A/2 + static const sal_uInt16 pLotus[] = // Lotus 1/1A/2 { 0x0000, 0x0000, 0x0002, 0x0000, M_ALT(2), 0x0004, 0x0006, 0x0004, M_ENDE }; - static const UINT16 pLotusNew[] = // Lotus >= 9.7 + static const sal_uInt16 pLotusNew[] = // Lotus >= 9.7 { 0x0000, 0x0000, M_DC, 0x0000, // Rec# + Len (0x1a) M_ALT(3), 0x0003, 0x0004, 0x0005, // File Revision Code 97->ME 0x0010, 0x0004, 0x0000, 0x0000, M_ENDE }; - static const UINT16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4 + static const sal_uInt16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4 { 0x09, // lobyte of BOF rec ID (0x0009, 0x0209, 0x0409) M_ALT(3), 0x00, 0x02, 0x04, // hibyte of BOF rec ID (0x0009, 0x0209, 0x0409) M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16) @@ -550,7 +550,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x00, // hibyte of data type (0x0010, 0x0020, 0x0040) M_ENDE }; - static const UINT16 pExcel2[] = // Excel BIFF4 Workspace + static const sal_uInt16 pExcel2[] = // Excel BIFF4 Workspace { 0x09, // lobyte of BOF rec ID (0x0409) 0x04, // hibyte of BOF rec ID (0x0409) M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16) @@ -560,7 +560,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x01, // hibyte of data type (0x0100) M_ENDE }; - static const UINT16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream) + static const sal_uInt16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream) { 0x09, // lobyte of BOF rec ID (0x0809) 0x08, // hibyte of BOF rec ID (0x0809) M_ALT(4), 4, 6, 8, 16, // lobyte of BOF rec size @@ -570,7 +570,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x00, // hibyte of data type M_ENDE }; - static const UINT16 pSc10[] = // StarCalc 1.0 Dokumente + static const sal_uInt16 pSc10[] = // StarCalc 1.0 Dokumente { 'B', 'l', 'a', 'i', 's', 'e', '-', 'T', 'a', 'b', 'e', 'l', 'l', 'e', 0x000A, 0x000D, 0x0000, // Sc10CopyRight[16] M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, @@ -579,21 +579,21 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x0000, M_ENDE }; - static const UINT16 pLotus2[] = // Lotus >3 + static const sal_uInt16 pLotus2[] = // Lotus >3 { 0x0000, 0x0000, 0x001A, 0x0000, // Rec# + Len (26) M_ALT(2), 0x0000, 0x0002, // File Revision Code 0x0010, 0x0004, 0x0000, // File Revision Subcode M_ENDE }; - static const UINT16 pQPro[] = + static const sal_uInt16 pQPro[] = { 0x0000, 0x0000, 0x0002, 0x0000, M_ALT(4), 0x0001, 0x0002, // WB1, WB2 0x0006, 0x0007, // QPro 6/7 (?) 0x0010, M_ENDE }; - static const UINT16 pDIF1[] = // DIF mit CR-LF + static const sal_uInt16 pDIF1[] = // DIF mit CR-LF { 'T', 'A', 'B', 'L', 'E', M_DC, M_DC, @@ -602,7 +602,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) '\"', M_ENDE }; - static const UINT16 pDIF2[] = // DIF mit CR oder LF + static const sal_uInt16 pDIF2[] = // DIF mit CR oder LF { 'T', 'A', 'B', 'L', 'E', M_DC, @@ -611,13 +611,13 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) '\"', M_ENDE }; - static const UINT16 pSylk[] = // Sylk + static const sal_uInt16 pSylk[] = // Sylk { 'I', 'D', ';', M_ALT(3), 'P', 'N', 'E', // 'P' plus undocumented Excel extensions 'N' and 'E' M_ENDE }; - static const UINT16 *ppFilterPatterns[] = // Arrays mit Suchmustern + static const sal_uInt16 *ppFilterPatterns[] = // Arrays mit Suchmustern { pLotus, pExcel1, @@ -631,7 +631,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pLotus2, pQPro }; - const UINT16 nFilterCount = sizeof(ppFilterPatterns) / sizeof(ppFilterPatterns[0]); + const sal_uInt16 nFilterCount = sizeof(ppFilterPatterns) / sizeof(ppFilterPatterns[0]); static const sal_Char* const pFilterName[] = // zugehoerige Filter { @@ -648,43 +648,43 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pFilterQPro6 }; - // const UINT16 nByteMask = 0xFF; + // const sal_uInt16 nByteMask = 0xFF; // suchen Sie jetzt! // ... realisiert ueber 'Mustererkennung' - BYTE nAkt; - BOOL bSync; // Datei und Muster stimmen ueberein - USHORT nFilter; // Zaehler ueber alle Filter - const UINT16 *pSearch; // aktuelles Musterwort + sal_uInt8 nAkt; + sal_Bool bSync; // Datei und Muster stimmen ueberein + sal_uInt16 nFilter; // Zaehler ueber alle Filter + const sal_uInt16 *pSearch; // aktuelles Musterwort for ( nFilter = 0 ; nFilter < nFilterCount ; nFilter++ ) { rStr.Seek( 0 ); // am Anfang war alles Uebel... rStr >> nAkt; pSearch = ppFilterPatterns[ nFilter ]; - bSync = TRUE; + bSync = sal_True; while( !rStr.IsEof() && bSync ) { - register UINT16 nMuster = *pSearch; + register sal_uInt16 nMuster = *pSearch; if( nMuster < 0x0100 ) { // direkter Byte-Vergleich - if( ( BYTE ) nMuster != nAkt ) - bSync = FALSE; + if( ( sal_uInt8 ) nMuster != nAkt ) + bSync = sal_False; } else if( nMuster & M_DC ) { // don't care } else if( nMuster & M_ALT(0) ) { // alternative Bytes - BYTE nAnzAlt = ( BYTE ) nMuster; - bSync = FALSE; // zunaechst unsynchron + sal_uInt8 nAnzAlt = ( sal_uInt8 ) nMuster; + bSync = sal_False; // zunaechst unsynchron while( nAnzAlt > 0 ) { pSearch++; - if( ( BYTE ) *pSearch == nAkt ) - bSync = TRUE; // jetzt erst Synchronisierung + if( ( sal_uInt8 ) *pSearch == nAkt ) + bSync = sal_True; // jetzt erst Synchronisierung nAnzAlt--; } } @@ -700,7 +700,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) { // gefundenen Filter einstellen pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterName[ nFilter ]) ); } - bSync = FALSE; // leave inner loop + bSync = sal_False; // leave inner loop nFilter = nFilterCount; // leave outer loop } else diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 3fd9db7a0..73cc2520a 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -371,7 +371,7 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName) } } - USHORT i; + sal_uInt16 i; for (i=0; i<SC_SERVICE_COUNT; i++) { DBG_ASSERT( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash"); diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 253335403..2eae7fb74 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -102,7 +102,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : pShapePropertySet(NULL), pShapePropertyState(NULL), pImplementationId(NULL), - bIsTextShape(FALSE), + bIsTextShape(sal_False), bInitializedNotifier(false) { comphelper::increment( m_refCount ); @@ -249,22 +249,22 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo( return mxPropSetInfo; } -BOOL lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum ) +sal_Bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum ) { - USHORT nCount = rModel.GetPageCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = rModel.GetPageCount(); + for (sal_uInt16 i=0; i<nCount; i++) if ( rModel.GetPage(i) == pPage ) { rNum = static_cast<SCTAB>(i); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint ) +sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; rtl::OUString sType(xShape->getShapeType()); sal_Bool bCaptionShape(sType.equalsAscii("com.sun.star.drawing.CaptionShape")); if (bCaptionShape) @@ -273,7 +273,7 @@ BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& if (xShapeProp.is()) { xShapeProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" )) ) >>= rCaptionPoint; - bReturn = TRUE; + bReturn = sal_True; } } return bReturn; @@ -1353,7 +1353,7 @@ class ShapeUnoEventAccessImpl : public ShapeUnoEventAcess_BASE private: ScShapeObj* mpShape; - ScMacroInfo* getInfo( BOOL bCreate = FALSE ) + ScMacroInfo* getInfo( sal_Bool bCreate = sal_False ) { if( mpShape ) if( SdrObject* pObj = mpShape->GetSdrObject() ) @@ -1393,7 +1393,7 @@ public: rtl::OUString sValue; if ( pProperties->Value >>= sValue ) { - ScMacroInfo* pInfo = getInfo( TRUE ); + ScMacroInfo* pInfo = getInfo( sal_True ); DBG_ASSERT( pInfo, "shape macro info could not be created!" ); if ( !pInfo ) break; diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index 15f45ce70..9919571c7 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -85,21 +85,21 @@ ScCellSearchObj::ScCellSearchObj() : { pSearchItem = new SvxSearchItem( SCITEM_SEARCHDATA ); // Defaults: - pSearchItem->SetWordOnly(FALSE); - pSearchItem->SetExact(FALSE); - pSearchItem->SetMatchFullHalfWidthForms(FALSE); - pSearchItem->SetUseAsianOptions(FALSE); // or all asian bits would have to be handled - pSearchItem->SetBackward(FALSE); - pSearchItem->SetSelection(FALSE); - pSearchItem->SetRegExp(FALSE); - pSearchItem->SetPattern(FALSE); - pSearchItem->SetLevenshtein(FALSE); - pSearchItem->SetLEVRelaxed(FALSE); + pSearchItem->SetWordOnly(sal_False); + pSearchItem->SetExact(sal_False); + pSearchItem->SetMatchFullHalfWidthForms(sal_False); + pSearchItem->SetUseAsianOptions(sal_False); // or all asian bits would have to be handled + pSearchItem->SetBackward(sal_False); + pSearchItem->SetSelection(sal_False); + pSearchItem->SetRegExp(sal_False); + pSearchItem->SetPattern(sal_False); + pSearchItem->SetLevenshtein(sal_False); + pSearchItem->SetLEVRelaxed(sal_False); pSearchItem->SetLEVOther(2); pSearchItem->SetLEVShorter(2); pSearchItem->SetLEVLonger(2); // Calc-Flags - pSearchItem->SetRowDirection(FALSE); + pSearchItem->SetRowDirection(sal_False); pSearchItem->SetCellType(SVX_SEARCHIN_FORMULA); // Selection-Flag wird beim Aufruf gesetzt diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index e3936b7db..6f9c8cc1d 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -377,7 +377,7 @@ const SfxItemPropertyMap* lcl_GetFooterStyleMap() #define SC_FAMILYNAME_CELL "CellStyles" #define SC_FAMILYNAME_PAGE "PageStyles" -static UINT16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE }; +static sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE }; //------------------------------------------------------------------------ @@ -418,11 +418,11 @@ struct ScDisplayNameMap String aProgName; }; -const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) +const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType ) { if ( nType == SFX_STYLE_FAMILY_PARA ) { - static BOOL bCellMapFilled = FALSE; + static sal_Bool bCellMapFilled = sal_False; static ScDisplayNameMap aCellMap[6]; if ( !bCellMapFilled ) { @@ -443,13 +443,13 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) // last entry remains empty - bCellMapFilled = TRUE; + bCellMapFilled = sal_True; } return aCellMap; } else if ( nType == SFX_STYLE_FAMILY_PAGE ) { - static BOOL bPageMapFilled = FALSE; + static sal_Bool bPageMapFilled = sal_False; static ScDisplayNameMap aPageMap[3]; if ( !bPageMapFilled ) { @@ -461,7 +461,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) // last entry remains empty - bPageMapFilled = TRUE; + bPageMapFilled = sal_True; } return aPageMap; } @@ -475,7 +475,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) #define SC_SUFFIX_USER " (user)" #define SC_SUFFIX_USER_LEN 7 -BOOL lcl_EndsWithUser( const String& rString ) +sal_Bool lcl_EndsWithUser( const String& rString ) { const sal_Unicode *pChar = rString.GetBuffer(); xub_StrLen nLen = rString.Len(); @@ -490,9 +490,9 @@ BOOL lcl_EndsWithUser( const String& rString ) } // static -String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName, UINT16 nType ) +String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName, sal_uInt16 nType ) { - BOOL bDisplayIsProgrammatic = FALSE; + sal_Bool bDisplayIsProgrammatic = sal_False; const ScDisplayNameMap* pNames = lcl_GetStyleNameMap( nType ); if (pNames) @@ -502,7 +502,7 @@ String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName if (pNames->aDispName == rDispName) return pNames->aProgName; else if (pNames->aProgName == rDispName) - bDisplayIsProgrammatic = TRUE; // display name matches any programmatic name + bDisplayIsProgrammatic = sal_True; // display name matches any programmatic name } while( (++pNames)->aDispName.Len() ); } @@ -521,7 +521,7 @@ String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName } // static -String ScStyleNameConversion::ProgrammaticToDisplayName( const String& rProgName, UINT16 nType ) +String ScStyleNameConversion::ProgrammaticToDisplayName( const String& rProgName, sal_uInt16 nType ) { if ( lcl_EndsWithUser( rProgName ) ) { @@ -580,7 +580,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XStyleFamilies -ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const +ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const { if ( pDocShell ) { @@ -593,7 +593,7 @@ ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const return NULL; } -ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(UINT32 nIndex) const +ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) const { if ( nIndex < SC_STYLE_FAMILY_COUNT ) return GetObjectByType_Impl(aStyleFamilyTypes[nIndex]); @@ -699,9 +699,9 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const rtl::OUString& aURL, { // collect options - BOOL bLoadReplace = TRUE; // defaults - BOOL bLoadCellStyles = TRUE; - BOOL bLoadPageStyles = TRUE; + sal_Bool bLoadReplace = sal_True; // defaults + sal_Bool bLoadCellStyles = sal_True; + sal_Bool bLoadPageStyles = sal_True; const beans::PropertyValue* pPropArray = aOptions.getConstArray(); long nPropCount = aOptions.getLength(); @@ -732,13 +732,13 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderO beans::PropertyValue* pArray = aSequence.getArray(); pArray[0].Name = rtl::OUString::createFromAscii( SC_UNONAME_OVERWSTL ); - ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, TRUE ); + ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, sal_True ); pArray[1].Name = rtl::OUString::createFromAscii( SC_UNONAME_LOADCELL ); - ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, TRUE ); + ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, sal_True ); pArray[2].Name = rtl::OUString::createFromAscii( SC_UNONAME_LOADPAGE ); - ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, TRUE ); + ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, sal_True ); return aSequence; } @@ -771,7 +771,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XStyleFamily -ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex) +ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) { if ( pDocShell ) { @@ -781,7 +781,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex) SfxStyleSheetIterator aIter( pStylePool, eFamily ); if ( nIndex < aIter.Count() ) { - SfxStyleSheetBase* pStyle = aIter[(USHORT)nIndex]; + SfxStyleSheetBase* pStyle = aIter[(sal_uInt16)nIndex]; if ( pStyle ) { return new ScStyleObj( pDocShell, eFamily, String (pStyle->GetName()) ); @@ -819,7 +819,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const if ( pStyleObj && pStyleObj->GetFamily() == eFamily && !pStyleObj->IsInserted() ) // noch nicht eingefuegt? { - String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) )); + String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) )); ScDocument* pDoc = pDocShell->GetDocument(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); @@ -866,10 +866,10 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( pDocShell ) { - String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) )); + String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) )); ScDocument* pDoc = pDocShell->GetDocument(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); @@ -880,7 +880,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName ) SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily ); if (pStyle) { - bFound = TRUE; + bFound = sal_True; if ( eFamily == SFX_STYLE_FAMILY_PARA ) { // wie ScViewFunc::RemoveStyleSheetInUse @@ -965,7 +965,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const rtl::OUString& aName ) { ScUnoGuard aGuard; uno::Reference< style::XStyle > xObj( - GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ) )); + GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) )); if (xObj.is()) return uno::makeAny(xObj); else @@ -983,19 +983,19 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames() ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetIterator aIter( pStylePool, eFamily ); - UINT16 nCount = aIter.Count(); + sal_uInt16 nCount = aIter.Count(); String aName; uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); SfxStyleSheetBase* pStyle = aIter.First(); - UINT16 nPos = 0; + sal_uInt16 nPos = 0; while (pStyle) { DBG_ASSERT( nPos<nCount, "Anzahl durcheinandergekommen" ); if (nPos<nCount) pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName( - pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) ); + pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) ); pStyle = aIter.Next(); } return aSeq; @@ -1009,7 +1009,7 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const rtl::OUString& aName ) ScUnoGuard aGuard; if ( pDocShell ) { - String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) )); + String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) )); ScDocument* pDoc = pDocShell->GetDocument(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); @@ -1051,7 +1051,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const ::rtl::OUString& sPr } if ( nResId > 0 ) { - ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< USHORT >( nResId ) ) ); + ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< sal_uInt16 >( nResId ) ) ); aRet = uno::makeAny( sDisplayName ); } } @@ -1211,7 +1211,7 @@ rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException) ScUnoGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); if (pStyle) - return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<UINT16>(eFamily) ); + return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) ); return rtl::OUString(); } @@ -1229,7 +1229,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle ) //! DocFunc-Funktion?? //! Undo ????????????? - String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<UINT16>(eFamily) )); + String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) )); sal_Bool bOk = pStyle->SetParent( aString ); if (bOk) { @@ -1267,7 +1267,7 @@ rtl::OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException) ScUnoGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); if (pStyle) - return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) ); + return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) ); return rtl::OUString(); } @@ -1296,7 +1296,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName ) pDoc->GetPool()->CellStyleCreated( aString ); // Zellvorlagen = 2, Seitenvorlagen = 4 - UINT16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ? + sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ? SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4; SfxBindings* pBindings = pDocShell->GetViewBindings(); if (pBindings) @@ -1311,7 +1311,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName ) // static uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules() { - SvxNumRule aRule( 0, 0, TRUE ); // nothing supported + SvxNumRule aRule( 0, 0, sal_True ); // nothing supported return SvxCreateNumRule( &aRule ); } @@ -1364,7 +1364,7 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const rtl::OUString& if ( pItemSet && pResultEntry ) { - USHORT nWhich = pResultEntry->nWID; + sal_uInt16 nWhich = pResultEntry->nWID; if ( nWhich == SC_WID_UNO_TBLBORD ) { nWhich = ATTR_BORDER; @@ -1434,7 +1434,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty if ( pStyleSet && pResultEntry ) { - USHORT nWhich = pResultEntry->nWID; + sal_uInt16 nWhich = pResultEntry->nWID; if ( IsScItemWid( nWhich ) ) { @@ -1619,9 +1619,9 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti // #i22448# apply the default BoxInfoItem for page styles again // (same content as in ScStyleSheet::GetItemSet, to control the dialog) SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER ); - aBoxInfoItem.SetTable( FALSE ); - aBoxInfoItem.SetDist( TRUE ); - aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE ); + aBoxInfoItem.SetTable( sal_False ); + aBoxInfoItem.SetDist( sal_True ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True ); rSet.Put( aBoxInfoItem ); pDocShell->PageStyleModified( aStyleName, sal_True ); @@ -1750,14 +1750,14 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons // #67847# language for number formats SvNumberFormatter* pFormatter = pDocShell->GetDocument()->GetFormatTable(); - UINT32 nOldFormat = ((const SfxUInt32Item&) + sal_uInt32 nOldFormat = ((const SfxUInt32Item&) rSet.Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&) rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); nOldFormat = pFormatter-> GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang ); - UINT32 nNewFormat = 0; + sal_uInt32 nNewFormat = 0; *pValue >>= nNewFormat; rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); @@ -1774,7 +1774,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons { sal_Int16 nVal = 0; *pValue >>= nVal; - rSet.Put( SfxUInt16Item( pEntry->nWID, (USHORT)HMMToTwips(nVal) ) ); + rSet.Put( SfxUInt16Item( pEntry->nWID, (sal_uInt16)HMMToTwips(nVal) ) ); } break; case ATTR_ROTATE_VALUE: @@ -1798,18 +1798,18 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons switch( eOrient ) { case table::CellOrientation_STANDARD: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); break; case table::CellOrientation_TOPBOTTOM: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); break; case table::CellOrientation_BOTTOMTOP: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); break; case table::CellOrientation_STACKED: - rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) ); break; default: { @@ -1850,26 +1850,26 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons break; case ATTR_PAGE_PAPERBIN: { - BYTE nTray = PAPERBIN_PRINTER_SETTINGS; - BOOL bFound = FALSE; + sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS; + sal_Bool bFound = sal_False; rtl::OUString aName; if ( *pValue >>= aName ) { if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_PAPERBIN_DEFAULTNAME ) ) ) - bFound = TRUE; + bFound = sal_True; else { Printer* pPrinter = pDocShell->GetPrinter(); if (pPrinter) { String aNameStr = aName; - USHORT nCount = pPrinter->GetPaperBinCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pPrinter->GetPaperBinCount(); + for (sal_uInt16 i=0; i<nCount; i++) if ( aNameStr == pPrinter->GetPaperBinName(i) ) { - nTray = (BYTE) i; - bFound = TRUE; + nTray = (sal_uInt8) i; + bFound = sal_True; break; } } @@ -1995,7 +1995,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa if ( pItemSet && pResultEntry ) { - USHORT nWhich = pResultEntry->nWID; + sal_uInt16 nWhich = pResultEntry->nWID; if ( IsScItemWid( nWhich ) ) { @@ -2004,7 +2004,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa case ATTR_VALUE_FORMAT: if ( pDocShell ) { - UINT32 nOldFormat = ((const SfxUInt32Item&) + sal_uInt32 nOldFormat = ((const SfxUInt32Item&) pItemSet->Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&) pItemSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); @@ -2020,7 +2020,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa case ATTR_STACKED: { sal_Int32 nRot = ((const SfxInt32Item&)pItemSet->Get(ATTR_ROTATE_VALUE)).GetValue(); - BOOL bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue(); + sal_Bool bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aAny ); } break; @@ -2040,7 +2040,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa { // property PrinterPaperTray is the name of the tray - BYTE nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue(); + sal_uInt8 nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue(); rtl::OUString aName; if ( nValue == PAPERBIN_PRINTER_SETTINGS ) aName = rtl::OUString::createFromAscii( SC_PAPERBIN_DEFAULTNAME ); @@ -2117,7 +2117,7 @@ rtl::OUString SAL_CALL ScStyleObj::getImplementationName() throw(uno::RuntimeExc sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName ) throw(uno::RuntimeException) { - BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); + sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )|| rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE )); @@ -2126,7 +2126,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName uno::Sequence<rtl::OUString> SAL_CALL ScStyleObj::getSupportedServiceNames() throw(uno::RuntimeException) { - BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); + sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); uno::Sequence<rtl::OUString> aRet(2); rtl::OUString* pArray = aRet.getArray(); pArray[0] = rtl::OUString::createFromAscii( SCSTYLE_SERVICE ); diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 5d6602b40..21fbe9e59 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -245,7 +245,7 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType } if (nImgId) { - BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList aEntryImages( ScResId( bHighContrast ? RID_IMAGELIST_H_NAVCONT : RID_IMAGELIST_NAVCONT ) ); const Image& rImage = aEntryImages.GetImage( nImgId ); rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap( rImage.GetBitmapEx() )); diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index e8e1295c8..5428223b7 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -75,7 +75,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties {0,0,0,0,0,0} }; - static BOOL bTwipsSet = FALSE; + static sal_Bool bTwipsSet = sal_False; if (!bTwipsSet) { @@ -95,7 +95,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() ++pEntry; } - bTwipsSet = TRUE; + bTwipsSet = sal_True; } static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aHdFtPropertySet_Impl; @@ -140,7 +140,7 @@ void ScHeaderFooterContentObj::RemoveListener( SfxListener& rListener ) rListener.EndListening( aBC ); } -void ScHeaderFooterContentObj::UpdateText( USHORT nPart, EditEngine& rSource ) +void ScHeaderFooterContentObj::UpdateText( sal_uInt16 nPart, EditEngine& rSource ) { EditTextObject* pNew = rSource.CreateTextObject(); switch (nPart) @@ -231,13 +231,13 @@ ScHeaderFooterContentObj* ScHeaderFooterContentObj::getImplementation( //------------------------------------------------------------------------ ScHeaderFooterTextData::ScHeaderFooterTextData( ScHeaderFooterContentObj& rContent, - USHORT nP ) : + sal_uInt16 nP ) : rContentObj( rContent ), nPart( nP ), pEditEngine( NULL ), pForwarder( NULL ), - bDataValid( FALSE ), - bInUpdate( FALSE ) + bDataValid( sal_False ), + bInUpdate( sal_False ) { rContentObj.acquire(); // must not go away rContentObj.AddListener( *this ); @@ -262,7 +262,7 @@ void ScHeaderFooterTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( ((const ScHeaderFooterChangedHint&)rHint).GetPart() == nPart ) { if (!bInUpdate) // not for own updates - bDataValid = FALSE; // text has to be fetched again + bDataValid = sal_False; // text has to be fetched again } } } @@ -273,9 +273,9 @@ SvxTextForwarder* ScHeaderFooterTextData::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 @@ -313,7 +313,7 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder() if (pData) pEditEngine->SetText(*pData); - bDataValid = TRUE; + bDataValid = sal_True; return pForwarder; } @@ -321,18 +321,18 @@ void ScHeaderFooterTextData::UpdateData() { if ( pEditEngine ) { - bInUpdate = TRUE; // don't reset bDataValid during UpdateText + bInUpdate = sal_True; // don't reset bDataValid during UpdateText rContentObj.UpdateText( nPart, *pEditEngine ); - bInUpdate = FALSE; + bInUpdate = sal_False; } } //------------------------------------------------------------------------ ScHeaderFooterTextObj::ScHeaderFooterTextObj( ScHeaderFooterContentObj& rContent, - USHORT nP ) : + sal_uInt16 nP ) : aTextData( rContent, nP ), pUnoText( NULL ) { @@ -401,7 +401,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce rtl::OUString aRet; const EditTextObject* pData; - USHORT nPart = aTextData.GetPart(); + sal_uInt16 nPart = aTextData.GetPart(); ScHeaderFooterContentObj& rContentObj = aTextData.GetContentObj(); if (nPart == SC_HDFT_LEFT) @@ -413,7 +413,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce if (pData) { // for pure text, no font info is needed in pool defaults - ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE ); + ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True ); ScHeaderFieldData aData; FillDummyFieldData( aData ); @@ -431,7 +431,7 @@ void SAL_CALL ScHeaderFooterTextObj::setString( const rtl::OUString& aText ) thr String aString(aText); // for pure text, no font info is needed in pool defaults - ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE ); + ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True ); aEditEngine.SetText( aString ); aTextData.GetContentObj().UpdateText( aTextData.GetPart(), aEditEngine ); @@ -504,7 +504,7 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent( aSelection.nEndPos = aSelection.nStartPos + 1; pHeaderField->InitDoc( &aTextData.GetContentObj(), aTextData.GetPart(), aSelection ); - // #91431# for bAbsorb=FALSE, the new selection must be behind the inserted content + // #91431# for bAbsorb=sal_False, the new selection must be behind the inserted content // (the xml filter relies on this) if (!bAbsorb) aSelection.nStartPos = aSelection.nEndPos; @@ -943,7 +943,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper() pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); // TRUE: become owner of pool + pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); // TRUE: become owner of pool pForwarder = new SvxEditEngineForwarder( *pEditEngine ); pOriginalSource = new ScSimpleEditSource( pForwarder ); } @@ -988,10 +988,10 @@ ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) : pEditEngine( NULL ), pForwarder( NULL ), pOriginalSource( NULL ), - bDataValid( FALSE ), - bInUpdate( FALSE ), - bDirty( FALSE ), - bDoUpdate( TRUE ) + bDataValid( sal_False ), + bInUpdate( sal_False ), + bDirty( sal_False ), + bDoUpdate( sal_True ) { if (pDocShell) pDocShell->GetDocument()->AddUnoObject(*this); @@ -1043,12 +1043,12 @@ SvxTextForwarder* ScCellTextData::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 @@ -1086,7 +1086,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() } } - bDataValid = TRUE; + bDataValid = sal_True; return pForwarder; } @@ -1101,17 +1101,17 @@ void ScCellTextData::UpdateData() // or things like attributes after the text would be lost // (are not stored in the cell) - bInUpdate = TRUE; // prevents bDataValid from being reset + bInUpdate = sal_True; // prevents bDataValid from being reset ScDocFunc aFunc(*pDocShell); - aFunc.PutData( aCellPos, *pEditEngine, FALSE, TRUE ); // always as text + aFunc.PutData( aCellPos, *pEditEngine, sal_False, sal_True ); // always as text - bInUpdate = FALSE; - bDirty = FALSE; + bInUpdate = sal_False; + bDirty = sal_False; } } else - bDirty = TRUE; + bDirty = sal_True; } void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) @@ -1124,7 +1124,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // invalid now @@ -1135,7 +1135,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) else if ( nId == SFX_HINT_DATACHANGED ) { if (!bInUpdate) // not for own UpdateData calls - bDataValid = FALSE; // text has to be read from the cell again + bDataValid = sal_False; // text has to be read from the cell again } } } diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 5643dce45..c612e9f57 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -135,7 +135,7 @@ SC_SIMPLE_SERVICE_INFO( ScViewPaneBase, "ScViewPaneObj", "com.sun.star.sheet.Spr //------------------------------------------------------------------------ -ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP) : +ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP) : pViewShell( pViewSh ), nPane( nP ) { @@ -321,7 +321,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells() namespace { - bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, USHORT _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView ) + bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, sal_uInt16 _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView ) { if ( !_pViewShell ) return false; @@ -430,7 +430,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const //------------------------------------------------------------------------ -ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, USHORT nP) : +ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP) : ScViewPaneBase( pViewSh, nP ) { } @@ -586,7 +586,7 @@ void ScTabViewObj::SheetChanged( bool bSameTabButMoved ) uno::Reference< uno::XInterface > xSource(xView, uno::UNO_QUERY); aEvent.Source = xSource; aEvent.ActiveSheet = new ScTableSheetObj(pDocSh, pViewData->GetTabNo()); - for ( USHORT n=0; n<aActivationListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aActivationListeners.Count(); n++ ) { try { @@ -664,26 +664,26 @@ uno::Sequence<sal_Int8> SAL_CALL ScTabViewObj::getImplementationId() // XDocumentView -BOOL lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges ) +sal_Bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges ) { - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { const ScRange* pRange = rRanges.GetObject(i); if ( nTab >= pRange->aStart.Tab() && nTab <= pRange->aEnd.Tab() ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* pSelObj ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCTAB nObjectTab = 0; SdrModel* pModel = rDrawView.GetModel(); - USHORT nPageCount = pModel->GetPageCount(); - for (USHORT i=0; i<nPageCount && !bFound; i++) + sal_uInt16 nPageCount = pModel->GetPageCount(); + for (sal_uInt16 i=0; i<nPageCount && !bFound; i++) { SdrPage* pPage = pModel->GetPage(i); if (pPage) @@ -694,7 +694,7 @@ void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* { if ( pObject == pSelObj ) { - bFound = TRUE; + bFound = sal_True; nObjectTab = static_cast<SCTAB>(i); } pObject = aIter.Next(); @@ -716,11 +716,11 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) ScTabViewShell* pViewSh = GetViewShell(); if ( !pViewSh ) - return FALSE; + return sal_False; //! Type of aSelection can be some specific interface instead of XInterface - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY); if ( !xInterface.is() ) //clear all selections { @@ -732,7 +732,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } else //#102232#; if there is no DrawView remove range selection pViewSh->Unmark(); - bRet = TRUE; + bRet = sal_True; } if (bDrawSelModeSet) // remove DrawSelMode if set by API; if necessary it will be set again later @@ -773,13 +773,13 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if (pDisp) pDisp->Execute( pFunc->GetSlotID(), SFX_CALLMODE_SYNCHRON ); } - pViewSh->SetDrawShell(FALSE); - pViewSh->SetDrawSelMode(FALSE); // nach dem Dispatcher-Execute + pViewSh->SetDrawShell(sal_False); + pViewSh->SetDrawSelMode(sal_False); // nach dem Dispatcher-Execute // Ranges selektieren const ScRangeList& rRanges = pRangesImp->GetRangeList(); - ULONG nRangeCount = rRanges.Count(); + sal_uLong nRangeCount = rRanges.Count(); // for empty range list, remove selection (cursor remains where it was) if ( nRangeCount == 0 ) pViewSh->Unmark(); @@ -794,7 +794,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) pViewSh->SetTabNo( pFirst->aStart.Tab() ); pViewSh->DoneBlockMode(); pViewSh->InitOwnBlockMode(); - pViewData->GetMarkData().MarkFromRangeList( rRanges, TRUE ); + pViewData->GetMarkData().MarkFromRangeList( rRanges, sal_True ); pViewSh->MarkDataChanged(); pViewData->GetDocShell()->PostPaintGridAll(); // Markierung (alt&neu) if ( pFirst ) @@ -806,7 +806,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) //! Methode an der View, um RangeList zu selektieren } - bRet = TRUE; + bRet = sal_True; } } else if ( pShapeImp || xShapeColl.is() ) // Drawing-Layer @@ -827,7 +827,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if ( pPV && pObj->GetPage() == pPV->GetPage() ) { pDrawView->MarkObj( pObj, pPV ); - bRet = TRUE; + bRet = sal_True; } } } @@ -876,14 +876,14 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } } if (bAllMarked) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; // empty XShapes (all shapes are deselected) + bRet = sal_True; // empty XShapes (all shapes are deselected) } if (bRet) - pViewSh->SetDrawShell(TRUE); + pViewSh->SetDrawShell(sal_True); } } @@ -906,7 +906,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) if (pDrawView) { const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if (nMarkCount) { // ShapeCollection erzeugen (wie in SdXImpressView::getSelection im Draw) @@ -915,7 +915,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) SvxShapeCollection* pShapes = new SvxShapeCollection(); uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pShapes)); - for (ULONG i=0; i<nMarkCount; i++) + for (sal_uLong i=0; i<nMarkCount; i++) { SdrObject* pDrawObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); if (pDrawObj) @@ -951,7 +951,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) ScMarkData aFilteredMark( rMark ); ScViewUtil::UnmarkFiltered( aFilteredMark, pDocSh->GetDocument()); ScRangeList aRangeList; - aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE); + aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_False); // Theoretically a selection may start and end on a filtered row. switch (aRangeList.Count()) { @@ -991,7 +991,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) // remember if the selection was from the cursor position without anything selected // (used when rendering the selection) - pObj->SetCursorOnly( TRUE ); + pObj->SetCursorOnly( sal_True ); } } @@ -1008,7 +1008,7 @@ rtl::OUString ScTabViewObj::getPrinterName(void) const ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE); + SfxPrinter* pPrinter = pViewSh->GetPrinter(sal_True); if (pPrinter) return pPrinter->GetName(); } @@ -1025,7 +1025,7 @@ void ScTabViewObj::setPrinterName(const rtl::OUString& PrinterName) ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE); + SfxPrinter* pPrinter = pViewSh->GetPrinter(sal_True); if (pPrinter) { String aString(PrinterName); @@ -1073,7 +1073,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; ScTabViewShell* pViewSh = GetViewShell(); - USHORT nPanes = 0; + sal_uInt16 nPanes = 0; if (pViewSh) { nPanes = 1; @@ -1091,7 +1091,7 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xPane.is()) return uno::makeAny(xPane); else @@ -1113,7 +1113,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasElements() throw(uno::RuntimeException) // XSpreadsheetView -ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const +ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const { static ScSplitPos ePosHV[4] = { SC_SPLIT_TOPLEFT, SC_SPLIT_BOTTOMLEFT, SC_SPLIT_TOPRIGHT, SC_SPLIT_BOTTOMRIGHT }; @@ -1122,22 +1122,22 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const if (pViewSh) { ScSplitPos eWhich = SC_SPLIT_BOTTOMLEFT; // default Position - BOOL bError = FALSE; + sal_Bool bError = sal_False; ScViewData* pViewData = pViewSh->GetViewData(); - BOOL bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE ); - BOOL bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE ); + sal_Bool bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE ); + sal_Bool bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE ); if ( bHor && bVer ) { // links oben, links unten, rechts oben, rechts unten - wie in Excel if ( nIndex < 4 ) eWhich = ePosHV[nIndex]; else - bError = TRUE; + bError = sal_True; } else if ( bHor ) { if ( nIndex > 1 ) - bError = TRUE; + bError = sal_True; else if ( nIndex == 1 ) eWhich = SC_SPLIT_BOTTOMRIGHT; // sonst SC_SPLIT_BOTTOMLEFT @@ -1145,16 +1145,16 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const else if ( bVer ) { if ( nIndex > 1 ) - bError = TRUE; + bError = sal_True; else if ( nIndex == 0 ) eWhich = SC_SPLIT_TOPLEFT; // sonst SC_SPLIT_BOTTOMLEFT } else if ( nIndex > 0 ) - bError = TRUE; // nicht geteilt: nur 0 gueltig + bError = sal_True; // nicht geteilt: nur 0 gueltig if (!bError) - return new ScViewPaneObj( pViewSh, sal::static_int_cast<USHORT>(eWhich) ); + return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) ); } return NULL; @@ -1230,7 +1230,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP Window* pActiveWin = pData->GetActiveWin(); Point aPos = pActiveWin->PixelToLogic(rPoint); - USHORT nHitLog = (USHORT) pActiveWin->PixelToLogic( + sal_uInt16 nHitLog = (sal_uInt16) pActiveWin->PixelToLogic( Size(pDrawView->GetHitTolerancePixel(),0)).Width(); sal_uInt32 nCount(pDrawPage->GetObjCount()); @@ -1283,7 +1283,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e ) aMouseEvent.PopupTrigger = e.PopupTrigger; aMouseEvent.Target = xTarget; - for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ ) + for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ ) { try { @@ -1377,7 +1377,7 @@ sal_Bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e ) aMouseEvent.PopupTrigger = e.PopupTrigger; aMouseEvent.Target = xTarget; - for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ ) + for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ ) { try { @@ -1403,10 +1403,10 @@ void ScTabViewObj::StartMouseListening() void ScTabViewObj::EndMouseListening() { - USHORT nCount(aMouseClickHandlers.Count()); + sal_uInt16 nCount(aMouseClickHandlers.Count()); lang::EventObject aEvent; aEvent.Source = (cppu::OWeakObject*)this; - for ( USHORT n=0; n<nCount; n++ ) + for ( sal_uInt16 n=0; n<nCount; n++ ) { try { @@ -1425,10 +1425,10 @@ void ScTabViewObj::StartActivationListening() void ScTabViewObj::EndActivationListening() { - USHORT nCount = aActivationListeners.Count(); + sal_uInt16 nCount = aActivationListeners.Count(); lang::EventObject aEvent; aEvent.Source = (cppu::OWeakObject*)this; - for ( USHORT n=0; n<nCount; n++ ) + for ( sal_uInt16 n=0; n<nCount; n++ ) { try { @@ -1448,7 +1448,7 @@ void SAL_CALL ScTabViewObj::addEnhancedMouseClickHandler( const uno::Reference< if (aListener.is()) { - USHORT nCount = aMouseClickHandlers.Count(); + sal_uInt16 nCount = aMouseClickHandlers.Count(); uno::Reference<awt::XEnhancedMouseClickHandler> *pObj = new uno::Reference<awt::XEnhancedMouseClickHandler>( aListener ); aMouseClickHandlers.Insert( pObj, nCount ); @@ -1462,8 +1462,8 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc throw (uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aMouseClickHandlers.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aMouseClickHandlers.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<awt::XEnhancedMouseClickHandler> *pObj = aMouseClickHandlers[n]; if ( *pObj == aListener ) @@ -1482,7 +1482,7 @@ void SAL_CALL ScTabViewObj::addActivationEventListener( const uno::Reference< sh if (aListener.is()) { - USHORT nCount = aActivationListeners.Count(); + sal_uInt16 nCount = aActivationListeners.Count(); uno::Reference<sheet::XActivationEventListener> *pObj = new uno::Reference<sheet::XActivationEventListener>( aListener ); aActivationListeners.Insert( pObj, nCount ); @@ -1496,8 +1496,8 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference< throw (uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aActivationListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aActivationListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<sheet::XActivationEventListener> *pObj = aActivationListeners[n]; if ( *pObj == aListener ) @@ -1511,16 +1511,16 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference< #if 0 -BOOL ScTabViewObj::getPagebreakMode(void) const +sal_Bool ScTabViewObj::getPagebreakMode(void) const { ScUnoGuard aGuard; ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) return pViewSh->GetViewData()->IsPagebreakMode(); - return FALSE; + return sal_False; } -void ScTabViewObj::setPagebreakMode(BOOL PagebreakMode) +void ScTabViewObj::setPagebreakMode(sal_Bool PagebreakMode) { ScUnoGuard aGuard; ScTabViewShell* pViewSh = GetViewShell(); @@ -1530,18 +1530,18 @@ void ScTabViewObj::setPagebreakMode(BOOL PagebreakMode) #endif -INT16 ScTabViewObj::GetZoom(void) const +sal_Int16 ScTabViewObj::GetZoom(void) const { ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { const Fraction& rZoomY = pViewSh->GetViewData()->GetZoomY(); // Y wird angezeigt - return (INT16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator()); + return (sal_Int16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator()); } return 0; } -void ScTabViewObj::SetZoom(INT16 nZoom) +void ScTabViewObj::SetZoom(sal_Int16 nZoom) { ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) @@ -1558,7 +1558,7 @@ void ScTabViewObj::SetZoom(INT16 nZoom) } } Fraction aFract( nZoom, 100 ); - pViewSh->SetZoom( aFract, aFract, TRUE ); + pViewSh->SetZoom( aFract, aFract, sal_True ); pViewSh->PaintGrid(); pViewSh->PaintTop(); pViewSh->PaintLeft(); @@ -1567,9 +1567,9 @@ void ScTabViewObj::SetZoom(INT16 nZoom) } } -INT16 ScTabViewObj::GetZoomType(void) const +sal_Int16 ScTabViewObj::GetZoomType(void) const { - INT16 aZoomType = view::DocumentZoomType::OPTIMAL; + sal_Int16 aZoomType = view::DocumentZoomType::OPTIMAL; ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { @@ -1596,7 +1596,7 @@ INT16 ScTabViewObj::GetZoomType(void) const return aZoomType; } -void ScTabViewObj::SetZoomType(INT16 aZoomType) +void ScTabViewObj::SetZoomType(sal_Int16 aZoomType) { ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) @@ -1639,11 +1639,11 @@ void ScTabViewObj::SetZoomType(INT16 aZoomType) { case SVX_ZOOM_WHOLEPAGE: case SVX_ZOOM_PAGEWIDTH: - pView->SetZoomType( eZoomType, TRUE ); + pView->SetZoomType( eZoomType, sal_True ); break; default: - pView->SetZoomType( SVX_ZOOM_PERCENT, TRUE ); + pView->SetZoomType( SVX_ZOOM_PERCENT, sal_True ); } SetZoom( nZoom ); } @@ -1663,7 +1663,7 @@ sal_Bool SAL_CALL ScTabViewObj::getIsWindowSplit() throw(uno::RuntimeException) pViewData->GetVSplitMode() == SC_SPLIT_NORMAL ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException) @@ -1679,7 +1679,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException) pViewData->GetVSplitMode() == SC_SPLIT_FIX ); } - return FALSE; + return sal_False; } sal_Int32 SAL_CALL ScTabViewObj::getSplitHorizontal() throw(uno::RuntimeException) @@ -1725,7 +1725,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn() throw(uno::RuntimeException) SCsCOL nCol; SCsROW nRow; - pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, FALSE ); + pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, sal_False ); if ( nCol > 0 ) return nCol; } @@ -1747,7 +1747,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitRow() throw(uno::RuntimeException) ScSplitPos ePos = SC_SPLIT_TOPLEFT; // es ist vertikal geteilt SCsCOL nCol; SCsROW nRow; - pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, FALSE ); + pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, sal_False ); if ( nRow > 0 ) return nRow; } @@ -1762,8 +1762,8 @@ void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixel ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), TRUE, TRUE ); - pViewSh->FreezeSplitters( FALSE ); + pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), sal_True, sal_True ); + pViewSh->FreezeSplitters( sal_False ); pViewSh->InvalidateSplit(); } } @@ -1785,11 +1785,11 @@ void SAL_CALL ScTabViewObj::freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRow aWinStart = pWin->GetPosPixel(); ScViewData* pViewData = pViewSh->GetViewData(); - Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, TRUE )); + Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, sal_True )); aSplit += aWinStart; - pViewSh->SplitAtPixel( aSplit, TRUE, TRUE ); - pViewSh->FreezeSplitters( TRUE ); + pViewSh->SplitAtPixel( aSplit, sal_True, sal_True ); + pViewSh->FreezeSplitters( sal_True ); pViewSh->InvalidateSplit(); } } @@ -1809,8 +1809,8 @@ void SAL_CALL ScTabViewObj::removeSelectionChangeListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aSelectionListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aSelectionListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<view::XSelectionChangeListener> *pObj = aSelectionListeners[n]; if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface? @@ -1825,7 +1825,7 @@ void ScTabViewObj::SelectionChanged() { lang::EventObject aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aSelectionListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aSelectionListeners.Count(); n++ ) (*aSelectionListeners[n])->selectionChanged( aEvent ); // handle sheet events @@ -2062,8 +2062,8 @@ void SAL_CALL ScTabViewObj::removePropertyChangeListener( const ::rtl::OUString& uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aPropertyChgListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aPropertyChgListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<beans::XPropertyChangeListener> *pObj = aPropertyChgListeners[n]; if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface? @@ -2094,7 +2094,7 @@ void ScTabViewObj::VisAreaChanged() { beans::PropertyChangeEvent aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aPropertyChgListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aPropertyChgListeners.Count(); n++ ) (*aPropertyChgListeners[n])->propertyChange( aEvent ); } @@ -2109,9 +2109,9 @@ void SAL_CALL ScTabViewObj::startRangeSelection( if (pViewSh) { String aInitVal, aTitle; - BOOL bCloseOnButtonUp = FALSE; - BOOL bSingleCell = FALSE; - BOOL bMultiSelection = FALSE; + sal_Bool bCloseOnButtonUp = sal_False; + sal_Bool bSingleCell = sal_False; + sal_Bool bMultiSelection = sal_False; rtl::OUString aStrVal; const beans::PropertyValue* pPropArray = aArguments.getConstArray(); @@ -2166,8 +2166,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRangeSelListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRangeSelListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<sheet::XRangeSelectionListener> *pObj = aRangeSelListeners[n]; if ( *pObj == xListener ) @@ -2193,8 +2193,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionChangeListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRangeChgListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRangeChgListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<sheet::XRangeSelectionChangeListener> *pObj = aRangeChgListeners[n]; if ( *pObj == xListener ) @@ -2211,7 +2211,7 @@ void ScTabViewObj::RangeSelDone( const String& rText ) aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.RangeDescriptor = rtl::OUString( rText ); - for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ ) (*aRangeSelListeners[n])->done( aEvent ); } @@ -2221,7 +2221,7 @@ void ScTabViewObj::RangeSelAborted( const String& rText ) aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.RangeDescriptor = rtl::OUString( rText ); - for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ ) (*aRangeSelListeners[n])->aborted( aEvent ); } @@ -2231,7 +2231,7 @@ void ScTabViewObj::RangeSelChanged( const String& rText ) aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.RangeDescriptor = rtl::OUString( rText ); - for ( USHORT n=0; n<aRangeChgListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRangeChgListeners.Count(); n++ ) (*aRangeChgListeners[n])->descriptorChanged( aEvent ); } @@ -2332,7 +2332,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref ScUnoGuard aGuard; ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ); if (pShell) - pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), FALSE ); + pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), sal_False ); else { ScDrawTextObjectBar* pTextShell = PTR_CAST( ScDrawTextObjectBar, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ); @@ -2343,7 +2343,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref OutlinerView* pOutView = pView->GetTextEditOutlinerView(); if ( pOutView ) { - pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), FALSE ); + pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), sal_False ); return; } } diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 77f80b889..436defe17 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -167,7 +167,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel ) ScTabViewShell* pViewShell = getBestViewShell( xModel ); if ( pViewShell ) { - pViewShell->CutToClip( NULL, TRUE ); + pViewShell->CutToClip( NULL, sal_True ); // mark the copied transfer object so it is used in ScVbaRange::Insert ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL ); @@ -176,7 +176,7 @@ implnCut( const uno::Reference< frame::XModel>& xModel ) } } -void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose) +void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose) { PasteCellsWarningReseter resetWarningBox; sal_Bool bAsLink(sal_False), bOtherDoc(sal_False); @@ -202,7 +202,7 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, USHORT nFl } pTabViewShell->PasteFromClip( nFlags, pDoc, nFunction, bSkipEmpty, bTranspose, bAsLink, - eMoveMode, IDF_NONE, TRUE ); + eMoveMode, IDF_NONE, sal_True ); pTabViewShell->CellContentChanged(); } } diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 02dbf74bf..c8e81d24c 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -229,7 +229,7 @@ uno::Any SAL_CALL ScVbaFont::getSize() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_HEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getSize(); } @@ -256,7 +256,7 @@ uno::Any SAL_CALL ScVbaFont::getColorIndex() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_COLOR, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getColorIndex(); } @@ -355,7 +355,7 @@ uno::Any SAL_CALL ScVbaFont::getBold() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_WEIGHT, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getBold(); } @@ -398,7 +398,7 @@ uno::Any SAL_CALL ScVbaFont::getUnderline() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_UNDERLINE, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); sal_Int32 nValue = awt::FontUnderline::NONE; @@ -425,7 +425,7 @@ uno::Any SAL_CALL ScVbaFont::getStrikethrough() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getStrikethrough(); } @@ -434,7 +434,7 @@ uno::Any SAL_CALL ScVbaFont::getShadow() throw (uno::RuntimeException) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_SHADOWED, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getShadow(); } @@ -443,7 +443,7 @@ uno::Any SAL_CALL ScVbaFont::getItalic() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_POSTURE, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getItalic(); @@ -453,7 +453,7 @@ uno::Any SAL_CALL ScVbaFont::getName() throw ( uno::RuntimeException ) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return ScVbaFont_BASE::getName(); } @@ -476,7 +476,7 @@ uno::Any SAL_CALL ScVbaFont::getOutlineFont() throw (uno::RuntimeException) { if ( GetDataSet() ) - if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, TRUE, NULL) == SFX_ITEM_DONTCARE ) + if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); return mxFont->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharContoured" ) ) ); } diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index c9df5c256..35acf878d 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -582,8 +582,8 @@ ScVbaFormat<Ifc1>::getLocked( ) throw (script::BasicErrorException, uno::Runtim SfxItemSet* pDataSet = getCurrentDataSet(); if ( pDataSet ) { - const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, TRUE); - SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, TRUE, NULL); + const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, sal_True); + SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, sal_True, NULL); if(eState != SFX_ITEM_DONTCARE) aCellProtection = uno::makeAny(rProtAttr.GetProtection()); } @@ -615,8 +615,8 @@ ScVbaFormat<Ifc1>::getFormulaHidden( ) throw (script::BasicErrorException, uno: SfxItemSet* pDataSet = getCurrentDataSet(); if ( pDataSet ) { - const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, TRUE); - SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, TRUE, NULL); + const ScProtectionAttr& rProtAttr = (const ScProtectionAttr &) pDataSet->Get(ATTR_PROTECTION, sal_True); + SfxItemState eState = pDataSet->GetItemState(ATTR_PROTECTION, sal_True, NULL); if(eState != SFX_ITEM_DONTCARE) aBoolRet = uno::makeAny(rProtAttr.GetHideFormula()); } diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx index 1248b4c73..847052138 100644 --- a/sc/source/ui/vba/vbahelper.cxx +++ b/sc/source/ui/vba/vbahelper.cxx @@ -160,7 +160,7 @@ public: } }; -void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall) +void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, sal_uInt16 nSlot, SfxCallMode nCall) { ScTabViewShell* pViewShell = getBestViewShell( xModel ); SfxViewFrame* pViewFrame = NULL; @@ -202,10 +202,10 @@ implnCut() { ScTabViewShell* pViewShell = getCurrentBestViewShell(); if ( pViewShell ) - pViewShell->CutToClip( NULL, TRUE ); + pViewShell->CutToClip( NULL, sal_True ); } -void implnPasteSpecial(USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose) +void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpty, sal_Bool bTranspose) { PasteCellsWarningReseter resetWarningBox; sal_Bool bAsLink(sal_False), bOtherDoc(sal_False); @@ -231,7 +231,7 @@ void implnPasteSpecial(USHORT nFlags,USHORT nFunction,sal_Bool bSkipEmpty, sal_B pDoc = pOwnClip->GetDocument(); pTabViewShell->PasteFromClip( nFlags, pDoc, nFunction, bSkipEmpty, bTranspose, bAsLink, - eMoveMode, IDF_NONE, TRUE ); + eMoveMode, IDF_NONE, sal_True ); pTabViewShell->CellContentChanged(); } } @@ -460,7 +460,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C } } else - pDispatcher->Execute( (USHORT)SID_PRINTDOC, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs ); + pDispatcher->Execute( (sal_uInt16)SID_PRINTDOC, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs ); } } diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index 529b9a273..3675aa2d9 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -48,7 +48,7 @@ bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRan if( (rScInner.Count() == 0) || (rScOuter.Count() == 0) ) throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Empty range objects" ) ), uno::Reference< uno::XInterface >() ); - for( ULONG nIndex = 0, nCount = rScInner.Count(); nIndex < nCount; ++nIndex ) + for( sal_uLong nIndex = 0, nCount = rScInner.Count(); nIndex < nCount; ++nIndex ) if( !rScOuter.In( *rScInner.GetObject( nIndex ) ) ) return false; return true; diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index eeba5be38..82911a3b0 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -76,7 +76,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeEx if( nCount ) { ScAddress::Details aDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 ); - USHORT nFlags = SCA_VALID; + sal_uInt16 nFlags = SCA_VALID; nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE ); ScRangeList aRangeList; for( sal_Int32 i=0; i<nCount; i++ ) @@ -109,7 +109,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw if( getScRangeListForAddress( rAreas, excel::getDocShell( mxModel ) , aRange, aCellRanges ) ) { uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.Count() ); - USHORT i=0; + sal_uInt16 i=0; for( ScRange* pRange = aCellRanges.First(); pRange; pRange = aCellRanges.Next() ) { table::CellRangeAddress aRangeAddress; @@ -148,7 +148,7 @@ uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeEx void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException) { - USHORT scaleToPageY = 0; + sal_uInt16 scaleToPageY = 0; try { sal_Bool aValue; @@ -171,7 +171,7 @@ uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeEx void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException) { - USHORT scaleToPageX = 0; + sal_uInt16 scaleToPageX = 0; try { sal_Bool aValue = sal_False; @@ -194,7 +194,7 @@ uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException) void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException) { - USHORT pageScale = 0; + sal_uInt16 pageScale = 0; try { if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN ) @@ -216,7 +216,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru } // these only exist in S08 - USHORT nScale = 0; + sal_uInt16 nScale = 0; mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale )); mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale )); mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale )); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 843f61cbe..fc9988613 100755 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -188,13 +188,13 @@ double lcl_hmmToPoints( double nVal ) { return ( (double)((nVal /1000 ) * 567 ) static const sal_Int16 supportedIndexTable[] = { excel::XlBordersIndex::xlEdgeLeft, excel::XlBordersIndex::xlEdgeTop, excel::XlBordersIndex::xlEdgeBottom, excel::XlBordersIndex::xlEdgeRight, excel::XlBordersIndex::xlDiagonalDown, excel::XlBordersIndex::xlDiagonalUp, excel::XlBordersIndex::xlInsideVertical, excel::XlBordersIndex::xlInsideHorizontal }; -USHORT lcl_pointsToTwips( double nVal ) +sal_uInt16 lcl_pointsToTwips( double nVal ) { nVal = nVal * static_cast<double>(20); short nTwips = static_cast<short>(nVal); return nTwips; } -double lcl_TwipsToPoints( USHORT nVal ) +double lcl_TwipsToPoints( sal_uInt16 nVal ) { double nPoints = nVal; return nPoints / 20; @@ -549,7 +549,7 @@ public: { SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( pUnoCellRange ); - SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, TRUE, NULL); + SfxItemState eState = pDataSet->GetItemState( ATTR_VALUE_FORMAT, sal_True, NULL); // one of the cells in the range is not like the other ;-) // so return a zero length format to indicate that if ( eState == SFX_ITEM_DONTCARE ) @@ -1151,7 +1151,7 @@ public: }; bool -getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv ) +getCellRangesForAddress( sal_uInt16& rResFlags, const rtl::OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv ) { ScDocument* pDoc = NULL; @@ -1159,8 +1159,8 @@ getCellRangesForAddress( USHORT& rResFlags, const rtl::OUString& sAddress, ScDoc { pDoc = pDocSh->GetDocument(); String aString(sAddress); - USHORT nMask = SCA_VALID; - //USHORT nParse = rCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_A1 ); + sal_uInt16 nMask = SCA_VALID; + //sal_uInt16 nParse = rCellRanges.Parse( sAddress, pDoc, nMask, formula::FormulaGrammar::CONV_XL_A1 ); rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, 0 ); if ( rResFlags & SCA_VALID ) { @@ -1205,7 +1205,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S eConv = pDocSh->GetDocument()->GetAddressConvention(); } - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( !getCellRangesForAddress( nFlags, sAddress, pDocSh, aCellRanges, eConv ) ) return false; @@ -2028,7 +2028,7 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut if ( refStyle == excel::XlReferenceStyle::xlR1C1 ) dDetails = ScAddress::Details( formula::FormulaGrammar::CONV_XL_R1C1, 0, 0 ); } - USHORT nFlags = SCA_VALID; + sal_uInt16 nFlags = SCA_VALID; ScDocShell* pDocShell = getScDocShell(); ScDocument* pDoc = pDocShell->GetDocument(); @@ -2036,8 +2036,8 @@ ScVbaRange::Address( const uno::Any& RowAbsolute, const uno::Any& ColumnAbsolut table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) ); String sRange; - USHORT ROW_ABSOLUTE = ( SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE ); - USHORT COL_ABSOLUTE = ( SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE ); + sal_uInt16 ROW_ABSOLUTE = ( SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE ); + sal_uInt16 COL_ABSOLUTE = ( SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE ); // default nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE ); if ( RowAbsolute.hasValue() ) @@ -2225,7 +2225,7 @@ void setCursor( const SCCOL& nCol, const SCROW& nRow, const uno::Reference< fra if ( bInSel ) pShell->SetCursor( nCol, nRow ); else - pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, FALSE, FALSE, TRUE, FALSE ); + pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, sal_False, sal_False, sal_True, sal_False ); } } @@ -2607,7 +2607,7 @@ ScVbaRange::getWrapText() throw (script::BasicErrorException, uno::RuntimeExcept SfxItemSet* pDataSet = getCurrentDataSet(); - SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, TRUE, NULL); + SfxItemState eState = pDataSet->GetItemState( ATTR_LINEBREAK, sal_True, NULL); if ( eState == SFX_ITEM_DONTCARE ) return aNULL(); @@ -2747,10 +2747,10 @@ uno::Any SAL_CALL ScVbaRange::getCellRange( ) throw (uno::RuntimeException) throw uno::RuntimeException(); } -static USHORT +static sal_uInt16 getPasteFlags (sal_Int32 Paste) { - USHORT nFlags = IDF_NONE; + sal_uInt16 nFlags = IDF_NONE; switch (Paste) { case excel::XlPasteType::xlPasteComments: nFlags = IDF_NOTE;break; @@ -2778,10 +2778,10 @@ getPasteFlags (sal_Int32 Paste) return nFlags; } -static USHORT +static sal_uInt16 getPasteFormulaBits( sal_Int32 Operation) { - USHORT nFormulaBits = PASTE_NOFUNC ; + sal_uInt16 nFormulaBits = PASTE_NOFUNC ; switch (Operation) { case excel::XlPasteSpecialOperation::xlPasteSpecialOperationAdd: @@ -2828,8 +2828,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons if ( Transpose.hasValue() ) Transpose >>= bTranspose; - USHORT nFlags = getPasteFlags(nPaste); - USHORT nFormulaBits = getPasteFormulaBits(nOperation); + sal_uInt16 nFlags = getPasteFlags(nPaste); + sal_uInt16 nFormulaBits = getPasteFormulaBits(nOperation); excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose); // restore selection xSelection->select( uno::makeAny( xSel ) ); @@ -3357,9 +3357,9 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& nOrientation = ::comphelper::getINT16( Orientation ); // persist new option to be next calls default if ( nOrientation == excel::XlSortOrientation::xlSortRows ) - aSortParam.bByRow = FALSE; + aSortParam.bByRow = sal_False; else - aSortParam.bByRow = TRUE; + aSortParam.bByRow = sal_True; } @@ -3419,26 +3419,26 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& { nOrder1 = ::comphelper::getINT16(Order1); if ( nOrder1 == excel::XlSortOrder::xlAscending ) - aSortParam.bAscending[0] = TRUE; + aSortParam.bAscending[0] = sal_True; else - aSortParam.bAscending[0] = FALSE; + aSortParam.bAscending[0] = sal_False; } if ( Order2.hasValue() ) { nOrder2 = ::comphelper::getINT16(Order2); if ( nOrder2 == excel::XlSortOrder::xlAscending ) - aSortParam.bAscending[1] = TRUE; + aSortParam.bAscending[1] = sal_True; else - aSortParam.bAscending[1] = FALSE; + aSortParam.bAscending[1] = sal_False; } if ( Order3.hasValue() ) { nOrder3 = ::comphelper::getINT16(Order3); if ( nOrder3 == excel::XlSortOrder::xlAscending ) - aSortParam.bAscending[2] = TRUE; + aSortParam.bAscending[2] = sal_True; else - aSortParam.bAscending[2] = FALSE; + aSortParam.bAscending[2] = sal_False; } uno::Reference< table::XCellRange > xKey1; @@ -3526,7 +3526,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException) aArgs.Put( sfxAsync, sfxAsync.Which() ); SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher(); - USHORT nSID = 0; + sal_uInt16 nSID = 0; switch( Direction ) { @@ -3683,7 +3683,7 @@ double ScVbaRange::getCalcColWidth( const table::CellRangeAddress& rAddress) throw (uno::RuntimeException) { ScDocument* pDoc = getScDocument(); - USHORT nWidth = pDoc->GetOriginalWidth( static_cast< SCCOL >( rAddress.StartColumn ), static_cast< SCTAB >( rAddress.Sheet ) ); + sal_uInt16 nWidth = pDoc->GetOriginalWidth( static_cast< SCCOL >( rAddress.StartColumn ), static_cast< SCTAB >( rAddress.Sheet ) ); double nPoints = lcl_TwipsToPoints( nWidth ); nPoints = lcl_Round2DecPlaces( nPoints ); return nPoints; @@ -3693,7 +3693,7 @@ double ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (uno::RuntimeException) { ScDocument* pDoc = getDocumentFromRange( mxRange ); - USHORT nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet ); + sal_uInt16 nWidth = pDoc->GetOriginalHeight( rAddress.StartRow, rAddress.Sheet ); double nPoints = lcl_TwipsToPoints( nWidth ); nPoints = lcl_Round2DecPlaces( nPoints ); return nPoints; @@ -3732,11 +3732,11 @@ ScVbaRange::getColumnWidth() throw (uno::RuntimeException) table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); sal_Int32 nStartCol = thisAddress.StartColumn; sal_Int32 nEndCol = thisAddress.EndColumn; - USHORT nColTwips = 0; + sal_uInt16 nColTwips = 0; for( sal_Int32 nCol = nStartCol ; nCol <= nEndCol; ++nCol ) { thisAddress.StartColumn = nCol; - USHORT nCurTwips = pShell->GetDocument()->GetOriginalWidth( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCTAB >( thisAddress.Sheet ) ); + sal_uInt16 nCurTwips = pShell->GetDocument()->GetOriginalWidth( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCTAB >( thisAddress.Sheet ) ); if ( nCol == nStartCol ) nColTwips = nCurTwips; if ( nColTwips != nCurTwips ) @@ -3773,15 +3773,15 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeEx nColWidth = ( nColWidth + fExtraWidth ) * getDefaultCharWidth( pDocShell ); RangeHelper thisRange( mxRange ); table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); - USHORT nTwips = lcl_pointsToTwips( nColWidth ); + sal_uInt16 nTwips = lcl_pointsToTwips( nColWidth ); ScDocFunc aFunc(*pDocShell); SCCOLROW nColArr[2]; nColArr[0] = thisAddress.StartColumn; nColArr[1] = thisAddress.EndColumn; // #163561# use mode SC_SIZE_DIRECT: hide for width 0, show for other values - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, thisAddress.Sheet, SC_SIZE_DIRECT, - nTwips, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, thisAddress.Sheet, SC_SIZE_DIRECT, + nTwips, sal_True, sal_True ); } } @@ -3896,7 +3896,7 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException) sal_Int32 nStartRow = thisAddress.StartRow; sal_Int32 nEndRow = thisAddress.EndRow; - USHORT nRowTwips = 0; + sal_uInt16 nRowTwips = 0; // #TODO probably possible to use the SfxItemSet ( and see if // SFX_ITEM_DONTCARE is set ) to improve performance // #CHECKME looks like this is general behaviour not just row Range specific @@ -3907,7 +3907,7 @@ ScVbaRange::getRowHeight() throw (uno::RuntimeException) for ( sal_Int32 nRow = nStartRow ; nRow <= nEndRow; ++nRow ) { thisAddress.StartRow = nRow; - USHORT nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet ); + sal_uInt16 nCurTwips = pShell->GetDocument()->GetOriginalHeight( thisAddress.StartRow, thisAddress.Sheet ); if ( nRow == nStartRow ) nRowTwips = nCurTwips; if ( nRowTwips != nCurTwips ) @@ -3936,7 +3936,7 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) throw (uno::RuntimeExcepti nHeight = lcl_Round2DecPlaces( nHeight ); RangeHelper thisRange( mxRange ); table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); - USHORT nTwips = lcl_pointsToTwips( nHeight ); + sal_uInt16 nTwips = lcl_pointsToTwips( nHeight ); ScDocShell* pDocShell = getDocShellFromRange( mxRange ); ScDocFunc aFunc(*pDocShell); @@ -3944,8 +3944,8 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) throw (uno::RuntimeExcepti nRowArr[0] = thisAddress.StartRow; nRowArr[1] = thisAddress.EndRow; // #163561# use mode SC_SIZE_DIRECT: hide for height 0, show for other values - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, thisAddress.Sheet, SC_SIZE_DIRECT, - nTwips, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, thisAddress.Sheet, SC_SIZE_DIRECT, + nTwips, sal_True, sal_True ); } uno::Any SAL_CALL @@ -3957,10 +3957,10 @@ ScVbaRange::getPageBreak() throw (uno::RuntimeException) { RangeHelper thisRange( mxRange ); table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); - BOOL bColumn = FALSE; + sal_Bool bColumn = sal_False; if (thisAddress.StartRow==0) - bColumn = TRUE; + bColumn = sal_True; uno::Reference< frame::XModel > xModel = pShell->GetModel(); if ( xModel.is() ) @@ -3997,10 +3997,10 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); if ((thisAddress.StartColumn==0) && (thisAddress.StartRow==0)) return; - BOOL bColumn = FALSE; + sal_Bool bColumn = sal_False; if (thisAddress.StartRow==0) - bColumn = TRUE; + bColumn = sal_True; ScAddress aAddr( static_cast<SCCOL>(thisAddress.StartColumn), thisAddress.StartRow, thisAddress.Sheet ); uno::Reference< frame::XModel > xModel = pShell->GetModel(); @@ -4008,9 +4008,9 @@ ScVbaRange::setPageBreak( const uno::Any& _pagebreak) throw (uno::RuntimeExcepti { ScTabViewShell* pViewShell = excel::getBestViewShell( xModel ); if ( nPageBreak == excel::XlPageBreak::xlPageBreakManual ) - pViewShell->InsertPageBreak( bColumn, TRUE, &aAddr); + pViewShell->InsertPageBreak( bColumn, sal_True, &aAddr); else if ( nPageBreak == excel::XlPageBreak::xlPageBreakNone ) - pViewShell->DeletePageBreak( bColumn, TRUE, &aAddr); + pViewShell->DeletePageBreak( bColumn, sal_True, &aAddr); } } } @@ -4204,7 +4204,7 @@ ScDBData* lcl_GetDBData_Impl( ScDocShell* pDocShell, sal_Int16 nSheet ) ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection(); if (pNames) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pNames->SearchName( sName , nPos )) pRet = (*pNames)[nPos]; } @@ -4220,7 +4220,7 @@ void lcl_SelectAll( ScDocShell* pDocShell, ScQueryParam& aParam ) if ( pViewData ) { OSL_TRACE("Pushing out SelectAll query"); - pViewData->GetView()->Query( aParam, NULL, TRUE ); + pViewData->GetView()->Query( aParam, NULL, sal_True ); } } } @@ -4401,7 +4401,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const SCROW nStartRow = autoFiltAddress.StartRow; SCCOL nEndCol = autoFiltAddress.EndColumn; SCROW nEndRow = autoFiltAddress.EndRow; - pDocument->GetDataArea( autoFiltAddress.Sheet, nStartCol, nStartRow, nEndCol, nEndRow, TRUE, true ); + pDocument->GetDataArea( autoFiltAddress.Sheet, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, true ); autoFiltAddress.StartColumn = nStartCol; autoFiltAddress.StartRow = nStartRow; autoFiltAddress.EndColumn = nEndCol; @@ -4674,15 +4674,15 @@ ScVbaRange::Autofit() throw (uno::RuntimeException) SCCOLROW nColArr[2]; nColArr[0] = thisAddress.StartColumn; nColArr[1] = thisAddress.EndColumn; - BOOL bDirection = TRUE; + sal_Bool bDirection = sal_True; if ( mbIsRows ) { - bDirection = FALSE; + bDirection = sal_False; nColArr[0] = thisAddress.StartRow; nColArr[1] = thisAddress.EndRow; } aFunc.SetWidthOrHeight( bDirection, 1, nColArr, thisAddress.Sheet, SC_SIZE_OPTIMAL, - 0, TRUE, TRUE ); + 0, sal_True, sal_True ); } } @@ -5196,7 +5196,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const } ScDocFunc aFunc(*pDocSh); #ifdef VBA_OOBUILD_HACK - aFunc.FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, nCount, fStep, fEndValue, TRUE, TRUE ); + aFunc.FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd, nCount, fStep, fEndValue, sal_True, sal_True ); #endif } sal_Bool SAL_CALL @@ -5420,7 +5420,7 @@ ScVbaRange::PreviousNext( bool bIsPrevious ) SCTAB nTab = refRange.aStart.Tab(); ScDocument* pDoc = getScDocument(); - pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, TRUE,TRUE, markedRange ); + pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, sal_True,sal_True, markedRange ); refRange.aStart.SetCol( nNewX ); refRange.aStart.SetRow( nNewY ); refRange.aStart.SetTab( nTab ); diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 079ec5282..4dc75d98e 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -773,7 +773,7 @@ ScVbaWindow::setView( const uno::Any& _view) throw (uno::RuntimeException) { sal_Int32 nWindowView = excel::XlWindowView::xlNormalView; _view >>= nWindowView; - USHORT nSlot = FID_NORMALVIEWMODE; + sal_uInt16 nSlot = FID_NORMALVIEWMODE; switch ( nWindowView ) { case excel::XlWindowView::xlNormalView: diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 8e764d10e..2bbd6aee8 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -415,7 +415,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException) bSelectSingle = false; } else - rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), TRUE ); + rMarkData.SelectTable( static_cast< SCTAB >( pSheet->getSheetID() ), sal_True ); } } diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index ab2159b50..fa571fda4 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -89,7 +89,7 @@ ScAuditingShell::~ScAuditingShell() void ScAuditingShell::Execute( SfxRequest& rReq ) { SfxBindings& rBindings = pViewData->GetBindings(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_FILL_ADD_PRED: @@ -104,7 +104,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq ) break; case SID_CANCEL: // Escape case SID_FILL_NONE: - pViewData->GetViewShell()->SetAuditShell( FALSE ); + pViewData->GetViewShell()->SetAuditShell( sal_False ); break; case SID_FILL_SELECT: @@ -114,15 +114,15 @@ void ScAuditingShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pXItem; const SfxPoolItem* pYItem; - if ( pReqArgs->GetItemState( SID_RANGE_COL, TRUE, &pXItem ) == SFX_ITEM_SET - && pReqArgs->GetItemState( SID_RANGE_ROW, TRUE, &pYItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_RANGE_COL, sal_True, &pXItem ) == SFX_ITEM_SET + && pReqArgs->GetItemState( SID_RANGE_ROW, sal_True, &pYItem ) == SFX_ITEM_SET ) { DBG_ASSERT( pXItem->ISA(SfxInt16Item) && pYItem->ISA(SfxInt32Item), "falsche Items" ); SCsCOL nCol = static_cast<SCsCOL>(((const SfxInt16Item*) pXItem)->GetValue()); SCsROW nRow = static_cast<SCsROW>(((const SfxInt32Item*) pYItem)->GetValue()); ScViewFunc* pView = pViewData->GetView(); - pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, FALSE, FALSE ); + pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, sal_False, sal_False ); switch ( nFunction ) { case SID_FILL_ADD_PRED: @@ -149,7 +149,7 @@ void ScAuditingShell::Execute( SfxRequest& rReq ) void ScAuditingShell::GetState( SfxItemSet& rSet ) { - rSet.Put( SfxBoolItem( nFunction, TRUE ) ); // aktive Funktion markieren + rSet.Put( SfxBoolItem( nFunction, sal_True ) ); // aktive Funktion markieren } diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 92082a8b4..2f0b16425 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -88,7 +88,7 @@ SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) ) ScCellShell::ScCellShell(ScViewData* pData) : ScFormatShell(pData), pImpl( new CellShell_Impl() ), - bPastePossible(FALSE) + bPastePossible(sal_False) { SetHelpId(HID_SCSHELL_CELLSH); SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Cell"))); @@ -98,7 +98,7 @@ ScCellShell::~ScCellShell() { if ( pImpl->m_pClipEvtLstnr ) { - pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), FALSE ); + pImpl->m_pClipEvtLstnr->AddRemoveListener( GetViewData()->GetActiveWin(), sal_False ); // #103849# 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. @@ -119,9 +119,9 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); ScRange aMarkRange; ScMarkType eMarkType = GetViewData()->GetSimpleArea( aMarkRange ); - BOOL bSimpleArea = (eMarkType == SC_MARK_SIMPLE); - BOOL bOnlyNotBecauseOfMatrix; - BOOL bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix ); + sal_Bool bSimpleArea = (eMarkType == SC_MARK_SIMPLE); + sal_Bool bOnlyNotBecauseOfMatrix; + sal_Bool bEditable = pTabViewShell->SelectionEditable( &bOnlyNotBecauseOfMatrix ); ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocShell = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -133,11 +133,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) nRow2 = aMarkRange.aEnd.Row(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - BOOL bDisable = FALSE; - BOOL bNeedEdit = TRUE; // muss Selektion editierbar sein? + sal_Bool bDisable = sal_False; + sal_Bool bNeedEdit = sal_True; // muss Selektion editierbar sein? switch ( nWhich ) { case FID_FILL_TO_BOTTOM: // Fuellen oben/unten @@ -171,7 +171,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) case FID_FILL_SERIES: // Block fuellen case SID_OPENDLG_TABOP: // Mehrfachoperationen, mind. 2 Zellen markiert? if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP) - bDisable = TRUE; + bDisable = sal_True; else bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2); @@ -209,7 +209,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) //! muss man leben.. wird in Copy-Routine abgefangen, sonst //! muesste hier nochmal Aufwand getrieben werden if ( !(!bEditable && bOnlyNotBecauseOfMatrix) ) - bNeedEdit = FALSE; // erlaubt, wenn geschuetzt/ReadOnly + bNeedEdit = sal_False; // erlaubt, wenn geschuetzt/ReadOnly break; case SID_AUTOFORMAT: // Autoformat, mind. 3x3 selektiert @@ -221,11 +221,11 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) { if ( !bEditable && bOnlyNotBecauseOfMatrix ) { - bNeedEdit = FALSE; + bNeedEdit = sal_False; } if ( pDocShell && pDocShell->IsDocShared() ) { - bDisable = TRUE; + bDisable = sal_True; } } break; @@ -236,14 +236,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) case SID_ENABLE_HYPHENATION : // nur wegen Matrix nicht editierbar? Attribute trotzdem ok if ( !bEditable && bOnlyNotBecauseOfMatrix ) - bNeedEdit = FALSE; + bNeedEdit = sal_False; break; case FID_VALIDATION: { if ( pDocShell && pDocShell->IsDocShared() ) { - bDisable = TRUE; + bDisable = sal_True; } } break; @@ -256,14 +256,14 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) break; } if (!bDisable && bNeedEdit && !bEditable) - bDisable = TRUE; + bDisable = sal_True; if (bDisable) rSet.DisableItem(nWhich); else if (nWhich == SID_ENABLE_HYPHENATION) { // toggle slots need a bool item - rSet.Put( SfxBoolItem( nWhich, FALSE ) ); + rSet.Put( SfxBoolItem( nWhich, sal_False ) ); } nWhich = aIter.NextWhich(); } @@ -281,11 +281,11 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) GetViewData()->GetTabNo() ); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { - BOOL bDisable = FALSE; - BOOL bNeedEdit = TRUE; // muss Cursorposition editierbar sein? + sal_Bool bDisable = sal_False; + sal_Bool bNeedEdit = sal_True; // muss Cursorposition editierbar sein? switch ( nWhich ) { case SID_THESAURUS: @@ -295,7 +295,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) if (!bDisable) { // test for available languages - USHORT nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor ); + sal_uInt16 nLang = ScViewUtil::GetEffLanguage( pDoc, aCursor ); bDisable = !ScModule::HasThesaurusLanguage( nLang ); } } @@ -311,9 +311,9 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) if (!pDoc->IsBlockEditable( aCursor.Tab(), aRange.aStart.Col(),aRange.aStart.Row(), aRange.aEnd.Col(),aRange.aEnd.Row() )) { - bDisable = TRUE; + bDisable = sal_True; } - bNeedEdit=FALSE; + bNeedEdit=sal_False; } } @@ -322,7 +322,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) { if ( pDocShell && pDocShell->IsDocShared() ) { - bDisable = TRUE; + bDisable = sal_True; } } break; @@ -330,7 +330,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) if (!bDisable && bNeedEdit) if (!pDoc->IsBlockEditable( aCursor.Tab(), aCursor.Col(),aCursor.Row(), aCursor.Col(),aCursor.Row() )) - bDisable = TRUE; + bDisable = sal_True; if (bDisable) rSet.DisableItem(nWhich); nWhich = aIter.NextWhich(); @@ -374,7 +374,7 @@ sal_Bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHe void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ) { Window* pWin = GetViewData()->GetActiveWin(); - BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); @@ -402,11 +402,11 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ) // Einfuegen, Inhalte einfuegen -BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData ) +sal_Bool lcl_IsCellPastePossible( const TransferableDataHelper& rData ) { - BOOL bPossible = FALSE; + sal_Bool bPossible = sal_False; if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) ) - bPossible = TRUE; + bPossible = sal_True; else { if ( rData.HasFormat( SOT_FORMAT_BITMAP ) || @@ -426,7 +426,7 @@ BOOL lcl_IsCellPastePossible( const TransferableDataHelper& rData ) rData.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) || rData.HasFormat( SOT_FORMATSTR_ID_DIF ) ) { - bPossible = TRUE; + bPossible = sal_True; } } return bPossible; @@ -459,14 +459,14 @@ void __EXPORT ScCellShell::GetClipState( SfxItemSet& rSet ) pImpl->m_pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScCellShell, ClipboardChanged ) ); pImpl->m_pClipEvtLstnr->acquire(); Window* pWin = GetViewData()->GetActiveWin(); - pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, TRUE ); + pImpl->m_pClipEvtLstnr->AddRemoveListener( pWin, sal_True ); // get initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); bPastePossible = lcl_IsCellPastePossible( aDataHelper ); } - BOOL bDisable = !bPastePossible; + sal_Bool bDisable = !bPastePossible; // Zellschutz / Multiselektion @@ -477,11 +477,11 @@ void __EXPORT ScCellShell::GetClipState( SfxItemSet& rSet ) SCTAB nTab = GetViewData()->GetTabNo(); ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument(); if (!pDoc->IsBlockEditable( nTab, nCol,nRow, nCol,nRow )) - bDisable = TRUE; + bDisable = sal_True; ScRange aDummy; ScMarkType eMarkType = GetViewData()->GetSimpleArea( aDummy); if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED) - bDisable = TRUE; + bDisable = sal_True; } if (bDisable) @@ -519,8 +519,8 @@ void ScCellShell::GetState(SfxItemSet &rSet) // removed: SID_BORDER_OBJECT (old Basic) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); -// BOOL bOle = pTabViewShell->GetViewFrame()->GetFrame().IsInPlace(); -// BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo()); +// sal_Bool bOle = pTabViewShell->GetViewFrame()->GetFrame().IsInPlace(); +// sal_Bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo()); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScViewData* pData = GetViewData(); ScDocument* pDoc = pData->GetDocument(); @@ -535,7 +535,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -551,7 +551,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) if ( pData->GetSimpleArea( aRange ) == SC_MARK_SIMPLE ) { String aStr; - USHORT nFlags = SCA_VALID | SCA_TAB_3D; + sal_uInt16 nFlags = SCA_VALID | SCA_TAB_3D; aRange.Format(aStr,nFlags,pDoc); rSet.Put( SfxStringItem( nWhich, aStr ) ); } @@ -615,7 +615,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) * 1: ER Click erweitert Selektion * 2: ERG Click definiert weitere Selektion */ - USHORT nMode = pTabViewShell->GetLockedModifiers(); + sal_uInt16 nMode = pTabViewShell->GetLockedModifiers(); switch ( nMode ) { @@ -657,7 +657,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("...")) ) ); else { - USHORT nErrCode = 0; + sal_uInt16 nErrCode = 0; ScBaseCell* pCell; pDoc->GetCell( nPosX, nPosY, nTab, pCell ); if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) @@ -750,7 +750,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) if ( !pDoc->IsScenario(nTab) ) { String aStr; - USHORT nFlags; + sal_uInt16 nFlags; SCTAB nScTab = nTab + 1; String aProtect; bool bSheetProtected = pDoc->IsTabProtected(nTab); @@ -761,7 +761,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) aList.Insert( new String( aStr ), LIST_APPEND ); pDoc->GetScenarioData( nScTab, aStr, aDummyCol, nFlags ); aList.Insert( new String( aStr ), LIST_APPEND ); - // Protection is TRUE if both Sheet and Scenario are protected + // Protection is sal_True if both Sheet and Scenario are protected aProtect = (bSheetProtected && (nFlags & SC_SCENARIO_PROTECT)) ? '1' : '0'; aList.Insert( new String( aProtect), LIST_APPEND ); ++nScTab; @@ -770,7 +770,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) else { String aComment; - USHORT nDummyFlags; + sal_uInt16 nDummyFlags; pDoc->GetScenarioData( nTab, aComment, aDummyCol, nDummyFlags ); DBG_ASSERT( aList.Count() == 0, "List not empty!" ); aList.Insert( new String( aComment ) ); @@ -778,8 +778,8 @@ void ScCellShell::GetState(SfxItemSet &rSet) rSet.Put( SfxStringListItem( nWhich, &aList ) ); - ULONG nCount = aList.Count(); - for ( ULONG i=0; i<nCount; i++ ) + sal_uLong nCount = aList.Count(); + for ( sal_uLong i=0; i<nCount; i++ ) delete (String*) aList.GetObject(i); } break; @@ -801,7 +801,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) if ( pDoc->IsTabProtected(nTab) ) { const SfxItemSet& rAttrSet = GetSelectionPattern()->GetItemSet(); - const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&)rAttrSet.Get( ATTR_PROTECTION, TRUE ); + const ScProtectionAttr& rProtAttr = (const ScProtectionAttr&)rAttrSet.Get( ATTR_PROTECTION, sal_True ); if ( rProtAttr.GetProtection() ) rSet.DisableItem( nWhich ); } @@ -827,7 +827,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) { //! test for data pilot operation } - else if (!pTabViewShell->OutlinePossible(FALSE)) + else if (!pTabViewShell->OutlinePossible(sal_False)) rSet.DisableItem( nWhich ); break; @@ -837,7 +837,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) { //! test for data pilot operation } - else if (!pTabViewShell->OutlinePossible(TRUE)) + else if (!pTabViewShell->OutlinePossible(sal_True)) rSet.DisableItem( nWhich ); break; @@ -850,7 +850,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) } else { - BOOL bCol, bRow; + sal_Bool bCol, bRow; pTabViewShell->TestRemoveOutline( bCol, bRow ); if ( !bCol && !bRow ) rSet.DisableItem( nWhich ); @@ -906,21 +906,21 @@ void ScCellShell::GetState(SfxItemSet &rSet) case SID_DELETE_NOTE: { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if ( rMark.IsMarked() || rMark.IsMultiMarked() ) { if ( pDoc->IsSelectionEditable( rMark ) ) { // look for at least one note in selection ScRangeList aRanges; - rMark.FillRangeListWithMarks( &aRanges, FALSE ); - ULONG nCount = aRanges.Count(); - for (ULONG nPos=0; nPos<nCount && !bEnable; nPos++) + rMark.FillRangeListWithMarks( &aRanges, sal_False ); + sal_uLong nCount = aRanges.Count(); + for (sal_uLong nPos=0; nPos<nCount && !bEnable; nPos++) { ScCellIterator aCellIter( pDoc, *aRanges.GetObject(nPos) ); for( ScBaseCell* pCell = aCellIter.GetFirst(); pCell && !bEnable; pCell = aCellIter.GetNext() ) if ( pCell->HasNote() ) - bEnable = TRUE; // note found + bEnable = sal_True; // note found } } } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 47951fc09..1911537a9 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -109,7 +109,7 @@ #include <svx/dialogs.hrc> //CHINA001 #include "scabstdlg.hxx" //CHINA001 #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) #define C2U(cChar) rtl::OUString::createFromAscii(cChar) @@ -130,7 +130,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -221,7 +221,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else { ScDocument* pDoc = GetViewData()->GetDocument(); - BOOL bTheFlag=(pDoc->GetChangeTrack()!=NULL); + sal_Bool bTheFlag=(pDoc->GetChangeTrack()!=NULL); //CHINA001 ScInsertCellDlg* pDlg = new ScInsertCellDlg( pTabViewShell->GetDialogParent(), //CHINA001 bTheFlag); @@ -294,7 +294,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { ScRange aRange; ScDocument* pDoc = GetViewData()->GetDocument(); - BOOL bTheFlag=GetViewData()->IsMultiMarked() || + sal_Bool bTheFlag=GetViewData()->IsMultiMarked() || (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE_FILTERED) || (pDoc->GetChangeTrack() != NULL); @@ -349,7 +349,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_DELETE: { - USHORT nFlags = IDF_NONE; + sal_uInt16 nFlags = IDF_NONE; if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() ) { @@ -360,7 +360,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFlags = ((const SfxStringItem*)pItem)->GetValue(); aFlags.ToUpperAscii(); - BOOL bCont = TRUE; + sal_Bool bCont = sal_True; for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ ) { @@ -368,7 +368,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { case 'A': // Alle nFlags |= IDF_ALL; - bCont = FALSE; // nicht mehr weitermachen! + bCont = sal_False; // nicht mehr weitermachen! break; case 'S': nFlags |= IDF_STRING; break; case 'V': nFlags |= IDF_VALUE; break; @@ -461,10 +461,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case FID_FILL_TAB: { - USHORT nFlags = IDF_NONE; - USHORT nFunction = PASTE_NOFUNC; - BOOL bSkipEmpty = FALSE; - BOOL bAsLink = FALSE; + sal_uInt16 nFlags = IDF_NONE; + sal_uInt16 nFunction = PASTE_NOFUNC; + sal_Bool bSkipEmpty = sal_False; + sal_Bool bAsLink = sal_False; if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() ) { @@ -475,7 +475,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFlags = ((const SfxStringItem*)pItem)->GetValue(); aFlags.ToUpperAscii(); - BOOL bCont = TRUE; + sal_Bool bCont = sal_True; for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ ) { @@ -483,7 +483,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { case 'A': // Alle nFlags |= IDF_ALL; - bCont = FALSE; // nicht mehr weitermachen! + bCont = sal_False; // nicht mehr weitermachen! break; case 'S': nFlags |= IDF_STRING; break; case 'V': nFlags |= IDF_VALUE; break; @@ -507,7 +507,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) RID_SCDLG_INSCONT, 0, /* nCheckDefaults */ &ScGlobal::GetRscString(STR_FILL_TAB)); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 - pDlg->SetFillMode(TRUE); + pDlg->SetFillMode(sal_True); if (pDlg->Execute() == RET_OK) { @@ -557,14 +557,14 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SCCOL nEndCol; SCROW nEndRow; SCTAB nEndTab; - USHORT nPossDir = FDS_OPT_NONE; + sal_uInt16 nPossDir = FDS_OPT_NONE; FillDir eFillDir = FILL_TO_BOTTOM; FillCmd eFillCmd = FILL_LINEAR; FillDateCmd eFillDateCmd = FILL_DAY; double fStartVal = MAXDOUBLE; double fIncVal = 1; double fMaxVal = MAXDOUBLE; - BOOL bDoIt = FALSE; + sal_Bool bDoIt = sal_False; GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ); @@ -592,7 +592,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) sal_uInt32 nKey; double fTmpVal; - bDoIt=FALSE; + bDoIt=sal_False; if( IS_AVAILABLE( FID_FILL_SERIES, &pItem ) ) aFillDir = ((const SfxStringItem*)pItem)->GetValue(); @@ -647,7 +647,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if( pFormatter->IsNumberFormat( aFillMax, nKey, fTmpVal )) fMaxVal = fTmpVal; - bDoIt = TRUE; + bDoIt = sal_True; } else // (pReqArgs == NULL) => Dialog hochziehen @@ -752,7 +752,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( nStartCol != nEndCol && nStartRow != nEndRow ) { - pDlg->SetEdStartValEnabled(FALSE); + pDlg->SetEdStartValEnabled(sal_False); } if ( pDlg->Execute() == RET_OK ) @@ -770,7 +770,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) fStartVal = pDlg->GetStart(); fIncVal = pDlg->GetStep(); fMaxVal = pDlg->GetMax(); - bDoIt = TRUE; + bDoIt = sal_True; } delete pDlg; } @@ -816,7 +816,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } rReq.AppendItem( SfxStringItem( FN_PARAM_2, aPara ) ); - ULONG nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, + sal_uLong nFormatKey = pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, ScGlobal::eLnge ); pFormatter->GetOutputString( fIncVal, nFormatKey, aPara, &pColor ); @@ -952,7 +952,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OUTLINE_HIDE: if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) ) - pTabViewShell->SetDataPilotDetails( FALSE ); + pTabViewShell->SetDataPilotDetails( sal_False ); else pTabViewShell->HideMarkedOutlines(); rReq.Done(); @@ -965,7 +965,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( pDPObj ) { Sequence<sheet::DataPilotFieldFilter> aFilters; - USHORT nOrientation; + sal_uInt16 nOrientation; if ( pTabViewShell->HasSelectionForDrillDown( nOrientation ) ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -977,7 +977,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( pDlg->Execute() == RET_OK ) { String aNewDimName( pDlg->GetDimensionName() ); - pTabViewShell->SetDataPilotDetails( TRUE, &aNewDimName ); + pTabViewShell->SetDataPilotDetails( sal_True, &aNewDimName ); } } else if ( !pDPObj->IsServiceData() && @@ -986,7 +986,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFilters ) ) pTabViewShell->ShowDataPilotSourceData( *pDPObj, aFilters ); else - pTabViewShell->SetDataPilotDetails( TRUE ); + pTabViewShell->SetDataPilotDetails( sal_True ); } else pTabViewShell->ShowMarkedOutlines(); @@ -996,8 +996,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OUTLINE_MAKE: { - BOOL bColumns = FALSE; - BOOL bOk = TRUE; + sal_Bool bColumns = sal_False; + sal_Bool bOk = sal_True; if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) ) @@ -1035,12 +1035,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else pTabViewShell->GroupDataPilot(); - bOk = FALSE; + bOk = sal_False; } else if( pReqArgs != NULL ) { const SfxPoolItem* pItem; - bOk = FALSE; + bOk = sal_False; if( IS_AVAILABLE( SID_OUTLINE_MAKE, &pItem ) ) { @@ -1049,30 +1049,30 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) switch( aCol.GetChar(0) ) { - case 'R': bColumns=FALSE; bOk = TRUE;break; - case 'C': bColumns=TRUE; bOk = TRUE;break; + case 'R': bColumns=sal_False; bOk = sal_True;break; + case 'C': bColumns=sal_True; bOk = sal_True;break; } } } else // Dialog, wenn nicht ganze Zeilen/Spalten markiert { if ( GetViewData()->SimpleColMarked() && !GetViewData()->SimpleRowMarked() ) - bColumns = TRUE; + bColumns = sal_True; else if ( !GetViewData()->SimpleColMarked() && GetViewData()->SimpleRowMarked() ) - bColumns = FALSE; + bColumns = sal_False; else { //CHINA001 ScGroupDlg* pDlg = new ScGroupDlg(pTabViewShell->GetDialogParent(), -//CHINA001 RID_SCDLG_GRP_MAKE, FALSE ); +//CHINA001 RID_SCDLG_GRP_MAKE, sal_False ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,FALSE); + AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,sal_False); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 if ( pDlg->Execute() == RET_OK ) bColumns = pDlg->GetColsChecked(); else - bOk = FALSE; + bOk = sal_False; delete pDlg; } } @@ -1092,19 +1092,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_OUTLINE_REMOVE: { - BOOL bColumns = FALSE; - BOOL bOk = TRUE; + sal_Bool bColumns = sal_False; + sal_Bool bOk = sal_True; if ( GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ) ) { pTabViewShell->UngroupDataPilot(); - bOk = FALSE; + bOk = sal_False; } else if( pReqArgs != NULL ) { const SfxPoolItem* pItem; - bOk = FALSE; + bOk = sal_False; if( IS_AVAILABLE( SID_OUTLINE_REMOVE, &pItem ) ) { @@ -1113,36 +1113,36 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) switch( aCol.GetChar(0) ) { - case 'R': bColumns=FALSE; bOk = TRUE;break; - case 'C': bColumns=TRUE; bOk = TRUE;break; + case 'R': bColumns=sal_False; bOk = sal_True;break; + case 'C': bColumns=sal_True; bOk = sal_True;break; } } } else // Dialog nur, wenn Aufheben fuer Zeilen und Spalten moeglich { - BOOL bColPoss, bRowPoss; + sal_Bool bColPoss, bRowPoss; pTabViewShell->TestRemoveOutline( bColPoss, bRowPoss ); if ( bColPoss && bRowPoss ) { //CHINA001 ScGroupDlg* pDlg = new ScGroupDlg( pTabViewShell->GetDialogParent(), - //CHINA001 RID_SCDLG_GRP_KILL, TRUE ); + //CHINA001 RID_SCDLG_GRP_KILL, sal_True ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,TRUE); + AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,sal_True); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 if ( pDlg->Execute() == RET_OK ) bColumns = pDlg->GetColsChecked(); else - bOk = FALSE; + bOk = sal_False; delete pDlg; } else if ( bColPoss ) - bColumns = TRUE; + bColumns = sal_True; else if ( bRowPoss ) - bColumns = FALSE; + bColumns = sal_False; else - bOk = FALSE; + bOk = sal_False; } if (bOk) { @@ -1165,7 +1165,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_COPY: // fuer Grafiken in DrawShell { WaitObject aWait( GetViewData()->GetDialogParent() ); - pTabViewShell->CopyToClip( NULL, FALSE, FALSE, TRUE ); + pTabViewShell->CopyToClip( NULL, sal_False, sal_False, sal_True ); rReq.Done(); } break; @@ -1173,7 +1173,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_CUT: // fuer Grafiken in DrawShell { WaitObject aWait( GetViewData()->GetDialogParent() ); - pTabViewShell->CutToClip( NULL, TRUE ); + pTabViewShell->CutToClip( NULL, sal_True ); rReq.Done(); } break; @@ -1189,10 +1189,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { WaitObject aWait( GetViewData()->GetDialogParent() ); - 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(); @@ -1201,9 +1201,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( nFormat ) { Window* pWin = GetViewData()->GetActiveWin(); - BOOL bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL ); - BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); - BOOL bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ); + sal_Bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL ); + sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + sal_Bool bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ); if ( bCells && bOle ) pTabViewShell->PasteFromSystem(); @@ -1222,16 +1222,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case FID_INS_CELL_CONTENTS: { - USHORT nFlags = IDF_NONE; - USHORT nFunction = PASTE_NOFUNC; - BOOL bSkipEmpty = FALSE; - BOOL bTranspose = FALSE; - BOOL bAsLink = FALSE; + sal_uInt16 nFlags = IDF_NONE; + sal_uInt16 nFunction = PASTE_NOFUNC; + sal_Bool bSkipEmpty = sal_False; + sal_Bool bTranspose = sal_False; + sal_Bool bAsLink = sal_False; InsCellCmd eMoveMode = INS_NONE; Window* pWin = GetViewData()->GetActiveWin(); ScDocument* pDoc = GetViewData()->GetDocument(); - BOOL bOtherDoc = !pDoc->IsClipboardSource(); + sal_Bool bOtherDoc = !pDoc->IsClipboardSource(); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); if ( pOwnClip ) { @@ -1246,7 +1246,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFlags = ((const SfxStringItem*)pItem)->GetValue(); aFlags.ToUpperAscii(); - BOOL bCont = TRUE; + sal_Bool bCont = sal_True; for( xub_StrLen i=0 ; bCont && i<aFlags.Len() ; i++ ) { @@ -1254,7 +1254,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { case 'A': // Alle nFlags |= IDF_ALL; - bCont = FALSE; // nicht mehr weitermachen! + bCont = sal_False; // nicht mehr weitermachen! break; case 'S': nFlags |= IDF_STRING; break; case 'V': nFlags |= IDF_VALUE; break; @@ -1312,7 +1312,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SCROW nClipStartY, nClipSizeY; pOwnClip->GetDocument()->GetClipStart( nClipStartX, nClipStartY ); // for CutMode, filtered rows can always be included - pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, TRUE ); + pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, sal_True ); int nDisableShift = 0; if ( nClipStartX <= nPosX + nClipSizeX && nPosX <= nClipStartX + nClipSizeX ) @@ -1349,7 +1349,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) else pTabViewShell->PasteFromClip( nFlags, pOwnClip->GetDocument(), nFunction, bSkipEmpty, bTranspose, bAsLink, - eMoveMode, IDF_NONE, TRUE ); // allow warning dialog + eMoveMode, IDF_NONE, sal_True ); // allow warning dialog } if( !pReqArgs ) @@ -1393,18 +1393,18 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) // Clipboard-ID als Parameter angegeben? Basic "PasteSpecial(Format)" const SfxPoolItem* pItem=NULL; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET && + pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET && pItem->ISA(SfxUInt32Item) ) { - ULONG nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); - BOOL bRet=TRUE; + sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue(); + sal_Bool bRet=sal_True; { WaitObject aWait( GetViewData()->GetDialogParent() ); - BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) pTabViewShell->PasteDraw(); else - bRet = pTabViewShell->PasteFromSystem(nFormat, TRUE); // TRUE: keine Fehlermeldungen + bRet = pTabViewShell->PasteFromSystem(nFormat, sal_True); // TRUE: keine Fehlermeldungen } if ( bRet ) @@ -1427,21 +1427,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } else // Zeichenobjekte oder fremde Daten { - BOOL bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); + sal_Bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS ); GetPossibleClipboardFormats( aFormats ); - USHORT nFormatCount = aFormats.Count(); + sal_uInt16 nFormatCount = aFormats.Count(); if ( nFormatCount ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( pTabViewShell->GetDialogParent() ); if ( pDlg ) { - for (USHORT i=0; i<nFormatCount; i++) + for (sal_uInt16 i=0; i<nFormatCount; i++) { - ULONG nFormatId = aFormats.GetClipbrdFormatId( i ); + sal_uLong nFormatId = aFormats.GetClipbrdFormatId( i ); String aName = aFormats.GetClipbrdFormatName( i ); // special case for paste dialog: '*' is replaced by object type if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE ) @@ -1451,7 +1451,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); - ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); + sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); if (nFormat > 0) { { @@ -1487,22 +1487,22 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) // case FID_INS_ROWBRK: - pTabViewShell->InsertPageBreak( FALSE ); + pTabViewShell->InsertPageBreak( sal_False ); rReq.Done(); break; case FID_INS_COLBRK: - pTabViewShell->InsertPageBreak( TRUE ); + pTabViewShell->InsertPageBreak( sal_True ); rReq.Done(); break; case FID_DEL_ROWBRK: - pTabViewShell->DeletePageBreak( FALSE ); + pTabViewShell->DeletePageBreak( sal_False ); rReq.Done(); break; case FID_DEL_COLBRK: - pTabViewShell->DeletePageBreak( TRUE ); + pTabViewShell->DeletePageBreak( sal_True ); rReq.Done(); break; @@ -1642,15 +1642,15 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) break; case SID_DEC_INDENT: - pTabViewShell->ChangeIndent( FALSE ); + pTabViewShell->ChangeIndent( sal_False ); break; case SID_INC_INDENT: - pTabViewShell->ChangeIndent( TRUE ); + pTabViewShell->ChangeIndent( sal_True ); break; case FID_USE_NAME: { - USHORT nFlags = pTabViewShell->GetCreateNameFlags(); + sal_uInt16 nFlags = pTabViewShell->GetCreateNameFlags(); //CHINA001 ScNameCreateDlg* pDlg = new ScNameCreateDlg( pTabViewShell->GetDialogParent(), nFlags ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -1673,7 +1673,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && SFX_ITEM_SET == - pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, TRUE, &pItem ) ) + pReqArgs->GetItemState( SCITEM_CONSOLIDATEDATA, sal_True, &pItem ) ) { const ScConsolidateParam& rParam = ((const ScConsolidateItem*)pItem)->GetData(); @@ -1736,29 +1736,29 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } else { - USHORT nId = ScNameDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; case SID_DEFINE_COLROWNAMERANGES: { - USHORT nId = ScColRowNameRangesDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScColRowNameRangesDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; case SID_UPDATECHART: { - BOOL bAll = FALSE; + sal_Bool bAll = sal_False; if( pReqArgs ) { @@ -1828,7 +1828,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pScMod->InputKeyEvent( KeyEvent('=',KeyCode()) ); String aName = pDlg->GetSelectedName(); - pHdl->InsertFunction( aName, FALSE ); // ohne "()" + pHdl->InsertFunction( aName, sal_False ); // ohne "()" } } break; @@ -1874,7 +1874,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { bool bShow; const SfxPoolItem* pItem; - if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, TRUE, &pItem ) == SFX_ITEM_SET) ) + if ( pReqArgs && (pReqArgs->GetItemState( FID_NOTE_VISIBLE, sal_True, &pItem ) == SFX_ITEM_SET) ) bShow = ((const SfxBoolItem*) pItem)->GetValue(); else bShow = !pNote->IsCaptionShown(); @@ -1904,14 +1904,14 @@ void ScCellShell::ExecuteEdit( 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 ) { const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, pItem ); if ( pStringItem ) aChars = pStringItem->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 ) aFontName = pFontItem->GetValue(); @@ -1931,7 +1931,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } else { - //CHINA001 SvxCharacterMap* pDlg = new SvxCharacterMap( pTabViewShell->GetDialogParent(), FALSE ); + //CHINA001 SvxCharacterMap* pDlg = new SvxCharacterMap( pTabViewShell->GetDialogParent(), sal_False ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); // font color doesn't matter here @@ -1940,7 +1940,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pTabViewShell->GetSelectionScriptType() ); SfxAllItemSet aSet( GetPool() ); - aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) ); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( pTabViewShell->GetDialogParent(), aSet, @@ -1948,8 +1948,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( pDlg->Execute() == RET_OK ) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pItem && pFontItem ) { @@ -2000,7 +2000,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) const String& rName = pHyper->GetName(); const String& rURL = pHyper->GetURL(); const String& rTarget = pHyper->GetTargetFrame(); - USHORT nType = (USHORT) pHyper->GetInsertMode(); + sal_uInt16 nType = (sal_uInt16) pHyper->GetInsertMode(); pTabViewShell->InsertURL( rName, rURL, rTarget, nType ); rReq.Done(); @@ -2037,7 +2037,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) String aFilter; String aOptions; String aSource; - ULONG nRefresh=0; + sal_uLong nRefresh=0; SFX_REQUEST_ARG( rReq, pFile, SfxStringItem, SID_FILE_NAME, sal_False ); SFX_REQUEST_ARG( rReq, pSource, SfxStringItem, FN_PARAM_1, sal_False ); @@ -2098,12 +2098,12 @@ void ScCellShell::ExecuteTrans( SfxRequest& rReq ) void ScCellShell::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 ) { if ( _rFile.Len() && _rSource.Len() ) // filter may be empty { ScRange aLinkRange; - BOOL bMove = FALSE; + sal_Bool bMove = sal_False; ScViewData* pData = GetViewData(); ScMarkData& rMark = pData->GetMarkData(); @@ -2111,14 +2111,14 @@ void ScCellShell::ExecuteExternalSource( if ( rMark.IsMarked() ) { rMark.GetMarkArea( aLinkRange ); - bMove = TRUE; // insert/delete cells to fit range + bMove = sal_True; // insert/delete cells to fit range } else aLinkRange = ScRange( pData->GetCurX(), pData->GetCurY(), pData->GetTabNo() ); ScDocFunc aFunc(*pData->GetDocShell()); aFunc.InsertAreaLink( _rFile, _rFilter, _rOptions, _rSource, - aLinkRange, _nRefresh, bMove, FALSE ); + aLinkRange, _nRefresh, bMove, sal_False ); _rRequest.Done(); } else @@ -2130,7 +2130,7 @@ IMPL_LINK( ScCellShell, DialogClosed, AbstractScLinkedAreaDlg*, EMPTYARG ) DBG_ASSERT( pImpl->m_pLinkedDlg, "ScCellShell::DialogClosed(): invalid request" ); DBG_ASSERT( pImpl->m_pRequest, "ScCellShell::DialogClosed(): invalid request" ); String sFile, sFilter, sOptions, sSource; - ULONG nRefresh = 0; + sal_uLong nRefresh = 0; if ( pImpl->m_pLinkedDlg->GetResult() == RET_OK ) { @@ -2174,12 +2174,12 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa SCCOL nClipEndX; SCROW nClipEndY; pClipDoc->GetClipStart( nClipStartX, nClipStartY ); - pClipDoc->GetClipArea( nClipEndX, nClipEndY, TRUE ); + pClipDoc->GetClipArea( nClipEndX, nClipEndY, sal_True ); nClipEndX = nClipEndX + nClipStartX; nClipEndY = nClipEndY + nClipStartY; // GetClipArea returns the difference ScRange aSource( nClipStartX, nClipStartY, nSourceTab, nClipEndX, nClipEndY, nSourceTab ); - BOOL bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() ); + sal_Bool bDone = pTabViewShell->DataPilotMove( aSource, pViewData->GetCurPos() ); if ( !bDone ) pTabViewShell->ErrorMessage( STR_ERR_DATAPILOT_INPUT ); } @@ -2198,7 +2198,7 @@ void ScCellShell::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTa nFlags &= ~IDF_FORMULA; pTabViewShell->PasteFromClip( nFlags, pClipDoc, - PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, + PASTE_NOFUNC, sal_False, sal_False, sal_False, INS_NONE, IDF_NONE, bShowDialog ); // allow warning dialog } } diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 62af646c6..945cab103 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -91,7 +91,7 @@ using namespace com::sun::star; #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) //------------------------------------------------------------------ @@ -135,14 +135,14 @@ bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange ) return bRet; } -BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) +sal_Bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) { ScTabViewShell* pTabViewShell = pData->GetViewShell(); ScDBData* pDBData = pTabViewShell->GetDBData(); ScDocument* pDoc = pData->GetDocument(); SCTAB nTab = pData->GetTabNo(); ScDirection eFillDir = DIR_TOP; - BOOL bSort = TRUE; + sal_Bool bSort = sal_True; ScRange aExternalRange; if( rSortParam.nCol1 != rSortParam.nCol2 ) @@ -161,7 +161,7 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) SCCOL nStartCol = aExternalRange.aStart.Col(); SCROW nEndRow = aExternalRange.aEnd.Row(); SCCOL nEndCol = aExternalRange.aEnd.Col(); - pDoc->GetDataArea( aExternalRange.aStart.Tab(), nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false ); + pDoc->GetDataArea( aExternalRange.aStart.Tab(), nStartCol, nStartRow, nEndCol, nEndRow, sal_False, false ); aExternalRange.aStart.SetRow( nStartRow ); aExternalRange.aStart.SetCol( nStartCol ); aExternalRange.aEnd.SetRow( nEndRow ); @@ -170,7 +170,7 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) if(( rSortParam.nCol1 == rSortParam.nCol2 && aExternalRange.aStart.Col() != aExternalRange.aEnd.Col() ) || ( rSortParam.nRow1 == rSortParam.nRow2 && aExternalRange.aStart.Row() != aExternalRange.aEnd.Row() ) ) { - USHORT nFmt = SCA_VALID; + sal_uInt16 nFmt = SCA_VALID; String aExtendStr,aCurrentStr; pTabViewShell->AddHighlightRange( aExternalRange,Color( COL_LIGHTBLUE ) ); @@ -190,13 +190,13 @@ BOOL lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam ) { if( bResult == BTN_EXTEND_RANGE ) { - pTabViewShell->MarkRange( aExternalRange, FALSE ); + pTabViewShell->MarkRange( aExternalRange, sal_False ); pDBData->SetArea( nTab, aExternalRange.aStart.Col(), aExternalRange.aStart.Row(), aExternalRange.aEnd.Col(), aExternalRange.aEnd.Row() ); } } else { - bSort = FALSE; + bSort = sal_False; pData->GetDocShell()->CancelAutoDBRange(); } @@ -221,7 +221,7 @@ namespace void ScCellShell::ExecuteDB( SfxRequest& rReq ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); const SfxItemSet* pReqArgs = rReq.GetArgs(); ScModule* pScMod = SC_MOD(); @@ -240,14 +240,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) // check if database beamer is open SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame(); - BOOL bWasOpen = FALSE; + sal_Bool bWasOpen = sal_False; { uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface(); uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame( rtl::OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN); if ( xBeamerFrame.is() ) - bWasOpen = TRUE; + bWasOpen = sal_True; } if ( bWasOpen ) @@ -260,12 +260,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { // show database beamer: SfxViewFrame call must be synchronous - pViewFrame->ExecuteSlot( rReq, (BOOL) FALSE ); // FALSE = synchronous + pViewFrame->ExecuteSlot( rReq, (sal_Bool) sal_False ); // sal_False = synchronous // select current database in database beamer ScImportParam aImportParam; - ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD); // don't create if none found + ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD); // don't create if none found if (pDBData) pDBData->GetImportParam( aImportParam ); @@ -277,8 +277,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case SID_REIMPORT_DATA: { - BOOL bOk = FALSE; - ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD); + sal_Bool bOk = sal_False; + ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD); if (pDBData) { ScImportParam aImportParam; @@ -287,7 +287,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { pTabViewShell->ImportData( aImportParam ); pDBData->SetImportParam( aImportParam ); //! Undo ?? - bOk = TRUE; + bOk = sal_True; } } @@ -301,12 +301,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case SID_REFRESH_DBAREA: { - ScDBData* pDBData = pTabViewShell->GetDBData(TRUE,SC_DB_OLD); + ScDBData* pDBData = pTabViewShell->GetDBData(sal_True,SC_DB_OLD); if (pDBData) { // Import wiederholen wie SID_REIMPORT_DATA - BOOL bContinue = TRUE; + sal_Bool bContinue = sal_True; ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); if (aImportParam.bImport && !pDBData->HasImportSelection()) @@ -363,7 +363,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScDBData* pDBData = pTabViewShell->GetDBData(); pDBData->GetSubTotalParam( aSubTotalParam ); - aSubTotalParam.bRemoveOnly = FALSE; + aSubTotalParam.bRemoveOnly = sal_False; aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) ); //CHINA001 pDlg = new ScSubTotalDlg( pTabViewShell->GetDialogParent(), &aArgSet ); @@ -391,8 +391,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) else // if (bResult == SCRET_REMOVE) { pOutSet = &aArgSet; - aSubTotalParam.bRemoveOnly = TRUE; - aSubTotalParam.bReplace = TRUE; + aSubTotalParam.bRemoveOnly = sal_True; + aSubTotalParam.bReplace = sal_True; aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) ); @@ -428,7 +428,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScDocument* pDoc = GetViewData()->GetDocument(); pDBData->GetSortParam( aSortParam ); - BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab ); + sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, nTab ); if( nCol < aSortParam.nCol1 ) nCol = aSortParam.nCol1; @@ -436,16 +436,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) nCol = aSortParam.nCol2; aSortParam.bHasHeader = bHasHeader; - aSortParam.bByRow = TRUE; - aSortParam.bCaseSens = FALSE; - aSortParam.bIncludePattern = TRUE; - aSortParam.bInplace = TRUE; - aSortParam.bDoSort[0] = TRUE; + aSortParam.bByRow = sal_True; + aSortParam.bCaseSens = sal_False; + aSortParam.bIncludePattern = sal_True; + aSortParam.bInplace = sal_True; + aSortParam.bDoSort[0] = sal_True; aSortParam.nField[0] = nCol; aSortParam.bAscending[0] = (nSlotId == SID_SORT_ASCENDING); - for ( USHORT i=1; i<MAXSORT; i++ ) - aSortParam.bDoSort[i] = FALSE; + for ( sal_uInt16 i=1; i<MAXSORT; i++ ) + aSortParam.bDoSort[i] = sal_False; aArgSet.Put( ScSortItem( SCITEM_SORTDATA, GetViewData(), &aSortParam ) ); @@ -476,49 +476,49 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScDocument* pDoc = GetViewData()->GetDocument(); pDBData->GetSortParam( aSortParam ); - BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); + sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); if( bHasHeader ) aSortParam.bHasHeader = bHasHeader; - aSortParam.bInplace = TRUE; // von Basic immer + aSortParam.bInplace = sal_True; // von Basic immer const SfxPoolItem* pItem; - if ( pArgs->GetItemState( SID_SORT_BYROW, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_BYROW, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bByRow = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_HASHEADER, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_HASHEADER, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bHasHeader = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_CASESENS, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_CASESENS, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bCaseSens = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_ATTRIBS, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_ATTRIBS, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bIncludePattern = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pArgs->GetItemState( SID_SORT_USERDEF, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( SID_SORT_USERDEF, sal_True, &pItem ) == SFX_ITEM_SET ) { - USHORT nUserIndex = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nUserIndex = ((const SfxUInt16Item*)pItem)->GetValue(); aSortParam.bUserDef = ( nUserIndex != 0 ); if ( nUserIndex ) aSortParam.nUserIndex = nUserIndex - 1; // Basic: 1-basiert } SCCOLROW nField0 = 0; - if ( pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET ) nField0 = ((const SfxInt32Item*)pItem)->GetValue(); aSortParam.bDoSort[0] = ( nField0 != 0 ); aSortParam.nField[0] = nField0 > 0 ? (nField0-1) : 0; - if ( pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bAscending[0] = ((const SfxBoolItem*)pItem)->GetValue(); SCCOLROW nField1 = 0; - if ( pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem ) == SFX_ITEM_SET ) nField1 = ((const SfxInt32Item*)pItem)->GetValue(); aSortParam.bDoSort[1] = ( nField1 != 0 ); aSortParam.nField[1] = nField1 > 0 ? (nField1-1) : 0; - if ( pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bAscending[1] = ((const SfxBoolItem*)pItem)->GetValue(); SCCOLROW nField2 = 0; - if ( pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem ) == SFX_ITEM_SET ) nField2 = ((const SfxInt32Item*)pItem)->GetValue(); aSortParam.bDoSort[2] = ( nField2 != 0 ); aSortParam.nField[2] = nField2 > 0 ? (nField2-1) : 0; - if ( pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem ) == SFX_ITEM_SET ) aSortParam.bAscending[2] = ((const SfxBoolItem*)pItem)->GetValue(); // Teilergebnisse bei Bedarf neu @@ -541,7 +541,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) SfxItemSet aArgSet( GetPool(), SCITEM_SORTDATA, SCITEM_SORTDATA ); pDBData->GetSortParam( aSortParam ); - BOOL bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); + sal_Bool bHasHeader = pDoc->HasColHeader( aSortParam.nCol1, aSortParam.nRow1, aSortParam.nCol2, aSortParam.nRow2, pData->GetTabNo() ); if( bHasHeader ) aSortParam.bHasHeader = bHasHeader; @@ -573,7 +573,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) rOutParam.bCaseSens ) ); rReq.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS, rOutParam.bIncludePattern ) ); - USHORT nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0; + sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0; rReq.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) ); if ( rOutParam.bDoSort[0] ) { @@ -616,16 +616,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { DBG_ERROR("SID_FILTER with arguments?"); pTabViewShell->Query( ((const ScQueryItem&) - pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, TRUE ); + pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, sal_True ); rReq.Done(); } else { - USHORT nId = ScFilterDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScFilterDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } } break; @@ -637,16 +637,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { DBG_ERROR("SID_SPECIAL_FILTER with arguments?"); pTabViewShell->Query( ((const ScQueryItem&) - pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, TRUE ); + pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, sal_True ); rReq.Done(); } else { - USHORT nId = ScSpecialFilterDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScSpecialFilterDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } } break; @@ -655,7 +655,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && SFX_ITEM_SET == - pReqArgs->GetItemState( SCITEM_QUERYDATA, TRUE, &pItem ) ) + pReqArgs->GetItemState( SCITEM_QUERYDATA, sal_True, &pItem ) ) { const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(*pItem); @@ -673,9 +673,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScRange aAdvSource; if (rQueryItem.GetAdvancedQuerySource(aAdvSource)) - pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, TRUE ); + pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, sal_True ); else - pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, TRUE ); + pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, sal_True ); rReq.Done( *pReqArgs ); } } @@ -689,9 +689,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) pDBData->GetQueryParam( aParam ); SCSIZE nEC = aParam.GetEntryCount(); for (SCSIZE i=0; i<nEC; i++) - aParam.GetEntry(i).bDoQuery = FALSE; - aParam.bDuplicate = TRUE; - pTabViewShell->Query( aParam, NULL, TRUE ); + aParam.GetEntry(i).bDoQuery = sal_False; + aParam.bDuplicate = sal_True; + pTabViewShell->Query( aParam, NULL, sal_True ); rReq.Done(); } break; @@ -710,7 +710,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && SFX_ITEM_SET == - pReqArgs->GetItemState( SCITEM_PIVOTDATA, TRUE, &pItem ) ) + pReqArgs->GetItemState( SCITEM_PIVOTDATA, sal_True, &pItem ) ) { SCTAB nCurTab = GetViewData()->GetTabNo(); SCTAB nRefTab = GetViewData()->GetRefTabNo(); @@ -758,10 +758,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) else // create new table { // select database range or data - pTabViewShell->GetDBData( TRUE, SC_DB_OLD ); + pTabViewShell->GetDBData( sal_True, SC_DB_OLD ); ScMarkData& rMark = GetViewData()->GetMarkData(); if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) - pTabViewShell->MarkDataArea( FALSE ); + pTabViewShell->MarkDataArea( sal_False ); // output to cursor position for non-sheet data ScAddress aDestPos( pData->GetCurX(), pData->GetCurY(), @@ -769,7 +769,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) // first select type of source data - BOOL bEnableExt = ScDPObject::HasRegisteredSources(); + sal_Bool bEnableExt = ScDPObject::HasRegisteredSources(); //CHINA001 ScDataPilotSourceTypeDlg* pTypeDlg = new ScDataPilotSourceTypeDlg( //CHINA001 pTabViewShell->GetDialogParent(), bEnableExt ); @@ -838,7 +838,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) pTabViewShell->MarkRange(aRange); } - BOOL bOK = TRUE; + sal_Bool bOK = sal_True; if ( pDoc->HasSubTotalCells( aRange ) ) { // confirm selection if it contains SubTotal cells @@ -847,7 +847,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) WinBits(WB_YES_NO | WB_DEF_YES), ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL) ); if (aBox.Execute() == RET_NO) - bOK = FALSE; + bOK = sal_False; } if (bOK) { @@ -876,12 +876,12 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) pDBData->GetArea( nTab, nCol1, nRow1, nCol2, nRow2 ); - bAreaOk = TRUE; + bAreaOk = sal_True; if ( nRow2-nRow1 < 1 ) { // "mindestens eine Datenzeile" pTabViewShell->ErrorMessage(STR_PIVOT_INVALID_DBAREA); - bAreaOk = FALSE; + bAreaOk = sal_False; } else if (!pDBData->HasHeader()) { @@ -890,10 +890,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile? ).Execute() == RET_YES ) { - pDBData->SetHeader( TRUE ); //! Undo ?? + pDBData->SetHeader( sal_True ); //! Undo ?? } else - bAreaOk = FALSE; + bAreaOk = sal_False; } #endif } @@ -903,10 +903,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { // start layout dialog - USHORT nId = ScPivotLayoutWrapper::GetChildWindowId(); + sal_uInt16 nId = ScPivotLayoutWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } delete pNewDPObject; } @@ -915,11 +915,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) case SID_DEFINE_DBNAME: { - USHORT nId = ScDbNameDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScDbNameDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; @@ -950,11 +950,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { const String aStrNoName( ScGlobal::GetRscString(STR_DB_NONAME) ); List aList; - USHORT nDBCount = pDBCol->GetCount(); + sal_uInt16 nDBCount = pDBCol->GetCount(); ScDBData* pDbData = NULL; String* pDBName = NULL; - for ( USHORT i=0; i < nDBCount; i++ ) + for ( sal_uInt16 i=0; i < nDBCount; i++ ) { pDbData = (ScDBData*)(pDBCol->At( i )); if ( pDbData ) @@ -1024,11 +1024,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScValidationMode eMode = SC_VALID_ANY; ScConditionMode eOper = SC_COND_EQUAL; String aExpr1, aExpr2; - BOOL bBlank = TRUE; + sal_Bool bBlank = sal_True; sal_Int16 nListType = ValidListType::UNSORTED; - BOOL bShowHelp = FALSE; + sal_Bool bShowHelp = sal_False; String aHelpTitle, aHelpText; - BOOL bShowError = FALSE; + sal_Bool bShowError = sal_False; ScValidErrorStyle eErrStyle = SC_VALERR_STOP; String aErrTitle, aErrText; @@ -1037,7 +1037,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) SCROW nCurY = GetViewData()->GetCurY(); SCTAB nTab = GetViewData()->GetTabNo(); ScAddress aCursorPos( nCurX, nCurY, nTab ); - ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr( + sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr( nCurX, nCurY, nTab, ATTR_VALIDDATA ))->GetValue(); if ( nIndex ) { @@ -1046,7 +1046,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { eMode = pOldData->GetDataMode(); eOper = pOldData->GetOperation(); - ULONG nNumFmt = 0; + sal_uLong nNumFmt = 0; if ( eMode == SC_VALID_DATE || eMode == SC_VALID_TIME ) { short nType = ( eMode == SC_VALID_DATE ) ? NUMBERFORMAT_DATE @@ -1062,8 +1062,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) bShowHelp = pOldData->GetInput( aHelpTitle, aHelpText ); bShowError = pOldData->GetErrMsg( aErrTitle, aErrText, eErrStyle ); - aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<USHORT>(eMode) ) ); - aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<USHORT>(eOper) ) ); + aArgSet.Put( SfxAllEnumItem( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(eMode) ) ); + aArgSet.Put( SfxAllEnumItem( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>(eOper) ) ); aArgSet.Put( SfxStringItem( FID_VALID_VALUE1, aExpr1 ) ); aArgSet.Put( SfxStringItem( FID_VALID_VALUE2, aExpr2 ) ); aArgSet.Put( SfxBoolItem( FID_VALID_BLANK, bBlank ) ); @@ -1072,7 +1072,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aArgSet.Put( SfxStringItem( FID_VALID_HELPTITLE, aHelpTitle ) ); aArgSet.Put( SfxStringItem( FID_VALID_HELPTEXT, aHelpText ) ); aArgSet.Put( SfxBoolItem( FID_VALID_SHOWERR, bShowError ) ); - aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<USHORT>(eErrStyle) ) ); + aArgSet.Put( SfxAllEnumItem( FID_VALID_ERRSTYLE, sal::static_int_cast<sal_uInt16>(eErrStyle) ) ); aArgSet.Put( SfxStringItem( FID_VALID_ERRTITLE, aErrTitle ) ); aArgSet.Put( SfxStringItem( FID_VALID_ERRTEXT, aErrText ) ); } @@ -1097,11 +1097,11 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); - if ( pOutSet->GetItemState( FID_VALID_MODE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_MODE, sal_True, &pItem ) == SFX_ITEM_SET ) eMode = (ScValidationMode) ((const SfxAllEnumItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_CONDMODE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_CONDMODE, sal_True, &pItem ) == SFX_ITEM_SET ) eOper = (ScConditionMode) ((const SfxAllEnumItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_VALUE1, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_VALUE1, sal_True, &pItem ) == SFX_ITEM_SET ) { String aTemp1 = ((const SfxStringItem*)pItem)->GetValue(); if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME) @@ -1111,14 +1111,14 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) if (pDoc->GetFormatTable()->IsNumberFormat(aTemp1, nNumIndex, nVal)) aExpr1 =String( ::rtl::math::doubleToUString( nVal, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, - ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE)); + ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True)); else aExpr1 = aTemp1; } else aExpr1 = aTemp1; } - if ( pOutSet->GetItemState( FID_VALID_VALUE2, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_VALUE2, sal_True, &pItem ) == SFX_ITEM_SET ) { String aTemp2 = ((const SfxStringItem*)pItem)->GetValue(); if (eMode == SC_VALID_DATE || eMode == SC_VALID_TIME) @@ -1128,7 +1128,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) if (pDoc->GetFormatTable()->IsNumberFormat(aTemp2, nNumIndex, nVal)) aExpr2 =String( ::rtl::math::doubleToUString( nVal, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, - ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE)); + ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True)); else aExpr2 = aTemp2; } @@ -1136,25 +1136,25 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aExpr2 = aTemp2; } - if ( pOutSet->GetItemState( FID_VALID_BLANK, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_BLANK, sal_True, &pItem ) == SFX_ITEM_SET ) bBlank = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_LISTTYPE, sal_True, &pItem ) == SFX_ITEM_SET ) nListType = ((const SfxInt16Item*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_SHOWHELP, sal_True, &pItem ) == SFX_ITEM_SET ) bShowHelp = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_HELPTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) aHelpTitle = ((const SfxStringItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_HELPTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) aHelpText = ((const SfxStringItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_SHOWERR, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_SHOWERR, sal_True, &pItem ) == SFX_ITEM_SET ) bShowError = ((const SfxBoolItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_ERRSTYLE, sal_True, &pItem ) == SFX_ITEM_SET ) eErrStyle = (ScValidErrorStyle) ((const SfxAllEnumItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_ERRTITLE, sal_True, &pItem ) == SFX_ITEM_SET ) aErrTitle = ((const SfxStringItem*)pItem)->GetValue(); - if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pOutSet->GetItemState( FID_VALID_ERRTEXT, sal_True, &pItem ) == SFX_ITEM_SET ) aErrText = ((const SfxStringItem*)pItem)->GetValue(); ScValidationData aData( eMode, eOper, aExpr1, aExpr2, pDoc, aCursorPos ); @@ -1245,11 +1245,11 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) SCROW nPosY = pData->GetCurY(); SCTAB nTab = pData->GetTabNo(); - BOOL bAutoFilter = FALSE; - BOOL bAutoFilterTested = FALSE; + sal_Bool bAutoFilter = sal_False; + sal_Bool bAutoFilterTested = sal_False; SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) @@ -1258,8 +1258,8 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) { // importierte Daten ohne Selektion // oder Filter,Sortierung,Teilergebis (auch ohne Import) - BOOL bOk = FALSE; - ScDBData* pDBData = pTabViewShell->GetDBData(FALSE,SC_DB_OLD); + sal_Bool bOk = sal_False; + ScDBData* pDBData = pTabViewShell->GetDBData(sal_False,SC_DB_OLD); if (pDBData && pDoc->GetChangeTrack() == NULL) { if ( pDBData->HasImportParam() ) @@ -1309,7 +1309,7 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) case SID_REIMPORT_DATA: { // nur importierte Daten ohne Selektion - ScDBData* pDBData = pTabViewShell->GetDBData(FALSE,SC_DB_OLD); + ScDBData* pDBData = pTabViewShell->GetDBData(sal_False,SC_DB_OLD); if (!pDBData || !pDBData->HasImportParam() || pDBData->HasImportSelection() || pDoc->GetChangeTrack()!=NULL) { @@ -1329,9 +1329,9 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) break; case SID_SBA_BRW_INSERT: { - // SBA will ein BOOL-Item, damit ueberhaupt enabled + // SBA will ein sal_Bool-Item, damit ueberhaupt enabled - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; rSet.Put(SfxBoolItem(nWhich, bEnable)); } break; @@ -1342,7 +1342,7 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) if (!bAutoFilterTested) { bAutoFilter = pDoc->HasAutoFilter( nPosX, nPosY, nTab ); - bAutoFilterTested = TRUE; + bAutoFilterTested = sal_True; } if ( nWhich == SID_AUTO_FILTER ) { @@ -1370,16 +1370,16 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; SCTAB nStartTab, nEndTab; - BOOL bAnyQuery = FALSE; + sal_Bool bAnyQuery = sal_False; - BOOL bSelected = (GetViewData()->GetSimpleArea( + sal_Bool bSelected = (GetViewData()->GetSimpleArea( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ) == SC_MARK_SIMPLE); if ( bSelected ) { if (nStartCol==nEndCol && nStartRow==nEndRow) - bSelected = FALSE; + bSelected = sal_False; } else { @@ -1397,7 +1397,7 @@ void __EXPORT ScCellShell::GetDBState( SfxItemSet& rSet ) ScQueryParam aParam; pDBData->GetQueryParam( aParam ); if ( aParam.GetEntry(0).bDoQuery ) - bAnyQuery = TRUE; + bAnyQuery = sal_True; } if ( !bAnyQuery ) diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index e08ec21f4..ad3dc2a46 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -74,7 +74,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings(); ScModule* pScMod = SC_MOD(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -89,7 +89,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) // #53318# inplace macht die EditShell Aerger... //! kann nicht immer umgeschaltet werden ???? if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace()) - pTabViewShell->SetDontSwitch(TRUE); // EditShell nicht abschalten + pTabViewShell->SetDontSwitch(sal_True); // EditShell nicht abschalten // kein break case FID_CELL_FORMAT: @@ -102,7 +102,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) pScMod->InputEnterHandler(); pTabViewShell->UpdateInputHandler(); - pTabViewShell->SetDontSwitch(FALSE); + pTabViewShell->SetDontSwitch(sal_False); break; @@ -126,7 +126,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) * 1: ER Click erweitert Selektion * 2: ERG Click definiert weitere Selektion */ - UINT16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue(); + sal_uInt16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue(); switch ( nMode ) { @@ -144,7 +144,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) // no arguments (also executed by double click on the status bar controller): // advance to next selection mode - USHORT nModifiers = pTabViewShell->GetLockedModifiers(); + sal_uInt16 nModifiers = pTabViewShell->GetLockedModifiers(); switch ( nModifiers ) { case KEY_SHIFT: nModifiers = KEY_MOD1; break; // EXT -> ADD @@ -248,7 +248,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else if ( aString.Len() > 0 && ( aString.GetChar(0) == '=' || aString.GetChar(0) == '+' || aString.GetChar(0) == '-' ) ) { - pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, TRUE, pData ); + pTabViewShell->EnterData( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aString, sal_True, pData ); } else { @@ -303,22 +303,22 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_FUNCTION: { - USHORT nId = SID_OPENDLG_FUNCTION; + sal_uInt16 nId = SID_OPENDLG_FUNCTION; SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); rReq.Ignore(); } break; case SID_OPENDLG_CONSOLIDATE: { - USHORT nId = ScConsolidateDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScConsolidateDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; @@ -340,10 +340,10 @@ void ScCellShell::Execute( SfxRequest& rReq ) ATTR_PATTERN_END ); const SfxPoolItem* pAttr = NULL; - USHORT nWhich = 0; + sal_uInt16 nWhich = 0; for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ ) - if ( pReqArgs->GetItemState( nWhich, TRUE, &pAttr ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nWhich, sal_True, &pAttr ) == SFX_ITEM_SET ) pNewSet->Put( *pAttr ); pTabViewShell->ApplyAttributes( pNewSet, pEmptySet ); @@ -366,31 +366,31 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_SOLVE: { - USHORT nId = ScSolverDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScSolverDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; case SID_OPENDLG_OPTSOLVER: { - USHORT nId = ScOptSolverDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScOptSolverDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; case SID_OPENDLG_TABOP: { - USHORT nId = ScTabOpDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScTabOpDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; @@ -432,7 +432,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aBaseName ); aBaseName += '_'; @@ -441,13 +441,13 @@ void ScCellShell::Execute( SfxRequest& rReq ) // vorneweg testen, ob der Prefix als gueltig erkannt wird // wenn nicht, nur doppelte vermeiden - BOOL bPrefix = pDoc->ValidTabName( aBaseName ); + sal_Bool bPrefix = pDoc->ValidTabName( aBaseName ); DBG_ASSERT(bPrefix, "ungueltiger Tabellenname"); while ( pDoc->IsScenario(nTab+i) ) i++; - BOOL bValid; + sal_Bool bValid; SCTAB nDummy; do { @@ -466,9 +466,9 @@ void ScCellShell::Execute( SfxRequest& rReq ) String aArgName; String aArgComment; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_SCENARIOS, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_SCENARIOS, sal_True, &pItem ) == SFX_ITEM_SET ) aArgName = ((const SfxStringItem*)pItem)->GetValue(); - if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, sal_True, &pItem ) == SFX_ITEM_SET ) aArgComment = ((const SfxStringItem*)pItem)->GetValue(); aColor = Color( COL_LIGHTGRAY ); // Default @@ -480,13 +480,13 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else { - BOOL bSheetProtected = pDoc->IsTabProtected(nTab); + sal_Bool bSheetProtected = pDoc->IsTabProtected(nTab); //CHINA001 ScNewScenarioDlg* pNewDlg = - //CHINA001 new ScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, FALSE, bSheetProtected ); + //CHINA001 new ScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, sal_False, bSheetProtected ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, FALSE,bSheetProtected); + AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( pTabViewShell->GetDialogParent(), aName, RID_SCDLG_NEWSCENARIO, sal_False,bSheetProtected); DBG_ASSERT(pNewDlg, "Dialog create fail!");//CHINA001 if ( pNewDlg->Execute() == RET_OK ) { @@ -525,8 +525,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_ROW_HEIGHT ); // #101390#; the value of the macro is in HMM so use HMMToTwips to convert - pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, - sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) ); + pTabViewShell->SetMarkedWidthOrHeight( sal_False, SC_SIZE_DIRECT, + sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) ); if( ! rReq.IsAPI() ) rReq.Done(); } @@ -534,7 +534,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { ScViewData* pData = GetViewData(); FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); - USHORT nCurHeight = pData->GetDocument()-> + sal_uInt16 nCurHeight = pData->GetDocument()-> GetRowHeight( pData->GetCurY(), pData->GetTabNo() ); //CHINA001 ScMetricInputDlg* pDlg = @@ -559,10 +559,10 @@ void ScCellShell::Execute( SfxRequest& rReq ) if ( pDlg->Execute() == RET_OK ) { long nVal = pDlg->GetInputValue(); - pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, (USHORT)nVal ); + pTabViewShell->SetMarkedWidthOrHeight( sal_False, SC_SIZE_DIRECT, (sal_uInt16)nVal ); // #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert - rReq.AppendItem( SfxUInt16Item( FID_ROW_HEIGHT, (USHORT)TwipsToEvenHMM(nVal) ) ); + rReq.AppendItem( SfxUInt16Item( FID_ROW_HEIGHT, (sal_uInt16)TwipsToEvenHMM(nVal) ) ); rReq.Done(); } @@ -578,8 +578,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_ROW_OPT_HEIGHT ); // #101390#; the value of the macro is in HMM so use HMMToTwips to convert - pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_OPTIMAL, - sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) ); + pTabViewShell->SetMarkedWidthOrHeight( sal_False, SC_SIZE_OPTIMAL, + sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) ); ScGlobal::nLastRowHeightExtra = rUInt16Item.GetValue(); if( ! rReq.IsAPI() ) @@ -611,11 +611,11 @@ void ScCellShell::Execute( SfxRequest& rReq ) if ( pDlg->Execute() == RET_OK ) { long nVal = pDlg->GetInputValue(); - pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_OPTIMAL, (USHORT)nVal ); + pTabViewShell->SetMarkedWidthOrHeight( sal_False, SC_SIZE_OPTIMAL, (sal_uInt16)nVal ); ScGlobal::nLastRowHeightExtra = nVal; // #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert - rReq.AppendItem( SfxUInt16Item( FID_ROW_OPT_HEIGHT, (USHORT)TwipsToEvenHMM(nVal) ) ); + rReq.AppendItem( SfxUInt16Item( FID_ROW_OPT_HEIGHT, (sal_uInt16)TwipsToEvenHMM(nVal) ) ); rReq.Done(); } @@ -631,8 +631,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_COL_WIDTH ); // #101390#; the value of the macro is in HMM so use HMMToTwips to convert - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, - sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, + sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) ); if( ! rReq.IsAPI() ) rReq.Done(); } @@ -640,7 +640,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); ScViewData* pData = GetViewData(); - USHORT nCurHeight = pData->GetDocument()-> + sal_uInt16 nCurHeight = pData->GetDocument()-> GetColWidth( pData->GetCurX(), pData->GetTabNo() ); //CHINA001 ScMetricInputDlg* pDlg = @@ -665,10 +665,10 @@ void ScCellShell::Execute( SfxRequest& rReq ) if ( pDlg->Execute() == RET_OK ) { long nVal = pDlg->GetInputValue(); - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, (USHORT)nVal ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, (sal_uInt16)nVal ); // #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert - rReq.AppendItem( SfxUInt16Item( FID_COL_WIDTH, (USHORT)TwipsToEvenHMM(nVal)) ); + rReq.AppendItem( SfxUInt16Item( FID_COL_WIDTH, (sal_uInt16)TwipsToEvenHMM(nVal)) ); rReq.Done(); } @@ -684,8 +684,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) const SfxUInt16Item& rUInt16Item = (const SfxUInt16Item&)pReqArgs->Get( FID_COL_OPT_WIDTH ); // #101390#; the value of the macro is in HMM so use HMMToTwips to convert - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, - sal::static_int_cast<USHORT>( HMMToTwips(rUInt16Item.GetValue()) ) ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, + sal::static_int_cast<sal_uInt16>( HMMToTwips(rUInt16Item.GetValue()) ) ); ScGlobal::nLastColWidthExtra = rUInt16Item.GetValue(); if( ! rReq.IsAPI() ) @@ -717,11 +717,11 @@ void ScCellShell::Execute( SfxRequest& rReq ) if ( pDlg->Execute() == RET_OK ) { long nVal = pDlg->GetInputValue(); - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, (USHORT)nVal ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, (sal_uInt16)nVal ); ScGlobal::nLastColWidthExtra = nVal; // #101390#; the value of the macro should be in HMM so use TwipsToEvenHMM to convert - rReq.AppendItem( SfxUInt16Item( FID_COL_OPT_WIDTH, (USHORT)TwipsToEvenHMM(nVal) ) ); + rReq.AppendItem( SfxUInt16Item( FID_COL_OPT_WIDTH, (sal_uInt16)TwipsToEvenHMM(nVal) ) ); rReq.Done(); } delete pDlg; @@ -730,24 +730,24 @@ void ScCellShell::Execute( SfxRequest& rReq ) break; case FID_COL_OPT_DIRECT: - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH ); rReq.Done(); break; case FID_ROW_HIDE: - pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_DIRECT, 0 ); + pTabViewShell->SetMarkedWidthOrHeight( sal_False, SC_SIZE_DIRECT, 0 ); rReq.Done(); break; case FID_ROW_SHOW: - pTabViewShell->SetMarkedWidthOrHeight( FALSE, SC_SIZE_SHOW, 0 ); + pTabViewShell->SetMarkedWidthOrHeight( sal_False, SC_SIZE_SHOW, 0 ); rReq.Done(); break; case FID_COL_HIDE: - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_DIRECT, 0 ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_DIRECT, 0 ); rReq.Done(); break; case FID_COL_SHOW: - pTabViewShell->SetMarkedWidthOrHeight( TRUE, SC_SIZE_SHOW, 0 ); + pTabViewShell->SetMarkedWidthOrHeight( sal_True, SC_SIZE_SHOW, 0 ); rReq.Done(); break; @@ -789,11 +789,11 @@ void ScCellShell::Execute( SfxRequest& rReq ) if( bMerge ) { // merge - check if to move contents of covered cells - BOOL bMoveContents = FALSE; - BOOL bApi = rReq.IsAPI(); + sal_Bool bMoveContents = sal_False; + sal_Bool bApi = rReq.IsAPI(); const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET ) + pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) { DBG_ASSERT(pItem && pItem->ISA(SfxBoolItem), "falsches Item"); bMoveContents = ((const SfxBoolItem*)pItem)->GetValue(); @@ -833,7 +833,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) const ScMarkData& rMark = GetViewData()->GetMarkData(); if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) - pTabViewShell->MarkDataArea( TRUE ); + pTabViewShell->MarkDataArea( sal_True ); GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab, nEndCol,nEndRow,nEndTab ); @@ -845,7 +845,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { const SfxStringItem& rNameItem = (const SfxStringItem&)pReqArgs->Get( SID_AUTOFORMAT ); ScAutoFormat* pFormat = ScGlobal::GetAutoFormat(); - USHORT nIndex = pFormat->FindIndexPerName( rNameItem.GetValue() ); + sal_uInt16 nIndex = pFormat->FindIndexPerName( rNameItem.GetValue() ); pTabViewShell->AutoFormat( nIndex ); @@ -911,7 +911,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) // pObjSh->GetInPlaceObject()->GetIPClient()) //{ // GetViewData()->GetDocShell()-> - // DoInPlaceActivate(FALSE); // OLE beenden + // DoInPlaceActivate(sal_False); // OLE beenden //} } @@ -925,7 +925,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_DETECTIVE_FILLMODE: { - BOOL bOldMode = pTabViewShell->IsAuditShell(); + sal_Bool bOldMode = pTabViewShell->IsAuditShell(); pTabViewShell->SetAuditShell( !bOldMode ); pTabViewShell->Invalidate( nSlot ); } @@ -933,11 +933,11 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_CONDFRMT: { - USHORT nId = ScCondFormatDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScCondFormatDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx index 2c451fb82..f28710104 100644 --- a/sc/source/ui/view/cellsh4.cxx +++ b/sc/source/ui/view/cellsh4.cxx @@ -53,7 +53,7 @@ //------------------------------------------------------------------ #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) void ScCellShell::ExecuteCursor( SfxRequest& rReq ) @@ -61,10 +61,10 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) ScViewData* pData = GetViewData(); ScTabViewShell* pTabViewShell = pData->GetViewShell(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); SCsCOLROW nRepeat = 1; - BOOL bSel = FALSE; - BOOL bKeep = FALSE; + sal_Bool bSel = sal_False; + sal_Bool bKeep = sal_False; if ( pReqArgs != NULL ) { @@ -78,13 +78,13 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) { // evaluate locked selection mode - USHORT nLocked = pTabViewShell->GetLockedModifiers(); + sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers(); if ( nLocked & KEY_SHIFT ) - bSel = TRUE; // EXT + bSel = sal_True; // EXT else if ( nLocked & KEY_MOD1 ) { // ADD mode: keep the selection, start a new block when marking with shift again - bKeep = TRUE; + bKeep = sal_True; pTabViewShell->SetNewStartIfMarking(); } } @@ -170,7 +170,7 @@ void ScCellShell::GetStateCursor( SfxItemSet& /* rSet */ ) void ScCellShell::ExecuteCursorSel( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); short nRepeat = 1; if ( pReqArgs != NULL ) @@ -199,14 +199,14 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq ) return; } rReq.AppendItem( SfxInt16Item(FN_PARAM_1, nRepeat ) ); - rReq.AppendItem( SfxBoolItem(FN_PARAM_2, TRUE) ); + rReq.AppendItem( SfxBoolItem(FN_PARAM_2, sal_True) ); ExecuteSlot( rReq, GetInterface() ); } void ScCellShell::ExecuteMove( SfxRequest& rReq ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); if(nSlotId != SID_CURSORTOPOFSCREEN && nSlotId != SID_CURSORENDOFSCREEN) pTabViewShell->ExecuteInputDirect(); @@ -226,25 +226,25 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq ) // weil das ScSbxRange-Objekt bei Eingaben die Markierung veraendert case SID_NEXT_UNPROTECT: - pTabViewShell->FindNextUnprot( FALSE, !rReq.IsAPI() ); + pTabViewShell->FindNextUnprot( sal_False, !rReq.IsAPI() ); break; case SID_PREV_UNPROTECT: - pTabViewShell->FindNextUnprot( TRUE, !rReq.IsAPI() ); + pTabViewShell->FindNextUnprot( sal_True, !rReq.IsAPI() ); break; case SID_CURSORENTERUP: if (rReq.IsAPI()) - pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, FALSE ); + pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, sal_False ); else - pTabViewShell->MoveCursorEnter( TRUE ); + pTabViewShell->MoveCursorEnter( sal_True ); break; case SID_CURSORENTERDOWN: if (rReq.IsAPI()) - pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, FALSE ); + pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, sal_False ); else - pTabViewShell->MoveCursorEnter( FALSE ); + pTabViewShell->MoveCursorEnter( sal_False ); break; case SID_SELECT_COL: @@ -288,11 +288,11 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq ) break; case SID_CURSORTOPOFSCREEN: - pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, FALSE ); + pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, sal_False ); break; case SID_CURSORENDOFSCREEN: - pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, FALSE ); + pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, sal_False ); break; default: @@ -305,7 +305,7 @@ void ScCellShell::ExecuteMove( SfxRequest& rReq ) void ScCellShell::ExecutePageSel( SfxRequest& rReq ) { - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); switch ( nSlotId ) { case SID_CURSORHOME_SEL: rReq.SetSlot( SID_CURSORHOME ); break; @@ -316,7 +316,7 @@ void ScCellShell::ExecutePageSel( SfxRequest& rReq ) DBG_ERROR("Unbekannte Message bei ViewShell (ExecutePageSel)"); return; } - rReq.AppendItem( SfxBoolItem(FN_PARAM_2, TRUE) ); + rReq.AppendItem( SfxBoolItem(FN_PARAM_2, sal_True) ); ExecuteSlot( rReq, GetInterface() ); } @@ -324,9 +324,9 @@ void ScCellShell::ExecutePage( SfxRequest& rReq ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlotId = rReq.GetSlot(); - BOOL bSel = FALSE; - BOOL bKeep = FALSE; + sal_uInt16 nSlotId = rReq.GetSlot(); + sal_Bool bSel = sal_False; + sal_Bool bKeep = sal_False; if ( pReqArgs != NULL ) { @@ -338,13 +338,13 @@ void ScCellShell::ExecutePage( SfxRequest& rReq ) { // evaluate locked selection mode - USHORT nLocked = pTabViewShell->GetLockedModifiers(); + sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers(); if ( nLocked & KEY_SHIFT ) - bSel = TRUE; // EXT + bSel = sal_True; // EXT else if ( nLocked & KEY_MOD1 ) { // ADD mode: keep the selection, start a new block when marking with shift again - bKeep = TRUE; + bKeep = sal_True; pTabViewShell->SetNewStartIfMarking(); } } diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index 80c794d15..68d618f6b 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -84,7 +84,7 @@ ScColBar::~ScColBar() { } -inline BOOL ScColBar::UseNumericHeader() const +inline sal_Bool ScColBar::UseNumericHeader() const { return pViewData->GetDocument()->GetAddressConvention() == formula::FormulaGrammar::CONV_XL_R1C1; } @@ -94,7 +94,7 @@ SCCOLROW ScColBar::GetPos() return pViewData->GetPosX(eWhich); } -USHORT ScColBar::GetEntrySize( SCCOLROW nEntryNo ) +sal_uInt16 ScColBar::GetEntrySize( SCCOLROW nEntryNo ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); @@ -102,7 +102,7 @@ USHORT ScColBar::GetEntrySize( SCCOLROW nEntryNo ) if (pDoc->ColHidden(static_cast<SCCOL>(nEntryNo), nTab, nLastCol)) return 0; else - return (USHORT) ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() ); + return (sal_uInt16) ScViewData::ToPixel( pDoc->GetColWidth( static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() ); } String ScColBar::GetEntryText( SCCOLROW nEntryNo ) @@ -112,9 +112,9 @@ String ScColBar::GetEntryText( SCCOLROW nEntryNo ) : ScColToAlpha( static_cast<SCCOL>(nEntryNo) ); } -void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize ) +void ScColBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ) { - USHORT nSizeTwips; + sal_uInt16 nSizeTwips; ScSizeMode eMode = SC_SIZE_DIRECT; if (nNewSize>0 && nNewSize<10) nNewSize=10; // (Pixel) @@ -124,7 +124,7 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize ) eMode = SC_SIZE_OPTIMAL; } else - nSizeTwips = (USHORT) ( nNewSize / pViewData->GetPPTX() ); + nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTX() ); ScMarkData& rMark = pViewData->GetMarkData(); // SCTAB nTab = pViewData->GetTabNo(); @@ -161,7 +161,7 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize ) nRangeCnt = 1; } - pViewData->GetView()->SetWidthOrHeight( TRUE, nRangeCnt, pRanges, eMode, nSizeTwips ); + pViewData->GetView()->SetWidthOrHeight( sal_True, nRangeCnt, pRanges, eMode, nSizeTwips ); delete[] pRanges; } @@ -170,10 +170,10 @@ void ScColBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) SCCOLROW nRange[2]; nRange[0] = nStart; nRange[1] = nEnd; - pViewData->GetView()->SetWidthOrHeight( TRUE, 1, nRange, SC_SIZE_DIRECT, 0 ); + pViewData->GetView()->SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, 0 ); } -void ScColBar::SetMarking( BOOL bSet ) +void ScColBar::SetMarking( sal_Bool bSet ) { pViewData->GetMarkData().SetMarking( bSet ); if (!bSet) @@ -202,19 +202,19 @@ void ScColBar::SelectWindow() } pViewSh->ActivatePart( eActive ); - pFuncSet->SetColumn( TRUE ); + pFuncSet->SetColumn( sal_True ); pFuncSet->SetWhich( eActive ); pViewSh->ActiveGrabFocus(); } -BOOL ScColBar::IsDisabled() +sal_Bool ScColBar::IsDisabled() { ScModule* pScMod = SC_MOD(); return pScMod->IsFormulaMode() || pScMod->IsModalMode(); } -BOOL ScColBar::ResizeAllowed() +sal_Bool ScColBar::ResizeAllowed() { return !pViewData->HasEditView( pViewData->GetActivePart() ) && !pViewData->GetDocShell()->IsReadOnly(); @@ -235,7 +235,7 @@ String ScColBar::GetDragHelp( long nVal ) return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_WIDTH) ); } -BOOL ScColBar::IsLayoutRTL() // overloaded only for columns +sal_Bool ScColBar::IsLayoutRTL() // overloaded only for columns { return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); } @@ -262,7 +262,7 @@ SCCOLROW ScRowBar::GetPos() return pViewData->GetPosY(eWhich); } -USHORT ScRowBar::GetEntrySize( SCCOLROW nEntryNo ) +sal_uInt16 ScRowBar::GetEntrySize( SCCOLROW nEntryNo ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); @@ -270,7 +270,7 @@ USHORT ScRowBar::GetEntrySize( SCCOLROW nEntryNo ) if (pDoc->RowHidden(nEntryNo, nTab, nLastRow)) return 0; else - return (USHORT) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo, + return (sal_uInt16) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo, nTab ), pViewData->GetPPTY() ); } @@ -279,9 +279,9 @@ String ScRowBar::GetEntryText( SCCOLROW nEntryNo ) return String::CreateFromInt32( nEntryNo + 1 ); } -void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize ) +void ScRowBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ) { - USHORT nSizeTwips; + sal_uInt16 nSizeTwips; ScSizeMode eMode = SC_SIZE_DIRECT; if (nNewSize>0 && nNewSize<10) nNewSize=10; // (Pixel) @@ -291,7 +291,7 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize ) eMode = SC_SIZE_OPTIMAL; } else - nSizeTwips = (USHORT) ( nNewSize / pViewData->GetPPTY() ); + nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTY() ); ScMarkData& rMark = pViewData->GetMarkData(); // SCTAB nTab = pViewData->GetTabNo(); @@ -328,7 +328,7 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, USHORT nNewSize ) nRangeCnt = 1; } - pViewData->GetView()->SetWidthOrHeight( FALSE, nRangeCnt, pRanges, eMode, nSizeTwips ); + pViewData->GetView()->SetWidthOrHeight( sal_False, nRangeCnt, pRanges, eMode, nSizeTwips ); delete[] pRanges; } @@ -337,10 +337,10 @@ void ScRowBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) SCCOLROW nRange[2]; nRange[0] = nStart; nRange[1] = nEnd; - pViewData->GetView()->SetWidthOrHeight( FALSE, 1, nRange, SC_SIZE_DIRECT, 0 ); + pViewData->GetView()->SetWidthOrHeight( sal_False, 1, nRange, SC_SIZE_DIRECT, 0 ); } -void ScRowBar::SetMarking( BOOL bSet ) +void ScRowBar::SetMarking( sal_Bool bSet ) { pViewData->GetMarkData().SetMarking( bSet ); if (!bSet) @@ -369,19 +369,19 @@ void ScRowBar::SelectWindow() } pViewSh->ActivatePart( eActive ); - pFuncSet->SetColumn( FALSE ); + pFuncSet->SetColumn( sal_False ); pFuncSet->SetWhich( eActive ); pViewSh->ActiveGrabFocus(); } -BOOL ScRowBar::IsDisabled() +sal_Bool ScRowBar::IsDisabled() { ScModule* pScMod = SC_MOD(); return pScMod->IsFormulaMode() || pScMod->IsModalMode(); } -BOOL ScRowBar::ResizeAllowed() +sal_Bool ScRowBar::ResizeAllowed() { return !pViewData->HasEditView( pViewData->GetActivePart() ) && !pViewData->GetDocShell()->IsReadOnly(); @@ -411,7 +411,7 @@ SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo ) return pDoc->GetHiddenRowCount( nEntryNo, nTab ); } -BOOL ScRowBar::IsMirrored() // overloaded only for rows +sal_Bool ScRowBar::IsMirrored() // overloaded only for rows { return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); } diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 308df116b..205b44bee 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -75,7 +75,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName ) ScDocument* pDoc = GetViewData()->GetDocument(); ScDBCollection* pDBCol = pDoc->GetDBCollection(); - USHORT nFoundAt = 0; + sal_uInt16 nFoundAt = 0; if ( pDBCol->SearchName( rDBName, nFoundAt ) ) { ScDBData* pData = (*pDBCol)[nFoundAt]; @@ -93,7 +93,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName ) SetTabNo( nTab ); MoveCursorAbs( nStartCol, nStartRow, ScFollowMode( SC_FOLLOW_JUMP ), - FALSE, FALSE ); // bShift,bControl + sal_False, sal_False ); // bShift,bControl DoneBlockMode(); InitBlockMode( nStartCol, nStartRow, nTab ); MarkCursor( nEndCol, nEndRow, nTab ); @@ -104,7 +104,7 @@ void ScDBFunc::GotoDBArea( const String& rDBName ) // aktuellen Datenbereich fuer Sortieren / Filtern suchen -ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection eSel ) +ScDBData* ScDBFunc::GetDBData( sal_Bool bMark, ScGetDBMode eMode, ScGetDBSelection eSel ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDBData* pData = NULL; @@ -183,7 +183,7 @@ ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection e { ScRange aFound; pData->GetArea(aFound); - MarkRange( aFound, FALSE ); + MarkRange( aFound, sal_False ); } return pData; } @@ -199,7 +199,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& ScDBCollection* pOldColl = pDoc->GetDBCollection(); ScDBCollection* pUndoColl = NULL; ScDBCollection* pRedoColl = NULL; - const BOOL bRecord (pDoc->IsUndoEnabled()); + const sal_Bool bRecord (pDoc->IsUndoEnabled()); long nDelCount = rDelAreaList.Count(); for (long nDelPos=0; nDelPos<nDelCount; nDelPos++) @@ -223,9 +223,9 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& // neue Targets am SBA anmelden nicht mehr noetig - pDoc->CompileDBFormula( TRUE ); // CreateFormulaString + pDoc->CompileDBFormula( sal_True ); // CreateFormulaString pDoc->SetDBCollection( new ScDBCollection( rNewColl ) ); - pDoc->CompileDBFormula( FALSE ); // CompileFormulaString + pDoc->CompileDBFormula( sal_False ); // CompileFormulaString pOldColl = NULL; pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID ); aModificator.SetDocumentModified(); @@ -245,7 +245,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& // Sortieren -void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord ) +void ScDBFunc::UISort( const ScSortParam& rSortParam, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -272,12 +272,12 @@ void ScDBFunc::UISort( const ScSortParam& rSortParam, BOOL bRecord ) } } -void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint ) +void ScDBFunc::Sort( const ScSortParam& rSortParam, sal_Bool bRecord, sal_Bool bPaint ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); ScDBDocFunc aDBDocFunc( *pDocSh ); - BOOL bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, FALSE ); + sal_Bool bSuccess = aDBDocFunc.Sort( nTab, rSortParam, bRecord, bPaint, sal_False ); if ( bSuccess && !rSortParam.bInplace ) { // Ziel markieren @@ -291,23 +291,23 @@ void ScDBFunc::Sort( const ScSortParam& rSortParam, BOOL bRecord, BOOL bPaint ) // Filtern -void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, BOOL bRecord ) +void ScDBFunc::Query( const ScQueryParam& rQueryParam, const ScRange* pAdvSource, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); ScDBDocFunc aDBDocFunc( *pDocSh ); - BOOL bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, FALSE ); + sal_Bool bSuccess = aDBDocFunc.Query( nTab, rQueryParam, pAdvSource, bRecord, sal_False ); if (bSuccess) { - BOOL bCopy = !rQueryParam.bInplace; + sal_Bool bCopy = !rQueryParam.bInplace; if (bCopy) { // Zielbereich markieren (DB-Bereich wurde ggf. angelegt) ScDocument* pDoc = pDocSh->GetDocument(); ScDBData* pDestData = pDoc->GetDBAtCursor( rQueryParam.nDestCol, rQueryParam.nDestRow, - rQueryParam.nDestTab, TRUE ); + rQueryParam.nDestTab, sal_True ); if (pDestData) { ScRange aDestRange; @@ -335,19 +335,19 @@ void ScDBFunc::ToggleAutoFilter() ScQueryParam aParam; ScDocument* pDoc = GetViewData()->GetDocument(); - ScDBData* pDBData = GetDBData( FALSE, SC_DB_MAKE, SC_DBSEL_ROW_DOWN ); + ScDBData* pDBData = GetDBData( sal_False, SC_DB_MAKE, SC_DBSEL_ROW_DOWN ); - pDBData->SetByRow( TRUE ); //! Undo, vorher abfragen ?? + pDBData->SetByRow( sal_True ); //! Undo, vorher abfragen ?? pDBData->GetQueryParam( aParam ); SCCOL nCol; SCROW nRow = aParam.nRow1; SCTAB nTab = GetViewData()->GetTabNo(); - INT16 nFlag; - BOOL bHasAuto = TRUE; - BOOL bHeader = pDBData->HasHeader(); - BOOL bPaint = FALSE; + sal_Int16 nFlag; + sal_Bool bHasAuto = sal_True; + sal_Bool bHeader = pDBData->HasHeader(); + sal_Bool bPaint = sal_False; //! stattdessen aus DB-Bereich abfragen? @@ -357,7 +357,7 @@ void ScDBFunc::ToggleAutoFilter() GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->GetValue(); if ( (nFlag & SC_MF_AUTO) == 0 ) - bHasAuto = FALSE; + bHasAuto = sal_False; } if (bHasAuto) // aufheben @@ -379,21 +379,21 @@ void ScDBFunc::ToggleAutoFilter() ScRange aRange; pDBData->GetArea( aRange ); pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) ); + new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), sal_False ) ); - pDBData->SetAutoFilter(FALSE); + pDBData->SetAutoFilter(sal_False); // Filter aufheben (incl. Paint / Undo) SCSIZE nEC = aParam.GetEntryCount(); for (SCSIZE i=0; i<nEC; i++) - aParam.GetEntry(i).bDoQuery = FALSE; - aParam.bDuplicate = TRUE; - Query( aParam, NULL, TRUE ); + aParam.GetEntry(i).bDoQuery = sal_False; + aParam.bDuplicate = sal_True; + Query( aParam, NULL, sal_True ); pDocSh->GetUndoManager()->LeaveListAction(); - bPaint = TRUE; + bPaint = sal_True; } else // Filterknoepfe einblenden { @@ -408,17 +408,17 @@ void ScDBFunc::ToggleAutoFilter() ScGlobal::GetRscString( STR_MSSG_MAKEAUTOFILTER_0 ) // Koepfe aus erster Zeile? ).Execute() == RET_YES ) { - pDBData->SetHeader( TRUE ); //! Undo ?? - bHeader = TRUE; + pDBData->SetHeader( sal_True ); //! Undo ?? + bHeader = sal_True; } } ScRange aRange; pDBData->GetArea( aRange ); pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), TRUE ) ); + new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), sal_True ) ); - pDBData->SetAutoFilter(TRUE); + pDBData->SetAutoFilter(sal_True); for (nCol=aParam.nCol1; nCol<=aParam.nCol2; nCol++) { @@ -428,7 +428,7 @@ void ScDBFunc::ToggleAutoFilter() } pDocSh->PostPaint( aParam.nCol1, nRow, nTab, aParam.nCol2, nRow, nTab, PAINT_GRID ); - bPaint = TRUE; + bPaint = sal_True; } else { @@ -458,7 +458,7 @@ void ScDBFunc::HideAutoFilter() ScDocument* pDoc = pDocSh->GetDocument(); ScQueryParam aParam; - ScDBData* pDBData = GetDBData( FALSE ); + ScDBData* pDBData = GetDBData( sal_False ); SCTAB nTab; SCCOL nCol1, nCol2; @@ -467,7 +467,7 @@ void ScDBFunc::HideAutoFilter() for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++) { - INT16 nFlag = ((ScMergeFlagAttr*) pDoc-> + sal_Int16 nFlag = ((ScMergeFlagAttr*) pDoc-> GetAttr( nCol, nRow1, nTab, ATTR_MERGE_FLAG ))->GetValue(); pDoc->ApplyAttr( nCol, nRow1, nTab, ScMergeFlagAttr( nFlag & ~SC_MF_AUTO ) ); } @@ -475,9 +475,9 @@ void ScDBFunc::HideAutoFilter() ScRange aRange; pDBData->GetArea( aRange ); pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), FALSE ) ); + new ScUndoAutoFilter( pDocSh, aRange, pDBData->GetName(), sal_False ) ); - pDBData->SetAutoFilter(FALSE); + pDBData->SetAutoFilter(sal_False); pDocSh->PostPaint( nCol1,nRow1,nTab, nCol2,nRow1,nTab, PAINT_GRID ); aModificator.SetDocumentModified(); @@ -489,7 +489,7 @@ void ScDBFunc::HideAutoFilter() // Re-Import -BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord ) +sal_Bool ScDBFunc::ImportData( const ScImportParam& rParam, sal_Bool bRecord ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScEditableTester aTester( pDoc, GetViewData()->GetTabNo(), rParam.nCol1,rParam.nRow1, @@ -497,7 +497,7 @@ BOOL ScDBFunc::ImportData( const ScImportParam& rParam, BOOL bRecord ) if ( !aTester.IsEditable() ) { ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScDBDocFunc aDBDocFunc( *GetViewData()->GetDocShell() ); diff --git a/sc/source/ui/view/dbfunc2.cxx b/sc/source/ui/view/dbfunc2.cxx index faa37bd72..387a0eab9 100644 --- a/sc/source/ui/view/dbfunc2.cxx +++ b/sc/source/ui/view/dbfunc2.cxx @@ -53,9 +53,9 @@ class ScDrawLayer; class ScChartCollection; -void ScDBFunc::UpdateCharts( BOOL bAllCharts ) +void ScDBFunc::UpdateCharts( sal_Bool bAllCharts ) { - USHORT nFound = 0; + sal_uInt16 nFound = 0; ScViewData* pViewData = GetViewData(); ScDocument* pDoc = pViewData->GetDocument(); diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 7e9518f97..e4d65c6d1 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -112,14 +112,14 @@ using ::std::hash_set; // Outline-Gruppierung erzeugen -void ScDBFunc::MakeOutline( BOOL bColumns, BOOL bRecord ) +void ScDBFunc::MakeOutline( sal_Bool bColumns, sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.MakeOutline( aRange, bColumns, bRecord, FALSE ); + aFunc.MakeOutline( aRange, bColumns, bRecord, sal_False ); } else ErrorMessage(STR_NOMULTISELECT); @@ -127,14 +127,14 @@ void ScDBFunc::MakeOutline( BOOL bColumns, BOOL bRecord ) // Outline-Gruppierung loeschen -void ScDBFunc::RemoveOutline( BOOL bColumns, BOOL bRecord ) +void ScDBFunc::RemoveOutline( sal_Bool bColumns, sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.RemoveOutline( aRange, bColumns, bRecord, FALSE ); + aFunc.RemoveOutline( aRange, bColumns, bRecord, sal_False ); } else ErrorMessage(STR_NOMULTISELECT); @@ -142,10 +142,10 @@ void ScDBFunc::RemoveOutline( BOOL bColumns, BOOL bRecord ) // Menue-Status: Outlines loeschen -void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow ) +void ScDBFunc::TestRemoveOutline( sal_Bool& rCol, sal_Bool& rRow ) { - BOOL bColFound = FALSE; - BOOL bRowFound = FALSE; + sal_Bool bColFound = sal_False; + sal_Bool bRowFound = sal_False; SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; @@ -161,8 +161,8 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow ) ScOutlineEntry* pEntry; SCCOLROW nStart; SCCOLROW nEnd; - BOOL bColMarked = ( nStartRow == 0 && nEndRow == MAXROW ); - BOOL bRowMarked = ( nStartCol == 0 && nEndCol == MAXCOL ); + sal_Bool bColMarked = ( nStartRow == 0 && nEndRow == MAXROW ); + sal_Bool bRowMarked = ( nStartCol == 0 && nEndCol == MAXCOL ); // Spalten @@ -175,7 +175,7 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow ) nStart = pEntry->GetStart(); nEnd = pEntry->GetEnd(); if ( nStartCol<=static_cast<SCCOL>(nEnd) && nEndCol>=static_cast<SCCOL>(nStart) ) - bColFound = TRUE; + bColFound = sal_True; } } @@ -190,7 +190,7 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow ) nStart = pEntry->GetStart(); nEnd = pEntry->GetEnd(); if ( nStartRow<=nEnd && nEndRow>=nStart ) - bRowFound = TRUE; + bRowFound = sal_True; } } } @@ -200,14 +200,14 @@ void ScDBFunc::TestRemoveOutline( BOOL& rCol, BOOL& rRow ) rRow = bRowFound; } -void ScDBFunc::RemoveAllOutlines( BOOL bRecord ) +void ScDBFunc::RemoveAllOutlines( sal_Bool bRecord ) { SCTAB nTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); HideCursor(); - BOOL bOk = aFunc.RemoveAllOutlines( nTab, bRecord, FALSE ); + sal_Bool bOk = aFunc.RemoveAllOutlines( nTab, bRecord, sal_False ); ShowCursor(); if (bOk) @@ -216,7 +216,7 @@ void ScDBFunc::RemoveAllOutlines( BOOL bRecord ) // Auto-Outlines -void ScDBFunc::AutoOutline( BOOL bRecord ) +void ScDBFunc::AutoOutline( sal_Bool bRecord ) { SCTAB nTab = GetViewData()->GetTabNo(); ScRange aRange( 0,0,nTab, MAXCOL,MAXROW,nTab ); // ganze Tabelle, wenn nichts markiert @@ -229,19 +229,19 @@ void ScDBFunc::AutoOutline( BOOL bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.AutoOutline( aRange, bRecord, FALSE ); + aFunc.AutoOutline( aRange, bRecord, sal_False ); } // Outline-Ebene auswaehlen -void ScDBFunc::SelectLevel( BOOL bColumns, USHORT nLevel, BOOL bRecord, BOOL bPaint ) +void ScDBFunc::SelectLevel( sal_Bool bColumns, sal_uInt16 nLevel, sal_Bool bRecord, sal_Bool bPaint ) { SCTAB nTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); HideCursor(); - BOOL bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint, FALSE ); + sal_Bool bOk = aFunc.SelectLevel( nTab, bColumns, nLevel, bRecord, bPaint, sal_False ); ShowCursor(); if (bOk) @@ -250,14 +250,14 @@ void ScDBFunc::SelectLevel( BOOL bColumns, USHORT nLevel, BOOL bRecord, BOOL bPa // einzelne Outline-Gruppe einblenden -void ScDBFunc::ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bRecord, BOOL bPaint ) +void ScDBFunc::ShowOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bRecord, sal_Bool bPaint ) { SCTAB nTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); HideCursor(); - BOOL bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, FALSE ); + sal_Bool bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, sal_False ); ShowCursor(); if ( bOk && bPaint ) @@ -266,14 +266,14 @@ void ScDBFunc::ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bR // einzelne Outline-Gruppe ausblenden -void ScDBFunc::HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bRecord, BOOL bPaint ) +void ScDBFunc::HideOutline( sal_Bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, sal_Bool bRecord, sal_Bool bPaint ) { SCTAB nTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); HideCursor(); - BOOL bOk = aFunc.HideOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, FALSE ); + sal_Bool bOk = aFunc.HideOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint, sal_False ); ShowCursor(); if ( bOk && bPaint ) @@ -282,9 +282,9 @@ void ScDBFunc::HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry, BOOL bR // Menue-Status: markierten Bereich ein-/ausblenden -BOOL ScDBFunc::OutlinePossible(BOOL bHide) +sal_Bool ScDBFunc::OutlinePossible(sal_Bool bHide) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; SCCOL nStartCol; SCROW nStartRow; @@ -317,13 +317,13 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide) { if ( nStartCol<=static_cast<SCCOL>(nEnd) && nEndCol>=static_cast<SCCOL>(nStart) ) if (!pEntry->IsHidden()) - bEnable = TRUE; + bEnable = sal_True; } else { if ( nStart>=nStartCol && nEnd<=nEndCol ) if (pEntry->IsHidden()) - bEnable = TRUE; + bEnable = sal_True; } } @@ -339,13 +339,13 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide) { if ( nStartRow<=nEnd && nEndRow>=nStart ) if (!pEntry->IsHidden()) - bEnable = TRUE; + bEnable = sal_True; } else { if ( nStart>=nStartRow && nEnd<=nEndRow ) if (pEntry->IsHidden()) - bEnable = TRUE; + bEnable = sal_True; } } } @@ -356,7 +356,7 @@ BOOL ScDBFunc::OutlinePossible(BOOL bHide) // markierten Bereich einblenden -void ScDBFunc::ShowMarkedOutlines( BOOL bRecord ) +void ScDBFunc::ShowMarkedOutlines( sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) @@ -364,7 +364,7 @@ void ScDBFunc::ShowMarkedOutlines( BOOL bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); HideCursor(); - BOOL bDone = aFunc.ShowMarkedOutlines( aRange, bRecord, FALSE ); + sal_Bool bDone = aFunc.ShowMarkedOutlines( aRange, bRecord, sal_False ); ShowCursor(); if (bDone) UpdateScrollBars(); @@ -375,7 +375,7 @@ void ScDBFunc::ShowMarkedOutlines( BOOL bRecord ) // markierten Bereich ausblenden -void ScDBFunc::HideMarkedOutlines( BOOL bRecord ) +void ScDBFunc::HideMarkedOutlines( sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) @@ -383,7 +383,7 @@ void ScDBFunc::HideMarkedOutlines( BOOL bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScOutlineDocFunc aFunc(*pDocSh); HideCursor(); - BOOL bDone = aFunc.HideMarkedOutlines( aRange, bRecord, FALSE ); + sal_Bool bDone = aFunc.HideMarkedOutlines( aRange, bRecord, sal_False ); ShowCursor(); if (bDone) UpdateScrollBars(); @@ -398,17 +398,17 @@ void ScDBFunc::HideMarkedOutlines( BOOL bRecord ) // Teilergebnisse // -void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, +void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, sal_Bool bRecord, const ScSortParam* pForceNewSort ) { - BOOL bDo = !rParam.bRemoveOnly; // FALSE = nur loeschen + sal_Bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTab = GetViewData()->GetTabNo(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDBData* pDBData = pDoc->GetDBAtArea( nTab, rParam.nCol1, rParam.nRow1, rParam.nCol2, rParam.nRow2 ); @@ -433,12 +433,12 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, } WaitObject aWait( GetViewData()->GetDialogParent() ); - 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( GetViewData()->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_YES), // "StarCalc" "Daten loeschen?" ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), @@ -459,7 +459,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, if (bRecord) // alte Daten sichern { - BOOL bOldFilter = bDo && rParam.bDoSort; + sal_Bool bOldFilter = bDo && rParam.bDoSort; nTabCount = pDoc->GetTableCount(); pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -475,20 +475,20 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol ); pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(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<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(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(); @@ -506,7 +506,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, if (rParam.bReplace) pDoc->RemoveSubTotals( nTab, aNewParam ); - BOOL bSuccess = TRUE; + sal_Bool bSuccess = sal_True; if (bDo) { // Sortieren @@ -520,7 +520,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, ScSortParam aOldSort; pDBData->GetSortParam( aOldSort ); ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort ); - Sort( aSortParam, FALSE, FALSE ); + Sort( aSortParam, sal_False, sal_False ); } bSuccess = pDoc->DoSubTotals( nTab, aNewParam ); @@ -569,11 +569,11 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord, // Consolidate // -void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, BOOL bRecord ) +void ScDBFunc::Consolidate( const ScConsolidateParam& rParam, sal_Bool bRecord ) { ScDocShell* pDocShell = GetViewData()->GetDocShell(); pDocShell->DoConsolidate( rParam, bRecord ); - SetTabNo( rParam.nTab, TRUE ); + SetTabNo( rParam.nTab, sal_True ); } // @@ -587,8 +587,8 @@ String lcl_MakePivotTabName( const String& rPrefix, SCTAB nNumber ) return aName; } -bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable, - const ScDPObject& rSource, BOOL bApi ) +bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, sal_Bool bNewTable, + const ScDPObject& rSource, sal_Bool bApi ) { // #70096# error message if no fields are set // this must be removed when drag&drop of fields from a toolbox is available @@ -601,7 +601,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = GetViewData()->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScRange aDestRange = rDest; if ( bNewTable ) @@ -622,7 +622,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, while ( !pDoc->InsertTab( nNewTab, lcl_MakePivotTabName( aName, i ) ) && i <= MAXTAB ) i++; - BOOL bAppend = ( nNewTab+1 == pDoc->GetTableCount() ); + sal_Bool bAppend = ( nNewTab+1 == pDoc->GetTableCount() ); if (bUndo) { pDocSh->GetUndoManager()->AddUndoAction( @@ -630,7 +630,7 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, } GetViewData()->InsertTab( nNewTab ); - SetTabNo( nNewTab, TRUE ); + SetTabNo( nNewTab, sal_True ); aDestRange = ScRange( 0, 0, nNewTab ); } @@ -657,10 +657,10 @@ bool ScDBFunc::MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, else aObj.SetSaveData( rData ); - BOOL bAllowMove = ( pDPObj != NULL ); // allow re-positioning when editing existing table + sal_Bool bAllowMove = ( pDPObj != NULL ); // allow re-positioning when editing existing table ScDBDocFunc aFunc( *pDocSh ); - bool bSuccess = aFunc.DataPilotUpdate( pDPObj, &aObj, TRUE, FALSE, bAllowMove ); + bool bSuccess = aFunc.DataPilotUpdate( pDPObj, &aObj, sal_True, sal_False, bAllowMove ); CursorPosChanged(); // shells may be switched @@ -683,13 +683,13 @@ void ScDBFunc::DeletePivotTable() if ( pDPObj ) { ScDBDocFunc aFunc( *pDocSh ); - aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, sal_False ); CursorPosChanged(); // shells may be switched } else ErrorMessage(STR_PIVOT_NOTFOUND); } -ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, BOOL bRecord, BOOL bApi ) +sal_uLong RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, sal_Bool bRecord, sal_Bool bApi ) { if( !pDPObj ) return STR_PIVOT_NOTFOUND; @@ -698,19 +698,19 @@ ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, pDoc = pDocSh->GetDocument(); if( !pDoc ) - return static_cast<ULONG>(-1); + return static_cast<sal_uLong>(-1); if( !pDocSh && ( pDocSh = PTR_CAST( ScDocShell, pDoc->GetDocumentShell() ) ) == NULL ) - return static_cast<ULONG>(-1); + return static_cast<sal_uLong>(-1); - if( ULONG nErrId = pDPObj->RefreshCache() ) + if( sal_uLong nErrId = pDPObj->RefreshCache() ) return nErrId; else if ( nErrId == 0 ) { //Refresh all dpobjects ScDPCollection* pDPCollection = pDoc->GetDPCollection(); - USHORT nCount = pDPCollection->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pDPCollection->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { if ( (*pDPCollection)[i]->GetCacheId() == pDPObj->GetCacheId() ) { @@ -726,7 +726,7 @@ ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, return 0U; } -ULONG ScDBFunc::RecalcPivotTable() +sal_uLong ScDBFunc::RecalcPivotTable() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = GetViewData()->GetDocument(); @@ -741,9 +741,9 @@ ULONG ScDBFunc::RecalcPivotTable() // Wang Xu Ming -- 2009-6-17 // DataPilot Migration //ScDBDocFunc aFunc( *pDocSh ); - //aFunc.DataPilotUpdate( pDPObj, pDPObj, TRUE, FALSE ); + //aFunc.DataPilotUpdate( pDPObj, pDPObj, sal_True, sal_False ); //CursorPosChanged(); // shells may be switched - ULONG nErrId = RefreshDPObject( pDPObj, pDoc, pDocSh, TRUE, FALSE );//pDPObj->RefreshCache(); + sal_uLong nErrId = RefreshDPObject( pDPObj, pDoc, pDocSh, sal_True, sal_False );//pDPObj->RefreshCache(); if ( nErrId == 0 ) { // There is no undo for the refresh of the cache table, but the undo history for cell changes @@ -751,7 +751,7 @@ ULONG ScDBFunc::RecalcPivotTable() //GetViewData()->GetDocShell()->GetUndoManager()->Clear(); } else if (nErrId <= USHRT_MAX) - ErrorMessage(static_cast<USHORT>(nErrId)); + ErrorMessage(static_cast<sal_uInt16>(nErrId)); return nErrId; // End Comments } @@ -773,10 +773,10 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio ScRangeListRef xRanges; GetViewData()->GetMultiArea( xRanges ); // incl. cursor if nothing is selected - ULONG nRangeCount = xRanges->Count(); - BOOL bContinue = TRUE; + sal_uLong nRangeCount = xRanges->Count(); + sal_Bool bContinue = sal_True; - for (ULONG nRangePos=0; nRangePos<nRangeCount && bContinue; nRangePos++) + for (sal_uLong nRangePos=0; nRangePos<nRangeCount && bContinue; nRangePos++) { ScRange aRange = *xRanges->GetObject(nRangePos); SCCOL nStartCol = aRange.aStart.Col(); @@ -791,7 +791,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio sheet::DataPilotTableHeaderData aData; pDPObj->GetHeaderPositionData(ScAddress(nCol, nRow, nTab), aData); if ( aData.Dimension < 0 ) - bContinue = FALSE; // not part of any dimension + bContinue = sal_False; // not part of any dimension else { if ( nStartDimension < 0 ) // first member? @@ -804,7 +804,7 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio aData.Hierarchy != nStartHierarchy || aData.Level != nStartLevel ) { - bContinue = FALSE; // cannot mix dimensions + bContinue = sal_False; // cannot mix dimensions } } if ( bContinue ) @@ -826,11 +826,11 @@ void ScDBFunc::GetSelectedMemberList( ScStrCollection& rEntries, long& rDimensio rEntries.FreeAll(); // remove all if not valid } -BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts ) +sal_Bool ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts ) { // determine if the date group dialog has to be shown for the current selection - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCCOL nCurX = GetViewData()->GetCurX(); SCROW nCurY = GetViewData()->GetCurY(); @@ -846,12 +846,12 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); String aBaseDimName( aDimName ); - BOOL bInGroupDim = FALSE; - BOOL bFoundParts = FALSE; + sal_Bool bInGroupDim = sal_False; + sal_Bool bFoundParts = sal_False; ScDPDimensionSaveData* pDimData = const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() ); @@ -869,7 +869,7 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& // (parts are collected below) rOldInfo = pNumGroupDim->GetDateInfo(); - bFound = TRUE; + bFound = sal_True; } else if ( pNumGroupDim->GetInfo().DateValues ) { @@ -878,10 +878,10 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rOldInfo = pNumGroupDim->GetInfo(); rParts = com::sun::star::sheet::DataPilotFieldGroupBy::DAYS; // not found in CollectDateParts - bFoundParts = TRUE; - bFound = TRUE; + bFoundParts = sal_True; + bFound = sal_True; } - bInGroupDim = TRUE; + bInGroupDim = sal_True; } else if ( pGroupDim ) { @@ -894,9 +894,9 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rOldInfo = pGroupDim->GetDateInfo(); aBaseDimName = pGroupDim->GetSourceDimName(); - bFound = TRUE; + bFound = sal_True; } - bInGroupDim = TRUE; + bInGroupDim = sal_True; } } if ( bFound && !bFoundParts ) @@ -918,12 +918,12 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& SCTAB nSelTab = aSelRange.aStart.Tab(); if ( pDoc->HasValueData( nSelCol, nSelRow, nSelTab ) ) { - ULONG nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr( + sal_uLong nIndex = static_cast<const SfxUInt32Item*>(pDoc->GetAttr( nSelCol, nSelRow, nSelTab, ATTR_VALUE_FORMAT))->GetValue(); short nType = pDoc->GetFormatTable()->GetType(nIndex); if ( nType == NUMBERFORMAT_DATE || nType == NUMBERFORMAT_TIME || nType == NUMBERFORMAT_DATETIME ) { - bFound = TRUE; + bFound = sal_True; // use currently selected value for automatic limits if( rOldInfo.AutoStart ) rOldInfo.Start = pDoc->GetValue( aSelRange.aStart ); @@ -939,11 +939,11 @@ BOOL ScDBFunc::HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& return bFound; } -BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) +sal_Bool ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) { // determine if the numeric group dialog has to be shown for the current selection - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCCOL nCurX = GetViewData()->GetCurX(); SCROW nCurY = GetViewData()->GetCurY(); @@ -959,10 +959,10 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); - BOOL bInGroupDim = FALSE; + sal_Bool bInGroupDim = sal_False; ScDPDimensionSaveData* pDimData = const_cast<ScDPDimensionSaveData*>( pDPObj->GetSaveData()->GetExistingDimensionData() ); @@ -975,10 +975,10 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) // -> edit settings of this dimension rOldInfo = pNumGroupDim->GetInfo(); - bFound = TRUE; + bFound = sal_True; } else if ( pDimData->GetNamedGroupDim( aDimName ) ) - bInGroupDim = TRUE; // in a group dimension + bInGroupDim = sal_True; // in a group dimension } if ( !bFound && !bInGroupDim ) { @@ -992,7 +992,7 @@ BOOL ScDBFunc::HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ) if ( pDoc->HasValueData( aSelRange.aStart.Col(), aSelRange.aStart.Row(), aSelRange.aStart.Tab() ) ) { - bFound = TRUE; + bFound = sal_True; // use currently selected value for automatic limits if( rOldInfo.AutoStart ) rOldInfo.Start = pDoc->GetValue( aSelRange.aStart ); @@ -1019,7 +1019,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); ScDPSaveData aData( *pDPObj->GetSaveData() ); @@ -1073,7 +1073,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar ScDPNumGroupInfo aEmpty; bool bFirst = true; sal_Int32 nMask = 1; - for (USHORT nBit=0; nBit<32; nBit++) + for (sal_uInt16 nBit=0; nBit<32; nBit++) { if ( nParts & nMask ) { @@ -1128,7 +1128,7 @@ void ScDBFunc::DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nPar ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); delete pNewObj; // unmark cell selection @@ -1149,7 +1149,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo ) if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); ScDPSaveData aData( *pDPObj->GetSaveData() ); @@ -1172,7 +1172,7 @@ void ScDBFunc::NumGroupDataPilot( const ScDPNumGroupInfo& rInfo ) ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); delete pNewObj; // unmark cell selection @@ -1193,7 +1193,7 @@ void ScDBFunc::GroupDataPilot() if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); ScDPSaveData aData( *pDPObj->GetSaveData() ); @@ -1214,8 +1214,8 @@ void ScDBFunc::GroupDataPilot() // remove the selected items from their groups // (empty groups are removed, too) - USHORT nEntryCount = aEntries.GetCount(); - USHORT nEntry; + sal_uInt16 nEntryCount = aEntries.GetCount(); + sal_uInt16 nEntry; if ( pGroupDimension ) { for (nEntry=0; nEntry<nEntryCount; nEntry++) @@ -1260,7 +1260,7 @@ void ScDBFunc::GroupDataPilot() const ScDPSaveGroupItem* pBaseGroup = pBaseGroupDim->GetGroupByIndex( nGroup ); StrData aStrData( pBaseGroup->GetGroupName() ); - USHORT nCollIndex; + sal_uInt16 nCollIndex; if ( !aEntries.Search( &aStrData, nCollIndex ) ) //! ignore case? { // add an additional group for each item that is not in the selection @@ -1316,7 +1316,7 @@ void ScDBFunc::GroupDataPilot() ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); delete pNewObj; // unmark cell selection @@ -1337,14 +1337,14 @@ void ScDBFunc::UngroupDataPilot() if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); ScDPSaveData aData( *pDPObj->GetSaveData() ); ScDPDimensionSaveData* pDimData = aData.GetDimensionData(); // created if not there //! test first if DimensionData exists? - BOOL bApply = FALSE; + sal_Bool bApply = sal_False; ScDPSaveGroupDimension* pGroupDim = pDimData->GetNamedGroupDimAcc( aDimName ); const ScDPSaveNumGroupDimension* pNumGroupDim = pDimData->GetNumGroupDim( aDimName ); @@ -1360,8 +1360,8 @@ void ScDBFunc::UngroupDataPilot() } else if ( pGroupDim ) { - USHORT nEntryCount = aEntries.GetCount(); - for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++) + sal_uInt16 nEntryCount = aEntries.GetCount(); + for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++) { String aEntryName = aEntries[nEntry]->GetString(); pGroupDim->RemoveGroup( aEntryName ); @@ -1383,14 +1383,14 @@ void ScDBFunc::UngroupDataPilot() // also remove SaveData settings for the dimension that no longer exists aData.RemoveDimensionByName( aDimName ); } - bApply = TRUE; + bApply = sal_True; } else if ( pNumGroupDim ) { // remove the numerical grouping pDimData->RemoveNumGroupDimension( aDimName ); // SaveData settings can remain unchanged - the same dimension still exists - bApply = TRUE; + bApply = sal_True; } if ( bApply ) @@ -1399,7 +1399,7 @@ void ScDBFunc::UngroupDataPilot() ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); delete pNewObj; // unmark cell selection @@ -1474,13 +1474,13 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) return; } - USHORT nErrorId = 0; + sal_uInt16 nErrorId = 0; pDPObj->BuildAllDimensionMembers(); ScDPSaveData aData( *pDPObj->GetSaveData() ); - BOOL bChange = FALSE; + sal_Bool bChange = sal_False; - USHORT nOrient = DataPilotFieldOrientation_HIDDEN; + sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN; long nField = pDPObj->GetHeaderDim( rPos, nOrient ); if ( nField >= 0 ) { @@ -1502,7 +1502,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) ScDPSaveDimension* pSaveDim = aData.GetDimensionByName( aOldText ); pSaveDim->SetName( aNewName ); - bChange = TRUE; + bChange = sal_True; } else nErrorId = STR_INVALIDNAME; @@ -1510,7 +1510,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) } else if (nOrient == DataPilotFieldOrientation_COLUMN || nOrient == DataPilotFieldOrientation_ROW) { - BOOL bDataLayout = false; + sal_Bool bDataLayout = false; String aDimName = pDPObj->GetDimName(nField, bDataLayout); ScDPSaveDimension* pDim = bDataLayout ? aData.GetDataLayoutDimension() : aData.GetDimensionByName(aDimName); if (pDim) @@ -1570,7 +1570,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) { if ( aData.GetExistingDimensionData() && !(aPosData.Flags & MemberResultFlags::SUBTOTAL)) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( aPosData.Dimension, bIsDataLayout ); ScDPDimensionSaveData* pDimData = aData.GetDimensionData(); @@ -1598,7 +1598,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) if ( pSaveMember ) pSaveMember->SetName( aNewName ); - bChange = TRUE; + bChange = sal_True; } else nErrorId = STR_INVALIDNAME; @@ -1611,7 +1611,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) } else if (aPosData.Dimension >= 0 && aPosData.MemberName.getLength() > 0) { - BOOL bDataLayout = false; + sal_Bool bDataLayout = false; String aDimName = pDPObj->GetDimName(static_cast<long>(aPosData.Dimension), bDataLayout); if (bDataLayout) { @@ -1718,7 +1718,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const String& rString ) ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); delete pNewObj; } else @@ -1765,13 +1765,13 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16 if ( pUserListId ) pDPObj->BuildAllDimensionMembers(); - USHORT nOrientation; + sal_uInt16 nOrientation; long nDimIndex = pDPObj->GetHeaderDim(rPos, nOrientation); if (nDimIndex < 0) // Invalid dimension index. Bail out. return false; - BOOL bDataLayout; + sal_Bool bDataLayout; ScDPSaveData* pSaveData = pDPObj->GetSaveData(); if (!pSaveData) return false; @@ -1897,9 +1897,9 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16 return aFunc.DataPilotUpdate(pDPObj, pNewObj.get(), true, false); } -BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) +sal_Bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ScDocument* pDoc = GetViewData()->GetDocument(); ScDPObject* pDPObj = pDoc->GetDPAtCursor( rSource.aStart.Col(), rSource.aStart.Row(), rSource.aStart.Tab() ); if ( pDPObj && pDPObj == pDoc->GetDPAtCursor( rDest.Col(), rDest.Row(), rDest.Tab() ) ) @@ -1933,7 +1933,7 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) if ( bValid ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout ); if ( !bIsDataLayout ) { @@ -1980,12 +1980,12 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); //! bApi for drag&drop? + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); //! bApi for drag&drop? delete pNewObj; Unmark(); // entry was moved - no use in leaving the old cell selected - bRet = TRUE; + bRet = sal_True; } } } @@ -1993,9 +1993,9 @@ BOOL ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) return bRet; } -BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation ) +sal_Bool ScDBFunc::HasSelectionForDrillDown( sal_uInt16& rOrientation ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ); @@ -2007,7 +2007,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation ) if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); if ( !bIsDataLayout ) { @@ -2015,12 +2015,12 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation ) ScDPSaveDimension* pDim = pSaveData->GetExistingDimensionByName( aDimName ); if ( pDim ) { - USHORT nDimOrient = pDim->GetOrientation(); + sal_uInt16 nDimOrient = pDim->GetOrientation(); ScDPSaveDimension* pInner = pSaveData->GetInnermostDimension( nDimOrient ); if ( pDim == pInner ) { rOrientation = nDimOrient; - bRet = TRUE; + bRet = sal_True; } } } @@ -2030,7 +2030,7 @@ BOOL ScDBFunc::HasSelectionForDrillDown( USHORT& rOrientation ) return bRet; } -void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName ) +void ScDBFunc::SetDataPilotDetails( sal_Bool bShow, const String* pNewDimensionName ) { ScDPObject* pDPObj = GetViewData()->GetDocument()->GetDPAtCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ); @@ -2042,7 +2042,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName if ( aEntries.GetCount() > 0 ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nSelectDimension, bIsDataLayout ); if ( !bIsDataLayout ) { @@ -2062,7 +2062,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName pDuplicated = aData.DuplicateDimension( *pNewDimensionName ); } - USHORT nOrientation = pDim->GetOrientation(); + sal_uInt16 nOrientation = pDim->GetOrientation(); pNewDim->SetOrientation( nOrientation ); long nPosition = LONG_MAX; @@ -2089,17 +2089,17 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName ScStrCollection aVisibleEntries; pDPObj->GetMemberResultNames( aVisibleEntries, nSelectDimension ); - USHORT nVisCount = aVisibleEntries.GetCount(); - for (USHORT nVisPos=0; nVisPos<nVisCount; nVisPos++) + sal_uInt16 nVisCount = aVisibleEntries.GetCount(); + for (sal_uInt16 nVisPos=0; nVisPos<nVisCount; nVisPos++) { String aVisName = aVisibleEntries[nVisPos]->GetString(); ScDPSaveMember* pMember = pDim->GetMemberByName( aVisName ); - pMember->SetShowDetails( FALSE ); + pMember->SetShowDetails( sal_False ); } } - USHORT nEntryCount = aEntries.GetCount(); - for (USHORT nEntry=0; nEntry<nEntryCount; nEntry++) + sal_uInt16 nEntryCount = aEntries.GetCount(); + for (sal_uInt16 nEntry=0; nEntry<nEntryCount; nEntry++) { String aEntryName = aEntries[nEntry]->GetString(); ScDPSaveMember* pMember = pDim->GetMemberByName( aEntryName ); @@ -2110,7 +2110,7 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName ScDBDocFunc aFunc( *GetViewData()->GetDocShell() ); ScDPObject* pNewObj = new ScDPObject( *pDPObj ); pNewObj->SetSaveData( aData ); - aFunc.DataPilotUpdate( pDPObj, pNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, pNewObj, sal_True, sal_False ); delete pNewObj; // unmark cell selection @@ -2178,7 +2178,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet continue; ScPatternAttr aPattern( pInsDoc->GetPool() ); - aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<UINT32>(nNumFmt)) ); + aPattern.GetItemSet().Put( SfxUInt32Item(ATTR_VALUE_FORMAT, static_cast<sal_uInt32>(nNumFmt)) ); pInsDoc->ApplyPatternAreaTab(nCol, 1, nCol, nRowSize-1, nNewTab, aPattern); } @@ -2203,7 +2203,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet // DB-Operationen (Sortieren, Filtern, Teilergebnisse) wiederholen // -void ScDBFunc::RepeatDB( BOOL bRecord ) +void ScDBFunc::RepeatDB( sal_Bool bRecord ) { SCCOL nCurX = GetViewData()->GetCurX(); SCROW nCurY = GetViewData()->GetCurY(); @@ -2211,33 +2211,33 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) ScDocument* pDoc = GetViewData()->GetDocument(); ScDBData* pDBData = GetDBData(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; 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; } } @@ -2271,18 +2271,18 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) pTable->GetColArray()->GetRange( nOutStartCol, nOutEndCol ); pTable->GetRowArray()->GetRange( nOutStartRow, nOutEndRow ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( static_cast<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(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<SCCOL>(nOutStartCol), 0, nTab, static_cast<SCCOL>(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, 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(); @@ -2297,14 +2297,14 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) { // Sortieren ohne SubTotals - aSubTotalParam.bRemoveOnly = TRUE; // wird unten wieder zurueckgesetzt - DoSubTotals( aSubTotalParam, FALSE ); + aSubTotalParam.bRemoveOnly = sal_True; // wird unten wieder zurueckgesetzt + DoSubTotals( aSubTotalParam, sal_False ); } if (bSort) { pDBData->GetSortParam( aSortParam ); // Bereich kann sich geaendert haben - Sort( aSortParam, FALSE, FALSE); + Sort( aSortParam, sal_False, sal_False); } if (bQuery) { @@ -2316,10 +2316,10 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) aAdvSource.aStart.Col(), aAdvSource.aStart.Row(), aAdvSource.aEnd.Col(), aAdvSource.aEnd.Row(), aAdvSource.aStart.Tab(), aQueryParam ); - Query( aQueryParam, &aAdvSource, FALSE ); + Query( aQueryParam, &aAdvSource, sal_False ); } else - Query( aQueryParam, NULL, FALSE ); + Query( aQueryParam, NULL, sal_False ); // bei nicht-inplace kann die Tabelle umgestellt worden sein if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab ) @@ -2328,8 +2328,8 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) if (bSubTotal) { pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben - aSubTotalParam.bRemoveOnly = FALSE; - DoSubTotals( aSubTotalParam, FALSE ); + aSubTotalParam.bRemoveOnly = sal_False; + DoSubTotals( aSubTotalParam, sal_False ); } if (bRecord) @@ -2344,7 +2344,7 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) if (bQuerySize) { ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow, - aQueryParam.nDestTab, TRUE ); + aQueryParam.nDestTab, sal_True ); if (pDest) { pDest->GetArea( aNewQuery ); diff --git a/sc/source/ui/view/dbfunc4.cxx b/sc/source/ui/view/dbfunc4.cxx index 2bd6db27a..d6f8704d1 100644 --- a/sc/source/ui/view/dbfunc4.cxx +++ b/sc/source/ui/view/dbfunc4.cxx @@ -53,16 +53,16 @@ using namespace com::sun::star; //================================================================== // static -USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts ) +sal_uInt16 ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, sal_Bool bAllCharts ) { ScDrawLayer* pModel = pDoc->GetDrawLayer(); if (!pModel) return 0; - USHORT nFound = 0; + sal_uInt16 nFound = 0; - USHORT nPageCount = pModel->GetPageCount(); - for (USHORT nPageNo=0; nPageNo<nPageCount; nPageNo++) + sal_uInt16 nPageCount = pModel->GetPageCount(); + for (sal_uInt16 nPageNo=0; nPageNo<nPageCount; nPageNo++) { SdrPage* pPage = pModel->GetPage(nPageNo); DBG_ASSERT(pPage,"Page ?"); @@ -74,12 +74,12 @@ USHORT ScDBFunc::DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL b if ( pObject->GetObjIdentifier() == OBJ_OLE2 && pDoc->IsChart( pObject ) ) { String aName = ((SdrOle2Obj*)pObject)->GetPersistName(); - BOOL bHit = TRUE; + sal_Bool bHit = sal_True; if ( !bAllCharts ) { ScRangeList aRanges; - BOOL bColHeaders = FALSE; - BOOL bRowHeaders = FALSE; + sal_Bool bColHeaders = sal_False; + sal_Bool bRowHeaders = sal_False; pDoc->GetOldChartParameters( aName, aRanges, bColHeaders, bRowHeaders ); bHit = aRanges.In( rPos ); } diff --git a/sc/source/ui/view/drawattr.cxx b/sc/source/ui/view/drawattr.cxx index bc64e241f..fdefb9486 100644 --- a/sc/source/ui/view/drawattr.cxx +++ b/sc/source/ui/view/drawattr.cxx @@ -41,7 +41,7 @@ String __EXPORT SvxDrawToolItem::GetValueText() const //------------------------------------------------------------------------ -String __EXPORT SvxDrawToolItem::GetValueText( USHORT nVal ) const +String __EXPORT SvxDrawToolItem::GetValueText( sal_uInt16 nVal ) const { const sal_Char* p; @@ -71,9 +71,9 @@ SfxPoolItem* __EXPORT SvxDrawToolItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -SfxPoolItem* __EXPORT SvxDrawToolItem::Create( SvStream& rStream, USHORT nVer ) const +SfxPoolItem* __EXPORT SvxDrawToolItem::Create( SvStream& rStream, sal_uInt16 nVer ) const { - USHORT nVal; + sal_uInt16 nVal; rStream >> nVal; return new SvxDrawToolItem(nVal); } diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx index e599e4e70..f340861fb 100644 --- a/sc/source/ui/view/drawutil.cxx +++ b/sc/source/ui/view/drawutil.cxx @@ -62,7 +62,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, long nTwipsY = 0; for (SCCOL i=nStartCol; i<nEndCol; i++) { - USHORT nWidth = pDoc->GetColWidth(i,nTab); + sal_uInt16 nWidth = pDoc->GetColWidth(i,nTab); nTwipsX += (long) nWidth; nPixelX += ScViewData::ToPixel( nWidth, nPPTX ); } @@ -76,7 +76,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, continue; } - USHORT nHeight = pDoc->GetRowHeight(nRow, nTab); + sal_uInt16 nHeight = pDoc->GetRowHeight(nRow, nTab); nTwipsY += static_cast<long>(nHeight); nPixelY += ScViewData::ToPixel(nHeight, nPPTY); } diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx index cacfd77ad..0cf2a53a6 100644 --- a/sc/source/ui/view/drawvie3.cxx +++ b/sc/source/ui/view/drawvie3.cxx @@ -48,7 +48,7 @@ void ScIMapDlgSet( const Graphic& rGraphic, const ImageMap* pImageMap, const TargetList* pTargetList, void* pEditingObj ); // imapwrap -USHORT ScIMapChildWindowId(); +sal_uInt16 ScIMapChildWindowId(); // STATIC DATA ----------------------------------------------------------- @@ -60,8 +60,8 @@ ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData ) : nTab( pData->GetTabNo() ), pDropMarker( NULL ), pDropMarkObj( NULL ), - bInConstruct( TRUE ) - //HMHbDisableHdl( FALSE ) + bInConstruct( sal_True ) + //HMHbDisableHdl( sal_False ) { // #i73602# Use default from the configuration SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_Calc()); @@ -80,8 +80,8 @@ void ScDrawView::SetAnchor( ScAnchorType eType ) if( AreObjectsMarked() ) { const SdrMarkList* pMark = &GetMarkedObjectList(); - ULONG nCount = pMark->GetMarkCount(); - for( ULONG i=0; i<nCount; i++ ) + sal_uLong nCount = pMark->GetMarkCount(); + for( sal_uLong i=0; i<nCount; i++ ) { pObj = pMark->GetMark(i)->GetMarkedSdrObj(); ScDrawLayer::SetAnchor( pObj, eType ); @@ -94,21 +94,21 @@ void ScDrawView::SetAnchor( ScAnchorType eType ) ScAnchorType ScDrawView::GetAnchor() const { - BOOL bPage = FALSE; - BOOL bCell = FALSE; + sal_Bool bPage = sal_False; + sal_Bool bCell = sal_False; const SdrObject* pObj = NULL; if( AreObjectsMarked() ) { const SdrMarkList* pMark = &GetMarkedObjectList(); - ULONG nCount = pMark->GetMarkCount(); + sal_uLong nCount = pMark->GetMarkCount(); Point p0; - for( ULONG i=0; i<nCount; i++ ) + for( sal_uLong i=0; i<nCount; i++ ) { pObj = pMark->GetMark(i)->GetMarkedSdrObj(); if( ScDrawLayer::GetAnchor( pObj ) == SCA_CELL ) - bCell =TRUE; + bCell =sal_True; else - bPage = TRUE; + bPage = sal_True; } } if( bPage && !bCell ) diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 3d47dcae7..c682823b8 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -71,18 +71,18 @@ Point aDragStartDiff; // ----------------------------------------------------------------------- -void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle ) +void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle ) { - rAnyOle = rOneOle = FALSE; - ULONG nCount = rMarkList.GetMarkCount(); - for (ULONG i=0; i<nCount; i++) + rAnyOle = rOneOle = sal_False; + sal_uLong nCount = rMarkList.GetMarkCount(); + for (sal_uLong i=0; i<nCount; i++) { SdrMark* pMark = rMarkList.GetMark(i); SdrObject* pObj = pMark->GetMarkedSdrObj(); - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); if (nSdrObjKind == OBJ_OLE2) { - rAnyOle = TRUE; + rAnyOle = sal_True; rOneOle = (nCount == 1); break; } @@ -94,8 +94,8 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle ) { if ( pSubObj->GetObjIdentifier() == OBJ_OLE2 ) { - rAnyOle = TRUE; - // rOneOle remains FALSE - a group isn't treated like a single OLE object + rAnyOle = sal_True; + // rOneOle remains sal_False - a group isn't treated like a single OLE object return; } pSubObj = aIter.Next(); @@ -107,7 +107,7 @@ void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle ) #if 0 void lcl_RefreshChartData( SdrModel* pModel, ScDocument* pSourceDoc ) { - USHORT nPages = pModel->GetPageCount(); + sal_uInt16 nPages = pModel->GetPageCount(); for (SCTAB nTab=0; nTab<nPages; nTab++) { SdrPage* pPage = pModel->GetPage(nTab); @@ -142,9 +142,9 @@ void lcl_RefreshChartData( SdrModel* pModel, ScDocument* pSourceDoc ) #endif -BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos ) +sal_Bool ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; if ( AreObjectsMarked() ) { @@ -155,7 +155,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos ) aDragStartDiff = rStartPos - aMarkedRect.TopLeft(); - BOOL bAnyOle, bOneOle; + sal_Bool bAnyOle, bOneOle; const SdrMarkList& rMarkList = GetMarkedObjectList(); lcl_CheckOle( rMarkList, bAnyOle, bOneOle ); @@ -197,7 +197,7 @@ BOOL ScDrawView::BeginDrag( Window* pWindow, const Point& rStartPos ) void ScDrawView::DoCopy() { - BOOL bAnyOle, bOneOle; + sal_Bool bAnyOle, bOneOle; const SdrMarkList& rMarkList = GetMarkedObjectList(); lcl_CheckOle( rMarkList, bAnyOle, bOneOle ); @@ -233,7 +233,7 @@ void ScDrawView::DoCopy() uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable() { - BOOL bAnyOle, bOneOle; + sal_Bool bAnyOle, bOneOle; const SdrMarkList& rMarkList = GetMarkedObjectList(); lcl_CheckOle( rMarkList, bAnyOle, bOneOle ); @@ -296,12 +296,12 @@ void ScDrawView::SetMarkedOriginalSize() const SdrMarkList& rMarkList = GetMarkedObjectList(); long nDone = 0; - ULONG nCount = rMarkList.GetMarkCount(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rMarkList.GetMarkCount(); + for (sal_uLong i=0; i<nCount; i++) { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); - USHORT nIdent = pObj->GetObjIdentifier(); - BOOL bDo = FALSE; + sal_uInt16 nIdent = pObj->GetObjIdentifier(); + sal_Bool bDo = sal_False; Size aOriginalSize; if (nIdent == OBJ_OLE2) { @@ -315,7 +315,7 @@ void ScDrawView::SetMarkedOriginalSize() { MapMode aMapMode( MAP_100TH_MM ); aOriginalSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize( &aMapMode ); - bDo = TRUE; + bDo = sal_True; } else { @@ -327,7 +327,7 @@ void ScDrawView::SetMarkedOriginalSize() aOriginalSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MAP_100TH_MM ); - bDo = TRUE; + bDo = sal_True; } catch( embed::NoVisualAreaSizeException& ) { OSL_ENSURE( sal_False, "Can't get the original size of the object!" ); @@ -357,7 +357,7 @@ void ScDrawView::SetMarkedOriginalSize() { aOriginalSize = pActWin->LogicToLogic( rGraphic.GetPrefSize(), &aSourceMap, &aDestMap ); - bDo = TRUE; + bDo = sal_True; } } } diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 25643609c..2296042f9 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -82,12 +82,12 @@ using namespace com::sun::star; void ScDrawView::Construct() { - EnableExtendedKeyInputDispatcher(FALSE); - EnableExtendedMouseEventDispatcher(FALSE); - EnableExtendedCommandEventDispatcher(FALSE); + EnableExtendedKeyInputDispatcher(sal_False); + EnableExtendedMouseEventDispatcher(sal_False); + EnableExtendedCommandEventDispatcher(sal_False); - SetFrameDragSingles(TRUE); -// SetSolidMarkHdl(TRUE); // einstellbar -> UpdateUserViewOptions + SetFrameDragSingles(sal_True); +// SetSolidMarkHdl(sal_True); // einstellbar -> UpdateUserViewOptions SetMinMoveDistancePixel( 2 ); SetHitTolerancePixel( 2 ); @@ -97,8 +97,8 @@ void ScDrawView::Construct() SCTAB nViewTab = pViewData->GetTabNo(); ShowSdrPage(GetModel()->GetPage(nViewTab)); - BOOL bEx = pViewData->GetViewShell()->IsDrawSelMode(); - BOOL bProt = pDoc->IsTabProtected( nViewTab ) || + sal_Bool bEx = pViewData->GetViewShell()->IsDrawSelMode(); + sal_Bool bProt = pDoc->IsTabProtected( nViewTab ) || pViewData->GetSfxDocShell()->IsReadOnly(); SdrLayer* pLayer; @@ -108,7 +108,7 @@ void ScDrawView::Construct() SetLayerLocked( pLayer->GetName(), bProt || !bEx ); pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN); if (pLayer) - SetLayerLocked( pLayer->GetName(), TRUE ); + SetLayerLocked( pLayer->GetName(), sal_True ); pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT); if (pLayer) { @@ -125,7 +125,7 @@ void ScDrawView::Construct() SetLayerVisible( pLayer->GetName(), sal_False); } - SetSwapAsynchron(TRUE); + SetSwapAsynchron(sal_True); } else { @@ -136,7 +136,7 @@ void ScDrawView::Construct() RecalcScale(); UpdateWorkArea(); - bInConstruct = FALSE; + bInConstruct = sal_False; } void ScDrawView::ImplClearCalcDropMarker() @@ -155,16 +155,16 @@ __EXPORT ScDrawView::~ScDrawView() void ScDrawView::AddCustomHdl() { - BOOL bNegativePage = pDoc->IsNegativePage( nTab ); + sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); const SdrMarkList &rMrkList = GetMarkedObjectList(); - UINT32 nCount = rMrkList.GetMarkCount(); - for(UINT32 nPos=0; nPos<nCount; nPos++ ) + sal_uInt32 nCount = rMrkList.GetMarkCount(); + for(sal_uInt32 nPos=0; nPos<nCount; nPos++ ) { const SdrObject* pObj = rMrkList.GetMark(nPos)->GetMarkedSdrObj(); if(ScDrawLayer::GetAnchor(pObj) == SCA_CELL) { - const INT32 nDelta = 1; + const sal_Int32 nDelta = 1; Rectangle aBoundRect = pObj->GetCurrentBoundRect(); Point aPos; @@ -179,7 +179,7 @@ void ScDrawView::AddCustomHdl() long nPosY = (long) (aPos.Y() / HMM_PER_TWIPS) + nDelta; SCCOL nCol; - INT32 nWidth = 0; + sal_Int32 nWidth = 0; for(nCol=0; nCol<=MAXCOL && nWidth<=nPosX; nCol++) nWidth += pDoc->GetColWidth(nCol,nTab); @@ -188,7 +188,7 @@ void ScDrawView::AddCustomHdl() --nCol; SCROW nRow = nPosY <= 0 ? 0 : pDoc->GetRowForHeight( nTab, - (ULONG) nPosY); + (sal_uLong) nPosY); if(nRow > 0) --nRow; @@ -205,7 +205,7 @@ void ScDrawView::InvalidateAttribs() SfxBindings& rBindings = pViewData->GetBindings(); // echte Statuswerte: - rBindings.InvalidateAll( TRUE ); + rBindings.InvalidateAll( sal_True ); } void ScDrawView::InvalidateDrawTextAttrs() @@ -261,7 +261,7 @@ void ScDrawView::InvalidateDrawTextAttrs() // } //} -void ScDrawView::SetMarkedToLayer( BYTE nLayerNo ) +void ScDrawView::SetMarkedToLayer( sal_uInt8 nLayerNo ) { if (AreObjectsMarked()) { @@ -270,8 +270,8 @@ void ScDrawView::SetMarkedToLayer( BYTE nLayerNo ) BegUndo( ScGlobal::GetRscString( STR_UNDO_SELATTR ) ); const SdrMarkList& rMark = GetMarkedObjectList(); - ULONG nCount = rMark.GetMarkCount(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rMark.GetMarkCount(); + for (sal_uLong i=0; i<nCount; i++) { SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj(); if ( !pObj->ISA(SdrUnoObj) && (pObj->GetLayer() != SC_LAYER_INTERN) ) @@ -415,9 +415,9 @@ void ScDrawView::MarkListHasChanged() if ( pClient && pClient->IsObjectInPlaceActive() && !bUnoRefDialog ) { // #41730# beim ViewShell::Activate aus dem Reset2Open nicht die Handles anzeigen - //HMHbDisableHdl = TRUE; + //HMHbDisableHdl = sal_True; pClient->DeactivateObject(); - //HMHbDisableHdl = FALSE; + //HMHbDisableHdl = sal_False; // Image-Ole wieder durch Grafik ersetzen passiert jetzt in ScClient::UIActivate } @@ -428,7 +428,7 @@ void ScDrawView::MarkListHasChanged() SdrMediaObj* pMediaObj = NULL; const SdrMarkList& rMarkList = GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if ( nMarkCount == 0 && !pViewData->GetViewShell()->IsDrawSelMode() && !bInConstruct ) { @@ -437,7 +437,7 @@ void ScDrawView::MarkListHasChanged() LockInternalLayer(); } - BOOL bSubShellSet = FALSE; + sal_Bool bSubShellSet = sal_False; if (nMarkCount == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); @@ -445,56 +445,56 @@ void ScDrawView::MarkListHasChanged() { pOle2Obj = (SdrOle2Obj*) pObj; if (!pDoc->IsChart(pObj) ) - pViewSh->SetOleObjectShell(TRUE); + pViewSh->SetOleObjectShell(sal_True); else - pViewSh->SetChartShell(TRUE); - bSubShellSet = TRUE; + pViewSh->SetChartShell(sal_True); + bSubShellSet = sal_True; } else if (pObj->GetObjIdentifier() == OBJ_GRAF) { pGrafObj = (SdrGrafObj*) pObj; - pViewSh->SetGraphicShell(TRUE); - bSubShellSet = TRUE; + pViewSh->SetGraphicShell(sal_True); + bSubShellSet = sal_True; } else if (pObj->GetObjIdentifier() == OBJ_MEDIA) { pMediaObj = (SdrMediaObj*) pObj; - pViewSh->SetMediaShell(TRUE); - bSubShellSet = TRUE; + pViewSh->SetMediaShell(sal_True); + bSubShellSet = sal_True; } else if (pObj->GetObjIdentifier() != OBJ_TEXT // Verhindern, das beim Anlegen || !pViewSh->IsDrawTextShell()) // eines TextObjekts auf die { // DrawShell umgeschaltet wird. - pViewSh->SetDrawShell(TRUE); //@#70206# + pViewSh->SetDrawShell(sal_True); //@#70206# } } if ( nMarkCount && !bSubShellSet ) { - BOOL bOnlyControls = TRUE; - BOOL bOnlyGraf = TRUE; - for (ULONG i=0; i<nMarkCount; i++) + sal_Bool bOnlyControls = sal_True; + sal_Bool bOnlyGraf = sal_True; + for (sal_uLong i=0; i<nMarkCount; i++) { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); if ( pObj->ISA( SdrObjGroup ) ) { const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList(); - ULONG nListCount = pLst->GetObjCount(); + sal_uLong nListCount = pLst->GetObjCount(); if ( nListCount == 0 ) { // #104156# An empty group (may occur during Undo) is no control or graphics object. // Creating the form shell during undo would lead to problems with the undo manager. - bOnlyControls = FALSE; - bOnlyGraf = FALSE; + bOnlyControls = sal_False; + bOnlyGraf = sal_False; } - for ( USHORT j = 0; j < nListCount; ++j ) + for ( sal_uInt16 j = 0; j < nListCount; ++j ) { SdrObject *pSubObj = pLst->GetObj( j ); if (!pSubObj->ISA(SdrUnoObj)) - bOnlyControls = FALSE; + bOnlyControls = sal_False; if (pSubObj->GetObjIdentifier() != OBJ_GRAF) - bOnlyGraf = FALSE; + bOnlyGraf = sal_False; if ( !bOnlyControls && !bOnlyGraf ) break; } @@ -502,9 +502,9 @@ void ScDrawView::MarkListHasChanged() else { if (!pObj->ISA(SdrUnoObj)) - bOnlyControls = FALSE; + bOnlyControls = sal_False; if (pObj->GetObjIdentifier() != OBJ_GRAF) - bOnlyGraf = FALSE; + bOnlyGraf = sal_False; } if ( !bOnlyControls && !bOnlyGraf ) break; @@ -512,15 +512,15 @@ void ScDrawView::MarkListHasChanged() if(bOnlyControls) { - pViewSh->SetDrawFormShell(TRUE); // jetzt UNO-Controls + pViewSh->SetDrawFormShell(sal_True); // jetzt UNO-Controls } else if(bOnlyGraf) { - pViewSh->SetGraphicShell(TRUE); + pViewSh->SetGraphicShell(sal_True); } else if(nMarkCount>1) { - pViewSh->SetDrawShell(TRUE); + pViewSh->SetDrawShell(sal_True); } } @@ -529,7 +529,7 @@ void ScDrawView::MarkListHasChanged() // Verben anpassen SfxViewFrame* pViewFrame = pViewSh->GetViewFrame(); - BOOL bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bOle = pViewSh->GetViewFrame()->GetFrame().IsInPlace(); if ( pOle2Obj && !bOle ) { uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef(); @@ -607,7 +607,7 @@ void __EXPORT ScDrawView::UpdateUserViewOptions() const ScViewOptions& rOpt = pViewData->GetOptions(); const ScGridOptions& rGrid = rOpt.GetGridOptions(); - BOOL bBigHdl = rOpt.GetOption( VOPT_BIGHANDLES ); + sal_Bool bBigHdl = rOpt.GetOption( VOPT_BIGHANDLES ); SetDragStripes( rOpt.GetOption( VOPT_HELPLINES ) ); SetSolidMarkHdl( rOpt.GetOption( VOPT_SOLIDHANDLES ) ); @@ -634,7 +634,7 @@ void __EXPORT ScDrawView::UpdateUserViewOptions() #pragma optimize ( "", on ) #endif -BOOL ScDrawView::SelectObject( const String& rName ) +sal_Bool ScDrawView::SelectObject( const String& rName ) { UnmarkAll(); @@ -712,7 +712,7 @@ BOOL ScDrawView::SelectObject( const String& rName ) //UNUSED2008-05 return EMPTY_STRING; // nichts gefunden //UNUSED2008-05 } -FASTBOOL ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions) +FASTBOOL ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, sal_uLong nOptions) { // Markierung nicht aendern, wenn Ole-Objekt aktiv // (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!) @@ -799,7 +799,7 @@ void ScDrawView::DeleteMarked() SdrEndTextEditKind ScDrawView::ScEndTextEdit() { - BOOL bIsTextEdit = IsTextEdit(); + sal_Bool bIsTextEdit = IsTextEdit(); SdrEndTextEditKind eKind = SdrEndTextEdit(); if ( bIsTextEdit && pViewData ) @@ -822,7 +822,7 @@ void ScDrawView::MarkDropObj( SdrObject* pObj ) } } -//UNUSED2009-05 void ScDrawView::CaptionTextDirection( USHORT nSlot ) +//UNUSED2009-05 void ScDrawView::CaptionTextDirection( sal_uInt16 nSlot ) //UNUSED2009-05 { //UNUSED2009-05 if(nSlot != SID_TEXTDIRECTION_LEFT_TO_RIGHT && nSlot != SID_TEXTDIRECTION_TOP_TO_BOTTOM) //UNUSED2009-05 return; @@ -842,7 +842,7 @@ void ScDrawView::MarkDropObj( SdrObject* pObj ) //UNUSED2009-05 if ( pPoor ) //UNUSED2009-05 { //UNUSED2009-05 FuText* pText = static_cast<FuText*>(pPoor); -//UNUSED2009-05 pText->StopEditMode(TRUE); +//UNUSED2009-05 pText->StopEditMode(sal_True); //UNUSED2009-05 } //UNUSED2009-05 } //UNUSED2009-05 } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 3ca671d93..372ced4fa 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -111,8 +111,8 @@ ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) : pEditView (pView), pViewData (pData), pClipEvtLstnr (NULL), - bPastePossible (FALSE), - bIsInsertMode (TRUE) + bPastePossible (sal_False), + bIsInsertMode (sal_True) { SetPool( pEditView->GetEditEngine()->GetEmptyItemSet().GetPool() ); SetUndoManager( &pEditView->GetEditEngine()->GetUndoManager() ); @@ -123,7 +123,7 @@ ScEditShell::~ScEditShell() { 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. @@ -150,13 +150,13 @@ void lcl_RemoveAttribs( EditView& rEditView ) { ScEditEngineDefaulter* pEngine = static_cast<ScEditEngineDefaulter*>(rEditView.GetEditEngine()); - BOOL bOld = pEngine->GetUpdateMode(); - pEngine->SetUpdateMode(FALSE); + sal_Bool bOld = pEngine->GetUpdateMode(); + pEngine->SetUpdateMode(sal_False); String aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); pEngine->GetUndoManager().EnterListAction( aName, aName ); - rEditView.RemoveAttribs(TRUE); + rEditView.RemoveAttribs(sal_True); pEngine->RepeatDefaults(); // #97226# paragraph attributes from cell formats must be preserved pEngine->GetUndoManager().LeaveListAction(); @@ -176,7 +176,7 @@ void lclInsertCharacter( EditView* pTableView, EditView* pTopView, sal_Unicode c void ScEditShell::Execute( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SfxBindings& rBindings = pViewData->GetBindings(); ScInputHandler* pHdl = GetMyInputHdl(); @@ -198,7 +198,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) EditEngine* pEngine = pTableView->GetEditEngine(); pHdl->DataChanging(); - BOOL bSetSelIsRef = FALSE; + sal_Bool bSetSelIsRef = sal_False; switch ( nSlot ) { @@ -262,10 +262,10 @@ void ScEditShell::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(); @@ -288,7 +288,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( pViewData->GetDialogParent() ); - ULONG nFormat = 0; + sal_uLong nFormat = 0; if ( pDlg ) { pDlg->Insert( SOT_FORMAT_STRING, EMPTY_STRING ); @@ -326,7 +326,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_SELECTALL: { - USHORT nPar = pEngine->GetParagraphCount(); + sal_uInt16 nPar = pEngine->GetParagraphCount(); if (nPar) { xub_StrLen nLen = pEngine->GetTextLen(nPar-1); @@ -339,8 +339,8 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_CHARMAP: { - USHORT nScript = pTableView->GetSelectedScriptType(); - USHORT nFontWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_FONTINFO_CJK : + sal_uInt16 nScript = pTableView->GetSelectedScriptType(); + sal_uInt16 nFontWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? EE_CHAR_FONTINFO_CJK : ( ( nScript == SCRIPTTYPE_COMPLEX ) ? EE_CHAR_FONTINFO_CTL : EE_CHAR_FONTINFO ); const SvxFontItem& rItem = (const SvxFontItem&) @@ -352,13 +352,13 @@ void ScEditShell::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 ) { @@ -386,7 +386,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) if ( aString.Len() ) { // if string contains WEAK characters, set all fonts - BYTE nSetScript; + sal_uInt8 nSetScript; ScDocument* pDoc = pViewData->GetDocument(); if ( pDoc->HasStringWeakCharacters( aString ) ) nSetScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; @@ -396,7 +396,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) SfxItemSet aSet( pTableView->GetEmptyItemSet() ); SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, GetPool() ); aSetItem.PutItemForScriptType( nSetScript, aNewItem ); - aSet.Put( aSetItem.GetItemSet(), FALSE ); + aSet.Put( aSetItem.GetItemSet(), sal_False ); // SetAttribs an der View selektiert ein Wort, wenn nichts selektiert ist pTableView->GetEditEngine()->QuickSetAttribs( aSet, pTableView->GetSelection() ); @@ -422,12 +422,12 @@ void ScEditShell::Execute( SfxRequest& rReq ) { ScDocument* pDoc = pViewData->GetDocument(); //CHINA001 ScNamePasteDlg* pDlg = new ScNamePasteDlg( pViewData->GetDialogParent(), - //CHINA001 pDoc->GetRangeName(), FALSE ); + //CHINA001 pDoc->GetRangeName(), sal_False ); // "Liste" disablen ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, FALSE ); + AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, sal_False ); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 short nRet = pDlg->Execute(); // pDlg is needed below @@ -489,7 +489,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_TOGGLE_REL: { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; if (pEngine->GetParagraphCount() == 1) { String aText = pEngine->GetText(); @@ -508,10 +508,10 @@ void ScEditShell::Execute( SfxRequest& rReq ) pTopView->GetEditEngine()->SetText( aNew ); pTopView->SetSelection( aNewSel ); } - bOk = TRUE; + bOk = sal_True; // Referenz wird selektiert -> beim Tippen nicht ueberschreiben - bSetSelIsRef = TRUE; + bSetSelIsRef = sal_True; } } if (!bOk) @@ -523,7 +523,7 @@ void ScEditShell::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(); @@ -531,7 +531,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) const String& rTarget = pHyper->GetTargetFrame(); SvxLinkInsertMode eMode = pHyper->GetInsertMode(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( eMode == HLINK_DEFAULT || eMode == HLINK_FIELD ) { const SvxURLField* pURLField = GetURLField(); @@ -565,14 +565,14 @@ void ScEditShell::Execute( SfxRequest& rReq ) pTopView->SetSelection( aSel ); // select inserted field } - bDone = TRUE; + bDone = sal_True; } } if (!bDone) { pViewData->GetViewShell()-> - InsertURL( rName, rURL, rTarget, (USHORT) eMode ); + InsertURL( rName, rURL, rTarget, (sal_uInt16) eMode ); // InsertURL an der ViewShell schaltet bei "Button" // die EditShell ab, darum sofort return @@ -617,13 +617,13 @@ void ScEditShell::Execute( SfxRequest& rReq ) pHdl->DataChanged(); if (bSetSelIsRef) - pHdl->SetSelIsRef(TRUE); + pHdl->SetSelIsRef(sal_True); } void lcl_DisableAll( SfxItemSet& rSet ) // disable all slots { SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { rSet.DisableItem( nWhich ); @@ -646,7 +646,7 @@ void __EXPORT ScEditShell::GetState( SfxItemSet& rSet ) EditView* pActiveView = pHdl ? pHdl->GetActiveView() : pEditView; SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) @@ -708,7 +708,7 @@ void __EXPORT ScEditShell::GetState( SfxItemSet& rSet ) rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); // disable thesaurus 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 ); } @@ -760,7 +760,7 @@ void __EXPORT ScEditShell::GetClipState( SfxItemSet& rSet ) pClipEvtLstnr = new TransferableClipboardListener( LINK( this, ScEditShell, 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() ) ); @@ -768,7 +768,7 @@ void __EXPORT ScEditShell::GetClipState( SfxItemSet& rSet ) } SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) @@ -814,7 +814,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) SfxItemSet aSet( pEditView->GetEmptyItemSet() ); SfxBindings& rBindings = pViewData->GetBindings(); const SfxItemSet* pArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -824,7 +824,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) if (pArgs) { // #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 = pEditView->GetSelectedScriptType(); @@ -833,10 +833,10 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - USHORT nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhich( nSlot ); aSetItem.PutItemForScriptType( nScript, pArgs->Get( nWhich ) ); - aSet.Put( aSetItem.GetItemSet(), FALSE ); + aSet.Put( aSetItem.GetItemSet(), sal_False ); } } break; @@ -856,21 +856,21 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_WEIGHT: { // #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; SfxItemPool& rPool = GetPool(); - BOOL bOld = FALSE; + sal_Bool bOld = sal_False; SvxScriptSetItem aOldSetItem( nSlot, rPool ); - aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), FALSE ); + aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), sal_False ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() > WEIGHT_NORMAL ) - bOld = TRUE; + bOld = sal_True; SvxScriptSetItem aSetItem( nSlot, rPool ); aSetItem.PutItemForScriptType( nScript, SvxWeightItem( bOld ? WEIGHT_NORMAL : WEIGHT_BOLD, EE_CHAR_WEIGHT ) ); - aSet.Put( aSetItem.GetItemSet(), FALSE ); + aSet.Put( aSetItem.GetItemSet(), sal_False ); rBindings.Invalidate( nSlot ); } @@ -879,21 +879,21 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_POSTURE: { // #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; SfxItemPool& rPool = GetPool(); - BOOL bOld = FALSE; + sal_Bool bOld = sal_False; SvxScriptSetItem aOldSetItem( nSlot, rPool ); - aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), FALSE ); + aOldSetItem.GetItemSet().Put( pEditView->GetAttribs(), sal_False ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxPostureItem*)pCore)->GetValue() != ITALIC_NONE ) - bOld = TRUE; + bOld = sal_True; SvxScriptSetItem aSetItem( nSlot, rPool ); aSetItem.PutItemForScriptType( nScript, SvxPostureItem( bOld ? ITALIC_NONE : ITALIC_NORMAL, EE_CHAR_ITALIC ) ); - aSet.Put( aSetItem.GetItemSet(), FALSE ); + aSet.Put( aSetItem.GetItemSet(), sal_False ); rBindings.Invalidate( nSlot ); } @@ -944,7 +944,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_STRIKEOUT: { - BOOL bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs(). + sal_Bool bOld = ((const SvxCrossedOutItem&)pEditView->GetAttribs(). Get(EE_CHAR_STRIKEOUT)).GetValue() != STRIKEOUT_NONE; aSet.Put( SvxCrossedOutItem( bOld ? STRIKEOUT_NONE : STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT ) ); rBindings.Invalidate( nSlot ); @@ -953,7 +953,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_SHADOWED: { - BOOL bOld = ((const SvxShadowedItem&)pEditView->GetAttribs(). + sal_Bool bOld = ((const SvxShadowedItem&)pEditView->GetAttribs(). Get(EE_CHAR_SHADOW)).GetValue(); aSet.Put( SvxShadowedItem( !bOld, EE_CHAR_SHADOW ) ); rBindings.Invalidate( nSlot ); @@ -962,7 +962,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) case SID_ATTR_CHAR_CONTOUR: { - BOOL bOld = ((const SvxContourItem&)pEditView->GetAttribs(). + sal_Bool bOld = ((const SvxContourItem&)pEditView->GetAttribs(). Get(EE_CHAR_OUTLINE)).GetValue(); aSet.Put( SvxContourItem( !bOld, EE_CHAR_OUTLINE ) ); rBindings.Invalidate( nSlot ); @@ -996,8 +996,8 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) // EditEngine* pEngine = pEditView->GetEditEngine(); - BOOL bOld = pEngine->GetUpdateMode(); - pEngine->SetUpdateMode(FALSE); + sal_Bool bOld = pEngine->GetUpdateMode(); + pEngine->SetUpdateMode(sal_False); pEditView->SetAttribs( aSet ); @@ -1023,11 +1023,11 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) // choose font info according to selection script type - USHORT nScript = pEditView->GetSelectedScriptType(); + sal_uInt16 nScript = pEditView->GetSelectedScriptType(); if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType(); // #i55929# input-language-dependent script type (depends on input language if nothing selected) - USHORT nInputScript = nScript; + sal_uInt16 nInputScript = nScript; if ( !pEditView->GetSelection().HasRange() ) { LanguageType nInputLang = pViewData->GetActiveWin()->GetInputLanguage(); @@ -1047,7 +1047,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) // Unterstreichung - SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, TRUE ); + SfxItemState eState = aAttribs.GetItemState( EE_CHAR_UNDERLINE, sal_True ); if ( eState == SFX_ITEM_DONTCARE ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); @@ -1059,7 +1059,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) { FontUnderline eUnderline = ((const SvxUnderlineItem&) aAttribs.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; @@ -1068,7 +1068,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) default: break; } - rSet.Put( SfxBoolItem( nId, TRUE ) ); + rSet.Put( SfxBoolItem( nId, sal_True ) ); } //! Testen, ob Klammer-Hervorhebung aktiv ist !!!! @@ -1077,7 +1077,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) rSet.ClearItem( EE_CHAR_WEIGHT ); // hervorgehobene Klammern hier nicht } -String ScEditShell::GetSelectionText( BOOL bWholeWord ) +String ScEditShell::GetSelectionText( sal_Bool bWholeWord ) { String aStrSelection; @@ -1115,20 +1115,20 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq) pHdl->DataChanging(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_UNDO: case SID_REDO: { - BOOL bIsUndo = ( nSlot == SID_UNDO ); + sal_Bool bIsUndo = ( nSlot == SID_UNDO ); - USHORT nCount = 1; + sal_uInt16 nCount = 1; const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) nCount = ((const SfxUInt16Item*)pItem)->GetValue(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { if ( bIsUndo ) { @@ -1146,7 +1146,7 @@ void ScEditShell::ExecuteUndo(SfxRequest& rReq) } break; } - pViewData->GetBindings().InvalidateAll(FALSE); + pViewData->GetBindings().InvalidateAll(sal_False); pHdl->DataChanged(); } @@ -1159,7 +1159,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet) if ( pViewFrm && GetUndoManager() ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { pViewFrm->GetSlotState( nWhich, NULL, &rSet ); diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index ccf501a36..d07b676ce 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -112,7 +112,7 @@ namespace { -SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot ) +SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot ) { SvxCellHorJustify eHJustify = SVX_HOR_JUSTIFY_STANDARD; switch( nSlot ) @@ -127,7 +127,7 @@ SvxCellHorJustify lclConvertSlotToHAlign( USHORT nSlot ) return eHJustify; } -SvxCellVerJustify lclConvertSlotToVAlign( USHORT nSlot ) +SvxCellVerJustify lclConvertSlotToVAlign( sal_uInt16 nSlot ) { SvxCellVerJustify eVJustify = SVX_VER_JUSTIFY_STANDARD; switch( nSlot ) @@ -183,15 +183,15 @@ void __EXPORT ScFormatShell::GetStyleState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool(); - BOOL bProtected = FALSE; + sal_Bool bProtected = sal_False; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nTabCount; i++) if (pDoc->IsTabProtected(i)) // ueberhaupt eine Tabelle geschuetzt? - bProtected = TRUE; + bProtected = sal_True; SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); - USHORT nSlotId = 0; + sal_uInt16 nWhich = aIter.FirstWhich(); + sal_uInt16 nSlotId = 0; while ( nWhich ) { @@ -242,7 +242,7 @@ void __EXPORT ScFormatShell::GetStyleState( SfxItemSet& rSet ) { ISfxTemplateCommon* pDesigner = SFX_APP()-> GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings()); - BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); + sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); if ( bProtected || bPage ) rSet.DisableItem( nSlotId ); @@ -254,7 +254,7 @@ void __EXPORT ScFormatShell::GetStyleState( SfxItemSet& rSet ) { ISfxTemplateCommon* pDesigner = SFX_APP()-> GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings()); - BOOL bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); + sal_Bool bPage = pDesigner && SFX_STYLE_FAMILY_PAGE == pDesigner->GetActualFamily(); if ( bProtected && !bPage ) rSet.DisableItem( nSlotId ); @@ -283,7 +283,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) //-------------------------------------------------------------------- SfxBindings& rBindings = pViewData->GetBindings(); const SfxItemSet* pArgs = rReq.GetArgs(); - const USHORT nSlotId = rReq.GetSlot(); + const sal_uInt16 nSlotId = rReq.GetSlot(); const SCTAB nCurTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScTabViewShell* pTabViewShell= GetViewData()->GetViewShell(); @@ -291,7 +291,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) ScMarkData& rMark = GetViewData()->GetMarkData(); ScModule* pScMod = SC_MOD(); String aRefName; - BOOL bUndo = pDoc->IsUndoEnabled(); + sal_Bool bUndo = pDoc->IsUndoEnabled(); if ( (nSlotId == SID_STYLE_NEW) || (nSlotId == SID_STYLE_EDIT) @@ -305,18 +305,18 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SfxStyleSheetBasePool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = NULL; - BOOL bStyleToMarked = FALSE; - BOOL bListAction = FALSE; - BOOL bAddUndo = FALSE; // add ScUndoModifyStyle (style modified) + sal_Bool bStyleToMarked = sal_False; + sal_Bool bListAction = sal_False; + sal_Bool bAddUndo = sal_False; // add ScUndoModifyStyle (style modified) ScStyleSaveData aOldData; // for undo/redo ScStyleSaveData aNewData; SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA; const SfxPoolItem* pFamItem; - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, TRUE, &pFamItem ) ) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY, sal_True, &pFamItem ) ) eFamily = (SfxStyleFamily)((const SfxUInt16Item*)pFamItem)->GetValue(); else - if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, TRUE, &pFamItem ) ) + if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME, sal_True, &pFamItem ) ) { String sFamily = ((const SfxStringItem*)pFamItem)->GetValue(); if (sFamily.CompareToAscii("CellStyles") == COMPARE_EQUAL) @@ -327,9 +327,9 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) } String aStyleName; - USHORT nRetMask = 0xffff; + sal_uInt16 nRetMask = 0xffff; // #96983# only stylist sends focus to sheet -// BOOL bGrabFocus = ( SID_STYLE_APPLY == nSlotId ); +// sal_Bool bGrabFocus = ( SID_STYLE_APPLY == nSlotId ); pStylePool->SetSearchMask( eFamily, SFXSTYLEBIT_ALL ); @@ -338,11 +338,11 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_NEW: { const SfxPoolItem* pNameItem; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem )) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); const SfxPoolItem* pRefItem=NULL; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, TRUE, &pRefItem )) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE, sal_True, &pRefItem )) { if(pRefItem!=NULL) aRefName = ((const SfxStringItem*)pRefItem)->GetValue(); @@ -385,7 +385,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_NEW_BY_EXAMPLE: { const SfxPoolItem* pNameItem; - if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, TRUE, &pNameItem )) + if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlotId, sal_True, &pNameItem )) aStyleName = ((const SfxStringItem*)pNameItem)->GetValue(); pStyleSheet = pStylePool->Find( aStyleName, eFamily ); @@ -395,14 +395,14 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) case SID_STYLE_WATERCAN: { - BOOL bWaterCan = pScMod->GetIsWaterCan(); + sal_Bool bWaterCan = pScMod->GetIsWaterCan(); if( !bWaterCan ) { const SfxPoolItem* pItem; if ( SFX_ITEM_SET == - pArgs->GetItemState( nSlotId, TRUE, &pItem ) ) + pArgs->GetItemState( nSlotId, sal_True, &pItem ) ) { const SfxStringItem* pStrItem = PTR_CAST(SfxStringItem,pItem); if ( pStrItem ) @@ -422,13 +422,13 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( !bWaterCan && pStyleSheet ) { - pScMod->SetWaterCan( TRUE ); + pScMod->SetWaterCan( sal_True ); pTabViewShell->SetActivePointer( Pointer(POINTER_FILL) ); rReq.Done(); } else { - pScMod->SetWaterCan( FALSE ); + pScMod->SetWaterCan( sal_False ); pTabViewShell->SetActivePointer( Pointer(POINTER_ARROW) ); rReq.Done(); } @@ -456,12 +456,12 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pTabViewShell->RemoveStyleSheetInUse( (SfxStyleSheet*)pStyleSheet ); pStylePool->Remove( pStyleSheet ); pTabViewShell->InvalidateAttribs(); - nRetMask = TRUE; - bAddUndo = TRUE; + nRetMask = sal_True; + bAddUndo = sal_True; rReq.Done(); } else - nRetMask = FALSE; + nRetMask = sal_False; } break; @@ -512,10 +512,10 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bListAction = TRUE; + bListAction = sal_True; } - BOOL bConvertBack = FALSE; + sal_Bool bConvertBack = sal_False; SfxStyleSheet* pSheetInUse = (SfxStyleSheet*) pTabViewShell->GetStyleSheetFromMarked(); @@ -535,7 +535,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) //!!! bei Gelenheit mal eine Methode, die // das fuer einen bestimmten Style macht pDoc->StylesToNames(); - bConvertBack = TRUE; + bConvertBack = sal_True; pStylePool->Remove(pStyleSheet); } @@ -560,7 +560,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // call SetStyleSheetToMarked after adding the ScUndoModifyStyle // (pStyleSheet pointer is used!) - bStyleToMarked = TRUE; + bStyleToMarked = sal_True; } else // ( nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE ) { @@ -574,7 +574,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { String aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bListAction = TRUE; + bListAction = sal_True; } pStyleSheet->GetItemSet().Put( aAttrSet ); @@ -582,12 +582,12 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // call SetStyleSheetToMarked after adding the ScUndoModifyStyle // (pStyleSheet pointer is used!) - bStyleToMarked = TRUE; + bStyleToMarked = sal_True; } } aNewData.InitFromStyle( pStyleSheet ); - bAddUndo = TRUE; + bAddUndo = sal_True; rReq.Done(); } break; @@ -609,14 +609,14 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { if ( pDoc->RemovePageStyleInUse( pStyleSheet->GetName() ) ) { - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nCurTab ).UpdatePages(); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nCurTab ).UpdatePages(); rBindings.Invalidate( SID_STATUS_PAGESTYLE ); rBindings.Invalidate( FID_RESET_PRINTZOOM ); } pStylePool->Remove( pStyleSheet ); rBindings.Invalidate( SID_STYLE_FAMILY4 ); pDocSh->SetDocumentModified(); - bAddUndo = TRUE; + bAddUndo = sal_True; rReq.Done(); } } @@ -636,7 +636,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( aOldName != aStyleName ) { pDoc->SetPageStyle( nTab, aStyleName ); - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nTab ).UpdatePages(); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nTab ).UpdatePages(); if( !pUndoAction ) pUndoAction = new ScUndoApplyPageStyle( pDocSh, aStyleName ); pUndoAction->AddSheetAction( nTab, aOldName ); @@ -665,7 +665,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SfxStyleSheetBase* pCurStyle = pStylePool->Find( rStrCurStyle, eFamily ); SfxItemSet aAttrSet = pCurStyle->GetItemSet(); SCTAB nInTab; - BOOL bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab ); + sal_Bool bUsed = pDoc->IsPageStyleInUse( aStyleName, &nInTab ); // wenn bereits vorhanden, erstmal entfernen... if ( pStyleSheet ) @@ -681,12 +681,12 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // wenn in Verwendung -> Update if ( bUsed ) - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(TRUE), nInTab ).UpdatePages(); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nInTab ).UpdatePages(); aNewData.InitFromStyle( pStyleSheet ); - bAddUndo = TRUE; + bAddUndo = sal_True; rReq.Done(); - nRetMask = TRUE; + nRetMask = sal_True; } } break; @@ -713,7 +713,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // ScDocShell* pDocSh = GetViewData()->GetDocShell(); //CHINA001 ScStyleDlg* pDlg = NULL; SfxAbstractTabDialog* pDlg = NULL; //CHINA001 - USHORT nRsc = 0; + sal_uInt16 nRsc = 0; // #37034#/#37245# alte Items aus der Vorlage merken SfxItemSet aOldSet = pStyleSheet->GetItemSet(); @@ -732,16 +732,16 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) const SfxPoolItem* pItem; if ( rSet.GetItemState( ATTR_VALUE_FORMAT, - FALSE, &pItem ) == SFX_ITEM_SET ) + sal_False, &pItem ) == SFX_ITEM_SET ) { // NumberFormat Value aus Value und Language // erzeugen und eintueten - ULONG nFormat = + sal_uLong nFormat = ((SfxUInt32Item*)pItem)->GetValue(); LanguageType eLang = ((SvxLanguageItem*)&rSet.Get( ATTR_LANGUAGE_FORMAT ))->GetLanguage(); - ULONG nLangFormat = pDoc->GetFormatTable()-> + sal_uLong nLangFormat = pDoc->GetFormatTable()-> GetFormatForLanguageIfBuiltIn( nFormat, eLang ); if ( nLangFormat != nFormat ) { @@ -757,16 +757,16 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pDocSh->PutItem( *pNumberInfoItem ); nRsc = RID_SCDLG_STYLES_PAR; - // auf jeden Fall ein SvxBoxInfoItem mit Table = FALSE im Set: + // auf jeden Fall ein SvxBoxInfoItem mit Table = sal_False im Set: // (wenn gar kein Item da ist, loescht der Dialog auch das // BORDER_OUTER SvxBoxItem aus dem Vorlagen-Set) - if ( rSet.GetItemState( ATTR_BORDER_INNER, FALSE ) != SFX_ITEM_SET ) + if ( rSet.GetItemState( ATTR_BORDER_INNER, sal_False ) != SFX_ITEM_SET ) { SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER ); - aBoxInfoItem.SetTable(FALSE); // keine inneren Linien - aBoxInfoItem.SetDist(TRUE); - aBoxInfoItem.SetMinDist(FALSE); + aBoxInfoItem.SetTable(sal_False); // keine inneren Linien + aBoxInfoItem.SetDist(sal_True); + aBoxInfoItem.SetMinDist(sal_False); rSet.Put( aBoxInfoItem ); } } @@ -791,7 +791,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pParent = pTabViewShell->GetDialogParent(); } - pTabViewShell->SetInFormatDialog(TRUE); + pTabViewShell->SetInFormatDialog(sal_True); //CHINA001 pDlg = new ScStyleDlg( pParent, *pStyleSheet, nRsc ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -800,7 +800,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) pDlg = pFact->CreateScStyleDlg( pParent, *pStyleSheet, nRsc, nRsc ); DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 short nResult = pDlg->Execute(); - pTabViewShell->SetInFormatDialog(FALSE); + pTabViewShell->SetInFormatDialog(sal_False); if ( nResult == RET_OK ) { @@ -818,7 +818,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) // pDoc->CellStyleChanged( *pStyleSheet, aOldSet ); SfxItemSet& rNewSet = pStyleSheet->GetItemSet(); - BOOL bNumFormatChanged; + sal_Bool bNumFormatChanged; if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged, aOldSet, rNewSet ) ) pDoc->InvalidateTextWidth( NULL, NULL, bNumFormatChanged ); @@ -826,11 +826,11 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) if (pDoc->IsStreamValid(nTab)) - pDoc->SetStreamValid(nTab, FALSE); + pDoc->SetStreamValid(nTab, sal_False); - ULONG nOldFormat = ((const SfxUInt32Item&)aOldSet. + sal_uLong nOldFormat = ((const SfxUInt32Item&)aOldSet. Get( ATTR_VALUE_FORMAT )).GetValue(); - ULONG nNewFormat = ((const SfxUInt32Item&)rNewSet. + sal_uLong nNewFormat = ((const SfxUInt32Item&)rNewSet. Get( ATTR_VALUE_FORMAT )).GetValue(); if ( nNewFormat != nOldFormat ) { @@ -873,7 +873,7 @@ void __EXPORT ScFormatShell::ExecuteStyle( SfxRequest& rReq ) } aNewData.InitFromStyle( pStyleSheet ); - bAddUndo = TRUE; + bAddUndo = sal_True; } } else @@ -924,7 +924,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) ScModule* pScMod = SC_MOD(); ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -988,11 +988,11 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) rReq.Done(); break; case SID_NUMBER_INCDEC: - pTabViewShell->ChangeNumFmtDecimals( TRUE ); + pTabViewShell->ChangeNumFmtDecimals( sal_True ); rReq.Done(); break; case SID_NUMBER_DECDEC: - pTabViewShell->ChangeNumFmtDecimals( FALSE ); + pTabViewShell->ChangeNumFmtDecimals( sal_False ); rReq.Done(); break; @@ -1000,7 +1000,7 @@ void ScFormatShell::ExecuteNumFormat( 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) { String aCode = ((const SfxStringItem*)pItem)->GetValue(); pTabViewShell->SetNumFmtByStr( aCode ); @@ -1012,7 +1012,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) if ( pReqArgs ) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( ATTR_VALUE_FORMAT, sal_True, &pItem ) == SFX_ITEM_SET ) { // We have to accomplish this using ApplyAttributes() // because we also need the language information to be @@ -1022,7 +1022,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) SfxItemPool* pDocPool = GetViewData()->GetDocument()->GetPool(); SfxItemSet aNewSet( *pDocPool, ATTR_PATTERN_START, ATTR_PATTERN_END ); aNewSet.Put( *pItem ); - pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, TRUE ); + pTabViewShell->ApplyAttributes( &aNewSet, &rOldSet, sal_True ); } } break; @@ -1057,7 +1057,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); SfxBindings& rBindings = pViewData->GetBindings(); const SfxItemSet* pSet = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -1082,7 +1082,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) if( pSet ) { const SfxPoolItem* pItem = NULL; - if( pSet->GetItemState(GetPool().GetWhich(nSlot), TRUE, &pItem ) == SFX_ITEM_SET ) + if( pSet->GetItemState(GetPool().GetWhich(nSlot), sal_True, &pItem ) == SFX_ITEM_SET ) { switch ( nSlot ) @@ -1148,7 +1148,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SfxBindings& rBindings = pViewData->GetBindings(); const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern(); const SfxItemSet* pSet = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); SfxAllItemSet* pNewSet = 0; pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox @@ -1168,7 +1168,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_WEIGHT: { // #i78017 establish the same behaviour as in Writer - BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); @@ -1180,7 +1180,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) FontWeight eWeight = WEIGHT_BOLD; SvxScriptSetItem aOldSetItem( nSlot, rPool ); - aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE ); + aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), sal_False ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxWeightItem*)pCore)->GetWeight() == WEIGHT_BOLD ) eWeight = WEIGHT_NORMAL; @@ -1188,14 +1188,14 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) aSetItem.PutItemForScriptType( nScript, SvxWeightItem( eWeight, ATTR_FONT_WEIGHT ) ); } pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); - pNewSet->Put( aSetItem.GetItemSet(), FALSE ); + pNewSet->Put( aSetItem.GetItemSet(), sal_False ); } break; case SID_ATTR_CHAR_POSTURE: { // #i78017 establish the same behaviour as in Writer - BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); @@ -1207,7 +1207,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) FontItalic eItalic = ITALIC_NORMAL; SvxScriptSetItem aOldSetItem( nSlot, rPool ); - aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), FALSE ); + aOldSetItem.GetItemSet().Put( pAttrs->GetItemSet(), sal_False ); const SfxPoolItem* pCore = aOldSetItem.GetItemOfScript( nScript ); if ( pCore && ((const SvxPostureItem*)pCore)->GetPosture() == ITALIC_NORMAL ) eItalic = ITALIC_NONE; @@ -1215,7 +1215,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) aSetItem.PutItemForScriptType( nScript, SvxPostureItem( eItalic, ATTR_FONT_POSTURE ) ); } pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); - pNewSet->Put( aSetItem.GetItemSet(), FALSE ); + pNewSet->Put( aSetItem.GetItemSet(), sal_False ); } break; @@ -1294,12 +1294,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq ) SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD; SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD; - if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET) + if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET) { pHorJustify = (const SvxHorJustifyItem*)pItem; eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() ); } - if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, TRUE,&pItem ) == SFX_ITEM_SET) + if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, sal_True,&pItem ) == SFX_ITEM_SET) { pVerJustify = (const SvxVerJustifyItem*)pItem; eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() ); @@ -1413,7 +1413,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if ( !pNewAttrs ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -1425,7 +1425,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) case SID_ATTR_ALIGN_LINEBREAK: // ohne Parameter als Toggle { const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern(); - BOOL bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue(); + sal_Bool bOld = ((const SfxBoolItem&)pAttrs->GetItem(ATTR_LINEBREAK)).GetValue(); SfxBoolItem aBreakItem( ATTR_LINEBREAK, !bOld ); pTabViewShell->ApplyAttr( aBreakItem ); @@ -1454,7 +1454,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) } else { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -1475,13 +1475,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) case SID_ATTR_CHAR_FONTHEIGHT: { // #i78017 establish the same behaviour as in Writer - BYTE nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; + sal_uInt8 nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; if (nSlot == SID_ATTR_CHAR_FONT) nScript = pTabViewShell->GetSelectionScriptType(); SfxItemPool& rPool = GetPool(); SvxScriptSetItem aSetItem( nSlot, rPool ); - USHORT nWhich = rPool.GetWhich( nSlot ); + sal_uInt16 nWhich = rPool.GetWhich( nSlot ); aSetItem.PutItemForScriptType( nScript, pNewAttrs->Get( nWhich ) ); pTabViewShell->ApplyUserItemSet( aSetItem.GetItemSet() ); @@ -1508,13 +1508,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) pDefLine->SetOutWidth( pLine->GetOutWidth() ); pDefLine->SetInWidth ( pLine->GetInWidth() ); pDefLine->SetDistance( pLine->GetDistance() ); - pTabViewShell->SetSelectionFrameLines( pDefLine, FALSE ); + pTabViewShell->SetSelectionFrameLines( pDefLine, sal_False ); } else { pTabViewShell->SetDefaultFrameLine( pLine ); pTabViewShell->GetDefaultFrameLine()->SetColor( COL_BLACK ); - pTabViewShell->SetSelectionFrameLines( pLine, FALSE ); + pTabViewShell->SetSelectionFrameLines( pLine, sal_False ); } } else @@ -1522,7 +1522,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) Color aColorBlack( COL_BLACK ); SvxBorderLine aDefLine( &aColorBlack, 20, 0, 0 ); pTabViewShell->SetDefaultFrameLine( &aDefLine ); - pTabViewShell->SetSelectionFrameLines( NULL, FALSE ); + pTabViewShell->SetSelectionFrameLines( NULL, sal_False ); } } break; @@ -1538,13 +1538,13 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if ( pDefLine ) { pDefLine->SetColor( rColor ); - pTabViewShell->SetSelectionFrameLines( pDefLine, TRUE ); + pTabViewShell->SetSelectionFrameLines( pDefLine, sal_True ); } else { SvxBorderLine aDefLine( &rColor, 20, 0, 0 ); pTabViewShell->SetDefaultFrameLine( &aDefLine ); - pTabViewShell->SetSelectionFrameLines( &aDefLine, FALSE ); + pTabViewShell->SetSelectionFrameLines( &aDefLine, sal_False ); } } break; @@ -1572,7 +1572,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) // Border-Items vom Controller auswerten: const SfxPoolItem* pItem = 0; - if ( pNewAttrs->GetItemState( ATTR_BORDER, TRUE, &pItem ) + if ( pNewAttrs->GetItemState( ATTR_BORDER, sal_True, &pItem ) == SFX_ITEM_SET ) { // #100959# The SvxFrameToolBoxControl toolbox controller uses a default @@ -1593,7 +1593,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) rReq.AppendItem( aBoxItem ); } - if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, TRUE, &pItem ) + if ( pNewAttrs->GetItemState( ATTR_BORDER_INNER, sal_True, &pItem ) == SFX_ITEM_SET ) { SvxBoxInfoItem aBoxInfoItem( *(const SvxBoxInfoItem*)pItem ); @@ -1674,12 +1674,12 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) const SvxBorderLine* pLine = pTabViewShell->GetDefaultFrameLine(); const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rAttrSet.Get( ATTR_BACKGROUND ); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); - rSet.Put( rAttrSet, FALSE ); + rSet.Put( rAttrSet, sal_False ); // choose font info according to selection script type - BYTE nScript = 0; // GetSelectionScriptType never returns 0 + sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0 if ( rSet.GetItemState( ATTR_FONT ) != SFX_ITEM_UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); @@ -1728,10 +1728,10 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - rSet.Put( rAttrSet, FALSE ); // ItemStates mitkopieren + rSet.Put( rAttrSet, sal_False ); // ItemStates mitkopieren // choose font info according to selection script type - BYTE nScript = 0; // GetSelectionScriptType never returns 0 + sal_uInt8 nScript = 0; // GetSelectionScriptType never returns 0 if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SFX_ITEM_UNKNOWN ) { if (!nScript) nScript = pTabViewShell->GetSelectionScriptType(); @@ -1752,7 +1752,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) // Unterstreichung //------------------------ - eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, TRUE ); + eState = rAttrSet.GetItemState( ATTR_FONT_UNDERLINE, sal_True ); if ( eState == SFX_ITEM_DONTCARE ) { rSet.InvalidateItem( SID_ULINE_VAL_NONE ); @@ -1764,7 +1764,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) { FontUnderline eUnderline = ((const SvxUnderlineItem&) rAttrSet.Get(ATTR_FONT_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; @@ -1773,7 +1773,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) default: break; } - rSet.Put( SfxBoolItem( nId, TRUE ) ); + rSet.Put( SfxBoolItem( nId, sal_True ) ); } //------------------------ @@ -1784,11 +1784,11 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) const SvxVerJustifyItem* pVerJustify = NULL; SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD; SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD; - USHORT nWhich = 0; - BOOL bJustifyStd = FALSE; - SfxBoolItem aBoolItem ( 0, TRUE ); + sal_uInt16 nWhich = 0; + sal_Bool bJustifyStd = sal_False; + SfxBoolItem aBoolItem ( 0, sal_True ); - eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE, + eState = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True, (const SfxPoolItem**)&pHorJustify ); switch ( eState ) { @@ -1819,7 +1819,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) case SVX_HOR_JUSTIFY_REPEAT: default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } } @@ -1833,7 +1833,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) break; default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } @@ -1844,12 +1844,12 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } else if ( bJustifyStd ) { - aBoolItem.SetValue( FALSE ); + aBoolItem.SetValue( sal_False ); aBoolItem.SetWhich( SID_ALIGNLEFT ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNRIGHT ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNCENTERHOR ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNBLOCK ); rSet.Put( aBoolItem ); - bJustifyStd = FALSE; + bJustifyStd = sal_False; } //------------------------ @@ -1857,9 +1857,9 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) //------------------------ nWhich = 0; - aBoolItem.SetValue( TRUE ); + aBoolItem.SetValue( sal_True ); - eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, TRUE, + eState = rAttrSet.GetItemState( ATTR_VER_JUSTIFY, sal_True, (const SfxPoolItem**)&pVerJustify ); switch ( eState ) @@ -1884,7 +1884,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) case SVX_VER_JUSTIFY_STANDARD: default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } } @@ -1897,7 +1897,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) break; default: - bJustifyStd = TRUE; + bJustifyStd = sal_True; break; } @@ -1908,7 +1908,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet ) } else if ( bJustifyStd ) { - aBoolItem.SetValue( FALSE ); + aBoolItem.SetValue( sal_False ); aBoolItem.SetWhich( SID_ALIGNTOP ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNBOTTOM ); rSet.Put( aBoolItem ); aBoolItem.SetWhich( SID_ALIGNCENTERVER ); rSet.Put( aBoolItem ); @@ -1939,7 +1939,7 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); SvxCellHorJustify eHAlign = SVX_HOR_JUSTIFY_STANDARD; bool bHasHAlign = rAttrSet.GetItemState( ATTR_HOR_JUSTIFY ) != SFX_ITEM_DONTCARE; @@ -1991,7 +1991,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) ScDocument* pDoc = pViewData->GetDocument(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -2003,7 +2003,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE ) { - ULONG nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( + sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( ATTR_VALUE_FORMAT )).GetValue(); SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); @@ -2032,13 +2032,13 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq ) pTabViewShell->UpdateInputHandler(); } - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch( nSlot ) { case SID_TEXTDIRECTION_LEFT_TO_RIGHT: case SID_TEXTDIRECTION_TOP_TO_BOTTOM: { - BOOL bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); + sal_Bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); ScPatternAttr aAttr( GetViewData()->GetDocument()->GetPool() ); SfxItemSet& rItemSet = aAttr.GetItemSet(); rItemSet.Put( SfxBoolItem( ATTR_STACKED, bVert ) ); @@ -2064,15 +2064,15 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - BOOL bVertDontCare = + sal_Bool bVertDontCare = (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE) || (rAttrSet.GetItemState( ATTR_STACKED ) == SFX_ITEM_DONTCARE); - BOOL bLeftRight = !bVertDontCare && + sal_Bool bLeftRight = !bVertDontCare && !((const SfxBoolItem&) rAttrSet.Get( ATTR_STACKED )).GetValue(); - BOOL bTopBottom = !bVertDontCare && !bLeftRight && + sal_Bool bTopBottom = !bVertDontCare && !bLeftRight && ((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue(); - BOOL bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); + sal_Bool bBidiDontCare = (rAttrSet.GetItemState( ATTR_WRITINGDIR ) == SFX_ITEM_DONTCARE); EEHorizontalTextDirection eBidiDir = EE_HTEXTDIR_DEFAULT; if ( !bBidiDontCare ) { @@ -2088,11 +2088,11 @@ void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) } SvtLanguageOptions aLangOpt; - BOOL bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); - BOOL bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); + sal_Bool bDisableCTLFont = !aLangOpt.IsCTLFontEnabled(); + sal_Bool bDisableVerticalText = !aLangOpt.IsVerticalTextEnabled(); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { switch( nWhich ) @@ -2142,7 +2142,7 @@ void ScFormatShell::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<const SfxBoolItem&>(pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue(); @@ -2153,7 +2153,7 @@ void ScFormatShell::ExecFormatPaintbrush( SfxRequest& rReq ) pView->Unmark(); ScDocument* pBrushDoc = new ScDocument( SCDOCMODE_CLIP ); - pView->CopyToClip( pBrushDoc, FALSE, TRUE ); + pView->CopyToClip( pBrushDoc, sal_False, sal_True ); pView->SetBrushDocument( pBrushDoc, bLock ); } } diff --git a/sc/source/ui/view/galwrap.cxx b/sc/source/ui/view/galwrap.cxx index 65146deca..e17fa0d34 100644 --- a/sc/source/ui/view/galwrap.cxx +++ b/sc/source/ui/view/galwrap.cxx @@ -46,12 +46,12 @@ Graphic GalleryGetGraphic() return pGal->GetGraphic(); } -USHORT GallerySGA_FORMAT_GRAPHIC() +sal_uInt16 GallerySGA_FORMAT_GRAPHIC() { return SGA_FORMAT_GRAPHIC; } -BOOL GalleryIsLinkage() +sal_Bool GalleryIsLinkage() { GalleryExplorer* pGal = SVX_GALLERY(); DBG_ASSERT( pGal, "Wo ist die Gallery?" ); diff --git a/sc/source/ui/view/gridmerg.cxx b/sc/source/ui/view/gridmerg.cxx index bb5afda14..cfc6d1752 100644 --- a/sc/source/ui/view/gridmerg.cxx +++ b/sc/source/ui/view/gridmerg.cxx @@ -41,7 +41,7 @@ ScGridMerger::ScGridMerger( OutputDevice* pOutDev, long nOnePixelX, long nOnePix nOneX( nOnePixelX ), nOneY( nOnePixelY ), nCount( 0 ), - bVertical( FALSE ) + bVertical( sal_False ) { // optimize (DrawGrid) only for pixel MapMode, // to avoid rounding errors @@ -104,7 +104,7 @@ void ScGridMerger::AddHorLine( long nX1, long nX2, long nY ) if ( bVertical ) { Flush(); - bVertical = FALSE; + bVertical = sal_False; } AddLine( nX1, nX2, nY ); } @@ -119,7 +119,7 @@ void ScGridMerger::AddVerLine( long nX, long nY1, long nY2 ) if ( !bVertical ) { Flush(); - bVertical = TRUE; + bVertical = sal_True; } AddLine( nY1, nY2, nX ); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 64df802e8..e2bdacb02 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -133,9 +133,9 @@ using namespace com::sun::star; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Any; -const BYTE SC_NESTEDBUTTON_NONE = 0; -const BYTE SC_NESTEDBUTTON_DOWN = 1; -const BYTE SC_NESTEDBUTTON_UP = 2; +const sal_uInt8 SC_NESTEDBUTTON_NONE = 0; +const sal_uInt8 SC_NESTEDBUTTON_DOWN = 1; +const sal_uInt8 SC_NESTEDBUTTON_UP = 2; #define SC_AUTOFILTER_ALL 0 #define SC_AUTOFILTER_TOP10 1 @@ -151,8 +151,8 @@ enum ScFilterBoxMode }; extern SfxViewShell* pScActiveViewShell; // global.cxx -extern USHORT nScClickMouseModifier; // global.cxx -extern USHORT nScFillModeMouseModifier; // global.cxx +extern sal_uInt16 nScClickMouseModifier; // global.cxx +extern sal_uInt16 nScFillModeMouseModifier; // global.cxx #define SC_FILTERLISTBOX_LINES 12 @@ -176,12 +176,12 @@ private: ScGridWindow* pGridWin; SCCOL nCol; SCROW nRow; - BOOL bButtonDown; - BOOL bInit; - BOOL bCancelled; - BOOL bInSelect; + sal_Bool bButtonDown; + sal_Bool bInit; + sal_Bool bCancelled; + sal_Bool bInSelect; bool mbListHasDates; - ULONG nSel; + sal_uLong nSel; ScFilterBoxMode eMode; protected: @@ -199,11 +199,11 @@ public: SCCOL GetCol() const { return nCol; } SCROW GetRow() const { return nRow; } ScFilterBoxMode GetMode() const { return eMode; } - BOOL IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); } + sal_Bool IsDataSelect() const { return (eMode == SC_FILTERBOX_DATASELECT); } void EndInit(); - BOOL IsInInit() const { return bInit; } - void SetCancelled() { bCancelled = TRUE; } - BOOL IsInSelect() const { return bInSelect; } + sal_Bool IsInInit() const { return bInit; } + void SetCancelled() { bCancelled = sal_True; } + sal_Bool IsInSelect() const { return bInSelect; } void SetListHasDates(bool b) { mbListHasDates = b; } bool HasDates() const { return mbListHasDates; } }; @@ -217,10 +217,10 @@ ScFilterListBox::ScFilterListBox( Window* pParent, ScGridWindow* pGrid, pGridWin( pGrid ), nCol( nNewCol ), nRow( nNewRow ), - bButtonDown( FALSE ), - bInit( TRUE ), - bCancelled( FALSE ), - bInSelect( FALSE ), + bButtonDown( sal_False ), + bInit( sal_True ), + bCancelled( sal_False ), + bInSelect( sal_False ), mbListHasDates(false), nSel( 0 ), eMode( eNewMode ) @@ -235,13 +235,13 @@ __EXPORT ScFilterListBox::~ScFilterListBox() void ScFilterListBox::EndInit() { - USHORT nPos = GetSelectEntryPos(); + sal_uInt16 nPos = GetSelectEntryPos(); if ( LISTBOX_ENTRY_NOTFOUND == nPos ) nSel = 0; else nSel = nPos; - bInit = FALSE; + bInit = sal_False; } void __EXPORT ScFilterListBox::LoseFocus() @@ -262,7 +262,7 @@ long ScFilterListBox::PreNotify( NotifyEvent& rNEvt ) KeyCode aCode = aKeyEvt.GetKeyCode(); if ( !aCode.GetModifier() ) // ohne alle Modifiers { - USHORT nKey = aCode.GetCode(); + sal_uInt16 nKey = aCode.GetCode(); if ( nKey == KEY_RETURN ) { SelectHdl(); // auswaehlen @@ -289,16 +289,16 @@ void __EXPORT ScFilterListBox::SelectHdl() { if ( !IsTravelSelect() && !bInit && !bCancelled ) { - USHORT nPos = GetSelectEntryPos(); + sal_uInt16 nPos = GetSelectEntryPos(); if ( LISTBOX_ENTRY_NOTFOUND != nPos ) { nSel = nPos; if (!bButtonDown) { // #i81298# set bInSelect flag, so the box isn't deleted from modifications within FilterSelect - bInSelect = TRUE; + bInSelect = sal_True; pGridWin->FilterSelect( nSel ); - bInSelect = FALSE; + bInSelect = sal_False; } } } @@ -333,7 +333,7 @@ Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow() // ============================================================================ -BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange ) +sal_Bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange ) { // wenn es ein editierbarer Bereich ist, und rechts unten eine Matrix-Zelle // mit Origin links oben liegt, enthaelt der Bereich genau die Matrix. @@ -341,7 +341,7 @@ BOOL lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange ) if ( !pDoc->IsBlockEditable( rRange.aStart.Tab(), rRange.aStart.Col(),rRange.aStart.Row(), rRange.aEnd.Col(),rRange.aEnd.Row() ) ) - return FALSE; + return sal_False; ScAddress aPos; const ScBaseCell* pCell = pDoc->GetCell( rRange.aEnd ); @@ -371,24 +371,24 @@ void lcl_UnLockComment( ScDrawView* pView, SdrPageView* pPV, SdrModel* pDrDoc, c sal_Bool lcl_GetHyperlinkCell(ScDocument* pDoc, SCCOL& rPosX, SCROW& rPosY, SCTAB nTab, ScBaseCell*& rpCell ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; do { pDoc->GetCell( rPosX, rPosY, nTab, rpCell ); if ( !rpCell || rpCell->GetCellType() == CELLTYPE_NOTE ) { if ( rPosX <= 0 ) - return FALSE; // alles leer bis links + return sal_False; // alles leer bis links else --rPosX; // weitersuchen } else if ( rpCell->GetCellType() == CELLTYPE_EDIT) - bFound = TRUE; + bFound = sal_True; else if (rpCell->GetCellType() == CELLTYPE_FORMULA && static_cast<ScFormulaCell*>(rpCell)->IsHyperLinkCell()) - bFound = TRUE; + bFound = sal_True; else - return FALSE; // andere Zelle + return sal_False; // andere Zelle } while ( !bFound ); @@ -416,27 +416,27 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic mpDPFieldPopup(NULL), mpFilterButton(NULL), nCursorHideCount( 0 ), - bMarking( FALSE ), + bMarking( sal_False ), nButtonDown( 0 ), - bEEMouse( FALSE ), + bEEMouse( sal_False ), nMouseStatus( SC_GM_NONE ), nNestedButtonState( SC_NESTEDBUTTON_NONE ), - bDPMouse( FALSE ), - bRFMouse( FALSE ), + bDPMouse( sal_False ), + bRFMouse( sal_False ), nPagebreakMouse( SC_PD_NONE ), - bPagebreakDrawn( FALSE ), + bPagebreakDrawn( sal_False ), nPageScript( 0 ), - bDragRect( FALSE ), + bDragRect( sal_False ), meDragInsertMode( INS_NONE ), nCurrentPointer( 0 ), - bIsInScroll( FALSE ), - bIsInPaint( FALSE ), + bIsInScroll( sal_False ), + bIsInPaint( sal_False ), aComboButton( this ), aCurMousePos( 0,0 ), nPaintCount( 0 ), - bNeedsRepaint( FALSE ), - bAutoMarkVisible( FALSE ), - bListValButton( FALSE ) + bNeedsRepaint( sal_False ), + bAutoMarkVisible( sal_False ), + bListValButton( sal_False ) { switch(eWhich) { @@ -471,7 +471,7 @@ ScGridWindow::ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhic SetUniqueId( HID_SC_WIN_GRIDWIN ); SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); - EnableRTL( FALSE ); + EnableRTL( sal_False ); } __EXPORT ScGridWindow::~ScGridWindow() @@ -528,7 +528,7 @@ IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo*, pInfo ) return 0; } -void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr ) +void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, sal_Bool bHasSelection, const String& rStr ) { //! gridwin2 ? @@ -538,13 +538,13 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti if ( pDPObj && nCol > 0 ) { // look for the dimension header left of the drop-down arrow - USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN; + sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN; long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient ); if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE ) { ScDPSaveData aSaveData( *pDPObj->GetSaveData() ); - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nField, bIsDataLayout ); if ( !bIsDataLayout ) { @@ -558,7 +558,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelecti ScDPObject aNewObj( *pDPObj ); aNewObj.SetSaveData( aSaveData ); ScDBDocFunc aFunc( *pViewData->GetDocShell() ); - aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, sal_False ); pViewData->GetView()->CursorPosChanged(); // shells may be switched } } @@ -572,10 +572,10 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) delete pFilterBox; delete pFilterFloat; - USHORT i; + sal_uInt16 i; ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nSizeX = 0; long nSizeY = 0; @@ -614,13 +614,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) TypedScStrCollection aStrings( 128, 128 ); // get list box entries and selection - BOOL bHasCurrentPage = FALSE; + sal_Bool bHasCurrentPage = sal_False; String aCurrentPage; ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab); if ( pDPObj && nCol > 0 ) { // look for the dimension header left of the drop-down arrow - USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN; + sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN; long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient ); if ( nField >= 0 && nOrient == sheet::DataPilotFieldOrientation_PAGE ) { @@ -629,7 +629,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) // get current page from SaveData ScDPSaveData* pSaveData = pDPObj->GetSaveData(); - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( nField, bIsDataLayout ); if ( pSaveData && !bIsDataLayout ) { @@ -637,7 +637,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) if ( pDim && pDim->HasCurrentPage() ) { aCurrentPage = pDim->GetCurrentPage(); - bHasCurrentPage = TRUE; + bHasCurrentPage = sal_True; } } } @@ -645,7 +645,7 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) // include all entry widths for the size of the drop-down long nMaxText = 0; - USHORT nCount = aStrings.GetCount(); + sal_uInt16 nCount = aStrings.GetCount(); for (i=0; i<nCount; i++) { TypedStrData* pData = aStrings[i]; @@ -676,13 +676,13 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) pFilterBox->SetSizePixel( aSize ); pFilterBox->Show(); // Show must be called before SetUpdateMode - pFilterBox->SetUpdateMode(FALSE); + pFilterBox->SetUpdateMode(sal_False); pFilterFloat->SetOutputSizePixel( aSize ); pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS); // fill the list box - BOOL bWait = ( nCount > 100 ); + sal_Bool bWait = ( nCount > 100 ); if (bWait) EnterWait(); @@ -695,9 +695,9 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) if (bWait) LeaveWait(); - pFilterBox->SetUpdateMode(TRUE); + pFilterBox->SetUpdateMode(sal_True); - USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND; if (bHasCurrentPage) nSelPos = pFilterBox->GetEntryPos( aCurrentPage ); @@ -748,7 +748,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange ) ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nSizeX = 0; long nSizeY = 0; @@ -793,7 +793,7 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange ) Size aSize( nSizeX, nHeight ); pFilterBox->SetSizePixel( aSize ); pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!! - pFilterBox->SetUpdateMode(FALSE); + pFilterBox->SetUpdateMode(sal_False); // SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht @@ -844,12 +844,12 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange ) pFilterFloat->SetOutputSizePixel( aSize ); pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS ); - pFilterBox->SetUpdateMode(TRUE); + pFilterBox->SetUpdateMode(sal_True); pFilterBox->GrabFocus(); // Select erst nach GrabFocus, damit das Focus-Rechteck richtig landet //! SvLBoxEntry* pSelect = NULL; - USHORT nPos = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; if (aCurrent.Len()) { nPos = pFilterBox->GetEntryPos( aCurrent ); @@ -870,15 +870,15 @@ void ScGridWindow::DoScenarioMenue( const ScRange& rScenRange ) CaptureMouse(); } -void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) +void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, sal_Bool bDataSelect ) { delete pFilterBox; delete pFilterFloat; - USHORT i; + sal_uInt16 i; ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nSizeX = 0; long nSizeY = 0; @@ -920,15 +920,15 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) pFilterBox->SetTabJustify( 1, bLayoutRTL ? AdjustRight : AdjustLeft ); */ - BOOL bEmpty = FALSE; + sal_Bool bEmpty = sal_False; TypedScStrCollection aStrings( 128, 128 ); if ( bDataSelect ) // Auswahl-Liste { // Liste fuellen - aStrings.SetCaseSensitive( TRUE ); + aStrings.SetCaseSensitive( sal_True ); pDoc->GetDataEntries( nCol, nRow, nTab, aStrings ); if ( aStrings.GetCount() == 0 ) - bEmpty = TRUE; + bEmpty = sal_True; } else // AutoFilter { @@ -940,8 +940,8 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) long nMaxText = 0; // default entries - static const USHORT nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER }; - const USHORT nDefCount = sizeof(nDefIDs) / sizeof(USHORT); + static const sal_uInt16 nDefIDs[] = { SCSTR_ALLFILTER, SCSTR_TOP10FILTER, SCSTR_STDFILTER }; + const sal_uInt16 nDefCount = sizeof(nDefIDs) / sizeof(sal_uInt16); for (i=0; i<nDefCount; i++) { String aEntry( (ScResId) nDefIDs[i] ); @@ -959,7 +959,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) // check widths of numerical entries (string entries are not included) // so all numbers are completely visible - USHORT nCount = aStrings.GetCount(); + sal_uInt16 nCount = aStrings.GetCount(); for (i=0; i<nCount; i++) { TypedStrData* pData = aStrings[i]; @@ -997,14 +997,14 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) pFilterBox->SetSizePixel( aSize ); pFilterBox->Show(); // Show muss vor SetUpdateMode kommen !!! - pFilterBox->SetUpdateMode(FALSE); + pFilterBox->SetUpdateMode(sal_False); pFilterFloat->SetOutputSizePixel( aSize ); pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS); // Listbox fuellen - USHORT nCount = aStrings.GetCount(); - BOOL bWait = ( nCount > 100 ); + sal_uInt16 nCount = aStrings.GetCount(); + sal_Bool bWait = ( nCount > 100 ); if (bWait) EnterWait(); @@ -1015,11 +1015,11 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) if (bWait) LeaveWait(); - pFilterBox->SetUpdateMode(TRUE); + pFilterBox->SetUpdateMode(sal_True); } //! SvLBoxEntry* pSelect = NULL; - USHORT nSelPos = LISTBOX_ENTRY_NOTFOUND; + sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND; if (!bDataSelect) // AutoFilter: aktiven Eintrag selektieren { @@ -1029,7 +1029,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) ScQueryParam aParam; pDBData->GetQueryParam( aParam ); // kann nur MAXQUERY Eintraege ergeben - BOOL bValid = TRUE; + sal_Bool bValid = sal_True; for (SCSIZE j=0; j<MAXQUERY && bValid; j++) // bisherige Filter-Einstellungen if (aParam.GetEntry(j).bDoQuery) { @@ -1038,7 +1038,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) ScQueryEntry& rEntry = aParam.GetEntry(j); if (j>0) if (rEntry.eConnect != SC_AND) - bValid = FALSE; + bValid = sal_False; if (rEntry.nField == nCol) { if (rEntry.eOp == SC_EQUAL) @@ -1065,7 +1065,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) else { - ULONG nIndex = ((SfxUInt32Item*)pDoc->GetAttr( + sal_uLong nIndex = ((SfxUInt32Item*)pDoc->GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA ))->GetValue(); if ( nIndex ) { @@ -1086,13 +1086,13 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) bool bSortList = ( pData->GetListType() == ValidListType::SORTEDASCENDING); if ( bSortList ) { - USHORT nStrIndex; + sal_uInt16 nStrIndex; if (aStrings.Search(pNew,nStrIndex)) nSelPos = nStrIndex; } else { - USHORT nCount = aStrings.GetCount(); + sal_uInt16 nCount = aStrings.GetCount(); for (i = 0; ((i < nCount) && ( LISTBOX_ENTRY_NOTFOUND == nSelPos)); i++) { if ( aStrings.Compare(aStrings[i], pNew)==0 ) @@ -1143,7 +1143,7 @@ void ScGridWindow::DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect ) } } -void ScGridWindow::FilterSelect( ULONG nSel ) +void ScGridWindow::FilterSelect( sal_uLong nSel ) { String aString; /* @@ -1155,7 +1155,7 @@ void ScGridWindow::FilterSelect( ULONG nSel ) aString = pStringEntry->GetText(); } */ - aString = pFilterBox->GetEntry( static_cast< USHORT >( nSel ) ); + aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) ); SCCOL nCol = pFilterBox->GetCol(); SCROW nRow = pFilterBox->GetRow(); @@ -1196,7 +1196,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr ) } } -void ScGridWindow::ExecFilter( ULONG nSel, +void ScGridWindow::ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow, const String& aValue, bool bCheckForDates ) { @@ -1223,13 +1223,13 @@ void ScGridWindow::ExecFilter( ULONG nSel, } else { - BOOL bDeleteOld = FALSE; + sal_Bool bDeleteOld = sal_False; SCSIZE nQueryPos = 0; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if (!aParam.bInplace) - bDeleteOld = TRUE; + bDeleteOld = sal_True; if (aParam.bRegExp) - bDeleteOld = TRUE; + bDeleteOld = sal_True; for (SCSIZE i=0; i<MAXQUERY && !bDeleteOld; i++) // bisherige Filter-Einstellungen if (aParam.GetEntry(i).bDoQuery) { @@ -1238,14 +1238,14 @@ void ScGridWindow::ExecFilter( ULONG nSel, ScQueryEntry& rEntry = aParam.GetEntry(i); if (i>0) if (rEntry.eConnect != SC_AND) - bDeleteOld = TRUE; + bDeleteOld = sal_True; if (rEntry.nField == nCol) { if (bFound) // diese Spalte zweimal? - bDeleteOld = TRUE; + bDeleteOld = sal_True; nQueryPos = i; - bFound = TRUE; + bFound = sal_True; } if (!bFound) nQueryPos = i + 1; @@ -1257,8 +1257,8 @@ void ScGridWindow::ExecFilter( ULONG nSel, for (SCSIZE i=0; i<nEC; i++) aParam.GetEntry(i).Clear(); nQueryPos = 0; - aParam.bInplace = TRUE; - aParam.bRegExp = FALSE; + aParam.bInplace = sal_True; + aParam.bRegExp = sal_False; } if ( nQueryPos < MAXQUERY || SC_AUTOFILTER_ALL == nSel ) // loeschen geht immer @@ -1267,8 +1267,8 @@ void ScGridWindow::ExecFilter( ULONG nSel, { ScQueryEntry& rNewEntry = aParam.GetEntry(nQueryPos); - rNewEntry.bDoQuery = TRUE; - rNewEntry.bQueryByString = TRUE; + rNewEntry.bDoQuery = sal_True; + rNewEntry.bQueryByString = sal_True; rNewEntry.nField = nCol; rNewEntry.bQueryByDate = bCheckForDates; if ( nSel == SC_AUTOFILTER_TOP10 ) @@ -1297,7 +1297,7 @@ void ScGridWindow::ExecFilter( ULONG nSel, pViewData->GetViewShell()->UpdateInputHandler(); } - pViewData->GetView()->Query( aParam, NULL, TRUE ); + pViewData->GetView()->Query( aParam, NULL, sal_True ); pDBData->SetQueryParam( aParam ); // speichern } else // "Zuviele Bedingungen" @@ -1331,7 +1331,7 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin ) rDestWin.nRFIndex = nRFIndex; rDestWin.nRFAddX = nRFAddX; rDestWin.nRFAddY = nRFAddY; - bRFMouse = FALSE; + bRFMouse = sal_False; } if (nPagebreakMouse) @@ -1345,26 +1345,26 @@ void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin ) } } -BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction ) +sal_Bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, sal_Bool bAction ) { // MouseEvent buttons must only be checked if bAction==TRUE // to allow changing the mouse pointer in MouseMove, // but not start AutoFill with right button (#74229#). - // with bAction==TRUE, SetFillMode / SetDragMode is called + // with bAction==sal_True, SetFillMode / SetDragMode is called if ( bAction && !rMEvt.IsLeft() ) - return FALSE; + return sal_False; - BOOL bNewPointer = FALSE; + sal_Bool bNewPointer = sal_False; SfxInPlaceClient* pClient = pViewData->GetViewShell()->GetIPClient(); - BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); + sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); if ( pViewData->IsActive() && !bOleActive ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // Auto-Fill @@ -1393,7 +1393,7 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction ) // where the Marking flag is set and MarkToSimple won't work anymore. pViewData->GetMarkData().MarkToSimple(); } - bNewPointer = TRUE; + bNewPointer = sal_True; } } } @@ -1414,21 +1414,21 @@ BOOL ScGridWindow::TestMouse( const MouseEvent& rMEvt, BOOL bAction ) aStartPos.X() += 2; aEndPos.X() += 2; } - BOOL bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 && + sal_Bool bTop = ( aMousePos.X() >= aStartPos.X()-3 && aMousePos.X() <= aStartPos.X()+1 && aMousePos.Y() >= aStartPos.Y()-3 && aMousePos.Y() <= aStartPos.Y()+1 ); - BOOL bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 && + sal_Bool bBottom = ( aMousePos.X() >= aEndPos.X()-3 && aMousePos.X() <= aEndPos.X()+1 && aMousePos.Y() >= aEndPos.Y()-3 && aMousePos.Y() <= aEndPos.Y()+1 ); if ( bTop || bBottom ) { SetPointer( Pointer( POINTER_CROSS ) ); if (bAction) { - BYTE nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB; + sal_uInt8 nMode = bTop ? SC_FILL_EMBED_LT : SC_FILL_EMBED_RB; pViewData->SetDragMode( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), nMode ); } - bNewPointer = TRUE; + bNewPointer = sal_True; } } } @@ -1488,7 +1488,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) // merken, dass FilterBox geloescht wird, damit sichergestellt // ist, dass in diesem Handler nicht an gleicher Stelle wieder // eine neue geoeffnet wird. - BOOL bWasFilterBox = ( pFilterBox != NULL && + sal_Bool bWasFilterBox = ( pFilterBox != NULL && ((Window*)pFilterBox)->IsVisible() && !pFilterBox->IsDataSelect() ); SCCOL nOldColFBox = bWasFilterBox ? pFilterBox->GetCol() : 0; @@ -1499,7 +1499,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) HideNoteMarker(); // Notiz-Anzeige - bEEMouse = FALSE; + bEEMouse = sal_False; ScModule* pScMod = SC_MOD(); if (pScMod->IsModalMode(pViewData->GetSfxDocShell())) @@ -1511,11 +1511,11 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) pScActiveViewShell = pViewData->GetViewShell(); // falls auf Link geklickt wird nScClickMouseModifier = rMEvt.GetModifier(); // um Control-Klick immer zu erkennen - BOOL bDetective = pViewData->GetViewShell()->IsAuditShell(); - BOOL bRefMode = pViewData->IsRefMode(); // Referenz angefangen - BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz - BOOL bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE - BOOL bDouble = (rMEvt.GetClicks() == 2); + sal_Bool bDetective = pViewData->GetViewShell()->IsAuditShell(); + sal_Bool bRefMode = pViewData->IsRefMode(); // Referenz angefangen + sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz + sal_Bool bEditMode = pViewData->HasEditView(eWhich); // auch bei Mode==SC_INPUT_TYPE + sal_Bool bDouble = (rMEvt.GetClicks() == 2); // DeactivateIP passiert nur noch bei MarkListHasChanged @@ -1596,7 +1596,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) GrabFocus(); pScMod->SetInputMode( SC_INPUT_TABLE ); - bEEMouse = TRUE; + bEEMouse = sal_True; bEditMode = pEditView->MouseButtonDown( rMEvt ); return; } @@ -1617,7 +1617,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) if ( HitRangeFinder( rMEvt.GetPosPixel(), bRFSize, &nRFIndex, &nRFAddX, &nRFAddY ) ) { - bRFMouse = TRUE; // die anderen Variablen sind oben initialisiert + bRFMouse = sal_True; // die anderen Variablen sind oben initialisiert if ( pViewData->GetActivePart() != eWhich ) pViewData->GetView()->ActivatePart( eWhich ); //! schon oben immer ??? @@ -1627,7 +1627,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) return; } - BOOL bCrossPointer = TestMouse( rMEvt, TRUE ); + sal_Bool bCrossPointer = TestMouse( rMEvt, sal_True ); if ( bCrossPointer ) { if ( bDouble ) @@ -1642,10 +1642,10 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) &nPagebreakBreak, &nPagebreakPrev ); if (nPagebreakMouse) { - bPagebreakDrawn = FALSE; + bPagebreakDrawn = sal_False; // CaptureMouse(); StartTracking(); - PagebreakMove( rMEvt, FALSE ); + PagebreakMove( rMEvt, sal_False ); return; } } @@ -1659,7 +1659,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) return; } - pViewData->GetViewShell()->SetDrawShell( FALSE ); // kein Draw-Objekt selektiert + pViewData->GetViewShell()->SetDrawShell( sal_False ); // kein Draw-Objekt selektiert // TestMouse schon oben passiert } @@ -1698,7 +1698,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) Rectangle aButtonRect = GetListValButtonRect( aListValPos ); if ( aButtonRect.IsInside( aPos ) ) { - DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), TRUE ); + DoAutoFilterMenue( aListValPos.Col(), aListValPos.Row(), sal_True ); nMouseStatus = SC_GM_FILTER; // not set in DoAutoFilterMenue for bDataSelect CaptureMouse(); @@ -1739,7 +1739,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) // Links in Edit-Zellen // - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bAlt = rMEvt.IsMod2(); if ( !bAlt && rMEvt.IsLeft() && GetEditUrl(rMEvt.GetPosPixel()) ) // Klick auf Link: Cursor nicht bewegen { @@ -1769,7 +1769,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt ) ReleaseMouse(); StartTracking(); } - pViewData->GetMarkData().SetMarking(TRUE); + pViewData->GetMarkData().SetMarking(sal_True); return; } } @@ -1797,7 +1797,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) nMouseStatus = SC_GM_NONE; // Selection-Engine: Markieren abbrechen pViewData->GetView()->GetSelEngine()->Reset(); - rMark.SetMarking(FALSE); + rMark.SetMarking(sal_False); if (pViewData->IsAnyFillMode()) { pViewData->GetView()->StopRefMode(); @@ -1854,7 +1854,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pViewData->GetView()->InvalidateAttribs(); rBindings.Invalidate( SID_HYPERLINK_GETLINK ); - bEEMouse = FALSE; + bEEMouse = sal_False; return; } @@ -1866,8 +1866,8 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) if (bRFMouse) { - RFMouseMove( rMEvt, TRUE ); // Range wieder richtigherum - bRFMouse = FALSE; + RFMouseMove( rMEvt, sal_True ); // Range wieder richtigherum + bRFMouse = sal_False; SetPointer( Pointer( POINTER_ARROW ) ); ReleaseMouse(); return; @@ -1875,7 +1875,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) if (nPagebreakMouse) { - PagebreakMove( rMEvt, TRUE ); + PagebreakMove( rMEvt, sal_True ); nPagebreakMouse = SC_PD_NONE; SetPointer( Pointer( POINTER_ARROW ) ); ReleaseMouse(); @@ -1895,7 +1895,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects return; - rMark.SetMarking(FALSE); + rMark.SetMarking(sal_False); SetPointer( Pointer( POINTER_ARROW ) ); @@ -1911,16 +1911,16 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // DBG_ASSERT( nStartCol==pViewData->GetRefStartX() && nStartRow==pViewData->GetRefStartY(), // "Block falsch fuer AutoFill" ); ScRange aDelRange; - BOOL bIsDel = pViewData->GetDelMark( aDelRange ); + sal_Bool bIsDel = pViewData->GetDelMark( aDelRange ); ScViewFunc* pView = pViewData->GetView(); pView->StopRefMode(); pViewData->ResetFillMode(); - pView->GetFunctionSet()->SetAnchorFlag( FALSE ); // #i5819# don't use AutoFill anchor flag for selection + pView->GetFunctionSet()->SetAnchorFlag( sal_False ); // #i5819# don't use AutoFill anchor flag for selection if ( bIsDel ) { - pView->MarkRange( aDelRange, FALSE ); + pView->MarkRange( aDelRange, sal_False ); pView->DeleteContents( IDF_CONTENTS ); SCTAB nTab = pViewData->GetTabNo(); ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ); @@ -1930,7 +1930,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) aBlockRange.aEnd.SetCol( aDelRange.aStart.Col() - 1 ); else aBlockRange.aEnd.SetRow( aDelRange.aStart.Row() - 1 ); - pView->MarkRange( aBlockRange, FALSE ); + pView->MarkRange( aBlockRange, sal_False ); } } else @@ -1952,11 +1952,11 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) ScTabView* pView = pViewData->GetView(); pView->StopRefMode(); pViewData->ResetFillMode(); - pView->GetFunctionSet()->SetAnchorFlag( FALSE ); + pView->GetFunctionSet()->SetAnchorFlag( sal_False ); if ( aEndPos != aBlockRange.aEnd ) { - pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, FALSE ); + pViewData->GetDocShell()->GetDocFunc().ResizeMatrix( aBlockRange, aEndPos, sal_False ); pViewData->GetView()->MarkRange( ScRange( aBlockRange.aStart, aEndPos ) ); } } @@ -1966,11 +1966,11 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) ScTabView* pView = pViewData->GetView(); pView->StopRefMode(); pViewData->ResetFillMode(); - pView->GetFunctionSet()->SetAnchorFlag( FALSE ); + pView->GetFunctionSet()->SetAnchorFlag( sal_False ); pViewData->GetDocShell()->UpdateOle(pViewData); } - BOOL bRefMode = pViewData->IsRefMode(); + sal_Bool bRefMode = pViewData->IsRefMode(); if (bRefMode) pScMod->EndReference(); @@ -2006,7 +2006,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pStyleSheet->GetName() ); ScPrintFunc( pViewData->GetDocShell(), - pViewData->GetViewShell()->GetPrinter(TRUE), + pViewData->GetViewShell()->GetPrinter(sal_True), pViewData->GetTabNo() ).UpdatePages(); rBindings.Invalidate( SID_STATUS_PAGESTYLE ); @@ -2032,7 +2032,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // double click (only left button) // - BOOL bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); + sal_Bool bDouble = ( rMEvt.GetClicks() == 2 && rMEvt.IsLeft() ); if ( bDouble && !bRefMode && nMouseStatus == SC_GM_DBLDOWN && !pScMod->IsRefDialogOpen() ) { // data pilot table @@ -2053,7 +2053,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) if ( ( aData.Flags & sheet::MemberResultFlags::HASMEMBER ) && ! ( aData.Flags & sheet::MemberResultFlags::SUBTOTAL ) ) { - USHORT nDummy; + sal_uInt16 nDummy; if ( pView->HasSelectionForDrillDown( nDummy ) ) { // execute slot to show dialog @@ -2065,7 +2065,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) ScDPObject aNewObj( *pDPObj ); pDPObj->ToggleDetails( aData, &aNewObj ); ScDBDocFunc aFunc( *pViewData->GetDocShell() ); - aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, sal_False ); pViewData->GetView()->CursorPosChanged(); // shells may be switched } } @@ -2119,7 +2119,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // Links in edit cells // - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bAlt = rMEvt.IsMod2(); if ( !bAlt && !bRefMode && !bDouble && nMouseStatus == SC_GM_URLDOWN ) { // beim ButtonUp nur ausfuehren, wenn ButtonDown auch ueber einer URL war @@ -2162,7 +2162,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // // SelMouseButtonDown is called only for left button, but SelMouseButtonUp would return - // TRUE for any call, so IsLeft must be checked here, too. + // sal_True for any call, so IsLeft must be checked here, too. if ( rMEvt.IsLeft() && pViewData->GetView()->GetSelEngine()->SelMouseButtonUp( rMEvt ) ) { @@ -2170,7 +2170,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) pViewData->GetView()->UpdateAutoFillMark(); SfxDispatcher* pDisp = pViewData->GetViewShell()->GetDispatcher(); - BOOL bFormulaMode = pScMod->IsFormulaMode(); + sal_Bool bFormulaMode = pScMod->IsFormulaMode(); DBG_ASSERT( pDisp || bFormulaMode, "Cursor auf nicht aktiver View bewegen ?" ); // #i14927# execute SID_CURRENTCELL (for macro recording) only if there is no @@ -2183,7 +2183,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) String aAddr; // CurrentCell if( rMark.IsMarked() ) { -// BOOL bKeep = rMark.IsMultiMarked(); //! wohin damit ??? +// sal_Bool bKeep = rMark.IsMultiMarked(); //! wohin damit ??? ScRange aScRange; rMark.GetMarkArea( aScRange ); @@ -2240,7 +2240,7 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if (bEEMouse && nButtonDown && !rMEvt.GetButtons()) { - bEEMouse = FALSE; + bEEMouse = sal_False; nButtonDown = 0; nMouseStatus = SC_GM_NONE; return; @@ -2282,7 +2282,7 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt ) } } - BOOL bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz + sal_Bool bFormulaMode = pScMod->IsFormulaMode(); // naechster Klick -> Referenz if (bEEMouse && pViewData->HasEditView( eWhich )) { @@ -2302,19 +2302,19 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt ) if (bRFMouse) { - RFMouseMove( rMEvt, FALSE ); + RFMouseMove( rMEvt, sal_False ); return; } if (nPagebreakMouse) { - PagebreakMove( rMEvt, FALSE ); + PagebreakMove( rMEvt, sal_False ); return; } // anderen Mauszeiger anzeigen? - BOOL bEditMode = pViewData->HasEditView(eWhich); + sal_Bool bEditMode = pViewData->HasEditView(eWhich); //! Testen ob RefMode-Dragging !!! if ( bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()) ) @@ -2335,7 +2335,7 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt ) nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow ) { // Field can only be URL field - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bAlt = rMEvt.IsMod2(); if ( !bAlt && !nButtonDown && pEditView && pEditView->GetFieldUnderMousePointer() ) SetPointer( Pointer( POINTER_REFHAND ) ); else if ( pEditView && pEditView->GetEditEngine()->IsVertical() ) @@ -2346,29 +2346,29 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt ) } } - BOOL bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush(); + sal_Bool bWater = SC_MOD()->GetIsWaterCan() || pViewData->GetView()->HasPaintBrush(); if (bWater) SetPointer( Pointer(POINTER_FILL) ); if (!bWater) { - BOOL bCross = FALSE; + sal_Bool bCross = sal_False; // Range-Finder - BOOL bCorner; + sal_Bool bCorner; if ( HitRangeFinder( rMEvt.GetPosPixel(), bCorner ) ) { if (bCorner) SetPointer( Pointer( POINTER_CROSS ) ); else SetPointer( Pointer( POINTER_HAND ) ); - bCross = TRUE; + bCross = sal_True; } // Page-Break-Modus - USHORT nBreakType; + sal_uInt16 nBreakType; if ( !nButtonDown && pViewData->IsPagebreakMode() && ( nBreakType = HitPageBreak( rMEvt.GetPosPixel() ) ) != 0 ) { @@ -2395,25 +2395,25 @@ void __EXPORT ScGridWindow::MouseMove( const MouseEvent& rMEvt ) break; } SetPointer( Pointer( eNew ) ); - bCross = TRUE; + bCross = sal_True; } // Fill-Cursor anzeigen ? if ( !bFormulaMode && !nButtonDown ) - if (TestMouse( rMEvt, FALSE )) - bCross = TRUE; + if (TestMouse( rMEvt, sal_False )) + bCross = sal_True; if ( nButtonDown && pViewData->IsAnyFillMode() ) { SetPointer( Pointer( POINTER_CROSS ) ); - bCross = TRUE; + bCross = sal_True; nScFillModeMouseModifier = rMEvt.GetModifier(); // ausgewertet bei AutoFill und Matrix } if (!bCross) { - BOOL bAlt = rMEvt.IsMod2(); + sal_Bool bAlt = rMEvt.IsMod2(); if (bEditMode) // Edit-Mode muss zuerst kommen! SetPointer( Pointer( POINTER_ARROW ) ); @@ -2458,7 +2458,7 @@ void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const MouseE long ScGridWindow::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( nType == EVENT_MOUSEBUTTONUP || nType == EVENT_MOUSEBUTTONDOWN ) { Window* pWindow = rNEvt.GetWindow(); @@ -2517,24 +2517,24 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt ) if (!pViewData->GetView()->IsInActivatePart()) { if (bDPMouse) - bDPMouse = FALSE; // gezeichnet wird per bDragRect + bDPMouse = sal_False; // gezeichnet wird per bDragRect if (bDragRect) { // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } if (bRFMouse) { - RFMouseMove( rMEvt, TRUE ); // richtig abbrechen geht dabei nicht... - bRFMouse = FALSE; + RFMouseMove( rMEvt, sal_True ); // richtig abbrechen geht dabei nicht... + bRFMouse = sal_False; } if (nPagebreakMouse) { // if (bPagebreakDrawn) // DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(), - // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE ); - bPagebreakDrawn = FALSE; + // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False ); + bPagebreakDrawn = sal_False; UpdateDragRectOverlay(); nPagebreakMouse = SC_PD_NONE; } @@ -2543,7 +2543,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt ) StopMarking(); MouseButtonUp( rMEvt ); // mit Status SC_GM_IGNORE aus StopMarking - BOOL bRefMode = pViewData->IsRefMode(); + sal_Bool bRefMode = pViewData->IsRefMode(); if (bRefMode) SC_MOD()->EndReference(); // #63148# Dialog nicht verkleinert lassen } @@ -2569,7 +2569,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) HideNoteMarker(); - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE ); + CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True ); if (bEEMouse && pViewData->HasEditView( eWhich )) { @@ -2580,7 +2580,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) // #63263# don't remove the edit view while switching views ScModule* pScMod = SC_MOD(); - pScMod->SetInEditCommand( TRUE ); + pScMod->SetInEditCommand( sal_True ); pEditView->Command( aDragEvent ); @@ -2588,7 +2588,7 @@ void ScGridWindow::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) if (pHdl) pHdl->DataChanged(); - pScMod->SetInEditCommand( FALSE ); + pScMod->SetInEditCommand( sal_False ); if (!pViewData->IsActive()) // dropped to different view? { ScInputHandler* pViewHdl = pScMod->GetInputHdl( pViewData->GetViewShell() ); @@ -2608,7 +2608,7 @@ void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, Window* pWi { SCCOL nCol = pViewData->GetCurX(); SCROW nRow = pViewData->GetCurY(); - Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, TRUE ); + Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, sal_True ); aEditArea.Right() = aEditArea.Left(); aEditArea = pWin->PixelToLogic( aEditArea ); pWin->SetCursorRect( &aEditArea ); @@ -2621,7 +2621,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) // deactivate the inplace client without any problem regarding parent // windows and code on the stack. // For more information, see #126086# and #128122# - USHORT nCmd = rCEvt.GetCommand(); + sal_uInt16 nCmd = rCEvt.GetCommand(); ScTabViewShell* pTabViewSh = pViewData->GetViewShell(); SfxInPlaceClient* pClient = pTabViewSh->GetIPClient(); if ( pClient && @@ -2640,7 +2640,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) nCmd == COMMAND_EXTTEXTINPUT || nCmd == COMMAND_CURSORPOS ) { - BOOL bEditView = pViewData->HasEditView( eWhich ); + sal_Bool bEditView = pViewData->HasEditView( eWhich ); if (!bEditView) { // only if no cell editview is active, look at drawview @@ -2670,7 +2670,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() ); if ( pHdl ) { - pHdl->InputCommand( rCEvt, TRUE ); + pHdl->InputCommand( rCEvt, sal_True ); return; // done } @@ -2733,20 +2733,20 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL ) { - BOOL bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich ); + sal_Bool bDone = pViewData->GetView()->ScrollCommand( rCEvt, eWhich ); if (!bDone) Window::Command(rCEvt); return; } // #i7560# FormulaMode check is below scrolling - scrolling is allowed during formula input - BOOL bDisable = pScMod->IsFormulaMode() || + sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(pViewData->GetSfxDocShell()); if (bDisable) return; if ( nCmd == COMMAND_CONTEXTMENU && !SC_MOD()->GetIsWaterCan() ) { - BOOL bMouse = rCEvt.IsMouseEvent(); + sal_Bool bMouse = rCEvt.IsMouseEvent(); if ( bMouse && nMouseStatus == SC_GM_IGNORE ) return; @@ -2791,12 +2791,12 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) SelectForContextMenu( aPosPixel, nCellX, nCellY ); } - BOOL bDone = FALSE; - BOOL bEdit = pViewData->HasEditView(eWhich); + sal_Bool bDone = sal_False; + sal_Bool bEdit = pViewData->HasEditView(eWhich); if ( !bEdit ) { // Edit-Zelle mit Spelling-Errors ? - if ( bMouse && GetEditUrlOrError( TRUE, aPosPixel ) ) + if ( bMouse && GetEditUrlOrError( sal_True, aPosPixel ) ) { // GetEditUrlOrError hat den Cursor schon bewegt @@ -2842,7 +2842,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) Link aLink = LINK( this, ScGridWindow, PopupSpellingHdl ); pEditView->ExecuteSpellPopup( aMenuPos, &aLink ); - bDone = TRUE; + bDone = sal_True; } } else if ( !bMouse ) @@ -2851,7 +2851,7 @@ void __EXPORT ScGridWindow::Command( const CommandEvent& rCEvt ) SCCOL nCurX = pViewData->GetCurX(); SCROW nCurY = pViewData->GetCurY(); - aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, TRUE ); + aMenuPos = pViewData->GetScrPos( nCurX, nCurY, eWhich, sal_True ); long nSizeXPix; long nSizeYPix; pViewData->GetMergeSizePixel( nCurX, nCurY, nSizeXPix, nSizeYPix ); @@ -2999,24 +2999,24 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, // look for existing selection - BOOL bHitSelected = FALSE; + sal_Bool bHitSelected = sal_False; if ( pDrawView && pDrawView->IsMarkedObjHit( aLogicPos ) ) { // clicked on selected object -> don't change anything - bHitSelected = TRUE; + bHitSelected = sal_True; } else if ( pViewData->GetMarkData().IsCellMarked(nCellX, nCellY) ) { // clicked on selected cell -> don't change anything - bHitSelected = TRUE; + bHitSelected = sal_True; } // select drawing object or move cell cursor if ( !bHitSelected ) { - BOOL bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() ); - BOOL bHitDraw = FALSE; + sal_Bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() ); + sal_Bool bHitDraw = sal_False; if ( pDrawView ) { pDrawView->UnmarkAllObj(); @@ -3031,7 +3031,7 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, pView->Unmark(); pView->SetCursor(nCellX, nCellY); if ( bWasDraw ) - pViewData->GetViewShell()->SetDrawShell( FALSE ); // switch shells + pViewData->GetViewShell()->SetDrawShell( sal_False ); // switch shells } } } @@ -3061,7 +3061,7 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt) { // query for existing note marker before calling ViewShell's keyboard handling // which may remove the marker - BOOL bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() ); + sal_Bool bHadKeyMarker = ( pNoteMarker && pNoteMarker->IsByKeyboard() ); ScTabViewShell* pViewSh = pViewData->GetViewShell(); if (pViewData->GetDocShell()->GetProgress()) @@ -3096,7 +3096,7 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt) if ( bHadKeyMarker ) HideNoteMarker(); // hide when previously visible else - ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), TRUE ); + ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), sal_True ); return; } } @@ -3110,15 +3110,15 @@ void ScGridWindow::StopMarking() if (nButtonDown) { - pViewData->GetMarkData().SetMarking(FALSE); + pViewData->GetMarkData().SetMarking(sal_False); nMouseStatus = SC_GM_IGNORE; } } void ScGridWindow::UpdateInputContext() { - BOOL bReadOnly = pViewData->GetDocShell()->IsReadOnly(); - ULONG nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT ); + sal_Bool bReadOnly = pViewData->GetDocShell()->IsReadOnly(); + sal_uLong nOptions = bReadOnly ? 0 : ( INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT ); // when font from InputContext is used, // it must be taken from the cursor position's cell attributes @@ -3133,11 +3133,11 @@ void ScGridWindow::UpdateInputContext() // sensitiver Bereich (Pixel) #define SCROLL_SENSITIVE 20 -BOOL ScGridWindow::DropScroll( const Point& rMousePos ) +sal_Bool ScGridWindow::DropScroll( const Point& rMousePos ) { /* doch auch auf nicht aktiven Views... if ( !pViewData->IsActive() ) - return FALSE; + return sal_False; */ SCsCOL nDx = 0; SCsROW nDy = 0; @@ -3174,15 +3174,15 @@ BOOL ScGridWindow::DropScroll( const Point& rMousePos ) // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); } - return FALSE; + return sal_False; } -BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange) +sal_Bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange) { // Testet, ob bei eingeschalteten RedLining, // bei einem Drop ein Scenario betroffen ist. - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; SCTAB nTab = aDragRange.aStart.Tab(); SCTAB nTabCount = pDoc->GetTableCount(); @@ -3190,7 +3190,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange) { if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange)) { - bReturn = TRUE; + bReturn = sal_True; } else { @@ -3198,7 +3198,7 @@ BOOL lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDragRange) { if(pDoc->HasScenarioRange(i, aDragRange)) { - bReturn = TRUE; + bReturn = sal_True; break; } } @@ -3229,8 +3229,8 @@ ScRange lcl_MakeDropRange( SCCOL nPosX, SCROW nPosY, SCTAB nTab, const ScRange& //-------------------------------------------------------- -extern BOOL bPasteIsDrop; // viewfun4 -> move to header -extern BOOL bPasteIsMove; // viewfun7 -> move to header +extern sal_Bool bPasteIsDrop; // viewfun4 -> move to header +extern sal_Bool bPasteIsMove; // viewfun7 -> move to header //-------------------------------------------------------- @@ -3240,7 +3240,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) { // if (bDragRect) // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); return rEvt.mnAction; } @@ -3253,7 +3253,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) { if (bDragRect) { - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } return DND_ACTION_NONE; @@ -3270,7 +3270,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) if (bDragRect) // Rechteck loeschen { // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } @@ -3289,7 +3289,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) if ( rData.pCellTransfer->GetDragSourceFlags() & SC_DROP_TABLE ) // whole sheet? { - BOOL bOk = pThisDoc->IsDocEditable(); + sal_Bool bOk = pThisDoc->IsDocEditable(); return bOk ? rEvt.mnAction : 0; // don't draw selection frame } @@ -3327,7 +3327,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) if (bDragRect) { // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } return DND_ACTION_NONE; @@ -3361,14 +3361,14 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) if ( bValid ) { - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName( aDestData.Dimension, bIsDataLayout ); const ScDPSaveDimension* pDim = pDPObj->GetSaveData()->GetExistingDimensionByName( aDimName ); if ( pDim ) { ScRange aOutRange = pDPObj->GetOutRange(); - USHORT nOrient = pDim->GetOrientation(); + sal_uInt16 nOrient = pDim->GetOrientation(); if ( nOrient == sheet::DataPilotFieldOrientation_COLUMN ) { eDragInsertMode = INS_CELLSRIGHT; @@ -3390,7 +3390,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) // no valid sorting in a DataPilot table -> disallow if ( bDragRect ) { - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } return DND_ACTION_NONE; @@ -3420,7 +3420,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) { if ( bDragRect ) { - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } return DND_ACTION_NONE; @@ -3451,7 +3451,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) nDragStartY = nNewDragY; nDragEndX = nDragStartX+nSizeX-1; nDragEndY = nDragStartY+nSizeY-1; - bDragRect = TRUE; + bDragRect = sal_True; meDragInsertMode = eDragInsertMode; // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); @@ -3467,7 +3467,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt ) aRange.Format( aHelpStr, SCA_VALID ); // non-3D Point aPos = Pointer::GetPosPixel(); - USHORT nAlign = QUICKHELP_BOTTOM|QUICKHELP_RIGHT; + sal_uInt16 nAlign = QUICKHELP_BOTTOM|QUICKHELP_RIGHT; Rectangle aRect( aPos, aPos ); Help::ShowQuickHelp(aRect, aHelpStr, nAlign); } @@ -3559,7 +3559,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) case DND_ACTION_MOVE: case DND_ACTION_COPYMOVE: { - BOOL bMove = ( nMyAction == DND_ACTION_MOVE ); + sal_Bool bMove = ( nMyAction == DND_ACTION_MOVE ); if ( IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE ) || IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) || IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) || @@ -3611,7 +3611,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) // Simple check for protection: It's not known here if the drop will result // in cells or drawing objects (some formats can be both) and how many cells // the result will be. But if IsFormatEditable for the drop cell position - // is FALSE (ignores matrix formulas), nothing can be pasted, so the drop + // is sal_False (ignores matrix formulas), nothing can be pasted, so the drop // can already be rejected here. Point aPos = rEvt.maPosPixel; @@ -3636,7 +3636,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) return nRet; } -ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false ) +sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false ) { TransferableDataHelper aDataHelper( xTransfer ); @@ -3654,7 +3654,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT return SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR; } - ULONG nFormatId = 0; + sal_uLong nFormatId = 0; if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) nFormatId = SOT_FORMATSTR_ID_DRAWING; else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) @@ -3663,7 +3663,7 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT { // If it's a Writer object, insert RTF instead of OLE - BOOL bDoRtf = FALSE; + sal_Bool bDoRtf = sal_False; SotStorageStreamRef xStm; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) && @@ -3721,11 +3721,11 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT return nFormatId; } -ULONG lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer ) +sal_uLong lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer ) { TransferableDataHelper aDataHelper( xTransfer ); - ULONG nFormatId = 0; + sal_uLong nFormatId = 0; if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) ) nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE; else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) ) @@ -3754,7 +3754,7 @@ sal_Int8 ScGridWindow::ExecutePrivateDrop( const ExecuteDropEvent& rEvt ) // hide drop marker // if (bDragRect) // pViewData->GetView()->DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, eWhich ); - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); ScModule* pScMod = SC_MOD(); @@ -3775,10 +3775,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos ScDocument* pThisDoc = pViewData->GetDocument(); ScViewFunc* pView = pViewData->GetView(); SCTAB nThisTab = pViewData->GetTabNo(); - USHORT nFlags = pTransObj->GetDragSourceFlags(); + sal_uInt16 nFlags = pTransObj->GetDragSourceFlags(); - BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; - BOOL bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi ); + sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; + sal_Bool bIsMove = ( nDndAction == DND_ACTION_MOVE && !bIsNavi ); // workaround for wrong nDndAction on Windows when pressing solely // the Alt key during drag and drop; @@ -3788,7 +3788,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos bIsMove = ( nDndAction & DND_ACTION_MOVE && !bIsNavi ); } - BOOL bIsLink = ( nDndAction == DND_ACTION_LINK ); + sal_Bool bIsLink = ( nDndAction == DND_ACTION_LINK ); ScRange aSource = pTransObj->GetRange(); @@ -3829,7 +3829,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos bFiltered = ScViewUtil::HasFiltered( aDest, pThisDoc); } - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (!bFiltered && pSourceDoc == pThisDoc) { @@ -3838,9 +3838,9 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos if ( pThisDoc->IsDocEditable() ) { SCTAB nSrcTab = aSource.aStart.Tab(); - pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, TRUE ); // with Undo - pView->SetTabNo( nThisTab, TRUE ); - bDone = TRUE; + pViewData->GetDocShell()->MoveTable( nSrcTab, nThisTab, !bIsMove, sal_True ); // with Undo + pView->SetTabNo( nThisTab, sal_True ); + bDone = sal_True; } } else // move/copy block @@ -3852,10 +3852,10 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos aSource.Format( aRangeName, SCR_ABS_3D, pThisDoc ); SfxStringItem aNameItem( SID_CHART_NAME, aChartName ); SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName ); - USHORT nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE; + sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE; pViewData->GetDispatcher().Execute( nId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aRangeItem, &aNameItem, (void*) NULL ); - bDone = TRUE; + bDone = sal_True; } else if ( pThisDoc->GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) ) { @@ -3865,7 +3865,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos if ( aDestPos != aSource.aStart ) bDone = pViewData->GetView()->DataPilotMove( aSource, aDestPos ); else - bDone = TRUE; // same position: nothing + bDone = sal_True; // same position: nothing } else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() || nSourceTab != nThisTab ) @@ -3873,11 +3873,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bDone = TRUE; + bDone = sal_True; if ( meDragInsertMode != INS_NONE ) { - // call with bApi = TRUE to avoid error messages in drop handler - bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ ); + // call with bApi = sal_True to avoid error messages in drop handler + bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ ); if ( bDone ) { if ( nThisTab == nSourceTab ) @@ -3902,13 +3902,13 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos { if ( bIsLink ) { - // call with bApi = TRUE to avoid error messages in drop handler - bDone = pView->LinkBlock( aSource, aDest.aStart, TRUE /*bApi*/ ); + // call with bApi = sal_True to avoid error messages in drop handler + bDone = pView->LinkBlock( aSource, aDest.aStart, sal_True /*bApi*/ ); } else { - // call with bApi = TRUE to avoid error messages in drop handler - bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, TRUE /*bRecord*/, TRUE /*bPaint*/, TRUE /*bApi*/ ); + // call with bApi = sal_True to avoid error messages in drop handler + bDone = pView->MoveBlockTo( aSource, aDest.aStart, bIsMove, sal_True /*bRecord*/, sal_True /*bPaint*/, sal_True /*bApi*/ ); } } @@ -3927,8 +3927,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos if ( ( eCmd == DEL_CELLSUP && nDestPosX == aSource.aStart.Col() ) || ( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) ) { - // call with bApi = TRUE to avoid error messages in drop handler - bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, TRUE /*bRecord*/, TRUE /*bApi*/ ); + // call with bApi = sal_True to avoid error messages in drop handler + bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, sal_True /*bRecord*/, sal_True /*bApi*/ ); if ( bDone ) { if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() ) @@ -3947,7 +3947,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos if ( bDone ) { - pView->MarkRange( aDest, FALSE, FALSE ); + pView->MarkRange( aDest, sal_False, sal_False ); pView->SetCursor( aDest.aEnd.Col(), aDest.aEnd.Row() ); } @@ -3957,7 +3957,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos Sound::Beep(); // instead of error message in drop handler } else - bDone = TRUE; // nothing to do + bDone = sal_True; // nothing to do } if (bDone) @@ -3995,7 +3995,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos } pView->ImportTables( pSrcShell,nTabSelCount, nTabs, bIsLink, nThisTab ); - bDone = TRUE; + bDone = sal_True; } } else if ( bIsLink ) @@ -4010,11 +4010,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos String aUndo = ScGlobal::GetRscString( STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bDone = TRUE; + bDone = sal_True; if ( meDragInsertMode != INS_NONE ) { - // call with bApi = TRUE to avoid error messages in drop handler - bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ ); + // call with bApi = sal_True to avoid error messages in drop handler + bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ ); if ( bDone ) { pDocSh->UpdateOle( pViewData ); @@ -4055,7 +4055,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos pView->EnterMatrix( aFormula ); - pView->MarkRange( aDest, FALSE, FALSE ); + pView->MarkRange( aDest, sal_False, sal_False ); pView->SetCursor( aDest.aEnd.Col(), aDest.aEnd.Row() ); } @@ -4070,11 +4070,11 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); - bDone = TRUE; + bDone = sal_True; if ( meDragInsertMode != INS_NONE ) { - // call with bApi = TRUE to avoid error messages in drop handler - bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, TRUE /*bRecord*/, TRUE /*bApi*/, TRUE /*bPartOfPaste*/ ); + // call with bApi = sal_True to avoid error messages in drop handler + bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, sal_True /*bRecord*/, sal_True /*bApi*/, sal_True /*bPartOfPaste*/ ); if ( bDone ) { pDocSh->UpdateOle( pViewData ); @@ -4089,7 +4089,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos bDone = pView->PasteFromClip( IDF_ALL, pTransObj->GetDocument() ); // clip-doc if ( bDone ) { - pView->MarkRange( aDest, FALSE, FALSE ); + pView->MarkRange( aDest, sal_False, sal_False ); pView->SetCursor( aDest.aEnd.Col(), aDest.aEnd.Row() ); } } @@ -4120,14 +4120,14 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) { // try to insert a link - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; String aThisName; ScDocShell* pDocSh = pViewData->GetDocShell(); if (pDocSh && pDocSh->HasName()) aThisName = pDocSh->GetMedium()->GetName(); if ( rData.aLinkDoc == aThisName ) // error - no link within a document - bOk = FALSE; + bOk = sal_False; else { ScViewFunc* pView = pViewData->GetView(); @@ -4139,7 +4139,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); - pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE ); + pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, sal_False, sal_False ); pView->InsertAreaLink( rData.aLinkDoc, EMPTY_STRING, EMPTY_STRING, rData.aLinkArea, 0 ); @@ -4147,7 +4147,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) else { DBG_ERROR("drop with link: no sheet nor area"); - bOk = FALSE; + bOk = sal_False; } } @@ -4158,10 +4158,10 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) if (rData.pDrawTransfer) { - USHORT nFlags = rData.pDrawTransfer->GetDragSourceFlags(); + sal_uInt16 nFlags = rData.pDrawTransfer->GetDragSourceFlags(); - BOOL bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; - BOOL bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi ); + sal_Bool bIsNavi = ( nFlags & SC_DROP_NAVIGATOR ) != 0; + sal_Bool bIsMove = ( rEvt.mnAction == DND_ACTION_MOVE && !bIsNavi ); bPasteIsMove = bIsMove; @@ -4169,7 +4169,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) if (bPasteIsMove) rData.pDrawTransfer->SetDragWasInternal(); - bPasteIsMove = FALSE; + bPasteIsMove = sal_False; return rEvt.mnAction; } @@ -4192,7 +4192,7 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) } } - BOOL bIsLink = ( rEvt.mnAction == DND_ACTION_LINK ); + sal_Bool bIsLink = ( rEvt.mnAction == DND_ACTION_LINK ); ScDocument* pThisDoc = pViewData->GetDocument(); SdrObject* pHitObj = pThisDoc->GetObjectAtPoint( pViewData->GetTabNo(), PixelToLogic(aPos) ); @@ -4200,23 +4200,23 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) { // dropped on drawing object // PasteOnDrawObject checks for valid formats - if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, TRUE ) ) + if ( pViewData->GetView()->PasteOnDrawObject( rEvt.maDropEvent.Transferable, pHitObj, sal_True ) ) return rEvt.mnAction; } - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; - ULONG nFormatId = bIsLink ? + sal_uLong nFormatId = bIsLink ? lcl_GetDropLinkId( rEvt.maDropEvent.Transferable ) : lcl_GetDropFormatId( rEvt.maDropEvent.Transferable ); if ( nFormatId ) { - pScMod->SetInExecuteDrop( TRUE ); // #i28468# prevent error messages from PasteDataFormat - bPasteIsDrop = TRUE; + pScMod->SetInExecuteDrop( sal_True ); // #i28468# prevent error messages from PasteDataFormat + bPasteIsDrop = sal_True; bDone = pViewData->GetView()->PasteDataFormat( nFormatId, rEvt.maDropEvent.Transferable, nPosX, nPosY, &aLogicPos, bIsLink ); - bPasteIsDrop = FALSE; - pScMod->SetInExecuteDrop( FALSE ); + bPasteIsDrop = sal_False; + pScMod->SetInExecuteDrop( sal_False ); } sal_Int8 nRet = bDone ? rEvt.mnAction : DND_ACTION_NONE; @@ -4255,7 +4255,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel ) // #96821# bSameDocClipboard argument for PasteDraw is needed // because only DragData is checked directly inside PasteDraw - pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), FALSE, + pViewData->GetView()->PasteDraw( aLogicPos, pDrawTransfer->GetModel(), sal_False, pDrawTransfer->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() ); } } @@ -4268,12 +4268,12 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel ) uno::Reference<datatransfer::XTransferable> xTransferable = aDataHelper.GetTransferable(); if ( xTransferable.is() ) { - ULONG nFormatId = lcl_GetDropFormatId( xTransferable, true ); + sal_uLong nFormatId = lcl_GetDropFormatId( xTransferable, true ); if ( nFormatId ) { - bPasteIsDrop = TRUE; + bPasteIsDrop = sal_True; pViewData->GetView()->PasteDataFormat( nFormatId, xTransferable, nPosX, nPosY, &aLogicPos ); - bPasteIsDrop = FALSE; + bPasteIsDrop = sal_False; } } } @@ -4294,10 +4294,10 @@ void ScGridWindow::UpdateEditViewPos() // hide EditView? - BOOL bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) ); + sal_Bool bHide = ( nEndCol<pViewData->GetPosX(eHWhich) || nEndRow<pViewData->GetPosY(eVWhich) ); if ( SC_MOD()->IsFormulaMode() ) if ( pViewData->GetTabNo() != pViewData->GetRefTabNo() ) - bHide = TRUE; + bHide = sal_True; if (bHide) { @@ -4311,8 +4311,8 @@ void ScGridWindow::UpdateEditViewPos() } else { - // bForceToTop = TRUE for editing - Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, TRUE ); + // bForceToTop = sal_True for editing + Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, sal_True ); Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() ); Rectangle aRect = pView->GetOutputArea(); @@ -4328,8 +4328,8 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY ) ClickExtern(); HideNoteMarker(); - bIsInScroll = TRUE; - //BOOL bXor=DrawBeforeScroll(); + bIsInScroll = sal_True; + //sal_Bool bXor=DrawBeforeScroll(); SetMapMode(MAP_PIXEL); Scroll( nDifX, nDifY, SCROLL_CHILDREN ); @@ -4338,7 +4338,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY ) UpdateEditViewPos(); DrawAfterScroll(); //bXor); - bIsInScroll = FALSE; + bIsInScroll = sal_False; } // Formeln neu zeichnen ------------------------------------------------- @@ -4353,7 +4353,7 @@ void ScGridWindow::UpdateFormulas() // nicht anfangen, verschachtelt zu painten // (dann wuerde zumindest der MapMode nicht mehr stimmen) - bNeedsRepaint = TRUE; // -> am Ende vom Paint nochmal Invalidate auf alles + bNeedsRepaint = sal_True; // -> am Ende vom Paint nochmal Invalidate auf alles aRepaintPixel = Rectangle(); // alles return; } @@ -4380,7 +4380,7 @@ void ScGridWindow::UpdateFormulas() Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nMirrorWidth = GetSizePixel().Width(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // unused variable long nLayoutSign = bLayoutRTL ? -1 : 1; if ( bLayoutRTL ) { @@ -4396,7 +4396,7 @@ void ScGridWindow::UpdateFormulas() double nPPTY = pViewData->GetPPTY(); ScTableInfo aTabInfo; - pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, FALSE, FALSE ); + pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, sal_False, sal_False ); Fraction aZoomX = pViewData->GetZoomX(); Fraction aZoomY = pViewData->GetZoomY(); @@ -4416,7 +4416,7 @@ void ScGridWindow::UpdateFormulas() CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here } -void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange) +void ScGridWindow::UpdateAutoFillMark(sal_Bool bMarked, const ScRange& rMarkRange) { if ( bMarked != bAutoMarkVisible || ( bMarked && rMarkRange.aEnd != aAutoMarkPos ) ) { @@ -4430,9 +4430,9 @@ void ScGridWindow::UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange) } } -void ScGridWindow::UpdateListValPos( BOOL bVisible, const ScAddress& rPos ) +void ScGridWindow::UpdateListValPos( sal_Bool bVisible, const ScAddress& rPos ) { - BOOL bOldButton = bListValButton; + sal_Bool bOldButton = bListValButton; ScAddress aOldPos = aListValPos; bListValButton = bVisible; @@ -4489,7 +4489,7 @@ void __EXPORT ScGridWindow::GetFocus() { ScTabViewShell* pViewShell = pViewData->GetViewShell(); pViewShell->GotFocus(); - pViewShell->SetFormShellAtTop( FALSE ); // focus in GridWindow -> FormShell no longer on top + pViewShell->SetFormShellAtTop( sal_False ); // focus in GridWindow -> FormShell no longer on top if (pViewShell->HasAccessibilityObjects()) pViewShell->BroadcastAccessibility(ScAccGridWinFocusGotHint(eWhich, GetAccessible())); @@ -4522,10 +4522,10 @@ Point ScGridWindow::GetMousePosPixel() const { return aCurMousePos; } //------------------------------------------------------------------------ -BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner, - USHORT* pIndex, SCsCOL* pAddX, SCsROW* pAddY ) +sal_Bool ScGridWindow::HitRangeFinder( const Point& rMouse, sal_Bool& rCorner, + sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() ); if (pHdl) { @@ -4535,7 +4535,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner, { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; SCsCOL nPosX; @@ -4546,25 +4546,25 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner, // Point aNext = pViewData->GetScrPos( nPosX+1, nPosY+1, eWhich ); - Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, TRUE ); + Point aNext = pViewData->GetScrPos( nPosX, nPosY, eWhich, sal_True ); long nSizeXPix; long nSizeYPix; pViewData->GetMergeSizePixel( nPosX, nPosY, nSizeXPix, nSizeYPix ); aNext.X() += nSizeXPix * nLayoutSign; aNext.Y() += nSizeYPix; - BOOL bCornerHor; + sal_Bool bCornerHor; if ( bLayoutRTL ) bCornerHor = ( rMouse.X() >= aNext.X() && rMouse.X() <= aNext.X() + 8 ); else bCornerHor = ( rMouse.X() >= aNext.X() - 8 && rMouse.X() <= aNext.X() ); - BOOL bCellCorner = ( bCornerHor && + sal_Bool bCellCorner = ( bCornerHor && rMouse.Y() >= aNext.Y() - 8 && rMouse.Y() <= aNext.Y() ); // corner is hit only if the mouse is within the cell - USHORT nCount = (USHORT)pRangeFinder->Count(); - for (USHORT i=nCount; i;) + sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count(); + for (sal_uInt16 i=nCount; i;) { // rueckwaerts suchen, damit der zuletzt gepaintete Rahmen gefunden wird --i; @@ -4574,7 +4574,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner, if (pIndex) *pIndex = i; if (pAddX) *pAddX = nPosX - pData->aRef.aStart.Col(); if (pAddY) *pAddY = nPosY - pData->aRef.aStart.Row(); - bFound = TRUE; + bFound = sal_True; rCorner = ( bCellCorner && aAddr == pData->aRef.aEnd ); break; } @@ -4590,7 +4590,7 @@ BOOL ScGridWindow::HitRangeFinder( const Point& rMouse, BOOL& rCorner, #define SCE_RIGHT 8 #define SCE_ALL 15 -void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges ) +void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, sal_uInt16 nEdges ) { // der Range ist immer richtigherum @@ -4600,19 +4600,19 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges SCCOL nCol2 = rRange.aEnd.Col(); SCROW nRow2 = rRange.aEnd.Row(); SCTAB nTab2 = rRange.aEnd.Tab(); - BOOL bHiddenEdge = FALSE; + sal_Bool bHiddenEdge = sal_False; SCROW nTmp; ScDocument* pDoc = pDocSh->GetDocument(); while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab1) ) { --nCol1; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab1) ) { ++nCol2; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } nTmp = pDoc->FirstVisibleRow(0, nRow1, nTab1); if (!ValidRow(nTmp)) @@ -4620,7 +4620,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges if (nTmp < nRow1) { nRow1 = nTmp; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab1); if (!ValidRow(nTmp)) @@ -4628,7 +4628,7 @@ void lcl_PaintOneRange( ScDocShell* pDocSh, const ScRange& rRange, USHORT nEdges if (nTmp > nRow2) { nRow2 = nTmp; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } if ( nCol2 > nCol1 + 1 && nRow2 > nRow1 + 1 && !bHiddenEdge ) @@ -4724,7 +4724,7 @@ void lcl_PaintRefChanged( ScDocShell* pDocSh, const ScRange& rOldUn, const ScRan } } -void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp ) +void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, sal_Bool bUp ) { ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() ); if (!pHdl) @@ -4745,7 +4745,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp ) // Scrolling - BOOL bTimer = FALSE; + sal_Bool bTimer = sal_False; Point aPos = rMEvt.GetPosPixel(); SCsCOL nDx = 0; SCsROW nDy = 0; @@ -4760,7 +4760,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp ) { if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) ); - bTimer = TRUE; + bTimer = sal_True; } // Umschalten bei Fixierung (damit Scrolling funktioniert) @@ -4852,13 +4852,13 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, BOOL bUp ) //------------------------------------------------------------------------ -BOOL ScGridWindow::GetEditUrl( const Point& rPos, +sal_Bool ScGridWindow::GetEditUrl( const Point& rPos, String* pName, String* pUrl, String* pTarget ) { - return GetEditUrlOrError( FALSE, rPos, pName, pUrl, pTarget ); + return GetEditUrlOrError( sal_False, rPos, pName, pUrl, pTarget ); } -BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos, +sal_Bool ScGridWindow::GetEditUrlOrError( sal_Bool bSpellErr, const Point& rPos, String* pName, String* pUrl, String* pTarget ) { //! nPosX/Y mit uebergeben? @@ -4871,24 +4871,24 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos, ScDocument* pDoc = pDocSh->GetDocument(); ScBaseCell* pCell = NULL; - BOOL bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell ); + sal_Bool bFound = lcl_GetHyperlinkCell( pDoc, nPosX, nPosY, nTab, pCell ); if( !bFound ) - return FALSE; + return sal_False; ScHideTextCursor aHideCursor( pViewData, eWhich ); // before GetEditArea (MapMode is changed) const ScPatternAttr* pPattern = pDoc->GetPattern( nPosX, nPosY, nTab ); - // bForceToTop = FALSE, use the cell's real position - Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE ); + // bForceToTop = sal_False, use the cell's real position + Rectangle aEditRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, sal_False ); if (rPos.Y() < aEditRect.Top()) - return FALSE; + return sal_False; // vertikal kann (noch) nicht angeklickt werden: if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD) - return FALSE; + return sal_False; - BOOL bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() || + sal_Bool bBreak = ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue() || ((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern-> GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK); SvxCellHorJustify eHorJust = (SvxCellHorJustify)((SvxHorJustifyItem&)pPattern-> @@ -4989,11 +4989,11 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos, Point aLogicClick = PixelToLogic(rPos,aEditMode); if ( aLogicEdit.IsInside(aLogicClick) ) { -// aEngine.SetUpdateMode(FALSE); +// aEngine.SetUpdateMode(sal_False); EditView aTempView( &aEngine, this ); aTempView.SetOutputArea( aLogicEdit ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; MapMode aOld = GetMapMode(); SetMapMode(aEditMode); // kein return mehr @@ -5022,7 +5022,7 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos, if (pTarget) *pTarget = pURLField->GetTargetFrame(); } - bRet = TRUE; + bRet = sal_True; } } } @@ -5033,22 +5033,22 @@ BOOL ScGridWindow::GetEditUrlOrError( BOOL bSpellErr, const Point& rPos, return bRet; } - return FALSE; + return sal_False; } -BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange ) +sal_Bool ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); SCTAB nTabCount = pDoc->GetTableCount(); if ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ) { - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Size aButSize = pViewData->GetScenButSize(); long nBWidth = aButSize.Width(); if (!nBWidth) - return FALSE; // noch kein Button gezeichnet -> da ist auch keiner + return sal_False; // noch kein Button gezeichnet -> da ist auch keiner long nBHeight = aButSize.Height(); long nHSpace = (long)( SC_SCENARIO_HSPACE * pViewData->GetPPTX() ); @@ -5056,31 +5056,31 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang ScMarkData aMarks; for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++) - pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME ); + pDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME ); ScRangeList aRanges; - aMarks.FillRangeListWithMarks( &aRanges, FALSE ); + aMarks.FillRangeListWithMarks( &aRanges, sal_False ); - ULONG nRangeCount = aRanges.Count(); - for (ULONG j=0; j<nRangeCount; j++) + sal_uLong nRangeCount = aRanges.Count(); + for (sal_uLong j=0; j<nRangeCount; j++) { ScRange aRange = *aRanges.GetObject(j); // Szenario-Rahmen immer dann auf zusammengefasste Zellen erweitern, wenn // dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet werden pDoc->ExtendTotalMerge( aRange ); - BOOL bTextBelow = ( aRange.aStart.Row() == 0 ); + sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 ); Point aButtonPos; if ( bTextBelow ) { aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, - eWhich, TRUE ); + eWhich, sal_True ); } else { aButtonPos = pViewData->GetScrPos( aRange.aEnd.Col()+1, aRange.aStart.Row(), - eWhich, TRUE ); + eWhich, sal_True ); aButtonPos.Y() -= nBHeight; } if ( bLayoutRTL ) @@ -5092,12 +5092,12 @@ BOOL ScGridWindow::HasScenarioButton( const Point& rPosPixel, ScRange& rScenRang if ( aButRect.IsInside( rPosPixel ) ) { rScenRange = aRange; - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } // #114409# @@ -5183,11 +5183,11 @@ void ScGridWindow::UpdateCursorOverlay() ScDocument* pDoc = pViewData->GetDocument(); const ScPatternAttr* pPattern = pDoc->GetPattern(nX,nY,nTab); const ScMergeFlagAttr& rMergeFlag = (const ScMergeFlagAttr&) pPattern->GetItem(ATTR_MERGE_FLAG); - BOOL bOverlapped = rMergeFlag.IsOverlapped(); + sal_Bool bOverlapped = rMergeFlag.IsOverlapped(); // left or above of the screen? - BOOL bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); + sal_Bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); if (!bVis) { SCCOL nEndX = nX; @@ -5202,12 +5202,12 @@ void ScGridWindow::UpdateCursorOverlay() if ( bVis && !bOverlapped && !pViewData->HasEditView(eWhich) && pViewData->IsActive() ) { - Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE ); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // completely right of/below the screen? // (test with logical start position in aScrPos) - BOOL bMaybeVisible; + sal_Bool bMaybeVisible; if ( bLayoutRTL ) bMaybeVisible = ( aScrPos.X() >= -2 && aScrPos.Y() >= -2 ); else @@ -5224,7 +5224,7 @@ void ScGridWindow::UpdateCursorOverlay() if ( bLayoutRTL ) aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring - BOOL bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX || + sal_Bool bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX || pViewData->GetVSplitMode() == SC_SPLIT_FIX ); if ( pViewData->GetActivePart()==eWhich || bFix ) { @@ -5381,9 +5381,9 @@ void ScGridWindow::UpdateAutoFillOverlay() SCTAB nTab = pViewData->GetTabNo(); ScDocument* pDoc = pViewData->GetDocument(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); - Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE ); + Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True ); long nSizeXPix; long nSizeYPix; pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix ); @@ -5470,7 +5470,7 @@ void ScGridWindow::UpdateDragRectOverlay() double nPPTY = pViewData->GetPPTY(); SCCOLROW i; - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if (ValidCol(nX2) && nX2>=nX1) diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index ef787e049..ebaf62e9f 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -85,7 +85,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW if (!pDPObj) return DataPilotFieldOrientation_HIDDEN; - USHORT nOrient = DataPilotFieldOrientation_HIDDEN; + sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN; // Check for page field first. if (nCol > 0) @@ -94,7 +94,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW long nField = pDPObj->GetHeaderDim( ScAddress( nCol-1, nRow, nTab ), nOrient ); if ( nField >= 0 && nOrient == DataPilotFieldOrientation_PAGE ) { - BOOL bIsDataLayout = FALSE; + sal_Bool bIsDataLayout = sal_False; String aFieldName = pDPObj->GetDimName( nField, bIsDataLayout ); if ( aFieldName.Len() && !bIsDataLayout ) return DataPilotFieldOrientation_PAGE; @@ -107,7 +107,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW long nField = pDPObj->GetHeaderDim(ScAddress(nCol, nRow, nTab), nOrient); if (nField >= 0 && (nOrient == DataPilotFieldOrientation_COLUMN || nOrient == DataPilotFieldOrientation_ROW) ) { - BOOL bIsDataLayout = FALSE; + sal_Bool bIsDataLayout = sal_False; String aFieldName = pDPObj->GetDimName(nField, bIsDataLayout); if (aFieldName.Len() && !bIsDataLayout) return static_cast<DataPilotFieldOrientation>(nOrient); @@ -117,14 +117,14 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW } // private method for mouse button handling -BOOL ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow ) +sal_Bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow ) { if (GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE) { LaunchPageFieldMenu( nCol, nRow ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ) @@ -135,7 +135,7 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& Point aDiffPix = rMEvt.GetPosPixel(); aDiffPix -= aScrPos; - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); if ( bLayoutRTL ) aDiffPix.X() = -aDiffPix.X(); @@ -180,12 +180,12 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt if (pDPObj) { - USHORT nOrient = sheet::DataPilotFieldOrientation_HIDDEN; + sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN; ScAddress aPos( nCol, nRow, nTab ); long nField = pDPObj->GetHeaderDim( aPos, nOrient ); if ( nField >= 0 ) { - bDPMouse = TRUE; + bDPMouse = sal_True; nDPField = nField; pDragDPObj = pDPObj; @@ -197,7 +197,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt return; } - DPTestMouse( rMEvt, TRUE ); + DPTestMouse( rMEvt, sal_True ); StartTracking(); } else if ( pDPObj->IsFilterButton(aPos) ) @@ -240,7 +240,7 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt ScDPObject aNewObj( *pDPObj ); aNewObj.SetSheetDesc( aNewDesc ); ScDBDocFunc aFunc( *pViewData->GetDocShell() ); - aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, sal_False ); pViewData->GetView()->CursorPosChanged(); // shells may be switched } delete pDlg; @@ -259,14 +259,14 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt // Data Pilot interaction // -void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ) +void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, sal_Bool bMove ) { DBG_ASSERT(pDragDPObj, "pDragDPObj missing"); // scroll window if at edges //! move this to separate method - BOOL bTimer = FALSE; + sal_Bool bTimer = sal_False; Point aPixel = rMEvt.GetPosPixel(); SCsCOL nDx = 0; @@ -282,14 +282,14 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ) nDy = 1; if ( nDx != 0 || nDy != 0 ) { - UpdateDragRect( FALSE, Rectangle() ); + UpdateDragRect( sal_False, Rectangle() ); if ( nDx != 0) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) ); - bTimer = TRUE; + bTimer = sal_True; } // --- @@ -297,20 +297,20 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ) SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), eWhich, nPosX, nPosY ); - BOOL bMouseLeft; - BOOL bMouseTop; + sal_Bool bMouseLeft; + sal_Bool bMouseTop; pViewData->GetMouseQuadrant( aPixel, eWhich, nPosX, nPosY, bMouseLeft, bMouseTop ); ScAddress aPos( nPosX, nPosY, pViewData->GetTabNo() ); Rectangle aPosRect; - USHORT nOrient; + sal_uInt16 nOrient; long nDimPos; - BOOL bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField, + sal_Bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField, aPosRect, nOrient, nDimPos ); UpdateDragRect( bHasRange && bMove, aPosRect ); - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; sal_Int32 nDimFlags = 0; String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout, &nDimFlags ); bool bAllowed = !bHasRange || ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ); @@ -359,7 +359,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ) aNewObj.SetSaveData( aSaveData ); ScDBDocFunc aFunc( *pViewData->GetDocShell() ); // when dragging fields, allow re-positioning (bAllowMove) - aFunc.DataPilotUpdate( pDragDPObj, &aNewObj, TRUE, FALSE, TRUE ); + aFunc.DataPilotUpdate( pDragDPObj, &aNewObj, sal_True, sal_False, sal_True ); pViewData->GetView()->CursorPosChanged(); // shells may be switched } } @@ -372,7 +372,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ) bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj) { - BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); // Get the geometry of the cell. Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich); @@ -464,7 +464,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu( pDPObj->FillLabelData(pDPData->maDPParam); pDPData->mpDPObj = pDPObj; - USHORT nOrient; + sal_uInt16 nOrient; pDPData->mnDim = pDPObj->GetHeaderDim(rPos, nOrient); if (pDPData->maDPParam.maLabelArray.size() <= static_cast<size_t>(pDPData->mnDim)) @@ -524,7 +524,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu( } } - BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); Rectangle aCellRect(rScrPos, rScrSize); const Size& rPopupSize = mpDPFieldPopup->getWindowSize(); @@ -561,7 +561,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() aNewDPObj.BuildAllDimensionMembers(); ScDPSaveData* pSaveData = aNewDPObj.GetSaveData(); - BOOL bIsDataLayout; + sal_Bool bIsDataLayout; String aDimName = pDPObj->GetDimName(pDPData->mnDim, bIsDataLayout); ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(aDimName); if (!pDim) @@ -599,21 +599,21 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() void ScGridWindow::DPMouseMove( const MouseEvent& rMEvt ) { - DPTestMouse( rMEvt, TRUE ); + DPTestMouse( rMEvt, sal_True ); } void ScGridWindow::DPMouseButtonUp( const MouseEvent& rMEvt ) { - bDPMouse = FALSE; + bDPMouse = sal_False; ReleaseMouse(); - DPTestMouse( rMEvt, FALSE ); + DPTestMouse( rMEvt, sal_False ); SetPointer( Pointer( POINTER_ARROW ) ); } // ----------------------------------------------------------------------- -void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect ) +void ScGridWindow::UpdateDragRect( sal_Bool bShowRange, const Rectangle& rPosRect ) { SCCOL nStartX = ( rPosRect.Left() >= 0 ) ? static_cast<SCCOL>(rPosRect.Left()) : SCCOL_MAX; SCROW nStartY = ( rPosRect.Top() >= 0 ) ? static_cast<SCROW>(rPosRect.Top()) : SCROW_MAX; @@ -627,18 +627,18 @@ void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect ) } // if ( bDragRect ) - // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE ); + // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, sal_False ); if ( bShowRange ) { nDragStartX = nStartX; nDragStartY = nStartY; nDragEndX = nEndX; nDragEndY = nEndY; - bDragRect = TRUE; - // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, FALSE ); + bDragRect = sal_True; + // DrawDragRect( nDragStartX, nDragStartY, nDragEndX, nDragEndY, sal_False ); } else - bDragRect = FALSE; + bDragRect = sal_False; UpdateDragRectOverlay(); } @@ -647,10 +647,10 @@ void ScGridWindow::UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect ) // Page-Break-Modus -USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, +sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, SCCOLROW* pBreak, SCCOLROW* pPrev ) { - USHORT nFound = SC_PD_NONE; // 0 + sal_uInt16 nFound = SC_PD_NONE; // 0 ScRange aSource; SCCOLROW nBreak = 0; SCCOLROW nPrev = 0; @@ -658,8 +658,8 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, ScPageBreakData* pPageData = pViewData->GetView()->GetPageBreakData(); if ( pPageData ) { - BOOL bHori = FALSE; - BOOL bVert = FALSE; + sal_Bool bHori = sal_False; + sal_Bool bVert = sal_False; SCCOL nHitX = 0; SCROW nHitY = 0; @@ -674,38 +674,38 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, // Horizontal mehr Toleranz als vertikal, weil mehr Platz ist if ( nMouseX <= aTL.X() + 4 ) { - bHori = TRUE; + bHori = sal_True; nHitX = nPosX; } else if ( nMouseX >= aBR.X() - 6 ) { - bHori = TRUE; + bHori = sal_True; nHitX = nPosX+1; // linker Rand der naechsten Zelle } if ( nMouseY <= aTL.Y() + 2 ) { - bVert = TRUE; + bVert = sal_True; nHitY = nPosY; } else if ( nMouseY >= aBR.Y() - 4 ) { - bVert = TRUE; + bVert = sal_True; nHitY = nPosY+1; // oberer Rand der naechsten Zelle } if ( bHori || bVert ) { - USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() ); - for (USHORT nPos=0; nPos<nCount && !nFound; nPos++) + sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() ); + for (sal_uInt16 nPos=0; nPos<nCount && !nFound; nPos++) { ScPrintRangeData& rData = pPageData->GetData(nPos); ScRange aRange = rData.GetPrintRange(); - BOOL bLHit = ( bHori && nHitX == aRange.aStart.Col() ); - BOOL bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 ); - BOOL bTHit = ( bVert && nHitY == aRange.aStart.Row() ); - BOOL bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 ); - BOOL bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() ); - BOOL bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() ); + sal_Bool bLHit = ( bHori && nHitX == aRange.aStart.Col() ); + sal_Bool bRHit = ( bHori && nHitX == aRange.aEnd.Col() + 1 ); + sal_Bool bTHit = ( bVert && nHitY == aRange.aStart.Row() ); + sal_Bool bBHit = ( bVert && nHitY == aRange.aEnd.Row() + 1 ); + sal_Bool bInsideH = ( nPosX >= aRange.aStart.Col() && nPosX <= aRange.aEnd.Col() ); + sal_Bool bInsideV = ( nPosY >= aRange.aStart.Row() && nPosY <= aRange.aEnd.Row() ); if ( bLHit ) { @@ -779,14 +779,14 @@ USHORT ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource, return nFound; } -void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) +void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, sal_Bool bUp ) { //! Scrolling und Umschalten mit RFMouseMove zusammenfassen ! //! (Weginvertieren vor dem Scrolling ist anders) // Scrolling - BOOL bTimer = FALSE; + sal_Bool bTimer = sal_False; Point aPos = rMEvt.GetPosPixel(); SCsCOL nDx = 0; SCsROW nDy = 0; @@ -802,14 +802,14 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) if ( bPagebreakDrawn ) // weginvertieren { // DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(), - // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE ); - bPagebreakDrawn = FALSE; + // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False ); + bPagebreakDrawn = sal_False; UpdateDragRectOverlay(); } if ( nDx != 0 ) pViewData->GetView()->ScrollX( nDx, WhichH(eWhich) ); if ( nDy != 0 ) pViewData->GetView()->ScrollY( nDy, WhichV(eWhich) ); - bTimer = TRUE; + bTimer = sal_True; } // Umschalten bei Fixierung (damit Scrolling funktioniert) @@ -841,14 +841,14 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); - BOOL bLeft, bTop; + sal_Bool bLeft, bTop; pViewData->GetMouseQuadrant( aPos, eWhich, nPosX, nPosY, bLeft, bTop ); if ( !bLeft ) ++nPosX; if ( !bTop ) ++nPosY; - BOOL bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V ); - BOOL bHide = FALSE; - BOOL bToEnd = FALSE; + sal_Bool bBreak = ( nPagebreakMouse == SC_PD_BREAK_H || nPagebreakMouse == SC_PD_BREAK_V ); + sal_Bool bHide = sal_False; + sal_Bool bToEnd = sal_False; ScRange aDrawRange = aPagebreakSource; if ( bBreak ) { @@ -862,7 +862,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) aDrawRange.aEnd.SetCol( nPosX - 1 ); } else - bHide = TRUE; + bHide = sal_True; } else { @@ -874,7 +874,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) aDrawRange.aEnd.SetRow( nPosY - 1 ); } else - bHide = TRUE; + bHide = sal_True; } } else @@ -888,18 +888,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) if ( nPosX > 0 ) aDrawRange.aEnd.SetCol( nPosX-1 ); else - bHide = TRUE; + bHide = sal_True; } if ( nPagebreakMouse & SC_PD_RANGE_B ) { if ( nPosY > 0 ) aDrawRange.aEnd.SetRow( nPosY-1 ); else - bHide = TRUE; + bHide = sal_True; } if ( aDrawRange.aStart.Col() > aDrawRange.aEnd.Col() || aDrawRange.aStart.Row() > aDrawRange.aEnd.Row() ) - bHide = TRUE; + bHide = sal_True; } if ( !bPagebreakDrawn || bUp || aDrawRange != aPagebreakDrag ) @@ -910,16 +910,16 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) { // weginvertieren // DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(), - // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE ); - bPagebreakDrawn = FALSE; + // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False ); + bPagebreakDrawn = sal_False; } aPagebreakDrag = aDrawRange; if ( !bUp && !bHide ) { // hininvertieren // DrawDragRect( aPagebreakDrag.aStart.Col(), aPagebreakDrag.aStart.Row(), - // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), FALSE ); - bPagebreakDrawn = TRUE; + // aPagebreakDrag.aEnd.Col(), aPagebreakDrag.aEnd.Row(), sal_False ); + bPagebreakDrawn = sal_True; } UpdateDragRectOverlay(); } @@ -932,11 +932,11 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); if ( bBreak ) { - BOOL bColumn = ( nPagebreakMouse == SC_PD_BREAK_H ); + sal_Bool bColumn = ( nPagebreakMouse == SC_PD_BREAK_H ); SCCOLROW nNew = bColumn ? static_cast<SCCOLROW>(nPosX) : static_cast<SCCOLROW>(nPosY); if ( nNew != nPagebreakBreak ) { @@ -946,18 +946,18 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); } - BOOL bGrow = !bHide && nNew > nPagebreakBreak; + sal_Bool bGrow = !bHide && nNew > nPagebreakBreak; if ( bColumn ) { if (pDoc->HasColBreak(static_cast<SCCOL>(nPagebreakBreak), nTab) & BREAK_MANUAL) { ScAddress aOldAddr( static_cast<SCCOL>(nPagebreakBreak), nPosY, nTab ); - pViewFunc->DeletePageBreak( TRUE, TRUE, &aOldAddr, FALSE ); + pViewFunc->DeletePageBreak( sal_True, sal_True, &aOldAddr, sal_False ); } if ( !bHide && !bToEnd ) // am Ende nicht { ScAddress aNewAddr( static_cast<SCCOL>(nNew), nPosY, nTab ); - pViewFunc->InsertPageBreak( TRUE, TRUE, &aNewAddr, FALSE ); + pViewFunc->InsertPageBreak( sal_True, sal_True, &aNewAddr, sal_False ); } if ( bGrow ) { @@ -966,12 +966,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) if ( static_cast<SCCOL>(nPagebreakPrev) > aPagebreakSource.aStart.Col() && !bManualBreak ) { ScAddress aPrev( static_cast<SCCOL>(nPagebreakPrev), nPosY, nTab ); - pViewFunc->InsertPageBreak( TRUE, TRUE, &aPrev, FALSE ); + pViewFunc->InsertPageBreak( sal_True, sal_True, &aPrev, sal_False ); } if (!pDocSh->AdjustPrintZoom( ScRange( static_cast<SCCOL>(nPagebreakPrev),0,nTab, static_cast<SCCOL>(nNew-1),0,nTab ) )) - bGrow = FALSE; + bGrow = sal_False; } } else @@ -979,12 +979,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) if (pDoc->HasRowBreak(nPagebreakBreak, nTab) & BREAK_MANUAL) { ScAddress aOldAddr( nPosX, nPagebreakBreak, nTab ); - pViewFunc->DeletePageBreak( FALSE, TRUE, &aOldAddr, FALSE ); + pViewFunc->DeletePageBreak( sal_False, sal_True, &aOldAddr, sal_False ); } if ( !bHide && !bToEnd ) // am Ende nicht { ScAddress aNewAddr( nPosX, nNew, nTab ); - pViewFunc->InsertPageBreak( FALSE, TRUE, &aNewAddr, FALSE ); + pViewFunc->InsertPageBreak( sal_False, sal_True, &aNewAddr, sal_False ); } if ( bGrow ) { @@ -993,12 +993,12 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) if ( nPagebreakPrev > aPagebreakSource.aStart.Row() && !bManualBreak ) { ScAddress aPrev( nPosX, nPagebreakPrev, nTab ); - pViewFunc->InsertPageBreak( FALSE, TRUE, &aPrev, FALSE ); + pViewFunc->InsertPageBreak( sal_False, sal_True, &aPrev, sal_False ); } if (!pDocSh->AdjustPrintZoom( ScRange( 0,nPagebreakPrev,nTab, 0,nNew-1,nTab ) )) - bGrow = FALSE; + bGrow = sal_False; } } @@ -1009,7 +1009,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) if (!bGrow) // sonst in AdjustPrintZoom schon passiert { - pViewFunc->UpdatePageBreakData( TRUE ); + pViewFunc->UpdatePageBreakData( sal_True ); pDocSh->SetDocumentModified(); } } @@ -1019,10 +1019,10 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) // Druckbereich setzen String aNewRanges; - USHORT nOldCount = pDoc->GetPrintRangeCount( nTab ); + sal_uInt16 nOldCount = pDoc->GetPrintRangeCount( nTab ); if ( nOldCount ) { - for (USHORT nPos=0; nPos<nOldCount; nPos++) + for (sal_uInt16 nPos=0; nPos<nOldCount; nPos++) { const ScRange* pOld = pDoc->GetPrintRange( nTab, nPos ); if ( pOld ) @@ -1044,7 +1044,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, BOOL bUp ) else if (!bHide) aPagebreakDrag.Format( aNewRanges, SCA_VALID ); - pViewFunc->SetPrintRanges( pDoc->IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, FALSE ); + pViewFunc->SetPrintRanges( pDoc->IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, sal_False ); } } diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index 3be14273a..e939a3af2 100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -53,9 +53,9 @@ // ----------------------------------------------------------------------- -BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt) +sal_Bool ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr(); if (pDraw && !pViewData->IsRefMode()) { @@ -64,7 +64,7 @@ BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt) if ( pDraw->IsDetectiveHit( aLogicPos ) ) { // auf Detektiv-Pfeilen gar nichts (Doppelklick wird bei ButtonUp ausgewertet) - bRet = TRUE; + bRet = sal_True; } else { @@ -80,15 +80,15 @@ BOOL ScGridWindow::DrawMouseButtonDown(const MouseEvent& rMEvt) if ( pDrView && !rMEvt.IsLeft() && !bRet ) { pDrView->BrkAction(); - bRet = TRUE; + bRet = sal_True; } return bRet; } -BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt) +sal_Bool ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt) { ScViewFunc* pView = pViewData->GetView(); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; FuPoor* pDraw = pView->GetDrawFuncPtr(); if (pDraw && !pViewData->IsRefMode()) { @@ -102,7 +102,7 @@ BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt) ScDrawView* pDrView = pViewData->GetScDrawView(); if ( pDrView ) { - BOOL bReplaceAll = TRUE; + sal_Bool bReplaceAll = sal_True; pDrView->SetAttrToMarked(*pDrawBrush, bReplaceAll); } @@ -114,13 +114,13 @@ BOOL ScGridWindow::DrawMouseButtonUp(const MouseEvent& rMEvt) return bRet; } -BOOL ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt) +sal_Bool ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt) { FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr(); if (pDraw && !pViewData->IsRefMode()) { pDraw->SetWindow( this ); - BOOL bRet = pDraw->MouseMove( rMEvt ); + sal_Bool bRet = pDraw->MouseMove( rMEvt ); if ( bRet ) UpdateStatusPosSize(); return bRet; @@ -128,7 +128,7 @@ BOOL ScGridWindow::DrawMouseMove(const MouseEvent& rMEvt) else { SetPointer( Pointer( POINTER_ARROW ) ); - return FALSE; + return sal_False; } } @@ -145,44 +145,44 @@ void ScGridWindow::DrawEndAction() // ReleaseMouse beim Aufruf } -BOOL ScGridWindow::DrawCommand(const CommandEvent& rCEvt) +sal_Bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt) { ScDrawView* pDrView = pViewData->GetScDrawView(); FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr(); if (pDrView && pDraw && !pViewData->IsRefMode()) { pDraw->SetWindow( this ); - BYTE nUsed = pDraw->Command( rCEvt ); + sal_uInt8 nUsed = pDraw->Command( rCEvt ); if( nUsed == SC_CMD_USED ) nButtonDown = 0; // MouseButtonUp wird verschluckt... if( nUsed || pDrView->IsAction() ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt) +sal_Bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt) { ScDrawView* pDrView = pViewData->GetScDrawView(); FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr(); if (pDrView && pDraw && !pViewData->IsRefMode()) { pDraw->SetWindow( this ); - BOOL bOldMarked = pDrView->AreObjectsMarked(); + sal_Bool bOldMarked = pDrView->AreObjectsMarked(); if (pDraw->KeyInput( rKEvt )) { - BOOL bLeaveDraw = FALSE; - BOOL bUsed = TRUE; - BOOL bNewMarked = pDrView->AreObjectsMarked(); + sal_Bool bLeaveDraw = sal_False; + sal_Bool bUsed = sal_True; + sal_Bool bNewMarked = pDrView->AreObjectsMarked(); if ( !pViewData->GetView()->IsDrawSelMode() ) if ( !bNewMarked ) { - pViewData->GetViewShell()->SetDrawShell( FALSE ); - bLeaveDraw = TRUE; + pViewData->GetViewShell()->SetDrawShell( sal_False ); + bLeaveDraw = sal_True; if ( !bOldMarked && rKEvt.GetKeyCode().GetCode() == KEY_DELETE ) - bUsed = FALSE; // nichts geloescht + bUsed = sal_False; // nichts geloescht } if (!bLeaveDraw) UpdateStatusPosSize(); // #108137# for moving/resizing etc. by keyboard @@ -190,10 +190,10 @@ BOOL ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt) } } - return FALSE; + return sal_False; } -void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer ) +void ScGridWindow::DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, sal_uLong nLayer ) { // #109985# const ScViewOptions& rOpts = pViewData->GetOptions(); @@ -244,11 +244,11 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo } } -MapMode ScGridWindow::GetDrawMapMode( BOOL bForce ) +MapMode ScGridWindow::GetDrawMapMode( sal_Bool bForce ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bNegativePage = pDoc->IsNegativePage( nTab ); + sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); MapMode aDrawMode = pViewData->GetLogicMode(); @@ -286,11 +286,11 @@ MapMode ScGridWindow::GetDrawMapMode( BOOL bForce ) return aDrawMode; } -//BOOL ScGridWindow::DrawBeforeScroll() +//sal_Bool ScGridWindow::DrawBeforeScroll() //{ // ScDrawView* pDrView = pViewData->GetView()->GetScDrawView(); // -// BOOL bXor = FALSE; +// sal_Bool bXor = sal_False; // if (pDrView) // { // bXor=pDrView->IsShownXorVisible(this); @@ -299,7 +299,7 @@ MapMode ScGridWindow::GetDrawMapMode( BOOL bForce ) // return bXor; //} -void ScGridWindow::DrawAfterScroll(/*BOOL bVal*/) +void ScGridWindow::DrawAfterScroll(/*sal_Bool bVal*/) { Update(); // immer, damit das Verhalten mit/ohne DrawingLayer gleich ist @@ -311,7 +311,7 @@ void ScGridWindow::DrawAfterScroll(/*BOOL bVal*/) OutlinerView* pOlView = pDrView->GetTextEditOutlinerView(); if (pOlView && pOlView->GetWindow() == this) - pOlView->ShowCursor(FALSE); // ist beim Scrollen weggekommen + pOlView->ShowCursor(sal_False); // ist beim Scrollen weggekommen } } @@ -322,7 +322,7 @@ void ScGridWindow::DrawAfterScroll(/*BOOL bVal*/) // pDrView->DrawMarks(this); //} -//BOOL ScGridWindow::NeedDrawMarks() +//sal_Bool ScGridWindow::NeedDrawMarks() //{ // ScDrawView* pDrView = pViewData->GetView()->GetScDrawView(); // return pDrView && pDrView->IsMarkHdlShown() && pDrView->AreObjectsMarked(); @@ -336,8 +336,8 @@ void ScGridWindow::CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddres const ScViewOptions& rOpts = pViewData->GetOptions(); if(rOpts.GetOption( VOPT_ANCHOR )) { - BOOL bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() ); - Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, TRUE ); + sal_Bool bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() ); + Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, sal_True ); aPos = PixelToLogic(aPos); rHdl.AddHdl(new SdrHdl(aPos, bNegativePage ? HDL_ANCHOR_TR : HDL_ANCHOR)); } @@ -374,7 +374,7 @@ void ScGridWindow::UpdateStatusPosSize() // position and size of selected object(s) if something is selected, // mouse position otherwise - BOOL bActionItem = FALSE; + sal_Bool bActionItem = sal_False; if ( pDrView->IsAction() ) // action rectangle { Rectangle aRect; @@ -385,7 +385,7 @@ void ScGridWindow::UpdateStatusPosSize() aSet.Put( SfxPointItem( SID_ATTR_POSITION, aRect.TopLeft() ) ); aSet.Put( SvxSizeItem( SID_ATTR_SIZE, Size( aRect.Right() - aRect.Left(), aRect.Bottom() - aRect.Top() ) ) ); - bActionItem = TRUE; + bActionItem = sal_True; } } if ( !bActionItem ) @@ -410,10 +410,10 @@ void ScGridWindow::UpdateStatusPosSize() pViewData->GetBindings().SetState(aSet); } -BOOL ScGridWindow::DrawHasMarkedObj() +sal_Bool ScGridWindow::DrawHasMarkedObj() { ScDrawView* p = pViewData->GetScDrawView(); - return p ? p->AreObjectsMarked() : FALSE; + return p ? p->AreObjectsMarked() : sal_False; } //void ScGridWindow::DrawStartTimer() @@ -422,7 +422,7 @@ BOOL ScGridWindow::DrawHasMarkedObj() //if (pDrView) //{ /* jetzt in DrawMarks - USHORT nWinNum = pDrView->FindWin(this); + sal_uInt16 nWinNum = pDrView->FindWin(this); if (nWinNum!=SDRVIEWWIN_NOTFOUND) pDrView->AfterInitRedraw(nWinNum); */ diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 0c1dc2f47..5c5e65eaf 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -95,9 +95,9 @@ void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible ) } void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, - const String& rTitle, const Color& rColor, BOOL bTextBelow, + const String& rTitle, const Color& rColor, sal_Bool bTextBelow, double nPPTX, double nPPTY, const Fraction& rZoomY, - ScDocument* pDoc, ScViewData* pButtonViewData, BOOL bLayoutRTL ) + ScDocument* pDoc, ScViewData* pButtonViewData, sal_Bool bLayoutRTL ) { // pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen, // darf ansonsten NULL sein! @@ -156,20 +156,20 @@ void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, long nBHeight = nVer + aTextSize.Height() + 1; Size aButSize( nBWidth, nBHeight ); long nButtonPos = bLayoutRTL ? aOuter.Left() : aOuter.Right()-nBWidth+1; - aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, FALSE ); + aComboButton.Draw( Point(nButtonPos, nButtonY), aButSize, sal_False ); if (pButtonViewData) pButtonViewData->SetScenButSize( aButSize ); long nTextStart = bLayoutRTL ? aInner.Right() - aTextSize.Width() + 1 : aInner.Left(); - BOOL bWasClip = FALSE; + sal_Bool bWasClip = sal_False; Region aOldClip; - BOOL bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() ); + sal_Bool bClip = ( aTextSize.Width() > aOuter.Right() - nBWidth - aInner.Left() ); if ( bClip ) { if (pDev->IsClipRegion()) { - bWasClip = TRUE; + bWasClip = sal_True; aOldClip = pDev->GetActiveClipRegion(); } long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left(); @@ -214,15 +214,15 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP ScMarkData aMarks; for (SCTAB i=nTab+1; i<nTabCount && pDoc->IsScenario(i); i++) - pDoc->MarkScenario( i, nTab, aMarks, FALSE, SC_SCENARIO_SHOWFRAME ); + pDoc->MarkScenario( i, nTab, aMarks, sal_False, SC_SCENARIO_SHOWFRAME ); ScRangeListRef xRanges = new ScRangeList; - aMarks.FillRangeListWithMarks( xRanges, FALSE ); + aMarks.FillRangeListWithMarks( xRanges, sal_False ); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; - USHORT nRangeCount = (USHORT)xRanges->Count(); - for (USHORT j=0; j<nRangeCount; j++) + sal_uInt16 nRangeCount = (sal_uInt16)xRanges->Count(); + for (sal_uInt16 j=0; j<nRangeCount; j++) { ScRange aRange = *xRanges->GetObject(j); // Szenario-Rahmen immer dann auf zusammengefasste Zellen erweitern, wenn @@ -234,16 +234,16 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP if ( aRange.Intersects( aViewRange ) ) //! Platz fuer Text/Button? { Point aStartPos = pViewData->GetScrPos( - aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE ); + aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True ); Point aEndPos = pViewData->GetScrPos( - aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, TRUE ); + aRange.aEnd.Col()+1, aRange.aEnd.Row()+1, eWhich, sal_True ); // on the grid: aStartPos.X() -= nLayoutSign; aStartPos.Y() -= 1; aEndPos.X() -= nLayoutSign; aEndPos.Y() -= 1; - BOOL bTextBelow = ( aRange.aStart.Row() == 0 ); + sal_Bool bTextBelow = ( aRange.aStart.Row() == 0 ); String aCurrent; Color aColor( COL_LIGHTGRAY ); @@ -251,7 +251,7 @@ void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, ScSplitP if ( pDoc->IsActiveScenario(nAct) && pDoc->HasScenarioRange(nAct,aRange) ) { String aDummyComment; - USHORT nDummyFlags; + sal_uInt16 nDummyFlags; pDoc->GetName( nAct, aCurrent ); pDoc->GetScenarioData( nAct, aDummyComment, aColor, nDummyFlags ); } @@ -276,8 +276,8 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData, ScHighlightRanges& rHighlightRanges ) { SCTAB nTab = pViewData->GetTabNo(); - ULONG nCount = rHighlightRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rHighlightRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScHighlightEntry* pEntry = rHighlightRanges.GetObject( i ); if (pEntry) @@ -288,7 +288,7 @@ void lcl_DrawHighlight( ScOutputData& rOutputData, ScViewData* pViewData, rOutputData.DrawRefMark( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), - pEntry->aColor, FALSE ); + pEntry->aColor, sal_False ); } } } @@ -358,7 +358,7 @@ void __EXPORT ScGridWindow::Paint( const Rectangle& rRect ) } else { - bNeedsRepaint = TRUE; + bNeedsRepaint = sal_True; aRepaintPixel = LogicToPixel(rRect); // nur betroffenen Bereich } return; @@ -367,7 +367,7 @@ void __EXPORT ScGridWindow::Paint( const Rectangle& rRect ) if (bIsInPaint) return; - bIsInPaint = TRUE; + bIsInPaint = sal_True; Rectangle aPixRect = LogicToPixel( rRect ); @@ -412,7 +412,7 @@ void __EXPORT ScGridWindow::Paint( const Rectangle& rRect ) Draw( nX1,nY1,nX2,nY2, SC_UPDATE_MARKS ); // nicht weiterzeichnen - bIsInPaint = FALSE; + bIsInPaint = sal_False; } // @@ -422,8 +422,8 @@ void __EXPORT ScGridWindow::Paint( const Rectangle& rRect ) void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMode eMode ) { ScModule* pScMod = SC_MOD(); - BOOL bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); - BOOL bGridFirst = TRUE; //! entscheiden!!! + sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); + sal_Bool bGridFirst = sal_True; //! entscheiden!!! if (pViewData->IsMinimized()) return; @@ -472,7 +472,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nMirrorWidth = GetSizePixel().Width(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if ( bLayoutRTL ) { @@ -489,7 +489,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod SCCOL nCurEndX = nCurX; SCROW nCurEndY = nCurY; pDoc->ExtendMerge( nCurX, nCurY, nCurEndX, nCurEndY, nTab ); - BOOL bCurVis = nCursorHideCount==0 && + sal_Bool bCurVis = nCursorHideCount==0 && ( nCurEndX+1 >= nX1 && nCurX <= nX2+1 && nCurEndY+1 >= nY1 && nCurY <= nY2+1 ); // AutoFill-Anfasser @@ -509,14 +509,14 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod double nPPTY = pViewData->GetPPTY(); const ScViewOptions& rOpts = pViewData->GetOptions(); - BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); - BOOL bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS ); + sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); + sal_Bool bMarkClipped = rOpts.GetOption( VOPT_CLIPMARKS ); // Datenblock ScTableInfo aTabInfo; pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, - nPPTX, nPPTY, FALSE, bFormulaMode, + nPPTX, nPPTY, sal_False, bFormulaMode, &pViewData->GetMarkData() ); //-------------------------------------------------------------------- @@ -530,7 +530,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetMirrorWidth( nMirrorWidth ); // needed for RTL std::auto_ptr< VirtualDevice > xFmtVirtDev; - BOOL bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? + sal_Bool bLogicText = bTextWysiwyg; // call DrawStrings in logic MapMode? if ( bTextWysiwyg ) { @@ -549,11 +549,11 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod xFmtVirtDev->SetMapMode( MAP_100TH_MM ); aOutputData.SetFmtDevice( xFmtVirtDev.get() ); - bLogicText = TRUE; // use logic MapMode + bLogicText = sal_True; // use logic MapMode } const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig(); - Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, FALSE ).nColor ); + Color aGridColor( rColorCfg.GetColorValue( svtools::CALCGRID, sal_False ).nColor ); if ( aGridColor.GetColor() == COL_TRANSPARENT ) { // use view options' grid color only if color config has "automatic" color @@ -567,21 +567,21 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetShowSpellErrors ( pDoc->GetDocOptions().IsAutoSpell() ); aOutputData.SetMarkClipped ( bMarkClipped ); - aOutputData.SetUseStyleColor( TRUE ); // always set in table view + aOutputData.SetUseStyleColor( sal_True ); // always set in table view aOutputData.SetEditObject( GetEditObject() ); aOutputData.SetViewShell( pViewData->GetViewShell() ); - BOOL bGrid = rOpts.GetOption( VOPT_GRID ); - BOOL bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); + sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ); + sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); if ( eMode == SC_UPDATE_CHANGED ) { aOutputData.FindChanged(); - aOutputData.SetSingleGrid(TRUE); + aOutputData.SetSingleGrid(sal_True); } - BOOL bPageMode = pViewData->IsPagebreakMode(); + sal_Bool bPageMode = pViewData->IsPagebreakMode(); if (bPageMode) // nach FindChanged { // SetPagebreakMode initialisiert auch bPrinted Flags @@ -589,7 +589,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod } EditView* pEditView = NULL; - BOOL bEditMode = pViewData->HasEditView(eWhich); + sal_Bool bEditMode = pViewData->HasEditView(eWhich); if ( bEditMode && pViewData->GetRefTabNo() == nTab ) { SCCOL nEditCol; @@ -601,13 +601,13 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod if ( nEditEndCol >= nX1 && nEditCol <= nX2 && nEditEndRow >= nY1 && nEditRow <= nY2 ) aOutputData.SetEditCell( nEditCol, nEditRow ); else - bEditMode = FALSE; + bEditMode = sal_False; // nur Edit-Area zu zeichnen? //! dann muss trotzdem noch der Rand / das Gitter gemalt werden! // if ( nEditCol <= nX1 && nEditEndCol >= nX2 && nEditRow <= nY1 && nEditEndRow >= nY2 ) -// bOnlyEdit = TRUE; +// bOnlyEdit = sal_True; } // define drawing layer map mode and paint rectangle @@ -726,7 +726,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod DrawRedraw( aOutputData, eMode, SC_LAYER_BACK ); } else - aOutputData.SetSolidBackground(TRUE); + aOutputData.SetSolidBackground(sal_True); pContentDev->SetMapMode(MAP_PIXEL); aOutputData.DrawBackground(); @@ -744,15 +744,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.DrawShadow(); aOutputData.DrawFrame(); if ( !bLogicText ) - aOutputData.DrawStrings(FALSE); // in pixel MapMode + aOutputData.DrawStrings(sal_False); // in pixel MapMode // edit cells and printer-metrics text must be before the buttons // (DataPilot buttons contain labels in UI font) pContentDev->SetMapMode(pViewData->GetLogicMode(eWhich)); if ( bLogicText ) - aOutputData.DrawStrings(TRUE); // in logic MapMode if bTextWysiwyg is set - aOutputData.DrawEdit(TRUE); + aOutputData.DrawStrings(sal_True); // in logic MapMode if bTextWysiwyg is set + aOutputData.DrawEdit(sal_True); pContentDev->SetMapMode(MAP_PIXEL); // Autofilter- und Pivot-Buttons @@ -777,15 +777,15 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod SCTAB nTabCount = pDoc->GetTableCount(); ScHighlightRanges* pHigh = pViewData->GetView()->GetHighlightRanges(); - BOOL bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ); - BOOL bHasChange = ( pDoc->GetChangeTrack() != NULL ); + sal_Bool bHasScenario = ( nTab+1<nTabCount && pDoc->IsScenario(nTab+1) && !pDoc->IsScenario(nTab) ); + sal_Bool bHasChange = ( pDoc->GetChangeTrack() != NULL ); if ( bHasChange || bHasScenario || pHigh != NULL ) { //! SetChangedClip() mit DrawMarks() zusammenfassen?? (anderer MapMode!) - BOOL bAny = TRUE; + sal_Bool bAny = sal_True; if (eMode == SC_UPDATE_CHANGED) bAny = aOutputData.SetChangedClip(); if (bAny) @@ -819,7 +819,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod pContentDev->SetClipRegion(); } - //BOOL bDraw = TRUE; + //sal_Bool bDraw = sal_True; //if (eMode == SC_UPDATE_CHANGED) // bDraw = NeedDrawMarks() && aOutputData.SetChangedClip(); //if (bDraw) @@ -874,7 +874,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod Color aRefColor( rColorCfg.GetColorValue(svtools::CALCREFERENCE).nColor ); aOutputData.DrawRefMark( pViewData->GetRefStartX(), pViewData->GetRefStartY(), pViewData->GetRefEndX(), pViewData->GetRefEndY(), - aRefColor, FALSE ); + aRefColor, sal_False ); } // Range-Finder @@ -886,8 +886,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod if ( pRangeFinder && !pRangeFinder->IsHidden() && pRangeFinder->GetDocName() == pDocSh->GetTitle() ) { - USHORT nCount = (USHORT)pRangeFinder->Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ScRangeFindData* pData = pRangeFinder->GetObject(i); if (pData) @@ -898,7 +898,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.DrawRefMark( aRef.aStart.Col(), aRef.aStart.Row(), aRef.aEnd.Col(), aRef.aEnd.Row(), Color( ScRangeFindList::GetColorName( i ) ), - TRUE ); + sal_True ); } } } @@ -982,7 +982,7 @@ void ScGridWindow::CheckNeedsRepaint() if (bNeedsRepaint) { - bNeedsRepaint = FALSE; + bNeedsRepaint = sal_False; if (aRepaintPixel.IsEmpty()) Invalidate(); else @@ -1032,7 +1032,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else { // use EditEngine to draw mixed-script string - pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), TRUE ); + pEditEng = new ScEditEngineDefaulter( EditEngine::CreatePool(), sal_True ); pEditEng->SetRefMapMode( pContentDev->GetMapMode() ); SfxItemSet* pEditDefaults = new SfxItemSet( pEditEng->GetEmptyItemSet() ); rDefPattern.FillEditItemSet( pEditDefaults ); @@ -1040,8 +1040,8 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, pEditEng->SetDefaults( pEditDefaults ); } - USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() ); - for (USHORT nPos=0; nPos<nCount; nPos++) + sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() ); + for (sal_uInt16 nPos=0; nPos<nCount; nPos++) { ScPrintRangeData& rData = pPageData->GetData(nPos); ScRange aRange = rData.GetPrintRange(); @@ -1058,9 +1058,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, pContentDev->SetFillColor( aManual ); Point aStart = pViewData->GetScrPos( - aRange.aStart.Col(), aRange.aStart.Row(), eWhich, TRUE ); + aRange.aStart.Col(), aRange.aStart.Row(), eWhich, sal_True ); Point aEnd = pViewData->GetScrPos( - aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, TRUE ); + aRange.aEnd.Col() + 1, aRange.aEnd.Row() + 1, eWhich, sal_True ); aStart.X() -= 2; aStart.Y() -= 2; @@ -1094,7 +1094,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else pContentDev->SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( - nBreak, aRange.aStart.Row(), eWhich, TRUE ); + nBreak, aRange.aStart.Row(), eWhich, sal_True ); pContentDev->DrawRect( Rectangle( aBreak.X()-1, aStart.Y(), aBreak.X(), aEnd.Y() ) ); } } @@ -1113,7 +1113,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, else pContentDev->SetFillColor( aAutomatic ); Point aBreak = pViewData->GetScrPos( - aRange.aStart.Col(), nBreak, eWhich, TRUE ); + aRange.aStart.Col(), nBreak, eWhich, sal_True ); pContentDev->DrawRect( Rectangle( aStart.X(), aBreak.Y()-1, aEnd.X(), aBreak.Y() ) ); } } @@ -1133,9 +1133,9 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if ( nPrEndX >= nX1 && nPrStartX <= nX2 ) { Point aPageStart = pViewData->GetScrPos( - nPrStartX, nPrStartY, eWhich, TRUE ); + nPrStartX, nPrStartY, eWhich, sal_True ); Point aPageEnd = pViewData->GetScrPos( - nPrEndX+1,nPrEndY+1, eWhich, TRUE ); + nPrEndX+1,nPrEndY+1, eWhich, sal_True ); long nPageNo = rData.GetFirstPage(); if ( rData.IsTopDown() ) @@ -1217,9 +1217,9 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 ScQueryParam* pQueryParam = NULL; RowInfo* pRowInfo = rTabInfo.mpRowInfo; - USHORT nArrCount = rTabInfo.mnArrCount; + sal_uInt16 nArrCount = rTabInfo.mnArrCount; - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Point aOldPos = aComboButton.GetPosPixel(); // Zustand fuer MouseDown/Up Size aOldSize = aComboButton.GetSizePixel(); // merken @@ -1241,7 +1241,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 if (!pQueryParam) pQueryParam = new ScQueryParam; - BOOL bNewData = TRUE; + sal_Bool bNewData = sal_True; if (pDBData) { SCCOL nStartCol; @@ -1252,7 +1252,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 pDBData->GetArea( nAreaTab, nStartCol, nStartRow, nEndCol, nEndRow ); if ( nCol >= nStartCol && nCol <= nEndCol && nRow >= nStartRow && nRow <= nEndRow ) - bNewData = FALSE; + bNewData = sal_False; } if (bNewData) { @@ -1268,10 +1268,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 // pQueryParam kann nur MAXQUERY Eintraege enthalten - BOOL bSimpleQuery = TRUE; - BOOL bColumnFound = FALSE; + sal_Bool bSimpleQuery = sal_True; + sal_Bool bColumnFound = sal_False; if (!pQueryParam->bInplace) - bSimpleQuery = FALSE; + bSimpleQuery = sal_False; for (nQuery=0; nQuery<MAXQUERY && bSimpleQuery; nQuery++) if (pQueryParam->GetEntry(nQuery).bDoQuery) { @@ -1279,10 +1279,10 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 // (auch bei ">1" soll der Spaltenkopf blau werden) if (pQueryParam->GetEntry(nQuery).nField == nCol) - bColumnFound = TRUE; + bColumnFound = sal_True; if (nQuery > 0) if (pQueryParam->GetEntry(nQuery).eConnect != SC_AND) - bSimpleQuery = FALSE; + bSimpleQuery = sal_False; } bool bArrowState = bSimpleQuery && bColumnFound; @@ -1337,7 +1337,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 aComboButton.SetPosPixel( aRect.TopLeft() ); aComboButton.SetSizePixel( aRect.GetSize() ); pContentDev->SetClipRegion( aRect ); - aComboButton.Draw( FALSE, FALSE ); + aComboButton.Draw( sal_False, sal_False ); pContentDev->SetClipRegion(); // always called from Draw() without clip region aComboButton.SetPosPixel( aOldPos ); // restore old state aComboButton.SetSizePixel( aOldSize ); // for MouseUp/Down (AutoFilter) @@ -1352,7 +1352,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) { ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; ScDDComboBoxButton aButton( this ); // for optimal size @@ -1376,7 +1376,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) nNextCol = nCol + pMerge->GetColMerge(); // next cell after the merged area while ( nNextCol <= MAXCOL && pDoc->ColHidden(nNextCol, nTab) ) ++nNextCol; - BOOL bNextCell = ( nNextCol <= MAXCOL ); + sal_Bool bNextCell = ( nNextCol <= MAXCOL ); if ( bNextCell ) nAvailable = ScViewData::ToPixel( pDoc->GetColWidth( nNextCol, nTab ), pViewData->GetPPTX() ); @@ -1385,7 +1385,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) if ( nCellSizeY < aBtnSize.Height() ) aBtnSize.Height() = nCellSizeY; - Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, TRUE ); + Point aPos = pViewData->GetScrPos( nCol, nRow, eWhich, sal_True ); aPos.X() += nCellSizeX * nLayoutSign; // start of next cell if (!bNextCell) aPos.X() -= aBtnSize.Width() * nLayoutSign; // right edge of cell if next cell not available @@ -1398,7 +1398,7 @@ Rectangle ScGridWindow::GetListValButtonRect( const ScAddress& rButtonPos ) return Rectangle( aPos, aBtnSize ); } -BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) +sal_Bool ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) { ScDocument* pDoc = pViewData->GetDocument(); ScDBData* pDBData = pDoc->GetDBAtCursor( nCol, nRow, nTab ); @@ -1411,12 +1411,12 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) DBG_ERROR("Auto-Filter-Button ohne DBData"); } - BOOL bSimpleQuery = TRUE; - BOOL bColumnFound = FALSE; + sal_Bool bSimpleQuery = sal_True; + sal_Bool bColumnFound = sal_False; SCSIZE nQuery; if ( !aQueryParam.bInplace ) - bSimpleQuery = FALSE; + bSimpleQuery = sal_False; // aQueryParam kann nur MAXQUERY Eintraege enthalten @@ -1424,11 +1424,11 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) if ( aQueryParam.GetEntry(nQuery).bDoQuery ) { if (aQueryParam.GetEntry(nQuery).nField == nCol) - bColumnFound = TRUE; + bColumnFound = sal_True; if (nQuery > 0) if (aQueryParam.GetEntry(nQuery).eConnect != SC_AND) - bSimpleQuery = FALSE; + bSimpleQuery = sal_False; } return ( bSimpleQuery && bColumnFound ); @@ -1437,8 +1437,8 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ) void ScGridWindow::DrawComboButton( const Point& rCellPos, long nCellSizeX, long nCellSizeY, - BOOL bArrowState, - BOOL bBtnIn ) + sal_Bool bArrowState, + sal_Bool bBtnIn ) { Point aScrPos = rCellPos; Size aBtnSize = aComboButton.GetSizePixel(); @@ -1454,7 +1454,7 @@ void ScGridWindow::DrawComboButton( const Point& rCellPos, aComboButton.SetSizePixel( aBtnSize ); } - BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); if ( bLayoutRTL ) aScrPos.X() -= nCellSizeX - 1; @@ -1470,7 +1470,7 @@ void ScGridWindow::DrawComboButton( const Point& rCellPos, } void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL bTestMerge, BOOL bRepeat ) + sal_Bool bTestMerge, sal_Bool bRepeat ) { //! if INVERT_HIGHLIGHT swaps foreground and background (like on Mac), //! use INVERT_HIGHLIGHT only for cells that have no background color set @@ -1483,7 +1483,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; SCCOL nTestX2 = nX2; @@ -1520,31 +1520,31 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nScrY = aScrPos.Y(); - BOOL bWasHidden = FALSE; + sal_Bool bWasHidden = sal_False; for (SCROW nY=nY1; nY<=nY2; nY++) { - BOOL bFirstRow = ( nY == nPosY ); // first visible row? - BOOL bDoHidden = FALSE; // versteckte nachholen ? - USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab ); - BOOL bDoRow = ( nHeightTwips != 0 ); + sal_Bool bFirstRow = ( nY == nPosY ); // first visible row? + sal_Bool bDoHidden = sal_False; // versteckte nachholen ? + sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab ); + sal_Bool bDoRow = ( nHeightTwips != 0 ); if (bDoRow) { if (bTestMerge) if (bWasHidden) // auf versteckte zusammengefasste testen { // --nY; // nY geaendert -> vorherige zeichnen - bDoHidden = TRUE; - bDoRow = TRUE; + bDoHidden = sal_True; + bDoRow = sal_True; } - bWasHidden = FALSE; + bWasHidden = sal_False; } else { - bWasHidden = TRUE; + bWasHidden = sal_True; if (bTestMerge) if (nY==nY2) - bDoRow = TRUE; // letzte Zeile aus Block + bDoRow = sal_True; // letzte Zeile aus Block } if ( bDoRow ) @@ -1597,7 +1597,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, } } - if ( rMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat ) + if ( rMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat ) { if ( !pMergeFlag->IsOverlapped() ) { @@ -1622,7 +1622,7 @@ void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, } else // !bTestMerge { - if ( rMark.IsCellMarked( nX, nY, TRUE ) == bRepeat && + if ( rMark.IsCellMarked( nX, nY, sal_True ) == bRepeat && nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); @@ -1649,13 +1649,13 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) // ScMarkData& rMark = pViewData->GetMarkData(); ScMarkData aMultiMark( pViewData->GetMarkData() ); - aMultiMark.SetMarking( FALSE ); + aMultiMark.SetMarking( sal_False ); aMultiMark.MarkToMulti(); ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; if ( !aMultiMark.IsMultiMarked() ) @@ -1671,8 +1671,8 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) PutInOrder( nX1, nX2 ); PutInOrder( nY1, nY2 ); - BOOL bTestMerge = TRUE; - BOOL bRepeat = TRUE; + sal_Bool bTestMerge = sal_True; + sal_Bool bRepeat = sal_True; SCCOL nTestX2 = nX2; SCROW nTestY2 = nY2; @@ -1708,30 +1708,30 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich ); long nScrY = aScrPos.Y(); - BOOL bWasHidden = FALSE; + sal_Bool bWasHidden = sal_False; for (SCROW nY=nY1; nY<=nY2; nY++) { - BOOL bFirstRow = ( nY == nPosY ); // first visible row? - BOOL bDoHidden = FALSE; // versteckte nachholen ? - USHORT nHeightTwips = pDoc->GetRowHeight( nY,nTab ); - BOOL bDoRow = ( nHeightTwips != 0 ); + sal_Bool bFirstRow = ( nY == nPosY ); // first visible row? + sal_Bool bDoHidden = sal_False; // versteckte nachholen ? + sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY,nTab ); + sal_Bool bDoRow = ( nHeightTwips != 0 ); if (bDoRow) { if (bTestMerge) if (bWasHidden) // auf versteckte zusammengefasste testen { - bDoHidden = TRUE; - bDoRow = TRUE; + bDoHidden = sal_True; + bDoRow = sal_True; } - bWasHidden = FALSE; + bWasHidden = sal_False; } else { - bWasHidden = TRUE; + bWasHidden = sal_True; if (bTestMerge) if (nY==nY2) - bDoRow = TRUE; // letzte Zeile aus Block + bDoRow = sal_True; // letzte Zeile aus Block } if ( bDoRow ) @@ -1784,7 +1784,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) } } - if ( aMultiMark.IsCellMarked( nThisX, nThisY, TRUE ) == bRepeat ) + if ( aMultiMark.IsCellMarked( nThisX, nThisY, sal_True ) == bRepeat ) { if ( !pMergeFlag->IsOverlapped() ) { @@ -1809,7 +1809,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) } else // !bTestMerge { - if ( aMultiMark.IsCellMarked( nX, nY, TRUE ) == bRepeat && + if ( aMultiMark.IsCellMarked( nX, nY, sal_True ) == bRepeat && nEndX * nLayoutSign >= nScrX * nLayoutSign && nEndY >= nScrY ) { aInvert.AddRect( Rectangle( nScrX,nScrY,nEndX,nEndY ) ); @@ -1855,7 +1855,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector< Rectangle >& rPixelRects ) //UNUSED2008-05 double nPPTY = pViewData->GetPPTY(); //UNUSED2008-05 SCCOLROW i; //UNUSED2008-05 -//UNUSED2008-05 BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); +//UNUSED2008-05 sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); //UNUSED2008-05 long nLayoutSign = bLayoutRTL ? -1 : 1; //UNUSED2008-05 //UNUSED2008-05 if (ValidCol(nX2) && nX2>=nX1) @@ -1914,7 +1914,7 @@ void ScGridWindow::DrawCursor() // // // links/oben ausserhalb des Bildschirms ? // -// BOOL bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); +// sal_Bool bVis = ( nX>=pViewData->GetPosX(eHWhich) && nY>=pViewData->GetPosY(eVWhich) ); // if (!bVis) // { // SCCOL nEndX = nX; @@ -1935,12 +1935,12 @@ void ScGridWindow::DrawCursor() // // MapMode aOld = GetMapMode(); SetMapMode(MAP_PIXEL); // -// Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE ); -// BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); +// Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True ); +// sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // // // completely right of/below the screen? // // (test with logical start position in aScrPos) -// BOOL bMaybeVisible; +// sal_Bool bMaybeVisible; // if ( bLayoutRTL ) // bMaybeVisible = ( aScrPos.X() >= -2 && aScrPos.Y() >= -2 ); // else @@ -1957,7 +1957,7 @@ void ScGridWindow::DrawCursor() // if ( bLayoutRTL ) // aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring // -// BOOL bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX || +// sal_Bool bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX || // pViewData->GetVSplitMode() == SC_SPLIT_FIX ); // if ( pViewData->GetActivePart()==eWhich || bFix ) // { @@ -1996,9 +1996,9 @@ void ScGridWindow::DrawAutoFillMark() // SCROW nY = aAutoMarkPos.Row(); // SCTAB nTab = pViewData->GetTabNo(); // ScDocument* pDoc = pViewData->GetDocument(); -// BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); +// sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // -// Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, TRUE ); +// Point aFillPos = pViewData->GetScrPos( nX, nY, eWhich, sal_True ); // long nSizeXPix; // long nSizeYPix; // pViewData->GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix ); diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 821d5da30..eae890edd 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -85,22 +85,22 @@ ScHideTextCursor::~ScHideTextCursor() { // restore text cursor if ( pViewData->HasEditView(eWhich) && pWin->HasFocus() ) - pViewData->GetEditView(eWhich)->ShowCursor( FALSE, TRUE ); + pViewData->GetEditView(eWhich)->ShowCursor( sal_False, sal_True ); } } // ----------------------------------------------------------------------- -BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ) +sal_Bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, sal_Bool bKeyboard ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); ScAddress aCellPos( nPosX, nPosY, nTab ); String aTrackText; - BOOL bLeftEdge = FALSE; + sal_Bool bLeftEdge = sal_False; // Change-Tracking @@ -174,7 +174,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ) // bei geloeschten Spalten: Pfeil auf die linke Seite der Zelle if ( pFound->GetType() == SC_CAT_DELETE_COLS ) - bLeftEdge = TRUE; + bLeftEdge = sal_True; DateTime aDT = pFound->GetDateTime(); aTrackText = pFound->GetUser(); @@ -201,23 +201,23 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ) const ScPostIt* pNote = pDoc->GetNote( aCellPos ); if ( (aTrackText.Len() > 0) || (pNote && !pNote->IsCaptionShown()) ) { - BOOL bNew = TRUE; - BOOL bFast = FALSE; + sal_Bool bNew = sal_True; + sal_Bool bFast = sal_False; if ( pNoteMarker ) // schon eine Notiz angezeigt { if ( pNoteMarker->GetDocPos() == aCellPos ) // dieselbe - bNew = FALSE; // dann stehenlassen + bNew = sal_False; // dann stehenlassen else - bFast = TRUE; // sonst sofort + bFast = sal_True; // sonst sofort // marker which was shown for ctrl-F1 isn't removed by mouse events if ( pNoteMarker->IsByKeyboard() && !bKeyboard ) - bNew = FALSE; + bNew = sal_False; } if ( bNew ) { if ( bKeyboard ) - bFast = TRUE; // keyboard also shows the marker immediately + bFast = sal_True; // keyboard also shows the marker immediately delete pNoteMarker; @@ -232,7 +232,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ) /* If caption is shown from right or bottom windows, adjust mapmode to include size of top-left window. */ - MapMode aMapMode = GetDrawMapMode( TRUE ); + MapMode aMapMode = GetDrawMapMode( sal_True ); Size aLeftSize = pLeft->PixelToLogic( pLeft->GetOutputSizePixel(), aMapMode ); Point aOrigin = aMapMode.GetOrigin(); if( (this == pRight) || (this == pDiagonal) ) @@ -246,7 +246,7 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ) aMapMode, bLeftEdge, bFast, bKeyboard ); } - bDone = TRUE; // something is shown (old or new) + bDone = sal_True; // something is shown (old or new) } return bDone; @@ -256,11 +256,11 @@ BOOL ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard ) void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) { - BOOL bDone = FALSE; - BOOL bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0; + sal_Bool bDone = sal_False; + sal_Bool bHelpEnabled = ( rHEvt.GetMode() & ( HELPMODE_BALLOON | HELPMODE_QUICK ) ) != 0; SdrView* pDrView = pViewData->GetScDrawView(); - BOOL bDrawTextEdit = FALSE; + sal_Bool bDrawTextEdit = sal_False; if (pDrView) bDrawTextEdit = pDrView->IsTextEdit(); @@ -273,10 +273,10 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) SCsROW nPosY; pViewData->GetPosFromPixel( aPosPixel.X(), aPosPixel.Y(), eWhich, nPosX, nPosY ); - if ( ShowNoteMarker( nPosX, nPosY, FALSE ) ) + if ( ShowNoteMarker( nPosX, nPosY, sal_False ) ) { Window::RequestHelp( rHEvt ); // alte Tip/Balloon ausschalten - bDone = TRUE; + bDone = sal_True; } } @@ -374,8 +374,8 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) ScHideTextCursor aHideCursor( pViewData, eWhich ); // MapMode is changed in GetEditArea - // bForceToTop = FALSE, use the cell's real position - aPixRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, FALSE ); + // bForceToTop = sal_False, use the cell's real position + aPixRect = pViewData->GetEditArea( eWhich, nPosX, nPosY, this, pPattern, sal_False ); } } @@ -389,7 +389,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) else if ( rHEvt.GetMode() & HELPMODE_QUICK ) Help::ShowQuickHelp(this,aScreenRect, aHelpText); - bDone = TRUE; + bDone = sal_True; } } @@ -407,13 +407,13 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) if ( nMouseStatus == SC_GM_TABDOWN && pViewData->GetRefType() == SC_REFTYPE_FILL && Help::IsQuickHelpEnabled() ) - bDone = TRUE; + bDone = sal_True; if (!bDone) Window::RequestHelp( rHEvt ); } -BOOL ScGridWindow::IsMyModel(SdrEditView* pSdrView) +sal_Bool ScGridWindow::IsMyModel(SdrEditView* pSdrView) { return pSdrView && pSdrView->GetModel() == pViewData->GetDocument()->GetDrawLayer(); diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index ce69872d5..495b77600 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -66,7 +66,7 @@ //================================================================== ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine, - SCCOLROW nNewSize, USHORT nNewFlags ) : + SCCOLROW nNewSize, sal_uInt16 nNewFlags ) : Window ( pParent ), pSelEngine ( pSelectionEngine ), nFlags ( nNewFlags ), @@ -74,24 +74,24 @@ ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEn nSize ( nNewSize ), nMarkStart ( 0 ), nMarkEnd ( 0 ), - bMarkRange ( FALSE ), - bDragging ( FALSE ), - bIgnoreMove ( FALSE ) + bMarkRange ( sal_False ), + bDragging ( sal_False ), + bIgnoreMove ( sal_False ) { // --- RTL --- no default mirroring for this window, the spreadsheet itself // is also not mirrored // #107811# mirror the vertical window for correct border drawing // #106948# table layout depends on sheet format, not UI setting, so the // borders of the vertical window have to be handled manually, too. - EnableRTL( FALSE ); + EnableRTL( sal_False ); aNormFont = GetFont(); - aNormFont.SetTransparent( TRUE ); //! WEIGHT_NORMAL hart setzen ??? + aNormFont.SetTransparent( sal_True ); //! WEIGHT_NORMAL hart setzen ??? aBoldFont = aNormFont; aBoldFont.SetWeight( WEIGHT_BOLD ); SetFont(aBoldFont); - bBoldSet = TRUE; + bBoldSet = sal_True; Size aSize = LogicToPixel( Size( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("8888")) ), @@ -127,7 +127,7 @@ ScHeaderControl::~ScHeaderControl() void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd ) { - BOOL bLayoutRTL = IsLayoutRTL(); + sal_Bool bLayoutRTL = IsLayoutRTL(); long nLayoutSign = bLayoutRTL ? -1 : 1; Rectangle aRect( Point(0,0), GetOutputSizePixel() ); @@ -144,15 +144,15 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW nEnd ) Invalidate(aRect); } -void ScHeaderControl::SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd ) +void ScHeaderControl::SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd ) { - BOOL bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader(); //! cachen? + sal_Bool bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader(); //! cachen? if (!bEnabled) - bNewSet = FALSE; + bNewSet = sal_False; // Variablen setzen - BOOL bOldSet = bMarkRange; + sal_Bool bOldSet = bMarkRange; SCCOLROW nOldStart = nMarkStart; SCCOLROW nOldEnd = nMarkEnd; PutInOrder( nNewStart, nNewEnd ); @@ -204,7 +204,7 @@ long ScHeaderControl::GetScrPos( SCCOLROW nEntryNo ) nScrPos = 0; for (SCCOLROW i=GetPos(); i<nEntryNo && nScrPos<nMax; i++) { - USHORT nAdd = GetEntrySize(i); + sal_uInt16 nAdd = GetEntrySize(i); if (nAdd) nScrPos += nAdd; else @@ -269,8 +269,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) // Linien zusammengefasst const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - BOOL bHighContrast = rStyleSettings.GetHighContrastMode(); - BOOL bDark = rStyleSettings.GetFaceColor().IsDark(); + sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode(); + sal_Bool bDark = rStyleSettings.GetFaceColor().IsDark(); // Use the same distinction for bDark as in Window::DrawSelectionBackground Color aTextColor = rStyleSettings.GetButtonTextColor(); @@ -286,21 +286,21 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) Color aSelLineColor = rStyleSettings.GetHighlightColor(); aSelLineColor.Merge( aBlack, 0xe0 ); // darken just a little bit - BOOL bLayoutRTL = IsLayoutRTL(); + sal_Bool bLayoutRTL = IsLayoutRTL(); long nLayoutSign = bLayoutRTL ? -1 : 1; - BOOL bMirrored = IsMirrored(); + sal_Bool bMirrored = IsMirrored(); // const FunctionSet* pFuncSet = pSelEngine->GetFunctionSet(); String aString; - USHORT nBarSize; + sal_uInt16 nBarSize; Point aScrPos; Size aTextSize; // Size aSize = GetOutputSizePixel(); if (bVertical) - nBarSize = (USHORT) GetSizePixel().Width(); + nBarSize = (sal_uInt16) GetSizePixel().Width(); else - nBarSize = (USHORT) GetSizePixel().Height(); + nBarSize = (sal_uInt16) GetSizePixel().Height(); SCCOLROW nPos = GetPos(); @@ -333,7 +333,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) for (SCCOLROW i=nPos; i<nSize; i++) { - USHORT nSizePix = GetEntrySize( i ); + sal_uInt16 nSizePix = GetEntrySize( i ); if (nSizePix) { nLineEnd += nSizePix * nLayoutSign; @@ -464,7 +464,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) // borders, light border at top isn't used anymore // use SC_HDRPAINT_SEL_BOTTOM for different color - for (USHORT nPass = SC_HDRPAINT_SEL_BOTTOM; nPass < SC_HDRPAINT_COUNT; nPass++) + for (sal_uInt16 nPass = SC_HDRPAINT_SEL_BOTTOM; nPass < SC_HDRPAINT_COUNT; nPass++) { // set line color etc. before entry loop switch ( nPass ) @@ -494,7 +494,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) else aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ); SetBackground( Color( rStyleSettings.GetFaceColor() ) ); - DrawSelectionBackground( aTransRect, 0, TRUE, FALSE, FALSE ); + DrawSelectionBackground( aTransRect, 0, sal_True, sal_False, sal_False ); SetBackground(); } break; @@ -514,7 +514,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) nScrPos = nPEnd + nLayoutSign; // beyond nPEnd -> stop else { - USHORT nSizePix = GetEntrySize( nEntryNo ); + sal_uInt16 nSizePix = GetEntrySize( nEntryNo ); if (nSizePix == 0) { @@ -530,8 +530,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) else aEndPos = Point( aScrPos.X()+(nSizePix-1)*nLayoutSign, aScrPos.Y()+nBarSize-1 ); - BOOL bMark = bMarkRange && nEntryNo >= nMarkStart && nEntryNo <= nMarkEnd; - BOOL bNextToMark = bMarkRange && nEntryNo + 1 >= nMarkStart && nEntryNo <= nMarkEnd; + sal_Bool bMark = bMarkRange && nEntryNo >= nMarkStart && nEntryNo <= nMarkEnd; + sal_Bool bNextToMark = bMarkRange && nEntryNo + 1 >= nMarkStart && nEntryNo <= nMarkEnd; switch ( nPass ) { @@ -609,9 +609,9 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) // Maus - Handling // -SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder ) +SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, sal_Bool& rBorder ) { - BOOL bFound=FALSE; + sal_Bool bFound=sal_False; SCCOLROW nCount = 1; SCCOLROW nPos = GetPos(); SCCOLROW nHitNo = nPos; @@ -621,7 +621,7 @@ SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder ) Size aSize = GetOutputSizePixel(); long nWinSize = bVertical ? aSize.Height() : aSize.Width(); - BOOL bLayoutRTL = IsLayoutRTL(); + sal_Bool bLayoutRTL = IsLayoutRTL(); long nLayoutSign = bLayoutRTL ? -1 : 1; long nEndPos = bLayoutRTL ? -1 : nWinSize; @@ -640,7 +640,7 @@ SCCOLROW ScHeaderControl::GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder ) nDif = nMousePos - nScrPos; if (nDif >= -2 && nDif <= 2 && nCount > 0) { - bFound=TRUE; + bFound=sal_True; nHitNo=nEntryNo-1; } else if (nDif * nLayoutSign >= 0 && nEntryNo < nSize) @@ -660,7 +660,7 @@ bool ScHeaderControl::IsSelectionAllowed(SCCOLROW nPos) const return false; ScViewData* pViewData = pViewSh->GetViewData(); - USHORT nTab = pViewData->GetTabNo(); + sal_uInt16 nTab = pViewData->GetTabNo(); ScDocument* pDoc = pViewData->GetDocument(); const ScTableProtection* pProtect = pDoc->GetTabProtection(nTab); bool bSelectAllowed = true; @@ -697,10 +697,10 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) if (IsDisabled()) return; - bIgnoreMove = FALSE; + bIgnoreMove = sal_False; SelectWindow(); - BOOL bFound; + sal_Bool bFound; SCCOLROW nHitNo = GetMousePos( rMEvt, bFound ); if (!IsSelectionAllowed(nHitNo)) return; @@ -708,7 +708,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) if ( bFound && rMEvt.IsLeft() && ResizeAllowed() ) { nDragNo = nHitNo; - USHORT nClicks = rMEvt.GetClicks(); + sal_uInt16 nClicks = rMEvt.GetClicks(); if ( nClicks && nClicks%2==0 ) { SetEntrySize( nDragNo, HDR_SIZE_OPTIMUM ); @@ -726,8 +726,8 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) // CaptureMouse(); StartTracking(); - bDragging = TRUE; - bDragMoved = FALSE; + bDragging = sal_True; + bDragMoved = sal_False; } } else if (rMEvt.IsLeft()) @@ -741,7 +741,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt ) aVis.Top() = LONG_MIN, aVis.Bottom() = LONG_MAX; pSelEngine->SetVisibleArea( aVis ); - SetMarking( TRUE ); // muss vor SelMouseButtonDown sein + SetMarking( sal_True ); // muss vor SelMouseButtonDown sein pSelEngine->SelMouseButtonDown( rMEvt ); // #74215# In column/row headers a simple click already is a selection. @@ -764,20 +764,20 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt ) if ( IsDisabled() ) return; - SetMarking( FALSE ); - bIgnoreMove = FALSE; -// BOOL bFound; + SetMarking( sal_False ); + bIgnoreMove = sal_False; +// sal_Bool bFound; // SCCOLROW nHitNo = GetMousePos( rMEvt, bFound ); if ( bDragging ) { DrawInvert( nDragPos ); ReleaseMouse(); - bDragging = FALSE; + bDragging = sal_False; long nScrPos = GetScrPos( nDragNo ); long nMousePos = bVertical ? rMEvt.GetPosPixel().Y() : rMEvt.GetPosPixel().X(); - BOOL bLayoutRTL = IsLayoutRTL(); + sal_Bool bLayoutRTL = IsLayoutRTL(); long nNewWidth = bLayoutRTL ? ( nScrPos - nMousePos + 1 ) : ( nMousePos + 2 - nScrPos ); @@ -802,7 +802,7 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& rMEvt ) { if (nNewWidth<0) nNewWidth=0; if (bDragMoved) - SetEntrySize( nDragNo, (USHORT) nNewWidth ); + SetEntrySize( nDragNo, (sal_uInt16) nNewWidth ); } } else @@ -820,7 +820,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt ) return; } - BOOL bFound; + sal_Bool bFound; (void)GetMousePos( rMEvt, bFound ); if ( bDragging ) @@ -834,7 +834,7 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt ) DrawInvert( nDragPos ); if (nDragPos <= nDragStart-SC_DRAG_MIN || nDragPos >= nDragStart+SC_DRAG_MIN) - bDragMoved = TRUE; + bDragMoved = sal_True; } } else @@ -864,7 +864,7 @@ void ScHeaderControl::Tracking( const TrackingEvent& rTEvt ) void ScHeaderControl::Command( const CommandEvent& rCEvt ) { - USHORT nCmd = rCEvt.GetCommand(); + sal_uInt16 nCmd = rCEvt.GetCommand(); if ( nCmd == COMMAND_CONTEXTMENU ) { StopMarking(); // Selektion / Dragging beenden @@ -885,7 +885,7 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt ) SC_MOD()->InputEnterHandler(); // always end edit mode MouseEvent aMEvt( rCEvt.GetMousePosPixel() ); - BOOL bBorder; + sal_Bool bBorder; SCCOLROW nPos = GetMousePos( aMEvt, bBorder ); if (!IsSelectionAllowed(nPos)) // Selecting this cell is not allowed, neither is context menu. @@ -901,13 +901,13 @@ void ScHeaderControl::Command( const CommandEvent& rCEvt ) sal::static_int_cast<SCCOL>(nPos), MAXROW, nTab ); // see if any part of the range is already selected - BOOL bSelected = FALSE; + sal_Bool bSelected = sal_False; ScRangeList aRanges; - pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, FALSE ); - ULONG nRangeCount = aRanges.Count(); - for (ULONG i=0; i<nRangeCount && !bSelected; i++) + pViewData->GetMarkData().FillRangeListWithMarks( &aRanges, sal_False ); + sal_uLong nRangeCount = aRanges.Count(); + for (sal_uLong i=0; i<nRangeCount && !bSelected; i++) if ( aRanges.GetObject(i)->Intersects( aNewRange ) ) - bSelected = TRUE; + bSelected = sal_True; // select the range if no part of it was selected if ( !bSelected ) @@ -929,11 +929,11 @@ void ScHeaderControl::StopMarking() if ( bDragging ) { DrawInvert( nDragPos ); - bDragging = FALSE; + bDragging = sal_False; } - SetMarking( FALSE ); - bIgnoreMove = TRUE; + SetMarking( sal_False ); + bIgnoreMove = sal_True; // #86260# don't call pSelEngine->Reset, so selection across the parts of // a split/frozen view is possible @@ -946,7 +946,7 @@ void ScHeaderControl::ShowDragHelp() if (Help::IsQuickHelpEnabled()) { long nScrPos = GetScrPos( nDragNo ); - BOOL bLayoutRTL = IsLayoutRTL(); + sal_Bool bLayoutRTL = IsLayoutRTL(); long nVal = bLayoutRTL ? ( nScrPos - nDragPos + 1 ) : ( nDragPos + 2 - nScrPos ); @@ -957,7 +957,7 @@ void ScHeaderControl::ShowDragHelp() Point aMousePos = OutputToScreenPixel(GetPointerPosPixel()); Rectangle aRect; - USHORT nAlign; + sal_uInt16 nAlign; if (!bVertical) { // oberhalb @@ -985,7 +985,7 @@ void ScHeaderControl::RequestHelp( const HelpEvent& rHEvt ) // Wenn eigene QuickHelp angezeigt wird, nicht durch RequestHelp // wieder wegnehmen lassen - BOOL bOwn = bDragging && Help::IsQuickHelpEnabled(); + sal_Bool bOwn = bDragging && Help::IsQuickHelpEnabled(); if (!bOwn) Window::RequestHelp(rHEvt); } @@ -1005,24 +1005,24 @@ SCCOLROW ScHeaderControl::GetHiddenCount( SCCOLROW nEntryNo ) return nHidden; } -BOOL ScHeaderControl::IsLayoutRTL() +sal_Bool ScHeaderControl::IsLayoutRTL() { - return FALSE; + return sal_False; } -BOOL ScHeaderControl::IsMirrored() +sal_Bool ScHeaderControl::IsMirrored() { - return FALSE; + return sal_False; } -BOOL ScHeaderControl::IsDisabled() +sal_Bool ScHeaderControl::IsDisabled() { - return FALSE; + return sal_False; } -BOOL ScHeaderControl::ResizeAllowed() +sal_Bool ScHeaderControl::ResizeAllowed() { - return TRUE; + return sal_True; } void ScHeaderControl::SelectWindow() @@ -1038,7 +1038,7 @@ String ScHeaderControl::GetDragHelp( long /* nVal */ ) return EMPTY_STRING; } -void ScHeaderControl::SetMarking( BOOL /* bSet */ ) +void ScHeaderControl::SetMarking( sal_Bool /* bSet */ ) { } diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx index d9efd072f..c3328c381 100644 --- a/sc/source/ui/view/hintwin.cxx +++ b/sc/source/ui/view/hintwin.cxx @@ -55,7 +55,7 @@ ScHintWindow::ScHintWindow( Window* pParent, const String& rTit, const String& r SetBackground( aYellow ); aTextFont = GetFont(); - aTextFont.SetTransparent( TRUE ); + aTextFont.SetTransparent( sal_True ); aTextFont.SetWeight( WEIGHT_NORMAL ); aHeadFont = aTextFont; aHeadFont.SetWeight( WEIGHT_BOLD ); diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx index b8ea6cf3b..8c19cfd90 100644 --- a/sc/source/ui/view/imapwrap.cxx +++ b/sc/source/ui/view/imapwrap.cxx @@ -36,7 +36,7 @@ #include <sfx2/viewfrm.hxx> -USHORT ScIMapChildWindowId() +sal_uInt16 ScIMapChildWindowId() { return SvxIMapDlgChildWindow::GetChildWindowId(); } diff --git a/sc/source/ui/view/invmerge.cxx b/sc/source/ui/view/invmerge.cxx index 77af9751e..e0d4fb0fb 100644 --- a/sc/source/ui/view/invmerge.cxx +++ b/sc/source/ui/view/invmerge.cxx @@ -163,7 +163,7 @@ void ScInvertMerger::AddRect( const Rectangle& rRect ) } else { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( aJustified.Top() == aLineRect.Top() && aJustified.Bottom() == aLineRect.Bottom() ) { @@ -171,12 +171,12 @@ void ScInvertMerger::AddRect( const Rectangle& rRect ) if ( aJustified.Left() == aLineRect.Right() + 1 ) { aLineRect.Right() = aJustified.Right(); - bDone = TRUE; + bDone = sal_True; } else if ( aJustified.Right() + 1 == aLineRect.Left() ) // for RTL layout { aLineRect.Left() = aJustified.Left(); - bDone = TRUE; + bDone = sal_True; } } if (!bDone) diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx index 2ea78687b..184cf9b55 100644 --- a/sc/source/ui/view/notemark.cxx +++ b/sc/source/ui/view/notemark.cxx @@ -48,7 +48,7 @@ ScNoteMarker::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 ) : pWindow( pWin ), pRightWin( pRight ), pBottomWin( pBottom ), @@ -61,7 +61,7 @@ ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Windo bByKeyboard( bKeyboard ), pModel( NULL ), pObject( NULL ), - bVisible( FALSE ) + bVisible( sal_False ) { Size aSizePixel = pWindow->GetOutputSizePixel(); if( pRightWin ) @@ -104,7 +104,7 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG ) rOutliner.SetRefDevice(pPrinter); } - if( SdrPage* pPage = pModel->AllocPage( FALSE ) ) + if( SdrPage* pPage = pModel->AllocPage( sal_False ) ) { pObject = ScNoteUtil::CreateTempCaption( *pDoc, aDocPos, *pPage, aUserText, aVisRect, bLeft ); if( pObject ) @@ -114,7 +114,7 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG ) pModel->InsertPage( pPage ); } - bVisible = TRUE; + bVisible = sal_True; } Draw(); @@ -126,7 +126,7 @@ void lcl_DrawWin( SdrObject* pObject, Window* pWindow, const MapMode& rMap ) MapMode aOld = pWindow->GetMapMode(); pWindow->SetMapMode( rMap ); - ULONG nOldDrawMode = pWindow->GetDrawMode(); + sal_uLong nOldDrawMode = pWindow->GetDrawMode(); if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) { pWindow->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index 38fb5a12a..d89ed65ce 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -46,10 +46,10 @@ const long SC_OL_POSOFFSET = 2; const size_t SC_OL_NOLEVEL = static_cast< size_t >( -1 ); const size_t SC_OL_HEADERENTRY = static_cast< size_t >( -1 ); -const USHORT SC_OL_IMAGE_PLUS = 9; -const USHORT SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1; -const USHORT SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1; -const USHORT SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1; +const sal_uInt16 SC_OL_IMAGE_PLUS = 9; +const sal_uInt16 SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1; +const sal_uInt16 SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1; +const sal_uInt16 SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1; // ============================================================================ @@ -72,7 +72,7 @@ ScOutlineWindow::ScOutlineWindow( Window* pParent, ScOutlineMode eMode, ScViewDa mnFocusEntry( SC_OL_HEADERENTRY ), mbDontDrawFocus( false ) { - EnableRTL( FALSE ); // mirroring is done manually + EnableRTL( sal_False ); // mirroring is done manually InitSettings(); maFocusRect.SetEmpty(); @@ -94,7 +94,7 @@ ScOutlineWindow::~ScOutlineWindow() void ScOutlineWindow::SetHeaderSize( long nNewSize ) { - BOOL bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() ); + sal_Bool bLayoutRTL = GetDoc().IsLayoutRTL( GetTab() ); mbMirrorEntries = bLayoutRTL && mbHoriz; mbMirrorLevels = bLayoutRTL && !mbHoriz; @@ -178,7 +178,7 @@ const ScOutlineArray* ScOutlineWindow::GetOutlineArray() const const ScOutlineEntry* ScOutlineWindow::GetOutlineEntry( size_t nLevel, size_t nEntry ) const { const ScOutlineArray* pArray = GetOutlineArray(); - return pArray ? pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) ) : NULL; + return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : NULL; } bool ScOutlineWindow::IsHidden( SCCOLROW nColRowIndex ) const @@ -269,8 +269,8 @@ size_t ScOutlineWindow::GetLevelFromPos( long nLevelPos ) const long ScOutlineWindow::GetColRowPos( SCCOLROW nColRowIndex ) const { long nDocPos = mbHoriz ? - mrViewData.GetScrPos( static_cast<SCCOL>(nColRowIndex), 0, meWhich, TRUE ).X() : - mrViewData.GetScrPos( 0, static_cast<SCROW>(nColRowIndex), meWhich, TRUE ).Y(); + mrViewData.GetScrPos( static_cast<SCCOL>(nColRowIndex), 0, meWhich, sal_True ).X() : + mrViewData.GetScrPos( 0, static_cast<SCROW>(nColRowIndex), meWhich, sal_True ).Y(); return mnMainFirstPos + nDocPos; } @@ -413,13 +413,13 @@ bool ScOutlineWindow::ItemHit( const Point& rPos, size_t& rnLevel, size_t& rnEnt // --- expand/collapse buttons and expanded lines --- // search outline entries backwards - size_t nEntry = pArray->GetCount( sal::static_int_cast<USHORT>(nLevel) ); + size_t nEntry = pArray->GetCount( sal::static_int_cast<sal_uInt16>(nLevel) ); while ( nEntry ) { --nEntry; - const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel), - sal::static_int_cast<USHORT>(nEntry) ); + const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), + sal::static_int_cast<sal_uInt16>(nEntry) ); SCCOLROW nStart = pEntry->GetStart(); SCCOLROW nEnd = pEntry->GetEnd(); @@ -471,16 +471,16 @@ void ScOutlineWindow::DoFunction( size_t nLevel, size_t nEntry ) const { ScDBFunc& rFunc = *mrViewData.GetView(); if ( nEntry == SC_OL_HEADERENTRY ) - rFunc.SelectLevel( mbHoriz, sal::static_int_cast<USHORT>(nLevel) ); + rFunc.SelectLevel( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel) ); else { const ScOutlineEntry* pEntry = GetOutlineEntry( nLevel, nEntry ); if ( pEntry ) { if ( pEntry->IsHidden() ) - rFunc.ShowOutline( mbHoriz, sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) ); + rFunc.ShowOutline( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ); else - rFunc.HideOutline( mbHoriz, sal::static_int_cast<USHORT>(nLevel), sal::static_int_cast<USHORT>(nEntry) ); + rFunc.HideOutline( mbHoriz, sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ); } } } @@ -542,7 +542,7 @@ void ScOutlineWindow::DrawRectRel( DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) ); } -void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId ) +void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId ) { DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawImageRel - no images" ); const Image& rImage = mpSymbols->GetImage( nId ); @@ -559,7 +559,7 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed if ( GetImagePos( nLevel, nEntry, aPos ) ) { DBG_ASSERT( mpSymbols, "ScOutlineWindow::DrawBorderRel - no images" ); - USHORT nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED; + sal_uInt16 nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED; bool bClip = (nEntry != SC_OL_HEADERENTRY); if ( bClip ) SetEntryAreaClipRegion(); @@ -633,7 +633,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ ) { long nEntryPos = GetHeaderEntryPos(); for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel ) - DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< USHORT >( nLevel + 1 ) ); + DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< sal_uInt16 >( nLevel + 1 ) ); SetLineColor( maLineColor ); long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1)); @@ -652,7 +652,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ ) long nLevelPos = GetLevelPos( nLevel ); long nEntryPos1 = 0, nEntryPos2 = 0, nImagePos = 0; - size_t nEntryCount = pArray->GetCount( sal::static_int_cast<USHORT>(nLevel) ); + size_t nEntryCount = pArray->GetCount( sal::static_int_cast<sal_uInt16>(nLevel) ); size_t nEntry; // first draw all lines in the current level @@ -660,8 +660,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ ) SetFillColor( maLineColor ); for ( nEntry = 0; nEntry < nEntryCount; ++nEntry ) { - const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel), - sal::static_int_cast<USHORT>(nEntry) ); + const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), + sal::static_int_cast<sal_uInt16>(nEntry) ); SCCOLROW nStart = pEntry->GetStart(); SCCOLROW nEnd = pEntry->GetEnd(); @@ -693,8 +693,8 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ ) { --nEntry; - const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(nLevel), - sal::static_int_cast<USHORT>(nEntry) ); + const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), + sal::static_int_cast<sal_uInt16>(nEntry) ); SCCOLROW nStart = pEntry->GetStart(); // SCCOLROW nEnd = pEntry->GetEnd(); @@ -706,7 +706,7 @@ void ScOutlineWindow::Paint( const Rectangle& /* rRect */ ) // draw, if not hidden by higher levels if ( bDraw ) { - USHORT nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS; + sal_uInt16 nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS; DrawImageRel( nLevelPos, nImagePos, nImageId ); } } @@ -762,7 +762,7 @@ bool ScOutlineWindow::ImplMoveFocusByEntry( bool bForward, bool bFindVisible ) return false; bool bWrapped = false; - size_t nEntryCount = pArray->GetCount( sal::static_int_cast<USHORT>(mnFocusLevel) ); + size_t nEntryCount = pArray->GetCount( sal::static_int_cast<sal_uInt16>(mnFocusLevel) ); // #i29530# entry count may be decreased after changing active sheet if( mnFocusEntry >= nEntryCount ) mnFocusEntry = SC_OL_HEADERENTRY; @@ -813,8 +813,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward ) } else { - const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<USHORT>(mnFocusLevel), - sal::static_int_cast<USHORT>(mnFocusEntry) ); + const ScOutlineEntry* pEntry = pArray->GetEntry( sal::static_int_cast<sal_uInt16>(mnFocusLevel), + sal::static_int_cast<sal_uInt16>(mnFocusEntry) ); if ( pEntry ) { SCCOLROW nStart = pEntry->GetStart(); @@ -828,8 +828,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward ) // next level -> find first child entry nNewLevel = mnFocusLevel + 1; // TODO - change ScOutlineArray interface to size_t usage - USHORT nTmpEntry = 0; - bFound = pArray->GetEntryIndexInRange( sal::static_int_cast<USHORT>(nNewLevel), nStart, nEnd, nTmpEntry ); + sal_uInt16 nTmpEntry = 0; + bFound = pArray->GetEntryIndexInRange( sal::static_int_cast<sal_uInt16>(nNewLevel), nStart, nEnd, nTmpEntry ); nNewEntry = nTmpEntry; } else if ( !bForward && (mnFocusLevel > 0) ) @@ -837,8 +837,8 @@ bool ScOutlineWindow::ImplMoveFocusByLevel( bool bForward ) // previous level -> find parent entry nNewLevel = mnFocusLevel - 1; // TODO - change ScOutlineArray interface to size_t usage - USHORT nTmpEntry = 0; - bFound = pArray->GetEntryIndex( sal::static_int_cast<USHORT>(nNewLevel), nStart, nTmpEntry ); + sal_uInt16 nTmpEntry = 0; + bFound = pArray->GetEntryIndex( sal::static_int_cast<sal_uInt16>(nNewLevel), nStart, nTmpEntry ); nNewEntry = nTmpEntry; } @@ -1000,7 +1000,7 @@ void ScOutlineWindow::KeyInput( const KeyEvent& rKEvt ) bool bShift = (rKCode.GetModifier() == KEY_SHIFT); bool bCtrl = (rKCode.GetModifier() == KEY_MOD1); - USHORT nCode = rKCode.GetCode(); + sal_uInt16 nCode = rKCode.GetCode(); bool bUpDownKey = (nCode == KEY_UP) || (nCode == KEY_DOWN); bool bLeftRightKey = (nCode == KEY_LEFT) || (nCode == KEY_RIGHT); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index f0056c634..5a3df57b8 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -90,7 +90,7 @@ private: const ScAppOptions& rOpt; const ScStrCollection& rUsers; String aLastUserName; - USHORT nLastUserIndex; + sal_uInt16 nLastUserIndex; ColorData nColor; public: @@ -141,7 +141,7 @@ void ScActionColorChanger::Update( const ScChangeAction& rAction ) { aLastUserName = rAction.GetUser(); StrData aData(aLastUserName); - USHORT nIndex; + sal_uInt16 nIndex; if (!rUsers.Search(&aData, nIndex)) { // empty string is possible if a name wasn't found while saving a 5.0 file @@ -182,25 +182,25 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, pEditObj( NULL ), pViewShell( NULL ), pDrawView( NULL ), // #114135# - bEditMode( FALSE ), - bMetaFile( FALSE ), - bSingleGrid( FALSE ), - bPagebreakMode( FALSE ), - bSolidBackground( FALSE ), - bUseStyleColor( FALSE ), + bEditMode( sal_False ), + bMetaFile( sal_False ), + bSingleGrid( sal_False ), + bPagebreakMode( sal_False ), + bSolidBackground( sal_False ), + bUseStyleColor( sal_False ), bForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ), - bSyntaxMode( FALSE ), + bSyntaxMode( sal_False ), pValueColor( NULL ), pTextColor( NULL ), pFormulaColor( NULL ), aGridColor( COL_BLACK ), - bShowNullValues( TRUE ), - bShowFormulas( FALSE ), - bShowSpellErrors( FALSE ), - bMarkClipped( FALSE ), // FALSE fuer Drucker/Metafile etc. - bSnapPixel( FALSE ), - bAnyRotated( FALSE ), - bAnyClipped( FALSE ), + bShowNullValues( sal_True ), + bShowFormulas( sal_False ), + bShowSpellErrors( sal_False ), + bMarkClipped( sal_False ), // sal_False fuer Drucker/Metafile etc. + bSnapPixel( sal_False ), + bAnyRotated( sal_False ), + bAnyClipped( sal_False ), mpTargetPaintWindow(0) // #i74769# use SdrPaintWindow direct { if (pZoomX) @@ -261,27 +261,27 @@ void ScOutputData::SetGridColor( const Color& rColor ) aGridColor = rColor; } -void ScOutputData::SetMarkClipped( BOOL bSet ) +void ScOutputData::SetMarkClipped( sal_Bool bSet ) { bMarkClipped = bSet; } -void ScOutputData::SetShowNullValues( BOOL bSet ) +void ScOutputData::SetShowNullValues( sal_Bool bSet ) { bShowNullValues = bSet; } -void ScOutputData::SetShowFormulas( BOOL bSet ) +void ScOutputData::SetShowFormulas( sal_Bool bSet ) { bShowFormulas = bSet; } -void ScOutputData::SetShowSpellErrors( BOOL bSet ) +void ScOutputData::SetShowSpellErrors( sal_Bool bSet ) { bShowSpellErrors = bSet; } -void ScOutputData::SetSnapPixel( BOOL bSet ) +void ScOutputData::SetSnapPixel( sal_Bool bSet ) { bSnapPixel = bSet; } @@ -290,20 +290,20 @@ void ScOutputData::SetEditCell( SCCOL nCol, SCROW nRow ) { nEditCol = nCol; nEditRow = nRow; - bEditMode = TRUE; + bEditMode = sal_True; } -void ScOutputData::SetMetaFileMode( BOOL bNewMode ) +void ScOutputData::SetMetaFileMode( sal_Bool bNewMode ) { bMetaFile = bNewMode; } -void ScOutputData::SetSingleGrid( BOOL bNewMode ) +void ScOutputData::SetSingleGrid( sal_Bool bNewMode ) { bSingleGrid = bNewMode; } -void ScOutputData::SetSyntaxMode( BOOL bNewMode ) +void ScOutputData::SetSyntaxMode( sal_Bool bNewMode ) { bSyntaxMode = bNewMode; if (bNewMode) @@ -315,7 +315,7 @@ void ScOutputData::SetSyntaxMode( BOOL bNewMode ) } } -void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) +void ScOutputData::DrawGrid( sal_Bool bGrid, sal_Bool bPage ) { SCCOL nX; SCROW nY; @@ -325,12 +325,12 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) ScBreakType nBreak = BREAK_NONE; ScBreakType nBreakOld = BREAK_NONE; - BOOL bSingle; + sal_Bool bSingle; Color aPageColor; Color aManualColor; if (bPagebreakMode) - bPage = FALSE; // keine "normalen" Umbrueche ueber volle Breite/Hoehe + bPage = sal_False; // keine "normalen" Umbrueche ueber volle Breite/Hoehe //! um den einen Pixel sieht das Metafile (oder die Druck-Ausgabe) anders aus //! als die Bildschirmdarstellung, aber wenigstens passen Druck und Metafile zusammen @@ -371,7 +371,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) { SCCOL nXplus1 = nX+1; SCCOL nXplus2 = nX+2; - USHORT nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth; + sal_uInt16 nWidth = pRowInfo[0].pCellInfo[nXplus1].nWidth; if (nWidth) { nPosX += nWidth * nLayoutSign; @@ -399,7 +399,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) } } - BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt + sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt //! Mit dieser Abfrage wird zuviel weggelassen, wenn ein automatischer //! Umbruch mitten in den Wiederholungsspalten liegt. @@ -409,13 +409,13 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) if ( eType == OUTTYPE_PRINTER && !bMetaFile ) { if ( nX == MAXCOL ) - bDraw = FALSE; + bDraw = sal_False; else if (pDoc->HasColBreak(nXplus1, nTab)) - bDraw = FALSE; + bDraw = sal_False; } #endif - USHORT nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth; + sal_uInt16 nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth; bSingle = bSingleGrid; //! in Fillinfo holen !!!!! if ( nX<MAXCOL && !bSingle ) { @@ -423,9 +423,9 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) for (nArrY=1; nArrY+1<nArrCount && !bSingle; nArrY++) { if (pRowInfo[nArrY].pCellInfo[nXplus2].bHOverlapped) - bSingle = TRUE; + bSingle = sal_True; if (pRowInfo[nArrY].pCellInfo[nXplus1].bHideGrid) - bSingle = TRUE; + bSingle = sal_True; } } @@ -444,7 +444,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) RowInfo* pThisRowInfo = &pRowInfo[nArrY]; nNextY = nPosY + pThisRowInfo->nHeight; - BOOL bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid; + sal_Bool bHOver = pThisRowInfo->pCellInfo[nXplus1].bHideGrid; if (!bHOver) { if (nWidthXplus2) @@ -528,7 +528,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) } } - BOOL bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt + sal_Bool bDraw = bGrid || nBreakOld; // einfaches Gitter nur wenn eingestellt //! Mit dieser Abfrage wird zuviel weggelassen, wenn ein automatischer //! Umbruch mitten in den Wiederholungszeilen liegt. @@ -538,18 +538,18 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) if ( eType == OUTTYPE_PRINTER && !bMetaFile ) { if ( nY == MAXROW ) - bDraw = FALSE; + bDraw = sal_False; else if (pDoc->HasRowBreak(nYplus1, nTab)) - bDraw = FALSE; + bDraw = sal_False; } #endif - BOOL bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1); + sal_Bool bNextYisNextRow = (pRowInfo[nArrYplus1].nRowNo == nYplus1); bSingle = !bNextYisNextRow; // Hidden for (SCCOL i=nX1; i<=nX2 && !bSingle; i++) { if (pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped) - bSingle = TRUE; + bSingle = sal_True; } if (bDraw) @@ -568,7 +568,7 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) nNextX = nPosX + pRowInfo[0].pCellInfo[i+1].nWidth * nLayoutSign; if (nNextX != nPosX) // sichtbar { - BOOL bVOver; + sal_Bool bVOver; if ( bNextYisNextRow ) bVOver = pRowInfo[nArrYplus1].pCellInfo[i+1].bVOverlapped; else @@ -608,15 +608,15 @@ void ScOutputData::DrawGrid( BOOL bGrid, BOOL bPage ) void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData ) { - bPagebreakMode = TRUE; + bPagebreakMode = sal_True; if (!pPageData) return; // noch nicht initialisiert -> alles "nicht gedruckt" // gedruckten Bereich markieren - // (in FillInfo ist schon alles auf FALSE initialisiert) + // (in FillInfo ist schon alles auf sal_False initialisiert) - USHORT nRangeCount = sal::static_int_cast<USHORT>(pPageData->GetCount()); - for (USHORT nPos=0; nPos<nRangeCount; nPos++) + sal_uInt16 nRangeCount = sal::static_int_cast<sal_uInt16>(pPageData->GetCount()); + for (sal_uInt16 nPos=0; nPos<nRangeCount; nPos++) { ScRange aRange = pPageData->GetData( nPos ).GetPrintRange(); @@ -632,7 +632,7 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData ) pThisRowInfo->nRowNo <= nEndY ) { for (SCCOL nX=nStartX; nX<=nEndX; nX++) - pThisRowInfo->pCellInfo[nX+1].bPrinted = TRUE; + pThisRowInfo->pCellInfo[nX+1].bPrinted = sal_True; } } } @@ -669,11 +669,11 @@ void ScOutputData::FindRotated() if ( pPattern ) // Spalte nicht ausgeblendet { - BYTE nDir = pPattern->GetRotateDir( pCondSet ); + sal_uInt8 nDir = pPattern->GetRotateDir( pCondSet ); if (nDir != SC_ROTDIR_NONE) { pInfo->nRotateDir = nDir; - bAnyRotated = TRUE; + bAnyRotated = sal_True; } } } @@ -683,12 +683,12 @@ void ScOutputData::FindRotated() // ---------------------------------------------------------------------------- -USHORT lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) +sal_uInt16 lcl_GetRotateDir( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) { const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab ); const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab ); - USHORT nRet = SC_ROTDIR_NONE; + sal_uInt16 nRet = SC_ROTDIR_NONE; long nAttrRotate = pPattern->GetRotateVal( pCondSet ); if ( nAttrRotate ) @@ -723,7 +723,7 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow const SvxBrushItem* pBackground = (const SvxBrushItem*) &pPattern->GetItem( ATTR_BACKGROUND, pCondSet ); - USHORT nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab ); + sal_uInt16 nDir = lcl_GetRotateDir( pDoc, nCol, nRow, nTab ); // CENTER wird wie RIGHT behandelt... if ( nDir == SC_ROTDIR_RIGHT || nDir == SC_ROTDIR_CENTER ) @@ -756,12 +756,12 @@ const SvxBrushItem* lcl_FindBackground( ScDocument* pDoc, SCCOL nCol, SCROW nRow // ---------------------------------------------------------------------------- -BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther, - SCCOL nX1, SCCOL nX2, BOOL bShowProt, BOOL bPagebreakMode ) +sal_Bool lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther, + SCCOL nX1, SCCOL nX2, sal_Bool bShowProt, sal_Bool bPagebreakMode ) { if ( rFirst.bChanged != rOther.bChanged || rFirst.bEmptyBack != rOther.bEmptyBack ) - return FALSE; + return sal_False; SCCOL nX; if ( bShowProt ) @@ -772,27 +772,27 @@ BOOL lcl_EqualBack( const RowInfo& rFirst, const RowInfo& rOther, const ScPatternAttr* pPat2 = rOther.pCellInfo[nX+1].pPatternAttr; if ( !pPat1 || !pPat2 || &pPat1->GetItem(ATTR_PROTECTION) != &pPat2->GetItem(ATTR_PROTECTION) ) - return FALSE; + return sal_False; } } else { for ( nX=nX1; nX<=nX2; nX++ ) if ( rFirst.pCellInfo[nX+1].pBackground != rOther.pCellInfo[nX+1].pBackground ) - return FALSE; + return sal_False; } if ( rFirst.nRotMaxCol != SC_ROTMAX_NONE || rOther.nRotMaxCol != SC_ROTMAX_NONE ) for ( nX=nX1; nX<=nX2; nX++ ) if ( rFirst.pCellInfo[nX+1].nRotateDir != rOther.pCellInfo[nX+1].nRotateDir ) - return FALSE; + return sal_False; if ( bPagebreakMode ) for ( nX=nX1; nX<=nX2; nX++ ) if ( rFirst.pCellInfo[nX+1].bPrinted != rOther.pCellInfo[nX+1].bPrinted ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } void ScOutputData::DrawBackground() @@ -817,11 +817,11 @@ void ScOutputData::DrawBackground() pDev->SetLineColor(); - BOOL bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab); - BOOL bDoAll = bShowProt || bPagebreakMode || bSolidBackground; + sal_Bool bShowProt = bSyntaxMode && pDoc->IsTabProtected(nTab); + sal_Bool bDoAll = bShowProt || bPagebreakMode || bSolidBackground; - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); long nPosY = nScrY; @@ -934,16 +934,16 @@ void ScOutputData::DrawBackground() void ScOutputData::DrawShadow() { - DrawExtraShadow( FALSE, FALSE, FALSE, FALSE ); + DrawExtraShadow( sal_False, sal_False, sal_False, sal_False ); } -void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom) +void ScOutputData::DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom) { pDev->SetLineColor(); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); Color aAutoTextColor; if ( bCellContrast ) aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); @@ -960,8 +960,8 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot long nPosY = nScrY - pRowInfo[0].nHeight; for (SCSIZE nArrY=0; nArrY<nArrCount; nArrY++) { - BOOL bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount ); - BOOL bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom ); + sal_Bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 == nArrCount ); + sal_Bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 == nArrCount && !bBottom ); RowInfo* pThisRowInfo = &pRowInfo[nArrY]; long nRowHeight = pThisRowInfo->nHeight; @@ -971,10 +971,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot long nPosX = nInitPosX - pRowInfo[0].pCellInfo[nX1].nWidth * nLayoutSign; for (SCCOL nArrX=nX1; nArrX<=nX2+2; nArrX++) { - BOOL bCornerX = ( nArrX==nX1 || nArrX==nX2+2 ); - BOOL bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight ); + sal_Bool bCornerX = ( nArrX==nX1 || nArrX==nX2+2 ); + sal_Bool bSkipX = ( nArrX==nX1 && !bLeft ) || ( nArrX==nX2+2 && !bRight ); - for (USHORT nPass=0; nPass<2; nPass++) // horizontal / vertikal + for (sal_uInt16 nPass=0; nPass<2; nPass++) // horizontal / vertikal { const SvxShadowItem* pAttr = nPass ? pThisRowInfo->pCellInfo[nArrX].pVShadowOrigin : @@ -985,10 +985,10 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot pThisRowInfo->pCellInfo[nArrX].eVShadowPart : pThisRowInfo->pCellInfo[nArrX].eHShadowPart; - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; if ( (nPass==0 && bCornerX) || (nPass==1 && bCornerY) ) if ( ePart != SC_SHADOW_CORNER ) - bDo = FALSE; + bDo = sal_False; if (bDo) { @@ -1145,20 +1145,20 @@ long lclGetSnappedY( OutputDevice& rDev, long nPosY, bool bSnapPixel ) return (bSnapPixel && nPosY) ? rDev.PixelToLogic( rDev.LogicToPixel( Size( 0, nPosY ) ) ).Height() : nPosY; } -size_t lclGetArrayColFromCellInfoX( USHORT nCellInfoX, USHORT nCellInfoFirstX, USHORT nCellInfoLastX, bool bRTL ) +size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoFirstX, sal_uInt16 nCellInfoLastX, bool bRTL ) { return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) ); } void ScOutputData::DrawFrame() { - ULONG nOldDrawMode = pDev->GetDrawMode(); + sal_uLong nOldDrawMode = pDev->GetDrawMode(); Color aSingleColor; - BOOL bUseSingleColor = FALSE; + sal_Bool bUseSingleColor = sal_False; const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); // #107519# if a Calc OLE object is embedded in Draw/Impress, the VCL DrawMode is used // for display mode / B&W printing. The VCL DrawMode handling doesn't work for lines @@ -1169,18 +1169,18 @@ void ScOutputData::DrawFrame() { pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_WHITEFILL) ); aSingleColor.SetColor( COL_BLACK ); - bUseSingleColor = TRUE; + bUseSingleColor = sal_True; } else if ( ( nOldDrawMode & DRAWMODE_SETTINGSFILL ) && ( nOldDrawMode & DRAWMODE_SETTINGSLINE ) ) { pDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) ); aSingleColor = rStyleSettings.GetWindowTextColor(); // same as used in VCL for DRAWMODE_SETTINGSLINE - bUseSingleColor = TRUE; + bUseSingleColor = sal_True; } else if ( bCellContrast ) { aSingleColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor ); - bUseSingleColor = TRUE; + bUseSingleColor = sal_True; } const Color* pForceColor = bUseSingleColor ? &aSingleColor : 0; @@ -1229,7 +1229,7 @@ void ScOutputData::DrawFrame() // set X offset for left-to-right sheets; for right-to-left sheets this is done after for() loop if( !bLayoutRTL ) rArray.SetXOffset( nOldSnapX ); - for( USHORT nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx ) + for( sal_uInt16 nInfoIdx = nX1; nInfoIdx <= nX2 + 2; ++nInfoIdx ) { size_t nCol = lclGetArrayColFromCellInfoX( nInfoIdx, nX1, nX2, bLayoutRTL ); long nNewPosX = nOldPosX + pRowInfo[ 0 ].pCellInfo[ nInfoIdx ].nWidth * nLayoutSign; @@ -1273,13 +1273,13 @@ void ScOutputData::DrawFrame() // Linie unter der Zelle const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc, - SCCOL nCol, SCROW nRow, SCTAB nTab, USHORT nRotDir, - BOOL bTopLine ) + SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nRotDir, + sal_Bool bTopLine ) { if ( nRotDir != SC_ROTDIR_LEFT && nRotDir != SC_ROTDIR_RIGHT ) return NULL; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while (!bFound) { if ( nRotDir == SC_ROTDIR_LEFT ) @@ -1303,7 +1303,7 @@ const SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc, if ( !pPattern->GetRotateVal( pCondSet ) || ((const SvxRotateModeItem&)pPattern->GetItem( ATTR_ROTATE_MODE, pCondSet)).GetValue() == SVX_ROTATE_MODE_STANDARD ) - bFound = TRUE; + bFound = sal_True; } if (bTopLine) @@ -1421,8 +1421,8 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) const SfxItemSet* pCondSet; const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); // color (pForceColor) is determined externally, including DrawMode changes @@ -1470,7 +1470,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) { if (nX==nX1) nPosX = nInitPosX; // calculated individually for preceding positions - USHORT nArrX = nX + 1; + sal_uInt16 nArrX = nX + 1; CellInfo* pInfo = &rThisRowInfo.pCellInfo[nArrX]; long nColWidth = pRowInfo[0].pCellInfo[nArrX].nWidth; @@ -1628,7 +1628,7 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) nX = nX1 > 0 ? (nX1-1) : static_cast<SCCOL>(0); for (; nX<=nX2+1; nX++) // sichtbarer Teil +- 1 { - USHORT nArrX = nX + 1; + sal_uInt16 nArrX = nX + 1; CellInfo& rInfo = rThisRowInfo.pCellInfo[nArrX]; if ( rInfo.nRotateDir > SC_ROTDIR_STANDARD && !rInfo.bHOverlapped && !rInfo.bVOverlapped ) @@ -1642,17 +1642,17 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) // horizontal: angrenzende Linie verlaengern // (nur, wenn die gedrehte Zelle eine Umrandung hat) - USHORT nDir = rInfo.nRotateDir; + sal_uInt16 nDir = rInfo.nRotateDir; if ( rArray.GetCellStyleTop( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_TOP ) { - svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, TRUE ), nPPTY ); + svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, sal_True ), nPPTY ); rArray.SetCellStyleTop( nCol, nRow, aStyle ); if( nRow > 0 ) rArray.SetCellStyleBottom( nCol, nRow - 1, aStyle ); } if ( rArray.GetCellStyleBottom( nCol, nRow ).Prim() && eRotMode != SVX_ROTATE_MODE_BOTTOM ) { - svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, FALSE ), nPPTY ); + svx::frame::Style aStyle( lcl_FindHorLine( pDoc, nX, nY, nTab, nDir, sal_False ), nPPTY ); rArray.SetCellStyleBottom( nCol, nRow, aStyle ); if( nRow + 1 < rArray.GetRowCount() ) rArray.SetCellStyleTop( nCol, nRow + 1, aStyle ); @@ -1697,7 +1697,7 @@ PolyPolygon ScOutputData::GetChangedArea() aDrawingRect.Left() = nScrX; aDrawingRect.Right() = nScrX+nScrW-1; - BOOL bHad = FALSE; + sal_Bool bHad = sal_False; long nPosY = nScrY; SCSIZE nArrY; for (nArrY=1; nArrY+1<nArrCount; nArrY++) @@ -1709,14 +1709,14 @@ PolyPolygon ScOutputData::GetChangedArea() if (!bHad) { aDrawingRect.Top() = nPosY; - bHad = TRUE; + bHad = sal_True; } aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1; } else if (bHad) { aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) ); - bHad = FALSE; + bHad = sal_False; } nPosY += pRowInfo[nArrY].nHeight; } @@ -1727,7 +1727,7 @@ PolyPolygon ScOutputData::GetChangedArea() return aPoly; } -BOOL ScOutputData::SetChangedClip() +sal_Bool ScOutputData::SetChangedClip() { PolyPolygon aPoly; @@ -1735,7 +1735,7 @@ BOOL ScOutputData::SetChangedClip() aDrawingRect.Left() = nScrX; aDrawingRect.Right() = nScrX+nScrW-1; - BOOL bHad = FALSE; + sal_Bool bHad = sal_False; long nPosY = nScrY; SCSIZE nArrY; for (nArrY=1; nArrY+1<nArrCount; nArrY++) @@ -1747,14 +1747,14 @@ BOOL ScOutputData::SetChangedClip() if (!bHad) { aDrawingRect.Top() = nPosY; - bHad = TRUE; + bHad = sal_True; } aDrawingRect.Bottom() = nPosY + pRowInfo[nArrY].nHeight - 1; } else if (bHad) { aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) ); - bHad = FALSE; + bHad = sal_False; } nPosY += pRowInfo[nArrY].nHeight; } @@ -1762,7 +1762,7 @@ BOOL ScOutputData::SetChangedClip() if (bHad) aPoly.Insert( Polygon( pDev->PixelToLogic(aDrawingRect) ) ); - BOOL bRet = (aPoly.Count() != 0); + sal_Bool bRet = (aPoly.Count() != 0); if (bRet) pDev->SetClipRegion(Region(aPoly)); return bRet; @@ -1773,12 +1773,12 @@ void ScOutputData::FindChanged() SCCOL nX; SCSIZE nArrY; - BOOL bWasIdleDisabled = pDoc->IsIdleDisabled(); - pDoc->DisableIdle( TRUE ); + sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled(); + pDoc->DisableIdle( sal_True ); for (nArrY=0; nArrY<nArrCount; nArrY++) - pRowInfo[nArrY].bChanged = FALSE; + pRowInfo[nArrY].bChanged = sal_False; - BOOL bProgress = FALSE; + sal_Bool bProgress = sal_False; for (nArrY=0; nArrY<nArrCount; nArrY++) { RowInfo* pThisRowInfo = &pRowInfo[nArrY]; @@ -1791,22 +1791,22 @@ void ScOutputData::FindChanged() ScFormulaCell* pFCell = (ScFormulaCell*)pCell; if ( !bProgress && pFCell->GetDirty() ) { - ScProgress::CreateInterpretProgress( pDoc, TRUE ); - bProgress = TRUE; + ScProgress::CreateInterpretProgress( pDoc, sal_True ); + bProgress = sal_True; } if (!pFCell->IsRunning()) { (void)pFCell->GetValue(); if (pFCell->IsChanged()) { - pThisRowInfo->bChanged = TRUE; + pThisRowInfo->bChanged = sal_True; if ( pThisRowInfo->pCellInfo[nX+1].bMerged ) { SCSIZE nOverY = nArrY + 1; while ( nOverY<nArrCount && pRowInfo[nOverY].pCellInfo[nX+1].bVOverlapped ) { - pRowInfo[nOverY].bChanged = TRUE; + pRowInfo[nOverY].bChanged = sal_True; ++nOverY; } } @@ -1843,7 +1843,7 @@ void ScOutputData::DrawMark( Window* pWin ) else aRect.Right() = aRect.Left() - 1; - BOOL bOldMarked = FALSE; + sal_Bool bOldMarked = sal_False; for (SCCOL nX=nX1; nX<=nX2; nX++) { if (pThisRowInfo->pCellInfo[nX+1].bMarked != bOldMarked) @@ -1880,7 +1880,7 @@ void ScOutputData::DrawMark( Window* pWin ) void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, - const Color& rColor, BOOL bHandle ) + const Color& rColor, sal_Bool bHandle ) { PutInOrder( nRefStartX, nRefEndX ); PutInOrder( nRefStartY, nRefEndY ); @@ -1903,14 +1903,14 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, } long nLayoutSign = bLayoutRTL ? -1 : 1; - BOOL bTop = FALSE; - BOOL bBottom = FALSE; - BOOL bLeft = FALSE; - BOOL bRight = FALSE; + sal_Bool bTop = sal_False; + sal_Bool bBottom = sal_False; + sal_Bool bLeft = sal_False; + sal_Bool bRight = sal_False; long nPosY = nScrY; - BOOL bNoStartY = ( nY1 < nRefStartY ); - BOOL bNoEndY = FALSE; + sal_Bool bNoStartY = ( nY1 < nRefStartY ); + sal_Bool bNoEndY = sal_False; for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check { SCROW nY = pRowInfo[nArrY].nRowNo; @@ -1918,17 +1918,17 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) ) { nMinY = nPosY; - bTop = TRUE; + bTop = sal_True; } if ( nY==nRefEndY ) { nMaxY = nPosY + pRowInfo[nArrY].nHeight - 2; - bBottom = TRUE; + bBottom = sal_True; } if ( nY>nRefEndY && bNoEndY ) { nMaxY = nPosY-2; - bBottom = TRUE; + bBottom = sal_True; } bNoStartY = ( nY < nRefStartY ); bNoEndY = ( nY < nRefEndY ); @@ -1944,12 +1944,12 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, if ( nX==nRefStartX ) { nMinX = nPosX; - bLeft = TRUE; + bLeft = sal_True; } if ( nX==nRefEndX ) { nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 2 ) * nLayoutSign; - bRight = TRUE; + bRight = sal_True; } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; } @@ -1986,7 +1986,7 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY, void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, - const Color& rColor, USHORT nType ) + const Color& rColor, sal_uInt16 nType ) { PutInOrder( nRefStartX, nRefEndX ); PutInOrder( nRefStartY, nRefEndY ); @@ -2009,14 +2009,14 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, } long nLayoutSign = bLayoutRTL ? -1 : 1; - BOOL bTop = FALSE; - BOOL bBottom = FALSE; - BOOL bLeft = FALSE; - BOOL bRight = FALSE; + sal_Bool bTop = sal_False; + sal_Bool bBottom = sal_False; + sal_Bool bLeft = sal_False; + sal_Bool bRight = sal_False; long nPosY = nScrY; - BOOL bNoStartY = ( nY1 < nRefStartY ); - BOOL bNoEndY = FALSE; + sal_Bool bNoStartY = ( nY1 < nRefStartY ); + sal_Bool bNoEndY = sal_False; for (SCSIZE nArrY=1; nArrY<nArrCount; nArrY++) // loop to end for bNoEndY check { SCROW nY = pRowInfo[nArrY].nRowNo; @@ -2024,17 +2024,17 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) ) { nMinY = nPosY - 1; - bTop = TRUE; + bTop = sal_True; } if ( nY==nRefEndY ) { nMaxY = nPosY + pRowInfo[nArrY].nHeight - 1; - bBottom = TRUE; + bBottom = sal_True; } if ( nY>nRefEndY && bNoEndY ) { nMaxY = nPosY - 1; - bBottom = TRUE; + bBottom = sal_True; } bNoStartY = ( nY < nRefStartY ); bNoEndY = ( nY < nRefEndY ); @@ -2050,12 +2050,12 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, if ( nX==nRefStartX ) { nMinX = nPosX - nLayoutSign; - bLeft = TRUE; + bLeft = sal_True; } if ( nX==nRefEndX ) { nMaxX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 1 ) * nLayoutSign; - bRight = TRUE; + bRight = sal_True; } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; } @@ -2064,9 +2064,9 @@ void ScOutputData::DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY, nMaxY >= nMinY ) { if ( nType == SC_CAT_DELETE_ROWS ) - bLeft = bRight = bBottom = FALSE; //! dicke Linie ??? + bLeft = bRight = bBottom = sal_False; //! dicke Linie ??? else if ( nType == SC_CAT_DELETE_COLS ) - bTop = bBottom = bRight = FALSE; //! dicke Linie ??? + bTop = bBottom = bRight = sal_False; //! dicke Linie ??? pDev->SetLineColor( rColor ); if (bTop && bBottom && bLeft && bRight) @@ -2143,7 +2143,7 @@ void ScOutputData::DrawChangeTrack() aColorChanger.Update( *pAction ); Color aColor( aColorChanger.GetColor() ); DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(), - aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) ); + aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) ); } } @@ -2159,7 +2159,7 @@ void ScOutputData::DrawChangeTrack() aColorChanger.Update( *pAction ); Color aColor( aColorChanger.GetColor() ); DrawOneChange( aRange.aStart.Col(), aRange.aStart.Row(), - aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<USHORT>(eActionType) ); + aRange.aEnd.Col(), aRange.aEnd.Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) ); } } } @@ -2170,7 +2170,7 @@ void ScOutputData::DrawChangeTrack() void ScOutputData::DrawNoteMarks() { - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; long nInitPosX = nScrX; if ( bLayoutRTL ) @@ -2188,12 +2188,12 @@ void ScOutputData::DrawNoteMarks() { CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1]; ScBaseCell* pCell = pInfo->pCell; - BOOL bIsMerged = FALSE; + sal_Bool bIsMerged = sal_False; if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped ) { // find start of merged cell - bIsMerged = TRUE; + bIsMerged = sal_True; SCROW nY = pRowInfo[nArrY].nRowNo; SCCOL nMergeX = nX; SCROW nMergeY = nY; @@ -2215,7 +2215,7 @@ void ScOutputData::DrawNoteMarks() else pDev->SetFillColor(COL_LIGHTRED); - bFirst = FALSE; + bFirst = sal_False; } long nMarkX = nPosX + ( pRowInfo[0].pCellInfo[nX+1].nWidth - 4 ) * nLayoutSign; @@ -2266,7 +2266,7 @@ void ScOutputData::AddPDFNotes() { CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1]; ScBaseCell* pCell = pInfo->pCell; - BOOL bIsMerged = FALSE; + sal_Bool bIsMerged = sal_False; SCROW nY = pRowInfo[nArrY].nRowNo; SCCOL nMergeX = nX; SCROW nMergeY = nY; @@ -2274,7 +2274,7 @@ void ScOutputData::AddPDFNotes() if ( nX==nX1 && pInfo->bHOverlapped && !pInfo->bVOverlapped ) { // find start of merged cell - bIsMerged = TRUE; + bIsMerged = sal_True; pDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab ); pCell = pDoc->GetCell( ScAddress(nMergeX,nMergeY,nTab) ); // use origin's pCell for NotePtr test below @@ -2334,7 +2334,7 @@ void ScOutputData::DrawClipMarks() Color aArrowFillCol( COL_LIGHTRED ); - ULONG nOldDrawMode = pDev->GetDrawMode(); + sal_uLong nOldDrawMode = pDev->GetDrawMode(); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); if ( bUseStyleColor && rStyleSettings.GetHighContrastMode() ) { @@ -2447,7 +2447,7 @@ void ScOutputData::DrawClipMarks() pDev->DrawRect(aMarkRect); //! Test #endif - SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, TRUE ); + SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, sal_True ); } if ( pInfo->nClipMark & ( bLayoutRTL ? SC_CLIPMARK_LEFT : SC_CLIPMARK_RIGHT ) ) { @@ -2460,7 +2460,7 @@ void ScOutputData::DrawClipMarks() pDev->DrawRect(aMarkRect); //! Test #endif - SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, FALSE ); + SvxFont::DrawArrow( *pDev, aMarkRect, aMarkSize, aArrowFillCol, sal_False ); } } nPosX += pRowInfo[0].pCellInfo[nX+1].nWidth * nLayoutSign; diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index aff5a5abe..65a011fec 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -84,7 +84,7 @@ #define DRAWTEXT_MAX 32767 -const USHORT SC_SHRINKAGAIN_MAX = 7; +const sal_uInt16 SC_SHRINKAGAIN_MAX = 7; // STATIC DATA ----------------------------------------------------------- @@ -105,8 +105,8 @@ class ScDrawStringsVars SvxCellHorJustify eAttrHorJust; SvxCellVerJustify eAttrVerJust; const SvxMarginItem* pMargin; - USHORT nIndent; - BOOL bRotated; + sal_uInt16 nIndent; + sal_Bool bRotated; String aString; // Inhalte Size aTextSize; @@ -117,28 +117,28 @@ class ScDrawStringsVars long nExpWidth; ScBaseCell* pLastCell; - ULONG nValueFormat; - BOOL bLineBreak; - BOOL bRepeat; - BOOL bShrink; + sal_uLong nValueFormat; + sal_Bool bLineBreak; + sal_Bool bRepeat; + sal_Bool bShrink; - BOOL bPixelToLogic; - BOOL bCellContrast; + sal_Bool bPixelToLogic; + sal_Bool bCellContrast; Color aBackConfigColor; // used for ScPatternAttr::GetFont calls Color aTextConfigColor; public: - ScDrawStringsVars(ScOutputData* pData, BOOL bPTL); + ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL); ~ScDrawStringsVars(); // SetPattern = ex-SetVars // SetPatternSimple: ohne Font - void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, BYTE nScript ); + void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, sal_uInt8 nScript ); void SetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* pSet ); - BOOL SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen + sal_Bool SetText( ScBaseCell* pCell ); // sal_True -> pOldPattern vergessen void SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth ); void SetAutoText( const String& rAutoText ); @@ -148,26 +148,26 @@ public: SvxCellVerJustify GetVerJust() const { return eAttrVerJust; } const SvxMarginItem* GetMargin() const { return pMargin; } - USHORT GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; } + sal_uInt16 GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; } const String& GetString() const { return aString; } const Size& GetTextSize() const { return aTextSize; } long GetOriginalWidth() const { return nOriginalWidth; } - ULONG GetValueFormat() const { return nValueFormat; } - BOOL GetLineBreak() const { return bLineBreak; } - BOOL IsRepeat() const { return bRepeat; } - BOOL IsShrink() const { return bShrink; } + sal_uLong GetValueFormat() const { return nValueFormat; } + sal_Bool GetLineBreak() const { return bLineBreak; } + sal_Bool IsRepeat() const { return bRepeat; } + sal_Bool IsShrink() const { return bShrink; } long GetAscent() const { return nAscentPixel; } - BOOL IsRotated() const { return bRotated; } + sal_Bool IsRotated() const { return bRotated; } - void SetShrinkScale( long nScale, BYTE nScript ); + void SetShrinkScale( long nScale, sal_uInt8 nScript ); - BOOL HasCondHeight() const { return pCondSet && SFX_ITEM_SET == - pCondSet->GetItemState( ATTR_FONT_HEIGHT, TRUE ); } + sal_Bool HasCondHeight() const { return pCondSet && SFX_ITEM_SET == + pCondSet->GetItemState( ATTR_FONT_HEIGHT, sal_True ); } - BOOL HasEditCharacters() const; + sal_Bool HasEditCharacters() const; private: void SetHashText(); @@ -180,7 +180,7 @@ private: //================================================================== -ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) : +ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, sal_Bool bPTL) : pOutput ( pData ), pPattern ( NULL ), pCondSet ( NULL ), @@ -189,7 +189,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) : eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ), pMargin ( NULL ), nIndent ( 0 ), - bRotated ( FALSE ), + bRotated ( sal_False ), nOriginalWidth( 0 ), nMaxDigitWidth( 0 ), nSignWidth( 0 ), @@ -197,13 +197,13 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) : nExpWidth( 0 ), pLastCell ( NULL ), nValueFormat( 0 ), - bLineBreak ( FALSE ), - bRepeat ( FALSE ), - bShrink ( FALSE ), + bLineBreak ( sal_False ), + bRepeat ( sal_False ), + bShrink ( sal_False ), bPixelToLogic( bPTL ) { 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) bCellContrast = pOutput->bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -216,7 +216,7 @@ ScDrawStringsVars::~ScDrawStringsVars() { } -void ScDrawStringsVars::SetShrinkScale( long nScale, BYTE nScript ) +void ScDrawStringsVars::SetShrinkScale( long nScale, sal_uInt8 nScript ) { // text remains valid, size is updated @@ -259,7 +259,7 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, BYTE nScript ) } void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, - ScBaseCell* pCell, BYTE nScript ) + ScBaseCell* pCell, sal_uInt8 nScript ) { nMaxDigitWidth = 0; nSignWidth = 0; @@ -335,20 +335,20 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* break; case SVX_ORIENTATION_STACKED: nRot = 0; - bRotated = FALSE; + bRotated = sal_False; break; case SVX_ORIENTATION_TOPBOTTOM: nRot = 2700; - bRotated = FALSE; + bRotated = sal_False; break; case SVX_ORIENTATION_BOTTOMTOP: nRot = 900; - bRotated = FALSE; + bRotated = sal_False; break; default: DBG_ERROR("Falscher SvxCellOrientation Wert"); nRot = 0; - bRotated = FALSE; + bRotated = sal_False; break; } aFont.SetOrientation( nRot ); @@ -390,7 +390,7 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* // Zahlenformat -// ULONG nOld = nValueFormat; +// sal_uLong nOld = nValueFormat; nValueFormat = pPattern->GetNumberFormat( pOutput->pDoc->GetFormatTable(), pCondSet ); /* s.u. @@ -428,13 +428,13 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt // Zahlenformat - ULONG nOld = nValueFormat; + sal_uLong nOld = nValueFormat; // nValueFormat = pPattern->GetNumberFormat( pFormatter ); const SfxPoolItem* pFormItem; - if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,TRUE,&pFormItem) != SFX_ITEM_SET ) + if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,sal_True,&pFormItem) != SFX_ITEM_SET ) pFormItem = &pPattern->GetItem(ATTR_VALUE_FORMAT); const SfxPoolItem* pLangItem; - if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,TRUE,&pLangItem) != SFX_ITEM_SET ) + if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,sal_True,&pLangItem) != SFX_ITEM_SET ) pLangItem = &pPattern->GetItem(ATTR_LANGUAGE_FORMAT); nValueFormat = pOutput->pDoc->GetFormatTable()->GetFormatForLanguageIfBuiltIn( ((SfxUInt32Item*)pFormItem)->GetValue(), @@ -457,16 +457,16 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt bShrink = static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue(); } -inline BOOL SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0 +inline sal_Bool SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0 { return pOldCell && pOldCell->GetCellType() == CELLTYPE_VALUE && pCell->GetCellType() == CELLTYPE_VALUE && ((ScValueCell*)pCell)->GetValue() == ((ScValueCell*)pOldCell)->GetValue(); } -BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell ) +sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; if (pCell) { @@ -475,7 +475,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell ) pLastCell = pCell; // Zelle merken Color* pColor; - ULONG nFormat = GetValueFormat(); + sal_uLong nFormat = GetValueFormat(); ScCellFormat::GetString( pCell, nFormat, aString, &pColor, *pOutput->pDoc->GetFormatTable(), @@ -491,7 +491,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell ) OutputDevice* pDev = pOutput->pDev; aFont.SetColor(*pColor); pDev->SetFont( aFont ); // nur fuer Ausgabe - bChanged = TRUE; + bChanged = sal_True; pLastCell = NULL; // naechstes Mal wieder hierherkommen } @@ -542,7 +542,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth ) return; } - ULONG nFormat = GetValueFormat(); + sal_uLong nFormat = GetValueFormat(); if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0) { // Not 'General' number format. Set hash text and bail out. @@ -710,7 +710,7 @@ void ScDrawStringsVars::TextChanged() aTextSize = pRefDevice->LogicToPixel( aTextSize ); } -BOOL ScDrawStringsVars::HasEditCharacters() const +sal_Bool ScDrawStringsVars::HasEditCharacters() const { static const sal_Unicode pChars[] = { @@ -833,13 +833,13 @@ void ScOutputData::SetEditSyntaxColor( EditEngine& rEngine, ScBaseCell* pCell ) } } -BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, +sal_Bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, SCCOL& rOverX, SCROW& rOverY, - BOOL bVisRowChanged ) + sal_Bool bVisRowChanged ) { - BOOL bDoMerge = FALSE; - BOOL bIsLeft = ( nX == nVisX1 ); - BOOL bIsTop = ( nY == nVisY1 ) || bVisRowChanged; + sal_Bool bDoMerge = sal_False; + sal_Bool bIsLeft = ( nX == nVisX1 ); + sal_Bool bIsTop = ( nY == nVisY1 ) || bVisRowChanged; CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nX+1]; if ( pInfo->bHOverlapped && pInfo->bVOverlapped ) @@ -851,21 +851,21 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, // weiter solange versteckt /* if (!bDoMerge) - return FALSE; + return sal_False; */ rOverX = nX; rOverY = nY; - BOOL bHOver = pInfo->bHOverlapped; - BOOL bVOver = pInfo->bVOverlapped; - BOOL bHidden; + sal_Bool bHOver = pInfo->bHOverlapped; + sal_Bool bVOver = pInfo->bVOverlapped; + sal_Bool bHidden; while (bHOver) // nY konstant { --rOverX; bHidden = pDoc->ColHidden(rOverX, nTab); if ( !bDoMerge && !bHidden ) - return FALSE; + return sal_False; if (rOverX >= nX1 && !bHidden) { @@ -877,7 +877,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, { // if (!bClipVirt) // rVirtPosX -= (long) (pDoc->GetColWidth( rOverX, nTab ) * nPPTX); - USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr( + sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr( rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue(); bHOver = ((nOverlap & SC_MF_HOR) != 0); bVOver = ((nOverlap & SC_MF_VER) != 0); @@ -889,7 +889,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, --rOverY; bHidden = pDoc->RowHidden(rOverY, nTab); if ( !bDoMerge && !bHidden ) - return FALSE; + return sal_False; if (nArrY>0) --nArrY; // lokale Kopie ! @@ -907,118 +907,118 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY, { // if (!bClipVirt) // rVirtPosY -= (long) (pDoc->GetRowHeight( rOverY, nTab ) * nPPTY); - USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr( + sal_uInt16 nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr( rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue(); bHOver = ((nOverlap & SC_MF_HOR) != 0); bVOver = ((nOverlap & SC_MF_VER) != 0); } } - return TRUE; + return sal_True; } -inline BOOL StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern ) +inline sal_Bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern ) { DBG_ASSERT( rpNewPattern, "pNewPattern" ); if ( rpNewPattern == rpOldPattern ) - return FALSE; + return sal_False; else if ( !rpOldPattern ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT ) != &rpOldPattern->GetItem( ATTR_FONT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_HEIGHT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_WEIGHT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_FONT_POSTURE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_POSTURE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_POSTURE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_UNDERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_UNDERLINE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_OVERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_OVERLINE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_WORDLINE ) != &rpOldPattern->GetItem( ATTR_FONT_WORDLINE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_CROSSEDOUT ) != &rpOldPattern->GetItem( ATTR_FONT_CROSSEDOUT ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_CONTOUR ) != &rpOldPattern->GetItem( ATTR_FONT_CONTOUR ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_SHADOWED ) != &rpOldPattern->GetItem( ATTR_FONT_SHADOWED ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_COLOR ) != &rpOldPattern->GetItem( ATTR_FONT_COLOR ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_STACKED ) != &rpOldPattern->GetItem( ATTR_STACKED ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_LINEBREAK ) != &rpOldPattern->GetItem( ATTR_LINEBREAK ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_MARGIN ) != &rpOldPattern->GetItem( ATTR_MARGIN ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_ROTATE_VALUE ) != &rpOldPattern->GetItem( ATTR_ROTATE_VALUE ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FORBIDDEN_RULES ) != &rpOldPattern->GetItem( ATTR_FORBIDDEN_RULES ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_EMPHASISMARK ) != &rpOldPattern->GetItem( ATTR_FONT_EMPHASISMARK ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_FONT_RELIEF ) != &rpOldPattern->GetItem( ATTR_FONT_RELIEF ) ) - return TRUE; + return sal_True; else if ( &rpNewPattern->GetItem( ATTR_BACKGROUND ) != &rpOldPattern->GetItem( ATTR_BACKGROUND ) ) - return TRUE; // needed with automatic text color + return sal_True; // needed with automatic text color else { rpOldPattern = rpNewPattern; - return FALSE; + return sal_False; } } -inline void lcl_CreateInterpretProgress( BOOL& bProgress, ScDocument* pDoc, +inline void lcl_CreateInterpretProgress( sal_Bool& bProgress, ScDocument* pDoc, ScFormulaCell* pFCell ) { if ( !bProgress && pFCell->GetDirty() ) { - ScProgress::CreateInterpretProgress( pDoc, TRUE ); - bProgress = TRUE; + ScProgress::CreateInterpretProgress( pDoc, sal_True ); + bProgress = sal_True; } } -inline BYTE GetScriptType( ScDocument* pDoc, ScBaseCell* pCell, +inline sal_uInt8 GetScriptType( ScDocument* pDoc, ScBaseCell* pCell, const ScPatternAttr* pPattern, const SfxItemSet* pCondSet ) { return pDoc->GetCellScriptType( pCell, pPattern->GetNumberFormat( pDoc->GetFormatTable(), pCondSet ) ); } -inline BOOL IsAmbiguousScript( BYTE nScript ) +inline sal_Bool IsAmbiguousScript( sal_uInt8 nScript ) { return ( nScript != SCRIPTTYPE_LATIN && nScript != SCRIPTTYPE_ASIAN && nScript != SCRIPTTYPE_COMPLEX ); } -BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY ) +sal_Bool ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY ) { // pThisRowInfo may be NULL - BOOL bEmpty; + sal_Bool bEmpty; if ( pThisRowInfo && nX <= nX2 ) bEmpty = pThisRowInfo->pCellInfo[nX+1].bEmptyCellText; else @@ -1029,23 +1029,23 @@ BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY ) // for the range nX1..nX2 in RowInfo, cell protection attribute is already evaluated // into bEmptyCellText in ScDocument::FillInfo / lcl_HidePrint (printfun) - BOOL bIsPrint = ( eType == OUTTYPE_PRINTER ); + sal_Bool bIsPrint = ( eType == OUTTYPE_PRINTER ); if ( bIsPrint || bTabProtected ) { const ScProtectionAttr* pAttr = (const ScProtectionAttr*) pDoc->GetEffItem( nX, nY, nTab, ATTR_PROTECTION ); if ( bIsPrint && pAttr->GetHidePrint() ) - bEmpty = TRUE; + bEmpty = sal_True; else if ( bTabProtected ) { if ( pAttr->GetHideCell() ) - bEmpty = TRUE; + bEmpty = sal_True; else if ( bShowFormulas && pAttr->GetHideFormula() ) { ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) ); if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) - bEmpty = TRUE; + bEmpty = sal_True; } } } @@ -1060,7 +1060,7 @@ void ScOutputData::GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTabP, ScBaseCe rpCell = NULL; } -BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY ) +sal_Bool ScOutputData::IsAvailable( SCCOL nX, SCROW nY ) { // apply the same logic here as in DrawStrings/DrawEdit: // Stop at non-empty or merged or overlapped cell, @@ -1069,17 +1069,17 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY ) const ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) ); if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE && !IsEmptyCellText( NULL, nX, nY ) ) { - return FALSE; + return sal_False; } const ScPatternAttr* pPattern = pDoc->GetPattern( nX, nY, nTab ); if ( ((const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE)).IsMerged() || ((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).IsOverlapped() ) { - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } // nX, nArrY: loop variables from DrawStrings / DrawEdit @@ -1096,7 +1096,7 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY ) void ScOutputData::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 ) { @@ -1138,7 +1138,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY } else { - USHORT nDocHeight = pDoc->GetRowHeight( nCompRow, nTab ); + sal_uInt16 nDocHeight = pDoc->GetRowHeight( nCompRow, nTab ); if ( nDocHeight ) nCellPosY += (long) ( nDocHeight * nPPTY ); ++nCompRow; @@ -1147,7 +1147,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY nCellPosY -= (long) pDoc->GetScaledRowHeight( nCellY, nCompRow-1, nTab, nPPTY ); const ScMergeAttr* pMerge = (const ScMergeAttr*)&rPattern.GetItem( ATTR_MERGE ); - BOOL bMerged = pMerge->IsMerged(); + sal_Bool bMerged = pMerge->IsMerged(); long nMergeCols = pMerge->GetColMerge(); if ( nMergeCols == 0 ) nMergeCols = 1; @@ -1237,13 +1237,13 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY rParam.maClipRect.Right() += nAdd * nLayoutSign; if ( rThisRowInfo.nRowNo == nCellY && nRightX >= nX1 && nRightX <= nX2 ) - rThisRowInfo.pCellInfo[nRightX].bHideGrid = TRUE; + rThisRowInfo.pCellInfo[nRightX].bHideGrid = sal_True; } while ( nLeftMissing > 0 && nLeftX > 0 && ( bOverwrite || IsAvailable( nLeftX-1, nCellY ) ) ) { if ( rThisRowInfo.nRowNo == nCellY && nLeftX >= nX1 && nLeftX <= nX2 ) - rThisRowInfo.pCellInfo[nLeftX].bHideGrid = TRUE; + rThisRowInfo.pCellInfo[nLeftX].bHideGrid = sal_True; --nLeftX; long nAdd = (long) ( pDoc->GetColWidth( nLeftX, nTab ) * nPPTX ); @@ -1257,14 +1257,14 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY if ( nRightMissing > 0 && bMarkClipped && nRightX >= nX1 && nRightX <= nX2 && !bBreak && !bCellIsValue ) { rThisRowInfo.pCellInfo[nRightX+1].nClipMark |= SC_CLIPMARK_RIGHT; - bAnyClipped = TRUE; + bAnyClipped = sal_True; long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX ); rParam.maClipRect.Right() -= nMarkPixel * nLayoutSign; } if ( nLeftMissing > 0 && bMarkClipped && nLeftX >= nX1 && nLeftX <= nX2 && !bBreak && !bCellIsValue ) { rThisRowInfo.pCellInfo[nLeftX+1].nClipMark |= SC_CLIPMARK_LEFT; - bAnyClipped = TRUE; + bAnyClipped = sal_True; long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX ); rParam.maClipRect.Left() += nMarkPixel * nLayoutSign; } @@ -1274,7 +1274,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY } else { - rParam.mbLeftClip = rParam.mbRightClip = FALSE; + rParam.mbLeftClip = rParam.mbRightClip = sal_False; // leave space for AutoFilter on screen // (for automatic line break: only if not formatting for printer, as in ScColumn::GetNeededSize) @@ -1285,7 +1285,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY { // filter drop-down width is now independent from row height const long nFilter = DROPDOWN_BITMAP_SIZE; - BOOL bFit = ( nNeeded + nFilter <= nMergeSizeX ); + sal_Bool bFit = ( nNeeded + nFilter <= nMergeSizeX ); if ( bFit || bCellIsValue ) { // content fits even in the remaining area without the filter button @@ -1298,7 +1298,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY // -> set clip flags, so "###" replacement is used (but also within the smaller area) if ( !bFit ) - rParam.mbLeftClip = rParam.mbRightClip = TRUE; + rParam.mbLeftClip = rParam.mbRightClip = sal_True; } } } @@ -1320,7 +1320,7 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY #endif } -void ScOutputData::DrawStrings( BOOL bPixelToLogic ) +void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) { DBG_ASSERT( pDev == pRefDevice || pDev->GetMapMode().GetMapUnit() == pRefDevice->GetMapMode().GetMapUnit(), @@ -1328,14 +1328,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() ); - BOOL bWasIdleDisabled = pDoc->IsIdleDisabled(); - pDoc->DisableIdle( TRUE ); + sal_Bool bWasIdleDisabled = pDoc->IsIdleDisabled(); + pDoc->DisableIdle( sal_True ); Size aMinSize = pRefDevice->PixelToLogic(Size(0,100)); // erst darueber wird ausgegeben -// UINT32 nMinHeight = aMinSize.Height() / 200; // 1/2 Pixel +// sal_uInt32 nMinHeight = aMinSize.Height() / 200; // 1/2 Pixel ScDrawStringsVars aVars( this, bPixelToLogic ); - BOOL bProgress = FALSE; + sal_Bool bProgress = sal_False; long nInitPosX = nScrX; if ( bLayoutRTL ) @@ -1352,14 +1352,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) // variables for GetOutputArea OutputAreaParam aAreaParam; - BOOL bCellIsValue = FALSE; + sal_Bool bCellIsValue = sal_False; long nNeededWidth = 0; SvxCellHorJustify eOutHorJust = SVX_HOR_JUSTIFY_STANDARD; const ScPatternAttr* pPattern = NULL; const SfxItemSet* pCondSet = NULL; const ScPatternAttr* pOldPattern = NULL; const SfxItemSet* pOldCondSet = NULL; - BYTE nOldScript = 0; + sal_uInt8 nOldScript = 0; // alternative pattern instances in case we need to modify the pattern // before processing the cell value. @@ -1378,35 +1378,35 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) nPosX -= pRowInfo[0].pCellInfo[nLoopStartX+1].nWidth * nLayoutSign; for (SCCOL nX=nLoopStartX; nX<=nX2; nX++) { - BOOL bMergeEmpty = FALSE; + sal_Bool bMergeEmpty = sal_False; CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1]; - BOOL bEmpty = nX < nX1 || pInfo->bEmptyCellText; + sal_Bool bEmpty = nX < nX1 || pInfo->bEmptyCellText; SCCOL nCellX = nX; // position where the cell really starts SCROW nCellY = nY; - BOOL bDoCell = FALSE; - BOOL bNeedEdit = FALSE; + sal_Bool bDoCell = sal_False; + sal_Bool bNeedEdit = sal_False; // // Part of a merged cell? // - BOOL bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped ); + sal_Bool bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped ); if ( bOverlapped ) { - bEmpty = TRUE; + bEmpty = sal_True; SCCOL nOverX; // start of the merged cells SCROW nOverY; - BOOL bVisChanged = !pRowInfo[nArrY-1].bChanged; + sal_Bool bVisChanged = !pRowInfo[nArrY-1].bChanged; if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged )) { nCellX = nOverX; nCellY = nOverY; - bDoCell = TRUE; + bDoCell = sal_True; } else - bMergeEmpty = TRUE; + bMergeEmpty = sal_True; } // @@ -1424,7 +1424,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) !pDoc->HasAttrib( nTempX,nY,nTab, nX1,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) { nCellX = nTempX; - bDoCell = TRUE; + bDoCell = sal_True; } } @@ -1445,7 +1445,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) !pDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) { nCellX = nTempX; - bDoCell = TRUE; + bDoCell = sal_True; } } @@ -1454,14 +1454,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) // if (!bEmpty) - bDoCell = TRUE; + bDoCell = sal_True; // // don't output the cell that's being edited // if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow ) - bDoCell = FALSE; + bDoCell = sal_False; // // output the cell text @@ -1475,9 +1475,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) else GetVisibleCell( nCellX, nCellY, nTab, pCell ); // get from document if ( !pCell ) - bDoCell = FALSE; + bDoCell = sal_False; else if ( pCell->GetCellType() == CELLTYPE_EDIT ) - bNeedEdit = TRUE; + bNeedEdit = sal_True; } if (bDoCell && !bNeedEdit) { @@ -1513,7 +1513,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) pPattern = pAltPattern; } - BYTE nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet ); + sal_uInt8 nScript = GetScriptType( pDoc, pCell, pPattern, pCondSet ); if (nScript == 0) nScript = ScGlobal::GetDefaultScriptType(); if ( pPattern != pOldPattern || pCondSet != pOldCondSet || nScript != nOldScript || bSyntaxMode ) @@ -1531,11 +1531,11 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) // use edit engine for rotated, stacked or mixed-script text if ( aVars.GetOrient() == SVX_ORIENTATION_STACKED || aVars.IsRotated() || IsAmbiguousScript(nScript) ) - bNeedEdit = TRUE; + bNeedEdit = sal_True; } if (bDoCell && !bNeedEdit) { - BOOL bFormulaCell = (pCell->GetCellType() == CELLTYPE_FORMULA ); + sal_Bool bFormulaCell = (pCell->GetCellType() == CELLTYPE_FORMULA ); if ( bFormulaCell ) lcl_CreateInterpretProgress( bProgress, pDoc, (ScFormulaCell*)pCell ); if ( aVars.SetText(pCell) ) @@ -1561,9 +1561,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) if ( eOutHorJust == SVX_HOR_JUSTIFY_BLOCK || eOutHorJust == SVX_HOR_JUSTIFY_REPEAT ) eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented - BOOL bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK ); - BOOL bRepeat = aVars.IsRepeat() && !bBreak; - BOOL bShrink = aVars.IsShrink() && !bBreak && !bRepeat; + sal_Bool bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK ); + sal_Bool bRepeat = aVars.IsRepeat() && !bBreak; + sal_Bool bShrink = aVars.IsShrink() && !bBreak && !bRepeat; nTotalMargin = static_cast<long>(aVars.GetLeftTotal() * nPPTX) + @@ -1573,8 +1573,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) // GetOutputArea gives justfied rectangles GetOutputArea( nX, nArrY, nPosX, nPosY, nCellX, nCellY, nNeededWidth, - *pPattern, sal::static_int_cast<USHORT>(eOutHorJust), - bCellIsValue || bRepeat || bShrink, bBreak, FALSE, + *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust), + bCellIsValue || bRepeat || bShrink, bBreak, sal_False, aAreaParam ); if ( bShrink ) @@ -1583,7 +1583,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) { // Only horizontal scaling is handled here. // DrawEdit is used to vertically scale 90 deg rotated text. - bNeedEdit = TRUE; + bNeedEdit = sal_True; } else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal { @@ -1597,7 +1597,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) aVars.SetShrinkScale( nScale, nOldScript ); long nNewSize = aVars.GetTextSize().Width(); - USHORT nShrinkAgain = 0; + sal_uInt16 nShrinkAgain = 0; while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX ) { // If the text is still too large, reduce the scale again by 10%, until it fits, @@ -1611,7 +1611,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) // If even at half the size the font still isn't rendered smaller, // fall back to normal clipping (showing ### for numbers). if ( nNewSize <= nAvailable ) - aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE; + aAreaParam.mbLeftClip = aAreaParam.mbRightClip = sal_False; pOldPattern = NULL; } @@ -1661,8 +1661,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) // right are handled by the flag for nX2 SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2; RowInfo* pMarkRowInfo = ( nCellY == nY ) ? pThisRowInfo : &pRowInfo[0]; - pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = TRUE; - bDoCell = FALSE; // don't draw here + pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = sal_True; + bDoCell = sal_False; // don't draw here } if ( bDoCell ) { @@ -1674,7 +1674,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) (long) ( aVars.GetLeftTotal() * nPPTX ) + (long) ( aVars.GetMargin()->GetRightMargin() * nPPTX ); if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() ) - aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE; + aAreaParam.mbLeftClip = aAreaParam.mbRightClip = sal_False; // If the "###" replacement doesn't fit into the cells, no clip marks // are shown, as the "###" already denotes too little space. @@ -1686,38 +1686,38 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) long nAvailWidth = aAreaParam.maAlignRect.GetWidth(); long nOutHeight = aAreaParam.maAlignRect.GetHeight(); - BOOL bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW ); + sal_Bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW ); if ( aAreaParam.maClipRect.Left() < nScrX ) { aAreaParam.maClipRect.Left() = nScrX; - aAreaParam.mbLeftClip = TRUE; + aAreaParam.mbLeftClip = sal_True; } if ( aAreaParam.maClipRect.Right() > nScrX + nScrW ) { aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one? - aAreaParam.mbRightClip = TRUE; + aAreaParam.mbRightClip = sal_True; } - BOOL bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip; - BOOL bVClip = FALSE; + sal_Bool bHClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip; + sal_Bool bVClip = sal_False; if ( aAreaParam.maClipRect.Top() < nScrY ) { aAreaParam.maClipRect.Top() = nScrY; - bVClip = TRUE; + bVClip = sal_True; } if ( aAreaParam.maClipRect.Bottom() > nScrY + nScrH ) { aAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one? - bVClip = TRUE; + bVClip = sal_True; } // // horizontalen Platz testen // - BOOL bRightAdjusted = FALSE; // to correct text width calculation later - BOOL bNeedEditEngine = FALSE; + sal_Bool bRightAdjusted = sal_False; // to correct text width calculation later + sal_Bool bNeedEditEngine = sal_False; if ( !bNeedEditEngine && !bOutside ) { switch (eOutHorJust) @@ -1728,7 +1728,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) case SVX_HOR_JUSTIFY_RIGHT: nJustPosX += nAvailWidth - aVars.GetTextSize().Width() - (long) ( aVars.GetMargin()->GetRightMargin() * nPPTX ); - bRightAdjusted = TRUE; + bRightAdjusted = sal_True; break; case SVX_HOR_JUSTIFY_CENTER: nJustPosX += ( nAvailWidth - aVars.GetTextSize().Width() + @@ -1780,7 +1780,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) if ( eType != OUTTYPE_PRINTER || ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) || ( aVars.HasCondHeight() ) ) - bVClip = TRUE; + bVClip = sal_True; } if ( bHClip || bVClip ) @@ -1884,7 +1884,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) } // PDF: whole-cell hyperlink from formula? - BOOL bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA && + sal_Bool bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA && static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell(); if ( bHasURL ) { @@ -1907,7 +1907,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute { - rEngine.SetUpdateMode( FALSE ); + rEngine.SetUpdateMode( sal_False ); rEngine.SetText(EMPTY_STRING); // keine Para-Attribute uebrigbehalten... @@ -1917,22 +1917,22 @@ void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute SfxItemSet( *rPara.GetPool(), rPara.GetRanges() ) ); } -BOOL lcl_SafeIsValue( ScBaseCell* pCell ) +sal_Bool lcl_SafeIsValue( ScBaseCell* pCell ) { if (!pCell) - return FALSE; + return sal_False; - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; switch ( pCell->GetCellType() ) { case CELLTYPE_VALUE: - bRet = TRUE; + bRet = sal_True; break; case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = (ScFormulaCell*)pCell; if ( pFCell->IsRunning() || pFCell->IsValue() ) - bRet = TRUE; + bRet = sal_True; } break; default: @@ -1945,21 +1945,21 @@ BOOL lcl_SafeIsValue( ScBaseCell* pCell ) void lcl_ScaleFonts( EditEngine& rEngine, long nPercent ) { - BOOL bUpdateMode = rEngine.GetUpdateMode(); + sal_Bool bUpdateMode = rEngine.GetUpdateMode(); if ( bUpdateMode ) - rEngine.SetUpdateMode( FALSE ); + rEngine.SetUpdateMode( sal_False ); - USHORT nParCount = rEngine.GetParagraphCount(); - for (USHORT nPar=0; nPar<nParCount; nPar++) + sal_uInt16 nParCount = rEngine.GetParagraphCount(); + for (sal_uInt16 nPar=0; nPar<nParCount; nPar++) { SvUShorts aPortions; rEngine.GetPortions( nPar, aPortions ); - USHORT nPCount = aPortions.Count(); - USHORT nStart = 0; - for ( USHORT nPos=0; nPos<nPCount; nPos++ ) + sal_uInt16 nPCount = aPortions.Count(); + sal_uInt16 nStart = 0; + for ( sal_uInt16 nPos=0; nPos<nPCount; nPos++ ) { - USHORT nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nEnd = aPortions.GetObject( nPos ); ESelection aSel( nPar, nStart, nPar, nEnd ); SfxItemSet aAttribs = rEngine.GetAttribs( aSel ); @@ -1982,10 +1982,10 @@ void lcl_ScaleFonts( EditEngine& rEngine, long nPercent ) } if ( bUpdateMode ) - rEngine.SetUpdateMode( TRUE ); + rEngine.SetUpdateMode( sal_True ); } -long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRotate ) +long lcl_GetEditSize( EditEngine& rEngine, sal_Bool bWidth, sal_Bool bSwap, long nAttrRotate ) { if ( bSwap ) bWidth = !bWidth; @@ -2014,7 +2014,7 @@ long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRo void ScOutputData::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 ) { if ( !bWidth ) @@ -2029,28 +2029,28 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlig if ( nScaleSize <= rAlignRect.GetHeight() ) return; - BOOL bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP ); + sal_Bool bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP ); long nAvailable = rAlignRect.GetHeight() - nTopM - nBottomM; long nScale = ( nAvailable * 100 ) / nScaleSize; lcl_ScaleFonts( rEngine, nScale ); - rEngineHeight = lcl_GetEditSize( rEngine, FALSE, bSwap, nAttrRotate ); + rEngineHeight = lcl_GetEditSize( rEngine, sal_False, bSwap, nAttrRotate ); long nNewSize = bPixelToLogic ? pRefDevice->LogicToPixel(Size(0,rEngineHeight)).Height() : rEngineHeight; - USHORT nShrinkAgain = 0; + sal_uInt16 nShrinkAgain = 0; while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX ) { // further reduce, like in DrawStrings lcl_ScaleFonts( rEngine, 90 ); // reduce by 10% - rEngineHeight = lcl_GetEditSize( rEngine, FALSE, bSwap, nAttrRotate ); + rEngineHeight = lcl_GetEditSize( rEngine, sal_False, bSwap, nAttrRotate ); nNewSize = bPixelToLogic ? pRefDevice->LogicToPixel(Size(0,rEngineHeight)).Height() : rEngineHeight; ++nShrinkAgain; } // sizes for further processing (alignment etc): - rEngineWidth = lcl_GetEditSize( rEngine, TRUE, bSwap, nAttrRotate ); + rEngineWidth = lcl_GetEditSize( rEngine, sal_True, bSwap, nAttrRotate ); long nPixelWidth = bPixelToLogic ? pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth; rNeededPixel = nPixelWidth + nLeftM + nRightM; @@ -2068,44 +2068,44 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlig long nScale = ( nAvailable * 100 ) / nScaleSize; lcl_ScaleFonts( rEngine, nScale ); - rEngineWidth = lcl_GetEditSize( rEngine, TRUE, FALSE, nAttrRotate ); + rEngineWidth = lcl_GetEditSize( rEngine, sal_True, sal_False, nAttrRotate ); long nNewSize = bPixelToLogic ? pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth; - USHORT nShrinkAgain = 0; + sal_uInt16 nShrinkAgain = 0; while ( nNewSize > nAvailable && nShrinkAgain < SC_SHRINKAGAIN_MAX ) { // further reduce, like in DrawStrings lcl_ScaleFonts( rEngine, 90 ); // reduce by 10% - rEngineWidth = lcl_GetEditSize( rEngine, TRUE, FALSE, nAttrRotate ); + rEngineWidth = lcl_GetEditSize( rEngine, sal_True, sal_False, nAttrRotate ); nNewSize = bPixelToLogic ? pRefDevice->LogicToPixel(Size(rEngineWidth,0)).Width() : rEngineWidth; ++nShrinkAgain; } if ( nNewSize <= nAvailable ) - rLeftClip = rRightClip = FALSE; + rLeftClip = rRightClip = sal_False; // sizes for further processing (alignment etc): rNeededPixel = nNewSize + nLeftM + nRightM; - rEngineHeight = lcl_GetEditSize( rEngine, FALSE, FALSE, nAttrRotate ); + rEngineHeight = lcl_GetEditSize( rEngine, sal_False, sal_False, nAttrRotate ); } } -void ScOutputData::DrawEdit(BOOL bPixelToLogic) +void ScOutputData::DrawEdit(sal_Bool bPixelToLogic) { vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() ); Size aMinSize = pRefDevice->PixelToLogic(Size(0,100)); // erst darueber wird ausgegeben -// UINT32 nMinHeight = aMinSize.Height() / 200; // 1/2 Pixel +// sal_uInt32 nMinHeight = aMinSize.Height() / 200; // 1/2 Pixel ScModule* pScMod = SC_MOD(); sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); ScFieldEditEngine* pEngine = NULL; - BOOL bHyphenatorSet = FALSE; + sal_Bool bHyphenatorSet = sal_False; const ScPatternAttr* pOldPattern = NULL; const SfxItemSet* pOldCondSet = NULL; ScBaseCell* pCell = NULL; @@ -2151,7 +2151,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) SCCOL nCellX = nX; // position where the cell really starts SCROW nCellY = nY; - BOOL bDoCell = FALSE; + sal_Bool bDoCell = sal_False; long nPosY = nRowPosY; if ( nArrY == 0 ) @@ -2160,11 +2160,11 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) nY = pRowInfo[1].nRowNo; SCCOL nOverX; // start of the merged cells SCROW nOverY; - if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, TRUE )) + if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, sal_True )) { nCellX = nOverX; nCellY = nOverY; - bDoCell = TRUE; + bDoCell = sal_True; } } else if ( nX == nX2 && !pThisRowInfo->pCellInfo[nX+1].pCell ) @@ -2180,16 +2180,16 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) !pDoc->HasAttrib( nTempX,nY,nTab, nX,nY,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) { nCellX = nTempX; - bDoCell = TRUE; + bDoCell = sal_True; } } else { - bDoCell = TRUE; + bDoCell = sal_True; } if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow ) - bDoCell = FALSE; + bDoCell = sal_False; const ScPatternAttr* pPattern = NULL; const SfxItemSet* pCondSet = NULL; @@ -2210,11 +2210,11 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) GetVisibleCell( nCellX, nCellY, nTab, pCell ); } if ( !pCell ) - bDoCell = FALSE; + bDoCell = sal_False; } if (bDoCell) { - BOOL bHidden = FALSE; + sal_Bool bHidden = sal_False; // // Create EditEngine @@ -2225,9 +2225,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) // Ein RefDevice muss auf jeden Fall gesetzt werden, // sonst legt sich die EditEngine ein VirtualDevice an! pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() ); - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); pEngine->SetRefDevice( pFmtDevice ); // always set - ULONG nCtrl = pEngine->GetControlWord(); + sal_uLong nCtrl = pEngine->GetControlWord(); if ( bShowSpellErrors ) nCtrl |= EE_CNTRL_ONLINESPELLING; if ( eType == OUTTYPE_PRINTER ) @@ -2241,17 +2241,17 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) (EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) ); } else - lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE) + lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False) - BOOL bCellIsValue = lcl_SafeIsValue(pCell); + sal_Bool bCellIsValue = lcl_SafeIsValue(pCell); SvxCellHorJustify eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&) pPattern->GetItem(ATTR_HOR_JUSTIFY, pCondSet)).GetValue(); - BOOL bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) || + sal_Bool bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) || ((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue(); - BOOL bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak ); - BOOL bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&> + sal_Bool bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak ); + sal_Bool bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&> (pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue(); SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet ); long nAttrRotate = ((const SfxInt32Item&)pPattern-> @@ -2271,10 +2271,10 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) { //! Flag setzen, um die Zelle in DrawRotated wiederzufinden ? //! (oder Flag schon bei DrawBackground, dann hier keine Abfrage) - bHidden = TRUE; // gedreht wird getrennt ausgegeben + bHidden = sal_True; // gedreht wird getrennt ausgegeben } - BOOL bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED && + sal_Bool bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED && ((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN, pCondSet )).GetValue() ); if ( bAsianVertical ) { @@ -2304,7 +2304,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) //! pDev->DrawPixel( aPos, //! ((const SvxColorItem&)pPattern-> //! GetItem( ATTR_FONT_COLOR )).GetValue() ); -//! bHidden = TRUE; +//! bHidden = sal_True; //! } if (!bHidden) @@ -2314,7 +2314,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) const SvxMarginItem* pMargin = (const SvxMarginItem*) &pPattern->GetItem(ATTR_MARGIN, pCondSet); - USHORT nIndent = 0; + sal_uInt16 nIndent = 0; if ( eHorJust == SVX_HOR_JUSTIFY_LEFT ) nIndent = ((const SfxUInt16Item&)pPattern-> GetItem(ATTR_INDENT, pCondSet)).GetValue(); @@ -2352,7 +2352,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) //! handle nArrY == 0 GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, 0, - *pPattern, sal::static_int_cast<USHORT>(eOutHorJust), + *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust), bCellIsValue, true, false, aAreaParam ); //! special ScEditUtil handling if formatting for printer @@ -2380,7 +2380,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) Fraction aFract(1,1); Rectangle aUtilRect = ScEditUtil( pDoc, nCellX, nCellY, nTab, Point(0,0), pFmtDevice, - HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, FALSE ); + HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, sal_False ); aLogicSize.Width() = aUtilRect.GetWidth(); } pEngine->SetPaperSize(aLogicSize); @@ -2410,7 +2410,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) pOldPattern = pPattern; pOldCondSet = pCondSet; - ULONG nControl = pEngine->GetControlWord(); + sal_uLong nControl = pEngine->GetControlWord(); if (eOrient==SVX_ORIENTATION_STACKED) nControl |= EE_CNTRL_ONECHARPERLINE; else @@ -2422,7 +2422,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) // set hyphenator the first time it is needed com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() ); pEngine->SetHyphenator( xXHyphenator ); - bHyphenatorSet = TRUE; + bHyphenatorSet = sal_True; } Color aBackCol = ((const SvxBrushItem&) @@ -2482,7 +2482,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) // Read content from cell - BOOL bWrapFields = FALSE; + sal_Bool bWrapFields = sal_False; if (pCell) { if (pCell->GetCellType() == CELLTYPE_EDIT) @@ -2499,7 +2499,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) // Fields aren't wrapped, so clipping is enabled to prevent // a field from being drawn beyond the cell size - bWrapFields = TRUE; + bWrapFields = sal_True; } } else @@ -2509,7 +2509,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) } else { - ULONG nFormat = pPattern->GetNumberFormat( + sal_uLong nFormat = pPattern->GetNumberFormat( pDoc->GetFormatTable(), pCondSet ); String aString; Color* pColor; @@ -2536,7 +2536,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) } pEngine->SetVertical( bAsianVertical ); - pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight + pEngine->SetUpdateMode( sal_True ); // after SetText, before CalcTextWidth/GetTextHeight // // Get final output area using the calculated width @@ -2569,15 +2569,15 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) { // for break, the first GetOutputArea call is sufficient GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, nNeededPixel, - *pPattern, sal::static_int_cast<USHORT>(eOutHorJust), + *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust), bCellIsValue || bRepeat || bShrink, false, false, aAreaParam ); if ( bShrink ) { - BOOL bWidth = ( eOrient == SVX_ORIENTATION_STANDARD && !bAsianVertical ); + sal_Bool bWidth = ( eOrient == SVX_ORIENTATION_STANDARD && !bAsianVertical ); ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM, bWidth, - sal::static_int_cast<USHORT>(eOrient), 0, bPixelToLogic, + sal::static_int_cast<sal_uInt16>(eOrient), 0, bPixelToLogic, nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip ); } @@ -2669,7 +2669,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) nStartX += nLeftM; } - BOOL bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW ); + sal_Bool bOutside = ( aAreaParam.maClipRect.Right() < nScrX || aAreaParam.maClipRect.Left() >= nScrX + nScrW ); if ( aAreaParam.maClipRect.Left() < nScrX ) { aAreaParam.maClipRect.Left() = nScrX; @@ -2684,23 +2684,23 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) if ( !bHidden && !bOutside ) { bool bClip = aAreaParam.mbLeftClip || aAreaParam.mbRightClip; - BOOL bSimClip = FALSE; + sal_Bool bSimClip = sal_False; if ( bWrapFields ) { // Fields in a cell with automatic breaks: clip to cell width - bClip = TRUE; + bClip = sal_True; } if ( aAreaParam.maClipRect.Top() < nScrY ) { aAreaParam.maClipRect.Top() = nScrY; - bClip = TRUE; + bClip = sal_True; } if ( aAreaParam.maClipRect.Bottom() > nScrY + nScrH ) { aAreaParam.maClipRect.Bottom() = nScrY + nScrH; //! minus one? - bClip = TRUE; + bClip = sal_True; } Size aCellSize; // output area, excluding margins, in logical units @@ -2713,7 +2713,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) { const ScMergeAttr* pMerge = (ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE); - BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1; + sal_Bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1; // Don't clip for text height when printing rows with optimal height, // except when font size is from conditional formatting. @@ -2721,10 +2721,10 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) if ( eType != OUTTYPE_PRINTER || ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) || ( pCondSet && SFX_ITEM_SET == - pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) ) - bClip = TRUE; + pCondSet->GetItemState(ATTR_FONT_HEIGHT, sal_True) ) ) + bClip = sal_True; else - bSimClip = TRUE; + bSimClip = sal_True; // Show clip marks if height is at least 5pt too small and // there are several lines of text. @@ -2748,7 +2748,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) pClipMarkCell = &pThisRowInfo->pCellInfo[nX+1]; pClipMarkCell->nClipMark |= SC_CLIPMARK_RIGHT; //! also allow left? - bAnyClipped = TRUE; + bAnyClipped = sal_True; long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX ); if ( aAreaParam.maClipRect.Right() - nMarkPixel > aAreaParam.maClipRect.Left() ) @@ -2763,7 +2763,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) if ( nClipStartY < nRowPosY ) { long nDif = nRowPosY - nClipStartY; - bClip = TRUE; + bClip = sal_True; nClipStartY = nRowPosY; aClipSize.Height() -= nDif; } @@ -2810,7 +2810,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) eHorJust==SVX_HOR_JUSTIFY_CENTER || (eHorJust==SVX_HOR_JUSTIFY_STANDARD && bCellIsValue) ) { - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); SvxAdjust eEditAdjust = (eHorJust==SVX_HOR_JUSTIFY_CENTER) ? @@ -2821,7 +2821,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) // #55142# reset adjustment for the next cell pOldPattern = NULL; - pEngine->SetUpdateMode( TRUE ); + pEngine->SetUpdateMode( sal_True ); } } else @@ -2911,7 +2911,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) { // For right-to-left, EditEngine always calculates its lines // beginning from the right edge, but EditLine::nStartPosX is - // of USHORT type, so the PaperSize must be limited to USHRT_MAX. + // of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX. Size aLogicPaper = pEngine->GetPaperSize(); if ( aLogicPaper.Width() > USHRT_MAX ) { @@ -2930,7 +2930,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) Point aDocStart = aLogicClip.TopLeft(); aDocStart -= aLogicStart; - pEngine->Draw( pDev, aLogicClip, aDocStart, FALSE ); + pEngine->Draw( pDev, aLogicClip, aDocStart, sal_False ); } else { @@ -2952,7 +2952,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) } // PDF: whole-cell hyperlink from formula? - BOOL bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA && + sal_Bool bHasURL = pPDFData && pCell && pCell->GetCellType() == CELLTYPE_FORMULA && static_cast<ScFormulaCell*>(pCell)->IsHyperLinkCell(); if ( bHasURL ) { @@ -2992,7 +2992,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) // ------------------------------------------------------------------------------- -void ScOutputData::DrawRotated(BOOL bPixelToLogic) +void ScOutputData::DrawRotated(sal_Bool bPixelToLogic) { //! nRotMax speichern SCCOL nRotMax = nX2; @@ -3003,12 +3003,12 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) ScModule* pScMod = SC_MOD(); sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); ScFieldEditEngine* pEngine = NULL; - BOOL bHyphenatorSet = FALSE; + sal_Bool bHyphenatorSet = sal_False; const ScPatternAttr* pPattern; const SfxItemSet* pCondSet; const ScPatternAttr* pOldPattern = NULL; @@ -3046,10 +3046,10 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) { SCROW nY = pThisRowInfo->nRowNo; - BOOL bHidden = FALSE; + sal_Bool bHidden = sal_False; if (bEditMode) if ( nX == nEditCol && nY == nEditRow ) - bHidden = TRUE; + bHidden = sal_True; if (!bHidden) { @@ -3058,9 +3058,9 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) // Ein RefDevice muss auf jeden Fall gesetzt werden, // sonst legt sich die EditEngine ein VirtualDevice an! pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() ); - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); pEngine->SetRefDevice( pFmtDevice ); // always set - ULONG nCtrl = pEngine->GetControlWord(); + sal_uLong nCtrl = pEngine->GetControlWord(); if ( bShowSpellErrors ) nCtrl |= EE_CNTRL_ONLINESPELLING; if ( eType == OUTTYPE_PRINTER ) @@ -3074,20 +3074,20 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) (EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) ); } else - lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE) + lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(sal_False) long nPosY = nRowPosY; - BOOL bVisChanged = FALSE; + sal_Bool bVisChanged = sal_False; //! Rest von zusammengefasster Zelle weiter oben funktioniert nicht! - BOOL bFromDoc = FALSE; + sal_Bool bFromDoc = sal_False; pPattern = pInfo->pPatternAttr; pCondSet = pInfo->pConditionSet; if (!pPattern) { pPattern = pDoc->GetPattern( nX, nY, nTab ); - bFromDoc = TRUE; + bFromDoc = sal_True; } pCell = pInfo->pCell; if (bFromDoc) @@ -3097,29 +3097,29 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) GetVisibleCell( nX, nY, nTab, pCell ); if ( !pCell || IsEmptyCellText( pThisRowInfo, nX, nY ) ) - bHidden = TRUE; // nRotateDir is also set without a cell + bHidden = sal_True; // nRotateDir is also set without a cell long nCellWidth = (long) pRowInfo[0].pCellInfo[nX+1].nWidth; SvxCellHorJustify eHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&) pPattern->GetItem(ATTR_HOR_JUSTIFY, pCondSet)).GetValue(); - BOOL bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) || + sal_Bool bBreak = ( eHorJust == SVX_HOR_JUSTIFY_BLOCK ) || ((const SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue(); - BOOL bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak ); - BOOL bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&> + sal_Bool bRepeat = ( eHorJust == SVX_HOR_JUSTIFY_REPEAT && !bBreak ); + sal_Bool bShrink = !bBreak && !bRepeat && static_cast<const SfxBoolItem&> (pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue(); SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet ); const ScMergeAttr* pMerge = (ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE); - BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1; + sal_Bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1; long nStartX = nPosX; long nStartY = nPosY; if (nX<nX1) { if ((bBreak || eOrient!=SVX_ORIENTATION_STANDARD) && !bMerged) - bHidden = TRUE; + bHidden = sal_True; else { nStartX = nInitPosX; @@ -3175,7 +3175,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) pOldPattern = pPattern; pOldCondSet = pCondSet; - ULONG nControl = pEngine->GetControlWord(); + sal_uLong nControl = pEngine->GetControlWord(); if (eOrient==SVX_ORIENTATION_STACKED) nControl |= EE_CNTRL_ONECHARPERLINE; else @@ -3187,7 +3187,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) // set hyphenator the first time it is needed com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() ); pEngine->SetHyphenator( xXHyphenator ); - bHyphenatorSet = TRUE; + bHyphenatorSet = sal_True; } Color aBackCol = ((const SvxBrushItem&) @@ -3203,7 +3203,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) const SvxMarginItem* pMargin = (const SvxMarginItem*) &pPattern->GetItem(ATTR_MARGIN, pCondSet); - USHORT nIndent = 0; + sal_uInt16 nIndent = 0; if ( eHorJust == SVX_HOR_JUSTIFY_LEFT ) nIndent = ((const SfxUInt16Item&)pPattern-> GetItem(ATTR_INDENT, pCondSet)).GetValue(); @@ -3288,7 +3288,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) } else { - ULONG nFormat = pPattern->GetNumberFormat( + sal_uLong nFormat = pPattern->GetNumberFormat( pDoc->GetFormatTable(), pCondSet ); String aString; Color* pColor; @@ -3314,7 +3314,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) DBG_ERROR("pCell == NULL"); } - pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight + pEngine->SetUpdateMode( sal_True ); // after SetText, before CalcTextWidth/GetTextHeight long nEngineWidth = (long) pEngine->CalcTextWidth(); long nEngineHeight = pEngine->GetTextHeight(); @@ -3333,7 +3333,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) Size(0,nEngineHeight)).Height(); long nEffHeight = nOutHeight - (long)(nEnginePixel * nAbsCos) + 2; long nNewWidth = (long)(nEffHeight / nAbsSin) + 2; - BOOL bFits = ( nNewWidth >= aPaperSize.Width() ); + sal_Bool bFits = ( nNewWidth >= aPaperSize.Width() ); if ( bFits ) nSteps = 0; else @@ -3354,7 +3354,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) pEngine->SetPaperSize(pRefDevice->PixelToLogic(aPaperSize)); else pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1 - //pEngine->QuickFormatDoc( TRUE ); + //pEngine->QuickFormatDoc( sal_True ); nEngineWidth = (long) pEngine->CalcTextWidth(); nEngineHeight = pEngine->GetTextHeight(); } @@ -3382,13 +3382,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) } if (!nAttrRotate) // hier nur gedrehter Text - bHidden = TRUE; //! vorher abfragen !!! + bHidden = sal_True; //! vorher abfragen !!! //! weglassen, was nicht hereinragt if (!bHidden) { - BOOL bClip = FALSE; + sal_Bool bClip = sal_False; Size aClipSize = Size( nScrX+nScrW-nStartX, nScrY+nScrH-nStartY ); // weiterschreiben @@ -3400,7 +3400,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) aCellSize = Size( nOutWidth, nOutHeight ); // Scale ist 1 long nGridWidth = nEngineWidth; - BOOL bNegative = FALSE; + sal_Bool bNegative = sal_False; if ( eRotMode != SVX_ROTATE_MODE_STANDARD ) { nGridWidth = aCellSize.Width() + @@ -3424,8 +3424,8 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) nNeededWidth = pRefDevice->LogicToPixel(Size(nNeededWidth,0)).Width(); GetOutputArea( nX, nArrY, nCellStartX, nPosY, nCellX, nCellY, nNeededWidth, - *pPattern, sal::static_int_cast<USHORT>(eOutHorJust), - FALSE, FALSE, TRUE, aAreaParam ); + *pPattern, sal::static_int_cast<sal_uInt16>(eOutHorJust), + sal_False, sal_False, sal_True, aAreaParam ); if ( bShrink ) { @@ -3433,18 +3433,18 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) pRefDevice->LogicToPixel(Size(nEngineWidth,0)).Width() : nEngineWidth; long nNeededPixel = nPixelWidth + nLeftM + nRightM; - aAreaParam.mbLeftClip = aAreaParam.mbRightClip = TRUE; + aAreaParam.mbLeftClip = aAreaParam.mbRightClip = sal_True; // always do height ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM, - FALSE, sal::static_int_cast<USHORT>(eOrient), nAttrRotate, bPixelToLogic, + sal_False, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic, nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip ); if ( eRotMode == SVX_ROTATE_MODE_STANDARD ) { // do width only if rotating within the cell (standard mode) ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM, - TRUE, sal::static_int_cast<USHORT>(eOrient), nAttrRotate, bPixelToLogic, + sal_True, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic, nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip ); } @@ -3457,14 +3457,14 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) nEngineWidth = (long) ( nRealHeight / fabs( nSin ) ); } - // BOOL bVClip = ( nEngineHeight > aCellSize.Height() ); + // sal_Bool bVClip = ( nEngineHeight > aCellSize.Height() ); long nClipStartX = nStartX; if (nX<nX1) { //! Clipping unnoetig, wenn links am Fenster - bClip = TRUE; // nur Rest ausgeben! + bClip = sal_True; // nur Rest ausgeben! if (nStartX<nScrX) { long nDif = nScrX - nStartX; @@ -3479,13 +3479,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) if ( nClipStartY < nRowPosY ) { long nDif = nRowPosY - nClipStartY; - bClip = TRUE; + bClip = sal_True; nClipStartY = nRowPosY; aClipSize.Height() -= nDif; } } - bClip = TRUE; // always clip at the window/page border + bClip = sal_True; // always clip at the window/page border //Rectangle aClipRect; if (bClip) @@ -3542,7 +3542,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) if (eHorJust==SVX_HOR_JUSTIFY_RIGHT || eHorJust==SVX_HOR_JUSTIFY_CENTER) { - pEngine->SetUpdateMode( FALSE ); + pEngine->SetUpdateMode( sal_False ); SvxAdjust eSvxAdjust = (eHorJust==SVX_HOR_JUSTIFY_RIGHT) ? @@ -3556,7 +3556,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) else pEngine->SetPaperSize(aPaperSize); - pEngine->SetUpdateMode( TRUE ); + pEngine->SetUpdateMode( sal_True ); } } else @@ -3670,7 +3670,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) { // For right-to-left, EditEngine always calculates its lines // beginning from the right edge, but EditLine::nStartPosX is - // of USHORT type, so the PaperSize must be limited to USHRT_MAX. + // of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX. Size aLogicPaper = pEngine->GetPaperSize(); if ( aLogicPaper.Width() > USHRT_MAX ) { diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 953e648e0..c72703eb2 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -211,7 +211,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer) pModel->UseHyphenator(); - ULONG nOldDrawMode = pDev->GetDrawMode(); + sal_uLong nOldDrawMode = pDev->GetDrawMode(); if ( bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) { pDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | @@ -245,7 +245,7 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer) // #109985# void ScOutputData::DrawingSingle(const sal_uInt16 nLayer) { - BOOL bHad = FALSE; + sal_Bool bHad = sal_False; long nPosY = nScrY; SCSIZE nArrY; for (nArrY=1; nArrY+1<nArrCount; nArrY++) @@ -256,13 +256,13 @@ void ScOutputData::DrawingSingle(const sal_uInt16 nLayer) { if (!bHad) { - bHad = TRUE; + bHad = sal_True; } } else if (bHad) { DrawSelectiveObjects( nLayer ); - bHad = FALSE; + bHad = sal_False; } nPosY += pRowInfo[nArrY].nHeight; } diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx index 4db10a23e..9ace7b88a 100644 --- a/sc/source/ui/view/pfuncache.cxx +++ b/sc/source/ui/view/pfuncache.cxx @@ -113,7 +113,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe if ( rMark.GetTableSelect( nTab ) ) { ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange, &aSelection.GetOptions() ); - aFunc.SetRenderFlag( TRUE ); + aFunc.SetRenderFlag( sal_True ); long nDisplayStart = GetDisplayStart( nTab ); @@ -125,7 +125,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe aPage.Select( aPageRange ); ScPreviewLocationData aLocData( pDoc, pDev ); - aFunc.DoPrint( aPage, nTabStart, nDisplayStart, FALSE, NULL, &aLocData ); + aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_False, NULL, &aLocData ); ScRange aCellRange; Rectangle aPixRect; @@ -156,7 +156,7 @@ bool ScPrintFuncCache::FindLocation( const ScAddress& rCell, ScPrintPageLocation return false; // not found } -BOOL ScPrintFuncCache::IsSameSelection( const ScPrintSelectionStatus& rStatus ) const +sal_Bool ScPrintFuncCache::IsSameSelection( const ScPrintSelectionStatus& rStatus ) const { return aSelection == rStatus; } diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 82f0c62da..d53e23c51 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -147,7 +147,7 @@ void ScPivotShell::Execute( SfxRequest& rReq ) ScDPObject aNewObj( *pDPObj ); aNewObj.SetSheetDesc( aNewDesc ); ScDBDocFunc aFunc( *pViewData->GetDocShell() ); - aFunc.DataPilotUpdate( pDPObj, &aNewObj, TRUE, FALSE ); + aFunc.DataPilotUpdate( pDPObj, &aNewObj, sal_True, sal_False ); pViewData->GetView()->CursorPosChanged(); // shells may be switched } delete pDlg; @@ -162,10 +162,10 @@ void __EXPORT ScPivotShell::GetState( SfxItemSet& rSet ) { ScDocShell* pDocSh = pViewShell->GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack(); + sal_Bool bDisable = pDocSh->IsReadOnly() || pDoc->GetChangeTrack(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { switch (nWhich) diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index f96aa09cd..2a45480dc 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -99,34 +99,34 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView Window( pParent ), nPageNo( 0 ), nZoom( 100 ), - bValid( FALSE ), + bValid( sal_False ), nTabsTested( 0 ), nTab( 0 ), nTabStart( 0 ), nDisplayStart( 0 ), nTotalPages( 0 ), - bStateValid( FALSE ), - bLocationValid( FALSE ), + bStateValid( sal_False ), + bLocationValid( sal_False ), pLocationData( NULL ), pDrawView( NULL ), - bInPaint( FALSE ), - bInGetState( FALSE ), + bInPaint( sal_False ), + bInGetState( sal_False ), pDocShell( pDocSh ), pViewShell( pViewSh ), - bLeftRulerMove( FALSE ), - bRightRulerMove( FALSE ), - bTopRulerMove( FALSE ), - bBottomRulerMove( FALSE ), - bHeaderRulerMove( FALSE ), - bFooterRulerMove( FALSE ), - bLeftRulerChange( FALSE ), - bRightRulerChange( FALSE ), - bTopRulerChange( FALSE ), - bBottomRulerChange( FALSE ), - bHeaderRulerChange( FALSE ), - bFooterRulerChange( FALSE ), - bPageMargin ( FALSE ), - bColRulerMove( FALSE ), + bLeftRulerMove( sal_False ), + bRightRulerMove( sal_False ), + bTopRulerMove( sal_False ), + bBottomRulerMove( sal_False ), + bHeaderRulerMove( sal_False ), + bFooterRulerMove( sal_False ), + bLeftRulerChange( sal_False ), + bRightRulerChange( sal_False ), + bTopRulerChange( sal_False ), + bBottomRulerChange( sal_False ), + bHeaderRulerChange( sal_False ), + bFooterRulerChange( sal_False ), + bPageMargin ( sal_False ), + bColRulerMove( sal_False ), mnScale( 0 ), nColNumberButttonDown( 0 ), nHeaderHeight ( 0 ), @@ -169,8 +169,8 @@ void ScPreview::UpdateDrawView() // nTab muss richtig sein pDrawView = new FmFormView( pModel, this ); // #55259# die DrawView uebernimmt den Design-Modus vom Model // (Einstellung "Im Entwurfsmodus oeffnen"), darum hier zuruecksetzen - pDrawView->SetDesignMode( TRUE ); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetDesignMode( sal_True ); + pDrawView->SetPrintPreview( sal_True ); pDrawView->ShowSdrPage(pPage); } #if 0 @@ -202,7 +202,7 @@ void ScPreview::TestLastPage() DBG_ASSERT(nPages[nTab],"alle Tabellen leer?"); nTabPage = nPages[nTab] - 1; nTabStart = 0; - for (USHORT i=0; i<nTab; i++) + for (sal_uInt16 i=0; i<nTab; i++) nTabStart += nPages[i]; ScDocument* pDoc = pDocShell->GetDocument(); @@ -283,8 +283,8 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ ) aState.nDocPages = nTotalPages; - bValid = TRUE; - bStateValid = TRUE; + bValid = sal_True; + bStateValid = sal_True; DoInvalidate(); } @@ -296,11 +296,11 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert SCTAB nOldTab = nTab; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; while (nPageNo >= nTotalPages && nTabsTested < nTabCount) { CalcPages( nTabsTested ); - bDone = TRUE; + bDone = sal_True; } if (!bDone) @@ -328,7 +328,7 @@ void ScPreview::RecalcPages() // nur nPageNo geaendert TestLastPage(); // testen, ob hinter letzter Seite if ( nTab != nOldTab ) - bStateValid = FALSE; + bStateValid = sal_False; DoInvalidate(); } @@ -347,8 +347,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); - BOOL bDoPrint = ( pFillLocation == NULL ); - BOOL bValidPage = ( nPageNo < nTotalPages ); + sal_Bool bDoPrint = ( pFillLocation == NULL ); + sal_Bool bValidPage = ( nPageNo < nTotalPages ); ScModule* pScMod = SC_MOD(); const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig(); @@ -381,7 +381,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) pPrintFunc->SetOffset(aOffset); pPrintFunc->SetManualZoom(nZoom); pPrintFunc->SetDateTime(aDate,aTime); - pPrintFunc->SetClearFlag(TRUE); + pPrintFunc->SetClearFlag(sal_True); pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() ); pPrintFunc->SetDrawView( pDrawView ); @@ -396,7 +396,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) DBG_ASSERT(nPrinted<=1, "was'n nu los?"); SetMapMode(aMMMode); -// USHORT nPrintZoom = pPrintFunc->GetZoom(); +// sal_uInt16 nPrintZoom = pPrintFunc->GetZoom(); if (nPrinted) // wenn nichts, alles grau zeichnen { @@ -409,7 +409,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) { pPrintFunc->GetPrintState( aState ); aState.nDocPages = nTotalPages; - bStateValid = TRUE; + bStateValid = sal_True; } delete pPrintFunc; } @@ -423,8 +423,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Size aWinSize = GetOutputSize(); Point aWinEnd( aWinSize.Width(), aWinSize.Height() ); - BOOL bRight = nPageEndX <= aWinEnd.X(); - BOOL bBottom = nPageEndY <= aWinEnd.Y(); + sal_Bool bRight = nPageEndX <= aWinEnd.X(); + sal_Bool bBottom = nPageEndY <= aWinEnd.Y(); if (bRight || bBottom) { SetLineColor(); @@ -514,11 +514,11 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) long nRightMargin = 0; long nTopMargin = 0; long nBottomMargin = 0; - BOOL bHeaderOn = FALSE; - BOOL bFooterOn = FALSE; + sal_Bool bHeaderOn = sal_False; + sal_Bool bFooterOn = sal_False; ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); Size aPaintPageSize; if ( nPageNo < nTotalPages ) @@ -534,7 +534,7 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) pPrintFunc->SetOffset(aOffset); pPrintFunc->SetManualZoom(nZoom); pPrintFunc->SetDateTime(aDate,aTime); - pPrintFunc->SetClearFlag(TRUE); + pPrintFunc->SetClearFlag(sal_True); pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() ); pPrintFunc->SetDrawView( pDrawView ); @@ -606,7 +606,7 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) { pPrintFunc->GetPrintState( aState ); aState.nDocPages = nTotalPages; - bStateValid = TRUE; + bStateValid = sal_True; } delete pPrintFunc; @@ -617,8 +617,8 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) long nPageEndY = aPaintPageSize.Height() - aOffset.Y(); Size aWinSize = GetOutputSize(); Point aWinEnd( aWinSize.Width(), aWinSize.Height() ); - BOOL bRight = nPageEndX <= aWinEnd.X(); - BOOL bBottom = nPageEndY <= aWinEnd.Y(); + sal_Bool bRight = nPageEndX <= aWinEnd.X(); + sal_Bool bBottom = nPageEndY <= aWinEnd.Y(); if( bPageMargin ) { @@ -670,10 +670,10 @@ void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ ) void __EXPORT ScPreview::Command( const CommandEvent& rCEvt ) { - USHORT nCmd = rCEvt.GetCommand(); + sal_uInt16 nCmd = rCEvt.GetCommand(); if ( nCmd == COMMAND_WHEEL || nCmd == COMMAND_STARTAUTOSCROLL || nCmd == COMMAND_AUTOSCROLL ) { - BOOL bDone = pViewShell->ScrollCommand( rCEvt ); + sal_Bool bDone = pViewShell->ScrollCommand( rCEvt ); if (!bDone) Window::Command(rCEvt); } @@ -690,11 +690,11 @@ void __EXPORT ScPreview::KeyInput( const KeyEvent& rKEvt ) // (in ScPreview, not ScPreviewShell -> only if the preview window has the focus) const KeyCode& rKeyCode = rKEvt.GetKeyCode(); - USHORT nKey = rKeyCode.GetCode(); - BOOL bHandled = FALSE; + sal_uInt16 nKey = rKeyCode.GetCode(); + sal_Bool bHandled = sal_False; if(!rKeyCode.GetModifier()) { - USHORT nSlot = 0; + sal_uInt16 nSlot = 0; switch(nKey) { case KEY_ADD: nSlot = SID_PREVIEW_ZOOMIN; break; @@ -703,7 +703,7 @@ void __EXPORT ScPreview::KeyInput( const KeyEvent& rKEvt ) } if(nSlot) { - bHandled = TRUE; + bHandled = sal_True; pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON ); } } @@ -718,19 +718,19 @@ const ScPreviewLocationData& ScPreview::GetLocationData() if ( !pLocationData ) { pLocationData = new ScPreviewLocationData( pDocShell->GetDocument(), this ); - bLocationValid = FALSE; + bLocationValid = sal_False; } if ( !bLocationValid ) { pLocationData->Clear(); DoPrint( pLocationData ); - bLocationValid = TRUE; + bLocationValid = sal_True; } return *pLocationData; } -void ScPreview::DataChanged(BOOL bNewTime) +void ScPreview::DataChanged(sal_Bool bNewTime) { if (bNewTime) { @@ -738,7 +738,7 @@ void ScPreview::DataChanged(BOOL bNewTime) aTime = Time(); } - bValid = FALSE; + bValid = sal_False; InvalidateLocationData( SC_HINT_DATACHANGED ); Invalidate(); } @@ -766,7 +766,7 @@ String ScPreview::GetPosString() } -void ScPreview::SetZoom(USHORT nNewZoom) +void ScPreview::SetZoom(sal_uInt16 nNewZoom) { if (nNewZoom < 20) nNewZoom = 20; @@ -783,11 +783,11 @@ void ScPreview::SetZoom(USHORT nNewZoom) MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom ); SetMapMode( aMMMode ); - bInPaint = TRUE; // don't scroll during SetYOffset in UpdateScrollBars + bInPaint = sal_True; // don't scroll during SetYOffset in UpdateScrollBars pViewShell->UpdateScrollBars(); - bInPaint = FALSE; + bInPaint = sal_False; - bStateValid = FALSE; + bStateValid = sal_False; InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED ); DoInvalidate(); Invalidate(); @@ -848,7 +848,7 @@ Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab ) } -USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly) +sal_uInt16 ScPreview::GetOptimalZoom(sal_Bool bWidthOnly) { double nWinScaleX = ScGlobal::nScreenPPTX / pDocShell->GetOutputFactor(); double nWinScaleY = ScGlobal::nScreenPPTY; @@ -876,7 +876,7 @@ USHORT ScPreview::GetOptimalZoom(BOOL bWidthOnly) if (nOptimal>400) nOptimal = 400; - return (USHORT) nOptimal; + return (sal_uInt16) nOptimal; } else return nZoom; @@ -1023,14 +1023,14 @@ void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) if( bLeftRulerChange ) { DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR ); - bLeftRulerMove = TRUE; - bRightRulerMove = FALSE; + bLeftRulerMove = sal_True; + bRightRulerMove = sal_False; } else if( bRightRulerChange ) { DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR ); - bLeftRulerMove = FALSE; - bRightRulerMove = TRUE; + bLeftRulerMove = sal_False; + bRightRulerMove = sal_True; } } @@ -1040,26 +1040,26 @@ void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) if( bTopRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bTopRulerMove = TRUE; - bBottomRulerMove = FALSE; + bTopRulerMove = sal_True; + bBottomRulerMove = sal_False; } else if( bBottomRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bTopRulerMove = FALSE; - bBottomRulerMove = TRUE; + bTopRulerMove = sal_False; + bBottomRulerMove = sal_True; } else if( bHeaderRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bHeaderRulerMove = TRUE; - bFooterRulerMove = FALSE; + bHeaderRulerMove = sal_True; + bFooterRulerMove = sal_False; } else if( bFooterRulerChange ) { DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR ); - bHeaderRulerMove = FALSE; - bFooterRulerMove = TRUE; + bHeaderRulerMove = sal_False; + bFooterRulerMove = sal_True; } } @@ -1085,7 +1085,7 @@ void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt ) DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT ); DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT ); - bColRulerMove = TRUE; + bColRulerMove = sal_True; } } @@ -1104,11 +1104,11 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) { SetPointer( Pointer( POINTER_ARROW ) ); - BOOL bMoveRulerAction= TRUE; + sal_Bool bMoveRulerAction= sal_True; ScDocument * pDoc = pDocShell->GetDocument(); String aOldName = pDoc->GetPageStyle( nTab ); - BOOL bUndo( pDoc->IsUndoEnabled() ); + sal_Bool bUndo( pDoc->IsUndoEnabled() ); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE ); @@ -1124,22 +1124,22 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if(( bLeftRulerChange || bRightRulerChange ) && ( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth * HMM_PER_TWIPS - aOffset.X() ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint(Rectangle(0,0,10000,10000)); } else if( bLeftRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS > nWidth - aLRItem.GetRight() - aOffset.X() / HMM_PER_TWIPS ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint(Rectangle(0,0,10000,10000)); } else if( bRightRulerChange && ( aButtonUpPt.X() / HMM_PER_TWIPS < aLRItem.GetLeft() - aOffset.X() / HMM_PER_TWIPS ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint(Rectangle(0,0,10000,10000)); } else if( aButtonDownPt.X() == aButtonUpPt.X() ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; DrawInvert( aButtonUpPt.X(), POINTER_HSIZEBAR ); } if( bMoveRulerAction ) @@ -1172,33 +1172,33 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) Rectangle aRect(0,0,10000,10000); Paint( aRect ); - bLeftRulerChange = FALSE; - bRightRulerChange = FALSE; + bLeftRulerChange = sal_False; + bRightRulerChange = sal_False; } } - bLeftRulerMove = FALSE; - bRightRulerMove = FALSE; + bLeftRulerMove = sal_False; + bRightRulerMove = sal_False; } if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR ) { SetPointer( POINTER_ARROW ); - BOOL bMoveRulerAction = TRUE; + sal_Bool bMoveRulerAction = sal_True; if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; Paint( Rectangle(0,0,10000,10000) ); } else if( aButtonDownPt.Y() == aButtonUpPt.Y() ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR ); } if( bMoveRulerAction ) { ScDocument * pDoc = pDocShell->GetDocument(); - BOOL bUndo( pDoc->IsUndoEnabled() ); + sal_Bool bUndo( pDoc->IsUndoEnabled() ); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ); DBG_ASSERT( pStyleSheet, "PageStyle not found" ); @@ -1214,18 +1214,18 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if( bTopRulerMove && bTopRulerChange ) { - aULItem.SetUpperValue( (USHORT)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) ); + aULItem.SetUpperValue( (sal_uInt16)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) ); rStyleSet.Put( aULItem ); } else if( bBottomRulerMove && bBottomRulerChange ) { - aULItem.SetLowerValue( (USHORT)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) ); + aULItem.SetLowerValue( (sal_uInt16)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) ); rStyleSet.Put( aULItem ); } else if( bHeaderRulerMove && bHeaderRulerChange ) { const SfxPoolItem* pItem = NULL; - if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, FALSE, &pItem ) == SFX_ITEM_SET ) + if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, sal_False, &pItem ) == SFX_ITEM_SET ) { SfxItemSet& pHeaderSet = ((SvxSetItem*)pItem)->GetItemSet(); Size aHeaderSize = ((const SvxSizeItem&)pHeaderSet.Get(ATTR_PAGE_SIZE)).GetSize(); @@ -1239,7 +1239,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) else if( bFooterRulerMove && bFooterRulerChange ) { const SfxPoolItem* pItem = NULL; - if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, FALSE, &pItem ) == SFX_ITEM_SET ) + if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, sal_False, &pItem ) == SFX_ITEM_SET ) { SfxItemSet& pFooterSet = ((SvxSetItem*)pItem)->GetItemSet(); Size aFooterSize = ((const SvxSizeItem&)pFooterSet.Get(ATTR_PAGE_SIZE)).GetSize(); @@ -1268,26 +1268,26 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) Rectangle aRect(0,0,10000,10000); Paint( aRect ); - bTopRulerChange = FALSE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_False; } } - bTopRulerMove = FALSE; - bBottomRulerMove = FALSE; - bHeaderRulerMove = FALSE; - bFooterRulerMove = FALSE; + bTopRulerMove = sal_False; + bBottomRulerMove = sal_False; + bHeaderRulerMove = sal_False; + bFooterRulerMove = sal_False; } if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT ) { SetPointer(POINTER_ARROW); ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); - BOOL bMoveRulerAction = TRUE; + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bMoveRulerAction = sal_True; if( aButtonDownPt.X() == aButtonUpPt.X() ) { - bMoveRulerAction = FALSE; + bMoveRulerAction = sal_False; if( nColNumberButttonDown == aPageArea.aStart.Col() ) DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT ); else @@ -1314,7 +1314,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) if( nNewColWidth >= 0 ) { - aFunc.SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_DIRECT, (USHORT)nNewColWidth, TRUE, TRUE); + aFunc.SetWidthOrHeight( sal_True, 1,nCols, nTab, SC_SIZE_DIRECT, (sal_uInt16)nNewColWidth, sal_True, sal_True); } if ( ValidTab( nTab ) ) { @@ -1324,7 +1324,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt ) Rectangle nRect(0,0,10000,10000); Paint( nRect ); } - bColRulerMove = FALSE; + bColRulerMove = sal_False; } ReleaseMouse(); } @@ -1385,7 +1385,7 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) Point aHeaderLeft = LogicToPixel( Point( -aOffset.X(), nHeaderHeight ), aMMMode ); Point aFooderLeft = LogicToPixel( Point( -aOffset.X(), nFooterHeight ), aMMMode ); - BOOL bOnColRulerChange = FALSE; + sal_Bool bOnColRulerChange = sal_False; for( SCCOL i=aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ ) { @@ -1395,7 +1395,7 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) && ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() < aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - bOnColRulerChange = TRUE; + bOnColRulerChange = sal_True; if( !rMEvt.GetButtons() && GetPointer() == POINTER_HSPLIT ) nColNumberButttonDown = i; break; @@ -1404,41 +1404,41 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) if( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 ) && !bRightRulerMove ) { - bLeftRulerChange = TRUE; - bRightRulerChange = FALSE; + bLeftRulerChange = sal_True; + bRightRulerChange = sal_False; } else if( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > ( aRightTop.X() - 2 ) && !bLeftRulerMove ) { - bLeftRulerChange = FALSE; - bRightRulerChange = TRUE; + bLeftRulerChange = sal_False; + bRightRulerChange = sal_True; } else if( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > ( aTopLeft.Y() - 2 ) && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - bTopRulerChange = TRUE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_True; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_False; } else if( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > ( aBottomLeft.Y() - 2 ) && !bTopRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { - bTopRulerChange = FALSE; - bBottomRulerChange = TRUE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_True; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_False; } else if( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > ( aHeaderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bFooterRulerMove ) { - bTopRulerChange = FALSE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = TRUE; - bFooterRulerChange = FALSE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_True; + bFooterRulerChange = sal_False; } else if( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > ( aFooderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove ) { - bTopRulerChange = FALSE; - bBottomRulerChange = FALSE; - bHeaderRulerChange = FALSE; - bFooterRulerChange = TRUE; + bTopRulerChange = sal_False; + bBottomRulerChange = sal_False; + bHeaderRulerChange = sal_False; + bFooterRulerChange = sal_True; } if( bPageMargin ) @@ -1529,9 +1529,9 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt ) } } //Issue51656 Add resizeable margin on page preview from maoyg -void ScPreview::InvalidateLocationData(ULONG nId) +void ScPreview::InvalidateLocationData(sal_uLong nId) { - bLocationValid = FALSE; + bLocationValid = sal_False; if (pViewShell->HasAccessibilityObjects()) pViewShell->BroadcastAccessibility( SfxSimpleHint( nId ) ); } @@ -1558,7 +1558,7 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre } //Issue51656 Add resizeable margin on page preview from maoyg -void ScPreview::DragMove( long nDragMovePos, USHORT nFlags ) +void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags ) { Fraction aPreviewZoom( nZoom, 100 ); Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 ); @@ -1585,7 +1585,7 @@ void ScPreview::DragMove( long nDragMovePos, USHORT nFlags ) } } -void ScPreview::DrawInvert( long nDragPos, USHORT nFlags ) +void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags ) { long nHeight = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Height(); long nWidth = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab ).Width(); diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx index a5fd77cf0..ba2436ebc 100644 --- a/sc/source/ui/view/prevloc.cxx +++ b/sc/source/ui/view/prevloc.cxx @@ -58,11 +58,11 @@ struct ScPreviewLocationEntry ScPreviewLocationType eType; Rectangle aPixelRect; ScRange aCellRange; - BOOL bRepeatCol; - BOOL bRepeatRow; + sal_Bool bRepeatCol; + sal_Bool bRepeatRow; ScPreviewLocationEntry( ScPreviewLocationType eNewType, const Rectangle& rPixel, const ScRange& rRange, - BOOL bRepCol, BOOL bRepRow ) : + sal_Bool bRepCol, sal_Bool bRepRow ) : eType( eNewType ), aPixelRect( rPixel ), aCellRange( rRange ), @@ -203,7 +203,7 @@ void ScPreviewLocationData::Clear() nDrawRanges = 0; } -void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow, +void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, sal_Bool bRepCol, sal_Bool bRepRow, const MapMode& rDrawMap ) { Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); @@ -228,23 +228,23 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& } } -void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol ) +void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, sal_Bool bRepCol ) { SCTAB nTab = 0; //! ? ScRange aRange( nStartCol, 0, nTab, nEndCol, 0, nTab ); Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); - aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, FALSE ) ); + aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, sal_False ) ); } -void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow ) +void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, sal_Bool bRepRow ) { SCTAB nTab = 0; //! ? ScRange aRange( 0, nStartRow, nTab, 0, nEndRow, nTab ); Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); - aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_ROWHEADER, aPixelRect, aRange, FALSE, bRepRow ) ); + aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_ROWHEADER, aPixelRect, aRange, sal_False, bRepRow ) ); } -void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft ) +void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, sal_Bool bHeader, sal_Bool bLeft ) { ScRange aRange; //! ? Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); @@ -252,26 +252,26 @@ void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, BOOL bHeade ScPreviewLocationType eType = bHeader ? ( bLeft ? SC_PLOC_LEFTHEADER : SC_PLOC_RIGHTHEADER ) : ( bLeft ? SC_PLOC_LEFTFOOTER : SC_PLOC_RIGHTFOOTER ); - aEntries.Insert( new ScPreviewLocationEntry( eType, aPixelRect, aRange, FALSE, FALSE ) ); + aEntries.Insert( new ScPreviewLocationEntry( eType, aPixelRect, aRange, sal_False, sal_False ) ); } void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress& rPos ) { ScRange aRange( rPos ); Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); - aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_NOTEMARK, aPixelRect, aRange, FALSE, FALSE ) ); + aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_NOTEMARK, aPixelRect, aRange, sal_False, sal_False ) ); } void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress& rPos ) { ScRange aRange( rPos ); Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) ); - aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_NOTETEXT, aPixelRect, aRange, FALSE, FALSE ) ); + aEntries.Insert( new ScPreviewLocationEntry( SC_PLOC_NOTETEXT, aPixelRect, aRange, sal_False, sal_False ) ); } //------------------------------------------------------------------ -void ScPreviewLocationData::GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const +void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const { DBG_ASSERT( nPos < nDrawRanges, "wrong position" ); if ( nPos < nDrawRanges ) @@ -284,8 +284,8 @@ void ScPreviewLocationData::GetDrawRange( USHORT nPos, Rectangle& rPixelRect, Ma ScPreviewLocationEntry* lcl_GetEntryByAddress( const List& rEntries, const ScAddress& rPos, ScPreviewLocationType eType ) { - ULONG nCount = rEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = rEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)rEntries.GetObject(nListPos); if ( pEntry->eType == eType && pEntry->aCellRange.In( rPos ) ) @@ -307,7 +307,7 @@ ScPreviewLocationEntry* lcl_GetEntryByAddress( const List& rEntries, const ScAdd //UNUSED2008-05 SCCOL nEndCol = rRange.aEnd.Col(); //UNUSED2008-05 while ( nCol <= nEndCol && nPosX < aOffsetLogic.Width() ) //UNUSED2008-05 { -//UNUSED2008-05 USHORT nDocW = pDoc->GetColWidth( nCol, nTab ); +//UNUSED2008-05 sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab ); //UNUSED2008-05 if (nDocW) //UNUSED2008-05 nPosX += (long) (nDocW * nScaleX); //UNUSED2008-05 ++nCol; @@ -316,12 +316,12 @@ ScPreviewLocationEntry* lcl_GetEntryByAddress( const List& rEntries, const ScAdd //UNUSED2008-05 --nCol; //UNUSED2008-05 //UNUSED2008-05 long nPosY = 0; -//UNUSED2008-05 ScCoupledCompressedArrayIterator< SCROW, BYTE, USHORT> aIter( +//UNUSED2008-05 ScCoupledCompressedArrayIterator< SCROW, sal_uInt8, sal_uInt16> aIter( //UNUSED2008-05 pDoc->GetRowFlagsArray( nTab), rRange.aStart.Row(), //UNUSED2008-05 rRange.aEnd.Row(), CR_HIDDEN, 0, pDoc->GetRowHeightArray( nTab)); //UNUSED2008-05 while ( aIter && nPosY < aOffsetLogic.Height() ) //UNUSED2008-05 { -//UNUSED2008-05 USHORT nDocH = *aIter; +//UNUSED2008-05 sal_uInt16 nDocH = *aIter; //UNUSED2008-05 if (nDocH) //UNUSED2008-05 nPosY += (long) (nDocH * nScaleY); //UNUSED2008-05 ++aIter; @@ -343,7 +343,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons SCCOL nEndCol = rCellPos.Col(); for (SCCOL nCol = rRange.aStart.Col(); nCol < nEndCol; nCol++) { - USHORT nDocW = pDoc->GetColWidth( nCol, nTab ); + sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab ); if (nDocW) nPosX += (long) (nDocW * nScaleX); } @@ -362,7 +362,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel ); } -BOOL ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const +sal_Bool ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const { ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( aEntries, rCellPos, SC_PLOC_CELLRANGE ); if ( pEntry ) @@ -372,90 +372,90 @@ BOOL ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangl aOffsetRect.Top() + pEntry->aPixelRect.Top(), aOffsetRect.Right() + pEntry->aPixelRect.Left(), aOffsetRect.Bottom() + pEntry->aPixelRect.Top() ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const +sal_Bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const { - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); ScPreviewLocationType eType = pEntry->eType; if ( eType == SC_PLOC_CELLRANGE || eType == SC_PLOC_COLHEADER || eType == SC_PLOC_ROWHEADER ) if ( pEntry->aPixelRect.IsOver( rVisiblePixel ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const +sal_Bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const { - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == SC_PLOC_LEFTHEADER || pEntry->eType == SC_PLOC_RIGHTHEADER ) { rRect = pEntry->aPixelRect; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -BOOL ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const +sal_Bool ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const { - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == SC_PLOC_LEFTFOOTER || pEntry->eType == SC_PLOC_RIGHTFOOTER ) { rRect = pEntry->aPixelRect; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -BOOL ScPreviewLocationData::IsHeaderLeft() const +sal_Bool ScPreviewLocationData::IsHeaderLeft() const { - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == SC_PLOC_LEFTHEADER ) - return TRUE; + return sal_True; if ( pEntry->eType == SC_PLOC_RIGHTHEADER ) - return FALSE; + return sal_False; } - return FALSE; + return sal_False; } -BOOL ScPreviewLocationData::IsFooterLeft() const +sal_Bool ScPreviewLocationData::IsFooterLeft() const { - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == SC_PLOC_LEFTFOOTER ) - return TRUE; + return sal_True; if ( pEntry->eType == SC_PLOC_RIGHTFOOTER ) - return FALSE; + return sal_False; } - return FALSE; + return sal_False; } -long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const +long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, sal_Bool bNoteMarks ) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; - ULONG nRet = 0; - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nRet = 0; + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == eType && pEntry->aPixelRect.IsOver( rVisiblePixel ) ) @@ -464,37 +464,37 @@ long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, return nRet; } -BOOL ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks, +sal_Bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, sal_Bool bNoteMarks, ScAddress& rCellPos, Rectangle& rNoteRect ) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; - ULONG nPos = 0; - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nPos = 0; + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == eType && pEntry->aPixelRect.IsOver( rVisiblePixel ) ) { - if ( nPos == sal::static_int_cast<ULONG>(nIndex) ) + if ( nPos == sal::static_int_cast<sal_uLong>(nIndex) ) { rCellPos = pEntry->aCellRange.aStart; rNoteRect = pEntry->aPixelRect; - return TRUE; + return sal_True; } ++nPos; } } - return FALSE; + return sal_False; } -Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks, const ScAddress& aCellPos) const +Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, sal_Bool bNoteMarks, const ScAddress& aCellPos) const { ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT; - ULONG nPos = 0; - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nPos = 0; + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == eType && pEntry->aPixelRect.IsOver( rVisiblePixel ) ) @@ -513,18 +513,18 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev const double nScaleY = HMM_PER_TWIPS; // from left to right: - BOOL bHasHeaderCol = FALSE; - BOOL bHasRepCols = FALSE; - BOOL bHasMainCols = FALSE; + sal_Bool bHasHeaderCol = sal_False; + sal_Bool bHasRepCols = sal_False; + sal_Bool bHasMainCols = sal_False; SCCOL nRepeatColStart = 0; SCCOL nRepeatColEnd = 0; SCCOL nMainColStart = 0; SCCOL nMainColEnd = 0; // from top to bottom: - BOOL bHasHeaderRow = FALSE; - BOOL bHasRepRows = FALSE; - BOOL bHasMainRows = FALSE; + sal_Bool bHasHeaderRow = sal_False; + sal_Bool bHasRepRows = sal_False; + sal_Bool bHasMainRows = sal_False; SCROW nRepeatRowStart = 0; SCROW nRepeatRowEnd = 0; SCROW nMainRowStart = 0; @@ -533,15 +533,15 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev Rectangle aHeaderRect, aRepeatRect, aMainRect; SCTAB nTab = 0; - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == SC_PLOC_CELLRANGE ) { if ( pEntry->bRepeatCol ) { - bHasRepCols = TRUE; + bHasRepCols = sal_True; nRepeatColStart = pEntry->aCellRange.aStart.Col(); nRepeatColEnd = pEntry->aCellRange.aEnd.Col(); aRepeatRect.Left() = pEntry->aPixelRect.Left(); @@ -549,7 +549,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev } else { - bHasMainCols = TRUE; + bHasMainCols = sal_True; nMainColStart = pEntry->aCellRange.aStart.Col(); nMainColEnd = pEntry->aCellRange.aEnd.Col(); aMainRect.Left() = pEntry->aPixelRect.Left(); @@ -557,7 +557,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev } if ( pEntry->bRepeatRow ) { - bHasRepRows = TRUE; + bHasRepRows = sal_True; nRepeatRowStart = pEntry->aCellRange.aStart.Row(); nRepeatRowEnd = pEntry->aCellRange.aEnd.Row(); aRepeatRect.Top() = pEntry->aPixelRect.Top(); @@ -565,7 +565,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev } else { - bHasMainRows = TRUE; + bHasMainRows = sal_True; nMainRowStart = pEntry->aCellRange.aStart.Row(); nMainRowEnd = pEntry->aCellRange.aEnd.Row(); aMainRect.Top() = pEntry->aPixelRect.Top(); @@ -576,14 +576,14 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev else if ( pEntry->eType == SC_PLOC_ROWHEADER ) { // row headers result in an additional column - bHasHeaderCol = TRUE; + bHasHeaderCol = sal_True; aHeaderRect.Left() = pEntry->aPixelRect.Left(); aHeaderRect.Right() = pEntry->aPixelRect.Right(); } else if ( pEntry->eType == SC_PLOC_COLHEADER ) { // column headers result in an additional row - bHasHeaderRow = TRUE; + bHasHeaderRow = sal_True; aHeaderRect.Top() = pEntry->aPixelRect.Top(); aHeaderRect.Bottom() = pEntry->aPixelRect.Bottom(); } @@ -613,7 +613,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev if ( bHasHeaderCol ) { - pColInfo[nColPos].Set( TRUE, 0, aHeaderRect.Left(), aHeaderRect.Right() ); + pColInfo[nColPos].Set( sal_True, 0, aHeaderRect.Left(), aHeaderRect.Right() ); ++nColPos; } if ( bHasRepCols ) @@ -622,12 +622,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev for ( nCol=nRepeatColStart; nCol<=nRepeatColEnd; nCol++ ) if (!pDoc->ColHidden(nCol, nTab)) { - USHORT nDocW = pDoc->GetColWidth( nCol, nTab ); + sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab ); long nNextX = nPosX + (long) (nDocW * nScaleX); long nPixelStart = pWindow->LogicToPixel( Size( nPosX, 0 ), aCellMapMode ).Width(); long nPixelEnd = pWindow->LogicToPixel( Size( nNextX, 0 ), aCellMapMode ).Width() - 1; - pColInfo[nColPos].Set( FALSE, nCol, + pColInfo[nColPos].Set( sal_False, nCol, aRepeatRect.Left() + nPixelStart, aRepeatRect.Left() + nPixelEnd ); @@ -641,12 +641,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev for ( nCol=nMainColStart; nCol<=nMainColEnd; nCol++ ) if (!pDoc->ColHidden(nCol, nTab)) { - USHORT nDocW = pDoc->GetColWidth( nCol, nTab ); + sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nTab ); long nNextX = nPosX + (long) (nDocW * nScaleX); long nPixelStart = pWindow->LogicToPixel( Size( nPosX, 0 ), aCellMapMode ).Width(); long nPixelEnd = pWindow->LogicToPixel( Size( nNextX, 0 ), aCellMapMode ).Width() - 1; - pColInfo[nColPos].Set( FALSE, nCol, + pColInfo[nColPos].Set( sal_False, nCol, aMainRect.Left() + nPixelStart, aMainRect.Left() + nPixelEnd ); @@ -678,7 +678,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev if ( bHasHeaderRow ) { - pRowInfo[nRowPos].Set( TRUE, 0, aHeaderRect.Top(), aHeaderRect.Bottom() ); + pRowInfo[nRowPos].Set( sal_True, 0, aHeaderRect.Top(), aHeaderRect.Bottom() ); ++nRowPos; } if ( bHasRepRows ) @@ -689,12 +689,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev if (pDoc->RowHidden(nRow, nTab)) continue; - USHORT nDocH = pDoc->GetOriginalHeight( nRow, nTab ); + sal_uInt16 nDocH = pDoc->GetOriginalHeight( nRow, nTab ); long nNextY = nPosY + (long) (nDocH * nScaleY); long nPixelStart = pWindow->LogicToPixel( Size( 0, nPosY ), aCellMapMode ).Height(); long nPixelEnd = pWindow->LogicToPixel( Size( 0, nNextY ), aCellMapMode ).Height() - 1; - pRowInfo[nRowPos].Set( FALSE, nRow, + pRowInfo[nRowPos].Set( sal_False, nRow, aRepeatRect.Top() + nPixelStart, aRepeatRect.Top() + nPixelEnd ); @@ -710,12 +710,12 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev if (pDoc->RowHidden(nRow, nTab)) continue; - USHORT nDocH = pDoc->GetOriginalHeight( nRow, nTab ); + sal_uInt16 nDocH = pDoc->GetOriginalHeight( nRow, nTab ); long nNextY = nPosY + (long) (nDocH * nScaleY); long nPixelStart = pWindow->LogicToPixel( Size( 0, nPosY ), aCellMapMode ).Height(); long nPixelEnd = pWindow->LogicToPixel( Size( 0, nNextY ), aCellMapMode ).Height() - 1; - pRowInfo[nRowPos].Set( FALSE, nRow, + pRowInfo[nRowPos].Set( sal_False, nRow, aMainRect.Top() + nPixelStart, aMainRect.Top() + nPixelEnd ); @@ -774,19 +774,19 @@ Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) co // GetMainCellRange is used for links in PDF export -BOOL ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const +sal_Bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const { - ULONG nCount = aEntries.Count(); - for (ULONG nListPos=0; nListPos<nCount; nListPos++) + sal_uLong nCount = aEntries.Count(); + for (sal_uLong nListPos=0; nListPos<nCount; nListPos++) { ScPreviewLocationEntry* pEntry = (ScPreviewLocationEntry*)aEntries.GetObject(nListPos); if ( pEntry->eType == SC_PLOC_CELLRANGE && !pEntry->bRepeatCol && !pEntry->bRepeatRow ) { rRange = pEntry->aCellRange; rPixRect = pEntry->aPixelRect; - return TRUE; + return sal_True; } } - return FALSE; // not found + return sal_False; // not found } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 699acbcac..145632d9e 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -125,7 +125,7 @@ void ScPreviewShell::Construct( Window* pParent ) pVerScroll = new ScrollBar(pParent, WB_VSCROLL); // SSA: --- RTL --- no mirroring for horizontal scrollbars - pHorScroll->EnableRTL( FALSE ); + pHorScroll->EnableRTL( sal_False ); pHorScroll->SetEndScrollHdl( LINK( this, ScPreviewShell, ScrollHandler ) ); pVerScroll->SetEndScrollHdl( LINK( this, ScPreviewShell, ScrollHandler ) ); @@ -134,8 +134,8 @@ void ScPreviewShell::Construct( Window* pParent ) SetPool( &SC_MOD()->GetPool() ); SetWindow( pPreview ); - StartListening(*pDocShell,TRUE); - StartListening(*SFX_APP(),TRUE); // #i62045# #i62046# application is needed for Calc's own hints + StartListening(*pDocShell,sal_True); + StartListening(*SFX_APP(),sal_True); // #i62045# #i62046# application is needed for Calc's own hints SfxBroadcaster* pDrawBC = pDocShell->GetDocument()->GetDrawBroadcaster(); if (pDrawBC) StartListening(*pDrawBC); @@ -262,9 +262,9 @@ void __EXPORT ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size Size( nBarW, nBarH ) ); if ( SVX_ZOOM_WHOLEPAGE == eZoom ) - pPreview->SetZoom( pPreview->GetOptimalZoom(FALSE) ); + pPreview->SetZoom( pPreview->GetOptimalZoom(sal_False) ); else if ( SVX_ZOOM_PAGEWIDTH == eZoom ) - pPreview->SetZoom( pPreview->GetOptimalZoom(TRUE) ); + pPreview->SetZoom( pPreview->GetOptimalZoom(sal_True) ); UpdateScrollBars(); } @@ -374,7 +374,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) long nTotalPages = pPreview->GetTotalPages(); long nPageNo = 0; long nPerPageLength = 0; - BOOL bIsDivide = TRUE; + sal_Bool bIsDivide = sal_True; if( nTotalPages ) nPerPageLength = nMaxRange / nTotalPages; @@ -384,12 +384,12 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) nPageNo = nPos / nPerPageLength; if( nPos % nPerPageLength ) { - bIsDivide = FALSE; + bIsDivide = sal_False; nPageNo ++; } } - BOOL bHoriz = ( pScroll == pHorScroll ); + sal_Bool bHoriz = ( pScroll == pHorScroll ); if( bHoriz ) pPreview->SetXOffset( nPos ); @@ -403,7 +403,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) Point aPos = pScroll->GetParent()->OutputToNormalizedScreenPixel( pScroll->GetPosPixel() ); String aHelpStr; Rectangle aRect; - USHORT nAlign; + sal_uInt16 nAlign; if( nDelta < 0 ) { @@ -421,7 +421,7 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) } else if( nDelta > 0 ) { - BOOL bAllTested = pPreview->AllTested(); + sal_Bool bAllTested = pPreview->AllTested(); if ( nTotalPages && ( nPageNo < nTotalPages || !bAllTested ) ) pPreview->SetPageNo( nPageNo ); @@ -445,9 +445,9 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) return 0; } -BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) +sal_Bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; const CommandWheelData* pData = rCEvt.GetWheelData(); if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM ) { @@ -461,10 +461,10 @@ BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) if ( nNew != nOld ) { eZoom = SVX_ZOOM_PERCENT; - pPreview->SetZoom( (USHORT)nNew ); + pPreview->SetZoom( (sal_uInt16)nNew ); } - bDone = TRUE; + bDone = sal_True; } else { @@ -474,12 +474,12 @@ BOOL ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt ) return bDone; } -SfxPrinter* __EXPORT ScPreviewShell::GetPrinter( BOOL bCreate ) +SfxPrinter* __EXPORT ScPreviewShell::GetPrinter( sal_Bool bCreate ) { return pDocShell->GetPrinter(bCreate); } -USHORT __EXPORT ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool ) +sal_uInt16 __EXPORT ScPreviewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) { return pDocShell->SetPrinter( pNewPrinter, nDiffFlags ); } @@ -509,8 +509,8 @@ PrintDialog* __EXPORT ScPreviewShell::CreatePrintDialog( Window* pParent ) pDlg->EnableRange ( PRINTDIALOG_RANGE ); pDlg->SetFirstPage ( 1 ); pDlg->SetMinPage ( 1 ); - pDlg->SetLastPage ( (USHORT)nDocPageMax ); - pDlg->SetMaxPage ( (USHORT)nDocPageMax ); + pDlg->SetLastPage ( (sal_uInt16)nDocPageMax ); + pDlg->SetMaxPage ( (sal_uInt16)nDocPageMax ); pDlg->EnableCollate (); // Selektion hier nicht @@ -534,17 +534,17 @@ void __EXPORT ScPreviewShell::PreparePrint( PrintDialog* pPrintDialog ) SfxViewShell::PreparePrint( pPrintDialog ); ScMarkData aMarkData; - aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE ); + aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), sal_True ); pDocShell->PreparePrint( pPrintDialog, &aMarkData ); } ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter, - PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI ) + PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI ) { ErrCode nRet = ERRCODE_IO_ABORT; ScMarkData aMarkData; - aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE ); + aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), sal_True ); if ( pDocShell->CheckPrint( pPrintDialog, &aMarkData, false, bIsAPI ) ) { @@ -555,7 +555,7 @@ ErrCode ScPreviewShell::DoPrint( SfxPrinter *pPrinter, return nRet; } -USHORT __EXPORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog ) +sal_uInt16 __EXPORT ScPreviewShell::Print( SfxProgress& rProgress, sal_Bool bIsAPI, PrintDialog* pPrintDialog ) { pDocShell->GetDocument()->SetPrintOptions(); // Optionen aus OFA am Printer setzen @@ -563,7 +563,7 @@ USHORT __EXPORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, Prin bool bAllTabs = ( pPrintDialog ? ( pPrintDialog->GetCheckedSheetRange() == PRINTSHEETS_ALL ) : SC_MOD()->GetPrintOptions().GetAllSheets() ); ScMarkData aMarkData; - aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), TRUE ); + aMarkData.SelectTable( static_cast< SCTAB >( pPreview->GetTab() ), sal_True ); uno::Sequence< sal_Int32 > aSheets; SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); @@ -584,14 +584,14 @@ USHORT __EXPORT ScPreviewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, Prin SetAdditionalPrintOptions( aProps ); SfxViewShell::Print( rProgress, bIsAPI, pPrintDialog ); - pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, FALSE, bIsAPI ); + pDocShell->Print( rProgress, pPrintDialog, &aMarkData, pPreview, sal_False, bIsAPI ); return 0; } //------------------------------------------------------------------------ -void __EXPORT ScPreviewShell::Activate(BOOL bMDI) +void __EXPORT ScPreviewShell::Activate(sal_Bool bMDI) { SfxViewShell::Activate(bMDI); @@ -606,7 +606,7 @@ void __EXPORT ScPreviewShell::Activate(BOOL bMDI) } } -void __EXPORT ScPreviewShell::Deactivate(BOOL bMDI) +void __EXPORT ScPreviewShell::Deactivate(sal_Bool bMDI) { SfxViewShell::Deactivate(bMDI); @@ -619,7 +619,7 @@ void __EXPORT ScPreviewShell::Deactivate(BOOL bMDI) void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxItemSet* pReqArgs = rReq.GetArgs(); switch ( nSlot ) @@ -645,7 +645,7 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) case SID_NEXT_TABLE: // Accelerator case SID_PREVIEW_NEXT: { - BOOL bAllTested = pPreview->AllTested(); + sal_Bool bAllTested = pPreview->AllTested(); long nPage = pPreview->GetPageNo(); long nTotal = pPreview->GetTotalPages(); if (nTotal && (nPage+1 < nTotal || !bAllTested)) @@ -676,8 +676,8 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) case SID_ATTR_ZOOM: case FID_SCALE: { - USHORT nZoom = 100; - BOOL bCancel = FALSE; + sal_uInt16 nZoom = 100; + sal_Bool bCancel = sal_False; eZoom = SVX_ZOOM_PERCENT; @@ -726,10 +726,10 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) { case SVX_ZOOM_OPTIMAL: case SVX_ZOOM_WHOLEPAGE: - nZoom = pPreview->GetOptimalZoom(FALSE); + nZoom = pPreview->GetOptimalZoom(sal_False); break; case SVX_ZOOM_PAGEWIDTH: - nZoom = pPreview->GetOptimalZoom(TRUE); + nZoom = pPreview->GetOptimalZoom(sal_True); break; default: { @@ -744,7 +744,7 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) break; case SID_PREVIEW_ZOOMIN: { - USHORT nNew = pPreview->GetZoom() + 20 ; + sal_uInt16 nNew = pPreview->GetZoom() + 20 ; nNew -= nNew % 20; pPreview->SetZoom( nNew ); eZoom = SVX_ZOOM_PERCENT; @@ -753,7 +753,7 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) break; case SID_PREVIEW_ZOOMOUT: { - USHORT nNew = pPreview->GetZoom() - 1; + sal_uInt16 nNew = pPreview->GetZoom() - 1; nNew -= nNew % 20; pPreview->SetZoom( nNew ); eZoom = SVX_ZOOM_PERCENT; @@ -762,7 +762,7 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) break; case SID_PREVIEW_MARGIN: { - BOOL bMargin = pPreview->GetPageMargins(); + sal_Bool bMargin = pPreview->GetPageMargins(); pPreview->SetPageMargins( !bMargin ); pPreview->Invalidate(); rReq.Done(); @@ -772,9 +772,9 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; eZoom = SVX_ZOOM_PERCENT; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) ) + if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) ) { - const USHORT nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue(); + const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem*)pItem)->GetValue(); if( nCurrentZoom ) { pPreview->SetZoom( nCurrentZoom ); @@ -792,9 +792,9 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE ); DBG_ASSERT( pStyleSheet, "PageStyle not found! :-/" ); - if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, TRUE, &pItem ) ) + if ( pReqArgs && pStyleSheet && SFX_ITEM_SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, sal_True, &pItem ) ) { - const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); + const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); SfxItemSet& rSet = pStyleSheet->GetItemSet(); rSet.Put( SfxUInt16Item( ATTR_PAGE_SCALE, nCurrentZoom ) ); ScPrintFunc aPrintFunc( pDocShell, pDocShell->GetPrinter(), nTab ); @@ -834,16 +834,16 @@ void __EXPORT ScPreviewShell::Execute( SfxRequest& rReq ) void __EXPORT ScPreviewShell::GetState( SfxItemSet& rSet ) { - pPreview->SetInGetState(TRUE); + pPreview->SetInGetState(sal_True); SCTAB nTab = pPreview->GetTab(); long nPage = pPreview->GetPageNo(); long nTotal = pPreview->GetTotalPages(); - USHORT nZoom = pPreview->GetZoom(); - BOOL bAllTested = pPreview->AllTested(); + sal_uInt16 nZoom = pPreview->GetZoom(); + sal_Bool bAllTested = pPreview->AllTested(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) @@ -904,7 +904,7 @@ void __EXPORT ScPreviewShell::GetState( SfxItemSet& rSet ) if ( pStyleSheet ) { SfxItemSet& rStyleSet = pStyleSheet->GetItemSet(); - USHORT nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue(); + sal_uInt16 nCurrentZoom = ((const SfxUInt16Item&)rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue(); if( nCurrentZoom ) { SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM_SLIDER, MAXZOOM_SLIDER, SID_PREVIEW_SCALINGFACTOR ); @@ -921,7 +921,7 @@ void __EXPORT ScPreviewShell::GetState( SfxItemSet& rSet ) rSet.Put( SfxStringItem( nWhich, pPreview->GetPosString() ) ); break; case SID_PRINTPREVIEW: - rSet.Put( SfxBoolItem( nWhich, TRUE ) ); + rSet.Put( SfxBoolItem( nWhich, sal_True ) ); break; case SID_FORMATPAGE: case SID_PREVIEW_MARGIN: @@ -933,7 +933,7 @@ void __EXPORT ScPreviewShell::GetState( SfxItemSet& rSet ) nWhich = aIter.NextWhich(); } - pPreview->SetInGetState(FALSE); + pPreview->SetInGetState(sal_False); } void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData ) @@ -951,7 +951,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData ) rData.aShortDocName = rData.aLongDocName = rData.aTitle; rData.nPageNo = pPreview->GetPageNo() + 1; - BOOL bAllTested = pPreview->AllTested(); + sal_Bool bAllTested = pPreview->AllTested(); if (bAllTested) rData.nTotalPages = pPreview->GetTotalPages(); else @@ -960,7 +960,7 @@ void ScPreviewShell::FillFieldData( ScHeaderFieldData& rData ) // eNumType kennt der Dialog selber } -void __EXPORT ScPreviewShell::WriteUserData(String& rData, BOOL /* bBrowse */) +void __EXPORT ScPreviewShell::WriteUserData(String& rData, sal_Bool /* bBrowse */) { // nZoom // nPageNo @@ -970,13 +970,13 @@ void __EXPORT ScPreviewShell::WriteUserData(String& rData, BOOL /* bBrowse */) rData += String::CreateFromInt32(pPreview->GetPageNo()); } -void __EXPORT ScPreviewShell::ReadUserData(const String& rData, BOOL /* bBrowse */) +void __EXPORT ScPreviewShell::ReadUserData(const String& rData, sal_Bool /* bBrowse */) { xub_StrLen nCount = rData.GetTokenCount(); if (nCount) { xub_StrLen nIndex = 0; - pPreview->SetZoom((USHORT)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32()); + pPreview->SetZoom((sal_uInt16)rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32()); pPreview->SetPageNo(rData.GetToken( 0, SC_USERDATA_SEP, nIndex ).ToInt32()); eZoom = SVX_ZOOM_PERCENT; } @@ -1027,7 +1027,7 @@ void __EXPORT ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans:: } } -void ScPreviewShell::DoScroll( USHORT nMode ) +void ScPreviewShell::DoScroll( sal_uInt16 nMode ) { Point aCurPos, aPrevPos; @@ -1222,7 +1222,7 @@ void ScPreviewShell::BroadcastAccessibility( const SfxHint &rHint ) pAccessibilityBroadcaster->Broadcast( rHint ); } -BOOL ScPreviewShell::HasAccessibilityObjects() +sal_Bool ScPreviewShell::HasAccessibilityObjects() { return pAccessibilityBroadcaster && pAccessibilityBroadcaster->HasListeners(); } diff --git a/sc/source/ui/view/prevwsh2.cxx b/sc/source/ui/view/prevwsh2.cxx index 1853734a8..cbb82487e 100644 --- a/sc/source/ui/view/prevwsh2.cxx +++ b/sc/source/ui/view/prevwsh2.cxx @@ -307,16 +307,16 @@ void __EXPORT ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - BOOL bDataChanged = FALSE; + sal_Bool bDataChanged = sal_False; if (rHint.ISA(SfxSimpleHint)) { - ULONG nSlot = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nSlot = ((const SfxSimpleHint&)rHint).GetId(); switch ( nSlot ) { case FID_DATACHANGED: case SID_SCPRINTOPTIONS: - bDataChanged = TRUE; + bDataChanged = sal_True; break; case SC_HINT_DRWLAYER_NEW: { @@ -331,20 +331,20 @@ void __EXPORT ScPreviewShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( ((const ScPaintHint&)rHint).GetPrintFlag() ) { - USHORT nParts = ((const ScPaintHint&)rHint).GetParts(); + sal_uInt16 nParts = ((const ScPaintHint&)rHint).GetParts(); if (nParts & ( PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE )) - bDataChanged = TRUE; + bDataChanged = sal_True; } } else if (rHint.ISA(SdrHint)) { // SdrHints are no longer used for invalidating, thus react on objectchange instead if(HINT_OBJCHG == ((const SdrHint&)rHint).GetKind()) - bDataChanged = TRUE; + bDataChanged = sal_True; } if (bDataChanged) - pPreview->DataChanged(TRUE); + pPreview->DataChanged(sal_True); } diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 2cc90d67c..321806b07 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -102,8 +102,8 @@ ScPageRowEntry::ScPageRowEntry(const ScPageRowEntry& r) nPagesX = r.nPagesX; if (r.pHidden && nPagesX) { - pHidden = new BOOL[nPagesX]; - memcpy( pHidden, r.pHidden, nPagesX * sizeof(BOOL) ); + pHidden = new sal_Bool[nPagesX]; + memcpy( pHidden, r.pHidden, nPagesX * sizeof(sal_Bool) ); } else pHidden = NULL; @@ -118,8 +118,8 @@ const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r) nPagesX = r.nPagesX; if (r.pHidden && nPagesX) { - pHidden = new BOOL[nPagesX]; - memcpy( pHidden, r.pHidden, nPagesX * sizeof(BOOL) ); + pHidden = new sal_Bool[nPagesX]; + memcpy( pHidden, r.pHidden, nPagesX * sizeof(sal_Bool) ); } else pHidden = NULL; @@ -148,15 +148,15 @@ void ScPageRowEntry::SetHidden(size_t nX) { if (!pHidden) { - pHidden = new BOOL[nPagesX]; - memset( pHidden, FALSE, nPagesX * sizeof(BOOL) ); + pHidden = new sal_Bool[nPagesX]; + memset( pHidden, sal_False, nPagesX * sizeof(sal_Bool) ); } - pHidden[nX] = TRUE; + pHidden[nX] = sal_True; } } } -BOOL ScPageRowEntry::IsHidden(size_t nX) const +sal_Bool ScPageRowEntry::IsHidden(size_t nX) const { return nX>=nPagesX || ( pHidden && pHidden[nX] ); //! inline? } @@ -220,9 +220,9 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions ) if (!bState) nZoom = 100; nManualZoom = 100; - bClearWin = FALSE; - bUseStyleColor = FALSE; - bIsRender = FALSE; + bClearWin = sal_False; + bUseStyleColor = sal_False; + bIsRender = sal_False; InitParam(pOptions); @@ -240,10 +240,10 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa nPageStart ( nPage ), nDocPages ( nDocP ), pUserArea ( pArea ), - bState ( FALSE ), - bSourceRangeValid ( FALSE ), - bPrintCurrentTable ( FALSE ), - bMultiArea ( FALSE ), + bState ( sal_False ), + bSourceRangeValid ( sal_False ), + bPrintCurrentTable ( sal_False ), + bMultiArea ( sal_False ), nTabPages ( 0 ), nTotalPages ( 0 ), pPageData ( pData ) @@ -263,10 +263,10 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab, nPageStart ( nPage ), nDocPages ( nDocP ), pUserArea ( pArea ), - bState ( FALSE ), - bSourceRangeValid ( FALSE ), - bPrintCurrentTable ( FALSE ), - bMultiArea ( FALSE ), + bState ( sal_False ), + bSourceRangeValid ( sal_False ), + bPrintCurrentTable ( sal_False ), + bMultiArea ( sal_False ), nTabPages ( 0 ), nTotalPages ( 0 ), pPageData ( NULL ) @@ -281,9 +281,9 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, pPrinter ( NULL ), pDrawView ( NULL ), pUserArea ( NULL ), - bSourceRangeValid ( FALSE ), - bPrintCurrentTable ( FALSE ), - bMultiArea ( FALSE ), + bSourceRangeValid ( sal_False ), + bPrintCurrentTable ( sal_False ), + bMultiArea ( sal_False ), pPageData ( NULL ) { pDev = pOutDev; @@ -300,7 +300,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, nTotalPages = rState.nTotalPages; nPageStart = rState.nPageStart; nDocPages = rState.nDocPages; - bState = TRUE; + bState = sal_True; Construct( pOptions ); } @@ -314,9 +314,9 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow, SCTAB nTab, nPageStart ( nPage ), nDocPages ( nDocP ), pUserArea ( pArea ), - bState ( FALSE ), - bPrintCurrentTable ( FALSE ), - bMultiArea ( FALSE ), + bState ( sal_False ), + bPrintCurrentTable ( sal_False ), + bMultiArea ( sal_False ), nTabPages ( 0 ), nTotalPages ( 0 ), pPageData ( NULL ) @@ -330,8 +330,8 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow, pPrinter ( NULL ), pDrawView ( NULL ), pUserArea ( NULL ), - bPrintCurrentTable ( FALSE ), - bMultiArea ( FALSE ), + bPrintCurrentTable ( sal_False ), + bMultiArea ( sal_False ), pPageData ( NULL ) { pDev = pWindow; @@ -348,7 +348,7 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, Window* pWindow, nTotalPages = rState.nTotalPages; nPageStart = rState.nPageStart; nDocPages = rState.nDocPages; - bState = TRUE; + bState = sal_True; Construct( pOptions ); } @@ -369,7 +369,7 @@ void ScPrintFunc::GetPrintState( ScPrintState& rState ) rState.nDocPages = nDocPages; } -BOOL ScPrintFunc::GetLastSourceRange( ScRange& rRange ) const +sal_Bool ScPrintFunc::GetLastSourceRange( ScRange& rRange ) const { rRange = aLastSourceRange; return bSourceRangeValid; @@ -379,7 +379,7 @@ void ScPrintFunc::FillPageData() { if (pPageData) { - USHORT nCount = sal::static_int_cast<USHORT>( pPageData->GetCount() ); + sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() ); ScPrintRangeData& rData = pPageData->GetData(nCount); // hochzaehlen rData.SetPrintRange( ScRange( nStartCol, nStartRow, nPrintTab, @@ -435,7 +435,7 @@ void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 ) GetItem(ATTR_PROTECTION, rCellInfo.pConditionSet)).GetHidePrint()) { pThisRowInfo->pCellInfo[nX+1].pCell = NULL; - pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = TRUE; + pThisRowInfo->pCellInfo[nX+1].bEmptyCellText = sal_True; } } } @@ -450,7 +450,7 @@ void lcl_HidePrint( ScTableInfo& rTabInfo, SCCOL nX1, SCCOL nX2 ) // - Vorschau bei Vorlagen void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPrintFactor */, - const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile ) + const Rectangle& rBound, ScViewData* pViewData, sal_Bool bMetaFile ) { //! nPrintFactor auswerten !!! @@ -458,7 +458,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr if (pViewData) nTab = pViewData->GetTabNo(); - BOOL bDoGrid, bNullVal, bFormula; + sal_Bool bDoGrid, bNullVal, bFormula; ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ); if (pStyleSheet) @@ -518,7 +518,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr Rectangle aLines; ScRange aRange( nX1,nY1,nTab, nX2,nY2,nTab ); -// BOOL bAddLines = pDoc->HasLines( aRange, aLines ); +// sal_Bool bAddLines = pDoc->HasLines( aRange, aLines ); long nTwipsSizeX = 0; for (SCCOL i=nX1; i<=nX2; i++) @@ -535,7 +535,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr //! Flag bei FillInfo uebergeben !!!!! ScRange aERange; - BOOL bEmbed = pDoc->IsEmbedded(); + sal_Bool bEmbed = pDoc->IsEmbedded(); if (bEmbed) { pDoc->GetEmbedded(aERange); @@ -546,7 +546,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr ScTableInfo aTabInfo; pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, - nScaleX, nScaleY, FALSE, bFormula ); + nScaleX, nScaleY, sal_False, bFormula ); lcl_HidePrint( aTabInfo, nX1, nX2 ); if (bEmbed) @@ -579,7 +579,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr { pDrawView = new FmFormView( pModel, pDev ); pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetPrintPreview( sal_True ); aOutputData.SetDrawView( pDrawView ); } @@ -632,7 +632,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr if (!bMetaFile && pViewData) pDev->SetMapMode(aMode); - aOutputData.DrawGrid( TRUE, FALSE ); // keine Seitenumbrueche + aOutputData.DrawGrid( sal_True, sal_False ); // keine Seitenumbrueche pDev->SetLineColor( COL_BLACK ); @@ -642,7 +642,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr long nRight = nScrX + aOutputData.GetScrW() - aOne.Width(); long nBottom = nScrY + aOutputData.GetScrH() - aOne.Height(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); // extra line at the left edge for left-to-right, right for right-to-left if ( bLayoutRTL ) @@ -672,7 +672,7 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet ) if ( pHFSet == NULL ) { - rParam.bEnable = FALSE; + rParam.bEnable = sal_False; rParam.pBorder = NULL; rParam.pBack = NULL; rParam.pShadow = NULL; @@ -686,9 +686,9 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet ) const SvxLRSpaceItem* pHFLR = &(const SvxLRSpaceItem&) pHFSet->Get(ATTR_LRSPACE); long nTmp; nTmp = pHFLR->GetLeft(); - rParam.nLeft = nTmp < 0 ? 0 : USHORT(nTmp); + rParam.nLeft = nTmp < 0 ? 0 : sal_uInt16(nTmp); nTmp = pHFLR->GetRight(); - rParam.nRight = nTmp < 0 ? 0 : USHORT(nTmp); + rParam.nRight = nTmp < 0 ? 0 : sal_uInt16(nTmp); rParam.pBorder = (const SvxBoxItem*) &pHFSet->Get(ATTR_BORDER); rParam.pBack = (const SvxBrushItem*) &pHFSet->Get(ATTR_BACKGROUND); rParam.pShadow = (const SvxShadowItem*)&pHFSet->Get(ATTR_SHADOW);; @@ -710,27 +710,27 @@ void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet ) // bNew = TRUE: benutzten Bereich aus dem Dokument suchen // bNew = FALSE: nur ganze Zeilen/Spalten begrenzen -BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew ) +sal_Bool ScPrintFunc::AdjustPrintArea( sal_Bool bNew ) { SCCOL nOldEndCol = nEndCol; // nur wichtig bei !bNew SCROW nOldEndRow = nEndRow; - BOOL bChangeCol = TRUE; // bei bNew werden beide angepasst - BOOL bChangeRow = TRUE; + sal_Bool bChangeCol = sal_True; // bei bNew werden beide angepasst + sal_Bool bChangeRow = sal_True; - BOOL bNotes = aTableParam.bNotes; + sal_Bool bNotes = aTableParam.bNotes; if ( bNew ) { nStartCol = 0; nStartRow = 0; if (!pDoc->GetPrintArea( nPrintTab, nEndCol, nEndRow, bNotes )) - return FALSE; // nix + return sal_False; // nix } else { - BOOL bFound = TRUE; + sal_Bool bFound = sal_True; bChangeCol = ( nStartCol == 0 && nEndCol == MAXCOL ); bChangeRow = ( nStartRow == 0 && nEndRow == MAXROW ); - BOOL bForcedChangeRow = FALSE; + sal_Bool bForcedChangeRow = sal_False; // #i53558# Crop entire column of old row limit to real print area with // some fuzzyness. @@ -743,11 +743,11 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew ) const SCROW nFuzzy = 23*42; if (nPAEndRow + nFuzzy < nEndRow) { - bForcedChangeRow = TRUE; + bForcedChangeRow = sal_True; nEndRow = nPAEndRow; } else - bFound = TRUE; // user seems to _want_ to print some empty rows + bFound = sal_True; // user seems to _want_ to print some empty rows } // TODO: in case we extend the number of columns we may have to do the // same for horizontal cropping. @@ -760,14 +760,14 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew ) bFound = pDoc->GetPrintAreaVer( nPrintTab, nStartCol, nEndCol, nEndRow, bNotes ); if (!bFound) - return FALSE; // leer + return sal_False; // leer if (bForcedChangeRow) - bChangeRow = TRUE; + bChangeRow = sal_True; } pDoc->ExtendMerge( nStartCol,nStartRow, nEndCol,nEndRow, nPrintTab, - FALSE, TRUE ); // kein Refresh, incl. Attrs + sal_False, sal_True ); // kein Refresh, incl. Attrs if ( bChangeCol ) { @@ -789,7 +789,7 @@ BOOL ScPrintFunc::AdjustPrintArea( BOOL bNew ) if (!bChangeCol) nEndCol = nOldEndCol; if (!bChangeRow) nEndRow = nOldEndRow; - return TRUE; + return sal_True; } long ScPrintFunc::TextHeight( const EditTextObject* pObject ) @@ -798,7 +798,7 @@ long ScPrintFunc::TextHeight( const EditTextObject* pObject ) return 0; // pEditEngine->SetPageNo( nTotalPages ); - pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE ); + pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, sal_False ); return (long) pEditEngine->GetTextHeight(); } @@ -867,9 +867,9 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) const SvxLRSpaceItem* pLRItem = (const SvxLRSpaceItem*) &pParamSet->Get( ATTR_LRSPACE ); long nTmp; nTmp = pLRItem->GetLeft(); - nLeftMargin = nTmp < 0 ? 0 : USHORT(nTmp); + nLeftMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp); nTmp = pLRItem->GetRight(); - nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp); + nRightMargin = nTmp < 0 ? 0 : sal_uInt16(nTmp); const SvxULSpaceItem* pULItem = (const SvxULSpaceItem*) &pParamSet->Get( ATTR_ULSPACE ); nTopMargin = pULItem->GetUpper(); nBottomMargin = pULItem->GetLower(); @@ -900,7 +900,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) const SvxSetItem* pHeaderSetItem; const SfxItemSet* pHeaderSet = NULL; - if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, FALSE, + if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, sal_False, (const SfxPoolItem**)&pHeaderSetItem ) == SFX_ITEM_SET ) { pHeaderSet = &pHeaderSetItem->GetItemSet(); @@ -916,7 +916,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) const SvxSetItem* pFooterSetItem; const SfxItemSet* pFooterSet = NULL; - if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, FALSE, + if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, sal_False, (const SfxPoolItem**)&pFooterSetItem ) == SFX_ITEM_SET ) { pFooterSet = &pFooterSetItem->GetItemSet(); @@ -935,19 +935,19 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) const SfxUInt16Item* pScaleToPagesItem = NULL; SfxItemState eState; - eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, FALSE, + eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, sal_False, (const SfxPoolItem**)&pScaleItem ); if ( SFX_ITEM_DEFAULT == eState ) pScaleItem = (const SfxUInt16Item*) &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALE ); - eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, FALSE, + eState = pParamSet->GetItemState( ATTR_PAGE_SCALETO, sal_False, (const SfxPoolItem**)&pScaleToItem ); if ( SFX_ITEM_DEFAULT == eState ) pScaleToItem = (const ScPageScaleToItem*) &pParamSet->GetPool()->GetDefaultItem( ATTR_PAGE_SCALETO ); - eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE, + eState = pParamSet->GetItemState( ATTR_PAGE_SCALETOPAGES, sal_False, (const SfxPoolItem**)&pScaleToPagesItem ); if ( SFX_ITEM_DEFAULT == eState ) pScaleToPagesItem = (const SfxUInt16Item*) @@ -955,7 +955,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) DBG_ASSERT( pScaleItem && pScaleToItem && pScaleToPagesItem, "Missing ScaleItem! :-/" ); - aTableParam.bCellContent = TRUE; + aTableParam.bCellContent = sal_True; aTableParam.bNotes = GET_BOOL(pParamSet,ATTR_PAGE_NOTES); aTableParam.bGrid = GET_BOOL(pParamSet,ATTR_PAGE_GRID); aTableParam.bHeaders = GET_BOOL(pParamSet,ATTR_PAGE_HEADERS); @@ -968,12 +968,12 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) aTableParam.bLeftRight = !aTableParam.bLeftRight; aTableParam.nFirstPageNo = GET_USHORT(pParamSet,ATTR_PAGE_FIRSTPAGENO); if (!aTableParam.nFirstPageNo) - aTableParam.nFirstPageNo = (USHORT) nPageStart; // von vorheriger Tabelle + aTableParam.nFirstPageNo = (sal_uInt16) nPageStart; // von vorheriger Tabelle if ( pScaleItem && pScaleToItem && pScaleToPagesItem ) { - UINT16 nScaleAll = pScaleItem->GetValue(); - UINT16 nScaleToPages = pScaleToPagesItem->GetValue(); + sal_uInt16 nScaleAll = pScaleItem->GetValue(); + sal_uInt16 nScaleToPages = pScaleToPagesItem->GetValue(); aTableParam.bScaleNone = (nScaleAll == 100); aTableParam.bScaleAll = (nScaleAll > 0 ); @@ -986,10 +986,10 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) } else { - aTableParam.bScaleNone = TRUE; - aTableParam.bScaleAll = FALSE; - aTableParam.bScaleTo = FALSE; - aTableParam.bScalePageNum = FALSE; + aTableParam.bScaleNone = sal_True; + aTableParam.bScaleAll = sal_False; + aTableParam.bScaleTo = sal_False; + aTableParam.bScalePageNum = sal_False; aTableParam.nScaleAll = 0; aTableParam.nScaleWidth = 0; aTableParam.nScaleHeight = 0; @@ -999,7 +999,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) // skip empty pages only if options with that flag are passed aTableParam.bSkipEmpty = pOptions && pOptions->GetSkipEmpty(); if ( pPageData ) - aTableParam.bSkipEmpty = FALSE; + aTableParam.bSkipEmpty = sal_False; // Wenn pPageData gesetzt ist, interessieren fuer die Umbruch-Vorschau // nur die Umbrueche, leere Seiten werden nicht speziell behandelt @@ -1017,7 +1017,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) if ( pUserArea ) // UserArea (Selektion) hat Vorrang { bPrintCurrentTable = - aAreaParam.bPrintArea = TRUE; // Selektion + aAreaParam.bPrintArea = sal_True; // Selektion aAreaParam.aPrintArea = *pUserArea; // Die Tabellen-Abfrage ist schon in DocShell::Print, hier immer @@ -1031,7 +1031,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) if ( pPrintArea ) // mindestens eine gesetzt ? { bPrintCurrentTable = - aAreaParam.bPrintArea = TRUE; + aAreaParam.bPrintArea = sal_True; aAreaParam.aPrintArea = *pPrintArea; bMultiArea = ( pDoc->GetPrintRangeCount(nPrintTab) > 1 ); @@ -1048,39 +1048,39 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions ) // #74834# don't print hidden tables if there's no print range defined there if ( pDoc->IsVisible( nPrintTab ) ) { - aAreaParam.bPrintArea = FALSE; - bPrintCurrentTable = TRUE; + aAreaParam.bPrintArea = sal_False; + bPrintCurrentTable = sal_True; } else { - aAreaParam.bPrintArea = TRUE; // otherwise the table is always counted - bPrintCurrentTable = FALSE; + aAreaParam.bPrintArea = sal_True; // otherwise the table is always counted + bPrintCurrentTable = sal_False; } } if ( pRepeatCol ) { - aAreaParam.bRepeatCol = TRUE; + aAreaParam.bRepeatCol = sal_True; aAreaParam.aRepeatCol = *pRepeatCol; nRepeatStartCol = pRepeatCol->aStart.Col(); nRepeatEndCol = pRepeatCol->aEnd .Col(); } else { - aAreaParam.bRepeatCol = FALSE; + aAreaParam.bRepeatCol = sal_False; nRepeatStartCol = nRepeatEndCol = SCCOL_REPEAT_NONE; } if ( pRepeatRow ) { - aAreaParam.bRepeatRow = TRUE; + aAreaParam.bRepeatRow = sal_True; aAreaParam.aRepeatRow = *pRepeatRow; nRepeatStartRow = pRepeatRow->aStart.Row(); nRepeatEndRow = pRepeatRow->aEnd .Row(); } else { - aAreaParam.bRepeatRow = FALSE; + aAreaParam.bRepeatRow = sal_False; nRepeatStartRow = nRepeatEndRow = SCROW_REPEAT_NONE; } @@ -1181,8 +1181,8 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi Point aPos; Size aDrawSize = aGrfSize; - FASTBOOL bDraw = TRUE; -// FASTBOOL bRetouche = TRUE; + FASTBOOL bDraw = sal_True; +// FASTBOOL bRetouche = sal_True; switch ( ePos ) { case GPOS_LT: aPos = rOrg.TopLeft(); @@ -1217,7 +1217,7 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi case GPOS_AREA: aPos = rOrg.TopLeft(); aDrawSize = rOrg.GetSize(); -// bRetouche = FALSE; +// bRetouche = sal_False; break; case GPOS_TILED: { @@ -1266,13 +1266,13 @@ void lcl_DrawGraphic( const SvxBrushItem &rBrush, OutputDevice *pOut, OutputDevi aObject.DrawTiled( pOut, rOrg, aGrfSize, Size(0,0) ); } - bDraw = FALSE; -// bRetouche = FALSE; + bDraw = sal_False; +// bRetouche = sal_False; } break; case GPOS_NONE: - bDraw = FALSE; + bDraw = sal_False; break; default: DBG_ASSERT( !pOut, "new Graphic position?" ); @@ -1329,8 +1329,8 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, if (nEffHeight<=0 || nEffWidth<=0) return; // leer - // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) - BOOL bCellContrast = bUseStyleColor && + // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed sal_True) + sal_Bool bCellContrast = bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); if ( pBackground && !bCellContrast ) @@ -1407,18 +1407,18 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, if (pBorderData) { ScDocument* pBorderDoc = new ScDocument( SCDOCMODE_UNDO ); - pBorderDoc->InitUndo( pDoc, 0,0, TRUE,TRUE ); + pBorderDoc->InitUndo( pDoc, 0,0, sal_True,sal_True ); if (pBorderData) pBorderDoc->ApplyAttr( 0,0,0, *pBorderData ); ScTableInfo aTabInfo; pBorderDoc->FillInfo( aTabInfo, 0,0, 0,0, 0, - nScaleX, nScaleY, FALSE, FALSE ); + nScaleX, nScaleY, sal_False, sal_False ); DBG_ASSERT(aTabInfo.mnArrCount,"nArrCount == 0"); - aTabInfo.mpRowInfo[1].nHeight = (USHORT) nEffHeight; + aTabInfo.mpRowInfo[1].nHeight = (sal_uInt16) nEffHeight; aTabInfo.mpRowInfo[0].pCellInfo[1].nWidth = - aTabInfo.mpRowInfo[1].pCellInfo[1].nWidth = (USHORT) nEffWidth; + aTabInfo.mpRowInfo[1].pCellInfo[1].nWidth = (sal_uInt16) nEffWidth; ScOutputData aOutputData( pDev, OUTTYPE_PRINTER, aTabInfo, pBorderDoc, 0, nScrX+nLeft, nScrY+nTop, 0,0, 0,0, nScaleX, nScaleY ); @@ -1435,7 +1435,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY ) { - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; Size aOnePixel = pDev->PixelToLogic(Size(1,1)); @@ -1459,7 +1459,7 @@ void ScPrintFunc::PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY ) for (nCol=nX1; nCol<=nX2; nCol++) { - USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab ); + sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab ); if (nDocW) { long nWidth = (long) (nDocW * nScaleX); @@ -1488,7 +1488,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY ) long nOneX = aOnePixel.Width(); long nOneY = aOnePixel.Height(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); long nWidth = (long) (PRINT_HEADER_WIDTH * nScaleX); long nEndX = nScrX + nWidth; @@ -1503,7 +1503,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY ) for (SCROW nRow=nY1; nRow<=nY2; nRow++) { - USHORT nDocH = pDoc->GetRowHeight( nRow, nPrintTab ); + sal_uInt16 nDocH = pDoc->GetRowHeight( nRow, nPrintTab ); if (nDocH) { long nHeight = (long) (nDocH * nScaleY); @@ -1524,7 +1524,7 @@ void ScPrintFunc::PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY ) } void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY, - BOOL bRepCol, ScPreviewLocationData& rLocationData ) + sal_Bool bRepCol, ScPreviewLocationData& rLocationData ) { Size aOnePixel = pDev->PixelToLogic(Size(1,1)); long nOneX = aOnePixel.Width(); @@ -1536,7 +1536,7 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY, long nPosX = nScrX - nOneX; for (SCCOL nCol=nX1; nCol<=nX2; nCol++) { - USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab ); + sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab ); if (nDocW) nPosX += (long) (nDocW * nScaleX); } @@ -1545,13 +1545,13 @@ void ScPrintFunc::LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY, } void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY, - BOOL bRepRow, ScPreviewLocationData& rLocationData ) + sal_Bool bRepRow, ScPreviewLocationData& rLocationData ) { Size aOnePixel = pDev->PixelToLogic(Size(1,1)); long nOneX = aOnePixel.Width(); long nOneY = aOnePixel.Height(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); long nWidth = (long) (PRINT_HEADER_WIDTH * nScaleX); long nEndX = nScrX + nWidth; @@ -1565,7 +1565,7 @@ void ScPrintFunc::LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY, } void ScPrintFunc::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 ) { // get MapMode for drawing objects (same MapMode as in ScOutputData::PrintDrawingLayer) @@ -1595,7 +1595,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, long nPosX = nScrX - nOneX; for (nCol=nX1; nCol<=nX2; nCol++) { - USHORT nDocW = pDoc->GetColWidth( nCol, nPrintTab ); + sal_uInt16 nDocW = pDoc->GetColWidth( nCol, nPrintTab ); if (nDocW) nPosX += (long) (nDocW * nScaleX); } @@ -1609,7 +1609,7 @@ void ScPrintFunc::LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, void ScPrintFunc::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 ) { // #i47547# nothing to do if the end of the print area is before the end of // the repeat columns/rows (don't use negative size for ScOutputData) @@ -1618,7 +1618,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, //! Flag bei FillInfo uebergeben !!!!! ScRange aERange; - BOOL bEmbed = pDoc->IsEmbedded(); + sal_Bool bEmbed = pDoc->IsEmbedded(); if (bEmbed) { pDoc->GetEmbedded(aERange); @@ -1633,7 +1633,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScTableInfo aTabInfo; pDoc->FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nPrintTab, - nScaleX, nScaleY, TRUE, aTableParam.bFormulas ); + nScaleX, nScaleY, sal_True, aTableParam.bFormulas ); lcl_HidePrint( aTabInfo, nX1, nX2 ); if (bEmbed) @@ -1683,14 +1683,14 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, aOutputData.SetRefDevice( pRefDev ); } -// aOutputData.SetMetaFileMode(TRUE); +// aOutputData.SetMetaFileMode(sal_True); if( aTableParam.bCellContent ) aOutputData.DrawBackground(); pDev->SetClipRegion( Rectangle( aPos, Size( aOutputData.GetScrW(), aOutputData.GetScrH() ) ) ); pDev->SetClipRegion(); -// aOutputData.SetMetaFileMode(FALSE); +// aOutputData.SetMetaFileMode(sal_False); if( aTableParam.bCellContent ) { aOutputData.DrawExtraShadow( bShLeft, bShTop, bShRight, bShBottom ); @@ -1698,12 +1698,12 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, aOutputData.DrawStrings(); // pDev->SetMapMode(aLogicMode); - aOutputData.DrawEdit(FALSE); + aOutputData.DrawEdit(sal_False); } // pDev->SetMapMode(aOffsetMode); if (aTableParam.bGrid) - aOutputData.DrawGrid( TRUE, FALSE ); // keine Seitenumbrueche + aOutputData.DrawGrid( sal_True, sal_False ); // keine Seitenumbrueche /*!!!!!!!!!!! Notizen in Tabelle markieren ?????????????????????????? @@ -1731,20 +1731,20 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, aOutputData.PostPrintDrawingLayer(aMMOffset); // #i74768# } -BOOL ScPrintFunc::IsMirror( long nPageNo ) // Raender spiegeln ? +sal_Bool ScPrintFunc::IsMirror( long nPageNo ) // Raender spiegeln ? { SvxPageUsage eUsage = (SvxPageUsage) ( nPageUsage & 0x000f ); return ( eUsage == SVX_PAGE_MIRROR && (nPageNo & 1) ); } -BOOL ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ? +sal_Bool ScPrintFunc::IsLeft( long nPageNo ) // linke Fussnoten ? { SvxPageUsage eUsage = (SvxPageUsage) ( nPageUsage & 0x000f ); - BOOL bLeft; + sal_Bool bLeft; if (eUsage == SVX_PAGE_LEFT) - bLeft = TRUE; + bLeft = sal_True; else if (eUsage == SVX_PAGE_RIGHT) - bLeft = FALSE; + bLeft = sal_False; else bLeft = (nPageNo & 1) != 0; return bLeft; @@ -1761,9 +1761,9 @@ void ScPrintFunc::MakeEditEngine() { // can't use document's edit engine pool here, // because pool must have twips as default metric - pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE ); + pEditEngine = new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True ); - pEditEngine->EnableUndo(FALSE); + pEditEngine->EnableUndo(sal_False); pEditEngine->SetRefDevice( pDev ); pEditEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) ); @@ -1791,14 +1791,14 @@ void ScPrintFunc::MakeEditEngine() } // nStartY = logic -void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY, - BOOL bDoPrint, ScPreviewLocationData* pLocationData ) +void ScPrintFunc::PrintHF( long nPageNo, sal_Bool bHeader, long nStartY, + sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ) { const ScPrintHFParam& rParam = bHeader ? aHdr : aFtr; pDev->SetMapMode( aTwipMode ); // Kopf-/Fusszeilen in Twips - BOOL bLeft = IsLeft(nPageNo) && !rParam.bShared; + sal_Bool bLeft = IsLeft(nPageNo) && !rParam.bShared; const ScPageHFItem* pHFItem = bLeft ? rParam.pLeft : rParam.pRight; long nLineStartX = aPageRect.Left() + rParam.nLeft; @@ -1883,7 +1883,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY, if (pObject) { pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) ); - pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE ); + pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, sal_False ); Point aDraw = aStart; long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight(); if (nDif > 0) @@ -1897,7 +1897,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY, if (pObject) { pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) ); - pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE ); + pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, sal_False ); Point aDraw = aStart; long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight(); if (nDif > 0) @@ -1911,7 +1911,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY, if (pObject) { pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) ); - pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, FALSE ); + pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, sal_False ); Point aDraw = aStart; long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight(); if (nDif > 0) @@ -1929,7 +1929,7 @@ void ScPrintFunc::PrintHF( long nPageNo, BOOL bHeader, long nStartY, } } -long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData ) +long ScPrintFunc::DoNotes( long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ) { if (bDoPrint) pDev->SetMapMode(aTwipMode); @@ -1957,10 +1957,10 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData long nPosY = aPageRect.Top(); long nCount = 0; - BOOL bOk; + sal_Bool bOk; do { - bOk = FALSE; + bOk = sal_False; ScAddress* pPos = (ScAddress*) aNotePosList.GetObject( nNoteStart+nCount ); if (pPos) { @@ -1996,7 +1996,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData nPosY += nTextHeight; nPosY += 200; // Abstand ++nCount; - bOk = TRUE; + bOk = sal_True; } } } @@ -2006,7 +2006,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData return nCount; } -long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData ) +long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ) { if ( nNoteStart >= (long) aNotePosList.Count() || !aTableParam.bNotes ) return 0; @@ -2055,12 +2055,12 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr if (aHdr.bEnable) { long nHeaderY = aPageRect.Top()-aHdr.nHeight; - PrintHF( nPageNo, TRUE, nHeaderY, bDoPrint, pLocationData ); + PrintHF( nPageNo, sal_True, nHeaderY, bDoPrint, pLocationData ); } if (aFtr.bEnable) { long nFooterY = aPageRect.Bottom()+aFtr.nDistance; - PrintHF( nPageNo, FALSE, nFooterY, bDoPrint, pLocationData ); + PrintHF( nPageNo, sal_False, nFooterY, bDoPrint, pLocationData ); } } @@ -2076,9 +2076,9 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr } void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, - BOOL bDoPrint, ScPreviewLocationData* pLocationData ) + sal_Bool bDoPrint, ScPreviewLocationData* pLocationData ) { - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nPrintTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; // nPageNo is the page number within all sheets of one "start page" setting @@ -2117,11 +2117,11 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO if ( aAreaParam.bRepeatCol ) if ( nX1 > nRepeatStartCol && nX1 <= nRepeatEndCol ) nX1 = nRepeatEndCol + 1; - BOOL bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol); + sal_Bool bDoRepCol = (aAreaParam.bRepeatCol && nX1 > nRepeatEndCol); if ( aAreaParam.bRepeatRow ) if ( nY1 > nRepeatStartRow && nY1 <= nRepeatEndRow ) nY1 = nRepeatEndRow + 1; - BOOL bDoRepRow = (aAreaParam.bRepeatRow && nY1 > nRepeatEndRow); + sal_Bool bDoRepRow = (aAreaParam.bRepeatRow && nY1 > nRepeatEndRow); // use new object hide flags in SdrPaintView if(pDrawView) @@ -2143,12 +2143,12 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO if (aHdr.bEnable) { long nHeaderY = aPageRect.Top()-aHdr.nHeight; - PrintHF( nPageNo, TRUE, nHeaderY, bDoPrint, pLocationData ); + PrintHF( nPageNo, sal_True, nHeaderY, bDoPrint, pLocationData ); } if (aFtr.bEnable) { long nFooterY = aPageRect.Bottom()+aFtr.nDistance; - PrintHF( nPageNo, FALSE, nFooterY, bDoPrint, pLocationData ); + PrintHF( nPageNo, sal_False, nFooterY, bDoPrint, pLocationData ); } // Position ( Raender / zentrieren ) @@ -2318,34 +2318,34 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO { if ( bDoPrint ) PrintArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow, - nRepStartX,nRepStartY, TRUE,TRUE,FALSE,FALSE ); + nRepStartX,nRepStartY, sal_True,sal_True,sal_False,sal_False ); if ( pLocationData ) LocateArea( nRepeatStartCol,nRepeatStartRow, nRepeatEndCol,nRepeatEndRow, - nRepStartX,nRepStartY, TRUE,TRUE, *pLocationData ); + nRepStartX,nRepStartY, sal_True,sal_True, *pLocationData ); } if (bDoRepCol) { if ( bDoPrint ) PrintArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, - TRUE,!bDoRepRow,FALSE,TRUE ); + sal_True,!bDoRepRow,sal_False,sal_True ); if ( pLocationData ) - LocateArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, TRUE,FALSE, *pLocationData ); + LocateArea( nRepeatStartCol,nY1, nRepeatEndCol,nY2, nRepStartX,nDataY, sal_True,sal_False, *pLocationData ); } if (bDoRepRow) { if ( bDoPrint ) PrintArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, - !bDoRepCol,TRUE,TRUE,FALSE ); + !bDoRepCol,sal_True,sal_True,sal_False ); if ( pLocationData ) - LocateArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, FALSE,TRUE, *pLocationData ); + LocateArea( nX1,nRepeatStartRow, nX2,nRepeatEndRow, nDataX,nRepStartY, sal_False,sal_True, *pLocationData ); } // Daten ausgeben if ( bDoPrint ) - PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,TRUE,TRUE ); + PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,sal_True,sal_True ); if ( pLocationData ) - LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY, FALSE,FALSE, *pLocationData ); + LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY, sal_False,sal_False, *pLocationData ); // Spalten-/Zeilenkoepfe ausgeben // nach den Daten (ueber evtl. weitergezeichneten Schatten) @@ -2374,23 +2374,23 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO if ( bDoPrint ) PrintColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY ); if ( pLocationData ) - LocateColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY, TRUE, *pLocationData ); + LocateColHdr( nRepeatStartCol,nRepeatEndCol, nRepStartX,nInnerStartY, sal_True, *pLocationData ); } if ( bDoPrint ) PrintColHdr( nX1,nX2, nDataX,nInnerStartY ); if ( pLocationData ) - LocateColHdr( nX1,nX2, nDataX,nInnerStartY, FALSE, *pLocationData ); + LocateColHdr( nX1,nX2, nDataX,nInnerStartY, sal_False, *pLocationData ); if (bDoRepRow) { if ( bDoPrint ) PrintRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY ); if ( pLocationData ) - LocateRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY, TRUE, *pLocationData ); + LocateRowHdr( nRepeatStartRow,nRepeatEndRow, nInnerStartX,nRepStartY, sal_True, *pLocationData ); } if ( bDoPrint ) PrintRowHdr( nY1,nY2, nInnerStartX,nDataY ); if ( pLocationData ) - LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, FALSE, *pLocationData ); + LocateRowHdr( nY1,nY2, nInnerStartX,nDataY, sal_False, *pLocationData ); } // einfacher Rahmen @@ -2424,7 +2424,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO } aLastSourceRange = ScRange( nX1, nY1, nPrintTab, nX2, nY2, nPrintTab ); - bSourceRangeValid = TRUE; + bSourceRangeValid = sal_True; } void ScPrintFunc::SetOffset( const Point& rOfs ) @@ -2432,24 +2432,24 @@ void ScPrintFunc::SetOffset( const Point& rOfs ) aSrcOffset = rOfs; } -void ScPrintFunc::SetManualZoom( USHORT nNewZoom ) +void ScPrintFunc::SetManualZoom( sal_uInt16 nNewZoom ) { nManualZoom = nNewZoom; } -void ScPrintFunc::SetClearFlag( BOOL bFlag ) +void ScPrintFunc::SetClearFlag( sal_Bool bFlag ) { bClearWin = bFlag; } -void ScPrintFunc::SetUseStyleColor( BOOL bFlag ) +void ScPrintFunc::SetUseStyleColor( sal_Bool bFlag ) { bUseStyleColor = bFlag; if (pEditEngine) pEditEngine->EnableAutoColor( bUseStyleColor ); } -void ScPrintFunc::SetRenderFlag( BOOL bFlag ) +void ScPrintFunc::SetRenderFlag( sal_Bool bFlag ) { bIsRender = bFlag; // set when using XRenderable (PDF) } @@ -2470,10 +2470,10 @@ void ScPrintFunc::SetExclusivelyDrawOleAndDrawObjects() // richtig zu setzen - immer ohne UserArea // -BOOL ScPrintFunc::UpdatePages() +sal_Bool ScPrintFunc::UpdatePages() { if (!pParamSet) - return FALSE; + return sal_False; // Zoom @@ -2500,12 +2500,12 @@ BOOL ScPrintFunc::UpdatePages() pDocShell->PostPaint(0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID); } - return TRUE; + return sal_True; } long ScPrintFunc::CountPages() // setzt auch nPagesX, nPagesY { - BOOL bAreaOk = FALSE; + sal_Bool bAreaOk = sal_False; if (pDoc->HasTable( nPrintTab )) { @@ -2523,13 +2523,13 @@ long ScPrintFunc::CountPages() // setzt auch nPagesX, nPagesY nStartRow = rRange.aStart.Row(); nEndCol = rRange.aEnd .Col(); nEndRow = rRange.aEnd .Row(); - bAreaOk = AdjustPrintArea(FALSE); // begrenzen + bAreaOk = AdjustPrintArea(sal_False); // begrenzen } else - bAreaOk = FALSE; + bAreaOk = sal_False; } else // aus Dokument suchen - bAreaOk = AdjustPrintArea(TRUE); + bAreaOk = AdjustPrintArea(sal_True); } if (bAreaOk) @@ -2538,8 +2538,8 @@ long ScPrintFunc::CountPages() // setzt auch nPagesX, nPagesY size_t nY; if (bMultiArea) { - USHORT nRCount = pDoc->GetPrintRangeCount( nPrintTab ); - for (USHORT i=0; i<nRCount; i++) + sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab ); + for (sal_uInt16 i=0; i<nRCount; i++) { CalcZoom(i); if ( aTableParam.bSkipEmpty ) @@ -2581,19 +2581,19 @@ long ScPrintFunc::CountNotePages() SCCOL nCol; SCROW nRow; - BOOL bError = FALSE; + sal_Bool bError = sal_False; if (!aAreaParam.bPrintArea) - bError = !AdjustPrintArea(TRUE); // komplett aus Dok suchen + bError = !AdjustPrintArea(sal_True); // komplett aus Dok suchen - USHORT nRepeats = 1; // wie oft durchgehen ? + sal_uInt16 nRepeats = 1; // wie oft durchgehen ? if (bMultiArea) nRepeats = pDoc->GetPrintRangeCount(nPrintTab); if (bError) nRepeats = 0; - for (USHORT nStep=0; nStep<nRepeats; nStep++) + for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++) { - BOOL bDoThis = TRUE; + sal_Bool bDoThis = sal_True; if (bMultiArea) // alle Areas durchgehen { const ScRange* pThisRange = pDoc->GetPrintRange( nPrintTab, nStep ); @@ -2603,7 +2603,7 @@ long ScPrintFunc::CountNotePages() nStartRow = pThisRange->aStart.Row(); nEndCol = pThisRange->aEnd .Col(); nEndRow = pThisRange->aEnd .Row(); - bDoThis = AdjustPrintArea(FALSE); + bDoThis = AdjustPrintArea(sal_False); } } @@ -2629,7 +2629,7 @@ long ScPrintFunc::CountNotePages() long nNoteAdd; do { - nNoteAdd = PrintNotes( nPages, nNoteNr, FALSE, NULL ); + nNoteAdd = PrintNotes( nPages, nNoteNr, sal_False, NULL ); if (nNoteAdd) { nNoteNr += nNoteAdd; @@ -2691,8 +2691,8 @@ void ScPrintFunc::ApplyPrintSettings() aEnumSize.Width() = aEnumSize.Height(); aEnumSize.Height() = nTemp; } - Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, TRUE ); - USHORT nPaperBin = ((const SvxPaperBinItem&)pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue(); + Paper ePaper = SvxPaperInfo::GetSvxPaper( aEnumSize, MAP_TWIP, sal_True ); + sal_uInt16 nPaperBin = ((const SvxPaperBinItem&)pParamSet->Get(ATTR_PAGE_PAPERBIN)).GetValue(); pPrinter->SetPaper( ePaper ); if ( PAPER_USER == ePaper ) @@ -2714,7 +2714,7 @@ void ScPrintFunc::ApplyPrintSettings() // nDisplayStart = lfd. Nummer fuer Anzeige der Seitennummer long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges, - long nStartPage, long nDisplayStart, BOOL bDoPrint, + long nStartPage, long nDisplayStart, sal_Bool bDoPrint, SfxProgress* pProgress, ScPreviewLocationData* pLocationData ) { DBG_ASSERT(pDev,"Device == NULL"); @@ -2744,10 +2744,10 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges, long nPrinted = 0; long nEndPage = rPageRanges.GetTotalRange().Max(); - USHORT nRepeats = 1; // wie oft durchgehen ? + sal_uInt16 nRepeats = 1; // wie oft durchgehen ? if (bMultiArea) nRepeats = pDoc->GetPrintRangeCount(nPrintTab); - for (USHORT nStep=0; nStep<nRepeats; nStep++) + for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++) { if (bMultiArea) // Bereich neu belegen ? { @@ -2832,7 +2832,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges, { if ( nPageNo+nStartPage <= nEndPage ) { - BOOL bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 ); + sal_Bool bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 ); nNoteAdd = PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected, ( bPageSelected ? pLocationData : NULL ) ); if ( nNoteAdd ) @@ -2846,7 +2846,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges, if (bPageSelected) { ++nPrinted; - bSourceRangeValid = FALSE; // last page was no cell range + bSourceRangeValid = sal_False; // last page was no cell range } ++nPageNo; } @@ -2862,9 +2862,9 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges, return nPrinted; } -void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom berechnen +void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) // Zoom berechnen { - USHORT nRCount = pDoc->GetPrintRangeCount( nPrintTab ); + sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab ); const ScRange* pThisRange = NULL; if ( nRangeNo != RANGENO_NORANGE || nRangeNo < nRCount ) pThisRange = pDoc->GetPrintRange( nPrintTab, nRangeNo ); @@ -2876,7 +2876,7 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom berechnen nEndRow = pThisRange->aEnd .Row(); } - if (!AdjustPrintArea(FALSE)) // leer + if (!AdjustPrintArea(sal_False)) // leer { nZoom = 100; nPagesX = nPagesY = nTotalY = 0; @@ -2888,7 +2888,7 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom berechnen if (aTableParam.bScalePageNum) { nZoom = 100; - USHORT nPagesToFit = aTableParam.nScalePageNum; + sal_uInt16 nPagesToFit = aTableParam.nScalePageNum; sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0; while (true) @@ -2929,8 +2929,8 @@ void ScPrintFunc::CalcZoom( USHORT nRangeNo ) // Zoom berechnen else if (aTableParam.bScaleTo) { nZoom = 100; - USHORT nW = aTableParam.nScaleWidth; - USHORT nH = aTableParam.nScaleHeight; + sal_uInt16 nW = aTableParam.nScaleWidth; + sal_uInt16 nH = aTableParam.nScaleHeight; sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0; while (true) @@ -3041,7 +3041,7 @@ void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowE SCROW nStartRow = rPageRowEntry.GetStartRow(); SCROW nEndRow = rPageRowEntry.GetEndRow(); - BOOL bLeftIsEmpty = FALSE; + sal_Bool bLeftIsEmpty = sal_False; ScRange aTempRange; Rectangle aTempRect = pDoc->GetMMRect( 0,0, 0,0, 0 ); @@ -3052,10 +3052,10 @@ void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rPageRowE bLeftIsEmpty, &aTempRange, &aTempRect ) ) { rPageRowEntry.SetHidden(i); - bLeftIsEmpty = TRUE; + bLeftIsEmpty = sal_True; } else - bLeftIsEmpty = FALSE; + bLeftIsEmpty = sal_False; nStartCol = nEndCol+1; } diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index 351198227..758f6795e 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -95,7 +95,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); } #define IMPL_CHILD_CTOR(Class,sid) \ Class::Class( Window* pParentP, \ - USHORT nId, \ + sal_uInt16 nId, \ SfxBindings* p, \ SfxChildWinInfo* pInfo ) \ : SfxChildWindow(pParentP, nId) \ @@ -115,7 +115,7 @@ namespace { ScTabViewShell * lcl_GetTabViewShell( SfxBindings *pBindings ); } pWindow = pViewShell ? \ pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL; \ if (pViewShell && !pWindow) \ - pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \ + pViewShell->GetViewFrame()->SetChildWindow( nId, sal_False ); \ } @@ -204,15 +204,15 @@ IMPL_CHILD_CTOR( ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION ) // ScSimpleRefDlgWrapper //------------------------------------------------------------------------- -static BOOL bScSimpleRefFlag; +static sal_Bool bScSimpleRefFlag; static long nScSimpleRefHeight; static long nScSimpleRefWidth; static long nScSimpleRefX; static long nScSimpleRefY; -static BOOL bAutoReOpen=TRUE; +static sal_Bool bAutoReOpen=sal_True; ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP, - USHORT nId, + sal_uInt16 nId, SfxBindings* p, SfxChildWinInfo* pInfo ) : SfxChildWindow(pParentP, nId) @@ -245,11 +245,11 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( Window* pParentP, if (!pWindow) { - SC_MOD()->SetRefDialog( nId, FALSE ); + SC_MOD()->SetRefDialog( nId, sal_False ); } } -void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet) +void ScSimpleRefDlgWrapper::SetDefaultPosSize(Point aPos, Size aSize, sal_Bool bSet) { bScSimpleRefFlag=bSet; if(bScSimpleRefFlag) @@ -272,7 +272,7 @@ String ScSimpleRefDlgWrapper::GetRefString() return aResult; } -void ScSimpleRefDlgWrapper::SetAutoReOpen(BOOL bFlag) +void ScSimpleRefDlgWrapper::SetAutoReOpen(sal_Bool bFlag) { bAutoReOpen=bFlag; } @@ -302,7 +302,7 @@ void ScSimpleRefDlgWrapper::SetUnoLinks( const Link& rDone, } } -void ScSimpleRefDlgWrapper::SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection ) +void ScSimpleRefDlgWrapper::SetFlags( sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ) { if(pWindow!=NULL) { @@ -325,7 +325,7 @@ void ScSimpleRefDlgWrapper::StartRefInput() //------------------------------------------------------------------------- ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentP, nId ) @@ -341,7 +341,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( Window* pParentP, ((ScAcceptChgDlg*)pWindow)->Initialize( pInfo ); } if (pViewShell && !pWindow) - pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); + pViewShell->GetViewFrame()->SetChildWindow( nId, sal_False ); } void ScAcceptChgDlgWrapper::ReInitDlg() @@ -401,7 +401,7 @@ namespace } ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP, \ - USHORT nId, \ + sal_uInt16 nId, \ SfxBindings* p, \ SfxChildWinInfo* /*pInfo*/ ) \ : SfxChildWindow(pParentP, nId), @@ -409,7 +409,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP, \ m_bFreeWindowLock( false ), m_pSavedWndParent( NULL ) { - SetWantsFocus( FALSE );\ + SetWantsFocus( sal_False );\ ScTabViewShell* pViewShell = \ NULL != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow)->GetTabViewShell() : lcl_GetTabViewShell( p ); @@ -417,7 +417,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( Window* pParentP, \ pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); DBG_ASSERT( pViewShell, "missing view shell :-(" ); \ if (pViewShell && !pWindow) \ - pViewShell->GetViewFrame()->SetChildWindow( nId, FALSE ); \ + pViewShell->GetViewFrame()->SetChildWindow( nId, sal_False ); \ else if( pWindow /*&& pWindow->ISA(ScValidationDlg)*/ ) {}//pWindow = new Window( pParentP, WB_HIDE ); diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index a72d3782a..7b768f0c4 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -46,14 +46,14 @@ #include "docsh.hxx" #include "tabprotection.hxx" -extern USHORT nScFillModeMouseModifier; // global.cxx +extern sal_uInt16 nScFillModeMouseModifier; // global.cxx using namespace com::sun::star; // STATIC DATA ----------------------------------------------------------- static Point aSwitchPos; //! Member -static BOOL bDidSwitch = FALSE; +static sal_Bool bDidSwitch = sal_False; // ----------------------------------------------------------------------- @@ -64,8 +64,8 @@ static BOOL bDidSwitch = FALSE; ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) : pViewData( pNewViewData ), pEngine( NULL ), - bAnchor( FALSE ), - bStarted( FALSE ) + bAnchor( sal_False ), + bStarted( sal_False ) { DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet"); } @@ -103,19 +103,19 @@ void __EXPORT ScViewFunctionSet::BeginDrag() } ScModule* pScMod = SC_MOD(); - BOOL bRefMode = pScMod->IsFormulaMode(); + sal_Bool bRefMode = pScMod->IsFormulaMode(); if (!bRefMode) { pViewData->GetView()->FakeButtonUp( GetWhich() ); // ButtonUp wird verschluckt ScMarkData& rMark = pViewData->GetMarkData(); -// rMark.SetMarking(FALSE); // es fehlt ein ButtonUp +// rMark.SetMarking(sal_False); // es fehlt ein ButtonUp rMark.MarkToSimple(); if ( rMark.IsMarked() && !rMark.IsMultiMarked() ) { ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); - // bApi = TRUE -> no error mesages - BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE ); + // bApi = sal_True -> no error mesages + sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, sal_False, sal_True ); if ( bCopied ) { sal_Int8 nDragActions = pViewData->GetView()->SelectionEditable() ? @@ -165,7 +165,7 @@ void __EXPORT ScViewFunctionSet::CreateAnchor() { if (bAnchor) return; - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if (bRefMode) SetAnchor( pViewData->GetRefStartX(), pViewData->GetRefStartY() ); else @@ -174,22 +174,22 @@ void __EXPORT ScViewFunctionSet::CreateAnchor() void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY ) { - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); ScTabView* pView = pViewData->GetView(); SCTAB nTab = pViewData->GetTabNo(); if (bRefMode) { - pView->DoneRefMode( FALSE ); + pView->DoneRefMode( sal_False ); aAnchorPos.Set( nPosX, nPosY, nTab ); pView->InitRefMode( aAnchorPos.Col(), aAnchorPos.Row(), aAnchorPos.Tab(), SC_REFTYPE_REF ); - bStarted = TRUE; + bStarted = sal_True; } else if (pViewData->IsAnyFillMode()) { aAnchorPos.Set( nPosX, nPosY, nTab ); - bStarted = TRUE; + bStarted = sal_True; } else { @@ -200,46 +200,46 @@ void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY ) } else { - pView->DoneBlockMode( TRUE ); + pView->DoneBlockMode( sal_True ); aAnchorPos.Set( nPosX, nPosY, nTab ); ScMarkData& rMark = pViewData->GetMarkData(); if ( rMark.IsMarked() || rMark.IsMultiMarked() ) { pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(), - aAnchorPos.Tab(), TRUE ); - bStarted = TRUE; + aAnchorPos.Tab(), sal_True ); + bStarted = sal_True; } else - bStarted = FALSE; + bStarted = sal_False; } } - bAnchor = TRUE; + bAnchor = sal_True; } void __EXPORT ScViewFunctionSet::DestroyAnchor() { - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if (bRefMode) - pViewData->GetView()->DoneRefMode( TRUE ); + pViewData->GetView()->DoneRefMode( sal_True ); else - pViewData->GetView()->DoneBlockMode( TRUE ); + pViewData->GetView()->DoneBlockMode( sal_True ); - bAnchor = FALSE; + bAnchor = sal_False; } -void ScViewFunctionSet::SetAnchorFlag( BOOL bSet ) +void ScViewFunctionSet::SetAnchorFlag( sal_Bool bSet ) { bAnchor = bSet; } -BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDontSelectAtCursor */ ) +sal_Bool __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ ) { if ( bDidSwitch ) { if ( rPointPixel == aSwitchPos ) - return FALSE; // nicht auf falschem Fenster scrollen + return sal_False; // nicht auf falschem Fenster scrollen else - bDidSwitch = FALSE; + bDidSwitch = sal_False; } aSwitchPos = rPointPixel; // nur wichtig, wenn bDidSwitch @@ -256,21 +256,21 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO // Scrolling Size aWinSize = pEngine->GetWindow()->GetOutputSizePixel(); - BOOL bRightScroll = ( aEffPos.X() >= aWinSize.Width() ); - BOOL bBottomScroll = ( aEffPos.Y() >= aWinSize.Height() ); - BOOL bNegScroll = ( aEffPos.X() < 0 || aEffPos.Y() < 0 ); - BOOL bScroll = bRightScroll || bBottomScroll || bNegScroll; + sal_Bool bRightScroll = ( aEffPos.X() >= aWinSize.Width() ); + sal_Bool bBottomScroll = ( aEffPos.Y() >= aWinSize.Height() ); + sal_Bool bNegScroll = ( aEffPos.X() < 0 || aEffPos.Y() < 0 ); + sal_Bool bScroll = bRightScroll || bBottomScroll || bNegScroll; SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(), - nPosX, nPosY, TRUE, TRUE ); // mit Repair + nPosX, nPosY, sal_True, sal_True ); // mit Repair // fuer AutoFill in der Mitte der Zelle umschalten // dabei aber nicht das Scrolling nach rechts/unten verhindern if ( pViewData->IsFillMode() || pViewData->GetFillMode() == SC_FILL_MATRIX ) { - BOOL bLeft, bTop; + sal_Bool bLeft, bTop; pViewData->GetMouseQuadrant( aEffPos, GetWhich(), nPosX, nPosY, bLeft, bTop ); ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); @@ -297,18 +297,18 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO if ( aEffPos.X() >= aWinSize.Width() ) { if ( eWhich == SC_SPLIT_TOPLEFT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bScroll = FALSE, bDidSwitch = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bScroll = sal_False, bDidSwitch = sal_True; else if ( eWhich == SC_SPLIT_BOTTOMLEFT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = FALSE, bDidSwitch = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = sal_False, bDidSwitch = sal_True; } if ( pViewData->GetVSplitMode() == SC_SPLIT_FIX ) if ( aEffPos.Y() >= aWinSize.Height() ) { if ( eWhich == SC_SPLIT_TOPLEFT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bScroll = FALSE, bDidSwitch = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bScroll = sal_False, bDidSwitch = sal_True; else if ( eWhich == SC_SPLIT_TOPRIGHT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = FALSE, bDidSwitch = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bScroll = sal_False, bDidSwitch = sal_True; } } @@ -316,7 +316,7 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO return SetCursorAtCell( nPosX, nPosY, bScroll ); } -BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll ) +sal_Bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, sal_Bool bScroll ) { ScTabView* pView = pViewData->GetView(); SCTAB nTab = pViewData->GetTabNo(); @@ -332,19 +332,19 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol bool bSkipUnprotected = !pProtect->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS); if ( bSkipProtected && bSkipUnprotected ) - return FALSE; + return sal_False; bool bCellProtected = pDoc->HasAttrib(nPosX, nPosY, nTab, nPosX, nPosY, nTab, HASATTR_PROTECTED); if ( (bCellProtected && bSkipProtected) || (!bCellProtected && bSkipUnprotected) ) // Don't select this cell! - return FALSE; + return sal_False; } ScModule* pScMod = SC_MOD(); ScTabViewShell* pViewShell = pViewData->GetViewShell(); bool bRefMode = ( pViewShell ? pViewShell->IsRefInputMode() : false ); - BOOL bHide = !bRefMode && !pViewData->IsAnyFillMode() && + sal_Bool bHide = !bRefMode && !pViewData->IsAnyFillMode() && ( nPosX != (SCsCOL) pViewData->GetCurX() || nPosY != (SCsROW) pViewData->GetCurY() ); if (bHide) @@ -368,7 +368,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol { if (!bAnchor) { - pView->DoneRefMode( TRUE ); + pView->DoneRefMode( sal_True ); pView->InitRefMode( nPosX, nPosY, pViewData->GetTabNo(), SC_REFTYPE_REF ); } @@ -392,7 +392,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol } ScRange aDelRange; - BOOL bOldDelMark = pViewData->GetDelMark( aDelRange ); + sal_Bool bOldDelMark = pViewData->GetDelMark( aDelRange ); if ( nPosX+1 >= (SCsCOL) nStartX && nPosX <= (SCsCOL) nEndX && nPosY+1 >= (SCsROW) nStartY && nPosY <= (SCsROW) nEndY && @@ -468,8 +468,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol #endif } - BOOL bNegX = ( nPosX < (SCsCOL) nStartX ); - BOOL bNegY = ( nPosY < (SCsROW) nStartY ); + sal_Bool bNegX = ( nPosX < (SCsCOL) nStartX ); + sal_Bool bNegY = ( nPosY < (SCsROW) nStartY ); long nSizeX = 0; if ( bNegX ) @@ -503,12 +503,12 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol if ( nSizeX > nSizeY ) // Fill immer nur in einer Richtung { nPosY = nEndY; - bNegY = FALSE; + bNegY = sal_False; } else { nPosX = nEndX; - bNegX = FALSE; + bNegX = sal_False; } SCCOL nRefStX = bNegX ? nEndX : nStartX; @@ -524,7 +524,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol } else if (pViewData->IsAnyFillMode()) { - BYTE nMode = pViewData->GetFillMode(); + sal_uInt8 nMode = pViewData->GetFillMode(); if ( nMode == SC_FILL_EMBED_LT || nMode == SC_FILL_EMBED_RB ) { DBG_ASSERT( pDoc->IsEmbedded(), "!pDoc->IsEmbedded()" ); @@ -564,7 +564,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol } else // normales Markieren { - BOOL bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() || + sal_Bool bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() || (SCROW)nPosY != pViewData->GetCurY() ); if (bHideCur) pView->HideAllCursors(); // sonst zweimal: Block und SetCursor @@ -573,29 +573,29 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol { if (!bStarted) { - BOOL bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() || + sal_Bool bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() || nPosY != (SCsROW) aAnchorPos.Row() ); if ( bMove || ( pEngine && pEngine->GetMouseEvent().IsShift() ) ) { pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(), - aAnchorPos.Tab(), TRUE ); - bStarted = TRUE; + aAnchorPos.Tab(), sal_True ); + bStarted = sal_True; } } if (bStarted) - pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, FALSE, FALSE, TRUE ); + pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, sal_False, sal_False, sal_True ); } else { ScMarkData& rMark = pViewData->GetMarkData(); if (rMark.IsMarked() || rMark.IsMultiMarked()) { - pView->DoneBlockMode(TRUE); - pView->InitBlockMode( nPosX, nPosY, nTab, TRUE ); + pView->DoneBlockMode(sal_True); + pView->InitBlockMode( nPosX, nPosY, nTab, sal_True ); pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab ); aAnchorPos.Set( nPosX, nPosY, nTab ); - bStarted = TRUE; + bStarted = sal_True; } // #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells, // it highlights that new cell as well as the old cell where the cursor is @@ -606,18 +606,18 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol SCCOL nOldX = pViewData->GetCurX(); SCROW nOldY = pViewData->GetCurY(); - pView->InitBlockMode( nOldX, nOldY, nTab, TRUE ); + pView->InitBlockMode( nOldX, nOldY, nTab, sal_True ); pView->MarkCursor( (SCCOL) nOldX, (SCROW) nOldY, nTab ); if ( nOldX != nPosX || nOldY != nPosY ) { - pView->DoneBlockMode( TRUE ); - pView->InitBlockMode( nPosX, nPosY, nTab, TRUE ); + pView->DoneBlockMode( sal_True ); + pView->InitBlockMode( nPosX, nPosY, nTab, sal_True ); pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab ); aAnchorPos.Set( nPosX, nPosY, nTab ); } - bStarted = TRUE; + bStarted = sal_True; } } @@ -630,17 +630,17 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol if (bHide) pView->ShowAllCursors(); - return TRUE; + return sal_True; } -BOOL __EXPORT ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +sal_Bool __EXPORT ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if (bRefMode) - return FALSE; + return sal_False; if (pViewData->IsAnyFillMode()) - return FALSE; + return sal_False; ScMarkData& rMark = pViewData->GetMarkData(); if (bAnchor || !rMark.IsMultiMarked()) @@ -651,7 +651,7 @@ BOOL __EXPORT ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) return pViewData->GetMarkData().IsCellMarked( (SCCOL) nPosX, (SCROW) nPosY ); } - return FALSE; + return sal_False; } void __EXPORT ScViewFunctionSet::DeselectAtPoint( const Point& /* rPointPixel */ ) @@ -664,18 +664,18 @@ void __EXPORT ScViewFunctionSet::DeselectAll() if (pViewData->IsAnyFillMode()) return; - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if (bRefMode) { - pViewData->GetView()->DoneRefMode( FALSE ); + pViewData->GetView()->DoneRefMode( sal_False ); } else { - pViewData->GetView()->DoneBlockMode( FALSE ); + pViewData->GetView()->DoneBlockMode( sal_False ); pViewData->GetViewShell()->UpdateInputHandler(); } - bAnchor = FALSE; + bAnchor = sal_False; } //------------------------------------------------------------------------ @@ -687,7 +687,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView, { // Parameter einstellen SetSelectionMode( MULTIPLE_SELECTION ); - EnableDrag( TRUE ); + EnableDrag( sal_True ); } @@ -699,15 +699,15 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView, ScHeaderFunctionSet::ScHeaderFunctionSet( ScViewData* pNewViewData ) : pViewData( pNewViewData ), - bColumn( FALSE ), + bColumn( sal_False ), eWhich( SC_SPLIT_TOPLEFT ), - bAnchor( FALSE ), + bAnchor( sal_False ), nCursorPos( 0 ) { DBG_ASSERT(pViewData, "ViewData==0 bei FunctionSet"); } -void ScHeaderFunctionSet::SetColumn( BOOL bSet ) +void ScHeaderFunctionSet::SetColumn( sal_Bool bSet ) { bColumn = bSet; } @@ -728,41 +728,41 @@ void __EXPORT ScHeaderFunctionSet::CreateAnchor() return; ScTabView* pView = pViewData->GetView(); - pView->DoneBlockMode( TRUE ); + pView->DoneBlockMode( sal_True ); if (bColumn) { - pView->InitBlockMode( static_cast<SCCOL>(nCursorPos), 0, pViewData->GetTabNo(), TRUE, TRUE, FALSE ); + pView->InitBlockMode( static_cast<SCCOL>(nCursorPos), 0, pViewData->GetTabNo(), sal_True, sal_True, sal_False ); pView->MarkCursor( static_cast<SCCOL>(nCursorPos), MAXROW, pViewData->GetTabNo() ); } else { - pView->InitBlockMode( 0, nCursorPos, pViewData->GetTabNo(), TRUE, FALSE, TRUE ); + pView->InitBlockMode( 0, nCursorPos, pViewData->GetTabNo(), sal_True, sal_False, sal_True ); pView->MarkCursor( MAXCOL, nCursorPos, pViewData->GetTabNo() ); } - bAnchor = TRUE; + bAnchor = sal_True; } void __EXPORT ScHeaderFunctionSet::DestroyAnchor() { - pViewData->GetView()->DoneBlockMode( TRUE ); - bAnchor = FALSE; + pViewData->GetView()->DoneBlockMode( sal_True ); + bAnchor = sal_False; } -BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL /* bDontSelectAtCursor */ ) +sal_Bool __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ ) { if ( bDidSwitch ) { // die naechste gueltige Position muss vom anderen Fenster kommen if ( rPointPixel == aSwitchPos ) - return FALSE; // nicht auf falschem Fenster scrollen + return sal_False; // nicht auf falschem Fenster scrollen else - bDidSwitch = FALSE; + bDidSwitch = sal_False; } // Scrolling Size aWinSize = pViewData->GetActiveWin()->GetOutputSizePixel(); - BOOL bScroll; + sal_Bool bScroll; if (bColumn) bScroll = ( rPointPixel.X() < 0 || rPointPixel.X() >= aWinSize.Width() ); else @@ -770,7 +770,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B // ueber Fixier-Grenze bewegt? - BOOL bSwitched = FALSE; + sal_Bool bSwitched = sal_False; if ( bColumn ) { if ( pViewData->GetHSplitMode() == SC_SPLIT_FIX ) @@ -778,9 +778,9 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B if ( rPointPixel.X() > aWinSize.Width() ) { if ( eWhich == SC_SPLIT_TOPLEFT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bSwitched = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_TOPRIGHT ), bSwitched = sal_True; else if ( eWhich == SC_SPLIT_BOTTOMLEFT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = sal_True; } } } @@ -791,17 +791,17 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B if ( rPointPixel.Y() > aWinSize.Height() ) { if ( eWhich == SC_SPLIT_TOPLEFT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bSwitched = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMLEFT ), bSwitched = sal_True; else if ( eWhich == SC_SPLIT_TOPRIGHT ) - pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = TRUE; + pViewData->GetView()->ActivatePart( SC_SPLIT_BOTTOMRIGHT ), bSwitched = sal_True; } } } if (bSwitched) { aSwitchPos = rPointPixel; - bDidSwitch = TRUE; - return FALSE; // nicht mit falschen Positionen rechnen + bDidSwitch = sal_True; + return sal_False; // nicht mit falschen Positionen rechnen } // @@ -809,7 +809,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(), - nPosX, nPosY, FALSE ); + nPosX, nPosY, sal_False ); if (bColumn) { nCursorPos = static_cast<SCCOLROW>(nPosX); @@ -822,7 +822,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B } ScTabView* pView = pViewData->GetView(); - BOOL bHide = pViewData->GetCurX() != nPosX || + sal_Bool bHide = pViewData->GetCurX() != nPosX || pViewData->GetCurY() != nPosY; if (bHide) pView->HideAllCursors(); @@ -833,11 +833,11 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B if ( !bAnchor || !pView->IsBlockMode() ) { - pView->DoneBlockMode( TRUE ); + pView->DoneBlockMode( sal_True ); pViewData->GetMarkData().MarkToMulti(); //! wer verstellt das ??? - pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), TRUE, bColumn, !bColumn ); + pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), sal_True, bColumn, !bColumn ); - bAnchor = TRUE; + bAnchor = sal_True; } pView->MarkCursor( nPosX, nPosY, pViewData->GetTabNo(), bColumn, !bColumn ); @@ -848,15 +848,15 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B if (bHide) pView->ShowAllCursors(); - return TRUE; + return sal_True; } -BOOL __EXPORT ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +sal_Bool __EXPORT ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(), - nPosX, nPosY, FALSE ); + nPosX, nPosY, sal_False ); ScMarkData& rMark = pViewData->GetMarkData(); if (bColumn) @@ -871,8 +871,8 @@ void __EXPORT ScHeaderFunctionSet::DeselectAtPoint( const Point& /* rPointPixel void __EXPORT ScHeaderFunctionSet::DeselectAll() { - pViewData->GetView()->DoneBlockMode( FALSE ); - bAnchor = FALSE; + pViewData->GetView()->DoneBlockMode( sal_False ); + bAnchor = sal_False; } //------------------------------------------------------------------------ @@ -882,7 +882,7 @@ ScHeaderSelectionEngine::ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunct { // Parameter einstellen SetSelectionMode( MULTIPLE_SELECTION ); - EnableDrag( FALSE ); + EnableDrag( sal_False ); } diff --git a/sc/source/ui/view/selectionstate.cxx b/sc/source/ui/view/selectionstate.cxx index 43ef60b3e..870c56f66 100644 --- a/sc/source/ui/view/selectionstate.cxx +++ b/sc/source/ui/view/selectionstate.cxx @@ -57,7 +57,7 @@ ScSelectionState::ScSelectionState( ScViewData& rViewData ) : if( rMarkData.IsMultiMarked() ) { meType = SC_SELECTTYPE_SHEET; - rMarkData.FillRangeListWithMarks( &maSheetSel, FALSE ); + rMarkData.FillRangeListWithMarks( &maSheetSel, sal_False ); } // else type is SC_SELECTTYPE_NONE - already initialized } @@ -69,10 +69,10 @@ bool operator==( const ScSelectionState& rL, const ScSelectionState& rR ) if( bEqual ) switch( rL.GetSelectionType() ) { case SC_SELECTTYPE_EDITCELL: - bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != FALSE ); + bEqual &= ( rL.GetEditSelection().IsEqual( rR.GetEditSelection() ) != sal_False ); // run through! case SC_SELECTTYPE_SHEET: - bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == TRUE; + bEqual &= (rL.GetSheetSelection() == rR.GetSheetSelection()) == sal_True; // run through! case SC_SELECTTYPE_NONE: bEqual &= rL.GetCellCursor() == rR.GetCellCursor(); diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index 67a306383..97723f916 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -49,7 +49,7 @@ SFX_IMPL_CHILDWINDOW( ScSpellDialogChildWindow, SID_SPELL_DIALOG ) -ScSpellDialogChildWindow::ScSpellDialogChildWindow( Window* pParentP, USHORT nId, +ScSpellDialogChildWindow::ScSpellDialogChildWindow( Window* pParentP, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : ::svx::SpellDialogChildWindow( pParentP, nId, pBindings, pInfo ), mpViewShell( 0 ), @@ -148,7 +148,7 @@ void ScSpellDialogChildWindow::Reset() } mpViewData->SetSpellingView( 0 ); - mpViewShell->KillEditView( TRUE ); + mpViewShell->KillEditView( sal_True ); mpDocShell->PostPaintGridAll(); mpViewShell->UpdateInputHandler(); mpDoc->DisableIdle( mbOldIdleDisabled ); @@ -220,7 +220,7 @@ void ScSpellDialogChildWindow::Init() } mbOldIdleDisabled = mpDoc->IsIdleDisabled(); - mpDoc->DisableIdle( TRUE ); // #42726# stop online spelling + mpDoc->DisableIdle( sal_True ); // #42726# stop online spelling // *** create Undo/Redo documents *** ------------------------------------- @@ -254,7 +254,7 @@ void ScSpellDialogChildWindow::Init() Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); pEditView->SetOutputArea( aRect ); mxEngine->SetControlWord( EE_CNTRL_USECHARATTRIBS ); - mxEngine->EnableUndo( FALSE ); + mxEngine->EnableUndo( sal_False ); mxEngine->SetPaperSize( aRect.GetSize() ); mxEngine->SetText( EMPTY_STRING ); mxEngine->ClearModifyFlag(); diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index d336e5bbb..528b1720d 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -115,7 +115,7 @@ bool ScConversionEngineBase::FindNextConversionCell() String aNewStr = GetText(); - BOOL bMultiTab = (rMark.GetSelectCount() > 1); + sal_Bool bMultiTab = (rMark.GetSelectCount() > 1); String aVisibleStr; if( bMultiTab ) mrDoc.GetString( mnCurrCol, mnCurrRow, mnStartTab, aVisibleStr ); @@ -249,7 +249,7 @@ bool ScConversionEngineBase::FindNextConversionCell() if( bFound ) { pViewShell->AlignToCursor( nNewCol, nNewRow, SC_FOLLOW_JUMP ); - pViewShell->SetCursor( nNewCol, nNewRow, TRUE ); + pViewShell->SetCursor( nNewCol, nNewRow, sal_True ); mrViewData.GetView()->MakeEditView( this, nNewCol, nNewRow ); EditView* pEditView = mrViewData.GetSpellingView(); // maSelState.GetEditSelection() returns (0,0) if not in edit mode -> ok @@ -329,7 +329,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView ) { EESpellState eState = EE_SPELL_OK; if( FindNextConversionCell() ) - eState = rEditView.StartSpeller( static_cast< BOOL >( TRUE ) ); + eState = rEditView.StartSpeller( static_cast< sal_Bool >( sal_True ) ); DBG_ASSERT( eState != EE_SPELL_NOSPELLER, "ScSpellingEngine::Convert - no spell checker" ); if( eState == EE_SPELL_NOLANGUAGE ) @@ -340,7 +340,7 @@ void ScSpellingEngine::ConvertAll( EditView& rEditView ) } } -BOOL ScSpellingEngine::SpellNextDocument() +sal_Bool ScSpellingEngine::SpellNextDocument() { return FindNextConversionCell(); } @@ -369,7 +369,7 @@ void ScSpellingEngine::ShowFinishDialog() Window* ScSpellingEngine::GetDialogParent() { - USHORT nWinId = ScSpellDialogChildWindow::GetChildWindowId(); + sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId(); SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame(); if( pViewFrm->HasChildWindow( nWinId ) ) if( SfxChildWindow* pChild = pViewFrm->GetChildWindow( nWinId ) ) @@ -438,13 +438,13 @@ void ScTextConversionEngine::ConvertAll( EditView& rEditView ) { rEditView.StartTextConversion( maConvParam.GetSourceLang(), maConvParam.GetTargetLang(), maConvParam.GetTargetFont(), - maConvParam.GetOptions(), maConvParam.IsInteractive(), TRUE ); + maConvParam.GetOptions(), maConvParam.IsInteractive(), sal_True ); // #i34769# restore initial cursor position RestoreCursorPos(); } } -BOOL ScTextConversionEngine::ConvertNextDocument() +sal_Bool ScTextConversionEngine::ConvertNextDocument() { return FindNextConversionCell(); } diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 073ab3064..816b49b60 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -61,7 +61,7 @@ ScTabControl::ScTabControl( Window* pParent, ScViewData* pData ) : pViewData( pData ), nMouseClickPageId( TabBar::PAGE_NOT_FOUND ), nSelPageIdByMouse( TabBar::PAGE_NOT_FOUND ), - bErrorShown( FALSE ) + bErrorShown( sal_False ) { ScDocument* pDoc = pViewData->GetDocument(); @@ -100,9 +100,9 @@ ScTabControl::~ScTabControl() { } -USHORT ScTabControl::GetMaxId() const +sal_uInt16 ScTabControl::GetMaxId() const { - USHORT nVisCnt = GetPageCount(); + sal_uInt16 nVisCnt = GetPageCount(); if (nVisCnt) return GetPageId(nVisCnt-1); @@ -111,7 +111,7 @@ USHORT ScTabControl::GetMaxId() const SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos ) { - USHORT nPos = ShowDropPos(rPos); + sal_uInt16 nPos = ShowDropPos(rPos); SCTAB nRealPos = static_cast<SCTAB>(nPos); @@ -121,7 +121,7 @@ SCTAB ScTabControl::GetPrivatDropPos(const Point& rPos ) SCTAB nCount = pDoc->GetTableCount(); - USHORT nViewPos=0; + sal_uInt16 nViewPos=0; nRealPos = nCount; for (SCTAB i=0; i<nCount; i++) { @@ -187,7 +187,7 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt ) // Click in the area next to the existing tabs: // #i70320# if several sheets are selected, deselect all ecxept the current sheet, // otherwise add new sheet - USHORT nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE; + sal_uInt16 nSlot = ( GetSelectPageCount() > 1 ) ? FID_TAB_DESELECTALL : FID_INS_TABLE; SfxDispatcher* pDispatcher = pViewData->GetViewShell()->GetViewFrame()->GetDispatcher(); pDispatcher->Execute( nSlot, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD ); // forget page ID, to be really sure that the dialog is not called twice @@ -223,9 +223,9 @@ void ScTabControl::Select() return; } - USHORT nCurId = GetCurPageId(); + sal_uInt16 nCurId = GetCurPageId(); if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist - USHORT nPage = nCurId - 1; + sal_uInt16 nPage = nCurId - 1; // OLE-inplace deaktivieren if ( nPage != static_cast<sal_uInt16>(pViewData->GetTabNo()) ) @@ -233,7 +233,7 @@ void ScTabControl::Select() // InputEnterHandler nur wenn nicht Referenzeingabe - BOOL bRefMode = pScMod->IsFormulaMode(); + sal_Bool bRefMode = pScMod->IsFormulaMode(); if (!bRefMode) pScMod->InputEnterHandler(); @@ -241,7 +241,7 @@ void ScTabControl::Select() rMark.SelectTable( i, IsPageSelected(static_cast<sal_uInt16>(i)+1) ); /* Markierungen werden per Default nicht pro Tabelle gehalten - USHORT nSelCnt = GetSelectPageCount(); + sal_uInt16 nSelCnt = GetSelectPageCount(); if (nSelCnt>1) pDoc->ExtendMarksFromTable( nPage ); */ @@ -289,7 +289,7 @@ void ScTabControl::UpdateStatus() { ScDocument* pDoc = pViewData->GetDocument(); ScMarkData& rMark = pViewData->GetMarkData(); - BOOL bActive = pViewData->IsActive(); + sal_Bool bActive = pViewData->IsActive(); SCTAB nCount = pDoc->GetTableCount(); SCTAB i; @@ -297,7 +297,7 @@ void ScTabControl::UpdateStatus() SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) ); Color aTabBgColor; - BOOL bModified = FALSE; // Tabellen-Namen + sal_Bool bModified = sal_False; // Tabellen-Namen for (i=0; i<nMaxCnt && !bModified; i++) { if (pDoc->IsVisible(i)) @@ -311,7 +311,7 @@ void ScTabControl::UpdateStatus() } if ( (GetPageText(static_cast<sal_uInt16>(i)+1) != aString) || (GetTabBgColor(static_cast<sal_uInt16>(i)+1) != aTabBgColor) ) - bModified = TRUE; + bModified = sal_True; } if (bModified) @@ -340,10 +340,10 @@ void ScTabControl::UpdateStatus() if (bActive) { - bModified = FALSE; // Selektion + bModified = sal_False; // Selektion for (i=0; i<nMaxCnt && !bModified; i++) if ( rMark.GetTableSelect(i) != IsPageSelected(static_cast<sal_uInt16>(i)+1) ) - bModified = TRUE; + bModified = sal_True; // #i99576# the following loop is mis-optimized on unxsoli4 and the reason // why this file is in NOOPTFILES. @@ -356,7 +356,7 @@ void ScTabControl::UpdateStatus() } } -void ScTabControl::ActivateView(BOOL bActivate) +void ScTabControl::ActivateView(sal_Bool bActivate) { // ScDocument* pDoc = pViewData->GetDocument(); ScMarkData& rMark = pViewData->GetMarkData(); @@ -364,29 +364,29 @@ void ScTabControl::ActivateView(BOOL bActivate) // ResetMark direkt in TabView // pDoc->ResetMark(); - USHORT nCurId = GetCurPageId(); + sal_uInt16 nCurId = GetCurPageId(); if (!nCurId) return; // kann vorkommen, wenn bei Excel-Import alles versteckt ist - USHORT nPage = nCurId - 1; -// USHORT nCount = GetMaxId(); + sal_uInt16 nPage = nCurId - 1; +// sal_uInt16 nCount = GetMaxId(); /* - USHORT i; + sal_uInt16 i; for (i=0; i<nCount; i++) { - SelectPage( i+1, FALSE ); + SelectPage( i+1, sal_False ); if (bActivate) - rMark.SelectTable( i, FALSE ); + rMark.SelectTable( i, sal_False ); } */ if (bActivate) { - SelectPage( nPage+1, TRUE ); - rMark.SelectTable( static_cast<SCTAB>(nPage), TRUE ); + SelectPage( nPage+1, sal_True ); + rMark.SelectTable( static_cast<SCTAB>(nPage), sal_True ); } Invalidate(); } -void ScTabControl::SetSheetLayoutRTL( BOOL bSheetRTL ) +void ScTabControl::SetSheetLayoutRTL( sal_Bool bSheetRTL ) { SetEffectiveRTL( bSheetRTL ); nSelPageIdByMouse = TabBar::PAGE_NOT_FOUND; @@ -397,12 +397,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt ) { ScModule* pScMod = SC_MOD(); ScTabViewShell* pViewSh = pViewData->GetViewShell(); - BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); + sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); // ViewFrame erstmal aktivieren (Bug 19493): pViewSh->SetActive(); - USHORT nCmd = rCEvt.GetCommand(); + sal_uInt16 nCmd = rCEvt.GetCommand(); if ( nCmd == COMMAND_CONTEXTMENU ) { if (!bDisable) @@ -410,19 +410,19 @@ void ScTabControl::Command( const CommandEvent& rCEvt ) // #i18735# select the page that is under the mouse cursor // if multiple tables are selected and the one under the cursor // is not part of them then unselect them - USHORT nId = GetPageId( rCEvt.GetMousePosPixel() ); + sal_uInt16 nId = GetPageId( rCEvt.GetMousePosPixel() ); if (nId) { - BOOL bAlreadySelected = IsPageSelected( nId ); + sal_Bool bAlreadySelected = IsPageSelected( nId ); //make the clicked page the current one SetCurPageId( nId ); //change the selection when the current one is not already //selected or part of a multi selection if(!bAlreadySelected) { - USHORT nCount = GetMaxId(); + sal_uInt16 nCount = GetMaxId(); - for (USHORT i=1; i<=nCount; i++) + for (sal_uInt16 i=1; i<=nCount; i++) SelectPage( i, i==nId ); Select(); } @@ -441,12 +441,12 @@ void ScTabControl::Command( const CommandEvent& rCEvt ) void ScTabControl::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) { ScModule* pScMod = SC_MOD(); - BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); + sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); if (!bDisable) { Region aRegion( Rectangle(0,0,0,0) ); - CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, TRUE ); // needed for StartDrag + CommandEvent aCEvt( rPosPixel, COMMAND_STARTDRAG, sal_True ); // needed for StartDrag if (TabBar::StartDrag( aCEvt, aRegion )) DoDrag( aRegion ); } @@ -483,9 +483,9 @@ void ScTabControl::DoDrag( const Region& /* rRegion */ ) pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); } -USHORT lcl_DocShellNr( ScDocument* pDoc ) +sal_uInt16 lcl_DocShellNr( ScDocument* pDoc ) { - USHORT nShellCnt = 0; + sal_uInt16 nShellCnt = 0; SfxObjectShell* pShell = SfxObjectShell::GetFirst(); while ( pShell ) { @@ -529,7 +529,7 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt ) pViewData->GetView()->MoveTable( lcl_DocShellNr(pDoc), nPos, rEvt.mnAction != DND_ACTION_MOVE ); rData.pCellTransfer->SetDragWasInternal(); // don't delete - return TRUE; + return sal_True; } else Sound::Beep(); @@ -583,12 +583,12 @@ long ScTabControl::AllowRenaming() DBG_ASSERT( pViewSh, "pViewData->GetViewShell()" ); long nRet = TABBAR_RENAMING_CANCEL; - USHORT nId = GetEditPageId(); + sal_uInt16 nId = GetEditPageId(); if ( nId ) { SCTAB nTab = nId - 1; String aNewName = GetEditText(); - BOOL bDone = pViewSh->RenameTable( aNewName, nTab ); + sal_Bool bDone = pViewSh->RenameTable( aNewName, nTab ); if ( bDone ) nRet = TABBAR_RENAMING_YES; else if ( bErrorShown ) @@ -607,9 +607,9 @@ long ScTabControl::AllowRenaming() } else { - bErrorShown = TRUE; + bErrorShown = sal_True; pViewSh->ErrorMessage( STR_INVALIDTABNAME ); - bErrorShown = FALSE; + bErrorShown = sal_False; nRet = TABBAR_RENAMING_NO; } } diff --git a/sc/source/ui/view/tabsplit.cxx b/sc/source/ui/view/tabsplit.cxx index 657a85c0a..a681c3e87 100644 --- a/sc/source/ui/view/tabsplit.cxx +++ b/sc/source/ui/view/tabsplit.cxx @@ -44,8 +44,8 @@ ScTabSplitter::ScTabSplitter( Window* pParent, WinBits nWinStyle, ScViewData* pD Splitter( pParent, nWinStyle ), pViewData(pData) { - SetFixed(FALSE); - EnableRTL( FALSE ); + SetFixed(sal_False); + EnableRTL( sal_False ); } @@ -90,7 +90,7 @@ void __EXPORT ScTabSplitter::Splitting( Point& rSplitPos ) } -void ScTabSplitter::SetFixed(BOOL bSet) +void ScTabSplitter::SetFixed(sal_Bool bSet) { bFixed = bSet; if (bSet) diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 898c66d20..d186adede 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -220,14 +220,14 @@ using namespace ::com::sun::star; // Corner-Button -ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional ) : +ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional ) : Window( pParent, WinBits( 0 ) ), pViewData( pData ), bAdd( bAdditional ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetBackground( rStyleSettings.GetFaceColor() ); - EnableRTL( FALSE ); + EnableRTL( sal_False ); } __EXPORT ScCornerButton::~ScCornerButton() @@ -244,7 +244,7 @@ void __EXPORT ScCornerButton::Paint( const Rectangle& rRect ) Window::Paint(rRect); - BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); long nDarkX = bLayoutRTL ? 0 : nPosX; if ( !bAdd && !rStyleSettings.GetHighContrastMode() ) @@ -308,42 +308,42 @@ void __EXPORT ScCornerButton::Resize() void __EXPORT ScCornerButton::MouseButtonDown( const MouseEvent& rMEvt ) { ScModule* pScMod = SC_MOD(); - BOOL bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); + sal_Bool bDisable = pScMod->IsFormulaMode() || pScMod->IsModalMode(); if (!bDisable) { ScTabViewShell* pViewSh = pViewData->GetViewShell(); pViewSh->SetActive(); // Appear und SetViewFrame pViewSh->ActiveGrabFocus(); - BOOL bControl = rMEvt.IsMod1(); + sal_Bool bControl = rMEvt.IsMod1(); pViewSh->SelectAll( bControl ); } } //================================================================== -BOOL lcl_HasColOutline( const ScViewData& rViewData ) +sal_Bool lcl_HasColOutline( const ScViewData& rViewData ) { const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo()); if (pTable) { const ScOutlineArray* pArray = pTable->GetColArray(); if ( pArray->GetDepth() > 0 ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL lcl_HasRowOutline( const ScViewData& rViewData ) +sal_Bool lcl_HasRowOutline( const ScViewData& rViewData ) { const ScOutlineTable* pTable = rViewData.GetDocument()->GetOutlineTable(rViewData.GetTabNo()); if (pTable) { const ScOutlineArray* pArray = pTable->GetRowArray(); if ( pArray->GetDepth() > 0 ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //================================================================== @@ -358,34 +358,34 @@ BOOL lcl_HasRowOutline( const ScViewData& rViewData ) pHdrSelEng( NULL ), \ aHdrFunc( &aViewData ), \ pDrawView( NULL ), \ - bDrawSelMode( FALSE ), \ + bDrawSelMode( sal_False ), \ aVScrollTop( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \ aVScrollBottom( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ), \ aHScrollLeft( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \ aHScrollRight( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ), \ - aCornerButton( pFrameWin, &aViewData, FALSE ), \ - aTopButton( pFrameWin, &aViewData, TRUE ), \ + aCornerButton( pFrameWin, &aViewData, sal_False ), \ + aTopButton( pFrameWin, &aViewData, sal_True ), \ aScrollBarBox( pFrameWin, WB_SIZEABLE ), \ pInputHintWindow( NULL ), \ pPageBreakData( NULL ), \ pHighlightRanges( NULL ), \ pBrushDocument( NULL ), \ pDrawBrushSet( NULL ), \ - bLockPaintBrush( FALSE ), \ + bLockPaintBrush( sal_False ), \ pTimerWindow( NULL ), \ nTipVisible( 0 ), \ - bDragging( FALSE ), \ - bIsBlockMode( FALSE ), \ - bBlockNeg( FALSE ), \ - bBlockCols( FALSE ), \ - bBlockRows( FALSE ), \ + bDragging( sal_False ), \ + bIsBlockMode( sal_False ), \ + bBlockNeg( sal_False ), \ + bBlockCols( sal_False ), \ + bBlockRows( sal_False ), \ mfPendingTabBarWidth( -1.0 ), \ - bMinimized( FALSE ), \ - bInUpdateHeader( FALSE ), \ - bInActivatePart( FALSE ), \ - bInZoomUpdate( FALSE ), \ - bMoveIsShift( FALSE ), \ - bNewStartIfMarking( FALSE ) + bMinimized( sal_False ), \ + bInUpdateHeader( sal_False ), \ + bInActivatePart( sal_False ), \ + bInZoomUpdate( sal_False ), \ + bMoveIsShift( sal_False ), \ + bNewStartIfMarking( sal_False ) ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) : @@ -453,7 +453,7 @@ IMPL_LINK( ScTabView, TimerHdl, Timer*, EMPTYARG ) // --- Resize --------------------------------------------------------------------- void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize, - long nTotalWidth, BOOL bLayoutRTL ) + long nTotalWidth, sal_Bool bLayoutRTL ) { Point aNewPos = rPos; if ( bLayoutRTL ) @@ -469,36 +469,36 @@ void lcl_SetPosSize( Window& rWindow, const Point& rPos, const Size& rSize, rWindow.SetPosSizePixel( aNewPos, rSize ); } -void ScTabView::DoResize( const Point& rOffset, const Size& rSize, BOOL bInner ) +void ScTabView::DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner ) { HideListBox(); - BOOL bHasHint = ( pInputHintWindow != NULL ); + sal_Bool bHasHint = ( pInputHintWindow != NULL ); if (bHasHint) RemoveHintWindow(); - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); long nTotalWidth = rSize.Width(); if ( bLayoutRTL ) nTotalWidth += 2*rOffset.X(); - BOOL bVScroll = aViewData.IsVScrollMode(); - BOOL bHScroll = aViewData.IsHScrollMode(); - BOOL bTabControl = aViewData.IsTabMode(); - BOOL bHeaders = aViewData.IsHeaderMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bVScroll = aViewData.IsVScrollMode(); + sal_Bool bHScroll = aViewData.IsHScrollMode(); + sal_Bool bTabControl = aViewData.IsTabMode(); + sal_Bool bHeaders = aViewData.IsHeaderMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); if ( eMode == SCROLLING_NO ) - bHScroll = bVScroll = FALSE; + bHScroll = bVScroll = sal_False; else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScroll = bVScroll = TRUE; + bHScroll = bVScroll = sal_True; if ( aViewData.GetDocShell()->IsPreview() ) - bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = FALSE; + bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = bVOutline = sal_False; long nBarX = 0; long nBarY = 0; @@ -895,40 +895,40 @@ void ScTabView::UpdateVarZoom() SvxZoomType eZoomType = GetZoomType(); if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate ) { - bInZoomUpdate = TRUE; + bInZoomUpdate = sal_True; const Fraction& rOldX = GetViewData()->GetZoomX(); const Fraction& rOldY = GetViewData()->GetZoomY(); long nOldPercent = ( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator(); - USHORT nNewZoom = CalcZoom( eZoomType, (USHORT)nOldPercent ); + sal_uInt16 nNewZoom = CalcZoom( eZoomType, (sal_uInt16)nOldPercent ); Fraction aNew( nNewZoom, 100 ); if ( aNew != rOldX || aNew != rOldY ) { - SetZoom( aNew, aNew, FALSE ); // always separately per sheet + SetZoom( aNew, aNew, sal_False ); // always separately per sheet PaintGrid(); PaintTop(); PaintLeft(); aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM ); aViewData.GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER ); } - bInZoomUpdate = FALSE; + bInZoomUpdate = sal_False; } } void ScTabView::UpdateFixPos() { - BOOL bResize = FALSE; + sal_Bool bResize = sal_False; if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX ) if (aViewData.UpdateFixX()) - bResize = TRUE; + bResize = sal_True; if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX ) if (aViewData.UpdateFixY()) - bResize = TRUE; + bResize = sal_True; if (bResize) - RepeatResize(FALSE); + RepeatResize(sal_False); } -void ScTabView::RepeatResize( BOOL bUpdateFix ) +void ScTabView::RepeatResize( sal_Bool bUpdateFix ) { if ( bUpdateFix ) { @@ -954,12 +954,12 @@ void ScTabView::RepeatResize( BOOL bUpdateFix ) void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) { - BOOL bScrollBars = aViewData.IsVScrollMode(); - BOOL bHeaders = aViewData.IsHeaderMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bScrollBars = aViewData.IsVScrollMode(); + sal_Bool bHeaders = aViewData.IsHeaderMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); rBorder = SvBorder(); @@ -987,14 +987,14 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) IMPL_LINK( ScTabView, TabBarResize, void*, EMPTYARG ) { - BOOL bHScrollMode = aViewData.IsHScrollMode(); + sal_Bool bHScrollMode = aViewData.IsHScrollMode(); // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); if ( eMode == SCROLLING_NO ) - bHScrollMode = FALSE; + bHScrollMode = sal_False; else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScrollMode = TRUE; + bHScrollMode = sal_True; if( bHScrollMode ) { @@ -1076,7 +1076,7 @@ Window* ScTabView::GetWindowByPos( ScSplitPos ePos ) void ScTabView::SetActivePointer( const Pointer& rPointer ) { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetPointer( rPointer ); @@ -1124,7 +1124,7 @@ void ScTabView::ActiveGrabFocus() ScSplitPos ScTabView::FindWindow( Window* pWindow ) const { ScSplitPos eVal = SC_SPLIT_BOTTOMLEFT; // Default - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if ( pGridWin[i] == pWindow ) eVal = (ScSplitPos) i; @@ -1137,10 +1137,10 @@ Point ScTabView::GetGridOffset() const // Groessen hier wie in DoResize - BOOL bHeaders = aViewData.IsHeaderMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bHeaders = aViewData.IsHeaderMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); // Outline-Controls if (bVOutline && pRowOutline[SC_SPLIT_BOTTOM]) @@ -1161,11 +1161,11 @@ Point ScTabView::GetGridOffset() const // --- Scroll-Bars -------------------------------------------------------- -BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) +sal_Bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) { HideNoteMarker(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; const CommandWheelData* pData = rCEvt.GetWheelData(); if ( pData && pData->GetMode() == COMMAND_WHEEL_ZOOM ) { @@ -1186,7 +1186,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) { // scroll wheel doesn't set the AppOptions default - BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); + sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); Fraction aFract( nNew, 100 ); SetZoom( aFract, aFract, bSyncZoom ); @@ -1197,7 +1197,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) aViewData.GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER ); } - bDone = TRUE; + bDone = sal_True; } } else @@ -1214,7 +1214,7 @@ BOOL ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) { - BOOL bOnlineScroll = TRUE; //! Optionen + sal_Bool bOnlineScroll = sal_True; //! Optionen if ( bDragging ) { @@ -1230,7 +1230,7 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) if ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight ) { - BOOL bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL(); + sal_Bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL(); ScHSplitPos eWhich = (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT; long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich); if (nDelta) ScrollX( nDelta, eWhich ); @@ -1238,20 +1238,20 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) else // VScroll... { ScVSplitPos eWhich = (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM; - long nDelta = GetScrollBarPos( *pScroll, FALSE ) + nScrollMin - aViewData.GetPosY(eWhich); + long nDelta = GetScrollBarPos( *pScroll, sal_False ) + nScrollMin - aViewData.GetPosY(eWhich); if (nDelta) ScrollY( nDelta, eWhich ); } } - bDragging = FALSE; + bDragging = sal_False; } return 0; } IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) { - BOOL bOnlineScroll = TRUE; //! Optionen + sal_Bool bOnlineScroll = sal_True; //! Optionen - BOOL bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight ); + sal_Bool bHoriz = ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight ); long nViewPos; if ( bHoriz ) nViewPos = aViewData.GetPosX( (pScroll == &aHScrollLeft) ? @@ -1260,15 +1260,15 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) nViewPos = aViewData.GetPosY( (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM ); - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); - BOOL bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL()); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL()); ScrollType eType = pScroll->GetType(); if ( eType == SCROLL_DRAG ) { if (!bDragging) { - bDragging = TRUE; + bDragging = sal_True; nPrevDragPos = nViewPos; } @@ -1303,7 +1303,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) String aHelpStr; Rectangle aRect; - USHORT nAlign; + sal_uInt16 nAlign; if (bHoriz) { aHelpStr = ScGlobal::GetRscString(STR_COLUMN); @@ -1406,7 +1406,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) if (nDelta) { - BOOL bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern + sal_Bool bUpdate = ( eType != SCROLL_DRAG ); // bei Drag die Ranges nicht aendern if ( bHoriz ) ScrollX( nDelta, (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate ); else @@ -1417,9 +1417,9 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) return 0; } -void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars ) +void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars ) { - BOOL bHasHint = ( pInputHintWindow != NULL ); + sal_Bool bHasHint = ( pInputHintWindow != NULL ); if (bHasHint) RemoveHintWindow(); @@ -1506,9 +1506,9 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars ) TestHintWindow(); // neu positionieren } -void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars ) +void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars ) { - BOOL bHasHint = ( pInputHintWindow != NULL ); + sal_Bool bHasHint = ( pInputHintWindow != NULL ); if (bHasHint) RemoveHintWindow(); @@ -1666,7 +1666,7 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY if ( nWidth != pRowBar[SC_SPLIT_BOTTOM]->GetWidth() && !bInUpdateHeader ) { - bInUpdateHeader = TRUE; + bInUpdateHeader = sal_True; pRowBar[SC_SPLIT_BOTTOM]->SetWidth( nWidth ); if (pRowBar[SC_SPLIT_TOP]) @@ -1677,11 +1677,11 @@ void ScTabView::UpdateHeaderWidth( const ScVSplitPos* pWhich, const SCROW* pPosY // auf VCL gibt's Update ohne Ende (jedes Update gilt fuer alle Fenster) //aCornerButton.Update(); // der bekommt sonst nie ein Update - bInUpdateHeader = FALSE; + bInUpdateHeader = sal_False; } } -inline void ShowHide( Window* pWin, BOOL bShow ) +inline void ShowHide( Window* pWin, sal_Bool bShow ) { DBG_ASSERT(pWin || !bShow, "Fenster ist nicht da"); if (pWin) @@ -1690,26 +1690,26 @@ inline void ShowHide( Window* pWin, BOOL bShow ) void ScTabView::UpdateShow() { - BOOL bHScrollMode = aViewData.IsHScrollMode(); - BOOL bVScrollMode = aViewData.IsVScrollMode(); - BOOL bTabMode = aViewData.IsTabMode(); - BOOL bOutlMode = aViewData.IsOutlineMode(); - BOOL bHOutline = bOutlMode && lcl_HasColOutline(aViewData); - BOOL bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); - BOOL bHeader = aViewData.IsHeaderMode(); + sal_Bool bHScrollMode = aViewData.IsHScrollMode(); + sal_Bool bVScrollMode = aViewData.IsVScrollMode(); + sal_Bool bTabMode = aViewData.IsTabMode(); + sal_Bool bOutlMode = aViewData.IsOutlineMode(); + sal_Bool bHOutline = bOutlMode && lcl_HasColOutline(aViewData); + sal_Bool bVOutline = bOutlMode && lcl_HasRowOutline(aViewData); + sal_Bool bHeader = aViewData.IsHeaderMode(); - BOOL bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); - BOOL bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); + sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); + sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); // Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden: SfxScrollingMode eMode = aViewData.GetViewShell()->GetScrollingMode(); if ( eMode == SCROLLING_NO ) - bHScrollMode = bVScrollMode = FALSE; + bHScrollMode = bVScrollMode = sal_False; else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO ) //! Auto ??? - bHScrollMode = bVScrollMode = TRUE; + bHScrollMode = bVScrollMode = sal_True; if ( aViewData.GetDocShell()->IsPreview() ) - bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = FALSE; + bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = bHOutline = bVOutline = sal_False; // // Windows anlegen @@ -1791,7 +1791,7 @@ IMPL_LINK( ScTabView, SplitHdl, Splitter*, pSplitter ) DoVSplit( pVSplitter->GetSplitPosPixel() ); if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX || aViewData.GetVSplitMode() == SC_SPLIT_FIX ) - FreezeSplitters( TRUE ); + FreezeSplitters( sal_True ); DoResize( aBorderPos, aFrameSize ); @@ -1803,7 +1803,7 @@ void ScTabView::DoHSplit(long nSplitPos) // nSplitPos is the real pixel position on the frame window, // mirroring for RTL has to be done here. - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); if ( bLayoutRTL ) nSplitPos = pFrameWin->GetOutputSizePixel().Width() - nSplitPos - 1; @@ -1844,7 +1844,7 @@ void ScTabView::DoHSplit(long nSplitPos) long nLeftWidth = nSplitPos - pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width(); if ( nLeftWidth < 0 ) nLeftWidth = 0; nNewDelta = nOldDelta + aViewData.CellsAtX( nOldDelta, 1, SC_SPLIT_LEFT, - (USHORT) nLeftWidth ); + (sal_uInt16) nLeftWidth ); if ( nNewDelta > MAXCOL ) nNewDelta = MAXCOL; aViewData.SetPosX( SC_SPLIT_RIGHT, nNewDelta ); @@ -1858,7 +1858,7 @@ void ScTabView::DoHSplit(long nSplitPos) // #61410# Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); @@ -1916,7 +1916,7 @@ void ScTabView::DoVSplit(long nSplitPos) long nTopHeight = nSplitPos - pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height(); if ( nTopHeight < 0 ) nTopHeight = 0; nNewDelta = nOldDelta + aViewData.CellsAtY( nOldDelta, 1, SC_SPLIT_TOP, - (USHORT) nTopHeight ); + (sal_uInt16) nTopHeight ); if ( nNewDelta > MAXROW ) nNewDelta = MAXROW; aViewData.SetPosY( SC_SPLIT_BOTTOM, nNewDelta ); @@ -1930,7 +1930,7 @@ void ScTabView::DoVSplit(long nSplitPos) // #61410# Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); @@ -1986,7 +1986,7 @@ Point ScTabView::GetChartInsertPos( const Size& rSize, const ScRange& rCellRange ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); long nLayoutSign = bLayoutRTL ? -1 : 1; long nDocX = (long)( (double) pDoc->GetColOffset( MAXCOL + 1, nTab ) * HMM_PER_TWIPS ) * nLayoutSign; @@ -2104,7 +2104,7 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); bool bCenterHor = false; @@ -2163,13 +2163,13 @@ Point ScTabView::GetChartDialogPos( const Size& rDialogSize, const Rectangle& rL return aRet; } -void ScTabView::LockModifiers( USHORT nModifiers ) +void ScTabView::LockModifiers( sal_uInt16 nModifiers ) { pSelEngine->LockModifiers( nModifiers ); pHdrSelEng->LockModifiers( nModifiers ); } -USHORT ScTabView::GetLockedModifiers() const +sal_uInt16 ScTabView::GetLockedModifiers() const { return pSelEngine->GetLockedModifiers(); } @@ -2185,7 +2185,7 @@ Point ScTabView::GetMousePosPixel() return aPos; } -BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) +sal_Bool lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) { if (pWin) { @@ -2196,18 +2196,18 @@ BOOL lcl_MouseIsOverWin( const Point& rScreenPosPixel, Window* pWin ) Size aWinSize = pWin->GetOutputSizePixel(); if ( aRel.X() >= 0 && aRel.X() < aWinSize.Width() + SPLIT_HANDLE_SIZE && aRel.Y() >= 0 && aRel.Y() < aWinSize.Height() + SPLIT_HANDLE_SIZE ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ScTabView::SnapSplitPos( Point& rScreenPosPixel ) { - BOOL bOverWin = FALSE; - USHORT i; + sal_Bool bOverWin = sal_False; + sal_uInt16 i; for (i=0; i<4; i++) if (lcl_MouseIsOverWin(rScreenPosPixel,pGridWin[i])) - bOverWin = TRUE; + bOverWin = sal_True; if (!bOverWin) return; @@ -2231,19 +2231,19 @@ void ScTabView::SnapSplitPos( Point& rScreenPosPixel ) SCsCOL nPosX; SCsROW nPosY; // #52949# bNextIfLarge=FALSE: nicht auf naechste Zelle, wenn ausserhalb des Fensters - aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, TRUE, FALSE, FALSE ); - BOOL bLeft; - BOOL bTop; + aViewData.GetPosFromPixel( aMouse.X(), aMouse.Y(), ePos, nPosX, nPosY, sal_True, sal_False, sal_False ); + sal_Bool bLeft; + sal_Bool bTop; aViewData.GetMouseQuadrant( aMouse, ePos, nPosX, nPosY, bLeft, bTop ); if (!bLeft) ++nPosX; if (!bTop) ++nPosY; - aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE ); + aMouse = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True ); rScreenPosPixel = pWin->OutputToNormalizedScreenPixel( aMouse ); } -void ScTabView::FreezeSplitters( BOOL bFreeze ) +void ScTabView::FreezeSplitters( sal_Bool bFreeze ) { ScSplitMode eOldH = aViewData.GetHSplitMode(); ScSplitMode eOldV = aViewData.GetVSplitMode(); @@ -2253,7 +2253,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) ePos = SC_SPLIT_TOPLEFT; Window* pWin = pGridWin[ePos]; - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); if ( bFreeze ) { @@ -2275,8 +2275,8 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) aSplit.Y() = aViewData.GetVSplitPos() - aWinStart.Y(); aViewData.GetPosFromPixel( aSplit.X(), aSplit.Y(), ePos, nPosX, nPosY ); - BOOL bLeft; - BOOL bTop; + sal_Bool bLeft; + sal_Bool bTop; aViewData.GetMouseQuadrant( aSplit, ePos, nPosX, nPosY, bLeft, bTop ); if (!bLeft) ++nPosX; @@ -2303,7 +2303,7 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) nBottomPos = aViewData.GetPosY(SC_SPLIT_BOTTOM); } - aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, TRUE ); + aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, sal_True ); if (nPosX > aViewData.GetPosX(SC_SPLIT_LEFT)) // (aSplit.X() > 0) doesn't work for RTL { long nSplitPos = aSplit.X() + aWinStart.X(); @@ -2341,12 +2341,12 @@ void ScTabView::FreezeSplitters( BOOL bFreeze ) // #61410# Form-Layer muss den sichtbaren Ausschnitt aller Fenster kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); - RepeatResize(FALSE); + RepeatResize(sal_False); UpdateShow(); PaintLeft(); @@ -2377,7 +2377,7 @@ void ScTabView::SplitAtCursor() SCCOL nPosX = aViewData.GetCurX(); SCROW nPosY = aViewData.GetCurY(); - Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, TRUE ); + Point aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, sal_True ); if ( nPosX > 0 ) DoHSplit( aSplit.X() + aWinStart.X() ); else @@ -2389,7 +2389,7 @@ void ScTabView::SplitAtCursor() RepeatResize(); } -void ScTabView::SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer ) // fuer API +void ScTabView::SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer ) // fuer API { // Pixel ist auf die ganze View bezogen, nicht auf das erste GridWin @@ -2426,7 +2426,7 @@ void ScTabView::SetNewVisArea() // (auch wenn ansonsten der Edit-MapMode gesetzt ist) MapMode aOldMode[4]; MapMode aDrawMode[4]; - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if (pGridWin[i]) { @@ -2501,11 +2501,11 @@ void ScTabView::StartDataSelect() pWin->LaunchDPFieldMenu( nCol, nRow ); break; default: - pWin->DoAutoFilterMenue( nCol, nRow, TRUE ); + pWin->DoAutoFilterMenue( nCol, nRow, sal_True ); } } -void ScTabView::EnableRefInput(BOOL bFlag) +void ScTabView::EnableRefInput(sal_Bool bFlag) { aHScrollLeft.EnableInput(bFlag); aHScrollRight.EnableInput(bFlag); @@ -2515,20 +2515,20 @@ void ScTabView::EnableRefInput(BOOL bFlag) // ab hier dynamisch angelegte - if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,TRUE); + if(pTabControl!=NULL) pTabControl->EnableInput(bFlag,sal_True); if(pGridWin[SC_SPLIT_BOTTOMLEFT]!=NULL) - pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_BOTTOMLEFT]->EnableInput(bFlag,sal_False); if(pGridWin[SC_SPLIT_BOTTOMRIGHT]!=NULL) - pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_BOTTOMRIGHT]->EnableInput(bFlag,sal_False); if(pGridWin[SC_SPLIT_TOPLEFT]!=NULL) - pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_TOPLEFT]->EnableInput(bFlag,sal_False); if(pGridWin[SC_SPLIT_TOPRIGHT]!=NULL) - pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,FALSE); + pGridWin[SC_SPLIT_TOPRIGHT]->EnableInput(bFlag,sal_False); if(pColBar[SC_SPLIT_RIGHT]!=NULL) - pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,FALSE); + pColBar[SC_SPLIT_RIGHT]->EnableInput(bFlag,sal_False); if(pRowBar[SC_SPLIT_TOP]!=NULL) - pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,FALSE); + pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,sal_False); } diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 27c0f7d75..c6475c8dc 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -77,8 +77,8 @@ void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO if (!ValidCol(nEndCol)) nEndCol = MAXCOL; if (!ValidRow(nEndRow)) nEndRow = MAXROW; - BOOL bLeft = (nStartCol==0 && nEndCol==MAXCOL); - BOOL bTop = (nStartRow==0 && nEndRow==MAXROW); + sal_Bool bLeft = (nStartCol==0 && nEndCol==MAXCOL); + sal_Bool bTop = (nStartRow==0 && nEndRow==MAXROW); if (bLeft) PaintLeftArea( nStartRow, nEndRow ); @@ -90,7 +90,7 @@ void ScTabView::PaintMarks(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO PaintArea( nStartCol, nStartRow, nEndCol, nEndRow, SC_UPDATE_MARKS ); } -BOOL ScTabView::IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const +sal_Bool ScTabView::IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const { return bIsBlockMode && nBlockStartX == nCol @@ -106,9 +106,9 @@ void ScTabView::InitOwnBlockMode() ScMarkData& rMark = aViewData.GetMarkData(); if (!rMark.IsMarked() && !rMark.IsMultiMarked()) - GetSelEngine()->CursorPosChanging( FALSE, FALSE ); + GetSelEngine()->CursorPosChanging( sal_False, sal_False ); -// bIsBlockMode = TRUE; +// bIsBlockMode = sal_True; bIsBlockMode = SC_BLOCKMODE_OWN; //! Variable umbenennen! nBlockStartX = 0; nBlockStartY = 0; @@ -122,7 +122,7 @@ void ScTabView::InitOwnBlockMode() } void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - BOOL bTestNeg, BOOL bCols, BOOL bRows ) + sal_Bool bTestNeg, sal_Bool bCols, sal_Bool bRows ) { if (!bIsBlockMode) { @@ -143,10 +143,10 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bBlockNeg = rMark.IsCellMarked( nCurX, nCurY ); } else - bBlockNeg = FALSE; + bBlockNeg = sal_False; rMark.SetMarkNegative(bBlockNeg); -// bIsBlockMode = TRUE; +// bIsBlockMode = sal_True; bIsBlockMode = SC_BLOCKMODE_NORMAL; //! Variable umbenennen! bBlockCols = bCols; bBlockRows = bRows; @@ -176,16 +176,16 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, #endif UpdateSelectionOverlay(); - bNewStartIfMarking = FALSE; // use only once + bNewStartIfMarking = sal_False; // use only once } } void ScTabView::SetNewStartIfMarking() { - bNewStartIfMarking = TRUE; + bNewStartIfMarking = sal_True; } -void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE +void ScTabView::DoneBlockMode( sal_Bool bContinue ) // Default FALSE { // Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird, // wird evtl. DeselectAll gerufen, weil die andere Engine keinen Anker hat. @@ -194,8 +194,8 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE if (bIsBlockMode && !bMoveIsShift) { ScMarkData& rMark = aViewData.GetMarkData(); - BOOL bFlag = rMark.GetMarkingFlag(); - rMark.SetMarking(FALSE); + sal_Bool bFlag = rMark.GetMarkingFlag(); + rMark.SetMarking(sal_False); if (bBlockNeg && !bContinue) rMark.MarkToMulti(); @@ -211,20 +211,20 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE SCTAB nTab = aViewData.GetTabNo(); ScDocument* pDoc = aViewData.GetDocument(); if ( pDoc->HasTable(nTab) ) - PaintBlock( TRUE ); // TRUE -> Block loeschen + PaintBlock( sal_True ); // sal_True -> Block loeschen else rMark.ResetMark(); } -// bIsBlockMode = FALSE; +// bIsBlockMode = sal_False; bIsBlockMode = SC_BLOCKMODE_NONE; //! Variable umbenennen! rMark.SetMarking(bFlag); - rMark.SetMarkNegative(FALSE); + rMark.SetMarkNegative(sal_False); } } void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - BOOL bCols, BOOL bRows, BOOL bCellSelection ) + sal_Bool bCols, sal_Bool bRows, sal_Bool bCellSelection ) { if (!ValidCol(nCurX)) nCurX = MAXCOL; if (!ValidRow(nCurY)) nCurY = MAXROW; @@ -232,7 +232,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, if (!bIsBlockMode) { DBG_ERROR( "MarkCursor nicht im BlockMode" ); - InitBlockMode( nCurX, nCurY, nCurZ, FALSE, bCols, bRows ); + InitBlockMode( nCurX, nCurY, nCurZ, sal_False, bCols, bRows ); } if (bCols) @@ -252,9 +252,9 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, // (z.B. MarkToSimple, wenn per negativ alles bis auf ein Rechteck geloescht wurde) // oder nach InitOwnBlockMode wird mit Shift-Klick weitermarkiert... - BOOL bOldShift = bMoveIsShift; - bMoveIsShift = FALSE; // wirklich umsetzen - DoneBlockMode(FALSE); //! direkt Variablen setzen? (-> kein Geflacker) + sal_Bool bOldShift = bMoveIsShift; + bMoveIsShift = sal_False; // wirklich umsetzen + DoneBlockMode(sal_False); //! direkt Variablen setzen? (-> kein Geflacker) bMoveIsShift = bOldShift; InitBlockMode( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(), @@ -288,7 +288,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, SCsCOL nBlockStartXOffset = 0; SCsROW nCurYOffset = 0; SCsROW nBlockStartYOffset = 0; - BOOL bBlockStartMerged = FALSE; + sal_Bool bBlockStartMerged = sal_False; const ScMergeAttr* pMergeAttr = NULL; ScDocument* pDocument = aViewData.GetDocument(); @@ -314,7 +314,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nBlockStartXOrig - nCurX + nColSpan - 1 : 0; nCurYOffset = nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1 ? nBlockStartYOrig - nCurY + nRowSpan - 1 : 0; - bBlockStartMerged = TRUE; + bBlockStartMerged = sal_True; } } @@ -380,8 +380,8 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, rMark.SetMarkArea( ScRange( nBlockStartX, nBlockStartY, nTab, nBlockEndX, nBlockEndY, nTab ) ); #ifdef OLD_SELECTION_PAINT - BOOL bCont; - BOOL bDraw = aRect.GetXorDiff( nDrawStartCol, nDrawStartRow, + sal_Bool bCont; + sal_Bool bDraw = aRect.GetXorDiff( nDrawStartCol, nDrawStartRow, nDrawEndCol, nDrawEndRow, bCont ); if ( bDraw ) { @@ -408,26 +408,26 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, } if ( !bCols && !bRows ) - aHdrFunc.SetAnchorFlag( FALSE ); + aHdrFunc.SetAnchorFlag( sal_False ); } void ScTabView::UpdateSelectionOverlay() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) pGridWin[i]->UpdateSelectionOverlay(); } void ScTabView::UpdateShrinkOverlay() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) pGridWin[i]->UpdateShrinkOverlay(); } void ScTabView::UpdateAllOverlays() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) pGridWin[i]->UpdateAllOverlays(); } @@ -436,21 +436,21 @@ void ScTabView::UpdateAllOverlays() //! PaintBlock in zwei Methoden aufteilen: RepaintBlock und RemoveBlock o.ae. //! -void ScTabView::PaintBlock( BOOL bReset ) +void ScTabView::PaintBlock( sal_Bool bReset ) { ScDocument* pDoc = aViewData.GetDocument(); ScMarkData& rMark = aViewData.GetMarkData(); SCTAB nTab = aViewData.GetTabNo(); - BOOL bMark = rMark.IsMarked(); - BOOL bMulti = rMark.IsMultiMarked(); + sal_Bool bMark = rMark.IsMarked(); + sal_Bool bMulti = rMark.IsMultiMarked(); if (bMark || bMulti) { ScRange aMarkRange; HideAllCursors(); if (bMulti) { - BOOL bFlag = rMark.GetMarkingFlag(); - rMark.SetMarking(FALSE); + sal_Bool bFlag = rMark.GetMarkingFlag(); + rMark.SetMarking(sal_False); rMark.MarkToMulti(); rMark.GetMultiMarkArea(aMarkRange); rMark.MarkToSimple(); @@ -469,7 +469,7 @@ void ScTabView::PaintBlock( BOOL bReset ) nBlockEndY = aMarkRange.aEnd.Row(); nBlockEndZ = aMarkRange.aEnd.Tab(); - BOOL bDidReset = FALSE; + sal_Bool bDidReset = sal_False; if ( nTab>=nBlockStartZ && nTab<=nBlockEndZ ) { @@ -478,7 +478,7 @@ void ScTabView::PaintBlock( BOOL bReset ) // Invertieren beim Loeschen nur auf aktiver View if ( aViewData.IsActive() ) { - USHORT i; + sal_uInt16 i; if ( bMulti ) { #ifdef OLD_SELECTION_PAINT @@ -486,11 +486,11 @@ void ScTabView::PaintBlock( BOOL bReset ) if (pGridWin[i] && pGridWin[i]->IsVisible()) pGridWin[i]->InvertSimple( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY, - TRUE, TRUE ); + sal_True, sal_True ); #endif rMark.ResetMark(); UpdateSelectionOverlay(); - bDidReset = TRUE; + bDidReset = sal_True; } else { @@ -500,8 +500,8 @@ void ScTabView::PaintBlock( BOOL bReset ) // and convert everything to Multi rMark.MarkToMulti(); - BOOL bOld = bBlockNeg; - bBlockNeg = TRUE; + sal_Bool bOld = bBlockNeg; + bBlockNeg = sal_True; // #73130# (negative) MarkArea must be set in case of repaint rMark.SetMarkArea( ScRange( nBlockStartX,nBlockStartY, nTab, nBlockEndX,nBlockEndY, nTab ) ); @@ -512,7 +512,7 @@ void ScTabView::PaintBlock( BOOL bReset ) #endif rMark.ResetMark(); UpdateSelectionOverlay(); - bDidReset = TRUE; + bDidReset = sal_True; } // repaint if controls are touched (#69680# in both cases) @@ -548,7 +548,7 @@ void ScTabView::PaintBlock( BOOL bReset ) } } -void ScTabView::SelectAll( BOOL bContinue ) +void ScTabView::SelectAll( sal_Bool bContinue ) { ScMarkData& rMark = aViewData.GetMarkData(); SCTAB nTab = aViewData.GetTabNo(); @@ -578,7 +578,7 @@ void ScTabView::SelectAllTables() if (nCount>1) { for (SCTAB i=0; i<nCount; i++) - rMark.SelectTable( i, TRUE ); + rMark.SelectTable( i, sal_True ); // Markierungen werden per Default nicht pro Tabelle gehalten // pDoc->ExtendMarksFromTable( nTab ); @@ -606,7 +606,7 @@ void ScTabView::DeselectAllTables() rBind.Invalidate( FID_TAB_DESELECTALL ); } -BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom, +sal_Bool lcl_FitsInWindow( double fScaleX, double fScaleY, sal_uInt16 nZoom, long nWindowX, long nWindowY, ScDocument* pDoc, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCCOL nFixPosX, SCROW nFixPosY ) @@ -620,22 +620,22 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom, for (nCol=0; nCol<nFixPosX; nCol++) { // for frozen panes, add both parts - USHORT nColTwips = pDoc->GetColWidth( nCol, nTab ); + sal_uInt16 nColTwips = pDoc->GetColWidth( nCol, nTab ); if (nColTwips) { nBlockX += (long)(nColTwips * fScaleX); if (nBlockX > nWindowX) - return FALSE; + return sal_False; } } for (nCol=nStartCol; nCol<=nEndCol; nCol++) { - USHORT nColTwips = pDoc->GetColWidth( nCol, nTab ); + sal_uInt16 nColTwips = pDoc->GetColWidth( nCol, nTab ); if (nColTwips) { nBlockX += (long)(nColTwips * fScaleX); if (nBlockX > nWindowX) - return FALSE; + return sal_False; } } @@ -646,31 +646,31 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom, continue; // for frozen panes, add both parts - USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab); + sal_uInt16 nRowTwips = pDoc->GetRowHeight(nRow, nTab); if (nRowTwips) { nBlockY += (long)(nRowTwips * fScaleY); if (nBlockY > nWindowY) - return FALSE; + return sal_False; } } for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow) { - USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab); + sal_uInt16 nRowTwips = pDoc->GetRowHeight(nRow, nTab); if (nRowTwips) { nBlockY += (long)(nRowTwips * fScaleY); if (nBlockY > nWindowY) - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } -USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) +sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom ) { - USHORT nZoom = 0; // Ergebnis + sal_uInt16 nZoom = 0; // Ergebnis switch ( eType ) { @@ -741,11 +741,11 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) double nPPTX = ScGlobal::nScreenPPTX / pDocSh->GetOutputFactor(); double nPPTY = ScGlobal::nScreenPPTY; - USHORT nMin = MINZOOM; - USHORT nMax = MAXZOOM; + sal_uInt16 nMin = MINZOOM; + sal_uInt16 nMax = MAXZOOM; while ( nMax > nMin ) { - USHORT nTest = (nMin+nMax+1)/2; + sal_uInt16 nTest = (nMin+nMax+1)/2; if ( lcl_FitsInWindow( nPPTX, nPPTY, nTest, aWinSize.Width(), aWinSize.Height(), pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow, @@ -787,7 +787,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) if ( pStyleSheet ) { ScPrintFunc aPrintFunc( aViewData.GetDocShell(), - aViewData.GetViewShell()->GetPrinter(TRUE), + aViewData.GetViewShell()->GetPrinter(sal_True), nCurTab ); Size aPageSize = aPrintFunc.GetDataSize(); @@ -843,7 +843,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) if (eType == SVX_ZOOM_WHOLEPAGE && nZoomY < nNew) nNew = nZoomY; - nZoom = (USHORT) nNew; + nZoom = (sal_uInt16) nNew; } } break; @@ -875,7 +875,7 @@ void ScTabView::StopMarking() void ScTabView::HideNoteMarker() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i] && pGridWin[i]->IsVisible()) pGridWin[i]->HideNoteMarker(); } @@ -900,7 +900,7 @@ void ScTabView::MakeDrawLayer() } } -void ScTabView::ErrorMessage( USHORT nGlobStrId ) +void ScTabView::ErrorMessage( sal_uInt16 nGlobStrId ) { if ( SC_MOD()->IsInExecuteDrop() ) { @@ -912,7 +912,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId ) Window* pParent = aViewData.GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); - BOOL bFocus = pParent && pParent->HasFocus(); + sal_Bool bFocus = pParent && pParent->HasFocus(); if(nGlobStrId==STR_PROTECTIONERR) { @@ -928,7 +928,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId ) pParent->GrabFocus(); } -Window* ScTabView::GetParentOrChild( USHORT nChildId ) +Window* ScTabView::GetParentOrChild( sal_uInt16 nChildId ) { SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame(); @@ -946,7 +946,7 @@ Window* ScTabView::GetParentOrChild( USHORT nChildId ) return aViewData.GetDialogParent(); } -void ScTabView::UpdatePageBreakData( BOOL bForcePaint ) +void ScTabView::UpdatePageBreakData( sal_Bool bForcePaint ) { ScPageBreakData* pNewData = NULL; @@ -956,7 +956,7 @@ void ScTabView::UpdatePageBreakData( BOOL bForcePaint ) ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - USHORT nCount = pDoc->GetPrintRangeCount(nTab); + sal_uInt16 nCount = pDoc->GetPrintRangeCount(nTab); if (!nCount) nCount = 1; pNewData = new ScPageBreakData(nCount); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 0f3778449..a9319bb0e 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -114,7 +114,7 @@ using namespace com::sun::star; // --- Public-Funktionen // -void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl ) +void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl ) { ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -123,11 +123,11 @@ void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl ) while (pDoc->IsVerOverlapped( nPosX, nPosY, nTab )) --nPosY; - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if ( bRefMode ) { - DoneRefMode( FALSE ); + DoneRefMode( sal_False ); if (bControl) SC_MOD()->AddRefEntry(); @@ -146,9 +146,9 @@ void ScTabView::UpdateAutoFillMark() { // single selection or cursor ScRange aMarkRange; - BOOL bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE); + sal_Bool bMarked = (aViewData.GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE); - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if (pGridWin[i] && pGridWin[i]->IsVisible()) pGridWin[i]->UpdateAutoFillMark( bMarked, aMarkRange ); @@ -174,7 +174,7 @@ void ScTabView::FakeButtonUp( ScSplitPos eWhich ) void ScTabView::HideAllCursors() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) if (pGridWin[i]->IsVisible()) { @@ -188,7 +188,7 @@ void ScTabView::HideAllCursors() void ScTabView::ShowAllCursors() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) if (pGridWin[i]->IsVisible()) { @@ -276,7 +276,7 @@ void ScTabView::InvalidateAttribs() #pragma optimize ( "", off ) #endif -void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew ) +void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew ) { SCCOL nOldX = aViewData.GetCurX(); SCROW nOldY = aViewData.GetCurY(); @@ -452,7 +452,7 @@ void ScTabView::SelectionChanged() void ScTabView::CursorPosChanged() { - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert aViewData.GetDocShell()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) ); @@ -474,7 +474,7 @@ void ScTabView::TestHintWindow() { // show input help window and list drop-down button for validity - BOOL bListValButton = FALSE; + sal_Bool bListValButton = sal_False; ScAddress aListValPos; ScDocument* pDoc = aViewData.GetDocument(); @@ -556,13 +556,13 @@ void ScTabView::TestHintWindow() if ( pData && pData->HasSelectionList() ) { aListValPos.Set( aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() ); - bListValButton = TRUE; + bListValButton = sal_True; } } else DELETEZ(pInputHintWindow); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) pGridWin[i]->UpdateListValPos( bListValButton, aListValPos ); } @@ -619,8 +619,8 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, ScSplitPos eActive = aViewData.GetActivePart(); ScHSplitPos eActiveX = WhichH(eActive); ScVSplitPos eActiveY = WhichV(eActive); - BOOL bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX); - BOOL bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX); + sal_Bool bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX); + sal_Bool bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX); if (bHFix) if (eActiveX == SC_SPLIT_LEFT && nCurX >= (SCsCOL)aViewData.GetFixPosX()) { @@ -664,7 +664,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, long nSpaceY = ( aScrSize.Height() - nCellSizeY ) / 2; // nSpaceY: desired start position of cell for FOLLOW_JUMP, modified if dialog interferes - BOOL bForceNew = FALSE; // force new calculation of JUMP position (vertical only) + sal_Bool bForceNew = sal_False; // force new calculation of JUMP position (vertical only) // VisibleCellsY == CellsAtY( GetPosY( eWhichY ), 1, eWhichY ) @@ -679,7 +679,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, Window* pCare = lcl_GetCareWin( aViewData.GetViewShell()->GetViewFrame() ); if (pCare) { - BOOL bLimit = FALSE; + sal_Bool bLimit = sal_False; Rectangle aDlgPixel; Size aWinSize; Window* pWin = GetActiveWin(); @@ -692,7 +692,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, { if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX || nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY ) - bLimit = TRUE; // es wird sowieso gescrollt + bLimit = sal_True; // es wird sowieso gescrollt else { // Cursor ist auf dem Bildschirm @@ -701,14 +701,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, aViewData.GetMergeSizePixel( nCurX, nCurY, nCSX, nCSY ); Rectangle aCursor( aStart, Size( nCSX, nCSY ) ); if ( aCursor.IsOver( aDlgPixel ) ) - bLimit = TRUE; // Zelle vom Dialog ueberdeckt + bLimit = sal_True; // Zelle vom Dialog ueberdeckt } } } if (bLimit) { - BOOL bBottom = FALSE; + sal_Bool bBottom = sal_False; long nTopSpace = aDlgPixel.Top(); long nBotSpace = aWinSize.Height() - aDlgPixel.Bottom(); if ( nBotSpace > 0 && nBotSpace > nTopSpace ) @@ -723,14 +723,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, if ( nCurY >= nDiff ) // Pos. kann nicht negativ werden { nSpaceY = nDlgBot + ( nBotSpace - nCellSizeY ) / 2; - bBottom = TRUE; - bForceNew = TRUE; + bBottom = sal_True; + bForceNew = sal_True; } } if ( !bBottom && nTopSpace > 0 ) { nSpaceY = ( nTopSpace - nCellSizeY ) / 2; - bForceNew = TRUE; + bForceNew = sal_True; } } } @@ -739,28 +739,28 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, SCsCOL nNewDeltaX = nDeltaX; SCsROW nNewDeltaY = nDeltaY; - BOOL bDoLine = FALSE; + sal_Bool bDoLine = sal_False; switch (eMode) { case SC_FOLLOW_JUMP: if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX ) { - nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<USHORT>(nSpaceX) )); + nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<sal_uInt16>(nSpaceX) )); if (nNewDeltaX < 0) nNewDeltaX = 0; nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX ); } if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY || bForceNew ) { - nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<USHORT>(nSpaceY) )); + nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<sal_uInt16>(nSpaceY) )); if (nNewDeltaY < 0) nNewDeltaY = 0; nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY ); } - bDoLine = TRUE; + bDoLine = sal_True; break; case SC_FOLLOW_LINE: - bDoLine = TRUE; + bDoLine = sal_True; break; case SC_FOLLOW_FIX: @@ -790,7 +790,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY ); } - bDoLine = TRUE; + bDoLine = sal_True; break; case SC_FOLLOW_NONE: @@ -856,22 +856,22 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, } } -BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt ) +sal_Bool ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; // #i3875# *Hack* - BOOL bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? TRUE : FALSE; + sal_Bool bMod1Locked = aViewData.GetViewShell()->GetLockedModifiers() & KEY_MOD1 ? sal_True : sal_False; aViewData.SetSelCtrlMouseClick( rMEvt.IsMod1() || bMod1Locked ); if ( pSelEngine ) { bMoveIsShift = rMEvt.IsShift(); bRet = pSelEngine->SelMouseButtonDown( rMEvt ); - bMoveIsShift = FALSE; + bMoveIsShift = sal_False; } - aViewData.SetSelCtrlMouseClick( FALSE ); // #i3875# *Hack* + aViewData.SetSelCtrlMouseClick( sal_False ); // #i3875# *Hack* return bRet; } @@ -881,7 +881,7 @@ BOOL ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt ) // void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, - BOOL bShift, BOOL bControl, BOOL bKeepOld, BOOL bKeepSel ) + sal_Bool bShift, sal_Bool bControl, sal_Bool bKeepOld, sal_Bool bKeepSel ) { if (!bKeepOld) aViewData.ResetOldCursor(); @@ -896,8 +896,8 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, if ( bShift && bNewStartIfMarking && IsBlockMode() ) { // used for ADD selection mode: start a new block from the cursor position - DoneBlockMode( TRUE ); - InitBlockMode( aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo(), TRUE ); + DoneBlockMode( sal_True ); + InitBlockMode( aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo(), sal_True ); } // aktiven Teil umschalten jetzt in AlignToCursor @@ -909,11 +909,11 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, SetCursor( nCurX, nCurY ); // Markierung stehenlassen else { - BOOL bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() ); + sal_Bool bSame = ( nCurX == aViewData.GetCurX() && nCurY == aViewData.GetCurY() ); bMoveIsShift = bShift; pSelEngine->CursorPosChanging( bShift, bControl ); - bMoveIsShift = FALSE; - aFunctionSet.SetCursorAtCell( nCurX, nCurY, FALSE ); + bMoveIsShift = sal_False; + aFunctionSet.SetCursorAtCell( nCurX, nCurY, sal_False ); // Wenn der Cursor nicht bewegt wurde, muss das SelectionChanged fuer das // Aufheben der Selektion hier einzeln passieren: @@ -925,7 +925,7 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode, } void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, - BOOL bShift, BOOL bKeepSel ) + sal_Bool bShift, sal_Bool bKeepSel ) { ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -960,12 +960,12 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, nCurY = (nMovY != 0) ? nOldY+nMovY : (SCsROW) aViewData.GetOldCurY(); } - BOOL bSkipCell = FALSE; + sal_Bool bSkipCell = sal_False; aViewData.ResetOldCursor(); if (nMovX != 0 && VALIDCOLROW(nCurX,nCurY)) { - BOOL bHFlip = FALSE; + sal_Bool bHFlip = sal_False; do { SCCOL nLastCol = -1; @@ -982,13 +982,13 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, if (bHFlip) { nCurX = nOldX; - bSkipCell = FALSE; + bSkipCell = sal_False; } else { nMovX = -nMovX; if (nMovX > 0) ++nCurX; else --nCurX; // zuruecknehmen - bHFlip = TRUE; + bHFlip = sal_True; } } else @@ -1007,7 +1007,7 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, if (nMovY != 0 && VALIDCOLROW(nCurX,nCurY)) { - BOOL bVFlip = FALSE; + sal_Bool bVFlip = sal_False; do { SCROW nLastRow = -1; @@ -1024,13 +1024,13 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, if (bVFlip) { nCurY = nOldY; - bSkipCell = FALSE; + bSkipCell = sal_False; } else { nMovY = -nMovY; if (nMovY > 0) ++nCurY; else --nCurY; // zuruecknehmen - bVFlip = TRUE; + bVFlip = sal_True; } } else @@ -1047,10 +1047,10 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, } } - MoveCursorAbs( nCurX, nCurY, eMode, bShift, FALSE, TRUE, bKeepSel ); + MoveCursorAbs( nCurX, nCurY, eMode, bShift, sal_False, sal_True, bKeepSel ); } -void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel ) +void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel ) { SCCOL nCurX; SCROW nCurY; @@ -1078,7 +1078,7 @@ void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, MoveCursorRel( nPageX, nPageY, eMode, bShift, bKeepSel ); } -void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel ) +void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel ) { SCCOL nCurX; SCROW nCurY; @@ -1116,7 +1116,7 @@ void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, eMode, bShift, bKeepSel ); } -void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift, BOOL bKeepSel ) +void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift, sal_Bool bKeepSel ) { ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -1146,7 +1146,7 @@ void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, B MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, eMode, bShift, bKeepSel ); } -void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift ) +void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift ) { ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -1186,15 +1186,15 @@ void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode while (pDoc->IsVerOverlapped( nNewX, nNewY, nTab )) --nNewY; - MoveCursorAbs( nNewX, nNewY, eMode, bShift, FALSE, TRUE ); + MoveCursorAbs( nNewX, nNewY, eMode, bShift, sal_False, sal_True ); } -void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter +void ScTabView::MoveCursorEnter( sal_Bool bShift ) // bShift -> hoch/runter { const ScInputOptions& rOpt = SC_MOD()->GetInputOptions(); if (!rOpt.GetMoveSelection()) { - aViewData.UpdateInputHandler(TRUE); + aViewData.UpdateInputHandler(sal_True); return; } @@ -1227,14 +1227,14 @@ void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter SCTAB nTab = aViewData.GetTabNo(); ScDocument* pDoc = aViewData.GetDocument(); - pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, TRUE,FALSE, rMark ); + pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, sal_True,sal_False, rMark ); MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, - SC_FOLLOW_LINE, FALSE, TRUE ); + SC_FOLLOW_LINE, sal_False, sal_True ); // update input line even if cursor was not moved if ( nNewX == nCurX && nNewY == nCurY ) - aViewData.UpdateInputHandler(TRUE); + aViewData.UpdateInputHandler(sal_True); } else { @@ -1251,12 +1251,12 @@ void ScTabView::MoveCursorEnter( BOOL bShift ) // bShift -> hoch/runter } } - MoveCursorRel( nMoveX,nMoveY, SC_FOLLOW_LINE, FALSE ); + MoveCursorRel( nMoveX,nMoveY, SC_FOLLOW_LINE, sal_False ); } } -BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) +sal_Bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) { const KeyCode& rKCode = rKeyEvent.GetKeyCode(); @@ -1265,8 +1265,8 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) (rKCode.IsMod2() ? MOD_BOTH : MOD_CTRL) : (rKCode.IsMod2() ? MOD_ALT : MOD_NONE); - BOOL bSel = rKCode.IsShift(); - USHORT nCode = rKCode.GetCode(); + sal_Bool bSel = rKCode.IsShift(); + sal_uInt16 nCode = rKCode.GetCode(); // CURSOR keys SCsCOL nDX = 0; @@ -1289,8 +1289,8 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) // added to avoid warnings } } - // always TRUE to suppress changes of col/row size (ALT+CURSOR) - return TRUE; + // always sal_True to suppress changes of col/row size (ALT+CURSOR) + return sal_True; } // PAGEUP/PAGEDOWN @@ -1307,7 +1307,7 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) // added to avoid warnings } } - return TRUE; + return sal_True; } // HOME/END @@ -1324,20 +1324,20 @@ BOOL ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent ) // added to avoid warnings } } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // naechste/vorherige nicht geschuetzte Zelle -void ScTabView::FindNextUnprot( BOOL bShift, BOOL bInSelection ) +void ScTabView::FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection ) { short nMove = bShift ? -1 : 1; ScMarkData& rMark = aViewData.GetMarkData(); - BOOL bMarked = bInSelection && (rMark.IsMarked() || rMark.IsMultiMarked()); + sal_Bool bMarked = bInSelection && (rMark.IsMarked() || rMark.IsMultiMarked()); SCCOL nCurX; SCROW nCurY; @@ -1347,14 +1347,14 @@ void ScTabView::FindNextUnprot( BOOL bShift, BOOL bInSelection ) SCTAB nTab = aViewData.GetTabNo(); ScDocument* pDoc = aViewData.GetDocument(); - pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,TRUE, rMark ); + pDoc->GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,sal_True, rMark ); SCCOL nTabCol = aViewData.GetTabStartCol(); if ( nTabCol == SC_TABSTART_NONE ) nTabCol = nCurX; // auf diese Spalte zurueck bei Enter MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, - SC_FOLLOW_LINE, FALSE, TRUE ); + SC_FOLLOW_LINE, sal_False, sal_True ); // in MoveCursorRel wird die TabCol zurueckgesetzt... aViewData.SetTabStartCol( nTabCol ); @@ -1414,7 +1414,7 @@ void ScTabView::MarkRows() SelectionChanged(); } -void ScTabView::MarkDataArea( BOOL bIncludeCursor ) +void ScTabView::MarkDataArea( sal_Bool bIncludeCursor ) { ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); @@ -1441,17 +1441,17 @@ void ScTabView::MarkMatrixFormula() ScRange aMatrix; if ( pDoc->GetMatrixFormulaRange( aCursor, aMatrix ) ) { - MarkRange( aMatrix, FALSE ); // cursor is already within the range + MarkRange( aMatrix, sal_False ); // cursor is already within the range } } -void ScTabView::MarkRange( const ScRange& rRange, BOOL bSetCursor, BOOL bContinue ) +void ScTabView::MarkRange( const ScRange& rRange, sal_Bool bSetCursor, sal_Bool bContinue ) { SCTAB nTab = rRange.aStart.Tab(); SetTabNo( nTab ); HideAllCursors(); - DoneBlockMode( bContinue ); // bContinue==TRUE -> clear old mark + DoneBlockMode( bContinue ); // bContinue==sal_True -> clear old mark if (bSetCursor) // Wenn Cursor gesetzt wird, immer auch alignen { SCCOL nAlignX = rRange.aStart.Col(); @@ -1491,7 +1491,7 @@ void ScTabView::Unmark() SCCOL nCurX; SCROW nCurY; aViewData.GetMoveCursor( nCurX,nCurY ); - MoveCursorAbs( nCurX, nCurY, SC_FOLLOW_NONE, FALSE, FALSE ); + MoveCursorAbs( nCurX, nCurY, SC_FOLLOW_NONE, sal_False, sal_False ); SelectionChanged(); } @@ -1513,7 +1513,7 @@ void ScTabView::MarkDataChanged() UpdateSelectionOverlay(); } -void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection ) +void ScTabView::SelectNextTab( short nDir, sal_Bool bExtendSelection ) { if (!nDir) return; DBG_ASSERT( nDir==-1 || nDir==1, "SelectNextTab: falscher Wert"); @@ -1542,14 +1542,14 @@ void ScTabView::SelectNextTab( short nDir, BOOL bExtendSelection ) } } - SetTabNo( nTab, FALSE, bExtendSelection ); + SetTabNo( nTab, sal_False, bExtendSelection ); PaintExtras(); } // SetTabNo - angezeigte Tabelle -void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSameTabButMoved ) +void ScTabView::SetTabNo( SCTAB nTab, sal_Bool bNew, sal_Bool bExtendSelection, bool bSameTabButMoved ) { if ( !ValidTab(nTab) ) { @@ -1563,7 +1563,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell(); if (pFormSh) { - BOOL bAllowed = sal::static_int_cast<BOOL>( pFormSh->PrepareClose( TRUE ) ); + sal_Bool bAllowed = sal::static_int_cast<sal_Bool>( pFormSh->PrepareClose( sal_True ) ); if (!bAllowed) { //! Fehlermeldung? oder macht das die FormShell selber? @@ -1586,14 +1586,14 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa SCTAB nOldPos = nTab; while (!pDoc->IsVisible(nTab)) // naechste sichtbare suchen { - BOOL bUp = (nTab>=nOldPos); + sal_Bool bUp = (nTab>=nOldPos); if (bUp) { ++nTab; if (nTab>=nTabCount) { nTab = nOldPos; - bUp = FALSE; + bUp = sal_False; } } @@ -1604,7 +1604,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa else { DBG_ERROR("keine sichtbare Tabelle"); - pDoc->SetVisible( 0, TRUE ); + pDoc->SetVisible( 0, sal_True ); } } } @@ -1614,7 +1614,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa DrawDeselectAll(); ScModule* pScMod = SC_MOD(); - BOOL bRefMode = pScMod->IsFormulaMode(); + sal_Bool bRefMode = pScMod->IsFormulaMode(); if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert { DoneBlockMode(); @@ -1623,14 +1623,14 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa } ScSplitPos eOldActive = aViewData.GetActivePart(); // before switching - BOOL bFocus = pGridWin[eOldActive]->HasFocus(); + sal_Bool bFocus = pGridWin[eOldActive]->HasFocus(); aViewData.SetTabNo( nTab ); // UpdateShow noch vor SetCursor, damit UpdateAutoFillMark die richtigen // Fenster findet (wird aus SetCursor gerufen) UpdateShow(); aViewData.ResetOldCursor(); - SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), TRUE ); + SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), sal_True ); SfxBindings& rBindings = aViewData.GetBindings(); ScMarkData& rMark = aViewData.GetMarkData(); @@ -1659,7 +1659,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa bExtendSelection = false; if (bExtendSelection) - rMark.SelectTable( nTab, TRUE ); + rMark.SelectTable( nTab, sal_True ); else { rMark.SelectOneTable( nTab ); @@ -1675,7 +1675,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa if ( bRefMode ) // hide EditView if necessary (after aViewData.SetTabNo !) { - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) if ( pGridWin[i] ) if ( pGridWin[i]->IsVisible() ) pGridWin[i]->UpdateEditViewPos(); @@ -1723,13 +1723,13 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa // Fixierungen - BOOL bResize = FALSE; + sal_Bool bResize = sal_False; if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX ) if (aViewData.UpdateFixX()) - bResize = TRUE; + bResize = sal_True; if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX ) if (aViewData.UpdateFixY()) - bResize = TRUE; + bResize = sal_True; if (bResize) RepeatResize(); InvalidateSplit(); @@ -1739,7 +1739,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa // #53551# Form-Layer muss den sichtbaren Ausschnitt der neuen Tabelle kennen // dafuer muss hier schon der MapMode stimmen - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->SetMapMode( pGridWin[i]->GetDrawMapMode() ); SetNewVisArea(); @@ -1762,7 +1762,7 @@ void ScTabView::SetTabNo( SCTAB nTab, BOOL bNew, BOOL bExtendSelection, bool bSa if(pScMod->IsRefDialogOpen()) { - USHORT nCurRefDlgId=pScMod->GetCurRefDlgId(); + sal_uInt16 nCurRefDlgId=pScMod->GetCurRefDlgId(); SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame(); SfxChildWindow* pChildWnd = pViewFrm->GetChildWindow( nCurRefDlgId ); if ( pChildWnd ) @@ -1783,11 +1783,11 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW DrawDeselectAll(); if (pDrawView) - DrawEnableAnim( FALSE ); + DrawEnableAnim( sal_False ); EditView* pSpellingView = aViewData.GetSpellingView(); - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) if ( pGridWin[i]->IsVisible() && !aViewData.HasEditView((ScSplitPos)i) ) { @@ -1796,7 +1796,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW SCCOL nScrX = aViewData.GetPosX( eHWhich ); SCROW nScrY = aViewData.GetPosY( eVWhich ); - BOOL bPosVisible = + sal_Bool bPosVisible = ( nCol >= nScrX && nCol <= nScrX + aViewData.VisibleCellsX(eHWhich) + 1 && nRow >= nScrY && nRow <= nScrY + aViewData.VisibleCellsY(eVWhich) + 1 ); @@ -1836,7 +1836,7 @@ void ScTabView::MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW void ScTabView::UpdateEditView() { ScSplitPos eActive = aViewData.GetActivePart(); - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (aViewData.HasEditView( (ScSplitPos) i )) { EditView* pEditView = aViewData.GetEditView( (ScSplitPos) i ); @@ -1844,22 +1844,22 @@ void ScTabView::UpdateEditView() static_cast<ScEditEngineDefaulter*>(pEditView->GetEditEngine()), pGridWin[i], GetViewData()->GetCurX(), GetViewData()->GetCurY() ); if ( (ScSplitPos)i == eActive ) - pEditView->ShowCursor( FALSE ); + pEditView->ShowCursor( sal_False ); } } -void ScTabView::KillEditView( BOOL bNoPaint ) +void ScTabView::KillEditView( sal_Bool bNoPaint ) { - USHORT i; + sal_uInt16 i; SCCOL nCol1 = aViewData.GetEditStartCol(); SCROW nRow1 = aViewData.GetEditStartRow(); SCCOL nCol2 = aViewData.GetEditEndCol(); SCROW nRow2 = aViewData.GetEditEndRow(); - BOOL bPaint[4]; - BOOL bNotifyAcc(false); + sal_Bool bPaint[4]; + sal_Bool bNotifyAcc(false); - BOOL bExtended = nRow1 != nRow2; // Col wird sowieso bis zum Ende gezeichnet - BOOL bAtCursor = nCol1 <= aViewData.GetCurX() && + sal_Bool bExtended = nRow1 != nRow2; // Col wird sowieso bis zum Ende gezeichnet + sal_Bool bAtCursor = nCol1 <= aViewData.GetCurX() && nCol2 >= aViewData.GetCurX() && nRow1 == aViewData.GetCurY(); for (i=0; i<4; i++) @@ -1891,12 +1891,12 @@ void ScTabView::KillEditView( BOOL bNoPaint ) } if (pDrawView) - DrawEnableAnim( TRUE ); + DrawEnableAnim( sal_True ); // GrabFocus immer dann, wenn diese View aktiv ist und // die Eingabezeile den Focus hat - BOOL bGrabFocus = FALSE; + sal_Bool bGrabFocus = sal_False; if (aViewData.IsActive()) { ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(); @@ -1904,7 +1904,7 @@ void ScTabView::KillEditView( BOOL bNoPaint ) { ScInputWindow* pInputWin = pInputHdl->GetInputWindow(); if (pInputWin && pInputWin->IsInputActive()) - bGrabFocus = TRUE; + bGrabFocus = sal_True; } } @@ -1939,7 +1939,7 @@ void ScTabView::UpdateFormulas() if ( aViewData.GetDocument()->IsAutoCalcShellDisabled() ) return ; - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if (pGridWin[i]) if (pGridWin[i]->IsVisible()) @@ -1960,7 +1960,7 @@ void ScTabView::UpdateFormulas() void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode ) { - USHORT i; + sal_uInt16 i; SCCOL nCol1; SCROW nRow1; SCCOL nCol2; @@ -1975,7 +1975,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO { ScHSplitPos eHWhich = WhichH( (ScSplitPos) i ); ScVSplitPos eVWhich = WhichV( (ScSplitPos) i ); - BOOL bOut = FALSE; + sal_Bool bOut = sal_False; nCol1 = nStartCol; nRow1 = nStartRow; @@ -1990,16 +1990,16 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO if ( eMode == SC_UPDATE_ALL ) // #91240# for UPDATE_ALL, paint anyway nCol2 = nScrX; // (because of extending strings to the right) else - bOut = TRUE; // completely outside the window + bOut = sal_True; // completely outside the window } if (nRow1 < nScrY) nRow1 = nScrY; - if (nRow2 < nScrY) bOut = TRUE; + if (nRow2 < nScrY) bOut = sal_True; SCCOL nLastX = nScrX + aViewData.VisibleCellsX( eHWhich ) + 1; SCROW nLastY = nScrY + aViewData.VisibleCellsY( eVWhich ) + 1; - if (nCol1 > nLastX) bOut = TRUE; + if (nCol1 > nLastX) bOut = sal_True; if (nCol2 > nLastX) nCol2 = nLastX; - if (nRow1 > nLastY) bOut = TRUE; + if (nRow1 > nLastY) bOut = sal_True; if (nRow2 > nLastY) nRow2 = nLastY; if (!bOut) @@ -2008,7 +2008,7 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO pGridWin[i]->Draw( nCol1, nRow1, nCol2, nRow2, eMode ); else // ALL oder MARKS { - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); long nLayoutSign = bLayoutRTL ? -1 : 1; Point aStart = aViewData.GetScrPos( nCol1, nRow1, (ScSplitPos) i ); @@ -2022,14 +2022,14 @@ void ScTabView::PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO if ( eMode == SC_UPDATE_ALL && nRow2 >= MAXROW ) aEnd.Y() = pGridWin[i]->GetOutputSizePixel().Height(); - BOOL bShowChanges = TRUE; //! ... + sal_Bool bShowChanges = sal_True; //! ... if (bShowChanges) { aStart.X() -= nLayoutSign; // include change marks aStart.Y() -= 1; } - BOOL bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS ); + sal_Bool bMarkClipped = aViewData.GetOptions().GetOption( VOPT_CLIPMARKS ); if (bMarkClipped) { // dazu muesste ScColumn::IsEmptyBlock optimiert werden @@ -2068,8 +2068,8 @@ void ScTabView::PaintRangeFinder( long nNumber ) if ( pRangeFinder && pRangeFinder->GetDocName() == aViewData.GetDocShell()->GetTitle() ) { SCTAB nTab = aViewData.GetTabNo(); - USHORT nCount = (USHORT)pRangeFinder->Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = (sal_uInt16)pRangeFinder->Count(); + for (sal_uInt16 i=0; i<nCount; i++) if ( nNumber < 0 || nNumber == i ) { ScRangeFindData* pData = pRangeFinder->GetObject(i); @@ -2091,19 +2091,19 @@ void ScTabView::PaintRangeFinder( long nNumber ) // wegnehmen -> Repaint // SC_UPDATE_MARKS: Invalidate, nicht bis zum Zeilenende - BOOL bHiddenEdge = FALSE; + sal_Bool bHiddenEdge = sal_False; SCROW nTmp; ScDocument* pDoc = aViewData.GetDocument(); SCCOL nLastCol = -1; while ( nCol1 > 0 && pDoc->ColHidden(nCol1, nTab, nLastCol) ) { --nCol1; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } while ( nCol2 < MAXCOL && pDoc->ColHidden(nCol2, nTab, nLastCol) ) { ++nCol2; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } nTmp = pDoc->LastVisibleRow(0, nRow1, nTab); if (!ValidRow(nTmp)) @@ -2111,7 +2111,7 @@ void ScTabView::PaintRangeFinder( long nNumber ) if (nTmp < nRow1) { nRow1 = nTmp; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } nTmp = pDoc->FirstVisibleRow(nRow2, MAXROW, nTab); if (!ValidRow(nTmp)) @@ -2119,7 +2119,7 @@ void ScTabView::PaintRangeFinder( long nNumber ) if (nTmp > nRow2) { nRow2 = nTmp; - bHiddenEdge = TRUE; + bHiddenEdge = sal_True; } if ( nCol2 - nCol1 > 1 && nRow2 - nRow1 > 1 && !bHiddenEdge ) @@ -2161,8 +2161,8 @@ void ScTabView::ClearHighlightRanges() pHighlightRanges = NULL; // Repaint ohne Highlight SCTAB nTab = aViewData.GetTabNo(); - ULONG nCount = pTemp->Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = pTemp->Count(); + for (sal_uLong i=0; i<nCount; i++) { ScHighlightEntry* pEntry = pTemp->GetObject( i ); if (pEntry) @@ -2208,7 +2208,7 @@ void ScTabView::DoChartSelection( //UNUSED2008-05 { //UNUSED2008-05 if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX || aViewData.GetVSplitMode() == SC_SPLIT_FIX ) //UNUSED2008-05 { -//UNUSED2008-05 for (USHORT i=0; i<4; i++) +//UNUSED2008-05 for (sal_uInt16 i=0; i<4; i++) //UNUSED2008-05 if (pGridWin[i]) //UNUSED2008-05 if (pGridWin[i]->IsVisible()) //UNUSED2008-05 pGridWin[i]->DrawDragRect( nStartX, nStartY, nEndX, nEndY ); @@ -2223,7 +2223,7 @@ void ScTabView::DoChartSelection( //UNUSED2008-05 { //UNUSED2008-05 if ( aViewData.GetTabNo() == nTab ) //UNUSED2008-05 { -//UNUSED2008-05 USHORT i; +//UNUSED2008-05 sal_uInt16 i; //UNUSED2008-05 for (i=0; i<4; i++) //UNUSED2008-05 if (pGridWin[i]) //UNUSED2008-05 if (pGridWin[i]->IsVisible()) @@ -2245,7 +2245,7 @@ void ScTabView::DoChartSelection( void ScTabView::PaintGrid() { - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if (pGridWin[i]) if (pGridWin[i]->IsVisible()) @@ -2256,7 +2256,7 @@ void ScTabView::PaintGrid() void ScTabView::PaintTop() { - USHORT i; + sal_uInt16 i; for (i=0; i<2; i++) { if (pColBar[i]) @@ -2268,7 +2268,7 @@ void ScTabView::PaintTop() void ScTabView::CreateAnchorHandles(SdrHdlList& rHdl, const ScAddress& rAddress) { - UINT16 i; + sal_uInt16 i; for(i=0; i<4; i++) { @@ -2301,10 +2301,10 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol ) if (nStartCol>0) --nStartCol; //! allgemeiner ? - BOOL bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); + sal_Bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ); long nLayoutSign = bLayoutRTL ? -1 : 1; - for (USHORT i=0; i<2; i++) + for (sal_uInt16 i=0; i<2; i++) { ScHSplitPos eWhich = (ScHSplitPos) i; if (pColBar[eWhich]) @@ -2329,7 +2329,7 @@ void ScTabView::PaintTopArea( SCCOL nStartCol, SCCOL nEndCol ) void ScTabView::PaintLeft() { - USHORT i; + sal_uInt16 i; for (i=0; i<2; i++) { if (pRowBar[i]) @@ -2358,7 +2358,7 @@ void ScTabView::PaintLeftArea( SCROW nStartRow, SCROW nEndRow ) if (nStartRow>0) --nStartRow; - for (USHORT i=0; i<2; i++) + for (sal_uInt16 i=0; i<2; i++) { ScVSplitPos eWhich = (ScVSplitPos) i; if (pRowBar[eWhich]) @@ -2402,11 +2402,11 @@ void ScTabView::InvertBlockMark(SCCOL nStartX, SCROW nStartY, return; } - BOOL bSingle = rMark.IsMultiMarked(); - BOOL bMerge = pDoc->HasAttrib( nStartX, nStartY, nTab, nEndX, nEndY, nTab, + sal_Bool bSingle = rMark.IsMultiMarked(); + sal_Bool bMerge = pDoc->HasAttrib( nStartX, nStartY, nTab, nEndX, nEndY, nTab, HASATTR_MERGED | HASATTR_OVERLAPPED ); - USHORT i; + sal_uInt16 i; if ( bMerge || bSingle ) { for (i=0; i<4; i++) @@ -2448,7 +2448,7 @@ void ScTabView::InvertBlockMark(SCCOL nStartX, SCROW nStartY, // wenn Controls betroffen, neu malen // - BOOL bHide = TRUE; // wird Teil der Markierung aufgehoben ? + sal_Bool bHide = sal_True; // wird Teil der Markierung aufgehoben ? if (rMark.IsMarked()) { ScRange aMarkRange; @@ -2456,23 +2456,23 @@ void ScTabView::InvertBlockMark(SCCOL nStartX, SCROW nStartY, if ( aMarkRange.aStart.Col() <= nStartX && aMarkRange.aEnd.Col() >= nEndX && aMarkRange.aStart.Row() <= nStartY && aMarkRange.aEnd.Row() >= nEndY ) { - bHide = FALSE; // der ganze Bereich ist markiert + bHide = sal_False; // der ganze Bereich ist markiert } } } -BOOL ScTabView::PaintExtras() +sal_Bool ScTabView::PaintExtras() { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); if (!pDoc->HasTable(nTab)) // Tabelle geloescht ? { SCTAB nCount = pDoc->GetTableCount(); aViewData.SetTabNo(nCount-1); - bRet = TRUE; + bRet = sal_True; } - pTabControl->UpdateStatus(); // TRUE = active + pTabControl->UpdateStatus(); // sal_True = active return bRet; } @@ -2486,8 +2486,8 @@ void ScTabView::RecalcPPT() aViewData.RefreshZoom(); // pre-calculate new PPT values - BOOL bChangedX = ( aViewData.GetPPTX() != nOldX ); - BOOL bChangedY = ( aViewData.GetPPTY() != nOldY ); + sal_Bool bChangedX = ( aViewData.GetPPTX() != nOldX ); + sal_Bool bChangedY = ( aViewData.GetPPTY() != nOldY ); if ( bChangedX || bChangedY ) { // call view SetZoom (including draw scale, split update etc) @@ -2495,7 +2495,7 @@ void ScTabView::RecalcPPT() Fraction aZoomX = aViewData.GetZoomX(); Fraction aZoomY = aViewData.GetZoomY(); - SetZoom( aZoomX, aZoomY, FALSE ); + SetZoom( aZoomX, aZoomY, sal_False ); PaintGrid(); if (bChangedX) @@ -2505,7 +2505,7 @@ void ScTabView::RecalcPPT() } } -void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst ) +void ScTabView::ActivateView( sal_Bool bActivate, sal_Bool bFirst ) { if ( bActivate == aViewData.IsActive() && !bFirst ) { @@ -2516,13 +2516,13 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst ) // wird nur bei MDI-(De)Activate gerufen // aViewData.Activate hinten wegen Cursor-Show bei KillEditView - // Markierung nicht mehr loeschen - wenn an der ViewData Activate(FALSE) gesetzt ist, + // Markierung nicht mehr loeschen - wenn an der ViewData Activate(sal_False) gesetzt ist, // wird die Markierung nicht ausgegeben if (!bActivate) { ScModule* pScMod = SC_MOD(); - BOOL bRefMode = pScMod->IsFormulaMode(); + sal_Bool bRefMode = pScMod->IsFormulaMode(); // Referenzeingabe nicht abbrechen, um Referenzen auf // andere Dokumente zuzulassen @@ -2542,7 +2542,7 @@ void ScTabView::ActivateView( BOOL bActivate, BOOL bFirst ) aViewData.Activate(bActivate); - PaintBlock(FALSE); // Repaint, Markierung je nach Active-Status + PaintBlock(sal_False); // Repaint, Markierung je nach Active-Status if (!bActivate) HideAllCursors(); // Cursor @@ -2592,9 +2592,9 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) ScSplitPos eOld = aViewData.GetActivePart(); if ( eOld != eWhich ) { - bInActivatePart = TRUE; + bInActivatePart = sal_True; - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); // #40565# the HasEditView call during SetCursor would fail otherwise if ( aViewData.HasEditView(eOld) && !bRefMode ) @@ -2604,11 +2604,11 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) ScVSplitPos eOldV = WhichV(eOld); ScHSplitPos eNewH = WhichH(eWhich); ScVSplitPos eNewV = WhichV(eWhich); - BOOL bTopCap = pColBar[eOldH] && pColBar[eOldH]->IsMouseCaptured(); - BOOL bLeftCap = pRowBar[eOldV] && pRowBar[eOldV]->IsMouseCaptured(); + sal_Bool bTopCap = pColBar[eOldH] && pColBar[eOldH]->IsMouseCaptured(); + sal_Bool bLeftCap = pRowBar[eOldV] && pRowBar[eOldV]->IsMouseCaptured(); - BOOL bFocus = pGridWin[eOld]->HasFocus(); - BOOL bCapture = pGridWin[eOld]->IsMouseCaptured(); + sal_Bool bFocus = pGridWin[eOld]->HasFocus(); + sal_Bool bCapture = pGridWin[eOld]->IsMouseCaptured(); if (bCapture) pGridWin[eOld]->ReleaseMouse(); pGridWin[eOld]->ClickExtern(); @@ -2636,8 +2636,8 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) if ( bTopCap && pColBar[eNewH] ) { - pColBar[eOldH]->SetIgnoreMove(TRUE); - pColBar[eNewH]->SetIgnoreMove(FALSE); + pColBar[eOldH]->SetIgnoreMove(sal_True); + pColBar[eNewH]->SetIgnoreMove(sal_False); pHdrSelEng->SetWindow( pColBar[eNewH] ); long nWidth = pColBar[eNewH]->GetOutputSizePixel().Width(); pHdrSelEng->SetVisibleArea( Rectangle( 0, LONG_MIN, nWidth-1, LONG_MAX ) ); @@ -2645,8 +2645,8 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) } if ( bLeftCap && pRowBar[eNewV] ) { - pRowBar[eOldV]->SetIgnoreMove(TRUE); - pRowBar[eNewV]->SetIgnoreMove(FALSE); + pRowBar[eOldV]->SetIgnoreMove(sal_True); + pRowBar[eNewV]->SetIgnoreMove(sal_False); pHdrSelEng->SetWindow( pRowBar[eNewV] ); long nHeight = pRowBar[eNewV]->GetOutputSizePixel().Height(); pHdrSelEng->SetVisibleArea( Rectangle( LONG_MIN, 0, LONG_MAX, nHeight-1 ) ); @@ -2658,7 +2658,7 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pGridWin[eWhich]->ShowCursor(); SfxInPlaceClient* pClient = aViewData.GetViewShell()->GetIPClient(); - BOOL bOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); + sal_Bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); // #103823# don't switch ViewShell's active window during RefInput, because the focus // might change, and subsequent SetReference calls wouldn't find the right EditView @@ -2673,13 +2673,13 @@ void ScTabView::ActivatePart( ScSplitPos eWhich ) pGridWin[eWhich]->GrabFocus(); } - bInActivatePart = FALSE; + bInActivatePart = sal_False; } } void ScTabView::HideListBox() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pGridWin[i]) pGridWin[i]->ClickExtern(); } @@ -2778,7 +2778,7 @@ void ScTabView::ZoomChanged() void ScTabView::CheckNeedsRepaint() { - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if ( pGridWin[i] && pGridWin[i]->IsVisible() ) pGridWin[i]->CheckNeedsRepaint(); diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index 0eb88511c..c89da1761 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -46,7 +46,7 @@ #include "cell.hxx" #include "dociter.hxx" -extern USHORT nScFillModeMouseModifier; // global.cxx +extern sal_uInt16 nScFillModeMouseModifier; // global.cxx // STATIC DATA ----------------------------------------------------------- @@ -67,7 +67,7 @@ void ScTabView::HideTip() void ScTabView::ShowRefTip() { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( aViewData.GetRefType() == SC_REFTYPE_REF && Help::IsQuickHelpEnabled() ) { SCCOL nStartX = aViewData.GetRefStartX(); @@ -76,8 +76,8 @@ void ScTabView::ShowRefTip() SCROW nEndY = aViewData.GetRefEndY(); if ( nEndX != nStartX || nEndY != nStartY ) // nicht fuer einzelne Zelle { - BOOL bLeft = ( nEndX < nStartX ); - BOOL bTop = ( nEndY < nStartY ); + sal_Bool bLeft = ( nEndX < nStartX ); + sal_Bool bTop = ( nEndY < nStartY ); PutInOrder( nStartX, nEndX ); PutInOrder( nStartY, nEndY ); SCCOL nCols = nEndX+1-nStartX; @@ -98,7 +98,7 @@ void ScTabView::ShowRefTip() Point aPos( bLeft ? aStart.X() : ( aEnd.X() + 3 ), bTop ? aStart.Y() : ( aEnd.Y() + 3 ) ); - USHORT nFlags = ( bLeft ? QUICKHELP_RIGHT : QUICKHELP_LEFT ) | + sal_uInt16 nFlags = ( bLeft ? QUICKHELP_RIGHT : QUICKHELP_LEFT ) | ( bTop ? QUICKHELP_BOTTOM : QUICKHELP_TOP ); // nicht ueber die editierte Formel @@ -116,7 +116,7 @@ void ScTabView::ShowRefTip() HideTip(); nTipVisible = Help::ShowTip( pWin, aRect, aHelp, nFlags ); - bDone = TRUE; + bDone = sal_True; } } } @@ -129,7 +129,7 @@ void ScTabView::StopRefMode() { if (aViewData.IsRefMode()) { - aViewData.SetRefMode( FALSE, SC_REFTYPE_NONE ); + aViewData.SetRefMode( sal_False, SC_REFTYPE_NONE ); HideTip(); UpdateShrinkOverlay(); @@ -149,7 +149,7 @@ void ScTabView::StopRefMode() } pSelEngine->Reset(); - pSelEngine->SetAddMode( FALSE ); //! sollte das nicht bei Reset passieren? + pSelEngine->SetAddMode( sal_False ); //! sollte das nicht bei Reset passieren? ScSplitPos eOld = pSelEngine->GetWhich(); ScSplitPos eNew = aViewData.GetActivePart(); @@ -171,14 +171,14 @@ void ScTabView::StopRefMode() AlignToCursor( aViewData.GetCurX(), aViewData.GetCurY(), SC_FOLLOW_NONE ); } -void ScTabView::DoneRefMode( BOOL bContinue ) +void ScTabView::DoneRefMode( sal_Bool bContinue ) { ScDocument* pDoc = aViewData.GetDocument(); if ( aViewData.GetRefType() == SC_REFTYPE_REF && bContinue ) SC_MOD()->AddRefEntry(); - BOOL bWasRef = aViewData.IsRefMode(); - aViewData.SetRefMode( FALSE, SC_REFTYPE_NONE ); + sal_Bool bWasRef = aViewData.IsRefMode(); + aViewData.SetRefMode( sal_False, SC_REFTYPE_NONE ); HideTip(); UpdateShrinkOverlay(); @@ -253,7 +253,7 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ) PutInOrder(nStartY,nEndY); pDoc->SetEmbedded( ScRange(nStartX,nStartY,nTab, nEndX,nEndY,nTab) ); ScDocShell* pDocSh = aViewData.GetDocShell(); - pDocSh->UpdateOle( &aViewData, TRUE ); + pDocSh->UpdateOle( &aViewData, sal_True ); pDocSh->SetDocumentModified(); } @@ -300,18 +300,18 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ) if ( pWin ) aPos = pWin->OutputToScreenPixel( aPos ); Rectangle aRect( aPos, aPos ); - USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_TOP; + sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_TOP; Help::ShowQuickHelp(pWin, aRect, aHelpStr, nAlign); } } -void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, BOOL bPaint ) +void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType, sal_Bool bPaint ) { ScDocument* pDoc = aViewData.GetDocument(); ScMarkData& rMark = aViewData.GetMarkData(); if (!aViewData.IsRefMode()) { - aViewData.SetRefMode( TRUE, eType ); + aViewData.SetRefMode( sal_True, eType ); aViewData.SetRefStart( nCurX, nCurY, nCurZ ); aViewData.SetRefEnd( nCurX, nCurY, nCurZ ); @@ -336,13 +336,13 @@ void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eT //UNUSED2008-05 void ScTabView::EndSelection() //UNUSED2008-05 { //UNUSED2008-05 ScModule* pScMod = SC_MOD(); -//UNUSED2008-05 BOOL bRefMode = pScMod->IsFormulaMode(); +//UNUSED2008-05 sal_Bool bRefMode = pScMod->IsFormulaMode(); //UNUSED2008-05 if ( bRefMode ) //UNUSED2008-05 pScMod->EndReference(); //UNUSED2008-05 } // static -void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL ) +void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL ) { if ( nVisible == 0 ) nVisible = 1; // #i59893# don't use visible size 0 @@ -366,7 +366,7 @@ void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, } // static -long ScTabView::GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL ) +long ScTabView::GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL ) { if ( bLayoutRTL ) return -rScroll.GetThumbPos() - rScroll.GetVisibleSize(); @@ -407,11 +407,11 @@ long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLRO void ScTabView::UpdateScrollBars() { long nDiff; - BOOL bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); - BOOL bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); + sal_Bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE ); + sal_Bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE ); ScDocument* pDoc = aViewData.GetDocument(); SCTAB nTab = aViewData.GetTabNo(); - BOOL bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL(); + sal_Bool bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL(); SCCOL nUsedX; SCROW nUsedY; pDoc->GetTableArea( nTab, nUsedX, nUsedY ); //! cachen !!!!!!!!!!!!!!! @@ -434,7 +434,7 @@ void ScTabView::UpdateScrollBars() nVisYB = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM ); long nMaxYB = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_BOTTOM), nVisYB, MAXROW, nStartY ); - SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, FALSE ); + SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, sal_False ); if (bRight) { @@ -447,7 +447,7 @@ void ScTabView::UpdateScrollBars() { nVisYT = aViewData.VisibleCellsY( SC_SPLIT_TOP ); long nMaxYT = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_TOP), nVisYT, MAXROW, 0 ); - SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), FALSE ); + SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), sal_False ); } // Bereich testen @@ -493,7 +493,7 @@ void ScTabView::UpdateScrollBars() void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos ) { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (WhichV((ScSplitPos)i)==eWhich) { ScGridWindow* pWin = pGridWin[i]; @@ -508,7 +508,7 @@ void ScTabView::InvertHorizontal( ScVSplitPos eWhich, long nDragPos ) void ScTabView::InvertVertical( ScHSplitPos eWhich, long nDragPos ) { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (WhichH((ScSplitPos)i)==eWhich) { ScGridWindow* pWin = pGridWin[i]; @@ -533,7 +533,7 @@ void ScTabView::InterpretVisible() return; SCTAB nTab = aViewData.GetTabNo(); - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) { // rely on gridwin pointers to find used panes // no IsVisible test in case the whole view is not yet shown diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 8c31f82b3..5f32a6f60 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -78,9 +78,9 @@ void __EXPORT ScTabView::Init() the sheet orientation, not the UI setting. Note: controls that are already constructed (e.g. scroll bars) have the RTL setting of the GUI. Eventually this has to be disabled manually (see below). */ - pFrameWin->EnableRTL( FALSE ); + pFrameWin->EnableRTL( sal_False ); - USHORT i; + sal_uInt16 i; aScrollTimer.SetTimeout(10); aScrollTimer.SetTimeoutHdl( LINK( this, ScTabView, TimerHdl ) ); @@ -149,7 +149,7 @@ void __EXPORT ScTabView::Init() __EXPORT ScTabView::~ScTabView() { - USHORT i; + sal_uInt16 i; // remove selection object ScModule* pScMod = SC_MOD(); @@ -208,14 +208,14 @@ __EXPORT ScTabView::~ScTabView() delete pTabControl; } -void ScTabView::MakeDrawView( BYTE nForceDesignMode ) +void ScTabView::MakeDrawView( sal_uInt8 nForceDesignMode ) { if (!pDrawView) { ScDrawLayer* pLayer = aViewData.GetDocument()->GetDrawLayer(); DBG_ASSERT(pLayer, "wo ist der Draw Layer ??"); - USHORT i; + sal_uInt16 i; pDrawView = new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT], &aViewData ); for (i=0; i<4; i++) if (pGridWin[i]) @@ -240,7 +240,7 @@ void ScTabView::MakeDrawView( BYTE nForceDesignMode ) // #106334# used when switching back from page preview: restore saved design mode state // (otherwise, keep the default from the draw view ctor) if ( nForceDesignMode != SC_FORCEMODE_NONE ) - pDrawView->SetDesignMode( (BOOL)nForceDesignMode ); + pDrawView->SetDesignMode( (sal_Bool)nForceDesignMode ); // an der FormShell anmelden FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell(); @@ -273,7 +273,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved ) { DrawDeselectAll(); // beendet auch Text-Edit-Modus - USHORT i; + sal_uInt16 i; for (i=0; i<4; i++) if (pGridWin[i]) pDrawView->VCRemoveWin(pGridWin[i]); // fuer alte Page @@ -296,7 +296,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved ) // Es gibt keine einfache Moeglichkeit, alle Slots der FormShell zu invalidieren // (fuer disablete Slots auf geschuetzten Tabellen), darum hier einfach alles... - rBindings.InvalidateAll(FALSE); + rBindings.InvalidateAll(sal_False); #if 0 rBindings.Invalidate( SID_SELECT_SCENARIO ); @@ -349,10 +349,10 @@ void ScTabView::UpdateLayerLocks() if (pDrawView) { SCTAB nTab = aViewData.GetTabNo(); - BOOL bEx = aViewData.GetViewShell()->IsDrawSelMode(); - BOOL bProt = aViewData.GetDocument()->IsTabProtected( nTab ) || + sal_Bool bEx = aViewData.GetViewShell()->IsDrawSelMode(); + sal_Bool bProt = aViewData.GetDocument()->IsTabProtected( nTab ) || aViewData.GetSfxDocShell()->IsReadOnly(); - BOOL bShared = aViewData.GetDocShell()->IsDocShared(); + sal_Bool bShared = aViewData.GetDocShell()->IsDocShared(); SdrLayer* pLayer; SdrLayerAdmin& rAdmin = pDrawView->GetModel()->GetLayerAdmin(); @@ -361,7 +361,7 @@ void ScTabView::UpdateLayerLocks() pDrawView->SetLayerLocked( pLayer->GetName(), bProt || !bEx || bShared ); pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN); if (pLayer) - pDrawView->SetLayerLocked( pLayer->GetName(), TRUE ); + pDrawView->SetLayerLocked( pLayer->GetName(), sal_True ); pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT); if (pLayer) pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared ); @@ -394,16 +394,16 @@ void ScTabView::DrawDeselectAll() pDrawView->UnmarkAll(); if (!pViewSh->IsDrawSelMode()) - pViewSh->SetDrawShell( FALSE ); + pViewSh->SetDrawShell( sal_False ); } } -BOOL ScTabView::IsDrawTextEdit() const +sal_Bool ScTabView::IsDrawTextEdit() const { if (pDrawView) return pDrawView->IsTextEdit(); else - return FALSE; + return sal_False; } //UNUSED2008-05 String ScTabView::GetSelectedChartName() const @@ -419,12 +419,12 @@ SvxZoomType ScTabView::GetZoomType() const return aViewData.GetZoomType(); } -void ScTabView::SetZoomType( SvxZoomType eNew, BOOL bAll ) +void ScTabView::SetZoomType( SvxZoomType eNew, sal_Bool bAll ) { aViewData.SetZoomType( eNew, bAll ); } -void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll ) +void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll ) { aViewData.SetZoom( rNewX, rNewY, bAll ); if (pDrawView) @@ -440,7 +440,7 @@ void ScTabView::RefreshZoom() ZoomChanged(); } -void ScTabView::SetPagebreakMode( BOOL bSet ) +void ScTabView::SetPagebreakMode( sal_Bool bSet ) { aViewData.SetPagebreakMode(bSet); if (pDrawView) @@ -454,7 +454,7 @@ void ScTabView::ResetDrawDragMode() pDrawView->SetDragMode( SDRDRAG_MOVE ); } -void ScTabView::ViewOptionsHasChanged( BOOL bHScrollChanged, BOOL bGraphicsChanged ) +void ScTabView::ViewOptionsHasChanged( sal_Bool bHScrollChanged, sal_Bool bGraphicsChanged ) { // DrawView erzeugen, wenn Gitter angezeigt werden soll if ( !pDrawView && aViewData.GetOptions().GetGridOptions().GetGridVisible() ) @@ -464,13 +464,13 @@ void ScTabView::ViewOptionsHasChanged( BOOL bHScrollChanged, BOOL bGraphicsChang pDrawView->UpdateUserViewOptions(); if (bGraphicsChanged) - DrawEnableAnim(TRUE); // DrawEnableAnim checks the options state + DrawEnableAnim(sal_True); // DrawEnableAnim checks the options state // if TabBar is set to visible, make sure its size is not 0 - BOOL bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 ); + sal_Bool bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 ); // if ScrollBar is set to visible, TabBar must make room - BOOL bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() && + sal_Bool bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() && pTabControl->GetSizePixel().Width() > SC_TABBAR_DEFWIDTH ); if ( bGrow || bShrink ) @@ -510,14 +510,14 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect ) { //! store rectangle for repaint during drag - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) { if ( pGridWin[i] && pGridWin[i]->IsVisible() ) { RasterOp aROp = pGridWin[i]->GetRasterOp(); - BOOL bHasLine = pGridWin[i]->IsLineColor(); + sal_Bool bHasLine = pGridWin[i]->IsLineColor(); Color aLine = pGridWin[i]->GetLineColor(); - BOOL bHasFill = pGridWin[i]->IsFillColor(); + sal_Bool bHasFill = pGridWin[i]->IsFillColor(); Color aFill = pGridWin[i]->GetFillColor(); pGridWin[i]->SetRasterOp( ROP_INVERT ); @@ -539,9 +539,9 @@ void ScTabView::DrawMarkRect( const Rectangle& rRect ) } } -void ScTabView::DrawEnableAnim(BOOL bSet) +void ScTabView::DrawEnableAnim(sal_Bool bSet) { - USHORT i; + sal_uInt16 i; if ( pDrawView ) { // #71040# dont start animations if display of graphics is disabled @@ -550,7 +550,7 @@ void ScTabView::DrawEnableAnim(BOOL bSet) { if ( !pDrawView->IsAnimationEnabled() ) { - pDrawView->SetAnimationEnabled(TRUE); + pDrawView->SetAnimationEnabled(sal_True); // Animierte GIFs muessen wieder gestartet werden: ScDocument* pDoc = aViewData.GetDocument(); @@ -561,12 +561,12 @@ void ScTabView::DrawEnableAnim(BOOL bSet) } else { - pDrawView->SetAnimationEnabled(FALSE); + pDrawView->SetAnimationEnabled(sal_False); } } } -//HMHvoid ScTabView::DrawShowMarkHdl(BOOL bShow) +//HMHvoid ScTabView::DrawShowMarkHdl(sal_Bool bShow) //HMH{ //HMHif (!pDrawView) //HMH return; @@ -593,7 +593,7 @@ void ScTabView::UpdateDrawTextOutliner() void ScTabView::DigitLanguageChanged() { LanguageType eNewLang = SC_MOD()->GetOptDigitLanguage(); - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if ( pGridWin[i] ) pGridWin[i]->SetDigitLanguage( eNewLang ); } @@ -684,7 +684,7 @@ void ScTabView::MakeVisible( const Rectangle& rHMMRect ) //--------------------------------------------------------------- -void ScTabView::SetBrushDocument( ScDocument* pNew, BOOL bLock ) +void ScTabView::SetBrushDocument( ScDocument* pNew, sal_Bool bLock ) { delete pBrushDocument; delete pDrawBrushSet; @@ -697,7 +697,7 @@ void ScTabView::SetBrushDocument( ScDocument* pNew, BOOL bLock ) aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH); } -void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock ) +void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock ) { delete pBrushDocument; delete pDrawBrushSet; @@ -714,7 +714,7 @@ void ScTabView::ResetBrushDocument() { if ( HasPaintBrush() ) { - SetBrushDocument( NULL, FALSE ); + SetBrushDocument( NULL, sal_False ); SetActivePointer( Pointer( POINTER_ARROW ) ); // switch pointers also when ended with escape key } } diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 7b4bc6899..d98e50a2d 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -107,7 +107,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) SdrModel* pDoc = pView->GetModel(); const SfxItemSet *pArgs = rReq.GetArgs(); - USHORT nNewId = rReq.GetSlot(); + sal_uInt16 nNewId = rReq.GetSlot(); if ( nNewId == SID_DRAW_CHART ) { @@ -124,7 +124,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if (nNewId == SID_INSERT_DRAW && pArgs) { const SfxPoolItem* pItem; - if ( pArgs->GetItemState( SID_INSERT_DRAW, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pArgs->GetItemState( SID_INSERT_DRAW, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SvxDrawToolItem ) ) { SvxDrawToolEnum eSel = (SvxDrawToolEnum)((const SvxDrawToolItem*)pItem)->GetValue(); @@ -147,7 +147,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) case SVX_SNAP_DRAW_CAPTION_VERTICAL: nNewId = SID_DRAW_CAPTION_VERTICAL; break; } } - else // USHORT-Item vom Controller + else // sal_uInt16-Item vom Controller { rReq.Done(); return; @@ -157,11 +157,11 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if ( nNewId == SID_DRAW_SELECT ) nNewId = SID_OBJECT_SELECT; - USHORT nNewFormId = 0; + sal_uInt16 nNewFormId = 0; if ( nNewId == SID_FM_CREATE_CONTROL && pArgs ) { const SfxPoolItem* pItem; - if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pArgs->GetItemState( SID_FM_CONTROL_IDENTIFIER, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxUInt16Item ) ) nNewFormId = ((const SfxUInt16Item*)pItem)->GetValue(); } @@ -170,7 +170,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if ( pArgs ) { const SfxPoolItem* pItem; - if ( pArgs->GetItemState( nNewId, TRUE, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) ) + if ( pArgs->GetItemState( nNewId, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) ) sStringItemValue = static_cast<const SfxStringItem*>(pItem)->GetValue(); } bool bSwitchCustom = ( sStringItemValue.Len() && sDrawCustom.Len() && sStringItemValue != sDrawCustom ); @@ -181,15 +181,15 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) // #97016# CTRL-SID_OBJECT_SELECT is used to select the first object, // but not if SID_OBJECT_SELECT is the result of clicking a create function again, // so this must be tested before changing nNewId below. - BOOL bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) ); + sal_Bool bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) ); - BOOL bEx = IsDrawSelMode(); + sal_Bool bEx = IsDrawSelMode(); if ( rReq.GetModifier() & KEY_MOD1 ) { // #97016# always allow keyboard selection also on background layer // #98185# also allow creation of default objects if the same object type // was already active - bEx = TRUE; + bEx = sal_True; } else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL || nNewFormId == nFormSfxId || nNewFormId == 0 ) && !bSwitchCustom ) @@ -203,7 +203,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) if ( nNewId == SID_FM_CREATE_CONTROL ) { GetViewData()->GetDispatcher().Execute(SID_FM_LEAVE_CREATE); - GetViewFrame()->GetBindings().InvalidateAll(FALSE); + GetViewFrame()->GetBindings().InvalidateAll(sal_False); //! was fuer einen Slot braucht der komische Controller wirklich, um das anzuzeigen???? } @@ -211,13 +211,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) nNewId = SID_OBJECT_SELECT; } else - bEx = TRUE; + bEx = sal_True; if ( nDrawSfxId == SID_FM_CREATE_CONTROL && nNewId != nDrawSfxId ) { // Wechsel von Control- zu Zeichenfunktion -> im Control-Controller deselektieren GetViewData()->GetDispatcher().Execute(SID_FM_LEAVE_CREATE); - GetViewFrame()->GetBindings().InvalidateAll(FALSE); + GetViewFrame()->GetBindings().InvalidateAll(sal_False); //! was fuer einen Slot braucht der komische Controller wirklich, um das anzuzeigen???? } @@ -232,7 +232,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) { // select first object pView->UnmarkAllObj(); - pView->MarkNextObj(TRUE); + pView->MarkNextObj(sal_True); // ...and make it visible if(pView->AreObjectsMarked()) @@ -247,13 +247,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) { if ( nNewId == SID_DRAW_TEXT || nNewId == SID_DRAW_TEXT_VERTICAL || nNewId == SID_DRAW_TEXT_MARQUEE || nNewId == SID_DRAW_NOTEEDIT ) - SetDrawTextShell( TRUE ); + SetDrawTextShell( sal_True ); else { if ( bEx || pView->GetMarkedObjectList().GetMarkCount() != 0 ) SetDrawShellOrSub(); else - SetDrawShell( FALSE ); + SetDrawShell( sal_False ); } } @@ -287,7 +287,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) case SID_DRAW_CAPTION: case SID_DRAW_CAPTION_VERTICAL: pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq)); - pView->SetFrameDragSingles( FALSE ); + pView->SetFrameDragSingles( sal_False ); rBindings.Invalidate( SID_BEZIER_EDIT ); break; @@ -312,13 +312,13 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) break; case SID_FM_CREATE_CONTROL: - SetDrawFormShell(TRUE); + SetDrawFormShell(sal_True); pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq)); nFormSfxId = nNewFormId; break; case SID_DRAW_CHART: -//UNUSED2008-05 bChartDlgIsEdit = FALSE; +//UNUSED2008-05 bChartDlgIsEdit = sal_False; pTabView->SetDrawFuncPtr(new FuMarkRect(this, pWin, pView, pDoc, aNewReq)); break; @@ -410,7 +410,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) void ScTabViewShell::GetDrawState(SfxItemSet &rSet) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { @@ -419,7 +419,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet) case SID_INSERT_DRAW: { // SID_OBJECT_SELECT nur, wenn "harter" Selektionsmodus - USHORT nPutId = nDrawSfxId; + sal_uInt16 nPutId = nDrawSfxId; if ( nPutId == SID_OBJECT_SELECT && !IsDrawSelMode() ) nPutId = USHRT_MAX; // nur die Images, die auch auf dem Controller liegen @@ -451,7 +451,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet) case SID_DRAW_CHART: { - BOOL bOle = GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace(); if ( bOle || !SvtModuleOptions().IsChart() ) rSet.DisableItem( nWhich ); } @@ -465,13 +465,13 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet) } } -BOOL ScTabViewShell::SelectObject( const String& rName ) +sal_Bool ScTabViewShell::SelectObject( const String& rName ) { ScDrawView* pView = GetViewData()->GetScDrawView(); if (!pView) - return FALSE; + return sal_False; - BOOL bFound = pView->SelectObject( rName ); + sal_Bool bFound = pView->SelectObject( rName ); // DrawShell etc. is handled in MarkListHasChanged return bFound; diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index b3c9bfa48..8608b7dd1 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -89,7 +89,7 @@ using ::std::auto_ptr; #define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() ) #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) #define GET_STRING(nid) ((const SfxStringItem&)pReqArgs->Get(nid)).GetValue() #define GET_UINT16(nid) ((const SfxUInt16Item&)pReqArgs->Get(nid)).GetValue() #define GET_BOOL(nid) ((const SfxBoolItem&)pReqArgs->Get(nid)).GetValue() @@ -99,9 +99,9 @@ using ::std::auto_ptr; /** Try to parse the given range using Calc-style syntax first, then Excel-style if that fails. */ -USHORT lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, USHORT /* nSlot */) +sal_uInt16 lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */) { - USHORT nResult = rScRange.Parse(aAddress, pDoc); + sal_uInt16 nResult = rScRange.Parse(aAddress, pDoc); if ( (nResult & SCA_VALID) ) return nResult; @@ -110,9 +110,9 @@ USHORT lcl_ParseRange(ScRange& rScRange, const String& aAddress, ScDocument* pDo /** Try to parse the given address using Calc-style syntax first, then Excel-style if that fails. */ -USHORT lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, USHORT /* nSlot */) +sal_uInt16 lcl_ParseAddress(ScAddress& rScAddress, const String& aAddress, ScDocument* pDoc, sal_uInt16 /* nSlot */) { - USHORT nResult = rScAddress.Parse(aAddress, pDoc); + sal_uInt16 nResult = rScAddress.Parse(aAddress, pDoc); if ( (nResult & SCA_VALID) ) return nResult; @@ -125,7 +125,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SfxBindings& rBindings = pThisFrame->GetBindings(); ScModule* pScMod = SC_MOD(); const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp HideListBox(); // Autofilter-DropDown-Listbox @@ -136,22 +136,22 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState(FID_INSERT_FILE,TRUE,&pItem) == SFX_ITEM_SET ) + pReqArgs->GetItemState(FID_INSERT_FILE,sal_True,&pItem) == SFX_ITEM_SET ) { String aFileName = ((const SfxStringItem*)pItem)->GetValue(); // Einfuege-Position Point aInsertPos; - if ( pReqArgs->GetItemState(FN_PARAM_1,TRUE,&pItem) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState(FN_PARAM_1,sal_True,&pItem) == SFX_ITEM_SET ) aInsertPos = ((const SfxPointItem*)pItem)->GetValue(); else aInsertPos = GetInsertPos(); // als Link? - BOOL bAsLink = FALSE; - if ( pReqArgs->GetItemState(FN_PARAM_2,TRUE,&pItem) == SFX_ITEM_SET ) + sal_Bool bAsLink = sal_False; + if ( pReqArgs->GetItemState(FN_PARAM_2,sal_True,&pItem) == SFX_ITEM_SET ) bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); // ausfuehren @@ -163,10 +163,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_EDIT_PRINTAREA: { - USHORT nId = ScPrintAreasDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScPrintAreasDlgWrapper::GetChildWindowId(); SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; @@ -177,18 +177,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) String aPrintStr; String aRowStr; String aColStr; - BOOL bEntire = FALSE; + sal_Bool bEntire = sal_False; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET ) aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET ) aRowStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_3, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_3, sal_True, &pItem ) == SFX_ITEM_SET ) aColStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_4, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_4, sal_True, &pItem ) == SFX_ITEM_SET ) bEntire = static_cast<const SfxBoolItem*>(pItem)->GetValue(); - SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, FALSE ); + SetPrintRanges( bEntire, &aPrintStr, &aColStr, &aRowStr, sal_False ); rReq.Done(); } @@ -198,18 +198,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_ADD_PRINTAREA: case SID_DEFINE_PRINTAREA: // Menue oder Basic { - BOOL bAdd = ( nSlot == SID_ADD_PRINTAREA ); + sal_Bool bAdd = ( nSlot == SID_ADD_PRINTAREA ); if ( pReqArgs ) { String aPrintStr; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET ) aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); - SetPrintRanges( FALSE, &aPrintStr, NULL, NULL, bAdd ); + SetPrintRanges( sal_False, &aPrintStr, NULL, NULL, bAdd ); } else { - SetPrintRanges( FALSE, NULL, NULL, NULL, bAdd ); // aus Selektion + SetPrintRanges( sal_False, NULL, NULL, NULL, bAdd ); // aus Selektion rReq.Done(); } } @@ -218,7 +218,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_DELETE_PRINTAREA: { String aEmpty; - SetPrintRanges( FALSE, &aEmpty, NULL, NULL, FALSE ); // Druckbereich loeschen + SetPrintRanges( sal_False, &aEmpty, NULL, NULL, sal_False ); // Druckbereich loeschen rReq.Done(); } break; @@ -251,18 +251,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { String aAddress; const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) aAddress = ((const SfxStringItem*)pItem)->GetValue(); else if ( nSlot == SID_JUMPTOMARK && pReqArgs->GetItemState( - SID_JUMPTOMARK, TRUE, &pItem ) == SFX_ITEM_SET ) + SID_JUMPTOMARK, sal_True, &pItem ) == SFX_ITEM_SET ) aAddress = ((const SfxStringItem*)pItem)->GetValue(); // #i14927# SID_CURRENTCELL with a single cell must unmark if FN_PARAM_1 // isn't set (for recorded macros, because IsAPI is no longer available). // ScGridWindow::MouseButtonUp no longer executes the slot for a single // cell if there is a multi selection. - BOOL bUnmark = ( nSlot == SID_CURRENTCELL ); - if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_Bool bUnmark = ( nSlot == SID_CURRENTCELL ); + if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET ) bUnmark = ((const SfxBoolItem*)pItem)->GetValue(); if ( nSlot == SID_JUMPTOMARK ) @@ -273,15 +273,15 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) RTL_TEXTENCODING_UTF8 ); } - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScViewData* pViewData = GetViewData(); ScDocument* pDoc = pViewData->GetDocument(); ScMarkData& rMark = pViewData->GetMarkData(); ScRange aScRange; ScAddress aScAddress; - USHORT nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot); + sal_uInt16 nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot); SCTAB nTab = pViewData->GetTabNo(); - BOOL bMark = TRUE; + sal_Bool bMark = sal_True; // Is this a range ? if( nResult & SCA_VALID ) @@ -310,7 +310,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) aScRange = ScRange( aScAddress, aScAddress ); // Zellen sollen nicht markiert werden - bMark = FALSE; + bMark = sal_False; } // Ist es benahmster Bereich (erst Namen dann DBBereiche) ? else @@ -338,7 +338,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) aScAddress.SetCol( pViewData->GetCurX() ); aScAddress.SetTab( nTab ); aScRange = ScRange( aScAddress, aScAddress ); - bMark = FALSE; + bMark = sal_False; nResult = SCA_VALID; } } @@ -349,10 +349,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // wir haben was gefunden if( nResult & SCA_VALID ) { - bFound = TRUE; + bFound = sal_True; SCCOL nCol = aScRange.aStart.Col(); SCROW nRow = aScRange.aStart.Row(); - BOOL bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow ); + sal_Bool bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow ); // markieren if( bMark ) @@ -367,18 +367,18 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) bNothing = ( aCurrent == aOldMark ); } else - bNothing = FALSE; + bNothing = sal_False; if (!bNothing) - MarkRange( aScRange, FALSE ); // Cursor kommt hinterher... + MarkRange( aScRange, sal_False ); // Cursor kommt hinterher... } else { - // remove old selection, unless bUnmark argument is FALSE (from navigator) + // remove old selection, unless bUnmark argument is sal_False (from navigator) if( bUnmark ) { MoveCursorAbs( nCol, nRow, - SC_FOLLOW_NONE, FALSE, FALSE ); + SC_FOLLOW_NONE, sal_False, sal_False ); } } @@ -421,7 +421,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SCTAB nNameTab; if ( pDoc->GetTable( aAddress, nNameTab ) ) { - bFound = TRUE; + bFound = sal_True; if ( nNameTab != nTab ) SetTabNo( nNameTab ); } @@ -473,7 +473,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SfxViewFrame* pViewFrame = NULL; ScDocShell* pDocSh = (ScDocShell*)SfxObjectShell::GetFirst(); - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; // zu aktivierenden ViewFrame suchen @@ -538,13 +538,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case FID_NORMALVIEWMODE: case FID_PAGEBREAKMODE: { - BOOL bWantPageBreak = nSlot == FID_PAGEBREAKMODE; + sal_Bool bWantPageBreak = nSlot == FID_PAGEBREAKMODE; // check whether there is an explicit argument, use it const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) { - BOOL bItemValue = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bItemValue = ((const SfxBoolItem*)pItem)->GetValue(); bWantPageBreak = (nSlot == FID_PAGEBREAKMODE) == bItemValue; } @@ -552,12 +552,12 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { SetPagebreakMode( bWantPageBreak ); UpdatePageBreakData(); - SetCurSubShell( GetCurObjectSelectionType(), TRUE ); + SetCurSubShell( GetCurObjectSelectionType(), sal_True ); PaintGrid(); PaintTop(); PaintLeft(); rBindings.Invalidate( nSlot ); - rReq.AppendItem( SfxBoolItem( nSlot, TRUE ) ); + rReq.AppendItem( SfxBoolItem( nSlot, sal_True ) ); rReq.Done(); } } @@ -565,7 +565,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case FID_FUNCTION_BOX: { - USHORT nChildId = ScFunctionChildWindow::GetChildWindowId(); + sal_uInt16 nChildId = ScFunctionChildWindow::GetChildWindowId(); if ( rReq.GetArgs() ) pThisFrame->SetChildWindow( nChildId, ((const SfxBoolItem&) (rReq.GetArgs()->Get(FID_FUNCTION_BOX))).GetValue()); else @@ -582,9 +582,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case FID_TOGGLESYNTAX: { - BOOL bSet = !GetViewData()->IsSyntaxMode(); + sal_Bool bSet = !GetViewData()->IsSyntaxMode(); const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); GetViewData()->SetSyntaxMode( bSet ); PaintGrid(); @@ -595,9 +595,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) break; case FID_TOGGLEHEADERS: { - BOOL bSet = !GetViewData()->IsHeaderMode(); + sal_Bool bSet = !GetViewData()->IsHeaderMode(); const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); GetViewData()->SetHeaderMode( bSet ); RepeatResize(); @@ -611,9 +611,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { ScViewData* pViewData = GetViewData(); const ScViewOptions& rOpts = pViewData->GetOptions(); - BOOL bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS ); + sal_Bool bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS ); const SfxPoolItem *pItem; - if( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET ) + if( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bFormulaMode = ((const SfxBoolItem *)pItem)->GetValue(); ScViewOptions rSetOpts = ScViewOptions( rOpts ); @@ -630,11 +630,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case FID_TOGGLEINPUTLINE: { - USHORT nId = ScInputWindowWrapper::GetChildWindowId(); + sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId(); SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); - BOOL bSet = ( pWnd == NULL ); + sal_Bool bSet = ( pWnd == NULL ); const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); pThisFrame->SetChildWindow( nId, bSet ); @@ -647,14 +647,14 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_ATTR_ZOOM: // Statuszeile case FID_SCALE: { - BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); + sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); SvxZoomType eOldZoomType = GetZoomType(); SvxZoomType eNewZoomType = eOldZoomType; const Fraction& rOldY = GetViewData()->GetZoomY(); // Y wird angezeigt - USHORT nOldZoom = (USHORT)(( rOldY.GetNumerator() * 100 ) + sal_uInt16 nOldZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); - USHORT nZoom = nOldZoom; - BOOL bCancel = FALSE; + sal_uInt16 nZoom = nOldZoom; + sal_Bool bCancel = sal_False; if ( pReqArgs ) { @@ -671,7 +671,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) //CHINA001 SvxZoomDialog* pDlg = NULL; AbstractSvxZoomDialog* pDlg = NULL; ScMarkData& rMark = GetViewData()->GetMarkData(); - USHORT nBtnFlags = SVX_ZOOM_ENABLE_50 + sal_uInt16 nBtnFlags = SVX_ZOOM_ENABLE_50 | SVX_ZOOM_ENABLE_75 | SVX_ZOOM_ENABLE_100 | SVX_ZOOM_ENABLE_150 @@ -757,10 +757,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_ATTR_ZOOMSLIDER: { const SfxPoolItem* pItem = NULL; - BOOL bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); - if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem) == SFX_ITEM_SET ) + sal_Bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom(); + if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem) == SFX_ITEM_SET ) { - const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); + const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue(); if( nCurrentZoom ) { SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom ); @@ -900,7 +900,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if ( eHSplit == SC_SPLIT_NORMAL || eVSplit == SC_SPLIT_NORMAL ) // aufheben RemoveSplit(); else if ( eHSplit == SC_SPLIT_FIX || eVSplit == SC_SPLIT_FIX ) // normal - FreezeSplitters( FALSE ); + FreezeSplitters( sal_False ); else // erzeugen SplitAtCursor(); rReq.Done(); @@ -916,7 +916,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if ( eHSplit == SC_SPLIT_FIX || eVSplit == SC_SPLIT_FIX ) // aufheben RemoveSplit(); else - FreezeSplitters( TRUE ); // erzeugen oder fixieren + FreezeSplitters( sal_True ); // erzeugen oder fixieren rReq.Done(); InvalidateSplit(); @@ -927,10 +927,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case FID_CHG_SHOW: { - USHORT nId = ScHighlightChgDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScHighlightChgDlgWrapper::GetChildWindowId(); SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); } break; @@ -941,10 +941,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) rReq.Done (); /* - USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId(); SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); - pScMod->SetRefDialog( nId, pWnd ? FALSE : TRUE ); + pScMod->SetRefDialog( nId, pWnd ? sal_False : sal_True ); */ } break; @@ -960,7 +960,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { const SfxPoolItem* pItem; if ( pReqArgs && - pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET && + pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxStringItem ) ) { String aComment = ((const SfxStringItem*)pItem)->GetValue(); @@ -982,7 +982,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if (!GetScDrawView()) { GetViewData()->GetDocShell()->MakeDrawLayer(); - rBindings.InvalidateAll(FALSE); + rBindings.InvalidateAll(sal_False); } break; @@ -1005,7 +1005,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) ScDocProtection* pProtect = pDoc->GetDocProtection(); if (pProtect && pProtect->isProtected()) { - BOOL bCancel = FALSE; + sal_Bool bCancel = sal_False; String aPassword; if (pProtect->isProtectedWithPass()) @@ -1021,13 +1021,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if (pDlg->Execute() == RET_OK) aPassword = pDlg->GetPassword(); else - bCancel = TRUE; + bCancel = sal_True; delete pDlg; } if (!bCancel) { Unprotect( TABLEID_DOC, aPassword ); - rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, FALSE ) ); + rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, sal_False ) ); rReq.Done(); } } @@ -1046,7 +1046,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { String aPassword = pDlg->GetPassword(); Protect( TABLEID_DOC, aPassword ); - rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, TRUE ) ); + rReq.AppendItem( SfxBoolItem( FID_PROTECT_DOC, sal_True ) ); rReq.Done(); } @@ -1135,7 +1135,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) #else auto_ptr<SfxPasswordDialog> pDlg; String aPassword; - BOOL bCancel = FALSE; + sal_Bool bCancel = sal_False; bool bNewProtection = ! bOldProtection; if( pReqArgs ) @@ -1167,7 +1167,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if (pDlg->Execute() == RET_OK) aPassword = pDlg->GetPassword(); else - bCancel = TRUE; + bCancel = sal_True; } if (!pReqArgs) @@ -1190,7 +1190,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if (pDlg->Execute() == RET_OK) aPassword = pDlg->GetPassword(); else - bCancel = TRUE; + bCancel = sal_True; } if( !bCancel ) diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 1e494c1ee..44f5feb97 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -107,13 +107,13 @@ using namespace com::sun::star; // STATIC DATA ----------------------------------------------------------- -USHORT ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC; -USHORT ScTabViewShell::nInsCellsCtrlState = 0; -USHORT ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM; +sal_uInt16 ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC; +sal_uInt16 ScTabViewShell::nInsCellsCtrlState = 0; +sal_uInt16 ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM; // ----------------------------------------------------------------------- -void __EXPORT ScTabViewShell::Activate(BOOL bMDI) +void __EXPORT ScTabViewShell::Activate(sal_Bool bMDI) { SfxViewShell::Activate(bMDI); @@ -125,7 +125,7 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI) ScModule* pScMod = SC_MOD(); pScMod->ViewShellChanged(); - ActivateView( TRUE, bFirstActivate ); + ActivateView( sal_True, bFirstActivate ); ActivateOlk( GetViewData() ); // #56870# AutoCorrect umsetzen, falls der Writer seins neu angelegt hat @@ -166,12 +166,12 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI) } } - UpdateInputHandler( TRUE ); + UpdateInputHandler( sal_True ); if ( bFirstActivate ) { SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) ); - bFirstActivate = FALSE; + bFirstActivate = sal_False; // #116278# ReadExtOptions (view settings from Excel import) must also be done // after the ctor, because of the potential calls to Window::Show. @@ -183,7 +183,7 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI) if ( pExtOpt && pExtOpt->IsChanged() ) { GetViewData()->ReadExtOptions(*pExtOpt); // Excel view settings - SetTabNo( GetViewData()->GetTabNo(), TRUE ); + SetTabNo( GetViewData()->GetTabNo(), sal_True ); pExtOpt->SetChanged( false ); } } @@ -209,7 +209,7 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI) if(pScMod->IsRefDialogOpen()) { - USHORT nModRefDlgId=pScMod->GetCurRefDlgId(); + sal_uInt16 nModRefDlgId=pScMod->GetCurRefDlgId(); SfxChildWindow* pChildWnd = pThisFrame->GetChildWindow( nModRefDlgId ); if ( pChildWnd ) { @@ -227,7 +227,7 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI) // beim Umschalten zwischen Dokumenten) } -void __EXPORT ScTabViewShell::Deactivate(BOOL bMDI) +void __EXPORT ScTabViewShell::Deactivate(sal_Bool bMDI) { HideTip(); @@ -249,17 +249,17 @@ void __EXPORT ScTabViewShell::Deactivate(BOOL bMDI) { // #85421# during shell deactivation, shells must not be switched, or the loop // through the shell stack (in SfxDispatcher::DoDeactivate_Impl) will not work - BOOL bOldDontSwitch = bDontSwitch; - bDontSwitch = TRUE; + sal_Bool bOldDontSwitch = bDontSwitch; + bDontSwitch = sal_True; DeActivateOlk( GetViewData() ); - ActivateView( FALSE, FALSE ); + ActivateView( sal_False, sal_False ); if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace - GetViewData()->GetDocShell()->UpdateOle(GetViewData(),TRUE); + GetViewData()->GetDocShell()->UpdateOle(GetViewData(),sal_True); if ( pHdl ) - pHdl->NotifyChange( NULL, TRUE ); // Timer-verzoegert wg. Dokumentwechsel + pHdl->NotifyChange( NULL, sal_True ); // Timer-verzoegert wg. Dokumentwechsel if (pScActiveViewShell == this) pScActiveViewShell = NULL; @@ -289,7 +289,7 @@ void ScTabViewShell::SetActive() #endif } -USHORT __EXPORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing) +sal_uInt16 __EXPORT ScTabViewShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing) { // Call EnterHandler even in formula mode here, // so a formula change in an embedded object isn't lost @@ -316,8 +316,8 @@ USHORT __EXPORT ScTabViewShell::PrepareClose(BOOL bUI, BOOL bForBrowsing) if ( pFormShell ) { - USHORT nRet = pFormShell->PrepareClose(bUI, bForBrowsing); - if (nRet!=TRUE) + sal_uInt16 nRet = pFormShell->PrepareClose(bUI, bForBrowsing); + if (nRet!=sal_True) return nRet; } return SfxViewShell::PrepareClose(bUI,bForBrowsing); @@ -414,7 +414,7 @@ void __EXPORT ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &r aNewSize.Height() += aBorder.Top() + aBorder.Bottom(); } - DoResize( rOfs, aNewSize, TRUE ); // rSize = Groesse von gridwin + DoResize( rOfs, aNewSize, sal_True ); // rSize = Groesse von gridwin UpdateOleZoom(); // Zoom fuer In-Place berechnen @@ -455,7 +455,7 @@ void __EXPORT ScTabViewShell::SetZoomFactor( const Fraction &rZoomX, const Fract aNewY = aFrac400; GetViewData()->UpdateScreenZoom( aNewX, aNewY ); - SetZoom( aNewX, aNewY, TRUE ); + SetZoom( aNewX, aNewY, sal_True ); PaintGrid(); PaintTop(); @@ -478,7 +478,7 @@ void __EXPORT ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const SCCOL nCol = pViewData->GetPosX(WhichH(ePos)); SCROW nRow = pViewData->GetPosY(WhichV(ePos)); SCTAB nTab = pViewData->GetTabNo(); - BOOL bNegativePage = pDoc->IsNegativePage( nTab ); + sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab ); if ( bNegativePage ) @@ -505,14 +505,14 @@ void __EXPORT ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const SCsCOL nPosX; SCsROW nPosY; pViewData->GetPosFromPixel( aTest.X(), aTest.Y(), ePos, nPosX, nPosY ); - BOOL bLeft; - BOOL bTop; + sal_Bool bLeft; + sal_Bool bTop; pViewData->GetMouseQuadrant( aTest, ePos, nPosX, nPosY, bLeft, bTop ); if (!bLeft) ++nPosX; if (!bTop) ++nPosY; - aTest = pViewData->GetScrPos( (SCCOL)nPosX, (SCROW)nPosY, ePos, TRUE ); + aTest = pViewData->GetScrPos( (SCCOL)nPosX, (SCROW)nPosY, ePos, sal_True ); rRect.SetSize(Size(aTest.X(),aTest.Y())); #endif @@ -547,7 +547,7 @@ void __EXPORT ScTabViewShell::ShowCursor(FASTBOOL /* bOn */) //------------------------------------------------------------------ -void __EXPORT ScTabViewShell::WriteUserData(String& rData, BOOL /* bBrowse */) +void __EXPORT ScTabViewShell::WriteUserData(String& rData, sal_Bool /* bBrowse */) { GetViewData()->WriteUserData(rData); } @@ -557,7 +557,7 @@ void ScTabViewShell::WriteUserDataSequence (uno::Sequence < beans::PropertyValue GetViewData()->WriteUserDataSequence (rSettings); } -void __EXPORT ScTabViewShell::ReadUserData(const String& rData, BOOL /* bBrowse */) +void __EXPORT ScTabViewShell::ReadUserData(const String& rData, sal_Bool /* bBrowse */) { if ( !GetViewData()->GetDocShell()->IsPreview() ) DoReadUserData( rData ); @@ -572,13 +572,13 @@ void ScTabViewShell::ReadUserDataSequence (const uno::Sequence < beans::Property void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::PropertyValue >& rSettings ) { Window* pOldWin = GetActiveWin(); - BOOL bFocus = pOldWin && pOldWin->HasFocus(); + sal_Bool bFocus = pOldWin && pOldWin->HasFocus(); GetViewData()->ReadUserDataSequence(rSettings); - SetTabNo( GetViewData()->GetTabNo(), TRUE ); + SetTabNo( GetViewData()->GetTabNo(), sal_True ); if ( GetViewData()->IsPagebreakMode() ) - SetCurSubShell( GetCurObjectSelectionType(), TRUE ); + SetCurSubShell( GetCurObjectSelectionType(), sal_True ); Window* pNewWin = GetActiveWin(); if (pNewWin && pNewWin != pOldWin) @@ -607,13 +607,13 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper void ScTabViewShell::DoReadUserData( const String& rData ) { Window* pOldWin = GetActiveWin(); - BOOL bFocus = pOldWin && pOldWin->HasFocus(); + sal_Bool bFocus = pOldWin && pOldWin->HasFocus(); GetViewData()->ReadUserData(rData); - SetTabNo( GetViewData()->GetTabNo(), TRUE ); + SetTabNo( GetViewData()->GetTabNo(), sal_True ); if ( GetViewData()->IsPagebreakMode() ) - SetCurSubShell( GetCurObjectSelectionType(), TRUE ); + SetCurSubShell( GetCurObjectSelectionType(), sal_True ); Window* pNewWin = GetActiveWin(); if (pNewWin && pNewWin != pOldWin) @@ -649,7 +649,7 @@ void ScTabViewShell::DoReadUserData( const String& rData ) //UNUSED2008-05 void ScTabViewShell::StateDisabled( SfxItemSet& rSet ) //UNUSED2008-05 { //UNUSED2008-05 SfxWhichIter aIter( rSet ); -//UNUSED2008-05 USHORT nWhich = aIter.FirstWhich(); +//UNUSED2008-05 sal_uInt16 nWhich = aIter.FirstWhich(); //UNUSED2008-05 //UNUSED2008-05 while ( nWhich ) //UNUSED2008-05 { @@ -660,7 +660,7 @@ void ScTabViewShell::DoReadUserData( const String& rData ) void ScTabViewShell::SetDrawShellOrSub() { - bActiveDrawSh = TRUE; + bActiveDrawSh = sal_True; if(bActiveDrawFormSh) { @@ -690,7 +690,7 @@ void ScTabViewShell::SetDrawShellOrSub() } } -void ScTabViewShell::SetDrawShell( BOOL bActive ) +void ScTabViewShell::SetDrawShell( sal_Bool bActive ) { if(bActive) { @@ -706,17 +706,17 @@ void ScTabViewShell::SetDrawShell( BOOL bActive ) { SetCurSubShell(OST_Cell); } - bActiveDrawFormSh=FALSE; - bActiveGraphicSh=FALSE; - bActiveMediaSh=FALSE; - bActiveOleObjectSh=FALSE; - bActiveChartSh=FALSE; + bActiveDrawFormSh=sal_False; + bActiveGraphicSh=sal_False; + bActiveMediaSh=sal_False; + bActiveOleObjectSh=sal_False; + bActiveChartSh=sal_False; } - BOOL bWasDraw = bActiveDrawSh || bActiveDrawTextSh; + sal_Bool bWasDraw = bActiveDrawSh || bActiveDrawTextSh; bActiveDrawSh = bActive; - bActiveDrawTextSh = FALSE; + bActiveDrawTextSh = sal_False; if ( !bActive ) { @@ -727,22 +727,22 @@ void ScTabViewShell::SetDrawShell( BOOL bActive ) { // Aktiven Teil an Cursor anpassen, etc. MoveCursorAbs( GetViewData()->GetCurX(), GetViewData()->GetCurY(), - SC_FOLLOW_NONE, FALSE, FALSE, TRUE ); + SC_FOLLOW_NONE, sal_False, sal_False, sal_True ); } } } -void ScTabViewShell::SetDrawTextShell( BOOL bActive ) +void ScTabViewShell::SetDrawTextShell( sal_Bool bActive ) { bActiveDrawTextSh = bActive; if ( bActive ) { - bActiveDrawFormSh=FALSE; - bActiveGraphicSh=FALSE; - bActiveMediaSh=FALSE; - bActiveOleObjectSh=FALSE; - bActiveChartSh=FALSE; - bActiveDrawSh = FALSE; + bActiveDrawFormSh=sal_False; + bActiveGraphicSh=sal_False; + bActiveMediaSh=sal_False; + bActiveOleObjectSh=sal_False; + bActiveChartSh=sal_False; + bActiveDrawSh = sal_False; SetCurSubShell(OST_DrawText); } else @@ -750,7 +750,7 @@ void ScTabViewShell::SetDrawTextShell( BOOL bActive ) } -void ScTabViewShell::SetPivotShell( BOOL bActive ) +void ScTabViewShell::SetPivotShell( sal_Bool bActive ) { bActivePivotSh = bActive; @@ -761,12 +761,12 @@ void ScTabViewShell::SetPivotShell( BOOL bActive ) { if ( bActive ) { - bActiveDrawTextSh = bActiveDrawSh = FALSE; - bActiveDrawFormSh=FALSE; - bActiveGraphicSh=FALSE; - bActiveMediaSh=FALSE; - bActiveOleObjectSh=FALSE; - bActiveChartSh=FALSE; + bActiveDrawTextSh = bActiveDrawSh = sal_False; + bActiveDrawFormSh=sal_False; + bActiveGraphicSh=sal_False; + bActiveMediaSh=sal_False; + bActiveOleObjectSh=sal_False; + bActiveChartSh=sal_False; SetCurSubShell(OST_Pivot); } else @@ -774,31 +774,31 @@ void ScTabViewShell::SetPivotShell( BOOL bActive ) } } -void ScTabViewShell::SetAuditShell( BOOL bActive ) +void ScTabViewShell::SetAuditShell( sal_Bool bActive ) { bActiveAuditingSh = bActive; if ( bActive ) { - bActiveDrawTextSh = bActiveDrawSh = FALSE; - bActiveDrawFormSh=FALSE; - bActiveGraphicSh=FALSE; - bActiveMediaSh=FALSE; - bActiveOleObjectSh=FALSE; - bActiveChartSh=FALSE; + bActiveDrawTextSh = bActiveDrawSh = sal_False; + bActiveDrawFormSh=sal_False; + bActiveGraphicSh=sal_False; + bActiveMediaSh=sal_False; + bActiveOleObjectSh=sal_False; + bActiveChartSh=sal_False; SetCurSubShell(OST_Auditing); } else SetCurSubShell(OST_Cell); } -void ScTabViewShell::SetDrawFormShell( BOOL bActive ) +void ScTabViewShell::SetDrawFormShell( sal_Bool bActive ) { bActiveDrawFormSh = bActive; if(bActiveDrawFormSh) SetCurSubShell(OST_DrawForm); } -void ScTabViewShell::SetChartShell( BOOL bActive ) +void ScTabViewShell::SetChartShell( sal_Bool bActive ) { bActiveChartSh = bActive; @@ -806,7 +806,7 @@ void ScTabViewShell::SetChartShell( BOOL bActive ) SetCurSubShell(OST_Chart); } -void ScTabViewShell::SetGraphicShell( BOOL bActive ) +void ScTabViewShell::SetGraphicShell( sal_Bool bActive ) { bActiveGraphicSh = bActive; @@ -814,7 +814,7 @@ void ScTabViewShell::SetGraphicShell( BOOL bActive ) SetCurSubShell(OST_Graphic); } -void ScTabViewShell::SetMediaShell( BOOL bActive ) +void ScTabViewShell::SetMediaShell( sal_Bool bActive ) { bActiveMediaSh = bActive; @@ -822,7 +822,7 @@ void ScTabViewShell::SetMediaShell( BOOL bActive ) SetCurSubShell(OST_Media); } -void ScTabViewShell::SetOleObjectShell( BOOL bActive ) +void ScTabViewShell::SetOleObjectShell( sal_Bool bActive ) { bActiveOleObjectSh = bActive; @@ -832,7 +832,7 @@ void ScTabViewShell::SetOleObjectShell( BOOL bActive ) SetCurSubShell(OST_Cell); } -void ScTabViewShell::SetEditShell(EditView* pView, BOOL bActive ) +void ScTabViewShell::SetEditShell(EditView* pView, sal_Bool bActive ) { if(bActive) { @@ -850,7 +850,7 @@ void ScTabViewShell::SetEditShell(EditView* pView, BOOL bActive ) bActiveEditSh = bActive; } -void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) +void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) { ScViewData* pViewData = GetViewData(); ScDocShell* pDocSh = pViewData->GetDocShell(); @@ -863,7 +863,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pCellShell->SetRepeatTarget( &aTarget ); } - BOOL bPgBrk=pViewData->IsPagebreakMode(); + sal_Bool bPgBrk=pViewData->IsPagebreakMode(); if(bPgBrk && !pPageBreakShell) { @@ -874,8 +874,8 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) if ( eOST!=eCurOST || bForce ) { - BOOL bCellBrush = FALSE; // "format paint brush" allowed for cells - BOOL bDrawBrush = FALSE; // "format paint brush" allowed for drawing objects + sal_Bool bCellBrush = sal_False; // "format paint brush" allowed for cells + sal_Bool bDrawBrush = sal_False; // "format paint brush" allowed for drawing objects if(eCurOST!=OST_NONE) RemoveSubShell(); @@ -888,7 +888,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) { AddSubShell(*pCellShell); if(bPgBrk) AddSubShell(*pPageBreakShell); - bCellBrush = TRUE; + bCellBrush = sal_True; } break; case OST_Editing: @@ -935,7 +935,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pDrawShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pDrawShell); - bDrawBrush = TRUE; + bDrawBrush = sal_True; } break; @@ -948,7 +948,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pDrawFormShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pDrawFormShell); - bDrawBrush = TRUE; + bDrawBrush = sal_True; } break; @@ -961,7 +961,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pChartShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pChartShell); - bDrawBrush = TRUE; + bDrawBrush = sal_True; } break; @@ -974,7 +974,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pOleObjectShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pOleObjectShell); - bDrawBrush = TRUE; + bDrawBrush = sal_True; } break; @@ -987,7 +987,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pGraphicShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pGraphicShell); - bDrawBrush = TRUE; + bDrawBrush = sal_True; } break; @@ -1014,7 +1014,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pPivotShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pPivotShell); - bCellBrush = TRUE; + bCellBrush = sal_True; } break; case OST_Auditing: @@ -1030,7 +1030,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) pAuditingShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pAuditingShell); - bCellBrush = TRUE; + bCellBrush = sal_True; } break; default: @@ -1049,7 +1049,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, BOOL bForce) } } -void ScTabViewShell::SetFormShellAtTop( BOOL bSet ) +void ScTabViewShell::SetFormShellAtTop( sal_Bool bSet ) { if ( pFormShell && !bSet ) pFormShell->ForgetActiveControl(); // let the FormShell know it no longer has the focus @@ -1057,14 +1057,14 @@ void ScTabViewShell::SetFormShellAtTop( BOOL bSet ) if ( bFormShellAtTop != bSet ) { bFormShellAtTop = bSet; - SetCurSubShell( GetCurObjectSelectionType(), TRUE ); + SetCurSubShell( GetCurObjectSelectionType(), sal_True ); } } IMPL_LINK( ScTabViewShell, FormControlActivated, FmFormShell*, EMPTYARG ) { // a form control got the focus, so the form shell has to be on top - SetFormShellAtTop( TRUE ); + SetFormShellAtTop( sal_True ); return 0; } @@ -1078,9 +1078,9 @@ ObjectSelectionType ScTabViewShell::GetCurObjectSelectionType() SfxShell* ScTabViewShell::GetMySubShell() const { - // GetSubShell() war frueher const, und GetSubShell(USHORT) sollte es auch sein... + // GetSubShell() war frueher const, und GetSubShell(sal_uInt16) sollte es auch sein... - USHORT nPos = 0; + sal_uInt16 nPos = 0; SfxShell* pSub = ((ScTabViewShell*)this)->GetSubShell(nPos); while (pSub) { @@ -1107,12 +1107,12 @@ SfxShell* ScTabViewShell::GetMySubShell() const //UNUSED2008-05 } //UNUSED2008-05 } -BOOL ScTabViewShell::IsDrawTextShell() const +sal_Bool ScTabViewShell::IsDrawTextShell() const { return ( pDrawTextShell && ( GetMySubShell() == pDrawTextShell ) ); } -BOOL ScTabViewShell::IsAuditShell() const +sal_Bool ScTabViewShell::IsAuditShell() const { return ( pAuditingShell && ( GetMySubShell() == pAuditingShell ) ); } @@ -1148,13 +1148,13 @@ ScTabViewShell* ScTabViewShell::GetActiveViewShell() //------------------------------------------------------------------ -SfxPrinter* __EXPORT ScTabViewShell::GetPrinter( BOOL bCreate ) +SfxPrinter* __EXPORT ScTabViewShell::GetPrinter( sal_Bool bCreate ) { // Drucker ist immer da (wird fuer die FontListe schon beim Starten angelegt) return GetViewData()->GetDocShell()->GetPrinter(bCreate); } -USHORT __EXPORT ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool ) +sal_uInt16 __EXPORT ScTabViewShell::SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool ) { return GetViewData()->GetDocShell()->SetPrinter( pNewPrinter, nDiffFlags ); } @@ -1203,8 +1203,8 @@ PrintDialog* __EXPORT ScTabViewShell::CreatePrintDialog( Window *pParent ) pDlg->EnableRange ( PRINTDIALOG_RANGE ); pDlg->SetFirstPage ( 1 ); pDlg->SetMinPage ( 1 ); - pDlg->SetLastPage ( (USHORT)nDocPageMax ); - pDlg->SetMaxPage ( (USHORT)nDocPageMax ); + pDlg->SetLastPage ( (sal_uInt16)nDocPageMax ); + pDlg->SetMaxPage ( (sal_uInt16)nDocPageMax ); pDlg->EnableCollate (); return pDlg; @@ -1230,7 +1230,7 @@ void __EXPORT ScTabViewShell::PreparePrint( PrintDialog* pPrintDialog ) } ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter, - PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI ) + PrintDialog *pPrintDialog, sal_Bool bSilent, sal_Bool bIsAPI ) { // #72527# if SID_PRINTDOCDIRECT is executed and there's a selection, // ask if only the selection should be printed @@ -1245,7 +1245,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter, return ERRCODE_IO_ABORT; if ( nBtn == RET_OK ) - bPrintSelected = TRUE; + bPrintSelected = sal_True; } ErrCode nRet = ERRCODE_IO_ABORT; @@ -1258,7 +1258,7 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter, uno::Sequence<sal_Int32> aSheets; SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); - USHORT nPrinted = 0; + sal_uInt16 nPrinted = 0; for ( SCTAB nTab=0; nTab<nTabCount; nTab++ ) if ( bAllTabs || rMarkData.GetTableSelect(nTab) ) { @@ -1276,12 +1276,12 @@ ErrCode ScTabViewShell::DoPrint( SfxPrinter *pPrinter, nRet = SfxViewShell::DoPrint( pPrinter, pPrintDialog, bSilent, bIsAPI ); } - bPrintSelected = FALSE; + bPrintSelected = sal_False; return nRet; } -USHORT __EXPORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, +sal_uInt16 __EXPORT ScTabViewShell::Print( SfxProgress& rProgress, sal_Bool bIsAPI, PrintDialog* pPrintDialog ) { ScDocShell* pDocShell = GetViewData()->GetDocShell(); @@ -1296,7 +1296,7 @@ USHORT __EXPORT ScTabViewShell::Print( SfxProgress& rProgress, BOOL bIsAPI, void ScTabViewShell::StopEditShell() { if ( pEditShell != NULL && !bDontSwitch ) - SetEditShell(NULL, FALSE ); + SetEditShell(NULL, sal_False ); } //------------------------------------------------------------------ @@ -1314,7 +1314,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefClose, String*, EMPTYARG ) SetTabNo( GetViewData()->GetRefTabNo() ); } - ScSimpleRefDlgWrapper::SetAutoReOpen( TRUE ); + ScSimpleRefDlgWrapper::SetAutoReOpen( sal_True ); return 0; } @@ -1360,7 +1360,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefChange, String*, pResult ) void ScTabViewShell::StartSimpleRefDialog( const String& rTitle, const String& rInitVal, - BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection ) + sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ) { SfxViewFrame* pViewFrm = GetViewFrame(); @@ -1373,9 +1373,9 @@ void ScTabViewShell::StartSimpleRefDialog( pViewFrm->GetFrame().Appear(); } - USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId(); - SC_MOD()->SetRefDialog( nId, TRUE, pViewFrm ); + SC_MOD()->SetRefDialog( nId, sal_True, pViewFrm ); ScSimpleRefDlgWrapper* pWnd = (ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId ); if (pWnd) @@ -1386,7 +1386,7 @@ void ScTabViewShell::StartSimpleRefDialog( LINK( this, ScTabViewShell, SimpleRefChange ) ); pWnd->SetRefString( rInitVal ); pWnd->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection ); - pWnd->SetAutoReOpen( FALSE ); + pWnd->SetAutoReOpen( sal_False ); Window* pWin = pWnd->GetWindow(); pWin->SetText( rTitle ); pWnd->StartRefInput(); @@ -1396,7 +1396,7 @@ void ScTabViewShell::StartSimpleRefDialog( void ScTabViewShell::StopSimpleRefDialog() { SfxViewFrame* pViewFrm = GetViewFrame(); - USHORT nId = ScSimpleRefDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScSimpleRefDlgWrapper::GetChildWindowId(); ScSimpleRefDlgWrapper* pWnd = (ScSimpleRefDlgWrapper*)pViewFrm->GetChildWindow( nId ); if (pWnd) @@ -1409,29 +1409,29 @@ void ScTabViewShell::StopSimpleRefDialog() //------------------------------------------------------------------ -BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) +sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { ScModule* pScMod = SC_MOD(); SfxViewFrame* pThisFrame = GetViewFrame(); if ( pThisFrame->GetChildWindow( SID_OPENDLG_FUNCTION ) ) - return FALSE; + return sal_False; KeyCode aCode = rKEvt.GetKeyCode(); - BOOL bShift = aCode.IsShift(); - BOOL bControl = aCode.IsMod1(); - BOOL bAlt = aCode.IsMod2(); - USHORT nCode = aCode.GetCode(); - BOOL bUsed = FALSE; - BOOL bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles - BOOL bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace - BOOL bDraw = IsDrawTextEdit(); + sal_Bool bShift = aCode.IsShift(); + sal_Bool bControl = aCode.IsMod1(); + sal_Bool bAlt = aCode.IsMod2(); + sal_uInt16 nCode = aCode.GetCode(); + sal_Bool bUsed = sal_False; + sal_Bool bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles + sal_Bool bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace + sal_Bool bDraw = IsDrawTextEdit(); HideNoteMarker(); // Notiz-Anzeige // don't do extra HideCursor/ShowCursor calls if EnterHandler will switch to a different sheet - BOOL bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() ); - BOOL bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet; + sal_Bool bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() ); + sal_Bool bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet; if (bHideCursor) HideAllCursors(); @@ -1444,17 +1444,17 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe if( !bUsed ) - bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators + bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators } else if( bAnyEdit ) { - BOOL bIsType = FALSE; - USHORT nModi = aCode.GetModifier(); - USHORT nGroup = aCode.GetGroup(); + sal_Bool bIsType = sal_False; + sal_uInt16 nModi = aCode.GetModifier(); + sal_uInt16 nGroup = aCode.GetGroup(); if ( nGroup == KEYGROUP_NUM || nGroup == KEYGROUP_ALPHA || nGroup == 0 ) if ( !bControl && !bAlt ) - bIsType = TRUE; + bIsType = sal_True; if ( nGroup == KEYGROUP_MISC ) switch ( nCode ) @@ -1477,14 +1477,14 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) bIsType = (nModi == 0); // nur ohne Modifier break; default: - bIsType = TRUE; + bIsType = sal_True; } if( bIsType ) bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe if( !bUsed ) - bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators + bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators if ( !bUsed && !bIsType && nCode != KEY_RETURN ) // Eingabe nochmal hinterher bUsed = pScMod->InputKeyEvent( rKEvt ); @@ -1502,20 +1502,20 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) !(eFunc == KEYFUNC_COPY && eMarkType == SC_MARK_SIMPLE_FILTERED) ) { ErrorMessage(STR_NOMULTISELECT); - bUsed = TRUE; + bUsed = sal_True; } } if (!bUsed) - bUsed = sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKEvt )); // accelerators + bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators // #74696# during inplace editing, some slots are handled by the // container app and are executed during Window::KeyInput. // -> don't pass keys to input handler that would be used there // but should call slots instead. - BOOL bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW ); + sal_Bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW ); if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent ) - bUsed = pScMod->InputKeyEvent( rKEvt, TRUE ); // Eingabe + bUsed = pScMod->InputKeyEvent( rKEvt, sal_True ); // Eingabe } if (!bInPlace && !bUsed && !bDraw) @@ -1524,7 +1524,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { case KEY_RETURN: { - BOOL bNormal = !bControl && !bAlt; + sal_Bool bNormal = !bControl && !bAlt; if ( !bAnyEdit && bNormal ) { // je nach Optionen mit Enter in den Edit-Modus schalten @@ -1533,17 +1533,17 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) if ( rOpt.GetEnterEdit() ) { pScMod->SetInputMode( SC_INPUT_TABLE ); - bUsed = TRUE; + bUsed = sal_True; } } - BOOL bEditReturn = bControl && !bShift; // An Edit-Engine weiter + sal_Bool bEditReturn = bControl && !bShift; // An Edit-Engine weiter if ( !bUsed && !bEditReturn ) { if ( bOnRefSheet ) HideAllCursors(); - BYTE nMode = SC_ENTER_NORMAL; + sal_uInt8 nMode = SC_ENTER_NORMAL; if ( bShift && bControl ) nMode = SC_ENTER_MATRIX; else if ( bAlt ) @@ -1560,7 +1560,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD ); } else - UpdateInputHandler(TRUE); + UpdateInputHandler(sal_True); if ( bOnRefSheet ) ShowAllCursors(); @@ -1569,7 +1569,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) // anderes Dokument diese ViewShell nicht die ist, auf der eingegeben // wird! - bUsed = TRUE; + bUsed = sal_True; } } break; @@ -1580,24 +1580,24 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) if ( !bUsed && bAlt && !bControl ) { - USHORT nSlotId = 0; + sal_uInt16 nSlotId = 0; switch (nCode) { case KEY_UP: ModifyCellSize( DIR_TOP, bShift ); - bUsed = TRUE; + bUsed = sal_True; break; case KEY_DOWN: ModifyCellSize( DIR_BOTTOM, bShift ); - bUsed = TRUE; + bUsed = sal_True; break; case KEY_LEFT: ModifyCellSize( DIR_LEFT, bShift ); - bUsed = TRUE; + bUsed = sal_True; break; case KEY_RIGHT: ModifyCellSize( DIR_RIGHT, bShift ); - bUsed = TRUE; + bUsed = sal_True; break; case KEY_PAGEUP: nSlotId = bShift ? SID_CURSORPAGELEFT_SEL : SID_CURSORPAGELEFT_; @@ -1609,7 +1609,7 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) if ( nSlotId ) { GetViewData()->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD ); - bUsed = TRUE; + bUsed = sal_True; } } @@ -1619,9 +1619,9 @@ BOOL ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) return bUsed; } -BOOL ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent) +sal_Bool ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent) { - return sal::static_int_cast<BOOL>(SfxViewShell::KeyInput( rKeyEvent )); + return sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKeyEvent )); } FASTBOOL __EXPORT ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent ) @@ -1657,31 +1657,31 @@ FASTBOOL __EXPORT ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent ) aTarget( this ), \ pDialogDPObject(NULL), \ pNavSettings(NULL), \ - bActiveDrawSh(FALSE), \ - bActiveDrawTextSh(FALSE), \ - bActivePivotSh(FALSE), \ - bActiveAuditingSh(FALSE), \ - bActiveDrawFormSh(FALSE), \ - bActiveOleObjectSh(FALSE), \ - bActiveChartSh(FALSE), \ - bActiveGraphicSh(FALSE), \ - bActiveMediaSh(FALSE), \ - bActiveEditSh(FALSE), \ - bFormShellAtTop(FALSE), \ - bDontSwitch(FALSE), \ - bInFormatDialog(FALSE), \ - bPrintSelected(FALSE), \ - bReadOnly(FALSE), \ + bActiveDrawSh(sal_False), \ + bActiveDrawTextSh(sal_False), \ + bActivePivotSh(sal_False), \ + bActiveAuditingSh(sal_False), \ + bActiveDrawFormSh(sal_False), \ + bActiveOleObjectSh(sal_False), \ + bActiveChartSh(sal_False), \ + bActiveGraphicSh(sal_False), \ + bActiveMediaSh(sal_False), \ + bActiveEditSh(sal_False), \ + bFormShellAtTop(sal_False), \ + bDontSwitch(sal_False), \ + bInFormatDialog(sal_False), \ + bPrintSelected(sal_False), \ + bReadOnly(sal_False), \ pScSbxObject(NULL), \ - /*bChartDlgIsEdit(FALSE),*/ \ - bChartAreaValid(FALSE), \ + /*bChartDlgIsEdit(sal_False),*/ \ + bChartAreaValid(sal_False), \ nCurRefDlgId(0), \ pAccessibilityBroadcaster(NULL) //------------------------------------------------------------------ -void ScTabViewShell::Construct( BYTE nForceDesignMode ) +void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) { SfxApplication* pSfxApp = SFX_APP(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); @@ -1697,12 +1697,12 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) pCurFrameLine = new SvxBorderLine( &aColBlack, 20, 0, 0 ); pPivotSource = new ScArea; - StartListening(*GetViewData()->GetDocShell(),TRUE); - StartListening(*GetViewFrame(),TRUE); - StartListening(*pSfxApp,TRUE); // #i62045# #i62046# application is needed for Calc's own hints + StartListening(*GetViewData()->GetDocShell(),sal_True); + StartListening(*GetViewFrame(),sal_True); + StartListening(*pSfxApp,sal_True); // #i62045# #i62046# application is needed for Calc's own hints SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh); - BOOL bFirstView = !pFirst + sal_Bool bFirstView = !pFirst || (pFirst == GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh)); if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) @@ -1717,19 +1717,19 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) pDoc->SetVisibleTab(nVisTab); } SetTabNo( nVisTab ); - BOOL bNegativePage = pDoc->IsNegativePage( nVisTab ); + sal_Bool bNegativePage = pDoc->IsNegativePage( nVisTab ); // show the right cells GetViewData()->SetScreenPos( bNegativePage ? aVisArea.TopRight() : aVisArea.TopLeft() ); if ( GetViewFrame()->GetFrame().IsInPlace() ) // inplace { - pDocSh->SetInplace( TRUE ); // schon so initialisiert + pDocSh->SetInplace( sal_True ); // schon so initialisiert if (pDoc->IsEmbedded()) pDoc->ResetEmbedded(); // keine blaue Markierung } else if ( bFirstView ) { - pDocSh->SetInplace( FALSE ); + pDocSh->SetInplace( sal_False ); GetViewData()->RefreshZoom(); // recalculate PPT if (!pDoc->IsEmbedded()) pDoc->SetEmbedded( aVisArea ); // VisArea markieren @@ -1762,7 +1762,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) // wenn die ViewShell noch nicht kostruiert ist... if (pDoc->GetDrawLayer()) MakeDrawView( nForceDesignMode ); - ViewOptionsHasChanged(FALSE); // legt auch evtl. DrawView an + ViewOptionsHasChanged(sal_False); // legt auch evtl. DrawView an SfxUndoManager* pMgr = pDocSh->GetUndoManager(); SetUndoManager( pMgr ); @@ -1777,7 +1777,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) if ( bFirstView ) // first view? { - pDoc->SetDocVisible( TRUE ); // used when creating new sheets + pDoc->SetDocVisible( sal_True ); // used when creating new sheets if ( pDocSh->IsEmpty() ) { // set first sheet's RTL flag (following will already be initialized because of SetDocVisible) @@ -1791,7 +1791,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) pDoc->MakeTable(i,false); } - pDocSh->SetEmpty( FALSE ); // #i6232# make sure this is done only once + pDocSh->SetEmpty( sal_False ); // #i6232# make sure this is done only once } // ReadExtOptions is now in Activate @@ -1812,7 +1812,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) } if (!bLink) if (pDoc->HasDdeLinks() || pDoc->HasAreaLinks()) - bLink = TRUE; + bLink = sal_True; if (bLink) { if ( !pFirst ) @@ -1825,17 +1825,17 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) } } - BOOL bReImport = FALSE; // importierte Daten aktualisieren + sal_Bool bReImport = sal_False; // importierte Daten aktualisieren ScDBCollection* pDBColl = pDoc->GetDBCollection(); if ( pDBColl ) { - USHORT nCount = pDBColl->GetCount(); - for (USHORT i=0; i<nCount && !bReImport; i++) + sal_uInt16 nCount = pDBColl->GetCount(); + for (sal_uInt16 i=0; i<nCount && !bReImport; i++) { ScDBData* pData = (*pDBColl)[i]; if ( pData->IsStripData() && pData->HasImportParam() && !pData->HasImportSelection() ) - bReImport = TRUE; + bReImport = sal_True; } } if (bReImport) @@ -1856,10 +1856,10 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode ) // ScDispatchProviderInterceptor registers itself in ctor xDisProvInterceptor = new ScDispatchProviderInterceptor( this ); - bFirstActivate = TRUE; // NavigatorUpdate aufschieben bis Activate() + bFirstActivate = sal_True; // NavigatorUpdate aufschieben bis Activate() // #105575#; update only in the first creation of the ViewShell - pDocSh->SetUpdateEnabled(FALSE); + pDocSh->SetUpdateEnabled(sal_False); if ( GetViewFrame()->GetFrame().IsInPlace() ) UpdateHeaderWidth(); // The implace activation requires headers to be calculated @@ -1913,7 +1913,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, // has to be shown by the sfx. ReadUserData is deferred until the first Activate call. // #106334# old DesignMode state from form layer must be restored, too - BYTE nForceDesignMode = SC_FORCEMODE_NONE; + sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE; if ( pOldSh && pOldSh->ISA( ScPreviewShell ) ) { ScPreviewShell* pPreviewShell = ((ScPreviewShell*)pOldSh); @@ -1925,13 +1925,13 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, if ( GetViewData()->GetDocShell()->IsPreview() ) { // preview for template dialog: always show whole page - SetZoomType( SVX_ZOOM_WHOLEPAGE, TRUE ); // zoom value is recalculated at next Resize + SetZoomType( SVX_ZOOM_WHOLEPAGE, sal_True ); // zoom value is recalculated at next Resize } else { Fraction aFract( rAppOpt.GetZoom(), 100 ); - SetZoom( aFract, aFract, TRUE ); - SetZoomType( rAppOpt.GetZoomType(), TRUE ); + SetZoom( aFract, aFract, sal_True ); + SetZoomType( rAppOpt.GetZoomType(), sal_True ); } /*uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface(); @@ -2029,7 +2029,7 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData ) void ScTabViewShell::SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest ) { - bChartAreaValid = TRUE; + bChartAreaValid = sal_True; aChartSource = rSource; aChartPos = rDest; nChartDestTab = GetViewData()->GetTabNo(); @@ -2037,10 +2037,10 @@ void ScTabViewShell::SetChartArea( const ScRangeListRef& rSource, const Rectangl //UNUSED2008-05 void ScTabViewShell::ResetChartArea() //UNUSED2008-05 { -//UNUSED2008-05 bChartAreaValid = FALSE; +//UNUSED2008-05 bChartAreaValid = sal_False; //UNUSED2008-05 } -BOOL ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const +sal_Bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const { rSource = aChartSource; rDest = aChartPos; @@ -2048,7 +2048,7 @@ BOOL ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SC return bChartAreaValid; } -//UNUSED2008-05 BOOL ScTabViewShell::IsChartDlgEdit() const +//UNUSED2008-05 sal_Bool ScTabViewShell::IsChartDlgEdit() const //UNUSED2008-05 { //UNUSED2008-05 return bChartDlgIsEdit; //UNUSED2008-05 } @@ -2071,10 +2071,10 @@ ScNavigatorSettings* ScTabViewShell::GetNavigatorSettings() void ScTabViewShell::ExecTbx( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxPoolItem* pItem = NULL; if ( pReqArgs ) - pReqArgs->GetItemState( nSlot, TRUE, &pItem ); + pReqArgs->GetItemState( nSlot, sal_True, &pItem ); switch ( nSlot ) { diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index 3c679d5f7..597ccec0b 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -60,7 +60,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { if (rHint.ISA(SfxSimpleHint)) // ohne Parameter { - ULONG nSlot = ((SfxSimpleHint&)rHint).GetId(); + sal_uLong nSlot = ((SfxSimpleHint&)rHint).GetId(); switch ( nSlot ) { case FID_DATACHANGED: @@ -69,13 +69,13 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint case FID_REFMODECHANGED: { - BOOL bRefMode = SC_MOD()->IsFormulaMode(); + sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); if (!bRefMode) StopRefMode(); else { GetSelEngine()->Reset(); - GetFunctionSet()->SetAnchorFlag(TRUE); + GetFunctionSet()->SetAnchorFlag(sal_True); // AnchorFlag, damit gleich mit Control angehaengt werden kann } } @@ -140,7 +140,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint break; case SC_HINT_FORCESETTAB: - SetTabNo( GetViewData()->GetTabNo(), TRUE ); + SetTabNo( GetViewData()->GetTabNo(), sal_True ); break; default: @@ -150,7 +150,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint else if (rHint.ISA(ScPaintHint)) // neu zeichnen { ScPaintHint* pHint = (ScPaintHint*) &rHint; - USHORT nParts = pHint->GetParts(); + sal_uInt16 nParts = pHint->GetParts(); SCTAB nTab = GetViewData()->GetTabNo(); if (pHint->GetStartTab() <= nTab && pHint->GetEndTab() >= nTab) { @@ -211,7 +211,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint EditView* pView = GetViewData()->GetEditView(eActive); // ist nicht 0 - SetEditShell(pView ,TRUE); + SetEditShell(pView ,sal_True); } } } @@ -224,7 +224,7 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint const ScTablesHint& rTabHint = (const ScTablesHint&)rHint; SCTAB nTab1 = rTabHint.GetTab1(); SCTAB nTab2 = rTabHint.GetTab2(); - USHORT nId = rTabHint.GetId(); + sal_uInt16 nId = rTabHint.GetId(); switch (nId) { case SC_TAB_INSERTED: @@ -290,14 +290,14 @@ void __EXPORT ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint if ( nNewTab >= pDoc->GetTableCount() ) nNewTab = pDoc->GetTableCount() - 1; - BOOL bForce = !bStayOnActiveTab; - SetTabNo( nNewTab, bForce, FALSE, bStayOnActiveTab ); + sal_Bool bForce = !bStayOnActiveTab; + SetTabNo( nNewTab, bForce, sal_False, bStayOnActiveTab ); } else if (rHint.ISA(ScIndexHint)) { const ScIndexHint& rIndexHint = (const ScIndexHint&)rHint; - USHORT nId = rIndexHint.GetId(); - USHORT nIndex = rIndexHint.GetIndex(); + sal_uInt16 nId = rIndexHint.GetId(); + sal_uInt16 nIndex = rIndexHint.GetIndex(); switch (nId) { case SC_HINT_SHOWRANGEFINDER: @@ -396,7 +396,7 @@ void ScTabViewShell::MakeNumberInfoItem( ScDocument* pDoc, default: *ppItem = new SvxNumberInfoItem( pDoc->GetFormatTable(), - (const USHORT) + (const sal_uInt16) SID_ATTR_NUMBERFORMAT_INFO ); } } @@ -413,7 +413,7 @@ void ScTabViewShell::UpdateNumberFormatter( { const sal_uInt32* pDelArr = rInfoItem.GetDelArray(); - for ( USHORT i=0; i<nDelCount; i++ ) + for ( sal_uInt16 i=0; i<nDelCount; i++ ) rInfoItem.GetNumberFormatter()->DeleteEntry( pDelArr[i] ); } diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx index da9809db7..22691878c 100644 --- a/sc/source/ui/view/tabvwsh8.cxx +++ b/sc/source/ui/view/tabvwsh8.cxx @@ -60,9 +60,9 @@ void ScTabViewShell::SetDefaultFrameLine( const SvxBorderLine* pLine ) //------------------------------------------------------------------ -BOOL __EXPORT ScTabViewShell::HasSelection( BOOL bText ) const +sal_Bool __EXPORT ScTabViewShell::HasSelection( sal_Bool bText ) const { - BOOL bHas = FALSE; + sal_Bool bHas = sal_False; ScViewData* pData = (ScViewData*)GetViewData(); // const weggecasted if ( bText ) { @@ -81,7 +81,7 @@ BOOL __EXPORT ScTabViewShell::HasSelection( BOOL bText ) const if ( eMarkType == SC_MARK_SIMPLE ) bHas = ( aRange.aStart != aRange.aEnd ); // more than 1 cell else - bHas = TRUE; // multiple selection or filtered + bHas = sal_True; // multiple selection or filtered } return bHas; } diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index d1beb28fb..03242c574 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -53,9 +53,9 @@ // forwards -> galwrap.cxx (wg. CLOOKs) -USHORT GallerySGA_FORMAT_GRAPHIC(); +sal_uInt16 GallerySGA_FORMAT_GRAPHIC(); Graphic GalleryGetGraphic (); -BOOL GalleryIsLinkage (); +sal_Bool GalleryIsLinkage (); String GalleryGetFullPath (); String GalleryGetFilterName (); @@ -63,7 +63,7 @@ String GalleryGetFilterName (); class SvxIMapDlg; -USHORT ScIMapChildWindowId(); +sal_uInt16 ScIMapChildWindowId(); SvxIMapDlg* ScGetIMapDlg(); const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg ); const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg ); @@ -72,7 +72,7 @@ const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg ); void ScTabViewShell::ExecChildWin(SfxRequest& rReq) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch(nSlot) { case SID_GALLERY: @@ -99,12 +99,12 @@ void ScTabViewShell::GetChildWinState( SfxItemSet& rSet ) { if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GALLERY ) ) { - USHORT nId = GalleryChildWindow::GetChildWindowId(); + sal_uInt16 nId = GalleryChildWindow::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_GALLERY, GetViewFrame()->HasChildWindow( nId ) ) ); } else if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) { - USHORT nId = ::avmedia::MediaPlayer::GetChildWindowId(); + sal_uInt16 nId = ::avmedia::MediaPlayer::GetChildWindowId(); rSet.Put( SfxBoolItem( SID_AVMEDIA_PLAYER, GetViewFrame()->HasChildWindow( nId ) ) ); } } @@ -118,10 +118,10 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq ) if ( pArgs ) { const SfxPoolItem* pItem = NULL; - SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, TRUE, &pItem); + SfxItemState eState = pArgs->GetItemState(SID_GALLERY_FORMATS, sal_True, &pItem); if ( eState == SFX_ITEM_SET ) { - UINT32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue(); + sal_uInt32 nFormats = ((const SfxUInt32Item*)pItem)->GetValue(); /****************************************************************** * Graphik einfuegen @@ -178,13 +178,13 @@ String __EXPORT ScTabViewShell::GetDescription() const void ScTabViewShell::ExecImageMap( SfxRequest& rReq ) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch(nSlot) { case SID_IMAP: { SfxViewFrame* pThisFrame = GetViewFrame(); - USHORT nId = ScIMapChildWindowId(); + sal_uInt16 nId = ScIMapChildWindowId(); pThisFrame->ToggleChildWindow( nId ); GetViewFrame()->GetBindings().Invalidate( SID_IMAP ); @@ -238,7 +238,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq ) void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) @@ -247,15 +247,15 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) { // Disabled wird nicht mehr... - BOOL bThere = FALSE; + sal_Bool bThere = sal_False; SfxViewFrame* pThisFrame = GetViewFrame(); - USHORT nId = ScIMapChildWindowId(); + sal_uInt16 nId = ScIMapChildWindowId(); if ( pThisFrame->KnowsChildWindow(nId) ) if ( pThisFrame->HasChildWindow(nId) ) - bThere = TRUE; + bThere = sal_True; ObjectSelectionType eType=GetCurObjectSelectionType(); - BOOL bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic); + sal_Bool bEnable=(eType==OST_OleObject) ||(eType==OST_Graphic); if(!bThere && !bEnable) { rSet.DisableItem( nWhich ); @@ -269,7 +269,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) case SID_IMAP_EXEC: { - BOOL bDisable = TRUE; + sal_Bool bDisable = sal_True; SdrView* pDrView = GetSdrView(); if ( pDrView ) @@ -278,7 +278,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet ) if ( rMarkList.GetMarkCount() == 1 ) if ( ScIMapDlgGetObj(ScGetIMapDlg()) == (void*) rMarkList.GetMark(0)->GetMarkedSdrObj() ) - bDisable = FALSE; + bDisable = sal_False; } rSet.Put( SfxBoolItem( SID_IMAP_EXEC, bDisable ) ); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 436fe7eab..14c82d928 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -69,7 +69,7 @@ #include "compiler.hxx" -BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode ) +sal_Bool ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode ) { String aStr; @@ -87,7 +87,7 @@ BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode ) return true; } - USHORT nGlobStrId = 0; + sal_uInt16 nGlobStrId = 0; switch (eFunc) { case SUBTOTAL_FUNC_AVE: nGlobStrId = STR_FUN_TEXT_AVG; break; @@ -146,10 +146,10 @@ BOOL ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode ) } rFuncStr = aStr; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } @@ -171,16 +171,16 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) SCCOL nPosX = pViewData->GetCurX(); SCROW nPosY = pViewData->GetCurY(); SCTAB nTab = pViewData->GetTabNo(); - USHORT nMyId = 0; + sal_uInt16 nMyId = 0; SfxViewFrame* pThisFrame = GetViewFrame(); - BOOL bOle = GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace(); SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nTabSelCount = rMark.GetSelectCount(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { @@ -210,7 +210,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) if ( nTabSelCount > 1 ) { // #i22589# also take "Print Entire Sheet" into account here - BOOL bHas = FALSE; + sal_Bool bHas = sal_False; for (SCTAB i=0; !bHas && i<nTabCount; i++) bHas = rMark.GetTableSelect(i) && (pDoc->GetPrintRangeCount(i) || pDoc->IsPrintEntireSheet(i)); if (!bHas) @@ -235,7 +235,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) case SID_SEARCH_OPTIONS: { - USHORT nOptions = 0xffff; // alles erlaubt + sal_uInt16 nOptions = 0xffff; // alles erlaubt // wenn ReadOnly, kein Ersetzen: if (GetViewData()->GetDocShell()->IsReadOnly()) nOptions &= ~( SEARCH_OPTIONS_REPLACE | SEARCH_OPTIONS_REPLACE_ALL ); @@ -265,12 +265,12 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) case FID_TOGGLEINPUTLINE: { - USHORT nId = ScInputWindowWrapper::GetChildWindowId(); + sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId(); if ( pThisFrame->KnowsChildWindow( nId ) ) { SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); - rSet.Put( SfxBoolItem( nWhich, pWnd ? TRUE : FALSE ) ); + rSet.Put( SfxBoolItem( nWhich, pWnd ? sal_True : sal_False ) ); } else rSet.DisableItem( nWhich ); @@ -294,9 +294,9 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) if ( pStyleSheet ) { SfxItemSet& rStyleSet = pStyleSheet->GetItemSet(); - USHORT nScale = ((const SfxUInt16Item&) + sal_uInt16 nScale = ((const SfxUInt16Item&) rStyleSet.Get(ATTR_PAGE_SCALE)).GetValue(); - USHORT nPages = ((const SfxUInt16Item&) + sal_uInt16 nPages = ((const SfxUInt16Item&) rStyleSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); if ( nScale == 100 && nPages == 0 ) rSet.DisableItem( nWhich ); @@ -311,7 +311,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) else { const Fraction& rOldY = GetViewData()->GetZoomY(); - USHORT nZoom = (USHORT)(( rOldY.GetNumerator() * 100 ) + sal_uInt16 nZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); rSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, nZoom, nWhich ) ); } @@ -324,7 +324,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) else { const Fraction& rOldY = GetViewData()->GetZoomY(); - USHORT nCurrentZoom = (USHORT)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); + sal_uInt16 nCurrentZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); if( nCurrentZoom ) { @@ -347,7 +347,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) case FID_TOGGLEFORMULA: { const ScViewOptions& rOpts = pViewData->GetOptions(); - BOOL bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); + sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); rSet.Put(SfxBoolItem(nWhich, bFormulaMode )); } break; @@ -460,7 +460,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) case SID_PRINTPREVIEW: // #58924# Toggle-Slot braucht einen State - rSet.Put( SfxBoolItem( nWhich, FALSE ) ); + rSet.Put( SfxBoolItem( nWhich, sal_False ) ); break; case SID_READONLY_MODE: @@ -478,7 +478,7 @@ void __EXPORT ScTabViewShell::GetState( SfxItemSet& rSet ) } //------------------------------------------------------------------ -void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage ) +void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, sal_uInt16 nTabPage ) { //CHINA001 ScAttrDlg* pDlg = NULL; SfxAbstractTabDialog * pDlg = NULL; //CHINA001 @@ -507,7 +507,7 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage ) pOldSet->MergeRange( SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO ); pOldSet->Put(*pNumberInfoItem ); - bInFormatDialog = TRUE; + bInFormatDialog = sal_True; //CHINA001 pDlg = new ScAttrDlg( GetViewFrame(), GetDialogParent(), pOldSet ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 @@ -517,14 +517,14 @@ void ScTabViewShell::ExecuteCellFormatDlg( SfxRequest& rReq, USHORT nTabPage ) if ( nTabPage != 0xffff ) pDlg->SetCurPageId( nTabPage ); short nResult = pDlg->Execute(); - bInFormatDialog = FALSE; + bInFormatDialog = sal_False; if ( nResult == RET_OK ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); const SfxPoolItem* pItem=NULL; - if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,TRUE,&pItem)==SFX_ITEM_SET) + if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,sal_True,&pItem)==SFX_ITEM_SET) { UpdateNumberFormatter( pDoc,(const SvxNumberInfoItem&)*pItem); @@ -602,7 +602,7 @@ void ScTabViewShell::ExecuteInputDirect() //------------------------------------------------------------------ -void ScTabViewShell::UpdateInputHandler( BOOL bForce /* = FALSE */, BOOL bStopEditing /* = TRUE */ ) +void ScTabViewShell::UpdateInputHandler( sal_Bool bForce /* = sal_False */, sal_Bool bStopEditing /* = sal_True */ ) { ScInputHandler* pHdl = pInputHandler ? pInputHandler : SC_MOD()->GetInputHdl(); @@ -630,8 +630,8 @@ void ScTabViewShell::UpdateInputHandler( BOOL bForce /* = FALSE */, BOOL bStopEd PutInOrder( nStartRow, nEndRow ); PutInOrder( nStartTab, nEndTab ); - BOOL bHideFormula = FALSE; - BOOL bHideAll = FALSE; + sal_Bool bHideFormula = sal_False; + sal_Bool bHideAll = sal_False; if (pDoc->IsTabProtected(nTab)) { @@ -724,7 +724,7 @@ void __EXPORT ScTabViewShell::GetSaveState( SfxItemSet& rSet ) SfxShell* pDocSh = GetViewData()->GetDocShell(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while( nWhich ) { if ( nWhich != SID_SAVEDOC || !GetViewData()->GetDocShell()->IsDocShared() ) @@ -746,26 +746,26 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) const SfxItemSet* pReqArgs = rReq.GetArgs(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_UNDO: case SID_REDO: if ( pUndoManager ) { - BOOL bIsUndo = ( nSlot == SID_UNDO ); + sal_Bool bIsUndo = ( nSlot == SID_UNDO ); - USHORT nCount = 1; + sal_uInt16 nCount = 1; const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState( nSlot, sal_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() ); + sal_Bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() ); if ( bLockPaint ) pDocSh->LockPaint(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { if ( bIsUndo ) pUndoManager->Undo(0); @@ -790,7 +790,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet) SfxUndoManager* pUndoManager = pSh->GetUndoManager(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) @@ -802,9 +802,9 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet) if ( pUndoManager ) { List* pList = aStrLst.GetList(); - BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); - USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount(); - for (USHORT i=0; i<nCount; i++) + sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); + sal_uInt16 nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount(); + for (sal_uInt16 i=0; i<nCount; i++) pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) : pUndoManager->GetRedoActionComment(i) ), LIST_APPEND ); @@ -832,11 +832,11 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) SfxBindings& rBindings = GetViewFrame()->GetBindings(); const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); switch (nSlotId) { case SID_GRID_VISIBLE: - if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET ) { aGridOptions.SetGridVisible( ((const SfxBoolItem*)pItem)->GetValue() ); aViewOptions.SetGridOptions(aGridOptions); @@ -845,7 +845,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) break; case SID_GRID_USE: - if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET ) { aGridOptions.SetUseGridSnap( ((const SfxBoolItem*)pItem)->GetValue() ); aViewOptions.SetGridOptions(aGridOptions); @@ -854,7 +854,7 @@ void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq ) break; case SID_HELPLINES_MOVE: - if ( pArgs && pArgs->GetItemState(nSlotId,TRUE,&pItem) == SFX_ITEM_SET ) + if ( pArgs && pArgs->GetItemState(nSlotId,sal_True,&pItem) == SFX_ITEM_SET ) { aViewOptions.SetOption( VOPT_HELPLINES, ((const SfxBoolItem*)pItem)->GetValue() ); rBindings.Invalidate(SID_HELPLINES_MOVE); diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index cd61a6c23..78ee532fa 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -114,7 +114,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) } } -BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) +sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) { // #41081# Gueltigkeits-Hinweisfenster nicht ueber dem Objekt stehenlassen RemoveHintWindow(); @@ -122,7 +122,7 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef(); Window* pWin = GetActiveWin(); ErrCode nErr = ERRCODE_NONE; - BOOL bErrorShown = FALSE; + sal_Bool bErrorShown = sal_False; // linked objects aren't supported // if ( xIPObj->IsLink() ) @@ -176,7 +176,7 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) ((ScClient*)pClient)->SetGrafEdit( NULL ); nErr = pClient->DoVerb( nVerb ); - bErrorShown = TRUE; + bErrorShown = sal_True; // SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an // attach listener to selection changes in chart that affect cell @@ -268,7 +268,7 @@ void ScTabViewShell::DeactivateOle() void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) { - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); if (nSlot != SID_OBJECTRESIZE ) { SC_MOD()->InputEnterHandler(); @@ -338,7 +338,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) SdrMark* pMark = rMarkList.GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); if (nSdrObjKind == OBJ_OLE2) { @@ -431,13 +431,13 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet) { - BOOL bOle = GetViewFrame()->GetFrame().IsInPlace(); - BOOL bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo()); + sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace(); + sal_Bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo()); ScDocShell* pDocShell = ( GetViewData() ? GetViewData()->GetDocShell() : NULL ); bool bShared = ( pDocShell ? pDocShell->IsDocShared() : false ); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch ( nWhich ) diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index ace1aae4d..5236acd94 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -72,7 +72,7 @@ //------------------------------------------------------------------ -void ScTabViewShell::SetCurRefDlgId( USHORT nNew ) +void ScTabViewShell::SetCurRefDlgId( sal_uInt16 nNew ) { // CurRefDlgId is stored in ScModule to find if a ref dialog is open, // and in the view to identify the view that has opened the dialog @@ -81,7 +81,7 @@ void ScTabViewShell::SetCurRefDlgId( USHORT nNew ) SfxModelessDialog* ScTabViewShell::CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW, SfxChildWinInfo* pInfo, - Window* pParent, USHORT nSlotId ) + Window* pParent, sal_uInt16 nSlotId ) { // Dialog nur aufmachen, wenn ueber ScModule::SetRefDialog gerufen, damit // z.B. nach einem Absturz offene Ref-Dialoge nicht wiederkommen (#42341#). @@ -94,14 +94,14 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( // the dialog has been opened in a different view // -> lock the dispatcher for this view (modal mode) - GetViewData()->GetDispatcher().Lock( TRUE ); // lock is reset when closing dialog + GetViewData()->GetDispatcher().Lock( sal_True ); // lock is reset when closing dialog return NULL; } SfxModelessDialog* pResult = 0; if(pCW) - pCW->SetHideNotDelete(TRUE); + pCW->SetHideNotDelete(sal_True); switch( nSlotId ) { @@ -159,10 +159,10 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( case SID_DEFINE_DBNAME: { // wenn auf einem bestehenden Bereich aufgerufen, den markieren - GetDBData( TRUE, SC_DB_OLD ); + GetDBData( sal_True, SC_DB_OLD ); const ScMarkData& rMark = GetViewData()->GetMarkData(); if ( !rMark.IsMarked() && !rMark.IsMultiMarked() ) - MarkDataArea( FALSE ); + MarkDataArea( sal_False ); pResult = new ScDbNameDlg( pB, pCW, pParent, GetViewData() ); } @@ -175,7 +175,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( SCITEM_QUERYDATA, SCITEM_QUERYDATA ); - ScDBData* pDBData = GetDBData( TRUE, SC_DB_MAKE, SC_DBSEL_ROW_DOWN); + ScDBData* pDBData = GetDBData( sal_True, SC_DB_MAKE, SC_DBSEL_ROW_DOWN); pDBData->GetQueryParam( aQueryParam ); ScQueryItem aItem( SCITEM_QUERYDATA, GetViewData(), &aQueryParam ); @@ -200,7 +200,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( SCITEM_QUERYDATA, SCITEM_QUERYDATA ); - ScDBData* pDBData = GetDBData( TRUE, SC_DB_MAKE, SC_DBSEL_ROW_DOWN); + ScDBData* pDBData = GetDBData( sal_True, SC_DB_MAKE, SC_DBSEL_ROW_DOWN); pDBData->GetQueryParam( aQueryParam ); aArgSet.Put( ScQueryItem( SCITEM_QUERYDATA, @@ -220,7 +220,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( ScRefAddress aCurPos ( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo(), - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); pResult = new ScTabOpDlg( pB, pCW, pParent, pViewData->GetDocument(), aCurPos ); } diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx index 0a9bb9e57..9984e9bfc 100644 --- a/sc/source/ui/view/tabvwshd.cxx +++ b/sc/source/ui/view/tabvwshd.cxx @@ -56,7 +56,7 @@ //------------------------------------------------------------------ #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) //! Parent-Window fuer Dialoge //! Problem: OLE Server! diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 7d0fec8de..d4d10824a 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -56,7 +56,7 @@ //================================================================== -String __EXPORT ScTabViewShell::GetSelectionText( BOOL bWholeWord ) +String __EXPORT ScTabViewShell::GetSelectionText( sal_Bool bWholeWord ) { String aStrSelection; @@ -138,10 +138,10 @@ String __EXPORT ScTabViewShell::GetSelectionText( BOOL bWholeWord ) //------------------------------------------------------------------------ void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const String& rTarget, - USHORT nMode ) + sal_uInt16 nMode ) { SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode; - BOOL bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text + sal_Bool bAsText = ( eMode != HLINK_BUTTON ); // Default ist jetzt Text if ( bAsText ) { @@ -156,11 +156,11 @@ void ScTabViewShell::InsertURL( const String& rName, const String& rURL, const S { // #91216# if the view is not active, InsertURLField doesn't work // -> use InsertBookmark to directly manipulate cell content - // bTryReplace=TRUE -> if cell contains only one URL, replace it + // bTryReplace=sal_True -> if cell contains only one URL, replace it SCCOL nPosX = GetViewData()->GetCurX(); SCROW nPosY = GetViewData()->GetCurY(); - InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, TRUE ); + InsertBookmark( rName, rURL, nPosX, nPosY, &rTarget, sal_True ); } } else @@ -196,7 +196,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co ScModule* pScMod = SC_MOD(); ScInputHandler* pHdl = pScMod->GetInputHdl( pViewData->GetViewShell() ); - BOOL bSelectFirst = FALSE; + sal_Bool bSelectFirst = sal_False; if ( !pScMod->IsEditMode() ) { if ( !SelectionEditable() ) @@ -242,7 +242,7 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co void ScTabViewShell::ExecSearch( SfxRequest& rReq ) { const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxPoolItem* pItem; switch ( nSlot ) @@ -250,13 +250,13 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) case FID_SEARCH_NOW: { if ( pReqArgs && - SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, FALSE, &pItem) ) + SFX_ITEM_SET == pReqArgs->GetItemState(SID_SEARCH_ITEM, sal_False, &pItem) ) { DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" ); const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem; ScGlobal::SetSearchItem( *pSearchItem ); - SearchAndReplace( pSearchItem, TRUE, rReq.IsAPI() ); + SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() ); rReq.Done(); } } @@ -264,7 +264,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) case SID_SEARCH_ITEM: if (pReqArgs && SFX_ITEM_SET == - pReqArgs->GetItemState(SID_SEARCH_ITEM, FALSE, &pItem)) + pReqArgs->GetItemState(SID_SEARCH_ITEM, sal_False, &pItem)) { // Search-Item merken DBG_ASSERT( pItem->ISA(SvxSearchItem), "falsches Item" ); @@ -280,7 +280,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) case FID_REPLACE_ALL: case FID_SEARCH_ALL: { - if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, FALSE, &pItem)) + if (pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, sal_False, &pItem)) { // SearchItem holen @@ -289,7 +289,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) // SearchItem fuellen aSearchItem.SetSearchString(((SfxStringItem*)pItem)->GetValue()); - if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, FALSE, &pItem)) + if(SFX_ITEM_SET == pReqArgs->GetItemState(FN_PARAM_1, sal_False, &pItem)) aSearchItem.SetReplaceString(((SfxStringItem*)pItem)->GetValue()); if (nSlot == FID_SEARCH) diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index e7116c83b..1f73c7ed3 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -66,7 +66,7 @@ using ::boost::scoped_ptr; using namespace com::sun::star; #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) //------------------------------------------------------------------ @@ -77,7 +77,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) SCTAB nCurrentTab = pViewData->GetTabNo(); SCTAB nTabCount = pDoc->GetTableCount(); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); const SfxItemSet* pReqArgs = rReq.GetArgs(); HideListBox(); // Autofilter-DropDown-Listbox @@ -89,7 +89,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) String aName; pDoc->GetName( nCurrentTab, aName ); - BOOL bVisible=TRUE; + sal_Bool bVisible=sal_True; if( pReqArgs != NULL ) { const SfxPoolItem* pItem; @@ -101,7 +101,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { ScMarkData& rMark = pViewData->GetMarkData(); SCTAB nTabSelCount = rMark.GetSelectCount(); - USHORT nVis = 0; + sal_uInt16 nVis = 0; for ( SCTAB i=0; i < nTabCount && nVis<2; i++ ) if (pDoc->IsVisible(i)) ++nVis; @@ -123,7 +123,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { ScMarkData& rMark = pViewData->GetMarkData(); SCTAB nTabSelCount = rMark.GetSelectCount(); - USHORT nVis = 0; + sal_uInt16 nVis = 0; for ( SCTAB i=0; i < nTabCount && nVis<2; i++ ) if (pDoc->IsVisible(i)) ++nVis; @@ -180,21 +180,21 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001 String aTabName; - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; for ( SCTAB i=0; i != nTabCount; i++ ) { if (!pDoc->IsVisible(i)) { pDoc->GetName( i, aTabName ); pDlg->Insert( aTabName, bFirst ); - bFirst = FALSE; + bFirst = sal_False; } } if ( pDlg->Execute() == RET_OK ) { - USHORT nCount = pDlg->GetSelectEntryCount(); - for (USHORT nPos=0; nPos<nCount; nPos++) + sal_uInt16 nCount = pDlg->GetSelectEntryCount(); + for (sal_uInt16 nPos=0; nPos<nCount; nPos++) { aName = pDlg->GetSelectEntry(nPos); ShowTable( aName ); @@ -219,7 +219,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if ( pReqArgs != NULL ) // von Basic { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; const SfxPoolItem* pTabItem; const SfxPoolItem* pNameItem; String aName; @@ -257,14 +257,14 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { SCTAB nTabs[MAXTABCOUNT]; SCTAB nCount = 0; - USHORT n = 0; + sal_uInt16 n = 0; const String* pStr = pDlg->GetFirstTable( &n ); while ( pStr ) { nTabs[nCount++] = static_cast<SCTAB>(n); pStr = pDlg->GetNextTable( &n ); } - BOOL bLink = pDlg->GetTablesAsLink(); + sal_Bool bLink = pDlg->GetTablesAsLink(); if (nCount != 0) { if(pDlg->IsTableBefore()) @@ -389,7 +389,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if( pReqArgs != NULL ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; const SfxPoolItem* pItem; String aName; @@ -416,8 +416,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } else { - USHORT nRet = RET_OK; - BOOL bDone = FALSE; + sal_uInt16 nRet = RET_OK; + sal_Bool bDone = sal_False; String aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); String aName; String aDlgTitle; @@ -498,10 +498,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if ( pDoc->GetChangeTrack() != NULL ) break; // bei aktiviertem ChangeTracking kein TabMove - BOOL bDoIt = FALSE; - USHORT nDoc = 0; + sal_Bool bDoIt = sal_False; + sal_uInt16 nDoc = 0; SCTAB nTab = pViewData->GetTabNo(); - BOOL bCpy = FALSE; + sal_Bool bCpy = sal_False; String aDocName; if( pReqArgs != NULL ) @@ -525,7 +525,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { SfxObjectShell* pSh = SfxObjectShell::GetFirst(); ScDocShell* pScSh = NULL; - USHORT i=0; + sal_uInt16 i=0; while ( pSh ) { @@ -552,7 +552,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) else // Kein Dokumentname -> neues Dokument { nDoc = SC_DOC_NEW; - bDoIt = TRUE; + bDoIt = sal_True; } if ( bDoIt && nTab >= nTableCount ) // ggf. anhaengen @@ -575,14 +575,14 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if(nTableCount==nTabSelCount) { pDlg->SetCopyTable(); - pDlg->EnableCopyTable(FALSE); + pDlg->EnableCopyTable(sal_False); } if ( pDlg->Execute() == RET_OK ) { nDoc = pDlg->GetSelectedDocument(); nTab = pDlg->GetSelectedTable(); bCpy = pDlg->GetCopyTable(); - bDoIt = TRUE; + bDoIt = sal_True; String aFoundDocName; if ( nDoc != SC_DOC_NEW ) @@ -594,7 +594,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if ( !pSh->GetDocument()->IsDocEditable() ) { ErrorMessage(STR_READONLYERR); - bDoIt = FALSE; + bDoIt = sal_False; } } } @@ -620,7 +620,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { // Parameter war ueberfluessig, weil die Methode an der Table haengt - BOOL bDoIt = rReq.IsAPI(); + sal_Bool bDoIt = rReq.IsAPI(); if( !bDoIt ) { // wenn's nicht von Basic kommt, nochmal nachfragen: @@ -641,7 +641,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { SCTAB nNewTab = nCurrentTab; SCTAB nFirstTab=0; - BOOL bTabFlag=FALSE; + sal_Bool bTabFlag=sal_False; ScMarkData& rMark = pViewData->GetMarkData(); SvShorts TheTabs; for(SCTAB i=0;i<nTabCount;i++) @@ -649,7 +649,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if(rMark.GetTableSelect(i) &&!pDoc->IsTabProtected(i)) { TheTabs.push_back(i); - bTabFlag=TRUE; + bTabFlag=sal_True; if(nNewTab==i) nNewTab++; } if(!bTabFlag) nFirstTab=i; @@ -668,7 +668,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { ScDocShell* pDocSh = pViewData->GetDocShell(); ScDocFunc aFunc(*pDocSh); - BOOL bSet = !pDoc->IsLayoutRTL( nCurrentTab ); + sal_Bool bSet = !pDoc->IsLayoutRTL( nCurrentTab ); const ScMarkData& rMark = pViewData->GetMarkData(); if ( rMark.GetSelectCount() != 0 ) @@ -681,12 +681,12 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) for (SCTAB nTab=0; nTab<nTabCount; nTab++) if ( rMark.GetTableSelect(nTab) ) - aFunc.SetLayoutRTL( nTab, bSet, FALSE ); + aFunc.SetLayoutRTL( nTab, bSet, sal_False ); pUndoManager->LeaveListAction(); } else - aFunc.SetLayoutRTL( nCurrentTab, bSet, FALSE ); + aFunc.SetLayoutRTL( nCurrentTab, bSet, sal_False ); } break; @@ -706,7 +706,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) if( pReqArgs != NULL ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; const SfxPoolItem* pItem; Color aColor; if( IS_AVAILABLE( FN_PARAM_1, &pItem ) ) @@ -741,8 +741,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } else { - USHORT nRet = RET_OK; /// temp - BOOL bDone = FALSE; /// temp + sal_uInt16 nRet = RET_OK; /// temp + sal_Bool bDone = sal_False; /// temp Color aTabBgColor; Color aNewTabBgColor; @@ -839,7 +839,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet ) SCTAB nTabSelCount = rMark.GetSelectCount(); SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { @@ -852,7 +852,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet ) case FID_TABLE_HIDE: { - USHORT nVis = 0; + sal_uInt16 nVis = 0; for ( SCTAB i=0; i < nTabCount && nVis<2; i++ ) if (pDoc->IsVisible(i)) ++nVis; @@ -864,10 +864,10 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet ) case FID_TABLE_SHOW: { - BOOL bHasHidden = FALSE; + sal_Bool bHasHidden = sal_False; for ( SCTAB i=0; i < nTabCount && !bHasHidden; i++ ) if (!pDoc->IsVisible(i)) - bHasHidden = TRUE; + bHasHidden = sal_True; if ( !bHasHidden || pDoc->IsDocProtected() || nTabSelCount > 1 ) rSet.DisableItem( nWhich ); } @@ -879,7 +879,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet ) rSet.DisableItem( nWhich ); else { - USHORT nVis = 0; + sal_uInt16 nVis = 0; for ( SCTAB i=0; i < nTabCount && nVis<2; i++ ) if (pDoc->IsVisible(i)) ++nVis; diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 8f6639753..3d6a2ea3e 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -72,7 +72,7 @@ void ScTabViewShell::GetSbxState( SfxItemSet& /* rSet */ ) void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) { - USHORT nSlotId = rReq.GetSlot(); + sal_uInt16 nSlotId = rReq.GetSlot(); const SfxItemSet* pReqArgs = rReq.GetArgs(); // Objekte aktivieren/deaktivieren immer auf der sichtbaren View @@ -115,9 +115,9 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) case SID_OBJECT_WIDTH: case SID_OBJECT_HEIGHT: { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; const SfxPoolItem* pItem; - if ( pReqArgs && pReqArgs->GetItemState( nSlotId, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs && pReqArgs->GetItemState( nSlotId, sal_True, &pItem ) == SFX_ITEM_SET ) { long nNewVal = ((const SfxInt32Item*)pItem)->GetValue(); if ( nNewVal < 0 ) @@ -146,7 +146,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) pDrView->ResizeMarkedObj( aRect.TopLeft(), Fraction( 1, 1 ), Fraction( nNewVal, aRect.GetHeight() ) ); - bDone = TRUE; + bDone = sal_True; } } } @@ -183,7 +183,7 @@ void ScTabViewShell::GetObjectState( SfxItemSet& rSet ) // SID_OLE_OBJECT - removed (old Basic) SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) @@ -267,7 +267,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint ) pAccessibilityBroadcaster->Broadcast( rHint ); } -BOOL ScTabViewShell::HasAccessibilityObjects() +sal_Bool ScTabViewShell::HasAccessibilityObjects() { return pAccessibilityBroadcaster != NULL; } diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 50cd9a26b..400859b44 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -81,8 +81,8 @@ using namespace com::sun::star; #define TAG_TABBARWIDTH "tw:" -static BOOL bMoveArea = FALSE; //! Member? -USHORT nEditAdjust = SVX_ADJUST_LEFT; //! Member !!! +static sal_Bool bMoveArea = sal_False; //! Member? +sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; //! Member !!! //================================================================== @@ -101,7 +101,7 @@ ScViewDataTable::ScViewDataTable() : nFixPosY( 0 ), nCurX( 0 ), nCurY( 0 ), - bOldCurValid( FALSE ) + bOldCurValid( sal_False ) { nPosX[0]=nPosX[1]=0; nPosY[0]=nPosY[1]=0; @@ -312,21 +312,21 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) nTabNo ( 0 ), nRefTabNo ( 0 ), eEditActivePart( SC_SPLIT_BOTTOMLEFT ), - bActive ( TRUE ), //! wie initialisieren? - bIsRefMode ( FALSE ), - bDelMarkValid( FALSE ), + bActive ( sal_True ), //! wie initialisieren? + bIsRefMode ( sal_False ), + bDelMarkValid( sal_False ), nFillMode ( SC_FILL_NONE ), - bPagebreak ( FALSE ), - bSelCtrlMouseClick( FALSE ) + bPagebreak ( sal_False ), + bSelCtrlMouseClick( sal_False ) { - SetGridMode ( TRUE ); - SetSyntaxMode ( FALSE ); - SetHeaderMode ( TRUE ); - SetTabMode ( TRUE ); - SetVScrollMode ( TRUE ); - SetHScrollMode ( TRUE ); - SetOutlineMode ( TRUE ); + SetGridMode ( sal_True ); + SetSyntaxMode ( sal_False ); + SetHeaderMode ( sal_True ); + SetTabMode ( sal_True ); + SetVScrollMode ( sal_True ); + SetHScrollMode ( sal_True ); + SetOutlineMode ( sal_True ); aScrSize = Size( (long) ( STD_COL_WIDTH * PIXEL_PER_TWIPS * OLE_STD_CELLS_X ), (long) ( ScGlobal::nStdRowHeight * PIXEL_PER_TWIPS * OLE_STD_CELLS_Y ) ); @@ -334,10 +334,10 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) for ( SCTAB i = 1; i <= MAXTAB; i++ ) pTabData[i] = NULL; pThisTab = pTabData[nTabNo]; - for (USHORT j=0; j<4; j++) + for (sal_uInt16 j=0; j<4; j++) { pEditView[j] = NULL; - bEditActive[j] = FALSE; + bEditActive[j] = sal_False; } nEditEndCol = nEditStartCol = nEditCol = 0; @@ -380,9 +380,9 @@ ScViewData::ScViewData( const ScViewData& rViewData ) nTabNo ( rViewData.nTabNo ), nRefTabNo ( rViewData.nTabNo ), // kein RefMode eEditActivePart( rViewData.eEditActivePart ), - bActive ( TRUE ), //! wie initialisieren? - bIsRefMode ( FALSE ), - bDelMarkValid( FALSE ), + bActive ( sal_True ), //! wie initialisieren? + bIsRefMode ( sal_False ), + bDelMarkValid( sal_False ), nFillMode ( SC_FILL_NONE ), bPagebreak ( rViewData.bPagebreak ), bSelCtrlMouseClick( rViewData.bSelCtrlMouseClick ) @@ -403,10 +403,10 @@ ScViewData::ScViewData( const ScViewData& rViewData ) else pTabData[i] = NULL; pThisTab = pTabData[nTabNo]; - for (USHORT j=0; j<4; j++) + for (sal_uInt16 j=0; j<4; j++) { pEditView[j] = NULL; - bEditActive[j] = FALSE; + bEditActive[j] = sal_False; } nEditEndCol = nEditStartCol = nEditCol = 0; @@ -612,7 +612,7 @@ void ScViewData::CreateTabData( std::vector< SCTAB >& rvTabs ) void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs ) { - BOOL bAll = ( tabs.size() == 0 ); + sal_Bool bAll = ( tabs.size() == 0 ); if ( !bAll ) // create associated table data CreateTabData( tabs ); @@ -639,7 +639,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs ) } } -void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll ) +void ScViewData::SetZoomType( SvxZoomType eNew, sal_Bool bAll ) { std::vector< SCTAB > vTabs; // Empty for all tabs if ( !bAll ) // get selected tabs @@ -656,7 +656,7 @@ void ScViewData::SetZoomType( SvxZoomType eNew, BOOL bAll ) void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs ) { - BOOL bAll = ( tabs.size() == 0 ); + sal_Bool bAll = ( tabs.size() == 0 ); if ( !bAll ) // create associated table data CreateTabData( tabs ); Fraction aFrac20( 1,5 ); @@ -728,7 +728,7 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vec RefreshZoom(); } -void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll ) +void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll ) { std::vector< SCTAB > vTabs; if ( !bAll ) // get selected tabs @@ -754,7 +754,7 @@ void ScViewData::RefreshZoom() aLogicMode.SetScaleY( GetZoomY() ); } -void ScViewData::SetPagebreakMode( BOOL bSet ) +void ScViewData::SetPagebreakMode( sal_Bool bSet ) { bPagebreak = bSet; @@ -821,7 +821,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const ScMarkData aNewMark( aMarkData ); // use a local copy for MarkToSimple - BOOL bMulti = aNewMark.IsMultiMarked(); + sal_Bool bMulti = aNewMark.IsMultiMarked(); if (bMulti) { aNewMark.MarkToSimple(); @@ -830,7 +830,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const if (bMulti) { rRange = new ScRangeList; - aNewMark.FillRangeListWithMarks( rRange, FALSE ); + aNewMark.FillRangeListWithMarks( rRange, sal_False ); } else { @@ -841,7 +841,7 @@ void ScViewData::GetMultiArea( ScRangeListRef& rRange ) const } } -BOOL ScViewData::SimpleColMarked() +sal_Bool ScViewData::SimpleColMarked() { SCCOL nStartCol; SCROW nStartRow; @@ -851,12 +851,12 @@ BOOL ScViewData::SimpleColMarked() SCTAB nEndTab; if (GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE) if (nStartRow==0 && nEndRow==MAXROW) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL ScViewData::SimpleRowMarked() +sal_Bool ScViewData::SimpleRowMarked() { SCCOL nStartCol; SCROW nStartRow; @@ -866,12 +866,12 @@ BOOL ScViewData::SimpleRowMarked() SCTAB nEndTab; if (GetSimpleArea(nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab) == SC_MARK_SIMPLE) if (nStartCol==0 && nEndCol==MAXCOL) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } -BOOL ScViewData::IsMultiMarked() +sal_Bool ScViewData::IsMultiMarked() { // Test for "real" multi selection, calling MarkToSimple on a local copy, // and taking filtered in simple area marks into account. @@ -891,7 +891,7 @@ void ScViewData::SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, S } void ScViewData::SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, - BYTE nMode ) + sal_uInt8 nMode ) { nFillMode = nMode; nFillStartX = nStartCol; @@ -934,19 +934,19 @@ void ScViewData::SetOldCursor( SCCOL nNewX, SCROW nNewY ) { pThisTab->nOldCurX = nNewX; pThisTab->nOldCurY = nNewY; - pThisTab->bOldCurValid = TRUE; + pThisTab->bOldCurValid = sal_True; } void ScViewData::ResetOldCursor() { - pThisTab->bOldCurValid = FALSE; + pThisTab->bOldCurValid = sal_False; } Rectangle ScViewData::GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, Window* pWin, const ScPatternAttr* pPattern, - BOOL bForceToTop ) + sal_Bool bForceToTop ) { - return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,TRUE), + return ScEditUtil( pDoc, nPosX, nPosY, nTabNo, GetScrPos(nPosX,nPosY,eWhich,sal_True), pWin, nPPTX, nPPTY, GetZoomX(), GetZoomY() ). GetEditArea( pPattern, bForceToTop ); } @@ -955,16 +955,16 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, ScEditEngineDefaulter* pNewEngine, Window* pWin, SCCOL nNewX, SCROW nNewY ) { - BOOL bLayoutRTL = pDoc->IsLayoutRTL( nTabNo ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo ); ScHSplitPos eHWhich = WhichH(eWhich); - BOOL bWasThere = FALSE; + sal_Bool bWasThere = sal_False; if (pEditView[eWhich]) { // Wenn die View schon da ist, nichts aufrufen, was die Cursorposition aendert if (bEditActive[eWhich]) - bWasThere = TRUE; + bWasThere = sal_True; else pEditView[eWhich]->SetEditEngine(pNewEngine); @@ -981,26 +981,26 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // bei IdleFormat wird manchmal ein Cursor gemalt, wenn die View schon weg ist (23576) - ULONG nEC = pNewEngine->GetControlWord(); + sal_uLong nEC = pNewEngine->GetControlWord(); pNewEngine->SetControlWord(nEC & ~EE_CNTRL_DOIDLEFORMAT); - ULONG nVC = pEditView[eWhich]->GetControlWord(); + sal_uLong nVC = pEditView[eWhich]->GetControlWord(); pEditView[eWhich]->SetControlWord(nVC & ~EV_CNTRL_AUTOSCROLL); - bEditActive[eWhich] = TRUE; + bEditActive[eWhich] = sal_True; const ScPatternAttr* pPattern = pDoc->GetPattern( nNewX, nNewY, nTabNo ); SvxCellHorJustify eJust = (SvxCellHorJustify)((const SvxHorJustifyItem&) pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue(); - BOOL bBreak = ( eJust == SVX_HOR_JUSTIFY_BLOCK ) || + sal_Bool bBreak = ( eJust == SVX_HOR_JUSTIFY_BLOCK ) || ((SfxBoolItem&)pPattern->GetItem(ATTR_LINEBREAK)).GetValue(); - BOOL bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler + sal_Bool bAsianVertical = pNewEngine->IsVertical(); // set by InputHandler Rectangle aPixRect = ScEditUtil( pDoc, nNewX,nNewY,nTabNo, GetScrPos(nNewX,nNewY,eWhich), pWin, nPPTX,nPPTY,GetZoomX(),GetZoomY() ). - GetEditArea( pPattern, TRUE ); + GetEditArea( pPattern, sal_True ); // when right-aligned, leave space for the cursor // in vertical mode, editing is always right-aligned @@ -1030,13 +1030,13 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // For growing use only the alignment value from the attribute, numbers // (existing or started) with default aligment extend to the right. - BOOL bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER ); - BOOL bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left - BOOL bGrowBackwards = bGrowToLeft; // logical left + sal_Bool bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER ); + sal_Bool bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left + sal_Bool bGrowBackwards = bGrowToLeft; // logical left if ( bLayoutRTL ) bGrowBackwards = !bGrowBackwards; // invert on RTL sheet if ( bAsianVertical ) - bGrowCentered = bGrowToLeft = bGrowBackwards = FALSE; // keep old behavior for asian mode + bGrowCentered = bGrowToLeft = bGrowBackwards = sal_False; // keep old behavior for asian mode long nSizeXPix; if (bBreak && !bAsianVertical) @@ -1074,7 +1074,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, Fraction aFract(1,1); Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin, - HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, FALSE ); + HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, sal_False ); aPaperSize.Width() = aUtilRect.GetWidth(); } pNewEngine->SetPaperSize( aPaperSize ); @@ -1091,7 +1091,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, else if ( nEditAdjust == SVX_ADJUST_CENTER ) { aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2; - bMoveArea = TRUE; // always + bMoveArea = sal_True; // always } else { @@ -1112,11 +1112,11 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, // UpdateMode has been disabled in ScInputHandler::StartTable // must be enabled before EditGrowY (GetTextHeight) - pNewEngine->SetUpdateMode( TRUE ); + pNewEngine->SetUpdateMode( sal_True ); pNewEngine->SetStatusEventHdl( LINK( this, ScViewData, EditEngineHdl ) ); - EditGrowY( TRUE ); // adjust to existing text content + EditGrowY( sal_True ); // adjust to existing text content EditGrowX(); Point aDocPos = pEditView[eWhich]->GetWindowPosTopLeft(0); @@ -1135,7 +1135,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich, 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() ) { @@ -1155,7 +1155,7 @@ IMPL_LINK_INLINE_END( ScViewData, EmptyEditHdl, EditStatus *, EMPTYARG ) IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus ) { - ULONG nStatus = pStatus->GetStatusWord(); + sal_uLong nStatus = pStatus->GetStatusWord(); if (nStatus & (EE_STAT_HSCROLL | EE_STAT_TEXTHEIGHTCHANGED | EE_STAT_TEXTWIDTHCHANGED | EE_STAT_CURSOROUT)) { EditGrowY(); @@ -1165,7 +1165,7 @@ IMPL_LINK( ScViewData, EditEngineHdl, EditStatus *, pStatus ) { ScSplitPos eWhich = GetActivePart(); if (pEditView[eWhich]) - pEditView[eWhich]->ShowCursor(FALSE); + pEditView[eWhich]->ShowCursor(sal_False); } } return 0; @@ -1182,7 +1182,7 @@ void ScViewData::EditGrowX() if ( !pCurView || !bEditActive[eWhich]) return; - BOOL bLayoutRTL = pLocalDoc->IsLayoutRTL( nTabNo ); + sal_Bool bLayoutRTL = pLocalDoc->IsLayoutRTL( nTabNo ); ScEditEngineDefaulter* pEngine = (ScEditEngineDefaulter*) pCurView->GetEditEngine(); @@ -1198,22 +1198,22 @@ void ScViewData::EditGrowX() // Margin ist schon bei der urspruenglichen Breite beruecksichtigt long nTextWidth = pEngine->CalcTextWidth(); - BOOL bChanged = FALSE; - BOOL bAsianVertical = pEngine->IsVertical(); + sal_Bool bChanged = sal_False; + sal_Bool bAsianVertical = pEngine->IsVertical(); // get bGrow... variables the same way as in SetEditEngine const ScPatternAttr* pPattern = pLocalDoc->GetPattern( nEditCol, nEditRow, nTabNo ); SvxCellHorJustify eJust = (SvxCellHorJustify)((const SvxHorJustifyItem&) pPattern->GetItem( ATTR_HOR_JUSTIFY )).GetValue(); - BOOL bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER ); - BOOL bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left - BOOL bGrowBackwards = bGrowToLeft; // logical left + sal_Bool bGrowCentered = ( eJust == SVX_HOR_JUSTIFY_CENTER ); + sal_Bool bGrowToLeft = ( eJust == SVX_HOR_JUSTIFY_RIGHT ); // visual left + sal_Bool bGrowBackwards = bGrowToLeft; // logical left if ( bLayoutRTL ) bGrowBackwards = !bGrowBackwards; // invert on RTL sheet if ( bAsianVertical ) - bGrowCentered = bGrowToLeft = bGrowBackwards = FALSE; // keep old behavior for asian mode + bGrowCentered = bGrowToLeft = bGrowBackwards = sal_False; // keep old behavior for asian mode - BOOL bUnevenGrow = FALSE; + sal_Bool bUnevenGrow = sal_False; if ( bGrowCentered ) { while (aArea.GetWidth() + 0 < nTextWidth && ( nEditStartCol > nLeft || nEditEndCol < nRight ) ) @@ -1244,9 +1244,9 @@ void ScViewData::EditGrowX() aArea.Right() = nCenter + aSize.Width() - nHalf - 1; } - bChanged = TRUE; + bChanged = sal_True; if ( nLogicLeft != nLogicRight ) - bUnevenGrow = TRUE; + bUnevenGrow = sal_True; } } else if ( bGrowBackwards ) @@ -1269,7 +1269,7 @@ void ScViewData::EditGrowX() aArea.Right() = aArea.Left() + aSize.Width() - 1; } - bChanged = TRUE; + bChanged = sal_True; } } else @@ -1292,7 +1292,7 @@ void ScViewData::EditGrowX() aArea.Right() = aArea.Left() + aSize.Width() - 1; } - bChanged = TRUE; + bChanged = sal_True; } } @@ -1333,7 +1333,7 @@ void ScViewData::EditGrowX() aVis.Right() -= nMove; } pCurView->SetVisArea( aVis ); - bMoveArea = FALSE; + bMoveArea = sal_False; } pCurView->SetOutputArea(aArea); @@ -1353,7 +1353,7 @@ void ScViewData::EditGrowX() } } -void ScViewData::EditGrowY( BOOL bInitial ) +void ScViewData::EditGrowY( sal_Bool bInitial ) { ScSplitPos eWhich = GetActivePart(); ScVSplitPos eVWhich = WhichV(eWhich); @@ -1362,7 +1362,7 @@ void ScViewData::EditGrowY( BOOL bInitial ) if ( !pCurView || !bEditActive[eWhich]) return; - ULONG nControl = pEditView[eWhich]->GetControlWord(); + sal_uLong nControl = pEditView[eWhich]->GetControlWord(); if ( nControl & EV_CNTRL_AUTOSCROLL ) { // if end of screen had already been reached and scrolling enabled, @@ -1394,13 +1394,13 @@ void ScViewData::EditGrowY( BOOL bInitial ) // because this occurs in the normal progress of editing a formula. // Subsequent calls with empty text might involve changed attributes (including // font height), so they are treated like normal text. - String aText = pEngine->GetText( (USHORT) 0 ); + String aText = pEngine->GetText( (sal_uInt16) 0 ); if ( ( aText.Len() == 0 && bInitial ) || aText.GetChar(0) == (sal_Unicode)'=' ) nAllowedExtra = SC_GROWY_BIG_EXTRA; } - BOOL bChanged = FALSE; - BOOL bMaxReached = FALSE; + sal_Bool bChanged = sal_False; + sal_Bool bMaxReached = sal_False; while (aArea.GetHeight() + nAllowedExtra < nTextHeight && nEditEndRow < nBottom && !bMaxReached) { ++nEditEndRow; @@ -1411,10 +1411,10 @@ void ScViewData::EditGrowY( BOOL bInitial ) if ( aArea.Bottom() > aArea.Top() + aSize.Height() - 1 ) { aArea.Bottom() = aArea.Top() + aSize.Height() - 1; - bMaxReached = TRUE; // don't occupy more cells beyond paper size + bMaxReached = sal_True; // don't occupy more cells beyond paper size } - bChanged = TRUE; + bChanged = sal_True; nAllowedExtra = SC_GROWY_SMALL_EXTRA; // larger value is only for first row } @@ -1436,7 +1436,7 @@ void ScViewData::EditGrowY( BOOL bInitial ) void ScViewData::ResetEditView() { EditEngine* pEngine = NULL; - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pEditView[i]) { if (bEditActive[i]) @@ -1445,7 +1445,7 @@ void ScViewData::ResetEditView() pEngine->RemoveView(pEditView[i]); pEditView[i]->SetOutputArea( Rectangle() ); } - bEditActive[i] = FALSE; + bEditActive[i] = sal_False; } if (pEngine) @@ -1454,7 +1454,7 @@ void ScViewData::ResetEditView() void ScViewData::KillEditView() { - for (USHORT i=0; i<4; i++) + for (sal_uInt16 i=0; i<4; i++) if (pEditView[i]) { if (bEditActive[i]) @@ -1529,7 +1529,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) } Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, - BOOL bAllowNeg ) const + sal_Bool bAllowNeg ) const { ScHSplitPos eWhichX = SC_SPLIT_LEFT; ScVSplitPos eWhichY = SC_SPLIT_BOTTOM; @@ -1559,7 +1559,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, ((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY); } - USHORT nTSize; + sal_uInt16 nTSize; SCCOL nPosX = GetPosX(eWhichX); SCCOL nX; @@ -1647,7 +1647,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, // Anzahl Zellen auf einem Bildschirm // -SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeX ) const +SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeX ) const { DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" ); @@ -1655,27 +1655,27 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHO ((ScViewData*)this)->aScrSize.Width() = pView->GetGridWidth(eWhichX); SCsCOL nX; - USHORT nScrPosX = 0; - if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (USHORT) aScrSize.Width(); + sal_uInt16 nScrPosX = 0; + if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (sal_uInt16) aScrSize.Width(); if (nDir==1) nX = nPosX; // vorwaerts else nX = nPosX-1; // rueckwaerts - BOOL bOut = FALSE; + sal_Bool bOut = sal_False; for ( ; nScrPosX<=nScrSizeX && !bOut; nX = sal::static_int_cast<SCsCOL>(nX + nDir) ) { SCsCOL nColNo = nX; if ( nColNo < 0 || nColNo > MAXCOL ) - bOut = TRUE; + bOut = sal_True; else { - USHORT nTSize = pDoc->GetColWidth( nColNo, nTabNo ); + sal_uInt16 nTSize = pDoc->GetColWidth( nColNo, nTabNo ); if (nTSize) { long nSizeXPix = ToPixel( nTSize, nPPTX ); - nScrPosX = sal::static_int_cast<USHORT>( nScrPosX + (USHORT) nSizeXPix ); + nScrPosX = sal::static_int_cast<sal_uInt16>( nScrPosX + (sal_uInt16) nSizeXPix ); } } } @@ -1689,14 +1689,14 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHO return nX; } -SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeY ) const +SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeY ) const { DBG_ASSERT( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" ); if (pView) ((ScViewData*)this)->aScrSize.Height() = pView->GetGridHeight(eWhichY); - if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (USHORT) aScrSize.Height(); + if (nScrSizeY == SC_SIZE_NONE) nScrSizeY = (sal_uInt16) aScrSize.Height(); SCROW nY; @@ -1757,7 +1757,7 @@ SCROW ScViewData::PrevCellsY( ScVSplitPos eWhichY ) const //UNUSED2008-05 return CellsAtY( MAXROW+1, -1, eWhichY, SC_SIZE_NONE ); //UNUSED2008-05 } -BOOL ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) +sal_Bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) { const ScMergeAttr* pMerge = (const ScMergeAttr*) pDoc->GetAttr( nX,nY,nTabNo, ATTR_MERGE ); if ( pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1 ) @@ -1778,25 +1778,25 @@ BOOL ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r continue; } - USHORT nHeight = pDoc->GetRowHeight(nRow, nTabNo); + sal_uInt16 nHeight = pDoc->GetRowHeight(nRow, nTabNo); nOutHeight += ToPixel(nHeight, nPPTY); } rSizeXPix = nOutWidth; rSizeYPix = nOutHeight; - return TRUE; + return sal_True; } else { rSizeXPix = ToPixel( pDoc->GetColWidth( nX, nTabNo ), nPPTX ); rSizeYPix = ToPixel( pDoc->GetRowHeight( nY, nTabNo ), nPPTY ); - return FALSE; + return sal_False; } } -BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, +sal_Bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, SCsCOL& rPosX, SCsROW& rPosY, - BOOL bTestMerge, BOOL bRepair, BOOL bNextIfLarge ) + sal_Bool bTestMerge, sal_Bool bRepair, sal_Bool bNextIfLarge ) { // special handling of 0 is now in ScViewFunctionSet::SetCursorAtPoint @@ -1875,12 +1875,12 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, { //! public Methode um Position anzupassen - BOOL bHOver = FALSE; + sal_Bool bHOver = sal_False; while (pDoc->IsHorOverlapped( rPosX, rPosY, nTabNo )) - { --rPosX; bHOver=TRUE; } - BOOL bVOver = FALSE; + { --rPosX; bHOver=sal_True; } + sal_Bool bVOver = sal_False; while (pDoc->IsVerOverlapped( rPosX, rPosY, nTabNo )) - { --rPosY; bVOver=TRUE; } + { --rPosY; bVOver=sal_True; } if ( bRepair && ( bHOver || bVOver ) ) { @@ -1894,23 +1894,23 @@ BOOL ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, pDoc->RemoveFlagsTab( 0,0, MAXCOL,MAXROW, nTabNo, SC_MF_HOR | SC_MF_VER ); SCCOL nEndCol = MAXCOL; SCROW nEndRow = MAXROW; - pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, TRUE, FALSE ); + pDoc->ExtendMerge( 0,0, nEndCol,nEndRow, nTabNo, sal_True, sal_False ); if (pDocShell) pDocShell->PostPaint( ScRange(0,0,nTabNo,MAXCOL,MAXROW,nTabNo), PAINT_GRID ); } } } - return FALSE; + return sal_False; } void ScViewData::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 bLayoutRTL = pDoc->IsLayoutRTL( nTabNo ); + sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo ); long nLayoutSign = bLayoutRTL ? -1 : 1; - Point aCellStart = GetScrPos( nPosX, nPosY, eWhich, TRUE ); + Point aCellStart = GetScrPos( nPosX, nPosY, eWhich, sal_True ); long nSizeX; long nSizeY; GetMergeSizePixel( nPosX, nPosY, nSizeX, nSizeY ); @@ -1931,14 +1931,14 @@ void ScViewData::SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX ) { long nThis = pDoc->GetColWidth( i,nTabNo ); nTPosX -= nThis; - nPixPosX -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTX); + nPixPosX -= ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTX); } else for ( i=nNewPosX; i<nOldPosX; i++ ) { long nThis = pDoc->GetColWidth( i,nTabNo ); nTPosX += nThis; - nPixPosX += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTX); + nPixPosX += ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTX); } pThisTab->nPosX[eWhich] = nNewPosX; @@ -1968,7 +1968,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY ) SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i; i = nHeightEndRow; nTPosY -= nThis * nRows; - nPixPosY -= ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows; + nPixPosY -= ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTY) * nRows; } else for ( i=nNewPosY; i<nOldPosY; i++ ) @@ -1977,7 +1977,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY ) SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i; i = nHeightEndRow; nTPosY += nThis * nRows; - nPixPosY += ToPixel(sal::static_int_cast<USHORT>(nThis), nPPTY) * nRows; + nPixPosY += ToPixel(sal::static_int_cast<sal_uInt16>(nThis), nPPTY) * nRows; } pThisTab->nPosY[eWhich] = nNewPosY; @@ -1994,7 +1994,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY ) void ScViewData::RecalcPixPos() // nach Zoom-Aenderungen { - for (USHORT eWhich=0; eWhich<2; eWhich++) + for (sal_uInt16 eWhich=0; eWhich<2; eWhich++) { long nPixPosX = 0; SCCOL nPosX = pThisTab->nPosX[eWhich]; @@ -2027,7 +2027,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) { SCCOL nCol; SCROW nRow; - USHORT nTSize; + sal_uInt16 nTSize; long nSizePix; long nScrPosX = 0; long nScrPosY = 0; @@ -2042,7 +2042,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) if (nTSize) { nSizePix = ToPixel( nTSize, nPPTX ); - nScrPosX += (USHORT) nSizePix; + nScrPosX += (sal_uInt16) nSizePix; } } @@ -2052,7 +2052,7 @@ void ScViewData::SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) if (nTSize) { nSizePix = ToPixel( nTSize, nPPTY ); - nScrPosY += (USHORT) nSizePix; + nScrPosY += (sal_uInt16) nSizePix; } } @@ -2064,14 +2064,14 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart ) long nSize; long nTwips; long nAdd; - BOOL bEnd; + sal_Bool bEnd; nSize = 0; nTwips = (long) (rVisAreaStart.X() / HMM_PER_TWIPS); if ( pDoc->IsLayoutRTL( nTabNo ) ) nTwips = -nTwips; SCCOL nX1 = 0; - bEnd = FALSE; + bEnd = sal_False; while (!bEnd) { nAdd = (long) pDoc->GetColWidth(nX1,nTabNo); @@ -2081,13 +2081,13 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart ) ++nX1; } else - bEnd = TRUE; + bEnd = sal_True; } nSize = 0; nTwips = (long) (rVisAreaStart.Y() / HMM_PER_TWIPS); SCROW nY1 = 0; - bEnd = FALSE; + bEnd = sal_False; while (!bEnd) { nAdd = (long) pDoc->GetRowHeight(nY1,nTabNo); @@ -2097,7 +2097,7 @@ void ScViewData::SetScreenPos( const Point& rVisAreaStart ) ++nY1; } else - bEnd = TRUE; + bEnd = sal_True; } SetActivePart( SC_SPLIT_BOTTOMLEFT ); @@ -2156,7 +2156,7 @@ ScDrawView* ScViewData::GetScDrawView() return pView->GetScDrawView(); } -BOOL ScViewData::IsMinimized() +sal_Bool ScViewData::IsMinimized() { DBG_ASSERT( pView, "IsMinimized() ohne View" ); return pView->IsMinimized(); @@ -2167,7 +2167,7 @@ void ScViewData::UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY Fraction aOldX = GetZoomX(); Fraction aOldY = GetZoomY(); - SetZoom( rNewX, rNewY, FALSE ); + SetZoom( rNewX, rNewY, sal_False ); Fraction aWidth = GetZoomX(); aWidth *= Fraction( aScrSize.Width(),1 ); @@ -2200,7 +2200,7 @@ void ScViewData::CalcPPT() if (nEndCol<20) nEndCol = 20; // same end position as when determining draw scale - USHORT nTwips = pDoc->GetCommonWidth( nEndCol, nTabNo ); + sal_uInt16 nTwips = pDoc->GetCommonWidth( nEndCol, nTabNo ); if ( nTwips ) { double fOriginal = nTwips * nPPTX; @@ -2236,10 +2236,10 @@ void ScViewData::WriteUserData(String& rData) // PosX[links]/PosX[rechts]/PosY[oben]/PosY[unten] // wenn Zeilen groesser 8192, "+" statt "/" - USHORT nZoom = (USHORT)((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator()); + sal_uInt16 nZoom = (sal_uInt16)((pThisTab->aZoomY.GetNumerator() * 100) / pThisTab->aZoomY.GetDenominator()); rData = String::CreateFromInt32( nZoom ); rData += '/'; - nZoom = (USHORT)((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator()); + nZoom = (sal_uInt16)((pThisTab->aPageZoomY.GetNumerator() * 100) / pThisTab->aPageZoomY.GetDenominator()); rData += String::CreateFromInt32( nZoom ); rData += '/'; if (bPagebreak) @@ -2325,10 +2325,10 @@ void ScViewData::ReadUserData(const String& rData) Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; //! evaluate (all sheets?) String aZoomStr = rData.GetToken(0); // Zoom/PageZoom/Modus - USHORT nNormZoom = sal::static_int_cast<USHORT>(aZoomStr.GetToken(0,'/').ToInt32()); + sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.GetToken(0,'/').ToInt32()); if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM ) aZoomX = aZoomY = Fraction( nNormZoom, 100 ); // "normaler" Zoom (immer) - USHORT nPageZoom = sal::static_int_cast<USHORT>(aZoomStr.GetToken(1,'/').ToInt32()); + sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.GetToken(1,'/').ToInt32()); if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM ) aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 ); // Pagebreak-Zoom, wenn gesetzt sal_Unicode cMode = aZoomStr.GetToken(2,'/').GetChar(0); // 0 oder "0"/"1" @@ -2500,7 +2500,7 @@ void ScViewData::WriteExtOptions( ScExtDocOptions& rDocOpt ) const // sheet selection and selected ranges const ScMarkData& rMarkData = GetMarkData(); rTabSett.mbSelected = rMarkData.GetTableSelect( nTab ); - rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, TRUE ); + rMarkData.FillRangeListWithMarks( &rTabSett.maSelection, sal_True ); // grid color rTabSett.maGridColor.SetColor( COL_AUTO ); @@ -2649,7 +2649,7 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt ) // Disabled, does not work correctly. Anyway, our own XML filters do not import a selection at all. // const ScRangeList& rSel = rTabSett.maSelection; // if( (rSel.Count() >= 2) || ((rSel.Count() == 1) && (*rSel.GetObject( 0 ) != ScRange( rCursor ))) ) -// rMarkData.MarkFromRangeList( rTabSett.maSelection, FALSE ); +// rMarkData.MarkFromRangeList( rTabSett.maSelection, sal_False ); // grid color -- #i47435# set automatic grid color explicitly if( pOptions ) @@ -2958,11 +2958,11 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue> void ScViewData::SetOptions( const ScViewOptions& rOpt ) { // if visibility of horiz. ScrollBar is changed, TabBar may have to be resized... - BOOL bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) ); + sal_Bool bHScrollChanged = ( rOpt.GetOption(VOPT_HSCROLL) != pOptions->GetOption(VOPT_HSCROLL) ); // if graphics are turned on or off, animation has to be started or stopped // graphics are controlled by VOBJ_TYPE_OLE - BOOL bGraphicsChanged = ( pOptions->GetObjMode(VOBJ_TYPE_OLE) != + sal_Bool bGraphicsChanged = ( pOptions->GetObjMode(VOBJ_TYPE_OLE) != rOpt.GetObjMode(VOBJ_TYPE_OLE) ); *pOptions = rOpt; @@ -2980,34 +2980,34 @@ Point ScViewData::GetMousePosPixel() return pView->GetMousePosPixel(); } -void ScViewData::UpdateInputHandler( BOOL bForce, BOOL bStopEditing ) +void ScViewData::UpdateInputHandler( sal_Bool bForce, sal_Bool bStopEditing ) { if (pViewShell) pViewShell->UpdateInputHandler( bForce, bStopEditing ); } -BOOL ScViewData::IsOle() +sal_Bool ScViewData::IsOle() { return pDocShell && pDocShell->IsOle(); } -BOOL ScViewData::UpdateFixX( SCTAB nTab ) // TRUE = Wert geaendert +sal_Bool ScViewData::UpdateFixX( SCTAB nTab ) // sal_True = Wert geaendert { if (!ValidTab(nTab)) // Default nTab=nTabNo; // akuelle Tabelle if (!pView || pTabData[nTab]->eHSplitMode != SC_SPLIT_FIX) - return FALSE; + return sal_False; ScDocument* pLocalDoc = GetDocument(); if (!pLocalDoc->HasTable(nTab)) // #114007# if called from reload, the sheet may not exist - return FALSE; + return sal_False; SCCOL nFix = pTabData[nTab]->nFixPosX; long nNewPos = 0; for (SCCOL nX=pTabData[nTab]->nPosX[SC_SPLIT_LEFT]; nX<nFix; nX++) { - USHORT nTSize = pLocalDoc->GetColWidth( nX, nTab ); + sal_uInt16 nTSize = pLocalDoc->GetColWidth( nX, nTab ); if (nTSize) { long nPix = ToPixel( nTSize, nPPTX ); @@ -3020,29 +3020,29 @@ BOOL ScViewData::UpdateFixX( SCTAB nTab ) // TRUE = Wert geaendert pTabData[nTab]->nHSplitPos = nNewPos; if (nTab == nTabNo) RecalcPixPos(); //! sollte nicht noetig sein !!! - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL ScViewData::UpdateFixY( SCTAB nTab ) // TRUE = Wert geaendert +sal_Bool ScViewData::UpdateFixY( SCTAB nTab ) // sal_True = Wert geaendert { if (!ValidTab(nTab)) // Default nTab=nTabNo; // akuelle Tabelle if (!pView || pTabData[nTab]->eVSplitMode != SC_SPLIT_FIX) - return FALSE; + return sal_False; ScDocument* pLocalDoc = GetDocument(); if (!pLocalDoc->HasTable(nTab)) // #114007# if called from reload, the sheet may not exist - return FALSE; + return sal_False; SCROW nFix = pTabData[nTab]->nFixPosY; long nNewPos = 0; for (SCROW nY=pTabData[nTab]->nPosY[SC_SPLIT_TOP]; nY<nFix; nY++) { - USHORT nTSize = pLocalDoc->GetRowHeight( nY, nTab ); + sal_uInt16 nTSize = pLocalDoc->GetRowHeight( nY, nTab ); if (nTSize) { long nPix = ToPixel( nTSize, nPPTY ); @@ -3055,18 +3055,18 @@ BOOL ScViewData::UpdateFixY( SCTAB nTab ) // TRUE = Wert geaendert pTabData[nTab]->nVSplitPos = nNewPos; if (nTab == nTabNo) RecalcPixPos(); //! sollte nicht noetig sein !!! - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void ScViewData::UpdateOutlinerFlags( Outliner& rOutl ) const { ScDocument* pLocalDoc = GetDocument(); - BOOL bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell(); + sal_Bool bOnlineSpell = pLocalDoc->GetDocOptions().IsAutoSpell(); - ULONG nCntrl = rOutl.GetControlWord(); + sal_uLong nCntrl = rOutl.GetControlWord(); nCntrl |= EE_CNTRL_URLSFXEXECUTE; nCntrl |= EE_CNTRL_MARKFIELDS; nCntrl |= EE_CNTRL_AUTOCORRECT; @@ -3106,7 +3106,7 @@ void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY, while (rScrY <= nEndPixels && nRow <= nEndRow) { SCROW nHeightEndRow; - USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow); + sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow); if (nHeightEndRow > nEndRow) nHeightEndRow = nEndRow; if (!nHeight) @@ -3147,7 +3147,7 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels, while (rScrY <= nEndPixels && nRow >= nStartRow) { SCROW nHeightStartRow; - USHORT nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL); + sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL); if (nHeightStartRow < nStartRow) nHeightStartRow = nStartRow; if (!nHeight) diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 20577811b..b3b7c2fa5 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -99,7 +99,7 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ); //---------------------------------------------------------------------------- -BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData ) +sal_Bool ScViewFunc::AdjustBlockHeight( sal_Bool bPaint, ScMarkData* pMarkData ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); if (!pMarkData) @@ -127,25 +127,25 @@ BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData ) aZoomX = aZoomY = Fraction( 1, 1 ); } - BOOL bAnyChanged = FALSE; + sal_Bool bAnyChanged = sal_False; SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) { if (pMarkData->GetTableSelect(nTab)) { SCCOLROW* pOneRange = pRanges; - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; SCROW nPaintY = 0; for (SCROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++) { SCROW nStartNo = *(pOneRange++); SCROW nEndNo = *(pOneRange++); if (pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, 0, aProv.GetDevice(), - nPPTX, nPPTY, aZoomX, aZoomY, FALSE )) + nPPTX, nPPTY, aZoomX, aZoomY, sal_False )) { if (!bChanged) nPaintY = nStartNo; - bAnyChanged = bChanged = TRUE; + bAnyChanged = bChanged = sal_True; } } if ( bPaint && bChanged ) @@ -164,7 +164,7 @@ BOOL ScViewFunc::AdjustBlockHeight( BOOL bPaint, ScMarkData* pMarkData ) //---------------------------------------------------------------------------- -BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint ) +sal_Bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, sal_Bool bPaint ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -173,9 +173,9 @@ BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint ) double nPPTY = GetViewData()->GetPPTY(); Fraction aZoomX = GetViewData()->GetZoomX(); Fraction aZoomY = GetViewData()->GetZoomY(); - USHORT nOldPixel = 0; + sal_uInt16 nOldPixel = 0; if (nStartRow == nEndRow) - nOldPixel = (USHORT) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY); + nOldPixel = (sal_uInt16) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY); ScSizeDeviceProvider aProv(pDocSh); if (aProv.IsPrinter()) @@ -184,14 +184,14 @@ BOOL ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint ) nPPTY = aProv.GetPPTY(); aZoomX = aZoomY = Fraction( 1, 1 ); } - BOOL bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(), - nPPTX, nPPTY, aZoomX, aZoomY, FALSE ); + sal_Bool bChanged = pDoc->SetOptimalHeight( nStartRow, nEndRow, nTab, 0, aProv.GetDevice(), + nPPTX, nPPTY, aZoomX, aZoomY, sal_False ); if (bChanged && ( nStartRow == nEndRow )) { - USHORT nNewPixel = (USHORT) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY); + sal_uInt16 nNewPixel = (sal_uInt16) (pDoc->GetRowHeight(nStartRow,nTab) * nPPTY); if ( nNewPixel == nOldPixel ) - bChanged = FALSE; + bChanged = sal_False; } if ( bPaint && bChanged ) @@ -242,7 +242,7 @@ ScAutoSum lcl_IsAutoSumData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, ScAutoSum lcl_SeekAutoSumData( ScDocument* pDoc, SCCOL& nCol, SCROW& nRow, SCTAB nTab, ScDirection eDir, SCCOLROW& nExtend ) { - USHORT nCount = 0; + sal_uInt16 nCount = 0; while (nCount < SC_AUTOSUM_MAXCOUNT) { if ( eDir == DIR_TOP ) @@ -398,7 +398,7 @@ bool lcl_GetAutoSumForRowRange( ScDocument* pDoc, ScRangeList& rRangeList, const //---------------------------------------------------------------------------- -BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) +sal_Bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) { ScDocument* pDoc = GetViewData()->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); @@ -414,8 +414,8 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) SCROW nSeekRow = nRow; SCCOLROW nExtend; // wird per Reference gueltig bei ScAutoSumSum - BOOL bCol = FALSE; - BOOL bRow = FALSE; + sal_Bool bCol = sal_False; + sal_Bool bRow = sal_False; ScAutoSum eSum; if ( nRow != 0 @@ -425,19 +425,19 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData ) ) { - bRow = TRUE; + bRow = sal_True; nSeekRow = nRow - 1; } else if ( nCol != 0 && (eSum = lcl_IsAutoSumData( pDoc, nCol-1, nRow, nTab, DIR_LEFT, nExtend /*out*/ )) == ScAutoSumData ) { - bCol = TRUE; + bCol = sal_True; nSeekCol = nCol - 1; } else if ( (eSum = lcl_SeekAutoSumData( pDoc, nCol, nSeekRow, nTab, DIR_TOP, nExtend /*out*/ )) != ScAutoSumNone ) - bRow = TRUE; + bRow = sal_True; else if (( eSum = lcl_SeekAutoSumData( pDoc, nSeekCol, nRow, nTab, DIR_LEFT, nExtend /*out*/ )) != ScAutoSumNone ) - bCol = TRUE; + bCol = sal_True; if ( bCol || bRow ) { @@ -457,7 +457,7 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) else nEndCol = nCol - 1; // Datenbereich evtl. nach rechts erweitern } - BOOL bContinue = FALSE; + sal_Bool bContinue = sal_False; do { if ( eSum == ScAutoSumData ) @@ -497,9 +497,9 @@ BOOL ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList ) } } } while ( bContinue ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //---------------------------------------------------------------------------- @@ -701,7 +701,7 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor // set new mark range and cursor position const ScRange aMarkRange( nStartCol, nStartRow, nTab, nMarkEndCol, nMarkEndRow, nTab ); - MarkRange( aMarkRange, FALSE, bContinue ); + MarkRange( aMarkRange, sal_False, bContinue ); if ( bSetCursor ) { SetCursor( nMarkEndCol, nMarkEndRow ); @@ -809,8 +809,8 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData pInsDoc->SetClipArea( ScRange(aPos) ); // auf Block einfuegen, mit Undo etc. - if ( PasteFromClip( IDF_CONTENTS, pInsDoc, PASTE_NOFUNC, FALSE, FALSE, - FALSE, INS_NONE, IDF_ATTRIB ) ) + if ( PasteFromClip( IDF_CONTENTS, pInsDoc, PASTE_NOFUNC, sal_False, sal_False, + sal_False, INS_NONE, IDF_ATTRIB ) ) { const SfxUInt32Item* pItem = (SfxUInt32Item*) pInsDoc->GetAttr( nCol, nRow, nTab, ATTR_VALUE_FORMAT ); @@ -834,12 +834,12 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData //---------------------------------------------------------------------------- -//UNUSED2008-05 void ScViewFunc::PaintWidthHeight( BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd ) +//UNUSED2008-05 void ScViewFunc::PaintWidthHeight( sal_Bool bColumns, SCCOLROW nStart, SCCOLROW nEnd ) //UNUSED2008-05 { //UNUSED2008-05 SCTAB nTab = GetViewData()->GetTabNo(); //UNUSED2008-05 ScDocument* pDoc = GetViewData()->GetDocument(); //UNUSED2008-05 -//UNUSED2008-05 USHORT nParts = PAINT_GRID; +//UNUSED2008-05 sal_uInt16 nParts = PAINT_GRID; //UNUSED2008-05 SCCOL nStartCol = 0; //UNUSED2008-05 SCROW nStartRow = 0; //UNUSED2008-05 SCCOL nEndCol = MAXCOL; // fuer Test auf Merge @@ -869,8 +869,8 @@ void ScViewFunc::EnterBlock( const String& rString, const EditTextObject* pData //---------------------------------------------------------------------------- // manueller Seitenumbruch -void ScViewFunc::InsertPageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* pPos, - BOOL bSetModified ) +void ScViewFunc::InsertPageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos, + sal_Bool bSetModified ) { SCTAB nTab = GetViewData()->GetTabNo(); ScAddress aCursor; @@ -879,18 +879,18 @@ void ScViewFunc::InsertPageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* p else aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab ); - BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). - InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, FALSE ); + sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + InsertPageBreak( bColumn, aCursor, bRecord, bSetModified, sal_False ); if ( bSuccess && bSetModified ) - UpdatePageBreakData( TRUE ); // fuer PageBreak-Modus + UpdatePageBreakData( sal_True ); // fuer PageBreak-Modus } //---------------------------------------------------------------------------- -void ScViewFunc::DeletePageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* pPos, - BOOL bSetModified ) +void ScViewFunc::DeletePageBreak( sal_Bool bColumn, sal_Bool bRecord, const ScAddress* pPos, + sal_Bool bSetModified ) { SCTAB nTab = GetViewData()->GetTabNo(); ScAddress aCursor; @@ -899,11 +899,11 @@ void ScViewFunc::DeletePageBreak( BOOL bColumn, BOOL bRecord, const ScAddress* p else aCursor = ScAddress( GetViewData()->GetCurX(), GetViewData()->GetCurY(), nTab ); - BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). - RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, FALSE ); + sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + RemovePageBreak( bColumn, aCursor, bRecord, bSetModified, sal_False ); if ( bSuccess && bSetModified ) - UpdatePageBreakData( TRUE ); // fuer PageBreak-Modus + UpdatePageBreakData( sal_True ); // fuer PageBreak-Modus } //---------------------------------------------------------------------------- @@ -913,13 +913,13 @@ void ScViewFunc::RemoveManualBreaks() ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, sal_False, pUndoDoc ); pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) ); } @@ -927,14 +927,14 @@ void ScViewFunc::RemoveManualBreaks() pDoc->RemoveManualBreaks(nTab); pDoc->UpdatePageBreaks(nTab); - UpdatePageBreakData( TRUE ); + UpdatePageBreakData( sal_True ); pDocSh->SetDocumentModified(); pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); } //---------------------------------------------------------------------------- -void ScViewFunc::SetPrintZoom(USHORT nScale, USHORT nPages) +void ScViewFunc::SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); @@ -951,9 +951,9 @@ void ScViewFunc::AdjustPrintZoom() //---------------------------------------------------------------------------- -void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint, +void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint, const String* pRepCol, const String* pRepRow, - BOOL bAddPrint ) + sal_Bool bAddPrint ) { // on all selected tables @@ -962,7 +962,7 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint, SCTAB nTabCount = pDoc->GetTableCount(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTab; - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver(); @@ -987,8 +987,8 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint, if ( pPrint->Len() ) { const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); - USHORT nTCount = pPrint->GetTokenCount(sep); - for (USHORT i=0; i<nTCount; i++) + sal_uInt16 nTCount = pPrint->GetTokenCount(sep); + for (sal_uInt16 i=0; i<nTCount; i++) { String aToken = pPrint->GetToken(i, sep); if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID ) @@ -1006,12 +1006,12 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint, { rMark.MarkToMulti(); ScRangeListRef aList( new ScRangeList ); - rMark.FillRangeListWithMarks( aList, FALSE ); - USHORT nCnt = (USHORT) aList->Count(); + rMark.FillRangeListWithMarks( aList, sal_False ); + sal_uInt16 nCnt = (sal_uInt16) aList->Count(); if ( nCnt ) { ScRangePtr pR; - USHORT i; + sal_uInt16 i; for ( pR = aList->First(), i=0; i < nCnt; pR = aList->Next(), i++ ) { @@ -1068,9 +1068,9 @@ void ScViewFunc::SetPrintRanges( BOOL bEntireSheet, const String* pPrint, //---------------------------------------------------------------------------- // Zellen zusammenfassen -BOOL ScViewFunc::TestMergeCells() // Vorab-Test (fuer Menue) +sal_Bool ScViewFunc::TestMergeCells() // Vorab-Test (fuer Menue) { - // simple test: TRUE if there's a selection but no multi selection and not filtered + // simple test: sal_True if there's a selection but no multi selection and not filtered const ScMarkData& rMark = GetViewData()->GetMarkData(); if ( rMark.IsMarked() || rMark.IsMultiMarked() ) @@ -1079,13 +1079,13 @@ BOOL ScViewFunc::TestMergeCells() // Vorab-Test (fuer Menue) return GetViewData()->GetSimpleArea( aDummy) == SC_MARK_SIMPLE; } else - return FALSE; + return sal_False; } //---------------------------------------------------------------------------- -BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) +sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool bRecord ) { // Editable- und Verschachtelungs-Abfrage muss vorneweg sein (auch in DocFunc), // damit dann nicht die Inhalte-QueryBox kommt @@ -1093,7 +1093,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) if (!aTester.IsEditable()) { ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -1101,7 +1101,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) if (!rMark.IsMarked()) { ErrorMessage(STR_NOMULTISELECT); - return FALSE; + return sal_False; } ScDocShell* pDocSh = GetViewData()->GetDocShell(); @@ -1118,17 +1118,17 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) if ( nStartCol == nEndCol && nStartRow == nEndRow ) { // nichts zu tun - return TRUE; + return sal_True; } if ( pDoc->HasAttrib( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) { // "Zusammenfassen nicht verschachteln !" ErrorMessage(STR_MSSG_MERGECELLS_0); - return FALSE; + return sal_False; } - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( !pDoc->IsBlockEmpty( nStartTab, nStartCol,nStartRow+1, nStartCol,nEndRow, true ) || !pDoc->IsBlockEmpty( nStartTab, nStartCol+1,nStartRow, nEndCol,nEndRow, true ) ) @@ -1139,12 +1139,12 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) WinBits(WB_YES_NO_CANCEL | WB_DEF_NO), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) ); - USHORT nRetVal = aBox.Execute(); + sal_uInt16 nRetVal = aBox.Execute(); if ( nRetVal == RET_YES ) - rDoContents = TRUE; + rDoContents = sal_True; else if ( nRetVal == RET_CANCEL ) - bOk = FALSE; + bOk = sal_False; } } @@ -1157,7 +1157,7 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) if (bOk) { SetCursor( nStartCol, nStartRow ); - //DoneBlockMode( FALSE); + //DoneBlockMode( sal_False); Unmark(); pDocSh->UpdateOle(GetViewData()); @@ -1171,15 +1171,15 @@ BOOL ScViewFunc::MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord ) //---------------------------------------------------------------------------- -BOOL ScViewFunc::TestRemoveMerge() +sal_Bool ScViewFunc::TestRemoveMerge() { - BOOL bMerged = FALSE; + sal_Bool bMerged = sal_False; ScRange aRange; if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE) { ScDocument* pDoc = GetViewData()->GetDocument(); if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) ) - bMerged = TRUE; + bMerged = sal_True; } return bMerged; } @@ -1187,14 +1187,14 @@ BOOL ScViewFunc::TestRemoveMerge() //---------------------------------------------------------------------------- -BOOL ScViewFunc::RemoveMerge( BOOL bRecord ) +sal_Bool ScViewFunc::RemoveMerge( sal_Bool bRecord ) { ScRange aRange; ScEditableTester aTester( this ); if (!aTester.IsEditable()) { ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } else if (GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE) { @@ -1203,26 +1203,26 @@ BOOL ScViewFunc::RemoveMerge( BOOL bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); HideCursor(); - BOOL bOk = pDocSh->GetDocFunc().UnmergeCells( aRange, bRecord, FALSE ); + sal_Bool bOk = pDocSh->GetDocFunc().UnmergeCells( aRange, bRecord, sal_False ); MarkRange( aExtended ); ShowCursor(); if (bOk) pDocSh->UpdateOle(GetViewData()); } - return TRUE; //! bOk ?? + return sal_True; //! bOk ?? } //---------------------------------------------------------------------------- -void ScViewFunc::FillSimple( FillDir eDir, BOOL bRecord ) +void ScViewFunc::FillSimple( FillDir eDir, sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - BOOL bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, bRecord, FALSE ); + sal_Bool bSuccess = pDocSh->GetDocFunc().FillSimple( aRange, &rMark, eDir, bRecord, sal_False ); if (bSuccess) { pDocSh->UpdateOle(GetViewData()); @@ -1236,16 +1236,16 @@ void ScViewFunc::FillSimple( FillDir eDir, BOOL bRecord ) //---------------------------------------------------------------------------- void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, - double fStart, double fStep, double fMax, BOOL bRecord ) + double fStart, double fStep, double fMax, sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - BOOL bSuccess = pDocSh->GetDocFunc(). + sal_Bool bSuccess = pDocSh->GetDocFunc(). FillSeries( aRange, &rMark, eDir, eCmd, eDateCmd, - fStart, fStep, fMax, bRecord, FALSE ); + fStart, fStep, fMax, bRecord, sal_False ); if (bSuccess) { pDocSh->UpdateOle(GetViewData()); @@ -1268,18 +1268,18 @@ void ScViewFunc::FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, //---------------------------------------------------------------------------- void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, - SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord ) + SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, sal_Bool bRecord ) { SCTAB nTab = GetViewData()->GetTabNo(); ScRange aRange( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab ); ScRange aSourceRange( aRange ); ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - BOOL bSuccess = pDocSh->GetDocFunc(). - FillAuto( aRange, &rMark, eDir, nCount, bRecord, FALSE ); + sal_Bool bSuccess = pDocSh->GetDocFunc(). + FillAuto( aRange, &rMark, eDir, nCount, bRecord, sal_False ); if (bSuccess) { - MarkRange( aRange, FALSE ); // aRange ist in FillAuto veraendert worden + MarkRange( aRange, sal_False ); // aRange ist in FillAuto veraendert worden pDocSh->UpdateOle(GetViewData()); UpdateScrollBars(); @@ -1325,7 +1325,7 @@ void ScViewFunc::FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow, //---------------------------------------------------------------------------- -void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink ) +void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSkipEmpty, sal_Bool bAsLink ) { //! allow source sheet to be protected ScEditableTester aTester( this ); @@ -1339,11 +1339,11 @@ void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTab = GetViewData()->GetTabNo(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScRange aMarkRange; rMark.MarkToSimple(); - BOOL bMulti = rMark.IsMultiMarked(); + sal_Bool bMulti = rMark.IsMultiMarked(); if (bMulti) rMark.GetMultiMarkArea( aMarkRange ); else if (rMark.IsMarked()) @@ -1357,7 +1357,7 @@ void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); -// pUndoDoc->SelectTable( nTab, TRUE ); // nur fuer Markierung +// pUndoDoc->SelectTable( nTab, sal_True ); // nur fuer Markierung SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nTabCount; i++) @@ -1367,7 +1367,7 @@ void ScViewFunc::FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL aMarkRange.aStart.SetTab( i ); aMarkRange.aEnd.SetTab( i ); pDoc->CopyToDocument( aMarkRange, IDF_ALL, bMulti, pUndoDoc ); -// pUndoDoc->SelectTable( i, TRUE ); +// pUndoDoc->SelectTable( i, sal_True ); } } @@ -1482,8 +1482,8 @@ void ScViewFunc::TransliterateText( sal_Int32 nType ) aFuncMark.SetMarkArea( ScRange( aCursor ) ); } - BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). - TransliterateText( aFuncMark, nType, TRUE, FALSE ); + sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + TransliterateText( aFuncMark, nType, sal_True, sal_False ); if (bSuccess) { GetViewData()->GetViewShell()->UpdateInputHandler(); @@ -1517,7 +1517,7 @@ ScAutoFormatData* ScViewFunc::CreateAutoFormatData() //---------------------------------------------------------------------------- -void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) +void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord ) { #if 1 @@ -1527,7 +1527,7 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); - BOOL bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, FALSE ); + sal_Bool bSuccess = pDocSh->GetDocFunc().AutoFormat( aRange, &rMark, nFormatNo, bRecord, sal_False ); if (bSuccess) pDocSh->UpdateOle(GetViewData()); } @@ -1537,7 +1537,7 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) #else // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -1556,9 +1556,9 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); - BOOL bSize = (*ScGlobal::GetAutoFormat())[nFormatNo]->GetIncludeWidthHeight(); + sal_Bool bSize = (*ScGlobal::GetAutoFormat())[nFormatNo]->GetIncludeWidthHeight(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDocument* pUndoDoc = NULL; if ( bRecord ) @@ -1566,13 +1566,13 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nEndTab, bSize, bSize ); pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab, - IDF_ATTRIB, FALSE, pUndoDoc ); + IDF_ATTRIB, sal_False, pUndoDoc ); if (bSize) { pDoc->CopyToDocument( nStartCol,0,nStartTab, nEndCol,MAXROW,nEndTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); pDoc->CopyToDocument( 0,nStartRow,nStartTab, MAXCOL,nEndRow,nEndTab, - IDF_NONE, FALSE, pUndoDoc ); + IDF_NONE, sal_False, pUndoDoc ); } pDoc->BeginDrawUndo(); } @@ -1583,14 +1583,14 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) if (bSize) { - SetMarkedWidthOrHeight( TRUE, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, FALSE, FALSE ); - SetMarkedWidthOrHeight( FALSE, SC_SIZE_VISOPT, 0, FALSE, FALSE ); + SetMarkedWidthOrHeight( sal_True, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, sal_False, sal_False ); + SetMarkedWidthOrHeight( sal_False, SC_SIZE_VISOPT, 0, sal_False, sal_False ); pDocSh->PostPaint( 0,0,nStartTab, MAXCOL,MAXROW,nStartTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP ); } else { - BOOL bAdj = AdjustBlockHeight( FALSE ); + sal_Bool bAdj = AdjustBlockHeight( sal_False ); if (bAdj) pDocSh->PostPaint( 0,nStartRow,nStartTab, MAXCOL,MAXROW,nStartTab, PAINT_GRID | PAINT_LEFT ); @@ -1621,22 +1621,22 @@ void ScViewFunc::AutoFormat( USHORT nFormatNo, BOOL bRecord ) // Suchen & Ersetzen void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, - BOOL bAddUndo, BOOL bIsApi ) + sal_Bool bAddUndo, sal_Bool bIsApi ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); if (bAddUndo && !pDoc->IsUndoEnabled()) - bAddUndo = FALSE; + bAddUndo = sal_False; SCCOL nCol = GetViewData()->GetCurX(); SCROW nRow = GetViewData()->GetCurY(); SCTAB nTab = GetViewData()->GetTabNo(); -// BOOL bAttrib = pSearchItem->GetPattern(); - USHORT nCommand = pSearchItem->GetCommand(); - BOOL bAllTables = pSearchItem->IsAllTables(); - BOOL* pOldSelectedTables = NULL; - USHORT nOldSelectedCount = 0; +// sal_Bool bAttrib = pSearchItem->GetPattern(); + sal_uInt16 nCommand = pSearchItem->GetCommand(); + sal_Bool bAllTables = pSearchItem->IsAllTables(); + sal_Bool* pOldSelectedTables = NULL; + sal_uInt16 nOldSelectedCount = 0; SCTAB nOldTab = nTab; SCTAB nLastTab = pDoc->GetTableCount() - 1; SCTAB nStartTab, nEndTab; @@ -1644,7 +1644,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, { nStartTab = 0; nEndTab = nLastTab; - pOldSelectedTables = new BOOL [ nEndTab + 1 ]; + pOldSelectedTables = new sal_Bool [ nEndTab + 1 ]; for ( SCTAB j = 0; j <= nEndTab; j++ ) { pOldSelectedTables[j] = rMark.GetTableSelect( j ); @@ -1680,7 +1680,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, if ( nCommand == SVX_SEARCHCMD_FIND || nCommand == SVX_SEARCHCMD_FIND_ALL) - bAddUndo = FALSE; + bAddUndo = sal_False; //! bAttrib bei Undo beruecksichtigen !!! @@ -1701,26 +1701,26 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, { //! alles selektieren, erst nachdem pUndoMark erzeugt wurde for ( SCTAB j = nStartTab; j <= nEndTab; j++ ) { - rMark.SelectTable( j, TRUE ); + rMark.SelectTable( j, sal_True ); } } - DoneBlockMode(TRUE); // Markierung nicht loeschen! + DoneBlockMode(sal_True); // Markierung nicht loeschen! InitOwnBlockMode(); // wenn vom Anfang an gesucht wird, nicht nochmal fragen ob vom Anfang gesucht werden soll - BOOL bFirst = TRUE; + sal_Bool bFirst = sal_True; if ( nCol == 0 && nRow == 0 && nTab == nStartTab && !pSearchItem->GetBackward() ) - bFirst = FALSE; + bFirst = sal_False; - BOOL bFound = FALSE; - while (TRUE) + sal_Bool bFound = sal_False; + while (sal_True) { GetFrameWin()->EnterWait(); if (pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, rMark, aUndoStr, pUndoDoc ) ) { - bFound = TRUE; - bFirst = TRUE; + bFound = sal_True; + bFirst = sal_True; if (bAddUndo) { GetViewData()->GetDocShell()->GetUndoManager()->AddUndoAction( @@ -1735,8 +1735,8 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, else if ( bFirst && (nCommand == SVX_SEARCHCMD_FIND || nCommand == SVX_SEARCHCMD_REPLACE) ) { - bFirst = FALSE; - USHORT nRetVal; + bFirst = sal_False; + sal_uInt16 nRetVal; GetFrameWin()->LeaveWait(); if ( bIsApi ) nRetVal = RET_NO; @@ -1744,7 +1744,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, { // Suchen-Dialog als Parent, wenn vorhanden Window* pParent = GetParentOrChild(SID_SEARCH_DLG); - USHORT nStrId; + sal_uInt16 nStrId; if ( pSearchItem->GetBackward() ) { if ( nStartTab == nEndTab ) @@ -1797,7 +1797,7 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, break; // Abbruch while True } - } // of while TRUE + } // of while sal_True if ( pOldSelectedTables ) { // urspruenglich selektierte Tabellen wiederherstellen @@ -1807,11 +1807,11 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, } if ( bFound ) { // durch Fundstelle neu selektierte Tabelle bleibt - rMark.SelectTable( nTab, TRUE ); + rMark.SelectTable( nTab, sal_True ); // wenn vorher nur eine selektiert war, ist es ein Tausch //! wenn nicht, ist jetzt evtl. eine mehr selektiert if ( nOldSelectedCount == 1 && nTab != nOldTab ) - rMark.SelectTable( nOldTab, FALSE ); + rMark.SelectTable( nOldTab, sal_False ); } delete [] pOldSelectedTables; } @@ -1826,10 +1826,10 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, // wenn nichts markiert ist, DoneBlockMode, damit von hier aus // direkt per Shift-Cursor markiert werden kann: if (!rMark.IsMarked() && !rMark.IsMultiMarked()) - DoneBlockMode(TRUE); + DoneBlockMode(sal_True); AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP ); - SetCursor( nCol, nRow, TRUE ); + SetCursor( nCol, nRow, sal_True ); if ( nCommand == SVX_SEARCHCMD_REPLACE || nCommand == SVX_SEARCHCMD_REPLACE_ALL ) @@ -1880,7 +1880,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) GetFrameWin()->EnterWait(); - BOOL bExact = + sal_Bool bExact = pDoc->Solver( rParam.aRefFormulaCell.Col(), rParam.aRefFormulaCell.Row(), @@ -1892,7 +1892,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) GetFrameWin()->LeaveWait(); SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); - ULONG nFormat = 0; + sal_uLong nFormat = 0; const ScPatternAttr* pPattern = pDoc->GetPattern( nDestCol, nDestRow, nDestTab ); if ( pPattern ) nFormat = pPattern->GetNumberFormat( pFormatter ); @@ -1918,12 +1918,12 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) MessBox aBox( GetViewData()->GetDialogParent(), WinBits(WB_YES_NO | WB_DEF_NO), ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), aMsgStr ); - USHORT nRetVal = aBox.Execute(); + sal_uInt16 nRetVal = aBox.Execute(); if ( RET_YES == nRetVal ) EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult ); - GetViewData()->GetViewShell()->UpdateInputHandler( TRUE ); + GetViewData()->GetViewShell()->UpdateInputHandler( sal_True ); } } @@ -1931,14 +1931,14 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) //---------------------------------------------------------------------------- // Mehrfachoperation -void ScViewFunc::TabOp( const ScTabOpParam& rParam, BOOL bRecord ) +void ScViewFunc::TabOp( const ScTabOpParam& rParam, sal_Bool bRecord ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); - pDocSh->GetDocFunc().TabOp( aRange, &rMark, rParam, bRecord, FALSE ); + pDocSh->GetDocFunc().TabOp( aRange, &rMark, rParam, bRecord, sal_False ); } else ErrorMessage(STR_NOMULTISELECT); @@ -1948,7 +1948,7 @@ void ScViewFunc::TabOp( const ScTabOpParam& rParam, BOOL bRecord ) //---------------------------------------------------------------------------- void ScViewFunc::MakeScenario( const String& rName, const String& rComment, - const Color& rColor, USHORT nFlags ) + const Color& rColor, sal_uInt16 nFlags ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -1956,7 +1956,7 @@ void ScViewFunc::MakeScenario( const String& rName, const String& rComment, SCTAB nNewTab = pDocSh->MakeScenario( nTab, rName, rComment, rColor, nFlags, rMark ); if (nFlags & SC_SCENARIO_COPYALL) - SetTabNo( nNewTab, TRUE ); // SC_SCENARIO_COPYALL -> sichtbar + SetTabNo( nNewTab, sal_True ); // SC_SCENARIO_COPYALL -> sichtbar else { SfxBindings& rBindings = GetViewData()->GetBindings(); @@ -1984,7 +1984,7 @@ void ScViewFunc::ExtendScenario() ScDocument* pDoc = GetViewData()->GetDocument(); ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) ); - aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) ); + aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) ); ApplySelectionPattern(aPattern); } @@ -2005,13 +2005,13 @@ void ScViewFunc::UseScenario( const String& rName ) //---------------------------------------------------------------------------- // Tabelle einfuegen -BOOL ScViewFunc::InsertTable( const String& rName, SCTAB nTab, BOOL bRecord ) +sal_Bool ScViewFunc::InsertTable( const String& rName, SCTAB nTab, sal_Bool bRecord ) { // Reihenfolge Tabelle/Name ist bei DocFunc umgekehrt - BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). - InsertTable( nTab, rName, bRecord, FALSE ); + sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + InsertTable( nTab, rName, bRecord, sal_False ); if (bSuccess) - SetTabNo( nTab, TRUE ); + SetTabNo( nTab, sal_True ); return bSuccess; } @@ -2019,13 +2019,13 @@ BOOL ScViewFunc::InsertTable( const String& rName, SCTAB nTab, BOOL bRecord ) //---------------------------------------------------------------------------- // Tabellen einfuegen -BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab, - SCTAB nCount, BOOL bRecord ) +sal_Bool ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab, + SCTAB nCount, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; SvStrings *pNameList= NULL; @@ -2037,7 +2037,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab, pDoc->BeginDrawUndo(); // InsertTab erzeugt ein SdrUndoNewPage } - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; String aValTabName; String *pStr; @@ -2046,7 +2046,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab, { if(pNames!=NULL) { - pStr=pNames->GetObject(static_cast<USHORT>(i)); + pStr=pNames->GetObject(static_cast<sal_uInt16>(i)); } else { @@ -2057,7 +2057,7 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab, if(pDoc->InsertTab( nTab+i,*pStr)) { - bFlag=TRUE; + bFlag=sal_True; pDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab+i ) ); } else @@ -2074,31 +2074,31 @@ BOOL ScViewFunc::InsertTables(SvStrings *pNames, SCTAB nTab, { if (bRecord) pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoInsertTables( pDocSh, nTab, FALSE, pNameList)); + new ScUndoInsertTables( pDocSh, nTab, sal_False, pNameList)); // Views updaten: - SetTabNo( nTab, TRUE ); + SetTabNo( nTab, sal_True ); pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } //---------------------------------------------------------------------------- -BOOL ScViewFunc::AppendTable( const String& rName, BOOL bRecord ) +sal_Bool ScViewFunc::AppendTable( const String& rName, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; WaitObject aWait( GetFrameWin() ); @@ -2110,53 +2110,53 @@ BOOL ScViewFunc::AppendTable( const String& rName, BOOL bRecord ) SCTAB nTab = pDoc->GetTableCount()-1; if (bRecord) pDocSh->GetUndoManager()->AddUndoAction( - new ScUndoInsertTab( pDocSh, nTab, TRUE, rName)); + new ScUndoInsertTab( pDocSh, nTab, sal_True, rName)); GetViewData()->InsertTab( nTab ); - SetTabNo( nTab, TRUE ); + SetTabNo( nTab, sal_True ); pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return TRUE; + return sal_True; } else { - return FALSE; + return sal_False; } } //---------------------------------------------------------------------------- -BOOL ScViewFunc::DeleteTable( SCTAB nTab, BOOL bRecord ) +sal_Bool ScViewFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, FALSE ); + sal_Bool bSuccess = pDocSh->GetDocFunc().DeleteTable( nTab, bRecord, sal_False ); if (bSuccess) { SCTAB nNewTab = nTab; if ( nNewTab >= pDoc->GetTableCount() ) --nNewTab; - SetTabNo( nNewTab, TRUE ); + SetTabNo( nNewTab, sal_True ); } return bSuccess; } -BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord ) +sal_Bool ScViewFunc::DeleteTables(const SvShorts &TheTabs, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : FALSE; + sal_Bool bVbaEnabled = pDoc ? pDoc->IsInVBAMode() : sal_False; SCTAB nNewTab = TheTabs.front(); WaitObject aWait( GetFrameWin() ); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; while ( nNewTab > 0 && !pDoc->IsVisible( nNewTab ) ) --nNewTab; - BOOL bWasLinked = FALSE; + sal_Bool bWasLinked = sal_False; ScDocument* pUndoDoc = NULL; ScRefUndoData* pUndoData = NULL; if (bRecord) @@ -2172,16 +2172,16 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord ) { SCTAB nTab = TheTabs[i]; if (i==0) - pUndoDoc->InitUndo( pDoc, nTab,nTab, TRUE,TRUE ); // incl. Spalten/Zeilenflags + pUndoDoc->InitUndo( pDoc, nTab,nTab, sal_True,sal_True ); // incl. Spalten/Zeilenflags else - pUndoDoc->AddUndoTab( nTab,nTab, TRUE,TRUE ); // incl. Spalten/Zeilenflags + pUndoDoc->AddUndoTab( nTab,nTab, sal_True,sal_True ); // incl. Spalten/Zeilenflags - 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 ); pDoc->GetName( nTab, aOldName ); - pUndoDoc->RenameTab( nTab, aOldName, FALSE ); + pUndoDoc->RenameTab( nTab, aOldName, sal_False ); if (pDoc->IsLinked(nTab)) { - bWasLinked = TRUE; + bWasLinked = sal_True; pUndoDoc->SetLink( nTab, pDoc->GetLinkMode(nTab), pDoc->GetLinkDoc(nTab), pDoc->GetLinkFlt(nTab), pDoc->GetLinkOpt(nTab), pDoc->GetLinkTab(nTab), @@ -2189,13 +2189,13 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord ) } 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 ) ); @@ -2216,15 +2216,15 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord ) pUndoData = new ScRefUndoData( pDoc ); } - BOOL bDelDone = FALSE; + sal_Bool bDelDone = sal_False; for (size_t i = TheTabs.size(); i > 0; i--) { String sCodeName; - BOOL bHasCodeName = pDoc->GetCodeName( TheTabs[i-1], sCodeName ); + sal_Bool bHasCodeName = pDoc->GetCodeName( TheTabs[i-1], sCodeName ); if (pDoc->DeleteTab( TheTabs[i-1], pUndoDoc )) { - bDelDone = TRUE; + bDelDone = sal_True; if( bVbaEnabled ) { if( bHasCodeName ) @@ -2248,7 +2248,7 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord ) if ( nNewTab >= pDoc->GetTableCount() ) nNewTab = pDoc->GetTableCount() - 1; - SetTabNo( nNewTab, TRUE ); + SetTabNo( nNewTab, sal_True ); if (bWasLinked) { @@ -2275,11 +2275,11 @@ BOOL ScViewFunc::DeleteTables(const SvShorts &TheTabs, BOOL bRecord ) //---------------------------------------------------------------------------- -BOOL ScViewFunc::RenameTable( const String& rName, SCTAB nTab ) +sal_Bool ScViewFunc::RenameTable( const String& rName, SCTAB nTab ) { // Reihenfolge Tabelle/Name ist bei DocFunc umgekehrt - BOOL bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). - RenameTable( nTab, rName, TRUE, FALSE ); + sal_Bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc(). + RenameTable( nTab, rName, sal_True, sal_False ); if (bSuccess) { // Der Tabellenname koennte in einer Formel vorkommen... @@ -2293,7 +2293,7 @@ BOOL ScViewFunc::RenameTable( const String& rName, SCTAB nTab ) bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab ) { - bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( nTab, rColor, TRUE, FALSE ); + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( nTab, rColor, sal_True, sal_False ); if (bSuccess) { GetViewData()->GetViewShell()->UpdateInputHandler(); @@ -2303,7 +2303,7 @@ bool ScViewFunc::SetTabBgColor( const Color& rColor, SCTAB nTab ) bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList ) { - bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, TRUE, FALSE ); + bool bSuccess = GetViewData()->GetDocShell()->GetDocFunc().SetTabBgColor( rUndoSetTabBgColorInfoList, sal_True, sal_False ); if (bSuccess) { GetViewData()->GetViewShell()->UpdateInputHandler(); @@ -2315,7 +2315,7 @@ bool ScViewFunc::SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfo void ScViewFunc::InsertAreaLink( const String& rFile, const String& rFilter, const String& rOptions, - const String& rSource, ULONG nRefresh ) + const String& rSource, sal_uLong nRefresh ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCCOL nPosX = GetViewData()->GetCurX(); @@ -2323,7 +2323,7 @@ void ScViewFunc::InsertAreaLink( const String& rFile, SCTAB nTab = GetViewData()->GetTabNo(); ScAddress aPos( nPosX, nPosY, nTab ); - pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, FALSE, FALSE ); + pDocSh->GetDocFunc().InsertAreaLink( rFile, rFilter, rOptions, rSource, aPos, nRefresh, sal_False, sal_False ); } @@ -2356,7 +2356,7 @@ void ScViewFunc::InsertTableLink( const String& rFile, } if ( nTab <= MAXTAB ) - ImportTables( pSrcSh, 1, &nTab, TRUE, + ImportTables( pSrcSh, 1, &nTab, sal_True, GetViewData()->GetTabNo() ); } } @@ -2366,18 +2366,18 @@ void ScViewFunc::InsertTableLink( const String& rFile, // Tabellen aus anderem Dokument kopieren / linken void ScViewFunc::ImportTables( ScDocShell* pSrcShell, - SCTAB nCount, const SCTAB* pSrcTabs, BOOL bLink,SCTAB nTab ) + SCTAB nCount, const SCTAB* pSrcTabs, sal_Bool bLink,SCTAB nTab ) { ScDocument* pSrcDoc = pSrcShell->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); //SCTAB nTab = GetViewData()->GetTabNo(); - BOOL bError = FALSE; - BOOL bRefs = FALSE; - BOOL bName = FALSE; + sal_Bool bError = sal_False; + sal_Bool bRefs = sal_False; + sal_Bool bName = sal_False; if (pSrcDoc->GetDrawLayer()) pDocSh->MakeDrawLayer(); @@ -2394,7 +2394,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, pDoc->CreateValidTabName( aName ); if ( !pDoc->InsertTab( nTab+i, aName ) ) { - bError = TRUE; // total error + bError = sal_True; // total error break; // for } ++nInsCount; @@ -2403,22 +2403,22 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, { SCTAB nSrcTab = pSrcTabs[i]; SCTAB nDestTab1=nTab+i; - ULONG nErrVal = pDoc->TransferTab( pSrcDoc, nSrcTab, nDestTab1, - FALSE ); // no insert + sal_uLong nErrVal = pDoc->TransferTab( pSrcDoc, nSrcTab, nDestTab1, + sal_False ); // no insert switch (nErrVal) { case 0: // interner Fehler oder voll Fehler - bError = TRUE; + bError = sal_True; break; case 2: - bRefs = TRUE; + bRefs = sal_True; break; case 3: - bName = TRUE; + bName = sal_True; break; case 4: - bRefs = bName = TRUE; + bRefs = bName = sal_True; break; } @@ -2430,14 +2430,14 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pSrcDoc->GetScenarioData(nSrcTab, aComment,aColor, nFlags); - pDoc->SetScenario( nDestTab1,TRUE); + pDoc->SetScenario( nDestTab1,sal_True); pDoc->SetScenarioData( nTab+i,aComment,aColor,nFlags); - BOOL bActive = pSrcDoc->IsActiveScenario(nSrcTab ); + sal_Bool bActive = pSrcDoc->IsActiveScenario(nSrcTab ); pDoc->SetActiveScenario( nDestTab1, bActive ); - BOOL bVisible=pSrcDoc->IsVisible(nSrcTab); + sal_Bool bVisible=pSrcDoc->IsVisible(nSrcTab); pDoc->SetVisible(nDestTab1,bVisible ); } @@ -2454,9 +2454,9 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, aFilterName = pMed->GetFilter()->GetFilterName(); String aOptions = ScDocumentLoader::GetOptions(*pMed); - BOOL bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions ); + sal_Bool bWasThere = pDoc->HasLink( aFileName, aFilterName, aOptions ); - ULONG nRefresh = 0; + sal_uLong nRefresh = 0; String aTabStr; for (i=0; i<nInsCount; i++) { @@ -2468,10 +2468,10 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, if (!bWasThere) // Link pro Quelldokument nur einmal eintragen { ScTableLink* pLink = new ScTableLink( pDocSh, aFileName, aFilterName, aOptions, nRefresh ); - pLink->SetInCreate( TRUE ); + pLink->SetInCreate( sal_True ); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName ); pLink->Update(); - pLink->SetInCreate( FALSE ); + pLink->SetInCreate( sal_False ); SfxBindings& rBindings = GetViewData()->GetBindings(); rBindings.Invalidate( SID_LINKS ); @@ -2487,7 +2487,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, for (i=0; i<nInsCount; i++) GetViewData()->InsertTab(nTab); - SetTabNo(nTab,TRUE); + SetTabNo(nTab,sal_True); pDocSh->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS ); @@ -2509,16 +2509,16 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, //---------------------------------------------------------------------------- // Tabelle in anderes Dokument verschieben / kopieren -void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) +void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocShell = GetViewData()->GetDocShell(); ScDocument* pDestDoc = NULL; ScDocShell* pDestShell = NULL; ScTabViewShell* pDestViewSh = NULL; - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); - BOOL bNewDoc = ( nDestDocNo == SC_DOC_NEW ); + sal_Bool bNewDoc = ( nDestDocNo == SC_DOC_NEW ); if ( bNewDoc ) { nDestTab = 0; // als erstes einfuegen @@ -2567,7 +2567,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) pDestDoc->DeleteTab(0); pDestDoc->RenameTab( 0, String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("______42_____")), - FALSE ); + sal_False ); } ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -2604,7 +2604,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) if (!bNewDoc && bUndo) pDestDoc->BeginDrawUndo(); // drawing layer must do its own undo actions - ULONG nErrVal =1; + sal_uLong nErrVal =1; if(nDestTab==SC_TAB_APPEND) nDestTab=pDestDoc->GetTableCount(); SCTAB nDestTab1=nDestTab; @@ -2625,7 +2625,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) for(size_t i=0;i<TheTabs.size();i++) { nErrVal = pDestDoc->TransferTab( pDoc, TheTabs[i], nDestTab1, - FALSE ); // no insert + sal_False ); // no insert // TransferTab doesn't copy drawing objects with bInsertNew=FALSE if ( nErrVal > 0 ) @@ -2635,15 +2635,15 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData(TheTabs[i], aComment,aColor, nFlags); - pDestDoc->SetScenario(nDestTab1,TRUE); + pDestDoc->SetScenario(nDestTab1,sal_True); pDestDoc->SetScenarioData(nDestTab1,aComment,aColor,nFlags); - BOOL bActive = pDoc->IsActiveScenario(TheTabs[i]); + sal_Bool bActive = pDoc->IsActiveScenario(TheTabs[i]); pDestDoc->SetActiveScenario(nDestTab1, bActive ); - BOOL bVisible=pDoc->IsVisible(TheTabs[i]); + sal_Bool bVisible=pDoc->IsVisible(TheTabs[i]); pDestDoc->SetVisible(nDestTab1,bVisible ); } @@ -2660,7 +2660,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) pDestDoc->GetName(nDestTab, sName); pDestShell->GetUndoManager()->AddUndoAction( new ScUndoImportTab( pDestShell, nDestTab, - static_cast<SCTAB>(TheTabs.size()), FALSE)); + static_cast<SCTAB>(TheTabs.size()), sal_False)); } else @@ -2697,7 +2697,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) String sName; pDestDoc->GetName(nDestTab, sName); pDestShell->GetUndoManager()->AddUndoAction( - new ScUndoInsertTab( pDestShell, nDestTab, TRUE, sName ) ); + new ScUndoInsertTab( pDestShell, nDestTab, sal_True, sName ) ); */ if (!bCopy) { @@ -2714,7 +2714,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) pDestDoc->UpdateChartListenerCollection(); pDestDoc->DeleteTab(static_cast<SCTAB>(TheTabs.size())); // first old table -//? pDestDoc->SelectTable(0, TRUE); // neue erste Tabelle selektieren +//? pDestDoc->SelectTable(0, sal_True); // neue erste Tabelle selektieren if (pDestViewSh) pDestViewSh->TabChanged(); // Pages auf dem Drawing-Layer pDestShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, @@ -2777,7 +2777,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) for(int j=0;j<TheTabNames.Count();j++) { nTabCount = pDoc->GetTableCount(); - pString=TheTabNames[sal::static_int_cast<USHORT>(j)]; + pString=TheTabNames[sal::static_int_cast<sal_uInt16>(j)]; if(!pDoc->GetTable(*pString,nMovTab)) { nMovTab=nTabCount; @@ -2786,20 +2786,20 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) { nDestTab1=nTabCount; } - pDocShell->MoveTable( nMovTab, nDestTab1, bCopy, FALSE ); // Undo ist hier + pDocShell->MoveTable( nMovTab, nDestTab1, bCopy, sal_False ); // Undo ist hier if(bCopy && pDoc->IsScenario(nMovTab)) { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData(nMovTab, aComment,aColor, nFlags); - pDoc->SetScenario(nDestTab1,TRUE); + pDoc->SetScenario(nDestTab1,sal_True); pDoc->SetScenarioData(nDestTab1,aComment,aColor,nFlags); - BOOL bActive = pDoc->IsActiveScenario(nMovTab ); + sal_Bool bActive = pDoc->IsActiveScenario(nMovTab ); pDoc->SetActiveScenario( nDestTab1, bActive ); - BOOL bVisible=pDoc->IsVisible(nMovTab); + sal_Bool bVisible=pDoc->IsVisible(nMovTab); pDoc->SetVisible(nDestTab1,bVisible ); } @@ -2839,7 +2839,7 @@ void ScViewFunc::MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy ) else if (!bCopy && nTab<nDestTab) nNewTab--; - SetTabNo( nNewTab, TRUE ); + SetTabNo( nNewTab, sal_True ); //#i29848# adjust references to data on the copied sheet if( bCopy ) @@ -2854,8 +2854,8 @@ void ScViewFunc::ShowTable( const String& rName ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); - BOOL bFound = FALSE; + sal_Bool bUndo(pDoc->IsUndoEnabled()); + sal_Bool bFound = sal_False; SCTAB nPos = 0; String aTabName; SCTAB nCount = pDoc->GetTableCount(); @@ -2865,18 +2865,18 @@ void ScViewFunc::ShowTable( const String& rName ) if ( aTabName == rName ) { nPos = i; - bFound = TRUE; + bFound = sal_True; } } if (bFound) { - pDoc->SetVisible( nPos, TRUE ); + pDoc->SetVisible( nPos, sal_True ); if (bUndo) { - pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nPos, TRUE ) ); + pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nPos, sal_True ) ); } - SetTabNo( nPos, TRUE ); + SetTabNo( nPos, sal_True ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); pDocSh->SetDocumentModified(); @@ -2892,7 +2892,7 @@ void ScViewFunc::HideTable( SCTAB nTab ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); SCTAB nVisible = 0; SCTAB nCount = pDoc->GetTableCount(); for (SCTAB i=0; i<nCount; i++) @@ -2903,16 +2903,16 @@ void ScViewFunc::HideTable( SCTAB nTab ) if (nVisible > 1) { - pDoc->SetVisible( nTab, FALSE ); + pDoc->SetVisible( nTab, sal_False ); if (bUndo) { - pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nTab, FALSE ) ); + pDocSh->GetUndoManager()->AddUndoAction( new ScUndoShowHideTab( pDocSh, nTab, sal_False ) ); } // Views updaten: pDocSh->Broadcast( ScTablesHint( SC_TAB_HIDDEN, nTab ) ); - SetTabNo( nTab, TRUE ); + SetTabNo( nTab, sal_True ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); pDocSh->SetDocumentModified(); @@ -2943,7 +2943,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont ) ATTR_FONT ); // if string contains WEAK characters, set all fonts - BYTE nScript; + sal_uInt8 nScript; ScDocument* pDoc = GetViewData()->GetDocument(); if ( pDoc->HasStringWeakCharacters( rStr ) ) nScript = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX; @@ -2964,7 +2964,7 @@ void ScViewFunc::InsertSpecialChar( const String& rStr, const Font& rFont ) void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine, const SvxBorderLine* pDestLine, const SvxBorderLine* pSrcLine, - BOOL bColor ) + sal_Bool bColor ) { if ( pSrcLine && pDestLine ) { @@ -3003,10 +3003,10 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine, //---------------------------------------------------------------------------- void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, - BOOL bColorOnly ) + sal_Bool bColorOnly ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -3021,13 +3021,13 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, const SfxItemSet& rSelItemSet = pSelAttrs->GetItemSet(); const SfxPoolItem* pBorderAttr = NULL; - SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, TRUE, &pBorderAttr ); + SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, sal_True, &pBorderAttr ); const SfxPoolItem* pTLBRItem = 0; - SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, TRUE, &pTLBRItem ); + SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pTLBRItem ); const SfxPoolItem* pBLTRItem = 0; - SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, TRUE, &pBLTRItem ); + SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pBLTRItem ); // any of the lines visible? if( (eItemState != SFX_ITEM_DEFAULT) || (eTLBRState != SFX_ITEM_DEFAULT) || (eBLTRState != SFX_ITEM_DEFAULT) ) @@ -3123,7 +3123,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine, void ScViewFunc::SetConditionalFormat( const ScConditionalFormat& rNew ) { ScDocument* pDoc = GetViewData()->GetDocument(); - ULONG nIndex = pDoc->AddCondFormat(rNew); // dafuer gibt's kein Undo + sal_uLong nIndex = pDoc->AddCondFormat(rNew); // dafuer gibt's kein Undo SfxUInt32Item aItem( ATTR_CONDITIONAL, nIndex ); ApplyAttr( aItem ); // mit Paint und Undo... @@ -3135,7 +3135,7 @@ void ScViewFunc::SetConditionalFormat( const ScConditionalFormat& rNew ) void ScViewFunc::SetValidation( const ScValidationData& rNew ) { ScDocument* pDoc = GetViewData()->GetDocument(); - ULONG nIndex = pDoc->AddValidationEntry(rNew); // dafuer gibt's kein Undo + sal_uLong nIndex = pDoc->AddValidationEntry(rNew); // dafuer gibt's kein Undo SfxUInt32Item aItem( ATTR_VALIDDATA, nIndex ); ApplyAttr( aItem ); // mit Paint und Undo... diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 0ecd90e82..5bc30a58d 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -219,7 +219,7 @@ using namespace com::sun::star; //---------------------------------------------------------------------------- // C U T -void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects ) +void ScViewFunc::CutToClip( ScDocument* pClipDoc, sal_Bool bIncludeObjects ) { UpdateInputLine(); @@ -236,7 +236,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects ) ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); - const BOOL bRecord(pDoc->IsUndoEnabled()); // Undo/Redo + const sal_Bool bRecord(pDoc->IsUndoEnabled()); // Undo/Redo ScDocShellModificator aModificator( *pDocSh ); @@ -248,10 +248,10 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects ) MarkDataChanged(); } - CopyToClip( pClipDoc, TRUE, FALSE, bIncludeObjects ); // Ab ins Clipboard + CopyToClip( pClipDoc, sal_True, sal_False, bIncludeObjects ); // Ab ins Clipboard ScAddress aOldEnd( aRange.aEnd ); // Zusammengefasste Zellen im Bereich? - pDoc->ExtendMerge( aRange, TRUE ); + pDoc->ExtendMerge( aRange, sal_True ); ScDocument* pUndoDoc = NULL; if ( bRecord ) @@ -262,11 +262,11 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects ) ScRange aCopyRange = aRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(pDoc->GetTableCount()-1); - pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aCopyRange, (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS, sal_False, pUndoDoc ); pDoc->BeginDrawUndo(); } - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocSh->UpdatePaintExt( nExtFlags, aRange ); HideCursor(); // Cursor aendert sich ! @@ -298,9 +298,9 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, BOOL bIncludeObjects ) //---------------------------------------------------------------------------- // C O P Y -BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bIncludeObjects, BOOL bStopEdit ) +sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool bApi, sal_Bool bIncludeObjects, sal_Bool bStopEdit ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bStopEdit ) UpdateInputLine(); @@ -315,11 +315,11 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI aRange.aEnd.Col(), aRange.aEnd.Row(), rMark ) ) { - BOOL bSysClip = FALSE; + sal_Bool bSysClip = sal_False; if ( !pClipDoc ) // no clip doc specified { pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj) - bSysClip = TRUE; // and copy into system + bSysClip = sal_True; // and copy into system } if ( !bCut ) @@ -331,7 +331,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI if ( bSysClip && bIncludeObjects ) { - BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark ); + sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark ); // update ScGlobal::pDrawClipDocShellRef ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) ); } @@ -344,7 +344,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) ); } - pClipDoc->ExtendMerge( aRange, TRUE ); + pClipDoc->ExtendMerge( aRange, sal_True ); if (bSysClip) { @@ -367,7 +367,7 @@ BOOL ScViewFunc::CopyToClip( ScDocument* pClipDoc, BOOL bCut, BOOL bApi, BOOL bI SC_MOD()->SetClipObject( pTransferObj, NULL ); // internal clipboard } - bDone = TRUE; + bDone = sal_True; } else { @@ -516,14 +516,14 @@ ScTransferObj* ScViewFunc::CopyToTransferable() { ScDocument *pClipDoc = new ScDocument( SCDOCMODE_CLIP ); // create one (deleted by ScTransferObj) - BOOL bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark ); + sal_Bool bAnyOle = pDoc->HasOLEObjectsInArea( aRange, &rMark ); ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) ); ScClipParam aClipParam(aRange, false); pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true); ScDrawLayer::SetGlobalDrawPersist(NULL); - pClipDoc->ExtendMerge( aRange, TRUE ); + pClipDoc->ExtendMerge( aRange, sal_True ); ScDocShell* pDocSh = GetViewData()->GetDocShell(); TransferableObjectDescriptor aObjDesc; @@ -550,7 +550,7 @@ void ScViewFunc::PasteDraw() pViewData->GetActivePart() ) ); ScDrawTransferObj* pDrawClip = ScDrawTransferObj::GetOwnClipboard( pWin ); if (pDrawClip) - PasteDraw( aPos, pDrawClip->GetModel(), FALSE, + PasteDraw( aPos, pDrawClip->GetModel(), sal_False, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() ); } @@ -567,8 +567,8 @@ void ScViewFunc::PasteFromSystem() // #129384# keep a reference in case the clipboard is changed during PasteFromClip uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), - PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, - TRUE ); // allow warning dialog + PASTE_NOFUNC, sal_False, sal_False, sal_False, INS_NONE, IDF_NONE, + sal_True ); // allow warning dialog } else if (pDrawClip) PasteDraw(); @@ -578,9 +578,9 @@ void ScViewFunc::PasteFromSystem() // if (pClipObj.Is()) { - ULONG nBiff8 = SotExchange::RegisterFormatName( + sal_uLong nBiff8 = SotExchange::RegisterFormatName( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff8"))); - ULONG nBiff5 = SotExchange::RegisterFormatName( + sal_uLong nBiff5 = SotExchange::RegisterFormatName( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5"))); // als erstes SvDraw-Model, dann Grafik @@ -604,7 +604,7 @@ void ScViewFunc::PasteFromSystem() { // If it's a Writer object, insert RTF instead of OLE - BOOL bDoRtf = FALSE; + sal_Bool bDoRtf = sal_False; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) { @@ -678,8 +678,8 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran if (pOwnClip) { PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), - PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, - TRUE ); // allow warning dialog + PASTE_NOFUNC, sal_False, sal_False, sal_False, INS_NONE, IDF_NONE, + sal_True ); // allow warning dialog } else if (pDrawClip) { @@ -688,17 +688,17 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran SCROW nPosY = pViewData->GetCurY(); Window* pWin = GetActiveWin(); Point aPos = pWin->PixelToLogic( pViewData->GetScrPos( nPosX, nPosY, pViewData->GetActivePart() ) ); - PasteDraw( aPos, pDrawClip->GetModel(), FALSE, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() ); + PasteDraw( aPos, pDrawClip->GetModel(), sal_False, pDrawClip->GetSourceDocID() == pViewData->GetDocument()->GetDocumentID() ); } else { TransferableDataHelper aDataHelper( rxTransferable ); { - ULONG nBiff8 = SotExchange::RegisterFormatName( + sal_uLong nBiff8 = SotExchange::RegisterFormatName( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff8"))); - ULONG nBiff5 = SotExchange::RegisterFormatName( + sal_uLong nBiff5 = SotExchange::RegisterFormatName( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Biff5"))); - ULONG nFormatId = 0; + sal_uLong nFormatId = 0; // als erstes SvDraw-Model, dann Grafik // (Grafik darf nur bei einzelner Grafik drinstehen) @@ -709,7 +709,7 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE )) { // If it's a Writer object, insert RTF instead of OLE - BOOL bDoRtf = FALSE; + sal_Bool bDoRtf = sal_False; TransferableObjectDescriptor aObjDesc; if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) { @@ -756,16 +756,16 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran PasteDataFormat( nFormatId, aDataHelper.GetTransferable(), GetViewData()->GetCurX(), GetViewData()->GetCurY(), - NULL, FALSE, FALSE ); + NULL, sal_False, sal_False ); } } } -BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi ) +sal_Bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, sal_Bool bApi ) { UpdateInputLine(); - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; Window* pWin = GetActiveWin(); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); if ( nFormatId == 0 && pOwnClip ) @@ -773,18 +773,18 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi ) // #129384# keep a reference in case the clipboard is changed during PasteFromClip uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); PasteFromClip( IDF_ALL, pOwnClip->GetDocument(), - PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, + PASTE_NOFUNC, sal_False, sal_False, sal_False, INS_NONE, IDF_NONE, !bApi ); // allow warning dialog } else { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); if ( !aDataHelper.GetTransferable().is() ) - return FALSE; + return sal_False; bRet = PasteDataFormat( nFormatId, aDataHelper.GetTransferable(), GetViewData()->GetCurX(), GetViewData()->GetCurY(), - NULL, FALSE, !bApi ); // allow warning dialog + NULL, sal_False, !bApi ); // allow warning dialog if ( !bRet && !bApi ) ErrorMessage(STR_PASTE_ERROR); @@ -796,10 +796,10 @@ BOOL ScViewFunc::PasteFromSystem( ULONG nFormatId, BOOL bApi ) //---------------------------------------------------------------------------- // P A S T E -BOOL ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransferable>& rxTransferable, - SdrObject* pHitObj, BOOL bLink ) +sal_Bool ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransferable>& rxTransferable, + SdrObject* pHitObj, sal_Bool bLink ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if ( bLink ) { TransferableDataHelper aDataHelper( rxTransferable ); @@ -833,14 +833,14 @@ BOOL ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTransfer return bRet; } -BOOL lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rTabSelection, USHORT nMask ) +sal_Bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + const ScMarkData& rTabSelection, sal_uInt16 nMask ) { SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) if ( rTabSelection.GetTableSelect(nTab) && pDoc->HasAttrib( nCol1, nRow1, nTab, nCol2, nRow2, nTab, nMask ) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } // @@ -895,26 +895,26 @@ bool lcl_checkDestRangeForOverwrite(const ScRange& rDestRange, const ScDocument* } -BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, - USHORT nFunction, BOOL bSkipEmpty, - BOOL bTranspose, BOOL bAsLink, - InsCellCmd eMoveMode, USHORT nUndoExtraFlags, - BOOL bAllowDialogs ) +sal_Bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, + sal_uInt16 nFunction, sal_Bool bSkipEmpty, + sal_Bool bTranspose, sal_Bool bAsLink, + InsCellCmd eMoveMode, sal_uInt16 nUndoExtraFlags, + sal_Bool bAllowDialogs ) { if (!pClipDoc) { DBG_ERROR("PasteFromClip: pClipDoc=0 not allowed"); - return FALSE; + return sal_False; } // fuer Undo etc. immer alle oder keine Inhalte sichern - USHORT nContFlags = IDF_NONE; + sal_uInt16 nContFlags = IDF_NONE; if (nFlags & IDF_CONTENTS) nContFlags |= IDF_CONTENTS; if (nFlags & IDF_ATTRIB) nContFlags |= IDF_ATTRIB; // evtl. Attribute ins Undo ohne sie vom Clip ins Doc zu kopieren - USHORT nUndoFlags = nContFlags; + sal_uInt16 nUndoFlags = nContFlags; if (nUndoExtraFlags & IDF_ATTRIB) nUndoFlags |= IDF_ATTRIB; // do not copy note captions into undo document @@ -926,11 +926,11 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, nFlags, pClipDoc, nFunction, bSkipEmpty, bTranspose, bAsLink, bAllowDialogs, eMoveMode, nContFlags, nUndoFlags); - BOOL bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc - BOOL bIncludeFiltered = bCutMode; + sal_Bool bCutMode = pClipDoc->IsCutMode(); // if transposing, take from original clipdoc + sal_Bool bIncludeFiltered = bCutMode; // paste drawing: also if IDF_NOTE is set (to create drawing layer for note captions) - BOOL bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) ); + sal_Bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (IDF_OBJECTS|IDF_NOTE) ) ); ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip ScDocument* pOrigClipDoc = NULL; @@ -940,12 +940,12 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, SCCOL nX; SCROW nY; // include filtered rows until TransposeClip can skip them - bIncludeFiltered = TRUE; - pClipDoc->GetClipArea( nX, nY, TRUE ); + bIncludeFiltered = sal_True; + pClipDoc->GetClipArea( nX, nY, sal_True ); if ( nY > static_cast<sal_Int32>(MAXCOL) ) // zuviele Zeilen zum Transponieren { ErrorMessage(STR_PASTE_FULL); - return FALSE; + return sal_False; } pOrigClipDoc = pClipDoc; // fuer Referenzen @@ -971,7 +971,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, SCTAB nEndTab; SCCOL nClipSizeX; SCROW nClipSizeY; - pClipDoc->GetClipArea( nClipSizeX, nClipSizeY, TRUE ); // size in clipboard doc + pClipDoc->GetClipArea( nClipSizeX, nClipSizeY, sal_True ); // size in clipboard doc // size in target doc: include filtered rows only if CutMode is set SCCOL nDestSizeX; @@ -982,7 +982,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager(); - const BOOL bRecord(pDoc->IsUndoEnabled()); + const sal_Bool bRecord(pDoc->IsUndoEnabled()); ScDocShellModificator aModificator( *pDocSh ); @@ -1017,7 +1017,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if (bNoPaste) { ErrorMessage(STR_MSSG_PASTEFROMCLIP_0); - return FALSE; + return sal_False; } SCROW nUnfilteredRows = aMarkRange.aEnd.Row() - aMarkRange.aStart.Row() + 1; @@ -1025,7 +1025,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if (bMarkIsFiltered) { ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc); - aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE); + aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_False); nUnfilteredRows = 0; for (ScRange* p = aRangeList.First(); p; p = aRangeList.Next()) { @@ -1040,7 +1040,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, { /* FIXME: this should be a more descriptive error message then. */ ErrorMessage(STR_MSSG_PASTEFROMCLIP_0); - return FALSE; + return sal_False; } #endif } @@ -1069,7 +1069,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, WinBits(WB_YES_NO | WB_DEF_NO), aMessage ); if ( aBox.Execute() != RET_YES ) { - return FALSE; + return sal_False; } } @@ -1097,7 +1097,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if (!ScViewUtil::FitToUnfilteredRows( aMarkRange, pDoc, nDestSizeY+1)) { ErrorMessage(STR_PASTE_FULL); - return FALSE; + return sal_False; } } aMarkRange.GetVars( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab); @@ -1105,7 +1105,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if (bMarkIsFiltered) { ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc); - aFilteredMark.FillRangeListWithMarks( &aRangeList, TRUE); + aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_True); } } } @@ -1127,7 +1127,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, // Sollen Zellen eingefuegt werden? // (zu grosse nEndCol/nEndRow werden weiter unten erkannt) - BOOL bInsertCells = ( eMoveMode != INS_NONE && !bOffLimits ); + sal_Bool bInsertCells = ( eMoveMode != INS_NONE && !bOffLimits ); if ( bInsertCells ) { // #94115# Instead of EnterListAction, the paste undo action is merged into the @@ -1136,10 +1136,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, MarkRange( aUserRange ); // wird vor CopyFromClip sowieso gesetzt // #72930# CutMode is reset on insertion of cols/rows but needed again on cell move - BOOL bCut = pClipDoc->IsCutMode(); - if (!InsertCells( eMoveMode, bRecord, TRUE )) // is inserting possible? + sal_Bool bCut = pClipDoc->IsCutMode(); + if (!InsertCells( eMoveMode, bRecord, sal_True )) // is inserting possible? { - return FALSE; + return sal_False; // #i21036# EnterListAction isn't used, and InsertCells doesn't insert // its undo action on failure, so no undo handling is needed here } @@ -1148,7 +1148,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, } else if (!bOffLimits) { - BOOL bAskIfNotEmpty = bAllowDialogs && + sal_Bool bAskIfNotEmpty = bAllowDialogs && ( nFlags & IDF_CONTENTS ) && nFunction == PASTE_NOFUNC && SC_MOD()->GetInputOptions().GetReplaceCellsWarn(); @@ -1164,14 +1164,14 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, pClipDoc->GetClipStart( nClipStartX, nClipStartY ); SCCOL nUndoEndCol = nClipStartX + nClipSizeX; SCROW nUndoEndRow = nClipStartY + nClipSizeY; // end of source area in clipboard document - BOOL bClipOver = FALSE; + sal_Bool bClipOver = sal_False; // #i68690# ExtendMerge for the clip doc must be called with the clipboard's sheet numbers. // The same end column/row can be used for all calls because the clip doc doesn't contain // content outside the clip area. for (SCTAB nClipTab=0; nClipTab<=MAXTAB; nClipTab++) if ( pClipDoc->HasTable(nClipTab) ) - if ( pClipDoc->ExtendMerge( nClipStartX,nClipStartY, nUndoEndCol,nUndoEndRow, nClipTab, FALSE ) ) - bClipOver = TRUE; + if ( pClipDoc->ExtendMerge( nClipStartX,nClipStartY, nUndoEndCol,nUndoEndRow, nClipTab, sal_False ) ) + bClipOver = sal_True; nUndoEndCol -= nClipStartX + nClipSizeX; nUndoEndRow -= nClipStartY + nClipSizeY; // now contains only the difference added by ExtendMerge nUndoEndCol = sal::static_int_cast<SCCOL>( nUndoEndCol + nEndCol ); @@ -1186,10 +1186,10 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if (nUndoEndCol>MAXCOL || nUndoEndRow>MAXROW) { ErrorMessage(STR_PASTE_FULL); - return FALSE; + return sal_False; } - pDoc->ExtendMergeSel( nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, FALSE ); + pDoc->ExtendMergeSel( nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, sal_False ); // Test auf Zellschutz @@ -1197,7 +1197,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if (!aTester.IsEditable()) { ErrorMessage(aTester.GetMessageId()); - return FALSE; + return sal_False; } //! Test auf Ueberlappung @@ -1231,8 +1231,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, { ScRange aRange(nCol, nRow1, nStartTab); pDoc->ExtendOverlapped(aRange); - pDoc->ExtendMerge(aRange, TRUE, TRUE); - rDocFunc.UnmergeCells(aRange, bRecord, TRUE); + pDoc->ExtendMerge(aRange, sal_True, sal_True); + rDocFunc.UnmergeCells(aRange, bRecord, sal_True); } } } @@ -1244,8 +1244,8 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, pChangeTrack->ResetLastCut(); // kein CutMode mehr } - BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW ); - BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL ); + sal_Bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW ); + sal_Bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL ); ScDocument* pUndoDoc = NULL; ScDocument* pRefUndoDoc = NULL; @@ -1260,18 +1260,18 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, // all sheets - CopyToDocument skips those that don't exist in pUndoDoc SCTAB nTabCount = pDoc->GetTableCount(); pDoc->CopyToDocument( nStartCol, nStartRow, 0, nUndoEndCol, nUndoEndRow, nTabCount-1, - nUndoFlags, FALSE, pUndoDoc ); + nUndoFlags, sal_False, pUndoDoc ); if ( bCutMode ) { 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 ); } } - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab ); // content before the change @@ -1298,7 +1298,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, pMixDoc = new ScDocument( SCDOCMODE_UNDO ); pMixDoc->InitUndo( pDoc, nStartTab, nEndTab ); pDoc->CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab, - IDF_CONTENTS, FALSE, pMixDoc ); + IDF_CONTENTS, sal_False, pMixDoc ); } } @@ -1311,12 +1311,12 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, if ( bRecord ) pDoc->BeginDrawUndo(); - USHORT nNoObjFlags = nFlags & ~IDF_OBJECTS; + sal_uInt16 nNoObjFlags = nFlags & ~IDF_OBJECTS; if (!bAsLink) { // copy normally (original range) pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags, - pRefUndoDoc, pClipDoc, TRUE, FALSE, bIncludeFiltered, + pRefUndoDoc, pClipDoc, sal_True, sal_False, bIncludeFiltered, bSkipEmpty, (bMarkIsFiltered ? &aRangeList : NULL) ); // bei Transpose Referenzen per Hand anpassen @@ -1327,7 +1327,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, { // copy with bAsLink=TRUE pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags, pRefUndoDoc, pClipDoc, - TRUE, TRUE, bIncludeFiltered, bSkipEmpty ); + sal_True, sal_True, bIncludeFiltered, bSkipEmpty ); } else { @@ -1337,9 +1337,9 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, // skipped rows and merged cells don't mix if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() ) - rDocFunc.UnmergeCells( aUserRange, FALSE, TRUE ); + rDocFunc.UnmergeCells( aUserRange, sal_False, sal_True ); - pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, TRUE ); // Refresh + pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, sal_True ); // Refresh // und Bereich neu if ( pMixDoc ) // Rechenfunktionen mit Original-Daten auszufuehren ? @@ -1355,7 +1355,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, // Paste the drawing objects after the row heights have been updated. pDoc->CopyFromClip( aUserRange, aFilteredMark, IDF_OBJECTS, pRefUndoDoc, pClipDoc, - TRUE, FALSE, bIncludeFiltered ); + sal_True, sal_False, bIncludeFiltered ); } // @@ -1400,7 +1400,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, pUndoDoc->AddUndoTab( 0, nTabCount-1 ); pRefUndoDoc->DeleteArea( nStartCol, nStartRow, nEndCol, nEndRow, aFilteredMark, IDF_ALL ); pRefUndoDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,nTabCount-1, - IDF_FORMULA, FALSE, pUndoDoc ); + IDF_FORMULA, sal_False, pUndoDoc ); delete pRefUndoDoc; } @@ -1419,21 +1419,21 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, nUndoEndCol, nUndoEndRow, nEndTab, aFilteredMark, pUndoDoc, pRedoDoc, nFlags | nUndoFlags, pUndoData, NULL, NULL, NULL, - FALSE, &aOptions ); // FALSE = Redo data not yet copied + sal_False, &aOptions ); // sal_False = Redo data not yet copied if ( bInsertCells ) { // Merge the paste undo action into the insert action. // Use ScUndoWrapper so the ScUndoPaste pointer can be stored in the insert action. - pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE ); + pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), sal_True ); } else pUndoMgr->AddUndoAction( pUndo ); pUndoMgr->LeaveListAction(); } - USHORT nPaint = PAINT_GRID; + sal_uInt16 nPaint = PAINT_GRID; if (bColInfo) { nPaint |= PAINT_TOP; @@ -1450,7 +1450,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc, aModificator.SetDocumentModified(); PostPasteFromClip(aUserRange, rMark); - return TRUE; + return sal_True; } bool ScViewFunc::PasteMultiRangesFromClip( @@ -1651,13 +1651,13 @@ void ScViewFunc::PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& // // innerhalb des Dokuments -BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, - BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi ) +sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, + sal_Bool bCut, sal_Bool bRecord, sal_Bool bPaint, sal_Bool bApi ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); HideAllCursors(); // wegen zusammengefassten - BOOL bSuccess = TRUE; + sal_Bool bSuccess = sal_True; SCTAB nDestTab = rDestPos.Tab(); const ScMarkData& rMark = GetViewData()->GetMarkData(); if ( rSource.aStart.Tab() == nDestTab && rSource.aEnd.Tab() == nDestTab && rMark.GetSelectCount() > 1 ) @@ -1716,7 +1716,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, rDestPos.Row() + rSource.aEnd.Row() - rSource.aStart.Row(), nDestTab ); - BOOL bIncludeFiltered = bCut; + sal_Bool bIncludeFiltered = bCut; if ( !bIncludeFiltered ) { // find number of non-filtered rows @@ -1728,7 +1728,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, aDestEnd.SetRow( rDestPos.Row() + nPastedCount - 1 ); } - MarkRange( ScRange( rDestPos, aDestEnd ), FALSE ); //! FALSE ??? + MarkRange( ScRange( rDestPos, aDestEnd ), sal_False ); //! sal_False ??? pDocSh->UpdateOle(GetViewData()); SelectionChanged(); @@ -1738,7 +1738,7 @@ BOOL ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, // Link innerhalb des Dokuments -BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi ) +sal_Bool ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, sal_Bool bApi ) { // Test auf Ueberlappung @@ -1752,7 +1752,7 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B { if (!bApi) ErrorMessage( STR_ERR_LINKOVERLAP ); - return FALSE; + return sal_False; } } @@ -1769,15 +1769,15 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B if ( GetViewData()->GetTabNo() != rDestPos.Tab() ) SetTabNo( rDestPos.Tab() ); - MoveCursorAbs( rDestPos.Col(), rDestPos.Row(), SC_FOLLOW_NONE, FALSE, FALSE ); + MoveCursorAbs( rDestPos.Col(), rDestPos.Row(), SC_FOLLOW_NONE, sal_False, sal_False ); // Paste - PasteFromClip( IDF_ALL, pClipDoc, PASTE_NOFUNC, FALSE, FALSE, TRUE ); // als Link + PasteFromClip( IDF_ALL, pClipDoc, PASTE_NOFUNC, sal_False, sal_False, sal_True ); // als Link delete pClipDoc; - return TRUE; + return sal_True; } diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 5b997d2e9..3864ff113 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -85,7 +85,7 @@ using namespace com::sun::star; // STATIC DATA ----------------------------------------------------------- -BOOL bPasteIsDrop = FALSE; +sal_Bool bPasteIsDrop = sal_False; //================================================================== @@ -103,11 +103,11 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); - const BOOL bRecord (pDoc->IsUndoEnabled()); + const sal_Bool bRecord (pDoc->IsUndoEnabled()); const ScPatternAttr* pPattern = pDoc->GetPattern( nStartCol, nStartRow, nTab ); ScTabEditEngine* pEngine = new ScTabEditEngine( *pPattern, pDoc->GetEnginePool() ); - pEngine->EnableUndo( FALSE ); + pEngine->EnableUndo( sal_False ); Window* pActWin = GetActiveWin(); if (pActWin) @@ -119,10 +119,10 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, // same method now for clipboard or drag&drop // mba: clipboard always must contain absolute URLs (could be from alien source) - aEditView.InsertText( rxTransferable, String(), TRUE ); + aEditView.InsertText( rxTransferable, String(), sal_True ); } - ULONG nParCnt = pEngine->GetParagraphCount(); + sal_uLong nParCnt = pEngine->GetParagraphCount(); if (nParCnt) { SCROW nEndRow = nStartRow + static_cast<SCROW>(nParCnt) - 1; @@ -133,14 +133,14 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, FALSE, pUndoDoc ); + pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL, sal_False, pUndoDoc ); } SCROW nRow = nStartRow; - for( USHORT n = 0; n < nParCnt; n++ ) + for( sal_uInt16 n = 0; n < nParCnt; n++ ) { EditTextObject* pObject = pEngine->CreateTextObject( n ); - EnterData( nStartCol, nRow, nTab, pObject, FALSE, TRUE ); + EnterData( nStartCol, nRow, nTab, pObject, sal_False, sal_True ); // kein Undo, auf einfache Strings testen delete pObject; if( ++nRow > MAXROW ) @@ -151,7 +151,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, { ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO ); pRedoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, FALSE, pRedoDoc ); + pDoc->CopyToDocument( nStartCol,nStartRow,nTab, nStartCol,nEndRow,nTab, IDF_ALL|IDF_NOCAPTIONS, sal_False, pRedoDoc ); ScMarkData aDestMark; aDestMark.SelectOneTable( nTab ); @@ -186,17 +186,17 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, ShowAllCursors(); } } -void ScViewFunc::DoRefConversion( BOOL bRecord ) +void ScViewFunc::DoRefConversion( sal_Bool bRecord ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTabCount = pDoc->GetTableCount(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScRange aMarkRange; rMark.MarkToSimple(); - BOOL bMulti = rMark.IsMultiMarked(); + sal_Bool bMulti = rMark.IsMultiMarked(); if (bMulti) rMark.GetMultiMarkArea( aMarkRange ); else if (rMark.IsMarked()) @@ -215,7 +215,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord ) } ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; ScDocument* pUndoDoc = NULL; if (bRecord) @@ -238,13 +238,13 @@ void ScViewFunc::DoRefConversion( BOOL bRecord ) ScRangeListRef xRanges; GetViewData()->GetMultiArea( xRanges ); - ULONG nCount = xRanges->Count(); + sal_uLong nCount = xRanges->Count(); for (SCTAB i=0; i<nTabCount; i++) { if (rMark.GetTableSelect(i)) { - for (ULONG j=0; j<nCount; j++) + for (sal_uLong j=0; j<nCount; j++) { ScRange aRange = *xRanges->GetObject(j); aRange.aStart.SetTab(i); @@ -270,7 +270,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord ) ScFormulaCell* pNewCell = new ScFormulaCell( pDoc, aPos, pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE ); pDoc->PutCell( aPos, pNewCell ); - bOk = TRUE; + bOk = sal_True; } } pCell = aIter.GetNext(); @@ -309,7 +309,7 @@ void ScViewFunc::DoRefConversion( BOOL bRecord ) ErrorMessage(STR_ERR_NOREF); } // Thesaurus - Undo ok -void ScViewFunc::DoThesaurus( BOOL bRecord ) +void ScViewFunc::DoThesaurus( sal_Bool bRecord ) { SCCOL nCol; SCROW nRow; @@ -327,9 +327,9 @@ void ScViewFunc::DoThesaurus( BOOL bRecord ) EditView* pEditView = NULL; ESelection* pEditSel = NULL; ScEditEngineDefaulter* pThesaurusEngine; - BOOL bIsEditMode = GetViewData()->HasEditView(eWhich); + sal_Bool bIsEditMode = GetViewData()->HasEditView(eWhich); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if (bIsEditMode) // Edit-Mode aktiv { GetViewData()->GetEditView(eWhich, pEditView, nCol, nRow); @@ -450,7 +450,7 @@ void ScViewFunc::DoThesaurus( BOOL bRecord ) } delete pNewTObj; } - KillEditView(TRUE); + KillEditView(sal_True); delete pEditDefaults; delete pThesaurusEngine; delete pOldTObj; @@ -459,18 +459,18 @@ void ScViewFunc::DoThesaurus( BOOL bRecord ) } //UNUSED2008-05 // Spelling Checker - Undo ok -//UNUSED2008-05 void ScViewFunc::DoSpellingChecker( BOOL bRecord ) +//UNUSED2008-05 void ScViewFunc::DoSpellingChecker( sal_Bool bRecord ) //UNUSED2008-05 { //UNUSED2008-05 DoSheetConversion( ScConversionParam( SC_CONVERSION_SPELLCHECK ), bRecord ); //UNUSED2008-05 } -void ScViewFunc::DoHangulHanjaConversion( BOOL bRecord ) +void ScViewFunc::DoHangulHanjaConversion( sal_Bool bRecord ) { ScConversionParam aConvParam( SC_CONVERSION_HANGULHANJA, LANGUAGE_KOREAN, 0, true ); DoSheetConversion( aConvParam, bRecord ); } -void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bRecord ) +void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Bool bRecord ) { SCCOL nCol; SCROW nRow; @@ -482,9 +482,9 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR ScSplitPos eWhich = rViewData.GetActivePart(); EditView* pEditView = NULL; ESelection* pEditSel = NULL; - BOOL bIsEditMode = rViewData.HasEditView(eWhich); + sal_Bool bIsEditMode = rViewData.HasEditView(eWhich); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; if (bIsEditMode) // Edit-Mode aktiv { rViewData.GetEditView(eWhich, pEditView, nCol, nRow); @@ -501,7 +501,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR nTab = rViewData.GetTabNo(); rMark.MarkToMulti(); - BOOL bMarked = rMark.IsMultiMarked(); + sal_Bool bMarked = rMark.IsMultiMarked(); if (bMarked) { ScEditableTester aTester( pDoc, rMark ); @@ -536,8 +536,8 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR // ab hier kein return mehr - BOOL bOldDis = pDoc->IsIdleDisabled(); - pDoc->DisableIdle( TRUE ); // #42726# stop online spelling + sal_Bool bOldDis = pDoc->IsIdleDisabled(); + pDoc->DisableIdle( sal_True ); // #42726# stop online spelling // *** create and init the edit engine *** -------------------------------- @@ -565,7 +565,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR Rectangle aRect( Point( 0, 0 ), Point( 0, 0 ) ); pEditView->SetOutputArea( aRect ); pEngine->SetControlWord( EE_CNTRL_USECHARATTRIBS ); - pEngine->EnableUndo( FALSE ); + pEngine->EnableUndo( sal_False ); pEngine->SetPaperSize( aRect.GetSize() ); pEngine->SetText( EMPTY_STRING ); @@ -600,7 +600,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR // *** final cleanup *** -------------------------------------------------- rViewData.SetSpellingView( NULL ); - KillEditView(TRUE); + KillEditView(sal_True); delete pEngine; delete pEditSel; pDocSh->PostPaintGridAll(); @@ -612,7 +612,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR //UNUSED2008-05 IMPL_LINK_INLINE_START( ScViewFunc, SpellError, void *, nLang ) //UNUSED2008-05 { //UNUSED2008-05 SvtLanguageTable aLangTab; -//UNUSED2008-05 String aErr = aLangTab.GetString((LanguageType) (ULONG) nLang); +//UNUSED2008-05 String aErr = aLangTab.GetString((LanguageType) (sal_uLong) nLang); //UNUSED2008-05 ErrorHandler::HandleError(*new StringErrorInfo( //UNUSED2008-05 ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aErr) ); //UNUSED2008-05 @@ -623,7 +623,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, BOOL bR // Pasten von FORMAT_FILE-Items // wird nicht direkt aus Drop aufgerufen, sondern asynchron -> Dialoge sind erlaubt -BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) +sal_Bool ScViewFunc::PasteFile( const Point& rPos, const String& rFile, sal_Bool bLink ) { INetURLObject aURL; aURL.SetSmartURL( rFile ); @@ -633,7 +633,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) if( ::avmedia::MediaWindow::isMediaURL( aStrURL ) ) { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL ); - return BOOL( 0 != GetViewData()->GetDispatcher().Execute( + return sal_Bool( 0 != GetViewData()->GetDispatcher().Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L ) ); } @@ -645,10 +645,10 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) // nur nach eigenen Filtern suchen, ohne Auswahlbox (wie in ScDocumentLoader) SfxFilterMatcher aMatcher( ScDocShell::Factory().GetFilterContainer()->GetName() ); - SfxMedium aSfxMedium( aStrURL, (STREAM_READ | STREAM_SHARE_DENYNONE), FALSE ); + SfxMedium aSfxMedium( aStrURL, (STREAM_READ | STREAM_SHARE_DENYNONE), sal_False ); // #i73992# GuessFilter no longer calls UseInteractionHandler. // This is UI, so it can be called here. - aSfxMedium.UseInteractionHandler(TRUE); + aSfxMedium.UseInteractionHandler(sal_True); ErrCode nErr = aMatcher.GuessFilter( aSfxMedium, &pFlt ); if ( pFlt && !nErr ) @@ -662,7 +662,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) // Asynchron oeffnen, kann naemlich auch aus D&D heraus passieren // und das bekommt dem MAC nicht so gut ... - return BOOL( 0 != rDispatcher.Execute( SID_OPENDOC, + return sal_Bool( 0 != rDispatcher.Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, 0L) ); } } @@ -670,7 +670,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) // 2. Kann die Datei ueber die Grafik-Filter eingefuegt werden? // (als Link, weil Gallery das so anbietet) - USHORT nFilterFormat; + sal_uInt16 nFilterFormat; Graphic aGraphic; GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter(); @@ -700,7 +700,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) SCROW nPosY = aRange.aStart.Row(); InsertBookmark( aStrURL, aStrURL, nPosX, nPosY ); - return TRUE; + return sal_True; } else { @@ -723,11 +723,11 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) // #105851# If an OLE object can't be created, insert a URL button GetViewData()->GetViewShell()->InsertURLButton( aStrURL, aStrURL, EMPTY_STRING, &rPos ); - return TRUE; + return sal_True; } } -BOOL ScViewFunc::PasteBookmark( ULONG nFormatId, +sal_Bool ScViewFunc::PasteBookmark( sal_uLong nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY ) @@ -735,15 +735,15 @@ BOOL ScViewFunc::PasteBookmark( ULONG nFormatId, INetBookmark aBookmark; TransferableDataHelper aDataHelper( rxTransferable ); if ( !aDataHelper.GetINetBookmark( nFormatId, aBookmark ) ) - return FALSE; + return sal_False; InsertBookmark( aBookmark.GetDescription(), aBookmark.GetURL(), nPosX, nPosY ); - return TRUE; + return sal_True; } void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL, SCCOL nPosX, SCROW nPosY, const String* pTarget, - BOOL bTryReplace ) + sal_Bool bTryReplace ) { ScViewData* pViewData = GetViewData(); if ( pViewData->HasEditView( pViewData->GetActivePart() ) && @@ -783,7 +783,7 @@ void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL, } } - USHORT nPara = aEngine.GetParagraphCount(); + sal_uInt16 nPara = aEngine.GetParagraphCount(); if (nPara) --nPara; xub_StrLen nTxtLen = aEngine.GetTextLen(nPara); @@ -807,7 +807,7 @@ void ScViewFunc::InsertBookmark( const String& rDescription, const String& rURL, delete pData; } -BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent ) +sal_Bool ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent ) { ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ); ScDocument* pDoc = GetViewData()->GetDocShell()->GetDocument(); @@ -818,7 +818,7 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent ) const EditTextObject* pData = ((ScEditCell*)pCell)->GetData(); if (pData) { - BOOL bField = pData->IsFieldObject(); + sal_Bool bField = pData->IsFieldObject(); if (bField) { const SvxFieldItem* pFieldItem = pData->GetField(); @@ -834,13 +834,13 @@ BOOL ScViewFunc::HasBookmarkAtCursor( SvxHyperlinkItem* pContent ) pContent->SetURL( pURLField->GetURL() ); pContent->SetTargetFrame( pURLField->GetTargetFrame() ); } - return TRUE; + return sal_True; } } } } } - return FALSE; + return sal_False; } diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 1ea0761c6..6b8739d16 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -85,12 +85,12 @@ using namespace com::sun::star; //------------------------------------------------------------------ -BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, +sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, const uno::Reference<datatransfer::XTransferable>& rxTransferable, - SCCOL nPosX, SCROW nPosY, Point* pLogicPos, BOOL bLink, BOOL bAllowDialogs ) + SCCOL nPosX, SCROW nPosY, Point* pLogicPos, sal_Bool bLink, sal_Bool bAllowDialogs ) { ScDocument* pDoc = GetViewData()->GetDocument(); - pDoc->SetPastingDrawFromOtherDoc( TRUE ); + pDoc->SetPastingDrawFromOtherDoc( sal_True ); Point aPos; // inserting position (1/100 mm) if (pLogicPos) @@ -98,7 +98,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, else { // inserting position isn't needed for text formats - BOOL bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) || + sal_Bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) || nFormatId == FORMAT_RTF ); if ( !bIsTextFormat ) { @@ -110,13 +110,13 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, nXT += pDoc->GetColWidth(i,nTab); if (pDoc->IsNegativePage(nTab)) nXT = -nXT; - ULONG nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab); + sal_uLong nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab); aPos = Point( (long)(nXT * HMM_PER_TWIPS), (long)(nYT * HMM_PER_TWIPS) ); } } TransferableDataHelper aDataHelper( rxTransferable ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; // // handle individual formats @@ -172,10 +172,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, SetCursor( nPosX, nPosY ); Unmark(); PasteFromClip( IDF_ALL, pClipDoc, - PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, + PASTE_NOFUNC, sal_False, sal_False, sal_False, INS_NONE, IDF_NONE, bAllowDialogs ); delete pClipDoc; - bRet = TRUE; + bRet = sal_True; } xDocShRef->DoClose(); @@ -190,7 +190,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, { // try to get the replacement image from the clipboard Graphic aGraphic; - ULONG nGrFormat = 0; + sal_uLong nGrFormat = 0; // (wg. Selection Manager bei Trustet Solaris) #ifndef SOLARIS /* @@ -213,7 +213,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, else PasteObject( aPos, xObj, &aObjDesc.maSize ); - bRet = TRUE; + bRet = sal_True; } else { @@ -265,7 +265,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, { // try to get the replacement image from the clipboard Graphic aGraphic; - ULONG nGrFormat = 0; + sal_uLong nGrFormat = 0; // (wg. Selection Manager bei Trustet Solaris) #ifndef SOLARIS @@ -289,7 +289,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, // let object stay in loaded state after insertion SdrOle2Obj::Unload( xObj, embed::Aspects::MSOLE_CONTENT ); - bRet = TRUE; + bRet = sal_True; } else { @@ -309,7 +309,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, { // use EditView's PasteSpecial / Drop PasteRTF( nPosX, nPosY, rxTransferable ); - bRet = TRUE; + bRet = sal_True; } else { @@ -352,10 +352,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, // Content was partially pasted, which can be undone by // the user though. if (aObj.IsOverflow()) - bRet = FALSE; + bRet = sal_False; } else - bRet = TRUE; + bRet = sal_True; // Yes, no failure, don't raise a "couldn't paste" // dialog if user cancelled. delete pDlg; @@ -382,7 +382,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, ScDocShell* pDocSh = GetViewData()->GetDocShell(); SCTAB nTab = GetViewData()->GetTabNo(); - ClickCursor(nPosX, nPosY, FALSE); // set cursor position + ClickCursor(nPosX, nPosY, sal_False); // set cursor position // Creation of database area "Import1" isn't here, but in the DocShell // slot execute, so it can be added to the undo action @@ -398,7 +398,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, } SfxStringItem aTarget(FN_PARAM_1, sTarget); - BOOL bAreaIsNew = !pDBData; + sal_Bool bAreaIsNew = !pDBData; SfxBoolItem aAreaNew(FN_PARAM_2, bAreaIsNew); ::svx::ODataAccessDescriptor aDesc; @@ -416,7 +416,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, rDisp.Execute(SID_SBA_IMPORT, SFX_CALLMODE_ASYNCHRON, &aDataDesc, &aTarget, &aAreaNew, pCursorItem.get(), (void*)0 ); - bRet = TRUE; + bRet = sal_True; } } else if (nFormatId == SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE) @@ -459,8 +459,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, pScDrawView->InsertObjectSafe(pObj, *pScDrawView->GetSdrPageView()); - GetViewData()->GetViewShell()->SetDrawShell( TRUE ); - bRet = TRUE; + GetViewData()->GetViewShell()->SetDrawShell( sal_True ); + bRet = sal_True; } } } @@ -507,9 +507,9 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, SvxDrawingLayerImport( pModel, xInputStream ); // set everything to right layer: - ULONG nObjCount = 0; - USHORT nPages = pModel->GetPageCount(); - for (USHORT i=0; i<nPages; i++) + sal_uLong nObjCount = 0; + sal_uInt16 nPages = pModel->GetPageCount(); + for (sal_uInt16 i=0; i<nPages; i++) { SdrPage* pPage = pModel->GetPage(i); SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS ); @@ -529,7 +529,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, PasteDraw( aPos, pModel, (nObjCount > 1) ); // grouped if more than 1 object delete pModel; aDragShellRef->DoClose(); - bRet = TRUE; + bRet = sal_True; } } else if ( (nFormatId == SOT_FORMATSTR_ID_BIFF_5) || (nFormatId == SOT_FORMATSTR_ID_BIFF_8) ) @@ -583,17 +583,17 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, if ( pLogicPos ) { // position specified (Drag&Drop) - change selection - MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE ); + MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, sal_False, sal_False ); Unmark(); } pInsDoc->SetClipArea( aSource ); PasteFromClip( IDF_ALL, pInsDoc, - PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE, + PASTE_NOFUNC, sal_False, sal_False, sal_False, INS_NONE, IDF_NONE, bAllowDialogs ); delete pInsDoc; - bRet = TRUE; + bRet = sal_True; } } } @@ -608,8 +608,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, FileList aFileList; if ( aDataHelper.GetFileList( nFormatId, aFileList ) ) { - ULONG nCount = aFileList.Count(); - for( ULONG i = 0; i < nCount ; i++ ) + sal_uLong nCount = aFileList.Count(); + for( sal_uLong i = 0; i < nCount ; i++ ) { String aFile = aFileList.GetFile( i ); @@ -627,7 +627,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, aPos.X() += 400; aPos.Y() += 400; } - bRet = TRUE; + bRet = sal_True; } } else if ( nFormatId == SOT_FORMATSTR_ID_SOLK || @@ -638,7 +638,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId, bRet = PasteBookmark( nFormatId, rxTransferable, nPosX, nPosY ); } - pDoc->SetPastingDrawFromOtherDoc( FALSE ); + pDoc->SetPastingDrawFromOtherDoc( sal_False ); return bRet; } @@ -653,7 +653,7 @@ ByteString lcl_GetSubString( sal_Char* pData, long nStart, long nDataSize ) return ByteString( pData + nStart ); } -BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable ) +sal_Bool ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable ) { TransferableDataHelper aDataHelper( rxTransferable ); @@ -664,13 +664,13 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx if ( !aDataHelper.GetSequence( SOT_FORMATSTR_ID_LINK, aSequence ) ) { DBG_ERROR("DDE Data not found."); - return FALSE; + return sal_False; } // check size (only if string is available in transferable) - USHORT nCols = 1; - USHORT nRows = 1; + sal_uInt16 nCols = 1; + sal_uInt16 nRows = 1; if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) { String aDataStr; @@ -743,7 +743,7 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx EnterMatrix( aFormula ); CursorPosChanged(); - return TRUE; + return sal_True; } diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index d744582f4..f57ba5b90 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -53,7 +53,7 @@ void ScViewFunc::DetectiveAddPred() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveAddPred( GetViewData()->GetCurPos() ); if (!bDone) Sound::Beep(); @@ -64,7 +64,7 @@ void ScViewFunc::DetectiveAddPred() void ScViewFunc::DetectiveDelPred() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveDelPred( GetViewData()->GetCurPos() ); if (!bDone) Sound::Beep(); @@ -75,7 +75,7 @@ void ScViewFunc::DetectiveDelPred() void ScViewFunc::DetectiveAddSucc() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveAddSucc( GetViewData()->GetCurPos() ); if (!bDone) Sound::Beep(); @@ -86,7 +86,7 @@ void ScViewFunc::DetectiveAddSucc() void ScViewFunc::DetectiveDelSucc() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveDelSucc( GetViewData()->GetCurPos() ); if (!bDone) Sound::Beep(); @@ -97,7 +97,7 @@ void ScViewFunc::DetectiveDelSucc() void ScViewFunc::DetectiveAddError() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveAddError( GetViewData()->GetCurPos() ); if (!bDone) Sound::Beep(); @@ -108,7 +108,7 @@ void ScViewFunc::DetectiveAddError() void ScViewFunc::DetectiveDelAll() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveDelAll( GetViewData()->GetTabNo() ); if (!bDone) Sound::Beep(); @@ -119,7 +119,7 @@ void ScViewFunc::DetectiveDelAll() void ScViewFunc::DetectiveMarkInvalid() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc(). + sal_Bool bDone = pDocSh->GetDocFunc(). DetectiveMarkInvalid( GetViewData()->GetTabNo() ); if (!bDone) Sound::Beep(); @@ -130,7 +130,7 @@ void ScViewFunc::DetectiveMarkInvalid() void ScViewFunc::DetectiveRefresh() { ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bDone = pDocSh->GetDocFunc().DetectiveRefresh(); + sal_Bool bDone = pDocSh->GetDocFunc().DetectiveRefresh(); if (!bDone) Sound::Beep(); diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 277cbd4a6..b53c62818 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -61,7 +61,7 @@ extern Point aDragStartDiff; // STATIC DATA ----------------------------------------------------------- -BOOL bPasteIsMove = FALSE; +sal_Bool bPasteIsMove = sal_False; using namespace com::sun::star; @@ -87,7 +87,7 @@ void lcl_AdjustInsertPos( ScViewData* pData, Point& rPos, Size& rSize ) } void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, - BOOL bGroup, BOOL bSameDocClipboard ) + sal_Bool bGroup, sal_Bool bSameDocClipboard ) { MakeDrawLayer(); Point aPos( rLogicPos ); @@ -102,7 +102,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, pRef->SetMapMode( MapMode(MAP_100TH_MM) ); } - BOOL bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ); + sal_Bool bNegativePage = GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ); SdrView* pDragEditView = NULL; ScModule* pScMod = SC_MOD(); @@ -128,7 +128,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, if (bGroup) pScDrawView->BegUndo( ScGlobal::GetRscString( STR_UNDO_PASTE ) ); - BOOL bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() ); + sal_Bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() ); if (bSameDoc) { // lokal kopieren - incl. Charts @@ -144,7 +144,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, pDragEditView->GetSdrPageView()->GetPage() ) { if ( nDiffX != 0 || nDiffY != 0 ) - pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY), FALSE); + pDragEditView->MoveAllMarked(Size(nDiffX,nDiffY), sal_False); } else { @@ -154,8 +154,8 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, SdrMarkList aMark = pDragEditView->GetMarkedObjectList(); aMark.ForceSort(); - ULONG nMarkAnz=aMark.GetMarkCount(); - for (ULONG nm=0; nm<nMarkAnz; nm++) { + sal_uLong nMarkAnz=aMark.GetMarkCount(); + for (sal_uLong nm=0; nm<nMarkAnz; nm++) { const SdrMark* pM=aMark.GetMark(nm); const SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -188,7 +188,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, } else { - bPasteIsMove = FALSE; // kein internes Verschieben passiert + bPasteIsMove = sal_False; // kein internes Verschieben passiert SdrView aView(pModel); // #i71529# never create a base class of SdrView directly! SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0)); @@ -199,7 +199,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, // #41333# Markierung nicht aendern, wenn Ole-Objekt aktiv // (bei Drop aus Ole-Objekt wuerde sonst mitten im ExecuteDrag deaktiviert!) - ULONG nOptions = 0; + sal_uLong nOptions = 0; SfxInPlaceClient* pClient = GetViewData()->GetViewShell()->GetIPClient(); if ( pClient && pClient->IsObjectInPlaceActive() ) nOptions |= SDRINSERT_DONTMARK; @@ -207,12 +207,12 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, // #89247# Set flag for ScDocument::UpdateChartListeners() which is // called during paste. if ( !bSameDocClipboard ) - GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( TRUE ); + GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( sal_True ); pScDrawView->Paste( *pModel, aPos, NULL, nOptions ); if ( !bSameDocClipboard ) - GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( FALSE ); + GetViewData()->GetDocument()->SetPastingDrawFromOtherDoc( sal_False ); // #68991# Paste puts all objects on the active (front) layer // controls must be on SC_LAYER_CONTROLS @@ -245,7 +245,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, if (pRef) pRef->SetMapMode( aOldMapMode ); - // GetViewData()->GetViewShell()->SetDrawShell( TRUE ); + // GetViewData()->GetViewShell()->SetDrawShell( sal_True ); // #99759# It is not sufficient to just set the DrawShell if we pasted, for // example, a chart. SetDrawShellOrSub() would only work for D&D in the // same document but not if inserting from the clipboard, therefore @@ -254,7 +254,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, } -BOOL ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj, +sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::XEmbeddedObject >& xObj, const Size* pDescSize, const Graphic* pReplGraph, const ::rtl::OUString& aMediaType, sal_Int64 nAspect ) { MakeDrawLayer(); @@ -330,28 +330,28 @@ BOOL ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embed::X SdrPageView* pPV = pDrView->GetSdrPageView(); pDrView->InsertObjectSafe( pSdrObj, *pPV ); // nicht markieren wenn Ole - GetViewData()->GetViewShell()->SetDrawShell( TRUE ); - return TRUE; + GetViewData()->GetViewShell()->SetDrawShell( sal_True ); + return sal_True; } else - return FALSE; + return sal_False; } -BOOL ScViewFunc::PasteBitmap( const Point& rPos, const Bitmap& rBmp ) +sal_Bool ScViewFunc::PasteBitmap( const Point& rPos, const Bitmap& rBmp ) { String aEmpty; Graphic aGraphic(rBmp); return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty ); } -BOOL ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf ) +sal_Bool ScViewFunc::PasteMetaFile( const Point& rPos, const GDIMetaFile& rMtf ) { String aEmpty; Graphic aGraphic(rMtf); return PasteGraphic( rPos, aGraphic, aEmpty, aEmpty ); } -BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, +sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, const String& rFile, const String& rFilter ) { MakeDrawLayer(); @@ -377,7 +377,7 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, if ( GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ) ) aPos.X() -= aSize.Width(); - GetViewData()->GetViewShell()->SetDrawShell( TRUE ); + GetViewData()->GetViewShell()->SetDrawShell( sal_True ); Rectangle aRect(aPos, aSize); SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect); @@ -399,12 +399,12 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, if (rFile.Len()) pGrafObj->SetGraphicLink( rFile, rFilter ); - return TRUE; + return sal_True; } -BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGraphic ) +sal_Bool ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGraphic ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SdrGrafObj* pNewGrafObj = NULL; ScDrawView* pScDrawView = GetScDrawView(); @@ -426,7 +426,7 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap pScDrawView->ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj); pScDrawView->EndUndo(); - bRet = TRUE; + bRet = sal_True; } else if (pPickObj->IsClosedObj() && !pPickObj->ISA(SdrOle2Obj)) { @@ -445,7 +445,7 @@ BOOL ScViewFunc::ApplyGraphicToObject( SdrObject* pPickObj, const Graphic& rGrap pPickObj->SetMergedItemSetAndBroadcast(aSet); - bRet = TRUE; + bRet = sal_True; } } return bRet; diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index c594e3b32..e477cc11b 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -94,13 +94,13 @@ ScViewFunc::ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) : ScTabView( pParent, rDocSh, pViewShell ), - bFormatValid( FALSE ) + bFormatValid( sal_False ) { } //UNUSED2008-05 ScViewFunc::ScViewFunc( Window* pParent, const ScViewFunc& rViewFunc, ScTabViewShell* pViewShell ) : //UNUSED2008-05 ScTabView( pParent, rViewFunc, pViewShell ), -//UNUSED2008-05 bFormatValid( FALSE ) +//UNUSED2008-05 bFormatValid( sal_False ) //UNUSED2008-05 { //UNUSED2008-05 } @@ -118,37 +118,37 @@ void ScViewFunc::StartFormatArea() // start only with single cell (marked or cursor position) ScRange aMarkRange; - BOOL bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE); + sal_Bool bOk = (GetViewData()->GetSimpleArea( aMarkRange ) == SC_MARK_SIMPLE); if ( bOk && aMarkRange.aStart != aMarkRange.aEnd ) - bOk = FALSE; + bOk = sal_False; if (bOk) { - bFormatValid = TRUE; + bFormatValid = sal_True; aFormatSource = aMarkRange.aStart; aFormatArea = ScRange( aFormatSource ); } else - bFormatValid = FALSE; // keinen alten Bereich behalten + bFormatValid = sal_False; // keinen alten Bereich behalten } -BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged ) +sal_Bool ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Bool bAttrChanged ) { // ueberhaupt aktiviert? if ( !SC_MOD()->GetInputOptions().GetExtendFormat() ) - return FALSE; + return sal_False; // Test: Eingabe mit Zahlformat (bAttrChanged) immer als neue Attributierung behandeln // (alte Area verwerfen). Wenn das nicht gewollt ist, den if-Teil weglassen: if ( bAttrChanged ) { StartFormatArea(); - return FALSE; + return sal_False; } //! Abfrage, ob Zelle leer war ??? - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScRange aNewRange = aFormatArea; if ( bFormatValid && nTab == aFormatSource.Tab() ) { @@ -157,18 +157,18 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC // innerhalb ? if ( nCol >= aFormatArea.aStart.Col() && nCol <= aFormatArea.aEnd.Col() ) { - bFound = TRUE; // Bereich nicht aendern + bFound = sal_True; // Bereich nicht aendern } // links ? if ( nCol+1 == aFormatArea.aStart.Col() ) { - bFound = TRUE; + bFound = sal_True; aNewRange.aStart.SetCol( nCol ); } // rechts ? if ( nCol == aFormatArea.aEnd.Col()+1 ) { - bFound = TRUE; + bFound = sal_True; aNewRange.aEnd.SetCol( nCol ); } } @@ -177,13 +177,13 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC // oben ? if ( nRow+1 == aFormatArea.aStart.Row() ) { - bFound = TRUE; + bFound = sal_True; aNewRange.aStart.SetRow( nRow ); } // unten ? if ( nRow == aFormatArea.aEnd.Row()+1 ) { - bFound = TRUE; + bFound = sal_True; aNewRange.aEnd.SetRow( nRow ); } } @@ -193,7 +193,7 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC aFormatArea = aNewRange; // erweitern else { - bFormatValid = FALSE; // ausserhalb -> abbrechen + bFormatValid = sal_False; // ausserhalb -> abbrechen if ( bAttrChanged ) // Wert mit Zahlformat eingegeben? StartFormatArea(); // dann ggf. neu starten } @@ -202,12 +202,12 @@ BOOL ScViewFunc::TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrC } void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, - BOOL bAttrChanged, BOOL bAddUndo ) + sal_Bool bAttrChanged, sal_Bool bAddUndo ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); if (bAddUndo && !pDoc->IsUndoEnabled()) - bAddUndo = FALSE; + bAddUndo = sal_False; const ScPatternAttr* pSource = pDoc->GetPattern( aFormatSource.Col(), aFormatSource.Row(), nTab ); @@ -224,7 +224,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, if ( pSrcStyle && pSrcStyle != pDocOld->GetStyleSheet() ) pDoc->ApplyStyle( nCol, nRow, nTab, *pSrcStyle ); pDoc->ApplyPattern( nCol, nRow, nTab, *pSource ); - AdjustRowHeight( nRow, nRow, TRUE ); //! nicht doppelt ? + AdjustRowHeight( nRow, nRow, sal_True ); //! nicht doppelt ? if ( bAddUndo ) { @@ -233,7 +233,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, pDocSh->GetUndoManager()->AddUndoAction( new ScUndoCursorAttr( pDocSh, nCol, nRow, nTab, pOldPattern, pNewPattern, pSource, - TRUE ) ); + sal_True ) ); delete pOldPattern; // wird im Undo kopiert (Pool) } @@ -247,7 +247,7 @@ void ScViewFunc::DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab, // Hilfsroutinen -USHORT ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula ) +sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, sal_Bool bFormula ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); @@ -266,14 +266,14 @@ USHORT ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula ) aZoomX = aZoomY = Fraction( 1, 1 ); } - USHORT nTwips = pDoc->GetOptimalColWidth( nCol, nTab, aProv.GetDevice(), + sal_uInt16 nTwips = pDoc->GetOptimalColWidth( nCol, nTab, aProv.GetDevice(), nPPTX, nPPTY, aZoomX, aZoomY, bFormula, &rMark ); return nTwips; } -BOOL ScViewFunc::SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) +sal_Bool ScViewFunc::SelectionEditable( sal_Bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) { - BOOL bRet; + sal_Bool bRet; ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); if (rMark.IsMarked() || rMark.IsMultiMarked()) @@ -293,50 +293,50 @@ BOOL ScViewFunc::SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix /* = NULL */ ) #define LRU_MAX 10 #endif -BOOL lcl_FunctionKnown( USHORT nOpCode ) +sal_Bool lcl_FunctionKnown( sal_uInt16 nOpCode ) { const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - ULONG nCount = pFuncList->GetCount(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = pFuncList->GetCount(); + for (sal_uLong i=0; i<nCount; i++) if ( pFuncList->GetFunction(i)->nFIndex == nOpCode ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL lcl_AddFunction( ScAppOptions& rAppOpt, USHORT nOpCode ) +sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode ) { - USHORT nOldCount = rAppOpt.GetLRUFuncListCount(); - USHORT* pOldList = rAppOpt.GetLRUFuncList(); - USHORT nPos; + sal_uInt16 nOldCount = rAppOpt.GetLRUFuncListCount(); + sal_uInt16* pOldList = rAppOpt.GetLRUFuncList(); + sal_uInt16 nPos; for (nPos=0; nPos<nOldCount; nPos++) if (pOldList[nPos] == nOpCode) // is the function already in the list? { if ( nPos == 0 ) - return FALSE; // already at the top -> no change + return sal_False; // already at the top -> no change // count doesn't change, so the original array is modified - for (USHORT nCopy=nPos; nCopy>0; nCopy--) + for (sal_uInt16 nCopy=nPos; nCopy>0; nCopy--) pOldList[nCopy] = pOldList[nCopy-1]; pOldList[0] = nOpCode; - return TRUE; // list has changed + return sal_True; // list has changed } if ( !lcl_FunctionKnown( nOpCode ) ) - return FALSE; // not in function list -> no change + return sal_False; // not in function list -> no change - USHORT nNewCount = Min( (USHORT)(nOldCount + 1), (USHORT)LRU_MAX ); - USHORT nNewList[LRU_MAX]; + sal_uInt16 nNewCount = Min( (sal_uInt16)(nOldCount + 1), (sal_uInt16)LRU_MAX ); + sal_uInt16 nNewList[LRU_MAX]; nNewList[0] = nOpCode; for (nPos=1; nPos<nNewCount; nPos++) nNewList[nPos] = pOldList[nPos-1]; rAppOpt.SetLRUFuncList( nNewList, nNewCount ); - return TRUE; // list has changed + return sal_True; // list has changed } // eigentliche Funktionen @@ -344,7 +344,7 @@ BOOL lcl_AddFunction( ScAppOptions& rAppOpt, USHORT nOpCode ) // Eingabe - Undo OK void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, - BOOL bRecord, const EditTextObject* pData ) + sal_Bool bRecord, const EditTextObject* pData ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -352,7 +352,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS SCTAB nSelCount = rMark.GetSelectCount(); SCTAB i; if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShellModificator aModificator( *pDocSh ); @@ -360,20 +360,20 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS ScEditableTester aTester( pDoc, nCol,nRow, nCol,nRow, rMark ); if (aTester.IsEditable()) { - BOOL bEditDeleted = FALSE; - BYTE nOldScript = 0; + sal_Bool bEditDeleted = sal_False; + sal_uInt8 nOldScript = 0; ScBaseCell** ppOldCells = NULL; - BOOL* pHasFormat = NULL; - ULONG* pOldFormats = NULL; + sal_Bool* pHasFormat = NULL; + sal_uLong* pOldFormats = NULL; SCTAB* pTabs = NULL; SCTAB nUndoPos = 0; EditTextObject* pUndoData = NULL; if ( bRecord ) { ppOldCells = new ScBaseCell*[nSelCount]; - pHasFormat = new BOOL[nSelCount]; - pOldFormats = new ULONG[nSelCount]; + pHasFormat = new sal_Bool[nSelCount]; + pOldFormats = new sal_uLong[nSelCount]; pTabs = new SCTAB[nSelCount]; nUndoPos = 0; @@ -387,13 +387,13 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS { ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc ); if ( pDocCell->GetCellType() == CELLTYPE_EDIT ) - bEditDeleted = TRUE; + bEditDeleted = sal_True; - BYTE nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell ); + sal_uInt8 nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell ); if ( nOldScript == 0 ) nOldScript = nDocScript; else if ( nDocScript != nOldScript ) - bEditDeleted = TRUE; + bEditDeleted = sal_True; } else { @@ -403,13 +403,13 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS const SfxPoolItem* pItem; const ScPatternAttr* pPattern = pDoc->GetPattern(nCol, nRow, i); if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState( - ATTR_VALUE_FORMAT,FALSE,&pItem) ) + ATTR_VALUE_FORMAT,sal_False,&pItem) ) { - pHasFormat[nUndoPos] = TRUE; + pHasFormat[nUndoPos] = sal_True; pOldFormats[nUndoPos] = ((const SfxUInt32Item*)pItem)->GetValue(); } else - pHasFormat[nUndoPos] = FALSE; + pHasFormat[nUndoPos] = sal_False; ++nUndoPos; } @@ -457,7 +457,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS } } - BOOL bNumFmtChanged = FALSE; + sal_Bool bNumFmtChanged = sal_False; if ( bFormula ) { // Formel, compile mit AutoCorrection for (i=0; i<nTabCount; i++) @@ -467,27 +467,27 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS ScCompiler aComp( pDoc, aPos); aComp.SetGrammar(pDoc->GetGrammar()); //2do: AutoCorrection via CalcOptions abschaltbar machen - aComp.SetAutoCorrection( TRUE ); + aComp.SetAutoCorrection( sal_True ); if ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) { aComp.SetExtendedErrorDetection( true ); } String aFormula( rString ); ScTokenArray* pArr; - BOOL bAgain; + sal_Bool bAgain; do { - bAgain = FALSE; - BOOL bAddEqual = FALSE; + bAgain = sal_False; + sal_Bool bAddEqual = sal_False; ScTokenArray* pArrFirst = pArr = aComp.CompileString( aFormula ); - BOOL bCorrected = aComp.IsCorrected(); + sal_Bool bCorrected = aComp.IsCorrected(); if ( bCorrected ) { // probieren, mit erster Parser-Korrektur neu zu parsen pArr = aComp.CompileString( aComp.GetCorrectedFormula() ); } if ( !pArr->GetCodeError() ) { - bAddEqual = TRUE; + bAddEqual = sal_True; aComp.CompileTokenArray(); bCorrected |= aComp.IsCorrected(); } @@ -517,7 +517,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS aFormula = aCorrectedFormula; if ( pArr != pArrFirst ) delete pArrFirst; - bAgain = TRUE; + bAgain = sal_True; } else { @@ -536,7 +536,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS // Zellen RPN geloescht und der Fehler explizit gesetzt werden, da // via FormulaCell copy-ctor und Interpreter das, wenn moeglich, // wieder glattgebuegelt wird, zu intelligent.. z.B.: =1)) - USHORT nError = pArr->GetCodeError(); + sal_uInt16 nError = pArr->GetCodeError(); if ( !nError ) { // #68693# update list of recent functions with all functions that @@ -544,12 +544,12 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS ScModule* pScMod = SC_MOD(); ScAppOptions aAppOpt = pScMod->GetAppOptions(); - BOOL bOptChanged = FALSE; + sal_Bool bOptChanged = sal_False; formula::FormulaToken** ppToken = pArr->GetArray(); - USHORT nTokens = pArr->GetLen(); - USHORT nLevel = 0; - for (USHORT nTP=0; nTP<nTokens; nTP++) + sal_uInt16 nTokens = pArr->GetLen(); + sal_uInt16 nLevel = 0; + for (sal_uInt16 nTP=0; nTP<nTokens; nTP++) { formula::FormulaToken* pTok = ppToken[nTP]; OpCode eOp = pTok->GetOpCode(); @@ -558,8 +558,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS else if ( eOp == ocClose && nLevel ) --nLevel; if ( nLevel == 0 && pTok->IsFunction() && - lcl_AddFunction( aAppOpt, sal::static_int_cast<USHORT>( eOp ) ) ) - bOptChanged = TRUE; + lcl_AddFunction( aAppOpt, sal::static_int_cast<sal_uInt16>( eOp ) ) ) + bOptChanged = sal_True; } if ( bOptChanged ) @@ -571,14 +571,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS ScFormulaCell aCell( pDoc, aPos, pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE ); delete pArr; - BOOL bAutoCalc = pDoc->GetAutoCalc(); + sal_Bool bAutoCalc = pDoc->GetAutoCalc(); SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); for ( ; i<nTabCount; i++) { if (rMark.GetTableSelect(i)) { aPos.SetTab( i ); - ULONG nIndex = (ULONG) ((SfxUInt32Item*) pDoc->GetAttr( + sal_uLong nIndex = (sal_uLong) ((SfxUInt32Item*) pDoc->GetAttr( nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue(); if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT || ( ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) && nError && rString.Equals( aFormula ) ) ) @@ -603,7 +603,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS pCell->GetCode()->DelRPN(); pCell->SetErrCode( nError ); if(pCell->GetCode()->IsHyperLink()) - pCell->GetCode()->SetHyperLink(FALSE); + pCell->GetCode()->SetHyperLink(sal_False); } pDoc->PutCell( aPos, pCell ); if ( !bAutoCalc ) @@ -622,21 +622,21 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS for (i=0; i<nTabCount; i++) if (rMark.GetTableSelect(i)) if (pDoc->SetString( nCol, nRow, i, rString )) - bNumFmtChanged = TRUE; + bNumFmtChanged = sal_True; } // row height must be changed if new text has a different script type for (i=0; i<nTabCount && !bEditDeleted; i++) if (rMark.GetTableSelect(i)) if ( pDoc->GetScriptType( nCol, nRow, i ) != nOldScript ) - bEditDeleted = TRUE; + bEditDeleted = sal_True; HideAllCursors(); if (bEditDeleted || pDoc->HasAttrib( nCol, nRow, nTab, nCol, nRow, nTab, HASATTR_NEEDHEIGHT )) AdjustRowHeight(nRow,nRow); - BOOL bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged); + sal_Bool bAutoFormat = TestFormatArea(nCol, nRow, nTab, bNumFmtChanged); if (bAutoFormat) DoAutoAttributes(nCol, nRow, nTab, bNumFmtChanged, bRecord); @@ -686,7 +686,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r { ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); if ( pDoc && pDocSh ) { @@ -697,7 +697,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r { ScAddress aPos( nCol, nRow, nTab ); ScBaseCell* pOldCell = pDoc->GetCell( aPos ); - BOOL bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT ) + sal_Bool bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT ) || pDoc->HasAttrib( nCol,nRow,nTab, nCol,nRow,nTab, HASATTR_NEEDHEIGHT ); @@ -728,13 +728,13 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r } void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData, - BOOL bRecord, BOOL bTestSimple ) + sal_Bool bRecord, sal_Bool bTestSimple ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); ScDocument* pDoc = pDocSh->GetDocument(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDocShellModificator aModificator( *pDocSh ); @@ -744,8 +744,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb // // Test auf Attribute // - BOOL bSimple = FALSE; - BOOL bCommon = FALSE; + sal_Bool bSimple = sal_False; + sal_Bool bCommon = sal_False; ScPatternAttr* pCellAttrs = NULL; EditTextObject* pNewData = NULL; String aString; @@ -765,9 +765,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb if ( !bSimple && aEngine.GetParagraphCount() == 1 ) { - String aParStr = aEngine.GetText( (USHORT) 0 ); + String aParStr = aEngine.GetText( (sal_uInt16) 0 ); if ( aParStr.GetChar(0) == '=' ) - bSimple = TRUE; + bSimple = sal_True; } if (bCommon) // Attribute fuer Tabelle @@ -915,7 +915,7 @@ void ScViewFunc::EnterMatrix( const String& rString ) ScRange aResult( nCol, nRow, nTab, sal::static_int_cast<SCCOL>(nCol+nSizeX-1), sal::static_int_cast<SCROW>(nRow+nSizeY-1), nTab ); - MarkRange( aResult, FALSE ); + MarkRange( aResult, sal_False ); } } @@ -923,7 +923,7 @@ void ScViewFunc::EnterMatrix( const String& rString ) if (pData->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = pData->GetDocShell(); - BOOL bSuccess = pDocSh->GetDocFunc().EnterMatrix( aRange, &rMark, NULL, rString, FALSE, FALSE, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT ); + sal_Bool bSuccess = pDocSh->GetDocFunc().EnterMatrix( aRange, &rMark, NULL, rString, sal_False, sal_False, EMPTY_STRING, formula::FormulaGrammar::GRAM_DEFAULT ); if (bSuccess) pDocSh->UpdateOle(GetViewData()); } @@ -931,9 +931,9 @@ void ScViewFunc::EnterMatrix( const String& rString ) ErrorMessage(STR_NOMULTISELECT); } -BYTE ScViewFunc::GetSelectionScriptType() +sal_uInt8 ScViewFunc::GetSelectionScriptType() { - BYTE nScript = 0; + sal_uInt8 nScript = 0; ScDocument* pDoc = GetViewData()->GetDocument(); const ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -947,9 +947,9 @@ BYTE ScViewFunc::GetSelectionScriptType() else { ScRangeList aRanges; - rMark.FillRangeListWithMarks( &aRanges, FALSE ); - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + rMark.FillRangeListWithMarks( &aRanges, sal_False ); + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); ScCellIterator aIter( pDoc, aRange ); @@ -1020,9 +1020,9 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter, rLineOuter = (const SvxBoxItem&) (pAttrs->GetItem( ATTR_BORDER )); rLineInner = (const SvxBoxInfoItem&)(pAttrs->GetItem( ATTR_BORDER_INNER )); - rLineInner.SetTable(FALSE); - rLineInner.SetDist(TRUE); - rLineInner.SetMinDist(FALSE); + rLineInner.SetTable(sal_False); + rLineInner.SetDist(sal_True); + rLineInner.SetMinDist(sal_False); } } @@ -1034,10 +1034,10 @@ void ScViewFunc::GetSelectionFrame( SvxBoxItem& rLineOuter, void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet, - BOOL bRecord ) + sal_Bool bRecord ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -1097,17 +1097,17 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, * */ - BOOL bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT) + sal_Bool bFrame = (pDialogSet->GetItemState( ATTR_BORDER ) != SFX_ITEM_DEFAULT) || (pDialogSet->GetItemState( ATTR_BORDER_INNER ) != SFX_ITEM_DEFAULT); if ( pNewOuter==pOldOuter && pNewInner==pOldInner ) - bFrame = FALSE; + bFrame = sal_False; // das sollte doch der Pool abfangen: ?!??!?? if ( bFrame && pNewOuter && pNewInner ) if ( *pNewOuter == *pOldOuter && *pNewInner == *pOldInner ) - bFrame = FALSE; + bFrame = sal_False; if ( pNewInner ) { @@ -1120,7 +1120,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, || pNewInner->IsValid(VALID_VERT) ); } else - bFrame = FALSE; + bFrame = sal_False; if (!bFrame) ApplySelectionPattern( aNewAttrs, bRecord ); // nur normale @@ -1129,8 +1129,8 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, // wenn neue Items Default-Items sind, so muessen die // alten Items geputtet werden: - BOOL bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() ); - BOOL bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() ); + sal_Bool bDefNewOuter = ( SFX_ITEMS_STATICDEFAULT == pNewOuter->GetKind() ); + sal_Bool bDefNewInner = ( SFX_ITEMS_STATICDEFAULT == pNewInner->GetKind() ); ApplyPatternLines( aNewAttrs, bDefNewOuter ? pOldOuter : pNewOuter, @@ -1150,7 +1150,7 @@ void ScViewFunc::ApplyAttributes( const SfxItemSet* pDialogSet, void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -1175,17 +1175,17 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem ) // Pattern und Rahmen void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter, - const SvxBoxInfoItem* pNewInner, BOOL bRecord ) + const SvxBoxInfoItem* pNewInner, sal_Bool bRecord ) { ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData aFuncMark( GetViewData()->GetMarkData() ); // local copy for UnmarkFiltered ScViewUtil::UnmarkFiltered( aFuncMark, pDoc ); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScRange aMarkRange; aFuncMark.MarkToSimple(); - BOOL bMulti = aFuncMark.IsMultiMarked(); + sal_Bool bMulti = aFuncMark.IsMultiMarked(); if (bMulti) aFuncMark.GetMultiMarkArea( aMarkRange ); else if (aFuncMark.IsMarked()) @@ -1227,7 +1227,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem pUndoDoc, bMulti, &rAttr, pNewOuter, pNewInner ) ); } - USHORT nExt = SC_PF_TESTMERGE; + sal_uInt16 nExt = SC_PF_TESTMERGE; pDocSh->UpdatePaintExt( nExt, aMarkRange ); // content before the change pDoc->ApplySelectionFrame( aFuncMark, pNewOuter, pNewInner ); @@ -1248,7 +1248,7 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem // nur Pattern void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, - BOOL bRecord, BOOL bCursorOnly ) + sal_Bool bRecord, sal_Bool bCursorOnly ) { ScViewData* pViewData = GetViewData(); ScDocShell* pDocSh = pViewData->GetDocShell(); @@ -1257,18 +1257,18 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ScViewUtil::UnmarkFiltered( aFuncMark, pDoc ); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; // State from old ItemSet doesn't matter for paint flags, as any change will be // from SFX_ITEM_SET in the new ItemSet (default is ignored in ApplyPattern). // New alignment is checked (check in PostPaint isn't enough) in case a right // alignment is changed to left. const SfxItemSet& rNewSet = rAttr.GetItemSet(); - BOOL bSetLines = rNewSet.GetItemState( ATTR_BORDER, TRUE ) == SFX_ITEM_SET || - rNewSet.GetItemState( ATTR_SHADOW, TRUE ) == SFX_ITEM_SET; - BOOL bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) == SFX_ITEM_SET; + sal_Bool bSetLines = rNewSet.GetItemState( ATTR_BORDER, sal_True ) == SFX_ITEM_SET || + rNewSet.GetItemState( ATTR_SHADOW, sal_True ) == SFX_ITEM_SET; + sal_Bool bSetAlign = rNewSet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) == SFX_ITEM_SET; - USHORT nExtFlags = 0; + sal_uInt16 nExtFlags = 0; if ( bSetLines ) nExtFlags |= SC_PF_LINES; if ( bSetAlign ) @@ -1276,9 +1276,9 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ScDocShellModificator aModificator( *pDocSh ); - BOOL bMulti = aFuncMark.IsMultiMarked(); + sal_Bool bMulti = aFuncMark.IsMultiMarked(); aFuncMark.MarkToMulti(); - BOOL bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1); + sal_Bool bOnlyTab = (!aFuncMark.IsMultiMarked() && !bCursorOnly && aFuncMark.GetSelectCount() > 1); if (bOnlyTab) { SCCOL nCol = pViewData->GetCurX(); @@ -1363,7 +1363,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, new ScUndoCursorAttr( pDocSh, nCol, nRow, nTab, pOldPat, pNewPat, &rAttr, - FALSE ) ); // FALSE = nicht automatisch + sal_False ) ); // sal_False = nicht automatisch } delete pOldPat; // wird im Undo kopiert (Pool) @@ -1381,10 +1381,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, sal_Int32 nCount = 0; const SfxItemPropertyMap* pMap = ScCellObj::GetCellPropertyMap(); PropertyEntryVector_t aPropVector = pMap->getPropertyEntries(); - for ( USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich ) + for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich ) { const SfxPoolItem* pItem = 0; - if ( rNewSet.GetItemState( nWhich, TRUE, &pItem ) == SFX_ITEM_SET && pItem ) + if ( rNewSet.GetItemState( nWhich, sal_True, &pItem ) == SFX_ITEM_SET && pItem ) { PropertyEntryVector_t::const_iterator aIt = aPropVector.begin(); while ( aIt != aPropVector.end()) @@ -1412,7 +1412,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet ) { // ItemSet from UI, may have different pool - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -1421,7 +1421,7 @@ void ScViewFunc::ApplyUserItemSet( const SfxItemSet& rItemSet ) ScPatternAttr aNewAttrs( GetViewData()->GetDocument()->GetPool() ); SfxItemSet& rNewSet = aNewAttrs.GetItemSet(); - rNewSet.Put( rItemSet, FALSE ); + rNewSet.Put( rItemSet, sal_False ); ApplySelectionPattern( aNewAttrs ); AdjustBlockHeight(); @@ -1447,10 +1447,10 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked() return pSheet; } -void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord ) +void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRecord ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -1467,7 +1467,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord ScViewUtil::UnmarkFiltered( aFuncMark, pDoc ); SCTAB nTabCount = pDoc->GetTableCount(); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDocShellModificator aModificator( *pDocSh ); @@ -1489,7 +1489,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pUndoDoc, &aFuncMark ); + pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pUndoDoc, &aFuncMark ); aFuncMark.MarkToMulti(); String aName = pStyleSheet->GetName(); @@ -1519,7 +1519,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, BOOL bRecord pUndoDoc->AddUndoTab( i, i ); ScRange aCopyRange( nCol, nRow, 0, nCol, nRow, nTabCount-1 ); - pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_False, pUndoDoc ); ScRange aMarkRange ( nCol, nRow, nTab ); ScMarkData aUndoMark = aFuncMark; @@ -1558,7 +1558,7 @@ void ScViewFunc::RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet ) VirtualDevice aVirtDev; aVirtDev.SetMapMode(MAP_PIXEL); - pDoc->StyleSheetChanged( pStyleSheet, TRUE, &aVirtDev, + pDoc->StyleSheetChanged( pStyleSheet, sal_True, &aVirtDev, pViewData->GetPPTX(), pViewData->GetPPTY(), pViewData->GetZoomX(), @@ -1585,7 +1585,7 @@ void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet ) VirtualDevice aVirtDev; aVirtDev.SetMapMode(MAP_PIXEL); - pDoc->StyleSheetChanged( pStyleSheet, FALSE, &aVirtDev, + pDoc->StyleSheetChanged( pStyleSheet, sal_False, &aVirtDev, pViewData->GetPPTX(), pViewData->GetPPTY(), pViewData->GetZoomX(), @@ -1601,14 +1601,14 @@ void ScViewFunc::UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet ) // Zellen einfuegen - Undo OK -BOOL ScViewFunc::InsertCells( InsCellCmd eCmd, BOOL bRecord, BOOL bPartOfPaste ) +sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bPartOfPaste ) { ScRange aRange; if (GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - BOOL bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, FALSE, bPartOfPaste ); + sal_Bool bSuccess = pDocSh->GetDocFunc().InsertCells( aRange, &rMark, eCmd, bRecord, sal_False, bPartOfPaste ); if (bSuccess) { pDocSh->UpdateOle(GetViewData()); @@ -1634,13 +1634,13 @@ BOOL ScViewFunc::InsertCells( InsCellCmd eCmd, BOOL bRecord, BOOL bPartOfPaste ) else { ErrorMessage(STR_NOMULTISELECT); - return FALSE; + return sal_False; } } // Zellen loeschen - Undo OK -void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord ) +void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) { ScRange aRange; if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE ) @@ -1663,13 +1663,13 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord ) } while ( nCount > 0 ) { - pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, bRecord, FALSE ); + pDocSh->GetDocFunc().DeleteCells( aDelRange, &rMark, eCmd, bRecord, sal_False ); --nCount; } } else { - pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, FALSE ); + pDocSh->GetDocFunc().DeleteCells( aRange, &rMark, eCmd, bRecord, sal_False ); } pDocSh->UpdateOle(GetViewData()); @@ -1702,9 +1702,9 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord ) else { if (eCmd == DEL_DELCOLS) - DeleteMulti( FALSE, bRecord ); + DeleteMulti( sal_False, bRecord ); else if (eCmd == DEL_DELROWS) - DeleteMulti( TRUE, bRecord ); + DeleteMulti( sal_True, bRecord ); else ErrorMessage(STR_NOMULTISELECT); } @@ -1712,7 +1712,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, BOOL bRecord ) Unmark(); } -void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) +void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) { ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocShellModificator aModificator( *pDocSh ); @@ -1722,7 +1722,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) ScViewUtil::UnmarkFiltered( aFuncMark, pDoc ); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; SCCOLROW* pRanges = new SCCOLROW[MAXCOLROWCOUNT]; SCCOLROW nRangeCnt = bRows ? aFuncMark.GetMarkRowRanges( pRanges ) : aFuncMark.GetMarkColumnRanges( pRanges ); @@ -1735,8 +1735,8 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) // Test ob erlaubt SCCOLROW* pOneRange = pRanges; - USHORT nErrorId = 0; - BOOL bNeedRefresh = FALSE; + sal_uInt16 nErrorId = 0; + sal_Bool bNeedRefresh = sal_False; SCCOLROW nRangeNo; for (nRangeNo=0; nRangeNo<nRangeCnt && !nErrorId; nRangeNo++) { @@ -1788,7 +1788,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) { // detect if the start of a merged cell is deleted, so the merge flags can be refreshed - bNeedRefresh = TRUE; + bNeedRefresh = sal_True; } } @@ -1816,17 +1816,17 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) SCCOLROW nStart = *(pOneRange++); SCCOLROW nEnd = *(pOneRange++); if (bRows) - pDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pUndoDoc ); + pDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,sal_False,pUndoDoc ); else pDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab, static_cast<SCCOL>(nEnd),MAXROW,nTab, - IDF_ALL,FALSE,pUndoDoc ); + IDF_ALL,sal_False,pUndoDoc ); } // alle Formeln wegen Referenzen SCTAB nTabCount = pDoc->GetTableCount(); - pUndoDoc->AddUndoTab( 0, nTabCount-1, FALSE, FALSE ); - pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,FALSE,pUndoDoc ); + pUndoDoc->AddUndoTab( 0, nTabCount-1, sal_False, sal_False ); + pDoc->CopyToDocument( 0,0,0, MAXCOL,MAXROW,MAXTAB, IDF_FORMULA,sal_False,pUndoDoc ); pUndoData = new ScRefUndoData( pDoc ); @@ -1854,7 +1854,7 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) SCROW nEndRow = MAXROW; pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER ); - pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE ); + pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True ); } if (bRecord) @@ -1892,11 +1892,11 @@ void ScViewFunc::DeleteMulti( BOOL bRows, BOOL bRecord ) // Inhalte loeschen -void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) +void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; - BOOL bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix ); + sal_Bool bOnlyNotBecauseOfMatrix; + sal_Bool bEditable = SelectionEditable( &bOnlyNotBecauseOfMatrix ); if ( !bEditable ) { if ( !(bOnlyNotBecauseOfMatrix && @@ -1908,7 +1908,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) } ScRange aMarkRange; - BOOL bSimple = FALSE; + sal_Bool bSimple = sal_False; ScDocument* pDoc = GetViewData()->GetDocument(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); @@ -1916,7 +1916,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) ScViewUtil::UnmarkFiltered( aFuncMark, pDoc ); if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDocShellModificator aModificator( *pDocSh ); @@ -1932,16 +1932,16 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) aFuncMark.SetMarkArea( aMarkRange ); } else - bSimple = TRUE; + bSimple = sal_True; } - aFuncMark.SetMarking(FALSE); // for MarkToMulti + aFuncMark.SetMarking(sal_False); // for MarkToMulti aFuncMark.MarkToSimple(); // before bMulti test below DBG_ASSERT( aFuncMark.IsMarked() || aFuncMark.IsMultiMarked() || bSimple, "delete what?" ); ScDocument* pUndoDoc = NULL; - BOOL bMulti = !bSimple && aFuncMark.IsMultiMarked(); + sal_Bool bMulti = !bSimple && aFuncMark.IsMultiMarked(); if (!bSimple) { aFuncMark.MarkToMulti(); @@ -1950,22 +1950,22 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) 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; nTab<nTabCount; nTab++) if (aFuncMark.GetTableSelect(nTab) && pDoc->IsTabProtected(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 ) pDocSh->UpdatePaintExt( nExtFlags, aMarkRange ); @@ -1976,7 +1976,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) // 4) Inhalte loeschen // 5) Undo-Aktion anlegen - BOOL bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes + sal_Bool bDrawUndo = bObjects || ( nFlags & IDF_NOTE ); // needed for shown notes if ( bDrawUndo && bRecord ) pDoc->BeginDrawUndo(); @@ -2005,7 +2005,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) // 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 @@ -2051,7 +2051,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) } else { - aFuncMark.FillRangeListWithMarks( &aChangeRanges, FALSE ); + aFuncMark.FillRangeListWithMarks( &aChangeRanges, sal_False ); } pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aChangeRanges ); } @@ -2071,9 +2071,9 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord ) // Spaltenbreiten/Zeilenhoehen (ueber Header) - Undo OK -void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, - ScSizeMode eMode, USHORT nSizeTwips, - BOOL bRecord, BOOL bPaint, ScMarkData* pMarkData ) +void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges, + ScSizeMode eMode, sal_uInt16 nSizeTwips, + sal_Bool bRecord, sal_Bool bPaint, ScMarkData* pMarkData ) { if (nRangeCnt == 0) return; @@ -2089,17 +2089,17 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR SCTAB nCurTab = GetViewData()->GetTabNo(); SCTAB nTab; if (bRecord && !pDoc->IsUndoEnabled()) - bRecord = FALSE; + bRecord = sal_False; ScDocShellModificator aModificator( *pDocSh ); - BOOL bAllowed = TRUE; + sal_Bool bAllowed = sal_True; for (nTab=0; nTab<nTabCount && bAllowed; nTab++) if (pMarkData->GetTableSelect(nTab)) { for ( SCCOLROW i=0; i<nRangeCnt && bAllowed; i++ ) { - BOOL bOnlyMatrix; + sal_Bool bOnlyMatrix; if (bWidth) bAllowed = pDoc->IsBlockEditable( nTab, static_cast<SCCOL>(pRanges[2*i]),0, @@ -2120,7 +2120,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR SCCOLROW nStart = pRanges[0]; SCCOLROW nEnd = pRanges[2*nRangeCnt-1]; - BOOL bFormula = FALSE; + sal_Bool bFormula = sal_False; if ( eMode == SC_SIZE_OPTIMAL ) { const ScViewOptions& rOpts = GetViewData()->GetOptions(); @@ -2142,20 +2142,20 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR if (bWidth) { if ( nTab == nFirstTab ) - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, FALSE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_False ); else - pUndoDoc->AddUndoTab( nTab, nTab, TRUE, FALSE ); + pUndoDoc->AddUndoTab( nTab, nTab, sal_True, sal_False ); pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, - FALSE, pUndoDoc ); + sal_False, pUndoDoc ); } else { if ( nTab == nFirstTab ) - pUndoDoc->InitUndo( pDoc, nTab, nTab, FALSE, TRUE ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_False, sal_True ); else - pUndoDoc->AddUndoTab( nTab, nTab, FALSE, TRUE ); - pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->AddUndoTab( nTab, nTab, sal_False, sal_True ); + pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, sal_False, pUndoDoc ); } } @@ -2171,8 +2171,8 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) pMarkData->MarkToMulti(); - 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; for (nTab=0; nTab<nTabCount; nTab++) if (pMarkData->GetTableSelect(nTab)) @@ -2190,7 +2190,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR { if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) { - BOOL bAll = ( eMode==SC_SIZE_OPTIMAL ); + sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL ); if (!bAll) { // fuer alle eingeblendeten CR_MANUALSIZE loeschen, @@ -2204,7 +2204,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR continue; } - BYTE nOld = pDoc->GetRowFlags(nRow, nTab); + sal_uInt8 nOld = pDoc->GetRowFlags(nRow, nTab); if (nOld & CR_MANUALSIZE) pDoc->SetRowFlags(nRow, nTab, nOld & ~CR_MANUALSIZE); } @@ -2226,9 +2226,9 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(), nPPTX, nPPTY, aZoomX, aZoomY, 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 ) @@ -2236,13 +2236,13 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR 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 } 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 @@ -2251,7 +2251,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR { if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) ) { - USHORT nThisSize = nSizeTwips; + sal_uInt16 nThisSize = nSizeTwips; if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) nThisSize = nSizeTwips + GetOptimalColWidth( nCol, nTab, bFormula ); @@ -2269,12 +2269,12 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR { if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo), static_cast<SCCOL>(nEndNo), nTab, bShow ) ) - bOutline = TRUE; + bOutline = sal_True; } else { if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) ) - bOutline = TRUE; + bOutline = sal_True; } } pDoc->DecSizeRecalcLevel( nTab ); // nicht fuer jede Spalte einzeln @@ -2363,8 +2363,8 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR // Spaltenbreiten/Zeilenhoehen (ueber Blockmarken) -void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips, - BOOL bRecord, BOOL bPaint ) +void ScViewFunc::SetMarkedWidthOrHeight( sal_Bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, + sal_Bool bRecord, sal_Bool bPaint ) { ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -2376,7 +2376,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT n SCTAB nTab = GetViewData()->GetTabNo(); DoneBlockMode(); InitOwnBlockMode(); - rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), TRUE ); + rMark.SetMultiMarkArea( ScRange( nCol,nRow,nTab ), sal_True ); MarkDataChanged(); } @@ -2394,22 +2394,22 @@ void ScViewFunc::SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT n rMark.MarkToSimple(); } -void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal ) +void ScViewFunc::ModifyCellSize( ScDirection eDir, sal_Bool bOptimal ) { //! Schrittweiten einstellbar // Schrittweite ist auch Minimum - USHORT nStepX = STD_COL_WIDTH / 5; - USHORT nStepY = ScGlobal::nStdRowHeight; + sal_uInt16 nStepX = STD_COL_WIDTH / 5; + sal_uInt16 nStepY = ScGlobal::nStdRowHeight; ScModule* pScMod = SC_MOD(); - BOOL bAnyEdit = pScMod->IsInputMode(); + sal_Bool bAnyEdit = pScMod->IsInputMode(); SCCOL nCol = GetViewData()->GetCurX(); SCROW nRow = GetViewData()->GetCurY(); SCTAB nTab = GetViewData()->GetTabNo(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bAllowed, bOnlyMatrix; + sal_Bool bAllowed, bOnlyMatrix; if ( eDir == DIR_LEFT || eDir == DIR_RIGHT ) bAllowed = pDoc->IsBlockEditable( nTab, nCol,0, nCol,MAXROW, &bOnlyMatrix ); else @@ -2422,8 +2422,8 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal ) HideAllCursors(); - USHORT nWidth = pDoc->GetColWidth( nCol, nTab ); - USHORT nHeight = pDoc->GetRowHeight( nRow, nTab ); + sal_uInt16 nWidth = pDoc->GetColWidth( nCol, nTab ); + sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTab ); SCCOLROW nRange[2]; if ( eDir == DIR_LEFT || eDir == DIR_RIGHT ) { @@ -2440,13 +2440,13 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal ) const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab ); const SvxMarginItem& rMItem = (const SvxMarginItem&)pPattern->GetItem(ATTR_MARGIN); - USHORT nMargin = rMItem.GetLeftMargin() + rMItem.GetRightMargin(); + sal_uInt16 nMargin = rMItem.GetLeftMargin() + rMItem.GetRightMargin(); if ( ((const SvxHorJustifyItem&) pPattern-> GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_LEFT ) - nMargin = sal::static_int_cast<USHORT>( + nMargin = sal::static_int_cast<sal_uInt16>( nMargin + ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue() ); - nWidth = (USHORT)(nEdit * pDocSh->GetOutputFactor() / HMM_PER_TWIPS) + nWidth = (sal_uInt16)(nEdit * pDocSh->GetOutputFactor() / HMM_PER_TWIPS) + nMargin + STD_EXTRA_WIDTH; } } @@ -2466,8 +2466,8 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal ) } long nPixel = pDoc->GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(), - nPPTX, nPPTY, aZoomX, aZoomY, TRUE ); - USHORT nTwips = (USHORT)( nPixel / nPPTX ); + nPPTX, nPPTY, aZoomX, aZoomY, sal_True ); + sal_uInt16 nTwips = (sal_uInt16)( nPixel / nPPTX ); if (nTwips != 0) nWidth = nTwips + STD_EXTRA_WIDTH; else @@ -2477,21 +2477,21 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal ) else // vergroessern / verkleinern { if ( eDir == DIR_RIGHT ) - nWidth = sal::static_int_cast<USHORT>( nWidth + nStepX ); + nWidth = sal::static_int_cast<sal_uInt16>( nWidth + nStepX ); else if ( nWidth > nStepX ) - nWidth = sal::static_int_cast<USHORT>( nWidth - nStepX ); + nWidth = sal::static_int_cast<sal_uInt16>( nWidth - nStepX ); if ( nWidth < nStepX ) nWidth = nStepX; if ( nWidth > MAX_COL_WIDTH ) nWidth = MAX_COL_WIDTH; } nRange[0] = nRange[1] = nCol; - SetWidthOrHeight( TRUE, 1, nRange, SC_SIZE_DIRECT, nWidth ); + SetWidthOrHeight( sal_True, 1, nRange, SC_SIZE_DIRECT, nWidth ); // hier bei Breite auch Hoehe anpassen (nur die eine Zeile) if (!bAnyEdit) { const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab ); - BOOL bNeedHeight = + sal_Bool bNeedHeight = ((const SfxBoolItem&)pPattern->GetItem( ATTR_LINEBREAK )).GetValue() || ((const SvxHorJustifyItem&)pPattern-> GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK; @@ -2511,15 +2511,15 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, BOOL bOptimal ) { eMode = SC_SIZE_DIRECT; if ( eDir == DIR_BOTTOM ) - nHeight = sal::static_int_cast<USHORT>( nHeight + nStepY ); + nHeight = sal::static_int_cast<sal_uInt16>( nHeight + nStepY ); else if ( nHeight > nStepY ) - nHeight = sal::static_int_cast<USHORT>( nHeight - nStepY ); + nHeight = sal::static_int_cast<sal_uInt16>( nHeight - nStepY ); if ( nHeight < nStepY ) nHeight = nStepY; if ( nHeight > MAX_COL_HEIGHT ) nHeight = MAX_COL_HEIGHT; //! MAX_COL_HEIGHT umbenennen in MAX_ROW_HEIGHT in global.hxx !!!!!! } nRange[0] = nRange[1] = nRow; - SetWidthOrHeight( FALSE, 1, nRange, eMode, nHeight ); + SetWidthOrHeight( sal_False, 1, nRange, eMode, nHeight ); } if ( bAnyEdit ) @@ -2572,10 +2572,10 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); ScDocFunc aFunc(*pDocSh); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 ) - aFunc.Protect( nTab, rPassword, FALSE ); + aFunc.Protect( nTab, rPassword, sal_False ); else { // modifying several tables is handled here @@ -2589,7 +2589,7 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword ) SCTAB nCount = pDocSh->GetDocument()->GetTableCount(); for ( SCTAB i=0; i<nCount; i++ ) if ( rMark.GetTableSelect(i) ) - aFunc.Protect( i, rPassword, FALSE ); + aFunc.Protect( i, rPassword, sal_False ); if (bUndo) pDocSh->GetUndoManager()->LeaveListAction(); @@ -2598,17 +2598,17 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword ) UpdateLayerLocks(); //! broadcast to all views } -BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword ) +sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword ) { ScMarkData& rMark = GetViewData()->GetMarkData(); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); ScDocFunc aFunc(*pDocSh); - BOOL bChanged = FALSE; - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bChanged = sal_False; + sal_Bool bUndo (pDoc->IsUndoEnabled()); if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 ) - bChanged = aFunc.Unprotect( nTab, rPassword, FALSE ); + bChanged = aFunc.Unprotect( nTab, rPassword, sal_False ); else { // modifying several tables is handled here @@ -2622,8 +2622,8 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword ) SCTAB nCount = pDocSh->GetDocument()->GetTableCount(); for ( SCTAB i=0; i<nCount; i++ ) if ( rMark.GetTableSelect(i) ) - if ( aFunc.Unprotect( i, rPassword, FALSE ) ) - bChanged = TRUE; + if ( aFunc.Unprotect( i, rPassword, sal_False ) ) + bChanged = sal_True; if (bUndo) pDocSh->GetUndoManager()->LeaveListAction(); @@ -2637,18 +2637,18 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword ) void ScViewFunc::SetNoteText( const ScAddress& rPos, const String& rNoteText ) { - GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, FALSE ); + GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, sal_False ); } void ScViewFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate ) { - GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, FALSE ); + GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, sal_False ); } -void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd ) +void ScViewFunc::SetNumberFormat( short nFormatType, sal_uLong nAdd ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -2678,13 +2678,13 @@ void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd ) SfxItemSet& rSet = aNewAttrs.GetItemSet(); rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) ); // ATTR_LANGUAGE_FORMAT nicht - ApplySelectionPattern( aNewAttrs, TRUE ); + ApplySelectionPattern( aNewAttrs, sal_True ); } void ScViewFunc::SetNumFmtByStr( const String& rCode ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -2705,7 +2705,7 @@ void ScViewFunc::SetNumFmtByStr( const String& rCode ) // Index fuer String bestimmen - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; sal_uInt32 nNumberFormat = pFormatter->GetEntryKey( rCode, eLanguage ); if ( nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) { @@ -2723,16 +2723,16 @@ void ScViewFunc::SetNumFmtByStr( const String& rCode ) SfxItemSet& rSet = aNewAttrs.GetItemSet(); rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumberFormat ) ); rSet.Put( SvxLanguageItem( eLanguage, ATTR_LANGUAGE_FORMAT ) ); - ApplySelectionPattern( aNewAttrs, TRUE ); + ApplySelectionPattern( aNewAttrs, sal_True ); } //! sonst Fehler zuerueckgeben / Meldung ausgeben ??? } -void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) +void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement ) { // nur wegen Matrix nicht editierbar? Attribute trotzdem ok - BOOL bOnlyNotBecauseOfMatrix; + sal_Bool bOnlyNotBecauseOfMatrix; if ( !SelectionEditable( &bOnlyNotBecauseOfMatrix ) && !bOnlyNotBecauseOfMatrix ) { ErrorMessage(STR_PROTECTIONERR); @@ -2758,11 +2758,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) // was haben wir denn da? sal_uInt32 nNewFormat = nOldFormat; - BOOL bError = FALSE; + sal_Bool bError = sal_False; LanguageType eLanguage = pOldEntry->GetLanguage(); - BOOL bThousand, bNegRed; - USHORT nPrecision, nLeading; + sal_Bool bThousand, bNegRed; + sal_uInt16 nPrecision, nLeading; pOldEntry->GetFormatSpecialInfo( bThousand, bNegRed, nPrecision, nLeading ); short nOldType = pOldEntry->GetType(); @@ -2771,11 +2771,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) { // Datum, Zeit, Bruch, logisch, Text kann nicht angepasst werden //! bei Wisssenschaftlich kann es der Numberformatter auch nicht - bError = TRUE; + bError = sal_True; } //! Das SvNumberformat hat einen Member bStandard, verraet ihn aber nicht - BOOL bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) ); + sal_Bool bWasStandard = ( nOldFormat == pFormatter->GetStandardIndex( eLanguage ) ); if (bWasStandard) { // bei "Standard" die Nachkommastellen abhaengig vom Zellinhalt @@ -2790,7 +2790,7 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) nPrecision = 0; // 'E' fuer Exponential ist fest im Numberformatter if ( aOut.Search('E') != STRING_NOTFOUND ) - bError = TRUE; // Exponential nicht veraendern + bError = sal_True; // Exponential nicht veraendern else { String aDecSep( pFormatter->GetFormatDecimalSep( nOldFormat ) ); @@ -2808,14 +2808,14 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) if (nPrecision<20) ++nPrecision; // erhoehen else - bError = TRUE; // 20 ist Maximum + bError = sal_True; // 20 ist Maximum } else { if (nPrecision) --nPrecision; // vermindern else - bError = TRUE; // weniger als 0 geht nicht + bError = sal_True; // weniger als 0 geht nicht } } @@ -2830,11 +2830,11 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) { xub_StrLen nErrPos = 0; short nNewType = 0; - BOOL bOk = pFormatter->PutEntry( aNewPicture, nErrPos, + sal_Bool bOk = pFormatter->PutEntry( aNewPicture, nErrPos, nNewType, nNewFormat, eLanguage ); DBG_ASSERT( bOk, "falsches Zahlformat generiert" ); if (!bOk) - bError = TRUE; + bError = sal_True; } } @@ -2844,13 +2844,13 @@ void ScViewFunc::ChangeNumFmtDecimals( BOOL bIncrement ) SfxItemSet& rSet = aNewAttrs.GetItemSet(); rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); // ATTR_LANGUAGE_FORMAT nicht - ApplySelectionPattern( aNewAttrs, TRUE ); + ApplySelectionPattern( aNewAttrs, sal_True ); } else Sound::Beep(); // war nix } -void ScViewFunc::ChangeIndent( BOOL bIncrement ) +void ScViewFunc::ChangeIndent( sal_Bool bIncrement ) { ScViewData* pViewData = GetViewData(); ScDocShell* pDocSh = pViewData->GetDocShell(); @@ -2867,7 +2867,7 @@ void ScViewFunc::ChangeIndent( BOOL bIncrement ) aWorkMark.SetMultiMarkArea( ScRange(nCol,nRow,nTab) ); } - BOOL bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, FALSE ); + sal_Bool bSuccess = pDocSh->GetDocFunc().ChangeIndent( aWorkMark, bIncrement, sal_False ); if (bSuccess) { pDocSh->UpdateOle(pViewData); @@ -2875,13 +2875,13 @@ void ScViewFunc::ChangeIndent( BOOL bIncrement ) } } -BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol, +sal_Bool ScViewFunc::InsertName( const String& rName, const String& rSymbol, const String& rType ) { // Type = P,R,C,F (und Kombinationen) //! Undo... - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); @@ -2907,10 +2907,10 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol, { ScDocShellModificator aModificator( *pDocSh ); - pDoc->CompileNameFormula( TRUE ); // CreateFormulaString + pDoc->CompileNameFormula( sal_True ); // CreateFormulaString // Eintrag bereits vorhanden? Dann vorher entfernen (=Aendern) - USHORT nFoundAt; + sal_uInt16 nFoundAt; if ( pList->SearchName( rName, nFoundAt ) ) { // alten Index uebernehmen pNewEntry->SetIndex( ((ScRangeData*)pList->At(nFoundAt))->GetIndex() ); @@ -2920,10 +2920,10 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol, if ( pList->Insert( pNewEntry ) ) { pNewEntry = NULL; // nicht loeschen - bOk = TRUE; + bOk = sal_True; } - pDoc->CompileNameFormula( FALSE ); // CompileFormulaString + pDoc->CompileNameFormula( sal_False ); // CompileFormulaString aModificator.SetDocumentModified(); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); } @@ -2932,20 +2932,20 @@ BOOL ScViewFunc::InsertName( const String& rName, const String& rSymbol, return bOk; } -void ScViewFunc::CreateNames( USHORT nFlags ) +void ScViewFunc::CreateNames( sal_uInt16 nFlags ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScRange aRange; if ( GetViewData()->GetSimpleArea(aRange) == SC_MARK_SIMPLE ) - bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, FALSE ); + bDone = GetViewData()->GetDocShell()->GetDocFunc().CreateNames( aRange, nFlags, sal_False ); if (!bDone) ErrorMessage(STR_CREATENAME_MARKERR); } -USHORT ScViewFunc::GetCreateNameFlags() +sal_uInt16 ScViewFunc::GetCreateNameFlags() { - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; @@ -2954,44 +2954,44 @@ USHORT ScViewFunc::GetCreateNameFlags() { ScDocument* pDoc = GetViewData()->GetDocument(); SCTAB nTab = GetViewData()->GetTabNo(); - BOOL bOk; + sal_Bool bOk; SCCOL i; SCROW j; - bOk = TRUE; + bOk = sal_True; SCCOL nFirstCol = nStartCol; SCCOL nLastCol = nEndCol; if (nStartCol+1 < nEndCol) { ++nFirstCol; --nLastCol; } for (i=nFirstCol; i<=nLastCol && bOk; i++) if (!pDoc->HasStringData( i,nStartRow,nTab )) - bOk = FALSE; + bOk = sal_False; if (bOk) nFlags |= NAME_TOP; else // Bottom nur wenn nicht Top { - bOk = TRUE; + bOk = sal_True; for (i=nFirstCol; i<=nLastCol && bOk; i++) if (!pDoc->HasStringData( i,nEndRow,nTab )) - bOk = FALSE; + bOk = sal_False; if (bOk) nFlags |= NAME_BOTTOM; } - bOk = TRUE; + bOk = sal_True; SCROW nFirstRow = nStartRow; SCROW nLastRow = nEndRow; if (nStartRow+1 < nEndRow) { ++nFirstRow; --nLastRow; } for (j=nFirstRow; j<=nLastRow && bOk; j++) if (!pDoc->HasStringData( nStartCol,j,nTab )) - bOk = FALSE; + bOk = sal_False; if (bOk) nFlags |= NAME_LEFT; else // Right nur wenn nicht Left { - bOk = TRUE; + bOk = sal_True; for (j=nFirstRow; j<=nLastRow && bOk; j++) if (!pDoc->HasStringData( nEndCol,j,nTab )) - bOk = FALSE; + bOk = sal_False; if (bOk) nFlags |= NAME_RIGHT; } @@ -3009,7 +3009,7 @@ void ScViewFunc::InsertNameList() { ScAddress aPos( GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ); ScDocShell* pDocSh = GetViewData()->GetDocShell(); - if ( pDocSh->GetDocFunc().InsertNameList( aPos, FALSE ) ) + if ( pDocSh->GetDocFunc().InsertNameList( aPos, sal_False ) ) pDocSh->UpdateOle(GetViewData()); } diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 45af1cce4..f1d5050cc 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -69,7 +69,7 @@ // static void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet, - USHORT nWhichId, USHORT nScript ) + sal_uInt16 nWhichId, sal_uInt16 nScript ) { // take the effective item from rCoreSet according to nScript // and put in rShellSet under the (base) nWhichId @@ -87,12 +87,12 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe } // static -USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) +sal_uInt16 ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) { // used for thesaurus - BYTE nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() ); - USHORT nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE : + sal_uInt8 nScript = pDoc->GetScriptType( rPos.Col(), rPos.Row(), rPos.Tab() ); + sal_uInt16 nWhich = ( nScript == SCRIPTTYPE_ASIAN ) ? ATTR_CJK_FONT_LANGUAGE : ( ( nScript == SCRIPTTYPE_COMPLEX ) ? ATTR_CTL_FONT_LANGUAGE : ATTR_FONT_LANGUAGE ); const SfxPoolItem* pItem = pDoc->GetAttr( rPos.Col(), rPos.Row(), rPos.Tab(), nWhich); SvxLanguageItem* pLangIt = PTR_CAST( SvxLanguageItem, pItem ); @@ -117,7 +117,7 @@ USHORT ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) } // static -sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID ) +sal_Int32 ScViewUtil::GetTransliterationType( sal_uInt16 nSlotID ) { sal_Int32 nType = 0; switch ( nSlotID ) @@ -154,7 +154,7 @@ sal_Int32 ScViewUtil::GetTransliterationType( USHORT nSlotID ) } // static -BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, +sal_Bool ScViewUtil::IsActionShown( const ScChangeAction& rAction, const ScChangeViewSettings& rSettings, ScDocument& rDocument ) { @@ -162,10 +162,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, // die Reihenfolge von ShowRejected/ShowAccepted ist deswegen wichtig if ( !rSettings.IsShowRejected() && rAction.IsRejecting() ) - return FALSE; + return sal_False; if ( !rSettings.IsShowAccepted() && rAction.IsAccepted() && !rAction.IsRejecting() ) - return FALSE; + return sal_False; if ( rSettings.HasAuthor() ) { @@ -174,10 +174,10 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, // GetUser() am ChangeTrack ist der aktuelle Benutzer ScChangeTrack* pTrack = rDocument.GetChangeTrack(); if ( !pTrack || rAction.GetUser() == pTrack->GetUser() ) - return FALSE; + return sal_False; } else if ( rAction.GetUser() != rSettings.GetTheAuthorToShow() ) - return FALSE; + return sal_False; } if ( rSettings.HasComment() ) @@ -188,12 +188,12 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, aComStr+=')'; if(!rSettings.IsValidComment(&aComStr)) - return FALSE; + return sal_False; } if ( rSettings.HasRange() ) if ( !rSettings.GetTheRangeList().Intersects( rAction.GetBigRange().MakeRange() ) ) - return FALSE; + return sal_False; if ( rSettings.HasDate() && rSettings.GetTheDateMode() != SCDM_NO_DATEMODE ) { @@ -204,23 +204,23 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, { // korrespondiert mit ScHighlightChgDlg::OKBtnHdl case SCDM_DATE_BEFORE: if ( aDateTime > rFirst ) - return FALSE; + return sal_False; break; case SCDM_DATE_SINCE: if ( aDateTime < rFirst ) - return FALSE; + return sal_False; break; case SCDM_DATE_EQUAL: case SCDM_DATE_BETWEEN: if ( aDateTime < rFirst || aDateTime > rLast ) - return FALSE; + return sal_False; break; case SCDM_DATE_NOTEQUAL: if ( aDateTime >= rFirst && aDateTime <= rLast ) - return FALSE; + return sal_False; break; case SCDM_DATE_SAVE: @@ -228,7 +228,7 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, ScChangeTrack* pTrack = rDocument.GetChangeTrack(); if ( !pTrack || pTrack->GetLastSavedActionNumber() >= rAction.GetActionNumber() ) - return FALSE; + return sal_False; } break; @@ -241,17 +241,17 @@ BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, if ( rSettings.HasActionRange() ) { - ULONG nAction = rAction.GetActionNumber(); - ULONG nFirstAction; - ULONG nLastAction; + sal_uLong nAction = rAction.GetActionNumber(); + sal_uLong nFirstAction; + sal_uLong nLastAction; rSettings.GetTheActionRange( nFirstAction, nLastAction ); if ( nAction < nFirstAction || nAction > nLastAction ) { - return FALSE; + return sal_False; } } - return TRUE; + return sal_True; } // static @@ -324,7 +324,7 @@ bool ScViewUtil::HasFiltered( const ScRange& rRange, ScDocument* pDoc ) } // static -void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId ) +void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId ) { SvtCJKOptions aCJKOptions; SvtCTLOptions aCTLOptions; @@ -363,28 +363,28 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USH //================================================================== -BOOL ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, +sal_Bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, SfxViewFrame& rFrame, SvxFontItem& rNewFont, String& rString ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() ); - aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) ); + aSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) ); aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) ); SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( &rFrame.GetWindow(), aSet, rFrame.GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); if ( pDlg->Execute() == RET_OK ) { - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE ); - SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False ); + SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pItem ) rString = pItem->GetValue(); if ( pFontItem ) rNewFont = SvxFontItem( pFontItem->GetFamily(), pFontItem->GetFamilyName(), pFontItem->GetStyleName(), pFontItem->GetPitch(), pFontItem->GetCharSet(), rNewFont.Which() ); - bRet = TRUE; + bRet = sal_True; } delete pDlg; } @@ -435,7 +435,7 @@ void ScUpdateRect::SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 ) nNewEndY = nY2; } -BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) +sal_Bool ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) { if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX && nNewStartY == nOldStartY && nNewEndY == nOldEndY ) @@ -444,7 +444,7 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) rY1 = nNewStartY; rX2 = nNewStartX; rY2 = nNewStartY; - return FALSE; + return sal_False; } rX1 = Min(nNewStartX,nOldStartX); @@ -479,13 +479,13 @@ BOOL ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) } } - return TRUE; + return sal_True; } #ifdef OLD_SELECTION_PAINT -BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont ) +sal_Bool ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, sal_Bool& rCont ) { - rCont = FALSE; + rCont = sal_False; if (nNewStartX == nOldStartX && nNewEndX == nOldEndX && nNewStartY == nOldStartY && nNewEndY == nOldEndY) @@ -494,7 +494,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B rY1 = nNewStartY; rX2 = nNewStartX; rY2 = nNewStartY; - return FALSE; + return sal_False; } rX1 = Min(nNewStartX,nOldStartX); @@ -518,7 +518,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B { rY1 = Min( nNewStartY, nOldStartY ); rY2 = Max( nNewStartY, nOldStartY ) - 1; - rCont = TRUE; + rCont = sal_True; nContY1 = Min( nNewEndY, nOldEndY ) + 1; nContY2 = Max( nNewEndY, nOldEndY ); nContX1 = rX1; @@ -541,7 +541,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B { rX1 = Min( nNewStartX, nOldStartX ); rX2 = Max( nNewStartX, nOldStartX ) - 1; - rCont = TRUE; + rCont = sal_True; nContX1 = Min( nNewEndX, nOldEndX ) + 1; nContX2 = Max( nNewEndX, nOldEndX ); nContY1 = rY1; @@ -557,7 +557,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B rX2 = nOldEndX; rY1 = Min( nNewStartY, nOldStartY ); // oben rY2 = Max( nNewStartY, nOldStartY ) - 1; - rCont = TRUE; + rCont = sal_True; nContY1 = rY2+1; nContY2 = nOldEndY; nContX1 = Min( nNewStartX, nOldStartX ); // links @@ -572,7 +572,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B rX1 = nOldStartX; rY1 = Min( nNewStartY, nOldStartY ); // oben rY2 = Max( nNewStartY, nOldStartY ) - 1; - rCont = TRUE; + rCont = sal_True; nContY1 = rY2+1; nContY2 = nOldEndY; nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts @@ -587,7 +587,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B rX2 = nOldEndX; rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten rY2 = Max( nNewEndY, nOldEndY ); - rCont = TRUE; + rCont = sal_True; nContY1 = nOldStartY; nContY2 = rY1-1; nContX1 = Min( nNewStartX, nOldStartX ); // links @@ -602,7 +602,7 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B rX1 = nOldStartX; rY1 = Min( nNewEndY, nOldEndY ) + 1; // unten rY2 = Max( nNewEndY, nOldEndY ); - rCont = TRUE; + rCont = sal_True; nContY1 = nOldStartY; nContY2 = rY1-1; nContX1 = Min( nNewEndX, nOldEndX ) + 1; // rechts @@ -614,14 +614,14 @@ BOOL ScUpdateRect::GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, B rY1 = nOldStartY; rX2 = nOldEndX; rY2 = nOldEndY; - rCont = TRUE; + rCont = sal_True; nContX1 = nNewStartX; nContY1 = nNewStartY; nContX2 = nNewEndX; nContY2 = nNewEndY; } - return TRUE; + return sal_True; } void ScUpdateRect::GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 ) |