FIX BUG 32559
This commit is contained in:
parent
dcc88f5a0e
commit
01f05e73c0
3 changed files with 37 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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 &);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue