diff options
author | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
---|---|---|
committer | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
commit | 4ae1df265823cbdc93dddc010fcb93aef729642e (patch) | |
tree | d1773d10eee319a586765756100186879a3da175 /sc/source/ui/app | |
parent | c9fa5def7645d8dbea676bc88c086e0b493337e5 (diff) | |
parent | d0ce561b856d43b13d5884b5aa5106f7889ea929 (diff) |
accfixes: merged to m100
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/client.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 58 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 730 | ||||
-rwxr-xr-x | sc/source/ui/app/inputwin.cxx | 186 | ||||
-rw-r--r-- | sc/source/ui/app/msgpool.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/app/rfindlst.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 66 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 251 | ||||
-rw-r--r-- | sc/source/ui/app/scmod2.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/app/seltrans.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/app/template.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 74 | ||||
-rw-r--r-- | sc/source/ui/app/uiitems.cxx | 50 |
13 files changed, 742 insertions, 739 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index b1cb325ceb69..9dac737372ae 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -73,8 +73,8 @@ SdrOle2Obj* ScClient::GetDrawObj() SdrOle2Obj* pOle2Obj = NULL; String aName = GetViewShell()->GetObjectShell()->GetEmbeddedObjectContainer().GetEmbeddedObjectName( xObj ); - USHORT nPages = pModel->GetPageCount(); - for (USHORT nPNr=0; 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 b256233d7394..eb7e2a0fbf83 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -68,6 +68,9 @@ #include "drawview.hxx" #include "viewdata.hxx" #include "scmod.hxx" +#include "chartlis.hxx" +#include "rangeutl.hxx" +#include "formula/grammar.hxx" // #108584# #include "scitems.hxx" @@ -79,6 +82,7 @@ #include <editeng/fhgtitem.hxx> #include <vcl/svapp.hxx> + using namespace com::sun::star; // ----------------------------------------------------------------------- @@ -96,12 +100,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 +123,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 +131,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 +144,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; } // @@ -235,9 +239,15 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain // if ( pContainerShell ) { - const ScDocument* pDoc = pContainerShell->GetDocument(); + ScDocument* pDoc = pContainerShell->GetDocument(); if ( pDoc ) + { nSourceDocID = pDoc->GetDocumentID(); + if ( pPage ) + { + ScChartHelper::FillProtectedChartRangesVector( m_aProtectedChartRangesVector, pDoc, pPage ); + } + } } } @@ -276,9 +286,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 +299,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 +403,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 +439,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 +596,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 +611,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 +670,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 +700,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 +773,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 +781,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 520171954138..9e0703b8d0cd 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 // 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 ) @@ -3460,19 +3460,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) { @@ -3512,7 +3512,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState, HideTip(); HideTipBelow(); - bInOwnChange = FALSE; + bInOwnChange = sal_False; } void ScInputHandler::UpdateCellAdjust( SvxCellHorJustify eJust ) @@ -3549,13 +3549,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 ); @@ -3566,7 +3566,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer ) pInputWin->Disable(); } - bInOwnChange = FALSE; + bInOwnChange = sal_False; } } } @@ -3583,20 +3583,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 ) { @@ -3616,7 +3616,7 @@ const String& ScInputHandler::GetEditString() if (pEngine) { aCurrentText = pEngine->GetText(); // immer neu aus Engine - bTextValid = TRUE; + bTextValid = sal_True; } return aCurrentText; @@ -3631,16 +3631,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 @@ -3651,20 +3651,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; @@ -3698,9 +3698,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 ); } @@ -3729,7 +3729,7 @@ void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd ) if (pView) pView->SetSelection( ESelection(0,nStart, 0,nEnd) ); - bModified = TRUE; + bModified = sal_True; } //------------------------------------------------------------------------ @@ -3752,13 +3752,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 cfd00a3ef098..2da1ed83bf08 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,7 +220,7 @@ 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 ); SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA)); @@ -228,7 +228,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : __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#) @@ -244,7 +244,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 ); } @@ -372,13 +372,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(), @@ -393,7 +393,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 ) ); @@ -403,14 +403,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 ); @@ -423,7 +423,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 ); @@ -473,7 +473,7 @@ void __EXPORT ScInputWindow::Select() pView->SetSelection( ESelection(0,1, 0,1) ); pScMod->InputChanged(pView); SetOkCancelMode(); - pView->SetEditEngineUpdateMode(TRUE); + pView->SetEditEngineUpdateMode(sal_True); } } break; @@ -494,7 +494,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(); @@ -522,7 +522,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); } } } @@ -554,7 +554,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 ); @@ -564,7 +564,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; } } @@ -578,7 +578,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 ); @@ -589,13 +589,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); @@ -626,7 +626,7 @@ String __EXPORT ScInputWindow::GetText() const //UNUSED2008-05 return aTextWindow.GetEditView(); //UNUSED2008-05 } -BOOL ScInputWindow::IsInputActive() +sal_Bool ScInputWindow::IsInputActive() { return aTextWindow.IsInputActive(); } @@ -641,7 +641,7 @@ void ScInputWindow::MakeDialogEditView() aTextWindow.MakeDialogEditView(); } -void ScInputWindow::StopEditEngine( BOOL bAll ) +void ScInputWindow::StopEditEngine( sal_Bool bAll ) { aTextWindow.StopEditEngine( bAll ); } @@ -679,7 +679,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() ) @@ -706,7 +706,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 ) ); @@ -734,11 +734,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(); @@ -752,7 +752,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); @@ -771,11 +771,11 @@ ScTextWnd::ScTextWnd( Window* pParent ) __EXPORT ScTextWnd::~ScTextWnd() { - delete pEditView; - delete pEditEngine; while (!maAccTextDatas.empty()) { maAccTextDatas.back()->Dispose(); } + delete pEditView; + delete pEditEngine; } void __EXPORT ScTextWnd::Paint( const Rectangle& rRec ) @@ -842,7 +842,7 @@ void __EXPORT ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) if (pEditView) { - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pEditView->MouseButtonDown( rMEvt ); } } @@ -865,8 +865,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(); @@ -876,9 +876,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 @@ -922,14 +922,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, @@ -939,24 +939,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() @@ -973,7 +973,7 @@ String __EXPORT ScTextWnd::GetText() const return GetTextString(); } -void ScTextWnd::SetFormulaMode( BOOL bSet ) +void ScTextWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -986,8 +986,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 @@ -1024,7 +1024,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 ); @@ -1058,11 +1058,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() ) ); @@ -1074,7 +1074,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 ); @@ -1083,12 +1083,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 ) @@ -1100,7 +1100,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 ); @@ -1121,7 +1121,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(); } @@ -1144,13 +1144,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) { @@ -1163,7 +1163,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); @@ -1184,7 +1184,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) { if ( rNewString != aString ) { - bInputMode = TRUE; + bInputMode = sal_True; // Position der Aenderung suchen, nur Rest painten @@ -1194,14 +1194,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) ) { @@ -1243,7 +1243,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 @@ -1262,7 +1262,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (!maAccTextDatas.empty()) maAccTextDatas.back()->TextChanged(); - bInputMode = FALSE; + bInputMode = sal_False; } } @@ -1271,7 +1271,7 @@ const String& ScTextWnd::GetTextString() const return aString; } -BOOL ScTextWnd::IsInputActive() +sal_Bool ScTextWnd::IsInputActive() { return HasFocus(); } @@ -1293,11 +1293,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 ) ); @@ -1307,7 +1307,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 ); @@ -1382,7 +1382,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() ); @@ -1404,7 +1404,7 @@ __EXPORT ScPosWnd::~ScPosWnd() delete pAccel; } -void ScPosWnd::SetFormulaMode( BOOL bSet ) +void ScPosWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -1440,12 +1440,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]; @@ -1455,7 +1455,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]; @@ -1484,16 +1484,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 ) @@ -1523,13 +1523,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(); } @@ -1603,7 +1603,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: @@ -1645,7 +1645,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); } } @@ -1698,7 +1698,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 ) @@ -1708,7 +1708,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) ) { @@ -1720,8 +1720,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 @@ -1732,7 +1732,7 @@ void ScPosWnd::DoEnter() // for all selection types, excecute the SID_CURRENTCELL slot SfxStringItem aPosItem( SID_CURRENTCELL, aText ); - SfxBoolItem aUnmarkItem( FN_PARAM_1, TRUE ); // remove existing selection + SfxBoolItem aUnmarkItem( FN_PARAM_1, sal_True ); // remove existing selection pViewSh->GetViewData()->GetDispatcher().Execute( SID_CURRENTCELL, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx index 78cb70fa64f0..6f471ebaa91b 100644 --- a/sc/source/ui/app/msgpool.cxx +++ b/sc/source/ui/app/msgpool.cxx @@ -66,11 +66,11 @@ ScMessagePool::ScMessagePool() aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ), aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ), aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ), - aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, FALSE ) ), + aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, sal_False ) ), aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ), aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ), // - aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) ) + aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, sal_False ) ) { ppPoolDefaults = new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1]; @@ -98,7 +98,7 @@ __EXPORT ScMessagePool::~ScMessagePool() Delete(); SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults) - for ( USHORT i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ ) + for ( sal_uInt16 i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ ) SetRefCount( *ppPoolDefaults[i], 0 ); delete[] ppPoolDefaults; @@ -107,7 +107,7 @@ __EXPORT ScMessagePool::~ScMessagePool() } -SfxMapUnit __EXPORT ScMessagePool::GetMetric( USHORT nWhich ) const +SfxMapUnit __EXPORT ScMessagePool::GetMetric( sal_uInt16 nWhich ) const { // eigene Attribute: Twips, alles andere 1/100 mm diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx index 3d62c0396b51..4f61fdb23263 100644 --- a/sc/source/ui/app/rfindlst.cxx +++ b/sc/source/ui/app/rfindlst.cxx @@ -44,7 +44,7 @@ static ColorData aColNames[SC_RANGECOLORS] = ScRangeFindList::ScRangeFindList(const String& rName) : aDocName( rName ), - bHidden( FALSE ) + bHidden( sal_False ) { } @@ -58,7 +58,7 @@ ScRangeFindList::~ScRangeFindList() } } -ColorData ScRangeFindList::GetColorName( USHORT nIndex ) // static +ColorData ScRangeFindList::GetColorName( sal_uInt16 nIndex ) // static { return aColNames[nIndex % SC_RANGECOLORS]; } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 8051399d06fa..9a1858fe5170 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -135,11 +135,11 @@ //UNUSED2008-05 //UNUSED2008-05 class ScLibOptions : public utl::ConfigItem //UNUSED2008-05 { -//UNUSED2008-05 BOOL bWK3Flag; +//UNUSED2008-05 sal_Bool bWK3Flag; //UNUSED2008-05 //UNUSED2008-05 public: //UNUSED2008-05 ScLibOptions(); -//UNUSED2008-05 BOOL GetWK3Flag() const { return bWK3Flag; } +//UNUSED2008-05 sal_Bool GetWK3Flag() const { return bWK3Flag; } //UNUSED2008-05 }; //UNUSED2008-05 //UNUSED2008-05 #define CFGPATH_LIBFILTER "Office.Calc/Filter/Import/Lotus123" @@ -147,7 +147,7 @@ //UNUSED2008-05 //UNUSED2008-05 ScLibOptions::ScLibOptions() : //UNUSED2008-05 ConfigItem( rtl::OUString::createFromAscii( CFGPATH_LIBFILTER ) ), -//UNUSED2008-05 bWK3Flag( FALSE ) +//UNUSED2008-05 bWK3Flag( sal_False ) //UNUSED2008-05 { //UNUSED2008-05 com::sun::star::uno::Sequence<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 f7a02e1577f7..2223a80e1763 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -58,7 +58,6 @@ #include <vcl/status.hxx> #include <sfx2/bindings.hxx> #include <sfx2/request.hxx> -#include <sfx2/macrconf.hxx> #include <sfx2/printer.hxx> #include <editeng/langitem.hxx> #include <svtools/colorcfg.hxx> @@ -122,7 +121,7 @@ #define SC_IDLE_STEP 75 #define SC_IDLE_COUNT 50 -static USHORT nIdleCount = 0; +static sal_uInt16 nIdleCount = 0; //------------------------------------------------------------------ @@ -137,7 +136,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 +155,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 +220,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 +328,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 +382,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 ) { @@ -391,27 +390,21 @@ void ScModule::Execute( SfxRequest& rReq ) { String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles")); - SfxApplication* pApp = SFX_APP(); - pApp->EnterBasicCall(); - pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() ); - pApp->LeaveBasicCall(); + SfxApplication::CallAppBasic( aMacroName ); } break; case SID_EURO_CONVERTER: { String aMacroName = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main")); - SfxApplication* pApp = SFX_APP(); - pApp->EnterBasicCall(); - pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() ); - pApp->LeaveBasicCall(); + SfxApplication::CallAppBasic( aMacroName ); } 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 +425,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 +455,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 +468,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 +509,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 +583,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 +598,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 +643,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 +771,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 +808,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 +933,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 +952,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 +977,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 +995,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 +1023,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 +1031,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 +1062,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 +1110,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 +1130,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 +1151,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 +1159,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 +1180,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 +1263,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 +1323,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 +1343,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 +1382,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 +1481,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 +1492,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 +1507,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 +1521,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 +1547,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 +1559,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 +1585,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 +1606,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 +1622,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 +1637,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 +1656,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 +1686,7 @@ BOOL ScModule::IsFormulaMode() } if (bIsInEditCommand) - bIsFormula = TRUE; + bIsFormula = sal_True; return bIsFormula; } @@ -1702,14 +1695,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 +1737,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 +1806,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 +1834,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 +1854,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 +1900,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 +1944,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 +1993,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 +2001,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 +2121,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 +2196,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 c92f0bf5d206..9ac668b9d4a3 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -50,8 +50,8 @@ using namespace com::sun::star; //------------------------------------------------------------------ // static -void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang, - BOOL& rAutoSpell ) +void ScModule::GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang, + sal_Bool& rAutoSpell ) { // use SvtLinguConfig instead of service LinguProperties to avoid // loading the linguistic component @@ -67,7 +67,7 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt } // static -void ScModule::SetAutoSpellProperty( BOOL bSet ) +void ScModule::SetAutoSpellProperty( sal_Bool bSet ) { // use SvtLinguConfig instead of service LinguProperties to avoid // loading the linguistic component @@ -81,15 +81,15 @@ void ScModule::SetAutoSpellProperty( BOOL bSet ) // static -BOOL ScModule::HasThesaurusLanguage( USHORT nLang ) +sal_Bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang ) { if ( nLang == LANGUAGE_NONE ) - return FALSE; + return sal_False; lang::Locale aLocale; SvxLanguageToLocale( aLocale, nLang ); - BOOL bHasLang = FALSE; + sal_Bool bHasLang = sal_False; try { uno::Reference< linguistic2::XThesaurus > xThes(LinguMgr::GetThesaurus()); diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 0b213709863d..f6872ef38f09 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -55,9 +55,9 @@ using namespace com::sun::star; // ----------------------------------------------------------------------- -BOOL lcl_IsURLButton( SdrObject* pObject ) +sal_Bool lcl_IsURLButton( SdrObject* pObject ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; SdrUnoObj* pUnoCtrl = PTR_CAST(SdrUnoObj, pObject); if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) @@ -75,7 +75,7 @@ BOOL lcl_IsURLButton( SdrObject* pObject ) uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType ); form::FormButtonType eTmp; if ( (aAny >>= eTmp) && eTmp == form::FormButtonType_URL ) - bRet = TRUE; + bRet = sal_True; } } } @@ -98,13 +98,13 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView { // handle selection on drawing layer const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if ( nMarkCount ) { if ( nMarkCount == 1 ) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - UINT16 nSdrObjKind = pObj->GetObjIdentifier(); + sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); if ( nSdrObjKind == OBJ_GRAF ) { @@ -176,11 +176,11 @@ ScSelectionTransferObj::~ScSelectionTransferObj() DBG_ASSERT( !pView, "ScSelectionTransferObj dtor: ForgetView not called" ); } -BOOL ScSelectionTransferObj::StillValid() +sal_Bool ScSelectionTransferObj::StillValid() { //! check if view still has same cell selection - //! (but return FALSE if data has changed inbetween) - return FALSE; + //! (but return sal_False if data has changed inbetween) + return sal_False; } void ScSelectionTransferObj::ForgetView() @@ -296,10 +296,10 @@ void ScSelectionTransferObj::CreateCellData() ScDrawLayer::SetGlobalDrawPersist(aDragShellRef); ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); - // bApi = TRUE -> no error mesages - // #i18364# bStopEdit = FALSE -> don't end edit mode + // bApi = sal_True -> no error mesages + // #i18364# bStopEdit = sal_False -> don't end edit mode // (this may be called from pasting into the edit line) - BOOL bCopied = pViewData->GetView()->CopyToClip( pClipDoc, FALSE, TRUE, TRUE, FALSE ); + sal_Bool bCopied = pViewData->GetView()->CopyToClip( pClipDoc, sal_False, sal_True, sal_True, sal_False ); ScDrawLayer::SetGlobalDrawPersist(NULL); @@ -332,7 +332,7 @@ void ScSelectionTransferObj::CreateCellData() } //! make static member of ScDrawView -extern void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle ); +extern void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_Bool& rOneOle ); void ScSelectionTransferObj::CreateDrawData() { @@ -344,7 +344,7 @@ void ScSelectionTransferObj::CreateDrawData() ScDrawView* pDrawView = pView->GetScDrawView(); if ( pDrawView ) { - BOOL bAnyOle, bOneOle; + sal_Bool bAnyOle, bOneOle; const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList(); lcl_CheckOle( rMarkList, bAnyOle, bOneOle ); diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx index 80dc667c5de6..806ea0bc61dd 100644 --- a/sc/source/ui/app/template.cxx +++ b/sc/source/ui/app/template.cxx @@ -34,7 +34,7 @@ //------------------------------------------------------------------------ -ScTemplateDlg::ScTemplateDlg(Window * pParent, USHORT nAppResource) : +ScTemplateDlg::ScTemplateDlg(Window * pParent, sal_uInt16 nAppResource) : // SfxTemplateDlg( pParent, nAppResource ) SfxTemplateDialog( pParent ) { @@ -48,9 +48,9 @@ __EXPORT ScTemplateDlg::~ScTemplateDlg() //------------------------------------------------------------------------ -BOOL ScTemplateDlg::New(String &rNewName) +sal_Bool ScTemplateDlg::New(String &rNewName) { - return TRUE; + return sal_True; } @@ -59,9 +59,9 @@ void ScTemplateDlg::Edit(const String &) } -BOOL ScTemplateDlg::Delete(const String &) +sal_Bool ScTemplateDlg::Delete(const String &) { - return TRUE; + return sal_True; } diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index e6b8b3b5049a..1f9d0d4986bc 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -107,7 +107,7 @@ void ScTransferObj::GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCR // static void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor, - const ScRange& rBlock, BOOL bMetaFile ) + const ScRange& rBlock, sal_Bool bMetaFile ) { if (!pDoc) return; @@ -133,8 +133,8 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc nDragHandleX( 0 ), nDragHandleY( 0 ), nDragSourceFlags( 0 ), - bDragWasInternal( FALSE ), - bUsedForLink( FALSE ), + bDragWasInternal( sal_False ), + bUsedForLink( sal_False ), bUseInApi( false ) { DBG_ASSERT(pDoc->IsClipboard(), "wrong document"); @@ -148,25 +148,25 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc SCCOL nCol2; SCROW nRow2; pDoc->GetClipStart( nCol1, nRow1 ); - pDoc->GetClipArea( nCol2, nRow2, TRUE ); // real source area - include filtered rows + pDoc->GetClipArea( nCol2, nRow2, sal_True ); // real source area - include filtered rows nCol2 = sal::static_int_cast<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 a63491f0929b..75a21a5a7700 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -57,7 +57,7 @@ TYPEINIT1(ScIndexHint, SfxHint); // ScInputStatusItem - Status-Update fuer Eingabezeile // ----------------------------------------------------------------------- -//UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, +//UNUSED2008-05 ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, //UNUSED2008-05 SCTAB nTab, //UNUSED2008-05 SCCOL nCol, SCROW nRow, //UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow, @@ -73,7 +73,7 @@ TYPEINIT1(ScIndexHint, SfxHint); //UNUSED2008-05 { //UNUSED2008-05 } -ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, +ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, @@ -132,7 +132,7 @@ SfxPoolItem* __EXPORT ScInputStatusItem::Clone( SfxItemPool * ) const // ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht // ----------------------------------------------------------------------- -ScTablesHint::ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2) : +ScTablesHint::ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2) : nId( nNewId ), nTab1( nTable1 ), nTab2( nTable2 ) @@ -148,7 +148,7 @@ ScTablesHint::~ScTablesHint() // ScIndexHint // ----------------------------------------------------------------------- -ScIndexHint::ScIndexHint(USHORT nNewId, USHORT nIdx) : +ScIndexHint::ScIndexHint(sal_uInt16 nNewId, sal_uInt16 nIdx) : nId( nNewId ), nIndex( nIdx ) { @@ -177,7 +177,7 @@ ScEditViewHint::~ScEditViewHint() // ScSortItem - Daten fuer den Sortierdialog // ----------------------------------------------------------------------- -ScSortItem::ScSortItem( USHORT nWhichP, +ScSortItem::ScSortItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), @@ -188,7 +188,7 @@ ScSortItem::ScSortItem( USHORT nWhichP, //------------------------------------------------------------------------ -ScSortItem::ScSortItem( USHORT nWhichP, +ScSortItem::ScSortItem( sal_uInt16 nWhichP, const ScSortParam* pSortData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) @@ -237,7 +237,7 @@ SfxPoolItem* __EXPORT ScSortItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const +sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const { // Return empty value as there is no useful conversion rVal = com::sun::star::uno::Any(); @@ -248,23 +248,23 @@ sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMember // ScQueryItem - Daten fuer den Filterdialog // ----------------------------------------------------------------------- -ScQueryItem::ScQueryItem( USHORT nWhichP, +ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( ptrViewData ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( sal_False ) { if ( pQueryData ) theQueryData = *pQueryData; } //------------------------------------------------------------------------ -ScQueryItem::ScQueryItem( USHORT nWhichP, +ScQueryItem::ScQueryItem( sal_uInt16 nWhichP, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( sal_False ) { if ( pQueryData ) theQueryData = *pQueryData; } @@ -291,13 +291,13 @@ void ScQueryItem::SetAdvancedQuerySource(const ScRange* pSource) if (pSource) { aAdvSource = *pSource; - bIsAdvanced = TRUE; + bIsAdvanced = sal_True; } else - bIsAdvanced = FALSE; + bIsAdvanced = sal_False; } -BOOL ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const +sal_Bool ScQueryItem::GetAdvancedQuerySource(ScRange& rSource) const { rSource = aAdvSource; return bIsAdvanced; @@ -335,7 +335,7 @@ SfxPoolItem* __EXPORT ScQueryItem::Clone( SfxItemPool * ) const // ScSubTotalItem - Daten fuer den Zwischenergebnisdialog // ----------------------------------------------------------------------- -ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, +ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, ScViewData* ptrViewData, const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), @@ -346,7 +346,7 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, //------------------------------------------------------------------------ -ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, +ScSubTotalItem::ScSubTotalItem( sal_uInt16 nWhichP, const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) @@ -395,7 +395,7 @@ SfxPoolItem* __EXPORT ScSubTotalItem::Clone( SfxItemPool * ) const //------------------------------------------------------------------------ -sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const +sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /* nMemberUd */ ) const { // Return empty value as there is no useful conversion rVal = com::sun::star::uno::Any(); @@ -406,7 +406,7 @@ sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMe // ScUserListItem - Transporter fuer den Benutzerlisten-TabPage // ----------------------------------------------------------------------- -ScUserListItem::ScUserListItem( USHORT nWhichP ) +ScUserListItem::ScUserListItem( sal_uInt16 nWhichP ) : SfxPoolItem ( nWhichP ), pUserList ( NULL ) { @@ -442,7 +442,7 @@ int __EXPORT ScUserListItem::operator==( const SfxPoolItem& rItem ) const DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScUserListItem& r = (const ScUserListItem&)rItem; - BOOL bEqual = FALSE; + sal_Bool bEqual = sal_False; if ( !pUserList || !(r.pUserList) ) bEqual = ( !pUserList && !(r.pUserList) ); @@ -473,7 +473,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList ) // ----------------------------------------------------------------------- ScConsolidateItem::ScConsolidateItem( - USHORT nWhichP, + sal_uInt16 nWhichP, const ScConsolidateParam* pConsolidateData ) : SfxPoolItem ( nWhichP ) { @@ -524,8 +524,8 @@ SfxPoolItem* __EXPORT ScConsolidateItem::Clone( SfxItemPool * ) const // ScPivotItem - Daten fuer den Pivot-Dialog // ----------------------------------------------------------------------- -ScPivotItem::ScPivotItem( USHORT nWhichP, const ScDPSaveData* pData, - const ScRange* pRange, BOOL bNew ) : +ScPivotItem::ScPivotItem( sal_uInt16 nWhichP, const ScDPSaveData* pData, + const ScRange* pRange, sal_Bool bNew ) : SfxPoolItem ( nWhichP ) { // pSaveData must always exist @@ -587,7 +587,7 @@ SfxPoolItem* __EXPORT ScPivotItem::Clone( SfxItemPool * ) const // ScSolveItem - Daten fuer den Solver-Dialog // ----------------------------------------------------------------------- -ScSolveItem::ScSolveItem( USHORT nWhichP, +ScSolveItem::ScSolveItem( sal_uInt16 nWhichP, const ScSolveParam* pSolveData ) : SfxPoolItem ( nWhichP ) { @@ -637,7 +637,7 @@ SfxPoolItem* __EXPORT ScSolveItem::Clone( SfxItemPool * ) const // ScTabOpItem - Daten fuer den TabOp-Dialog // ----------------------------------------------------------------------- -ScTabOpItem::ScTabOpItem( USHORT nWhichP, +ScTabOpItem::ScTabOpItem( sal_uInt16 nWhichP, const ScTabOpParam* pTabOpData ) : SfxPoolItem ( nWhichP ) { @@ -688,7 +688,7 @@ SfxPoolItem* __EXPORT ScTabOpItem::Clone( SfxItemPool * ) const // ScCondFrmtItem - Daten fuer den Dialog bedingte Formatierung // ----------------------------------------------------------------------- -ScCondFrmtItem::ScCondFrmtItem( USHORT nWhichP, +ScCondFrmtItem::ScCondFrmtItem( sal_uInt16 nWhichP, //! const ScConditionalFormat* pCondFrmt ) const ScConditionalFormat& rCondFrmt ) : SfxPoolItem ( nWhichP ), |