summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/config.cxx7
-rw-r--r--starmath/source/format.cxx7
-rw-r--r--starmath/source/symbol.cxx28
3 files changed, 30 insertions, 12 deletions
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();
}
}