summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-14 17:19:25 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-14 17:19:25 +0100
commit7302c3fd6cc445f83da7182e3211db9befa58842 (patch)
treea503a134546594b2b90f5b62b2f71270c2c6ff4b
parent33a41e6fbb03d46470c4fcbd88baef836421d514 (diff)
removetooltypes01: #i112600# Remove tool types from binfilter, starmath, svx, toolkit and xmloff
-rw-r--r--starmath/inc/applicat.hxx2
-rw-r--r--starmath/inc/config.hxx2
-rw-r--r--starmath/inc/dialog.hxx106
-rw-r--r--starmath/inc/document.hxx46
-rw-r--r--starmath/inc/edit.hxx14
-rwxr-xr-xstarmath/inc/format.hxx50
-rw-r--r--starmath/inc/node.hxx124
-rw-r--r--starmath/inc/parse.hxx38
-rw-r--r--starmath/inc/rect.hxx32
-rw-r--r--starmath/inc/smdll.hxx4
-rw-r--r--starmath/inc/smmod.hxx10
-rw-r--r--starmath/inc/symbol.hxx14
-rw-r--r--starmath/inc/toolbox.hxx14
-rw-r--r--starmath/inc/unomodel.hxx2
-rw-r--r--starmath/inc/utility.hxx70
-rw-r--r--starmath/inc/view.hxx48
-rw-r--r--starmath/source/accessibility.cxx112
-rw-r--r--starmath/source/accessibility.hxx60
-rw-r--r--starmath/source/cfgitem.cxx246
-rw-r--r--starmath/source/cfgitem.hxx72
-rw-r--r--starmath/source/config.cxx22
-rw-r--r--starmath/source/dialog.cxx314
-rw-r--r--starmath/source/document.cxx140
-rw-r--r--starmath/source/edit.cxx64
-rw-r--r--starmath/source/format.cxx36
-rw-r--r--starmath/source/mathmlexport.cxx24
-rw-r--r--starmath/source/mathmlimport.cxx74
-rw-r--r--starmath/source/mathmlimport.hxx6
-rw-r--r--starmath/source/mathtype.cxx124
-rw-r--r--starmath/source/mathtype.hxx4
-rwxr-xr-xstarmath/source/node.cxx296
-rwxr-xr-xstarmath/source/parse.cxx144
-rw-r--r--starmath/source/rect.cxx52
-rw-r--r--starmath/source/smdetect.cxx16
-rw-r--r--starmath/source/smdll.cxx10
-rw-r--r--starmath/source/smmod.cxx28
-rw-r--r--starmath/source/symbol.cxx20
-rw-r--r--starmath/source/toolbox.cxx46
-rwxr-xr-xstarmath/source/unomodel.cxx14
-rw-r--r--starmath/source/utility.cxx30
-rwxr-xr-xstarmath/source/view.cxx138
41 files changed, 1334 insertions, 1334 deletions
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
index fd3936adac..65f61bd67d 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 0fa37b49bb..14a7c022e5 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 d6b294e25e..1668a05c4c 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -74,7 +74,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:
@@ -120,7 +120,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);
@@ -150,7 +150,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;
@@ -187,7 +187,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;
@@ -203,24 +203,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];
}
@@ -246,8 +246,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 *);
@@ -256,12 +256,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);
@@ -288,7 +288,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;
@@ -303,9 +303,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);
@@ -318,8 +318,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; }
@@ -372,7 +372,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();
@@ -381,12 +381,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(); }
};
////////////////////////////////////////////////////////////////////////////////
@@ -457,22 +457,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
@@ -485,7 +485,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;
@@ -493,28 +493,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 fb2aa9d994..1466aeea71 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -49,15 +49,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)"
@@ -121,19 +121,19 @@ class SmDocShell : public SfxObjectShell, public SfxListener
nRightBorder,
nTopBorder,
nBottomBorder;
- USHORT nModifyCount;
- BOOL bIsFormulaArranged;
+ sal_uInt16 nModifyCount;
+ sal_Bool bIsFormulaArranged;
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,
@@ -143,24 +143,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();
@@ -180,7 +180,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 * );
@@ -218,7 +218,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 084501e153..081bd01995 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 7b360f98d0..304602d7d4 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 d97b2b99fd..d1d56e9fa6 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 314f2353d3..ce5ccef843 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -119,10 +119,10 @@ struct SmToken
SmTokenType eType;
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();
@@ -178,10 +178,10 @@ class SmParser
LanguageType nLang;
xub_StrLen BufferIndex,
nTokenIndex;
- USHORT Row,
+ sal_uInt16 Row,
ColOff;
SmConvert eConversion;
- BOOL bImportSymNames,
+ sal_Bool bImportSymNames,
bExportSymNames;
// declare copy-constructor and assignment-operator private
@@ -190,14 +190,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 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();
@@ -206,7 +206,7 @@ protected:
void Relation();
void Sum();
void Product();
- void SubSup(ULONG nActiveGroup);
+ void SubSup(sal_uLong nActiveGroup);
void OpSubSup();
void Power();
void Blank();
@@ -222,7 +222,7 @@ protected:
void FontSize();
void Color();
void Brace();
- void Bracebody(BOOL bIsLeftRight);
+ void Bracebody(sal_Bool bIsLeftRight);
void Function();
void Binom();
void Stack();
@@ -246,22 +246,22 @@ public:
SmConvert GetConversion() const { return eConversion; }
void SetConversion(SmConvert eConv) { eConversion = eConv; }
- BOOL IsImportSymbolNames() const { return bImportSymNames; }
- void SetImportSymbolNames(BOOL bVal) { bImportSymNames = bVal; }
- BOOL IsExportSymbolNames() const { return bExportSymNames; }
- void SetExportSymbolNames(BOOL bVal) { bExportSymNames = bVal; }
+ sal_Bool IsImportSymbolNames() const { return bImportSymNames; }
+ void SetImportSymbolNames(sal_Bool bVal) { bImportSymNames = bVal; }
+ sal_Bool IsExportSymbolNames() const { return bExportSymNames; }
+ void SetExportSymbolNames(sal_Bool bVal) { 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);
};
-inline BOOL SmParser::TokenInGroup(ULONG nGroup)
+inline sal_Bool SmParser::TokenInGroup(sal_uLong nGroup)
{
- return (CurToken.nGroup & nGroup) ? TRUE : FALSE;
+ return (CurToken.nGroup & nGroup) ? sal_True : sal_False;
}
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 78d98d593f..cfe84dcc21 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 01a1f22a7a..055d8e27d6 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 e727893cf2..9dc63467b2 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 c7b55c91c6..d70de09cb4 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 49583a7b5e..e4ae409123 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 03a3cf6014..fc70f67065 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 1b3da15bfa..29079678ca 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 76f64c60c8..a5924b6cc6 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, PrintDialog *pPrintDialog = 0);
- 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, PrintDialog *pPrintDialog = 0);
+ 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);
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index c9972a9702..a28b92c60c 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -348,8 +348,8 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
@@ -500,7 +500,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
throw (IndexOutOfBoundsException, RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nIndex && nIndex < nLen))
throw IndexOutOfBoundsException();
return Sequence< beans::PropertyValue >();
@@ -684,11 +684,11 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
throw (IndexOutOfBoundsException, RuntimeException)
{
vos::OGuard aGuard(Application::GetSolarMutex());
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nStartIndex && nStartIndex < nLen) ||
!(0 <= nEndIndex && nEndIndex < nLen))
throw IndexOutOfBoundsException();
- return FALSE;
+ return sal_False;
}
OUString SAL_CALL SmGraphicAccessible::getText()
@@ -916,7 +916,7 @@ SmViewForwarder::~SmViewForwarder()
{
}
-BOOL SmViewForwarder::IsValid() const
+sal_Bool SmViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -1013,13 +1013,13 @@ IMPL_LINK(SmTextForwarder, NotifyHdl, EENotify*, aNotify)
return 0;
}
-USHORT SmTextForwarder::GetParagraphCount() const
+sal_uInt16 SmTextForwarder::GetParagraphCount() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetParagraphCount() : 0;
}
-USHORT SmTextForwarder::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SmTextForwarder::GetTextLen( sal_uInt16 nParagraph ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetTextLen( nParagraph ) : 0;
@@ -1035,7 +1035,7 @@ String SmTextForwarder::GetText( const ESelection& rSel ) const
return aRet;
}
-SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
DBG_ASSERT( pEditEngine, "EditEngine missing" );
@@ -1065,17 +1065,17 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAt
}
}
-SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SmTextForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
DBG_ASSERT( pEditEngine, "EditEngine missing" );
SfxItemSet aSet( pEditEngine->GetParaAttribs( nPara ) );
- USHORT nWhich = EE_PARA_START;
+ sal_uInt16 nWhich = EE_PARA_START;
while( nWhich <= EE_PARA_END )
{
- if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON )
+ if( aSet.GetItemState( nWhich, sal_True ) != SFX_ITEM_ON )
{
if( pEditEngine->HasParaAttrib( nPara, nWhich ) )
aSet.Put( pEditEngine->GetParaAttrib( nPara, nWhich ) );
@@ -1086,7 +1086,7 @@ SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
return aSet;
}
-void SmTextForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SmTextForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1106,7 +1106,7 @@ void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRem
pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
}
-void SmTextForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SmTextForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1141,15 +1141,15 @@ void SmTextForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection&
pEditEngine->QuickSetAttribs( rSet, rSel );
}
-BOOL SmTextForwarder::IsValid() const
+sal_Bool SmTextForwarder::IsValid() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
// cannot reliably query EditEngine state
// while in the middle of an update
- return pEditEngine ? pEditEngine->GetUpdateMode() : FALSE;
+ return pEditEngine ? pEditEngine->GetUpdateMode() : sal_False;
}
-XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
XubString aTxt;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1158,11 +1158,11 @@ XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nP
return aTxt;
}
-void SmTextForwarder::FieldClicked(const SvxFieldItem&, USHORT, USHORT)
+void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16)
{
}
-USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
+sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
{
EECharAttribArray aAttribs;
@@ -1171,16 +1171,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
SfxItemState eState = SFX_ITEM_DEFAULT;
// check all paragraphs inside the selection
- for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
+ for( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
{
SfxItemState eParaState = SFX_ITEM_DEFAULT;
// calculate start and endpos for this paragraph
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( rSel.nStartPara == nPara )
nPos = rSel.nStartPos;
- USHORT nEndPos = rSel.nEndPos;
+ sal_uInt16 nEndPos = rSel.nEndPos;
if( rSel.nEndPara != nPara )
nEndPos = rEditEngine.GetTextLen( nPara );
@@ -1188,13 +1188,13 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
// get list of char attribs
rEditEngine.GetCharAttribs( nPara, aAttribs );
- BOOL bEmpty = TRUE; // we found no item inside the selektion of this paragraph
- BOOL bGaps = FALSE; // we found items but theire gaps between them
- USHORT nLastEnd = nPos;
+ sal_Bool bEmpty = sal_True; // we found no item inside the selektion of this paragraph
+ sal_Bool bGaps = sal_False; // we found items but theire gaps between them
+ sal_uInt16 nLastEnd = nPos;
const SfxPoolItem* pParaItem = NULL;
- for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
+ for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
{
struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib );
DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
@@ -1222,16 +1222,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
}
if( bEmpty )
- bEmpty = FALSE;
+ bEmpty = sal_False;
if( !bGaps && aAttrib.nStart > nLastEnd )
- bGaps = TRUE;
+ bGaps = sal_True;
nLastEnd = aAttrib.nEnd;
}
if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) )
- bGaps = TRUE;
+ bGaps = sal_True;
/*
// since we have no portion with our item or if there were gaps
if( bEmpty || bGaps )
@@ -1294,18 +1294,18 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
return eState;
}
-USHORT SmTextForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich );
return nState;
}
-USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
@@ -1315,30 +1315,30 @@ USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
return nState;
}
-LanguageType SmTextForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+LanguageType SmTextForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLanguage(nPara, nIndex) : LANGUAGE_NONE;
}
-USHORT SmTextForwarder::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetFieldCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldCount(nPara) : 0;
}
-EFieldInfo SmTextForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SmTextForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldInfo( nPara, nField ) : EFieldInfo();
}
-EBulletInfo SmTextForwarder::GetBulletInfo( USHORT /*nPara*/ ) const
+EBulletInfo SmTextForwarder::GetBulletInfo( sal_uInt16 /*nPara*/ ) const
{
return EBulletInfo();
}
-Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SmTextForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1362,7 +1362,7 @@ Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
return aRect;
}
-Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
+Rectangle SmTextForwarder::GetParaBounds( sal_uInt16 nPara ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1370,8 +1370,8 @@ Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
if (pEditEngine)
{
const Point aPnt = pEditEngine->GetDocPosTopLeft( nPara );
- const ULONG nWidth = pEditEngine->CalcTextWidth();
- const ULONG nHeight = pEditEngine->GetTextHeight( nPara );
+ const sal_uLong nWidth = pEditEngine->CalcTextWidth();
+ const sal_uLong nHeight = pEditEngine->GetTextHeight( nPara );
aRect = Rectangle( aPnt.X(), aPnt.Y(), aPnt.X() + nWidth, aPnt.Y() + nHeight );
}
@@ -1390,7 +1390,7 @@ OutputDevice* SmTextForwarder::GetRefDevice() const
return pEditEngine ? pEditEngine->GetRefDevice() : 0;
}
-sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1404,7 +1404,7 @@ sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USH
return bRes;
}
-sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SmTextForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1425,7 +1425,7 @@ sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& n
return bRes;
}
-sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SmTextForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ?
@@ -1433,31 +1433,31 @@ sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndInde
: sal_False;
}
-USHORT SmTextForwarder::GetLineCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetLineCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineCount(nPara) : 0;
}
-USHORT SmTextForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SmTextForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineLen(nPara, nLine) : 0;
}
-void SmTextForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+void SmTextForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
pEditEngine->GetLineBoundaries(rStart, rEnd, nPara, nLine);
}
-USHORT SmTextForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SmTextForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineNumberAtIndex(nPara, nIndex) : 0;
}
-sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
+sal_Bool SmTextForwarder::QuickFormatDoc( sal_Bool /*bFull*/ )
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1469,13 +1469,13 @@ sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
return bRes;
}
-sal_Int16 SmTextForwarder::GetDepth( USHORT /*nPara*/ ) const
+sal_Int16 SmTextForwarder::GetDepth( sal_uInt16 /*nPara*/ ) const
{
// math has no outliner...
return -1;
}
-sal_Bool SmTextForwarder::SetDepth( USHORT /*nPara*/, sal_Int16 nNewDepth )
+sal_Bool SmTextForwarder::SetDepth( sal_uInt16 /*nPara*/, sal_Int16 nNewDepth )
{
// math has no outliner...
return -1 == nNewDepth; // is it the value from 'GetDepth' ?
@@ -1524,12 +1524,12 @@ void SmTextForwarder::AppendParagraph()
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
- USHORT nParaCount = pEditEngine->GetParagraphCount();
+ sal_uInt16 nParaCount = pEditEngine->GetParagraphCount();
pEditEngine->InsertParagraph( nParaCount, String() );
}
}
-xub_StrLen SmTextForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet )
+xub_StrLen SmTextForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet )
{
xub_StrLen nRes = 0;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1573,7 +1573,7 @@ SmEditViewForwarder::~SmEditViewForwarder()
{
}
-BOOL SmEditViewForwarder::IsValid() const
+sal_Bool SmEditViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -1937,8 +1937,8 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index d50d181090..dd666109a5 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -193,7 +193,7 @@ public:
SmViewForwarder( SmEditAccessible &rAcc );
virtual ~SmViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -216,17 +216,17 @@ public:
SmTextForwarder( SmEditAccessible& rAcc, SmEditSource & rSource );
virtual ~SmTextForwarder();
- virtual USHORT GetParagraphCount() const;
- virtual USHORT GetTextLen( USHORT nParagraph ) const;
+ virtual sal_uInt16 GetParagraphCount() const;
+ virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const;
virtual String GetText( const ESelection& rSel ) const;
- virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const;
+ virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
- virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const;
+ virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const;
- virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
- virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const;
+ virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
+ virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
virtual void QuickInsertText( const String& rText, const ESelection& rSel );
virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -235,36 +235,36 @@ public:
virtual SfxItemPool* GetPool() const;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked(const SvxFieldItem&, USHORT, USHORT);
- virtual BOOL IsValid() const;
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16);
+ virtual sal_Bool IsValid() const;
- virtual LanguageType GetLanguage( USHORT, USHORT ) const;
- virtual USHORT GetFieldCount( USHORT nPara ) const;
- virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
- virtual EBulletInfo GetBulletInfo( USHORT nPara ) const;
- virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const;
- virtual Rectangle GetParaBounds( USHORT nPara ) const;
+ virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const;
+ virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const;
+ virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
+ virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const;
+ virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const;
virtual MapMode GetMapMode() const;
virtual OutputDevice* GetRefDevice() const;
- virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const;
- virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const;
- virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
- virtual USHORT GetLineCount( USHORT nPara ) const;
- virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
- virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
- virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nLine ) const;
+ virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
+ virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
+ virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const;
+ virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
virtual const SfxItemSet* GetEmptyItemSetPtr();
// implementation functions for XParagraphAppend and XTextPortionAppend
virtual void AppendParagraph();
- virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet );
+ virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
virtual void CopyText(const SvxTextForwarder& rSource);
};
@@ -283,7 +283,7 @@ public:
SmEditViewForwarder( SmEditAccessible& rAcc );
virtual ~SmEditViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 5973e8b0d6..db0e554440 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -68,7 +68,7 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
Sequence< OUString > aNames( 6 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -94,7 +94,7 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
Sequence< OUString > aNames( 4 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -168,14 +168,14 @@ static const char * aFormatPropNames[] =
static Sequence< OUString > lcl_GetPropertyNames(
- const char * aPropNames[], USHORT nCount )
+ const char * aPropNames[], sal_uInt16 nCount )
{
const char** ppPropName = aPropNames;
Sequence< OUString > aNames( nCount );
OUString *pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i, ++ppPropName)
+ for (sal_Int32 i = 0; i < nCount; ++i, ++ppPropName)
{
pNames[i] = A2OU( *ppPropName );
}
@@ -186,14 +186,14 @@ static Sequence< OUString > lcl_GetPropertyNames(
static Sequence< OUString > GetFormatPropertyNames()
{
- USHORT nCnt = sizeof(aFormatPropNames) / sizeof(aFormatPropNames[0]);
+ sal_uInt16 nCnt = sizeof(aFormatPropNames) / sizeof(aFormatPropNames[0]);
return lcl_GetPropertyNames( aFormatPropNames, nCnt );
}
static Sequence< OUString > GetOtherPropertyNames()
{
- USHORT nCnt = sizeof(aMathPropNames) / sizeof(aMathPropNames[0]);
+ sal_uInt16 nCnt = sizeof(aMathPropNames) / sizeof(aMathPropNames[0]);
return lcl_GetPropertyNames( aMathPropNames, nCnt );
}
@@ -202,15 +202,15 @@ static Sequence< OUString > GetOtherPropertyNames()
struct SmCfgOther
{
SmPrintSize ePrintSize;
- USHORT nPrintZoomFactor;
- BOOL bPrintTitle;
- BOOL bPrintFormulaText;
- BOOL bPrintFrame;
- BOOL bIgnoreSpacesRight;
- BOOL bToolboxVisible;
- BOOL bAutoRedraw;
- BOOL bFormulaCursor;
- //BOOL bNoSymbolsWarning;
+ sal_uInt16 nPrintZoomFactor;
+ sal_Bool bPrintTitle;
+ sal_Bool bPrintFormulaText;
+ sal_Bool bPrintFrame;
+ sal_Bool bIgnoreSpacesRight;
+ sal_Bool bToolboxVisible;
+ sal_Bool bAutoRedraw;
+ sal_Bool bFormulaCursor;
+ //sal_Bool bNoSymbolsWarning;
SmCfgOther();
};
@@ -223,7 +223,7 @@ SmCfgOther::SmCfgOther()
bPrintTitle = bPrintFormulaText =
bPrintFrame = bIgnoreSpacesRight =
bToolboxVisible = bAutoRedraw =
- bFormulaCursor = /*bNoSymbolsWarning =*/ TRUE;
+ bFormulaCursor = /*bNoSymbolsWarning =*/ sal_True;
}
/////////////////////////////////////////////////////////////////
@@ -243,11 +243,11 @@ SmFontFormat::SmFontFormat()
SmFontFormat::SmFontFormat( const Font &rFont )
{
aName = rFont.GetName();
- nCharSet = (INT16) rFont.GetCharSet();
- nFamily = (INT16) rFont.GetFamily();
- nPitch = (INT16) rFont.GetPitch();
- nWeight = (INT16) rFont.GetWeight();
- nItalic = (INT16) rFont.GetItalic();
+ nCharSet = (sal_Int16) rFont.GetCharSet();
+ nFamily = (sal_Int16) rFont.GetFamily();
+ nPitch = (sal_Int16) rFont.GetPitch();
+ nWeight = (sal_Int16) rFont.GetWeight();
+ nItalic = (sal_Int16) rFont.GetItalic();
}
@@ -264,7 +264,7 @@ const Font SmFontFormat::GetFont() const
}
-BOOL SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const
+sal_Bool SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const
{
return aName == rFntFmt.aName &&
nCharSet == rFntFmt.nCharSet &&
@@ -286,7 +286,7 @@ SmFntFmtListEntry::SmFntFmtListEntry( const String &rId, const SmFontFormat &rFn
SmFontFormatList::SmFontFormatList()
{
- bModified = FALSE;
+ bModified = sal_False;
}
@@ -295,7 +295,7 @@ void SmFontFormatList::Clear()
if (!aEntries.empty())
{
aEntries.clear();
- SetModified( TRUE );
+ SetModified( sal_True );
}
}
@@ -309,7 +309,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
aEntries.push_back( aEntry );
- SetModified( TRUE );
+ SetModified( sal_True );
}
}
@@ -324,7 +324,7 @@ void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
{
// remove entry if found
aEntries.erase( aEntries.begin() + i );
- SetModified( TRUE );
+ SetModified( sal_True );
break;
}
}
@@ -375,7 +375,7 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co
}
-const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd )
+const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, sal_Bool bAdd )
{
String aRes( GetFontFormatId( rFntFmt) );
if (0 == aRes.Len() && bAdd)
@@ -403,8 +403,8 @@ const String SmFontFormatList::GetNewFontFormatId() const
String aRes;
String aPrefix( RTL_CONSTASCII_STRINGPARAM( "Id" ) );
- INT32 nCnt = GetCount();
- for (INT32 i = 1; i <= nCnt + 1; ++i)
+ sal_Int32 nCnt = GetCount();
+ for (sal_Int32 i = 1; i <= nCnt + 1; ++i)
{
String aTmpId( aPrefix );
aTmpId += String::CreateFromInt32( i );
@@ -429,7 +429,7 @@ SmMathConfig::SmMathConfig() :
pFontFormatList = 0;
pSymbolMgr = 0;
- bIsOtherModified = bIsFormatModified = FALSE;
+ bIsOtherModified = bIsFormatModified = sal_False;
}
@@ -443,19 +443,19 @@ SmMathConfig::~SmMathConfig()
}
-void SmMathConfig::SetOtherModified( BOOL bVal )
+void SmMathConfig::SetOtherModified( sal_Bool bVal )
{
bIsOtherModified = bVal;
}
-void SmMathConfig::SetFormatModified( BOOL bVal )
+void SmMathConfig::SetFormatModified( sal_Bool bVal )
{
bIsFormatModified = bVal;
}
-void SmMathConfig::SetFontFormatListModified( BOOL bVal )
+void SmMathConfig::SetFontFormatListModified( sal_Bool bVal )
{
if (pFontFormatList)
pFontFormatList->SetModified( bVal );
@@ -467,11 +467,11 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
const rtl::OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -490,27 +490,27 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
Font aFont;
sal_UCS4 cChar = '\0';
String aSet;
- BOOL bPredefined = FALSE;
+ sal_Bool bPredefined = sal_False;
OUString aTmpStr;
- INT32 nTmp32 = 0;
- BOOL bTmp = FALSE;
+ sal_Int32 nTmp32 = 0;
+ sal_Bool bTmp = sal_False;
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if (pValue->hasValue() && (*pValue >>= nTmp32))
cChar = static_cast< sal_UCS4 >( nTmp32 );
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
aSet = aTmpStr;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= bTmp))
bPredefined = bTmp;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
{
@@ -520,7 +520,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
aFont = pFntFmt->GetFont();
}
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (bOK)
@@ -581,7 +581,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
rSymbols.resize( nNodes );
std::vector< SmSym >::iterator aIt( rSymbols.begin() );
@@ -599,7 +599,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
const OUString *pNames = aNames.getConstArray();
- sal_uIntPtr nSymbolProps = sal::static_int_cast< UINT32 >(aNames.getLength());
+ sal_uIntPtr nSymbolProps = sal::static_int_cast< sal_uInt32 >(aNames.getLength());
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
@@ -635,11 +635,11 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Predefined
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (BOOL) rSymbol.IsPredefined();
+ pVal->Value <<= (sal_Bool) rSymbol.IsPredefined();
pVal++;
// FontFormatId
SmFontFormat aFntFmt( rSymbol.GetFace() );
- String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, TRUE ) );
+ String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, sal_True ) );
DBG_ASSERT( aFntFmtId.Len(), "FontFormatId not found" );
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
@@ -673,9 +673,9 @@ void SmMathConfig::LoadFontFormatList()
Sequence< OUString > aNodes( GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
- for (INT32 i = 0; i < nNodes; ++i)
+ for (sal_Int32 i = 0; i < nNodes; ++i)
{
SmFontFormat aFntFmt;
ReadFontFormat( aFntFmt, pNode[i], A2OU( FONT_FORMAT_LIST ) );
@@ -686,7 +686,7 @@ void SmMathConfig::LoadFontFormatList()
pFontFormatList->AddFontFormat( pNode[i], aFntFmt );
}
}
- pFontFormatList->SetModified( FALSE );
+ pFontFormatList->SetModified( sal_False );
}
@@ -694,11 +694,11 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const OUString &rSymbolName, const OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -716,38 +716,38 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const Any * pValue = aValues.getConstArray();
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
rFontFormat.aName = aTmpStr;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nCharSet = nTmp16; // 6.0 file-format GetSOLoadTextEncoding not needed
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nFamily = nTmp16;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nPitch = nTmp16;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nWeight = nTmp16;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nItalic = nTmp16;
else
- bOK = FALSE;
+ bOK = sal_False;
++pValue;
DBG_ASSERT( bOK, "read FontFormat failed" );
@@ -763,7 +763,7 @@ void SmMathConfig::SaveFontFormatList()
return;
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nSymbolProps = aNames.getLength();
+ sal_Int32 nSymbolProps = aNames.getLength();
size_t nCount = rFntFmtList.GetCount();
@@ -792,34 +792,34 @@ void SmMathConfig::SaveFontFormatList()
// CharSet
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
+ pVal->Value <<= (sal_Int16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
pVal++;
// Family
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nFamily;
+ pVal->Value <<= (sal_Int16) aFntFmt.nFamily;
pVal++;
// Pitch
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nPitch;
+ pVal->Value <<= (sal_Int16) aFntFmt.nPitch;
pVal++;
// Weight
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nWeight;
+ pVal->Value <<= (sal_Int16) aFntFmt.nWeight;
pVal++;
// Italic
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nItalic;
+ pVal->Value <<= (sal_Int16) aFntFmt.nItalic;
pVal++;
}
DBG_ASSERT( static_cast<size_t>(pVal - pValues) == (nCount * nSymbolProps),
"properties missing" );
ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues );
- rFntFmtList.SetModified( FALSE );
+ rFntFmtList.SetModified( sal_False );
}
@@ -833,12 +833,12 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
for (i = 0; i < rSymbols.size(); ++i)
{
DBG_ASSERT( rSymbols[i].GetName().Len() > 0, "non named symbol" );
- aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE );
+ aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , sal_True );
}
const SmFormat & rStdFmt = GetStandardFormat();
for (i = FNT_BEGIN; i <= FNT_END; ++i)
{
- aUsedList.GetFontFormatId( SmFontFormat( rStdFmt.GetFont( i ) ) , TRUE );
+ aUsedList.GetFontFormatId( SmFontFormat( rStdFmt.GetFont( i ) ) , sal_True );
}
// remove unused font-formats from list
@@ -870,7 +870,7 @@ void SmMathConfig::LoadOther()
pOther = new SmCfgOther;
Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -878,8 +878,8 @@ void SmMathConfig::LoadOther()
const Any *pValues = aValues.getConstArray();
const Any *pVal = pValues;
- INT16 nTmp16 = 0;
- BOOL bTmp = FALSE;
+ sal_Int16 nTmp16 = 0;
+ sal_Bool bTmp = sal_False;
// Print/Title
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -924,7 +924,7 @@ void SmMathConfig::LoadOther()
++pVal;
DBG_ASSERT( pVal - pValues == nProps, "property mismatch" );
- SetOtherModified( FALSE );
+ SetOtherModified( sal_False );
}
}
@@ -935,38 +935,38 @@ void SmMathConfig::SaveOther()
return;
const Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// Print/Title
- *pValue++ <<= (BOOL) pOther->bPrintTitle;
+ *pValue++ <<= (sal_Bool) pOther->bPrintTitle;
// Print/FormulaText
- *pValue++ <<= (BOOL) pOther->bPrintFormulaText;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFormulaText;
// Print/Frame
- *pValue++ <<= (BOOL) pOther->bPrintFrame;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFrame;
// Print/Size
- *pValue++ <<= (INT16) pOther->ePrintSize;
+ *pValue++ <<= (sal_Int16) pOther->ePrintSize;
// Print/ZoomFactor
- *pValue++ <<= (INT16) pOther->nPrintZoomFactor;
+ *pValue++ <<= (sal_Int16) pOther->nPrintZoomFactor;
/* // Misc/NoSymbolsWarning
- *pValue++ <<= (BOOL) pOther->bNoSymbolsWarning;
+ *pValue++ <<= (sal_Bool) pOther->bNoSymbolsWarning;
*/
// Misc/IgnoreSpacesRight
- *pValue++ <<= (BOOL) pOther->bIgnoreSpacesRight;
+ *pValue++ <<= (sal_Bool) pOther->bIgnoreSpacesRight;
// View/ToolboxVisible
- *pValue++ <<= (BOOL) pOther->bToolboxVisible;
+ *pValue++ <<= (sal_Bool) pOther->bToolboxVisible;
// View/AutoRedraw
- *pValue++ <<= (BOOL) pOther->bAutoRedraw;
+ *pValue++ <<= (sal_Bool) pOther->bAutoRedraw;
// View/FormulaCursor
- *pValue++ <<= (BOOL) pOther->bFormulaCursor;
+ *pValue++ <<= (sal_Bool) pOther->bFormulaCursor;
DBG_ASSERT( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
- SetOtherModified( FALSE );
+ SetOtherModified( sal_False );
}
void SmMathConfig::LoadFormat()
@@ -976,7 +976,7 @@ void SmMathConfig::LoadFormat()
Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -985,8 +985,8 @@ void SmMathConfig::LoadFormat()
const Any *pVal = pValues;
OUString aTmpStr;
- INT16 nTmp16 = 0;
- BOOL bTmp = FALSE;
+ sal_Int16 nTmp16 = 0;
+ sal_Bool bTmp = sal_False;
// StandardFormat/Textmode
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -1009,7 +1009,7 @@ void SmMathConfig::LoadFormat()
pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) );
++pVal;
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
{
if (pVal->hasValue() && (*pVal >>= nTmp16))
@@ -1028,7 +1028,7 @@ void SmMathConfig::LoadFormat()
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
Font aFnt;
- BOOL bUseDefaultFont = TRUE;
+ sal_Bool bUseDefaultFont = sal_True;
if (pVal->hasValue() && (*pVal >>= aTmpStr))
{
bUseDefaultFont = 0 == aTmpStr.getLength();
@@ -1052,7 +1052,7 @@ void SmMathConfig::LoadFormat()
}
DBG_ASSERT( pVal - pValues == nProps, "property mismatch" );
- SetFormatModified( FALSE );
+ SetFormatModified( sal_False );
}
}
@@ -1063,30 +1063,30 @@ void SmMathConfig::SaveFormat()
return;
const Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// StandardFormat/Textmode
- *pValue++ <<= (BOOL) pFormat->IsTextmode();
+ *pValue++ <<= (sal_Bool) pFormat->IsTextmode();
// StandardFormat/GreekCharStyle
- *pValue++ <<= (INT16) pFormat->GetGreekCharStyle();
+ *pValue++ <<= (sal_Int16) pFormat->GetGreekCharStyle();
// StandardFormat/ScaleNormalBracket
- *pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets();
+ *pValue++ <<= (sal_Bool) pFormat->IsScaleNormalBrackets();
// StandardFormat/HorizontalAlignment
- *pValue++ <<= (INT16) pFormat->GetHorAlign();
+ *pValue++ <<= (sal_Int16) pFormat->GetHorAlign();
// StandardFormat/BaseSize
- *pValue++ <<= (INT16) SmRoundFraction( Sm100th_mmToPts(
+ *pValue++ <<= (sal_Int16) SmRoundFraction( Sm100th_mmToPts(
pFormat->GetBaseSize().Height() ) );
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetRelSize( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetRelSize( i );
for (i = DIS_BEGIN; i <= DIS_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetDistance( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetDistance( i );
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
@@ -1095,7 +1095,7 @@ void SmMathConfig::SaveFormat()
if (!pFormat->IsDefaultFont( i ))
{
SmFontFormat aFntFmt( pFormat->GetFont( i ) );
- aFntFmtId = GetFontFormatList().GetFontFormatId( aFntFmt, TRUE );
+ aFntFmtId = GetFontFormatList().GetFontFormatId( aFntFmt, sal_True );
DBG_ASSERT( aFntFmtId.getLength(), "FontFormatId not found" );
}
@@ -1105,7 +1105,7 @@ void SmMathConfig::SaveFormat()
DBG_ASSERT( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
- SetFormatModified( FALSE );
+ SetFormatModified( sal_False );
}
@@ -1117,20 +1117,20 @@ const SmFormat & SmMathConfig::GetStandardFormat() const
}
-void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, BOOL bSaveFontFormatList )
+void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, sal_Bool bSaveFontFormatList )
{
if (!pFormat)
LoadFormat();
if (rFormat != *pFormat)
{
*pFormat = rFormat;
- SetFormatModified( TRUE );
+ SetFormatModified( sal_True );
SaveFormat();
if (bSaveFontFormatList)
{
// needed for SmFontTypeDialog's DefaultButtonClickHdl
- SetFontFormatListModified( TRUE );
+ SetFontFormatListModified( sal_True );
SaveFontFormatList();
}
}
@@ -1152,12 +1152,12 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
if (eSize != pOther->ePrintSize)
{
pOther->ePrintSize = eSize;
- SetOtherModified( TRUE );
+ SetOtherModified( sal_True );
}
}
-USHORT SmMathConfig::GetPrintZoomFactor() const
+sal_uInt16 SmMathConfig::GetPrintZoomFactor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1165,29 +1165,29 @@ USHORT SmMathConfig::GetPrintZoomFactor() const
}
-void SmMathConfig::SetPrintZoomFactor( USHORT nVal )
+void SmMathConfig::SetPrintZoomFactor( sal_uInt16 nVal )
{
if (!pOther)
LoadOther();
if (nVal != pOther->nPrintZoomFactor)
{
pOther->nPrintZoomFactor = nVal;
- SetOtherModified( TRUE );
+ SetOtherModified( sal_True );
}
}
-void SmMathConfig::SetOtherIfNotEqual( BOOL &rbItem, BOOL bNewVal )
+void SmMathConfig::SetOtherIfNotEqual( sal_Bool &rbItem, sal_Bool bNewVal )
{
if (bNewVal != rbItem)
{
rbItem = bNewVal;
- SetOtherModified( TRUE );
+ SetOtherModified( sal_True );
}
}
-BOOL SmMathConfig::IsPrintTitle() const
+sal_Bool SmMathConfig::IsPrintTitle() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1195,7 +1195,7 @@ BOOL SmMathConfig::IsPrintTitle() const
}
-void SmMathConfig::SetPrintTitle( BOOL bVal )
+void SmMathConfig::SetPrintTitle( sal_Bool bVal )
{
if (!pOther)
LoadOther();
@@ -1203,7 +1203,7 @@ void SmMathConfig::SetPrintTitle( BOOL bVal )
}
-BOOL SmMathConfig::IsPrintFormulaText() const
+sal_Bool SmMathConfig::IsPrintFormulaText() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1211,7 +1211,7 @@ BOOL SmMathConfig::IsPrintFormulaText() const
}
-void SmMathConfig::SetPrintFormulaText( BOOL bVal )
+void SmMathConfig::SetPrintFormulaText( sal_Bool bVal )
{
if (!pOther)
LoadOther();
@@ -1219,7 +1219,7 @@ void SmMathConfig::SetPrintFormulaText( BOOL bVal )
}
-BOOL SmMathConfig::IsPrintFrame() const
+sal_Bool SmMathConfig::IsPrintFrame() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1227,7 +1227,7 @@ BOOL SmMathConfig::IsPrintFrame() const
}
-void SmMathConfig::SetPrintFrame( BOOL bVal )
+void SmMathConfig::SetPrintFrame( sal_Bool bVal )
{
if (!pOther)
LoadOther();
@@ -1235,7 +1235,7 @@ void SmMathConfig::SetPrintFrame( BOOL bVal )
}
-BOOL SmMathConfig::IsIgnoreSpacesRight() const
+sal_Bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1243,7 +1243,7 @@ BOOL SmMathConfig::IsIgnoreSpacesRight() const
}
-void SmMathConfig::SetIgnoreSpacesRight( BOOL bVal )
+void SmMathConfig::SetIgnoreSpacesRight( sal_Bool bVal )
{
if (!pOther)
LoadOther();
@@ -1251,7 +1251,7 @@ void SmMathConfig::SetIgnoreSpacesRight( BOOL bVal )
}
-BOOL SmMathConfig::IsAutoRedraw() const
+sal_Bool SmMathConfig::IsAutoRedraw() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1259,7 +1259,7 @@ BOOL SmMathConfig::IsAutoRedraw() const
}
-void SmMathConfig::SetAutoRedraw( BOOL bVal )
+void SmMathConfig::SetAutoRedraw( sal_Bool bVal )
{
if (!pOther)
LoadOther();
@@ -1267,7 +1267,7 @@ void SmMathConfig::SetAutoRedraw( BOOL bVal )
}
-BOOL SmMathConfig::IsShowFormulaCursor() const
+sal_Bool SmMathConfig::IsShowFormulaCursor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1275,7 +1275,7 @@ BOOL SmMathConfig::IsShowFormulaCursor() const
}
-void SmMathConfig::SetShowFormulaCursor( BOOL bVal )
+void SmMathConfig::SetShowFormulaCursor( sal_Bool bVal )
{
if (!pOther)
LoadOther();
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 824b65f85b..41bc64d68c 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -60,17 +60,17 @@ struct SmCfgOther;
struct SmFontFormat
{
String aName;
- INT16 nCharSet;
- INT16 nFamily;
- INT16 nPitch;
- INT16 nWeight;
- INT16 nItalic;
+ sal_Int16 nCharSet;
+ sal_Int16 nFamily;
+ sal_Int16 nPitch;
+ sal_Int16 nWeight;
+ sal_Int16 nItalic;
SmFontFormat();
SmFontFormat( const Font &rFont );
const Font GetFont() const;
- BOOL operator == ( const SmFontFormat &rFntFmt ) const;
+ sal_Bool operator == ( const SmFontFormat &rFntFmt ) const;
};
@@ -85,7 +85,7 @@ struct SmFntFmtListEntry
class SmFontFormatList
{
std::deque<SmFntFmtListEntry> aEntries;
- BOOL bModified;
+ sal_Bool bModified;
// disallow copy-constructor and assignment-operator for now
SmFontFormatList( const SmFontFormatList & );
@@ -101,13 +101,13 @@ public:
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
const SmFontFormat * GetFontFormat( size_t nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
- const String GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd );
+ const String GetFontFormatId( const SmFontFormat &rFntFmt, sal_Bool bAdd );
const String GetFontFormatId( size_t nPos ) const;
const String GetNewFontFormatId() const;
size_t GetCount() const { return aEntries.size(); }
- BOOL IsModified() const { return bModified; }
- void SetModified( BOOL bVal ) { bModified = bVal; }
+ sal_Bool IsModified() const { return bModified; }
+ void SetModified( sal_Bool bVal ) { bModified = bVal; }
};
@@ -119,8 +119,8 @@ class SmMathConfig : public utl::ConfigItem
SmCfgOther * pOther;
SmFontFormatList * pFontFormatList;
SmSymbolManager * pSymbolMgr;
- BOOL bIsOtherModified;
- BOOL bIsFormatModified;
+ sal_Bool bIsOtherModified;
+ sal_Bool bIsFormatModified;
// disallow copy-constructor and assignment-operator for now
SmMathConfig( const SmMathConfig & );
@@ -139,7 +139,7 @@ class SmMathConfig : public utl::ConfigItem
const rtl::OUString &rSymbolName,
const rtl::OUString &rBaseNode ) const;
- void SetOtherIfNotEqual( BOOL &rbItem, BOOL bNewVal );
+ void SetOtherIfNotEqual( sal_Bool &rbItem, sal_Bool bNewVal );
protected:
void LoadOther();
@@ -149,12 +149,12 @@ protected:
void LoadFontFormatList();
void SaveFontFormatList();
- void SetOtherModified( BOOL bVal );
- inline BOOL IsOtherModified() const { return bIsOtherModified; }
- void SetFormatModified( BOOL bVal );
- inline BOOL IsFormatModified() const { return bIsFormatModified; }
- void SetFontFormatListModified( BOOL bVal );
- inline BOOL IsFontFormatListModified() const { return pFontFormatList ? pFontFormatList->IsModified(): FALSE; }
+ void SetOtherModified( sal_Bool bVal );
+ inline sal_Bool IsOtherModified() const { return bIsOtherModified; }
+ void SetFormatModified( sal_Bool bVal );
+ inline sal_Bool IsFormatModified() const { return bIsFormatModified; }
+ void SetFontFormatListModified( sal_Bool bVal );
+ inline sal_Bool IsFontFormatListModified() const { return pFontFormatList ? pFontFormatList->IsModified(): sal_False; }
SmFontFormatList & GetFontFormatList();
const SmFontFormatList & GetFontFormatList() const
@@ -183,25 +183,25 @@ public:
void SetSymbols( const std::vector< SmSym > &rNewSymbols );
const SmFormat & GetStandardFormat() const;
- void SetStandardFormat( const SmFormat &rFormat, BOOL bSaveFontFormatList = FALSE );
-
- BOOL IsPrintTitle() const;
- void SetPrintTitle( BOOL bVal );
- BOOL IsPrintFormulaText() const;
- void SetPrintFormulaText( BOOL bVal );
- BOOL IsPrintFrame() const;
- void SetPrintFrame( BOOL bVal );
+ void SetStandardFormat( const SmFormat &rFormat, sal_Bool bSaveFontFormatList = sal_False );
+
+ sal_Bool IsPrintTitle() const;
+ void SetPrintTitle( sal_Bool bVal );
+ sal_Bool IsPrintFormulaText() const;
+ void SetPrintFormulaText( sal_Bool bVal );
+ sal_Bool IsPrintFrame() const;
+ void SetPrintFrame( sal_Bool bVal );
SmPrintSize GetPrintSize() const;
void SetPrintSize( SmPrintSize eSize );
- USHORT GetPrintZoomFactor() const;
- void SetPrintZoomFactor( USHORT nVal );
-
- BOOL IsIgnoreSpacesRight() const;
- void SetIgnoreSpacesRight( BOOL bVal );
- BOOL IsAutoRedraw() const;
- void SetAutoRedraw( BOOL bVal );
- BOOL IsShowFormulaCursor() const;
- void SetShowFormulaCursor( BOOL bVal );
+ sal_uInt16 GetPrintZoomFactor() const;
+ void SetPrintZoomFactor( sal_uInt16 nVal );
+
+ sal_Bool IsIgnoreSpacesRight() const;
+ void SetIgnoreSpacesRight( sal_Bool bVal );
+ sal_Bool IsAutoRedraw() const;
+ void SetAutoRedraw( sal_Bool bVal );
+ sal_Bool IsShowFormulaCursor() const;
+ void SetShowFormulaCursor( sal_Bool bVal );
};
/////////////////////////////////////////////////////////////////
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index b06be09534..ebf8f8eeaa 100644
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -64,33 +64,33 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
{
const SfxPoolItem *pItem = NULL;
- UINT16 nU16;
- BOOL bVal;
- if (rSet.GetItemState(SID_PRINTSIZE, TRUE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nU16;
+ sal_Bool bVal;
+ if (rSet.GetItemState(SID_PRINTSIZE, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintSize( (SmPrintSize) nU16 );
}
- if (rSet.GetItemState(SID_PRINTZOOM, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTZOOM, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintZoomFactor( nU16 );
}
- if (rSet.GetItemState(SID_PRINTTITLE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTITLE, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintTitle( bVal );
}
- if (rSet.GetItemState(SID_PRINTTEXT, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTEXT, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFormulaText( bVal );
}
- if (rSet.GetItemState(SID_PRINTFRAME, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTFRAME, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFrame( bVal );
}
- if (rSet.GetItemState(SID_AUTOREDRAW, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_AUTOREDRAW, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetAutoRedraw( bVal );
}
- if (rSet.GetItemState(SID_NO_RIGHT_SPACES, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_NO_RIGHT_SPACES, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
if (IsIgnoreSpacesRight() != bVal)
{
@@ -111,9 +111,9 @@ void SmConfig::ConfigToItemSet(SfxItemSet &rSet) const
const SfxItemPool *pPool = rSet.GetPool();
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTSIZE),
- (UINT16) GetPrintSize()));
+ (sal_uInt16) GetPrintSize()));
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTZOOM),
- (UINT16) GetPrintZoomFactor()));
+ (sal_uInt16) GetPrintZoomFactor()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTITLE), IsPrintTitle()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTEXT), IsPrintFormulaText()));
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 84cfd95186..0c02c5d140 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -81,9 +81,9 @@ class SmFontStyles
public:
SmFontStyles();
- USHORT GetCount() const { return 4; }
+ sal_uInt16 GetCount() const { return 4; }
const String & GetStyleName( const Font &rFont ) const;
- const String & GetStyleName( USHORT nIdx ) const;
+ const String & GetStyleName( sal_uInt16 nIdx ) const;
};
@@ -103,7 +103,7 @@ SmFontStyles::SmFontStyles() :
const String & SmFontStyles::GetStyleName( const Font &rFont ) const
{
//! compare also SmSpecialNode::Prepare
- BOOL bBold = IsBold( rFont ),
+ sal_Bool bBold = IsBold( rFont ),
bItalic = IsItalic( rFont );
if (bBold && bItalic)
@@ -117,7 +117,7 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
}
-const String & SmFontStyles::GetStyleName( USHORT nIdx ) const
+const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
{
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
@@ -148,10 +148,10 @@ void SetFontStyle(const XubString &rStyleName, Font &rFont)
{
// finden des Index passend zum StyleName fuer den leeren StyleName wird
// 0 (nicht bold nicht italic) angenommen.
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
if (rStyleName.Len())
{
- USHORT i;
+ sal_uInt16 i;
const SmFontStyles &rStyles = GetFontStyles();
for (i = 0; i < rStyles.GetCount(); i++)
if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == COMPARE_EQUAL)
@@ -201,9 +201,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
}
-BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
{
- UINT16 nPrintSize;
+ sal_uInt16 nPrintSize;
if (aSizeNormal.IsChecked())
nPrintSize = PRINT_SIZE_NORMAL;
else if (aSizeScaled.IsChecked())
@@ -211,14 +211,14 @@ BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
else
nPrintSize = PRINT_SIZE_ZOOMED;
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (UINT16) nPrintSize));
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (UINT16) aZoom.GetValue()));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (sal_uInt16) nPrintSize));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (sal_uInt16) aZoom.GetValue()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTITLE), aTitle.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTEXT), aText.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
- return TRUE;
+ return sal_True;
}
@@ -288,7 +288,7 @@ IMPL_LINK_INLINE_END( SmFontDialog, FontSelectHdl, ComboBox *, pComboBox )
IMPL_LINK( SmFontDialog, FontModifyHdl, ComboBox *, pComboBox )
{
// if font is available in list then use it
- USHORT nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
+ sal_uInt16 nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
if (COMBOBOX_ENTRY_NOTFOUND != nPos)
{
FontSelectHdl( pComboBox );
@@ -327,7 +327,7 @@ void SmFontDialog::SetFont(const Font &rFont)
SmFontDialog::SmFontDialog(Window * pParent,
- OutputDevice *pFntListDevice, BOOL bHideCheckboxes, BOOL bFreeRes)
+ OutputDevice *pFntListDevice, sal_Bool bHideCheckboxes, sal_Bool bFreeRes)
: ModalDialog(pParent,SmResId(RID_FONTDIALOG)),
aFixedText1 (this, SmResId(1)),
aFontBox (this, SmResId(1)),
@@ -346,8 +346,8 @@ SmFontDialog::SmFontDialog(Window * pParent,
FontList aFontList( pFntListDevice );
- USHORT nCount = aFontList.GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = aFontList.GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFontBox.InsertEntry( aFontList.GetFontName(i).GetName() );
Face.SetSize(Size(0, 24));
@@ -356,7 +356,7 @@ SmFontDialog::SmFontDialog(Window * pParent,
Face.SetFamily(FAMILY_DONTKNOW);
Face.SetPitch(PITCH_DONTKNOW);
Face.SetCharSet(RTL_TEXTENCODING_DONTKNOW);
- Face.SetTransparent(TRUE);
+ Face.SetTransparent(sal_True);
InitColor_Impl();
@@ -371,13 +371,13 @@ SmFontDialog::SmFontDialog(Window * pParent,
if (bHideCheckboxes)
{
- aBoldCheckBox.Check( FALSE );
- aBoldCheckBox.Enable( FALSE );
- aBoldCheckBox.Show( FALSE );
- aItalicCheckBox.Check( FALSE );
- aItalicCheckBox.Enable( FALSE );
- aItalicCheckBox.Show( FALSE );
- aFixedText2.Show( FALSE );
+ aBoldCheckBox.Check( sal_False );
+ aBoldCheckBox.Enable( sal_False );
+ aBoldCheckBox.Show( sal_False );
+ aItalicCheckBox.Check( sal_False );
+ aItalicCheckBox.Enable( sal_False );
+ aItalicCheckBox.Show( sal_False );
+ aFixedText2.Show( sal_False );
Size aSize( aFontBox.GetSizePixel() );
long nComboBoxBottom = aFontBox.GetPosPixel().Y() + aFontBox.GetSizePixel().Height();
@@ -438,7 +438,7 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton
}
-SmFontSizeDialog::SmFontSizeDialog(Window * pParent, BOOL bFreeRes)
+SmFontSizeDialog::SmFontSizeDialog(Window * pParent, sal_Bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_FONTSIZEDIALOG)),
aFixedText1(this, SmResId(1)),
aBaseSize(this, SmResId(1)),
@@ -482,14 +482,14 @@ void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
{
rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(aBaseSize.GetValue()))) );
- rFormat.SetRelSize(SIZ_TEXT, (USHORT) aTextSize .GetValue());
- rFormat.SetRelSize(SIZ_INDEX, (USHORT) aIndexSize .GetValue());
- rFormat.SetRelSize(SIZ_FUNCTION, (USHORT) aFunctionSize.GetValue());
- rFormat.SetRelSize(SIZ_OPERATOR, (USHORT) aOperatorSize.GetValue());
- rFormat.SetRelSize(SIZ_LIMITS, (USHORT) aBorderSize .GetValue());
+ rFormat.SetRelSize(SIZ_TEXT, (sal_uInt16) aTextSize .GetValue());
+ rFormat.SetRelSize(SIZ_INDEX, (sal_uInt16) aIndexSize .GetValue());
+ rFormat.SetRelSize(SIZ_FUNCTION, (sal_uInt16) aFunctionSize.GetValue());
+ rFormat.SetRelSize(SIZ_OPERATOR, (sal_uInt16) aOperatorSize.GetValue());
+ rFormat.SetRelSize(SIZ_LIMITS, (sal_uInt16) aBorderSize .GetValue());
const Size aTmp (rFormat.GetBaseSize());
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
rFormat.SetFontSize(i, aTmp);
rFormat.RequestApplyChanges();
@@ -503,16 +503,16 @@ IMPL_LINK( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu )
{
SmFontPickListBox *pActiveListBox;
- BOOL bHideCheckboxes = FALSE;
+ sal_Bool bHideCheckboxes = sal_False;
switch (pMenu->GetCurItemId())
{
case 1: pActiveListBox = &aVariableFont; break;
case 2: pActiveListBox = &aFunctionFont; break;
case 3: pActiveListBox = &aNumberFont; break;
case 4: pActiveListBox = &aTextFont; break;
- case 5: pActiveListBox = &aSerifFont; bHideCheckboxes = TRUE; break;
- case 6: pActiveListBox = &aSansFont; bHideCheckboxes = TRUE; break;
- case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = TRUE; break;
+ case 5: pActiveListBox = &aSerifFont; bHideCheckboxes = sal_True; break;
+ case 6: pActiveListBox = &aSansFont; bHideCheckboxes = sal_True; break;
+ case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = sal_True; break;
default:pActiveListBox = NULL;
}
@@ -537,7 +537,7 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, EMPTY
SmModule *pp = SM_MOD();
SmFormat aFmt( pp->GetConfig()->GetStandardFormat() );
WriteTo( aFmt );
- pp->GetConfig()->SetStandardFormat( aFmt, TRUE );
+ pp->GetConfig()->SetStandardFormat( aFmt, sal_True );
}
delete pQueryBox;
@@ -546,7 +546,7 @@ IMPL_LINK_INLINE_START( SmFontTypeDialog, DefaultButtonClickHdl, Button *, EMPTY
IMPL_LINK_INLINE_END( SmFontTypeDialog, DefaultButtonClickHdl, Button *, pButton )
-SmFontTypeDialog::SmFontTypeDialog(Window * pParent, OutputDevice *pFntListDevice, BOOL bFreeRes)
+SmFontTypeDialog::SmFontTypeDialog(Window * pParent, OutputDevice *pFntListDevice, sal_Bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_FONTTYPEDIALOG)),
aFixedText1 (this, SmResId(1)),
aVariableFont (this, SmResId(1)),
@@ -627,7 +627,7 @@ void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
struct FieldMinMax
{
- USHORT nMin, nMax;
+ sal_uInt16 nMin, nMax;
};
// Data for min and max values of the 4 metric fields
@@ -656,9 +656,9 @@ static const FieldMinMax pMinMaxData[10][4] =
{{ 0, 10000 }, { 0, 10000 }, { 0, 10000 }, { 0, 10000 }}
};
-SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
+SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
Resource(rResId),
- bIsHighContrast(FALSE)
+ bIsHighContrast(sal_False)
{
if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
{
@@ -711,7 +711,7 @@ IMPL_LINK( SmDistanceDialog, GetFocusHdl, Control *, pControl )
{
if (Categories[nActiveCategory])
{
- USHORT i;
+ sal_uInt16 i;
if (pControl == &aMetricField1)
i = 0;
@@ -757,7 +757,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
{
aCheckBox1.Toggle();
- BOOL bChecked = aCheckBox1.IsChecked();
+ sal_Bool bChecked = aCheckBox1.IsChecked();
aFixedText4 .Enable( bChecked );
aMetricField4.Enable( bChecked );
}
@@ -791,7 +791,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpI
}
-void SmDistanceDialog::SetCategory(USHORT nCategory)
+void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
{
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES,
@@ -833,21 +833,21 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
if (nActiveCategory != CATEGORY_NONE)
{
pCat = Categories[nActiveCategory];
- pCat->SetValue(0, (USHORT) aMetricField1.GetValue());
- pCat->SetValue(1, (USHORT) aMetricField2.GetValue());
- pCat->SetValue(2, (USHORT) aMetricField3.GetValue());
- pCat->SetValue(3, (USHORT) aMetricField4.GetValue());
+ pCat->SetValue(0, (sal_uInt16) aMetricField1.GetValue());
+ pCat->SetValue(1, (sal_uInt16) aMetricField2.GetValue());
+ pCat->SetValue(2, (sal_uInt16) aMetricField3.GetValue());
+ pCat->SetValue(3, (sal_uInt16) aMetricField4.GetValue());
if (nActiveCategory == 5)
bScaleAllBrackets = aCheckBox1.IsChecked();
- aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, FALSE);
+ aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, sal_False);
}
// aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
// gewaehlten Kategorie.
- BOOL bActive;
- for (USHORT i = 0; i < 4; i++)
+ sal_Bool bActive;
+ for (sal_uInt16 i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
MetricField *pMF = (MetricField * const) aWin[i][1];
@@ -863,7 +863,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// setzen von Masseinheit und Anzahl der Nachkommastellen
FieldUnit eUnit;
- USHORT nDigits;
+ sal_uInt16 nDigits;
if (nCategory < 9)
{
eUnit = FUNIT_CUSTOM;
@@ -899,12 +899,12 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
{
aCheckBox1.Check( bScaleAllBrackets );
- BOOL bChecked = aCheckBox1.IsChecked();
+ sal_Bool bChecked = aCheckBox1.IsChecked();
aFixedText4 .Enable( bChecked );
aMetricField4.Enable( bChecked );
}
- aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, TRUE);
+ aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, sal_True);
aFixedLine.SetText(Categories[nCategory]->GetName());
nActiveCategory = nCategory;
@@ -915,7 +915,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
}
-SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
+SmDistanceDialog::SmDistanceDialog(Window *pParent, sal_Bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_DISTANCEDIALOG)),
aFixedText1 (this, SmResId(1)),
aMetricField1 (this, SmResId(1)),
@@ -933,10 +933,10 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
aBitmap (this, SmResId(1)),
aFixedLine (this, SmResId(1))
{
- for (USHORT i = 0; i < NOCATEGORIES; i++)
+ for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
nActiveCategory = CATEGORY_NONE;
- bScaleAllBrackets = FALSE;
+ bScaleAllBrackets = sal_False;
if (bFreeRes)
FreeResource();
@@ -966,7 +966,7 @@ SmDistanceDialog::~SmDistanceDialog()
void SmDistanceDialog::ApplyImages()
{
- BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for (int i = 0; i < NOCATEGORIES; ++i)
{
SmCategoryDesc *pCat = Categories[i];
@@ -1076,7 +1076,7 @@ IMPL_LINK( SmAlignDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton*/
}
-SmAlignDialog::SmAlignDialog(Window * pParent, BOOL bFreeRes)
+SmAlignDialog::SmAlignDialog(Window * pParent, sal_Bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_ALIGNDIALOG)),
aLeft (this, SmResId(1)),
aCenter (this, SmResId(2)),
@@ -1098,21 +1098,21 @@ void SmAlignDialog::ReadFrom(const SmFormat &rFormat)
switch (rFormat.GetHorAlign())
{
case AlignLeft:
- aLeft .Check(TRUE);
- aCenter.Check(FALSE);
- aRight .Check(FALSE);
+ aLeft .Check(sal_True);
+ aCenter.Check(sal_False);
+ aRight .Check(sal_False);
break;
case AlignCenter:
- aLeft .Check(FALSE);
- aCenter.Check(TRUE);
- aRight .Check(FALSE);
+ aLeft .Check(sal_False);
+ aCenter.Check(sal_True);
+ aRight .Check(sal_False);
break;
case AlignRight:
- aLeft .Check(FALSE);
- aCenter.Check(FALSE);
- aRight .Check(TRUE);
+ aLeft .Check(sal_False);
+ aCenter.Check(sal_False);
+ aRight .Check(sal_True);
break;
}
}
@@ -1141,11 +1141,11 @@ void SmShowSymbolSet::Paint(const Rectangle&)
// MapUnit einstellen fuer die 'nLen' berechnet wurde
SetMapMode(MapMode(MAP_PIXEL));
- USHORT v = sal::static_int_cast< USHORT >((aVScrollBar.GetThumbPos() * nColumns));
+ sal_uInt16 v = sal::static_int_cast< sal_uInt16 >((aVScrollBar.GetThumbPos() * nColumns));
size_t nSymbols = aSymbolSet.size();
Color aTxtColor( GetTextColor() );
- for (USHORT i = v; i < nSymbols ; i++)
+ for (sal_uInt16 i = v; i < nSymbols ; i++)
{
SmSym aSymbol (*aSymbolSet[i]);
Font aFont (aSymbol.GetFace());
@@ -1187,7 +1187,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
{
long nPos = (rMEvt.GetPosPixel().Y() / nLen) * nColumns + (rMEvt.GetPosPixel().X() / nLen) +
aVScrollBar.GetThumbPos() * nColumns;
- SelectSymbol( sal::static_int_cast< USHORT >(nPos) );
+ SelectSymbol( sal::static_int_cast< sal_uInt16 >(nPos) );
aSelectHdlLink.Call(this);
@@ -1199,7 +1199,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
{
- USHORT n = nSelectSymbol;
+ sal_uInt16 n = nSelectSymbol;
if (n != SYMBOL_NONE)
{
@@ -1210,7 +1210,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
case KEY_LEFT: n -= 1; break;
case KEY_RIGHT: n += 1; break;
case KEY_HOME: n = 0; break;
- case KEY_END: n = static_cast< USHORT >(aSymbolSet.size() - 1); break;
+ case KEY_END: n = static_cast< sal_uInt16 >(aSymbolSet.size() - 1); break;
case KEY_PAGEUP: n -= nColumns * nRows; break;
case KEY_PAGEDOWN: n += nColumns * nRows; break;
@@ -1226,8 +1226,8 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
n = nSelectSymbol;
// adjust scrollbar
- if ((n < (USHORT) (aVScrollBar.GetThumbPos() * nColumns)) ||
- (n >= (USHORT) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
+ if ((n < (sal_uInt16) (aVScrollBar.GetThumbPos() * nColumns)) ||
+ (n >= (sal_uInt16) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
{
aVScrollBar.SetThumbPos(n / nColumns);
Invalidate();
@@ -1250,12 +1250,12 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
nUseableWidth = aOutputSize.Width() - nScrollBarWidth;
// Hoehe von 16pt in Pixeln (passend zu 'aOutputSize')
- nLen = (USHORT) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
+ nLen = (sal_uInt16) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
- nColumns = sal::static_int_cast< USHORT >(nUseableWidth / nLen);
+ nColumns = sal::static_int_cast< sal_uInt16 >(nUseableWidth / nLen);
if (nColumns > 2 && nColumns % 2 != 0)
nColumns--;
- nRows = sal::static_int_cast< USHORT >(aOutputSize.Height() / nLen);
+ nRows = sal::static_int_cast< sal_uInt16 >(aOutputSize.Height() / nLen);
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(nColumns > 0, "Sm : keine Spalten");
DBG_ASSERT(nRows > 0, "Sm : keine Zeilen");
@@ -1267,7 +1267,7 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
aVScrollBar.SetPosSizePixel(Point(aOutputSize.Width() + 1, -1),
Size(nScrollBarWidth, aOutputSize.Height() + 2));
- aVScrollBar.Enable(FALSE);
+ aVScrollBar.Enable(sal_False);
aVScrollBar.Show();
aVScrollBar.SetScrollHdl(LINK(this, SmShowSymbolSet, ScrollHdl));
@@ -1282,22 +1282,22 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
{
aSymbolSet = rSymbolSet;
- if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows))
+ if (static_cast< sal_uInt16 >(aSymbolSet.size()) > (nColumns * nRows))
{
aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
- aVScrollBar.Enable(TRUE);
+ aVScrollBar.Enable(sal_True);
}
else
{
aVScrollBar.SetRange(Range(0,0));
- aVScrollBar.Enable (FALSE);
+ aVScrollBar.Enable (sal_False);
}
Invalidate();
}
-void SmShowSymbolSet::SelectSymbol(USHORT nSymbol)
+void SmShowSymbolSet::SelectSymbol(sal_uInt16 nSymbol)
{
int v = (int) (aVScrollBar.GetThumbPos() * nColumns);
@@ -1373,7 +1373,7 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
////////////////////////////////////////////////////////////////////////////////
-void SmSymbolDialog::FillSymbolSets(BOOL bDeleteText)
+void SmSymbolDialog::FillSymbolSets(sal_Bool bDeleteText)
// fuellt die Eintraege der moeglichen 'SymbolsSet's im Dialog mit den
// aktuellen Werten des SymbolSet Managers, selektiert aber keinen.
{
@@ -1431,7 +1431,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
// altes SymbolSet merken
XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
- USHORT nSymPos = GetSelectedSymbol();
+ sal_uInt16 nSymPos = GetSelectedSymbol();
// Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified())
@@ -1453,7 +1453,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
}
if (nSymPos >= aSymbolSet.size())
- nSymPos = static_cast< USHORT >(aSymbolSet.size()) - 1;
+ nSymPos = static_cast< sal_uInt16 >(aSymbolSet.size()) - 1;
SelectSymbol( nSymPos );
delete pDialog;
@@ -1504,14 +1504,14 @@ IMPL_LINK_INLINE_START( SmSymbolDialog, CloseClickHdl, Button *, EMPTYARG pButto
DBG_ASSERT(pButton == &aCloseBtn, "Sm : falscher Button");
#endif
- EndDialog(TRUE);
+ EndDialog(sal_True);
return 0;
}
IMPL_LINK_INLINE_END( SmSymbolDialog, CloseClickHdl, Button *, pButton )
SmSymbolDialog::SmSymbolDialog(Window *pParent, OutputDevice *pFntListDevice,
- SmSymbolManager &rMgr, SmViewShell &rViewShell, BOOL bFreeRes) :
+ SmSymbolManager &rMgr, SmViewShell &rViewShell, sal_Bool bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMBOLDIALOG)),
aSymbolSetText (this, SmResId(1)),
aSymbolSets (this, SmResId(1)),
@@ -1588,10 +1588,10 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
}
-BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
+sal_Bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
{
- BOOL bRet = FALSE;
- USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
aSymbolSetName = String();
aSymbolSet.clear();
@@ -1609,7 +1609,7 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
if (aSymbolSet.size() > 0)
SelectSymbol(0);
- bRet = TRUE;
+ bRet = sal_True;
}
else
aSymbolSets.SetNoSelection();
@@ -1618,10 +1618,10 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
}
-void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
+void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
{
const SmSym *pSym = NULL;
- if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size()))
+ if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size()))
pSym = aSymbolSet[ nSymbolNo ];
aSymbolSetDisplay.SelectSymbol(nSymbolNo);
@@ -1632,8 +1632,8 @@ void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
const SmSym * SmSymbolDialog::GetSymbol() const
{
- USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
- bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size());
+ sal_uInt16 nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
+ bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size());
return bValid ? aSymbolSet[ nSymbolNo ] : NULL;
}
@@ -1684,7 +1684,7 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont )
////////////////////////////////////////////////////////////////////////////////
-void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText)
+void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, sal_Bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
@@ -1702,7 +1702,7 @@ void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText)
}
-void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText)
+void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, sal_Bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
@@ -1720,7 +1720,7 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText)
}
-void SmSymDefineDialog::FillFonts(BOOL bDelete)
+void SmSymDefineDialog::FillFonts(sal_Bool bDelete)
{
aFonts.Clear();
if (bDelete)
@@ -1731,14 +1731,14 @@ void SmSymDefineDialog::FillFonts(BOOL bDelete)
// ueber die 'FontStyleBox' gewaehlt und nicht auch noch hier)
if (pFontList)
{
- USHORT nCount = pFontList->GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = pFontList->GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFonts.InsertEntry( pFontList->GetFontName(i).GetName() );
}
}
-void SmSymDefineDialog::FillStyles(BOOL bDeleteText)
+void SmSymDefineDialog::FillStyles(sal_Bool bDeleteText)
{
aStyles.Clear();
if (bDeleteText)
@@ -1750,7 +1750,7 @@ void SmSymDefineDialog::FillStyles(BOOL bDeleteText)
//aStyles.Fill(aText, &aFontList);
// eigene StyleName's verwenden
const SmFontStyles &rStyles = GetFontStyles();
- for (USHORT i = 0; i < rStyles.GetCount(); i++)
+ for (sal_uInt16 i = 0; i < rStyles.GetCount(); i++)
aStyles.InsertEntry( rStyles.GetStyleName(i) );
#if OSL_DEBUG_LEVEL > 1
@@ -1777,7 +1777,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolChangeHdl, ComboBox *, EMPTYARG pComboBox
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(pComboBox == &aOldSymbols, "Sm : falsches Argument");
#endif
- SelectSymbol(aOldSymbols, aOldSymbols.GetText(), FALSE);
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), sal_False);
return 0;
}
@@ -1788,7 +1788,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, ComboBox *, EMPTYARG pCombo
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(pComboBox == &aOldSymbolSets, "Sm : falsches Argument");
#endif
- SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), FALSE);
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), sal_False);
return 0;
}
@@ -1799,18 +1799,18 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
Selection aSelection (pComboBox->GetSelection());
if (pComboBox == &aSymbols)
- SelectSymbol(aSymbols, aSymbols.GetText(), FALSE);
+ SelectSymbol(aSymbols, aSymbols.GetText(), sal_False);
else if (pComboBox == &aSymbolSets)
- SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), FALSE);
+ SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), sal_False);
else if (pComboBox == &aOldSymbols)
// nur Namen aus der Liste erlauben
- SelectSymbol(aOldSymbols, aOldSymbols.GetText(), TRUE);
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), sal_True);
else if (pComboBox == &aOldSymbolSets)
// nur Namen aus der Liste erlauben
- SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), TRUE);
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), sal_True);
else if (pComboBox == &aStyles)
// nur Namen aus der Liste erlauben (ist hier eh immer der Fall)
- SelectStyle(aStyles.GetText(), TRUE);
+ SelectStyle(aStyles.GetText(), sal_True);
else
{
#if OSL_DEBUG_LEVEL > 1
@@ -1841,7 +1841,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, EMPTYARG pListBox )
IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
- USHORT nPos = aFontsSubsetLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFontsSubsetLB.GetSelectEntryPos();
if (LISTBOX_ENTRY_NOTFOUND != nPos)
{
const Subset* pSubset = reinterpret_cast<const Subset*> (aFontsSubsetLB.GetEntryData( nPos ));
@@ -1918,10 +1918,10 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
// update list box entries
- FillSymbolSets(aOldSymbolSets, FALSE);
- FillSymbolSets(aSymbolSets, FALSE);
- FillSymbols(aOldSymbols ,FALSE);
- FillSymbols(aSymbols ,FALSE);
+ FillSymbolSets(aOldSymbolSets, sal_False);
+ FillSymbolSets(aSymbolSets, sal_False);
+ FillSymbols(aOldSymbols ,sal_False);
+ FillSymbols(aSymbols ,sal_False);
UpdateButtons();
@@ -1960,10 +1960,10 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
// update list box entries
- FillSymbolSets(aOldSymbolSets, FALSE);
- FillSymbolSets(aSymbolSets, FALSE);
- FillSymbols(aOldSymbols ,FALSE);
- FillSymbols(aSymbols ,FALSE);
+ FillSymbolSets(aOldSymbolSets, sal_False);
+ FillSymbolSets(aSymbolSets, sal_False);
+ FillSymbols(aOldSymbols ,sal_False);
+ FillSymbols(aSymbols ,sal_False);
UpdateButtons();
@@ -1987,10 +1987,10 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
SetOrigSymbol(NULL, XubString());
// update list box entries
- FillSymbolSets(aOldSymbolSets, FALSE);
- FillSymbolSets(aSymbolSets, FALSE);
- FillSymbols(aOldSymbols ,FALSE);
- FillSymbols(aSymbols ,FALSE);
+ FillSymbolSets(aOldSymbolSets, sal_False);
+ FillSymbolSets(aSymbolSets, sal_False);
+ FillSymbols(aOldSymbols ,sal_False);
+ FillSymbols(aSymbols ,sal_False);
}
UpdateButtons();
@@ -2001,9 +2001,9 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
void SmSymDefineDialog::UpdateButtons()
{
- BOOL bAdd = FALSE,
- bChange = FALSE,
- bDelete = FALSE,
+ sal_Bool bAdd = sal_False,
+ bChange = sal_False,
+ bDelete = sal_False,
bEqual;
XubString aTmpSymbolName (aSymbols.GetText()),
aTmpSymbolSetName (aSymbolSets.GetText());
@@ -2030,7 +2030,7 @@ void SmSymDefineDialog::UpdateButtons()
// aendern wenn bei gleichem Namen mindestens eine Einstellung anders ist
// oder wenn es noch kein Symbol des neuen Namens gibt (wuerde implizites
// loeschen des bereits vorhandenen Symbols erfordern)
-// BOOL bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName();
+// sal_Bool bEqualName = pOrigSymbol && aTmpSymbolName == pOrigSymbol->GetName();
// bChange = pOrigSymbol && ( (bEqualName && !bEqual) || (!bEqualName && bAdd) );
// aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist
@@ -2044,7 +2044,7 @@ void SmSymDefineDialog::UpdateButtons()
SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
- OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes) :
+ OutputDevice *pFntListDevice, SmSymbolManager &rMgr, sal_Bool bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMDEFINEDIALOG)),
aOldSymbolText (this, SmResId(1)),
aOldSymbols (this, SmResId(1)),
@@ -2088,8 +2088,8 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
// auto completion is troublesome since that symbols character also gets automatically selected in the
// display and if the user previously selected a character to define/redefine that one this is bad
- aOldSymbols.EnableAutocomplete( FALSE, TRUE );
- aSymbols .EnableAutocomplete( FALSE, TRUE );
+ aOldSymbols.EnableAutocomplete( sal_False, sal_True );
+ aSymbols .EnableAutocomplete( sal_False, sal_True );
FillFonts();
if (aFonts.GetEntryCount() > 0)
@@ -2133,7 +2133,7 @@ void SmSymDefineDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if (bHighContrast)
{
const StyleSettings &rS = GetSettings().GetStyleSettings();
@@ -2182,12 +2182,12 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
{
aSymbolMgrCopy = rMgr;
#ifdef DEBUG
-// USHORT nS = aSymbolMgrCopy.GetSymbolSetCount();
+// sal_uInt16 nS = aSymbolMgrCopy.GetSymbolSetCount();
#endif
- // Das modified Flag der Kopie auf FALSE setzen, damit man spaeter damit
+ // Das modified Flag der Kopie auf sal_False setzen, damit man spaeter damit
// testen kann ob sich was geaendert hat.
- aSymbolMgrCopy.SetModified(FALSE);
+ aSymbolMgrCopy.SetModified(sal_False);
FillSymbolSets(aOldSymbolSets);
if (aOldSymbolSets.GetEntryCount() > 0)
@@ -2206,8 +2206,8 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
}
-BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
- const XubString &rSymbolSetName, BOOL bDeleteText)
+sal_Bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
+ const XubString &rSymbolSetName, sal_Bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
@@ -2221,18 +2221,18 @@ BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// und evtl Abweichungen in der Eingabe beseitigen
rComboBox.SetText(aNormName);
- BOOL bRet = FALSE;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
rComboBox.SetText(rComboBox.GetEntry(nPos));
- bRet = TRUE;
+ bRet = sal_True;
}
else if (bDeleteText)
rComboBox.SetText(XubString());
- BOOL bIsOld = &rComboBox == &aOldSymbolSets;
+ sal_Bool bIsOld = &rComboBox == &aOldSymbolSets;
// setzen des SymbolSet Namens an der zugehoerigen Darstellung
FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
@@ -2241,7 +2241,7 @@ BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// setzen der zum SymbolSet gehoerenden Symbol Namen an der zugehoerigen
// Auswahbox
ComboBox &rCB = bIsOld ? aOldSymbols : aSymbols;
- FillSymbols(rCB, FALSE);
+ FillSymbols(rCB, sal_False);
// bei Wechsel des SymbolSets fuer das alte Zeichen ein gueltiges
// Symbol bzw keins zur Anzeige bringen
@@ -2250,7 +2250,7 @@ BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
XubString aTmpOldSymbolName;
if (aOldSymbols.GetEntryCount() > 0)
aTmpOldSymbolName = aOldSymbols.GetEntry(0);
- SelectSymbol(aOldSymbols, aTmpOldSymbolName, TRUE);
+ SelectSymbol(aOldSymbols, aTmpOldSymbolName, sal_True);
}
UpdateButtons();
@@ -2287,8 +2287,8 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
}
-BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
- const XubString &rSymbolName, BOOL bDeleteText)
+sal_Bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
+ const XubString &rSymbolName, sal_Bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
DBG_ASSERT(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
@@ -2301,10 +2301,10 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
// und evtl Abweichungen in der Eingabe beseitigen
rComboBox.SetText(aNormName);
- BOOL bRet = FALSE;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
- BOOL bIsOld = &rComboBox == &aOldSymbols;
+ sal_Bool bIsOld = &rComboBox == &aOldSymbols;
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2317,8 +2317,8 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
{
// Font und Style entsprechend waehlen
const Font &rFont = pSymbol->GetFace();
- SelectFont(rFont.GetName(), FALSE);
- SelectStyle(GetFontStyles().GetStyleName(rFont), FALSE);
+ SelectFont(rFont.GetName(), sal_False);
+ SelectStyle(GetFontStyles().GetStyleName(rFont), sal_False);
// da das setzen des Fonts ueber den Style Namen des SymbolsFonts nicht
// so gut klappt (er kann zB leer sein obwohl der Font selbst 'bold' und
@@ -2336,7 +2336,7 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if (bDeleteText)
rComboBox.SetText(XubString());
@@ -2385,7 +2385,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
const Subset* pSubset;
while( NULL != (pSubset = pSubsetMap->GetNextSubset( bFirst )) )
{
- USHORT nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
+ sal_uInt16 nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
aFontsSubsetLB.SetEntryData( nPos, (void *) pSubset );
// subset must live at least as long as the selected font !!!
if( bFirst )
@@ -2398,10 +2398,10 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
}
-BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
+sal_Bool SmSymDefineDialog::SelectFont(const XubString &rFontName, sal_Bool bApplyFont)
{
- BOOL bRet = FALSE;
- USHORT nPos = aFonts.GetEntryPos(rFontName);
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -2414,7 +2414,7 @@ BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
// update preview to use new font
aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
aFonts.SetNoSelection();
@@ -2426,10 +2426,10 @@ BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
}
-BOOL SmSymDefineDialog::SelectStyle(const XubString &rStyleName, BOOL bApplyFont)
+sal_Bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, sal_Bool bApplyFont)
{
- BOOL bRet = FALSE;
- USHORT nPos = aStyles.GetEntryPos(rStyleName);
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
// falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
// (sofern vorhanden)
@@ -2445,7 +2445,7 @@ BOOL SmSymDefineDialog::SelectStyle(const XubString &rStyleName, BOOL bApplyFont
// update preview to use new font
aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
aStyles.SetText(XubString());
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index ba7ee7ad3b..5a3d26a87a 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -106,7 +106,7 @@ using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::uno;
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
static const char __FAR_DATA pStarMathDoc[] = "StarMathDocument";
@@ -132,7 +132,7 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
switch (((SfxSimpleHint&)rHint).GetId())
{
case HINT_FORMATCHANGED:
- SetFormulaArranged(FALSE);
+ SetFormulaArranged(sal_False);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -167,12 +167,12 @@ void SmDocShell::SetText(const String& rBuffer)
if (rBuffer != aText)
{
- BOOL bIsEnabled = IsEnableSetModified();
+ sal_Bool bIsEnabled = IsEnableSetModified();
if( bIsEnabled )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
aText = rBuffer;
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( sal_False );
Parse();
//Repaint();
@@ -196,7 +196,7 @@ void SmDocShell::SetText(const String& rBuffer)
if ( bIsEnabled )
EnableSetModified( bIsEnabled );
- SetModified(TRUE);
+ SetModified(sal_True);
// launch accessible event if necessary
SmGraphicAccessible *pAcc = pViewSh ? pViewSh->GetGraphicWindow().GetAccessible_Impl() : 0;
@@ -220,8 +220,8 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
aFormat = rFormat;
- SetFormulaArranged( FALSE );
- SetModified( TRUE );
+ SetFormulaArranged( sal_False );
+ SetModified( sal_True );
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -259,7 +259,7 @@ void SmDocShell::Parse()
ReplaceBadChars();
pTree = aInterpreter.Parse(aText);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( sal_False );
}
@@ -303,9 +303,9 @@ void SmDocShell::ArrangeFormula()
// format/draw formulas always from left to right,
// and numbers should not be converted
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = pOutDev->GetDigitLanguage();
+ sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
//
pTree->Arrange(*pOutDev, rFormat);
@@ -313,7 +313,7 @@ void SmDocShell::ArrangeFormula()
pOutDev->SetLayoutMode( nLayoutMode );
pOutDev->SetDigitLanguage( nDigitLang );
- SetFormulaArranged(TRUE);
+ SetFormulaArranged(sal_True);
// invalidate accessible text
aAccText = String();
@@ -331,10 +331,10 @@ void SetEditEngineDefaultFonts(
SvtLinguConfig().GetOptions( aOpt );
//
struct FontDta {
- INT16 nFallbackLang;
- INT16 nLang;
- USHORT nFontType;
- USHORT nFontInfoId;
+ sal_Int16 nFallbackLang;
+ sal_Int16 nLang;
+ sal_uInt16 nFontType;
+ sal_uInt16 nFontInfoId;
} aTable[3] =
{
// info to get western font to be used
@@ -405,8 +405,8 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine = new EditEngine( pEditEngineItemPool );
- pEditEngine->EnableUndo( TRUE );
- pEditEngine->SetDefTab( USHORT(
+ pEditEngine->EnableUndo( sal_True );
+ pEditEngine->SetDefTab( sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth( C2S("XXXX") ) ) );
pEditEngine->SetControlWord(
@@ -473,21 +473,21 @@ void SmDocShell::Draw(OutputDevice &rDev, Point &rPosition)
//! the draw mode needs to be set to default, because when imbedding
//! Math for example in Calc in "a over b" the fraction bar may not
//! be visible else. More generally: the FillColor may have been changed.
- ULONG nOldDrawMode = DRAWMODE_DEFAULT;
- BOOL bRestoreDrawMode = FALSE;
+ sal_uLong nOldDrawMode = DRAWMODE_DEFAULT;
+ sal_Bool bRestoreDrawMode = sal_False;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
{
nOldDrawMode = rDev.GetDrawMode();
rDev.SetDrawMode( DRAWMODE_DEFAULT );
- bRestoreDrawMode = TRUE;
+ bRestoreDrawMode = sal_True;
}
// format/draw formulas always from left to right
// and numbers should not be converted
- ULONG nLayoutMode = rDev.GetLayoutMode();
+ sal_uLong nLayoutMode = rDev.GetLayoutMode();
rDev.SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = rDev.GetDigitLanguage();
+ sal_Int16 nDigitLang = rDev.GetDigitLanguage();
rDev.SetDigitLanguage( LANGUAGE_ENGLISH );
//
pTree->Draw(rDev, rPosition);
@@ -655,7 +655,7 @@ void SmDocShell::SetPrinter( SfxPrinter *pNew )
delete pPrinter;
pPrinter = pNew; //Eigentumsuebergang!
pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
- SetFormulaArranged(FALSE);
+ SetFormulaArranged(sal_False);
Repaint();
}
@@ -664,11 +664,11 @@ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::OnDocumentPrinterChanged" );
pTmpPrinter = pPrt;
- SetFormulaArranged(FALSE);
+ SetFormulaArranged(sal_False);
Size aOldSize = GetVisArea().GetSize();
Repaint();
if( aOldSize != GetVisArea().GetSize() && aText.Len() )
- SetModified( TRUE );
+ SetModified( sal_True );
pTmpPrinter = 0;
}
@@ -676,11 +676,11 @@ void SmDocShell::Repaint()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Repaint" );
- BOOL bIsEnabled = IsEnableSetModified();
+ sal_Bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( sal_False );
Size aVisSize = GetSize();
SetVisAreaSize( aVisSize );
@@ -701,7 +701,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
pPrinter ( 0 ),
pTmpPrinter ( 0 ),
nModifyCount ( 0 ),
- bIsFormulaArranged ( FALSE )
+ bIsFormulaArranged ( sal_False )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SmDocShell" );
@@ -734,20 +734,20 @@ SmDocShell::~SmDocShell()
}
-BOOL SmDocShell::SetData( const String& rData )
+sal_Bool SmDocShell::SetData( const String& rData )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
SetText( rData );
- return TRUE;
+ return sal_True;
}
-BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
+sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
const String& rFltName = rMedium.GetFilter()->GetFilterName();
DBG_ASSERT( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!");
@@ -770,12 +770,12 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
if ( SotStorage::IsStorageFile( pStream ) )
{
- SvStorageRef aStorage = new SotStorage( pStream, FALSE );
+ SvStorageRef aStorage = new SotStorage( pStream, sal_False );
if ( aStorage->IsStream( C2S( "Equation Native" ) ) )
{
// is this a MathType Storage?
MathType aEquation( aText );
- if ( TRUE == (bSuccess = (1 == aEquation.Parse( aStorage )) ))
+ if ( sal_True == (bSuccess = (1 == aEquation.Parse( aStorage )) ))
Parse();
}
}
@@ -789,7 +789,7 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
//???OnDocumentPrinterChanged(0);
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( sal_False );
Repaint();
}
@@ -798,25 +798,25 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
}
-BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
+sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( SfxObjectShell::InitNew( xStorage ) )
{
- bRet = TRUE;
+ bRet = sal_True;
SetVisArea(Rectangle(Point(0, 0), Size(2000, 1000)));
}
return bRet;
}
-BOOL SmDocShell::Load( SfxMedium& rMedium )
+sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( SfxObjectShell::Load( rMedium ))
{
uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage();
@@ -835,7 +835,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
// is this a fabulous math package ?
Reference<com::sun::star::frame::XModel> xModel(GetModel());
SmXMLImportWrapper aEquation(xModel);
- ULONG nError = aEquation.Import(rMedium);
+ sal_uLong nError = aEquation.Import(rMedium);
bRet = 0 == nError;
SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
@@ -844,7 +844,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
//???OnDocumentPrinterChanged(0);
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( sal_False );
Repaint();
}
@@ -854,7 +854,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
//------------------------------------------------------------------
-BOOL SmDocShell::Save()
+sal_Bool SmDocShell::Save()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
@@ -874,7 +874,7 @@ BOOL SmDocShell::Save()
return aEquation.Export(*GetMedium());
}
- return FALSE;
+ return sal_False;
}
/*
@@ -925,11 +925,11 @@ void SmDocShell::UpdateText()
}
-BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
//! apply latest changes if necessary
UpdateText();
@@ -949,11 +949,11 @@ BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
return bRet;
}
-BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
+sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxFilter* pFlt = rMedium.GetFilter();
if( pFlt )
{
@@ -983,14 +983,14 @@ BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
return bRet;
}
-BOOL SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
+sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
if( SfxObjectShell::SaveCompleted( xStorage ))
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
@@ -1019,7 +1019,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_AUTO_REDRAW :
{
SmModule *pp = SM_MOD();
- BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
+ sal_Bool bRedraw = pp->GetConfig()->IsAutoRedraw();
pp->GetConfig()->SetAutoRedraw(!bRedraw);
}
break;
@@ -1152,13 +1152,13 @@ void SmDocShell::Execute(SfxRequest& rReq)
SfxUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
- BOOL (SfxUndoManager:: *fnDo)( USHORT );
+ sal_Bool (SfxUndoManager:: *fnDo)( sal_uInt16 );
sal_uInt16 nCount;
if( SID_UNDO == rReq.GetSlot() )
@@ -1200,7 +1200,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1215,7 +1215,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_AUTO_REDRAW :
{
SmModule *pp = SM_MOD();
- BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
+ sal_Bool bRedraw = pp->GetConfig()->IsAutoRedraw();
rSet.Put(SfxBoolItem(SID_AUTO_REDRAW, bRedraw));
}
@@ -1259,7 +1259,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
SfxUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- UniString(SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString(SfxUndoManager:: *fnGetComment)( sal_uInt16 ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWh )
@@ -1314,7 +1314,7 @@ void SmDocShell::SaveSymbols()
void SmDocShell::Draw(OutputDevice *pDevice,
const JobSetup &,
- USHORT /*nAspect*/)
+ sal_uInt16 /*nAspect*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
@@ -1339,21 +1339,21 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
if (! aNewRect.Right()) aNewRect.Right() = 2000;
if (! aNewRect.Bottom()) aNewRect.Bottom() = 1000;
- BOOL bIsEnabled = IsEnableSetModified();
+ sal_Bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
//TODO/LATER: it's unclear how this interacts with the SFX code
// If outplace editing, then dont resize the OutplaceWindow. But the
// ObjectShell has to resize. Bug 56470
- BOOL bUnLockFrame;
+ sal_Bool bUnLockFrame;
if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() && GetFrame() )
{
GetFrame()->LockAdjustPosSizePixel();
- bUnLockFrame = TRUE;
+ bUnLockFrame = sal_True;
}
else
- bUnLockFrame = FALSE;
+ bUnLockFrame = sal_False;
SfxObjectShell::SetVisArea( aNewRect );
@@ -1391,13 +1391,13 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
}
}
-ULONG SmDocShell::GetMiscStatus() const
+sal_uLong SmDocShell::GetMiscStatus() const
{
return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
-void SmDocShell::SetModified(BOOL bModified)
+void SmDocShell::SetModified(sal_Bool bModified)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
@@ -1408,13 +1408,13 @@ void SmDocShell::SetModified(BOOL bModified)
}
}
-BOOL SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
+sal_Bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::WriteAsMathType3" );
MathType aEquation( aText, pTree );
- BOOL bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
+ sal_Bool bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
return bRet;
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 935c2133c1..d12331d35a 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -80,7 +80,7 @@ using namespace com::sun::star::uno;
void SmGetLeftSelectionPart(const ESelection aSel,
- USHORT &nPara, USHORT &nPos)
+ sal_uInt16 &nPara, sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
{
// compare start and end of selection and use the one that comes first
@@ -111,7 +111,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
SetMapMode(MAP_PIXEL);
// Even RTL languages don't use RTL for math
- rCmdBox.GetEditWindow()->EnableRTL( FALSE );
+ rCmdBox.GetEditWindow()->EnableRTL( sal_False );
ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
@@ -231,7 +231,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
//! see also SmDocShell::GetEditEngine() !
//!
- pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) );
+ pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) );
SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool );
@@ -270,7 +270,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
if (pView)
{
// get row and column to look for
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
nRow++;
nCol++;
@@ -336,7 +336,7 @@ void SmEditWindow::MouseButtonDown(const MouseEvent &rEvt)
void SmEditWindow::Command(const CommandEvent& rCEvt)
{
- BOOL bForwardEvt = TRUE;
+ sal_Bool bForwardEvt = sal_True;
if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
{
GetParent()->ToTop();
@@ -364,7 +364,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
pPopupMenu->Execute( this, aPoint );
delete pPopupMenu;
- bForwardEvt = FALSE;
+ bForwardEvt = sal_False;
}
else if (rCEvt.GetCommand() == COMMAND_WHEEL)
bForwardEvt = !HandleWheelCommands( rCEvt );
@@ -379,9 +379,9 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
}
-BOOL SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
+sal_Bool SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
{
- BOOL bCommandHandled = FALSE; // true if the CommandEvent needs not
+ sal_Bool bCommandHandled = sal_False; // true if the CommandEvent needs not
// to be passed on (because it has fully
// been taken care of).
@@ -389,7 +389,7 @@ BOOL SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
if (pWData)
{
if (COMMAND_WHEEL_ZOOM == pWData->GetMode())
- bCommandHandled = TRUE; // no zooming in Command window
+ bCommandHandled = sal_True; // no zooming in Command window
else
bCommandHandled = HandleScrollCommand( rCEvt, pHScrollBar, pVScrollBar);
}
@@ -413,7 +413,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
{
if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
SfxViewShell* pViewShell = GetView();
if ( pViewShell && pViewShell->ISA(SmViewShell) )
{
@@ -496,8 +496,8 @@ void SmEditWindow::CreateEditView()
pScrollBox = new ScrollBarBox(this);
pVScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl));
pHScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl));
- pVScrollBar->EnableDrag( TRUE );
- pHScrollBar->EnableDrag( TRUE );
+ pVScrollBar->EnableDrag( sal_True );
+ pHScrollBar->EnableDrag( sal_True );
pEditView->SetOutputArea(AdjustScrollBars());
@@ -505,7 +505,7 @@ void SmEditWindow::CreateEditView()
pEditView->SetSelection(eSelection);
Update();
- pEditView->ShowCursor(TRUE, TRUE);
+ pEditView->ShowCursor(sal_True, sal_True);
pEditEngine->SetStatusEventHdl( LINK(this, SmEditWindow, EditStatusHdl) );
SetPointer(pEditView->GetPointer());
@@ -676,16 +676,16 @@ void SmEditWindow::LoseFocus()
}
-BOOL SmEditWindow::IsAllSelected() const
+sal_Bool SmEditWindow::IsAllSelected() const
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
DBG_ASSERT( pEditView, "NULL pointer" );
DBG_ASSERT( pEditEngine, "NULL pointer" );
if (pEditEngine && pEditView)
{
ESelection eSelection( pEditView->GetSelection() );
- INT32 nParaCnt = pEditEngine->GetParagraphCount();
+ sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
{
String Text( pEditEngine->GetText( LINEEND_LF ) );
@@ -709,7 +709,7 @@ void SmEditWindow::SelectAll()
}
}
-void SmEditWindow::InsertCommand(USHORT nCommand)
+void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
{
DBG_ASSERT( pEditView, "EditView missing" );
if (pEditView)
@@ -749,7 +749,7 @@ void SmEditWindow::MarkError(const Point &rPos)
if (pEditView)
{
const xub_StrLen nCol = sal::static_int_cast< xub_StrLen >(rPos.X());
- const USHORT nRow = sal::static_int_cast< USHORT >(rPos.Y() - 1);
+ const sal_uInt16 nRow = sal::static_int_cast< sal_uInt16 >(rPos.Y() - 1);
pEditView->SetSelection(ESelection(nRow, nCol - 1, nRow, nCol));
GrabFocus();
@@ -764,10 +764,10 @@ void SmEditWindow::SelNextMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = eSelection.nEndPos;
+ sal_uInt16 Pos = eSelection.nEndPos;
String aMark (C2S("<?>"));
String aText;
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
while (eSelection.nEndPara < nCounts)
{
@@ -794,15 +794,15 @@ void SmEditWindow::SelPrevMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = STRING_NOTFOUND;
+ sal_uInt16 Pos = STRING_NOTFOUND;
xub_StrLen Max = eSelection.nStartPos;
String Text( pEditEngine->GetText( eSelection.nStartPara ) );
String aMark (C2S("<?>"));
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
do
{
- USHORT Fnd = Text.Search(aMark, 0);
+ sal_uInt16 Fnd = Text.Search(aMark, 0);
while ((Fnd < Max) && (Fnd != STRING_NOTFOUND))
{
@@ -827,7 +827,7 @@ void SmEditWindow::SelPrevMark()
}
}
-BOOL SmEditWindow::HasMark(const String& rText) const
+sal_Bool SmEditWindow::HasMark(const String& rText) const
// returns true iff 'rText' contains a mark
{
return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND;
@@ -868,17 +868,17 @@ void SmEditWindow::SetSelection(const ESelection &rSel)
InvalidateSlots();
}
-BOOL SmEditWindow::IsEmpty() const
+sal_Bool SmEditWindow::IsEmpty() const
{
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
- BOOL bEmpty = sal::static_int_cast< BOOL >(
- pEditEngine ? pEditEngine->GetTextLen() == 0 : FALSE);
+ sal_Bool bEmpty = sal::static_int_cast< sal_Bool >(
+ pEditEngine ? pEditEngine->GetTextLen() == 0 : sal_False);
return bEmpty;
}
-BOOL SmEditWindow::IsSelected() const
+sal_Bool SmEditWindow::IsSelected() const
{
- return pEditView ? pEditView->HasSelection() : FALSE;
+ return pEditView ? pEditView->HasSelection() : sal_False;
}
void SmEditWindow::Cut()
@@ -887,7 +887,7 @@ void SmEditWindow::Cut()
if (pEditView)
{
pEditView->Cut();
- GetDoc()->SetModified( TRUE );
+ GetDoc()->SetModified( sal_True );
}
}
@@ -904,7 +904,7 @@ void SmEditWindow::Paste()
if (pEditView)
{
pEditView->Paste();
- GetDoc()->SetModified( TRUE );
+ GetDoc()->SetModified( sal_True );
}
}
@@ -914,7 +914,7 @@ void SmEditWindow::Delete()
if (pEditView)
{
pEditView->DeleteSelected();
- GetDoc()->SetModified( TRUE );
+ GetDoc()->SetModified( sal_True );
}
}
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 49d900ac1d..594dbbbfb7 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -37,7 +37,7 @@
/////////////////////////////////////////////////////////////////
// Latin default-fonts
-static const USHORT aLatinDefFnts[FNT_END] =
+static const sal_uInt16 aLatinDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -53,7 +53,7 @@ static const USHORT aLatinDefFnts[FNT_END] =
//! we use non-asian fonts for variables, functions and numbers since they
//! look better and even in asia only latin letters will be used for those.
//! At least that's what I was told...
-static const USHORT aCJKDefFnts[FNT_END] =
+static const sal_uInt16 aCJKDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -66,7 +66,7 @@ static const USHORT aCJKDefFnts[FNT_END] =
};
// CTL default-fonts
-static const USHORT aCTLDefFnts[FNT_END] =
+static const sal_uInt16 aCTLDefFnts[FNT_END] =
{
DEFAULTFONT_CTL_TEXT, // FNT_VARIABLE
DEFAULTFONT_CTL_TEXT, // FNT_FUNCTION
@@ -79,7 +79,7 @@ static const USHORT aCTLDefFnts[FNT_END] =
};
-String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
+String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
{
DBG_ASSERT( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END,
"index out opd range" );
@@ -88,7 +88,7 @@ String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
return String::CreateFromAscii( FNTNAME_MATH );
else
{
- const USHORT *pTable;
+ const sal_uInt16 *pTable;
switch ( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) )
{
case SCRIPTTYPE_LATIN : pTable = aLatinDefFnts; break;
@@ -114,7 +114,7 @@ SmFormat::SmFormat()
eHorAlign = AlignCenter;
nGreekCharStyle = 0;
- bIsTextmode = bScaleNormalBrackets = FALSE;
+ bIsTextmode = bScaleNormalBrackets = sal_False;
vSize[SIZ_TEXT] = 100;
vSize[SIZ_INDEX] = 60;
@@ -166,21 +166,21 @@ SmFormat::SmFormat()
vFont[FNT_SANS] .SetItalic(ITALIC_NONE);
vFont[FNT_FIXED] .SetItalic(ITALIC_NONE);
- for ( USHORT i = FNT_BEGIN; i <= FNT_END; i++ )
+ for ( sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++ )
{
SmFace &rFace = vFont[i];
- rFace.SetTransparent( TRUE );
+ rFace.SetTransparent( sal_True );
rFace.SetAlign( ALIGN_BASELINE );
rFace.SetColor( COL_AUTO );
- bDefaultFont[i] = FALSE;
+ bDefaultFont[i] = sal_False;
}
}
-void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont, BOOL bDefault )
+void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, sal_Bool bDefault )
{
vFont[nIdent] = rFont;
- vFont[nIdent].SetTransparent( TRUE );
+ vFont[nIdent].SetTransparent( sal_True );
vFont[nIdent].SetAlign( ALIGN_BASELINE );
bDefaultFont[nIdent] = bDefault;
@@ -195,7 +195,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
SetGreekCharStyle(rFormat.GetGreekCharStyle());
SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets());
- USHORT i;
+ sal_uInt16 i;
for (i = FNT_BEGIN; i <= FNT_END; i++)
{
SetFont(i, rFormat.GetFont(i));
@@ -210,30 +210,30 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
}
-BOOL SmFormat::operator == (const SmFormat &rFormat) const
+sal_Bool SmFormat::operator == (const SmFormat &rFormat) const
{
- BOOL bRes = aBaseSize == rFormat.aBaseSize &&
+ sal_Bool bRes = aBaseSize == rFormat.aBaseSize &&
eHorAlign == rFormat.eHorAlign &&
nGreekCharStyle == rFormat.nGreekCharStyle &&
bIsTextmode == rFormat.bIsTextmode &&
bScaleNormalBrackets == rFormat.bScaleNormalBrackets;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i <= SIZ_END && bRes; ++i)
{
if (vSize[i] != rFormat.vSize[i])
- bRes = FALSE;
+ bRes = sal_False;
}
for (i = 0; i <= DIS_END && bRes; ++i)
{
if (vDist[i] != rFormat.vDist[i])
- bRes = FALSE;
+ bRes = sal_False;
}
for (i = 0; i <= FNT_END && bRes; ++i)
{
if (vFont[i] != rFormat.vFont[i] ||
bDefaultFont[i] != rFormat.bDefaultFont[i])
- bRes = FALSE;
+ bRes = sal_False;
}
return bRes;
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index cf5c28eef8..f01b912f45 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -671,8 +671,8 @@ void SmXMLExport::_ExportContent()
if (pDocShell)
{
SmParser &rParser = pDocShell->GetParser();
- BOOL bVal = rParser.IsExportSymbolNames();
- rParser.SetExportSymbolNames( TRUE );
+ sal_Bool bVal = rParser.IsExportSymbolNames();
+ rParser.SetExportSymbolNames( sal_True );
SmNode *pTmpTree = rParser.Parse( aText );
aText = rParser.GetText();
delete pTmpTree;
@@ -782,14 +782,14 @@ void SmXMLExport::ExportUnaryHorizontal(const SmNode *pNode, int nLevel)
void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pRow=0;
- ULONG nSize = pNode->GetNumSubNodes();
+ sal_uLong nSize = pNode->GetNumSubNodes();
if (nSize > 1)
pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
//if (nSize)
//{
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
ExportNodes(pTemp, nLevel+1);
//}
@@ -820,7 +820,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pTable=0;
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//If the list ends in newline then the last entry has
//no subnodes, the newline is superfulous so we just drop
@@ -834,7 +834,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
if (nLevel || (nSize >1))
pTable = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
{
SvXMLElementExport *pRow=0;
@@ -1417,7 +1417,7 @@ void SmXMLExport::ExportVerticalBrace(const SmNode *pNode, int nLevel)
// using accents will draw the over-/underbraces too close to the base
// see http://www.w3.org/TR/MathML2/chapter3.html#id.3.4.5.2
// also XML_ACCENT is illegal with XML_MUNDER. Thus no XML_ACCENT attribut here!
-// AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, XML_TRUE);
+// AddAttribute(XML_NAMESPACE_MATH, XML_ACCENT, XML_sal_True);
SvXMLElementExport aOver2(*this, XML_NAMESPACE_MATH,which, sal_True, sal_True);
ExportNodes(pNode->GetSubNode(0), nLevel);
ExportNodes(pNode->GetSubNode(1), nLevel);
@@ -1429,11 +1429,11 @@ void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel)
{
SvXMLElementExport aTable(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
const SmMatrixNode *pMatrix = static_cast<const SmMatrixNode *>(pNode);
- USHORT i=0;
- for (ULONG y = 0; y < pMatrix->GetNumRows(); y++)
+ sal_uInt16 i=0;
+ for (sal_uLong y = 0; y < pMatrix->GetNumRows(); y++)
{
SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True);
- for (ULONG x = 0; x < pMatrix->GetNumCols(); x++)
+ for (sal_uLong x = 0; x < pMatrix->GetNumCols(); x++)
if (const SmNode *pTemp = pNode->GetSubNode(i++))
{
SvXMLElementExport aCell(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True);
@@ -1550,8 +1550,8 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
#if 0
default:
{
- ULONG nSize = pNode->GetNumSubNodes();
- for (ULONG i = 0; i < nSize; i++)
+ sal_uLong nSize = pNode->GetNumSubNodes();
+ for (sal_uLong i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
ExportNodes(pTemp, nLevel+1);
}
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 689e1e8a39..7a04f6f9ec 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -93,9 +93,9 @@ using ::rtl::OUStringBuffer;
////////////////////////////////////////////////////////////
-ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
+sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
utl::getProcessServiceFactory());
@@ -203,7 +203,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
if (xStatusIndicator.is())
xStatusIndicator->setValue(nSteps++);
- ULONG nWarn = ReadThroughComponent(
+ sal_uLong nWarn = ReadThroughComponent(
rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
xServiceFactory, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
@@ -244,7 +244,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
xStatusIndicator->setValue(nSteps++);
nError = ReadThroughComponent( xInputStream, xModelComp,
- xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter", FALSE );
+ xServiceFactory, xInfoSet, "com.sun.star.comp.Math.XMLImporter", sal_False );
}
if (xStatusIndicator.is())
@@ -254,7 +254,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
/// read a component (file + filter version)
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
Reference<io::XInputStream> xInputStream,
Reference<XComponent> xModelComponent,
Reference<lang::XMultiServiceFactory> & rFactory,
@@ -262,7 +262,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
const sal_Char* pFilterName,
sal_Bool bEncrypted )
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
DBG_ASSERT(xInputStream.is(), "input stream missing");
DBG_ASSERT(xModelComponent.is(), "document missing");
DBG_ASSERT(rFactory.is(), "factory missing");
@@ -358,7 +358,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
}
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
const uno::Reference< embed::XStorage >& xStorage,
Reference<XComponent> xModelComponent,
const sal_Char* pStreamName,
@@ -596,8 +596,8 @@ void SmXMLImport::endDocument(void)
// Convert symbol names
SmParser &rParser = pDocShell->GetParser();
- BOOL bVal = rParser.IsImportSymbolNames();
- rParser.SetImportSymbolNames( TRUE );
+ sal_Bool bVal = rParser.IsImportSymbolNames();
+ rParser.SetImportSymbolNames( sal_True );
SmNode *pTmpTree = rParser.Parse( aText );
aText = rParser.GetText();
delete pTmpTree;
@@ -853,7 +853,7 @@ public:
class SmXMLRowContext_Impl : public SmXMLDocContext_Impl
{
protected:
- ULONG nElementCount;
+ sal_uLong nElementCount;
public:
SmXMLRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
@@ -1221,7 +1221,7 @@ void SmXMLFencedContext_Impl::EndElement()
aToken.aText = ',';
aToken.eType = TIDENT;
- ULONG i = rNodeStack.Count() - nElementCount;
+ sal_uLong i = rNodeStack.Count() - nElementCount;
if (rNodeStack.Count() - nElementCount > 1)
i += rNodeStack.Count() - 1 - nElementCount;
aRelationArray.resize(i);
@@ -1626,7 +1626,7 @@ void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[eSubSup+1] = rNodeStack.Pop();
@@ -1686,7 +1686,7 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[aSup+1] = rNodeStack.Pop();
@@ -1849,7 +1849,7 @@ public:
SmXMLMultiScriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
const OUString& rLName) :
SmXMLSubSupContext_Impl(rImport,nPrefix,rLName),
- bHasPrescripts(FALSE) {}
+ bHasPrescripts(sal_False) {}
void EndElement();
void MiddleElement();
@@ -2011,17 +2011,17 @@ class SmXMLFlatDocContext_Impl
{
public:
SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
virtual ~SmXMLFlatDocContext_Impl();
- virtual SvXMLImportContext *CreateChildContext(USHORT i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
};
SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
SvXMLImportContext(i_rImport, i_nPrefix, i_rLName),
@@ -2036,7 +2036,7 @@ SmXMLFlatDocContext_Impl::~SmXMLFlatDocContext_Impl()
}
SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
+ sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
{
// behave like meta base class iff we encounter office:meta
@@ -2229,7 +2229,7 @@ SvXMLImportContext *SmXMLDocContext_Impl::CreateChildContext(
const SvXMLTokenMap& rTokenMap = GetSmImport().GetPresLayoutElemTokenMap();
- //UINT32 nTest = rTokenMap.Get(nPrefix, rLocalName);
+ //sal_uInt32 nTest = rTokenMap.Get(nPrefix, rLocalName);
switch(rTokenMap.Get(nPrefix, rLocalName))
{
@@ -2332,7 +2332,7 @@ void SmXMLDocContext_Impl::EndElement()
ContextArray.resize(1);
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=0;i< 1;i++)
+ for (sal_uLong i=0;i< 1;i++)
ContextArray[i] = rNodeStack.Pop();
SmToken aDummy;
@@ -2341,9 +2341,9 @@ void SmXMLDocContext_Impl::EndElement()
rNodeStack.Push(pSNode);
SmNodeArray LineArray;
- ULONG n = rNodeStack.Count();
+ sal_uLong n = rNodeStack.Count();
LineArray.resize(n);
- for (ULONG j = 0; j < n; j++)
+ for (sal_uLong j = 0; j < n; j++)
LineArray[n - (j + 1)] = rNodeStack.Pop();
SmStructureNode *pSNode2 = new SmTableNode(aDummy);
pSNode2->SetSubNodes(LineArray);
@@ -2417,12 +2417,12 @@ void SmXMLRowContext_Impl::EndElement()
{
SmNodeArray aRelationArray;
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- ULONG nSize = rNodeStack.Count()-nElementCount;
+ sal_uLong nSize = rNodeStack.Count()-nElementCount;
if (nSize > 0)
{
aRelationArray.resize(nSize);
- for (ULONG j=rNodeStack.Count()-nElementCount;j > 0;j--)
+ for (sal_uLong j=rNodeStack.Count()-nElementCount;j > 0;j--)
aRelationArray[j-1] = rNodeStack.Pop();
@@ -2622,7 +2622,7 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TRSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
@@ -2631,14 +2631,14 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aReverseStack.Push(pThing);
}
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2672,11 +2672,11 @@ void SmXMLTableContext_Impl::EndElement()
SmNodeStack aReverseStack;
aExpressionArray.resize(rNodeStack.Count()-nElementCount);
- ULONG nRows = rNodeStack.Count()-nElementCount;
- USHORT nCols = 0;
+ sal_uLong nRows = rNodeStack.Count()-nElementCount;
+ sal_uInt16 nCols = 0;
SmStructureNode *pArray;
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 0;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 0;i--)
{
pArray = (SmStructureNode *)rNodeStack.Pop();
if (pArray->GetNumSubNodes() == 0)
@@ -2702,11 +2702,11 @@ void SmXMLTableContext_Impl::EndElement()
aReverseStack.Push(pArray);
}
aExpressionArray.resize(nCols*nRows);
- ULONG j=0;
+ sal_uLong j=0;
while (aReverseStack.Count())
{
pArray = (SmStructureNode *)aReverseStack.Pop();
- for (USHORT i=0;i<pArray->GetNumSubNodes();i++)
+ for (sal_uInt16 i=0;i<pArray->GetNumSubNodes();i++)
aExpressionArray[j++] = pArray->GetSubNode(i);
}
@@ -2717,7 +2717,7 @@ void SmXMLTableContext_Impl::EndElement()
aToken.eType = TMATRIX;
SmMatrixNode *pSNode = new SmMatrixNode(aToken);
pSNode->SetSubNodes(aExpressionArray);
- pSNode->SetRowCol(static_cast<USHORT>(nRows),nCols);
+ pSNode->SetRowCol(static_cast<sal_uInt16>(nRows),nCols);
rNodeStack.Push(pSNode);
}
@@ -2780,19 +2780,19 @@ void SmXMLMultiScriptsContext_Impl::EndElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TLSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
aReverseStack.Push(rNodeStack.Pop());
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2823,7 +2823,7 @@ void SmXMLActionContext_Impl::EndElement()
first pushed one*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 1;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 1;i--)
{
delete rNodeStack.Pop();
}
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 4272dc2be8..820c2b00b1 100644
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -54,9 +54,9 @@ public:
SmXMLImportWrapper(com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rRef)
: xModel(rRef) {}
- ULONG Import(SfxMedium &rMedium);
+ sal_uLong Import(SfxMedium &rMedium);
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory,
@@ -65,7 +65,7 @@ public:
const sal_Char* pFilterName,
sal_Bool bEncrypted );
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
const sal_Char* pStreamName,
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 1b15ae096a..8981d2e420 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -231,8 +231,8 @@ void MathType::Init()
/*ToDo replace with table rather than switch, returns
- TRUE in the case that the char is just a char, and
- FALSE if the character is an operator which must not be
+ sal_True in the case that the char is just a char, and
+ sal_False if the character is an operator which must not be
placed inside the quote sequence designed to protect
against being parsed as a keyword
@@ -246,7 +246,7 @@ void MathType::Init()
sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
sal_uInt8 nTypeFace)
{
- sal_Bool bRet=FALSE;
+ sal_Bool bRet=sal_False;
const char *pC = NULL;
switch(nChar)
{
@@ -280,56 +280,56 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
}
break;
case 0x00fb:
if ((nVersion < 3) && (nTypeFace == 0x81))
nChar = 0xDF;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 'a':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b1;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 'b':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b2;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 'l':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bb;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 'n':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bd;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 'r':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3c1;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 'D':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x394;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 0xa9:
if ((nVersion < 3) && (nTypeFace == 0x82))
nChar = '\'';
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
case 0x00f1:
if ((nVersion < 3) && (nTypeFace == 0x86))
@@ -337,7 +337,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
}
break;
case 0x00a3:
@@ -346,7 +346,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
}
break;
case 0x00de:
@@ -355,7 +355,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
}
break;
case 0x0057:
@@ -364,7 +364,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
}
break;
case 0x007b:
@@ -620,7 +620,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
case 0xe083:
rRet.Append('+');
- bRet=TRUE;
+ bRet=sal_True;
break;
case '^':
case 0xe091:
@@ -640,7 +640,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
case 0xeb01: //no space
case 0xeb08: //normal space
- bRet=TRUE;
+ bRet=sal_True;
break;
case 0xef04: //tiny space
case 0xef05: //tiny space
@@ -656,7 +656,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
default:
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=sal_True;
break;
}
if (pC)
@@ -739,7 +739,7 @@ int MathType::Parse(SotStorage *pStor)
//sigh, theres no point! MathType (in some bizarre subvarient) pads
//the end of the formula with ENDs (0)'s
- ULONG nEnd = pS->Tell();
+ sal_uLong nEnd = pS->Tell();
DBG_ASSERT(nEnd == pS->Seek(STREAM_SEEK_TO_END),
"Possibly unfully parsed formula");
# endif
@@ -801,12 +801,12 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
sal_Char nChar8;
String sFontName;
int i,nRet=1,newline=0;
- sal_Bool bSilent=FALSE;
+ sal_Bool bSilent=sal_False;
int nPart=0;
String sPush,sMainTerm;
int nSetSize=0,nSetAlign=0;
int nCurRow=0,nCurCol=0;
- sal_Bool bOpenString=FALSE;
+ sal_Bool bOpenString=sal_False;
xub_StrLen nTextStart = 0;
xub_StrLen nSubSupStartPos = 0;
xub_StrLen nLastTemplateBracket=STRING_NOTFOUND;
@@ -828,12 +828,12 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*/
if ((nRecord == CHAR) && (!bIsSilent) && (!bOpenString))
{
- bOpenString=TRUE;
+ bOpenString=sal_True;
nTextStart = rRet.Len();
}
else if ((nRecord != CHAR) && (bOpenString))
{
- bOpenString=FALSE;
+ bOpenString=sal_False;
if ((rRet.Len() - nTextStart) > 1)
{
String aStr;
@@ -1827,7 +1827,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
default:
break;
}
- bSilent = TRUE; //Skip the optional brackets and/or
+ bSilent = sal_True; //Skip the optional brackets and/or
//symbols that follow some of these
//records. Foo Data.
@@ -1874,7 +1874,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*pS >> nTabType;
*pS >> nTabOffset;
}
- DBG_ASSERT(FALSE,"Not seen in the wild Equation Ruler Field");
+ DBG_ASSERT(sal_False,"Not seen in the wild Equation Ruler Field");
break;
case FONT:
{
@@ -1985,7 +1985,7 @@ void MathType::HandleAlign(sal_uInt8 nHorAlign, sal_uInt8 /*nVAlign*/, int &rSet
* indicator by mathtype file format*/
sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSize)
{
- sal_Bool bRet=FALSE;
+ sal_Bool bRet=sal_False;
if (nLstSize < 0)
{
if ((-nLstSize/32 != nDefaultSize) && (-nLstSize/32 != nCurSize))
@@ -1994,7 +1994,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
{
rSetSize--;
rRet += '}';
- bRet=TRUE;
+ bRet=sal_True;
}
if (-nLstSize/32 != nLastSize)
{
@@ -2002,7 +2002,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
APPEND(rRet," size ");
rRet += String::CreateFromInt32(-nLstSize/32);
rRet += '{';
- bRet=TRUE;
+ bRet=sal_True;
rSetSize++;
}
nCurSize = -nLstSize/32;
@@ -2024,7 +2024,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
{
rSetSize--;
rRet += '}';
- bRet=TRUE;
+ bRet=sal_True;
}
if (nLstSize != nLastSize)
{
@@ -2032,7 +2032,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
APPEND(rRet," size ");
rRet += String::CreateFromInt32(nLstSize);
rRet += '{';
- bRet=TRUE;
+ bRet=sal_True;
rSetSize++;
}
nCurSize = nLstSize;
@@ -2049,7 +2049,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
SvStream *pStream = rMedium.GetOutStream();
if ( pStream )
{
- SvStorageRef pStor = new SotStorage( pStream, FALSE );
+ SvStorageRef pStor = new SotStorage( pStream, sal_False );
SvGlobalName aGName(0x0002ce02L, 0x0000, 0x0000,0xc0,0x00,
0x00,0x00,0x00,0x00,0x00,0x46 );
@@ -2116,7 +2116,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
- sal_Bool bRet=FALSE;
+ sal_Bool bRet=sal_False;
switch(pNode->GetType())
{
case NATTRIBUT:
@@ -2159,8 +2159,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
case NEXPRESSION:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2176,8 +2176,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
*pS << sal_uInt8(0x0a);
*pS << sal_uInt8(LINE);
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
*pS << sal_uInt8(END);
@@ -2196,8 +2196,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
default:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2243,15 +2243,15 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
int nBytes=(pMatrix->GetNumRows()+1)*2/8;
if (((pMatrix->GetNumRows()+1)*2)%8)
nBytes++;
- for (USHORT j = 0; j < nBytes; j++)
+ for (sal_uInt16 j = 0; j < nBytes; j++)
*pS << sal_uInt8(0x00); //row_parts
nBytes=(pMatrix->GetNumCols()+1)*2/8;
if (((pMatrix->GetNumCols()+1)*2)%8)
nBytes++;
- for (USHORT k = 0; k < nBytes; k++)
+ for (sal_uInt16 k = 0; k < nBytes; k++)
*pS << sal_uInt8(0x00); //col_parts
- USHORT nSize = pMatrix->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pMatrix->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pMatrix->GetSubNode(i))
{
*pS << sal_uInt8(LINE); //line
@@ -2265,7 +2265,7 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
//Root Node, PILE equivalent, i.e. vertical stack
void MathType::HandleTable(SmNode *pNode,int nLevel)
{
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//The root of the starmath is a table, if
//we convert this them each iteration of
//conversion from starmath to mathtype will
@@ -2283,7 +2283,7 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
*pS << sal_uInt8(0x01); //hAlign
}
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
{
*pS << sal_uInt8(LINE);
@@ -2297,7 +2297,7 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
void MathType::HandleRoot(SmNode *pNode,int nLevel)
{
- //USHORT nSize = pNode->GetNumSubNodes();
+ //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
*pS << sal_uInt8(TMPL); //Template
*pS << sal_uInt8(0x0D); //selector
@@ -2333,7 +2333,7 @@ void MathType::HandleRoot(SmNode *pNode,int nLevel)
}
sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos,sal_Bool bTest)
+ sal_uLong *pPos,sal_Bool bTest)
{
sal_uInt8 nVariation2=0xff;
@@ -2397,7 +2397,7 @@ sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
*/
void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
{
- //USHORT nSize = pNode->GetNumSubNodes();
+ //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
sal_uInt8 nVariation=0xff;
@@ -2496,7 +2496,7 @@ void MathType::HandleSubSupScript(SmNode *pNode,int nLevel)
void MathType::HandleFractions(SmNode *pNode,int nLevel)
{
- //USHORT nSize = pNode->GetNumSubNodes();
+ //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
*pS << sal_uInt8(TMPL); //Template
*pS << sal_uInt8(0x0E); //selector
@@ -2521,7 +2521,7 @@ void MathType::HandleFractions(SmNode *pNode,int nLevel)
void MathType::HandleBrace(SmNode *pNode,int nLevel)
{
- //USHORT nSize = pNode->GetNumSubNodes();
+ //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp;
SmNode *pLeft=pNode->GetSubNode(0);
SmNode *pRight=pNode->GetSubNode(2);
@@ -2529,7 +2529,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
*pS << sal_uInt8(TMPL); //Template
bIsReInterpBrace=0;
sal_uInt8 nBSpec=0x10;
- ULONG nLoc = pS->Tell();
+ sal_uLong nLoc = pS->Tell();
if (pLeft)
{
switch (pLeft->GetToken().eType)
@@ -2587,7 +2587,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
HandleNodes(pLeft,nLevel+1);
if (bIsReInterpBrace)
{
- ULONG nLoc2 = pS->Tell();
+ sal_uLong nLoc2 = pS->Tell();
pS->Seek(nLoc);
*pS << sal_uInt8(0x2D);
pS->Seek(nLoc2);
@@ -2632,12 +2632,12 @@ void MathType::HandleVerticalBrace(SmNode *pNode,int nLevel)
void MathType::HandleOperator(SmNode *pNode,int nLevel)
{
- //USHORT nSize = pNode->GetNumSubNodes();
+ //sal_uInt16 nSize = pNode->GetNumSubNodes();
if (HandleLim(pNode,nLevel))
return;
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt8 nVariation;
switch (pNode->GetToken().eType)
@@ -2659,7 +2659,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
sal_uInt8 nOldVariation=nVariation;
sal_uInt8 nIntVariation=nVariation;
- ULONG nPos2=0;
+ sal_uLong nPos2=0;
if (nVariation != 0xff)
{
nPos2 = pS->Tell();
@@ -2888,14 +2888,14 @@ int MathType::HandleTemplate(int nLevel,sal_uInt8 &rSelector,
//For the (broken) case where one subscript template ends, and there is
//another one after it, mathtype handles it as if the second one was
//inside the first one and renders it as sub of sub
- BOOL bRemove=FALSE;
+ sal_Bool bRemove=sal_False;
if ( (rSelector == 0xf) && (rLastTemplateBracket != STRING_NOTFOUND) )
{
- bRemove=TRUE;
+ bRemove=sal_True;
for (xub_StrLen nI = rLastTemplateBracket+1; nI < rRet.Len(); nI++ )
if (rRet.GetChar(nI) != ' ')
{
- bRemove=FALSE;
+ bRemove=sal_False;
break;
}
}
@@ -3226,8 +3226,8 @@ void MathType::HandleMAlign(SmNode *pNode,int nLevel)
nHAlign=1;
break;
}
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
nHAlign=nPushedHAlign;
@@ -3344,7 +3344,7 @@ void MathType::HandleMath(SmNode *pNode, int /*nLevel*/)
void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
int nOldPending = 0;
- //USHORT nSize = pNode->GetNumSubNodes();
+ //sal_uInt16 nSize = pNode->GetNumSubNodes();
SmNode *pTemp = 0;
SmTextNode *pIsText = 0;
@@ -3413,7 +3413,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
if ((nInsertion != 0) && NULL != (pTemp = pNode->GetSubNode(0)))
{
- ULONG nPos = pS->Tell();
+ sal_uLong nPos = pS->Tell();
nInsertion--;
pS->Seek(nInsertion);
switch(pTemp->GetToken().eType)
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 7e3b7e0844..5e4350f39a 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -122,7 +122,7 @@ private:
void HandleRoot(SmNode *pNode,int nLevel);
void HandleSubSupScript(SmNode *pNode,int nLevel);
sal_uInt8 HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos=NULL,sal_Bool bTest=TRUE);
+ sal_uLong *pPos=NULL,sal_Bool bTest=sal_True);
void HandleFractions(SmNode *pNode,int nLevel);
void HandleBrace(SmNode *pNode,int nLevel);
void HandleVerticalBrace(SmNode *pNode,int nLevel);
@@ -141,7 +141,7 @@ private:
sal_uInt8 nVAlign;
int nPendingAttributes;
- ULONG nInsertion;
+ sal_uLong nInsertion;
sal_Int16 aSizeTable[7];
sal_Int16 nDefaultSize;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 3f0c892b36..7167334fbd 100755
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -79,7 +79,7 @@ class SmTmpDevice
Color Impl_GetColor( const Color& rColor );
public:
- SmTmpDevice(OutputDevice &rTheDev, BOOL bUseMap100th_mm);
+ SmTmpDevice(OutputDevice &rTheDev, sal_Bool bUseMap100th_mm);
~SmTmpDevice() { rOutDev.Pop(); }
void SetFont(const Font &rNewFont);
@@ -92,7 +92,7 @@ public:
};
-SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, BOOL bUseMap100th_mm) :
+SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, sal_Bool bUseMap100th_mm) :
rOutDev(rTheDev)
{
rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
@@ -155,19 +155,19 @@ SmNode::~SmNode()
}
-BOOL SmNode::IsVisible() const
+sal_Bool SmNode::IsVisible() const
{
- return FALSE;
+ return sal_False;
}
-USHORT SmNode::GetNumSubNodes() const
+sal_uInt16 SmNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -185,14 +185,14 @@ SmNode * SmNode::GetLeftMost()
}
-void SmNode::SetPhantom(BOOL bIsPhantomP)
+void SmNode::SetPhantom(sal_Bool bIsPhantomP)
{
if (! (Flags() & FLG_VISIBLE))
bIsPhantom = bIsPhantomP;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetPhantom(bIsPhantom);
}
@@ -204,14 +204,14 @@ void SmNode::SetColor(const Color& rColor)
GetFont().SetColor(rColor);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetColor(rColor);
}
-void SmNode::SetAttribut(USHORT nAttrib)
+void SmNode::SetAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -222,14 +222,14 @@ void SmNode::SetAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetAttribut(nAttrib);
}
-void SmNode::ClearAttribut(USHORT nAttrib)
+void SmNode::ClearAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -240,8 +240,8 @@ void SmNode::ClearAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->ClearAttribut(nAttrib);
}
@@ -253,14 +253,14 @@ void SmNode::SetFont(const SmFace &rFace)
GetFont() = rFace;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFont(rFace);
}
-void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
+void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
//! 'rSize' is in units of pts
{
Size aFntSize;
@@ -309,8 +309,8 @@ void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFontSize(rSize, nType);
}
@@ -321,14 +321,14 @@ void SmNode::SetSize(const Fraction &rSize)
GetFont() *= rSize;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetSize(rSize);
}
-void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, BOOL bApplyToSubTree )
+void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, sal_Bool bApplyToSubTree )
{
if (!(Flags() & FLG_HORALIGN))
eRectHorAlign = eHorAlign;
@@ -336,8 +336,8 @@ void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, BOOL bApplyToSubTree )
if (bApplyToSubTree)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetRectHorAlign(eHorAlign);
}
@@ -354,11 +354,11 @@ void SmNode::PrepareAttributes()
void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
#if OSL_DEBUG_LEVEL > 1
- bIsDebug = TRUE;
+ bIsDebug = sal_True;
#else
- bIsDebug = FALSE;
+ bIsDebug = sal_False;
#endif
- bIsPhantom = FALSE;
+ bIsPhantom = sal_False;
nFlags = 0;
nAttributes = 0;
@@ -376,8 +376,8 @@ void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
GetFont().SetItalic(ITALIC_NONE);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Prepare(rFormat, rDocShell);
}
@@ -389,11 +389,11 @@ void SmNode::ToggleDebug() const
{
SmNode *pThis = (SmNode *) this;
- pThis->bIsDebug = bIsDebug ? FALSE : TRUE;
+ pThis->bIsDebug = bIsDebug ? sal_False : sal_True;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = pThis->GetSubNode(i)))
pNode->ToggleDebug();
}
@@ -408,8 +408,8 @@ void SmNode::Move(const Point& rPosition)
SmRect::Move(rPosition);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Move(rPosition);
}
@@ -418,8 +418,8 @@ void SmNode::Move(const Point& rPosition)
void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
}
@@ -427,10 +427,10 @@ void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->CreateTextFromNode(rText);
if (nSize > 1)
@@ -441,12 +441,12 @@ void SmNode::CreateTextFromNode(String &rText)
}
-void SmNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG /*nWidth*/)
+void SmNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong /*nWidth*/)
{
}
-void SmNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG /*nHeight*/)
+void SmNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong /*nHeight*/)
{
}
@@ -457,8 +457,8 @@ void SmNode::Draw(OutputDevice &rDev, const Point &rPosition) const
return;
const SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{ Point aOffset (pNode->GetTopLeft() - GetTopLeft());
pNode->Draw(rDev, rPosition + aOffset);
@@ -473,7 +473,7 @@ void SmNode::Draw(OutputDevice &rDev, const Point &rPosition) const
#endif
}
-const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
+const SmNode * SmNode::FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const
// returns (first) ** visible ** (sub)node with the tokens text at
// position 'nRow', 'nCol'.
//! (there should be exactly one such node if any)
@@ -484,8 +484,8 @@ const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
return this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -510,8 +510,8 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -557,8 +557,8 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{
const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -585,12 +585,12 @@ long SmNode::GetFormulaBaseline() const
SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) :
SmNode( rNode.GetType(), rNode.GetToken() )
{
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -604,7 +604,7 @@ SmStructureNode::~SmStructureNode()
{
SmNode *pNode;
- for (USHORT i = 0; i < GetNumSubNodes(); i++)
+ for (sal_uInt16 i = 0; i < GetNumSubNodes(); i++)
if (NULL != (pNode = GetSubNode(i)))
delete pNode;
}
@@ -614,12 +614,12 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
{
SmNode::operator = ( rNode );
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -650,19 +650,19 @@ void SmStructureNode::SetSubNodes(const SmNodeArray &rNodeArray)
}
-BOOL SmStructureNode::IsVisible() const
+sal_Bool SmStructureNode::IsVisible() const
{
- return FALSE;
+ return sal_False;
}
-USHORT SmStructureNode::GetNumSubNodes() const
+sal_uInt16 SmStructureNode::GetNumSubNodes() const
{
- return (USHORT) aSubNodes.size();
+ return (sal_uInt16) aSubNodes.size();
}
-SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
+SmNode * SmStructureNode::GetSubNode(sal_uInt16 nIndex)
{
return aSubNodes[nIndex];
}
@@ -670,8 +670,8 @@ SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
void SmStructureNode::GetAccessibleText( String &rText ) const
{
- USHORT nNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNodes; ++i)
+ sal_uInt16 nNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNodes; ++i)
{
const SmNode *pNode = ((SmStructureNode *) this)->GetSubNode(i);
if (pNode)
@@ -688,19 +688,19 @@ void SmStructureNode::GetAccessibleText( String &rText ) const
///////////////////////////////////////////////////////////////////////////
-BOOL SmVisibleNode::IsVisible() const
+sal_Bool SmVisibleNode::IsVisible() const
{
- return TRUE;
+ return sal_True;
}
-USHORT SmVisibleNode::GetNumSubNodes() const
+sal_uInt16 SmVisibleNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmVisibleNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmVisibleNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -719,10 +719,10 @@ void SmGraphicNode::GetAccessibleText( String &rText ) const
void SmExpressionNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
pNode->CreateTextFromNode(rText);
@@ -749,7 +749,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point rPosition;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
// make distance depend on font size
long nDist = +(rFormat.GetDistance(DIS_VERTICAL)
@@ -761,7 +761,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arrange subnodes and get maximum width of them
long nMaxWidth = 0,
nTmp;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{ pNode->Arrange(rDev, rFormat);
@@ -791,7 +791,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nFormulaBaseline = GetBaseline();
else
{
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
SmRect aRect = (SmRect(aTmpDev, &rFormat, C2S("a"),
@@ -838,13 +838,13 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arranges all subnodes in one row with some extra space between
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- USHORT i;
+ sal_uInt16 nSize = GetNumSubNodes();
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
if (nSize < 1)
@@ -898,7 +898,7 @@ void SmExpressionNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
// copy alignment of leftmost subnode if any
SmNode *pNode = GetLeftMost();
if (pNode)
- SetRectHorAlign(pNode->GetRectHorAlign(), FALSE);
+ SetRectHorAlign(pNode->GetRectHorAlign(), sal_False);
}
@@ -907,7 +907,7 @@ void SmExpressionNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
void SmUnHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- BOOL bIsPostfix = GetToken().eType == TFACT;
+ sal_Bool bIsPostfix = GetToken().eType == TFACT;
SmNode *pOper = GetSubNode(bIsPostfix ? 1 : 0),
*pBody = GetSubNode(bIsPostfix ? 0 : 1);
@@ -1021,7 +1021,7 @@ void SmRootNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmRect::operator = (*pBody);
ExtendBy(*pRootSym, RCP_THIS);
if (pExtra)
- ExtendBy(*pExtra, RCP_THIS, (BOOL) TRUE);
+ ExtendBy(*pExtra, RCP_THIS, (sal_Bool) sal_True);
}
@@ -1090,7 +1090,7 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
DBG_ASSERT(pLine, "Sm : NULL pointer");
DBG_ASSERT(pDenom, "Sm : NULL pointer");
- BOOL bIsTextmode = rFormat.IsTextmode();
+ sal_Bool bIsTextmode = rFormat.IsTextmode();
if (bIsTextmode)
{
Fraction aFraction(rFormat.GetRelSize(SIZ_INDEX), 100);
@@ -1166,14 +1166,14 @@ double Det(const Point &rHeading1, const Point &rHeading2)
}
-BOOL IsPointInLine(const Point &rPoint1,
+sal_Bool IsPointInLine(const Point &rPoint1,
const Point &rPoint2, const Point &rHeading2)
- // ergibt TRUE genau dann, wenn der Punkt 'rPoint1' zu der Gerade gehoert die
+ // ergibt sal_True genau dann, wenn der Punkt 'rPoint1' zu der Gerade gehoert die
// durch den Punkt 'rPoint2' geht und den Richtungsvektor 'rHeading2' hat
{
DBG_ASSERT(rHeading2 != Point(), "Sm : 0 vector");
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
const double eps = 5.0 * DBL_EPSILON;
double fLambda;
@@ -1192,14 +1192,14 @@ BOOL IsPointInLine(const Point &rPoint1,
}
-USHORT GetLineIntersectionPoint(Point &rResult,
+sal_uInt16 GetLineIntersectionPoint(Point &rResult,
const Point& rPoint1, const Point &rHeading1,
const Point& rPoint2, const Point &rHeading2)
{
DBG_ASSERT(rHeading1 != Point(), "Sm : 0 vector");
DBG_ASSERT(rHeading2 != Point(), "Sm : 0 vector");
- USHORT nRes = 1;
+ sal_uInt16 nRes = 1;
const double eps = 5.0 * DBL_EPSILON;
// sind die Richtumgsvektoren linear abhaengig ?
@@ -1228,7 +1228,7 @@ USHORT GetLineIntersectionPoint(Point &rResult,
SmBinDiagonalNode::SmBinDiagonalNode(const SmToken &rNodeToken)
: SmStructureNode(NBINDIAGONAL, rNodeToken)
{
- bAscending = FALSE;
+ bAscending = sal_False;
SetNumSubNodes(3);
}
@@ -1378,7 +1378,7 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat &rForma
//! some routines being called extract some info from the OutputDevice's
//! font (eg the space to be used for borders OR the font name(!!)).
//! Thus the font should reflect the needs and has to be set!
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
pLeft->Arrange(aTmpDev, rFormat);
@@ -1471,7 +1471,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// (as would be in "a_{1_{2_{3_4}}}")
if (GetFont().GetSize().Height() > rFormat.GetBaseSize().Height() / 3)
{
- USHORT nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
+ sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
SIZ_LIMITS : SIZ_INDEX;
Fraction aFraction ( rFormat.GetRelSize(nIndex), 100 );
pSubSup->SetSize(aFraction);
@@ -1479,7 +1479,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pSubSup->Arrange(rDev, rFormat);
- BOOL bIsTextmode = rFormat.IsTextmode();
+ sal_Bool bIsTextmode = rFormat.IsTextmode();
nDist = 0;
//! be sure that CSUB, CSUP are handled before the other cases!
@@ -1527,12 +1527,12 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
aPos.Y() -= nDist;
break;
default :
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
break;
}
pSubSup->MoveTo(aPos);
- ExtendBy(*pSubSup, RCP_THIS, (BOOL) TRUE);
+ ExtendBy(*pSubSup, RCP_THIS, (sal_Bool) sal_True);
// update rectangle to which RSUB, RSUP, LSUB, LSUP
// will be aligned to
@@ -1645,7 +1645,7 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pBody->Arrange(rDev, rFormat);
- BOOL bIsScaleNormal = rFormat.IsScaleNormalBrackets(),
+ sal_Bool bIsScaleNormal = rFormat.IsScaleNormalBrackets(),
bScale = pBody->GetHeight() > 0 &&
(GetScaleMode() == SCALE_HEIGHT || bIsScaleNormal),
bIsABS = GetToken().eType == TABS;
@@ -1653,10 +1653,10 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
long nFaceHeight = GetFont().GetSize().Height();
// Uebergroesse in % ermitteln
- USHORT nPerc = 0;
+ sal_uInt16 nPerc = 0;
if (!bIsABS && bScale)
{ // im Fall von Klammern mit Uebergroesse...
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
nPerc = rFormat.GetDistance(nIndex);
}
@@ -1727,12 +1727,12 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- USHORT nNumSubNodes = GetNumSubNodes();
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
if (nNumSubNodes == 0)
return;
// arrange arguments
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nNumSubNodes; i += 2)
GetSubNode(i)->Arrange(rDev, rFormat);
@@ -1749,11 +1749,11 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nBodyHeight = aRefRect.GetHeight();
// scale separators to required height and arrange them
- BOOL bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
+ sal_Bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height();
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
- USHORT nPerc = rFormat.GetDistance(nIndex);
+ sal_uInt16 nPerc = rFormat.GetDistance(nIndex);
if (bScale)
nHeight += 2 * (nHeight * nPerc / 100L);
for (i = 1; i < nNumSubNodes; i += 2)
@@ -1771,7 +1771,7 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmRect::operator = (*pLeft);
for (i = 1; i < nNumSubNodes; i++)
{
- BOOL bIsSeparator = i % 2 != 0;
+ sal_Bool bIsSeparator = i % 2 != 0;
RectVerAlign eVerAlign = bIsSeparator ? RVA_CENTERY : RVA_BASELINE;
SmNode *pRight = GetSubNode(i);
@@ -1799,7 +1799,7 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
DBG_ASSERT(pBrace, "Sm: NULL pointer!");
DBG_ASSERT(pScript, "Sm: NULL pointer!");
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
pBody->Arrange(aTmpDev, rFormat);
@@ -1984,7 +1984,7 @@ void SmAttributNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pAttr->MoveTo(aPos);
SmRect::operator = (*pBody);
- ExtendBy(*pAttr, RCP_THIS, (BOOL) TRUE);
+ ExtendBy(*pAttr, RCP_THIS, (sal_Bool) sal_True);
}
@@ -2095,7 +2095,7 @@ void SmFontNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
break;
}
if (nFnt != -1)
- { GetFont() = rFormat.GetFont( sal::static_int_cast< USHORT >(nFnt) );
+ { GetFont() = rFormat.GetFont( sal::static_int_cast< sal_uInt16 >(nFnt) );
SetFont(GetFont());
}
@@ -2121,7 +2121,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
break;
case TUNKNOWN : break; // no assertion on "font <?> <?>"
- case TPHANTOM : SetPhantom(TRUE); break;
+ case TPHANTOM : SetPhantom(sal_True); break;
case TBOLD : SetAttribut(ATTR_BOLD); break;
case TITALIC : SetAttribut(ATTR_ITALIC); break;
case TNBOLD : ClearAttribut(ATTR_BOLD); break;
@@ -2137,7 +2137,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
case TYELLOW : SetColor(Color(COL_YELLOW)); break;
default:
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
}
pNode->Arrange(rDev, rFormat);
@@ -2146,7 +2146,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmFontNode::SetSizeParameter(const Fraction& rValue, USHORT Type)
+void SmFontNode::SetSizeParameter(const Fraction& rValue, sal_uInt16 Type)
{
nSizeType = Type;
aFontSize = rValue;
@@ -2164,13 +2164,13 @@ SmPolyLineNode::SmPolyLineNode(const SmToken &rNodeToken)
}
-void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nNewWidth)
+void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nNewWidth)
{
aToSize.Width() = nNewWidth;
}
-void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nNewHeight)
+void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nNewHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nNewHeight;
@@ -2182,7 +2182,7 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
//! some routines being called extract some info from the OutputDevice's
//! font (eg the space to be used for borders OR the font name(!!)).
//! Thus the font should reflect the needs and has to be set!
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
long nBorderwidth = GetFont().GetBorderWidth();
@@ -2233,7 +2233,7 @@ void SmPolyLineNode::Draw(OutputDevice &rDev, const Point &rPosition) const
aPos (rPosition + aOffset);
((Polygon &) aPoly).Move(aPos.X(), aPos.Y());
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, FALSE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_False);
aTmpDev.SetLineColor( GetFont().GetColor() );
rDev.DrawPolyLine(aPoly, aInfo);
@@ -2250,13 +2250,13 @@ void SmPolyLineNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/**************************************************************************/
-void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
nBodyWidth = nWidth;
}
-void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
// etwas extra Laenge damit der horizontale Balken spaeter ueber dem
// Argument positioniert ist
@@ -2272,7 +2272,7 @@ void SmRootSymbolNode::Draw(OutputDevice &rDev, const Point &rPosition) const
// draw root-sign itself
SmMathSymbolNode::Draw(rDev, rPosition);
- SmTmpDevice aTmpDev( (OutputDevice &) rDev, TRUE );
+ SmTmpDevice aTmpDev( (OutputDevice &) rDev, sal_True );
aTmpDev.SetFillColor(GetFont().GetColor());
rDev.SetLineColor();
aTmpDev.SetFont( GetFont() );
@@ -2310,13 +2310,13 @@ void SmRootSymbolNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/**************************************************************************/
-void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
aToSize.Width() = nWidth;
}
-void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nHeight)
+void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nHeight;
@@ -2333,15 +2333,15 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
if (nWidth == 0)
nWidth = nFontHeight / 3;
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
// add some borderspace
- ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
+ sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
//nWidth += nTmpBorderWidth;
nHeight += 2 * nTmpBorderWidth;
- //! use this method in order to have 'SmRect::HasAlignInfo() == TRUE'
+ //! use this method in order to have 'SmRect::HasAlignInfo() == sal_True'
//! and thus having the attribut-fences updated in 'SmRect::ExtendBy'
SmRect::operator = (SmRect(nWidth, nHeight));
}
@@ -2352,12 +2352,12 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
if (IsPhantom())
return;
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, FALSE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_False);
aTmpDev.SetFillColor(GetFont().GetColor());
rDev.SetLineColor();
aTmpDev.SetFont(GetFont());
- ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
+ sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
// get rectangle and remove borderspace
Rectangle aTmp (AsRectangle() + rPosition - GetTopLeft());
@@ -2391,14 +2391,14 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const
/**************************************************************************/
-SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(eNodeType, rNodeToken)
{
nFontDesc = nFontDescP;
}
-SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(NTEXT, rNodeToken)
{
nFontDesc = nFontDescP;
@@ -2435,11 +2435,11 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- USHORT nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
+ sal_uInt16 nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
SIZ_FUNCTION : SIZ_TEXT;
GetFont() *= Fraction (rFormat.GetRelSize(nSizeDesc), 100);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, aText, GetFont().GetBorderWidth()));
@@ -2447,17 +2447,17 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmTextNode::CreateTextFromNode(String &rText)
{
- BOOL bQuoted=FALSE;
+ sal_Bool bQuoted=sal_False;
if (GetToken().eType == TTEXT)
{
rText.Append('\"');
- bQuoted=TRUE;
+ bQuoted=sal_True;
}
else
{
SmParser aParseTest;
SmNode *pTable = aParseTest.Parse(GetToken().aText);
- bQuoted=TRUE;
+ bQuoted=sal_True;
if ( (pTable->GetType() == NTABLE) && (pTable->GetNumSubNodes() == 1) )
{
SmNode *pResult = pTable->GetSubNode(0);
@@ -2470,7 +2470,7 @@ void SmTextNode::CreateTextFromNode(String &rText)
{
pResult = pResult->GetSubNode(0);
if (pResult->GetType() == NTEXT)
- bQuoted=FALSE;
+ bQuoted=sal_False;
}
}
}
@@ -2501,7 +2501,7 @@ void SmTextNode::Draw(OutputDevice &rDev, const Point& rPosition) const
if (IsPhantom() || aText.Len() == 0 || aText.GetChar(0) == xub_Unicode('\0'))
return;
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, FALSE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_False);
aTmpDev.SetFont(GetFont());
Point aPos (rPosition);
@@ -2536,9 +2536,9 @@ void SmTextNode::GetAccessibleText( String &rText ) const
void SmMatrixNode::CreateTextFromNode(String &rText)
{
APPEND(rText,"matrix {");
- for (USHORT i = 0; i < nNumRows; i++)
+ for (sal_uInt16 i = 0; i < nNumRows; i++)
{
- for (USHORT j = 0; j < nNumCols; j++)
+ for (sal_uInt16 j = 0; j < nNumCols; j++)
{
SmNode *pNode = GetSubNode(i * nNumCols + j);
pNode->CreateTextFromNode(rText);
@@ -2558,7 +2558,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point aPosition,
aOffset;
SmNode *pNode;
- USHORT i, j;
+ sal_uInt16 i, j;
// initialize array that is to hold the maximum widhts of all
// elements (subnodes) in that column.
@@ -2567,10 +2567,10 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pColWidth[j] = 0;
// arrange subnodes and calculate the aboves arrays contents
- USHORT nNodes = GetNumSubNodes();
+ sal_uInt16 nNodes = GetNumSubNodes();
for (i = 0; i < nNodes; i++)
{
- USHORT nIdx = nNodes - 1 - i;
+ sal_uInt16 nIdx = nNodes - 1 - i;
if (NULL != (pNode = GetSubNode(nIdx)))
{
pNode->Arrange(rDev, rFormat);
@@ -2654,7 +2654,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmMatrixNode::SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols)
+void SmMatrixNode::SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols)
{
nNumRows = nMatrixRows;
nNumCols = nMatrixCols;
@@ -2678,7 +2678,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken)
SetText( cChar );
}
-void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
+void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, sal_uLong nWidth)
{
// Since there is no function to do this, we try to approximate it:
Size aFntSize (GetFont().GetSize());
@@ -2687,7 +2687,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
aFntSize.Width() = nWidth;
GetFont().SetSize(aFntSize);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
// get denominator of error factor for width
@@ -2701,7 +2701,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
GetFont().SetSize(aFntSize);
}
-void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
Size aFntSize (GetFont().GetSize());
@@ -2723,7 +2723,7 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
aFntSize.Height() = nHeight;
GetFont().SetSize(aFntSize);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
// get denominator of error factor for height
@@ -2767,7 +2767,7 @@ void SmMathSymbolNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
GetFont() *= Fraction (rFormat.GetRelSize(SIZ_TEXT), 100);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, rText, GetFont().GetBorderWidth()));
@@ -2801,7 +2801,7 @@ void SmRectangleNode::CreateTextFromNode(String &rText)
void SmAttributNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
DBG_ASSERT(nSize == 2, "Node missing members");
rText.Append('{');
sal_Unicode nLast=0;
@@ -2871,7 +2871,7 @@ bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
}
-SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) :
+SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc) :
SmTextNode(eNodeType, rNodeToken, _nFontDesc)
{
bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
@@ -2926,7 +2926,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
{
DBG_ASSERT( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
bool bItalic = false;
- INT16 nStyle = rFormat.GetGreekCharStyle();
+ sal_Int16 nStyle = rFormat.GetGreekCharStyle();
DBG_ASSERT( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
if (nStyle == 1)
bItalic = true;
@@ -2955,7 +2955,7 @@ void SmSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(), GetFont().GetBorderWidth()));
@@ -2979,7 +2979,7 @@ void SmGlyphSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rForm
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(),
@@ -3003,7 +3003,7 @@ void SmPlaceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(), GetFont().GetBorderWidth()));
@@ -3027,7 +3027,7 @@ void SmErrorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
const XubString &rText = GetText();
@@ -3065,7 +3065,7 @@ void SmBlankNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
void SmBlankNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
aTmpDev.SetFont(GetFont());
// Abstand von der Fonthoehe abhaengig machen
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index b9a75add06..be23b72b9a 100755
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -55,7 +55,7 @@ using namespace ::com::sun::star::i18n;
///////////////////////////////////////////////////////////////////////////
-static inline BOOL strnccmp(const String &u1, xub_StrLen nIdx,
+static inline sal_Bool strnccmp(const String &u1, xub_StrLen nIdx,
const sal_Char *s2, xub_StrLen nLen)
{
return u1.EqualsIgnoreCaseAscii( s2, nIdx, nLen );
@@ -70,7 +70,7 @@ static const sal_Unicode aDelimiterTable[] =
};
-static inline BOOL IsDigit( sal_Unicode cChar )
+static inline sal_Bool IsDigit( sal_Unicode cChar )
{
return '0' <= cChar && cChar <= '9';
}
@@ -91,8 +91,8 @@ struct SmTokenTableEntry
const sal_Char* pIdent;
SmTokenType eType;
sal_Unicode cMathChar;
- ULONG nGroup;
- USHORT nLevel;
+ sal_uLong nGroup;
+ sal_uInt16 nLevel;
};
static const SmTokenTableEntry aTokenTable[] =
@@ -344,8 +344,8 @@ static const SmTokenTableEntry * GetTokenTableEntry( const String &rName )
const SmTokenTableEntry * pRes = 0;
if (rName.Len())
{
- INT32 nEntries = sizeof( aTokenTable ) / sizeof( aTokenTable[0] );
- for (INT32 i = 0; i < nEntries; ++i)
+ sal_Int32 nEntries = sizeof( aTokenTable ) / sizeof( aTokenTable[0] );
+ for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aTokenTable[i].pIdent ))
{
@@ -364,14 +364,14 @@ static const SmTokenTableEntry * GetTokenTableEntry( const String &rName )
#if OSL_DEBUG_LEVEL
-BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
- // returns 'TRUE' iff cChar is '\0' or a delimeter
+sal_Bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
+ // returns 'sal_True' iff cChar is '\0' or a delimeter
{
DBG_ASSERT( nPos <= rTxt.Len(), "index out of range" );
sal_Unicode cChar = rTxt.GetChar( nPos );
if(!cChar)
- return TRUE;
+ return sal_True;
// check if 'cChar' is in the delimeter table
const sal_Unicode *pDelim = &aDelimiterTable[0];
@@ -379,9 +379,9 @@ BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
if (*pDelim == cChar)
break;
- BOOL bIsDelim = *pDelim != 0;
+ sal_Bool bIsDelim = *pDelim != 0;
- INT16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
+ sal_Int16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
bIsDelim |= nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
nTypJp == com::sun::star::i18n::UnicodeType::CONTROL;
@@ -390,7 +390,7 @@ BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
#endif
-void SmParser::Insert(const String &rText, USHORT nPos)
+void SmParser::Insert(const String &rText, sal_uInt16 nPos)
{
BufferString.Insert(rText, nPos);
@@ -400,12 +400,12 @@ void SmParser::Insert(const String &rText, USHORT nPos)
}
-void SmParser::Replace( USHORT nPos, USHORT nLen, const String &rText )
+void SmParser::Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText )
{
DBG_ASSERT( nPos + nLen <= BufferString.Len(), "argument mismatch" );
BufferString.Replace( nPos, nLen, rText );
- INT16 nChg = rText.Len() - nLen;
+ sal_Int16 nChg = rText.Len() - nLen;
BufferIndex = BufferIndex + nChg;
nTokenIndex = nTokenIndex + nChg;
}
@@ -437,8 +437,8 @@ void SmParser::NextToken()
xub_StrLen nBufLen = BufferString.Len();
ParseResult aRes;
xub_StrLen nRealStart;
- BOOL bCont;
- BOOL bNumStart = FALSE;
+ sal_Bool bCont;
+ sal_Bool bNumStart = sal_False;
CharClass aCC(SM_MOD()->GetSysLocale().GetCharClass().getLocale());
do
{
@@ -487,7 +487,7 @@ void SmParser::NextToken()
nRealStart = BufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
BufferIndex = nRealStart;
- bCont = FALSE;
+ bCont = sal_False;
if ( aRes.TokenType == 0 &&
nRealStart < nBufLen &&
'\n' == BufferString.GetChar( nRealStart ) )
@@ -495,7 +495,7 @@ void SmParser::NextToken()
// keep data needed for tokens row and col entry up to date
++Row;
BufferIndex = ColOff = nRealStart + 1;
- bCont = TRUE;
+ bCont = sal_True;
}
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
@@ -507,7 +507,7 @@ void SmParser::NextToken()
while (BufferIndex < nBufLen &&
'\n' != BufferString.GetChar( BufferIndex ))
++BufferIndex;
- bCont = TRUE;
+ bCont = sal_True;
}
}
@@ -519,7 +519,7 @@ void SmParser::NextToken()
CurToken.nRow = Row;
CurToken.nCol = nRealStart - ColOff + 1;
- BOOL bHandled = TRUE;
+ sal_Bool bHandled = sal_True;
if (nRealStart >= nBufLen)
{
CurToken.eType = TEND;
@@ -531,7 +531,7 @@ void SmParser::NextToken()
else if ((aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER))
|| (bNumStart && (aRes.TokenType & KParseType::IDENTNAME)))
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
DBG_ASSERT( n >= 0, "length < 0" );
CurToken.eType = TNUMBER;
CurToken.cMathChar = '\0';
@@ -558,7 +558,7 @@ void SmParser::NextToken()
}
else if (aRes.TokenType & KParseType::IDENTNAME)
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
DBG_ASSERT( n >= 0, "length < 0" );
String aName( BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName );
@@ -698,7 +698,7 @@ void SmParser::NextToken()
}
break;
default:
- bHandled = FALSE;
+ bHandled = sal_False;
}
}
}
@@ -991,12 +991,12 @@ void SmParser::NextToken()
}
break;
default:
- bHandled = FALSE;
+ bHandled = sal_False;
}
}
}
else
- bHandled = FALSE;
+ bHandled = sal_False;
if (!bHandled)
{
@@ -1033,11 +1033,11 @@ void SmParser::Table()
if (CurToken.eType != TEND)
Error(PE_UNEXPECTED_CHAR);
- ULONG n = NodeStack.Count();
+ sal_uLong n = NodeStack.Count();
LineArray.resize(n);
- for (ULONG i = 0; i < n; i++)
+ for (sal_uLong i = 0; i < n; i++)
LineArray[n - (i + 1)] = NodeStack.Pop();
SmStructureNode *pSNode = new SmTableNode(CurToken);
@@ -1050,7 +1050,7 @@ void SmParser::Align()
// parse alignment info (if any), then go on with rest of expression
{
SmStructureNode *pSNode = 0;
- BOOL bNeedGroupClose = FALSE;
+ sal_Bool bNeedGroupClose = sal_False;
if (TokenInGroup(TGALIGN))
{
@@ -1058,7 +1058,7 @@ void SmParser::Align()
// encapsulate expression to be aligned in group braces
// (here group-open brace)
{ Insert('{', GetTokenIndex());
- bNeedGroupClose = TRUE;
+ bNeedGroupClose = sal_True;
// get first valid align statement in sequence
// (the dominant one in 4.0) and erase all others (especially old
@@ -1102,7 +1102,7 @@ void SmParser::Align()
void SmParser::Line()
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray ExpressionArray;
ExpressionArray.resize(n);
@@ -1133,17 +1133,17 @@ void SmParser::Line()
void SmParser::Expression()
{
- BOOL bUseExtraSpaces = TRUE;
+ sal_Bool bUseExtraSpaces = sal_True;
SmNode *pNode = NodeStack.Pop();
if (pNode)
{
if (pNode->GetToken().eType == TNOSPACE)
- bUseExtraSpaces = FALSE;
+ bUseExtraSpaces = sal_False;
else
NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray RelationArray;
RelationArray.resize(n);
@@ -1211,7 +1211,7 @@ void SmParser::Product()
{ SmStructureNode *pSNode;
SmNode *pFirst = NodeStack.Pop(),
*pOper;
- BOOL bSwitchArgs = FALSE;
+ sal_Bool bSwitchArgs = sal_False;
SmTokenType eType = CurToken.eType;
switch (eType)
@@ -1249,7 +1249,7 @@ void SmParser::Product()
pOper = new SmPolyLineNode(CurToken);
NextToken();
- bSwitchArgs =TRUE;
+ bSwitchArgs =sal_True;
break;
}
@@ -1272,7 +1272,7 @@ void SmParser::Product()
}
-void SmParser::SubSup(ULONG nActiveGroup)
+void SmParser::SubSup(sal_uLong nActiveGroup)
{
DBG_ASSERT(nActiveGroup == TGPOWER || nActiveGroup == TGLIMIT,
"Sm: falsche Tokengruppe");
@@ -1293,7 +1293,7 @@ void SmParser::SubSup(ULONG nActiveGroup)
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
aSubNodes[0] = NodeStack.Pop();
- for (USHORT i = 1; i < aSubNodes.size(); i++)
+ for (sal_uInt16 i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
// process all sub-/supscripts
@@ -1323,7 +1323,7 @@ void SmParser::SubSup(ULONG nActiveGroup)
case TLSUB : nIndex = (int) LSUB; break;
case TLSUP : nIndex = (int) LSUP; break;
default :
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
}
nIndex++;
DBG_ASSERT(1 <= nIndex && nIndex <= 1 + SUBSUP_NUM_ENTRIES,
@@ -1527,9 +1527,9 @@ void SmParser::Term()
|| TokenInGroup(TGFONTATTR))
{ SmStructureNodeArray aArray;
- BOOL bIsAttr;
- USHORT n = 0;
- while (TRUE == (bIsAttr = TokenInGroup(TGATTRIBUT))
+ sal_Bool bIsAttr;
+ sal_uInt16 n = 0;
+ while (sal_True == (bIsAttr = TokenInGroup(TGATTRIBUT))
|| TokenInGroup(TGFONTATTR))
{ aArray.resize(n + 1);
@@ -1715,7 +1715,7 @@ void SmParser::UnOper()
SmToken aNodeToken = CurToken;
SmTokenType eType = CurToken.eType;
- BOOL bIsPostfix = eType == TFACT;
+ sal_Bool bIsPostfix = eType == TFACT;
SmStructureNode *pSNode;
SmNode *pOper = 0,
@@ -1908,9 +1908,9 @@ void SmParser::Font()
// gets number used as arguments in Math formulas (e.g. 'size' command)
// Format: no negative numbers, must start with a digit, no exponent notation, ...
-BOOL lcl_IsNumber(const UniString& rText)
+sal_Bool lcl_IsNumber(const UniString& rText)
{
- BOOL bPoint = FALSE;
+ sal_Bool bPoint = sal_False;
const sal_Unicode* pBuffer = rText.GetBuffer();
for(xub_StrLen nPos = 0; nPos < rText.Len(); nPos++, pBuffer++)
{
@@ -1918,21 +1918,21 @@ BOOL lcl_IsNumber(const UniString& rText)
if(cChar == '.')
{
if(bPoint)
- return FALSE;
+ return sal_False;
else
- bPoint = TRUE;
+ bPoint = sal_True;
}
else if ( !IsDigit( cChar ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void SmParser::FontSize()
{
DBG_ASSERT(CurToken.eType == TSIZE, "Sm : Ooops...");
- USHORT Type;
+ sal_uInt16 Type;
SmFontNode *pFontNode = new SmFontNode(CurToken);
NextToken();
@@ -2020,7 +2020,7 @@ void SmParser::Brace()
pLeft = new SmMathSymbolNode(CurToken);
NextToken();
- Bracebody(TRUE);
+ Bracebody(sal_True);
pBody = NodeStack.Pop();
if (CurToken.eType == TRIGHT)
@@ -2048,7 +2048,7 @@ void SmParser::Brace()
pLeft = new SmMathSymbolNode(CurToken);
NextToken();
- Bracebody(FALSE);
+ Bracebody(sal_False);
pBody = NodeStack.Pop();
SmTokenType eExpectedType = TUNKNOWN;
@@ -2096,11 +2096,11 @@ void SmParser::Brace()
}
-void SmParser::Bracebody(BOOL bIsLeftRight)
+void SmParser::Bracebody(sal_Bool bIsLeftRight)
{
SmStructureNode *pBody = new SmBracebodyNode(CurToken);
SmNodeArray aNodes;
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
// get body if any
if (bIsLeftRight)
@@ -2144,7 +2144,7 @@ void SmParser::Bracebody(BOOL bIsLeftRight)
// build argument vector in parsing order
aNodes.resize(nNum);
- for (USHORT i = 0; i < nNum; i++)
+ for (sal_uInt16 i = 0; i < nNum; i++)
aNodes[nNum - 1 - i] = NodeStack.Pop();
pBody->SetSubNodes(aNodes);
@@ -2216,7 +2216,7 @@ void SmParser::Stack()
NextToken();
if (CurToken.eType == TLGROUP)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
do
{
@@ -2228,7 +2228,7 @@ void SmParser::Stack()
ExpressionArray.resize(n);
- for (USHORT i = 0; i < n; i++)
+ for (sal_uInt16 i = 0; i < n; i++)
ExpressionArray[n - (i + 1)] = NodeStack.Pop();
if (CurToken.eType != TRGROUP)
@@ -2252,7 +2252,7 @@ void SmParser::Matrix()
NextToken();
if (CurToken.eType == TLGROUP)
{
- USHORT c = 0;
+ sal_uInt16 c = 0;
do
{
@@ -2262,12 +2262,12 @@ void SmParser::Matrix()
}
while (CurToken.eType == TPOUND);
- USHORT r = 1;
+ sal_uInt16 r = 1;
while (CurToken.eType == TDPOUND)
{
NextToken();
- for (USHORT i = 0; i < c; i++)
+ for (sal_uInt16 i = 0; i < c; i++)
{
Align();
if (i < (c - 1))
@@ -2288,7 +2288,7 @@ void SmParser::Matrix()
ExpressionArray.resize(nRC);
- for (USHORT i = 0; i < (nRC); i++)
+ for (sal_uInt16 i = 0; i < (nRC); i++)
ExpressionArray[(nRC) - (i + 1)] = NodeStack.Pop();
if (CurToken.eType != TRGROUP)
@@ -2308,7 +2308,7 @@ void SmParser::Matrix()
void SmParser::Special()
{
- BOOL bReplace = FALSE;
+ sal_Bool bReplace = sal_False;
String &rName = CurToken.aText;
String aNewName;
@@ -2323,13 +2323,13 @@ void SmParser::Special()
{
const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetUiSymbolName( rName.Copy( 1 ) );
- bReplace = TRUE;
+ bReplace = sal_True;
}
else if (IsExportSymbolNames())
{
const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetExportSymbolName( rName.Copy( 1 ) );
- bReplace = TRUE;
+ bReplace = sal_True;
}
}
if( aNewName.Len() )
@@ -2355,13 +2355,13 @@ void SmParser::Special()
{
DBG_ASSERT( pFrom->Count() == pTo->Count(),
"array length mismatch" );
- USHORT nCount = sal::static_int_cast< USHORT >(pFrom->Count());
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = sal::static_int_cast< sal_uInt16 >(pFrom->Count());
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (pFrom->GetString(i) == rName)
{
aNewName = pTo->GetString(i);
- bReplace = TRUE;
+ bReplace = sal_True;
}
}
}
@@ -2411,7 +2411,7 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
{
eConversion = CONVERT_NONE;
- bImportSymNames = bExportSymNames = FALSE;
+ bImportSymNames = bExportSymNames = sal_False;
nLang = Application::GetSettings().GetUILanguage();
}
@@ -2426,7 +2426,7 @@ SmNode *SmParser::Parse(const String &rBuffer)
ColOff = 0;
CurError = -1;
- for (USHORT i = 0; i < ErrDescList.Count(); i++)
+ for (sal_uInt16 i = 0; i < ErrDescList.Count(); i++)
delete ErrDescList.Remove(i);
ErrDescList.Clear();
@@ -2441,7 +2441,7 @@ SmNode *SmParser::Parse(const String &rBuffer)
}
-USHORT SmParser::AddError(SmParseError Type, SmNode *pNode)
+sal_uInt16 SmParser::AddError(SmParseError Type, SmNode *pNode)
{
SmErrorDesc *pErrDesc = new SmErrorDesc;
@@ -2449,7 +2449,7 @@ USHORT SmParser::AddError(SmParseError Type, SmNode *pNode)
pErrDesc->pNode = pNode;
pErrDesc->Text = String(SmResId(RID_ERR_IDENT));
- USHORT nRID;
+ sal_uInt16 nRID;
switch (Type)
{
case PE_UNEXPECTED_CHAR: nRID = RID_ERR_UNEXPECTEDCHARACTER; break;
@@ -2473,7 +2473,7 @@ USHORT SmParser::AddError(SmParseError Type, SmNode *pNode)
ErrDescList.Insert(pErrDesc);
- return (USHORT) ErrDescList.GetPos(pErrDesc);
+ return (sal_uInt16) ErrDescList.GetPos(pErrDesc);
}
@@ -2503,7 +2503,7 @@ const SmErrorDesc *SmParser::PrevError()
}
-const SmErrorDesc *SmParser::GetError(USHORT i)
+const SmErrorDesc *SmParser::GetError(sal_uInt16 i)
{
return (/*i >= 0 &&*/ i < ErrDescList.Count())
? ErrDescList.Seek(i)
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index f3545d3f50..22710307c6 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -61,19 +61,19 @@ static xub_Unicode __READONLY_DATA aMathAlpha[] =
xub_Unicode('\0')
};
-BOOL SmIsMathAlpha(const XubString &rText)
+sal_Bool SmIsMathAlpha(const XubString &rText)
// ergibt genau dann TRUE, wenn das Zeichen (aus dem StarMath Font) wie ein
// Buchstabe behandelt werden soll.
{
if (rText.Len() == 0)
- return FALSE;
+ return sal_False;
DBG_ASSERT(rText.Len() == 1, "Sm : String enthaelt nicht genau ein Zeichen");
xub_Unicode cChar = rText.GetChar(0);
// ist es ein griechisches Zeichen ?
if (xub_Unicode(0xE0AC) <= cChar && cChar <= xub_Unicode(0xE0D4))
- return TRUE;
+ return sal_True;
else
{
// kommt es in 'aMathAlpha' vor ?
@@ -97,7 +97,7 @@ SmRect::SmRect()
DBG_ASSERT(aTopLeft == Point(0, 0), "Sm: ooops...");
DBG_ASSERT(aSize == Size(0, 0), "Sm: ooops...");
- bHasBaseline = bHasAlignInfo = FALSE;
+ bHasBaseline = bHasAlignInfo = sal_False;
nBaseline = nAlignT = nAlignM = nAlignB =
nGlyphTop = nGlyphBottom =
nItalicLeftSpace = nItalicRightSpace =
@@ -140,20 +140,20 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorder)
+ const XubString &rText, sal_uInt16 nBorder)
{
DBG_ASSERT(aTopLeft == Point(0, 0), "Sm: Ooops...");
aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight());
const FontMetric aFM (rDev.GetFontMetric());
- BOOL bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
- BOOL bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
+ sal_Bool bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
+ sal_Bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
const long nFontHeight = rDev.GetFont().GetSize().Height();
nBorderWidth = nBorder;
- bHasAlignInfo = TRUE;
- bHasBaseline = TRUE;
+ bHasAlignInfo = sal_True;
+ bHasBaseline = sal_True;
nBaseline = aFM.GetAscent();
nAlignT = nBaseline - nFontHeight * 750L / 1000L;
nAlignM = nBaseline - nFontHeight * 121L / 422L;
@@ -187,7 +187,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
// get GlyphBoundRect
Rectangle aGlyphRect;
#if OSL_DEBUG_LEVEL > 1
- BOOL bSuccess =
+ sal_Bool bSuccess =
#endif
SmGetGlyphBoundRect(rDev, rText, aGlyphRect);
#if OSL_DEBUG_LEVEL > 1
@@ -235,7 +235,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nEBorderWidth)
+ const XubString &rText, sal_uInt16 nEBorderWidth)
// get rectangle fitting for drawing 'rText' on OutputDevice 'rDev'
{
BuildRect(rDev, pFormat, rText, nEBorderWidth);
@@ -248,7 +248,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
DBG_ASSERT( nEBorderWidth >= 0, "BorderWidth negativ" );
if (nEBorderWidth < 0)
nEBorderWidth = 0;
- Init(rDev, pFormat, rText, (USHORT) nEBorderWidth);
+ Init(rDev, pFormat, rText, (sal_uInt16) nEBorderWidth);
}
@@ -261,8 +261,8 @@ SmRect::SmRect(long nWidth, long nHeight)
{
DBG_ASSERT(aTopLeft == Point(0, 0), "Sm: ooops...");
- bHasBaseline = FALSE;
- bHasAlignInfo = TRUE;
+ bHasBaseline = sal_False;
+ bHasAlignInfo = sal_True;
nBaseline = 0;
nAlignT = GetTop();
nAlignB = GetBottom();
@@ -349,7 +349,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
+ GetItalicLeftSpace();
break;
default :
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
}
// check if horizontal position is already set
@@ -386,7 +386,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.Y() += rRect.GetLoAttrFence() - GetTop();
break;
default :
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
}
// check if vertical position is already set
@@ -403,7 +403,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.X() += rRect.GetItalicRight() - GetItalicRight();
break;
default :
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
}
return aPos;
@@ -494,7 +494,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
CopyMBL(rRect);
break;
default :
- DBG_ASSERT(FALSE, "Sm: unbekannter Fall");
+ DBG_ASSERT(sal_False, "Sm: unbekannter Fall");
}
}
@@ -519,7 +519,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
- BOOL bKeepVerAlignParams)
+ sal_Bool bKeepVerAlignParams)
// as 'ExtendBy' but keeps original values for AlignT, -M and -B and
// baseline.
// (this is used in 'SmSupSubNode' where the sub-/supscripts shouldn't
@@ -529,7 +529,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
nOldAlignM = GetAlignM(),
nOldAlignB = GetAlignB(),
nOldBaseline = nBaseline; //! depends not on 'HasBaseline'
- BOOL bOldHasAlignInfo = HasAlignInfo();
+ sal_Bool bOldHasAlignInfo = HasAlignInfo();
ExtendBy(rRect, eCopyMode);
@@ -551,7 +551,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
// rectangle.
// For simplicity the maximum-norm is used.
{
- BOOL bIsInside = IsInsideItalicRect(rPoint);
+ sal_Bool bIsInside = IsInsideItalicRect(rPoint);
// build reference point to define the distance
Point aRef;
@@ -589,7 +589,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
}
-BOOL SmRect::IsInsideRect(const Point &rPoint) const
+sal_Bool SmRect::IsInsideRect(const Point &rPoint) const
{
return rPoint.Y() >= GetTop()
&& rPoint.Y() <= GetBottom()
@@ -598,7 +598,7 @@ BOOL SmRect::IsInsideRect(const Point &rPoint) const
}
-BOOL SmRect::IsInsideItalicRect(const Point &rPoint) const
+sal_Bool SmRect::IsInsideItalicRect(const Point &rPoint) const
{
return rPoint.Y() >= GetTop()
&& rPoint.Y() <= GetBottom()
@@ -695,7 +695,7 @@ void SmDrawFrame(OutputDevice &rDev, const Rectangle &rRec,
#endif //SM_RECT_DEBUG
-BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
+sal_Bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const XubString &rText, Rectangle &rRect)
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
// but with a string as argument.
@@ -704,7 +704,7 @@ BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
xub_StrLen nLen = rText.Len();
if (nLen == 0)
{ rRect.SetEmpty();
- return TRUE;
+ return sal_True;
}
// get a device where 'OutputDevice::GetTextBoundRect' will be successful
@@ -742,7 +742,7 @@ BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())),
aTmp;
- BOOL bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText, 0, 0);
+ sal_Bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText, 0, 0);
DBG_ASSERT( bSuccess, "GetTextBoundRect failed" );
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index ac830953e3..b3b86642c1 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -181,7 +181,7 @@ SmFilterDetect::~SmFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -202,10 +202,10 @@ SmFilterDetect::~SmFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -254,7 +254,7 @@ SmFilterDetect::~SmFilterDetect()
String aTmpFilterName;
if ( pFilter )
aTmpFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : FALSE, &aTmpFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : sal_False, &aTmpFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -318,7 +318,7 @@ SmFilterDetect::~SmFilterDetect()
aTypeName.Erase();
if (pStrm && !pStrm->GetError())
{
- SotStorageRef aStorage = new SotStorage ( pStrm, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStrm, sal_False );
if ( !aStorage->GetError() )
{
if ( aStorage->IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Equation Native" ) ) ) )
@@ -330,11 +330,11 @@ SmFilterDetect::~SmFilterDetect()
}
else
{
- const USHORT nSize = 5;
+ const sal_uInt16 nSize = 5;
sal_Char aBuffer[nSize+1];
aBuffer[nSize] = 0;
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
- ULONG nBytesRead = pStrm->Read( aBuffer, nSize );
+ sal_uLong nBytesRead = pStrm->Read( aBuffer, nSize );
if (nBytesRead == nSize)
{
if (0 == strncmp( "<?xml",aBuffer,nSize))
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index 20c0713745..ce812f9d1f 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -57,7 +57,7 @@
-BOOL SmDLL::bInitialized = FALSE;
+sal_Bool SmDLL::bInitialized = sal_False;
/*************************************************************************
|*
@@ -69,7 +69,7 @@ void SmDLL::Init()
if ( bInitialized )
return;
- bInitialized = TRUE;
+ bInitialized = sal_True;
SfxObjectFactory& rFactory = SmDocShell::Factory();
@@ -93,10 +93,10 @@ void SmDLL::Init()
SvxUndoRedoControl::RegisterControl( SID_REDO, pp );
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pp );
- SmToolBoxWrapper::RegisterChildWindow(TRUE);
- SmCmdBoxWrapper::RegisterChildWindow(TRUE);
+ SmToolBoxWrapper::RegisterChildWindow(sal_True);
+ SmCmdBoxWrapper::RegisterChildWindow(sal_True);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pp );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pp );
}
/*************************************************************************
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index d4754a4d21..20eab6d876 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -65,7 +65,7 @@ TYPEINIT1( SmModule, SfxModule );
-SmResId::SmResId( USHORT nId )
+SmResId::SmResId( sal_uInt16 nId )
: ResId(nId, *SM_MOD()->GetResMgr())
{
}
@@ -101,8 +101,8 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -122,8 +122,8 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -143,8 +143,8 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -164,8 +164,8 @@ const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -234,7 +234,7 @@ SFX_IMPL_INTERFACE(SmModule, SfxModule, SmResId(RID_APPLICATION))
SmModule::SmModule(SfxObjectFactory* pObjFact) :
- SfxModule(SfxApplication::CreateResManager("sm"), FALSE, pObjFact, NULL),
+ SfxModule(SfxApplication::CreateResManager("sm"), sal_False, pObjFact, NULL),
pColorConfig( 0 ),
pConfig( 0 ),
pLocSymbolData( 0 ),
@@ -327,7 +327,7 @@ void SmModule::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
switch (nWh)
{
case SID_CONFIGEVENT :
@@ -339,7 +339,7 @@ void SmModule::GetState(SfxItemSet &rSet)
/* -----------------15.02.99 12:45-------------------
*
* --------------------------------------------------*/
-SfxItemSet* SmModule::CreateItemSet( USHORT nId )
+SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
if(nId == SID_SM_EDITOPTIONS)
@@ -361,7 +361,7 @@ SfxItemSet* SmModule::CreateItemSet( USHORT nId )
/* -----------------15.02.99 12:45-------------------
*
* --------------------------------------------------*/
-void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(nId == SID_SM_EDITOPTIONS)
{
@@ -371,7 +371,7 @@ void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/* -----------------15.02.99 12:45-------------------
*
* --------------------------------------------------*/
-SfxTabPage* SmModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SmModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = 0;
if(nId == SID_SM_TP_PRINTOPTIONS)
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index ceeb494fa8..21834b57db 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -63,11 +63,11 @@ SmSym::SmSym() :
m_aName(C2S("unknown")),
m_aSetName(C2S("unknown")),
m_cChar('\0'),
- m_bPredefined(FALSE),
- m_bDocSymbol(FALSE)
+ m_bPredefined(sal_False),
+ m_bDocSymbol(sal_False)
{
m_aExportName = m_aName;
- m_aFace.SetTransparent(TRUE);
+ m_aFace.SetTransparent(sal_True);
m_aFace.SetAlign(ALIGN_BASELINE);
}
@@ -79,12 +79,12 @@ SmSym::SmSym(const SmSym& rSymbol)
SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
- const String& rSet, BOOL bIsPredefined)
+ const String& rSet, sal_Bool bIsPredefined)
{
m_aName = m_aExportName = rName;
m_aFace = rFont;
- m_aFace.SetTransparent(TRUE);
+ m_aFace.SetTransparent(sal_True);
m_aFace.SetAlign(ALIGN_BASELINE);
m_cChar = cChar;
@@ -101,7 +101,7 @@ SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
// Character |= 0xF000;
m_aSetName = rSet;
m_bPredefined = bIsPredefined;
- m_bDocSymbol = FALSE;
+ m_bDocSymbol = sal_False;
}
@@ -308,7 +308,7 @@ void SmSymbolManager::Load()
String aSymbolName( (sal_Unicode)'i' );
aSymbolName += rSym.GetName();
SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
- aSymbolSetName, TRUE /*bIsPredefined*/ );
+ aSymbolSetName, sal_True /*bIsPredefined*/ );
AddOrReplaceSymbol( aSymbol );
}
@@ -321,11 +321,11 @@ void SmSymbolManager::Save()
SmMathConfig &rCfg = *SM_MOD()->GetConfig();
#if 0
- USHORT nSymbolCount = GetSymbolCount();
- USHORT nSaveSymbolCnt = 0;
+ sal_uInt16 nSymbolCount = GetSymbolCount();
+ sal_uInt16 nSaveSymbolCnt = 0;
const SmSym **pSymbols = new const SmSym* [ nSymbolCount ];
const SmSym **pSym = pSymbols;
- for (USHORT j = 0; j < nSymbolCount; ++j)
+ for (sal_uInt16 j = 0; j < nSymbolCount; ++j)
{
const SmSym &rSym = *pSymSet->GetSymbol( j );
if (!rSym.IsDocSymbol())
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index d7ad42949a..482cbf3c06 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -49,9 +49,9 @@
////////////////////////////////////////////////////////////
-static USHORT GetImageListRID( USHORT nCategoryRID, BOOL bHighContrast )
+static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID, sal_Bool bHighContrast )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nCategoryRID)
{
case RID_UNBINOPS_CAT : nRes = RID_IL_UNBINOPS; break;
@@ -72,7 +72,7 @@ static USHORT GetImageListRID( USHORT nCategoryRID, BOOL bHighContrast )
}
-static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
+static sal_Int16 GetToolBoxCategoriesIndex( sal_uInt16 nCategoryRID )
{
sal_Int16 nIdx = -1;
switch (nCategoryRID)
@@ -93,9 +93,9 @@ static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
}
-static USHORT GetCategoryRID( USHORT nResId )
+static sal_uInt16 GetCategoryRID( sal_uInt16 nResId )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nResId)
{
case RID_IL_UNBINOPS :
@@ -147,7 +147,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
aToolBoxCat.SetClickHdl(LINK(this, SmToolBoxWindow, CategoryClickHdl));
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
ToolBox *pBox = new ToolBox(this, SmResId( TOOLBOX_CAT_A + i ));
@@ -188,7 +188,7 @@ SmViewShell * SmToolBoxWindow::GetView()
}
-const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContrast )
+const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId, sal_Bool bHighContrast )
{
// creates the image list via its resource id and stores that
// list for later use in the respective array.
@@ -196,7 +196,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContra
const ImageList *pIL = 0;
// get index to use
- USHORT nCategoryRID = GetCategoryRID( nResId );
+ sal_uInt16 nCategoryRID = GetCategoryRID( nResId );
sal_Int16 nIndex = GetToolBoxCategoriesIndex( nCategoryRID );
if (nIndex == -1 && (nResId == RID_IL_CATALOG || nResId == RID_ILH_CATALOG))
nIndex = NUM_TBX_CATEGORIES;
@@ -214,9 +214,9 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContra
}
-void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
+void SmToolBoxWindow::ApplyImageLists( sal_uInt16 nCategoryRID )
{
- BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( bHighContrast ? RID_ILH_CATALOG : RID_IL_CATALOG, bHighContrast );
@@ -226,7 +226,7 @@ void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
// set image list for active (visible) category of 'catalog'
sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
- USHORT nResId = GetImageListRID( nCategoryRID, bHighContrast );
+ sal_uInt16 nResId = GetImageListRID( nCategoryRID, bHighContrast );
pImageList = GetImageList( nResId, bHighContrast );
DBG_ASSERT( pImageList && nIdx >= 0, "image list or index missing" );
if (pImageList && nIdx >= 0)
@@ -243,21 +243,21 @@ void SmToolBoxWindow::DataChanged( const DataChangedEvent &rEvt )
void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
{
- static BOOL bSetPosition = TRUE;
+ static sal_Bool bSetPosition = sal_True;
if (STATE_CHANGE_INITSHOW == nStateChange)
{
SetCategory( nActiveCategoryRID == USHRT_MAX ? RID_UNBINOPS_CAT : nActiveCategoryRID );
// calculate initial position to be used after creation of the window...
AdjustPosSize( bSetPosition );
- bSetPosition = FALSE;
+ bSetPosition = sal_False;
}
//... otherwise the base class will remember the last position of the window
SfxFloatingWindow::StateChanged( nStateChange );
}
-void SmToolBoxWindow::AdjustPosSize( BOOL bSetPos )
+void SmToolBoxWindow::AdjustPosSize( sal_Bool bSetPos )
{
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 4 /* see nLines in SetCategory*/ ) );
@@ -302,14 +302,14 @@ void SmToolBoxWindow::AdjustPosSize( BOOL bSetPos )
}
-BOOL SmToolBoxWindow::Close()
+sal_Bool SmToolBoxWindow::Close()
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
SID_TOOLBOX, SFX_CALLMODE_STANDARD,
- new SfxBoolItem(SID_TOOLBOX, FALSE), 0L);
- return TRUE;
+ new SfxBoolItem(SID_TOOLBOX, sal_False), 0L);
+ return sal_True;
}
void SmToolBoxWindow::GetFocus()
@@ -319,12 +319,12 @@ void SmToolBoxWindow::GetFocus()
aToolBoxCat.GrabFocus();
}
-void SmToolBoxWindow::SetCategory(USHORT nCategoryRID)
+void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID)
{
if (nCategoryRID != nActiveCategoryRID)
ApplyImageLists( nCategoryRID );
- USHORT nLines;
+ sal_uInt16 nLines;
// check for valid resource id
switch (nCategoryRID)
{
@@ -358,9 +358,9 @@ void SmToolBoxWindow::SetCategory(USHORT nCategoryRID)
SetOutputSizePixel( aWndSize );
if (nActiveCategoryRID)
- aToolBoxCat.CheckItem(nActiveCategoryRID, FALSE);
+ aToolBoxCat.CheckItem(nActiveCategoryRID, sal_False);
nActiveCategoryRID = nCategoryRID;
- aToolBoxCat.CheckItem(nActiveCategoryRID, TRUE);
+ aToolBoxCat.CheckItem(nActiveCategoryRID, sal_True);
pToolBoxCmd->Show();
}
@@ -370,7 +370,7 @@ IMPL_LINK( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
{
int nItemId = pToolBox->GetCurItemId();
if (nItemId != 0)
- SetCategory( sal::static_int_cast< USHORT >(nItemId) );
+ SetCategory( sal::static_int_cast< sal_uInt16 >(nItemId) );
return 0;
}
@@ -391,7 +391,7 @@ IMPL_LINK( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
SFX_IMPL_FLOATINGWINDOW(SmToolBoxWrapper, SID_TOOLBOXWINDOW);
SmToolBoxWrapper::SmToolBoxWrapper(Window *pParentWindow,
- USHORT nId, SfxBindings* pBindings,
+ sal_uInt16 nId, SfxBindings* pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
{
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index e817416ccc..10916de3bc 100755
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -539,7 +539,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException();
- BOOL bVal = *(sal_Bool*)(*pValues).getValue();
+ sal_Bool bVal = *(sal_Bool*)(*pValues).getValue();
Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
@@ -555,7 +555,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException();
- BOOL bVal = *(sal_Bool*)(*pValues).getValue();
+ sal_Bool bVal = *(sal_Bool*)(*pValues).getValue();
Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
@@ -575,7 +575,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
// apply base size to fonts
const Size aTmp( aFormat.GetBaseSize() );
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
aFormat.SetFontSize(i, aTmp);
}
break;
@@ -732,7 +732,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
SmSym aSymbol ( pDescriptor->sName, aFont, static_cast < sal_Unicode > (pDescriptor->nCharacter),
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
- aSymbol.SetDocSymbol( TRUE );
+ aSymbol.SetDocSymbol( sal_True );
rManager.AddOrReplaceSymbol ( aSymbol );
}
}
@@ -745,7 +745,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if ( (*pValues).getValueType() != ::getBooleanCppuType() )
throw IllegalArgumentException();
- sal_Bool bReadonly = FALSE;
+ sal_Bool bReadonly = sal_False;
if ( *pValues >>= bReadonly )
pDocSh->SetLoadReadonly( bReadonly );
break;
@@ -799,7 +799,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_FONT_TEXT_POSTURE :
{
const SmFace & rFace = aFormat.GetFont((*ppEntries)->mnMemberId);
- BOOL bVal = IsItalic( rFace );
+ sal_Bool bVal = IsItalic( rFace );
(*pValue).setValue(&bVal, *(*ppEntries)->mpType);
}
break;
@@ -812,7 +812,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
case HANDLE_FONT_TEXT_WEIGHT :
{
const SmFace & rFace = aFormat.GetFont((*ppEntries)->mnMemberId);
- BOOL bVal = IsBold( rFace ); // bold?
+ sal_Bool bVal = IsBold( rFace ); // bold?
(*pValue).setValue(&bVal, *(*ppEntries)->mpType);
}
break;
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 07fa3bb814..be22e714ee 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -63,8 +63,8 @@ SmViewShell * SmGetActiveView()
/**************************************************************************/
-SmPickList::SmPickList(USHORT nInitSize, USHORT nMaxSize) :
- SfxPtrArr((BYTE) nInitSize, 1)
+SmPickList::SmPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize) :
+ SfxPtrArr((sal_uInt8) nInitSize, 1)
{
nSize = nMaxSize;
}
@@ -78,7 +78,7 @@ SmPickList::~SmPickList()
SmPickList& SmPickList::operator=(const SmPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
Clear();
nSize = rList.nSize;
@@ -104,7 +104,7 @@ void SmPickList::Insert(const void *pItem)
void SmPickList::Update(const void *pItem, const void *pNewItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -117,7 +117,7 @@ void SmPickList::Update(const void *pItem, const void *pNewItem)
void SmPickList::Remove(const void *pItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -130,7 +130,7 @@ void SmPickList::Remove(const void *pItem)
void SmPickList::Clear()
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
DestroyItem(GetPtr(nPos));
@@ -157,7 +157,7 @@ void SmFontPickList::DestroyItem(void *pItem)
delete (Font *)pItem;
}
-BOOL SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem) const
+sal_Bool SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem) const
{
Font *pFirstFont, *pSecondFont;
@@ -169,9 +169,9 @@ BOOL SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem
(pFirstFont->GetCharSet() == pSecondFont->GetCharSet()) &&
(pFirstFont->GetWeight() == pSecondFont->GetWeight()) &&
(pFirstFont->GetItalic() == pSecondFont->GetItalic()))
- return (TRUE);
+ return (sal_True);
- return FALSE;
+ return sal_False;
}
String SmFontPickList::GetStringItem(void *pItem)
@@ -232,7 +232,7 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const
IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
{
- USHORT nPos;
+ sal_uInt16 nPos;
String aString;
nPos = GetSelectEntryPos();
@@ -251,7 +251,7 @@ IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
}
-SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax) :
+SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax) :
SmFontPickList(nMax, nMax),
ListBox(pParent, rResId)
{
@@ -261,7 +261,7 @@ SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHOR
SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
*(SmFontPickList *)this = rList;
@@ -310,7 +310,7 @@ void SmFontPickListBox::Remove(const Font &rFont)
////////////////////////////////////////
-BOOL IsItalic( const Font &rFont )
+sal_Bool IsItalic( const Font &rFont )
{
FontItalic eItalic = rFont.GetItalic();
// the code below leaves only _NONE and _DONTKNOW as not italic
@@ -318,7 +318,7 @@ BOOL IsItalic( const Font &rFont )
}
-BOOL IsBold( const Font &rFont )
+sal_Bool IsBold( const Font &rFont )
{
FontWeight eWeight = rFont.GetWeight();
return eWeight != WEIGHT_DONTKNOW && eWeight > WEIGHT_NORMAL;
@@ -328,7 +328,7 @@ BOOL IsBold( const Font &rFont )
void SmFace::Impl_Init()
{
SetSize( GetSize() );
- SetTransparent( TRUE );
+ SetTransparent( sal_True );
SetAlign( ALIGN_BASELINE );
SetColor( COL_AUTO );
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index bd58487f78..6c1670eaeb 100755
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -98,7 +98,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell):
pAccessible(0),
pViewShell(pShell),
nZoom(100),
- bIsCursorVisible(FALSE)
+ bIsCursorVisible(sal_False)
{
// docking windows are usually hidden (often already done in the
// resource) and will be shown by the sfx framework.
@@ -184,7 +184,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
#ifdef notnow
// include introducing symbols of special char and text
// (ie '%' and '"')
- USHORT nExtra = (aToken.eType == TSPECIAL || aToken.eType == TTEXT) ? 1 : 0;
+ sal_uInt16 nExtra = (aToken.eType == TSPECIAL || aToken.eType == TTEXT) ? 1 : 0;
// set selection to the beginning of the token
ESelection aSel (aToken.nRow - 1, aToken.nCol - 1 - nExtra);
@@ -200,7 +200,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
ESelection aSel (aToken.nRow - 1, aToken.nCol - 1);
if (rMEvt.GetClicks() != 1 || aToken.eType == TPLACE)
- aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< USHORT >(aToken.aText.Len());
+ aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< sal_uInt16 >(aToken.aText.Len());
pEdit->SetSelection(aSel);
SetCursor(pNode);
@@ -239,10 +239,10 @@ void SmGraphicWindow::LoseFocus()
}
}
-void SmGraphicWindow::ShowCursor(BOOL bShow)
+void SmGraphicWindow::ShowCursor(sal_Bool bShow)
// shows or hides the formula-cursor depending on 'bShow' is TRUE or not
{
- BOOL bInvert = bShow != IsCursorVisible();
+ sal_Bool bInvert = bShow != IsCursorVisible();
if (bInvert)
InvertTracking(aCursorRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW);
@@ -273,13 +273,13 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
SmModule *pp = SM_MOD();
if (IsCursorVisible())
- ShowCursor(FALSE); // clean up remainings of old cursor
+ ShowCursor(sal_False); // clean up remainings of old cursor
aCursorRect = rRect;
if (pp->GetConfig()->IsShowFormulaCursor())
- ShowCursor(TRUE); // draw new cursor
+ ShowCursor(sal_True); // draw new cursor
}
-const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
+const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
// looks for a VISIBLE node in the formula tree with it's token at
// (or around) the position 'nRow', 'nCol' in the edit window
// (row and column numbering starts with 1 there!).
@@ -296,7 +296,7 @@ const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
if (pNode)
SetCursor(pNode);
else
- ShowCursor(FALSE);
+ ShowCursor(sal_False);
return pNode;
}
@@ -313,12 +313,12 @@ void SmGraphicWindow::Paint(const Rectangle&)
//! corner of the formula
SetFormulaDrawPos(aPoint);
- SetIsCursorVisible(FALSE); // (old) cursor must be drawn again
+ SetIsCursorVisible(sal_False); // (old) cursor must be drawn again
const SmEditWindow *pEdit = pViewShell->GetEditWindow();
if (pEdit)
{ // get new position for formula-cursor (for possible altered formula)
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(pEdit->GetSelection(), nRow, nCol);
nRow++;
nCol++;
@@ -326,7 +326,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
SmModule *pp = SM_MOD();
if (pFound && pp->GetConfig()->IsShowFormulaCursor())
- ShowCursor(TRUE);
+ ShowCursor(sal_True);
}
}
@@ -349,7 +349,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
void SmGraphicWindow::Command(const CommandEvent& rCEvt)
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
if ( !pViewShell->GetViewFrame()->GetFrame().IsInPlace() )
{
switch ( rCEvt.GetCommand() )
@@ -371,7 +371,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
//pPopupMenu->Execute( this, aPos );
delete pPopupMenu;
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
break;
@@ -380,13 +380,13 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
const CommandWheelData* pWData = rCEvt.GetWheelData();
if ( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nTmpZoom = GetZoom();
+ sal_uInt16 nTmpZoom = GetZoom();
if( 0L > pWData->GetDelta() )
nTmpZoom -= 10;
else
nTmpZoom += 10;
SetZoom( nTmpZoom );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
break;
@@ -407,9 +407,9 @@ IMPL_LINK_INLINE_START( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
IMPL_LINK_INLINE_END( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
-void SmGraphicWindow::SetZoom(USHORT Factor)
+void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
{
- nZoom = Min(Max((USHORT) Factor, (USHORT) MINZOOM), (USHORT) MAXZOOM);
+ nZoom = Min(Max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM);
Fraction aFraction (nZoom, 100);
SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) );
SetTotalSize();
@@ -434,7 +434,7 @@ void SmGraphicWindow::ZoomToFitInWindow()
{
long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(),
(85 * aWindowSize.Height()) / aSize.Height());
- SetZoom ( sal::static_int_cast< USHORT >(nVal) );
+ SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
}
}
@@ -452,7 +452,7 @@ uno::Reference< XAccessible > SmGraphicWindow::CreateAccessible()
SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rGraphic(rSmGraphic)
@@ -460,7 +460,7 @@ SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
}
-void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmGraphicController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
rGraphic.SetTotalSize();
rGraphic.Invalidate();
@@ -472,7 +472,7 @@ void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const S
SmEditController::SmEditController(SmEditWindow &rSmEdit,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rEdit(rSmEdit)
@@ -487,7 +487,7 @@ SmEditController::~SmEditController()
#endif
-void SmEditController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmEditController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
const SfxStringItem *pItem = PTR_CAST(SfxStringItem, pState);
@@ -504,7 +504,7 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi
SfxDockingWindow(pBindings_, pChildWindow, pParent, SmResId(RID_CMDBOXWINDOW)),
aEdit (*this),
aController (aEdit, SID_TEXT, *pBindings_),
- bExiting (FALSE)
+ bExiting (sal_False)
{
Hide ();
@@ -516,7 +516,7 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi
SmCmdBoxWindow::~SmCmdBoxWindow ()
{
aInitialFocusTimer.Stop();
- bExiting = TRUE;
+ bExiting = sal_True;
}
@@ -634,7 +634,7 @@ void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
Resize(); // #98848# avoid SmEditWindow not being painted correctly
// set initial position of window in floating mode
- if (TRUE == IsFloatingMode())
+ if (sal_True == IsFloatingMode())
AdjustPosition(); //! don't change pos in docking-mode !
// // make sure the formula can be edited right away
@@ -692,7 +692,7 @@ void SmCmdBoxWindow::GetFocus()
SFX_IMPL_DOCKINGWINDOW(SmCmdBoxWrapper, SID_CMDBOXWINDOW);
-SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, USHORT nId,
+SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
@@ -810,7 +810,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetZoomFactor" );
const Fraction &rFrac = rX < rY ? rX : rY;
- GetGraphicWindow().SetZoom( (USHORT) long(rFrac * Fraction( 100, 1 )) );
+ GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
//Um Rundungsfehler zu minimieren lassen wir von der Basisklasse ggf.
//auch die krummen Werte einstellen
@@ -824,7 +824,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
String aText;
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
@@ -832,7 +832,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
aSize.Width() = 0;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aSize.Width() = ((aSize.Width() / TabPos) + 1) * TabPos;
@@ -856,9 +856,9 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M
String aLine;
Size TextSize;
String aText;
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -916,13 +916,13 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
String aText;
Point aPoint (rPosition);
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
long TabPos = rDevice.GetTextWidth('n') * 8;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aPoint.X() = ((aPoint.X() / TabPos) + 1) * TabPos;
@@ -939,17 +939,17 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
}
-void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, USHORT MaxWidth)
+void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, sal_uInt16 MaxWidth)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawText" );
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
Point aPoint (rPosition);
Size aSize;
String aLine;
String aText;
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1013,7 +1013,7 @@ void SmViewShell::Impl_Print(
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
- const USHORT nZoomFactor = static_cast< USHORT >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
+ const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
// IsIgnoreSpacesRight is a parser option! Thus it does not get evaluated here anymore (too late).
// const bool bNoRightSpaces = rPrintUIOptions.getBoolValue( PRTUIOPT_NO_RIGHT_SPACE, sal_True );
@@ -1053,7 +1053,7 @@ void SmViewShell::Impl_Print(
Point aPoint(aOutRect.Left() + (aOutRect.GetWidth() - aTitleSize.Width()) / 2,
aOutRect.Top());
DrawText(rOutDev, aPoint, GetDoc()->GetTitle(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aTitleSize.Height() + 200;
// output description
@@ -1063,7 +1063,7 @@ void SmViewShell::Impl_Print(
aPoint.X() = aOutRect.Left() + (aOutRect.GetWidth() - aDescSize.Width()) / 2;
aPoint.Y() = aOutRect.Top();
DrawText(rOutDev, aPoint, GetDoc()->GetComment(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aDescSize.Height() + 300;
}
@@ -1088,7 +1088,7 @@ void SmViewShell::Impl_Print(
Point aPoint (aOutRect.Left() + (aOutRect.GetWidth() - aSize.Width()) / 2,
aOutRect.Bottom() + 300);
DrawText(rOutDev, aPoint, GetDoc()->GetText(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Bottom() -= 200;
}
@@ -1118,9 +1118,9 @@ void SmViewShell::Impl_Print(
Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
aOutRect.GetHeight()), MapMode(MAP_100TH_MM)));
Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MAP_100TH_MM)));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
- Fraction aFraction ((USHORT) Max ((USHORT) MINZOOM, Min((USHORT) MAXZOOM, (USHORT) (nZ - 10))), (USHORT) 100);
+ Fraction aFraction ((sal_uInt16) Max ((sal_uInt16) MINZOOM, Min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100);
OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction);
}
@@ -1156,7 +1156,7 @@ void SmViewShell::Impl_Print(
rOutDev.Pop();
}
-USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
+sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
DBG_ASSERT( 0, "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
@@ -1164,7 +1164,7 @@ USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDia
}
-SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
+SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetPrinter" );
@@ -1175,7 +1175,7 @@ SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
}
-USHORT SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetPrinter" );
SfxPrinter *pOld = GetDoc()->GetPrinter();
@@ -1268,14 +1268,14 @@ void SmViewShell::PrevError()
}
-BOOL SmViewShell::Insert( SfxMedium& rMedium )
+sal_Bool SmViewShell::Insert( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Insert" );
SmDocShell *pDoc = GetDoc();
String aText( pDoc->GetText() );
String aTemp = aText;
- BOOL bRet = FALSE, bChkOldVersion = TRUE;
+ sal_Bool bRet = sal_False, bChkOldVersion = sal_True;
uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage();
uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY );
@@ -1283,7 +1283,7 @@ BOOL SmViewShell::Insert( SfxMedium& rMedium )
{
if ( xNameAccess->hasByName( C2S( "content.xml" ) ) || xNameAccess->hasByName( C2S( "Content.xml" ) ))
{
- bChkOldVersion = FALSE;
+ bChkOldVersion = sal_False;
// is this a fabulous math package ?
Reference<com::sun::star::frame::XModel> xModel(pDoc->GetModel());
SmXMLImportWrapper aEquation(xModel); //!! modifies the result of pDoc->GetText() !!
@@ -1305,7 +1305,7 @@ BOOL SmViewShell::Insert( SfxMedium& rMedium )
}
pDoc->Parse();
- pDoc->SetModified(TRUE);
+ pDoc->SetModified(sal_True);
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate(SID_GAPHIC_SM);
@@ -1315,11 +1315,11 @@ BOOL SmViewShell::Insert( SfxMedium& rMedium )
}
-BOOL SmViewShell::InsertFrom(SfxMedium &rMedium)
+sal_Bool SmViewShell::InsertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::InsertFrom" );
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
SmDocShell *pDoc = GetDoc();
SvStream *pStream = rMedium.GetInStream();
String aText( pDoc->GetText() );
@@ -1354,7 +1354,7 @@ BOOL SmViewShell::InsertFrom(SfxMedium &rMedium)
}
pDoc->Parse();
- pDoc->SetModified(TRUE);
+ pDoc->SetModified(sal_True);
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate(SID_GAPHIC_SM);
@@ -1380,9 +1380,9 @@ void SmViewShell::Execute(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem;
- BOOL bVal;
+ sal_Bool bVal;
if ( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, FALSE, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, sal_False, &pItem))
bVal = ((SfxBoolItem *) pItem)->GetValue();
else
bVal = !pp->GetConfig()->IsShowFormulaCursor();
@@ -1423,7 +1423,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
case SID_ZOOMOUT:
- DBG_ASSERT(aGraphic.GetZoom() >= 25, "Sm: falsches USHORT Argument");
+ DBG_ASSERT(aGraphic.GetZoom() >= 25, "Sm: falsches sal_uInt16 Argument");
aGraphic.SetZoom(aGraphic.GetZoom() - 25);
break;
@@ -1496,7 +1496,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_PASTE:
{
- BOOL bCallExec = 0 == pWin;
+ sal_Bool bCallExec = 0 == pWin;
if( !bCallExec )
{
TransferableDataHelper aDataHelper(
@@ -1507,7 +1507,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
aDataHelper.HasFormat( FORMAT_STRING ))
pWin->Paste();
else
- bCallExec = TRUE;
+ bCallExec = sal_True;
}
if( bCallExec )
{
@@ -1632,7 +1632,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
switch( rZoom.GetType() )
{
case SVX_ZOOM_PERCENT:
- aGraphic.SetZoom((USHORT)rZoom.GetValue ());
+ aGraphic.SetZoom((sal_uInt16)rZoom.GetValue ());
break;
case SVX_ZOOM_OPTIMAL:
@@ -1643,13 +1643,13 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SVX_ZOOM_WHOLEPAGE:
{
const MapMode aMap( MAP_100TH_MM );
- SfxPrinter *pPrinter = GetPrinter( TRUE );
+ SfxPrinter *pPrinter = GetPrinter( sal_True );
Point aPoint;
Rectangle OutputRect(aPoint, pPrinter->GetOutputSize());
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
aGraphic.SetZoom (nZ);
break;
@@ -1695,7 +1695,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
SmEditWindow *pEditWin = GetEditWindow();
- for (USHORT nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1762,11 +1762,11 @@ void SmViewShell::GetState(SfxItemSet &rSet)
case SID_TOOLBOX:
{
- BOOL bState = FALSE;
+ sal_Bool bState = sal_False;
SfxChildWindow *pChildWnd = GetViewFrame()->
GetChildWindow( SmToolBoxWrapper::GetChildWindowId() );
if (pChildWnd && pChildWnd->GetWindow()->IsVisible())
- bState = TRUE;
+ bState = sal_True;
rSet.Put(SfxBoolItem(SID_TOOLBOX, bState));
}
break;
@@ -1807,7 +1807,7 @@ SmViewShell::~SmViewShell()
delete pImpl;
}
-void SmViewShell::Deactivate( BOOL bIsMDIActivate )
+void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Deactivate" );
@@ -1819,7 +1819,7 @@ void SmViewShell::Deactivate( BOOL bIsMDIActivate )
}
-void SmViewShell::Activate( BOOL bIsMDIActivate )
+void SmViewShell::Activate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Activate" );
@@ -1849,7 +1849,7 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
if ( ERRCODE_NONE == _pFileDlg->GetError() )
{
- //USHORT nSlot = pImpl->pRequest->GetSlot();
+ //sal_uInt16 nSlot = pImpl->pRequest->GetSlot();
SfxMedium* pMedium = pImpl->pDocInserter->CreateMedium();
if ( pMedium != NULL )
@@ -1869,7 +1869,7 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
}
}
- pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), TRUE ) );
+ pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), sal_True ) );
pImpl->pRequest->Done();
return 0;
}
@@ -1882,7 +1882,7 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
case SFX_HINT_MODECHANGED:
case SFX_HINT_DOCCHANGED:
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
default:
break;