summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-02-03 05:02:41 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-19 13:33:16 +0000
commit90946203acbabcfa68fd0ba692e7cc9f67af7173 (patch)
tree5b321e5871733d2f48ee8c6e126a122c84bf78cd /sc/source/core
parent5ca1f04976930c6fd656ebf89d667c80e2466897 (diff)
simplify code a bit
Change-Id: Iffc3fa3240750892e40393c147acc6ba32cec117 Reviewed-on: https://gerrit.libreoffice.org/22573 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/patattr.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 61d88799f775..eead1a66f261 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(