diff options
author | Dózsa Bálint <dozsa@linux-dugf.site> | 2011-03-21 12:10:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-21 12:10:06 +0000 |
commit | 74cac597d25ed613072e9a607115de420beecd98 (patch) | |
tree | f8334ac8749845ba423c95559d22b841375b6d93 /sc | |
parent | d5d663c24dda5ca0106ad32b84a1a8d825cd4874 (diff) |
FIX BUG 32559 - calc
Diffstat (limited to 'sc')
-rw-r--r-- | sc/sdi/cellsh.sdi | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/cellsh.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 3 | ||||
-rw-r--r-- | 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 a50f2e963713..011b813b86a4 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 6bbdd8ab6e27..6cf1075d6267 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 209fff0eae38..a7ec42c615c5 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 c5cb779ee2a4..64febde3a460 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 ) |