diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2021-01-10 22:01:38 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-02 09:24:31 +0100 |
commit | 5544c178975d480242151083d6c72d42b88a1db4 (patch) | |
tree | ea6b75e9e2374453f51e83fb33f5249e03d1ec85 /sd/source | |
parent | ddc0714c40c6ea85336431a88b523f3e5c63a3f8 (diff) |
tdf#134281 [API-CHANGE] Add keyboard shortcut for UsePen and EraseInk
As suggested by UX meeting:
- Remove P and N keys from previous/next slide
- Assign them to Pen (on=off) and erase ink commands
Do this for presenter console as well.
Modify help text of the presenter console to reflect these changes.
Change-Id: I28d2178f7391739d4f8f5e8f63ab54714fcc97c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109108
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 13 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.hxx | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index b10d116218c4..41c331644ac2 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1756,7 +1756,6 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt) case KEY_SPACE: case KEY_RIGHT: case KEY_DOWN: - case KEY_N: gotoNextEffect(); break; @@ -1801,11 +1800,19 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt) [[fallthrough]]; case KEY_LEFT: case KEY_UP: - case KEY_P: case KEY_BACKSPACE: gotoPreviousEffect(); break; + case KEY_P: + setUsePen( !mbUsePen ); + break; + + case KEY_E: + setEraseAllInk( true ); + updateSlideShow(); + break; + case KEY_HOME: gotoFirstSlide(); break; @@ -2685,7 +2692,7 @@ void SAL_CALL SlideshowImpl::setPenColor( sal_Int32 nColor ) setUsePen( true ); // enable pen mode, update color } -void SlideshowImpl::setEraseAllInk(bool bEraseAllInk) +void SAL_CALL SlideshowImpl::setEraseAllInk(sal_Bool bEraseAllInk) { if( !bEraseAllInk ) return; diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 8f848a4f1aa9..5fbd564fc00f 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -146,7 +146,7 @@ public: virtual double SAL_CALL getPenWidth() override; virtual void SAL_CALL setPenWidth( double dStrokeWidth ) override; /// @throws css::uno::RuntimeException - void setEraseAllInk( bool bEraseAllInk ); + virtual void SAL_CALL setEraseAllInk( sal_Bool bEraseAllInk ) override; virtual sal_Bool SAL_CALL isRunning( ) override; virtual ::sal_Int32 SAL_CALL getSlideCount( ) override; virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) override; |