// Line width defaults in twips // Thin matches Excel's default values // See tdf#48622 for the discussion leading to these defaults. namespace SvxBorderLineWidth
{
constexpr inline sal_Int16 Hairline = 1; // 0.05pt
constexpr inline sal_Int16 VeryThin = 10; // 0.5pt
constexpr inline sal_Int16 Thin = 15; // 0.75pt
constexpr inline sal_Int16 Medium = 30; // 1.5pt
constexpr inline sal_Int16 Thick = 45; // 2.25pt
constexpr inline sal_Int16 ExtraThick = 90; // 4.5pt
};
// Abstracts over values from css::table::BorderLineStyle enumclass SvxBorderLineStyle : sal_Int16
{ /** No border line
*/
NONE = css::table::BorderLineStyle::NONE,
/** Double border line. Widths of the lines and the gap are all equal, andvaryequallywiththetotalwidth.
*/ DOUBLE = css::table::BorderLineStyle::DOUBLE,
/** Double border line with a thin line outside and a thick line insideseparatedbyasmallgap.
*/
THINTHICK_SMALLGAP = css::table::BorderLineStyle::THINTHICK_SMALLGAP,
/** Double border line with a thin line outside and a thick line insideseparatedbyamediumgap.
*/
THINTHICK_MEDIUMGAP = css::table::BorderLineStyle::THINTHICK_MEDIUMGAP,
/** Double border line with a thin line outside and a thick line insideseparatedbyalargegap.
*/
THINTHICK_LARGEGAP = css::table::BorderLineStyle::THINTHICK_LARGEGAP,
/** Double border line with a thick line outside and a thin line insideseparatedbyasmallgap.
*/
THICKTHIN_SMALLGAP = css::table::BorderLineStyle::THICKTHIN_SMALLGAP,
/** Double border line with a thick line outside and a thin line insideseparatedbyamediumgap.
*/
THICKTHIN_MEDIUMGAP = css::table::BorderLineStyle::THICKTHIN_MEDIUMGAP,
/** Double border line with a thick line outside and a thin line insideseparatedbyalargegap.
*/
THICKTHIN_LARGEGAP = css::table::BorderLineStyle::THICKTHIN_LARGEGAP,
/** 3D embossed border line.
*/
EMBOSSED = css::table::BorderLineStyle::EMBOSSED,
/** 3D engraved border line.
*/
ENGRAVED = css::table::BorderLineStyle::ENGRAVED,
/** Double border line consisting of two fixed thin lines separated by a variablegap.
*/
DOUBLE_THIN = css::table::BorderLineStyle::DOUBLE_THIN,
/** Line consisting of a repetition of one dash and one dot. */
DASH_DOT = css::table::BorderLineStyle::DASH_DOT,
/** Line consisting of a repetition of one dash and 2 dots. */
DASH_DOT_DOT = css::table::BorderLineStyle::DASH_DOT_DOT,
/** Maximum valid border line style value.
*/
BORDER_LINE_STYLE_MAX = css::table::BorderLineStyle::BORDER_LINE_STYLE_MAX,
};
namespace editeng
{
// convert border style between Word formats and LO
SvxBorderLineStyle EDITENG_DLLPUBLIC ConvertBorderStyleFromWord(int); /// convert border width in twips between Word formats and LO double EDITENG_DLLPUBLIC ConvertBorderWidthToWord(SvxBorderLineStyle, double); double EDITENG_DLLPUBLIC ConvertBorderWidthFromWord(SvxBorderLineStyle, double, int);
class EDITENG_DLLPUBLIC SvxBorderLine final
{
tools::Long m_nWidth;
tools::Long m_nMult;
tools::Long m_nDiv;
Color (*m_pColorOutFn)(Color);
Color (*m_pColorInFn)(Color);
Color (*m_pColorGapFn)(Color);
BorderWidthImpl m_aWidthImpl;
Color m_aColor;
model::ComplexColor m_aComplexColor;
SvxBorderLineStyle m_nStyle; bool m_bMirrorWidths; bool m_bUseLeftTop;
public:
SvxBorderLine( const Color *pCol = nullptr,
tools::Long nWidth = 0,
SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID,
Color (*pColorOutFn)( Color ) = &darkColor,
Color (*pColorInFn)( Color ) = &darkColor );
const Color & GetColor() const { return m_aColor; } void SetColor(const Color & rColor ) { m_aColor = rColor; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.