[PATCH] this patch removes a fair amount of BOOL variables in starmath
Alexandre Fournier (none)
fou at leila.
Fri Nov 5 17:33:05 PDT 2010
I uses the native bool type instead.
Some signatures containing BOOL have been left untouched when belonging to an inheritance hierarchy beyond the scope of starmath
---
starmath/inc/cursor.hxx | 20 ++--
starmath/inc/dialog.hxx | 66 ++++++------
starmath/inc/document.hxx | 14 ++--
starmath/inc/edit.hxx | 10 +-
starmath/inc/format.hxx | 24 +++---
starmath/inc/node.hxx | 46 +++++-----
starmath/inc/parse.hxx | 20 ++--
starmath/inc/rect.hxx | 20 ++--
starmath/inc/smdll.hxx | 2 +-
starmath/inc/symbol.hxx | 12 +-
starmath/inc/toolbox.hxx | 4 +-
starmath/inc/utility.hxx | 18 ++--
starmath/inc/view.hxx | 18 ++--
starmath/inc/visitors.hxx | 4 +-
starmath/source/accessibility.cxx | 10 +-
starmath/source/cfgitem.cxx | 128 ++++++++++++------------
starmath/source/cfgitem.hxx | 56 +++++-----
starmath/source/config.cxx | 2 +-
starmath/source/cursor.cxx | 38 ++++----
starmath/source/dialog.cxx | 198 ++++++++++++++++++------------------
starmath/source/document.cxx | 88 ++++++++--------
starmath/source/edit.cxx | 43 ++++----
starmath/source/format.cxx | 20 ++--
starmath/source/mathmlexport.cxx | 4 +-
starmath/source/mathmlimport.cxx | 12 +-
starmath/source/mathtype.cxx | 86 ++++++++--------
starmath/source/node.cxx | 100 +++++++++---------
starmath/source/parse.cxx | 82 ++++++++--------
starmath/source/rect.cxx | 48 +++++-----
starmath/source/smdetect.cxx | 4 +-
starmath/source/smdll.cxx | 10 +-
starmath/source/symbol.cxx | 14 ++--
starmath/source/toolbox.cxx | 20 ++--
starmath/source/unomodel.cxx | 8 +-
starmath/source/utility.cxx | 12 +-
starmath/source/view.cxx | 68 +++++++-------
starmath/source/visitors.cxx | 22 ++--
37 files changed, 675 insertions(+), 676 deletions(-)
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index fab86a4..7c4fa85 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -180,7 +180,7 @@ public:
*
* @returns True, if the caret was in a context where this operation was possible.
*/
- BOOL InsertLimit(SmSubSup eSubSup, BOOL bMoveCaret = TRUE);
+ bool InsertLimit(SmSubSup eSubSup, bool bMoveCaret = true);
/** Insert a new row or newline
*
@@ -192,7 +192,7 @@ public:
* @remarks If the caret is placed in a subline of a command that doesn't support
* this operator the method returns FALSE, and doesn't do anything.
*/
- BOOL InsertRow();
+ bool InsertRow();
/** Insert a fraction, use selection as numerator */
void InsertFraction();
@@ -341,14 +341,14 @@ private:
SmNodeList *pSelectedNodes = NULL);
/** Create an instance of SmMathSymbolNode usable for brackets */
- static SmNode *CreateBracket(SmBracketType eBracketType, BOOL bIsLeft);
+ static SmNode *CreateBracket(SmBracketType eBracketType, bool bIsLeft);
/** The number of times BeginEdit have been called
* Used to allow nesting of BeginEdit() and EndEdit() sections
*/
int nEditSections;
/** Holds data for BeginEdit() and EndEdit() */
- BOOL bIsEnabledSetModifiedSmDocShell;
+ bool bIsEnabledSetModifiedSmDocShell;
/** Begin edit section where the tree will be modified */
void BeginEdit();
/** End edit section where the tree will be modified */
@@ -407,17 +407,17 @@ public:
*/
SmNode* Parse(SmNodeList* list, bool bDeleteErrorNodes = true);
/** True, if the token is an operator */
- static BOOL IsOperator(const SmToken &token);
+ static bool IsOperator(const SmToken &token);
/** True, if the token is a relation operator */
- static BOOL IsRelationOperator(const SmToken &token);
+ static bool IsRelationOperator(const SmToken &token);
/** True, if the token is a sum operator */
- static BOOL IsSumOperator(const SmToken &token);
+ static bool IsSumOperator(const SmToken &token);
/** True, if the token is a product operator */
- static BOOL IsProductOperator(const SmToken &token);
+ static bool IsProductOperator(const SmToken &token);
/** True, if the token is a unary operator */
- static BOOL IsUnaryOperator(const SmToken &token);
+ static bool IsUnaryOperator(const SmToken &token);
/** True, if the token is a postfix operator */
- static BOOL IsPostfixOperator(const SmToken &token);
+ static bool IsPostfixOperator(const SmToken &token);
private:
SmNodeList* pList;
/** Get the current terminal */
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index b758df5..be2719d 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -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, bool bHideCheckboxes, bool bFreeRes = 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, bool bFreeRes = 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, bool bFreeRes = true);
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -206,7 +206,7 @@ class SmCategoryDesc : public Resource
USHORT Minimum[4];
USHORT Maximum[4];
USHORT Value[4];
- BOOL bIsHighContrast;
+ bool bIsHighContrast;
public:
SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx);
@@ -219,7 +219,7 @@ public:
USHORT GetValue(USHORT Index) const { return Value[Index]; }
void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;}
- void SetHighContrast( BOOL bVal ) { bIsHighContrast = bVal; }
+ void SetHighContrast( bool bVal ) { bIsHighContrast = bVal; }
const Bitmap * GetGraphic(USHORT Index) const
{
return bIsHighContrast ? GraphicsH[Index] : Graphics[Index];
@@ -247,7 +247,7 @@ class SmDistanceDialog : public ModalDialog
SmCategoryDesc *Categories[NOCATEGORIES];
USHORT nActiveCategory;
- BOOL bScaleAllBrackets;
+ bool bScaleAllBrackets;
DECL_LINK(GetFocusHdl, Control *);
DECL_LINK(MenuSelectHdl, Menu *);
@@ -261,7 +261,7 @@ class SmDistanceDialog : public ModalDialog
void ApplyImages();
public:
- SmDistanceDialog(Window *pParent, BOOL bFreeRes = TRUE);
+ SmDistanceDialog(Window *pParent, bool bFreeRes = 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, bool bFreeRes = true);
void ReadFrom(const SmFormat &rFormat);
void WriteTo (SmFormat &rFormat) const;
@@ -359,7 +359,7 @@ class SmSymbolDialog : public ModalDialog
SmViewShell &rViewSh;
SmSymbolManager &rSymbolMgr;
-
+
String aSymbolSetName;
SymbolPtrVec_t aSymbolSet;
@@ -372,7 +372,7 @@ class SmSymbolDialog : public ModalDialog
DECL_LINK(EditClickHdl, Button *);
DECL_LINK(GetClickHdl, Button *);
- void FillSymbolSets(BOOL bDeleteText = TRUE);
+ void FillSymbolSets(bool bDeleteText = true);
void SetSymbolSetManager(SmSymbolManager &rMgr);
const SmSym *GetSymbol() const;
void InitColor_Impl();
@@ -381,10 +381,10 @@ class SmSymbolDialog : public ModalDialog
public:
SmSymbolDialog(Window * pParent, OutputDevice *pFntListDevice,
- SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, BOOL bFreeRes = TRUE);
+ SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell, bool bFreeRes = true);
virtual ~SmSymbolDialog();
- BOOL SelectSymbolSet(const XubString &rSymbolSetName);
+ bool SelectSymbolSet(const XubString &rSymbolSetName);
void SelectSymbol(USHORT nSymbolPos);
USHORT 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, bool bDeleteText = true);
+ void FillSymbolSets(ComboBox &rComboBox, bool bDeleteText = true);
+ void FillFonts(bool bDeleteText = true);
+ void FillStyles(bool bDeleteText = 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);
+ 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);
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, bool bFreeRes = true);
~SmSymDefineDialog();
using OutputDevice::SetFont;
@@ -493,28 +493,28 @@ public:
// Dialog
virtual short Execute();
- BOOL SelectOldSymbolSet(const XubString &rSymbolSetName)
+ bool SelectOldSymbolSet(const XubString &rSymbolSetName)
{
- return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, FALSE);
+ return SelectSymbolSet(aOldSymbolSets, rSymbolSetName, false);
}
- BOOL SelectOldSymbol(const XubString &rSymbolName)
+ bool SelectOldSymbol(const XubString &rSymbolName)
{
- return SelectSymbol(aOldSymbols, rSymbolName, FALSE);
+ return SelectSymbol(aOldSymbols, rSymbolName, false);
}
- BOOL SelectSymbolSet(const XubString &rSymbolSetName)
+ bool SelectSymbolSet(const XubString &rSymbolSetName)
{
- return SelectSymbolSet(aSymbolSets, rSymbolSetName, FALSE);
+ return SelectSymbolSet(aSymbolSets, rSymbolSetName, false);
}
- BOOL SelectSymbol(const XubString &rSymbolName)
+ bool SelectSymbol(const XubString &rSymbolName)
{
- return SelectSymbol(aSymbols, rSymbolName, FALSE);
+ return SelectSymbol(aSymbols, rSymbolName, false);
}
- BOOL SelectFont(const XubString &rFontName) { return SelectFont(rFontName, TRUE); }
- BOOL SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, TRUE); };
+ bool SelectFont(const XubString &rFontName) { return SelectFont(rFontName, true); }
+ bool SelectStyle(const XubString &rStyleName) { return SelectStyle(rStyleName, true); };
void SelectChar(xub_Unicode cChar);
};
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 6cf3896..6705cf5 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -126,7 +126,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
nTopBorder,
nBottomBorder;
USHORT nModifyCount;
- BOOL bIsFormulaArranged;
+ bool bIsFormulaArranged;
SmCursor *pCursor;
@@ -134,7 +134,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
virtual void SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
const SfxHint& rHint, const TypeId& rHintType);
- BOOL WriteAsMathType3( SfxMedium& );
+ bool WriteAsMathType3( SfxMedium& );
virtual void Draw(OutputDevice *pDevice,
const JobSetup & rSetup,
@@ -162,8 +162,8 @@ class SmDocShell : public SfxObjectShell, public SfxListener
Printer *GetPrt();
OutputDevice* GetRefDev();
- BOOL IsFormulaArranged() const { return bIsFormulaArranged; }
- void SetFormulaArranged(BOOL bVal) { bIsFormulaArranged = bVal; }
+ bool IsFormulaArranged() const { return bIsFormulaArranged; }
+ void SetFormulaArranged(bool bVal) { bIsFormulaArranged = bVal; }
virtual BOOL ConvertFrom(SfxMedium &rMedium);
@@ -190,7 +190,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; }
+ bool HasPrinter() { return 0 != pPrinter; }
SfxPrinter *GetPrinter() { GetPrt(); return pPrinter; }
void SetPrinter( SfxPrinter * );
@@ -215,7 +215,7 @@ public:
EditEngine & GetEditEngine();
SfxItemPool & GetEditEngineItemPool();
- void DrawFormula(OutputDevice &rDev, Point &rPosition, BOOL bDrawSelection = FALSE);
+ void DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSelection = false);
Size GetSize();
void Repaint();
@@ -237,7 +237,7 @@ public:
/** True, if cursor have previously been requested and thus
* has some sort of position.
*/
- BOOL HasCursor() { return pCursor != NULL; }
+ bool HasCursor() { return pCursor != NULL; }
};
#endif
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 7249cc3..9563d66 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -114,9 +114,9 @@ public:
ESelection GetSelection() const;
void SetSelection(const ESelection &rSel);
- BOOL IsEmpty() const;
- BOOL IsSelected() const;
- BOOL IsAllSelected() const;
+ bool IsEmpty() const;
+ bool IsSelected() const;
+ bool IsAllSelected() const;
void Cut();
void Copy();
void Paste();
@@ -127,14 +127,14 @@ public:
void MarkError(const Point &rPos);
void SelNextMark();
void SelPrevMark();
- BOOL HasMark(const String &rText) const;
+ bool HasMark(const String &rText) const;
void Flush();
void DeleteEditView( SmViewShell &rView );
void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
- BOOL HandleWheelCommands( const CommandEvent &rCEvt );
+ bool HandleWheelCommands( const CommandEvent &rCEvt );
bool IsInlineEditEnabled();
void StartCursorMove();
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index 6823ba8..3027c61 100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -104,14 +104,14 @@ String GetDefaultFontName( LanguageType nLang, USHORT nIdent );
class SmFormat : public SfxBroadcaster
{
SmFace vFont[FNT_END + 1];
- BOOL bDefaultFont[FNT_END + 1];
+ bool bDefaultFont[FNT_END + 1];
Size aBaseSize;
long nVersion;
USHORT vSize[SIZ_END + 1];
USHORT vDist[DIS_END + 1];
SmHorAlign eHorAlign;
INT16 nGreekCharStyle;
- BOOL bIsTextmode,
+ bool bIsTextmode,
bScaleNormalBrackets;
public:
@@ -122,11 +122,11 @@ public:
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 SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault = false);
void SetFontSize(USHORT 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(USHORT nIdent, bool bVal) { bDefaultFont[nIdent] = bVal; }
+ bool IsDefaultFont(USHORT nIdent) const { return bDefaultFont[nIdent]; }
USHORT GetRelSize(USHORT nIdent) const { return vSize[nIdent]; }
void SetRelSize(USHORT nIdent, USHORT nVal) { vSize[nIdent] = nVal;}
@@ -137,14 +137,14 @@ public:
SmHorAlign GetHorAlign() const { return eHorAlign; }
void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; }
- BOOL IsTextmode() const { return bIsTextmode; }
- void SetTextmode(BOOL bVal) { bIsTextmode = bVal; }
+ bool IsTextmode() const { return bIsTextmode; }
+ void SetTextmode(bool bVal) { bIsTextmode = bVal; }
INT16 GetGreekCharStyle() const { return nGreekCharStyle; }
void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; }
- BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
- void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; }
+ bool IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
+ void SetScaleNormalBrackets(bool bVal) { bScaleNormalBrackets = bVal; }
long GetVersion() const { return nVersion; }
@@ -153,8 +153,8 @@ public:
SmFormat & operator = (const SmFormat &rFormat);
- BOOL operator == (const SmFormat &rFormat) const;
- inline BOOL operator != (const SmFormat &rFormat) const;
+ bool operator == (const SmFormat &rFormat) const;
+ inline bool operator != (const SmFormat &rFormat) const;
void RequestApplyChanges() const
{
@@ -163,7 +163,7 @@ public:
};
-inline BOOL SmFormat::operator != (const SmFormat &rFormat) const
+inline bool SmFormat::operator != (const SmFormat &rFormat) const
{
return !(*this == rFormat);
}
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 7f7981d..6801670 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -119,10 +119,10 @@ class SmNode : public SmRect
RectHorAlign eRectHorAlign;
USHORT nFlags,
nAttributes;
- BOOL bIsPhantom,
+ bool bIsPhantom,
bIsDebug;
- BOOL bIsSelected;
+ bool bIsSelected;
protected:
SmNode(SmNodeType eNodeType, const SmToken &rNodeToken);
@@ -133,7 +133,7 @@ protected:
public:
virtual ~SmNode();
- virtual BOOL IsVisible() const;
+ virtual bool IsVisible() const;
virtual USHORT GetNumSubNodes() const;
virtual SmNode * GetSubNode(USHORT nIndex);
@@ -151,9 +151,9 @@ public:
USHORT & Flags() { return nFlags; }
USHORT & Attributes() { return nAttributes; }
- BOOL IsDebug() const { return bIsDebug; }
- BOOL IsPhantom() const { return bIsPhantom; }
- void SetPhantom(BOOL bIsPhantom);
+ bool IsDebug() const { return bIsDebug; }
+ bool IsPhantom() const { return bIsPhantom; }
+ void SetPhantom(bool bIsPhantom);
void SetColor(const Color &rColor);
void SetAttribut(USHORT nAttrib);
@@ -173,7 +173,7 @@ public:
void ToggleDebug() const;
#endif
- void SetRectHorAlign(RectHorAlign eHorAlign, BOOL bApplyToSubTree = TRUE );
+ void SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree = true );
RectHorAlign GetRectHorAlign() const { return eRectHorAlign; }
const SmRect & GetRect() const { return *this; }
@@ -213,8 +213,8 @@ public:
virtual void Accept(SmVisitor* pVisitor);
/** True if this node is selected */
- BOOL IsSelected() const {return bIsSelected;}
- void SetSelected(BOOL Selected = true) {bIsSelected = Selected;}
+ bool IsSelected() const {return bIsSelected;}
+ void SetSelected(bool Selected = true) {bIsSelected = Selected;}
#ifdef DEBUG_ENABLE_DUMPASDOT
/** The tree as dot graph for graphviz, usable for debugging
@@ -341,7 +341,7 @@ public:
SmStructureNode( const SmStructureNode &rNode );
virtual ~SmStructureNode();
- virtual BOOL IsVisible() const;
+ virtual bool IsVisible() const;
virtual USHORT GetNumSubNodes() const;
void SetNumSubNodes(USHORT nSize) { aSubNodes.resize(nSize); }
@@ -386,7 +386,7 @@ protected:
public:
- virtual BOOL IsVisible() const;
+ virtual bool IsVisible() const;
virtual USHORT GetNumSubNodes() const;
using SmNode::GetSubNode;
virtual SmNode * GetSubNode(USHORT nIndex);
@@ -725,24 +725,24 @@ public:
*/
class SmLineNode : public SmStructureNode
{
- BOOL bUseExtraSpaces;
+ bool bUseExtraSpaces;
protected:
SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
: SmStructureNode(eNodeType, rNodeToken)
{
- bUseExtraSpaces = TRUE;
+ bUseExtraSpaces = true;
}
public:
SmLineNode(const SmToken &rNodeToken)
: SmStructureNode(NLINE, rNodeToken)
{
- bUseExtraSpaces = TRUE;
+ bUseExtraSpaces = true;
}
- void SetUseExtraSpaces(BOOL bVal) { bUseExtraSpaces = bVal; }
- BOOL IsUseExtraSpaces() const { return bUseExtraSpaces; };
+ void SetUseExtraSpaces(bool bVal) { bUseExtraSpaces = bVal; }
+ bool IsUseExtraSpaces() const { return bUseExtraSpaces; };
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -897,7 +897,7 @@ public:
*/
class SmBinDiagonalNode : public SmStructureNode
{
- BOOL bAscending;
+ bool bAscending;
void GetOperPosSize(Point &rPos, Size &rSize,
const Point &rDiagPoint, double fAngleDeg) const;
@@ -905,8 +905,8 @@ class SmBinDiagonalNode : public SmStructureNode
public:
SmBinDiagonalNode(const SmToken &rNodeToken);
- BOOL IsAscending() const { return bAscending; }
- void SetAscending(BOOL bVal) { bAscending = bVal; }
+ bool IsAscending() const { return bAscending; }
+ void SetAscending(bool bVal) { bAscending = bVal; }
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
void Accept(SmVisitor* pVisitor);
@@ -958,14 +958,14 @@ enum SmSubSup
*/
class SmSubSupNode : public SmStructureNode
{
- BOOL bUseLimits;
+ bool bUseLimits;
public:
SmSubSupNode(const SmToken &rNodeToken)
: SmStructureNode(NSUBSUP, rNodeToken)
{
SetNumSubNodes(1 + SUBSUP_NUM_ENTRIES);
- bUseLimits = FALSE;
+ bUseLimits = false;
}
/** Get body (Not NULL) */
@@ -976,8 +976,8 @@ public:
return ((SmSubSupNode *) this)->GetBody();
}
- void SetUseLimits(BOOL bVal) { bUseLimits = bVal; }
- BOOL IsUseLimits() const { return bUseLimits; };
+ void SetUseLimits(bool bVal) { bUseLimits = bVal; }
+ bool IsUseLimits() const { return bUseLimits; };
/** Get super- or subscript
* @remarks this method may return NULL.
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index f549abf..e67dbba 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -195,7 +195,7 @@ class SmParser
USHORT Row,
ColOff;
SmConvert eConversion;
- BOOL bImportSymNames,
+ bool bImportSymNames,
bExportSymNames;
// declare copy-constructor and assignment-operator private
@@ -204,14 +204,14 @@ class SmParser
protected:
#if OSL_DEBUG_LEVEL
- BOOL IsDelimiter( const String &rTxt, xub_StrLen nPos );
+ 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 );
- inline BOOL TokenInGroup(ULONG nGroup);
+ inline bool TokenInGroup(ULONG nGroup);
// grammar
void Table();
@@ -236,7 +236,7 @@ protected:
void FontSize();
void Color();
void Brace();
- void Bracebody(BOOL bIsLeftRight);
+ void Bracebody(bool bIsLeftRight);
void Function();
void Binom();
void Stack();
@@ -263,10 +263,10 @@ 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; }
+ bool IsImportSymbolNames() const { return bImportSymNames; }
+ void SetImportSymbolNames(bool bVal) { bImportSymNames = bVal; }
+ bool IsExportSymbolNames() const { return bExportSymNames; }
+ void SetExportSymbolNames(bool bVal) { bExportSymNames = bVal; }
USHORT AddError(SmParseError Type, SmNode *pNode);
@@ -277,9 +277,9 @@ public:
};
-inline BOOL SmParser::TokenInGroup(ULONG nGroup)
+inline bool SmParser::TokenInGroup(ULONG nGroup)
{
- return (CurToken.nGroup & nGroup) ? TRUE : FALSE;
+ return (CurToken.nGroup & nGroup) ? true : false;
}
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 16a61ea..2185103 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -39,10 +39,10 @@
#include "format.hxx"
-BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
+bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const XubString &rText, Rectangle &rRect);
-BOOL SmIsMathAlpha(const XubString &rText);
+bool SmIsMathAlpha(const XubString &rText);
inline long SmFromTo(long nFrom, long nTo, double fRelDist)
@@ -105,7 +105,7 @@ class SmRect
nLoAttrFence,
nHiAttrFence;
USHORT nBorderWidth;
- BOOL bHasBaseline,
+ bool bHasBaseline,
bHasAlignInfo;
protected:
@@ -114,7 +114,7 @@ protected:
void Init(const OutputDevice &rDev, const SmFormat *pFormat,
const XubString &rText, USHORT nBorderWidth);
- void ClearBaseline() { bHasBaseline = FALSE; };
+ void ClearBaseline() { bHasBaseline = false; };
inline void CopyMBL(const SmRect& rRect);
void CopyAlignInfo(const SmRect& rRect);
@@ -164,7 +164,7 @@ public:
long GetItalicRight() const { return GetRight() + GetItalicRightSpace(); }
long GetItalicWidth() const { return GetWidth() + GetItalicLeftSpace() + GetItalicRightSpace(); }
- BOOL HasBaseline() const { return bHasBaseline; }
+ 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
+ bool IsEmpty() const
{
return GetWidth() == 0 || GetHeight() == 0;
}
- BOOL HasAlignInfo() const { return bHasAlignInfo; }
+ 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);
+ bool bKeepVerAlignParams);
long OrientedDist(const Point &rPoint) const;
- BOOL IsInsideRect(const Point &rPoint) const;
- BOOL IsInsideItalicRect(const Point &rPoint) const;
+ bool IsInsideRect(const Point &rPoint) const;
+ 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 25194d4..3c5aefd 100644
--- a/starmath/inc/smdll.hxx
+++ b/starmath/inc/smdll.hxx
@@ -38,7 +38,7 @@ class SfxFilter;
class SmDLL
{
- static BOOL bInitialized;
+ static bool bInitialized;
public:
static void Init();
static void Exit();
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 0bfb8b0..4638d4f 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -85,13 +85,13 @@ private:
String m_aExportName;
String m_aSetName;
sal_Unicode m_cChar;
- BOOL m_bPredefined;
- BOOL m_bDocSymbol;
+ bool m_bPredefined;
+ bool m_bDocSymbol;
public:
SmSym();
SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
- const String& rSet, BOOL bIsPredefined = FALSE);
+ const String& rSet, bool bIsPredefined = false);
SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
@@ -107,14 +107,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; }
+ 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; }
+ bool IsDocSymbol() const { return m_bDocSymbol; }
+ void SetDocSymbol( bool bVal ) { m_bDocSymbol = bVal; }
// true if rSymbol has the same name, font and character
bool IsEqualInUI( const SmSym& rSymbol ) const;
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
index 9a418e5..a11affb 100644
--- a/starmath/inc/toolbox.hxx
+++ b/starmath/inc/toolbox.hxx
@@ -60,7 +60,7 @@ protected:
DECL_LINK( CmdSelectHdl, ToolBox* );
SmViewShell * GetView();
- const ImageList * GetImageList( USHORT nResId, BOOL bHighContrast );
+ const ImageList * GetImageList( USHORT nResId, bool bHighContrast );
public:
SmToolBoxWindow(SfxBindings *pBindings,
@@ -72,7 +72,7 @@ public:
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent &rEvt );
- void AdjustPosSize( BOOL bSetPos );
+ void AdjustPosSize( bool bSetPos );
void SetCategory(USHORT nCategory);
};
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index 084a54a..82e045d 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -96,8 +96,8 @@ SmViewShell * SmGetActiveView();
// SmFace
//
-BOOL IsItalic( const Font &rFont );
-BOOL IsBold( const Font &rFont );
+bool IsItalic( const Font &rFont );
+bool IsBold( const Font &rFont );
class SmFace : public Font
{
@@ -170,7 +170,7 @@ protected:
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 bool CompareItem(const void *pFirstItem, const void *pSecondItem) const = 0;
virtual String GetStringItem(void *pItem) = 0;
@@ -214,7 +214,7 @@ protected:
virtual void *CreateItem(const void *pItem);
virtual void DestroyItem(void *pItem);
- virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const;
+ virtual bool CompareItem(const void *pFirstItem, const void *pSecondItem) const;
virtual String GetStringItem(void *pItem);
@@ -231,7 +231,7 @@ public:
virtual void Update(const String &rString, const String &rNewString);
virtual void Remove(const String &rString);
- inline BOOL Contains(const String &rString) const;
+ inline bool Contains(const String &rString) const;
inline String Get(USHORT nPos = 0) const;
inline SmStringPickList& operator = (const SmStringPickList& rList);
@@ -253,7 +253,7 @@ inline String SmStringPickList::Get(USHORT nPos) const
return nPos < Count() ? *((String *)SmPickList::Get(nPos)) : String();
}
-inline BOOL SmStringPickList::Contains(const String &rString) const
+inline bool SmStringPickList::Contains(const String &rString) const
{
return SmPickList::Contains((void *)&rString);
}
@@ -273,7 +273,7 @@ protected:
virtual void *CreateItem(const void *pItem);
virtual void DestroyItem(void *pItem);
- virtual BOOL CompareItem(const void *pFirstItem, const void *pSecondItem) const;
+ virtual bool CompareItem(const void *pFirstItem, const void *pSecondItem) const;
virtual String GetStringItem(void *pItem);
@@ -294,7 +294,7 @@ public:
virtual void Remove(const Font &rFont);
using SmPickList::Contains;
- inline BOOL Contains(const Font &rFont) const;
+ inline bool Contains(const Font &rFont) const;
inline Font Get(USHORT nPos = 0) const;
inline SmFontPickList& operator = (const SmFontPickList& rList);
@@ -320,7 +320,7 @@ inline Font SmFontPickList::Get(USHORT nPos) const
return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font();
}
-inline BOOL SmFontPickList::Contains(const Font &rFont) const
+inline bool SmFontPickList::Contains(const Font &rFont) const
{
return SmPickList::Contains((void *)&rFont);
}
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 40c3aab..f72f64e 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -57,11 +57,11 @@ class SmGraphicWindow : public ScrollableWindow
Rectangle aCursorRect;
bool bIsCursorVisible;
public:
- BOOL IsCursorVisible() const { return bIsCursorVisible; }
- void ShowCursor(BOOL bShow);
+ bool IsCursorVisible() const { return bIsCursorVisible; }
+ void ShowCursor(bool bShow);
const SmNode * SetCursorPos(USHORT nRow, USHORT nCol);
protected:
- void SetIsCursorVisible(BOOL bVis) { bIsCursorVisible = bVis; }
+ void SetIsCursorVisible(bool bVis) { bIsCursorVisible = bVis; }
using Window::SetCursor;
void SetCursor(const SmNode *pNode);
void SetCursor(const Rectangle &rRect);
@@ -157,7 +157,7 @@ class SmCmdBoxWindow : public SfxDockingWindow
{
SmEditWindow aEdit;
SmEditController aController;
- BOOL bExiting;
+ bool bExiting;
Timer aInitialFocusTimer;
@@ -233,7 +233,7 @@ class SmViewShell: public SfxViewShell
::com::sun::star::lang:: XEventListener > xClipEvtLstnr;
SmClipboardChangeListener* pClipEvtLstnr;
SmViewShell_Impl* pImpl;
- BOOL bPasteState;
+ bool bPasteState;
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -242,7 +242,7 @@ class SmViewShell: public SfxViewShell
* should be inserted into SmEditWindow or directly into the SmDocShell as done if the
* visual editor was last to have focus.
*/
- BOOL bInsertIntoEditWindow;
+ bool bInsertIntoEditWindow;
protected:
Size GetTextLineSize(OutputDevice& rDevice,
@@ -263,8 +263,8 @@ protected:
virtual USHORT SetPrinter(SfxPrinter *pNewPrinter,
USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
- BOOL Insert( SfxMedium& rMedium );
- BOOL InsertFrom(SfxMedium &rMedium);
+ bool Insert( SfxMedium& rMedium );
+ bool InsertFrom(SfxMedium &rMedium);
virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions);
@@ -313,7 +313,7 @@ public:
* so that when text is inserted from catalog or elsewhere we know whether to
* insert for the visual editor, or the text editor.
*/
- void SetInsertIntoEditWindow(BOOL bEditWindowHadFocusLast = TRUE){
+ void SetInsertIntoEditWindow(bool bEditWindowHadFocusLast = true){
bInsertIntoEditWindow = bEditWindowHadFocusLast;
}
bool IsInlineEditEnabled() const;
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index d63bc13..89b5c46 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -295,7 +295,7 @@ private:
* or EndPos. This means that anything visited in between will be
* selected.
*/
- BOOL IsSelecting;
+ bool IsSelecting;
};
@@ -421,7 +421,7 @@ private:
/** Reference to drawing device */
OutputDevice& rDev;
/** True if aSelectionArea have been initialized */
- BOOL bHasSelectionArea;
+ bool bHasSelectionArea;
/** The current area that is selected */
Rectangle aSelectionArea;
/** Extend the area that must be selected */
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index 75311fc..f5d9e77 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -1167,8 +1167,8 @@ 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
+ 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;
const SfxPoolItem* pParaItem = NULL;
@@ -1201,16 +1201,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
}
if( bEmpty )
- bEmpty = FALSE;
+ bEmpty = false;
if( !bGaps && aAttrib.nStart > nLastEnd )
- bGaps = TRUE;
+ bGaps = true;
nLastEnd = aAttrib.nEnd;
}
if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) )
- bGaps = TRUE;
+ bGaps = true;
if( bEmpty )
eParaState = SFX_ITEM_DEFAULT;
else if( bGaps )
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 6fd364f..c3fb2e4 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -202,13 +202,13 @@ struct SmCfgOther
{
SmPrintSize ePrintSize;
USHORT nPrintZoomFactor;
- BOOL bPrintTitle;
- BOOL bPrintFormulaText;
- BOOL bPrintFrame;
- BOOL bIgnoreSpacesRight;
- BOOL bToolboxVisible;
- BOOL bAutoRedraw;
- BOOL bFormulaCursor;
+ bool bPrintTitle;
+ bool bPrintFormulaText;
+ bool bPrintFrame;
+ bool bIgnoreSpacesRight;
+ bool bToolboxVisible;
+ bool bAutoRedraw;
+ bool bFormulaCursor;
SmCfgOther();
};
@@ -221,7 +221,7 @@ SmCfgOther::SmCfgOther()
bPrintTitle = bPrintFormulaText =
bPrintFrame = bIgnoreSpacesRight =
bToolboxVisible = bAutoRedraw =
- bFormulaCursor = TRUE;
+ bFormulaCursor = true;
}
/////////////////////////////////////////////////////////////////
@@ -262,7 +262,7 @@ const Font SmFontFormat::GetFont() const
}
-BOOL SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const
+bool SmFontFormat::operator == ( const SmFontFormat &rFntFmt ) const
{
return aName == rFntFmt.aName &&
nCharSet == rFntFmt.nCharSet &&
@@ -284,7 +284,7 @@ SmFntFmtListEntry::SmFntFmtListEntry( const String &rId, const SmFontFormat &rFn
SmFontFormatList::SmFontFormatList()
{
- bModified = FALSE;
+ bModified = false;
}
@@ -294,7 +294,7 @@ void SmFontFormatList::Clear()
if (nCnt)
{
aEntries.Remove( 0, nCnt );
- SetModified( TRUE );
+ SetModified( true );
}
}
@@ -308,7 +308,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
aEntries.Insert( aEntry, aEntries.Count() );
- SetModified( TRUE );
+ SetModified( true );
}
}
@@ -329,7 +329,7 @@ void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
if (nPos != 0xFFFF)
{
aEntries.Remove( nPos );
- SetModified( TRUE );
+ SetModified( true );
}
}
@@ -376,7 +376,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, bool bAdd )
{
String aRes( GetFontFormatId( rFntFmt) );
if (0 == aRes.Len() && bAdd)
@@ -427,7 +427,7 @@ SmMathConfig::SmMathConfig() :
pFontFormatList = 0;
pSymbolMgr = 0;
- bIsOtherModified = bIsFormatModified = FALSE;
+ bIsOtherModified = bIsFormatModified = false;
}
@@ -441,19 +441,19 @@ SmMathConfig::~SmMathConfig()
}
-void SmMathConfig::SetOtherModified( BOOL bVal )
+void SmMathConfig::SetOtherModified( bool bVal )
{
bIsOtherModified = bVal;
}
-void SmMathConfig::SetFormatModified( BOOL bVal )
+void SmMathConfig::SetFormatModified( bool bVal )
{
bIsFormatModified = bVal;
}
-void SmMathConfig::SetFontFormatListModified( BOOL bVal )
+void SmMathConfig::SetFontFormatListModified( bool bVal )
{
if (pFontFormatList)
pFontFormatList->SetModified( bVal );
@@ -488,27 +488,27 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
Font aFont;
sal_Unicode cChar = '\0';
String aSet;
- BOOL bPredefined = FALSE;
+ bool bPredefined = false;
OUString aTmpStr;
INT32 nTmp32 = 0;
- BOOL bTmp = FALSE;
+ bool bTmp = false;
- BOOL bOK = TRUE;
+ bool bOK = true;
if (pValue->hasValue() && (*pValue >>= nTmp32))
cChar = (sal_Unicode) nTmp32;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
aSet = aTmpStr;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= bTmp))
bPredefined = bTmp;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
{
@@ -518,7 +518,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
aFont = pFntFmt->GetFont();
}
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (bOK)
@@ -636,7 +636,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
pVal++;
// FontFormatId
SmFontFormat aFntFmt( rSymbol.GetFace() );
- String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, TRUE ) );
+ String aFntFmtId( GetFontFormatList().GetFontFormatId( aFntFmt, true ) );
OSL_ENSURE( aFntFmtId.Len(), "FontFormatId not found" );
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
@@ -683,7 +683,7 @@ void SmMathConfig::LoadFontFormatList()
pFontFormatList->AddFontFormat( pNode[i], aFntFmt );
}
}
- pFontFormatList->SetModified( FALSE );
+ pFontFormatList->SetModified( false );
}
@@ -715,36 +715,36 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
OUString aTmpStr;
INT16 nTmp16 = 0;
- BOOL bOK = TRUE;
+ bool bOK = true;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
rFontFormat.aName = aTmpStr;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nCharSet = nTmp16; // 6.0 file-format GetSOLoadTextEncoding not needed
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nFamily = nTmp16;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nPitch = nTmp16;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nWeight = nTmp16;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
if (pValue->hasValue() && (*pValue >>= nTmp16))
rFontFormat.nItalic = nTmp16;
else
- bOK = FALSE;
+ bOK = false;
++pValue;
OSL_ENSURE( bOK, "read FontFormat failed" );
@@ -815,7 +815,7 @@ void SmMathConfig::SaveFontFormatList()
OSL_ENSURE( pVal - pValues == nCount * nSymbolProps, "properties missing" );
ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues );
- rFntFmtList.SetModified( FALSE );
+ rFntFmtList.SetModified( false );
}
@@ -830,12 +830,12 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
for (i = 0; i < nCount; ++i)
{
OSL_ENSURE( rSymbols[i].GetName().Len() > 0, "non named symbol" );
- aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , TRUE );
+ aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , 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 ) ) , true );
}
// remove unused font-formats from list
@@ -876,7 +876,7 @@ void SmMathConfig::LoadOther()
const Any *pVal = pValues;
INT16 nTmp16 = 0;
- BOOL bTmp = FALSE;
+ bool bTmp = false;
// Print/Title
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -916,7 +916,7 @@ void SmMathConfig::LoadOther()
++pVal;
OSL_ENSURE( pVal - pValues == nProps, "property mismatch" );
- SetOtherModified( FALSE );
+ SetOtherModified( false );
}
}
@@ -955,7 +955,7 @@ void SmMathConfig::SaveOther()
OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
- SetOtherModified( FALSE );
+ SetOtherModified( false );
}
void SmMathConfig::LoadFormat()
@@ -975,7 +975,7 @@ void SmMathConfig::LoadFormat()
OUString aTmpStr;
INT16 nTmp16 = 0;
- BOOL bTmp = FALSE;
+ bool bTmp = false;
// StandardFormat/Textmode
if (pVal->hasValue() && (*pVal >>= bTmp))
@@ -1017,7 +1017,7 @@ void SmMathConfig::LoadFormat()
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
Font aFnt;
- BOOL bUseDefaultFont = TRUE;
+ bool bUseDefaultFont = true;
if (pVal->hasValue() && (*pVal >>= aTmpStr))
{
bUseDefaultFont = 0 == aTmpStr.getLength();
@@ -1041,7 +1041,7 @@ void SmMathConfig::LoadFormat()
}
OSL_ENSURE( pVal - pValues == nProps, "property mismatch" );
- SetFormatModified( FALSE );
+ SetFormatModified( false );
}
}
@@ -1084,7 +1084,7 @@ void SmMathConfig::SaveFormat()
if (!pFormat->IsDefaultFont( i ))
{
SmFontFormat aFntFmt( pFormat->GetFont( i ) );
- aFntFmtId = GetFontFormatList().GetFontFormatId( aFntFmt, TRUE );
+ aFntFmtId = GetFontFormatList().GetFontFormatId( aFntFmt, true );
OSL_ENSURE( aFntFmtId.getLength(), "FontFormatId not found" );
}
@@ -1094,7 +1094,7 @@ void SmMathConfig::SaveFormat()
OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
- SetFormatModified( FALSE );
+ SetFormatModified( false );
}
@@ -1106,20 +1106,20 @@ const SmFormat & SmMathConfig::GetStandardFormat() const
}
-void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, BOOL bSaveFontFormatList )
+void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, bool bSaveFontFormatList )
{
if (!pFormat)
LoadFormat();
if (rFormat != *pFormat)
{
*pFormat = rFormat;
- SetFormatModified( TRUE );
+ SetFormatModified( true );
SaveFormat();
if (bSaveFontFormatList)
{
// needed for SmFontTypeDialog's DefaultButtonClickHdl
- SetFontFormatListModified( TRUE );
+ SetFontFormatListModified( true );
SaveFontFormatList();
}
}
@@ -1141,7 +1141,7 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
if (eSize != pOther->ePrintSize)
{
pOther->ePrintSize = eSize;
- SetOtherModified( TRUE );
+ SetOtherModified( true );
}
}
@@ -1161,22 +1161,22 @@ void SmMathConfig::SetPrintZoomFactor( USHORT nVal )
if (nVal != pOther->nPrintZoomFactor)
{
pOther->nPrintZoomFactor = nVal;
- SetOtherModified( TRUE );
+ SetOtherModified( true );
}
}
-void SmMathConfig::SetOtherIfNotEqual( BOOL &rbItem, BOOL bNewVal )
+void SmMathConfig::SetOtherIfNotEqual( bool &rbItem, bool bNewVal )
{
if (bNewVal != rbItem)
{
rbItem = bNewVal;
- SetOtherModified( TRUE );
+ SetOtherModified( true );
}
}
-BOOL SmMathConfig::IsPrintTitle() const
+bool SmMathConfig::IsPrintTitle() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1184,7 +1184,7 @@ BOOL SmMathConfig::IsPrintTitle() const
}
-void SmMathConfig::SetPrintTitle( BOOL bVal )
+void SmMathConfig::SetPrintTitle( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1192,7 +1192,7 @@ void SmMathConfig::SetPrintTitle( BOOL bVal )
}
-BOOL SmMathConfig::IsPrintFormulaText() const
+bool SmMathConfig::IsPrintFormulaText() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1200,7 +1200,7 @@ BOOL SmMathConfig::IsPrintFormulaText() const
}
-void SmMathConfig::SetPrintFormulaText( BOOL bVal )
+void SmMathConfig::SetPrintFormulaText( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1208,7 +1208,7 @@ void SmMathConfig::SetPrintFormulaText( BOOL bVal )
}
-BOOL SmMathConfig::IsPrintFrame() const
+bool SmMathConfig::IsPrintFrame() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1216,7 +1216,7 @@ BOOL SmMathConfig::IsPrintFrame() const
}
-void SmMathConfig::SetPrintFrame( BOOL bVal )
+void SmMathConfig::SetPrintFrame( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1224,7 +1224,7 @@ void SmMathConfig::SetPrintFrame( BOOL bVal )
}
-BOOL SmMathConfig::IsIgnoreSpacesRight() const
+bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1232,7 +1232,7 @@ BOOL SmMathConfig::IsIgnoreSpacesRight() const
}
-void SmMathConfig::SetIgnoreSpacesRight( BOOL bVal )
+void SmMathConfig::SetIgnoreSpacesRight( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1240,7 +1240,7 @@ void SmMathConfig::SetIgnoreSpacesRight( BOOL bVal )
}
-BOOL SmMathConfig::IsAutoRedraw() const
+bool SmMathConfig::IsAutoRedraw() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1248,7 +1248,7 @@ BOOL SmMathConfig::IsAutoRedraw() const
}
-void SmMathConfig::SetAutoRedraw( BOOL bVal )
+void SmMathConfig::SetAutoRedraw( bool bVal )
{
if (!pOther)
LoadOther();
@@ -1256,7 +1256,7 @@ void SmMathConfig::SetAutoRedraw( BOOL bVal )
}
-BOOL SmMathConfig::IsShowFormulaCursor() const
+bool SmMathConfig::IsShowFormulaCursor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1264,7 +1264,7 @@ BOOL SmMathConfig::IsShowFormulaCursor() const
}
-void SmMathConfig::SetShowFormulaCursor( BOOL bVal )
+void SmMathConfig::SetShowFormulaCursor( bool bVal )
{
if (!pOther)
LoadOther();
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 9688740..ba8dcd0 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -71,7 +71,7 @@ struct SmFontFormat
SmFontFormat( const Font &rFont );
const Font GetFont() const;
- BOOL operator == ( const SmFontFormat &rFntFmt ) const;
+ bool operator == ( const SmFontFormat &rFntFmt ) const;
};
@@ -90,7 +90,7 @@ SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 )
class SmFontFormatList
{
SmFntFmtListEntryArr aEntries;
- BOOL bModified;
+ bool bModified;
// disallow copy-constructor and assignment-operator for now
SmFontFormatList( const SmFontFormatList & );
@@ -106,13 +106,13 @@ public:
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
const SmFontFormat * GetFontFormat( USHORT nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
- const String GetFontFormatId( const SmFontFormat &rFntFmt, BOOL bAdd );
+ const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
const String GetFontFormatId( USHORT nPos ) const;
const String GetNewFontFormatId() const;
USHORT GetCount() const { return aEntries.Count(); }
- BOOL IsModified() const { return bModified; }
- void SetModified( BOOL bVal ) { bModified = bVal; }
+ bool IsModified() const { return bModified; }
+ void SetModified( bool bVal ) { bModified = bVal; }
};
@@ -124,8 +124,8 @@ class SmMathConfig : public utl::ConfigItem
SmCfgOther * pOther;
SmFontFormatList * pFontFormatList;
SmSymbolManager * pSymbolMgr;
- BOOL bIsOtherModified;
- BOOL bIsFormatModified;
+ bool bIsOtherModified;
+ bool bIsFormatModified;
// disallow copy-constructor and assignment-operator for now
SmMathConfig( const SmMathConfig & );
@@ -144,7 +144,7 @@ class SmMathConfig : public utl::ConfigItem
const rtl::OUString &rSymbolName,
const rtl::OUString &rBaseNode ) const;
- void SetOtherIfNotEqual( BOOL &rbItem, BOOL bNewVal );
+ void SetOtherIfNotEqual( bool &rbItem, bool bNewVal );
protected:
void LoadOther();
@@ -154,12 +154,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( 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; }
SmFontFormatList & GetFontFormatList();
const SmFontFormatList & GetFontFormatList() const
@@ -180,25 +180,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, bool bSaveFontFormatList = false );
+
+ bool IsPrintTitle() const;
+ void SetPrintTitle( bool bVal );
+ bool IsPrintFormulaText() const;
+ void SetPrintFormulaText( bool bVal );
+ bool IsPrintFrame() const;
+ void SetPrintFrame( 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 );
+ bool IsIgnoreSpacesRight() const;
+ void SetIgnoreSpacesRight( bool bVal );
+ bool IsAutoRedraw() const;
+ void SetAutoRedraw( bool bVal );
+ bool IsShowFormulaCursor() const;
+ void SetShowFormulaCursor( bool bVal );
};
/////////////////////////////////////////////////////////////////
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index 0930c10..e51d73c 100644
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -64,7 +64,7 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
const SfxPoolItem *pItem = NULL;
UINT16 nU16;
- BOOL bVal;
+ bool bVal;
if (rSet.GetItemState(SID_PRINTSIZE, TRUE, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintSize( (SmPrintSize) nU16 );
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 5613c3b..dbf2192 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -481,7 +481,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
//Find node that this should be applied to
SmNode* pSubject;
- BOOL bPatchLine = pSelectedNodesList->size() > 0; //If the line should be patched later
+ bool bPatchLine = pSelectedNodesList->size() > 0; //If the line should be patched later
if(it != pLineList->begin()) {
it--;
pSubject = *it;
@@ -492,7 +492,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
pSubject->Prepare(pDocShell->GetFormat(), *pDocShell);
it = pLineList->insert(it, pSubject);
it++;
- bPatchLine = TRUE; //We've modified the line it should be patched later.
+ bPatchLine = true; //We've modified the line it should be patched later.
}
//Wrap the subject in a SmSubSupNode
@@ -555,7 +555,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterScript, pScriptLine);
}
-BOOL SmCursor::InsertLimit(SmSubSup eSubSup, BOOL bMoveCaret) {
+bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
//Find a subject to set limits on
SmOperNode *pSubject = NULL;
//Check if pSelectedNode might be a subject
@@ -570,7 +570,7 @@ BOOL SmCursor::InsertLimit(SmSubSup eSubSup, BOOL bMoveCaret) {
//Abort operation if we're not in the appropriate context
if(!pSubject)
- return FALSE;
+ return false;
BeginEdit();
@@ -624,7 +624,7 @@ BOOL SmCursor::InsertLimit(SmSubSup eSubSup, BOOL bMoveCaret) {
EndEdit();
- return TRUE;
+ return true;
}
void SmCursor::InsertBrackets(SmBracketType eBracketType) {
@@ -697,7 +697,7 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
}
-SmNode *SmCursor::CreateBracket(SmBracketType eBracketType, BOOL bIsLeft) {
+SmNode *SmCursor::CreateBracket(SmBracketType eBracketType, bool bIsLeft) {
SmToken aTok;
if(bIsLeft){
switch(eBracketType){
@@ -771,7 +771,7 @@ SmNode *SmCursor::CreateBracket(SmBracketType eBracketType, BOOL bIsLeft) {
return pRetVal;
}
-BOOL SmCursor::InsertRow() {
+bool SmCursor::InsertRow() {
AnnotateSelection();
//Find line
@@ -808,7 +808,7 @@ BOOL SmCursor::InsertRow() {
//If we're not in a context that supports InsertRow, return FALSE
if(!pTable && !pMatrix)
- return FALSE;
+ return false;
//Now we start editing
BeginEdit();
@@ -893,7 +893,7 @@ BOOL SmCursor::InsertRow() {
//FinishEdit is actually used to handle siturations where parent is an instance of
//SmSubSupNode. In this case parent should always be a table or matrix, however, for
//code reuse we just use FinishEdit() here too.
- return TRUE;
+ return true;
}
void SmCursor::InsertFraction() {
@@ -1108,14 +1108,14 @@ void SmCursor::InsertCommand(USHORT nCommand) {
InsertRow();
break;
case RID_FROMX:
- InsertLimit(CSUB, TRUE);
+ InsertLimit(CSUB, true);
break;
case RID_TOX:
- InsertLimit(CSUP, TRUE);
+ InsertLimit(CSUP, true);
break;
case RID_FROMXTOY:
- if(InsertLimit(CSUB, FALSE))
- InsertLimit(CSUP, TRUE);
+ if(InsertLimit(CSUB, true))
+ InsertLimit(CSUP, true);
break;
default:
InsertCommandText(SmResId(nCommand));
@@ -1577,7 +1577,7 @@ SmNode* SmNodeListParser::Error(){
return new SmErrorNode(PE_UNEXPECTED_TOKEN, SmToken());
}
-BOOL SmNodeListParser::IsOperator(const SmToken &token) {
+bool SmNodeListParser::IsOperator(const SmToken &token) {
return IsRelationOperator(token) ||
IsSumOperator(token) ||
IsProductOperator(token) ||
@@ -1585,15 +1585,15 @@ BOOL SmNodeListParser::IsOperator(const SmToken &token) {
IsPostfixOperator(token);
}
-BOOL SmNodeListParser::IsRelationOperator(const SmToken &token) {
+bool SmNodeListParser::IsRelationOperator(const SmToken &token) {
return token.nGroup & TGRELATION;
}
-BOOL SmNodeListParser::IsSumOperator(const SmToken &token) {
+bool SmNodeListParser::IsSumOperator(const SmToken &token) {
return token.nGroup & TGSUM;
}
-BOOL SmNodeListParser::IsProductOperator(const SmToken &token) {
+bool SmNodeListParser::IsProductOperator(const SmToken &token) {
return token.nGroup & TGPRODUCT &&
token.eType != TWIDESLASH &&
token.eType != TWIDEBACKSLASH &&
@@ -1602,7 +1602,7 @@ BOOL SmNodeListParser::IsProductOperator(const SmToken &token) {
token.eType != TOVER;
}
-BOOL SmNodeListParser::IsUnaryOperator(const SmToken &token) {
+bool SmNodeListParser::IsUnaryOperator(const SmToken &token) {
return token.nGroup & TGUNOPER &&
(token.eType == TPLUS ||
token.eType == TMINUS ||
@@ -1612,6 +1612,6 @@ BOOL SmNodeListParser::IsUnaryOperator(const SmToken &token) {
token.eType == TUOPER);
}
-BOOL SmNodeListParser::IsPostfixOperator(const SmToken &token) {
+bool SmNodeListParser::IsPostfixOperator(const SmToken &token) {
return token.eType == TFACT;
}
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 518d928..ec2361c 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -100,7 +100,7 @@ SmFontStyles::SmFontStyles() :
const String & SmFontStyles::GetStyleName( const Font &rFont ) const
{
//! compare also SmSpecialNode::Prepare
- BOOL bBold = IsBold( rFont ),
+ bool bBold = IsBold( rFont ),
bItalic = IsItalic( rFont );
if (bBold && bItalic)
@@ -215,7 +215,7 @@ BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
- return TRUE;
+ return true;
}
@@ -324,7 +324,7 @@ void SmFontDialog::SetFont(const Font &rFont)
SmFontDialog::SmFontDialog(Window * pParent,
- OutputDevice *pFntListDevice, BOOL bHideCheckboxes, BOOL bFreeRes)
+ OutputDevice *pFntListDevice, bool bHideCheckboxes, bool bFreeRes)
: ModalDialog(pParent,SmResId(RID_FONTDIALOG)),
aFixedText1 (this, SmResId(1)),
aFontBox (this, SmResId(1)),
@@ -353,7 +353,7 @@ SmFontDialog::SmFontDialog(Window * pParent,
Face.SetFamily(FAMILY_DONTKNOW);
Face.SetPitch(PITCH_DONTKNOW);
Face.SetCharSet(RTL_TEXTENCODING_DONTKNOW);
- Face.SetTransparent(TRUE);
+ Face.SetTransparent(true);
InitColor_Impl();
@@ -368,13 +368,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( false );
+ aBoldCheckBox.Enable( false );
+ aBoldCheckBox.Show( false );
+ aItalicCheckBox.Check( false );
+ aItalicCheckBox.Enable( false );
+ aItalicCheckBox.Show( false );
+ aFixedText2.Show( false );
Size aSize( aFontBox.GetSizePixel() );
long nComboBoxBottom = aFontBox.GetPosPixel().Y() + aFontBox.GetSizePixel().Height();
@@ -435,7 +435,7 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton
}
-SmFontSizeDialog::SmFontSizeDialog(Window * pParent, BOOL bFreeRes)
+SmFontSizeDialog::SmFontSizeDialog(Window * pParent, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_FONTSIZEDIALOG)),
aFixedText1(this, SmResId(1)),
aBaseSize(this, SmResId(1)),
@@ -500,16 +500,16 @@ IMPL_LINK( SmFontTypeDialog, MenuSelectHdl, Menu *, pMenu )
{
SmFontPickListBox *pActiveListBox;
- BOOL bHideCheckboxes = FALSE;
+ bool bHideCheckboxes = 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 = true; break;
+ case 6: pActiveListBox = &aSansFont; bHideCheckboxes = true; break;
+ case 7: pActiveListBox = &aFixedFont; bHideCheckboxes = true; break;
default:pActiveListBox = NULL;
}
@@ -534,7 +534,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, true );
}
delete pQueryBox;
@@ -543,7 +543,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, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_FONTTYPEDIALOG)),
aFixedText1 (this, SmResId(1)),
aVariableFont (this, SmResId(1)),
@@ -655,7 +655,7 @@ static const FieldMinMax pMinMaxData[10][4] =
SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
Resource(rResId),
- bIsHighContrast(FALSE)
+ bIsHighContrast(false)
{
if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
{
@@ -754,7 +754,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
{
aCheckBox1.Toggle();
- BOOL bChecked = aCheckBox1.IsChecked();
+ bool bChecked = aCheckBox1.IsChecked();
aFixedText4 .Enable( bChecked );
aMetricField4.Enable( bChecked );
}
@@ -837,12 +837,12 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
if (nActiveCategory == 5)
bScaleAllBrackets = aCheckBox1.IsChecked();
- aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, FALSE);
+ aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, false);
}
// aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
// gewaehlten Kategorie.
- BOOL bActive;
+ bool bActive;
for (USHORT i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
@@ -895,12 +895,12 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
{
aCheckBox1.Check( bScaleAllBrackets );
- BOOL bChecked = aCheckBox1.IsChecked();
+ bool bChecked = aCheckBox1.IsChecked();
aFixedText4 .Enable( bChecked );
aMetricField4.Enable( bChecked );
}
- aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, TRUE);
+ aMenuButton.GetPopupMenu()->CheckItem(nCategory + 1, true);
aFixedLine.SetText(Categories[nCategory]->GetName());
nActiveCategory = nCategory;
@@ -911,7 +911,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
}
-SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
+SmDistanceDialog::SmDistanceDialog(Window *pParent, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_DISTANCEDIALOG)),
aFixedText1 (this, SmResId(1)),
aMetricField1 (this, SmResId(1)),
@@ -932,7 +932,7 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, BOOL bFreeRes)
for (USHORT i = 0; i < NOCATEGORIES; i++)
Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
nActiveCategory = CATEGORY_NONE;
- bScaleAllBrackets = FALSE;
+ bScaleAllBrackets = false;
if (bFreeRes)
FreeResource();
@@ -962,7 +962,7 @@ SmDistanceDialog::~SmDistanceDialog()
void SmDistanceDialog::ApplyImages()
{
- BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for (int i = 0; i < NOCATEGORIES; ++i)
{
SmCategoryDesc *pCat = Categories[i];
@@ -1072,7 +1072,7 @@ IMPL_LINK( SmAlignDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton*/
}
-SmAlignDialog::SmAlignDialog(Window * pParent, BOOL bFreeRes)
+SmAlignDialog::SmAlignDialog(Window * pParent, bool bFreeRes)
: ModalDialog(pParent, SmResId(RID_ALIGNDIALOG)),
aLeft (this, SmResId(1)),
aCenter (this, SmResId(2)),
@@ -1094,21 +1094,21 @@ void SmAlignDialog::ReadFrom(const SmFormat &rFormat)
switch (rFormat.GetHorAlign())
{
case AlignLeft:
- aLeft .Check(TRUE);
- aCenter.Check(FALSE);
- aRight .Check(FALSE);
+ aLeft .Check(true);
+ aCenter.Check(false);
+ aRight .Check(false);
break;
case AlignCenter:
- aLeft .Check(FALSE);
- aCenter.Check(TRUE);
- aRight .Check(FALSE);
+ aLeft .Check(false);
+ aCenter.Check(true);
+ aRight .Check(false);
break;
case AlignRight:
- aLeft .Check(FALSE);
- aCenter.Check(FALSE);
- aRight .Check(TRUE);
+ aLeft .Check(false);
+ aCenter.Check(false);
+ aRight .Check(true);
break;
}
}
@@ -1261,7 +1261,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(false);
aVScrollBar.Show();
aVScrollBar.SetScrollHdl(LINK(this, SmShowSymbolSet, ScrollHdl));
@@ -1279,12 +1279,12 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows))
{
aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
- aVScrollBar.Enable(TRUE);
+ aVScrollBar.Enable(true);
}
else
{
aVScrollBar.SetRange(Range(0,0));
- aVScrollBar.Enable (FALSE);
+ aVScrollBar.Enable (false);
}
Invalidate();
@@ -1370,7 +1370,7 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
////////////////////////////////////////////////////////////////////////////////
-void SmSymbolDialog::FillSymbolSets(BOOL bDeleteText)
+void SmSymbolDialog::FillSymbolSets(bool bDeleteText)
// fuellt die Eintraege der moeglichen 'SymbolsSet's im Dialog mit den
// aktuellen Werten des SymbolSet Managers, selektiert aber keinen.
{
@@ -1501,14 +1501,14 @@ IMPL_LINK_INLINE_START( SmSymbolDialog, CloseClickHdl, Button *, EMPTYARG pButto
OSL_ENSURE(pButton == &aCloseBtn, "Sm : wrong button");
#endif
- EndDialog(TRUE);
+ EndDialog(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, bool bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMBOLDIALOG)),
aSymbolSetText (this, SmResId(1)),
aSymbolSets (this, SmResId(1)),
@@ -1585,9 +1585,9 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
}
-BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
+bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
{
- BOOL bRet = FALSE;
+ bool bRet = false;
USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
aSymbolSetName = String();
@@ -1606,7 +1606,7 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
if (aSymbolSet.size() > 0)
SelectSymbol(0);
- bRet = TRUE;
+ bRet = true;
}
else
aSymbolSets.SetNoSelection();
@@ -1669,7 +1669,7 @@ void SmShowChar::SetFont(const Font &rFont)
aFont.SetSize(aSize);
aFont.SetAlign(ALIGN_TOP);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(true);
Control::SetFont(aFont);
// keep text color (new font may have different one)
@@ -1680,7 +1680,7 @@ void SmShowChar::SetFont(const Font &rFont)
////////////////////////////////////////////////////////////////////////////////
-void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText)
+void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
@@ -1698,7 +1698,7 @@ void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, BOOL bDeleteText)
}
-void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText)
+void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
@@ -1716,7 +1716,7 @@ void SmSymDefineDialog::FillSymbolSets(ComboBox &rComboBox, BOOL bDeleteText)
}
-void SmSymDefineDialog::FillFonts(BOOL bDelete)
+void SmSymDefineDialog::FillFonts(bool bDelete)
{
aFonts.Clear();
if (bDelete)
@@ -1734,7 +1734,7 @@ void SmSymDefineDialog::FillFonts(BOOL bDelete)
}
-void SmSymDefineDialog::FillStyles(BOOL bDeleteText)
+void SmSymDefineDialog::FillStyles(bool bDeleteText)
{
aStyles.Clear();
if (bDeleteText)
@@ -1772,7 +1772,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolChangeHdl, ComboBox *, EMPTYARG pComboBox
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(pComboBox == &aOldSymbols, "Sm : wrong argument");
#endif
- SelectSymbol(aOldSymbols, aOldSymbols.GetText(), FALSE);
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), false);
return 0;
}
@@ -1783,7 +1783,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, ComboBox *, EMPTYARG pCombo
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(pComboBox == &aOldSymbolSets, "Sm : wrong argument");
#endif
- SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), FALSE);
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), false);
return 0;
}
@@ -1794,18 +1794,18 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
Selection aSelection (pComboBox->GetSelection());
if (pComboBox == &aSymbols)
- SelectSymbol(aSymbols, aSymbols.GetText(), FALSE);
+ SelectSymbol(aSymbols, aSymbols.GetText(), false);
else if (pComboBox == &aSymbolSets)
- SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), FALSE);
+ SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), false);
else if (pComboBox == &aOldSymbols)
// nur Namen aus der Liste erlauben
- SelectSymbol(aOldSymbols, aOldSymbols.GetText(), TRUE);
+ SelectSymbol(aOldSymbols, aOldSymbols.GetText(), true);
else if (pComboBox == &aOldSymbolSets)
// nur Namen aus der Liste erlauben
- SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), TRUE);
+ SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), true);
else if (pComboBox == &aStyles)
// nur Namen aus der Liste erlauben (ist hier eh immer der Fall)
- SelectStyle(aStyles.GetText(), TRUE);
+ SelectStyle(aStyles.GetText(), true);
else
{
#if OSL_DEBUG_LEVEL > 1
@@ -1907,10 +1907,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, false);
+ FillSymbolSets(aSymbolSets, false);
+ FillSymbols(aOldSymbols ,false);
+ FillSymbols(aSymbols ,false);
UpdateButtons();
@@ -1951,10 +1951,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, false);
+ FillSymbolSets(aSymbolSets, false);
+ FillSymbols(aOldSymbols ,false);
+ FillSymbols(aSymbols ,false);
UpdateButtons();
@@ -1978,10 +1978,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, false);
+ FillSymbolSets(aSymbolSets, false);
+ FillSymbols(aOldSymbols ,false);
+ FillSymbols(aSymbols ,false);
}
UpdateButtons();
@@ -1992,9 +1992,9 @@ IMPL_LINK( SmSymDefineDialog, DeleteClickHdl, Button *, EMPTYARG pButton )
void SmSymDefineDialog::UpdateButtons()
{
- BOOL bAdd = FALSE,
- bChange = FALSE,
- bDelete = FALSE,
+ bool bAdd = false,
+ bChange = false,
+ bDelete = false,
bEqual;
XubString aTmpSymbolName (aSymbols.GetText()),
aTmpSymbolSetName (aSymbolSets.GetText());
@@ -2029,7 +2029,7 @@ void SmSymDefineDialog::UpdateButtons()
SmSymDefineDialog::SmSymDefineDialog(Window * pParent,
- OutputDevice *pFntListDevice, SmSymbolManager &rMgr, BOOL bFreeRes) :
+ OutputDevice *pFntListDevice, SmSymbolManager &rMgr, bool bFreeRes) :
ModalDialog (pParent, SmResId(RID_SYMDEFINEDIALOG)),
aOldSymbolText (this, SmResId(1)),
aOldSymbols (this, SmResId(1)),
@@ -2073,8 +2073,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( false, true );
+ aSymbols .EnableAutocomplete( false, true );
FillFonts();
if (aFonts.GetEntryCount() > 0)
@@ -2118,7 +2118,7 @@ void SmSymDefineDialog::InitColor_Impl()
#endif
ColorData nBgCol = COL_WHITE,
nTxtCol = COL_BLACK;
- BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if (bHighContrast)
{
const StyleSettings &rS = GetSettings().GetStyleSettings();
@@ -2170,9 +2170,9 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
// USHORT nS = aSymbolMgrCopy.GetSymbolSetCount();
#endif
- // Das modified Flag der Kopie auf FALSE setzen, damit man spaeter damit
+ // Das modified Flag der Kopie auf false setzen, damit man spaeter damit
// testen kann ob sich was geaendert hat.
- aSymbolMgrCopy.SetModified(FALSE);
+ aSymbolMgrCopy.SetModified(false);
FillSymbolSets(aOldSymbolSets);
if (aOldSymbolSets.GetEntryCount() > 0)
@@ -2191,8 +2191,8 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
}
-BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
- const XubString &rSymbolSetName, BOOL bDeleteText)
+bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
+ const XubString &rSymbolSetName, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(&rComboBox == &aOldSymbolSets || &rComboBox == &aSymbolSets,
@@ -2206,18 +2206,18 @@ BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
// und evtl Abweichungen in der Eingabe beseitigen
rComboBox.SetText(aNormName);
- BOOL bRet = FALSE;
+ bool bRet = false;
USHORT nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
rComboBox.SetText(rComboBox.GetEntry(nPos));
- bRet = TRUE;
+ bRet = true;
}
else if (bDeleteText)
rComboBox.SetText(XubString());
- BOOL bIsOld = &rComboBox == &aOldSymbolSets;
+ bool bIsOld = &rComboBox == &aOldSymbolSets;
// setzen des SymbolSet Namens an der zugehoerigen Darstellung
FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
@@ -2226,7 +2226,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, false);
// bei Wechsel des SymbolSets fuer das alte Zeichen ein gueltiges
// Symbol bzw keins zur Anzeige bringen
@@ -2235,7 +2235,7 @@ BOOL SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
XubString aTmpOldSymbolName;
if (aOldSymbols.GetEntryCount() > 0)
aTmpOldSymbolName = aOldSymbols.GetEntry(0);
- SelectSymbol(aOldSymbols, aTmpOldSymbolName, TRUE);
+ SelectSymbol(aOldSymbols, aTmpOldSymbolName, true);
}
UpdateButtons();
@@ -2273,8 +2273,8 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
}
-BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
- const XubString &rSymbolName, BOOL bDeleteText)
+bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
+ const XubString &rSymbolName, bool bDeleteText)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(&rComboBox == &aOldSymbols || &rComboBox == &aSymbols,
@@ -2287,10 +2287,10 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
// und evtl Abweichungen in der Eingabe beseitigen
rComboBox.SetText(aNormName);
- BOOL bRet = FALSE;
+ bool bRet = false;
USHORT nPos = rComboBox.GetEntryPos(aNormName);
- BOOL bIsOld = &rComboBox == &aOldSymbols;
+ bool bIsOld = &rComboBox == &aOldSymbols;
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2303,8 +2303,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(), false);
+ SelectStyle(GetFontStyles().GetStyleName(rFont), 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
@@ -2318,7 +2318,7 @@ BOOL SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
}
}
- bRet = TRUE;
+ bRet = true;
}
else if (bDeleteText)
rComboBox.SetText(XubString());
@@ -2380,9 +2380,9 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
}
-BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
+bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
{
- BOOL bRet = FALSE;
+ bool bRet = false;
USHORT nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
@@ -2392,7 +2392,7 @@ BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
SelectStyle(aStyles.GetEntry(0));
if (bApplyFont)
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
- bRet = TRUE;
+ bRet = true;
}
else
aFonts.SetNoSelection();
@@ -2404,9 +2404,9 @@ BOOL SmSymDefineDialog::SelectFont(const XubString &rFontName, BOOL bApplyFont)
}
-BOOL SmSymDefineDialog::SelectStyle(const XubString &rStyleName, BOOL bApplyFont)
+bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont)
{
- BOOL bRet = FALSE;
+ bool bRet = false;
USHORT nPos = aStyles.GetEntryPos(rStyleName);
// falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
@@ -2419,7 +2419,7 @@ BOOL SmSymDefineDialog::SelectStyle(const XubString &rStyleName, BOOL bApplyFont
aStyles.SetText(aStyles.GetEntry(nPos));
if (bApplyFont)
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
- bRet = TRUE;
+ bRet = true;
}
else
aStyles.SetText(XubString());
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index d2d893f..2eee87e 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -133,7 +133,7 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&,
switch (((SfxSimpleHint&)rHint).GetId())
{
case HINT_FORMATCHANGED:
- SetFormulaArranged(FALSE);
+ SetFormulaArranged(false);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -168,12 +168,12 @@ void SmDocShell::SetText(const String& rBuffer)
if (rBuffer != aText)
{
- BOOL bIsEnabled = IsEnableSetModified();
+ bool bIsEnabled = IsEnableSetModified();
if( bIsEnabled )
- EnableSetModified( FALSE );
+ EnableSetModified( false );
aText = rBuffer;
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( false );
Parse();
@@ -189,7 +189,7 @@ void SmDocShell::SetText(const String& rBuffer)
if ( bIsEnabled )
EnableSetModified( bIsEnabled );
- SetModified(TRUE);
+ SetModified(true);
// launch accessible event if necessary
SmGraphicAccessible *pAcc = pViewSh ? pViewSh->GetGraphicWindow().GetAccessible_Impl() : 0;
@@ -213,8 +213,8 @@ void SmDocShell::SetFormat(SmFormat& rFormat)
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" );
aFormat = rFormat;
- SetFormulaArranged( FALSE );
- SetModified( TRUE );
+ SetFormulaArranged( false );
+ SetModified( true );
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -252,7 +252,7 @@ void SmDocShell::Parse()
ReplaceBadChars();
pTree = aInterpreter.Parse(aText);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( false );
InvalidateCursor();
}
@@ -306,7 +306,7 @@ void SmDocShell::ArrangeFormula()
pOutDev->SetLayoutMode( nLayoutMode );
pOutDev->SetDigitLanguage( nDigitLang );
- SetFormulaArranged(TRUE);
+ SetFormulaArranged(true);
// invalidate accessible text
aAccText = String();
@@ -398,7 +398,7 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine = new EditEngine( pEditEngineItemPool );
- pEditEngine->EnableUndo( TRUE );
+ pEditEngine->EnableUndo( true );
pEditEngine->SetDefTab( USHORT(
Application::GetDefaultDevice()->GetTextWidth( C2S("XXXX") ) ) );
@@ -437,7 +437,7 @@ SfxItemPool& SmDocShell::GetEditEngineItemPool()
return *pEditEngineItemPool;
}
-void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, BOOL bDrawSelection)
+void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSelection)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
@@ -463,13 +463,13 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, BOOL bDrawSel
//! 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;
+ bool bRestoreDrawMode = false;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
{
nOldDrawMode = rDev.GetDrawMode();
rDev.SetDrawMode( DRAWMODE_DEFAULT );
- bRestoreDrawMode = TRUE;
+ bRestoreDrawMode = true;
}
// format/draw formulas always from left to right
@@ -663,7 +663,7 @@ void SmDocShell::SetPrinter( SfxPrinter *pNew )
delete pPrinter;
pPrinter = pNew; //Eigentumsuebergang!
pPrinter->SetMapMode( MapMode(MAP_100TH_MM) );
- SetFormulaArranged(FALSE);
+ SetFormulaArranged(false);
Repaint();
}
@@ -672,11 +672,11 @@ void SmDocShell::OnDocumentPrinterChanged( Printer *pPrt )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::OnDocumentPrinterChanged" );
pTmpPrinter = pPrt;
- SetFormulaArranged(FALSE);
+ SetFormulaArranged(false);
Size aOldSize = GetVisArea().GetSize();
Repaint();
if( aOldSize != GetVisArea().GetSize() && aText.Len() )
- SetModified( TRUE );
+ SetModified( true );
pTmpPrinter = 0;
}
@@ -684,11 +684,11 @@ void SmDocShell::Repaint()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Repaint" );
- BOOL bIsEnabled = IsEnableSetModified();
+ bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
- EnableSetModified( FALSE );
+ EnableSetModified( false );
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( false );
Size aVisSize = GetSize();
SetVisAreaSize( aVisSize );
@@ -709,7 +709,7 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
pPrinter ( 0 ),
pTmpPrinter ( 0 ),
nModifyCount ( 0 ),
- bIsFormulaArranged ( FALSE )
+ bIsFormulaArranged ( false )
{
pCursor = NULL;
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SmDocShell" );
@@ -753,7 +753,7 @@ BOOL SmDocShell::SetData( const String& rData )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
SetText( rData );
- return TRUE;
+ return true;
}
@@ -761,7 +761,7 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
- BOOL bSuccess = FALSE;
+ bool bSuccess = false;
const String& rFltName = rMedium.GetFilter()->GetFilterName();
OSL_ENSURE( !rFltName.EqualsAscii( STAROFFICE_XML ), "Wrong filter!");
@@ -785,12 +785,12 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
if ( SotStorage::IsStorageFile( pStream ) )
{
- SvStorageRef aStorage = new SotStorage( pStream, FALSE );
+ SvStorageRef aStorage = new SotStorage( pStream, false );
if ( aStorage->IsStream( C2S( "Equation Native" ) ) )
{
// is this a MathType Storage?
MathType aEquation( aText );
- if ( TRUE == (bSuccess = (1 == aEquation.Parse( aStorage )) ))
+ if ( true == (bSuccess = (1 == aEquation.Parse( aStorage )) ))
Parse();
}
}
@@ -799,7 +799,7 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( false );
Repaint();
}
@@ -812,10 +812,10 @@ BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
- BOOL bRet = FALSE;
+ bool bRet = false;
if ( SfxObjectShell::InitNew( xStorage ) )
{
- bRet = TRUE;
+ bRet = true;
SetVisArea(Rectangle(Point(0, 0), Size(2000, 1000)));
}
return bRet;
@@ -826,7 +826,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
- BOOL bRet = FALSE;
+ bool bRet = false;
if( SfxObjectShell::Load( rMedium ))
{
uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage();
@@ -853,7 +853,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
{
- SetFormulaArranged( FALSE );
+ SetFormulaArranged( false );
Repaint();
}
@@ -883,7 +883,7 @@ BOOL SmDocShell::Save()
return aEquation.Export(*GetMedium());
}
- return FALSE;
+ return false;
}
/*
@@ -938,7 +938,7 @@ BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
- BOOL bRet = FALSE;
+ bool bRet = false;
//! apply latest changes if necessary
UpdateText();
@@ -962,7 +962,7 @@ BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
- BOOL bRet = FALSE;
+ bool bRet = false;
const SfxFilter* pFlt = rMedium.GetFilter();
if( pFlt )
{
@@ -997,9 +997,9 @@ BOOL SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::s
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
if( SfxObjectShell::SaveCompleted( xStorage ))
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
@@ -1028,7 +1028,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_AUTO_REDRAW :
{
SmModule *pp = SM_MOD();
- BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
+ bool bRedraw = pp->GetConfig()->IsAutoRedraw();
pp->GetConfig()->SetAutoRedraw(!bRedraw);
}
break;
@@ -1164,7 +1164,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
USHORT 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, false, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
BOOL (SfxUndoManager:: *fnDo)( USHORT );
@@ -1224,7 +1224,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_AUTO_REDRAW :
{
SmModule *pp = SM_MOD();
- BOOL bRedraw = pp->GetConfig()->IsAutoRedraw();
+ bool bRedraw = pp->GetConfig()->IsAutoRedraw();
rSet.Put(SfxBoolItem(SID_AUTO_REDRAW, bRedraw));
}
@@ -1348,21 +1348,21 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea)
if (! aNewRect.Right()) aNewRect.Right() = 2000;
if (! aNewRect.Bottom()) aNewRect.Bottom() = 1000;
- BOOL bIsEnabled = IsEnableSetModified();
+ bool bIsEnabled = IsEnableSetModified();
if ( bIsEnabled )
- EnableSetModified( FALSE );
+ EnableSetModified( 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;
+ bool bUnLockFrame;
if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED && !IsInPlaceActive() && GetFrame() )
{
GetFrame()->LockAdjustPosSizePixel();
- bUnLockFrame = TRUE;
+ bUnLockFrame = true;
}
else
- bUnLockFrame = FALSE;
+ bUnLockFrame = false;
SfxObjectShell::SetVisArea( aNewRect );
@@ -1417,13 +1417,13 @@ void SmDocShell::SetModified(BOOL bModified)
}
}
-BOOL SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
+bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::WriteAsMathType3" );
MathType aEquation( aText, pTree );
- BOOL bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
+ bool bRet = 0 != aEquation.ConvertFromStarMath( rMedium );
return bRet;
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index cf2c186..1218ae5 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -118,7 +118,7 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
SetMapMode(MAP_PIXEL);
// Even RTL languages don't use RTL for math
- rCmdBox.GetEditWindow()->EnableRTL( FALSE );
+ rCmdBox.GetEditWindow()->EnableRTL( false );
ApplyColorConfigValues( SM_MOD()->GetColorConfig() );
@@ -351,7 +351,7 @@ void SmEditWindow::MouseButtonDown(const MouseEvent &rEvt)
void SmEditWindow::Command(const CommandEvent& rCEvt)
{
- BOOL bForwardEvt = TRUE;
+ bool bForwardEvt = true;
if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
{
GetParent()->ToTop();
@@ -379,7 +379,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
pPopupMenu->Execute( this, aPoint );
delete pPopupMenu;
- bForwardEvt = FALSE;
+ bForwardEvt = false;
}
else if (rCEvt.GetCommand() == COMMAND_WHEEL)
bForwardEvt = !HandleWheelCommands( rCEvt );
@@ -394,9 +394,9 @@ void SmEditWindow::Command(const CommandEvent& rCEvt)
}
-BOOL SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
+bool SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
{
- BOOL bCommandHandled = FALSE; // true if the CommandEvent needs not
+ bool bCommandHandled = false; // true if the CommandEvent needs not
// to be passed on (because it has fully
// been taken care of).
@@ -404,7 +404,7 @@ BOOL SmEditWindow::HandleWheelCommands( const CommandEvent &rCEvt )
if (pWData)
{
if (COMMAND_WHEEL_ZOOM == pWData->GetMode())
- bCommandHandled = TRUE; // no zooming in Command window
+ bCommandHandled = true; // no zooming in Command window
else
bCommandHandled = HandleScrollCommand( rCEvt, pHScrollBar, pVScrollBar);
}
@@ -428,7 +428,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
{
if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
{
- BOOL bCallBase = TRUE;
+ bool bCallBase = true;
SfxViewShell* pViewShell = GetView();
if ( pViewShell && pViewShell->ISA(SmViewShell) )
{
@@ -508,8 +508,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( true );
+ pHScrollBar->EnableDrag( true );
pEditView->SetOutputArea(AdjustScrollBars());
@@ -517,7 +517,7 @@ void SmEditWindow::CreateEditView()
pEditView->SetSelection(eSelection);
Update();
- pEditView->ShowCursor(TRUE, TRUE);
+ pEditView->ShowCursor(true, true);
pEditEngine->SetStatusEventHdl( LINK(this, SmEditWindow, EditStatusHdl) );
SetPointer(pEditView->GetPointer());
@@ -669,7 +669,7 @@ void SmEditWindow::GetFocus()
//Let SmViewShell know we got focus
if(GetView() && IsInlineEditEnabled())
- GetView()->SetInsertIntoEditWindow(TRUE);
+ GetView()->SetInsertIntoEditWindow(true);
}
@@ -691,9 +691,9 @@ void SmEditWindow::LoseFocus()
}
-BOOL SmEditWindow::IsAllSelected() const
+bool SmEditWindow::IsAllSelected() const
{
- BOOL bRes = FALSE;
+ bool bRes = false;
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
OSL_ENSURE( pEditView, "NULL pointer" );
OSL_ENSURE( pEditEngine, "NULL pointer" );
@@ -841,7 +841,7 @@ void SmEditWindow::SelPrevMark()
}
}
-BOOL SmEditWindow::HasMark(const String& rText) const
+bool SmEditWindow::HasMark(const String& rText) const
// returns true iff 'rText' contains a mark
{
return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND;
@@ -882,17 +882,16 @@ void SmEditWindow::SetSelection(const ESelection &rSel)
InvalidateSlots();
}
-BOOL SmEditWindow::IsEmpty() const
+bool SmEditWindow::IsEmpty() const
{
EditEngine *pEditEngine = ((SmEditWindow *) this)->GetEditEngine();
- BOOL bEmpty = sal::static_int_cast< BOOL >(
- pEditEngine ? pEditEngine->GetTextLen() == 0 : FALSE);
+ bool bEmpty = ( pEditEngine ? pEditEngine->GetTextLen() == 0 : false);
return bEmpty;
}
-BOOL SmEditWindow::IsSelected() const
+bool SmEditWindow::IsSelected() const
{
- return pEditView ? pEditView->HasSelection() : FALSE;
+ return pEditView ? pEditView->HasSelection() : false;
}
void SmEditWindow::Cut()
@@ -901,7 +900,7 @@ void SmEditWindow::Cut()
if (pEditView)
{
pEditView->Cut();
- GetDoc()->SetModified( TRUE );
+ GetDoc()->SetModified( true );
}
}
@@ -918,7 +917,7 @@ void SmEditWindow::Paste()
if (pEditView)
{
pEditView->Paste();
- GetDoc()->SetModified( TRUE );
+ GetDoc()->SetModified( true );
}
}
@@ -928,7 +927,7 @@ void SmEditWindow::Delete()
if (pEditView)
{
pEditView->DeleteSelected();
- GetDoc()->SetModified( TRUE );
+ GetDoc()->SetModified( true );
}
}
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 0594bbf..3b42395 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -115,7 +115,7 @@ SmFormat::SmFormat()
eHorAlign = AlignCenter;
nGreekCharStyle = 0;
- bIsTextmode = bScaleNormalBrackets = FALSE;
+ bIsTextmode = bScaleNormalBrackets = false;
vSize[SIZ_TEXT] = 100;
vSize[SIZ_INDEX] = 60;
@@ -170,18 +170,18 @@ SmFormat::SmFormat()
for ( USHORT i = FNT_BEGIN; i <= FNT_END; i++ )
{
SmFace &rFace = vFont[i];
- rFace.SetTransparent( TRUE );
+ rFace.SetTransparent( true );
rFace.SetAlign( ALIGN_BASELINE );
rFace.SetColor( COL_AUTO );
- bDefaultFont[i] = FALSE;
+ bDefaultFont[i] = false;
}
}
-void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont, BOOL bDefault )
+void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault )
{
vFont[nIdent] = rFont;
- vFont[nIdent].SetTransparent( TRUE );
+ vFont[nIdent].SetTransparent( true );
vFont[nIdent].SetAlign( ALIGN_BASELINE );
bDefaultFont[nIdent] = bDefault;
@@ -211,9 +211,9 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
}
-BOOL SmFormat::operator == (const SmFormat &rFormat) const
+bool SmFormat::operator == (const SmFormat &rFormat) const
{
- BOOL bRes = aBaseSize == rFormat.aBaseSize &&
+ bool bRes = aBaseSize == rFormat.aBaseSize &&
eHorAlign == rFormat.eHorAlign &&
nGreekCharStyle == rFormat.nGreekCharStyle &&
bIsTextmode == rFormat.bIsTextmode &&
@@ -223,18 +223,18 @@ BOOL SmFormat::operator == (const SmFormat &rFormat) const
for (i = 0; i <= SIZ_END && bRes; ++i)
{
if (vSize[i] != rFormat.vSize[i])
- bRes = FALSE;
+ bRes = false;
}
for (i = 0; i <= DIS_END && bRes; ++i)
{
if (vDist[i] != rFormat.vDist[i])
- bRes = FALSE;
+ bRes = false;
}
for (i = 0; i <= FNT_END && bRes; ++i)
{
if (vFont[i] != rFormat.vFont[i] ||
bDefaultFont[i] != rFormat.bDefaultFont[i])
- bRes = FALSE;
+ bRes = false;
}
return bRes;
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 00ad280..0cf220b 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -662,8 +662,8 @@ void SmXMLExport::_ExportContent()
if (pDocShell)
{
SmParser &rParser = pDocShell->GetParser();
- BOOL bVal = rParser.IsExportSymbolNames();
- rParser.SetExportSymbolNames( TRUE );
+ bool bVal = rParser.IsExportSymbolNames();
+ rParser.SetExportSymbolNames( true );
SmNode *pTmpTree = rParser.Parse( aText );
aText = rParser.GetText();
delete pTmpTree;
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 7fdd931..21b34cf 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -242,7 +242,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", false );
}
if (xStatusIndicator.is())
@@ -591,8 +591,8 @@ void SmXMLImport::endDocument(void)
// Convert symbol names
SmParser &rParser = pDocShell->GetParser();
- BOOL bVal = rParser.IsImportSymbolNames();
- rParser.SetImportSymbolNames( TRUE );
+ bool bVal = rParser.IsImportSymbolNames();
+ rParser.SetImportSymbolNames( true );
SmNode *pTmpTree = rParser.Parse( aText );
aText = rParser.GetText();
delete pTmpTree;
@@ -1688,13 +1688,13 @@ public:
class SmXMLMultiScriptsContext_Impl : public SmXMLSubSupContext_Impl
{
- sal_Bool bHasPrescripts;
+ bool bHasPrescripts;
public:
SmXMLMultiScriptsContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
const OUString& rLName) :
SmXMLSubSupContext_Impl(rImport,nPrefix,rLName),
- bHasPrescripts(FALSE) {}
+ bHasPrescripts(false) {}
void EndElement();
void MiddleElement();
@@ -2453,7 +2453,7 @@ SvXMLImportContext *SmXMLMultiScriptsContext_Impl::CreateChildContext(
void SmXMLMultiScriptsContext_Impl::MiddleElement()
{
- bHasPrescripts=sal_True;
+ bHasPrescripts=true;
OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount > 0,
"Sub has no arguments");
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 9721fad..90acfb7 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -122,7 +122,7 @@ void MathType::Init()
sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
sal_uInt8 nTypeFace)
{
- sal_Bool bRet=FALSE;
+ bool bRet=false;
const char *pC = NULL;
switch(nChar)
{
@@ -156,56 +156,56 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
}
break;
case 0x00fb:
if ((nVersion < 3) && (nTypeFace == 0x81))
nChar = 0xDF;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 'a':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b1;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 'b':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3b2;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 'l':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bb;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 'n':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3bd;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 'r':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x3c1;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 'D':
if ((nVersion < 3) && (nTypeFace == 0x84))
nChar = 0x394;
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 0xa9:
if ((nVersion < 3) && (nTypeFace == 0x82))
nChar = '\'';
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
case 0x00f1:
if ((nVersion < 3) && (nTypeFace == 0x86))
@@ -213,7 +213,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
}
break;
case 0x00a3:
@@ -222,7 +222,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
}
break;
case 0x00de:
@@ -231,7 +231,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
}
break;
case 0x0057:
@@ -240,7 +240,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
else
{
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
}
break;
case 0x007b:
@@ -496,7 +496,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
case 0xe083:
rRet.Append('+');
- bRet=TRUE;
+ bRet=true;
break;
case '^':
case 0xe091:
@@ -516,7 +516,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=true;
break;
case 0xef04: //tiny space
case 0xef05: //tiny space
@@ -532,7 +532,7 @@ sal_Bool MathType::LookupChar(sal_Unicode nChar,String &rRet,sal_uInt8 nVersion,
break;
default:
rRet.Append(nChar);
- bRet=TRUE;
+ bRet=true;
break;
}
if (pC)
@@ -637,7 +637,7 @@ static void lcl_PrependDummyTerm(String &rRet, xub_StrLen &rTextStart)
static void lcl_AppendDummyTerm(String &rRet)
{
- sal_Bool bOk=sal_False;
+ bool bOk=false;
for(int nI=rRet.Len()-1;nI >= 0; nI--)
{
xub_StrLen nIdx = sal::static_int_cast< xub_StrLen >(nI);
@@ -645,7 +645,7 @@ static void lcl_AppendDummyTerm(String &rRet)
if (nChar == ' ')
continue;
if (rRet.GetChar(nIdx) != '{')
- bOk=sal_True;
+ bOk=true;
break;
}
if (!bOk) //No term, use dummy
@@ -677,12 +677,12 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
sal_Char nChar8;
String sFontName;
int i,nRet=1,newline=0;
- sal_Bool bSilent=FALSE;
+ bool bSilent=false;
int nPart=0;
String sPush,sMainTerm;
int nSetSize=0,nSetAlign=0;
int nCurRow=0,nCurCol=0;
- sal_Bool bOpenString=FALSE;
+ bool bOpenString=false;
xub_StrLen nTextStart = 0;
xub_StrLen nSubSupStartPos = 0;
xub_StrLen nLastTemplateBracket=STRING_NOTFOUND;
@@ -704,12 +704,12 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*/
if ((nRecord == CHAR) && (!bIsSilent) && (!bOpenString))
{
- bOpenString=TRUE;
+ bOpenString=true;
nTextStart = rRet.Len();
}
else if ((nRecord != CHAR) && (bOpenString))
{
- bOpenString=FALSE;
+ bOpenString=false;
if ((rRet.Len() - nTextStart) > 1)
{
String aStr;
@@ -1282,19 +1282,19 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
nRet = HandleRecords(nLevel+1);
while (nSetSize)
{
- sal_Bool bOk=sal_False;
+ bool bOk=false;
xub_StrLen nI = rRet.SearchBackward('{');
if (nI != STRING_NOTFOUND)
{
for(nI=nI+1;nI<rRet.Len();nI++)
if (rRet.GetChar(nI) != ' ')
{
- bOk=sal_True;
+ bOk=true;
break;
}
}
else
- bOk=sal_True;
+ bOk=true;
if (bOk)
APPEND(rRet,"} ");
@@ -1407,19 +1407,19 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
((nVariation == 2) || (nVariation == 1)))
newline--;
- sal_Bool bOk=sal_False;
+ bool bOk=false;
xub_StrLen nI = rRet.SearchBackward('{');
if (nI != STRING_NOTFOUND)
{
for(nI=nI+1;nI<rRet.Len();nI++)
if (rRet.GetChar(nI) != ' ')
{
- bOk=sal_True;
+ bOk=true;
break;
}
}
else
- bOk=sal_True;
+ bOk=true;
if (bOk)
APPEND(rRet,"} ");
@@ -1701,7 +1701,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
default:
break;
}
- bSilent = TRUE; //Skip the optional brackets and/or
+ bSilent = true; //Skip the optional brackets and/or
//symbols that follow some of these
//records. Foo Data.
@@ -1748,7 +1748,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
*pS >> nTabType;
*pS >> nTabOffset;
}
- OSL_ENSURE(FALSE,"Not seen in the wild Equation Ruler Field");
+ OSL_ENSURE(false,"Not seen in the wild Equation Ruler Field");
break;
case FONT:
{
@@ -1853,7 +1853,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;
+ bool bRet=false;
if (nLstSize < 0)
{
if ((-nLstSize/32 != nDefaultSize) && (-nLstSize/32 != nCurSize))
@@ -1862,7 +1862,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
{
rSetSize--;
rRet += '}';
- bRet=TRUE;
+ bRet=true;
}
if (-nLstSize/32 != nLastSize)
{
@@ -1870,7 +1870,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=true;
rSetSize++;
}
nCurSize = -nLstSize/32;
@@ -1891,7 +1891,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
{
rSetSize--;
rRet += '}';
- bRet=TRUE;
+ bRet=true;
}
if (nLstSize != nLastSize)
{
@@ -1899,7 +1899,7 @@ sal_Bool MathType::HandleSize(sal_Int16 nLstSize,sal_Int16 nDefSize, int &rSetSi
APPEND(rRet," size ");
rRet += String::CreateFromInt32(nLstSize);
rRet += '{';
- bRet=TRUE;
+ bRet=true;
rSetSize++;
}
nCurSize = nLstSize;
@@ -1916,7 +1916,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
SvStream *pStream = rMedium.GetOutStream();
if ( pStream )
{
- SvStorageRef pStor = new SotStorage( pStream, FALSE );
+ SvStorageRef pStor = new SotStorage( pStream, false );
SvGlobalName aGName(0x0002ce02L, 0x0000, 0x0000,0xc0,0x00,
0x00,0x00,0x00,0x00,0x00,0x46 );
@@ -1983,7 +1983,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium )
sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
- sal_Bool bRet=FALSE;
+ bool bRet=false;
switch(pNode->GetType())
{
case NATTRIBUT:
@@ -2742,14 +2742,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;
+ bool bRemove=false;
if ( (rSelector == 0xf) && (rLastTemplateBracket != STRING_NOTFOUND) )
{
- bRemove=TRUE;
+ bRemove=true;
for (xub_StrLen nI = rLastTemplateBracket+1; nI < rRet.Len(); nI++ )
if (rRet.GetChar(nI) != ' ')
{
- bRemove=FALSE;
+ bRemove=false;
break;
}
}
@@ -2989,7 +2989,7 @@ int MathType::HandleChar(xub_StrLen &rTextStart,int &rSetSize,int nLevel,
sal_Bool MathType::HandleLim(SmNode *pNode,int nLevel)
{
- sal_Bool bRet=0;
+ bool bRet=false;
//Special case for the "lim" option in StarMath
if ((pNode->GetToken().eType == TLIM)
|| (pNode->GetToken().eType == TLIMSUP)
@@ -3058,7 +3058,7 @@ sal_Bool MathType::HandleLim(SmNode *pNode,int nLevel)
}
HandleNodes(pNode->GetSubNode(1),nLevel+1);
//*pS << sal_uInt8(END); //options
- bRet = 1;
+ bRet = true;
}
}
return bRet;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 9af5027..073d12b 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -76,7 +76,7 @@ class SmTmpDevice
Color Impl_GetColor( const Color& rColor );
public:
- SmTmpDevice(OutputDevice &rTheDev, BOOL bUseMap100th_mm);
+ SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm);
~SmTmpDevice() { rOutDev.Pop(); }
void SetFont(const Font &rNewFont);
@@ -89,7 +89,7 @@ public:
};
-SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, BOOL bUseMap100th_mm) :
+SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm) :
rOutDev(rTheDev)
{
rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
@@ -154,9 +154,9 @@ SmNode::~SmNode()
}
-BOOL SmNode::IsVisible() const
+bool SmNode::IsVisible() const
{
- return FALSE;
+ return false;
}
@@ -184,7 +184,7 @@ SmNode * SmNode::GetLeftMost()
}
-void SmNode::SetPhantom(BOOL bIsPhantomP)
+void SmNode::SetPhantom(bool bIsPhantomP)
{
if (! (Flags() & FLG_VISIBLE))
bIsPhantom = bIsPhantomP;
@@ -326,7 +326,7 @@ void SmNode::SetSize(const Fraction &rSize)
}
-void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, BOOL bApplyToSubTree )
+void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree )
{
if (!(Flags() & FLG_HORALIGN))
eRectHorAlign = eHorAlign;
@@ -352,11 +352,11 @@ void SmNode::PrepareAttributes()
void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
#if OSL_DEBUG_LEVEL > 1
- bIsDebug = TRUE;
+ bIsDebug = true;
#else
- bIsDebug = FALSE;
+ bIsDebug = false;
#endif
- bIsPhantom = FALSE;
+ bIsPhantom = false;
nFlags = 0;
nAttributes = 0;
@@ -386,7 +386,7 @@ void SmNode::ToggleDebug() const
{
SmNode *pThis = (SmNode *) this;
- pThis->bIsDebug = bIsDebug ? FALSE : TRUE;
+ pThis->bIsDebug = bIsDebug ? false : true;
SmNode *pNode;
USHORT nSize = GetNumSubNodes();
@@ -718,9 +718,9 @@ void SmStructureNode::SetSubNodes(const SmNodeArray &rNodeArray)
}
-BOOL SmStructureNode::IsVisible() const
+bool SmStructureNode::IsVisible() const
{
- return FALSE;
+ return false;
}
@@ -754,9 +754,9 @@ void SmStructureNode::GetAccessibleText( String &rText ) const
///////////////////////////////////////////////////////////////////////////
-BOOL SmVisibleNode::IsVisible() const
+bool SmVisibleNode::IsVisible() const
{
- return TRUE;
+ return true;
}
@@ -887,7 +887,7 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// provide an empty rectangle with alignment parameters for the "current"
@@ -937,7 +937,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(), false);
}
@@ -946,7 +946,7 @@ void SmExpressionNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
void SmUnHorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- BOOL bIsPostfix = GetToken().eType == TFACT;
+ bool bIsPostfix = GetToken().eType == TFACT;
SmNode *pOper = GetSubNode(bIsPostfix ? 1 : 0),
*pBody = GetSubNode(bIsPostfix ? 0 : 1);
@@ -1060,7 +1060,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, true);
}
@@ -1129,7 +1129,7 @@ void SmBinVerNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
OSL_ENSURE(pLine, "Sm : NULL pointer");
OSL_ENSURE(pDenom, "Sm : NULL pointer");
- BOOL bIsTextmode = rFormat.IsTextmode();
+ bool bIsTextmode = rFormat.IsTextmode();
if (bIsTextmode)
{
Fraction aFraction(rFormat.GetRelSize(SIZ_INDEX), 100);
@@ -1204,14 +1204,14 @@ double Det(const Point &rHeading1, const Point &rHeading2)
}
-BOOL IsPointInLine(const Point &rPoint1,
+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 true genau dann, wenn der Punkt 'rPoint1' zu der Gerade gehoert die
// durch den Punkt 'rPoint2' geht und den Richtungsvektor 'rHeading2' hat
{
OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
- BOOL bRes = FALSE;
+ bool bRes = false;
const double eps = 5.0 * DBL_EPSILON;
double fLambda;
@@ -1266,7 +1266,7 @@ USHORT GetLineIntersectionPoint(Point &rResult,
SmBinDiagonalNode::SmBinDiagonalNode(const SmToken &rNodeToken)
: SmStructureNode(NBINDIAGONAL, rNodeToken)
{
- bAscending = FALSE;
+ bAscending = false;
SetNumSubNodes(3);
}
@@ -1416,7 +1416,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, true);
aTmpDev.SetFont(GetFont());
pLeft->Arrange(aTmpDev, rFormat);
@@ -1517,7 +1517,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pSubSup->Arrange(rDev, rFormat);
- BOOL bIsTextmode = rFormat.IsTextmode();
+ bool bIsTextmode = rFormat.IsTextmode();
nDist = 0;
//! be sure that CSUB, CSUP are handled before the other cases!
@@ -1565,12 +1565,12 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
aPos.Y() -= nDist;
break;
default :
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
break;
}
pSubSup->MoveTo(aPos);
- ExtendBy(*pSubSup, RCP_THIS, (BOOL) TRUE);
+ ExtendBy(*pSubSup, RCP_THIS, true);
// update rectangle to which RSUB, RSUP, LSUB, LSUP
// will be aligned to
@@ -1683,7 +1683,7 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pBody->Arrange(rDev, rFormat);
- BOOL bIsScaleNormal = rFormat.IsScaleNormalBrackets(),
+ bool bIsScaleNormal = rFormat.IsScaleNormalBrackets(),
bScale = pBody->GetHeight() > 0 &&
(GetScaleMode() == SCALE_HEIGHT || bIsScaleNormal),
bIsABS = GetToken().eType == TABS;
@@ -1787,7 +1787,7 @@ 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();
+ bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height();
USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
@@ -1809,7 +1809,7 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmRect::operator = (*pLeft);
for (i = 1; i < nNumSubNodes; i++)
{
- BOOL bIsSeparator = i % 2 != 0;
+ bool bIsSeparator = i % 2 != 0;
RectVerAlign eVerAlign = bIsSeparator ? RVA_CENTERY : RVA_BASELINE;
SmNode *pRight = GetSubNode(i);
@@ -1837,7 +1837,7 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
OSL_ENSURE(pBrace, "Sm: NULL pointer!");
OSL_ENSURE(pScript, "Sm: NULL pointer!");
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
pBody->Arrange(aTmpDev, rFormat);
@@ -2022,7 +2022,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, true);
}
@@ -2159,7 +2159,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(true); break;
case TBOLD : SetAttribut(ATTR_BOLD); break;
case TITALIC : SetAttribut(ATTR_ITALIC); break;
case TNBOLD : ClearAttribut(ATTR_BOLD); break;
@@ -2175,7 +2175,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
case TYELLOW : SetColor(Color(COL_YELLOW)); break;
default:
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
}
pNode->Arrange(rDev, rFormat);
@@ -2220,7 +2220,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, true);
aTmpDev.SetFont(GetFont());
long nBorderwidth = GetFont().GetBorderWidth();
@@ -2298,14 +2298,14 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
if (nWidth == 0)
nWidth = nFontHeight / 3;
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// add some borderspace
ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
nHeight += 2 * nTmpBorderWidth;
- //! use this method in order to have 'SmRect::HasAlignInfo() == TRUE'
+ //! use this method in order to have 'SmRect::HasAlignInfo() == true'
//! and thus having the attribut-fences updated in 'SmRect::ExtendBy'
SmRect::operator = (SmRect(nWidth, nHeight));
}
@@ -2362,7 +2362,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SIZ_FUNCTION : SIZ_TEXT;
GetFont() *= Fraction (rFormat.GetRelSize(nSizeDesc), 100);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, aText, GetFont().GetBorderWidth()));
@@ -2370,17 +2370,17 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmTextNode::CreateTextFromNode(String &rText)
{
- BOOL bQuoted=FALSE;
+ bool bQuoted=false;
if (GetToken().eType == TTEXT)
{
rText.Append('\"');
- bQuoted=TRUE;
+ bQuoted=true;
}
else
{
SmParser aParseTest;
SmNode *pTable = aParseTest.Parse(GetToken().aText);
- bQuoted=TRUE;
+ bQuoted=true;
if ( (pTable->GetType() == NTABLE) && (pTable->GetNumSubNodes() == 1) )
{
SmNode *pResult = pTable->GetSubNode(0);
@@ -2393,7 +2393,7 @@ void SmTextNode::CreateTextFromNode(String &rText)
{
pResult = pResult->GetSubNode(0);
if (pResult->GetType() == NTEXT)
- bQuoted=FALSE;
+ bQuoted=false;
}
}
}
@@ -2612,7 +2612,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
aFntSize.Width() = nWidth;
GetFont().SetSize(aFntSize);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// get denominator of error factor for width
@@ -2648,7 +2648,7 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
aFntSize.Height() = nHeight;
GetFont().SetSize(aFntSize);
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
// get denominator of error factor for height
@@ -2692,7 +2692,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, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, rText, GetFont().GetBorderWidth()));
@@ -2878,7 +2878,7 @@ void SmSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(), GetFont().GetBorderWidth()));
@@ -2891,7 +2891,7 @@ void SmGlyphSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rForm
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(),
@@ -2915,7 +2915,7 @@ void SmPlaceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
SmRect::operator = (SmRect(aTmpDev, &rFormat, GetText(), GetFont().GetBorderWidth()));
@@ -2939,7 +2939,7 @@ void SmErrorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- SmTmpDevice aTmpDev ((OutputDevice &) rDev, TRUE);
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
const XubString &rText = GetText();
@@ -2977,7 +2977,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, true);
aTmpDev.SetFont(GetFont());
// Abstand von der Fonthoehe abhaengig machen
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e77d3be..dc5f75e 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star::i18n;
///////////////////////////////////////////////////////////////////////////
-static inline BOOL strnccmp(const String &u1, xub_StrLen nIdx,
+static inline bool strnccmp(const String &u1, xub_StrLen nIdx,
const sal_Char *s2, xub_StrLen nLen)
{
return u1.EqualsIgnoreCaseAscii( s2, nIdx, nLen );
@@ -68,7 +68,7 @@ static const sal_Unicode aDelimiterTable[] =
};
-static inline BOOL IsDigit( sal_Unicode cChar )
+static inline bool IsDigit( sal_Unicode cChar )
{
return '0' <= cChar && cChar <= '9';
}
@@ -335,14 +335,14 @@ const SmTokenTableEntry * SmParser::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
+bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
+ // returns 'true' iff cChar is '\0' or a delimeter
{
OSL_ENSURE( nPos <= rTxt.Len(), "index out of range" );
sal_Unicode cChar = rTxt.GetChar( nPos );
if(!cChar)
- return TRUE;
+ return true;
// check if 'cChar' is in the delimeter table
const sal_Unicode *pDelim = &aDelimiterTable[0];
@@ -350,11 +350,11 @@ BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
if (*pDelim == cChar)
break;
- BOOL bIsDelim = *pDelim != 0;
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;
+ bool bIsDelim = (*pDelim != 0 ||
+ nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
+ nTypJp == com::sun::star::i18n::UnicodeType::CONTROL);
return bIsDelim;
}
@@ -408,8 +408,8 @@ void SmParser::NextToken()
xub_StrLen nBufLen = BufferString.Len();
ParseResult aRes;
xub_StrLen nRealStart;
- BOOL bCont;
- BOOL bNumStart = FALSE;
+ bool bCont;
+ bool bNumStart = false;
CharClass aCC(SM_MOD()->GetSysLocale().GetCharClass().getLocale());
do
{
@@ -449,7 +449,7 @@ void SmParser::NextToken()
nRealStart = BufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
BufferIndex = nRealStart;
- bCont = FALSE;
+ bCont = false;
if ( aRes.TokenType == 0 &&
nRealStart < nBufLen &&
'\n' == BufferString.GetChar( nRealStart ) )
@@ -457,7 +457,7 @@ void SmParser::NextToken()
// keep data needed for tokens row and col entry up to date
++Row;
BufferIndex = ColOff = nRealStart + 1;
- bCont = TRUE;
+ bCont = true;
}
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
@@ -469,7 +469,7 @@ void SmParser::NextToken()
while (BufferIndex < nBufLen &&
'\n' != BufferString.GetChar( BufferIndex ))
++BufferIndex;
- bCont = TRUE;
+ bCont = true;
}
}
@@ -481,7 +481,7 @@ void SmParser::NextToken()
CurToken.nRow = Row;
CurToken.nCol = nRealStart - ColOff + 1;
- BOOL bHandled = TRUE;
+ bool bHandled = true;
if (nRealStart >= nBufLen)
{
CurToken.eType = TEND;
@@ -660,7 +660,7 @@ void SmParser::NextToken()
}
break;
default:
- bHandled = FALSE;
+ bHandled = false;
}
}
}
@@ -953,12 +953,12 @@ void SmParser::NextToken()
}
break;
default:
- bHandled = FALSE;
+ bHandled = false;
}
}
}
else
- bHandled = FALSE;
+ bHandled = false;
if (!bHandled)
{
@@ -1012,7 +1012,7 @@ void SmParser::Align()
// parse alignment info (if any), then go on with rest of expression
{
SmStructureNode *pSNode = 0;
- BOOL bNeedGroupClose = FALSE;
+ bool bNeedGroupClose = false;
if (TokenInGroup(TGALIGN))
{
@@ -1020,7 +1020,7 @@ void SmParser::Align()
// encapsulate expression to be aligned in group braces
// (here group-open brace)
{ Insert('{', GetTokenIndex());
- bNeedGroupClose = TRUE;
+ bNeedGroupClose = true;
// get first valid align statement in sequence
// (the dominant one in 4.0) and erase all others (especially old
@@ -1102,12 +1102,12 @@ void SmParser::Line()
void SmParser::Expression()
{
- BOOL bUseExtraSpaces = TRUE;
+ bool bUseExtraSpaces = true;
SmNode *pNode = NodeStack.Pop();
if (pNode)
{
if (pNode->GetToken().eType == TNOSPACE)
- bUseExtraSpaces = FALSE;
+ bUseExtraSpaces = false;
else
NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
}
@@ -1180,7 +1180,7 @@ void SmParser::Product()
{ SmStructureNode *pSNode;
SmNode *pFirst = NodeStack.Pop(),
*pOper;
- BOOL bSwitchArgs = FALSE;
+ bool bSwitchArgs = false;
SmTokenType eType = CurToken.eType;
switch (eType)
@@ -1222,7 +1222,7 @@ void SmParser::Product()
pOper = new SmPolyLineNode(CurToken);
NextToken();
- bSwitchArgs =TRUE;
+ bSwitchArgs = true;
break;
}
@@ -1296,7 +1296,7 @@ void SmParser::SubSup(ULONG nActiveGroup)
case TLSUB : nIndex = (int) LSUB; break;
case TLSUP : nIndex = (int) LSUP; break;
default :
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
}
nIndex++;
OSL_ENSURE(1 <= nIndex && nIndex <= 1 + SUBSUP_NUM_ENTRIES,
@@ -1500,9 +1500,9 @@ void SmParser::Term()
|| TokenInGroup(TGFONTATTR))
{ SmStructureNodeArray aArray;
- BOOL bIsAttr;
+ bool bIsAttr;
USHORT n = 0;
- while (TRUE == (bIsAttr = TokenInGroup(TGATTRIBUT))
+ while (true == (bIsAttr = TokenInGroup(TGATTRIBUT))
|| TokenInGroup(TGFONTATTR))
{ aArray.resize(n + 1);
@@ -1688,7 +1688,7 @@ void SmParser::UnOper()
SmToken aNodeToken = CurToken;
SmTokenType eType = CurToken.eType;
- BOOL bIsPostfix = eType == TFACT;
+ bool bIsPostfix = eType == TFACT;
SmStructureNode *pSNode;
SmNode *pOper = 0,
@@ -1884,9 +1884,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)
+bool lcl_IsNumber(const UniString& rText)
{
- BOOL bPoint = FALSE;
+ bool bPoint = false;
const sal_Unicode* pBuffer = rText.GetBuffer();
for(xub_StrLen nPos = 0; nPos < rText.Len(); nPos++, pBuffer++)
{
@@ -1894,14 +1894,14 @@ BOOL lcl_IsNumber(const UniString& rText)
if(cChar == '.')
{
if(bPoint)
- return FALSE;
+ return false;
else
- bPoint = TRUE;
+ bPoint = true;
}
else if ( !IsDigit( cChar ) )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void SmParser::FontSize()
@@ -1996,7 +1996,7 @@ void SmParser::Brace()
pLeft = new SmMathSymbolNode(CurToken);
NextToken();
- Bracebody(TRUE);
+ Bracebody(true);
pBody = NodeStack.Pop();
if (CurToken.eType == TRIGHT)
@@ -2024,7 +2024,7 @@ void SmParser::Brace()
pLeft = new SmMathSymbolNode(CurToken);
NextToken();
- Bracebody(FALSE);
+ Bracebody(false);
pBody = NodeStack.Pop();
SmTokenType eExpectedType = TUNKNOWN;
@@ -2072,7 +2072,7 @@ void SmParser::Brace()
}
-void SmParser::Bracebody(BOOL bIsLeftRight)
+void SmParser::Bracebody(bool bIsLeftRight)
{
SmStructureNode *pBody = new SmBracebodyNode(CurToken);
SmNodeArray aNodes;
@@ -2288,7 +2288,7 @@ void SmParser::Matrix()
void SmParser::Special()
{
- BOOL bReplace = FALSE;
+ bool bReplace = false;
String &rName = CurToken.aText;
String aNewName;
@@ -2301,13 +2301,13 @@ void SmParser::Special()
{
const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetUiSymbolName( rName );
- bReplace = TRUE;
+ bReplace = true;
}
else if (IsExportSymbolNames())
{
const SmLocalizedSymbolData &rLSD = SM_MOD()->GetLocSymbolData();
aNewName = rLSD.GetExportSymbolName( rName );
- bReplace = TRUE;
+ bReplace = true;
}
}
else // 5.0 <-> 6.0 formula text (symbol name) conversion
@@ -2336,7 +2336,7 @@ void SmParser::Special()
if (pFrom->GetString(i) == rName)
{
aNewName = pTo->GetString(i);
- bReplace = TRUE;
+ bReplace = true;
}
}
}
@@ -2386,7 +2386,7 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
{
eConversion = CONVERT_NONE;
- bImportSymNames = bExportSymNames = FALSE;
+ bImportSymNames = bExportSymNames = false;
nLang = Application::GetSettings().GetUILanguage();
}
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 228d5c0..e484bba 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -62,19 +62,19 @@ static xub_Unicode __READONLY_DATA aMathAlpha[] =
xub_Unicode('\0')
};
-BOOL SmIsMathAlpha(const XubString &rText)
- // ergibt genau dann TRUE, wenn das Zeichen (aus dem StarMath Font) wie ein
+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 false;
OSL_ENSURE(rText.Len() == 1, "Sm : string must be exactly one character long");
xub_Unicode cChar = rText.GetChar(0);
// ist es ein griechisches Zeichen ?
if (xub_Unicode(0xE0AC) <= cChar && cChar <= xub_Unicode(0xE0D4))
- return TRUE;
+ return true;
else
{
// kommt es in 'aMathAlpha' vor ?
@@ -98,7 +98,7 @@ SmRect::SmRect()
OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: ooops...");
OSL_ENSURE(aSize == Size(0, 0), "Sm: ooops...");
- bHasBaseline = bHasAlignInfo = FALSE;
+ bHasBaseline = bHasAlignInfo = false;
nBaseline = nAlignT = nAlignM = nAlignB =
nGlyphTop = nGlyphBottom =
nItalicLeftSpace = nItalicRightSpace =
@@ -148,13 +148,13 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight());
const FontMetric aFM (rDev.GetFontMetric());
- BOOL bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
- BOOL bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
+ bool bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH );
+ bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText);
const long nFontHeight = rDev.GetFont().GetSize().Height();
nBorderWidth = nBorder;
- bHasAlignInfo = TRUE;
- bHasBaseline = TRUE;
+ bHasAlignInfo = true;
+ bHasBaseline = true;
nBaseline = aFM.GetAscent();
nAlignT = nBaseline - nFontHeight * 750L / 1000L;
nAlignM = nBaseline - nFontHeight * 121L / 422L;
@@ -188,7 +188,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
// get GlyphBoundRect
Rectangle aGlyphRect;
#if OSL_DEBUG_LEVEL > 1
- BOOL bSuccess =
+ bool bSuccess =
#endif
SmGetGlyphBoundRect(rDev, rText, aGlyphRect);
#if OSL_DEBUG_LEVEL > 1
@@ -262,8 +262,8 @@ SmRect::SmRect(long nWidth, long nHeight)
{
OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: ooops...");
- bHasBaseline = FALSE;
- bHasAlignInfo = TRUE;
+ bHasBaseline = false;
+ bHasAlignInfo = true;
nBaseline = 0;
nAlignT = GetTop();
nAlignB = GetBottom();
@@ -350,7 +350,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
+ GetItalicLeftSpace();
break;
default :
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
}
// check if horizontal position is already set
@@ -387,7 +387,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.Y() += rRect.GetLoAttrFence() - GetTop();
break;
default :
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
}
// check if vertical position is already set
@@ -404,7 +404,7 @@ const Point SmRect::AlignTo(const SmRect &rRect, RectPos ePos,
aPos.X() += rRect.GetItalicRight() - GetItalicRight();
break;
default :
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
}
return aPos;
@@ -495,7 +495,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode)
CopyMBL(rRect);
break;
default :
- OSL_ENSURE(FALSE, "Sm: unknown case");
+ OSL_ENSURE(false, "Sm: unknown case");
}
}
@@ -520,7 +520,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
- BOOL bKeepVerAlignParams)
+ 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
@@ -530,7 +530,7 @@ SmRect & SmRect::ExtendBy(const SmRect &rRect, RectCopyMBL eCopyMode,
nOldAlignM = GetAlignM(),
nOldAlignB = GetAlignB(),
nOldBaseline = nBaseline; //! depends not on 'HasBaseline'
- BOOL bOldHasAlignInfo = HasAlignInfo();
+ bool bOldHasAlignInfo = HasAlignInfo();
ExtendBy(rRect, eCopyMode);
@@ -552,7 +552,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
// rectangle.
// For simplicity the maximum-norm is used.
{
- BOOL bIsInside = IsInsideItalicRect(rPoint);
+ bool bIsInside = IsInsideItalicRect(rPoint);
// build reference point to define the distance
Point aRef;
@@ -590,7 +590,7 @@ long SmRect::OrientedDist(const Point &rPoint) const
}
-BOOL SmRect::IsInsideRect(const Point &rPoint) const
+bool SmRect::IsInsideRect(const Point &rPoint) const
{
return rPoint.Y() >= GetTop()
&& rPoint.Y() <= GetBottom()
@@ -599,7 +599,7 @@ BOOL SmRect::IsInsideRect(const Point &rPoint) const
}
-BOOL SmRect::IsInsideItalicRect(const Point &rPoint) const
+bool SmRect::IsInsideItalicRect(const Point &rPoint) const
{
return rPoint.Y() >= GetTop()
&& rPoint.Y() <= GetBottom()
@@ -696,7 +696,7 @@ void SmDrawFrame(OutputDevice &rDev, const Rectangle &rRec,
#endif //SM_RECT_DEBUG
-BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
+bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const XubString &rText, Rectangle &rRect)
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
// but with a string as argument.
@@ -705,7 +705,7 @@ BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
xub_StrLen nLen = rText.Len();
if (nLen == 0)
{ rRect.SetEmpty();
- return TRUE;
+ return true;
}
// get a device where 'OutputDevice::GetTextBoundRect' will be successful
@@ -743,7 +743,7 @@ BOOL SmGetGlyphBoundRect(const OutputDevice &rDev,
Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())),
aTmp;
- BOOL bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText, 0, 0);
+ bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText, 0, 0);
OSL_ENSURE( bSuccess, "GetTextBoundRect failed" );
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 417078a..a7404eb 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -199,9 +199,9 @@ SmFilterDetect::~SmFilterDetect()
{
// ctor of SfxMedium uses owner transition of ItemSet
SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ aMedium.UseInteractionHandler( true );
- BOOL bIsStorage = aMedium.IsStorage();
+ bool bIsStorage = aMedium.IsStorage();
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index bbfe37c..4ad8081 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -52,7 +52,7 @@
-BOOL SmDLL::bInitialized = FALSE;
+bool SmDLL::bInitialized = false;
/*************************************************************************
|*
@@ -64,7 +64,7 @@ void SmDLL::Init()
if ( bInitialized )
return;
- bInitialized = TRUE;
+ bInitialized = true;
SfxObjectFactory& rFactory = SmDocShell::Factory();
@@ -88,10 +88,10 @@ void SmDLL::Init()
SvxUndoRedoControl::RegisterControl( SID_REDO, pp );
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pp );
- SmToolBoxWrapper::RegisterChildWindow(TRUE);
- SmCmdBoxWrapper::RegisterChildWindow(TRUE);
+ SmToolBoxWrapper::RegisterChildWindow(true);
+ SmCmdBoxWrapper::RegisterChildWindow(true);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pp );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pp );
}
/*************************************************************************
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 5e2c62f..d828dc0 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -64,11 +64,11 @@ SmSym::SmSym() :
m_aName(C2S("unknown")),
m_aSetName(C2S("unknown")),
m_cChar('\0'),
- m_bPredefined(FALSE),
- m_bDocSymbol(FALSE)
+ m_bPredefined(false),
+ m_bDocSymbol(false)
{
m_aExportName = m_aName;
- m_aFace.SetTransparent(TRUE);
+ m_aFace.SetTransparent(true);
m_aFace.SetAlign(ALIGN_BASELINE);
}
@@ -80,18 +80,18 @@ SmSym::SmSym(const SmSym& rSymbol)
SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
- const String& rSet, BOOL bIsPredefined)
+ const String& rSet, bool bIsPredefined)
{
m_aName = m_aExportName = rName;
m_aFace = rFont;
- m_aFace.SetTransparent(TRUE);
+ m_aFace.SetTransparent(true);
m_aFace.SetAlign(ALIGN_BASELINE);
m_cChar = cChar;
m_aSetName = rSet;
m_bPredefined = bIsPredefined;
- m_bDocSymbol = FALSE;
+ m_bDocSymbol = false;
}
@@ -298,7 +298,7 @@ void SmSymbolManager::Load()
String aSymbolName( (sal_Unicode)'i' );
aSymbolName += rSym.GetName();
SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(),
- aSymbolSetName, TRUE /*bIsPredefined*/ );
+ aSymbolSetName, true /*bIsPredefined*/ );
AddOrReplaceSymbol( aSymbol );
}
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index 5cc134d..e61d3df 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -46,7 +46,7 @@
////////////////////////////////////////////////////////////
-static USHORT GetImageListRID( USHORT nCategoryRID, BOOL bHighContrast )
+static USHORT GetImageListRID( USHORT nCategoryRID, bool bHighContrast )
{
USHORT nRes = 0xFFFF;
switch (nCategoryRID)
@@ -188,7 +188,7 @@ SmViewShell * SmToolBoxWindow::GetView()
}
-const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContrast )
+const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, bool bHighContrast )
{
// creates the image list via its resource id and stores that
// list for later use in the respective array.
@@ -216,7 +216,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, BOOL bHighContra
void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
{
- BOOL bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( bHighContrast ? RID_ILH_CATALOG : RID_IL_CATALOG, bHighContrast );
@@ -243,12 +243,12 @@ void SmToolBoxWindow::DataChanged( const DataChangedEvent &rEvt )
void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
{
- static BOOL bSetPosition = TRUE;
+ static bool bSetPosition = true;
if (STATE_CHANGE_INITSHOW == nStateChange)
{
// calculate initial position to be used after creation of the window...
AdjustPosSize( bSetPosition );
- bSetPosition = FALSE;
+ bSetPosition = false;
SetCategory(RID_UNBINOPS_CAT);
}
@@ -257,7 +257,7 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
}
-void SmToolBoxWindow::AdjustPosSize( BOOL bSetPos )
+void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
{
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 5 ) );
@@ -310,8 +310,8 @@ BOOL SmToolBoxWindow::Close()
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
SID_TOOLBOX, SFX_CALLMODE_STANDARD,
- new SfxBoolItem(SID_TOOLBOX, FALSE), 0L);
- return TRUE;
+ new SfxBoolItem(SID_TOOLBOX, false), 0L);
+ return true;
}
void SmToolBoxWindow::GetFocus()
@@ -361,9 +361,9 @@ void SmToolBoxWindow::SetCategory(USHORT nCategoryRID)
SetOutputSizePixel( aWndSize );
if (nActiveCategoryRID)
- aToolBoxCat.CheckItem(nActiveCategoryRID, FALSE);
+ aToolBoxCat.CheckItem(nActiveCategoryRID, false);
nActiveCategoryRID = nCategoryRID;
- aToolBoxCat.CheckItem(nActiveCategoryRID, TRUE);
+ aToolBoxCat.CheckItem(nActiveCategoryRID, true);
pToolBoxCmd->Show();
}
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 1ca204e..8f916da 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -501,7 +501,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException();
- BOOL bVal = *(sal_Bool*)(*pValues).getValue();
+ bool bVal = *(sal_Bool*)(*pValues).getValue();
Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
@@ -517,7 +517,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException();
- BOOL bVal = *(sal_Bool*)(*pValues).getValue();
+ bool bVal = *(sal_Bool*)(*pValues).getValue();
Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
@@ -761,7 +761,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 );
+ bool bVal = IsItalic( rFace );
(*pValue).setValue(&bVal, *(*ppEntries)->mpType);
}
break;
@@ -774,7 +774,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?
+ bool bVal = IsBold( rFace ); // bold?
(*pValue).setValue(&bVal, *(*ppEntries)->mpType);
}
break;
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 71f1403..8b078da 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -156,7 +156,7 @@ void SmFontPickList::DestroyItem(void *pItem)
delete (Font *)pItem;
}
-BOOL SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem) const
+bool SmFontPickList::CompareItem(const void *pFirstItem, const void *pSecondItem) const
{
Font *pFirstFont, *pSecondFont;
@@ -168,9 +168,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 (true);
- return FALSE;
+ return false;
}
String SmFontPickList::GetStringItem(void *pItem)
@@ -309,7 +309,7 @@ void SmFontPickListBox::Remove(const Font &rFont)
////////////////////////////////////////
-BOOL IsItalic( const Font &rFont )
+bool IsItalic( const Font &rFont )
{
FontItalic eItalic = rFont.GetItalic();
// the code below leaves only _NONE and _DONTKNOW as not italic
@@ -317,7 +317,7 @@ BOOL IsItalic( const Font &rFont )
}
-BOOL IsBold( const Font &rFont )
+bool IsBold( const Font &rFont )
{
FontWeight eWeight = rFont.GetWeight();
return eWeight != WEIGHT_DONTKNOW && eWeight > WEIGHT_NORMAL;
@@ -327,7 +327,7 @@ BOOL IsBold( const Font &rFont )
void SmFace::Impl_Init()
{
SetSize( GetSize() );
- SetTransparent( TRUE );
+ SetTransparent( true );
SetAlign( ALIGN_BASELINE );
SetColor( COL_AUTO );
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 5c8581e..aee1d24 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -219,8 +219,8 @@ void SmGraphicWindow::GetFocus()
return;
pViewShell->GetEditWindow()->Flush();
//Let view shell know what insertions should be done in visual editor
- pViewShell->SetInsertIntoEditWindow(FALSE);
- SetIsCursorVisible(TRUE);
+ pViewShell->SetInsertIntoEditWindow(false);
+ SetIsCursorVisible(true);
RepaintViewShellDoc();
}
@@ -247,13 +247,13 @@ void SmGraphicWindow::RepaintViewShellDoc()
rDoc.Repaint();
}
-void SmGraphicWindow::ShowCursor(BOOL bShow)
- // shows or hides the formula-cursor depending on 'bShow' is TRUE or not
+void SmGraphicWindow::ShowCursor(bool bShow)
+ // shows or hides the formula-cursor depending on 'bShow' is true or not
{
if (IsInlineEditEnabled())
return;
- BOOL bInvert = bShow != IsCursorVisible();
+ bool bInvert = bShow != IsCursorVisible();
if (bInvert)
InvertTracking(aCursorRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW);
@@ -290,10 +290,10 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
SmModule *pp = SM_MOD();
if (IsCursorVisible())
- ShowCursor(FALSE); // clean up remainings of old cursor
+ ShowCursor(false); // clean up remainings of old cursor
aCursorRect = rRect;
if (pp->GetConfig()->IsShowFormulaCursor())
- ShowCursor(TRUE); // draw new cursor
+ ShowCursor(true); // draw new cursor
}
const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
@@ -316,7 +316,7 @@ const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
if (pNode)
SetCursor(pNode);
else
- ShowCursor(FALSE);
+ ShowCursor(false);
return pNode;
}
@@ -328,7 +328,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
SmDocShell &rDoc = *pViewShell->GetDoc();
Point aPoint;
- rDoc.DrawFormula(*this, aPoint, TRUE); //! modifies aPoint to be the topleft
+ rDoc.DrawFormula(*this, aPoint, true); //! modifies aPoint to be the topleft
//! corner of the formula
SetFormulaDrawPos(aPoint);
if(IsInlineEditEnabled()) {
@@ -336,7 +336,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
if(pViewShell->GetDoc()->HasCursor() && IsCursorVisible())
pViewShell->GetDoc()->GetCursor().Draw(*this, aPoint);
} else {
- SetIsCursorVisible(FALSE); // (old) cursor must be drawn again
+ SetIsCursorVisible(false); // (old) cursor must be drawn again
const SmEditWindow *pEdit = pViewShell->GetEditWindow();
if (pEdit)
@@ -349,7 +349,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
SmModule *pp = SM_MOD();
if (pFound && pp->GetConfig()->IsShowFormulaCursor())
- ShowCursor(TRUE);
+ ShowCursor(true);
}
}
}
@@ -480,7 +480,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
void SmGraphicWindow::Command(const CommandEvent& rCEvt)
{
- BOOL bCallBase = TRUE;
+ bool bCallBase = true;
if ( !pViewShell->GetViewFrame()->GetFrame().IsInPlace() )
{
switch ( rCEvt.GetCommand() )
@@ -501,7 +501,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
->ExecutePopup( aResId, this, &aPos );
delete pPopupMenu;
- bCallBase = FALSE;
+ bCallBase = false;
}
break;
@@ -516,7 +516,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
else
nTmpZoom += 10;
SetZoom( nTmpZoom );
- bCallBase = FALSE;
+ bCallBase = false;
}
}
break;
@@ -634,7 +634,7 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi
SfxDockingWindow(pBindings_, pChildWindow, pParent, SmResId(RID_CMDBOXWINDOW)),
aEdit (*this),
aController (aEdit, SID_TEXT, *pBindings_),
- bExiting (FALSE)
+ bExiting (false)
{
Hide ();
@@ -646,7 +646,7 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi
SmCmdBoxWindow::~SmCmdBoxWindow ()
{
aInitialFocusTimer.Stop();
- bExiting = TRUE;
+ bExiting = true;
}
@@ -764,7 +764,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 (true == IsFloatingMode())
AdjustPosition(); //! don't change pos in docking-mode !
aInitialFocusTimer.Start();
@@ -1274,7 +1274,7 @@ void SmViewShell::Impl_Print(
rOutDev.SetMapMode(OutputMapMode);
rOutDev.SetClipRegion(Region(aOutRect));
- GetDoc()->DrawFormula(rOutDev, aPos, FALSE);
+ GetDoc()->DrawFormula(rOutDev, aPos, false);
rOutDev.SetClipRegion();
rOutDev.Pop();
@@ -1392,14 +1392,14 @@ void SmViewShell::PrevError()
}
-BOOL SmViewShell::Insert( SfxMedium& rMedium )
+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;
+ bool bRet = false, bChkOldVersion = true;
uno::Reference < embed::XStorage > xStorage = rMedium.GetStorage();
uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY );
@@ -1407,7 +1407,7 @@ BOOL SmViewShell::Insert( SfxMedium& rMedium )
{
if ( xNameAccess->hasByName( C2S( "content.xml" ) ) || xNameAccess->hasByName( C2S( "Content.xml" ) ))
{
- bChkOldVersion = FALSE;
+ bChkOldVersion = 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() !!
@@ -1429,7 +1429,7 @@ BOOL SmViewShell::Insert( SfxMedium& rMedium )
}
pDoc->Parse();
- pDoc->SetModified(TRUE);
+ pDoc->SetModified(true);
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate(SID_GAPHIC_SM);
@@ -1439,11 +1439,11 @@ BOOL SmViewShell::Insert( SfxMedium& rMedium )
}
-BOOL SmViewShell::InsertFrom(SfxMedium &rMedium)
+bool SmViewShell::InsertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::InsertFrom" );
- BOOL bSuccess = FALSE;
+ bool bSuccess = false;
SmDocShell *pDoc = GetDoc();
SvStream *pStream = rMedium.GetInStream();
String aText( pDoc->GetText() );
@@ -1474,7 +1474,7 @@ BOOL SmViewShell::InsertFrom(SfxMedium &rMedium)
}
pDoc->Parse();
- pDoc->SetModified(TRUE);
+ pDoc->SetModified(true);
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate(SID_GAPHIC_SM);
@@ -1500,9 +1500,9 @@ void SmViewShell::Execute(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem;
- BOOL bVal;
+ bool bVal;
if ( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, FALSE, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState( SID_FORMULACURSOR, false, &pItem))
bVal = ((SfxBoolItem *) pItem)->GetValue();
else
bVal = !pp->GetConfig()->IsShowFormulaCursor();
@@ -1617,7 +1617,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_PASTE:
{
- BOOL bCallExec = 0 == pWin;
+ bool bCallExec = 0 == pWin;
if( !bCallExec )
{
TransferableDataHelper aDataHelper(
@@ -1628,7 +1628,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
aDataHelper.HasFormat( FORMAT_STRING ))
pWin->Paste();
else
- bCallExec = TRUE;
+ bCallExec = true;
}
if( bCallExec )
{
@@ -1769,7 +1769,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SVX_ZOOM_WHOLEPAGE:
{
const MapMode aMap( MAP_100TH_MM );
- SfxPrinter *pPrinter = GetPrinter( TRUE );
+ SfxPrinter *pPrinter = GetPrinter( true );
Point aPoint;
Rectangle OutputRect(aPoint, pPrinter->GetOutputSize());
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
@@ -1888,11 +1888,11 @@ void SmViewShell::GetState(SfxItemSet &rSet)
case SID_TOOLBOX:
{
- BOOL bState = FALSE;
+ bool bState = false;
SfxChildWindow *pChildWnd = GetViewFrame()->
GetChildWindow( SmToolBoxWrapper::GetChildWindowId() );
if (pChildWnd && pChildWnd->GetWindow()->IsVisible())
- bState = TRUE;
+ bState = true;
rSet.Put(SfxBoolItem(SID_TOOLBOX, bState));
}
break;
@@ -1990,7 +1990,7 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
}
}
- pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), TRUE ) );
+ pImpl->pRequest->SetReturnValue( SfxBoolItem( pImpl->pRequest->GetSlot(), true ) );
pImpl->pRequest->Done();
return 0;
}
@@ -2003,7 +2003,7 @@ void SmViewShell::Notify( SfxBroadcaster& , const SfxHint& rHint )
{
case SFX_HINT_MODECHANGED:
case SFX_HINT_DOCCHANGED:
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(false);
break;
default:
break;
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index dc5dd38..3681f47 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -458,7 +458,7 @@ class SmTmpDevice2
Color Impl_GetColor( const Color& rColor );
public:
- SmTmpDevice2( OutputDevice &rTheDev, BOOL bUseMap100th_mm );
+ SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm );
~SmTmpDevice2( ) { rOutDev.Pop( ); }
void SetFont( const Font &rNewFont );
@@ -471,7 +471,7 @@ public:
};
-SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, BOOL bUseMap100th_mm ) :
+SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm ) :
rOutDev( rTheDev )
{
rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
@@ -647,7 +647,7 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
DrawSpecialNode( pNode );
- SmTmpDevice2 aTmpDev( ( OutputDevice & ) rDev, TRUE );
+ SmTmpDevice2 aTmpDev( ( OutputDevice & ) rDev, true );
aTmpDev.SetFillColor( pNode->GetFont( ).GetColor( ) );
rDev.SetLineColor( );
aTmpDev.SetFont( pNode->GetFont( ) );
@@ -696,7 +696,7 @@ void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
aPos ( Position + aOffset );
pNode->GetPolygon( ).Move( aPos.X( ), aPos.Y( ) ); //Works because Polygon wraps a pointer
- SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, FALSE );
+ SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, false );
aTmpDev.SetLineColor( pNode->GetFont( ).GetColor( ) );
rDev.DrawPolyLine( pNode->GetPolygon( ), aInfo );
@@ -715,7 +715,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
if ( pNode->IsPhantom( ) )
return;
- SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, FALSE );
+ SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, false );
aTmpDev.SetFillColor( pNode->GetFont( ).GetColor( ) );
rDev.SetLineColor( );
aTmpDev.SetFont( pNode->GetFont( ) );
@@ -755,7 +755,7 @@ void SmDrawingVisitor::DrawTextNode( SmTextNode* pNode )
if ( pNode->IsPhantom( ) || pNode->GetText( ).Len( ) == 0 || pNode->GetText( ).GetChar( 0 ) == xub_Unicode( '\0' ) )
return;
- SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, FALSE );
+ SmTmpDevice2 aTmpDev ( ( OutputDevice & ) rDev, false );
aTmpDev.SetFont( pNode->GetFont( ) );
Point aPos ( Position );
@@ -829,8 +829,8 @@ void SmSetSelectionVisitor::DefaultVisit( SmNode* pNode )
IsSelecting = !IsSelecting;
//Cache current state
- BOOL WasSelecting = IsSelecting;
- BOOL ChangedState = FALSE;
+ bool WasSelecting = IsSelecting;
+ bool ChangedState = false;
//Set selected
pNode->SetSelected( IsSelecting );
@@ -1021,7 +1021,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmLineNode* pNode ){
void SmCaretPosGraphBuildingVisitor::Visit( SmTableNode* pNode ){
SmCaretPosGraphEntry *left = pRightMost,
*right = pGraph->Add( SmCaretPos( pNode, 1) );
- BOOL bIsFirst = TRUE;
+ bool bIsFirst = true;
SmNodeIterator it( pNode );
while( it.Next() ){
pRightMost = pGraph->Add( SmCaretPos( it.Current(), 0 ), left);
@@ -1031,7 +1031,7 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmTableNode* pNode ){
pRightMost->SetRight(right);
if(bIsFirst)
right->SetLeft(pRightMost);
- bIsFirst = FALSE;
+ bIsFirst = false;
}
pRightMost = right;
}
@@ -2047,7 +2047,7 @@ void SmCloningVisitor::Visit( SmVerticalBraceNode* pNode )
SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, Point Offset )
: rDev( rDevice ) {
- bHasSelectionArea = FALSE;
+ bHasSelectionArea = false;
//Visit everything
j_assert( pTree, "pTree can't be null!" );
--
1.7.2.3
--MP_/eD=ajeM4qLFkzaNMQlZamWx--
More information about the LibreOffice
mailing list