r23282 by craig - #15551: Content palette with text and image properties (ale)

scribus-commit scribus-commit at lists.scribus.net
Mon Oct 28 06:55:42 UTC 2019


Author: craig
Date: Mon Oct 28 06:55:42 2019
New Revision: 23282

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23282
Log:
#15551: Content palette with text and image properties (ale)

Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/canvasmode_imageimport.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/fonts/scface.cpp
    trunk/Scribus/scribus/fonts/scface.h
    trunk/Scribus/scribus/gtaction.cpp
    trunk/Scribus/scribus/gtgettext.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
    trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp
    trunk/Scribus/scribus/plugins/scripter/api_page.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusstructs.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/contextmenu.cpp
    trunk/Scribus/scribus/ui/outlinepalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette.h
    trunk/Scribus/scribus/util_file.cpp
    trunk/Scribus/scribus/util_formats.cpp
    trunk/Scribus/scribus/util_math.cpp

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Mon Oct 28 06:55:42 2019
@@ -338,6 +338,7 @@
 	ui/colorlistbox.h
 	ui/colorlistmodel.h
 	ui/colorsandfills.h
+	ui/contentpalette.h
 	ui/contextmenu.h
 	ui/cpalette.h
 	ui/cupsoptions.h
@@ -545,7 +546,6 @@
 	ui/tabmanager.h
 	ui/tabpdfoptions.h
 	ui/tabruler.h
-	ui/textpalette.h
 	ui/transformdialog.h
 	ui/transparencypalette.h
 	tt/simpletreemodel/treemodel.h
@@ -841,6 +841,7 @@
 	ui/colorlistbox.cpp
 	ui/colorlistmodel.cpp
 	ui/colorsandfills.cpp
+	ui/contentpalette.cpp
 	ui/contextmenu.cpp
 	ui/cpalette.cpp
 	ui/cupsoptions.cpp
@@ -1047,7 +1048,6 @@
 	ui/tabmanager.cpp
 	ui/tabpdfoptions.cpp
 	ui/tabruler.cpp
-	ui/textpalette.cpp
 	ui/transformdialog.cpp
 	ui/transparencypalette.cpp
 	tt/simpletreemodel/treeitem.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp	(original)
+++ trunk/Scribus/scribus/actionmanager.cpp	Mon Oct 28 06:55:42 2019
@@ -789,7 +789,7 @@
 	//Tool menu
 	name = "toolsProperties";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
-	name = "toolsText";
+	name="toolsContent";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name = "toolsOutline";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
@@ -897,7 +897,7 @@
 #endif
 	//Set the applicaton wide palette shortcuts
 	(*scrActions)["toolsProperties"]->setShortcutContext(Qt::ApplicationShortcut);
-	(*scrActions)["toolsText"]->setShortcutContext(Qt::ApplicationShortcut);
+	(*scrActions)["toolsContent"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsScrapbook"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsLayers"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsPages"]->setShortcutContext(Qt::ApplicationShortcut);
@@ -911,7 +911,7 @@
 
 
 	(*scrActions)["toolsProperties"]->setToggleAction(true);
-	(*scrActions)["toolsText"]->setToggleAction(true);
+	(*scrActions)["toolsContent"]->setToggleAction(true);
 	(*scrActions)["toolsOutline"]->setToggleAction(true);
 	(*scrActions)["toolsScrapbook"]->setToggleAction(true);
 	(*scrActions)["toolsLayers"]->setToggleAction(true);
@@ -1679,7 +1679,7 @@
 
 	//Tool menu
 	(*scrActions)["toolsProperties"]->setTexts( tr("&Properties"));
-	(*scrActions)["toolsText"]->setTexts( tr("Text Properties"));
+	(*scrActions)["toolsContent"]->setTexts( tr("Content Properties"));
 	(*scrActions)["toolsOutline"]->setTexts( tr("&Outline", "Document Outline Palette"));
 	(*scrActions)["toolsScrapbook"]->setTexts( tr("&Scrapbook"));
 	(*scrActions)["toolsLayers"]->setTexts( tr("&Layers"));
@@ -1947,7 +1947,7 @@
 
 	//Tool menu
 	defKeys.insert("toolsProperties", Qt::Key_F2);
-	defKeys.insert("toolsText", Qt::Key_F3);
+	defKeys.insert("toolsContent", Qt::Key_F3);
 	defKeys.insert("toolsLayers", Qt::Key_F6);
 
 	//toolbar only items
@@ -2354,7 +2354,7 @@
 		<< "windowsCascade"
 		<< "windowsTile"
 		<< "toolsProperties"
-		<< "toolsText"
+		<< "toolsContent"
 		<< "toolsOutline"
 		<< "toolsScrapbook"
 		<< "toolsLayers"

Modified: trunk/Scribus/scribus/canvasmode_imageimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/canvasmode_imageimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.cpp	Mon Oct 28 06:55:42 2019
@@ -35,8 +35,7 @@
 #include "scribusdoc.h"
 #include "scribusview.h"
 #include "selection.h"
-#include "ui/propertiespalette.h"
-#include "ui/propertiespalette_image.h"
+#include "ui/contentpalette.h"
 
 CanvasMode_ImageImport::CanvasMode_ImageImport(ScribusView *view) : CanvasMode(view), m_ScMW(view->m_ScMW)
 {
@@ -238,7 +237,7 @@
 	m_doc->loadPict(fileName, currItem, false, true);
 	// Call to showScaleAndOffset() is now very likely unnecessary
 	// due to mecanisms used to update properties in PP in 1.5.x+
-	//m_ScMW->propertiesPalette->imagePal->showScaleAndOffset(currItem->imageXScale(), currItem->imageYScale(), currItem->imageXOffset(), currItem->imageYOffset());
+	// m_ScMW->contentPalette->update(currItem->asImageFrame());
 	m_ScMW->repaint();
 	qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 	m_view->DrawNew();

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Mon Oct 28 06:55:42 2019
@@ -46,7 +46,6 @@
 #include "pageitem_arc.h"
 #include "pageitem_line.h"
 #include "pageitem_regularpolygon.h"
-#include "pageitem_textframe.h"
 #include "plugins/formatidlist.h"
 #include "prefscontext.h"
 #include "prefsfile.h"

Modified: trunk/Scribus/scribus/fonts/scface.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/fonts/scface.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scface.cpp	(original)
+++ trunk/Scribus/scribus/fonts/scface.cpp	Mon Oct 28 06:55:42 2019
@@ -17,24 +17,14 @@
 #include "fonts/scface.h"
 #include "text/storytext.h"
 
-static const QString NONE_LITERAL("(None)");
-
-ScFace::ScFaceData::ScFaceData() :
-	fontFile(NONE_LITERAL),
-	status(ScFace::NULLFACE),
-	typeCode(ScFace::UNKNOWN_TYPE),
-	formatCode(ScFace::UNKNOWN_FORMAT),
-	m_cachedStatus(ScFace::UNKNOWN)
-{
-}
+ScFace::ScFaceData::ScFaceData() = default;
 
 ScFace::ScFaceData::~ScFaceData()
 {
-	if (m_hbFont)
-	{
-		hb_font_destroy(reinterpret_cast<hb_font_t*>(m_hbFont));
-		m_hbFont = nullptr;
-	}
+	if (!m_hbFont)
+		return;
+	hb_font_destroy(reinterpret_cast<hb_font_t*>(m_hbFont));
+	m_hbFont = nullptr;
 }
 
 
@@ -113,7 +103,7 @@
 
 GlyphMetrics ScFace::ScFaceData::glyphBBox(gid_type gl, qreal sz) const
 {
-	GlyphMetrics res;
+	GlyphMetrics res{};
 	if (gl >= CONTROL_GLYPHS)
 	{
 		res.width   = glyphWidth(gl, sz);

Modified: trunk/Scribus/scribus/fonts/scface.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/fonts/scface.h
==============================================================================
--- trunk/Scribus/scribus/fonts/scface.h	(original)
+++ trunk/Scribus/scribus/fonts/scface.h	Mon Oct 28 06:55:42 2019
@@ -118,7 +118,7 @@
 	mutable int usage {0};
 
 		QString scName;
-		QString fontFile;
+		QString fontFile {"(None)"};
 		int     faceIndex {-1};
 		QString psName;
 		QString family;
@@ -128,9 +128,9 @@
 
 		QString forDocument;
 
-		mutable ScFace::Status status;
-		ScFace::FontType typeCode;
-		ScFace::FontFormat formatCode;
+		mutable ScFace::Status status {ScFace::NULLFACE};
+		ScFace::FontType typeCode {ScFace::UNKNOWN_TYPE};
+		ScFace::FontFormat formatCode {ScFace::UNKNOWN_FORMAT};
 
 		bool usable {false};
 		bool embedPs {false};
@@ -148,7 +148,7 @@
 	protected:
 
 		friend class ScFace;
-		Status m_cachedStatus;
+		Status m_cachedStatus {ScFace::UNKNOWN};
 
 		// caches
 		mutable QHash<gid_type, qreal>     m_glyphWidth;

Modified: trunk/Scribus/scribus/gtaction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/gtaction.cpp
==============================================================================
--- trunk/Scribus/scribus/gtaction.cpp	(original)
+++ trunk/Scribus/scribus/gtaction.cpp	Mon Oct 28 06:55:42 2019
@@ -49,8 +49,7 @@
 #include "undomanager.h"
 #include "util.h"
 #include "util_text.h"
-#include "ui/textpalette.h"
-#include "ui/propertiespalette_text.h"
+#include "ui/contentpalette.h"
 #include "ui/missing.h"
 
 gtAction::gtAction(bool append, PageItem* pageitem) :
@@ -536,7 +535,7 @@
 	tmp.create(vg);
 	m_textFrame->doc()->redefineStyles(tmp, false);
 	
-	m_ScMW->textPalette->textPal->updateParagraphStyles();
+	m_ScMW->contentPalette->updateTextStyles();
 }
 
 void gtAction:: setCharStyleAttributes(gtFont *font, CharStyle& style)
@@ -847,7 +846,7 @@
 			ScColor tmp;
 			tmp.fromQColor(c);
 			m_textFrame->doc()->PageColors.insert("FromGetText"+c.name(), tmp);
-			m_ScMW->textPalette->updateColorList();
+			m_ScMW->contentPalette->updateColorList();
 			ret = "FromGetText"+c.name();
 		}
 	}

Modified: trunk/Scribus/scribus/gtgettext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/gtgettext.cpp
==============================================================================
--- trunk/Scribus/scribus/gtgettext.cpp	(original)
+++ trunk/Scribus/scribus/gtgettext.cpp	Mon Oct 28 06:55:42 2019
@@ -153,7 +153,7 @@
 QStringList gtGetText::getSupportedTypes()
 {
 	QStringList result;
-	for (uint i = 0; i < m_importers.size(); ++i)
+	for (int i = 0; i < m_importers.size(); ++i)
 	{
 		if (m_importers[i].fileEndings.count() != 0)
 		{
@@ -170,7 +170,7 @@
 ImportSetup gtGetText::run()
 {
 	// Initialize a filters list.
-	QString filters = "";
+	QString filters;
 	// Create a string for the "All supported files filter". Start with the label then loop through
 	// the importers vector and add all of the file extensions supported.
 	QString allSupported = QObject::tr("All Supported Formats") + " (";

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Mon Oct 28 06:55:42 2019
@@ -75,7 +75,7 @@
 #include "text/storytext.h"
 #include "ui/guidemanager.h"
 #include "ui/propertiespalette.h"
-#include "ui/textpalette.h"
+#include "ui/contentpalette.h"
 #include "undomanager.h"
 #include "undostate.h"
 #include "units.h"
@@ -9578,7 +9578,7 @@
 				efVal += pixm.imgInfo.duotoneColors[cc].Name+"\n";
 			}
 			m_Doc->scMW()->propertiesPalette->updateColorList();
-			m_Doc->scMW()->textPalette->updateColorList();
+			m_Doc->scMW()->contentPalette->updateColorList();
 			struct ImageEffect ef;
 			if (pixm.imgInfo.duotoneColors.count() == 1)
 			{

Modified: trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/colorwheel/cwdialog.cpp	Mon Oct 28 06:55:42 2019
@@ -19,7 +19,7 @@
 #include "ui/cmykfw.h"
 #include "ui/colorlistbox.h"
 #include "ui/propertiespalette.h"
-#include "ui/textpalette.h"
+#include "ui/contentpalette.h"
 #include "util_color.h"
 
 
@@ -343,7 +343,7 @@
 		return;
 	}
 	m_Doc->scMW()->propertiesPalette->updateColorList();
-	m_Doc->scMW()->textPalette->updateColorList();
+	m_Doc->scMW()->contentPalette->updateColorList();
 	accept();
 }
 
@@ -354,7 +354,7 @@
 		m_Doc->PageColors[it.key()] = it.value();
 	}
 	m_Doc->scMW()->propertiesPalette->updateColorList();
-	m_Doc->scMW()->textPalette->updateColorList();
+	m_Doc->scMW()->contentPalette->updateColorList();
 	accept();
 }
 

Modified: trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp	Mon Oct 28 06:55:42 2019
@@ -10,8 +10,7 @@
 #include "undomanager.h"
 #include "sctextstream.h"
 #include "scribusview.h"
-#include "ui/propertiespalette.h"
-#include "ui/propertiespalette_image.h"
+#include "ui/contentpalette.h"
 
 ImageAPI::ImageAPI(PageItem_ImageFrame* im) : ItemAPI(im)
 {
@@ -205,8 +204,7 @@
 	// Force the braindead app to notice the changes
 
 	//FIXME emit or something so we dont need this
-	ScCore->primaryMainWindow()->propertiesPalette->imagePal->showScaleAndOffset(item->imageXScale(), item->imageYScale(), item->imageXOffset(), item->imageYOffset());
-	item->adjustPictScale();
+	ScCore->primaryMainWindow()->contentPalette->update(item->asImageFrame());
 	//ScCore->primaryMainWindow()->view->adjustPictScale(item);
 
 	item->update();

Modified: trunk/Scribus/scribus/plugins/scripter/api_page.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/plugins/scripter/api_page.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_page.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scripter/api_page.cpp	Mon Oct 28 06:55:42 2019
@@ -12,7 +12,6 @@
 #include "../formatidlist.h"
 #include "loadsaveplugin.h"
 #include "ui/propertiespalette.h"
-#include "ui/propertiespalette_text.h"
 #include "ui/propertiespalette_line.h"
 #include "ui/textpalette.h"
 #include "scribuscore.h"

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	Mon Oct 28 06:55:42 2019
@@ -12,7 +12,6 @@
 #include "sctextstream.h"
 #include "selection.h"
 #include "ui/propertiespalette.h" //CB argh.. noooooooooooooooooooooooooooooooooooo FIXME see other FIXME
-#include "ui/propertiespalette_image.h"
 #include "undomanager.h"
 
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	Mon Oct 28 06:55:42 2019
@@ -23,12 +23,12 @@
 #include "ui/marksmanager.h"
 #include "ui/notesstyleseditor.h"
 #include "ui/propertiespalette.h" //TODO Move the calls to this to a signal
+#include "ui/contentpalette.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
 #include "ui/outlinepalette.h" //TODO Move the calls to this to a signal
 #include "ui/scmessagebox.h"
 #include "ui/scmwmenumanager.h"
-#include "ui/textpalette.h"
 #include "pconsole.h"
 #include "scraction.h"
 #include "scribuscore.h"
@@ -161,7 +161,7 @@
 		return;
 
 	mainWin->propertiesPalette->setDoc(mainWin->doc);
-	mainWin->textPalette->setDoc(mainWin->doc);
+	mainWin->contentPalette->setDoc(mainWin->doc);
 	mainWin->marksManager->setDoc(mainWin->doc);
 	mainWin->nsEditor->setDoc(mainWin->doc);
 	mainWin->layerPalette->setDoc(mainWin->doc);
@@ -247,7 +247,7 @@
 	if (!inMainInterpreter)
 	{
 		ScCore->primaryMainWindow()->propertiesPalette->unsetDoc();
-		ScCore->primaryMainWindow()->textPalette->unsetDoc();
+		ScCore->primaryMainWindow()->contentPalette->unsetDoc();
 		ScCore->primaryMainWindow()->pagePalette->setView(nullptr);
 		ScCore->primaryMainWindow()->setScriptRunning(true);
 		qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -392,7 +392,7 @@
 	disableMainWindowMenu();
 
 	ScCore->primaryMainWindow()->propertiesPalette->unsetDoc();
-	ScCore->primaryMainWindow()->textPalette->unsetDoc();
+	ScCore->primaryMainWindow()->contentPalette->unsetDoc();
 	ScCore->primaryMainWindow()->pagePalette->setView(nullptr);
 	ScCore->primaryMainWindow()->setScriptRunning(true);
 	inValue = Script;

Modified: trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/svgimport.cpp	Mon Oct 28 06:55:42 2019
@@ -18,7 +18,6 @@
 #include "selection.h"
 #include "ui/propertiespalette.h"
 #include "ui/propertiespalette_line.h"
-#include "ui/propertiespalette_text.h"
 
 #include <QString>
 

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Oct 28 06:55:42 2019
@@ -223,11 +223,10 @@
 #include "ui/preview.h"
 #include "ui/printdialog.h"
 #include "ui/propertiespalette.h"
-#include "ui/propertiespalette_image.h"
 #include "ui/propertiespalette_line.h"
 #include "ui/propertiespalette_shape.h"
-#include "ui/propertiespalette_text.h"
 #include "ui/propertiespalette_xyz.h"
+#include "ui/contentpalette.h"
 #include "ui/query.h"
 #include "ui/recoverdialog.h"
 #include "ui/replacecolors.h"
@@ -249,7 +248,6 @@
 #include "ui/stylemanager.h"
 #include "ui/symbolpalette.h"
 #include "ui/tabmanager.h"
-#include "ui/textpalette.h"
 #include "ui/transformdialog.h"
 #include "ui/transparencypalette.h"
 #include "ui/viewtoolbar.h"
@@ -423,7 +421,7 @@
 	ToggleTips();
 	ToggleMouseTips();
 	propertiesPalette->setFontSize();
-	textPalette->setFontSize();
+	contentPalette->setFontSize();
 	if (scrActions["SaveAsDocumentTemplate"])
 		scrActions["SaveAsDocumentTemplate"]->setEnabled(false);
 
@@ -612,12 +610,12 @@
 	emit UpdateRequest(reqDefFontListUpdate);
 	propertiesPalette->installEventFilter(this);
 
-	textPalette = new TextPalette(this);
-	textPalette->setMainWindow(this);
-	connect( scrActions["toolsText"], SIGNAL(toggled(bool)) , textPalette, SLOT(setPaletteShown(bool)));
-	connect( textPalette, SIGNAL(paletteShown(bool)), scrActions["toolsText"], SLOT(setChecked(bool)));
-	emit UpdateRequest(reqDefFontListUpdate);
-	textPalette->installEventFilter(this);
+	contentPalette = new ContentPalette(this);
+	contentPalette->setMainWindow(this);
+	connect( scrActions["toolsContent"], &QAction::toggled, contentPalette, &ContentPalette::setPaletteShown);
+	connect( contentPalette, &ContentPalette::paletteShown, scrActions["toolsContent"], &QAction::setChecked);
+	contentPalette->installEventFilter(this);
+
 	nodePalette = new NodePalette(this);
 	nodePalette->installEventFilter(this);
 	layerPalette = new LayerPalette(this);
@@ -1204,8 +1202,8 @@
 	scrMenuMgr->addMenuItemString("windowsCascade", "Windows");
 	scrMenuMgr->addMenuItemString("windowsTile", "Windows");
 	scrMenuMgr->addMenuItemString("SEPARATOR", "Windows");
+	scrMenuMgr->addMenuItemString("toolsContent", "Windows");
 	scrMenuMgr->addMenuItemString("toolsProperties", "Windows");
-	scrMenuMgr->addMenuItemString("toolsText", "Windows");
 	scrMenuMgr->addMenuItemString("toolsActionHistory", "Windows");
 	scrMenuMgr->addMenuItemString("toolsAlignDistribute", "Windows");
 	scrMenuMgr->addMenuItemString("SEPARATOR", "Windows");
@@ -1456,7 +1454,7 @@
 }
 
 
-//AV to be replaced with Selection::update and listener in textPalette
+//AV to be replaced with Selection::update and listener in contentPalette
 void ScribusMainWindow::setTBvals(PageItem *currItem)
 {
 	scrActions["editMark"]->setEnabled(false);
@@ -1487,7 +1485,7 @@
 		doc->currentStyle.charStyle().setStyle(item->currentCharStyle());
 	emit TextStyle(doc->currentStyle);
 	// to go: (av)
-	textPalette->textPal->updateStyle(doc->currentStyle);
+	contentPalette->update(doc->currentStyle);
 	//check if mark in cursor place and enable editMark action
 	if (doc->appMode == modeEdit && item->itemText.cursorPosition() < item->itemText.length())
 	{
@@ -1991,7 +1989,7 @@
 	}
 
 	propertiesPalette->hide();
-	textPalette->hide();
+	contentPalette->hide();
 	outlinePalette->hide();
 	scrapbookPalette->hide();
 	bookmarkPalette->hide();
@@ -2662,7 +2660,7 @@
 {
 	updateActiveWindowCaption(doc->documentFileName());
 	propertiesPalette->setDoc(doc);
-	textPalette->setDoc(doc);
+	contentPalette->setDoc(doc);
 	marksManager->setDoc(doc);
 	nsEditor->setDoc(doc);
 	pagePalette->setView(view);
@@ -2704,7 +2702,7 @@
 	//Update palettes
 	updateActiveWindowCaption(doc->documentFileName());
 	propertiesPalette->setDoc(doc);
-	textPalette->setDoc(doc);
+	contentPalette->setDoc(doc);
 	nsEditor->setDoc(doc);
 
 	marksManager->setDoc(doc);
@@ -2737,7 +2735,7 @@
 	connect(view, SIGNAL(HaveSel()), this, SLOT(HaveNewSel()), Qt::UniqueConnection);
 	connect(view, SIGNAL(DocChanged()), this, SLOT(slotDocCh()), Qt::UniqueConnection);
 	connect(view, SIGNAL(MousePos(double,double)), this, SLOT(setStatusBarMousePosition(double,double)), Qt::UniqueConnection);
-	connect(view, SIGNAL(ItemCharStyle(const CharStyle&)), textPalette->textPal, SLOT(updateCharStyle(const CharStyle&)), Qt::UniqueConnection);
+	connect(view, SIGNAL(ItemCharStyle(const CharStyle&)), contentPalette, SLOT(update(const CharStyle&)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextEffects(int)), this, SLOT(setStyleEffects(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextAlign(int)), this, SLOT(setAlignmentValue(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(LoadPic()), this, SLOT(slotGetContent()), Qt::UniqueConnection);
@@ -2797,7 +2795,7 @@
 			doc->currentStyle = curStyle;
 			emit TextStyle(doc->currentStyle);
 			// to go: (av)
-			textPalette->textPal->updateStyle(doc->currentStyle);
+			contentPalette->update(doc->currentStyle);
 			setStyleEffects(doc->currentStyle.charStyle().effects());
 		}
 		break;
@@ -2818,11 +2816,9 @@
 			const ParagraphStyle& curStyle = currItem->itemText.defaultStyle();
 			doc->currentStyle.setContext(curStyle.context());
 			doc->currentStyle = curStyle;
-			textPalette->textPal->showParStyle(doc->currentStyle.parent());
-			textPalette->textPal->showCharStyle(doc->currentStyle.charStyle().parent());
 			emit TextStyle(doc->currentStyle);
 			// to go: (av)
-			textPalette->textPal->updateStyle(doc->currentStyle);
+			contentPalette->update(doc->currentStyle);
 			setStyleEffects(doc->currentStyle.charStyle().effects());
 		}
 		break;
@@ -3411,7 +3407,7 @@
 				AddBookMark(ite);
 		}
 		propertiesPalette->updateColorList();
-		textPalette->updateColorList();
+		contentPalette->updateColorList();
 		emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate | reqStyleComboDocUpdate | reqInlinePalUpdate);
 		symbolPalette->updateSymbolList();
 		slotDocCh();
@@ -3947,7 +3943,7 @@
 		if (outlinePalette->isVisible())
 			outlinePalette->BuildTree();
 		propertiesPalette->updateColorList();
-		textPalette->updateColorList();
+		contentPalette->updateColorList();
 		emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate | reqStyleComboDocUpdate | reqInlinePalUpdate);
 		symbolPalette->updateSymbolList();
 	}
@@ -3963,7 +3959,7 @@
 	if (outlinePalette->isVisible())
 		outlinePalette->BuildTree();
 	propertiesPalette->updateColorList();
-	textPalette->updateColorList();
+	contentPalette->updateColorList();
 	emit UpdateRequest(reqArrowStylesUpdate | reqLineStylesUpdate | reqStyleComboDocUpdate | reqInlinePalUpdate);
 	symbolPalette->updateSymbolList();
 }
@@ -4300,7 +4296,7 @@
 		doc->CloseCMSProfiles();
 	//<<Palettes
 	propertiesPalette->unsetDoc();
-	textPalette->unsetDoc();
+	contentPalette->unsetDoc();
 	inlinePalette->unsetDoc();
 	symbolPalette->unsetDoc();
 	pagePalette->setView(nullptr);
@@ -4794,8 +4790,8 @@
 			m_styleManager->setDoc(doc);
 			propertiesPalette->unsetDoc();
 			propertiesPalette->setDoc(doc);
-			textPalette->unsetDoc();
-			textPalette->setDoc(doc);
+			contentPalette->unsetDoc();
+			contentPalette->setDoc(doc);
 			marksManager->setDoc(doc);
 			nsEditor->setDoc(doc);
 			symbolPalette->unsetDoc();
@@ -4875,8 +4871,8 @@
 				m_styleManager->setDoc(doc);
 				propertiesPalette->unsetDoc();
 				propertiesPalette->setDoc(doc);
-				textPalette->unsetDoc();
-				textPalette->setDoc(doc);
+				contentPalette->unsetDoc();
+				contentPalette->setDoc(doc);
 				marksManager->setDoc(doc);
 				nsEditor->setDoc(doc);
 				symbolPalette->unsetDoc();
@@ -4966,8 +4962,8 @@
 			m_styleManager->setDoc(doc);
 			propertiesPalette->unsetDoc();
 			propertiesPalette->setDoc(doc);
-			textPalette->unsetDoc();
-			textPalette->setDoc(doc);
+			contentPalette->unsetDoc();
+			contentPalette->setDoc(doc);
 			marksManager->setDoc(doc);
 			nsEditor->setDoc(doc);
 			symbolPalette->unsetDoc();
@@ -5592,8 +5588,8 @@
 		m_palettesStatus[PAL_ALL] = false;
 		if (m_palettesStatus[PAL_PROPERTIES])
 			propertiesPalette->show();
-		if (m_palettesStatus[PAL_TEXT])
-			textPalette->show();
+		if (m_palettesStatus[PAL_CONTENT])
+			contentPalette->show();
 		if (m_palettesStatus[PAL_OUTLINE])
 			outlinePalette->show();
 		if (m_palettesStatus[PAL_SCRAPBOOK])
@@ -5613,7 +5609,7 @@
 	else
 	{
 		m_palettesStatus[PAL_PROPERTIES] = propertiesPalette->isVisible();
-		m_palettesStatus[PAL_TEXT] = textPalette->isVisible();
+		m_palettesStatus[PAL_CONTENT] = contentPalette->isVisible();
 		m_palettesStatus[PAL_OUTLINE] = outlinePalette->isVisible();
 		m_palettesStatus[PAL_SCRAPBOOK] = scrapbookPalette->isVisible();
 		m_palettesStatus[PAL_LAYER] = layerPalette->isVisible();
@@ -5623,7 +5619,7 @@
 		m_palettesStatus[PAL_VERIFIER] = docCheckerPalette->isVisible();
 		m_palettesStatus[PAL_DOWNLOADS] = downloadsPalette->isVisible();
 		propertiesPalette->hide();
-		textPalette->hide();
+		contentPalette->hide();
 		outlinePalette->hide();
 		scrapbookPalette->hide();
 		bookmarkPalette->hide();
@@ -6341,7 +6337,7 @@
 				doc->itemSelection_SetFontSize(fs*10);
 		}
 	}
-	textPalette->textPal->showFontSize(fs*10);
+	contentPalette->updateTextFontSize(fs*10);
 }
 
 void ScribusMainWindow::setItemLanguage(const QString& language)
@@ -6350,7 +6346,7 @@
 	if (dia.exec())
 		doc->itemSelection_SetLanguage(language);
 
-	textPalette->textPal->showLanguage(language);
+	contentPalette->updateTextLanguage(language);
 }
 
 //CB-->Doc
@@ -6359,7 +6355,7 @@
 	if (!HaveDoc)
 		return;
 	doc->itemSelection_SetAlignment(i);
-	textPalette->textPal->showAlignment(i);
+	contentPalette->updateTextAlignment(i);
 	PageItem *currItem = doc->m_Selection->itemAt(0);
 	setTBvals(currItem);
 }
@@ -6369,7 +6365,7 @@
 	if (!HaveDoc)
 		return;
 	doc->itemSelection_SetDirection(i);
-	textPalette->textPal->showDirection(i);
+	contentPalette->updateTextDirection(i);
 	PageItem *currItem = doc->m_Selection->itemAt(0);
 	setTBvals(currItem);
 }
@@ -6394,7 +6390,7 @@
 
 void ScribusMainWindow::setAlignmentValue(int i)
 {
-	textPalette->textPal->showAlignment(i);
+	contentPalette->updateTextAlignment(i);
 	QString alignment[] = {"Left", "Center", "Right", "Block", "Forced"};
 	for (int j=0; j<5; ++j)
 	{
@@ -6406,7 +6402,7 @@
 
 void ScribusMainWindow::setDirectionValue(int i)
 {
-	textPalette->textPal->showDirection(i);
+	contentPalette->updateTextDirection(i);
 	QString direction[] = {"Left", "Right"};
 	for (int j=0; j<2; ++j)
 	{
@@ -6812,7 +6808,7 @@
 int ScribusMainWindow::ShowSubs()
 {
 	propertiesPalette->startup();
-	textPalette->startup();
+	contentPalette->startup();
 	outlinePalette->startup();
 	scrapbookPalette->startup();
 	bookmarkPalette->startup();
@@ -7479,7 +7475,7 @@
 	setCurrentComboItem(unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
 	view->unitChange();
 	propertiesPalette->unitChange();
-	textPalette->unitChange();
+	contentPalette->unitChange();
 	nodePalette->unitChange();
 	alignDistributePalette->unitChange();
 	guidePalette->setupPage();
@@ -7580,7 +7576,7 @@
 	view->DrawNew();
 	pagePalette->Rebuild();
 	propertiesPalette->updateColorList();
-	textPalette->updateColorList();
+	contentPalette->updateColorList();
 	symbolPalette->editingFinished();
 	layerPalette->setEnabled(true);
 	if (outlinePalette->isVisible())
@@ -7642,8 +7638,8 @@
 	pagePalette->Rebuild();
 	propertiesPalette->unsetItem();
 	propertiesPalette->updateColorList();
-	textPalette->unsetItem();
-	textPalette->updateColorList();
+	contentPalette->unsetItem();
+	contentPalette->updateColorList();
 	inlinePalette->editingFinished();
 	layerPalette->setEnabled(true);
 	if (outlinePalette->isVisible())
@@ -8105,7 +8101,7 @@
 		return;
 	doc->recalculateColors();
 	propertiesPalette->updateColorList();
-	textPalette->updateColorList();
+	contentPalette->updateColorList();
 }
 
 void ScribusMainWindow::ModifyAnnot()
@@ -8880,7 +8876,7 @@
 	qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 	view->DrawNew();
 	propertiesPalette->updateColorList();
-	textPalette->updateColorList();
+	contentPalette->updateColorList();
 	emit UpdateRequest(reqCmsOptionsUpdate);
 	currItem->emitAllToGUI();
 	qApp->restoreOverrideCursor();
@@ -9186,7 +9182,7 @@
 	doc->m_Selection->clear();
 	doc->m_Selection->delaySignalsOff();
 	propertiesPalette->updateColorList();
-	textPalette->updateColorList();
+	contentPalette->updateColorList();
 	symbolPalette->updateSymbolList();
 	emit UpdateRequest(reqColorsUpdate);
 	doc->minCanvasCoordinate = minSize;
@@ -9217,7 +9213,7 @@
 	m_undoManager->setUndoEnabled(false);
 	doc->itemSelection_convertItemsToSymbol(patternName);
 	propertiesPalette->updateColorList();
-	textPalette->updateColorList();
+	contentPalette->updateColorList();
 	symbolPalette->updateSymbolList();
 	emit UpdateRequest(reqColorsUpdate);
 	if (outlinePalette->isVisible())
@@ -9994,7 +9990,7 @@
 	undoPalette->setEnabled(!doc->drawAsPreview);
 	outlinePalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
 	propertiesPalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
-	textPalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
+	contentPalette->setEnabled(!(doc->drawAsPreview && !doc->editOnPreview));
 	scrMenuMgr->setMenuEnabled("Edit", !doc->drawAsPreview);
 	scrMenuMgr->setMenuEnabled("Item", !doc->drawAsPreview);
 	scrMenuMgr->setMenuEnabled("Insert", !doc->drawAsPreview);

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Mon Oct 28 06:55:42 2019
@@ -91,6 +91,7 @@
 class PageSelector;
 class PrefsContext;
 class PrefsManager;
+class ContentPalette;
 class PropertiesPalette;
 class ResourceManager;
 class ScMWMenuManager;
@@ -106,7 +107,6 @@
 class StoryEditor;
 class StyleManager;
 class SymbolPalette;
-class TextPalette;
 class TOCGenerator;
 class UndoManager;
 class UndoPalette;
@@ -231,7 +231,7 @@
 	GuideManager *guidePalette;
 	CharSelect *charPalette;
 	PropertiesPalette *propertiesPalette;
-	TextPalette *textPalette;
+	ContentPalette *contentPalette;
 	MarksManager *marksManager;
 	NotesStylesEditor *nsEditor;
 	NodePalette *nodePalette;

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h	(original)
+++ trunk/Scribus/scribus/scribusstructs.h	Mon Oct 28 06:55:42 2019
@@ -408,6 +408,7 @@
 	GS_MAX
 };
 
+//Always add new at the end, leave existing and deprecated items in the list
 enum
 {
 	PAL_ALL,
@@ -422,6 +423,7 @@
 	PAL_VERIFIER,
 	PAL_DOWNLOADS,
 	PAL_TEXT,
+	PAL_CONTENT,
 	PAL_MAX
 };
 

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Mon Oct 28 06:55:42 2019
@@ -114,9 +114,7 @@
 #include "ui/pageitemattributes.h"
 #include "ui/pageselector.h"
 #include "ui/propertiespalette.h"
-#include "ui/propertiespalette_image.h"
 #include "ui/propertiespalette_line.h"
-#include "ui/propertiespalette_text.h"
 #include "ui/rulermover.h"
 #include "ui/scrapbookpalette.h"
 #include "ui/storyeditor.h"

Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp	(original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp	Mon Oct 28 06:55:42 2019
@@ -543,29 +543,12 @@
 	}
 	if (selectedItemCount == 2 && m_doc->appMode != modeEdit)
 		addAction(m_ScMW->scrActions["itemWeld"]);
-//	{
-//		menuWeld->addAction(m_AP->scrActions["itemWeld17"]);
-//		menuWeld->addAction(m_AP->scrActions["itemWeld71"]);
-//		menuWeld->addAction(m_AP->scrActions["itemWeld13"]);
-//		menuWeld->addAction(m_AP->scrActions["itemWeld31"]);
-//		QAction *act = addMenu(menuWeld);
-//		act->setText( tr("Weld to last..."));
-//	}
 	//-->
 	
 	//<-- Add Properties
 	addSeparator();
+	addAction(m_ScMW->scrActions["toolsContent"]);

 	addAction(m_ScMW->scrActions["toolsProperties"]);
-	
-	bool containsTextFrame = false;
-	if (currItem->asTextFrame())
-		containsTextFrame = true;
-	if (m_doc->appMode == modeEditTable)
-		containsTextFrame = true;
-	if (!containsTextFrame && m_Sel.containsItemType(PageItem::TextFrame))
-		containsTextFrame = true;
-	if (containsTextFrame)
-		addAction(m_ScMW->scrActions["toolsText"]);
 	//-->
 
 }

Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp	Mon Oct 28 06:55:42 2019
@@ -32,12 +32,12 @@
 #include "layers.h"
 #include "outlinepalette.h"
 #include "propertiespalette.h"
+#include "contentpalette.h"
 #include "scpage.h"
 #include "scribus.h"
 #include "scribusdoc.h"
 #include "scribusview.h"
 #include "selection.h"
-#include "textpalette.h"
 #include "undomanager.h"
 #include "units.h"
 #include "util.h"
@@ -704,7 +704,7 @@
 					{
 						item->PageItemObject->setItemName(NameNew);
 						m_MainWindow->propertiesPalette->setCurrentItem(item->PageItemObject);
-						m_MainWindow->textPalette->setCurrentItem(item->PageItemObject);
+						m_MainWindow->contentPalette->setCurrentItem(item->PageItemObject);
 						currDoc->setModified(true);
 					}
 				}

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp	Mon Oct 28 06:55:42 2019
@@ -42,7 +42,6 @@
 #include "dasheditor.h"
 #include "pageitem_table.h"
 #include "propertiespalette_group.h"
-#include "propertiespalette_image.h"
 #include "propertiespalette_line.h"
 #include "propertiespalette_shadow.h"
 #include "propertiespalette_shape.h"
@@ -84,9 +83,6 @@
 	groupPal = new PropertiesPalette_Group( this );
 	idGroupItem = TabStack->addItem(groupPal, "Groups");
 
-	imagePal = new PropertiesPalette_Image(this);
-	idImageItem=TabStack->addItem( imagePal, "&Image" );
-
 	linePal = new PropertiesPalette_Line(this);
 	idLineItem=TabStack->addItem( linePal, "&Line" );
 
@@ -151,7 +147,6 @@
 	this->shadowPal->setMainWindow(mw);
 	this->shapePal->setMainWindow(mw);
 	this->groupPal->setMainWindow(mw);
-	this->imagePal->setMainWindow(mw);
 	this->linePal->setMainWindow(mw);
 	this->tablePal->setMainWindow(mw);
 
@@ -222,7 +217,6 @@
 	shadowPal->setDoc(m_doc);
 	shapePal->setDoc(m_doc);
 	groupPal->setDoc(m_doc);
-	imagePal->setDoc(m_doc);
 	linePal->setDoc(m_doc);
 	tablePal->setDocument(m_doc);
 
@@ -256,8 +250,6 @@
 	shapePal->unsetDoc();
 	groupPal->unsetItem();
 	groupPal->unsetDoc();
-	imagePal->unsetItem();
-	imagePal->unsetDoc();
 	linePal->unsetItem();
 	linePal->unsetDoc();
 	tablePal->unsetItem();
@@ -281,12 +273,10 @@
 	m_item = nullptr;
 	colorPalette->setCurrentItem(nullptr);
 	transparencyPalette->setCurrentItem(nullptr);
-	imagePal->unsetItem();
 	tablePal->unsetItem();
 	shapePal->unsetItem();
 	groupPal->unsetItem();
 	shadowPal->unsetItem();
-	imagePal->unsetItem();
 	linePal->unsetItem();
 	handleSelectionChanged();
 }
@@ -303,27 +293,12 @@
 {
 	PageItem *currentItem = nullptr;
 
-	if (m_doc)
-	{
-		if (m_doc->m_Selection->count() > 0)
-			currentItem = m_doc->m_Selection->itemAt(0);
-	/*	if (m_doc->m_Selection->count() > 1)
-		{
-			int lowestItem = 999999;
-			for (int a=0; a<m_doc->m_Selection->count(); ++a)
-			{
-				currentItem = m_doc->m_Selection->itemAt(a);
-				lowestItem = qMin(lowestItem, m_doc->Items->indexOf(currentItem));
-			}
-			currentItem = m_doc->Items->at(lowestItem);
-		}
-		else if (m_doc->m_Selection->count() == 1)
-		{
-			currentItem = m_doc->m_Selection->itemAt(0);
-		} */
-	}
-
-	return currentItem;
+	if (m_doc && m_doc->m_Selection->count() > 0)
+	{
+			return m_doc->m_Selection->itemAt(0);
+	}
+
+	return nullptr;
 }
 
 void PropertiesPalette::AppModeChanged()
@@ -388,7 +363,6 @@
 		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
-		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTableItem, false);
 	}
 	else
@@ -409,7 +383,6 @@
 		shadowPal->handleSelectionChanged();
 		shapePal->handleSelectionChanged();
 		groupPal->handleSelectionChanged();
-		imagePal->handleSelectionChanged();
 		linePal->handleSelectionChanged();
 		tablePal->handleSelectionChanged();
 		colorPalette->handleSelectionChanged();
@@ -425,7 +398,6 @@
 		TabStack->setItemEnabled(idColorsItem, true);
 		TabStack->setItemEnabled(idTableItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
-		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTableItem, false);
 	}
 	if (m_item->asSymbolFrame())
@@ -436,7 +408,6 @@
 		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
-		TabStack->setItemEnabled(idImageItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
 		TabStack->setItemEnabled(idTableItem, false);
 	}
@@ -489,7 +460,6 @@
 			TabStack->setItemEnabled(idXYZItem, false);
 			colorPalette->showGradient(0);
 			break;
-		case PageItem::ImageFrame:
 		case PageItem::LatexFrame:
 		case PageItem::OSGFrame:
 			if (currItem->asOSGFrame())
@@ -501,27 +471,23 @@
 				TabStack->setItemEnabled(idLineItem, false);
 				TabStack->setItemEnabled(idColorsItem, true);
 				TabStack->setItemEnabled(idTransparencyItem, false);
-				TabStack->setItemEnabled(idImageItem, false);
 			}
 			else
 			{
 				TabStack->setItemEnabled(idXYZItem, true);
 				TabStack->setItemEnabled(idShadowItem, true);
 				TabStack->setItemEnabled(idShapeItem, true);
-				TabStack->setItemEnabled(idImageItem, true);
 				TabStack->setItemEnabled(idLineItem, true);
 			}
 			break;
 		case PageItem::TextFrame:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::Line:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, false);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::ItemType1:
@@ -531,27 +497,23 @@
 		case PageItem::Arc:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::PolyLine:
 		case PageItem::Spiral:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::PathText:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::Symbol:
 		case PageItem::Group:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, false);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, false);
 			TabStack->setItemEnabled(idGroupItem, true);
 			TabStack->setItemEnabled(idColorsItem, false);
@@ -561,7 +523,6 @@
 			TabStack->setItemEnabled(idTableItem, true);
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, false);
 			TabStack->setItemEnabled(idGroupItem, false);
 			TabStack->setItemEnabled(idColorsItem, false);
@@ -595,7 +556,6 @@
 	shadowPal->unitChange();
 	shapePal->unitChange();
 	groupPal->unitChange();
-	imagePal->unitChange();
 	linePal->unitChange();
 
 	colorPalette->unitChange(oldRatio, m_unitRatio, m_doc->unitIndex());
@@ -835,10 +795,7 @@
 
 bool PropertiesPalette::userActionOn()
 {
-	bool userActionOn = false;
-	userActionOn  = xyzPal->userActionOn();
-	userActionOn |= imagePal->userActionOn();
-	return userActionOn;
+	return xyzPal->userActionOn();
 }
 
 void PropertiesPalette::changeEvent(QEvent *e)
@@ -856,7 +813,6 @@
 	setWindowTitle( tr("Properties"));
 
 	TabStack->setItemText(idXYZItem, tr("X, Y, &Z"));
-	TabStack->setItemText(idImageItem, tr("&Image"));
 	TabStack->setItemText(idShadowItem, tr("Drop Shadow"));
 	TabStack->setItemText(idShapeItem, tr("&Shape"));
 	TabStack->setItemText(idLineItem, tr("&Line"));
@@ -869,7 +825,6 @@
 	shadowPal->languageChange();
 	shapePal->languageChange();
 	groupPal->languageChange();
-	imagePal->languageChange();
 	colorPalette->languageChange();
 	linePal->languageChange();
 	tablePal->languageChange();

Modified: trunk/Scribus/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/ui/propertiespalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.h	Mon Oct 28 06:55:42 2019
@@ -34,7 +34,6 @@
 class ColorPalette;
 class NameWidget;
 class PropertiesPalette_Group;
-class PropertiesPalette_Image;
 class PropertiesPalette_Line;
 class PropertiesPalette_Shadow;
 class PropertiesPalette_Shape;
@@ -71,7 +70,6 @@
                          // commmited
 
 	PropertiesPalette_Group* groupPal {nullptr};
-	PropertiesPalette_Image* imagePal {nullptr};
 	PropertiesPalette_Line* linePal {nullptr};
 	PropertiesPalette_Shadow* shadowPal {nullptr};
 	PropertiesPalette_Shape* shapePal {nullptr};
@@ -127,7 +125,6 @@
 	int idXYZItem {0};
 	int idShapeItem {0};
 	int idTableItem {0};
-	int idImageItem {0};
 	int idLineItem {0};
 	int idColorsItem {0};
 	int idTransparencyItem {0};

Modified: trunk/Scribus/scribus/util_file.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/util_file.cpp
==============================================================================
--- trunk/Scribus/scribus/util_file.cpp	(original)
+++ trunk/Scribus/scribus/util_file.cpp	Mon Oct 28 06:55:42 2019
@@ -123,7 +123,6 @@
 bool copyFileToFilter(const QString& source, ScStreamFilter& target)
 {
 	bool copySucceed = true;
-	int  bytesread = 0;
 	if (source.isEmpty())
 		return false;
 	if (!QFile::exists(source))
@@ -134,7 +133,7 @@
 		return false;
 	if (s.open(QIODevice::ReadOnly))
 	{
-		bytesread = s.read( bb.data(), bb.size() );
+		int bytesread = s.read( bb.data(), bb.size() );
 		while (bytesread > 0)
 		{
 			copySucceed &= target.writeData(bb.data(), bytesread);
@@ -149,7 +148,6 @@
 bool copyFileToStream(const QString& source, QDataStream& target)
 {
 	bool copySucceed = true;
-	int  bytesread, byteswrite;
 	if (source.isEmpty())
 		return false;
 	if (!QFile::exists(source))
@@ -162,12 +160,13 @@
 		return false;
 	if (s.open(QIODevice::ReadOnly))
 	{
-		bytesread = s.read( bb.data(), bb.size() );
+		int byteswrite = 0;
+		int bytesread = s.read( bb.data(), bb.size() );
 		while (bytesread > 0)
 		{
-			byteswrite   = target.writeRawData(bb.data(), bytesread);
+			byteswrite = target.writeRawData(bb.data(), bytesread);
 			copySucceed &= (byteswrite == bytesread);
-			bytesread    = s.read( bb.data(), bb.size() );
+			bytesread = s.read( bb.data(), bb.size() );
 		}
 		copySucceed &= (s.error() == QFile::NoError);
 		s.close();

Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp	(original)
+++ trunk/Scribus/scribus/util_formats.cpp	Mon Oct 28 06:55:42 2019
@@ -221,14 +221,18 @@
 
 QString FormatsManager::extensionsForFormat(int type)
 {
-	QString a,b,c;
+	QString a;
+	QString b;
+	QString c;
 	fileTypeStrings(type, a, b, c);
 	return b;
 }
 
 QString FormatsManager::fileDialogFormatList(int type)
 {
-	QString a,b,c;
+	QString a;
+	QString b;
+	QString c;
 	fileTypeStrings(type, a, b, c);
 	return a + b + ";;" +c;
 }

Modified: trunk/Scribus/scribus/util_math.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23282&path=/trunk/Scribus/scribus/util_math.cpp
==============================================================================
--- trunk/Scribus/scribus/util_math.cpp	(original)
+++ trunk/Scribus/scribus/util_math.cpp	Mon Oct 28 06:55:42 2019
@@ -35,11 +35,6 @@
 	QByteArray bb(4, ' ');
 	if (raw)
 	{
-		// Qt4
-/*		bb[3] = static_cast<uchar>(QChar(in.at(0)));
-		bb[2] = static_cast<uchar>(QChar(in.at(1)));
-		bb[1] = static_cast<uchar>(QChar(in.at(2)));
-		bb[0] = static_cast<uchar>(QChar(in.at(3)));*/
 		bb[3] = in.at(0);
 		bb[2] = in.at(1);
 		bb[1] = in.at(2);
@@ -47,11 +42,6 @@
 	}
 	else
 	{
-		// Qt4
-// 		bb[0] = static_cast<uchar>(QChar(in.at(0)));
-// 		bb[1] = static_cast<uchar>(QChar(in.at(1)));
-// 		bb[2] = static_cast<uchar>(QChar(in.at(2)));
-// 		bb[3] = static_cast<uchar>(QChar(in.at(3)));
 		bb[0] = in.at(0);
 		bb[1] = in.at(1);
 		bb[2] = in.at(2);
@@ -104,31 +94,34 @@
 	if (star)
 	{
 		pts.moveTo(cornerPoints[0]);
-		double mxc1, myc1, mxc2, myc2;
-		for (int a = 0; a < cornerPoints.count() - 2; a++)
-		{
-			sc = seg * a + 180.0 + rota;
-			if (a % 2 != 0)
+		double mxc1 = 0.0;
+		double myc1 = 0.0;
+		double mxc2 = 0.0;
+		double myc2 = 0.0;
+		for (int i = 0; i < cornerPoints.count() - 2; i++)
+		{
+			sc = seg * i + 180.0 + rota;
+			if (i % 2 != 0)
 			{
 				// outer control point
-				QLineF oline = QLineF(cornerPoints[a+1], cornerPoints[a-1]);
+				QLineF oline = QLineF(cornerPoints[i+1], cornerPoints[i-1]);
 				mxc1 = oline.pointAt(factor3).x();
 				myc1 = oline.pointAt(factor3).y();
 				// inner control point
-				mxc2 = sin((sc + 90.0) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[a].x();
-				myc2 = cos((sc + 90.0) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[a].y();
-				pts.cubicTo(QPointF(mxc2, myc2), QPointF(mxc1, myc1), cornerPoints[a+1]);
+				mxc2 = sin((sc + 90.0) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[i].x();
+				myc2 = cos((sc + 90.0) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[i].y();
+				pts.cubicTo(QPointF(mxc2, myc2), QPointF(mxc1, myc1), cornerPoints[i+1]);
 			}
 			else
 			{
 				// outer control point
-				QLineF oline = QLineF(cornerPoints[a], cornerPoints[a+2]);
+				QLineF oline = QLineF(cornerPoints[i], cornerPoints[i+2]);
 				mxc1 = oline.pointAt(factor3).x();
 				myc1 = oline.pointAt(factor3).y();
 				// inner control point
-				mxc2 = sin((sc - 90.0 + seg) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[a+1].x();
-				myc2 = cos((sc - 90.0 + seg) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[a+1].y();
-				pts.cubicTo(QPointF(mxc1, myc1), QPointF(mxc2, myc2), cornerPoints[a+1]);
+				mxc2 = sin((sc - 90.0 + seg) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[i+1].x();
+				myc2 = cos((sc - 90.0 + seg) / 180.0 * M_PI) * (trueLength * factor2) + cornerPoints[i+1].y();
+				pts.cubicTo(QPointF(mxc1, myc1), QPointF(mxc2, myc2), cornerPoints[i+1]);
 			}
 		}
 		// outer control point
@@ -152,10 +145,8 @@
 	else
 	{
 		pts.moveTo(cornerPoints[0]);
-		for (int a = 1; a < cornerPoints.count(); a++)
-		{
-			pts.lineTo(cornerPoints[a]);
-		}
+		for (int i = 1; i < cornerPoints.count(); i++)
+			pts.lineTo(cornerPoints[i]);
 		pts.closeSubpath();
 	}
 	return pts;
@@ -167,7 +158,8 @@
 		return QPainterPath();
 	double startAngleK = spiralStartAngle;
 	double endAngleK = spiralEndAngle;
-	QPainterPath path, path2;
+	QPainterPath path;
+	QPainterPath path2;
 	double sh = spiralHeight / (spiralFactor + 1.0);
 	double sw = 0.0;
 	double ww = spiralWidth;
@@ -349,7 +341,8 @@
 		if (pbox->bottom() < ry)
 			continue;
 
-		if (pbox->top() > ry) {
+		if (pbox->top() > ry)
+		{
 			partOut = true;
 			if (partIn || pbox->top() > prect->bottom())
 				break;
@@ -359,24 +352,29 @@
 		if (pbox->right() < rx)
 			continue;            /* not far enough over yet */
 
-		if (pbox->left() > rx) {
+		if (pbox->left() > rx)
+		{
 			partOut = true;      /* missed part of rectangle to left */
 			if (partIn)
 				break;
 		}
 
-		if (pbox->left() <= prect->right()) {
+		if (pbox->left() <= prect->right())
+		{
 			partIn = true;      /* definitely overlap */
 			if (partOut)
 				break;
 		}
 
-		if (pbox->right() >= prect->right()) {
+		if (pbox->right() >= prect->right())
+		{
 			ry = pbox->bottom() + 1;     /* finished with this band */
 			if (ry > prect->bottom())
 				break;
 			rx = prect->left();  /* reset x out to left again */
-		} else {
+		}
+		else
+		{
 			/*
 			 * Because boxes in a band are maximal width, if the first box
 			 * to overlap the rectangle doesn't completely cover it in that
@@ -395,7 +393,8 @@
 
 QPolygon flattenPath(const FPointArray& ina, QList<uint> &Segs)
 {
-	QPolygon cli, outa;
+	QPolygon cli;
+	QPolygon outa;
 	Segs.clear();
 	if (ina.size() <= 3)
 		return outa;
@@ -426,7 +425,8 @@
 
 FPoint getMaxClipF(const FPointArray* clip)
 {
-	FPoint np, rp;
+	FPoint np;
+	FPoint rp;
 	double mx = 0;
 	double my = 0;
 	int clipSize = clip->size();
@@ -446,7 +446,8 @@
 
 FPoint getMinClipF(const FPointArray* clip)
 {
-	FPoint np, rp;
+	FPoint np;
+	FPoint rp;
 	double mx = std::numeric_limits<double>::max();
 	double my = std::numeric_limits<double>::max();
 	int clipSize = clip->size();




More information about the scribus-commit mailing list