LibreOffice Module sw (master)  1
Classes | Macros | Functions | Variables
docxattributeoutput.cxx File Reference
#include <memory>
#include "docxattributeoutput.hxx"
#include "docxhelper.hxx"
#include "docxsdrexport.hxx"
#include "docxexportfilter.hxx"
#include "docxfootnotes.hxx"
#include "writerwordglue.hxx"
#include "ww8par.hxx"
#include <fmtcntnt.hxx>
#include <fmtftn.hxx>
#include <fchrfmt.hxx>
#include <tgrditem.hxx>
#include <fmtruby.hxx>
#include <fmtanchr.hxx>
#include <breakit.hxx>
#include <redline.hxx>
#include <unocoll.hxx>
#include <unoframe.hxx>
#include <unodraw.hxx>
#include <textboxhelper.hxx>
#include <rdfhelper.hxx>
#include "wrtww8.hxx"
#include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx>
#include <comphelper/string.hxx>
#include <comphelper/flagguard.hxx>
#include <comphelper/sequence.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <oox/export/utils.hxx>
#include <oox/mathml/export.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
#include <oox/token/relationship.hxx>
#include <oox/export/vmlexport.hxx>
#include <oox/ole/olehelper.hxx>
#include <editeng/autokernitem.hxx>
#include <editeng/unoprnms.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/tstpitem.hxx>
#include <editeng/spltitem.hxx>
#include <editeng/widwitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/kernitem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/cmapitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/escapementitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/hyphenzoneitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/contouritem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/emphasismarkitem.hxx>
#include <editeng/twolinesitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <editeng/charrotateitem.hxx>
#include <editeng/charreliefitem.hxx>
#include <editeng/paravertalignitem.hxx>
#include <editeng/pgrditem.hxx>
#include <editeng/frmdiritem.hxx>
#include <editeng/blinkitem.hxx>
#include <editeng/charhiddenitem.hxx>
#include <editeng/editobj.hxx>
#include <editeng/keepitem.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflgrit.hxx>
#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
#include <svl/grabbagitem.hxx>
#include <sfx2/sfxbasemodel.hxx>
#include <tools/datetimeutils.hxx>
#include <svl/whiter.hxx>
#include <rtl/tencinfo.h>
#include <sal/log.hxx>
#include <sot/exchange.hxx>
#include <docufld.hxx>
#include <authfld.hxx>
#include <flddropdown.hxx>
#include <fmtclds.hxx>
#include <fmtinfmt.hxx>
#include <fmtrowsplt.hxx>
#include <fmtline.hxx>
#include <ftninfo.hxx>
#include <htmltbl.hxx>
#include <lineinfo.hxx>
#include <ndgrf.hxx>
#include <ndole.hxx>
#include <ndtxt.hxx>
#include <pagedesc.hxx>
#include <paratr.hxx>
#include <poolfmt.hxx>
#include <charatr.hxx>
#include <swmodule.hxx>
#include <swtable.hxx>
#include <txtftn.hxx>
#include <txtinet.hxx>
#include <fmtautofmt.hxx>
#include <docsh.hxx>
#include <docary.hxx>
#include <fmtclbl.hxx>
#include <fmthdft.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <grfatr.hxx>
#include <frmatr.hxx>
#include <txtatr.hxx>
#include <osl/file.hxx>
#include <utility>
#include <vcl/embeddedfontshelper.hxx>
#include <svtools/miscopt.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/drawing/ShadingPattern.hpp>
#include <com/sun/star/text/GraphicCrop.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <algorithm>
#include <stdarg.h>
#include <toolkit/helper/vclunohelper.hxx>
Include dependency graph for docxattributeoutput.cxx:

Go to the source code of this file.

Classes

class  FFDataWriterHelper
 
class  FieldMarkParamsHelper
 
struct  OUStringIgnoreCase
 Functor to do case-insensitive ordering of OUString instances. More...
 

Macros

#define MAX_CELL_IN_WORD   62
 
#define MSWORD_CH_SHADING_FILL   "FFFFFF"
 
#define MSWORD_CH_SHADING_COLOR   "auto"
 
#define MSWORD_CH_SHADING_VAL   "pct15"
 

Functions

static bool lcl_isOnelinerSdt (const OUString &rName)
 Are multiple paragraphs disallowed inside this type of SDT? More...
 
static void checkAndWriteFloatingTables (DocxAttributeOutput &rDocxAttributeOutput)
 
static OString convertToOOXMLVertOrient (sal_Int16 nOrient)
 
static OString convertToOOXMLHoriOrient (sal_Int16 nOrient, bool bIsPosToggle)
 
static OString convertToOOXMLVertOrientRel (sal_Int16 nOrientRel)
 
static OString convertToOOXMLHoriOrientRel (sal_Int16 nOrientRel)
 
static void lcl_deleteAndResetTheLists (rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrTokenChildren, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrDataBindingAttrs, OUString &rSdtPrAlias)
 
static bool impl_WriteRunText (FSHelperPtr const &pSerializer, sal_Int32 nTextToken, const sal_Unicode *&rBegin, const sal_Unicode *pEnd, bool bMove=true)
 Output sal_Unicode* as a run text (<t>the text</t>). More...
 
static void impl_borderLine (FSHelperPtr const &pSerializer, sal_Int32 elementToken, const SvxBorderLine *pBorderLine, sal_uInt16 nDist, bool bWriteShadow, const table::BorderLine2 *rStyleProps=nullptr)
 
static OutputBorderOptions lcl_getTableCellBorderOptions (bool bEcma)
 
static OutputBorderOptions lcl_getBoxBorderOptions ()
 
static void impl_borders (FSHelperPtr const &pSerializer, const SvxBoxItem &rBox, const OutputBorderOptions &rOptions, std::map< SvxBoxItemLine, css::table::BorderLine2 > &rTableStyleConf)
 
static void impl_cellMargins (FSHelperPtr const &pSerializer, const SvxBoxItem &rBox, sal_Int32 tag, bool bUseStartEnd, const SvxBoxItem *pDefaultMargins=nullptr)
 
sal_Int32 DocxStringGetToken (DocxStringTokenMap const *pMap, const OUString &rName)
 
static bool lcl_guessQFormat (const OUString &rName, sal_uInt16 nWwId)
 Guesses if a style created in Writer (no grab-bag) should be qFormat or not. More...
 
static OString impl_NumberingType (sal_uInt16 nNumberingType)
 
static OString impl_LevelNFC (sal_uInt16 nNumberingType, const SfxItemSet *pOutSet)
 
static char toHexChar (int value)
 
static void impl_WriteTabElement (FSHelperPtr const &pSerializer, const SvxTabStop &rTab, long tabsOffset)
 
static boost::optional< sal_Int32 > lcl_getDmlAlpha (const SvxBrushItem &rBrush)
 

Variables

static const sal_Int32 Tag_StartParagraph_1 = 1
 
static const sal_Int32 Tag_StartParagraph_2 = 2
 
static const sal_Int32 Tag_WriteSdtBlock = 3
 
static const sal_Int32 Tag_StartParagraphProperties = 4
 
static const sal_Int32 Tag_InitCollectedParagraphProperties = 5
 
static const sal_Int32 Tag_StartRun_1 = 6
 
static const sal_Int32 Tag_StartRun_2 = 7
 
static const sal_Int32 Tag_StartRun_3 = 8
 
static const sal_Int32 Tag_EndRun_1 = 9
 
static const sal_Int32 Tag_EndRun_2 = 10
 
static const sal_Int32 Tag_StartRunProperties = 11
 
static const sal_Int32 Tag_InitCollectedRunProperties = 12
 
static const sal_Int32 Tag_Redline_2 = 14
 
static const sal_Int32 Tag_TableDefinition = 15
 
static const sal_Int32 Tag_OutputFlyFrame = 16
 
static const sal_Int32 Tag_StartSection = 17
 

Macro Definition Documentation

#define MAX_CELL_IN_WORD   62
#define MSWORD_CH_SHADING_COLOR   "auto"

Definition at line 7024 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::CharBackground().

#define MSWORD_CH_SHADING_FILL   "FFFFFF"

Definition at line 7023 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::CharBackground().

#define MSWORD_CH_SHADING_VAL   "pct15"

Definition at line 7025 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::CharBackground().

Function Documentation

static void checkAndWriteFloatingTables ( DocxAttributeOutput rDocxAttributeOutput)
static
static OString convertToOOXMLHoriOrient ( sal_Int16  nOrient,
bool  bIsPosToggle 
)
static
static OString convertToOOXMLHoriOrientRel ( sal_Int16  nOrientRel)
static
static OString convertToOOXMLVertOrient ( sal_Int16  nOrient)
static
static OString convertToOOXMLVertOrientRel ( sal_Int16  nOrientRel)
static
sal_Int32 DocxStringGetToken ( DocxStringTokenMap const *  pMap,
const OUString &  rName 
)
static void impl_borderLine ( FSHelperPtr const &  pSerializer,
sal_Int32  elementToken,
const SvxBorderLine *  pBorderLine,
sal_uInt16  nDist,
bool  bWriteShadow,
const table::BorderLine2 *  rStyleProps = nullptr 
)
static
static void impl_borders ( FSHelperPtr const &  pSerializer,
const SvxBoxItem rBox,
const OutputBorderOptions rOptions,
std::map< SvxBoxItemLine, css::table::BorderLine2 > &  rTableStyleConf 
)
static
static void impl_cellMargins ( FSHelperPtr const &  pSerializer,
const SvxBoxItem rBox,
sal_Int32  tag,
bool  bUseStartEnd,
const SvxBoxItem pDefaultMargins = nullptr 
)
static
static OString impl_LevelNFC ( sal_uInt16  nNumberingType,
const SfxItemSet pOutSet 
)
static
static OString impl_NumberingType ( sal_uInt16  nNumberingType)
static
static bool impl_WriteRunText ( FSHelperPtr const &  pSerializer,
sal_Int32  nTextToken,
const sal_Unicode *&  rBegin,
const sal_Unicode pEnd,
bool  bMove = true 
)
static

Output sal_Unicode* as a run text (<t>the text</t>).

When bMove is true, update rBegin to point after the end of the text + 1, meaning that it skips one character after the text. This is to make the switch in DocxAttributeOutput::RunText() nicer ;-)

Definition at line 2697 of file docxattributeoutput.cxx.

References FSNS().

Referenced by DocxAttributeOutput::RunText().

static void impl_WriteTabElement ( FSHelperPtr const &  pSerializer,
const SvxTabStop rTab,
long  tabsOffset 
)
static
static void lcl_deleteAndResetTheLists ( rtl::Reference< sax_fastparser::FastAttributeList > &  pSdtPrTokenChildren,
rtl::Reference< sax_fastparser::FastAttributeList > &  pSdtPrDataBindingAttrs,
OUString &  rSdtPrAlias 
)
static
static OutputBorderOptions lcl_getBoxBorderOptions ( )
static
static boost::optional<sal_Int32> lcl_getDmlAlpha ( const SvxBrushItem rBrush)
static
static OutputBorderOptions lcl_getTableCellBorderOptions ( bool  bEcma)
static
static bool lcl_guessQFormat ( const OUString &  rName,
sal_uInt16  nWwId 
)
static

Guesses if a style created in Writer (no grab-bag) should be qFormat or not.

Definition at line 5775 of file docxattributeoutput.cxx.

References ww::stiCaption, ww::stiEmphasis, ww::stiLev1, ww::stiLev9, ww::stiNormal, ww::stiStrong, ww::stiSubtitle, ww::stiTitle, and ww::stiUser.

Referenced by DocxAttributeOutput::StartStyle().

static bool lcl_isOnelinerSdt ( const OUString &  rName)
static

Are multiple paragraphs disallowed inside this type of SDT?

Definition at line 299 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::StartParagraph().

static char toHexChar ( int  value)
static

Definition at line 6451 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::EmbedFontStyle().

Variable Documentation

const sal_Int32 Tag_EndRun_1 = 9
static

Definition at line 173 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::EndRun().

const sal_Int32 Tag_EndRun_2 = 10
static

Definition at line 174 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::EndRun().

const sal_Int32 Tag_InitCollectedParagraphProperties = 5
static
const sal_Int32 Tag_InitCollectedRunProperties = 12
static
const sal_Int32 Tag_OutputFlyFrame = 16
static

Definition at line 180 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::OutputFlyFrame_Impl().

const sal_Int32 Tag_Redline_2 = 14
static

Definition at line 178 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::Redline().

const sal_Int32 Tag_StartParagraph_1 = 1
static
const sal_Int32 Tag_StartParagraph_2 = 2
static
const sal_Int32 Tag_StartParagraphProperties = 4
static
const sal_Int32 Tag_StartRun_1 = 6
static
const sal_Int32 Tag_StartRun_2 = 7
static
const sal_Int32 Tag_StartRun_3 = 8
static
const sal_Int32 Tag_StartRunProperties = 11
static
const sal_Int32 Tag_StartSection = 17
static
const sal_Int32 Tag_TableDefinition = 15
static

Definition at line 179 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::TableDefinition().

const sal_Int32 Tag_WriteSdtBlock = 3
static

Definition at line 167 of file docxattributeoutput.cxx.

Referenced by DocxAttributeOutput::WriteSdtBlock().