Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

ScriXmlDoc Class Reference

#include <scribusXml.h>

Collaboration diagram for ScriXmlDoc:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ScriXmlDoc ()
 ~ScriXmlDoc ()
bool ReadElemHeader (QString file, bool isFile, double *x, double *y, double *w, double *h)
 Preliminary Scribus file validator. totally rewritten when fixing crash bug #1092. It's much simpler now.
bool ReadElem (QString fileName, SCFonts &avail, ScribusDoc *doc, double Xp, double Yp, bool Fi, bool loc, QMap< QString, QString > &FontSub, ScribusView *view)
QString WriteElem (ScribusDoc *doc, ScribusView *view, Selection *selection)

Public Attributes

ColorList Farben
StyleSet< ParagraphStyledocParagraphStyles
QList< LinkedLFrames
QStringList MNames
QMap< QString, QString > DoFonts
QMap< QString, QString > ReplacedFonts
QMap< uint, QString > DoVorl
QList< ScFacedummyScFaces
uint VorlC
bool newReplacement

Protected Member Functions

bool attrAsBool (const QXmlStreamAttributes &attrs, const char *attName, bool defVal=false)
int attrAsInt (const QXmlStreamAttributes &attrs, const char *attName, int defVal=0)
double attrAsDbl (const QXmlStreamAttributes &attrs, const char *attName, double defVal=0.0)
QString attrAsString (const QXmlStreamAttributes &attrs, const char *attName, const QString &defVal)
void GetItemProps (const QXmlStreamAttributes &attrs, struct CopyPasteBuffer *OB, const QString &baseDir, bool newVersion)
void GetItemText (const QXmlStreamAttributes &attrs, ScribusDoc *doc, bool VorLFound, bool impo, PageItem *obj=0)
void SetItemProps (QXmlStreamWriter &writer, ScribusDoc *doc, PageItem *item, const QString &baseDir, bool newFormat)
void WriteObject (QXmlStreamWriter &writer, ScribusDoc *doc, PageItem *item, const QString &baseDir, QMap< int, int > &UsedMapped2Saved)
void GetStyle (QDomElement &pg, ParagraphStyle &vg, StyleSet< ParagraphStyle > &docParagraphStyles, ScribusDoc *doc, bool fl)
QString AskForFont (SCFonts &avail, QString fStr, ScribusDoc *doc)

Protected Attributes

PrefsManagerprefsManager


Detailed Description

Definition at line 37 of file scribusXml.h.


Constructor & Destructor Documentation

ScriXmlDoc::ScriXmlDoc (  ) 

Definition at line 54 of file scribusXml.cpp.

References PrefsManager::instance(), and prefsManager.

ScriXmlDoc::~ScriXmlDoc (  )  [inline]

Definition at line 42 of file scribusXml.h.


Member Function Documentation

bool ScriXmlDoc::ReadElemHeader ( QString  file,
bool  isFile,
double *  x,
double *  y,
double *  w,
double *  h 
)

Preliminary Scribus file validator. totally rewritten when fixing crash bug #1092. It's much simpler now.

Author:
Frederic Dubuy <effediwhy@gmail.com>, Petr Vanek
Date:
august 17th 2004, 10/03/2004
Parameters:
fileName filename of file to test
Return values:
bool true = Scribus format file, false : not Scribus

Definition at line 886 of file scribusXml.cpp.

References loadRawText().

bool ScriXmlDoc::ReadElem ( QString  fileName,
SCFonts avail,
ScribusDoc doc,
double  Xp,
double  Yp,
bool  Fi,
bool  loc,
QMap< QString, QString > &  FontSub,
ScribusView view 
)

Definition at line 930 of file scribusXml.cpp.

References ScribusDoc::AddFont(), FPointArray::addPoint(), VGradient::addStop(), ScribusDoc::arrowStyles, PageItem::asPathText(), attrAsBool(), attrAsDbl(), attrAsInt(), attrAsString(), ImageLoadRequest::blend, PageItem::BottomLink, PageItem::BottomLinkID, SingleLine::Color, ScribusDoc::currentPage(), SingleLine::Dash, toolPrefs::defFont, ScribusDoc::docPatterns, DoFonts, DoVorl, PageItem::DrawObj_toImage(), ImageEffect::effectCode, ImageEffect::effectParameters, PageItem::effectsInUse, CopyPasteBuffer::endArrowIndex, CopyPasteBuffer::fill_gradient, ScColor::fromQColor(), GetItemProps(), GetItemText(), MissingFont::getReplacementFont(), CopyPasteBuffer::GrColor, CopyPasteBuffer::GrColor2, ScribusDoc::GroupCounter, CopyPasteBuffer::Groups, PageItem::groupsLastItem, ScPattern::height, CopyPasteBuffer::IFont, PageItem::imageClip, PageItem::imageXOffset, PageItem::imageXScale, PageItem::imageYOffset, PageItem::imageYScale, ScImage::imgInfo, CopyPasteBuffer::isBookmark, PageItem::isGroupControl, ImageInfoRecord::isRequest, PageItem::isTableItem, PageItem::ItemNr, ScPattern::items, ScribusDoc::Items, CopyPasteBuffer::itemText, ScribusDoc::Language, CopyPasteBuffer::Language, CopyPasteBuffer::LayerNr, PageItem::LeftLink, PageItem::LeftLinkID, SingleLine::LineEnd, SingleLine::LineJoin, ScribusDoc::LoadPict(), loadRawText(), FPointArray::map(), ScribusDoc::MLineStyles, ScColor::name(), ArrowDesc::name, CopyPasteBuffer::NamedLStyle, CommonStrings::None, ImageLoadRequest::opacity, ScribusDoc::PageColors, SpecialChars::PARSEP, ScribusView::PasteItem(), ScPattern::pattern, ImageInfoRecord::PDSpathData, PageItem::Pfile, CopyPasteBuffer::Pfile, CopyPasteBuffer::Pfile2, CopyPasteBuffer::Pfile3, PageItem::pixm, ArrowDesc::points, ImageInfoRecord::RequestProps, PageItem::RightLink, PageItem::RightLinkID, ScPattern::scaleX, ScPattern::scaleY, SetColor(), ScPattern::setDoc(), ScColor::setNamedColor(), ScColor::setRegistrationColor(), ScColor::setSpotColor(), PageItem::setXYPos(), SingleLine::Shade, ScribusDoc::SnapGuides, CopyPasteBuffer::startArrowIndex, SpecialChars::TAB, ParagraphStyle::TabRecord::tabFillChar, ParagraphStyle::TabRecord::tabPosition, ParagraphStyle::TabRecord::tabType, CopyPasteBuffer::TabValues, CopyPasteBuffer::textAlignment, ScribusDoc::toolSettings, PageItem::TopLink, PageItem::TopLinkID, PageItem::updatePolyClip(), ScribusDoc::UsedFonts, ImageInfoRecord::usedPath, ImageLoadRequest::useMask, ArrowDesc::userArrow, ScribusDoc::useRaster, ImageLoadRequest::visible, VorlC, ScPattern::width, SingleLine::Width, Page::xOffset(), PageItem::xPos, CopyPasteBuffer::Xpos, Page::yOffset(), PageItem::yPos, and CopyPasteBuffer::Ypos.

Referenced by ScribusDoc::copyPage(), ScribusDoc::copyPageToMasterPage(), and MasterPagesPalette::duplicateMasterPage().

QString ScriXmlDoc::WriteElem ( ScribusDoc doc,
ScribusView view,
Selection selection 
)

bool ScriXmlDoc::attrAsBool ( const QXmlStreamAttributes &  attrs,
const char *  attName,
bool  defVal = false 
) [protected]

Definition at line 59 of file scribusXml.cpp.

References value.

Referenced by GetItemProps(), and ReadElem().

int ScriXmlDoc::attrAsInt ( const QXmlStreamAttributes &  attrs,
const char *  attName,
int  defVal = 0 
) [protected]

Definition at line 69 of file scribusXml.cpp.

References value.

Referenced by GetItemProps(), GetItemText(), and ReadElem().

double ScriXmlDoc::attrAsDbl ( const QXmlStreamAttributes &  attrs,
const char *  attName,
double  defVal = 0.0 
) [protected]

Definition at line 79 of file scribusXml.cpp.

References value.

Referenced by GetItemProps(), GetItemText(), and ReadElem().

QString ScriXmlDoc::attrAsString ( const QXmlStreamAttributes &  attrs,
const char *  attName,
const QString &  defVal 
) [protected]

Definition at line 89 of file scribusXml.cpp.

Referenced by GetItemProps(), GetItemText(), and ReadElem().

void ScriXmlDoc::GetItemProps ( const QXmlStreamAttributes &  attrs,
struct CopyPasteBuffer OB,
const QString &  baseDir,
bool  newVersion 
) [protected]

Definition at line 98 of file scribusXml.cpp.

References Annotation::ActionType(), CopyPasteBuffer::AnName, CopyPasteBuffer::AspectRatio, attrAsBool(), attrAsDbl(), attrAsInt(), attrAsString(), CopyPasteBuffer::BaseOffs, CopyPasteBuffer::BExtra, CopyPasteBuffer::BottomLine, CopyPasteBuffer::BottomLinkID, VGradient::clearStops(), CopyPasteBuffer::Clip, CopyPasteBuffer::ClipEdited, CopyPasteBuffer::ColGap, CopyPasteBuffer::Cols, CopyPasteBuffer::ContourLine, CopyPasteBuffer::DashOffset, CopyPasteBuffer::DashValues, CopyPasteBuffer::EmProfile, Annotation::Extern(), CopyPasteBuffer::Extra, CopyPasteBuffer::ExtraV, CopyPasteBuffer::fill_gradient, CopyPasteBuffer::FillRule, CopyPasteBuffer::flippedH, CopyPasteBuffer::flippedV, CopyPasteBuffer::FrameType, CopyPasteBuffer::GrColor, CopyPasteBuffer::GrColor2, CopyPasteBuffer::GrEndX, CopyPasteBuffer::GrEndY, CopyPasteBuffer::GrShade, CopyPasteBuffer::GrShade2, CopyPasteBuffer::GrStartX, CopyPasteBuffer::GrStartY, CopyPasteBuffer::GrType, CopyPasteBuffer::Height, CopyPasteBuffer::IProfile, CopyPasteBuffer::IRender, CopyPasteBuffer::ISize, CopyPasteBuffer::isPrintable, CopyPasteBuffer::isTableItem, CopyPasteBuffer::LeftLine, CopyPasteBuffer::LeftLinkID, CopyPasteBuffer::LineSp, CopyPasteBuffer::LineSpMode, CopyPasteBuffer::LocalScX, CopyPasteBuffer::LocalScY, CopyPasteBuffer::LocalX, CopyPasteBuffer::LocalY, CopyPasteBuffer::Locked, CopyPasteBuffer::LockRes, CopyPasteBuffer::m_annotation, CopyPasteBuffer::m_isAnnotation, CommonStrings::None, CopyPasteBuffer::pattern, CopyPasteBuffer::patternOffsetX, CopyPasteBuffer::patternOffsetY, CopyPasteBuffer::patternRotation, CopyPasteBuffer::patternScaleX, CopyPasteBuffer::patternScaleY, CopyPasteBuffer::Pcolor, CopyPasteBuffer::Pcolor2, CopyPasteBuffer::Pfile, CopyPasteBuffer::Pfile2, CopyPasteBuffer::Pfile3, CopyPasteBuffer::PicArt, CopyPasteBuffer::PLineArt, CopyPasteBuffer::PLineEnd, CopyPasteBuffer::PLineJoin, CopyPasteBuffer::PoLine, CopyPasteBuffer::PoShow, CopyPasteBuffer::PType, CopyPasteBuffer::Pwidth, CopyPasteBuffer::RadRect, FPointArray::resize(), CopyPasteBuffer::Reverse, CopyPasteBuffer::RExtra, CopyPasteBuffer::RightLine, CopyPasteBuffer::RightLinkID, CopyPasteBuffer::Rot, CopyPasteBuffer::ScaleType, Annotation::setAAact(), Annotation::setAction(), Annotation::setActionType(), Annotation::setBl_act(), Annotation::setBorderColor(), Annotation::setBsty(), Annotation::setBwid(), Annotation::setC_act(), Annotation::setChkStil(), Annotation::setD_act(), Annotation::setDown(), Annotation::setE_act(), Annotation::setExtern(), Annotation::setF_act(), Annotation::setFeed(), Annotation::setFlag(), Annotation::setFo_act(), Annotation::setFont(), Annotation::setFormat(), Annotation::setHTML(), Annotation::setIPlace(), Annotation::setIsChk(), Annotation::setK_act(), Annotation::setMaxChar(), FPointArray::setPoint(), Annotation::setRollOver(), Annotation::setScaleW(), Annotation::setToolTip(), Annotation::setType(), Annotation::setUseIcons(), Annotation::setV_act(), Annotation::setVis(), Annotation::setX_act(), Annotation::setZiel(), CopyPasteBuffer::Shade, CopyPasteBuffer::Shade2, CopyPasteBuffer::ShTxtFill, CopyPasteBuffer::ShTxtStroke, ParagraphStyle::TabRecord::tabFillChar, ParagraphStyle::TabRecord::tabPosition, ParagraphStyle::TabRecord::tabType, CopyPasteBuffer::TabValues, CopyPasteBuffer::textAlignment, PageItem::TextFlowDisabled, CopyPasteBuffer::TextflowMode, PageItem::TextFlowUsesBoundingBox, PageItem::TextFlowUsesContourLine, PageItem::TextFlowUsesFrameShape, CopyPasteBuffer::textPathFlipped, CopyPasteBuffer::textPathType, CopyPasteBuffer::TExtra, CopyPasteBuffer::TopLine, CopyPasteBuffer::TopLinkID, CopyPasteBuffer::TransBlend, CopyPasteBuffer::TransBlendS, CopyPasteBuffer::Transparency, CopyPasteBuffer::TranspStroke, CopyPasteBuffer::TxTBase, CopyPasteBuffer::TxtFill, CopyPasteBuffer::TxtOutline, CopyPasteBuffer::TxtScale, CopyPasteBuffer::TxtScaleV, CopyPasteBuffer::TxtShadowX, CopyPasteBuffer::TxtShadowY, CopyPasteBuffer::TxtStrikePos, CopyPasteBuffer::TxtStrikeWidth, CopyPasteBuffer::TxtStroke, CopyPasteBuffer::TxTStyle, CopyPasteBuffer::TxtUnderPos, CopyPasteBuffer::TxtUnderWidth, CopyPasteBuffer::UseEmbedded, and CopyPasteBuffer::Width.

Referenced by ReadElem().

void ScriXmlDoc::GetItemText ( const QXmlStreamAttributes &  attrs,
ScribusDoc doc,
bool  VorLFound,
bool  impo,
PageItem obj = 0 
) [protected]

void ScriXmlDoc::SetItemProps ( QXmlStreamWriter &  writer,
ScribusDoc doc,
PageItem item,
const QString &  baseDir,
bool  newFormat 
) [protected]

Definition at line 530 of file scribusXml.cpp.

References Annotation::AAact(), Annotation::Action(), Annotation::ActionType(), PageItem::annotation(), PageItem::asImageFrame(), PageItem::asLatexFrame(), PageItem::AspectRatio, PageItem::asTextFrame(), PageItem::AutoName, PageItem::BaseOffs, Annotation::Bl_act(), Annotation::borderColor(), PageItem::BottomLine, PageItem::BottomLink, Annotation::Bsty(), Annotation::Bwid(), Annotation::C_act(), ParagraphStyle::charStyle(), Annotation::ChkStil(), PageItem::ClipEdited, PageItem::columnGap(), PageItem::columns(), PageItem_LatexFrame::configFile(), PageItem::ContourLine, PageItem::cornerRadius, ScribusDoc::currentPage(), Annotation::D_act(), PageItem::DashOffset, PageItem::DashValues, StoryText::defaultStyle(), Annotation::Down(), PageItem_LatexFrame::dpi(), Annotation::E_act(), CharStyle::effects(), PageItem::EmProfile, PageItem::endArrowIndex, Annotation::Extern(), Annotation::F_act(), Annotation::Feed(), PageItem::fillBlendmode(), PageItem::fillColor, PageItem::fillShade, PageItem::fillTransparency, Annotation::Flag(), Annotation::Fo_act(), Annotation::Font(), CharStyle::font, Annotation::Format(), PageItem::FrameType, PageItem::Groups, PageItem::groupsLastItem, PageItem::GrType, PageItem::height, Annotation::HTML(), PageItem::imageFlippedH(), PageItem::imageFlippedV(), PageItem::imageShown(), PageItem::imageXOffset, PageItem::imageXScale, PageItem::imageYOffset, PageItem::imageYScale, Annotation::IPlace(), PageItem::IProfile, PageItem::IRender, PageItem::isAnnotation(), PageItem::isAutoText, Annotation::IsChk(), PageItem::isGroupControl, PageItem::isTableItem, PageItem::itemName, PageItem::ItemNr, PageItem::itemText, Annotation::K_act(), PageItem::LeftLine, PageItem::LeftLink, PageItem::lineBlendmode(), PageItem::lineColor, PageItem::lineShade, PageItem::lineTransparency, PageItem::lineWidth, PageItem::locked(), Annotation::MaxChar(), PageItem::NamedLStyle, PageItem::OwnPage, Path2Relative(), PageItem::Pfile, PageItem::Pfile2, PageItem::Pfile3, PageItem::PLineArt, PageItem::PLineEnd, PageItem::PLineJoin, FPointArray::point(), PageItem::PoLine, PageItem::PoShow, PageItem::printEnabled(), PageItem::realItemType(), PageItem::reversed, PageItem::RightLine, PageItem::RightLink, Annotation::RollOver(), PageItem::rotation, PageItem::ScaleType, Annotation::ScaleW(), FPointArray::size(), PageItem::sizeLocked(), PageItem::startArrowIndex, PageItem::textFlowAroundObject(), PageItem::textFlowMode(), PageItem::textFlowUsesBoundingBox(), PageItem::textFlowUsesContourLine(), PageItem::textPathFlipped, PageItem::textPathType, PageItem::textToFrameDistBottom, PageItem::textToFrameDistLeft, PageItem::textToFrameDistRight, PageItem::textToFrameDistTop, Annotation::ToolTip(), PageItem::TopLine, PageItem::TopLink, Annotation::Type(), PageItem::UseEmbedded, Annotation::UseIcons(), PageItem_LatexFrame::usePreamble(), Annotation::V_act(), Annotation::Vis(), PageItem::width, Annotation::X_act(), Page::xOffset(), PageItem::xPos, Page::yOffset(), PageItem::yPos, and Annotation::Ziel().

Referenced by WriteObject().

void ScriXmlDoc::WriteObject ( QXmlStreamWriter &  writer,
ScribusDoc doc,
PageItem item,
const QString &  baseDir,
QMap< int, int > &  UsedMapped2Saved 
) [protected]

void ScriXmlDoc::GetStyle ( QDomElement &  pg,
ParagraphStyle vg,
StyleSet< ParagraphStyle > &  docParagraphStyles,
ScribusDoc doc,
bool  fl 
) [protected]

QString ScriXmlDoc::AskForFont ( SCFonts avail,
QString  fStr,
ScribusDoc doc 
) [protected]


Member Data Documentation

Definition at line 54 of file scribusXml.h.

Definition at line 55 of file scribusXml.h.

Definition at line 56 of file scribusXml.h.

QStringList ScriXmlDoc::MNames

Definition at line 57 of file scribusXml.h.

QMap<QString,QString> ScriXmlDoc::DoFonts

Definition at line 58 of file scribusXml.h.

Referenced by AskForFont(), GetStyle(), and ReadElem().

QMap<QString,QString> ScriXmlDoc::ReplacedFonts

Definition at line 59 of file scribusXml.h.

Referenced by AskForFont(), and GetItemText().

QMap<uint,QString> ScriXmlDoc::DoVorl

Definition at line 60 of file scribusXml.h.

Referenced by GetStyle(), and ReadElem().

Definition at line 61 of file scribusXml.h.

Referenced by GetItemText().

Definition at line 62 of file scribusXml.h.

Referenced by GetStyle(), and ReadElem().

Definition at line 63 of file scribusXml.h.

Referenced by GetItemText().

Definition at line 66 of file scribusXml.h.

Referenced by AskForFont(), GetItemText(), GetStyle(), and ScriXmlDoc().


The documentation for this class was generated from the following files:
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.