Kaydet (Commit) d7a4135b authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantfunction: lotuswordpro

Change-Id: I16fbba302c7330010f9b4c888f48a868ad6b921e
üst 8e786be3
...@@ -91,15 +91,9 @@ sal_uLong BenOpenContainer(LwpSvStream * pStream, pLtcBenContainer * ppContainer ...@@ -91,15 +91,9 @@ sal_uLong BenOpenContainer(LwpSvStream * pStream, pLtcBenContainer * ppContainer
*ppContainer = pContainer; *ppContainer = pContainer;
return BenErr_OK; return BenErr_OK;
} }
BenError
LtcBenContainer::Close()
{
return BenErr_OK;
}
LtcBenContainer::~LtcBenContainer() LtcBenContainer::~LtcBenContainer()
{ {
Close();
} }
BenError BenError
......
...@@ -204,7 +204,6 @@ class LtcBenContainer ...@@ -204,7 +204,6 @@ class LtcBenContainer
{ {
public: public:
BenError Open(); BenError Open();
BenError Close();
BenError RegisterPropertyName(const char * sPropertyName, BenError RegisterPropertyName(const char * sPropertyName,
pCBenPropertyName * ppPropertyName); pCBenPropertyName * ppPropertyName);
// Pass NULL to begin iteration. Done when returns NULL. // Pass NULL to begin iteration. Done when returns NULL.
...@@ -297,8 +296,6 @@ public: // Internal methods ...@@ -297,8 +296,6 @@ public: // Internal methods
pCurrValueSegment); pCurrValueSegment);
inline pLtcBenContainer GetContainer(); inline pLtcBenContainer GetContainer();
CUtList& GetValueSegments() { return cValueSegments; } CUtList& GetValueSegments() { return cValueSegments; }
// Currently, no generation support
BenGeneration GetGeneration() { return 1; }
private: // Data private: // Data
pCBenProperty cpProperty; pCBenProperty cpProperty;
......
...@@ -110,9 +110,4 @@ rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding(sal_uInt16 wordproCode) ...@@ -110,9 +110,4 @@ rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding(sal_uInt16 wordproCode)
return GetTextCharEncoding(); return GetTextCharEncoding();
} }
rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding()
{
return RTL_TEXTENCODING_MS_1252;//here should be a default value,1252 or get from platform, 1-18
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -75,7 +75,11 @@ public: ...@@ -75,7 +75,11 @@ public:
static LwpCharSetMgr* GetInstance(); static LwpCharSetMgr* GetInstance();
void SetCodePageMap(); void SetCodePageMap();
rtl_TextEncoding GetTextCharEncoding(sal_uInt16 wordproCode); rtl_TextEncoding GetTextCharEncoding(sal_uInt16 wordproCode);
rtl_TextEncoding GetTextCharEncoding(); static rtl_TextEncoding GetTextCharEncoding()
{
return RTL_TEXTENCODING_MS_1252;//here should be a default value,1252 or get from platform, 1-18
}
private: private:
std::map<sal_uInt16,rtl_TextEncoding> m_CodePageMap; std::map<sal_uInt16,rtl_TextEncoding> m_CodePageMap;
static LwpCharSetMgr* Instance; static LwpCharSetMgr* Instance;
......
...@@ -1099,7 +1099,7 @@ XFFrame* LwpDrawTextBox::CreateDrawObj(const OUString& rStyleName ) ...@@ -1099,7 +1099,7 @@ XFFrame* LwpDrawTextBox::CreateDrawObj(const OUString& rStyleName )
else else
{ {
// temporary code, need to create Encoding from the value of nTextCharacterSet // temporary code, need to create Encoding from the value of nTextCharacterSet
aEncoding = LwpCharSetMgr::GetInstance()->GetTextCharEncoding(); aEncoding = LwpCharSetMgr::GetTextCharEncoding();
} }
XFParagraph* pXFPara = new XFParagraph(); XFParagraph* pXFPara = new XFParagraph();
...@@ -1311,7 +1311,7 @@ XFFrame* LwpDrawTextArt::CreateDrawObj(const OUString& rStyleName) ...@@ -1311,7 +1311,7 @@ XFFrame* LwpDrawTextArt::CreateDrawObj(const OUString& rStyleName)
else else
{ {
// temporary code, need to create Encoding from the value of nTextCharacterSet // temporary code, need to create Encoding from the value of nTextCharacterSet
aEncoding = LwpCharSetMgr::GetInstance()->GetTextCharEncoding(); aEncoding = LwpCharSetMgr::GetTextCharEncoding();
} }
XFParagraph* pXFPara = new XFParagraph(); XFParagraph* pXFPara = new XFParagraph();
......
...@@ -98,7 +98,7 @@ void LwpFribText::Read(LwpObjectStream* pObjStrm, sal_uInt16 len) ...@@ -98,7 +98,7 @@ void LwpFribText::Read(LwpObjectStream* pObjStrm, sal_uInt16 len)
rEncode = LwpCharSetMgr::GetInstance()-> rEncode = LwpCharSetMgr::GetInstance()->
GetTextCharEncoding(m_pModifiers->CodePage); GetTextCharEncoding(m_pModifiers->CodePage);
else else
rEncode = LwpCharSetMgr::GetInstance()->GetTextCharEncoding(); rEncode = LwpCharSetMgr::GetTextCharEncoding();
} }
LwpTools::QuickReadUnicode(pObjStrm, m_Content, len, rEncode); LwpTools::QuickReadUnicode(pObjStrm, m_Content, len, rEncode);
} }
...@@ -413,7 +413,7 @@ void LwpFribUnicode::Read(LwpObjectStream* pObjStrm, sal_uInt16 len) ...@@ -413,7 +413,7 @@ void LwpFribUnicode::Read(LwpObjectStream* pObjStrm, sal_uInt16 len)
rEncode = LwpCharSetMgr::GetInstance()-> rEncode = LwpCharSetMgr::GetInstance()->
GetTextCharEncoding(m_pModifiers->CodePage); GetTextCharEncoding(m_pModifiers->CodePage);
else else
rEncode = LwpCharSetMgr::GetInstance()->GetTextCharEncoding(); rEncode = LwpCharSetMgr::GetTextCharEncoding();
LwpTools::QuickReadUnicode(pObjStrm, m_Content, len, rEncode); LwpTools::QuickReadUnicode(pObjStrm, m_Content, len, rEncode);
......
...@@ -91,7 +91,7 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm) ...@@ -91,7 +91,7 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
rStrm.ReadUInt32( nRefCount ); rStrm.ReadUInt32( nRefCount );
rStrm.ReadUInt32( nNextVersionOffset ); rStrm.ReadUInt32( nNextVersionOffset );
nHeaderSize = sizeof(m_nTag) + m_ID.DiskSize() nHeaderSize = sizeof(m_nTag) + LwpObjectID::DiskSize()
+ sizeof(nVersionID) + sizeof(nVersionID)
+ sizeof(nRefCount) + sizeof(nRefCount)
+ sizeof(nNextVersionOffset) + sizeof(nNextVersionOffset)
......
...@@ -182,13 +182,6 @@ sal_uInt32 LwpObjectID::DiskSizeIndexed() const ...@@ -182,13 +182,6 @@ sal_uInt32 LwpObjectID::DiskSizeIndexed() const
+ ((m_nIndex != 0) ? 0 : sizeof(m_nLow)) + ((m_nIndex != 0) ? 0 : sizeof(m_nLow))
+ sizeof(m_nHigh); + sizeof(m_nHigh);
} }
/**
* @descr return the size of object id with format: low(4bytes)+high(2bytes)
*/
sal_uInt32 LwpObjectID::DiskSize() const
{
return sizeof(m_nLow) + sizeof(m_nHigh);
}
/** /**
* @descr get object from object factory per the object id * @descr get object from object factory per the object id
*/ */
......
...@@ -94,7 +94,10 @@ public: ...@@ -94,7 +94,10 @@ public:
sal_uInt32 ReadIndexed( LwpObjectStream *pStrm ); sal_uInt32 ReadIndexed( LwpObjectStream *pStrm );
sal_uInt32 ReadCompressed( LwpObjectStream* pObj, LwpObjectID& prev ); sal_uInt32 ReadCompressed( LwpObjectStream* pObj, LwpObjectID& prev );
sal_uInt32 DiskSize() const; /**
* @descr return the size of object id with format: low(4bytes)+high(2bytes)
*/
static sal_uInt32 DiskSize() { return sizeof(m_nLow) + sizeof(m_nHigh); }
sal_uInt32 DiskSizeIndexed() const; sal_uInt32 DiskSizeIndexed() const;
bool IsNull() const; bool IsNull() const;
bool IsCompressed(); bool IsCompressed();
......
...@@ -961,7 +961,4 @@ void LwpNotifyListPersistent::Read(LwpObjectStream* pObjStrm) ...@@ -961,7 +961,4 @@ void LwpNotifyListPersistent::Read(LwpObjectStream* pObjStrm)
pObjStrm->SkipExtra(); pObjStrm->SkipExtra();
} }
void LwpPara::Release()
{}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -153,7 +153,6 @@ public: ...@@ -153,7 +153,6 @@ public:
void RegisterStyle() SAL_OVERRIDE; void RegisterStyle() SAL_OVERRIDE;
void Parse(IXFStream* pOutputStream) SAL_OVERRIDE; void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE; void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
void Release();
LwpPara* GetParent(); LwpPara* GetParent();
LwpObjectID& GetStoryID(); LwpObjectID& GetStoryID();
......
...@@ -125,7 +125,6 @@ void LwpStory::XFConvert(XFContentContainer* pCont) ...@@ -125,7 +125,6 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
LwpPara* pNext; LwpPara* pNext;
while(pCur) while(pCur)
{ {
pCur->Release();
pNext = dynamic_cast<LwpPara*> ( pCur->GetNext().obj().get() ); pNext = dynamic_cast<LwpPara*> ( pCur->GetNext().obj().get() );
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(); LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpObjectFactory* pObjMgr = pGlobal->GetLwpObjFactory(); LwpObjectFactory* pObjMgr = pGlobal->GetLwpObjFactory();
......
...@@ -211,9 +211,6 @@ public: ...@@ -211,9 +211,6 @@ public:
void SetListNumber( sal_Int32 level, XFNumFmt& numFmt, sal_Int16 nStartValue = 1 ); void SetListNumber( sal_Int32 level, XFNumFmt& numFmt, sal_Int16 nStartValue = 1 );
//not implemented now.
void SetListImage(){}
virtual enumXFStyle GetStyleFamily() SAL_OVERRIDE virtual enumXFStyle GetStyleFamily() SAL_OVERRIDE
{ {
return enumXFStyleList; return enumXFStyleList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment