[Libreoffice-commits] core.git: sc/source
Kohei Yoshida (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 27 16:04:06 UTC 2019
sc/source/filter/orcus/interface.cxx | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
New commits:
commit e5b23bc96770b795b4a6014d0b167c6d67508c71
Author: Kohei Yoshida <kohei at libreoffice.org>
AuthorDate: Mon Aug 26 22:34:39 2019 -0400
Commit: Kohei Yoshida <kohei at libreoffice.org>
CommitDate: Tue Aug 27 18:02:23 2019 +0200
You can just check for nCheckPos being 0 for non-error condition.
If I read the method doc of PutEntry correctly, the boolean return
type only indicates whether the string being inserted is a new one
or not. You can still set the format even when the string already
exists in the format table.
Change-Id: Id3165323aada47e8d4fe19683008011bd69caac2
Reviewed-on: https://gerrit.libreoffice.org/78160
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei at libreoffice.org>
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index fbd384be5a76..efd7f55a73e3 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1457,15 +1457,9 @@ void ScOrcusStyles::number_format::applyToItemSet(SfxItemSet& rSet, const ScDocu
OUString Code = maCode; /* <-- Done because the SvNumberFormatter::PutEntry demands a non const NumFormat Code*/
SvNumFormatType type = SvNumFormatType::ALL;
- if (pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US))
- {
- if (nCheckPos == 0)
- {
- rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
- }
- }
- else
- SAL_WARN("sc.orcus.style", "Cannot set Number Format");
+ pFormatter->PutEntry(Code, nCheckPos, type, nKey, LANGUAGE_ENGLISH_US);
+ if (!nCheckPos)
+ rSet.Put(SfxUInt32Item(ATTR_VALUE_FORMAT, nKey));
}
ScOrcusStyles::xf::xf():
More information about the Libreoffice-commits
mailing list