summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-18 00:18:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-18 00:37:49 +0100
commit602c87b4259d118e5db6d8a990c4695103f916dd (patch)
tree1cbc6cf8309b680476f5116cd5320f8f6a99c32a /cui
parent849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff)
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx5
-rw-r--r--cui/source/dialogs/colorpicker.cxx6
-rw-r--r--cui/source/dialogs/commonlingui.cxx2
-rw-r--r--cui/source/dialogs/commonlingui.hxx2
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx12
-rw-r--r--cui/source/dialogs/hltpbase.cxx2
-rw-r--r--cui/source/inc/SpellDialog.hxx2
-rw-r--r--cui/source/inc/autocdlg.hxx2
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx2
-rw-r--r--cui/source/inc/hltpbase.hxx2
-rw-r--r--cui/source/inc/numfmt.hxx2
-rw-r--r--cui/source/options/optcolor.cxx6
-rw-r--r--cui/source/tabpages/autocdlg.cxx8
-rw-r--r--cui/source/tabpages/numfmt.cxx2
14 files changed, 27 insertions, 28 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 034ada98cc9d..97829c7a356d 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1274,7 +1274,7 @@ SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
#define ACTION_SELECTFIELD 2
#define ACTION_EXPAND 3
-long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
+bool SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
bool bChange = false;
const TextCharAttrib* pErrorAttrib = 0;
@@ -1538,8 +1538,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
else
bChange = false;
}
- long nRet = bChange ? 1 : MultiLineEdit::PreNotify(rNEvt);
- return nRet;
+ return bChange || MultiLineEdit::PreNotify(rNEvt);
}
//-----------------------------------------------------------------------
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 34849a0023a5..e0ca149e799f 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -140,7 +140,7 @@ class HexColorControl : public Edit
public:
HexColorControl( Window* pParent, const ResId& rResId );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void Paste();
void SetColor( sal_Int32 nColor );
@@ -192,12 +192,12 @@ sal_Int32 HexColorControl::GetColor()
// -----------------------------------------------------------------------
-long HexColorControl::PreNotify( NotifyEvent& rNEvt )
+bool HexColorControl::PreNotify( NotifyEvent& rNEvt )
{
if ( (rNEvt.GetType() == EVENT_KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() )
{
if ( ImplProcessKeyInput( *rNEvt.GetKeyEvent() ) )
- return 1;
+ return true;
}
return Edit::PreNotify( rNEvt );
diff --git a/cui/source/dialogs/commonlingui.cxx b/cui/source/dialogs/commonlingui.cxx
index d94a074b655f..012895d388cf 100644
--- a/cui/source/dialogs/commonlingui.cxx
+++ b/cui/source/dialogs/commonlingui.cxx
@@ -46,7 +46,7 @@ void SvxClickInfoCtr::MouseButtonDown( const MouseEvent& )
}
//-----------------------------------------------------------------------------
-long SvxClickInfoCtr::PreNotify( NotifyEvent& rNEvt )
+bool SvxClickInfoCtr::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType()==EVENT_GETFOCUS || rNEvt.GetType()==EVENT_MOUSEBUTTONDOWN)
{
diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx
index 5f53283549f8..1795f016956a 100644
--- a/cui/source/dialogs/commonlingui.hxx
+++ b/cui/source/dialogs/commonlingui.hxx
@@ -49,7 +49,7 @@ public:
protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
};
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index dd244e0dc3cb..2dfba19c33fa 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1388,9 +1388,9 @@ namespace svx
{
}
- long SuggestionEdit::PreNotify( NotifyEvent& rNEvt )
+ bool SuggestionEdit::PreNotify( NotifyEvent& rNEvt )
{
- long nHandled = 0;
+ bool nHandled = false;
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
@@ -1405,7 +1405,7 @@ namespace svx
DoJump( bUp );
SetSelection( Selection( 0, SELECTION_MAX ) );
// Tab-travel doesn't really happen, so emulate it by setting a selection manually
- nHandled = 1;
+ nHandled = true;
}
}
else if( KEY_UP == nCode || KEY_DOWN == nCode )
@@ -1414,20 +1414,20 @@ namespace svx
if( ShouldScroll( bUp ) )
{
DoJump( bUp );
- nHandled = 1;
+ nHandled = true;
}
else if( bUp )
{
if( m_pPrev )
{
m_pPrev->GrabFocus();
- nHandled = 1;
+ nHandled = true;
}
}
else if( m_pNext )
{
m_pNext->GrabFocus();
- nHandled = 1;
+ nHandled = true;
}
}
}
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 331a9ea47623..29774ddacb60 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -108,7 +108,7 @@ bool SvxHyperURLBox::Notify( NotifyEvent& rNEvt )
{
return SvtURLBox::Notify( rNEvt );
}
-long SvxHyperURLBox::PreNotify( NotifyEvent& rNEvt )
+bool SvxHyperURLBox::PreNotify( NotifyEvent& rNEvt )
{
return SvtURLBox::PreNotify( rNEvt );
}
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 3cfe2ff60f2f..5f88f3b526cb 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -72,7 +72,7 @@ private:
SpellDialog* GetSpellDialog() const {return (SpellDialog*)GetParentDialog();}
protected:
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
public:
SentenceEditWindow_Impl(Window* pParent, WinBits nBits);
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index faf5af02dc7d..58f7851153cb 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -407,7 +407,7 @@ class OfaAutoCompleteTabPage : public SfxTabPage
const ResId& rResId )
: MultiListBox( &rPg, rResId ), rPage( rPg ) {}
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
};
CheckBox aCBActiv; ///<Enable word completion
diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx
index 4536197ff661..8bde65e13234 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -264,7 +264,7 @@ namespace svx
ScrollBar& _rScrollBar,
SuggestionEdit* _pPrev, SuggestionEdit* _pNext );
virtual ~SuggestionEdit();
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
};
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 874b2930365e..847a079acb1f 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -64,7 +64,7 @@ protected:
virtual bool Notify( NotifyEvent& rNEvt );
virtual void Select();
virtual void Modify();
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
public:
SvxHyperURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_FILE );
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 40b065f277de..33f4381b6e8d 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -84,7 +84,7 @@ public:
void SetOkHdl( const Link& rOkHandler );
void HideLanguage(sal_Bool nFlag=sal_True);
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void PageCreated (SfxAllItemSet aSet);
private:
SvxNumberFormatTabPage( Window* pParent,
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 20160e683ab7..846e5e987355 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -837,7 +837,7 @@ class ColorConfigCtrl_Impl : public VclVBox
DECL_LINK(ColorHdl, ColorListBox*);
DECL_LINK(ControlFocusHdl, Control*);
- virtual long PreNotify (NotifyEvent& rNEvt);
+ virtual bool PreNotify (NotifyEvent& rNEvt);
virtual void Command (CommandEvent const& rCEvt);
virtual void DataChanged (DataChangedEvent const& rDCEvt);
public:
@@ -934,7 +934,7 @@ IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar)
return 0;
}
-long ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt )
+bool ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType() == EVENT_COMMAND)
{
@@ -943,7 +943,7 @@ long ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt )
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
- return 1;
+ return true;
}
}
return VclVBox::PreNotify(rNEvt);
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index c4e7f9ead034..0fb4c17fcdc8 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2286,10 +2286,10 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const
}
}
-long OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
+bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
NotifyEvent& rNEvt )
{
- long nHandled = MultiListBox::PreNotify( rNEvt );
+ bool nHandled = MultiListBox::PreNotify( rNEvt );
if( !nHandled && EVENT_KEYUP == rNEvt.GetType() )
{
@@ -2298,14 +2298,14 @@ long OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
{
case KEY_DELETE:
rPage.DeleteHdl( 0 );
- nHandled = 1;
+ nHandled = true;
break;
default:
if( KEYFUNC_COPY == rKeyCode.GetFunction() )
{
rPage.CopyToClipboard();
- nHandled = 1;
+ nHandled = true;
}
break;
}
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 3212d48d8d05..8fdc964e7aa0 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1639,7 +1639,7 @@ void SvxNumberFormatTabPage::ChangePreviewText( sal_uInt16 nPos )
m_pWndPreview->NotifyChange( aPreviewString, pPreviewColor );
}
-long SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt )
+bool SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType()==EVENT_LOSEFOCUS)
{