summaryrefslogtreecommitdiff
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
commit558b3088701231a85c50a51839d28e8399c1efe0 (patch)
tree06b99b550928b6e7ea189476ba0a8835911a0a8c
parent24e06c16aafacbae01f7803f9906f3a4f3b94c51 (diff)
centralize caserotate
-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 8b3aef85a..b80dbedf7 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 10142cf14..f09ed4607 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 534aa4f49..733af6756 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() );
}
}