diff options
Diffstat (limited to 'sd')
-rwxr-xr-x[-rw-r--r--] | sd/sdi/_drvwsh.sdi | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/sdi/drtxtob.sdi | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/sdi/outlnvsh.sdi | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/drtxtob.cxx | 31 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/drtxtob1.cxx | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/drviews8.cxx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/drviewse.cxx | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/drviewsf.cxx | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/outlnvs2.cxx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/outlnvsh.cxx | 20 | ||||
-rwxr-xr-x | sd/uiconfig/sdraw/menubar/menubar.xml | 15 | ||||
-rwxr-xr-x | sd/uiconfig/simpress/menubar/menubar.xml | 7 |
12 files changed, 130 insertions, 11 deletions
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index dd8a9c0d7..6b338c71f 100644..100755 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2173,6 +2173,21 @@ interface DrawView ExecMethod = FuSupport ; StateMethod = GetCtrlState ; ] + SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] SID_TRANSLITERATE_LOWER // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi index a932f8f52..a2d48deec 100644..100755 --- a/sd/sdi/drtxtob.sdi +++ b/sd/sdi/drtxtob.sdi @@ -202,5 +202,11 @@ shell TextObjectBar ExecMethod = Execute; StateMethod = GetAttrState; ] + SID_THES + [ + ExecMethod = Execute ; + StateMethod = GetAttrState ; + ] + } diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi index 5ecd3d490..e4f3b2a64 100644..100755 --- a/sd/sdi/outlnvsh.sdi +++ b/sd/sdi/outlnvsh.sdi @@ -433,6 +433,21 @@ interface OutlineView ExecMethod = FuSupport ; StateMethod = GetMenuState ; ] + SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] + SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] SID_TRANSLITERATE_UPPER // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 5281b897a..a40a75ab3 100644..100755 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -32,6 +32,14 @@ #include <svx/svxids.hrc> +#include <i18npool/mslangid.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/lspcitem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/editview.hxx> +#include <editeng/editeng.hxx> +#include <editeng/outliner.hxx> +#include <editeng/unolingu.hxx> #include <editeng/ulspitem.hxx> #include <editeng/lspcitem.hxx> #include <editeng/adjitem.hxx> @@ -39,6 +47,7 @@ #include <sfx2/app.hxx> #include <svl/whiter.hxx> #include <svl/itempool.hxx> +#include <svl/stritem.hxx> #include <svl/style.hxx> #include <svl/languageoptions.hxx> #include <sfx2/tplpitem.hxx> @@ -71,6 +80,8 @@ using namespace sd; +using namespace ::com::sun::star; + #define TextObjectBar #include "sdslots.hxx" @@ -371,6 +382,26 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) } break; + case SID_THES: + { + EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();; + String aStatusVal; + LanguageType nLang = LANGUAGE_NONE; + bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView ); + rSet.Put( SfxStringItem( SID_THES, aStatusVal ) ); + + // disable "Thesaurus" context menu entry if there is nothing to look up + lang::Locale aLocale( SvxCreateLocale( nLang ) ); + uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() ); + if (!bIsLookUpWord || + !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale )) + rSet.DisableItem( SID_THES ); + + //! avoid puting the same item as SfxBoolItem at the end of this function + nSlotId = 0; + } + break; + default: break; } diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 69554ecdd..db1792ba6 100644..100755 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -30,8 +30,12 @@ #include "TextObjectBar.hxx" + #include <svx/svxids.hrc> +#include <editeng/editview.hxx> +#include <editeng/editeng.hxx> +#include <editeng/unolingu.hxx> #include <editeng/outliner.hxx> #include <editeng/ulspitem.hxx> #include <editeng/lspcitem.hxx> @@ -331,6 +335,16 @@ void TextObjectBar::Execute( SfxRequest &rReq ) } break; + case SID_THES: + { + String aReplaceText; + SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False ); + if (pItem2) + aReplaceText = pItem2->GetValue(); + if (aReplaceText.Len() > 0) + ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText ); + } + break; default: { diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx index beb6b2fbb..beb6b2fbb 100644..100755 --- a/sd/source/ui/view/drviews8.cxx +++ b/sd/source/ui/view/drviews8.cxx diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 3cb0fbbc4..92c024a70 100644..100755 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -31,7 +31,8 @@ #include <com/sun/star/presentation/XPresentation2.hpp> #include <com/sun/star/form/FormButtonType.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/i18n/TransliterationModules.hdl> +#include <com/sun/star/i18n/TransliterationModules.hpp> +#include <com/sun/star/i18n/TransliterationModulesExtra.hpp> #include <comphelper/processfactory.hxx> @@ -1401,6 +1402,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) } break; + case SID_TRANSLITERATE_SENTENCE_CASE: + case SID_TRANSLITERATE_TITLE_CASE: + case SID_TRANSLITERATE_TOGGLE_CASE: case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: case SID_TRANSLITERATE_HALFWIDTH: @@ -1416,6 +1420,15 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) switch( nSId ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nType = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nType = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nType = TransliterationModules_LOWERCASE_UPPERCASE; break; diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 52806bf46..c3accabc2 100644..100755 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -250,6 +250,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_KATAGANA, sal_True ); } + rSet.DisableItem( SID_TRANSLITERATE_SENTENCE_CASE ); + rSet.DisableItem( SID_TRANSLITERATE_TITLE_CASE ); + rSet.DisableItem( SID_TRANSLITERATE_TOGGLE_CASE ); rSet.DisableItem( SID_TRANSLITERATE_UPPER ); rSet.DisableItem( SID_TRANSLITERATE_LOWER ); rSet.DisableItem( SID_TRANSLITERATE_HALFWIDTH ); diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index f96f35399..f96f35399 100644..100755 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index f55f5fcb2..6d764ef4a 100644..100755 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -59,7 +59,8 @@ #include <svx/svdorect.hxx> #include <sot/formats.hxx> #include <com/sun/star/linguistic2/XThesaurus.hpp> -#include <com/sun/star/i18n/TransliterationModules.hdl> +#include <com/sun/star/i18n/TransliterationModules.hpp> +#include <com/sun/star/i18n/TransliterationModulesExtra.hpp> #include <editeng/unolingu.hxx> #include <comphelper/processfactory.hxx> #include <editeng/outlobj.hxx> @@ -528,6 +529,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) std::auto_ptr< OutlineViewModelChangeGuard > aGuard; if( pOlView && ( + (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) || + (nSlot == SID_TRANSLITERATE_TITLE_CASE) || + (nSlot == SID_TRANSLITERATE_TOGGLE_CASE) || (nSlot == SID_TRANSLITERATE_UPPER) || (nSlot == SID_TRANSLITERATE_LOWER) || (nSlot == SID_TRANSLITERATE_HALFWIDTH) || @@ -661,6 +665,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) } break; + case SID_TRANSLITERATE_SENTENCE_CASE: + case SID_TRANSLITERATE_TITLE_CASE: + case SID_TRANSLITERATE_TOGGLE_CASE: case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: case SID_TRANSLITERATE_HALFWIDTH: @@ -676,6 +683,15 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) switch( nSlot ) { + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = TransliterationModulesExtra::SENTENCE_CASE; + break; + case SID_TRANSLITERATE_TITLE_CASE: + nType = TransliterationModulesExtra::TITLE_CASE; + break; + case SID_TRANSLITERATE_TOGGLE_CASE: + nType = TransliterationModulesExtra::TOGGLE_CASE; + break; case SID_TRANSLITERATE_UPPER: nType = TransliterationModules_LOWERCASE_UPPERCASE; break; @@ -988,7 +1004,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) GetDoc()->SetChanged(TRUE); } - // Da šberladen, muss hier der Status gesetzt werden + // Da �berladen, muss hier der Status gesetzt werden if( !GetDocSh()->IsModified() ) { rSet.DisableItem( SID_SAVEDOC ); diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index 1373bfd60..91a69adea 100755 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -186,12 +186,15 @@ <menu:menuseparator/> <menu:menu menu:id=".uno:TransliterateMenu"> <menu:menupopup> - <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/> - <menu:menuitem menu:id=".uno:ChangeCaseToLower"/> - <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/> - <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/> - <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/> - <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/> + <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/> + <menu:menuitem menu:id=".uno:ChangeCaseToLower"/> + <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/> + <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/> + <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/> + <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/> + <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/> + <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/> + <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/> </menu:menupopup> </menu:menu> <menu:menuseparator/> diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index 59bf75aa1..90d5ac490 100755 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -203,8 +203,11 @@ <menu:menuseparator/> <menu:menu menu:id=".uno:TransliterateMenu"> <menu:menupopup> - <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/> + <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/> <menu:menuitem menu:id=".uno:ChangeCaseToLower"/> + <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/> + <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/> + <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/> <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/> <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/> <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/> @@ -239,7 +242,7 @@ <menu:menupopup> <menu:menuitem menu:id=".uno:HangulHanjaConversion"/> <menu:menuitem menu:id=".uno:ChineseConversion"/> - <menu:menuitem menu:id=".uno:Thesaurus"/> + <menu:menuitem menu:id=".uno:ThesaurusDialog"/> <menu:menuitem menu:id=".uno:Hyphenation"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:MoreDictionaries"/> |