summaryrefslogtreecommitdiff
path: root/formula/source/ui/dlg
diff options
context:
space:
mode:
Diffstat (limited to 'formula/source/ui/dlg')
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx6
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx54
-rwxr-xr-x[-rw-r--r--]formula/source/ui/dlg/formdlgs.hrc6
-rw-r--r--formula/source/ui/dlg/formdlgs.src88
-rw-r--r--formula/source/ui/dlg/formula.cxx365
-rw-r--r--formula/source/ui/dlg/funcpage.cxx40
-rw-r--r--formula/source/ui/dlg/funcpage.hxx16
-rw-r--r--formula/source/ui/dlg/funcutl.cxx68
-rwxr-xr-x[-rw-r--r--]formula/source/ui/dlg/makefile.mk0
-rw-r--r--formula/source/ui/dlg/parawin.cxx141
-rwxr-xr-x[-rw-r--r--]formula/source/ui/dlg/parawin.hrc3
-rw-r--r--formula/source/ui/dlg/parawin.hxx72
-rw-r--r--formula/source/ui/dlg/parawin.src44
-rw-r--r--formula/source/ui/dlg/structpg.cxx47
-rw-r--r--formula/source/ui/dlg/structpg.hxx13
15 files changed, 422 insertions, 541 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 346f2c7295..758a14b7fc 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -59,7 +59,7 @@ private:
MultiLineEdit* pMEdit;
Link aSelChangedLink;
Selection aOldSel;
- BOOL bMouseFlag;
+ sal_Bool bMouseFlag;
DECL_LINK( ChangedHdl, EditBox* );
protected:
@@ -94,7 +94,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 );
@@ -103,7 +103,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 7da397f8f1..b07d3eecc1 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -48,10 +48,10 @@ 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 long getHelpId() const { return 0; }
+ virtual rtl::OString getHelpId() const { return ""; }
virtual sal_uInt32 getParameterCount() const { return 0; }
virtual ::rtl::OUString getParameterName(sal_uInt32 ) const { return ::rtl::OUString(); }
virtual ::rtl::OUString getParameterDescription(sal_uInt32 ) const { return ::rtl::OUString(); }
@@ -75,14 +75,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, // Input and output
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;
@@ -115,7 +115,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
{
@@ -134,13 +134,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++ )
{
@@ -153,7 +153,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
{
@@ -175,7 +175,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)
{
@@ -185,10 +185,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... ;-)
@@ -200,7 +200,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();
@@ -211,11 +211,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 )
{
@@ -229,7 +229,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--;
}
}
@@ -244,7 +244,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++;
}
}
@@ -269,13 +269,13 @@ xub_StrLen FormulaHelper::GetFunctionStart( const String& rFormula,
}
else // Brackets without function -> keep searching
{
- bRepeat = TRUE;
+ bRepeat = sal_True;
if ( !bBack )
nParPos++;
else if (nParPos > 0)
nParPos--;
else
- bRepeat = FALSE;
+ bRepeat = sal_False;
}
}
else // No brackets found
@@ -301,7 +301,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) )
{
@@ -319,10 +319,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--; // read one too far
}
}
@@ -338,7 +338,7 @@ xub_StrLen FormulaHelper::GetFunctionEnd( const String& rStr, xub_StrLen nStart
{
if ( !bInArray && nParCount == 0 )
{
- bFound = TRUE;
+ bFound = sal_True;
nStart--; // read one too far
}
}
@@ -350,7 +350,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();
@@ -359,7 +359,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/formdlgs.hrc b/formula/source/ui/dlg/formdlgs.hrc
index bb9e2a5a2a..09f8bdfbba 100644..100755
--- a/formula/source/ui/dlg/formdlgs.hrc
+++ b/formula/source/ui/dlg/formdlgs.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,10 +68,6 @@
#define BMP_STR_OPEN 2
#define BMP_STR_END 3
#define BMP_STR_ERROR 4
-#define BMP_STR_CLOSE_H 11
-#define BMP_STR_OPEN_H 12
-#define BMP_STR_END_H 13
-#define BMP_STR_ERROR_H 14
// Texte
#define STR_STRUCT_ERR1 1
diff --git a/formula/source/ui/dlg/formdlgs.src b/formula/source/ui/dlg/formdlgs.src
index 8ea9545c09..a609f4f520 100644
--- a/formula/source/ui/dlg/formdlgs.src
+++ b/formula/source/ui/dlg/formdlgs.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,18 +51,6 @@ TabPage RID_FORMULATAB_FUNCTION
< "Last Used" ; Default ; > ;
< "All" ; Default ; > ;
};
- // < "Database" ; Default ; > ;
- // < "Date&Time" ; Default ; > ;
- // < "Financial" ; Default ; > ;
- // < "Information" ; Default ; > ;
- // < "Logical" ; Default ; > ;
- // < "Mathematical" ; Default ; > ;
- // < "Array" ; Default ; > ;
- // < "Statistical" ; Default ; > ;
- // < "Spreadsheet" ; Default ; > ;
- // < "Text" ; Default ; > ;
- // < "Add-in" ; Default ; > ;
- //};
};
ListBox LB_FUNCTION
{
@@ -111,41 +99,21 @@ TabPage RID_FORMULATAB_STRUCT
ImageBitmap = Bitmap { File = "fapclose.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_CLOSE_H
- {
- ImageBitmap = Bitmap { File = "fapclose_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
Image BMP_STR_OPEN
{
ImageBitmap = Bitmap { File = "fapopen.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_OPEN_H
- {
- ImageBitmap = Bitmap { File = "fapopen_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
Image BMP_STR_END
{
ImageBitmap = Bitmap { File = "fapok.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_END_H
- {
- ImageBitmap = Bitmap { File = "fapok_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
Image BMP_STR_ERROR
{
ImageBitmap = Bitmap { File = "faperror.bmp"; };
MaskColor = STD_MASKCOLOR;
};
- Image BMP_STR_ERROR_H
- {
- ImageBitmap = Bitmap { File = "faperror_h.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
String STR_STRUCT_ERR1
{
Text [ en-US ] = "=?" ;
@@ -163,6 +131,7 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
Moveable = TRUE ;
TabControl TC_FUNCTION
{
+ HelpID = "formula:TabControl:RID_FORMULADLG_FORMULA_MODAL:TC_FUNCTION";
Pos = MAP_APPFONT ( 6 , 5 ) ;
Size = MAP_APPFONT ( 102 , 199 ) ;
PageList =
@@ -249,6 +218,7 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
};
CheckBox BTN_MATRIX
{
+ HelpID = "formula:CheckBox:RID_FORMULADLG_FORMULA_MODAL:BTN_MATRIX";
Pos = MAP_APPFONT ( 6 , 208 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -256,12 +226,14 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
};
Edit ED_REF
{
+ HelpID = "formula:Edit:RID_FORMULADLG_FORMULA_MODAL:ED_REF";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 205 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
};
ImageButton RB_REF
{
+ HelpID = "formula:ImageButton:RID_FORMULADLG_FORMULA_MODAL:RB_REF";
Pos = MAP_APPFONT ( 144 , 205 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -281,6 +253,7 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
};
PushButton BTN_BACKWARD
{
+ HelpID = "formula:PushButton:RID_FORMULADLG_FORMULA_MODAL:BTN_BACKWARD";
Pos = MAP_APPFONT ( 171 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
@@ -288,6 +261,7 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
};
PushButton BTN_FORWARD
{
+ HelpID = "formula:PushButton:RID_FORMULADLG_FORMULA_MODAL:BTN_FORWARD";
Pos = MAP_APPFONT ( 219 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
@@ -316,7 +290,6 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL
};
ModelessDialog RID_FORMULADLG_FORMULA
{
- // OutputSize = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 321 , 228 ) ;
@@ -324,6 +297,7 @@ ModelessDialog RID_FORMULADLG_FORMULA
Moveable = TRUE ;
TabControl TC_FUNCTION
{
+ HelpID = "formula:TabControl:RID_FORMULADLG_FORMULA:TC_FUNCTION";
Pos = MAP_APPFONT ( 6 , 5 ) ;
Size = MAP_APPFONT ( 102 , 199 ) ;
PageList =
@@ -410,6 +384,7 @@ ModelessDialog RID_FORMULADLG_FORMULA
};
CheckBox BTN_MATRIX
{
+ HelpID = "formula:CheckBox:RID_FORMULADLG_FORMULA:BTN_MATRIX";
Pos = MAP_APPFONT ( 6 , 208 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -417,12 +392,14 @@ ModelessDialog RID_FORMULADLG_FORMULA
};
Edit ED_REF
{
+ HelpID = "formula:Edit:RID_FORMULADLG_FORMULA:ED_REF";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 205 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
};
ImageButton RB_REF
{
+ HelpID = "formula:ImageButton:RID_FORMULADLG_FORMULA:RB_REF";
Pos = MAP_APPFONT ( 144 , 205 ) ;
Size = MAP_APPFONT ( 13 , 15 ) ;
TabStop = FALSE ;
@@ -442,6 +419,7 @@ ModelessDialog RID_FORMULADLG_FORMULA
};
PushButton BTN_BACKWARD
{
+ HelpID = "formula:PushButton:RID_FORMULADLG_FORMULA:BTN_BACKWARD";
Pos = MAP_APPFONT ( 171 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
@@ -449,6 +427,7 @@ ModelessDialog RID_FORMULADLG_FORMULA
};
PushButton BTN_FORWARD
{
+ HelpID = "formula:PushButton:RID_FORMULADLG_FORMULA:BTN_FORWARD";
Pos = MAP_APPFONT ( 219 , 208 ) ;
Size = MAP_APPFONT ( 45 , 14 ) ;
TabStop = TRUE ;
@@ -485,15 +464,6 @@ Image RID_BMP_REFBTN1
MaskColor = STD_MASKCOLOR;
};
-Image RID_BMP_REFBTN1_H
-{
- ImageBitmap = Bitmap
- {
- File = "refinp1_h.bmp";
- };
- MaskColor = STD_MASKCOLOR;
-};
-
Image RID_BMP_REFBTN2
{
ImageBitmap = Bitmap
@@ -502,35 +472,3 @@ Image RID_BMP_REFBTN2
};
MaskColor = STD_MASKCOLOR;
};
-
-Image RID_BMP_REFBTN2_H
-{
- ImageBitmap = Bitmap
- {
- File = "refinp2_h.bmp";
- };
- MaskColor = STD_MASKCOLOR;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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;
}
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index 98534e1663..8f6e3c9e41 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -58,7 +58,6 @@ FormulaListBox::FormulaListBox( Window* pParent, const ResId& rResId ):
void FormulaListBox::KeyInput( const KeyEvent& rKEvt )
{
KeyEvent aKEvt=rKEvt;
- //ListBox::KeyInput(rKEvt);
if(aKEvt.GetCharCode()==' ')
DoubleClick();
@@ -70,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());
@@ -82,7 +81,7 @@ long FormulaListBox::PreNotify( NotifyEvent& rNEvt )
//============================================================================
-inline USHORT Lb2Cat( USHORT nLbPos )
+inline sal_uInt16 Lb2Cat( sal_uInt16 nLbPos )
{
// Category 0 == LRU, otherwise Categories == LbPos-1
if ( nLbPos > 0 )
@@ -95,7 +94,6 @@ inline USHORT Lb2Cat( USHORT nLbPos )
FuncPage::FuncPage(Window* pParent,const IFunctionManager* _pFunctionManager):
TabPage(pParent,ModuleRes(RID_FORMULATAB_FUNCTION)),
- //
aFtCategory ( this, ModuleRes( FT_CATEGORY ) ),
aLbCategory ( this, ModuleRes( LB_CATEGORY ) ),
aFtFunction ( this, ModuleRes( FT_FUNCTION ) ),
@@ -103,8 +101,8 @@ FuncPage::FuncPage(Window* pParent,const IFunctionManager* _pFunctionManager):
m_pFunctionManager(_pFunctionManager)
{
FreeResource();
- m_aSmartHelpId = aLbFunction.GetSmartHelpId();
- aLbFunction.SetSmartUniqueId(m_aSmartHelpId);
+ m_aHelpId = aLbFunction.GetHelpId();
+ aLbFunction.SetUniqueId(m_aHelpId);
InitLRUList();
@@ -135,15 +133,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 )
@@ -178,7 +176,7 @@ void FuncPage::UpdateFunctionList()
}
//------------------------------------------------------
- aLbFunction.SetUpdateMode( TRUE );
+ aLbFunction.SetUpdateMode( sal_True );
aLbFunction.SelectEntryPos(0);
if(IsVisible()) SelHdl(&aLbFunction);
@@ -191,15 +189,15 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb )
const IFunctionDescription* pDesc = GetFuncDesc( GetFunction() );
if ( pDesc )
{
- const long nHelpId = pDesc->getHelpId();
- if ( nHelpId )
- aLbFunction.SetSmartHelpId(SmartId(nHelpId));
+ const rtl::OString sHelpId = pDesc->getHelpId();
+ if ( sHelpId.getLength() )
+ aLbFunction.SetHelpId(sHelpId);
}
aSelectionLink.Call(this);
}
else
{
- aLbFunction.SetSmartHelpId(m_aSmartHelpId);
+ aLbFunction.SetHelpId(m_aHelpId);
UpdateFunctionList();
}
return 0;
@@ -211,16 +209,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);
}
@@ -230,17 +228,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();
}
@@ -249,7 +247,7 @@ String FuncPage::GetSelFunctionName() const
{
return aLbFunction.GetSelectEntry();
}
-const IFunctionDescription* FuncPage::GetFuncDesc( USHORT nPos ) const
+const IFunctionDescription* FuncPage::GetFuncDesc( sal_uInt16 nPos ) const
{
// not pretty, but hopefully rare
return (const IFunctionDescription*) aLbFunction.GetEntryData(nPos);
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index 29b0de6299..96c68ea450 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -83,7 +83,7 @@ private:
m_pFunctionManager;
::std::vector< TFunctionDesc > aLRUList;
- SmartId m_aSmartHelpId;
+ rtl::OString m_aHelpId;
void impl_addFunctions(const IFunctionCategory* _pCategory);
@@ -100,15 +100,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 e5deee9d5b..0ba21a82aa 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,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() )
{
@@ -78,7 +78,7 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId )
//----------------------------------------------------------------------------
-void __EXPORT ValWnd::Paint( const Rectangle& )
+void ValWnd::Paint( const Rectangle& )
{
DrawText( aRectOut.TopLeft(), aStrValue );
}
@@ -111,7 +111,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;
@@ -123,11 +123,11 @@ void ArgEdit::Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
// Cursor control for Edit Fields in Argument Dialog
-void __EXPORT ArgEdit::KeyInput( const KeyEvent& rKEvt )
+void 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
@@ -137,8 +137,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 )
{
@@ -152,13 +152,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 )
@@ -173,13 +173,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;
}
}
@@ -744,7 +744,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);
@@ -759,8 +759,8 @@ EditBox::EditBox( Window* pParent, const ResId& rResId )
// #105582# the HelpId from the resource must be set for the MultiLineEdit,
// not for the control that contains it.
- pMEdit->SetSmartHelpId( GetSmartHelpId() );
- SetSmartHelpId( SmartId() );
+ pMEdit->SetHelpId( GetHelpId() );
+ SetHelpId( "" );
}
EditBox::~EditBox()
@@ -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 )
{
}
@@ -954,6 +954,20 @@ void RefEdit::SetRefString( const XubString& rStr )
Edit::SetText( rStr );
}
+void RefEdit::SetRefValid(bool bValid)
+{
+ if (bValid)
+ {
+ SetControlForeground();
+ SetControlBackground();
+ }
+ else
+ {
+ SetControlForeground(COL_WHITE);
+ SetControlBackground(0xff6563);
+ }
+}
+
void RefEdit::SetText( const XubString& rStr )
{
Edit::SetText( rStr );
@@ -967,9 +981,9 @@ void RefEdit::StartUpdateData()
void RefEdit::SilentGrabFocus()
{
- bSilentFocus = TRUE;
+ bSilentFocus = sal_True;
GrabFocus();
- bSilentFocus = FALSE;
+ bSilentFocus = sal_False;
}
void RefEdit::SetRefDialog( IControlReferenceHandler* pDlg )
@@ -1032,9 +1046,7 @@ IMPL_LINK( RefEdit, UpdateHdl, Timer*, EMPTYARG )
RefButton::RefButton( Window* _pParent, const ResId& rResId) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
- aImgRefStartHC( ModuleRes( RID_BMP_REFBTN1_H ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
- aImgRefDoneHC( ModuleRes( RID_BMP_REFBTN2_H ) ),
pAnyRefDlg( NULL ),
pRefEdit( NULL )
{
@@ -1044,9 +1056,7 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId) :
RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, IControlReferenceHandler* _pDlg ) :
ImageButton( _pParent, rResId ),
aImgRefStart( ModuleRes( RID_BMP_REFBTN1 ) ),
- aImgRefStartHC( ModuleRes( RID_BMP_REFBTN1_H ) ),
aImgRefDone( ModuleRes( RID_BMP_REFBTN2 ) ),
- aImgRefDoneHC( ModuleRes( RID_BMP_REFBTN2_H ) ),
pAnyRefDlg( _pDlg ),
pRefEdit( pEdit )
{
@@ -1056,13 +1066,11 @@ RefButton::RefButton( Window* _pParent, const ResId& rResId, RefEdit* pEdit, ICo
void RefButton::SetStartImage()
{
SetModeImage( aImgRefStart );
- SetModeImage( aImgRefStartHC, BMP_COLOR_HIGHCONTRAST );
}
void RefButton::SetEndImage()
{
SetModeImage( aImgRefDone );
- SetModeImage( aImgRefDoneHC, BMP_COLOR_HIGHCONTRAST );
}
void RefButton::SetReferences( IControlReferenceHandler* pDlg, RefEdit* pEdit )
diff --git a/formula/source/ui/dlg/makefile.mk b/formula/source/ui/dlg/makefile.mk
index 688e169d26..688e169d26 100644..100755
--- a/formula/source/ui/dlg/makefile.mk
+++ b/formula/source/ui/dlg/makefile.mk
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index a193750b8c..b038d579e3 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@
#include "helpids.hrc"
#include "formula/formdata.hxx"
#include "formula/IFunctionDescription.hxx"
-#include "ModuleHelper.hxx"
+#include "ModuleHelper.hxx"
#include "ForResId.hrc"
#define VAR_ARGS 30
@@ -57,35 +57,34 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos):
aFtArgName ( this, ModuleRes( FT_PARNAME ) ),
aFtArgDesc ( this, ModuleRes( FT_PARDESC ) ),
+ aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ),
aFtArg1 ( this, ModuleRes( FT_ARG1 ) ),
- aFtArg2 ( this, ModuleRes( FT_ARG2 ) ),
- aFtArg3 ( this, ModuleRes( FT_ARG3 ) ),
- aFtArg4 ( this, ModuleRes( FT_ARG4 ) ),
+ aEdArg1 ( this, ModuleRes( ED_ARG1 ) ),
+ aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ),
- aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ),
aBtnFx2 ( this, ModuleRes( BTN_FX2 ) ),
- aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ),
- aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ),
-
- aEdArg1 ( this, ModuleRes( ED_ARG1 ) ),
+ aFtArg2 ( this, ModuleRes( FT_ARG2 ) ),
aEdArg2 ( this, ModuleRes( ED_ARG2 ) ),
- aEdArg3 ( this, ModuleRes( ED_ARG3 ) ),
- aEdArg4 ( this, ModuleRes( ED_ARG4 ) ),
-
- aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ),
aRefBtn2 ( this, ModuleRes( RB_ARG2 ) ),
+
+ aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ),
+ aFtArg3 ( this, ModuleRes( FT_ARG3 ) ),
+ aEdArg3 ( this, ModuleRes( ED_ARG3 ) ),
aRefBtn3 ( this, ModuleRes( RB_ARG3 ) ),
+
+ aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ),
+ aFtArg4 ( this, ModuleRes( FT_ARG4 ) ),
+ aEdArg4 ( this, ModuleRes( ED_ARG4 ) ),
aRefBtn4 ( this, ModuleRes( RB_ARG4 ) ),
-
+
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();
aDefaultString=aFtEditDesc.GetText();
-
+
SetPosPixel(aPos);
nEdFocus=NOT_FOUND;
nActiveLine=0;
@@ -95,11 +94,6 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos):
aSlider.SetEndScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
aSlider.SetScrollHdl( LINK( this, ParaWin, ScrollHdl ) );
- aBtnFx1.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
- aBtnFx2.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
- aBtnFx3.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
- aBtnFx4.SetModeImage( aFxHC, BMP_COLOR_HIGHCONTRAST );
-
InitArgInput( 0, aFtArg1, aBtnFx1, aEdArg1, aRefBtn1);
InitArgInput( 1, aFtArg2, aBtnFx2, aEdArg2, aRefBtn2);
InitArgInput( 2, aFtArg3, aBtnFx3, aEdArg3, aRefBtn3);
@@ -107,13 +101,12 @@ 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() );
if ( (nArgs > 0) && (nArg<nArgs) )
{
@@ -125,7 +118,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 += ' ';
@@ -133,9 +126,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);
@@ -151,14 +144,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));
@@ -166,9 +159,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)) ?
@@ -183,7 +176,6 @@ void ParaWin::UpdateArgInput( USHORT nOffset, USHORT i )
SetArgName( i, pFuncDesc->getParameterName(nRealArg) );
}
if(nArg<nArgs) SetArgVal(i,aParaArray[nArg]);
- //@ aArgInput[i].SetArgVal( *(pArgArr[nOffset+i]) );
}
@@ -198,12 +190,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)
{
@@ -213,10 +205,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 );
}
}
@@ -234,7 +226,7 @@ RefEdit* ParaWin::GetActiveEdit()
}
-String ParaWin::GetArgument(USHORT no)
+String ParaWin::GetArgument(sal_uInt16 no)
{
String aStr;
if(no<aParaArray.size())
@@ -257,7 +249,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())
{
@@ -295,15 +287,15 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc)
{
SetEditDesc(aDefaultString);
}
- long nHelpId = pFuncDesc->getHelpId();
nArgs = pFuncDesc->getSuppressedArgumentCount();
pFuncDesc->fillVisibleArgumentMapping(aVisibleArgMapping);
aSlider.Hide();
- SetHelpId( nHelpId );
- aEdArg1.SetHelpId( nHelpId );
- aEdArg2.SetHelpId( nHelpId );
- aEdArg3.SetHelpId( nHelpId );
- aEdArg4.SetHelpId( nHelpId );
+ rtl::OString sHelpId = pFuncDesc->getHelpId();
+ SetHelpId( sHelpId );
+ aEdArg1.SetHelpId( sHelpId );
+ aEdArg2.SetHelpId( sHelpId );
+ aEdArg3.SetHelpId( sHelpId );
+ aEdArg4.SetHelpId( sHelpId );
// Unique-IDs muessen gleich bleiben fuer Automatisierung
SetUniqueId( HID_FORMULA_FAP_PAGE );
@@ -335,32 +327,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())
@@ -368,7 +360,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)
{
@@ -391,7 +383,7 @@ void ParaWin::ClearAll()
SetArgumentOffset(0);
}
-void ParaWin::SetArgumentOffset(USHORT nOffset)
+void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
{
DelParaArray();
aSlider.SetThumbPos(0);
@@ -417,7 +409,6 @@ void ParaWin::SetArgumentOffset(USHORT nOffset)
}
else
{
- //aSlider.SetEndScrollHdl( LINK( this, ScFormulaDlg, ScrollHdl ) );
aSlider.SetPageSize( 4 );
aSlider.SetVisibleSize( 4 );
aSlider.SetLineSize( 1 );
@@ -431,8 +422,8 @@ void ParaWin::SetArgumentOffset(USHORT nOffset)
void ParaWin::UpdateParas()
{
- USHORT i;
- USHORT nOffset = GetSliderPos();
+ sal_uInt16 i;
+ sal_uInt16 nOffset = GetSliderPos();
if ( nArgs > 0 )
{
@@ -447,19 +438,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 );
}
@@ -468,9 +459,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 );
}
@@ -497,9 +488,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])
{
@@ -519,9 +510,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])
{
@@ -543,9 +534,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])
{
@@ -575,9 +566,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.hrc b/formula/source/ui/dlg/parawin.hrc
index 484ca53937..2f8ec808a6 100644..100755
--- a/formula/source/ui/dlg/parawin.hrc
+++ b/formula/source/ui/dlg/parawin.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,6 @@
#define RB_ARG3 18
#define RB_ARG4 19
#define WND_SLIDER 20
-#define IMG_FX_H 30
#define STR_OPTIONAL 1
#define STR_REQUIRED 2
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index 5aedaa367c..adb9d26739 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -58,10 +58,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;
@@ -69,33 +69,33 @@ private:
FixedText aFtArgName;
FixedInfo aFtArgDesc;
+ ImageButton aBtnFx1;
FixedText aFtArg1;
- FixedText aFtArg2;
- FixedText aFtArg3;
- FixedText aFtArg4;
+ ArgEdit aEdArg1;
+ RefButton aRefBtn1;
- ImageButton aBtnFx1;
ImageButton aBtnFx2;
- ImageButton aBtnFx3;
- ImageButton aBtnFx4;
-
- ArgEdit aEdArg1;
+ FixedText aFtArg2;
ArgEdit aEdArg2;
+ RefButton aRefBtn2;
+
+ ImageButton aBtnFx3;
+ FixedText aFtArg3;
ArgEdit aEdArg3;
- ArgEdit aEdArg4;
+ RefButton aRefBtn3;
- RefButton aRefBtn1;
- RefButton aRefBtn2;
- RefButton aRefBtn3;
- RefButton aRefBtn4;
+ ImageButton aBtnFx4;
+ FixedText aFtArg4;
+ ArgEdit aEdArg4;
+ RefButton aRefBtn4;
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;
@@ -114,7 +114,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();
@@ -122,40 +122,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/parawin.src b/formula/source/ui/dlg/parawin.src
index 78be77040b..de099ae31e 100644
--- a/formula/source/ui/dlg/parawin.src
+++ b/formula/source/ui/dlg/parawin.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,6 +68,7 @@
TabPage RID_FORMULATAB_PARAMETER
{
+ HelpID = "formula:TabPage:RID_FORMULATAB_PARAMETER";
Border = FALSE;
Size = MAP_APPFONT( 203, 128 );
DialogControl = TRUE;
@@ -119,10 +120,18 @@ TabPage RID_FORMULATAB_PARAMETER
HelpId=HID_FORMULA_FAP_BTN_FX4;
FXBUTTONBLOCK ( 109 )
};
- Edit ED_ARG1 { ED_ARGBLOCK ( 64 ) };
- Edit ED_ARG2 { ED_ARGBLOCK ( 79 ) };
- Edit ED_ARG3 { ED_ARGBLOCK ( 94 ) };
- Edit ED_ARG4 { ED_ARGBLOCK ( 109 ) };
+ Edit ED_ARG1 { ED_ARGBLOCK ( 64 )
+ HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG1";
+ };
+ Edit ED_ARG2 { ED_ARGBLOCK ( 79 )
+ HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG2";
+ };
+ Edit ED_ARG3 { ED_ARGBLOCK ( 94 )
+ HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG3";
+ };
+ Edit ED_ARG4 { ED_ARGBLOCK ( 109 )
+ HelpID = "formula:Edit:RID_FORMULATAB_PARAMETER:ED_ARG4";
+ };
ImageButton RB_ARG1
{
@@ -161,29 +170,4 @@ TabPage RID_FORMULATAB_PARAMETER
{
Text [ en-US ] = "(required)" ;
};
-
- Image IMG_FX_H
- {
- ImageBitmap = Bitmap { File = "fx_h.bmp" ; };
- MaskColor = STD_MASKCOLOR;
- };
-
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 3bbd182834..a5d587927d 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,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,42 +61,38 @@ 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* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, 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 );
- pBmpItem->SetBitmap2( rEntryImgHC, BMP_COLOR_HIGHCONTRAST );
+ const Image& rEntryImg,
+ SvLBoxEntry* pParent, sal_uLong nPos, IFormulaToken* pToken )
+{
+ SvLBoxEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, pParent, sal_False, nPos, pToken );
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();
}
@@ -104,23 +100,18 @@ void StructListBox::LoseFocus()
StructPage::StructPage(Window* pParent):
TabPage(pParent,ModuleRes(RID_FORMULATAB_STRUCT)),
- //
aFtStruct ( this, ModuleRes( FT_STRUCT ) ),
aTlbStruct ( this, ModuleRes( TLB_STRUCT ) ),
maImgEnd ( ModuleRes( BMP_STR_END ) ),
maImgError ( ModuleRes( BMP_STR_ERROR ) ),
- maImgEndHC ( ModuleRes( BMP_STR_END_H ) ),
- maImgErrorHC ( ModuleRes( BMP_STR_ERROR_H ) ),
pSelectedToken ( NULL )
{
- aTlbStruct.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|
+ aTlbStruct.SetStyle(aTlbStruct.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|
WB_HASBUTTONS|WB_HSCROLL|WB_NOINITIALSELECTION);
aTlbStruct.SetNodeDefaultImages();
- aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
+ aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN ) ) );
aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE ) ) );
- aTlbStruct.SetDefaultExpandedEntryBmp( Image( ModuleRes( BMP_STR_OPEN_H ) ), BMP_COLOR_HIGHCONTRAST );
- aTlbStruct.SetDefaultCollapsedEntryBmp( Image( ModuleRes( BMP_STR_CLOSE_H ) ), BMP_COLOR_HIGHCONTRAST );
FreeResource();
@@ -129,26 +120,26 @@ 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 );
+ pEntry = aTlbStruct.InsertStaticEntry( rText, maImgEnd, pParent, nPos, pIFormulaToken );
break;
case STRUCT_ERROR:
- pEntry = aTlbStruct.InsertStaticEntry( rText, maImgError, maImgErrorHC, pParent, nPos, pIFormulaToken );
+ pEntry = aTlbStruct.InsertStaticEntry( rText, maImgError, pParent, nPos, pIFormulaToken );
break;
}
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index d5677fd33f..967d789433 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -50,7 +50,7 @@ class StructListBox : public SvTreeListBox
{
private:
- BOOL bActiveFlag;
+ sal_Bool bActiveFlag;
protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -63,13 +63,12 @@ public:
SvLBoxEntry* InsertStaticEntry(
const XubString& rText,
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();
};
@@ -87,8 +86,6 @@ private:
StructListBox aTlbStruct;
Image maImgEnd;
Image maImgError;
- Image maImgEndHC;
- Image maImgErrorHC;
IFormulaToken* pSelectedToken;
@@ -106,7 +103,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;