[Libreoffice-commits] core.git: 2 commits - linguistic/source oox/source
linguistic/source/gciterator.cxx |2 +- oox/source/export/ColorPropertySet.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit d590454062cfef1b6ede8b75311610874f63e5fa Author: Mike Kaganski AuthorDate: Sun Apr 23 20:14:16 2023 +0300 Commit: Mike Kaganski CommitDate: Sat May 6 07:25:24 2023 +0200 Use getXWeak in oox Change-Id: I8211a1fe19bbd900f866c46d5b7ec68a37bc38cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150859 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx index a0998f195fe4..714870d93e36 100644 --- a/oox/source/export/ColorPropertySet.cxx +++ b/oox/source/export/ColorPropertySet.cxx @@ -67,7 +67,7 @@ Property SAL_CALL lcl_ColorPropertySetInfo::getPropertyByName( const OUString& a { if( aName == m_aColorPropName ) return m_aColorProp; -throw UnknownPropertyException( m_aColorPropName, static_cast< uno::XWeak * >( this )); +throw UnknownPropertyException( m_aColorPropName, getXWeak()); } sal_Bool SAL_CALL lcl_ColorPropertySetInfo::hasPropertyByName( const OUString& Name ) commit ee3b2907eae61fb46fb6fe1511fafaa2a2b60bd3 Author: Mike Kaganski AuthorDate: Sun Apr 23 20:14:13 2023 +0300 Commit: Mike Kaganski CommitDate: Sat May 6 07:25:16 2023 +0200 Use getXWeak in linguistic Change-Id: I1202763917dab414e8bc540bd89d736e74fa1450 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150858 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index edd028e31e28..1cd8883705c7 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -956,7 +956,7 @@ void SAL_CALL GrammarCheckingIterator::processLinguServiceEvent( try { - uno::Reference< uno::XInterface > xThis( static_cast< OWeakObject * >(this) ); + uno::Reference< uno::XInterface > xThis( getXWeak() ); linguistic2::LinguServiceEvent aEvent( xThis, linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN ); m_aNotifyListeners.notifyEach( ::XLinguServiceEventListener::processLinguServiceEvent,
[Libreoffice-commits] core.git: 2 commits - linguistic/source oox/source
linguistic/source/convdiclist.cxx |4 ++-- oox/source/drawingml/customshapepresetdata.cxx |7 +++ 2 files changed, 5 insertions(+), 6 deletions(-) New commits: commit f04375e1cfaadb12b2c42c8f0fbb0c05b223e092 Author: Stephan Bergmann AuthorDate: Wed May 4 08:42:30 2022 +0200 Commit: Stephan Bergmann CommitDate: Wed May 4 11:57:57 2022 +0200 Just use Any ctor instead of makeAny in linguistic Change-Id: I8697999ecedc1c3d368509470581635b087bcea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133802 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 0104b36df663..396c7427cd3a 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -179,7 +179,7 @@ uno::Any SAL_CALL ConvDicNameContainer::getByName( const OUString& rName ) uno::Reference< XConversionDictionary > xRes( GetByName( rName ) ); if (!xRes.is()) throw NoSuchElementException(); -return makeAny( xRes ); +return Any( xRes ); } uno::Sequence< OUString > SAL_CALL ConvDicNameContainer::getElementNames( ) @@ -254,7 +254,7 @@ void SAL_CALL ConvDicNameContainer::removeByName( const OUString& rName ) ::ucbhelper::ContentaCnt( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); -aCnt.executeCommand( "delete", makeAny( true ) ); +aCnt.executeCommand( "delete", Any( true ) ); } catch( ... ) { commit b58c0531cfb1bc9d1d948f6298b30e8afe0f6f35 Author: Noel Grandin AuthorDate: Tue May 3 16:19:37 2022 +0200 Commit: Noel Grandin CommitDate: Wed May 4 11:57:40 2022 +0200 simplify lcl_parseHandleRef Change-Id: I0a7cb2754ab43b8b627f196c99778b5fa3f2e005 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133808 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/oox/source/drawingml/customshapepresetdata.cxx b/oox/source/drawingml/customshapepresetdata.cxx index cd4efc2d4c93..4e93f4f76a06 100644 --- a/oox/source/drawingml/customshapepresetdata.cxx +++ b/oox/source/drawingml/customshapepresetdata.cxx @@ -335,13 +335,12 @@ void lcl_parseHandleRange(std::vector& rHandle, const OStr void lcl_parseHandleRef(std::vector& rHandle, const OString& rValue, const OUString& rName) { -static const char aPrefix[] = "\", Handle = (long) 0, Value = (any) { (long) "; -const sal_Int32 nCheck = SAL_N_ELEMENTS(aPrefix) - 1; +static constexpr std::string_view aPrefix = "\", Handle = (long) 0, Value = (any) { (long) "; const sal_Int32 nStart = SAL_N_ELEMENTS("Name = \"") - 1 + rName.getLength(); -if (rValue.copy(nStart, nCheck).equalsL(aPrefix, nCheck)) +if (rValue.subView(nStart, aPrefix.size()) == aPrefix) { -sal_Int32 nIndex = nStart + nCheck; +sal_Int32 nIndex = nStart + aPrefix.size(); beans::PropertyValue aPropertyValue; aPropertyValue.Name = rName; // We only expect a Value here
[Libreoffice-commits] core.git: 2 commits - linguistic/source oox/source
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 (bCheckDicsxDList.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()