diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-11-08 14:19:22 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-11-16 16:52:45 +0100 |
commit | 1e61a6eaa7c31344c2eab1882acb2dff7b6cfea3 (patch) | |
tree | 7b9ea141131432510eaf36d0754806b09281193e /sw/inc | |
parent | e2f4289ff208ab067ab89bcd7aea8a75c3227be3 (diff) |
Remove sal_True/sal_False from code and comments in sw includes
Change-Id: Icfbbae898749196e27199802ec728417d5205bc5
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 2 | ||||
-rw-r--r-- | sw/inc/IDocumentFieldsAccess.hxx | 8 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 38 | ||||
-rw-r--r-- | sw/inc/dcontact.hxx | 2 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 24 | ||||
-rw-r--r-- | sw/inc/docstyle.hxx | 2 | ||||
-rw-r--r-- | sw/inc/docufld.hxx | 2 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/flddropdown.hxx | 4 | ||||
-rw-r--r-- | sw/inc/modcfg.hxx | 2 | ||||
-rw-r--r-- | sw/inc/ndnotxt.hxx | 2 | ||||
-rw-r--r-- | sw/inc/node.hxx | 24 | ||||
-rw-r--r-- | sw/inc/pagedesc.hxx | 4 | ||||
-rw-r--r-- | sw/inc/poolfmt.hxx | 4 | ||||
-rw-r--r-- | sw/inc/swatrset.hxx | 2 | ||||
-rw-r--r-- | sw/inc/swtable.hxx | 4 | ||||
-rw-r--r-- | sw/inc/tabcol.hxx | 2 | ||||
-rw-r--r-- | sw/inc/tox.hxx | 2 | ||||
-rw-r--r-- | sw/inc/viewopt.hxx | 106 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 14 |
20 files changed, 119 insertions, 133 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 2676a2f87e2d..dbdcd720bac2 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -185,7 +185,7 @@ public: an "empty" hint is inserted. If there is a selection the attribute is hard-formated and added to the node at rRg.Start(). If the attribute could not be inserted, the method returns - sal_False. + false. */ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, const sal_uInt16 nFlags,bool bExpandCharToPara=false) = 0; diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx index 556604783dbb..f0859a3afd51 100644 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ b/sw/inc/IDocumentFieldsAccess.hxx @@ -69,8 +69,8 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } @param rVal the value @param nMId - @retval sal_True putting of value was successful - @retval sal_False else + @retval true putting of value was successful + @retval false else */ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich) = 0; @@ -83,8 +83,8 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } @param pMsgHnt @param bUpdateTblFlds TRUE: update table fields, too. - @retval sal_True update was successful - @retval sal_False else + @retval true update was successful + @retval false else */ virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index db3a9a31c87b..e9ea1897e090 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -213,20 +213,20 @@ private: // (used in Invalidate by the Cursor) bool m_bCallChgLnk : 1; ///< flag for derived classes - // TRUE -> call ChgLnk + // true -> call ChgLnk // access only via SwChgLinkFlag bool m_bAllProtect : 1; ///< Flag for areas - // TRUE -> everything protected / hidden + // true -> everything protected / hidden bool m_bInCMvVisportChgd : 1; ///< Flag for CrsrMoves - // TRUE -> view was moved - bool m_bGCAttr : 1; // TRUE -> non expanded attributes exist. - bool m_bIgnoreReadonly : 1; // TRUE -> make the cursor visible on next + // true -> view was moved + bool m_bGCAttr : 1; // true -> non expanded attributes exist. + bool m_bIgnoreReadonly : 1; // true -> make the cursor visible on next // EndAction in spite of Readonly - bool m_bSelTblCells : 1; // TRUE -> select cells over the InputWin - bool m_bAutoUpdateCells : 1; // TRUE -> autoformat cells - bool m_bBasicHideCrsr : 1; // TRUE -> HideCrsr from Basic - bool m_bSetCrsrInReadOnly : 1;// TRUE -> Cursor is allowed in ReadOnly-Areas - bool m_bOverwriteCrsr : 1; // sal_True -> show Overwrite Crsr + bool m_bSelTblCells : 1; // true -> select cells over the InputWin + bool m_bAutoUpdateCells : 1; // true -> autoformat cells + bool m_bBasicHideCrsr : 1; // true -> HideCrsr from Basic + bool m_bSetCrsrInReadOnly : 1;// true -> Cursor is allowed in ReadOnly-Areas + bool m_bOverwriteCrsr : 1; // true -> show Overwrite Crsr bool m_bMacroExecAllowed : 1; @@ -419,8 +419,8 @@ public: /** Ensure point and mark of the current PaM are in a specific order. - @param bPointFirst TRUE: If the point is behind the mark then - swap the PaM. FALSE: If the mark is behind the point then swap + @param bPointFirst true: If the point is behind the mark then + swap the PaM. false: If the mark is behind the point then swap the PaM. */ void NormalizePam(bool bPointFirst = true); @@ -435,7 +435,7 @@ public: void Push(); /* * Delete a cursor (controlled by bOldCrsr) - * - from stack or (bOldCrsr = TRUE) + * - from stack or (bOldCrsr = true) * - delete the current one and replace it with the cursor from the * stack * Return: whether there was one left one the stack @@ -478,8 +478,8 @@ public: // Return current frame in which the cursor is placed. SwCntntFrm *GetCurrFrm( const bool bCalcFrm = true ) const; - //TRUE if cursor is hidden because of readonly. - //FALSE if it is working despite readonly. + //true if cursor is hidden because of readonly. + //false if it is working despite readonly. bool IsCrsrReadonly() const; // Cursor is placed in something that is protected or selection contains @@ -540,8 +540,8 @@ public: bool GetCharRectAt(SwRect& rRect, const SwPosition* pPos); // Return current page number: - // TRUE: in which cursor is located. - // FALSE: which is visible at the upper margin. + // true: in which cursor is located. + // false: which is visible at the upper margin. void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCrsrPos = true, const bool bCalcFrm = true ); // Determine how "empty pages" are handled @@ -667,7 +667,7 @@ public: // jump to the header/footer of the given or current PageDesc bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX, bool bInHeader = true ); - // is point of cursor in header/footer. pbInHeader return sal_True if it is + // is point of cursor in header/footer. pbInHeader return true if it is // in a headerframe otherwise in a footerframe bool IsInHeaderFooter( bool* pbInHeader = 0 ) const; @@ -695,7 +695,7 @@ public: bool ExtendSelection( bool bEnd = true, sal_Int32 nCount = 1 ); // Place only the visible cursor at the given position in the document. - // Return FALSE if SPoint was corrected by layout. + // Return false if SPoint was corrected by layout. // (This is needed for displaying the Drag&Drop/Copy-Cursor.) bool SetVisCrsr( const Point &rPt ); inline void UnSetVisCrsr(); diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 474d334962cd..5dcc8ca3e691 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -343,7 +343,7 @@ class SwDrawContact : public SwContact method <_Changed(..)> */ bool mbUserCallActive : 1; /** event type, which is handled for <mpSdrObjHandledByCurrentUserCall>. - Note: value only valid, if <mbUserCallActive> is sal_True. */ + Note: value only valid, if <mbUserCallActive> is true. */ SdrUserCallType meEventTypeOfCurrentUserCall; friend class NestedUserCallHdl; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 2de7b9990365..414965dd1be1 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -395,7 +395,7 @@ private: bool mbIsPrepareSelAll : 1; #ifdef DBG_UTIL - bool mbXMLExport : 1; //< sal_True: during XML export + bool mbXMLExport : 1; //< true: during XML export #endif // true: Document contains at least one anchored object, which is anchored AT_PAGE with a content position. @@ -659,12 +659,12 @@ public: // in FlySet/FrmFmt. /* new parameter bCalledFromShell - sal_True: An existing adjust item at pAnchorPos is propagated to + true: An existing adjust item at pAnchorPos is propagated to the content node of the new fly section. That propagation only takes place if there is no adjust item in the paragraph style for the new fly section. - sal_False: no propagation + false: no propagation */ SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType, const SwPosition* pAnchorPos, @@ -1168,12 +1168,12 @@ public: add output parameter <sListId> \param rPos position to start search - \param bForward - sal_True: search forward - - sal_False: search backward - \param bNum - sal_True: search for enumeration - - sal_False: search for itemize - \param bOutline - sal_True: search for outline numbering rule - - sal_False: search for non-outline numbering rule + \param bForward - true: search forward + - false: search backward + \param bNum - true: search for enumeration + - false: search for itemize + \param bOutline - true: search for outline numbering rule + - false: search for non-outline numbering rule \param nNonEmptyAllowed number of non-empty paragraphs allowed between rPos and found paragraph @@ -1216,11 +1216,11 @@ public: For AutoFormat at input: columns have to be set at predefined width. The array holds the positions of the columns (not their widths). new @param bCalledFromShell: - sal_True: called from shell -> propagate existing adjust item at + true: called from shell -> propagate existing adjust item at rPos to every new cell. A existing adjust item in the table heading or table contents paragraph style prevent that propagation. - sal_False: do not propagate + false: do not propagate */ const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER const SwPosition& rPos, sal_uInt16 nRows, @@ -1533,7 +1533,7 @@ public: @remarks A property is 'set' if it's set to the same value over all boxes in the current selection. The property value is retrieved from the first box in the current selection. It is then compared to the values of the same property over any other boxes in the selection; if any value is different from - that of the first box, the property is unset (and sal_False is returned). + that of the first box, the property is unset (and false is returned). */ bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ) const; void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign ); diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 086207704614..1aad77bebbf4 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -91,7 +91,7 @@ public: void SetGrabBagItem(const com::sun::star::uno::Any& rVal); void GetGrabBagItem(com::sun::star::uno::Any& rVal) const; - /** add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value sal_False, + /** add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value false, which indicates that the indent attributes at a paragraph style should be reset in case that a list style is applied to the paragraph style and no indent attributes are applied. */ diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 01753a40110a..d9f82942ab88 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -298,7 +298,7 @@ public: class SwHiddenTxtField : public SwField { - OUString aTRUETxt; ///< Text if condition sal_True. + OUString aTRUETxt; ///< Text if condition true. OUString aFALSETxt; ///< If condition false. OUString aContent; ///< Evaluated DB-text. diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index a9813962a5fd..b59cc50e94cc 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -223,7 +223,7 @@ public: @return attributes in required AttributeSet. When not unambiguous the set has a DONT_CARE !! 2nd optional parameter <bMergeIndentValuesOfNumRule>. - If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of + If <bMergeIndentValuesOfNumRule> == true, the indent attributes of the corresponding list level of an applied list style is merged into the requested item set as a LR-SPACE item, if corresponding node has not its own indent attributes and the position-and-space mode of the list @@ -468,7 +468,7 @@ public: if all paragraphs of the current selection have the same or none numbering rule applied. */ const SwNumRule* GetNumRuleAtCurrentSelection() const; - /** Optional parameter <bResetIndentAttrs> (default value sal_False). + /** Optional parameter <bResetIndentAttrs> (default value false). If <bResetIndentAttrs> equals true, the indent attributes "before text" and "first line indent" are additionally reset at the current selection, if the list style makes use of the new list level attributes. diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx index 129fac481920..4992d1e639e0 100644 --- a/sw/inc/flddropdown.hxx +++ b/sw/inc/flddropdown.hxx @@ -212,8 +212,8 @@ public: @param rItem the item to be set - @retval sal_True the selected item was successfully set - @retval sal_True failure (empty selection) + @retval true the selected item was successfully set + @retval false failure (empty selection) */ bool SetSelectedItem(const OUString & rItem); diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index c5546538ffe4..1e36115ae300 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -227,7 +227,7 @@ public: aRevisionConfig.SetModified();} bool IsInsWithCaption(bool bHTML) const - { return bHTML ? sal_False : aInsertConfig.bInsWithCaption; } + { return !bHTML && aInsertConfig.bInsWithCaption; } void SetInsWithCaption( bool bHTML, bool b ) { if(!bHTML) aInsertConfig.bInsWithCaption = b; diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index 23a9c05cc93a..33d52c8b5720 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -78,7 +78,7 @@ public: // set either a MM100 or pixel contour void SetContourAPI( const tools::PolyPolygon *pPoly ); - // get either a MM100 or pixel contour, return sal_False if no contour is set. + // get either a MM100 or pixel contour, return false if no contour is set. bool GetContourAPI( tools::PolyPolygon &rPoly ) const; void SetPixelContour( bool bSet ) { bPixelContour = bSet; } diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 1098a0f2cbee..a8c7f295e312 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -168,8 +168,8 @@ public: /** Checks if this node is in redlines. - @retval sal_True this node is in redlines - @retval sal_False else + @retval true this node is in redlines + @retval false else */ bool IsInRedlines() const; @@ -452,7 +452,7 @@ public: Access to SwAttrSet. */ inline const SwAttrSet &GetSwAttrSet() const; inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); } - inline bool HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; } + inline bool HasSwAttrSet() const { return mpAttrSet != nullptr; } virtual SwFmtColl* ChgFmtColl( SwFmtColl* ); SwFmtColl* GetFmtColl() const { return const_cast<SwFmtColl*>(static_cast<const SwFmtColl*>(GetRegisteredIn())); } @@ -628,39 +628,39 @@ inline const SwCntntNode *SwNode::GetCntntNode() const inline bool SwNode::IsStartNode() const { - return ND_STARTNODE & nNodeType ? sal_True : sal_False; + return (ND_STARTNODE & nNodeType) != 0; } inline bool SwNode::IsCntntNode() const { - return ND_CONTENTNODE & nNodeType ? sal_True : sal_False; + return (ND_CONTENTNODE & nNodeType) != 0; } inline bool SwNode::IsEndNode() const { - return ND_ENDNODE == nNodeType ? sal_True : sal_False; + return ND_ENDNODE == nNodeType; } inline bool SwNode::IsTxtNode() const { - return ND_TEXTNODE == nNodeType ? sal_True : sal_False; + return ND_TEXTNODE == nNodeType; } inline bool SwNode::IsTableNode() const { - return ND_TABLENODE == nNodeType ? sal_True : sal_False; + return ND_TABLENODE == nNodeType; } inline bool SwNode::IsSectionNode() const { - return ND_SECTIONNODE == nNodeType ? sal_True : sal_False; + return ND_SECTIONNODE == nNodeType; } inline bool SwNode::IsNoTxtNode() const { - return ND_NOTXTNODE & nNodeType ? sal_True : sal_False; + return (ND_NOTXTNODE & nNodeType) != 0; } inline bool SwNode::IsOLENode() const { - return ND_OLENODE == nNodeType ? sal_True : sal_False; + return ND_OLENODE == nNodeType; } inline bool SwNode::IsGrfNode() const { - return ND_GRFNODE == nNodeType ? sal_True : sal_False; + return ND_GRFNODE == nNodeType; } inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx index 58ab7a802f64..0f5e18bbd1d8 100644 --- a/sw/inc/pagedesc.hxx +++ b/sw/inc/pagedesc.hxx @@ -258,11 +258,11 @@ inline void SwPageDesc::SetFollow( const SwPageDesc* pNew ) inline bool SwPageDesc::IsHeaderShared() const { - return eUse & nsUseOnPage::PD_HEADERSHARE ? sal_True : sal_False; + return (eUse & nsUseOnPage::PD_HEADERSHARE) != 0; } inline bool SwPageDesc::IsFooterShared() const { - return eUse & nsUseOnPage::PD_FOOTERSHARE ? sal_True : sal_False; + return (eUse & nsUseOnPage::PD_FOOTERSHARE) != 0; } inline void SwPageDesc::ChgHeaderShare( bool bNew ) { diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx index 7f6a9d8d5b64..df029593b836 100644 --- a/sw/inc/poolfmt.hxx +++ b/sw/inc/poolfmt.hxx @@ -84,9 +84,7 @@ const sal_uInt16 POOL_IDUSER_FMT = inline bool IsPoolUserFmt( sal_uInt16 nId ) { - return POOL_IDUSER_FMT == - (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID)) - ? sal_True : sal_False; + return POOL_IDUSER_FMT == (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID)); } /// IDs for the ranges. diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index e9d9395b46f9..867f269e2d7a 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -216,7 +216,7 @@ public: const SwDoc *GetDoc() const { return GetPool()->GetDoc(); } SwDoc *GetDoc() { return GetPool()->GetDoc(); } - // Get methods: bool indicates whether to search only in Set (sal_False) + // Get methods: bool indicates whether to search only in Set (when false) // or also in parents. If nothing is found then default attribute is returned. // Character attributes. Implementation in charatr.hxx. inline const SvxPostureItem &GetPosture( bool = true ) const; diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index e0bab7383189..592eacb8d02f 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -115,7 +115,7 @@ protected: sal_uInt16 nRowsToRepeat; // Number of rows to repeat on every page. bool bModifyLocked :1; - bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel + bool bNewModel :1; // false: old SubTableModel; true: new RowSpanModel #ifdef DBG_UTIL /// This is set by functions (like Merge()) to forbid a late model change. bool m_bDontChangeModel; @@ -296,7 +296,7 @@ public: // Search all content-bearing boxes of the base line on which this box stands. // rBoxes as a return value for immediate use. // steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen - // bToTop = true -> up to base line, sal_False-> else only line of box. + // bToTop = true -> up to base line, false-> else only line of box. SwSelBoxes& SelLineFromBox( const SwTableBox* pBox, SwSelBoxes& rBoxes, bool bToTop = true ) const; diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index d152d5da2f85..72e495d563f7 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -30,7 +30,7 @@ struct SwTabColsEntry long nMin; long nMax; bool bHidden; // For each entry a flag, hidden or not. - // If the flag bHidden is sal_True column separator + // If the flag bHidden is true column separator // is not in current line. It must maintained // but it may not be displayed. }; diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 6cbb7e83d65b..2377f150e92e 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -220,7 +220,7 @@ struct SW_DLLPUBLIC SwFormToken sal_uInt16 nOutlineLevel;//the maximum permitted outline level in numbering sal_uInt16 nAuthorityField; //enum ToxAuthorityField sal_Unicode cTabFillChar; - bool bWithTab; // sal_True: do generate tab + bool bWithTab; // true: do generate tab // character only the tab stop // #i21237# diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index 2833f1104266..25c1d88cc106 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -202,34 +202,30 @@ public: inline bool IsTab(bool bHard = false) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard); } inline void SetTab( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); } inline bool IsBlank(bool bHard = false) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard); } inline void SetBlank( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); } inline bool IsHardBlank() const - { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; } + { return !bReadonly && (nCoreOptions & VIEWOPT_1_HARDBLANK) != 0; } inline void SetHardBlank( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); } inline bool IsParagraph(bool bHard = false) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard); } inline void SetParagraph( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); } inline bool IsLineBreak(bool bHard = false) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard); } inline void SetLineBreak( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); } @@ -240,16 +236,16 @@ public: { b ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); } inline bool IsSoftHyph() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; } + { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) != 0; } inline void SetSoftHyph( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); } - inline bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; } + inline bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) != 0; } inline void SetFldName( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); } inline bool IsPostIts() const - { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_POSTITS) != 0; } inline void SetPostIts( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); } void PaintPostIts( OutputDevice *pOut, const SwRect &rRect, @@ -258,44 +254,43 @@ public: inline bool IsShowHiddenChar(bool bHard = false) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) && - ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard) - ? sal_True : sal_False; } + ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard); } inline void SetShowHiddenChar( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); } inline bool IsShowHiddenField() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; } + { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) != 0; } inline void SetShowHiddenField( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); } inline bool IsGraphic() const - { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_GRAPHIC) != 0; } inline void SetGraphic( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); } inline bool IsPageBack() const - { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_PAGEBACK) != 0; } inline void SetPageBack( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); } inline bool IsTable() const - { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_TABLE) != 0; } inline void SetTable( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); } inline bool IsDraw() const - { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_DRAW) != 0; } inline void SetDraw( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); } inline bool IsControl() const - { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_CONTROL) != 0; } inline void SetControl( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); } inline bool IsSnap() const - { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_SNAP) != 0; } inline void SetSnap( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); } @@ -303,63 +298,63 @@ public: inline const Size &GetSnapSize() const { return aSnapSize; } inline bool IsGridVisible() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; } + { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) != 0; } inline void SetGridVisible( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); } inline bool IsOnlineSpell() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; } + { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) != 0; } inline void SetOnlineSpell( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); } inline bool IsViewMetaChars() const - { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; } + { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) != 0; } inline void SetViewMetaChars( bool b) { b ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); } inline bool IsSynchronize() const - { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;} + { return (nCoreOptions & VIEWOPT_1_SYNCHRONIZE) != 0; } inline void SetSynchronize( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); } inline bool IsCrossHair() const - { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; } + { return (nCoreOptions & VIEWOPT_1_CROSSHAIR) != 0; } inline void SetCrossHair( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); } // Options from nCore2Options inline bool IsBlackFont() const - {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;} + {return (nCore2Options & VIEWOPT_CORE2_BLACKFONT) != 0; } inline void SetBlackFont(bool b) { b ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);} inline bool IsShowHiddenPara() const - {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;} + {return (nCore2Options & VIEWOPT_CORE2_HIDDENPARA) != 0; } inline void SetShowHiddenPara(bool b) { b ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);} inline bool IsSmoothScroll() const - {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;} + {return (nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL) != 0; } inline void SetSmoothScroll(bool b) { b ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);} inline bool IsCursorInProtectedArea() const - {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;} + {return (nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT) != 0; } inline void SetCursorInProtectedArea(bool b) { b ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);} inline bool IsPDFExport() const - {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;} + {return (nCore2Options & VIEWOPT_CORE2_PDF_EXPORT) != 0; } inline void SetPDFExport(bool b) { b ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);} inline bool IsPrinting() const - {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;} + {return (nCore2Options & VIEWOPT_CORE2_PRINTING) != 0; } inline void SetPrinting(bool b) { b ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);} @@ -435,29 +430,29 @@ public: bool IsViewVScrollBar() const { #if HAVE_FEATURE_DESKTOP - return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; + return (nUIOptions & VIEWOPT_2_VSCROLLBAR) != 0; #else - return sal_False; + return false; #endif } bool IsViewHScrollBar() const { #if HAVE_FEATURE_DESKTOP - return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; + return (nUIOptions & VIEWOPT_2_HSCROLLBAR) != 0; #else - return sal_False; + return false; #endif } bool IsKeepRatio() const - { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_KEEPASPECTRATIO) != 0; } bool IsGrfKeepZoom() const - { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_GRFKEEPZOOM) != 0; } bool IsShowContentTips() const - { return nUIOptions & VIEWOPT_2_CONTENT_TIPS ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_CONTENT_TIPS) != 0; } bool IsPrtFormat() const - { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_PRTFORMAT) != 0; } bool IsShowScrollBarTips() const - { return nUIOptions & VIEWOPT_2_SCROLLBAR_TIPS ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_SCROLLBAR_TIPS) != 0; } SvxZoomType GetZoomType() const { return eZoom; } @@ -492,7 +487,7 @@ public: #if HAVE_FEATURE_DESKTOP return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER); #else - return sal_False; + return false; #endif } void SetViewAnyRuler(bool bSet) @@ -501,15 +496,12 @@ public: bool IsViewHRuler(bool bDirect = false) const { #if HAVE_FEATURE_DESKTOP - bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? - 0 != (nUIOptions & VIEWOPT_2_H_RULER) : - !bReadonly ? - (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER) - : sal_False ); - return bRet; + return bDirect + ? 0 != (nUIOptions & VIEWOPT_2_H_RULER) + : !bReadonly && (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER); #else (void) bDirect; - return sal_False; + return false; #endif } void SetViewHRuler (bool b) @@ -518,16 +510,12 @@ public: bool IsViewVRuler(bool bDirect = false) const { #if HAVE_FEATURE_DESKTOP - bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? - 0 !=(nUIOptions & VIEWOPT_2_V_RULER) : - !bReadonly ? - (nUIOptions & - (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER) - : sal_False ); - return bRet; + return bDirect + ? 0 != (nUIOptions & VIEWOPT_2_V_RULER) + : !bReadonly && (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER); #else (void) bDirect; - return sal_False; + return false; #endif } void SetViewVRuler (bool b) @@ -535,13 +523,13 @@ public: // ShadowCursor, switch on/off, get/set color/mode. bool IsShadowCursor() const - { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_SHADOWCRSR) != 0; } void SetShadowCursor(bool b) { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); } //move vertical ruler to the right bool IsVRulerRight() const - { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; } + { return (nUIOptions & VIEWOPT_2_V_RULER_RIGHT) != 0; } void SetVRulerRight(bool b) { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); } diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index da0d5d601cb1..7eab33738480 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -112,7 +112,7 @@ class SW_DLLPUBLIC SwViewShell : public Ring static BitmapEx* mpReplaceBmp; ///< replaced display of still loaded images static BitmapEx* mpErrorBmp; ///< error display of missed images - static bool mbLstAct; // sal_True if EndAction of last Shell + static bool mbLstAct; // true if EndAction of last Shell // i.e. if the EndActions of the other // Shells on the document are through. @@ -138,14 +138,14 @@ class SW_DLLPUBLIC SwViewShell : public Ring bool mbDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize // at EndAction to DocMDI. - bool mbPaintWorks :1; // Normal Painting if sal_True, - // remember Paint if sal_False. + bool mbPaintWorks :1; // Normal Painting if true, + // remember Paint if false. bool mbPaintInProgress :1; // Block any double paint. bool mbViewLocked :1; // Lock visible range; // in this case MakeVisible is ineffectual. bool mbInEndAction :1; // Avoid problems, cf. viewsh.cxx. - bool mbPreview :1; // If sal_True it is a Preview-SwViewShell. - bool mbFrameView :1; // If sal_True it is a (HTML-)Frame. + bool mbPreview :1; // If true it is a Preview-SwViewShell. + bool mbFrameView :1; // If true it is a (HTML-)Frame. bool mbEnableSmooth :1; // Disable SmoothScroll, e.g. for drag // of scrollbars. bool mbEndActionByVirDev:1; // Paints from EndAction always via virtual device @@ -489,8 +489,8 @@ public: { mbFrameView = true; maBrowseBorder = rBrowseBorder; } // Makes the necessary invalidations: - // If BrowseMode has changed bBrowseChgd == sal_True - // or bBrowseChgd == sal_False in BrowseMode + // If BrowseMode has changed bBrowseChgd == true + // or bBrowseChgd == false in BrowseMode // if proportions have changed. void CheckBrowseView( bool bBrowseChgd ); |