diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-12-21 11:32:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-12-29 18:02:25 +0000 |
commit | d906615e35c1a255c58c3f2085c8e2f110eb522a (patch) | |
tree | a94c7812104d9c3ba90b90ca406b8f5eaf620a44 /cui/source/dialogs/SpellDialog.cxx | |
parent | 248b095c59f8d98ef7ed46aebd495ff1d0bef001 (diff) |
Don't display grammar checker's vendor name in the titlebar
There was always something a little underhanded about the introduction of
advertising of vendor names of the grammar checker.
Change-Id: I85a10770ee0891ebcfbf26b366f664811ebcf84b
Diffstat (limited to 'cui/source/dialogs/SpellDialog.cxx')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index b110231999bb..f5ae69edce03 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -243,7 +243,6 @@ SpellDialog::SpellDialog( aNoSuggestionsST( CUI_RES(ST_NOSUGGESTIONS)), m_sTitleSpelling ( CUI_RES( ST_SPELLING ) ), m_sTitleSpellingGrammar ( CUI_RES( ST_SPELLING_AND_GRAMMAR ) ), - m_sTitleSpellingGrammarVendor ( CUI_RES( ST_SPELLING_AND_GRAMMAR_VENDORNAME ) ), aDialogUndoLink( LINK (this, SpellDialog, DialogUndoHdl)), bModified( false ), bFocusLocked( true ), @@ -922,28 +921,7 @@ static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl ) } void SpellDialog::SetTitle_Impl(LanguageType nLang) { - String sTitle( m_sTitleSpelling ); - if( rParent.HasGrammarChecking() ) - { - String sVendor; - const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives(); - if( pSpellErrorDescription && !pSpellErrorDescription->sServiceName.isEmpty() ) - { - uno::Reference< lang::XServiceDisplayName > xDisplayName( pSpellErrorDescription->xGrammarChecker, uno::UNO_QUERY ); - if( xDisplayName.is() ) - sVendor = xDisplayName->getServiceDisplayName( pSpellErrorDescription->aLocale ); - } - - if( sVendor.Len() ) - { - sTitle = m_sTitleSpellingGrammarVendor; - sTitle.SearchAndReplaceAscii( "$VendorName", sVendor ); - } - else - { - sTitle = m_sTitleSpellingGrammar; - } - } + String sTitle = rParent.HasGrammarChecking() ? m_sTitleSpellingGrammar : m_sTitleSpelling; sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", SvtLanguageTable::GetLanguageString(nLang) ); SetText( sTitle ); } |