r15585 by jghali - fix several msvc warning and compilation error, noticeably missing return values

scribus-commit scribus-commit at lists.scribus.net
Wed Oct 20 01:56:57 CEST 2010


Author: jghali
Date: Tue Oct 19 23:56:57 2010
New Revision: 15585

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15585
Log:
fix several msvc warning and compilation error, noticeably missing return values

Modified:
    branches/ScribusOIF/scribus/fonts/scface_ttf.cpp
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
    branches/ScribusOIF/scribus/text/boxes.h
    branches/ScribusOIF/scribus/text/legacylayout.h
    branches/ScribusOIF/scribus/text/storytext_shared.cpp
    branches/ScribusOIF/scribus/text/textlayout.cpp
    branches/ScribusOIF/scribus/text/textlayout.h
    branches/ScribusOIF/win32/vc8/Scribus.vcproj

Modified: branches/ScribusOIF/scribus/fonts/scface_ttf.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/fonts/scface_ttf.cpp
==============================================================================
--- branches/ScribusOIF/scribus/fonts/scface_ttf.cpp (original)
+++ branches/ScribusOIF/scribus/fonts/scface_ttf.cpp Tue Oct 19 23:56:57 2010
@@ -781,7 +781,8 @@
 		hb_buffer_destroy(buf);
 	}
 
-
+	// FIXME_OIF return proper value
+	return 0;
 }
 
 QList<unsigned int> ScFace_ttf::getlookupIndex(const QString &table, const QString &language, const QString &feature) const

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Tue Oct 19 23:56:57 2010
@@ -5045,6 +5045,8 @@
 		tmp += "ET\n"+tmp2;
 	return tmp;
 #endif
+	// FIXME_OIF : return proper value
+	return QString();
 }
 
 bool PDFLibCore::setTextCh(PageItem *ite, uint PNr, double x,  double y, uint d, QString &tmp, QString &tmp2, const ScText *hl, const ParagraphStyle& pstyle, const Page* pag)
@@ -5640,6 +5642,8 @@
 	return true;
 #endif
 #endif
+	// FIXME_OIF : return proper value
+	return true;
 }
 
 QString PDFLibCore::SetColor(const QString& farbe, double Shade)

Modified: branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp Tue Oct 19 23:56:57 2010
@@ -946,6 +946,7 @@
 	}
 	return ob;
 #endif
+	return QDomElement();
 }
 
 QDomElement SVGExPlug::processPathTextItem(PageItem *Item, QString trans, QString stroke)
@@ -1192,6 +1193,7 @@
 	}
 	return ob;
 #endif
+	return QDomElement();
 }
 
 QDomElement SVGExPlug::processInlineItem(double xpos, double ypos, QTransform &finalMat, ScText *hl, bool pathT, QString trans)
@@ -1328,6 +1330,7 @@
 	}
 	return layerGroup;
 #endif
+	return QDomElement();
 }
 
 QString SVGExPlug::handleGlyph(uint chr, ScText *hl)
@@ -1347,6 +1350,7 @@
 	glyphNames.append(glName);
 	return glName;
 #endif
+	return "SPACE";
 }
 
 QDomElement SVGExPlug::processArrows(PageItem *Item, QDomElement line, QString trans)

Modified: branches/ScribusOIF/scribus/text/boxes.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/text/boxes.h
==============================================================================
--- branches/ScribusOIF/scribus/text/boxes.h (original)
+++ branches/ScribusOIF/scribus/text/boxes.h Tue Oct 19 23:56:57 2010
@@ -19,8 +19,9 @@
 class GlyphStore;
 class InlineBox;
 class PathBox;
-class RenderOptions;
 class ScPainter;
+
+struct RenderOptions;
 
 
 

Modified: branches/ScribusOIF/scribus/text/legacylayout.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/text/legacylayout.h
==============================================================================
--- branches/ScribusOIF/scribus/text/legacylayout.h (original)
+++ branches/ScribusOIF/scribus/text/legacylayout.h Tue Oct 19 23:56:57 2010
@@ -18,7 +18,7 @@
 
 class GlyphStore;
 class PageItem_TextFrame;
-class TypoPrefs;
+struct TypoPrefs;
 
 void shapeShape(const TypoPrefs& typographicSetings, const CharStyle& charStyle, const QString& text, const TextFlags* textFlags, int start, int end, GlyphStore& glyphs);
 void legacyShape(const TypoPrefs& typographicSetings, const CharStyle& charStyle, const QString& text, const TextFlags* textFlags, int start, int end, GlyphStore& glyphs);

Modified: branches/ScribusOIF/scribus/text/storytext_shared.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/text/storytext_shared.cpp
==============================================================================
--- branches/ScribusOIF/scribus/text/storytext_shared.cpp (original)
+++ branches/ScribusOIF/scribus/text/storytext_shared.cpp Tue Oct 19 23:56:57 2010
@@ -513,31 +513,37 @@
 int Storytext_Shared::nextChar(int pos) const
 {
 	// skips tags, objects and parseps
+	return -1; 
 }
 
 int Storytext_Shared::prevChar(int pos) const
 {
 	// skips tags, objects and parseps
+	return -1;
 }
 
 int Storytext_Shared::nextWord(int pos) const
 {
 	// using charAttr
+	return -1; 
 }
 
 int Storytext_Shared::prevWord(int pos) const
 {
 	// using charAttr
+	return -1; 
 }
 
 int Storytext_Shared::nextPattern(int pos, const QRegExp& pat) const
 {
 	// returns pos of a match or -1. pat.pos() indices will be relative to paragraph start
+	return -1;
 }
 
 int Storytext_Shared::prevPattern(int pos, const QRegExp& pat) const
 {
 	// returns pos of a match or -1. pat.pos() indices will be relative to paragraph start
+	return -1;
 }
 
 int Storytext_Shared::nextParagraph(int pos) const
@@ -545,9 +551,7 @@
 	uint idx = pars[pos] + 1;
 	if (idx < pars.count())
 		return pars.offset(idx);
-	else
-		return -1;
-	
+	return -1;
 }
 
 int Storytext_Shared::prevParagraph(int pos) const

Modified: branches/ScribusOIF/scribus/text/textlayout.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/text/textlayout.cpp
==============================================================================
--- branches/ScribusOIF/scribus/text/textlayout.cpp (original)
+++ branches/ScribusOIF/scribus/text/textlayout.cpp Tue Oct 19 23:56:57 2010
@@ -201,6 +201,8 @@
 	}
 	return 0;
 #endif
+	// FIXME_OIF : return proper value
+	return 0;
 }
 
 int TextLayout::endOfLine(int pos) const
@@ -214,6 +216,8 @@
 	}
 	return story()->length();
 #endif
+	// FIXME_OIF : return proper value
+	return story()->length();
 }
 
 
@@ -254,6 +258,8 @@
 	}
 	return m_firstInFrame ;
 #endif
+	// FIXME_OIF : return proper value
+	return m_firstInFrame;
 }
 
 int TextLayout::nextLine(int pos) const
@@ -292,6 +298,8 @@
 	}
 	return m_lastInFrame;
 #endif
+	// FIXME_OIF : return proper value
+	return m_lastInFrame;
 }
 
 int TextLayout::startOfFrame() const

Modified: branches/ScribusOIF/scribus/text/textlayout.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/scribus/text/textlayout.h
==============================================================================
--- branches/ScribusOIF/scribus/text/textlayout.h (original)
+++ branches/ScribusOIF/scribus/text/textlayout.h Tue Oct 19 23:56:57 2010
@@ -18,6 +18,8 @@
 
 #include <QList>
 
+
+#include "scribusapi.h"
 #include "fpoint.h"
 #include "frect.h"
 #include "scpainter.h"
@@ -26,7 +28,8 @@
 
 class StoryText;
 class GlyphStore;
-class TypoPrefs;
+
+struct TypoPrefs;
 
 /**
    Describes a strategy how to fill/update the StoryText's GlyphStore with shaped glyphs
@@ -72,7 +75,7 @@
 	structure and the lines' glyph layouts. It will use some of the layouters above to create a Box.
     It listens to change events from the StoryText and the PageItem and will update the layout accordingly.
  */
-class TextLayout
+class SCRIBUS_API TextLayout
 {
 public:
 	TextLayout(StoryText* text, PageItem* frame);

Modified: branches/ScribusOIF/win32/vc8/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15585&path=/branches/ScribusOIF/win32/vc8/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.vcproj Tue Oct 19 23:56:57 2010
@@ -587,6 +587,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\boxes.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\buttonicon.cpp"
 				>
 			</File>
@@ -923,6 +927,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\glyphlayout.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\text\glyphstore.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\gradientaddedit.cpp"
 				>
 			</File>
@@ -1039,6 +1051,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\index.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\insertaframe.cpp"
 				>
 			</File>
@@ -1083,6 +1099,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\legacylayout.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\linecombo.cpp"
 				>
 			</File>
@@ -1611,6 +1631,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\fonts\schbfunctions.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\schelptreemodel.cpp"
 				>
 			</File>
@@ -1835,10 +1859,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\scribus\text\sctext_shared.cpp"
-				>
-			</File>
-			<File
 				RelativePath="..\..\scribus\ui\sctextbrowser.cpp"
 				>
 			</File>
@@ -1987,6 +2007,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\storytext_shared.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\styles\style.cpp"
 				>
 			</File>
@@ -2076,6 +2100,10 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\tabtypography.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\text\textlayout.cpp"
 				>
 			</File>
 			<File
@@ -2700,6 +2728,10 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\boxes.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\buttonicon.h"
 				>
 				<FileConfiguration
@@ -4569,6 +4601,14 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\fonts\ftface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\text\glyphlayout.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\text\glyphstore.h"
 				>
 			</File>
 			<File
@@ -5260,6 +5300,10 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\index.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\insertaframe.h"
 				>
 				<FileConfiguration
@@ -5508,6 +5552,10 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\legacylayout.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\linecombo.h"
 				>
 				<FileConfiguration
@@ -8928,6 +8976,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\fonts\schbfunctions.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\schelptreemodel.h"
 				>
 				<FileConfiguration
@@ -9868,10 +9920,6 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\scribus\text\sctext_shared.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\scribus\ui\sctextbrowser.h"
 				>
 				<FileConfiguration
@@ -10864,6 +10912,10 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\text\storytext_shared.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\style.h"
 				>
 			</File>
@@ -11518,6 +11570,10 @@
 						Name="moc.exe"
 					/>
 				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\scribus\text\textlayout.h"
+				>
 			</File>
 			<File
 				RelativePath="..\..\scribus\textwriter.h"




More information about the scribus-commit mailing list