Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
52e69bfb
Kaydet (Commit)
52e69bfb
authored
Ock 14, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:unusedmethods unused return value in lotuswordpro
Change-Id: Ibed85be78e05dc0e6474d688ef0e0dea401758ac
üst
602a6493
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
47 additions
and
84 deletions
+47
-84
bencont.cxx
lotuswordpro/source/filter/bencont.cxx
+6
-10
bento.hxx
lotuswordpro/source/filter/bento.hxx
+3
-3
benval.cxx
lotuswordpro/source/filter/benval.cxx
+5
-6
lwpfilehdr.cxx
lotuswordpro/source/filter/lwpfilehdr.cxx
+2
-10
lwpfilehdr.hxx
lotuswordpro/source/filter/lwpfilehdr.hxx
+1
-1
lwpfoundry.cxx
lotuswordpro/source/filter/lwpfoundry.cxx
+1
-2
lwpfoundry.hxx
lotuswordpro/source/filter/lwpfoundry.hxx
+1
-1
lwpfribsection.cxx
lotuswordpro/source/filter/lwpfribsection.cxx
+3
-4
lwpfribsection.hxx
lotuswordpro/source/filter/lwpfribsection.hxx
+1
-1
lwpobjid.cxx
lotuswordpro/source/filter/lwpobjid.cxx
+6
-7
lwpobjid.hxx
lotuswordpro/source/filter/lwpobjid.hxx
+2
-2
lwpobjstrm.cxx
lotuswordpro/source/filter/lwpobjstrm.cxx
+1
-3
lwpobjstrm.hxx
lotuswordpro/source/filter/lwpobjstrm.hxx
+1
-1
lwppara.cxx
lotuswordpro/source/filter/lwppara.cxx
+1
-4
lwppara.hxx
lotuswordpro/source/filter/lwppara.hxx
+1
-1
lwpsvstream.cxx
lotuswordpro/source/filter/lwpsvstream.cxx
+2
-2
lwpsvstream.hxx
lotuswordpro/source/filter/lwpsvstream.hxx
+1
-1
lwptblformula.cxx
lotuswordpro/source/filter/lwptblformula.cxx
+6
-22
lwptblformula.hxx
lotuswordpro/source/filter/lwptblformula.hxx
+3
-3
No files found.
lotuswordpro/source/filter/bencont.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -108,7 +108,7 @@ LtcBenContainer::Open() // delete two inputs
return
BenErr_OK
;
}
BenError
void
LtcBenContainer
::
RegisterPropertyName
(
const
char
*
sPropertyName
,
pCBenPropertyName
*
ppPropertyName
)
{
...
...
@@ -119,21 +119,19 @@ LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
if
(
pNamedObject
!=
nullptr
)
{
if
(
!
pNamedObject
->
IsPropertyName
())
return
BenErr_NameConflict
;
return
;
else
*
ppPropertyName
=
static_cast
<
pCBenPropertyName
>
(
pNamedObject
);
}
else
{
pCUtListElmt
pPrevObject
;
if
(
FindID
(
&
cObjects
,
cNextAvailObjectID
,
&
pPrevObject
)
!=
nullptr
)
return
BenErr_DuplicateObjectID
;
return
;
*
ppPropertyName
=
new
CBenPropertyName
(
this
,
cNextAvailObjectID
,
static_cast
<
pCBenObject
>
(
pPrevObject
),
sPropertyName
,
pPrevNamedObjectListElmt
);
++
cNextAvailObjectID
;
}
return
BenErr_OK
;
}
pCBenObject
...
...
@@ -286,14 +284,13 @@ sal_uInt32 GetSvStreamSize(SvStream * pStream)
/**
* Find hazily according to object ID
* @param pObjectname - format as "GrXX,XXXXXXXX" wherein XX is high part of object ID, and XXXXXXXX is low part
* @return the value stream pointers with the property names
*/
BenError
LtcBenContainer
::
CreateGraphicStream
(
SvStream
*
&
pStream
,
const
char
*
pObjectName
)
void
LtcBenContainer
::
CreateGraphicStream
(
SvStream
*
&
pStream
,
const
char
*
pObjectName
)
{
if
(
!
pObjectName
)
{
pStream
=
nullptr
;
return
BenErr_NamedObjectError
;
return
;
}
// construct the string of property name
char
sSName
[
64
]
=
""
;
...
...
@@ -326,7 +323,7 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
if
(
nLen
<=
0
)
{
pStream
=
nullptr
;
return
BenErr_NamedObjectError
;
return
;
}
char
*
pBuf
=
new
char
[
nLen
];
...
...
@@ -348,7 +345,6 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
assert
(
pMemStream
!=
nullptr
);
pStream
=
pMemStream
;
return
BenErr_OK
;
}
}
// end namespace OpenStormBento
...
...
lotuswordpro/source/filter/bento.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -202,7 +202,7 @@ class LtcBenContainer
{
public
:
BenError
Open
();
BenError
RegisterPropertyName
(
const
char
*
sPropertyName
,
void
RegisterPropertyName
(
const
char
*
sPropertyName
,
pCBenPropertyName
*
ppPropertyName
);
// Pass NULL to begin iteration. Done when returns NULL.
// Objects are returned in order of increasing ID
...
...
@@ -226,7 +226,7 @@ public: // Internal methods
LtcUtBenValueStream
*
FindNextValueStreamWithPropertyName
(
const
char
*
sPropertyName
,
LtcUtBenValueStream
*
pCurrentValueStream
);
LtcUtBenValueStream
*
FindValueStreamWithPropertyName
(
const
char
*
sPropertyName
);
BenError
CreateGraphicStream
(
SvStream
*
&
pStream
,
const
char
*
pObjectName
);
void
CreateGraphicStream
(
SvStream
*
&
pStream
,
const
char
*
pObjectName
);
BenError
GetSize
(
sal_uLong
*
pLength
);
private
:
// Data
...
...
@@ -258,7 +258,7 @@ class CBenValue : public CBenIDListElmt
{
public
:
unsigned
long
GetValueSize
();
BenError
ReadValueData
(
void
*
pBuffer
,
void
ReadValueData
(
void
*
pBuffer
,
unsigned
long
Offset
,
unsigned
long
MaxSize
,
unsigned
long
*
pAmtRead
);
pCBenProperty
BEN_EXPORT
GetProperty
()
{
return
cpProperty
;
}
...
...
lotuswordpro/source/filter/benval.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -68,7 +68,7 @@ CBenValue::GetValueSize()
return
Size
;
}
BenError
void
CBenValue
::
ReadValueData
(
void
*
pReadBuffer
,
unsigned
long
Offset
,
unsigned
long
Amt
,
unsigned
long
*
pAmtRead
)
{
...
...
@@ -89,7 +89,7 @@ CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
while
((
pCurrSeg
=
GetNextValueSegment
(
pCurrSeg
))
!=
nullptr
)
{
if
(
Amt
==
0
)
/// whole buffer is full now, so return
return
BenErr_OK
;
return
;
if
(
SegOffset
<=
Offset
&&
Offset
<
SegOffset
+
pCurrSeg
->
GetSize
())
/// begin at current segment
{
...
...
@@ -110,17 +110,17 @@ CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
{
if
((
Err
=
pContainer
->
SeekToPosition
(
pCurrSeg
->
GetPosition
()
+
OffsetIntoSeg
))
!=
BenErr_OK
)
return
Err
;
return
;
if
((
Err
=
pContainer
->
Read
(
pBuffer
,
AmtThisSeg
,
&
AmtReadThisSeg
))
!=
BenErr_OK
)
return
Err
;
return
;
}
*
pAmtRead
+=
AmtReadThisSeg
;
if
(
AmtThisSeg
!=
AmtReadThisSeg
)
return
BenErr_UnexpectedEndOfFile
;
return
;
pBuffer
+=
AmtReadThisSeg
;
Offset
+=
AmtReadThisSeg
;
...
...
@@ -129,7 +129,6 @@ CBenValue::ReadValueData(void * pReadBuffer, unsigned long Offset,
SegOffset
+=
pCurrSeg
->
GetSize
();
}
return
BenErr_OK
;
}
}
//end namespace OpenStormBento
...
...
lotuswordpro/source/filter/lwpfilehdr.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -67,28 +67,20 @@ LwpFileHeader::LwpFileHeader()
/**
* @descr read file header object from svstream
*/
sal_uInt32
LwpFileHeader
::
Read
(
LwpSvStream
*
pStrm
)
void
LwpFileHeader
::
Read
(
LwpSvStream
*
pStrm
)
{
sal_uInt32
len
=
0
;
pStrm
->
ReadUInt16
(
m_nAppRevision
);
len
+=
sizeof
(
m_nAppRevision
);
pStrm
->
ReadUInt16
(
m_nFileRevision
);
len
+=
sizeof
(
m_nFileRevision
);
pStrm
->
ReadUInt16
(
m_nAppReleaseNo
);
len
+=
sizeof
(
m_nAppReleaseNo
);
pStrm
->
ReadUInt16
(
m_nRequiredAppRevision
);
len
+=
sizeof
(
m_nRequiredAppRevision
);
pStrm
->
ReadUInt16
(
m_nRequiredFileRevision
);
len
+=
sizeof
(
m_nRequiredFileRevision
);
len
+=
m_cDocumentID
.
Read
(
pStrm
);
m_cDocumentID
.
Read
(
pStrm
);
if
(
m_nFileRevision
<
0x000B
)
m_nRootIndexOffset
=
BAD_OFFSET
;
else
{
pStrm
->
ReadUInt32
(
m_nRootIndexOffset
);
len
+=
sizeof
(
m_nRootIndexOffset
);
}
return
len
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
lotuswordpro/source/filter/lwpfilehdr.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -74,7 +74,7 @@ private: //data member
sal_uInt32
m_nRootIndexOffset
;
public
:
static
sal_uInt16
m_nFileRevision
;
sal_uInt32
Read
(
LwpSvStream
*
pStrm
);
void
Read
(
LwpSvStream
*
pStrm
);
sal_uInt32
GetRootIndexOffset
();
LwpObjectID
&
GetDocID
();
};
...
...
lotuswordpro/source/filter/lwpfoundry.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -515,14 +515,13 @@ VO_PARASTYLE/VO_CHARACTERSTYLE call this method to add its created style to XFSt
Prerequisite: pStyle has been created and all properties has been set to it.
Return the XFStyle* added by XFStyleManager
*/
IXFStyle
*
LwpStyleManager
::
AddStyle
(
LwpObjectID
styleObjID
,
IXFStyle
*
pStyle
)
void
LwpStyleManager
::
AddStyle
(
LwpObjectID
styleObjID
,
IXFStyle
*
pStyle
)
{
assert
(
pStyle
);
//pStyle may change if same style is found in XFStyleManager
XFStyleManager
*
pXFStyleManager
=
LwpGlobalMgr
::
GetInstance
()
->
GetXFStyleManager
();
pStyle
=
pXFStyleManager
->
AddStyle
(
pStyle
).
m_pStyle
;
m_StyleList
.
insert
(
LwpStyleMap
::
value_type
(
styleObjID
,
pStyle
));
return
pStyle
;
}
/*
...
...
lotuswordpro/source/filter/lwpfoundry.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -308,7 +308,7 @@ private:
LwpStyleMap
m_StyleList
;
public
:
void
SetFoundry
(
LwpFoundry
*
pFoundry
){
m_pFoundry
=
pFoundry
;}
IXFStyle
*
AddStyle
(
LwpObjectID
styleObjID
,
IXFStyle
*
pStyle
);
void
AddStyle
(
LwpObjectID
styleObjID
,
IXFStyle
*
pStyle
);
IXFStyle
*
GetStyle
(
const
LwpObjectID
&
styleObjID
);
};
#endif
...
...
lotuswordpro/source/filter/lwpfribsection.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -242,7 +242,7 @@ LwpMasterPage::LwpMasterPage(LwpPara* pPara, LwpPageLayout* pLayout)
* @descr: Register master page style for para style and register section style if necessary
*
*/
bool
LwpMasterPage
::
RegisterMasterPage
(
LwpFrib
*
pFrib
)
void
LwpMasterPage
::
RegisterMasterPage
(
LwpFrib
*
pFrib
)
{
//if there is no other frib after current frib, register master page in starting para of next page
LwpStory
*
pStory
=
nullptr
;
...
...
@@ -253,7 +253,7 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
{
pStory
->
SetCurrentLayout
(
m_pLayout
);
RegisterFillerPageStyle
();
return
false
;
return
;
}
m_bNewSection
=
false
;
...
...
@@ -301,7 +301,7 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
//register tab style;
pStory
=
dynamic_cast
<
LwpStory
*>
(
m_pPara
->
GetStoryID
().
obj
().
get
());
if
(
!
pStory
)
return
false
;
return
;
pStory
->
SetTabLayout
(
m_pLayout
);
m_pPara
->
RegisterTabStyle
(
pOverStyle
);
...
...
@@ -334,7 +334,6 @@ bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
//}
m_SectionStyleName
=
pXFStyleManager
->
AddStyle
(
pSectStyle
).
m_pStyle
->
GetStyleName
();
}
return
false
;
}
/**
...
...
lotuswordpro/source/filter/lwpfribsection.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -76,7 +76,7 @@ public:
public
:
//for page layout register and parse
bool
RegisterMasterPage
(
LwpFrib
*
pFrib
);
void
RegisterMasterPage
(
LwpFrib
*
pFrib
);
void
RegisterFillerPageStyle
();
void
ParseSection
(
LwpFrib
*
pFrib
);
XFSection
*
CreateXFSection
();
...
...
lotuswordpro/source/filter/lwpobjid.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -91,13 +91,14 @@ sal_uInt32 LwpObjectID::Read(LwpObjectStream *pObj)
* if index>0, lowid is get from time table per the index
* else index+lowid+highid
*/
sal_uInt32
LwpObjectID
::
ReadIndexed
(
LwpSvStream
*
pStrm
)
void
LwpObjectID
::
ReadIndexed
(
LwpSvStream
*
pStrm
)
{
//note the m_nLow store the index instead of time from the timetable as in LWP
m_bIsCompressed
=
false
;
if
(
LwpFileHeader
::
m_nFileRevision
<
0x000B
)
{
return
Read
(
pStrm
);
Read
(
pStrm
);
return
;
}
pStrm
->
ReadUInt8
(
m_nIndex
);
...
...
@@ -116,7 +117,7 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
pStrm
->
ReadUInt32
(
m_nLow
);
}
pStrm
->
ReadUInt16
(
m_nHigh
);
return
DiskSizeIndexed
();
DiskSizeIndexed
();
}
/**
...
...
@@ -153,21 +154,19 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream *pStrm)
* else lowid equals to the lowid of previous low id
* and high id = the high id of previous id + diff +1
*/
sal_uInt32
LwpObjectID
::
ReadCompressed
(
LwpObjectStream
*
pObj
,
LwpObjectID
&
prev
)
void
LwpObjectID
::
ReadCompressed
(
LwpObjectStream
*
pObj
,
LwpObjectID
&
prev
)
{
sal_uInt8
diff
=
pObj
->
QuickReaduInt8
();
sal_uInt32
len
=
1
;
if
(
diff
==
255
)
{
len
+=
Read
(
pObj
);
Read
(
pObj
);
}
else
{
m_nLow
=
prev
.
GetLow
();
m_nHigh
=
prev
.
GetHigh
()
+
diff
+
1
;
}
return
len
;
}
/**
* @descr return the size of indexed object id
...
...
lotuswordpro/source/filter/lwpobjid.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -86,9 +86,9 @@ private:
public
:
sal_uInt32
Read
(
LwpSvStream
*
pStrm
);
sal_uInt32
Read
(
LwpObjectStream
*
pStrm
);
sal_uInt32
ReadIndexed
(
LwpSvStream
*
pStrm
);
void
ReadIndexed
(
LwpSvStream
*
pStrm
);
sal_uInt32
ReadIndexed
(
LwpObjectStream
*
pStrm
);
sal_uInt32
ReadCompressed
(
LwpObjectStream
*
pObj
,
LwpObjectID
&
prev
);
void
ReadCompressed
(
LwpObjectStream
*
pObj
,
LwpObjectID
&
prev
);
/**
* @descr return the size of object id with format: low(4bytes)+high(2bytes)
...
...
lotuswordpro/source/filter/lwpobjstrm.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -191,14 +191,12 @@ void LwpObjectStream::SeekRel(sal_uInt16 pos)
/**
* @descr Seek to pos in object buffer/buffer
*/
bool
LwpObjectStream
::
Seek
(
sal_uInt16
pos
)
void
LwpObjectStream
::
Seek
(
sal_uInt16
pos
)
{
if
(
pos
<
m_nBufSize
)
{
m_nReadPos
=
pos
;
return
true
;
}
return
false
;
}
/**
...
...
lotuswordpro/source/filter/lwpobjstrm.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -88,7 +88,7 @@ public:
sal_uInt16
QuickRead
(
void
*
buf
,
sal_uInt16
len
);
sal_uInt16
GetPos
()
{
return
m_nReadPos
;
}
void
SeekRel
(
sal_uInt16
pos
);
bool
Seek
(
sal_uInt16
pos
);
void
Seek
(
sal_uInt16
pos
);
void
SkipExtra
();
sal_uInt16
CheckExtra
();
...
...
lotuswordpro/source/filter/lwppara.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -311,9 +311,8 @@ void LwpPara::XFConvert(XFContentContainer* pCont)
AddBreakAfter
(
m_pXFContainer
);
}
bool
LwpPara
::
RegisterMasterPage
(
XFParaStyle
*
pBaseStyle
)
void
LwpPara
::
RegisterMasterPage
(
XFParaStyle
*
pBaseStyle
)
{
bool
bSuccess
=
false
;
//get story
LwpStory
*
pStory
=
dynamic_cast
<
LwpStory
*>
(
m_Story
.
obj
().
get
());
//if pagelayout is modified, register the pagelayout
...
...
@@ -326,7 +325,6 @@ bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
RegisterNewSectionStyle
(
pLayout
);
}
bSuccess
=
true
;
//register master page style
XFParaStyle
*
pOverStyle
=
new
XFParaStyle
();
*
pOverStyle
=
*
pBaseStyle
;
...
...
@@ -337,7 +335,6 @@ bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
XFStyleManager
*
pXFStyleManager
=
LwpGlobalMgr
::
GetInstance
()
->
GetXFStyleManager
();
m_StyleName
=
pXFStyleManager
->
AddStyle
(
pOverStyle
).
m_pStyle
->
GetStyleName
();
}
return
bSuccess
;
}
/**
* @short register paragraph style
...
...
lotuswordpro/source/filter/lwppara.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -275,7 +275,7 @@ private:
void
OverrideParaBullet
(
LwpParaProperty
*
pProps
);
void
OverrideParaNumbering
(
LwpParaProperty
*
pProps
);
bool
RegisterMasterPage
(
XFParaStyle
*
pBaseStyle
);
void
RegisterMasterPage
(
XFParaStyle
*
pBaseStyle
);
void
RegisterNewSectionStyle
(
LwpPageLayout
*
pLayout
);
void
ParseDropcapContent
();
...
...
lotuswordpro/source/filter/lwpsvstream.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -92,9 +92,9 @@ LwpSvStream& LwpSvStream::ReadUInt32( sal_uInt32& rUInt32 )
/**
* @descr SeekRel in stream
*/
sal_Int64
LwpSvStream
::
SeekRel
(
sal_Int64
pos
)
void
LwpSvStream
::
SeekRel
(
sal_Int64
pos
)
{
return
m_pStream
->
SeekRel
(
pos
);
m_pStream
->
SeekRel
(
pos
);
}
/**
* @descr Get the current position in stream
...
...
lotuswordpro/source/filter/lwpsvstream.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -69,7 +69,7 @@ class LwpSvStream
public
:
LwpSvStream
(
SvStream
*
pStream
,
LwpSvStream
*
pCompressed
=
nullptr
);
sal_Int32
Read
(
void
*
bytes
,
sal_Int32
nBytesToRead
);
sal_Int64
SeekRel
(
sal_Int64
pos
);
void
SeekRel
(
sal_Int64
pos
);
sal_Int64
Tell
();
sal_Int64
Seek
(
sal_Int64
pos
);
...
...
lotuswordpro/source/filter/lwptblformula.cxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -93,19 +93,17 @@ LwpFormulaInfo::~LwpFormulaInfo()
}
}
bool
LwpFormulaInfo
::
ReadConst
()
void
LwpFormulaInfo
::
ReadConst
()
{
double
Constant
=
m_pObjStrm
->
QuickReadDouble
();
m_aStack
.
push_back
(
new
LwpFormulaConst
(
Constant
)
);
return
true
;
}
/**
* Need more effort for unicode.
*/
bool
LwpFormulaInfo
::
ReadText
()
void
LwpFormulaInfo
::
ReadText
()
{
m_pObjStrm
->
QuickReadInt16
();
//Disk Size
sal_uInt16
nStrLen
=
m_pObjStrm
->
QuickReadInt16
();
...
...
@@ -119,7 +117,6 @@ bool LwpFormulaInfo::ReadText()
aText
+=
"
\"
"
;
m_aStack
.
push_back
(
new
LwpFormulaText
(
aText
));
return
true
;
}
bool
LwpFormulaInfo
::
ReadCellID
()
...
...
@@ -162,10 +159,9 @@ bool LwpFormulaInfo::ReadCellRange()
/**
* Read expression from wordpro file
*/
bool
LwpFormulaInfo
::
ReadExpression
()
void
LwpFormulaInfo
::
ReadExpression
()
{
sal_uInt16
TokenType
,
DiskLength
;
bool
readSucceeded
=
true
;
/* Read the compiled expression length */
m_pObjStrm
->
SeekRel
(
2
);
...
...
@@ -189,12 +185,11 @@ bool LwpFormulaInfo::ReadExpression()
}
case
TK_CELLID
:
if
(
!
ReadCellID
())
readSucceeded
=
false
;
ReadCellID
();
break
;
case
TK_CELLRANGE
:
readSucceeded
=
ReadCellRange
();
ReadCellRange
();
break
;
case
TK_SUM
:
...
...
@@ -205,8 +200,7 @@ bool LwpFormulaInfo::ReadExpression()
case
TK_AVERAGE
:
{
LwpFormulaFunc
*
pFunc
=
new
LwpFormulaFunc
(
TokenType
);
if
(
!
ReadArguments
(
*
pFunc
))
readSucceeded
=
false
;
ReadArguments
(
*
pFunc
);
m_aStack
.
push_back
(
pFunc
);
}
break
;
...
...
@@ -233,10 +227,6 @@ bool LwpFormulaInfo::ReadExpression()
pOp
->
AddArg
(
m_aStack
.
back
());
m_aStack
.
pop_back
();
m_aStack
.
push_back
(
pOp
);
}
else
{
readSucceeded
=
false
;
}
break
;
case
TK_UNARY_MINUS
:
if
(
!
m_aStack
.
empty
())
...
...
@@ -245,20 +235,14 @@ bool LwpFormulaInfo::ReadExpression()
pOp
->
AddArg
(
m_aStack
.
back
());
m_aStack
.
pop_back
();
m_aStack
.
push_back
(
pOp
);
}
else
{
readSucceeded
=
false
;
}
break
;
default
:
// We don't know what to do with this token, so eat it.
m_pObjStrm
->
SeekRel
(
DiskLength
);
readSucceeded
=
false
;
break
;
}
MarkUnsupported
(
TokenType
);
}
return
readSucceeded
;
}
void
LwpFormulaInfo
::
MarkUnsupported
(
sal_uInt16
TokenType
)
...
...
lotuswordpro/source/filter/lwptblformula.hxx
Dosyayı görüntüle @
52e69bfb
...
...
@@ -200,16 +200,16 @@ public:
protected
:
void
Read
()
override
;
bool
ReadCellID
();
bool
ReadText
();
void
ReadText
();
bool
ReadCellRange
();
bool
ReadExpression
();
void
ReadExpression
();
bool
ReadArguments
(
LwpFormulaFunc
&
aFunc
);
bool
m_bSupported
;
private
:
virtual
~
LwpFormulaInfo
();
std
::
vector
<
LwpFormulaArg
*>
m_aStack
;
bool
ReadConst
();
void
ReadConst
();
void
MarkUnsupported
(
sal_uInt16
TokenType
);
sal_uInt16
m_nFormulaRow
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment