basctl/source/basicide/basicbox.cxx | 3 +-- basctl/source/dlged/managelang.cxx | 3 +-- cui/source/dialogs/thesdlg.cxx | 8 ++++---- cui/source/options/opthtml.cxx | 3 +-- editeng/source/items/textitem.cxx | 3 +-- sc/source/ui/view/viewfun4.cxx | 3 +-- svx/source/items/numfmtsh.cxx | 8 ++------ sw/source/core/uibase/lingu/olmenu.cxx | 14 ++++++-------- sw/source/core/uibase/shells/langhelper.cxx | 6 ++---- sw/source/core/uibase/shells/textsh1.cxx | 6 ++---- sw/source/core/uibase/uno/unotxdoc.cxx | 3 +-- 11 files changed, 22 insertions(+), 38 deletions(-)
New commits: commit d112cf387513231b6bc133e5d37ba51f4bc4c6ac Author: Eike Rathke <[email protected]> Date: Thu Apr 17 23:12:38 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I19de12c9199dec3d922334a16649142acaea0235 diff --git a/sw/source/core/uibase/lingu/olmenu.cxx b/sw/source/core/uibase/lingu/olmenu.cxx index d619926..59e9047 100644 --- a/sw/source/core/uibase/lingu/olmenu.cxx +++ b/sw/source/core/uibase/lingu/olmenu.cxx @@ -561,27 +561,26 @@ m_aInfo16( SW_RES(IMG_INFO_16) ) //ADD NEW LANGUAGE MENU ITEM OUString aScriptTypesInUse( OUString::number( pWrtSh->GetScriptType() ) ); - SvtLanguageTable aLanguageTable; // get keyboard language OUString aKeyboardLang; SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); LanguageType nLang = rEditWin.GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) - aKeyboardLang = aLanguageTable.GetString( nLang ); + aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use OUString aCurrentLang("*"); nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) - aCurrentLang = aLanguageTable.GetString( nLang ); + aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); // build sequence for status value uno::Sequence< OUString > aSeq( 4 ); aSeq[0] = aCurrentLang; aSeq[1] = aScriptTypesInUse; aSeq[2] = aKeyboardLang; - aSeq[3] = aLanguageTable.GetString(m_nGuessLangWord); + aSeq[3] = SvtLanguageTable::GetLanguageString(m_nGuessLangWord); PopupMenu *pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION); fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, m_aLangTable_Text ); commit b9ba0528d96c7c38824db7f9b3f5ba17a49c82be Author: Eike Rathke <[email protected]> Date: Thu Apr 17 23:09:45 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I7a32bc6391630266eb548c4fa2c7b9dedec3697c diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 5c4b0af..9e464d0 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -1515,13 +1515,11 @@ void SvxNumberFormatShell::GetCurrencySymbols(std::vector<OUString>& rList, bool const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable(); sal_uInt16 nCount=rCurrencyTable.size(); - SvtLanguageTable* pLanguageTable=new SvtLanguageTable; - sal_uInt16 nStart=1; OUString aString( ApplyLreOrRleEmbedding( rCurrencyTable[0].GetSymbol())); aString += " "; - aString += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[0].GetLanguage())); + aString += ApplyLreOrRleEmbedding( SvtLanguageTable::GetLanguageString( rCurrencyTable[0].GetLanguage())); rList.push_back(aString); sal_uInt16 nAuto=(sal_uInt16)-1; @@ -1545,7 +1543,7 @@ void SvxNumberFormatShell::GetCurrencySymbols(std::vector<OUString>& rList, bool aStr += aTwoSpace; aStr += ApplyLreOrRleEmbedding( rCurrencyTable[i].GetSymbol()); aStr += aTwoSpace; - aStr += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[i].GetLanguage())); + aStr += ApplyLreOrRleEmbedding( SvtLanguageTable::GetLanguageString( rCurrencyTable[i].GetLanguage())); sal_uInt16 j = nStart; for(; j < rList.size(); ++j) @@ -1580,8 +1578,6 @@ void SvxNumberFormatShell::GetCurrencySymbols(std::vector<OUString>& rList, bool aCurCurrencyList.insert(aCurCurrencyList.begin()+j, i); } } - - delete pLanguageTable; } void SvxNumberFormatShell::SetCurrencySymbol(sal_uInt32 nPos) commit 5684e67aa8f046d43ac0e97730bd8cd30dcf31f0 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 23:06:08 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I35395e169e795386740fb2b5ee34fc3117b8c844 diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 8b3e357..e4b5b8d 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2582,8 +2582,7 @@ SfxItemPresentation SvxLanguageItem::GetPresentation case SFX_ITEM_PRESENTATION_NAMELESS: case SFX_ITEM_PRESENTATION_COMPLETE: { - SvtLanguageTable aLangTable; - rText = aLangTable.GetString( (LanguageType)GetValue() ); + rText = SvtLanguageTable::GetLanguageString( (LanguageType)GetValue() ); return ePres; } default: ; //prevent warning commit 58b9749159adf62efd8e0b6de14c6116517eff1e Author: Eike Rathke <[email protected]> Date: Thu Apr 17 23:04:39 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I0265bef315051441bc648ddd66c4bf92abbd36e3 diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 3f71add..a494e41 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -69,8 +69,7 @@ SfxTabPage( pParent, "OptHtmlPage" , "cui/ui/opthtmlpage.ui", rSet ) sal_Int32 nPos; if ((nPos = aText.indexOf( aPlaceholder)) != -1) { - SvtLanguageTable aLangTab; - const OUString& rStr = aLangTab.GetString( LANGUAGE_ENGLISH_US); + const OUString& rStr = SvtLanguageTable::GetLanguageString( LANGUAGE_ENGLISH_US); if (!rStr.isEmpty()) { aText = aText.replaceAt( nPos, aPlaceholder.getLength(), rStr); commit 6ee460988873ee085ed4ad3e62a3fe6d37608685 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 23:02:15 2014 +0200 no temporary instance of SvtLanguageTable necessary here geez.. Change-Id: Ide611cc94e939405345deb8b341fd185d68765e5 diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index b72d3a2..936922e 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -537,7 +537,7 @@ void SvxThesaurusDialog::SetWindowTitle( LanguageType nLanguage ) if( nIndex != -1 ) aStr = aStr.copy( 0, nIndex - 1 ); aStr += " ("; - aStr += SvtLanguageTable().GetLanguageString( nLanguage ); + aStr += SvtLanguageTable::GetLanguageString( nLanguage ); aStr += ")"; SetText( aStr ); // set window title } commit a623feea9bb250c136866190e33f2fb6dbb6ddf4 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 23:00:56 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I7127bf052830b7877bc8ab46f3b218cbb05309a7 diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 1946548..b72d3a2 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -488,7 +488,6 @@ SvxThesaurusDialog::SvxThesaurusDialog( m_pLeftBtn->Enable( false ); // fill language menu button list - SvtLanguageTable aLangTab; uno::Sequence< lang::Locale > aLocales; if (xThesaurus.is()) aLocales = xThesaurus->getLocales(); @@ -500,13 +499,14 @@ SvxThesaurusDialog::SvxThesaurusDialog( { const LanguageType nLang = LanguageTag::convertToLanguageType( pLocales[i] ); DBG_ASSERT( nLang != LANGUAGE_NONE && nLang != LANGUAGE_DONTKNOW, "failed to get language" ); - aLangVec.push_back( aLangTab.GetString( nLang ) ); + aLangVec.push_back( SvtLanguageTable::GetLanguageString( nLang ) ); } std::sort( aLangVec.begin(), aLangVec.end() ); for (size_t i = 0; i < aLangVec.size(); ++i) m_pLangLB->InsertEntry( aLangVec[i] ); - std::vector< OUString >::iterator aI = std::find(aLangVec.begin(), aLangVec.end(), aLangTab.GetString(nLanguage)); + std::vector< OUString >::iterator aI = std::find(aLangVec.begin(), aLangVec.end(), + SvtLanguageTable::GetLanguageString(nLanguage)); if (aI != aLangVec.end()) { m_pLangLB->SelectEntry(*aI); commit 5e91217c6abab707ab2db29d5e88da848e5afe49 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:58:40 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I3172e4d174a7f632a4259bd7330b41d3f065daed diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index fb10cd4..5f0f4b8 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -103,7 +103,6 @@ void ManageLanguageDialog::FillLanguageBox() if ( m_xLocalizationMgr->isLibraryLocalized() ) { - SvtLanguageTable aLangTable; Locale aDefaultLocale = m_xLocalizationMgr->getStringResourceManager()->getDefaultLocale(); Sequence< Locale > aLocaleSeq = m_xLocalizationMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); @@ -112,7 +111,7 @@ void ManageLanguageDialog::FillLanguageBox() { bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] ); LanguageType eLangType = LanguageTag::convertToLanguageType( pLocale[i] ); - OUString sLanguage = aLangTable.GetString( eLangType ); + OUString sLanguage = SvtLanguageTable::GetLanguageString( eLangType ); if ( bIsDefault ) { sLanguage += " " + m_sDefLangStr; commit 0424163d0344b60380058fe7f61919f5744faae8 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:57:46 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: Iabb3aadf35eb6b3575d916f2400f606264572537 diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 59d438c..545f07b 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -405,7 +405,6 @@ void LanguageBox::FillBox() if ( pCurMgr->isLibraryLocalized() ) { Enable(); - SvtLanguageTable aLangTable; Locale aDefaultLocale = pCurMgr->getStringResourceManager()->getDefaultLocale(); Locale aCurrentLocale = pCurMgr->getStringResourceManager()->getCurrentLocale(); Sequence< Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales(); @@ -417,7 +416,7 @@ void LanguageBox::FillBox() bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] ); bool bIsCurrent = localesAreEqual( aCurrentLocale, pLocale[i] ); LanguageType eLangType = LanguageTag::convertToLanguageType( pLocale[i] ); - OUString sLanguage = aLangTable.GetString( eLangType ); + OUString sLanguage = SvtLanguageTable::GetLanguageString( eLangType ); if ( bIsDefault ) { sLanguage += " "; commit 124e9f77bcdd7cc99794e1d0a84280a918a27772 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:55:28 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I435529e2ef2648d167223334a215df7cbae2da91 diff --git a/sw/source/core/uibase/uno/unotxdoc.cxx b/sw/source/core/uibase/uno/unotxdoc.cxx index ead50e9..4cb01d9 100644 --- a/sw/source/core/uibase/uno/unotxdoc.cxx +++ b/sw/source/core/uibase/uno/unotxdoc.cxx @@ -3307,7 +3307,6 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( if (nMaxCount > 0) { sal_Int32 nCount = 0; - const SvtLanguageTable aLangTab; for (std::set< LanguageType >::const_iterator it = aAllLangs.begin(); it != aAllLangs.end(); ++it) { if (nCount >= nMaxCount) @@ -3315,7 +3314,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( if (LANGUAGE_NONE != *it) { pLanguage[nCount] = LanguageTag::convertToLocale( *it ); - pLanguage[nCount].Language = aLangTab.GetString( *it ); + pLanguage[nCount].Language = SvtLanguageTable::GetLanguageString( *it ); nCount += 1; } } commit fc4ac90f4611cdd2e04efa918cf83a0bd27a8d7c Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:52:26 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: Ic5a6075b3d8e82b0a778d05772e2c8a23d7a1955 diff --git a/sw/source/core/uibase/shells/textsh1.cxx b/sw/source/core/uibase/shells/textsh1.cxx index 738efd7..d3f3256 100644 --- a/sw/source/core/uibase/shells/textsh1.cxx +++ b/sw/source/core/uibase/shells/textsh1.cxx @@ -1365,20 +1365,18 @@ void SwTextShell::GetState( SfxItemSet &rSet ) // the value of used script types OUString aScriptTypesInUse( OUString::number( rSh.GetScriptType() ) ); - SvtLanguageTable aLangTable; - // get keyboard language OUString aKeyboardLang; SwEditWin& rEditWin = GetView().GetEditWin(); LanguageType nLang = rEditWin.GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) - aKeyboardLang = aLangTable.GetString( nLang ); + aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use OUString aCurrentLang = "*"; nLang = SwLangHelper::GetCurrentLanguage( rSh ); if (nLang != LANGUAGE_DONTKNOW) - aCurrentLang = aLangTable.GetString( nLang ); + aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); // build sequence for status value uno::Sequence< OUString > aSeq( 4 ); commit fa92393f01e6f9bef3e8d6b8d59f58176a239634 Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:50:28 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: Ic781a67954c4638c4d9454dec4384cbeb8345e62 diff --git a/sw/source/core/uibase/shells/langhelper.cxx b/sw/source/core/uibase/shells/langhelper.cxx index 8342502..53adf42 100644 --- a/sw/source/core/uibase/shells/langhelper.cxx +++ b/sw/source/core/uibase/shells/langhelper.cxx @@ -68,8 +68,6 @@ namespace SwLangHelper const sal_uInt16 nScriptType =pOLV->GetSelectedScriptType(); OUString aScriptTypesInUse( OUString::number( nScriptType ) );//pEditEngine->GetScriptType(aSelection) - SvtLanguageTable aLangTable; - // get keyboard language OUString aKeyboardLang; LanguageType nLang = LANGUAGE_DONTKNOW; @@ -78,14 +76,14 @@ namespace SwLangHelper if(pWin) nLang = pWin->GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) - aKeyboardLang = aLangTable.GetString( nLang ); + aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use OUString aCurrentLang("*"); SfxItemSet aSet(pOLV->GetAttribs()); nLang = SwLangHelper::GetCurrentLanguage( aSet,nScriptType ); if (nLang != LANGUAGE_DONTKNOW) - aCurrentLang = aLangTable.GetString( nLang ); + aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); // build sequence for status value uno::Sequence< OUString > aSeq( 4 ); commit ad623695c76eb76cf7acd4a2f6b35e78de54a76e Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:47:35 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: I64bd169da06d543ff6b8aabead9a5489b9cdd131 diff --git a/sw/source/core/uibase/lingu/olmenu.cxx b/sw/source/core/uibase/lingu/olmenu.cxx index f941792..d619926 100644 --- a/sw/source/core/uibase/lingu/olmenu.cxx +++ b/sw/source/core/uibase/lingu/olmenu.cxx @@ -412,27 +412,26 @@ SwSpellPopup::SwSpellPopup( //ADD NEW LANGUAGE MENU ITEM OUString aScriptTypesInUse( OUString::number( pWrtSh->GetScriptType() ) ); - SvtLanguageTable aLanguageTable; // get keyboard language OUString aKeyboardLang; SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); LanguageType nLang = rEditWin.GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) - aKeyboardLang = aLanguageTable.GetString( nLang ); + aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use OUString aCurrentLang("*"); nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) - aCurrentLang = aLanguageTable.GetString( nLang ); + aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); // build sequence for status value uno::Sequence< OUString > aSeq( 4 ); aSeq[0] = aCurrentLang; aSeq[1] = aScriptTypesInUse; aSeq[2] = aKeyboardLang; - aSeq[3] = aLanguageTable.GetString(m_nGuessLangWord); + aSeq[3] = SvtLanguageTable::GetLanguageString(m_nGuessLangWord); pMenu = GetPopupMenu(MN_SET_LANGUAGE_SELECTION); fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_SELECTION_START, aSeq, pWrtSh, m_aLangTable_Text ); commit a70cad2c1ea644ac16098d549e554cd218840caf Author: Eike Rathke <[email protected]> Date: Thu Apr 17 22:37:15 2014 +0200 no temporary instance of SvtLanguageTable necessary here Change-Id: Ic94940cd230022fe968968718a37737c3d462aca diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 55937e0..13bdec0 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -385,8 +385,7 @@ void ScViewFunc::DoThesaurus( bool bRecord ) if (eState == EE_SPELL_ERRORFOUND) // sollte spaeter durch Wrapper geschehen! { LanguageType eLnge = ScViewUtil::GetEffLanguage( pDoc, ScAddress( nCol, nRow, nTab ) ); - SvtLanguageTable aLangTab; - OUString aErr = aLangTab.GetString(eLnge); + OUString aErr = SvtLanguageTable::GetLanguageString(eLnge); aErr += ScGlobal::GetRscString( STR_SPELLING_NO_LANG ); InfoBox aBox( GetViewData()->GetDialogParent(), aErr ); aBox.Execute(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
