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 | 6aa45bbe9dbaa96e1b365f22969e1ad3d7ce9553 (patch) | |
tree | 46f9ccd7d99842ee5ed4f3683686783d2e17590d /formula/source/ui | |
parent | 72f6e25f3d79a789caaa3ba190a85dbf1b65a693 (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
accfixes: merged to m100
Diffstat (limited to 'formula/source/ui')
-rw-r--r-- | formula/source/ui/dlg/ControlHelper.hxx | 6 | ||||
-rw-r--r-- | formula/source/ui/dlg/FormulaHelper.cxx | 52 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 260 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcpage.cxx | 26 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcpage.hxx | 14 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 38 | ||||
-rw-r--r-- | formula/source/ui/dlg/parawin.cxx | 90 | ||||
-rw-r--r-- | formula/source/ui/dlg/parawin.hxx | 46 | ||||
-rw-r--r-- | formula/source/ui/dlg/structpg.cxx | 24 | ||||
-rw-r--r-- | formula/source/ui/dlg/structpg.hxx | 10 | ||||
-rw-r--r-- | formula/source/ui/inc/ModuleHelper.hxx | 2 |
11 files changed, 284 insertions, 284 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 28523a24eb92..51edbd91a097 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -58,7 +58,7 @@ private: MultiLineEdit* pMEdit; Link aSelChangedLink; Selection aOldSel; - BOOL bMouseFlag; + sal_Bool bMouseFlag; DECL_LINK( ChangedHdl, EditBox* ); protected: @@ -93,7 +93,7 @@ public: ArgEdit( Window* pParent, const ResId& rResId ); void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, - ScrollBar& rArgSlider, USHORT nArgCount ); + ScrollBar& rArgSlider, sal_uInt16 nArgCount ); protected: virtual void KeyInput( const KeyEvent& rKEvt ); @@ -102,7 +102,7 @@ private: ArgEdit* pEdPrev; ArgEdit* pEdNext; ScrollBar* pSlider; - USHORT nArgs; + sal_uInt16 nArgs; }; diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 1d71b40919eb..88c43f0daee0 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -47,7 +47,7 @@ namespace formula virtual ::rtl::OUString getDescription() const { return ::rtl::OUString(); } virtual xub_StrLen getSuppressedArgumentCount() const { return 0; } virtual ::rtl::OUString getFormula(const ::std::vector< ::rtl::OUString >& ) const { return ::rtl::OUString(); } - virtual void fillVisibleArgumentMapping(::std::vector<USHORT>& ) const {} + virtual void fillVisibleArgumentMapping(::std::vector<sal_uInt16>& ) const {} virtual void initArgumentInfo() const {} virtual ::rtl::OUString getSignature() const { return ::rtl::OUString(); } virtual rtl::OString getHelpId() const { return ""; } @@ -74,14 +74,14 @@ FormulaHelper::FormulaHelper(const IFunctionManager* _pFunctionManager) { m_pCharClass = m_pSysLocale->GetCharClassPtr(); } -BOOL FormulaHelper::GetNextFunc( const String& rFormula, - BOOL bBack, +sal_Bool FormulaHelper::GetNextFunc( const String& rFormula, + sal_Bool bBack, xub_StrLen& rFStart, // Ein- und Ausgabe xub_StrLen* pFEnd, // = NULL const IFunctionDescription** ppFDesc, // = NULL ::std::vector< ::rtl::OUString>* pArgs ) const // = NULL { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; xub_StrLen nOldStart = rFStart; String aFname; @@ -114,7 +114,7 @@ BOOL FormulaHelper::GetNextFunc( const String& rFormula, } if ( *ppFDesc && pArgs ) { - GetArgStrings( *pArgs,rFormula, rFStart, static_cast<USHORT>((*ppFDesc)->getParameterCount() )); + GetArgStrings( *pArgs,rFormula, rFStart, static_cast<sal_uInt16>((*ppFDesc)->getParameterCount() )); } else { @@ -133,13 +133,13 @@ BOOL FormulaHelper::GetNextFunc( const String& rFormula, void FormulaHelper::FillArgStrings( const String& rFormula, xub_StrLen nFuncPos, - USHORT nArgs, + sal_uInt16 nArgs, ::std::vector< ::rtl::OUString >& _rArgs ) const { xub_StrLen nStart = 0; xub_StrLen nEnd = 0; - USHORT i; - BOOL bLast = FALSE; + sal_uInt16 i; + sal_Bool bLast = sal_False; for ( i=0; i<nArgs && !bLast; i++ ) { @@ -152,7 +152,7 @@ void FormulaHelper::FillArgStrings( const String& rFormula, if ( nEnd != nStart ) _rArgs.push_back(rFormula.Copy( nStart, nEnd-1-nStart )); else - _rArgs.push_back(String()), bLast = TRUE; + _rArgs.push_back(String()), bLast = sal_True; } else { @@ -174,7 +174,7 @@ void FormulaHelper::FillArgStrings( const String& rFormula, void FormulaHelper::GetArgStrings( ::std::vector< ::rtl::OUString >& _rArgs ,const String& rFormula, xub_StrLen nFuncPos, - USHORT nArgs ) const + sal_uInt16 nArgs ) const { if (nArgs) { @@ -184,10 +184,10 @@ void FormulaHelper::GetArgStrings( ::std::vector< ::rtl::OUString >& _rArgs //------------------------------------------------------------------------ -inline BOOL IsFormulaText( const CharClass* _pCharClass,const String& rStr, xub_StrLen nPos ) +inline sal_Bool IsFormulaText( const CharClass* _pCharClass,const String& rStr, xub_StrLen nPos ) { if( _pCharClass->isLetterNumeric( rStr, nPos ) ) - return TRUE; + return sal_True; else { // In internationalized versions function names may contain a dot // and in every version also an underscore... ;-) @@ -199,7 +199,7 @@ inline BOOL IsFormulaText( const CharClass* _pCharClass,const String& rStr, xub_ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, xub_StrLen nStart, - BOOL bBack, + sal_Bool bBack, String* pFuncName ) const { xub_StrLen nStrLen = rFormula.Len(); @@ -210,11 +210,11 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, xub_StrLen nFStart = FUNC_NOTFOUND; xub_StrLen nParPos = nStart; - BOOL bRepeat, bFound; + sal_Bool bRepeat, bFound; do { - bFound = FALSE; - bRepeat = FALSE; + bFound = sal_False; + bRepeat = sal_False; if ( bBack ) { @@ -228,7 +228,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, if (nParPos > 0) nParPos--; } - else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == FALSE ) + else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == sal_False ) nParPos--; } } @@ -243,7 +243,7 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, nParPos++; nParPos++; } - else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == FALSE ) + else if ( (bFound = ( rFormula.GetChar(nParPos) == '(' ) ) == sal_False ) nParPos++; } } @@ -268,13 +268,13 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula, } else // Klammern ohne Funktion -> weitersuchen { - bRepeat = TRUE; + bRepeat = sal_True; if ( !bBack ) nParPos++; else if (nParPos > 0) nParPos--; else - bRepeat = FALSE; + bRepeat = sal_False; } } else // keine Klammern gefunden @@ -300,7 +300,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart short nParCount = 0; bool bInArray = false; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while ( !bFound && (nStart < nStrLen) ) { @@ -318,10 +318,10 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart { nParCount--; if ( nParCount == 0 ) - bFound = TRUE; + bFound = sal_True; else if ( nParCount < 0 ) { - bFound = TRUE; + bFound = sal_True; nStart--; // einen zu weit gelesen } } @@ -337,7 +337,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart { if ( !bInArray && nParCount == 0 ) { - bFound = TRUE; + bFound = sal_True; nStart--; // einen zu weit gelesen } } @@ -349,7 +349,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart //------------------------------------------------------------------ -xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, USHORT nArg ) const +xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, sal_uInt16 nArg ) const { xub_StrLen nStrLen = rStr.Len(); @@ -358,7 +358,7 @@ xub_StrLen FormulaHelper::GetArgStart( const String& rStr, xub_StrLen nStart, US short nParCount = 0; bool bInArray = false; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while ( !bFound && (nStart < nStrLen) ) { diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 9842d4c29157..d782f0ee8dcd 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -99,9 +99,9 @@ namespace formula ::std::pair<RefButton*,RefEdit*> RefInputStartBefore( RefEdit* pEdit, RefButton* pButton ); void RefInputStartAfter( RefEdit* pEdit, RefButton* pButton ); - void RefInputDoneAfter( BOOL bForced ); - BOOL CalcValue( const String& rStrExp, String& rStrResult ); - BOOL CalcStruct( const String& rStrExp); + void RefInputDoneAfter( sal_Bool bForced ); + sal_Bool CalcValue( const String& rStrExp, String& rStrResult ); + sal_Bool CalcStruct( const String& rStrExp); void UpdateValues(); void DeleteArgs(); xub_StrLen GetFunctionPos(xub_StrLen nPos); @@ -111,32 +111,32 @@ namespace formula void fillTree(IStructHelper* _pTree); void UpdateTokenArray( const String& rStrExp); String RepairFormula(const String& aFormula); - void FillDialog(BOOL nFlag=TRUE); - void EditNextFunc( BOOL bForward, xub_StrLen nFStart=NOT_FOUND ); + void FillDialog(sal_Bool nFlag=sal_True); + void EditNextFunc( sal_Bool bForward, xub_StrLen nFStart=NOT_FOUND ); void EditThisFunc(xub_StrLen nFStart); void EditFuncParas(xub_StrLen nEditPos); - void UpdateArgInput( USHORT nOffset, USHORT nInput ); + void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 nInput ); void Update(); void Update(const String& _sExp); - void SaveArg( USHORT nEd ); + void SaveArg( sal_uInt16 nEd ); void UpdateSelection(); - void DoEnter( BOOL bOk ); + void DoEnter( sal_Bool bOk ); void UpdateFunctionDesc(); void ResizeArgArr( const IFunctionDescription* pNewFunc ); void FillListboxes(); - void FillControls(BOOL &rbNext, BOOL &rbPrev); + void FillControls(sal_Bool &rbNext, sal_Bool &rbPrev); - FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate); + FormulaDlgMode SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate); void SetMeText(const String& _sText); - BOOL CheckMatrix(String& aFormula /*IN/OUT*/); + sal_Bool CheckMatrix(String& aFormula /*IN/OUT*/); void SetEdSelection(); - BOOL UpdateParaWin(Selection& _rSelection); + sal_Bool UpdateParaWin(Selection& _rSelection); void UpdateParaWin(const Selection& _rSelection,const String& _sRefStr); void SetData(xub_StrLen nFStart,xub_StrLen nNextFStart,xub_StrLen nNextFEnd,xub_StrLen& PrivStart,xub_StrLen& PrivEnd); @@ -214,9 +214,9 @@ namespace formula FuncPage* pFuncPage; StructPage* pStructPage; String aOldFormula; - BOOL bStructUpdate; + sal_Bool bStructUpdate; MultiLineEdit* pMEdit; - BOOL bUserMatrixFlag; + sal_Bool bUserMatrixFlag; Timer aTimer; const String aTitle1; @@ -231,15 +231,15 @@ namespace formula rtl::OString aOldHelp; rtl::OString aOldUnique; rtl::OString aActivWinId; - BOOL bIsShutDown; + sal_Bool bIsShutDown; Font aFntBold; Font aFntLight; - USHORT nEdFocus; + sal_uInt16 nEdFocus; // Selection theCurSel; - BOOL bEditFlag; + sal_Bool bEditFlag; const IFunctionDescription* pFuncDesc; xub_StrLen nArgs; ::std::vector< ::rtl::OUString > m_aArguments; @@ -292,7 +292,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent // pTheRefEdit (NULL), pMEdit (NULL), - bUserMatrixFlag (FALSE), + bUserMatrixFlag (sal_False), // aTitle1 ( ModuleRes( STR_TITLE1 ) ), // lokale Resource aTitle2 ( ModuleRes( STR_TITLE2 ) ), // lokale Resource @@ -300,7 +300,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aTxtOk ( aBtnEnd.GetText() ), m_aFormulaHelper(_pFunctionMgr), // - bIsShutDown (FALSE), + bIsShutDown (sal_False), nEdFocus (0), pFuncDesc (NULL), nArgs (0) @@ -321,8 +321,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent m_aEditHelpId = pMEdit->GetHelpId(); pMEdit->SetUniqueId( m_aEditHelpId ); - bEditFlag=FALSE; - bStructUpdate=TRUE; + bEditFlag=sal_False; + bStructUpdate=sal_True; Point aPos=aGEdit.GetPosPixel(); pParaWin->SetPosPixel(aPos); pParaWin->SetArgModifiedHdl(LINK( this, FormulaDlg_Impl, ModifyHdl ) ); @@ -361,7 +361,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aMEFormula.SetSelChangedHdl( LINK( this, FormulaDlg_Impl, FormulaCursorHdl ) ); aFntLight = aFtFormula.GetFont(); - aFntLight.SetTransparent( TRUE ); + aFntLight.SetTransparent( sal_True ); aFntBold = aFntLight; aFntBold.SetWeight( WEIGHT_BOLD ); @@ -380,7 +380,7 @@ FormulaDlg_Impl::~FormulaDlg_Impl() aTimer.SetTimeoutHdl(Link()); aTimer.Stop(); } // if(aTimer.IsActive()) - bIsShutDown=TRUE;// Setzen, damit PreNotify keinen GetFocus speichert. + bIsShutDown=sal_True;// Setzen, damit PreNotify keinen GetFocus speichert. FormEditData* pData = m_pHelper->getFormEditData(); if (pData) // wird nicht ueber Close zerstoert; { @@ -388,9 +388,9 @@ FormulaDlg_Impl::~FormulaDlg_Impl() pData->SetSelection(pMEdit->GetSelection()); if(aTabCtrl.GetCurPageId()==TP_FUNCTION) - pData->SetMode( (USHORT) FORMULA_FORMDLG_FORMULA ); + pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA ); else - pData->SetMode( (USHORT) FORMULA_FORMDLG_EDIT ); + pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_EDIT ); pData->SetUndoStr(pMEdit->GetText()); pData->SetMatrixFlag(aBtnMatrix.IsChecked()); } @@ -406,7 +406,7 @@ FormulaDlg_Impl::~FormulaDlg_Impl() // ----------------------------------------------------------------------------- void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt ) { - USHORT nSwitch=rNEvt.GetType(); + sal_uInt16 nSwitch=rNEvt.GetType(); if(nSwitch==EVENT_GETFOCUS && !bIsShutDown) { Window* pWin=rNEvt.GetWindow(); @@ -490,7 +490,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testweise xub_StrLen nPrevFuncPos=1; short nBracketCount=0; - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; String aFormString = pMEdit->GetText(); m_aFormulaHelper.GetCharClass()->toUpper( aFormString ); @@ -548,12 +548,12 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) if ( eOp == m_aSeparatorsOpCodes[TOKEN_OPEN].OpCode ) { nBracketCount++; - bFlag=TRUE; + bFlag=sal_True; } else if ( eOp == m_aSeparatorsOpCodes[TOKEN_CLOSE].OpCode ) { nBracketCount--; - bFlag=FALSE; + bFlag=sal_False; nFuncPos=nPrevFuncPos; } bool bIsFunction = ::std::find_if(m_aFunctionOpCodes.getConstArray(),m_pFunctionOpCodesEnd,::std::bind2nd(OpCodeCompare(),boost::cref(eOp))) != m_pFunctionOpCodesEnd; @@ -593,9 +593,9 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos) return nFuncPos; } // ----------------------------------------------------------------------------- -BOOL FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult ) +sal_Bool FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult ) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; if ( rStrExp.Len() > 0 ) { @@ -606,7 +606,7 @@ BOOL FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult ) bResult = m_pHelper->calculateValue(rStrExp,rStrResult); } else - bResult = FALSE; + bResult = sal_False; } return bResult; @@ -630,9 +630,9 @@ void FormulaDlg_Impl::UpdateValues() CalcStruct(pMEdit->GetText()); } -BOOL FormulaDlg_Impl::CalcStruct( const String& rStrExp) +sal_Bool FormulaDlg_Impl::CalcStruct( const String& rStrExp) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; xub_StrLen nLength=rStrExp.Len(); if ( rStrExp.Len() > 0 && aOldFormula!=rStrExp && bStructUpdate) @@ -663,7 +663,7 @@ BOOL FormulaDlg_Impl::CalcStruct( const String& rStrExp) UpdateTokenArray(rStrExp); } else - bResult = FALSE; + bResult = sal_False; } return bResult; } @@ -771,13 +771,13 @@ void FormulaDlg_Impl::UpdateTokenArray( const String& rStrExp) } // if ( pTokens && nLen == m_aTokenList.getLength() ) FormulaCompiler aCompiler(*m_pTokenArray.get()); - aCompiler.SetCompileForFAP(TRUE); // #i101512# special handling is needed + aCompiler.SetCompileForFAP(sal_True); // #i101512# special handling is needed aCompiler.CompileTokenArray(); } -void FormulaDlg_Impl::FillDialog(BOOL nFlag) +void FormulaDlg_Impl::FillDialog(sal_Bool nFlag) { - BOOL bNext=TRUE, bPrev=TRUE; + sal_Bool bNext=sal_True, bPrev=sal_True; if(nFlag) FillControls(bNext, bPrev); FillListboxes(); @@ -808,9 +808,9 @@ void FormulaDlg_Impl::FillListboxes() if ( pFuncDesc && pFuncDesc->getCategory() ) { if( pFuncPage->GetCategory() != pFuncDesc->getCategory()->getNumber() + 1 ) - pFuncPage->SetCategory(static_cast<USHORT>(pFuncDesc->getCategory()->getNumber() + 1)); + pFuncPage->SetCategory(static_cast<sal_uInt16>(pFuncDesc->getCategory()->getNumber() + 1)); - USHORT nPos=pFuncPage->GetFuncPos(pFuncDesc); + sal_uInt16 nPos=pFuncPage->GetFuncPos(pFuncDesc); pFuncPage->SetFunction(nPos); } @@ -824,7 +824,7 @@ void FormulaDlg_Impl::FillListboxes() // ResizeArgArr jetzt schon in UpdateFunctionDesc - m_pHelper->setDispatcherLock( TRUE);// Modal-Modus einschalten + m_pHelper->setDispatcherLock( sal_True);// Modal-Modus einschalten aNewTitle = aTitle1; @@ -833,7 +833,7 @@ void FormulaDlg_Impl::FillListboxes() m_pParent->SetUniqueId( aOldUnique ); } // ----------------------------------------------------------------------------- -void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) +void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev) { // Umschalten zwischen den "Seiten" FormEditData* pData = m_pHelper->getFormEditData(); @@ -851,9 +851,9 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) aFormula.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " )" )); DeleteArgs(); const IFunctionDescription* pOldFuncDesc = pFuncDesc; - BOOL bTestFlag = FALSE; + sal_Bool bTestFlag = sal_False; - if ( m_aFormulaHelper.GetNextFunc( aFormula, FALSE, + if ( m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd, &pFuncDesc, &m_aArguments ) ) { bTestFlag = (pOldFuncDesc != pFuncDesc); @@ -888,26 +888,26 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) pMEdit->SetSelection( Selection(PrivStart, PrivEnd)); nArgs = pFuncDesc->getSuppressedArgumentCount(); - USHORT nOffset = pData->GetOffset(); + sal_uInt16 nOffset = pData->GetOffset(); nEdFocus = pData->GetEdFocus(); // Verkettung der Edit's fuer Focus-Kontrolle if(bTestFlag) pParaWin->SetArgumentOffset(nOffset); - USHORT nActiv=0; + sal_uInt16 nActiv=0; xub_StrLen nArgPos= m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); xub_StrLen nEditPos=(xub_StrLen) pMEdit->GetSelection().Min(); - BOOL bFlag=FALSE; + sal_Bool bFlag=sal_False; - for(USHORT i=0;i<nArgs;i++) + for(sal_uInt16 i=0;i<nArgs;i++) { sal_Int32 nLength = m_aArguments[i].getLength()+1; pParaWin->SetArgument(i,m_aArguments[i]); if(nArgPos<=nEditPos && nEditPos<nArgPos+nLength) { nActiv=i; - bFlag=TRUE; + bFlag=sal_True; } nArgPos = sal::static_int_cast<xub_StrLen>( nArgPos + nLength ); } @@ -929,10 +929,10 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev) // Test, ob vorne/hinten noch mehr Funktionen sind xub_StrLen nTempStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); - rbNext = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nTempStart ); + rbNext = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nTempStart ); nTempStart=(xub_StrLen)pMEdit->GetSelection().Min(); pData->SetFStart(nTempStart); - rbPrev = m_aFormulaHelper.GetNextFunc( aFormula, TRUE, nTempStart ); + rbPrev = m_aFormulaHelper.GetNextFunc( aFormula, sal_True, nTempStart ); } // ----------------------------------------------------------------------------- @@ -950,7 +950,7 @@ void FormulaDlg_Impl::ClearAllParas() aFtEditName.Hide(); pParaWin->Hide(); - aBtnForward.Enable(TRUE); //@new + aBtnForward.Enable(sal_True); //@new aFtHeadLine.Show(); aFtFuncName.Show(); aFtFuncDesc.Show(); @@ -981,7 +981,7 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula) return aResult; } -void FormulaDlg_Impl::DoEnter(BOOL bOk) +void FormulaDlg_Impl::DoEnter(sal_Bool bOk) { // Eingabe ins Dokument uebernehmen oder abbrechen if ( bOk) @@ -1008,11 +1008,11 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn ) { if ( pBtn == &aBtnCancel ) { - DoEnter(FALSE); // schliesst den Dialog + DoEnter(sal_False); // schliesst den Dialog } else if ( pBtn == &aBtnEnd ) { - DoEnter(TRUE); // schliesst den Dialog + DoEnter(sal_True); // schliesst den Dialog } else if ( pBtn == &aBtnForward ) { @@ -1020,19 +1020,19 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn ) const IFunctionDescription* pDesc =pFuncPage->GetFuncDesc( pFuncPage->GetFunction() ); if(pDesc==pFuncDesc || !pFuncPage->IsVisible()) - EditNextFunc( TRUE ); + EditNextFunc( sal_True ); else { DblClkHdl(pFuncPage); //new - aBtnForward.Enable(FALSE); //new + aBtnForward.Enable(sal_False); //new } - //@EditNextFunc( TRUE ); + //@EditNextFunc( sal_True ); } else if ( pBtn == &aBtnBackward ) { - bEditFlag=FALSE; - aBtnForward.Enable(TRUE); - EditNextFunc( FALSE ); + bEditFlag=sal_False; + aBtnForward.Enable(sal_True); + EditNextFunc( sal_False ); aMEFormula.Invalidate(); aMEFormula.Update(); } @@ -1066,11 +1066,11 @@ void FormulaDlg_Impl::UpdateFunctionDesc() FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) return; - USHORT nCat = pFuncPage->GetCategory(); + sal_uInt16 nCat = pFuncPage->GetCategory(); if ( nCat == LISTBOX_ENTRY_NOTFOUND ) nCat = 0; pData->SetCatSel( nCat ); - USHORT nFunc = pFuncPage->GetFunction(); + sal_uInt16 nFunc = pFuncPage->GetFunction(); if ( nFunc == LISTBOX_ENTRY_NOTFOUND ) nFunc = 0; pData->SetFuncSel( nFunc ); @@ -1109,7 +1109,7 @@ void FormulaDlg_Impl::UpdateFunctionDesc() IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG ) { - USHORT nFunc = pFuncPage->GetFunction(); + sal_uInt16 nFunc = pFuncPage->GetFunction(); // ex-UpdateLRUList const IFunctionDescription* pDesc = pFuncPage->GetFuncDesc(nFunc); @@ -1135,7 +1135,7 @@ IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG ) } pParaWin->SetEdFocus(0); - aBtnForward.Enable(FALSE); //@New + aBtnForward.Enable(sal_False); //@New return 0; } @@ -1189,11 +1189,11 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart) xub_StrLen nNextFStart = nFStart; xub_StrLen nNextFEnd = 0; - BOOL bFound; + sal_Bool bFound; - //@bFound = m_pHelper->getNextFunction( aFormula, FALSE, nNextFStart, &nNextFEnd, &pFuncDesc ); + //@bFound = m_pHelper->getNextFunction( aFormula, sal_False, nNextFStart, &nNextFEnd, &pFuncDesc ); - bFound = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd); + bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd); if ( bFound ) { xub_StrLen PrivStart, PrivEnd; @@ -1206,7 +1206,7 @@ void FormulaDlg_Impl::EditThisFunc(xub_StrLen nFStart) } } -void FormulaDlg_Impl::EditNextFunc( BOOL bForward, xub_StrLen nFStart ) +void FormulaDlg_Impl::EditNextFunc( sal_Bool bForward, xub_StrLen nFStart ) { FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) @@ -1226,18 +1226,18 @@ void FormulaDlg_Impl::EditNextFunc( BOOL bForward, xub_StrLen nFStart ) xub_StrLen nNextFStart = 0; xub_StrLen nNextFEnd = 0; - BOOL bFound; + sal_Bool bFound; if ( bForward ) { nNextFStart = m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 ); - //@bFound = m_pHelper->getNextFunction( aFormula, FALSE, nNextFStart, &nNextFEnd, &pFuncDesc ); - bFound = m_aFormulaHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd); + //@bFound = m_pHelper->getNextFunction( aFormula, sal_False, nNextFStart, &nNextFEnd, &pFuncDesc ); + bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd); } else { nNextFStart = nFStart; - //@bFound = m_pHelper->getNextFunction( aFormula, TRUE, nNextFStart, &nNextFEnd, &pFuncDesc ); - bFound = m_aFormulaHelper.GetNextFunc( aFormula, TRUE, nNextFStart, &nNextFEnd); + //@bFound = m_pHelper->getNextFunction( aFormula, sal_True, nNextFStart, &nNextFEnd, &pFuncDesc ); + bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_True, nNextFStart, &nNextFEnd); } if ( bFound ) @@ -1266,18 +1266,18 @@ void FormulaDlg_Impl::EditFuncParas(xub_StrLen nEditPos) m_aFormulaHelper.GetArgStrings(m_aArguments,aFormula, nFStart, nArgs ); // m_aArguments = ScFormulaUtil::GetArgStrings( aFormula, nFStart, nArgs ); - USHORT nActiv=pParaWin->GetSliderPos(); - BOOL bFlag=FALSE; + sal_uInt16 nActiv=pParaWin->GetSliderPos(); + sal_Bool bFlag=sal_False; ::std::vector< ::rtl::OUString >::iterator aIter = m_aArguments.begin(); ::std::vector< ::rtl::OUString >::iterator aEnd = m_aArguments.end(); - for(USHORT i=0;aIter != aEnd;i++,++aIter) + for(sal_uInt16 i=0;aIter != aEnd;i++,++aIter) { sal_Int32 nLength=(*aIter).getLength(); pParaWin->SetArgument(i,(*aIter)); if(nArgPos<=nEditPos && nEditPos<nArgPos+nLength) { nActiv=i; - bFlag=TRUE; + bFlag=sal_True; } nArgPos+=nLength+1; } @@ -1293,11 +1293,11 @@ void FormulaDlg_Impl::EditFuncParas(xub_StrLen nEditPos) } -void FormulaDlg_Impl::SaveArg( USHORT nEd ) +void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd ) { if (nEd<nArgs) { - USHORT i; + sal_uInt16 i; for(i=0;i<=nEd;i++) { if ( m_aArguments[i].getLength() == 0 ) @@ -1306,7 +1306,7 @@ void FormulaDlg_Impl::SaveArg( USHORT nEd ) if(pParaWin->GetArgument(nEd).Len()!=0) m_aArguments[nEd] = pParaWin->GetArgument(nEd); - USHORT nClearPos=nEd+1; + sal_uInt16 nClearPos=nEd+1; for(i=nEd+1;i<nArgs;i++) { if(pParaWin->GetArgument(i).Len()!=0) @@ -1326,14 +1326,14 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr ) { if(pPtr==pParaWin) { - aBtnForward.Enable(TRUE); //@ Damit eine neue Fkt eingegeben werden kann. + aBtnForward.Enable(sal_True); //@ Damit eine neue Fkt eingegeben werden kann. aTabCtrl.SetCurPageId(TP_FUNCTION); String aUndoStr = m_pHelper->getCurrentFormula(); // bevor unten ein ";" eingefuegt wird FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) return 0; - USHORT nArgNo = pParaWin->GetActiveLine(); + sal_uInt16 nArgNo = pParaWin->GetActiveLine(); nEdFocus=nArgNo; SaveArg(nArgNo); @@ -1346,12 +1346,12 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr ) pData->SetEdFocus( nEdFocus ); pData->SaveValues(); - pData->SetMode( (USHORT) FORMULA_FORMDLG_FORMULA ); + pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA ); pData->SetFStart( n1 ); pData->SetUndoStr( aUndoStr ); ClearAllParas(); - FillDialog(FALSE); + FillDialog(sal_False); pFuncPage->SetFocus(); //Da Parawin nicht mehr sichtbar } return 0; @@ -1376,7 +1376,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG ) FormEditData* pData = m_pHelper->getFormEditData(); if (!pData) return 0; - bEditFlag=TRUE; + bEditFlag=sal_True; String aInputFormula=m_pHelper->getCurrentFormula(); String aString=pMEdit->GetText(); @@ -1423,7 +1423,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG ) if(nPos<aSel.Min()-1) { xub_StrLen nPos1=aString.Search('(',nPos); - EditNextFunc( FALSE, nPos1); + EditNextFunc( sal_False, nPos1); } else { @@ -1431,7 +1431,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaHdl, MultiLineEdit*, EMPTYARG ) } m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max()); - bEditFlag=FALSE; + bEditFlag=sal_False; return 0; } @@ -1441,7 +1441,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaCursorHdl, EditBox*, EMPTYARG ) if (!pData) return 0; xub_StrLen nFStart = pData->GetFStart(); - bEditFlag=TRUE; + bEditFlag=sal_True; String aInputFormula=m_pHelper->getCurrentFormula(); String aString=pMEdit->GetText(); @@ -1484,7 +1484,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaCursorHdl, EditBox*, EMPTYARG ) } if(nCount==0) { - nFStart=m_aFormulaHelper.GetFunctionStart(aString,n,TRUE); + nFStart=m_aFormulaHelper.GetFunctionStart(aString,n,sal_True); EditThisFunc(nFStart); } else @@ -1500,7 +1500,7 @@ IMPL_LINK( FormulaDlg_Impl, FormulaCursorHdl, EditBox*, EMPTYARG ) } m_pHelper->setSelection((xub_StrLen)aSel.Min(),(xub_StrLen)aSel.Max()); - bEditFlag=FALSE; + bEditFlag=sal_False; return 0; } @@ -1519,16 +1519,16 @@ void FormulaDlg_Impl::UpdateSelection() String aFormula=pMEdit->GetText(); sal_Int32 nArgPos=m_aFormulaHelper.GetArgStart( aFormula,PrivStart,0); - USHORT nPos=pParaWin->GetActiveLine(); + sal_uInt16 nPos=pParaWin->GetActiveLine(); - for(USHORT i=0;i<nPos;i++) + for(sal_uInt16 i=0;i<nPos;i++) { nArgPos += (m_aArguments[i].getLength() + 1); } sal_Int32 nLength= m_aArguments[nPos].getLength(); Selection aSel(nArgPos,nArgPos+nLength); - m_pHelper->setSelection((USHORT)nArgPos,(USHORT)(nArgPos+nLength)); + m_pHelper->setSelection((sal_uInt16)nArgPos,(sal_uInt16)(nArgPos+nLength)); pMEdit->SetSelection(aSel); aMEFormula.UpdateOldSel(); } @@ -1574,7 +1574,7 @@ void FormulaDlg_Impl::RefInputStartAfter( RefEdit* /*pEdit*/, RefButton* /*pButt m_pParent->SetText( MnemonicGenerator::EraseAllMnemonicChars( aStr ) ); } } -void FormulaDlg_Impl::RefInputDoneAfter( BOOL bForced ) +void FormulaDlg_Impl::RefInputDoneAfter( sal_Bool bForced ) { aRefBtn.SetStartImage(); if( bForced || !aRefBtn.IsVisible() ) @@ -1589,7 +1589,7 @@ void FormulaDlg_Impl::RefInputDoneAfter( BOOL bForced ) if( pTheRefButton ) pTheRefButton->SetStartImage(); - USHORT nPrivActiv = pParaWin->GetActiveLine(); + sal_uInt16 nPrivActiv = pParaWin->GetActiveLine(); pParaWin->SetArgument( nPrivActiv, aEdRef.GetText() ); ModifyHdl( pParaWin ); pTheRefEdit = NULL; @@ -1622,7 +1622,7 @@ void FormulaDlg_Impl::Update(const String& _sExp) { CalcStruct(_sExp); FillDialog(); - //aBtnForward.Enable(TRUE); //@New + //aBtnForward.Enable(sal_True); //@New FuncSelHdl(NULL); } void FormulaDlg_Impl::SetMeText(const String& _sText) @@ -1632,7 +1632,7 @@ void FormulaDlg_Impl::SetMeText(const String& _sText) pMEdit->SetSelection( pData->GetSelection()); aMEFormula.UpdateOldSel(); } -FormulaDlgMode FormulaDlg_Impl::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate) +FormulaDlgMode FormulaDlg_Impl::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate) { FormulaDlgMode eMode = FORMULA_FORMDLG_FORMULA; if(!bEditFlag) @@ -1651,11 +1651,11 @@ FormulaDlgMode FormulaDlg_Impl::SetMeText(const String& _sText,xub_StrLen PrivSt } // if ( _bUpdate ) return eMode; } -BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula) +sal_Bool FormulaDlg_Impl::CheckMatrix(String& aFormula) { pMEdit->GrabFocus(); xub_StrLen nLen = aFormula.Len(); - BOOL bMatrix = nLen > 3 // Matrix-Formel ? + sal_Bool bMatrix = nLen > 3 // Matrix-Formel ? && aFormula.GetChar(0) == '{' && aFormula.GetChar(1) == '=' && aFormula.GetChar(nLen-1) == '}'; @@ -1672,8 +1672,8 @@ BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula) } IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, pStruP ) { - bStructUpdate=FALSE; - if(pStructPage->IsVisible()) aBtnForward.Enable(FALSE); //@New + bStructUpdate=sal_False; + if(pStructPage->IsVisible()) aBtnForward.Enable(sal_False); //@New if(pStructPage==pStruP) { @@ -1710,20 +1710,20 @@ IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, pStruP ) //} } - bStructUpdate=TRUE; + bStructUpdate=sal_True; return 0; } IMPL_LINK( FormulaDlg_Impl, MatrixHdl, CheckBox *, EMPTYARG ) { - bUserMatrixFlag=TRUE; + bUserMatrixFlag=sal_True; return 0; } IMPL_LINK( FormulaDlg_Impl, FuncSelHdl, FuncPage*, EMPTYARG ) { - USHORT nCat = pFuncPage->GetCategory(); + sal_uInt16 nCat = pFuncPage->GetCategory(); if ( nCat == LISTBOX_ENTRY_NOTFOUND ) nCat = 0; - USHORT nFunc = pFuncPage->GetFunction(); + sal_uInt16 nFunc = pFuncPage->GetFunction(); if ( nFunc == LISTBOX_ENTRY_NOTFOUND ) nFunc = 0; if ( (pFuncPage->GetFunctionEntryCount() > 0) @@ -1731,7 +1731,7 @@ IMPL_LINK( FormulaDlg_Impl, FuncSelHdl, FuncPage*, EMPTYARG ) { const IFunctionDescription* pDesc =pFuncPage->GetFuncDesc( pFuncPage->GetFunction() ); - if(pDesc!=pFuncDesc) aBtnForward.Enable(TRUE); //new + if(pDesc!=pFuncDesc) aBtnForward.Enable(sal_True); //new if (pDesc) { @@ -1762,7 +1762,7 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection,const String& _ //------------------------------------- // Manuelles Update der Ergebnisfelder: //------------------------------------- - USHORT nPrivActiv = pParaWin->GetActiveLine(); + sal_uInt16 nPrivActiv = pParaWin->GetActiveLine(); pParaWin->SetArgument(nPrivActiv,aEdRef.GetText()); pParaWin->UpdateParas(); @@ -1770,11 +1770,11 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection,const String& _ if( pEd != NULL ) pEd->SetSelection( theSel ); - pParaWin->SetRefMode(FALSE); + pParaWin->SetRefMode(sal_False); } -BOOL FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection) +sal_Bool FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection) { - pParaWin->SetRefMode(TRUE); + pParaWin->SetRefMode(sal_True); String aStrEd; Edit* pEd = GetCurrRefEdit(); @@ -1815,9 +1815,9 @@ rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin) } else { - USHORT nCount=pWin->GetChildCount(); + sal_uInt16 nCount=pWin->GetChildCount(); - for(USHORT i=0;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { Window* pChild=pWin->GetChild(i); aUniqueId=FindFocusWin(pChild); @@ -1878,7 +1878,7 @@ void FormulaModalDialog::SetMeText(const String& _sText) } // ----------------------------------------------------------------------------- -FormulaDlgMode FormulaModalDialog::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate) +FormulaDlgMode FormulaModalDialog::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate) { return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate); } @@ -1888,7 +1888,7 @@ void FormulaModalDialog::CheckMatrix() m_pImpl->aBtnMatrix.Check(); } // ----------------------------------------------------------------------------- -BOOL FormulaModalDialog::CheckMatrix(String& aFormula) +sal_Bool FormulaModalDialog::CheckMatrix(String& aFormula) { return m_pImpl->CheckMatrix(aFormula); } @@ -1908,11 +1908,11 @@ const FormulaHelper& FormulaModalDialog::GetFormulaHelper() const return m_pImpl->GetFormulaHelper(); } // ----------------------------------------------------------------------------- -BOOL FormulaModalDialog::isUserMatrix() const +sal_Bool FormulaModalDialog::isUserMatrix() const { return m_pImpl->bUserMatrixFlag; } -void FormulaModalDialog::DoEnter(BOOL _bOk) +void FormulaModalDialog::DoEnter(sal_Bool _bOk) { m_pImpl->DoEnter(_bOk); } @@ -1924,7 +1924,7 @@ void FormulaModalDialog::RefInputStartAfter( RefEdit* pEdit, RefButton* pButton { m_pImpl->RefInputStartAfter( pEdit, pButton ); } -void FormulaModalDialog::RefInputDoneAfter( BOOL bForced ) +void FormulaModalDialog::RefInputDoneAfter( sal_Bool bForced ) { m_pImpl->RefInputDoneAfter( bForced ); } @@ -1942,9 +1942,9 @@ void FormulaModalDialog::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId) } else { - USHORT nCount=pWin->GetChildCount(); + sal_uInt16 nCount=pWin->GetChildCount(); - for(USHORT i=0;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { Window* pChild=pWin->GetChild(i); SetFocusWin(pChild,nUniqueId); @@ -1980,7 +1980,7 @@ void FormulaModalDialog::UpdateParaWin(const Selection& _rSelection,const String { m_pImpl->UpdateParaWin(_rSelection,_sRefStr); } -BOOL FormulaModalDialog::UpdateParaWin(Selection& _rSelection) +sal_Bool FormulaModalDialog::UpdateParaWin(Selection& _rSelection) { return m_pImpl->UpdateParaWin(_rSelection); } @@ -2034,7 +2034,7 @@ void FormulaDlg::SetMeText(const String& _sText) } // ----------------------------------------------------------------------------- -FormulaDlgMode FormulaDlg::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,BOOL bMatrix,BOOL _bSelect,BOOL _bUpdate) +FormulaDlgMode FormulaDlg::SetMeText(const String& _sText,xub_StrLen PrivStart, xub_StrLen PrivEnd,sal_Bool bMatrix,sal_Bool _bSelect,sal_Bool _bUpdate) { return m_pImpl->SetMeText(_sText,PrivStart, PrivEnd,bMatrix,_bSelect,_bUpdate); } @@ -2044,7 +2044,7 @@ void FormulaDlg::CheckMatrix() m_pImpl->aBtnMatrix.Check(); } // ----------------------------------------------------------------------------- -BOOL FormulaDlg::CheckMatrix(String& aFormula) +sal_Bool FormulaDlg::CheckMatrix(String& aFormula) { return m_pImpl->CheckMatrix(aFormula); } @@ -2063,11 +2063,11 @@ void FormulaDlg::Update() } // ----------------------------------------------------------------------------- -BOOL FormulaDlg::isUserMatrix() const +sal_Bool FormulaDlg::isUserMatrix() const { return m_pImpl->bUserMatrixFlag; } -void FormulaDlg::DoEnter(BOOL _bOk) +void FormulaDlg::DoEnter(sal_Bool _bOk) { m_pImpl->DoEnter(_bOk); } @@ -2079,7 +2079,7 @@ void FormulaDlg::RefInputStartAfter( RefEdit* pEdit, RefButton* pButton ) { m_pImpl->RefInputStartAfter( pEdit, pButton ); } -void FormulaDlg::RefInputDoneAfter( BOOL bForced ) +void FormulaDlg::RefInputDoneAfter( sal_Bool bForced ) { m_pImpl->RefInputDoneAfter( bForced ); } @@ -2097,9 +2097,9 @@ void FormulaDlg::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId) } else { - USHORT nCount=pWin->GetChildCount(); + sal_uInt16 nCount=pWin->GetChildCount(); - for(USHORT i=0;i<nCount;i++) + for(sal_uInt16 i=0;i<nCount;i++) { Window* pChild=pWin->GetChild(i); SetFocusWin(pChild,nUniqueId); @@ -2134,7 +2134,7 @@ void FormulaDlg::UpdateParaWin(const Selection& _rSelection,const String& _sRefS { m_pImpl->UpdateParaWin(_rSelection,_sRefStr); } -BOOL FormulaDlg::UpdateParaWin(Selection& _rSelection) +sal_Bool FormulaDlg::UpdateParaWin(Selection& _rSelection) { return m_pImpl->UpdateParaWin(_rSelection); } @@ -2185,7 +2185,7 @@ void FormEditData::Reset() nFuncSel = 0; nOffset = 0; nEdFocus = 0; - bMatrix =FALSE; + bMatrix =sal_False; aUniqueId=rtl::OString(); aSelection.Min()=0; aSelection.Max()=0; diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index 1f8b64c7b4ba..6c2d0c757e9a 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -69,7 +69,7 @@ long FormulaListBox::PreNotify( NotifyEvent& rNEvt ) long nResult=ListBox::PreNotify(rNEvt); - USHORT nSwitch=aNotifyEvt.GetType(); + sal_uInt16 nSwitch=aNotifyEvt.GetType(); if(nSwitch==EVENT_KEYINPUT) { KeyInput(*aNotifyEvt.GetKeyEvent()); @@ -81,7 +81,7 @@ long FormulaListBox::PreNotify( NotifyEvent& rNEvt ) //============================================================================ -inline USHORT Lb2Cat( USHORT nLbPos ) +inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos ) { // Kategorie 0 == LRU, sonst Categories == LbPos-1 if ( nLbPos > 0 ) @@ -134,15 +134,15 @@ void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory) void FuncPage::UpdateFunctionList() { - USHORT nSelPos = aLbCategory.GetSelectEntryPos(); + sal_uInt16 nSelPos = aLbCategory.GetSelectEntryPos(); const IFunctionCategory* pCategory = static_cast<const IFunctionCategory*>(aLbCategory.GetEntryData(nSelPos)); - USHORT nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) + sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) ? Lb2Cat( nSelPos ) : 0; (void)nCategory; aLbFunction.Clear(); - aLbFunction.SetUpdateMode( FALSE ); + aLbFunction.SetUpdateMode( sal_False ); //------------------------------------------------------ if ( nSelPos > 0 ) @@ -177,7 +177,7 @@ void FuncPage::UpdateFunctionList() } //------------------------------------------------------ - aLbFunction.SetUpdateMode( TRUE ); + aLbFunction.SetUpdateMode( sal_True ); aLbFunction.SelectEntryPos(0); if(IsVisible()) SelHdl(&aLbFunction); @@ -210,16 +210,16 @@ IMPL_LINK( FuncPage, DblClkHdl, ListBox*, EMPTYARG ) return 0; } -void FuncPage::SetCategory(USHORT nCat) +void FuncPage::SetCategory(sal_uInt16 nCat) { aLbCategory.SelectEntryPos(nCat); UpdateFunctionList(); } -USHORT FuncPage::GetFuncPos(const IFunctionDescription* _pDesc) +sal_uInt16 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc) { return aLbFunction.GetEntryPos(_pDesc); } -void FuncPage::SetFunction(USHORT nFunc) +void FuncPage::SetFunction(sal_uInt16 nFunc) { aLbFunction.SelectEntryPos(nFunc); } @@ -229,17 +229,17 @@ void FuncPage::SetFocus() aLbFunction.GrabFocus(); } -USHORT FuncPage::GetCategory() +sal_uInt16 FuncPage::GetCategory() { return aLbCategory.GetSelectEntryPos(); } -USHORT FuncPage::GetFunction() +sal_uInt16 FuncPage::GetFunction() { return aLbFunction.GetSelectEntryPos(); } -USHORT FuncPage::GetFunctionEntryCount() +sal_uInt16 FuncPage::GetFunctionEntryCount() { return aLbFunction.GetSelectEntryCount(); } @@ -248,7 +248,7 @@ String FuncPage::GetSelFunctionName() const { return aLbFunction.GetSelectEntry(); } -const IFunctionDescription* FuncPage::GetFuncDesc( USHORT nPos ) const +const IFunctionDescription* FuncPage::GetFuncDesc( sal_uInt16 nPos ) const { // nicht schoen, aber hoffentlich selten return (const IFunctionDescription*) aLbFunction.GetEntryData(nPos); diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx index 225114ff00aa..cce9a76f324c 100644 --- a/formula/source/ui/dlg/funcpage.hxx +++ b/formula/source/ui/dlg/funcpage.hxx @@ -99,15 +99,15 @@ public: FuncPage( Window* pParent,const IFunctionManager* _pFunctionManager); - void SetCategory(USHORT nCat); - void SetFunction(USHORT nFunc); + void SetCategory(sal_uInt16 nCat); + void SetFunction(sal_uInt16 nFunc); void SetFocus(); - USHORT GetCategory(); - USHORT GetFunction(); - USHORT GetFunctionEntryCount(); + sal_uInt16 GetCategory(); + sal_uInt16 GetFunction(); + sal_uInt16 GetFunctionEntryCount(); - USHORT GetFuncPos(const IFunctionDescription* _pDesc); - const IFunctionDescription* GetFuncDesc( USHORT nPos ) const; + sal_uInt16 GetFuncPos(const IFunctionDescription* _pDesc); + const IFunctionDescription* GetFuncDesc( sal_uInt16 nPos ) const; String GetSelFunctionName() const; void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index c4e28b3da8f1..b1427f067c9d 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -49,7 +49,7 @@ namespace formula ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) { Font aFnt( GetFont() ); - aFnt.SetTransparent( TRUE ); + aFnt.SetTransparent( sal_True ); aFnt.SetWeight( WEIGHT_LIGHT ); if ( pParent->IsBackground() ) { @@ -110,7 +110,7 @@ ArgEdit::ArgEdit( Window* pParent, const ResId& rResId ) //---------------------------------------------------------------------------- void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, - ScrollBar& rArgSlider, USHORT nArgCount ) + ScrollBar& rArgSlider, sal_uInt16 nArgCount ) { pEdPrev = pPrevEdit; pEdNext = pNextEdit; @@ -125,8 +125,8 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) { KeyCode aCode = rKEvt.GetKeyCode(); - BOOL bUp = (aCode.GetCode() == KEY_UP); - BOOL bDown = (aCode.GetCode() == KEY_DOWN); + sal_Bool bUp = (aCode.GetCode() == KEY_UP); + sal_Bool bDown = (aCode.GetCode() == KEY_DOWN); ArgEdit* pEd = NULL; if ( pSlider @@ -136,8 +136,8 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) if ( nArgs > 1 ) { long nThumb = pSlider->GetThumbPos(); - BOOL bDoScroll = FALSE; - BOOL bChangeFocus = FALSE; + sal_Bool bDoScroll = sal_False; + sal_Bool bChangeFocus = sal_False; if ( bDown ) { @@ -151,13 +151,13 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) else { pEd = pEdNext; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } else if ( pEdNext ) { pEd = pEdNext; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } else // if ( bUp ) @@ -172,13 +172,13 @@ void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt ) else { pEd = pEdPrev; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } else if ( pEdPrev ) { pEd = pEdPrev; - bChangeFocus = TRUE; + bChangeFocus = sal_True; } } @@ -743,7 +743,7 @@ EditBox::EditBox( Window* pParent,WinBits nWinStyle) #************************************************************************/ EditBox::EditBox( Window* pParent, const ResId& rResId ) :Control(pParent,rResId), - bMouseFlag(FALSE) + bMouseFlag(sal_False) { WinBits nStyle=GetStyle(); SetStyle( nStyle| WB_DIALOGCONTROL); @@ -849,15 +849,15 @@ void EditBox::GetFocus() #************************************************************************/ long EditBox::PreNotify( NotifyEvent& rNEvt ) { - long nResult=TRUE; + long nResult=sal_True; if(pMEdit==NULL) return nResult; - USHORT nSwitch=rNEvt.GetType(); + sal_uInt16 nSwitch=rNEvt.GetType(); if(nSwitch==EVENT_KEYINPUT)// || nSwitch==EVENT_KEYUP) { const KeyCode& aKeyCode=rNEvt.GetKeyEvent()->GetKeyCode(); - USHORT nKey=aKeyCode.GetCode(); + sal_uInt16 nKey=aKeyCode.GetCode(); if( (nKey==KEY_RETURN && !aKeyCode.IsShift()) || nKey==KEY_TAB ) { nResult=GetParent()->Notify(rNEvt); @@ -875,7 +875,7 @@ long EditBox::PreNotify( NotifyEvent& rNEvt ) if(nSwitch==EVENT_MOUSEBUTTONDOWN || nSwitch==EVENT_MOUSEBUTTONUP) { - bMouseFlag=TRUE; + bMouseFlag=sal_True; Application::PostUserEvent( LINK( this, EditBox, ChangedHdl ) ); } } @@ -930,7 +930,7 @@ void EditBox::UpdateOldSel() RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResId& rResId ) : Edit( _pParent, rResId ), pAnyRefDlg( pParent ), - bSilentFocus( FALSE ) + bSilentFocus( sal_False ) { aTimer.SetTimeoutHdl( LINK( this, RefEdit, UpdateHdl ) ); aTimer.SetTimeout( SC_ENABLE_TIME ); @@ -939,7 +939,7 @@ RefEdit::RefEdit( Window* _pParent,IControlReferenceHandler* pParent, const ResI RefEdit::RefEdit( Window* pParent, const ResId& rResId ) : Edit( pParent, rResId ), pAnyRefDlg( NULL ), - bSilentFocus( FALSE ) + bSilentFocus( sal_False ) { } @@ -967,9 +967,9 @@ void RefEdit::StartUpdateData() void RefEdit::SilentGrabFocus() { - bSilentFocus = TRUE; + bSilentFocus = sal_True; GrabFocus(); - bSilentFocus = FALSE; + bSilentFocus = sal_False; } void RefEdit::SetRefDialog( IControlReferenceHandler* pDlg ) diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 7263236b30b1..3a21a99b0da7 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -79,7 +79,7 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): aSlider ( this, ModuleRes( WND_SLIDER ) ), m_sOptional ( ModuleRes( STR_OPTIONAL ) ), m_sRequired ( ModuleRes( STR_REQUIRED ) ), - bRefMode (FALSE) + bRefMode (sal_False) { Image aFxHC( ModuleRes( IMG_FX_H ) ); FreeResource(); @@ -106,13 +106,13 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): ClearAll(); } -void ParaWin::UpdateArgDesc( USHORT nArg ) +void ParaWin::UpdateArgDesc( sal_uInt16 nArg ) { if (nArg==NOT_FOUND) return; if ( nArgs > 4 ) - nArg = sal::static_int_cast<USHORT>( nArg + GetSliderPos() ); - //@ nArg += (USHORT)aSlider.GetThumbPos(); + nArg = sal::static_int_cast<sal_uInt16>( nArg + GetSliderPos() ); + //@ nArg += (sal_uInt16)aSlider.GetThumbPos(); if ( (nArgs > 0) && (nArg<nArgs) ) { @@ -124,7 +124,7 @@ void ParaWin::UpdateArgDesc( USHORT nArg ) if ( nArgs < VAR_ARGS ) { - USHORT nRealArg = (aVisibleArgMapping.size() < nArg) ? aVisibleArgMapping[nArg] : nArg; + sal_uInt16 nRealArg = (aVisibleArgMapping.size() < nArg) ? aVisibleArgMapping[nArg] : nArg; aArgDesc = pFuncDesc->getParameterDescription(nRealArg); aArgName = pFuncDesc->getParameterName(nRealArg); aArgName += ' '; @@ -132,9 +132,9 @@ void ParaWin::UpdateArgDesc( USHORT nArg ) } else { - USHORT nFix = nArgs - VAR_ARGS; - USHORT nPos = ( nArg < nFix ? nArg : nFix ); - USHORT nRealArg = (nPos < aVisibleArgMapping.size() ? + sal_uInt16 nFix = nArgs - VAR_ARGS; + sal_uInt16 nPos = ( nArg < nFix ? nArg : nFix ); + sal_uInt16 nRealArg = (nPos < aVisibleArgMapping.size() ? aVisibleArgMapping[nPos] : aVisibleArgMapping.back()); aArgDesc = pFuncDesc->getParameterDescription(nRealArg); aArgName = pFuncDesc->getParameterName(nRealArg); @@ -150,14 +150,14 @@ void ParaWin::UpdateArgDesc( USHORT nArg ) } } -void ParaWin::UpdateArgInput( USHORT nOffset, USHORT i ) +void ParaWin::UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ) { - USHORT nArg = nOffset + i; + sal_uInt16 nArg = nOffset + i; if ( nArgs < VAR_ARGS) { if(nArg<nArgs) { - USHORT nRealArg = aVisibleArgMapping[nArg]; + sal_uInt16 nRealArg = aVisibleArgMapping[nArg]; SetArgNameFont (i,(pFuncDesc->isParameterOptional(nRealArg)) ? aFntLight : aFntBold ); SetArgName (i,pFuncDesc->getParameterName(nRealArg)); @@ -165,9 +165,9 @@ void ParaWin::UpdateArgInput( USHORT nOffset, USHORT i ) } else { - USHORT nFix = nArgs - VAR_ARGS; - USHORT nPos = ( nArg < nFix ? nArg : nFix ); - USHORT nRealArg = (nPos < aVisibleArgMapping.size() ? + sal_uInt16 nFix = nArgs - VAR_ARGS; + sal_uInt16 nPos = ( nArg < nFix ? nArg : nFix ); + sal_uInt16 nRealArg = (nPos < aVisibleArgMapping.size() ? aVisibleArgMapping[nPos] : aVisibleArgMapping.back()); SetArgNameFont( i, (nArg > nFix || pFuncDesc->isParameterOptional(nRealArg)) ? @@ -197,12 +197,12 @@ ParaWin::~ParaWin() aBtnFx4.SetGetFocusHdl( aEmptyLink ); } -USHORT ParaWin::GetActiveLine() +sal_uInt16 ParaWin::GetActiveLine() { return nActiveLine; } -void ParaWin::SetActiveLine(USHORT no) +void ParaWin::SetActiveLine(sal_uInt16 no) { if(no<nArgs) { @@ -212,10 +212,10 @@ void ParaWin::SetActiveLine(USHORT no) if(nNewEdPos<0 || nNewEdPos>3) { nOffset+=nNewEdPos; - SetSliderPos((USHORT) nOffset); + SetSliderPos((sal_uInt16) nOffset); nOffset=GetSliderPos(); } - nEdFocus=no-(USHORT)nOffset; + nEdFocus=no-(sal_uInt16)nOffset; UpdateArgDesc( nEdFocus ); } } @@ -233,7 +233,7 @@ RefEdit* ParaWin::GetActiveEdit() } -String ParaWin::GetArgument(USHORT no) +String ParaWin::GetArgument(sal_uInt16 no) { String aStr; if(no<aParaArray.size()) @@ -256,7 +256,7 @@ String ParaWin::GetActiveArgName() } -void ParaWin::SetArgument(USHORT no, const String& aString) +void ParaWin::SetArgument(sal_uInt16 no, const String& aString) { if(no<aParaArray.size()) { @@ -334,32 +334,32 @@ void ParaWin::SetEditDesc(const String& aText) aFtEditDesc.SetText(aText); } -void ParaWin::SetArgName(USHORT no,const String& aText) +void ParaWin::SetArgName(sal_uInt16 no,const String& aText) { aArgInput[no].SetArgName(aText); } -void ParaWin::SetArgNameFont(USHORT no,const Font& aFont) +void ParaWin::SetArgNameFont(sal_uInt16 no,const Font& aFont) { aArgInput[no].SetArgNameFont(aFont); } -void ParaWin::SetArgVal(USHORT no,const String& aText) +void ParaWin::SetArgVal(sal_uInt16 no,const String& aText) { aArgInput[no].SetArgVal(aText); } -void ParaWin::HideParaLine(USHORT no) +void ParaWin::HideParaLine(sal_uInt16 no) { aArgInput[no].Hide(); } -void ParaWin::ShowParaLine(USHORT no) +void ParaWin::ShowParaLine(sal_uInt16 no) { aArgInput[no].Show(); } -void ParaWin::SetEdFocus(USHORT no) +void ParaWin::SetEdFocus(sal_uInt16 no) { UpdateArgDesc(no); if(no<4 && no<aParaArray.size()) @@ -367,7 +367,7 @@ void ParaWin::SetEdFocus(USHORT no) } -void ParaWin::InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx, +void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, ArgEdit& rEdArg, RefButton& rRefBtn) { @@ -390,7 +390,7 @@ void ParaWin::ClearAll() SetArgumentOffset(0); } -void ParaWin::SetArgumentOffset(USHORT nOffset) +void ParaWin::SetArgumentOffset(sal_uInt16 nOffset) { DelParaArray(); aSlider.SetThumbPos(0); @@ -430,8 +430,8 @@ void ParaWin::SetArgumentOffset(USHORT nOffset) void ParaWin::UpdateParas() { - USHORT i; - USHORT nOffset = GetSliderPos(); + sal_uInt16 i; + sal_uInt16 nOffset = GetSliderPos(); if ( nArgs > 0 ) { @@ -446,19 +446,19 @@ void ParaWin::UpdateParas() } -USHORT ParaWin::GetSliderPos() +sal_uInt16 ParaWin::GetSliderPos() { - return (USHORT) aSlider.GetThumbPos(); + return (sal_uInt16) aSlider.GetThumbPos(); } -void ParaWin::SetSliderPos(USHORT nSliderPos) +void ParaWin::SetSliderPos(sal_uInt16 nSliderPos) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); if(aSlider.IsVisible() && nOffset!=nSliderPos) { aSlider.SetThumbPos(nSliderPos); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) { UpdateArgInput( nSliderPos, i ); } @@ -467,9 +467,9 @@ void ParaWin::SetSliderPos(USHORT nSliderPos) void ParaWin::SliderMoved() { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); - for ( USHORT i=0; i<4; i++ ) + for ( sal_uInt16 i=0; i<4; i++ ) { UpdateArgInput( nOffset, i ); } @@ -496,9 +496,9 @@ void ParaWin::FxClick() IMPL_LINK( ParaWin, GetFxHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { @@ -518,9 +518,9 @@ IMPL_LINK( ParaWin, GetFxHdl, ArgInput*, pPtr ) IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { @@ -542,9 +542,9 @@ IMPL_LINK( ParaWin, GetFxFocusHdl, ArgInput*, pPtr ) IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { @@ -574,9 +574,9 @@ IMPL_LINK( ParaWin, ScrollHdl, ScrollBar*, EMPTYARG ) IMPL_LINK( ParaWin, ModifyHdl, ArgInput*, pPtr ) { - USHORT nOffset = GetSliderPos(); + sal_uInt16 nOffset = GetSliderPos(); nEdFocus=NOT_FOUND; - for ( USHORT nPos=0; nPos<5;nPos++) + for ( sal_uInt16 nPos=0; nPos<5;nPos++) { if(pPtr == &aArgInput[nPos]) { diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index effaa3abb9c0..55c2bd7204b8 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -57,10 +57,10 @@ private: Link aFxLink; Link aArgModifiedLink; - ::std::vector<USHORT> aVisibleArgMapping; + ::std::vector<sal_uInt16> aVisibleArgMapping; const IFunctionDescription* pFuncDesc; IControlReferenceHandler* pMyParent; - USHORT nArgs; // unsuppressed arguments + sal_uInt16 nArgs; // unsuppressed arguments Font aFntBold; Font aFntLight; @@ -91,10 +91,10 @@ private: ScrollBar aSlider; String m_sOptional; String m_sRequired; - BOOL bRefMode; + sal_Bool bRefMode; - USHORT nEdFocus; - USHORT nActiveLine; + sal_uInt16 nEdFocus; + sal_uInt16 nActiveLine; ArgInput aArgInput[4]; String aDefaultString; @@ -113,7 +113,7 @@ protected: virtual void ArgumentModified(); virtual void FxClick(); - void InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx, + void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, ArgEdit& rEdArg, RefButton& rRefBtn); void DelParaArray(); @@ -121,40 +121,40 @@ protected: void SetArgumentText(const String& aText); - void SetArgName (USHORT no,const String &aArg); - void SetArgNameFont (USHORT no,const Font&); - void SetArgVal (USHORT no,const String &aArg); + void SetArgName (sal_uInt16 no,const String &aArg); + void SetArgNameFont (sal_uInt16 no,const Font&); + void SetArgVal (sal_uInt16 no,const String &aArg); - void HideParaLine(USHORT no); - void ShowParaLine(USHORT no); - void UpdateArgDesc( USHORT nArg ); - void UpdateArgInput( USHORT nOffset, USHORT i ); + void HideParaLine(sal_uInt16 no); + void ShowParaLine(sal_uInt16 no); + void UpdateArgDesc( sal_uInt16 nArg ); + void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ); public: ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos); ~ParaWin(); void SetFunctionDesc(const IFunctionDescription* pFDesc); - void SetArgumentOffset(USHORT nOffset); + void SetArgumentOffset(sal_uInt16 nOffset); void SetEditDesc(const String& aText); void UpdateParas(); void ClearAll(); - BOOL IsRefMode() {return bRefMode;} - void SetRefMode(BOOL bFlag) {bRefMode=bFlag;} + sal_Bool IsRefMode() {return bRefMode;} + void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;} - USHORT GetActiveLine(); - void SetActiveLine(USHORT no); + sal_uInt16 GetActiveLine(); + void SetActiveLine(sal_uInt16 no); RefEdit* GetActiveEdit(); String GetActiveArgName(); - String GetArgument(USHORT no); - void SetArgument(USHORT no, const String& aString); + String GetArgument(sal_uInt16 no); + void SetArgument(sal_uInt16 no, const String& aString); void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont); - void SetEdFocus(USHORT nEditLine); //Sichtbare Editzeilen - USHORT GetSliderPos(); - void SetSliderPos(USHORT nSliderPos); + void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen + sal_uInt16 GetSliderPos(); + void SetSliderPos(sal_uInt16 nSliderPos); void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; } const Link& GetScrollHdl() const { return aScrollLink; } diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index 3f86b4ba21eb..89d012d7ba88 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -49,7 +49,7 @@ namespace formula StructListBox::StructListBox(Window* pParent, const ResId& rResId ): SvTreeListBox(pParent,rResId ) { - bActiveFlag=FALSE; + bActiveFlag=sal_False; Font aFont( GetFont() ); Size aSize = aFont.GetSize(); @@ -61,9 +61,9 @@ StructListBox::StructListBox(Window* pParent, const ResId& rResId ): SvLBoxEntry* StructListBox::InsertStaticEntry( const XubString& rText, const Image& rEntryImg, const Image& rEntryImgHC, - SvLBoxEntry* pParent, ULONG nPos, IFormulaToken* pToken ) + SvLBoxEntry* pParent, sal_uLong nPos, IFormulaToken* pToken ) { - SvLBoxEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, FALSE, nPos, pToken ); + SvLBoxEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, sal_False, nPos, pToken ); SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) ); DBG_ASSERT( pBmpItem, "StructListBox::InsertStaticEntry - missing item" ); pBmpItem->SetBitmap1( rEntryImgHC, BMP_COLOR_HIGHCONTRAST ); @@ -71,31 +71,31 @@ SvLBoxEntry* StructListBox::InsertStaticEntry( return pEntry; } -void StructListBox::SetActiveFlag(BOOL bFlag) +void StructListBox::SetActiveFlag(sal_Bool bFlag) { bActiveFlag=bFlag; } -BOOL StructListBox::GetActiveFlag() +sal_Bool StructListBox::GetActiveFlag() { return bActiveFlag; } void StructListBox::MouseButtonDown( const MouseEvent& rMEvt ) { - bActiveFlag=TRUE; + bActiveFlag=sal_True; SvTreeListBox::MouseButtonDown(rMEvt); } void StructListBox::GetFocus() { - bActiveFlag=TRUE; + bActiveFlag=sal_True; SvTreeListBox::GetFocus(); } void StructListBox::LoseFocus() { - bActiveFlag=FALSE; + bActiveFlag=sal_False; SvTreeListBox::LoseFocus(); } @@ -128,20 +128,20 @@ StructPage::StructPage(Window* pParent): void StructPage::ClearStruct() { - aTlbStruct.SetActiveFlag(FALSE); + aTlbStruct.SetActiveFlag(sal_False); aTlbStruct.Clear(); } SvLBoxEntry* StructPage::InsertEntry( const XubString& rText, SvLBoxEntry* pParent, - USHORT nFlag,ULONG nPos,IFormulaToken* pIFormulaToken) + sal_uInt16 nFlag,sal_uLong nPos,IFormulaToken* pIFormulaToken) { - aTlbStruct.SetActiveFlag( FALSE ); + aTlbStruct.SetActiveFlag( sal_False ); SvLBoxEntry* pEntry = NULL; switch( nFlag ) { case STRUCT_FOLDER: - pEntry = aTlbStruct.InsertEntry( rText, pParent, FALSE, nPos, pIFormulaToken ); + pEntry = aTlbStruct.InsertEntry( rText, pParent, sal_False, nPos, pIFormulaToken ); break; case STRUCT_END: pEntry = aTlbStruct.InsertStaticEntry( rText, maImgEnd, maImgEndHC, pParent, nPos, pIFormulaToken ); diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index 8e5dff4e6ed9..a060790d08ad 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -49,7 +49,7 @@ class StructListBox : public SvTreeListBox { private: - BOOL bActiveFlag; + sal_Bool bActiveFlag; protected: virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -64,11 +64,11 @@ public: const Image& rEntryImg, const Image& rEntryImgHC, SvLBoxEntry* pParent = NULL, - ULONG nPos = LIST_APPEND, + sal_uLong nPos = LIST_APPEND, IFormulaToken* pToken = NULL ); - void SetActiveFlag(BOOL bFlag=TRUE); - BOOL GetActiveFlag(); + void SetActiveFlag(sal_Bool bFlag=sal_True); + sal_Bool GetActiveFlag(); void GetFocus(); void LoseFocus(); }; @@ -105,7 +105,7 @@ public: void ClearStruct(); virtual SvLBoxEntry* InsertEntry(const XubString& rText, SvLBoxEntry* pParent, - USHORT nFlag,ULONG nPos=0,IFormulaToken* pScToken=NULL); + sal_uInt16 nFlag,sal_uLong nPos=0,IFormulaToken* pScToken=NULL); virtual String GetEntryText(SvLBoxEntry* pEntry) const; virtual SvLBoxEntry* GetParent(SvLBoxEntry* pEntry) const; diff --git a/formula/source/ui/inc/ModuleHelper.hxx b/formula/source/ui/inc/ModuleHelper.hxx index 23079b1e6705..c508bd8b6658 100644 --- a/formula/source/ui/inc/ModuleHelper.hxx +++ b/formula/source/ui/inc/ModuleHelper.hxx @@ -88,7 +88,7 @@ namespace formula class FORMULA_DLLPUBLIC ModuleRes : public ::ResId { public: - ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { } + ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } }; //......................................................................... } // namespace formula |