editeng/source/uno/unotext.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 952ded08943731b6e367d7a2b7a54ee7f35464a8
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jul 30 10:09:27 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Jul 31 07:05:52 2024 +0200

    tdf#161846 no need to CloneAsValue() here
    
    the methods are already returning by value
    
    Change-Id: Ie9eaf2ba3ae0ca4ad79b05229dd6856537580044
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171249
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 5e935f0569d0..9d70aee46828 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -625,9 +625,9 @@ uno::Any SvxUnoTextRangeBase::_getPropertyValue(const 
OUString& PropertyName, sa
         {
             std::optional<SfxItemSet> oAttribs;
             if( nPara != -1 )
-                oAttribs.emplace(pForwarder->GetParaAttribs( nPara 
).CloneAsValue());
+                oAttribs.emplace(pForwarder->GetParaAttribs( nPara ));
             else
-                oAttribs.emplace(pForwarder->GetAttribs( GetSelection() 
).CloneAsValue());
+                oAttribs.emplace(pForwarder->GetAttribs( GetSelection() ));
 
             //  Replace Dontcare with Default, so that one always has a mirror
             oAttribs->ClearInvalidItems();
@@ -922,9 +922,9 @@ uno::Sequence< uno::Any > 
SvxUnoTextRangeBase::_getPropertyValues( const uno::Se
     {
         std::optional<SfxItemSet> oAttribs;
         if( nPara != -1 )
-            oAttribs.emplace(pForwarder->GetParaAttribs( nPara 
).CloneAsValue());
+            oAttribs.emplace(pForwarder->GetParaAttribs( nPara ));
         else
-            oAttribs.emplace(pForwarder->GetAttribs( GetSelection() 
).CloneAsValue() );
+            oAttribs.emplace(pForwarder->GetAttribs( GetSelection() ));
 
         oAttribs->ClearInvalidItems();
 

Reply via email to