From 08a0c07479d2ce9d6e485fed8f0fd65103fc9989 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sat, 8 Oct 2022 16:33:16 +0200 Subject: [PATCH] [TD] DrawD* - DrawT*: remove unused includes - part 1 - also sort includes --- src/Mod/TechDraw/App/DrawDimHelper.h | 5 ++--- src/Mod/TechDraw/App/DrawGeomHatch.h | 7 +++--- src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp | 2 +- src/Mod/TechDraw/App/DrawHatch.h | 5 ++--- src/Mod/TechDraw/App/DrawHatchPyImp.cpp | 8 +------ src/Mod/TechDraw/App/DrawLeaderLine.h | 7 +++--- src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp | 9 +------- src/Mod/TechDraw/App/DrawPage.h | 7 +++--- src/Mod/TechDraw/App/DrawPagePyImp.cpp | 10 ++++----- src/Mod/TechDraw/App/DrawParametricTemplate.h | 3 +-- .../App/DrawParametricTemplatePyImp.cpp | 2 +- src/Mod/TechDraw/App/DrawProjGroup.h | 5 ++--- src/Mod/TechDraw/App/DrawProjGroupItem.h | 4 +--- .../TechDraw/App/DrawProjGroupItemPyImp.cpp | 22 ++++++++++++++++++- src/Mod/TechDraw/App/DrawProjectSplit.h | 5 ++--- 15 files changed, 49 insertions(+), 52 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawDimHelper.h b/src/Mod/TechDraw/App/DrawDimHelper.h index ad0ac3ee55..7786e0acb0 100644 --- a/src/Mod/TechDraw/App/DrawDimHelper.h +++ b/src/Mod/TechDraw/App/DrawDimHelper.h @@ -23,9 +23,6 @@ #ifndef DrawDimHelper_h_ #define DrawDimHelper_h_ -#include - -#include #include #include @@ -33,6 +30,8 @@ #include #include +#include + namespace TechDraw { diff --git a/src/Mod/TechDraw/App/DrawGeomHatch.h b/src/Mod/TechDraw/App/DrawGeomHatch.h index 59efbea39d..1c65d0bd9c 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatch.h +++ b/src/Mod/TechDraw/App/DrawGeomHatch.h @@ -23,13 +23,12 @@ #ifndef TechDraw_DrawGeomHatch_h_ #define TechDraw_DrawGeomHatch_h_ -#include -#include - #include #include #include -#include +#include + +#include "HatchLine.h" class TopoDS_Edge; diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp index 95f4580d28..61c460393e 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp @@ -21,11 +21,11 @@ #include "PreCompiled.h" #include "DrawGeomHatch.h" - // inclusion of the generated files (generated out of DrawGeomHatchPy.xml) #include #include + using namespace TechDraw; // returns a string which represents the object e.g. when printed in python diff --git a/src/Mod/TechDraw/App/DrawHatch.h b/src/Mod/TechDraw/App/DrawHatch.h index b1c9cd9cf0..ad4c354fdd 100644 --- a/src/Mod/TechDraw/App/DrawHatch.h +++ b/src/Mod/TechDraw/App/DrawHatch.h @@ -23,12 +23,11 @@ #ifndef TechDraw_DrawHatch_h_ #define TechDraw_DrawHatch_h_ -#include - #include #include #include -#include +#include + namespace App { class Color; diff --git a/src/Mod/TechDraw/App/DrawHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawHatchPyImp.cpp index 6b18bffcef..14e8a90366 100644 --- a/src/Mod/TechDraw/App/DrawHatchPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawHatchPyImp.cpp @@ -23,11 +23,11 @@ #include "PreCompiled.h" #include "DrawHatch.h" - // inclusion of the generated files (generated out of DrawHatchPy.xml) #include #include + using namespace TechDraw; // returns a string which represents the object e.g. when printed in python @@ -36,12 +36,6 @@ std::string DrawHatchPy::representation() const return std::string(""); } - - - - - - PyObject *DrawHatchPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; diff --git a/src/Mod/TechDraw/App/DrawLeaderLine.h b/src/Mod/TechDraw/App/DrawLeaderLine.h index 308c471561..a52c4a7ef7 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLine.h +++ b/src/Mod/TechDraw/App/DrawLeaderLine.h @@ -23,12 +23,11 @@ #ifndef TechDraw_DrawLeaderLine_h_ #define TechDraw_DrawLeaderLine_h_ +#include +#include +#include #include -# include -# include -# include - #include "DrawView.h" diff --git a/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp b/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp index a7a19cf6b2..bf7f749f4e 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp +++ b/src/Mod/TechDraw/App/DrawLeaderLinePyImp.cpp @@ -21,20 +21,13 @@ ***************************************************************************/ #include "PreCompiled.h" -#ifndef _PreComp_ -#endif - -#include -#include -#include #include "DrawLeaderLine.h" - // inclusion of the generated files (generated out of DrawLeaderLinePy.xml) -#include #include #include + using namespace TechDraw; // returns a string which represents the object e.g. when printed in python diff --git a/src/Mod/TechDraw/App/DrawPage.h b/src/Mod/TechDraw/App/DrawPage.h index df51c2f431..5d16d0cf01 100644 --- a/src/Mod/TechDraw/App/DrawPage.h +++ b/src/Mod/TechDraw/App/DrawPage.h @@ -23,14 +23,13 @@ #ifndef DrawPage_h_ #define DrawPage_h_ -#include - #include #include #include -#include -#include +#include + +#include "DrawViewPart.h" namespace TechDraw diff --git a/src/Mod/TechDraw/App/DrawPagePyImp.cpp b/src/Mod/TechDraw/App/DrawPagePyImp.cpp index 153240d86d..9f51bf08ae 100644 --- a/src/Mod/TechDraw/App/DrawPagePyImp.cpp +++ b/src/Mod/TechDraw/App/DrawPagePyImp.cpp @@ -9,14 +9,14 @@ #include "DrawViewPart.h" #include "DrawProjGroup.h" #include "DrawProjGroupItem.h" - // inclusion of the generated files -#include -#include -#include -#include #include #include +#include +#include +#include +#include + using namespace TechDraw; diff --git a/src/Mod/TechDraw/App/DrawParametricTemplate.h b/src/Mod/TechDraw/App/DrawParametricTemplate.h index c38604599c..c3f6c7b414 100644 --- a/src/Mod/TechDraw/App/DrawParametricTemplate.h +++ b/src/Mod/TechDraw/App/DrawParametricTemplate.h @@ -23,10 +23,9 @@ #ifndef TECHDRAW_DrawParametricTemplate_h_ #define TECHDRAW_DrawParametricTemplate_h_ -#include - #include #include +#include #include "DrawTemplate.h" #include "Geometry.h" diff --git a/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp b/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp index 1aed442715..f575dd2781 100644 --- a/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp +++ b/src/Mod/TechDraw/App/DrawParametricTemplatePyImp.cpp @@ -26,11 +26,11 @@ #endif #include "DrawParametricTemplate.h" - // inclusion of the generated files (generated out of DrawParametricTemplateSFPy.xml) #include #include + using namespace TechDraw; // returns a string which represents the object e.g. when printed in python diff --git a/src/Mod/TechDraw/App/DrawProjGroup.h b/src/Mod/TechDraw/App/DrawProjGroup.h index d29bd0639b..990ffb63d2 100644 --- a/src/Mod/TechDraw/App/DrawProjGroup.h +++ b/src/Mod/TechDraw/App/DrawProjGroup.h @@ -23,15 +23,14 @@ #ifndef TECHDRAW_FEATUREVIEWGROUP_H_ #define TECHDRAW_FEATUREVIEWGROUP_H_ -#include - #include -# include +#include #include #include #include #include +#include #include "DrawViewCollection.h" diff --git a/src/Mod/TechDraw/App/DrawProjGroupItem.h b/src/Mod/TechDraw/App/DrawProjGroupItem.h index c0ec0b98c4..e394f5450a 100644 --- a/src/Mod/TechDraw/App/DrawProjGroupItem.h +++ b/src/Mod/TechDraw/App/DrawProjGroupItem.h @@ -23,13 +23,11 @@ #ifndef DrawProjGroupItem_h_ #define DrawProjGroupItem_h_ -#include - #include #include -#include #include +#include #include "DrawViewPart.h" diff --git a/src/Mod/TechDraw/App/DrawProjGroupItemPyImp.cpp b/src/Mod/TechDraw/App/DrawProjGroupItemPyImp.cpp index 1bb04e721e..2b32dddae1 100644 --- a/src/Mod/TechDraw/App/DrawProjGroupItemPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawProjGroupItemPyImp.cpp @@ -1,12 +1,32 @@ +/*************************************************************************** + * Copyright (c) 2016 WandererFan * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + #include "PreCompiled.h" #include "DrawProjGroupItem.h" - // inclusion of the generated files (generated out of DrawProjGroupItemPy.xml) #include #include + using namespace TechDraw; // returns a string which represents the object e.g. when printed in python diff --git a/src/Mod/TechDraw/App/DrawProjectSplit.h b/src/Mod/TechDraw/App/DrawProjectSplit.h index 390bfd20b4..f23ab7e766 100644 --- a/src/Mod/TechDraw/App/DrawProjectSplit.h +++ b/src/Mod/TechDraw/App/DrawProjectSplit.h @@ -23,18 +23,17 @@ #ifndef DrawProjectSplit_h_ #define DrawProjectSplit_h_ -#include - #include #include #include #include - +#include #include "DrawUtil.h" #include "Geometry.h" + class gp_Pnt; class gp_Ax2;