diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-14 14:52:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-02-18 10:07:54 +0200 |
commit | a2f61558cba97eb8a0e65ca7bdc4cf9e0e28469e (patch) | |
tree | c4cf27f5aefb3482686ab7af401500d3d9e926a3 | |
parent | 71498bedcc66409bab636c29dc6a369093b64073 (diff) |
sal_Bool->bool
Change-Id: Ie015d538d7a740dd421900598a7dd60e155be55d
-rw-r--r-- | sc/source/ui/inc/content.hxx | 29 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 30 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 4 |
3 files changed, 32 insertions, 31 deletions
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index 8bcf363df60e..b65ebf42a911 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -51,16 +51,16 @@ class ScContentTree : public SvTreeListBox SvTreeListEntry* pRootNodes[SC_CONTENT_COUNT]; sal_uInt16 nRootType; // set as Root OUString aManualDoc; // Switched in Navigator (Title) - sal_Bool bHiddenDoc; // Hidden active? + bool bHiddenDoc; // Hidden active? OUString aHiddenName; // URL to load OUString aHiddenTitle; // for display ScDocument* pHiddenDocument; // temporary - sal_Bool bisInNavigatoeDlg; + bool bisInNavigatoeDlg; OUString sKeyString; sal_uInt16 pPosList[SC_CONTENT_COUNT]; // for the sequence - static sal_Bool bIsInDrag; // static, if the Navigator is deleted in ExecuteDrag + static bool bIsInDrag; // static, if the Navigator is deleted in ExecuteDrag ScDocShell* GetManualOrCurrent(); @@ -81,8 +81,8 @@ class ScContentTree : public SvTreeListBox static bool IsPartOfType( sal_uInt16 nContentType, sal_uInt16 nObjIdentifier ); - sal_Bool DrawNamesChanged( sal_uInt16 nType ); - sal_Bool NoteStringsChanged(); + bool DrawNamesChanged( sal_uInt16 nType ); + bool NoteStringsChanged(); ScAddress GetNotePos( sal_uLong nIndex ); const ScAreaLink* GetLink( sal_uLong nIndex ); @@ -106,8 +106,8 @@ class ScContentTree : public SvTreeListBox DECL_STATIC_LINK( ScContentTree, ExecDragHdl, void* ); public: SvTreeListEntry* pTmpEntry; - bool m_bFirstPaint; + protected: using SvTreeListBox::ExecuteDrop; @@ -117,23 +117,24 @@ protected: virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); virtual void DragFinished( sal_Int8 nAction ); - virtual void Command( const CommandEvent& rCEvt ); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual void InitEntry(SvTreeListEntry*,const OUString&,const Image&,const Image&, SvLBoxButtonKind); + virtual void Command( const CommandEvent& rCEvt ); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void InitEntry(SvTreeListEntry*,const OUString&,const Image&,const Image&, SvLBoxButtonKind); + public: ScContentTree( Window* pParent, const ResId& rResId ); ~ScContentTree(); - OUString getAltLongDescText(SvTreeListEntry* pEntry , sal_Bool isAltText) const; + OUString getAltLongDescText(SvTreeListEntry* pEntry, bool isAltText) const; OUString GetEntryAltText( SvTreeListEntry* pEntry ) const; OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const; void ObjectFresh( sal_uInt16 nType, SvTreeListEntry* pEntry = NULL); - sal_Bool SetNavigatorDlgFlag(sal_Bool isInNavigatoeDlg){ return bisInNavigatoeDlg=isInNavigatoeDlg;}; + bool SetNavigatorDlgFlag(bool isInNavigatoeDlg){ return bisInNavigatoeDlg=isInNavigatoeDlg;}; virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void KeyInput( const KeyEvent& rKEvt ); - void InitWindowBits( sal_Bool bButtons ); + void InitWindowBits( bool bButtons ); void Refresh( sal_uInt16 nType = 0 ); @@ -144,7 +145,7 @@ public: void ActiveDocChanged(); void ResetManualDoc(); void SetManualDoc(const OUString& rName); - sal_Bool LoadFile(const OUString& rUrl); + bool LoadFile(const OUString& rUrl); void SelectDoc(const OUString& rName); const OUString& GetHiddenTitle() const { return aHiddenTitle; } @@ -154,7 +155,7 @@ public: /** Stores the current listbox state in the navigator settings. */ void StoreSettings() const; - static sal_Bool IsInDrag() { return bIsInDrag; } + static bool IsInDrag() { return bIsInDrag; } }; diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 9aca7e0eb4b6..d01cc4834a5e 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -78,7 +78,7 @@ static const sal_uInt16 pTypeList[SC_CONTENT_COUNT] = SC_CONTENT_DRAWING }; -sal_Bool ScContentTree::bIsInDrag = false; +bool ScContentTree::bIsInDrag = false; ScDocShell* ScContentTree::GetManualOrCurrent() @@ -121,7 +121,7 @@ ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) : nRootType ( SC_CONTENT_ROOT ), bHiddenDoc ( false ), pHiddenDocument ( NULL ), - bisInNavigatoeDlg ( sal_False ) + bisInNavigatoeDlg ( false ) { sal_uInt16 i; for (i=0; i<SC_CONTENT_COUNT; i++) @@ -148,7 +148,7 @@ ScContentTree::~ScContentTree() } // helper function for GetEntryAltText and GetEntryLongDescription -OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry , sal_Bool isAltText) const +OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry, bool isAltText) const { SdrObject* pFound = NULL; @@ -203,12 +203,12 @@ OUString ScContentTree::getAltLongDescText( SvTreeListEntry* pEntry , sal_Bool i OUString ScContentTree::GetEntryAltText( SvTreeListEntry* pEntry ) const { - return getAltLongDescText( pEntry, sal_True ); + return getAltLongDescText( pEntry, true ); } OUString ScContentTree::GetEntryLongDescription( SvTreeListEntry* pEntry ) const { - return getAltLongDescText( pEntry, sal_False); + return getAltLongDescText( pEntry, false ); } void ScContentTree::InitRoot( sal_uInt16 nType ) @@ -1099,7 +1099,7 @@ ScAddress ScContentTree::GetNotePos( sal_uLong nIndex ) return pDoc->GetNotePosition(nIndex); } -sal_Bool ScContentTree::NoteStringsChanged() +bool ScContentTree::NoteStringsChanged() { ScDocument* pDoc = GetSourceDocument(); if (!pDoc) @@ -1132,7 +1132,7 @@ sal_Bool ScContentTree::NoteStringsChanged() return false; } -sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType ) +bool ScContentTree::DrawNamesChanged( sal_uInt16 nType ) { ScDocument* pDoc = GetSourceDocument(); if (!pDoc) @@ -1147,7 +1147,7 @@ sal_Bool ScContentTree::DrawNamesChanged( sal_uInt16 nType ) // iterate in flat mode for groups SdrIterMode eIter = ( nType == SC_CONTENT_DRAWING ) ? IM_FLAT : IM_DEEPNOGROUPS; - sal_Bool bEqual = sal_True; + bool bEqual = true; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); SfxObjectShell* pShell = pDoc->GetDocumentShell(); if (pDrawLayer && pShell) @@ -1296,7 +1296,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_u void ScContentTree::DoDrag() { ScDocumentLoader* pDocLoader = NULL; - bIsInDrag = sal_True; + bIsInDrag = true; ScModule* pScMod = SC_MOD(); @@ -1452,20 +1452,20 @@ IMPL_STATIC_LINK(ScContentTree, ExecDragHdl, void*, EMPTYARG) return 0; } -sal_Bool ScContentTree::LoadFile( const OUString& rUrl ) +bool ScContentTree::LoadFile( const OUString& rUrl ) { OUString aDocName = rUrl; sal_Int32 nPos = aDocName.indexOf('#'); if ( nPos != -1 ) aDocName = aDocName.copy(0, nPos); // nur der Name, ohne #... - sal_Bool bReturn = false; + bool bReturn = false; OUString aURL = aDocName; OUString aFilter, aOptions; ScDocumentLoader aLoader( aURL, aFilter, aOptions ); if ( !aLoader.IsError() ) { - bHiddenDoc = sal_True; + bHiddenDoc = true; aHiddenName = aDocName; aHiddenTitle = aLoader.GetTitle(); pHiddenDocument = aLoader.GetDocument(); @@ -1482,11 +1482,11 @@ sal_Bool ScContentTree::LoadFile( const OUString& rUrl ) return bReturn; } -void ScContentTree::InitWindowBits( sal_Bool bButtons ) +void ScContentTree::InitWindowBits( bool bButtons ) { - WinBits nFlags = GetStyle()|WB_CLIPCHILDREN|WB_HSCROLL; + WinBits nFlags = GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL; if (bButtons) - nFlags |= WB_HASBUTTONS|WB_HASBUTTONSATROOT; + nFlags |= WB_HASBUTTONS | WB_HASBUTTONSATROOT; SetStyle( nFlags ); } diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 09140ebdadef..b6237b0532f1 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -698,7 +698,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win aLbDocuments.Hide(); // bei NAV_LMODE_NONE gibts die nicht - aLbEntries.InitWindowBits(sal_True); + aLbEntries.InitWindowBits(true); aLbEntries.SetSpaceBetweenEntries(0); aLbEntries.SetSelectionMode( SINGLE_SELECTION ); @@ -741,7 +741,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win aTbxCmd.Select(IID_ZOOMOUT); aTbxCmd.RemoveItem(aTbxCmd.GetItemPos(IID_ZOOMOUT)); } - aLbEntries.SetNavigatorDlgFlag(sal_True); + aLbEntries.SetNavigatorDlgFlag(true); } //------------------------------------------------------------------------ |