Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 12340 → Rev 12343

/branches/ScribusUIDStyles/scribus/fileloader.cpp
314,22 → 314,22
return ret;
}
 
bool FileLoader::ReadStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles)
bool FileLoader::ReadStyles(const QString& fileName, ScribusDoc* doc)
{
QList<FileFormat>::const_iterator it;
if (findFormat(FileType, it)) {
(*it).plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
return (*it).readStyles(fileName, doc, docParagraphStyles);
return (*it).readStyles(fileName, doc);
}
return false;
}
 
bool FileLoader::ReadCharStyles(const QString& fileName, ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles)
bool FileLoader::ReadCharStyles(const QString& fileName, ScribusDoc* doc)
{
QList<FileFormat>::const_iterator it;
if (findFormat(FileType, it)) {
(*it).plug->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.AvailFonts));
return (*it).readCharStyles(fileName, doc, docCharStyles);
return (*it).readCharStyles(fileName, doc);
}
return false;
}
/branches/ScribusUIDStyles/scribus/loadsaveplugin.h
92,8 → 92,8
virtual void setupTargets(ScribusDoc *targetDoc, ScribusView* targetView, ScribusMainWindow* targetMW, QProgressBar* targetMWPRogressBar, SCFonts* targetAvailableFonts);
virtual void getReplacedFontData(bool & getNewReplacement, QMap<QString,QString> &getReplacedFonts, QList<ScFace> &getDummyScFaces);
virtual bool loadPage(const QString & fileName, int pageNumber, bool Mpage, QString renamedPageName=QString::null);
virtual bool readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles);
virtual bool readCharStyles(const QString& fileName, ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles);
virtual bool readStyles(const QString& fileName, ScribusDoc* doc);
virtual bool readCharStyles(const QString& fileName, ScribusDoc* doc);
virtual bool readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);
virtual bool readColors(const QString& fileName, ColorList & colors);
virtual bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
179,8 → 179,8
void setupTargets(ScribusDoc *targetDoc, ScribusView* targetView, ScribusMainWindow* targetMW, QProgressBar* targetMWPRogressBar, SCFonts* targetAvailableFonts) const;
void getReplacedFontData(bool & getNewReplacement, QMap<QString,QString> &getReplacedFonts, QList<ScFace> &getDummyScFaces) const;
bool loadPage(const QString & fileName, int pageNumber, bool Mpage, QString renamedPageName=QString::null) const;
bool readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles) const;
bool readCharStyles(const QString& fileName, ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles) const;
bool readStyles(const QString& fileName, ScribusDoc* doc) const;
bool readCharStyles(const QString& fileName, ScribusDoc* doc) const;
bool readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty) const;
bool readColors(const QString& fileName, ColorList & colors) const;
bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames) const;
/branches/ScribusUIDStyles/scribus/styles/style.cpp
28,9 → 28,8
const QString Style::INHERIT_PARENT = QUuid().toString() ;
 
Style::Style()
: m_isDefaultStyle(false), m_parent(QUuid().toString()), m_shortcut()
: m_isDefaultStyle(false), m_uuid(QUuid::createUuid().toString()), m_parent(QUuid().toString()), m_shortcut()
{
m_uuid = QUuid::createUuid().toString();
m_name = m_uuid;
StylesLibrary::Add(m_uuid,this);
}
53,15 → 52,15
StylesLibrary::Add(m_uuid,this);
}
 
Style& Style::operator=(const Style& o)
{ //assert(typeinfo() == o.typeinfo());
m_isDefaultStyle = o.m_isDefaultStyle;
m_name = o.m_name;
m_uuid = o.m_uuid;
m_parent = o.m_parent;
m_shortcut = o.m_shortcut;
return *this;
}
// Style& Style::operator=(const Style& o)
// { //assert(typeinfo() == o.typeinfo());
// m_isDefaultStyle = o.m_isDefaultStyle;
// m_name = o.m_name;
// m_uuid = o.m_uuid;
// m_parent = o.m_parent;
// m_shortcut = o.m_shortcut;
// return *this;
// }
 
 
Style::~ Style()
75,7 → 74,7
return m_name;
}
 
QString Style::uuid() const
const QString Style::uuid() const
{
return m_uuid;
}
/branches/ScribusUIDStyles/scribus/styles/charstyle.h
197,7 → 197,7
#undef ATTRDEF
};
 
 
/*
inline CharStyle & CharStyle::operator=(const CharStyle & other)
{
static_cast<Style&>(*this) = static_cast<const Style&>(other);
209,6 → 209,7
m_Effects = other.m_Effects;
return *this;
}
*/
 
inline CharStyle::CharStyle(const CharStyle & other) : Style(other)
{
/branches/ScribusUIDStyles/scribus/styles/linestyle.h
122,7 → 122,7
#undef ATTRDEF
};
 
 
/*
inline LineStyle & LineStyle::operator=(const LineStyle & other)
{
static_cast<Style&>(*this) = static_cast<const Style&>(other);
133,6 → 133,7
#undef ATTRDEF
return *this;
}
*/
 
inline LineStyle::LineStyle(const LineStyle & other) : Style(other)
{
/branches/ScribusUIDStyles/scribus/styles/paragraphstyle.cpp
101,33 → 101,35
}
*/
 
ParagraphStyle& ParagraphStyle::operator=(const ParagraphStyle& other)
{
static_cast<Style&>(*this) = static_cast<const Style&>(other);
 
other.validate();
cstyle = other.charStyle() ;
 
// // we dont want cstyleContext to point to other's charstyle...
// cstyleContext.setDefaultStyle( StylesLibrary::Char( cstyle ) );
//
// if (cstyleContextIsInh)
// {
// const ParagraphStyle * parent = dynamic_cast<const ParagraphStyle*> ( parentStyle() );
// cstyle.setContext(parent ? parent->charStyleContext() : NULL);
// }
// else
// {
// cstyle.setContext(other.charStyle().context());
// }
//
// ParagraphStyle& ParagraphStyle::operator=(const ParagraphStyle& other)
// {
// static_cast<Style&>(*this) = static_cast<const Style&>(other);
//
// other.validate();
// cstyle = other.charStyle() ;
//
// // // we dont want cstyleContext to point to other's charstyle...
// // cstyleContext.setDefaultStyle( StylesLibrary::Char( cstyle ) );
// //
// // if (cstyleContextIsInh)
// // {
// // const ParagraphStyle * parent = dynamic_cast<const ParagraphStyle*> ( parentStyle() );
// // cstyle.setContext(parent ? parent->charStyleContext() : NULL);
// // }
// // else
// // {
// // cstyle.setContext(other.charStyle().context());
// // }
// //
/*
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
m_##attr_NAME = other.m_##attr_NAME; \
inh_##attr_NAME = other.inh_##attr_NAME;
#include "paragraphstyle.attrdefs.cxx"
#undef ATTRDEF
return *this;
}
*/
// return *this;
// }
 
 
 
213,7 → 215,7
att.insert(# attr_NAME, toXMLString(m_##attr_NAME));
#include "paragraphstyle.attrdefs.cxx"
#undef ATTRDEF
if (!uuid().isEmpty())
// if (!uuid().isEmpty())
att["id"] = mkXMLName(elemtag + uuid());
handler.begin(elemtag, att);
// if (parentStyle() && hasParent())
/branches/ScribusUIDStyles/scribus/text/storytext.cpp
336,7 → 336,7
if (txt.length() == 0)
return;
const StyleContext* cStyleContext = paragraphStyle(pos).charStyleContext();
// const StyleContext* cStyleContext = paragraphStyle(pos).charStyleContext();
 
ScText clone;
if (applyNeighbourStyle)
367,7 → 367,7
{
ScText * item = new ScText(clone);
item->ch = ch;
item->setContext(cStyleContext);
// item->setContext(cStyleContext);
d->insert(index, item);
d->len++;
if (item->ch == SpecialChars::PARSEP) {
477,7 → 477,7
len = qMin((uint) (length() - pos), len);
for (int i = pos; i < pos+signed(len); ++i)
{
if (this->charStyle(i).effects() & ScStyle_HyphenationPossible
if (StylesLibrary::Char( this->charStyle(i) )->effects() & ScStyle_HyphenationPossible
// duplicate SHYPHEN if already present to indicate a user provided SHYPHEN:
|| this->text(i) == SpecialChars::SHYPHEN)
{
504,7 → 504,7
}
 
 
const QString & StoryText::charStyle(int pos) const
const QString StoryText::charStyle(int pos) const
{
if (pos < 0)
pos += length();
514,7 → 514,7
 
if (length() == 0) {
// qDebug("storytext::charstyle: default");
return defaultStyle().charStyle();
return defaultStyle();
}
else if (pos == length()) {
qDebug("storytext::charstyle: access at end of text %i", pos);
521,13 → 521,16
--pos;
}
if (text(pos) == SpecialChars::PARSEP)
return paragraphStyle(pos).charStyle();
{
QString r(StylesLibrary::Paragraph( paragraphStyle(pos) )->charStyle());
return r;
}
StoryText* that = const_cast<StoryText *>(this);
return dynamic_cast<const CharStyle &> (*that->d->at(pos));
that->d->at(pos)->uuid();
}
 
const QString & StoryText::paragraphStyle(int pos) const
const QString StoryText::paragraphStyle(int pos) const
{
if (pos < 0)
pos += length();
548,11 → 551,9
if (pos >= length()) {
return that->d->trailingStyle;
}
else if ( !that->d->at(pos)->parstyle ) {
else if ( StylesLibrary::Paragraph( that->d->at(pos)->parstyle ) ) {
ScText* current = that->d->at(pos);
qDebug("inserting default parstyle at %i", pos);
current->parstyle = new ParagraphStyle();
current->parstyle->setContext( & d->pstyleContext);
// current->parstyle->setName( "para(paragraphStyle)" ); // DONT TRANSLATE
// current->parstyle->charStyle().setName( "cpara(paragraphStyle)" ); // DONT TRANSLATE
// current->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext());
560,11 → 561,11
else {
// qDebug(QString("using parstyle at %1").arg(pos));
}
assert (that->d->at(pos)->parstyle);
return *that->d->at(pos)->parstyle;
// assert (that->d->at(pos)->parstyle);
return that->d->at(pos)->parstyle;
}
 
const QString& StoryText::defaultStyle() const
const QString StoryText::defaultStyle() const
{
assert(d);
return d->defaultStyle;
573,10 → 574,10
 
void StoryText::setDefaultStyle(const QString& style)
{
const StyleContext * oldPContext = d->defaultStyle.context();
// const StyleContext * oldPContext = d->defaultStyle.context();
// const StyleContext * oldCContext = d->defaultStyle.charStyle().context();
d->defaultStyle = style;
d->defaultStyle.setContext( oldPContext );
// d->defaultStyle.setContext( oldPContext );
// d->defaultStyle.setName( "storydefault" ); // DONT TRANSLATE
// d->defaultStyle.charStyle().setName( "cstorydefault" ); // DONT TRANSLATE
// qDebug(QString("defstyle %1 context %2 defcstyle %3 ccontext %4 newcontext %5")
633,7 → 634,10
for (uint i=pos; i < pos+len; ++i) {
itText = d->at(i);
if (itText->ch == SpecialChars::PARSEP && itText->parstyle != NULL)
itText->parstyle->charStyle().eraseCharStyle(style);
{
QString cs = StylesLibrary::Paragraph(itText->parstyle)->charStyle();
StylesLibrary::Char(cs)->eraseCharStyle(style);
}
itText->eraseCharStyle(style);
}
654,21 → 658,21
++i;
}
if (i < length()) {
if (!d->at(i)->parstyle) {
qDebug("PARSEP without style at pos %i", i);
d->at(i)->parstyle = new ParagraphStyle();
d->at(i)->parstyle->setContext( & d->pstyleContext);
// d->at(i)->parstyle->setName( "para(applyStyle)" ); // DONT TRANSLATE
// d->at(i)->parstyle->charStyle().setName( "cpara(applyStyle)" ); // DONT TRANSLATE
// d->at(i)->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext() );
}
// if (!d->at(i)->parstyle) {
// qDebug("PARSEP without style at pos %i", i);
// d->at(i)->parstyle = new ParagraphStyle();
// d->at(i)->parstyle->setContext( & d->pstyleContext);
// // d->at(i)->parstyle->setName( "para(applyStyle)" ); // DONT TRANSLATE
// // d->at(i)->parstyle->charStyle().setName( "cpara(applyStyle)" ); // DONT TRANSLATE
// // d->at(i)->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext() );
// }
// qDebug(QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos));
d->at(i)->parstyle->applyStyle(style);
StylesLibrary::Paragraph(d->at(i)->parstyle)->applyStyle(style);
}
else {
// not happy about this but inserting a new PARSEP makes more trouble
// qDebug(QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos));
d->trailingStyle.applyStyle(style);
StylesLibrary::Paragraph(d->trailingStyle)->applyStyle(style);
}
invalidate(pos, qMin(i, length()));
}
686,21 → 690,21
++i;
}
if (i < length()) {
if (!d->at(i)->parstyle) {
qDebug("PARSEP without style at pos %i", i);
d->at(i)->parstyle = new ParagraphStyle();
d->at(i)->parstyle->setContext( & d->pstyleContext);
// d->at(i)->parstyle->setName( "para(eraseStyle)" ); // DONT TRANSLATE
// d->at(i)->parstyle->charStyle().setName( "cpara(eraseStyle)" ); // DONT TRANSLATE
// d->at(i)->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext());
}
// if (!d->at(i)->parstyle) {
// qDebug("PARSEP without style at pos %i", i);
// d->at(i)->parstyle = new ParagraphStyle();
// d->at(i)->parstyle->setContext( & d->pstyleContext);
// // d->at(i)->parstyle->setName( "para(eraseStyle)" ); // DONT TRANSLATE
// // d->at(i)->parstyle->charStyle().setName( "cpara(eraseStyle)" ); // DONT TRANSLATE
// // d->at(i)->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext());
// }
// qDebug(QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos));
d->at(i)->parstyle->eraseStyle(style);
StylesLibrary::Paragraph(d->at(i)->parstyle)->eraseStyle(style);
}
else {
// not happy about this but inserting a new PARSEP makes more trouble
// qDebug(QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos));
d->trailingStyle.eraseStyle(style);
StylesLibrary::Paragraph(d->trailingStyle)->eraseStyle(style);
}
invalidate(pos, qMin(i, length()));
}
713,7 → 717,7
}
 
 
void StoryText::setCharStyle(int pos, uint len, const CharStyle& style)
void StoryText::setCharStyle(int pos, uint len, const QString& style)
{
if (pos < 0)
pos += length();
741,17 → 745,17
 
void StoryText::getNamedResources(ResourceCollection& lists) const
{
d->defaultStyle.getNamedResources(lists);
d->trailingStyle.getNamedResources(lists);
StylesLibrary::Paragraph(d->defaultStyle)->getNamedResources(lists);
StylesLibrary::Paragraph(d->trailingStyle)->getNamedResources(lists);
 
for (int i=0; i < length(); ++i)
{
if (text(i) == SpecialChars::PARSEP)
paragraphStyle(i).getNamedResources(lists);
StylesLibrary::Paragraph(paragraphStyle(i))->getNamedResources(lists);
else if (text(i) == SpecialChars::OBJECT)
object(i)->getNamedResources(lists);
else
charStyle(i).getNamedResources(lists);
StylesLibrary::Char(charStyle(i))->getNamedResources(lists);
}
}
 
760,37 → 764,37
{
ResourceCollection newnames;
newnames.mapStyles(newNameForOld);
replaceNamedResources(newnames);
// replaceNamedResources(newnames);
}
 
void StoryText::replaceNamedResources(ResourceCollection& newNames)
{
int len = length();
// // // void StoryText::replaceNamedResources(ResourceCollection& newNames)
// // // {
// // // int len = length();
// // //
// // // d->defaultStyle.replaceNamedResources(newNames);
// // // d->trailingStyle.replaceNamedResources(newNames);
// // //
// // // if (len == 0)
// // // return;
// // //
// // // ScText* itText;
// // // for (int i=0; i < len; ++i) {
// // // itText = d->at(i);
// // // if (itText->parstyle)
// // // itText->parstyle->replaceNamedResources(newNames);
// // // else
// // // itText->replaceNamedResources(newNames);
// // // }
// // //
// // // invalidate(0, len);
// // // }
 
d->defaultStyle.replaceNamedResources(newNames);
d->trailingStyle.replaceNamedResources(newNames);
if (len == 0)
return;
ScText* itText;
for (int i=0; i < len; ++i) {
itText = d->at(i);
if (itText->parstyle)
itText->parstyle->replaceNamedResources(newNames);
else
itText->replaceNamedResources(newNames);
}
invalidate(0, len);
}
 
 
void StoryText::replaceCharStyles(QMap<QString,QString> newNameForOld)
{
ResourceCollection newnames;
newnames.mapCharStyles(newNameForOld);
replaceNamedResources(newnames);
// replaceNamedResources(newnames);
}
 
 
1141,17 → 1145,17
 
void StoryText::invalidateAll()
{
d->pstyleContext.invalidate();
// d->pstyleContext.invalidate();
invalidate(0, nrOfItems());
}
 
void StoryText::invalidate(int firstItem, int endItem)
{
for (int i=firstItem; i < endItem; ++i) {
ParagraphStyle* par = item(i)->parstyle;
if (par)
par->charStyleContext()->invalidate();
}
// for (int i=firstItem; i < endItem; ++i) {
// ParagraphStyle* par = item(i)->parstyle;
// if (par)
// par->charStyleContext()->invalidate();
// }
}
 
 
1243,15 → 1247,15
}
}
 
const ParagraphStyle& pstyle(paragraphStyle(pos));
const ParagraphStyle* pstyle = StylesLibrary::Paragraph(paragraphStyle(pos));
if (lines() > 0)
{
ls = line(lines()-1);
result.setRect(ls.x, ls.y + pstyle.lineSpacing() - ls.ascent, 1, ls.ascent + ls.descent);
result.setRect(ls.x, ls.y + pstyle->lineSpacing() - ls.ascent, 1, ls.ascent + ls.descent);
}
else
{
result.setRect(1, 1, 1, pstyle.lineSpacing());
result.setRect(1, 1, 1, pstyle->lineSpacing());
}
return result;
}
1292,7 → 1296,7
}
 
 
const CharStyle StoryText::itemStyle(uint itm) const
QString StoryText::itemStyle(uint itm) const
{
assert( static_cast<int>(itm) < length() );
 
1326,19 → 1330,19
pageco.insert("name", "pgco");
 
handler.begin(elemtag, empty);
defaultStyle().saxx(handler, "defaultstyle");
StylesLibrary::Char( defaultStyle() )->saxx(handler, "defaultstyle");
 
CharStyle lastStyle(charStyle(0));
QString lastStyle(charStyle(0));
bool lastWasPar = true;
int lastPos = 0;
handler.begin("p", empty);
paragraphStyle(0).saxx(handler);
StylesLibrary::Paragraph(paragraphStyle(0))->saxx(handler);
handler.begin("span", empty);
lastStyle.saxx(handler);
StylesLibrary::Char(lastStyle)->saxx(handler);
for (int i=0; i < length(); ++i)
{
const QChar curr(text(i));
const CharStyle& style(charStyle(i));
const QString style(charStyle(i));
if (curr == SpecialChars::OBJECT ||
curr == SpecialChars::TAB ||
1367,7 → 1371,7
handler.end("span");
handler.end("p");
handler.begin("p", empty);
paragraphStyle(i+1).saxx(handler);
StylesLibrary::Paragraph(paragraphStyle(i+1))->saxx(handler);
handler.begin("span", empty);
}
else if (curr == SpecialChars::OBJECT && object(i) != NULL)
1410,7 → 1414,7
{
handler.end("span");
handler.begin("span", empty);
style.saxx(handler);
StylesLibrary::Char(style)->saxx(handler);
lastStyle = style;
continue;
}
1710,7 → 1714,9
ruleset.addRule(storyPrefix, Factory<StoryText>());
 
ParagraphStyle::desaxeRules(storyPrefix, ruleset, "defaultstyle");
ruleset.addRule(Digester::concat(storyPrefix, "defaultstyle"), SetterWithConversion<StoryText, const ParagraphStyle&, ParagraphStyle>( & StoryText::setDefaultStyle ));
ruleset.addRule( Digester::concat(storyPrefix, "defaultstyle"),
SetterWithConversion<StoryText, const QString&, QString>( & StoryText::setDefaultStyle )
);
Paragraph paraAction;
Xml_string paraPrefix(Digester::concat(storyPrefix, "p"));
/branches/ScribusUIDStyles/scribus/text/storytext.h
127,9 → 127,9
int nextFramePos(int c);
int prevFramePos(int c);
const QString& charStyle(int pos) const;
const QString& paragraphStyle(int pos) const;
const QString& defaultStyle() const;
const QString charStyle(int pos) const;
const QString paragraphStyle(int pos) const;
const QString defaultStyle() const;
void setDefaultStyle(const QString& style);
void setCharStyle(int pos, uint len, const QString& style);
void setStyle(int pos, const QString& style);
141,7 → 141,7
void replaceCharStyles(QMap<QString,QString> newNameForOld);
void getNamedResources(ResourceCollection& lists) const;
void replaceNamedResources(ResourceCollection& newNames);
// void replaceNamedResources(ResourceCollection& newNames);
uint nrOfParagraphs() const;
int startOfParagraph(uint index) const;
212,7 → 212,7
/** returns the Unicode string which belongs to this ScScriptItem */
const QString itemText(uint index) const;
/** returns the CharStyle which belongs to this ScScriptItem */
const CharStyle itemStyle(uint index) const;
QString itemStyle(uint index) const;
/// returns the character postion at the start of this item
int startOfItem(uint index) const;
/// returns the character position after this item
/branches/ScribusUIDStyles/scribus/style.h
38,7 → 38,7
class SCRIBUS_API Style : public SaxIO {
protected:
bool m_isDefaultStyle;
QString m_uuid;
const QString m_uuid;
QString m_name;
QString m_parent;
QString m_shortcut;
53,7 → 53,7
// if lang is null, which likely will be the rule, we get it from gui language
Style( QString n, QString lang = QString() );
Style& operator=(const Style& o);
// Style& operator=(const Style& o);
Style(const Style& o);
72,7 → 72,7
void setDefaultStyle(bool ids) { m_isDefaultStyle = ids; }
bool isDefaultStyle() const { return m_isDefaultStyle; }
QString uuid() const ; // returns the UUID, at some point has to be changed into uuid() - cannot be reset
const QString uuid() const ; // returns the UUID, at some point has to be changed into uuid() - cannot be reset
QString name() const ; // returns the human-readable name
void setName(const QString& n = QString()/*, const QString& lang = QString()*/);
123,7 → 123,7
const Style* parentStyle() const;
// make us life easier
operator const QString&(){return m_uuid;}
operator const QString&() const{return m_uuid;}
};
 
 
/branches/ScribusUIDStyles/scribus/loadsaveplugin.cpp
226,12 → 226,12
return false;
}
 
bool LoadSavePlugin::readStyles(const QString& /*fileName*/, ScribusDoc* /*doc*/, StyleSet<ParagraphStyle> &/*docParagraphStyles*/)
bool LoadSavePlugin::readStyles(const QString& /*fileName*/, ScribusDoc* /*doc*/)
{
return false;
}
 
bool LoadSavePlugin::readCharStyles(const QString& /*fileName*/, ScribusDoc* /*doc*/, StyleSet<CharStyle> &/*docCharStyles*/)
bool LoadSavePlugin::readCharStyles(const QString& /*fileName*/, ScribusDoc* /*doc*/)
{
return false;
}
285,14 → 285,14
return (plug && load) ? plug->loadPage(fileName, pageNumber, Mpage, renamedPageName) : false;
}
 
bool FileFormat::readStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles) const
bool FileFormat::readStyles(const QString& fileName, ScribusDoc* doc) const
{
return (plug && load) ? plug->readStyles(fileName, doc, docParagraphStyles) : false;
return (plug && load) ? plug->readStyles(fileName, doc) : false;
}
 
bool FileFormat::readCharStyles(const QString& fileName, ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles) const
bool FileFormat::readCharStyles(const QString& fileName, ScribusDoc* doc) const
{
return (plug && load) ? plug->readCharStyles(fileName, doc, docCharStyles) : false;
return (plug && load) ? plug->readCharStyles(fileName, doc) : false;
}
 
bool FileFormat::readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty) const
/branches/ScribusUIDStyles/scribus/smstyleimport.h
24,10 → 24,7
Q_OBJECT
 
public:
SMStyleImport(QWidget* parent,
StyleSet<ParagraphStyle> *pstyleList,
StyleSet<CharStyle> *cstyleList,
QMap<QString, multiLine> *lstyleList);
SMStyleImport(QWidget* parent);
~SMStyleImport() {};
 
//! \brief True if the rename feature is ON.
/branches/ScribusUIDStyles/scribus/fileloader.h
38,8 → 38,8
bool LoadPage(ScribusDoc* currDoc, int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
bool LoadFile(ScribusDoc* currDoc);
bool SaveFile(const QString& fileName, ScribusDoc *doc, QString *savedFile = NULL);
bool ReadStyles(const QString& fileName, ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles);
bool ReadCharStyles(const QString& fileName, ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles);
bool ReadStyles(const QString& fileName, ScribusDoc* doc);
bool ReadCharStyles(const QString& fileName, ScribusDoc* doc);
bool ReadPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
bool ReadColors(const QString& fileName, ColorList & colors);
bool ReadLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);