r16893 by jghali - - merge trunk revisions up to r16840

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 8 13:56:22 UTC 2011


Author: jghali
Date: Sat Oct  8 13:56:21 2011
New Revision: 16893

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16893
Log:
- merge trunk revisions up to r16840
- basics of content properties palette

Added:
    branches/ScribusOIF/scribus/ui/propertiespalette_content.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_content.h
    branches/ScribusOIF/scribus/ui/propertywidget_image.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_image.h
    branches/ScribusOIF/scribus/ui/propertywidget_imagebase.ui
    branches/ScribusOIF/scribus/ui/propertywidget_orphans.cpp
      - copied unchanged from r16840, trunk/Scribus/scribus/ui/propertywidget_orphans.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_orphans.h
      - copied unchanged from r16840, trunk/Scribus/scribus/ui/propertywidget_orphans.h
    branches/ScribusOIF/scribus/ui/propertywidget_orphansbase.ui
      - copied unchanged from r16840, trunk/Scribus/scribus/ui/propertywidget_orphansbase.ui
Modified:
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/actionmanager.cpp
    branches/ScribusOIF/scribus/pageitem_textframe.cpp
    branches/ScribusOIF/scribus/pageitem_textframe.h
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribus.h
    branches/ScribusOIF/scribus/styles/paragraphstyle.attrdefs.cxx
    branches/ScribusOIF/scribus/ui/contextmenu.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.h
    branches/ScribusOIF/scribus/ui/smpstylewidget.cpp
    branches/ScribusOIF/scribus/ui/smpstylewidget.ui
    branches/ScribusOIF/scribus/ui/smtextstyles.cpp
    branches/ScribusOIF/scribus/ui/smtextstyles.h
    branches/ScribusOIF/win32/vc9/Scribus-build.vsprops
    branches/ScribusOIF/win32/vc9/Scribus.vcproj

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sat Oct  8 13:56:21 2011
@@ -133,8 +133,10 @@
   ui/propertywidget_colortransbase.ui
   ui/propertywidget_distancebase.ui
   ui/propertywidget_flopbase.ui
+  ui/propertywidget_imagebase.ui
   ui/propertywidget_linebase.ui
   ui/propertywidget_optmarginsbase.ui
+  ui/propertywidget_orphansbase.ui
   ui/propertywidget_pathtextbase.ui
   ui/propertywidget_posbase.ui
   ui/propertywidget_shapebase.ui
@@ -359,6 +361,7 @@
   ui/preview.h
   ui/printdialog.h
   ui/propertiespalette.h
+  ui/propertiespalette_content.h
   ui/propertiespalette_frame.h
   ui/propertiespalette_group.h
   ui/propertiespalette_image.h
@@ -372,8 +375,10 @@
   ui/propertywidget_colortrans.h
   ui/propertywidget_distance.h
   ui/propertywidget_flop.h
+  ui/propertywidget_image.h
   ui/propertywidget_line.h
   ui/propertywidget_optmargins.h
+  ui/propertywidget_orphans.h
   ui/propertywidget_pathtext.h
   ui/propertywidget_pos.h
   ui/propertywidget_shape.h
@@ -763,6 +768,7 @@
   ui/preview.cpp
   ui/printdialog.cpp
   ui/propertiespalette.cpp
+  ui/propertiespalette_content.cpp
   ui/propertiespalette_frame.cpp
   ui/propertiespalette_image.cpp
   ui/propertiespalette_group.cpp
@@ -776,8 +782,10 @@
   ui/propertywidget_colortrans.cpp
   ui/propertywidget_distance.cpp
   ui/propertywidget_flop.cpp
+  ui/propertywidget_image.cpp
   ui/propertywidget_line.cpp
   ui/propertywidget_optmargins.cpp
+  ui/propertywidget_orphans.cpp
   ui/propertywidget_pathtext.cpp
   ui/propertywidget_pos.cpp
   ui/propertywidget_shape.cpp

Modified: branches/ScribusOIF/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/actionmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/actionmanager.cpp (original)
+++ branches/ScribusOIF/scribus/actionmanager.cpp Sat Oct  8 13:56:21 2011
@@ -667,6 +667,8 @@
 {
 	QString name;
 	//Tool menu
+	name="toolsContentProperties";
+	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="toolsFrameProperties";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="toolsProperties";
@@ -764,6 +766,7 @@
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/annot3d.png"), loadIcon("22/annot3d.png"), "", defaultKey(name), mainWindow, modeInsertPDF3DAnnotation));
 #endif
 	//Set the applicaton wide palette shortcuts
+	(*scrActions)["toolsContentProperties"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsFrameProperties"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsProperties"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsScrapbook"]->setShortcutContext(Qt::ApplicationShortcut);
@@ -776,6 +779,7 @@
 	(*scrActions)["toolsSymbols"]->setShortcutContext(Qt::ApplicationShortcut);
 
 
+	(*scrActions)["toolsContentProperties"]->setToggleAction(true);
 	(*scrActions)["toolsFrameProperties"]->setToggleAction(true);
 	(*scrActions)["toolsProperties"]->setToggleAction(true);
 	(*scrActions)["toolsOutline"]->setToggleAction(true);
@@ -1451,6 +1455,7 @@
 //	(*scrActions)["viewNewView"]->setTexts( tr("New View"));
 
 	//Tool menu
+	(*scrActions)["toolsContentProperties"]->setTexts( tr("&Properties (Content)"));
 	(*scrActions)["toolsFrameProperties"]->setTexts( tr("&Properties (Frame)"));
 	(*scrActions)["toolsProperties"]->setTexts( tr("&Properties"));
 	(*scrActions)["toolsOutline"]->setTexts( tr("&Outline", "Document Outline Palette"));
@@ -2011,6 +2016,7 @@
 		<< "windowsCascade"
 		<< "windowsTile"
 		<< "toolsProperties"
+		<< "toolsContentProperties"
 		<< "toolsFrameProperties"
 		<< "toolsOutline"
 		<< "toolsScrapbook"

Modified: branches/ScribusOIF/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_textframe.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_textframe.cpp Sat Oct  8 13:56:21 2011
@@ -477,18 +477,8 @@
 				if (charStyle.effects() & ScStyle_DropCap)
 				{
 					const ParagraphStyle& style(itemText.paragraphStyle(a));
-					if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
-						chs = qRound(10 * ((m_Doc->guidesPrefs().valueBaselineGrid * (style.dropCapLines()-1) + (charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
-					else
-					{
-						if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
-							chs = qRound(10 * ((style.lineSpacing() * (style.dropCapLines()-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
-						else
-						{
-							double currasce = charStyle.font().height(style.charStyle().fontSize() / 10.0);
-							chs = qRound(10 * ((currasce * (style.dropCapLines()-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
-						}
-					}
+					double spacing = calculateLineSpacing (style, this);
+					chs = qRound(10 * ((spacing * (style.dropCapLines()-1) + (charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharHeight(chstr0, 10)));
 				}
 				if (chstr0 == SpecialChars::TAB)
 					tabCc++;

Modified: branches/ScribusOIF/scribus/pageitem_textframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/pageitem_textframe.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_textframe.h (original)
+++ branches/ScribusOIF/scribus/pageitem_textframe.h Sat Oct  8 13:56:21 2011
@@ -98,9 +98,17 @@
 	virtual bool createInfoGroup(QFrame *, QGridLayout *);
 	virtual void applicableActions(QStringList& actionList);
 	virtual QString infoDescription();
-	
+	// Move incomplete lines from the previous frame if needed.
+	bool moveLinesFromPreviousFrame ();
+	void adjustParagraphEndings ();
+
 private:
 	bool cursorBiasBackward;
+	// If the last paragraph had to be split, this is how many lines of the paragraph are in this frame.
+	// Used for orphan/widow control
+	int incompleteLines;
+	// This holds the line splitting positions
+	QList<int> incompletePositions;
 
 	void setShadow();
 	QString currentShadow;

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Sat Oct  8 13:56:21 2011
@@ -4786,7 +4786,7 @@
 				const QChar ch = hl->ch;
 				const CharStyle& chstyle(ite->itemText.charStyle(d));
 				const ParagraphStyle& pstyle(ite->itemText.paragraphStyle(d));
-				if ((ch == SpecialChars::PARSEP) || (ch == QChar(10)) || (ch == SpecialChars::LINEBREAK) || (ch == SpecialChars::FRAMEBREAK) || (ch == SpecialChars::COLBREAK))
+				if (SpecialChars::isBreak(ch, true) || (ch == QChar(10)))
 					continue;
 				if (chstyle.effects() & ScStyle_SuppressSpace)
 					continue;
@@ -4896,7 +4896,7 @@
 			const QChar ch = hl->ch;
 			const CharStyle& chstyle(ite->itemText.charStyle(d));
 			const ParagraphStyle& pstyle(ite->itemText.paragraphStyle(d));
-			if ((ch == SpecialChars::PARSEP) || (ch == QChar(10)) || (ch == SpecialChars::LINEBREAK) || (ch == SpecialChars::FRAMEBREAK) || (ch == SpecialChars::COLBREAK))
+			if (SpecialChars::isBreak(ch, true) || (ch == QChar(10)))
 				continue;
 			if (chstyle.effects() & ScStyle_SuppressSpace)
 				continue;

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sat Oct  8 13:56:21 2011
@@ -2117,6 +2117,22 @@
 	if (attrs.hasAttribute(MaxGlyphExtend))
 		newStyle.setMaxGlyphExtension(attrs.valueAsDouble(MaxGlyphExtend));
 	
+	static const QString KeepLinesStart("KeepLinesStart");
+	if (attrs.hasAttribute(KeepLinesStart))
+		newStyle.setKeepLinesStart(attrs.valueAsInt(KeepLinesStart));
+
+	static const QString KeepLinesEnd("KeepLinesEnd");
+	if (attrs.hasAttribute(KeepLinesEnd))
+		newStyle.setKeepLinesEnd(attrs.valueAsInt(KeepLinesEnd));
+
+	static const QString KeepWithNext("KeepWithNext");
+	if (attrs.hasAttribute(KeepWithNext))
+		newStyle.setKeepWithNext(attrs.valueAsInt(KeepWithNext));
+
+	static const QString KeepTogether("KeepTogether");
+	if (attrs.hasAttribute(KeepTogether))
+		newStyle.setKeepTogether(attrs.valueAsInt(KeepTogether));
+
 	readCharacterStyleAttrs( doc, attrs, newStyle.charStyle());
 
 	//	newStyle.tabValues().clear();
@@ -3536,6 +3552,14 @@
 		pstyle.setRightMargin(attrs.valueAsDouble("rightMargin"));
 	if (attrs.hasAttribute("firstIndent"))
 		pstyle.setFirstIndent(attrs.valueAsDouble("firstIndent"));
+	if (attrs.hasAttribute("keepLinesStart"))
+		pstyle.setKeepLinesStart(attrs.valueAsInt("keepLinesStart"));
+	if (attrs.hasAttribute("keepLinesEnd"))
+		pstyle.setKeepLinesEnd(attrs.valueAsInt("keepLinesEnd"));
+	if (attrs.hasAttribute("keepWithNext"))
+		pstyle.setKeepWithNext(attrs.valueAsBool("keepWithNext"));
+	if (attrs.hasAttribute("keepTogether"))
+		pstyle.setKeepTogether(attrs.valueAsBool("keepTogether"));
 	currItem->itemText.setDefaultStyle(pstyle);
 
 	if (attrs.hasAttribute("PSTYLE"))

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sat Oct  8 13:56:21 2011
@@ -619,6 +619,14 @@
 		docu.writeAttribute("MinGlyphShrink", style.minGlyphExtension());
 	if ( ! style.isInhMaxGlyphExtension())
 		docu.writeAttribute("MaxGlyphExtend", style.maxGlyphExtension());
+	if ( ! style.isInhKeepLinesStart())
+		docu.writeAttribute("KeepLinesStart", style.keepLinesStart());
+	if ( ! style.isInhKeepLinesEnd())
+		docu.writeAttribute("KeepLinesEnd", style.keepLinesEnd());
+	if ( ! style.isInhKeepWithNext())
+		docu.writeAttribute("KeepWithNext", style.keepWithNext());
+	if ( ! style.isInhKeepTogether())
+		docu.writeAttribute("KeepTogether", style.keepTogether());
 
 	if ( ! style.shortcut().isEmpty() )
 		docu.writeAttribute("PSHORTCUT", style.shortcut()); // shortcuts won't be inherited
@@ -1992,64 +2000,73 @@
 		docu.writeAttribute("PICART", item->imageShown() ? 1 : 0);
 		docu.writeAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
 		docu.writeAttribute("RATIO", item->AspectRatio ? 1 : 0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhFillColor())
-			docu.writeAttribute("TXTFILL",item->itemText.defaultStyle().charStyle().fillColor());
-		if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeColor())
-			docu.writeAttribute("TXTSTROKE",item->itemText.defaultStyle().charStyle().strokeColor());
-		if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeShade())
-			docu.writeAttribute("TXTSTRSH",item->itemText.defaultStyle().charStyle().strokeShade());
-		if ( ! item->itemText.defaultStyle().charStyle().isInhFillShade())
-			docu.writeAttribute("TXTFILLSH",item->itemText.defaultStyle().charStyle().fillShade());
-		if ( ! item->itemText.defaultStyle().charStyle().isInhScaleH())
-			docu.writeAttribute("TXTSCALE",item->itemText.defaultStyle().charStyle().scaleH() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhScaleV())
-			docu.writeAttribute("TXTSCALEV",item->itemText.defaultStyle().charStyle().scaleV() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhBaselineOffset())
-			docu.writeAttribute("TXTBASE",item->itemText.defaultStyle().charStyle().baselineOffset() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhShadowXOffset())
-			docu.writeAttribute("TXTSHX",item->itemText.defaultStyle().charStyle().shadowXOffset() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhShadowYOffset())
-			docu.writeAttribute("TXTSHY",item->itemText.defaultStyle().charStyle().shadowYOffset() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhOutlineWidth())
-			docu.writeAttribute("TXTOUT",item->itemText.defaultStyle().charStyle().outlineWidth() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineOffset())
-			docu.writeAttribute("TXTULP",item->itemText.defaultStyle().charStyle().underlineOffset() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineWidth())
-			docu.writeAttribute("TXTULW",item->itemText.defaultStyle().charStyle().underlineWidth() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruOffset())
-			docu.writeAttribute("TXTSTP",item->itemText.defaultStyle().charStyle().strikethruOffset() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruWidth())
-			docu.writeAttribute("TXTSTW",item->itemText.defaultStyle().charStyle().strikethruWidth() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhTracking())
-			docu.writeAttribute("TXTKERN",item->itemText.defaultStyle().charStyle().tracking() / 10.0);
-		if ( ! item->itemText.defaultStyle().charStyle().isInhWordTracking())
-			docu.writeAttribute("wordTrack",item->itemText.defaultStyle().charStyle().wordTracking());
-		if ( ! item->itemText.defaultStyle().isInhMinWordTracking())
-			docu.writeAttribute("MinWordTrack", item->itemText.defaultStyle().minWordTracking());
-		if ( ! item->itemText.defaultStyle().isInhMinGlyphExtension())
-			docu.writeAttribute("MinGlyphShrink", item->itemText.defaultStyle().minGlyphExtension());
-		if ( ! item->itemText.defaultStyle().isInhMaxGlyphExtension())
-			docu.writeAttribute("MaxGlyphExtend", item->itemText.defaultStyle().maxGlyphExtension());
-		if ( ! item->itemText.defaultStyle().isInhOpticalMargins())
-			docu.writeAttribute("OpticalMargins", item->itemText.defaultStyle().opticalMargins());
-		if ( ! item->itemText.defaultStyle().isInhHyphenationMode())
-			docu.writeAttribute("HyphenationMode", item->itemText.defaultStyle().hyphenationMode());
-		if ( ! item->itemText.defaultStyle().isInhLeftMargin() )
-			docu.writeAttribute("leftMargin", item->itemText.defaultStyle().leftMargin());
-		if ( ! item->itemText.defaultStyle().isInhRightMargin())
-			docu.writeAttribute("rightMargin", item->itemText.defaultStyle().rightMargin());
-		if ( ! item->itemText.defaultStyle().isInhFirstIndent())
-			docu.writeAttribute("firstIndent", item->itemText.defaultStyle().firstIndent());
-		if ( ! item->itemText.defaultStyle().isInhLineSpacing())
-			docu.writeAttribute("LINESP",item->itemText.defaultStyle().lineSpacing());
-		if ( ! item->itemText.defaultStyle().isInhLineSpacingMode())
-			docu.writeAttribute("LINESPMode", item->itemText.defaultStyle().lineSpacingMode());
-		if ( ! item->itemText.defaultStyle().charStyle().isInhFont())
-			docu.writeAttribute("IFONT",item->itemText.defaultStyle().charStyle().font().scName());
-		if ( ! item->itemText.defaultStyle().charStyle().isInhFontSize())
-			docu.writeAttribute("ISIZE",item->itemText.defaultStyle().charStyle().fontSize() / 10.0 );
-		if ( ! item->itemText.defaultStyle().charStyle().isInhLanguage())
-			docu.writeAttribute("LANGUAGE", item->itemText.defaultStyle().charStyle().language());
+		const ParagraphStyle& dStyle(item->itemText.defaultStyle());
+		if ( ! dStyle.charStyle().isInhFillColor())
+			docu.writeAttribute("TXTFILL", dStyle.charStyle().fillColor());
+		if ( ! dStyle.charStyle().isInhStrokeColor())
+			docu.writeAttribute("TXTSTROKE", dStyle.charStyle().strokeColor());
+		if ( ! dStyle.charStyle().isInhStrokeShade())
+			docu.writeAttribute("TXTSTRSH", dStyle.charStyle().strokeShade());
+		if ( ! dStyle.charStyle().isInhFillShade())
+			docu.writeAttribute("TXTFILLSH", dStyle.charStyle().fillShade());
+		if ( ! dStyle.charStyle().isInhScaleH())
+			docu.writeAttribute("TXTSCALE", dStyle.charStyle().scaleH() / 10.0);
+		if ( ! dStyle.charStyle().isInhScaleV())
+			docu.writeAttribute("TXTSCALEV", dStyle.charStyle().scaleV() / 10.0);
+		if ( ! dStyle.charStyle().isInhBaselineOffset())
+			docu.writeAttribute("TXTBASE", dStyle.charStyle().baselineOffset() / 10.0);
+		if ( ! dStyle.charStyle().isInhShadowXOffset())
+			docu.writeAttribute("TXTSHX", dStyle.charStyle().shadowXOffset() / 10.0);
+		if ( ! dStyle.charStyle().isInhShadowYOffset())
+			docu.writeAttribute("TXTSHY", dStyle.charStyle().shadowYOffset() / 10.0);
+		if ( ! dStyle.charStyle().isInhOutlineWidth())
+			docu.writeAttribute("TXTOUT", dStyle.charStyle().outlineWidth() / 10.0);
+		if ( ! dStyle.charStyle().isInhUnderlineOffset())
+			docu.writeAttribute("TXTULP", dStyle.charStyle().underlineOffset() / 10.0);
+		if ( ! dStyle.charStyle().isInhUnderlineWidth())
+			docu.writeAttribute("TXTULW", dStyle.charStyle().underlineWidth() / 10.0);
+		if ( ! dStyle.charStyle().isInhStrikethruOffset())
+			docu.writeAttribute("TXTSTP", dStyle.charStyle().strikethruOffset() / 10.0);
+		if ( ! dStyle.charStyle().isInhStrikethruWidth())
+			docu.writeAttribute("TXTSTW", dStyle.charStyle().strikethruWidth() / 10.0);
+		if ( ! dStyle.charStyle().isInhTracking())
+			docu.writeAttribute("TXTKERN", dStyle.charStyle().tracking() / 10.0);
+		if ( ! dStyle.charStyle().isInhWordTracking())
+			docu.writeAttribute("wordTrack", dStyle.charStyle().wordTracking());
+		if ( ! dStyle.isInhMinWordTracking())
+			docu.writeAttribute("MinWordTrack", dStyle.minWordTracking());
+		if ( ! dStyle.isInhMinGlyphExtension())
+			docu.writeAttribute("MinGlyphShrink", dStyle.minGlyphExtension());
+		if ( ! dStyle.isInhMaxGlyphExtension())
+			docu.writeAttribute("MaxGlyphExtend", dStyle.maxGlyphExtension());
+		if ( ! dStyle.isInhOpticalMargins())
+			docu.writeAttribute("OpticalMargins", dStyle.opticalMargins());
+		if ( ! dStyle.isInhHyphenationMode())
+			docu.writeAttribute("HyphenationMode", dStyle.hyphenationMode());
+		if ( ! dStyle.isInhLeftMargin() )
+			docu.writeAttribute("leftMargin", dStyle.leftMargin());
+		if ( ! dStyle.isInhRightMargin())
+			docu.writeAttribute("rightMargin", dStyle.rightMargin());
+		if ( ! dStyle.isInhFirstIndent())
+			docu.writeAttribute("firstIndent", dStyle.firstIndent());
+		if ( ! dStyle.isInhLineSpacing())
+			docu.writeAttribute("LINESP", dStyle.lineSpacing());
+		if ( ! dStyle.isInhLineSpacingMode())
+			docu.writeAttribute("LINESPMode", dStyle.lineSpacingMode());
+		if ( ! dStyle.isInhKeepLinesStart())
+			docu.writeAttribute("KeepLinesStart", dStyle.keepLinesStart());
+		if ( ! dStyle.isInhKeepLinesEnd())
+			docu.writeAttribute("KeepLinesEnd", dStyle.keepLinesEnd());
+		if ( ! dStyle.isInhKeepWithNext())
+			docu.writeAttribute("KeepWithNext", dStyle.keepWithNext());
+		if ( ! dStyle.isInhKeepTogether())
+			docu.writeAttribute("KeepTogether", dStyle.keepTogether());
+		if ( ! dStyle.charStyle().isInhFont())
+			docu.writeAttribute("IFONT", dStyle.charStyle().font().scName());
+		if ( ! dStyle.charStyle().isInhFontSize())
+			docu.writeAttribute("ISIZE", dStyle.charStyle().fontSize() / 10.0 );
+		if ( ! dStyle.charStyle().isInhLanguage())
+			docu.writeAttribute("LANGUAGE", dStyle.charStyle().language());
 	}
 	if (item->asTextFrame() || item->asPathText())
 	{

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/scriptercore.cpp Sat Oct  8 13:56:21 2011
@@ -19,6 +19,7 @@
 #include "runscriptdialog.h"
 #include "ui/helpbrowser.h"
 #include "ui/propertiespalette.h" //TODO Move the calls to this to a signal
+#include "ui/propertiespalette_content.h" //TODO Move the calls to this to a signal
 #include "ui/propertiespalette_frame.h" //TODO Move the calls to this to a signal
 #include "ui/pagepalette.h" //TODO Move the calls to this to a signal
 #include "ui/layers.h" //TODO Move the calls to this to a signal
@@ -151,6 +152,7 @@
 	ScribusMainWindow* ScMW=ScCore->primaryMainWindow();
 	if (ScMW->HaveDoc)
 	{
+		ScMW->contentPropsPalette->setDoc(ScMW->doc);
 		ScMW->framePropsPalette->setDoc(ScMW->doc);
 		ScMW->propertiesPalette->setDoc(ScMW->doc);
 		ScMW->layerPalette->setDoc(ScMW->doc);
@@ -232,6 +234,7 @@
 	PyThreadState* global_state = NULL;
 	if (!inMainInterpreter)
 	{
+		ScCore->primaryMainWindow()->contentPropsPalette->setDoc(0);
 		ScCore->primaryMainWindow()->framePropsPalette->setDoc(0);
 		ScCore->primaryMainWindow()->propertiesPalette->unsetDoc();
 		ScCore->primaryMainWindow()->pagePalette->setView(NULL);
@@ -348,6 +351,7 @@
 
 void ScripterCore::slotRunScript(const QString Script)
 {
+	ScCore->primaryMainWindow()->contentPropsPalette->setDoc(0);
 	ScCore->primaryMainWindow()->framePropsPalette->setDoc(0);
 	ScCore->primaryMainWindow()->propertiesPalette->unsetDoc();
 	ScCore->primaryMainWindow()->pagePalette->setView(NULL);

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Sat Oct  8 13:56:21 2011
@@ -187,6 +187,7 @@
 #include "ui/preview.h"
 #include "ui/printdialog.h"
 #include "ui/propertiespalette.h"
+#include "ui/propertiespalette_content.h"
 #include "ui/propertiespalette_frame.h"
 #include "ui/propertiespalette_image.h"
 #include "ui/propertiespalette_line.h"
@@ -506,6 +507,11 @@
 	//propertiesPalette->Cpal->setColors(prefsManager->colorSet());
 	emit UpdateRequest(reqDefFontListUpdate);
 	propertiesPalette->installEventFilter(this);
+
+	contentPropsPalette = new PropertiesPalette_Content(this);
+	contentPropsPalette->setMainWindow(this);
+	connect( scrActions["toolsContentProperties"], SIGNAL(toggled(bool)) , contentPropsPalette, SLOT(setPaletteShown(bool)) );
+	connect( contentPropsPalette, SIGNAL(paletteShown(bool)), scrActions["toolsContentProperties"], SLOT(setChecked(bool)));
 
 	framePropsPalette = new PropertiesPalette_Frame(this);
 	framePropsPalette->setMainWindow(this);
@@ -1018,6 +1024,7 @@
 	scrMenuMgr->addMenuSeparator("Windows");
 
 	scrMenuMgr->addMenuItem(scrActions["toolsProperties"], "Windows", true);
+	scrMenuMgr->addMenuItem(scrActions["toolsContentProperties"], "Windows", true);
 	scrMenuMgr->addMenuItem(scrActions["toolsFrameProperties"], "Windows", true);
 	scrMenuMgr->addMenuItem(scrActions["toolsOutline"], "Windows", true);
 	scrMenuMgr->addMenuItem(scrActions["toolsScrapbook"], "Windows", true);
@@ -1112,7 +1119,7 @@
 		doc->currentStyle.charStyle().setStyle( currItem->currentCharStyle() );
 		emit TextStyle(doc->currentStyle);
 		// to go: (av)
-		propertiesPalette->textPal->updateCharStyle(doc->currentStyle.charStyle());
+		propertiesPalette->textPal->updateStyle(doc->currentStyle);
 	}
 }
 
@@ -1637,6 +1644,7 @@
 	editToolBar->connectPrefsSlot(false);
 	modeToolBar->connectPrefsSlot(false);
 	pdfToolBar->connectPrefsSlot(false);
+	contentPropsPalette->hide();
 	framePropsPalette->hide();
 	propertiesPalette->hide();
 	outlinePalette->hide();
@@ -2306,6 +2314,7 @@
 {
 	updateActiveWindowCaption(doc->DocName);
 // 	scrActions["shade100"]->setChecked(true);
+	contentPropsPalette->setDoc(doc);
 	framePropsPalette->setDoc(doc);
 	propertiesPalette->setDoc(doc);
 	//propertiesPalette->Cpal->displayGradient(0);
@@ -2511,6 +2520,7 @@
 	//Update palettes
 	updateActiveWindowCaption(doc->DocName);
 // 	scrActions["shade100"]->setChecked(true);
+	contentPropsPalette->setDoc(doc);
 	framePropsPalette->setDoc(doc);
 	propertiesPalette->setDoc(doc);
 	symbolPalette->setDoc(doc);
@@ -2853,7 +2863,7 @@
 			propertiesPalette->textPal->displayCharStyle(doc->currentStyle.charStyle().parent());
 			emit TextStyle(doc->currentStyle);
 			// to go: (av)
-			propertiesPalette->textPal->updateCharStyle(doc->currentStyle.charStyle());
+			propertiesPalette->textPal->updateStyle(doc->currentStyle);
 			setStyleEffects(doc->currentStyle.charStyle().effects());
 		}
 
@@ -2919,7 +2929,7 @@
 			propertiesPalette->textPal->displayCharStyle(doc->currentStyle.charStyle().parent());
 			emit TextStyle(doc->currentStyle);
 			// to go: (av)
-			propertiesPalette->textPal->updateCharStyle(doc->currentStyle.charStyle());
+			propertiesPalette->textPal->updateStyle(doc->currentStyle);
 			setStyleEffects(doc->currentStyle.charStyle().effects());
 		}
 		break;
@@ -4487,6 +4497,7 @@
 	if (ScCore->haveCMS())
 		doc->CloseCMSProfiles();
 	//<<Palettes
+	contentPropsPalette->setDoc(0);
 	framePropsPalette->setDoc(0);
 	propertiesPalette->unsetDoc();
 	symbolPalette->unsetDoc();
@@ -4818,6 +4829,7 @@
 
 void ScribusMainWindow::slotFileQuit()
 {
+	contentPropsPalette->setDoc(0);
 	framePropsPalette->setDoc(0);
 	propertiesPalette->unsetDoc();
 	symbolPalette->unsetDoc();
@@ -5027,6 +5039,7 @@
 				slotElemRead(buffer, 0, 0, false, true, doc, view);
 				// update style lists:
 				styleManager->setDoc(doc);
+				contentPropsPalette->setDoc(doc);
 				framePropsPalette->setDoc(doc);
 				propertiesPalette->unsetDoc();
 				propertiesPalette->setDoc(doc);
@@ -5105,6 +5118,7 @@
 				slotElemRead(buffer, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
 				// update style lists:
 				styleManager->setDoc(doc);
+				contentPropsPalette->setDoc(doc);
 				framePropsPalette->setDoc(doc);
 				propertiesPalette->unsetDoc();
 				propertiesPalette->setDoc(doc);
@@ -7894,6 +7908,7 @@
 			showGSHelp=true;
 	}
 
+	contentPropsPalette->startup();
 	framePropsPalette->startup();
 	propertiesPalette->startup();
 	outlinePalette->startup();
@@ -8472,6 +8487,7 @@
 
 	doc->setUnitIndex(unitIndex);
 	setCurrentComboItem(view->unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
+	contentPropsPalette->unitChange();
 	framePropsPalette->unitChange();
 	propertiesPalette->unitChange();
 	nodePalette->unitChange();

Modified: branches/ScribusOIF/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/scribus.h
==============================================================================
--- branches/ScribusOIF/scribus/scribus.h (original)
+++ branches/ScribusOIF/scribus/scribus.h Sat Oct  8 13:56:21 2011
@@ -87,6 +87,7 @@
 class PrefsContext;
 class PrefsManager;
 class PropertiesPalette;
+class PropertiesPalette_Content;
 class PropertiesPalette_Frame;
 //class ReformDoc;
 class ScToolBar;
@@ -211,6 +212,7 @@
 	CharSelect *charPalette;
 	PropertiesPalette *propertiesPalette;
 	PropertiesPalette_Frame *framePropsPalette;
+	PropertiesPalette_Content *contentPropsPalette;
 	NodePalette *nodePalette;
 	OutlinePalette *outlinePalette;
 	Biblio *scrapbookPalette;

Modified: branches/ScribusOIF/scribus/styles/paragraphstyle.attrdefs.cxx
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/styles/paragraphstyle.attrdefs.cxx
==============================================================================
--- branches/ScribusOIF/scribus/styles/paragraphstyle.attrdefs.cxx (original)
+++ branches/ScribusOIF/scribus/styles/paragraphstyle.attrdefs.cxx Sat Oct  8 13:56:21 2011
@@ -35,5 +35,8 @@
 ATTRDEF(bool, hasDropCap, HasDropCap, false)
 ATTRDEF(double, dropCapOffset, DropCapOffset, 0.0)
 ATTRDEF(bool, useBaselineGrid, UseBaselineGrid, false)
+ATTRDEF(int, keepLinesStart, KeepLinesStart, 0)
+ATTRDEF(int, keepLinesEnd, KeepLinesEnd, 0)
+ATTRDEF(bool, keepWithNext, KeepWithNext, false)
+ATTRDEF(bool, keepTogether, KeepTogether, false)
 
-

Modified: branches/ScribusOIF/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/contextmenu.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/contextmenu.cpp (original)
+++ branches/ScribusOIF/scribus/ui/contextmenu.cpp Sat Oct  8 13:56:21 2011
@@ -401,6 +401,7 @@
 	//<-- Add Properties
 	addSeparator();
 	addAction(m_AP->scrActions["toolsProperties"]);
+	addAction(m_AP->scrActions["toolsContentProperties"]);
 	addAction(m_AP->scrActions["toolsFrameProperties"]);
 	//-->
 }

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp Sat Oct  8 13:56:21 2011
@@ -20,8 +20,9 @@
 #include "propertywidget_advanced.h"
 #include "propertywidget_distance.h"
 #include "propertywidget_flop.h"
+#include "propertywidget_optmargins.h"
+#include "propertywidget_orphans.h"
 #include "propertywidget_pathtext.h"
-#include "propertywidget_optmargins.h"
 #include "propertywidget_textcolor.h"
 #include "sccombobox.h"
 #include "scfonts.h"
@@ -71,6 +72,9 @@
 	flopBox = new PropertyWidget_Flop(textTree);
 	flopItem = textTree->addWidget( tr("First Line Offset"), flopBox);
 
+	orphanBox = new PropertyWidget_Orphans(textTree);
+	orphanItem = textTree->addWidget( tr("Orphans and Widows"), orphanBox);
+
 	distanceWidgets = new PropertyWidget_Distance(textTree);
     distanceItem = textTree->addWidget( tr("Columns & Text Distances"), distanceWidgets);
 
@@ -169,6 +173,7 @@
 	distanceWidgets->setDoc(m_doc);
 	flopBox->setDoc(m_doc);
 	optMargins->setDoc(m_doc);
+	orphanBox->setDoc(m_doc);
 	pathTextWidgets->setDoc(m_doc);
 
 	fonts->RebuildList(m_doc);
@@ -200,6 +205,7 @@
 	distanceWidgets->setDoc(0);
 	flopBox->setDoc(0);
 	optMargins->setDoc(0);
+	orphanBox->setDoc(0);
 
 	m_haveItem = false;
 
@@ -366,6 +372,7 @@
 	{
 		flopItem->setHidden(true);
 		distanceItem->setHidden(true);
+		orphanItem->setHidden(true);
 		pathTextItem->setHidden(false);
 		pathTextWidgets->pathTextType->setCurrentIndex(m_item->textPathType);
 		pathTextWidgets->flippedPathText->setChecked(m_item->textPathFlipped);
@@ -377,12 +384,14 @@
 	{
 		flopItem->setHidden(false);
 		distanceItem->setHidden(false);
+		orphanItem->setHidden(false);
 		pathTextItem->setHidden(true);
 	}
 	else
 	{
 		flopItem->setHidden(false);
 		distanceItem->setHidden(false);
+		orphanItem->setHidden(false);
 		pathTextItem->setHidden(true);
 	}
 
@@ -568,6 +577,7 @@
 
 	advancedWidgets->updateStyle(newCurrent);
 	colorWidgets->updateStyle(newCurrent);
+	orphanBox->updateStyle (newCurrent);
 
 	displayFontFace(charStyle.font().scName());
 	displayFontSize(charStyle.fontSize());
@@ -920,6 +930,7 @@
 	flopItem->setText(0, tr("First Line Offset"));
     distanceItem->setText(0, tr("Columns & Text Distances"));
 	optMarginsItem->setText(0, tr("Optical Margins"));
+	orphanItem->setText(0, tr("Orphans and Widows"));
 	pathTextItem->setText(0, tr("Path Text Properties"));
 	
 
@@ -939,6 +950,7 @@
 	distanceWidgets->languageChange();
 	flopBox->languageChange();
 	optMargins->languageChange();
+	orphanBox->languageChange();
 	pathTextWidgets->languageChange();
 
 	textAlignment->languageChange();

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.h Sat Oct  8 13:56:21 2011
@@ -27,6 +27,7 @@
 class PropertyWidget_Distance;
 class PropertyWidget_Flop;
 class PropertyWidget_OptMargins;
+class PropertyWidget_Orphans;
 class PropertyWidget_PathText;
 class PropertyWidget_TextColor;
 class ScComboBox;
@@ -150,6 +151,9 @@
 
 	PropertyWidget_Flop* flopBox;
 	QTreeWidgetItem* flopItem;
+
+	PropertyWidget_Orphans* orphanBox;
+	QTreeWidgetItem* orphanItem;
 	
 	PropertyWidget_PathText* pathTextWidgets;
 	QTreeWidgetItem* pathTextItem;

Modified: branches/ScribusOIF/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/smpstylewidget.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/smpstylewidget.cpp (original)
+++ branches/ScribusOIF/scribus/ui/smpstylewidget.cpp Sat Oct  8 13:56:21 2011
@@ -106,7 +106,14 @@
 	minGlyphExtLabel->setToolTip(minGlyphExtSpin->toolTip());
 	maxGlyphExtSpin->setToolTip(tr("Maximum extension of glyphs"));
 	maxGlyphExtLabel->setToolTip(maxGlyphExtSpin->toolTip());
-	
+
+	keepLinesStart->setToolTip ("<qt>" + tr ("Ensure that first lines of a paragraph won't end up separated from the rest (known as widow/orphan control)") + "</qt>");
+	keepLinesEnd->setToolTip ("<qt>" + tr ("Ensure that last lines of a paragraph won't end up separated from the rest (known as widow/orphan control)") + "</qt>");
+	keepLabelStart->setToolTip (keepLinesStart->toolTip());
+	keepLabelEnd->setToolTip (keepLinesEnd->toolTip());
+	keepTogether->setToolTip ("<qt>" + tr ("If checked, ensures that the paragraph won't be split across multiple pages or columns") + "</qt>");
+	keepWithNext->setToolTip ("<qt>" + tr ("If checked, automatically moves the paragraph to the next column or page if the next paragraph isn't on the same page or column") + "</qt>");
+
 
 /***********************************/
 /*      End Tooltips               */
@@ -140,6 +147,13 @@
 	glyphExtensionLabel->setText(tr("Glyph Extension"));
 	minGlyphExtLabel->setText(tr("Min:", "Glyph Extension"));
 	maxGlyphExtLabel->setText(tr("Max:", "Glyph Extension"));
+
+	keepLabelStart->setText (tr ("Don't separate first"));
+	keepLabelEnd->setText (tr ("Don't separate last"));
+	keepLinesStart->setSuffix (tr (" lines"));
+	keepLinesEnd->setSuffix (tr (" lines"));
+	keepTogether->setText (tr ("Do not split paragraph"));
+	keepWithNext->setText (tr ("Keep with next paragraph"));
 }
 
 void SMPStyleWidget::unitChange(double oldRatio, double newRatio, int unitIndex)
@@ -236,6 +250,15 @@
 
 		tabList_->setRightIndentValue(pstyle->rightMargin() * unitRatio, pstyle->isInhRightMargin());
 		tabList_->setParentRightIndent(parent->rightMargin() * unitRatio);
+
+		keepLinesStart->setValue (pstyle->keepLinesStart(), pstyle->isInhKeepLinesStart());
+		keepLinesEnd->setValue (pstyle->keepLinesEnd(), pstyle->isInhKeepLinesEnd());
+		keepTogether->setChecked (pstyle->keepTogether(), pstyle->isInhKeepTogether());
+		keepWithNext->setChecked (pstyle->keepWithNext(), pstyle->isInhKeepWithNext());
+		keepLinesStart->setParentValue (parent->keepLinesStart());
+		keepLinesEnd->setParentValue (parent->keepLinesEnd());
+		keepTogether->setParentValue (parent->keepTogether());
+		keepWithNext->setParentValue (parent->keepWithNext());
 	}
 	else
 	{
@@ -260,7 +283,11 @@
 		tabList_->setLeftIndentValue(pstyle->leftMargin() * unitRatio);
 		tabList_->setFirstLineValue(pstyle->firstIndent() * unitRatio);
 		tabList_->setRightIndentValue(pstyle->rightMargin() * unitRatio);
-		
+
+		keepLinesStart->setValue (pstyle->keepLinesStart());
+		keepLinesEnd->setValue (pstyle->keepLinesEnd());
+		keepTogether->setChecked (pstyle->keepTogether());
+		keepWithNext->setChecked (pstyle->keepWithNext());
 	}
 
 	lineSpacing_->setEnabled(pstyle->lineSpacingMode() == ParagraphStyle::FixedLineSpacing);

Modified: branches/ScribusOIF/scribus/ui/smpstylewidget.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/smpstylewidget.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/smpstylewidget.ui (original)
+++ branches/ScribusOIF/scribus/ui/smpstylewidget.ui Sat Oct  8 13:56:21 2011
@@ -1,47 +1,48 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>SMPStyleWidget</class>
- <widget class="QWidget" name="SMPStyleWidget" >
-  <property name="geometry" >
+ <widget class="QWidget" name="SMPStyleWidget">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>714</width>
-    <height>533</height>
+    <height>580</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout">
    <item>
-    <widget class="QTabWidget" name="tabWidget" >
-     <property name="currentIndex" >
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
       <number>0</number>
      </property>
-     <widget class="QWidget" name="tab" >
-      <attribute name="title" >
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
        <string>Properties</string>
       </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_4" >
+      <layout class="QVBoxLayout" name="verticalLayout_4">
        <item>
-        <layout class="QHBoxLayout" >
-         <property name="spacing" >
+        <layout class="QHBoxLayout">
+         <property name="spacing">
           <number>5</number>
          </property>
-         <property name="margin" >
+         <property name="margin">
           <number>0</number>
          </property>
          <item>
-          <widget class="QLabel" name="parentLabel" >
-           <property name="text" >
+          <widget class="QLabel" name="parentLabel">
+           <property name="text">
             <string>Based On:</string>
            </property>
-           <property name="wordWrap" >
+           <property name="wordWrap">
             <bool>false</bool>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QComboBox" name="parentCombo" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+          <widget class="QComboBox" name="parentCombo">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
              <horstretch>5</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
@@ -51,49 +52,49 @@
         </layout>
        </item>
        <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_5" >
+        <layout class="QHBoxLayout" name="horizontalLayout_5">
          <item>
-          <layout class="QVBoxLayout" name="verticalLayout_2" >
+          <layout class="QVBoxLayout" name="verticalLayout_2">
            <item>
-            <widget class="QGroupBox" name="distancesBox" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
+            <widget class="QGroupBox" name="distancesBox">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="font" >
+             <property name="font">
               <font>
                <weight>50</weight>
                <bold>false</bold>
               </font>
              </property>
-             <property name="title" >
+             <property name="title">
               <string>Distances and Alignment</string>
              </property>
-             <layout class="QVBoxLayout" >
+             <layout class="QVBoxLayout">
               <item>
-               <layout class="QHBoxLayout" >
-                <item>
-                 <widget class="QLabel" name="lineSpacingLabel" >
-                  <property name="maximumSize" >
+               <layout class="QHBoxLayout">
+                <item>
+                 <widget class="QLabel" name="lineSpacingLabel">
+                  <property name="maximumSize">
                    <size>
                     <width>22</width>
                     <height>22</height>
                    </size>
                   </property>
-                  <property name="text" >
+                  <property name="text">
                    <string>TextLabel</string>
                   </property>
-                  <property name="buddy" >
+                  <property name="buddy">
                    <cstring>lineSpacingMode_</cstring>
                   </property>
                  </widget>
                 </item>
                 <item>
-                 <widget class="SMScComboBox" name="lineSpacingMode_" >
-                  <property name="sizePolicy" >
-                   <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
+                 <widget class="SMScComboBox" name="lineSpacingMode_">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
                     <horstretch>0</horstretch>
                     <verstretch>0</verstretch>
                    </sizepolicy>
@@ -101,21 +102,21 @@
                  </widget>
                 </item>
                 <item>
-                 <widget class="SMScrSpinBox" name="lineSpacing_" >
-                  <property name="minimum" >
+                 <widget class="SMScrSpinBox" name="lineSpacing_">
+                  <property name="minimum">
                    <number>1</number>
                   </property>
-                  <property name="maximum" >
+                  <property name="maximum">
                    <number>300</number>
                   </property>
                  </widget>
                 </item>
                 <item>
                  <spacer>
-                  <property name="orientation" >
+                  <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
-                  <property name="sizeHint" stdset="0" >
+                  <property name="sizeHint" stdset="0">
                    <size>
                     <width>40</width>
                     <height>20</height>
@@ -126,36 +127,36 @@
                </layout>
               </item>
               <item>
-               <layout class="QHBoxLayout" >
-                <item>
-                 <widget class="QLabel" name="spaceAboveLabel" >
-                  <property name="maximumSize" >
+               <layout class="QHBoxLayout">
+                <item>
+                 <widget class="QLabel" name="spaceAboveLabel">
+                  <property name="maximumSize">
                    <size>
                     <width>22</width>
                     <height>22</height>
                    </size>
                   </property>
-                  <property name="text" >
+                  <property name="text">
                    <string>TextLabel</string>
                   </property>
-                  <property name="buddy" >
+                  <property name="buddy">
                    <cstring>spaceAbove_</cstring>
                   </property>
                  </widget>
                 </item>
                 <item>
-                 <widget class="SMScrSpinBox" name="spaceAbove_" >
-                  <property name="maximum" >
+                 <widget class="SMScrSpinBox" name="spaceAbove_">
+                  <property name="maximum">
                    <number>300</number>
                   </property>
                  </widget>
                 </item>
                 <item>
                  <spacer>
-                  <property name="orientation" >
+                  <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
-                  <property name="sizeHint" stdset="0" >
+                  <property name="sizeHint" stdset="0">
                    <size>
                     <width>40</width>
                     <height>20</height>
@@ -166,36 +167,36 @@
                </layout>
               </item>
               <item>
-               <layout class="QHBoxLayout" >
-                <item>
-                 <widget class="QLabel" name="spaceBelowLabel" >
-                  <property name="maximumSize" >
+               <layout class="QHBoxLayout">
+                <item>
+                 <widget class="QLabel" name="spaceBelowLabel">
+                  <property name="maximumSize">
                    <size>
                     <width>22</width>
                     <height>22</height>
                    </size>
                   </property>
-                  <property name="text" >
+                  <property name="text">
                    <string>TextLabel</string>
                   </property>
-                  <property name="buddy" >
+                  <property name="buddy">
                    <cstring>spaceBelow_</cstring>
                   </property>
                  </widget>
                 </item>
                 <item>
-                 <widget class="SMScrSpinBox" name="spaceBelow_" >
-                  <property name="maximum" >
+                 <widget class="SMScrSpinBox" name="spaceBelow_">
+                  <property name="maximum">
                    <number>300</number>
                   </property>
                  </widget>
                 </item>
                 <item>
                  <spacer>
-                  <property name="orientation" >
+                  <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
-                  <property name="sizeHint" stdset="0" >
+                  <property name="sizeHint" stdset="0">
                    <size>
                     <width>40</width>
                     <height>20</height>
@@ -206,11 +207,11 @@
                </layout>
               </item>
               <item>
-               <layout class="QHBoxLayout" >
-                <item>
-                 <widget class="SMAlignSelect" native="1" name="alignement_" >
-                  <property name="sizePolicy" >
-                   <sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
+               <layout class="QHBoxLayout">
+                <item>
+                 <widget class="SMAlignSelect" name="alignement_" native="true">
+                  <property name="sizePolicy">
+                   <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
                     <horstretch>0</horstretch>
                     <verstretch>0</verstretch>
                    </sizepolicy>
@@ -219,10 +220,10 @@
                 </item>
                 <item>
                  <spacer>
-                  <property name="orientation" >
+                  <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
-                  <property name="sizeHint" stdset="0" >
+                  <property name="sizeHint" stdset="0">
                    <size>
                     <width>211</width>
                     <height>20</height>
@@ -236,45 +237,45 @@
             </widget>
            </item>
            <item>
-            <widget class="QGroupBox" name="dropCapsBox" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
+            <widget class="QGroupBox" name="dropCapsBox">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="title" >
+             <property name="title">
               <string>Drop Caps</string>
              </property>
-             <property name="checkable" >
+             <property name="checkable">
               <bool>true</bool>
              </property>
-             <property name="checked" >
+             <property name="checked">
               <bool>true</bool>
              </property>
-             <layout class="QVBoxLayout" >
+             <layout class="QVBoxLayout">
               <item>
-               <layout class="QHBoxLayout" >
-                <item>
-                 <layout class="QVBoxLayout" >
+               <layout class="QHBoxLayout">
+                <item>
+                 <layout class="QVBoxLayout">
                   <item>
-                   <layout class="QHBoxLayout" >
+                   <layout class="QHBoxLayout">
                     <item>
-                     <widget class="QLabel" name="label" >
-                      <property name="text" >
+                     <widget class="QLabel" name="label">
+                      <property name="text">
                        <string>&Lines:</string>
                       </property>
-                      <property name="buddy" >
+                      <property name="buddy">
                        <cstring>dropCapLines_</cstring>
                       </property>
                      </widget>
                     </item>
                     <item>
-                     <widget class="SMSpinBox" name="dropCapLines_" >
-                      <property name="minimum" >
+                     <widget class="SMSpinBox" name="dropCapLines_">
+                      <property name="minimum">
                        <number>2</number>
                       </property>
-                      <property name="maximum" >
+                      <property name="maximum">
                        <number>20</number>
                       </property>
                      </widget>
@@ -282,23 +283,23 @@
                    </layout>
                   </item>
                   <item>
-                   <layout class="QHBoxLayout" >
+                   <layout class="QHBoxLayout">
                     <item>
-                     <widget class="QLabel" name="label_2" >
-                      <property name="text" >
+                     <widget class="QLabel" name="label_2">
+                      <property name="text">
                        <string>Distance from Text:</string>
                       </property>
-                      <property name="buddy" >
+                      <property name="buddy">
                        <cstring>dropCapOffset_</cstring>
                       </property>
                      </widget>
                     </item>
                     <item>
-                     <widget class="SMScrSpinBox" name="dropCapOffset_" >
-                      <property name="minimum" >
+                     <widget class="SMScrSpinBox" name="dropCapOffset_">
+                      <property name="minimum">
                        <number>-3000</number>
                       </property>
-                      <property name="maximum" >
+                      <property name="maximum">
                        <number>3000</number>
                       </property>
                      </widget>
@@ -309,10 +310,10 @@
                 </item>
                 <item>
                  <spacer>
-                  <property name="orientation" >
+                  <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
-                  <property name="sizeHint" stdset="0" >
+                  <property name="sizeHint" stdset="0">
                    <size>
                     <width>40</width>
                     <height>20</height>
@@ -321,29 +322,89 @@
                  </spacer>
                 </item>
                </layout>
+              </item>
+              <item>
+               <widget class="QToolButton" name="parentDropCapButton">
+                <property name="enabled">
+                 <bool>true</bool>
+                </property>
+                <property name="text">
+                 <string>Use Parent Value</string>
+                </property>
+               </widget>
               </item>
              </layout>
             </widget>
            </item>
            <item>
-            <widget class="QToolButton" name="parentDropCapButton" >
-             <property name="enabled" >
-              <bool>true</bool>
-             </property>
-             <property name="text" >
-              <string>Use Parent Value</string>
-             </property>
+            <widget class="QGroupBox" name="textFlowBox">
+             <property name="title">
+              <string>Orphans and Widows</string>
+             </property>
+             <layout class="QGridLayout" name="gridLayout_2">
+              <item row="0" column="0">
+               <widget class="QLabel" name="keepLabelStart">
+                <property name="toolTip">
+                 <string>Ensure that first lines of a paragraph won't end up separated from the rest (known as widow/orphan control)</string>
+                </property>
+                <property name="text">
+                 <string>Don't separate first</string>
+                </property>
+               </widget>
+              </item>
+              <item row="0" column="1">
+               <widget class="SMSpinBox" name="keepLinesStart">
+                <property name="suffix">
+                 <string> lines</string>
+                </property>
+                <property name="maximum">
+                 <number>10</number>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0">
+               <widget class="QLabel" name="keepLabelEnd">
+                <property name="text">
+                 <string>Don't separate last</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="SMSpinBox" name="keepLinesEnd">
+                <property name="suffix">
+                 <string> lines</string>
+                </property>
+                <property name="maximum">
+                 <number>10</number>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="0" colspan="2">
+               <widget class="SMCheckBox" name="keepTogether">
+                <property name="text">
+                 <string>Do not split paragraph</string>
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="0" colspan="2">
+               <widget class="SMCheckBox" name="keepWithNext">
+                <property name="text">
+                 <string>Keep with next paragraph</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
             </widget>
            </item>
            <item>
             <spacer>
-             <property name="orientation" >
+             <property name="orientation">
               <enum>Qt::Vertical</enum>
              </property>
-             <property name="sizeType" >
+             <property name="sizeType">
               <enum>QSizePolicy::MinimumExpanding</enum>
              </property>
-             <property name="sizeHint" stdset="0" >
+             <property name="sizeHint" stdset="0">
               <size>
                <width>272</width>
                <height>0</height>
@@ -354,67 +415,67 @@
           </layout>
          </item>
          <item>
-          <layout class="QVBoxLayout" name="verticalLayout_3" >
+          <layout class="QVBoxLayout" name="verticalLayout_3">
            <item>
-            <widget class="QGroupBox" name="groupBox" >
-             <property name="font" >
+            <widget class="QGroupBox" name="groupBox">
+             <property name="font">
               <font>
                <weight>50</weight>
                <bold>false</bold>
               </font>
              </property>
-             <property name="title" >
+             <property name="title">
               <string>Optical Margins</string>
              </property>
-             <layout class="QFormLayout" name="formLayout" >
-              <property name="fieldGrowthPolicy" >
+             <layout class="QFormLayout" name="formLayout">
+              <property name="fieldGrowthPolicy">
                <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
               </property>
-              <item row="4" column="1" >
-               <layout class="QHBoxLayout" name="horizontalLayout_4" >
-                <item>
-                 <widget class="QPushButton" name="optMarginDefaultButton" >
-                  <property name="text" >
+              <item row="4" column="1">
+               <layout class="QHBoxLayout" name="horizontalLayout_4">
+                <item>
+                 <widget class="QPushButton" name="optMarginDefaultButton">
+                  <property name="text">
                    <string>Reset to Default</string>
                   </property>
                  </widget>
                 </item>
                 <item>
-                 <widget class="QPushButton" name="optMarginParentButton" >
-                  <property name="text" >
+                 <widget class="QPushButton" name="optMarginParentButton">
+                  <property name="text">
                    <string>Use Parent Value</string>
                   </property>
                  </widget>
                 </item>
                </layout>
               </item>
-              <item row="0" column="1" >
-               <widget class="SMRadioButton" name="optMarginRadioNone" >
-                <property name="text" >
+              <item row="0" column="1">
+               <widget class="SMRadioButton" name="optMarginRadioNone">
+                <property name="text">
                  <string>None</string>
                 </property>
-                <property name="checked" >
+                <property name="checked">
                  <bool>true</bool>
                 </property>
                </widget>
               </item>
-              <item row="1" column="1" >
-               <widget class="SMRadioButton" name="optMarginRadioBoth" >
-                <property name="text" >
+              <item row="1" column="1">
+               <widget class="SMRadioButton" name="optMarginRadioBoth">
+                <property name="text">
                  <string>Both Sides</string>
                 </property>
                </widget>
               </item>
-              <item row="2" column="1" >
-               <widget class="SMRadioButton" name="optMarginRadioLeft" >
-                <property name="text" >
+              <item row="2" column="1">
+               <widget class="SMRadioButton" name="optMarginRadioLeft">
+                <property name="text">
                  <string>Left Only</string>
                 </property>
                </widget>
               </item>
-              <item row="3" column="1" >
-               <widget class="SMRadioButton" name="optMarginRadioRight" >
-                <property name="text" >
+              <item row="3" column="1">
+               <widget class="SMRadioButton" name="optMarginRadioRight">
+                <property name="text">
                  <string>Right Only</string>
                 </property>
                </widget>
@@ -423,56 +484,56 @@
             </widget>
            </item>
            <item>
-            <widget class="QGroupBox" name="groupBox_2" >
-             <property name="enabled" >
+            <widget class="QGroupBox" name="groupBox_2">
+             <property name="enabled">
               <bool>true</bool>
              </property>
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="minimumSize" >
+             <property name="minimumSize">
               <size>
                <width>0</width>
                <height>163</height>
               </size>
              </property>
-             <property name="title" >
+             <property name="title">
               <string>Advanced Settings</string>
              </property>
-             <layout class="QGridLayout" name="gridLayout" >
-              <item row="0" column="0" >
-               <layout class="QHBoxLayout" name="horizontalLayout" >
-                <property name="sizeConstraint" >
+             <layout class="QGridLayout" name="gridLayout">
+              <item row="0" column="0">
+               <layout class="QHBoxLayout" name="horizontalLayout">
+                <property name="sizeConstraint">
                  <enum>QLayout::SetDefaultConstraint</enum>
                 </property>
-                <property name="topMargin" >
+                <property name="topMargin">
                  <number>0</number>
                 </property>
-                <property name="bottomMargin" >
+                <property name="bottomMargin">
                  <number>0</number>
                 </property>
                 <item>
-                 <widget class="QLabel" name="minSpaceLabel" >
-                  <property name="text" >
+                 <widget class="QLabel" name="minSpaceLabel">
+                  <property name="text">
                    <string>TextLabel</string>
                   </property>
-                  <property name="buddy" >
+                  <property name="buddy">
                    <cstring>minSpaceSpin</cstring>
                   </property>
                  </widget>
                 </item>
                 <item>
-                 <widget class="SMScrSpinBox" name="minSpaceSpin" >
-                  <property name="minimumSize" >
+                 <widget class="SMScrSpinBox" name="minSpaceSpin">
+                  <property name="minimumSize">
                    <size>
                     <width>0</width>
                     <height>32</height>
                    </size>
                   </property>
-                  <property name="baseSize" >
+                  <property name="baseSize">
                    <size>
                     <width>0</width>
                     <height>0</height>
@@ -481,11 +542,11 @@
                  </widget>
                 </item>
                 <item>
-                 <spacer name="horizontalSpacer" >
-                  <property name="orientation" >
+                 <spacer name="horizontalSpacer">
+                  <property name="orientation">
                    <enum>Qt::Horizontal</enum>
                   </property>
-                  <property name="sizeHint" stdset="0" >
+                  <property name="sizeHint" stdset="0">
                    <size>
                     <width>40</width>
                     <height>20</height>
@@ -495,30 +556,30 @@
                 </item>
                </layout>
               </item>
-              <item row="1" column="0" >
-               <widget class="QLabel" name="glyphExtensionLabel" >
-                <property name="text" >
+              <item row="1" column="0">
+               <widget class="QLabel" name="glyphExtensionLabel">
+                <property name="text">
                  <string>TextLabel</string>
                 </property>
                </widget>
               </item>
-              <item row="2" column="0" >
-               <layout class="QHBoxLayout" name="horizontalLayout_6" >
-                <item>
-                 <layout class="QHBoxLayout" name="horizontalLayout_2" >
+              <item row="2" column="0">
+               <layout class="QHBoxLayout" name="horizontalLayout_6">
+                <item>
+                 <layout class="QHBoxLayout" name="horizontalLayout_2">
                   <item>
-                   <widget class="QLabel" name="minGlyphExtLabel" >
-                    <property name="text" >
+                   <widget class="QLabel" name="minGlyphExtLabel">
+                    <property name="text">
                      <string>TextLabel</string>
                     </property>
-                    <property name="buddy" >
+                    <property name="buddy">
                      <cstring>minGlyphExtSpin</cstring>
                     </property>
                    </widget>
                   </item>
                   <item>
-                   <widget class="SMScrSpinBox" name="minGlyphExtSpin" >
-                    <property name="minimumSize" >
+                   <widget class="SMScrSpinBox" name="minGlyphExtSpin">
+                    <property name="minimumSize">
                      <size>
                       <width>0</width>
                       <height>32</height>
@@ -529,20 +590,20 @@
                  </layout>
                 </item>
                 <item>
-                 <layout class="QHBoxLayout" name="horizontalLayout_3" >
+                 <layout class="QHBoxLayout" name="horizontalLayout_3">
                   <item>
-                   <widget class="QLabel" name="maxGlyphExtLabel" >
-                    <property name="text" >
+                   <widget class="QLabel" name="maxGlyphExtLabel">
+                    <property name="text">
                      <string>TextLabel</string>
                     </property>
-                    <property name="buddy" >
+                    <property name="buddy">
                      <cstring>maxGlyphExtSpin</cstring>
                     </property>
                    </widget>
                   </item>
                   <item>
-                   <widget class="SMScrSpinBox" name="maxGlyphExtSpin" >
-                    <property name="minimumSize" >
+                   <widget class="SMScrSpinBox" name="maxGlyphExtSpin">
+                    <property name="minimumSize">
                      <size>
                       <width>0</width>
                       <height>32</height>
@@ -559,13 +620,13 @@
            </item>
            <item>
             <spacer>
-             <property name="orientation" >
+             <property name="orientation">
               <enum>Qt::Vertical</enum>
              </property>
-             <property name="sizeType" >
+             <property name="sizeType">
               <enum>QSizePolicy::Expanding</enum>
              </property>
-             <property name="sizeHint" stdset="0" >
+             <property name="sizeHint" stdset="0">
               <size>
                <width>270</width>
                <height>16</height>
@@ -578,23 +639,23 @@
         </layout>
        </item>
        <item>
-        <widget class="QGroupBox" name="tabsBox" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
+        <widget class="QGroupBox" name="tabsBox">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="title" >
+         <property name="title">
           <string>Tabulators and Indentation</string>
          </property>
-         <layout class="QVBoxLayout" >
+         <layout class="QVBoxLayout">
           <item>
-           <layout class="QHBoxLayout" >
+           <layout class="QHBoxLayout">
             <item>
-             <widget class="SMTabruler" native="1" name="tabList_" >
-              <property name="sizePolicy" >
-               <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+             <widget class="SMTabruler" name="tabList_" native="true">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
                 <horstretch>0</horstretch>
                 <verstretch>0</verstretch>
                </sizepolicy>
@@ -603,10 +664,10 @@
             </item>
             <item>
              <spacer>
-              <property name="orientation" >
+              <property name="orientation">
                <enum>Qt::Horizontal</enum>
               </property>
-              <property name="sizeHint" stdset="0" >
+              <property name="sizeHint" stdset="0">
                <size>
                 <width>40</width>
                 <height>20</height>
@@ -620,11 +681,11 @@
         </widget>
        </item>
        <item>
-        <spacer name="verticalSpacer" >
-         <property name="orientation" >
+        <spacer name="verticalSpacer">
+         <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeHint" stdset="0" >
+         <property name="sizeHint" stdset="0">
           <size>
            <width>20</width>
            <height>0</height>
@@ -634,34 +695,34 @@
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="TabPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="TabPage">
+      <attribute name="title">
        <string>Ch&aracter Style</string>
       </attribute>
-      <layout class="QVBoxLayout" >
-       <property name="spacing" >
+      <layout class="QVBoxLayout">
+       <property name="spacing">
         <number>5</number>
        </property>
-       <property name="margin" >
+       <property name="margin">
         <number>0</number>
        </property>
        <item>
-        <widget class="QFrame" name="characterBox" >
-         <property name="enabled" >
+        <widget class="QFrame" name="characterBox">
+         <property name="enabled">
           <bool>true</bool>
          </property>
-         <property name="frameShape" >
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Plain</enum>
          </property>
-         <property name="lineWidth" >
+         <property name="lineWidth">
           <number>0</number>
          </property>
-         <layout class="QGridLayout" >
-          <item row="0" column="0" >
-           <widget class="SMCStyleWidget" native="1" name="cpage" />
+         <layout class="QGridLayout">
+          <item row="0" column="0">
+           <widget class="SMCStyleWidget" name="cpage" native="true"/>
           </item>
          </layout>
         </widget>
@@ -672,7 +733,7 @@
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="5" margin="5" />
+ <layoutdefault spacing="5" margin="5"/>
  <customwidgets>
   <customwidget>
    <class>SMScComboBox</class>
@@ -712,6 +773,11 @@
    <extends>QRadioButton</extends>
    <header>ui/smradiobutton.h</header>
   </customwidget>
+  <customwidget>
+   <class>SMCheckBox</class>
+   <extends>QCheckBox</extends>
+   <header>ui/smcheckbox.h</header>
+  </customwidget>
  </customwidgets>
  <resources/>
  <connections/>

Modified: branches/ScribusOIF/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/smtextstyles.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/smtextstyles.cpp (original)
+++ branches/ScribusOIF/scribus/ui/smtextstyles.cpp Sat Oct  8 13:56:21 2011
@@ -516,6 +516,11 @@
 	connect(pwidget_->dropCapsBox, SIGNAL(toggled(bool)), this, SLOT(slotDropCap(bool)));
 	connect(pwidget_->dropCapLines_, SIGNAL(valueChanged(int)), this, SLOT(slotDropCapLines(int)));
 	connect(pwidget_->dropCapOffset_, SIGNAL(valueChanged(double)), this, SLOT(slotDropCapOffset()));
+
+	connect(pwidget_->keepLinesStart, SIGNAL(valueChanged(int)), this, SLOT(handleKeepLinesStart()));
+	connect(pwidget_->keepLinesEnd, SIGNAL(valueChanged(int)), this, SLOT(handleKeepLinesEnd()));
+	connect(pwidget_->keepTogether, SIGNAL(stateChanged(int)), this, SLOT(handleKeepTogether()));
+	connect(pwidget_->keepWithNext, SIGNAL(stateChanged(int)), this, SLOT(handleKeepWithNext()));
 
 	connect(pwidget_->tabList_, SIGNAL(tabsChanged()), this, SLOT(slotTabRuler()));
 	connect(pwidget_->tabList_, SIGNAL(mouseReleased()), this, SLOT(slotTabRuler()));
@@ -592,6 +597,11 @@
 	disconnect(pwidget_->parentCombo, SIGNAL(activated(const QString&)),
 			this, SLOT(slotParentChanged(const QString&)));
 
+	disconnect(pwidget_->keepLinesStart, SIGNAL(valueChanged(int)), this, SLOT(handleKeepLinesStart()));
+	disconnect(pwidget_->keepLinesEnd, SIGNAL(valueChanged(int)), this, SLOT(handleKeepLinesEnd()));
+	disconnect(pwidget_->keepTogether, SIGNAL(stateChanged(int)), this, SLOT(handleKeepTogether()));
+	disconnect(pwidget_->keepWithNext, SIGNAL(stateChanged(int)), this, SLOT(handleKeepWithNext()));
+
 	disconnect(pwidget_->tabList_, SIGNAL(tabsChanged()), this, SLOT(slotTabRuler()));
 	disconnect(pwidget_->tabList_->left_, SIGNAL(valueChanged(double)), this, SLOT(slotLeftIndent()));
 	disconnect(pwidget_->tabList_->right_, SIGNAL(valueChanged(double)), this, SLOT(slotRightIndent()));
@@ -902,6 +912,82 @@
 	}
 }
 
+void SMParagraphStyle::handleKeepLinesStart()
+{
+	if (pwidget_->keepLinesStart->useParentValue())
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->resetKeepLinesStart();
+	else 
+	{
+		int value = pwidget_->keepLinesStart->value();
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->setKeepLinesStart (value);
+	}
+	
+	if (!selectionIsDirty_)
+	{
+		selectionIsDirty_ = true;
+		emit selectionDirty();
+	}
+}
+
+void SMParagraphStyle::handleKeepLinesEnd()
+{
+	if (pwidget_->keepLinesEnd->useParentValue())
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->resetKeepLinesEnd();
+	else 
+	{
+		int value = pwidget_->keepLinesEnd->value();
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->setKeepLinesEnd (value);
+	}
+	
+	if (!selectionIsDirty_)
+	{
+		selectionIsDirty_ = true;
+		emit selectionDirty();
+	}
+}
+
+void SMParagraphStyle::handleKeepTogether()
+{
+	if (pwidget_->keepTogether->useParentValue())
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->resetKeepTogether();
+	else 
+	{
+		bool value = pwidget_->keepTogether->isChecked();
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->setKeepTogether (value);
+	}
+	
+	if (!selectionIsDirty_)
+	{
+		selectionIsDirty_ = true;
+		emit selectionDirty();
+	}
+}
+
+void SMParagraphStyle::handleKeepWithNext()
+{
+	if (pwidget_->keepWithNext->useParentValue())
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->resetKeepWithNext();
+	else 
+	{
+		bool value = pwidget_->keepWithNext->isChecked();
+		for (int i = 0; i < selection_.count(); ++i)
+			selection_[i]->setKeepWithNext (value);
+	}
+	
+	if (!selectionIsDirty_)
+	{
+		selectionIsDirty_ = true;
+		emit selectionDirty();
+	}
+}
+
 void SMParagraphStyle::slotTabRuler()
 {
 	if (pwidget_->tabList_->useParentTabs())

Modified: branches/ScribusOIF/scribus/ui/smtextstyles.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/scribus/ui/smtextstyles.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/smtextstyles.h (original)
+++ branches/ScribusOIF/scribus/ui/smtextstyles.h Sat Oct  8 13:56:21 2011
@@ -84,6 +84,10 @@
 	void slotMinSpace();
 	void slotMinGlyphExt();
 	void slotMaxGlyphExt();
+	void handleKeepLinesStart();
+	void handleKeepLinesEnd();
+	void handleKeepTogether();
+	void handleKeepWithNext();
 	void slotTabRuler();
 	void slotLeftIndent();
 	void slotRightIndent();

Modified: branches/ScribusOIF/win32/vc9/Scribus-build.vsprops
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/win32/vc9/Scribus-build.vsprops
==============================================================================
--- branches/ScribusOIF/win32/vc9/Scribus-build.vsprops (original)
+++ branches/ScribusOIF/win32/vc9/Scribus-build.vsprops Sat Oct  8 13:56:21 2011
@@ -138,7 +138,7 @@
 	/>
 	<UserMacro
 		Name="POPPLER_DIR"
-		Value="F:\Libraries-vc9\poppler-0.17.1"
+		Value="F:\Libraries-vc9\poppler-0.18.0"
 	/>
 	<UserMacro
 		Name="POPPLER_DEBUG_LIB"

Modified: branches/ScribusOIF/win32/vc9/Scribus.vcproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16893&path=/branches/ScribusOIF/win32/vc9/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc9/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc9/Scribus.vcproj Sat Oct  8 13:56:21 2011
@@ -1301,6 +1301,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertiespalette_content.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertiespalette_frame.cpp"
 				>
 			</File>
@@ -1353,11 +1357,19 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertywidget_image.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertywidget_line.cpp"
 				>
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\propertywidget_optmargins.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\propertywidget_orphans.cpp"
 				>
 			</File>
 			<File
@@ -5660,6 +5672,24 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertiespalette_content.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertiespalette_frame.h"
 				>
 				<FileConfiguration
@@ -5894,6 +5924,24 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertywidget_image.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertywidget_line.h"
 				>
 				<FileConfiguration
@@ -5913,6 +5961,24 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\propertywidget_optmargins.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\propertywidget_orphans.h"
 				>
 				<FileConfiguration
 					Name="Debug-cairo|Win32"
@@ -8305,10 +8371,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\scribus\ui\ui_propertiespalette_imagebase.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\scribus\ui\ui_propertiespalette_linebase.h"
 				>
 			</File>
@@ -8345,11 +8407,23 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\ui_propertywidget_imagebase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\..\scribus-1.5.x-svn\Scribus\scribus\ui\ui_propertywidget_imagebase.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\ui_propertywidget_linebase.h"
 				>
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\ui_propertywidget_optmarginsbase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\ui_propertywidget_orphansbase.h"
 				>
 			</File>
 			<File
@@ -9146,6 +9220,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\moc_propertiespalette_content.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\moc_propertiespalette_frame.cpp"
 				>
 			</File>
@@ -9198,11 +9276,19 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\moc_propertywidget_image.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\moc_propertywidget_line.cpp"
 				>
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\moc_propertywidget_optmargins.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\moc_propertywidget_orphans.cpp"
 				>
 			</File>
 			<File
@@ -9851,11 +9937,19 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\propertywidget_imagebase.ui"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\propertywidget_linebase.ui"
 				>
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\propertywidget_optmarginsbase.ui"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\propertywidget_orphansbase.ui"
 				>
 			</File>
 			<File




More information about the scribus-commit mailing list