[Libreoffice-commits] core.git: sc/source

Julien Nabet serval2412 at yahoo.fr
Wed Jun 3 04:05:34 PDT 2015


 sc/source/ui/miscdlgs/scuiautofmt.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3807946b5515e943169da907866c93b52a2b3f19
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun May 31 15:17:19 2015 +0200

    tdf#91726: AutoFormat: Crash when using an existing name
    
    Add a test to check if name already exists
    
    Change-Id: Ie23de04c0b747f58ab61a6e498bf212bf38b346a
    Reviewed-on: https://gerrit.libreoffice.org/16000
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 773169d..fb9a601 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -233,7 +233,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl)
             {
                 aFormatName = pDlg->GetInputString();
 
-                if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) )
+                if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) && pFormat->find(aFormatName) == pFormat->end() )
                 {
                     ScAutoFormatData* pNewData
                         = new ScAutoFormatData( *pSelFmtData );


More information about the Libreoffice-commits mailing list