Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTextOdfWriter Class Reference

#include <qtextodfwriter_p.h>

+ Collaboration diagram for QTextOdfWriter:

Public Member Functions

 QTextOdfWriter (const QTextDocument &document, QIODevice *device)
 
bool writeAll ()
 
void setCreateArchive (bool on)
 
bool createArchive () const
 
void writeBlock (QXmlStreamWriter &writer, const QTextBlock &block)
 
void writeFormats (QXmlStreamWriter &writer, const QSet< int > &formatIds) const
 
void writeBlockFormat (QXmlStreamWriter &writer, QTextBlockFormat format, int formatIndex) const
 
void writeCharacterFormat (QXmlStreamWriter &writer, QTextCharFormat format, int formatIndex) const
 
void writeListFormat (QXmlStreamWriter &writer, QTextListFormat format, int formatIndex) const
 
void writeFrameFormat (QXmlStreamWriter &writer, QTextFrameFormat format, int formatIndex) const
 
void writeTableFormat (QXmlStreamWriter &writer, QTextTableFormat format, int formatIndex) const
 
void writeTableCellFormat (QXmlStreamWriter &writer, QTextTableCellFormat format, int formatIndex, QList< QTextFormat > &styles) const
 
void writeFrame (QXmlStreamWriter &writer, const QTextFrame *frame)
 
void writeInlineCharacter (QXmlStreamWriter &writer, const QTextFragment &fragment) const
 

Public Attributes

const QString officeNS
 
const QString textNS
 
const QString styleNS
 
const QString foNS
 
const QString tableNS
 
const QString drawNS
 
const QString xlinkNS
 
const QString svgNS
 
const int defaultImageResolution = 11811
 

Protected Member Functions

void tableCellStyleElement (QXmlStreamWriter &writer, const int &formatIndex, const QTextTableCellFormat &format, bool hasBorder, int tableId=0, const QTextTableFormat tableFormatTmp=QTextTableFormat()) const
 

Detailed Description

Definition at line 48 of file qtextodfwriter_p.h.

Constructor & Destructor Documentation

◆ QTextOdfWriter()

QTextOdfWriter::QTextOdfWriter ( const QTextDocument & document,
QIODevice * device )

Definition at line 953 of file qtextodfwriter.cpp.

Member Function Documentation

◆ createArchive()

bool QTextOdfWriter::createArchive ( ) const
inline

Definition at line 54 of file qtextodfwriter_p.h.

◆ setCreateArchive()

void QTextOdfWriter::setCreateArchive ( bool on)
inline

Definition at line 53 of file qtextodfwriter_p.h.

◆ tableCellStyleElement()

void QTextOdfWriter::tableCellStyleElement ( QXmlStreamWriter & writer,
const int & formatIndex,
const QTextTableCellFormat & format,
bool hasBorder,
int tableId = 0,
const QTextTableFormat tableFormatTmp = QTextTableFormat() ) const
protected

Definition at line 887 of file qtextodfwriter.cpp.

References QTextCharFormat::AlignBottom, QTextCharFormat::AlignMiddle, QTextCharFormat::AlignTop, arg, borderStyleName(), foNS, QString::fromLatin1(), QColor::HexRgb, pixelToPoint(), pos, styleNS, and QTextFormat::TextVerticalAlignment.

Referenced by writeTableCellFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeAll()

◆ writeBlock()

void QTextOdfWriter::writeBlock ( QXmlStreamWriter & writer,
const QTextBlock & block )

Definition at line 260 of file qtextodfwriter.cpp.

References QTextFormat::AnchorHref, arg, QTextBlock::begin(), QTextBlock::blockFormatIndex(), QTextList::format(), QTextObject::formatIndex(), QString::fromLatin1(), i, QTextListFormat::indent(), QList< T >::isEmpty(), QTextBlock::length(), QString::number(), QStack< T >::pop(), QStack< T >::push(), QList< T >::size(), QTextBlock::textList(), textNS, QStack< T >::top(), writeInlineCharacter(), and xlinkNS.

Referenced by writeFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeBlockFormat()

◆ writeCharacterFormat()

void QTextOdfWriter::writeCharacterFormat ( QXmlStreamWriter & writer,
QTextCharFormat format,
int formatIndex ) const

Definition at line 632 of file qtextodfwriter.cpp.

References QTextCharFormat::AlignBaseline, QTextCharFormat::AlignBottom, QTextCharFormat::AlignMiddle, QTextCharFormat::AlignNormal, QTextCharFormat::AlignSubScript, QTextCharFormat::AlignSuperScript, QTextCharFormat::AlignTop, QFont::AllLowercase, QFont::AllUppercase, QTextFormat::AnchorHref, QTextFormat::AnchorName, arg, QTextFormat::BackgroundBrush, QFont::Bold, QFont::Capitalize, QTextCharFormat::DashDotDotLine, QTextCharFormat::DashDotLine, QTextCharFormat::DashUnderline, QTextCharFormat::DotLine, foNS, QTextFormat::FontCapitalization, QTextFormat::FontFixedPitch, QTextFormat::FontLetterSpacing, QTextFormat::FontOverline, QTextFormat::FontPointSize, QTextFormat::FontStrikeOut, QTextFormat::FontUnderline, QTextFormat::FontWeight, QTextFormat::FontWordSpacing, QTextFormat::ForegroundBrush, QString::fromLatin1(), QTextFormat::IsAnchor, QFont::MixedCase, QFont::Normal, QTextCharFormat::NoUnderline, QString::number(), QTextFormat::OldFontFamily, pixelToPoint(), QTextCharFormat::SingleUnderline, QFont::SmallCaps, QTextCharFormat::SpellCheckUnderline, styleNS, QTextFormat::TextOutline, QTextFormat::TextToolTip, QTextFormat::TextUnderlineColor, QTextFormat::TextUnderlineStyle, QTextFormat::TextVerticalAlignment, and QTextCharFormat::WaveUnderline.

Referenced by writeFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeFormats()

void QTextOdfWriter::writeFormats ( QXmlStreamWriter & writer,
const QSet< int > & formatIds ) const

Definition at line 492 of file qtextodfwriter.cpp.

References QTextDocument::allFormats(), QTextFormat::BlockFormat, QTextFormat::CharFormat, QTextFormat::FrameFormat, QString::fromLatin1(), QTextFormat::isTableCellFormat(), QTextFormat::isTableFormat(), QTextFormat::ListFormat, officeNS, QTextFormat::toBlockFormat(), QTextFormat::toCharFormat(), QTextFormat::toFrameFormat(), QTextFormat::toListFormat(), QTextFormat::toTableCellFormat(), QTextFormat::toTableFormat(), QTextFormat::type(), writeBlockFormat(), writeCharacterFormat(), writeFrameFormat(), writeListFormat(), writeTableCellFormat(), and writeTableFormat().

Referenced by writeAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeFrame()

void QTextOdfWriter::writeFrame ( QXmlStreamWriter & writer,
const QTextFrame * frame )

Definition at line 186 of file qtextodfwriter.cpp.

References arg, child, QTextTableCell::columnSpan(), QHash< Key, T >::contains(), QSet< T >::contains(), QTextTableCell::format(), frame, QString::fromLatin1(), QTextFormat::isTableCellFormat(), QString::number(), QTextBlock::position(), Q_ASSERT, QTextTableCell::row(), QTextTableCell::rowSpan(), QTextTableCell::tableCellFormatIndex(), tableNS, textNS, writeBlock(), and writeFrame().

Referenced by writeAll(), and writeFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeFrameFormat()

void QTextOdfWriter::writeFrameFormat ( QXmlStreamWriter & writer,
QTextFrameFormat format,
int formatIndex ) const

Definition at line 776 of file qtextodfwriter.cpp.

References arg, foNS, QTextFormat::FrameBottomMargin, QTextFormat::FrameLeftMargin, QTextFormat::FrameRightMargin, QTextFormat::FrameTopMargin, QString::fromLatin1(), pixelToPoint(), qMax(), and styleNS.

Referenced by writeFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeInlineCharacter()

void QTextOdfWriter::writeInlineCharacter ( QXmlStreamWriter & writer,
const QTextFragment & fragment ) const

◆ writeListFormat()

void QTextOdfWriter::writeListFormat ( QXmlStreamWriter & writer,
QTextListFormat format,
int formatIndex ) const

Definition at line 739 of file qtextodfwriter.cpp.

References arg, bulletChar(), foNS, QString::fromLatin1(), QTextListFormat::ListDecimal, QTextListFormat::ListLowerAlpha, QTextListFormat::ListLowerRoman, QTextFormat::ListNumberPrefix, QTextFormat::ListNumberSuffix, QTextListFormat::ListUpperAlpha, QTextListFormat::ListUpperRoman, QString::number(), spacing, styleNS, and textNS.

Referenced by writeFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeTableCellFormat()

void QTextOdfWriter::writeTableCellFormat ( QXmlStreamWriter & writer,
QTextTableCellFormat format,
int formatIndex,
QList< QTextFormat > & styles ) const

Definition at line 868 of file qtextodfwriter.cpp.

References QHash< Key, T >::contains(), qDebug, tableCellStyleElement(), QTextFormat::toTableFormat(), and QHash< Key, T >::value().

Referenced by writeFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeTableFormat()

void QTextOdfWriter::writeTableFormat ( QXmlStreamWriter & writer,
QTextTableFormat format,
int formatIndex ) const

! HARD-CODING variableWidth Constraints to 100% / nr constraints

Definition at line 804 of file qtextodfwriter.cpp.

References Qt::AlignHCenter, Qt::AlignJustify, Qt::AlignLeft, Qt::AlignRight, arg, QSet< T >::contains(), QTextLength::FixedLength, QString::fromLatin1(), QSet< T >::insert(), QString::number(), QTextLength::PercentageLength, styleNS, and tableNS.

Referenced by writeFormats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ defaultImageResolution

const int QTextOdfWriter::defaultImageResolution = 11811

Definition at line 69 of file qtextodfwriter_p.h.

◆ drawNS

const QString QTextOdfWriter::drawNS

Definition at line 68 of file qtextodfwriter_p.h.

Referenced by writeAll(), and writeInlineCharacter().

◆ foNS

◆ officeNS

const QString QTextOdfWriter::officeNS

Definition at line 68 of file qtextodfwriter_p.h.

Referenced by writeAll(), and writeFormats().

◆ styleNS

◆ svgNS

const QString QTextOdfWriter::svgNS

Definition at line 68 of file qtextodfwriter_p.h.

Referenced by writeAll(), and writeInlineCharacter().

◆ tableNS

const QString QTextOdfWriter::tableNS

Definition at line 68 of file qtextodfwriter_p.h.

Referenced by writeAll(), writeFrame(), and writeTableFormat().

◆ textNS

const QString QTextOdfWriter::textNS

◆ xlinkNS

const QString QTextOdfWriter::xlinkNS

Definition at line 68 of file qtextodfwriter_p.h.

Referenced by writeAll(), writeBlock(), and writeInlineCharacter().


The documentation for this class was generated from the following files: