diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-28 13:30:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-28 19:01:54 +0100 |
commit | 523189a32e8d867b71d23f8aa88708ae2757f727 (patch) | |
tree | 7fa0854bccb924f562123673e7f06ced1e27acb2 /sc | |
parent | 2acd77800cb324597101447de6b46f27b762bc6a (diff) |
merge LOTUS_ROOT into LotusContext
since they are serving the same purpose.
In the process getting rid of a duplicate ScDocument*
that was sometimes set and sometimes not, causing trouble
for me in another patch
Change-Id: I2ceeb6d6e34b62616065bf4840a87bd87d2c3844
Reviewed-on: https://gerrit.libreoffice.org/83990
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xlroot.cxx | 1 | ||||
-rw-r--r-- | sc/source/filter/inc/lotattr.hxx | 12 | ||||
-rw-r--r-- | sc/source/filter/inc/namebuff.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/root.hxx | 21 | ||||
-rw-r--r-- | sc/source/filter/lotus/filter.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotattr.cxx | 23 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotfilter.hxx | 36 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotform.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotimpop.cxx | 37 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotread.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotus.cxx | 24 | ||||
-rw-r--r-- | sc/source/filter/lotus/op.cxx | 24 | ||||
-rw-r--r-- | sc/source/filter/lotus/tool.cxx | 2 |
13 files changed, 88 insertions, 108 deletions
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index f52a4ab3fa3f..e4c0d924841f 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -40,6 +40,7 @@ #include <editeng/editstat.hxx> #include <scitems.hxx> #include <editeng/eeitem.hxx> +#include <editeng/fhgtitem.hxx> #include <document.hxx> #include <docpool.hxx> #include <docuno.hxx> diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx index 82ead05d242e..cdeebbd79c9b 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -29,7 +29,7 @@ class ScDocumentPool; class ScPatternAttr; class SvxColorItem; class Color; -struct LOTUS_ROOT; +struct LotusContext; namespace editeng { class SvxBorderLine; } @@ -56,7 +56,7 @@ class LotAttrCache { public: - LotAttrCache(LOTUS_ROOT* pLotRoot); + LotAttrCache(LotusContext& rContext); ~LotAttrCache(); @@ -96,7 +96,7 @@ private: std::unique_ptr<Color[]> pColTab; std::vector< std::unique_ptr<ENTRY> > aEntries; - LOTUS_ROOT* mpLotusRoot; + LotusContext& mrContext; }; class LotAttrCol @@ -104,7 +104,7 @@ class LotAttrCol public: void SetAttr (const SCROW nRow, const ScPatternAttr&); - void Apply(LOTUS_ROOT* pLotRoot, const SCCOL nCol, const SCTAB nTab); + void Apply(LotusContext& rContext, const SCCOL nCol, const SCTAB nTab); private: struct ENTRY @@ -120,11 +120,11 @@ private: class LotAttrTable { public: - LotAttrTable(LOTUS_ROOT* pLotRoot); + LotAttrTable(LotusContext& rContext); void SetAttr( const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3& ); - void Apply(LOTUS_ROOT* pLotRoot, const SCTAB nTabNum); + void Apply(LotusContext& rContext, const SCTAB nTabNum); private: diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx index 1f174b46e65c..fea49820580f 100644 --- a/sc/source/filter/inc/namebuff.hxx +++ b/sc/source/filter/inc/namebuff.hxx @@ -22,9 +22,11 @@ #include <memory> #include <map> +#include <vector> #include <rtl/ustring.hxx> #include "root.hxx" #include "xiroot.hxx" +#include <refdata.hxx> #include <unordered_map> diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx index 29c1f9bc3bfe..a41b22b2128b 100644 --- a/sc/source/filter/inc/root.hxx +++ b/sc/source/filter/inc/root.hxx @@ -22,9 +22,6 @@ #include <address.hxx> #include "flttypes.hxx" -#include "lotattr.hxx" -#include "lotfntbf.hxx" -#include "lotrange.hxx" #include <memory> class ScRangeName; @@ -80,24 +77,6 @@ protected: ExcRoot( const ExcRoot& rCopy ) : pExcRoot( rCopy.pExcRoot ) {} }; -// Lotus Imp~/Exp~ - - -struct LOTUS_ROOT -{ - ScDocument* pDoc; - LotusRangeList maRangeNames; - rtl_TextEncoding const eCharsetQ; - Lotus123Typ eFirstType; - Lotus123Typ eActType; - ScRange aActRange; - std::unique_ptr<RangeNameBufferWK3> pRngNmBffWK3; - LotusFontBuffer maFontBuff; - LotAttrTable maAttrTable; - - LOTUS_ROOT( ScDocument* pDocP, rtl_TextEncoding eQ ); - ~LOTUS_ROOT(); -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx index 9746a6807a93..6723f7d402c6 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -189,7 +189,7 @@ ErrCode ScImportLotus123old(LotusContext& rContext, SvStream& aStream, ScDocumen // make document pointer global rContext.pDoc = pDocument; rContext.bEOF = false; - rContext.eCharVon = eSrc; + rContext.eCharset = eSrc; // allocate memory if( !MemNew(rContext) ) diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index dd7725b40ec2..725ac276d7d7 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -30,6 +30,7 @@ #include <docpool.hxx> #include <document.hxx> #include <lotfntbf.hxx> +#include "lotfilter.hxx" #include <patattr.hxx> #include <root.hxx> #include <scitems.hxx> @@ -46,10 +47,10 @@ LotAttrCache::ENTRY::~ENTRY () { } -LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot) - : mpLotusRoot(pLotRoot) +LotAttrCache::LotAttrCache (LotusContext& rContext) + : mrContext(rContext) { - pDocPool = mpLotusRoot->pDoc->GetPool(); + pDocPool = rContext.pDoc->GetPool(); pColTab.reset( new Color [ 8 ] ); pColTab[ 0 ] = COL_WHITE; @@ -95,7 +96,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) pCurrent->nHash0 = nRefHash; - mpLotusRoot->maFontBuff.Fill( rAttr.nFont, rItemSet ); + mrContext.maFontBuff.Fill( rAttr.nFont, rItemSet ); sal_uInt8 nLine = rAttr.nLineStyle; if( nLine ) @@ -211,9 +212,9 @@ void LotAttrCol::SetAttr( const SCROW nRow, const ScPatternAttr& rAttr ) } } -void LotAttrCol::Apply(LOTUS_ROOT* pLotusRoot, const SCCOL nColNum, const SCTAB nTabNum) +void LotAttrCol::Apply(LotusContext& rContext, const SCCOL nColNum, const SCTAB nTabNum) { - ScDocument* pDoc = pLotusRoot->pDoc; + ScDocument* pDoc = rContext.pDoc; for (const auto& rxEntry : aEntries) { @@ -222,8 +223,8 @@ void LotAttrCol::Apply(LOTUS_ROOT* pLotusRoot, const SCCOL nColNum, const SCTAB } } -LotAttrTable::LotAttrTable(LOTUS_ROOT* pLotRoot): - aAttrCache(pLotRoot) +LotAttrTable::LotAttrTable(LotusContext& rContext): + aAttrCache(rContext) { } @@ -240,11 +241,11 @@ void LotAttrTable::SetAttr( const SCCOL nColFirst, const SCCOL nColLast, const S pCols[ nColCnt ].SetAttr( nRow, rPattAttr ); } -void LotAttrTable::Apply(LOTUS_ROOT* pLotusRoot, const SCTAB nTabNum) +void LotAttrTable::Apply(LotusContext& rContext, const SCTAB nTabNum) { SCCOL nColCnt; - for( nColCnt = 0 ; nColCnt <= aAttrCache.mpLotusRoot->pDoc->MaxCol() ; nColCnt++ ) - pCols[ nColCnt ].Apply(pLotusRoot, nColCnt, nTabNum); // does a Clear() at end + for( nColCnt = 0 ; nColCnt <= aAttrCache.mrContext.pDoc->MaxCol() ; nColCnt++ ) + pCols[ nColCnt ].Apply(rContext, nColCnt, nTabNum); // does a Clear() at end } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/lotus/lotfilter.hxx b/sc/source/filter/lotus/lotfilter.hxx index 66700377584d..95cb49b3b13d 100644 --- a/sc/source/filter/lotus/lotfilter.hxx +++ b/sc/source/filter/lotus/lotfilter.hxx @@ -24,42 +24,40 @@ #include <decl.h> #include <optab.h> #include <patattr.hxx> +#include <lotattr.hxx> +#include <lotrange.hxx> +#include <lotfntbf.hxx> +#include <flttypes.hxx> +#include <namebuff.hxx> class SvxHorJustifyItem; class FormCache; -struct LOTUS_ROOT; struct LotusContext { static const sal_uInt16 nBOF = 0x0000; + static OPCODE_FKT pOpFkt[ FKT_LIMIT ]; + static OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx; table of possible Opcodes + WKTYP eTyp; // type of file being processed bool bEOF; // shows end of file - rtl_TextEncoding eCharVon; + rtl_TextEncoding eCharset; ScDocument* pDoc; // pointer to access document - static OPCODE_FKT pOpFkt[ FKT_LIMIT ]; - static OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx; table of possible Opcodes - LOTUS_ROOT* pLotusRoot; std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool; SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard; FormCache* pValueFormCache; // -> initialized in memory.cxx - LotusContext() - : eTyp(eWK_UNKNOWN) - , bEOF(false) - , eCharVon(RTL_TEXTENCODING_DONTKNOW) - , pDoc(nullptr) - , pLotusRoot(nullptr) + LotusRangeList maRangeNames; + Lotus123Typ eFirstType; + Lotus123Typ eActType; + ScRange aActRange; + std::unique_ptr<RangeNameBufferWK3> pRngNmBffWK3; + LotusFontBuffer maFontBuff; + LotAttrTable maAttrTable; - , pAttrRight(nullptr) - , pAttrLeft(nullptr) - , pAttrCenter(nullptr) - , pAttrRepeat(nullptr) - , pAttrStandard(nullptr) - , pValueFormCache(nullptr) - { - } + LotusContext(ScDocument* pDocP, rtl_TextEncoding eQ); }; #endif diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 9692a95f08ff..a9e38c18b507 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -392,7 +392,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest TokenId nBuf0; DefTokenId eOc; const sal_Char* pExtName = nullptr; - RangeNameBufferWK3& rRangeNameBufferWK3 = *m_rContext.pLotusRoot->pRngNmBffWK3; + RangeNameBufferWK3& rRangeNameBufferWK3 = *m_rContext.pRngNmBffWK3; ScComplexRefData aCRD; aCRD.InitFlags(); @@ -401,7 +401,7 @@ void LotusToSc::Convert( std::unique_ptr<ScTokenArray>& rpErg, sal_Int32& rRest LR_ID nId; TokenId nNewId; - LotusRangeList& rRangeList = m_rContext.pLotusRoot->maRangeNames; + LotusRangeList& rRangeList = m_rContext.maRangeNames; FuncType1* pIndexToType; FuncType2* pIndexToToken; diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 3b1a66603561..2b6c5afa6f7c 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -37,21 +37,6 @@ #include <unotools/configmgr.hxx> -LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, rtl_TextEncoding eQ ) - : - pDoc( pDocP), - maRangeNames(), - eCharsetQ( eQ), - eFirstType( Lotus123Typ::X), - eActType( Lotus123Typ::X), - pRngNmBffWK3( new RangeNameBufferWK3() ), - maAttrTable( this ) -{ -} - -LOTUS_ROOT::~LOTUS_ROOT() -{ -} static osl::Mutex aLotImpSemaphore; @@ -64,16 +49,10 @@ ImportLotus::ImportLotus(LotusContext &rContext, SvStream& aStream, ScDocument* { // good point to start locking of import lotus aLotImpSemaphore.acquire(); - - rContext.pLotusRoot = new LOTUS_ROOT(pDoc, eQ); } ImportLotus::~ImportLotus() { - LotusContext &rContext = aConv.getContext(); - delete rContext.pLotusRoot; - rContext.pLotusRoot = nullptr; - // no need 4 pLotusRoot anymore aLotImpSemaphore.release(); } @@ -86,7 +65,7 @@ void ImportLotus::Bof() Read( nFileCode ); Read( nFileSub ); LotusContext &rContext = aConv.getContext(); - Read( rContext.pLotusRoot->aActRange ); + Read( rContext.aActRange ); Read( nSaveCnt ); Read( nMajorId ); Read( nMinorId ); @@ -97,11 +76,11 @@ void ImportLotus::Bof() { if( nFileCode == 0x1000 ) {// <= WK3 - rContext.pLotusRoot->eFirstType = rContext.pLotusRoot->eActType = Lotus123Typ::WK3; + rContext.eFirstType = rContext.eActType = Lotus123Typ::WK3; } else if( nFileCode == 0x1002 ) {// WK4 - rContext.pLotusRoot->eFirstType = rContext.pLotusRoot->eActType = Lotus123Typ::WK4; + rContext.eFirstType = rContext.eActType = Lotus123Typ::WK4; } } } @@ -188,7 +167,7 @@ void ImportLotus::Userrange() Read( aScRange ); LotusContext &rContext = aConv.getContext(); - rContext.pLotusRoot->pRngNmBffWK3->Add( aName, aScRange ); + rContext.pRngNmBffWK3->Add( aName, aScRange ); } void ImportLotus::Errcell() @@ -353,7 +332,7 @@ void ImportLotus::Font_Face() Read( aName ); LotusContext &rContext = aConv.getContext(); - rContext.pLotusRoot->maFontBuff.SetName( nNum, aName ); + rContext.maFontBuff.SetName( nNum, aName ); } void ImportLotus::Font_Type() @@ -363,7 +342,7 @@ void ImportLotus::Font_Type() { sal_uInt16 nType; Read( nType ); - rContext.pLotusRoot->maFontBuff.SetType( nCnt, nType ); + rContext.maFontBuff.SetType( nCnt, nType ); } } @@ -374,7 +353,7 @@ void ImportLotus::Font_Ysize() { sal_uInt16 nSize; Read( nSize ); - rContext.pLotusRoot->maFontBuff.SetHeight( nCnt, nSize ); + rContext.maFontBuff.SetHeight( nCnt, nSize ); } } @@ -411,7 +390,7 @@ void ImportLotus::Row_( const sal_uInt16 nRecLen ) Read( nRepeats ); if( aAttr.HasStyles() ) - rContext.pLotusRoot->maAttrTable.SetAttr( + rContext.maAttrTable.SetAttr( nColCnt, static_cast<SCCOL> ( nColCnt + nRepeats ), nRow, aAttr ); // Do this here and NOT in class LotAttrTable, as we only add attributes if the other diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index dab87db2866b..5212b0355441 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -86,7 +86,7 @@ ErrCode ImportLotus::parse() if( nRecLen > 2 ) { Bof(); - switch (rContext.pLotusRoot->eFirstType) + switch (rContext.eFirstType) { case Lotus123Typ::WK3: eCurrent = S_WK3; break; case Lotus123Typ::WK4: eCurrent = S_WK4; break; @@ -290,7 +290,7 @@ ErrCode ImportLotus::Read(SvStream& rIn) case 195: if( nExtTab >= 0 ) - rContext.pLotusRoot->maAttrTable.Apply(rContext.pLotusRoot, static_cast<SCTAB>(nExtTab)); + rContext.maAttrTable.Apply(rContext, static_cast<SCTAB>(nExtTab)); nExtTab++; break; case 197: @@ -305,7 +305,7 @@ ErrCode ImportLotus::Read(SvStream& rIn) } } - rContext.pLotusRoot->maAttrTable.Apply(rContext.pLotusRoot, static_cast<SCTAB>(nExtTab)); + rContext.maAttrTable.Apply(rContext, static_cast<SCTAB>(nExtTab)); return eRet; } @@ -321,7 +321,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportWKS(SvStream& rStream) aDocument.EnableExecuteLink(false); aDocument.SetInsertingFromOtherDoc(true); - LotusContext aContext; + LotusContext aContext(&aDocument, RTL_TEXTENCODING_ASCII_US); ImportLotus aLotusImport(aContext, rStream, &aDocument, RTL_TEXTENCODING_ASCII_US); ErrCode eRet = aLotusImport.parse(); diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx index 5b7260434343..a2f0482a31b1 100644 --- a/sc/source/filter/lotus/lotus.cxx +++ b/sc/source/filter/lotus/lotus.cxx @@ -38,7 +38,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume pStream->SetBufferSize( 32768 ); - LotusContext aContext; + LotusContext aContext(pDocument, eSrc); ImportLotus aLotusImport(aContext, *pStream, pDocument, eSrc); @@ -61,7 +61,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume if( eRet != ERRCODE_NONE ) return eRet; - if (aContext.pLotusRoot->eFirstType == Lotus123Typ::WK3) + if (aContext.eFirstType == Lotus123Typ::WK3) { // try to load *.FM3 file INetURLObject aURL( rMedium.GetURLObject() ); @@ -80,4 +80,24 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume return eRet; } +LotusContext::LotusContext(ScDocument* pDocP, rtl_TextEncoding eQ) + : eTyp(eWK_UNKNOWN) + , bEOF(false) + , eCharset(eQ) + , pDoc(pDocP) + , pAttrRight(nullptr) + , pAttrLeft(nullptr) + , pAttrCenter(nullptr) + , pAttrRepeat(nullptr) + , pAttrStandard(nullptr) + , pValueFormCache(nullptr) + , maRangeNames() + , eFirstType( Lotus123Typ::X) + , eActType( Lotus123Typ::X) + , pRngNmBffWK3( new RangeNameBufferWK3() ) + , maAttrTable( *this ) +{ +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index 02cd9b0e014d..01f1a3616d34 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -144,8 +144,8 @@ void OP_Formula(LotusContext &rContext, SvStream& r, sal_uInt16 /*n*/) sal_Int32 nBytesLeft = nFormulaSize; ScAddress aAddress(nCol, nRow, 0); - svl::SharedStringPool& rSPool = rContext.pLotusRoot->pDoc->GetSharedStringPool(); - LotusToSc aConv(rContext, r, rSPool, rContext.pLotusRoot->eCharsetQ, false); + svl::SharedStringPool& rSPool = rContext.pDoc->GetSharedStringPool(); + LotusToSc aConv(rContext, r, rSPool, rContext.eCharset, false); aConv.Reset( aAddress ); aConv.Convert( pResult, nBytesLeft ); if (!aConv.good()) @@ -153,7 +153,7 @@ void OP_Formula(LotusContext &rContext, SvStream& r, sal_uInt16 /*n*/) if (ValidColRow(nCol, nRow)) { - ScFormulaCell* pCell = new ScFormulaCell(rContext.pLotusRoot->pDoc, aAddress, std::move(pResult)); + ScFormulaCell* pCell = new ScFormulaCell(rContext.pDoc, aAddress, std::move(pResult)); pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE ); rContext.pDoc->EnsureTable(0); rContext.pDoc->SetFormulaCell(ScAddress(nCol, nRow, 0), pCell); @@ -218,11 +218,11 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) else strcpy( cBuf, cBuffer ); // #100211# - checked - OUString aTmp( cBuf, strlen(cBuf), rContext.pLotusRoot->eCharsetQ ); + OUString aTmp( cBuf, strlen(cBuf), rContext.eCharset ); aTmp = ScfTools::ConvertToScDefinedName( aTmp ); - rContext.pLotusRoot->maRangeNames.Append( std::move(pRange) ); + rContext.maRangeNames.Append( std::move(pRange) ); } } @@ -257,10 +257,10 @@ void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) else strcpy( cBuf, cBuffer ); // #100211# - checked - OUString aTmp( cBuf, strlen(cBuf), rContext.pLotusRoot->eCharsetQ ); + OUString aTmp( cBuf, strlen(cBuf), rContext.eCharset ); aTmp = ScfTools::ConvertToScDefinedName( aTmp ); - rContext.pLotusRoot->maRangeNames.Append( std::move(pRange) ); + rContext.maRangeNames.Append( std::move(pRange) ); } } @@ -402,8 +402,8 @@ void OP_Formula123(LotusContext& rContext, SvStream& r, sal_uInt16 n) sal_Int32 nBytesLeft = (n > 12) ? n - 12 : 0; ScAddress aAddress( nCol, nRow, nTab ); - svl::SharedStringPool& rSPool = rContext.pLotusRoot->pDoc->GetSharedStringPool(); - LotusToSc aConv(rContext, r, rSPool, rContext.pLotusRoot->eCharsetQ, true); + svl::SharedStringPool& rSPool = rContext.pDoc->GetSharedStringPool(); + LotusToSc aConv(rContext, r, rSPool, rContext.eCharset, true); aConv.Reset( aAddress ); aConv.Convert( pResult, nBytesLeft ); if (!aConv.good()) @@ -411,7 +411,7 @@ void OP_Formula123(LotusContext& rContext, SvStream& r, sal_uInt16 n) if (ValidColRow(nCol, nRow) && nTab <= rContext.pDoc->GetMaxTableNumber()) { - ScFormulaCell* pCell = new ScFormulaCell(rContext.pLotusRoot->pDoc, aAddress, std::move(pResult)); + ScFormulaCell* pCell = new ScFormulaCell(rContext.pDoc, aAddress, std::move(pResult)); pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE ); rContext.pDoc->EnsureTable(nTab); rContext.pDoc->SetFormulaCell(ScAddress(nCol,nRow,nTab), pCell); @@ -450,7 +450,7 @@ void OP_Note123(LotusContext& rContext, SvStream& r, sal_uInt16 n) r.ReadBytes(pText.get(), n); pText[ n ] = 0; - OUString aNoteText(pText.get(), strlen(pText.get()), rContext.pLotusRoot->eCharsetQ); + OUString aNoteText(pText.get(), strlen(pText.get()), rContext.eCharset); pText.reset(); ScAddress aPos(nCol, nRow, nTab); @@ -595,7 +595,7 @@ void OP_SheetName123(LotusContext& rContext, SvStream& rStream, sal_uInt16 nLeng rContext.pDoc->MakeTable(nSheetNum); if (!sSheetName.empty()) { - OUString aName(sSheetName.data(), strlen(sSheetName.data()), rContext.eCharVon); + OUString aName(sSheetName.data(), strlen(sSheetName.data()), rContext.eCharset); rContext.pDoc->RenameTab(nSheetNum, aName); } } diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index 5c5d307198a3..5eeb6af4642f 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -82,7 +82,7 @@ void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, s rContext.pDoc->ApplyAttr( nCol, nRow, nTab, *pJustify ); ScSetStringParam aParam; aParam.setTextInput(); - rContext.pDoc->SetString(ScAddress(nCol,nRow,nTab), OUString(pString, strlen(pString), rContext.pLotusRoot->eCharsetQ), &aParam); + rContext.pDoc->SetString(ScAddress(nCol,nRow,nTab), OUString(pString, strlen(pString), rContext.eCharset), &aParam); } void SetFormat(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt) |