summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-07 15:25:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-05-11 12:17:42 +0000
commit82d68f9cbce4073a727c43b4a8e81d39871b71eb (patch)
tree64b3a9e1092586afee46899adfd00070821613b8 /reportdesign
parent19ea033f380aa196c9c868a3cdb43e967eb42abe (diff)
convert COMMAND_ constants to scoped enum
Change-Id: I88e67f89dbbab0646e8f106dfeb32c6ee1bb0b95 Reviewed-on: https://gerrit.libreoffice.org/15671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx8
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx38
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx6
4 files changed, 26 insertions, 28 deletions
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 839fa91abfde..ff786a5fce33 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -723,7 +723,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt)
{
switch (rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
if (!rEvt.IsMouseEvent())
{
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 13c4e5a9066c..f65a642278e0 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -275,9 +275,9 @@ void NavigatorTree::dispose()
void NavigatorTree::Command( const CommandEvent& rEvt )
{
bool bHandled = false;
- switch( rEvt.GetCommand() )
+ switch( rEvt.GetCommand())
{
- case COMMAND_CONTEXTMENU:
+ case CommandEventId::ContextMenu:
{
// die Stelle, an der geklickt wurde
SvTreeListEntry* ptClickedOn = NULL;
@@ -349,7 +349,9 @@ void NavigatorTree::Command( const CommandEvent& rEvt )
}
bHandled = true;
- } break;
+ }
+ break;
+ default: break;
}
if (!bHandled)
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index d8e97db06131..ae97c8ef5fa2 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -475,33 +475,29 @@ void lcl_insertMenuItemImages(
void OReportSection::Command( const CommandEvent& _rCEvt )
{
Window::Command(_rCEvt);
- switch (_rCEvt.GetCommand())
+ if (_rCEvt.GetCommand() == CommandEventId::ContextMenu)
{
- case COMMAND_CONTEXTMENU:
- {
- OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
- uno::Reference<frame::XFrame> xFrame = rController.getFrame();
- PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
- uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition();
+ OReportController& rController = m_pParent->getViewsWindow()->getView()->getReportView()->getController();
+ uno::Reference<frame::XFrame> xFrame = rController.getFrame();
+ PopupMenu aContextMenu( ModuleRes( RID_MENU_REPORT ) );
+ uno::Reference< report::XReportDefinition> xReportDefinition = getSection()->getReportDefinition();
- lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame);
+ lcl_insertMenuItemImages(aContextMenu,rController,xReportDefinition,xFrame);
- Point aPos = _rCEvt.GetMousePosPixel();
- m_pView->EndAction();
- const sal_uInt16 nId = aContextMenu.Execute(this, aPos);
- if ( nId )
+ Point aPos = _rCEvt.GetMousePosPixel();
+ m_pView->EndAction();
+ const sal_uInt16 nId = aContextMenu.Execute(this, aPos);
+ if ( nId )
+ {
+ uno::Sequence< beans::PropertyValue> aArgs;
+ if ( nId == SID_ATTR_CHAR_COLOR_BACKGROUND )
{
- uno::Sequence< beans::PropertyValue> aArgs;
- if ( nId == SID_ATTR_CHAR_COLOR_BACKGROUND )
- {
- aArgs.realloc(1);
- aArgs[0].Name = "Selection";
- aArgs[0].Value <<= m_xSection;
- }
- rController.executeChecked(nId,aArgs);
+ aArgs.realloc(1);
+ aArgs[0].Name = "Selection";
+ aArgs[0].Value <<= m_xSection;
}
+ rController.executeChecked(nId,aArgs);
}
- break;
}
}
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index ba789bc9f774..938fd45942db 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -330,9 +330,9 @@ bool OScrollWindowHelper::Notify( NotifyEvent& rNEvt )
{
const CommandEvent* pCommandEvent = rNEvt.GetCommandEvent();
if ( pCommandEvent &&
- ( ((pCommandEvent->GetCommand() == COMMAND_WHEEL) ||
- (pCommandEvent->GetCommand() == COMMAND_STARTAUTOSCROLL) ||
- (pCommandEvent->GetCommand() == COMMAND_AUTOSCROLL))) )
+ ( ((pCommandEvent->GetCommand() == CommandEventId::Wheel) ||
+ (pCommandEvent->GetCommand() == CommandEventId::StartAutoScroll) ||
+ (pCommandEvent->GetCommand() == CommandEventId::AutoScroll))) )
{
ScrollBar* pHScrBar = NULL;
ScrollBar* pVScrBar = NULL;