r23660 by craig - #15852: Apply patch to fix compliation regarding ICU includes.

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 26 20:15:01 UTC 2020


Author: craig
Date: Sun Apr 26 20:15:01 2020
New Revision: 23660

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23660
Log:
#15852: Apply patch to fix compliation regarding ICU includes.
(bkylerussell)

Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/hyphenator.cpp
    trunk/Scribus/scribus/styles/linestyle.cpp
    trunk/Scribus/scribus/text/boxes.cpp
    trunk/Scribus/scribus/text/storytext.cpp
    trunk/Scribus/scribus/text/storytext.h

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23660&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Sun Apr 26 20:15:01 2020
@@ -20,6 +20,15 @@
 if(WIN32)
 	add_definitions(-DQT_DLL)
 endif()
+
+
+include_directories(
+	${CMAKE_SOURCE_DIR}
+	${CMAKE_CURRENT_BINARY_DIR}
+	${CMAKE_CURRENT_SOURCE_DIR}
+	${FREETYPE_INCLUDE_DIRS}
+	${HARFBUZZ_INCLUDE_DIRS}
+)
 
 add_subdirectory(dtd)
 add_subdirectory(colormgmt)
@@ -1151,14 +1160,6 @@
 set(SCRIBUS_ZIP_LIB "scribus_zip_lib")
 set(SCRIBUS_RTF_LIB "scribus_rtf_lib")
 
-include_directories(
-	${CMAKE_SOURCE_DIR}
-	${CMAKE_CURRENT_BINARY_DIR}
-	${CMAKE_CURRENT_SOURCE_DIR}
-	${FREETYPE_INCLUDE_DIRS}
-	${HARFBUZZ_INCLUDE_DIRS}
-)
-
 if (GMAGICK_FOUND)
 	message(STATUS "GMAGICK: Libs: ${GMAGICK_LDFLAGS}, Inc: ${GMAGICK_INCLUDE_DIRS}, Ldflags: ${GMAGICK_LDFLAGS}")
 	include_directories(

Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23660&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp	(original)
+++ trunk/Scribus/scribus/hyphenator.cpp	Sun Apr 26 20:15:01 2020
@@ -29,6 +29,7 @@
 #include <QCursor>
 #include <QCheckBox>
 #include <QByteArray>
+#include <unicode/brkiter.h>
 
 #include "langmgr.h"
 #include "scpaths.h"
@@ -36,6 +37,8 @@
 #include "scribusdoc.h"
 #include "prefsfile.h"
 #include "prefsmanager.h"
+
+using namespace icu;
 
 Hyphenator::Hyphenator(QWidget* parent, ScribusDoc *dok) : QObject( parent ),
 	m_doc(dok),

Modified: trunk/Scribus/scribus/styles/linestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23660&path=/trunk/Scribus/scribus/styles/linestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/styles/linestyle.cpp	(original)
+++ trunk/Scribus/scribus/styles/linestyle.cpp	Sun Apr 26 20:15:01 2020
@@ -15,7 +15,6 @@
 #include "linestyle.h"
 #include "desaxe/saxiohelper.h"
 #include "desaxe/simple_actions.h"
-#include "prefsmanager.h"
 #include "util_math.h"
 
 

Modified: trunk/Scribus/scribus/text/boxes.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23660&path=/trunk/Scribus/scribus/text/boxes.cpp
==============================================================================
--- trunk/Scribus/scribus/text/boxes.cpp	(original)
+++ trunk/Scribus/scribus/text/boxes.cpp	Sun Apr 26 20:15:01 2020
@@ -6,6 +6,7 @@
  */
 
 #include <cmath>
+#include <unicode/brkiter.h>
 
 #include "pageitem.h"
 #include "boxes.h"
@@ -20,6 +21,8 @@
 #include "screenpainter.h"
 #include "itextcontext.h"
 #include "itextsource.h"
+
+using namespace icu;
 
 int GroupBox::pointToPosition(QPointF coord, const StoryText &story) const
 {

Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23660&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp	(original)
+++ trunk/Scribus/scribus/text/storytext.cpp	Sun Apr 26 20:15:01 2020
@@ -22,6 +22,8 @@
 ***************************************************************************/
 
 //#include <QDebug>
+#include <unicode/brkiter.h>
+
 //FIXME: this include must go to sctextstruct.h !
 #include <QList>
 #include <cassert>  //added to make Fedora-5 happy
@@ -40,6 +42,7 @@
 #include "desaxe/simple_actions.h"
 #include "shapedtextcache.h"
 
+using namespace icu;
 
 StoryText::StoryText(ScribusDoc * doc_) : m_doc(doc_)
 {

Modified: trunk/Scribus/scribus/text/storytext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23660&path=/trunk/Scribus/scribus/text/storytext.h
==============================================================================
--- trunk/Scribus/scribus/text/storytext.h	(original)
+++ trunk/Scribus/scribus/text/storytext.h	Sun Apr 26 20:15:01 2020
@@ -29,8 +29,7 @@
 #include <QObject>
 #include <QString>
 #include <QList>
-
-#include <unicode/brkiter.h>
+#include <unicode/uversion.h>
 
 #include "itextsource.h"
 #include "marks.h"
@@ -50,7 +49,9 @@
 class ResourceCollection;
 class ShapedTextCache;
 
-using namespace icu;
+U_NAMESPACE_BEGIN
+class BreakIterator;
+U_NAMESPACE_END
 
 /**
  * This class holds the text of a Scribus textframe and pointers to its
@@ -259,10 +260,10 @@
 	bool isSelected() const;
 	
 	// break iterators
-	static BreakIterator* getGraphemeIterator();
-	static BreakIterator* getWordIterator();
-	static BreakIterator* getSentenceIterator();
-	static BreakIterator* getLineIterator();
+	static icu::BreakIterator* getGraphemeIterator();
+	static icu::BreakIterator* getWordIterator();
+	static icu::BreakIterator* getSentenceIterator();
+	static icu::BreakIterator* getLineIterator();
 
 // layout helpers
 
@@ -295,10 +296,10 @@
 private:
 	ScribusDoc * m_doc;
 	ShapedTextCache* m_shapedTextCache;
-	static BreakIterator* m_graphemeIterator;
-	static BreakIterator* m_wordIterator;
-	static BreakIterator* m_sentenceIterator;
-	static BreakIterator* m_lineIterator;
+	static icu::BreakIterator* m_graphemeIterator;
+	static icu::BreakIterator* m_wordIterator;
+	static icu::BreakIterator* m_sentenceIterator;
+	static icu::BreakIterator* m_lineIterator;
 
 	QString textWithSoftHyphens (int pos, uint len) const;
 	void    insertCharsWithSoftHyphens(int pos, const QString& txt, bool applyNeighbourStyle = false);




More information about the scribus-commit mailing list