diff options
author | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
commit | 9730661364792059168a06bfbaacf47fc8daf53c (patch) | |
tree | fbf76ee668cb02107f1c6599088607963e102339 /starmath/inc | |
parent | aed400f208fbf9ba2ce943030f84e6c993f482fb (diff) | |
parent | 40bb208a5db70bd9ab1b877c911f537e4cb68afc (diff) |
CWS gnumake3: pull in cws removetooltypes01
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/applicat.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/config.hxx | 2 | ||||
-rwxr-xr-x | starmath/inc/dialog.hxx | 106 | ||||
-rwxr-xr-x | starmath/inc/document.hxx | 46 | ||||
-rw-r--r-- | starmath/inc/edit.hxx | 14 | ||||
-rwxr-xr-x | starmath/inc/format.hxx | 50 | ||||
-rw-r--r-- | starmath/inc/node.hxx | 124 | ||||
-rwxr-xr-x | starmath/inc/parse.hxx | 38 | ||||
-rw-r--r-- | starmath/inc/rect.hxx | 32 | ||||
-rw-r--r-- | starmath/inc/smdll.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/smmod.hxx | 10 | ||||
-rw-r--r-- | starmath/inc/symbol.hxx | 14 | ||||
-rw-r--r--[-rwxr-xr-x] | starmath/inc/toolbox.hxx | 14 | ||||
-rw-r--r-- | starmath/inc/unomodel.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/utility.hxx | 70 | ||||
-rw-r--r-- | starmath/inc/view.hxx | 48 |
16 files changed, 288 insertions, 288 deletions
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx index fec2ba8a945e..9aad8d41b59e 100644 --- a/starmath/inc/applicat.hxx +++ b/starmath/inc/applicat.hxx @@ -67,7 +67,7 @@ class SvxErrorHandler; class SmResId : public ResId { public: - SmResId(USHORT nId) : + SmResId(sal_uInt16 nId) : ResId(nId) { } diff --git a/starmath/inc/config.hxx b/starmath/inc/config.hxx index c52e429923c9..99f4fd4a9489 100644 --- a/starmath/inc/config.hxx +++ b/starmath/inc/config.hxx @@ -47,7 +47,7 @@ public: SmConfig(); virtual ~SmConfig(); - SmFontPickList & GetFontPickList(USHORT nIdent) { return vFontPickList[nIdent]; } + SmFontPickList & GetFontPickList(sal_uInt16 nIdent) { return vFontPickList[nIdent]; } void ItemSetToConfig(const SfxItemSet &rSet); void ConfigToItemSet(SfxItemSet &rSet) const; diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 818fec8009c9..806bfbf4e4a2 100755 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -75,7 +75,7 @@ class SmPrintOptionsTabPage : public SfxTabPage DECL_LINK(SizeButtonClickHdl, Button *); - virtual BOOL FillItemSet(SfxItemSet& rSet); + virtual sal_Bool FillItemSet(SfxItemSet& rSet); virtual void Reset(const SfxItemSet& rSet); public: @@ -121,7 +121,7 @@ class SmFontDialog : public ModalDialog virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - SmFontDialog(Window * pParent, OutputDevice *pFntListDevice, BOOL bHideCheckboxes, BOOL bFreeRes = TRUE); + SmFontDialog(Window * pParent, OutputDevice *pFntListDevice, sal_Bool bHideCheckboxes, sal_Bool bFreeRes = sal_True); const Font& GetFont() const { return Face; } void SetFont(const Font &rFont); @@ -151,7 +151,7 @@ class SmFontSizeDialog : public ModalDialog DECL_LINK(DefaultButtonClickHdl, Button *); public: - SmFontSizeDialog(Window *pParent, BOOL bFreeRes = TRUE); + SmFontSizeDialog(Window *pParent, sal_Bool bFreeRes = sal_True); void ReadFrom(const SmFormat &rFormat); void WriteTo (SmFormat &rFormat) const; @@ -188,7 +188,7 @@ class SmFontTypeDialog : public ModalDialog DECL_LINK(DefaultButtonClickHdl, Button *); public: - SmFontTypeDialog(Window *pParent, OutputDevice *pFntListDevice, BOOL bFreeRes = TRUE); + SmFontTypeDialog(Window *pParent, OutputDevice *pFntListDevice, sal_Bool bFreeRes = sal_True); void ReadFrom(const SmFormat &rFormat); void WriteTo (SmFormat &rFormat) const; @@ -204,24 +204,24 @@ class SmCategoryDesc : public Resource XubString *Strings[4]; Bitmap *Graphics[4]; /* regular bitmaps */ Bitmap *GraphicsH[4]; /* high contrast bitmaps */ - USHORT Minimum[4]; - USHORT Maximum[4]; - USHORT Value[4]; - BOOL bIsHighContrast; + sal_uInt16 Minimum[4]; + sal_uInt16 Maximum[4]; + sal_uInt16 Value[4]; + sal_Bool bIsHighContrast; public: - SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx); + SmCategoryDesc(const ResId &rResId, sal_uInt16 nCategoryIdx); ~SmCategoryDesc(); const XubString & GetName() const { return Name; } - const XubString * GetString(USHORT Index) const { return Strings[Index]; } - USHORT GetMinimum(USHORT Index) { return Minimum[Index]; } - USHORT GetMaximum(USHORT Index) { return Maximum[Index]; } - USHORT GetValue(USHORT Index) const { return Value[Index]; } - void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;} - - void SetHighContrast( BOOL bVal ) { bIsHighContrast = bVal; } - const Bitmap * GetGraphic(USHORT Index) const + const XubString * GetString(sal_uInt16 Index) const { return Strings[Index]; } + sal_uInt16 GetMinimum(sal_uInt16 Index) { return Minimum[Index]; } + sal_uInt16 GetMaximum(sal_uInt16 Index) { return Maximum[Index]; } + sal_uInt16 GetValue(sal_uInt16 Index) const { return Value[Index]; } + void SetValue(sal_uInt16 Index, sal_uInt16 nVal) { Value[Index] = nVal;} + + void SetHighContrast( sal_Bool bVal ) { bIsHighContrast = bVal; } + const Bitmap * GetGraphic(sal_uInt16 Index) const { return bIsHighContrast ? GraphicsH[Index] : Graphics[Index]; } @@ -247,8 +247,8 @@ class SmDistanceDialog : public ModalDialog FixedLine aFixedLine; SmCategoryDesc *Categories[NOCATEGORIES]; - USHORT nActiveCategory; - BOOL bScaleAllBrackets; + sal_uInt16 nActiveCategory; + sal_Bool bScaleAllBrackets; DECL_LINK(GetFocusHdl, Control *); DECL_LINK(MenuSelectHdl, Menu *); @@ -257,12 +257,12 @@ class SmDistanceDialog : public ModalDialog using Window::SetHelpId; void SetHelpId(MetricField &rField, const rtl::OString& sHelpId); - void SetCategory(USHORT Category); + void SetCategory(sal_uInt16 Category); void ApplyImages(); public: - SmDistanceDialog(Window *pParent, BOOL bFreeRes = TRUE); + SmDistanceDialog(Window *pParent, sal_Bool bFreeRes = sal_True); ~SmDistanceDialog(); void ReadFrom(const SmFormat &rFormat); @@ -289,7 +289,7 @@ class SmAlignDialog : public ModalDialog DECL_LINK(DefaultButtonClickHdl, Button *); public: - SmAlignDialog(Window *pParent, BOOL bFreeRes = TRUE); + SmAlignDialog(Window *pParent, sal_Bool bFreeRes = sal_True); void ReadFrom(const SmFormat &rFormat); void WriteTo (SmFormat &rFormat) const; @@ -304,9 +304,9 @@ class SmShowSymbolSet : public Control Size aOutputSize; Link aSelectHdlLink; Link aDblClickHdlLink; - USHORT nLen; - USHORT nRows, nColumns; - USHORT nSelectSymbol; + sal_uInt16 nLen; + sal_uInt16 nRows, nColumns; + sal_uInt16 nSelectSymbol; virtual void Paint(const Rectangle&); virtual void MouseButtonDown(const MouseEvent& rMEvt); @@ -319,8 +319,8 @@ public: void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet); - void SelectSymbol(USHORT nSymbol); - USHORT GetSelectSymbol() const { return nSelectSymbol; } + void SelectSymbol(sal_uInt16 nSymbol); + sal_uInt16 GetSelectSymbol() const { return nSelectSymbol; } void SetSelectHdl(const Link& rLink) { aSelectHdlLink = rLink; } void SetDblClickHdl(const Link& rLink) { aDblClickHdlLink = rLink; } @@ -373,7 +373,7 @@ class SmSymbolDialog : public ModalDialog DECL_LINK(EditClickHdl, Button *); DECL_LINK(GetClickHdl, Button *); - void FillSymbolSets(BOOL bDeleteText = TRUE); + void FillSymbolSets(sal_Bool bDeleteText = sal_True); void SetSymbolSetManager(SmSymbolManager &rMgr); const SmSym *GetSymbol() const; void InitColor_Impl(); @@ -382,12 +382,12 @@ class SmSymbolDialog : public ModalDialog public: SmSymbolDialog(Window * pParent, OutputDevice *pFntListDevice, - SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, BOOL bFreeRes = TRUE); + SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, sal_Bool bFreeRes = sal_True); virtual ~SmSymbolDialog(); - BOOL SelectSymbolSet(const XubString &rSymbolSetName); - void SelectSymbol(USHORT nSymbolPos); - USHORT GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); } + sal_Bool SelectSymbolSet(const XubString &rSymbolSetName); + void SelectSymbol(sal_uInt16 nSymbolPos); + sal_uInt16 GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); } }; //////////////////////////////////////////////////////////////////////////////// @@ -458,22 +458,22 @@ class SmSymDefineDialog : public ModalDialog DECL_LINK(ChangeClickHdl, Button *); DECL_LINK(DeleteClickHdl, Button *); - void FillSymbols(ComboBox &rComboBox, BOOL bDeleteText = TRUE); - void FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText = TRUE); - void FillFonts(BOOL bDeleteText = TRUE); - void FillStyles(BOOL bDeleteText = TRUE); + void FillSymbols(ComboBox &rComboBox, sal_Bool bDeleteText = sal_True); + void FillSymbolSets(ComboBox &rComboBox, sal_Bool bDeleteText = sal_True); + void FillFonts(sal_Bool bDeleteText = sal_True); + void FillStyles(sal_Bool bDeleteText = sal_True); void SetSymbolSetManager(const SmSymbolManager &rMgr); void SetFont(const XubString &rFontName, const XubString &rStyleName); void SetOrigSymbol(const SmSym *pSymbol, const XubString &rSymbolSetName); void UpdateButtons(); - BOOL SelectSymbolSet(ComboBox &rComboBox, const XubString &rSymbolSetName, - BOOL bDeleteText); - BOOL SelectSymbol(ComboBox &rComboBox, const XubString &rSymbolName, - BOOL bDeleteText); - BOOL SelectFont(const XubString &rFontName, BOOL bApplyFont); - BOOL SelectStyle(const XubString &rStyleName, BOOL bApplyFont); + sal_Bool SelectSymbolSet(ComboBox &rComboBox, const XubString &rSymbolSetName, + sal_Bool bDeleteText); + sal_Bool SelectSymbol(ComboBox &rComboBox, const XubString &rSymbolName, + sal_Bool bDeleteText); + sal_Bool SelectFont(const XubString &rFontName, sal_Bool bApplyFont); + sal_Bool SelectStyle(const XubString &rStyleName, sal_Bool bApplyFont); SmSym * GetSymbol(const ComboBox &rComboBox); const SmSym * GetSymbol(const ComboBox &rComboBox) const @@ -486,7 +486,7 @@ class SmSymDefineDialog : public ModalDialog virtual void DataChanged( const DataChangedEvent& rDCEvt ); public: - SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes = TRUE); + SmSymDefineDialog(Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr, sal_Bool bFreeRes = sal_True); ~SmSymDefineDialog(); using OutputDevice::SetFont; @@ -494,28 +494,28 @@ public: // Dialog virtual short Execute(); - BOOL SelectOldSymbolSet(const XubString &rSymbolSetName) + sal_Bool SelectOldSymbolSet(const XubString &rSymbolSetName) { - return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE); + return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, sal_False); } - BOOL SelectOldSymbol(const XubString &rSymbolName) + sal_Bool SelectOldSymbol(const XubString &rSymbolName) { - return SelectSymbol(aOldSymbols, rSymbolName, FALSE); + return SelectSymbol(aOldSymbols, rSymbolName, sal_False); } - BOOL SelectSymbolSet(const XubString &rSymbolSetName) + sal_Bool SelectSymbolSet(const XubString &rSymbolSetName) { - return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE); + return SelectSymbolSet(aSymbolSets, rSymbolSetName, sal_False); } - BOOL SelectSymbol(const XubString &rSymbolName) + sal_Bool SelectSymbol(const XubString &rSymbolName) { - return SelectSymbol(aSymbols, rSymbolName, FALSE); + return SelectSymbol(aSymbols, rSymbolName, sal_False); } - BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); } - BOOL SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, TRUE); }; + sal_Bool SelectFont(const XubString &rFontName) { return SelectFont(rFontName, sal_True); } + sal_Bool SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, sal_True); }; void SelectChar(xub_Unicode cChar); }; diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index f8ffef16dfcd..f31a53801120 100755 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -51,15 +51,15 @@ class Printer; #define HINT_DATACHANGED 1004 -#define SM30BIDENT ((ULONG)0x534D3033L) -#define SM30IDENT ((ULONG)0x30334d53L) -#define SM304AIDENT ((ULONG)0x34303330L) -#define SM30VERSION ((ULONG)0x00010000L) -#define SM50VERSION ((ULONG)0x00010001L) //Unterschied zur SM30VERSION ist +#define SM30BIDENT ((sal_uLong)0x534D3033L) +#define SM30IDENT ((sal_uLong)0x30334d53L) +#define SM304AIDENT ((sal_uLong)0x34303330L) +#define SM30VERSION ((sal_uLong)0x00010000L) +#define SM50VERSION ((sal_uLong)0x00010001L) //Unterschied zur SM30VERSION ist //der neue Border im Format. -#define FRMIDENT ((ULONG)0x03031963L) -#define FRMVERSION ((ULONG)0x00010001L) +#define FRMIDENT ((sal_uLong)0x03031963L) +#define FRMVERSION ((sal_uLong)0x00010001L) #define STAROFFICE_XML "StarOffice XML (Math)" #define MATHML_XML "MathML XML (Math)" @@ -123,8 +123,8 @@ class SmDocShell : public SfxObjectShell, public SfxListener nRightBorder, nTopBorder, nBottomBorder; - USHORT nModifyCount; - BOOL bIsFormulaArranged; + sal_uInt16 nModifyCount; + sal_Bool bIsFormulaArranged; std::set< rtl::OUString > aUsedSymbols; // to export used symbols only when saving @@ -133,11 +133,11 @@ class SmDocShell : public SfxObjectShell, public SfxListener virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType); - BOOL WriteAsMathType3( SfxMedium& ); + sal_Bool WriteAsMathType3( SfxMedium& ); virtual void Draw(OutputDevice *pDevice, const JobSetup & rSetup, - USHORT nAspect = ASPECT_CONTENT); + sal_uInt16 nAspect = ASPECT_CONTENT); virtual void FillClass(SvGlobalName* pClassName, sal_uInt32* pFormat, @@ -147,24 +147,24 @@ class SmDocShell : public SfxObjectShell, public SfxListener sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const; - virtual BOOL SetData( const String& rData ); - virtual ULONG GetMiscStatus() const; + virtual sal_Bool SetData( const String& rData ); + virtual sal_uLong GetMiscStatus() const; virtual void OnDocumentPrinterChanged( Printer * ); virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); - virtual BOOL Load( SfxMedium& rMedium ); + virtual sal_Bool Load( SfxMedium& rMedium ); void ImplSave( SvStorageStreamRef xStrm ); - virtual BOOL Save(); - virtual BOOL SaveAs( SfxMedium& rMedium ); - virtual BOOL ConvertTo( SfxMedium &rMedium ); - virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); + virtual sal_Bool Save(); + virtual sal_Bool SaveAs( SfxMedium& rMedium ); + virtual sal_Bool ConvertTo( SfxMedium &rMedium ); + virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage ); Printer *GetPrt(); OutputDevice* GetRefDev(); - BOOL IsFormulaArranged() const { return bIsFormulaArranged; } - void SetFormulaArranged(BOOL bVal) { bIsFormulaArranged = bVal; } + sal_Bool IsFormulaArranged() const { return bIsFormulaArranged; } + void SetFormulaArranged(sal_Bool bVal) { bIsFormulaArranged = bVal; } - virtual BOOL ConvertFrom(SfxMedium &rMedium); + virtual sal_Bool ConvertFrom(SfxMedium &rMedium); public: TYPEINFO(); @@ -184,7 +184,7 @@ public: //und fuer die Kommunikation mit dem SFX! //Alle internen Verwendungen des Printers sollten ausschlieslich uber //den SmPrinterAccess funktionieren. - BOOL HasPrinter() { return 0 != pPrinter; } + sal_Bool HasPrinter() { return 0 != pPrinter; } SfxPrinter *GetPrinter() { GetPrt(); return pPrinter; } void SetPrinter( SfxPrinter * ); @@ -224,7 +224,7 @@ public: void GetState(SfxItemSet &); virtual void SetVisArea (const Rectangle & rVisArea); - virtual void SetModified(BOOL bModified); + virtual void SetModified(sal_Bool bModified); }; diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 4abbcdb950d8..2de69a5924ed 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -53,7 +53,7 @@ class CommandEvent; /**************************************************************************/ void SmGetLeftSelectionPart(const ESelection aSelection, - USHORT &nPara, USHORT &nPos); + sal_uInt16 &nPara, sal_uInt16 &nPos); /**************************************************************************/ @@ -117,27 +117,27 @@ public: ESelection GetSelection() const; void SetSelection(const ESelection &rSel); - BOOL IsEmpty() const; - BOOL IsSelected() const; - BOOL IsAllSelected() const; + sal_Bool IsEmpty() const; + sal_Bool IsSelected() const; + sal_Bool IsAllSelected() const; void Cut(); void Copy(); void Paste(); void Delete(); void SelectAll(); void InsertText(const String &rText); - void InsertCommand(USHORT nCommand); + void InsertCommand(sal_uInt16 nCommand); void MarkError(const Point &rPos); void SelNextMark(); void SelPrevMark(); - BOOL HasMark(const String &rText) const; + sal_Bool HasMark(const String &rText) const; void Flush(); void DeleteEditView( SmViewShell &rView ); void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg ); - BOOL HandleWheelCommands( const CommandEvent &rCEvt ); + sal_Bool HandleWheelCommands( const CommandEvent &rCEvt ); // for Accessibility virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index 4d13ea48185e..de12c8af8891 100755 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -34,7 +34,7 @@ #include <types.hxx> -#define SM_FMT_VERSION_51 ((BYTE) 0x01) +#define SM_FMT_VERSION_51 ((sal_uInt8) 0x01) #define SM_FMT_VERSION_NOW SM_FMT_VERSION_51 #define FNTNAME_TIMES "Times New Roman" @@ -98,19 +98,19 @@ enum SmHorAlign { AlignLeft, AlignCenter, AlignRight }; -String GetDefaultFontName( LanguageType nLang, USHORT nIdent ); +String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ); class SmFormat : public SfxBroadcaster { SmFace vFont[FNT_END + 1]; - BOOL bDefaultFont[FNT_END + 1]; + sal_Bool bDefaultFont[FNT_END + 1]; Size aBaseSize; long nVersion; - USHORT vSize[SIZ_END + 1]; - USHORT vDist[DIS_END + 1]; + sal_uInt16 vSize[SIZ_END + 1]; + sal_uInt16 vDist[DIS_END + 1]; SmHorAlign eHorAlign; - INT16 nGreekCharStyle; - BOOL bIsTextmode, + sal_Int16 nGreekCharStyle; + sal_Bool bIsTextmode, bScaleNormalBrackets; public: @@ -120,30 +120,30 @@ public: const Size & GetBaseSize() const { return aBaseSize; } void SetBaseSize(const Size &rSize) { aBaseSize = rSize; } - const SmFace & GetFont(USHORT nIdent) const { return vFont[nIdent]; } - void SetFont(USHORT nIdent, const SmFace &rFont, BOOL bDefault = FALSE); - void SetFontSize(USHORT nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); } + const SmFace & GetFont(sal_uInt16 nIdent) const { return vFont[nIdent]; } + void SetFont(sal_uInt16 nIdent, const SmFace &rFont, sal_Bool bDefault = sal_False); + void SetFontSize(sal_uInt16 nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); } - void SetDefaultFont(USHORT nIdent, BOOL bVal) { bDefaultFont[nIdent] = bVal; } - BOOL IsDefaultFont(USHORT nIdent) const { return bDefaultFont[nIdent]; } + void SetDefaultFont(sal_uInt16 nIdent, sal_Bool bVal) { bDefaultFont[nIdent] = bVal; } + sal_Bool IsDefaultFont(sal_uInt16 nIdent) const { return bDefaultFont[nIdent]; } - USHORT GetRelSize(USHORT nIdent) const { return vSize[nIdent]; } - void SetRelSize(USHORT nIdent, USHORT nVal) { vSize[nIdent] = nVal;} + sal_uInt16 GetRelSize(sal_uInt16 nIdent) const { return vSize[nIdent]; } + void SetRelSize(sal_uInt16 nIdent, sal_uInt16 nVal) { vSize[nIdent] = nVal;} - USHORT GetDistance(USHORT nIdent) const { return vDist[nIdent]; } - void SetDistance(USHORT nIdent, USHORT nVal) { vDist[nIdent] = nVal; } + sal_uInt16 GetDistance(sal_uInt16 nIdent) const { return vDist[nIdent]; } + void SetDistance(sal_uInt16 nIdent, sal_uInt16 nVal) { vDist[nIdent] = nVal; } SmHorAlign GetHorAlign() const { return eHorAlign; } void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; } - BOOL IsTextmode() const { return bIsTextmode; } - void SetTextmode(BOOL bVal) { bIsTextmode = bVal; } + sal_Bool IsTextmode() const { return bIsTextmode; } + void SetTextmode(sal_Bool bVal) { bIsTextmode = bVal; } - INT16 GetGreekCharStyle() const { return nGreekCharStyle; } - void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; } + sal_Int16 GetGreekCharStyle() const { return nGreekCharStyle; } + void SetGreekCharStyle(sal_Int16 nVal) { nGreekCharStyle = nVal; } - BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; } - void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; } + sal_Bool IsScaleNormalBrackets() const { return bScaleNormalBrackets; } + void SetScaleNormalBrackets(sal_Bool bVal) { bScaleNormalBrackets = bVal; } long GetVersion() const { return nVersion; } @@ -152,8 +152,8 @@ public: SmFormat & operator = (const SmFormat &rFormat); - BOOL operator == (const SmFormat &rFormat) const; - inline BOOL operator != (const SmFormat &rFormat) const; + sal_Bool operator == (const SmFormat &rFormat) const; + inline sal_Bool operator != (const SmFormat &rFormat) const; void RequestApplyChanges() const { @@ -162,7 +162,7 @@ public: }; -inline BOOL SmFormat::operator != (const SmFormat &rFormat) const +inline sal_Bool SmFormat::operator != (const SmFormat &rFormat) const { return !(*this == rFormat); } diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index e2a21238064d..e10f2c095507 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -93,9 +93,9 @@ class SmNode : public SmRect SmNodeType eType; SmScaleMode eScaleMode; RectHorAlign eRectHorAlign; - USHORT nFlags, + sal_uInt16 nFlags, nAttributes; - BOOL bIsPhantom, + sal_Bool bIsPhantom, bIsDebug; protected: SmNode(SmNodeType eNodeType, const SmToken &rNodeToken); @@ -106,11 +106,11 @@ protected: public: virtual ~SmNode(); - virtual BOOL IsVisible() const; + virtual sal_Bool IsVisible() const; - virtual USHORT GetNumSubNodes() const; - virtual SmNode * GetSubNode(USHORT nIndex); - const SmNode * GetSubNode(USHORT nIndex) const + virtual sal_uInt16 GetNumSubNodes() const; + virtual SmNode * GetSubNode(sal_uInt16 nIndex); + const SmNode * GetSubNode(sal_uInt16 nIndex) const { return ((SmNode *) this)->GetSubNode(nIndex); } @@ -121,22 +121,22 @@ public: return ((SmNode *) this)->GetLeftMost(); } - USHORT & Flags() { return nFlags; } - USHORT & Attributes() { return nAttributes; } + sal_uInt16 & Flags() { return nFlags; } + sal_uInt16 & Attributes() { return nAttributes; } - BOOL IsDebug() const { return bIsDebug; } - BOOL IsPhantom() const { return bIsPhantom; } - void SetPhantom(BOOL bIsPhantom); + sal_Bool IsDebug() const { return bIsDebug; } + sal_Bool IsPhantom() const { return bIsPhantom; } + void SetPhantom(sal_Bool bIsPhantom); void SetColor(const Color &rColor); - void SetAttribut(USHORT nAttrib); - void ClearAttribut(USHORT nAttrib); + void SetAttribut(sal_uInt16 nAttrib); + void ClearAttribut(sal_uInt16 nAttrib); const SmFace & GetFont() const { return aFace; }; SmFace & GetFont() { return aFace; }; void SetFont(const SmFace &rFace); - void SetFontSize(const Fraction &rRelSize, USHORT nType); + void SetFontSize(const Fraction &rRelSize, sal_uInt16 nType); void SetSize(const Fraction &rScale); virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); @@ -146,7 +146,7 @@ public: void ToggleDebug() const; #endif - void SetRectHorAlign(RectHorAlign eHorAlign, BOOL bApplyToSubTree = TRUE ); + void SetRectHorAlign(RectHorAlign eHorAlign, sal_Bool bApplyToSubTree = sal_True ); RectHorAlign GetRectHorAlign() const { return eRectHorAlign; } const SmRect & GetRect() const { return *this; } @@ -166,19 +166,19 @@ public: sal_Int32 GetAccessibleIndex() const { return nAccIndex; } const SmNode * FindNodeWithAccessibleIndex(xub_StrLen nAccIndex) const; - USHORT GetRow() const { return (USHORT)aNodeToken.nRow; } - USHORT GetColumn() const { return (USHORT)aNodeToken.nCol; } + sal_uInt16 GetRow() const { return (sal_uInt16)aNodeToken.nRow; } + sal_uInt16 GetColumn() const { return (sal_uInt16)aNodeToken.nCol; } SmScaleMode GetScaleMode() const { return eScaleMode; } void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; } - virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth); - virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight); + virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth); + virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight); SmNodeType GetType() const { return eType; } const SmToken & GetToken() const { return aNodeToken; } - const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const; + const SmNode * FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const; const SmNode * FindRectClosestTo(const Point &rPoint) const; // --> 4.7.2010 #i972# @@ -203,13 +203,13 @@ public: SmStructureNode( const SmStructureNode &rNode ); virtual ~SmStructureNode(); - virtual BOOL IsVisible() const; + virtual sal_Bool IsVisible() const; - virtual USHORT GetNumSubNodes() const; - void SetNumSubNodes(USHORT nSize) { aSubNodes.resize(nSize); } + virtual sal_uInt16 GetNumSubNodes() const; + void SetNumSubNodes(sal_uInt16 nSize) { aSubNodes.resize(nSize); } using SmNode::GetSubNode; - virtual SmNode * GetSubNode(USHORT nIndex); + virtual SmNode * GetSubNode(sal_uInt16 nIndex); void SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThird = NULL); void SetSubNodes(const SmNodeArray &rNodeArray); @@ -231,10 +231,10 @@ protected: public: - virtual BOOL IsVisible() const; - virtual USHORT GetNumSubNodes() const; + virtual sal_Bool IsVisible() const; + virtual sal_uInt16 GetNumSubNodes() const; using SmNode::GetSubNode; - virtual SmNode * GetSubNode(USHORT nIndex); + virtual SmNode * GetSubNode(sal_uInt16 nIndex); }; @@ -266,8 +266,8 @@ public: : SmGraphicNode(NRECTANGLE, rNodeToken) {} - virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth); - virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight); + virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth); + virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); @@ -294,8 +294,8 @@ public: long GetWidth() const { return nWidth; } - virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth); - virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight); + virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth); + virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); @@ -312,15 +312,15 @@ public: class SmTextNode : public SmVisibleNode { XubString aText; - USHORT nFontDesc; + sal_uInt16 nFontDesc; protected: - SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ); + SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP ); public: - SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP ); + SmTextNode(const SmToken &rNodeToken, sal_uInt16 nFontDescP ); - USHORT GetFontDesc() const { return nFontDesc; } + sal_uInt16 GetFontDesc() const { return nFontDesc; } void SetText(const XubString &rText) { aText = rText; } const XubString & GetText() const { return aText; } @@ -345,7 +345,7 @@ class SmSpecialNode : public SmTextNode bool bIsFromGreekSymbolSet; protected: - SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc); + SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc); public: SmSpecialNode(const SmToken &rNodeToken); @@ -391,8 +391,8 @@ protected: public: SmMathSymbolNode(const SmToken &rNodeToken); - virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth); - virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight); + virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth); + virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight); virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); @@ -405,15 +405,15 @@ public: class SmRootSymbolNode : public SmMathSymbolNode { - ULONG nBodyWidth; // width of body (argument) of root sign + sal_uLong nBodyWidth; // width of body (argument) of root sign public: SmRootSymbolNode(const SmToken &rNodeToken) : SmMathSymbolNode(NROOTSYMBOL, rNodeToken) {} - virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth); - virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight); + virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth); + virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight); #ifdef SM_RECT_DEBUG using SmRect::Draw; @@ -481,24 +481,24 @@ public: class SmLineNode : public SmStructureNode { - BOOL bUseExtraSpaces; + sal_Bool bUseExtraSpaces; protected: SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken) : SmStructureNode(eNodeType, rNodeToken) { - bUseExtraSpaces = TRUE; + bUseExtraSpaces = sal_True; } public: SmLineNode(const SmToken &rNodeToken) : SmStructureNode(NLINE, rNodeToken) { - bUseExtraSpaces = TRUE; + bUseExtraSpaces = sal_True; } - void SetUseExtraSpaces(BOOL bVal) { bUseExtraSpaces = bVal; } - BOOL IsUseExtraSpaces() const { return bUseExtraSpaces; }; + void SetUseExtraSpaces(sal_Bool bVal) { bUseExtraSpaces = bVal; } + sal_Bool IsUseExtraSpaces() const { return bUseExtraSpaces; }; virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); @@ -599,7 +599,7 @@ public: class SmBinDiagonalNode : public SmStructureNode { - BOOL bAscending; + sal_Bool bAscending; void GetOperPosSize(Point &rPos, Size &rSize, const Point &rDiagPoint, double fAngleDeg) const; @@ -607,8 +607,8 @@ class SmBinDiagonalNode : public SmStructureNode public: SmBinDiagonalNode(const SmToken &rNodeToken); - BOOL IsAscending() const { return bAscending; } - void SetAscending(BOOL bVal) { bAscending = bVal; } + sal_Bool IsAscending() const { return bAscending; } + void SetAscending(sal_Bool bVal) { bAscending = bVal; } virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); }; @@ -642,14 +642,14 @@ enum SmSubSup class SmSubSupNode : public SmStructureNode { - BOOL bUseLimits; + sal_Bool bUseLimits; public: SmSubSupNode(const SmToken &rNodeToken) : SmStructureNode(NSUBSUP, rNodeToken) { SetNumSubNodes(1 + SUBSUP_NUM_ENTRIES); - bUseLimits = FALSE; + bUseLimits = sal_False; } SmNode * GetBody() { return GetSubNode(0); } @@ -658,10 +658,10 @@ public: return ((SmSubSupNode *) this)->GetBody(); } - void SetUseLimits(BOOL bVal) { bUseLimits = bVal; } - BOOL IsUseLimits() const { return bUseLimits; }; + void SetUseLimits(sal_Bool bVal) { bUseLimits = bVal; } + sal_Bool IsUseLimits() const { return bUseLimits; }; - SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< USHORT >(1 + eSubSup) ); }; + SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< sal_uInt16 >(1 + eSubSup) ); }; virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); void CreateTextFromNode(String &rText); @@ -785,7 +785,7 @@ public: class SmFontNode : public SmStructureNode { - USHORT nSizeType; + sal_uInt16 nSizeType; Fraction aFontSize; public: @@ -796,9 +796,9 @@ public: aFontSize = Fraction(1L); } - void SetSizeParameter(const Fraction &rValue, USHORT nType); + void SetSizeParameter(const Fraction &rValue, sal_uInt16 nType); const Fraction & GetSizeParameter() const {return aFontSize;} - const USHORT& GetSizeType() const {return nSizeType;} + const sal_uInt16& GetSizeType() const {return nSizeType;} virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); @@ -811,7 +811,7 @@ public: class SmMatrixNode : public SmStructureNode { - USHORT nNumRows, + sal_uInt16 nNumRows, nNumCols; public: @@ -821,9 +821,9 @@ public: nNumRows = nNumCols = 0; } - USHORT GetNumRows() const {return nNumRows;} - USHORT GetNumCols() const {return nNumCols;} - void SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols); + sal_uInt16 GetNumRows() const {return nNumRows;} + sal_uInt16 GetNumCols() const {return nNumCols;} + void SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols); using SmNode::GetLeftMost; virtual SmNode * GetLeftMost(); @@ -838,7 +838,7 @@ public: class SmBlankNode : public SmGraphicNode { - USHORT nNum; + sal_uInt16 nNum; public: SmBlankNode(const SmToken &rNodeToken) diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index e30193490539..04c226291538 100755 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -124,11 +124,11 @@ struct SmToken sal_Unicode cMathChar; // parse-help info - ULONG nGroup; - USHORT nLevel; + sal_uLong nGroup; + sal_uInt16 nLevel; // token position - USHORT nRow; + sal_uInt16 nRow; xub_StrLen nCol; SmToken(); @@ -185,10 +185,10 @@ class SmParser LanguageType m_nLang; xub_StrLen m_nBufferIndex, m_nTokenIndex; - USHORT m_Row, + sal_uInt16 m_Row, m_nColOff; SmConvert m_eConversion; - BOOL m_bImportSymNames, + sal_Bool m_bImportSymNames, m_bExportSymNames; // map of used symbols (used to reduce file size by exporting only actually used symbols) @@ -200,14 +200,14 @@ class SmParser protected: #if OSL_DEBUG_LEVEL - BOOL IsDelimiter( const String &rTxt, xub_StrLen nPos ); + sal_Bool IsDelimiter( const String &rTxt, xub_StrLen nPos ); #endif void NextToken(); xub_StrLen GetTokenIndex() const { return m_nTokenIndex; } - void Insert(const String &rText, USHORT nPos); - void Replace( USHORT nPos, USHORT nLen, const String &rText ); + void Insert(const String &rText, sal_uInt16 nPos); + void Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText ); - inline BOOL TokenInGroup(ULONG nGroup); + inline sal_Bool TokenInGroup(sal_uLong nGroup); // grammar void Table(); @@ -216,7 +216,7 @@ protected: void Relation(); void Sum(); void Product(); - void SubSup(ULONG nActiveGroup); + void SubSup(sal_uLong nActiveGroup); void OpSubSup(); void Power(); void Blank(); @@ -232,7 +232,7 @@ protected: void FontSize(); void Color(); void Brace(); - void Bracebody(BOOL bIsLeftRight); + void Bracebody(sal_Bool bIsLeftRight); void Function(); void Binom(); void Stack(); @@ -259,25 +259,25 @@ public: SmConvert GetConversion() const { return m_eConversion; } void SetConversion(SmConvert eConv) { m_eConversion = eConv; } - BOOL IsImportSymbolNames() const { return m_bImportSymNames; } - void SetImportSymbolNames(BOOL bVal) { m_bImportSymNames = bVal; } - BOOL IsExportSymbolNames() const { return m_bExportSymNames; } - void SetExportSymbolNames(BOOL bVal) { m_bExportSymNames = bVal; } + sal_Bool IsImportSymbolNames() const { return m_bImportSymNames; } + void SetImportSymbolNames(sal_Bool bVal) { m_bImportSymNames = bVal; } + sal_Bool IsExportSymbolNames() const { return m_bExportSymNames; } + void SetExportSymbolNames(sal_Bool bVal) { m_bExportSymNames = bVal; } - USHORT AddError(SmParseError Type, SmNode *pNode); + sal_uInt16 AddError(SmParseError Type, SmNode *pNode); const SmErrorDesc * NextError(); const SmErrorDesc * PrevError(); - const SmErrorDesc * GetError(USHORT i = 0xFFFF); + const SmErrorDesc * GetError(sal_uInt16 i = 0xFFFF); bool IsUsedSymbol( const String &rSymbolName ) const { return m_aUsedSymbols.find( rSymbolName ) != m_aUsedSymbols.end(); } std::set< rtl::OUString > GetUsedSymbols() const { return m_aUsedSymbols; } }; -inline BOOL SmParser::TokenInGroup(ULONG nGroup) +inline sal_Bool SmParser::TokenInGroup(sal_uLong nGroup) { - return (m_aCurToken.nGroup & nGroup) ? TRUE : FALSE; + return (m_aCurToken.nGroup & nGroup) ? sal_True : sal_False; } diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx index f1af81c5c163..a92500c2f667 100644 --- a/starmath/inc/rect.hxx +++ b/starmath/inc/rect.hxx @@ -39,10 +39,10 @@ #include "format.hxx" -BOOL SmGetGlyphBoundRect(const OutputDevice &rDev, +sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev, const XubString &rText, Rectangle &rRect); -BOOL SmIsMathAlpha(const XubString &rText); +sal_Bool SmIsMathAlpha(const XubString &rText); inline long SmFromTo(long nFrom, long nTo, double fRelDist) @@ -104,17 +104,17 @@ class SmRect nItalicRightSpace, nLoAttrFence, nHiAttrFence; - USHORT nBorderWidth; - BOOL bHasBaseline, + sal_uInt16 nBorderWidth; + sal_Bool bHasBaseline, bHasAlignInfo; protected: void BuildRect (const OutputDevice &rDev, const SmFormat *pFormat, - const XubString &rText, USHORT nBorderWidth); + const XubString &rText, sal_uInt16 nBorderWidth); void Init(const OutputDevice &rDev, const SmFormat *pFormat, - const XubString &rText, USHORT nBorderWidth); + const XubString &rText, sal_uInt16 nBorderWidth); - void ClearBaseline() { bHasBaseline = FALSE; }; + void ClearBaseline() { bHasBaseline = sal_False; }; inline void CopyMBL(const SmRect& rRect); void CopyAlignInfo(const SmRect& rRect); @@ -128,12 +128,12 @@ public: SmRect(const SmRect &rRect); - USHORT GetBorderWidth() const { return nBorderWidth; } + sal_uInt16 GetBorderWidth() const { return nBorderWidth; } void SetItalicSpaces(long nLeftSpace, long nRightSpace); - void SetWidth(ULONG nWidth) { aSize.Width() = nWidth; } - void SetHeight(ULONG nHeight) { aSize.Height() = nHeight; } + void SetWidth(sal_uLong nWidth) { aSize.Width() = nWidth; } + void SetHeight(sal_uLong nHeight) { aSize.Height() = nHeight; } void SetLeft(long nLeft); void SetRight(long nRight); @@ -164,7 +164,7 @@ public: long GetItalicRight() const { return GetRight() + GetItalicRightSpace(); } long GetItalicWidth() const { return GetWidth() + GetItalicLeftSpace() + GetItalicRightSpace(); } - BOOL HasBaseline() const { return bHasBaseline; } + sal_Bool HasBaseline() const { return bHasBaseline; } inline long GetBaseline() const; long GetBaselineOffset() const { return GetBaseline() - GetTop(); } @@ -187,12 +187,12 @@ public: void Move (const Point &rPosition); void MoveTo(const Point &rPosition) { Move(rPosition - GetTopLeft()); } - BOOL IsEmpty() const + sal_Bool IsEmpty() const { return GetWidth() == 0 || GetHeight() == 0; } - BOOL HasAlignInfo() const { return bHasAlignInfo; } + sal_Bool HasAlignInfo() const { return bHasAlignInfo; } const Point AlignTo(const SmRect &rRect, RectPos ePos, RectHorAlign eHor, RectVerAlign eVer) const; @@ -201,11 +201,11 @@ public: SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode, long nNewAlignM); SmRect & ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode, - BOOL bKeepVerAlignParams); + sal_Bool bKeepVerAlignParams); long OrientedDist(const Point &rPoint) const; - BOOL IsInsideRect(const Point &rPoint) const; - BOOL IsInsideItalicRect(const Point &rPoint) const; + sal_Bool IsInsideRect(const Point &rPoint) const; + sal_Bool IsInsideItalicRect(const Point &rPoint) const; inline SmRect & operator = (const SmRect &rRect); diff --git a/starmath/inc/smdll.hxx b/starmath/inc/smdll.hxx index 79f51a82f912..6634badc2f94 100644 --- a/starmath/inc/smdll.hxx +++ b/starmath/inc/smdll.hxx @@ -37,12 +37,12 @@ class SfxFilter; class SmDLL { - static BOOL bInitialized; + static sal_Bool bInitialized; public: static void Init(); static void Exit(); - static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter, + static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ); }; diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 4de625e449e1..a41bcc20f909 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -69,7 +69,7 @@ class VirtualDevice; class SmResId : public ResId { public: - SmResId(USHORT nId); + SmResId(sal_uInt16 nId); }; class SmNamesArray : public Resource @@ -80,7 +80,7 @@ class SmNamesArray : public Resource public: SmNamesArray( LanguageType nLang, int nRID ) : Resource( SmResId(RID_LOCALIZED_NAMES) ), - aNamesAry (SmResId( static_cast < USHORT > ( nRID ))), + aNamesAry (SmResId( static_cast < sal_uInt16 > ( nRID ))), nLanguage (nLang) { FreeResource(); @@ -169,9 +169,9 @@ public: } //virtuelle Methoden fuer den Optionendialog - virtual SfxItemSet* CreateItemSet( USHORT nId ); - virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet ); - virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ); + virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ); + virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet ); + virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet ); }; #define SM_MOD() ( *(SmModule**) GetAppData(SHL_SM) ) diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index 621538790300..9d142f1c12b9 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -83,13 +83,13 @@ class SmSym String m_aExportName; String m_aSetName; sal_UCS4 m_cChar; - BOOL m_bPredefined; - BOOL m_bDocSymbol; + sal_Bool m_bPredefined; + sal_Bool m_bDocSymbol; public: SmSym(); SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar, - const String& rSet, BOOL bIsPredefined = FALSE); + const String& rSet, sal_Bool bIsPredefined = sal_False); SmSym(const SmSym& rSymbol); SmSym& operator = (const SmSym& rSymbol); @@ -105,14 +105,14 @@ public: //! because ten the key would not be the same as its supposed copy here // void SetName( const String &rTxt ) { m_aName = rTxt; } - BOOL IsPredefined() const { return m_bPredefined; } + sal_Bool IsPredefined() const { return m_bPredefined; } const String & GetSymbolSetName() const { return m_aSetName; } void SetSymbolSetName( const String &rName ) { m_aSetName = rName; } const String & GetExportName() const { return m_aExportName; } void SetExportName( const String &rName ) { m_aExportName = rName; } - BOOL IsDocSymbol() const { return m_bDocSymbol; } - void SetDocSymbol( BOOL bVal ) { m_bDocSymbol = bVal; } + sal_Bool IsDocSymbol() const { return m_bDocSymbol; } + void SetDocSymbol( sal_Bool bVal ) { m_bDocSymbol = bVal; } // true if rSymbol has the same name, font and character bool IsEqualInUI( const SmSym& rSymbol ) const; @@ -167,7 +167,7 @@ public: std::set< String > GetSymbolSetNames() const; const SymbolPtrVec_t GetSymbolSet( const String& rSymbolSetName ); - USHORT GetSymbolCount() const { return static_cast< USHORT >(m_aSymbols.size()); } + sal_uInt16 GetSymbolCount() const { return static_cast< sal_uInt16 >(m_aSymbols.size()); } const SymbolPtrVec_t GetSymbols() const; bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false ); void RemoveSymbol( const String & rSymbolName ); diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx index fcc1b046f2dd..6ea7bd1a860f 100755..100644 --- a/starmath/inc/toolbox.hxx +++ b/starmath/inc/toolbox.hxx @@ -45,18 +45,18 @@ protected: ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES]; ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */ ImageList *aImageListsH[NUM_TBX_CATEGORIES + 1]; /* high contrast */ - USHORT nActiveCategoryRID; + sal_uInt16 nActiveCategoryRID; - virtual BOOL Close(); + virtual sal_Bool Close(); virtual void GetFocus(); - void ApplyImageLists( USHORT nCategoryRID ); + void ApplyImageLists( sal_uInt16 nCategoryRID ); DECL_LINK( CategoryClickHdl, ToolBox* ); DECL_LINK( CmdSelectHdl, ToolBox* ); SmViewShell * GetView(); - const ImageList * GetImageList( USHORT nResId, BOOL bHighContrast ); + const ImageList * GetImageList( sal_uInt16 nResId, sal_Bool bHighContrast ); public: SmToolBoxWindow(SfxBindings *pBindings, @@ -68,8 +68,8 @@ public: virtual void StateChanged( StateChangedType nStateChange ); virtual void DataChanged( const DataChangedEvent &rEvt ); - void AdjustPosSize( BOOL bSetPos ); - void SetCategory(USHORT nCategory); + void AdjustPosSize( sal_Bool bSetPos ); + void SetCategory(sal_uInt16 nCategory); }; /**************************************************************************/ @@ -80,7 +80,7 @@ class SmToolBoxWrapper : public SfxChildWindow protected: SmToolBoxWrapper(Window *pParentWindow, - USHORT, SfxBindings*, SfxChildWinInfo*); + sal_uInt16, SfxBindings*, SfxChildWinInfo*); }; #endif diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx index 8ee5795c38b4..c5377a48cf6b 100644 --- a/starmath/inc/unomodel.hxx +++ b/starmath/inc/unomodel.hxx @@ -94,7 +94,7 @@ public: //XServiceInfo virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xParent ) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException ); diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index d01c894af592..3c2f8b1f61c8 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -93,8 +93,8 @@ SmViewShell * SmGetActiveView(); // SmFace // -BOOL IsItalic( const Font &rFont ); -BOOL IsBold( const Font &rFont ); +sal_Bool IsItalic( const Font &rFont ); +sal_Bool IsBold( const Font &rFont ); class SmFace : public Font { @@ -139,12 +139,12 @@ SmFace & operator *= (SmFace &rFace, const Fraction &rFrac); class SmInfoText : public FixedText { protected: - USHORT nMaxLen; + sal_uInt16 nMaxLen; String aText; public: - SmInfoText(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 128); - SmInfoText(Window* pParent, const ResId& rResId, USHORT nMax = 128); + SmInfoText(Window* pParent, WinBits nWinStyle = 0, sal_uInt16 nMax = 128); + SmInfoText(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 128); void SetText(const String& rStr); @@ -161,28 +161,28 @@ public: class SmPickList : public SfxPtrArr { protected: - USHORT nSize; + sal_uInt16 nSize; virtual void *CreateItem(const String& rString) = 0; virtual void *CreateItem(const void *pItem) = 0; virtual void DestroyItem(void *pItem) = 0; - virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0; + virtual sal_Bool CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0; virtual String GetStringItem(void *pItem) = 0; - void *GetPtr(USHORT nPos) const { return SfxPtrArr::GetObject(nPos); } - void *&GetPtr(USHORT nPos) { return SfxPtrArr::GetObject(nPos); } - void InsertPtr(USHORT nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); } - void RemovePtr(USHORT nPos, USHORT nCount = 1) { SfxPtrArr::Remove(nPos, nCount); } + void *GetPtr(sal_uInt16 nPos) const { return SfxPtrArr::GetObject(nPos); } + void *&GetPtr(sal_uInt16 nPos) { return SfxPtrArr::GetObject(nPos); } + void InsertPtr(sal_uInt16 nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); } + void RemovePtr(sal_uInt16 nPos, sal_uInt16 nCount = 1) { SfxPtrArr::Remove(nPos, nCount); } public: - SmPickList(USHORT nInitSize = 0, USHORT nMaxSize = 5); + SmPickList(sal_uInt16 nInitSize = 0, sal_uInt16 nMaxSize = 5); virtual ~SmPickList(); SmPickList& operator = (const SmPickList& rList); - void *Get(USHORT nPos = 0) const { return GetPtr(nPos); } + void *Get(sal_uInt16 nPos = 0) const { return GetPtr(nPos); } using SfxPtrArr::Insert; void Insert(const void* pItem); void Update(const void* pItem, const void *pNewItem); @@ -190,10 +190,10 @@ public: void Remove(const void* pItem); using SfxPtrArr::operator []; - void *operator [] (USHORT nPos) const { return GetPtr(nPos); } + void *operator [] (sal_uInt16 nPos) const { return GetPtr(nPos); } - USHORT GetSize() const { return nSize; } - USHORT Count() const { return SfxPtrArr::Count(); } + sal_uInt16 GetSize() const { return nSize; } + sal_uInt16 Count() const { return SfxPtrArr::Count(); } void Clear(); }; @@ -211,14 +211,14 @@ protected: virtual void *CreateItem(const void *pItem); virtual void DestroyItem(void *pItem); - virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const; + virtual sal_Bool CompareItem(const void *pFirstItem, const void *pSecondItem) const; virtual String GetStringItem(void *pItem); public: SmStringPickList() : SmPickList(0, 5) {} - SmStringPickList(USHORT nInitSize, USHORT nMaxSize) + SmStringPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize) : SmPickList(nInitSize, nMaxSize) {} SmStringPickList(const SmPickList& rOrig ) : SmPickList(rOrig) {} @@ -228,11 +228,11 @@ public: virtual void Update(const String &rString, const String &rNewString); virtual void Remove(const String &rString); - inline BOOL Contains(const String &rString) const; - inline String Get(USHORT nPos = 0) const; + inline sal_Bool Contains(const String &rString) const; + inline String Get(sal_uInt16 nPos = 0) const; inline SmStringPickList& operator = (const SmStringPickList& rList); - inline String operator [] (USHORT nPos) const; + inline String operator [] (sal_uInt16 nPos) const; }; inline SmStringPickList& SmStringPickList::operator = (const SmStringPickList& rList) @@ -240,17 +240,17 @@ inline SmStringPickList& SmStringPickList::operator = (const SmStringPickList& r *(SmPickList *)this = *(SmPickList *)&rList; return *this; } -inline String SmStringPickList::operator [] (USHORT nPos) const +inline String SmStringPickList::operator [] (sal_uInt16 nPos) const { return *((String *)SmPickList::operator[](nPos)); } -inline String SmStringPickList::Get(USHORT nPos) const +inline String SmStringPickList::Get(sal_uInt16 nPos) const { return nPos < Count() ? *((String *)SmPickList::Get(nPos)) : String(); } -inline BOOL SmStringPickList::Contains(const String &rString) const +inline sal_Bool SmStringPickList::Contains(const String &rString) const { return SmPickList::Contains((void *)&rString); } @@ -270,14 +270,14 @@ protected: virtual void *CreateItem(const void *pItem); virtual void DestroyItem(void *pItem); - virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const; + virtual sal_Bool CompareItem(const void *pFirstItem, const void *pSecondItem) const; virtual String GetStringItem(void *pItem); public: SmFontPickList() : SmPickList(0, 5) {} - SmFontPickList(USHORT nInitSize, USHORT nMaxSize) + SmFontPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize) : SmPickList(nInitSize, nMaxSize) {} SmFontPickList(const SmPickList& rOrig ) : SmPickList(rOrig) {} @@ -291,12 +291,12 @@ public: virtual void Remove(const Font &rFont); using SmPickList::Contains; - inline BOOL Contains(const Font &rFont) const; - inline Font Get(USHORT nPos = 0) const; + inline sal_Bool Contains(const Font &rFont) const; + inline Font Get(sal_uInt16 nPos = 0) const; inline SmFontPickList& operator = (const SmFontPickList& rList); using SfxPtrArr::operator []; - inline Font operator [] (USHORT nPos) const; + inline Font operator [] (sal_uInt16 nPos) const; void ReadFrom(const SmFontDialog& rDialog); void WriteTo(SmFontDialog& rDialog) const; @@ -307,17 +307,17 @@ inline SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList) *(SmPickList *)this = *(SmPickList *)&rList; return *this; } -inline Font SmFontPickList::operator [] (USHORT nPos) const +inline Font SmFontPickList::operator [] (sal_uInt16 nPos) const { return *((Font *)SmPickList::operator[](nPos)); } -inline Font SmFontPickList::Get(USHORT nPos) const +inline Font SmFontPickList::Get(sal_uInt16 nPos) const { return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font(); } -inline BOOL SmFontPickList::Contains(const Font &rFont) const +inline sal_Bool SmFontPickList::Contains(const Font &rFont) const { return SmPickList::Contains((void *)&rFont); } @@ -336,8 +336,8 @@ protected: DECL_LINK(SelectHdl, ComboBox *); public: - SmStringPickComboBox(Window* pParent, WinBits nWinStyle = 0, USHORT nMax = 4); - SmStringPickComboBox(Window* pParent, const ResId& rResId, USHORT nMax = 4); + SmStringPickComboBox(Window* pParent, WinBits nWinStyle = 0, sal_uInt16 nMax = 4); + SmStringPickComboBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 4); SmStringPickComboBox& operator = (const SmStringPickList& rList); @@ -360,7 +360,7 @@ protected: DECL_LINK(SelectHdl, ListBox *); public: - SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax = 4); + SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 4); SmFontPickListBox& operator = (const SmFontPickList& rList); diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index 0eae96d02328..ae3c14d84e5c 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -58,13 +58,13 @@ class SmGraphicWindow : public ScrollableWindow SmGraphicAccessible * pAccessible; SmViewShell *pViewShell; - USHORT nZoom; + sal_uInt16 nZoom; short nModifyCount; - BOOL bIsCursorVisible; + sal_Bool bIsCursorVisible; protected: void SetFormulaDrawPos(const Point &rPos) { aFormulaDrawPos = rPos; } - void SetIsCursorVisible(BOOL bVis) { bIsCursorVisible = bVis; } + void SetIsCursorVisible(sal_Bool bVis) { bIsCursorVisible = bVis; } using Window::SetCursor; void SetCursor(const SmNode *pNode); void SetCursor(const Rectangle &rRect); @@ -88,9 +88,9 @@ public: SmViewShell * GetView() { return pViewShell; } using Window::SetZoom; - void SetZoom(USHORT Factor); + void SetZoom(sal_uInt16 Factor); using Window::GetZoom; - USHORT GetZoom() const { return nZoom; } + sal_uInt16 GetZoom() const { return nZoom; } const Point & GetFormulaDrawPos() const { return aFormulaDrawPos; } @@ -98,9 +98,9 @@ public: using ScrollableWindow::SetTotalSize; void SetTotalSize(); - BOOL IsCursorVisible() const { return bIsCursorVisible; } - void ShowCursor(BOOL bShow); - const SmNode * SetCursorPos(USHORT nRow, USHORT nCol); + sal_Bool IsCursorVisible() const { return bIsCursorVisible; } + void ShowCursor(sal_Bool bShow); + const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol); void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg ); @@ -118,8 +118,8 @@ class SmGraphicController: public SfxControllerItem protected: SmGraphicWindow &rGraphic; public: - SmGraphicController(SmGraphicWindow &, USHORT, SfxBindings & ); - virtual void StateChanged(USHORT nSID, + SmGraphicController(SmGraphicWindow &, sal_uInt16, SfxBindings & ); + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState); }; @@ -132,12 +132,12 @@ protected: SmEditWindow &rEdit; public: - SmEditController(SmEditWindow &, USHORT, SfxBindings & ); + SmEditController(SmEditWindow &, sal_uInt16, SfxBindings & ); #if OSL_DEBUG_LEVEL > 1 virtual ~SmEditController(); #endif - virtual void StateChanged(USHORT nSID, + virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState); }; @@ -148,7 +148,7 @@ class SmCmdBoxWindow : public SfxDockingWindow { SmEditWindow aEdit; SmEditController aController; - BOOL bExiting; + sal_Bool bExiting; Timer aInitialFocusTimer; @@ -189,7 +189,7 @@ class SmCmdBoxWrapper : public SfxChildWindow protected: SmCmdBoxWrapper(Window *pParentWindow, - USHORT nId, + sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo); @@ -224,7 +224,7 @@ class SmViewShell: public SfxViewShell ::com::sun::star::lang:: XEventListener > xClipEvtLstnr; SmClipboardChangeListener* pClipEvtLstnr; SmViewShell_Impl* pImpl; - BOOL bPasteState; + sal_Bool bPasteState; DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -242,20 +242,20 @@ protected: void DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, - USHORT MaxWidth); + sal_uInt16 MaxWidth); - virtual USHORT Print(SfxProgress &rProgress, BOOL bIsAPI); - virtual SfxPrinter *GetPrinter(BOOL bCreate = FALSE); - virtual USHORT SetPrinter(SfxPrinter *pNewPrinter, - USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false); + virtual sal_uInt16 Print(SfxProgress &rProgress, sal_Bool bIsAPI); + virtual SfxPrinter *GetPrinter(sal_Bool bCreate = sal_False); + virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter, + sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false); - BOOL Insert( SfxMedium& rMedium ); - BOOL InsertFrom(SfxMedium &rMedium); + sal_Bool Insert( SfxMedium& rMedium ); + sal_Bool InsertFrom(SfxMedium &rMedium); virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent, const SfxItemSet &rOptions); - virtual void Deactivate(BOOL IsMDIActivate); - virtual void Activate(BOOL IsMDIActivate); + virtual void Deactivate(sal_Bool IsMDIActivate); + virtual void Activate(sal_Bool IsMDIActivate); virtual Size GetOptimalSizePixel() const; virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize); virtual void InnerResizePixel(const Point &rOfs, const Size &rSize); |