[Libreoffice-commits] libcdr.git: 2 commits - src/conv src/lib

David Tardon dtardon at redhat.com
Fri Feb 2 18:01:23 UTC 2018


 src/conv/svg/cdr2xhtml.cpp      |    1 -
 src/conv/svg/cmx2xhtml.cpp      |    1 -
 src/lib/CDRCollector.cpp        |    5 ++++-
 src/lib/CDRCollector.h          |   16 +++++++---------
 src/lib/CDRContentCollector.cpp |    5 +++--
 src/lib/CDRContentCollector.h   |    7 +++++--
 src/lib/CDRDocument.cpp         |    1 -
 src/lib/CDRInternalStream.cpp   |    4 ++--
 src/lib/CDROutputElementList.h  |    4 +---
 src/lib/CDRParser.cpp           |    3 ++-
 src/lib/CDRPath.cpp             |    6 ++++--
 src/lib/CDRPath.h               |    1 +
 src/lib/CDRStylesCollector.cpp  |    3 +--
 src/lib/CDRStylesCollector.h    |   11 ++++++-----
 src/lib/CDRTransforms.cpp       |    2 +-
 src/lib/CDRTransforms.h         |    2 --
 src/lib/CDRTypes.cpp            |    2 +-
 src/lib/CDRTypes.h              |    1 +
 src/lib/CMXDocument.cpp         |    3 ---
 src/lib/CMXParser.cpp           |   12 ++++++------
 src/lib/CMXParser.h             |    5 +++--
 src/lib/CommonParser.cpp        |    7 +++++--
 src/lib/CommonParser.h          |    9 +++++++--
 src/lib/libcdr_utils.cpp        |    4 ++--
 src/lib/libcdr_utils.h          |    1 -
 25 files changed, 62 insertions(+), 54 deletions(-)

New commits:
commit 1e903849a5166728f37ed4604b953f7d6d40574c
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Feb 2 19:00:58 2018 +0100

    include own headers first
    
    Change-Id: I23299ee382d556bb13554d8a7a06135ee6b45fae

diff --git a/src/lib/CDRCollector.cpp b/src/lib/CDRCollector.cpp
index fae0069..0119a54 100644
--- a/src/lib/CDRCollector.cpp
+++ b/src/lib/CDRCollector.cpp
@@ -7,11 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "CDRCollector.h"
+
 #include <math.h>
 #include <stack>
 #include <string.h>
 #include <lcms2.h>
-#include "CDRCollector.h"
 #include "CDRColorProfiles.h"
 #include "libcdr_utils.h"
 
diff --git a/src/lib/CDRContentCollector.cpp b/src/lib/CDRContentCollector.cpp
index 88e6106..0487319 100644
--- a/src/lib/CDRContentCollector.cpp
+++ b/src/lib/CDRContentCollector.cpp
@@ -7,11 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "CDRContentCollector.h"
+
 #include <math.h>
 #include <string.h>
 #include <librevenge/librevenge.h>
 #include <libcdr/libcdr.h>
-#include "CDRContentCollector.h"
 #include "CDROutputElementList.h"
 #include "libcdr_utils.h"
 
diff --git a/src/lib/CDRInternalStream.cpp b/src/lib/CDRInternalStream.cpp
index 465bdd0..d8171d7 100644
--- a/src/lib/CDRInternalStream.cpp
+++ b/src/lib/CDRInternalStream.cpp
@@ -7,8 +7,9 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <zlib.h>
 #include "CDRInternalStream.h"
+
+#include <zlib.h>
 #include <string.h>  // for memcpy
 
 
diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp
index 0744305..6528d32 100644
--- a/src/lib/CDRParser.cpp
+++ b/src/lib/CDRParser.cpp
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "CDRParser.h"
+
 #include <locale.h>
 #include <math.h>
 #include <string.h>
@@ -23,7 +25,6 @@
 #include "libcdr_utils.h"
 #include "CDRDocumentStructure.h"
 #include "CDRInternalStream.h"
-#include "CDRParser.h"
 #include "CDRCollector.h"
 #include "CDRColorPalettes.h"
 
diff --git a/src/lib/CDRPath.cpp b/src/lib/CDRPath.cpp
index 00534b0..e31581e 100644
--- a/src/lib/CDRPath.cpp
+++ b/src/lib/CDRPath.cpp
@@ -7,10 +7,11 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "CDRPath.h"
+
 #include <math.h>
 #include <map>
 
-#include "CDRPath.h"
 #include "CDRTransforms.h"
 
 #ifndef DEBUG_SPLINES
diff --git a/src/lib/CDRStylesCollector.cpp b/src/lib/CDRStylesCollector.cpp
index ddb8397..2dfeba2 100644
--- a/src/lib/CDRStylesCollector.cpp
+++ b/src/lib/CDRStylesCollector.cpp
@@ -8,6 +8,7 @@
  */
 
 #include "CDRStylesCollector.h"
+
 #include "CDRInternalStream.h"
 #include "libcdr_utils.h"
 
diff --git a/src/lib/CMXParser.cpp b/src/lib/CMXParser.cpp
index 2a4cc47..78cc417 100644
--- a/src/lib/CMXParser.cpp
+++ b/src/lib/CMXParser.cpp
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "CMXParser.h"
+
 #include <librevenge-stream/librevenge-stream.h>
 
 #include <math.h>
@@ -15,7 +17,6 @@
 
 #include "libcdr_utils.h"
 #include "CDRPath.h"
-#include "CMXParser.h"
 #include "CDRCollector.h"
 #include "CDRDocumentStructure.h"
 #include "CMXDocumentStructure.h"
diff --git a/src/lib/CommonParser.cpp b/src/lib/CommonParser.cpp
index 15a56ef..242b777 100644
--- a/src/lib/CommonParser.cpp
+++ b/src/lib/CommonParser.cpp
@@ -7,12 +7,13 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "CommonParser.h"
+
 #include <string.h>
 
 #include "CDRCollector.h"
 #include "CDRPath.h"
 #include "libcdr_utils.h"
-#include "CommonParser.h"
 
 libcdr::CommonParser::CommonParser(libcdr::CDRCollector *collector)
   : m_collector(collector), m_precision(libcdr::PRECISION_UNKNOWN) {}
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 0db5a5c..09ab42e 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -7,13 +7,13 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "libcdr_utils.h"
+
 #include <cassert>
 #include <cstdarg>
 #include <cstdio>
 #include <string.h>
 
-#include "libcdr_utils.h"
-
 #include <unicode/ucsdet.h>
 #include <unicode/ucnv.h>
 #include <unicode/utypes.h>
commit 806ae992ed9b585225115d91599e1a50bb4a9d7f
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Feb 2 18:54:49 2018 +0100

    iwyu: prune includes
    
    Change-Id: Ie32a55488f4acffa2dd11109a230f5ce3a7acdb0

diff --git a/src/conv/svg/cdr2xhtml.cpp b/src/conv/svg/cdr2xhtml.cpp
index 5ccaab6..871ac57 100644
--- a/src/conv/svg/cdr2xhtml.cpp
+++ b/src/conv/svg/cdr2xhtml.cpp
@@ -12,7 +12,6 @@
 #endif
 
 #include <iostream>
-#include <sstream>
 #include <stdio.h>
 #include <string.h>
 #include <librevenge/librevenge.h>
diff --git a/src/conv/svg/cmx2xhtml.cpp b/src/conv/svg/cmx2xhtml.cpp
index ebcf79c..289b27f 100644
--- a/src/conv/svg/cmx2xhtml.cpp
+++ b/src/conv/svg/cmx2xhtml.cpp
@@ -12,7 +12,6 @@
 #endif
 
 #include <iostream>
-#include <sstream>
 #include <stdio.h>
 #include <string.h>
 #include <librevenge/librevenge.h>
diff --git a/src/lib/CDRCollector.cpp b/src/lib/CDRCollector.cpp
index 285f5e6..fae0069 100644
--- a/src/lib/CDRCollector.cpp
+++ b/src/lib/CDRCollector.cpp
@@ -8,9 +8,11 @@
  */
 
 #include <math.h>
+#include <stack>
 #include <string.h>
 #include <lcms2.h>
 #include "CDRCollector.h"
+#include "CDRColorProfiles.h"
 #include "libcdr_utils.h"
 
 libcdr::CDRParserState::CDRParserState()
diff --git a/src/lib/CDRCollector.h b/src/lib/CDRCollector.h
index 52c626a..7acad54 100644
--- a/src/lib/CDRCollector.h
+++ b/src/lib/CDRCollector.h
@@ -11,24 +11,22 @@
 #define __CDRCOLLECTOR_H__
 
 #include <map>
+#include <utility>
 #include <vector>
-#include <stack>
+
 #include <librevenge/librevenge.h>
 #include <librevenge-stream/librevenge-stream.h>
+
 #include <lcms2.h>
-#include "CDRTypes.h"
-#include "CDRPath.h"
-#include "CDROutputElementList.h"
-#include "libcdr_utils.h"
 
-namespace
-{
-#include "CDRColorProfiles.h"
-}
+#include "CDRTypes.h"
 
 namespace libcdr
 {
 
+class CDRPath;
+class CDRTransforms;
+
 class CDRParserState
 {
 public:
diff --git a/src/lib/CDRContentCollector.cpp b/src/lib/CDRContentCollector.cpp
index b554fd1..88e6106 100644
--- a/src/lib/CDRContentCollector.cpp
+++ b/src/lib/CDRContentCollector.cpp
@@ -12,7 +12,7 @@
 #include <librevenge/librevenge.h>
 #include <libcdr/libcdr.h>
 #include "CDRContentCollector.h"
-#include "CDRInternalStream.h"
+#include "CDROutputElementList.h"
 #include "libcdr_utils.h"
 
 #ifndef DUMP_PATTERN
diff --git a/src/lib/CDRContentCollector.h b/src/lib/CDRContentCollector.h
index 438802d..e0cbf86 100644
--- a/src/lib/CDRContentCollector.h
+++ b/src/lib/CDRContentCollector.h
@@ -11,14 +11,17 @@
 #define __CDRCONTENTCOLLECTOR_H__
 
 #include <map>
+#include <utility>
 #include <vector>
 #include <stack>
 #include <queue>
+
 #include <librevenge/librevenge.h>
-#include <lcms2.h>
+
+#include "CDROutputElementList.h"
+#include "CDRTransforms.h"
 #include "CDRTypes.h"
 #include "CDRPath.h"
-#include "CDROutputElementList.h"
 #include "CDRCollector.h"
 
 namespace libcdr
diff --git a/src/lib/CDRDocument.cpp b/src/lib/CDRDocument.cpp
index 7827d5a..96f652e 100644
--- a/src/lib/CDRDocument.cpp
+++ b/src/lib/CDRDocument.cpp
@@ -9,7 +9,6 @@
 
 #include <memory>
 #include <string>
-#include <string.h>
 
 #include <libcdr/libcdr.h>
 #include "CDRParser.h"
diff --git a/src/lib/CDRInternalStream.cpp b/src/lib/CDRInternalStream.cpp
index d06ea2e..465bdd0 100644
--- a/src/lib/CDRInternalStream.cpp
+++ b/src/lib/CDRInternalStream.cpp
@@ -9,7 +9,6 @@
 
 #include <zlib.h>
 #include "CDRInternalStream.h"
-#include "libcdr_utils.h"
 #include <string.h>  // for memcpy
 
 
diff --git a/src/lib/CDROutputElementList.h b/src/lib/CDROutputElementList.h
index c1f245c..d1a4991 100644
--- a/src/lib/CDROutputElementList.h
+++ b/src/lib/CDROutputElementList.h
@@ -10,10 +10,8 @@
 #ifndef __CDROUTPUTELEMENTLIST_H__
 #define __CDROUTPUTELEMENTLIST_H__
 
-#include <map>
-#include <list>
 #include <vector>
-#include <librevenge/librevenge.h>
+
 #include <librevenge/librevenge.h>
 
 namespace libcdr
diff --git a/src/lib/CDRPath.cpp b/src/lib/CDRPath.cpp
index e2a66a8..00534b0 100644
--- a/src/lib/CDRPath.cpp
+++ b/src/lib/CDRPath.cpp
@@ -9,8 +9,9 @@
 
 #include <math.h>
 #include <map>
+
 #include "CDRPath.h"
-#include "CDRTypes.h"
+#include "CDRTransforms.h"
 
 #ifndef DEBUG_SPLINES
 #define DEBUG_SPLINES 0
diff --git a/src/lib/CDRPath.h b/src/lib/CDRPath.h
index eb064b5..90fe0de 100644
--- a/src/lib/CDRPath.h
+++ b/src/lib/CDRPath.h
@@ -10,6 +10,7 @@
 #ifndef __CDRPATH_H__
 #define __CDRPATH_H__
 
+#include <utility>
 #include <vector>
 #include <librevenge/librevenge.h>
 
diff --git a/src/lib/CDRStylesCollector.cpp b/src/lib/CDRStylesCollector.cpp
index c1c23ae..ddb8397 100644
--- a/src/lib/CDRStylesCollector.cpp
+++ b/src/lib/CDRStylesCollector.cpp
@@ -7,8 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <math.h>
-#include <stack>
 #include "CDRStylesCollector.h"
 #include "CDRInternalStream.h"
 #include "libcdr_utils.h"
diff --git a/src/lib/CDRStylesCollector.h b/src/lib/CDRStylesCollector.h
index 91903ee..00039ce 100644
--- a/src/lib/CDRStylesCollector.h
+++ b/src/lib/CDRStylesCollector.h
@@ -11,19 +11,20 @@
 #define __CDRSTYLESCOLLECTOR_H__
 
 #include <map>
+#include <utility>
 #include <vector>
-#include <stack>
+
 #include <librevenge/librevenge.h>
-#include <lcms2.h>
+
 #include "CDRTypes.h"
-#include "CDRPath.h"
-#include "CDROutputElementList.h"
 #include "CDRCollector.h"
-#include "libcdr_utils.h"
 
 namespace libcdr
 {
 
+class CDRPath;
+class CDRTransforms;
+
 class CDRStylesCollector : public CDRCollector
 {
 public:
diff --git a/src/lib/CDRTransforms.cpp b/src/lib/CDRTransforms.cpp
index 2d2c733..e29303e 100644
--- a/src/lib/CDRTransforms.cpp
+++ b/src/lib/CDRTransforms.cpp
@@ -8,7 +8,7 @@
  */
 
 #include "CDRTransforms.h"
-#include "CDRPath.h"
+
 #include "libcdr_utils.h"
 
 
diff --git a/src/lib/CDRTransforms.h b/src/lib/CDRTransforms.h
index e06a14a..df789de 100644
--- a/src/lib/CDRTransforms.h
+++ b/src/lib/CDRTransforms.h
@@ -11,12 +11,10 @@
 #define __CDRTRANSFORMS_H__
 
 #include <vector>
-#include <math.h>
 #include <librevenge/librevenge.h>
 
 namespace libcdr
 {
-class CDRPath;
 
 class CDRTransform
 {
diff --git a/src/lib/CDRTypes.cpp b/src/lib/CDRTypes.cpp
index 14c84f3..6d61465 100644
--- a/src/lib/CDRTypes.cpp
+++ b/src/lib/CDRTypes.cpp
@@ -8,8 +8,8 @@
  */
 
 #include "CDRTypes.h"
+
 #include "CDRPath.h"
-#include "libcdr_utils.h"
 
 void libcdr::CDRPolygon::create(libcdr::CDRPath &path) const
 {
diff --git a/src/lib/CDRTypes.h b/src/lib/CDRTypes.h
index da732ac..3563b27 100644
--- a/src/lib/CDRTypes.h
+++ b/src/lib/CDRTypes.h
@@ -10,6 +10,7 @@
 #ifndef __CDRTYPES_H__
 #define __CDRTYPES_H__
 
+#include <utility>
 #include <vector>
 #include <math.h>
 #include <librevenge/librevenge.h>
diff --git a/src/lib/CMXDocument.cpp b/src/lib/CMXDocument.cpp
index 4aa63c0..71eb2c4 100644
--- a/src/lib/CMXDocument.cpp
+++ b/src/lib/CMXDocument.cpp
@@ -7,9 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <map>
-#include <string>
-#include <string.h>
 #include <libcdr/libcdr.h>
 #include "CDRDocumentStructure.h"
 #include "CMXParser.h"
diff --git a/src/lib/CMXParser.cpp b/src/lib/CMXParser.cpp
index e98bee5..2a4cc47 100644
--- a/src/lib/CMXParser.cpp
+++ b/src/lib/CMXParser.cpp
@@ -8,14 +8,13 @@
  */
 
 #include <librevenge-stream/librevenge-stream.h>
-#include <cinttypes>
-#include <locale.h>
+
 #include <math.h>
-#include <set>
-#include <string.h>
 #include <stdlib.h>
+#include <utility>
+
 #include "libcdr_utils.h"
-#include "CDRInternalStream.h"
+#include "CDRPath.h"
 #include "CMXParser.h"
 #include "CDRCollector.h"
 #include "CDRDocumentStructure.h"
diff --git a/src/lib/CMXParser.h b/src/lib/CMXParser.h
index bdfc9fb..ffdb861 100644
--- a/src/lib/CMXParser.h
+++ b/src/lib/CMXParser.h
@@ -10,12 +10,13 @@
 #ifndef __CMXPARSER_H__
 #define __CMXPARSER_H__
 
-#include <stdio.h>
-#include <iostream>
 #include <vector>
 #include <map>
 #include <memory>
+
 #include <librevenge-stream/librevenge-stream.h>
+
+#include "CDRTransforms.h"
 #include "CDRTypes.h"
 #include "CommonParser.h"
 
diff --git a/src/lib/CommonParser.cpp b/src/lib/CommonParser.cpp
index 2c3e4e4..15a56ef 100644
--- a/src/lib/CommonParser.cpp
+++ b/src/lib/CommonParser.cpp
@@ -8,7 +8,9 @@
  */
 
 #include <string.h>
-#include <librevenge-stream/librevenge-stream.h>
+
+#include "CDRCollector.h"
+#include "CDRPath.h"
 #include "libcdr_utils.h"
 #include "CommonParser.h"
 
diff --git a/src/lib/CommonParser.h b/src/lib/CommonParser.h
index 2674977..5c46171 100644
--- a/src/lib/CommonParser.h
+++ b/src/lib/CommonParser.h
@@ -10,12 +10,17 @@
 #ifndef __COMMONPARSER_H__
 #define __COMMONPARSER_H__
 
-#include "CDRCollector.h"
-#include "CDRPath.h"
+#include <utility>
+#include <vector>
+
+#include <librevenge-stream/librevenge-stream.h>
 
 namespace libcdr
 {
 
+class CDRCollector;
+class CDRPath;
+
 enum CoordinatePrecision
 { PRECISION_UNKNOWN = 0, PRECISION_16BIT, PRECISION_32BIT };
 
diff --git a/src/lib/libcdr_utils.h b/src/lib/libcdr_utils.h
index 4a69495..a475112 100644
--- a/src/lib/libcdr_utils.h
+++ b/src/lib/libcdr_utils.h
@@ -14,7 +14,6 @@
 #include "config.h"
 #endif
 
-#include <string>
 #include <math.h>
 #include <vector>
 


More information about the Libreoffice-commits mailing list