r21075 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Tue Mar 8 22:32:10 UTC 2016
Author: craig
Date: Tue Mar 8 22:32:10 2016
New Revision: 21075
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21075
Log:
#13801: apply some fixes for compile warnings and add in some variable renames for good measure
Modified:
trunk/Scribus/scribus/canvasmode_framelinks.cpp
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/pdfstructs.h
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
trunk/Scribus/scribus/ui/prefs_documentsections.cpp
trunk/Scribus/scribus/ui/prefs_documentsections.h
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Tue Mar 8 22:32:10 2016
@@ -119,7 +119,7 @@
void CanvasMode_FrameLinks::mouseMoveEvent(QMouseEvent *m)
{
- const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+ //const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m->accept();
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Tue Mar 8 22:32:10 2016
@@ -1708,7 +1708,7 @@
return result;
}
-
+/*
static void dumpFont(QString name, QByteArray data)
{
QFile file(name);
@@ -1730,6 +1730,7 @@
file.close();
}
}
+*/
PdfFont PDFLibCore::PDF_WriteTtfSubsetFont(const QByteArray& fontName, ScFace& face, const QMap<uint,FPointArray>& RealGlyphs)
@@ -2925,7 +2926,7 @@
compDataAvail = true;
}
}
- uint thumbnail = writer.newObject();
+ PdfId thumbnail = writer.newObject();
writer.startObj(thumbnail);
PutDoc("<<\n/Width "+Pdf::toPdf(img.width())+"\n");
PutDoc("/Height "+Pdf::toPdf(img.height())+"\n");
Modified: trunk/Scribus/scribus/pdfstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/pdfstructs.h
==============================================================================
--- trunk/Scribus/scribus/pdfstructs.h (original)
+++ trunk/Scribus/scribus/pdfstructs.h Tue Mar 8 22:32:10 2016
@@ -69,7 +69,7 @@
struct PdfPageData
{
PdfId ObjNum;
- int Thumb;
+ PdfId Thumb;
Pdf::ResourceMap XObjects;
Pdf::ResourceMap ImgObjects;
Pdf::ResourceMap FObjects;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Tue Mar 8 22:32:10 2016
@@ -385,6 +385,7 @@
case PageItem::Arc:
case PageItem::Spiral:
case PageItem::Table:
+ case PageItem::NoteFrame:
Q_ASSERT(false);
break;
case PageItem::LatexFrame:
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp Tue Mar 8 22:32:10 2016
@@ -426,5 +426,5 @@
void cmddocdocwarnings()
{
QStringList s;
- s << scribus_newdocument__doc__ << scribus_newdoc__doc__ << scribus_closedoc__doc__ << scribus_havedoc__doc__ << scribus_opendoc__doc__ << scribus_savedoc__doc__ << scribus_getdocname__doc__ << scribus_savedocas__doc__ << scribus_setinfo__doc__ <<scribus_setmargins__doc__ <<scribus_setunit__doc__ <<scribus_getunit__doc__ <<scribus_loadstylesfromfile__doc__ <<scribus_setdoctype__doc__ <<scribus_closemasterpage__doc__ <<scribus_masterpagenames__doc__ <<scribus_editmasterpage__doc__ <<scribus_createmasterpage__doc__ <<scribus_deletemasterpage__doc__ << scribus_setbaseline__doc__;
-}
+ s << scribus_newdocument__doc__ << scribus_newdoc__doc__ << scribus_closedoc__doc__ << scribus_havedoc__doc__ << scribus_opendoc__doc__ << scribus_savedoc__doc__ << scribus_getdocname__doc__ << scribus_savedocas__doc__ << scribus_setinfo__doc__ <<scribus_setmargins__doc__ <<scribus_setunit__doc__ <<scribus_getunit__doc__ <<scribus_loadstylesfromfile__doc__ <<scribus_setdoctype__doc__ <<scribus_closemasterpage__doc__ <<scribus_masterpagenames__doc__ <<scribus_editmasterpage__doc__ <<scribus_createmasterpage__doc__ <<scribus_deletemasterpage__doc__ << scribus_setbaseline__doc__ << scribus_applymasterpage__doc__;
+}
Modified: trunk/Scribus/scribus/ui/prefs_documentsections.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/ui/prefs_documentsections.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsections.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_documentsections.cpp Tue Mar 8 22:32:10 2016
@@ -36,11 +36,11 @@
void Prefs_DocumentSections::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- localSections=prefsData->docSectionMap;
+ m_localSections=prefsData->docSectionMap;
m_maxPageIndex=m_doc->DocPages.count()-1;
- styles.clear();
- styles=getFormatListTr();
- styles << CommonStrings::tr_None;
+ m_styles.clear();
+ m_styles=getFormatListTr();
+ m_styles << CommonStrings::tr_None;
// styles << tr("1, 2, 3, ...") << tr("i, ii, iii, ...") << tr("I, II, III, ...") << tr("a, b, c, ...") << tr("A, B, C, ...") << tr("*") << tr("CJK") << CommonStrings::tr_None;
updateTable();
@@ -48,14 +48,14 @@
void Prefs_DocumentSections::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
{
- prefsData->docSectionMap=localSections;
+ prefsData->docSectionMap=m_localSections;
}
void Prefs_DocumentSections::updateTable()
{
- sectionsTable->setRowCount(localSections.count());
+ sectionsTable->setRowCount(m_localSections.count());
int row=0;
- for(DocumentSectionMap::Iterator it = localSections.begin(); it!= localSections.end(); ++it)
+ for(DocumentSectionMap::Iterator it = m_localSections.begin(); it!= m_localSections.end(); ++it)
{
uint i=0;
//Name
@@ -77,10 +77,10 @@
sectionsTable->setItem(row, i++, item4);
//Style
QComboBox *item5 = new QComboBox();
- item5->addItems(styles);
+ item5->addItems(m_styles);
sectionsTable->setCellWidget(row, i++, item5);
if ((*it).type==Type_None)
- item5->setCurrentIndex(styles.count()-1);
+ item5->setCurrentIndex(m_styles.count()-1);
else
item5->setCurrentIndex((*it).type);
//Start Page Number
@@ -104,7 +104,7 @@
t->setText(QString("%1").arg(row));
row++;
}
- deleteButton->setEnabled(localSections.count()>1);
+ deleteButton->setEnabled(m_localSections.count()>1);
}
void Prefs_DocumentSections::tableItemChanged( int row, int col )
@@ -114,13 +114,13 @@
switch (col)
{
case 0:
- localSections[row].name=sectionsTable->item(row, col)->text();
+ m_localSections[row].name=sectionsTable->item(row, col)->text();
break;
case 1:
- localSections[row].active=(sectionsTable->item(row, col)->checkState()==Qt::Checked);
+ m_localSections[row].active=(sectionsTable->item(row, col)->checkState()==Qt::Checked);
break;
case 2:
- localSections[row].reversed=(sectionsTable->item(row, col)->checkState()==Qt::Checked);
+ m_localSections[row].reversed=(sectionsTable->item(row, col)->checkState()==Qt::Checked);
break;
case 3:
case 4:
@@ -141,9 +141,9 @@
// Now, since newDocPageSpec >= 1, convert to index
--newDocPageSpec;
if (col==3)
- localSections[row].fromindex=newDocPageSpec;
+ m_localSections[row].fromindex=newDocPageSpec;
else
- localSections[row].toindex=newDocPageSpec;
+ m_localSections[row].toindex=newDocPageSpec;
break;
case 5:
{
@@ -151,27 +151,27 @@
if (qcti!=NULL)
{
int index=qcti->currentIndex();
- if (index<styles.count()-1)
- localSections[row].type=(NumFormat)index;
+ if (index<m_styles.count()-1)
+ m_localSections[row].type=(NumFormat)index;
else
- if (index==styles.count()-1)
- localSections[row].type=Type_None;
+ if (index==m_styles.count()-1)
+ m_localSections[row].type=Type_None;
}
}
break;
case 6:
- localSections[row].sectionstartindex = sectionsTable->item(row, col)->text().toUInt();;
+ m_localSections[row].sectionstartindex = sectionsTable->item(row, col)->text().toUInt();;
break;
case 7:
- localSections[row].pageNumberWidth = sectionsTable->item(row, col)->text().toInt();
+ m_localSections[row].pageNumberWidth = sectionsTable->item(row, col)->text().toInt();
break;
case 8:
{
QString ch=sectionsTable->item(row, col)->text();
if (ch.length()>0)
- localSections[row].pageNumberFillChar=sectionsTable->item(row, col)->text().at(0);
+ m_localSections[row].pageNumberFillChar=sectionsTable->item(row, col)->text().at(0);
else
- localSections[row].pageNumberFillChar=QChar();
+ m_localSections[row].pageNumberFillChar=QChar();
}
break;
default:
@@ -189,9 +189,9 @@
{
int currRow=sectionsTable->currentRow();
bool found=false;
- DocumentSectionMap::Iterator it = localSections.begin();
+ DocumentSectionMap::Iterator it = m_localSections.begin();
int count=0;
- for(; it!= localSections.end(); ++it)
+ for(; it!= m_localSections.end(); ++it)
{
if(count==currRow)
{
@@ -203,7 +203,7 @@
if (!found) //End of map, just append
{
struct DocumentSection blank;
- uint count=localSections.count();
+ uint count=m_localSections.count();
blank.number=count;
blank.name=QString::number(count);
blank.fromindex=m_maxPageIndex+1;
@@ -212,19 +212,19 @@
blank.sectionstartindex=1;
blank.reversed=false;
blank.active=true;
- localSections.insert(count, blank);
+ m_localSections.insert(count, blank);
}
else
{
//Now, copy to a temp map
- DocumentSectionMap tempSections(localSections);
- localSections.clear();
+ DocumentSectionMap tempSections(m_localSections);
+ m_localSections.clear();
//Copy the temp map entries over. When we find the number of the current row, also insert a new entry.
uint i=0;
for(DocumentSectionMap::Iterator it2 = tempSections.begin(); it2!= tempSections.end(); ++it2)
{
it2.value().number=i;
- localSections.insert(i, it2.value());
+ m_localSections.insert(i, it2.value());
if ((*it).number==i)
{
@@ -237,7 +237,7 @@
blank.sectionstartindex=1;
blank.reversed=false;
blank.active=true;
- localSections.insert(i, blank);
+ m_localSections.insert(i, blank);
}
++i;
}
@@ -248,12 +248,12 @@
void Prefs_DocumentSections::deleteEntry()
{
int currRow=sectionsTable->currentRow();
- if (currRow==0 && localSections.count()==1)
+ if (currRow==0 && m_localSections.count()==1)
return;
bool found=false;
- DocumentSectionMap::Iterator it = localSections.begin();
+ DocumentSectionMap::Iterator it = m_localSections.begin();
int count=0;
- for(; it!= localSections.end(); ++it)
+ for(; it!= m_localSections.end(); ++it)
{
if(count==currRow)
{
@@ -266,27 +266,27 @@
{
//If we arent at the start, copy the toindex of the current item
//to the toindex of the previous item
- if (it!=localSections.begin())
+ if (it!=m_localSections.begin())
{
DocumentSectionMap::Iterator it2(it);
(*--it2).toindex=(*it).toindex;
}
//Delete the currently selected entry
- localSections.erase(it);
+ m_localSections.erase(it);
//Now, copy to a temp map and reinsert with consecutive keys again
- DocumentSectionMap tempSections(localSections);
- localSections.clear();
+ DocumentSectionMap tempSections(m_localSections);
+ m_localSections.clear();
uint i=0;
it = tempSections.begin();
for(; it!= tempSections.end(); ++it)
{
it.value().number=i;
- localSections.insert(i++, it.value());
- }
- int newCount=localSections.count();
+ m_localSections.insert(i++, it.value());
+ }
+ int newCount=m_localSections.count();
//int preIndex=qMax(currentIndex-1, 0);
- localSections[0].fromindex=0;
- localSections[newCount-1].toindex = m_maxPageIndex;
+ m_localSections[0].fromindex=0;
+ m_localSections[newCount-1].toindex = m_maxPageIndex;
updateTable();
}
}
Modified: trunk/Scribus/scribus/ui/prefs_documentsections.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21075&path=/trunk/Scribus/scribus/ui/prefs_documentsections.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsections.h (original)
+++ trunk/Scribus/scribus/ui/prefs_documentsections.h Tue Mar 8 22:32:10 2016
@@ -29,10 +29,10 @@
void languageChange();
protected:
- DocumentSectionMap localSections;
+ DocumentSectionMap m_localSections;
+ ScribusDoc* m_doc;
uint m_maxPageIndex;
- QStringList styles;
- ScribusDoc* m_doc;
+ QStringList m_styles;
virtual void updateTable();
protected slots:
More information about the scribus-commit
mailing list