r20104 by jghali - fix msvc build failures

scribus-commit scribus-commit at lists.scribus.net
Wed May 20 00:30:50 UTC 2015


Author: jghali
Date: Wed May 20 00:30:50 2015
New Revision: 20104

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20104
Log:
fix msvc build failures

Modified:
    trunk/Scribus/scribus/fonts/scfontmetrics.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/ui/prefs_pdfexport.h

Modified: trunk/Scribus/scribus/fonts/scfontmetrics.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20104&path=/trunk/Scribus/scribus/fonts/scfontmetrics.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scfontmetrics.cpp (original)
+++ trunk/Scribus/scribus/fonts/scfontmetrics.cpp Wed May 20 00:30:50 2015
@@ -78,13 +78,13 @@
 // Since the above function is only available in FreeType 2.1.10 its replaced by
 // the following line, assuming that the default charmap has the index 0
 	int defaultchmap = 0;
-    FT_ULong dbgInfo = 0;
-    FT_Load_Sfnt_Table( face, FT_MAKE_TAG('p','o','s','t'), 0, NULL, &dbgInfo );
-    qDebug() << "setBestEncoding for " << FT_Get_Postscript_Name(face) << " with " << face->num_glyphs << "glyphs, hasNames=" << FT_HAS_GLYPH_NAMES(face) << ", POST size=" << dbgInfo ;
+	FT_ULong dbgInfo = 0;
+	FT_Load_Sfnt_Table( face, FT_MAKE_TAG('p','o','s','t'), 0, NULL, &dbgInfo );
+	qDebug() << "setBestEncoding for " << FT_Get_Postscript_Name(face) << " with " << face->num_glyphs << "glyphs, hasNames=" << FT_HAS_GLYPH_NAMES(face) << ", POST size=" << dbgInfo ;
 	for(int u = 0; u < face->num_charmaps; u++)
 	{
 		FT_CharMap charmap = face->charmaps[u];
-        qDebug() << "Checking cmap " << u << "(" << charmap->platform_id << "," << charmap->encoding_id << "," << FT_Get_CMap_Language_ID(charmap) << ") format " << FT_Get_CMap_Format(charmap);
+		qDebug() << "Checking cmap " << u << "(" << charmap->platform_id << "," << charmap->encoding_id << "," << FT_Get_CMap_Language_ID(charmap) << ") format " << FT_Get_CMap_Format(charmap);
 		if (charmap->encoding == FT_ENCODING_UNICODE)
 		{
 			FT_Set_Charmap(face, face->charmaps[u]);
@@ -343,8 +343,8 @@
 	// The glyph name table embedded in Truetype fonts is not reliable.
 	// For those fonts we consequently use Adobe Glyph names whenever possible.
 	const bool avoidFntNames = (fnt.formatCode != ScFace::TYPE42 && fnt.typeCode == ScFace::TTF) &&
-    (face->charmap && face->charmap->encoding == FT_ENCODING_UNICODE && face->charmap->platform_id == TT_PLATFORM_MICROSOFT);
-    
+	                           (face->charmap && face->charmap->encoding == FT_ENCODING_UNICODE && face->charmap->platform_id == TT_PLATFORM_MICROSOFT);
+
 	const bool hasPSNames = FT_HAS_GLYPH_NAMES(face);
 	
 //	qDebug() << "reading metrics for" << face->family_name << face->style_name;
@@ -453,8 +453,8 @@
 	return 0;
 }
 
+/// init the Adobe Glyph List
 #if 0
-/// init the Adobe Glyph List
 void readAdobeGlyphNames() 
 {
 	adobeGlyphNames.clear();
@@ -467,13 +467,11 @@
 		}
 	}
 }
-
+#endif
 
 /// if in AGL, use that name, else use "uni1234" or "u12345"
 QString adobeGlyphName(FT_ULong charcode) 
 {
-    if (adobeGlyphNames.empty())
-        readAdobeGlyphNames();
 	static const char HEX[] = "0123456789ABCDEF";
 	QString result;
 	if (adobeGlyphNames.contains(charcode))
@@ -493,7 +491,6 @@
 	}
 	return result;
 }
-#endif
 
 /*
 qreal Cwidth(ScribusDoc *, ScFace* scFace, QString ch, int Size, QString ch2)

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20104&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Wed May 20 00:30:50 2015
@@ -10275,50 +10275,52 @@
 {
 	switch (obj->GetDataType())
 	{
-	case PoDoFo::ePdfDataType_Reference:
-		{
-		const PoDoFo::PdfReference reference(obj->GetReference());
-		PdfId objNr;
-		if (!importedObjects.contains(reference))
-		{
-			objNr = writer.newObject();
-			importedObjects[reference] = objNr;
-			referencedObjects.append(reference);
-		}
-		else
-		{
-			objNr = importedObjects[reference];
-		}
-		PutDoc(" " + Pdf::toPdf(objNr) + " 0 R");
-		}
-		break;
-	case PoDoFo::ePdfDataType_Array:
-		{
-		const PoDoFo::PdfArray& array(obj->GetArray());
-		PutDoc("[");
-		for (uint i=0; i < array.size(); ++i)
-			copyPoDoFoDirect( &(array[i]), referencedObjects, importedObjects);
-			PutDoc("]");
-		}
-		break;
-	case PoDoFo::ePdfDataType_Dictionary:
-		{
-		const PoDoFo::PdfDictionary& dict(obj->GetDictionary());
-		const PoDoFo::TKeyMap keys = dict.GetKeys();
-		PutDoc("<<");
-		for (PoDoFo::TCIKeyMap k=keys.begin(); k != keys.end(); ++k)
-		{
-			PutDoc("\n/" + k->first.GetEscapedName());
-			copyPoDoFoDirect(k->second, referencedObjects, importedObjects);
-		}
-		PutDoc(" >>");
-		}
-		break;
-	default:
-		{
-		std::string str;
-		obj->ToString(str);
-		PutDoc(" " + str);
+		case PoDoFo::ePdfDataType_Reference:
+		{
+			const PoDoFo::PdfReference reference(obj->GetReference());
+			PdfId objNr;
+			if (!importedObjects.contains(reference))
+			{
+				objNr = writer.newObject();
+				importedObjects[reference] = objNr;
+				referencedObjects.append(reference);
+			}
+			else
+			{
+				objNr = importedObjects[reference];
+			}
+			PutDoc(" " + Pdf::toPdf(objNr) + " 0 R");
+			break;
+		}
+		case PoDoFo::ePdfDataType_Array:
+		{
+			const PoDoFo::PdfArray& array(obj->GetArray());
+			PutDoc("[");
+			for (uint i=0; i < array.size(); ++i)
+				copyPoDoFoDirect( &(array[i]), referencedObjects, importedObjects);
+				PutDoc("]");	
+			break;
+		}
+		case PoDoFo::ePdfDataType_Dictionary:
+		{
+			const PoDoFo::PdfDictionary& dict(obj->GetDictionary());
+			const PoDoFo::TKeyMap keys = dict.GetKeys();
+			PutDoc("<<");
+			for (PoDoFo::TCIKeyMap k=keys.begin(); k != keys.end(); ++k)
+			{
+				std::string str("\n/" + k->first.GetEscapedName());
+				PutDoc(QByteArray::fromRawData(str.data(), str.size()));
+				copyPoDoFoDirect(k->second, referencedObjects, importedObjects);
+			}
+			PutDoc(" >>");
+			break;
+		}
+		default:
+		{
+			std::string str;
+			obj->ToString(str);
+			str = " " + str;
+			PutDoc(QByteArray::fromRawData(str.data(), str.size()));
 		}
 	}
 

Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20104&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.h (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.h Wed May 20 00:30:50 2015
@@ -57,10 +57,10 @@
 		void enablePDFX(int);
 		void SelLPIcol(int);
 		void DoDownsample();
-		void RemoveEmbed();
-		void PutToEmbed();
-		void RemoveOutline();
-		void PutToOutline();
+		//void RemoveEmbed();
+		//void PutToEmbed();
+		//void RemoveOutline();
+		//void PutToOutline();
 		void SelAFont(QListWidgetItem*);
 		void SelEFont(QListWidgetItem*);
 		void SelSFont(QListWidgetItem*);




More information about the scribus-commit mailing list