r24416 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Thu Jan 21 00:01:02 UTC 2021


Author: jghali
Date: Thu Jan 21 00:01:02 2021
New Revision: 24416

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24416
Log:
Code style fixes

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24416&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Thu Jan 21 00:01:02 2021
@@ -1385,16 +1385,16 @@
 			continue;
 		if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
 			continue;
-		double OldX = currItem->xPos();
-		double OldY = currItem->yPos();
-		double OldBX = currItem->BoundingX;
-		double OldBY = currItem->BoundingY;
+		double oldX = currItem->xPos();
+		double oldY = currItem->yPos();
+		double oldBX = currItem->BoundingX;
+		double oldBY = currItem->BoundingY;
 		if (!currItem->ChangedMasterItem)
 		{
 			//Hack to not check for undo changes, indicate drawing only
 			currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
-			currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
-			currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
+			currItem->BoundingX = oldBX - Mp->xOffset() + page->xOffset();
+			currItem->BoundingY = oldBY - Mp->yOffset() + page->yOffset();
 		}
 		currItem->savedOwnPage = currItem->OwnPage;
 		currItem->OwnPage = page->pageNr();
@@ -1416,9 +1416,9 @@
 		if (!currItem->ChangedMasterItem)
 		{
 			//Hack to not check for undo changes, indicate drawing only
-			currItem->setXYPos(OldX, OldY, true);
-			currItem->BoundingX = OldBX;
-			currItem->BoundingY = OldBY;
+			currItem->setXYPos(oldX, oldY, true);
+			currItem->BoundingX = oldBX;
+			currItem->BoundingY = oldBY;
 		}
 	}
 	if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode))

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24416&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp	Thu Jan 21 00:01:02 2021
@@ -789,11 +789,11 @@
 					QRgb *s;
 					uchar *d;
 					unsigned char cc, cm, cy, ck;
-					for (int yit=0; yit < m_imageInfoRecord.exifInfo.thumbnail.height(); ++yit)
-					{
-						s = (QRgb*)(m_imageInfoRecord.exifInfo.thumbnail.scanLine( yit ));
-						d = r_image.scanLine( yit );
-						for (int xit=0; xit < m_imageInfoRecord.exifInfo.thumbnail.width(); ++xit)
+					for (int yit = 0; yit < m_imageInfoRecord.exifInfo.thumbnail.height(); ++yit)
+					{
+						s = (QRgb*)(m_imageInfoRecord.exifInfo.thumbnail.scanLine(yit));
+						d = r_image.scanLine(yit);
+						for (int xit = 0; xit < m_imageInfoRecord.exifInfo.thumbnail.width(); ++xit)
 						{
 							if (isCMYK)
 							{
@@ -1372,20 +1372,20 @@
 			if (header.color_mode == CM_CMYK)
 			{
 				if (channel_num == 6)
-					components[channel] = channel_num-2;
+					components[channel] = channel_num - 2;
 				else
-					components[channel] = channel_num-1;
+					components[channel] = channel_num - 1;
 			}
 			else
 			{
 				if (channel_num == 5)
-					components[channel] = channel_num-2;
+					components[channel] = channel_num - 2;
 				else
 				{
 					if (header.color_mode == CM_GRAYSCALE)
 						components[channel] = 3;
 					else
-						components[channel] = channel_num-1;
+						components[channel] = channel_num - 1;
 				}
 			}
 			hasAlpha = true;
@@ -1401,7 +1401,7 @@
 	{
 		if (layerInfo[layer].channelType[channel] == -2)
 		{
-			if (!mask.create( layerInfo[layer].maskWidth, layerInfo[layer].maskHeight, 1 ))
+			if (!mask.create( layerInfo[layer].maskWidth, layerInfo[layer].maskHeight, 1))
 				break;
 			mask.fill(0);
 			if (!loadChannel(s, header, layerInfo, layer, channel, 0, mask))

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24416&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Thu Jan 21 00:01:02 2021
@@ -1814,7 +1814,7 @@
 	result.name = Pdf::toName(fontName);
 	result.usage = Used_in_Content;
 	result.method = glyphmap.isEmpty()? Use_Embedded : Use_Subset;
-	result.encoding = glyphmap.isEmpty()? Encode_IdentityH : Encode_Subset;
+	result.encoding = glyphmap.isEmpty() ? Encode_IdentityH : Encode_Subset;
 	result.glyphmap = glyphmap;
 	
 	PdfId fontWidths2 = writer.newObject();
@@ -1829,7 +1829,7 @@
 	bool seenNotDef = false;
 	for (auto git = keys.begin(); git != keys.end(); ++git)
 	{
-		uint gid = result.encoding == Encode_Subset? glyphmap[*git] : *git;
+		uint gid = (result.encoding == Encode_Subset) ? glyphmap[*git] : *git;
 		if (gid > 0 || !seenNotDef)
 		{
 			seenNotDef |= (gid == 0);




More information about the scribus-commit mailing list