# HG changeset patch
# User insilmaril
# Date 1138115388 0
# Node ID 90969608255c304ece1e8a6febfd2dbb3ff91ece
# Parent  2658871fdda493d3db7c2dfb78903ee59dcb6387
Introduced basic export to Open Document format

diff -r 2658871fdda4 -r 90969608255c settings.cpp
--- a/settings.cpp	Tue Jan 24 15:09:48 2006 +0000
+++ b/settings.cpp	Tue Jan 24 15:09:48 2006 +0000
@@ -1,42 +1,10 @@
 #include <iostream>
 #include <qregexp.h>
 #include "settings.h"
+#include "file.h"
 
 using namespace std;
 
-bool loadStringFromDisk (const QString &fname, QString &s)
-{
-	s="";
-	QFile file ( fname);
-	if ( !file.open( IO_ReadOnly ) ) return false;
-
-	QTextStream ts( &file );
-	ts.setEncoding (QTextStream::UnicodeUTF8);
-	while ( !ts.atEnd() ) 
-		s+=ts.readLine()+"\n"; 
-	file.close();
-	return true;
-}
-
-bool saveStringToDisk (const QString &fname, const QString &s)
-{
-	QFile file( fname);
-
-	file.setName ( fname);
-	if ( !file.open( IO_WriteOnly ) ) 
-	{
-		file.close();
-		return false;
-	}	
-
-	// Write it finally, and write in UTF8, no matter what 
-	QTextStream ts( &file );
-	ts.setEncoding (QTextStream::UnicodeUTF8);
-	ts << s;
-	file.close();
-	return true;
-}
-
 /////////////////////////////////////////////////////////////////
 // SimpleSettings
 /////////////////////////////////////////////////////////////////
diff -r 2658871fdda4 -r 90969608255c settings.h
--- a/settings.h	Tue Jan 24 15:09:48 2006 +0000
+++ b/settings.h	Tue Jan 24 15:09:48 2006 +0000
@@ -9,8 +9,6 @@
 
 // Some helper functions and simplified settings class
 // to read and parse settings e.g.  in undo/redo directories
-bool loadStringFromDisk (const QString &, QString &);
-bool saveStringToDisk (const QString &, const QString &s);
 
 class SimpleSettings
 {