LibreOffice Module sw (master) 1
Macros | Functions | Variables
xmlithlp.cxx File Reference
#include <limits.h>
#include "xmlithlp.hxx"
#include <sax/tools/converter.hxx>
#include <editeng/borderline.hxx>
#include <editeng/brushitem.hxx>
#include <xmloff/xmluconv.hxx>
#include <osl/diagnose.h>
#include <o3tl/safeint.hxx>
#include <com/sun/star/table/BorderLineStyle.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
Include dependency graph for xmlithlp.cxx:

Go to the source code of this file.

Macros

#define SVX_XML_BORDER_WIDTH_THIN   0
 
#define SVX_XML_BORDER_WIDTH_MIDDLE   1
 
#define SVX_XML_BORDER_WIDTH_THICK   2
 

Functions

bool sw_frmitems_parseXMLBorder (std::u16string_view rValue, const SvXMLUnitConverter &rUnitConverter, bool &rHasStyle, sal_uInt16 &rStyle, bool &rHasWidth, sal_uInt16 &rWidth, sal_uInt16 &rNamedWidth, bool &rHasColor, Color &rColor)
 Define various helper variables and functions for xmlimpit.cxx and xmlexpit.cxx. More...
 
static void sw_frmitems_setXMLBorderStyle (SvxBorderLine &rLine, sal_uInt16 nStyle)
 
bool sw_frmitems_setXMLBorder (std::unique_ptr< SvxBorderLine > &rpLine, bool bHasStyle, sal_uInt16 nStyle, bool bHasWidth, sal_uInt16 nWidth, sal_uInt16 nNamedWidth, bool bHasColor, const Color &rColor)
 
void sw_frmitems_setXMLBorder (std::unique_ptr< SvxBorderLine > &rpLine, sal_uInt16 nWidth, sal_uInt16 nOutWidth, sal_uInt16 nInWidth, sal_uInt16 nDistance)
 
void sw_frmitems_MergeXMLHoriPos (SvxGraphicPosition &ePos, SvxGraphicPosition eHori)
 
void sw_frmitems_MergeXMLVertPos (SvxGraphicPosition &ePos, SvxGraphicPosition eVert)
 

Variables

const struct SvXMLEnumMapEntry< sal_uInt16 > psXML_BorderStyles []
 
const struct SvXMLEnumMapEntry< sal_uInt16 > psXML_NamedBorderWidths []
 
const sal_uInt16 aBorderWidths []
 
const struct SvXMLEnumMapEntry< SvxGraphicPositionpsXML_BrushRepeat []
 
const struct SvXMLEnumMapEntry< SvxGraphicPositionpsXML_BrushHoriPos []
 
const struct SvXMLEnumMapEntry< SvxGraphicPositionpsXML_BrushVertPos []
 
const struct SvXMLEnumMapEntry< sal_uInt16 > psXML_BreakType []
 
const struct SvXMLEnumMapEntry< sal_Int16 > aXMLTableAlignMap []
 
const struct SvXMLEnumMapEntry< sal_Int16 > aXMLTableVAlignMap []
 
const struct SvXMLEnumMapEntry< sal_uInt16 > aXML_KeepTogetherType []
 

Macro Definition Documentation

◆ SVX_XML_BORDER_WIDTH_MIDDLE

#define SVX_XML_BORDER_WIDTH_MIDDLE   1

Definition at line 40 of file xmlithlp.cxx.

◆ SVX_XML_BORDER_WIDTH_THICK

#define SVX_XML_BORDER_WIDTH_THICK   2

Definition at line 41 of file xmlithlp.cxx.

◆ SVX_XML_BORDER_WIDTH_THIN

#define SVX_XML_BORDER_WIDTH_THIN   0

Definition at line 39 of file xmlithlp.cxx.

Function Documentation

◆ sw_frmitems_MergeXMLHoriPos()

void sw_frmitems_MergeXMLHoriPos ( SvxGraphicPosition ePos,
SvxGraphicPosition  eHori 
)

Definition at line 237 of file xmlithlp.cxx.

References ePos, GPOS_LB, GPOS_LM, GPOS_LT, GPOS_MB, GPOS_MM, GPOS_MT, GPOS_RB, GPOS_RM, and GPOS_RT.

Referenced by SvXMLImportItemMapper::PutXMLValue().

◆ sw_frmitems_MergeXMLVertPos()

void sw_frmitems_MergeXMLVertPos ( SvxGraphicPosition ePos,
SvxGraphicPosition  eVert 
)

Definition at line 267 of file xmlithlp.cxx.

References ePos, GPOS_LB, GPOS_LM, GPOS_LT, GPOS_MB, GPOS_MM, GPOS_MT, GPOS_RB, GPOS_RM, and GPOS_RT.

Referenced by SvXMLImportItemMapper::PutXMLValue().

◆ sw_frmitems_parseXMLBorder()

bool sw_frmitems_parseXMLBorder ( std::u16string_view  rValue,
const SvXMLUnitConverter rUnitConverter,
bool &  rHasStyle,
sal_uInt16 &  rStyle,
bool &  rHasWidth,
sal_uInt16 &  rWidth,
sal_uInt16 &  rNamedWidth,
bool &  rHasColor,
Color rColor 
)

◆ sw_frmitems_setXMLBorder() [1/2]

bool sw_frmitems_setXMLBorder ( std::unique_ptr< SvxBorderLine > &  rpLine,
bool  bHasStyle,
sal_uInt16  nStyle,
bool  bHasWidth,
sal_uInt16  nWidth,
sal_uInt16  nNamedWidth,
bool  bHasColor,
const Color rColor 
)

◆ sw_frmitems_setXMLBorder() [2/2]

void sw_frmitems_setXMLBorder ( std::unique_ptr< SvxBorderLine > &  rpLine,
sal_uInt16  nWidth,
sal_uInt16  nOutWidth,
sal_uInt16  nInWidth,
sal_uInt16  nDistance 
)

Definition at line 201 of file xmlithlp.cxx.

◆ sw_frmitems_setXMLBorderStyle()

static void sw_frmitems_setXMLBorderStyle ( SvxBorderLine &  rLine,
sal_uInt16  nStyle 
)
static

Definition at line 130 of file xmlithlp.cxx.

References SwPostItHelper::NONE.

Referenced by sw_frmitems_setXMLBorder().

Variable Documentation

◆ aBorderWidths

const sal_uInt16 aBorderWidths[]
Initial value:

Definition at line 71 of file xmlithlp.cxx.

Referenced by sw_frmitems_setXMLBorder().

◆ aXML_KeepTogetherType

const struct SvXMLEnumMapEntry< sal_uInt16 > aXML_KeepTogetherType[]
Initial value:
=
{
{ XML_ALWAYS, 0 },
{ XML_AUTO, 1 },
}
XML_ALWAYS
XML_AUTO
XML_TOKEN_INVALID

Definition at line 326 of file xmlithlp.cxx.

Referenced by SvXMLExportItemMapper::exportXML().

◆ aXMLTableAlignMap

const struct SvXMLEnumMapEntry< sal_Int16 > aXMLTableAlignMap[]
Initial value:
=
{
{ XML_LEFT, text::HoriOrientation::LEFT },
{ XML_LEFT, text::HoriOrientation::LEFT_AND_WIDTH },
{ XML_CENTER, text::HoriOrientation::CENTER },
{ XML_RIGHT, text::HoriOrientation::RIGHT },
{ XML_MARGINS, text::HoriOrientation::FULL },
}
XML_MARGINS
XML_LEFT
XML_CENTER
XML_RIGHT

Definition at line 307 of file xmlithlp.cxx.

Referenced by SvXMLImportItemMapper::PutXMLValue(), and SvXMLExportItemMapper::QueryXMLValue().

◆ aXMLTableVAlignMap

const struct SvXMLEnumMapEntry< sal_Int16 > aXMLTableVAlignMap[]
Initial value:
=
{
{ XML_TOP, text::VertOrientation::TOP },
{ XML_MIDDLE, text::VertOrientation::CENTER },
{ XML_BOTTOM, text::VertOrientation::BOTTOM },
}
XML_TOP
XML_MIDDLE
XML_BOTTOM

Definition at line 318 of file xmlithlp.cxx.

Referenced by SvXMLImportItemMapper::PutXMLValue(), and SvXMLExportItemMapper::QueryXMLValue().

◆ psXML_BorderStyles

const struct SvXMLEnumMapEntry< sal_uInt16 > psXML_BorderStyles[]
Initial value:
=
{
{ XML_SOLID, table::BorderLineStyle::SOLID },
{ XML_DOUBLE, table::BorderLineStyle::DOUBLE },
{ XML_DOUBLE_THIN, table::BorderLineStyle::DOUBLE_THIN },
{ XML_DOTTED, table::BorderLineStyle::DOTTED },
{ XML_DASHED, table::BorderLineStyle::DASHED },
{ XML_FINE_DASHED, table::BorderLineStyle::FINE_DASHED },
{ XML_DASH_DOT, table::BorderLineStyle::DASH_DOT },
{ XML_DASH_DOT_DOT, table::BorderLineStyle::DASH_DOT_DOT },
{ XML_GROOVE, table::BorderLineStyle::ENGRAVED },
{ XML_RIDGE, table::BorderLineStyle::EMBOSSED },
{ XML_INSET, table::BorderLineStyle::INSET },
{ XML_OUTSET, table::BorderLineStyle::OUTSET },
}
XML_SOLID
XML_RIDGE
XML_NONE
XML_OUTSET
XML_DASH_DOT
XML_DASHED
XML_DASH_DOT_DOT
XML_HIDDEN
XML_GROOVE
XML_DOTTED
XML_DOUBLE_THIN
XML_FINE_DASHED
XML_INSET
XML_DOUBLE

Definition at line 43 of file xmlithlp.cxx.

Referenced by sw_frmitems_parseXMLBorder().

◆ psXML_BreakType

const struct SvXMLEnumMapEntry< sal_uInt16 > psXML_BreakType[]
Initial value:
=
{
{ XML_AUTO, 0 },
{ XML_COLUMN, 1 },
{ XML_PAGE, 2 },
{ XML_EVEN_PAGE, 2 },
{ XML_ODD_PAGE, 2 },
}
XML_PAGE
XML_COLUMN
XML_ODD_PAGE
XML_EVEN_PAGE

Definition at line 297 of file xmlithlp.cxx.

Referenced by SvXMLImportItemMapper::PutXMLValue(), and SvXMLExportItemMapper::QueryXMLValue().

◆ psXML_BrushHoriPos

const struct SvXMLEnumMapEntry< SvxGraphicPosition > psXML_BrushHoriPos[]
Initial value:
=
{
}
SvxGraphicPosition
GPOS_LM
GPOS_RM

Definition at line 223 of file xmlithlp.cxx.

Referenced by SvXMLImportItemMapper::PutXMLValue().

◆ psXML_BrushRepeat

const struct SvXMLEnumMapEntry< SvxGraphicPosition > psXML_BrushRepeat[]
Initial value:

Definition at line 215 of file xmlithlp.cxx.

Referenced by SvXMLImportItemMapper::PutXMLValue().

◆ psXML_BrushVertPos

const struct SvXMLEnumMapEntry< SvxGraphicPosition > psXML_BrushVertPos[]
Initial value:

Definition at line 230 of file xmlithlp.cxx.

Referenced by SvXMLImportItemMapper::PutXMLValue().

◆ psXML_NamedBorderWidths

const struct SvXMLEnumMapEntry< sal_uInt16 > psXML_NamedBorderWidths[]
Initial value:
=
{
}
XML_THICK
XML_THIN
#define SVX_XML_BORDER_WIDTH_MIDDLE
Definition: xmlithlp.cxx:40
#define SVX_XML_BORDER_WIDTH_THIN
Definition: xmlithlp.cxx:39
#define SVX_XML_BORDER_WIDTH_THICK
Definition: xmlithlp.cxx:41

Definition at line 62 of file xmlithlp.cxx.

Referenced by sw_frmitems_parseXMLBorder().