Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 10107 → Rev 10117

/branches/Version133x/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
63,7 → 63,7
styleProperties(attrs);
else if (name == "style:style")
{
if (!defaultStyleCreated)
/*if (!defaultStyleCreated)
{
gtParagraphStyle* pstyle = new gtParagraphStyle(*(writer->getDefaultStyle()));
pstyle->setDefaultStyle(true);
70,7 → 70,7
currentStyle = dynamic_cast<gtStyle*>(pstyle);
currentStyle->setName("default-style");
defaultStyleCreated = true;
}
}*/
styleStyle(attrs);
}
else if (name == "style:tab-stop")
309,8 → 309,21
{
QString name = "";
QString listName = NULL;
bool setDefaultStyle = false;
bool isParaStyle = false;
bool create = true;
 
if (!defaultStyleCreated)
{
gtParagraphStyle* pstyle = new gtParagraphStyle(*(writer->getDefaultStyle()));
pstyle->setDefaultStyle(true);
currentStyle = dynamic_cast<gtStyle*>(pstyle);
currentStyle->setName("default-style");
defaultStyleCreated = true;
setDefaultStyle = true;
parentStyle = currentStyle;
}
 
for (int i = 0; i < attrs.count(); ++i)
{
if (attrs.localName(i) == "style:family")
377,6 → 390,12
currentStyle = new gtStyle(*parentStyle);
currentStyle->setName(name);
if (setDefaultStyle)
{
gtParagraphStyle* tmp = dynamic_cast<gtParagraphStyle*>(currentStyle);
if (tmp)
tmp->setDefaultStyle(true);
}
}
else
currentStyle = NULL;
/branches/Version133x/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp
66,7 → 66,7
styleProperties(attrs);
else if (name == "style:style")
{
if (!defaultStyleCreated)
/*if (!defaultStyleCreated)
{
gtParagraphStyle* pstyle = new gtParagraphStyle(*(writer->getDefaultStyle()));
pstyle->setDefaultStyle(true);
73,7 → 73,7
currentStyle = dynamic_cast<gtStyle*>(pstyle);
currentStyle->setName("default-style");
defaultStyleCreated = true;
}
}*/
styleStyle(attrs);
}
else if (name == "style:tab-stop")
356,8 → 356,21
{
QString name = "";
QString listName = NULL;
bool setDefaultStyle = false;
bool isParaStyle = false;
bool create = true;
 
if (!defaultStyleCreated)
{
gtParagraphStyle* pstyle = new gtParagraphStyle(*(writer->getDefaultStyle()));
pstyle->setDefaultStyle(true);
currentStyle = dynamic_cast<gtStyle*>(pstyle);
currentStyle->setName("default-style");
defaultStyleCreated = true;
setDefaultStyle = true;
parentStyle = currentStyle;
}
 
for (int i = 0; i < attrs.count(); ++i)
{
if (attrs.localName(i) == "style:family")
424,6 → 437,12
currentStyle = new gtStyle(*parentStyle);
currentStyle->setName(name);
if (setDefaultStyle)
{
gtParagraphStyle* tmp = dynamic_cast<gtParagraphStyle*>(currentStyle);
if (tmp)
tmp->setDefaultStyle(true);
}
}
else
currentStyle = NULL;