[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svx/source

Caolán McNamara caolanm at redhat.com
Sat Jun 4 19:46:35 UTC 2016


 svx/source/tbxctrls/PaletteManager.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22d4a2f8a6dbbd15ad7236a6c094804e0211bdad
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jun 4 20:43:44 2016 +0100

    Resolves: tdf#100201 crash on apply custom color
    
    regression from...
    
    commit 789055bc2acb4c71483fd60ea258d158bd5aec10
    Date:   Tue Apr 12 16:39:03 2016 +0200
    
        clang-tidy performance-unnecessary-copy-initialization
    
        probably not much performance benefit, but it sure is good at
        identifying leftover intermediate variables from previous
        refactorings.
    
    This case has a comment explaining the problem that appeared post
    change.
    
    Change-Id: Ib0c0883c57f103656cda00e3a94399a515d7fe41
    (cherry picked from commit 301a87c861842a616e3e5593c664980466d58ffe)

diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index 4acf2e4..535134f 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -227,7 +227,7 @@ void PaletteManager::SetColorSelectFunction(const std::function<void(const OUStr
 void PaletteManager::PopupColorPicker(const OUString& aCommand)
 {
     // The calling object goes away during aColorDlg.Execute(), so we must copy this
-    const OUString& aCommandCopy = aCommand;
+    OUString aCommandCopy = aCommand;
     SvColorDialog aColorDlg( nullptr );
     aColorDlg.SetColor ( mLastColor );
     aColorDlg.SetMode( svtools::ColorPickerMode_MODIFY );


More information about the Libreoffice-commits mailing list