r23315 by jghali - #15902: ui/oneclick.cpp/h seems to be unused

scribus-commit scribus-commit at lists.scribus.net
Mon Nov 4 00:59:11 UTC 2019


Author: jghali
Date: Mon Nov  4 00:59:10 2019
New Revision: 23315

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23315
Log:
#15902: ui/oneclick.cpp/h seems to be unused

Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/oneclick.cpp
    trunk/Scribus/scribus/ui/oneclick.h
    trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Mon Nov  4 00:59:10 2019
@@ -405,7 +405,6 @@
 	ui/nodeeditpalette.h
 	ui/notesstyleseditor.h
 	ui/numformatcombo.h
-	ui/oneclick.h
 	ui/outlinepalette.h
 	ui/pageitemattributes.h
 	ui/pagelayout.h
@@ -906,7 +905,6 @@
 	ui/nodeeditpalette.cpp
 	ui/notesstyleseditor.cpp
 	ui/numformatcombo.cpp
-	ui/oneclick.cpp
 	ui/outlinepalette.cpp
 	ui/pageitemattributes.cpp
 	ui/pagelayout.cpp

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Mon Nov  4 00:59:10 2019
@@ -48,7 +48,6 @@
 #include "ui/basepointwidget.h"
 #include "ui/hruler.h"
 #include "ui/insertTable.h"
-#include "ui/oneclick.h"
 #include "ui/pageselector.h"
 #include "ui/propertiespalette.h"
 #include "ui/scrapbookpalette.h"
@@ -871,76 +870,66 @@
 		ySize = sizes->getDouble("defAngle", 0.0);
 		originPoint = sizes->getInt("OriginL", 0);
 	}
-	//#12577 Remove one click dialog
-	//#12577 OneClick *dia = new OneClick(m_view, ScribusView::tr("Enter Object Size"), m_doc->unitIndex(), xSize, ySize, doRemember, originPoint, lmode);
-	//#12577 if (dia->exec())
-	{
-		//#12577 doRemember = dia->checkRemember->isChecked();
-		if (lmode == 0)
-		{
-			//#12577 xSize = dia->spinWidth->value() / unitGetRatioFromIndex(m_doc->unitIndex());
-			//#12577 ySize = dia->spinHeight->value() / unitGetRatioFromIndex(m_doc->unitIndex());
-			//#12577 originPoint = dia->RotationGroup->checkedId();
-			if (doRemember)
-			{
-				sizes->set("defWidth", xSize);
-				sizes->set("defHeight", ySize);
-				sizes->set("Origin", originPoint);
-			}
-			endPoint.setXY(startPoint.x() + xSize, startPoint.y() + ySize);
-			switch (originPoint)
-			{
-				case 0:
-					break;
-				case 1:
-					startPoint.setX(startPoint.x() - xSize);
-					endPoint.setX(endPoint.x() - xSize);
-					break;
-				case 2:
-					startPoint.setXY(startPoint.x() - xSize / 2.0, startPoint.y() - ySize / 2.0);
-					endPoint.setXY(endPoint.x() - xSize / 2.0, endPoint.y() - ySize / 2.0);
-					break;
-				case 3:
-					startPoint.setY(startPoint.y() - ySize);
-					endPoint.setY(endPoint.y() - ySize);
-					break;
-				case 4:
-					startPoint.setXY(startPoint.x() - xSize, startPoint.y() - ySize);
-					endPoint.setXY(endPoint.x() - xSize, endPoint.y() - ySize);
-					break;
-			}
-		}
-		else
-		{
-			FPoint oldStart = startPoint;
-			//#12577 xSize = dia->spinWidth->value() / unitGetRatioFromIndex(m_doc->unitIndex());
-			//#12577 ySize = dia->spinHeight->value();
-			//#12577 originPoint = dia->RotationGroup->checkedId();
-			if (doRemember)
-			{
-				sizes->set("defLength", xSize);
-				sizes->set("defAngle", ySize);
-				sizes->set("OriginL", originPoint);
-			}
-			double angle = -ySize * M_PI / 180.0;
-			switch (originPoint)
-			{
-				case 0:
-					endPoint = FPoint(startPoint.x() + xSize * cos(angle), startPoint.y() + xSize * sin(angle));
-					break;
-				case 1:
-					startPoint = FPoint(oldStart.x() - xSize * cos(angle), oldStart.y() - xSize * sin(angle));
-					endPoint   = oldStart;
-					break;
-				case 2:
-					startPoint = FPoint(oldStart.x() - xSize / 2.0 * cos(angle), oldStart.y() - xSize / 2.0 * sin(angle));
-					endPoint   = FPoint(oldStart.x() + xSize / 2.0 * cos(angle), oldStart.y() + xSize / 2.0 * sin(angle));
-					break;
-			}
-		}
-		sizes->set("Remember", doRemember);
-		doCreate = true;
-	}
+
+	if (lmode == 0)
+	{
+		if (doRemember)
+		{
+			sizes->set("defWidth", xSize);
+			sizes->set("defHeight", ySize);
+			sizes->set("Origin", originPoint);
+		}
+		endPoint.setXY(startPoint.x() + xSize, startPoint.y() + ySize);
+		switch (originPoint)
+		{
+			case 0:
+				break;
+			case 1:
+				startPoint.setX(startPoint.x() - xSize);
+				endPoint.setX(endPoint.x() - xSize);
+				break;
+			case 2:
+				startPoint.setXY(startPoint.x() - xSize / 2.0, startPoint.y() - ySize / 2.0);
+				endPoint.setXY(endPoint.x() - xSize / 2.0, endPoint.y() - ySize / 2.0);
+				break;
+			case 3:
+				startPoint.setY(startPoint.y() - ySize);
+				endPoint.setY(endPoint.y() - ySize);
+				break;
+			case 4:
+				startPoint.setXY(startPoint.x() - xSize, startPoint.y() - ySize);
+				endPoint.setXY(endPoint.x() - xSize, endPoint.y() - ySize);
+				break;
+		}
+	}
+	else
+	{
+		FPoint oldStart = startPoint;
+		if (doRemember)
+		{
+			sizes->set("defLength", xSize);
+			sizes->set("defAngle", ySize);
+			sizes->set("OriginL", originPoint);
+		}
+		double angle = -ySize * M_PI / 180.0;
+		switch (originPoint)
+		{
+			case 0:
+				endPoint = FPoint(startPoint.x() + xSize * cos(angle), startPoint.y() + xSize * sin(angle));
+				break;
+			case 1:
+				startPoint = FPoint(oldStart.x() - xSize * cos(angle), oldStart.y() - xSize * sin(angle));
+				endPoint   = oldStart;
+				break;
+			case 2:
+				startPoint = FPoint(oldStart.x() - xSize / 2.0 * cos(angle), oldStart.y() - xSize / 2.0 * sin(angle));
+				endPoint   = FPoint(oldStart.x() + xSize / 2.0 * cos(angle), oldStart.y() + xSize / 2.0 * sin(angle));
+				break;
+		}
+	}
+	sizes->set("Remember", doRemember);
+	doCreate = true;
+
 	//delete dia;
 	return doCreate;
 }

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Mon Nov  4 00:59:10 2019
@@ -46,7 +46,6 @@
 #include "scribusview.h"
 #include "selection.h"
 #include "ui/insertTable.h"
-#include "ui/oneclick.h"
 #include "ui/pageselector.h"
 #include "ui/propertiespalette.h"
 #include "ui/scrapbookpalette.h"

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Mon Nov  4 00:59:10 2019
@@ -110,7 +110,6 @@
 #include "ui/guidemanager.h"
 #include "ui/hruler.h"
 #include "ui/insertTable.h"
-#include "ui/oneclick.h"
 #include "ui/pageitemattributes.h"
 #include "ui/pageselector.h"
 #include "ui/propertiespalette.h"
@@ -127,9 +126,6 @@
 #include "util_color.h"
 #include "util_formats.h"
 #include "util_math.h"
-
-
-
 
 using namespace std;
 

Modified: trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj	Mon Nov  4 00:59:10 2019
@@ -501,7 +501,6 @@
     <moc Include="..\..\..\scribus\ui\notesstyleseditor.h" />
     <ClInclude Include="..\..\..\scribus\numeration.h" />
     <moc Include="..\..\..\scribus\observable.h" />
-    <moc Include="..\..\..\scribus\ui\oneclick.h" />
     <moc Include="..\..\..\scribus\ui\outlinepalette.h" />
     <moc Include="..\..\..\scribus\pageitem.h" />
     <moc Include="..\..\..\scribus\pageitem_arc.h" />
@@ -1175,7 +1174,6 @@
     <ClCompile Include="..\..\..\scribus\numeration.cpp" />
     <ClCompile Include="..\..\..\scribus\observable.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\numformatcombo.cpp" />
-    <ClCompile Include="..\..\..\scribus\ui\oneclick.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\outlinepalette.cpp" />
     <ClCompile Include="..\..\..\scribus\pageitem.cpp" />
     <ClCompile Include="..\..\..\scribus\pageitem_arc.cpp" />

Modified: trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters	Mon Nov  4 00:59:10 2019
@@ -800,9 +800,6 @@
     <ClInclude Include="..\..\..\scribus\actionsearch.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\contentpalette.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -1385,9 +1382,6 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\observable.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\..\scribus\ui\oneclick.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\ui\outlinepalette.cpp">
@@ -3455,9 +3449,6 @@
     <moc Include="..\..\..\scribus\observable.h">
       <Filter>Header Files</Filter>
     </moc>
-    <moc Include="..\..\..\scribus\ui\oneclick.h">
-      <Filter>Header Files</Filter>
-    </moc>
     <moc Include="..\..\..\scribus\ui\outlinepalette.h">
       <Filter>Header Files</Filter>
     </moc>
@@ -4122,6 +4113,9 @@
       <Filter>Header Files</Filter>
     </moc>
     <moc Include="..\..\..\scribus\ui\actionsearchdialog.h">
+      <Filter>Header Files</Filter>
+    </moc>
+    <moc Include="..\..\..\scribus\ui\contentpalette.h">
       <Filter>Header Files</Filter>
     </moc>
   </ItemGroup>

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	Mon Nov  4 00:59:10 2019
@@ -501,7 +501,6 @@
     <moc Include="..\..\..\scribus\ui\notesstyleseditor.h" />
     <ClInclude Include="..\..\..\scribus\numeration.h" />
     <moc Include="..\..\..\scribus\observable.h" />
-    <moc Include="..\..\..\scribus\ui\oneclick.h" />
     <moc Include="..\..\..\scribus\ui\outlinepalette.h" />
     <moc Include="..\..\..\scribus\pageitem.h" />
     <moc Include="..\..\..\scribus\pageitem_arc.h" />
@@ -1175,7 +1174,6 @@
     <ClCompile Include="..\..\..\scribus\numeration.cpp" />
     <ClCompile Include="..\..\..\scribus\observable.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\numformatcombo.cpp" />
-    <ClCompile Include="..\..\..\scribus\ui\oneclick.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\outlinepalette.cpp" />
     <ClCompile Include="..\..\..\scribus\pageitem.cpp" />
     <ClCompile Include="..\..\..\scribus\pageitem_arc.cpp" />

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23315&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	Mon Nov  4 00:59:10 2019
@@ -800,9 +800,6 @@
     <ClInclude Include="..\..\..\scribus\actionsearch.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\contentpalette.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\scribus\desaxe\digester.cpp">
@@ -1385,9 +1382,6 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\observable.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\..\scribus\ui\oneclick.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\ui\outlinepalette.cpp">
@@ -3455,9 +3449,6 @@
     <moc Include="..\..\..\scribus\observable.h">
       <Filter>Header Files</Filter>
     </moc>
-    <moc Include="..\..\..\scribus\ui\oneclick.h">
-      <Filter>Header Files</Filter>
-    </moc>
     <moc Include="..\..\..\scribus\ui\outlinepalette.h">
       <Filter>Header Files</Filter>
     </moc>
@@ -4122,6 +4113,9 @@
       <Filter>Header Files</Filter>
     </moc>
     <moc Include="..\..\..\scribus\ui\actionsearchdialog.h">
+      <Filter>Header Files</Filter>
+    </moc>
+    <moc Include="..\..\..\scribus\ui\contentpalette.h">
       <Filter>Header Files</Filter>
     </moc>
   </ItemGroup>




More information about the scribus-commit mailing list