Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2210 → Rev 2211

/trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp
37,11 → 37,11
currentStyle = NULL;
append = false;
inList = false;
isOrdered = false;
inSpan = false;
listIndex = 0;
listLevel = 0;
currentList = "";
currentListStyle = 0;
inT = false;
tName = "";
}
93,9 → 93,7
else
currentStyle = tmp;
}
else if ((name == "text:unordered-list") ||
(name == "text:ordered-list") ||
(name == "text:list"))
else if (name == "text:list")
{
inList = true;
++listLevel;
107,35 → 105,15
currentList = attrs.value(i);
}
currentStyle = sreader->getStyle(QString(currentList + "_%1").arg(listLevel));
currentListStyle = sreader->getList(currentList);
currentListStyle->setLevel(listLevel);
styleNames.clear();
styleNames.push_back(QString(currentList + "_%1").arg(listLevel));
if (name == "text:ordered-list")
{
isOrdered = true;
isOrdered2.push_back(true);
qDebug("isOrdered2.push_back(true);");
}
else
{
isOrdered = false;
isOrdered2.push_back(false);
qDebug("isOrdered2.push_back(false);");
}
}
else if (name == "text:list-item")
{
qDebug(QString("isOrdered2.size() == %1").arg(isOrdered2.size()));
if (isOrdered2[listLevel - 1])
{
++listIndex;
++listIndex2[listLevel - 1];
if (listLevel == 1)
write(QString("%1. ").arg(listIndex2[listLevel - 1]));
else
write(QString("%1. ").arg(listIndex2[listLevel - 1]));
}
else
write("- ");
currentListStyle->advance();
write(currentListStyle->bullet());
}
else if (name == "style:style")
{
219,9 → 197,7
write(QChar(28));
else if (name == "text:tab")
write("\t");
else if ((name == "text:unordered-list") ||
(name == "text:ordered-list") ||
(name == "text:list"))
else if (name == "text:list")
{
--listLevel;
styleNames.clear();
229,11 → 205,15
{
inList = false;
listIndex2.clear();
currentListStyle = 0;
}
else
{
currentStyle = sreader->getStyle(QString(currentList + "_%1").arg(listLevel));
styleNames.push_back(QString(currentList + "_%1").arg(listLevel));
currentListStyle->resetLevel();
currentListStyle = sreader->getList(currentList);
currentListStyle->setLevel(listLevel);
}
}
else if ((name == "style:style") && (inT))
246,6 → 226,7
 
void ContentReader::write(const QString& text)
{
qDebug(text);
if (importTextOnly)
writer->append(text);
else if (inSpan)