Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 10117 → Rev 10107

/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,21 → 309,8
{
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")
390,12 → 377,6
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,21 → 356,8
{
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")
437,12 → 424,6
currentStyle = new gtStyle(*parentStyle);
currentStyle->setName(name);
if (setDefaultStyle)
{
gtParagraphStyle* tmp = dynamic_cast<gtParagraphStyle*>(currentStyle);
if (tmp)
tmp->setDefaultStyle(true);
}
}
else
currentStyle = NULL;