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
*ppContainer = pContainer;
return BenErr_OK;
}
BenError
LtcBenContainer::Close()
{
return BenErr_OK;
}
LtcBenContainer::~LtcBenContainer()
{
Close();
}
BenError
......
......@@ -204,7 +204,6 @@ class LtcBenContainer
{
public:
BenError Open();
BenError Close();
BenError RegisterPropertyName(const char * sPropertyName,
pCBenPropertyName * ppPropertyName);
// Pass NULL to begin iteration. Done when returns NULL.
......@@ -297,8 +296,6 @@ public: // Internal methods
pCurrValueSegment);
inline pLtcBenContainer GetContainer();
CUtList& GetValueSegments() { return cValueSegments; }
// Currently, no generation support
BenGeneration GetGeneration() { return 1; }
private: // Data
pCBenProperty cpProperty;
......
......@@ -110,9 +110,4 @@ rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding(sal_uInt16 wordproCode)
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: */
......@@ -75,7 +75,11 @@ public:
static LwpCharSetMgr* GetInstance();
void SetCodePageMap();
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:
std::map<sal_uInt16,rtl_TextEncoding> m_CodePageMap;
static LwpCharSetMgr* Instance;
......
......@@ -1099,7 +1099,7 @@ XFFrame* LwpDrawTextBox::CreateDrawObj(const OUString& rStyleName )
else
{
// temporary code, need to create Encoding from the value of nTextCharacterSet
aEncoding = LwpCharSetMgr::GetInstance()->GetTextCharEncoding();
aEncoding = LwpCharSetMgr::GetTextCharEncoding();
}
XFParagraph* pXFPara = new XFParagraph();
......@@ -1311,7 +1311,7 @@ XFFrame* LwpDrawTextArt::CreateDrawObj(const OUString& rStyleName)
else
{
// temporary code, need to create Encoding from the value of nTextCharacterSet
aEncoding = LwpCharSetMgr::GetInstance()->GetTextCharEncoding();
aEncoding = LwpCharSetMgr::GetTextCharEncoding();
}
XFParagraph* pXFPara = new XFParagraph();
......
......@@ -98,7 +98,7 @@ void LwpFribText::Read(LwpObjectStream* pObjStrm, sal_uInt16 len)
rEncode = LwpCharSetMgr::GetInstance()->
GetTextCharEncoding(m_pModifiers->CodePage);
else
rEncode = LwpCharSetMgr::GetInstance()->GetTextCharEncoding();
rEncode = LwpCharSetMgr::GetTextCharEncoding();
}
LwpTools::QuickReadUnicode(pObjStrm, m_Content, len, rEncode);
}
......@@ -413,7 +413,7 @@ void LwpFribUnicode::Read(LwpObjectStream* pObjStrm, sal_uInt16 len)
rEncode = LwpCharSetMgr::GetInstance()->
GetTextCharEncoding(m_pModifiers->CodePage);
else
rEncode = LwpCharSetMgr::GetInstance()->GetTextCharEncoding();
rEncode = LwpCharSetMgr::GetTextCharEncoding();
LwpTools::QuickReadUnicode(pObjStrm, m_Content, len, rEncode);
......
......@@ -91,7 +91,7 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
rStrm.ReadUInt32( nRefCount );
rStrm.ReadUInt32( nNextVersionOffset );
nHeaderSize = sizeof(m_nTag) + m_ID.DiskSize()
nHeaderSize = sizeof(m_nTag) + LwpObjectID::DiskSize()
+ sizeof(nVersionID)
+ sizeof(nRefCount)
+ sizeof(nNextVersionOffset)
......
......@@ -182,13 +182,6 @@ sal_uInt32 LwpObjectID::DiskSizeIndexed() const
+ ((m_nIndex != 0) ? 0 : sizeof(m_nLow))
+ 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
*/
......
......@@ -94,7 +94,10 @@ public:
sal_uInt32 ReadIndexed( LwpObjectStream *pStrm );
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;
bool IsNull() const;
bool IsCompressed();
......
......@@ -961,7 +961,4 @@ void LwpNotifyListPersistent::Read(LwpObjectStream* pObjStrm)
pObjStrm->SkipExtra();
}
void LwpPara::Release()
{}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -153,7 +153,6 @@ public:
void RegisterStyle() SAL_OVERRIDE;
void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
void XFConvert(XFContentContainer* pCont) SAL_OVERRIDE;
void Release();
LwpPara* GetParent();
LwpObjectID& GetStoryID();
......
......@@ -125,7 +125,6 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
LwpPara* pNext;
while(pCur)
{
pCur->Release();
pNext = dynamic_cast<LwpPara*> ( pCur->GetNext().obj().get() );
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpObjectFactory* pObjMgr = pGlobal->GetLwpObjFactory();
......
......@@ -211,9 +211,6 @@ public:
void SetListNumber( sal_Int32 level, XFNumFmt& numFmt, sal_Int16 nStartValue = 1 );
//not implemented now.
void SetListImage(){}
virtual enumXFStyle GetStyleFamily() SAL_OVERRIDE
{
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