diff options
author | Eike Rathke <erack@redhat.com> | 2016-10-19 23:34:25 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-19 23:34:31 +0200 |
commit | 19c46727fd6a287cc3ec0417cbab922e611282c1 (patch) | |
tree | 3be744e23969cae26f561db5e8470f7f46ed2466 | |
parent | 5f01b29876da20299326b466d9596c4121ed2dec (diff) |
sc-perf: SetFormulaCells: unnecessary number format check in clipboard/undo
Change-Id: Ica7495e95700db2e6be1dd475ec450d8450364a4
-rw-r--r-- | sc/source/core/data/column3.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 89aa5e05e6c2..b8042604ad7b 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1922,12 +1922,15 @@ bool ScColumn::SetFormulaCells( SCROW nRow, std::vector<ScFormulaCell*>& rCells // Detach all formula cells that will be overwritten. DetachFormulaCells(aPos, rCells.size()); - for (size_t i = 0, n = rCells.size(); i < n; ++i) + if (!pDocument->IsClipOrUndo()) { - SCROW nThisRow = nRow + i; - sal_uInt32 nFmt = GetNumberFormat(nThisRow); - if ((nFmt % SV_COUNTRY_LANGUAGE_OFFSET) == 0) - rCells[i]->SetNeedNumberFormat(true); + for (size_t i = 0, n = rCells.size(); i < n; ++i) + { + SCROW nThisRow = nRow + i; + sal_uInt32 nFmt = GetNumberFormat(nThisRow); + if ((nFmt % SV_COUNTRY_LANGUAGE_OFFSET) == 0) + rCells[i]->SetNeedNumberFormat(true); + } } std::vector<sc::CellTextAttr> aDefaults(rCells.size(), sc::CellTextAttr()); |