diff options
Diffstat (limited to 'configmgr/source/writemodfile.hxx')
-rw-r--r-- | configmgr/source/writemodfile.hxx | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/configmgr/source/writemodfile.hxx b/configmgr/source/writemodfile.hxx index 12a09a87dc93..ffa5e30ef5de 100644 --- a/configmgr/source/writemodfile.hxx +++ b/configmgr/source/writemodfile.hxx @@ -27,9 +27,27 @@ namespace configmgr { class Components; struct Data; -void writeData(oslFileHandle handle, OString const & text); -void writeAttributeValue(oslFileHandle handle, OUString const & value); -void writeValueContent(oslFileHandle handle, OUString const & value); +struct TempFile { + OUString url; + oslFileHandle handle; + bool closed; + OStringBuffer buffer; + + TempFile(): handle(0), closed(false) {} + ~TempFile(); + void closeAndRename(const OUString &url); + oslFileError flush(); + oslFileError closeWithoutUnlink(); + void writeString(char const *begin, sal_Int32 length); + +private: + TempFile(const TempFile&) SAL_DELETED_FUNCTION; + TempFile& operator=(const TempFile&) SAL_DELETED_FUNCTION; +}; + +void writeData(TempFile &handle, OString const & text); +void writeAttributeValue(TempFile &handle, OUString const & value); +void writeValueContent(TempFile &handle, OUString const & value); void writeModFile( Components & components, OUString const & url, Data const & data); |