summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-14 17:18:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-14 17:32:17 +0200
commitc455fc6064da0cfe5bc05ce2ac678c1fc89c92a4 (patch)
treefb9851350972208519c1fa43224420ff15582b8a /editeng
parent23622f240d3bed55fc89a3e78e88b10758bd5b4b (diff)
-Werror=logical-op (GCC 6)
"logical ‘and’ of mutually exclusive tests is always false" <sberg> alg, in editeng/source/uno/unoipset.cxx:208 (wid < START && wid > END), is what's actually wanted to check for contained or for not contained in the START..END range? You touched the code last, in b0c2ec72ff171d8b4303d39f11f67497e88e2d8c, 15+ years ago (although the line itself was already like that in the initial import, fd069bee7e57ad529c3c0974559fd2d84ec3151a) <alg> sberg: sorry cannot remember - but looks correct. All values outside OWN_ATTR_VALUE_START/_END are answered with defaut. The renge should be the one from ditEngine <sberg> alg, the code as is is clearly incorrect, as the condition is always false <alg> sberg: Ah, yes! Should probably be an '||' <sberg> alg, OK, thanks, I'll give that a "make check" try (a bit scary to thus enable code that had effectively been disabled since at least the turn of the century) <alg> sberg: Yes - scary is the right word. Looking further, eState == SfxItemState::DEFAULT should result when outside, thus pItem->QueryValue would be taken which *should* get the default from the pool when not in the local ItemSet range. In theory, the same *should* happen Change-Id: I906361272dfe3f6af0e1ed3cb4e245ead7eabaec
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/uno/unoipset.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 4c369844ccf6..6399834bf70e 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -205,7 +205,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
uno::Any aVal;
SfxItemSet aSet( mrItemPool, pMap->nWID, pMap->nWID);
- if( (pMap->nWID < OWN_ATTR_VALUE_START) && (pMap->nWID > OWN_ATTR_VALUE_END ) )
+ if( (pMap->nWID < OWN_ATTR_VALUE_START) || (pMap->nWID > OWN_ATTR_VALUE_END ) )
{
// Get Default from ItemPool
if(SfxItemPool::IsWhich(pMap->nWID))