https://bugs.documentfoundation.org/show_bug.cgi?id=169558

--- Comment #15 from [email protected] <[email protected]> ---
Also something odd: the GetHighContrastMode() branch here tries to pick another
color, but then doesn't actually use it?

    std::vector<double> aStrokePattern;
    basegfx::BColor aColor =
(SwViewOption::GetCurrentViewOptions().*m_pColorFn)().getBColor();
    if (rSettings.GetHighContrastMode())
    {
        // Only a solid line in high contrast mode
        aColor = rSettings.GetDialogTextColor().getBColor();
<---- aColor never referenced again... ---->
    }
    else
    {
        // Get a color for the contrast
        basegfx::BColor aHslLine = basegfx::utils::rgb2hsl(aColor);
        double nLuminance = aHslLine.getZ();
        nLuminance += (1.0 - nLuminance) * 0.75;
        if (aHslLine.getZ() > 0.7)
            nLuminance = aHslLine.getZ() * 0.7;
        aHslLine.setZ(nLuminance);
        const basegfx::BColor aOtherColor = basegfx::utils::hsl2rgb(aHslLine);

        // Compute the plain line
        aSeq.push_back(new
drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPolygon, aOtherColor));

        // Dashed line in twips
        aStrokePattern.push_back(3);
        aStrokePattern.push_back(3);
    }

    // Compute the dashed line primitive
    aSeq.push_back(
            new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
                basegfx::B2DPolyPolygon(aPolygon),

-----> kinda feels like this should be aColor instead of
*m_pColorFn)().getBColor()? Otherwise the GetHighContrastMode() branch is
pointless...

               
drawinglayer::attribute::LineAttribute((SwViewOption::GetCurrentViewOptions().*m_pColorFn)().getBColor()),
               
drawinglayer::attribute::StrokeAttribute(std::move(aStrokePattern))));

    pProcessor->process(aSeq);

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to