Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I did tentatively the modification for calc, and draw. It works for me.

Balint

2011. március 16. 22:26 Caolán McNamara írta, <caolanm@redhat.com>:

On Wed, 2011-03-16 at 21:45 +0100, Bálint Dózsa wrote:
Hi,

Here is a modification. (Shift+F3 is not hardcoded)

Cool, this looks good stuff on first glance.

Probably a few open questions around handling the e.g. "annotation"
shell for using it inside those insert->comment things, and whether it
should be a writer only feature and/or in calc/draw too.

Not sure about whether we should e.g. reset the mode when moving from
one place to another in the document or detect the current case mode
based on the selection and shift to the next one rather than hook off a
count.

If noone else gets around to this by Fri I'll have a look at sticking
this in.

C.


From 5ac5046adc66885a0a2b9b5059b37682b5dfc6fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabalint@gmail.com>
Date: Thu, 17 Mar 2011 14:21:13 +0100
Subject: [PATCH] FIX BUG 32559 - calc

---
 sc/sdi/cellsh.sdi             |    1 +
 sc/source/ui/inc/cellsh.hxx   |    3 +++
 sc/source/ui/view/cellsh.cxx  |    3 ++-
 sc/source/ui/view/cellsh1.cxx |   30 ++++++++++++++++++++++++++++++
 4 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index b4bd228..9ad0621 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -197,6 +197,7 @@ interface CellSelection
     SID_TRANSLITERATE_SENTENCE_CASE [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ]
     SID_TRANSLITERATE_TITLE_CASE    [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ]
     SID_TRANSLITERATE_TOGGLE_CASE   [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ]
+    SID_TRANSLITERATE_ROTATE_CASE   [ ExecMethod = ExecuteRotateTrans; StateMethod = 
GetBlockState; ]
     SID_TRANSLITERATE_UPPER            [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ]
     SID_TRANSLITERATE_LOWER            [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ]
     SID_TRANSLITERATE_HALFWIDTH        [ ExecMethod = ExecuteTrans; StateMethod = GetBlockState; ]
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 3614389..dbe6262 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -71,6 +71,8 @@ private:
     DECL_LINK( ClipboardChanged, TransferableDataHelper* );
     DECL_LINK( DialogClosed, AbstractScLinkedAreaDlg* );
 
+    sal_uInt32  nF3ShiftCounter;
+
 public:
 
     TYPEINFO();
@@ -84,6 +86,7 @@ public:
 
     void               ExecuteEdit( SfxRequest& rReq );
     void               ExecuteTrans( SfxRequest& rReq );
+    void                ExecuteRotateTrans( SfxRequest& rReq );
 
     void               GetBlockState( SfxItemSet& rSet );
     void               GetCellState( SfxItemSet& rSet );
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 7c52a2d..1fdfa03 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -89,7 +89,8 @@ SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) )
 ScCellShell::ScCellShell(ScViewData* pData) :
     ScFormatShell(pData),
     pImpl( new CellShell_Impl() ),
-    bPastePossible(FALSE)
+    bPastePossible(FALSE),
+    nF3ShiftCounter(0)
 {
     SetHelpId(HID_SCSHELL_CELLSH);
     SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Cell")));
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 26938b7..22097a0 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -112,6 +112,8 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <cppuhelper/bootstrap.hxx>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
 
 #include <boost/scoped_ptr.hpp>
 
@@ -2088,6 +2090,34 @@ void ScCellShell::ExecuteTrans( SfxRequest& rReq )
     }
 }
 
+void ScCellShell::ExecuteRotateTrans( SfxRequest& rReq )
+{
+    using namespace ::com::sun::star::i18n;
+    {
+        sal_uInt32 nMode = 0;
+
+        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 ( nMode )
+                GetViewData()->GetView()->TransliterateText( nMode );
+
+            nF3ShiftCounter++;
+        }
+    }
+}
+
 void ScCellShell::ExecuteExternalSource(
     const String& _rFile, const String& _rFilter, const String& _rOptions,
     const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest )
-- 
1.7.3.4

From bf8a4a232bbc976e4e7685f33ede4c32183add5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabalint@gmail.com>
Date: Thu, 17 Mar 2011 15:53:50 +0100
Subject: [PATCH] FIX BUG 32559 - draw

---
 sd/sdi/_drvwsh.sdi                 |    5 +++++
 sd/source/ui/inc/DrawViewShell.hxx |    3 +++
 sd/source/ui/view/drviewsa.cxx     |    1 +
 sd/source/ui/view/drviewse.cxx     |   29 +++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 554dd88..59d2337 100755
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2159,6 +2159,11 @@ interface DrawView
         ExecMethod = FuSupport ;
         StateMethod = GetCtrlState ;
     ]
+    SID_TRANSLITERATE_ROTATE_CASE // ole : no, status : ?
+    [
+        ExecMethod = FuSupportRotate ;
+        StateMethod = GetCtrlState ;
+    ]
     SID_TRANSLITERATE_LOWER // ole : no, status : ?
     [
         ExecMethod = FuSupport ;
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index be9207f..94bfeb3 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -72,6 +72,8 @@ class DrawViewShell
     : public ViewShell,
       public SfxListener
 {
+    sal_uInt32  nF3ShiftCounter;
+
 public:
     static const int SLOTARRAY_COUNT = 24;
 
@@ -218,6 +220,7 @@ public:
     void               FuTemporary(SfxRequest& rReq);
     void               FuPermanent(SfxRequest& rReq);
     void               FuSupport(SfxRequest& rReq);
+    void                FuSupportRotate(SfxRequest& rReq);
     void               FuTable(SfxRequest& rReq);
 
     void               AttrExec (SfxRequest& rReq);
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index c8779b0..727c32b 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -140,6 +140,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
 : ViewShell (pFrame, pParentWindow, rViewShellBase)
 , maTabControl(this, pParentWindow)
 , 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 17a01f7..e532903 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1475,6 +1475,35 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
     }
 }
 
+void DrawViewShell::FuSupportRotate(SfxRequest &rReq)
+{
+    using namespace ::com::sun::star::i18n;
+    {
+        sal_uInt32 nMode = 0;
+        OutlinerView* pOLV = GetView()->GetTextEditOutlinerView();
+
+        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 ( nMode )
+                pOLV->TransliterateText( nMode );
+
+            nF3ShiftCounter++;
+        }
+    }
+}
+
 /*************************************************************************
 |*
 |* URL-Feld einfuegen
-- 
1.7.3.4

From 155e69d09a29ec733e8e603738a3f4833d88db8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C3=A1lint=20D=C3=B3zsa?= <dozsabalint@gmail.com>
Date: Thu, 17 Mar 2011 15:55:39 +0100
Subject: [PATCH] FIX BUG 32559 - officecfg

---
 .../data/org/openoffice/Office/Accelerators.xcu    |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index de1380a..0962939 100755
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -538,6 +538,11 @@
       <value xml:lang="en-US">.uno:DefineName</value>
      </prop>
     </node>
+    <node oor:name="F3_SHIFT" oor:op="replace">
+     <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
+      <value xml:lang="en-US">.uno:ChangeCaseRotateCase</value>
+     </prop>
+    </node>
     <node oor:name="F4" oor:op="replace">
      <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
       <value xml:lang="en-US">.uno:ViewDataSourceBrowser</value>
@@ -1110,10 +1115,15 @@
       <value xml:lang="en-US">.uno:LeaveGroup</value>
      </prop>
     </node>
-    <node oor:name="F3_SHIFT" oor:op="replace">
+    <!--<node oor:name="F3_SHIFT" oor:op="replace">
      <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
       <value xml:lang="en-US">.uno:CopyObjects</value>
      </prop>
+    </node>-->
+    <node oor:name="F3_SHIFT" oor:op="replace">
+     <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
+      <value xml:lang="en-US">.uno:ChangeCaseRotateCase</value>
+     </prop>
     </node>
     <node oor:name="F4" oor:op="replace">
      <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.