sc/source/ui/Accessibility/AccessibleDocument.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
New commits: commit f11cbcb60d546ce9c7a840a67458c5c88f8a8531 Author: Michael Stahl <mst...@redhat.com> Date: Tue May 23 15:30:13 2017 +0200 sc: work around MSVC 2017 ICE in AccessibleDocument.cxx MSVC 2017 dies with INTERNAL COMPILER ERROR on the ConvertLayerId function, which uses fancy C++14 constexpr SdrLayerId/strong_int stuff; it happens to compile without complaint if it is expressed as an if-elseif chain instead of the switch statement. Change-Id: Ib1324bbabeb7a971ba090b9647dde55c1cd0d587 diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index e2336902a3bd..b367101ea151 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -120,20 +120,22 @@ struct ScShapeDataLess } static void ConvertLayerId(sal_Int16& rLayerID) // changes the number of the LayerId so it the accessibility order { - switch (rLayerID) + // note: MSVC 2017 ICE's if this is written as "switch" so use "if" + if (sal_uInt8(SC_LAYER_FRONT) == rLayerID) { - case sal_uInt8(SC_LAYER_FRONT): rLayerID = 1; - break; - case sal_uInt8(SC_LAYER_BACK): + } + else if (sal_uInt8(SC_LAYER_BACK) == rLayerID) + { rLayerID = 0; - break; - case sal_uInt8(SC_LAYER_INTERN): + } + else if (sal_uInt8(SC_LAYER_INTERN) == rLayerID) + { rLayerID = 2; - break; - case sal_uInt8(SC_LAYER_CONTROLS): + } + else if (sal_uInt8(SC_LAYER_CONTROLS) == rLayerID) + { rLayerID = 3; - break; } } bool LessThanSheet(const ScAccessibleShapeData* pData) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits