r21644 by jghali - fix inconsistent line endings

scribus-commit scribus-commit at lists.scribus.net
Sun Dec 11 22:19:19 UTC 2016


Author: jghali
Date: Sun Dec 11 22:19:19 2016
New Revision: 21644

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21644
Log:
fix inconsistent line endings

Modified:
    trunk/Scribus/scribus/scclocale.cpp
    trunk/Scribus/scribus/scclocale.h

Modified: trunk/Scribus/scribus/scclocale.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21644&path=/trunk/Scribus/scribus/scclocale.cpp
==============================================================================
--- trunk/Scribus/scribus/scclocale.cpp	(original)
+++ trunk/Scribus/scribus/scclocale.cpp	Sun Dec 11 22:19:19 2016
@@ -1,62 +1,62 @@
-//
-// C++ Implementation: sclocale
-//
-// Description: 
-//
-//
-// Author: Pierre Marchand <pierremarc at oep-h.com>, (C) 2009
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
-
-#include "scclocale.h"
-
-#include <cstdlib>
-
-#include <QByteArray>
-#include <QDebug>
-
-ScCLocale * ScCLocale::m_instance = 0;
-ScCLocale::ScCLocale()
-	:qLocale(QLocale::C)
-{
-	qLocale.setNumberOptions(QLocale::OmitGroupSeparator);
-
-#if defined(Q_OS_WIN)
-	cLocale = _create_locale(LC_ALL, "C");
-#else
-  #if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_FREEBSD) and not defined(Q_OS_HAIKU)
-	cLocale = newlocale(LC_ALL_MASK, "C", NULL);
-  #endif
-#endif
-}
-
-ScCLocale::~ScCLocale()
-{
-#if defined(Q_OS_WIN)
-	_free_locale(cLocale);
-#else
-  #if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_FREEBSD) and not defined(Q_OS_HAIKU)
-	freelocale(cLocale);
-  #endif
-#endif
-}
-
-ScCLocale * ScCLocale::that()
-{
-	if(!m_instance)
-	{
-		m_instance = new ScCLocale();
-		Q_ASSERT(m_instance);
-	}
-	return m_instance;
-}
-
-// The code of this function has been borrowed
-// from Qt SVG module
-double ScCLocale::toDoubleC(const QChar *&str)
-{
+//
+// C++ Implementation: sclocale
+//
+// Description: 
+//
+//
+// Author: Pierre Marchand <pierremarc at oep-h.com>, (C) 2009
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include "scclocale.h"
+
+#include <cstdlib>
+
+#include <QByteArray>
+#include <QDebug>
+
+ScCLocale * ScCLocale::m_instance = 0;
+ScCLocale::ScCLocale()
+	:qLocale(QLocale::C)
+{
+	qLocale.setNumberOptions(QLocale::OmitGroupSeparator);
+
+#if defined(Q_OS_WIN)
+	cLocale = _create_locale(LC_ALL, "C");
+#else
+  #if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_FREEBSD) and not defined(Q_OS_HAIKU)
+	cLocale = newlocale(LC_ALL_MASK, "C", NULL);
+  #endif
+#endif
+}
+
+ScCLocale::~ScCLocale()
+{
+#if defined(Q_OS_WIN)
+	_free_locale(cLocale);
+#else
+  #if not defined(Q_OS_SOLARIS) and not defined(Q_OS_OPENBSD) and not defined(Q_OS_FREEBSD) and not defined(Q_OS_HAIKU)
+	freelocale(cLocale);
+  #endif
+#endif
+}
+
+ScCLocale * ScCLocale::that()
+{
+	if(!m_instance)
+	{
+		m_instance = new ScCLocale();
+		Q_ASSERT(m_instance);
+	}
+	return m_instance;
+}
+
+// The code of this function has been borrowed
+// from Qt SVG module
+double ScCLocale::toDoubleC(const QChar *&str)
+{
 	const int maxLen = 255;//technically doubles can go til 308+ but whatever
 	char temp[maxLen+1];
 	int pos = 0;
@@ -128,79 +128,79 @@
 	} else {
 		val = QByteArray::fromRawData(temp, pos).toDouble();
 	}
-	return val;
-}
-
-double ScCLocale::toDoubleC(const QString & str, bool * ok) 
-{
-	double ret( that()->qLocale.toDouble(str, ok) );
-	return ret;
-}
-
-double ScCLocale::toDoubleC(const QString& str, double defValue)
-{
-	double ret = defValue;
-	if (!str.isEmpty())
-	{
-		bool ok  = false;
-		double d = ScCLocale::toDoubleC(str, &ok);
-		if (ok)
-			ret = d;
-	}
-	return ret;
-}
-
-float ScCLocale::toFloatC(const QString & str, bool * ok) 
-{
-	double ret( that()->qLocale.toFloat(str, ok) );
-	return ret;
-}
-
-float ScCLocale::toFloatC(const QString& str, float defValue)
-{
-	double ret = defValue;
-	if (!str.isEmpty())
-	{
-		bool ok  = false;
-		double d = ScCLocale::toFloatC(str, &ok);
-		if (ok)
-			ret = d;
-	}
-	return ret;
-}
-
-QString ScCLocale::toQStringC(double d, int prec)
-{
-	return that()->qLocale.toString(d, 'f', prec);
-}
-
-double ScCLocale::strtod ( const char * str, char ** endptr )
-{
-	if(NULL == that()->cLocale)
-	{
-		// a sade workaround
-		double result(0.0);
-		setlocale(LC_NUMERIC, "C");
-		result = std::strtod(str, endptr);
-		setlocale(LC_NUMERIC, "");
-		return result;
-	}
-	else
-	{
-#if defined(Q_OS_WIN)
-		return _strtod_l(str, endptr, that()->cLocale);
-#else
-  #if defined(Q_OS_SOLARIS) or defined (Q_OS_OPENBSD) or defined(Q_OS_FREEBSD) or defined(Q_OS_HAIKU)
-		char *oldlocale=setlocale(LC_NUMERIC, NULL);
-		double result(0.0);
-		setlocale(LC_NUMERIC, "C");
-		result = std::strtod(str, endptr);
-		setlocale(LC_NUMERIC, oldlocale);
-		return result;
-  #else
-		return strtod_l(str, endptr, that()->cLocale);
-  #endif
-#endif
-	}
-}
-
+	return val;
+}
+
+double ScCLocale::toDoubleC(const QString & str, bool * ok) 
+{
+	double ret( that()->qLocale.toDouble(str, ok) );
+	return ret;
+}
+
+double ScCLocale::toDoubleC(const QString& str, double defValue)
+{
+	double ret = defValue;
+	if (!str.isEmpty())
+	{
+		bool ok  = false;
+		double d = ScCLocale::toDoubleC(str, &ok);
+		if (ok)
+			ret = d;
+	}
+	return ret;
+}
+
+float ScCLocale::toFloatC(const QString & str, bool * ok) 
+{
+	double ret( that()->qLocale.toFloat(str, ok) );
+	return ret;
+}
+
+float ScCLocale::toFloatC(const QString& str, float defValue)
+{
+	double ret = defValue;
+	if (!str.isEmpty())
+	{
+		bool ok  = false;
+		double d = ScCLocale::toFloatC(str, &ok);
+		if (ok)
+			ret = d;
+	}
+	return ret;
+}
+
+QString ScCLocale::toQStringC(double d, int prec)
+{
+	return that()->qLocale.toString(d, 'f', prec);
+}
+
+double ScCLocale::strtod ( const char * str, char ** endptr )
+{
+	if(NULL == that()->cLocale)
+	{
+		// a sade workaround
+		double result(0.0);
+		setlocale(LC_NUMERIC, "C");
+		result = std::strtod(str, endptr);
+		setlocale(LC_NUMERIC, "");
+		return result;
+	}
+	else
+	{
+#if defined(Q_OS_WIN)
+		return _strtod_l(str, endptr, that()->cLocale);
+#else
+  #if defined(Q_OS_SOLARIS) or defined (Q_OS_OPENBSD) or defined(Q_OS_FREEBSD) or defined(Q_OS_HAIKU)
+		char *oldlocale=setlocale(LC_NUMERIC, NULL);
+		double result(0.0);
+		setlocale(LC_NUMERIC, "C");
+		result = std::strtod(str, endptr);
+		setlocale(LC_NUMERIC, oldlocale);
+		return result;
+  #else
+		return strtod_l(str, endptr, that()->cLocale);
+  #endif
+#endif
+	}
+}
+

Modified: trunk/Scribus/scribus/scclocale.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21644&path=/trunk/Scribus/scribus/scclocale.h
==============================================================================
--- trunk/Scribus/scribus/scclocale.h	(original)
+++ trunk/Scribus/scribus/scclocale.h	Sun Dec 11 22:19:19 2016
@@ -1,72 +1,72 @@
-//
-// C++ Interface: sclocale
-//
-// Description: 
-//
-//
-// Author: Pierre Marchand <pierremarc at oep-h.com>, (C) 2009
-//
-// Copyright: See COPYING file that comes with this distribution
-//
-//
-
-#ifndef SCCLOCALE_H
-#define SCCLOCALE_H
-
-#include <QLocale>
-#include <QString>
-
-#include <clocale>
-#if defined(Q_OS_MAC)
-#include <xlocale.h>
-#endif
-
-#if defined(Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)
-#include <locale.h>
-#endif
-
-#if defined(Q_OS_WIN)
-#define XLocaleType _locale_t
-#else
-  #if defined (Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)
-  #define XLocaleType char*   //dummy?
-  #else
-  #define XLocaleType locale_t
-  #endif
-#endif
-
-#include "scribusapi.h"
-
-class SCRIBUS_API ScCLocale
-{
-	ScCLocale();
-	~ScCLocale();
-	QLocale qLocale;
-	XLocaleType cLocale;
-
-	static ScCLocale * m_instance;
-	static ScCLocale * that();
-	
-	public:
-		static inline bool isDigit(ushort ch);
-		static double toDoubleC(const QChar *&str);
-		static double toDoubleC(const QString& str, bool * ok = 0);
-		static double toDoubleC(const QString& str, double defValue);
-		static float toFloatC(const QString& str, bool * ok = 0);
-		static float toFloatC(const QString& str, float defValue);
-		static QString toQStringC(double d, int prec = 3);
-		static double strtod ( const char * str, char ** endptr );
-		
-};
-
-// The code of this function has been borrowed from Qt SVG module
+//
+// C++ Interface: sclocale
+//
+// Description: 
+//
+//
+// Author: Pierre Marchand <pierremarc at oep-h.com>, (C) 2009
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef SCCLOCALE_H
+#define SCCLOCALE_H
+
+#include <QLocale>
+#include <QString>
+
+#include <clocale>
+#if defined(Q_OS_MAC)
+#include <xlocale.h>
+#endif
+
+#if defined(Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)
+#include <locale.h>
+#endif
+
+#if defined(Q_OS_WIN)
+#define XLocaleType _locale_t
+#else
+  #if defined (Q_OS_SOLARIS) || defined (Q_OS_OPENBSD) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)
+  #define XLocaleType char*   //dummy?
+  #else
+  #define XLocaleType locale_t
+  #endif
+#endif
+
+#include "scribusapi.h"
+
+class SCRIBUS_API ScCLocale
+{
+	ScCLocale();
+	~ScCLocale();
+	QLocale qLocale;
+	XLocaleType cLocale;
+
+	static ScCLocale * m_instance;
+	static ScCLocale * that();
+	
+	public:
+		static inline bool isDigit(ushort ch);
+		static double toDoubleC(const QChar *&str);
+		static double toDoubleC(const QString& str, bool * ok = 0);
+		static double toDoubleC(const QString& str, double defValue);
+		static float toFloatC(const QString& str, bool * ok = 0);
+		static float toFloatC(const QString& str, float defValue);
+		static QString toQStringC(double d, int prec = 3);
+		static double strtod ( const char * str, char ** endptr );
+		
+};
+
+// The code of this function has been borrowed from Qt SVG module
 inline bool ScCLocale::isDigit(ushort ch)
 {
 	static quint16 magic = 0x3ff;
 	return ((ch >> 4) == 3) && (magic >> (ch & 15));
-}
-
-#endif // SCCLOCALE_H
-
-
-
+}
+
+#endif // SCCLOCALE_H
+
+
+




More information about the scribus-commit mailing list