Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 22634 → Rev 22635

/trunk/Scribus/scribus/canvas.cpp
285,7 → 285,7
&& qAbs(localPoint1.y() - localPoint2.y()) < radius;
}
 
bool Canvas::hitsCanvasPoint(FPoint globalPoint, QPointF canvasPoint) const
bool Canvas::hitsCanvasPoint(const FPoint& globalPoint, const QPointF& canvasPoint) const
{
double radius = m_doc->guidesPrefs().grabRadius;
return qAbs(globalPoint.x() - canvasPoint.x()) < radius
/trunk/Scribus/scribus/canvas.h
165,7 → 165,7
// QRectF globalToCanvas(QRectF p) const;
bool hitsCanvasPoint(QPoint globalPoint, const FPoint& canvasPoint) const;
bool hitsCanvasPoint(QPoint globalPoint, QPointF canvasPoint) const;
bool hitsCanvasPoint(FPoint globalPoint, QPointF canvasPoint) const;
bool hitsCanvasPoint(const FPoint& globalPoint, const QPointF& canvasPoint) const;
QRect exposedRect() const;
bool cursorOverTextFrameControl(QPoint globalPos, PageItem* frame);
bool cursorOverFrameControl(QPoint globalPos, QRectF targetRect, PageItem* frame);
/trunk/Scribus/scribus/canvasgesture_rulermove.cpp
128,7 → 128,7
}
 
 
bool RulerGesture::mouseHitsGuide(FPoint mousePointDoc)
bool RulerGesture::mouseHitsGuide(const FPoint& mousePointDoc)
{
const int page = m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y());
if ((m_doc->guidesPrefs().guidesShown) && (!m_doc->GuideLock) && page >= 0)
/trunk/Scribus/scribus/canvasgesture_rulermove.h
74,7 → 74,7
Use this to test if there's a moveable guide near this position.
It prepares the gesture for moving this guide.
*/
bool mouseHitsGuide(FPoint mousePointDoc);
bool mouseHitsGuide(const FPoint& mousePointDoc);
/**
It tests for a guide near position, that guide being moveable or not.
If the test results in success, emits guideInfo;
/trunk/Scribus/scribus/canvasmode_imageimport.cpp
64,7 → 64,7
newToolTip(l.first());
}
 
void CanvasMode_ImageImport::newToolTip(QString name)
void CanvasMode_ImageImport::newToolTip(const QString& name)
{
QPainter p;
QImage pm = QImage(80, 80, QImage::Format_ARGB32_Premultiplied);
/trunk/Scribus/scribus/canvasmode_imageimport.h
60,7 → 60,7
QStringList m_imageList;
ScribusMainWindow *m_ScMW;
double m_Mx, m_My;
void newToolTip(QString name);
void newToolTip(const QString& name);
};
 
#endif // CANVASMODE_IMAGEIMPORT_H
/trunk/Scribus/scribus/canvasmode_magnifier.cpp
214,9 → 214,8
}
else
{
FPoint nx = mousePointDoc;
int mx = qRound(nx.x());
int my = qRound(nx.y());
int mx = qRound(mousePointDoc.x());
int my = qRound(mousePointDoc.y());
m_view->Magnify ? m_view->slotZoomIn(mx,my) : m_view->slotZoomOut(mx,my);
if (sc == m_canvas->scale())
{
/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
96,10 → 96,10
if (cli.isMarker(poi))
continue;
p->setPen(QPen(Qt::blue, onePerScale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
FPoint a1 = cli.point(poi);
FPoint a2 = cli.point(poi+1);
FPoint a3 = cli.point(poi+3);
FPoint a4 = cli.point(poi+2);
const FPoint& a1 = cli.point(poi);
const FPoint& a2 = cli.point(poi+1);
const FPoint& a3 = cli.point(poi+3);
const FPoint& a4 = cli.point(poi+2);
QPainterPath Bez;
Bez.moveTo(a1.x(), a1.y());
Bez.cubicTo(a2.x(), a2.y(), a3.x(), a3.y(), a4.x(), a4.y());
207,7 → 207,7
{
if (Clip.isMarker(a))
continue;
FPoint np = Clip.point(a);
const FPoint& np = Clip.point(a);
FPoint npf2 = np.transformPoint(pm2, false);
if ((Sele.contains(npf2.x(), npf2.y())) && ((a == 0) || (((a-2) % 4) == 0)))
{
600,10 → 600,10
mpo2.moveCenter(QPoint(qRound(npf2.x()), qRound(npf2.y())));
for (int poi=0; poi<Clip.size()-3; poi += 4)
{
FPoint a1 = Clip.point(poi);
FPoint a2 = Clip.point(poi+1);
FPoint a3 = Clip.point(poi+3);
FPoint a4 = Clip.point(poi+2);
const FPoint& a1 = Clip.point(poi);
const FPoint& a2 = Clip.point(poi+1);
const FPoint& a3 = Clip.point(poi+3);
const FPoint& a4 = Clip.point(poi+2);
QPainterPath Bez;
Bez.moveTo(a1.x(), a1.y());
Bez.cubicTo(a2.x(), a2.y(), a3.x(), a3.y(), a4.x(), a4.y());
811,7 → 811,7
{
if (!(currItem->isLine() || currItem->isPathText() || currItem->isPolyLine()))
{
FPoint kp(Clip.point(EndInd-3));
const FPoint& kp(Clip.point(EndInd-3));
cli.putPoints(0, StartInd, Clip);
cli.putPoints(cli.size(), EndInd - StartInd - 4, Clip, StartInd);
cli.setPoint(StartInd, cli.point(cli.size()-2));
859,10 → 859,10
mpo2.moveCenter(QPoint(qRound(npf2.x()), qRound(npf2.y())));
for (int poi = 0; poi < Clip.size()-3; poi += 4)
{
FPoint a1 = Clip.point(poi);
FPoint a2 = Clip.point(poi+1);
FPoint a3 = Clip.point(poi+3);
FPoint a4 = Clip.point(poi+2);
const FPoint& a1 = Clip.point(poi);
const FPoint& a2 = Clip.point(poi+1);
const FPoint& a3 = Clip.point(poi+3);
const FPoint& a4 = Clip.point(poi+2);
QPainterPath Bez;
Bez.moveTo(a1.x(), a1.y());
Bez.cubicTo(a2.x(), a2.y(), a3.x(), a3.y(), a4.x(), a4.y());
896,8 → 896,8
npf2 = nearPoint;
FPoint base = cli.point(cli.size()-2);
FPoint c1 = cli.point(cli.size()-1);
FPoint base2 = Clip.point(m_doc->nodeEdit.clre2()+2);
FPoint c2 = Clip.point(m_doc->nodeEdit.clre2()+3);
const FPoint& base2 = Clip.point(m_doc->nodeEdit.clre2()+2);
const FPoint& c2 = Clip.point(m_doc->nodeEdit.clre2()+3);
if ((base == c1) && (base2 == c2))
{
cli.resize(cli.size()+4);
977,7 → 977,7
 
 
 
bool CanvasMode_NodeEdit::handleNodeEditMove(QMouseEvent* m, QRect, PageItem* currItem, QTransform)
bool CanvasMode_NodeEdit::handleNodeEditMove(QMouseEvent* m, QRect, PageItem* currItem, const QTransform&)
{
QTransform itemPos = currItem->getTransform();
if ((currItem->isSymbol() || currItem->isGroup()) && (!m_doc->nodeEdit.isContourLine()))
/trunk/Scribus/scribus/canvasmode_nodeedit.h
64,7 → 64,7
inline bool GetItem(PageItem** pi);
void handleNodeEditPress(QMouseEvent*, QRect);
void handleNodeEditDrag(QMouseEvent*, PageItem*);
bool handleNodeEditMove(QMouseEvent*, QRect, PageItem*, QTransform);
bool handleNodeEditMove(QMouseEvent*, QRect, PageItem*, const QTransform&);
ScribusMainWindow* m_ScMW;
/trunk/Scribus/scribus/chartablemodel.cpp
120,20 → 120,18
return (*m_doc->AllFonts)[m_fontInUse];
}
 
void CharTableModel::setCharacters(CharClassDef ch)
void CharTableModel::setCharacters(const CharClassDef& ch)
{
beginResetModel();
m_characters.clear();
m_fonts.clear();
m_characters = ch;
for (int a = 0; a < m_characters.count(); a++)
{
for (int i = 0; i < m_characters.count(); i++)
m_fonts.append(m_fontInUse);
}
endResetModel();
}
 
void CharTableModel::setCharactersAndFonts(CharClassDef ch, QStringList fonts)
void CharTableModel::setCharactersAndFonts(const CharClassDef& ch, const QStringList& fonts)
{
beginResetModel();
m_characters.clear();
143,13 → 141,13
endResetModel();
}
 
void CharTableModel::addCharacter(QString ch)
void CharTableModel::addCharacter(const QString& ch)
{
int orig = rowCount();
bool ok;
int a = ch.indexOf(" ");
QString si = ch.left(a);
QString sf = ch.mid(a+1);
int i = ch.indexOf(" ");
QString si = ch.left(i);
QString sf = ch.mid(i+1);
int val = si.toInt(&ok, 10);
if (!ok)
return;
161,7 → 159,7
emit rowAppended();
}
 
void CharTableModel::setFontInUse(QString font)
void CharTableModel::setFontInUse(const QString& font)
{
if (font != m_fontInUse)
{
/trunk/Scribus/scribus/chartablemodel.h
40,14 → 40,14
//! \brief Get a graphics representation/pixmap of the glyph
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
 
void setFontInUse(QString font);
void setFontInUse(const QString& font);
 
//! \brief Font in use. It's used in model's view.
ScFace fontFace();
 
void setCharacters(CharClassDef ch);
void setCharactersAndFonts(CharClassDef ch, QStringList fonts);
void addCharacter(QString ch);
void setCharacters(const CharClassDef& ch);
void setCharactersAndFonts(const CharClassDef& ch, const QStringList& fonts);
void addCharacter(const QString& ch);
CharClassDef characters() {
return m_characters;
}
/trunk/Scribus/scribus/collect4output.cpp
30,7 → 30,7
#include <QProgressBar>
#include <QString>
 
CollectForOutput::CollectForOutput(ScribusDoc* doc, QString outputDirectory, bool withFonts, bool withProfiles, bool compressDoc)
CollectForOutput::CollectForOutput(ScribusDoc* doc, const QString& outputDirectory, bool withFonts, bool withProfiles, bool compressDoc)
: QObject(ScCore),
m_Doc(nullptr),
m_outputDirectory(QString::null),
285,7 → 285,7
// end of hack
if (itf.exists())
{
QString oldFile = ofName;
const QString& oldFile = ofName;
ite->Pfile = collectFile(oldFile, itf.fileName());
ScCore->fileWatcher->removeFile(oldFile);
ScCore->fileWatcher->addFile(ite->Pfile);
494,7 → 494,7
return true;
}
 
QString CollectForOutput::collectFile(QString oldFile, QString newFile)
QString CollectForOutput::collectFile(const QString& oldFile, QString newFile)
{
uint cnt = 1;
bool copy = true;
/trunk/Scribus/scribus/collect4output.h
35,7 → 35,7
\param withProfiles collect/move CMS profiles into output directory too
\param compressDoc use gzipped document
*/
CollectForOutput(ScribusDoc* doc, QString outputDirectory=QString::null, bool withFonts=false, bool withProfiles=false, bool compressDoc=false);
CollectForOutput(ScribusDoc* doc, const QString& outputDirectory=QString::null, bool withFonts=false, bool withProfiles=false, bool compressDoc=false);
~CollectForOutput(){};
 
/*! \brief Main method doing everything.
90,7 → 90,7
\param newFile suggested fullpath of the collected file
\retval QString really used fullpath of the new file
*/
QString collectFile(QString oldFile, QString newFile);
QString collectFile(const QString& oldFile, QString newFile);
 
ProfilesL docProfiles;
QStringList patterns;
/trunk/Scribus/scribus/colorblind.cpp
21,7 → 21,7
init();
}
 
VisionDefectColor::VisionDefectColor(QColor c)
VisionDefectColor::VisionDefectColor(const QColor& c)
{
m_red = (double)c.red();
m_green = (double)c.green();
156,7 → 156,7
m_blue = clamp(m_blue, 0.0, 255.0);
}
 
QColor VisionDefectColor::convertDefect(QColor c, int d)
QColor VisionDefectColor::convertDefect(const QColor& c, int d)
{
m_red = (double)c.red();
m_green = (double)c.green();
/trunk/Scribus/scribus/colorblind.h
63,7 → 63,7
/*! \brief QColor like constructors. Setup the RGB parts, then init().
\param c QColor object
*/
VisionDefectColor(QColor c);
VisionDefectColor(const QColor& c);
 
/*! \brief Default constructors. Setup the RGB parts to default values, then init().
*/
83,7 → 83,7
\retval QColor converted color
Gama removing, RGB2LSM, matrix operation for selected deficiency,
LSM2RGB, gama applying. */
QColor convertDefect(QColor c, int d);
QColor convertDefect(const QColor& c, int d);
 
/*! \brief Return the color parts
\retval uint red part
/trunk/Scribus/scribus/fileloader.cpp
173,7 → 173,7
return ret;
}
 
bool FileLoader::loadPage(ScribusDoc* currDoc, int PageToLoad, bool Mpage, QString renamedPageName)
bool FileLoader::loadPage(ScribusDoc* currDoc, int PageToLoad, bool Mpage, const QString& renamedPageName)
{
bool ret = false;
// newReplacement = false;
/trunk/Scribus/scribus/fileloader.h
37,7 → 37,7
int fileType() const { return m_fileType; }
int testFile();
 
bool loadPage(ScribusDoc* currDoc, int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
bool loadPage(ScribusDoc* currDoc, int PageToLoad, bool Mpage, const QString& renamedPageName=QString::null);
bool loadFile(ScribusDoc* currDoc);
bool saveFile(const QString& fileName, ScribusDoc *doc, QString *savedFile = nullptr);
bool readStyles(ScribusDoc* doc, StyleSet<ParagraphStyle> &docParagraphStyles);
/trunk/Scribus/scribus/fonts/cff.cpp
1280,10 → 1280,10
}
uint CFF::writeTopDict(QByteArray name,
QMap<operator_type, CFF_Variant> dict,
QList<QByteArray> oldStrings,
QHash<operator_type, uint>& patchAddresses)
uint CFF::writeTopDict(const QByteArray& name,
const QMap<operator_type, CFF_Variant>& dict,
const QList<QByteArray>& oldStrings,
QHash<operator_type, uint>& patchAddresses)
{
m_offsetSize = 4;
m_names.append(name);
1316,7 → 1316,7
QByteArray CFF::makeDict(QMap<operator_type, CFF_Variant> dict,
QList<QByteArray> oldStrings,
const QList<QByteArray>& oldStrings,
QHash<operator_type, uint>& patchAddresses)
{
QByteArray result;
/trunk/Scribus/scribus/fonts/cff.h
230,7 → 230,7
/// This write the header, name index and TopDict index for exactly one font.
/// All unknown offset are preset as 4 byte cardinal and corresponding operator positions returned
uint writeTopDict(QByteArray name, QMap<operator_type, CFF_Variant> dict, QList<QByteArray> oldStrings, QHash<operator_type, uint>& patches);
uint writeTopDict(const QByteArray& name, const QMap<operator_type, CFF_Variant>& dict, const QList<QByteArray>& oldStrings, QHash<operator_type, uint>& patches);
/// this will write another segment and return the start offset
uint writeSegment(const QByteArray& data);
void patch(QHash<operator_type, uint> patchPositions, uint patchOffset, operator_type op, uint offset, uint length = 0);
238,7 → 238,7
QByteArray makeCharset(QList<sid_type>) const;
QByteArray makeEncoding(QList<uint>) const;
QByteArray makeIndex(QList<QByteArray> data) const;
QByteArray makeDict(QMap<operator_type, CFF_Variant> dict, QList<QByteArray> oldStrings, QHash<operator_type, uint>& patchAddresses);
QByteArray makeDict(QMap<operator_type, CFF_Variant> dict, const QList<QByteArray>& oldStrings, QHash<operator_type, uint>& patchAddresses);
};
QByteArray extractFace(const QByteArray& cff, int faceIndex);
/trunk/Scribus/scribus/gtaction.cpp
104,7 → 104,7
m_ScMW->mainWindowProgressBar->setMaximum(1);
}
 
void gtAction::setInfo(QString infoText)
void gtAction::setInfo(const QString& infoText)
{
m_ScMW->setStatusBarInfoText(infoText);
}
/trunk/Scribus/scribus/gtaction.h
93,7 → 93,7
void setTextFrame(PageItem* frame);
void setProgressInfo();
void setProgressInfoDone();
void setInfo(QString infoText);
void setInfo(const QString& infoText);
double getLineSpacing(int fontSize);
void clearFrame();
void getFrameFont(gtFont *font);
/trunk/Scribus/scribus/gtfont.cpp
194,7 → 194,7
return b;
}
 
void gtFont::setName(QString newName)
void gtFont::setName(const QString& newName)
{
m_name = newName;
setWeight(NO_WEIGHT);
205,7 → 205,7
m_setflags |= familyWasSet;
}
 
void gtFont::setFamily(QString newFamily)
void gtFont::setFamily(const QString& newFamily)
{
m_family = newFamily;
m_useFullName = false;
236,7 → 236,7
}
}
 
void gtFont::setWeight(QString newWeight)
void gtFont::setWeight(const QString& newWeight)
{
m_weight = newWeight;
m_useFullName = false;
282,7 → 282,7
}
}
 
void gtFont::setSlant(QString newSlant)
void gtFont::setSlant(const QString& newSlant)
{
m_slant = newSlant;
m_useFullName = false;
329,7 → 329,7
}
}
 
void gtFont::setWidth(QString newWidth)
void gtFont::setWidth(const QString& newWidth)
{
m_width = newWidth;
m_useFullName = false;
367,7 → 367,7
m_setflags |= sizeWasSet;
}
 
void gtFont::setColor(QString newColor)
void gtFont::setColor(const QString& newColor)
{
m_color = newColor;
m_setflags |= fillColorWasSet;
379,7 → 379,7
m_setflags |= fillShadeWasSet;
}
 
void gtFont::setStrokeColor(QString newColor)
void gtFont::setStrokeColor(const QString& newColor)
{
m_strokeColor = newColor;
m_setflags |= strokeColorWasSet;
/trunk/Scribus/scribus/gtfont.h
152,23 → 152,23
bool toggleEffect(FontEffect fe);
int getFlags();
int getEffectsValue();
void setName(QString newName);
void setFamily(QString newFamily);
void setName(const QString& newName);
void setFamily(const QString& newFamily);
QString getFamily();
void setWeight(FontWeight newWeight);
void setWeight(QString newWeight);
void setWeight(const QString& newWeight);
QString getWeight();
void setSlant(FontSlant newSlant);
void setSlant(QString newSlant);
void setSlant(const QString& newSlant);
QString getSlant();
void setWidth(FontWidth newWidth);
void setWidth(QString newWidth);
void setWidth(const QString& newWidth);
QString getWidth();
void setSize(int newSize);
void setSize(double newSize);
void setColor(QString newColor);
void setColor(const QString& newColor);
void setShade(int newShade);
void setStrokeColor(QString newColor);
void setStrokeColor(const QString& newColor);
void setStrokeShade(int newShade);
QString getName();
QString getName(uint i);
/trunk/Scribus/scribus/gtframestyle.cpp
27,7 → 27,8
#include "gtframestyle.h"
#include "scribusstructs.h"
 
gtFrameStyle::gtFrameStyle(QString name) : gtParagraphStyle(name)
gtFrameStyle::gtFrameStyle(const QString& name) :
gtParagraphStyle(name)
{
init();
}
83,7 → 84,7
return m_bgColor;
}
 
void gtFrameStyle::setBgColor(QString newBgColor)
void gtFrameStyle::setBgColor(const QString& newBgColor)
{
m_bgColor = newBgColor;
}
/trunk/Scribus/scribus/gtframestyle.h
39,7 → 39,7
int m_bgShade;
void init();
public:
gtFrameStyle(QString name);
gtFrameStyle(const QString& name);
gtFrameStyle(const gtFrameStyle& f);
gtFrameStyle(const gtParagraphStyle& p);
gtFrameStyle(const gtStyle& s);
49,7 → 49,7
double getColumnsGap();
void setColumnsGap(double newColumnsGap);
QString getBgColor();
void setBgColor(QString newBgColor);
void setBgColor(const QString& newBgColor);
int getBgShade();
void setBgShade(int newBgShade);
void getParagraphStyle(gtParagraphStyle* pstyle);
/trunk/Scribus/scribus/gtgettext.cpp
289,7 → 289,7
 
// Loads the "DLL", validates the importer is good, populates the passed parameters with
// the plugin information.
bool gtGetText::DLLName(QString name, QString *ffName, QStringList *fEndings)
bool gtGetText::DLLName(const QString& name, QString *ffName, QStringList *fEndings)
{
// Pointer to the plugin, once loaded
void* gtplugin;
/trunk/Scribus/scribus/gtgettext.h
74,7 → 74,7
void CallDLL(const ImporterData& idata, const QString& filePath,
const QString& encoding, bool textOnly, bool append, bool prefix, PageItem* importItem);
// Loads, validates, and executes the Importer code.
bool DLLName(QString name, QString *ffName, QStringList *fileEndings);
bool DLLName(const QString& name, QString *ffName, QStringList *fileEndings);
// Loads the "DLL", validates the importer is good, populates the passed parameters with
// the plugin information.
void createMap(); // Create the importer Qmap.
/trunk/Scribus/scribus/gtparagraphstyle.cpp
27,7 → 27,8
#include "gtparagraphstyle.h"
#include "scribusstructs.h"
 
gtParagraphStyle::gtParagraphStyle(QString name) : gtStyle(name)
gtParagraphStyle::gtParagraphStyle(const QString& name) :
gtStyle(name)
{
init();
}
247,7 → 248,7
return m_bulletStr;
}
 
void gtParagraphStyle::setBullet(bool newBullet, QString str)
void gtParagraphStyle::setBullet(bool newBullet, const QString& str)
{
m_bullet = newBullet;
if (str != "")
262,7 → 263,7
return m_numeration;
}
 
void gtParagraphStyle::setNum(bool newNum, int format, int level, int start, QString prefix, QString suffix)
void gtParagraphStyle::setNum(bool newNum, int format, int level, int start, const QString& prefix, const QString& suffix)
{
m_numeration = newNum;
if (newNum)
/trunk/Scribus/scribus/gtparagraphstyle.h
123,16 → 123,16
bool isAdjToBaseline();
void setAdjToBaseline(bool newAdjToBaseline);
void getStyle(gtStyle* style);
gtParagraphStyle(QString name);
gtParagraphStyle(const QString& name);
gtParagraphStyle(const gtParagraphStyle& p);
gtParagraphStyle(const gtStyle& s);
~gtParagraphStyle();
QString target();
bool hasBullet();
void setBullet(bool newBullet, QString str);
void setBullet(bool newBullet, const QString& str);
QString getBullet();
bool hasNum();
void setNum(bool newNum, int format=0, int level=0, int start = 1, QString prefix = "", QString suffix = "");
void setNum(bool newNum, int format=0, int level=0, int start = 1, const QString& prefix = "", const QString& suffix = "");
int getNumLevel();
int getNumFormat();
int getNumStart();
/trunk/Scribus/scribus/gtstyle.cpp
26,7 → 26,7
 
#include "gtstyle.h"
 
gtStyle::gtStyle(QString name)
gtStyle::gtStyle(const QString& name)
{
this->name = name;
}
52,7 → 52,7
return name;
}
 
void gtStyle::setName(QString newName)
void gtStyle::setName(const QString& newName)
{
name = newName;
}
/trunk/Scribus/scribus/gtstyle.h
37,12 → 37,12
QString name;
gtFont font;
public:
gtStyle(QString name);
gtStyle(const QString& name);
gtStyle(const gtStyle& s);
void setFont(const gtFont& newFont);
gtFont* getFont();
QString getName();
void setName(QString newName);
void setName(const QString& newName);
virtual ~gtStyle();
virtual QString target();
};
/trunk/Scribus/scribus/guidemanagercore.cpp
686,7 → 686,7
}
 
 
void GuideManagerIO::readVerticalGuides(const QString guideString, ScPage *page, GuideManagerCore::GuideType type, bool useOldGuides)
void GuideManagerIO::readVerticalGuides(const QString& guideString, ScPage *page, GuideManagerCore::GuideType type, bool useOldGuides)
{
QStringList gVal(guideString.split(' ', QString::SkipEmptyParts));
for (QStringList::Iterator it = gVal.begin(); it != gVal.end(); ++it )
695,7 → 695,7
page->guides.addVertical(ScCLocale::toDoubleC((*it)), type);
}
 
void GuideManagerIO::readHorizontalGuides(const QString guideString, ScPage *page, GuideManagerCore::GuideType type, bool useOldGuides)
void GuideManagerIO::readHorizontalGuides(const QString& guideString, ScPage *page, GuideManagerCore::GuideType type, bool useOldGuides)
{
QStringList gVal(guideString.split(' ', QString::SkipEmptyParts));
for (QStringList::Iterator it = gVal.begin(); it != gVal.end(); ++it )
/trunk/Scribus/scribus/guidemanagercore.h
149,7 → 149,7
\param useOldGuides A little bit hacking here. The guides were stored in a little mess
in the ancient times. So when is the obsolete XML attribute found in reading document
the old reading method is used. All guides are saved in new format then. */
static void readHorizontalGuides(const QString guideString,
static void readHorizontalGuides(const QString& guideString,
ScPage *page,
GuideManagerCore::GuideType type,
bool useOldGuides=false);
163,7 → 163,7
\param useOldGuides A little bit hacking here. The guides were stored in a little mess
in the ancient times. So when is the obsolete XML attribute found in reading document
the old reading method is used. All guides are saved in new format then. */
static void readVerticalGuides(const QString guideString,
static void readVerticalGuides(const QString& guideString,
ScPage *page,
GuideManagerCore::GuideType type,
bool useOldGuides=false);
/trunk/Scribus/scribus/guidesmodel.cpp
128,7 → 128,7
endResetModel();
}
 
void GuidesModel::setValues(Guides values)
void GuidesModel::setValues(const Guides& values)
{
beginResetModel();
m_values = values;
/trunk/Scribus/scribus/guidesmodel.h
45,7 → 45,7
void insertRow();
 
//! \brief Set new values into the model.
void setValues(Guides values);
void setValues(const Guides& values);
//! \brief Get values back to the app.
Guides values();
 
/trunk/Scribus/scribus/iconmanager.cpp
190,17 → 190,17
}
}
 
QCursor IconManager::loadCursor(const QString nam, int hotX, int hotY, bool forceUseColor)
QCursor IconManager::loadCursor(const QString& nam, int hotX, int hotY, bool forceUseColor)
{
return QCursor(loadPixmap(nam, forceUseColor), hotX, hotY);
}
 
QIcon IconManager::loadIcon(const QString nam, bool forceUseColor)
QIcon IconManager::loadIcon(const QString& nam, bool forceUseColor)
{
return QIcon(loadPixmap(nam, forceUseColor));
}
 
QPixmap IconManager::loadPixmap(const QString nam, bool forceUseColor, bool rtlFlip)
QPixmap IconManager::loadPixmap(const QString& nam, bool forceUseColor, bool rtlFlip)
{
if (m_pxCache.contains(nam))
return *m_pxCache[nam];
242,7 → 242,7
*pm=QPixmap::fromImage(qi);
}
 
bool IconManager::setActiveFromPrefs(QString prefsSet)
bool IconManager::setActiveFromPrefs(const QString& prefsSet)
{
//qDebug()<<"setting active from prefs to"<<prefsSet;
if (m_iconSets.contains(prefsSet))
254,7 → 254,7
return false;
}
 
QString IconManager::baseNameForTranslation(QString transName) const
QString IconManager::baseNameForTranslation(const QString& transName) const
{
QString name;
for (const ScIconSetData& value : m_iconSets)
270,7 → 270,7
return name;
}
 
QString IconManager::pathForIcon(const QString nam)
QString IconManager::pathForIcon(const QString& nam)
{
//QString iconset(PrefsManager::instance()->appPrefs.uiPrefs.iconSet);
QString iconSubdir(m_iconSets[m_activeSetBasename].path+"/");
302,7 → 302,7
return paths;
}
 
QStringList IconManager::nameList(QString language) const
QStringList IconManager::nameList(const QString& language) const
{
QStringList names;
for (const ScIconSetData& value : m_iconSets)
/trunk/Scribus/scribus/iconmanager.h
51,16 → 51,16
*/
static void deleteInstance();
bool setup();
QCursor loadCursor(const QString nam, int hotX = -1, int hotY = -1, bool forceUseColor=false);
QIcon loadIcon(const QString nam, bool forceUseColor=false);
QPixmap loadPixmap(const QString nam, bool forceUseColor=false, bool rtlFlip=false);
QString pathForIcon(const QString nam);
QCursor loadCursor(const QString& nam, int hotX = -1, int hotY = -1, bool forceUseColor=false);
QIcon loadIcon(const QString& nam, bool forceUseColor=false);
QPixmap loadPixmap(const QString& nam, bool forceUseColor=false, bool rtlFlip=false);
QString pathForIcon(const QString& nam);
QStringList pathList() const;
QStringList nameList(QString language) const;
QStringList nameList(const QString& language) const;
void iconToGrayscale(QPixmap *pm);
bool setActiveFromPrefs(QString prefsSet);
bool setActiveFromPrefs(const QString& prefsSet);
QString activeSetBasename() { return m_activeSetBasename; }
QString baseNameForTranslation(QString transName) const;
QString baseNameForTranslation(const QString& transName) const;
 
public slots:
void languageChange();
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader.cpp
6,12 → 6,12
*/
#include "scimgdataloader.h"
 
ScImgDataLoader::ScImgDataLoader(void)
ScImgDataLoader::ScImgDataLoader()
{
initialize();
}
 
void ScImgDataLoader::initialize(void)
void ScImgDataLoader::initialize()
{
m_msgType = noMsg;
m_message.resize(0);
22,7 → 22,7
m_pixelFormat = Format_Undefined;
}
 
void ScImgDataLoader::setRequest(bool valid, QMap<int, ImageLoadRequest> req)
void ScImgDataLoader::setRequest(bool valid, const QMap<int, ImageLoadRequest>& req)
{
m_imageInfoRecord.RequestProps = req;
m_imageInfoRecord.isRequest = valid;
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader.h
19,7 → 19,7
class ScImgDataLoader
{
protected:
ScImgDataLoader(void);
ScImgDataLoader();
 
QStringList m_supportedFormats;
 
29,7 → 29,8
int m_profileComponents;
eColorFormat m_pixelFormat;
 
typedef enum {
typedef enum
{
noMsg = 0,
warningMsg = 1,
errorMsg = 2
37,7 → 38,7
MsgType m_msgType;
QString m_message;
 
void swapRGBA(void);
void swapRGBA();
void swapRGBA(QImage *img);
 
QString getPascalString(QDataStream & s);
45,18 → 46,18
void parseRessourceData( QDataStream & s, const PSDHeader & header, uint size );
 
public:
virtual ~ScImgDataLoader(void) {};
virtual ~ScImgDataLoader() {};
 
const QStringList& supportedFormats(void) const { return m_supportedFormats; }
const QStringList& supportedFormats() const { return m_supportedFormats; }
bool supportFormat(const QString& fmt);
 
RawImage r_image;
 
QImage& image(void) { return m_image; }
QByteArray& embeddedProfile(void) { return m_embeddedProfile; }
ImageInfoRecord& imageInfoRecord(void) { return m_imageInfoRecord; }
eColorFormat pixelFormat(void) { return m_pixelFormat; }
void setRequest(bool valid, QMap<int, ImageLoadRequest> req);
QImage& image() { return m_image; }
QByteArray& embeddedProfile() { return m_embeddedProfile; }
ImageInfoRecord& imageInfoRecord() { return m_imageInfoRecord; }
eColorFormat pixelFormat() { return m_pixelFormat; }
void setRequest(bool valid, const QMap<int, ImageLoadRequest>& req);
 
bool issuedErrorMsg(void) const { return (m_msgType == errorMsg); }
bool issuedWarningMsg(void) const { return (m_msgType == warningMsg); }
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gimp.cpp
8,7 → 8,7
#include <QFileInfo>
#include "scimgdataloader_gimp.h"
 
ScImgDataLoader_GIMP::ScImgDataLoader_GIMP(void) : ScImgDataLoader()
ScImgDataLoader_GIMP::ScImgDataLoader_GIMP() : ScImgDataLoader()
{
initSupportedFormatList();
}
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gimp.h
16,7 → 16,7
void initSupportedFormatList();
 
public:
ScImgDataLoader_GIMP(void);
ScImgDataLoader_GIMP();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.cpp
16,7 → 16,7
 
bool ScImgDataLoader_GMagick::gm_initialized = false;
 
ScImgDataLoader_GMagick::ScImgDataLoader_GMagick(void)
ScImgDataLoader_GMagick::ScImgDataLoader_GMagick()
{
initSupportedFormatList();
m_useRawImage = true;
23,7 → 23,7
}
 
 
void ScImgDataLoader_GMagick::initSupportedFormatList(void)
void ScImgDataLoader_GMagick::initSupportedFormatList()
{
//This is unused! See util_formats.{h,cpp}
m_supportedFormats.clear();
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp
34,12 → 34,12
#define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN)
 
 
ScImgDataLoader_JPEG::ScImgDataLoader_JPEG(void)
ScImgDataLoader_JPEG::ScImgDataLoader_JPEG()
{
initSupportedFormatList();
}
 
void ScImgDataLoader_JPEG::initSupportedFormatList(void)
void ScImgDataLoader_JPEG::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "jpg" );
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.h
34,7 → 34,7
bool read_jpeg_marker (UINT8 requestmarker, j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned int *icc_data_len);
 
public:
ScImgDataLoader_JPEG(void);
ScImgDataLoader_JPEG();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_kra.cpp
11,12 → 11,12
#include "scimgdataloader_kra.h"
#include "util_formats.h"
 
ScImgDataLoader_KRA::ScImgDataLoader_KRA(void) : ScImgDataLoader()
ScImgDataLoader_KRA::ScImgDataLoader_KRA() : ScImgDataLoader()
{
initSupportedFormatList();
}
 
void ScImgDataLoader_KRA::initSupportedFormatList(void)
void ScImgDataLoader_KRA::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append("kra");
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_kra.h
16,7 → 16,7
class ScImgDataLoader_KRA : public ScImgDataLoader
{
public:
ScImgDataLoader_KRA(void);
ScImgDataLoader_KRA();
 
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ora.cpp
11,7 → 11,7
#include "scimgdataloader_ora.h"
#include "util_formats.h"
 
ScImgDataLoader_ORA::ScImgDataLoader_ORA(void) : ScImgDataLoader(),
ScImgDataLoader_ORA::ScImgDataLoader_ORA() : ScImgDataLoader(),
m_inSubLayer(0),
m_layerCount(0)
{
18,7 → 18,7
initSupportedFormatList();
}
 
void ScImgDataLoader_ORA::initSupportedFormatList(void)
void ScImgDataLoader_ORA::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append("ora");
239,7 → 239,7
}
}
 
int ScImgDataLoader_ORA::blendModeToInt(QString compositeOp)
int ScImgDataLoader_ORA::blendModeToInt(const QString& compositeOp)
{
int ret = 0;
if (compositeOp == "svg:darken")
315,7 → 315,7
return ret;
}
 
QString ScImgDataLoader_ORA::blendModeToString(QString compositeOp)
QString ScImgDataLoader_ORA::blendModeToString(const QString& compositeOp)
{
QString ret = compositeOp;
if (compositeOp == "svg:darken")
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ora.h
16,7 → 16,7
class ScImgDataLoader_ORA : public ScImgDataLoader
{
public:
ScImgDataLoader_ORA(void);
ScImgDataLoader_ORA();
 
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
24,8 → 24,8
protected:
void initSupportedFormatList();
void parseStackXML(QDomElement &elem, ScPainter *painter, ScZipHandler *uz);
int blendModeToInt(QString compositeOp);
QString blendModeToString(QString compositeOp);
int blendModeToInt(const QString& compositeOp);
QString blendModeToString(const QString& compositeOp);
int m_inSubLayer;
int m_layerCount;
};
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pdf.cpp
19,12 → 19,12
#endif
 
 
ScImgDataLoader_PDF::ScImgDataLoader_PDF(void) : ScImgDataLoader()
ScImgDataLoader_PDF::ScImgDataLoader_PDF() : ScImgDataLoader()
{
initSupportedFormatList();
}
 
void ScImgDataLoader_PDF::initSupportedFormatList(void)
void ScImgDataLoader_PDF::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "pdf" );
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pdf.h
16,7 → 16,7
void initSupportedFormatList();
 
public:
ScImgDataLoader_PDF(void);
ScImgDataLoader_PDF();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pgf.cpp
26,12 → 26,12
#include <fcntl.h>
}
 
ScImgDataLoader_PGF::ScImgDataLoader_PGF(void) : ScImgDataLoader()
ScImgDataLoader_PGF::ScImgDataLoader_PGF() : ScImgDataLoader()
{
initSupportedFormatList();
}
 
void ScImgDataLoader_PGF::initSupportedFormatList(void)
void ScImgDataLoader_PGF::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "pgf" );
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pgf.h
16,7 → 16,7
void initSupportedFormatList();
 
public:
ScImgDataLoader_PGF(void);
ScImgDataLoader_PGF();
 
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.cpp
42,7 → 42,7
#include "util_formats.h"
#include "util_math.h"
 
ScImgDataLoader_PICT::ScImgDataLoader_PICT(void) : ScImgDataLoader(),
ScImgDataLoader_PICT::ScImgDataLoader_PICT() : ScImgDataLoader(),
m_baseX(0),
m_baseY(0),
m_docWidth(0),
62,7 → 62,7
initSupportedFormatList();
}
 
void ScImgDataLoader_PICT::initSupportedFormatList(void)
void ScImgDataLoader_PICT::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "pct" );
83,7 → 83,7
m_profileComponents = 0;
}
 
void ScImgDataLoader_PICT::parseHeader(QString fName, double &x, double &y, double &w, double &h)
void ScImgDataLoader_PICT::parseHeader(const QString& fName, double &x, double &y, double &w, double &h)
{
QFile f(fName);
if (f.open(QIODevice::ReadOnly))
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_pict.h
25,7 → 25,7
void initSupportedFormatList();
 
public:
ScImgDataLoader_PICT(void);
ScImgDataLoader_PICT();
 
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
32,7 → 32,7
virtual bool loadPicture(const QString& fn, int page, int res, bool thumbnail);
 
private:
void parseHeader(QString fName, double &x, double &y, double &w, double &h);
void parseHeader(const QString& fName, double &x, double &y, double &w, double &h);
void parsePict(QDataStream &ts);
void alignStreamToWord(QDataStream &ts, uint len);
void handleColor(QDataStream &ts, bool back);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
40,7 → 40,7
#endif
}
 
ScImgDataLoader_PS::ScImgDataLoader_PS(void) : ScImgDataLoader(),
ScImgDataLoader_PS::ScImgDataLoader_PS() :
m_isDCS1(false),
m_isDCS2(false),
m_isDCS2multi(false),
62,7 → 62,7
initSupportedFormatList();
}
 
void ScImgDataLoader_PS::initialize(void)
void ScImgDataLoader_PS::initialize()
{
m_doThumbnail = false;
m_hasThumbnail = false;
70,12 → 70,10
ScImgDataLoader::initialize();
}
 
void ScImgDataLoader_PS::initSupportedFormatList(void)
void ScImgDataLoader_PS::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "ps" );
m_supportedFormats.append( "eps" );
m_supportedFormats.append( "epsi" );
m_supportedFormats<<"ps"<<"eps"<<"epsi";
}
 
void ScImgDataLoader_PS::loadEmbeddedProfile(const QString& fn, int /* page */)
127,7 → 125,7
}
}
 
void ScImgDataLoader_PS::scanForFonts(QString fn)
void ScImgDataLoader_PS::scanForFonts(const QString& fn)
{
QFile f(fn);
if (!f.open(QIODevice::ReadOnly))
148,7 → 146,7
}
}
 
bool ScImgDataLoader_PS::parseData(QString fn)
bool ScImgDataLoader_PS::parseData(const QString& fn)
{
QChar tc;
QString tmp, FarNam;
293,7 → 291,7
uint pos = posStr.toUInt();
uint len = lenStr.toUInt();
struct plateOffsets offs;
if (m_Creator.contains("Photoshop Version 9")) // This is very strange, it seems that there is a bug in PS 9 which writes weired entries
if (m_Creator.contains("Photoshop Version 9")) // This is very strange, it seems that there is a bug in PS 9 which writes weird entries
{
pos -= (191 + plateCount * 83);
len -= 83;
742,7 → 740,7
return false;
}
 
void ScImgDataLoader_PS::loadPhotoshop(QString fn, int gsRes)
void ScImgDataLoader_PS::loadPhotoshop(const QString& fn, int gsRes)
{
if ((m_psDataType >= 1) && (m_psDataType <= 6) && ((m_psMode == 3) || (m_psMode == 4)))
{
855,7 → 853,7
}
}
 
void ScImgDataLoader_PS::decodeA85(QByteArray &psdata, QString tmp)
void ScImgDataLoader_PS::decodeA85(QByteArray &psdata, const QString& tmp)
{
uchar byte;
ushort data;
926,13 → 924,13
longjmp (myerr->setjmp_buffer, 1);
}
 
bool ScImgDataLoader_PS::loadPSjpeg(QString fn)
bool ScImgDataLoader_PS::loadPSjpeg(const QString& fn)
{
if (!QFile::exists(fn))
return false;
struct jpeg_decompress_struct cinfo;
struct my_error_mgr jerr;
FILE *infile;
struct my_error_mgr jerr;
FILE *infile;
cinfo.err = jpeg_std_error (&jerr.pub);
jerr.pub.error_exit = my_error_exit;
infile = nullptr;
1051,7 → 1049,7
return (!m_image.isNull());
}
 
bool ScImgDataLoader_PS::loadPSjpeg(QString fn, QImage &tmpImg)
bool ScImgDataLoader_PS::loadPSjpeg(const QString& fn, QImage &tmpImg)
{
if (!QFile::exists(fn))
return false;
1176,7 → 1174,7
return (!tmpImg.isNull());
}
 
void ScImgDataLoader_PS::loadPhotoshopBinary(QString fn)
void ScImgDataLoader_PS::loadPhotoshopBinary(const QString& fn)
{
double x, y, b, h;
ScTextStream ts2(&m_BBox, QIODevice::ReadOnly);
1316,7 → 1314,7
f.close();
}
 
void ScImgDataLoader_PS::loadPhotoshopBinary(QString fn, QImage &tmpImg)
void ScImgDataLoader_PS::loadPhotoshopBinary(const QString& fn, QImage &tmpImg)
{
double x, y, b, h;
ScTextStream ts2(&m_BBox, QIODevice::ReadOnly);
1435,11 → 1433,11
}
}
 
void ScImgDataLoader_PS::loadDCS2(QString fn, int gsRes)
void ScImgDataLoader_PS::loadDCS2(const QString& fn, int gsRes)
{
QStringList args;
double x, y, b, h;
QFileInfo fi = QFileInfo(fn);
QFileInfo fi(fn);
QString ext = fi.suffix().toLower();
QString tmpFile = QDir::toNativeSeparators(ScPaths::tempFileDir() + "sc1.png");
QString tmpFile2 = QDir::toNativeSeparators(ScPaths::tempFileDir() + "tmp.eps");
1549,7 → 1547,7
m_pixelFormat = Format_YMCK_8;
}
 
void ScImgDataLoader_PS::loadDCS1(QString fn, int gsRes)
void ScImgDataLoader_PS::loadDCS1(const QString& fn, int gsRes)
{
QStringList args;
double x, y, b, h;
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.h
15,16 → 15,16
protected:
 
void initSupportedFormatList();
void scanForFonts(QString fn);
bool parseData(QString fn);
void loadPhotoshop(QString fn, int gsRes);
void decodeA85(QByteArray &psdata, QString tmp);
bool loadPSjpeg(QString fn);
bool loadPSjpeg(QString fn, QImage &tmpImg);
void loadPhotoshopBinary(QString fn);
void loadPhotoshopBinary(QString fn, QImage &tmpImg);
void loadDCS1(QString fn, int gsRes);
void loadDCS2(QString fn, int gsRes);
void scanForFonts(const QString& fn);
bool parseData(const QString& fn);
void loadPhotoshop(const QString& fn, int gsRes);
void decodeA85(QByteArray &psdata, const QString& tmp);
bool loadPSjpeg(const QString& fn);
bool loadPSjpeg(const QString& fn, QImage &tmpImg);
void loadPhotoshopBinary(const QString& fn);
void loadPhotoshopBinary(const QString& fn, QImage &tmpImg);
void loadDCS1(const QString& fn, int gsRes);
void loadDCS2(const QString& fn, int gsRes);
void blendImages(QImage &source, ScColor col);
struct plateOffsets
{
57,9 → 57,9
QStringList m_FontListe;
 
public:
ScImgDataLoader_PS(void);
ScImgDataLoader_PS();
 
virtual void initialize(void);
virtual void initialize();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.cpp
31,7 → 31,7
return s;
}
 
ScImgDataLoader_PSD::ScImgDataLoader_PSD(void)
ScImgDataLoader_PSD::ScImgDataLoader_PSD()
{
m_maxChannels = 0;
initSupportedFormatList();
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_psd.h
28,7 → 28,7
CM_LABCOLOR = 9
};
 
ScImgDataLoader_PSD(void);
ScImgDataLoader_PSD();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_qt.cpp
12,12 → 12,12
#include "scimgdataloader_qt.h"
#include "util_formats.h"
 
ScImgDataLoader_QT::ScImgDataLoader_QT(void) : ScImgDataLoader()
ScImgDataLoader_QT::ScImgDataLoader_QT() : ScImgDataLoader()
{
initSupportedFormatList();
}
 
void ScImgDataLoader_QT::initSupportedFormatList(void)
void ScImgDataLoader_QT::initSupportedFormatList()
{
m_supportedFormats.clear();
QList<QByteArray> fmtList = QImageReader::supportedImageFormats();
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_qt.h
16,7 → 16,7
void initSupportedFormatList();
 
public:
ScImgDataLoader_QT(void);
ScImgDataLoader_QT();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
24,7 → 24,7
TIFFMergeFieldInfo(tiff, xtiffFieldInfo, sizeof (xtiffFieldInfo) / sizeof (xtiffFieldInfo[0]));
}
 
ScImgDataLoader_TIFF::ScImgDataLoader_TIFF(void) : ScImgDataLoader()
ScImgDataLoader_TIFF::ScImgDataLoader_TIFF() : ScImgDataLoader()
{
m_photometric = PHOTOMETRIC_MINISBLACK;
m_samplesperpixel = 72;
32,7 → 32,7
initSupportedFormatList();
}
 
void ScImgDataLoader_TIFF::initSupportedFormatList(void)
void ScImgDataLoader_TIFF::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "tif" );
392,7 → 392,7
return gotData;
}
 
void ScImgDataLoader_TIFF::blendOntoTarget(RawImage *tmp, int layOpa, QString layBlend, bool cmyk, bool useMask)
void ScImgDataLoader_TIFF::blendOntoTarget(RawImage *tmp, int layOpa, const QString& layBlend, bool cmyk, bool useMask)
{
if (layBlend == "diss")
{
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.h
31,7 → 31,7
int getLayers(const QString& fn, int page);
bool getImageData(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 m_photometric, uint16 bitspersample, uint16 m_samplesperpixel, bool &bilevel, bool &isCMYK);
bool getImageData_RGBA(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 bitspersample, uint16 m_samplesperpixel);
void blendOntoTarget(RawImage *tmp, int layOpa, QString layBlend, bool cmyk, bool useMask);
void blendOntoTarget(RawImage *tmp, int layOpa, const QString& layBlend, bool cmyk, bool useMask);
QString getLayerString(QDataStream & s);
bool loadChannel( QDataStream & s, const PSDHeader & header, QList<PSDLayer> &layerInfo, uint layer, int channel, int component, RawImage &tmpImg);
bool loadLayerInfo(QDataStream & s, QList<PSDLayer> &layerInfo);
44,7 → 44,7
uint16 m_photometric, m_samplesperpixel;
 
public:
ScImgDataLoader_TIFF(void);
ScImgDataLoader_TIFF();
 
// virtual void preloadAlphaChannel(const QString& fn, int res);
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.cpp
291,12 → 291,12
}
 
 
ScImgDataLoader_WPG::ScImgDataLoader_WPG(void) : ScImgDataLoader()
ScImgDataLoader_WPG::ScImgDataLoader_WPG() : ScImgDataLoader()
{
initSupportedFormatList();
}
 
void ScImgDataLoader_WPG::initSupportedFormatList(void)
void ScImgDataLoader_WPG::initSupportedFormatList()
{
m_supportedFormats.clear();
m_supportedFormats.append( "wpg" );
/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_wpg.h
61,7 → 61,7
void initSupportedFormatList();
 
public:
ScImgDataLoader_WPG(void);
ScImgDataLoader_WPG();
 
virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
/trunk/Scribus/scribus/latexhelpers.cpp
166,7 → 166,7
}
}
 
void LatexConfigParser::formatError(QString message)
void LatexConfigParser::formatError(const QString& message)
{
QString new_error = QString::number(xml.lineNumber()) + ":" +
QString::number(xml.columnNumber()) + ":" + message;
403,7 → 403,7
return m_instance;
}
 
LatexConfigParser* LatexConfigCache::parser(QString filename, bool warnOnError)
LatexConfigParser* LatexConfigCache::parser(const QString& filename, bool warnOnError)
{
if (m_parsers.contains(filename))
{
420,7 → 420,7
}
 
 
void LatexConfigCache::createParser(QString filename, bool warnOnError)
void LatexConfigCache::createParser(const QString& filename, bool warnOnError)
{
LatexConfigParser *parser = new LatexConfigParser();
bool hasError = !parser->parseConfigFile(filename);
436,7 → 436,7
}
}
 
bool LatexConfigCache::hasError(QString filename)
bool LatexConfigCache::hasError(const QString& filename)
{
if (!m_error.contains(filename))
return true;
/trunk/Scribus/scribus/latexhelpers.h
83,7 → 83,7
QString m_preamble, m_postamble, m_icon;
QString m_filename;
I18nXmlStreamReader xml;
void formatError(QString message);
void formatError(const QString& message);
void parseElements();
void parseTab();
void parseHighlighter();
98,10 → 98,10
static QStringList defaultConfigs();
static QMap<QString, QString> defaultCommands();
LatexConfigCache() {}
LatexConfigParser* parser(QString filename, bool warnOnError = false);
bool hasError(QString filename);
LatexConfigParser* parser(const QString& filename, bool warnOnError = false);
bool hasError(const QString& filename);
protected:
void createParser(QString filename, bool warnOnError);
void createParser(const QString& filename, bool warnOnError);
private:
QMap<QString, LatexConfigParser*> m_parsers;
QMap<QString, bool> m_error;
/trunk/Scribus/scribus/loadsaveplugin.cpp
41,8 → 41,7
QList<FileFormat>::iterator it(findFormat(id));
if (it == formats.end())
return nullptr;
else
return &(*it);
return &(*it);
}
 
FileFormat * LoadSavePlugin::getFormatByID(int id)
50,17 → 49,15
QList<FileFormat>::iterator it(findFormat(id));
if (it == formats.end())
return nullptr;
else
return &(*it);
return &(*it);
}
 
FileFormat* LoadSavePlugin::getFormatByExt(const QString ext)
FileFormat* LoadSavePlugin::getFormatByExt(const QString& ext)
{
QList<FileFormat>::iterator it(findFormat(ext));
if (it == formats.end())
return nullptr;
else
return &(*it);
return &(*it);
}
 
const QStringList LoadSavePlugin::fileDialogLoadFilter()
224,22 → 221,22
return false;
}
 
bool LoadSavePlugin::loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc)
bool LoadSavePlugin::loadElements(const QString & /*data*/, const QString& /*fileDir*/, int /*toLayer*/, double /*Xp_in*/, double /*Yp_in*/, bool /*loc*/)
{
return false;
}
 
bool LoadSavePlugin::savePalette(const QString & fileName)
bool LoadSavePlugin::savePalette(const QString & /*fileName*/)
{
return false;
}
 
QString LoadSavePlugin::saveElements(double xp, double yp, double wp, double hp, Selection* selection, QByteArray &prevData)
QString LoadSavePlugin::saveElements(double /*xp*/, double /*yp*/, double /*wp*/, double /*hp*/, Selection* /*selection*/, QByteArray & /*prevData*/)
{
return "";
}
 
bool LoadSavePlugin::loadPalette(const QString & fileName)
bool LoadSavePlugin::loadPalette(const QString & /*fileName*/)
{
return false;
}
254,7 → 251,7
m_lastError = tr("An error occurred while parsing file at line %1, column %2 :\n%3").arg(line).arg(column).arg(msg);
}
 
const QString& LoadSavePlugin::lastSavedFile(void)
const QString& LoadSavePlugin::lastSavedFile()
{
return m_lastSavedFile;
}
278,9 → 275,7
numFlags++;
if( flags & lfInsertPage )
numFlags++;
if( numFlags > 1 )
return false;
return true;
return numFlags <= 1;
}
 
void LoadSavePlugin::registerFormat(FileFormat & fmt)
402,7 → 397,7
{
}
 
bool LoadSavePlugin::loadPage(const QString & /*fileName*/, int /*pageNumber*/, bool /*Mpage*/, QString /*renamedPageName*/)
bool LoadSavePlugin::loadPage(const QString& /*fileName*/, int /*pageNumber*/, bool /*Mpage*/, const QString& /*renamedPageName*/)
{
return false;
}
498,7 → 493,7
{
}
 
bool FileFormat::loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc) const
bool FileFormat::loadElements(const QString& data, const QString& fileDir, int toLayer, double Xp_in, double Yp_in, bool loc) const
{
return (plug && load) ? plug->loadElements(data, fileDir, toLayer, Xp_in, Yp_in, loc) : false;
}
527,7 → 522,7
plug->getReplacedFontData(getNewReplacement, getReplacedFonts, getDummyScFaces);
}
 
bool FileFormat::loadPage(const QString & fileName, int pageNumber, bool Mpage, QString renamedPageName) const
bool FileFormat::loadPage(const QString & fileName, int pageNumber, bool Mpage, const QString& renamedPageName) const
{
if (!plug || !load)
return false;
/trunk/Scribus/scribus/loadsaveplugin.h
74,9 → 74,9
// not found / not available.
static const FileFormat * getFormatById(const int id);
static FileFormat * getFormatByID(int id);
static FileFormat* getFormatByExt(const QString ext);
static FileFormat* getFormatByExt(const QString& ext);
 
virtual bool loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc);
virtual bool loadElements(const QString& data, const QString&, int, double, double, bool);
// Non-static members implemented by plugins:
//
// Load the requested format from the specified path.
87,7 → 87,7
// Save the requested format to the requested path.
virtual bool saveFile(const QString & fileName, const FileFormat & fmt);
virtual bool savePalette(const QString & fileName);
virtual QString saveElements(double xp, double yp, double wp, double hp, Selection* selection, QByteArray &prevData);
virtual QString saveElements(double, double, double, double, Selection*, QByteArray &prevData);
 
// Return last file saved, this may be the last fileName argument passed to saveFile(),
// a temporary file name or an empty string if last call to saveFile() could not create
108,7 → 108,7
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 loadPage(const QString & fileName, int pageNumber, bool Mpage, const 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, QHash<QString, multiLine> *Sty);
195,7 → 195,7
// Standard ctor that sets up a valid FileFormat
FileFormat(LoadSavePlugin * plug);
 
bool loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc) const;
bool loadElements(const QString & data, const QString& fileDir, int toLayer, double Xp_in, double Yp_in, bool loc) const;
// Load a file with this format
bool loadFile(const QString & fileName, int flags, int index = 0) const;
bool loadPalette(const QString & fileName) const;
208,7 → 208,7
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 loadPage(const QString & fileName, int pageNumber, bool Mpage, const 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, QHash<QString,multiLine> *Sty) const;
/trunk/Scribus/scribus/marks.cpp
12,7 → 12,7
 
}
 
void Mark::setValues(const QString& l, int p, MarkType t, MarkData d)
void Mark::setValues(const QString& l, int p, MarkType t, const MarkData& d)
{
label = l;
OwnPage = p;
37,7 → 37,7
return data.strtxt;
}
 
void Mark::setString(const QString str)
void Mark::setString(const QString& str)
{
data.strtxt = str;
}
/trunk/Scribus/scribus/marks.h
51,7 → 51,7
QString label;
int OwnPage;
 
void setValues(const QString& l, int p, MarkType t, MarkData d);
void setValues(const QString& l, int p, MarkType t, const MarkData& d);
MarkType getType() { return typ; }
void setType(MarkType t) { typ = t; }
const MarkData getData() { return data; }
81,7 → 81,7
MarkType getMarkType() { return data.markTyp; }
void setMarkType(MarkType t) { data.markTyp = t; }
const QString getString();
void setString( const QString str );
void setString(const QString& str );
TextNote* getNotePtr() { return data.notePtr; }
void setNotePtr(TextNote *note);
 
/trunk/Scribus/scribus/menumanager.cpp
41,7 → 41,7
m_redoMenu->deleteLater();
}
 
bool MenuManager::createMenu(const QString &menuName, const QString &menuText, const QString parent, bool checkable, bool rememberMenu)
bool MenuManager::createMenu(const QString &menuName, const QString &menuText, const QString& parent, bool checkable, bool rememberMenu)
{
bool retVal=false;
QList<QString> menuEntries;
/trunk/Scribus/scribus/menumanager.h
50,7 → 50,7
enum MenuType {Normal, DLL};
 
bool addMenuToWidgetOfAction(const QString &menuName, ScrAction *action);
bool createMenu(const QString &menuName, const QString &menuText = QString::null, const QString parent = QString::null, bool checkable = false, bool rememberMenu = false);
bool createMenu(const QString &menuName, const QString &menuText = QString::null, const QString& parent = QString::null, bool checkable = false, bool rememberMenu = false);
void removeMenuItem(const QString& s, ScrAction *menuAction, const QString &parent);
bool removeMenuItem(ScrAction *menuAction, const QString &parent);
void generateKeyManList(QStringList *actionNames);
/trunk/Scribus/scribus/mesh.cpp
51,7 → 51,7
controlColor -= delta;
}
 
void MeshPoint::transform(QTransform t)
void MeshPoint::transform(const QTransform& t)
{
FPointArray gr;
gr.addPoint(gridPoint);
69,7 → 69,7
controlColor = gr.point(5);
}
 
void MeshPoint::resetTo(FPoint p)
void MeshPoint::resetTo(const FPoint& p)
{
gridPoint = p;
controlLeft = gridPoint;
/trunk/Scribus/scribus/mesh.h
36,8 → 36,8
MeshPoint();
void moveRel(double dx, double dy);
void moveAbs(double x, double y);
void transform(QTransform t);
void resetTo(FPoint p);
void transform(const QTransform& t);
void resetTo(const FPoint& p);
bool operator ==(const MeshPoint& p);
FPoint gridPoint;
FPoint controlTop;
/trunk/Scribus/scribus/navigator.cpp
31,7 → 31,7
#include "scribusview.h"
#include "util_ghostscript.h"
 
Navigator::Navigator(QWidget *parent, int Size, int Seite, ScribusView* vie, QString fn) : QLabel(parent)
Navigator::Navigator(QWidget *parent, int Size, int Seite, ScribusView* vie, const QString& fn) : QLabel(parent)
{
setScaledContents(false);
setAlignment(Qt::AlignLeft | Qt::AlignTop);
95,7 → 95,7
repaint();
}
 
bool Navigator::SetSeite(int Seite, int Size, QString fn)
bool Navigator::SetSeite(int Seite, int Size, const QString& fn)
{
bool ret = false;
if (!fn.isEmpty())
/trunk/Scribus/scribus/navigator.h
42,7 → 42,7
Q_OBJECT
 
public:
Navigator(QWidget *parent, int Size, int Seite, ScribusView* vie, QString fn = "");
Navigator(QWidget *parent, int Size, int Seite, ScribusView* vie, const QString& fn = "");
~Navigator() {};
void mouseMoveEvent(QMouseEvent *m);
void mousePressEvent(QMouseEvent *m);
49,7 → 49,7
void mouseReleaseEvent(QMouseEvent *m);
void paintEvent(QPaintEvent *e);
void drawMark(int x, int y);
bool SetSeite(int Seite, int Size, QString fn = "");
bool SetSeite(int Seite, int Size, const QString& fn = "");
int Xp;
int Yp;
int Width;
/trunk/Scribus/scribus/nftrcreader.cpp
12,7 → 12,7
 
using namespace std;
 
nftrcreader::nftrcreader(std::vector<nfttemplate*> *tmplts,QString sourceDir)
nftrcreader::nftrcreader(std::vector<nfttemplate*> *tmplts, const QString& sourceDir)
{
templates = tmplts;
currentDir = sourceDir;
19,7 → 19,7
setupCategories();
}
 
bool nftrcreader::parse(QString filePath)
bool nftrcreader::parse(const QString& filePath)
{
bool firstElement = true;
 
137,17 → 137,17
return (nftTemplate->isValid());
}
 
void nftrcreader::setSourceDir(QString source)
void nftrcreader::setSourceDir(const QString& source)
{
currentDir = source;
}
 
void nftrcreader::setSourceFile(QString sourceFile)
void nftrcreader::setSourceFile(const QString& sourceFile)
{
currentFile = sourceFile;
}
 
QString nftrcreader::getCategory(QString cat)
QString nftrcreader::getCategory(const QString& cat)
{
QMap<QString, QString>::iterator it = cats.find(cat);
if (it==cats.end())
/trunk/Scribus/scribus/nftrcreader.h
25,12 → 25,12
class nftrcreader
{
public:
nftrcreader(std::vector<nfttemplate*> *tmplts, QString sourceDir);
nftrcreader(std::vector<nfttemplate*> *tmplts, const QString& sourceDir);
 
bool parse(QString filePath);
bool parse(const QString& filePath);
 
void setSourceDir(QString source);
void setSourceFile(QString sourceFile);
void setSourceDir(const QString& source);
void setSourceFile(const QString& sourceFile);
 
private:
QString currentDir;
41,7 → 41,7
 
bool parseTemplate(QXmlStreamReader& reader, nfttemplate* nftTemplate);
 
QString getCategory(QString cat);
QString getCategory(const QString& cat);
void setupCategories();
};
 
/trunk/Scribus/scribus/nftsettings.cpp
12,7 → 12,7
#include "prefsmanager.h"
#include "scpaths.h"
 
nftsettings::nftsettings(QString guilang)
nftsettings::nftsettings(const QString& guilang)
{
lang = guilang;
read();
26,7 → 26,7
addTemplates(reader, ScPaths::instance().userTemplateDir(true));
}
 
void nftsettings::addTemplates(nftrcreader& reader, QString dir) // dir will be searched for a sub folder called templates
void nftsettings::addTemplates(nftrcreader& reader, const QString& dir) // dir will be searched for a sub folder called templates
{
if (dir.isEmpty())
return;
56,7 → 56,7
}
}
 
QString nftsettings::findTemplateXml(QString dir)
QString nftsettings::findTemplateXml(const QString& dir)
{
QString tmp = dir + "/template." + lang + ".xml";
if (QFile(tmp).exists())
/trunk/Scribus/scribus/nftsettings.h
26,11 → 26,11
QString lang;
 
void read();
void addTemplates(nftrcreader& reader, QString dir);
QString findTemplateXml(QString dir);
void addTemplates(nftrcreader& reader, const QString& dir);
QString findTemplateXml(const QString& dir);
 
public:
nftsettings(QString guilang);
nftsettings(const QString& guilang);
~nftsettings();
 
std::vector<nfttemplate*> templates;
/trunk/Scribus/scribus/nfttemplate.cpp
10,7 → 10,7
#include "nfttemplate.h"
#include <QFileInfo>
 
nfttemplate::nfttemplate(QString tmplFilePath, const QString &tmplCategory)
nfttemplate::nfttemplate(const QString& tmplFilePath, const QString &tmplCategory)
: tmplXml(tmplFilePath)
{
templateCategory = tmplCategory;
/trunk/Scribus/scribus/nfttemplate.h
16,7 → 16,7
 
class nfttemplate {
public:
nfttemplate(QString tmplFilePath, const QString &tmplType);
nfttemplate(const QString& tmplFilePath, const QString &tmplType);
~nfttemplate();
QFile tmplXml;
QString enCategory;
/trunk/Scribus/scribus/nodeeditcontext.cpp
170,7 → 170,7
 
//CB-->Doc
void NodeEditContext::moveClipPoint(PageItem *currItem, FPoint ip)
void NodeEditContext::moveClipPoint(PageItem *currItem, const FPoint& ip)
{
ScribusDoc* Doc = currItem->doc();
if (((m_EdPoints) && (m_ClRe % 2 != 0)) || ((!m_EdPoints) && (m_ClRe % 2 == 0)))
/trunk/Scribus/scribus/nodeeditcontext.h
68,7 → 68,7
void finishTransaction(PageItem* currItem);
ScItemState<QPair<FPointArray, FPointArray> >* finishTransaction1(PageItem* currItem);
void finishTransaction2(PageItem* currItem, ScItemState<QPair<FPointArray, FPointArray> >* state);
void moveClipPoint(PageItem *currItem, FPoint ip);
void moveClipPoint(PageItem *currItem, const FPoint& ip);
 
FPointArray *oldClip;
UndoTransaction nodeTransaction;
/trunk/Scribus/scribus/numeration.cpp
9,7 → 9,7
return str;
}
 
QString getAsterixStringFromNum(int num, QString asterix, QChar leadingChar, int charsLen)
QString getAsterixStringFromNum(int num, const QString& asterix, QChar leadingChar, int charsLen)
{
QString str = getStringFromSequence(Type_asterix, num, asterix);
if (charsLen > str.length())
/trunk/Scribus/scribus/numeration.h
59,7 → 59,7
//convert passed num to string using numeration style
QString getStringFromNum(NumFormat format, int num, QChar leadingChar='0', int charsLen=0);
//convert passed num to string with custom chars
QString getAsterixStringFromNum(int num, QString asterix, QChar leadingChar='_', int charsLen=0);
QString getAsterixStringFromNum(int num, const QString& asterix, QChar leadingChar='_', int charsLen=0);
//return numeration name from type
QStringList getFormatList();
 
/trunk/Scribus/scribus/pageitem.cpp
2712,7 → 2712,7
trans.commit();
}
 
void PageItem::set4ColorColors(QString col1, QString col2, QString col3, QString col4)
void PageItem::set4ColorColors(const QString& col1, const QString& col2, const QString& col3, const QString& col4)
{
QColor tmp;
UndoTransaction trans;
/trunk/Scribus/scribus/pageitem.h
643,7 → 643,7
void set4ColorGeometry(FPoint c1, FPoint c2, FPoint c3, FPoint c4);
void set4ColorTransparency(double t1, double t2, double t3, double t4);
void set4ColorShade(int t1, int t2, int t3, int t4);
void set4ColorColors(QString col1, QString col2, QString col3, QString col4);
void set4ColorColors(const QString& col1, const QString& col2, const QString& col3, const QString& col4);
void get4ColorGeometry(FPoint& c1, FPoint& c2, FPoint& c3, FPoint& c4);
void setDiamondGeometry(const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4, const FPoint& c5);
void get4ColorTransparency(double &t1, double &t2, double &t3, double &t4);
/trunk/Scribus/scribus/pageitem_arc.cpp
46,7 → 46,7
 
using namespace std;
 
PageItem_Arc::PageItem_Arc(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
PageItem_Arc::PageItem_Arc(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::Arc, x, y, w, h, w2, fill, outline)
{
arcHeight = h;
/trunk/Scribus/scribus/pageitem_arc.h
36,7 → 36,7
Q_OBJECT
 
public:
PageItem_Arc(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
PageItem_Arc(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_Arc(const PageItem & p) : PageItem(p) {}
~PageItem_Arc() {};
 
/trunk/Scribus/scribus/pageitem_group.cpp
46,7 → 46,7
 
using namespace std;
 
PageItem_Group::PageItem_Group(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
PageItem_Group::PageItem_Group(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline)
: PageItem(pa, PageItem::Group, x, y, w, h, 0, CommonStrings::None, CommonStrings::None)
{
}
/trunk/Scribus/scribus/pageitem_group.h
36,7 → 36,7
Q_OBJECT
 
public:
PageItem_Group(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
PageItem_Group(ScribusDoc *pa, double x, double y, double w, double h, double w2, const QString& fill, const QString& outline);
PageItem_Group(const PageItem & p) : PageItem(p) {}
~PageItem_Group();
 
/trunk/Scribus/scribus/pageitem_noteframe.cpp
273,7 → 273,7
itemText.insert(itemText.length(), story);
}
 
void PageItem_NoteFrame::updateNotes(QList<TextNote*> nList, bool clear)
void PageItem_NoteFrame::updateNotes(const QList<TextNote*>& nList, bool clear)
{
if (nList == l_notes && !clear)
return;
/trunk/Scribus/scribus/pageitem_noteframe.h
33,7 → 33,7
NotesStyle* notesStyle() { return m_nstyle; }
 
//insert notes content into notesframe
void updateNotes(QList<TextNote*> nList, bool clear = true);
void updateNotes(const QList<TextNote*>& nList, bool clear = true);
//read notes text from notesframe itemText and store it in notes`s saxed text field
void updateNotesText();
 
/trunk/Scribus/scribus/pdf_analyzer.cpp
108,12 → 108,12
// colorspace is either a name or an array
if (cs && cs->IsName())
{
PdfName csName = cs->GetName();
const PdfName& csName = cs->GetName();
if (csName == "DeviceGray")
return CS_DeviceGray;
else if (csName == "DeviceRGB")
if (csName == "DeviceRGB")
return CS_DeviceRGB;
else if (csName == "DeviceCMYK")
if (csName == "DeviceCMYK")
return CS_DeviceCMYK;
}
else if (cs && cs->IsArray())
122,16 → 122,16
PdfObject csTypePdfName = csArr[0];
if (csTypePdfName.IsName())
{
PdfName csTypeName = csTypePdfName.GetName();
const PdfName& csTypeName = csTypePdfName.GetName();
if (csTypeName == "ICCBased")
return CS_ICCBased;
else if (csTypeName == "CalGray")
if (csTypeName == "CalGray")
return CS_CalGray;
else if (csTypeName == "CalRGB")
if (csTypeName == "CalRGB")
return CS_CalRGB;
else if (csTypeName == "Lab")
if (csTypeName == "Lab")
return CS_Lab;
else if (csTypeName == "Indexed")
if (csTypeName == "Indexed")
{
PdfObject base = cs->GetArray()[1];
PdfObject* pBase = &base;
142,11 → 142,11
pBase->SetOwner(cs->GetOwner());
return getCSType(pBase);
}
else if (csTypeName == "Separation")
if (csTypeName == "Separation")
return CS_Separation;
else if (csTypeName == "DeviceN")
if (csTypeName == "DeviceN")
return CS_DeviceN;
else if (csTypeName == "Pattern")
if (csTypeName == "Pattern")
return CS_Pattern;
}
}
/trunk/Scribus/scribus/pdflib_core.cpp
8757,7 → 8757,7
}
}
 
PdfId PDFLibCore::PDF_RadioButton(PageItem* ite, PdfId parent, QString parentName)
PdfId PDFLibCore::PDF_RadioButton(PageItem* ite, PdfId parent, const QString& parentName)
{
QMap<int, QByteArray> ind2PDFabr;
static const QByteArray bifonts[] = {"/Courier", "/Courier-Bold", "/Courier-Oblique", "/Courier-BoldOblique",
9747,7 → 9747,7
return WritePDFStream(tmp, objId);
}
 
void PDFLibCore::PDF_xForm(PdfId objNr, double w, double h, QByteArray im)
void PDFLibCore::PDF_xForm(PdfId objNr, double w, double h, const QByteArray& im)
{
writer.startObj(objNr);
PutDoc("<<\n/Type /XObject\n/Subtype /Form\n");
10141,7 → 10141,7
case PoDoFo::ePdfDataType_Dictionary:
{
const PoDoFo::PdfDictionary& dict(obj->GetDictionary());
const PoDoFo::TKeyMap keys = dict.GetKeys();
const PoDoFo::TKeyMap& keys = dict.GetKeys();
PutDoc("<<");
for (PoDoFo::TCIKeyMap k=keys.begin(); k != keys.end(); ++k)
{
/trunk/Scribus/scribus/pdflib_core.h
218,10 → 218,10
bool PDF_3DAnnotation(PageItem *ite, uint PNr);
#endif
void PDF_RadioButtons();
uint PDF_RadioButton(PageItem *ite, uint parent, QString parentName);
uint PDF_RadioButton(PageItem *ite, uint parent, const QString& parentName);
bool PDF_Annotation(PageItem *ite, uint PNr);
void PDF_Form(const QByteArray& im);
void PDF_xForm(uint objNr, double w, double h, QByteArray im);
void PDF_xForm(uint objNr, double w, double h, const QByteArray& im);
bool PDF_Image(PageItem* c, const QString& fn, double sx, double sy, double x, double y, bool fromAN = false, const QString& Profil = "", bool Embedded = false, eRenderIntent Intent = Intent_Relative_Colorimetric, QByteArray* output = nullptr);
bool PDF_EmbeddedPDF(PageItem* c, const QString& fn, double sx, double sy, double x, double y, bool fromAN, ShIm& imgInfo, bool &fatalError);
#if HAVE_PODOFO
/trunk/Scribus/scribus/pdfoptionsio.cpp
28,7 → 28,7
// because we don't want to clobber the output file until we know the
// data has been generated ok, and we can't avoid clobbering the file
// to create a QTextStream().
bool PDFOptionsIO::writeTo(QString outFileName, bool includePasswords)
bool PDFOptionsIO::writeTo(const QString& outFileName, bool includePasswords)
{
m_includePasswords = includePasswords;
QString xml(buildXMLString());
180,7 → 180,7
// Convenience functions to add a single-attribute element
// of a particular type to the tree at a given point.
 
void PDFOptionsIO::addElem(QDomElement& addTo, QString name, bool value)
void PDFOptionsIO::addElem(QDomElement& addTo, const QString& name, bool value)
{
QDomElement elem = m_doc.createElement(name);
elem.setAttribute("value", value ? "true" : "false" );
187,7 → 187,7
addTo.appendChild(elem);
}
 
void PDFOptionsIO::addElem(QDomElement& addTo, QString name, QString value)
void PDFOptionsIO::addElem(QDomElement& addTo, const QString& name, const QString& value)
{
QDomElement elem = m_doc.createElement(name);
elem.setAttribute("value",value);
194,7 → 194,7
addTo.appendChild(elem);
}
 
void PDFOptionsIO::addElem(QDomElement& addTo, QString name, int value)
void PDFOptionsIO::addElem(QDomElement& addTo, const QString& name, int value)
{
QDomElement elem = m_doc.createElement(name);
elem.setAttribute("value",value);
201,7 → 201,7
addTo.appendChild(elem);
}
 
void PDFOptionsIO::addElem(QDomElement& addTo, QString name, double value)
void PDFOptionsIO::addElem(QDomElement& addTo, const QString& name, double value)
{
QDomElement elem = m_doc.createElement(name);
elem.setAttribute("value",value);
210,7 → 210,7
 
// Save a QValueList<String> or QStringList as a list of
// <item value=""> elements
void PDFOptionsIO::addList(QDomElement& addTo, QString name, QList<QString>& value)
void PDFOptionsIO::addList(QDomElement& addTo, const QString& name, QList<QString>& value)
{
// List base element has no attributes, only children
QDomElement listbase = m_doc.createElement(name);
293,7 → 293,7
}
 
// overload of bool readFrom(QTextStream& inStream)
bool PDFOptionsIO::readFrom(QString inFileName)
bool PDFOptionsIO::readFrom(const QString& inFileName)
{
QFile f(inFileName);
if (!f.open(QIODevice::ReadOnly))
500,12 → 500,12
m_opts->FontEmbedding = PDFOptions::EmbedFonts;
return true;
}
else if (embeddingMode == "OutlineFonts")
if (embeddingMode == "OutlineFonts")
{
m_opts->FontEmbedding = PDFOptions::OutlineFonts;
return true;
}
else if (embeddingMode == "DontEmbed")
if (embeddingMode == "DontEmbed")
{
m_opts->FontEmbedding = PDFOptions::DontEmbed;
return true;
518,7 → 518,7
}
 
// returns a null node on failure
QDomNode PDFOptionsIO::getUniqueNode(QDomElement& parent, QString name)
QDomNode PDFOptionsIO::getUniqueNode(QDomElement& parent, const QString& name)
{
QDomNodeList nodes = parent.elementsByTagName(name);
if (nodes.count() != 1)
534,7 → 534,7
 
// Return the node as a QDomElement iff it is a QDomElement with
// a `value' attribute; otherwise return a null element.
QDomElement PDFOptionsIO::getValueElement(QDomNode& node, QString name, bool isValue)
QDomElement PDFOptionsIO::getValueElement(QDomNode& node, const QString& name, bool isValue)
{
if (node.isNull())
{
576,7 → 576,7
return elem;
}
 
bool PDFOptionsIO::readElem(QDomElement& parent, QString name, bool* value)
bool PDFOptionsIO::readElem(QDomElement& parent, const QString& name, bool* value)
{
QDomNode node = getUniqueNode(parent, name);
QDomElement elem = getValueElement(node, name);
603,7 → 603,7
}
}
 
bool PDFOptionsIO::readElem(QDomElement& parent, QString name, int* value)
bool PDFOptionsIO::readElem(QDomElement& parent, const QString& name, int* value)
{
QDomNode node = getUniqueNode(parent, name);
QDomElement elem = getValueElement(node, name);
624,7 → 624,7
return ok;
}
 
bool PDFOptionsIO::readElem(QDomElement& parent, QString name, double* value)
bool PDFOptionsIO::readElem(QDomElement& parent, const QString& name, double* value)
{
QDomNode node = getUniqueNode(parent, name);
QDomElement elem = getValueElement(node, name);
645,7 → 645,7
return ok;
}
 
bool PDFOptionsIO::readElem(QDomElement& parent, QString name, QString* value)
bool PDFOptionsIO::readElem(QDomElement& parent, const QString& name, QString* value)
{
QDomNode node = getUniqueNode(parent, name);
QDomElement elem = getValueElement(node, name);
659,7 → 659,7
}
 
// Read a stringlist saved as a list of child <item value=""> elements
bool PDFOptionsIO::readList(QDomElement& parent, QString name, QList<QString>* value)
bool PDFOptionsIO::readList(QDomElement& parent, const QString& name, QList<QString>* value)
{
QDomNode basenode = getUniqueNode(parent, name);
QDomElement listbase = getValueElement(basenode, name, false);
/trunk/Scribus/scribus/pdfoptionsio.h
63,7 → 63,7
* @return True for success.
*/
bool writeTo(QIODevice& outDevice, bool includePasswords = false);
bool writeTo(QString outFileName, bool includePasswords = false);
bool writeTo(const QString& outFileName, bool includePasswords = false);
 
/**
* @brief Load the PDF settings from a file or other data stream, overwriting
77,7 → 77,7
* @return True for success.
*/
bool readFrom(QIODevice& inStream);
bool readFrom(QString inFileName);
bool readFrom(const QString& inFileName);
 
/**
* @brief Return human-readable explanation of last error.
97,11 → 97,11
 
// Helper functions. Add elements under the root element
// with a single attribute "value=" set to the passed value.
void addElem(QDomElement& addTo, QString name, bool value);
void addElem(QDomElement& addTo, QString name, QString value);
void addElem(QDomElement& addTo, QString name, int value);
void addElem(QDomElement& addTo, QString name, double value);
void addList(QDomElement& addTo, QString name, QList<QString>& value);
void addElem(QDomElement& addTo, const QString& name, bool value);
void addElem(QDomElement& addTo, const QString& name, const QString& value);
void addElem(QDomElement& addTo, const QString& name, int value);
void addElem(QDomElement& addTo, const QString& name, double value);
void addList(QDomElement& addTo, const QString& name, QList<QString>& value);
 
// Helper: add the PresentVals data to the document
void addPresentationData();
114,11 → 114,11
// Helper functions. Read various single elements into variables
// All of these return true for success. On failure, the passed
// value pointer is undefined.
bool readElem(QDomElement& parent, QString name, bool* value);
bool readElem(QDomElement& parent, QString name, int* value);
bool readElem(QDomElement& parent, QString name, double* value);
bool readElem(QDomElement& parent, QString name, QString* value);
bool readList(QDomElement& parent, QString name, QList<QString>* value);
bool readElem(QDomElement& parent, const QString& name, bool* value);
bool readElem(QDomElement& parent, const QString& name, int* value);
bool readElem(QDomElement& parent, const QString& name, double* value);
bool readElem(QDomElement& parent, const QString& name, QString* value);
bool readList(QDomElement& parent, const QString& name, QList<QString>* value);
 
bool readPDFVersion();
bool readPDFFontEmbeddingMode();
126,12 → 126,12
bool readLPISettings();
 
// Returns the named node under `parent' iff it's unique
QDomNode getUniqueNode(QDomElement& parent, QString name);
QDomNode getUniqueNode(QDomElement& parent, const QString& name);
 
// Return a QDomElement corresponding to the passed node, ensuring it's a
// valid element, the only one of its name under `parent', it has name
// `name', and (by default) has a `value' attribute.
QDomElement getValueElement(QDomNode& node, QString name, bool isValue = true);
QDomElement getValueElement(QDomNode& node, const QString& name, bool isValue = true);
 
// The QDomDocument used by the class for all its XML work
QDomDocument m_doc;
/trunk/Scribus/scribus/pdfwriter.cpp
340,7 → 340,7
}
QByteArray toLiteralString(QString s)
QByteArray toLiteralString(const QString& s)
{
return toLiteralString(toPdfDocEncoding(s));
}
427,7 → 427,7
}
QByteArray toName(QString s)
QByteArray toName(const QString& s)
{
return toName(toPdfDocEncoding(s));
}
453,7 → 453,7
return result;
}
QByteArray toDateString(QDateTime dt)
QByteArray toDateString(const QDateTime& dt)
{
QString tmp = dt.toString("yyyy:MM:dd:HH:mm:ss");
tmp = tmp.replace(":", "");
/trunk/Scribus/scribus/pdfwriter.h
94,7 → 94,7
Cf. PDF32000-2008, 7.3.4.2
*/
QByteArray toLiteralString(QByteArray s);
QByteArray toLiteralString(QString s);
QByteArray toLiteralString(const QString& s);
/**
convert to PDF hex string in <> brackets. Cf. PDF32000-2008, 7.3.4.3
122,12 → 122,12
Cf. PDF32000-2008, 7.3.5
*/
QByteArray toName(QByteArray s);
QByteArray toName(QString s);
QByteArray toName(const QString& s);
 
/**
converts to a PDF date string, cf. PDF32000-2008, 8.9.4
*/
QByteArray toDateString(QDateTime dt);
QByteArray toDateString(const QDateTime& dt);
/**
converts to a PDF rectangle, cf. PDF32000-2008, 8.9.5
/trunk/Scribus/scribus/pluginmanager.cpp
49,7 → 49,7
{
}
 
void* PluginManager::loadDLL( QString plugin )
void* PluginManager::loadDLL( const QString& plugin )
{
void* lib = nullptr;
#ifdef HAVE_DLFCN_H
120,7 → 120,7
prefs->set(it.value().pluginName, it.value().enableOnStartup);
}
 
QString PluginManager::getPluginName(QString fileName)
QString PluginManager::getPluginName(const QString& fileName)
{
// Must return plugin name. Note that this may be platform dependent;
// it's likely to need some adjustment for platform naming schemes.
143,7 → 143,7
return baseName.toLatin1();
}
 
int PluginManager::initPlugin(const QString fileName)
int PluginManager::initPlugin(const QString& fileName)
{
PluginData pda;
pda.pluginFile = QString("%1/%2").arg(ScPaths::instance().pluginDir(), fileName);
476,7 → 476,7
}
}
 
bool PluginManager::DLLexists(QString name, bool includeDisabled) const
bool PluginManager::DLLexists(const QString& name, bool includeDisabled) const
{
// the plugin name must be known
if (pluginMap.contains(name))
/trunk/Scribus/scribus/pluginmanager.h
45,7 → 45,7
/*! \brief Static methods for loading, unloading plugins and resolving symbols
These methods are platform independent, but each platform uses a different
implementation. */
static void* loadDLL( QString plugin );
static void* loadDLL(const QString& plugin );
static void* resolveSym( void* plugin, const char* sym );
static void unloadDLL( void* plugin );
 
82,7 → 82,7
* \param includeDisabled return true if a plugin is loaded but not enabled
* \return bool
*/
bool DLLexists(QString pluginName, bool includeDisabled = false) const;
bool DLLexists(const QString& pluginName, bool includeDisabled = false) const;
 
/*! \brief Returns a pointer to the requested plugin, or 0 if not found.
*
182,13 → 182,13
\param fileName a filename of the plugin without path
\retval int 0 init failed, 1 loaded.
*/
int initPlugin(const QString fileName);
int initPlugin(const QString& fileName);
 
/*! \brief Reads available info and fills PluginData structure */
bool loadPlugin(PluginData & pluginData);
 
/*! \brief Determines the plugin name from the file name and returns it. */
static QString getPluginName(QString fileName);
static QString getPluginName(const QString& fileName);
 
/*! \brief Called by loadPlugin to hook the loaded plugin into the GUI,
call its setup routine, etc. Not responsible for creating
/trunk/Scribus/scribus/plugins/barcodegenerator/barcode.cpp
76,7 → 76,7
delete about;
}
 
bool Barcode::run(ScribusDoc* doc, QString /*target*/ )
bool Barcode::run(ScribusDoc* doc, const QString& /*target*/ )
{
if (!doc || !ScCore->haveGS())
return false;
/trunk/Scribus/scribus/plugins/barcodegenerator/barcode.h
24,7 → 24,7
virtual ~Barcode();
/*! \brief run the plug
\param target none usage here */
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
605,7 → 605,7
ui.eccCombo->blockSignals(false);
}
 
void BarcodeGenerator::updatePreview(QString errorMsg)
void BarcodeGenerator::updatePreview(const QString& errorMsg)
{
QString pngFile = QDir::toNativeSeparators(ScPaths::tempFileDir() + "bcode.png");
if (errorMsg=="")
/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.h
141,7 → 141,7
 
protected slots:
void paintBarcode();
void updatePreview(QString);
void updatePreview(const QString&);
void bcFamilyComboChanged();
void bcComboChanged();
void bcComboChanged(int);
/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegeneratorrenderthread.cpp
31,7 → 31,7
wait();
}
 
void BarcodeGeneratorRenderThread::render(QString psCommand)
void BarcodeGeneratorRenderThread::render(const QString& psCommand)
{
QMutexLocker locker(&mutex);
 
/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegeneratorrenderthread.h
20,7 → 20,7
public:
BarcodeGeneratorRenderThread(QObject *parent = 0);
~BarcodeGeneratorRenderThread();
void render(QString);
void render(const QString&);
 
signals:
void renderedImage(QString);
/trunk/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
79,7 → 79,7
}
 
/** Create dialog. Everything else is handled in separated classes. */
bool ColorWheelPlugin::run(ScribusDoc* doc, QString target)
bool ColorWheelPlugin::run(ScribusDoc* doc, const QString& target)
{
Q_ASSERT(target.isNull());
ScribusDoc* currDoc=doc;
/trunk/Scribus/scribus/plugins/colorwheel/colorwheel.h
27,7 → 27,7
// Standard plugin implementation
ColorWheelPlugin();
virtual ~ColorWheelPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/export/pixmapexport/export.cpp
94,7 → 94,7
delete about;
}
 
bool PixmapExportPlugin::run(ScribusDoc* doc, QString target)
bool PixmapExportPlugin::run(ScribusDoc* doc, const QString& target)
{
Q_ASSERT(target.isEmpty());
Q_ASSERT(!doc->masterPageMode());
/trunk/Scribus/scribus/plugins/export/pixmapexport/export.h
23,7 → 23,7
// Standard plugin implementation
PixmapExportPlugin();
virtual ~PixmapExportPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
124,7 → 124,7
delete about;
}
 
bool SVGExportPlugin::run(ScribusDoc* doc, QString filename)
bool SVGExportPlugin::run(ScribusDoc* doc, const QString& filename)
{
Q_ASSERT(filename.isEmpty());
QString fileName;
2369,7 → 2369,7
return cc.arg(mat.m11()).arg(mat.m12()).arg(mat.m21()).arg(mat.m22()).arg(mat.dx()).arg(mat.dy());
}
 
QString SVGExPlug::SetColor(QString farbe, int shad)
QString SVGExPlug::SetColor(const QString& farbe, int shad)
{
if (farbe == CommonStrings::None)
return "#FFFFFF";
/trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.h
42,7 → 42,7
\param filename a file to export to
\retval bool true
*/
virtual bool run(ScribusDoc* doc=0, QString filename = QString::null);
virtual bool run(ScribusDoc* doc=0, const QString& filename = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
128,7 → 128,7
\retval QString Colour settings
*/
QString MatrixToStr(QTransform &mat);
QString SetColor(QString farbe, int shad);
QString SetColor(const QString& farbe, int shad);
/*!
\author Franz Schmid
\param sl struct SingleLine *
/trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
82,7 → 82,7
 
using namespace TableUtils;
 
XPSExportPlugin::XPSExportPlugin() : ScActionPlugin()
XPSExportPlugin::XPSExportPlugin()
{
// Set action info in languageChange, so we only have to do
// it in one place.
127,7 → 127,7
delete about;
}
 
bool XPSExportPlugin::run(ScribusDoc* doc, QString filename)
bool XPSExportPlugin::run(ScribusDoc* doc, const QString& filename)
{
Q_ASSERT(filename.isEmpty());
QString fileName;
213,7 → 213,7
m_dpi = 300.0;
}
 
bool XPSExPlug::doExport(QString fName)
bool XPSExPlug::doExport(const QString& fName)
{
zip = new ScZipHandler(true);
if (!zip->open(fName))
/trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.h
44,7 → 44,7
\param filename a file to export to
\retval bool true
*/
virtual bool run(ScribusDoc* doc=0, QString filename = QString::null);
virtual bool run(ScribusDoc* doc=0, const QString& filename = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
70,7 → 70,7
XPSExPlug(ScribusDoc* doc, int output_res);
~XPSExPlug();
 
bool doExport(QString fName);
bool doExport(const QString& fName);
 
private:
void writePages(QDomElement &root);
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
48,8 → 48,7
// Please don't implement the functionality of your plugin here; do that
// in scribus134formatimpl.h and scribus134formatimpl.cpp .
 
Scribus134Format::Scribus134Format() :
LoadSavePlugin()
Scribus134Format::Scribus134Format()
{
itemCount = itemCountM = 0;
legacyStyleCount = 0;
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
6951,7 → 6951,7
{
TextNote* note = it.value();
assert(note != nullptr);
QString mrkLabel = it.key();
const QString& mrkLabel = it.key();
Mark* mrk = m_Doc->getMark(mrkLabel, MARKNoteMasterType);
if (mrk == nullptr)
{
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
620,7 → 620,7
}
}
 
void Scribus150Format::writeGradients(ScXmlStreamWriter & docu, bool part)
void Scribus150Format::writeGradients(ScXmlStreamWriter& docu, bool part)
{
QHash<QString, VGradient>::Iterator itGrad;
QHash<QString, VGradient> gradMap;
634,7 → 634,7
docu.writeAttribute("Name",itGrad.key());
VGradient gra = itGrad.value();
docu.writeAttribute("Ext", gra.repeatMethod());
QList<VColorStop*> cstops = gra.colorStops();
const QList<VColorStop*>& cstops = gra.colorStops();
for (int cst = 0; cst < gra.Stops(); ++cst)
{
docu.writeEmptyElement("CSTOP");
647,7 → 647,7
}
}
 
void Scribus150Format::writeHyphenatorLists(ScXmlStreamWriter &docu)
void Scribus150Format::writeHyphenatorLists(ScXmlStreamWriter& docu)
{
docu.writeStartElement("HYPHEN");
for (QHash<QString, QString>::Iterator hyit = m_Doc->docHyphenator->specialWords.begin(); hyit != m_Doc->docHyphenator->specialWords.end(); ++hyit)
910,7 → 910,7
docu.writeAttribute("FillShade", style.fillShade());
if ( ! style.isInhLeftBorder())
{
TableBorder tbLeft = style.leftBorder();
const TableBorder& tbLeft = style.leftBorder();
docu.writeStartElement("TableBorderLeft");
for (const TableBorderLine& tbl : tbLeft.borderLines())
{
925,7 → 925,7
}
if ( ! style.isInhRightBorder())
{
TableBorder tbRight = style.rightBorder();
const TableBorder& tbRight = style.rightBorder();
docu.writeStartElement("TableBorderRight");
for (const TableBorderLine& tbl : tbRight.borderLines())
{
940,7 → 940,7
}
if ( ! style.isInhTopBorder())
{
TableBorder tbTop = style.topBorder();
const TableBorder& tbTop = style.topBorder();
docu.writeStartElement("TableBorderTop");
for (const TableBorderLine& tbl : tbTop.borderLines())
{
955,7 → 955,7
}
if ( ! style.isInhBottomBorder())
{
TableBorder tbBottom = style.bottomBorder();
const TableBorder& tbBottom = style.bottomBorder();
docu.writeStartElement("TableBorderBottom");
for (const TableBorderLine& tbl : tbBottom.borderLines())
{
992,7 → 992,7
docu.writeAttribute("BottomPadding", style.bottomPadding());
if ( ! style.isInhLeftBorder())
{
TableBorder tbLeft = style.leftBorder();
const TableBorder& tbLeft = style.leftBorder();
docu.writeStartElement("TableBorderLeft");
for (const TableBorderLine& tbl : tbLeft.borderLines())
{
1007,7 → 1007,7
}
if ( ! style.isInhRightBorder())
{
TableBorder tbRight = style.rightBorder();
const TableBorder& tbRight = style.rightBorder();
docu.writeStartElement("TableBorderRight");
for (const TableBorderLine& tbl : tbRight.borderLines())
{
1022,7 → 1022,7
}
if ( ! style.isInhTopBorder())
{
TableBorder tbTop = style.topBorder();
const TableBorder& tbTop = style.topBorder();
docu.writeStartElement("TableBorderTop");
for (const TableBorderLine& tbl : tbTop.borderLines())
{
1037,7 → 1037,7
}
if ( ! style.isInhBottomBorder())
{
TableBorder tbBottom = style.bottomBorder();
const TableBorder& tbBottom = style.bottomBorder();
docu.writeStartElement("TableBorderBottom");
for (const TableBorderLine& tbl : tbBottom.borderLines())
{
/trunk/Scribus/scribus/plugins/fontpreview/fontpreview.cpp
89,8 → 89,7
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelButton_clicked()));
connect(resetDisplayButton, SIGNAL(clicked()), this, SLOT(resetDisplayButton_clicked()));
connect(sizeSpin, SIGNAL(valueChanged(int)), this, SLOT(sizeSpin_valueChanged(int)));
connect(fontList->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)),
this, SLOT(fontList_currentChanged(const QModelIndex &, const QModelIndex &)));
connect(fontList->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(fontList_currentChanged(const QModelIndex&, const QModelIndex&)));
connect(extendedCheckBox, SIGNAL(clicked(bool)), this, SLOT(setExtendedView(bool)));
}
 
/trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.cpp
30,7 → 30,7
delete plug;
}
 
FontPreviewPlugin::FontPreviewPlugin() : ScActionPlugin()
FontPreviewPlugin::FontPreviewPlugin()
{
// Set action info in languageChange, so we only have to do
// it in one place.
82,13 → 82,13
/**
Create dialog and insert font into Style menu when user accepts.
*/
bool FontPreviewPlugin::run(ScribusDoc* doc, QString target)
bool FontPreviewPlugin::run(ScribusDoc* doc, const QString& target)
{
ScribusMainWindow* scmw=(doc==nullptr)?ScCore->primaryMainWindow():doc->scMW();
return run(scmw, doc, target);
}
 
bool FontPreviewPlugin::run(QWidget* parent, ScribusDoc* doc, QString target)
bool FontPreviewPlugin::run(QWidget* parent, ScribusDoc* doc, const QString& target)
{
if (doc==nullptr)
return false;
/trunk/Scribus/scribus/plugins/fontpreview/fontpreviewplugin.h
20,8 → 20,8
// Standard plugin implementation
FontPreviewPlugin();
virtual ~FontPreviewPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(QWidget *parent, ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual bool run(QWidget *parent, ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/gettext/csvim/csvim.cpp
21,13 → 21,12
return QStringList("csv");
}
 
void GetText(QString filename, QString encoding, bool /* textOnly */, gtWriter *writer)
void GetText(const QString& filename, const QString& encoding, bool /* textOnly */, gtWriter *writer)
{
CsvDialog* csvdia = new CsvDialog();
if (csvdia->exec())
{
CsvIm *cim = new CsvIm(filename, encoding, writer, csvdia->getFDelim(), csvdia->getVDelim(),
csvdia->hasHeader(), csvdia->useVDelim());
CsvIm *cim = new CsvIm(filename, encoding, writer, csvdia->getFDelim(), csvdia->getVDelim(), csvdia->hasHeader(), csvdia->useVDelim());
cim->write();
delete cim;
}
/trunk/Scribus/scribus/plugins/gettext/csvim/csvim.h
19,7 → 19,7
class gtParagraphStyle;
class gtWriter;
 
extern "C" PLUGIN_API void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer);
extern "C" PLUGIN_API void GetText(const QString& filename, const QString& encoding, bool textOnly, gtWriter *writer);
 
extern "C" PLUGIN_API QString FileFormatName();
 
/trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
34,13 → 34,13
return QStringList("docx");
}
 
void GetText2(QString filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
{
DocXIm* docxim = new DocXIm(filename, textItem, textOnly, prefix, append);
delete docxim;
}
 
DocXIm::DocXIm(QString fileName, PageItem *textItem, bool textOnly, bool prefix, bool append)
DocXIm::DocXIm(const QString& fileName, PageItem *textItem, bool textOnly, bool prefix, bool append)
{
m_Doc = textItem->doc();
m_item = textItem;
666,7 → 666,7
}
}
 
QString DocXIm::getFontName(QString name)
QString DocXIm::getFontName(const QString& name)
{
QString fontName = name;
SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
/trunk/Scribus/scribus/plugins/gettext/docxim/docxim.h
22,7 → 22,7
#include <QHash>
class ScZipHandler;
 
extern "C" PLUGIN_API void GetText2(QString filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API QString FileFormatName();
extern "C" PLUGIN_API QStringList FileExtensions();
 
29,7 → 29,7
class DocXIm
{
public:
DocXIm(QString fileName, PageItem *textItem, bool textOnly, bool prefix, bool append);
DocXIm(const QString& fileName, PageItem *textItem, bool textOnly, bool prefix, bool append);
~DocXIm();
private:
void parseContentTypes();
39,7 → 39,7
void parseParaProps(QDomElement &props, ParagraphStyle &pStyle);
void parseCharProps(QDomElement &props, ParagraphStyle &pStyle);
void parsePlainTextOnly(PageItem *textItem);
QString getFontName(QString name);
QString getFontName(const QString& name);
double pixelsFromTwips(double twips);
QString themePart;
QString docPart;
/trunk/Scribus/scribus/plugins/gettext/htmlim/htmlim.cpp
50,7 → 50,7
return endings;
}
 
void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer)
void GetText(const QString& filename, const QString& encoding, bool textOnly, gtWriter *writer)
{
HTMLIm* him = new HTMLIm(filename, encoding, writer, textOnly);
delete him;
58,7 → 58,7
 
/******** Class HTMLIm ************************************/
 
HTMLIm::HTMLIm(QString fname, QString coding, gtWriter *w, bool textOnly)
HTMLIm::HTMLIm(const QString& fname, const QString& coding, gtWriter *w, bool textOnly)
{
filename = fname;
encoding = coding;
/trunk/Scribus/scribus/plugins/gettext/htmlim/htmlim.h
32,7 → 32,7
#include "scconfig.h"
#include "pluginapi.h"
 
extern "C" PLUGIN_API void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer);
extern "C" PLUGIN_API void GetText(const QString& filename, const QString& encoding, bool textOnly, gtWriter *writer);
 
extern "C" PLUGIN_API QString FileFormatName();
 
43,7 → 43,7
class HTMLIm
{
public:
HTMLIm(QString fname, QString encoding, gtWriter *w, bool textOnly);
HTMLIm(const QString& fname, const QString& encoding, gtWriter *w, bool textOnly);
~HTMLIm();
private:
QString encoding;
/trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
616,7 → 616,7
pstylepre->getFont()->setWeight(defaultWeight);
}
 
void HTMLReader::parse(QString filename)
void HTMLReader::parse(const QString& filename)
{
#if defined(_WIN32)
QString fname = QDir::toNativeSeparators(filename);
/trunk/Scribus/scribus/plugins/gettext/htmlim/htmlreader.h
104,7 → 104,7
public:
HTMLReader(gtParagraphStyle *ps, gtWriter *w, bool textOnly);
~HTMLReader();
void parse(QString filename);
void parse(const QString& filename);
static void startElement(void *user_data, const xmlChar * fullname, const xmlChar ** atts);
static void endElement(void *user_data, const xmlChar * name);
static void characters(void *user_data, const xmlChar * ch, int len);
/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
41,13 → 41,13
return ret;
}
 
void GetText2(QString filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
{
ODTIm* docxim = new ODTIm(filename, textItem, textOnly, prefix, append);
delete docxim;
}
 
ODTIm::ODTIm(QString fileName, PageItem *textItem, bool textOnly, bool prefix, bool append)
ODTIm::ODTIm(const QString& fileName, PageItem *textItem, bool textOnly, bool prefix, bool append)
{
uz=nullptr;
m_Doc = textItem->doc();
139,7 → 139,7
 
/* Raw Text import */
 
bool ODTIm::parseRawDocReference(QString designMap)
bool ODTIm::parseRawDocReference(const QString& designMap)
{
QByteArray f;
QDomDocument designMapDom;
316,7 → 316,7
 
/* Styled Text import */
 
bool ODTIm::parseStyleSheets(QString designMap)
bool ODTIm::parseStyleSheets(const QString& designMap)
{
QByteArray f;
QDomDocument designMapDom;
368,7 → 368,7
return true;
}
 
void ODTIm::parseStyles(QDomElement &sp, QString type)
void ODTIm::parseStyles(QDomElement &sp, const QString& type)
{
for (QDomElement spd = sp.firstChildElement(); !spd.isNull(); spd = spd.nextSiblingElement() )
{
580,7 → 580,7
}
}
 
bool ODTIm::parseDocReference(QString designMap)
bool ODTIm::parseDocReference(const QString& designMap)
{
QByteArray f;
QDomDocument designMapDom;
962,7 → 962,7
tmpStyle.setTabValues(oStyle.tabStops);
}
 
void ODTIm::resolveStyle(ObjStyleODT &tmpOStyle, QString pAttrs)
void ODTIm::resolveStyle(ObjStyleODT &tmpOStyle, const QString& pAttrs)
{
if (m_Styles.contains(pAttrs))
{
1325,7 → 1325,7
return ret;
}
 
QString ODTIm::constructFontName(QString fontBaseName, QString fontStyle)
QString ODTIm::constructFontName(const QString& fontBaseName, const QString& fontStyle)
{
QString fontName;
SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.h
25,7 → 25,7
 
class ScZipHandler;
 
extern "C" PLUGIN_API void GetText2(QString filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API QString FileFormatName();
extern "C" PLUGIN_API QStringList FileExtensions();
 
93,7 → 93,7
class ODTIm
{
public:
ODTIm(QString fileName, PageItem *textItem, bool textOnly, bool prefix, bool append);
ODTIm(const QString& fileName, PageItem *textItem, bool textOnly, bool prefix, bool append);
~ODTIm();
private:
struct DrawStyle
130,16 → 130,16
AttributeValue breakBefore;
AttributeValue breakAfter;
};
bool parseRawDocReference(QString designMap);
bool parseRawDocReference(const QString& designMap);
bool parseRawDocReferenceXML(QDomDocument &designMapDom);
void parseRawTextSpan(QDomElement &elem, PageItem* item, ParagraphStyle &tmpStyle, CharStyle &tmpCStyle, int &posC);
void parseRawTextParagraph(QDomNode &elem, PageItem* item, ParagraphStyle &newStyle, int &posC);
void parseRawText(QDomElement &elem, PageItem* item);
 
bool parseStyleSheets(QString designMap);
bool parseStyleSheets(const QString& designMap);
bool parseStyleSheetsXML(QDomDocument &designMapDom);
void parseStyles(QDomElement &sp, QString type);
bool parseDocReference(QString designMap);
void parseStyles(QDomElement &sp, const QString& type);
bool parseDocReference(const QString& designMap);
bool parseDocReferenceXML(QDomDocument &designMapDom);
void parseTextSpan(QDomElement &elem, PageItem* item, ParagraphStyle &tmpStyle, CharStyle &tmpCStyle, ObjStyleODT& tmpOStyle, int &posC);
void parseTextParagraph(QDomNode &elem, PageItem* item, ParagraphStyle &newStyle, ObjStyleODT &tmpOStyle, int &posC);
147,11 → 147,11
void insertChars(PageItem *item, QString &txt, ParagraphStyle &tmpStyle, CharStyle &tmpCStyle, int &posC);
void applyCharacterStyle(CharStyle &tmpCStyle, ObjStyleODT &oStyle);
void applyParagraphStyle(ParagraphStyle &tmpStyle, ObjStyleODT &oStyle);
void resolveStyle(ObjStyleODT &tmpOStyle, QString pAttrs);
void resolveStyle(ObjStyleODT &tmpOStyle, const QString& pAttrs);
double parseUnit(const QString &unit);
QColor parseColorN( const QString &rgbColor );
QString parseColor( const QString &s );
QString constructFontName(QString fontBaseName, QString fontStyle);
QString constructFontName(const QString& fontBaseName, const QString& fontStyle);
void setFontstyle(CharStyle &tmpCStyle, int kind);
ScZipHandler *uz;
ScribusDoc* m_Doc;
/trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
41,7 → 41,7
return QStringList("pdb");
}
 
void GetText(QString filename, QString encoding, bool /* textOnly */, gtWriter *writer)
void GetText(const QString& filename, const QString& encoding, bool /* textOnly */, gtWriter *writer)
{
if (filename.isNull())
return;
88,7 → 88,7
writer->appendUnstyled(data);
}
 
void PdbIm::loadFile(QString fname)
void PdbIm::loadFile(const QString& fname)
{
FILE *m_pdfp = fopen(fname.toLocal8Bit(), "rb");
pdb_header m_header;
/trunk/Scribus/scribus/plugins/gettext/pdbim/pdbim.h
14,7 → 14,7
class QString;
class QStringList;
 
extern "C" PLUGIN_API void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer);
extern "C" PLUGIN_API void GetText(const QString& filename, const QString& encoding, bool textOnly, gtWriter *writer);
 
extern "C" PLUGIN_API QString FileFormatName();
 
139,7 → 139,7
/*! \brief Parse the PDB file.
\param fname a filename to open */
void loadFile(QString fname);
void loadFile(const QString& fname);
/*! \brief Learn which endian to use.
It fills the m_littlendian flag */
void selectSwap();
/trunk/Scribus/scribus/plugins/gettext/rtfim/rtfim.cpp
30,7 → 30,7
return QStringList("rtf");
}
 
void GetText2(QString filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
{
QFile f(filename);
if (f.open(QIODevice::ReadOnly))
/trunk/Scribus/scribus/plugins/gettext/rtfim/rtfim.h
18,7 → 18,7
 
#include <QString>
 
extern "C" PLUGIN_API void GetText2(QString filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API QString FileFormatName();
extern "C" PLUGIN_API QStringList FileExtensions();
 
/trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
36,7 → 36,7
 
extern xmlSAXHandlerPtr cSAXHandler;
 
ContentReader::ContentReader(QString documentName, StyleReader *s, gtWriter *w, bool textOnly)
ContentReader::ContentReader(const QString& documentName, StyleReader *s, gtWriter *w, bool textOnly)
{
creader = this;
docname = documentName;
270,7 → 270,7
lastStyle = currentStyle;
}
 
void ContentReader::parse(QString fileName)
void ContentReader::parse(const QString& fileName)
{
sreader->parse(fileName);
#if defined(_WIN32)
/trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.h
77,7 → 77,7
QString getName();
void getStyle();
public:
ContentReader(QString documentName, StyleReader* s, gtWriter *w, bool textOnly);
ContentReader(const QString& documentName, StyleReader* s, gtWriter *w, bool textOnly);
~ContentReader();
static void startElement(void *user_data, const xmlChar *fullname, const xmlChar ** atts);
static void endElement(void *user_data, const xmlChar *name);
85,7 → 85,7
bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
bool endElement(const QString&, const QString&, const QString &name);
bool characters(const QString &ch);
void parse(QString fileName);
void parse(const QString& fileName);
};
 
#endif // HAVE_XML
/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp
462,7 → 462,7
return true;
}
void StyleReader::parse(QString fileName)
void StyleReader::parse(const QString& fileName)
{
#if defined(_WIN32)
QString fname = QDir::toNativeSeparators(fileName);
/trunk/Scribus/scribus/plugins/gettext/sxwim/stylereader.h
77,7 → 77,7
static void endElement(void *user_data, const xmlChar * name);
bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
bool endElement(const QString&, const QString&, const QString &name);
void parse(QString fileName);
void parse(const QString& fileName);
gtStyle* getDefaultStyle(void);
gtStyle* getStyle(const QString& name);
void setStyle(const QString& name, gtStyle* style);
/trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.cpp
59,7 → 59,7
 
/********** Class SxwIm ************************************************************/
 
SxwIm::SxwIm(QString fileName, QString enc, gtWriter* w, bool textOnly)
SxwIm::SxwIm(const QString& fileName, const QString& enc, gtWriter* w, bool textOnly)
{
PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("SxwIm");
bool update = prefs->getBool("update", true);
/trunk/Scribus/scribus/plugins/gettext/sxwim/sxwim.h
44,7 → 44,7
class SxwIm
{
public:
SxwIm(QString fileName, QString encoding, gtWriter* w, bool textOnly);
SxwIm(const QString& fileName, const QString& encoding, gtWriter* w, bool textOnly);
~SxwIm();
 
private:
/trunk/Scribus/scribus/plugins/gettext/txtim/txtim.cpp
26,7 → 26,7
return QStringList("txt");
}
 
void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer)
void GetText(const QString& filename, const QString& encoding, bool textOnly, gtWriter *writer)
{
TxtIm* tim = new TxtIm(filename, encoding, textOnly, writer);
tim->write();
/trunk/Scribus/scribus/plugins/gettext/txtim/txtim.h
10,7 → 10,7
#include "pluginapi.h"
#include "gtwriter.h"
 
extern "C" PLUGIN_API void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer);
extern "C" PLUGIN_API void GetText(const QString& filename, const QString& encoding, bool textOnly, gtWriter *writer);
 
extern "C" PLUGIN_API QString FileFormatName();
 
/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgim.cpp
37,7 → 37,7
return QStringList("xtg");
}
 
void GetText2(const QString& filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem)
{
XtgIm* xtgim = new XtgIm(textItem, textOnly, prefix, append);
xtgim->import(filename);
/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgim.h
36,7 → 36,7
class StyleManager;
class XtgScanner;
 
extern "C" PLUGIN_API void GetText2(const QString& filename, QString encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API void GetText2(const QString& filename, const QString& encoding, bool textOnly, bool prefix, bool append, PageItem *textItem);
extern "C" PLUGIN_API QString FileFormatName();
extern "C" PLUGIN_API QStringList FileExtensions();
 
/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
117,7 → 117,7
interactive = (flags & LoadSavePlugin::lfInteractive);
}
 
QImage AIPlug::readThumbnail(QString fNameIn)
QImage AIPlug::readThumbnail(const QString& fNameIn)
{
QString fName = fNameIn;
double x, y, b, h;
330,7 → 330,7
return success;
}
 
bool AIPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool AIPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
1203,19 → 1203,19
return ret;
}
 
QStringList AIPlug::getStrings(QString data)
QStringList AIPlug::getStrings(const QString& data)
{
QStringList result;
result.clear();
QChar tmp;
QString tmp2 = "";
QString tmp3 = "";
QString tmp2;
QString tmp3;
bool paran = false;
bool skip = false;
int digitCount = 0;
for (int a = 0; a < data.count(); a++)
for (int i = 0; i < data.count(); i++)
{
tmp = data[a];
tmp = data[i];
if (skip)
{
if (paran)
1268,7 → 1268,7
return result;
}
 
void AIPlug::getCommands(QString data, QStringList &commands)
void AIPlug::getCommands(const QString& data, QStringList &commands)
{
QString tmp;
QString tmp2;
1337,7 → 1337,7
}
}
 
void AIPlug::decodeA85(QByteArray &psdata, QString tmp)
void AIPlug::decodeA85(QByteArray &psdata, const QString& tmp)
{
uchar byte;
ushort data;
1395,7 → 1395,7
}
}
 
void AIPlug::processData(QString data)
void AIPlug::processData(const QString& data)
{
double x, y, x1, y1, x2, y2;
int z, tmpInt;
2630,10 → 2630,10
}
}
 
void AIPlug::processGradientData(QString data)
void AIPlug::processGradientData(const QString& data)
{
QString command = "";
QString Cdata = "";
QString command;
QString Cdata;
QStringList da;
getCommands(data, da);
for (int a = 0; a < da.count(); a++)
3119,7 → 3119,7
groupStack.top().append(ite);
}
 
void AIPlug::processComment(QDataStream &ts, QString comment)
void AIPlug::processComment(QDataStream &ts, const QString& comment)
{
QString tmp = removeAIPrefix(comment);
if (tmp.startsWith("Begin_NonPrinting"))
3366,7 → 3366,7
}
}
 
bool AIPlug::convert(QString fn)
bool AIPlug::convert(const QString& fn)
{
QString tmp;
LineW = 1.0;
/trunk/Scribus/scribus/plugins/import/ai/importai.h
52,8 → 52,8
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
bool readColors(const QString& fileName, ColorList & colors);
 
private:
76,16 → 76,16
QString parseColorRGB(QString data);
QString parseCustomColor(QString data, double &shade);
QString parseCustomColorX(QString data, double &shade, const QString& type);
QStringList getStrings(QString data);
void getCommands(QString data, QStringList &commands);
void decodeA85(QByteArray &psdata, QString tmp);
void processData(QString data);
void processGradientData(QString data);
QStringList getStrings(const QString& data);
void getCommands(const QString& data, QStringList &commands);
void decodeA85(QByteArray &psdata, const QString& tmp);
void processData(const QString& data);
void processGradientData(const QString& data);
void processSymbol(QDataStream &ts, bool sym);
void processPattern(QDataStream &ts);
void processRaster(QDataStream &ts);
void processComment(QDataStream &ts, QString comment);
bool convert(QString fn);
void processComment(QDataStream &ts, const QString& comment);
bool convert(const QString& fn);
QList<PageItem*> Elements;
QList<PageItem*> PatternElements;
/trunk/Scribus/scribus/plugins/import/cdr/importcdr.cpp
123,9 → 123,8
return QImage();
}
 
bool CdrPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool CdrPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
132,7 → 131,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
218,7 → 217,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
/trunk/Scribus/scribus/plugins/import/cdr/importcdr.h
53,7 → 53,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
/trunk/Scribus/scribus/plugins/import/cdr/importcdrplugin.cpp
41,7 → 41,7
delete plug;
}
 
ImportCdrPlugin::ImportCdrPlugin() : LoadSavePlugin(),
ImportCdrPlugin::ImportCdrPlugin() :
importAction(new ScrAction(ScrAction::DLL, QPixmap(), QPixmap(), "", QKeySequence(), this))
{
// Set action info in languageChange, so we only have to do it in one
/trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
166,9 → 166,8
return QImage();
}
 
bool CgmPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool CgmPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
176,7 → 175,7
double b, h;
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
261,7 → 260,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
3295,7 → 3294,7
 
/* Start of core Functions common to both Decoders */
 
void CgmPlug::handleStartMetaFile(QString value)
void CgmPlug::handleStartMetaFile(const QString& value)
{
if (importerFlags & LoadSavePlugin::lfCreateDoc)
m_Doc->documentInfo().setTitle(value);
3302,7 → 3301,7
// qDebug() << "Start Metafile" << value;
}
 
void CgmPlug::handleStartPicture(QString value)
void CgmPlug::handleStartPicture(const QString& value)
{
pictName = value;
// qDebug() << "Start Picture" << value;
3383,7 → 3382,7
}
}
 
PageItem* CgmPlug::itemAdd(PageItem::ItemType itemType, PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, QString fill, QString stroke)
PageItem* CgmPlug::itemAdd(PageItem::ItemType itemType, PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& stroke)
{
int z;
if (lineVisible)
/trunk/Scribus/scribus/plugins/import/cgm/importcgm.h
72,7 → 72,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
109,8 → 109,8
void alignStreamToWord(QDataStream &ts, uint len);
 
/* core functions */
void handleStartMetaFile(QString value);
void handleStartPicture(QString value);
void handleStartMetaFile(const QString& value);
void handleStartPicture(const QString& value);
void handleStartPictureBody(double width, double height);
void handleMetaFileDescription(const QString& value);
QString handleColor(ScColor &color, const QString& proposedName);
117,7 → 117,7
double convertCoords(double input);
QPointF convertCoords(QPointF input);
void appendPath(QPainterPath &path1, QPainterPath &path2);
PageItem* itemAdd(PageItem::ItemType itemType, PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, QString fill, QString stroke);
PageItem* itemAdd(PageItem::ItemType itemType, PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& stroke);
void finishItem(PageItem* ite, bool line = true);
 
/* common variables */
/trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
120,9 → 120,8
return QImage();
}
 
bool CvgPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool CvgPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
130,7 → 129,7
double b, h;
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
164,7 → 163,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, b, h);
parseHeader(fNameIn, b, h);
if (b == 0.0)
b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
218,7 → 217,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
/trunk/Scribus/scribus/plugins/import/cvg/importcvg.h
51,7 → 51,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
137,9 → 137,8
return QImage();
}
 
bool DrwPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool DrwPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
146,7 → 145,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
233,7 → 232,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
1764,7 → 1763,7
// }
}
 
void DrwPlug::handleLineStyle(PageItem* currentItem, quint8 flags, QString lineColor)
void DrwPlug::handleLineStyle(PageItem* currentItem, quint8 flags, const QString& lineColor)
{
if ((flags & 0x0F) == 5)
currentItem->setLineColor(CommonStrings::None);
1782,7 → 1781,7
currentItem->setLineStyle(Qt::SolidLine);
}
 
void DrwPlug::handleGradient(PageItem* currentItem, quint8 patternIndex, QString fillColor, QString backColor, QRectF bBox)
void DrwPlug::handleGradient(PageItem* currentItem, quint8 patternIndex, const QString& fillColor, const QString& backColor, QRectF bBox)
{
if ((fillColor == CommonStrings::None) || (backColor == CommonStrings::None))
return;
1933,7 → 1932,7
thumbnailImage.loadFromData(header, "BMP");
}
 
QString DrwPlug::handleColor(ScColor &color, QString proposedName)
QString DrwPlug::handleColor(ScColor &color, const QString& proposedName)
{
QString tmpName = m_Doc->PageColors.tryAddColor(proposedName, color);
if (tmpName == proposedName)
/trunk/Scribus/scribus/plugins/import/drw/importdrw.h
59,7 → 59,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
67,10 → 67,10
void decodeCmdData(QDataStream &ts, uint dataLen, quint8 cmd);
void decodeCmd(quint8 cmd, int pos);
void decodeSymbol(QDataStream &ds, bool last = false);
void handleLineStyle(PageItem* currentItem, quint8 flags, QString lineColor);
void handleGradient(PageItem* currentItem, quint8 patternIndex, QString fillColor, QString backColor, QRectF bBox);
void handleLineStyle(PageItem* currentItem, quint8 flags, const QString& lineColor);
void handleGradient(PageItem* currentItem, quint8 patternIndex, const QString& fillColor, const QString& backColor, QRectF bBox);
void handlePreviewBitmap(QDataStream &ds);
QString handleColor(ScColor &color, QString proposedName);
QString handleColor(ScColor &color, const QString& proposedName);
void getCommonData(QDataStream &ds);
QString getColor(QDataStream &ds);
void finishItem(PageItem* ite, bool scale = true);
/trunk/Scribus/scribus/plugins/import/emf/importemf.cpp
465,7 → 465,7
interactive = (flags & LoadSavePlugin::lfInteractive);
}
 
QImage EmfPlug::readThumbnail(QString fName)
QImage EmfPlug::readThumbnail(const QString& fName)
{
QFileInfo fi = QFileInfo(fName);
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
564,7 → 564,6
 
bool EmfPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
571,7 → 570,7
cancel = false;
double x, y, b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
607,7 → 606,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, x, y, b, h);
parseHeader(fNameIn, x, y, b, h);
if (b == 0.0)
b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
674,7 → 673,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
806,7 → 805,7
delete tmpSel;
}
 
void EmfPlug::parseHeader(QString fName, double &x, double &y, double &b, double &h)
void EmfPlug::parseHeader(const QString& fName, double &x, double &y, double &b, double &h)
{
inEMFPlus = false;
emfMixed = false;
960,7 → 959,7
emfMixed = true;
}
 
bool EmfPlug::convert(QString fn)
bool EmfPlug::convert(const QString& fn)
{
importedColors.clear();
importedPatterns.clear();
1834,7 → 1833,7
return out;
}
 
void EmfPlug::createPatternFromDIB(QImage img, quint32 brID)
void EmfPlug::createPatternFromDIB(const QImage& img, quint32 brID)
{
if (!img.isNull())
{
1960,7 → 1959,7
return qRgba(r, g, b, 255);
}
 
void EmfPlug::setWTransform(QTransform mm, quint32 how)
void EmfPlug::setWTransform(const QTransform& mm, quint32 how)
{
if (how == 1)
currentDC.m_WorldMap = QTransform();
2095,10 → 2094,10
points.setMarker();
continue;
}
FPoint base = gpath.point(a);
FPoint c1 = gpath.point(a+1);
FPoint base2 = gpath.point(a+2);
FPoint c2 = gpath.point(a+3);
const FPoint& base = gpath.point(a);
const FPoint& c1 = gpath.point(a+1);
const FPoint& base2 = gpath.point(a+2);
const FPoint& c2 = gpath.point(a+3);
FPoint cn1 = (1.0 - nearT) * base + nearT * c1;
FPoint cn2 = (1.0 - nearT) * cn1 + nearT * ((1.0 - nearT) * c1 + nearT * c2);
FPoint cn3 = (1.0 - nearT) * ((1.0 - nearT) * c1 + nearT * c2) + nearT * ((1.0 - nearT) * c2 + nearT * base2);
2930,7 → 2929,7
}
}
 
void EmfPlug::handleImage(qint32 dstX, qint32 dstY, qint32 dstW, qint32 dstH, QImage img)
void EmfPlug::handleImage(qint32 dstX, qint32 dstY, qint32 dstW, qint32 dstH, const QImage& img)
{
QTransform bm = currentDC.m_WorldMap;
if ((currentDC.m_mapMode == 0x07) || (currentDC.m_mapMode == 0x08))
3362,7 → 3361,7
emfStyleMap.insert(penID, sty);
}
 
QString EmfPlug::handleColor(QColor col)
QString EmfPlug::handleColor(const QColor& col)
{
ScColor tmp;
tmp.setRgbColor(col.red(), col.green(), col.blue());
/trunk/Scribus/scribus/plugins/import/emf/importemf.h
142,11 → 142,11
\retval bool true if import was ok
*/
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
QImage readThumbnail(const QString& fn);
 
private:
void parseHeader(QString fName, double &x, double &y, double &b, double &h);
bool convert(QString fn);
void parseHeader(const QString& fName, double &x, double &y, double &b, double &h);
bool convert(const QString& fn);
// Common functions
bool checkClip(FPointArray &clip);
void aligntoQuadWord(QDataStream &ds);
154,12 → 154,12
QPointF convertDevice2Pts(QPointF in);
double convertLogical2Pts(double in);
QPointF convertLogical2Pts(QPointF in);
void createPatternFromDIB(QImage img, quint32 brID);
void createPatternFromDIB(const QImage& img, quint32 brID);
void getPolyInfo(QDataStream &ds, QRectF &bounds, quint32 &count);
FPointArray getPolyPoints(QDataStream &ds, quint32 count, bool length, bool closed);
QPointF getPoint(QDataStream &ds, bool size);
quint32 getColor(QDataStream &ds);
void setWTransform(QTransform mm, quint32 how);
void setWTransform(const QTransform& mm, quint32 how);
QPointF intersectBoundingRect(PageItem *item, QLineF gradientVector);
void finishItem(PageItem* ite, bool fill = true);
void invalidateClipGroup();
178,7 → 178,7
void handlePie(QDataStream &ds);
void handleSmallText(QDataStream &ds);
void handleText(QDataStream &ds, qint64 posi, bool size);
void handleImage(qint32 dstX, qint32 dstY, qint32 dstW, qint32 dstH, QImage img);
void handleImage(qint32 dstX, qint32 dstY, qint32 dstW, qint32 dstH, const QImage& img);
void handlePatternFill(qint32 dstX, qint32 dstY, qint32 dstW, qint32 dstH);
QImage handleDIB(QDataStream &ds, qint64 filePos, quint32 offBitH, quint32 sizeBitH, quint32 offBits, quint32 sizeBits);
void handleBezier(QDataStream &ds, bool size);
185,7 → 185,7
void handlePolygon(QDataStream &ds, bool size, bool fill);
void handlePolyPolygon(QDataStream &ds, bool size, bool fill);
void handlePenDef(quint32 penID, quint32 penStyle, quint32 penWidth, quint32 penColor);
QString handleColor(QColor col);
QString handleColor(const QColor& col);
void handleFillRegion(QDataStream &ds);
void handleFrameRegion(QDataStream &ds);
void handleSetClipRegion(QDataStream &ds);
/trunk/Scribus/scribus/plugins/import/fh/importfh.cpp
123,9 → 123,8
return QImage();
}
 
bool FhPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool FhPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
132,7 → 131,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
218,7 → 217,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
/trunk/Scribus/scribus/plugins/import/fh/importfh.h
53,7 → 53,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
/trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
74,7 → 74,7
fun = nullptr;
}
 
QString IdmlPlug::getNodeValue(QDomNode &baseNode, QString path)
QString IdmlPlug::getNodeValue(QDomNode &baseNode, const QString& path)
{
QString ret = "";
QStringList pathParts = path.split("/", QString::SkipEmptyParts);
101,7 → 101,7
return ret;
}
 
QImage IdmlPlug::readThumbnail(QString fName)
QImage IdmlPlug::readThumbnail(const QString& fName)
{
QImage tmp;
QByteArray f;
273,9 → 273,8
return success;
}
 
bool IdmlPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool IdmlPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
285,7 → 284,7
firstPage = true;
pagecount = 1;
mpagecount = 0;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
366,7 → 365,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
1666,10 → 1665,9
m_Doc->setMasterPageMode(false);
}
}
return;
}
 
QList<PageItem*> IdmlPlug::parseItemXML(const QDomElement& itElem, QTransform pTrans)
QList<PageItem*> IdmlPlug::parseItemXML(const QDomElement& itElem, const QTransform& pTrans)
{
QList<PageItem*> GElements;
FPointArray GCoords;
3157,7 → 3155,7
*/
}
 
int IdmlPlug::convertBlendMode(QString blendName)
int IdmlPlug::convertBlendMode(const QString& blendName)
{
int mode = 0;
if (blendName == "Normal")
3195,7 → 3193,7
return mode;
}
 
void IdmlPlug::resolveObjectStyle(ObjectStyle &nstyle, QString baseStyleName)
void IdmlPlug::resolveObjectStyle(ObjectStyle &nstyle, const QString& baseStyleName)
{
QStringList styles;
styles.prepend(baseStyleName);
3261,7 → 3259,7
}
}
 
QString IdmlPlug::constructFontName(QString fontBaseName, QString fontStyle)
QString IdmlPlug::constructFontName(const QString& fontBaseName, const QString& fontStyle)
{
QString fontName = PrefsManager::instance()->appPrefs.itemToolPrefs.textFont;
if (fontTranslateMap.contains(fontBaseName))
/trunk/Scribus/scribus/plugins/import/idml/importidml.h
61,8 → 61,8
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
bool readColors(const QString& fileName, ColorList & colors);
 
private:
95,7 → 95,7
QString LeftLineEnd;
QString RightLineEnd;
};
QString getNodeValue(QDomNode &baseNode, QString path);
QString getNodeValue(QDomNode &baseNode, const QString& path);
bool convert(const QString& fn);
bool parseFontsXML(const QDomElement& grElem);
void parseFontsXMLNode(const QDomElement& grNode);
110,7 → 110,7
void parsePreferencesXMLNode(const QDomElement& prNode);
bool parseSpreadXML(const QDomElement& spElem);
void parseSpreadXMLNode(const QDomElement& spNode);
QList<PageItem*> parseItemXML(const QDomElement& itElem, QTransform pTrans = QTransform());
QList<PageItem*> parseItemXML(const QDomElement& itElem, const QTransform& pTrans = QTransform());
bool parseStoryXML(const QDomElement& stElem);
void parseStoryXMLNode(const QDomElement& stNode);
void parseParagraphStyleRange(QDomElement &ste, PageItem* item);
117,9 → 117,9
void parseCharacterStyleRange(QDomElement &stt, PageItem* item, QString fontBase, QString fontStyle, ParagraphStyle &newStyle, int posC);
void readCharStyleAttributes(CharStyle &newStyle, const QDomElement &styleElem);
void readParagraphStyleAttributes(ParagraphStyle &newStyle, const QDomElement &styleElem);
void resolveObjectStyle(ObjectStyle &nstyle, QString baseStyleName);
int convertBlendMode(QString blendName);
QString constructFontName(QString fontBaseName, QString fontStyle);
void resolveObjectStyle(ObjectStyle &nstyle, const QString& baseStyleName);
int convertBlendMode(const QString& blendName);
QString constructFontName(const QString& fontBaseName, const QString& fontStyle);
QList<PageItem*> Elements;
double baseX, baseY;
/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
82,7 → 82,7
uz = nullptr;
}
 
QImage OdgPlug::readThumbnail(QString fName)
QImage OdgPlug::readThumbnail(const QString& fName)
{
QImage tmp;
if (!QFile::exists(fName))
137,7 → 137,6
 
bool OdgPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
146,7 → 145,7
firstPage = true;
pagecount = 1;
mpagecount = 0;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
226,7 → 225,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
404,7 → 403,7
return retVal;
}
 
bool OdgPlug::parseStyleSheets(QString designMap)
bool OdgPlug::parseStyleSheets(const QString& designMap)
{
QByteArray f;
QDomDocument designMapDom;
531,7 → 530,7
return true;
}
 
bool OdgPlug::parseDocReference(QString designMap)
bool OdgPlug::parseDocReference(const QString& designMap)
{
QByteArray f;
QDomDocument designMapDom;
2277,7 → 2276,7
return styleName;
}
 
void OdgPlug::resovleStyle(ObjStyle &tmpOStyle, QString pAttrs)
void OdgPlug::resovleStyle(ObjStyle &tmpOStyle, const QString& pAttrs)
{
if (m_Styles.contains(pAttrs))
{
3213,7 → 3212,7
return retObj;
}
 
QString OdgPlug::modifyColor(QString name, bool darker, int amount)
QString OdgPlug::modifyColor(const QString& name, bool darker, int amount)
{
const ScColor& col = m_Doc->PageColors[name];
QColor c = ScColorEngine::getShadeColorProof(col, m_Doc, 100);
3288,9 → 3287,9
return ret;
}
 
QString OdgPlug::constructFontName(QString fontBaseName, QString fontStyle)
QString OdgPlug::constructFontName(const QString& fontBaseName, const QString& fontStyle)
{
QString fontName = "";
QString fontName;
bool found = false;
SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
for ( ; it.hasNext(); it.next())
/trunk/Scribus/scribus/plugins/import/odg/importodg.h
229,7 → 229,7
\retval bool true if import was ok
*/
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
QImage readThumbnail(const QString& fn);
 
private:
struct DrawStyle
315,9 → 315,9
};
 
bool convert(const QString& fn);
bool parseStyleSheets(QString designMap);
bool parseStyleSheets(const QString& designMap);
bool parseStyleSheetsXML(QDomDocument &designMapDom);
bool parseDocReference(QString designMap);
bool parseDocReference(const QString& designMap);
bool parseDocReferenceXML(QDomDocument &designMapDom);
PageItem* parseObj(QDomElement &draw);
PageItem* parseForm(QDomElement &e);
341,7 → 341,7
void appendPoints(FPointArray *composite, const QDomElement& object, bool closePath);
void parseStyles(QDomElement &sp);
QString getStyleName(QDomElement &e);
void resovleStyle(ObjStyle &tmpOStyle, QString pAttrs);
void resovleStyle(ObjStyle &tmpOStyle, const QString& pAttrs);
double parseUnit(const QString &unit);
const char * getCoord( const char *ptr, double &number );
bool parseEnhPath(const QString& svgPath, FPointArray &result, bool &fill, bool &stroke);
350,10 → 350,10
double degSweepAngle(double start, double stop, bool clockwise);
void arcTo(QPainterPath &path, QPointF startpoint, double rx, double ry, double startAngle, double sweepAngle);
int arcToCurve(double rx, double ry, double startAngle, double sweepAngle, const QPointF & offset, QPointF * curvePoints);
QString modifyColor(QString name, bool darker, int amount);
QString modifyColor(const QString& name, bool darker, int amount);
QColor parseColorN( const QString &rgbColor );
QString parseColor( const QString &s );
QString constructFontName(QString fontBaseName, QString fontStyle);
QString constructFontName(const QString& fontBaseName, const QString& fontStyle);
QPointF intersectBoundingRect(PageItem *item, QLineF gradientVector);
PageItem* applyStartArrow(PageItem* item, ObjStyle &obState);
PageItem* applyEndArrow(PageItem* ite, ObjStyle &obState);
/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
353,7 → 353,7
return tmpImage;
}
 
bool OODPlug::import(QString fileName, const TransactionSettings& trSettings, int flags )
bool OODPlug::import(const QString& fileName, const TransactionSettings& trSettings, int flags )
{
bool importDone = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
1922,10 → 1922,10
WasM = false;
if (i->size() > 3)
{
FPoint b1 = i->point(i->size()-4);
FPoint b2 = i->point(i->size()-3);
FPoint b3 = i->point(i->size()-2);
FPoint b4 = i->point(i->size()-1);
const FPoint& b1 = i->point(i->size()-4);
const FPoint& b2 = i->point(i->size()-3);
const FPoint& b3 = i->point(i->size()-2);
const FPoint& b4 = i->point(i->size()-1);
FPoint n1 = FPoint(CurrX, CurrY);
FPoint n2 = FPoint(x1, y1);
if ((b1 == n1) && (b2 == n1) && (b3 == n2) && (b4 == n2))
1951,10 → 1951,10
WasM = false;
if (PathLen > 3)
{
FPoint b1 = i->point(i->size()-4);
FPoint b2 = i->point(i->size()-3);
FPoint b3 = i->point(i->size()-2);
FPoint b4 = i->point(i->size()-1);
const FPoint& b1 = i->point(i->size()-4);
const FPoint& b2 = i->point(i->size()-3);
const FPoint& b3 = i->point(i->size()-2);
const FPoint& b4 = i->point(i->size()-1);
FPoint n1 = FPoint(CurrX, CurrY);
FPoint n2 = FPoint(x1, y1);
FPoint n3 = FPoint(x3, y3);
/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.h
98,7 → 98,7
bool unsupported;
bool importFailed;
bool importCanceled;
bool import(QString fName, const TransactionSettings& trSettings, int flags);
bool import(const QString& fName, const TransactionSettings& trSettings, int flags);
QImage readThumbnail(const QString& fileName );
static double parseUnit(const QString &unit);
 
/trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
491,7 → 491,7
interactive = (flags & LoadSavePlugin::lfInteractive);
}
 
QImage PagesPlug::readThumbnail(QString fName)
QImage PagesPlug::readThumbnail(const QString& fName)
{
QImage tmp;
if (!QFile::exists(fName))
604,9 → 604,8
return tmp;
}
 
bool PagesPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool PagesPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
615,7 → 614,7
firstPage = true;
pagecount = 1;
mpagecount = 0;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
695,7 → 694,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
801,7 → 800,7
delete tmpSel;
}
 
bool PagesPlug::convert(QString fn)
bool PagesPlug::convert(const QString& fn)
{
bool retVal = true;
importedColors.clear();
835,7 → 834,7
return retVal;
}
 
bool PagesPlug::parseDocReference(QString designMap, bool compressed)
bool PagesPlug::parseDocReference(const QString& designMap, bool compressed)
{
QByteArray f;
QDomDocument designMapDom;
1974,7 → 1973,7
return retObj;
}
 
void PagesPlug::applyParagraphAttrs(ParagraphStyle &newStyle, CharStyle &tmpCStyle, QString pAttrs)
void PagesPlug::applyParagraphAttrs(ParagraphStyle &newStyle, CharStyle &tmpCStyle, const QString& pAttrs)
{
if (!m_StyleSheets.contains(m_currentStyleSheet))
return;
2033,7 → 2032,7
}
}
 
void PagesPlug::applyCharAttrs(CharStyle &tmpCStyle, QString pAttrs)
void PagesPlug::applyCharAttrs(CharStyle &tmpCStyle, const QString& pAttrs)
{
if (!m_StyleSheets.contains(m_currentStyleSheet))
return;
/trunk/Scribus/scribus/plugins/import/pages/importpages.h
134,8 → 134,8
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
struct ObjStyle
231,13 → 231,13
QHash<QString, LayoutStyle> m_layoutStyles;
};
 
bool convert(QString fn);
bool parseDocReference(QString designMap, bool compressed);
bool convert(const QString& fn);
bool parseDocReference(const QString& designMap, bool compressed);
void parseStyleSheets(QDomElement &drawPag);
void parsePageReference(QDomElement &drawPag);
PageItem *parseObjReference(QDomElement &draw);
void applyParagraphAttrs(ParagraphStyle &newStyle, CharStyle &tmpCStyle, QString pAttrs);
void applyCharAttrs(CharStyle &tmpCStyle, QString pAttrs);
void applyParagraphAttrs(ParagraphStyle &newStyle, CharStyle &tmpCStyle, const QString& pAttrs);
void applyCharAttrs(CharStyle &tmpCStyle, const QString& pAttrs);
void finishItem(PageItem* item, ObjState &obState);
QList<PageItem*> Elements;
double baseX, baseY;
/trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
123,9 → 123,8
return QImage();
}
 
bool PctPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool PctPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
133,7 → 132,7
double x, y, b, h;
bool ret = false;
CustColors.clear();
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
169,7 → 168,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, x, y, b, h);
parseHeader(fNameIn, x, y, b, h);
if (b == 0.0)
b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
238,7 → 237,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
416,7 → 415,7
}
}
 
bool PctPlug::convert(QString fn)
bool PctPlug::convert(const QString& fn)
{
CurrColorFill = "White";
CurrFillShade = 100.0;
1531,7 → 1530,7
alignStreamToWord(ts, 0);
}
 
void PctPlug::createTextPath(QByteArray textString)
void PctPlug::createTextPath(const QByteArray& textString)
{
QTextCodec *codec = QTextCodec::codecForName("Apple Roman");
if (!codec)
/trunk/Scribus/scribus/plugins/import/pct/importpct.h
53,12 → 53,12
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
void parseHeader(const QString& fName, double &x, double &y, double &b, double &h);
bool convert(QString fn);
bool convert(const QString& fn);
void parsePict(QDataStream &ts);
void alignStreamToWord(QDataStream &ts, uint len);
void handleColor(QDataStream &ts, bool back);
75,7 → 75,7
void handleDHText(QDataStream &ts);
void handleDVText(QDataStream &ts);
void handleDHVText(QDataStream &ts);
void createTextPath(QByteArray textString);
void createTextPath(const QByteArray& textString);
void handlePenSize(QDataStream &ts);
void handleOvalSize(QDataStream &ts);
void handleShortLine(QDataStream &ts);
/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
76,7 → 76,7
m_pdfDoc = nullptr;
}
 
QImage PdfPlug::readThumbnail(QString fName)
QImage PdfPlug::readThumbnail(const QString& fName)
{
QString pdfFile = QDir::toNativeSeparators(fName);
globalParams = new GlobalParams();
179,7 → 179,6
showProgress = false;
#endif
#endif
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
186,7 → 185,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
273,7 → 272,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSele->clear();
QDir::setCurrent(CurDirP);
/trunk/Scribus/scribus/plugins/import/pdf/importpdf.h
67,7 → 67,7
\retval bool true if import was ok
*/
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
QImage readThumbnail(const QString& fn);
QImage readPreview(int pgNum, int width, int height, int box);
enum PDF_Box_Type
{
/trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.cpp
61,7 → 61,7
return ui->cropGroup->isChecked();
}
 
void PdfImportOptions::setUpOptions(QString fileName, int actPage, int numPages, bool interact, bool cropPossible, PdfPlug* plug)
void PdfImportOptions::setUpOptions(const QString& fileName, int actPage, int numPages, bool interact, bool cropPossible, PdfPlug* plug)
{
m_plugin = plug;
ui->fileLabel->setText(fileName);
/trunk/Scribus/scribus/plugins/import/pdf/pdfimportoptions.h
21,7 → 21,7
public:
explicit PdfImportOptions(QWidget *parent = 0);
~PdfImportOptions();
void setUpOptions(QString fileName, int actPage, int numPages, bool interact, bool cropPossible, PdfPlug* plug);
void setUpOptions(const QString& fileName, int actPage, int numPages, bool interact, bool cropPossible, PdfPlug* plug);
QString getPagesString();
int getCropBox();
bool croppingEnabled();
/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
4283,7 → 4283,7
}
}
 
void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, bool inverted)
void SlaOutputDev::pushGroup(const QString& maskName, GBool forSoftMask, GBool alpha, bool inverted)
{
groupEntry gElements;
gElements.forSoftMask = forSoftMask;
/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
268,7 → 268,7
QString convertPath(GfxPath *path);
int getBlendMode(GfxState *state);
void applyMask(PageItem *ite);
void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
QString UnicodeParsedString(POPPLER_CONST GooString *s1);
bool checkClip();
bool pathIsClosed;
/trunk/Scribus/scribus/plugins/import/pm/importpm.cpp
123,9 → 123,8
return QImage();
}
 
bool PmPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool PmPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
132,7 → 131,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
218,7 → 217,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
/trunk/Scribus/scribus/plugins/import/pm/importpm.h
53,7 → 53,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
/trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
127,9 → 127,8
return QImage();
}
 
bool PubPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool PubPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
136,7 → 135,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
222,7 → 221,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
326,7 → 325,7
delete tmpSel;
}
 
bool PubPlug::convert(QString fn)
bool PubPlug::convert(const QString& fn)
{
importedColors.clear();
importedPatterns.clear();
/trunk/Scribus/scribus/plugins/import/pub/importpub.h
53,11 → 53,11
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
bool convert(QString fn);
bool convert(const QString& fn);
 
QList<PageItem*> Elements;
double baseX, baseY;
/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
53,7 → 53,7
 
#if HAVE_REVENGE
 
RawPainterPres::RawPainterPres(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, QString fTyp) : librevenge::RVNGRawTextGenerator(false)
RawPainterPres::RawPainterPres(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, const QString& fTyp) : librevenge::RVNGRawTextGenerator(false)
{
painter = new RawPainter(Doc, x, y, w, h, iflags, Elem, iColors, iPatterns, tSel, fTyp);
mElements = Elem;
431,7 → 431,7
{
}
 
RawPainter::RawPainter(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, QString fTyp) : m_pImpl(new RawPainterPrivate())
RawPainter::RawPainter(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, const QString& fTyp) : m_pImpl(new RawPainterPrivate())
{
m_Doc = Doc;
baseX = x;
1931,10 → 1931,10
points.setMarker();
continue;
}
FPoint base = gpath.point(a);
FPoint c1 = gpath.point(a+1);
FPoint base2 = gpath.point(a+2);
FPoint c2 = gpath.point(a+3);
const FPoint& base = gpath.point(a);
const FPoint& c1 = gpath.point(a+1);
const FPoint& base2 = gpath.point(a+2);
const FPoint& c2 = gpath.point(a+3);
FPoint cn1 = (1.0 - nearT) * base + nearT * c1;
FPoint cn2 = (1.0 - nearT) * cn1 + nearT * ((1.0 - nearT) * c1 + nearT * c2);
FPoint cn3 = (1.0 - nearT) * ((1.0 - nearT) * c1 + nearT * c2) + nearT * ((1.0 - nearT) * c2 + nearT * base2);
3431,7 → 3431,7
}
#endif
 
QString RawPainter::constructFontName(QString fontBaseName, QString fontStyle)
QString RawPainter::constructFontName(const QString& fontBaseName, const QString& fontStyle)
{
QString fontName;
bool found = false;
3569,7 → 3569,7
return ret;
}
 
void RawPainter::insertImage(PageItem* ite, QString imgExt, QByteArray &imageData)
void RawPainter::insertImage(PageItem* ite, const QString& imgExt, QByteArray &imageData)
{
QTemporaryFile *tempFile = new QTemporaryFile(QDir::tempPath() + QString("/scribus_temp_%1_XXXXXX.").arg(fileType) + imgExt);
tempFile->setAutoRemove(false);
3668,7 → 3668,7
}
}
 
void RawPainter::recolorItem(PageItem* ite, QString efVal)
void RawPainter::recolorItem(PageItem* ite, const QString& efVal)
{
if (ite->itemType() != PageItem::Group)
{
/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.h
33,7 → 33,7
class RawPainter : public librevenge::RVNGDrawingInterface
{
public:
RawPainter(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, QString fTyp);
RawPainter(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, const QString& fTyp);
~RawPainter();
 
void startDocument(const librevenge::RVNGPropertyList &propList);
97,15 → 97,15
void insertLineBreak();
void insertField(const librevenge::RVNGPropertyList &propList);
double valueAsPoint(const librevenge::RVNGProperty *prop);
QString constructFontName(QString fontBaseName, QString fontStyle);
QString constructFontName(const QString& fontBaseName, const QString& fontStyle);
double fromPercentage(const QString &s );
QColor parseColorN( const QString &rgbColor );
QString parseColor( const QString &s );
void insertImage(PageItem* ite, QString imgExt, QByteArray &imageData);
void insertImage(PageItem* ite, const QString& imgExt, QByteArray &imageData);
void applyFill(PageItem* ite);
void applyShadow(PageItem* ite);
void applyFlip(PageItem* ite);
void recolorItem(PageItem* ite, QString efVal);
void recolorItem(PageItem* ite, const QString& efVal);
void applyArrows(PageItem* ite);
void finishItem(PageItem* ite);
private:
164,7 → 164,7
class RawPainterPres : public librevenge::RVNGRawTextGenerator
{
public:
RawPainterPres(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, QString fTyp);
RawPainterPres(ScribusDoc* Doc, double x, double y, double w, double h, int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns, Selection* tSel, const QString& fTyp);
~RawPainterPres();
void startDocument(const librevenge::RVNGPropertyList &propList);
void endDocument();
/trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
124,7 → 124,6
 
bool ShapePlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
132,7 → 131,7
// double x, y, b, h;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
168,7 → 167,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, b, h);
parseHeader(fNameIn, b, h);
if (b == 0.0)
b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
222,7 → 221,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
313,7 → 312,7
delete tmpSel;
}
 
void ShapePlug::parseHeader(QString fName, double &b, double &h)
void ShapePlug::parseHeader(const QString& fName, double &b, double &h)
{
QFile f(fName);
if (f.open(QIODevice::ReadOnly))
342,7 → 341,7
}
}
 
bool ShapePlug::convert(QString fn)
bool ShapePlug::convert(const QString& fn)
{
importedColors.clear();
QList<PageItem*> gElements;
1172,10 → 1171,10
WasM = false;
if (i->size() > 3)
{
FPoint b1 = i->point(i->size()-4);
FPoint b2 = i->point(i->size()-3);
FPoint b3 = i->point(i->size()-2);
FPoint b4 = i->point(i->size()-1);
const FPoint& b1 = i->point(i->size()-4);
const FPoint& b2 = i->point(i->size()-3);
const FPoint& b3 = i->point(i->size()-2);
const FPoint& b4 = i->point(i->size()-1);
FPoint n1 = FPoint(CurrX, CurrY);
FPoint n2 = FPoint(x1, y1);
if ((b1 == n1) && (b2 == n1) && (b3 == n2) && (b4 == n2))
1201,10 → 1200,10
WasM = false;
if (PathLen > 3)
{
FPoint b1 = i->point(i->size()-4);
FPoint b2 = i->point(i->size()-3);
FPoint b3 = i->point(i->size()-2);
FPoint b4 = i->point(i->size()-1);
const FPoint& b1 = i->point(i->size()-4);
const FPoint& b2 = i->point(i->size()-3);
const FPoint& b3 = i->point(i->size()-2);
const FPoint& b4 = i->point(i->size()-1);
FPoint n1 = FPoint(CurrX, CurrY);
FPoint n2 = FPoint(x1, y1);
FPoint n3 = FPoint(x3, y3);
/trunk/Scribus/scribus/plugins/import/shape/importshape.h
56,8 → 56,8
QImage readThumbnail(const QString& fn);
 
private:
void parseHeader(QString fName, double &b, double &h);
bool convert(QString fn);
void parseHeader(const QString& fName, double &b, double &h);
bool convert(const QString& fn);
void finishItem(PageItem* ite);
void parseGroup(QDomNode &DOC);
void parseGroupProperties(QDomNode &DOC, double &minXCoor, double &minYCoor, double &maxXCoor, double &maxYCoor, bool &firstCheck);
/trunk/Scribus/scribus/plugins/import/sml/importsml.cpp
121,9 → 121,8
return QImage();
}
 
bool SmlPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool SmlPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
130,7 → 129,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
164,7 → 163,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, b, h);
parseHeader(fNameIn, b, h);
if (b == 0.0)
b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
218,7 → 217,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
309,7 → 308,7
delete tmpSel;
}
 
void SmlPlug::parseHeader(QString fName, double &b, double &h)
void SmlPlug::parseHeader(const QString& fName, double &b, double &h)
{
QFile f(fName);
if (f.open(QIODevice::ReadOnly))
333,7 → 332,7
}
}
 
bool SmlPlug::convert(QString fn)
bool SmlPlug::convert(const QString& fn)
{
CurrColorFill = "White";
CurrFillShade = 100.0;
/trunk/Scribus/scribus/plugins/import/sml/importsml.h
52,12 → 52,12
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
void parseHeader(QString fName, double &b, double &h);
bool convert(QString fn);
void parseHeader(const QString& fName, double &b, double &h);
bool convert(const QString& fn);
void finishItem(QDomElement &e, PageItem* ite);
void processShapeNode(QDomElement &elem);
QString processColor(QDomElement &elem);
/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
310,7 → 310,7
return tmpImage;
}
 
bool SVGPlug::import(QString fname, const TransactionSettings& trSettings, int flags)
bool SVGPlug::import(const QString& fname, const TransactionSettings& trSettings, int flags)
{
if (!loadData(fname))
{
325,7 → 325,7
return true;
}
 
bool SVGPlug::loadData(QString fName)
bool SVGPlug::loadData(const QString& fName)
{
bool isCompressed = false, success = false;
QByteArray bb(3, ' ');
2931,7 → 2931,7
return;
}
 
QString blendModeStr = child.attribute("mode");
QString blendModeStr(child.attribute("mode"));
if (blendModeStr == "normal")
fspec.blendMode = 0;
if (blendModeStr == "darken")
/trunk/Scribus/scribus/plugins/import/svg/svgplugin.h
234,9 → 234,9
*/
SVGPlug(ScribusDoc* doc, int flags);
~SVGPlug();
bool import(QString fname, const TransactionSettings& trSettings, int flags);
bool import(const QString& fname, const TransactionSettings& trSettings, int flags);
QImage readThumbnail(const QString& fn);
bool loadData(QString fname);
bool loadData(const QString& fname);
void convert(const TransactionSettings& trSettings, int flags);
void addGraphicContext();
void setupNode( const QDomElement &e );
/trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
292,7 → 292,7
progressDialog = nullptr;
}
 
QImage SvmPlug::readThumbnail(QString fName)
QImage SvmPlug::readThumbnail(const QString& fName)
{
QFileInfo fi = QFileInfo(fName);
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
389,9 → 389,8
return QImage();
}
 
bool SvmPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool SvmPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
398,7 → 397,7
cancel = false;
double x, y, b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
434,7 → 433,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, x, y, b, h);
parseHeader(fNameIn, x, y, b, h);
if (b == 0.0)
b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
501,7 → 500,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
644,7 → 643,7
}
}
 
bool SvmPlug::convert(QString fn)
bool SvmPlug::convert(const QString& fn)
{
importedColors.clear();
importedPatterns.clear();
1296,10 → 1295,10
points.setMarker();
continue;
}
FPoint base = gpath.point(a);
FPoint c1 = gpath.point(a+1);
FPoint base2 = gpath.point(a+2);
FPoint c2 = gpath.point(a+3);
const FPoint& base = gpath.point(a);
const FPoint& c1 = gpath.point(a+1);
const FPoint& base2 = gpath.point(a+2);
const FPoint& c2 = gpath.point(a+3);
FPoint cn1 = (1.0 - nearT) * base + nearT * c1;
FPoint cn2 = (1.0 - nearT) * cn1 + nearT * ((1.0 - nearT) * c1 + nearT * c2);
FPoint cn3 = (1.0 - nearT) * ((1.0 - nearT) * c1 + nearT * c2) + nearT * ((1.0 - nearT) * c2 + nearT * base2);
2397,7 → 2396,7
}
}
 
QString SvmPlug::handleColor(QColor col)
QString SvmPlug::handleColor(const QColor& col)
{
ScColor tmp;
tmp.setRgbColor(col.red(), col.green(), col.blue());
/trunk/Scribus/scribus/plugins/import/svm/importsvm.h
141,12 → 141,12
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
void parseHeader(const QString& fName, double &x, double &y, double &b, double &h);
bool convert(QString fn);
bool convert(const QString& fn);
// Common functions
void aligntoQuadWord(QDataStream &ds);
double convertLogical2Pts(double in);
178,7 → 178,7
void handleGradient(QDataStream &ds);
void handleGradientEX(QDataStream &ds, quint16 version);
void commonGradient(QDataStream &ds, PageItem* ite);
QString handleColor(QColor col);
QString handleColor(const QColor& col);
void handleSetClipRegion(QDataStream &ds);
void handleComment(QDataStream &ds);
// Functions for EMF+ Files
/trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.cpp
124,7 → 124,7
return import(fileName, flags);
}
 
bool UniconvImportPlugin::import(QString fileName, int flags)
bool UniconvImportPlugin::import(const QString& fileName, int flags)
{
if (!checkFlags(flags))
return false;
/trunk/Scribus/scribus/plugins/import/uniconvertor/uniconvplugin.h
40,7 → 40,7
\param filename a file name to import
\retval true for success
*/
virtual bool import(QString fileName = QString::null, int flags = lfUseCurrentPage|lfInteractive);
virtual bool import(const QString& fileName = QString::null, int flags = lfUseCurrentPage|lfInteractive);
 
private:
void registerFormats();
51,4 → 51,4
extern "C" PLUGIN_API ScPlugin* uniconvertorplugin_getPlugin();
extern "C" PLUGIN_API void uniconvertorplugin_freePlugin(ScPlugin* plugin);
 
#endif
#endif
/trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
107,7 → 107,7
return value;
}
 
QImage VivaPlug::readThumbnail(QString fName)
QImage VivaPlug::readThumbnail(const QString& fName)
{
QImage tmp;
if ( !QFile::exists(fName) )
195,9 → 195,8
return success;
}
 
bool VivaPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool VivaPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
208,7 → 207,7
firstPage = true;
pagecount = 1;
mpagecount = 0;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
287,7 → 286,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
377,7 → 376,7
delete tmpSel;
}
 
bool VivaPlug::convert(QString fn)
bool VivaPlug::convert(const QString& fn)
{
Coords.resize(0);
Coords.svgInit();
2300,7 → 2299,7
}
}
 
QString VivaPlug::constructFontName(QString fontBaseName, QString fontStyle)
QString VivaPlug::constructFontName(const QString& fontBaseName, const QString& fontStyle)
{
QString fontName = "";
bool found = false;
/trunk/Scribus/scribus/plugins/import/viva/importviva.h
62,8 → 62,8
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
bool readColors(const QString& fileName, ColorList & colors);
 
private:
116,7 → 116,7
AttributeValue tabulators;
};
double parseUnit(const QString &unit);
bool convert(QString fn);
bool convert(const QString& fn);
void parseSettingsXML(const QDomElement& grNode);
void parseColorsXML(const QDomElement& grNode);
void parsePreferencesXML(const QDomElement& spNode);
132,7 → 132,7
void parseStylesheetsXML(const QDomElement& obNode);
void applyParagraphAttrs(ParagraphStyle &newStyle, AttributeSet &pAttrs);
void applyCharacterAttrs(CharStyle &tmpCStyle, ParagraphStyle &newStyle, AttributeSet &pAttrs);
QString constructFontName(QString fontBaseName, QString fontStyle);
QString constructFontName(const QString& fontBaseName, const QString& fontStyle);
QPointF intersectBoundingRect(PageItem *item, QLineF gradientVector);
 
QList<PageItem*> Elements;
/trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
127,9 → 127,8
return QImage();
}
 
bool VsdPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool VsdPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
136,7 → 135,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
222,7 → 221,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
/trunk/Scribus/scribus/plugins/import/vsd/importvsd.h
53,7 → 53,7
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
279,7 → 279,7
polyline.svgInit();
for (int i = 0; i < points.size(); ++i )
{
FPoint point = points.point(i);
const FPoint& point = points.point(i);
x = point.x();
y = point.y();
if (bFirst)
307,7 → 307,7
if ( angleLength < 0 ) angleLength = 360.0 + angleLength;
}
 
QImage WMFImport::readThumbnail(QString fname)
QImage WMFImport::readThumbnail(const QString& fname)
{
if (!loadWMF(fname))
{
357,7 → 357,7
return tmpImage;
}
 
bool WMFImport::import(QString fname, const TransactionSettings& trSettings, int flags)
bool WMFImport::import(const QString& fname, const TransactionSettings& trSettings, int flags)
{
if (!loadWMF(fname))
{
/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.h
42,8 → 42,8
WMFImport(ScribusDoc* doc, int flags);
~WMFImport();
 
bool import(QString fname, const TransactionSettings& trSettings, int flags);
QImage readThumbnail(QString fn);
bool import(const QString& fname, const TransactionSettings& trSettings, int flags);
QImage readThumbnail(const QString& fn);
 
void wmfClosePath(FPointArray *i);
void wmfMoveTo(double x1, double y1);
/trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
492,9 → 492,8
return QImage();
}
 
bool WpgPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool WpgPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
501,7 → 500,7
cancel = false;
double b, h;
bool ret = false;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
587,7 → 586,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
677,7 → 676,7
delete tmpSel;
}
 
bool WpgPlug::convert(QString fn)
bool WpgPlug::convert(const QString& fn)
{
importedColors.clear();
 
/trunk/Scribus/scribus/plugins/import/wpg/importwpg.h
100,11 → 100,11
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
bool convert(QString fn);
bool convert(const QString& fn);
QList<PageItem*> Elements;
double baseX, baseY;
/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
73,10 → 73,9
bool XarPlug::readColors(const QString& fNameIn, ColorList &colors)
{
progressDialog = nullptr;
QString fName = fNameIn;
bool success = false;
importedColors.clear();
QFile f(fName);
QFile f(fNameIn);
if (f.open(QIODevice::ReadOnly))
{
QDataStream ts(&f);
155,7 → 154,7
return success;
}
 
QImage XarPlug::readThumbnail(QString fName)
QImage XarPlug::readThumbnail(const QString& fName)
{
progressDialog = nullptr;
QImage image = QImage();
433,7 → 432,7
delete tmpSel;
}
 
void XarPlug::parseHeader(QString fName, double &x, double &y, double &b, double &h)
void XarPlug::parseHeader(const QString& fName, double &x, double &y, double &b, double &h)
{
QFile f(fName);
if (f.open(QIODevice::ReadOnly))
/trunk/Scribus/scribus/plugins/import/xar/importxar.h
255,11 → 255,11
\retval bool true if import was ok
*/
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
QImage readThumbnail(const QString& fn);
bool readColors(const QString& fileName, ColorList & colors);
 
private:
void parseHeader(QString fName, double &x, double &y, double &b, double &h);
void parseHeader(const QString& fName, double &x, double &y, double &b, double &h);
bool convert(const QString& fn);
void parseXar(QDataStream &ts);
void handleTags(quint32 tag, quint32 dataLen, QDataStream &ts);
/trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
61,7 → 61,7
progressDialog = nullptr;
}
 
QImage XfigPlug::readThumbnail(QString fName)
QImage XfigPlug::readThumbnail(const QString& fName)
{
QFileInfo fi = QFileInfo(fName);
baseFile = QDir::cleanPath(QDir::toNativeSeparators(fi.absolutePath()+"/"));
187,9 → 187,8
return QImage();
}
 
bool XfigPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool XfigPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
259,7 → 258,7
CustColors.insert("Pink2", ScColor(255, 192, 192));
CustColors.insert("Pink", ScColor(255, 224, 224));
CustColors.insert("Gold", ScColor(255, 215, 0));
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
if ( !ScCore->usingGUI() )
{
interactive = false;
295,7 → 294,7
progressDialog->setOverallProgress(1);
qApp->processEvents();
}
parseHeader(fName, x, y, b, h);
parseHeader(fNameIn, x, y, b, h);
docX = x;
docY = y;
if (b == 0.0)
356,7 → 355,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
763,11 → 762,11
}
}
 
void XfigPlug::processPolyline(QDataStream &ts, QString data)
void XfigPlug::processPolyline(QDataStream &ts, const QString& data)
{
QString tmp = data;
QString fArrowData = "";
QString bArrowData = "";
QString fArrowData;
QString bArrowData;
int command;
int subtype; // (1: polyline, 2: box, 3: polygon, 4: arc-box, 5: imported-picture bounding-box)
int line_style; // (enumeration type)
900,7 → 899,7
}
}
 
void XfigPlug::processSpline(QDataStream &ts, QString data)
void XfigPlug::processSpline(QDataStream &ts, const QString& data)
{
QString tmp = data;
QString fArrowData = "";
1018,7 → 1017,7
}
}
 
void XfigPlug::processArc(QDataStream &ts, QString data)
void XfigPlug::processArc(QDataStream &ts, const QString& data)
{
QString tmp = data;
QString fArrowData = "";
1140,7 → 1139,7
}
}
 
void XfigPlug::processEllipse(QString data)
void XfigPlug::processEllipse(const QString& data)
{
QString tmp = data;
int command; // (always 1)
1200,10 → 1199,10
}
}
 
QString XfigPlug::cleanText(QString text)
QString XfigPlug::cleanText(const QString& text)
{
QString ret = "";
QString tmp = "";
QString ret;
QString tmp;
bool sep = false;
int sepcount = 0;
for (int a = 1; a < text.count(); ++a)
1248,7 → 1247,7
return ret;
}
 
void XfigPlug::processText(QString data)
void XfigPlug::processText(const QString& data)
{
QString tmp = data;
int command; // (always 4)
1516,7 → 1515,7
}
}
 
void XfigPlug::processData(QDataStream &ts, QString data)
void XfigPlug::processData(QDataStream &ts, const QString& data)
{
QString tmp = data;
int command, subtype;
1586,7 → 1585,7
return in / 1200.0 * 72.0;
}
 
bool XfigPlug::convert(QString fn)
bool XfigPlug::convert(const QString& fn)
{
QString tmp;
CurrColorFill = "White";
/trunk/Scribus/scribus/plugins/import/xfig/importxfig.h
52,8 → 52,8
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
73,16 → 73,16
void useColor(int colorNum, int area_fill, bool forFill);
QVector<double> getDashValues(double linewidth, int code);
void processArrows(int forward_arrow, QString fArrowData, int backward_arrow, QString bArrowData, int depth, PageItem *ite);
void processPolyline(QDataStream &ts, QString data);
void processSpline(QDataStream &ts, QString data);
void processArc(QDataStream &ts, QString data);
void processEllipse(QString data);
QString cleanText(QString text);
void processText(QString data);
void processData(QDataStream &ts, QString data);
void processPolyline(QDataStream &ts, const QString& data);
void processSpline(QDataStream &ts, const QString& data);
void processArc(QDataStream &ts, const QString& data);
void processEllipse(const QString& data);
QString cleanText(const QString& text);
void processText(const QString& data);
void processData(QDataStream &ts, const QString& data);
double fig2Pts(double in);
void resortItems();
bool convert(QString fn);
bool convert(const QString& fn);
QList<PageItem*> Elements;
QList<PageItem*> PatternElements;
/trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
77,7 → 77,7
uz = nullptr;
}
 
QImage XpsPlug::readThumbnail(QString fName)
QImage XpsPlug::readThumbnail(const QString& fName)
{
QImage tmp;
if (!QFile::exists(fName))
190,9 → 190,8
return tmp;
}
 
bool XpsPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
bool XpsPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
{
QString fName = fNameIn;
bool success = false;
interactive = (flags & LoadSavePlugin::lfInteractive);
importerFlags = flags;
200,7 → 199,7
bool ret = false;
firstPage = true;
pagecount = 1;
QFileInfo fi = QFileInfo(fName);
QFileInfo fi = QFileInfo(fNameIn);
m_FileName = fi.fileName();
if ( !ScCore->usingGUI() )
{
282,7 → 281,7
qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
QString CurDirP = QDir::currentPath();
QDir::setCurrent(fi.path());
if (convert(fName))
if (convert(fNameIn))
{
tmpSel->clear();
QDir::setCurrent(CurDirP);
392,7 → 391,7
}
}
 
bool XpsPlug::convert(QString fn)
bool XpsPlug::convert(const QString& fn)
{
bool retVal = true;
importedColors.clear();
433,7 → 432,7
return retVal;
}
 
bool XpsPlug::parseDocSequence(QString designMap)
bool XpsPlug::parseDocSequence(const QString& designMap)
{
QByteArray f;
QDomDocument designMapDom;
463,7 → 462,7
return parsed;
}
 
bool XpsPlug::parseDocReference(QString designMap)
bool XpsPlug::parseDocReference(const QString& designMap)
{
QByteArray f;
QFileInfo fi(designMap);
571,7 → 570,7
return true;
}
 
void XpsPlug::parsePageReference(QString designMap)
void XpsPlug::parsePageReference(const QString& designMap)
{
QByteArray f;
QFileInfo fi(designMap);
698,7 → 697,7
}
}
 
PageItem* XpsPlug::parseObjectXML(QDomElement &dpg, QString path)
PageItem* XpsPlug::parseObjectXML(QDomElement &dpg, const QString& path)
{
PageItem *retObj = nullptr;
ObjState obState;
1282,7 → 1281,7
return retObj;
}
 
void XpsPlug::parseOpacityXML(QDomElement &spe, QString path, ObjState &obState)
void XpsPlug::parseOpacityXML(QDomElement &spe, const QString& path, ObjState &obState)
{
ObjState opaState;
opaState.CurrColorFill = CommonStrings::None;
1308,7 → 1307,7
}
}
 
void XpsPlug::parseStrokeXML(QDomElement &spe, QString path, ObjState &obState)
void XpsPlug::parseStrokeXML(QDomElement &spe, const QString& path, ObjState &obState)
{
ObjState opaState;
opaState.CurrColorFill = CommonStrings::None;
1331,7 → 1330,7
obState.patternStroke = opaState.patternName;
}
 
void XpsPlug::parseFillXML(QDomElement &spe, QString path, ObjState &obState)
void XpsPlug::parseFillXML(QDomElement &spe, const QString& path, ObjState &obState)
{
for(QDomNode obg = spe.firstChild(); !obg.isNull(); obg = obg.nextSibling() )
{
1584,7 → 1583,7
return svgString;
}
 
void XpsPlug::parseResourceFile(QString resFile)
void XpsPlug::parseResourceFile(const QString& resFile)
{
QByteArray f;
if (uz->read(resFile, f))
/trunk/Scribus/scribus/plugins/import/xps/importxps.h
60,8 → 60,8
\param showProgress if progress must be displayed
\retval bool true if import was ok
*/
bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(QString fn);
bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
QImage readThumbnail(const QString& fn);
 
private:
struct ObjState
103,17 → 103,17
QVector<double> DashPattern;
double DashOffset;
};
bool convert(QString fn);
bool parseDocSequence(QString designMap);
bool parseDocReference(QString designMap);
void parsePageReference(QString designMap);
PageItem* parseObjectXML(QDomElement& dpg, QString path);
void parseOpacityXML(QDomElement &spe, QString path, ObjState &obState);
void parseStrokeXML(QDomElement &spe, QString path, ObjState &obState);
void parseFillXML(QDomElement &spe, QString path, ObjState &obState);
bool convert(const QString& fn);
bool parseDocSequence(const QString& designMap);
bool parseDocReference(const QString& designMap);
void parsePageReference(const QString& designMap);
PageItem* parseObjectXML(QDomElement& dpg, const QString& path);
void parseOpacityXML(QDomElement &spe, const QString& path, ObjState &obState);
void parseStrokeXML(QDomElement &spe, const QString& path, ObjState &obState);
void parseFillXML(QDomElement &spe, const QString& path, ObjState &obState);
void parsePathDataXML(QDomElement &spe, ObjState &obState, bool forClip = false);
QString parsePathGeometryXML(QDomElement &spe);
void parseResourceFile(QString resFile);
void parseResourceFile(const QString& resFile);
void resolveLinks();
PageItem* addClip(PageItem* retObj, ObjState &obState);
PageItem* createItem(QDomElement &dpg, ObjState &obState);
/trunk/Scribus/scribus/plugins/import/xps/xpsimportoptions.cpp
31,7 → 31,7
return ui->pageRangeString->text();
}
 
void XpsImportOptions::setUpOptions(QString fileName, int actPage, int numPages, bool interact)
void XpsImportOptions::setUpOptions(const QString& fileName, int actPage, int numPages, bool interact)
{
ui->fileLabel->setText(fileName);
ui->spinBox->setMaximum(numPages);
/trunk/Scribus/scribus/plugins/import/xps/xpsimportoptions.h
21,7 → 21,7
public:
explicit XpsImportOptions(QWidget *parent = 0);
~XpsImportOptions();
void setUpOptions(QString fileName, int actPage, int numPages, bool interact);
void setUpOptions(const QString& fileName, int actPage, int numPages, bool interact);
QString getPagesString();
 
public slots:
/trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
27,7 → 27,7
}
 
 
collections::collections ( QString collectionsName )
collections::collections ( const QString& collectionsName )
{
name = collectionsName;
}
304,7 → 304,7
}
 
 
collectionsWriterThread::collectionsWriterThread ( QString &xmlFile2, QList<collections *> saveCollections2 )
collectionsWriterThread::collectionsWriterThread ( const QString& xmlFile2, QList<collections *> saveCollections2 )
{
xmlFile = xmlFile2;
saveCollections = saveCollections2;
/trunk/Scribus/scribus/plugins/picbrowser/collection.h
49,7 → 49,7
{
public:
//sets name
collections ( QString collectionsName );
collections (const QString& collectionsName );
 
//contains name of the collections
QString name;
150,7 → 150,7
//QString &xmlFile2: the file to write
//int fileType: the type of file, 0 for collectionfile, 1 for collectionsdb
//QList<collections *> saveCollections2: the collectionsset to write to the file
collectionsWriterThread ( QString &xmlFile2, QList<collections *> saveCollections2 );
collectionsWriterThread (const QString& xmlFile2, QList<collections *> saveCollections2 );
//starts writing to the file
void writeFile();
 
/trunk/Scribus/scribus/plugins/picbrowser/findimage.cpp
57,14 → 57,11
 
for ( int i = 0 ; ( i < list.size() ) && ( !restartThread ) ; ++i )
{
QFileInfo fileInfo = list.at ( i );
 
const QFileInfo& fileInfo = list.at ( i );
if ( fileInfo.isDir() )
{
if ( searchSubfolders )
{
findFiles ( fileInfo.canonicalFilePath() );
}
}
else
{
/trunk/Scribus/scribus/plugins/picbrowser/imagedialog.cpp
9,7 → 9,7
#include <QApplication>
#include <QDesktopWidget>
 
Imagedialog::Imagedialog ( const QString imageFile, ScribusDoc* doc , QWidget *parent ) : QDialog ( parent )
Imagedialog::Imagedialog ( const QString& imageFile, ScribusDoc* doc , QWidget *parent ) : QDialog ( parent )
{
setupUi ( this );
setAttribute ( Qt::WA_DeleteOnClose );
/trunk/Scribus/scribus/plugins/picbrowser/imagedialog.h
23,7 → 23,7
Q_OBJECT
 
public:
Imagedialog ( const QString imageFile, ScribusDoc* doc, QWidget *parent = 0 );
Imagedialog ( const QString& imageFile, ScribusDoc* doc, QWidget *parent = 0 );
void resizeEvent ( QResizeEvent * event );
 
ScImage image;
/trunk/Scribus/scribus/plugins/picbrowser/loadimage.cpp
64,7 → 64,7
{
}
*/
void loadImagesThread::processLoadImageJob ( int row, QString path, int size, int tpId )
void loadImagesThread::processLoadImageJob ( int row, const QString& path, int size, int tpId )
{
ScImageCacheManager &icm = ScImageCacheManager::instance();
bool cacheEnabled = icm.enabled();
/trunk/Scribus/scribus/plugins/picbrowser/loadimage.h
80,7 → 80,7
//QString path: path to the image
//int size: desired size of the icon
//int tpId: unique id
void processLoadImageJob ( int row, QString path, int size, int tpId );
void processLoadImageJob (int row, const QString& path, int size, int tpId );
};
 
 
/trunk/Scribus/scribus/plugins/picbrowser/multicombobox.cpp
150,7 → 150,7
}
 
 
int multiCombobox::addItem ( QString text, int checked )
int multiCombobox::addItem ( const QString& text, int checked )
{
QComboBox::addItem ( text );
 
/trunk/Scribus/scribus/plugins/picbrowser/multicombobox.h
46,7 → 46,7
int checkstate ( int index );
void switchCheckstate ( int row );
 
int addItem ( QString text, int checked=0 );
int addItem ( const QString& text, int checked=0 );
 
private:
multiComboboxModel *mcbModel;
/trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.cpp
66,7 → 66,7
delete about;
}
 
bool PictureBrowserPlugin::run ( ScribusDoc* doc, QString target )
bool PictureBrowserPlugin::run ( ScribusDoc* doc, const QString& target )
{
//picturebrowser isn't running yet, so create it
if ( !pictureBrowser )
/trunk/Scribus/scribus/plugins/picbrowser/picturebrowserplugin.h
25,7 → 25,7
virtual ~PictureBrowserPlugin();
virtual bool cleanupPlugin();
//! \brief main method to run the plug
virtual bool run ( ScribusDoc* doc, QString target = QString::null );
virtual bool run ( ScribusDoc* doc, const QString& target = QString::null );
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData ( const AboutData* about ) const;
/trunk/Scribus/scribus/plugins/picbrowser/previewimage.cpp
575,7 → 575,7
}
 
 
void PreviewImagesModel::processLoadedImage ( int row, const QImage image, ImageInformation* imgInfo, int tpId )
void PreviewImagesModel::processLoadedImage ( int row, const QImage& image, ImageInformation* imgInfo, int tpId )
{
//check if list of files has changed and this job is obsolete
if ( tpId != pId )
/trunk/Scribus/scribus/plugins/picbrowser/previewimage.h
176,7 → 176,7
//previewImage* loadedImage: pointer to identify the loaded image
//const QImage image: the actual image
//int tpId: the id the thread has been called from
void processLoadedImage ( int row, const QImage image, ImageInformation* imgInfo, int tpId );
void processLoadedImage ( int row, const QImage& image, ImageInformation* imgInfo, int tpId );
void processImageLoadError ( int row, int tpId, int errorcode );
 
private:
/trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.cpp
36,7 → 36,7
}
};
 
SATDialog::SATDialog(QWidget* parent, QString tmplName, int pageW, int pageH) : QDialog(parent)
SATDialog::SATDialog(QWidget* parent, const QString& tmplName, int pageW, int pageH) : QDialog(parent)
{
setupUi(this);
setModal(true);
91,7 → 91,7
prefs->set("isFullDetail", isFullDetail);
}
 
QString SATDialog::findTemplateXml(QString dir)
QString SATDialog::findTemplateXml(const QString& dir)
{
QString lang = ScCore->getGuiLanguage();
QString tmp = dir + "/template." + lang + ".xml";
142,7 → 142,7
QStringList& categories = catReader.categories;
for (int i = 0; i < categories.count(); ++i)
{
QString category = categories.at(i);
const QString& category = categories.at(i);
if (!category.isEmpty() && !cats.contains(category))
cats.insert(category, category);
}
/trunk/Scribus/scribus/plugins/saveastemplateplugin/satdialog.h
19,7 → 19,7
Q_OBJECT
 
public:
SATDialog(QWidget* parent, QString tmplName = "", int pageW = 0, int pageH = 0);
SATDialog(QWidget* parent, const QString& tmplName = "", int pageW = 0, int pageH = 0);
~SATDialog();
 
QMap<QString, QString> cats;
32,7 → 32,7
QString email;
bool isFullDetail;
 
QString findTemplateXml(QString dir);
QString findTemplateXml(const QString& dir);
void readPrefs();
void writePrefs();
void addCategories(const QString& dir);
/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
89,7 → 89,7
delete about;
}
 
bool SaveAsTemplatePlugin::run(ScribusDoc* doc, QString target)
bool SaveAsTemplatePlugin::run(ScribusDoc* doc, const QString& target)
/*{
Q_ASSERT(target.isEmpty());
Sat = new MenuSAT();
175,7 → 175,7
 
// --------------------- CLASS sat ------------------------------------------------//
 
sat::sat(ScribusDoc* doc, SATDialog* satdia, QString fileName, QString tmplDir)
sat::sat(ScribusDoc* doc, SATDialog* satdia, const QString& fileName, const QString& tmplDir)
{
lang = ScCore->getGuiLanguage();
m_Doc = doc;
318,7 → 318,7
s.replace("\'", "&apos;");
}
 
QString sat::findTemplateXml(QString dir)
QString sat::findTemplateXml(const QString& dir)
{
QString tmp = dir + "/template." + lang + ".xml";
if (QFile(tmp).exists())
/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.h
20,7 → 20,7
// Standard plugin implementation
SaveAsTemplatePlugin();
virtual ~SaveAsTemplatePlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
63,12 → 63,12
QString lang;
void appendTmplXml();
QString getTemplateTag();
QString findTemplateXml(QString dir);
QString findTemplateXml(const QString& dir);
void replaceIllegalChars(QString& s);
public:
void createTmplXml();
void createImages();
sat(ScribusDoc* doc, SATDialog* satdia, QString fileName, QString tmplDir);
sat(ScribusDoc* doc, SATDialog* satdia, const QString& fileName, const QString& tmplDir);
~sat();
};
 
/trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
10,7 → 10,7
#include "util.h"
#include "scribuscore.h"
 
static PyObject *getLinkData(PyObject *rv,int page, QString action);
static PyObject *getLinkData(PyObject *rv, int page, const QString& action);
static void prepareannotation(PageItem *i);
static void setactioncoords(Annotation &a, int x, int y);
static bool testPageItem(PageItem *i);
458,7 → 458,7
 
//HELPER FUNCTIONS
 
PyObject *getLinkData(PyObject *rv,int page, QString action)
PyObject *getLinkData(PyObject *rv,int page, const QString& action)
{
int x, y;
 
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
60,7 → 60,7
return PointToValue(pageUnitY - ScCore->primaryMainWindow()->doc->currentPage()->yOffset());
}
 
PageItem *GetItem(QString Name)
PageItem *GetItem(const QString& Name)
{
if (!Name.isEmpty())
{
78,7 → 78,7
return nullptr;
}
 
void ReplaceColor(QString col, QString rep)
void ReplaceColor(const QString& col, const QString& rep)
{
QMap<QString, QString> colorMap;
colorMap.insert(col, rep);
99,7 → 99,7
}
 
/* 04/07/10 returns selection if is not name specified pv */
PageItem* GetUniqueItem(QString name)
PageItem* GetUniqueItem(const QString& name)
{
if (name.length()==0)
if (ScCore->primaryMainWindow()->doc->m_Selection->count() != 0)
113,7 → 113,7
return getPageItemByName(name);
}
 
PageItem* getPageItemByName(QString name)
PageItem* getPageItemByName(const QString& name)
{
if (name.length() == 0)
{
135,7 → 135,7
* if it does exist. Returns false if there is no such object, or
* if the empty string ("") is passed.
*/
bool ItemExists(QString name)
bool ItemExists(const QString& name)
{
if (name.length() == 0)
return false;
/trunk/Scribus/scribus/plugins/scriptplugin/cmdutil.h
27,8 → 27,8
/// \brief Doc units -> page-relative units
double docUnitYToPageY(double pageUnitY);
 
PageItem *GetItem(QString Name);
void ReplaceColor(QString col, QString rep);
PageItem *GetItem(const QString& Name);
void ReplaceColor(const QString& col, const QString& rep);
/*!
* @brief Returns named PageItem, or selection if name '', or exception and NULL if no item.
*
40,7 → 40,7
* @author 03/10/2004 petr vanek
* @author 05/02/02 Craig Ringer
*/
PageItem* GetUniqueItem(QString name);
PageItem* GetUniqueItem(const QString& name);
 
/*!
* @brief Returns named PageItem, or exception and NULL if not found.
48,13 → 48,13
* @author 03/10/2004 Petr Vanek
* @author 05/02/02 Craig Ringer
*/
PageItem* getPageItemByName(QString name);
PageItem* getPageItemByName(const QString& name);
 
// 2004-10-27 Craig Ringer see cmdutil.cpp for description
bool checkHaveDocument();
 
// 2004-11-12 Craig Ringer see cmdutil.cpp for description
bool ItemExists(QString name);
bool ItemExists(const QString& name);
 
/*!
* @brief Returns a list of the names of all selected PageItems
/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
373,7 → 373,7
QList<QString> tmpEm = ReallyUsed.keys();
for (int i = 0; i < tmpEm.count(); ++i)
{
QString fontName = tmpEm.at(i);
const QString& fontName = tmpEm.at(i);
PyObject *tmp= nullptr;
tmp = PyString_FromString(fontName.toLatin1());
if (tmp) {
1303,7 → 1303,7
QStringList docFonts = currentDoc->UsedFonts.keys();
for (int i = 0; i < docFonts.count(); ++i)
{
QString fontName = docFonts.at(i);
const QString& fontName = docFonts.at(i);
if (pdfOptions.SubsetList.contains(fontName))
continue;
if (pdfOptions.EmbedList.contains(fontName))
/trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
406,7 → 406,7
}
}
 
QString SyntaxColors::qcolor2named(QColor color)
QString SyntaxColors::qcolor2named(const QColor& color)
{
int r, g, b;
QString retval("#");
/trunk/Scribus/scribus/plugins/scriptplugin/pconsole.h
104,7 → 104,7
private:
/*! \brief Converts QColor into #rrggbb string.
\param color a QColor to convert. */
QString qcolor2named(QColor color);
QString qcolor2named(const QColor& color);
};
 
/*! \brief Simple syntax highlighting for Scripter (QTextEdit).
/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
202,7 → 202,7
FinishScriptRun();
}
 
void ScripterCore::StdScript(QString basefilename)
void ScripterCore::StdScript(const QString& basefilename)
{
QString pfad = ScPaths::instance().scriptDir();
QString pfad2;
215,7 → 215,7
FinishScriptRun();
}
 
void ScripterCore::RecentScript(QString fn)
void ScripterCore::RecentScript(const QString& fn)
{
QFileInfo fd(fn);
if (!fd.exists())
228,12 → 228,12
FinishScriptRun();
}
 
void ScripterCore::slotRunScriptFile(QString fileName, bool inMainInterpreter)
void ScripterCore::slotRunScriptFile(const QString& fileName, bool inMainInterpreter)
{
slotRunScriptFile(fileName, QStringList(), inMainInterpreter);
}
 
void ScripterCore::slotRunScriptFile(QString fileName, QStringList arguments, bool inMainInterpreter)
void ScripterCore::slotRunScriptFile(const QString& fileName, QStringList arguments, bool inMainInterpreter)
/** run "filename" python script with the additional arguments provided in "arguments" */
{
// Prevent two scripts to be run concurrently or face crash!
386,7 → 386,7
}
}
 
void ScripterCore::slotRunScript(const QString Script)
void ScripterCore::slotRunScript(const QString& Script)
{
// Prevent two scripts to be run concurrently or face crash!
if (ScCore->primaryMainWindow()->scriptIsRunning())
/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.h
36,12 → 36,12
 
public slots:
void runScriptDialog();
void StdScript(QString filebasename);
void RecentScript(QString fn);
void slotRunScriptFile(QString fileName, bool inMainInterpreter = false);
void slotRunScriptFile(QString fileName, QStringList arguments, bool inMainInterpreter = false);
void StdScript(const QString& filebasename);
void RecentScript(const QString& fn);
void slotRunScriptFile(const QString& fileName, bool inMainInterpreter = false);
void slotRunScriptFile(const QString& fileName, QStringList arguments, bool inMainInterpreter = false);
void slotRunPythonScript(); // needed for running python script from CLI
void slotRunScript(const QString script);
void slotRunScript(const QString& script);
void slotInteractiveScript(bool);
void slotExecute();
/*! \brief Show docstring of the script to the user.
/trunk/Scribus/scribus/plugins/scriptplugin/scripterprefsgui.cpp
110,7 → 110,7
}
}
 
void ScripterPrefsGui::setButtonIcon(QPushButton* button, QColor color)
void ScripterPrefsGui::setButtonIcon(QPushButton* button, const QColor& color)
{
QSize iconSize = button->iconSize();
double iconWidth = qMax(iconSize.width() , button->width() / 3);
/trunk/Scribus/scribus/plugins/scriptplugin/scripterprefsgui.h
27,7 → 27,7
 
protected:
void setupSyntaxColors();
void setButtonIcon(QPushButton* button, QColor color);
void setButtonIcon(QPushButton* button, const QColor& color);
 
SyntaxColors* syntaxColors;
 
/trunk/Scribus/scribus/plugins/short-words/configuration.cpp
51,7 → 51,7
prefs->set("currentLanguage", currentLanguage);
}
 
QStringList SWConfig::getShortWordsFromFile(QString lang, QString filename)
QStringList SWConfig::getShortWordsFromFile(const QString& lang, const QString& filename)
{
// path to the cfg. file
QFile f(filename);
87,7 → 87,7
return QStringList();
}
 
QStringList SWConfig::getShortWords(QString lang)
QStringList SWConfig::getShortWords(const QString& lang)
{
if (QFile::exists(RC_PATH_USR))
return getShortWordsFromFile(lang, RC_PATH_USR);
94,7 → 94,7
return getShortWordsFromFile(lang, RC_PATH);
}
 
QStringList SWConfig::getAvailableLanguageCodes(QString filename)
QStringList SWConfig::getAvailableLanguageCodes(const QString& filename)
{
QFile f(filename);
if (!f.open(QIODevice::ReadOnly))
143,13 → 143,13
return allConfig.join("");
}
 
QStringList SWConfig::getLanguageStringsFromCodes(QStringList codes)
QStringList SWConfig::getLanguageStringsFromCodes(const QStringList& codes)
{
QStringList languages;
 
for (int i = 0; i < codes.count(); ++i)
{
QString code = codes.at(i);
const QString& code = codes.at(i);
QString lang = LanguageManager::instance()->getLangFromAbbrev(code, true);
if (lang.length() > 0)
languages.append(lang);
/trunk/Scribus/scribus/plugins/short-words/configuration.h
40,7 → 40,7
 
/*! \brief Returns all options for specified language.
\param lang language of the ext frame */
QStringList getShortWords(QString lang);
QStringList getShortWords(const QString& lang);
/*! \brief available configs for UI about.
\retval QString with languages in the configuration. */
static QString getAvailableLanguages();
56,14 → 56,14
\param lang language
\param filename configuration file.
\retval QStringList parsed SW. Each SW in one string item. */
QStringList getShortWordsFromFile(QString lang, QString filename);
QStringList getShortWordsFromFile(const QString& lang, const QString& filename);
/*! \brief getAvailableLanguages use this one. available config in the specified file for UI about
\param filename config file
\retval QStringList all supported language codes */
static QStringList getAvailableLanguageCodes(QString filename);
static QStringList getAvailableLanguageCodes(const QString& filename);
/*! \brief Retrieve translated language strings from language codes
\retval QStringList with languages. */
static QStringList getLanguageStringsFromCodes(QStringList codes);
static QStringList getLanguageStringsFromCodes(const QStringList& codes);
};
 
#endif
/trunk/Scribus/scribus/plugins/short-words/prefs_shortwords.cpp
108,7 → 108,7
saveButton->setEnabled(true);
}
 
bool Prefs_ShortWords::loadCfgFile(QString filename)
bool Prefs_ShortWords::loadCfgFile(const QString& filename)
{
QFile f(filename);
if (!f.open(QIODevice::ReadOnly))
/trunk/Scribus/scribus/plugins/short-words/prefs_shortwords.h
37,7 → 37,7
protected:
/*! \brief Load cfg file.
\param filename string with full path and name.*/
bool loadCfgFile(QString filename);
bool loadCfgFile(const QString& filename);
};
 
#endif // PREFS_SHORTWORDS_H
/trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
113,7 → 113,7
delete about;
}
 
bool ShortWordsPlugin::run(ScribusDoc* doc, QString target)
bool ShortWordsPlugin::run(ScribusDoc* doc, const QString& target)
{
if (doc==nullptr)
return false;
/trunk/Scribus/scribus/plugins/short-words/shortwords.h
27,7 → 27,7
// Standard plugin implementation
ShortWordsPlugin();
virtual ~ShortWordsPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/short-words/swdialog.cpp
45,7 → 45,7
QStringList langCodes = cfg->getAvailableLanguagesList();
for (int i = 0; i< langCodes.count(); ++i)
{
QString code = langCodes.at(i);
const QString& code = langCodes.at(i);
QString lang = LanguageManager::instance()->getLangFromAbbrev(code, true);
languageComboBox->addItem(lang, code);
}
/trunk/Scribus/scribus/plugins/short-words/swprefsgui.cpp
147,7 → 147,7
okButton->setEnabled(true);
}
 
bool SWPrefsGui::loadCfgFile(QString filename)
bool SWPrefsGui::loadCfgFile(const QString& filename)
{
QFile f(filename);
if (!f.open(QIODevice::ReadOnly))
/trunk/Scribus/scribus/plugins/short-words/swprefsgui.h
47,7 → 47,7
protected:
/*! \brief Load cfg file.
\param filename string with full path and name.*/
bool loadCfgFile(QString filename);
bool loadCfgFile(const QString& filename);
 
QGridLayout* SWPrefsGuiLayout;
QVBoxLayout* editLayout;
/trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
113,7 → 113,7
delete about;
}
 
bool MeshDistortionPlugin::run(ScribusDoc* doc, QString)
bool MeshDistortionPlugin::run(ScribusDoc* doc, const QString&)
{
m_doc = doc;
if (m_doc == nullptr)
/trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.h
43,7 → 43,7
// Standard plugin implementation
MeshDistortionPlugin();
virtual ~MeshDistortionPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
167,7 → 167,7
return ret;
}
 
bool PathAlongPathPlugin::run(ScribusDoc* doc, QString)
bool PathAlongPathPlugin::run(ScribusDoc* doc, const QString&)
{
firstUpdate = true;
m_doc = doc;
/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h
60,7 → 60,7
// Standard plugin implementation
PathAlongPathPlugin();
virtual ~PathAlongPathPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.cpp
113,7 → 113,7
delete about;
}
 
bool FlattenPathPlugin::run(ScribusDoc* doc, QString)
bool FlattenPathPlugin::run(ScribusDoc* doc, const QString&)
{
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
/trunk/Scribus/scribus/plugins/tools/flattenpath/flattenpath.h
38,7 → 38,7
// Standard plugin implementation
FlattenPathPlugin();
virtual ~FlattenPathPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.cpp
67,7 → 67,7
return m_hunspell->spell(s);
}
 
QStringList HunspellDict::suggest(QString word)
QStringList HunspellDict::suggest(const QString& word)
{
QStringList replacements;
if (!m_hunspell)
/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspelldict.h
21,7 → 21,7
~HunspellDict();
 
int spell(const QString& word);
QStringList suggest(QString word);
QStringList suggest(const QString& word);
 
protected:
Hunspell* m_hunspell;
/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
74,7 → 74,7
delete about;
}
 
bool HunspellPlugin::run(ScribusDoc* doc, QString target)
bool HunspellPlugin::run(ScribusDoc* doc, const QString& target)
{
HunspellPluginImpl *hunspellPluginImpl = new HunspellPluginImpl();
Q_CHECK_PTR(hunspellPluginImpl);
83,7 → 83,7
return result;
}
 
bool HunspellPlugin::run(QWidget *parent, ScribusDoc *doc, QString target)
bool HunspellPlugin::run(QWidget *parent, ScribusDoc *doc, const QString& target)
{
HunspellPluginImpl *hunspellPluginImpl = new HunspellPluginImpl();
Q_CHECK_PTR(hunspellPluginImpl);
/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.h
23,8 → 23,8
HunspellPlugin();
virtual ~HunspellPlugin();
//! \brief main method to run the plug
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(QWidget* p, ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual bool run(QWidget* p, ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
108,7 → 108,7
delete about;
}
 
bool LensEffectsPlugin::run(ScribusDoc* doc, QString)
bool LensEffectsPlugin::run(ScribusDoc* doc, const QString&)
{
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
/trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.h
42,7 → 42,7
// Standard plugin implementation
LensEffectsPlugin();
virtual ~LensEffectsPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
117,7 → 117,7
delete about;
}
 
bool PathConnectPlugin::run(ScribusDoc* doc, QString)
bool PathConnectPlugin::run(ScribusDoc* doc, const QString&)
{
m_doc = doc;
firstUpdate = true;
332,10 → 332,10
FPointArray result;
for (int a = path.size()-4; a > -1; a -= 4)
{
FPoint p1 = path.point(a);
FPoint p2 = path.point(a+1);
FPoint p3 = path.point(a+2);
FPoint p4 = path.point(a+3);
const FPoint& p1 = path.point(a);
const FPoint& p2 = path.point(a+1);
const FPoint& p3 = path.point(a+2);
const FPoint& p4 = path.point(a+3);
result.addQuadPoint(p3, p4, p1, p2);
}
return result;
/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.h
46,7 → 46,7
// Standard plugin implementation
PathConnectPlugin();
virtual ~PathConnectPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
119,14 → 119,8
delete about;
}
 
bool PathCutPlugin::run(ScribusDoc* doc, QString)
bool PathCutPlugin::run(ScribusDoc* doc, const QString&)
{
QString vers = QString(qVersion()).left(5);
if (vers < "4.3.3")
{
ScMessageBox::information(doc->scMW(), tr("Qt Version too old"), tr("This plugin requires at least version 4.3.3 of the Qt library"));
return true;
}
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
currDoc = ScCore->primaryMainWindow()->doc;
/trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.h
42,7 → 42,7
// Standard plugin implementation
PathCutPlugin();
virtual ~PathCutPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
124,7 → 124,7
delete about;
}
 
bool PathFinderPlugin::run(ScribusDoc* doc, QString)
bool PathFinderPlugin::run(ScribusDoc* doc, const QString&)
{
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.h
43,7 → 43,7
// Standard plugin implementation
PathFinderPlugin();
virtual ~PathFinderPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinderdialog.cpp
145,7 → 145,7
updateAllPreviews();
}
 
void PathFinderDialog::updatePreview(QLabel *label, QPainterPath &path, QColor color, double scale)
void PathFinderDialog::updatePreview(QLabel *label, QPainterPath &path, const QColor& color, double scale)
{
QPixmap pm(100, 100);
QPainter p;
164,7 → 164,7
label->setPixmap(pm);
}
 
void PathFinderDialog::updatePartPreview(QColor color, double scale)
void PathFinderDialog::updatePartPreview(const QColor& color, double scale)
{
QPixmap pm(100, 100);
QPainter p;
261,9 → 261,9
updatePreview(resultShape, result, cc, scale);
}
 
QColor PathFinderDialog::getColorFromItem(QString color, QColor in)
QColor PathFinderDialog::getColorFromItem(const QString& color, const QColor& in)
{
QColor out = in;
QColor out(in);
QString fill = color;
if (fill == CommonStrings::tr_NoneColor)
fill = CommonStrings::None;
/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinderdialog.h
23,8 → 23,8
public:
PathFinderDialog(QWidget* parent, ScribusDoc* doc, PageItem *shape1, PageItem *shape2);
~PathFinderDialog() {};
void updatePreview(QLabel *label, QPainterPath &path, QColor color, double scale);
void updatePartPreview(QColor color, double scale);
void updatePreview(QLabel *label, QPainterPath &path, const QColor& color, double scale);
void updatePartPreview(const QColor& color, double scale);
const QString getOtherFillColor();
const QString getOtherLineColor();
 
38,7 → 38,7
QPainterPath result1;
QPainterPath result2;
private:
QColor getColorFromItem(QString color, QColor in);
QColor getColorFromItem(const QString& color, const QColor& in);
 
ScribusDoc* m_doc;
PageItem* m_source1;
/trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
121,7 → 121,7
delete about;
}
 
bool PathStrokerPlugin::run(ScribusDoc* doc, QString)
bool PathStrokerPlugin::run(ScribusDoc* doc, const QString&)
{
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
/trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.h
42,7 → 42,7
// Standard plugin implementation
PathStrokerPlugin();
virtual ~PathStrokerPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.cpp
119,7 → 119,7
delete about;
}
 
bool SmoothPathPlugin::run(ScribusDoc* doc, QString)
bool SmoothPathPlugin::run(ScribusDoc* doc, const QString&)
{
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
/trunk/Scribus/scribus/plugins/tools/smoothpath/smoothpath.h
38,7 → 38,7
// Standard plugin implementation
SmoothPathPlugin();
virtual ~SmoothPathPlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.cpp
103,7 → 103,7
delete about;
}
 
bool SubdividePlugin::run(ScribusDoc* doc, QString)
bool SubdividePlugin::run(ScribusDoc* doc, const QString&)
{
ScribusDoc* currDoc = doc;
if (currDoc == nullptr)
/trunk/Scribus/scribus/plugins/tools/subdivide/subdivide.h
42,7 → 42,7
// Standard plugin implementation
SubdividePlugin();
virtual ~SubdividePlugin();
virtual bool run(ScribusDoc* doc, QString target = QString::null);
virtual bool run(ScribusDoc* doc, const QString& target = QString::null);
virtual const QString fullTrName() const;
virtual const AboutData* getAboutData() const;
virtual void deleteAboutData(const AboutData* about) const;
/trunk/Scribus/scribus/prefscontext.cpp
34,7 → 34,7
m_isplugin = false;
}
 
PrefsContext::PrefsContext(QString contextName, bool persistent, bool plugin)
PrefsContext::PrefsContext(const QString& contextName, bool persistent, bool plugin)
{
m_name = contextName;
m_ispersistent = persistent;
/trunk/Scribus/scribus/prefscontext.h
47,7 → 47,7
AttributeMap values;
TableMap tables;
PrefsContext();
PrefsContext(QString contextName, bool persistent = true, bool plugin = false);
PrefsContext(const QString& contextName, bool persistent = true, bool plugin = false);
~PrefsContext();
QString getName();
bool isPersistent();
/trunk/Scribus/scribus/prefstable.cpp
181,7 → 181,7
}
}
 
void PrefsTable::checkSize(int rowIndex, int colIndex, QString defValue)
void PrefsTable::checkSize(int rowIndex, int colIndex, const QString& defValue)
{
checkHeight(rowIndex);
checkWidth(rowIndex, colIndex, defValue);
197,7 → 197,7
}
}
 
void PrefsTable::checkWidth(int rowIndex, int colIndex, QString defValue)
void PrefsTable::checkWidth(int rowIndex, int colIndex, const QString& defValue)
{
if (static_cast<int>(m_table[rowIndex].size()) <= (colIndex + 1))
{
/trunk/Scribus/scribus/prefstable.h
44,9 → 44,9
Table m_table;
int m_rowCount;
int m_colCount;
void checkSize(int rowIndex, int colIndex, QString defValue = "");
void checkSize(int rowIndex, int colIndex, const QString& defValue = "");
void checkHeight(int rowIndex);
void checkWidth(int rowIndex, int colIndex, QString defValue = "");
void checkWidth(int rowIndex, int colIndex, const QString& defValue = "");
public:
PrefsTable(const QString& tableName);
~PrefsTable();
/trunk/Scribus/scribus/pslib.cpp
537,7 → 537,7
return cc.arg(m11).arg(m12).arg(m21).arg(m22).arg(x).arg(y);
}
 
void PSLib::PS_set_Info(QString art, QString was)
void PSLib::PS_set_Info(const QString& art, const QString& was)
{
if (art == "Author")
User = was;
547,7 → 547,7
Titel = was;
}
 
bool PSLib::PS_set_file(QString fn)
bool PSLib::PS_set_file(const QString& fn)
{
Spool.setFileName(fn);
if (Spool.exists())
657,20 → 657,19
return true;
}
 
QString PSLib::PSEncode(QString in)
QString PSLib::PSEncode(const QString& in)
{
static QRegExp badchars("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]");
QString tmp = "";
tmp = in.simplified().replace( badchars, "_" );
QString tmp(in.simplified().replace( badchars, "_" ));
return tmp;
}
 
void PSLib::PS_TemplateStart(QString Name)
void PSLib::PS_TemplateStart(const QString& Name)
{
PutStream("/"+PSEncode(Name)+"\n{\n");
}
 
void PSLib::PS_UseTemplate(QString Name)
void PSLib::PS_UseTemplate(const QString& Name)
{
PutStream(PSEncode(Name)+"\n");
}
1052,7 → 1051,7
}
}
 
void PSLib::PS_selectfont(QString f, double s)
void PSLib::PS_selectfont(const QString& f, double s)
{
PutStream(UsedFonts[f] + " " + ToStr(s) + " se\n");
}
1065,7 → 1064,7
PutStream(FillColor + " cmyk fill\n");
}
 
void PSLib::PS_fillspot(QString color, double shade)
void PSLib::PS_fillspot(const QString& color, double shade)
{
if (fillRule)
PutStream(ToStr(shade / 100.0)+" "+spotMap[color]+" eofill\n");
1073,7 → 1072,7
PutStream(ToStr(shade / 100.0)+" "+spotMap[color]+" fill\n");
}
 
void PSLib::PS_strokespot(QString color, double shade)
void PSLib::PS_strokespot(const QString& color, double shade)
{
PutStream(ToStr(shade / 100.0)+" "+spotMap[color]+" st\n");
}
1102,13 → 1101,13
PutStream("/hyphen glyphshow\n");
}
 
void PSLib::PS_showSub(uint chr, QString font, double size, bool stroke)
void PSLib::PS_showSub(uint chr, const QString& font, double size, bool stroke)
{
PutStream(" (G"+IToStr(chr)+") "+font+" "+ToStr(size / 10.0)+" ");
PutStream(stroke ? "shgs\n" : "shgf\n");
}
 
bool PSLib::PS_ImageData(PageItem *item, QString fn, QString Name, QString Prof, bool UseEmbedded)
bool PSLib::PS_ImageData(PageItem *item, const QString& fn, const QString& Name, const QString& Prof, bool UseEmbedded)
{
bool dummy;
QByteArray tmp;
1189,7 → 1188,7
return true;
}
 
bool PSLib::PS_image(PageItem *item, double x, double y, QString fn, double scalex, double scaley, QString Prof, bool UseEmbedded, QString Name)
bool PSLib::PS_image(PageItem *item, double x, double y, const QString& fn, double scalex, double scaley, const QString& Prof, bool UseEmbedded, const QString& Name)
{
bool dummy;
QByteArray tmp;
1361,7 → 1360,7
}
 
 
void PSLib::PS_plate(int nr, QString name)
void PSLib::PS_plate(int nr, const QString& name)
{
switch (nr)
{
1401,13 → 1400,13
GraySc = true;
}
 
void PSLib::PDF_Bookmark(QString text, uint Seite)
void PSLib::PDF_Bookmark(const QString& text, uint Seite)
{
PutStream("[/Title ("+text+") /Page "+IToStr(Seite)+" /View [/Fit]\n");
PutStream("/OUT pdfmark\n");
}
 
void PSLib::PDF_Annotation(PageItem *item, QString text, double x, double y, double b, double h)
void PSLib::PDF_Annotation(PageItem *item, const QString& text, double x, double y, double b, double h)
{
PutStream("[\n/Rect [ "+ToStr(x)+" "+ToStr(y) +" "+ToStr(b)+" "+ToStr(h)+" ]\n");
switch (item->annotation().Type())
1469,7 → 1468,7
Spool.close();
}
 
void PSLib::PS_insert(QString i)
void PSLib::PS_insert(const QString& i)
{
PutStream(i);
}
/trunk/Scribus/scribus/pslib.h
80,8 → 80,8
virtual void PS_Error_MaskLoadFailure(const QString& fileName);
virtual void PS_Error_InsufficientMemory(void);
 
virtual bool PS_set_file(QString fn);
virtual void PS_set_Info(QString art, QString was);
virtual bool PS_set_file(const QString& fn);
virtual void PS_set_Info(const QString& art, const QString& was);
virtual bool PS_begin_doc(ScribusDoc *doc, double x, double y, double width, double height, int numpage, bool doDev, bool sep, bool farb);
virtual void PS_begin_page(ScPage* pg, MarginStruct* Ma, bool Clipping);
virtual void PS_end_page();
101,26 → 101,26
virtual void PS_setlinewidth(double w);
virtual void PS_setcapjoin(Qt::PenCapStyle ca, Qt::PenJoinStyle jo);
virtual void PS_setdash(Qt::PenStyle st, double offset, QVector<double> dash);
virtual void PS_selectfont(QString f, double s);
virtual void PS_selectfont(const QString& f, double s);
virtual void PS_fill();
virtual void PS_fillspot(QString color, double shade);
virtual void PS_fillspot(const QString& color, double shade);
virtual void PS_stroke();
virtual void PS_strokespot(QString color, double shade);
virtual void PS_strokespot(const QString& color, double shade);
virtual void PS_fill_stroke();
virtual void PS_newpath();
virtual void PS_show(double x, double y);
virtual void PS_showSub(uint chr, QString font, double size, bool stroke);
virtual bool PS_image(PageItem *item, double x, double y, QString fn, double scalex, double scaley, QString Prof, bool UseEmbedded, QString Name = "");
virtual bool PS_ImageData(PageItem *item, QString fn, QString Name, QString Prof, bool UseEmbedded);
virtual void PS_plate(int nr, QString name = "");
virtual void PS_showSub(uint chr, const QString& font, double size, bool stroke);
virtual bool PS_image(PageItem *item, double x, double y, const QString& fn, double scalex, double scaley, const QString& Prof, bool UseEmbedded, const QString& Name = "");
virtual bool PS_ImageData(PageItem *item, const QString& fn, const QString& Name, const QString& Prof, bool UseEmbedded);
virtual void PS_plate(int nr, const QString& name = "");
virtual void PS_setGray();
virtual void PDF_Bookmark(QString text, uint Seite);
virtual void PDF_Annotation(PageItem *item, QString text, double x, double y, double b, double h);
virtual void PDF_Bookmark(const QString& text, uint Seite);
virtual void PDF_Annotation(PageItem *item, const QString& text, double x, double y, double b, double h);
virtual void PS_close();
virtual void PS_insert(QString i);
virtual void PS_TemplateStart(QString Name);
virtual void PS_insert(const QString& i);
virtual void PS_TemplateStart(const QString& Name);
virtual void PS_TemplateEnd();
virtual void PS_UseTemplate(QString Name);
virtual void PS_UseTemplate(const QString& Name);
virtual bool ProcessItem(ScribusDoc* Doc, ScPage* page, PageItem* item, uint PNr, bool sep, bool farb, bool master, bool embedded = false, bool useTemplate = false);
virtual void ProcessPage(ScribusDoc* Doc, ScPage* page, uint PNr, bool sep = false, bool farb = true);
virtual bool ProcessMasterPageLayer(ScribusDoc* Doc, ScPage* page, ScLayer& ll, uint PNr, bool sep = false, bool farb = true);
167,7 → 167,7
QString ToStr(double c);
QString IToStr(int c);
QString MatrixToStr(double m11, double m12, double m21, double m22, double x, double y);
QString PSEncode(QString in);
QString PSEncode(const QString& in);
QString ErrorMessage;
QString Prolog;
QString Header;
/trunk/Scribus/scribus/sccolor.cpp
31,7 → 31,7
#include "scribusdoc.h"
#include "scribusstructs.h"
 
ScColor::ScColor(void)
ScColor::ScColor()
{
// Model = colorModelCMYK;
// CR = MG = YB = K = 0;
/trunk/Scribus/scribus/sccolor.h
55,7 → 55,7
friend class ScColorEngine;
 
/** \brief Constructs a ScColor with 4 Components set to 0 */
ScColor(void);
ScColor();
/** \brief Constructs a ScColor with 4 Components in the range from 0 - 255 */
ScColor(int c, int m, int y, int k);
/** \brief Constructs a RGB color with 3 Components in the range from 0 - 255 */
/trunk/Scribus/scribus/scdocoutput_ps2.cpp
15,7 → 15,7
 
using namespace std;
 
ScDocOutput_Ps2::ScDocOutput_Ps2(ScribusDoc* doc, QString fileName, vector<int>& pageNumbers, QRect& clip, ScPs2OutputParams& options)
ScDocOutput_Ps2::ScDocOutput_Ps2(ScribusDoc* doc, const QString& fileName, vector<int>& pageNumbers, QRect& clip, ScPs2OutputParams& options)
{
m_doc = doc;
m_file.setFileName(fileName);
/trunk/Scribus/scribus/scdocoutput_ps2.h
48,7 → 48,7
bool initializeCmsTransforms();
 
public:
ScDocOutput_Ps2(ScribusDoc* doc, QString fileName, std::vector<int>& pageNumbers, QRect& clip, ScPs2OutputParams& options);
ScDocOutput_Ps2(ScribusDoc* doc, const QString& fileName, std::vector<int>& pageNumbers, QRect& clip, ScPs2OutputParams& options);
~ScDocOutput_Ps2();
 
void setAuthor(const QString& author) { m_author = author; }
/trunk/Scribus/scribus/scfonts.cpp
74,7 → 74,7
 
/***************************************************************************/
 
SCFonts::SCFonts() : QMap<QString,ScFace>(), FontPath()
SCFonts::SCFonts()
{
// insert("", ScFace::none()); // Wtf why inserting an empty entry here ????
showFontInformation=false;
628,7 → 628,7
}
 
// Load a single font into the library from the passed filename. Returns true on error.
bool SCFonts::AddScalableFont(QString filename, FT_Library &library, QString DocName)
bool SCFonts::AddScalableFont(const QString& filename, FT_Library &library, const QString& DocName)
{
static bool firstRun;
bool Subset = false;
946,7 → 946,7
return findFont(fontFamily + " " + fontStyle, doc);
}
 
QMap<QString,QString> SCFonts::getSubstitutions(const QList<QString> skip) const
QMap<QString,QString> SCFonts::getSubstitutions(const QList<QString>& skip) const
{
QMap<QString,QString> result;
QMap<QString,ScFace>::ConstIterator it;
1155,7 → 1155,7
WriteCacheList(prefsLocation);
}
 
void SCFonts::WriteCacheList(QString pf)
void SCFonts::WriteCacheList(const QString& pf)
{
QDomDocument docu("fontcacherc");
QString st="<CachedFonts></CachedFonts>";
1184,7 → 1184,7
}
}
 
void SCFonts::GetFonts(QString pf, bool showFontInfo)
void SCFonts::GetFonts(const QString& pf, bool showFontInfo)
{
showFontInformation=showFontInfo;
FontPath.clear();
/trunk/Scribus/scribus/scfonts.h
39,7 → 39,7
SCFonts();
~SCFonts();
void updateFontMap();
void GetFonts(QString pf, bool showFontInfo=false);
void GetFonts(const QString& pf, bool showFontInfo=false);
ScFace LoadScalableFont(const QString &filename);
void AddScalableFonts(const QString& path, const QString& DocName = "");
/// Returns a font with that name; creates a replacement font if not found
46,7 → 46,7
const ScFace& findFont(const QString& fontName, ScribusDoc* doc = nullptr);
const ScFace& findFont(const QString& fontFamily, const QString& fontStyle, ScribusDoc* doc = nullptr);
/// Returns a map of pairs (scName, replacementName). Using this map for replaceFonts() will make substitutions permanent
QMap<QString,QString> getSubstitutions(const QList<QString> skip = QList<QString>()) const;
QMap<QString,QString> getSubstitutions(const QList<QString>& skip = QList<QString>()) const;
/// Changes replacement fonts to point to new real fonts. For all keys 'nam' in 'substitutes', findFont(name).isReplacement() must be true
void setSubstitutions(const QMap<QString,QString>& substitutes, ScribusDoc* doc = nullptr);
void removeFont(const QString& name);
56,9 → 56,9
QMap<QString, QStringList> fontMap;
private:
void ReadCacheList(const QString& pf);
void WriteCacheList(QString pf);
void WriteCacheList(const QString& pf);
void AddPath(QString p);
bool AddScalableFont(QString filename, FT_Library &library, QString DocName);
bool AddScalableFont(const QString& filename, FT_Library &library, const QString& DocName);
void AddUserPath(const QString& pf);
#ifdef HAVE_FONTCONFIG
void AddFontconfigFonts();
/trunk/Scribus/scribus/scimage.cpp
955,7 → 955,7
}
}
 
void ScImage::tritone(ScribusDoc* doc, ScColor color1, int shade1, FPointArray curve1, bool lin1, ScColor color2, int shade2, FPointArray curve2, bool lin2, ScColor color3, int shade3, FPointArray curve3, bool lin3, bool cmyk)
void ScImage::tritone(ScribusDoc* doc, ScColor color1, int shade1, FPointArray curve1, bool lin1, ScColor color2, int shade2, FPointArray curve2, bool lin2, ScColor color3, int shade3, const FPointArray& curve3, bool lin3, bool cmyk)
{
int h = height();
int w = width();
1195,7 → 1195,7
return true;
}
 
bool ScImage::convert2JPG(QString fn, int Quality, bool isCMYK, bool isGray)
bool ScImage::convert2JPG(const QString& fn, int Quality, bool isCMYK, bool isGray)
{
bool success = false;
QFile file(fn);
/trunk/Scribus/scribus/scimage.h
92,7 → 92,7
bool writePSImageToFilter(ScStreamFilter* filter, const QByteArray& mask, int pl) const;
 
bool getAlpha(const QString& fn, int page, QByteArray& alpha, bool PDF, bool pdf14, int gsRes = 72, int scaleXSize = 0, int scaleYSize = 0);
bool convert2JPG(QString fn, int Quality, bool isCMYK, bool isGray);
bool convert2JPG(const QString& fn, int Quality, bool isCMYK, bool isGray);
 
// Image effects
void applyEffect(const ScImageEffectList& effectsList, ColorList& colors, bool cmyk);
132,7 → 132,7
void invert(bool cmyk);
void colorize(ScribusDoc* doc, ScColor color, int shade, bool cmyk);
void duotone(ScribusDoc* doc, ScColor color1, int shade1, FPointArray curve1, bool lin1, ScColor color2, int shade2, FPointArray curve2, bool lin2, bool cmyk);
void tritone(ScribusDoc* doc, ScColor color1, int shade1, FPointArray curve1, bool lin1, ScColor color2, int shade2, FPointArray curve2, bool lin2, ScColor color3, int shade3, FPointArray curve3, bool lin3, bool cmyk);
void tritone(ScribusDoc* doc, ScColor color1, int shade1, FPointArray curve1, bool lin1, ScColor color2, int shade2, FPointArray curve2, bool lin2, ScColor color3, int shade3, const FPointArray& curve3, bool lin3, bool cmyk);
void quadtone(ScribusDoc* doc, ScColor color1, int shade1, FPointArray curve1, bool lin1, ScColor color2, int shade2, FPointArray curve2, bool lin2, ScColor color3, int shade3, FPointArray curve3, bool lin3, ScColor color4, int shade4, FPointArray curve4, bool lin4, bool cmyk);
void toGrayscale(bool cmyk);
void doGraduate(FPointArray curve, bool cmyk, bool linear);
/trunk/Scribus/scribus/scimagecachemanager.cpp
629,7 → 629,7
 
if (!references.contains(isi.key()))
{
QString ref = isi.key();
const QString& ref = isi.key();
QString img = ref;
img.replace(reRef, ScImageCacheProxy::imageSuffix);
scDebug() << "removing orphaned reference/image files" << ref << img;
/trunk/Scribus/scribus/scpainter.cpp
314,7 → 314,7
m_strokeMode = stroke;
}
 
void ScPainter::setGradient(VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc, double scale, double skew)
void ScPainter::setGradient(VGradient::VGradientType mode, const FPoint& orig, const FPoint& vec, const FPoint& foc, double scale, double skew)
{
fill_gradient.setType(mode);
fill_gradient.setOrigin(orig);
342,7 → 342,7
m_maskMode = mask;
}
 
void ScPainter::setGradientMask(VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc, double scale, double skew)
void ScPainter::setGradientMask(VGradient::VGradientType mode, const FPoint& orig, const FPoint& vec, const FPoint& foc, double scale, double skew)
{
mask_gradient.setType(mode);
mask_gradient.setOrigin(orig);
375,7 → 375,7
m_mask_patternMirrorY = mirrorY;
}
 
void ScPainter::set4ColorGeometry(FPoint p1, FPoint p2, FPoint p3, FPoint p4, FPoint c1, FPoint c2, FPoint c3, FPoint c4)
void ScPainter::set4ColorGeometry(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4)
{
fill_gradient.setType(VGradient::fourcolor);
gradPatchP1 = p1;
388,7 → 388,7
gradControlP4 = c4;
}
 
void ScPainter::set4ColorColors(QColor col1, QColor col2, QColor col3, QColor col4)
void ScPainter::set4ColorColors(const QColor& col1, const QColor& col2, const QColor& col3, const QColor& col4)
{
gradPatchColor1 = col1;
gradPatchColor2 = col2;
396,7 → 396,7
gradPatchColor4 = col4;
}
 
void ScPainter::setDiamondGeometry(FPoint p1, FPoint p2, FPoint p3, FPoint p4, FPoint c1, FPoint c2, FPoint c3, FPoint c4, FPoint c5)
void ScPainter::setDiamondGeometry(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4, const FPoint& c5)
{
fill_gradient.setType(VGradient::diamond);
gradPatchP1 = p1;
410,7 → 410,7
gradControlP5 = c5;
}
 
void ScPainter::setMeshGradient(FPoint p1, FPoint p2, FPoint p3, FPoint p4, QList<QList<MeshPoint> > meshArray)
void ScPainter::setMeshGradient(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const QList<QList<MeshPoint>>& meshArray)
{
fill_gradient.setType(VGradient::mesh);
meshGradientArray = meshArray;
420,7 → 420,7
gradPatchP4 = p4;
}
 
void ScPainter::setMeshGradient(FPoint p1, FPoint p2, FPoint p3, FPoint p4, QList<meshGradientPatch> meshPatches)
void ScPainter::setMeshGradient(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const QList<meshGradientPatch>& meshPatches)
{
fill_gradient.setType(VGradient::freemesh);
meshGradientPatches = meshPatches;
430,7 → 430,7
gradPatchP4 = p4;
}
 
void ScPainter::setHatchParameters(int mode, double distance, double angle, bool useBackground, QColor background, QColor foreground, double width, double height)
void ScPainter::setHatchParameters(int mode, double distance, double angle, bool useBackground, const QColor& background, const QColor& foreground, double width, double height)
{
m_hatchType = mode;
m_hatchDistance = distance;
1582,7 → 1582,7
strokePath();
}
 
void ScPainter::drawLine(FPoint start, FPoint end)
void ScPainter::drawLine(const FPoint& start, const FPoint& end)
{
newPath();
moveTo(start.x(), start.y());
1647,7 → 1647,7
strokePath();
}
 
void ScPainter::drawText(QRectF area, QString text, bool filled, int align)
void ScPainter::drawText(QRectF area, const QString& text, bool filled, int align)
{
cairo_text_extents_t extents;
cairo_font_extents_t extentsF;
1771,7 → 1771,7
#endif
}
 
void ScPainter::drawShadeCircle(const QRectF &re, const QColor color, bool sunken, int lineWidth)
void ScPainter::drawShadeCircle(const QRectF &re, const QColor& color, bool sunken, int lineWidth)
{
setStrokeMode(1);
double bezierCircle = 0.55228475;
1819,7 → 1819,7
cairo_restore( m_cr );
}
 
void ScPainter::drawShadePanel(const QRectF &r, const QColor color, bool sunken, int lineWidth)
void ScPainter::drawShadePanel(const QRectF &r, const QColor& color, bool sunken, int lineWidth)
{
QColor shade;
QColor light;
1861,7 → 1861,7
fillPath();
}
 
void ScPainter::colorizeAlpha(QColor color)
void ScPainter::colorizeAlpha(const QColor& color)
{
cairo_surface_t *data = cairo_get_group_target(m_cr);
cairo_surface_flush(data);
1886,7 → 1886,7
cairo_surface_mark_dirty(data);
}
 
void ScPainter::colorize(QColor color)
void ScPainter::colorize(const QColor& color)
{
cairo_surface_t *data = cairo_get_group_target(m_cr);
cairo_surface_flush(data);
/trunk/Scribus/scribus/scpainter.h
71,20 → 71,20
virtual int maskMode() { return m_maskMode; }
virtual void setStrokeMode( int stroke );
virtual int strokeMode() { return m_strokeMode; }
virtual void setGradient( VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc, double scale, double skew);
virtual void setGradient( VGradient::VGradientType mode, const FPoint& orig, const FPoint& vec, const FPoint& foc, double scale, double skew);
virtual void setPattern(ScPattern *pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
 
virtual void setMaskMode( int mask );
virtual void setGradientMask( VGradient::VGradientType mode, FPoint orig, FPoint vec, FPoint foc, double scale, double skew);
virtual void setGradientMask(VGradient::VGradientType mode, const FPoint& orig, const FPoint& vec, const FPoint& foc, double scale, double skew);
virtual void setPatternMask(ScPattern *pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
 
virtual void set4ColorGeometry(FPoint p1, FPoint p2, FPoint p3, FPoint p4, FPoint c1, FPoint c2, FPoint c3, FPoint c4);
virtual void set4ColorColors(QColor col1, QColor col2, QColor col3, QColor col4);
virtual void setDiamondGeometry(FPoint p1, FPoint p2, FPoint p3, FPoint p4, FPoint c1, FPoint c2, FPoint c3, FPoint c4, FPoint c5);
virtual void setMeshGradient(FPoint p1, FPoint p2, FPoint p3, FPoint p4, QList<QList<MeshPoint> > meshArray);
virtual void setMeshGradient(FPoint p1, FPoint p2, FPoint p3, FPoint p4, QList<meshGradientPatch> meshPatches);
virtual void set4ColorGeometry(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4);
virtual void set4ColorColors(const QColor& col1, const QColor& col2, const QColor& col3, const QColor& col4);
virtual void setDiamondGeometry(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4, const FPoint& c5);
virtual void setMeshGradient(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const QList<QList<MeshPoint> >& meshArray);
virtual void setMeshGradient(const FPoint& p1, const FPoint& p2, const FPoint& p3, const FPoint& p4, const QList<meshGradientPatch>& meshPatches);
 
virtual void setHatchParameters(int mode, double distance, double angle, bool useBackground, QColor background, QColor foreground, double width, double height);
virtual void setHatchParameters(int mode, double distance, double angle, bool useBackground, const QColor& background, const QColor& foreground, double width, double height);
 
virtual void setClipPath();
 
95,17 → 95,17
virtual void sharpLineHelper(QPointF &pp);
virtual void drawPolygon();
virtual void drawPolyLine();
virtual void drawLine(FPoint start, FPoint end);
virtual void drawLine(const FPoint& start, const FPoint& end);
virtual void drawLine(const QPointF& start, const QPointF& end);
virtual void drawSharpLine(FPoint start, FPoint end);
virtual void drawSharpLine(QPointF start, QPointF end);
virtual void drawRect(double, double, double, double);
virtual void drawSharpRect(double x, double y, double w, double h);
virtual void drawText(QRectF area, QString text, bool filled = true, int align = 0);
virtual void drawShadeCircle(const QRectF &re, const QColor color, bool sunken, int lineWidth);
virtual void drawShadePanel(const QRectF &r, const QColor color, bool sunken, int lineWidth);
virtual void colorizeAlpha(QColor color);
virtual void colorize(QColor color);
virtual void drawText(QRectF area, const QString& text, bool filled = true, int align = 0);
virtual void drawShadeCircle(const QRectF &re, const QColor& color, bool sunken, int lineWidth);
virtual void drawShadePanel(const QRectF &r, const QColor& color, bool sunken, int lineWidth);
virtual void colorizeAlpha(const QColor& color);
virtual void colorize(const QColor& color);
virtual void blurAlpha(int radius);
virtual void blur(int radius);
 
/trunk/Scribus/scribus/scplugin.cpp
126,13 → 126,13
return false;
}
 
bool ScActionPlugin::run(QWidget *, ScribusDoc* /*doc*/, QString /* target */)
bool ScActionPlugin::run(QWidget *, ScribusDoc* /*doc*/, const QString& /* target */)
{
return false;
}
 
// Stub for plugins that don't implement this method to inherit
DeferredTask* ScActionPlugin::runAsync(QString /* target */)
DeferredTask* ScActionPlugin::runAsync(const QString& /* target */)
{
return nullptr;
}
/trunk/Scribus/scribus/scplugin.h
343,7 → 343,7
* @returns bool True for success.
*
*/
virtual bool run(ScribusDoc* doc, QString target = QString::null) = 0;
virtual bool run(ScribusDoc* doc, const QString& target = QString::null) = 0;
 
/**
* @brief Run the plug-in's main action.
352,7 → 352,7
* a parent widget reference. It's useful e.g. when you need to
* open a dialog on a specific parent one.
*/
virtual bool run(QWidget* parent, ScribusDoc* doc, QString target = QString::null);
virtual bool run(QWidget* parent, ScribusDoc* doc, const QString& target = QString::null);
 
/**
* @brief Run the plugin on a QIODevice
411,7 → 411,7
* If this method is used, the plugin must not be unloaded until all
* DeferredTask instances have been deleted.
*/
virtual DeferredTask* runAsync(QString target = QString::null);
virtual DeferredTask* runAsync(const QString& target = QString::null);
 
/**
* @brief Run the plugin asynchronously
/trunk/Scribus/scribus/scribus.cpp
469,7 → 469,7
delete m_tocGenerator;
}
 
void ScribusMainWindow::addScToolBar(ScToolBar *tb, QString name)
void ScribusMainWindow::addScToolBar(ScToolBar *tb, const QString & name)
{
if (!scrToolBars.contains(name))
scrToolBars.insert(name, tb);
1447,7 → 1447,7
}
}
 
void ScribusMainWindow::setStatusBarInfoText(QString newText)
void ScribusMainWindow::setStatusBarInfoText(const QString & newText)
{
if (m_mainWindowStatusLabel)
m_mainWindowStatusLabel->setText(newText);
2075,7 → 2075,7
return foundFiles.toList();
}
 
bool ScribusMainWindow::recoverFile(QStringList foundFiles)
bool ScribusMainWindow::recoverFile(const QStringList& foundFiles)
{
appModeHelper->setStartupActionsEnabled(false);
bool ret = false;
6985,7 → 6985,7
doPrintPreview();
}
 
bool ScribusMainWindow::DoSaveAsEps(QString fn, QString& error)
bool ScribusMainWindow::DoSaveAsEps(const QString& fn, QString& error)
{
QStringList spots;
bool return_value = true;
7473,7 → 7473,7
doc->Last = bookmarkPalette->BView->Last;
}
 
void ScribusMainWindow::slotElemRead(QString xml, double x, double y, bool art, bool loca, ScribusDoc* docc, ScribusView* vie)
void ScribusMainWindow::slotElemRead(const QString& xml, double x, double y, bool art, bool loca, ScribusDoc* docc, ScribusView* vie)
{
if (doc == docc && docc->appMode == modeEditClip)
view->requestMode(submodeEndNodeEdit);
7681,7 → 7681,7
updateActiveWindowCaption(doc->DocName);
}
 
void ScribusMainWindow::editMasterPagesStart(QString temp)
void ScribusMainWindow::editMasterPagesStart(const QString& temp)
{
if (!HaveDoc)
return;
8070,7 → 8070,7
delete dia;
}
 
QString ScribusMainWindow::CFileDialog(QString workingDirectory, QString dialogCaption, QString fileFilter, QString defaultFilename, int optionFlags, bool *useCompression, bool *useFonts, bool *useProfiles)
QString ScribusMainWindow::CFileDialog(const QString& workingDirectory, const QString& dialogCaption, const QString& fileFilter, const QString& defaultFilename, int optionFlags, bool *useCompression, bool *useFonts, bool *useProfiles)
{
// changed from "this" to qApp->activeWindow() to be sure it will be opened
// with the current active window as parent. E.g. it won't hide StoryEditor etc. -- PV
8964,7 → 8964,7
}
}
 
void ScribusMainWindow::PutToInline(QString buffer)
void ScribusMainWindow::PutToInline(const QString& buffer)
{
if (!HaveDoc)
return;
/trunk/Scribus/scribus/scribus.h
134,7 → 134,7
* \retval 0 - ok, 1 - no fonts, ...
*/
int initScMW(bool primaryMainwWindow);
void addScToolBar(ScToolBar *tb, QString name);
void addScToolBar(ScToolBar *tb, const QString& name);
bool warningVersion(QWidget *parent);
void SetShortCut();
void startUpDialog();
160,8 → 160,8
void updateRecent(const QString& fn);
void doPasteRecent(const QString& data);
bool getPDFDriver(const QString & filename, const QString & name, int components, const std::vector<int> & pageNumbers, const QMap<int, QImage> & thumbs, QString& error, bool* cancelled = nullptr);
bool DoSaveAsEps(QString fn, QString& error);
QString CFileDialog(QString workingDirectory = ".", QString dialogCaption = "", QString fileFilter = "", QString defNa = "",
bool DoSaveAsEps(const QString& fn, QString& error);
QString CFileDialog(const QString& workingDirectory = ".", const QString& dialogCaption = "", const QString& fileFilter = "", const QString& defNa = "",
int optionFlags = fdExistingFiles, bool *useCompression = 0, bool *useFonts = 0, bool *useProfiles = 0);
/*! \brief Recalculate the colors after changing CMS settings.
Call the appropriate document function and then update the GUI elements.
173,7 → 173,7
void updateLayerMenu();
void emergencySave();
QStringList findRecoverableFile();
bool recoverFile(QStringList foundFiles);
bool recoverFile(const QStringList& foundFiles);
 
/**
* @brief Returns true if an arrow key is pressed down.
289,7 → 289,7
void setStatusBarTextPosition(double base, double xp);
void setStatusBarTextSelectedItemInfo();
void setTempStatusBarText(const QString &text);
void setStatusBarInfoText(QString newText);
void setStatusBarInfoText(const QString& newText);
bool DoFileClose();
void windowsMenuAboutToShow();
//! \brief Handle the Extras menu for its items availability.
299,7 → 299,7
void updateActiveWindowCaption(const QString &newCaption);
void windowsMenuActivated(int id);
void PutScrap(int scID);
void PutToInline(QString buffer);
void PutToInline(const QString& buffer);
void PutToInline();
void PutToPatterns();
void ConvertToSymbol();
314,7 → 314,7
void editSymbolEnd();
void editInlineStart(int id);
void editInlineEnd();
void editMasterPagesStart(QString temp = "");
void editMasterPagesStart(const QString& temp = "");
void editMasterPagesEnd();
/** \brief generate a new document in the current view */
bool slotFileNew();
500,7 → 500,7
void setItemEffects(int h);
void setStyleEffects(int s);
void setItemTypeStyle(int id);
void slotElemRead(QString Name, double x, double y, bool art, bool loca, ScribusDoc* docc, ScribusView* vie);
void slotElemRead(const QString& Name, double x, double y, bool art, bool loca, ScribusDoc* docc, ScribusView* vie);
void slotChangeUnit(int art, bool draw = true);
/*!
* @brief Apply master pages from the Apply Master Page dialog
/trunk/Scribus/scribus/scribusdoc.cpp
8912,7 → 8912,7
itemSelection_ApplyParagraphStyle(newStyle, customSelection);
}
 
void ScribusDoc::itemSelection_SetLanguage(QString m, Selection* customSelection)
void ScribusDoc::itemSelection_SetLanguage(const QString & m, Selection* customSelection)
{
CharStyle newStyle;
newStyle.setLanguage(m);
/trunk/Scribus/scribus/scribusdoc.h
1063,7 → 1063,7
void itemSelection_SetDirection(int w, Selection* customSelection = nullptr);
void itemSelection_SetLineSpacing(double w, Selection* customSelection = nullptr);
void itemSelection_SetLineSpacingMode(int w, Selection* customSelection = nullptr);
void itemSelection_SetLanguage(QString w, Selection* customSelection = nullptr);
void itemSelection_SetLanguage(const QString& w, Selection* customSelection = nullptr);
void itemSetFont(const QString& newFont);
void itemSelection_SetFont(const QString& fon, Selection* customSelection = nullptr);
void itemSelection_SetParBackgroundColor(QString farbe, Selection* customSelection = nullptr);
/trunk/Scribus/scribus/scxmlstreamreader.cpp
146,7 → 146,7
return retValue;
}
 
QString ScXmlStreamAttributes::valueAsString (const char* attrName, const QString def) const
QString ScXmlStreamAttributes::valueAsString (const char* attrName, const QString& def) const
{
QString retValue = def;
QStringRef att = value(QLatin1String(attrName));
/trunk/Scribus/scribus/scxmlstreamreader.h
29,7 → 29,7
uint valueAsUInt (const QString& attrName, uint def = 0) const;
double valueAsDouble (const char* attrName, double def = 0.0) const;
double valueAsDouble (const QString& attrName, double def = 0.0) const;
QString valueAsString (const char* attrName, const QString def = QString()) const;
QString valueAsString (const char* attrName, const QString& def = QString()) const;
QString valueAsString (const QString& attrName, const QString& def = QString()) const;
};
 
/trunk/Scribus/scribus/serializer.cpp
53,13 → 53,13
QList<QString> fonts;
QList<QString> patterns;
 
void collectItem(PageItem* p) { items.append(p); }
void collectColor(QString name, ScColor c) { colors[name] = c; }
void collectStyle(ParagraphStyle* style) { if (style && !style->name().isEmpty()) pstyles.append(style); }
void collectCharStyle(CharStyle* style) { if (style && !style->name().isEmpty()) cstyles.append(style); }
void collectLineStyle(QString name, multiLine& m) { lstyles[name] = m; }
void collectFont(QString name) { fonts.append(name); }
void collectPattern(QString name) { patterns.append(name); }
void collectItem(PageItem* p) { items.append(p); }
void collectColor(const QString& name, ScColor c) { colors[name] = c; }
void collectStyle(ParagraphStyle* style) { if (style && !style->name().isEmpty()) pstyles.append(style); }
void collectCharStyle(CharStyle* style) { if (style && !style->name().isEmpty()) cstyles.append(style); }
void collectLineStyle(const QString& name, multiLine& m) { lstyles[name] = m; }
void collectFont(QString name) { fonts.append(name); }
void collectPattern(QString name) { patterns.append(name); }
};
 
 
/trunk/Scribus/scribus/text/storytext.cpp
609,7 → 609,7
}
}
 
void StoryText::insertChars(QString txt, bool applyNeighbourStyle) //, const CharStyle & charstyle)
void StoryText::insertChars(const QString& txt, bool applyNeighbourStyle) //, const CharStyle & charstyle)
{
insertChars(d->cursorPosition, txt, applyNeighbourStyle);
}
655,7 → 655,7
invalidate(pos, pos + txt.length());
}
 
void StoryText::insertCharsWithSoftHyphens(int pos, QString txt, bool applyNeighbourStyle)
void StoryText::insertCharsWithSoftHyphens(int pos, const QString& txt, bool applyNeighbourStyle)
{
if (pos < 0)
pos += length()+1;
/trunk/Scribus/scribus/text/storytext.h
118,7 → 118,7
// Removes trailing empty paragraphs
void trim();
// Insert chars at current cursor position
void insertChars(QString txt, bool applyNeighbourStyle = false);
void insertChars(const QString& txt, bool applyNeighbourStyle = false);
// Insert chars ar specific position
void insertChars(int pos, const QString& txt, bool applyNeighbourStyle = false);
// Insert inline object at current cursor position
290,7 → 290,7
static BreakIterator* m_lineIterator;
 
QString textWithSoftHyphens (int pos, uint len) const;
void insertCharsWithSoftHyphens(int pos, QString txt, bool applyNeighbourStyle = false);
void insertCharsWithSoftHyphens(int pos, const QString& txt, bool applyNeighbourStyle = false);
/// mark these runs as invalid, ie. need itemize and shaping
void invalidate(int firstRun, int lastRun);
/trunk/Scribus/scribus/text/textlayoutpainter.cpp
15,7 → 15,7
TextLayoutPainter::~TextLayoutPainter()
{ }
 
void TextLayoutPainter::setFont(const ScFace font)
void TextLayoutPainter::setFont(const ScFace& font)
{
if (m_stack.top().font != font)
m_stack.top().font = font;
36,7 → 36,7
return m_stack.top().fontSize;
}
 
void TextLayoutPainter::setStrokeColor(const TextLayoutColor color)
void TextLayoutPainter::setStrokeColor(const TextLayoutColor& color)
{
m_stack.top().strokeColor = color;
}
46,7 → 46,7
return m_stack.top().strokeColor;
}
 
void TextLayoutPainter::setFillColor(const TextLayoutColor color)
void TextLayoutPainter::setFillColor(const TextLayoutColor& color)
{
m_stack.top().fillColor = color;
}
108,7 → 108,7
return m_stack.top().selected;
}
 
void TextLayoutPainter::setMatrix(const QTransform matrix)
void TextLayoutPainter::setMatrix(const QTransform& matrix)
{
m_stack.top().matrix = matrix;
}
/trunk/Scribus/scribus/text/textlayoutpainter.h
56,7 → 56,7
 
/// Sets the current font that will be used for all subsequent glyph
/// drawings.
virtual void setFont(const ScFace font);
virtual void setFont(const ScFace& font);
/// The current font.
virtual const ScFace& font() const;
 
67,12 → 67,12
virtual double fontSize() const;
 
/// Sets the current color for line strokes.
virtual void setStrokeColor(const TextLayoutColor c);
virtual void setStrokeColor(const TextLayoutColor& c);
/// The current color for line strokes.
virtual const TextLayoutColor& strokeColor() const;
 
/// Sets the current foreground color.
virtual void setFillColor(const TextLayoutColor c);
virtual void setFillColor(const TextLayoutColor& c);
/// The current foreground color.
virtual const TextLayoutColor& fillColor() const;
 
104,7 → 104,7
 
/// Sets the transformation matrix to be applied to subsequent drawing
/// operations.
virtual void setMatrix(const QTransform);
virtual void setMatrix(const QTransform&);
/// The current transformation matrix.
virtual const QTransform& matrix() const;
 
/trunk/Scribus/scribus/third_party/lib2geom/convex-cover.cpp
53,7 → 53,7
* returns the area of the triangle defined by p0, p1, p2. A clockwise triangle has positive area.
*/
double
SignedTriangleArea(Point p0, Point p1, Point p2) {
SignedTriangleArea(const Point& p0, const Point& p1, const Point& p2) {
return cross((p1 - p0), (p2 - p0));
}
 
60,10 → 60,10
class angle_cmp{
public:
Point o;
angle_cmp(Point o) : o(o) {}
angle_cmp(const Point& o) : o(o) {}
bool
operator()(Point a, Point b) {
operator()(const Point& a, const Point& b) {
Point da = a - o;
Point db = b - o;
151,7 → 151,7
/*** ConvexHull::left
* Tests if a point is left (outside) of a particular segment, n. */
bool
ConvexHull::is_left(Point p, int n) {
ConvexHull::is_left(const Point& p, int n) {
return SignedTriangleArea((*this)[n], (*this)[n+1], p) > 0;
}
 
159,7 → 159,7
* May return any number n where the segment n -> n + 1 (possibly looped around) in the hull such
* that the point is on the wrong side to be within the hull. Returns -1 if it is within the hull.*/
int
ConvexHull::find_left(Point p) {
ConvexHull::find_left(const Point& p) {
int l = boundary.size(); //Who knows if C++ is smart enough to optimize this?
for(int i = 0; i < l; i++) {
if(is_left(p, i)) return i;
/trunk/Scribus/scribus/third_party/lib2geom/convex-cover.h
111,8 → 111,8
// furthest point in a direction (lg time)
Point const * furthest(Point direction) const;
 
bool is_left(Point p, int n);
int find_left(Point p);
bool is_left(const Point& p, int n);
int find_left(const Point& p);
};
 
// do two convex hulls intersect?
/trunk/Scribus/scribus/third_party/lib2geom/point.cpp
98,7 → 98,7
tolerance; most callers would be ok with a tolerance of 0.25. */
}
 
Coord atan2(Point const p) {
Coord atan2(Point const& p) {
return std::atan2(p[Y], p[X]);
}
 
105,7 → 105,7
/** compute the angle turning from a to b. This should give \f$\pi/2\f$ for angle_between(a, rot90(a));
* This works by projecting b onto the basis defined by a, rot90(a)
*/
Coord angle_between(Point const a, Point const b) {
Coord angle_between(Point const& a, Point const& b) {
return std::atan2(cross(b,a), dot(b,a));
}
 
/trunk/Scribus/scribus/third_party/lib2geom/point.h
170,9 → 170,9
bool is_zero(Point const &p);
bool is_unit_vector(Point const &p);
 
extern double atan2(Point const p);
extern double atan2(Point const& p);
/** compute the angle turning from a to b (signed). */
extern double angle_between(Point const a, Point const b);
extern double angle_between(Point const& a, Point const& b);
 
//IMPL: NearConcept
inline bool are_near(Point const &a, Point const &b, double const eps=EPSILON) {
/trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
722,7 → 722,7
{
}
 
QString SlaDocumentRtfOutput::getFontName(QString name)
QString SlaDocumentRtfOutput::getFontName(const QString& name)
{
QString fontName(name);
SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
/trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.h
99,7 → 99,7
virtual void setDropCapsLines(const int value);
virtual void setDropCaps();
virtual void addTabStop(const int value, const int type);
QString getFontName(QString name);
QString getFontName(const QString& name);
double pixelsFromTwips(const int twips);
virtual QTextCodec *getCurrentCodec() { return m_codec; }
private:
/trunk/Scribus/scribus/third_party/zip/scribus_zip.cpp
27,8 → 27,8
 
ScZipHandler::ScZipHandler(bool forWrite)
{
m_uz = NULL;
m_zi = NULL;
m_uz = nullptr;
m_zi = nullptr;
if (forWrite)
m_zi = new Zip();
else
37,21 → 37,19
 
ScZipHandler::~ScZipHandler()
{
if (m_uz != NULL)
delete m_uz;
if (m_zi != NULL)
delete m_zi;
delete m_uz;
delete m_zi;
}
 
bool ScZipHandler::open(QString fileName)
bool ScZipHandler::open(const QString& fileName)
{
bool retVal = false;
if (m_uz != NULL)
if (m_uz != nullptr)
{
UnZip::ErrorCode ec = m_uz->openArchive(fileName);
retVal = (ec == UnZip::Ok);
}
if (m_zi != NULL)
if (m_zi != nullptr)
{
Zip::ErrorCode ec = m_zi->createArchive(fileName);
retVal = (ec == Zip::Ok);
62,12 → 60,12
bool ScZipHandler::close()
{
bool retVal = false;
if (m_uz != NULL)
if (m_uz != nullptr)
{
m_uz->closeArchive();
retVal = true;
}
if (m_zi != NULL)
if (m_zi != nullptr)
{
Zip::ErrorCode ec = m_zi->closeArchive();
retVal = (ec == Zip::Ok);
75,68 → 73,61
return retVal;
}
 
bool ScZipHandler::contains(QString fileName)
bool ScZipHandler::contains(const QString& fileName)
{
bool retVal = false;
if (m_uz != NULL)
retVal = m_uz->contains(fileName);
return retVal;
if (m_uz == nullptr)
return false;
return m_uz->contains(fileName);
}
 
bool ScZipHandler::read(QString fileName, QByteArray &buf)
bool ScZipHandler::read(const QString& fileName, QByteArray &buf)
{
bool retVal = false;
if (m_uz != NULL)
{
QByteArray byteArray;
QBuffer buffer(&byteArray);
buffer.open(QIODevice::WriteOnly);
UnZip::ErrorCode ec = m_uz->extractFile(fileName, &buffer);
retVal = (ec == UnZip::Ok);
if (retVal)
buf = byteArray;
}
if (m_uz == nullptr)
return false;
QByteArray byteArray;
QBuffer buffer(&byteArray);
buffer.open(QIODevice::WriteOnly);
UnZip::ErrorCode ec = m_uz->extractFile(fileName, &buffer);
bool retVal = (ec == UnZip::Ok);
if (retVal)
buf = byteArray;
return retVal;
}
 
bool ScZipHandler::write(QString dirName)
bool ScZipHandler::write(const QString& dirName)
{
bool retVal = false;
if (m_zi != NULL)
{
Zip::ErrorCode ec = m_zi->addDirectory(dirName, "", Zip::IgnoreRoot);
retVal = (ec == Zip::Ok);
}
return retVal;
if (m_uz == nullptr)
return false;
Zip::ErrorCode ec = m_zi->addDirectory(dirName, "", Zip::IgnoreRoot);
return (ec == Zip::Ok);
}
 
bool ScZipHandler::extract(QString name, QString path, ExtractionOption eo)
bool ScZipHandler::extract(const QString& name, const QString& path, ExtractionOption eo)
{
if (m_uz == nullptr)
return false;
bool retVal = false;
if (m_uz != NULL)
{
QString pwd = QDir::currentPath();
QString outDir;
if (path.isNull())
outDir = ScPaths::tempFileDir();
else
outDir=path;
QFile f(outDir);
QFileInfo fi(f);
if (!fi.isWritable())
outDir = ScPaths::applicationDataDir();
QDir::setCurrent(outDir);
UnZip::ErrorCode ec = m_uz->extractFile(name, outDir, static_cast<UnZip::ExtractionOption>(eo));
retVal = (ec == UnZip::Ok);
QDir::setCurrent(pwd);
}
QString pwd(QDir::currentPath());
QString outDir;
if (path.isNull())
outDir = ScPaths::tempFileDir();
else
outDir=path;
QFile f(outDir);
QFileInfo fi(f);
if (!fi.isWritable())
outDir = ScPaths::applicationDataDir();
QDir::setCurrent(outDir);
UnZip::ErrorCode ec = m_uz->extractFile(name, outDir, static_cast<UnZip::ExtractionOption>(eo));
retVal = (ec == UnZip::Ok);
QDir::setCurrent(pwd);
return retVal;
}
 
QStringList ScZipHandler::files()
{
QStringList retVal = QStringList();
if (m_uz != NULL)
QStringList retVal;
if (m_uz != nullptr)
retVal = m_uz->fileList();
return retVal;
}
/trunk/Scribus/scribus/third_party/zip/scribus_zip.h
38,12 → 38,12
 
ScZipHandler(bool forWrite = false);
virtual ~ScZipHandler();
bool open(QString fileName);
bool open(const QString& fileName);
bool close();
bool contains(QString fileName);
bool read(QString fileName, QByteArray &buf);
bool write(QString dirName);
bool extract(QString name, QString path, ExtractionOption eo);
bool contains(const QString& fileName);
bool read(const QString& fileName, QByteArray &buf);
bool write(const QString& dirName);
bool extract(const QString& name, const QString& path, ExtractionOption eo);
QStringList files();
private:
UnZip* m_uz;
/trunk/Scribus/scribus/ui/bookmwin.cpp
252,7 → 252,7
emit changed();
}
 
void BookMView::addItem(QString text, QString Tit, PageItem *PageObject)
void BookMView::addItem(const QString& text, const QString& Tit, PageItem *PageObject)
{
BookMItem * ite = new BookMItem(this, NrItems+1, PageObject);
ite->setText(0, text);
277,7 → 277,7
rebuildTree();
}
 
void BookMView::setAction(PageItem *currItem, QString Act)
void BookMView::setAction(PageItem *currItem, const QString& Act)
{
BookMItem *ite;
QTreeWidgetItemIterator it(this);
/trunk/Scribus/scribus/ui/bookmwin.h
80,9 → 80,9
BookMView(QWidget* parent);
~BookMView() {};
 
void addItem(QString text, QString Tit, PageItem *PageObject);
void addItem(const QString& text, const QString& Tit, PageItem *PageObject);
void deleteItem(PageItem *PageObject);
void setAction(PageItem *currItem, QString Act);
void setAction(PageItem *currItem, const QString& Act);
 
int NrItems;
int First;
/trunk/Scribus/scribus/ui/cmykfw.cpp
51,7 → 51,7
#include "iconmanager.h"
 
 
CMYKChoose::CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, bool newCol )
CMYKChoose::CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, const QString& name, ColorList *Colors, bool newCol )
: QDialog( parent ), CurrSwatch(doc)
{
setModal(true);
/trunk/Scribus/scribus/ui/cmykfw.h
23,7 → 23,7
Q_OBJECT
 
public:
CMYKChoose( QWidget* parent, ScribusDoc* doc, ScColor orig, QString name, ColorList *Colors, bool newCol );
CMYKChoose(QWidget* parent, ScribusDoc* doc, ScColor orig, const QString& name, ColorList *Colors, bool newCol );
~CMYKChoose() {};
 
QString colorName();
/trunk/Scribus/scribus/ui/collectforoutput_ui.cpp
19,7 → 19,7
 
#include <QMessageBox>
 
CollectForOutput_UI::CollectForOutput_UI(QWidget* parent, ScribusDoc* doc, QString outputDirectory, bool withFonts, bool withProfiles, bool compressDoc) :
CollectForOutput_UI::CollectForOutput_UI(QWidget* parent, ScribusDoc* doc, const QString& outputDirectory, bool withFonts, bool withProfiles, bool compressDoc) :
CollectForOutput(doc, outputDirectory, withFonts, withProfiles, compressDoc)
{
uiCollect = true;
/trunk/Scribus/scribus/ui/collectforoutput_ui.h
15,7 → 15,7
{
Q_OBJECT
public:
CollectForOutput_UI(QWidget *parent, ScribusDoc* doc, QString outputDirectory=QString::null, bool withFonts=false, bool withProfiles=false, bool compressDoc=false);
CollectForOutput_UI(QWidget *parent, ScribusDoc* doc, const QString& outputDirectory=QString::null, bool withFonts=false, bool withProfiles=false, bool compressDoc=false);
virtual QString collect(QString &newFileName);
signals:
 
/trunk/Scribus/scribus/ui/colorsandfills.cpp
66,7 → 66,7
#include "util_formats.h"
 
 
ColorsAndFillsDialog::ColorsAndFillsDialog(QWidget* parent, QHash<QString, VGradient> *docGradients, ColorList doco, const QString& docColSet, QHash<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow *scMW) : QDialog(parent)
ColorsAndFillsDialog::ColorsAndFillsDialog(QWidget* parent, QHash<QString, VGradient> *docGradients, const ColorList& doco, const QString& docColSet, QHash<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow *scMW) : QDialog(parent)
{
setupUi(this);
setModal(true);
/trunk/Scribus/scribus/ui/colorsandfills.h
40,7 → 40,7
Q_OBJECT
 
public:
ColorsAndFillsDialog(QWidget* parent, QHash<QString, VGradient> *docGradients, ColorList doco, const QString& docColSet, QHash<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow* scMW);
ColorsAndFillsDialog(QWidget* parent, QHash<QString, VGradient> *docGradients, const ColorList& doco, const QString& docColSet, QHash<QString, ScPattern> *docPatterns, ScribusDoc *doc, ScribusMainWindow* scMW);
~ColorsAndFillsDialog() {}
/*! \brief Returns the name of the current/selected color set.
\retval QString selected name. */
/trunk/Scribus/scribus/ui/cpalette.cpp
601,7 → 601,7
}
}
 
void Cpalette::showColorValues(QString stroke, QString fill, int sShade, int fShade)
void Cpalette::showColorValues(const QString& stroke, const QString& fill, int sShade, int fShade)
{
bool sigBlocked1 = fillShade->blockSignals(true);
bool sigBlocked2 = strokeShade->blockSignals(true);
661,7 → 661,7
emit NewBrush(colorName);
}
 
void Cpalette::setColors(ColorList newColorList)
void Cpalette::setColors(const ColorList& newColorList)
{
colorList.clear();
colorList = newColorList;
894,7 → 894,7
emit NewPatternS(c->text());
}
 
void Cpalette::setActPatternStroke(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY, double space, bool pathF)
void Cpalette::setActPatternStroke(const QString& pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY, double space, bool pathF)
{
bool sigBlocked = patternBoxStroke->blockSignals(true);
QList<QListWidgetItem*> itl = patternBoxStroke->findItems(pattern, Qt::MatchExactly);
919,7 → 919,7
patternBoxStroke->blockSignals(sigBlocked);
}
 
void Cpalette::setActPattern(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY)
void Cpalette::setActPattern(const QString& pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY)
{
bool sigBlocked = patternBox->blockSignals(true);
QList<QListWidgetItem*> itl = patternBox->findItems(pattern, Qt::MatchExactly);
/trunk/Scribus/scribus/ui/cpalette.h
62,7 → 62,7
 
void updateColorList();
 
void setColors(ColorList newColorList);
void setColors(const ColorList& newColorList);
void setGradients(QHash<QString, VGradient> *docGradients);
void setPatterns(QHash<QString, ScPattern> *docPatterns);
 
86,7 → 86,7
void handleStrokeGradient();
void handleStrokeGradientExtend(int val);
void handleGradientExtend(int val);
void showColorValues(QString stroke, QString fille, int sShade, int fShade);
void showColorValues(const QString& stroke, const QString& fille, int sShade, int fShade);
void showGradient(int nr);
void showGradientStroke(int nr);
void showOverprint(int);
96,8 → 96,8
void selectPattern(QListWidgetItem *c);
void selectPatternS(QListWidgetItem *c);
void hideEditedPatterns(QStringList names);
void setActPattern(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
void setActPatternStroke(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY, double space, bool pathF);
void setActPattern(const QString& pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
void setActPatternStroke(const QString& pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY, double space, bool pathF);
void selectColorS(int row);
void selectColorF(int row);
void slotGradStroke(int number);
/trunk/Scribus/scribus/ui/customfdialog.cpp
133,7 → 133,7
setPixmap(pm);
}
 
void FDialogPreview::GenPreview(QString name)
void FDialogPreview::GenPreview(const QString& name)
{
QPixmap pm;
QString Buffer = "";
292,7 → 292,7
}
}
 
CustomFDialog::CustomFDialog(QWidget *parent, QString wDir, QString caption, QString filter, int flags)
CustomFDialog::CustomFDialog(QWidget *parent, const QString& wDir, const QString& caption, const QString& filter, int flags)
: QDialog(parent), optionFlags(flags)
{
setModal(true);
545,7 → 545,7
repaint();
}
 
void CustomFDialog::setSelection(QString sel)
void CustomFDialog::setSelection(const QString& sel)
{
fileDialog->selectFile( QFileInfo(sel).fileName() );
if (previewIsShown)
596,7 → 596,7
setSelection(tmp.fileName());
}
 
void CustomFDialog::setExtension(QString e)
void CustomFDialog::setExtension(const QString& e)
{
ext = e;
}
606,7 → 606,7
return ext;
}
 
void CustomFDialog::setZipExtension(QString e)
void CustomFDialog::setZipExtension(const QString& e)
{
extZip = e;
}
/trunk/Scribus/scribus/ui/customfdialog.h
65,7 → 65,7
FDialogPreview(QWidget *pa);
~FDialogPreview() {};
void updtPix();
void GenPreview(QString name);
void GenPreview(const QString& name);
};
 
typedef enum {
96,13 → 96,13
\param filter a mask/filter. E.g.: *.txt
\param flags combination of fdFlags, default to fdExistingFiles
*/
CustomFDialog(QWidget *parent, QString wDir, QString caption = "", QString filter = "", int flags = fdExistingFiles);
CustomFDialog(QWidget *parent, const QString& wDir, const QString& caption = "", const QString& filter = "", int flags = fdExistingFiles);
~CustomFDialog();
 
/*! \brief Set the default extension of the resulting file name.
\param e string extension without any "."
*/
void setExtension(QString e);
void setExtension(const QString& e);
/*! \brief Get the file extension
\retval QString see setExtension(QString e) */
QString extension();
109,7 → 109,7
/*! \brief Set the "compress" extension of the resulting file name.
\param e string extension without any "."
*/
void setZipExtension(QString e);
void setZipExtension(const QString& e);
/*! \brief Get the zipped file extension
\retval QString see setZipExtension(QString e) */
QString zipExtension();
126,7 → 126,7
QCheckBox *showPreview;
QPushButton* OKButton;
QPushButton* CancelB;
void setSelection(QString );
void setSelection(const QString& );
QString selectedFile();
void addWidgets(QWidget *widgets);
private slots:
/trunk/Scribus/scribus/ui/dasheditor.cpp
274,7 → 274,7
emit dashChanged();
}
 
void DashPreview::setDashValues(QVector<double> vals)
void DashPreview::setDashValues(const QVector<double>& vals)
{
DashValues = vals;
if ((ActStop >= vals.count()) || (ActStop == -1))
/trunk/Scribus/scribus/ui/dasheditor.h
53,7 → 53,7
void mouseMoveEvent(QMouseEvent *m);
void leaveEvent(QEvent*);
void enterEvent(QEvent*);
void setDashValues(QVector<double> vals);
void setDashValues(const QVector<double>& vals);
QVector<double> DashValues;
QList<double> StopM;
bool Mpressed;
/trunk/Scribus/scribus/ui/dcolor.cpp
21,7 → 21,7
#include "scpage.h"
#include "scribusdoc.h"
 
DelColor::DelColor( QWidget* parent, ColorList colorList, QString colorName, bool haveDoc) : QDialog( parent )
DelColor::DelColor( QWidget* parent, const ColorList& colorList, const QString& colorName, bool haveDoc) : QDialog( parent )
{
setModal(true);
cList = colorList;
/trunk/Scribus/scribus/ui/dcolor.h
23,7 → 23,7
Q_OBJECT
 
public:
DelColor(QWidget* parent, ColorList colorList, QString colorName, bool haveDoc );
DelColor(QWidget* parent, const ColorList& colorList, const QString& colorName, bool haveDoc );
~DelColor() {};
const QString getReplacementColor();
 
/trunk/Scribus/scribus/ui/editor.cpp
28,7 → 28,7
 
#include "iconmanager.h"
 
Editor::Editor( QWidget* parent, QString daten, ScribusView* vie) : QDialog( parent )
Editor::Editor( QWidget* parent, const QString& daten, ScribusView* vie) : QDialog( parent )
{
setModal(true);
setWindowTitle(tr("Editor"));
/trunk/Scribus/scribus/ui/editor.h
28,7 → 28,7
Q_OBJECT
 
public:
Editor ( QWidget* parent, QString daten, ScribusView* vie = 0 );
Editor (QWidget* parent, const QString& daten, ScribusView* vie = 0 );
~Editor() {};
QTextEdit* EditTex;
QMenu* fmenu;
/trunk/Scribus/scribus/ui/effectsdialog.cpp
1477,7 → 1477,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveD1->cDisplay->isLinear())
1489,7 → 1489,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveD2->cDisplay->isLinear())
1516,7 → 1516,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveT1->cDisplay->isLinear())
1528,7 → 1528,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveT2->cDisplay->isLinear())
1540,7 → 1540,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveT3->cDisplay->isLinear())
1570,7 → 1570,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveQ1->cDisplay->isLinear())
1582,7 → 1582,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveQ2->cDisplay->isLinear())
1594,7 → 1594,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveQc3->cDisplay->isLinear())
1606,7 → 1606,7
efval += " "+tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (CurveQ4->cDisplay->isLinear())
1624,7 → 1624,7
efval += tmp;
for (int p = 0; p < Vals.size(); p++)
{
FPoint pv = Vals.point(p);
const FPoint& pv = Vals.point(p);
efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
}
if (Kdisplay->cDisplay->isLinear())
/trunk/Scribus/scribus/ui/fontcombo.cpp
199,7 → 199,7
return fontFamily->currentText() + " " + fontStyle->currentText();
}
 
void FontComboH::setCurrentFont(QString f)
void FontComboH::setCurrentFont(const QString& f)
{
QString family = prefsManager->appPrefs.fontPrefs.AvailFonts[f].family();
QString style = prefsManager->appPrefs.fontPrefs.AvailFonts[f].style();
454,7 → 454,7
return QFontDatabase::Any;
}
 
const ScFace& getScFace(QString classname, QString text)
const ScFace& getScFace(const QString& classname, const QString& text)
{
QFontDatabase& fontDb = ScQApp->qtFontDatabase();
PrefsManager* prefsManager = PrefsManager::instance();
/trunk/Scribus/scribus/ui/fontcombo.h
77,7 → 77,7
void rebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
 
public slots:
void setCurrentFont(QString f);
void setCurrentFont(const QString& f);
void languageChange();
 
signals:
/trunk/Scribus/scribus/ui/fontlistview.cpp
26,7 → 26,7
resizeColumnsToContents();
}
 
void FontListView::setFonts(SCFonts f)
void FontListView::setFonts(const SCFonts& f)
{
qobject_cast<FontListModel*>(model())->setFonts(f.keys());
if (!isSortingEnabled())
/trunk/Scribus/scribus/ui/fontlistview.h
25,7 → 25,7
FontListView(QWidget * parent = 0);
 
void setModel(QAbstractItemModel * model);
void setFonts(SCFonts f);
void setFonts(const SCFonts& f);
 
QString fontName(int i);
bool isFontUsable(int i);
/trunk/Scribus/scribus/ui/gradientaddedit.cpp
28,7 → 28,7
#include "ui/scmessagebox.h"
#include <QMessageBox>
 
gradientEditDialog::gradientEditDialog(QWidget* parent, QString name, VGradient gradient, ColorList doco, ScribusDoc *doc, QHash<QString, VGradient> *gradients, bool newFlag) : QDialog(parent)
gradientEditDialog::gradientEditDialog(QWidget* parent, const QString& name, const VGradient& gradient, ColorList doco, ScribusDoc *doc, QHash<QString, VGradient> *gradients, bool newFlag) : QDialog(parent)
{
setupUi(this);
setModal(true);
/trunk/Scribus/scribus/ui/gradientaddedit.h
38,7 → 38,7
Q_OBJECT
 
public:
gradientEditDialog(QWidget* parent, QString name, VGradient gradient, ColorList doco, ScribusDoc *doc, QHash<QString, VGradient> *gradients, bool newFlag);
gradientEditDialog(QWidget* parent, const QString& name, const VGradient& gradient, ColorList doco, ScribusDoc *doc, QHash<QString, VGradient> *gradients, bool newFlag);
~gradientEditDialog() {};
QString name();
VGradient gradient();
/trunk/Scribus/scribus/ui/gradienteditor.cpp
39,7 → 39,7
stopOpacity->setDecimals(0);
stopShade->setDecimals(0);
connect(stopPos , SIGNAL(valueChanged(double)), this, SLOT(changePos(double)));
connect(stopColor , SIGNAL(activated(const QString &)), this, SLOT(setStopColor(const QString &)));
connect(stopColor , SIGNAL(activated(const QString&)), this, SLOT(setStopColor(const QString&)));
connect(stopOpacity, SIGNAL(valueChanged(double)), this, SLOT(setStopTrans(double)));
connect(stopShade , SIGNAL(valueChanged(double)), this, SLOT(setStopShade(double)));
connect(Preview, SIGNAL(selectedStop(VColorStop*)), this, SLOT(slotDisplayStop(VColorStop*)));
48,7 → 48,7
connect(Preview, SIGNAL(gradientChanged()), this, SIGNAL(gradientChanged()));
}
 
void GradientEditor::setGradient(VGradient grad)
void GradientEditor::setGradient(const VGradient& grad)
{
Preview->setGradient(grad);
Preview->updateDisplay();
86,7 → 86,7
setGradTrans(stop->opacity);
}
 
void GradientEditor::slotColor(QString name, int shade)
void GradientEditor::slotColor(const QString& name, int shade)
{
stopColor->blockSignals(true);
stopShade->blockSignals(true);
123,7 → 123,7
emit gradientChanged();
}
 
QColor GradientEditor::setColor(QString colorName, int shad)
QColor GradientEditor::setColor(const QString& colorName, int shad)
{
const ScColor& color = m_colorList[colorName];
return ScColorEngine::getShadeColorProof(color, m_colorList.document(), shad);
/trunk/Scribus/scribus/ui/gradienteditor.h
45,10 → 45,10
public:
GradientEditor(QWidget *pa);
~GradientEditor() {};
void setGradient(VGradient grad);
void setGradient(const VGradient& grad);
const VGradient gradient();
void setColors(ColorList &colorList);
QColor setColor(QString colorName, int shad);
QColor setColor(const QString& colorName, int shad);
void setGradientEditable(bool val);
virtual void changeEvent(QEvent *e);
 
55,7 → 55,7
public slots:
void setPos(double);
void changePos(double);
void slotColor(QString name, int shade);
void slotColor(const QString& name, int shade);
void slotDisplayStop(VColorStop* stop);
void setGradTrans(double val);
void setStopColor(const QString &);
/trunk/Scribus/scribus/ui/gradientpreview.cpp
351,7 → 351,7
}
}
 
void GradientPreview::setActColor(QColor c, QString n, int s)
void GradientPreview::setActColor(const QColor& c, const QString& n, int s)
{
if (ActStop == -1)
return;
/trunk/Scribus/scribus/ui/gradientpreview.h
52,7 → 52,7
void leaveEvent(QEvent*);
void enterEvent(QEvent*);
void updateDisplay();
void setActColor(QColor c, QString n, int s);
void setActColor(const QColor& c, const QString& n, int s);
void setActTrans(double t);
void setActStep(double t);
void setGradient(const VGradient& gradient);
/trunk/Scribus/scribus/ui/hruler.cpp
862,7 → 862,7
}
}
 
void Hruler::drawNumber(QString txt, int x, int y0, QPainter & p)
void Hruler::drawNumber(const QString& txt, int x, int y0, QPainter & p)
{
const int y = y0 - 3 + topline;
p.drawText(x,y,txt);
/trunk/Scribus/scribus/ui/hruler.h
93,7 → 93,7
void drawMarks(QPainter& p);
void drawTextMarks(double pos, double endPos, QPainter& p);
void drawMarker(QPainter& p);
void drawNumber(QString num, int startx, int starty, QPainter & p);
void drawNumber(const QString& num, int startx, int starty, QPainter & p);
void UpdateTabList();
 
int Markp;
/trunk/Scribus/scribus/ui/hyask.cpp
42,7 → 42,7
QLineEdit::keyPressEvent ( k );
}
 
HyAsk::HyAsk ( QWidget* parent, QString HWort ) : QDialog ( parent )
HyAsk::HyAsk ( QWidget* parent, const QString& HWort ) : QDialog ( parent )
{
xpos = ypos = 0;
 
/trunk/Scribus/scribus/ui/hyask.h
32,7 → 32,7
Q_OBJECT
 
public:
HyAsk ( QWidget* parent, QString HWort );
HyAsk (QWidget* parent, const QString& HWort );
~HyAsk() {};
 
WortEdit* Wort;
/trunk/Scribus/scribus/ui/loremipsum.cpp
45,12 → 45,12
#include "selection.h"
#include "undomanager.h"
 
QString getLoremLocation(QString fname)
QString getLoremLocation(const QString& fname)
{
return QDir::toNativeSeparators(ScPaths::instance().shareDir() + "/loremipsum/" + fname);
}
 
LoremParser::LoremParser(QString fname)
LoremParser::LoremParser(const QString& fname)
{
name = author = url = "n/a";
correct = false;
277,7 → 277,7
loremList->setToolTip( tr( "List of languages available to insert sample text in" ) );
}
 
void LoremManager::insertLoremIpsum(QString name, int paraCount, bool random)
void LoremManager::insertLoremIpsum(const QString& name, int paraCount, bool random)
{
//CB: Avox please make insertText for text frame to nuke all this
// is it really applied?
/trunk/Scribus/scribus/ui/loremipsum.h
48,7 → 48,7
public:
/*! parse a XML file with given name
\param filename string fith the file name with full/relative path */
LoremParser(QString filename);
LoremParser(const QString& filename);
~LoremParser(){};
 
//! Is the LI correct?
93,7 → 93,7
\param name filename of the selected LI
\param paraCount count of the paragraphs
*/
void insertLoremIpsum(QString name, int paraCount, bool random = true);
void insertLoremIpsum(const QString& name, int paraCount, bool random = true);
 
//! Lorem Ipsum as QString
QString loremIpsum();
/trunk/Scribus/scribus/ui/marginwidget.cpp
19,7 → 19,7
#include "ui/useprintermarginsdialog.h"
 
 
MarginWidget::MarginWidget( QWidget* parent, QString /*title*/, const MarginStruct* margs, int unitIndex, bool showChangeAll, bool showBleeds) : QTabWidget(parent),
MarginWidget::MarginWidget( QWidget* parent, const QString& /*title*/, const MarginStruct* margs, int unitIndex, bool showChangeAll, bool showBleeds) : QTabWidget(parent),
pageWidth(0.0),
pageHeight(0.0),
pageType(0)
/trunk/Scribus/scribus/ui/marginwidget.h
37,7 → 37,7
\param unitIndex and index of the unit combobox
\param showChangeAll show "apply to all pages" related items
*/
MarginWidget( QWidget* parent, QString title, const MarginStruct* margs, int unitIndex, bool showChangeAll=false, bool showBleeds=true);
MarginWidget(QWidget* parent, const QString& title, const MarginStruct* margs, int unitIndex, bool showChangeAll=false, bool showBleeds=true);
~MarginWidget() {}
/*! \brief Setup the labels by facing pages option */
void setFacingPages(bool facing, int pagetype = 0);
/trunk/Scribus/scribus/ui/missing.cpp
21,7 → 21,7
#include "scribusdoc.h"
#include "util.h"
 
MissingFont::MissingFont( QWidget* parent, QString fon, ScribusDoc* doc ) : QDialog( parent )
MissingFont::MissingFont( QWidget* parent, const QString& fon, ScribusDoc* doc ) : QDialog( parent )
{
setModal(true);
setWindowTitle( tr("Missing Font"));
/trunk/Scribus/scribus/ui/missing.h
23,7 → 23,7
Q_OBJECT
 
public:
MissingFont( QWidget* parent, QString fon, ScribusDoc* doc);
MissingFont(QWidget* parent, const QString& fon, ScribusDoc* doc);
~MissingFont() {};
const QString getReplacementFont();
/trunk/Scribus/scribus/ui/newfile.cpp
90,7 → 90,7
return QSize(maxX, maxY);
}
 
NewDoc::NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp, QString lang) : QDialog( parent )
NewDoc::NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp, const QString& lang) : QDialog( parent )
{
setObjectName(QString::fromLocal8Bit("NewDocumentWindow"));
setModal(true);
616,7 → 616,7
marginGroup->setPageSize(size);
}
 
void NewDoc::setSize(QString gr)
void NewDoc::setSize(const QString& gr)
{
m_pageWidth = widthSpinBox->value() / m_unitRatio;
m_pageHeight = heightSpinBox->value() / m_unitRatio;
678,7 → 678,7
OKButton->setEnabled(tab!=2);
}
 
void NewDoc::locationDropped(QString fileUrl)
void NewDoc::locationDropped(const QString& fileUrl)
{
QFileInfo fi(fileUrl);
if (fi.isDir())
/trunk/Scribus/scribus/ui/newfile.h
64,13 → 64,13
OpenRecentTab
} ActionSelected;
 
NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp = false, QString lang = "");
NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp = false, const QString& lang = "");
~NewDoc() {}
void createNewDocPage();
void createNewFromTempPage();
void createOpenDocPage();
void createRecentDocPage();
void setSize(QString gr);
void setSize(const QString& gr);
QTabWidget* tabWidget;
QFrame* newDocFrame;
PageLayoutsWidget* layoutsView;
145,7 → 145,7
void recentDocListBox_doubleClicked();
void openFile();
void adjustTitles(int tab);
void locationDropped(QString fileUrl);
void locationDropped(const QString& fileUrl);
void gotoParentDirectory();
void gotoSelectedDirectory();
void gotoDesktopDirectory();
/trunk/Scribus/scribus/ui/newtemp.cpp
21,7 → 21,7
#include "scpage.h"
#include "scribusdoc.h"
 
NewTm::NewTm( QWidget* parent, QString text, QString titel, ScribusDoc *doc, const QString& answerText)
NewTm::NewTm( QWidget* parent, const QString& text, const QString& titel, ScribusDoc *doc, const QString& answerText)
: QDialog( parent )
{
setModal(true);
/trunk/Scribus/scribus/ui/newtemp.h
23,7 → 23,7
Q_OBJECT
 
public:
NewTm( QWidget* parent, QString text, QString titel, ScribusDoc *doc, const QString& answerText=QString::null );
NewTm(QWidget* parent, const QString& text, const QString& titel, ScribusDoc *doc, const QString& answerText=QString::null );
~NewTm() {};
 
QPushButton* PushButton1;
/trunk/Scribus/scribus/ui/nftdialog.cpp
15,7 → 15,7
#include "iconmanager.h"
 
 
nftdialog::nftdialog(QWidget* parent, QString lang) : QDialog(parent)
nftdialog::nftdialog(QWidget* parent, const QString& lang) : QDialog(parent)
{
setupUi(this);
setModal(true);
/trunk/Scribus/scribus/ui/nftdialog.h
21,7 → 21,7
{
Q_OBJECT
public:
nftdialog(QWidget* parent, QString lang);
nftdialog(QWidget* parent, const QString& lang);
~nftdialog() {};
 
bool isTemplateSelected();
/trunk/Scribus/scribus/ui/nftwidget.cpp
25,7 → 25,7
openAction = removeAction = nullptr;
}
 
void nftwidget::setupSettings(QString lang)
void nftwidget::setupSettings(const QString& lang)
{
settings = new nftsettings(lang);
// context menu
/trunk/Scribus/scribus/ui/nftwidget.h
38,7 → 38,7
public:
nfttemplate* currentDocumentTemplate;
nftwidget(QWidget* parent);
void setupSettings(QString lang);
void setupSettings(const QString& lang);
~nftwidget();
private slots:
void setInfo();
/trunk/Scribus/scribus/ui/notesstyleseditor.cpp
244,7 → 244,7
setBlockSignals(wasSignalsBlocked);
}
 
void NotesStylesEditor::readNotesStyle(QString nsName)
void NotesStylesEditor::readNotesStyle(const QString& nsName)
{
NotesStyle * NS = m_Doc->getNotesStyle(nsName);
setNotesStyle(NS);
/trunk/Scribus/scribus/ui/notesstyleseditor.h
23,7 → 23,7
ScribusDoc *m_Doc;
PrefsContext *m_prefs;
QMap<QString, NotesStyle> changesMap; //<NSname to change, NSet new values>
void readNotesStyle(QString nsName);
void readNotesStyle(const QString& nsName);
void changeNotesStyle();
void setBlockSignals(bool block);
bool addNewNsMode;
/trunk/Scribus/scribus/ui/oneclick.cpp
24,7 → 24,7
#include "units.h"
 
 
OneClick::OneClick( QWidget* parent, QString titel, int unitIndex, double defW, double defH, bool remember, int origin, int mode ) : QDialog( parent )
OneClick::OneClick( QWidget* parent, const QString& titel, int unitIndex, double defW, double defH, bool remember, int origin, int mode ) : QDialog( parent )
{
double m_unitRatio = unitGetRatioFromIndex(unitIndex);
QString m_suffix = unitGetSuffixFromIndex(unitIndex);
/trunk/Scribus/scribus/ui/oneclick.h
27,7 → 27,7
Q_OBJECT
 
public:
OneClick( QWidget* parent, QString titel, int unitIndex, double defW, double defH, bool remember, int origin, int mode );
OneClick(QWidget* parent, const QString& titel, int unitIndex, double defW, double defH, bool remember, int origin, int mode );
~OneClick() {};
ScrSpinBox *spinWidth;
ScrSpinBox *spinHeight;
/trunk/Scribus/scribus/ui/pagelayout.cpp
89,7 → 89,7
connect(firstPage, SIGNAL(activated(int)), this, SIGNAL(selectedFirstPage(int)));
}
 
PageLayouts::PageLayouts(QWidget* parent, QList<PageSet> pSets, bool mode) : QGroupBox( parent )
PageLayouts::PageLayouts(QWidget* parent, const QList<PageSet>& pSets, bool mode) : QGroupBox( parent )
{
pageSets = pSets;
modus = mode;
120,7 → 120,7
connect(firstPage, SIGNAL(activated(int)), this, SIGNAL(selectedFirstPage(int)));
}
 
void PageLayouts::updateLayoutSelector(QList<PageSet> pSets)
void PageLayouts::updateLayoutSelector(const QList<PageSet>& pSets)
{
disconnect(layoutsCombo, SIGNAL(activated(int)), this, SLOT(itemSelected(int)));
pageSets = pSets;
/trunk/Scribus/scribus/ui/pagelayout.h
40,10 → 40,10
 
public:
PageLayouts(QWidget* parent);
PageLayouts(QWidget* parent, QList<PageSet> pSets, bool mode = true);
PageLayouts(QWidget* parent, const QList<PageSet>& pSets, bool mode = true);
~PageLayouts() {};
 
void updateLayoutSelector(QList<PageSet> pSets);
void updateLayoutSelector(const QList<PageSet>& pSets);
void selectFirstP(int nr);
void selectItem(uint nr);
PageListWidget* layoutsView;
/trunk/Scribus/scribus/ui/pagepalette.cpp
160,7 → 160,7
return (mpWidget != nullptr);
}
 
void PagePalette::startMasterPageMode(QString masterPage)
void PagePalette::startMasterPageMode(const QString& masterPage)
{
ScribusDoc* doc = m_view->Doc;
/trunk/Scribus/scribus/ui/pagepalette.h
65,7 → 65,7
void languageChange();
 
bool masterPageMode();
void startMasterPageMode(QString);
void startMasterPageMode(const QString&);
void endMasterPageMode();
 
signals:
/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
424,7 → 424,7
this->setEnabled(true);
}
 
void PagePalette_MasterPages::selectMasterPage(QString name)
void PagePalette_MasterPages::selectMasterPage(const QString& name)
{
if (!m_doc || !m_view)
return;
/trunk/Scribus/scribus/ui/pagepalette_masterpages.h
40,7 → 40,7
public slots:
void languageChange();
void styleChange();
void selectMasterPage(QString name);
void selectMasterPage(const QString& name);
 
private:
QString m_currentPage;
/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
123,7 → 123,7
}
}
 
void PagePalette_Pages::pageView_applyMasterPage(QString masterpageName, int pageIndex)
void PagePalette_Pages::pageView_applyMasterPage(const QString& masterpageName, int pageIndex)
{
m_scMW->Apply_MasterPage(masterpageName, pageIndex, false);
currView->reformPages();
/trunk/Scribus/scribus/ui/pagepalette_pages.h
52,7 → 52,7
void languageChange();
 
private slots:
void pageView_applyMasterPage(QString masterpageName, int pageIndex);
void pageView_applyMasterPage(const QString& masterpageName, int pageIndex);
void pageView_movePage(int r, int c);
void pageView_gotoPage(int r, int c, int b);
 
/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
281,7 → 281,7
QMap<QString, QString> insertMap;
for (int i = 0; i < insertTrList.count(); ++i)
{
QString key = insertTrList.at(i);
const QString& key = insertTrList.at(i);
insertMap[key] = insertList.at(i);
}
insertTrList.sort();
289,7 → 289,7
pageSizeComboBox->clear();
for (int i = 0; i < insertList.count(); ++i)
{
QString key = insertTrList.at(i);
const QString& key = insertTrList.at(i);
pageSizeComboBox->addItem(key, insertMap[key]);
}
pageSizeComboBox->addItem(CommonStrings::trCustomPageSize, CommonStrings::customPageSize);
/trunk/Scribus/scribus/ui/prefs_externaltools.cpp
285,7 → 285,7
}
}
 
void Prefs_ExternalTools::insertConfigItem(QString config, int row)
void Prefs_ExternalTools::insertConfigItem(const QString& config, int row)
{
QListWidgetItem *item = new QListWidgetItem();
item->setData(Qt::UserRole, config);
/trunk/Scribus/scribus/ui/prefs_externaltools.h
27,7 → 27,7
void languageChange();
 
protected:
void insertConfigItem(QString config, int row = -1);
void insertConfigItem(const QString& config, int row = -1);
void setConfigItemText(QListWidgetItem *item);
QMap<QString, QString> commands;
 
/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
148,7 → 148,7
return QStringList();
}
 
QListWidgetItem* Prefs_PDFExport::addFontItem(QString fontName, QListWidget* fontList)
QListWidgetItem* Prefs_PDFExport::addFontItem(const QString& fontName, QListWidget* fontList)
{
QListWidgetItem* item = nullptr;
if (!AllFonts.contains(fontName))
/trunk/Scribus/scribus/ui/prefs_pdfexport.h
71,7 → 71,7
void SetEffOpts(int nr);
 
protected:
QListWidgetItem* addFontItem(QString fontName, QListWidget* fontList);
QListWidgetItem* addFontItem(const QString& fontName, QListWidget* fontList);
void setCustomRenderingWidgetsShown(bool);
void setSolidsImagesWidgetsShown(bool);
void enableCustomRenderingWidgets(bool);
/trunk/Scribus/scribus/ui/prefs_spelling.cpp
233,7 → 233,7
downloadProgressBar->setValue(downloadProgressBar->value()+1);
}
 
void Prefs_Spelling::setAvailDictsXMLFile(QString availDictsXMLDataFile)
void Prefs_Spelling::setAvailDictsXMLFile(const QString& availDictsXMLDataFile)
{
QFile dataFile(availDictsXMLDataFile);
if (!dataFile.exists())
323,7 → 323,7
spellDownloadButton->setEnabled(true);
}
 
QString Prefs_Spelling::affixFileName(QStringList files)
QString Prefs_Spelling::affixFileName(const QStringList& files)
{
for (int i = 0; i < files.count(); ++i)
{
334,7 → 334,7
return QString();
}
 
QString Prefs_Spelling::dictFileName(QStringList files)
QString Prefs_Spelling::dictFileName(const QStringList& files)
{
for (int i = 0; i < files.count(); ++i)
{
/trunk/Scribus/scribus/ui/prefs_spelling.h
39,9 → 39,9
void updateProgressBar();
 
protected:
QString affixFileName(QStringList files);
QString dictFileName(QStringList files);
void setAvailDictsXMLFile(QString availDictsXMLDataFile);
QString affixFileName(const QStringList& files);
QString dictFileName(const QStringList& files);
void setAvailDictsXMLFile(const QString& availDictsXMLDataFile);
QMap<QString, QString> dictionaryMap;
QStringList dictionaryPaths;
QString downloadLocation;
/trunk/Scribus/scribus/ui/preview.cpp
72,7 → 72,7
 
extern bool printDinUse;
 
PPreview::PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, QString printer, PrintEngine engine ) : QDialog( parent )
PPreview::PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, const QString& printer, PrintEngine engine ) : QDialog( parent )
{
setModal(true);
setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));
1155,7 → 1155,7
 
//-------------------------------------------------------------------------------------------------
 
bool PPreview::usePostscriptPreview(QString printerName, PrintEngine engine)
bool PPreview::usePostscriptPreview(const QString& printerName, PrintEngine engine)
{
#ifdef _WIN32
if (printerName == tr("File"))
/trunk/Scribus/scribus/ui/preview.h
48,7 → 48,7
\param printer a name of the printer
\param engine a printer engine
*/
PPreview( QWidget* parent, ScribusView *vin, ScribusDoc *docu, QString printer, PrintEngine engine );
PPreview(QWidget* parent, ScribusView *vin, ScribusDoc *docu, const QString& printer, PrintEngine engine );
~PPreview() {};
/*!
\author Franz Schmid
61,7 → 61,7
int RenderPreviewSep(int pageIndex, int res);
void blendImages(QImage &target, ScImage &source, ScColor col);
void blendImagesSumUp(QImage &target, ScImage &scsource);
static bool usePostscriptPreview(QString printerName, PrintEngine engine);
static bool usePostscriptPreview(const QString& printerName, PrintEngine engine);
/*!
\author Franz Schmid
\brief Creates the Preview of the Actual Page
/trunk/Scribus/scribus/ui/printdialog.cpp
36,7 → 36,7
 
extern bool previewDinUse;
 
PrintDialog::PrintDialog( QWidget* parent, ScribusDoc* doc, const PrintOptions& printOptions, bool gcr, QStringList spots)
PrintDialog::PrintDialog( QWidget* parent, ScribusDoc* doc, const PrintOptions& printOptions, bool gcr, const QStringList& spots)
: QDialog( parent )
{
setupUi(this);
/trunk/Scribus/scribus/ui/printdialog.h
24,7 → 24,7
Q_OBJECT
 
public:
PrintDialog( QWidget* parent, ScribusDoc* doc, const PrintOptions& printOptions, bool gcr, QStringList spots);
PrintDialog( QWidget* parent, ScribusDoc* doc, const PrintOptions& printOptions, bool gcr, const QStringList& spots);
~PrintDialog();
QString printerName();
QString outputFileName();
/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
444,7 → 444,7
}
}
 
void PropertiesPalette_Group::handleGroupPatternMask(QString pattern)
void PropertiesPalette_Group::handleGroupPatternMask(const QString& pattern)
{
if ((m_haveDoc) && (m_haveItem))
{
/trunk/Scribus/scribus/ui/propertiespalette_group.h
69,7 → 69,7
void handleGroupTransparency(double trans);
void handleGroupBlending(int blend);
void handleGroupGradMask(int typ);
void handleGroupPatternMask(QString pattern);
void handleGroupPatternMask(const QString& pattern);
void handleGroupPatternMaskProps(double, double, double, double, double, double, double, bool, bool);
 
void handleTextFlow();
/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
440,7 → 440,7
fontSize->showValue(s / 10.0);
}
 
void PropertiesPalette_Text::showLanguage(QString w)
void PropertiesPalette_Text::showLanguage(const QString& w)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
/trunk/Scribus/scribus/ui/propertiespalette_text.h
83,7 → 83,7
void showCharStyle(const QString& name);
void showFontFace(const QString&);
void showFontSize(double s);
void showLanguage(QString w);
void showLanguage(const QString& w);
void showFirstLinePolicy(FirstLineOffsetPolicy);
void showLineSpacing(double r);
void showParStyle(const QString& name);
/trunk/Scribus/scribus/ui/propertiespalette_utils.cpp
40,9 → 40,13
//using namespace std;
 
 
LineFormatValue::LineFormatValue() : m_Line(), m_doc(nullptr), m_name() {};
LineFormatValue::LineFormatValue() : m_doc(nullptr), m_name() {};
 
LineFormatValue::LineFormatValue( const multiLine& line, ScribusDoc* doc, const QString name ) : m_Line(line), m_doc(doc), m_name(name) {};
LineFormatValue::LineFormatValue( const multiLine& line, ScribusDoc* doc, const QString& name ) :
m_Line(line),
m_doc(doc),
m_name(name)
{};
 
LineFormatValue::LineFormatValue(const LineFormatValue& other)
{
/trunk/Scribus/scribus/ui/propertiespalette_utils.h
49,7 → 49,7
QString m_name;
LineFormatValue();
LineFormatValue( const multiLine& line, ScribusDoc* doc, const QString name );
LineFormatValue( const multiLine& line, ScribusDoc* doc, const QString& name );
LineFormatValue(const LineFormatValue& other);
LineFormatValue& operator= (const LineFormatValue& other);
};
/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
1237,16 → 1237,15
 
void PropertiesPalette_XYZ::installSniffer(ScrSpinBox *spinBox)
{
const QList<QObject*> list = spinBox->children();
if (!list.isEmpty())
const QList<QObject*>& list = spinBox->children();
if (list.isEmpty())
return;
QListIterator<QObject*> it(list);
QObject *obj;
while (it.hasNext())
{
QListIterator<QObject*> it(list);
QObject *obj;
while (it.hasNext())
{
obj = it.next();
obj->installEventFilter(userActionSniffer);
}
obj = it.next();
obj->installEventFilter(userActionSniffer);
}
}
 
/trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
48,7 → 48,7
retranslateUi(this);
}
 
void PropertyWidget_FontFeatures::showFontFeatures(QString s, QStringList availableFeatures)
void PropertyWidget_FontFeatures::showFontFeatures(const QString& s, const QStringList& availableFeatures)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
444,7 → 444,7
StyleSet20->setChecked(false);
}
 
void PropertyWidget_FontFeatures::enableFeatures(QStringList fontFeatures)
void PropertyWidget_FontFeatures::enableFeatures(const QStringList& fontFeatures)
{
quint64 oldFlags = featureFlags();
quint64 newFlags = FontFeatures::fontFlagsFromList(fontFeatures);
/trunk/Scribus/scribus/ui/propertywidget_fontfeatures.h
23,7 → 23,7
public:
PropertyWidget_FontFeatures(QWidget *parent);
~PropertyWidget_FontFeatures() {}
void enableFeatures(QStringList fontFeatures);
void enableFeatures(const QStringList& fontFeatures);
 
protected:
void connectSignals();
45,7 → 45,7
void handleSelectionChanged();
void languageChange();
void unitChange() {}
void showFontFeatures(QString s, QStringList availableFeatures);
void showFontFeatures(const QString& s, const QStringList& availableFeatures);
void updateCharStyle(const CharStyle& charStyle);
void updateStyle(const ParagraphStyle& newCurrent);
 
/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
451,7 → 451,7
handleChanges(m_item, newStyle);
}
 
void PropertyWidget_ParEffect::handleNumName(QString numName)
void PropertyWidget_ParEffect::handleNumName(const QString& numName)
{
if (!m_doc || !m_item)
return;
517,7 → 517,7
handleChanges(m_item, newStyle);
}
 
void PropertyWidget_ParEffect::handleNumPrefix(QString prefix)
void PropertyWidget_ParEffect::handleNumPrefix(const QString& prefix)
{
if (!m_doc || !m_item)
return;
526,7 → 526,7
handleChanges(m_item, newStyle);
}
 
void PropertyWidget_ParEffect::handleNumSuffix(QString suffix)
void PropertyWidget_ParEffect::handleNumSuffix(const QString& suffix)
{
if (!m_doc || !m_item)
return;
562,7 → 562,7
handleChanges(m_item, newStyle);
}
 
void PropertyWidget_ParEffect::handlePECharStyle(QString name)
void PropertyWidget_ParEffect::handlePECharStyle(const QString& name)
{
if (!m_doc || !m_item)
return;
/trunk/Scribus/scribus/ui/propertywidget_pareffect.h
55,15 → 55,15
void handleParEffectUse();
void handleBulletStr(QString);
void handleDropCapLines(int);
void handleNumName(QString);
void handleNumName(const QString&);
void handleNumFormat(int);
void handleNumLevel(int);
void handleNumPrefix(QString);
void handleNumSuffix(QString);
void handleNumPrefix(const QString&);
void handleNumSuffix(const QString&);
void handleNumStart(int);
void handlePEOffset(double);
void handlePEIndent(bool);
void handlePECharStyle(QString);
void handlePECharStyle(const QString&);
 
private slots:
void on_bulletCharTableButton_toggled(bool checked);
/trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
260,7 → 260,7
textEffects->StrikeVal->LWidth->showValue(w / 10.0);
}
 
void PropertyWidget_TextColor::showTextColors(QString p, QString b, QString bc, double shp, double shb, double sbc)
void PropertyWidget_TextColor::showTextColors(const QString& p, const QString& b, const QString& bc, double shp, double shb, double sbc)
{
if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
return;
/trunk/Scribus/scribus/ui/propertywidget_textcolor.h
50,7 → 50,7
void showOutlineW(double x);
void showShadowOffset(double x, double y);
void showStrikeThru(double p, double w);
void showTextColors(QString p, QString b, QString bc, double shp, double shb, double sbc);
void showTextColors(const QString& p, const QString& b, const QString& bc, double shp, double shb, double sbc);
void showTextEffects(int s);
void showUnderline(double p, double w);
 
/trunk/Scribus/scribus/ui/query.cpp
17,7 → 17,7
#include "ui/scmessagebox.h"
#include "iconmanager.h"
 
Query::Query( QWidget* parent, const char* name, bool modal, QString text, QString titel ) : QDialog( parent )
Query::Query( QWidget* parent, const char* name, bool modal, const QString& text, const QString& titel ) : QDialog( parent )
{
setWindowTitle( titel );
setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));
106,7 → 106,7
return answerEdit->text();
}
 
void Query::setEditText(QString newText, bool setSelected)
void Query::setEditText(const QString& newText, bool setSelected)
{
answerEdit->setText(newText);
if (setSelected)
113,12 → 113,12
answerEdit->selectAll();
}
 
void Query::setTestList(QStringList tList)
void Query::setTestList(const QStringList& tList)
{
checkList = tList;
}
 
void Query::setForbiddenList(QStringList tList)
void Query::setForbiddenList(const QStringList& tList)
{
forbiddenList = tList;
}
128,7 → 128,7
checkMode = mode;
}
 
void Query::setValidator(QRegExp rx)
void Query::setValidator(const QRegExp& rx)
{
QValidator* vaild = new QRegExpValidator( rx, this );
answerEdit->setValidator(vaild);
/trunk/Scribus/scribus/ui/query.h
23,15 → 23,15
Q_OBJECT
 
public:
Query( QWidget* parent=0, const char* name=nullptr, bool modal = false, QString text=0, QString titel=0 );
Query(QWidget* parent=0, const char* name=nullptr, bool modal = false, const QString& text=0, const QString& titel=0 );
~Query() {};
 
const QString getEditText();
void setEditText(QString newText, bool setSelected);
void setTestList(QStringList tList);
void setForbiddenList(QStringList tList);
void setEditText(const QString& newText, bool setSelected);
void setTestList(const QStringList& tList);
void setForbiddenList(const QStringList& tList);
void setCheckMode(bool mode);
void setValidator(QRegExp rx);
void setValidator(const QRegExp& rx);
 
public slots:
void Leave();
/trunk/Scribus/scribus/ui/recoverdialog.cpp
32,7 → 32,7
#include <QCheckBox>
#include <QFileInfo>
 
RecoverDialog::RecoverDialog(QWidget* parent, QStringList files) : QDialog(parent)
RecoverDialog::RecoverDialog(QWidget* parent, const QStringList& files) : QDialog(parent)
{
setupUi(this);
setModal(true);
/trunk/Scribus/scribus/ui/recoverdialog.h
36,7 → 36,7
Q_OBJECT
 
public:
RecoverDialog(QWidget* parent, QStringList files);
RecoverDialog(QWidget* parent, const QStringList& files);
~RecoverDialog() {};
QStringList recoverFiles;
QStringList recoverNames;
/trunk/Scribus/scribus/ui/replacecolors.cpp
156,7 → 156,7
}
}
 
QPixmap replaceColorsDialog::getColorIcon(QString color)
QPixmap replaceColorsDialog::getColorIcon(const QString& color)
{
QPixmap smallPix(15, 15);
QPixmap pPixmap(60,15);
/trunk/Scribus/scribus/ui/replacecolors.h
52,7 → 52,7
 
private:
void updateReplacementTable();
QPixmap getColorIcon(QString color);
QPixmap getColorIcon(const QString& color);
int selectedRow;
QPixmap alertIcon;
QPixmap cmykIcon;
/trunk/Scribus/scribus/ui/replaceonecolor.cpp
49,12 → 49,12
return replacementColor->currentText();
}
 
void replaceColorDialog::setOriginalColor(QString color)
void replaceColorDialog::setOriginalColor(const QString& color)
{
setCurrentComboItem(originalColor, color);
}
 
void replaceColorDialog::setReplacementColor(QString color)
void replaceColorDialog::setReplacementColor(const QString& color)
{
setCurrentComboItem(replacementColor, color);
}
/trunk/Scribus/scribus/ui/replaceonecolor.h
41,8 → 41,8
~replaceColorDialog() {};
const QString getOriginalColor();
const QString getReplacementColor();
void setReplacementColor(QString color);
void setOriginalColor(QString color);
void setReplacementColor(const QString& color);
void setOriginalColor(const QString& color);
};
 
#endif
/trunk/Scribus/scribus/ui/sccolorslider.cpp
33,7 → 33,7
}
QPalette slPalette = this->palette();
QBrush hooverBrush = slPalette.brush(QPalette::Window);
const QBrush& hooverBrush = slPalette.brush(QPalette::Window);
QRect hooverRect = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderGroove, this);
painter.setPen(Qt::NoPen);
46,12 → 46,12
 
QColor c1 = slPalette.color(QPalette::Mid);
painter.setPen(c1);
painter.drawLine(0, 0, slWidth - 1, 0);
painter.drawLine(0, 0, slWidth - 1, 0);
painter.drawLine(0, 0, 0, slHeight - 1);
 
QColor c2 = slPalette.color(QPalette::Midlight);
painter.setPen(c2);
painter.drawLine(slWidth - 1, 0, slWidth - 1, slHeight - 1);
painter.setPen(c2);
painter.drawLine(slWidth - 1, 0, slWidth - 1, slHeight - 1);
painter.drawLine(0, slHeight - 1, slWidth - 1, slHeight - 1);*/
 
opt.subControls = QStyle::SC_SliderHandle;
/trunk/Scribus/scribus/ui/scfilewidget.cpp
78,7 → 78,7
#endif
}
 
void ScFileWidget::locationDropped(QString fileUrl)
void ScFileWidget::locationDropped(const QString& fileUrl)
{
QFileInfo fi(fileUrl);
if (fi.isDir())
/trunk/Scribus/scribus/ui/scfilewidget.h
33,7 → 33,7
 
public slots:
void accept();
void locationDropped(QString fileUrl);
void locationDropped(const QString& fileUrl);
void gotoParentDirectory();
void gotoSelectedDirectory();
void gotoDesktopDirectory();
/trunk/Scribus/scribus/ui/scinputdialog.cpp
86,7 → 86,7
 
double ScInputDialog::getDouble( const QString &caption, const QString &label, double num,
double from, double to, int decimals,
QString suffix, bool *ok,
const QString& suffix, bool *ok,
QWidget *parent, const char *name )
{
ScInputDialog *dlg = new ScInputDialog(parent, name, true);
/trunk/Scribus/scribus/ui/scinputdialog.h
37,9 → 37,9
QPushButton* buttonOk;
QPushButton* buttonCancel;
 
static double getDouble( const QString &caption, const QString &label, double num = 0,
static double getDouble(const QString &caption, const QString &label, double num = 0,
double from = -2147483647, double to = 2147483647,
int decimals = 1, QString suffix = "", bool *ok = 0,
int decimals = 1, const QString& suffix = "", bool *ok = 0,
QWidget *parent = 0, const char *name = 0 );
 
protected:
/trunk/Scribus/scribus/ui/sclistwidgetdelegate.cpp
53,7 → 53,6
 
QSize ScListWidgetDelegate::sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const
{
QStyleOptionViewItem option = opt;
if (m_dispIconOnly)
{
QSize sz = m_view->iconSize();
/trunk/Scribus/scribus/ui/scmenu.cpp
30,7 → 30,7
#include "iconmanager.h"
 
 
ScrPopupMenu::ScrPopupMenu ( QWidget * parent, const QString pMenuName, const QString pMenuText, const QString parentName, bool pCheckable ) : QObject(parent)
ScrPopupMenu::ScrPopupMenu ( QWidget * parent, const QString& pMenuName, const QString& pMenuText, const QString& parentName, bool pCheckable ) : QObject(parent)
{
parentMenuName=parentName;
parentMenuID=-1;
54,7 → 54,7
return menuText;
}
 
void ScrPopupMenu::setText(const QString pMenuText)
void ScrPopupMenu::setText(const QString& pMenuText)
{
menuText=pMenuText;
localPopupMenu->menuAction()->setText(menuText);
65,7 → 65,7
return menuIcon;
}
 
void ScrPopupMenu::setMenuIcon(const QIcon pMenuIcon)
void ScrPopupMenu::setMenuIcon(const QIcon& pMenuIcon)
{
menuIcon=pMenuIcon;
}
/trunk/Scribus/scribus/ui/scmenu.h
36,15 → 36,15
{
Q_OBJECT
public:
ScrPopupMenu ( QWidget * parent = 0, const QString pMenuName = QString::null, const QString pMenuText = QString::null, const QString parentName = QString::null, bool checkable = false);
ScrPopupMenu ( QWidget * parent = 0, const QString& pMenuName = QString::null, const QString& pMenuText = QString::null, const QString& parentName = QString::null, bool checkable = false);
~ScrPopupMenu ();
const QString getMenuName();
const QString getParentMenuName();
const QString getMenuText();
void setText(const QString pMenuText);
void setText(const QString& pMenuText);
const QIcon getMenuIcon();
void setMenuIcon(const QIcon pMenuIcon);
void setMenuIcon(const QIcon& pMenuIcon);
void setEnabled(bool menuEnabled);
QMenu *getLocalPopupMenu();
bool repopulateLocalMenu();
/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
170,7 → 170,7
e->ignore();
}
 
void BibView::AddObj(QString name, QString daten, QPixmap Bild, bool isDir, bool isRaster, bool isVector)
void BibView::AddObj(const QString& name, const QString& daten, const QPixmap& Bild, bool isDir, bool isRaster, bool isVector)
{
struct Elem DrElem;
DrElem.isDir = isDir;
181,7 → 181,7
objectMap.insert(name, DrElem);
}
 
void BibView::checkForImg(QDomElement elem, bool &hasImage)
void BibView::checkForImg(const QDomElement& elem, bool &hasImage)
{
QDomNode DOC = elem.firstChild();
while(!DOC.isNull())
217,7 → 217,7
}
}
 
void BibView::checkAndChange(QString &text, QString nam, QString dir)
void BibView::checkAndChange(const QString& text, const QString& nam, const QString& dir)
{
bool hasImage = false;
QDomDocument docu("scridoc");
358,9 → 358,9
f.close();
}
 
void BibView::checkAndChangeGroups(QDomElement elem, QString dir, QFileInfo fid)
void BibView::checkAndChangeGroups(const QDomElement& elem, const QString& dir, const QFileInfo& fid)
{
QString source = "";
QString source;
QString fileDir = ScPaths::applicationDataDir();
QDomNode DOC = elem.firstChild();
while (!DOC.isNull())
445,7 → 445,7
}
}
 
void BibView::ReadOldContents(QString name, QString newName)
void BibView::ReadOldContents(const QString& name, const QString& newName)
{
bool isUtf8 = false;
QDomDocument docu("scridoc");
484,7 → 484,7
}
}
 
void BibView::ReadContents(QString name)
void BibView::ReadContents(const QString& name)
{
clear();
objectMap.clear();
849,7 → 849,7
return ret;
}
 
void Biblio::setScrapbookFileName(QString fileName)
void Biblio::setScrapbookFileName(const QString& fileName)
{
activeBView->ScFilename=fileName;
}
869,18 → 869,18
return (!tempBView->objectMap.isEmpty());
}
 
void Biblio::readOldContents(QString fileName, QString newName)
void Biblio::readOldContents(const QString& fileName, const QString& newName)
{
activeBView->ReadOldContents(fileName, newName);
activeBView->scrollToTop();
}
 
void Biblio::readContents(QString fileName)
void Biblio::readContents(const QString& fileName)
{
activeBView->ReadContents(fileName);
}
 
void Biblio::readTempContents(QString fileName)
void Biblio::readTempContents(const QString& fileName)
{
tempBView->ReadContents(fileName);
tempBView->ScFilename = fileName;
957,7 → 957,7
connect(activeBView, SIGNAL(objDropped(QString)), this, SLOT(ObjFromMenu(QString)));
connect(activeBView, SIGNAL(fileDropped(QString, int)), this, SLOT(ObjFromFile(QString, int)));
connect(activeBView, SIGNAL(customContextMenuRequested (const QPoint &)), this, SLOT(HandleMouse(QPoint)));
connect(activeBView, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
connect(activeBView, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(handleDoubleClick(QListWidgetItem*)));
emit scrapbookListChanged();
}
 
973,11 → 973,10
{
dirs->set("old_scrap_load", s.left(s.lastIndexOf(QDir::toNativeSeparators("/"))));
QString scrapbookFileO = s;
QFileInfo scrapbookFileInfoO = QFileInfo(scrapbookFileO);
QFileInfo scrapbookFileInfoO = QFileInfo(s);
if (scrapbookFileInfoO.exists())
{
readOldContents(scrapbookFileO, activeBView->ScFilename);
readOldContents(s, activeBView->ScFilename);
readContents(activeBView->ScFilename);
}
activeBView->scrollToTop();
1026,7 → 1025,7
connect(activeBView, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
}
 
void Biblio::closeOnDel(QString libName)
void Biblio::closeOnDel(const QString& libName)
{
BibView* bv = nullptr;
int libIndex = 0;
1054,7 → 1053,7
}
}
 
void Biblio::reloadLib(QString fileName)
void Biblio::reloadLib(const QString& fileName)
{
for (int a = 0; a < Frame3->count(); a++)
{
1446,7 → 1445,7
emit updateRecentMenue();
}
 
void Biblio::adjustReferences(QString nam)
void Biblio::adjustReferences(const QString& nam)
{
QByteArray cf;
if (loadRawText(nam, cf))
1455,7 → 1454,7
if (cf.left(16) == "<SCRIBUSELEMUTF8")
f = QString::fromUtf8(cf.data());
else
f = cf.data();
f = cf.data();
QDomDocument docu("scridoc");
docu.setContent(f);
QDomElement elem = docu.documentElement();
1516,7 → 1515,7
}
}
 
void Biblio::adjustReferencesGroups(QDomElement elem, QFileInfo fid)
void Biblio::adjustReferencesGroups(const QDomElement& elem, const QFileInfo& fid)
{
QDomNode DOC = elem.firstChild();
while(!DOC.isNull())
1585,7 → 1584,7
return result;
}
 
void Biblio::ObjFromFile(QString path, int testResult)
void Biblio::ObjFromFile(const QString& path, int testResult)
{
if (!activeBView->canWrite)
return;
1813,9 → 1812,9
}
}
 
void Biblio::ObjFromCopyAction(QString text, QString name)
void Biblio::ObjFromCopyAction(const QString& text, const QString& name)
{
QString nam = "";
QString nam;
QString tmp;
nam = name;
if (nam.isEmpty())
1823,10 → 1822,9
if (tempBView->objectMap.contains(nam))
nam += "("+ tmp.setNum(tempCount) + ")";
tempCount++;
QString ff = text;
tempBView->checkAndChange(ff, QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename + "/" + nam + ".sce")), QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename)));
tempBView->checkAndChange(text, QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename + "/" + nam + ".sce")), QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename)));
ScPreview *pre = new ScPreview();
QPixmap pm = QPixmap::fromImage(pre->createPreview(ff));
QPixmap pm = QPixmap::fromImage(pre->createPreview(text));
tempBView->AddObj(nam, QDir::cleanPath(QDir::toNativeSeparators(tempBView->ScFilename + "/" + nam + ".sce")), pm);
if (PrefsManager::instance()->appPrefs.scrapbookPrefs.writePreviews)
{
/trunk/Scribus/scribus/ui/scrapbookpalette.h
33,12 → 33,12
public:
BibView( QWidget* parent);
~BibView() {};
void AddObj(QString name, QString daten, QPixmap Bild, bool isDir = false, bool isRaster = false, bool isVector = false);
void checkForImg(QDomElement elem, bool &hasImage);
void checkAndChange(QString &text, QString nam, QString dir);
void checkAndChangeGroups(QDomElement elem, QString dir, QFileInfo fid);
void ReadOldContents(QString, QString newName);
void ReadContents(QString name);
void AddObj(const QString& name, const QString& daten, const QPixmap& Bild, bool isDir = false, bool isRaster = false, bool isVector = false);
void checkForImg(const QDomElement& elem, bool &hasImage);
void checkAndChange(const QString& text, const QString& nam, const QString& dir);
void checkAndChangeGroups(const QDomElement& elem, const QString& dir, const QFileInfo& fid);
void ReadOldContents(const QString&, const QString& newName);
void ReadContents(const QString& name);
struct Elem
{
bool isDir;
76,17 → 76,17
virtual void changeEvent(QEvent *e);
void ObjFromCopyAction(QString text, QString name);
void adjustReferences(QString nam);
void adjustReferencesGroups(QDomElement elem, QFileInfo fid);
void ObjFromCopyAction(const QString& text, const QString& name);
void adjustReferences(const QString& nam);
void adjustReferencesGroups(const QDomElement& elem, const QFileInfo& fid);
void CleanUpTemp();
void setScrapbookFileName(QString);
void setScrapbookFileName(const QString&);
const QString getScrapbookFileName();
const int objectCount();
bool tempHasContents();
void readContents(QString);
void readTempContents(QString);
void readOldContents(QString, QString);
void readContents(const QString&);
void readTempContents(const QString&);
void readOldContents(const QString&, const QString&);
void installEventFilter(QObject *);
void setOpenScrapbooks(QStringList &fileNames);
QStringList getOpenScrapbooks();
98,11 → 98,11
public slots:
void languageChange();
void ObjFromFile(QString path, int testResult);
void ObjFromFile(const QString& path, int testResult);
void ObjFromMenu(QString text);
void ObjFromMainMenu(QString text, int scrapID);
void closeOnDel(QString libName);
void reloadLib(QString fileName);
void closeOnDel(const QString& libName);
void reloadLib(const QString& fileName);
 
private slots:
void handleDoubleClick(QListWidgetItem *ite);
/trunk/Scribus/scribus/ui/sctextbrowser.cpp
37,7 → 37,7
}
 
 
void ScTextBrowser::catchHome(QUrl url)
void ScTextBrowser::catchHome(const QUrl& url)
{
if (homeUrl.isEmpty())
{
46,7 → 46,7
}
}
 
void ScTextBrowser::externalLinkClick(QUrl url)
void ScTextBrowser::externalLinkClick(const QUrl& url)
{
if (url.scheme()=="http")
UrlLauncher::instance()->launchUrlExt(url, parentWidget());
/trunk/Scribus/scribus/ui/sctextbrowser.h
30,8 → 30,8
void home();
 
private slots:
void catchHome(QUrl url);
void externalLinkClick(QUrl url);
void catchHome(const QUrl& url);
void externalLinkClick(const QUrl& url);
 
protected:
QString m_baseDir;
/trunk/Scribus/scribus/ui/sctreewidget.cpp
124,7 → 124,7
return QTreeWidget::event(e);
}
 
QTreeWidgetItem* ScTreeWidget::addWidget(QString title, QWidget* widget)
QTreeWidgetItem* ScTreeWidget::addWidget(const QString& title, QWidget* widget)
{
QTreeWidgetItem *item1 = new QTreeWidgetItem(this);
item1->setText(0, title);
151,7 → 151,7
m_toolbox_mode = enable;
}
 
int ScTreeWidget::addItem(QWidget* widget, QString title)
int ScTreeWidget::addItem(QWidget* widget, const QString& title)
{
QTreeWidgetItem *top = addWidget(title, widget);
return indexOfTopLevelItem(top);
/trunk/Scribus/scribus/ui/sctreewidget.h
51,9 → 51,9
public:
ScTreeWidget(QWidget* pa);
~ScTreeWidget() {}
QTreeWidgetItem* addWidget(QString title, QWidget* widget);
QTreeWidgetItem* addWidget(const QString& title, QWidget* widget);
void setToolBoxMode(bool enable);
int addItem(QWidget* widget, QString title);
int addItem(QWidget* widget, const QString& title);
QWidget* widget(int index);
void setItemEnabled(int index, bool enable);
bool isItemEnabled(int index);
/trunk/Scribus/scribus/ui/selfield.cpp
22,7 → 22,7
#include "scribusdoc.h"
#include "iconmanager.h"
 
SelectFields::SelectFields(QWidget* parent, QString Felder, QString Own, ScribusDoc *Doc, int Art) : QDialog(parent)
SelectFields::SelectFields(QWidget* parent, const QString& Felder, const QString& Own, ScribusDoc *Doc, int Art) : QDialog(parent)
{
setModal(true);
setWindowTitle( tr( "Select Fields" ) );
/trunk/Scribus/scribus/ui/selfield.h
24,7 → 24,7
Q_OBJECT
 
public:
SelectFields( QWidget* parent, QString Felder, QString Own, ScribusDoc *Doc, int Art);
SelectFields(QWidget* parent, const QString& Felder, const QString& Own, ScribusDoc *Doc, int Art);
~SelectFields() {};
 
QLabel* Text1;
/trunk/Scribus/scribus/ui/smcstylewidget.cpp
135,12 → 135,13
tmpView->setMinimumWidth(tmpWidth + 24);
}
*/
void SMCStyleWidget::fillLangComboFromList(QStringList langList)
void SMCStyleWidget::fillLangComboFromList(const QStringList& langList)
{
language_->clear();
language_->addItems(langList);
 
QListView *tmpView = dynamic_cast<QListView*>(language_->view()); Q_ASSERT(tmpView);
QListView *tmpView = dynamic_cast<QListView*>(language_->view());
Q_ASSERT(tmpView);
int tmpWidth = tmpView->sizeHintForColumn(0);
if (tmpWidth > 0)
tmpView->setMinimumWidth(tmpWidth + 24);
168,7 → 169,7
fillColorCombo(m_Doc->PageColors);
}
 
void SMCStyleWidget::slotEnableFontFeatures(QString s)
void SMCStyleWidget::slotEnableFontFeatures(const QString& s)
{
const ScFace& font = PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts[s];
fontfeaturesSetting->enableFontFeatures(font.fontFeatures());
/trunk/Scribus/scribus/ui/smcstylewidget.h
28,7 → 28,7
void show(CharStyle *cstyle, QList<CharStyle> &cstyles, const QString &defLang, int unitIndex);
void show(QList<CharStyle*> &cstyles, QList<CharStyle> &cstylesAll, const QString &defLang, int unitIndex);
//void fillLangCombo(QMap<QString,QString> langMap);
void fillLangComboFromList(QStringList langList);
void fillLangComboFromList(const QStringList& langList);
void fillColorCombo(ColorList &colors);
void languageChange();
void clearAll();
52,7 → 52,7
private slots:
void slotColorChange();
void handleUpdateRequest(int);
void slotEnableFontFeatures(QString s);
void slotEnableFontFeatures(const QString& s);
};
 
#endif
/trunk/Scribus/scribus/ui/smfontfeatures.cpp
107,7 → 107,7
return features;
}
 
void SMFontFeatures::setFontFeatures(QString s, QStringList fontFeaturesList)
void SMFontFeatures::setFontFeatures(const QString& s, QStringList fontFeaturesList)
{
disconnectSignals();
m_hasParent = false;
209,7 → 209,7
}
}
 
void SMFontFeatures::setFontFeatures(QString val, QStringList fontFeatures, bool isParentVal)
void SMFontFeatures::setFontFeatures(const QString& val, QStringList fontFeatures, bool isParentVal)
{
disconnectSignals();
m_hasParent = true;
304,7 → 304,7
return font_feature.join(",");
}
 
void SMFontFeatures::setParentValue(QString val)
void SMFontFeatures::setParentValue(const QString& val)
{
m_hasParent = true;
m_pValue = val;
390,7 → 390,7
}
}
 
void SMFontFeatures::enableFontFeatures(QStringList fontFeatures)
void SMFontFeatures::enableFontFeatures(const QStringList& fontFeatures)
{
int featureFlags = FontFeatures::fontFlagsFromList(fontFeatures);
 
/trunk/Scribus/scribus/ui/smfontfeatures.h
42,13 → 42,13
virtual void changeEvent(QEvent *e);
void languageChange();
 
void setFontFeatures(QString s, QStringList fontFeaturesList);
void setFontFeatures(QString val, QStringList fontFeatures, bool isParentVal);
void setFontFeatures(const QString& s, QStringList fontFeaturesList);
void setFontFeatures(const QString& val, QStringList fontFeatures, bool isParentVal);
QString fontFeatures();
void enableFontFeatures(QStringList fontFeatures);
void enableFontFeatures(const QStringList& fontFeatures);
void resetFontFeatures();
 
void setParentValue(QString val);
void setParentValue(const QString& val);
bool useParentValue();
 
StylisticSetsMenu *styleSetsMenu;
/trunk/Scribus/scribus/ui/smlineedit.cpp
15,7 → 15,7
 
}
 
void SMLineEdit::setValue(QString val)
void SMLineEdit::setValue(const QString& val)
{
disconnect(this, SIGNAL(textChanged(QString)), this, SLOT(slotValueChanged()));
m_hasParent = false;
25,7 → 25,7
QLineEdit::setText(val);
}
 
void SMLineEdit::setValue(QString val, bool isParentVal)
void SMLineEdit::setValue(const QString& val, bool isParentVal)
{
disconnect(this, SIGNAL(textChanged(QString)), this, SLOT(slotValueChanged()));
m_hasParent = true;
43,7 → 43,7
connect(this, SIGNAL(textChanged(QString)), this, SLOT(slotValueChanged()));
}
 
void SMLineEdit::setParentValue(QString val)
void SMLineEdit::setParentValue(const QString& val)
{
m_hasParent = true;
m_pValue = val;
/trunk/Scribus/scribus/ui/smlineedit.h
16,12 → 16,12
SMLineEdit(QWidget *parent);
~SMLineEdit() {}
 
void setValue(QString val);
void setValue(QString val, bool isParentVal);
void setValue(const QString& val);
void setValue(const QString& val, bool isParentVal);
 
void clear();
 
void setParentValue(QString val);
void setParentValue(const QString& val);
 
bool useParentValue();
private:
/trunk/Scribus/scribus/ui/smreplacedia.cpp
11,7 → 11,7
#include <QComboBox>
 
 
SMRowWidget::SMRowWidget(const QString &toBeDeleted, QStringList replaceOptions, QWidget *parent)
SMRowWidget::SMRowWidget(const QString &toBeDeleted, const QStringList& replaceOptions, QWidget *parent)
: QWidget(parent)
{
layout = new QHBoxLayout(this);
/trunk/Scribus/scribus/ui/smreplacedia.h
22,7 → 22,7
{
Q_OBJECT
public:
SMRowWidget(const QString &toBeDeleted, QStringList replaceOptions, QWidget *parent);
SMRowWidget(const QString &toBeDeleted, const QStringList& replaceOptions, QWidget *parent);
~SMRowWidget();
 
QString toBeDeleted();
/trunk/Scribus/scribus/ui/smtabruler.cpp
11,8 → 11,7
#include "units.h"
 
 
SMTabruler::SMTabruler(QWidget* parent, bool haveFirst, int dEin,
QList<ParagraphStyle::TabRecord> Tabs, double wid)
SMTabruler::SMTabruler(QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid)
: Tabruler(parent, haveFirst, dEin, Tabs, wid)
{
m_parentButton = new QToolButton(this);
83,7 → 82,7
this->blockSignals(false);
}
 
void SMTabruler::setTabs(QList<ParagraphStyle::TabRecord> Tabs, int unitIndex)
void SMTabruler::setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int unitIndex)
{
disconnect(this, SIGNAL(tabsChanged()), this, SLOT(slotTabsChanged()));
disconnect(this, SIGNAL(mouseReleased()), this, SLOT(slotTabsChanged()));
97,7 → 96,7
tabData->setNewUnit(unitIndex);
}
 
void SMTabruler::setTabs(QList<ParagraphStyle::TabRecord> Tabs, int unitIndex, bool isParentValue)
void SMTabruler::setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int unitIndex, bool isParentValue)
{
disconnect(this, SIGNAL(tabsChanged()), this, SLOT(slotTabsChanged()));
disconnect(this, SIGNAL(mouseReleased()), this, SLOT(slotTabsChanged()));
118,7 → 117,7
connect(this, SIGNAL(mouseReleased()), this, SLOT(slotTabsChanged()));
}
 
void SMTabruler::setParentTabs(QList<ParagraphStyle::TabRecord> Tabs)
void SMTabruler::setParentTabs(const QList<ParagraphStyle::TabRecord>& Tabs)
{
m_hasParent = true;
m_pTabs = Tabs;
/trunk/Scribus/scribus/ui/smtabruler.h
25,9 → 25,9
 
void unitChange(int unitIndex);
 
void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int unitIndex);
void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int unitIndex, bool isParentValue);
void setParentTabs(QList<ParagraphStyle::TabRecord> Tabs);
void setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int unitIndex);
void setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int unitIndex, bool isParentValue);
void setParentTabs(const QList<ParagraphStyle::TabRecord>& Tabs);
 
void setFirstLineValue(double t);
void setFirstLineValue(double t, bool isParentValue);
/trunk/Scribus/scribus/ui/smtextstyles.cpp
1930,7 → 1930,7
}
}
 
void SMParagraphStyle::slotFont(QString s)
void SMParagraphStyle::slotFont(const QString& s)
{
if (m_pwidget->cpage->fontFace_->useParentFont())
for (int i = 0; i < m_selection.count(); ++i)
3015,7 → 3015,7
}
}
 
void SMCharacterStyle::slotFont(QString s)
void SMCharacterStyle::slotFont(const QString& s)
{
if (m_page->fontFace_->useParentFont())
for (int i = 0; i < m_selection.count(); ++i)
/trunk/Scribus/scribus/ui/smtextstyles.h
132,7 → 132,7
void slotTracking();
void slotWordTracking();
void slotBaselineOffset();
void slotFont(QString s);
void slotFont(const QString& s);
void slotParentChanged(const QString &parent);
void slotCharParentChanged(const QString &parent);
void slotFontFeatures();
205,7 → 205,7
void slotBaselineOffset();
void slotHyphenChar();
void slotSmallestWord();
void slotFont(QString s);
void slotFont(const QString& s);
void slotParentChanged(const QString &parent);
void slotFontFeatures();
 
/trunk/Scribus/scribus/ui/spalette.cpp
43,7 → 43,7
updateFormatList();
}
 
void ParaStyleComboBox::setFormat(QString name)
void ParaStyleComboBox::setFormat(const QString& name)
{
setCurrentComboItem(this, name.isEmpty() ? tr("No Style") : name);
}
107,7 → 107,7
updateFormatList();
}
 
void CharStyleComboBox::setFormat(QString name)
void CharStyleComboBox::setFormat(const QString& name)
{
setCurrentComboItem(this, name.isEmpty() ? tr("No Style") : name);
}
171,7 → 171,7
updateFormatList();
}
 
void CellStyleComboBox::setFormat(QString name)
void CellStyleComboBox::setFormat(const QString& name)
{
setCurrentComboItem(this, name.isEmpty() ? tr("No Style") : name);
}
236,7 → 236,7
updateFormatList();
}
 
void TableStyleComboBox::setFormat(QString name)
void TableStyleComboBox::setFormat(const QString& name)
{
setCurrentComboItem(this, name.isEmpty() ? tr("No Style") : name);
}
/trunk/Scribus/scribus/ui/spalette.h
45,7 → 45,7
public slots:
void setDoc(ScribusDoc *newCurrentDoc);
void setFormat(QString name);
void setFormat(const QString& name);
void updateFormatList();
void selFormat(int e);
66,7 → 66,7
public slots:
void setDoc(ScribusDoc *newCurrentDoc);
void setFormat(QString name);
void setFormat(const QString& name);
void updateFormatList();
void selFormat(int e);
87,7 → 87,7
 
public slots:
void setDoc(ScribusDoc *newCurrentDoc);
void setFormat(QString name);
void setFormat(const QString& name);
void updateFormatList();
void selFormat(int e);
 
108,7 → 108,7
 
public slots:
void setDoc(ScribusDoc *newCurrentDoc);
void setFormat(QString name);
void setFormat(const QString& name);
void updateFormatList();
void selFormat(int e);
 
/trunk/Scribus/scribus/ui/storyeditor.cpp
717,7 → 717,7
//SelParaStart = 0;
}
 
void SEditor::loadText(QString tx, PageItem *currItem)
void SEditor::loadText(const QString& tx, PageItem *currItem)
{
setTextColor(Qt::black);
setUpdatesEnabled(false);
1430,7 → 1430,7
QSignalBlocker sigBlocker(GroupDirection);
}
 
void SToolBAlign::SetParaStyle(QString s)
void SToolBAlign::SetParaStyle(const QString& s)
{
QSignalBlocker sigBlocker(paraStyleCombo);
paraStyleCombo->setFormat(s);
1494,7 → 1494,7
charScaleV->setToolTip( tr("Scaling height of characters"));
}
 
void SToolBFont::SetFont(QString f)
void SToolBFont::SetFont(const QString& f)
{
QSignalBlocker sigBlocker(Fonts);
setCurrentComboItem(Fonts, f);
2748,7 → 2748,7
m_blockUpdate = false;
}
 
void StoryEditor::slot_insertUserSpecialChar(QChar c, QString)
void StoryEditor::slot_insertUserSpecialChar(QChar c, const QString&)
{
m_blockUpdate = true;
Editor->insertPlainText(c);
/trunk/Scribus/scribus/ui/storyeditor.h
94,7 → 94,7
void setDirection(int align);
void saveItemText(PageItem *currItem);
void loadItemText(PageItem *currItem);
void loadText(QString tx, PageItem *currItem);
void loadText(const QString& tx, PageItem *currItem);
void updateAll();
void updateFromChars(int p);
void updateSel(const CharStyle& style);
337,7 → 337,7
public slots:
void SetAlign(int s);
void SetDirection(int s);
void SetParaStyle(QString s);
void SetParaStyle(const QString& s);
void languageChange();
 
signals:
364,7 → 364,7
QAction* chScaleVAction;
 
public slots:
void SetFont(QString f);
void SetFont(const QString& f);
void SetSize(double s);
void SetScaleH(double s);
void SetScaleV(double s);
492,7 → 492,7
void specialActionKeyEvent(int unicodevalue);
/*! \brief Slot to insert special characters from charSelect widget. */
void slot_insertSpecialChar();
void slot_insertUserSpecialChar(QChar, QString);
void slot_insertUserSpecialChar(QChar, const QString&);
// 10/12/2004 - pv - #1203: wrong selection on double click
void doubleClick(int para, int pos);
 
/trunk/Scribus/scribus/ui/stylemanager.cpp
1150,7 → 1150,7
return false;
}
 
void StyleManager::slotApplyStyle(QString keyString)
void StyleManager::slotApplyStyle(const QString& keyString)
{
if (m_isEditMode)
return;
/trunk/Scribus/scribus/ui/stylemanager.h
140,7 → 140,7
void slotDirty();
void slotClean();
 
void slotApplyStyle(QString keyString); // keyString == styleClass$$$$styleName
void slotApplyStyle(const QString& keyString); // keyString == styleClass$$$$styleName
};
 
#endif
/trunk/Scribus/scribus/ui/swatchcombo.cpp
57,7 → 57,7
}
}
 
QTreeWidgetItem* SwatchCombo::addTopLevelItem(QString name)
QTreeWidgetItem* SwatchCombo::addTopLevelItem(const QString& name)
{
QTreeWidgetItem* item = new QTreeWidgetItem(dataTree);
item->setFlags(Qt::ItemIsEditable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
65,7 → 65,7
return item;
}
 
QTreeWidgetItem* SwatchCombo::addSubItem(QString name, QTreeWidgetItem* parent, bool selectable)
QTreeWidgetItem* SwatchCombo::addSubItem(const QString& name, QTreeWidgetItem* parent, bool selectable)
{
QTreeWidgetItem* item = new QTreeWidgetItem(parent);
if (selectable)
76,7 → 76,7
return item;
}
 
void SwatchCombo::setCurrentComboItem(QString text)
void SwatchCombo::setCurrentComboItem(const QString& text)
{
QFontMetrics fm(font());
setToolTip(text);
/trunk/Scribus/scribus/ui/swatchcombo.h
39,9 → 39,9
 
public:
SwatchCombo( QWidget* parent = nullptr );
QTreeWidgetItem* addTopLevelItem(QString name);
QTreeWidgetItem* addSubItem(QString name, QTreeWidgetItem* parent, bool selectable = true);
void setCurrentComboItem(QString text);
QTreeWidgetItem* addTopLevelItem(const QString& name);
QTreeWidgetItem* addSubItem(const QString& name, QTreeWidgetItem* parent, bool selectable = true);
void setCurrentComboItem(const QString& text);
QTreeWidgetItem* currentItem();
signals:
void activated(const QString &);
/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
1414,7 → 1414,7
}
}
 
QListWidgetItem* TabPDFOptions::addFontItem(QString fontName, QListWidget* fontList)
QListWidgetItem* TabPDFOptions::addFontItem(const QString& fontName, QListWidget* fontList)
{
QListWidgetItem* item = nullptr;
if (!AllFonts.contains(fontName))
/trunk/Scribus/scribus/ui/tabpdfoptions.h
112,7 → 112,7
QList<PDFPresentationData> EffVal;
QString SelLPIcolor;
 
QListWidgetItem* addFontItem(QString fontName, QListWidget* fontList);
QListWidgetItem* addFontItem(const QString& fontName, QListWidget* fontList);
 
private:
// Non-GUI protected members
/trunk/Scribus/scribus/ui/tabruler.cpp
30,7 → 30,7
#include "iconmanager.h"
#include "util.h"
 
RulerT::RulerT(QWidget *pa, int ein, QList<ParagraphStyle::TabRecord> Tabs, bool ind, double wid) : QWidget(pa),
RulerT::RulerT(QWidget *pa, int ein, const QList<ParagraphStyle::TabRecord>& Tabs, bool ind, double wid) : QWidget(pa),
mousePressed(false),
tabValues(Tabs),
haveInd(ind),
67,7 → 67,7
}
}
 
void RulerT::setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin)
void RulerT::setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int dEin)
{
unitIndex = dEin;
iter = unitRulerGetIter1FromIndex(unitIndex);
492,7 → 492,7
repaint();
}
 
Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid ) : QWidget( parent ),
Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, const QList<ParagraphStyle::TabRecord>& Tabs, double wid ) : QWidget( parent ),
firstLineLabel(nullptr),
leftIndentLabel(nullptr),
rightIndentLabel(nullptr),
739,7 → 739,7
tabData->setSuffix(unitSuffix);
}
 
void Tabruler::setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin)
void Tabruler::setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int dEin)
{
docUnitRatio=unitGetRatioFromIndex(dEin);
tabData->setNewUnit(dEin);
/trunk/Scribus/scribus/ui/tabruler.h
30,10 → 30,10
Q_OBJECT
 
public:
RulerT(QWidget* parent, int ein, QList<ParagraphStyle::TabRecord> Tabs, bool ind, double wid);
RulerT(QWidget* parent, int ein, const QList<ParagraphStyle::TabRecord>& Tabs, bool ind, double wid);
~RulerT() {};
 
void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin);
void setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int dEin);
void updateTabList();
 
bool mousePressed;
87,17 → 87,17
Q_OBJECT
 
public:
Tabruler( QWidget* parent,
bool haveFirst = true,
int dEin = 1,
QList<ParagraphStyle::TabRecord> Tabs = QList<ParagraphStyle::TabRecord>(),
double wid = -1);
Tabruler(QWidget* parent,
bool haveFirst = true,
int dEin = 1,
const QList<ParagraphStyle::TabRecord>& Tabs = QList<ParagraphStyle::TabRecord>(),
double wid = -1);
~Tabruler() {};
 
virtual void changeEvent(QEvent *e);
 
void languageChange();
virtual void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin);
virtual void setTabs(const QList<ParagraphStyle::TabRecord>& Tabs, int dEin);
 
QList<ParagraphStyle::TabRecord> getTabVals();
bool haveF;
/trunk/Scribus/scribus/ui/transformdialog.cpp
36,7 → 36,7
#endif
#include <cmath>
 
TransformItem::TransformItem(QString text, QListWidget* parent, int type, double val1, double val2) : QListWidgetItem(text, parent, type)
TransformItem::TransformItem(const QString& text, QListWidget* parent, int type, double val1, double val2) : QListWidgetItem(text, parent, type)
{
firstValue = val1;
secondValue = val2;
/trunk/Scribus/scribus/ui/transformdialog.h
41,7 → 41,7
class SCRIBUS_API TransformItem : public QListWidgetItem
{
public:
TransformItem(QString text, QListWidget* parent, int type, double val1, double val2);
TransformItem(const QString& text, QListWidget* parent, int type, double val1, double val2);
~TransformItem() {};
double firstValue;
double secondValue;
/trunk/Scribus/scribus/ui/transparencypalette.cpp
245,7 → 245,7
pm = QPixmap::fromImage(pixm);
namedGradient->addItem(pm, patK[a]);
}
connect(namedGradient, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradient(const QString &)));
connect(namedGradient, SIGNAL(activated(const QString&)), this, SLOT(setNamedGradient(const QString&)));
}
 
void Tpalette::setGradients(QHash<QString, VGradient> *docGradients)
254,7 → 254,7
updateGradientList();
}
 
void Tpalette::setColors(ColorList newColorList)
void Tpalette::setColors(const ColorList& newColorList)
{
colorList.clear();
colorList = newColorList;
484,7 → 484,7
emit NewPattern(c->text());
}
 
void Tpalette::setActPattern(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY)
void Tpalette::setActPattern(const QString& pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY)
{
disconnect(patternBox, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(selectPattern(QListWidgetItem*)));
QList<QListWidgetItem*> itl = patternBox->findItems(pattern, Qt::MatchExactly);
/trunk/Scribus/scribus/ui/transparencypalette.h
66,7 → 66,7
 
void updateColorList();
 
void setColors(ColorList newColorList);
void setColors(const ColorList& newColorList);
void setGradients(QHash<QString, VGradient> *docGradients);
void setPatterns(QHash<QString, ScPattern> *docPatterns);
 
84,7 → 84,7
void setActiveGradDia(bool active);
void hideEditedPatterns(QStringList names);
void selectPattern(QListWidgetItem *c);
void setActPattern(QString pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
void setActPattern(const QString& pattern, double scaleX, double scaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY);
void changePatternProps();
void setSpecialGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk);
void setActTrans(double, double);
/trunk/Scribus/scribus/ui/vruler.cpp
206,7 → 206,7
p.end();
}
 
void Vruler::drawNumber(QString num, int starty, QPainter *p)
void Vruler::drawNumber(const QString& num, int starty, QPainter *p)
{
int textY = starty;
for (int a = 0; a < num.length(); ++a)
/trunk/Scribus/scribus/ui/vruler.h
53,7 → 53,7
virtual void mouseReleaseEvent(QMouseEvent *m);
virtual void mouseMoveEvent(QMouseEvent *m);
 
void drawNumber(QString num, int starty, QPainter *p);
void drawNumber(const QString& num, int starty, QPainter *p);
double offs;
int oldMark;
bool Mpressed;
/trunk/Scribus/scribus/util_file.cpp
240,7 → 240,7
return false;
}
 
PageItem* getVectorFileFromData(ScribusDoc *doc, QByteArray &data, QString ext, double x, double y, double w, double h)
PageItem* getVectorFileFromData(ScribusDoc *doc, QByteArray &data, const QString& ext, double x, double y, double w, double h)
{
PageItem* retObj = nullptr;
QTemporaryFile *tempFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_XXXXXX." + ext);
/trunk/Scribus/scribus/util_file.h
99,5 → 99,5
**/
bool SCRIBUS_API checkFileHash(const QString& directory, const QString& filename, const QString& hashFilename, QCryptographicHash::Algorithm method);
 
PageItem SCRIBUS_API * getVectorFileFromData(ScribusDoc *doc, QByteArray &data, QString ext, double x, double y, double w = -1.0, double h = -1.0);
PageItem SCRIBUS_API * getVectorFileFromData(ScribusDoc *doc, QByteArray &data, const QString& ext, double x, double y, double w = -1.0, double h = -1.0);
#endif
/trunk/Scribus/scribus/vgradient.cpp
115,7 → 115,7
{
if (static_cast<uint>(m_colorStops.count()) != gradient.Stops())
return false;
QList<VColorStop*> cs = gradient.colorStops();
const QList<VColorStop*>& cs = gradient.colorStops();
bool retVal = true;
for (int i = 0; i < m_colorStops.count(); ++i)
{
162,7 → 162,7
} // VGradient::addStop
 
void
VGradient::addStop( const QColor &color, double rampPoint, double midPoint, double opa, QString name, int shade )
VGradient::addStop( const QColor &color, double rampPoint, double midPoint, double opa, const QString& name, int shade )
{
// Clamping between 0.0 and 1.0
rampPoint = qMax( 0.0, rampPoint );
175,7 → 175,7
}
 
void
VGradient::setStop( const QColor &color, double rampPoint, double midPoint, double opa, QString name, int shade )
VGradient::setStop( const QColor &color, double rampPoint, double midPoint, double opa, const QString& name, int shade )
{
for (int i = 0; i < m_colorStops.count(); ++i)
{
199,7 → 199,7
delete m_colorStops.takeAt(n);
}
 
void VGradient::filterStops(void)
void VGradient::filterStops()
{
VColorStop* colorStop = nullptr;
bool zeroFound = false;
/trunk/Scribus/scribus/vgradient.h
113,8 → 113,8
 
const QList<VColorStop*>& colorStops() const;
void addStop( const VColorStop& colorStop );
void addStop( const QColor &color, double rampPoint, double midPoint, double opa, QString name = "", int shade = 100 );
void setStop( const QColor &color, double rampPoint, double midPoint, double opa, QString name = "", int shade = 100 );
void addStop( const QColor &color, double rampPoint, double midPoint, double opa, const QString& name = "", int shade = 100 );
void setStop(const QColor &color, double rampPoint, double midPoint, double opa, const QString& name = "", int shade = 100 );
void removeStop( VColorStop& colorStop );
void removeStop( uint n );
void clearStops();
/trunk/Scribus/scribus/vgradientex.cpp
152,7 → 152,7
} // VGradientEx::addStop
 
void
VGradientEx::addStop( const ScColor &color, double rampPoint, double midPoint, double opa, QString name, int shade )
VGradientEx::addStop( const ScColor &color, double rampPoint, double midPoint, double opa, const QString& name, int shade )
{
// Clamping between 0.0 and 1.0
rampPoint = qMax( 0.0, rampPoint );
/trunk/Scribus/scribus/vgradientex.h
115,7 → 115,7
 
const QList<VColorStopEx*> colorStops() const;
void addStop( const VColorStopEx& colorStop );
void addStop( const ScColor &color, double rampPoint, double midPoint, double opa, QString name = "", int shade = 100 );
void addStop(const ScColor &color, double rampPoint, double midPoint, double opa, const QString& name = "", int shade = 100 );
void removeStop( VColorStopEx& colorStop );
void removeStop( uint n );
void clearStops();