diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-05-31 15:17:19 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-03 11:05:13 +0000 |
commit | 3807946b5515e943169da907866c93b52a2b3f19 (patch) | |
tree | 2f5db28adc159e9ee619e5820280e7b2d18b0b35 /sc | |
parent | 5f36b1954438caef95053c2c0b7d0417e1aa5b31 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/miscdlgs/scuiautofmt.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 773169d21ef6..fb9a60190da2 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 ); |