[Libreoffice-commits] .: sd/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Mar 30 07:57:36 PDT 2011
sd/source/ui/inc/DrawViewShell.hxx | 3 ++-
sd/source/ui/view/drviewsa.cxx | 1 -
sd/source/ui/view/drviewse.cxx | 29 +++++++++--------------------
3 files changed, 11 insertions(+), 22 deletions(-)
New commits:
commit 558b3088701231a85c50a51839d28e8399c1efe0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 29 21:10:46 2011 +0100
centralize caserotate
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 8b3aef8..b80dbed 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -37,6 +37,7 @@
#include "pres.hxx"
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/scanner/XScannerManager.hpp>
+#include <unotools/caserotate.hxx>
class SdPage;
class DrawDocShell;
@@ -436,7 +437,7 @@ private:
*/
bool mbIsInSwitchPage;
- sal_uInt32 nF3ShiftCounter;
+ RotateTransliteration m_aRotateCase;
void Construct (DrawDocShell* pDocSh, PageKind ePageKind);
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 10142cf..f09ed46 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -142,7 +142,6 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
, maTabControl(this, pParentWindow)
, mbIsLayerModeActive(false)
, mbIsInSwitchPage(false)
-, nF3ShiftCounter(0)
{
if (pFrameViewArgument != NULL)
mpFrameView = pFrameViewArgument;
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 534aa4f..733af67 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1487,30 +1487,19 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
void DrawViewShell::FuSupportRotate(SfxRequest &rReq)
{
- using namespace ::com::sun::star::i18n;
+ if( rReq.GetSlot() == SID_TRANSLITERATE_ROTATE_CASE )
{
- sal_uInt32 nMode = 0;
- OutlinerView* pOLV = GetView()->GetTextEditOutlinerView();
+ ::sd::View* pView = GetView();
- if( rReq.GetSlot() == SID_TRANSLITERATE_ROTATE_CASE ) {
- switch ( nF3ShiftCounter ) {
- case 0:
- nMode = TransliterationModulesExtra::TITLE_CASE;
- break;
- case 1:
- nMode = TransliterationModules_LOWERCASE_UPPERCASE;
- break;
- case 2:
- nMode = TransliterationModules_UPPERCASE_LOWERCASE;
- nF3ShiftCounter = -1;
- break;
- }
+ if (!pView)
+ return;
- if ( nMode )
- pOLV->TransliterateText( nMode );
+ OutlinerView* pOLV = pView->GetTextEditOutlinerView();
- nF3ShiftCounter++;
- }
+ if (!pOLV)
+ return;
+
+ pOLV->TransliterateText( m_aRotateCase.getNextMode() );
}
}
More information about the Libreoffice-commits
mailing list