summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/shells/langhelper.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-02 16:22:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-02 16:53:30 +0000
commitfd6986343521bc182cb26ae974dbd7b6a7e8ef25 (patch)
treea36910fa049bbdf7f42e659fba870512fd6abbb1 /sw/source/uibase/shells/langhelper.cxx
parentMissing initialization (diff)
downloadcore-fd6986343521bc182cb26ae974dbd7b6a7e8ef25.tar.gz
core-fd6986343521bc182cb26ae974dbd7b6a7e8ef25.zip
V813: Decreased performance
Change-Id: I49c022b29a2771b5091ba04b85e5117773730b85
Diffstat (limited to 'sw/source/uibase/shells/langhelper.cxx')
-rw-r--r--sw/source/uibase/shells/langhelper.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 5b15c36bd3d8..866aeb9240d1 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -231,7 +231,7 @@ namespace SwLangHelper
SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet );
}
- void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
const LanguageType nLang = SvtLanguageTable::GetLanguageType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
@@ -262,7 +262,7 @@ namespace SwLangHelper
if (pEditEngine)
{
rCoreSet.Put( SvxLanguageItem( nLang, nLangWhichId ));
- pEditEngine->QuickSetAttribs( rCoreSet, aSelection);
+ pEditEngine->QuickSetAttribs(rCoreSet, rSelection);
}
else
{
@@ -313,7 +313,7 @@ namespace SwLangHelper
SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet );
}
- void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
// EditEngine IDs
const sal_uInt16 aLangWhichId_EE[3] =
@@ -343,7 +343,7 @@ namespace SwLangHelper
{
for (size_t i = 0; i < SAL_N_ELEMENTS(aLangWhichId_EE); ++i)
rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_EE[i] ));
- pEditEngine->QuickSetAttribs( rCoreSet, aSelection);
+ pEditEngine->QuickSetAttribs(rCoreSet, rSelection);
}
else
{
@@ -373,10 +373,10 @@ namespace SwLangHelper
ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection );
}
- void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection )
+ void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection )
{
(void) bIsForSelection;
- (void) aSelection;
+ (void) rSelection;
// reset language for current selection.
// The selection should already have been expanded to the whole paragraph or
@@ -558,17 +558,17 @@ namespace SwLangHelper
return aText;
}
- OUString GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection )
+ OUString GetTextForLanguageGuessing(EditEngine* rEditEngine, const ESelection& rDocSelection)
{
// string for guessing language
OUString aText;
// get the full text of the paragraph that the end of selection is in
- aText = rEditEngine->GetText(aDocSelection.nEndPos);
+ aText = rEditEngine->GetText(rDocSelection.nEndPos);
if (!aText.isEmpty())
{
sal_Int32 nStt = 0;
- sal_Int32 nEnd = aDocSelection.nEndPos;
+ sal_Int32 nEnd = rDocSelection.nEndPos;
// at most 100 chars to the left...
nStt = nEnd > 100 ? nEnd - 100 : 0;
// ... and 100 to the right of the cursor position