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

New commits:
commit aa8b2b2b973843001ee2fd85ffc8e8e4d8b659fb
Author: Julien Nabet <serval2...@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 <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit 3807946b5515e943169da907866c93b52a2b3f19)
    Reviewed-on: https://gerrit.libreoffice.org/16055
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx 
b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 6f7fa2e..fb7f9ff 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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to