diff options
author | Thomas Lange <tl@openoffice.org> | 2000-11-02 14:07:16 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2000-11-02 14:07:16 +0000 |
commit | f8b3801389041be22885e63e660273145caf89b4 (patch) | |
tree | 3d334b8d6239419ee2147ba2f2ca6356e21fa82a /starmath | |
parent | dd4fe32be8471e0c55c3aeee5596767e5b811086 (diff) |
SvFileStream not used anymore, SfxMedium now used
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/utility.hxx | 7 | ||||
-rw-r--r-- | starmath/source/config.cxx | 7 | ||||
-rw-r--r-- | starmath/source/format.cxx | 7 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 28 |
4 files changed, 32 insertions, 17 deletions
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index bde78f80d4f1..e54c0645d394 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -2,9 +2,9 @@ * * $RCSfile: utility.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:57:25 $ + * last change: $Author: tl $ $Date: 2000-11-02 15:07:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,9 +76,6 @@ #ifndef _SV_LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> #endif -#ifndef _STREAM_HXX //autogen -#include <tools/stream.hxx> -#endif #ifndef _FRACT_HXX //autogen #include <tools/fract.hxx> #endif diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx index 2a26b23275c3..843cc8fae2b8 100644 --- a/starmath/source/config.cxx +++ b/starmath/source/config.cxx @@ -2,9 +2,9 @@ * * $RCSfile: config.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $ + * last change: $Author: tl $ $Date: 2000-11-02 15:07:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,6 +88,9 @@ #ifndef _SFXINTITEM_HXX //autogen #include <svtools/intitem.hxx> #endif +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif #ifndef CONFIG_HXX diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index b5ed6622f2ff..f79388822b41 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -2,9 +2,9 @@ * * $RCSfile: format.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:57:26 $ + * last change: $Author: tl $ $Date: 2000-11-02 15:07:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,6 +61,9 @@ #pragma hdrstop +#ifndef _STREAM_HXX +#include <tools/stream.hxx> +#endif #ifndef FORMAT_HXX #include "format.hxx" diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 15aecab7c153..5df7914ae85e 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -2,9 +2,9 @@ * * $RCSfile: symbol.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:57:27 $ + * last change: $Author: tl $ $Date: 2000-11-02 15:07:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,9 @@ #ifndef _SFXDISPATCH_HXX //autogen #include <sfx2/dispatch.hxx> #endif +#ifndef _SFXDOCFILE_HXX +#include <sfx2/docfile.hxx> +#endif #ifndef _SFX_INIMGR_HXX //autogen #include <sfx2/inimgr.hxx> #endif @@ -554,14 +557,19 @@ void SmSymSetManager::Load(const String &rURL) catch(...){} if (bExist) { - SvFileStream aStream(aStreamName, STREAM_READ); + // get stream to use + SfxMedium aMedium( aStreamName, + STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE ); + aMedium.SetTransferPriority( SFX_TFPRIO_SYNCHRON ); + SvStream *pStream = aMedium.GetInStream(); - if (aStream.IsOpen()) + if (pStream) { - aStream >> *this; + *pStream >> *this; Modified = FALSE; return; } + aMedium.Commit(); } SfxModule *p = SM_MOD1(); @@ -586,11 +594,14 @@ void SmSymSetManager::Save() { if (Modified) { - SvFileStream aStream(aStreamName, STREAM_WRITE); + SfxMedium aMedium( aStreamName, + STREAM_WRITE | STREAM_TRUNC | STREAM_SHARE_DENYALL, FALSE ); + aMedium.CreateTempFile(); // use temp file to write to... + SvStream *pStream = aMedium.GetOutStream(); - if (aStream.IsOpen()) + if (pStream) { - aStream << *this; + *pStream << *this; Modified = FALSE; } else @@ -604,6 +615,7 @@ void SmSymSetManager::Save() aErrorBox.SetMessText(aString); aErrorBox.Execute(); } + aMedium.Commit(); } } |