summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/docinf.cxx
diff options
context:
space:
mode:
authorAndreas Schlüns <as@openoffice.org>2001-08-06 04:19:47 +0000
committerAndreas Schlüns <as@openoffice.org>2001-08-06 04:19:47 +0000
commit84bb4befd1b1d14ce173e3288882e59db725ee7d (patch)
treee8f0be680355673dc5d42723f6384097890cfc5a /sfx2/source/doc/docinf.cxx
parentca283334947ceb4e4e28e7be9effb1e4c56b99e5 (diff)
#90478# use method to search best matching encoding
Diffstat (limited to 'sfx2/source/doc/docinf.cxx')
-rw-r--r--sfx2/source/doc/docinf.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
index e3ac1c6b920f..aa729ef6460f 100644
--- a/sfx2/source/doc/docinf.cxx
+++ b/sfx2/source/doc/docinf.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docinf.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: pb $ $Date: 2001-07-09 08:56:41 $
+ * last change: $Author: as $ $Date: 2001-08-06 05:19:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,6 +67,7 @@
#endif
#include <tools/urlobj.hxx>
#include <svtools/saveopt.hxx>
+#include <tools/tenccvt.hxx>
#include "docfilt.hxx"
#include "fcontnr.hxx"
@@ -687,7 +688,9 @@ BOOL SfxDocumentInfo::Load( SvStream& rStream )
Free();
bPasswd = aHeader.bPasswd;
rStream >> nUS;
- eFileCharSet = (CharSet)nUS;
+ //eFileCharSet = (CharSet)nUS;
+ eFileCharSet = GetSOLoadTextEncoding( nUS );
+
// Einstellen an den Streams
rStream.SetStreamCharSet(eFileCharSet);
@@ -931,8 +934,9 @@ BOOL SfxDocumentInfo::Save( SvStream& rStream ) const
{
FileHeader aHeader(pDocInfoHeader, VERSION, bPasswd? 1: 0);
aHeader.Save(rStream);
- rStream << (USHORT)eFileCharSet;
- rStream.SetStreamCharSet(eFileCharSet);
+ CharSet eNewFileCharSet = GetSOStoreTextEncoding( eFileCharSet );
+ rStream << (USHORT)eNewFileCharSet;
+ rStream.SetStreamCharSet(eNewFileCharSet);
rStream << (bPortableGraphics? (BYTE)1: (BYTE)0)
<< (bQueryTemplate? (BYTE)1: (BYTE)0);
aCreated.Save(rStream);