diff options
Diffstat (limited to 'sd/source')
-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 |
7 files changed, 80 insertions, 3 deletions
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index bcff1c573b14..8b88be3682e3 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 4ca26501fedb..4a6d83e376e7 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 54cd0c792c94..54cd0c792c94 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 1a667b28f6d4..6f6f49fdc93c 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 0a5f743bb738..ac6b46f3018b 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 2acf143ff0b3..2acf143ff0b3 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 1467e6c24bd0..bbdcf35a4e34 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 ); |