linguistic/source/spelldsp.cxx | 44 ++++++++++++++++++++++++++++++++++++++-- oox/source/export/drawingml.cxx | 2 - 2 files changed, 43 insertions(+), 3 deletions(-)
New commits: commit 86f876b45a2737a1f7ccf9581af05277e1650159 Author: Andras Timar <andras.ti...@collabora.com> Date: Mon Nov 3 12:03:48 2014 +0100 fdo#61167 suggest titlecase and uppercase words from exception dict Change-Id: I280ffed996814e246ac3e93de5ff0acaad84018c diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 15ecfef..3a2f025 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -649,7 +649,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( Reference< XDictionaryEntry > xTmp( lcl_GetRulingDictionaryEntry( aChkWord, nLanguage ) ); if (xTmp.is()) { - if (xTmp->isNegative()) // positive entry found + if (xTmp->isNegative()) // negative entry found { eFailureType = SpellFailure::IS_NEGATIVE_WORD; @@ -669,6 +669,46 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( eFailureType = -1; // no failure } } + else + { + setCharClass(LanguageTag(nLanguage)); + sal_uInt16 ct = capitalType(aChkWord, pCharClass); + if (ct == CAPTYPE_INITCAP || ct == CAPTYPE_ALLCAP) + { + Reference< XDictionaryEntry > xTmp2( lcl_GetRulingDictionaryEntry( makeLowerCase(aChkWord, pCharClass), nLanguage ) ); + if (xTmp2.is()) + { + if (xTmp2->isNegative()) // negative entry found + { + eFailureType = SpellFailure::IS_NEGATIVE_WORD; + + // replacement text to be added to suggestions, if not empty + OUString aAddRplcTxt( xTmp2->getReplacementText() ); + + // replacement text must not be in negative dictionary itself + if (!aAddRplcTxt.isEmpty() && + !SearchDicList( xDList, aAddRplcTxt, nLanguage, false, true ).is()) + { + switch ( ct ) + { + case CAPTYPE_INITCAP: + aProposalList.Prepend( pCharClass->titlecase(aAddRplcTxt) ); + break; + case CAPTYPE_ALLCAP: + aProposalList.Prepend( pCharClass->uppercase(aAddRplcTxt) ); + default: + aProposalList.Prepend( aAddRplcTxt ); + } + } + } + else // positive entry found + { + xRes = NULL; + eFailureType = -1; // no failure + } + } + } + } } if (eFailureType != -1) // word misspelled or found in negative user-dictionary @@ -681,7 +721,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( Sequence< OUString > aProposals = aProposalList.GetSequence(); // remove entries listed in negative dictionaries - // (we don't want to display suggestions that will be regarded as misspelledlater on) + // (we don't want to display suggestions that will be regarded as misspelled later on) if (bCheckDics && xDList.is()) SeqRemoveNegEntries( aProposals, xDList, nLanguage ); commit 4e87e0f2da6bc132edc42056db1d91e63e9497e7 Author: Andras Timar <andras.ti...@collabora.com> Date: Wed Oct 29 14:49:36 2014 +0100 typo: geomtery -> geometry Change-Id: I20263c836dd55e663cdad9fc8283fe8fbf02b1f1 diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index f1ff69b..df4bc23 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2066,7 +2066,7 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool b EscherPropertyContainer::LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted ); sal_Int32 nValue, nLength = aAdjustmentSeq.getLength(); - //aAdjustments will give info about the number of adj values for a particular geomtery.For example for hexagon aAdjustments.size() will be 2 and for circular arrow it will be 5 as per lcl_getAdjNames. + //aAdjustments will give info about the number of adj values for a particular geometry. For example for hexagon aAdjustments.size() will be 2 and for circular arrow it will be 5 as per lcl_getAdjNames. if(aAdjustments.size() == static_cast<sal_uInt32>(nLength))// In case there is a mismatch do not write the XML_gd tag. { for( sal_Int32 i=0; i < nLength; i++ ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits