summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDózsa Bálint <dozsa@linux-dugf.site>2011-03-21 12:10:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-03-21 12:10:06 +0000
commit0f3f608ea064d00ffea9c14e7e366615871b208b (patch)
tree76b3758582ce5c42d35592873fdd75d5e9f160ab
parent63357d5068f9a9488950688180b70fe49976ca63 (diff)
FIX BUG 32559 - calc
-rw-r--r--sc/sdi/cellsh.sdi1
-rw-r--r--sc/source/ui/inc/cellsh.hxx3
-rw-r--r--sc/source/ui/view/cellsh.cxx3
-rw-r--r--sc/source/ui/view/cellsh1.cxx30
4 files changed, 36 insertions, 1 deletions
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index b4bd22821..9ad0621dd 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 4c87cba0e..6129fcf2c 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 5d6c875c8..53be26f48 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -86,7 +86,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 d64010aeb..c65c54e76 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, sal_uLong _nRefresh, SfxRequest& _rRequest )