Example #1
0
border_style::border_style(const border_style & Value)
{
    color_ = Value.get_color();
    length_ = Value.get_length();
    style_ = Value.get_style();

	none_ = Value.is_none();

    initialized_ = true;
}
Example #2
0
bool operator == (border_style & _b1, border_style & _b2)
{
    if (_b1.is_none() && _b2.is_none()) return true;

    if (_b1.is_none() || _b2.is_none()) return false;

    if (    _b1.get_color()     == _b2.get_color()  &&
            _b1.get_length()    == _b2.get_length() &&
            _b1.get_style()     == _b2.get_style())     return true;

    return false;
}
Example #3
0
_CP_OPT(length) GetConsistentBorderValue(const graphic_format_properties & graphicProperties, const border_style & borderStyle, BorderSide borderSide)
{
    if ((borderStyle.get_style() ==  border_style::double_))
    {
        _CP_OPT(border_widths) borderWidths = GetBorderLineWidths(graphicProperties, borderSide);
        if (borderWidths)
            return length(borderWidths->get_summ_unit( length::pt), length::pt);
    }
    else
    {
        if (borderStyle.initialized())
        {
            if (borderStyle.is_none())
                return _CP_OPT(length)();
            else
                return borderStyle.get_length();
        }
    }
    return _CP_OPT(length)();
}