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 <sberg...@redhat.com> AuthorDate: Wed May 4 08:42:30 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> 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 <sberg...@redhat.com> 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::Content aCnt( 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 <noel.gran...@collabora.co.uk> AuthorDate: Tue May 3 16:19:37 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> 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 <noel.gran...@collabora.co.uk> 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<beans::PropertyValue>& rHandle, const OStr void lcl_parseHandleRef(std::vector<beans::PropertyValue>& 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