diff options
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 22 | ||||
-rw-r--r-- | cui/source/dialogs/hyphen.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optdict.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/edtspell.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 4 | ||||
-rw-r--r-- | editeng/source/misc/splwrap.cxx | 10 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/unolingu.cxx | 40 | ||||
-rw-r--r-- | include/editeng/unolingu.hxx | 24 | ||||
-rw-r--r-- | svx/source/dialog/langbox.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/lingu/olmenu.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 2 |
16 files changed, 50 insertions, 114 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 528489f0b721..a18cafd9ee27 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -254,7 +254,7 @@ void SpellDialog::dispose() if (pImpl.get()) { // save possibly modified user-dictionaries - Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); if (xDicList.is()) SaveDictionaries( xDicList ); @@ -314,7 +314,7 @@ void SpellDialog::Init_Impl() m_pLanguageLB->SetLanguageList( SvxLanguageListFlags::SPELL_USED, false, false, true ); m_pSentenceED->ClearModifyFlag(); - SvxGetChangeAllList()->clear(); + LinguMgr::GetChangeAllList()->clear(); } void SpellDialog::UpdateBoxes_Impl() @@ -599,7 +599,7 @@ IMPL_LINK_NOARG_TYPED(SpellDialog, ChangeAllHdl, Button*, void) // add new word to ChangeAll list OUString aOldWord( m_pSentenceED->GetErrorText() ); SvxPrepareAutoCorrect( aOldWord, aString ); - Reference<XDictionary> aXDictionary( SvxGetChangeAllList(), UNO_QUERY ); + Reference<XDictionary> aXDictionary( LinguMgr::GetChangeAllList(), UNO_QUERY ); DictionaryError nAdded = AddEntryToDic( aXDictionary, aOldWord, true, aString, eLang ); @@ -624,7 +624,7 @@ IMPL_LINK_TYPED( SpellDialog, IgnoreAllHdl, Button *, pButton, void ) { m_pSentenceED->UndoActionStart( SPELLUNDO_CHANGE_GROUP ); // add word to IgnoreAll list - Reference< XDictionary > aXDictionary( SvxGetIgnoreAllList(), UNO_QUERY ); + Reference< XDictionary > aXDictionary( LinguMgr::GetIgnoreAllList(), UNO_QUERY ); //in case the error has been changed manually it has to be restored m_pSentenceED->RestoreCurrentError(); if (pButton == m_pIgnoreRulePB) @@ -723,7 +723,7 @@ IMPL_LINK_TYPED( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl&, rAction, voi void SpellDialog::Impl_Restore(bool bUseSavedSentence) { //clear the "ChangeAllList" - SvxGetChangeAllList()->clear(); + LinguMgr::GetChangeAllList()->clear(); //get a new sentence m_pSentenceED->SetText(OUString()); m_pSentenceED->ResetModified(); @@ -819,13 +819,13 @@ int SpellDialog::InitUserDicts() const Reference< XDictionary > *pDic = nullptr; // get list of dictionaries - Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); if (xDicList.is()) { // add active, positive dictionary to dic-list (if not already done). // This is to ensure that there is at least on dictionary to which // words could be added. - Reference< XDictionary > xDic( SvxGetOrCreatePosDic() ); + Reference< XDictionary > xDic( LinguMgr::GetStandardDic() ); if (xDic.is()) xDic->setActive( true ); @@ -846,7 +846,7 @@ int SpellDialog::InitUserDicts() for (sal_Int32 i = 0; i < nSize; ++i) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); - if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp) + if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp) continue; uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY ); @@ -909,7 +909,7 @@ void SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu ) OUString aDicName ( pMenu->GetItemText( nItemId ) ); uno::Reference< linguistic2::XDictionary > xDic; - uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); if (xDicList.is()) xDic = xDicList->getDictionaryByName( aDicName ); @@ -1152,7 +1152,7 @@ bool SpellDialog::ApplyChangeAllList_Impl(SpellPortions& rSentence, bool &bHasRe bHasReplaced = false; bool bRet = true; SpellPortions::iterator aStart = rSentence.begin(); - Reference<XDictionary> xChangeAll( SvxGetChangeAllList(), UNO_QUERY ); + Reference<XDictionary> xChangeAll( LinguMgr::GetChangeAllList(), UNO_QUERY ); if(!xChangeAll->getCount()) return bRet; bRet = false; @@ -1610,7 +1610,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, const css } // maybe the error found here is already in the ChangeAllList and has to be replaced - Reference<XDictionary> xChangeAll( SvxGetChangeAllList(), UNO_QUERY ); + Reference<XDictionary> xChangeAll( LinguMgr::GetChangeAllList(), UNO_QUERY ); Reference<XDictionaryEntry> xEntry; const SpellErrorDescription* pSpellErrorDescription = nullptr; diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index 8d19026e1621..28cbb0bb89ae 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -353,7 +353,7 @@ IMPL_LINK_NOARG_TYPED( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, void { try { - uno::Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() ); + uno::Reference< linguistic2::XLinguProperties > xProp( LinguMgr::GetLinguPropertySet() ); xProp->setIsHyphAuto( true ); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index ef7ad42fa3f6..a4d6b7948ed1 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -135,7 +135,7 @@ IMPL_LINK_NOARG_TYPED(SvxNewDictionaryDialog, OKHdl_Impl, Button*, void) // add extension for personal dictionaries sDict += ".dic"; - Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); Sequence< Reference< XDictionary > > aDics; if (xDicList.is()) @@ -238,8 +238,8 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( get(pDeletePB,"delete"); sNew=pNewReplacePB->GetText(); - if (SvxGetDictionaryList().is()) - aDics = SvxGetDictionaryList()->getDictionaries(); + if (LinguMgr::GetDictionaryList().is()) + aDics = LinguMgr::GetDictionaryList()->getDictionaries(); pWordsLB->SetSelectHdl(LINK(this, SvxEditDictionaryDialog, SelectHdl)); pWordsLB->SetTabs(nStaticTabs); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 29f30ace352c..887d5fd92e42 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -721,7 +721,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() : const Locale& rCurrentLocale = Application::GetSettings().GetLanguageTag().getLocale(); Sequence<Any> aArgs(2);//second arguments has to be empty! - aArgs.getArray()[0] <<= SvxGetLinguPropertySet(); + aArgs.getArray()[0] <<= LinguMgr::GetLinguPropertySet(); //read spell checker Sequence< OUString > aSpellNames = xLinguSrvcMgr->getAvailableServices( @@ -1088,8 +1088,8 @@ SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) else m_pMoreDictsLink->Hide(); - xProp = SvxGetLinguPropertySet(); - xDicList.set( SvxGetDictionaryList(), UNO_QUERY ); + xProp = LinguMgr::GetLinguPropertySet(); + xDicList.set( LinguMgr::GetDictionaryList(), UNO_QUERY ); if (xDicList.is()) { // keep references to all **currently** available dictionaries, @@ -1228,7 +1228,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet ) uno::Reference< XDictionary > xDic( aDics.getConstArray()[ i ] ); if (xDic.is()) { - if (SvxGetIgnoreAllList() == xDic) + if (LinguMgr::GetIgnoreAllList() == xDic) bChecked = true; xDic->setActive( bChecked ); @@ -1545,7 +1545,7 @@ IMPL_LINK_TYPED( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox, if (nPos != TREELIST_ENTRY_NOTFOUND) { const uno::Reference< XDictionary > &rDic = aDics.getConstArray()[ nPos ]; - if (SvxGetIgnoreAllList() == rDic) + if (LinguMgr::GetIgnoreAllList() == rDic) { SvTreeListEntry* pEntry = m_pLinguDicsCLB->GetEntry( nPos ); if (pEntry) @@ -1657,7 +1657,7 @@ IMPL_LINK_TYPED( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void ) xDic = aDics.getConstArray()[ nDicPos ]; if (xDic.is()) { - if (SvxGetIgnoreAllList() == xDic) + if (LinguMgr::GetIgnoreAllList() == xDic) xDic->clear(); else { diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 188c7bde1bda..3b3e52c62506 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -578,7 +578,7 @@ void OfaTreeOptionsDialog::dispose() if (pPageInfo->m_nPageId == RID_SFXPAGE_LINGU) { // write personal dictionaries - Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); if (xDicList.is()) { linguistic::SaveDictionaries( xDicList ); @@ -1169,7 +1169,7 @@ OfaPageResource::OfaPageResource() : SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) { - Reference< XLinguProperties > xProp( SvxGetLinguPropertySet() ); + Reference< XLinguProperties > xProp( LinguMgr::GetLinguPropertySet() ); SfxItemSet* pRet = nullptr; switch(nId) { @@ -1225,7 +1225,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) // for linguistic - Reference< XSpellChecker1 > xSpell = SvxGetSpellChecker(); + Reference< XSpellChecker1 > xSpell = LinguMgr::GetSpellChecker(); pRet->Put(SfxSpellCheckItem( xSpell, SID_ATTR_SPELL )); SfxHyphenRegionItem aHyphen( SID_ATTR_HYPHENREGION ); @@ -2130,7 +2130,7 @@ short OfaTreeOptionsDialog::Execute() if ( !bIsFromExtensionManager ) { // collect all DictionaryList Events while the dialog is executed - Reference<css::linguistic2::XSearchableDictionaryList> xDictionaryList(SvxGetDictionaryList()); + Reference<css::linguistic2::XSearchableDictionaryList> xDictionaryList(LinguMgr::GetDictionaryList()); pClamp.reset( new SvxDicListChgClamp( xDictionaryList ) ); } short nRet = SfxModalDialog::Execute(); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 85e708d5e682..8dca0867cdc9 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -862,7 +862,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo SvtLinguConfig aCfg; - Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< linguistic2::XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); Sequence< Reference< linguistic2::XDictionary > > aDics; if (xDicList.is()) { @@ -870,7 +870,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo // add the default positive dictionary to dic-list (if not already done). // This is to ensure that there is at least one dictionary to which // words could be added. - uno::Reference< linguistic2::XDictionary > xDic( SvxGetOrCreatePosDic() ); + uno::Reference< linguistic2::XDictionary > xDic( LinguMgr::GetStandardDic() ); if (xDic.is()) xDic->setActive( true ); @@ -881,7 +881,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo for (sal_uInt16 i = 0; i < nDicCount; i++) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); - if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp) + if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp) continue; uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY ); diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx index 21cdf564ed55..16071bd045ff 100644 --- a/editeng/source/editeng/edtspell.cxx +++ b/editeng/source/editeng/edtspell.cxx @@ -46,8 +46,8 @@ EditSpellWrapper::EditSpellWrapper( vcl::Window* _pWin, { SAL_WARN_IF( !pView, "editeng", "One view has to be abandoned!" ); // Keep IgnoreList, delete ReplaceList... - if (SvxGetChangeAllList().is()) - SvxGetChangeAllList()->clear(); + if (LinguMgr::GetChangeAllList().is()) + LinguMgr::GetChangeAllList()->clear(); pEditView = pView; } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 61454ad73fb6..a7b8b409870a 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1305,7 +1305,7 @@ OUString ImpEditView::SpellIgnoreWord() if ( !aWord.isEmpty() ) { - Reference< XDictionary > xDic( SvxGetIgnoreAllList(), UNO_QUERY ); + Reference< XDictionary > xDic( LinguMgr::GetIgnoreAllList(), UNO_QUERY ); if (xDic.is()) xDic->add( aWord, false, OUString() ); EditDoc& rDoc = pEditEngine->GetEditDoc(); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index c8ef31416042..4023b8c545ea 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1452,7 +1452,7 @@ css::lang::Locale ImpEditEngine::GetLocale( const EditPaM& rPaM ) const Reference< XSpellChecker1 > ImpEditEngine::GetSpeller() { if ( !xSpeller.is() ) - xSpeller = SvxGetSpellChecker(); + xSpeller = LinguMgr::GetSpellChecker(); return xSpeller; } @@ -2487,7 +2487,7 @@ EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView ) aCurSel = SelectWord( aCurSel, css::i18n::WordType::DICTIONARY_WORD ); OUString aWord( GetSelected( aCurSel ) ); - Reference< XThesaurus > xThes( SvxGetThesaurus() ); + Reference< XThesaurus > xThes( LinguMgr::GetThesaurus() ); if (!xThes.is()) return EE_SPELL_ERRORFOUND; diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 9b58733f9061..c8f07694cf7a 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -155,7 +155,7 @@ SvxSpellWrapper::SvxSpellWrapper( vcl::Window* pWn, bRevAllowed ( true ), bAllRight ( bIsAllRight ) { - Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() ); + Reference< linguistic2::XLinguProperties > xProp( LinguMgr::GetLinguPropertySet() ); bool bWrapReverse = xProp.is() && xProp->getIsWrapReverse(); bReverse = bWrapReverse; bStartDone = !bReverse && bStart; @@ -311,7 +311,7 @@ void SvxSpellWrapper::SpellDocument( ) bool SvxSpellWrapper::SpellNext( ) { - Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() ); + Reference< linguistic2::XLinguProperties > xProp( LinguMgr::GetLinguPropertySet() ); bool bWrapReverse = xProp.is() && xProp->getIsWrapReverse(); bool bActRev = bRevAllowed && bWrapReverse; @@ -402,7 +402,7 @@ Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() { Reference< XDictionary > xDic; - Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); if (xDicList.is()) { Sequence< Reference< XDictionary > > aDics( xDicList->getDictionaries() ); @@ -431,7 +431,7 @@ Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() if (!xDic.is()) { - xDic = SvxGetOrCreatePosDic(); + xDic = LinguMgr::GetStandardDic(); if (xDic.is()) xDic->setActive( true ); } @@ -471,7 +471,7 @@ bool SvxSpellWrapper::FindSpellError() { // look up in ChangeAllList for misspelled word Reference< XDictionary > xChangeAllList( - SvxGetChangeAllList(), UNO_QUERY ); + LinguMgr::GetChangeAllList(), UNO_QUERY ); Reference< XDictionaryEntry > xEntry; if (xChangeAllList.is()) xEntry = xChangeAllList->getEntry( xAlt->getWord() ); diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 11e56ef27492..5948e090d1f3 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -410,7 +410,7 @@ bool SvxAutoCorrect::FnCapitalStartWord( SvxAutoCorrDoc& rDoc, const OUString& r { // Check that word isn't correctly spelled before correcting: css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpeller = - SvxGetSpellChecker(); + LinguMgr::GetSpellChecker(); if( xSpeller->hasLanguage(eLang) ) { Sequence< css::beans::PropertyValue > aEmptySeq; diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 06b5c2201b2e..17e3c08a74d4 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -717,46 +717,6 @@ uno::Reference< XDictionary > LinguMgr::GetStandard() return xDic; } -uno::Reference< XSpellChecker1 > SvxGetSpellChecker() -{ - return LinguMgr::GetSpellChecker(); -} - -uno::Reference< XHyphenator > SvxGetHyphenator() -{ - return LinguMgr::GetHyphenator(); -} - -uno::Reference< XThesaurus > SvxGetThesaurus() -{ - return LinguMgr::GetThesaurus(); -} - -uno::Reference< XSearchableDictionaryList > SvxGetDictionaryList() -{ - return LinguMgr::GetDictionaryList(); -} - -uno::Reference< XLinguProperties > SvxGetLinguPropertySet() -{ - return LinguMgr::GetLinguPropertySet(); -} - -uno::Reference< XDictionary > SvxGetOrCreatePosDic() -{ - return LinguMgr::GetStandardDic(); -} - -uno::Reference< XDictionary > SvxGetIgnoreAllList() -{ - return LinguMgr::GetIgnoreAllList(); -} - -uno::Reference< XDictionary > SvxGetChangeAllList() -{ - return LinguMgr::GetChangeAllList(); -} - SvxAlternativeSpelling SvxGetAltSpelling( const css::uno::Reference< css::linguistic2::XHyphenatedWord > & rHyphWord ) { diff --git a/include/editeng/unolingu.hxx b/include/editeng/unolingu.hxx index 539e120e6a20..8558925cc401 100644 --- a/include/editeng/unolingu.hxx +++ b/include/editeng/unolingu.hxx @@ -125,30 +125,6 @@ public: ~SvxDicListChgClamp(); }; - -//TODO: remove those functions or make them inline -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XSpellChecker1 > SvxGetSpellChecker(); -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XHyphenator > SvxGetHyphenator(); -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XThesaurus > SvxGetThesaurus(); -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XSearchableDictionaryList > SvxGetDictionaryList(); -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XLinguProperties > SvxGetLinguPropertySet(); -//TODO: remove argument or provide SvxGetIgnoreAllList with the same one -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XDictionary > SvxGetOrCreatePosDic(); -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XDictionary > SvxGetIgnoreAllList(); -EDITENG_DLLPUBLIC css::uno::Reference< - css::linguistic2::XDictionary > SvxGetChangeAllList(); - - -// misc functions - - EDITENG_DLLPUBLIC short SvxDicError( vcl::Window *pParent, linguistic::DictionaryError nError ); diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 38321e683fb5..690ce9f15155 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -216,13 +216,13 @@ void SvxLanguageBoxBase::SetLanguageList( SvxLanguageListFlags nLangList, } if (SvxLanguageListFlags::SPELL_USED & nLangList) { - Reference< XSpellChecker1 > xTmp1( SvxGetSpellChecker(), UNO_QUERY ); + Reference< XSpellChecker1 > xTmp1( LinguMgr::GetSpellChecker(), UNO_QUERY ); if (xTmp1.is()) aSpellUsedLang = xTmp1->getLanguages(); } if (SvxLanguageListFlags::HYPH_USED & nLangList) { - Reference< XHyphenator > xTmp( SvxGetHyphenator() ); + Reference< XHyphenator > xTmp( LinguMgr::GetHyphenator() ); if (xTmp.is()) { Sequence < css::lang::Locale > aLocaleSequence( xTmp->getLocales() ); aHyphUsedLang = lcl_LocaleSeqToLangSeq( aLocaleSequence ); @@ -230,7 +230,7 @@ void SvxLanguageBoxBase::SetLanguageList( SvxLanguageListFlags nLangList, } if (SvxLanguageListFlags::THES_USED & nLangList) { - Reference< XThesaurus > xTmp( SvxGetThesaurus() ); + Reference< XThesaurus > xTmp( LinguMgr::GetThesaurus() ); if (xTmp.is()) { Sequence < css::lang::Locale > aLocaleSequence( xTmp->getLocales() ); aThesUsedLang = lcl_LocaleSeqToLangSeq( aLocaleSequence ); @@ -341,7 +341,7 @@ sal_Int32 SvxLanguageBoxBase::ImplInsertLanguage( const LanguageType nLangType, if (!m_pSpellUsedLang) { - Reference< XSpellChecker1 > xSpell( SvxGetSpellChecker(), UNO_QUERY ); + Reference< XSpellChecker1 > xSpell( LinguMgr::GetSpellChecker(), UNO_QUERY ); if ( xSpell.is() ) m_pSpellUsedLang = new Sequence< sal_Int16 >( xSpell->getLanguages() ); } diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 2d931167906e..48d2e74e7357 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -351,14 +351,14 @@ SwSpellPopup::SwSpellPopup( pMenu = GetPopupMenu(MN_ADD_TO_DIC); pMenu->SetMenuFlags(MenuFlags::NoAutoMnemonics); //! necessary to retrieve the correct dictionary name in 'Execute' below - uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); sal_uInt16 nItemId = MN_DICTIONARIES_START; if (xDicList.is()) { // add the default positive dictionary to dic-list (if not already done). // This is to ensure that there is at least one dictionary to which // words could be added. - uno::Reference< linguistic2::XDictionary > xDic( SvxGetOrCreatePosDic() ); + uno::Reference< linguistic2::XDictionary > xDic( LinguMgr::GetStandardDic() ); if (xDic.is()) xDic->setActive( true ); @@ -369,7 +369,7 @@ SwSpellPopup::SwSpellPopup( for( sal_uInt16 i = 0; i < nDicCount; i++ ) { uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY ); - if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp) + if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp) continue; uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY ); @@ -712,7 +712,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } m_pSh->Left(CRSR_SKIP_CHARS, false, 1, false ); { - uno::Reference<linguistic2::XSearchableDictionaryList> xDictionaryList( SvxGetDictionaryList() ); + uno::Reference<linguistic2::XSearchableDictionaryList> xDictionaryList( LinguMgr::GetDictionaryList() ); SvxDicListChgClamp aClamp( xDictionaryList ); m_pSh->GetView().GetViewFrame()->GetDispatcher()-> Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON ); @@ -730,7 +730,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } else if (nId == MN_IGNORE_WORD) { - uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY ); + uno::Reference< linguistic2::XDictionary > xDictionary( LinguMgr::GetIgnoreAllList(), uno::UNO_QUERY ); if (m_bGrammarResults) { try { @@ -772,7 +772,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) aDicName = m_aDicNameSingle; uno::Reference< linguistic2::XDictionary > xDic; - uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); + uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( LinguMgr::GetDictionaryList() ); if (xDicList.is()) xDic = xDicList->getDictionaryByName( aDicName ); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index c08525a0f2d2..9b66fdcbbc0b 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1135,7 +1135,7 @@ void SwView::Execute(SfxRequest &rReq) // reset ignore lists pDoc->SpellItAgainSam( true, false, false ); // clear ignore dictionary - uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY ); + uno::Reference< linguistic2::XDictionary > xDictionary( LinguMgr::GetIgnoreAllList(), uno::UNO_QUERY ); if( xDictionary.is() ) xDictionary->clear(); // put cursor to the start of the document |