summaryrefslogtreecommitdiff
path: root/sd/source/ui
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
parent216df6626e327b61d6c0f572c0458864a94aa59a (diff)
centralize caserotate
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx3
-rw-r--r--sd/source/ui/view/drviewsa.cxx1
-rw-r--r--sd/source/ui/view/drviewse.cxx29
3 files changed, 11 insertions, 22 deletions
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index ded8df20a0d8..910f0d4f571c 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 34f500da862b..3c4bdb0ab9cc 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 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() );
}
}