summaryrefslogtreecommitdiff
path: root/formula/source/ui/dlg/formula.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'formula/source/ui/dlg/formula.cxx')
-rw-r--r--formula/source/ui/dlg/formula.cxx365
1 files changed, 172 insertions, 193 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d8e7fa9f5b..f50feca7c9 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -100,9 +100,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);
@@ -112,39 +112,39 @@ 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);
void PreNotify( NotifyEvent& rNEvt );
RefEdit* GetCurrRefEdit();
- ULONG FindFocusWin(Window *pWin);
+ rtl::OString FindFocusWin(Window *pWin);
const FormulaHelper& GetFormulaHelper() const;
uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const;
@@ -188,7 +188,6 @@ namespace formula
FixedInfo aFtFuncDesc;
FixedText aFtEditName;
- //FixedInfo aFtEditDesc;
FixedText aFtResult;
ValWnd aWndResult;
@@ -215,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;
@@ -227,20 +226,17 @@ namespace formula
FormulaHelper
m_aFormulaHelper;
- SmartId m_aSmartEditHelpId;
-
- ULONG nOldHelp;
- ULONG nOldUnique;
- ULONG nActivWinId;
- BOOL bIsShutDown;
-
+ rtl::OString m_aEditHelpId;
+ rtl::OString aOldHelp;
+ rtl::OString aOldUnique;
+ rtl::OString aActivWinId;
+ sal_Bool bIsShutDown;
Font aFntBold;
Font aFntLight;
- USHORT nEdFocus;
- // Selection theCurSel;
- BOOL bEditFlag;
+ sal_uInt16 nEdFocus;
+ sal_Bool bEditFlag;
const IFunctionDescription* pFuncDesc;
xub_StrLen nArgs;
::std::vector< ::rtl::OUString > m_aArguments;
@@ -272,14 +268,12 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
aFtHeadLine ( pParent, ModuleRes( FT_HEADLINE ) ),
aFtFuncName ( pParent, ModuleRes( FT_FUNCNAME ) ),
aFtFuncDesc ( pParent, ModuleRes( FT_FUNCDESC ) ),
- //
aFtEditName ( pParent, ModuleRes( FT_EDITNAME ) ),
aFtResult ( pParent, ModuleRes( FT_RESULT ) ),
aWndResult ( pParent, ModuleRes( WND_RESULT ) ),
aFtFormula ( pParent, ModuleRes( FT_FORMULA ) ),
aMEFormula ( pParent, ModuleRes( ED_FORMULA ) ),
- //
aBtnMatrix ( pParent, ModuleRes( BTN_MATRIX ) ),
aBtnHelp ( pParent, ModuleRes( BTN_HELP ) ),
aBtnCancel ( pParent, ModuleRes( BTN_CANCEL ) ),
@@ -290,19 +284,15 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
aRefBtn ( pParent, ModuleRes( RB_REF),&aEdRef,_pDlg ),
aFtFormResult ( pParent, ModuleRes( FT_FORMULA_RESULT)),
aWndFormResult ( pParent, ModuleRes( WND_FORMULA_RESULT)),
- //
pTheRefEdit (NULL),
pMEdit (NULL),
- bUserMatrixFlag (FALSE),
- //
+ bUserMatrixFlag (sal_False),
aTitle1 ( ModuleRes( STR_TITLE1 ) ), // local resource
aTitle2 ( ModuleRes( STR_TITLE2 ) ), // local resource
aTxtEnd ( ModuleRes( STR_END ) ), // local resource
aTxtOk ( aBtnEnd.GetText() ),
m_aFormulaHelper(_pFunctionMgr),
- //
- nActivWinId (0),
- bIsShutDown (FALSE),
+ bIsShutDown (sal_False),
nEdFocus (0),
pFuncDesc (NULL),
nArgs (0)
@@ -315,11 +305,16 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
aRefBtn.Hide();
pMEdit = aMEFormula.GetEdit();
- m_aSmartEditHelpId = pMEdit->GetSmartHelpId();
- pMEdit->SetSmartUniqueId(m_aSmartEditHelpId);
-
- bEditFlag=FALSE;
- bStructUpdate=TRUE;
+ //IAccessibility2 Implementation 2009-----
+ aMEFormula.SetAccessibleName(aFtFormula.GetText());
+ if (pMEdit)
+ pMEdit->SetAccessibleName(aFtFormula.GetText());
+ //-----IAccessibility2 Implementation 2009
+ m_aEditHelpId = pMEdit->GetHelpId();
+ pMEdit->SetUniqueId( m_aEditHelpId );
+
+ bEditFlag=sal_False;
+ bStructUpdate=sal_True;
Point aPos=aGEdit.GetPosPixel();
pParaWin->SetPosPixel(aPos);
pParaWin->SetArgModifiedHdl(LINK( this, FormulaDlg_Impl, ModifyHdl ) );
@@ -332,8 +327,8 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
aTabCtrl.SetTabPage( TP_FUNCTION, pFuncPage);
aTabCtrl.SetTabPage( TP_STRUCT, pStructPage);
- nOldHelp = pParent->GetHelpId(); // HelpId from resource always for "Page 1"
- nOldUnique = pParent->GetUniqueId();
+ aOldHelp = pParent->GetHelpId(); // HelpId from resource always for "Page 1"
+ aOldUnique = pParent->GetUniqueId();
aFtResult.Show( _bSupportResult );
aWndResult.Show( _bSupportResult );
@@ -358,7 +353,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 );
@@ -377,7 +372,7 @@ FormulaDlg_Impl::~FormulaDlg_Impl()
aTimer.SetTimeoutHdl(Link());
aTimer.Stop();
}// if(aTimer.IsActive())
- bIsShutDown=TRUE;// Set it in order to PreNotify not to save GetFocus.
+ bIsShutDown=sal_True;// Set it in order to PreNotify not to save GetFocus.
FormEditData* pData = m_pHelper->getFormEditData();
if (pData) // it won't be destroyed over Close;
{
@@ -385,9 +380,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());
}
@@ -403,33 +398,33 @@ 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();
if(pWin!=NULL)
{
- nActivWinId = pWin->GetUniqueId();
- if(nActivWinId==0)
+ aActivWinId = pWin->GetUniqueId();
+ if(aActivWinId.getLength()==0)
{
Window* pParent=pWin->GetParent();
while(pParent!=NULL)
{
- nActivWinId=pParent->GetUniqueId();
+ aActivWinId=pParent->GetUniqueId();
- if(nActivWinId!=0) break;
+ if(aActivWinId.getLength()!=0) break;
pParent=pParent->GetParent();
}
}
- if(nActivWinId!=0)
+ if(aActivWinId.getLength())
{
FormEditData* pData = m_pHelper->getFormEditData();
if (pData && !aTimer.IsActive()) // it won't be destroyed over Close;
{
- pData->SetUniqueId(nActivWinId);
+ pData->SetUniqueId(aActivWinId);
}
}
}
@@ -487,7 +482,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
xub_StrLen nFuncPos=STRING_NOTFOUND; //@ Testwise
xub_StrLen nPrevFuncPos=1;
short nBracketCount=0;
- BOOL bFlag=FALSE;
+ sal_Bool bFlag=sal_False;
String aFormString = pMEdit->GetText();
m_aFormulaHelper.GetCharClass()->toUpper( aFormString );
@@ -543,12 +538,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;
@@ -581,16 +576,16 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
}
catch(const uno::Exception& )
{
- DBG_ERROR("Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
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 )
{
@@ -601,7 +596,7 @@ BOOL FormulaDlg_Impl::CalcValue( const String& rStrExp, String& rStrResult )
bResult = m_pHelper->calculateValue(rStrExp,rStrResult);
}
else
- bResult = FALSE;
+ bResult = sal_False;
}
return bResult;
@@ -625,9 +620,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)
@@ -658,7 +653,7 @@ BOOL FormulaDlg_Impl::CalcStruct( const String& rStrExp)
UpdateTokenArray(rStrExp);
}
else
- bResult = FALSE;
+ bResult = sal_False;
}
return bResult;
}
@@ -766,13 +761,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();
@@ -803,9 +798,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);
}
@@ -819,16 +814,16 @@ void FormulaDlg_Impl::FillListboxes()
// ResizeArgArr is now already in UpdateFunctionDesc
- m_pHelper->setDispatcherLock( TRUE);// Activate Modal-Mode
+ m_pHelper->setDispatcherLock( sal_True );// Activate Modal-Mode
aNewTitle = aTitle1;
// HelpId for 1. page is the one from the resource
- m_pParent->SetHelpId( nOldHelp );
- m_pParent->SetUniqueId( nOldUnique );
+ m_pParent->SetHelpId( aOldHelp );
+ m_pParent->SetUniqueId( aOldUnique );
}
// -----------------------------------------------------------------------------
-void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev)
+void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
{
// Switch between the "Pages"
FormEditData* pData = m_pHelper->getFormEditData();
@@ -846,9 +841,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);
@@ -861,9 +856,9 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev)
aFtEditName.SetText( pFuncDesc->getFunctionName() );
aFtEditName.Show();
pParaWin->Show();
- const long nHelpId = pFuncDesc->getHelpId();
- if ( nHelpId )
- pMEdit->SetSmartHelpId(SmartId(nHelpId));
+ const rtl::OString aHelpId = pFuncDesc->getHelpId();
+ if ( aHelpId.getLength() )
+ pMEdit->SetHelpId(aHelpId);
}
xub_StrLen nOldStart, nOldEnd;
@@ -883,26 +878,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();
// Concatenate the Edit's for Focus-Control
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 );
}
@@ -913,21 +908,20 @@ void FormulaDlg_Impl::FillControls(BOOL &rbNext, BOOL &rbPrev)
pParaWin->SetActiveLine(nActiv);
}
- //pParaWin->SetEdFocus( nEdFocus );
UpdateValues();
}
else
{
aFtEditName.SetText(String());
- pMEdit->SetSmartHelpId(m_aSmartEditHelpId);
+ pMEdit->SetHelpId( m_aEditHelpId );
}
// 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 );
}
// -----------------------------------------------------------------------------
@@ -945,7 +939,7 @@ void FormulaDlg_Impl::ClearAllParas()
aFtEditName.Hide();
pParaWin->Hide();
- aBtnForward.Enable(TRUE); //@new
+ aBtnForward.Enable(sal_True); //@new
aFtHeadLine.Show();
aFtFuncName.Show();
aFtFuncDesc.Show();
@@ -971,12 +965,12 @@ String FormulaDlg_Impl::RepairFormula(const String& aFormula)
}
catch(const uno::Exception& )
{
- DBG_ERROR("Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return aResult;
}
-void FormulaDlg_Impl::DoEnter(BOOL bOk)
+void FormulaDlg_Impl::DoEnter(sal_Bool bOk)
{
// Accept input to the document or cancel
if ( bOk)
@@ -1003,31 +997,29 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn )
{
if ( pBtn == &aBtnCancel )
{
- DoEnter(FALSE); // closes the Dialog
+ DoEnter(sal_False); // closes the Dialog
}
else if ( pBtn == &aBtnEnd )
{
- DoEnter(TRUE); // closes the Dialog
+ DoEnter(sal_True); // closes the Dialog
}
else if ( pBtn == &aBtnForward )
{
- //@pMEdit->GrabFocus(); // In order to show the selection too
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 );
}
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();
}
@@ -1061,11 +1053,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 );
@@ -1086,7 +1078,6 @@ void FormulaDlg_Impl::UpdateFunctionDesc()
if ( !m_aArguments.empty() ) // still arguments there?
aSig = pDesc->getFormula( m_aArguments ); // for input line
- //@ m_pHelper->setCurrentFormula( aSig );
}
}
else
@@ -1094,7 +1085,6 @@ void FormulaDlg_Impl::UpdateFunctionDesc()
aFtFuncName.SetText( String() );
aFtFuncDesc.SetText( String() );
- //ResizeArgArr( NULL );
m_pHelper->setCurrentFormula( String() );
}
}
@@ -1104,7 +1094,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);
@@ -1130,7 +1120,7 @@ IMPL_LINK( FormulaDlg_Impl, DblClkHdl, FuncPage*, EMPTYARG )
}
pParaWin->SetEdFocus(0);
- aBtnForward.Enable(FALSE); //@New
+ aBtnForward.Enable(sal_False); //@New
return 0;
}
@@ -1184,11 +1174,9 @@ 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_aFormulaHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd);
+ bFound = m_aFormulaHelper.GetNextFunc( aFormula, sal_False, nNextFStart, &nNextFEnd);
if ( bFound )
{
xub_StrLen PrivStart, PrivEnd;
@@ -1201,7 +1189,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)
@@ -1221,18 +1209,16 @@ 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_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_aFormulaHelper.GetNextFunc( aFormula, sal_True, nNextFStart, &nNextFEnd);
}
if ( bFound )
@@ -1259,20 +1245,19 @@ void FormulaDlg_Impl::EditFuncParas(xub_StrLen nEditPos)
sal_Int32 nArgPos=m_aFormulaHelper.GetArgStart( aFormula, nFStart, 0 );
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;
}
@@ -1288,11 +1273,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 )
@@ -1301,7 +1286,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)
@@ -1321,14 +1306,14 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
{
if(pPtr==pParaWin)
{
- aBtnForward.Enable(TRUE); //@ In order to be able to input another function.
+ aBtnForward.Enable(sal_True); //@ In order to be able to input another function.
aTabCtrl.SetCurPageId(TP_FUNCTION);
String aUndoStr = m_pHelper->getCurrentFormula(); // it will be added before a ";"
FormEditData* pData = m_pHelper->getFormEditData();
if (!pData) return 0;
- USHORT nArgNo = pParaWin->GetActiveLine();
+ sal_uInt16 nArgNo = pParaWin->GetActiveLine();
nEdFocus=nArgNo;
SaveArg(nArgNo);
@@ -1341,12 +1326,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(); //There Parawin is not visible anymore
}
return 0;
@@ -1371,7 +1356,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();
@@ -1418,7 +1403,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
{
@@ -1426,7 +1411,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;
}
@@ -1436,7 +1421,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();
@@ -1479,7 +1464,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
@@ -1495,7 +1480,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;
}
@@ -1514,16 +1499,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();
}
@@ -1543,7 +1528,6 @@ void FormulaDlg_Impl::UpdateSelection()
aRefBtn.Show( pButton != NULL );
- //m_pHelper->RefInputStart( &aEdRef, pButton ? &aRefBtn : NULL );
::std::pair<RefButton*,RefEdit*> aPair;
aPair.first = pButton ? &aRefBtn : NULL;
aPair.second = &aEdRef;
@@ -1569,7 +1553,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() )
@@ -1584,7 +1568,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;
@@ -1609,15 +1593,11 @@ void FormulaDlg_Impl::Update()
else
aTabCtrl.SetCurPageId(TP_STRUCT);
aBtnMatrix.Check(pData->GetMatrixFlag());
- /*aTimer.SetTimeout(200);
- aTimer.SetTimeoutHdl(LINK( this, FormulaDlg_Impl, UpdateFocusHdl));
- aTimer.Start();*/
}
void FormulaDlg_Impl::Update(const String& _sExp)
{
CalcStruct(_sExp);
FillDialog();
- //aBtnForward.Enable(TRUE); //@New
FuncSelHdl(NULL);
}
void FormulaDlg_Impl::SetMeText(const String& _sText)
@@ -1627,7 +1607,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)
@@ -1646,11 +1626,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-Formula ?
+ sal_Bool bMatrix = nLen > 3 // Matrix-Formula
&& aFormula.GetChar(0) == '{'
&& aFormula.GetChar(1) == '='
&& aFormula.GetChar(nLen-1) == '}';
@@ -1665,25 +1645,25 @@ BOOL FormulaDlg_Impl::CheckMatrix(String& aFormula)
aTabCtrl.SetCurPageId(TP_STRUCT);
return bMatrix;
}
-IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, pStruP )
+IMPL_LINK( FormulaDlg_Impl, StructSelHdl, StructPage*, EMPTYARG )
{
- bStructUpdate=FALSE;
- if(pStructPage->IsVisible()) aBtnForward.Enable(FALSE); //@New
+ bStructUpdate=sal_False;
+ if(pStructPage->IsVisible()) aBtnForward.Enable(sal_False); //@New
- 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)
@@ -1691,7 +1671,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)
{
@@ -1722,7 +1702,7 @@ void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection,const String& _
//-------------------------------------
// Manual Update of the results' fields:
//-------------------------------------
- USHORT nPrivActiv = pParaWin->GetActiveLine();
+ sal_uInt16 nPrivActiv = pParaWin->GetActiveLine();
pParaWin->SetArgument(nPrivActiv,aEdRef.GetText());
pParaWin->UpdateParas();
@@ -1730,11 +1710,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();
@@ -1754,20 +1734,20 @@ BOOL FormulaDlg_Impl::UpdateParaWin(Selection& _rSelection)
}
return pTheRefEdit == NULL;
}
-ULONG FormulaDlg_Impl::FindFocusWin(Window *pWin)
+rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin)
{
- ULONG nUniqueId=0;
+ rtl::OString aUniqueId;
if(pWin->HasFocus())
{
- nUniqueId=pWin->GetUniqueId();
- if(nUniqueId==0)
+ aUniqueId=pWin->GetUniqueId();
+ if(aUniqueId.getLength()==0)
{
Window* pParent=pWin->GetParent();
while(pParent!=NULL)
{
- nUniqueId=pParent->GetUniqueId();
+ aUniqueId=pParent->GetUniqueId();
- if(nUniqueId!=0) break;
+ if(aUniqueId.getLength()!=0) break;
pParent=pParent->GetParent();
}
@@ -1775,16 +1755,16 @@ ULONG 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);
- nUniqueId=FindFocusWin(pChild);
- if(nUniqueId>0) break;
+ aUniqueId=FindFocusWin(pChild);
+ if(aUniqueId.getLength()>0) break;
}
}
- return nUniqueId;
+ return aUniqueId;
}
void FormulaDlg_Impl::SetEdSelection()
@@ -1838,7 +1818,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);
}
@@ -1848,7 +1828,7 @@ void FormulaModalDialog::CheckMatrix()
m_pImpl->aBtnMatrix.Check();
}
// -----------------------------------------------------------------------------
-BOOL FormulaModalDialog::CheckMatrix(String& aFormula)
+sal_Bool FormulaModalDialog::CheckMatrix(String& aFormula)
{
return m_pImpl->CheckMatrix(aFormula);
}
@@ -1868,11 +1848,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);
}
@@ -1884,17 +1864,17 @@ 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 );
}
-ULONG FormulaModalDialog::FindFocusWin(Window *pWin)
+rtl::OString FormulaModalDialog::FindFocusWin(Window *pWin)
{
return m_pImpl->FindFocusWin( pWin );
}
-void FormulaModalDialog::SetFocusWin(Window *pWin,ULONG nUniqueId)
+void FormulaModalDialog::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId)
{
if(pWin->GetUniqueId()==nUniqueId)
{
@@ -1902,9 +1882,9 @@ void FormulaModalDialog::SetFocusWin(Window *pWin,ULONG 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);
@@ -1940,7 +1920,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);
}
@@ -1971,7 +1951,7 @@ FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
,_pHelper,_pFunctionMgr,_pDlg))
{
FreeResource();
- if(GetHelpId()==0) //Hack which hides the HelpId for a model Dialog in SfxModelessDialog
+ if(!GetHelpId().getLength()) //Hack which hides the HelpId for a model Dialog in SfxModelessDialog
SetHelpId(GetUniqueId()); //and will be changed in a UniqueId,
//at this point we reverse it.
SetText(m_pImpl->aTitle1);
@@ -1993,7 +1973,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);
}
@@ -2003,7 +1983,7 @@ void FormulaDlg::CheckMatrix()
m_pImpl->aBtnMatrix.Check();
}
// -----------------------------------------------------------------------------
-BOOL FormulaDlg::CheckMatrix(String& aFormula)
+sal_Bool FormulaDlg::CheckMatrix(String& aFormula)
{
return m_pImpl->CheckMatrix(aFormula);
}
@@ -2022,11 +2002,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);
}
@@ -2038,17 +2018,17 @@ 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 );
}
-ULONG FormulaDlg::FindFocusWin(Window *pWin)
+rtl::OString FormulaDlg::FindFocusWin(Window *pWin)
{
return m_pImpl->FindFocusWin( pWin );
}
-void FormulaDlg::SetFocusWin(Window *pWin,ULONG nUniqueId)
+void FormulaDlg::SetFocusWin(Window *pWin,const rtl::OString& nUniqueId)
{
if(pWin->GetUniqueId()==nUniqueId)
{
@@ -2056,9 +2036,9 @@ void FormulaDlg::SetFocusWin(Window *pWin,ULONG 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);
@@ -2093,7 +2073,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);
}
@@ -2119,14 +2099,13 @@ IMPL_LINK( FormulaDlg, UpdateFocusHdl, Timer*, EMPTYARG )
if (pData) // won't be destroyed over Close;
{
m_pImpl->m_pHelper->setReferenceInput(pData);
- ULONG nUniqueId=pData->GetUniqueId();
+ rtl::OString nUniqueId(pData->GetUniqueId());
SetFocusWin(this,nUniqueId);
}
return 0;
}
// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
void FormEditData::SaveValues()
{
FormEditData* pTemp = new FormEditData(*this);
@@ -2144,8 +2123,8 @@ void FormEditData::Reset()
nFuncSel = 0;
nOffset = 0;
nEdFocus = 0;
- bMatrix =FALSE;
- nUniqueId=0;
+ bMatrix =sal_False;
+ aUniqueId=rtl::OString();
aSelection.Min()=0;
aSelection.Max()=0;
aUndoStr.Erase();
@@ -2174,7 +2153,7 @@ const FormEditData& FormEditData::operator=( const FormEditData& r )
nEdFocus = r.nEdFocus;
aUndoStr = r.aUndoStr;
bMatrix = r.bMatrix ;
- nUniqueId = r.nUniqueId;
+ aUniqueId = r.aUniqueId;
aSelection = r.aSelection;
return *this;
}