From 14f81ca6ad289bf86781f642aa129b33151247cf Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 6 Oct 2021 21:25:18 +0200 Subject: Related: tdf#144970 == ScRefFlags::ZERO is not a replacement for != 0 ... It still worked by chance because if (!bValid) the string is parsed with ScRangeList, which does deliver a result. That will have to be adapted to the then expected UI representation though in which case it wouldn't work. Fallout from commit 51d0b4037b36a4a74c9181b95edb18017542ab79 CommitDate: Sat Mar 12 00:21:29 2016 +0000 tdf#84938 Change defines to typed_flags Change-Id: I9612b34829c12e59d4b390c6aa035aca84e87c73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123194 Reviewed-by: Eike Rathke Tested-by: Jenkins --- sc/source/ui/docshell/docsh4.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source/ui/docshell/docsh4.cxx') diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 6ccf37a924b4..951f0fe96823 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -380,7 +380,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } ScAddress::Details aDetails(rDoc.GetAddressConvention(), 0, 0); - bool bValid = (aSingleRange.ParseAny(aRangeName, rDoc, aDetails) & ScRefFlags::VALID) == ScRefFlags::ZERO; + bool bValid = (aSingleRange.ParseAny(aRangeName, rDoc, aDetails) & ScRefFlags::VALID) != ScRefFlags::ZERO; if (!bValid) { aRangeListRef = new ScRangeList; -- cgit