[Libreoffice-commits] .: cui/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Oct 11 08:13:20 PDT 2010
cui/source/inc/autocdlg.hxx | 1 -
cui/source/tabpages/autocdlg.cxx | 16 ++++------------
2 files changed, 4 insertions(+), 13 deletions(-)
New commits:
commit e7c5a1e7e6ee2babf9acf1f20423a1a6caa2f60d
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Wed Oct 6 20:50:09 2010 +0200
Resolving issue 2838 of OOo.
Itâs in two parts :
* autocorrection comparison function during the search of the word(s) takes care of the case.
* possibility to insert two times the same words with different
cases.
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 36e0fbd..7131740 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -239,7 +239,6 @@ private:
SvStringsISortDtor* pFormatText;
DoubleStringTable aDoubleStringTable;
CollatorWrapper* pCompareClass;
- CollatorWrapper* pCompareCaseClass;
CharClass* pCharClass;
LanguageType eLang;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index afb63d2..e04c896 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1024,10 +1024,7 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage( Window* pParent,
::com::sun::star::lang::Locale aLcl( SvxCreateLocale(eLastDialogLanguage ));
pCompareClass = new CollatorWrapper( GetProcessFact() );
- pCompareCaseClass = new CollatorWrapper( GetProcessFact() );
- pCompareClass->loadDefaultCollator( aLcl, ::com::sun::star::i18n::
- CollatorOptions::CollatorOptions_IGNORE_CASE );
- pCompareCaseClass->loadDefaultCollator( aLcl, 0 );
+ pCompareClass->loadDefaultCollator( aLcl, 0 );
pCharClass = new CharClass( aLcl );
static long nTabs[] = { 2 /* Tab-Count */, 1, 61 };
@@ -1057,7 +1054,6 @@ OfaAutocorrReplacePage::~OfaAutocorrReplacePage()
delete pFormatText;
lcl_ClearTable(aDoubleStringTable);
delete pCompareClass;
- delete pCompareCaseClass;
delete pCharClass;
}
/*-----------------14.10.96 15.58-------------------
@@ -1122,7 +1118,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& )
nLastPos = nPos - 1;
bFound = TRUE;
if( !(pWordPtr->IsTextOnly() == (0 == pDouble->pUserData)
- && 0 == pCompareCaseClass->compareString(
+ && 0 == pCompareClass->compareString(
pWordPtr->GetLong(), pDouble->sLong ) ) )
{
pAutoCorrect->PutText(sEntry, pDouble->sLong, eCurLang);
@@ -1185,7 +1181,7 @@ BOOL OfaAutocorrReplacePage::FillItemSet( SfxItemSet& )
bFound = TRUE;
String sLong = aReplaceTLB.GetEntryText(pEntry, 1);
if( !(pWordPtr->IsTextOnly() == (0 == pEntry->GetUserData())
- && 0 == pCompareCaseClass->compareString(
+ && 0 == pCompareClass->compareString(
pWordPtr->GetLong(), sLong )))
{
pAutoCorrect->PutText(sEntry, sLong, eLang);
@@ -1354,15 +1350,11 @@ void OfaAutocorrReplacePage::SetLanguage(LanguageType eSet)
RefillReplaceBox(FALSE, eLang, eSet);
eLastDialogLanguage = eSet;
delete pCompareClass;
- delete pCompareCaseClass;
delete pCharClass;
::com::sun::star::lang::Locale aLcl( SvxCreateLocale(eLastDialogLanguage ));
pCompareClass = new CollatorWrapper( GetProcessFact() );
- pCompareCaseClass = new CollatorWrapper( GetProcessFact() );
- pCompareClass->loadDefaultCollator( aLcl, ::com::sun::star::i18n::
- CollatorOptions::CollatorOptions_IGNORE_CASE );
- pCompareCaseClass->loadDefaultCollator( aLcl, 0 );
+ pCompareClass->loadDefaultCollator( aLcl, 0 );
pCharClass = new CharClass( aLcl );
ModifyHdl(&aShortED);
}
More information about the Libreoffice-commits
mailing list