Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 17399 → Rev 17400

/trunk/Scribus/scribus/fileloader.cpp
293,7 → 293,7
return false;
}
 
bool FileLoader::readLineStyles(QMap<QString,multiLine> *Sty)
bool FileLoader::readLineStyles(QHash<QString,multiLine> *Sty)
{
QList<FileFormat>::const_iterator it;
if (findFormat(m_fileType, it))
/trunk/Scribus/scribus/loadsaveplugin.h
110,7 → 110,7
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 readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);
virtual bool readLineStyles(const QString& fileName, QHash<QString, multiLine> *Sty);
virtual bool readColors(const QString& fileName, ColorList & colors);
virtual bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
virtual QImage readThumbnail(const QString& fileName);
209,7 → 209,7
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 readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty) const;
bool readLineStyles(const QString& fileName, QHash<QString,multiLine> *Sty) const;
bool readColors(const QString& fileName, ColorList & colors) const;
bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames) const;
QImage readThumbnail(const QString& fileName) const;
/trunk/Scribus/scribus/serializer.cpp
49,7 → 49,7
ColorList colors;
StyleSet<ParagraphStyle> pstyles;
StyleSet<CharStyle> cstyles;
QMap<QString,multiLine> lstyles;
QHash<QString,multiLine> lstyles;
QList<QString> fonts;
QList<QString> patterns;
 
/trunk/Scribus/scribus/scribusdoc.cpp
1051,7 → 1051,7
// for (uint i = 0; i < docLineStyles.count(); ++i)
// docLineStyles[i].getNamedResources(lists);
QMap<QString,ScPattern>::ConstIterator it;
QHash<QString,ScPattern>::ConstIterator it;
for (it = docPatterns.begin(); it != docPatterns.end(); ++it)
{
ScPattern pa = *it;
1060,7 → 1060,7
pa.items.at(o)->getNamedResources(lists);
}
}
QMap<QString,VGradient>::ConstIterator itg;
QHash<QString,VGradient>::ConstIterator itg;
for (itg = docGradients.begin(); itg != docGradients.end(); ++itg)
{
QList<VColorStop*> cstops = itg.value().colorStops();
1273,7 → 1273,7
docCellStyles[i].replaceNamedResources(newNames);
}
 
QMap<QString,ScPattern>::Iterator it;
QHash<QString,ScPattern>::Iterator it;
for (it = docPatterns.begin(); it != docPatterns.end(); ++it)
{
if (newNames.patterns().contains(it.key()))
1288,7 → 1288,7
}
}
 
QMap<QString,VGradient>::Iterator itg;
QHash<QString,VGradient>::Iterator itg;
for (itg = docGradients.begin(); itg != docGradients.end(); ++itg)
{
if (newNames.gradients().contains(itg.key()))
1499,7 → 1499,7
{
StyleSet<ParagraphStyle> *wrkStyles = &docParagraphStyles;
StyleSet<CharStyle> *wrkCharStyles = &docCharStyles;
QMap<QString, multiLine> *wrkLineStyles = &MLineStyles;
QHash<QString, multiLine> *wrkLineStyles = &MLineStyles;
int oldStyles = wrkStyles->count();
int oldCharStyles = wrkCharStyles->count();
1536,11 → 1536,11
 
void ScribusDoc::loadStylesFromFile(QString fileName, StyleSet<ParagraphStyle> *tempStyles,
StyleSet<CharStyle> *tempCharStyles,
QMap<QString, multiLine> *tempLineStyles)
QHash<QString, multiLine> *tempLineStyles)
{
StyleSet<ParagraphStyle> *wrkStyles = tempStyles;
StyleSet<CharStyle> *wrkCharStyles = tempCharStyles;
QMap<QString, multiLine> *wrkLineStyles = tempLineStyles;
QHash<QString, multiLine> *wrkLineStyles = tempLineStyles;
if (!fileName.isEmpty())
{
3093,7 → 3093,7
{
multiLine::iterator its;
QMap<QString, QString>::const_iterator it;
QMap<QString,multiLine>::iterator itl;
QHash<QString,multiLine>::iterator itl;
for (itl = MLineStyles.begin(); itl != MLineStyles.end(); ++itl)
{
multiLine& mline = itl.value();
3160,7 → 3160,7
bool ScribusDoc::lineStylesUseColor(const QString& colorName)
{
bool found = false;
QMap<QString,multiLine>::const_iterator itm, itmend;
QHash<QString,multiLine>::const_iterator itm, itmend;
multiLine::const_iterator its, itsend;
itmend = MLineStyles.constEnd();
for (itm = MLineStyles.constBegin(); itm != itmend && !found; ++itm)
3179,12 → 3179,12
return found;
}
 
void ScribusDoc::getUsedGradients(QMap<QString, VGradient> &gradients)
void ScribusDoc::getUsedGradients(QHash<QString, VGradient> &gradients)
{
ResourceCollection resources;
this->getNamedResources(resources);
const QMap<QString, QString>& resGradients = resources.gradients();
QMap<QString, VGradient>::iterator it;
QHash<QString, VGradient>::iterator it;
for (it = docGradients.begin(); it != docGradients.end(); ++it)
{
if (resGradients.contains(it.key()))
3194,7 → 3194,7
 
bool ScribusDoc::addGradient(QString &name, VGradient &gradient)
{
for (QMap<QString, VGradient>::Iterator it = docGradients.begin(); it != docGradients.end(); ++it)
for (QHash<QString, VGradient>::Iterator it = docGradients.begin(); it != docGradients.end(); ++it)
{
if (it.value() == gradient)
{
3209,7 → 3209,7
return true;
}
 
void ScribusDoc::setGradients(QMap<QString, VGradient> &gradients)
void ScribusDoc::setGradients(QHash<QString, VGradient> &gradients)
{
docGradients.clear();
docGradients = gradients;
3231,7 → 3231,7
return true;
}
 
void ScribusDoc::setPatterns(QMap<QString, ScPattern> &patterns)
void ScribusDoc::setPatterns(QHash<QString, ScPattern> &patterns)
{
docPatterns.clear();
docPatterns = patterns;
3316,7 → 3316,7
}
allItems.clear();
}
for (QMap<QString, ScPattern>::Iterator it = docPatterns.begin(); it != docPatterns.end(); ++it)
for (QHash<QString, ScPattern>::Iterator it = docPatterns.begin(); it != docPatterns.end(); ++it)
{
for (int c = 0; c < it.value().items.count(); ++c)
{
3531,7 → 3531,7
}
allItems.clear();
}
for (QMap<QString, ScPattern>::Iterator it = docPatterns.begin(); it != docPatterns.end(); ++it)
for (QHash<QString, ScPattern>::Iterator it = docPatterns.begin(); it != docPatterns.end(); ++it)
{
for (int c = 0; c < it.value().items.count(); ++c)
{
4357,7 → 4357,7
void ScribusDoc::recalculateColors()
{
//Adjust Items of the 3 types to the colors
QMap<QString, VGradient>::Iterator itGrad;
QHash<QString, VGradient>::Iterator itGrad;
for (itGrad = docGradients.begin(); itGrad != docGradients.end(); ++itGrad)
{
QList<VColorStop*> cstops = itGrad.value().colorStops();
/trunk/Scribus/scribus/loadsaveplugin.cpp
404,7 → 404,7
return false;
}
 
bool LoadSavePlugin::readLineStyles(const QString& /*fileName*/, QMap<QString,multiLine>* /*Sty*/)
bool LoadSavePlugin::readLineStyles(const QString& /*fileName*/, QHash<QString,multiLine>* /*Sty*/)
{
return false;
}
524,7 → 524,7
return (plug && load) ? plug->readCharStyles(fileName, doc, docCharStyles) : false;
}
 
bool FileFormat::readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty) const
bool FileFormat::readLineStyles(const QString& fileName, QHash<QString, multiLine> *Sty) const
{
return (plug && load) ? plug->readLineStyles(fileName, Sty) : false;
}
/trunk/Scribus/scribus/colorsetmanager.h
42,7 → 42,7
QString userPaletteFileFromName(const QString& paletteName);
bool paletteLocationLocked(const QString& palettePath);
bool checkPaletteFormat(const QString& paletteFileName);
bool loadPalette(const QString& paletteFileName, ScribusDoc *doc, ColorList &colors, QMap<QString,VGradient> &gradients, QMap<QString, ScPattern> &patterns, bool merge);
bool loadPalette(const QString& paletteFileName, ScribusDoc *doc, ColorList &colors, QHash<QString,VGradient> &gradients, QHash<QString, ScPattern> &patterns, bool merge);
protected:
QStringList paletteLocations;
/trunk/Scribus/scribus/fileloader.h
10,6 → 10,7
#include <QString>
#include <QStringList>
#include <QMap>
#include <QHash>
#include <QList>
 
#include "scribusapi.h"
43,7 → 44,7
bool readCharStyles(ScribusDoc* doc, StyleSet<CharStyle> &docCharStyles);
bool readPageCount(int *num1, int *num2, QStringList & masterPageNames);
bool readColors(ColorList & colors);
bool readLineStyles(QMap<QString,multiLine> *Sty);
bool readLineStyles(QHash<QString, multiLine> *Sty);
QImage readThumbnail();
bool postLoad(ScribusDoc* currDoc);
void informReplacementFonts();
/trunk/Scribus/scribus/prefsstructs.h
449,8 → 449,8
VerifierPrefs verifierPrefs;
 
QList<ArrowDesc> arrowStyles;
QMap<QString, VGradient> defaultGradients;
QMap<QString, ScPattern> defaultPatterns;
QHash<QString, VGradient> defaultGradients;
QHash<QString, ScPattern> defaultPatterns;
QList<PageSet> pageSets;
QStringList activePageSizes;
 
/trunk/Scribus/scribus/scribusdoc.h
30,6 → 30,7
#include <QFont>
#include <QList>
#include <QMap>
#include <QHash>
#include <QObject>
#include <QPixmap>
#include <QRectF>
616,7 → 617,7
*/
void loadStylesFromFile(QString fileName, StyleSet<ParagraphStyle> *tempStyles,
StyleSet<CharStyle> *tempCharStyles,
QMap<QString, multiLine> *tempLineStyles);
QHash<QString, multiLine> *tempLineStyles);
 
const CharStyle& charStyle(QString name) { return docCharStyles.get(name); }
const StyleSet<CharStyle>& charStyles() { return docCharStyles; }
680,17 → 681,17
/*!
* @brief Builds a qmap of the gradients used within the document
*/
void getUsedGradients(QMap<QString, VGradient> &Gradients);
void getUsedGradients(QHash<QString, VGradient> &Gradients);
/*!
* @brief Set the gradients for a document
*/
bool addGradient(QString &name, VGradient &gradient);
void setGradients(QMap<QString, VGradient> &gradients);
void setGradients(QHash<QString, VGradient> &gradients);
/*!
* @brief Set the patterns for a document
*/
bool addPattern(QString &name, ScPattern& pattern);
void setPatterns(QMap<QString, ScPattern> &patterns);
void setPatterns(QHash<QString, ScPattern> &patterns);
/*!
* @brief Builds a QStringList of the patterns used within the document
*/
1275,9 → 1276,9
bool OldBM;
bool hasName;
QTimer * const autoSaveTimer;
QMap<QString,multiLine> MLineStyles;
QMap<QString, ScPattern> docPatterns;
QMap<QString, VGradient> docGradients;
QHash<QString,multiLine> MLineStyles;
QHash<QString, ScPattern> docPatterns;
QHash<QString, VGradient> docGradients;
QWidget* WinHan;
bool DoDrawing;
bool drawAsPreview;
/trunk/Scribus/scribus/util_color.h
111,6 → 111,6
* \param EditColors Color list to store the imported colors
* \return true if any colors have been found
*/
bool SCRIBUS_API importColorsFromFile(QString fileName, ColorList &EditColors, QMap<QString,VGradient> *dialogGradients = NULL, bool merge = false);
bool SCRIBUS_API importColorsFromFile(QString fileName, ColorList &EditColors, QHash<QString,VGradient> *dialogGradients = NULL, bool merge = false);
 
#endif
/trunk/Scribus/scribus/colorsetmanager.cpp
275,13 → 275,13
return true;
}
 
bool ColorSetManager::loadPalette(const QString& paletteFileName, ScribusDoc *doc, ColorList &colors, QMap<QString,VGradient> &gradients, QMap<QString, ScPattern> &patterns, bool merge)
bool ColorSetManager::loadPalette(const QString& paletteFileName, ScribusDoc *doc, ColorList &colors, QHash<QString,VGradient> &gradients, QHash<QString, ScPattern> &patterns, bool merge)
{
if (checkPaletteFormat(paletteFileName))
{
ColorList colorListBack = doc->PageColors;
QMap<QString, VGradient> dialogGradientsBack = doc->docGradients;
QMap<QString, ScPattern> dialogPatternsBack = doc->docPatterns;
QHash<QString, VGradient> dialogGradientsBack = doc->docGradients;
QHash<QString, ScPattern> dialogPatternsBack = doc->docPatterns;
if (merge)
{
doc->PageColors = colors;
/trunk/Scribus/scribus/ui/gradientaddedit.cpp
27,7 → 27,7
#include "gradientaddedit.h"
#include <QMessageBox>
 
gradientEditDialog::gradientEditDialog(QWidget* parent, QString name, VGradient gradient, ColorList doco, ScribusDoc *doc, QMap<QString, VGradient> *gradients, bool newFlag) : QDialog(parent)
gradientEditDialog::gradientEditDialog(QWidget* parent, QString name, VGradient gradient, ColorList doco, ScribusDoc *doc, QHash<QString, VGradient> *gradients, bool newFlag) : QDialog(parent)
{
setupUi(this);
setModal(true);
/trunk/Scribus/scribus/ui/stylemanager.cpp
302,7 → 302,7
 
StyleSet<ParagraphStyle> tmpParaStyles;
StyleSet<CharStyle> tmpCharStyles;
QMap<QString, multiLine> tmpLineStyles;
QHash<QString, multiLine> tmpLineStyles;
 
m_doc->loadStylesFromFile(selectedFile, &tmpParaStyles, &tmpCharStyles, &tmpLineStyles);
 
/trunk/Scribus/scribus/ui/symbolpalette.cpp
219,13 → 219,16
{
SymbolViewWidget->clear();
SymbolViewWidget->setWordWrap(true);
for (QMap<QString, ScPattern>::Iterator it = currDoc->docPatterns.begin(); it != currDoc->docPatterns.end(); ++it)
QStringList patK = currDoc->docPatterns.keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
ScPattern sp = currDoc->docPatterns.value(patK[a]);
QPixmap pm;
if (it.value().getPattern()->width() >= it.value().getPattern()->height())
pm = QPixmap::fromImage(it.value().getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
if (sp.getPattern()->width() >= sp.getPattern()->height())
pm = QPixmap::fromImage(sp.getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
else
pm = QPixmap::fromImage(it.value().getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
pm = QPixmap::fromImage(sp.getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
QPixmap pm2(48, 48);
pm2.fill(palette().color(QPalette::Base));
QPainter p;
232,8 → 235,8
p.begin(&pm2);
p.drawPixmap(24 - pm.width() / 2, 24 - pm.height() / 2, pm);
p.end();
QListWidgetItem *item = new QListWidgetItem(pm2, it.key(), SymbolViewWidget);
if (editItemNames.contains(it.key()))
QListWidgetItem *item = new QListWidgetItem(pm2, patK[a], SymbolViewWidget);
if (editItemNames.contains(patK[a]))
item->setFlags(0);
else
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled);
/trunk/Scribus/scribus/ui/cpalette.cpp
594,8 → 594,11
namedGradientStroke->clear();
namedGradientStroke->setIconSize(QSize(48, 12));
namedGradientStroke->addItem( tr("Custom"));
for (QMap<QString, VGradient>::Iterator it = gradientList->begin(); it != gradientList->end(); ++it)
QStringList patK = gradientList->keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
VGradient gr = gradientList->value(patK[a]);
QImage pixm(48, 12, QImage::Format_ARGB32_Premultiplied);
QPainter pb;
QBrush b(QColor(205,205,205), loadIcon("testfill.png"));
606,7 → 609,7
p->setPen(Qt::black);
p->setLineWidth(1);
p->setFillMode(2);
p->fill_gradient = it.value();
p->fill_gradient = gr;
p->setGradient(VGradient::linear, FPoint(0,6), FPoint(48, 6), FPoint(0,0), 1, 0);
p->drawRect(0, 0, 48, 12);
p->end();
613,14 → 616,14
delete p;
QPixmap pm;
pm = QPixmap::fromImage(pixm);
namedGradient->addItem(pm, it.key());
namedGradientStroke->addItem(pm, it.key());
namedGradient->addItem(pm, patK[a]);
namedGradientStroke->addItem(pm, patK[a]);
}
connect(namedGradient, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradient(const QString &)));
connect(namedGradientStroke, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradientStroke(const QString &)));
}
 
void Cpalette::setGradients(QMap<QString, VGradient> *docGradients)
void Cpalette::setGradients(QHash<QString, VGradient> *docGradients)
{
gradientList = docGradients;
updateGradientList();
708,13 → 711,16
patternBox->setIconSize(QSize(48, 48));
patternBoxStroke->clear();
patternBoxStroke->setIconSize(QSize(48, 48));
for (QMap<QString, ScPattern>::Iterator it = patternList->begin(); it != patternList->end(); ++it)
QStringList patK = patternList->keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
ScPattern sp = patternList->value(patK[a]);
QPixmap pm;
if (it.value().getPattern()->width() >= it.value().getPattern()->height())
pm=QPixmap::fromImage(it.value().getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
if (sp.getPattern()->width() >= sp.getPattern()->height())
pm=QPixmap::fromImage(sp.getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
else
pm=QPixmap::fromImage(it.value().getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
pm=QPixmap::fromImage(sp.getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
QPixmap pm2(48, 48);
pm2.fill(palette().color(QPalette::Base));
QPainter p;
721,9 → 727,9
p.begin(&pm2);
p.drawPixmap(24 - pm.width() / 2, 24 - pm.height() / 2, pm);
p.end();
QListWidgetItem *item = new QListWidgetItem(pm2, it.key(), patternBox);
QListWidgetItem *item = new QListWidgetItem(pm2, patK[a], patternBox);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
QListWidgetItem *itemS = new QListWidgetItem(pm2, it.key(), patternBoxStroke);
QListWidgetItem *itemS = new QListWidgetItem(pm2, patK[a], patternBoxStroke);
itemS->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
}
patternBox->clearSelection();
744,7 → 750,7
}
}
 
void Cpalette::setPatterns(QMap<QString, ScPattern> *docPatterns)
void Cpalette::setPatterns(QHash<QString, ScPattern> *docPatterns)
{
patternList = docPatterns;
updatePatternList();
/trunk/Scribus/scribus/ui/transparencypalette.h
69,8 → 69,8
void updateColorList();
 
void setColors(ColorList newColorList);
void setGradients(QMap<QString, VGradient> *docGradients);
void setPatterns(QMap<QString, ScPattern> *docPatterns);
void setGradients(QHash<QString, VGradient> *docGradients);
void setPatterns(QHash<QString, ScPattern> *docPatterns);
 
public slots:
void handleUpdateRequest(int);
116,8 → 116,8
PageItem* currentItem;
ColorList colorList;
int currentUnit;
QMap<QString, ScPattern> *patternList;
QMap<QString, VGradient> *gradientList;
QHash<QString, ScPattern> *patternList;
QHash<QString, VGradient> *gradientList;
double m_Pattern_scaleX;
double m_Pattern_scaleY;
double m_Pattern_offsetX;
/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
393,7 → 393,7
lineStyles->clear();
if (dd != 0)
{
QMap<QString,multiLine>::Iterator it;
QHash<QString,multiLine>::Iterator it;
for (it = dd->MLineStyles.begin(); it != dd->MLineStyles.end(); ++it)
lineStyles->addItem( new LineFormatItem(dd, it.value(), it.key()) );
lineStyles->sortItems();
/trunk/Scribus/scribus/ui/cpalette.h
66,8 → 66,8
void updateColorList();
 
void setColors(ColorList newColorList);
void setGradients(QMap<QString, VGradient> *docGradients);
void setPatterns(QMap<QString, ScPattern> *docPatterns);
void setGradients(QHash<QString, VGradient> *docGradients);
void setPatterns(QHash<QString, ScPattern> *docPatterns);
 
private:
 
150,8 → 150,8
PageItem* currentItem;
QString sFarbe;
ColorList colorList;
QMap<QString, ScPattern> *patternList;
QMap<QString, VGradient> *gradientList;
QHash<QString, ScPattern> *patternList;
QHash<QString, VGradient> *gradientList;
double m_Pattern_scaleX;
double m_Pattern_scaleY;
double m_Pattern_offsetX;
/trunk/Scribus/scribus/ui/smstyleimport.cpp
13,7 → 13,7
SMStyleImport::SMStyleImport(QWidget* parent,
StyleSet<ParagraphStyle> *pstyleList,
StyleSet<CharStyle> *cstyleList,
QMap<QString, multiLine> *lstyleList)
QHash<QString, multiLine> *lstyleList)
: QDialog( parent, 0 )
{
setupUi(this);
/trunk/Scribus/scribus/ui/gradientaddedit.h
38,7 → 38,7
Q_OBJECT
 
public:
gradientEditDialog(QWidget* parent, QString name, VGradient gradient, ColorList doco, ScribusDoc *doc, QMap<QString, VGradient> *gradients, bool newFlag);
gradientEditDialog(QWidget* parent, QString name, VGradient gradient, ColorList doco, ScribusDoc *doc, QHash<QString, VGradient> *gradients, bool newFlag);
~gradientEditDialog() {};
QString name();
VGradient gradient();
48,7 → 48,7
ScribusDoc* m_doc;
bool isNew;
QString m_name;
QMap<QString, VGradient> *m_gradients;
QHash<QString, VGradient> *m_gradients;
};
 
#endif
/trunk/Scribus/scribus/ui/transparencypalette.cpp
202,8 → 202,11
namedGradient->clear();
namedGradient->setIconSize(QSize(48, 12));
namedGradient->addItem( tr("Custom"));
for (QMap<QString, VGradient>::Iterator it = gradientList->begin(); it != gradientList->end(); ++it)
QStringList patK = gradientList->keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
VGradient gr = gradientList->value(patK[a]);
QImage pixm(48, 12, QImage::Format_ARGB32_Premultiplied);
QPainter pb;
QBrush b(QColor(205,205,205), loadIcon("testfill.png"));
214,7 → 217,7
p->setPen(Qt::black);
p->setLineWidth(1);
p->setFillMode(2);
p->fill_gradient = it.value();
p->fill_gradient = gr;
p->setGradient(VGradient::linear, FPoint(0,6), FPoint(48, 6), FPoint(0,0), 1, 0);
p->drawRect(0, 0, 48, 12);
p->end();
221,12 → 224,12
delete p;
QPixmap pm;
pm = QPixmap::fromImage(pixm);
namedGradient->addItem(pm, it.key());
namedGradient->addItem(pm, patK[a]);
}
connect(namedGradient, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradient(const QString &)));
}
 
void Tpalette::setGradients(QMap<QString, VGradient> *docGradients)
void Tpalette::setGradients(QHash<QString, VGradient> *docGradients)
{
gradientList = docGradients;
updateGradientList();
426,13 → 429,16
disconnect(patternBox, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(selectPattern(QListWidgetItem*)));
patternBox->clear();
patternBox->setIconSize(QSize(48, 48));
for (QMap<QString, ScPattern>::Iterator it = patternList->begin(); it != patternList->end(); ++it)
QStringList patK = patternList->keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
ScPattern sp = patternList->value(patK[a]);
QPixmap pm;
if (it.value().getPattern()->width() >= it.value().getPattern()->height())
pm=QPixmap::fromImage(it.value().getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
if (sp.getPattern()->width() >= sp.getPattern()->height())
pm=QPixmap::fromImage(sp.getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
else
pm=QPixmap::fromImage(it.value().getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
pm=QPixmap::fromImage(sp.getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
QPixmap pm2(48, 48);
pm2.fill(palette().color(QPalette::Base));
QPainter p;
439,7 → 445,7
p.begin(&pm2);
p.drawPixmap(24 - pm.width() / 2, 24 - pm.height() / 2, pm);
p.end();
QListWidgetItem *item = new QListWidgetItem(pm2, it.key(), patternBox);
QListWidgetItem *item = new QListWidgetItem(pm2, patK[a], patternBox);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
}
patternBox->clearSelection();
446,7 → 452,7
connect(patternBox, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(selectPattern(QListWidgetItem*)));
}
 
void Tpalette::setPatterns(QMap<QString, ScPattern> *docPatterns)
void Tpalette::setPatterns(QHash<QString, ScPattern> *docPatterns)
{
patternList = docPatterns;
updatePatternList();
/trunk/Scribus/scribus/ui/smlinestyle.h
56,10 → 56,10
ScribusDoc *doc_;
SMLineStyleWidget *widget_;
QTabWidget *twidget_;
QMap<QString, multiLine> tmpLines;
QHash<QString, multiLine> tmpLines;
bool selectionIsDirty_;
double unitRatio_;
QMap<QString, multiLine*> selection_;
QHash<QString, multiLine*> selection_;
QList<RemoveItem> deleted_;
int currentLine_;
 
/trunk/Scribus/scribus/ui/paintmanager.h
39,7 → 39,7
Q_OBJECT
 
public:
PaintManagerDialog(QWidget* parent, QMap<QString, VGradient> *docGradients, ColorList doco, QString docColSet, QMap<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow* scMW);
PaintManagerDialog(QWidget* parent, QHash<QString, VGradient> *docGradients, ColorList doco, QString docColSet, QHash<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow* scMW);
~PaintManagerDialog() {};
/*! \brief Returns the name of the current/selected color set.
\retval QString selected name. */
54,7 → 54,7
QString selectedColorName();
ScribusDoc *m_doc;
ScribusMainWindow *mainWin;
QMap<QString, VGradient> dialogGradients;
QHash<QString, VGradient> dialogGradients;
QMap<QString,QString> replaceMap;
QMap<QString,QString> origNames;
QStringList origGradients;
63,7 → 63,7
//! \brief Custom user's color set
QStringList customColSet;
bool hasImportedColors;
QMap<QString, ScPattern> dialogPatterns;
QHash<QString, ScPattern> dialogPatterns;
QMap<QString,QString> replaceMapPatterns;
QMap<QString,QString> origNamesPatterns;
QStringList origPatterns;
/trunk/Scribus/scribus/ui/paintmanager.cpp
62,7 → 62,7
#include "util_formats.h"
#include "util_icon.h"
 
PaintManagerDialog::PaintManagerDialog(QWidget* parent, QMap<QString, VGradient> *docGradients, ColorList doco, QString docColSet, QMap<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow *scMW) : QDialog(parent)
PaintManagerDialog::PaintManagerDialog(QWidget* parent, QHash<QString, VGradient> *docGradients, ColorList doco, QString docColSet, QHash<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow *scMW) : QDialog(parent)
{
setupUi(this);
setModal(true);
79,7 → 79,7
colorItems->setText(0, tr("Solid Colors"));
gradientItems = new QTreeWidgetItem(dataTree);
gradientItems->setText(0, tr("Gradients"));
for (QMap<QString, VGradient>::Iterator it = docGradients->begin(); it != docGradients->end(); ++it)
for (QHash<QString, VGradient>::Iterator it = docGradients->begin(); it != docGradients->end(); ++it)
{
dialogGradients.insert(it.key(), it.value());
origNames.insert(it.key(), it.key());
88,7 → 88,7
 
patternItems = new QTreeWidgetItem(dataTree);
patternItems->setText(0, tr("Patterns"));
for (QMap<QString, ScPattern>::Iterator it = docPatterns->begin(); it != docPatterns->end(); ++it)
for (QHash<QString, ScPattern>::Iterator it = docPatterns->begin(); it != docPatterns->end(); ++it)
{
dialogPatterns.insert(it.key(), it.value());
origNamesPatterns.insert(it.key(), it.key());
180,13 → 180,16
delete lg[a];
}
QTreeWidgetItem* ret = 0;
for (QMap<QString, ScPattern>::Iterator it = dialogPatterns.begin(); it != dialogPatterns.end(); ++it)
QStringList patK = dialogPatterns.keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
ScPattern sp = dialogPatterns.value(patK[a]);
QPixmap pm;
if (it.value().getPattern()->width() >= it.value().getPattern()->height())
pm = QPixmap::fromImage(it.value().getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
if (sp.getPattern()->width() >= sp.getPattern()->height())
pm = QPixmap::fromImage(sp.getPattern()->scaledToWidth(48, Qt::SmoothTransformation));
else
pm = QPixmap::fromImage(it.value().getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
pm = QPixmap::fromImage(sp.getPattern()->scaledToHeight(48, Qt::SmoothTransformation));
QPixmap pm2(48, 48);
pm2.fill(palette().color(QPalette::Base));
QPainter p;
194,8 → 197,8
p.drawPixmap(24 - pm.width() / 2, 24 - pm.height() / 2, pm);
p.end();
QTreeWidgetItem *item = new QTreeWidgetItem(patternItems);
item->setText(0, it.key());
if (it.key() == addedName)
item->setText(0, patK[a]);
if (patK[a] == addedName)
ret = item;
item->setIcon(0, pm2);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
211,8 → 214,11
delete lg[a];
}
QTreeWidgetItem* ret = 0;
for (QMap<QString, VGradient>::Iterator it = dialogGradients.begin(); it != dialogGradients.end(); ++it)
QStringList patK = dialogGradients.keys();
qSort(patK);
for (int a = 0; a < patK.count(); a++)
{
VGradient gr = dialogGradients.value(patK[a]);
QImage pixm(48, 12, QImage::Format_ARGB32);
QPainter pb;
QBrush b(QColor(205,205,205), loadIcon("testfill.png"));
223,7 → 229,7
p->setPen(Qt::black);
p->setLineWidth(1);
p->setFillMode(2);
p->fill_gradient = it.value();
p->fill_gradient = gr;
p->setGradient(VGradient::linear, FPoint(0,6), FPoint(48, 6), FPoint(0, 0), 1.0, 0.0);
p->drawRect(0, 0, 48, 12);
p->end();
231,8 → 237,8
QPixmap pm;
pm = QPixmap::fromImage(pixm);
QTreeWidgetItem *item = new QTreeWidgetItem(gradientItems);
item->setText(0, it.key());
if (it.key() == addedName)
item->setText(0, patK[a]);
if (patK[a] == addedName)
ret = item;
item->setIcon(0, pm);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
797,7 → 803,7
if (t == QMessageBox::No)
return;
replaceMap.clear();
for (QMap<QString, VGradient>::Iterator it = dialogGradients.begin(); it != dialogGradients.end(); ++it)
for (QHash<QString, VGradient>::Iterator it = dialogGradients.begin(); it != dialogGradients.end(); ++it)
{
replaceMap.insert(it.key(), "");
}
817,7 → 823,7
if (t == QMessageBox::No)
return;
replaceMap.clear();
for (QMap<QString, VGradient>::Iterator it = dialogGradients.begin(); it != dialogGradients.end(); ++it)
for (QHash<QString, VGradient>::Iterator it = dialogGradients.begin(); it != dialogGradients.end(); ++it)
{
replaceMap.insert(it.key(), "");
}
874,7 → 880,7
if (t == QMessageBox::No)
return;
replaceMapPatterns.clear();
for (QMap<QString, ScPattern>::Iterator it = dialogPatterns.begin(); it != dialogPatterns.end(); ++it)
for (QHash<QString, ScPattern>::Iterator it = dialogPatterns.begin(); it != dialogPatterns.end(); ++it)
{
replaceMapPatterns.insert(it.key(), "");
}
1351,7 → 1357,7
dialogPatterns.insert(patNam, pat);
origNamesPatterns.insert(patNam, patNam);
}
for (QMap<QString, ScPattern>::Iterator it = m_doc->docPatterns.begin(); it != m_doc->docPatterns.end(); ++it)
for (QHash<QString, ScPattern>::Iterator it = m_doc->docPatterns.begin(); it != m_doc->docPatterns.end(); ++it)
{
if (!origPatterns.contains(it.key()))
{
1365,7 → 1371,7
uint ape = m_doc->docPatterns.count();
if (ap != ape)
{
for (QMap<QString, ScPattern>::Iterator it = m_doc->docPatterns.begin(); it != m_doc->docPatterns.end(); ++it)
for (QHash<QString, ScPattern>::Iterator it = m_doc->docPatterns.begin(); it != m_doc->docPatterns.end(); ++it)
{
if (!origPatterns.contains(it.key()))
{
1384,7 → 1390,7
ColorList PaintManagerDialog::getGradientColors()
{
ColorList colorList;
QMap<QString,VGradient>::Iterator itg;
QHash<QString,VGradient>::Iterator itg;
for (itg = dialogGradients.begin(); itg != dialogGradients.end(); ++itg)
{
QList<VColorStop*> cstops = itg.value().colorStops();
1450,7 → 1456,7
 
void PaintManagerDialog::updateGradientColors(QString newName, QString oldName)
{
QMap<QString,VGradient>::Iterator itg;
QHash<QString,VGradient>::Iterator itg;
for (itg = dialogGradients.begin(); itg != dialogGradients.end(); ++itg)
{
QList<VColorStop*> cstops = itg.value().colorStops();
/trunk/Scribus/scribus/ui/smstyleimport.h
27,7 → 27,7
SMStyleImport(QWidget* parent,
StyleSet<ParagraphStyle> *pstyleList,
StyleSet<CharStyle> *cstyleList,
QMap<QString, multiLine> *lstyleList);
QHash<QString, multiLine> *lstyleList);
~SMStyleImport() {};
 
//! \brief True if the rename feature is ON.
/trunk/Scribus/scribus/ui/smlinestyle.cpp
77,7 → 77,7
}
 
QList<StyleName> tmp;
QMap<QString,multiLine>::Iterator it;
QHash<QString,multiLine>::Iterator it;
 
for (it = tmpLines.begin(); it != tmpLines.end(); ++it)
tmp << StyleName(it.key(), QString::null);
301,7 → 301,7
QString SMLineStyle::shortcut(const QString &stylename) const
{
QString s;
QMap<QString, multiLine>::ConstIterator it = tmpLines.find(stylename);
QHash<QString, multiLine>::ConstIterator it = tmpLines.find(stylename);
if (it != tmpLines.end())
s = it.value().shortcut;
return s;
313,7 → 313,7
if (selection_.count() != 1)
return;
 
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
(*it)->shortcut = shortcut;
 
417,7 → 417,7
if (currentLine_ < 0)
return;
 
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
{
multiLine *tmp = it.value();
450,7 → 450,7
break;
}
 
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
{
multiLine *tmp = it.value();
487,7 → 487,7
break;
}
 
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
{
multiLine *tmp = it.value();
506,7 → 506,7
 
void SMLineStyle::slotColor(const QString &s)
{
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
{
multiLine *tmp = it.value();
525,7 → 525,7
 
void SMLineStyle::slotShade(int i)
{
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
{
multiLine *tmp = it.value();
544,7 → 544,7
 
void SMLineStyle::slotLineWidth()
{
QMap<QString, multiLine*>::iterator it;
QHash<QString, multiLine*>::iterator it;
for (it = selection_.begin(); it != selection_.end(); ++it)
{
multiLine *tmp = it.value();
/trunk/Scribus/scribus/scribus.cpp
1862,8 → 1862,8
csm.findPalettes();
csm.findUserPalettes();
ColorList colorList;
QMap<QString, VGradient> gradientsList;
QMap<QString, ScPattern> patternsList;
QHash<QString, VGradient> gradientsList;
QHash<QString, ScPattern> patternsList;
QString Cpfad = QDir::toNativeSeparators(ScPaths::getApplicationDataDir())+"DefaultColors.xml";
QFile fc(Cpfad);
if (fc.exists())
9907,8 → 9907,8
void ScribusMainWindow::managePaints()
{
ColorList edc;
QMap<QString, VGradient> *Gradients;
QMap<QString, ScPattern> *docPatterns;
QHash<QString, VGradient> *Gradients;
QHash<QString, ScPattern> *docPatterns;
ScribusDoc* tmpDoc;
if (HaveDoc)
{
/trunk/Scribus/scribus/util_color.cpp
595,7 → 595,7
return CommonStrings::trUnknownCS;
}
 
bool importColorsFromFile(QString fileName, ColorList &EditColors, QMap<QString,VGradient> *dialogGradients, bool merge)
bool importColorsFromFile(QString fileName, ColorList &EditColors, QHash<QString, VGradient> *dialogGradients, bool merge)
{
int oldCount = EditColors.count();
if (!fileName.isEmpty())
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
1817,7 → 1817,7
QString Nam = pg.attribute("Name");
QString Nam2 = Nam;
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(Nam2);
QHash<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(Nam2);
if (mlit != m_Doc->MLineStyles.end() && ml != mlit.value())
{
while (m_Doc->MLineStyles.contains(Nam2))
2266,7 → 2266,7
return true;
}
 
bool Scribus12Format::readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty)
bool Scribus12Format::readLineStyles(const QString& fileName, QHash<QString,multiLine> *Sty)
{
QDomDocument docu("scridoc");
QString f(readSLA(fileName));
2305,7 → 2305,7
QString Nam = pg.attribute("Name");
QString Nam2 = Nam;
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = Sty->find(Nam2);
QHash<QString,multiLine>::ConstIterator mlit = Sty->find(Nam2);
if (mlit != Sty->end() && ml != mlit.value())
{
while (Sty->contains(Nam2))
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.h
15,6 → 15,7
 
#include <QDomElement>
#include <QMap>
#include <QHash>
#include <QString>
#include <QList>
 
42,7 → 43,7
// Special features - .sla page extraction support
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 readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);
virtual bool readLineStyles(const QString& fileName, QHash<QString, multiLine> *Sty);
virtual bool readColors(const QString& fileName, ColorList & colors);
virtual bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
virtual void getReplacedFontData(bool & getNewReplacement, QMap<QString,QString> &getReplacedFonts, QList<ScFace> &getDummyScFaces);
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
2078,7 → 2078,7
QString Nam = pg.attribute("Name");
QString Nam2 = Nam;
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(Nam2);
QHash<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(Nam2);
if (mlit != m_Doc->MLineStyles.end() && ml != mlit.value())
{
while (m_Doc->MLineStyles.contains(Nam2))
2504,7 → 2504,7
return true;
}
 
bool Scribus13Format::readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty)
bool Scribus13Format::readLineStyles(const QString& fileName, QHash<QString,multiLine> *Sty)
{
QDomDocument docu("scridoc");
QString f(readSLA(fileName));
2543,7 → 2543,7
QString Nam = pg.attribute("Name");
QString Nam2 = Nam;
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = Sty->find(Nam2);
QHash<QString,multiLine>::ConstIterator mlit = Sty->find(Nam2);
if (mlit != Sty->end() && ml != mlit.value())
{
while (Sty->contains(Nam2))
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.h
41,7 → 41,7
// Special features - .sla page extraction support
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 readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);
virtual bool readLineStyles(const QString& fileName, QHash<QString, multiLine> *Sty);
virtual bool readColors(const QString& fileName, ColorList & colors);
virtual bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
virtual void getReplacedFontData(bool & getNewReplacement, QMap<QString,QString> &getReplacedFonts, QList<ScFace> &getDummyScFaces);
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
55,7 → 55,7
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 readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);
virtual bool readLineStyles(const QString& fileName, QHash<QString, multiLine> *Sty);
virtual bool readColors(const QString& fileName, ColorList & colors);
virtual bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
virtual void getReplacedFontData(bool & getNewReplacement, QMap<QString,QString> &getReplacedFonts, QList<ScFace> &getDummyScFaces);
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
450,7 → 450,7
 
void Scribus150Format::writeLinestyles(ScXmlStreamWriter& docu)
{
QMap<QString,multiLine>::Iterator itMU;
QHash<QString,multiLine>::Iterator itMU;
for (itMU = m_Doc->MLineStyles.begin(); itMU != m_Doc->MLineStyles.end(); ++itMU)
{
docu.writeStartElement("MultiLine");
551,8 → 551,8
 
void Scribus150Format::writeGradients(ScXmlStreamWriter & docu, bool part)
{
QMap<QString, VGradient>::Iterator itGrad;
QMap<QString, VGradient> gradMap;
QHash<QString, VGradient>::Iterator itGrad;
QHash<QString, VGradient> gradMap;
if (part)
m_Doc->getUsedGradients(gradMap);
else
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
5186,7 → 5186,7
QString mlName2 = mlName;
readMultiline(ml, reader);
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(mlName2);
QHash<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(mlName2);
if (mlit != m_Doc->MLineStyles.end() && ml != mlit.value())
{
while (m_Doc->MLineStyles.contains(mlName2))
5708,7 → 5708,7
return true;
}
 
bool Scribus150Format::readLineStyles(const QString& fileName, QMap<QString,multiLine> *styles)
bool Scribus150Format::readLineStyles(const QString& fileName, QHash<QString,multiLine> *styles)
{
QString f(readSLA(fileName));
if (f.isEmpty())
5742,7 → 5742,7
QString mlName2 = mlName;
readMultiline(ml, reader);
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = styles->find(mlName2);
QHash<QString,multiLine>::ConstIterator mlit = styles->find(mlName2);
if (mlit != styles->end() && ml != mlit.value())
{
while (styles->contains(mlName2))
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
14,6 → 14,7
#include "styles/styleset.h"
 
#include <QMap>
#include <QHash>
#include <QString>
#include <QList>
#include <QProgressBar>
50,7 → 51,7
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 readLineStyles(const QString& fileName, QMap<QString,multiLine> *Sty);
virtual bool readLineStyles(const QString& fileName, QHash<QString, multiLine> *Sty);
virtual bool readColors(const QString& fileName, ColorList & colors);
virtual bool readPageCount(const QString& fileName, int *num1, int *num2, QStringList & masterPageNames);
virtual void getReplacedFontData(bool & getNewReplacement, QMap<QString,QString> &getReplacedFonts, QList<ScFace> &getDummyScFaces);
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
3140,7 → 3140,7
QString mlName2 = mlName;
readMultiline(ml, reader);
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(mlName2);
QHash<QString,multiLine>::ConstIterator mlit = m_Doc->MLineStyles.find(mlName2);
if (mlit != m_Doc->MLineStyles.end() && ml != mlit.value())
{
while (m_Doc->MLineStyles.contains(mlName2))
3513,7 → 3513,7
return true;
}
 
bool Scribus134Format::readLineStyles(const QString& fileName, QMap<QString,multiLine> *styles)
bool Scribus134Format::readLineStyles(const QString& fileName, QHash<QString,multiLine> *styles)
{
QString f(readSLA(fileName));
if (f.isEmpty())
3547,7 → 3547,7
QString mlName2 = mlName;
readMultiline(ml, reader);
int copyC = 1;
QMap<QString,multiLine>::ConstIterator mlit = styles->find(mlName2);
QHash<QString,multiLine>::ConstIterator mlit = styles->find(mlName2);
if (mlit != styles->end() && ml != mlit.value())
{
while (styles->contains(mlName2))