diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 13:07:21 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-19 01:37:21 +0100 |
commit | 69b12a6eb3616d15035310eeb0c3dbc7aefcb5c1 (patch) | |
tree | 85fa3dd6e742033dc0b5a04b45a1e035a4c93cbd /lotuswordpro/inc | |
parent | 6ceb1d0f2e23749fe03fab08ec338ba4d7782173 (diff) |
tdf#123936 Formatting files in module lotuswordpro with clang-format
Change-Id: I3110b452b6c81fb7e5c10f6ba98ce521c51c0427
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105690
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
Diffstat (limited to 'lotuswordpro/inc')
56 files changed, 621 insertions, 747 deletions
diff --git a/lotuswordpro/inc/localtime.hxx b/lotuswordpro/inc/localtime.hxx index 9149ada7a437..a9fac8ceaf74 100644 --- a/lotuswordpro/inc/localtime.hxx +++ b/lotuswordpro/inc/localtime.hxx @@ -60,14 +60,14 @@ struct LtTm { - tools::Long tm_sec; /* seconds after the minute - [0,59] */ - tools::Long tm_min; /* minutes after the hour - [0,59] */ - tools::Long tm_hour; /* hours since midnight - [0,23] */ - tools::Long tm_mday; /* day of the month - [1,31] */ - tools::Long tm_mon; /* months since January - [0,11] */ - tools::Long tm_year; /* years since 1900 */ - tools::Long tm_wday; /* days since Sunday - [0,6] */ - tools::Long tm_yday; /* days since January 1 - [0,365] */ + tools::Long tm_sec; /* seconds after the minute - [0,59] */ + tools::Long tm_min; /* minutes after the hour - [0,59] */ + tools::Long tm_hour; /* hours since midnight - [0,23] */ + tools::Long tm_mday; /* day of the month - [1,31] */ + tools::Long tm_mon; /* months since January - [0,11] */ + tools::Long tm_year; /* years since 1900 */ + tools::Long tm_wday; /* days since Sunday - [0,6] */ + tools::Long tm_yday; /* days since January 1 - [0,365] */ LtTm() : tm_sec(0) , tm_min(0) @@ -80,8 +80,8 @@ struct LtTm { } }; -bool LtgGmTime(tools::Long rtime,LtTm& rtm); -bool LtgLocalTime(tools::Long rtime,LtTm& rtm); +bool LtgGmTime(tools::Long rtime, LtTm& rtm); +bool LtgLocalTime(tools::Long rtime, LtTm& rtm); #endif diff --git a/lotuswordpro/inc/lwpatomholder.hxx b/lotuswordpro/inc/lwpatomholder.hxx index fc7084f27f5b..321b5cb8f20d 100644 --- a/lotuswordpro/inc/lwpatomholder.hxx +++ b/lotuswordpro/inc/lwpatomholder.hxx @@ -66,22 +66,20 @@ class LwpAtomHolder { public: LwpAtomHolder(); + private: - sal_Int32 m_nAtom; - sal_Int32 m_nAssocAtom; + sal_Int32 m_nAtom; + sal_Int32 m_nAssocAtom; OUString m_String; //OUString m_UniString; //no use temporarily public: - void Read(LwpObjectStream *pStrm); - void ReadPathAtom(LwpObjectStream *pStrm); - void Skip(LwpObjectStream *pStrm); - const OUString& str() const {return m_String;} + void Read(LwpObjectStream* pStrm); + void ReadPathAtom(LwpObjectStream* pStrm); + void Skip(LwpObjectStream* pStrm); + const OUString& str() const { return m_String; } inline bool HasValue() const; }; -inline bool LwpAtomHolder::HasValue() const -{ - return (m_nAtom != BAD_ATOM); -} +inline bool LwpAtomHolder::HasValue() const { return (m_nAtom != BAD_ATOM); } #endif diff --git a/lotuswordpro/inc/lwpbasetype.hxx b/lotuswordpro/inc/lwpbasetype.hxx index 20b4c625ca15..c000501c511a 100644 --- a/lotuswordpro/inc/lwpbasetype.hxx +++ b/lotuswordpro/inc/lwpbasetype.hxx @@ -84,8 +84,10 @@ public: , m_nXHeight(0) { } + public: - void Read(LwpObjectStream *pStrm); + void Read(LwpObjectStream* pStrm); + private: sal_uInt8 m_nFamilyType; sal_uInt8 m_nSerifStyle; @@ -105,19 +107,20 @@ class LwpPoint final { public: LwpPoint(); - void Read(LwpObjectStream *pStrm); + void Read(LwpObjectStream* pStrm); void Reset(); - sal_Int32 GetX() const {return m_nX;} - sal_Int32 GetY() const {return m_nY;} + sal_Int32 GetX() const { return m_nX; } + sal_Int32 GetY() const { return m_nY; } inline void SetX(sal_Int32 nX); inline void SetY(sal_Int32 nY); + private: sal_Int32 m_nX; sal_Int32 m_nY; }; -void LwpPoint::SetX(sal_Int32 nX){m_nX = nX;} -void LwpPoint::SetY(sal_Int32 nY){m_nY = nY;} +void LwpPoint::SetX(sal_Int32 nX) { m_nX = nX; } +void LwpPoint::SetY(sal_Int32 nY) { m_nY = nY; } #endif diff --git a/lotuswordpro/inc/lwpfilehdr.hxx b/lotuswordpro/inc/lwpfilehdr.hxx index 2bb49127ab8f..240b266aca52 100644 --- a/lotuswordpro/inc/lwpfilehdr.hxx +++ b/lotuswordpro/inc/lwpfilehdr.hxx @@ -64,6 +64,7 @@ class LwpFileHeader { public: LwpFileHeader(); + private: //data member sal_uInt16 m_nAppRevision; sal_uInt16 m_nAppReleaseNo; @@ -71,20 +72,15 @@ private: //data member sal_uInt16 m_nRequiredFileRevision; LwpObjectID m_cDocumentID; sal_uInt32 m_nRootIndexOffset; + public: static sal_uInt16 m_nFileRevision; - void Read(LwpSvStream *pStrm); + void Read(LwpSvStream* pStrm); sal_uInt32 GetRootIndexOffset() const; LwpObjectID& GetDocID(); }; -inline sal_uInt32 LwpFileHeader::GetRootIndexOffset() const -{ - return m_nRootIndexOffset; -} -inline LwpObjectID& LwpFileHeader::GetDocID() -{ - return m_cDocumentID; -} +inline sal_uInt32 LwpFileHeader::GetRootIndexOffset() const { return m_nRootIndexOffset; } +inline LwpObjectID& LwpFileHeader::GetDocID() { return m_cDocumentID; } #endif diff --git a/lotuswordpro/inc/lwpfrib.hxx b/lotuswordpro/inc/lwpfrib.hxx index 9af56ab38fcd..a3f821201fba 100644 --- a/lotuswordpro/inc/lwpfrib.hxx +++ b/lotuswordpro/inc/lwpfrib.hxx @@ -90,42 +90,49 @@ class LwpFrib public: explicit LwpFrib(LwpPara* pPara); virtual ~LwpFrib(); - static LwpFrib* CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt8 fribtag, sal_uInt8 editID); + static LwpFrib* CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt8 fribtag, + sal_uInt8 editID); virtual void Read(LwpObjectStream* pObjStrm, sal_uInt16 len); - LwpFrib* GetNext(){return m_pNext;} - void SetNext(LwpFrib* next){m_pNext = next;} - sal_uInt8 GetType() const { return m_nFribType;} + LwpFrib* GetNext() { return m_pNext; } + void SetNext(LwpFrib* next) { m_pNext = next; } + sal_uInt8 GetType() const { return m_nFribType; } OUString GetEditor(); XFColor GetHighlightColor(); + protected: - std::map<LwpFrib*,OUString>* m_pFribMap; + std::map<LwpFrib*, OUString>* m_pFribMap; LwpPara* m_pPara; LwpFrib* m_pNext; sal_uInt8 m_nFribType; std::unique_ptr<ModifierInfo> m_pModifiers; OUString m_StyleName; + public: bool m_ModFlag; - const OUString& GetStyleName() const {return m_StyleName;} + const OUString& GetStyleName() const { return m_StyleName; } void SetModifiers(ModifierInfo* pModifiers); - ModifierInfo* GetModifiers(){return m_pModifiers.get();} + ModifierInfo* GetModifiers() { return m_pModifiers.get(); } virtual void RegisterStyle(LwpFoundry* pFoundry); bool HasNextFrib(); - void ConvertChars(XFContentContainer* pXFPara,const OUString& text); - void ConvertHyperLink(XFContentContainer* pXFPara, const LwpHyperlinkMgr* pHyperlink,const OUString& text); + void ConvertChars(XFContentContainer* pXFPara, const OUString& text); + void ConvertHyperLink(XFContentContainer* pXFPara, const LwpHyperlinkMgr* pHyperlink, + const OUString& text); rtl::Reference<XFFont> GetFont(); - sal_uInt8 GetRevisionType() const {return m_nRevisionType;} - bool GetRevisionFlag() const {return m_bRevisionFlag;} - enum{ - REV_INSERT =0, + sal_uInt8 GetRevisionType() const { return m_nRevisionType; } + bool GetRevisionFlag() const { return m_bRevisionFlag; } + enum + { + REV_INSERT = 0, REV_DELETE = 1, }; - void Register(std::map<LwpFrib*,OUString>* pFribMap); + void Register(std::map<LwpFrib*, OUString>* pFribMap); void Deregister(); + private: - static void ReadModifiers(LwpObjectStream* pObjStrm,ModifierInfo* pModInfo); + static void ReadModifiers(LwpObjectStream* pObjStrm, ModifierInfo* pModInfo); + protected: sal_uInt8 m_nRevisionType; bool m_bRevisionFlag; diff --git a/lotuswordpro/inc/lwpglobalmgr.hxx b/lotuswordpro/inc/lwpglobalmgr.hxx index 9bfc5e3d6513..cfcea278b621 100644 --- a/lotuswordpro/inc/lwpglobalmgr.hxx +++ b/lotuswordpro/inc/lwpglobalmgr.hxx @@ -77,20 +77,22 @@ class LwpGlobalMgr { public: ~LwpGlobalMgr(); - static LwpGlobalMgr* GetInstance(LwpSvStream* pSvStream=nullptr); + static LwpGlobalMgr* GetInstance(LwpSvStream* pSvStream = nullptr); static void DeleteInstance(); - LwpObjectFactory* GetLwpObjFactory(){return m_pObjFactory.get();} - LwpBookmarkMgr* GetLwpBookmarkMgr(){return m_pBookmarkMgr.get();} - LwpChangeMgr* GetLwpChangeMgr(){return m_pChangeMgr.get();} - XFFontFactory* GetXFFontFactory(){return m_pXFFontFactory.get();} - XFStyleManager* GetXFStyleManager(){return m_pXFStyleManager.get();} + LwpObjectFactory* GetLwpObjFactory() { return m_pObjFactory.get(); } + LwpBookmarkMgr* GetLwpBookmarkMgr() { return m_pBookmarkMgr.get(); } + LwpChangeMgr* GetLwpChangeMgr() { return m_pChangeMgr.get(); } + XFFontFactory* GetXFFontFactory() { return m_pXFFontFactory.get(); } + XFStyleManager* GetXFStyleManager() { return m_pXFStyleManager.get(); } void SetEditorAttrMap(sal_uInt16 nID, LwpEditorAttr* pAttr); OUString GetEditorName(sal_uInt8 nID); XFColor GetHighlightColor(sal_uInt8 nID); + private: explicit LwpGlobalMgr(LwpSvStream* pSvStream); + private: - static std::map< sal_uInt32,LwpGlobalMgr* > m_ThreadMap; + static std::map<sal_uInt32, LwpGlobalMgr*> m_ThreadMap; std::unique_ptr<LwpObjectFactory> m_pObjFactory; std::unique_ptr<LwpBookmarkMgr> m_pBookmarkMgr; std::unique_ptr<LwpChangeMgr> m_pChangeMgr; diff --git a/lotuswordpro/inc/lwpobj.hxx b/lotuswordpro/inc/lwpobj.hxx index e9b6c98faf3c..e54e134bf630 100644 --- a/lotuswordpro/inc/lwpobj.hxx +++ b/lotuswordpro/inc/lwpobj.hxx @@ -53,7 +53,7 @@ * * ************************************************************************/ - /** +/** * @file * Base class of all Lwp VO objects */ @@ -79,10 +79,11 @@ class LwpFoundry; /** * @brief Base class of all Lwp VO objects */ -class LwpObject: public salhelper::SimpleReferenceObject +class LwpObject : public salhelper::SimpleReferenceObject { public: LwpObject(LwpObjectHeader objHdr, LwpSvStream* pStrm); + protected: virtual ~LwpObject() override; LwpObjectHeader m_ObjHdr; @@ -92,11 +93,13 @@ protected: bool m_bRegisteringStyle; bool m_bParsingStyle; bool m_bConvertingContent; + protected: virtual void Read(); virtual void RegisterStyle(); virtual void Parse(IXFStream* pOutputStream); virtual void XFConvert(XFContentContainer* pCont); + public: void QuickRead(); //calls RegisterStyle but bails if DoRegisterStyle is called @@ -130,10 +133,10 @@ public: m_bConvertingContent = false; } - LwpFoundry* GetFoundry(){return m_pFoundry;} - void SetFoundry(LwpFoundry* pFoundry){m_pFoundry = pFoundry;} - LwpObjectID& GetObjectID(){ return m_ObjHdr.GetID();} - sal_uInt32 GetTag() const { return m_ObjHdr.GetTag();} + LwpFoundry* GetFoundry() { return m_pFoundry; } + void SetFoundry(LwpFoundry* pFoundry) { m_pFoundry = pFoundry; } + LwpObjectID& GetObjectID() { return m_ObjHdr.GetID(); } + sal_uInt32 GetTag() const { return m_ObjHdr.GetTag(); } }; #endif diff --git a/lotuswordpro/inc/lwpobjstrm.hxx b/lotuswordpro/inc/lwpobjstrm.hxx index adde15593c4d..aca435f1b2c3 100644 --- a/lotuswordpro/inc/lwpobjstrm.hxx +++ b/lotuswordpro/inc/lwpobjstrm.hxx @@ -76,33 +76,35 @@ class LwpObjectStream { public: - LwpObjectStream(LwpSvStream *pStrm, bool isCompressed, sal_uInt16 size); + LwpObjectStream(LwpSvStream* pStrm, bool isCompressed, sal_uInt16 size); ~LwpObjectStream(); + private: - sal_uInt8* m_pContentBuf; //The content buffer of the object - sal_uInt8 m_SmallBuffer[100]; //To avoid frequent new + sal_uInt8* m_pContentBuf; //The content buffer of the object + sal_uInt8 m_SmallBuffer[100]; //To avoid frequent new std::vector<sal_uInt8> m_BigBuffer; //otherwise use this enum { - IO_BUFFERSIZE = 0xFF00 //Refer to LWP, not sure if it is enough + IO_BUFFERSIZE = 0xFF00 //Refer to LWP, not sure if it is enough }; - sal_uInt16 m_nBufSize; //The total size of m_pContentBuf - sal_uInt16 m_nReadPos; //The position of the quick read + sal_uInt16 m_nBufSize; //The total size of m_pContentBuf + sal_uInt16 m_nReadPos; //The position of the quick read LwpSvStream* m_pStrm; bool m_bCompressed; + public: sal_uInt16 remainingSize() const; sal_uInt16 QuickRead(void* buf, sal_uInt16 len); sal_uInt16 GetPos() const { return m_nReadPos; } void SeekRel(sal_uInt16 pos); - void Seek( sal_uInt16 pos); + void Seek(sal_uInt16 pos); void SkipExtra(); sal_uInt16 CheckExtra(); bool QuickReadBool(); - sal_uInt32 QuickReaduInt32(bool *pFailure=nullptr); - sal_uInt16 QuickReaduInt16(bool *pFailure=nullptr); - sal_uInt8 QuickReaduInt8(bool *pFailure=nullptr); + sal_uInt32 QuickReaduInt32(bool* pFailure = nullptr); + sal_uInt16 QuickReaduInt16(bool* pFailure = nullptr); + sal_uInt8 QuickReaduInt8(bool* pFailure = nullptr); sal_Int32 QuickReadInt32(); sal_Int16 QuickReadInt16(); double QuickReadDouble(); @@ -110,7 +112,8 @@ public: OUString QuickReadStringPtr(); void ReadComplete(); - LwpSvStream *GetStream(); + LwpSvStream* GetStream(); + private: void Read2Buffer(); sal_uInt8* AllocBuffer(sal_uInt16 size); @@ -118,10 +121,7 @@ private: void ReleaseBuffer(); }; -inline LwpSvStream *LwpObjectStream::GetStream() -{ - return m_pStrm; -} +inline LwpSvStream* LwpObjectStream::GetStream() { return m_pStrm; } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/inc/lwpsvstream.hxx b/lotuswordpro/inc/lwpsvstream.hxx index 445c2df5d0ae..9a7271941f71 100644 --- a/lotuswordpro/inc/lwpsvstream.hxx +++ b/lotuswordpro/inc/lwpsvstream.hxx @@ -68,27 +68,21 @@ class SvStream; class LwpSvStream { public: - LwpSvStream(SvStream* pStream, LwpSvStream * pCompressed = nullptr); + LwpSvStream(SvStream* pStream, LwpSvStream* pCompressed = nullptr); size_t Read(void* bytes, size_t nBytesToRead); void SeekRel(sal_Int64 pos); sal_Int64 Tell(); sal_Int64 Seek(sal_Int64 pos); bool CheckSeek(sal_Int64 pos); - LwpSvStream& ReadUInt8( sal_uInt8& rUInt8 ); - LwpSvStream& ReadUInt16( sal_uInt16& rUInt16 ); - LwpSvStream& ReadUInt32( sal_uInt32& rUInt32 ); + LwpSvStream& ReadUInt8(sal_uInt8& rUInt8); + LwpSvStream& ReadUInt16(sal_uInt16& rUInt16); + LwpSvStream& ReadUInt32(sal_uInt32& rUInt32); static const sal_uInt32 LWP_STREAM_BASE; - LwpSvStream * GetCompressedStream() - { - return m_pCompressedStream; - }; - SvStream * GetStream() - { - return m_pStream; - } + LwpSvStream* GetCompressedStream() { return m_pCompressedStream; }; + SvStream* GetStream() { return m_pStream; } private: // when the file opened is small file, m_pStream is the decompressed stream @@ -97,7 +91,7 @@ private: // when the file opened is small file, this stream is for saving the // compressed stream which is to be used for Chart/OLE as BENTO container - LwpSvStream * m_pCompressedStream; + LwpSvStream* m_pCompressedStream; }; #endif diff --git a/lotuswordpro/inc/xfilter/ixfstream.hxx b/lotuswordpro/inc/xfilter/ixfstream.hxx index 922e79952058..56bab4762fe5 100644 --- a/lotuswordpro/inc/xfilter/ixfstream.hxx +++ b/lotuswordpro/inc/xfilter/ixfstream.hxx @@ -71,40 +71,40 @@ class IXFAttrList; class IXFStream { public: - virtual ~IXFStream(){} + virtual ~IXFStream() {} /** * @descr Called when start write.Usually you can output document type info and xml encoding info. */ - virtual void StartDocument() = 0; + virtual void StartDocument() = 0; /** * @descr called when end output. */ - virtual void EndDocument() = 0; + virtual void EndDocument() = 0; /** * @descr Wrap XDocumentHandler::startElement() * @param oustr element tag name. */ - virtual void StartElement(const OUString& oustr) = 0; + virtual void StartElement(const OUString& oustr) = 0; /** * @descr Wrap XDocumentHandler::endElement() * @param oustr element tag name. */ - virtual void EndElement(const OUString& oustr) = 0; + virtual void EndElement(const OUString& oustr) = 0; /** * @descr output text node. * @param oustr text content. */ - virtual void Characters(const OUString& oustr) = 0; + virtual void Characters(const OUString& oustr) = 0; /** * @descr return the Attribute list interface. * @return attribute list. */ - virtual IXFAttrList* GetAttrList() = 0; + virtual IXFAttrList* GetAttrList() = 0; }; #endif diff --git a/lotuswordpro/inc/xfilter/ixfstyle.hxx b/lotuswordpro/inc/xfilter/ixfstyle.hxx index 878c8af6513c..20c29adca760 100644 --- a/lotuswordpro/inc/xfilter/ixfstyle.hxx +++ b/lotuswordpro/inc/xfilter/ixfstyle.hxx @@ -71,30 +71,30 @@ class IXFStyle { public: IXFStyle() = default; - IXFStyle(IXFStyle const &) = default; - IXFStyle(IXFStyle &&) = default; - IXFStyle & operator =(IXFStyle const &) = default; - IXFStyle & operator =(IXFStyle &&) = default; + IXFStyle(IXFStyle const&) = default; + IXFStyle(IXFStyle&&) = default; + IXFStyle& operator=(IXFStyle const&) = default; + IXFStyle& operator=(IXFStyle&&) = default; - virtual ~IXFStyle(){} + virtual ~IXFStyle() {} /** * @descr: return the style name. */ - virtual OUString GetStyleName() = 0; + virtual OUString GetStyleName() = 0; /** * @descr: set the name of the style. */ - virtual void SetStyleName(const OUString& styleName) = 0; + virtual void SetStyleName(const OUString& styleName) = 0; /** * @descr return the parent style name. */ - virtual OUString GetParentStyleName() = 0; + virtual OUString GetParentStyleName() = 0; /** * @descr: Parent paragraph style. */ - virtual void SetParentStyleName(const OUString& parent) = 0; + virtual void SetParentStyleName(const OUString& parent) = 0; /** * @descr: return the style family. You can reference to enumXFStyle. */ @@ -105,9 +105,9 @@ public: * @param: pStyle the style to be compared. * @return: return sal_True if equals, else sal_False. */ - virtual bool Equal(IXFStyle *pStyle) = 0; + virtual bool Equal(IXFStyle* pStyle) = 0; - virtual void ToXml(IXFStream * stream) = 0; + virtual void ToXml(IXFStream* stream) = 0; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfannotation.hxx b/lotuswordpro/inc/xfilter/xfannotation.hxx index 5987ed66503e..080dc92fd4ea 100644 --- a/lotuswordpro/inc/xfilter/xfannotation.hxx +++ b/lotuswordpro/inc/xfilter/xfannotation.hxx @@ -71,37 +71,31 @@ public: void SetAuthor(const OUString& author); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - OUString m_strDate; - OUString m_strAuthor; + OUString m_strDate; + OUString m_strAuthor; }; -inline void XFAnnotation::SetDate(const OUString& date) -{ - m_strDate = date; -} +inline void XFAnnotation::SetDate(const OUString& date) { m_strDate = date; } -inline void XFAnnotation::SetAuthor(const OUString& author) -{ - m_strAuthor = author; -} +inline void XFAnnotation::SetAuthor(const OUString& author) { m_strAuthor = author; } -inline void XFAnnotation::ToXml(IXFStream *pStrm) +inline void XFAnnotation::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - if( !m_strDate.isEmpty() ) - pAttrList->AddAttribute( "office:create-date", m_strDate ); - if( !m_strAuthor.isEmpty() ) - pAttrList->AddAttribute( "office:author", m_strAuthor); - pStrm->StartElement( "office:annotation" ); + if (!m_strDate.isEmpty()) + pAttrList->AddAttribute("office:create-date", m_strDate); + if (!m_strAuthor.isEmpty()) + pAttrList->AddAttribute("office:author", m_strAuthor); + pStrm->StartElement("office:annotation"); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( "office:annotation" ); + pStrm->EndElement("office:annotation"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfarrowstyle.hxx b/lotuswordpro/inc/xfilter/xfarrowstyle.hxx index c356318f80e3..26a2372fa54a 100644 --- a/lotuswordpro/inc/xfilter/xfarrowstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfarrowstyle.hxx @@ -69,58 +69,44 @@ public: XFArrowStyle(); public: - void SetArrowName(const OUString& name); + void SetArrowName(const OUString& name); - void SetViewbox(const OUString& viewBox); + void SetViewbox(const OUString& viewBox); - void SetSVGPath(const OUString& path); + void SetSVGPath(const OUString& path); virtual enumXFStyle GetStyleFamily() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - OUString m_strName; - OUString m_strViewBox; - OUString m_strPath; + OUString m_strName; + OUString m_strViewBox; + OUString m_strPath; }; -inline XFArrowStyle::XFArrowStyle() -{ -} +inline XFArrowStyle::XFArrowStyle() {} -inline void XFArrowStyle::SetArrowName(const OUString& name) -{ - m_strName = name; -} +inline void XFArrowStyle::SetArrowName(const OUString& name) { m_strName = name; } -inline void XFArrowStyle::SetViewbox(const OUString& viewBox) -{ - m_strViewBox = viewBox; -} +inline void XFArrowStyle::SetViewbox(const OUString& viewBox) { m_strViewBox = viewBox; } -inline void XFArrowStyle::SetSVGPath(const OUString& path) -{ - m_strPath = path; -} +inline void XFArrowStyle::SetSVGPath(const OUString& path) { m_strPath = path; } -inline enumXFStyle XFArrowStyle::GetStyleFamily() -{ - return enumXFStyleArrow; -} +inline enumXFStyle XFArrowStyle::GetStyleFamily() { return enumXFStyleArrow; } -inline void XFArrowStyle::ToXml(IXFStream *pStrm) +inline void XFArrowStyle::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( "draw:name", m_strName ); + if (!m_strName.isEmpty()) + pAttrList->AddAttribute("draw:name", m_strName); else - pAttrList->AddAttribute( "draw:name", GetStyleName() ); + pAttrList->AddAttribute("draw:name", GetStyleName()); - pAttrList->AddAttribute( "svg:viewBox", m_strViewBox ); - pAttrList->AddAttribute( "svg:d", m_strPath ); + pAttrList->AddAttribute("svg:viewBox", m_strViewBox); + pAttrList->AddAttribute("svg:d", m_strPath); pStrm->StartElement("draw:marker"); pStrm->EndElement("draw:marker"); } diff --git a/lotuswordpro/inc/xfilter/xfbgimage.hxx b/lotuswordpro/inc/xfilter/xfbgimage.hxx index ea14229f4cc3..983a732afb59 100644 --- a/lotuswordpro/inc/xfilter/xfbgimage.hxx +++ b/lotuswordpro/inc/xfilter/xfbgimage.hxx @@ -75,45 +75,47 @@ public: /** * @descr Use file link as image source. */ - void SetFileLink(const OUString& fileName); + void SetFileLink(const OUString& fileName); /** * @descr Use base64 stream as image source. */ - void SetImageData(sal_uInt8 const *buf, int len); + void SetImageData(sal_uInt8 const* buf, int len); /** * @descr Set the image position type. */ - void SetPosition(enumXFAlignType horiAlign = enumXFAlignCenter, enumXFAlignType vertAlign = enumXFAlignCenter); + void SetPosition(enumXFAlignType horiAlign = enumXFAlignCenter, + enumXFAlignType vertAlign = enumXFAlignCenter); /** * @descr Set background image repeat style. */ - void SetRepeate(); + void SetRepeate(); /** * @descr Set whether the image should be stretched to fill the owner object. */ - void SetStretch(); + void SetStretch(); /** * @descr decide whether there has been a style that is the same as this object. * If it use base64 stream, i'll simply return sal_False because it's too slow to compare two base64 stream. */ - virtual bool Equal(IXFStyle *pStyle) override; + virtual bool Equal(IXFStyle* pStyle) override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; + + friend bool operator==(XFBGImage const& img1, XFBGImage const& img2); + friend bool operator!=(XFBGImage const& img1, XFBGImage const& img2); - friend bool operator==(XFBGImage const & img1, XFBGImage const & img2); - friend bool operator!=(XFBGImage const & img1, XFBGImage const & img2); private: - OUString m_strFileName; - OUString m_strData; - bool m_bUserFileLink; - bool m_bRepeate; - bool m_bStretch; - bool m_bPosition; + OUString m_strFileName; + OUString m_strData; + bool m_bUserFileLink; + bool m_bRepeate; + bool m_bStretch; + bool m_bPosition; enumXFAlignType m_eHoriAlign; enumXFAlignType m_eVertAlign; }; diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx b/lotuswordpro/inc/xfilter/xfcellstyle.hxx index ff081b58a97c..34b76a5e3f32 100644 --- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx @@ -92,20 +92,20 @@ public: /** * @descr Set cell data format style name. */ - void SetDataStyle(const OUString& style); + void SetDataStyle(const OUString& style); /** * @descr: Set the padding of the paragraph.This is the distance between the border and the top of the text. * @param: indent value of the padding. */ - void SetPadding(double left, double right, double top, double bottom); + void SetPadding(double left, double right, double top, double bottom); /** * @descr: Set alignment property of the cell. * @param: eAlign alignment type,left,right,center or justify. */ - void SetAlignType(enumXFAlignType hori, enumXFAlignType vert); + void SetAlignType(enumXFAlignType hori, enumXFAlignType vert); /** * @descr: The borders are complex, so you have to create one before use. @@ -113,37 +113,37 @@ public: we can save much memory. * @param: pBorders borders of the paragraph, please reference the XFBorders. */ - void SetBorders(XFBorders *pBorders); + void SetBorders(XFBorders* pBorders); /** * @descr: Set background color of the cell. * @param: color value of the back color. */ - void SetBackColor(XFColor const & color); + void SetBackColor(XFColor const& color); /** * descr: set cell background image. */ - void SetBackImage(std::unique_ptr<XFBGImage>& rImage); + void SetBackImage(std::unique_ptr<XFBGImage>& rImage); virtual enumXFStyle GetStyleFamily() override; - virtual bool Equal(IXFStyle *pStyle) override; + virtual bool Equal(IXFStyle* pStyle) override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - OUString m_strDataStyle; + OUString m_strDataStyle; enumXFAlignType m_eHoriAlign; enumXFAlignType m_eVertAlign; - XFColor m_aBackColor; + XFColor m_aBackColor; std::unique_ptr<XFBGImage> m_xBackImage; - XFMargins m_aMargin; - XFPadding m_aPadding; + XFMargins m_aMargin; + XFPadding m_aPadding; rtl::Reference<XFFont> m_pFont; - XFShadow m_aShadow; - std::unique_ptr<XFBorders> m_pBorders; + XFShadow m_aShadow; + std::unique_ptr<XFBorders> m_pBorders; }; inline void XFCellStyle::SetAlignType(enumXFAlignType hori, enumXFAlignType vert) @@ -152,10 +152,7 @@ inline void XFCellStyle::SetAlignType(enumXFAlignType hori, enumXFAlignType vert m_eVertAlign = vert; } -inline void XFCellStyle::SetDataStyle(const OUString& style) -{ - m_strDataStyle = style; -} +inline void XFCellStyle::SetDataStyle(const OUString& style) { m_strDataStyle = style; } #endif diff --git a/lotuswordpro/inc/xfilter/xfchange.hxx b/lotuswordpro/inc/xfilter/xfchange.hxx index 29519e84763c..cac4ece05096 100644 --- a/lotuswordpro/inc/xfilter/xfchange.hxx +++ b/lotuswordpro/inc/xfilter/xfchange.hxx @@ -69,17 +69,18 @@ class XFChangeList : public XFContentContainer { public: - XFChangeList(){} - virtual void ToXml(IXFStream *pStrm) override; + XFChangeList() {} + virtual void ToXml(IXFStream* pStrm) override; }; class XFChangeRegion : public XFContentContainer { public: - XFChangeRegion(){} - virtual void ToXml(IXFStream *pStrm) override; - void SetChangeID(const OUString& sID){m_sID=sID;} - void SetEditor(const OUString& sEditor){m_sEditor=sEditor;} + XFChangeRegion() {} + virtual void ToXml(IXFStream* pStrm) override; + void SetChangeID(const OUString& sID) { m_sID = sID; } + void SetEditor(const OUString& sEditor) { m_sEditor = sEditor; } + protected: OUString m_sID; OUString m_sEditor; @@ -88,23 +89,24 @@ protected: class XFChangeInsert : public XFChangeRegion { public: - XFChangeInsert(){} - void ToXml(IXFStream *pStrm) override; + XFChangeInsert() {} + void ToXml(IXFStream* pStrm) override; }; class XFChangeDelete : public XFChangeRegion { public: - XFChangeDelete(){} - void ToXml(IXFStream *pStrm) override; + XFChangeDelete() {} + void ToXml(IXFStream* pStrm) override; }; class XFChangeStart : public XFContent { public: - XFChangeStart(){} - void ToXml(IXFStream *pStrm) override; - void SetChangeID(const OUString& sID){m_sID=sID;} + XFChangeStart() {} + void ToXml(IXFStream* pStrm) override; + void SetChangeID(const OUString& sID) { m_sID = sID; } + private: OUString m_sID; }; @@ -112,9 +114,10 @@ private: class XFChangeEnd : public XFContent { public: - XFChangeEnd(){} - void ToXml(IXFStream *pStrm) override; - void SetChangeID(const OUString& sID){m_sID=sID;} + XFChangeEnd() {} + void ToXml(IXFStream* pStrm) override; + void SetChangeID(const OUString& sID) { m_sID = sID; } + private: OUString m_sID; }; diff --git a/lotuswordpro/inc/xfilter/xfcolstyle.hxx b/lotuswordpro/inc/xfilter/xfcolstyle.hxx index 774a2e636941..3164f0818d2d 100644 --- a/lotuswordpro/inc/xfilter/xfcolstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfcolstyle.hxx @@ -66,7 +66,7 @@ * @brief * Column style, it has only one property-the column width. */ -class XFColStyle : public XFStyle +class XFColStyle : public XFStyle { public: XFColStyle(); @@ -77,33 +77,27 @@ public: /** * @descr Set column width. */ - void SetWidth(double width); + void SetWidth(double width); /** * @descr return column width. */ - double GetWidth() const; + double GetWidth() const; virtual enumXFStyle GetStyleFamily() override; /** * @descr output column style as an xml node. */ - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - double m_fWidth; + double m_fWidth; }; -inline void XFColStyle::SetWidth(double width) -{ - m_fWidth = width; -} +inline void XFColStyle::SetWidth(double width) { m_fWidth = width; } -inline double XFColStyle::GetWidth() const -{ - return m_fWidth; -} +inline double XFColStyle::GetWidth() const { return m_fWidth; } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/inc/xfilter/xfconfigmanager.hxx b/lotuswordpro/inc/xfilter/xfconfigmanager.hxx index 78b5b97ba3de..92da9362e819 100644 --- a/lotuswordpro/inc/xfilter/xfconfigmanager.hxx +++ b/lotuswordpro/inc/xfilter/xfconfigmanager.hxx @@ -82,27 +82,27 @@ public: /** * @descr Set line number config. */ - void SetLineNumberConfig(XFLineNumberConfig *pLNConfig); + void SetLineNumberConfig(XFLineNumberConfig* pLNConfig); /** * @descr Set footnote config. */ - void SetFootnoteConfig(XFFootnoteConfig *pFNConfig); + void SetFootnoteConfig(XFFootnoteConfig* pFNConfig); /** * @descr Set endnote config. */ - void SetEndnoteConfig(XFEndnoteConfig *pFNConfig); + void SetEndnoteConfig(XFEndnoteConfig* pFNConfig); /** * @descr Output config information. */ - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: std::unique_ptr<XFLineNumberConfig> m_pLineNumberConfig; - std::unique_ptr<XFFootnoteConfig> m_pFootnoteConfig; - std::unique_ptr<XFEndnoteConfig> m_pEndnoteConfig; + std::unique_ptr<XFFootnoteConfig> m_pFootnoteConfig; + std::unique_ptr<XFEndnoteConfig> m_pEndnoteConfig; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx index e8ad3347ebab..e042c98463c0 100644 --- a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx +++ b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx @@ -87,19 +87,19 @@ public: /** * @descr Add content. */ - virtual void Add(XFContent *pContent); + virtual void Add(XFContent* pContent); rtl::Reference<XFContent> GetLastContent(); - void RemoveLastContent(); + void RemoveLastContent(); /** * @descr convenience function for add text content. */ - void Add(const OUString& text); + void Add(const OUString& text); /** * @descr return the number of contents in the container. */ - int GetCount() const; + int GetCount() const; /** * @descr get content by index. @@ -109,7 +109,7 @@ public: /** * @descr clear all contents in the container. */ - void Reset(); + void Reset(); /** * @descr helper function, find first content by type. @@ -119,21 +119,21 @@ public: /** * @descr return the content type. */ - virtual enumXFContent GetContentType() override; + virtual enumXFContent GetContentType() override; /** * @descr Output to OOo model or local file. */ - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; - bool HierarchyContains(const XFContent *pContent) const; + bool HierarchyContains(const XFContent* pContent) const; private: - std::vector< rtl::Reference<XFContent> > m_aContents; + std::vector<rtl::Reference<XFContent>> m_aContents; }; inline rtl::Reference<XFContent> XFContentContainer::GetContent(sal_uInt32 index) const { - if (index > m_aContents.size()-1) + if (index > m_aContents.size() - 1) return nullptr; return m_aContents[index]; } diff --git a/lotuswordpro/inc/xfilter/xfcrossref.hxx b/lotuswordpro/inc/xfilter/xfcrossref.hxx index 9126f712b24d..bdf4897722f7 100644 --- a/lotuswordpro/inc/xfilter/xfcrossref.hxx +++ b/lotuswordpro/inc/xfilter/xfcrossref.hxx @@ -73,9 +73,11 @@ public: virtual ~XFCrossRefStart() override; void SetRefType(sal_uInt8 nType); void SetMarkName(const OUString& sName); - void ToXml(IXFStream *pStrm) override; + void ToXml(IXFStream* pStrm) override; + private: - enum{ + enum + { CROSSREF_INVALID = 0, CROSSREF_TEXT = 1, CROSSREF_PAGE = 2, @@ -85,22 +87,16 @@ private: OUString m_strMarkName; }; -inline void XFCrossRefStart::SetRefType(sal_uInt8 nType) -{ - m_nType = nType; -} +inline void XFCrossRefStart::SetRefType(sal_uInt8 nType) { m_nType = nType; } -inline void XFCrossRefStart::SetMarkName(const OUString& sName) -{ - m_strMarkName = sName; -} +inline void XFCrossRefStart::SetMarkName(const OUString& sName) { m_strMarkName = sName; } class XFCrossRefEnd : public XFContent { public: XFCrossRefEnd(); virtual ~XFCrossRefEnd() override; - void ToXml(IXFStream *pStrm) override; + void ToXml(IXFStream* pStrm) override; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfdatestyle.hxx b/lotuswordpro/inc/xfilter/xfdatestyle.hxx index a1df3a5c0c2f..b30778078eda 100644 --- a/lotuswordpro/inc/xfilter/xfdatestyle.hxx +++ b/lotuswordpro/inc/xfilter/xfdatestyle.hxx @@ -68,13 +68,14 @@ class XFDatePart : public XFTimePart { public: XFDatePart(); + public: - void SetTexture(bool bTexture); + void SetTexture(bool bTexture); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - bool m_bTexture; + bool m_bTexture; }; class XFDateStyle : public XFStyle @@ -85,40 +86,37 @@ public: virtual ~XFDateStyle() override; public: - void AddYear( bool bLongFmt = true ); + void AddYear(bool bLongFmt = true); - void AddMonth( bool bLongFmt = true, bool bTexture = false ); + void AddMonth(bool bLongFmt = true, bool bTexture = false); - void AddMonthDay( bool bLongFmt = true ); + void AddMonthDay(bool bLongFmt = true); - void AddWeekDay( bool bLongFmt = true ); + void AddWeekDay(bool bLongFmt = true); - void AddEra(); + void AddEra(); - void AddHour( bool bLongFmt = true ); + void AddHour(bool bLongFmt = true); - void AddMinute( bool bLongFmt = true ); + void AddMinute(bool bLongFmt = true); - void AddSecond( bool bLongFmt = true ); + void AddSecond(bool bLongFmt = true); - void AddAmPm(); + void AddAmPm(); - void AddText( const OUString& part ); + void AddText(const OUString& part); virtual enumXFStyle GetStyleFamily() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - XFStyleContainer m_aParts; + XFStyleContainer m_aParts; }; -inline void XFDatePart::SetTexture(bool bTexture) -{ - m_bTexture = bTexture; -} +inline void XFDatePart::SetTexture(bool bTexture) { m_bTexture = bTexture; } -inline void XFDateStyle::AddYear( bool bLongFmt ) +inline void XFDateStyle::AddYear(bool bLongFmt) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateYear); @@ -126,7 +124,7 @@ inline void XFDateStyle::AddYear( bool bLongFmt ) m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddMonth( bool bLongFmt, bool bTexture ) +inline void XFDateStyle::AddMonth(bool bLongFmt, bool bTexture) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateMonth); @@ -135,7 +133,7 @@ inline void XFDateStyle::AddMonth( bool bLongFmt, bool bTexture ) m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddMonthDay( bool bLongFmt ) +inline void XFDateStyle::AddMonthDay(bool bLongFmt) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateMonthDay); @@ -143,7 +141,7 @@ inline void XFDateStyle::AddMonthDay( bool bLongFmt ) m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddWeekDay( bool bLongFmt ) +inline void XFDateStyle::AddWeekDay(bool bLongFmt) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateWeekDay); @@ -159,7 +157,7 @@ inline void XFDateStyle::AddEra() m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddText( const OUString& text ) +inline void XFDateStyle::AddText(const OUString& text) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateText); @@ -167,7 +165,7 @@ inline void XFDateStyle::AddText( const OUString& text ) m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddHour( bool bLongFmt ) +inline void XFDateStyle::AddHour(bool bLongFmt) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateHour); @@ -175,7 +173,7 @@ inline void XFDateStyle::AddHour( bool bLongFmt ) m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddMinute( bool bLongFmt ) +inline void XFDateStyle::AddMinute(bool bLongFmt) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateMinute); @@ -183,7 +181,7 @@ inline void XFDateStyle::AddMinute( bool bLongFmt ) m_aParts.AddStyle(std::move(part)); } -inline void XFDateStyle::AddSecond( bool bLongFmt ) +inline void XFDateStyle::AddSecond(bool bLongFmt) { std::unique_ptr<XFDatePart> part(new XFDatePart()); part->SetPartType(enumXFDateSecond); diff --git a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx index 746b8dca2acc..81f7f8cc781a 100644 --- a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx +++ b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx @@ -72,7 +72,7 @@ class XFDrawGroup : public XFDrawObject { public: - XFDrawGroup(){} + XFDrawGroup() {} public: using XFDrawObject::Add; @@ -80,36 +80,35 @@ public: /** * @descr Add a drawing object to the group. */ - void Add(XFFrame *pFrame); + void Add(XFFrame* pFrame); /** * @descr Output group object and all its children. */ - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - rtl::Reference<XFContentContainer> m_aChildren; + rtl::Reference<XFContentContainer> m_aChildren; }; -inline void XFDrawGroup::Add(XFFrame *pFrame) +inline void XFDrawGroup::Add(XFFrame* pFrame) { - if( pFrame ) + if (pFrame) m_aChildren->Add(pFrame); } -inline void XFDrawGroup::ToXml(IXFStream *pStrm) +inline void XFDrawGroup::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); XFDrawObject::ToXml(pStrm); - pStrm->StartElement( "draw:g" ); + pStrm->StartElement("draw:g"); m_aChildren->ToXml(pStrm); - pStrm->EndElement( "draw:g" ); - + pStrm->EndElement("draw:g"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfdrawpath.hxx b/lotuswordpro/inc/xfilter/xfdrawpath.hxx index c18c07eb14a9..6c0847706391 100644 --- a/lotuswordpro/inc/xfilter/xfdrawpath.hxx +++ b/lotuswordpro/inc/xfilter/xfdrawpath.hxx @@ -76,22 +76,20 @@ public: /** * @descr Set svg path command,L for line,M for move,... */ - void SetCommand(const OUString& cmd); + void SetCommand(const OUString& cmd); /** * @descr Set svg path point. */ - void AddPoint(const XFPoint& pt) - { - m_aPoints.push_back(pt); - } + void AddPoint(const XFPoint& pt) { m_aPoints.push_back(pt); } OUString ToString(); friend class XFDrawPath; + private: - OUString m_strCommand; - std::vector<XFPoint> m_aPoints; + OUString m_strCommand; + std::vector<XFPoint> m_aPoints; }; /** @@ -107,33 +105,30 @@ public: /** * @descr Move command. */ - void MoveTo(XFPoint pt); + void MoveTo(XFPoint pt); /** * @descr Line command. */ - void LineTo(XFPoint pt); + void LineTo(XFPoint pt); /** * @descr Curve command. */ - void CurveTo(XFPoint dest, XFPoint ctrl1, XFPoint ctrl2); + void CurveTo(XFPoint dest, XFPoint ctrl1, XFPoint ctrl2); /** * @descr Close path command. */ - void ClosePath(); + void ClosePath(); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: std::vector<XFSvgPathEntry> m_aPaths; }; -inline void XFSvgPathEntry::SetCommand(const OUString& cmd) -{ - m_strCommand = cmd; -} +inline void XFSvgPathEntry::SetCommand(const OUString& cmd) { m_strCommand = cmd; } #endif diff --git a/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx b/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx index 4e7ff34c760e..5b8c733d1209 100644 --- a/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx +++ b/lotuswordpro/inc/xfilter/xfdrawpolyline.hxx @@ -71,16 +71,16 @@ public: public: void AddPoint(double x, double y) { - assert(x>=0&&y>=0); - m_aPoints.push_back( XFPoint(x,y) ); + assert(x >= 0 && y >= 0); + m_aPoints.push_back(XFPoint(x, y)); } - XFRect CalcViewBox(); + XFRect CalcViewBox(); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; protected: - std::vector<XFPoint> m_aPoints; + std::vector<XFPoint> m_aPoints; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfdrawrect.hxx b/lotuswordpro/inc/xfilter/xfdrawrect.hxx index e6036a9fa3eb..cf2491aa0053 100644 --- a/lotuswordpro/inc/xfilter/xfdrawrect.hxx +++ b/lotuswordpro/inc/xfilter/xfdrawrect.hxx @@ -68,20 +68,14 @@ public: XFDrawRect(); public: - void SetStartPoint(const XFPoint& pt) - { - m_aRect.SetStartPoint(pt); - } + void SetStartPoint(const XFPoint& pt) { m_aRect.SetStartPoint(pt); } - void SetSize(double width, double height); + void SetSize(double width, double height); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; -inline void XFDrawRect::SetSize(double width, double height) -{ - m_aRect.SetSize(width,height); -} +inline void XFDrawRect::SetSize(double width, double height) { m_aRect.SetSize(width, height); } #endif diff --git a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx index c6747729de1d..a426dc99e1d8 100644 --- a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx @@ -87,54 +87,55 @@ public: /** * @descr Set drawing object border line. */ - void SetLineStyle(double width, XFColor color); + void SetLineStyle(double width, XFColor color); /** * @descr Set drawing object dash border style. */ - void SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space ); + void SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space); /** * @descr Set drawing object area fill color. */ - void SetAreaColor(XFColor const & color); + void SetAreaColor(XFColor const& color); /** * @descr Set drawing object area grid style. */ - void SetAreaLineStyle(enumXFAreaLineStyle style, sal_Int32 angle, double space, XFColor lineColor); + void SetAreaLineStyle(enumXFAreaLineStyle style, sal_Int32 angle, double space, + XFColor lineColor); /** * @descr Set drawing object arrow start style,only lines can have arrows. */ - void SetArrowStart(const OUString& start, double size); + void SetArrowStart(const OUString& start, double size); /** * @descr Set drawing object arrow end style,only lines can have arrows. */ - void SetArrowEnd(const OUString& end, double size); + void SetArrowEnd(const OUString& end, double size); void SetFontWorkStyle(enumXFFWStyle eStyle, enumXFFWAdjust eAdjust); virtual enumXFStyle GetStyleFamily() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: std::unique_ptr<XFFontWorkStyle> m_pFontWorkStyle; - XFDrawLineStyle *m_pLineStyle; - XFDrawAreaStyle *m_pAreaStyle; - OUString m_strArrowStart; - OUString m_strArrowEnd; - double m_fArrowStartSize; - double m_fArrowEndSize; + XFDrawLineStyle* m_pLineStyle; + XFDrawAreaStyle* m_pAreaStyle; + OUString m_strArrowStart; + OUString m_strArrowEnd; + double m_fArrowStartSize; + double m_fArrowEndSize; bool m_bArrowStartCenter; bool m_bArrowEndCenter; }; inline void XFDrawStyle::SetArrowStart(const OUString& start, double size) { - assert(size>0); + assert(size > 0); m_strArrowStart = start; m_fArrowStartSize = size; m_bArrowStartCenter = true; @@ -142,7 +143,7 @@ inline void XFDrawStyle::SetArrowStart(const OUString& start, double size) inline void XFDrawStyle::SetArrowEnd(const OUString& end, double size) { - assert(size>0); + assert(size > 0); m_strArrowEnd = end; m_fArrowEndSize = size; m_bArrowEndCenter = true; diff --git a/lotuswordpro/inc/xfilter/xfentry.hxx b/lotuswordpro/inc/xfilter/xfentry.hxx index 6f7f974306c7..cf465adea932 100644 --- a/lotuswordpro/inc/xfilter/xfentry.hxx +++ b/lotuswordpro/inc/xfilter/xfentry.hxx @@ -75,43 +75,37 @@ public: /** * @descr Set entry type. */ - void SetEntryType(enumXFEntry type); + void SetEntryType(enumXFEntry type); /** * @descr Set entry string value. */ - void SetStringValue(const OUString& value); + void SetStringValue(const OUString& value); /** * @descr Set entry key. The keys is available only for enumXFEntryAlphabetical. */ - void SetKey(const OUString& key1, const OUString& key2); + void SetKey(const OUString& key1, const OUString& key2); /** * @descr Set outline level. This is available for enumXFEntryTOC and enumXFEntryUserIndex. */ - void SetOutlineLevel(sal_Int32 level); + void SetOutlineLevel(sal_Int32 level); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - enumXFEntry m_eType; - OUString m_strValue; - OUString m_strKey1; - OUString m_strKey2; - OUString m_strName; - sal_Int32 m_nOutlineLevel; + enumXFEntry m_eType; + OUString m_strValue; + OUString m_strKey1; + OUString m_strKey2; + OUString m_strName; + sal_Int32 m_nOutlineLevel; }; -inline void XFEntry::SetEntryType(enumXFEntry type) -{ - m_eType = type; -} +inline void XFEntry::SetEntryType(enumXFEntry type) { m_eType = type; } -inline void XFEntry::SetStringValue(const OUString& value) -{ - m_strValue = value; -} +inline void XFEntry::SetStringValue(const OUString& value) { m_strValue = value; } inline void XFEntry::SetKey(const OUString& key1, const OUString& key2) { @@ -119,10 +113,7 @@ inline void XFEntry::SetKey(const OUString& key1, const OUString& key2) m_strKey2 = key2; } -inline void XFEntry::SetOutlineLevel(sal_Int32 level) -{ - m_nOutlineLevel = level; -} +inline void XFEntry::SetOutlineLevel(sal_Int32 level) { m_nOutlineLevel = level; } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/inc/xfilter/xffloatframe.hxx b/lotuswordpro/inc/xfilter/xffloatframe.hxx index e6b973d01818..a89843a989c1 100644 --- a/lotuswordpro/inc/xfilter/xffloatframe.hxx +++ b/lotuswordpro/inc/xfilter/xffloatframe.hxx @@ -70,19 +70,18 @@ class XFFloatFrame : public XFFrame { public: - /** * @descr output range: [start,end], not [start,end). */ XFFloatFrame(sal_Int32 start, sal_Int32 end, bool all); public: - void ToXml(IXFStream *pStrm) override; + void ToXml(IXFStream* pStrm) override; private: - sal_Int32 m_nStart; - sal_Int32 m_nEnd; - bool m_bAll; + sal_Int32 m_nStart; + sal_Int32 m_nEnd; + bool m_bAll; }; #endif diff --git a/lotuswordpro/inc/xfilter/xffontdecl.hxx b/lotuswordpro/inc/xfilter/xffontdecl.hxx index 18845f50ad2b..ee8e3c5e7fdb 100644 --- a/lotuswordpro/inc/xfilter/xffontdecl.hxx +++ b/lotuswordpro/inc/xfilter/xffontdecl.hxx @@ -68,7 +68,7 @@ * Font declaration in OOo xml file. * Each font used should be declared. */ -class XFFontDecl +class XFFontDecl { public: XFFontDecl(const OUString& name, const OUString& family); @@ -77,16 +77,16 @@ public: /** * @descr Get font name. */ - const OUString& GetFontName() const { return m_strFontName;} + const OUString& GetFontName() const { return m_strFontName; } /** * @descr Get font family. */ - const OUString& GetFontFamily() const { return m_strFontFamily;} + const OUString& GetFontFamily() const { return m_strFontFamily; } private: - OUString m_strFontName; - OUString m_strFontFamily; + OUString m_strFontName; + OUString m_strFontFamily; }; #endif diff --git a/lotuswordpro/inc/xfilter/xffooter.hxx b/lotuswordpro/inc/xfilter/xffooter.hxx index 30deea07aa4c..cefca8263268 100644 --- a/lotuswordpro/inc/xfilter/xffooter.hxx +++ b/lotuswordpro/inc/xfilter/xffooter.hxx @@ -70,16 +70,14 @@ class XFFooter : public XFContentContainer { public: - XFFooter() + XFFooter() {} + virtual void ToXml(IXFStream* pStrm) override { - } - virtual void ToXml(IXFStream *pStrm) override - { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( "style:footer" ); + pStrm->StartElement("style:footer"); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( "style:footer" ); + pStrm->EndElement("style:footer"); } }; diff --git a/lotuswordpro/inc/xfilter/xffooterstyle.hxx b/lotuswordpro/inc/xfilter/xffooterstyle.hxx index ecddefcaaee2..97abbc152a10 100644 --- a/lotuswordpro/inc/xfilter/xffooterstyle.hxx +++ b/lotuswordpro/inc/xfilter/xffooterstyle.hxx @@ -66,17 +66,18 @@ class XFFooterStyle : public XFHeaderStyle { public: - XFFooterStyle() : XFHeaderStyle(true) + XFFooterStyle() + : XFHeaderStyle(true) { } - void SetMargins(double left, double right, double top) + void SetMargins(double left, double right, double top) { - if( left != -1 ) + if (left != -1) m_aMargin.SetLeft(left); - if( right != -1 ) + if (right != -1) m_aMargin.SetRight(right); - if( top != -1 ) + if (top != -1) m_aMargin.SetTop(top); } }; diff --git a/lotuswordpro/inc/xfilter/xffootnote.hxx b/lotuswordpro/inc/xfilter/xffootnote.hxx index 76f26c83e296..289217129287 100644 --- a/lotuswordpro/inc/xfilter/xffootnote.hxx +++ b/lotuswordpro/inc/xfilter/xffootnote.hxx @@ -75,41 +75,37 @@ public: XFFootNote(); public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - OUString m_strID; - OUString m_strLabel; + OUString m_strID; + OUString m_strLabel; }; -inline XFFootNote::XFFootNote() -{ - m_strID = XFGlobal::GenNoteName(); -} - +inline XFFootNote::XFFootNote() { m_strID = XFGlobal::GenNoteName(); } -inline void XFFootNote::ToXml(IXFStream *pStrm) +inline void XFFootNote::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( "text:id", m_strID ); - pStrm->StartElement( "text:footnote" ); + pAttrList->AddAttribute("text:id", m_strID); + pStrm->StartElement("text:footnote"); pAttrList->Clear(); - if( !m_strLabel.isEmpty() ) - pAttrList->AddAttribute( "text:label", m_strLabel ); - pStrm->StartElement( "text:footnote-citation" ); - if( !m_strLabel.isEmpty() ) + if (!m_strLabel.isEmpty()) + pAttrList->AddAttribute("text:label", m_strLabel); + pStrm->StartElement("text:footnote-citation"); + if (!m_strLabel.isEmpty()) pStrm->Characters(m_strLabel); - pStrm->EndElement( "text:footnote-citation" ); + pStrm->EndElement("text:footnote-citation"); pAttrList->Clear(); - pStrm->StartElement( "text:footnote-body" ); + pStrm->StartElement("text:footnote-body"); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( "text:footnote-body" ); + pStrm->EndElement("text:footnote-body"); - pStrm->EndElement( "text:footnote" ); + pStrm->EndElement("text:footnote"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfglobal.hxx b/lotuswordpro/inc/xfilter/xfglobal.hxx index d3bd4d3f15b1..247ae9dd5836 100644 --- a/lotuswordpro/inc/xfilter/xfglobal.hxx +++ b/lotuswordpro/inc/xfilter/xfglobal.hxx @@ -64,14 +64,14 @@ #include <rtl/ustring.hxx> #define PI 3.1415926 -#define FLOAT_MIN 0.001 -#define MAX2(a,b) (((a) > (b)) ? (a) : (b)) -#define MAX3(a,b,c) MAX2(a,MAX2(b,c)) -#define MIN2(a,b) (((a) < (b)) ? (a) : (b)) -#define MIN3(a,b,c) MIN2(a,MIN2(b,c)) -#define FABS(f) (f>0?f:-f) +#define FLOAT_MIN 0.001 +#define MAX2(a, b) (((a) > (b)) ? (a) : (b)) +#define MAX3(a, b, c) MAX2(a, MAX2(b, c)) +#define MIN2(a, b) (((a) < (b)) ? (a) : (b)) +#define MIN3(a, b, c) MIN2(a, MIN2(b, c)) +#define FABS(f) (f > 0 ? f : -f) -void XFGlobalReset(); +void XFGlobalReset(); /** * @brief @@ -79,43 +79,43 @@ void XFGlobalReset(); * Before loading a file, we'll need to reset all global variables. * XFGlobal::Reset can do this for you. */ -class XFGlobal +class XFGlobal { public: /** * @descr Generate a name for the section. */ - static OUString GenSectionName(); + static OUString GenSectionName(); /** * @descr Gen a name for the frame. */ - static OUString GenFrameName(); + static OUString GenFrameName(); /** * @descr Generate a name for a table. */ - static OUString GenTableName(); + static OUString GenTableName(); /** * @descr Generate a name for a note. */ - static OUString GenNoteName(); + static OUString GenNoteName(); /** * @descr Generate a name for the stroke style. */ - static OUString GenStrokeDashName(); + static OUString GenStrokeDashName(); /** * @descr Generate a name for the area fill style. */ - static OUString GenAreaName(); + static OUString GenAreaName(); /** * @descr Generate a name for an image object */ - static OUString GenImageName(); + static OUString GenImageName(); /** * @descr Reset all global variables. @@ -123,11 +123,11 @@ public: static void Reset(); public: - static int s_nSectionID; - static int s_nFrameID; - static int s_nNoteID; - static int s_nStrokeDashID; - static int s_nAreaID; + static int s_nSectionID; + static int s_nFrameID; + static int s_nNoteID; + static int s_nStrokeDashID; + static int s_nAreaID; static int s_nImageID; }; diff --git a/lotuswordpro/inc/xfilter/xfheader.hxx b/lotuswordpro/inc/xfilter/xfheader.hxx index 5b101518faac..af569b25c6d1 100644 --- a/lotuswordpro/inc/xfilter/xfheader.hxx +++ b/lotuswordpro/inc/xfilter/xfheader.hxx @@ -67,18 +67,17 @@ class XFHeader : public XFContentContainer { public: - XFHeader() - { - } + XFHeader() {} + public: - virtual void ToXml(IXFStream *pStrm) override + virtual void ToXml(IXFStream* pStrm) override { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( "style:header" ); + pStrm->StartElement("style:header"); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( "style:header" ); + pStrm->EndElement("style:header"); } }; diff --git a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx index 7e5a3bda9e92..d1fc1b95b851 100644 --- a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx @@ -75,7 +75,7 @@ class XFBGImage; class XFHeaderStyle : public XFStyle { public: - explicit XFHeaderStyle(bool isFooter=false); + explicit XFHeaderStyle(bool isFooter = false); virtual ~XFHeaderStyle() override; @@ -83,53 +83,53 @@ public: /** * @descr Set margins for header style. */ - void SetMargins(double left, double right, double bottom); + void SetMargins(double left, double right, double bottom); - void SetDynamicSpace(bool dynamic); + void SetDynamicSpace(bool dynamic); /** * @descr Set header fixed height. */ - void SetHeight(double height); + void SetHeight(double height); /** * @descr Set header min height. */ - void SetMinHeight(double minHeight); + void SetMinHeight(double minHeight); /** * @descr Set header shadow. */ - void SetShadow(XFShadow *pShadow); + void SetShadow(XFShadow* pShadow); /** * @descr Set header borders. */ - void SetBorders(std::unique_ptr<XFBorders> pBorders); + void SetBorders(std::unique_ptr<XFBorders> pBorders); - void SetBackImage(std::unique_ptr<XFBGImage>& rImage); + void SetBackImage(std::unique_ptr<XFBGImage>& rImage); /** * @descr Set header background color. */ - void SetBackColor(XFColor color); + void SetBackColor(XFColor color); /** * @descr Output header style object. */ - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; protected: - bool m_bIsFooter; - bool m_bDynamicSpace; - double m_fHeight; - double m_fMinHeight; - XFMargins m_aMargin; - std::unique_ptr<XFShadow> m_pShadow; - XFPadding m_aPadding; + bool m_bIsFooter; + bool m_bDynamicSpace; + double m_fHeight; + double m_fMinHeight; + XFMargins m_aMargin; + std::unique_ptr<XFShadow> m_pShadow; + XFPadding m_aPadding; std::unique_ptr<XFBorders> m_pBorders; std::unique_ptr<XFBGImage> m_pBGImage; - XFColor m_aBackColor; + XFColor m_aBackColor; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfhyperlink.hxx b/lotuswordpro/inc/xfilter/xfhyperlink.hxx index f44edab39817..3847de61b337 100644 --- a/lotuswordpro/inc/xfilter/xfhyperlink.hxx +++ b/lotuswordpro/inc/xfilter/xfhyperlink.hxx @@ -70,58 +70,49 @@ public: XFHyperlink(); public: - void SetHRef(const OUString& href); + void SetHRef(const OUString& href); - void SetText(const OUString& text); + void SetText(const OUString& text); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - OUString m_strHRef; - OUString m_strName; - OUString m_strFrame; - OUString m_strText; + OUString m_strHRef; + OUString m_strName; + OUString m_strFrame; + OUString m_strText; }; -inline XFHyperlink::XFHyperlink() -{ - m_strFrame = "_self"; -} +inline XFHyperlink::XFHyperlink() { m_strFrame = "_self"; } -inline void XFHyperlink::SetHRef(const OUString& href) -{ - m_strHRef = href; -} +inline void XFHyperlink::SetHRef(const OUString& href) { m_strHRef = href; } -inline void XFHyperlink::SetText(const OUString& text) -{ - m_strText = text; -} +inline void XFHyperlink::SetText(const OUString& text) { m_strText = text; } -inline void XFHyperlink::ToXml(IXFStream *pStrm) +inline void XFHyperlink::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( "xlink:type", "simple" ); - pAttrList->AddAttribute( "xlink:href", m_strHRef ); - if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( "office:name", m_strName ); - pAttrList->AddAttribute( "office:target-frame-name", m_strFrame ); - pAttrList->AddAttribute( "xlink:show", "replace" ); - pStrm->StartElement( "text:a" ); + pAttrList->AddAttribute("xlink:type", "simple"); + pAttrList->AddAttribute("xlink:href", m_strHRef); + if (!m_strName.isEmpty()) + pAttrList->AddAttribute("office:name", m_strName); + pAttrList->AddAttribute("office:target-frame-name", m_strFrame); + pAttrList->AddAttribute("xlink:show", "replace"); + pStrm->StartElement("text:a"); pAttrList->Clear(); - if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( "text:style-name", GetStyleName() ); - pStrm->StartElement( "text:span" ); - if( !m_strText.isEmpty() ) + if (!GetStyleName().isEmpty()) + pAttrList->AddAttribute("text:style-name", GetStyleName()); + pStrm->StartElement("text:span"); + if (!m_strText.isEmpty()) pStrm->Characters(m_strText); else pStrm->Characters(m_strHRef); - pStrm->EndElement( "text:span" ); + pStrm->EndElement("text:span"); - pStrm->EndElement( "text:a" ); + pStrm->EndElement("text:a"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfimagestyle.hxx b/lotuswordpro/inc/xfilter/xfimagestyle.hxx index 1601984fb2e4..963dfbffcf05 100644 --- a/lotuswordpro/inc/xfilter/xfimagestyle.hxx +++ b/lotuswordpro/inc/xfilter/xfimagestyle.hxx @@ -68,32 +68,26 @@ public: XFImageStyle(); public: - void SetBrightness(sal_Int32 brightness); + void SetBrightness(sal_Int32 brightness); - void SetContrast(sal_Int32 contrast); + void SetContrast(sal_Int32 contrast); - void SetClip(double left, double right, double top, double bottom); + void SetClip(double left, double right, double top, double bottom); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - sal_Int32 m_nBrightness; - sal_Int32 m_nContrast; - double m_fClipLeft; - double m_fClipRight; - double m_fClipTop; - double m_fClipBottom; + sal_Int32 m_nBrightness; + sal_Int32 m_nContrast; + double m_fClipLeft; + double m_fClipRight; + double m_fClipTop; + double m_fClipBottom; }; -inline void XFImageStyle::SetBrightness(sal_Int32 brightness) -{ - m_nBrightness = brightness; -} +inline void XFImageStyle::SetBrightness(sal_Int32 brightness) { m_nBrightness = brightness; } -inline void XFImageStyle::SetContrast(sal_Int32 contrast) -{ - m_nContrast = contrast; -} +inline void XFImageStyle::SetContrast(sal_Int32 contrast) { m_nContrast = contrast; } inline void XFImageStyle::SetClip(double left, double right, double top, double bottom) { diff --git a/lotuswordpro/inc/xfilter/xflinebreak.hxx b/lotuswordpro/inc/xfilter/xflinebreak.hxx index a5fc5054bd31..b2c6412982cb 100644 --- a/lotuswordpro/inc/xfilter/xflinebreak.hxx +++ b/lotuswordpro/inc/xfilter/xflinebreak.hxx @@ -66,16 +66,16 @@ class XFLineBreak : public XFContent { public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; -inline void XFLineBreak::ToXml(IXFStream *pStrm) +inline void XFLineBreak::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( "text:line-break" ); - pStrm->EndElement( "text:line-break" ); + pStrm->StartElement("text:line-break"); + pStrm->EndElement("text:line-break"); } #endif diff --git a/lotuswordpro/inc/xfilter/xflist.hxx b/lotuswordpro/inc/xfilter/xflist.hxx index bd95e84efa0d..764e46e0e72e 100644 --- a/lotuswordpro/inc/xfilter/xflist.hxx +++ b/lotuswordpro/inc/xfilter/xflist.hxx @@ -68,7 +68,7 @@ class XFListItem; * @brief * list object for order-list and unordered-list. */ -class XFList : public XFContentContainer +class XFList : public XFContentContainer { public: XFList(); @@ -79,32 +79,26 @@ public: /** * @descr Set whether it's an ordered list or an unordered list. */ - void SetOrdered(bool ordered); + void SetOrdered(bool ordered); /** * @descr Set whether to continue to number list. */ - void SetContinueNumber(bool bContinueNumber); + void SetContinueNumber(bool bContinueNumber); /** * @descr Output list object. */ - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - bool m_bOrdered; - bool m_bContinueNumber; + bool m_bOrdered; + bool m_bContinueNumber; }; -inline void XFList::SetOrdered(bool ordered) -{ - m_bOrdered = ordered; -} +inline void XFList::SetOrdered(bool ordered) { m_bOrdered = ordered; } -inline void XFList::SetContinueNumber(bool bContinueNumber) -{ - m_bContinueNumber = bContinueNumber; -} +inline void XFList::SetContinueNumber(bool bContinueNumber) { m_bContinueNumber = bContinueNumber; } #endif diff --git a/lotuswordpro/inc/xfilter/xflistitem.hxx b/lotuswordpro/inc/xfilter/xflistitem.hxx index 228176217673..329eb822016b 100644 --- a/lotuswordpro/inc/xfilter/xflistitem.hxx +++ b/lotuswordpro/inc/xfilter/xflistitem.hxx @@ -63,49 +63,43 @@ #include <xfilter/ixfattrlist.hxx> #include <xfilter/xfcontentcontainer.hxx> -class XFListItem : public XFContentContainer +class XFListItem : public XFContentContainer { public: XFListItem(); public: - void SetIsHeader(); + void SetIsHeader(); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - bool m_bIsHeader; + bool m_bIsHeader; }; -inline XFListItem::XFListItem() -{ - m_bIsHeader = false; -} +inline XFListItem::XFListItem() { m_bIsHeader = false; } -inline void XFListItem::SetIsHeader() -{ - m_bIsHeader = true; -} +inline void XFListItem::SetIsHeader() { m_bIsHeader = true; } -inline void XFListItem::ToXml(IXFStream *pStrm) +inline void XFListItem::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( "text:style-name", GetStyleName() ); + if (!GetStyleName().isEmpty()) + pAttrList->AddAttribute("text:style-name", GetStyleName()); - if( !m_bIsHeader ) + if (!m_bIsHeader) { - pStrm->StartElement( "text:list-item" ); + pStrm->StartElement("text:list-item"); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( "text:list-item" ); + pStrm->EndElement("text:list-item"); } else { - pStrm->StartElement( "text:list-header" ); + pStrm->StartElement("text:list-header"); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( "text:list-header" ); + pStrm->EndElement("text:list-header"); } } diff --git a/lotuswordpro/inc/xfilter/xfmasterpage.hxx b/lotuswordpro/inc/xfilter/xfmasterpage.hxx index dfb10dea0da0..f321f5bbf7d3 100644 --- a/lotuswordpro/inc/xfilter/xfmasterpage.hxx +++ b/lotuswordpro/inc/xfilter/xfmasterpage.hxx @@ -69,18 +69,18 @@ class XFHeader; class XFMasterPage : public XFStyle { public: - void SetPageMaster(const OUString& pm); + void SetPageMaster(const OUString& pm); - void SetHeader(rtl::Reference<XFHeader> const & rHeader); + void SetHeader(rtl::Reference<XFHeader> const& rHeader); - void SetFooter(rtl::Reference<XFFooter> const & rFooter); + void SetFooter(rtl::Reference<XFFooter> const& rFooter); virtual enumXFStyle GetStyleFamily() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - OUString m_strPageMaster; + OUString m_strPageMaster; rtl::Reference<XFHeader> m_xHeader; rtl::Reference<XFFooter> m_xFooter; }; diff --git a/lotuswordpro/inc/xfilter/xfofficemeta.hxx b/lotuswordpro/inc/xfilter/xfofficemeta.hxx index a183ab793753..79f90d11adf5 100644 --- a/lotuswordpro/inc/xfilter/xfofficemeta.hxx +++ b/lotuswordpro/inc/xfilter/xfofficemeta.hxx @@ -66,7 +66,7 @@ class XFOfficeMeta final { public: - XFOfficeMeta(){} + XFOfficeMeta() {} void SetCreator(const OUString& creator); void SetDescription(const OUString& dsr); @@ -75,17 +75,17 @@ public: void SetLastTime(const OUString& lstime); void SetEditTime(const OUString& edtime); - void ToXml(IXFStream *pStream); -private: - OUString m_strGenerator; - OUString m_strTitle; - OUString m_strCreator; - OUString m_strDsr; - OUString m_strKeywords; - OUString m_strCrtime; - OUString m_strLstime; - OUString m_strEdtime; + void ToXml(IXFStream* pStream); +private: + OUString m_strGenerator; + OUString m_strTitle; + OUString m_strCreator; + OUString m_strDsr; + OUString m_strKeywords; + OUString m_strCrtime; + OUString m_strLstime; + OUString m_strEdtime; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfpagecount.hxx b/lotuswordpro/inc/xfilter/xfpagecount.hxx index 00f9ed708971..25b7d4be1472 100644 --- a/lotuswordpro/inc/xfilter/xfpagecount.hxx +++ b/lotuswordpro/inc/xfilter/xfpagecount.hxx @@ -70,16 +70,16 @@ class XFPageCount : public XFContent { public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; -inline void XFPageCount::ToXml(IXFStream *pStrm) +inline void XFPageCount::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( "text:page-count" ); - pStrm->EndElement( "text:page-count" ); + pStrm->StartElement("text:page-count"); + pStrm->EndElement("text:page-count"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfpagenumber.hxx b/lotuswordpro/inc/xfilter/xfpagenumber.hxx index aa63530a1e4a..80516c452eec 100644 --- a/lotuswordpro/inc/xfilter/xfpagenumber.hxx +++ b/lotuswordpro/inc/xfilter/xfpagenumber.hxx @@ -70,28 +70,25 @@ class XFPageNumber : public XFContent { public: - void SetNumFmt(const OUString& fmt); + void SetNumFmt(const OUString& fmt); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - XFNumFmt m_aNumFmt; + XFNumFmt m_aNumFmt; }; -inline void XFPageNumber::SetNumFmt(const OUString& fmt) -{ - m_aNumFmt.SetFormat(fmt); -} +inline void XFPageNumber::SetNumFmt(const OUString& fmt) { m_aNumFmt.SetFormat(fmt); } -inline void XFPageNumber::ToXml(IXFStream *pStrm) +inline void XFPageNumber::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); m_aNumFmt.ToXml(pStrm); - pAttrList->AddAttribute( "text:select-page", "current" ); - pStrm->StartElement( "text:page-number" ); - pStrm->EndElement( "text:page-number" ); + pAttrList->AddAttribute("text:select-page", "current"); + pStrm->StartElement("text:page-number"); + pStrm->EndElement("text:page-number"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfplaceholder.hxx b/lotuswordpro/inc/xfilter/xfplaceholder.hxx index 1e730a8fe1a2..9bc598405b9b 100644 --- a/lotuswordpro/inc/xfilter/xfplaceholder.hxx +++ b/lotuswordpro/inc/xfilter/xfplaceholder.hxx @@ -75,45 +75,33 @@ public: void SetType(const OUString& sType); void SetDesc(const OUString& sDesc); void SetPrompt(const OUString& sText); - void ToXml(IXFStream *pStrm) override; + void ToXml(IXFStream* pStrm) override; + private: OUString m_strType; OUString m_strDesc; OUString m_strText; }; -XFHolderStart::XFHolderStart() -{ -} +XFHolderStart::XFHolderStart() {} -XFHolderStart::~XFHolderStart() -{ -} +XFHolderStart::~XFHolderStart() {} -inline void XFHolderStart::SetType(const OUString& sType) -{ - m_strType = sType; -} +inline void XFHolderStart::SetType(const OUString& sType) { m_strType = sType; } -inline void XFHolderStart::SetDesc(const OUString& sDesc) -{ - m_strDesc = sDesc; -} +inline void XFHolderStart::SetDesc(const OUString& sDesc) { m_strDesc = sDesc; } -inline void XFHolderStart::SetPrompt(const OUString& sText) -{ - m_strText = sText; -} +inline void XFHolderStart::SetPrompt(const OUString& sText) { m_strText = sText; } -inline void XFHolderStart::ToXml(IXFStream *pStrm) +inline void XFHolderStart::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( "text:placeholder-type",m_strType); + pAttrList->AddAttribute("text:placeholder-type", m_strType); if (!m_strDesc.isEmpty()) - pAttrList->AddAttribute( "text:description", m_strDesc); - pStrm->StartElement( "text:placeholder" ); - if( !m_strText.isEmpty()) + pAttrList->AddAttribute("text:description", m_strDesc); + pStrm->StartElement("text:placeholder"); + if (!m_strText.isEmpty()) pStrm->Characters(m_strText); } @@ -122,21 +110,14 @@ class XFHolderEnd : public XFContent public: XFHolderEnd(); virtual ~XFHolderEnd() override; - void ToXml(IXFStream *pStrm) override; + void ToXml(IXFStream* pStrm) override; }; -XFHolderEnd::XFHolderEnd() -{ -} +XFHolderEnd::XFHolderEnd() {} -XFHolderEnd::~XFHolderEnd() -{ -} +XFHolderEnd::~XFHolderEnd() {} -inline void XFHolderEnd::ToXml(IXFStream *pStrm) -{ - pStrm->EndElement( "text:placeholder" ); -} +inline void XFHolderEnd::ToXml(IXFStream* pStrm) { pStrm->EndElement("text:placeholder"); } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/inc/xfilter/xfrowstyle.hxx b/lotuswordpro/inc/xfilter/xfrowstyle.hxx index 8ca8d1223e03..bd47fe2ac399 100644 --- a/lotuswordpro/inc/xfilter/xfrowstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfrowstyle.hxx @@ -71,31 +71,25 @@ public: XFRowStyle(); public: - void SetRowHeight(double height); + void SetRowHeight(double height); - double GetRowHeight() const; + double GetRowHeight() const; - void SetMinRowHeight(double height); + void SetMinRowHeight(double height); virtual enumXFStyle GetStyleFamily() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - double m_fHeight; - double m_fMinHeight; + double m_fHeight; + double m_fMinHeight; XFColor m_aBackColor; }; -inline void XFRowStyle::SetRowHeight(double height) -{ - m_fHeight = height; -} +inline void XFRowStyle::SetRowHeight(double height) { m_fHeight = height; } -inline void XFRowStyle::SetMinRowHeight(double height) -{ - m_fMinHeight = height; -} +inline void XFRowStyle::SetMinRowHeight(double height) { m_fMinHeight = height; } inline double XFRowStyle::GetRowHeight() const { diff --git a/lotuswordpro/inc/xfilter/xfruby.hxx b/lotuswordpro/inc/xfilter/xfruby.hxx index d481d4758cf8..e92b55318540 100644 --- a/lotuswordpro/inc/xfilter/xfruby.hxx +++ b/lotuswordpro/inc/xfilter/xfruby.hxx @@ -66,46 +66,44 @@ class XFRubyStart : public XFContent { public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; class XFRubyEnd : public XFContent { public: void SetText(const OUString& sText); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; + private: OUString m_strText; }; -void XFRubyStart::ToXml(IXFStream *pStrm) +void XFRubyStart::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - if( !GetStyleName().isEmpty()) - pAttrList->AddAttribute( "text:style-name", GetStyleName()); - pStrm->StartElement( "text:ruby" ); + if (!GetStyleName().isEmpty()) + pAttrList->AddAttribute("text:style-name", GetStyleName()); + pStrm->StartElement("text:ruby"); pAttrList->Clear(); - pStrm->StartElement( "text:ruby-base" ); + pStrm->StartElement("text:ruby-base"); } -void XFRubyEnd::SetText(const OUString& sText) -{ - m_strText = sText; -} +void XFRubyEnd::SetText(const OUString& sText) { m_strText = sText; } -void XFRubyEnd::ToXml(IXFStream *pStrm) +void XFRubyEnd::ToXml(IXFStream* pStrm) { - pStrm->EndElement( "text:ruby-base" ); - IXFAttrList *pAttrList = pStrm->GetAttrList(); + pStrm->EndElement("text:ruby-base"); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - if( !GetStyleName().isEmpty()) - pAttrList->AddAttribute( "text:style-name", GetStyleName()); - pStrm->StartElement( "text:ruby-text" ); - if( !m_strText.isEmpty() ) + if (!GetStyleName().isEmpty()) + pAttrList->AddAttribute("text:style-name", GetStyleName()); + pStrm->StartElement("text:ruby-text"); + if (!m_strText.isEmpty()) pStrm->Characters(m_strText); - pStrm->EndElement( "text:ruby-text" ); - pStrm->EndElement( "text:ruby" ); + pStrm->EndElement("text:ruby-text"); + pStrm->EndElement("text:ruby"); } #endif diff --git a/lotuswordpro/inc/xfilter/xfrubystyle.hxx b/lotuswordpro/inc/xfilter/xfrubystyle.hxx index 184e7126a7e5..eee1a75b179d 100644 --- a/lotuswordpro/inc/xfilter/xfrubystyle.hxx +++ b/lotuswordpro/inc/xfilter/xfrubystyle.hxx @@ -72,7 +72,7 @@ public: , m_eAlign(enumXFRubyLeft) { } - virtual void ToXml(IXFStream *strm) override; + virtual void ToXml(IXFStream* strm) override; void SetPosition(enumXFRubyPosition ePosition); void SetAlignment(enumXFRubyPosition eAlignment); enumXFStyle GetStyleFamily() override; @@ -82,25 +82,16 @@ private: enumXFRubyPosition m_eAlign; }; -void XFRubyStyle::SetPosition(enumXFRubyPosition ePosition) +void XFRubyStyle::SetPosition(enumXFRubyPosition ePosition) { m_ePos = ePosition; } +void XFRubyStyle::SetAlignment(enumXFRubyPosition eAlignment) { m_eAlign = eAlignment; } +enumXFStyle XFRubyStyle::GetStyleFamily() { return enumXFStyleRuby; } +void XFRubyStyle::ToXml(IXFStream* pStrm) { - m_ePos = ePosition; -} -void XFRubyStyle::SetAlignment(enumXFRubyPosition eAlignment) -{ - m_eAlign = eAlignment; -} -enumXFStyle XFRubyStyle::GetStyleFamily() -{ - return enumXFStyleRuby; -} -void XFRubyStyle::ToXml(IXFStream *pStrm) -{ - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); OUString style = GetStyleName(); pAttrList->Clear(); - if( !style.isEmpty() ) + if (!style.isEmpty()) pAttrList->AddAttribute("style:name", GetStyleName()); pAttrList->AddAttribute("style:family", "ruby"); pStrm->StartElement("style:style"); @@ -110,13 +101,13 @@ void XFRubyStyle::ToXml(IXFStream *pStrm) OUString sPos; if (m_eAlign == enumXFRubyLeft) { - sPos ="left"; + sPos = "left"; } - else if(m_eAlign == enumXFRubyRight) + else if (m_eAlign == enumXFRubyRight) { sPos = "right"; } - else if(m_eAlign == enumXFRubyCenter) + else if (m_eAlign == enumXFRubyCenter) { sPos = "center"; } @@ -128,7 +119,7 @@ void XFRubyStyle::ToXml(IXFStream *pStrm) { sAlign = "above"; } - else if(m_ePos == enumXFRubyBottom) + else if (m_ePos == enumXFRubyBottom) { sAlign = "below"; } diff --git a/lotuswordpro/inc/xfilter/xfsectionstyle.hxx b/lotuswordpro/inc/xfilter/xfsectionstyle.hxx index f112ab33f944..b921c4aaf71d 100644 --- a/lotuswordpro/inc/xfilter/xfsectionstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfsectionstyle.hxx @@ -77,21 +77,21 @@ public: virtual ~XFSectionStyle() override; public: - void SetMarginLeft(double left); + void SetMarginLeft(double left); - void SetMarginRight(double right); + void SetMarginRight(double right); - void SetColumns(XFColumns *pColumns); + void SetColumns(XFColumns* pColumns); virtual enumXFStyle GetStyleFamily() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; private: - double m_fMarginLeft; - double m_fMarginRight; - XFColor m_aBackColor; - std::unique_ptr<XFColumns> m_pColumns; + double m_fMarginLeft; + double m_fMarginRight; + XFColor m_aBackColor; + std::unique_ptr<XFColumns> m_pColumns; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfstyle.hxx b/lotuswordpro/inc/xfilter/xfstyle.hxx index 493f000c60a7..1a3caecb34c1 100644 --- a/lotuswordpro/inc/xfilter/xfstyle.hxx +++ b/lotuswordpro/inc/xfilter/xfstyle.hxx @@ -73,45 +73,45 @@ public: virtual ~XFStyle() override; - XFStyle(XFStyle const &) = default; - XFStyle(XFStyle &&) = default; - XFStyle & operator =(XFStyle const &) = default; - XFStyle & operator =(XFStyle &&) = default; + XFStyle(XFStyle const&) = default; + XFStyle(XFStyle&&) = default; + XFStyle& operator=(XFStyle const&) = default; + XFStyle& operator=(XFStyle&&) = default; public: /** * @descr get style name. */ - virtual OUString GetStyleName() override; + virtual OUString GetStyleName() override; /** * @descr set style name. */ - virtual void SetStyleName(const OUString& styleName) override; + virtual void SetStyleName(const OUString& styleName) override; /** * @descr set parent style name. */ - virtual OUString GetParentStyleName() override; + virtual OUString GetParentStyleName() override; /** * @descr return parent style name. */ - virtual void SetParentStyleName(const OUString& styleName) override; + virtual void SetParentStyleName(const OUString& styleName) override; /** * @descr get style family. */ - virtual enumXFStyle GetStyleFamily() override; + virtual enumXFStyle GetStyleFamily() override; /** * @descr decide whether two style are equal. */ - virtual bool Equal(IXFStyle *pStyle) override; + virtual bool Equal(IXFStyle* pStyle) override; protected: - OUString m_strStyleName; - OUString m_strParentStyleName; + OUString m_strStyleName; + OUString m_strParentStyleName; }; #endif diff --git a/lotuswordpro/inc/xfilter/xfstylecont.hxx b/lotuswordpro/inc/xfilter/xfstylecont.hxx index 5418f9a88d71..601fbd252a61 100644 --- a/lotuswordpro/inc/xfilter/xfstylecont.hxx +++ b/lotuswordpro/inc/xfilter/xfstylecont.hxx @@ -84,7 +84,7 @@ struct IXFStyleRet class XFStyleContainer { public: - XFStyleContainer(){} + XFStyleContainer() {} explicit XFStyleContainer(const OUString& strStyleNamePrefix); @@ -99,27 +99,27 @@ public: * @descr Add style to container. * If the same style has exist, then pStyle will be deleted, and the same style will be return. */ - IXFStyleRet AddStyle(std::unique_ptr<IXFStyle> pStyle); + IXFStyleRet AddStyle(std::unique_ptr<IXFStyle> pStyle); /** * @descr Find the same style. */ - IXFStyle* FindSameStyle(IXFStyle *pStyle); + IXFStyle* FindSameStyle(IXFStyle* pStyle); /** * @descr get style by name. */ - IXFStyle* FindStyle(const OUString& name); + IXFStyle* FindStyle(const OUString& name); /** * @descr clear container. */ - void Reset(); + void Reset(); /** * @descr get count of styles in the container. */ - size_t GetCount() const; + size_t GetCount() const; /** * @descr get style by index. @@ -129,21 +129,20 @@ public: /** * @descr Output all style. */ - virtual void ToXml(IXFStream *pStrm); + virtual void ToXml(IXFStream* pStrm); friend bool operator==(XFStyleContainer& b1, XFStyleContainer& b2); friend bool operator!=(XFStyleContainer& b1, XFStyleContainer& b2); + private: - static void ManageStyleFont(IXFStyle *pStyle); + static void ManageStyleFont(IXFStyle* pStyle); + private: - std::vector<std::unique_ptr<IXFStyle>> m_aStyles; - OUString m_strStyleNamePrefix; + std::vector<std::unique_ptr<IXFStyle>> m_aStyles; + OUString m_strStyleNamePrefix; }; -inline size_t XFStyleContainer::GetCount() const -{ - return m_aStyles.size(); -} +inline size_t XFStyleContainer::GetCount() const { return m_aStyles.size(); } #endif diff --git a/lotuswordpro/inc/xfilter/xftablestyle.hxx b/lotuswordpro/inc/xfilter/xftablestyle.hxx index 7fff8c45e6ad..5b7a9c1d6725 100644 --- a/lotuswordpro/inc/xfilter/xftablestyle.hxx +++ b/lotuswordpro/inc/xfilter/xftablestyle.hxx @@ -76,39 +76,36 @@ public: virtual ~XFTableStyle() override; public: - void SetWidth(double width); + void SetWidth(double width); - void SetAlign(enumXFAlignType eAlign, double offset = 0); + void SetAlign(enumXFAlignType eAlign, double offset = 0); - void SetShadow(enumXFShadowPos pos, double offset, XFColor color ); + void SetShadow(enumXFShadowPos pos, double offset, XFColor color); - void SetBackColor(XFColor const & color); + void SetBackColor(XFColor const& color); - void SetBackImage(std::unique_ptr<XFBGImage>& rImage); + void SetBackImage(std::unique_ptr<XFBGImage>& rImage); - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; virtual enumXFStyle GetStyleFamily() override; private: - double m_fWidth; + double m_fWidth; XFColor m_aBackColor; std::unique_ptr<XFBGImage> m_pBGImage; - XFShadow m_aShadow; - XFMargins m_aMargins; - XFBreaks m_aBreaks; + XFShadow m_aShadow; + XFMargins m_aMargins; + XFBreaks m_aBreaks; enumXFAlignType m_eAlign; }; -inline void XFTableStyle::SetWidth(double width) -{ - m_fWidth = width; -} +inline void XFTableStyle::SetWidth(double width) { m_fWidth = width; } inline void XFTableStyle::SetAlign(enumXFAlignType eAlign, double offset) { m_eAlign = eAlign; - if( m_eAlign == enumXFAlignStart ) + if (m_eAlign == enumXFAlignStart) { m_aMargins.SetLeft(offset); m_aMargins.SetRight(0); @@ -124,10 +121,7 @@ inline void XFTableStyle::SetShadow(enumXFShadowPos pos, double offset, XFColor m_aShadow.SetPosition(pos); } -inline void XFTableStyle::SetBackColor(XFColor const & color) -{ - m_aBackColor = color; -} +inline void XFTableStyle::SetBackColor(XFColor const& color) { m_aBackColor = color; } #endif diff --git a/lotuswordpro/inc/xfilter/xftabstop.hxx b/lotuswordpro/inc/xfilter/xftabstop.hxx index 2f5ad893072d..466ea535bdd8 100644 --- a/lotuswordpro/inc/xfilter/xftabstop.hxx +++ b/lotuswordpro/inc/xfilter/xftabstop.hxx @@ -66,16 +66,16 @@ class XFTabStop : public XFContent { public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; -inline void XFTabStop::ToXml(IXFStream *pStrm) +inline void XFTabStop::ToXml(IXFStream* pStrm) { - IXFAttrList *pAttrList = pStrm->GetAttrList(); + IXFAttrList* pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( "text:tab-stop" ); - pStrm->EndElement( "text:tab-stop" ); + pStrm->StartElement("text:tab-stop"); + pStrm->EndElement("text:tab-stop"); } #endif diff --git a/lotuswordpro/inc/xfilter/xftextspan.hxx b/lotuswordpro/inc/xfilter/xftextspan.hxx index 2e210f357209..c7c4cc9c2992 100644 --- a/lotuswordpro/inc/xfilter/xftextspan.hxx +++ b/lotuswordpro/inc/xfilter/xftextspan.hxx @@ -74,28 +74,29 @@ class XFTextSpan : public XFContent { public: XFTextSpan(); - XFTextSpan(const OUString& text, const OUString& style ); + XFTextSpan(const OUString& text, const OUString& style); virtual ~XFTextSpan() override; - void Add(XFContent *pContent); - void Add(const OUString& text); + void Add(XFContent* pContent); + void Add(const OUString& text); virtual enumXFContent GetContentType() override; - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; + protected: - std::vector< rtl::Reference<XFContent> > m_aContents; + std::vector<rtl::Reference<XFContent>> m_aContents; }; class XFTextSpanStart : public XFTextSpan //for adding style of power field { public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; class XFTextSpanEnd : public XFTextSpan //for adding style of power field { public: - virtual void ToXml(IXFStream *pStrm) override; + virtual void ToXml(IXFStream* pStrm) override; }; #endif diff --git a/lotuswordpro/inc/xfilter/xftextstyle.hxx b/lotuswordpro/inc/xfilter/xftextstyle.hxx index 2774426d7bcd..4cce69a745ce 100644 --- a/lotuswordpro/inc/xfilter/xftextstyle.hxx +++ b/lotuswordpro/inc/xfilter/xftextstyle.hxx @@ -67,8 +67,8 @@ #include <xfilter/xfstyle.hxx> -class IXFStream; -class XFFont; +class IXFStream; +class XFFont; class XFTextStyle : public XFStyle { @@ -77,24 +77,24 @@ public: virtual ~XFTextStyle() override; - XFTextStyle(XFTextStyle const &) = default; - XFTextStyle(XFTextStyle &&) = default; - XFTextStyle & operator =(XFTextStyle const &) = default; - XFTextStyle & operator =(XFTextStyle &&) = default; + XFTextStyle(XFTextStyle const&) = default; + XFTextStyle(XFTextStyle&&) = default; + XFTextStyle& operator=(XFTextStyle const&) = default; + XFTextStyle& operator=(XFTextStyle&&) = default; public: /** * @descr: set the font for the text span. */ - void SetFont(rtl::Reference<XFFont> const & font); + void SetFont(rtl::Reference<XFFont> const& font); const rtl::Reference<XFFont>& GetFont() const { return m_pFont; } virtual enumXFStyle GetStyleFamily() override; - virtual bool Equal(IXFStyle *pStyle) override; + virtual bool Equal(IXFStyle* pStyle) override; - virtual void ToXml(IXFStream *strm) override; + virtual void ToXml(IXFStream* strm) override; private: rtl::Reference<XFFont> m_pFont; diff --git a/lotuswordpro/inc/xfilter/xfutil.hxx b/lotuswordpro/inc/xfilter/xfutil.hxx index 8d2f9225cb49..17ff7f539a55 100644 --- a/lotuswordpro/inc/xfilter/xfutil.hxx +++ b/lotuswordpro/inc/xfilter/xfutil.hxx @@ -64,31 +64,31 @@ #include <xfilter/xfdefs.hxx> #include <rtl/ustring.hxx> -OUString GetTableColName(sal_Int32 col); +OUString GetTableColName(sal_Int32 col); -OUString GetUnderlineName(enumXFUnderline type); +OUString GetUnderlineName(enumXFUnderline type); -OUString GetCrossoutName(enumXFCrossout type); +OUString GetCrossoutName(enumXFCrossout type); -OUString GetTransformName(enumXFTransform type); +OUString GetTransformName(enumXFTransform type); -OUString GetTextDirName(enumXFTextDir dir); +OUString GetTextDirName(enumXFTextDir dir); -OUString GetFrameXPos(enumXFFrameXPos pos); +OUString GetFrameXPos(enumXFFrameXPos pos); -OUString GetFrameXRel(enumXFFrameXRel rel); +OUString GetFrameXRel(enumXFFrameXRel rel); -OUString GetFrameYPos(enumXFFrameYPos pos); +OUString GetFrameYPos(enumXFFrameYPos pos); -OUString GetFrameYRel(enumXFFrameYRel rel); +OUString GetFrameYRel(enumXFFrameYRel rel); -OUString GetAlignName(enumXFAlignType align); +OUString GetAlignName(enumXFAlignType align); -OUString GetPageUsageName(enumXFPageUsage usage); +OUString GetPageUsageName(enumXFPageUsage usage); -OUString GetValueType(enumXFValueType type); +OUString GetValueType(enumXFValueType type); -OUString GetColorMode(enumXFColorMode mode); +OUString GetColorMode(enumXFColorMode mode); #endif |