summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-10 22:08:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-10 22:08:12 +0200
commit435be8e8e15e5f0c6d156f55378baf2aa9460bac (patch)
treeb3eacd522afcd236ef6fbf00f57b55e41dd17cff /editeng
parentc25ee07a77a5ff278804aa3dbd8dbfcc3ac3ca46 (diff)
Remove redundant SvxGet* wrappers around LinguMgr functions
Change-Id: Ic431ce4880d0c1277ddb411ca59b3c8e8ca36518
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx6
-rw-r--r--editeng/source/editeng/edtspell.cxx4
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx4
-rw-r--r--editeng/source/misc/splwrap.cxx10
-rw-r--r--editeng/source/misc/svxacorr.cxx2
-rw-r--r--editeng/source/misc/unolingu.cxx40
7 files changed, 14 insertions, 54 deletions
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 )
{