editeng/source/accessibility/AccessibleEditableTextPara.cxx | 8 +++--- editeng/source/accessibility/AccessibleImageBullet.cxx | 8 +++--- editeng/source/misc/svxacorr.cxx | 2 - editeng/source/uno/unofield.cxx | 4 +-- editeng/source/uno/unotext.cxx | 16 ++++++------ editeng/source/uno/unotext2.cxx | 8 +++--- 6 files changed, 23 insertions(+), 23 deletions(-)
New commits: commit f1a9e1d8139db4461c1a1c5fee7b1131ce99eece Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed May 4 12:12:32 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed May 4 15:26:52 2022 +0200 Just use Any ctor instead of makeAny in editeng Change-Id: Ic6a392ce006c9348abc28a5940c4ee0425e5b990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133820 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index cf605db6c4eb..de3befd289b1 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -270,8 +270,8 @@ namespace accessibility { } // index and therefore description changed - FireEvent( AccessibleEventId::DESCRIPTION_CHANGED, uno::makeAny( getAccessibleDescription() ), aOldDesc ); - FireEvent( AccessibleEventId::NAME_CHANGED, uno::makeAny( getAccessibleName() ), aOldName ); + FireEvent( AccessibleEventId::DESCRIPTION_CHANGED, uno::Any( getAccessibleDescription() ), aOldDesc ); + FireEvent( AccessibleEventId::NAME_CHANGED, uno::Any( getAccessibleName() ), aOldName ); } } catch (const uno::Exception&) // optional behaviour @@ -572,7 +572,7 @@ namespace accessibility !mxStateSet->contains(nStateId) ) { mxStateSet->AddState( nStateId ); - FireEvent( AccessibleEventId::STATE_CHANGED, uno::makeAny( nStateId ) ); + FireEvent( AccessibleEventId::STATE_CHANGED, uno::Any( nStateId ) ); } } @@ -582,7 +582,7 @@ namespace accessibility mxStateSet->contains(nStateId) ) { mxStateSet->RemoveState( nStateId ); - FireEvent( AccessibleEventId::STATE_CHANGED, uno::Any(), uno::makeAny( nStateId ) ); + FireEvent( AccessibleEventId::STATE_CHANGED, uno::Any(), uno::Any( nStateId ) ); } } diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx index fbe9bee21571..11324648722d 100644 --- a/editeng/source/accessibility/AccessibleImageBullet.cxx +++ b/editeng/source/accessibility/AccessibleImageBullet.cxx @@ -431,7 +431,7 @@ namespace accessibility !mxStateSet->contains(nStateId) ) { mxStateSet->AddState( nStateId ); - FireEvent( AccessibleEventId::STATE_CHANGED, uno::makeAny( nStateId ) ); + FireEvent( AccessibleEventId::STATE_CHANGED, uno::Any( nStateId ) ); } } @@ -441,7 +441,7 @@ namespace accessibility mxStateSet->contains(nStateId) ) { mxStateSet->RemoveState( nStateId ); - FireEvent( AccessibleEventId::STATE_CHANGED, uno::Any(), uno::makeAny( nStateId ) ); + FireEvent( AccessibleEventId::STATE_CHANGED, uno::Any(), uno::Any( nStateId ) ); } } @@ -468,8 +468,8 @@ namespace accessibility if( nOldIndex != nIndex ) { // index and therefore description changed - FireEvent( AccessibleEventId::DESCRIPTION_CHANGED, uno::makeAny( getAccessibleDescription() ), aOldDesc ); - FireEvent( AccessibleEventId::NAME_CHANGED, uno::makeAny( getAccessibleName() ), aOldName ); + FireEvent( AccessibleEventId::DESCRIPTION_CHANGED, uno::Any( getAccessibleDescription() ), aOldDesc ); + FireEvent( AccessibleEventId::NAME_CHANGED, uno::Any( getAccessibleName() ), aOldName ); } } catch( const uno::Exception& ) {} // optional behaviour diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index fba4bddce8c6..c68138ffe89e 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2595,7 +2595,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() try { ::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ), uno::Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aContent.executeCommand ( "delete", makeAny ( true ) ); + aContent.executeCommand ( "delete", Any ( true ) ); } catch (...) { diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 804e578f11b2..49e3a429f7d3 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -754,10 +754,10 @@ uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyNam SolarMutexGuard aGuard; if (PropertyName == UNO_TC_PROP_ANCHOR) - return uno::makeAny(mxAnchor); + return uno::Any(mxAnchor); if (PropertyName == UNO_TC_PROP_TEXTFIELD_TYPE) - return uno::makeAny(mnServiceId); + return uno::Any(mnServiceId); uno::Any aValue; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 60e19748fcd8..bf085c647c0e 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -71,7 +71,7 @@ ESelection toESelection(const text::TextRangeSelection& rSel) #define QUERYINT( xint ) \ if( rType == cppu::UnoType<xint>::get() ) \ - return uno::makeAny(uno::Reference< xint >(this)) + return uno::Any(uno::Reference< xint >(this)) const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() { @@ -583,7 +583,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyValue(const OUString& Property aSel.Start.PositionInParagraph = rSel.nStartPos; aSel.End.Paragraph = rSel.nEndPara; aSel.End.PositionInParagraph = rSel.nEndPos; - return uno::makeAny(aSel); + return uno::Any(aSel); } return _getPropertyValue( PropertyName ); @@ -1543,13 +1543,13 @@ uno::Any SAL_CALL SvxUnoTextRange::queryAggregation( const uno::Type & rType ) { QUERYINT( text::XTextRange ); else if( rType == cppu::UnoType<beans::XMultiPropertyStates>::get()) - return uno::makeAny(uno::Reference< beans::XMultiPropertyStates >(this)); + return uno::Any(uno::Reference< beans::XMultiPropertyStates >(this)); else if( rType == cppu::UnoType<beans::XPropertySet>::get()) - return uno::makeAny(uno::Reference< beans::XPropertySet >(this)); + return uno::Any(uno::Reference< beans::XPropertySet >(this)); else QUERYINT( beans::XPropertyState ); else QUERYINT( text::XTextRangeCompare ); else if( rType == cppu::UnoType<beans::XMultiPropertySet>::get()) - return uno::makeAny(uno::Reference< beans::XMultiPropertySet >(this)); + return uno::Any(uno::Reference< beans::XMultiPropertySet >(this)); else QUERYINT( lang::XServiceInfo ); else QUERYINT( lang::XTypeProvider ); else QUERYINT( lang::XUnoTunnel ); @@ -1646,7 +1646,7 @@ uno::Any SAL_CALL SvxUnoTextBase::queryAggregation( const uno::Type & rType ) QUERYINT( text::XText ); QUERYINT( text::XSimpleText ); if( rType == cppu::UnoType<text::XTextRange>::get()) - return uno::makeAny(uno::Reference< text::XTextRange >(static_cast<text::XText*>(this))); + return uno::Any(uno::Reference< text::XTextRange >(static_cast<text::XText*>(this))); QUERYINT(container::XEnumerationAccess ); QUERYINT( container::XElementAccess ); QUERYINT( beans::XMultiPropertyStates ); @@ -1870,11 +1870,11 @@ void SAL_CALL SvxUnoTextBase::insertTextContent( const uno::Reference< text::XTe if (!xContent.is()) throw lang::IllegalArgumentException(); - xPropSetContent->setPropertyValue(UNO_TC_PROP_ANCHOR, uno::makeAny(xRange)); + xPropSetContent->setPropertyValue(UNO_TC_PROP_ANCHOR, uno::Any(xRange)); aSel.End.PositionInParagraph += 1; aSel.Start.PositionInParagraph = aSel.End.PositionInParagraph; - xPropSet->setPropertyValue(UNO_TR_PROP_SELECTION, uno::makeAny(aSel)); + xPropSet->setPropertyValue(UNO_TR_PROP_SELECTION, uno::Any(aSel)); } void SAL_CALL SvxUnoTextBase::removeTextContent( const uno::Reference< text::XTextContent >& ) diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 66f094a00e6a..ca2a45baea1f 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star; #define QUERYINT( xint ) \ if( rType == cppu::UnoType<xint>::get() ) \ - return uno::makeAny(uno::Reference< xint >(this)) + return uno::Any(uno::Reference< xint >(this)) // SvxUnoTextContentEnumeration @@ -108,7 +108,7 @@ uno::Any SvxUnoTextContentEnumeration::nextElement() uno::Reference< text::XTextContent > xRef( maContents.at(mnNextParagraph) ); mnNextParagraph++; - return uno::makeAny( xRef ); + return uno::Any( xRef ); } @@ -429,7 +429,7 @@ uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement() uno::Reference< text::XTextRange > xRange = maPortions.at(mnNextPortion); mnNextPortion++; - return uno::makeAny( xRange ); + return uno::Any( xRange ); } SvxUnoTextCursor::SvxUnoTextCursor( const SvxUnoTextBase& rText ) noexcept @@ -457,7 +457,7 @@ SvxUnoTextCursor::~SvxUnoTextCursor() noexcept uno::Any SAL_CALL SvxUnoTextCursor::queryAggregation( const uno::Type & rType ) { if( rType == cppu::UnoType<text::XTextRange>::get()) - return uno::makeAny(uno::Reference< text::XTextRange >(static_cast<SvxUnoTextRangeBase *>(this))); + return uno::Any(uno::Reference< text::XTextRange >(static_cast<SvxUnoTextRangeBase *>(this))); else QUERYINT( text::XTextCursor ); else QUERYINT( beans::XMultiPropertyStates ); else QUERYINT( beans::XPropertySet );