diff options
author | Eike Rathke <erack@redhat.com> | 2014-01-20 19:21:55 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-01-21 08:30:54 +0000 |
commit | a8de4627134ed8bf79a50c78a39f42fbc3be1051 (patch) | |
tree | ae6644a7407f7c4ca7c3c3c8a1d55a63efa882b4 | |
parent | 5f209df8858e56e639394687784d34d3944acad5 (diff) |
resolved fdo#73836 do not apply format twice to string
ScDocument::GetString() already returns the formatted string that then
was formatted through number formatter. Format raw string instead.
Change-Id: I806b4fc904d04169a6c1dbd4a3d00e2556eda7bd
(cherry picked from commit f6b9b73a1f87d1815ed8ab8f2494e5526a710bb9)
Reviewed-on: https://gerrit.libreoffice.org/7550
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
-rw-r--r-- | sc/source/core/tool/cellform.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx index 434043f66ccc..6a23ba238f05 100644 --- a/sc/source/core/tool/cellform.cxx +++ b/sc/source/core/tool/cellform.cxx @@ -144,14 +144,16 @@ OUString ScCellFormat::GetString( { case CELLTYPE_STRING: { - OUString aCellString = rDoc.GetString(rPos); - rFormatter.GetOutputString(aCellString, nFormat, aString, ppColor, bUseStarFormat); + ScRefCellValue aCell; + aCell.assign(rDoc, rPos); + rFormatter.GetOutputString(aCell.mpString->getString(), nFormat, aString, ppColor, bUseStarFormat); } break; case CELLTYPE_EDIT: { - OUString aCellString = rDoc.GetString(rPos); - rFormatter.GetOutputString(aCellString, nFormat, aString, ppColor); + ScRefCellValue aCell; + aCell.assign(rDoc, rPos); + rFormatter.GetOutputString(aCell.getString(&rDoc), nFormat, aString, ppColor); } break; case CELLTYPE_VALUE: |