summaryrefslogtreecommitdiff
path: root/sc/source/filter/xcl97
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/xcl97')
-rw-r--r--sc/source/filter/xcl97/XclImpChangeTrack.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx109
3 files changed, 30 insertions, 83 deletions
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 2f546e323179..1a8480a5e758 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -34,7 +34,7 @@
#include "XclImpChangeTrack.hxx"
#include <tools/debug.hxx>
#include <sot/storage.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include "chgviset.hxx"
#include "cell.hxx"
#include "chgtrack.hxx"
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index e618e5d91fd5..db8b085f7629 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -44,7 +44,7 @@
#include <svx/svdoole2.hxx>
#include <svx/unoapi.hxx>
#include <svx/fmglob.hxx>
-#include <svx/msocximex.hxx>
+#include <filter/msfilter/msocximex.hxx>
#include <vcl/outdev.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 0380acc5005b..f662757a83b7 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -37,14 +37,14 @@
#include <svx/editobj.hxx>
#include <svx/svdoole2.hxx>
#include <sot/storage.hxx>
-#include <svtools/itemset.hxx>
+#include <svl/itemset.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdocapt.hxx>
#include <svx/unoapi.hxx>
#include <svx/writingmodeitem.hxx>
#include <vcl/svapp.hxx>
#include <rtl/math.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zformat.hxx>
#include "cell.hxx"
#include "drwlayer.hxx"
@@ -57,15 +57,14 @@
#include "scitems.hxx"
-#include <svtools/fltrcfg.hxx>
+#include <unotools/fltrcfg.hxx>
#include <svx/brshitem.hxx>
#include <svx/boxitem.hxx>
#include <svx/frmdiritem.hxx>
#include <svx/adjitem.hxx>
#include <svx/eeitem.hxx>
-#include <svx/msoleexp.hxx>
+#include <filter/msfilter/msoleexp.hxx>
-#include <svtools/useroptions.hxx>
#include <unotools/localedatawrapper.hxx>
#include <stdio.h>
@@ -1033,15 +1032,14 @@ void ExcEScenarioCell::SaveXml( XclExpXmlStream& rStrm )
-XclExpString ExcEScenario::sUsername;
-
-ExcEScenario::ExcEScenario( ScDocument& rDoc, SCTAB nTab )
+ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab )
{
String sTmpName;
String sTmpComm;
Color aDummyCol;
USHORT nFlags;
+ ScDocument& rDoc = rRoot.GetDoc();
rDoc.GetName( nTab, sTmpName );
sName.Assign( sTmpName, EXC_STR_8BITLENGTH );
nRecLen = 8 + sName.GetBufferSize();
@@ -1052,14 +1050,8 @@ ExcEScenario::ExcEScenario( ScDocument& rDoc, SCTAB nTab )
nRecLen += sComment.GetSize();
nProtected = (nFlags & SC_SCENARIO_PROTECT) ? 1 : 0;
- if( !sUsername.Len() )
- {
- SvtUserOptions aUserOpt;
- sUsername.Assign( aUserOpt.GetLastName(), EXC_STR_DEFAULT, 255 );
- }
- if( !sUsername.Len() )
- sUsername.Assign( String::CreateFromAscii( "SC" ) );
- nRecLen += sUsername.GetSize();
+ sUserName.Assign( rRoot.GetUserName(), EXC_STR_DEFAULT, 255 );
+ nRecLen += sUserName.GetSize();
const ScRangeList* pRList = rDoc.GetScenarioRanges( nTab );
if( !pRList )
@@ -1118,11 +1110,11 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm )
<< (UINT8) 0 // fHidden
<< (UINT8) sName.Len() // length of scen name
<< (UINT8) sComment.Len() // length of comment
- << (UINT8) sUsername.Len(); // length of user name
+ << (UINT8) sUserName.Len(); // length of user name
sName.WriteFlagField( rStrm );
sName.WriteBuffer( rStrm );
- rStrm << sUsername;
+ rStrm << sUserName;
if( sComment.Len() )
rStrm << sComment;
@@ -1154,7 +1146,7 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
XML_locked, XclXmlUtils::ToPsz( nProtected ),
// OOXTODO: XML_hidden,
XML_count, OString::valueOf( (sal_Int32) List::Count() ).getStr(),
- XML_user, XESTRING_TO_PSZ( sUsername ),
+ XML_user, XESTRING_TO_PSZ( sUserName ),
XML_comment, XESTRING_TO_PSZ( sComment ),
FSEND );
@@ -1167,9 +1159,10 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
-ExcEScenarioManager::ExcEScenarioManager( ScDocument& rDoc, SCTAB nTab ) :
+ExcEScenarioManager::ExcEScenarioManager( const XclExpRoot& rRoot, SCTAB nTab ) :
nActive( 0 )
{
+ ScDocument& rDoc = rRoot.GetDoc();
if( rDoc.IsScenario( nTab ) )
return;
@@ -1178,7 +1171,7 @@ ExcEScenarioManager::ExcEScenarioManager( ScDocument& rDoc, SCTAB nTab ) :
while( rDoc.IsScenario( nNewTab ) )
{
- Append( new ExcEScenario( rDoc, nNewTab ) );
+ Append( new ExcEScenario( rRoot, nNewTab ) );
if( rDoc.IsActiveScenario( nNewTab ) )
nActive = static_cast<sal_uInt16>(nNewTab - nFirstTab);
@@ -1453,34 +1446,13 @@ void XclExpFilePass::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpFnGroupCount::XclExpFnGroupCount() :
- XclExpRecord(0x009C, 2)
-{
-}
-
-XclExpFnGroupCount::~XclExpFnGroupCount()
-{
-}
-
-void XclExpFnGroupCount::WriteBody( XclExpStream& rStrm )
-{
- rStrm << static_cast<sal_uInt16>(14);
-}
-
-// ============================================================================
-
-XclExpInterfaceHdr::XclExpInterfaceHdr() :
- XclExpRecord(0x00E1, 2)
-{
-}
-
-XclExpInterfaceHdr::~XclExpInterfaceHdr()
+XclExpInterfaceHdr::XclExpInterfaceHdr( sal_uInt16 nCodePage ) :
+ XclExpUInt16Record( EXC_ID_INTERFACEHDR, nCodePage )
{
}
void XclExpInterfaceHdr::WriteBody( XclExpStream& rStrm )
{
- // The value must be the same value as the CODEPAGE record.
rStrm.DisableEncryption();
rStrm << static_cast<sal_uInt16>(0x04B0);
}
@@ -1554,35 +1526,25 @@ void XclExpWriteAccess::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpCodePage::XclExpCodePage() :
- XclExpRecord(0x0042, 2)
-{
-}
-
-XclExpCodePage::~XclExpCodePage()
-{
-}
-
-void XclExpCodePage::WriteBody( XclExpStream& rStrm )
-{
- // 0x04B0 : UTF-16 (BIFF8)
- rStrm << static_cast<sal_uInt16>(0x04B0);
-}
-
-// ============================================================================
-
-XclExpDSF::XclExpDSF() :
- XclExpRecord(0x0161, 2)
+XclExpFileSharing::XclExpFileSharing( const XclExpRoot& rRoot, sal_uInt16 nPasswordHash ) :
+ XclExpRecord( EXC_ID_FILESHARING ),
+ mnPasswordHash( nPasswordHash )
{
+ if( rRoot.GetBiff() <= EXC_BIFF5 )
+ maUserName.AssignByte( rRoot.GetUserName(), rRoot.GetTextEncoding(), EXC_STR_8BITLENGTH );
+ else
+ maUserName.Assign( rRoot.GetUserName() );
}
-XclExpDSF::~XclExpDSF()
+void XclExpFileSharing::Save( XclExpStream& rStrm )
{
+ if( mnPasswordHash != 0 )
+ XclExpRecord::Save( rStrm );
}
-void XclExpDSF::WriteBody( XclExpStream& rStrm )
+void XclExpFileSharing::WriteBody( XclExpStream& rStrm )
{
- rStrm << static_cast<sal_uInt16>(0x0000);
+ rStrm << sal_uInt16( 0 ) << mnPasswordHash << maUserName;
}
// ============================================================================
@@ -1619,21 +1581,6 @@ void XclExpProt4RevPass::WriteBody( XclExpStream& rStrm )
// ============================================================================
-XclExpExcel9File::XclExpExcel9File() :
- XclExpRecord(0x01C0, 0)
-{
-}
-
-XclExpExcel9File::~XclExpExcel9File()
-{
-}
-
-void XclExpExcel9File::WriteBody( XclExpStream& /*rStrm*/ )
-{
-}
-
-// ============================================================================
-
static const sal_uInt8 nDataRecalcId[] = {
0xC1, 0x01, 0x00, 0x00, 0x54, 0x8D, 0x01, 0x00
};