r16952 by craig - Fwd port fixes for #10345 and #10350 to scroll fix branch

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 3 14:58:55 UTC 2011


Author: craig
Date: Thu Nov  3 14:58:55 2011
New Revision: 16952

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16952
Log:
Fwd port fixes for #10345 and #10350 to scroll fix branch

Modified:
    branches/Version135scrollfix/Scribus/scribus/gtfont.cpp
    branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
    branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.h
    branches/Version135scrollfix/Scribus/scribus/scribusview.cpp

Modified: branches/Version135scrollfix/Scribus/scribus/gtfont.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16952&path=/branches/Version135scrollfix/Scribus/scribus/gtfont.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/gtfont.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/gtfont.cpp Thu Nov  3 14:58:55 2011
@@ -77,7 +77,7 @@
 	slant       = "";
 	width       = "";
 	append      = "";
-	size        = 12;
+	size        = 120;
 	color       = "Black";
 	shade       = 100;
 	strokeColor = "Black";

Modified: branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16952&path=/branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp Thu Nov  3 14:58:55 2011
@@ -47,6 +47,9 @@
 	inH1 = false;
 	inH2 = false;
 	inH3 = false;
+	inH4 = false;
+	inH5 = false;
+	inH6 = false;
 	inA = false;
 	inCode = false;
 	inBody = false;
@@ -79,6 +82,18 @@
 	pstyleli->setName("HTML_li_level-0");
 	listStyles.push_back(pstyleli);
 	nextItemNumbers.push_back(1);
+	pstyleh6 = new gtParagraphStyle(*pstyle);
+	pstyleh6->getFont()->setSize(pstyle->getFont()->getSize() + 2.5);
+	pstyleh6->getFont()->setWeight(BOLD);
+	pstyleh6->setSpaceAbove(2.5);
+	pstyleh6->setSpaceBelow(1.25);
+	pstyleh6->setName("HTML_h6");
+	pstyleh5 = new gtParagraphStyle(*pstyle);
+	pstyleh5->getFont()->setSize(pstyle->getFont()->getSize() + 5);
+	pstyleh5->getFont()->setWeight(BOLD);
+	pstyleh5->setSpaceAbove(5.0);
+	pstyleh5->setSpaceBelow(2.5);
+	pstyleh5->setName("HTML_h5");	
 	pstyleh4 = new gtParagraphStyle(*pstyle);
 	pstyleh4->getFont()->setSize(pstyle->getFont()->getSize() + 10);
 	pstyleh4->getFont()->setWeight(BOLD);
@@ -182,6 +197,10 @@
 		inH3 = true;
 	else if (name == "h4")
 		inH4 = true;
+	else if (name == "h5")
+		inH5 = true;
+	else if (name == "h6")
+		inH6 = true;
 	else if ((name == "b") || (name == "strong"))
 		setBoldFont();
 	else if ((name == "i") || (name == "em"))
@@ -287,6 +306,10 @@
 			writer->append(tmp, pstyleh3);
 		else if (inH4)
 			writer->append(tmp, pstyleh4);
+		else if (inH5)
+			writer->append(tmp, pstyleh5);
+		else if (inH6)
+			writer->append(tmp, pstyleh6);
 		else if (inCenter)
 			writer->append(tmp, pstylec);
 		else if (inCode)
@@ -406,22 +429,32 @@
 	else if (name == "h1")
 	{
 		inH1 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh1);
 	}
 	else if (name == "h2")
 	{
 		inH2 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh2);
 	}
 	else if (name == "h3")
 	{
 		inH3 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh3);
 	}
 	else if (name == "h4")
 	{
 		inH4 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh4);
+	}
+	else if (name == "h5")
+	{
+		inH5 = false;
+		writer->append("\n", pstyleh5);
+	}
+	else if (name == "h6")
+	{
+		inH6 = false;
+		writer->append("\n", pstyleh6);
 	}
 	else if ((name == "b") || (name == "strong"))
 		unSetBoldFont();
@@ -459,6 +492,8 @@
 	pstyleh2->getFont()->toggleEffect(e);
 	pstyleh3->getFont()->toggleEffect(e);
 	pstyleh4->getFont()->toggleEffect(e);
+	pstyleh5->getFont()->toggleEffect(e);
+	pstyleh6->getFont()->toggleEffect(e);
 	pstylecode->getFont()->toggleEffect(e);
 	pstylep->getFont()->toggleEffect(e);
 	pstylepre->getFont()->toggleEffect(e);
@@ -474,6 +509,8 @@
 	pstyleh2->getFont()->setSlant(ITALIC);
 	pstyleh3->getFont()->setSlant(ITALIC);
 	pstyleh4->getFont()->setSlant(ITALIC);
+	pstyleh5->getFont()->setSlant(ITALIC);
+	pstyleh6->getFont()->setSlant(ITALIC);
 	pstylecode->getFont()->setSlant(ITALIC);
 	pstylep->getFont()->setSlant(ITALIC);
 	pstylepre->getFont()->setSlant(ITALIC);
@@ -489,6 +526,8 @@
 	pstyleh2->getFont()->setSlant(defaultSlant);
 	pstyleh3->getFont()->setSlant(defaultSlant);
 	pstyleh4->getFont()->setSlant(defaultSlant);
+	pstyleh5->getFont()->setSlant(defaultSlant);
+	pstyleh6->getFont()->setSlant(defaultSlant);
 	pstylecode->getFont()->setSlant(defaultSlant);
 	pstylep->getFont()->setSlant(defaultSlant);
 	pstylepre->getFont()->setSlant(defaultSlant);
@@ -504,6 +543,8 @@
 	pstyleh2->getFont()->setColor("Blue");
 	pstyleh3->getFont()->setColor("Blue");
 	pstyleh4->getFont()->setColor("Blue");
+	pstyleh5->getFont()->setColor("Blue");
+	pstyleh6->getFont()->setColor("Blue");
 	pstylecode->getFont()->setColor("Blue");
 	pstylep->getFont()->setColor("Blue");
 	pstylepre->getFont()->setColor("Blue");
@@ -519,6 +560,8 @@
 	pstyleh2->getFont()->setColor(defaultColor);
 	pstyleh3->getFont()->setColor(defaultColor);
 	pstyleh4->getFont()->setColor(defaultColor);
+	pstyleh5->getFont()->setColor(defaultColor);
+	pstyleh6->getFont()->setColor(defaultColor);
 	pstylecode->getFont()->setColor(defaultColor);
 	pstylep->getFont()->setColor(defaultColor);
 	pstylepre->getFont()->setColor(defaultColor);
@@ -623,6 +666,8 @@
 	delete pstyleh2;
 	delete pstyleh3;
 	delete pstyleh4;
+	delete pstyleh5;
+	delete pstyleh6;
 	delete pstylecode;
 	delete pstylep;
 	delete pstylepre;

Modified: branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16952&path=/branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.h
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.h (original)
+++ branches/Version135scrollfix/Scribus/scribus/plugins/gettext/htmlim/htmlreader.h Thu Nov  3 14:58:55 2011
@@ -64,6 +64,8 @@
 	gtParagraphStyle *pstyleh2;
 	gtParagraphStyle *pstyleh3;
 	gtParagraphStyle *pstyleh4;
+	gtParagraphStyle *pstyleh5;
+	gtParagraphStyle *pstyleh6;
 	gtParagraphStyle *pstylecode;
 	gtParagraphStyle *pstylep;
 	gtParagraphStyle *pstylepre;
@@ -77,6 +79,8 @@
 	bool inH2;
 	bool inH3;
 	bool inH4;
+	bool inH5;
+	bool inH6;
 	bool inA;
 	bool inCenter;
 	bool inCode;

Modified: branches/Version135scrollfix/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16952&path=/branches/Version135scrollfix/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/scribusview.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/scribusview.cpp Thu Nov  3 14:58:55 2011
@@ -1257,6 +1257,8 @@
 					Doc->MoveItem(nx-currItem->xPos(), ny-currItem->yPos(), currItem);
 				}
 			}
+			if ((Doc->m_Selection->count() > 0) && (Doc->appMode != modeNormal))
+				this->requestMode(modeNormal);
 			updateContents();
 		}
 		if (!Doc->masterPageMode())




More information about the scribus-commit mailing list