From 380d4600d73a2f57a93d841d5fdfdd0a042d5d39 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 7 Apr 2014 17:04:46 +0100 Subject: use TriState instead of sal_Bool as there's three possibilities Change-Id: If24d4cec9ef4369f20419fe70de7392614a35316 --- cui/source/customize/cfg.cxx | 26 +++++++++++++------------- cui/source/inc/cfg.hxx | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 20ea893bb3a4..f39107b764d8 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1434,7 +1434,7 @@ bool SvxMenuEntriesListBox::NotifyAcceptDrop( SvTreeListEntry* ) return true; } -sal_Bool SvxMenuEntriesListBox::NotifyMoving( +TriState SvxMenuEntriesListBox::NotifyMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pSource, SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos) { @@ -1445,11 +1445,11 @@ sal_Bool SvxMenuEntriesListBox::NotifyMoving( { SvTreeListBox::NotifyMoving( pTarget, pSource, rpNewParent, rNewChildPos ); - return sal_True; + return TRISTATE_TRUE; } else { - return sal_False; + return TRISTATE_FALSE; } } else @@ -1458,7 +1458,7 @@ sal_Bool SvxMenuEntriesListBox::NotifyMoving( } } -sal_Bool SvxMenuEntriesListBox::NotifyCopying( +TriState SvxMenuEntriesListBox::NotifyCopying( SvTreeListEntry* pTarget, SvTreeListEntry* pSource, SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos) { @@ -1471,13 +1471,13 @@ sal_Bool SvxMenuEntriesListBox::NotifyCopying( // if the target is NULL then add function to the start of the list pPage->AddFunction( pTarget, pTarget == NULL ); - // AddFunction already adds the listbox entry so return FALSE + // AddFunction already adds the listbox entry so return TRISTATE_FALSE // to stop another listbox entry being added - return sal_False; + return TRISTATE_FALSE; } // Copying is only allowed from external controls, not within the listbox - return sal_False; + return TRISTATE_FALSE; } void SvxMenuEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) @@ -4660,11 +4660,11 @@ void SvxToolbarEntriesListBox::KeyInput( const KeyEvent& rKeyEvent ) } } -sal_Bool SvxToolbarEntriesListBox::NotifyMoving( +TriState SvxToolbarEntriesListBox::NotifyMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pSource, SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos) { - bool result = SvxMenuEntriesListBox::NotifyMoving( + TriState result = SvxMenuEntriesListBox::NotifyMoving( pTarget, pSource, rpNewParent, rNewChildPos ); if ( result ) @@ -4682,7 +4682,7 @@ sal_Bool SvxToolbarEntriesListBox::NotifyMoving( return result; } -sal_Bool SvxToolbarEntriesListBox::NotifyCopying( +TriState SvxToolbarEntriesListBox::NotifyCopying( SvTreeListEntry* pTarget, SvTreeListEntry* pSource, SvTreeListEntry*& rpNewParent, @@ -4706,13 +4706,13 @@ sal_Bool SvxToolbarEntriesListBox::NotifyCopying( pSaveInData->ApplyToolbar( pToolbar ); } - // AddFunction already adds the listbox entry so return FALSE + // AddFunction already adds the listbox entry so return TRISTATE_FALSE // to stop another listbox entry being added - return sal_False; + return TRISTATE_FALSE; } // Copying is only allowed from external controls, not within the listbox - return sal_False; + return TRISTATE_FALSE; } SvxNewToolbarDialog::SvxNewToolbarDialog(Window* pWindow, const OUString& rName) diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx index 3cda9e4c623c..839461762d89 100644 --- a/cui/source/inc/cfg.hxx +++ b/cui/source/inc/cfg.hxx @@ -328,10 +328,10 @@ public: virtual bool NotifyAcceptDrop( SvTreeListEntry* pEntry ) SAL_OVERRIDE; - virtual sal_Bool NotifyMoving( SvTreeListEntry*, SvTreeListEntry*, + virtual TriState NotifyMoving( SvTreeListEntry*, SvTreeListEntry*, SvTreeListEntry*&, sal_uLong& ) SAL_OVERRIDE; - virtual sal_Bool NotifyCopying( SvTreeListEntry*, SvTreeListEntry*, + virtual TriState NotifyCopying( SvTreeListEntry*, SvTreeListEntry*, SvTreeListEntry*&, sal_uLong&) SAL_OVERRIDE; virtual DragDropMode NotifyStartDrag( @@ -553,10 +553,10 @@ public: Size GetCheckBoxPixelSize() const { return m_aCheckBoxImageSizePixel; } - virtual sal_Bool NotifyMoving( + virtual TriState NotifyMoving( SvTreeListEntry*, SvTreeListEntry*, SvTreeListEntry*&, sal_uLong& ) SAL_OVERRIDE; - virtual sal_Bool NotifyCopying( + virtual TriState NotifyCopying( SvTreeListEntry*, SvTreeListEntry*, SvTreeListEntry*&, sal_uLong&) SAL_OVERRIDE; void KeyInput( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; -- cgit v1.2.3