summaryrefslogtreecommitdiff
path: root/basctl/source
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 /basctl/source
parent849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff)
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/basicbox.cxx20
-rw-r--r--basctl/source/basicide/basicbox.hxx4
2 files changed, 12 insertions, 12 deletions
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index db86fdfaffc7..2ccad9bc35e9 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -254,9 +254,9 @@ void LibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLo
}
}
-long LibBox::PreNotify( NotifyEvent& rNEvt )
+bool LibBox::PreNotify( NotifyEvent& rNEvt )
{
- long nDone = 0;
+ bool nDone = false;
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
@@ -266,7 +266,7 @@ long LibBox::PreNotify( NotifyEvent& rNEvt )
case KEY_RETURN:
{
NotifyIDE();
- nDone = 1;
+ nDone = true;
}
break;
@@ -274,7 +274,7 @@ long LibBox::PreNotify( NotifyEvent& rNEvt )
{
SelectEntry( aCurText );
ReleaseFocus();
- nDone = 1;
+ nDone = true;
}
break;
}
@@ -296,7 +296,7 @@ long LibBox::PreNotify( NotifyEvent& rNEvt )
}
}
- return nDone ? nDone : ListBox::PreNotify( rNEvt );
+ return nDone || ListBox::PreNotify( rNEvt );
}
void LibBox::Select()
@@ -473,9 +473,9 @@ void LanguageBox::Select()
SelectEntry( m_sCurrentText ); // Select after Escape
}
-long LanguageBox::PreNotify( NotifyEvent& rNEvt )
+bool LanguageBox::PreNotify( NotifyEvent& rNEvt )
{
- long nDone = 0;
+ bool nDone = false;
if( rNEvt.GetType() == EVENT_KEYINPUT )
{
sal_uInt16 nKeyCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
@@ -484,14 +484,14 @@ long LanguageBox::PreNotify( NotifyEvent& rNEvt )
case KEY_RETURN:
{
SetLanguage();
- nDone = 1;
+ nDone = true;
}
break;
case KEY_ESCAPE:
{
SelectEntry( m_sCurrentText );
- nDone = 1;
+ nDone = true;
}
break;
}
@@ -503,7 +503,7 @@ long LanguageBox::PreNotify( NotifyEvent& rNEvt )
{
}
- return nDone ? nDone : ListBox::PreNotify( rNEvt );
+ return nDone || ListBox::PreNotify( rNEvt );
}
void LanguageBox::Update( const SfxStringItem* pItem )
diff --git a/basctl/source/basicide/basicbox.hxx b/basctl/source/basicide/basicbox.hxx
index 54f476dbf5d2..b3a8501a1736 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -92,7 +92,7 @@ private:
protected:
virtual void Select();
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
public:
LibBox( Window* pParent,
@@ -132,7 +132,7 @@ private:
protected:
virtual void Select();
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
public:
LanguageBox( Window* pParent );