diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-07-10 22:08:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-07-10 22:08:12 +0200 |
commit | 435be8e8e15e5f0c6d156f55378baf2aa9460bac (patch) | |
tree | b3eacd522afcd236ef6fbf00f57b55e41dd17cff /cui | |
parent | c25ee07a77a5ff278804aa3dbd8dbfcc3ac3ca46 (diff) |
Remove redundant SvxGet* wrappers around LinguMgr functions
Change-Id: Ic431ce4880d0c1277ddb411ca59b3c8e8ca36518
Diffstat (limited to 'cui')
-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 |
5 files changed, 25 insertions, 25 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(); |