summaryrefslogtreecommitdiff
path: root/reportdesign
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 /reportdesign
parent849482c0ea88c4aa70ec56adfefe7e59b6060950 (diff)
Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx4
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx6
-rw-r--r--reportdesign/source/ui/inc/AddField.hxx2
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx2
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx2
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx16
6 files changed, 16 insertions, 16 deletions
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index db7fea27e703..a938abede1e3 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -245,7 +245,7 @@ uno::Sequence< beans::PropertyValue > OAddFieldWindow::getSelectedFieldDescripto
}
//-----------------------------------------------------------------------
-long OAddFieldWindow::PreNotify( NotifyEvent& _rNEvt )
+bool OAddFieldWindow::PreNotify( NotifyEvent& _rNEvt )
{
if ( EVENT_KEYINPUT == _rNEvt.GetType() )
{
@@ -255,7 +255,7 @@ long OAddFieldWindow::PreNotify( NotifyEvent& _rNEvt )
if ( m_aCreateLink.IsSet() )
{
m_aCreateLink.Call(this);
- return 1;
+ return true;
}
}
}
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 3b6d97d37304..3bf741a5bef7 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -494,7 +494,7 @@ namespace rptui
}
// -----------------------------------------------------------------------------
- long ConditionalFormattingDialog::PreNotify( NotifyEvent& _rNEvt )
+ bool ConditionalFormattingDialog::PreNotify( NotifyEvent& _rNEvt )
{
switch ( _rNEvt.GetType() )
{
@@ -507,12 +507,12 @@ namespace rptui
if ( rKeyCode.GetCode() == 0x0508 ) // -
{
impl_deleteCondition_nothrow( impl_getFocusedConditionIndex( 0 ) );
- return 1;
+ return true;
}
if ( rKeyCode.GetCode() == 0x0507 ) // +
{
impl_addCondition_nothrow( impl_getFocusedConditionIndex( impl_getConditionCount() - 1 ) + 1 );
- return 1;
+ return true;
}
}
}
diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx
index bee27840d260..ba882ec9e7a2 100644
--- a/reportdesign/source/ui/inc/AddField.hxx
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -82,7 +82,7 @@ public:
virtual ~OAddFieldWindow();
virtual void Resize();
virtual void GetFocus();
- virtual long PreNotify( NotifyEvent& _rNEvt );
+ virtual bool PreNotify( NotifyEvent& _rNEvt );
inline const OUString& GetCommand() const { return m_aCommandName; }
inline sal_Int32 GetCommandType() const { return m_nCommandType; }
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index 4d8fa7c515cd..57cf2145b718 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -110,7 +110,7 @@ namespace rptui
virtual OUString getDataField() const;
protected:
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
private:
DECL_LINK( OnScroll, ScrollBar* );
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index 9bf6818d57ad..3ad28623e8e9 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -102,7 +102,7 @@ namespace rptui
// window overloads
virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual bool PreNotify( NotifyEvent& rNEvt );
virtual void GetFocus();
// set the view readonly or not
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 3ca115c83e62..b07fb4b03b05 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -192,29 +192,29 @@ void ODesignView::DataChanged( const DataChangedEvent& rDCEvt )
}
}
//------------------------------------------------------------------------------
-long ODesignView::PreNotify( NotifyEvent& rNEvt )
+bool ODesignView::PreNotify( NotifyEvent& rNEvt )
{
- long nRet = ODataView::PreNotify(rNEvt); // 1 := has to be handled here
+ bool nRet = ODataView::PreNotify(rNEvt); // 1 := has to be handled here
switch(rNEvt.GetType())
{
case EVENT_KEYINPUT:
if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) )
- return 0L;
+ return false;
if ( (m_pAddField && m_pAddField->HasChildPathFocus()) )
- return 0L;
+ return false;
if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) )
- return 0L;
+ return false;
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
if ( handleKeyEvent(*pKeyEvent) )
- nRet = 1L;
- else if ( nRet == 1L && m_pAccel.get() )
+ nRet = true;
+ else if ( nRet && m_pAccel.get() )
{
const KeyCode& rCode = pKeyEvent->GetKeyCode();
util::URL aUrl;
aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode));
if ( aUrl.Complete.isEmpty() || !m_rController.isCommandEnabled( aUrl.Complete ) )
- nRet = 0L;
+ nRet = false;
}
}
break;