diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-23 16:03:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-24 08:14:15 +0200 |
commit | d7a4135b072a693cb5ebf94c250d34d5beb741e3 (patch) | |
tree | e60124a8e158f9d579ee707a53352047f16c4685 /lotuswordpro | |
parent | 8e786be3ad4a64bc4f7378c3100bd4be0415f170 (diff) |
loplugin:constantfunction: lotuswordpro
Change-Id: I16fbba302c7330010f9b4c888f48a868ad6b921e
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/bencont.cxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/bento.hxx | 3 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpcharsetmgr.cxx | 5 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpcharsetmgr.hxx | 6 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfribtext.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjhdr.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjid.cxx | 7 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjid.hxx | 5 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwppara.cxx | 3 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwppara.hxx | 1 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpstory.cxx | 1 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfliststyle.hxx | 3 |
13 files changed, 14 insertions, 36 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index e70923e4b88e..a09695184d90 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -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 diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx index 0a44cf3cfeab..4d9e8f67e4ad 100644 --- a/lotuswordpro/source/filter/bento.hxx +++ b/lotuswordpro/source/filter/bento.hxx @@ -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; diff --git a/lotuswordpro/source/filter/lwpcharsetmgr.cxx b/lotuswordpro/source/filter/lwpcharsetmgr.cxx index f1d31a45c561..84e270d84297 100644 --- a/lotuswordpro/source/filter/lwpcharsetmgr.cxx +++ b/lotuswordpro/source/filter/lwpcharsetmgr.cxx @@ -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: */ diff --git a/lotuswordpro/source/filter/lwpcharsetmgr.hxx b/lotuswordpro/source/filter/lwpcharsetmgr.hxx index 6125e5ac9fcd..340b9e7e6a9b 100644 --- a/lotuswordpro/source/filter/lwpcharsetmgr.hxx +++ b/lotuswordpro/source/filter/lwpcharsetmgr.hxx @@ -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; diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 517051238816..63a5d33be74f 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -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(); diff --git a/lotuswordpro/source/filter/lwpfribtext.cxx b/lotuswordpro/source/filter/lwpfribtext.cxx index 42da9cddd01a..c87818f3007c 100644 --- a/lotuswordpro/source/filter/lwpfribtext.cxx +++ b/lotuswordpro/source/filter/lwpfribtext.cxx @@ -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); diff --git a/lotuswordpro/source/filter/lwpobjhdr.cxx b/lotuswordpro/source/filter/lwpobjhdr.cxx index 2010b78e0aa5..f16066a9d76b 100644 --- a/lotuswordpro/source/filter/lwpobjhdr.cxx +++ b/lotuswordpro/source/filter/lwpobjhdr.cxx @@ -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) diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx index 887955171414..0962f375240b 100644 --- a/lotuswordpro/source/filter/lwpobjid.cxx +++ b/lotuswordpro/source/filter/lwpobjid.cxx @@ -183,13 +183,6 @@ sal_uInt32 LwpObjectID::DiskSizeIndexed() const + 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 */ rtl::Reference<LwpObject> LwpObjectID::obj(VO_TYPE tag) const diff --git a/lotuswordpro/source/filter/lwpobjid.hxx b/lotuswordpro/source/filter/lwpobjid.hxx index bb0f29f0b714..a701ca9a4ee6 100644 --- a/lotuswordpro/source/filter/lwpobjid.hxx +++ b/lotuswordpro/source/filter/lwpobjid.hxx @@ -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(); diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index b2326f0825f7..50d7e9b641b3 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -961,7 +961,4 @@ void LwpNotifyListPersistent::Read(LwpObjectStream* pObjStrm) pObjStrm->SkipExtra(); } -void LwpPara::Release() -{} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/lwppara.hxx b/lotuswordpro/source/filter/lwppara.hxx index eaf8c152c8f0..acc694673cbc 100644 --- a/lotuswordpro/source/filter/lwppara.hxx +++ b/lotuswordpro/source/filter/lwppara.hxx @@ -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(); diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index 465438b8ee88..9b59b26d5904 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -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(); diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx index d8ea1b52e4bf..422d16c03506 100644 --- a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx @@ -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; |