r22833 by jghali - Fix build error on Windows MSVC

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 11 03:04:38 UTC 2019


Author: jghali
Date: Mon Feb 11 03:04:38 2019
New Revision: 22833

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22833
Log:
Fix build error on Windows MSVC

Modified:
    trunk/Scribus/scribus/scprintengine_gdi.cpp

Modified: trunk/Scribus/scribus/scprintengine_gdi.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22833&path=/trunk/Scribus/scribus/scprintengine_gdi.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_gdi.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_gdi.cpp	Mon Feb 11 03:04:38 2019
@@ -96,7 +96,8 @@
 	toFile = printerUseFilePort(options.printer);
 	if (toFile)
 	{
-		diaSelection = doc.DocName.right(doc.DocName.length() - doc.DocName.lastIndexOf("/") - 1);
+		QString docName = doc.documentFileName();
+		diaSelection = docName.right(docName.length() - docName.lastIndexOf("/") - 1);
 		diaSelection = diaSelection.left(diaSelection.indexOf("."));
 		diaSelection += ".prn";
 		PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
@@ -219,7 +220,7 @@
 	printPageFunc = (useGDI) ? &ScPrintEngine_GDI::printPage_GDI : &ScPrintEngine_GDI::printPage_PS;
 
 	// Setup document infos structure
-	wcsncpy (docName, (const WCHAR*) doc->DocName.utf16(), 511);
+	wcsncpy (docName, (const WCHAR*) doc->documentFileName().utf16(), 511);
 	ZeroMemory(&docInfo, sizeof(docInfo));
 	docInfo.cbSize = sizeof(docInfo);
 	docInfo.lpszDocName = docName;




More information about the scribus-commit mailing list