summaryrefslogtreecommitdiff
path: root/sw
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 /sw
parent849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff)
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx6
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx14
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx4
-rw-r--r--sw/source/ui/fldui/fldvar.hxx2
-rw-r--r--sw/source/ui/frmdlg/cption.cxx6
-rw-r--r--sw/source/ui/inc/bookmark.hxx2
-rw-r--r--sw/source/ui/inc/cption.hxx2
-rw-r--r--sw/source/ui/misc/bookmark.cxx6
9 files changed, 22 insertions, 22 deletions
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 0c5375972c61..59b4bc201add 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -66,7 +66,7 @@ class SwAddressControl_Impl : public Control
void MakeVisible(const Rectangle& aRect);
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void Command( const CommandEvent& rCEvt );
using Window::SetData;
@@ -327,7 +327,7 @@ void SwAddressControl_Impl::Command( const CommandEvent& rCEvt )
}
}
-long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
+bool SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType() == EVENT_COMMAND)
{
@@ -336,7 +336,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
- return 1;
+ return true;
}
}
return Control::PreNotify(rNEvt);
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 62a7b4057dc6..57f255e40593 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -847,7 +847,7 @@ class SwAssignFieldsControl : public Control
DECL_LINK(MatchHdl_Impl, ListBox*);
DECL_LINK(GotFocusHdl_Impl, ListBox*);
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void Command( const CommandEvent& rCEvt );
void MakeVisible( sal_Int32 nIndex );
@@ -1021,7 +1021,7 @@ void SwAssignFieldsControl::Command( const CommandEvent& rCEvt )
}
}
-long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
+bool SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType() == EVENT_COMMAND)
{
@@ -1030,7 +1030,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
- return 1;
+ return true;
}
}
return Control::PreNotify(rNEvt);
@@ -1305,18 +1305,18 @@ void AddressMultiLineEdit::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rH
}
}
-long AddressMultiLineEdit::PreNotify( NotifyEvent& rNEvt )
+bool AddressMultiLineEdit::PreNotify( NotifyEvent& rNEvt )
{
- long nHandled = 0;
+ bool nHandled = false;
if( EVENT_KEYINPUT == rNEvt.GetType() &&
rNEvt.GetKeyEvent()->GetCharCode())
{
- nHandled = 1;
+ nHandled = true;
}
else if(EVENT_MOUSEBUTTONDOWN == rNEvt.GetType()) {
const MouseEvent *pMEvt = rNEvt.GetMouseEvent();
if(pMEvt->GetClicks() >= 2)
- nHandled = 1;
+ nHandled = true;
}
if(!nHandled)
nHandled = VclMultiLineEdit::PreNotify( rNEvt );
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 40dfe88038dc..4451bae26997 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -157,7 +157,7 @@ class AddressMultiLineEdit : public VclMultiLineEdit, public SfxListener
using VclMultiLineEdit::SetText;
protected:
- long PreNotify( NotifyEvent& rNEvt );
+ bool PreNotify( NotifyEvent& rNEvt );
public:
AddressMultiLineEdit(Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER);
~AddressMultiLineEdit();
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 9e416951a34c..a41cf73e9e6a 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1255,9 +1255,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSelectionListBox(Window *pP
return pListBox;
}
-long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
+bool SelectionListBox::PreNotify( NotifyEvent& rNEvt )
{
- long nHandled = ListBox::PreNotify( rNEvt );
+ bool nHandled = ListBox::PreNotify( rNEvt );
if ( rNEvt.GetType() == EVENT_KEYUP )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 5b97b6ba43ed..2d85f0ae2254 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -37,7 +37,7 @@ class SelectionListBox : public ListBox
{
bool bCallAddSelection;
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
public:
SelectionListBox(Window* pParent, WinBits nStyle);
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index c68f4caf730f..c6ea424b0107 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -491,9 +491,9 @@ void SwSequenceOptionDialog::SetCharacterStyle(const OUString& rStyle)
m_pLbCharStyle->SelectEntry(rStyle);
}
-long CategoryBox::PreNotify( NotifyEvent& rNEvt )
+bool CategoryBox::PreNotify( NotifyEvent& rNEvt )
{
- long nHandled = 0;
+ bool nHandled = false;
if( rNEvt.GetType() == EVENT_KEYINPUT &&
rNEvt.GetKeyEvent()->GetCharCode() )
{
@@ -513,7 +513,7 @@ long CategoryBox::PreNotify( NotifyEvent& rNEvt )
+ sText.copy(aSel.Max());
if( !SwCalc::IsValidVarName( sName ))
- nHandled = 1;
+ nHandled = true;
}
}
if(!nHandled)
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index cc6a19bc4cf1..c93d1fe50edb 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -35,7 +35,7 @@ class BookmarkCombo : public SwComboBox
sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const;
sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const;
- virtual long PreNotify(NotifyEvent& rNEvt);
+ virtual bool PreNotify(NotifyEvent& rNEvt);
public:
BookmarkCombo(Window* pWin, WinBits nStyle);
diff --git a/sw/source/ui/inc/cption.hxx b/sw/source/ui/inc/cption.hxx
index ecba8348718d..d1128efeae5d 100644
--- a/sw/source/ui/inc/cption.hxx
+++ b/sw/source/ui/inc/cption.hxx
@@ -56,7 +56,7 @@ public:
: ComboBox( pParent, nStyle )
{}
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
};
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 4d19c1a1da6c..9a28ad09050b 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -225,15 +225,15 @@ sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
return COMBOBOX_ENTRY_NOTFOUND;
}
-long BookmarkCombo::PreNotify( NotifyEvent& rNEvt )
+bool BookmarkCombo::PreNotify( NotifyEvent& rNEvt )
{
- long nHandled = 0;
+ bool nHandled = false;
if( EVENT_KEYINPUT == rNEvt.GetType() &&
rNEvt.GetKeyEvent()->GetCharCode() )
{
OUString sKey( rNEvt.GetKeyEvent()->GetCharCode() );
if(-1 != aForbiddenChars.indexOf(sKey))
- nHandled = 1;
+ nHandled = true;
}
if(!nHandled)
nHandled = SwComboBox::PreNotify( rNEvt );