From 2e2f1abfd59888af7749429e9016cd1768b9a0a6 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Mon, 5 Aug 2019 01:13:40 +0200 Subject: cleanup includes a bit --- src/extension/extension.cpp | 2 ++ src/extension/extension.h | 4 ++-- src/extension/implementation/implementation.h | 10 +++++----- src/extension/implementation/xslt.cpp | 21 ++++++++++++++------- src/extension/input.cpp | 13 ++++++++----- src/extension/loader.h | 11 ++++++++--- src/extension/output.cpp | 9 +++++++-- src/extension/patheffect.cpp | 4 ++++ src/io/file.cpp | 7 +++++-- src/io/file.h | 13 +++++++++++++ 10 files changed, 68 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index 481283d97..5cf84a7ac 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -35,6 +35,8 @@ #include "prefdialog/parameter.h" #include "prefdialog/widget.h" +#include "xml/repr.h" + namespace Inkscape { namespace Extension { diff --git a/src/extension/extension.h b/src/extension/extension.h index 084b8e76d..a5cbdf481 100644 --- a/src/extension/extension.h +++ b/src/extension/extension.h @@ -15,11 +15,11 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ -#include #include +#include #include -#include "xml/repr.h" +#include #include namespace Glib { diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h index e4922a083..21569ad3c 100644 --- a/src/extension/implementation/implementation.h +++ b/src/extension/implementation/implementation.h @@ -30,12 +30,12 @@ namespace Inkscape { namespace UI { namespace View { class View; -} // namespace View -} // namespace UI +} +} namespace XML { class Node; -} // namespace XML +} namespace Extension { @@ -58,7 +58,7 @@ class ImplementationDocumentCache { Inkscape::UI::View::View * _view; public: ImplementationDocumentCache (Inkscape::UI::View::View * view) { return; }; - + virtual ~ImplementationDocumentCache ( ) { return; }; Inkscape::UI::View::View const * view ( ) { return _view; }; }; @@ -72,7 +72,7 @@ class Implementation { public: // ----- Constructor / destructor ----- Implementation() = default; - + virtual ~Implementation() = default; // ----- Basic functions for all Extension ----- diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp index 8ea8e5a7a..69e876be4 100644 --- a/src/extension/implementation/xslt.cpp +++ b/src/extension/implementation/xslt.cpp @@ -13,21 +13,28 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ -#include -#include "file.h" #include "xslt.h" -#include "../extension.h" -#include "../output.h" -#include "extension/input.h" -#include "io/resource.h" #include #include -#include "document.h" +#include #include #include +#include "document.h" +#include "file.h" + +#include "extension/extension.h" +#include "extension/output.h" +#include "extension/input.h" + +#include "io/resource.h" + +#include "xml/node.h" +#include "xml/repr.h" + + Inkscape::XML::Document * sp_repr_do_read (xmlDocPtr doc, const gchar * default_ns); /* Namespaces */ diff --git a/src/extension/input.cpp b/src/extension/input.cpp index d28d8113a..762aee35b 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -8,13 +8,16 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ -#ifdef HAVE_CONFIG_H -#endif +#include "input.h" -#include "prefdialog/prefdialog.h" -#include "implementation/implementation.h" #include "timer.h" -#include "input.h" + +#include "implementation/implementation.h" + +#include "prefdialog/prefdialog.h" + +#include "xml/repr.h" + /* Inkscape::Extension::Input */ diff --git a/src/extension/loader.h b/src/extension/loader.h index 65e5885f6..c6adbe2ec 100644 --- a/src/extension/loader.h +++ b/src/extension/loader.h @@ -18,6 +18,11 @@ namespace Inkscape { + +namespace XML { +class Document; +} + namespace Extension { /** This class contains the mechanism to load c++ plugins dynamically. @@ -27,7 +32,7 @@ class Loader { public: /** * Sets a base directory where to look for the actual plugin to load. - * + * * @param dir is the path where the plugin should be loaded from. */ void set_base_directory(std::string dir) { @@ -36,14 +41,14 @@ public: /** * Loads plugin dependencies which are needed for the plugin to load. - * + * * @param dep */ bool load_dependency(Dependency *dep); /** * Load the actual implementation of a plugin supplied by the plugin. - * + * * @param doc The xml representation of the INX extension configuration. * @return The implementation of the extension loaded from the plugin. */ diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 05a0de997..0977b9576 100644 --- a/src/extension/output.cpp +++ b/src/extension/output.cpp @@ -9,10 +9,15 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ -#include "prefdialog/prefdialog.h" +#include "output.h" + #include "document.h" + #include "implementation/implementation.h" -#include "output.h" + +#include "prefdialog/prefdialog.h" + +#include "xml/repr.h" /* Inkscape::Extension::Output */ diff --git a/src/extension/patheffect.cpp b/src/extension/patheffect.cpp index 89925f73b..6a347881f 100644 --- a/src/extension/patheffect.cpp +++ b/src/extension/patheffect.cpp @@ -10,10 +10,14 @@ #include "patheffect.h" + #include "db.h" #include "object/sp-defs.h" +#include "xml/repr.h" + + namespace Inkscape { namespace Extension { diff --git a/src/io/file.cpp b/src/io/file.cpp index a87453d47..877429d26 100644 --- a/src/io/file.cpp +++ b/src/io/file.cpp @@ -8,11 +8,11 @@ * */ +#include "file.h" + #include #include -#include "file.h" - #include "document.h" #include "document-undo.h" @@ -24,6 +24,9 @@ #include "object/sp-root.h" +#include "xml/repr.h" + + /** * Create a blank document, remove any template data. * Input: Empty string or template file name. diff --git a/src/io/file.h b/src/io/file.h index 3b53bce4f..1767de2a0 100644 --- a/src/io/file.h +++ b/src/io/file.h @@ -11,6 +11,19 @@ #ifndef INK_FILE_IO_H #define INK_FILE_IO_H +#include + +namespace Gio { +class File; +} + +namespace Glib { +class ustring; + +template +class RefPtr; +} + class SPDocument; SPDocument* ink_file_new(const std::string &Template = nullptr); -- cgit v1.2.3