summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
parent849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff)
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx18
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx8
-rw-r--r--svtools/source/contnr/imivctl1.cxx6
-rw-r--r--svtools/source/contnr/simptabl.cxx6
-rw-r--r--svtools/source/contnr/templwin.cxx10
-rw-r--r--svtools/source/contnr/templwin.hxx2
-rw-r--r--svtools/source/control/fileurlbox.cxx2
-rw-r--r--svtools/source/control/fmtfield.cxx2
-rw-r--r--svtools/source/control/inettbc.cxx6
-rw-r--r--svtools/source/control/roadmap.cxx2
-rw-r--r--svtools/source/control/tabbar.cxx14
-rw-r--r--svtools/source/control/urlcontrol.cxx2
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx6
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx2
-rw-r--r--svtools/source/hatchwindow/ipwin.cxx2
-rw-r--r--svtools/source/hatchwindow/ipwin.hxx2
16 files changed, 45 insertions, 45 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 890ccb73107f..8407828a664a 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -50,7 +50,7 @@ namespace svt
}
//------------------------------------------------------------------
- long ComboBoxControl::PreNotify( NotifyEvent& rNEvt )
+ bool ComboBoxControl::PreNotify( NotifyEvent& rNEvt )
{
switch (rNEvt.GetType())
{
@@ -71,7 +71,7 @@ namespace svt
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
SetText(GetEntry(sal::static_int_cast< sal_uInt16 >(nPos)));
- return 1;
+ return true;
}
}
break;
@@ -157,7 +157,7 @@ namespace svt
}
//------------------------------------------------------------------
- long ListBoxControl::PreNotify( NotifyEvent& rNEvt )
+ bool ListBoxControl::PreNotify( NotifyEvent& rNEvt )
{
switch (rNEvt.GetType())
{
@@ -179,10 +179,10 @@ namespace svt
nPos = GetEntryCount() - 1;
SelectEntryPos(sal::static_int_cast< sal_uInt16 >(nPos));
Select(); // for calling Modify
- return 1;
+ return true;
}
else if (GetParent()->PreNotify(rNEvt))
- return 1;
+ return true;
}
break;
}
@@ -322,7 +322,7 @@ namespace svt
}
//------------------------------------------------------------------
- long CheckBoxControl::PreNotify(NotifyEvent& rEvt)
+ bool CheckBoxControl::PreNotify(NotifyEvent& rEvt)
{
switch (rEvt.GetType())
{
@@ -568,7 +568,7 @@ namespace svt
}
//------------------------------------------------------------------
- long MultiLineTextCell::PreNotify( NotifyEvent& rNEvt )
+ bool MultiLineTextCell::PreNotify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
@@ -591,13 +591,13 @@ namespace svt
pKeyEvent->GetRepeat()
);
if ( dispatchKeyEvent( aEvent ) )
- return 1;
+ return true;
}
if ( ( nCode != KEY_TAB ) && ( nCode != KEY_RETURN ) ) // everything but tab and enter
{
if ( dispatchKeyEvent( *pKeyEvent ) )
- return 1;
+ return true;
}
}
}
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 79a98c2c2139..6488120b3b30 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -610,7 +610,7 @@ namespace svt
}
//------------------------------------------------------------------------------
- long EditBrowseBox::PreNotify(NotifyEvent& rEvt)
+ bool EditBrowseBox::PreNotify(NotifyEvent& rEvt)
{
switch (rEvt.GetType())
{
@@ -652,7 +652,7 @@ namespace svt
// maybe we're not visible ...
EnableAndShow();
aController->GetWindow().GrabFocus();
- return 1;
+ return true;
}
// ask if traveling to the next cell is allowed
if (IsTabAllowed(sal_True))
@@ -713,7 +713,7 @@ namespace svt
// maybe we're not visible ...
EnableAndShow();
aController->GetWindow().GrabFocus();
- return 1;
+ return true;
}
}
@@ -721,7 +721,7 @@ namespace svt
if (bLocalSelect && (GetSelectRowCount() || GetSelection() != NULL))
DeactivateCell();
- return 1;
+ return true;
}
}
}
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 1e96c5561523..489554e6dc31 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -85,7 +85,7 @@ public:
~IcnViewEdit_Impl();
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
sal_Bool EditingCanceled() const { return bCanceled; }
void StopEditing( sal_Bool bCancel = sal_False );
sal_Bool IsGrabFocus() const { return bGrabFocus; }
@@ -3415,7 +3415,7 @@ void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt )
}
}
-long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
+bool IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
@@ -3428,7 +3428,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
aTimer.Start();
}
}
- return 0;
+ return false;
}
void IcnViewEdit_Impl::StopEditing( sal_Bool bCancel )
diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx
index 6f25107d621d..4253831fca57 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -51,9 +51,9 @@ void SvSimpleTableContainer::SetTable(SvSimpleTable* pTable)
m_pTable = pTable;
}
-long SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt )
+bool SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt )
{
- long nResult = sal_True;
+ bool nResult = true;
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
const KeyCode& aKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
@@ -61,7 +61,7 @@ long SvSimpleTableContainer::PreNotify( NotifyEvent& rNEvt )
if (nKey == KEY_TAB)
GetParent()->Notify( rNEvt );
else if (m_pTable && m_pTable->IsFocusOnCellEnabled() && ( nKey == KEY_LEFT || nKey == KEY_RIGHT))
- return 0;
+ return false;
else
nResult = Control::PreNotify( rNEvt );
}
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index a57a15a76b21..955ae3d042f8 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -1108,10 +1108,10 @@ void SvtTemplateWindow::UpdateIcons()
// ------------------------------------------------------------------------
-long SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
+bool SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
- long nRet = 0;
+ bool nRet = false;
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
@@ -1121,15 +1121,15 @@ long SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
if ( KEY_BACKSPACE == nCode && !rKeyCode.GetModifier() && pFileWin->HasChildPathFocus() )
{
DoAction( TI_DOCTEMPLATE_BACK );
- nRet = 1;
+ nRet = true;
}
else if ( pIconWin->ProcessKeyEvent( *rNEvt.GetKeyEvent() ) )
{
- nRet = 1;
+ nRet = true;
}
}
- return nRet ? nRet : Window::PreNotify( rNEvt );
+ return nRet || Window::PreNotify( rNEvt );
}
// -----------------------------------------------------------------------------
diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx
index caf3682591a8..a38f9de2fdd7 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -248,7 +248,7 @@ private:
void UpdateIcons();
protected:
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
diff --git a/svtools/source/control/fileurlbox.cxx b/svtools/source/control/fileurlbox.cxx
index c13dd2b86305..7b3c794fd78c 100644
--- a/svtools/source/control/fileurlbox.cxx
+++ b/svtools/source/control/fileurlbox.cxx
@@ -52,7 +52,7 @@ namespace svt
}
//---------------------------------------------------------------------
- long FileURLBox::PreNotify( NotifyEvent& _rNEvt )
+ bool FileURLBox::PreNotify( NotifyEvent& _rNEvt )
{
switch ( _rNEvt.GetType() )
{
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index a0742b5d2e27..95587f1dcf23 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -554,7 +554,7 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel)
m_bValueDirty = sal_True; // not always necessary, but better re-evaluate for safety reasons
}
-long FormattedField::PreNotify(NotifyEvent& rNEvt)
+bool FormattedField::PreNotify(NotifyEvent& rNEvt)
{
DBG_CHKTHIS(FormattedField, NULL);
if (rNEvt.GetType() == EVENT_KEYINPUT)
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 5ab9dbad8f54..e3a1da1426b1 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -1094,7 +1094,7 @@ void SvtURLBox::Modify()
}
//-------------------------------------------------------------------------
-long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
+bool SvtURLBox::PreNotify( NotifyEvent& rNEvt )
{
if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == EVENT_KEYINPUT )
{
@@ -1104,7 +1104,7 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
KeyCode aCode( rKey.GetCode() );
if( ProcessKey( rKey ) )
{
- return sal_True;
+ return true;
}
else if( ( aCode == KEY_UP || aCode == KEY_DOWN ) && !rKey.IsMod2() )
{
@@ -1112,7 +1112,7 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
GetSubEdit()->KeyInput( rEvent );
SetSelection( Selection( nLen, GetText().getLength() ) );
- return sal_True;
+ return true;
}
if ( MatchesPlaceHolder( GetText() ) )
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index 582aebf44ee1..16a169758130 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -638,7 +638,7 @@ namespace svt
}
//---------------------------------------------------------------------
- long ORoadmap::PreNotify( NotifyEvent& _rNEvt )
+ bool ORoadmap::PreNotify( NotifyEvent& _rNEvt )
{
// capture KeyEvents for taskpane cycling
if ( _rNEvt.GetType() == EVENT_KEYINPUT )
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 07bdb4d1c6cd..88d958a6f87f 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -104,7 +104,7 @@ public:
TabBar* GetParent() const { return (TabBar*)Window::GetParent(); }
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -129,14 +129,14 @@ void ImplTabButton::Command( const CommandEvent& rCEvt )
// =======================================================================
-long ImplTabButton::PreNotify( NotifyEvent& rNEvt )
+bool ImplTabButton::PreNotify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
{
if ( GetParent()->IsInEditMode() )
{
GetParent()->EndEditMode();
- return sal_True;
+ return true;
}
}
@@ -266,7 +266,7 @@ public:
void SetPostEvent() { mbPostEvt = sal_True; }
void ResetPostEvent() { mbPostEvt = sal_False; }
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void LoseFocus();
};
@@ -280,7 +280,7 @@ TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) :
// -----------------------------------------------------------------------
-long TabBarEdit::PreNotify( NotifyEvent& rNEvt )
+bool TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
@@ -294,7 +294,7 @@ long TabBarEdit::PreNotify( NotifyEvent& rNEvt )
if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
mbPostEvt = sal_True;
}
- return sal_True;
+ return true;
}
else if ( pKEvt->GetKeyCode().GetCode() == KEY_ESCAPE )
{
@@ -303,7 +303,7 @@ long TabBarEdit::PreNotify( NotifyEvent& rNEvt )
if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_True ) )
mbPostEvt = sal_True;
}
- return sal_True;
+ return true;
}
}
}
diff --git a/svtools/source/control/urlcontrol.cxx b/svtools/source/control/urlcontrol.cxx
index 85765000ce4a..3a39ccaad402 100644
--- a/svtools/source/control/urlcontrol.cxx
+++ b/svtools/source/control/urlcontrol.cxx
@@ -37,7 +37,7 @@ namespace svt
}
//---------------------------------------------------------------------
- long OFileURLControl::PreNotify( NotifyEvent& _rNEvt )
+ bool OFileURLControl::PreNotify( NotifyEvent& _rNEvt )
{
if (GetSubEdit() == _rNEvt.GetWindow())
if (EVENT_KEYINPUT == _rNEvt.GetType())
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index bcf1eb455c8f..6176fe09e350 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -1260,7 +1260,7 @@ void AssignmentPersistentData::Commit()
}
// -------------------------------------------------------------------
- long AddressBookSourceDialog::PreNotify( NotifyEvent& _rNEvt )
+ bool AddressBookSourceDialog::PreNotify( NotifyEvent& _rNEvt )
{
switch (_rNEvt.GetType())
{
@@ -1286,7 +1286,7 @@ void AssignmentPersistentData::Commit()
// give the left control in the "next" line the focus
m_pImpl->pFields[nNextFocusList]->GrabFocus();
// return saying "have handled this"
- return 1;
+ return true;
}
}
else if (!bAlt && !bCtrl && bShift)
@@ -1300,7 +1300,7 @@ void AssignmentPersistentData::Commit()
// give the right control in the "prebious" line the focus
m_pImpl->pFields[0 - 1 + 2]->GrabFocus();
// return saying "have handled this"
- return 1;
+ return true;
}
}
}
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 68343968643e..178a13c4b733 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -113,7 +113,7 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey)
}
}
-long MultiLineEditSyntaxHighlight::PreNotify( NotifyEvent& rNEvt )
+bool MultiLineEditSyntaxHighlight::PreNotify( NotifyEvent& rNEvt )
{
if ( mbDoBracketHilight && (rNEvt.GetType() == EVENT_KEYINPUT) )
DoBracketHilight(rNEvt.GetKeyEvent()->GetCharCode());
diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx
index 4a603a8143ef..9bd715a0ca5f 100644
--- a/svtools/source/hatchwindow/ipwin.cxx
+++ b/svtools/source/hatchwindow/ipwin.cxx
@@ -616,7 +616,7 @@ void SvResizeWindow::Paint( const Rectangle & /*rRect*/ )
m_aResizer.Draw( this );
}
-long SvResizeWindow::PreNotify( NotifyEvent& rEvt )
+bool SvResizeWindow::PreNotify( NotifyEvent& rEvt )
{
if ( rEvt.GetType() == EVENT_GETFOCUS && !m_bActive )
{
diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx
index 79425625cb67..a71fa46b30d9 100644
--- a/svtools/source/hatchwindow/ipwin.hxx
+++ b/svtools/source/hatchwindow/ipwin.hxx
@@ -92,7 +92,7 @@ public:
virtual void Resize();
virtual void Paint( const Rectangle & );
virtual bool Notify( NotifyEvent& rNEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
void QueryObjAreaPixel( Rectangle & );
void RequestObjAreaPixel( const Rectangle & );