sc/source/ui/drawfunc/drawsh.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 79048d9bedf7ad09200916011d02837f4f3ffe4a
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Tue Jul 4 00:38:01 2023 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Tue Jul 4 10:41:54 2023 +0200

    sc: fix failed assert in when setting a color on a shape
    
    When setting a color with a colorpicker, and assert failed,
    because it's not possible to clone a SfxItemSet by value - use
    a plane Clone instead, which clones into a SfxItemSet.
    
    Change-Id: I8780ed42d3807e9802d3f4fa1d68e16bd5d5a5e6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153937
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 548e5b6d825606bd218ef18591df642872e6acd0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153915

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 52ec9d9d438a..fde34e9d6686 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -260,9 +260,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
                 if( pView->AreObjectsMarked() )
                 {
-                    SfxItemSet aNewArgs = rReq.GetArgs()->CloneAsValue();
-                    lcl_convertStringArguments(aNewArgs);
-                    pView->SetAttrToMarked( aNewArgs, false );
+                    std::unique_ptr<SfxItemSet> aNewArgs = 
rReq.GetArgs()->Clone();
+                    lcl_convertStringArguments(*aNewArgs);
+                    pView->SetAttrToMarked(*aNewArgs, false);
                 }
                 else
                     pView->SetDefaultAttr( *rReq.GetArgs(), false);

Reply via email to