Hi,

Here is the correction patch (remove global variable).

Regards,
Balint Dozsa


2011. március 8. 7:33 Bálint Dózsa írta, <dozsabal...@gmail.com>:

> The revised link is: https://bugs.freedesktop.org/show_bug.cgi?id=32559
>
> 2011. március 8. 7:23 Bálint Dózsa írta, <dozsabal...@gmail.com>:
>
> Hi,
>>
>> I fixed this bug: 
>> https://bugs.freedesktop.org/show_bug.cgi?id=32559<https://bugs.freedesktop.org/show_bug.cgi?id=32552>
>> Please review the patch.
>> My code is under the LGPLv3+/MPL dual license.
>>
>> Regards,
>> Balint Dozsa
>>
>
>
From 1f986b1f6e88b4fb354fd3ac1b3053d550ca81be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabal...@gmail.com>
Date: Wed, 9 Mar 2011 15:46:08 +0100
Subject: [PATCH] FIX BUG 32559

---
 sw/source/ui/docvw/edtwin.cxx |   30 +++++++++++++++++++++++++++++-
 sw/source/ui/inc/edtwin.hxx   |    3 +++
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 97614ab..e8b63a7 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -139,8 +139,12 @@
 
 #include "../../core/inc/rootfrm.hxx"
 
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
+
 using namespace sw::mark;
 using namespace ::com::sun::star;
+using namespace ::com::sun::star::i18n;
 
 /*--------------------------------------------------------------------
     Description:   Globals
@@ -1764,6 +1768,29 @@ KEYINPUT_CHECKTABLE_INSDEL:
                         eKeyState = KS_SpecialInsert;
                     break;
 
+                case KEY_F3 | KEY_SHIFT:     //SHIFT+F3
+                    nMode = 0;
+
+                    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 ( nMode )
+                        rSh.TransliterateText(nMode);
+
+                    nF3ShiftCounter++;
+
+                    break;
+
                 case KEY_BACKSPACE:
                 case KEY_BACKSPACE | KEY_SHIFT:
                     if( !rSh.HasReadonlySel() )
@@ -4446,7 +4473,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
     bLockInput(FALSE),
     bObjectSelect( FALSE ),
     nKS_NUMDOWN_Count(0),
-    nKS_NUMINDENTINC_Count(0)
+    nKS_NUMINDENTINC_Count(0),
+    nF3ShiftCounter(0)
 {
     SetHelpId(HID_EDIT_WIN);
     EnableChildTransparentMode();
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index b139e72..bdc3eca 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -145,6 +145,9 @@ friend void 	PageNumNotify( 	ViewShell* pVwSh,
 
     USHORT          nKS_NUMDOWN_Count; // #i23725#
     USHORT          nKS_NUMINDENTINC_Count;
+    sal_uInt32      nF3ShiftCounter;
+
+    sal_uInt32      nMode;
 
     void			LeaveArea(const Point &);
     void			JustifyAreaTimer();
-- 
1.7.1

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to