r16113 by fschmid - Some more removal of use of now old unused item properties.

scribus-commit scribus-commit at lists.scribus.net
Sun Dec 19 12:14:29 CET 2010


Author: fschmid
Date: Sun Dec 19 11:14:29 2010
New Revision: 16113

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16113
Log:
Some more removal of use of now old unused item properties.

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvasmode_copyproperties.cpp
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_framelinks.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/pageitem_desaxe.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Sun Dec 19 11:14:29 2010
@@ -434,28 +434,8 @@
 				QPainterPath currClip;
 				currClip.addPolygon(itemPos.map(QPolygonF(currItem->Clip)));
 				currClip.closeSubpath();
-//				qDebug() << "itemUnderCursor: master" << currNr << mouseArea << currPath.toFillPolygon() << currPath.intersects(mouseArea);
-//				if (currClip.intersects(mouseArea))
-//					qDebug() << "    within Clip:" << currClip.toFillPolygon();
 				if (currPath.intersects(mouseArea) || currClip.intersects(mouseArea))
-//				if ((QRegion(itemPos.map(QPolygon(QRect(0, 0, static_cast<int>(currItem->width()), static_cast<int>(currItem->height()))))).contains(mpo.toRect())) ||
-//					(QRegion(currItem->Clip * itemPos).contains(mpo.toRect())))
 				{
-					if (currItem->Groups.count() != 0 && !allowInGroup)
-					{
-						// look for the group control
-						// FIXME: Items or MasterPageItems??
-						for (int ga=0; ga < m_doc->Items->count(); ++ga)
-						{
-							if (m_doc->Items->at(ga)->Groups.count() != 0 
-								&& m_doc->Items->at(ga)->Groups.top() == currItem->Groups.top() 
-								&& m_doc->Items->at(ga)->controlsGroup())
-							{
-								currItem = m_doc->Items->at(ga);
-								break;
-							}
-						}
-					}
 					return currItem;
 				}
 			}
@@ -467,7 +447,6 @@
 		return NULL;
 
 	int currNr = itemAbove? m_doc->Items->indexOf(itemAbove)-1 : m_doc->Items->count()-1;
-//	qDebug() << "itemUnderCursor searching from" << currNr << itemAbove << m_doc->Items->count();
 	while (currNr >= 0)
 	{
 		currItem = m_doc->Items->at(currNr);
@@ -487,28 +466,9 @@
 			QPainterPath currClip;
 			currClip.addPolygon(itemPos.map(QPolygonF(currItem->Clip)));
 			currClip.closeSubpath();
-//			qDebug() << "itemUnderCursor:" << currNr << mouseArea << currPath.toFillPolygon() << currPath.intersects(mouseArea);
-//			if (currClip.intersects(mouseArea))
-//				qDebug() << "    within Clip:" << currClip.toFillPolygon();
 			if (currPath.intersects(mouseArea) || currClip.intersects(mouseArea))
-//				if ((QRegion(itemPos.map(QPolygon(QRect(0, 0, static_cast<int>(currItem->width()), static_cast<int>(currItem->height()))))).contains(mpo.toRect())) ||
-//				(QRegion(currItem->Clip * itemPos).contains(mpo.toRect())))
-			{
-				if (currItem->Groups.count() != 0 && !allowInGroup)
-				{
-					// look for the group control
-					for (int ga=0; ga < m_doc->Items->count(); ++ga)
-					{
-						if (m_doc->Items->at(ga)->Groups.count() != 0 
-							&& m_doc->Items->at(ga)->Groups.top() == currItem->Groups.top() 
-							&& m_doc->Items->at(ga)->controlsGroup())
-						{
-							currItem = m_doc->Items->at(ga);
-							break;
-						}
-					}
-				}
-				return currItem;				
+			{
+				return currItem;
 			}
 		}
 		--currNr;

Modified: trunk/Scribus/scribus/canvasmode_copyproperties.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/canvasmode_copyproperties.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.cpp Sun Dec 19 11:14:29 2010
@@ -242,7 +242,6 @@
 	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	Mxp = mousePointDoc.x(); //m->x()/m_canvas->scale());
 	Myp = mousePointDoc.y(); //m->y()/m_canvas->scale());
-//	double grabRadius = m_doc->guidesPrefs().grabRad / m_canvas->scale();
 	int MxpS = static_cast<int>(mousePointDoc.x()); //m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
 	int MypS = static_cast<int>(mousePointDoc.y()); //m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
 	m_doc->nodeEdit.deselect();
@@ -294,7 +293,6 @@
 		}
 		m_view->setRulerPos(m_view->contentsX(), m_view->contentsY());
 	}
-	
 	currItem = NULL;
 	if ((m->modifiers() & SELECT_BENEATH) != 0)
 	{
@@ -303,48 +301,16 @@
 			if (m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), m_doc->m_Selection->itemAt(i)) >= 0)
 			{
 				currItem = m_doc->m_Selection->itemAt(i);
-//				qDebug() << "select item: found BENEATH" << currItem << "groups" << currItem->Groups.count();
-				if (currItem->Groups.count() > 0)
-				{
-					m_doc->m_Selection->delaySignalsOn();
-					for (int ga=0; ga<m_doc->Items->count(); ++ga)
-					{
-						PageItem* item = m_doc->Items->at(ga);
-						if (item->Groups.count() != 0)
-						{
-							if (item->Groups.top() == currItem->Groups.top())
-							{
-								if (m_doc->m_Selection->findItem(item) >= 0)
-								{
-									m_doc->m_Selection->removeItem(item);
-								}
-							}
-						}
-					}
-					m_doc->m_Selection->delaySignalsOff();
-				}
-				else
-				{
-					m_doc->m_Selection->removeItem(currItem);
-				}
+				m_doc->m_Selection->removeItem(currItem);
 				break;
 			}
-//			else
-//				qDebug() << "select item: not BENEATH" << QPointF(mousePointDoc.x(),mousePointDoc.y()) 
-//					<< m_doc->m_Selection->itemAt(i)->getTransform() 
-//					<< m_doc->m_Selection->itemAt(i)->getBoundingRect();
 		}
 	}
 	else if ( (m->modifiers() & SELECT_MULTIPLE) == Qt::NoModifier || (m_doc->appMode == modeLinkFrames) || (m_doc->appMode == modeUnlinkFrames) )
 	{
 		m_view->Deselect(false);
 	}
-	
-//	qDebug() << "select item: beneath" << (m->modifiers() & SELECT_BENEATH) << currItem 
-//		<< "multi" << (m->modifiers() & SELECT_MULTIPLE)
-//		<< "current sel" << m_doc->m_Selection->count();
 	currItem = m_canvas->itemUnderCursor(m->globalPos(), currItem, (m->modifiers() & SELECT_IN_GROUP));
-//	qDebug() << "item under cursor: " << currItem;
 	if (currItem)
 	{
 		m_doc->m_Selection->delaySignalsOn();
@@ -358,32 +324,10 @@
 			//then clear and select the new item
 			if ((m->modifiers() == SELECT_BENEATH) && m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), currItem) >= 0)
 				m_doc->m_Selection->clear();
-			//CB: #7186: This was prependItem, does not seem to need to be anymore with current select code
 			m_doc->m_Selection->addItem(currItem);
-			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroupControl))
+			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroup()))
 			{
 				currItem->isSingleSel = true;
-			}
-			else if (currItem->Groups.count() > 0)
-			{
-				for (int ga=0; ga<m_doc->Items->count(); ++ga)
-				{
-					PageItem* item = m_doc->Items->at(ga);
-					if (item->Groups.count() != 0)
-					{
-						if (item->Groups.top() == currItem->Groups.top())
-						{
-							if (item->ItemNr != currItem->ItemNr)
-							{
-								if (m_doc->m_Selection->findItem(item) == -1)
-								{
-									m_doc->m_Selection->addItem(item, true);
-								}
-							}
-							item->isSingleSel = false;
-						}
-					}
-				}
 			}
 		}
 
@@ -399,11 +343,7 @@
 			m_doc->m_Selection->setGroupRect();
 			double x, y, w, h;
 			m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
-			//					emit ItemPos(x, y);
-			//					emit ItemGeom(w, h);
 			m_view->getGroupRectScreen(&x, &y, &w, &h);
-			//					m_view->updateContents(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
-			//					emit HaveSel(currItem->itemType());
 		}
 		if (m_doc->m_Selection->count() == 1)
 		{
@@ -418,7 +358,6 @@
 		}
 		return true;
 	}
-	//m_doc->m_Selection->setIsGUISelection(true);
 	m_doc->m_Selection->connectItemToGUI();
 	if ( !(m->modifiers() & SELECT_MULTIPLE) || (m_doc->appMode == modeLinkFrames) || (m_doc->appMode == modeUnlinkFrames))
 		m_view->Deselect(true);

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Sun Dec 19 11:14:29 2010
@@ -1101,48 +1101,16 @@
 			if (m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), m_doc->m_Selection->itemAt(i)) >= 0)
 			{
 				currItem = m_doc->m_Selection->itemAt(i);
-//				qDebug() << "select item: found BENEATH" << currItem << "groups" << currItem->Groups.count();
-				if (currItem->Groups.count() > 0)
-				{
-					m_doc->m_Selection->delaySignalsOn();
-					for (int ga=0; ga<m_doc->Items->count(); ++ga)
-					{
-						PageItem* item = m_doc->Items->at(ga);
-						if (item->Groups.count() != 0)
-						{
-							if (item->Groups.top() == currItem->Groups.top())
-							{
-								if (m_doc->m_Selection->findItem(item) >= 0)
-								{
-									m_doc->m_Selection->removeItem(item);
-								}
-							}
-						}
-					}
-					m_doc->m_Selection->delaySignalsOff();
-				}
-				else
-				{
-					m_doc->m_Selection->removeItem(currItem);
-				}
+				m_doc->m_Selection->removeItem(currItem);
 				break;
 			}
-//			else
-//				qDebug() << "select item: not BENEATH" << QPointF(mousePointDoc.x(),mousePointDoc.y()) 
-//					<< m_doc->m_Selection->itemAt(i)->getTransform() 
-//					<< m_doc->m_Selection->itemAt(i)->getBoundingRect();
 		}
 	}
 	else if ( (m->modifiers() & SELECT_MULTIPLE) == Qt::NoModifier)
 	{
 		m_view->Deselect(false);
 	}
-	
-//	qDebug() << "select item: beneath" << (m->modifiers() & SELECT_BENEATH) << currItem 
-//		<< "multi" << (m->modifiers() & SELECT_MULTIPLE)
-//		<< "current sel" << m_doc->m_Selection->count();
 	currItem = m_canvas->itemUnderCursor(m->globalPos(), currItem, (m->modifiers() & SELECT_IN_GROUP));
-//	qDebug() << "item under cursor: " << currItem;
 	if (currItem)
 	{
 		m_doc->m_Selection->delaySignalsOn();
@@ -1158,51 +1126,19 @@
 				m_doc->m_Selection->clear();
 			//CB: #7186: This was prependItem, does not seem to need to be anymore with current select code
 			m_doc->m_Selection->addItem(currItem);
-			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroupControl))
+			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroup()))
 			{
 				currItem->isSingleSel = true;
 			}
-			else if (currItem->Groups.count() > 0)
-			{
-				for (int ga=0; ga<m_doc->Items->count(); ++ga)
-				{
-					PageItem* item = m_doc->Items->at(ga);
-					if (item->Groups.count() != 0)
-					{
-						if (item->Groups.top() == currItem->Groups.top())
-						{
-							if (item->ItemNr != currItem->ItemNr)
-							{
-								if (m_doc->m_Selection->findItem(item) == -1)
-								{
-									m_doc->m_Selection->addItem(item, true);
-								}
-							}
-							item->isSingleSel = false;
-						}
-					}
-				}
-			}
-		}
-
-// 		currItem->update();
+		}
 		m_canvas->update();
 		m_doc->m_Selection->delaySignalsOff();
 		if (m_doc->m_Selection->count() > 1)
 		{
-// 			for (int aa = 0; aa < m_doc->m_Selection->count(); ++aa)
-// 			{
-// 				PageItem *bb = m_doc->m_Selection->itemAt(aa);
-// 				bb->update();
-// 			}
 			m_doc->m_Selection->setGroupRect();
 			double x, y, w, h;
 			m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
-			//					emit ItemPos(x, y);
-			//					emit ItemGeom(w, h);
 			m_view->getGroupRectScreen(&x, &y, &w, &h);
-			//					m_view->updateContents(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
-			//					emit HaveSel(currItem->itemType());
 		}
 		if (m_doc->m_Selection->count() == 1)
 		{
@@ -1217,8 +1153,6 @@
 		}
 		return true;
 	}
-	
-	//m_doc->m_Selection->setIsGUISelection(true);
 	m_doc->m_Selection->connectItemToGUI();
 	if ( !(m->modifiers() & SELECT_MULTIPLE))
 		m_view->Deselect(true);

Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Sun Dec 19 11:14:29 2010
@@ -299,25 +299,6 @@
 				m_view->DrawNew();
 			}
 		}
-/*		uint docPagesCount=m_doc->Pages->count();
-		uint docCurrPageNo=m_doc->currentPageNumber();
-		for (uint i = 0; i < docPagesCount; ++i)
-		{
-			int x = static_cast<int>(m_doc->Pages->at(i)->xOffset() * m_canvas->scale());
-			int y = static_cast<int>(m_doc->Pages->at(i)->yOffset() * m_canvas->scale());
-			int w = static_cast<int>(m_doc->Pages->at(i)->width() * m_canvas->scale());
-			int h = static_cast<int>(m_doc->Pages->at(i)->height() * m_canvas->scale());
-			if (QRect(x, y, w, h).intersects(mpo))
-			{
-				if (docCurrPageNo != i)
-				{
-					m_doc->setCurrentPage(m_doc->Pages->at(i));
-					setMenTxt(i);
-					DrawNew();
-				}
-				break;
-			}
-		} */
 		m_view->setRulerPos(m_view->contentsX(), m_view->contentsY());
 	}
 }
@@ -394,48 +375,16 @@
 			if (m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), m_doc->m_Selection->itemAt(i)) >= 0)
 			{
 				currItem = m_doc->m_Selection->itemAt(i);
-//				qDebug() << "select item: found BENEATH" << currItem << "groups" << currItem->Groups.count();
-				if (currItem->Groups.count() > 0)
-				{
-					m_doc->m_Selection->delaySignalsOn();
-					for (int ga=0; ga<m_doc->Items->count(); ++ga)
-					{
-						PageItem* item = m_doc->Items->at(ga);
-						if (item->Groups.count() != 0)
-						{
-							if (item->Groups.top() == currItem->Groups.top())
-							{
-								if (m_doc->m_Selection->findItem(item) >= 0)
-								{
-									m_doc->m_Selection->removeItem(item);
-								}
-							}
-						}
-					}
-					m_doc->m_Selection->delaySignalsOff();
-				}
-				else
-				{
-					m_doc->m_Selection->removeItem(currItem);
-				}
+				m_doc->m_Selection->removeItem(currItem);
 				break;
 			}
-//			else
-//				qDebug() << "select item: not BENEATH" << QPointF(mousePointDoc.x(),mousePointDoc.y()) 
-//					<< m_doc->m_Selection->itemAt(i)->getTransform() 
-//					<< m_doc->m_Selection->itemAt(i)->getBoundingRect();
 		}
 	}
 	else if ( (m->modifiers() & SELECT_MULTIPLE) == Qt::NoModifier || (m_doc->appMode == modeLinkFrames) || (m_doc->appMode == modeUnlinkFrames) )
 	{
 		m_view->Deselect(false);
 	}
-	
-//	qDebug() << "select item: beneath" << (m->modifiers() & SELECT_BENEATH) << currItem 
-//		<< "multi" << (m->modifiers() & SELECT_MULTIPLE)
-//		<< "current sel" << m_doc->m_Selection->count();
 	currItem = m_canvas->itemUnderCursor(m->globalPos(), currItem, (m->modifiers() & SELECT_IN_GROUP));
-//	qDebug() << "item under cursor: " << currItem;
 	if (currItem)
 	{
 		m_doc->m_Selection->delaySignalsOn();
@@ -451,33 +400,11 @@
 				m_doc->m_Selection->clear();
 			//CB: #7186: This was prependItem, does not seem to need to be anymore with current select code
 			m_doc->m_Selection->addItem(currItem);
-			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroupControl))
+			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroup()))
 			{
 				currItem->isSingleSel = true;
 			}
-			else if (currItem->Groups.count() > 0)
-			{
-				for (int ga=0; ga<m_doc->Items->count(); ++ga)
-				{
-					PageItem* item = m_doc->Items->at(ga);
-					if (item->Groups.count() != 0)
-					{
-						if (item->Groups.top() == currItem->Groups.top())
-						{
-							if (item->ItemNr != currItem->ItemNr)
-							{
-								if (m_doc->m_Selection->findItem(item) == -1)
-								{
-									m_doc->m_Selection->addItem(item, true);
-								}
-							}
-							item->isSingleSel = false;
-						}
-					}
-				}
-			}
-		}
-
+		}
 		currItem->update();
 		m_doc->m_Selection->delaySignalsOff();
 		if (m_doc->m_Selection->count() > 1)
@@ -490,11 +417,7 @@
 			m_doc->m_Selection->setGroupRect();
 			double x, y, w, h;
 			m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
-			//	emit ItemPos(x, y);
-			//	emit ItemGeom(w, h);
 			m_view->getGroupRectScreen(&x, &y, &w, &h);
-			//	m_view->updateContents(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
-			//	emit HaveSel(currItem->itemType());
 		}
 		if (m_doc->m_Selection->count() == 1)
 		{
@@ -509,7 +432,6 @@
 		}
 		return true;
 	}
-	//m_doc->m_Selection->setIsGUISelection(true);
 	m_doc->m_Selection->connectItemToGUI();
 	if ( !(m->modifiers() & SELECT_MULTIPLE) || (m_doc->appMode == modeLinkFrames) || (m_doc->appMode == modeUnlinkFrames))
 		m_view->Deselect(true);

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Sun Dec 19 11:14:29 2010
@@ -1050,7 +1050,6 @@
 //CB-->Doc/Fix
 bool CanvasMode_Normal::SeleItem(QMouseEvent *m)
 {
-// 	qDebug()<<"CanvasMode_Normal::SeleItem";
 	m_canvas->m_viewMode.operItemSelecting = true;
 	const unsigned SELECT_IN_GROUP = Qt::AltModifier;
 	const unsigned SELECT_MULTIPLE = Qt::ShiftModifier;
@@ -1064,7 +1063,6 @@
 	int MxpS = static_cast<int>(mousePointDoc.x()); //m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
 	int MypS = static_cast<int>(mousePointDoc.y()); //m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
 	QRectF mpo(m_mouseCurrentPoint.x()-grabRadius, m_mouseCurrentPoint.y()-grabRadius, grabRadius*2, grabRadius*2);
-//	mpo.translate(m_doc->minCanvasCoordinate.x() * m_canvas->scale(), m_doc->minCanvasCoordinate.y() * m_canvas->scale());
 	m_doc->nodeEdit.deselect();
 
 	if(!m_doc->guidesPrefs().guidePlacement) // guides are on foreground and want to be processed first
@@ -1166,48 +1164,16 @@
 			if (m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), m_doc->m_Selection->itemAt(i)) >= 0)
 			{
 				currItem = m_doc->m_Selection->itemAt(i);
-//				qDebug() << "select item: found BENEATH" << currItem << "groups" << currItem->Groups.count();
-				if (currItem->Groups.count() > 0)
-				{
-					m_doc->m_Selection->delaySignalsOn();
-					for (int ga=0; ga<m_doc->Items->count(); ++ga)
-					{
-						PageItem* item = m_doc->Items->at(ga);
-						if (item->Groups.count() != 0)
-						{
-							if (item->Groups.top() == currItem->Groups.top())
-							{
-								if (m_doc->m_Selection->findItem(item) >= 0)
-								{
-									m_doc->m_Selection->removeItem(item);
-								}
-							}
-						}
-					}
-					m_doc->m_Selection->delaySignalsOff();
-				}
-				else
-				{
-					m_doc->m_Selection->removeItem(currItem);
-				}
+				m_doc->m_Selection->removeItem(currItem);
 				break;
 			}
-//			else
-//				qDebug() << "select item: not BENEATH" << QPointF(mousePointDoc.x(),mousePointDoc.y()) 
-//					<< m_doc->m_Selection->itemAt(i)->getTransform() 
-//					<< m_doc->m_Selection->itemAt(i)->getBoundingRect();
 		}
 	}
 	else if ( (m->modifiers() & SELECT_MULTIPLE) == Qt::NoModifier)
 	{
 		m_view->Deselect(false);
 	}
-	
-//	qDebug() << "select item: beneath" << (m->modifiers() & SELECT_BENEATH) << currItem 
-//		<< "multi" << (m->modifiers() & SELECT_MULTIPLE)
-//		<< "current sel" << m_doc->m_Selection->count();
 	currItem = m_canvas->itemUnderCursor(m->globalPos(), currItem, (m->modifiers() & SELECT_IN_GROUP));
-//	qDebug() << "item under cursor: " << currItem;
 	if (currItem)
 	{
 		m_doc->m_Selection->delaySignalsOn();
@@ -1223,31 +1189,10 @@
 				m_doc->m_Selection->clear();
 			//CB: #7186: This was prependItem, does not seem to need to be anymore with current select code
 			m_doc->m_Selection->addItem(currItem);
-			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroupControl))
+			if ( (m->modifiers() & SELECT_IN_GROUP) && (!currItem->isGroup()))
 			{
 				currItem->isSingleSel = true;
 			}
-/*			else if (currItem->Groups.count() > 0)
-			{
-				for (int ga=0; ga<m_doc->Items->count(); ++ga)
-				{
-					PageItem* item = m_doc->Items->at(ga);
-					if (item->Groups.count() != 0)
-					{
-						if (item->Groups.top() == currItem->Groups.top())
-						{
-							if (item->ItemNr != currItem->ItemNr)
-							{
-								if (m_doc->m_Selection->findItem(item) == -1)
-								{
-									m_doc->m_Selection->addItem(item, true);
-								}
-							}
-							item->isSingleSel = false;
-						}
-					}
-				}
-			} */
 		}
 		if(pageChanged)
 		{
@@ -1255,7 +1200,6 @@
 			m_canvas->update();
 		}
 		else
-// 			currItem->update();
 			m_canvas->update();
 		
 		m_doc->m_Selection->delaySignalsOff();
@@ -1271,27 +1215,8 @@
 			m_doc->m_Selection->setGroupRect();
 			double x, y, w, h;
 			m_doc->m_Selection->getGroupRect(&x, &y, &w, &h);
-			//					emit ItemPos(x, y);
-			//					emit ItemGeom(w, h);
 			m_view->getGroupRectScreen(&x, &y, &w, &h);
-			//					m_view->updateContents(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
-			//					emit HaveSel(currItem->itemType());
-		}
-// 		if (m_doc->m_Selection->count() == 1)
-// 		{
-// 			frameResizeHandle = m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), currItem); // HandleSizer(currItem, mpo.toRect(), m);
-// 			if ((frameResizeHandle == Canvas::INSIDE) && (!currItem->locked()))
-// 			{
-// 				qDebug()<<__LINE__<< "QCursor(Qt::OpenHandCursor)"; 
-// 				qApp->changeOverrideCursor(QCursor(Qt::OpenHandCursor));
-// 			}
-// 		}
-// 		else
-// 		{
-// 			qDebug()<<__LINE__<< "QCursor(Qt::OpenHandCursor)";
-// 		        qApp->changeOverrideCursor(QCursor(Qt::OpenHandCursor));
-// 		}
-// 		qDebug()<<"Out Of SeleItem"<<__LINE__;
+		}
 		return true;
 	}
 	if ((m_doc->guidesPrefs().guidesShown) /*&& (!m_doc->GuideLock)*/ && (m_doc->OnPage(MxpS, MypS) != -1))
@@ -1305,9 +1230,7 @@
 		{
 			m_view->startGesture(guideMoveGesture);
 			guideMoveGesture->mouseMoveEvent(m);
-			//m_doc->m_Selection->setIsGUISelection(true);
 			m_doc->m_Selection->connectItemToGUI();
-// 			qDebug()<<"Out Of SeleItem"<<__LINE__;
 			return true;
 		}
 		else
@@ -1318,7 +1241,6 @@
 			guideMoveGesture->mouseSelectGuide(m);
 		}
 	}
-	//m_doc->m_Selection->setIsGUISelection(true);
 	m_doc->m_Selection->connectItemToGUI();
 	if ( !(m->modifiers() & SELECT_MULTIPLE))
 	{
@@ -1330,7 +1252,6 @@
 		else
 			m_view->Deselect(true);
 	}
-// 	qDebug()<<"Out Of SeleItem"<<__LINE__;
 	return false;
 }
 

Modified: trunk/Scribus/scribus/pageitem_desaxe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/pageitem_desaxe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_desaxe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_desaxe.cpp Sun Dec 19 11:14:29 2010
@@ -150,22 +150,7 @@
 	result.insert("pagenumber", toXMLString(item->pixm.imgInfo.actualPageNumber));
 	result.insert("cms-profile", item->cmsProfile());
 	result.insert("cms-intent", toXMLString(item->cmsRenderingIntent()));
-	
-	if (item->groups().count() > 0)
-	{
-		QString grouplist = "";
-		QStack<int>::const_iterator it;
-		for (it = item->groups().begin(); it != item->groups().end(); ++it)
-			grouplist += toXMLString( *it ) + " ";	
-		result.insert("groups", toXMLString(grouplist));
-		result.insert("isGroupControl", toXMLString(item->controlsGroup()));
-		if (item->isGroupControl)
-		{
-			if (item->groupsLastItem != 0)
-				result.insert("groupsLastItem", "obj" + toXMLString(item->groupsLastItem->getUId()));
-		}
-	}
-	
+
 	result.insert("isTableItem", toXMLString(item->isTableItem));
 	if (item->isTableItem)
 	{

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Sun Dec 19 11:14:29 2010
@@ -137,23 +137,16 @@
 				return result;
 			Mp = m_Doc->MasterPages.at(m_Doc->MasterNames[OnMasterPage]);
 			Dp = m_Doc->Pages->at(savedOwnPage);
-			int currentGroup = -1;
 			for (int a = 0; a < m_Doc->MasterItems.count(); ++a)
 			{
 				docItem = m_Doc->MasterItems.at(a);
 				LayerLevItem = m_Doc->layerLevelFromID(docItem->LayerID);
 				if (((docItem->ItemNr > ItemNr) && (docItem->LayerID == LayerID)) || (LayerLevItem > LayerLev && m_Doc->layerFlow(docItem->LayerID)))
 				{
-					if (docItem->Groups.count() == 0)
-						currentGroup = -1;
-					if ((currentGroup != -1) && (docItem->Groups.count() != 0) && (currentGroup == docItem->Groups.top()))
-						continue;
 					if (docItem->textFlowAroundObject())
 					{
 						result = result.subtract(itemShape(docItem, Mp->xOffset() - Dp->xOffset(), Mp->yOffset() - Dp->yOffset()));
 					}
-					if (docItem->isGroupControl)
-						currentGroup = docItem->Groups.top();
 				}
 			} // for all masterItems
 			// (JG) #6009 : disable possible interaction between master text frames and normal frames
@@ -174,21 +167,14 @@
 		} // if (!OnMasterPage.isEmpty())
 		else
 		{
-			int currentGroup = -1;
 			for (uint a = 0; a < docItemsCount; ++a)
 			{
 				docItem = m_Doc->Items->at(a);
 				LayerLevItem = m_Doc->layerLevelFromID(docItem->LayerID);
 				if (((docItem->ItemNr > ItemNr) && (docItem->LayerID == LayerID)) || (LayerLevItem > LayerLev && m_Doc->layerFlow(docItem->LayerID)))
 				{
-					if (docItem->Groups.count() == 0)
-						currentGroup = -1;
-					if ((currentGroup != -1) && (docItem->Groups.count() != 0) && (currentGroup == docItem->Groups.top()))
-						continue;
 					if (docItem->textFlowAroundObject())
 						result = result.subtract(itemShape(docItem, 0, 0));
-					if (docItem->isGroupControl && !docItem->Groups.isEmpty())
-						currentGroup = docItem->Groups.top();
 				}
 			} // for all docItems
 		} // if(OnMasterPage.isEmpty()		

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sun Dec 19 11:14:29 2010
@@ -459,22 +459,13 @@
 					groupStack2.pop();
 				}
 			}
-			if (itemInfo.isGroupControl)
+			if (itemInfo.isGroupFlag)
 			{
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
 				groupStack.push(GroupItems);
 				groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
 			}
-	/*		if (itemInfo.item->isGroupControl)
-			{
-				if (tagName == "PAGEOBJECT")
-					groupID.insert(itemInfo.item, itemInfo.groupLastItem + itemInfo.item->ItemNr);
-				else if (tagName == "FRAMEOBJECT")
-					groupIDF.insert(itemInfo.item, itemInfo.groupLastItem + itemInfo.item->ItemNr);
-				else
-					groupIDM.insert(itemInfo.item, itemInfo.groupLastItem + itemInfo.item->ItemNr);
-			} */
 		}
 		if (tagName == "Pattern")
 		{
@@ -1862,18 +1853,9 @@
 	info.ownLink  = newItem->isTableItem ? attrs.valueAsInt("OwnLINK", 0) : 0;
 	info.groupLastItem = 0;
 
-	info.isGroupControl = attrs.valueAsBool("isGroupControl", 0);
-	if (info.isGroupControl)
-	{
-		int groupLastItem = attrs.valueAsInt("groupsLastItem", 0);
-		// Sanity check for some broken files created using buggy development versions.
-		if ((newItem->Groups.count() == 0) || (groupLastItem <= 0)) 
-		{
-			newItem->isGroupControl = false;
-			newItem->setFillColor("None");
-		}
-		info.groupLastItem = groupLastItem;
-	}
+	info.isGroupFlag = attrs.valueAsBool("isGroupControl", 0);
+	if (info.isGroupFlag)
+		info.groupLastItem = attrs.valueAsInt("groupsLastItem", 0);
 
 	bool layerFound = false;
 	struct ImageLoadRequest loadingInfo;
@@ -2106,7 +2088,7 @@
 				groupStack2.pop();
 			}
 		}
-		if (itemInfo.isGroupControl)
+		if (itemInfo.isGroupFlag)
 		{
 			QList<PageItem*> GroupItems;
 			GroupItems.append(itemInfo.item);
@@ -2429,8 +2411,8 @@
 	int z = 0;
 	struct ImageLoadRequest loadingInfo;
 	PageItem::ItemType pt = static_cast<PageItem::ItemType>(attrs.valueAsInt("PTYPE"));
-	bool isGroupControl = attrs.valueAsBool("isGroupControl", 0);
-	if (isGroupControl)
+	bool isGroupFlag = attrs.valueAsBool("isGroupControl", 0);
+	if (isGroupFlag)
 		pt = PageItem::Group;
 	double x   = attrs.valueAsDouble("XPOS");
 	double y   = attrs.valueAsDouble("YPOS");
@@ -3311,10 +3293,6 @@
 					TableItems.append(newItem);
 					TableID.insert(itemInfo.ownLink, newItem->ItemNr);
 				}
-				if (newItem->isGroupControl)
-				{
-					groupID.insert(newItem, itemInfo.groupLastItem + newItem->ItemNr);
-				}
 				if (tagName == "FRAMEOBJECT")
 				{
 					m_Doc->FrameItems.append(m_Doc->Items->takeAt(newItem->ItemNr));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h Sun Dec 19 11:14:29 2010
@@ -67,12 +67,12 @@
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = 0; item = NULL; isGroupControl = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = 0; item = NULL; isGroupFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;
 			int ownLink;
-			bool isGroupControl;
+			bool isGroupFlag;
 		};
 
 		void registerFormats();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Sun Dec 19 11:14:29 2010
@@ -1499,12 +1499,6 @@
 			docu.writeAttribute("BottomLINK", -1);
 		docu.writeAttribute("OwnLINK", item->ItemNr);
 	}
-	docu.writeAttribute("isGroupControl", static_cast<int>(item->isGroupControl));
-	if (item->isGroupControl)
-	{
-		if (item->groupsLastItem != 0)
-			docu.writeAttribute("groupsLastItem", item->groupsLastItem->ItemNr - item->ItemNr);
-	}
 	docu.writeAttribute("NUMDASH", static_cast<int>(item->DashValues.count()));
 	QString dlp = "";
 	QVector<double>::Iterator dax;
@@ -1528,12 +1522,6 @@
 		colp += tmp.setNum(xf) + " " + tmpy.setNum(yf) + " ";
 	}
 	docu.writeAttribute("COCOOR", colp);
-	docu.writeAttribute("NUMGROUP", static_cast<int>(item->Groups.count()));
-	QString glp = "";
-	QStack<int>::Iterator nx;
-	for (nx = item->Groups.begin(); nx != item->Groups.end(); ++nx)
-		glp += tmp.setNum((*nx)) + " ";
-	docu.writeAttribute("GROUPS", glp);
 	if ( ! item->itemText.defaultStyle().charStyle().isInhLanguage())
 		docu.writeAttribute("LANGUAGE", item->itemText.defaultStyle().charStyle().language());
 	docu.writeAttribute("startArrowIndex", item->startArrowIndex());

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sun Dec 19 11:14:29 2010
@@ -325,7 +325,7 @@
 					groupStack2.pop();
 				}
 			}
-			if (itemInfo.isGroupControl)
+			if (itemInfo.isGroupFlag)
 			{
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
@@ -696,7 +696,7 @@
 					groupStack2.pop();
 				}
 			}
-			if (itemInfo.isGroupControl)
+			if (itemInfo.isGroupFlag)
 			{
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
@@ -1205,7 +1205,7 @@
 					groupStack2.pop();
 				}
 			}
-			if (itemInfo.isGroupControl)
+			if (itemInfo.isGroupFlag)
 			{
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
@@ -2587,18 +2587,9 @@
 	info.ownLink  = newItem->isTableItem ? attrs.valueAsInt("OwnLINK", 0) : 0;
 	info.groupLastItem = 0;
 
-	info.isGroupControl = attrs.valueAsBool("isGroupControl", 0);
-	if (info.isGroupControl)
-	{
-		int groupLastItem = attrs.valueAsInt("groupsLastItem", 0);
-		// Sanity check for some broken files created using buggy development versions.
-		if ((newItem->Groups.count() == 0) || (groupLastItem <= 0)) 
-		{
-			newItem->isGroupControl = false;
-			newItem->setFillColor("None");
-		}
-		info.groupLastItem = groupLastItem;
-	}
+	info.isGroupFlag = attrs.valueAsBool("isGroupControl", 0);
+	if (info.isGroupFlag)
+		info.groupLastItem = attrs.valueAsInt("groupsLastItem", 0);
 
 	struct ImageLoadRequest loadingInfo;
 #ifdef HAVE_OSG
@@ -2961,7 +2952,7 @@
 				groupStack2.pop();
 			}
 		}
-		if (itemInfo.isGroupControl)
+		if (itemInfo.isGroupFlag)
 		{
 			QList<PageItem*> GroupItems;
 			GroupItems.append(itemInfo.item);
@@ -3187,8 +3178,8 @@
 	int z = 0;
 	struct ImageLoadRequest loadingInfo;
 	PageItem::ItemType pt = static_cast<PageItem::ItemType>(attrs.valueAsInt("PTYPE"));
-	bool isGroupControl = attrs.valueAsBool("isGroupControl", 0);
-	if (isGroupControl)
+	bool isGroupFlag = attrs.valueAsBool("isGroupControl", 0);
+	if (isGroupFlag)
 		pt = PageItem::Group;
 	double xf, yf;
 	double x   = attrs.valueAsDouble("XPOS");
@@ -4142,7 +4133,7 @@
 						groupStack2.pop();
 					}
 				}
-				if (itemInfo.isGroupControl)
+				if (itemInfo.isGroupFlag)
 				{
 					QList<PageItem*> GroupItems;
 					GroupItems.append(itemInfo.item);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16113&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h Sun Dec 19 11:14:29 2010
@@ -71,12 +71,12 @@
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = 0; item = NULL; isGroupControl = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = 0; item = NULL; isGroupFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;
 			int ownLink;
-			bool isGroupControl;
+			bool isGroupFlag;
 		};
 
 		void registerFormats();




More information about the scribus-commit mailing list