FIX BUG 32559

This commit is contained in:
Dózsa Bálint 2011-03-21 12:07:52 +00:00 committed by Caolán McNamara
parent dcc88f5a0e
commit 01f05e73c0
3 changed files with 37 additions and 1 deletions

View file

@ -1497,6 +1497,12 @@ interface BaseText
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_ROTATE_CASE
[
ExecMethod = ExecRotateTransliteration;
StateMethod = NoState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_TRANSLITERATE_UPPER
[
ExecMethod = ExecTransliteration;

View file

@ -38,6 +38,7 @@ class SvxHyperlinkItem;
class SwTextShell: public SwBaseShell
{
SwFldMgr* pPostItFldMgr;
sal_uInt32 nF3ShiftCounter;
void InsertSymbol( SfxRequest& );
void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem);
@ -77,6 +78,7 @@ public:
void ExecAttr(SfxRequest &);
void ExecDB(SfxRequest &);
void ExecTransliteration(SfxRequest &);
void ExecRotateTransliteration(SfxRequest &);
void GetAttrState(SfxItemSet &);

View file

@ -998,8 +998,36 @@ void SwTextShell::ExecTransliteration( SfxRequest & rReq )
}
}
void SwTextShell::ExecRotateTransliteration( 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 )
GetShell().TransliterateText( nMode );
nF3ShiftCounter++;
}
}
}
SwTextShell::SwTextShell(SwView &_rView) :
SwBaseShell(_rView), pPostItFldMgr( 0 )
SwBaseShell(_rView), pPostItFldMgr( 0 ), nF3ShiftCounter(0)
{
SetName(String::CreateFromAscii("Text"));
SetHelpId(SW_TEXTSHELL);