[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sat Mar 19 13:33:44 UTC 2016
sc/source/core/data/patattr.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 90946203acbabcfa68fd0ba692e7cc9f67af7173
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Feb 3 05:02:41 2016 +0100
simplify code a bit
Change-Id: Iffc3fa3240750892e40393c147acc6ba32cec117
Reviewed-on: https://gerrit.libreoffice.org/22573
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 61d8879..eead1a6 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1309,14 +1309,16 @@ sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter ) const
sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
const SfxItemSet* pCondSet ) const
{
- OSL_ENSURE(pFormatter,"GetNumberFormat without Formatter");
+ assert(pFormatter);
+ if (!pCondSet)
+ return GetNumberFormat(pFormatter);
const SfxPoolItem* pFormItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SfxItemState::SET )
+ if ( pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SfxItemState::SET )
pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT);
const SfxPoolItem* pLangItem;
- if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != SfxItemState::SET )
+ if ( pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != SfxItemState::SET )
pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT);
return pFormatter->GetFormatForLanguageIfBuiltIn(
More information about the Libreoffice-commits
mailing list