sc/source/ui/miscdlgs/scuiautofmt.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit aa8b2b2b973843001ee2fd85ffc8e8e4d8b659fb Author: Julien Nabet <[email protected]> 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 <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 3807946b5515e943169da907866c93b52a2b3f19) Reviewed-on: https://gerrit.libreoffice.org/16055 Reviewed-by: Christian Lohmaier <[email protected]> Tested-by: Jenkins <[email protected]> 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 [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
