LibreOffice Module sw (master) 1
Classes | Namespaces | Macros | Functions | Variables
css1atr.cxx File Reference
#include <sal/config.h>
#include <string_view>
#include <hintids.hxx>
#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <svl/whiter.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/blinkitem.hxx>
#include <editeng/cmapitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/kernitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/adjustitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/formatbreakitem.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/widwitem.hxx>
#include <editeng/spltitem.hxx>
#include <editeng/orphitem.hxx>
#include <editeng/charhiddenitem.hxx>
#include <svx/xoutbmp.hxx>
#include <svx/svdobj.hxx>
#include <editeng/langitem.hxx>
#include <editeng/frmdiritem.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmlkywd.hxx>
#include <svl/urihelper.hxx>
#include <unotools/charclass.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <charfmt.hxx>
#include <fmtclds.hxx>
#include <fmtcol.hxx>
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
#include <fmtlsplt.hxx>
#include <pagedesc.hxx>
#include <fmtanchr.hxx>
#include <docary.hxx>
#include <pam.hxx>
#include <viewsh.hxx>
#include <viewopt.hxx>
#include <swtable.hxx>
#include <ftninfo.hxx>
#include <ftnidx.hxx>
#include <txtftn.hxx>
#include <fmtftn.hxx>
#include <doc.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <swerror.h>
#include <paratr.hxx>
#include <frmatr.hxx>
#include <poolfmt.hxx>
#include "css1kywd.hxx"
#include "wrthtml.hxx"
#include "htmlnum.hxx"
#include "css1atr.hxx"
#include <IDocumentStylePoolAccess.hxx>
#include <numrule.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/unit_conversion.hxx>
#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
Include dependency graph for css1atr.cxx:

Go to the source code of this file.

Classes

struct  o3tl::typed_flags< Css1FrameSize >
 

Namespaces

namespace  o3tl
 

Macros

#define HTML_HEADSPACE   (12*20)
 
#define DOT_LEADERS_MAX_WIDTH   18
 

Functions

static WriterOutCSS1_SwFormat (Writer &rWrt, const SwFormat &rFormat, IDocumentStylePoolAccess *pDoc, SwDoc *pTemplate)
 
static WriterOutCSS1_SwPageDesc (Writer &rWrt, const SwPageDesc &rFormat, IDocumentStylePoolAccess *pDoc, SwDoc *pTemplate, sal_uInt16 nRefPoolId, bool bExtRef, bool bPseudo=true)
 
static WriterOutCSS1_SwFootnoteInfo (Writer &rWrt, const SwEndNoteInfo &rInfo, SwDoc *pDoc, bool bHasNotes, bool bEndNote)
 
static void OutCSS1_SwFormatDropAttrs (SwHTMLWriter &rHWrt, const SwFormatDrop &rDrop, const SfxItemSet *pCharFormatItemSet=nullptr)
 
static WriterOutCSS1_SvxTextLn_SvxCrOut_SvxBlink (Writer &rWrt, const SvxUnderlineItem *pUItem, const SvxOverlineItem *pOItem, const SvxCrossedOutItem *pCOItem, const SvxBlinkItem *pBItem)
 
static WriterOutCSS1_SvxFontWeight (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxPosture (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxULSpace (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxLRSpace (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxULSpace_SvxLRSpace (Writer &rWrt, const SvxULSpaceItem *pULSpace, const SvxLRSpaceItem *pLRSpace)
 
static WriterOutCSS1_SvxULSpace_SvxLRSpace (Writer &rWrt, const SfxItemSet &rItemSet)
 
static WriterOutCSS1_SvxBrush (Writer &rWrt, const SfxPoolItem &rHt, sw::Css1Background nMode, const OUString *pGraphicName)
 
static WriterOutCSS1_SvxBrush (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SwFormatFrameSize (Writer &rWrt, const SfxPoolItem &rHt, Css1FrameSize nMode)
 
static WriterOutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep (Writer &rWrt, const SfxItemSet &rItemSet, bool bDeep)
 
static WriterOutCSS1_SwFormatLayoutSplit (Writer &rWrt, const SfxPoolItem &rHt)
 
bool IgnorePropertyForReqIF (bool bReqIF, std::string_view rProperty, std::string_view rValue, std::optional< sw::Css1Background > oMode)
 Determines if rProperty with a given rValue has to be suppressed due to ReqIF mode. More...
 
OString GetCSS1_Color (const Color &rColor)
 
static void AddUnitPropertyValue (OStringBuffer &rOut, tools::Long nVal, FieldUnit eUnit)
 
static sal_uInt16 GetCSS1Selector (const SwFormat *pFormat, OUString &rSelector, sal_uInt16 &rRefPoolId)
 
bool swhtml_css1atr_equalFontItems (const SfxPoolItem &r1, const SfxPoolItem &r2)
 
static bool OutCSS1Rule (SwHTMLWriter &rHTMLWrt, const OUString &rSelector, const SfxItemSet &rItemSet, bool bHasClass, bool bCheckForPseudo)
 
static void OutCSS1DropCapRule (SwHTMLWriter &rHTMLWrt, const OUString &rSelector, const SwFormatDrop &rDrop, bool bHasClass, bool bHasScriptDependencies)
 
WriterOutCSS1_BodyTagStyleOpt (Writer &rWrt, const SfxItemSet &rItemSet)
 
WriterOutCSS1_ParaTagStyleOpt (Writer &rWrt, const SfxItemSet &rItemSet)
 
WriterOutCSS1_TableBGStyleOpt (Writer &rWrt, const SfxPoolItem &rHt)
 Writes the background of table rows. More...
 
WriterOutCSS1_NumberBulletListStyleOpt (Writer &rWrt, const SwNumRule &rNumRule, sal_uInt8 nLevel)
 
static bool OutCSS1_FrameFormatBrush (SwHTMLWriter &rWrt, const SvxBrushItem &rBrushItem)
 
static WriterOutCSS1_SvxCaseMap (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxColor (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxCrossedOut (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxFont (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxFontHeight (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxKerning (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxLanguage (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxUnderline (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxOverline (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxHidden (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxBlink (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxLineSpacing (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxAdjust (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxFormatSplit (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxWidows (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxOrphans (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SwFormatDrop (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep (Writer &rWrt, const SvxFormatBreakItem *pBreakItem, const SwFormatPageDesc *pPDescItem, const SvxFormatKeepItem *pKeepItem)
 
static void OutCSS1_SvxBorderLine (SwHTMLWriter &rHTMLWrt, const char *pProperty, const SvxBorderLine *pLine)
 
WriterOutCSS1_SvxBox (Writer &rWrt, const SfxPoolItem &rHt)
 
static WriterOutCSS1_SvxFrameDirection (Writer &rWrt, const SfxPoolItem &rHt)
 
WriterOutCSS1_HintSpanTag (Writer &rWrt, const SfxPoolItem &rHt)
 
WriterOutCSS1_HintStyleOpt (Writer &rWrt, const SfxPoolItem &rHt)
 

Variables

SwAttrFnTab const aCSS1AttrFnTab
 

Macro Definition Documentation

◆ DOT_LEADERS_MAX_WIDTH

#define DOT_LEADERS_MAX_WIDTH   18

Definition at line 120 of file css1atr.cxx.

◆ HTML_HEADSPACE

#define HTML_HEADSPACE   (12*20)

Definition at line 102 of file css1atr.cxx.

Function Documentation

◆ AddUnitPropertyValue()

static void AddUnitPropertyValue ( OStringBuffer &  rOut,
tools::Long  nVal,
FieldUnit  eUnit 
)
static

◆ GetCSS1_Color()

OString GetCSS1_Color ( const Color rColor)

◆ GetCSS1Selector()

static sal_uInt16 GetCSS1Selector ( const SwFormat pFormat,
OUString &  rSelector,
sal_uInt16 &  rRefPoolId 
)
static

Definition at line 913 of file css1atr.cxx.

References SwHTMLWriter::GetCSS1Selector().

Referenced by OutCSS1_SwFormat().

◆ IgnorePropertyForReqIF()

bool IgnorePropertyForReqIF ( bool  bReqIF,
std::string_view  rProperty,
std::string_view  rValue,
std::optional< sw::Css1Background oMode 
)

Determines if rProperty with a given rValue has to be suppressed due to ReqIF mode.

Definition at line 185 of file css1atr.cxx.

References sCSS1_P_background, sCSS1_P_color, sCSS1_P_text_decoration, and sw::TableCell.

Referenced by SwHTMLWriter::OutCSS1_Property(), OutHTML_SvxFont(), and OutHTML_SvxFontHeight().

◆ OutCSS1_BodyTagStyleOpt()

Writer & OutCSS1_BodyTagStyleOpt ( Writer rWrt,
const SfxItemSet rItemSet 
)

◆ OutCSS1_FrameFormatBrush()

static bool OutCSS1_FrameFormatBrush ( SwHTMLWriter rWrt,
const SvxBrushItem rBrushItem 
)
static

output brush of frame format, if its background color is not "no fill"/"auto fill" or it has a background graphic.

Definition at line 2114 of file css1atr.cxx.

References COL_TRANSPARENT(), sw::Fly, SvxBrushItem::GetColor(), SvxBrushItem::GetGraphicLink(), SvxBrushItem::GetGraphicPos(), and OutCSS1_SvxBrush().

Referenced by SwHTMLWriter::OutCSS1_FrameFormatBackground().

◆ OutCSS1_HintSpanTag()

Writer & OutCSS1_HintSpanTag ( Writer rWrt,
const SfxPoolItem rHt 
)

◆ OutCSS1_HintStyleOpt()

Writer & OutCSS1_HintStyleOpt ( Writer rWrt,
const SfxPoolItem rHt 
)

◆ OutCSS1_NumberBulletListStyleOpt()

Writer & OutCSS1_NumberBulletListStyleOpt ( Writer rWrt,
const SwNumRule rNumRule,
sal_uInt8  nLevel 
)

◆ OutCSS1_ParaTagStyleOpt()

Writer & OutCSS1_ParaTagStyleOpt ( Writer rWrt,
const SfxItemSet rItemSet 
)

◆ OutCSS1_SvxAdjust()

static Writer & OutCSS1_SvxAdjust ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxBlink()

static Writer & OutCSS1_SvxBlink ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 2637 of file css1atr.cxx.

References CSS1_OUTMODE_HINT, and OutCSS1_SvxTextLn_SvxCrOut_SvxBlink().

◆ OutCSS1_SvxBorderLine()

static void OutCSS1_SvxBorderLine ( SwHTMLWriter rHTMLWrt,
const char *  pProperty,
const SvxBorderLine pLine 
)
static

◆ OutCSS1_SvxBox()

Writer & OutCSS1_SvxBox ( Writer rWrt,
const SfxPoolItem rHt 
)

◆ OutCSS1_SvxBrush() [1/2]

static Writer & OutCSS1_SvxBrush ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 3048 of file css1atr.cxx.

References sw::Attr, and OutCSS1_SvxBrush().

◆ OutCSS1_SvxBrush() [2/2]

static Writer & OutCSS1_SvxBrush ( Writer rWrt,
const SfxPoolItem rHt,
sw::Css1Background  nMode,
const OUString *  pGraphicName 
)
static

◆ OutCSS1_SvxCaseMap()

static Writer & OutCSS1_SvxCaseMap ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxColor()

static Writer & OutCSS1_SvxColor ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxCrossedOut()

static Writer & OutCSS1_SvxCrossedOut ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 2391 of file css1atr.cxx.

References CSS1_OUTMODE_HINT, and OutCSS1_SvxTextLn_SvxCrOut_SvxBlink().

◆ OutCSS1_SvxFont()

static Writer & OutCSS1_SvxFont ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxFontHeight()

static Writer & OutCSS1_SvxFontHeight ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxFontWeight()

static Writer & OutCSS1_SvxFontWeight ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep() [1/2]

static Writer & OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep ( Writer rWrt,
const SfxItemSet rItemSet,
bool  bDeep 
)
static

◆ OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep() [2/2]

static Writer & OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep ( Writer rWrt,
const SvxFormatBreakItem pBreakItem,
const SwFormatPageDesc pPDescItem,
const SvxFormatKeepItem pKeepItem 
)
static

◆ OutCSS1_SvxFormatSplit()

static Writer & OutCSS1_SvxFormatSplit ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxFrameDirection()

static Writer & OutCSS1_SvxFrameDirection ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxHidden()

static Writer & OutCSS1_SvxHidden ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxKerning()

static Writer & OutCSS1_SvxKerning ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxLanguage()

static Writer & OutCSS1_SvxLanguage ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxLineSpacing()

static Writer & OutCSS1_SvxLineSpacing ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxLRSpace()

static Writer & OutCSS1_SvxLRSpace ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxOrphans()

static Writer & OutCSS1_SvxOrphans ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 2763 of file css1atr.cxx.

References aStr, GetValue, SwHTMLWriter::OutCSS1_PropertyAscii(), and sCSS1_P_orphans.

◆ OutCSS1_SvxOverline()

static Writer & OutCSS1_SvxOverline ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 2573 of file css1atr.cxx.

References CSS1_OUTMODE_HINT, and OutCSS1_SvxTextLn_SvxCrOut_SvxBlink().

◆ OutCSS1_SvxPosture()

static Writer & OutCSS1_SvxPosture ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxTextLn_SvxCrOut_SvxBlink()

static Writer & OutCSS1_SvxTextLn_SvxCrOut_SvxBlink ( Writer rWrt,
const SvxUnderlineItem pUItem,
const SvxOverlineItem pOItem,
const SvxCrossedOutItem pCOItem,
const SvxBlinkItem pBItem 
)
static

◆ OutCSS1_SvxULSpace()

static Writer & OutCSS1_SvxULSpace ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SvxULSpace_SvxLRSpace() [1/2]

static Writer & OutCSS1_SvxULSpace_SvxLRSpace ( Writer rWrt,
const SfxItemSet rItemSet 
)
static

◆ OutCSS1_SvxULSpace_SvxLRSpace() [2/2]

static Writer & OutCSS1_SvxULSpace_SvxLRSpace ( Writer rWrt,
const SvxULSpaceItem pULSpace,
const SvxLRSpaceItem pLRSpace 
)
static

◆ OutCSS1_SvxUnderline()

static Writer & OutCSS1_SvxUnderline ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 2561 of file css1atr.cxx.

References CSS1_OUTMODE_HINT, and OutCSS1_SvxTextLn_SvxCrOut_SvxBlink().

◆ OutCSS1_SvxWidows()

static Writer & OutCSS1_SvxWidows ( Writer rWrt,
const SfxPoolItem rHt 
)
static

Definition at line 2753 of file css1atr.cxx.

References aStr, GetValue, SwHTMLWriter::OutCSS1_PropertyAscii(), and sCSS1_P_widows.

◆ OutCSS1_SwFootnoteInfo()

static Writer & OutCSS1_SwFootnoteInfo ( Writer rWrt,
const SwEndNoteInfo rInfo,
SwDoc pDoc,
bool  bHasNotes,
bool  bEndNote 
)
static

◆ OutCSS1_SwFormat()

static Writer & OutCSS1_SwFormat ( Writer rWrt,
const SwFormat rFormat,
IDocumentStylePoolAccess pDoc,
SwDoc pTemplate 
)
static

◆ OutCSS1_SwFormatDrop()

static Writer & OutCSS1_SwFormatDrop ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SwFormatDropAttrs()

static void OutCSS1_SwFormatDropAttrs ( SwHTMLWriter rHWrt,
const SwFormatDrop rDrop,
const SfxItemSet pCharFormatItemSet = nullptr 
)
static

◆ OutCSS1_SwFormatFrameSize()

static Writer & OutCSS1_SwFormatFrameSize ( Writer rWrt,
const SfxPoolItem rHt,
Css1FrameSize  nMode 
)
static

◆ OutCSS1_SwFormatLayoutSplit()

static Writer & OutCSS1_SwFormatLayoutSplit ( Writer rWrt,
const SfxPoolItem rHt 
)
static

◆ OutCSS1_SwPageDesc()

static Writer & OutCSS1_SwPageDesc ( Writer rWrt,
const SwPageDesc rFormat,
IDocumentStylePoolAccess pDoc,
SwDoc pTemplate,
sal_uInt16  nRefPoolId,
bool  bExtRef,
bool  bPseudo = true 
)
static

◆ OutCSS1_TableBGStyleOpt()

Writer & OutCSS1_TableBGStyleOpt ( Writer rWrt,
const SfxPoolItem rHt 
)

◆ OutCSS1DropCapRule()

static void OutCSS1DropCapRule ( SwHTMLWriter rHTMLWrt,
const OUString &  rSelector,
const SwFormatDrop rDrop,
bool  bHasClass,
bool  bHasScriptDependencies 
)
static

◆ OutCSS1Rule()

static bool OutCSS1Rule ( SwHTMLWriter rHTMLWrt,
const OUString &  rSelector,
const SfxItemSet rItemSet,
bool  bHasClass,
bool  bCheckForPseudo 
)
static

◆ swhtml_css1atr_equalFontItems()

bool swhtml_css1atr_equalFontItems ( const SfxPoolItem r1,
const SfxPoolItem r2 
)

Variable Documentation

◆ aCSS1AttrFnTab

SwAttrFnTab const aCSS1AttrFnTab