summaryrefslogtreecommitdiff
path: root/svx
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 /svx
parent849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff)
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/tbunosearchcontrollers.hxx2
-rw-r--r--svx/source/dialog/rubydialog.cxx6
-rw-r--r--svx/source/fmcomp/gridctrl.cxx8
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/gallery2/galbrws1.cxx6
-rw-r--r--svx/source/gallery2/galbrws1.hxx2
-rw-r--r--svx/source/inc/tabwin.hxx2
-rw-r--r--svx/source/sidebar/text/SvxSBFontNameBox.cxx2
-rw-r--r--svx/source/sidebar/text/SvxSBFontNameBox.hxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx4
-rw-r--r--svx/source/tbxctrls/itemwin.cxx10
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx8
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx8
13 files changed, 32 insertions, 32 deletions
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
index 51d31de94fc8..f1aaa583326b 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -50,7 +50,7 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~FindTextFieldControl();
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
void Remember_Impl(const OUString& rStr);
void SetTextToSelected_Impl();
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 2e113dc5d8b0..29a50f8d52bf 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -887,9 +887,9 @@ void RubyEdit::GetFocus()
Edit::GetFocus();
}
-long RubyEdit::PreNotify( NotifyEvent& rNEvt )
+bool RubyEdit::PreNotify( NotifyEvent& rNEvt )
{
- long nHandled = 0;
+ bool nHandled = false;
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
@@ -900,7 +900,7 @@ long RubyEdit::PreNotify( NotifyEvent& rNEvt )
{
sal_Int32 nParam = KEY_SHIFT == nMod ? -1 : 1;
if(aScrollHdl.IsSet() && aScrollHdl.Call(&nParam))
- nHandled = 1;
+ nHandled = true;
}
else if(KEY_UP == nCode || KEY_DOWN == nCode)
{
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 789dc5fff947..4c7641bf98c8 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3199,7 +3199,7 @@ sal_Bool DbGridControl::SaveRow()
return sal_True;
}
-long DbGridControl::PreNotify(NotifyEvent& rEvt)
+bool DbGridControl::PreNotify(NotifyEvent& rEvt)
{
// do not handle events of the Navbar
if (m_aBar.IsWindowOrChild(rEvt.GetWindow()))
@@ -3226,7 +3226,7 @@ long DbGridControl::PreNotify(NotifyEvent& rEvt)
// call the Control - our direct base class will interpret this in a way we do not want (and do
// a cell traveling)
Control::KeyInput( aNewEvent );
- return 1;
+ return true;
}
if ( !bShift && !bCtrl && ( KEY_ESCAPE == nCode ) )
@@ -3234,7 +3234,7 @@ long DbGridControl::PreNotify(NotifyEvent& rEvt)
if (IsModified())
{
Undo();
- return 1;
+ return true;
}
}
else if ( ( KEY_DELETE == nCode ) && !bShift && !bCtrl ) // delete rows
@@ -3245,7 +3245,7 @@ long DbGridControl::PreNotify(NotifyEvent& rEvt)
if (m_nDeleteEvent)
Application::RemoveUserEvent(m_nDeleteEvent);
m_nDeleteEvent = Application::PostUserEvent(LINK(this,DbGridControl,OnDelete));
- return 1;
+ return true;
}
}
} // no break!
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index bd1b51017d11..8e77dfe2457d 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -270,7 +270,7 @@ sal_Bool FmFieldWin::createSelectionControls( )
}
//-----------------------------------------------------------------------
-long FmFieldWin::PreNotify( NotifyEvent& _rNEvt )
+bool FmFieldWin::PreNotify( NotifyEvent& _rNEvt )
{
if ( EVENT_KEYINPUT == _rNEvt.GetType() )
{
@@ -278,7 +278,7 @@ long FmFieldWin::PreNotify( NotifyEvent& _rNEvt )
if ( ( 0 == rKeyCode.GetModifier() ) && ( KEY_RETURN == rKeyCode.GetCode() ) )
{
if ( createSelectionControls() )
- return 1;
+ return true;
}
}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 84fbb560c688..ed9402b951db 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -87,9 +87,9 @@ void GalleryThemeListBox::DataChanged( const DataChangedEvent& rDCEvt )
ListBox::DataChanged( rDCEvt );
}
-long GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
+bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
{
- long nDone = 0;
+ bool nDone = true;
if( rNEvt.GetType() == EVENT_COMMAND )
{
@@ -106,7 +106,7 @@ long GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
nDone = static_cast< GalleryBrowser1* >( GetParent() )->KeyInput( *pKEvt, this );
}
- return( nDone ? nDone : ListBox::PreNotify( rNEvt ) );
+ return( nDone || ListBox::PreNotify( rNEvt ) );
}
// - GalleryBrowser1 -
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 4d446758c758..f805d07f5aff 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -49,7 +49,7 @@ protected:
void InitSettings();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
public:
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index cc56869750db..1b7d5e5e82ae 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -91,7 +91,7 @@ public:
virtual void Resize();
virtual sal_Bool Close();
virtual void GetFocus();
- virtual long PreNotify( NotifyEvent& _rNEvt );
+ virtual bool PreNotify( NotifyEvent& _rNEvt );
virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState);
diff --git a/svx/source/sidebar/text/SvxSBFontNameBox.cxx b/svx/source/sidebar/text/SvxSBFontNameBox.cxx
index 27cd2a4dd0de..c52ce7edb04f 100644
--- a/svx/source/sidebar/text/SvxSBFontNameBox.cxx
+++ b/svx/source/sidebar/text/SvxSBFontNameBox.cxx
@@ -121,7 +121,7 @@ void SvxSBFontNameBox::FillList()
SetSelection( aOldSel );
}
-long SvxSBFontNameBox::PreNotify( NotifyEvent& rNEvt )
+bool SvxSBFontNameBox::PreNotify( NotifyEvent& rNEvt )
{
const sal_uInt16 nType (rNEvt.GetType());
diff --git a/svx/source/sidebar/text/SvxSBFontNameBox.hxx b/svx/source/sidebar/text/SvxSBFontNameBox.hxx
index 12026465ebf8..e8db278b3caf 100644
--- a/svx/source/sidebar/text/SvxSBFontNameBox.hxx
+++ b/svx/source/sidebar/text/SvxSBFontNameBox.hxx
@@ -50,7 +50,7 @@ public:
{ FontNameBox::Fill( pList );
nFtCount = pList->GetFontNameCount(); }
void SetBindings(SfxBindings* pBinding);//
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual bool Notify( NotifyEvent& rNEvt );//
};
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 5c5c46ed5ff4..84b4844ebd4e 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -318,7 +318,7 @@ private:
Reference< XFrame > mxFrame;
virtual void Select();
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual bool Notify( NotifyEvent& rNEvt );
void ImplReleaseFocus();
@@ -369,7 +369,7 @@ void ImplGrafModeControl::Select()
}
}
-long ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt )
+bool ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 427b635e8379..90beb8e40b8d 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -157,7 +157,7 @@ void SvxLineBox::Select()
// -----------------------------------------------------------------------
-long SvxLineBox::PreNotify( NotifyEvent& rNEvt )
+bool SvxLineBox::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
@@ -362,7 +362,7 @@ void SvxColorBox::Select()
// -----------------------------------------------------------------------
-long SvxColorBox::PreNotify( NotifyEvent& rNEvt )
+bool SvxColorBox::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
@@ -564,7 +564,7 @@ void SvxMetricField::RefreshDlgUnit()
// -----------------------------------------------------------------------
-long SvxMetricField::PreNotify( NotifyEvent& rNEvt )
+bool SvxMetricField::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
@@ -656,7 +656,7 @@ SvxFillTypeBox::~SvxFillTypeBox()
// -----------------------------------------------------------------------
-long SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
+bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
@@ -749,7 +749,7 @@ SvxFillAttrBox::~SvxFillAttrBox()
// -----------------------------------------------------------------------
-long SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt )
+bool SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 70b6a00d150b..5118449c165d 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -134,7 +134,7 @@ public:
void SetFamily( SfxStyleFamily eNewFamily );
inline bool IsVisible() { return bVisible; }
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual bool Notify( NotifyEvent& rNEvt );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual void StateChanged( StateChangedType nStateChange );
@@ -219,7 +219,7 @@ public:
{ FontNameBox::Fill( pList );
nFtCount = pList->GetFontNameCount(); }
virtual void UserDraw( const UserDrawEvent& rUDEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual bool Notify( NotifyEvent& rNEvt );
virtual Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -471,7 +471,7 @@ void SvxStyleBox_Impl::SetFamily( SfxStyleFamily eNewFamily )
// -----------------------------------------------------------------------
-long SvxStyleBox_Impl::PreNotify( NotifyEvent& rNEvt )
+bool SvxStyleBox_Impl::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
@@ -868,7 +868,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem )
// -----------------------------------------------------------------------
-long SvxFontNameBox_Impl::PreNotify( NotifyEvent& rNEvt )
+bool SvxFontNameBox_Impl::PreNotify( NotifyEvent& rNEvt )
{
sal_uInt16 nType = rNEvt.GetType();
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 79e78785fb74..b3fdbfbf8c7f 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -180,9 +180,9 @@ void FindTextFieldControl::SetTextToSelected_Impl()
}
}
-long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
+bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
{
- long nRet= ComboBox::PreNotify( rNEvt );
+ bool nRet= ComboBox::PreNotify( rNEvt );
switch ( rNEvt.GetType() )
{
@@ -195,7 +195,7 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
if ( KEY_ESCAPE == nCode || (bMod1 && (KEY_F == nCode)) )
{
- nRet = 1;
+ nRet = true;
GrabFocusToDocument();
// hide the findbar
@@ -222,7 +222,7 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
ToolBox* pToolBox = (ToolBox*)pWindow;
impl_executeSearch( m_xContext, m_xFrame, pToolBox, bShift);
- nRet = 1;
+ nRet = true;
}
break;
}