summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewse.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-29 21:10:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-03-30 09:17:33 +0100
commitdac59047be88f2a66478c46df0ff24872b843b79 (patch)
tree00bca554bc9d3fcb09187673bb1b401fecdc38e7 /sd/source/ui/view/drviewse.cxx
parent216df6626e327b61d6c0f572c0458864a94aa59a (diff)
centralize caserotate
Diffstat (limited to 'sd/source/ui/view/drviewse.cxx')
-rw-r--r--sd/source/ui/view/drviewse.cxx29
1 files changed, 9 insertions, 20 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index beeb4fbc9665..251efb9de02d 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() );
}
}