diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-08 14:34:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-08 14:40:08 +0100 |
commit | 344ebc80330cc4f6ff9858ab6d06735568b87bf9 (patch) | |
tree | c36a45109ae5cb2962ff8edd917d749b801ba66e /l10ntools/inc | |
parent | 0841fc0d3bdc6920c42b79c432e2706d7193e865 (diff) |
Freed l10ntools from tools/stream.hxx
Removed completely cases of convoluted code to remove UTF-8 BOM from files
or translate line endings. Hopefully none of this was actually necessary
(on Windows?).
Diffstat (limited to 'l10ntools/inc')
-rw-r--r-- | l10ntools/inc/cfgmerge.hxx | 14 | ||||
-rw-r--r-- | l10ntools/inc/export.hxx | 9 | ||||
-rw-r--r-- | l10ntools/inc/gsicheck.hxx | 8 | ||||
-rw-r--r-- | l10ntools/inc/lngmerge.hxx | 12 | ||||
-rw-r--r-- | l10ntools/inc/xmlparse.hxx | 7 | ||||
-rw-r--r-- | l10ntools/inc/xrmmerge.hxx | 6 |
6 files changed, 29 insertions, 27 deletions
diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx index bd0627e876f0..6c82cc3a1ccb 100644 --- a/l10ntools/inc/cfgmerge.hxx +++ b/l10ntools/inc/cfgmerge.hxx @@ -29,9 +29,13 @@ #ifndef _CFG_MERGE_HXX #define _CFG_MERGE_HXX -#include <boost/unordered_map.hpp> +#include "sal/config.h" + +#include <fstream> #include <vector> +#include "boost/unordered_map.hpp" + typedef boost::unordered_map<rtl::OString, rtl::OString, rtl::OStringHash> OStringHashMap; @@ -68,7 +72,7 @@ public: // class CfgStack // -typedef ::std::vector< CfgStackData* > CfgStackList; +typedef std::vector< CfgStackData* > CfgStackList; class CfgStack { @@ -89,9 +93,9 @@ public: return temp; } - CfgStackData *GetStackData( size_t nPos = LIST_APPEND ); + CfgStackData *GetStackData(); - rtl::OString GetAccessPath( size_t nPos = LIST_APPEND ); + rtl::OString GetAccessPath( size_t nPos ); size_t size() const { return maList.size(); } }; @@ -148,7 +152,7 @@ public: class CfgOutputParser : public CfgParser { protected: - SvFileStream *pOutputStream; + std::ofstream pOutputStream; public: CfgOutputParser(const rtl::OString &rOutputFile); virtual ~CfgOutputParser(); diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index ba086b56de42..52efd998376e 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -31,6 +31,8 @@ #include "sal/config.h" +#include <fstream> + #include <comphelper/string.hxx> #ifndef L10NTOOLS_DIRECTORY_HXX @@ -38,7 +40,6 @@ #include <l10ntools/directory.hxx> #endif -#include <tools/stream.hxx> #include <tools/fsys.hxx> #include <osl/file.hxx> #include <osl/file.h> @@ -263,7 +264,7 @@ class Export private: WordTransformer *pWordTransformer; - SvFileStream aOutput; + std::ofstream aOutput; ResStack aResStack; // stack for parsing recursive @@ -304,8 +305,6 @@ public: static void SetLanguages( std::vector<rtl::OString> val ); static void RemoveUTF8ByteOrderMarker( rtl::OString &rString ); static bool hasUTF8ByteOrderMarker( const rtl::OString &rString ); - static void RemoveUTF8ByteOrderMarkerFromFile(const rtl::OString &rFilename); - static bool fileHasUTF8ByteOrderMarker(const rtl::OString &rString); static rtl::OString QuoteHTML( rtl::OString const &rString ); static bool CopyFile(const rtl::OString& rSource , const rtl::OString& rDest); @@ -321,7 +320,6 @@ public: static void getCurrentDir( std::string& dir ); static rtl::OString GetTimeStamp(); - static sal_Bool ConvertLineEnds( rtl::OString const & sSource, rtl::OString const & sDestination ); static rtl::OString GetNativeFile( rtl::OString const & sSource ); static DirEntry GetTempFile(); @@ -461,7 +459,6 @@ class MergeDataFile private: sal_Bool bErrorLog; rtl::OString sErrorLog; - SvFileStream aErrLog; MergeDataHashMap aMap; std::set<rtl::OString> aLanguageSet; diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx index eaab60042d8d..46b3709032f8 100644 --- a/l10ntools/inc/gsicheck.hxx +++ b/l10ntools/inc/gsicheck.hxx @@ -92,7 +92,7 @@ public: typedef ::std::vector< GSILine* > GSIBlock_Impl; -class LazySvFileStream; +class LazyStream; class GSIBlock { @@ -122,9 +122,9 @@ public: void SetReferenceLine( GSILine* pLine ); sal_Bool CheckSyntax( sal_uLong nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags ); - void WriteError( LazySvFileStream &aErrOut, sal_Bool bRequireSourceLine ); - void WriteCorrect( LazySvFileStream &aOkOut, sal_Bool bRequireSourceLine ); - void WriteFixed( LazySvFileStream &aFixOut ); + void WriteError( LazyStream &aErrOut, sal_Bool bRequireSourceLine ); + void WriteCorrect( LazyStream &aOkOut, sal_Bool bRequireSourceLine ); + void WriteFixed( LazyStream &aFixOut ); }; #endif diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx index d6a0ebd4e2cf..99c852d9bac5 100644 --- a/l10ntools/inc/lngmerge.hxx +++ b/l10ntools/inc/lngmerge.hxx @@ -25,11 +25,15 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -// local includes -#include "export.hxx" + +#include "sal/config.h" + +#include <iosfwd> #include <vector> -typedef ::std::vector< rtl::OString* > LngLineList; +#include "export.hxx" + +typedef std::vector< rtl::OString* > LngLineList; #define LNG_OK 0x0000 #define LNG_FILE_NOTFOUND 0x0001 @@ -56,7 +60,7 @@ private: bool isNextGroup(rtl::OString &sGroup_out, rtl::OString &sLine_in); void ReadLine(const rtl::OString &rLine_in, OStringHashMap &rText_inout); - void WriteSDF(SvFileStream &aSDFStream, OStringHashMap &rText_inout, + void WriteSDF(std::ofstream &aSDFStream, OStringHashMap &rText_inout, const rtl::OString &rPrj, const rtl::OString &rRoot, const rtl::OString &rActFileName, const rtl::OString &rID); public: diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx index e24f8e6df790..94b5e918f863 100644 --- a/l10ntools/inc/xmlparse.hxx +++ b/l10ntools/inc/xmlparse.hxx @@ -33,7 +33,6 @@ #include <expat.h> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include <tools/stream.hxx> #include "export.hxx" #include "xmlutil.hxx" @@ -483,7 +482,6 @@ private: void Comment( const XML_Char *data ); void Default( const XML_Char *s, int len ); - public: /// creates a new parser SimpleXMLParser(); @@ -496,11 +494,6 @@ public: XMLFile *pXMLFileIn // the XMLFile ); - /// parse a memory stream, returns NULL on criticall errors - XMLFile *Execute( - SvMemoryStream *pStream // the stream - ); - /// returns an error struct const XMLError &GetError() { return aErrorInformation; } }; diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx index bcf82e405cb1..d4232c544cf9 100644 --- a/l10ntools/inc/xrmmerge.hxx +++ b/l10ntools/inc/xrmmerge.hxx @@ -26,6 +26,10 @@ * ************************************************************************/ +#include "sal/config.h" + +#include <fstream> + // // XRMResParser // @@ -89,7 +93,7 @@ class XRMResOutputParser : public XRMResParser private: std::vector<rtl::OString> aLanguages; protected: - SvFileStream *pOutputStream; + std::ofstream pOutputStream; public: XRMResOutputParser ( const rtl::OString &rOutputFile ); virtual ~XRMResOutputParser(); |