summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-21 11:32:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-29 18:02:25 +0000
commitd906615e35c1a255c58c3f2085c8e2f110eb522a (patch)
treea94c7812104d9c3ba90b90ca406b8f5eaf620a44 /cui
parent248b095c59f8d98ef7ed46aebd495ff1d0bef001 (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')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx24
-rw-r--r--cui/source/dialogs/SpellDialog.hrc1
-rw-r--r--cui/source/dialogs/SpellDialog.src4
-rw-r--r--cui/source/inc/SpellDialog.hxx1
4 files changed, 1 insertions, 29 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 );
}
diff --git a/cui/source/dialogs/SpellDialog.hrc b/cui/source/dialogs/SpellDialog.hrc
index 9303e0127af5..39657fd6acea 100644
--- a/cui/source/dialogs/SpellDialog.hrc
+++ b/cui/source/dialogs/SpellDialog.hrc
@@ -37,7 +37,6 @@
#define ST_RESUME 50
#define ST_SPELLING 51
#define ST_SPELLING_AND_GRAMMAR 52
-#define ST_SPELLING_AND_GRAMMAR_VENDORNAME 53
#define CB_CHECK_GRAMMAR 54
#define LINK_EXPLAIN 55
#define FT_EXPLAIN 56
diff --git a/cui/source/dialogs/SpellDialog.src b/cui/source/dialogs/SpellDialog.src
index 6a5724f71eed..d65adfcdc892 100644
--- a/cui/source/dialogs/SpellDialog.src
+++ b/cui/source/dialogs/SpellDialog.src
@@ -220,9 +220,5 @@ ModelessDialog RID_SVXDLG_SPELLCHECK
{
Text[ en-US ] = "Spelling and Grammar: $LANGUAGE ($LOCATION)";
};
- String ST_SPELLING_AND_GRAMMAR_VENDORNAME
- {
- Text[ en-US ] = "Spelling and Grammar: $LANGUAGE ($LOCATION) [$VendorName]";
- };
};
// ********************************************************************** EOF
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 4161407588fa..60102a46e28a 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -173,7 +173,6 @@ private:
const String m_sTitleSpelling;
const String m_sTitleSpellingGrammar;
- const String m_sTitleSpellingGrammarVendor;
Size aOldWordEDSize;
Link aDialogUndoLink;