diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-06 13:51:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-07 06:01:27 +0000 |
commit | d91c81e4335ccf6a383d1d66d789f2478c92bc7a (patch) | |
tree | b83dfcaca42fddd5a6128a049e45b1f09046d82c /svx | |
parent | c57cbcea9a4434eddba31d185e738cc7e3fbd73c (diff) |
convert GalleryBrowserTravel to scoped enum
and drop unused GALLERYBROWSERTRAVEL_CURRENT value
Change-Id: Id91824cbe024d4b5109ee0755b518164837bc6a6
Reviewed-on: https://gerrit.libreoffice.org/33965
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/galbrws2.hxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 8 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 8 |
3 files changed, 10 insertions, 14 deletions
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx index e7168f03f97f..3db2b5a37203 100644 --- a/svx/inc/galbrws2.hxx +++ b/svx/inc/galbrws2.hxx @@ -44,13 +44,9 @@ enum GalleryBrowserMode }; -enum GalleryBrowserTravel +enum class GalleryBrowserTravel { - GALLERYBROWSERTRAVEL_CURRENT = 0, - GALLERYBROWSERTRAVEL_FIRST = 1, - GALLERYBROWSERTRAVEL_LAST = 2, - GALLERYBROWSERTRAVEL_PREVIOUS = 3, - GALLERYBROWSERTRAVEL_NEXT = 4 + First, Last, Previous, Next }; enum class GalleryItemFlags { diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index f7a3be6c27b4..2f3927b5f6cd 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -855,10 +855,10 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) switch( eTravel ) { - case GALLERYBROWSERTRAVEL_FIRST: nNewItemId = 1; break; - case GALLERYBROWSERTRAVEL_LAST: nNewItemId = mpCurTheme->GetObjectCount(); break; - case GALLERYBROWSERTRAVEL_PREVIOUS: nNewItemId--; break; - case GALLERYBROWSERTRAVEL_NEXT: nNewItemId++; break; + case GalleryBrowserTravel::First: nNewItemId = 1; break; + case GalleryBrowserTravel::Last: nNewItemId = mpCurTheme->GetObjectCount(); break; + case GalleryBrowserTravel::Previous: nNewItemId--; break; + case GalleryBrowserTravel::Next: nNewItemId++; break; default: break; } diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 0bd9ba3aa44f..f7f9edbdcde2 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -170,21 +170,21 @@ void GalleryPreview::KeyInput(const KeyEvent& rKEvt) break; case KEY_HOME: - pBrowser->Travel( GALLERYBROWSERTRAVEL_FIRST ); + pBrowser->Travel( GalleryBrowserTravel::First ); break; case KEY_END: - pBrowser->Travel( GALLERYBROWSERTRAVEL_LAST ); + pBrowser->Travel( GalleryBrowserTravel::Last ); break; case KEY_LEFT: case KEY_UP: - pBrowser->Travel( GALLERYBROWSERTRAVEL_PREVIOUS ); + pBrowser->Travel( GalleryBrowserTravel::Previous ); break; case KEY_RIGHT: case KEY_DOWN: - pBrowser->Travel( GALLERYBROWSERTRAVEL_NEXT ); + pBrowser->Travel( GalleryBrowserTravel::Next ); break; default: |