[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara
caolanm at redhat.com
Mon Dec 1 06:17:33 PST 2014
dbaccess/source/ui/querydesign/TableWindow.cxx | 4 +++-
dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 4 +++-
dbaccess/source/ui/tabledesign/TableDesignView.cxx | 16 +++++++---------
dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 13 +++++--------
4 files changed, 18 insertions(+), 19 deletions(-)
New commits:
commit 1aa5f6f272f7712f7d64acb758b0250796c9f27c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 1 14:13:07 2014 +0000
WaE: -Werror=switch
Change-Id: I347bcc82795da95f14ad9be90cc6c9020fd697ca
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 08155e9..3584044 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -722,8 +722,8 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
m_nMoveCount = 0; // reset our movement count
m_nMoveIncrement = 1;
}
- }
break;
+ }
case MouseNotifyEvent::KEYUP:
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
@@ -734,7 +734,9 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
m_nMoveCount = 0; // reset our movement count
m_nMoveIncrement = 1;
}
+ break;
}
+ default:
break;
}
if (!bHandled)
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 35eac4c..6d8f855 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -150,8 +150,10 @@ bool OTableWindowListBox::PreNotify(NotifyEvent& rNEvt)
break;
if (FirstSelected())
static_cast<OTableWindow*>(Window::GetParent())->OnEntryDoubleClicked(FirstSelected());
+ break;
}
- break;
+ default:
+ break;
}
if (!bHandled)
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 16bc2df..ed577c6 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -222,16 +222,14 @@ void OTableDesignView::resizeDocumentView(Rectangle& _rPlayground)
bool OTableDesignView::PreNotify( NotifyEvent& rNEvt )
{
bool bHandled = false;
- switch(rNEvt.GetType())
+ if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS)
{
- case MouseNotifyEvent::GETFOCUS:
- if( GetDescWin() && GetDescWin()->HasChildPathFocus() )
- m_eChildFocus = DESCRIPTION;
- else if ( GetEditorCtrl() && GetEditorCtrl()->HasChildPathFocus() )
- m_eChildFocus = EDITOR;
- else
- m_eChildFocus = NONE;
- break;
+ if( GetDescWin() && GetDescWin()->HasChildPathFocus() )
+ m_eChildFocus = DESCRIPTION;
+ else if ( GetEditorCtrl() && GetEditorCtrl()->HasChildPathFocus() )
+ m_eChildFocus = EDITOR;
+ else
+ m_eChildFocus = NONE;
}
return bHandled || ODataView::PreNotify(rNEvt);
diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
index fecf0f34..1cd013e 100644
--- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
+++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx
@@ -267,16 +267,13 @@ void OTableFieldDescWin::LoseFocus()
bool OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt )
{
bool bHandled = false;
- switch(rNEvt.GetType())
+ if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS)
{
- case MouseNotifyEvent::GETFOCUS:
- if( getGenPage() && getGenPage()->HasChildPathFocus() )
- m_eChildFocus = DESCRIPTION;
- else
- m_eChildFocus = HELP;
- break;
+ if( getGenPage() && getGenPage()->HasChildPathFocus() )
+ m_eChildFocus = DESCRIPTION;
+ else
+ m_eChildFocus = HELP;
}
-
return bHandled || TabPage::PreNotify(rNEvt);
}
More information about the Libreoffice-commits
mailing list