summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/inc/localtime.hxx20
-rw-r--r--lotuswordpro/inc/lwpatomholder.hxx18
-rw-r--r--lotuswordpro/inc/lwpbasetype.hxx15
-rw-r--r--lotuswordpro/inc/lwpfilehdr.hxx14
-rw-r--r--lotuswordpro/inc/lwpfrib.hxx37
-rw-r--r--lotuswordpro/inc/lwpglobalmgr.hxx16
-rw-r--r--lotuswordpro/inc/lwpobj.hxx15
-rw-r--r--lotuswordpro/inc/lwpobjstrm.hxx30
-rw-r--r--lotuswordpro/inc/lwpsvstream.hxx20
-rw-r--r--lotuswordpro/inc/xfilter/ixfstream.hxx14
-rw-r--r--lotuswordpro/inc/xfilter/ixfstyle.hxx22
-rw-r--r--lotuswordpro/inc/xfilter/xfannotation.hxx32
-rw-r--r--lotuswordpro/inc/xfilter/xfarrowstyle.hxx52
-rw-r--r--lotuswordpro/inc/xfilter/xfbgimage.hxx32
-rw-r--r--lotuswordpro/inc/xfilter/xfcellstyle.hxx33
-rw-r--r--lotuswordpro/inc/xfilter/xfchange.hxx35
-rw-r--r--lotuswordpro/inc/xfilter/xfcolstyle.hxx20
-rw-r--r--lotuswordpro/inc/xfilter/xfconfigmanager.hxx12
-rw-r--r--lotuswordpro/inc/xfilter/xfcontentcontainer.hxx20
-rw-r--r--lotuswordpro/inc/xfilter/xfcrossref.hxx18
-rw-r--r--lotuswordpro/inc/xfilter/xfdatestyle.hxx52
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawgroup.hxx21
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawpath.hxx27
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawpolyline.hxx10
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawrect.hxx14
-rw-r--r--lotuswordpro/inc/xfilter/xfdrawstyle.hxx31
-rw-r--r--lotuswordpro/inc/xfilter/xfentry.hxx37
-rw-r--r--lotuswordpro/inc/xfilter/xffloatframe.hxx9
-rw-r--r--lotuswordpro/inc/xfilter/xffontdecl.hxx10
-rw-r--r--lotuswordpro/inc/xfilter/xffooter.hxx12
-rw-r--r--lotuswordpro/inc/xfilter/xffooterstyle.hxx11
-rw-r--r--lotuswordpro/inc/xfilter/xffootnote.hxx36
-rw-r--r--lotuswordpro/inc/xfilter/xfglobal.hxx40
-rw-r--r--lotuswordpro/inc/xfilter/xfheader.hxx13
-rw-r--r--lotuswordpro/inc/xfilter/xfheaderstyle.hxx36
-rw-r--r--lotuswordpro/inc/xfilter/xfhyperlink.hxx59
-rw-r--r--lotuswordpro/inc/xfilter/xfimagestyle.hxx30
-rw-r--r--lotuswordpro/inc/xfilter/xflinebreak.hxx10
-rw-r--r--lotuswordpro/inc/xfilter/xflist.hxx22
-rw-r--r--lotuswordpro/inc/xfilter/xflistitem.hxx36
-rw-r--r--lotuswordpro/inc/xfilter/xfmasterpage.hxx10
-rw-r--r--lotuswordpro/inc/xfilter/xfofficemeta.hxx22
-rw-r--r--lotuswordpro/inc/xfilter/xfpagecount.hxx10
-rw-r--r--lotuswordpro/inc/xfilter/xfpagenumber.hxx21
-rw-r--r--lotuswordpro/inc/xfilter/xfplaceholder.hxx53
-rw-r--r--lotuswordpro/inc/xfilter/xfrowstyle.hxx22
-rw-r--r--lotuswordpro/inc/xfilter/xfruby.hxx40
-rw-r--r--lotuswordpro/inc/xfilter/xfrubystyle.hxx31
-rw-r--r--lotuswordpro/inc/xfilter/xfsectionstyle.hxx16
-rw-r--r--lotuswordpro/inc/xfilter/xfstyle.hxx24
-rw-r--r--lotuswordpro/inc/xfilter/xfstylecont.hxx27
-rw-r--r--lotuswordpro/inc/xfilter/xftablestyle.hxx32
-rw-r--r--lotuswordpro/inc/xfilter/xftabstop.hxx10
-rw-r--r--lotuswordpro/inc/xfilter/xftextspan.hxx15
-rw-r--r--lotuswordpro/inc/xfilter/xftextstyle.hxx18
-rw-r--r--lotuswordpro/inc/xfilter/xfutil.hxx26
-rw-r--r--lotuswordpro/source/filter/benlist.cxx23
-rw-r--r--lotuswordpro/source/filter/benobj.cxx15
-rw-r--r--lotuswordpro/source/filter/explode.hxx37
-rw-r--r--lotuswordpro/source/filter/first.hxx6
-rw-r--r--lotuswordpro/source/filter/localtime.cxx32
-rw-r--r--lotuswordpro/source/filter/lwp9reader.cxx58
-rw-r--r--lotuswordpro/source/filter/lwp9reader.hxx8
-rw-r--r--lotuswordpro/source/filter/lwpatomholder.cxx18
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundstuff.cxx28
-rw-r--r--lotuswordpro/source/filter/lwpbackgroundstuff.hxx12
-rw-r--r--lotuswordpro/source/filter/lwpbasetype.cxx14
-rw-r--r--lotuswordpro/source/filter/lwpbreaksoverride.cxx29
-rw-r--r--lotuswordpro/source/filter/lwpbreaksoverride.hxx41
-rw-r--r--lotuswordpro/source/filter/lwpcharacterstyle.cxx28
-rw-r--r--lotuswordpro/source/filter/lwpcharborderoverride.hxx14
-rw-r--r--lotuswordpro/source/filter/lwpcharsetmgr.cxx53
-rw-r--r--lotuswordpro/source/filter/lwpcontent.cxx15
-rw-r--r--lotuswordpro/source/filter/lwpdivinfo.cxx20
-rw-r--r--lotuswordpro/source/filter/lwpdivinfo.hxx21
-rw-r--r--lotuswordpro/source/filter/lwpdivopts.hxx10
-rw-r--r--lotuswordpro/source/filter/lwpdlvlist.cxx51
-rw-r--r--lotuswordpro/source/filter/lwpdlvlist.hxx23
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx237
-rw-r--r--lotuswordpro/source/filter/lwpdoc.hxx49
-rw-r--r--lotuswordpro/source/filter/lwpdropcapmgr.cxx14
-rw-r--r--lotuswordpro/source/filter/lwpfilehdr.cxx26
-rw-r--r--lotuswordpro/source/filter/lwpfilter.cxx30
-rw-r--r--lotuswordpro/source/filter/lwpfnlayout.cxx128
-rw-r--r--lotuswordpro/source/filter/lwpfnlayout.hxx44
-rw-r--r--lotuswordpro/source/filter/lwpfootnote.cxx97
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.cxx340
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.hxx54
-rw-r--r--lotuswordpro/source/filter/lwpfrib.cxx61
-rw-r--r--lotuswordpro/source/filter/lwpfribbreaks.cxx49
-rw-r--r--lotuswordpro/source/filter/lwpfribframe.cxx28
-rw-r--r--lotuswordpro/source/filter/lwpfribframe.hxx12
-rw-r--r--lotuswordpro/source/filter/lwpfribmark.cxx292
-rw-r--r--lotuswordpro/source/filter/lwpfribptr.hxx19
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.cxx131
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.cxx22
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.hxx6
-rw-r--r--lotuswordpro/source/filter/lwpglobalmgr.cxx16
-rw-r--r--lotuswordpro/source/filter/lwpholder.cxx27
-rw-r--r--lotuswordpro/source/filter/lwpholder.hxx21
-rw-r--r--lotuswordpro/source/filter/lwphyperlinkmgr.cxx15
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx473
-rw-r--r--lotuswordpro/source/filter/lwplaypiece.hxx108
-rw-r--r--lotuswordpro/source/filter/lwplnopts.cxx7
-rw-r--r--lotuswordpro/source/filter/lwplnopts.hxx12
-rw-r--r--lotuswordpro/source/filter/lwpnotes.cxx84
-rw-r--r--lotuswordpro/source/filter/lwpnotes.hxx29
-rw-r--r--lotuswordpro/source/filter/lwpnumberingoverride.hxx29
-rw-r--r--lotuswordpro/source/filter/lwpobj.cxx29
-rw-r--r--lotuswordpro/source/filter/lwpobjhdr.cxx75
-rw-r--r--lotuswordpro/source/filter/lwpobjid.cxx45
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.cxx79
-rw-r--r--lotuswordpro/source/filter/lwpoleobject.cxx55
-rw-r--r--lotuswordpro/source/filter/lwpoverride.cxx93
-rw-r--r--lotuswordpro/source/filter/lwppagehint.hxx18
-rw-r--r--lotuswordpro/source/filter/lwppagelayout.cxx257
-rw-r--r--lotuswordpro/source/filter/lwppagelayout.hxx51
-rw-r--r--lotuswordpro/source/filter/lwpparaborderoverride.cxx45
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.hxx17
-rw-r--r--lotuswordpro/source/filter/lwpproplist.hxx12
-rw-r--r--lotuswordpro/source/filter/lwpprtinfo.cxx13
-rw-r--r--lotuswordpro/source/filter/lwppttntbl.hxx147
-rw-r--r--lotuswordpro/source/filter/lwpresource.hxx10
-rw-r--r--lotuswordpro/source/filter/lwpsdwfileloader.cxx10
-rw-r--r--lotuswordpro/source/filter/lwpsection.cxx37
-rw-r--r--lotuswordpro/source/filter/lwpsection.hxx24
-rw-r--r--lotuswordpro/source/filter/lwpsilverbullet.hxx57
-rw-r--r--lotuswordpro/source/filter/lwpsortopt.cxx11
-rw-r--r--lotuswordpro/source/filter/lwpsortopt.hxx7
-rw-r--r--lotuswordpro/source/filter/lwpstory.hxx45
-rw-r--r--lotuswordpro/source/filter/lwpsvstream.cxx37
-rw-r--r--lotuswordpro/source/filter/lwptable.cxx99
-rw-r--r--lotuswordpro/source/filter/lwptaboverride.cxx5
-rw-r--r--lotuswordpro/source/filter/lwptaboverride.hxx13
-rw-r--r--lotuswordpro/source/filter/lwptblcell.cxx106
-rw-r--r--lotuswordpro/source/filter/lwptoc.hxx38
-rw-r--r--lotuswordpro/source/filter/lwpuidoc.cxx17
-rw-r--r--lotuswordpro/source/filter/lwpuidoc.hxx29
-rw-r--r--lotuswordpro/source/filter/lwpusrdicts.cxx9
-rw-r--r--lotuswordpro/source/filter/lwpvpointer.cxx13
-rw-r--r--lotuswordpro/source/filter/tocread.hxx20
-rw-r--r--lotuswordpro/source/filter/ut.hxx16
-rw-r--r--lotuswordpro/source/filter/utbenvs.cxx24
-rw-r--r--lotuswordpro/source/filter/utlist.cxx29
-rw-r--r--lotuswordpro/source/filter/utlist.hxx35
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcolstyle.cxx32
-rw-r--r--lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx28
-rw-r--r--lotuswordpro/source/filter/xfilter/xfcrossref.cxx37
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx34
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx49
-rw-r--r--lotuswordpro/source/filter/xfilter/xfdrawrect.cxx12
-rw-r--r--lotuswordpro/source/filter/xfilter/xfentry.cxx45
-rw-r--r--lotuswordpro/source/filter/xfilter/xffontfactory.cxx17
-rw-r--r--lotuswordpro/source/filter/xfilter/xflist.cxx30
-rw-r--r--lotuswordpro/source/filter/xfilter/xfmasterpage.cxx32
-rw-r--r--lotuswordpro/source/filter/xfilter/xfparagraph.cxx31
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx14
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx10
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsaxstream.cxx27
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsection.cxx38
-rw-r--r--lotuswordpro/source/filter/xfilter/xftabstyle.hxx33
-rw-r--r--lotuswordpro/source/filter/xfilter/xftextstyle.cxx46
-rw-r--r--solenv/clang-format/excludelist162
163 files changed, 3061 insertions, 3627 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
diff --git a/lotuswordpro/source/filter/benlist.cxx b/lotuswordpro/source/filter/benlist.cxx
index e092c7cf6cd1..8757cce41ce8 100644
--- a/lotuswordpro/source/filter/benlist.cxx
+++ b/lotuswordpro/source/filter/benlist.cxx
@@ -56,20 +56,15 @@
#include "first.hxx"
namespace OpenStormBento
{
-
-CBenNamedObject *
-FindNamedObject(CUtList * pList, const OString& rName,
- CUtListElmt ** ppPrev)
+CBenNamedObject* FindNamedObject(CUtList* pList, const OString& rName, CUtListElmt** ppPrev)
{
CUtListElmt& rTerminating = pList->GetTerminating();
- for (CUtListElmt * pCurr = pList->GetLast(); pCurr != &rTerminating;
- pCurr = pCurr->GetPrev())
+ for (CUtListElmt* pCurr = pList->GetLast(); pCurr != &rTerminating; pCurr = pCurr->GetPrev())
{
- CBenNamedObjectListElmt * pCurrNamedObjectListElmt =
- static_cast<CBenNamedObjectListElmt *>(pCurr);
+ CBenNamedObjectListElmt* pCurrNamedObjectListElmt
+ = static_cast<CBenNamedObjectListElmt*>(pCurr);
- sal_Int32 Comp = rName.compareTo(pCurrNamedObjectListElmt->GetNamedObject()->
- GetName());
+ sal_Int32 Comp = rName.compareTo(pCurrNamedObjectListElmt->GetNamedObject()->GetName());
if (Comp == 0)
return pCurrNamedObjectListElmt->GetNamedObject();
@@ -89,14 +84,12 @@ FindNamedObject(CUtList * pList, const OString& rName,
}
// Assume list is of BenIDListElmt list elements, sorted by ID
-CBenIDListElmt *
-FindID(CUtList * pList, BenObjectID ObjectID, CUtListElmt ** ppPrev)
+CBenIDListElmt* FindID(CUtList* pList, BenObjectID ObjectID, CUtListElmt** ppPrev)
{
CUtListElmt& rTerminating = pList->GetTerminating();
- for (CUtListElmt * pCurr = pList->GetLast(); pCurr != &rTerminating;
- pCurr = pCurr->GetPrev())
+ for (CUtListElmt* pCurr = pList->GetLast(); pCurr != &rTerminating; pCurr = pCurr->GetPrev())
{
- CBenIDListElmt * pCurrIDListElmt = static_cast<CBenIDListElmt *>(pCurr);
+ CBenIDListElmt* pCurrIDListElmt = static_cast<CBenIDListElmt*>(pCurr);
if (ObjectID == pCurrIDListElmt->GetID())
return pCurrIDListElmt;
diff --git a/lotuswordpro/source/filter/benobj.cxx b/lotuswordpro/source/filter/benobj.cxx
index 6dfe53d21c7e..7a112407c3ca 100644
--- a/lotuswordpro/source/filter/benobj.cxx
+++ b/lotuswordpro/source/filter/benobj.cxx
@@ -58,23 +58,20 @@
namespace OpenStormBento
{
-
-CBenProperty *
-CBenObject::UseProperty(BenObjectID PropertyID)
+CBenProperty* CBenObject::UseProperty(BenObjectID PropertyID)
{
- CUtListElmt * pPrev;
- return static_cast<CBenProperty *>( FindID(&cProperties, PropertyID, &pPrev) );
+ CUtListElmt* pPrev;
+ return static_cast<CBenProperty*>(FindID(&cProperties, PropertyID, &pPrev));
}
-CBenValue *
-CBenObject::UseValue(BenObjectID PropertyID)
+CBenValue* CBenObject::UseValue(BenObjectID PropertyID)
{
- CBenProperty * pProperty = UseProperty(PropertyID);
+ CBenProperty* pProperty = UseProperty(PropertyID);
if (pProperty == nullptr)
return nullptr;
return &pProperty->UseValue();
}
-}// end namespace OpenStormBento
+} // end namespace OpenStormBento
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/explode.hxx b/lotuswordpro/source/filter/explode.hxx
index 95f45f2ef821..fb13a6f26696 100644
--- a/lotuswordpro/source/filter/explode.hxx
+++ b/lotuswordpro/source/filter/explode.hxx
@@ -66,12 +66,13 @@ class HuffmanTreeNode
std::unique_ptr<HuffmanTreeNode> left;
std::unique_ptr<HuffmanTreeNode> right;
sal_uInt32 value;
+
public:
- explicit HuffmanTreeNode(sal_uInt32 value = 0xffffffff) ;
- ~HuffmanTreeNode() ;
- HuffmanTreeNode * InsertNode(sal_uInt32 nValue, const char * pInCode);
- HuffmanTreeNode * QueryNode(const char *pCode);
- sal_uInt32 QueryValue(const char *pCode);
+ explicit HuffmanTreeNode(sal_uInt32 value = 0xffffffff);
+ ~HuffmanTreeNode();
+ HuffmanTreeNode* InsertNode(sal_uInt32 nValue, const char* pInCode);
+ HuffmanTreeNode* QueryNode(const char* pCode);
+ sal_uInt32 QueryValue(const char* pCode);
};
/**
@@ -79,35 +80,35 @@ public:
* define the function type for input read, output write
*/
#define CHUNK 16384
-#define MAXWIN 4096 /* maximum window size */
+#define MAXWIN 4096 /* maximum window size */
class Decompression
{
public:
- Decompression(SvStream * pInStream, SvStream * pOutStream);
+ Decompression(SvStream* pInStream, SvStream* pOutStream);
/**
* @brief
* decompress from instream to outstream
*/
sal_Int32 explode();
- sal_uInt32 ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits) ;
- sal_uInt32 Decode(HuffmanTreeNode * pRoot);
+ sal_uInt32 ReadBits(sal_uInt16 iCount, sal_uInt32& nBits);
+ sal_uInt32 Decode(HuffmanTreeNode* pRoot);
/**
* @brief
* compressed/decompressed stream
*/
- SvStream *m_pInStream;
- SvStream *m_pOutStream;
+ SvStream* m_pInStream;
+ SvStream* m_pOutStream;
- sal_uInt32 m_nCurrent4Byte; // bit buffer
- sal_uInt32 m_nBitsLeft; // number of bits remained in bit buffer
+ sal_uInt32 m_nCurrent4Byte; // bit buffer
+ sal_uInt32 m_nBitsLeft; // number of bits remained in bit buffer
- sal_uInt8 m_Buffer[CHUNK]; // input byte buffer
- sal_uInt8 *m_pBuffer; // pointer to input buffer
- sal_uInt32 m_nBytesLeft; // number of bytes remained in byte buffer
+ sal_uInt8 m_Buffer[CHUNK]; // input byte buffer
+ sal_uInt8* m_pBuffer; // pointer to input buffer
+ sal_uInt32 m_nBytesLeft; // number of bytes remained in byte buffer
sal_uInt8 m_Output[MAXWIN]; // output byte buffer
- sal_uInt32 m_nOutputBufferPos; // pointer to output buffer
+ sal_uInt32 m_nOutputBufferPos; // pointer to output buffer
sal_uInt32 m_iArrayOfM[16];
@@ -116,7 +117,7 @@ public:
void ConstructTree1();
void ConstructTree2();
void fillArray();
- static void ToString(sal_uInt32 nBits, char *pChar, sal_uInt32 nLen);
+ static void ToString(sal_uInt32 nBits, char* pChar, sal_uInt32 nLen);
};
#endif
diff --git a/lotuswordpro/source/filter/first.hxx b/lotuswordpro/source/filter/first.hxx
index 4a4f8fa67a70..9acf487ed380 100644
--- a/lotuswordpro/source/filter/first.hxx
+++ b/lotuswordpro/source/filter/first.hxx
@@ -64,11 +64,9 @@ namespace OpenStormBento
// String constants
extern const char gsBenMagicBytes[];
-CBenNamedObject * FindNamedObject(CUtList * pList, const OString& rName,
- CUtListElmt ** ppPrev);
+CBenNamedObject* FindNamedObject(CUtList* pList, const OString& rName, CUtListElmt** ppPrev);
-CBenIDListElmt * FindID(CUtList * pList, BenObjectID ObjectID,
- CUtListElmt ** ppPrev);
+CBenIDListElmt* FindID(CUtList* pList, BenObjectID ObjectID, CUtListElmt** ppPrev);
} // end namespace
#endif
diff --git a/lotuswordpro/source/filter/localtime.cxx b/lotuswordpro/source/filter/localtime.cxx
index f33e3a82b67b..3974f2fe5f3c 100644
--- a/lotuswordpro/source/filter/localtime.cxx
+++ b/lotuswordpro/source/filter/localtime.cxx
@@ -58,16 +58,16 @@
#include <unicode/timezone.h>
#include <memory>
-const tools::Long DAY_SEC =24 * 60 * 60;
+const tools::Long DAY_SEC = 24 * 60 * 60;
const tools::Long YEAR_SEC = 365 * DAY_SEC;
const tools::Long FOURYEAR_SEC = 4 * YEAR_SEC + DAY_SEC;
#ifndef LONG_MAX
-const long LONG_MAX=2147483647;
+const long LONG_MAX = 2147483647;
#endif
//01-01-70 was a Thursday
const tools::Long BASE_DOW = 4;
-bool LtgGmTime(tools::Long rtime,LtTm& rtm)
+bool LtgGmTime(tools::Long rtime, LtTm& rtm)
{
if (rtime < 0)
{
@@ -92,7 +92,7 @@ bool LtgGmTime(tools::Long rtime,LtTm& rtm)
tmptim++;
caltim -= YEAR_SEC;
- if ( caltim >= YEAR_SEC )
+ if (caltim >= YEAR_SEC)
{
// 1972, 1976, 1980,...,etc.
tmptim++;
@@ -126,21 +126,22 @@ bool LtgGmTime(tools::Long rtime,LtTm& rtm)
//Determine months since January (0 - 11) and day of month (1 - 31)
- tools::Long const * mdays;
- if ( islpyr )
+ tools::Long const* mdays;
+ if (islpyr)
{
- static tools::Long const lpdays[] =
- {-1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
+ static tools::Long const lpdays[]
+ = { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 };
mdays = lpdays;
}
else
{
- static tools::Long const days[] =
- {-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364};
+ static tools::Long const days[]
+ = { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 };
mdays = days;
}
- for ( tmptim = 1 ; mdays[tmptim] < rtm.tm_yday ; tmptim++ ) ;
+ for (tmptim = 1; mdays[tmptim] < rtm.tm_yday; tmptim++)
+ ;
rtm.tm_mon = --tmptim;
@@ -164,22 +165,21 @@ bool LtgGmTime(tools::Long rtime,LtTm& rtm)
++(rtm.tm_mon);
return true;
-
};
-bool LtgLocalTime(tools::Long rtime,LtTm& rtm)
+bool LtgLocalTime(tools::Long rtime, LtTm& rtm)
{
if (rtime < 0)
{
return false;
}
- if ((rtime > 3 * DAY_SEC)&&(rtime < LONG_MAX - 3 * DAY_SEC))
+ if ((rtime > 3 * DAY_SEC) && (rtime < LONG_MAX - 3 * DAY_SEC))
{
std::unique_ptr<icu::TimeZone> pLocalZone(icu::TimeZone::createDefault());
- tools::Long offset = (pLocalZone->getRawOffset())/1000;
+ tools::Long offset = (pLocalZone->getRawOffset()) / 1000;
pLocalZone.reset();
tools::Long ltime = rtime + offset;
- return LtgGmTime(ltime,rtm);
+ return LtgGmTime(ltime, rtm);
}
return false;
};
diff --git a/lotuswordpro/source/filter/lwp9reader.cxx b/lotuswordpro/source/filter/lwp9reader.cxx
index 347f879c97f8..c5b24a7edf09 100644
--- a/lotuswordpro/source/filter/lwp9reader.cxx
+++ b/lotuswordpro/source/filter/lwp9reader.cxx
@@ -63,12 +63,13 @@
#include <lwpdocdata.hxx>
#include <lwpchangemgr.hxx>
-Lwp9Reader::Lwp9Reader (LwpSvStream* pInputStream, IXFStream* pStream)
+Lwp9Reader::Lwp9Reader(LwpSvStream* pInputStream, IXFStream* pStream)
: m_pDocStream(pInputStream)
, m_pStream(pStream)
, m_pObjMgr(nullptr)
, m_LwpFileHdr()
-{}
+{
+}
/**
* @descr The entrance of Word Pro 9 import filter.
@@ -82,7 +83,7 @@ bool Lwp9Reader::Read()
m_pObjMgr = pGlobal->GetLwpObjFactory();
//Does not support Word Pro 96 and previous versions
- if (ReadFileHeader() && LwpFileHeader::m_nFileRevision>=0x000B)
+ if (ReadFileHeader() && LwpFileHeader::m_nFileRevision >= 0x000B)
{
ReadIndex();
bRet = ParseDocument();
@@ -90,7 +91,7 @@ bool Lwp9Reader::Read()
else
bRet = false;
}
- catch(...)
+ catch (...)
{
LwpGlobalMgr::DeleteInstance();
throw;
@@ -137,14 +138,14 @@ bool Lwp9Reader::ParseDocument()
WriteDocHeader();
//Get root document
- LwpDocument* doc = dynamic_cast<LwpDocument*> ( m_LwpFileHdr.GetDocID().obj().get() );
+ LwpDocument* doc = dynamic_cast<LwpDocument*>(m_LwpFileHdr.GetDocID().obj().get());
if (!doc)
return false;
//Parse Doc Data
- LwpDocData *pDocData = dynamic_cast<LwpDocData*>(doc->GetDocData().obj().get());
- if (pDocData!=nullptr)
+ LwpDocData* pDocData = dynamic_cast<LwpDocData*>(doc->GetDocData().obj().get());
+ if (pDocData != nullptr)
pDocData->Parse(m_pStream);
//Register Styles
@@ -155,7 +156,7 @@ bool Lwp9Reader::ParseDocument()
//Parse document content
m_pStream->GetAttrList()->Clear();
- m_pStream->StartElement( "office:body" );
+ m_pStream->StartElement("office:body");
//Parse change list
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
@@ -176,33 +177,32 @@ void Lwp9Reader::WriteDocHeader()
{
m_pStream->StartDocument();
- IXFAttrList *pAttrList = m_pStream->GetAttrList();
+ IXFAttrList* pAttrList = m_pStream->GetAttrList();
- pAttrList->AddAttribute( "xmlns:office", "http://openoffice.org/2000/office" );
- pAttrList->AddAttribute( "xmlns:style", "http://openoffice.org/2000/style" );
- pAttrList->AddAttribute( "xmlns:text", "http://openoffice.org/2000/text" );
- pAttrList->AddAttribute( "xmlns:table", "http://openoffice.org/2000/table" );
- pAttrList->AddAttribute( "xmlns:draw", "http://openoffice.org/2000/drawing" );
+ pAttrList->AddAttribute("xmlns:office", "http://openoffice.org/2000/office");
+ pAttrList->AddAttribute("xmlns:style", "http://openoffice.org/2000/style");
+ pAttrList->AddAttribute("xmlns:text", "http://openoffice.org/2000/text");
+ pAttrList->AddAttribute("xmlns:table", "http://openoffice.org/2000/table");
+ pAttrList->AddAttribute("xmlns:draw", "http://openoffice.org/2000/drawing");
- pAttrList->AddAttribute( "xmlns:fo", "http://www.w3.org/1999/XSL/Format" );
- pAttrList->AddAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" );
- pAttrList->AddAttribute( "xmlns:number", "http://openoffice.org/2000/datastyle" );
- pAttrList->AddAttribute( "xmlns:svg", "http://www.w3.org/2000/svg" );
- pAttrList->AddAttribute( "xmlns:chart", "http://openoffice.org/2000/chart" );
+ pAttrList->AddAttribute("xmlns:fo", "http://www.w3.org/1999/XSL/Format");
+ pAttrList->AddAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ pAttrList->AddAttribute("xmlns:number", "http://openoffice.org/2000/datastyle");
+ pAttrList->AddAttribute("xmlns:svg", "http://www.w3.org/2000/svg");
+ pAttrList->AddAttribute("xmlns:chart", "http://openoffice.org/2000/chart");
- pAttrList->AddAttribute( "xmlns:dr3d", "http://openoffice.org/2000/dr3d" );
- pAttrList->AddAttribute( "xmlns:math", "http://www.w3.org/1998/Math/MathML" );
- pAttrList->AddAttribute( "xmlns:form", "http://openoffice.org/2000/form" );
- pAttrList->AddAttribute( "xmlns:script", "http://openoffice.org/2000/script" );
- pAttrList->AddAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" );
+ pAttrList->AddAttribute("xmlns:dr3d", "http://openoffice.org/2000/dr3d");
+ pAttrList->AddAttribute("xmlns:math", "http://www.w3.org/1998/Math/MathML");
+ pAttrList->AddAttribute("xmlns:form", "http://openoffice.org/2000/form");
+ pAttrList->AddAttribute("xmlns:script", "http://openoffice.org/2000/script");
+ pAttrList->AddAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/");
- pAttrList->AddAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" );
- pAttrList->AddAttribute( "office:class", "text");
- pAttrList->AddAttribute( "office:version", "1.0");
+ pAttrList->AddAttribute("xmlns:meta", "http://openoffice.org/2000/meta");
+ pAttrList->AddAttribute("office:class", "text");
+ pAttrList->AddAttribute("office:version", "1.0");
- m_pStream->StartElement( "office:document" );
+ m_pStream->StartElement("office:document");
pAttrList->Clear();
-
}
/**
* @descr Write xml document end
diff --git a/lotuswordpro/source/filter/lwp9reader.hxx b/lotuswordpro/source/filter/lwp9reader.hxx
index bbbc551f8675..4f17dcd54d5a 100644
--- a/lotuswordpro/source/filter/lwp9reader.hxx
+++ b/lotuswordpro/source/filter/lwp9reader.hxx
@@ -69,16 +69,18 @@ class Lwp9Reader final
{
public:
Lwp9Reader(LwpSvStream* InputStream, IXFStream* pStream);
+
private:
- LwpSvStream* m_pDocStream;
- IXFStream* m_pStream;
+ LwpSvStream* m_pDocStream;
+ IXFStream* m_pStream;
LwpObjectFactory* m_pObjMgr;
- LwpFileHeader m_LwpFileHdr; //LWP7 object
+ LwpFileHeader m_LwpFileHdr; //LWP7 object
bool ReadFileHeader();
void ReadIndex();
bool ParseDocument();
void WriteDocHeader();
void WriteDocEnd();
+
public:
bool Read();
};
diff --git a/lotuswordpro/source/filter/lwpatomholder.cxx b/lotuswordpro/source/filter/lwpatomholder.cxx
index d1ca92cb1377..4976d815cffb 100644
--- a/lotuswordpro/source/filter/lwpatomholder.cxx
+++ b/lotuswordpro/source/filter/lwpatomholder.cxx
@@ -58,33 +58,37 @@
#include <rtl/textenc.h>
LwpAtomHolder::LwpAtomHolder()
- : m_nAtom(0), m_nAssocAtom(0)
-{}
+ : m_nAtom(0)
+ , m_nAssocAtom(0)
+{
+}
/**
* @descr read atomholder from object stream
* the default encoding used in Word Pro is 1252
*/
-void LwpAtomHolder::Read(LwpObjectStream *pStrm)
+void LwpAtomHolder::Read(LwpObjectStream* pStrm)
{
//Referred to lwp: file40.cpp, QuickReadAtomHolder()
sal_uInt16 diskSize = pStrm->QuickReaduInt16();
sal_uInt16 len = pStrm->QuickReaduInt16();
- if (len == 0 || diskSize < sizeof diskSize) {
+ if (len == 0 || diskSize < sizeof diskSize)
+ {
m_nAtom = BAD_ATOM;
m_nAssocAtom = BAD_ATOM;
return;
}
m_nAtom = m_nAssocAtom = len;
- LwpTools::QuickReadUnicode(pStrm, m_String, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
+ LwpTools::QuickReadUnicode(pStrm, m_String, diskSize - sizeof(diskSize),
+ RTL_TEXTENCODING_MS_1252);
}
/**
* @descr skip the atom holder in object stream
*/
-void LwpAtomHolder::Skip(LwpObjectStream *pStrm)
+void LwpAtomHolder::Skip(LwpObjectStream* pStrm)
{
sal_uInt16 holdersize = pStrm->QuickReaduInt16();
pStrm->SeekRel(holdersize);
@@ -94,7 +98,7 @@ void LwpAtomHolder::Skip(LwpObjectStream *pStrm)
* @descr read path atom
* No use now for lwp filter, just skip the atom
*/
-void LwpAtomHolder::ReadPathAtom(LwpObjectStream *pStrm)
+void LwpAtomHolder::ReadPathAtom(LwpObjectStream* pStrm)
{
//Referred to lwp: file40.cpp, QuickReadPathAtom()
// TODO: Read the data. Now just skip it. The method to skip is same as above.
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
index b139682f46e9..be8475185c01 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
@@ -85,9 +85,9 @@ void LwpBackgroundStuff::GetPattern(sal_uInt16 btPttnIndex, sal_uInt8 (&pPttnArr
}
assert((2 < btPttnIndex) && (btPttnIndex < 72));
const sal_uInt8* pTempArray = s_pLwpPatternTab[btPttnIndex];
- for(sal_uInt8 i = 0; i < 8; i++)
+ for (sal_uInt8 i = 0; i < 8; i++)
{
- pPttnArray[i] = pTempArray[7-i];
+ pPttnArray[i] = pTempArray[7 - i];
}
}
@@ -114,31 +114,31 @@ std::unique_ptr<XFBGImage> LwpBackgroundStuff::GetFillPattern()
GetPattern(m_nID, aPttnArray);
// create bitmap object from the pattern array
- BitmapEx aBmp = vcl::bitmap::CreateFromData( aPttnArray, 8, 8, 1, 1 );
+ BitmapEx aBmp = vcl::bitmap::CreateFromData(aPttnArray, 8, 8, 1, 1);
// create XOBitmap object from bitmap object
- XOBitmap aXOBitmap( aBmp );
+ XOBitmap aXOBitmap(aBmp);
aXOBitmap.Bitmap2Array();
// set back/fore-ground colors
if (m_aFillColor.IsValidColor() && m_aPatternColor.IsValidColor())
{
Color aBackColor(static_cast<sal_uInt8>(m_aFillColor.GetRed()),
- static_cast<sal_uInt8>(m_aFillColor.GetGreen()),
- static_cast<sal_uInt8>(m_aFillColor.GetBlue()));
+ static_cast<sal_uInt8>(m_aFillColor.GetGreen()),
+ static_cast<sal_uInt8>(m_aFillColor.GetBlue()));
Color aForeColor(static_cast<sal_uInt8>(m_aPatternColor.GetRed()),
- static_cast<sal_uInt8>(m_aPatternColor.GetGreen()),
- static_cast<sal_uInt8>(m_aPatternColor.GetBlue()));
+ static_cast<sal_uInt8>(m_aPatternColor.GetGreen()),
+ static_cast<sal_uInt8>(m_aPatternColor.GetBlue()));
- if( aXOBitmap.GetBackgroundColor() == COL_BLACK )
+ if (aXOBitmap.GetBackgroundColor() == COL_BLACK)
{
- aXOBitmap.SetPixelColor( aBackColor );
- aXOBitmap.SetBackgroundColor( aForeColor );
+ aXOBitmap.SetPixelColor(aBackColor);
+ aXOBitmap.SetBackgroundColor(aForeColor);
}
else
{
- aXOBitmap.SetPixelColor( aForeColor );
- aXOBitmap.SetBackgroundColor( aBackColor );
+ aXOBitmap.SetPixelColor(aForeColor);
+ aXOBitmap.SetBackgroundColor(aBackColor);
}
}
@@ -147,7 +147,7 @@ std::unique_ptr<XFBGImage> LwpBackgroundStuff::GetFillPattern()
aXOBitmap.Array2Bitmap();
WriteDIB(aXOBitmap.GetBitmap(), aPicMemStream);
sal_uInt32 nSize = aPicMemStream.GetEndOfData();
- std::unique_ptr<sal_uInt8[]> pImageBuff(new sal_uInt8 [nSize]);
+ std::unique_ptr<sal_uInt8[]> pImageBuff(new sal_uInt8[nSize]);
memcpy(pImageBuff.get(), aPicMemStream.GetData(), nSize);
// create XFBGImage object.
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
index fb42e6e6db3d..45881764d021 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
@@ -68,7 +68,8 @@ class XFBGImage;
class LwpBackgroundStuff
{
public:
- LwpBackgroundStuff() : m_nID(0)
+ LwpBackgroundStuff()
+ : m_nID(0)
{
}
@@ -76,7 +77,7 @@ private:
static void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8 (&pPttnArray)[8]);
public:
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
LwpColor* GetFillColor();
std::unique_ptr<XFBGImage> GetFillPattern();
@@ -84,10 +85,11 @@ public:
bool IsPatternFill() const { return (m_nID > 2 && m_nID < 72); }
friend class LwpBackgroundOverride;
+
private:
- sal_uInt16 m_nID;
- LwpColor m_aFillColor;
- LwpColor m_aPatternColor;
+ sal_uInt16 m_nID;
+ LwpColor m_aFillColor;
+ LwpColor m_aPatternColor;
};
#endif
diff --git a/lotuswordpro/source/filter/lwpbasetype.cxx b/lotuswordpro/source/filter/lwpbasetype.cxx
index 9c5ab7f895ca..dfbe741ae81d 100644
--- a/lotuswordpro/source/filter/lwpbasetype.cxx
+++ b/lotuswordpro/source/filter/lwpbasetype.cxx
@@ -57,7 +57,7 @@
/**
* @descr read PonoseNumber from object stream
*/
-void LwpPanoseNumber::Read(LwpObjectStream *pStrm)
+void LwpPanoseNumber::Read(LwpObjectStream* pStrm)
{
m_nFamilyType = pStrm->QuickReaduInt8();
m_nSerifStyle = pStrm->QuickReaduInt8();
@@ -69,18 +69,14 @@ void LwpPanoseNumber::Read(LwpObjectStream *pStrm)
m_nLetterform = pStrm->QuickReaduInt8();
m_nMidline = pStrm->QuickReaduInt8();
m_nXHeight = pStrm->QuickReaduInt8();
-
}
-LwpPoint::LwpPoint()
-{
- Reset();
-}
+LwpPoint::LwpPoint() { Reset(); }
/**
* @descr read point from object stream
*/
-void LwpPoint::Read(LwpObjectStream *pStrm)
+void LwpPoint::Read(LwpObjectStream* pStrm)
{
m_nX = pStrm->QuickReadInt32();
m_nY = pStrm->QuickReadInt32();
@@ -90,8 +86,8 @@ void LwpPoint::Read(LwpObjectStream *pStrm)
*/
void LwpPoint::Reset()
{
- m_nX=0;
- m_nY=0;
+ m_nX = 0;
+ m_nY = 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.cxx b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
index 8ffb8ab259e8..71b508f0e818 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.cxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
@@ -65,7 +65,7 @@
#include <lwpatomholder.hxx>
LwpBreaksOverride::LwpBreaksOverride()
- : m_pNextStyle( new LwpAtomHolder )
+ : m_pNextStyle(new LwpAtomHolder)
{
}
@@ -75,16 +75,11 @@ LwpBreaksOverride::LwpBreaksOverride(LwpBreaksOverride const& rOther)
{
}
-LwpBreaksOverride::~LwpBreaksOverride()
-{
-}
+LwpBreaksOverride::~LwpBreaksOverride() {}
-LwpBreaksOverride* LwpBreaksOverride::clone() const
-{
- return new LwpBreaksOverride(*this);
-}
+LwpBreaksOverride* LwpBreaksOverride::clone() const { return new LwpBreaksOverride(*this); }
-void LwpBreaksOverride::Read(LwpObjectStream *pStrm)
+void LwpBreaksOverride::Read(LwpObjectStream* pStrm)
{
if (pStrm->QuickReadBool())
{
@@ -190,7 +185,7 @@ void LwpBreaksOverride::Override(LwpBreaksOverride* pOther)
void LwpBreaksOverride::OverridePageBreakBefore(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_PAGEBEFORE, STATE_ON);
}
@@ -201,7 +196,7 @@ void LwpBreaksOverride::OverridePageBreakBefore(bool bVal)
}
void LwpBreaksOverride::OverridePageBreakAfter(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_PAGEAFTER, STATE_ON);
}
@@ -213,7 +208,7 @@ void LwpBreaksOverride::OverridePageBreakAfter(bool bVal)
void LwpBreaksOverride::OverridePageBreakWithin(bool bVal)
{
// Note the flipped logic
- if(!bVal)
+ if (!bVal)
{
LwpOverride::Override(BO_KEEPTOGETHER, STATE_ON);
}
@@ -224,7 +219,7 @@ void LwpBreaksOverride::OverridePageBreakWithin(bool bVal)
}
void LwpBreaksOverride::OverrideColumnBreakBefore(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_COLBEFORE, STATE_ON);
}
@@ -235,7 +230,7 @@ void LwpBreaksOverride::OverrideColumnBreakBefore(bool bVal)
}
void LwpBreaksOverride::OverrideColumnBreakAfter(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_COLAFTER, STATE_ON);
}
@@ -246,7 +241,7 @@ void LwpBreaksOverride::OverrideColumnBreakAfter(bool bVal)
}
void LwpBreaksOverride::OverrideKeepWithNext(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_KEEPNEXT, STATE_ON);
}
@@ -257,7 +252,7 @@ void LwpBreaksOverride::OverrideKeepWithNext(bool bVal)
}
void LwpBreaksOverride::OverrideKeepWithPrevious(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_KEEPPREV, STATE_ON);
}
@@ -268,7 +263,7 @@ void LwpBreaksOverride::OverrideKeepWithPrevious(bool bVal)
}
void LwpBreaksOverride::OverrideUseNextStyle(bool bVal)
{
- if(bVal)
+ if (bVal)
{
LwpOverride::Override(BO_USENEXTSTYLE, STATE_ON);
}
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.hxx b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
index 70bc624d304a..e10e357dcb09 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.hxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
@@ -67,7 +67,6 @@ class LwpObjectStream;
class LwpAtomHolder;
class LwpBreaksOverride final : public LwpOverride
{
-
public:
LwpBreaksOverride();
virtual ~LwpBreaksOverride() override;
@@ -76,18 +75,19 @@ public:
enum
{
- BO_PAGEBEFORE = 0x01, // page break before this style
- BO_PAGEAFTER = 0x02, // page break after this style
+ BO_PAGEBEFORE = 0x01, // page break before this style
+ BO_PAGEAFTER = 0x02, // page break after this style
BO_KEEPTOGETHER = 0x04,
- BO_COLBEFORE = 0x08, // col break before this style
- BO_COLAFTER = 0x10, // col break after this style
- BO_KEEPPREV = 0x20, // not with-PAGE BEF, COL BEF or WITHIN
- BO_KEEPNEXT = 0x40, // not with-PAGE AFT, COL AFT or WITHIN
+ BO_COLBEFORE = 0x08, // col break before this style
+ BO_COLAFTER = 0x10, // col break after this style
+ BO_KEEPPREV = 0x20, // not with-PAGE BEF, COL BEF or WITHIN
+ BO_KEEPNEXT = 0x40, // not with-PAGE AFT, COL AFT or WITHIN
BO_USENEXTSTYLE = 0x80, // use next style name
- BO_NEXTSTYLE = 0x100 // next style name
+ BO_NEXTSTYLE = 0x100 // next style name
};
+
public:
- virtual void Read(LwpObjectStream *pStrm) override;
+ virtual void Read(LwpObjectStream* pStrm) override;
void Override(LwpBreaksOverride* pOther);
@@ -131,7 +131,7 @@ private:
LwpBreaksOverride(LwpBreaksOverride const& rOther);
LwpBreaksOverride& operator=(const LwpBreaksOverride& rOther) = delete;
- std::unique_ptr<LwpAtomHolder> m_pNextStyle;
+ std::unique_ptr<LwpAtomHolder> m_pNextStyle;
};
inline bool LwpBreaksOverride::IsPageBreakBefore() const
@@ -155,10 +155,7 @@ inline bool LwpBreaksOverride::IsColumnBreakAfter() const
{
return ((m_nValues & BO_COLAFTER) != 0);
}
-inline bool LwpBreaksOverride::IsKeepWithNext() const
-{
- return ((m_nValues & BO_KEEPNEXT) != 0);
-}
+inline bool LwpBreaksOverride::IsKeepWithNext() const { return ((m_nValues & BO_KEEPNEXT) != 0); }
inline bool LwpBreaksOverride::IsKeepWithPrevious() const
{
return ((m_nValues & BO_KEEPPREV) != 0);
@@ -170,35 +167,35 @@ inline bool LwpBreaksOverride::IsUseNextStyle() const
inline bool LwpBreaksOverride::IsPageBreakBeforeOverridden() const
{
- return ((m_nOverride& BO_PAGEBEFORE) != 0);
+ return ((m_nOverride & BO_PAGEBEFORE) != 0);
}
inline bool LwpBreaksOverride::IsPageBreakAfterOverridden() const
{
- return ((m_nOverride& BO_PAGEAFTER) != 0);
+ return ((m_nOverride & BO_PAGEAFTER) != 0);
}
inline bool LwpBreaksOverride::IsPageBreakWithinOverridden() const
{
- return ((m_nOverride& BO_KEEPTOGETHER) != 0);
+ return ((m_nOverride & BO_KEEPTOGETHER) != 0);
}
inline bool LwpBreaksOverride::IsColumnBreakBeforeOverridden() const
{
- return ((m_nOverride& BO_COLBEFORE) != 0);
+ return ((m_nOverride & BO_COLBEFORE) != 0);
}
inline bool LwpBreaksOverride::IsColumnBreakAfterOverridden() const
{
- return ((m_nOverride& BO_COLAFTER) != 0);
+ return ((m_nOverride & BO_COLAFTER) != 0);
}
inline bool LwpBreaksOverride::IsKeepWithNextOverridden() const
{
- return ((m_nOverride& BO_KEEPNEXT) != 0);
+ return ((m_nOverride & BO_KEEPNEXT) != 0);
}
inline bool LwpBreaksOverride::IsKeepWithPreviousOverridden() const
{
- return ((m_nOverride& BO_KEEPPREV) != 0);
+ return ((m_nOverride & BO_KEEPPREV) != 0);
}
inline bool LwpBreaksOverride::IsUseNextStyleOverridden() const
{
- return ((m_nOverride& BO_USENEXTSTYLE) != 0);
+ return ((m_nOverride & BO_USENEXTSTYLE) != 0);
}
inline void LwpBreaksOverride::RevertPageBreakBefore()
diff --git a/lotuswordpro/source/filter/lwpcharacterstyle.cxx b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
index eb94bb0c1840..9ed15cdd6633 100644
--- a/lotuswordpro/source/filter/lwpcharacterstyle.cxx
+++ b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
@@ -68,12 +68,15 @@
#include <xfilter/xffont.hxx>
#include <xfilter/xftextstyle.hxx>
-
/*class LwpTextStyle*/
-LwpTextStyle::LwpTextStyle(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
- : LwpDLNFPVList(objHdr, pStrm),
- m_nFontID(0), m_nFinalFontID(0), m_nCSFlags(0), m_nUseCount(0),
- m_nStyleDefinition(0), m_nKey(0)
+LwpTextStyle::LwpTextStyle(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLNFPVList(objHdr, pStrm)
+ , m_nFontID(0)
+ , m_nFinalFontID(0)
+ , m_nCSFlags(0)
+ , m_nUseCount(0)
+ , m_nStyleDefinition(0)
+ , m_nKey(0)
{
}
@@ -83,9 +86,7 @@ void LwpTextStyle::Read()
ReadCommon();
}
-LwpTextStyle::~LwpTextStyle()
-{
-}
+LwpTextStyle::~LwpTextStyle() {}
void LwpTextStyle::ReadCommon()
{
@@ -133,7 +134,6 @@ void LwpTextStyle::ReadCommon()
m_pObjStrm->SkipExtra();
}
}
-
}
void LwpTextStyle::RegisterStyle()
@@ -160,18 +160,14 @@ void LwpTextStyle::RegisterStyle()
//Add style
LwpStyleManager* pStyleMgr = m_pFoundry->GetStyleManager();
pStyleMgr->AddStyle(GetObjectID(), std::move(pStyle));
-
}
/*class LwpCharacterStyle*/
-LwpCharacterStyle::LwpCharacterStyle(LwpObjectHeader const & objHdr, LwpSvStream* pStrm) :
-LwpTextStyle(objHdr, pStrm)
+LwpCharacterStyle::LwpCharacterStyle(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpTextStyle(objHdr, pStrm)
{
}
-void LwpCharacterStyle::Read()
-{
- LwpTextStyle::Read();
-}
+void LwpCharacterStyle::Read() { LwpTextStyle::Read(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpcharborderoverride.hxx b/lotuswordpro/source/filter/lwpcharborderoverride.hxx
index 478ceed456d8..cc135f05b327 100644
--- a/lotuswordpro/source/filter/lwpcharborderoverride.hxx
+++ b/lotuswordpro/source/filter/lwpcharborderoverride.hxx
@@ -81,16 +81,16 @@ private:
LwpCharacterBorderOverride& operator=(LwpCharacterBorderOverride const& rOther) = delete;
std::unique_ptr<LwpBorderStuff> m_pBorderStuff;
- std::unique_ptr<LwpMargins> m_pMargins;
- sal_Int32 m_nAboveWidth;
- sal_Int32 m_nBelowWidth;
+ std::unique_ptr<LwpMargins> m_pMargins;
+ sal_Int32 m_nAboveWidth;
+ sal_Int32 m_nBelowWidth;
enum
{
- PBO_STUFF = 0x01,
- PBO_MARGINS = 0x04,
- PBO_ABOVE = 0x40,
- PBO_BELOW = 0x80
+ PBO_STUFF = 0x01,
+ PBO_MARGINS = 0x04,
+ PBO_ABOVE = 0x40,
+ PBO_BELOW = 0x80
};
};
diff --git a/lotuswordpro/source/filter/lwpcharsetmgr.cxx b/lotuswordpro/source/filter/lwpcharsetmgr.cxx
index 46abee27da75..493be11f9502 100644
--- a/lotuswordpro/source/filter/lwpcharsetmgr.cxx
+++ b/lotuswordpro/source/filter/lwpcharsetmgr.cxx
@@ -65,46 +65,45 @@ LwpCharSetMgr* LwpCharSetMgr::Instance = nullptr;
LwpCharSetMgr* LwpCharSetMgr::GetInstance()
{
- if (Instance == nullptr)
- Instance = new LwpCharSetMgr;
- return Instance;
+ if (Instance == nullptr)
+ Instance = new LwpCharSetMgr;
+ return Instance;
}
void LwpCharSetMgr::SetCodePageMap()
-{//sal_uInt16 wordproCode,rtl_TextEncoding encoding, tmp hardcoding, 1-18
-/* m_CodePageMap[256] =
+{ //sal_uInt16 wordproCode,rtl_TextEncoding encoding, tmp hardcoding, 1-18
+ /* m_CodePageMap[256] =
m_CodePageMap[259] =
m_CodePageMap[819] =
m_CodePageMap[921] =*/
- m_CodePageMap[437] = RTL_TEXTENCODING_ASCII_US;
- m_CodePageMap[850] = RTL_TEXTENCODING_IBM_850;
+ m_CodePageMap[437] = RTL_TEXTENCODING_ASCII_US;
+ m_CodePageMap[850] = RTL_TEXTENCODING_IBM_850;
//m_CodePageMap[851] = RTL_TEXTENCODING_IBM_851;
- m_CodePageMap[852] = RTL_TEXTENCODING_IBM_852;
- m_CodePageMap[857] = RTL_TEXTENCODING_IBM_857;
- m_CodePageMap[860] = RTL_TEXTENCODING_IBM_860;
- m_CodePageMap[863] = RTL_TEXTENCODING_IBM_863;
- m_CodePageMap[865] = RTL_TEXTENCODING_IBM_865;
- m_CodePageMap[866] = RTL_TEXTENCODING_IBM_866;
- m_CodePageMap[869] = RTL_TEXTENCODING_IBM_869;
- m_CodePageMap[874] = RTL_TEXTENCODING_MS_874;//thai
- m_CodePageMap[932] = RTL_TEXTENCODING_MS_932; //japanese
- m_CodePageMap[936] = RTL_TEXTENCODING_MS_936; //chinese simple
- m_CodePageMap[949] = RTL_TEXTENCODING_MS_949;//korean
- m_CodePageMap[950] = RTL_TEXTENCODING_BIG5;//chinese traditional
- m_CodePageMap[1250] = RTL_TEXTENCODING_MS_1250;//Central European
+ m_CodePageMap[852] = RTL_TEXTENCODING_IBM_852;
+ m_CodePageMap[857] = RTL_TEXTENCODING_IBM_857;
+ m_CodePageMap[860] = RTL_TEXTENCODING_IBM_860;
+ m_CodePageMap[863] = RTL_TEXTENCODING_IBM_863;
+ m_CodePageMap[865] = RTL_TEXTENCODING_IBM_865;
+ m_CodePageMap[866] = RTL_TEXTENCODING_IBM_866;
+ m_CodePageMap[869] = RTL_TEXTENCODING_IBM_869;
+ m_CodePageMap[874] = RTL_TEXTENCODING_MS_874; //thai
+ m_CodePageMap[932] = RTL_TEXTENCODING_MS_932; //japanese
+ m_CodePageMap[936] = RTL_TEXTENCODING_MS_936; //chinese simple
+ m_CodePageMap[949] = RTL_TEXTENCODING_MS_949; //korean
+ m_CodePageMap[950] = RTL_TEXTENCODING_BIG5; //chinese traditional
+ m_CodePageMap[1250] = RTL_TEXTENCODING_MS_1250; //Central European
m_CodePageMap[1252] = RTL_TEXTENCODING_MS_1252;
m_CodePageMap[1251] = RTL_TEXTENCODING_MS_1251; //ukrainian belarusian macedonian russian
- m_CodePageMap[1253] = RTL_TEXTENCODING_MS_1253;//greek
- m_CodePageMap[1254] = RTL_TEXTENCODING_MS_1254;//Turkish
- m_CodePageMap[1255] = RTL_TEXTENCODING_MS_1255;//hebrew
- m_CodePageMap[1256] = RTL_TEXTENCODING_MS_1256;//arabic
- m_CodePageMap[1257] = RTL_TEXTENCODING_MS_1257;//estonian
+ m_CodePageMap[1253] = RTL_TEXTENCODING_MS_1253; //greek
+ m_CodePageMap[1254] = RTL_TEXTENCODING_MS_1254; //Turkish
+ m_CodePageMap[1255] = RTL_TEXTENCODING_MS_1255; //hebrew
+ m_CodePageMap[1256] = RTL_TEXTENCODING_MS_1256; //arabic
+ m_CodePageMap[1257] = RTL_TEXTENCODING_MS_1257; //estonian
}
rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding(sal_uInt16 wordproCode)
{
- std::map<sal_uInt16,rtl_TextEncoding>::iterator
- pos = m_CodePageMap.find(wordproCode);
+ std::map<sal_uInt16, rtl_TextEncoding>::iterator pos = m_CodePageMap.find(wordproCode);
if (pos != m_CodePageMap.end())
return m_CodePageMap[wordproCode];
return GetTextCharEncoding();
diff --git a/lotuswordpro/source/filter/lwpcontent.cxx b/lotuswordpro/source/filter/lwpcontent.cxx
index 0df9f9cb7497..1c00a9e91426 100644
--- a/lotuswordpro/source/filter/lwpcontent.cxx
+++ b/lotuswordpro/source/filter/lwpcontent.cxx
@@ -61,9 +61,10 @@
#include "lwpcontent.hxx"
#include <lwpfilehdr.hxx>
-LwpHeadContent::LwpHeadContent(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpHeadContent::LwpHeadContent(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpContent(objHdr, pStrm)
-{}
+{
+}
void LwpHeadContent::Read()
{
@@ -71,7 +72,7 @@ void LwpHeadContent::Read()
m_pObjStrm->SkipExtra();
}
-LwpContent::LwpContent(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpContent::LwpContent(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpDLNFVList(objHdr, pStrm)
, m_nFlags(0)
{
@@ -90,7 +91,7 @@ void LwpContent::Read()
//ClassName.Read(pStrm);
m_ClassName.Read(pStrm);
- if(LwpFileHeader::m_nFileRevision >= 0x0006)
+ if (LwpFileHeader::m_nFileRevision >= 0x0006)
{
//SkipID.ReadIndexed(pStrm);
//SkipID.ReadIndexed(pStrm);
@@ -101,7 +102,7 @@ void LwpContent::Read()
if (LwpFileHeader::m_nFileRevision >= 0x0007)
{
LwpObjectID SkipID;
- if(LwpFileHeader::m_nFileRevision < 0x000B)
+ if (LwpFileHeader::m_nFileRevision < 0x000B)
{
SkipID.ReadIndexed(pStrm);
pStrm->SkipExtra();
@@ -109,7 +110,7 @@ void LwpContent::Read()
else
{
sal_uInt8 HasNotify = pStrm->QuickReaduInt8();
- if(HasNotify)
+ if (HasNotify)
{
SkipID.ReadIndexed(pStrm);
pStrm->SkipExtra();
@@ -120,7 +121,7 @@ void LwpContent::Read()
pStrm->SkipExtra();
}
-rtl::Reference<LwpVirtualLayout> LwpContent::GetLayout(LwpVirtualLayout const * pStartLayout)
+rtl::Reference<LwpVirtualLayout> LwpContent::GetLayout(LwpVirtualLayout const* pStartLayout)
{
return m_LayoutsWithMe.GetLayout(pStartLayout);
}
diff --git a/lotuswordpro/source/filter/lwpdivinfo.cxx b/lotuswordpro/source/filter/lwpdivinfo.cxx
index 6418694019b9..0ad20d618345 100644
--- a/lotuswordpro/source/filter/lwpdivinfo.cxx
+++ b/lotuswordpro/source/filter/lwpdivinfo.cxx
@@ -66,18 +66,17 @@
#include "lwppagehint.hxx"
#include <sal/log.hxx>
-LwpDivInfo::LwpDivInfo(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
+LwpDivInfo::LwpDivInfo(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
, m_nFlags(0)
, m_nPageNoStyle(0)
{
}
-LwpDivInfo::~LwpDivInfo(){}
+LwpDivInfo::~LwpDivInfo() {}
void LwpDivInfo::Read()
{
-
SkipFront();
m_ParentID.ReadIndexed(m_pObjStrm.get());
if (LwpFileHeader::m_nFileRevision < 0x0006)
@@ -92,7 +91,7 @@ void LwpDivInfo::Read()
m_LayoutID.ReadIndexed(m_pObjStrm.get());
m_nFlags = m_pObjStrm->QuickReaduInt16();
- if (LwpFileHeader::m_nFileRevision < 0x0010) // In 98, graphic links count too
+ if (LwpFileHeader::m_nFileRevision < 0x0010) // In 98, graphic links count too
{
if ((m_nFlags & DI_ANYOLEDDELINKS) == 0)
m_nFlags &= ~DI_KNOWIFANYOLEDDELINKS;
@@ -139,9 +138,9 @@ void LwpDivInfo::SkipFront()
}
}
-void LwpDivInfo::GetNumberOfPages(sal_uInt16 & nPageno)
+void LwpDivInfo::GetNumberOfPages(sal_uInt16& nPageno)
{
- if(IsGotoable())
+ if (IsGotoable())
{
if (IsOleDivision())
{
@@ -158,13 +157,14 @@ void LwpDivInfo::GetNumberOfPages(sal_uInt16 & nPageno)
sal_uInt16 LwpDivInfo::GetMaxNumberOfPages() const
{
LwpDocument* pDiv = dynamic_cast<LwpDocument*>(m_ParentID.obj().get());
- if(!pDiv)
+ if (!pDiv)
return 0;
- LwpDLVListHeadTailHolder* pHeadTail = dynamic_cast<LwpDLVListHeadTailHolder*>(pDiv->GetPageHintsID().obj().get());
- if(pHeadTail)
+ LwpDLVListHeadTailHolder* pHeadTail
+ = dynamic_cast<LwpDLVListHeadTailHolder*>(pDiv->GetPageHintsID().obj().get());
+ if (pHeadTail)
{
LwpPageHint* pPageHint = dynamic_cast<LwpPageHint*>(pHeadTail->GetTail().obj().get());
- if(pPageHint && !pPageHint->GetPageLayoutID().IsNull())
+ if (pPageHint && !pPageHint->GetPageLayoutID().IsNull())
{
return pPageHint->GetPageNumber();
}
diff --git a/lotuswordpro/source/filter/lwpdivinfo.hxx b/lotuswordpro/source/filter/lwpdivinfo.hxx
index e1fea74c0797..f2acb447abec 100644
--- a/lotuswordpro/source/filter/lwpdivinfo.hxx
+++ b/lotuswordpro/source/filter/lwpdivinfo.hxx
@@ -68,25 +68,27 @@
#include <lwpatomholder.hxx>
#include <lwpcolor.hxx>
-#define STR_OleDivisionClassName "OLEDivision"
+#define STR_OleDivisionClassName "OLEDivision"
class LwpDivInfo : public LwpObject
{
public:
- LwpDivInfo(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpDivInfo(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
LwpObjectID& GetInitialLayoutID() { return m_InitialLayoutID; }
LwpObjectID& GetFillerPageTextID() { return m_FillerPageTextID; }
- OUString const & GetDivName() const { return m_Name.str(); }
+ OUString const& GetDivName() const { return m_Name.str(); }
- OUString const & GetClassName() const { return m_ClassName.str(); }
+ OUString const& GetClassName() const { return m_ClassName.str(); }
inline bool HasContents() const;
inline bool IsOleDivision() const;
inline bool IsScrollable() const;
inline bool IsGotoable() const;
void GetNumberOfPages(sal_uInt16& nPageno);
sal_uInt16 GetMaxNumberOfPages() const;
+
protected:
void Read() override;
+
private:
virtual ~LwpDivInfo() override;
@@ -126,13 +128,9 @@ private:
};
void SkipFront();
-
};
-inline bool LwpDivInfo::HasContents() const
-{
- return (m_nFlags & DI_HASCONTENTS) != 0;
-}
+inline bool LwpDivInfo::HasContents() const { return (m_nFlags & DI_HASCONTENTS) != 0; }
inline bool LwpDivInfo::IsOleDivision() const
{
@@ -142,10 +140,7 @@ inline bool LwpDivInfo::IsOleDivision() const
return false;
}
-inline bool LwpDivInfo::IsScrollable() const
-{
- return (m_nFlags & DI_SCROLLABLE) != 0;
-}
+inline bool LwpDivInfo::IsScrollable() const { return (m_nFlags & DI_SCROLLABLE) != 0; }
inline bool LwpDivInfo::IsGotoable() const
{
diff --git a/lotuswordpro/source/filter/lwpdivopts.hxx b/lotuswordpro/source/filter/lwpdivopts.hxx
index 1d271f8d7d6c..effe4c2234d0 100644
--- a/lotuswordpro/source/filter/lwpdivopts.hxx
+++ b/lotuswordpro/source/filter/lwpdivopts.hxx
@@ -70,7 +70,8 @@ class LwpHyphenOptions
public:
LwpHyphenOptions();
~LwpHyphenOptions();
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
+
private:
sal_uInt16 m_nFlags;
sal_uInt16 m_nZoneBefore;
@@ -92,7 +93,8 @@ class LwpTextLanguage
public:
LwpTextLanguage();
~LwpTextLanguage();
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
+
private:
static sal_uInt16 ConvertFrom96(sal_uInt16 orgLang);
sal_uInt16 m_nLanguage;
@@ -101,9 +103,11 @@ private:
class LwpDivisionOptions : public LwpObject
{
public:
- LwpDivisionOptions(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpDivisionOptions(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
+
protected:
void Read() override;
+
private:
virtual ~LwpDivisionOptions() override;
diff --git a/lotuswordpro/source/filter/lwpdlvlist.cxx b/lotuswordpro/source/filter/lwpdlvlist.cxx
index 77431cdd03d0..79a43a38cf68 100644
--- a/lotuswordpro/source/filter/lwpdlvlist.cxx
+++ b/lotuswordpro/source/filter/lwpdlvlist.cxx
@@ -62,9 +62,10 @@
#include <lwpfilehdr.hxx>
#include "lwpproplist.hxx"
-LwpDLVList::LwpDLVList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpDLVList::LwpDLVList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
-{}
+{
+}
/**
* @descr Read LwpDLVList data from object stream
**/
@@ -72,17 +73,17 @@ void LwpDLVList::Read()
{
LwpObjectStream* pObjStrm = m_pObjStrm.get();
m_ListNext.ReadIndexed(pObjStrm);
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
pObjStrm->SkipExtra();
m_ListPrevious.ReadIndexed(pObjStrm);
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
pObjStrm->SkipExtra();
-
}
-LwpDLNFVList::LwpDLNFVList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- : LwpDLVList(objHdr, pStrm)
-{}
+LwpDLNFVList::LwpDLNFVList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLVList(objHdr, pStrm)
+{
+}
/**
* @descr Read LwpDLNFVList data from object stream
**/
@@ -93,13 +94,13 @@ void LwpDLNFVList::Read()
LwpObjectStream* pObjStrm = m_pObjStrm.get();
m_ChildHead.ReadIndexed(pObjStrm);
- if( LwpFileHeader::m_nFileRevision < 0x0006 || !m_ChildHead.IsNull() )
+ if (LwpFileHeader::m_nFileRevision < 0x0006 || !m_ChildHead.IsNull())
m_ChildTail.ReadIndexed(pObjStrm);
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
pObjStrm->SkipExtra();
m_Parent.ReadIndexed(pObjStrm);
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
pObjStrm->SkipExtra();
ReadName(pObjStrm);
@@ -110,17 +111,18 @@ void LwpDLNFVList::Read()
void LwpDLNFVList::ReadName(LwpObjectStream* pObjStrm)
{
m_Name.Read(pObjStrm);
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
pObjStrm->SkipExtra();
}
/**
* @descr ctor of LwpDLNFPVList from object stream
* Note that m_bHasProperties is initialized to true
**/
-LwpDLNFPVList::LwpDLNFPVList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- : LwpDLNFVList(objHdr, pStrm),
- m_bHasProperties(true)
-{}
+LwpDLNFPVList::LwpDLNFPVList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLNFVList(objHdr, pStrm)
+ , m_bHasProperties(true)
+{
+}
/**
* @descr Read name of LwpDLNFVList from object stream
**/
@@ -137,12 +139,12 @@ void LwpDLNFPVList::Read()
**/
void LwpDLNFPVList::ReadPropertyList(LwpObjectStream* pObjStrm)
{
- if( LwpFileHeader::m_nFileRevision >= 0x0000B)
+ if (LwpFileHeader::m_nFileRevision >= 0x0000B)
{
m_bHasProperties = pObjStrm->QuickReaduInt8() != 0;
if (m_bHasProperties)
{
- m_pPropList.reset( new LwpPropList );
+ m_pPropList.reset(new LwpPropList);
m_pPropList->Read(pObjStrm);
}
}
@@ -150,9 +152,7 @@ void LwpDLNFPVList::ReadPropertyList(LwpObjectStream* pObjStrm)
/**
* @descr release property list
**/
-LwpDLNFPVList::~LwpDLNFPVList()
-{
-}
+LwpDLNFPVList::~LwpDLNFPVList() {}
/**
* @descr Read head id and tail id
@@ -160,11 +160,11 @@ LwpDLNFPVList::~LwpDLNFPVList()
void LwpDLVListHeadTail::Read(LwpObjectStream* pObjStrm)
{
m_ListHead.ReadIndexed(pObjStrm);
- if( (LwpFileHeader::m_nFileRevision < 0x0006) || !m_ListHead.IsNull())
+ if ((LwpFileHeader::m_nFileRevision < 0x0006) || !m_ListHead.IsNull())
{
m_ListTail.ReadIndexed(pObjStrm);
}
- if( LwpFileHeader::m_nFileRevision < 0x0006)
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
{
pObjStrm->SkipExtra();
}
@@ -172,9 +172,6 @@ void LwpDLVListHeadTail::Read(LwpObjectStream* pObjStrm)
/**
* @descr Read head id
**/
-void LwpDLVListHead::Read(LwpObjectStream* pObjStrm)
-{
- m_objHead.ReadIndexed(pObjStrm);
-}
+void LwpDLVListHead::Read(LwpObjectStream* pObjStrm) { m_objHead.ReadIndexed(pObjStrm); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpdlvlist.hxx b/lotuswordpro/source/filter/lwpdlvlist.hxx
index 19f8ff7a5253..0c93818cb95f 100644
--- a/lotuswordpro/source/filter/lwpdlvlist.hxx
+++ b/lotuswordpro/source/filter/lwpdlvlist.hxx
@@ -71,12 +71,14 @@
class LwpDLVList : public LwpObject
{
public:
- LwpDLVList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpDLVList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
LwpObjectID& GetNext() { return m_ListNext; }
LwpObjectID& GetPrevious() { return m_ListPrevious; }
+
protected:
virtual ~LwpDLVList() override {}
void Read() override;
+
private:
LwpObjectID m_ListPrevious;
LwpObjectID m_ListNext;
@@ -88,7 +90,8 @@ private:
class LwpDLNFVList : public LwpDLVList
{
public:
- LwpDLNFVList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpDLNFVList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
+
protected:
virtual ~LwpDLNFVList() override {}
@@ -96,9 +99,11 @@ protected:
LwpObjectID m_ChildTail;
LwpObjectID m_Parent;
LwpAtomHolder m_Name;
+
protected:
void Read() override;
void ReadName(LwpObjectStream* pObjStrm);
+
public:
LwpAtomHolder& GetName() { return m_Name; }
LwpObjectID& GetChildHead() { return m_ChildHead; }
@@ -106,7 +111,6 @@ public:
LwpObjectID& GetParent() { return m_Parent; }
};
-
class LwpPropList;
/**
* @brief Double Linked Named Family Properties Virtual List
@@ -114,12 +118,14 @@ class LwpPropList;
class LwpDLNFPVList : public LwpDLNFVList
{
public:
- LwpDLNFPVList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpDLNFPVList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpDLNFPVList() override;
LwpPropList* GetPropList() { return m_pPropList.get(); }
+
protected:
void Read() override;
void ReadPropertyList(LwpObjectStream* pObjStrm);
+
private:
bool m_bHasProperties;
std::unique_ptr<LwpPropList> m_pPropList;
@@ -131,11 +137,13 @@ private:
class LwpDLVListHeadTail
{
public:
- LwpDLVListHeadTail(){}
+ LwpDLVListHeadTail() {}
void Read(LwpObjectStream* pObjStrm);
+
private:
LwpObjectID m_ListHead;
LwpObjectID m_ListTail;
+
public:
LwpObjectID& GetHead() { return m_ListHead; }
LwpObjectID& GetTail() { return m_ListTail; }
@@ -147,11 +155,12 @@ public:
class LwpDLVListHead
{
public:
- LwpDLVListHead(){}
+ LwpDLVListHead() {}
void Read(LwpObjectStream* pObjStrm);
LwpObjectID& GetFirst() { return m_objHead; }
+
private:
- LwpObjectID m_objHead;//LwpDLVList
+ LwpObjectID m_objHead; //LwpDLVList
};
#endif
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index 7dc59e13e75a..c09d670b150c 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -73,7 +73,7 @@
#include <xfilter/xfstylemanager.hxx>
#include <o3tl/sorted_vector.hxx>
-LwpDocument::LwpDocument(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
+LwpDocument::LwpDocument(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpDLNFPVList(objHdr, pStrm)
, m_bGettingFirstDivisionWithContentsThatIsNotOLE(false)
, m_bGettingPreviousDivisionWithContents(false)
@@ -83,9 +83,7 @@ LwpDocument::LwpDocument(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
{
}
-LwpDocument::~LwpDocument()
-{
-}
+LwpDocument::~LwpDocument() {}
/**
* @descr Read VO_Document from object stream
**/
@@ -99,28 +97,28 @@ void LwpDocument::Read()
//Skip the SortOption and UIDocument
{
- LwpSortOption aDocSort( m_pObjStrm.get() );
- LwpUIDocument aUIDoc( m_pObjStrm.get() );
+ LwpSortOption aDocSort(m_pObjStrm.get());
+ LwpUIDocument aUIDoc(m_pObjStrm.get());
}
m_xLnOpts.reset(new LwpLineNumberOptions(m_pObjStrm.get()));
//Skip LwpUserDictFiles
{
- LwpUserDictFiles aUsrDicts( m_pObjStrm.get() );
+ LwpUserDictFiles aUsrDicts(m_pObjStrm.get());
}
- if( !IsChildDoc())
+ if (!IsChildDoc())
{
//Skip LwpPrinterInfo
- LwpPrinterInfo aPrtInfo( m_pObjStrm.get() );
+ LwpPrinterInfo aPrtInfo(m_pObjStrm.get());
}
m_xOwnedFoundry.reset(new LwpFoundry(m_pObjStrm.get(), this));
m_DivOpts.ReadIndexed(m_pObjStrm.get());
- if(!IsChildDoc())
+ if (!IsChildDoc())
{
m_FootnoteOpts.ReadIndexed(m_pObjStrm.get());
m_DocData.ReadIndexed(m_pObjStrm.get());
@@ -161,8 +159,8 @@ void LwpDocument::Parse(IXFStream* pOutputStream)
ParseDocContent(pOutputStream);
}
- rtl::Reference<LwpObject> pDocSock = GetSocket().obj( VO_DOCSOCK );
- if(pDocSock.is())
+ rtl::Reference<LwpObject> pDocSock = GetSocket().obj(VO_DOCSOCK);
+ if (pDocSock.is())
{
pDocSock->DoParse(pOutputStream);
}
@@ -180,21 +178,22 @@ bool LwpDocument::IsSkippedDivision()
return true;
//skip endnote division
OUString strClassName = pDiv->GetClassName();
- if ((strClassName == STR_DivisionEndnote)
- || (strClassName == STR_DivisionGroupEndnote)
+ if ((strClassName == STR_DivisionEndnote) || (strClassName == STR_DivisionGroupEndnote)
|| (strClassName == STR_DocumentEndnote))
{
- LwpPageLayout* pPageLayout = dynamic_cast<LwpPageLayout*>(pDiv->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
- if(pPageLayout)
+ LwpPageLayout* pPageLayout
+ = dynamic_cast<LwpPageLayout*>(pDiv->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
+ if (pPageLayout)
{
- LwpStory* pStory = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj(VO_STORY).get());
- if(pStory)
+ LwpStory* pStory
+ = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj(VO_STORY).get());
+ if (pStory)
{
//This judgement maybe have problem. If there is only one para in the story,
//this endnote division has no other contents except endnote table.
LwpObjectID& rFirst = pStory->GetFirstPara();
LwpObjectID& rLast = pStory->GetLastPara();
- if(rFirst == rLast)
+ if (rFirst == rLast)
ret = true;
}
}
@@ -220,7 +219,7 @@ void LwpDocument::RegisterStyle()
//Register styles in other document connected with this document: next doc, children doc
rtl::Reference<LwpObject> pDocSock = GetSocket().obj();
- if(pDocSock.is())
+ if (pDocSock.is())
{
pDocSock->DoRegisterStyle();
}
@@ -231,13 +230,15 @@ void LwpDocument::RegisterStyle()
void LwpDocument::RegisterTextStyles()
{
//Register all text styles: para styles, character styles
- LwpDLVListHeadHolder* pTextStyleHolder = m_xOwnedFoundry
- ? dynamic_cast<LwpDLVListHeadHolder*>(m_xOwnedFoundry->GetTextStyleHead().obj().get())
- : nullptr;
- if(pTextStyleHolder)
- {
- LwpTextStyle* pTextStyle = dynamic_cast<LwpTextStyle*> (pTextStyleHolder->GetHeadID().obj().get());
- while(pTextStyle)
+ LwpDLVListHeadHolder* pTextStyleHolder
+ = m_xOwnedFoundry
+ ? dynamic_cast<LwpDLVListHeadHolder*>(m_xOwnedFoundry->GetTextStyleHead().obj().get())
+ : nullptr;
+ if (pTextStyleHolder)
+ {
+ LwpTextStyle* pTextStyle
+ = dynamic_cast<LwpTextStyle*>(pTextStyleHolder->GetHeadID().obj().get());
+ while (pTextStyle)
{
if (pTextStyle->GetFoundry())
throw std::runtime_error("loop in register text style");
@@ -246,7 +247,7 @@ void LwpDocument::RegisterTextStyles()
pTextStyle = dynamic_cast<LwpTextStyle*>(pTextStyle->GetNext().obj().get());
}
}
- ChangeStyleName();//for click here block
+ ChangeStyleName(); //for click here block
}
/**
* @descr Register all layouts styles (page master and master page)
@@ -261,16 +262,17 @@ void LwpDocument::RegisterLayoutStyles()
}
//set initial pagelayout in story for parsing pagelayout
- LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*> (m_DivInfo.obj( VO_DIVISIONINFO).get());
+ LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(m_DivInfo.obj(VO_DIVISIONINFO).get());
if (!pDivInfo)
return;
- LwpPageLayout* pPageLayout = dynamic_cast<LwpPageLayout*>(pDivInfo->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
- if(pPageLayout)
+ LwpPageLayout* pPageLayout
+ = dynamic_cast<LwpPageLayout*>(pDivInfo->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
+ if (pPageLayout)
{
//In Ole division, the content of pagelayout is VO_OLEOBJECT
LwpStory* pStory = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj(VO_STORY).get());
- if(pStory)
+ if (pStory)
{
//add all the pagelayout in order into the pagelayout list;
pStory->SortPageLayout();
@@ -284,13 +286,15 @@ void LwpDocument::RegisterLayoutStyles()
void LwpDocument::RegisterStylesInPara()
{
//Register all automatic styles in para
- rtl::Reference<LwpHeadContent> xContent(m_xOwnedFoundry
- ? dynamic_cast<LwpHeadContent*> (m_xOwnedFoundry->GetContentManager().GetContentList().obj().get())
- : nullptr);
+ rtl::Reference<LwpHeadContent> xContent(
+ m_xOwnedFoundry ? dynamic_cast<LwpHeadContent*>(
+ m_xOwnedFoundry->GetContentManager().GetContentList().obj().get())
+ : nullptr);
if (!xContent.is())
return;
- rtl::Reference<LwpStory> xStory(dynamic_cast<LwpStory*>(xContent->GetChildHead().obj(VO_STORY).get()));
+ rtl::Reference<LwpStory> xStory(
+ dynamic_cast<LwpStory*>(xContent->GetChildHead().obj(VO_STORY).get()));
o3tl::sorted_vector<LwpStory*> aSeen;
while (xStory.is())
{
@@ -311,19 +315,18 @@ void LwpDocument::RegisterBulletStyles()
if (!m_xOwnedFoundry)
return;
//Register bullet styles
- LwpDLVListHeadHolder* pBulletHead = dynamic_cast<LwpDLVListHeadHolder*>
- (m_xOwnedFoundry->GetBulletManagerID().obj(VO_HEADHOLDER).get());
+ LwpDLVListHeadHolder* pBulletHead = dynamic_cast<LwpDLVListHeadHolder*>(
+ m_xOwnedFoundry->GetBulletManagerID().obj(VO_HEADHOLDER).get());
if (!pBulletHead)
return;
- LwpSilverBullet* pBullet = dynamic_cast<LwpSilverBullet*>
- (pBulletHead->GetHeadID().obj().get());
+ LwpSilverBullet* pBullet = dynamic_cast<LwpSilverBullet*>(pBulletHead->GetHeadID().obj().get());
o3tl::sorted_vector<LwpSilverBullet*> aSeen;
while (pBullet)
{
aSeen.insert(pBullet);
pBullet->SetFoundry(m_xOwnedFoundry.get());
pBullet->RegisterStyle();
- pBullet = dynamic_cast<LwpSilverBullet*> (pBullet->GetNext().obj().get());
+ pBullet = dynamic_cast<LwpSilverBullet*>(pBullet->GetNext().obj().get());
if (aSeen.find(pBullet) != aSeen.end())
throw std::runtime_error("loop in conversion");
}
@@ -358,9 +361,10 @@ void LwpDocument::RegisterLinenumberStyles()
void LwpDocument::RegisterFootnoteStyles()
{
//Register footnote and endnote configuration for the entire document
- if(!m_FootnoteOpts.IsNull())
+ if (!m_FootnoteOpts.IsNull())
{
- LwpFootnoteOptions* pFootnoteOpts = dynamic_cast<LwpFootnoteOptions*>(m_FootnoteOpts.obj().get());
+ LwpFootnoteOptions* pFootnoteOpts
+ = dynamic_cast<LwpFootnoteOptions*>(m_FootnoteOpts.obj().get());
if (pFootnoteOpts)
{
pFootnoteOpts->SetMasterPage("Endnote");
@@ -370,18 +374,20 @@ void LwpDocument::RegisterFootnoteStyles()
//Register endnote page style for endnote configuration, use the last division that has endnote for the endnote page style
//This page style must register after its division default styles have registered
LwpDocument* pEndnoteDiv = GetLastDivisionThatHasEndnote();
- if(this != pEndnoteDiv)
+ if (this != pEndnoteDiv)
return;
- LwpDLVListHeadTailHolder* pHeadTail = dynamic_cast<LwpDLVListHeadTailHolder*>(GetPageHintsID().obj().get());
- if(!pHeadTail)
+ LwpDLVListHeadTailHolder* pHeadTail
+ = dynamic_cast<LwpDLVListHeadTailHolder*>(GetPageHintsID().obj().get());
+ if (!pHeadTail)
return;
LwpPageHint* pPageHint = dynamic_cast<LwpPageHint*>(pHeadTail->GetTail().obj().get());
- if(pPageHint && !pPageHint->GetPageLayoutID().IsNull())
+ if (pPageHint && !pPageHint->GetPageLayoutID().IsNull())
{
- LwpPageLayout* pPageLayout = dynamic_cast<LwpPageLayout*>(pPageHint->GetPageLayoutID().obj().get());
- if(pPageLayout)
+ LwpPageLayout* pPageLayout
+ = dynamic_cast<LwpPageLayout*>(pPageHint->GetPageLayoutID().obj().get());
+ if (pPageLayout)
{
pPageLayout->SetFoundry(GetFoundry());
pPageLayout->RegisterEndnoteStyle();
@@ -394,16 +400,16 @@ void LwpDocument::RegisterFootnoteStyles()
*/
void LwpDocument::RegisterDefaultParaStyles()
{
- if(IsChildDoc())
+ if (IsChildDoc())
return;
//Get First Division
//LwpDocument* pFirstDoc = GetFirstDivision();
LwpDocument* pFirstDoc = GetFirstDivisionWithContentsThatIsNotOLE();
- if(pFirstDoc)
+ if (pFirstDoc)
{
LwpVerDocument* pVerDoc = dynamic_cast<LwpVerDocument*>(pFirstDoc->GetVerDoc().obj().get());
- if(pVerDoc)
+ if (pVerDoc)
{
pVerDoc->RegisterStyle();
}
@@ -417,11 +423,12 @@ void LwpDocument::RegisterDefaultParaStyles()
void LwpDocument::ParseDocContent(IXFStream* pOutputStream)
{
//Parse content in PageLayout
- LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*> (m_DivInfo.obj().get());
- if(pDivInfo==nullptr) return;
+ LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(m_DivInfo.obj().get());
+ if (pDivInfo == nullptr)
+ return;
rtl::Reference<LwpObject> pLayoutObj = pDivInfo->GetInitialLayoutID().obj();
- if(!pLayoutObj.is())
+ if (!pLayoutObj.is())
{
//master document not supported now.
return;
@@ -436,7 +443,7 @@ void LwpDocument::ParseDocContent(IXFStream* pOutputStream)
LwpObjectID* LwpDocument::GetValidFootnoteOpts()
{
LwpDocument* pRoot = GetRootDocument();
- if(pRoot)
+ if (pRoot)
{
return &pRoot->GetFootnoteOpts();
}
@@ -466,7 +473,7 @@ sal_uInt16 LwpDocument::GetEndnoteType()
LwpDocument* LwpDocument::GetPreviousDivision()
{
LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
- if(pDocSock)
+ if (pDocSock)
{
return dynamic_cast<LwpDocument*>(pDocSock->GetPrevious().obj().get());
}
@@ -475,10 +482,10 @@ LwpDocument* LwpDocument::GetPreviousDivision()
/**
* @descr Get next division
*/
- LwpDocument* LwpDocument::GetNextDivision()
+LwpDocument* LwpDocument::GetNextDivision()
{
LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
- if(pDocSock)
+ if (pDocSock)
{
return dynamic_cast<LwpDocument*>(pDocSock->GetNext().obj().get());
}
@@ -487,10 +494,10 @@ LwpDocument* LwpDocument::GetPreviousDivision()
/**
* @descr Get parent division
*/
- LwpDocument* LwpDocument::GetParentDivision()
+LwpDocument* LwpDocument::GetParentDivision()
{
LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
- if(pDocSock)
+ if (pDocSock)
{
return dynamic_cast<LwpDocument*>(pDocSock->GetParent().obj().get());
}
@@ -499,14 +506,14 @@ LwpDocument* LwpDocument::GetPreviousDivision()
/**
* @descr Get previous division in group, copy from lwp source code
*/
- LwpDocument* LwpDocument::GetPreviousInGroup()
+LwpDocument* LwpDocument::GetPreviousInGroup()
{
LwpDocument* pPrev = nullptr;
for (pPrev = GetPreviousDivision(); pPrev; pPrev = pPrev->GetPreviousDivision())
{
LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pPrev->GetDivInfoID().obj().get());
- if(pDivInfo && pDivInfo->HasContents())
+ if (pDivInfo && pDivInfo->HasContents())
return pPrev;
}
return nullptr;
@@ -514,14 +521,14 @@ LwpDocument* LwpDocument::GetPreviousDivision()
/**
* @descr Get previous division in group, copy from lwp source code
*/
- LwpDocument* LwpDocument::GetNextInGroup()
+LwpDocument* LwpDocument::GetNextInGroup()
{
LwpDocument* pNext = nullptr;
for (pNext = GetNextDivision(); pNext; pNext = pNext->GetNextDivision())
{
LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pNext->GetDivInfoID().obj().get());
- if(pDivInfo && pDivInfo->HasContents())
+ if (pDivInfo && pDivInfo->HasContents())
return pNext;
}
@@ -583,10 +590,10 @@ LwpDocument* LwpDocument::GetLastDivisionWithContents()
m_bGettingGetLastDivisionWithContents = false;
return pRet;
}
- /**
+/**
* @descr Get last division in group which has contents, copy from lwp source code
*/
- LwpDocument* LwpDocument::GetLastInGroupWithContents()
+LwpDocument* LwpDocument::GetLastInGroupWithContents()
{
LwpDocument* pLast = nullptr;
LwpDocument* pNext = this;
@@ -602,39 +609,39 @@ LwpDocument* LwpDocument::GetLastDivisionWithContents()
return pLast;
return nullptr;
}
- /**
+/**
* @descr Get last division
*/
- LwpDocument* LwpDocument::GetLastDivision()
+LwpDocument* LwpDocument::GetLastDivision()
{
LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
- if(pDocSock)
+ if (pDocSock)
return dynamic_cast<LwpDocument*>(pDocSock->GetChildTail().obj().get());
return nullptr;
}
- /**
+/**
* @descr Get first division
*/
- LwpDocument* LwpDocument::GetFirstDivision()
+LwpDocument* LwpDocument::GetFirstDivision()
{
LwpDocSock* pDocSock = dynamic_cast<LwpDocSock*>(GetSocket().obj().get());
- if(pDocSock)
+ if (pDocSock)
return dynamic_cast<LwpDocument*>(pDocSock->GetChildHead().obj().get());
return nullptr;
}
- /**
+/**
* @descr Get root document
*/
- LwpDocument* LwpDocument::GetRootDocument()
+LwpDocument* LwpDocument::GetRootDocument()
{
LwpDocument* pRoot = this;
o3tl::sorted_vector<LwpDocument*> aSeen;
while (pRoot)
{
aSeen.insert(pRoot);
- if(!pRoot->IsChildDoc())
+ if (!pRoot->IsChildDoc())
return pRoot;
pRoot = pRoot->GetParentDivision();
if (aSeen.find(pRoot) != aSeen.end())
@@ -642,14 +649,13 @@ LwpDocument* LwpDocument::GetLastDivisionWithContents()
}
return nullptr;
}
- /**
+/**
* @descr Get first division with contents that is not ole, copy from lwp-source code
*/
- LwpDocument* LwpDocument::ImplGetFirstDivisionWithContentsThatIsNotOLE()
+LwpDocument* LwpDocument::ImplGetFirstDivisionWithContentsThatIsNotOLE()
{
LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj().get());
- if(pDivInfo && pDivInfo->HasContents()
- && !pDivInfo->IsOleDivision())
+ if (pDivInfo && pDivInfo->HasContents() && !pDivInfo->IsOleDivision())
return this;
LwpDocument* pDivision = GetFirstDivision();
@@ -666,13 +672,13 @@ LwpDocument* LwpDocument::GetLastDivisionWithContents()
}
return nullptr;
}
- /**
+/**
* @descr Get last division that has endnote
*/
- LwpDocument* LwpDocument::GetLastDivisionThatHasEndnote()
+LwpDocument* LwpDocument::GetLastDivisionThatHasEndnote()
{
LwpDocument* pRoot = GetRootDocument();
- LwpDocument *pLastDoc = pRoot ? pRoot->GetLastDivisionWithContents() : nullptr;
+ LwpDocument* pLastDoc = pRoot ? pRoot->GetLastDivisionWithContents() : nullptr;
o3tl::sorted_vector<LwpDocument*> aSeen;
while (pLastDoc)
{
@@ -684,15 +690,15 @@ LwpDocument* LwpDocument::GetLastDivisionWithContents()
throw std::runtime_error("loop in conversion");
}
return nullptr;
-
}
- /**
+/**
* @descr Get endnote supertable layout, every division has only one endnote supertable layout.
*/
rtl::Reference<LwpVirtualLayout> LwpDocument::GetEnSuperTableLayout()
{
- LwpHeadLayout* pHeadLayout = dynamic_cast<LwpHeadLayout*>(GetFoundry()->GetLayout().obj().get());
- if(pHeadLayout)
+ LwpHeadLayout* pHeadLayout
+ = dynamic_cast<LwpHeadLayout*>(GetFoundry()->GetLayout().obj().get());
+ if (pHeadLayout)
{
return pHeadLayout->FindEnSuperTableLayout();
}
@@ -704,22 +710,21 @@ rtl::Reference<LwpVirtualLayout> LwpDocument::GetEnSuperTableLayout()
*/
bool LwpDocument::GetNumberOfPages(LwpDocument* pEndDivision, sal_uInt16& nCount)
{
- if(this == pEndDivision)
+ if (this == pEndDivision)
return true;
LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(m_DivInfo.obj().get());
- if(pDivInfo)
+ if (pDivInfo)
{
pDivInfo->GetNumberOfPages(nCount);
}
LwpDocument* pDivision = GetFirstDivision();
- while(pDivision)
+ while (pDivision)
{
- if(pDivision->GetNumberOfPages(pEndDivision,nCount))
+ if (pDivision->GetNumberOfPages(pEndDivision, nCount))
return true;
pDivision = pDivision->GetNextDivision();
-
}
return false;
}
@@ -730,16 +735,16 @@ sal_uInt16 LwpDocument::GetNumberOfPagesBefore()
{
sal_uInt16 nPageNumber = 0;
LwpDocument* pRoot = GetRootDocument();
- if(pRoot)
- pRoot->GetNumberOfPages(this,nPageNumber);
+ if (pRoot)
+ pRoot->GetNumberOfPages(this, nPageNumber);
return nPageNumber;
}
- /**
+/**
* @descr Parse the frame which anchor is to page before parse other contents,
* This method is called when the document is root document.
*/
-void LwpDocument::ParseFrameInPage(IXFStream * pOutputStream)
+void LwpDocument::ParseFrameInPage(IXFStream* pOutputStream)
{
if (IsChildDoc())
return;
@@ -749,31 +754,32 @@ void LwpDocument::ParseFrameInPage(IXFStream * pOutputStream)
xXFContainer->ToXml(pOutputStream);
}
- /**
+/**
* @descr Parse the frame which anchor is to page in the entire document
*/
-void LwpDocument::XFConvertFrameInPage(XFContentContainer * pCont)
+void LwpDocument::XFConvertFrameInPage(XFContentContainer* pCont)
{
LwpDocument* pDivision = GetFirstDivision();
- LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*> (GetDivInfoID().obj().get());
- if(pDivInfo)
+ LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(GetDivInfoID().obj().get());
+ if (pDivInfo)
{
- LwpPageLayout* pPageLayout = dynamic_cast<LwpPageLayout*>(pDivInfo->GetInitialLayoutID().obj().get());
- if(pPageLayout)
+ LwpPageLayout* pPageLayout
+ = dynamic_cast<LwpPageLayout*>(pDivInfo->GetInitialLayoutID().obj().get());
+ if (pPageLayout)
{
LwpStory* pStory = dynamic_cast<LwpStory*>(pPageLayout->GetContent().obj().get());
- if(pStory)
+ if (pStory)
pStory->XFConvertFrameInPage(pCont);
}
}
- while(pDivision)
+ while (pDivision)
{
pDivision->XFConvertFrameInPage(pCont);
pDivision = pDivision->GetNextDivision();
}
}
- /**
+/**
* @descr change click here to placeholder
*/
void LwpDocument::ChangeStyleName()
@@ -785,11 +791,12 @@ void LwpDocument::ChangeStyleName()
pStyle->SetStyleName("Placeholder");
}
}
-LwpDocSock::LwpDocSock(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
- :LwpDLNFVList(objHdr, pStrm)
-{}
+LwpDocSock::LwpDocSock(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLNFVList(objHdr, pStrm)
+{
+}
- /**
+/**
* @descr read VO_DOCSOCK from file
*/
void LwpDocSock::Read()
@@ -798,30 +805,30 @@ void LwpDocSock::Read()
m_Doc.ReadIndexed(m_pObjStrm.get());
m_pObjStrm->SkipExtra();
}
- /**
+/**
* @descr register styles in documents plugged
*/
void LwpDocSock::RegisterStyle()
{
rtl::Reference<LwpObject> pDoc = GetNext().obj();
- if(pDoc.is())
+ if (pDoc.is())
pDoc->DoRegisterStyle();
pDoc = GetChildHead().obj();
- if(pDoc.is())
+ if (pDoc.is())
pDoc->DoRegisterStyle();
}
- /**
+/**
* @descr parse contents of documents plugged
*/
void LwpDocSock::Parse(IXFStream* pOutputStream)
{
rtl::Reference<LwpObject> pDoc = GetChildHead().obj();
- if(pDoc.is())
+ if (pDoc.is())
pDoc->DoParse(pOutputStream);
pDoc = GetNext().obj();
- if(pDoc.is())
+ if (pDoc.is())
pDoc->DoParse(pOutputStream);
}
diff --git a/lotuswordpro/source/filter/lwpdoc.hxx b/lotuswordpro/source/filter/lwpdoc.hxx
index 3e9b101dbc0a..155e5f85570b 100644
--- a/lotuswordpro/source/filter/lwpdoc.hxx
+++ b/lotuswordpro/source/filter/lwpdoc.hxx
@@ -74,7 +74,7 @@ class LwpVirtualLayout;
class LwpDocument : public LwpDLNFPVList
{
public:
- LwpDocument(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpDocument(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpDocument() override;
private:
@@ -90,7 +90,7 @@ private:
enum
{
DOC_PROTECTED = 0x00000004UL,
- DOC_CHILDDOC = 0x00000800UL
+ DOC_CHILDDOC = 0x00000800UL
};
std::unique_ptr<LwpLineNumberOptions> m_xLnOpts;
@@ -172,42 +172,18 @@ private:
bool IsSkippedDivision();
};
-inline bool LwpDocument::IsChildDoc() const
-{
- return (m_nPersistentFlags & DOC_CHILDDOC) != 0;
-}
+inline bool LwpDocument::IsChildDoc() const { return (m_nPersistentFlags & DOC_CHILDDOC) != 0; }
inline bool LwpDocument::GetHonorProtection() const
{
return (m_nPersistentFlags & DOC_PROTECTED) != 0;
}
-inline LwpObjectID& LwpDocument::GetSocket()
-{
- return m_DocSockID;
-}
-inline LwpFoundry* LwpDocument::GetFoundry()
-{
- return m_xOwnedFoundry.get();
-}
-inline LwpObjectID& LwpDocument::GetDivInfoID()
-{
- return m_DivInfo;
-}
-inline LwpObjectID& LwpDocument::GetPageHintsID()
-{
- return m_WYSIWYGPageHints;
-}
-inline LwpObjectID& LwpDocument::GetFootnoteOpts()
-{
- return m_FootnoteOpts;
-}
-inline LwpObjectID& LwpDocument::GetDocData()
-{
- return m_DocData;
-}
-inline LwpObjectID& LwpDocument::GetVerDoc()
-{
- return m_VerDoc;
-}
+inline LwpObjectID& LwpDocument::GetSocket() { return m_DocSockID; }
+inline LwpFoundry* LwpDocument::GetFoundry() { return m_xOwnedFoundry.get(); }
+inline LwpObjectID& LwpDocument::GetDivInfoID() { return m_DivInfo; }
+inline LwpObjectID& LwpDocument::GetPageHintsID() { return m_WYSIWYGPageHints; }
+inline LwpObjectID& LwpDocument::GetFootnoteOpts() { return m_FootnoteOpts; }
+inline LwpObjectID& LwpDocument::GetDocData() { return m_DocData; }
+inline LwpObjectID& LwpDocument::GetVerDoc() { return m_VerDoc; }
/**
* @brief DocumentSock object, divisions are embedded by document socket object
@@ -215,11 +191,14 @@ inline LwpObjectID& LwpDocument::GetVerDoc()
class LwpDocSock : public LwpDLNFVList
{
public:
- LwpDocSock(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpDocSock(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
+
private:
LwpObjectID m_Doc;
+
protected:
void Read() override;
+
public:
void RegisterStyle() override;
void Parse(IXFStream* pOutputStream) override;
diff --git a/lotuswordpro/source/filter/lwpdropcapmgr.cxx b/lotuswordpro/source/filter/lwpdropcapmgr.cxx
index f091e771456a..816618bfc204 100644
--- a/lotuswordpro/source/filter/lwpdropcapmgr.cxx
+++ b/lotuswordpro/source/filter/lwpdropcapmgr.cxx
@@ -60,18 +60,10 @@
#include <lwpdropcapmgr.hxx>
-LwpDropcapMgr::LwpDropcapMgr()
-{
- m_pXFPara = nullptr;
-}
+LwpDropcapMgr::LwpDropcapMgr() { m_pXFPara = nullptr; }
-LwpDropcapMgr::~LwpDropcapMgr()
-{
-}
+LwpDropcapMgr::~LwpDropcapMgr() {}
-void LwpDropcapMgr::SetXFPara(XFParagraph* pXFPara)
-{
- m_pXFPara = pXFPara;
-}
+void LwpDropcapMgr::SetXFPara(XFParagraph* pXFPara) { m_pXFPara = pXFPara; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpfilehdr.cxx b/lotuswordpro/source/filter/lwpfilehdr.cxx
index eea66bf22c83..e0cb0bc5d0cc 100644
--- a/lotuswordpro/source/filter/lwpfilehdr.cxx
+++ b/lotuswordpro/source/filter/lwpfilehdr.cxx
@@ -60,26 +60,30 @@
sal_uInt16 LwpFileHeader::m_nFileRevision = 0;
LwpFileHeader::LwpFileHeader()
- :m_nAppRevision(0),
- m_nAppReleaseNo(0), m_nRequiredAppRevision(0), m_nRequiredFileRevision(0),
- m_cDocumentID(), m_nRootIndexOffset(0)
-{}
+ : m_nAppRevision(0)
+ , m_nAppReleaseNo(0)
+ , m_nRequiredAppRevision(0)
+ , m_nRequiredFileRevision(0)
+ , m_cDocumentID()
+ , m_nRootIndexOffset(0)
+{
+}
/**
* @descr read file header object from svstream
*/
-void LwpFileHeader::Read(LwpSvStream *pStrm)
+void LwpFileHeader::Read(LwpSvStream* pStrm)
{
- pStrm->ReadUInt16( m_nAppRevision );
- pStrm->ReadUInt16( m_nFileRevision );
- pStrm->ReadUInt16( m_nAppReleaseNo );
- pStrm->ReadUInt16( m_nRequiredAppRevision );
- pStrm->ReadUInt16( m_nRequiredFileRevision );
+ pStrm->ReadUInt16(m_nAppRevision);
+ pStrm->ReadUInt16(m_nFileRevision);
+ pStrm->ReadUInt16(m_nAppReleaseNo);
+ pStrm->ReadUInt16(m_nRequiredAppRevision);
+ pStrm->ReadUInt16(m_nRequiredFileRevision);
m_cDocumentID.Read(pStrm);
if (m_nFileRevision < 0x000B)
m_nRootIndexOffset = BAD_OFFSET;
else
{
- pStrm->ReadUInt32( m_nRootIndexOffset );
+ pStrm->ReadUInt32(m_nRootIndexOffset);
}
}
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index a86fc4368204..ebffb74c0f4e 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star;
- /**
+/**
* @descr decompressed small file
* @param pCompressed - real file stream
* @param pDecompressed - file decompressed, create inside, caller should delete it
@@ -85,7 +85,7 @@ using namespace ::com::sun::star;
#include "bento.hxx"
using namespace OpenStormBento;
#include "explode.hxx"
-static bool Decompress(SvStream *pCompressed, SvStream * & pOutDecompressed)
+static bool Decompress(SvStream* pCompressed, SvStream*& pOutDecompressed)
{
pCompressed->Seek(0);
std::unique_ptr<SvMemoryStream> aDecompressed(new SvMemoryStream(4096, 4096));
@@ -101,14 +101,15 @@ static bool Decompress(SvStream *pCompressed, SvStream * & pOutDecompressed)
return false;
}
- std::unique_ptr<LtcUtBenValueStream> aWordProData(pBentoContainer->FindValueStreamWithPropertyName("WordProData"));
+ std::unique_ptr<LtcUtBenValueStream> aWordProData(
+ pBentoContainer->FindValueStreamWithPropertyName("WordProData"));
if (!aWordProData)
return false;
// decompressing
Decompression decompress(aWordProData.get(), aDecompressed.get());
- if (0!= decompress.explode())
+ if (0 != decompress.explode())
return false;
sal_uInt32 nPos = aWordProData->GetSize();
@@ -126,20 +127,20 @@ static bool Decompress(SvStream *pCompressed, SvStream * & pOutDecompressed)
return true;
}
- /**
+/**
* @descr Get LwpSvStream, if small file, both compressed/decompressed stream
* Otherwise, only normal stream
* @param pStream - real file stream
* @param LwpSvStream * , created inside, deleted outside
* @param sal_Bool, sal_True -
*/
-static bool GetLwpSvStream(SvStream *pStream, LwpSvStream * & pLwpSvStream)
+static bool GetLwpSvStream(SvStream* pStream, LwpSvStream*& pLwpSvStream)
{
- SvStream * pDecompressed = nullptr;
+ SvStream* pDecompressed = nullptr;
pStream->Seek(0x10);
sal_uInt32 nTag(0);
- pStream->ReadUInt32( nTag );
+ pStream->ReadUInt32(nTag);
if (nTag != 0x3750574c) // "LWP7"
{
// small file, needs decompression
@@ -156,28 +157,29 @@ static bool GetLwpSvStream(SvStream *pStream, LwpSvStream * & pLwpSvStream)
bool bCompressed = false;
if (pDecompressed)
{
- LwpSvStream *pOriginalLwpSvStream = new LwpSvStream(pStream);
- pLwpSvStream = new LwpSvStream(pDecompressed, pOriginalLwpSvStream);
+ LwpSvStream* pOriginalLwpSvStream = new LwpSvStream(pStream);
+ pLwpSvStream = new LwpSvStream(pDecompressed, pOriginalLwpSvStream);
bCompressed = true;
}
else
{
- pLwpSvStream = new LwpSvStream(pStream);
+ pLwpSvStream = new LwpSvStream(pStream);
}
return bCompressed;
}
-int ReadWordproFile(SvStream &rStream, uno::Reference<css::xml::sax::XDocumentHandler> const & xHandler)
+int ReadWordproFile(SvStream& rStream,
+ uno::Reference<css::xml::sax::XDocumentHandler> const& xHandler)
{
int nRet = 0;
try
{
- LwpSvStream *pRawLwpSvStream = nullptr;
+ LwpSvStream* pRawLwpSvStream = nullptr;
std::unique_ptr<LwpSvStream> aLwpSvStream;
std::unique_ptr<LwpSvStream> aCompressedLwpSvStream;
std::unique_ptr<SvStream> aDecompressed;
if (GetLwpSvStream(&rStream, pRawLwpSvStream) && pRawLwpSvStream)
{
- SvStream *pDecompressed = pRawLwpSvStream->GetStream();
+ SvStream* pDecompressed = pRawLwpSvStream->GetStream();
if (pDecompressed)
{
aDecompressed.reset(pDecompressed);
diff --git a/lotuswordpro/source/filter/lwpfnlayout.cxx b/lotuswordpro/source/filter/lwpfnlayout.cxx
index f95a1eddb622..fbbdcb6b4873 100644
--- a/lotuswordpro/source/filter/lwpfnlayout.cxx
+++ b/lotuswordpro/source/filter/lwpfnlayout.cxx
@@ -60,13 +60,12 @@
#include "lwpfnlayout.hxx"
-LwpFootnoteLayout::LwpFootnoteLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpTableLayout(objHdr, pStrm)
+LwpFootnoteLayout::LwpFootnoteLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpTableLayout(objHdr, pStrm)
{
}
-LwpFootnoteLayout::~LwpFootnoteLayout()
-{}
+LwpFootnoteLayout::~LwpFootnoteLayout() {}
/**
* @descr Read object info
@@ -80,24 +79,19 @@ void LwpFootnoteLayout::Read()
/**
* @descr Do nothing
*/
-void LwpFootnoteLayout::RegisterStyle()
-{
-}
+void LwpFootnoteLayout::RegisterStyle() {}
/**
* @descr Do nothing
*/
-void LwpFootnoteLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpFootnoteLayout::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpFnRowLayout::LwpFnRowLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpRowLayout(objHdr, pStrm)
+LwpFnRowLayout::LwpFnRowLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpRowLayout(objHdr, pStrm)
{
}
-LwpFnRowLayout::~LwpFnRowLayout()
-{}
+LwpFnRowLayout::~LwpFnRowLayout() {}
/**
* @descr Read object info
@@ -115,31 +109,28 @@ void LwpFnRowLayout::RegisterStyle()
{
// register cells' style
LwpObjectID* pCellID = &GetChildHead();
- LwpCellLayout * pCellLayout = dynamic_cast<LwpCellLayout *>(pCellID->obj().get());
+ LwpCellLayout* pCellLayout = dynamic_cast<LwpCellLayout*>(pCellID->obj().get());
- while(pCellLayout)
+ while (pCellLayout)
{
pCellLayout->SetFoundry(m_pFoundry);
pCellLayout->RegisterStyle();
pCellID = &pCellLayout->GetNext();
- pCellLayout = dynamic_cast<LwpCellLayout *>(pCellID->obj().get());
+ pCellLayout = dynamic_cast<LwpCellLayout*>(pCellID->obj().get());
}
}
/**
* @descr Do nothing
*/
-void LwpFnRowLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpFnRowLayout::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpFnCellLayout::LwpFnCellLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpCellLayout(objHdr, pStrm)
+LwpFnCellLayout::LwpFnCellLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpCellLayout(objHdr, pStrm)
{
}
-LwpFnCellLayout::~LwpFnCellLayout()
-{}
+LwpFnCellLayout::~LwpFnCellLayout() {}
/**
* @descr Read object info
@@ -167,17 +158,14 @@ void LwpFnCellLayout::RegisterStyle()
/**
* @descr Do nothing
*/
-void LwpFnCellLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpFnCellLayout::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpEndnoteLayout::LwpEndnoteLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpTableLayout(objHdr, pStrm)
+LwpEndnoteLayout::LwpEndnoteLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpTableLayout(objHdr, pStrm)
{
}
-LwpEndnoteLayout::~LwpEndnoteLayout()
-{}
+LwpEndnoteLayout::~LwpEndnoteLayout() {}
/**
* @descr Read object info
@@ -195,31 +183,28 @@ void LwpEndnoteLayout::RegisterStyle()
{
// register style of rows
LwpObjectID* pRowID = &GetChildHead();
- LwpRowLayout * pRowLayout = dynamic_cast<LwpRowLayout *>(pRowID->obj().get());
+ LwpRowLayout* pRowLayout = dynamic_cast<LwpRowLayout*>(pRowID->obj().get());
while (pRowLayout)
{
pRowLayout->SetFoundry(m_pFoundry);
pRowLayout->RegisterStyle();
pRowID = &pRowLayout->GetNext();
- pRowLayout = dynamic_cast<LwpRowLayout *>(pRowID->obj().get());
+ pRowLayout = dynamic_cast<LwpRowLayout*>(pRowID->obj().get());
}
}
/**
* @descr Do nothing
*/
-void LwpEndnoteLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpEndnoteLayout::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpEnSuperTableLayout::LwpEnSuperTableLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpSuperTableLayout(objHdr, pStrm)
+LwpEnSuperTableLayout::LwpEnSuperTableLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpSuperTableLayout(objHdr, pStrm)
{
}
-LwpEnSuperTableLayout::~LwpEnSuperTableLayout()
-{}
+LwpEnSuperTableLayout::~LwpEnSuperTableLayout() {}
/**
* @descr Read object info
@@ -244,9 +229,7 @@ void LwpEnSuperTableLayout::RegisterStyle()
/**
* @descr Do nothing
*/
-void LwpEnSuperTableLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpEnSuperTableLayout::XFConvert(XFContentContainer* /*pCont*/) {}
/**
* @short Get child endnote layout
@@ -254,10 +237,10 @@ void LwpEnSuperTableLayout::XFConvert(XFContentContainer * /*pCont*/)
*/
LwpVirtualLayout* LwpEnSuperTableLayout::GetMainTableLayout()
{
- LwpObjectID *pID = &GetChildTail();
+ LwpObjectID* pID = &GetChildTail();
- LwpVirtualLayout *pPrevLayout = nullptr;
- while(!pID->IsNull())
+ LwpVirtualLayout* pPrevLayout = nullptr;
+ while (!pID->IsNull())
{
LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(pID->obj().get());
if (!pLayout || pLayout == pPrevLayout)
@@ -275,13 +258,12 @@ LwpVirtualLayout* LwpEnSuperTableLayout::GetMainTableLayout()
return nullptr;
}
-LwpFnSuperTableLayout::LwpFnSuperTableLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpEnSuperTableLayout(objHdr, pStrm)
+LwpFnSuperTableLayout::LwpFnSuperTableLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpEnSuperTableLayout(objHdr, pStrm)
{
}
-LwpFnSuperTableLayout::~LwpFnSuperTableLayout()
-{}
+LwpFnSuperTableLayout::~LwpFnSuperTableLayout() {}
/**
* @descr Read object info
@@ -295,16 +277,12 @@ void LwpFnSuperTableLayout::Read()
/**
* @descr Do nothing
*/
-void LwpFnSuperTableLayout::RegisterStyle()
-{
-}
+void LwpFnSuperTableLayout::RegisterStyle() {}
/**
* @descr Do nothing
*/
-void LwpFnSuperTableLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpFnSuperTableLayout::XFConvert(XFContentContainer* /*pCont*/) {}
/**
* @short Get child footnote layout
@@ -312,12 +290,12 @@ void LwpFnSuperTableLayout::XFConvert(XFContentContainer * /*pCont*/)
*/
LwpVirtualLayout* LwpFnSuperTableLayout::GetMainTableLayout()
{
- LwpObjectID *pID = &GetChildTail();
+ LwpObjectID* pID = &GetChildTail();
- while(pID && !pID->IsNull())
+ while (pID && !pID->IsNull())
{
- LwpVirtualLayout * pLayout = dynamic_cast<LwpVirtualLayout *>(pID->obj().get());
- if(!pLayout)
+ LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(pID->obj().get());
+ if (!pLayout)
{
break;
}
@@ -331,13 +309,12 @@ LwpVirtualLayout* LwpFnSuperTableLayout::GetMainTableLayout()
return nullptr;
}
-LwpContFromLayout::LwpContFromLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpPlacableLayout(objHdr, pStrm)
+LwpContFromLayout::LwpContFromLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpPlacableLayout(objHdr, pStrm)
{
}
-LwpContFromLayout::~LwpContFromLayout()
-{}
+LwpContFromLayout::~LwpContFromLayout() {}
/**
* @descr Read object info
@@ -351,24 +328,19 @@ void LwpContFromLayout::Read()
/**
* @descr Do nothing
*/
-void LwpContFromLayout::RegisterStyle()
-{
-}
+void LwpContFromLayout::RegisterStyle() {}
/**
* @descr Do nothing
*/
-void LwpContFromLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpContFromLayout::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpContOnLayout::LwpContOnLayout(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpPlacableLayout(objHdr, pStrm)
+LwpContOnLayout::LwpContOnLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpPlacableLayout(objHdr, pStrm)
{
}
-LwpContOnLayout::~LwpContOnLayout()
-{}
+LwpContOnLayout::~LwpContOnLayout() {}
/**
* @descr Read object info
@@ -382,15 +354,11 @@ void LwpContOnLayout::Read()
/**
* @descr Do nothing
*/
-void LwpContOnLayout::RegisterStyle()
-{
-}
+void LwpContOnLayout::RegisterStyle() {}
/**
* @descr Do nothing
*/
-void LwpContOnLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpContOnLayout::XFConvert(XFContentContainer* /*pCont*/) {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpfnlayout.hxx b/lotuswordpro/source/filter/lwpfnlayout.hxx
index 0cdd9d1cc1ff..d95a93bfdd10 100644
--- a/lotuswordpro/source/filter/lwpfnlayout.hxx
+++ b/lotuswordpro/source/filter/lwpfnlayout.hxx
@@ -71,11 +71,12 @@
class LwpFootnoteLayout : public LwpTableLayout
{
public:
- LwpFootnoteLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpFootnoteLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpFootnoteLayout() override;
void RegisterStyle() override;
- virtual void XFConvert(XFContentContainer * pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FOOTNOTE_LAYOUT;}
+ virtual void XFConvert(XFContentContainer* pCont) override;
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_FOOTNOTE_LAYOUT; }
+
protected:
void Read() override;
};
@@ -87,11 +88,12 @@ protected:
class LwpFnRowLayout : public LwpRowLayout
{
public:
- LwpFnRowLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpFnRowLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpFnRowLayout() override;
void RegisterStyle() override;
- virtual void XFConvert(XFContentContainer * pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FOOTNOTE_ROW_LAYOUT;}
+ virtual void XFConvert(XFContentContainer* pCont) override;
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_FOOTNOTE_ROW_LAYOUT; }
+
protected:
void Read() override;
};
@@ -103,11 +105,12 @@ protected:
class LwpFnCellLayout : public LwpCellLayout
{
public:
- LwpFnCellLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpFnCellLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpFnCellLayout() override;
void RegisterStyle() override;
- virtual void XFConvert(XFContentContainer * pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FOOTNOTE_CELL_LAYOUT;}
+ virtual void XFConvert(XFContentContainer* pCont) override;
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_FOOTNOTE_CELL_LAYOUT; }
+
protected:
void Read() override;
};
@@ -119,11 +122,12 @@ protected:
class LwpEndnoteLayout : public LwpTableLayout
{
public:
- LwpEndnoteLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpEndnoteLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpEndnoteLayout() override;
void RegisterStyle() override;
- virtual void XFConvert(XFContentContainer * pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_ENDNOTE_LAYOUT;}
+ virtual void XFConvert(XFContentContainer* pCont) override;
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_ENDNOTE_LAYOUT; }
+
protected:
void Read() override;
};
@@ -135,12 +139,13 @@ protected:
class LwpEnSuperTableLayout : public LwpSuperTableLayout
{
public:
- LwpEnSuperTableLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpEnSuperTableLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpEnSuperTableLayout() override;
void RegisterStyle() override;
void XFConvert(XFContentContainer* pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_ENDNOTE_SUPERTABLE_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_ENDNOTE_SUPERTABLE_LAYOUT; }
virtual LwpVirtualLayout* GetMainTableLayout();
+
protected:
void Read() override;
};
@@ -152,12 +157,13 @@ protected:
class LwpFnSuperTableLayout : public LwpEnSuperTableLayout
{
public:
- LwpFnSuperTableLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpFnSuperTableLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpFnSuperTableLayout() override;
void RegisterStyle() override;
void XFConvert(XFContentContainer* pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FOOTNOTE_SUPERTABLE_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_FOOTNOTE_SUPERTABLE_LAYOUT; }
virtual LwpVirtualLayout* GetMainTableLayout() override;
+
protected:
void Read() override;
};
@@ -169,10 +175,11 @@ protected:
class LwpContFromLayout : public LwpPlacableLayout
{
public:
- LwpContFromLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpContFromLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpContFromLayout() override;
void RegisterStyle() override;
void XFConvert(XFContentContainer* pCont) override;
+
protected:
void Read() override;
};
@@ -184,10 +191,11 @@ protected:
class LwpContOnLayout : public LwpPlacableLayout
{
public:
- LwpContOnLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpContOnLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpContOnLayout() override;
void RegisterStyle() override;
void XFConvert(XFContentContainer* pCont) override;
+
protected:
void Read() override;
};
diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx
index 0d9ec19a111f..5bbfa0321faf 100644
--- a/lotuswordpro/source/filter/lwpfootnote.cxx
+++ b/lotuswordpro/source/filter/lwpfootnote.cxx
@@ -67,14 +67,15 @@
#include "lwpfnlayout.hxx"
#include <lwpglobalmgr.hxx>
-LwpFribFootnote::LwpFribFootnote(LwpPara* pPara ):LwpFrib(pPara)
+LwpFribFootnote::LwpFribFootnote(LwpPara* pPara)
+ : LwpFrib(pPara)
{
}
/**
* @descr read footnote frib information
*/
-void LwpFribFootnote::Read(LwpObjectStream * pObjStrm, sal_uInt16 /*len*/)
+void LwpFribFootnote::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
{
m_Footnote.ReadIndexed(pObjStrm);
}
@@ -85,7 +86,7 @@ void LwpFribFootnote::Read(LwpObjectStream * pObjStrm, sal_uInt16 /*len*/)
void LwpFribFootnote::RegisterNewStyle()
{
LwpFootnote* pFootnote = GetFootnote();
- if(pFootnote)
+ if (pFootnote)
{
//register footnote number font style
LwpFrib::RegisterStyle(m_pPara->GetFoundry());
@@ -101,11 +102,11 @@ void LwpFribFootnote::RegisterNewStyle()
void LwpFribFootnote::XFConvert(XFContentContainer* pCont)
{
LwpFootnote* pFootnote = GetFootnote();
- if(!pFootnote)
+ if (!pFootnote)
return;
rtl::Reference<XFContentContainer> xContent;
- if(pFootnote->GetType() == FN_FOOTNOTE)
+ if (pFootnote->GetType() == FN_FOOTNOTE)
{
xContent.set(new XFFootNote);
}
@@ -137,17 +138,14 @@ LwpFootnote* LwpFribFootnote::GetFootnote()
return dynamic_cast<LwpFootnote*>(m_Footnote.obj().get());
}
-LwpFootnote::LwpFootnote(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
+LwpFootnote::LwpFootnote(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpOrderedObject(objHdr, pStrm)
, m_nType(0)
, m_nRow(0)
{
}
-LwpFootnote::~LwpFootnote()
-{
-
-}
+LwpFootnote::~LwpFootnote() {}
/**
* @descr Read foonote object
@@ -168,10 +166,10 @@ void LwpFootnote::RegisterStyle()
{
//Only register footnote contents style,
//Endnote contents style registers in LwpEnSuperTableLayout::RegisterStyle
- if(m_nType == FN_FOOTNOTE)
+ if (m_nType == FN_FOOTNOTE)
{
LwpContent* pContent = FindFootnoteContent();
- if(pContent)
+ if (pContent)
{
pContent->SetFoundry(m_pFoundry);
pContent->DoRegisterStyle();
@@ -182,10 +180,10 @@ void LwpFootnote::RegisterStyle()
/**
* @descr Parse footnote
*/
-void LwpFootnote::XFConvert(XFContentContainer * pCont)
+void LwpFootnote::XFConvert(XFContentContainer* pCont)
{
LwpContent* pContent = FindFootnoteContent();
- if(pContent)
+ if (pContent)
{
pContent->DoXFConvert(pCont);
}
@@ -197,13 +195,14 @@ void LwpFootnote::XFConvert(XFContentContainer * pCont)
LwpCellLayout* LwpFootnote::GetCellLayout()
{
LwpEnSuperTableLayout* pEnSuperLayout = FindFootnoteTableLayout();
- if(pEnSuperLayout)
+ if (pEnSuperLayout)
{
- LwpTableLayout* pTableLayout = dynamic_cast<LwpTableLayout*>(pEnSuperLayout->GetMainTableLayout());
- if(pTableLayout)
+ LwpTableLayout* pTableLayout
+ = dynamic_cast<LwpTableLayout*>(pEnSuperLayout->GetMainTableLayout());
+ if (pTableLayout)
{
LwpRowLayout* pRowLayout = pTableLayout->GetRowLayout(m_nRow);
- if(pRowLayout)
+ if (pRowLayout)
{
return dynamic_cast<LwpCellLayout*>(pRowLayout->GetChildHead().obj().get());
}
@@ -217,12 +216,12 @@ LwpCellLayout* LwpFootnote::GetCellLayout()
*/
LwpDocument* LwpFootnote::GetFootnoteTableDivision()
{
- if(!m_pFoundry)
+ if (!m_pFoundry)
return nullptr;
- LwpDocument* pPrev =nullptr;
+ LwpDocument* pPrev = nullptr;
LwpDocument* pDivision = nullptr;
- LwpDocument* pFootnoteDivision =nullptr;
+ LwpDocument* pFootnoteDivision = nullptr;
// Make sure the footnote does belong to some division
// The division might not have a DivisionInfo if it's being Destruct()ed
@@ -264,7 +263,6 @@ LwpDocument* LwpFootnote::GetFootnoteTableDivision()
pDivision = pDivision->GetLastDivisionWithContents();
break;
}
-
}
// Make sure we're using the proper endnote division, if it's separate
@@ -293,7 +291,7 @@ LwpDocument* LwpFootnote::GetFootnoteTableDivision()
*/
LwpDocument* LwpFootnote::GetEndnoteDivision(LwpDocument* pPossible)
{
- LwpDocument* pDivision = pPossible;
+ LwpDocument* pDivision = pPossible;
sal_uInt16 nDivType;
// In case we have multiple endnote divisions, walk backwards until
@@ -351,22 +349,22 @@ OUString LwpFootnote::GetTableClass() const
LwpEnSuperTableLayout* LwpFootnote::FindFootnoteTableLayout()
{
LwpDocument* pDivision = GetFootnoteTableDivision();
- if(!pDivision)
+ if (!pDivision)
return nullptr;
LwpFoundry* pFoundry = pDivision->GetFoundry();
OUString strClassName = GetTableClass();
- if(strClassName.isEmpty() )
+ if (strClassName.isEmpty())
return nullptr;
LwpContent* pContent = nullptr;
while ((pContent = pFoundry->EnumContents(pContent)) != nullptr)
- if (pContent->IsTable() && (strClassName == pContent->GetClassName()) &&
- pContent->IsActive() && pContent->GetLayout(nullptr).is())
+ if (pContent->IsTable() && (strClassName == pContent->GetClassName())
+ && pContent->IsActive() && pContent->GetLayout(nullptr).is())
{
// Found it!
- return static_cast<LwpEnSuperTableLayout *>(
+ return static_cast<LwpEnSuperTableLayout*>(
static_cast<LwpTable*>(pContent)->GetSuperTableLayout());
}
@@ -385,7 +383,7 @@ LwpContent* LwpFootnote::FindFootnoteContent()
return pContent;
LwpCellLayout* pCellLayout = GetCellLayout();
- if(pCellLayout)
+ if (pCellLayout)
{
pContent = dynamic_cast<LwpContent*>(pCellLayout->GetContent().obj().get());
}
@@ -393,7 +391,7 @@ LwpContent* LwpFootnote::FindFootnoteContent()
return pContent;
}
-LwpFootnoteTable::LwpFootnoteTable(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
+LwpFootnoteTable::LwpFootnoteTable(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpTable(objHdr, pStrm)
{
}
@@ -407,7 +405,7 @@ void LwpFootnoteTable::Read()
/**
* @descr Read footnote number options information
*/
-void LwpFootnoteNumberOptions::Read(LwpObjectStream *pObjStrm)
+void LwpFootnoteNumberOptions::Read(LwpObjectStream* pObjStrm)
{
m_nFlag = pObjStrm->QuickReaduInt16();
m_nStartingNumber = pObjStrm->QuickReaduInt16();
@@ -419,7 +417,7 @@ void LwpFootnoteNumberOptions::Read(LwpObjectStream *pObjStrm)
/**
* @descr Read footnote separator options information
*/
-void LwpFootnoteSeparatorOptions::Read(LwpObjectStream *pObjStrm)
+void LwpFootnoteSeparatorOptions::Read(LwpObjectStream* pObjStrm)
{
m_nFlag = pObjStrm->QuickReaduInt16();
m_nLength = pObjStrm->QuickReaduInt32();
@@ -430,16 +428,13 @@ void LwpFootnoteSeparatorOptions::Read(LwpObjectStream *pObjStrm)
pObjStrm->SkipExtra();
}
-LwpFootnoteOptions::LwpFootnoteOptions(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
+LwpFootnoteOptions::LwpFootnoteOptions(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
, m_nFlag(0)
{
}
-LwpFootnoteOptions::~LwpFootnoteOptions()
-{
-
-}
+LwpFootnoteOptions::~LwpFootnoteOptions() {}
/**
* @descr Register footnote options object
@@ -473,23 +468,23 @@ void LwpFootnoteOptions::RegisterStyle()
void LwpFootnoteOptions::RegisterFootnoteStyle()
{
std::unique_ptr<XFFootnoteConfig> xFootnoteConfig(new XFFootnoteConfig);
- xFootnoteConfig->SetStartValue(m_FootnoteNumbering.GetStartingNumber() -1);
+ xFootnoteConfig->SetStartValue(m_FootnoteNumbering.GetStartingNumber() - 1);
xFootnoteConfig->SetNumPrefix(m_FootnoteNumbering.GetLeadingText());
xFootnoteConfig->SetNumSuffix(m_FootnoteNumbering.GetTrailingText());
- if(m_FootnoteNumbering.GetReset() == LwpFootnoteNumberOptions::RESET_PAGE)
+ if (m_FootnoteNumbering.GetReset() == LwpFootnoteNumberOptions::RESET_PAGE)
{
xFootnoteConfig->SetRestartOnPage();
}
- if(GetContinuedFrom())
+ if (GetContinuedFrom())
{
xFootnoteConfig->SetMessageFrom(GetContinuedFromMessage());
}
- if(GetContinuedOn())
+ if (GetContinuedOn())
{
xFootnoteConfig->SetMessageOn(GetContinuedOnMessage());
}
- xFootnoteConfig->SetMasterPage( m_strMasterPage);
+ xFootnoteConfig->SetMasterPage(m_strMasterPage);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
pXFStyleManager->SetFootnoteConfig(xFootnoteConfig.release());
}
@@ -500,25 +495,25 @@ void LwpFootnoteOptions::RegisterFootnoteStyle()
void LwpFootnoteOptions::RegisterEndnoteStyle()
{
std::unique_ptr<XFEndnoteConfig> xEndnoteConfig(new XFEndnoteConfig);
- xEndnoteConfig->SetStartValue(m_EndnoteDocNumbering.GetStartingNumber() -1);
+ xEndnoteConfig->SetStartValue(m_EndnoteDocNumbering.GetStartingNumber() - 1);
OUString message = m_EndnoteDocNumbering.GetLeadingText();
- if(message.isEmpty())
+ if (message.isEmpty())
{
- message = "[";//default prefix
+ message = "["; //default prefix
}
xEndnoteConfig->SetNumPrefix(message);
message = m_EndnoteDocNumbering.GetTrailingText();
- if(message.isEmpty())
+ if (message.isEmpty())
{
- message = "]";//default suffix
+ message = "]"; //default suffix
}
xEndnoteConfig->SetNumSuffix(message);
- if(m_EndnoteDocNumbering.GetReset() == LwpFootnoteNumberOptions::RESET_PAGE)
+ if (m_EndnoteDocNumbering.GetReset() == LwpFootnoteNumberOptions::RESET_PAGE)
{
xEndnoteConfig->SetRestartOnPage();
}
- xEndnoteConfig->SetMasterPage( m_strMasterPage);
+ xEndnoteConfig->SetMasterPage(m_strMasterPage);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
pXFStyleManager->SetEndnoteConfig(xEndnoteConfig.release());
@@ -529,7 +524,7 @@ void LwpFootnoteOptions::RegisterEndnoteStyle()
*/
OUString LwpFootnoteOptions::GetContinuedOnMessage() const
{
- if(m_ContinuedOnMessage.HasValue())
+ if (m_ContinuedOnMessage.HasValue())
{
return m_ContinuedOnMessage.str();
}
@@ -542,7 +537,7 @@ OUString LwpFootnoteOptions::GetContinuedOnMessage() const
*/
OUString LwpFootnoteOptions::GetContinuedFromMessage() const
{
- if(m_ContinuedFromMessage.HasValue())
+ if (m_ContinuedFromMessage.HasValue())
{
return m_ContinuedFromMessage.str();
}
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index feb6f76266f1..b5c65fc411a3 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -69,13 +69,12 @@
#include "lwpoleobject.hxx"
#include <lwpglobalmgr.hxx>
-LwpFrame::LwpFrame(LwpPlacableLayout* pLayout):m_pLayout(pLayout)
+LwpFrame::LwpFrame(LwpPlacableLayout* pLayout)
+ : m_pLayout(pLayout)
{
}
-LwpFrame::~LwpFrame()
-{
-}
+LwpFrame::~LwpFrame() {}
/**
* @descr: parse frame
* @param: register frame style
@@ -108,21 +107,21 @@ void LwpFrame::RegisterStyle(std::unique_ptr<XFFrameStyle>& rFrameStyle)
* @param: nPageNo - the page number that the frame anchors
*
*/
- void LwpFrame::Parse(XFFrame* pXFFrame, sal_Int32 nPageNo)
- {
+void LwpFrame::Parse(XFFrame* pXFFrame, sal_Int32 nPageNo)
+{
//set the frame style name
pXFFrame->SetStyleName(m_StyleName);
//SetAnchorType and position,if it's page anchor,set the page number.
ParseAnchorType(pXFFrame);
- if(nPageNo>0)
+ if (nPageNo > 0)
{
pXFFrame->SetAnchorPage(nPageNo);
}
//Set frame Name
OUString aFrameName = m_pLayout->GetName().str();
- if(!aFrameName.isEmpty())
+ if (!aFrameName.isEmpty())
{
//cause the bug of SODC, the linkframe name can not be "Frame1", so I change the frame name
/*if(aFrameName.equals("Frame1"))
@@ -135,20 +134,20 @@ void LwpFrame::RegisterStyle(std::unique_ptr<XFFrameStyle>& rFrameStyle)
LwpLayoutGeometry* pLayoutGeo = m_pLayout->GetGeometry();
//Set frame Width and height
- if(pLayoutGeo)
+ if (pLayoutGeo)
{
double fWidth = m_pLayout->GetWidth();
double fHeight = m_pLayout->GetHeight();
- pXFFrame->SetWidth( fWidth );
- pXFFrame->SetHeight( fHeight );
+ pXFFrame->SetWidth(fWidth);
+ pXFFrame->SetHeight(fHeight);
//Get content obj;
- /*LwpObject* pObj =*/ m_pLayout->GetContent().obj();
- if(m_pLayout->IsGroupHead()&&(m_pLayout->IsMinimumHeight()))
+ /*LwpObject* pObj =*/m_pLayout->GetContent().obj();
+ if (m_pLayout->IsGroupHead() && (m_pLayout->IsMinimumHeight()))
{
//process grouplayout height. there is problems now
- pXFFrame->SetHeight( fHeight );
+ pXFFrame->SetHeight(fHeight);
}
/*
else if(m_pLayout->IsFitGraphic() && pObj && pObj->GetTag() == VO_GRAPHIC)
@@ -164,64 +163,63 @@ void LwpFrame::RegisterStyle(std::unique_ptr<XFFrameStyle>& rFrameStyle)
pXFFrame->SetHeight(fHeight);
}
*/
- else if(m_pLayout->IsAutoGrow())
+ else if (m_pLayout->IsAutoGrow())
{
- pXFFrame->SetMinHeight( fHeight );
+ pXFFrame->SetMinHeight(fHeight);
}
}
- if(m_pLayout->IsFrame())
+ if (m_pLayout->IsFrame())
{
//Set frame link. Only frame layout has this feature
- LwpFrameLayout* pLayout= static_cast<LwpFrameLayout*>(m_pLayout);
+ LwpFrameLayout* pLayout = static_cast<LwpFrameLayout*>(m_pLayout);
pXFFrame->SetNextLink(pLayout->GetNextLinkName());
}
-
- }
+}
/**
* @descr: parse frame relative to page, frame or cell
* @param: pCont - content container which contains the frame
*
*/
- void LwpFrame::XFConvert(XFContentContainer* pCont)
- {
+void LwpFrame::XFConvert(XFContentContainer* pCont)
+{
// parse the frame which anchor to page
rtl::Reference<LwpVirtualLayout> xParent = m_pLayout->GetParentLayout();
if (!xParent.is())
throw std::runtime_error("missing Parent Layout");
- if (xParent->IsPage() && xParent->GetParentLayout().is() && xParent->GetParentLayout()->IsPage())
+ if (xParent->IsPage() && xParent->GetParentLayout().is()
+ && xParent->GetParentLayout()->IsPage())
{
//for mirror page, problems exist if the parent layout is header or footer layout,
xParent = xParent->GetParentLayout();
}
- if(m_pLayout->IsAnchorPage()&& xParent->IsPage())
+ if (m_pLayout->IsAnchorPage() && xParent->IsPage())
{
//get parent layout
- if(m_pLayout->IsUseOnPage())
+ if (m_pLayout->IsUseOnPage())
{
sal_Int32 nPageNo = xParent->GetPageNumber(m_pLayout->GetUsePage());
- if(nPageNo>0)
+ if (nPageNo > 0)
m_pLayout->XFConvertFrame(pCont, nPageNo);
}
- else if(m_pLayout->IsUseOnAllPages())
+ else if (m_pLayout->IsUseOnAllPages())
{
sal_Int32 nFirst = xParent->GetPageNumber(FIRST_LAYOUTPAGENO);
sal_Int32 nLast = xParent->GetPageNumber(LAST_LAYOUTPAGENO);
- if(nLast > 0)
+ if (nLast > 0)
m_pLayout->XFConvertFrame(pCont, nFirst, nLast, true);
-
}
- else if(m_pLayout->IsUseOnAllOddPages()||m_pLayout->IsUseOnAllEvenPages())
+ else if (m_pLayout->IsUseOnAllOddPages() || m_pLayout->IsUseOnAllEvenPages())
{
sal_Int32 nFirst = xParent->GetPageNumber(FIRST_LAYOUTPAGENO);
sal_Int32 nLast = xParent->GetPageNumber(LAST_LAYOUTPAGENO);
- if(nLast > 0)
+ if (nLast > 0)
{
sal_uInt16 first = static_cast<sal_uInt16>(nFirst);
- if((m_pLayout->IsUseOnAllOddPages() && !LwpTools::IsOddNumber(first))
- || (m_pLayout->IsUseOnAllEvenPages() && !LwpTools::IsEvenNumber(first)))
+ if ((m_pLayout->IsUseOnAllOddPages() && !LwpTools::IsOddNumber(first))
+ || (m_pLayout->IsUseOnAllEvenPages() && !LwpTools::IsEvenNumber(first)))
nFirst++;
- if(nFirst <= nLast)
+ if (nFirst <= nLast)
{
m_pLayout->XFConvertFrame(pCont, nFirst, nLast);
}
@@ -232,19 +230,18 @@ void LwpFrame::RegisterStyle(std::unique_ptr<XFFrameStyle>& rFrameStyle)
{
m_pLayout->XFConvertFrame(pCont);
}
-
- }
+}
/**
* @descr: set frame wrap type style
* @param: pFrameStyle - Frame Style object
*
*/
-void LwpFrame::ApplyWrapType(XFFrameStyle *pFrameStyle)
+void LwpFrame::ApplyWrapType(XFFrameStyle* pFrameStyle)
{
enumXFWrap eWrap = enumXFWrapNone;
- switch(m_pLayout->GetWrapType())
+ switch (m_pLayout->GetWrapType())
{
- case LwpPlacableLayout::LAY_WRAP_AROUND: //fall through
+ case LwpPlacableLayout::LAY_WRAP_AROUND: //fall through
case LwpPlacableLayout::LAY_WRAP_IRREG_BIGGEST:
{
//In SODC, if Optimal wrap type is used and the distance between the frame object
@@ -255,9 +252,9 @@ void LwpFrame::ApplyWrapType(XFFrameStyle *pFrameStyle)
eWrap = enumXFWrapBest;
rtl::Reference<LwpVirtualLayout> xContainer(m_pLayout->GetContainerLayout());
LwpMiddleLayout* pParent = dynamic_cast<LwpMiddleLayout*>(xContainer.get());
- if(pParent)
+ if (pParent)
{
- if(IsLeftWider())
+ if (IsLeftWider())
eWrap = enumXFWrapLeft;
else
eWrap = enumXFWrapRight;
@@ -272,16 +269,16 @@ void LwpFrame::ApplyWrapType(XFFrameStyle *pFrameStyle)
case LwpPlacableLayout::LAY_NO_WRAP_AROUND:
{
eWrap = enumXFWrapRunThrough;
- if(!m_pLayout->GetBackColor() && !m_pLayout->GetWaterMarkLayout().is())
+ if (!m_pLayout->GetBackColor() && !m_pLayout->GetWaterMarkLayout().is())
{
//pFrameStyle->SetBackGround(sal_True);
XFColor aXFColor(0xffffff); //white color
pFrameStyle->SetBackColor(aXFColor);
- pFrameStyle->SetTransparency(100); //transparency
+ pFrameStyle->SetTransparency(100); //transparency
}
break;
}
- case LwpPlacableLayout::LAY_WRAP_LEFT: //fall through
+ case LwpPlacableLayout::LAY_WRAP_LEFT: //fall through
case LwpPlacableLayout::LAY_WRAP_IRREG_LEFT:
{
eWrap = enumXFWrapLeft;
@@ -293,7 +290,7 @@ void LwpFrame::ApplyWrapType(XFFrameStyle *pFrameStyle)
eWrap = enumXFWrapRight;
break;
}
- case LwpPlacableLayout::LAY_WRAP_BOTH: //fall through
+ case LwpPlacableLayout::LAY_WRAP_BOTH: //fall through
case LwpPlacableLayout::LAY_WRAP_IRREG_BOTH:
{
eWrap = enumXFWrapParallel;
@@ -304,7 +301,7 @@ void LwpFrame::ApplyWrapType(XFFrameStyle *pFrameStyle)
}
//If it is the type of with para above, wrap type is enumXFWrapNone
- if(m_pLayout->GetRelativeType()==LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE)
+ if (m_pLayout->GetRelativeType() == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE)
{
eWrap = enumXFWrapNone;
}
@@ -316,36 +313,36 @@ void LwpFrame::ApplyWrapType(XFFrameStyle *pFrameStyle)
* @param: pFrameStyle - Frame Style object
*
*/
-void LwpFrame::ApplyMargins(XFFrameStyle *pFrameStyle)
+void LwpFrame::ApplyMargins(XFFrameStyle* pFrameStyle)
{
- double fLeft = m_pLayout->GetExtMarginsValue(MARGIN_LEFT);
- double fRight = m_pLayout->GetExtMarginsValue(MARGIN_RIGHT);
+ double fLeft = m_pLayout->GetExtMarginsValue(MARGIN_LEFT);
+ double fRight = m_pLayout->GetExtMarginsValue(MARGIN_RIGHT);
double fTop = m_pLayout->GetExtMarginsValue(MARGIN_TOP);
- double fBottom = m_pLayout->GetExtMarginsValue(MARGIN_BOTTOM);
- pFrameStyle->SetMargins(fLeft,fRight,fTop,fBottom);
+ double fBottom = m_pLayout->GetExtMarginsValue(MARGIN_BOTTOM);
+ pFrameStyle->SetMargins(fLeft, fRight, fTop, fBottom);
}
/**
* @descr: set padding border style
* @param: pFrameStyle - Frame Style object
*
*/
-void LwpFrame::ApplyPadding(XFFrameStyle *pFrameStyle)
+void LwpFrame::ApplyPadding(XFFrameStyle* pFrameStyle)
{
- double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT);
- double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT);
+ double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT);
+ double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT);
double fTop = m_pLayout->GetMarginsValue(MARGIN_TOP);
- double fBottom = m_pLayout->GetMarginsValue(MARGIN_BOTTOM);
- pFrameStyle->SetPadding(fLeft,fRight,fTop,fBottom);
+ double fBottom = m_pLayout->GetMarginsValue(MARGIN_BOTTOM);
+ pFrameStyle->SetPadding(fLeft, fRight, fTop, fBottom);
}
/**
* @descr: set frame border style
* @param: pFrameStyle - Frame Style object
*
*/
-void LwpFrame::ApplyBorders(XFFrameStyle *pFrameStyle)
+void LwpFrame::ApplyBorders(XFFrameStyle* pFrameStyle)
{
std::unique_ptr<XFBorders> pBordres = m_pLayout->GetXFBorders();
- if(pBordres)
+ if (pBordres)
{
pFrameStyle->SetBorders(std::move(pBordres));
}
@@ -355,10 +352,10 @@ void LwpFrame::ApplyBorders(XFFrameStyle *pFrameStyle)
* @param: pFrameStyle - Frame Style object
*
*/
-void LwpFrame::ApplyColumns(XFFrameStyle *pFrameStyle)
+void LwpFrame::ApplyColumns(XFFrameStyle* pFrameStyle)
{
XFColumns* pColumns = m_pLayout->GetXFColumns();
- if(pColumns)
+ if (pColumns)
{
pFrameStyle->SetColumns(pColumns);
}
@@ -371,7 +368,7 @@ void LwpFrame::ApplyColumns(XFFrameStyle *pFrameStyle)
void LwpFrame::ApplyShadow(XFFrameStyle* pFrameStyle)
{
XFShadow* pXFShadow = m_pLayout->GetXFShadow();
- if(pXFShadow)
+ if (pXFShadow)
{
pFrameStyle->SetShadow(pXFShadow);
}
@@ -384,7 +381,7 @@ void LwpFrame::ApplyShadow(XFFrameStyle* pFrameStyle)
void LwpFrame::ApplyBackColor(XFFrameStyle* pFrameStyle)
{
LwpColor* pColor = m_pLayout->GetBackColor();
- if(pColor)
+ if (pColor)
{
XFColor aXFColor(pColor->To24Color());
pFrameStyle->SetBackColor(aXFColor);
@@ -397,9 +394,9 @@ void LwpFrame::ApplyBackColor(XFFrameStyle* pFrameStyle)
*/
void LwpFrame::ApplyProtect(XFFrameStyle* pFrameStyle)
{
- if(m_pLayout->GetIsProtected())
+ if (m_pLayout->GetIsProtected())
{
- pFrameStyle->SetProtect(true,true,true);
+ pFrameStyle->SetProtect(true, true, true);
}
}
/**
@@ -423,16 +420,16 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
enumXFFrameYPos eYPos = enumXFFrameYPosMiddle;
enumXFFrameYRel eYRel = enumXFFrameYRelPara;
sal_uInt8 nType = m_pLayout->GetRelativeType();
- switch(nType)
+ switch (nType)
{
- case LwpLayoutRelativityGuts::LAY_PARENT_RELATIVE://fall through
+ case LwpLayoutRelativityGuts::LAY_PARENT_RELATIVE: //fall through
case LwpLayoutRelativityGuts::LAY_CONTENT_RELATIVE:
{
//anchor to page, frame and cell
eXPos = enumXFFrameXPosFromLeft;
eXRel = enumXFFrameXRelPage;
//set vertical position
- if(m_pLayout->IsAnchorPage())//in page
+ if (m_pLayout->IsAnchorPage()) //in page
{
rtl::Reference<LwpVirtualLayout> xContainer(m_pLayout->GetContainerLayout());
if (xContainer.is() && (xContainer->IsHeader() || xContainer->IsFooter()))
@@ -447,12 +444,12 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
eYRel = enumXFFrameYRelPage;
}
}
- if(m_pLayout->IsAnchorFrame()) //in frame
+ if (m_pLayout->IsAnchorFrame()) //in frame
{
eYPos = enumXFFrameYPosFromTop;
eYRel = enumXFFrameYRelPage;
}
- if(m_pLayout->IsAnchorCell())
+ if (m_pLayout->IsAnchorCell())
{
//SODC has no this type, simulate this feature
eYPos = enumXFFrameYPosFromTop; //from top
@@ -460,13 +457,13 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
}
break;
}
- case LwpLayoutRelativityGuts::LAY_PARA_RELATIVE: //same page as text
+ case LwpLayoutRelativityGuts::LAY_PARA_RELATIVE: //same page as text
{
eXPos = enumXFFrameXPosFromLeft;
eXRel = enumXFFrameXRelPage;
//set vertical position
rtl::Reference<LwpVirtualLayout> xContainer(m_pLayout->GetContainerLayout());
- if (xContainer.is() && xContainer->IsPage())//in page
+ if (xContainer.is() && xContainer->IsPage()) //in page
{
//eYPos = enumXFFrameYPosFromTop;
//eYRel = enumXFFrameYRelPage;
@@ -485,20 +482,20 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
}
break;
}
- case LwpLayoutRelativityGuts::LAY_INLINE: //in text
+ case LwpLayoutRelativityGuts::LAY_INLINE: //in text
{
- eXPos = enumXFFrameXPosFromLeft; //need not be set
+ eXPos = enumXFFrameXPosFromLeft; //need not be set
eXRel = enumXFFrameXRelParaContent; //need not be set
eYPos = enumXFFrameYPosTop; //should be from top
eYRel = enumXFFrameYRelBaseLine;
sal_Int32 nOffset = m_pLayout->GetBaseLineOffset();
- if(nOffset>0)
+ if (nOffset > 0)
{
eYPos = enumXFFrameYPosFromTop;
}
break;
}
- case LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE: //with para above
+ case LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE: //with para above
{
eXPos = enumXFFrameXPosFromLeft;
eXRel = enumXFFrameXRelParaContent;
@@ -507,7 +504,7 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
eYRel = enumXFFrameYRelParaContent;
break;
}
- case LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL: //in text - vertical
+ case LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL: //in text - vertical
{
eXPos = enumXFFrameXPosFromLeft;
eXRel = enumXFFrameXRelPage;
@@ -519,15 +516,15 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
break;
}
- pFrameStyle->SetXPosType(eXPos,eXRel);
- pFrameStyle->SetYPosType(eYPos,eYRel);
+ pFrameStyle->SetXPosType(eXPos, eXRel);
+ pFrameStyle->SetYPosType(eYPos, eYRel);
}
/**
* @descr: set frame watermark style
* @param: pFrameStyle - Frame Style object
*
*/
-void LwpFrame::ApplyWatermark(XFFrameStyle *pFrameStyle)
+void LwpFrame::ApplyWatermark(XFFrameStyle* pFrameStyle)
{
std::unique_ptr<XFBGImage> xBGImage(m_pLayout->GetXFBGImage());
if (xBGImage)
@@ -537,11 +534,11 @@ void LwpFrame::ApplyWatermark(XFFrameStyle *pFrameStyle)
rtl::Reference<LwpVirtualLayout> xWaterMarkLayout(m_pLayout->GetWaterMarkLayout());
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*>(xWaterMarkLayout.get());
LwpBackgroundStuff* pBackgroundStuff = pLay ? pLay->GetBackgroundStuff() : nullptr;
- if(pBackgroundStuff && !pBackgroundStuff->IsTransparent())
+ if (pBackgroundStuff && !pBackgroundStuff->IsTransparent())
{
pFrameStyle->SetTransparency(100);
}
- }
+ }
}
/**
@@ -585,7 +582,7 @@ void LwpFrame::ApplyBackGround(XFFrameStyle* pFrameStyle)
* @param: pXFFrame - XFFrame object
*
*/
-void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
+void LwpFrame::ParseAnchorType(XFFrame* pXFFrame)
{
//set position
double fXOffset = 0;
@@ -594,7 +591,7 @@ void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
enumXFAnchor eAnchor = enumXFAnchorNone;
LwpLayoutGeometry* pLayoutGeo = m_pLayout->GetGeometry();
- if(pLayoutGeo)
+ if (pLayoutGeo)
{
LwpPoint aPoint = pLayoutGeo->GetOrigin();
fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
@@ -603,13 +600,13 @@ void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
//set anchor type
eAnchor = enumXFAnchorNone;
sal_uInt8 nType = m_pLayout->GetRelativeType();
- switch(nType)
+ switch (nType)
{
- case LwpLayoutRelativityGuts::LAY_PARENT_RELATIVE://fall through
+ case LwpLayoutRelativityGuts::LAY_PARENT_RELATIVE: //fall through
case LwpLayoutRelativityGuts::LAY_CONTENT_RELATIVE:
{
//anchor to page, frame and cell
- if(m_pLayout->IsAnchorPage())//in page
+ if (m_pLayout->IsAnchorPage()) //in page
{
rtl::Reference<LwpVirtualLayout> xContainer(m_pLayout->GetContainerLayout());
if (xContainer.is() && (xContainer->IsHeader() || xContainer->IsFooter()))
@@ -620,11 +617,11 @@ void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
else
eAnchor = enumXFAnchorPage;
}
- if(m_pLayout->IsAnchorFrame()) //in frame
+ if (m_pLayout->IsAnchorFrame()) //in frame
{
eAnchor = enumXFAnchorFrame;
}
- if(m_pLayout->IsAnchorCell()) //in cell
+ if (m_pLayout->IsAnchorCell()) //in cell
{
//eAnchor = enumXFAnchorChar;
eAnchor = enumXFAnchorPara;
@@ -637,14 +634,14 @@ void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
}
break;
}
- case LwpLayoutRelativityGuts::LAY_PARA_RELATIVE: //same page as text
+ case LwpLayoutRelativityGuts::LAY_PARA_RELATIVE: //same page as text
{
eAnchor = enumXFAnchorChar;
rtl::Reference<LwpVirtualLayout> xContainer(m_pLayout->GetContainerLayout());
- if (xContainer.is() && xContainer->IsPage())//in page
+ if (xContainer.is() && xContainer->IsPage()) //in page
{
//eAnchor = enumXFAnchorPage;
- eAnchor = enumXFAnchorChar;// to character
+ eAnchor = enumXFAnchorChar; // to character
}
else if (xContainer.is() && xContainer->IsFrame()) //in frame
{
@@ -656,30 +653,33 @@ void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
eAnchor = enumXFAnchorPara;
fYOffset -= xContainer->GetMarginsValue(MARGIN_TOP);
}
- else if (xContainer.is() && (xContainer->IsHeader() || xContainer->IsFooter()))//in header or footer
+ else if (xContainer.is()
+ && (xContainer->IsHeader() || xContainer->IsFooter())) //in header or footer
{
eAnchor = enumXFAnchorPara;
fYOffset -= xContainer->GetMarginsValue(MARGIN_TOP);
}
break;
}
- case LwpLayoutRelativityGuts::LAY_INLINE: //in text
+ case LwpLayoutRelativityGuts::LAY_INLINE: //in text
{
eAnchor = enumXFAnchorAsChar;
sal_Int32 nOffset = m_pLayout->GetBaseLineOffset();
- if(nOffset>0 && pLayoutGeo)
+ if (nOffset > 0 && pLayoutGeo)
{
//experiential value
- fYOffset =-(m_pLayout->GetGeometryHeight()+2*m_pLayout->GetExtMarginsValue(MARGIN_BOTTOM)-LwpTools::ConvertFromUnitsToMetric(nOffset));
+ fYOffset = -(m_pLayout->GetGeometryHeight()
+ + 2 * m_pLayout->GetExtMarginsValue(MARGIN_BOTTOM)
+ - LwpTools::ConvertFromUnitsToMetric(nOffset));
}
break;
}
- case LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE: //with para above
+ case LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE: //with para above
{
eAnchor = enumXFAnchorPara;
break;
}
- case LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL: //in text - vertical
+ case LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL: //in text - vertical
{
eAnchor = enumXFAnchorChar;
//set vertical position
@@ -688,11 +688,11 @@ void LwpFrame::ParseAnchorType(XFFrame *pXFFrame)
//because of the different feature between Word Pro and SODC, I simulate the vertical base offset
//between anchor and frame origin using the font height.
rtl::Reference<XFFont> pFont = m_pLayout->GetFont();
- if(pFont.is())
+ if (pFont.is())
{
- offset = static_cast<double>(pFont->GetFontSize())*CM_PER_INCH/POINTS_PER_INCH;
+ offset = static_cast<double>(pFont->GetFontSize()) * CM_PER_INCH / POINTS_PER_INCH;
}
- fYOffset = offset-fYOffset;
+ fYOffset = offset - fYOffset;
break;
}
default:
@@ -724,7 +724,7 @@ bool LwpFrame::IsLeftWider()
//LwpPoint aParentPoint = pParent->GetOrigin();
//double fParentXOffset = LwpTools::ConvertFromUnitsToMetric(aParentPoint.GetX());
double fParentWidth = pParent->GetWidth();
- if(pParent->IsCell())
+ if (pParent->IsCell())
{
//Get actual width of this cell layout
fParentWidth = static_cast<LwpCellLayout*>(pParent)->GetActualWidth();
@@ -732,19 +732,17 @@ bool LwpFrame::IsLeftWider()
double fParentMarginLeft = pParent->GetMarginsValue(MARGIN_LEFT);
double fParentMarginRight = pParent->GetMarginsValue(MARGIN_RIGHT);
- double fLeft = fXOffset - fWrapLeft -fParentMarginLeft;
- double fRight = fParentWidth - fParentMarginRight -(fXOffset + fWidth + fWrapRight);
- if(fLeft > fRight)
+ double fLeft = fXOffset - fWrapLeft - fParentMarginLeft;
+ double fRight = fParentWidth - fParentMarginRight - (fXOffset + fWidth + fWrapRight);
+ if (fLeft > fRight)
return true;
}
return false;
}
-LwpFrameLink::LwpFrameLink()
-{}
+LwpFrameLink::LwpFrameLink() {}
-LwpFrameLink::~LwpFrameLink()
-{}
+LwpFrameLink::~LwpFrameLink() {}
/**
* @descr frame link information
@@ -757,14 +755,13 @@ void LwpFrameLink::Read(LwpObjectStream* pStrm)
pStrm->SkipExtra();
}
-LwpFrameLayout::LwpFrameLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- : LwpPlacableLayout(objHdr, pStrm), m_bGettingMaxWidth(false)
+LwpFrameLayout::LwpFrameLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpPlacableLayout(objHdr, pStrm)
+ , m_bGettingMaxWidth(false)
{
}
-LwpFrameLayout::~LwpFrameLayout()
-{
-}
+LwpFrameLayout::~LwpFrameLayout() {}
/**
* @descr read frame layout object
@@ -773,9 +770,9 @@ LwpFrameLayout::~LwpFrameLayout()
void LwpFrameLayout::Read()
{
LwpPlacableLayout::Read();
- if(LwpFileHeader::m_nFileRevision >= 0x000B)
+ if (LwpFileHeader::m_nFileRevision >= 0x000B)
{
- if(m_pObjStrm->QuickReaduInt16())
+ if (m_pObjStrm->QuickReaduInt16())
{
m_Link.Read(m_pObjStrm.get());
}
@@ -788,13 +785,13 @@ void LwpFrameLayout::Read()
* @param: pCont - content container that contains the frame.
*
*/
- void LwpFrameLayout::XFConvert(XFContentContainer* pCont)
- {
- if(!m_pFrame)
+void LwpFrameLayout::XFConvert(XFContentContainer* pCont)
+{
+ if (!m_pFrame)
return;
//parse the frame which anchor to paragraph
- if(IsRelativeAnchored())
+ if (IsRelativeAnchored())
{
XFConvertFrame(pCont);
}
@@ -802,20 +799,21 @@ void LwpFrameLayout::Read()
{
m_pFrame->XFConvert(pCont);
}
- }
+}
/**
* @descr create a xfframe and add into content container, called by XFConvert
* @param: pCont - content container that contains the frame.
* @param: nPageNo - the page number that the frame anchors
*
*/
-void LwpFrameLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart , sal_Int32 nEnd, bool bAll )
+void LwpFrameLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart, sal_Int32 nEnd,
+ bool bAll)
{
- if(!m_pFrame)
+ if (!m_pFrame)
return;
rtl::Reference<XFFrame> xXFFrame;
- if(nEnd < nStart)
+ if (nEnd < nStart)
{
xXFFrame.set(new XFFrame);
}
@@ -826,7 +824,7 @@ void LwpFrameLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart
m_pFrame->Parse(xXFFrame.get(), nStart);
//if it is a link frame, parse contents only once
- if(!HasPreviousLinkLayout())
+ if (!HasPreviousLinkLayout())
{
rtl::Reference<LwpObject> content = m_Content.obj();
if (content.is())
@@ -842,7 +840,7 @@ void LwpFrameLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart
* @descr register frame style
*
*/
-void LwpFrameLayout::RegisterStyle()
+void LwpFrameLayout::RegisterStyle()
{
//if it is for water mark, don't register style
if (IsForWaterMark())
@@ -876,7 +874,7 @@ OUString LwpFrameLayout::GetNextLinkName()
{
OUString aName;
LwpObjectID& rObjectID = m_Link.GetNextLayout();
- if(!rObjectID.IsNull())
+ if (!rObjectID.IsNull())
{
LwpLayout* pLayout = dynamic_cast<LwpLayout*>(rObjectID.obj().get());
if (pLayout)
@@ -884,7 +882,7 @@ OUString LwpFrameLayout::GetNextLinkName()
LwpAtomHolder& rHolder = pLayout->GetName();
aName = rHolder.str();
//for division name conflict
- if(!pLayout->GetStyleName().isEmpty())
+ if (!pLayout->GetStyleName().isEmpty())
aName = pLayout->GetStyleName();
}
}
@@ -905,7 +903,7 @@ bool LwpFrameLayout::HasPreviousLinkLayout()
*/
bool LwpFrameLayout::IsForWaterMark()
{
- if(m_nBuoyancy >=LAY_BUOYLAYER)
+ if (m_nBuoyancy >= LAY_BUOYLAYER)
{
if (m_Content.IsNull())
return false;
@@ -925,7 +923,7 @@ bool LwpFrameLayout::IsForWaterMark()
double LwpFrameLayout::GetWidth()
{
double fWidth = LwpMiddleLayout::GetWidth();
- if(IsInlineToMargin() && IsAutoGrowWidth())
+ if (IsInlineToMargin() && IsAutoGrowWidth())
{
//for text field entry when choosing maximize field length
fWidth = GetMaxWidth();
@@ -954,7 +952,7 @@ double LwpFrameLayout::GetMaxWidth()
//Get parent layout width
double fParentWidth = pParent->GetWidth();
- if(pParent->IsCell())
+ if (pParent->IsCell())
{
//Get actual width of this cell layout
fParentWidth = static_cast<LwpCellLayout*>(pParent)->GetActualWidth();
@@ -962,8 +960,8 @@ double LwpFrameLayout::GetMaxWidth()
double fParentMarginRight = 0;
sal_uInt8 nType = GetRelativeType();
- if(nType == LwpLayoutRelativityGuts::LAY_INLINE
- || nType == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE )
+ if (nType == LwpLayoutRelativityGuts::LAY_INLINE
+ || nType == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE)
{
fParentMarginRight = pParent->GetMarginsValue(MARGIN_RIGHT);
}
@@ -979,11 +977,10 @@ double LwpFrameLayout::GetMaxWidth()
* @descr Set frame size according to graphic size
*
*/
-void LwpFrameLayout::ApplyGraphicSize(XFFrame * pXFFrame)
+void LwpFrameLayout::ApplyGraphicSize(XFFrame* pXFFrame)
{
rtl::Reference<LwpObject> content = m_Content.obj();
- if(!(content.is() && (content->GetTag() == VO_GRAPHIC
- || content->GetTag() == VO_OLEOBJECT )))
+ if (!(content.is() && (content->GetTag() == VO_GRAPHIC || content->GetTag() == VO_OLEOBJECT)))
return;
LwpGraphicOleObject* pGraOle = static_cast<LwpGraphicOleObject*>(content.get());
@@ -991,18 +988,18 @@ void LwpFrameLayout::ApplyGraphicSize(XFFrame * pXFFrame)
double fWidth = 0;
double fHeight = 0;
pGraOle->GetGrafScaledSize(fWidth, fHeight);
- if( IsFitGraphic())
+ if (IsFitGraphic())
{
//graphic scaled sze
fWidth += GetMarginsValue(MARGIN_LEFT) + GetMarginsValue(MARGIN_RIGHT);
fHeight += GetMarginsValue(MARGIN_TOP) + GetMarginsValue(MARGIN_BOTTOM);
}
- else if(IsAutoGrowDown() || IsAutoGrowUp())
+ else if (IsAutoGrowDown() || IsAutoGrowUp())
{
fWidth = GetWidth();
fHeight += GetMarginsValue(MARGIN_TOP) + GetMarginsValue(MARGIN_BOTTOM);
}
- else if( IsAutoGrowLeft() || IsAutoGrowRight())
+ else if (IsAutoGrowLeft() || IsAutoGrowRight())
{
fHeight = GetHeight();
fWidth += GetMarginsValue(MARGIN_LEFT) + GetMarginsValue(MARGIN_RIGHT);
@@ -1016,15 +1013,12 @@ void LwpFrameLayout::ApplyGraphicSize(XFFrame * pXFFrame)
pXFFrame->SetHeight(fHeight);
}
-LwpGroupLayout::LwpGroupLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpGroupLayout::LwpGroupLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpPlacableLayout(objHdr, pStrm)
{
-
}
-LwpGroupLayout::~LwpGroupLayout()
-{
-}
+LwpGroupLayout::~LwpGroupLayout() {}
/**
* @descr read group layout object
*
@@ -1056,13 +1050,13 @@ void LwpGroupLayout::RegisterStyle()
* @param: pCont - content container that contains the frame.
*
*/
-void LwpGroupLayout::XFConvert(XFContentContainer *pCont)
+void LwpGroupLayout::XFConvert(XFContentContainer* pCont)
{
- if(!m_pFrame)
+ if (!m_pFrame)
return;
//parse the frame which anchor to paragraph
- if(IsRelativeAnchored())
+ if (IsRelativeAnchored())
{
XFConvertFrame(pCont);
}
@@ -1077,13 +1071,14 @@ void LwpGroupLayout::XFConvert(XFContentContainer *pCont)
* @param: nPageNo - the page number that the frame anchors
*
*/
-void LwpGroupLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart , sal_Int32 nEnd, bool bAll)
+void LwpGroupLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart, sal_Int32 nEnd,
+ bool bAll)
{
- if(!m_pFrame)
+ if (!m_pFrame)
return;
rtl::Reference<XFFrame> xXFFrame;
- if(nEnd < nStart)
+ if (nEnd < nStart)
{
xXFFrame.set(new XFFrame);
}
@@ -1106,30 +1101,27 @@ void LwpGroupLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart
pCont->Add(xXFFrame.get());
}
-LwpGroupFrame::LwpGroupFrame(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- :LwpContent(objHdr, pStrm)
-{}
+LwpGroupFrame::LwpGroupFrame(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpContent(objHdr, pStrm)
+{
+}
-LwpGroupFrame::~LwpGroupFrame()
-{}
+LwpGroupFrame::~LwpGroupFrame() {}
void LwpGroupFrame::Read()
{
LwpContent::Read();
m_pObjStrm->SkipExtra();
-
}
-void LwpGroupFrame::RegisterStyle()
-{
-}
+void LwpGroupFrame::RegisterStyle() {}
-void LwpGroupFrame::XFConvert(XFContentContainer* /*pCont*/)
-{
-}
+void LwpGroupFrame::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpDropcapLayout::LwpDropcapLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- : LwpFrameLayout(objHdr, pStrm), m_nLines(3), m_nChars(1)
+LwpDropcapLayout::LwpDropcapLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpFrameLayout(objHdr, pStrm)
+ , m_nLines(3)
+ , m_nChars(1)
{
}
@@ -1147,7 +1139,7 @@ void LwpDropcapLayout::Parse(IXFStream* pOutputStream)
if (!pStory)
return;
rtl::Reference<LwpObject> pPara = pStory->GetFirstPara().obj(VO_PARA);
- if(pPara.is())
+ if (pPara.is())
{
pPara->SetFoundry(m_pFoundry);
pPara->DoParse(pOutputStream);
@@ -1172,7 +1164,7 @@ void LwpDropcapLayout::RegisterStyle(LwpFoundry* pFoundry)
pStory->SetDropcapFlag(true);
pStory->SetFoundry(pFoundry);
LwpPara* pPara = dynamic_cast<LwpPara*>(pStory->GetFirstPara().obj().get());
- while(pPara)
+ while (pPara)
{
pPara->SetFoundry(pFoundry);
pPara->RegisterStyle();
@@ -1185,11 +1177,9 @@ void LwpDropcapLayout::RegisterStyle(LwpFoundry* pFoundry)
* @descr do nothing
*
*/
-void LwpDropcapLayout::RegisterStyle()
-{
-}
+void LwpDropcapLayout::RegisterStyle() {}
-LwpRubyLayout::LwpRubyLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpRubyLayout::LwpRubyLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpFrameLayout(objHdr, pStrm)
, m_nPlacement(0)
, m_nAlignment(0)
@@ -1242,13 +1232,13 @@ void LwpRubyLayout::RegisterStyle()
{
eType = enumXFRubyLeft;
}
- else if(m_nAlignment == RIGHT)
+ else if (m_nAlignment == RIGHT)
{
- eType = enumXFRubyRight;
+ eType = enumXFRubyRight;
}
- else if(m_nAlignment == CENTER)
+ else if (m_nAlignment == CENTER)
{
- eType = enumXFRubyCenter;
+ eType = enumXFRubyCenter;
}
xRubyStyle->SetAlignment(eType);
@@ -1257,9 +1247,9 @@ void LwpRubyLayout::RegisterStyle()
{
eType = enumXFRubyTop;
}
- else if(m_nPlacement == BOTTOM)
+ else if (m_nPlacement == BOTTOM)
{
- eType = enumXFRubyBottom;
+ eType = enumXFRubyBottom;
}
xRubyStyle->SetPosition(eType);
diff --git a/lotuswordpro/source/filter/lwpframelayout.hxx b/lotuswordpro/source/filter/lwpframelayout.hxx
index af07c5c22ee0..5937c75cbf1e 100644
--- a/lotuswordpro/source/filter/lwpframelayout.hxx
+++ b/lotuswordpro/source/filter/lwpframelayout.hxx
@@ -81,6 +81,7 @@ public:
void RegisterStyle(std::unique_ptr<XFFrameStyle>& rFrameStyle);
void Parse(XFFrame* pXFFrame, sal_Int32 nPageNo);
void XFConvert(XFContentContainer* pCont);
+
private:
void ApplyWrapType(XFFrameStyle* pFrameStyle);
void ApplyMargins(XFFrameStyle* pFrameStyle);
@@ -97,6 +98,7 @@ private:
void ApplyBackGround(XFFrameStyle* pFrameStyle);
void ParseAnchorType(XFFrame* pXFFrame);
bool IsLeftWider();
+
private:
LwpPlacableLayout* m_pLayout;
OUString m_StyleName;
@@ -112,8 +114,9 @@ public:
LwpFrameLink();
~LwpFrameLink();
void Read(LwpObjectStream* pStrm);
- LwpObjectID& GetNextLayout(){ return m_NextLayout;}
- LwpObjectID& GetPreviousLayout(){ return m_PreviousLayout;}
+ LwpObjectID& GetNextLayout() { return m_NextLayout; }
+ LwpObjectID& GetPreviousLayout() { return m_PreviousLayout; }
+
private:
LwpObjectID m_PreviousLayout;
LwpObjectID m_NextLayout;
@@ -123,22 +126,25 @@ private:
* @brief VO_FRAMELAYOUT object
*
*/
-class LwpFrameLayout: public LwpPlacableLayout
+class LwpFrameLayout : public LwpPlacableLayout
{
public:
- LwpFrameLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpFrameLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpFrameLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FRAME_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_FRAME_LAYOUT; }
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
- void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) override;
+ void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0,
+ bool bAll = false) override;
OUString GetNextLinkName();
bool HasPreviousLinkLayout();
bool IsForWaterMark() override;
double GetWidth() override;
void ApplyGraphicSize(XFFrame* pXFFrame);
+
protected:
void Read() override;
+
private:
double GetMaxWidth();
@@ -152,33 +158,36 @@ private:
* @brief VO_GROUPLAYOUT object , information for frame group layout
*
*/
-class LwpGroupLayout: public LwpPlacableLayout
+class LwpGroupLayout : public LwpPlacableLayout
{
public:
- LwpGroupLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpGroupLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpGroupLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_GROUP_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_GROUP_LAYOUT; }
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
- void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) override;
+ void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0,
+ bool bAll = false) override;
+
protected:
void Read() override;
+
private:
std::unique_ptr<LwpFrame> m_pFrame;
-
};
/**
* @brief VO_GROUPFRAME object , information for frame group contents
*
*/
-class LwpGroupFrame: public LwpContent
+class LwpGroupFrame : public LwpContent
{
public:
- LwpGroupFrame(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpGroupFrame(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpGroupFrame() override;
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
+
protected:
void Read() override;
};
@@ -188,17 +197,19 @@ class LwpFoundry;
class LwpDropcapLayout : public LwpFrameLayout
{
public:
- LwpDropcapLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_DROPCAP_LAYOUT;}
+ LwpDropcapLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_DROPCAP_LAYOUT; }
virtual void Parse(IXFStream* pOutputStream) override;
virtual void XFConvert(XFContentContainer* pCont) override;
- sal_uInt16 GetLines() const {return m_nLines;}
- void SetChars(sal_uInt32 nChars){ m_nChars += nChars;}
- sal_uInt32 GetChars() const {return m_nChars;}
+ sal_uInt16 GetLines() const { return m_nLines; }
+ void SetChars(sal_uInt32 nChars) { m_nChars += nChars; }
+ sal_uInt32 GetChars() const { return m_nChars; }
void RegisterStyle(LwpFoundry* pFoundry);
void RegisterStyle() override;
+
protected:
void Read() override;
+
private:
sal_uInt16 m_nLines;
sal_uInt32 m_nChars;
@@ -207,20 +218,23 @@ private:
class LwpRubyLayout : public LwpFrameLayout
{
public:
- LwpRubyLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpRubyLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
LwpRubyMarker* GetMarker();
void ConvertContentText();
LwpStory* GetContentStory();
void RegisterStyle() override;
- enum{
+ enum
+ {
LEFT = 4,
RIGHT = 5,
CENTER = 2,
TOP = 1,
BOTTOM = 3
};
+
protected:
void Read() override;
+
private:
sal_uInt8 m_nPlacement;
sal_uInt8 m_nAlignment;
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index 95875aaedaa1..fb4c47ebd84e 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -80,7 +80,6 @@
#include <osl/diagnose.h>
-
LwpFrib::LwpFrib(LwpPara* pPara)
: m_pFribMap(nullptr)
, m_pPara(pPara)
@@ -93,16 +92,14 @@ LwpFrib::LwpFrib(LwpPara* pPara)
{
}
-LwpFrib::~LwpFrib()
-{
- Deregister();
-}
+LwpFrib::~LwpFrib() { Deregister(); }
-LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt8 fribtag,sal_uInt8 editID)
+LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt8 fribtag,
+ sal_uInt8 editID)
{
//Read Modifier
std::unique_ptr<ModifierInfo> xModInfo;
- if(fribtag & FRIB_TAG_MODIFIER)
+ if (fribtag & FRIB_TAG_MODIFIER)
{
xModInfo.reset(new ModifierInfo);
xModInfo->CodePage = 0;
@@ -118,11 +115,11 @@ LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt
//Read frib data
std::unique_ptr<LwpFrib> newFrib;
sal_uInt16 friblen = pObjStrm->QuickReaduInt16();
- sal_uInt8 fribtype = fribtag&~FRIB_TAG_TYPEMASK;
- switch(fribtype)
+ sal_uInt8 fribtype = fribtag & ~FRIB_TAG_TYPEMASK;
+ switch (fribtype)
{
- case FRIB_TAG_INVALID: //fall through
- case FRIB_TAG_EOP: //fall through
+ case FRIB_TAG_INVALID: //fall through
+ case FRIB_TAG_EOP: //fall through
default:
newFrib.reset(new LwpFrib(pPara));
break;
@@ -207,16 +204,13 @@ LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt
return newFrib.release();
}
-void LwpFrib::Read(LwpObjectStream* pObjStrm, sal_uInt16 len)
-{
- pObjStrm->SeekRel(len);
-}
+void LwpFrib::Read(LwpObjectStream* pObjStrm, sal_uInt16 len) { pObjStrm->SeekRel(len); }
void LwpFrib::SetModifiers(ModifierInfo* pModifiers)
{
if (pModifiers)
{
- m_pModifiers.reset( pModifiers );
+ m_pModifiers.reset(pModifiers);
m_ModFlag = true;
if (pModifiers->RevisionFlag)
{
@@ -245,8 +239,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
XFTextStyle* pNamedStyle = nullptr;
if (m_pModifiers->HasCharStyle && pFoundry)
{
- pNamedStyle = dynamic_cast<XFTextStyle*>
- (pFoundry->GetStyleManager()->GetStyle(m_pModifiers->CharStyleID));
+ pNamedStyle = dynamic_cast<XFTextStyle*>(
+ pFoundry->GetStyleManager()->GetStyle(m_pModifiers->CharStyleID));
}
if (pNamedStyle)
{
@@ -259,7 +253,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
*pNewStyle = *pNamedStyle;
pNewStyle->SetStyleName("");
- pFont = pFoundry->GetFontManager().CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID);
+ pFont = pFoundry->GetFontManager().CreateOverrideFont(pCharStyle->GetFinalFontID(),
+ m_pModifiers->FontID);
pNewStyle->SetFont(pFont);
IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(std::move(pNewStyle));
m_StyleName = aNewStyle.m_pStyle->GetStyleName();
@@ -268,7 +263,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
pStyle = nullptr;
}
else
- m_StyleName = pNamedStyle->GetStyleName();
+ m_StyleName = pNamedStyle->GetStyleName();
}
else
{
@@ -288,8 +283,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
if (!m_pModifiers->HasHighlight)
return;
- XFColor aColor = GetHighlightColor();//right yellow
- if (pStyle)//change the style directly
+ XFColor aColor = GetHighlightColor(); //right yellow
+ if (pStyle) //change the style directly
pStyle->GetFont()->SetBackColor(aColor);
else //register a new style
{
@@ -311,9 +306,9 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
}
}
-void LwpFrib::ReadModifiers(LwpObjectStream* pObjStrm,ModifierInfo* pModInfo)
+void LwpFrib::ReadModifiers(LwpObjectStream* pObjStrm, ModifierInfo* pModInfo)
{
- for(;;)
+ for (;;)
{
bool bFailure;
@@ -380,28 +375,26 @@ void LwpFrib::ReadModifiers(LwpObjectStream* pObjStrm,ModifierInfo* pModInfo)
* @descr: Whether there are other fribs following current frib.
* @return: True if having following fribs, or false.
*/
-bool LwpFrib::HasNextFrib()
-{
- return GetNext() && GetNext()->GetType() != FRIB_TAG_EOP;
-}
+bool LwpFrib::HasNextFrib() { return GetNext() && GetNext()->GetType() != FRIB_TAG_EOP; }
-void LwpFrib::ConvertChars(XFContentContainer* pXFPara,const OUString& text)
+void LwpFrib::ConvertChars(XFContentContainer* pXFPara, const OUString& text)
{
if (m_ModFlag)
{
OUString strStyleName = GetStyleName();
- XFTextSpan *pSpan = new XFTextSpan(text,strStyleName);
+ XFTextSpan* pSpan = new XFTextSpan(text, strStyleName);
pXFPara->Add(pSpan);
}
else
{
- XFTextContent *pSpan = new XFTextContent();
+ XFTextContent* pSpan = new XFTextContent();
pSpan->SetText(text);
pXFPara->Add(pSpan);
}
}
-void LwpFrib::ConvertHyperLink(XFContentContainer* pXFPara, const LwpHyperlinkMgr* pHyperlink,const OUString& text)
+void LwpFrib::ConvertHyperLink(XFContentContainer* pXFPara, const LwpHyperlinkMgr* pHyperlink,
+ const OUString& text)
{
XFHyperlink* pHyper = new XFHyperlink;
pHyper->SetHRef(pHyperlink->GetHyperlink());
@@ -417,7 +410,7 @@ void LwpFrib::ConvertHyperLink(XFContentContainer* pXFPara, const LwpHyperlinkMg
rtl::Reference<XFFont> LwpFrib::GetFont()
{
rtl::Reference<XFFont> pFont;
- if(m_pModifiers&&m_pModifiers->FontID)
+ if (m_pModifiers && m_pModifiers->FontID)
{
LwpFoundry* pFoundry = m_pPara->GetFoundry();
if (pFoundry)
@@ -443,7 +436,7 @@ XFColor LwpFrib::GetHighlightColor()
return pGlobal->GetHighlightColor(m_nEditor);
}
-void LwpFrib::Register(std::map<LwpFrib*,OUString>* pFribMap)
+void LwpFrib::Register(std::map<LwpFrib*, OUString>* pFribMap)
{
if (m_pFribMap)
throw std::runtime_error("registered already");
diff --git a/lotuswordpro/source/filter/lwpfribbreaks.cxx b/lotuswordpro/source/filter/lwpfribbreaks.cxx
index 8afc98eb1d1a..52dd3e8ae1d1 100644
--- a/lotuswordpro/source/filter/lwpfribbreaks.cxx
+++ b/lotuswordpro/source/filter/lwpfribbreaks.cxx
@@ -65,31 +65,32 @@
#include <xfilter/xfstylemanager.hxx>
#include <lwpglobalmgr.hxx>
-void LwpFribColumnBreak::RegisterBreakStyle(LwpPara * pPara)
+void LwpFribColumnBreak::RegisterBreakStyle(LwpPara* pPara)
{
-// XFParaStyle* pBaseStyle = static_cast<XFParaStyle*>(pFoundry->GetStyleManager()->GetStyle(styleID));
- XFParaStyle* pBaseStyle = pPara->GetXFParaStyle();
- if (pBaseStyle == nullptr) return;
-// m_StyleName = pBaseStyle->GetStyleName();
+ // XFParaStyle* pBaseStyle = static_cast<XFParaStyle*>(pFoundry->GetStyleManager()->GetStyle(styleID));
+ XFParaStyle* pBaseStyle = pPara->GetXFParaStyle();
+ if (pBaseStyle == nullptr)
+ return;
+ // m_StyleName = pBaseStyle->GetStyleName();
- std::unique_ptr<XFParaStyle> pOverStyle( new XFParaStyle );
+ std::unique_ptr<XFParaStyle> pOverStyle(new XFParaStyle);
*pOverStyle = *pBaseStyle;
pOverStyle->SetStyleName("");
//New code
LwpStory* pStory = dynamic_cast<LwpStory*>(pPara->GetStoryID().obj().get());
LwpPageLayout* pCurLayout = pStory ? pStory->GetCurrentLayout() : nullptr;
- if( pCurLayout && (pCurLayout->GetNumCols() == 1) )
+ if (pCurLayout && (pCurLayout->GetNumCols() == 1))
{
-// if (!GetNext() || GetNext()->GetType()==FRIB_TAG_EOP)
- pOverStyle->SetBreaks(enumXFBreakBefPage);
-// else
-// pOverStyle->SetBreaks(enumXFBreakBefPage);
+ // if (!GetNext() || GetNext()->GetType()==FRIB_TAG_EOP)
+ pOverStyle->SetBreaks(enumXFBreakBefPage);
+ // else
+ // pOverStyle->SetBreaks(enumXFBreakBefPage);
}
else
{
- if (!GetNext() || GetNext()->GetType()==FRIB_TAG_EOP)
+ if (!GetNext() || GetNext()->GetType() == FRIB_TAG_EOP)
pOverStyle->SetBreaks(enumXFBreakAftColumn);
else
pOverStyle->SetBreaks(enumXFBreakBefColumn);
@@ -98,29 +99,29 @@ void LwpFribColumnBreak::RegisterBreakStyle(LwpPara * pPara)
m_StyleName = pXFStyleManager->AddStyle(std::move(pOverStyle)).m_pStyle->GetStyleName();
}
-LwpFribPageBreak::LwpFribPageBreak( LwpPara* pPara )
- : LwpFrib(pPara), m_bLastFrib(false)
+LwpFribPageBreak::LwpFribPageBreak(LwpPara* pPara)
+ : LwpFrib(pPara)
+ , m_bLastFrib(false)
{
}
-LwpFribPageBreak::~LwpFribPageBreak()
-{
-}
+LwpFribPageBreak::~LwpFribPageBreak() {}
-void LwpFribPageBreak::Read(LwpObjectStream * pObjStrm, sal_uInt16 /*len*/)
+void LwpFribPageBreak::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
{
m_Layout.ReadIndexed(pObjStrm);
}
void LwpFribPageBreak::RegisterBreakStyle(LwpPara* pPara)
{
- XFParaStyle* pBaseStyle = pPara->GetXFParaStyle();
- if (pBaseStyle == nullptr) return;
+ XFParaStyle* pBaseStyle = pPara->GetXFParaStyle();
+ if (pBaseStyle == nullptr)
+ return;
LwpPageLayout* pLayout = dynamic_cast<LwpPageLayout*>(m_Layout.obj().get());
- if(pLayout)
+ if (pLayout)
{
- m_pMasterPage.reset( new LwpMasterPage(pPara, pLayout) );
+ m_pMasterPage.reset(new LwpMasterPage(pPara, pLayout));
m_pMasterPage->RegisterMasterPage(this);
return;
}
@@ -130,7 +131,7 @@ void LwpFribPageBreak::RegisterBreakStyle(LwpPara* pPara)
pOverStyle->SetStyleName("");
pOverStyle->SetMasterPage(pBaseStyle->GetMasterPage());
- if (!GetNext() || GetNext()->GetType()==FRIB_TAG_EOP)
+ if (!GetNext() || GetNext()->GetType() == FRIB_TAG_EOP)
m_bLastFrib = true;
else
m_bLastFrib = false;
@@ -146,7 +147,7 @@ void LwpFribPageBreak::RegisterBreakStyle(LwpPara* pPara)
void LwpFribPageBreak::ParseLayout()
{
- if(m_pMasterPage)
+ if (m_pMasterPage)
{
m_pMasterPage->ParseSection(this);
}
diff --git a/lotuswordpro/source/filter/lwpfribframe.cxx b/lotuswordpro/source/filter/lwpfribframe.cxx
index 8a94efb8cbda..ad494d429883 100644
--- a/lotuswordpro/source/filter/lwpfribframe.cxx
+++ b/lotuswordpro/source/filter/lwpfribframe.cxx
@@ -74,10 +74,7 @@ void LwpFribFrame::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
* @descr: Get the layout object which the frib points to
*
*/
-rtl::Reference<LwpObject> LwpFribFrame::GetLayout() const
-{
- return m_objLayout.obj();
-}
+rtl::Reference<LwpObject> LwpFribFrame::GetLayout() const { return m_objLayout.obj(); }
/**
* @descr: register frame style
@@ -90,7 +87,7 @@ void LwpFribFrame::RegisterStyle(LwpFoundry* pFoundry)
if (pObject.is() && pObject->GetTag() == VO_DROPCAPLAYOUT)
{
- LwpDropcapLayout *pLayout = dynamic_cast<LwpDropcapLayout*>(pObject.get());
+ LwpDropcapLayout* pLayout = dynamic_cast<LwpDropcapLayout*>(pObject.get());
if (!pLayout)
return;
pLayout->RegisterStyle(pFoundry);
@@ -106,8 +103,7 @@ void LwpFribFrame::RegisterStyle(LwpFoundry* pFoundry)
//register next frib text style
sal_uInt8 nType = pLayout->GetRelativeType();
- if(LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType
- && HasNextFrib())
+ if (LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType && HasNextFrib())
{
XFParaStyle* pOldStyle = m_pPara->GetXFParaStyle();
if (pOldStyle->GetMasterPage().isEmpty())
@@ -117,7 +113,8 @@ void LwpFribFrame::RegisterStyle(LwpFoundry* pFoundry)
std::unique_ptr<XFParaStyle> pParaStyle(new XFParaStyle);
*pParaStyle = *pOldStyle;
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(std::move(pParaStyle)).m_pStyle->GetStyleName();
+ m_StyleName
+ = pXFStyleManager->AddStyle(std::move(pParaStyle)).m_pStyle->GetStyleName();
}
}
//remember the current paragraph font size which will be used in parsing frame
@@ -148,7 +145,7 @@ void LwpFribFrame::XFConvert(XFContentContainer* pCont)
if (!pLayout)
return;
sal_uInt8 nType = pLayout->GetRelativeType();
- if( LwpLayoutRelativityGuts::LAY_PARA_RELATIVE == nType)
+ if (LwpLayoutRelativityGuts::LAY_PARA_RELATIVE == nType)
{
rtl::Reference<LwpVirtualLayout> xContainerLayout(pLayout->GetContainerLayout());
if (xContainerLayout.is() && xContainerLayout->IsFrame())
@@ -159,15 +156,14 @@ void LwpFribFrame::XFConvert(XFContentContainer* pCont)
else if (xContainerLayout.is() && xContainerLayout->IsCell())
{
//same page as text and in cell, get the first xfpara
- rtl::Reference<XFContent> first(
- pCont->FindFirstContent(enumXFContentPara));
+ rtl::Reference<XFContent> first(pCont->FindFirstContent(enumXFContentPara));
XFContentContainer* pXFFirtPara = static_cast<XFContentContainer*>(first.get());
- if(pXFFirtPara)
+ if (pXFFirtPara)
pXFContentContainer = pXFFirtPara;
}
}
OUString sChangeID;
- if(m_bRevisionFlag)
+ if (m_bRevisionFlag)
{
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
@@ -182,7 +178,7 @@ void LwpFribFrame::XFConvert(XFContentContainer* pCont)
pLayout->DoXFConvert(pXFContentContainer);
- if(m_bRevisionFlag)
+ if (m_bRevisionFlag)
{
if (!sChangeID.isEmpty())
{
@@ -192,15 +188,13 @@ void LwpFribFrame::XFConvert(XFContentContainer* pCont)
}
}
- if(LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType
- && HasNextFrib())
+ if (LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType && HasNextFrib())
{
XFParagraph* pXFPara = new XFParagraph();
pXFPara->SetStyleName(m_StyleName);
m_pPara->AddXFContent(pXFPara);
m_pPara->GetFribs().SetXFPara(pXFPara);
}
-
}
/**
diff --git a/lotuswordpro/source/filter/lwpfribframe.hxx b/lotuswordpro/source/filter/lwpfribframe.hxx
index e1834644a4d4..1b4e26bce9e4 100644
--- a/lotuswordpro/source/filter/lwpfribframe.hxx
+++ b/lotuswordpro/source/filter/lwpfribframe.hxx
@@ -68,12 +68,16 @@
class LwpFribFrame : public LwpFrib
{
public:
- explicit LwpFribFrame( LwpPara* pPara) : LwpFrib(pPara){}
+ explicit LwpFribFrame(LwpPara* pPara)
+ : LwpFrib(pPara)
+ {
+ }
void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
rtl::Reference<LwpObject> GetLayout() const;
void RegisterStyle(LwpFoundry* pFoundry) override;
void SetParaDropcap(LwpPara* pPara);
void XFConvert(XFContentContainer* pCont);
+
private:
LwpObjectID m_objLayout;
};
@@ -81,11 +85,15 @@ private:
class LwpFribRubyFrame : public LwpFrib
{
public:
- explicit LwpFribRubyFrame(LwpPara* pPara) : LwpFrib(pPara){}
+ explicit LwpFribRubyFrame(LwpPara* pPara)
+ : LwpFrib(pPara)
+ {
+ }
void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
LwpRubyLayout* GetLayout();
void RegisterStyle(LwpFoundry* pFoundry) override;
void XFConvert();
+
private:
LwpObjectID m_objLayout;
};
diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx
index 9ee9fb9c3e58..093d462fb29a 100644
--- a/lotuswordpro/source/filter/lwpfribmark.cxx
+++ b/lotuswordpro/source/filter/lwpfribmark.cxx
@@ -86,7 +86,7 @@ void LwpFribCHBlock::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
m_nType = pObjStrm->QuickReaduInt8();
}
-void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara,LwpStory* pStory)
+void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara, LwpStory* pStory)
{
sal_uInt8 type = GetType();
if (!pStory)
@@ -96,7 +96,7 @@ void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara,LwpStory* pStory)
if (!pMarker)
return;
sal_uInt16 nAction = pMarker->GetAction();
- if (nAction == LwpCHBlkMarker::CLICKHERE_CHBEHAVIORINTERNETLINK)//hyperlink
+ if (nAction == LwpCHBlkMarker::CLICKHERE_CHBEHAVIORINTERNETLINK) //hyperlink
{
LwpHyperlinkMgr* pHyperlink = pStory->GetHyperlinkMgr();
if (type == MARKER_START)
@@ -107,20 +107,20 @@ void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara,LwpStory* pStory)
pHyperlink->SetHyperlink(pMarker->GetNamedProperty("URL"));
}
}
- else if (type == MARKER_END)//or none
+ else if (type == MARKER_END) //or none
{
pHyperlink->SetHyperlinkFlag(false);
}
}
- else//click here block
+ else //click here block
{
- pMarker->ConvertCHBlock(pXFPara,type);
+ pMarker->ConvertCHBlock(pXFPara, type);
}
}
/**
* @short: register bookmark frib
*/
-void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry)
+void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry)
{
OUString name;
LwpBookMark* pBook = pFoundry ? pFoundry->GetBookMark(GetMarkerID()) : nullptr;
@@ -134,7 +134,7 @@ void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry)
LwpObjectID& rID = pDoc->GetDivInfoID();
if (!rID.IsNull())
{
- LwpDivInfo *pDivInvo = dynamic_cast<LwpDivInfo*>(rID.obj(VO_DIVISIONINFO).get());
+ LwpDivInfo* pDivInvo = dynamic_cast<LwpDivInfo*>(rID.obj(VO_DIVISIONINFO).get());
if (pDivInvo)
sDivision = pDivInvo->GetDivName();
}
@@ -149,20 +149,20 @@ void LwpFribBookMark::RegisterStyle(LwpFoundry* pFoundry)
rtl::Reference<XFBookmarkStart> xMarkStart(new XFBookmarkStart);
xMarkStart->SetDivision(sDivision);
xMarkStart->SetName(name);
- pMarkMgr->AddXFBookmarkStart(name, xMarkStart.get());//add to map
+ pMarkMgr->AddXFBookmarkStart(name, xMarkStart.get()); //add to map
m_xStart = xMarkStart;
}
- else if(type == MARKER_END)
+ else if (type == MARKER_END)
{
rtl::Reference<XFBookmarkEnd> xMarkEnd(new XFBookmarkEnd);
xMarkEnd->SetDivision(sDivision);
xMarkEnd->SetName(name);
- pMarkMgr->AddXFBookmarkEnd(name, xMarkEnd.get()); //add to map
+ pMarkMgr->AddXFBookmarkEnd(name, xMarkEnd.get()); //add to map
m_xEnd = xMarkEnd;
}
}
-LwpFribBookMark::LwpFribBookMark(LwpPara* pPara )
+LwpFribBookMark::LwpFribBookMark(LwpPara* pPara)
: LwpFrib(pPara)
, m_nType(0)
{
@@ -187,7 +187,7 @@ void LwpFribBookMark::XFConvert(XFContentContainer* pXFPara)
{
pXFPara->Add(m_xStart.get());
}
- else if(type == MARKER_END && m_xEnd)
+ else if (type == MARKER_END && m_xEnd)
{
pXFPara->Add(m_xEnd.get());
}
@@ -196,7 +196,7 @@ void LwpFribBookMark::XFConvert(XFContentContainer* pXFPara)
/**
* @short: Read index entry frib
*/
-LwpFribField::LwpFribField( LwpPara* pPara )
+LwpFribField::LwpFribField(LwpPara* pPara)
: LwpFrib(pPara)
, m_nType(0)
, m_TimeStyle("")
@@ -229,7 +229,7 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara)
sal_uInt16 fieldType = pFieldMark->GetFieldType();
OUString sChangeID;
- if(pFieldMark->GetRevisionFlag())
+ if (pFieldMark->GetRevisionFlag())
{
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
@@ -244,7 +244,7 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara)
return;
if (pFieldMark->IsFormulaInsert())
{
- XFTextContent *pSpan = new XFTextContent();
+ XFTextContent* pSpan = new XFTextContent();
pSpan->SetText(">");
pXFPara->Add(pSpan);
}
@@ -252,18 +252,18 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara)
{
if (m_nSubType == SUBFIELD_DATETIME)
{
- ConvertDateTimeEnd(pXFPara,pFieldMark);
+ ConvertDateTimeEnd(pXFPara, pFieldMark);
}
else if (m_nSubType == SUBFIELD_CROSSREF)
{
- ConvertCrossRefEnd(pXFPara,pFieldMark);
+ ConvertCrossRefEnd(pXFPara, pFieldMark);
}
else if (m_nSubType == SUBFIELD_DOCPOWER)
{
- ConvertDocFieldEnd(pXFPara,pFieldMark);
+ ConvertDocFieldEnd(pXFPara, pFieldMark);
}
}
- if(pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
+ if (pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
{
XFChangeEnd* pChangeEnd = new XFChangeEnd;
pChangeEnd->SetChangeID(sChangeID);
@@ -274,7 +274,7 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara)
}
//start marker
- if(pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
+ if (pFieldMark->GetRevisionFlag() && !sChangeID.isEmpty())
{
XFChangeStart* pChangeStart = new XFChangeStart;
pChangeStart->SetChangeID(sChangeID);
@@ -283,20 +283,20 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara)
if (fieldType == LwpFieldMark::FLD_INDEX)
{
- OUString sKey1,sKey2;
- pFieldMark->ParseIndex(sKey1,sKey2);
+ OUString sKey1, sKey2;
+ pFieldMark->ParseIndex(sKey1, sKey2);
if (!sKey1.isEmpty())
{
XFEntry* pEntry = new XFEntry;
pEntry->SetEntryType(enumXFEntryAlphabetical);
- pEntry->SetKey(sKey1,sKey2);
+ pEntry->SetKey(sKey1, sKey2);
pXFPara->Add(pEntry);
}
}
else if (fieldType == LwpFieldMark::FLD_TOC)
{
- OUString sLevel,sText;
- pFieldMark->ParseTOC(sLevel,sText);
+ OUString sLevel, sText;
+ pFieldMark->ParseTOC(sLevel, sText);
if (!sLevel.isEmpty() && !sText.isEmpty())
{
XFEntry* pEntry = new XFEntry;
@@ -310,25 +310,25 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara)
{
sal_uInt8 nDatetype;
OUString sFormula;
- /*sal_Bool bIsDateTime =*/ pFieldMark->IsDateTimeField(nDatetype,sFormula);
+ /*sal_Bool bIsDateTime =*/pFieldMark->IsDateTimeField(nDatetype, sFormula);
- if (m_nSubType == SUBFIELD_DATETIME)//date time
+ if (m_nSubType == SUBFIELD_DATETIME) //date time
{
- ConvertDateTimeStart(pXFPara,pFieldMark);
+ ConvertDateTimeStart(pXFPara, pFieldMark);
}
- else if (m_nSubType == SUBFIELD_CROSSREF)//cross ref
+ else if (m_nSubType == SUBFIELD_CROSSREF) //cross ref
{
- ConvertCrossRefStart(pXFPara,pFieldMark);
+ ConvertCrossRefStart(pXFPara, pFieldMark);
}
else if (m_nSubType == SUBFIELD_DOCPOWER)
{
- ConvertDocFieldStart(pXFPara,pFieldMark);
+ ConvertDocFieldStart(pXFPara, pFieldMark);
}
}
if (pFieldMark->IsFormulaInsert())
{
- XFTextContent *pSpan = new XFTextContent();
+ XFTextContent* pSpan = new XFTextContent();
pSpan->SetText("<");
pXFPara->Add(pSpan);
}
@@ -363,8 +363,9 @@ void LwpFribField::RegisterStyle(LwpFoundry* pFoundry)
void LwpFribField::RegisterTimeField(const LwpFieldMark* pFieldMark)
{
- OUString sFormula = pFieldMark->GetFormula();//now bookmark maybe not all register to bookmarkmgr,
- if (sFormula == "TotalEditingTime")//so check field type now is not correct.
+ OUString sFormula
+ = pFieldMark->GetFormula(); //now bookmark maybe not all register to bookmarkmgr,
+ if (sFormula == "TotalEditingTime") //so check field type now is not correct.
RegisterTotalTimeStyle();
else
{
@@ -372,15 +373,15 @@ void LwpFribField::RegisterTimeField(const LwpFieldMark* pFieldMark)
if (index < 0)
return;
- OUString tag = sFormula.copy(0,index);
- if (tag == "Now()" || tag == "CreateDate" || tag == "EditDate")
- RegisterDateTimeStyle(sFormula.copy(index+1));
+ OUString tag = sFormula.copy(0, index);
+ if (tag == "Now()" || tag == "CreateDate" || tag == "EditDate")
+ RegisterDateTimeStyle(sFormula.copy(index + 1));
}
}
void LwpFribField::RegisterTotalTimeStyle()
{
- std::unique_ptr<XFTimeStyle> pTimeStyle(new XFTimeStyle);//use the default format
+ std::unique_ptr<XFTimeStyle> pTimeStyle(new XFTimeStyle); //use the default format
pTimeStyle->SetTruncate(false);
pTimeStyle->AddMinute();
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
@@ -391,8 +392,8 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
{
std::unique_ptr<XFDateStyle> pDateStyle;
std::unique_ptr<XFTimeStyle> pTimeStyle;
-//DATE
- if (sFormula.getLength()<2)
+ //DATE
+ if (sFormula.getLength() < 2)
return;
if (sFormula[1] == 'F')
{
@@ -404,7 +405,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
{
pDateStyle = LwpTools::GetSystemDateStyle(true);
}
- else if (sFormula == "%FLISODate1" || sFormula == "%FLYYYY/MM/DD" )
+ else if (sFormula == "%FLISODate1" || sFormula == "%FLYYYY/MM/DD")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear();
@@ -413,7 +414,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText("/");
pDateStyle->AddMonthDay();
}
- else if (sFormula == "%FLISODate2" || sFormula == "%FLYYYY/MM/DD HH:mm:SS" )
+ else if (sFormula == "%FLISODate2" || sFormula == "%FLYYYY/MM/DD HH:mm:SS")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear();
@@ -440,7 +441,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%FLMonth D, YYYY")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -451,7 +452,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(", ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -460,7 +461,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%FLMn D, YYYY")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -471,7 +472,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay(false);
pDateStyle->AddText(", ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -480,7 +481,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%FLMn D")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
@@ -489,14 +490,14 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(", ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
else if (sFormula == "%FLMn D, YY")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -519,7 +520,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%FLMn YY")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear(false);
}
@@ -536,12 +537,12 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%FLMonth")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
}
else if (sFormula == "%FLMn")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
}
else if (sFormula == "%FLD")
{
@@ -553,7 +554,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonth(false);
}
- else if (sFormula == "%FLYYYY" )
+ else if (sFormula == "%FLYYYY")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear();
@@ -573,43 +574,43 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText("-");
pDateStyle->AddMonthDay(false);
}
- else if(sFormula == "%FLYYYY Month D")
+ else if (sFormula == "%FLYYYY Month D")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
- else if(sFormula == "%FLWeekday, YYYY Month D")
+ else if (sFormula == "%FLWeekday, YYYY Month D")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(",");
pDateStyle->AddYear();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
- else if(sFormula == "%FLYYYY Mn D")
+ else if (sFormula == "%FLYYYY Mn D")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
- else if(sFormula == "%FLWday, YYYY Mn D")
+ else if (sFormula == "%FLWday, YYYY Mn D")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay(false);
pDateStyle->AddText(",");
pDateStyle->AddYear();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
@@ -619,7 +620,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
@@ -635,7 +636,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonth(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
}
else if (sFormula == "%FLeeeeoa" || sFormula == "%FLffffooaa" || sFormula == "%FLEEEEOA")
{
@@ -651,7 +652,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
sText = OUString(u'\x65e5');
pDateStyle->AddText(sText);
}
- else if (sFormula == "%FLoa" || sFormula == "%FLooaa" || sFormula == "%FLOA" )
+ else if (sFormula == "%FLoa" || sFormula == "%FLooaa" || sFormula == "%FLOA")
{
pDateStyle.reset(new XFDateStyle);
OUString sText;
@@ -671,7 +672,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText("-");
pDateStyle->AddMonthDay(false);
}
- else if (sFormula == "%FLYY.M.D" )
+ else if (sFormula == "%FLYY.M.D")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear(false);
@@ -682,29 +683,29 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
}
//chinese version end
//other version begin
- else if (sFormula == "%FLWeekday, Month DD, YYYY" )
+ else if (sFormula == "%FLWeekday, Month DD, YYYY")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(", ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay();
pDateStyle->AddText(", ");
pDateStyle->AddYear();
}
- else if (sFormula == "%FLYYYY/MM/DD" )
+ else if (sFormula == "%FLYYYY/MM/DD")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(", ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay();
pDateStyle->AddText(", ");
pDateStyle->AddYear();
}
- else if (sFormula == "%FLD/M/YY" )
+ else if (sFormula == "%FLD/M/YY")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
@@ -718,7 +719,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -727,7 +728,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -738,7 +739,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(", ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -749,7 +750,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(", ");
pDateStyle->AddMonthDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -758,7 +759,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -769,7 +770,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(", ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -780,7 +781,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(", ");
pDateStyle->AddMonthDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -789,14 +790,14 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
}
else if (sFormula == "%FLDD Mn")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
}
else if (sFormula == "%FLWeekday, D Mn")
{
@@ -805,7 +806,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(", ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
}
else if (sFormula == "%FLWeekday, DD Mn")
{
@@ -814,14 +815,14 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(", ");
pDateStyle->AddMonthDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
}
else if (sFormula == "%FLD Mn YY")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear(false);
}
@@ -830,7 +831,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(false,true);
+ pDateStyle->AddMonth(false, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear(false);
}
@@ -848,7 +849,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText("/");
pDateStyle->AddMonth();
}
- else if(sFormula == "%FLDD/MM/YY")
+ else if (sFormula == "%FLDD/MM/YY")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay();
@@ -865,7 +866,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddYear(false);
}
//other version end
- //TIME
+ //TIME
else if (sFormula == "%FLSystemTime")
{
pTimeStyle = LwpTools::GetSystemTimeStyle();
@@ -943,8 +944,8 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->SetAmPm(true);
}
//chinese version begin
- else if (sFormula == "%FLjF" || sFormula == "%FLJFF"
- || sFormula == "%FLjjF" || sFormula == "%FLJJFF " )
+ else if (sFormula == "%FLjF" || sFormula == "%FLJFF" || sFormula == "%FLjjF"
+ || sFormula == "%FLJJFF ")
{
pTimeStyle.reset(new XFTimeStyle);
pTimeStyle->AddHour(false);
@@ -955,7 +956,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
sText = OUString(u'\x5206');
pTimeStyle->AddText(sText);
}
- else if (sFormula == "%FLjjjF" || sFormula == "%FLJJJFF" )
+ else if (sFormula == "%FLjjjF" || sFormula == "%FLJJJFF")
{
pTimeStyle.reset(new XFTimeStyle);
pTimeStyle->SetAmPm(true);
@@ -1014,7 +1015,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
}
//other version end
}
- else if(sFormula[1] == 'D')
+ else if (sFormula[1] == 'D')
{
if (sFormula == "%Da")
{
@@ -1023,7 +1024,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%DB" || sFormula == "%Db")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -1034,7 +1035,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -1043,7 +1044,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(", ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(", ");
@@ -1052,7 +1053,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%DE" || sFormula == "%De")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
@@ -1061,7 +1062,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddWeekDay();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
@@ -1086,14 +1087,14 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(".");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
}
else if (sFormula == "%Dj" || sFormula == "%DJ")
{
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddMonthDay(false);
pDateStyle->AddText(".");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddYear();
}
@@ -1102,14 +1103,14 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle.reset(new XFDateStyle);
pDateStyle->AddYear();
pDateStyle->AddText(" ");
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(" ");
pDateStyle->AddMonthDay(false);
}
else if (sFormula == "%DL" || sFormula == "%Dl")
{
pDateStyle.reset(new XFDateStyle);
- pDateStyle->AddMonth(true,true);
+ pDateStyle->AddMonth(true, true);
pDateStyle->AddText(",");
pDateStyle->AddYear();
}
@@ -1132,8 +1133,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->AddMinute();
}
- else if (sFormula == "%T2" || sFormula == "%T6"
- || sFormula == "%T4" || sFormula == "%T8" )
+ else if (sFormula == "%T2" || sFormula == "%T6" || sFormula == "%T4" || sFormula == "%T8")
{
pTimeStyle.reset(new XFTimeStyle);
pTimeStyle->AddHour(false);
@@ -1142,8 +1142,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->SetAmPm(true);
}
- else if (sFormula == "%T3" || sFormula == "%T7"
- || sFormula == "%T5" || sFormula == "%T9")
+ else if (sFormula == "%T3" || sFormula == "%T7" || sFormula == "%T5" || sFormula == "%T9")
{
pTimeStyle.reset(new XFTimeStyle);
pTimeStyle->AddHour();
@@ -1164,19 +1163,19 @@ void LwpFribField::CheckFieldType(LwpFieldMark* pFieldMark)
{
sal_uInt8 nType;
OUString sFormula;
- if (pFieldMark->IsDateTimeField(nType,sFormula))
+ if (pFieldMark->IsDateTimeField(nType, sFormula))
{
m_nDateTimeType = nType;
m_sFormula = sFormula;
m_nSubType = SUBFIELD_DATETIME;
}
- else if (pFieldMark->IsCrossRefField(nType,sFormula))
+ else if (pFieldMark->IsCrossRefField(nType, sFormula))
{
m_nCrossRefType = nType;
m_sFormula = sFormula;
m_nSubType = SUBFIELD_CROSSREF;
}
- else if (pFieldMark->IsDocPowerField(nType,sFormula))
+ else if (pFieldMark->IsDocPowerField(nType, sFormula))
{
m_nDocPowerType = nType;
m_nSubType = SUBFIELD_DOCPOWER;
@@ -1187,10 +1186,10 @@ void LwpFribField::CheckFieldType(LwpFieldMark* pFieldMark)
}
}
-void LwpFribField::ConvertDocFieldStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
+void LwpFribField::ConvertDocFieldStart(XFContentContainer* pXFPara, LwpFieldMark* pFieldMark)
{
XFContent* pContent = nullptr;
- switch(m_nDocPowerType)
+ switch (m_nDocPowerType)
{
case LwpFieldMark::DOC_DESCRIPTION:
{
@@ -1216,7 +1215,7 @@ void LwpFribField::ConvertDocFieldStart(XFContentContainer* pXFPara,LwpFieldMark
if (!pContent)
return;
- if (m_ModFlag)//(m_pModifiers)
+ if (m_ModFlag) //(m_pModifiers)
{
XFTextSpanStart* pSpan = new XFTextSpanStart;
pSpan->SetStyleName(GetStyleName());
@@ -1231,7 +1230,7 @@ void LwpFribField::ConvertDocFieldStart(XFContentContainer* pXFPara,LwpFieldMark
void LwpFribField::ConvertDocFieldEnd(XFContentContainer* pXFPara, const LwpFieldMark* pFieldMark)
{
XFContent* pContent = nullptr;
- switch(m_nDocPowerType)
+ switch (m_nDocPowerType)
{
case LwpFieldMark::DOC_DESCRIPTION:
{
@@ -1267,37 +1266,37 @@ void LwpFribField::ConvertDocFieldEnd(XFContentContainer* pXFPara, const LwpFiel
}
}
-void LwpFribField::ConvertDateTimeStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
+void LwpFribField::ConvertDateTimeStart(XFContentContainer* pXFPara, LwpFieldMark* pFieldMark)
{
XFContent* pContent = nullptr;
- switch(m_nDateTimeType)
+ switch (m_nDateTimeType)
{
- case LwpFieldMark::DATETIME_NOW:
- {
- pContent = new XFDateStart;
- pContent->SetStyleName(m_TimeStyle);
- break;
- }
- case LwpFieldMark::DATETIME_CREATE:
- {
- pContent = new XFCreateTimeStart;
- pContent->SetStyleName(m_TimeStyle);
- break;
- }
- case LwpFieldMark::DATETIME_LASTEDIT:
- {
- pContent = new XFLastEditTimeStart;
- pContent->SetStyleName(m_TimeStyle);
- break;
- }
- case LwpFieldMark::DATETIME_TOTALTIME:
- {
- pContent = new XFTotalEditTimeStart;
- pContent->SetStyleName(m_TimeStyle);
- break;
- }
- default:
- break;
+ case LwpFieldMark::DATETIME_NOW:
+ {
+ pContent = new XFDateStart;
+ pContent->SetStyleName(m_TimeStyle);
+ break;
+ }
+ case LwpFieldMark::DATETIME_CREATE:
+ {
+ pContent = new XFCreateTimeStart;
+ pContent->SetStyleName(m_TimeStyle);
+ break;
+ }
+ case LwpFieldMark::DATETIME_LASTEDIT:
+ {
+ pContent = new XFLastEditTimeStart;
+ pContent->SetStyleName(m_TimeStyle);
+ break;
+ }
+ case LwpFieldMark::DATETIME_TOTALTIME:
+ {
+ pContent = new XFTotalEditTimeStart;
+ pContent->SetStyleName(m_TimeStyle);
+ break;
+ }
+ default:
+ break;
}
if (!pContent)
return;
@@ -1312,13 +1311,12 @@ void LwpFribField::ConvertDateTimeStart(XFContentContainer* pXFPara,LwpFieldMark
}
else
pXFPara->Add(pContent);
-
}
void LwpFribField::ConvertDateTimeEnd(XFContentContainer* pXFPara, const LwpFieldMark* pFieldMark)
{
XFContent* pContent = nullptr;
- switch(m_nDateTimeType)
+ switch (m_nDateTimeType)
{
case LwpFieldMark::DATETIME_NOW:
{
@@ -1354,12 +1352,12 @@ void LwpFribField::ConvertDateTimeEnd(XFContentContainer* pXFPara, const LwpFiel
}
}
-void LwpFribField::ConvertCrossRefStart(XFContentContainer* pXFPara,LwpFieldMark* pFieldMark)
+void LwpFribField::ConvertCrossRefStart(XFContentContainer* pXFPara, LwpFieldMark* pFieldMark)
{
XFCrossRefStart* pRef = new XFCrossRefStart;
pRef->SetRefType(m_nCrossRefType);
pRef->SetMarkName(m_sFormula);
-// pFieldMark->SetStart(sal_True);//for some unusual cases
+ // pFieldMark->SetStart(sal_True);//for some unusual cases
if (m_ModFlag)
{
XFTextSpanStart* pSpan = new XFTextSpanStart;
@@ -1385,9 +1383,9 @@ void LwpFribField::ConvertCrossRefEnd(XFContentContainer* pXFPara, const LwpFiel
pXFPara->Add(pRef);
}
-LwpFribRubyMarker::LwpFribRubyMarker( LwpPara* pPara )
- : LwpFrib(pPara)
- , m_nType(0)
+LwpFribRubyMarker::LwpFribRubyMarker(LwpPara* pPara)
+ : LwpFrib(pPara)
+ , m_nType(0)
{
}
@@ -1411,7 +1409,7 @@ void LwpFribRubyMarker::XFConvert(XFContentContainer* pXFPara)
}
pXFPara->Add(pRubyStart);
}
- else if(type == MARKER_END)
+ else if (type == MARKER_END)
{
XFRubyEnd* pRubyEnd = new XFRubyEnd;
if (pMarker)
@@ -1423,8 +1421,6 @@ void LwpFribRubyMarker::XFConvert(XFContentContainer* pXFPara)
}
}
-void LwpFribRubyMarker::RegisterStyle(LwpFoundry* /*pFoundry*/)
-{
-}
+void LwpFribRubyMarker::RegisterStyle(LwpFoundry* /*pFoundry*/) {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpfribptr.hxx b/lotuswordpro/source/filter/lwpfribptr.hxx
index d59cb81ca0d4..d51ecdbfab75 100644
--- a/lotuswordpro/source/filter/lwpfribptr.hxx
+++ b/lotuswordpro/source/filter/lwpfribptr.hxx
@@ -73,20 +73,23 @@ public:
LwpFribPtr();
~LwpFribPtr();
void ReadPara(LwpObjectStream* pObjStrm);
+
private:
LwpFrib* m_pFribs;
- XFParagraph* m_pXFPara;//Current XFPara used for frib parsing
- LwpPara* m_pPara;//for get foundry
- static void ProcessDropcap(LwpStory* pStory, const LwpFrib* pFrib,sal_uInt32 nLen);
+ XFParagraph* m_pXFPara; //Current XFPara used for frib parsing
+ LwpPara* m_pPara; //for get foundry
+ static void ProcessDropcap(LwpStory* pStory, const LwpFrib* pFrib, sal_uInt32 nLen);
+
public:
void XFConvert();
- void SetXFPara(XFParagraph* Para){m_pXFPara = Para;}
- XFParagraph* GetXFPara(){return m_pXFPara;}
- void SetPara(LwpPara* para){m_pPara=para;}
+ void SetXFPara(XFParagraph* Para) { m_pXFPara = Para; }
+ XFParagraph* GetXFPara() { return m_pXFPara; }
+ void SetPara(LwpPara* para) { m_pPara = para; }
void RegisterStyle();
- LwpFrib* GetFribs(){return m_pFribs;}
+ LwpFrib* GetFribs() { return m_pFribs; }
LwpFrib* HasFrib(sal_uInt8 nType);
- bool ComparePagePosition(LwpVirtualLayout const * pPreLayout, LwpVirtualLayout const * pNextLayout);
+ bool ComparePagePosition(LwpVirtualLayout const* pPreLayout,
+ LwpVirtualLayout const* pNextLayout);
void GatherAllText();
};
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx
index 64399464143f..0e0e34df16f9 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -68,21 +68,18 @@
#include "lwpfribptr.hxx"
#include <lwpglobalmgr.hxx>
-LwpFribSection::LwpFribSection(LwpPara *pPara)
- : LwpFrib(pPara)
+LwpFribSection::LwpFribSection(LwpPara* pPara)
+ : LwpFrib(pPara)
{
-
}
-LwpFribSection::~LwpFribSection()
-{
-}
+LwpFribSection::~LwpFribSection() {}
/**
* @descr: Read section frib information
*
*/
-void LwpFribSection::Read(LwpObjectStream *pObjStrm, sal_uInt16 /*len*/)
+void LwpFribSection::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
{
m_Section.ReadIndexed(pObjStrm);
}
@@ -103,9 +100,9 @@ LwpSection* LwpFribSection::GetSection()
void LwpFribSection::RegisterSectionStyle()
{
LwpPageLayout* pLayout = GetPageLayout();
- if(pLayout)
+ if (pLayout)
{
- m_pMasterPage.reset( new LwpMasterPage(m_pPara, pLayout) );
+ m_pMasterPage.reset(new LwpMasterPage(m_pPara, pLayout));
m_pMasterPage->RegisterMasterPage(this);
}
}
@@ -143,15 +140,15 @@ LwpPageLayout* LwpFribSection::GetPageLayout()
void LwpFribSection::ParseSection()
{
LwpPageLayout* pLayout = GetPageLayout();
- if(pLayout)
+ if (pLayout)
{
// StartWithinColume not support now
LwpLayout::UseWhenType eSectionType = pLayout->GetUseWhenType();
- if(eSectionType==LwpLayout::StartWithinColume)
+ if (eSectionType == LwpLayout::StartWithinColume)
{
return;
}
- if(m_pMasterPage)
+ if (m_pMasterPage)
{
m_pMasterPage->ParseSection(this);
}
@@ -166,69 +163,71 @@ void LwpFribSection::ParseSection()
pIndex->SetIndexType(enumXFIndexAlphabetical);
SetDefaultAlphaIndex(pIndex);
- pStory->AddXFContent( pIndex );
- m_pPara->SetXFContainer( pIndex );
+ pStory->AddXFContent(pIndex);
+ m_pPara->SetXFContainer(pIndex);
}
else
{
XFContentContainer* pContent = pStory->GetXFContent();
- m_pPara->SetXFContainer( pContent );
+ m_pPara->SetXFContainer(pContent);
}
}
}
-void LwpFribSection::SetDefaultAlphaIndex(XFIndex * pXFIndex)
+void LwpFribSection::SetDefaultAlphaIndex(XFIndex* pXFIndex)
{
LwpFoundry* pFoundry = m_pPara->GetFoundry();
OUString styleName = pFoundry->FindActuralStyleName("Separator");
LwpIndexSection* pIndexSection = dynamic_cast<LwpIndexSection*>(m_Section.obj().get());
- XFIndexTemplate * pTemplateSep = new XFIndexTemplate();
+ XFIndexTemplate* pTemplateSep = new XFIndexTemplate();
if (pIndexSection && pIndexSection->IsFormatSeparator())
{
pXFIndex->SetSeparator(true);
- pTemplateSep->AddEntry(enumXFIndexTemplateText,"");
+ pTemplateSep->AddEntry(enumXFIndexTemplateText, "");
}
//pXFIndex->AddTemplate("separator","Separator",pTemplateSep);
- pXFIndex->AddTemplate("separator",styleName,pTemplateSep);
+ pXFIndex->AddTemplate("separator", styleName, pTemplateSep);
styleName = pFoundry->FindActuralStyleName("Primary");
- XFIndexTemplate * pTemplate1 = new XFIndexTemplate();
- pTemplate1->AddEntry(enumXFIndexTemplateText,"");
- pTemplate1->AddEntry(enumXFIndexTemplateTab,"");
- pTemplate1->AddEntry(enumXFIndexTemplatePage,"");
+ XFIndexTemplate* pTemplate1 = new XFIndexTemplate();
+ pTemplate1->AddEntry(enumXFIndexTemplateText, "");
+ pTemplate1->AddEntry(enumXFIndexTemplateTab, "");
+ pTemplate1->AddEntry(enumXFIndexTemplatePage, "");
//pXFIndex->AddTemplate(OUString::number(1),"Primary",pTemplate1);
- pXFIndex->AddTemplate(OUString::number(1),styleName,pTemplate1);
+ pXFIndex->AddTemplate(OUString::number(1), styleName, pTemplate1);
- XFIndexTemplate * pTemplate2 = new XFIndexTemplate();
- pTemplate2->AddEntry(enumXFIndexTemplateText,"");
- pTemplate2->AddEntry(enumXFIndexTemplateTab,"");
- pTemplate2->AddEntry(enumXFIndexTemplatePage,"");
- XFIndexTemplate * pTemplate3 = new XFIndexTemplate();
- pTemplate3->AddEntry(enumXFIndexTemplateText,"");
- pTemplate3->AddEntry(enumXFIndexTemplateTab,"");
- pTemplate3->AddEntry(enumXFIndexTemplatePage,"");
+ XFIndexTemplate* pTemplate2 = new XFIndexTemplate();
+ pTemplate2->AddEntry(enumXFIndexTemplateText, "");
+ pTemplate2->AddEntry(enumXFIndexTemplateTab, "");
+ pTemplate2->AddEntry(enumXFIndexTemplatePage, "");
+ XFIndexTemplate* pTemplate3 = new XFIndexTemplate();
+ pTemplate3->AddEntry(enumXFIndexTemplateText, "");
+ pTemplate3->AddEntry(enumXFIndexTemplateTab, "");
+ pTemplate3->AddEntry(enumXFIndexTemplatePage, "");
if (pIndexSection && pIndexSection->IsFormatRunin())
{
//pXFIndex->AddTemplate(OUString::number(2),"Primary",pTemplate2);
//pXFIndex->AddTemplate(OUString::number(3),"Primary",pTemplate3);
- pXFIndex->AddTemplate(OUString::number(2),styleName,pTemplate2);
- pXFIndex->AddTemplate(OUString::number(3),styleName,pTemplate3);
+ pXFIndex->AddTemplate(OUString::number(2), styleName, pTemplate2);
+ pXFIndex->AddTemplate(OUString::number(3), styleName, pTemplate3);
}
else
{
//pXFIndex->AddTemplate(OUString::number(2),"Secondary",pTemplate2);
//pXFIndex->AddTemplate(OUString::number(3),"Secondary",pTemplate3);
styleName = pFoundry->FindActuralStyleName("Secondary");
- pXFIndex->AddTemplate(OUString::number(2),styleName,pTemplate2);
- pXFIndex->AddTemplate(OUString::number(3),styleName,pTemplate3);
+ pXFIndex->AddTemplate(OUString::number(2), styleName, pTemplate2);
+ pXFIndex->AddTemplate(OUString::number(3), styleName, pTemplate3);
}
}
LwpMasterPage::LwpMasterPage(LwpPara* pPara, LwpPageLayout* pLayout)
- :m_bNewSection(false),m_pPara(pPara),m_pLayout(pLayout)
+ : m_bNewSection(false)
+ , m_pPara(pPara)
+ , m_pLayout(pLayout)
{
}
@@ -240,7 +239,7 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
{
//if there is no other frib after current frib, register master page in starting para of next page
LwpStory* pStory = nullptr;
- if (IsNextPageType()&&(!pFrib->HasNextFrib()))
+ if (IsNextPageType() && (!pFrib->HasNextFrib()))
pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
if (pStory)
@@ -258,9 +257,9 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
xOverStyle->SetStyleName("");
LwpLayout::UseWhenType eUserType = m_pLayout->GetUseWhenType();
- switch(eUserType)
+ switch (eUserType)
{
- case LwpLayout::StartWithinColume://not support now
+ case LwpLayout::StartWithinColume: //not support now
{
m_bNewSection = false;
break;
@@ -271,7 +270,7 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
//bSectionColumns = sal_True;
break;
}
- case LwpLayout::StartOnNextPage://fall through
+ case LwpLayout::StartOnNextPage: //fall through
case LwpLayout::StartOnOddPage: //fall through
case LwpLayout::StartOnEvenPage:
{
@@ -303,7 +302,7 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
m_StyleName = pXFStyleManager->AddStyle(std::move(xOverStyle)).m_pStyle->GetStyleName();
//register section style here
- if(!m_bNewSection)
+ if (!m_bNewSection)
return;
std::unique_ptr<XFSectionStyle> pSectStyle(new XFSectionStyle());
@@ -312,14 +311,16 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
LwpPageLayout* pCurrentLayout = pStory ? pStory->GetCurrentLayout() : nullptr;
if (pCurrentLayout)
{
- double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT) - pCurrentLayout->GetMarginsValue(MARGIN_LEFT);
- double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT) - pCurrentLayout->GetMarginsValue(MARGIN_RIGHT);
+ double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT)
+ - pCurrentLayout->GetMarginsValue(MARGIN_LEFT);
+ double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT)
+ - pCurrentLayout->GetMarginsValue(MARGIN_RIGHT);
pSectStyle->SetMarginLeft(fLeft);
pSectStyle->SetMarginRight(fRight);
}
XFColumns* pColumns = m_pLayout->GetXFColumns();
- if(pColumns)
+ if (pColumns)
{
pSectStyle->SetColumns(pColumns);
}
@@ -349,7 +350,7 @@ bool LwpMasterPage::IsNeedSection()
*/
XFSection* LwpMasterPage::CreateXFSection()
{
- if(m_bNewSection)
+ if (m_bNewSection)
{
//new a section
XFSection* pXFSection = new XFSection();
@@ -369,9 +370,9 @@ void LwpMasterPage::ParseSection(LwpFrib* pFrib)
//XFParagraph * pXFPara = rFribPtr.GetXFPara();
//parse fillerpage text
- if(m_pLayout->HasFillerPageText(m_pPara->GetFoundry()))
+ if (m_pLayout->HasFillerPageText(m_pPara->GetFoundry()))
{
- XFParagraph *pPara = new XFParagraph();
+ XFParagraph* pPara = new XFParagraph();
pPara->SetStyleName(m_FillerPageStyleName);
m_pPara->AddXFContent(pPara);
rFribPtr.SetXFPara(pPara);
@@ -380,40 +381,39 @@ void LwpMasterPage::ParseSection(LwpFrib* pFrib)
}
//create a new section and add it to container
XFContentContainer* pContent = CreateXFSection();
- if(pContent)
+ if (pContent)
{
- LwpStory* pStory = dynamic_cast<LwpStory*> ( m_pPara->GetStoryID().obj().get() );
+ LwpStory* pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
//delete the additional blank para
XFParagraph* pCurrPara = rFribPtr.GetXFPara();
- if(!pCurrPara->HasContents())
+ if (!pCurrPara->HasContents())
{
XFContentContainer* pCurrContainer = m_pPara->GetXFContainer();
- if(pFrib->HasNextFrib() && (pCurrContainer->GetLastContent() == pCurrPara))
+ if (pFrib->HasNextFrib() && (pCurrContainer->GetLastContent() == pCurrPara))
{
pCurrContainer->RemoveLastContent();
}
}
if (pStory)
- pStory->AddXFContent( pContent );
+ pStory->AddXFContent(pContent);
}
else
{
- LwpStory* pStory = dynamic_cast<LwpStory*> ( m_pPara->GetStoryID().obj().get() );
+ LwpStory* pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
pContent = pStory ? pStory->GetXFContent() : nullptr;
}
- if(pContent)
+ if (pContent)
{
- m_pPara->SetXFContainer( pContent );
+ m_pPara->SetXFContainer(pContent);
}
//out put the contents after the section frib in the same para.
- if(pFrib->HasNextFrib())
+ if (pFrib->HasNextFrib())
{
- XFParagraph *pNextPara = new XFParagraph();
+ XFParagraph* pNextPara = new XFParagraph();
pNextPara->SetStyleName(m_StyleName);
m_pPara->AddXFContent(pNextPara);
rFribPtr.SetXFPara(pNextPara);
}
-
}
/**
@@ -423,17 +423,17 @@ void LwpMasterPage::ParseSection(LwpFrib* pFrib)
void LwpMasterPage::RegisterFillerPageStyle()
{
LwpLayout::UseWhenType eUserType = m_pLayout->GetUseWhenType();
- if(eUserType==LwpLayout::StartOnOddPage
- ||eUserType==LwpLayout::StartOnEvenPage)
+ if (eUserType == LwpLayout::StartOnOddPage || eUserType == LwpLayout::StartOnEvenPage)
{
- if(m_pLayout->HasFillerPageText(m_pPara->GetFoundry()))
+ if (m_pLayout->HasFillerPageText(m_pPara->GetFoundry()))
{
std::unique_ptr<XFParaStyle> pPagebreakStyle(new XFParaStyle);
*pPagebreakStyle = *(m_pPara->GetXFParaStyle());
pPagebreakStyle->SetStyleName("");
pPagebreakStyle->SetBreaks(enumXFBreakAftPage);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_FillerPageStyleName= pXFStyleManager->AddStyle(std::move(pPagebreakStyle)).m_pStyle->GetStyleName();
+ m_FillerPageStyleName
+ = pXFStyleManager->AddStyle(std::move(pPagebreakStyle)).m_pStyle->GetStyleName();
}
}
}
@@ -445,9 +445,8 @@ void LwpMasterPage::RegisterFillerPageStyle()
bool LwpMasterPage::IsNextPageType()
{
LwpLayout::UseWhenType eUserType = m_pLayout->GetUseWhenType();
- return eUserType == LwpLayout::StartOnNextPage
- || eUserType == LwpLayout::StartOnOddPage
- || eUserType == LwpLayout::StartOnEvenPage;
+ return eUserType == LwpLayout::StartOnNextPage || eUserType == LwpLayout::StartOnOddPage
+ || eUserType == LwpLayout::StartOnEvenPage;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpfribtable.cxx b/lotuswordpro/source/filter/lwpfribtable.cxx
index a6c50b86f9ee..d94f2f845859 100644
--- a/lotuswordpro/source/filter/lwpfribtable.cxx
+++ b/lotuswordpro/source/filter/lwpfribtable.cxx
@@ -81,7 +81,7 @@ void LwpFribTable::RegisterNewStyle()
if (pSuper)
pSuper->RegisterNewStyle();
XFParaStyle* pOldStyle = m_pPara->GetXFParaStyle();
- if(HasNextFrib())
+ if (HasNextFrib())
{
if (pOldStyle->GetMasterPage().isEmpty())
m_StyleName = pOldStyle->GetStyleName();
@@ -105,21 +105,20 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
rtl::Reference<LwpVirtualLayout> xContainer(pSuper->GetContainerLayout());
if (!xContainer.is())
return;
- if ( LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType
- && !xContainer->IsCell())
+ if (LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType && !xContainer->IsCell())
{
pXFContentContainer = m_pPara->GetXFContainer();
//delete the additional blank para
XFParagraph* pCurrPara = m_pPara->GetFribs().GetXFPara();
if (pXFContentContainer && !pCurrPara->HasContents())
{
- if(pXFContentContainer->GetLastContent() == pCurrPara)
+ if (pXFContentContainer->GetLastContent() == pCurrPara)
{
pXFContentContainer->RemoveLastContent();
}
}
}
- else if( LwpLayoutRelativityGuts::LAY_PARA_RELATIVE == nType)
+ else if (LwpLayoutRelativityGuts::LAY_PARA_RELATIVE == nType)
{
//same page as text and in frame
if (xContainer->IsFrame())
@@ -129,15 +128,14 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
else if (xContainer->IsCell())
{
//same page as text and in cell, get the first xfpara
- rtl::Reference<XFContent> first(
- pCont->FindFirstContent(enumXFContentPara));
+ rtl::Reference<XFContent> first(pCont->FindFirstContent(enumXFContentPara));
XFContentContainer* pXFFirtPara = static_cast<XFContentContainer*>(first.get());
- if(pXFFirtPara)
+ if (pXFFirtPara)
pXFContentContainer = pXFFirtPara;
}
}
OUString sChangeID;
- if(m_bRevisionFlag)
+ if (m_bRevisionFlag)
{
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
@@ -153,7 +151,7 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
if (pXFContentContainer)
pSuper->XFConvert(pXFContentContainer);
- if(m_bRevisionFlag)
+ if (m_bRevisionFlag)
{
if (!sChangeID.isEmpty() && pXFContentContainer)
{
@@ -163,15 +161,13 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
}
}
- if(LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType
- && HasNextFrib())
+ if (LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE == nType && HasNextFrib())
{
rtl::Reference<XFParagraph> xXFPara(new XFParagraph);
xXFPara->SetStyleName(m_StyleName);
m_pPara->AddXFContent(xXFPara.get());
m_pPara->GetFribs().SetXFPara(xXFPara.get());
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpfribtable.hxx b/lotuswordpro/source/filter/lwpfribtable.hxx
index cdc62744cb6a..82eb91cb61dc 100644
--- a/lotuswordpro/source/filter/lwpfribtable.hxx
+++ b/lotuswordpro/source/filter/lwpfribtable.hxx
@@ -62,11 +62,15 @@ class LwpSuperTableLayout;
class LwpFribTable : public LwpFrib
{
public:
- explicit LwpFribTable( LwpPara* pPara ) : LwpFrib(pPara){}
+ explicit LwpFribTable(LwpPara* pPara)
+ : LwpFrib(pPara)
+ {
+ }
void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
LwpSuperTableLayout* GetSuperTable();
void RegisterNewStyle();
void XFConvert(XFContentContainer* pCont);
+
private:
LwpObjectID m_objTable;
};
diff --git a/lotuswordpro/source/filter/lwpglobalmgr.cxx b/lotuswordpro/source/filter/lwpglobalmgr.cxx
index 05fa59033f0d..e286553fbda1 100644
--- a/lotuswordpro/source/filter/lwpglobalmgr.cxx
+++ b/lotuswordpro/source/filter/lwpglobalmgr.cxx
@@ -55,15 +55,15 @@
************************************************************************/
#include <lwpglobalmgr.hxx>
#include <osl/thread.hxx>
-std::map< sal_uInt32,LwpGlobalMgr* > LwpGlobalMgr::m_ThreadMap;
+std::map<sal_uInt32, LwpGlobalMgr*> LwpGlobalMgr::m_ThreadMap;
LwpGlobalMgr::LwpGlobalMgr(LwpSvStream* pSvStream)
{
if (pSvStream)
- m_pObjFactory.reset( new LwpObjectFactory(pSvStream) );
- m_pBookmarkMgr.reset( new LwpBookmarkMgr );
- m_pChangeMgr.reset( new LwpChangeMgr );
- m_pXFFontFactory.reset( new XFFontFactory );
- m_pXFStyleManager.reset( new XFStyleManager );
+ m_pObjFactory.reset(new LwpObjectFactory(pSvStream));
+ m_pBookmarkMgr.reset(new LwpBookmarkMgr);
+ m_pChangeMgr.reset(new LwpChangeMgr);
+ m_pXFFontFactory.reset(new XFFontFactory);
+ m_pXFStyleManager.reset(new XFStyleManager);
}
LwpGlobalMgr::~LwpGlobalMgr()
@@ -121,12 +121,12 @@ XFColor LwpGlobalMgr::GetHighlightColor(sal_uInt8 nID)
if (iter != m_EditorAttrMap.end())
{
LwpColor aLwpColor = iter->second->cHiLiteColor;
- XFColor aColor(aLwpColor.GetRed(),aLwpColor.GetGreen(),aLwpColor.GetBlue());
+ XFColor aColor(aLwpColor.GetRed(), aLwpColor.GetGreen(), aLwpColor.GetBlue());
return aColor;
}
else
{
- XFColor aColor(255,255,0);//yellow
+ XFColor aColor(255, 255, 0); //yellow
return aColor;
}
}
diff --git a/lotuswordpro/source/filter/lwpholder.cxx b/lotuswordpro/source/filter/lwpholder.cxx
index 7d6c7f415235..3b0d4dee3144 100644
--- a/lotuswordpro/source/filter/lwpholder.cxx
+++ b/lotuswordpro/source/filter/lwpholder.cxx
@@ -61,9 +61,10 @@
#include "lwpholder.hxx"
#include <lwpfilehdr.hxx>
-LwpDLVListHeadHolder::LwpDLVListHeadHolder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
+LwpDLVListHeadHolder::LwpDLVListHeadHolder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
-{}
+{
+}
/**
* @descr read LwpDLVListHeadHolder from object stream
*/
@@ -73,9 +74,11 @@ void LwpDLVListHeadHolder::Read()
m_pObjStrm->SkipExtra();
}
-LwpDLVListHeadTailHolder::LwpDLVListHeadTailHolder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
+LwpDLVListHeadTailHolder::LwpDLVListHeadTailHolder(LwpObjectHeader const& objHdr,
+ LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
-{}
+{
+}
/**
* @descr read LwpDLVListHeadTailHolder from object stream
*/
@@ -85,9 +88,10 @@ void LwpDLVListHeadTailHolder::Read()
//m_pObjStrm->SkipExtra();
}
-LwpObjectHolder::LwpObjectHolder(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpDLVList(objHdr, pStrm)
-{}
+LwpObjectHolder::LwpObjectHolder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLVList(objHdr, pStrm)
+{
+}
/**
* @descr read LwpObjectHolder from object stream
*/
@@ -96,13 +100,14 @@ void LwpObjectHolder::Read()
LwpDLVList::Read();
m_Object.ReadIndexed(m_pObjStrm.get());
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
m_pObjStrm->SkipExtra();
}
-LwpListList::LwpListList(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
- :LwpObjectHolder(objHdr, pStrm)
-{}
+LwpListList::LwpListList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpObjectHolder(objHdr, pStrm)
+{
+}
/**
* @descr read LwpListList from object stream
*/
diff --git a/lotuswordpro/source/filter/lwpholder.hxx b/lotuswordpro/source/filter/lwpholder.hxx
index 2b5bbc2acb01..a98234f10cf4 100644
--- a/lotuswordpro/source/filter/lwpholder.hxx
+++ b/lotuswordpro/source/filter/lwpholder.hxx
@@ -70,9 +70,10 @@
class LwpDLVListHeadHolder : public LwpObject
{
public:
- LwpDLVListHeadHolder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpDLVListHeadHolder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
- LwpObjectID& GetHeadID() { return m_DLVHead;}
+ LwpObjectID& GetHeadID() { return m_DLVHead; }
+
private:
virtual ~LwpDLVListHeadHolder() override {}
@@ -85,10 +86,11 @@ private:
class LwpDLVListHeadTailHolder final : public LwpObject
{
public:
- LwpDLVListHeadTailHolder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpDLVListHeadTailHolder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
- LwpObjectID& GetHead(){ return m_HeadTail.GetHead();}
- LwpObjectID& GetTail(){ return m_HeadTail.GetTail();}
+ LwpObjectID& GetHead() { return m_HeadTail.GetHead(); }
+ LwpObjectID& GetTail() { return m_HeadTail.GetTail(); }
+
private:
virtual ~LwpDLVListHeadTailHolder() override {}
@@ -101,11 +103,13 @@ private:
class LwpObjectHolder : public LwpDLVList
{
public:
- LwpObjectHolder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpObjectHolder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
LwpObjectID& GetObject() { return m_Object; }
+
protected:
virtual ~LwpObjectHolder() override {}
+
private:
LwpObjectID m_Object;
};
@@ -117,9 +121,10 @@ private:
class LwpListList final : public LwpObjectHolder
{
public:
- LwpListList(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpListList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
- LwpObjectID& GetHead(){ return m_HeadTail.GetHead();}
+ LwpObjectID& GetHead() { return m_HeadTail.GetHead(); }
+
private:
virtual ~LwpListList() override {}
diff --git a/lotuswordpro/source/filter/lwphyperlinkmgr.cxx b/lotuswordpro/source/filter/lwphyperlinkmgr.cxx
index bd8680ead114..4e76b498b9c5 100644
--- a/lotuswordpro/source/filter/lwphyperlinkmgr.cxx
+++ b/lotuswordpro/source/filter/lwphyperlinkmgr.cxx
@@ -60,18 +60,9 @@
#include "lwphyperlinkmgr.hxx"
-LwpHyperlinkMgr::LwpHyperlinkMgr()
-{
- m_bIsHyperlink = false;
-}
+LwpHyperlinkMgr::LwpHyperlinkMgr() { m_bIsHyperlink = false; }
-LwpHyperlinkMgr::~LwpHyperlinkMgr()
-{
-}
+LwpHyperlinkMgr::~LwpHyperlinkMgr() {}
-
-void LwpHyperlinkMgr::SetHyperlink(const OUString& hyperlink)
-{
- m_Hyperlink = hyperlink;
-}
+void LwpHyperlinkMgr::SetHyperlink(const OUString& hyperlink) { m_Hyperlink = hyperlink; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 676339160e1d..29d663602f8b 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -74,7 +74,7 @@
#include <sal/log.hxx>
#include <o3tl/sorted_vector.hxx>
-LwpVirtualLayout::LwpVirtualLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpVirtualLayout::LwpVirtualLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpDLNFPVList(objHdr, pStrm)
, m_bGettingHonorProtection(false)
, m_bGettingMarginsSameAsParent(false)
@@ -140,19 +140,20 @@ double LwpVirtualLayout::GetColGap(sal_uInt16 /*nIndex*/)
*/
bool LwpVirtualLayout::HonorProtection()
{
- if(!(m_nAttributes2 & STYLE2_HONORPROTECTION))
+ if (!(m_nAttributes2 & STYLE2_HONORPROTECTION))
return false;
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader())
{
return xParent->GetHonorProtection();
}
- if(m_pFoundry)//is null now
+ if (m_pFoundry) //is null now
{
LwpDocument* pDoc = m_pFoundry->GetDocument();
- if(pDoc && pDoc->GetRootDocument())
+ if (pDoc && pDoc->GetRootDocument())
return pDoc->GetRootDocument()->GetHonorProtection();
}
@@ -165,20 +166,21 @@ bool LwpVirtualLayout::HonorProtection()
*/
bool LwpVirtualLayout::IsProtected()
{
- bool bProtected = (m_nAttributes & STYLE_PROTECTED)!=0;
+ bool bProtected = (m_nAttributes & STYLE_PROTECTED) != 0;
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader())
{
- if (xParent->GetHonorProtection() && (xParent->GetHasProtection()||bProtected))
+ if (xParent->GetHonorProtection() && (xParent->GetHasProtection() || bProtected))
{
return true;
}
}
- else if(m_pFoundry)//is null now
+ else if (m_pFoundry) //is null now
{
LwpDocument* pDoc = m_pFoundry->GetDocument();
- if(pDoc)
+ if (pDoc)
{
if (pDoc->GetHonorProtection() && bProtected)
{
@@ -196,10 +198,11 @@ bool LwpVirtualLayout::IsProtected()
*/
bool LwpVirtualLayout::HasProtection()
{
- if(m_nAttributes & STYLE_PROTECTED)
+ if (m_nAttributes & STYLE_PROTECTED)
return true;
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader())
{
return xParent->GetHasProtection();
@@ -212,10 +215,7 @@ bool LwpVirtualLayout::HasProtection()
* @descr: Whether it is a mirror layout
*
*/
-bool LwpVirtualLayout::IsComplex() const
-{
- return (m_nAttributes & STYLE_COMPLEX) != 0;
-}
+bool LwpVirtualLayout::IsComplex() const { return (m_nAttributes & STYLE_COMPLEX) != 0; }
/**
* @descr: Get usewhen pointer
@@ -225,7 +225,7 @@ LwpUseWhen* LwpVirtualLayout::GetUseWhen()
{
if (m_bGettingUseWhen)
throw std::runtime_error("recursion in layout");
- m_bGettingUseWhen= true;
+ m_bGettingUseWhen = true;
LwpUseWhen* pRet = nullptr;
@@ -233,13 +233,13 @@ LwpUseWhen* LwpVirtualLayout::GetUseWhen()
If we have a parent, and I'm not a page layout,
use my parents information.
*/
- if(GetLayoutType()!=LWP_PAGE_LAYOUT)
+ if (GetLayoutType() != LWP_PAGE_LAYOUT)
{
//get parent
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader() && (xParent->GetLayoutType() != LWP_PAGE_LAYOUT))
pRet = xParent->GetUseWhen();
-
}
if (!pRet)
@@ -252,55 +252,36 @@ LwpUseWhen* LwpVirtualLayout::GetUseWhen()
/**
* @descr: Whether this layout is page layout or not
*/
-bool LwpVirtualLayout::IsPage()
-{
- return (GetLayoutType() == LWP_PAGE_LAYOUT);
-}
+bool LwpVirtualLayout::IsPage() { return (GetLayoutType() == LWP_PAGE_LAYOUT); }
/**
* @descr: Whether this layout is header layout or not
*/
-bool LwpVirtualLayout::IsHeader()
-{
- return (GetLayoutType() == LWP_HEADER_LAYOUT);
-}
+bool LwpVirtualLayout::IsHeader() { return (GetLayoutType() == LWP_HEADER_LAYOUT); }
/**
* @descr: Whether this layout is footer layout or not
*/
-bool LwpVirtualLayout::IsFooter()
-{
- return (GetLayoutType() == LWP_FOOTER_LAYOUT);
-}
+bool LwpVirtualLayout::IsFooter() { return (GetLayoutType() == LWP_FOOTER_LAYOUT); }
/**
* @descr: Whether this layout is frame layout or not
*/
-bool LwpVirtualLayout::IsFrame()
-{
- return (GetLayoutType() == LWP_FRAME_LAYOUT);
-}
+bool LwpVirtualLayout::IsFrame() { return (GetLayoutType() == LWP_FRAME_LAYOUT); }
/**
* @descr: Whether this layout is cell layout or not
*/
bool LwpVirtualLayout::IsCell()
{
- return (GetLayoutType() == LWP_CELL_LAYOUT
- || GetLayoutType() == LWP_CONNECTED_CELL_LAYOUT
- || GetLayoutType() == LWP_HIDDEN_CELL_LAYOUT);
+ return (GetLayoutType() == LWP_CELL_LAYOUT || GetLayoutType() == LWP_CONNECTED_CELL_LAYOUT
+ || GetLayoutType() == LWP_HIDDEN_CELL_LAYOUT);
}
/**
* @descr: Whether this layout is supertable layout or not
*/
-bool LwpVirtualLayout::IsSuperTable()
-{
- return (GetLayoutType() == LWP_SUPERTABLE_LAYOUT);
-}
+bool LwpVirtualLayout::IsSuperTable() { return (GetLayoutType() == LWP_SUPERTABLE_LAYOUT); }
/**
* @descr: Whether this layout is group layout or not
*/
-bool LwpVirtualLayout::IsGroupHead()
-{
- return (GetLayoutType() == LWP_GROUP_LAYOUT);
-}
+bool LwpVirtualLayout::IsGroupHead() { return (GetLayoutType() == LWP_GROUP_LAYOUT); }
/**
* @descr: get the relative type
*/
@@ -316,15 +297,17 @@ bool LwpVirtualLayout::IsRelativeAnchored()
sal_uInt8 nType;
nType = GetRelativeType();
- return (nType == LwpLayoutRelativityGuts::LAY_PARA_RELATIVE) || (nType == LwpLayoutRelativityGuts::LAY_INLINE)
- || (nType == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE) || (nType == LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL);
+ return (nType == LwpLayoutRelativityGuts::LAY_PARA_RELATIVE)
+ || (nType == LwpLayoutRelativityGuts::LAY_INLINE)
+ || (nType == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE)
+ || (nType == LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL);
}
/**
* @descr: whether it is MinimumHeight layout
*/
bool LwpVirtualLayout::IsMinimumHeight() const
{
- return ((m_nAttributes3& STYLE3_MINHEIGHTVALID) != 0);
+ return ((m_nAttributes3 & STYLE3_MINHEIGHTVALID) != 0);
}
/**
@@ -333,7 +316,8 @@ bool LwpVirtualLayout::IsMinimumHeight() const
*/
rtl::Reference<LwpVirtualLayout> LwpVirtualLayout::GetParentLayout()
{
- return rtl::Reference<LwpVirtualLayout>(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ return rtl::Reference<LwpVirtualLayout>(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
}
/**
@@ -343,7 +327,8 @@ rtl::Reference<LwpVirtualLayout> LwpVirtualLayout::GetParentLayout()
void LwpVirtualLayout::RegisterChildStyle()
{
//Register all children styles
- rtl::Reference<LwpVirtualLayout> xLayout(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLayout(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
while (xLayout.is())
{
xLayout->SetFoundry(m_pFoundry);
@@ -368,7 +353,8 @@ bool LwpVirtualLayout::IsStyleLayout()
bRet = true;
else
{
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is())
bRet = xParent->IsStyleLayout();
}
@@ -383,12 +369,12 @@ bool LwpVirtualLayout::IsStyleLayout()
*/
LwpVirtualLayout* LwpVirtualLayout::FindChildByType(LWP_LAYOUT_TYPE eType)
{
- LwpObjectID *pID = &GetChildHead();
+ LwpObjectID* pID = &GetChildHead();
LwpVirtualLayout* pPrevLayout = nullptr;
- while(pID && !pID->IsNull())
+ while (pID && !pID->IsNull())
{
- LwpVirtualLayout * pLayout = dynamic_cast<LwpVirtualLayout *>(pID->obj().get());
+ LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(pID->obj().get());
if (!pLayout)
break;
@@ -422,10 +408,7 @@ bool LwpVirtualLayout::IsFitGraphic()
* @descr: Whether the width of layout is auto grow
*
*/
-bool LwpVirtualLayout::IsAutoGrowWidth()
-{
- return IsAutoGrowLeft() || IsAutoGrowRight();
-}
+bool LwpVirtualLayout::IsAutoGrowWidth() { return IsAutoGrowLeft() || IsAutoGrowRight(); }
/**
* @descr: Determine whether the layout width is to margin
@@ -447,16 +430,20 @@ void LwpAssociatedLayouts::Read(LwpObjectStream* pStrm)
* @descr: Looking for the layout which follows the pStartLayout
* @param: pStartLayout - the layout which is used for looking for its following layout
*/
-rtl::Reference<LwpVirtualLayout> LwpAssociatedLayouts::GetLayout(LwpVirtualLayout const *pStartLayout)
+rtl::Reference<LwpVirtualLayout>
+LwpAssociatedLayouts::GetLayout(LwpVirtualLayout const* pStartLayout)
{
if (!pStartLayout && !m_OnlyLayout.IsNull())
/* Looking for the first layout and there's only one layout in the list.*/
- return rtl::Reference<LwpVirtualLayout>(dynamic_cast<LwpVirtualLayout*>(m_OnlyLayout.obj().get()));
+ return rtl::Reference<LwpVirtualLayout>(
+ dynamic_cast<LwpVirtualLayout*>(m_OnlyLayout.obj().get()));
- rtl::Reference<LwpObjectHolder> xObjHolder(dynamic_cast<LwpObjectHolder*>(m_Layouts.GetHead().obj().get()));
+ rtl::Reference<LwpObjectHolder> xObjHolder(
+ dynamic_cast<LwpObjectHolder*>(m_Layouts.GetHead().obj().get()));
if (xObjHolder.is())
{
- rtl::Reference<LwpVirtualLayout> xLayout(dynamic_cast<LwpVirtualLayout*>(xObjHolder->GetObject().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLayout(
+ dynamic_cast<LwpVirtualLayout*>(xObjHolder->GetObject().obj().get()));
if (!pStartLayout)
return xLayout;
@@ -483,9 +470,10 @@ rtl::Reference<LwpVirtualLayout> LwpAssociatedLayouts::GetLayout(LwpVirtualLayou
return rtl::Reference<LwpVirtualLayout>();
}
-LwpHeadLayout::LwpHeadLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpHeadLayout::LwpHeadLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpVirtualLayout(objHdr, pStrm)
-{}
+{
+}
void LwpHeadLayout::Read()
{
@@ -499,7 +487,8 @@ void LwpHeadLayout::Read()
void LwpHeadLayout::RegisterStyle()
{
//Register all children styles
- rtl::Reference<LwpVirtualLayout> xLayout(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLayout(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
o3tl::sorted_vector<LwpVirtualLayout*> aSeen;
while (xLayout.is())
{
@@ -508,7 +497,8 @@ void LwpHeadLayout::RegisterStyle()
//if the layout is relative to para, the layout will be registered in para
if (!xLayout->IsRelativeAnchored())
xLayout->DoRegisterStyle();
- rtl::Reference<LwpVirtualLayout> xNext(dynamic_cast<LwpVirtualLayout*>(xLayout->GetNext().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xNext(
+ dynamic_cast<LwpVirtualLayout*>(xLayout->GetNext().obj().get()));
if (aSeen.find(xNext.get()) != aSeen.end())
throw std::runtime_error("loop in conversion");
xLayout = xNext;
@@ -521,7 +511,8 @@ void LwpHeadLayout::RegisterStyle()
*/
rtl::Reference<LwpVirtualLayout> LwpHeadLayout::FindEnSuperTableLayout()
{
- rtl::Reference<LwpVirtualLayout> xLayout(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLayout(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
o3tl::sorted_vector<LwpVirtualLayout*> aSeen;
while (xLayout)
{
@@ -544,9 +535,7 @@ LwpLayoutStyle::LwpLayoutStyle()
{
}
-LwpLayoutStyle::~LwpLayoutStyle()
-{
-}
+LwpLayoutStyle::~LwpLayoutStyle() {}
void LwpLayoutStyle::Read(LwpObjectStream* pStrm)
{
@@ -559,14 +548,13 @@ void LwpLayoutStyle::Read(LwpObjectStream* pStrm)
}
}
-LwpLayoutMisc::LwpLayoutMisc() :
-m_nGridDistance(0), m_nGridType(0)
+LwpLayoutMisc::LwpLayoutMisc()
+ : m_nGridDistance(0)
+ , m_nGridType(0)
{
}
-LwpLayoutMisc::~LwpLayoutMisc()
-{
-}
+LwpLayoutMisc::~LwpLayoutMisc() {}
void LwpLayoutMisc::Read(LwpObjectStream* pStrm)
{
@@ -576,16 +564,14 @@ void LwpLayoutMisc::Read(LwpObjectStream* pStrm)
pStrm->SkipExtra();
}
-LwpMiddleLayout::LwpMiddleLayout( LwpObjectHeader const &objHdr, LwpSvStream* pStrm )
+LwpMiddleLayout::LwpMiddleLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpVirtualLayout(objHdr, pStrm)
, m_bGettingGeometry(false)
, m_bGettingBackgroundStuff(false)
{
}
-LwpMiddleLayout::~LwpMiddleLayout()
-{
-}
+LwpMiddleLayout::~LwpMiddleLayout() {}
void LwpMiddleLayout::Read()
{
@@ -599,7 +585,7 @@ void LwpMiddleLayout::Read()
pStrm->SkipExtra();
// before layout hierarchy rework
- if(LwpFileHeader::m_nFileRevision < 0x000B)
+ if (LwpFileHeader::m_nFileRevision < 0x000B)
return;
m_Content.ReadIndexed(pStrm);
@@ -654,9 +640,9 @@ LwpLayoutGeometry* LwpMiddleLayout::GetGeometry()
m_bGettingGeometry = true;
LwpLayoutGeometry* pRet = nullptr;
- if( !m_LayGeometry.IsNull() )
+ if (!m_LayGeometry.IsNull())
{
- pRet = dynamic_cast<LwpLayoutGeometry*> (m_LayGeometry.obj().get());
+ pRet = dynamic_cast<LwpLayoutGeometry*>(m_LayGeometry.obj().get());
}
else
{
@@ -678,9 +664,9 @@ LwpLayoutGeometry* LwpMiddleLayout::GetGeometry()
double LwpMiddleLayout::GetGeometryHeight()
{
LwpLayoutGeometry* pGeo = GetGeometry();
- if(pGeo)
+ if (pGeo)
{
- return LwpTools::ConvertFromUnitsToMetric( pGeo->GetHeight() );
+ return LwpTools::ConvertFromUnitsToMetric(pGeo->GetHeight());
}
else
return -1;
@@ -693,9 +679,9 @@ double LwpMiddleLayout::GetGeometryHeight()
double LwpMiddleLayout::GetGeometryWidth()
{
LwpLayoutGeometry* pGeo = GetGeometry();
- if(pGeo)
+ if (pGeo)
{
- return LwpTools::ConvertFromUnitsToMetric( pGeo->GetWidth() );
+ return LwpTools::ConvertFromUnitsToMetric(pGeo->GetWidth());
}
else
return -1;
@@ -707,7 +693,7 @@ double LwpMiddleLayout::GetGeometryWidth()
*/
bool LwpMiddleLayout::MarginsSameAsParent()
{
- if(m_nOverrideFlag & OVER_MARGINS)
+ if (m_nOverrideFlag & OVER_MARGINS)
{
return LwpVirtualLayout::MarginsSameAsParent();
}
@@ -726,11 +712,12 @@ bool LwpMiddleLayout::MarginsSameAsParent()
double LwpMiddleLayout::MarginsValue(sal_uInt8 nWhichSide)
{
double fValue = 0;
- if((nWhichSide==MARGIN_LEFT)||(nWhichSide==MARGIN_RIGHT))
+ if ((nWhichSide == MARGIN_LEFT) || (nWhichSide == MARGIN_RIGHT))
{
- if ( GetMarginsSameAsParent() )
+ if (GetMarginsSameAsParent())
{
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader())
{
fValue = xParent->GetMarginsValue(nWhichSide);
@@ -739,10 +726,10 @@ double LwpMiddleLayout::MarginsValue(sal_uInt8 nWhichSide)
}
}
- if(m_nOverrideFlag & OVER_MARGINS)
+ if (m_nOverrideFlag & OVER_MARGINS)
{
- LwpLayoutMargins* pMar1 = dynamic_cast<LwpLayoutMargins*> (m_LayMargins.obj().get());
- if(pMar1)
+ LwpLayoutMargins* pMar1 = dynamic_cast<LwpLayoutMargins*>(m_LayMargins.obj().get());
+ if (pMar1)
{
fValue = pMar1->GetMargins().GetMarginsValue(nWhichSide);
return fValue;
@@ -766,17 +753,17 @@ double LwpMiddleLayout::MarginsValue(sal_uInt8 nWhichSide)
double LwpMiddleLayout::ExtMarginsValue(sal_uInt8 nWhichSide)
{
double fValue = 0;
- if(m_nOverrideFlag & OVER_MARGINS)
+ if (m_nOverrideFlag & OVER_MARGINS)
{
- LwpLayoutMargins* pMar1 = dynamic_cast<LwpLayoutMargins*> (m_LayMargins.obj().get());
- if(pMar1)
+ LwpLayoutMargins* pMar1 = dynamic_cast<LwpLayoutMargins*>(m_LayMargins.obj().get());
+ if (pMar1)
{
fValue = pMar1->GetExtMargins().GetMarginsValue(nWhichSide);
return fValue;
}
}
LwpVirtualLayout* pStyle = dynamic_cast<LwpVirtualLayout*>(GetBasedOnStyle().get());
- if(pStyle)
+ if (pStyle)
{
fValue = pStyle->GetExtMarginsValue(nWhichSide);
return fValue;
@@ -794,9 +781,10 @@ LwpBorderStuff* LwpMiddleLayout::GetBorderStuff()
LwpBorderStuff* pRet = nullptr;
- if(m_nOverrideFlag & OVER_BORDERS)
+ if (m_nOverrideFlag & OVER_BORDERS)
{
- LwpLayoutBorder* pLayoutBorder = dynamic_cast<LwpLayoutBorder*>(m_LayBorderStuff.obj().get());
+ LwpLayoutBorder* pLayoutBorder
+ = dynamic_cast<LwpLayoutBorder*>(m_LayBorderStuff.obj().get());
pRet = pLayoutBorder ? &pLayoutBorder->GetBorderStuff() : nullptr;
}
else
@@ -808,7 +796,7 @@ LwpBorderStuff* LwpMiddleLayout::GetBorderStuff()
}
}
- m_bGettingBorderStuff= false;
+ m_bGettingBorderStuff = false;
return pRet;
}
@@ -823,9 +811,10 @@ LwpBackgroundStuff* LwpMiddleLayout::GetBackgroundStuff()
LwpBackgroundStuff* pRet = nullptr;
- if(m_nOverrideFlag & OVER_BACKGROUND)
+ if (m_nOverrideFlag & OVER_BACKGROUND)
{
- LwpLayoutBackground* pLayoutBackground = dynamic_cast<LwpLayoutBackground*>(m_LayBackgroundStuff.obj().get());
+ LwpLayoutBackground* pLayoutBackground
+ = dynamic_cast<LwpLayoutBackground*>(m_LayBackgroundStuff.obj().get());
pRet = pLayoutBackground ? &pLayoutBackground->GetBackgoudStuff() : nullptr;
}
else
@@ -847,13 +836,13 @@ LwpBackgroundStuff* LwpMiddleLayout::GetBackgroundStuff()
std::unique_ptr<XFBorders> LwpMiddleLayout::GetXFBorders()
{
LwpBorderStuff* pBorderStuff = GetBorderStuff();
- if(pBorderStuff&&pBorderStuff->GetSide() != 0)
+ if (pBorderStuff && pBorderStuff->GetSide() != 0)
{
//copy from lwpparastyle.
std::unique_ptr<XFBorders> xXFBorders(new XFBorders);
// apply 4 borders respectively
LwpBorderStuff::BorderType const pType[] = { LwpBorderStuff::LEFT, LwpBorderStuff::RIGHT,
- LwpBorderStuff::TOP, LwpBorderStuff::BOTTOM };
+ LwpBorderStuff::TOP, LwpBorderStuff::BOTTOM };
for (LwpBorderStuff::BorderType nC : pType)
{
@@ -874,7 +863,7 @@ enumXFTextDir LwpMiddleLayout::GetTextDirection()
{
enumXFTextDir eTextDir = enumXFTextDirNone;
sal_uInt8 nDirection = GetContentOrientation();
- switch(nDirection)
+ switch (nDirection)
{
case TEXT_ORIENT_LRTB:
{
@@ -907,10 +896,10 @@ enumXFTextDir LwpMiddleLayout::GetTextDirection()
LwpColor* LwpMiddleLayout::GetBackColor()
{
LwpBackgroundStuff* pBackgroundStuff = GetBackgroundStuff();
- if(pBackgroundStuff && !pBackgroundStuff->IsTransparent())
+ if (pBackgroundStuff && !pBackgroundStuff->IsTransparent())
{
LwpColor* pColor = pBackgroundStuff->GetFillColor();
- if(pColor->IsValidColor())
+ if (pColor->IsValidColor())
{
return pColor;
}
@@ -923,11 +912,11 @@ LwpColor* LwpMiddleLayout::GetBackColor()
*/
LwpTabOverride* LwpMiddleLayout::GetTabOverride()
{
- if(m_nAttributes & OVER_TABS)
+ if (m_nAttributes & OVER_TABS)
{
- if(!m_TabPiece.IsNull())
+ if (!m_TabPiece.IsNull())
{
- LwpTabPiece *pPiece = dynamic_cast<LwpTabPiece*>(m_TabPiece.obj().get());
+ LwpTabPiece* pPiece = dynamic_cast<LwpTabPiece*>(m_TabPiece.obj().get());
return static_cast<LwpTabOverride*>(pPiece ? pPiece->GetOverride() : nullptr);
}
return nullptr;
@@ -960,8 +949,7 @@ sal_uInt16 LwpMiddleLayout::GetScaleMode()
sal_uInt16 LwpMiddleLayout::GetScaleTile()
{
if ((m_nOverrideFlag & OVER_SCALING) && m_LayScale.obj().is() && GetLayoutScale())
- return (GetLayoutScale()->GetPlacement() & LwpLayoutScale::TILED)
- ? 1 : 0;
+ return (GetLayoutScale()->GetPlacement() & LwpLayoutScale::TILED) ? 1 : 0;
rtl::Reference<LwpObject> xBase(GetBasedOnStyle());
if (xBase.is())
return dynamic_cast<LwpMiddleLayout&>(*xBase).GetScaleTile();
@@ -979,8 +967,7 @@ sal_uInt16 LwpMiddleLayout::GetScaleCenter()
if ((m_nOverrideFlag & OVER_SCALING) && m_LayScale.obj().is() && GetLayoutScale())
{
- nRet = (GetLayoutScale()->GetPlacement() & LwpLayoutScale::CENTERED)
- ? 1 : 0;
+ nRet = (GetLayoutScale()->GetPlacement() & LwpLayoutScale::CENTERED) ? 1 : 0;
}
else
{
@@ -997,7 +984,8 @@ bool LwpMiddleLayout::CanSizeRight()
{
sal_uInt8 RelType = GetRelativeType();
- return !(RelType == LwpLayoutRelativityGuts::LAY_INLINE || RelType == LwpLayoutRelativityGuts::LAY_PARA_RELATIVE
+ return !(RelType == LwpLayoutRelativityGuts::LAY_INLINE
+ || RelType == LwpLayoutRelativityGuts::LAY_PARA_RELATIVE
|| RelType == LwpLayoutRelativityGuts::LAY_INLINE_VERTICAL);
}
sal_Int32 LwpMiddleLayout::GetMinimumWidth()
@@ -1036,14 +1024,13 @@ bool LwpMiddleLayout::IsSizeRightToContainer()
if (m_nOverrideFlag & OVER_SIZE)
{
- return (m_nDirection & ((LAY_USEDIRECTION|LAY_AUTOSIZE|LAY_TOCONTAINER)
- << SHIFT_RIGHT))
- == ((LAY_USEDIRECTION | LAY_TOCONTAINER | LAY_AUTOSIZE) << SHIFT_RIGHT);
+ return (m_nDirection & ((LAY_USEDIRECTION | LAY_AUTOSIZE | LAY_TOCONTAINER) << SHIFT_RIGHT))
+ == ((LAY_USEDIRECTION | LAY_TOCONTAINER | LAY_AUTOSIZE) << SHIFT_RIGHT);
}
rtl::Reference<LwpObject> xBase(GetBasedOnStyle());
if (xBase.is())
{
- LwpMiddleLayout * pLayout = dynamic_cast<LwpMiddleLayout *>(xBase.get());
+ LwpMiddleLayout* pLayout = dynamic_cast<LwpMiddleLayout*>(xBase.get());
return pLayout && pLayout->IsSizeRightToContainer();
}
else
@@ -1056,14 +1043,13 @@ bool LwpMiddleLayout::IsSizeRightToContent()
if (m_nOverrideFlag & OVER_SIZE)
{
- return (m_nDirection & ((LAY_USEDIRECTION|LAY_AUTOSIZE|LAY_TOCONTAINER)
- << SHIFT_RIGHT))
- == ((LAY_USEDIRECTION | LAY_AUTOSIZE) << SHIFT_RIGHT);
+ return (m_nDirection & ((LAY_USEDIRECTION | LAY_AUTOSIZE | LAY_TOCONTAINER) << SHIFT_RIGHT))
+ == ((LAY_USEDIRECTION | LAY_AUTOSIZE) << SHIFT_RIGHT);
}
rtl::Reference<LwpObject> xBase(GetBasedOnStyle());
if (xBase.is())
{
- LwpMiddleLayout * pLayout = dynamic_cast<LwpMiddleLayout *>(xBase.get());
+ LwpMiddleLayout* pLayout = dynamic_cast<LwpMiddleLayout*>(xBase.get());
return pLayout && pLayout->IsSizeRightToContent();
}
else
@@ -1074,19 +1060,13 @@ bool LwpMiddleLayout::IsSizeRightToContent()
* @descr: Get layout height
*
*/
-double LwpMiddleLayout::GetHeight()
-{
- return GetGeometryHeight();
-}
+double LwpMiddleLayout::GetHeight() { return GetGeometryHeight(); }
/**
* @descr: Get layout height
*
*/
-double LwpMiddleLayout::GetWidth()
-{
- return GetGeometryWidth();
-}
+double LwpMiddleLayout::GetWidth() { return GetGeometryWidth(); }
/**
* @descr: Get layout origin point
*
@@ -1094,17 +1074,16 @@ double LwpMiddleLayout::GetWidth()
LwpPoint LwpMiddleLayout::GetOrigin()
{
LwpLayoutGeometry* pGeo = GetGeometry();
- if(pGeo)
+ if (pGeo)
{
sal_uInt8 nType = GetRelativeType();
- if(nType == LwpLayoutRelativityGuts::LAY_INLINE
- || nType == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE )
+ if (nType == LwpLayoutRelativityGuts::LAY_INLINE
+ || nType == LwpLayoutRelativityGuts::LAY_INLINE_NEWLINE)
{
return pGeo->GetAbsoluteOrigin();
}
else
return pGeo->GetOrigin();
-
}
return LwpPoint();
@@ -1146,11 +1125,12 @@ std::unique_ptr<XFBGImage> LwpMiddleLayout::GetFillPattern()
*/
bool LwpMiddleLayout::IsAutoGrow()
{
- if(m_nOverrideFlag & OVER_SIZE)
+ if (m_nOverrideFlag & OVER_SIZE)
{
- return (m_nDirection &
- ((LAY_AUTOGROW << SHIFT_UP) | (LAY_AUTOGROW << SHIFT_DOWN) |
- (LAY_AUTOGROW << SHIFT_RIGHT) | (LAY_AUTOGROW << SHIFT_LEFT))) != 0;
+ return (m_nDirection
+ & ((LAY_AUTOGROW << SHIFT_UP) | (LAY_AUTOGROW << SHIFT_DOWN)
+ | (LAY_AUTOGROW << SHIFT_RIGHT) | (LAY_AUTOGROW << SHIFT_LEFT)))
+ != 0;
}
else
{
@@ -1169,7 +1149,7 @@ bool LwpMiddleLayout::IsAutoGrow()
*/
bool LwpMiddleLayout::IsAutoGrowDown()
{
- if(m_nOverrideFlag & OVER_SIZE)
+ if (m_nOverrideFlag & OVER_SIZE)
{
return (m_nDirection & (LAY_AUTOGROW << SHIFT_DOWN)) != 0;
}
@@ -1219,7 +1199,7 @@ bool LwpMiddleLayout::IsAutoGrowUp()
*/
bool LwpMiddleLayout::IsAutoGrowLeft()
{
- if(m_nOverrideFlag & OVER_SIZE)
+ if (m_nOverrideFlag & OVER_SIZE)
{
return (m_nDirection & (LAY_AUTOGROW << SHIFT_LEFT)) != 0;
}
@@ -1240,7 +1220,7 @@ bool LwpMiddleLayout::IsAutoGrowLeft()
*/
bool LwpMiddleLayout::IsAutoGrowRight()
{
- if(m_nOverrideFlag & OVER_SIZE)
+ if (m_nOverrideFlag & OVER_SIZE)
{
return (m_nDirection & (LAY_AUTOGROW << SHIFT_RIGHT)) != 0;
}
@@ -1262,9 +1242,10 @@ bool LwpMiddleLayout::IsAutoGrowRight()
sal_uInt8 LwpMiddleLayout::GetContentOrientation()
{
//content orientation in Graphic objects and OLE objects not supported now
- if((m_nOverrideFlag & OVER_ROTATION)&& !m_LayGeometry.IsNull())
+ if ((m_nOverrideFlag & OVER_ROTATION) && !m_LayGeometry.IsNull())
{
- LwpLayoutGeometry* pLayGeometry = dynamic_cast<LwpLayoutGeometry*> (m_LayGeometry.obj().get());
+ LwpLayoutGeometry* pLayGeometry
+ = dynamic_cast<LwpLayoutGeometry*>(m_LayGeometry.obj().get());
if (pLayGeometry)
return pLayGeometry->GetContentOrientation();
}
@@ -1285,18 +1266,19 @@ sal_uInt8 LwpMiddleLayout::GetContentOrientation()
*/
bool LwpMiddleLayout::HonorProtection()
{
- if(m_nOverrideFlag & OVER_MISC)
+ if (m_nOverrideFlag & OVER_MISC)
{
- if(!(m_nAttributes2 & STYLE2_HONORPROTECTION))
+ if (!(m_nAttributes2 & STYLE2_HONORPROTECTION))
return false;
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader())
{
return xParent->GetHonorProtection();
}
- if(m_pFoundry)//is null now
+ if (m_pFoundry) //is null now
{
LwpDocument* pDoc = m_pFoundry->GetDocument();
if (pDoc)
@@ -1324,9 +1306,9 @@ bool LwpMiddleLayout::HonorProtection()
bool LwpMiddleLayout::IsProtected()
{
bool bProtected = false;
- if(m_nOverrideFlag & OVER_MISC)
+ if (m_nOverrideFlag & OVER_MISC)
{
- bProtected = (m_nAttributes & STYLE_PROTECTED)!=0;
+ bProtected = (m_nAttributes & STYLE_PROTECTED) != 0;
}
else
{
@@ -1339,7 +1321,8 @@ bool LwpMiddleLayout::IsProtected()
bProtected = LwpVirtualLayout::IsProtected();
}
- rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xParent(
+ dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get()));
if (xParent.is() && !xParent->IsHeader())
{
/* If a parent's protected then none of its children can be accessed. */
@@ -1351,12 +1334,11 @@ bool LwpMiddleLayout::IsProtected()
/* If our parent isn't honoring protection then we aren't protected. */
return false;
-
}
- if(m_pFoundry)//is null now
+ if (m_pFoundry) //is null now
{
LwpDocument* pDoc = m_pFoundry->GetDocument();
- if(pDoc)
+ if (pDoc)
{
if (pDoc->GetHonorProtection())
return bProtected;
@@ -1375,7 +1357,8 @@ bool LwpMiddleLayout::IsProtected()
*/
rtl::Reference<LwpVirtualLayout> LwpMiddleLayout::GetWaterMarkLayout()
{
- rtl::Reference<LwpVirtualLayout> xLay(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLay(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
o3tl::sorted_vector<LwpVirtualLayout*> aSeen;
while (xLay.is())
{
@@ -1384,7 +1367,8 @@ rtl::Reference<LwpVirtualLayout> LwpMiddleLayout::GetWaterMarkLayout()
{
return xLay;
}
- rtl::Reference<LwpVirtualLayout> xNext(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xNext(
+ dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
if (aSeen.find(xNext.get()) != aSeen.end())
throw std::runtime_error("loop in conversion");
xLay = xNext;
@@ -1402,18 +1386,19 @@ std::unique_ptr<XFBGImage> LwpMiddleLayout::GetXFBGImage()
rtl::Reference<LwpVirtualLayout> xWaterMarkLayout(GetWaterMarkLayout());
LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*>(xWaterMarkLayout.get());
- if(pLay)
+ if (pLay)
{
//test BGImage
LwpGraphicObject* pGrfObj = dynamic_cast<LwpGraphicObject*>(pLay->GetContent().obj().get());
- if(pGrfObj)
+ if (pGrfObj)
{
xXFBGImage.reset(new XFBGImage);
- if(pGrfObj->IsLinked())
+ if (pGrfObj->IsLinked())
{
//set file link
OUString linkedfilepath = pGrfObj->GetLinkedFilePath();
- OUString fileURL = LwpTools::convertToFileUrl(OUStringToOString(linkedfilepath, osl_getThreadTextEncoding()));
+ OUString fileURL = LwpTools::convertToFileUrl(
+ OUStringToOString(linkedfilepath, osl_getThreadTextEncoding()));
xXFBGImage->SetFileLink(fileURL);
}
else
@@ -1423,21 +1408,21 @@ std::unique_ptr<XFBGImage> LwpMiddleLayout::GetXFBGImage()
}
//automatic, top left
- xXFBGImage->SetPosition(enumXFAlignStart,enumXFAlignTop);
- if(pLay->GetScaleCenter())
+ xXFBGImage->SetPosition(enumXFAlignStart, enumXFAlignTop);
+ if (pLay->GetScaleCenter())
{
//center
xXFBGImage->SetPosition();
}
- else if(pLay->GetScaleTile())
+ else if (pLay->GetScaleTile())
{
//tile
xXFBGImage->SetRepeate();
}
//fit type, area type
- if((pLay->GetScaleMode()& LwpLayoutScale::FIT_IN_FRAME)!=0)
+ if ((pLay->GetScaleMode() & LwpLayoutScale::FIT_IN_FRAME) != 0)
{
- if((pLay->GetScaleMode()& LwpLayoutScale::MAINTAIN_ASPECT_RATIO)==0)
+ if ((pLay->GetScaleMode() & LwpLayoutScale::MAINTAIN_ASPECT_RATIO) == 0)
{
xXFBGImage->SetStretch();
}
@@ -1459,7 +1444,7 @@ bool LwpMiddleLayout::GetUsePrinterSettings()
bool bRet = false;
- if(m_nOverrideFlag & OVER_SIZE)
+ if (m_nOverrideFlag & OVER_SIZE)
{
bRet = (m_nAttributes3 & STYLE3_USEPRINTERSETTINGS) != 0;
}
@@ -1483,16 +1468,14 @@ bool LwpMiddleLayout::HasContent()
return content.is();
}
-LwpLayout::LwpLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpLayout::LwpLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpMiddleLayout(objHdr, pStrm)
, m_bGettingShadow(false)
, m_bGettingNumCols(false)
{
}
-LwpLayout::~LwpLayout()
-{
-}
+LwpLayout::~LwpLayout() {}
void LwpLayout::Read()
{
@@ -1540,7 +1523,9 @@ sal_uInt16 LwpLayout::GetNumCols()
m_bGettingNumCols = true;
sal_uInt16 nRet = 0;
- LwpLayoutColumns* pLayColumns = (m_nOverrideFlag & OVER_COLUMNS) ? dynamic_cast<LwpLayoutColumns*>(m_LayColumns.obj().get()) : nullptr;
+ LwpLayoutColumns* pLayColumns = (m_nOverrideFlag & OVER_COLUMNS)
+ ? dynamic_cast<LwpLayoutColumns*>(m_LayColumns.obj().get())
+ : nullptr;
if (pLayColumns)
{
nRet = pLayColumns->GetNumCols();
@@ -1555,17 +1540,16 @@ sal_uInt16 LwpLayout::GetNumCols()
return nRet;
}
-
/**
* @descr: Get gap between columns
* @param: the order of column
*/
double LwpLayout::GetColGap(sal_uInt16 nIndex)
{
- if((m_nOverrideFlag & OVER_COLUMNS)||(m_nAttributes2 & STYLE2_LOCALCOLUMNINFO))
+ if ((m_nOverrideFlag & OVER_COLUMNS) || (m_nAttributes2 & STYLE2_LOCALCOLUMNINFO))
{
LwpLayoutColumns* pLayColumns = dynamic_cast<LwpLayoutColumns*>(m_LayColumns.obj().get());
- if(pLayColumns)
+ if (pLayColumns)
{
return pLayColumns->GetColGap(nIndex);
}
@@ -1589,7 +1573,7 @@ XFColumns* LwpLayout::GetXFColumns()
{
//if there is only one column, do not need insert columns
sal_uInt16 nCols = GetNumCols();
- if(nCols==1)
+ if (nCols == 1)
{
return nullptr;
}
@@ -1608,22 +1592,22 @@ XFColumns* LwpLayout::GetXFColumns()
xColumns->SetGap(fGap);
//set xfcolumn
- for(sal_uInt16 nIndex = 0; nIndex<nCols; nIndex++)
+ for (sal_uInt16 nIndex = 0; nIndex < nCols; nIndex++)
{
XFColumn aColumn;
- sal_Int32 nWidth = 8305/nCols; //relative width
+ sal_Int32 nWidth = 8305 / nCols; //relative width
aColumn.SetRelWidth(nWidth);
//the left and right margins is 0;
- double nGap = GetColGap(nIndex)/2;
- aColumn.SetMargins(nGap,nGap);
- if(nIndex==0)
+ double nGap = GetColGap(nIndex) / 2;
+ aColumn.SetMargins(nGap, nGap);
+ if (nIndex == 0)
{
- aColumn.SetMargins(0,nGap);
+ aColumn.SetMargins(0, nGap);
}
- if(nIndex==(nCols-1))
+ if (nIndex == (nCols - 1))
{
- aColumn.SetMargins(nGap,0);
+ aColumn.SetMargins(nGap, 0);
}
xColumns->AddColumn(aColumn);
}
@@ -1637,10 +1621,10 @@ XFColumns* LwpLayout::GetXFColumns()
*/
XFColumnSep* LwpLayout::GetColumnSep()
{
-
//Get LwpLayoutGutters
- LwpLayoutGutters* pLayoutGutters = dynamic_cast<LwpLayoutGutters*>(m_LayGutterStuff.obj().get());
- if(!pLayoutGutters)
+ LwpLayoutGutters* pLayoutGutters
+ = dynamic_cast<LwpLayoutGutters*>(m_LayGutterStuff.obj().get());
+ if (!pLayoutGutters)
{
return nullptr;
}
@@ -1648,8 +1632,8 @@ XFColumnSep* LwpLayout::GetColumnSep()
LwpBorderStuff& rBorderStuff = pLayoutGutters->GetBorderStuff();
LwpBorderStuff::BorderType eType = LwpBorderStuff::LEFT;
- LwpColor aColor = rBorderStuff.GetSideColor(eType);
- double fWidth = rBorderStuff.GetSideWidth(eType);
+ LwpColor aColor = rBorderStuff.GetSideColor(eType);
+ double fWidth = rBorderStuff.GetSideWidth(eType);
//sal_uInt16 nType = rBorderStuff->GetSideType(eType);
XFColumnSep* pColumnSep = new XFColumnSep();
@@ -1670,33 +1654,32 @@ LwpLayout::UseWhenType LwpLayout::GetUseWhenType()
{
UseWhenType eType = StartWithinPage;
LwpUseWhen* pUseWhen = GetUseWhen();
- if(pUseWhen)
+ if (pUseWhen)
{
- if(pUseWhen->IsStartOnThisHF())
+ if (pUseWhen->IsStartOnThisHF())
{
- eType = StartWithinColume;
+ eType = StartWithinColume;
}
- else if(pUseWhen->IsStartOnThisPage())
+ else if (pUseWhen->IsStartOnThisPage())
{
- eType = StartWithinPage;
+ eType = StartWithinPage;
}
- else if(pUseWhen->IsStartOnNextPage())
+ else if (pUseWhen->IsStartOnNextPage())
{
eType = StartOnNextPage;
}
- else if(pUseWhen->IsStartOnNextOddPage())
+ else if (pUseWhen->IsStartOnNextOddPage())
{
- eType = StartOnOddPage;
+ eType = StartOnOddPage;
}
- else if(pUseWhen->IsStartOnNextEvenPage())
+ else if (pUseWhen->IsStartOnNextEvenPage())
{
- eType = StartOnEvenPage;
+ eType = StartOnEvenPage;
}
-
}
else
{
- eType = StartOnNextPage;
+ eType = StartOnNextPage;
}
return eType;
}
@@ -1707,10 +1690,10 @@ LwpLayout::UseWhenType LwpLayout::GetUseWhenType()
*/
sal_uInt16 LwpLayout::GetUsePage()
{
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
LwpUseWhen* pUseWhen = GetUseWhen();
- if(pUseWhen)
+ if (pUseWhen)
return pUseWhen->GetUsePage();
else
return 0;
@@ -1732,7 +1715,7 @@ sal_uInt16 LwpLayout::GetUsePage()
*/
LwpUseWhen* LwpLayout::VirtualGetUseWhen()
{
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
return &m_aUseWhen;
}
@@ -1753,10 +1736,10 @@ LwpUseWhen* LwpLayout::VirtualGetUseWhen()
*/
bool LwpLayout::IsUseOnAllPages()
{
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
LwpUseWhen* pUseWhen = GetUseWhen();
- if(pUseWhen)
+ if (pUseWhen)
return pUseWhen->IsUseOnAllPages();
else
return false;
@@ -1778,10 +1761,10 @@ bool LwpLayout::IsUseOnAllPages()
*/
bool LwpLayout::IsUseOnAllEvenPages()
{
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
LwpUseWhen* pUseWhen = GetUseWhen();
- if(pUseWhen)
+ if (pUseWhen)
return pUseWhen->IsUseOnAllEvenPages();
else
return false;
@@ -1803,10 +1786,10 @@ bool LwpLayout::IsUseOnAllEvenPages()
*/
bool LwpLayout::IsUseOnAllOddPages()
{
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
LwpUseWhen* pUseWhen = GetUseWhen();
- if(pUseWhen)
+ if (pUseWhen)
return pUseWhen->IsUseOnAllOddPages();
else
return false;
@@ -1828,10 +1811,10 @@ bool LwpLayout::IsUseOnAllOddPages()
*/
bool LwpLayout::IsUseOnPage()
{
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
LwpUseWhen* pUseWhen = GetUseWhen();
- if(pUseWhen)
+ if (pUseWhen)
return pUseWhen->IsUseOnPage();
else
return false;
@@ -1856,7 +1839,7 @@ LwpShadow* LwpLayout::GetShadow()
throw std::runtime_error("recursion in layout");
m_bGettingShadow = true;
LwpShadow* pRet = nullptr;
- if(m_nOverrideFlag & OVER_SHADOW)
+ if (m_nOverrideFlag & OVER_SHADOW)
{
LwpLayoutShadow* pLayoutShadow = dynamic_cast<LwpLayoutShadow*>(m_LayShadow.obj().get());
pRet = pLayoutShadow ? &pLayoutShadow->GetShadow() : nullptr;
@@ -1879,13 +1862,13 @@ LwpShadow* LwpLayout::GetShadow()
XFShadow* LwpLayout::GetXFShadow()
{
LwpShadow* pShadow = GetShadow();
- if( pShadow )
+ if (pShadow)
{
LwpColor color = pShadow->GetColor();
- double offsetX = pShadow->GetOffsetX();
- double offsetY = pShadow->GetOffsetY();
+ double offsetX = pShadow->GetOffsetX();
+ double offsetY = pShadow->GetOffsetY();
- if( offsetX && offsetY && color.IsValidColor() )
+ if (offsetX && offsetY && color.IsValidColor())
{
XFShadow* pXFShadow = new XFShadow();
enumXFShadowPos eXFShadowPos = enumXFShadowLeftTop;
@@ -1893,14 +1876,14 @@ XFShadow* LwpLayout::GetXFShadow()
bool left = false;
bool top = false;
- if( offsetX < 0 )
+ if (offsetX < 0)
left = true;
- if( offsetY < 0 )
+ if (offsetY < 0)
top = true;
- if( left )
+ if (left)
{
fOffset = -offsetX;
- if( top )
+ if (top)
eXFShadowPos = enumXFShadowLeftTop;
else
eXFShadowPos = enumXFShadowLeftBottom;
@@ -1908,7 +1891,7 @@ XFShadow* LwpLayout::GetXFShadow()
else
{
fOffset = offsetX;
- if( top )
+ if (top)
eXFShadowPos = enumXFShadowRightTop;
else
eXFShadowPos = enumXFShadowRightBottom;
@@ -1930,11 +1913,11 @@ XFShadow* LwpLayout::GetXFShadow()
*/
rtl::Reference<LwpVirtualLayout> LwpLayout::GetContainerLayout()
{
- if(IsRelativeAnchored())
+ if (IsRelativeAnchored())
{
//get position
LwpPara* pPara = dynamic_cast<LwpPara*>(GetPosition().obj().get());
- if(pPara)
+ if (pPara)
{
LwpStory* pStory = pPara->GetStory();
return pStory ? pStory->GetTabLayout() : nullptr;
@@ -1943,47 +1926,47 @@ rtl::Reference<LwpVirtualLayout> LwpLayout::GetContainerLayout()
return GetParentLayout();
}
-LwpPlacableLayout::LwpPlacableLayout( LwpObjectHeader const &objHdr, LwpSvStream* pStrm )
+LwpPlacableLayout::LwpPlacableLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpLayout(objHdr, pStrm)
, m_bGettingWrapType(false)
, m_bGettingLayoutRelativity(false)
, m_nWrapType(0)
, m_nBuoyancy(0)
, m_nBaseLineOffset(0)
-{}
+{
+}
-LwpPlacableLayout::~LwpPlacableLayout()
-{}
+LwpPlacableLayout::~LwpPlacableLayout() {}
void LwpPlacableLayout::Read()
{
LwpObjectStream* pStrm = m_pObjStrm.get();
LwpLayout::Read();
- if(LwpFileHeader::m_nFileRevision < 0x000B)
+ if (LwpFileHeader::m_nFileRevision < 0x000B)
{
assert(false);
}
else
{
sal_uInt16 simple = pStrm->QuickReaduInt16();
- if(!simple)
+ if (!simple)
{
m_nWrapType = pStrm->QuickReaduInt8();
m_nBuoyancy = pStrm->QuickReaduInt8();
m_nBaseLineOffset = pStrm->QuickReadInt32();
- m_Script.Read( pStrm);
+ m_Script.Read(pStrm);
}
else
{
m_nWrapType = LAY_WRAP_AROUND;
m_nBuoyancy = LAY_BUOYNEUTRAL;
- m_nBaseLineOffset = 0;
+ m_nBaseLineOffset = 0;
}
- m_LayRelativity.ReadIndexed( pStrm);
- if(pStrm->CheckExtra())
+ m_LayRelativity.ReadIndexed(pStrm);
+ if (pStrm->CheckExtra())
{
sal_uInt16 count = pStrm->QuickReaduInt16();
- if(count)
+ if (count)
{
// temporarily added by to avoid assertion
while (count)
@@ -2055,7 +2038,7 @@ LwpLayoutRelativity* LwpPlacableLayout::GetRelativityPiece()
sal_uInt8 LwpPlacableLayout::GetRelativeType()
{
LwpLayoutRelativity* pLayRel = GetRelativityPiece();
- if(pLayRel)
+ if (pLayRel)
{
return pLayRel->GetRelGuts().GetRelativeType();
}
@@ -2068,7 +2051,7 @@ sal_uInt8 LwpPlacableLayout::GetRelativeType()
sal_Int32 LwpPlacableLayout::GetBaseLineOffset()
{
/* The baseline is only valid if this is flow-with-text */
- if(GetRelativeType()!=LwpLayoutRelativityGuts::LAY_INLINE)
+ if (GetRelativeType() != LwpLayoutRelativityGuts::LAY_INLINE)
{
return 0;
}
@@ -2079,7 +2062,7 @@ sal_Int32 LwpPlacableLayout::GetBaseLineOffset()
return Baseline;
*/
- if(m_nOverrideFlag & OVER_PLACEMENT)
+ if (m_nOverrideFlag & OVER_PLACEMENT)
{
return m_nBaseLineOffset;
}
@@ -2092,7 +2075,6 @@ sal_Int32 LwpPlacableLayout::GetBaseLineOffset()
}
}
return 0;
-
}
/**
* @descr: whether the parent layout is page layout
@@ -2100,7 +2082,7 @@ sal_Int32 LwpPlacableLayout::GetBaseLineOffset()
*/
bool LwpPlacableLayout::IsAnchorPage()
{
- if(IsRelativeAnchored())
+ if (IsRelativeAnchored())
return false;
rtl::Reference<LwpVirtualLayout> xLayout = GetParentLayout();
@@ -2112,7 +2094,7 @@ bool LwpPlacableLayout::IsAnchorPage()
*/
bool LwpPlacableLayout::IsAnchorFrame()
{
- if(IsRelativeAnchored())
+ if (IsRelativeAnchored())
return false;
rtl::Reference<LwpVirtualLayout> xLayout = GetParentLayout();
@@ -2124,7 +2106,7 @@ bool LwpPlacableLayout::IsAnchorFrame()
*/
bool LwpPlacableLayout::IsAnchorCell()
{
- if(IsRelativeAnchored())
+ if (IsRelativeAnchored())
return false;
rtl::Reference<LwpVirtualLayout> xLayout = GetParentLayout();
@@ -2135,9 +2117,6 @@ bool LwpPlacableLayout::IsAnchorCell()
* @descr: Set font style for setting position of frame
*
*/
-void LwpPlacableLayout::SetFont(rtl::Reference<XFFont> const & pFont)
-{
- m_pFont = pFont;
-}
+void LwpPlacableLayout::SetFont(rtl::Reference<XFFont> const& pFont) { m_pFont = pFont; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwplaypiece.hxx b/lotuswordpro/source/filter/lwplaypiece.hxx
index d5319ffb299d..4c5983c443eb 100644
--- a/lotuswordpro/source/filter/lwplaypiece.hxx
+++ b/lotuswordpro/source/filter/lwplaypiece.hxx
@@ -67,27 +67,27 @@
#include "lwpborderstuff.hxx"
#include "lwpshadow.hxx"
-
class LwpRotor
{
public:
LwpRotor();
~LwpRotor();
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
+
private:
- sal_Int16 m_nRotation; //angle
+ sal_Int16 m_nRotation; //angle
};
class LwpLayoutGeometry final : public LwpVirtualPiece
{
public:
- LwpLayoutGeometry(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutGeometry(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
sal_Int32 GetWidth() const { return m_nWidth; }
sal_Int32 GetHeight() const { return m_nHeight; }
const LwpPoint& GetOrigin() const { return m_Origin; }
const LwpPoint& GetAbsoluteOrigin() const { return m_AbsoluteOrigin; }
- sal_uInt8 GetContentOrientation() const { return m_ContentOrientation;}
+ sal_uInt8 GetContentOrientation() const { return m_ContentOrientation; }
private:
virtual void Read() override;
@@ -104,18 +104,29 @@ private:
class LwpLayoutScale final : public LwpVirtualPiece
{
public:
- enum {ORIGINAL_SIZE = 1, FIT_IN_FRAME = 2, PERCENTAGE = 4,
- CUSTOM = 8, MAINTAIN_ASPECT_RATIO = 16};
+ enum
+ {
+ ORIGINAL_SIZE = 1,
+ FIT_IN_FRAME = 2,
+ PERCENTAGE = 4,
+ CUSTOM = 8,
+ MAINTAIN_ASPECT_RATIO = 16
+ };
- enum {CENTERED = 1, TILED = 2};
- LwpLayoutScale(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ enum
+ {
+ CENTERED = 1,
+ TILED = 2
+ };
+ LwpLayoutScale(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
- sal_uInt16 GetScaleMode() const {return m_nScaleMode;}
- sal_uInt32 GetScalePercentage() const {return m_nScalePercentage;}
- sal_Int32 GetScaleWidth() const {return m_nScaleWidth;}
- sal_Int32 GetScaleHeight() const {return m_nScaleHeight;}
- sal_uInt16 GetPlacement() const {return m_nPlacement;}
- LwpPoint& GetOffset() {return m_Offset;}
+ sal_uInt16 GetScaleMode() const { return m_nScaleMode; }
+ sal_uInt32 GetScalePercentage() const { return m_nScalePercentage; }
+ sal_Int32 GetScaleWidth() const { return m_nScaleWidth; }
+ sal_Int32 GetScaleHeight() const { return m_nScaleHeight; }
+ sal_uInt16 GetPlacement() const { return m_nPlacement; }
+ LwpPoint& GetOffset() { return m_Offset; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutScale() override;
@@ -132,10 +143,11 @@ private:
class LwpLayoutMargins final : public LwpVirtualPiece
{
public:
- LwpLayoutMargins(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutMargins(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
LwpMargins& GetMargins() { return m_Margins; }
- LwpMargins& GetExtMargins(){ return m_ExtMargins;}
+ LwpMargins& GetExtMargins() { return m_ExtMargins; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutMargins() override;
@@ -148,9 +160,10 @@ private:
class LwpLayoutBorder final : public LwpVirtualPiece
{
public:
- LwpLayoutBorder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutBorder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
- LwpBorderStuff& GetBorderStuff(){ return m_BorderStuff;}
+ LwpBorderStuff& GetBorderStuff() { return m_BorderStuff; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutBorder() override;
@@ -161,9 +174,10 @@ private:
class LwpLayoutBackground final : public LwpVirtualPiece
{
public:
- LwpLayoutBackground(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutBackground(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
- LwpBackgroundStuff& GetBackgoudStuff(){return m_BackgroundStuff;}
+ LwpBackgroundStuff& GetBackgoudStuff() { return m_BackgroundStuff; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutBackground() override;
@@ -176,7 +190,8 @@ class LwpExternalBorder
public:
LwpExternalBorder();
~LwpExternalBorder();
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
+
private:
LwpAtomHolder m_LeftName;
LwpAtomHolder m_TopName;
@@ -188,13 +203,14 @@ private:
class LwpLayoutExternalBorder final : public LwpVirtualPiece
{
public:
- LwpLayoutExternalBorder(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutExternalBorder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
+
private:
virtual void Read() override;
virtual ~LwpLayoutExternalBorder() override;
- LwpExternalBorder m_ExtranalBorder;
+ LwpExternalBorder m_ExtranalBorder;
};
class LwpColumnInfo
@@ -202,8 +218,9 @@ class LwpColumnInfo
public:
LwpColumnInfo();
~LwpColumnInfo();
- void Read(LwpObjectStream *pStrm);
- double GetGap(){return LwpTools::ConvertFromUnitsToMetric(m_nGap);}
+ void Read(LwpObjectStream* pStrm);
+ double GetGap() { return LwpTools::ConvertFromUnitsToMetric(m_nGap); }
+
private:
sal_Int32 m_nWidth;
sal_Int32 m_nGap;
@@ -212,10 +229,11 @@ private:
class LwpLayoutColumns final : public LwpVirtualPiece
{
public:
- LwpLayoutColumns(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutColumns(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
- sal_uInt16 GetNumCols() const {return m_nNumCols;}
+ sal_uInt16 GetNumCols() const { return m_nNumCols; }
double GetColGap(sal_uInt16 nIndex);
+
private:
virtual void Read() override;
virtual ~LwpLayoutColumns() override;
@@ -227,9 +245,10 @@ private:
class LwpLayoutGutters final : public LwpVirtualPiece
{
public:
- LwpLayoutGutters(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutGutters(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
LwpBorderStuff& GetBorderStuff() { return m_BorderBuffer; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutGutters() override;
@@ -242,7 +261,8 @@ class LwpJoinStuff
public:
LwpJoinStuff();
~LwpJoinStuff();
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
+
private:
sal_uInt16 m_nPercentage;
sal_uInt16 m_nCorners;
@@ -278,7 +298,7 @@ private:
MAXJOIN = 24
};
- sal_uInt16 m_nID;//JoinType
+ sal_uInt16 m_nID; //JoinType
sal_uInt16 m_nScaling;
LwpColor m_Color;
};
@@ -286,8 +306,9 @@ private:
class LwpLayoutJoins final : public LwpVirtualPiece
{
public:
- LwpLayoutJoins(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutJoins(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
+
private:
virtual void Read() override;
virtual ~LwpLayoutJoins() override;
@@ -298,9 +319,10 @@ private:
class LwpLayoutShadow final : public LwpVirtualPiece
{
public:
- LwpLayoutShadow(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutShadow(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
LwpShadow& GetShadow() { return m_Shadow; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutShadow() override;
@@ -312,8 +334,8 @@ class LwpLayoutRelativityGuts
{
public:
LwpLayoutRelativityGuts();
- void Read(LwpObjectStream *pStrm);
- sal_uInt8 GetRelativeType() const { return m_nRelType;}
+ void Read(LwpObjectStream* pStrm);
+ sal_uInt8 GetRelativeType() const { return m_nRelType; }
enum RelativeType
{
LAY_PARENT_RELATIVE = 1,
@@ -341,21 +363,23 @@ public:
LAY_EXTERNAL,
LAY_BORDER
};
+
private:
- sal_uInt8 m_nRelType;
- sal_uInt8 m_nRelFromWhere;
- LwpPoint m_RelDistance;
- sal_uInt8 m_nTether;
- sal_uInt8 m_nTetherWhere;
- sal_uInt8 m_nFlags;
+ sal_uInt8 m_nRelType;
+ sal_uInt8 m_nRelFromWhere;
+ LwpPoint m_RelDistance;
+ sal_uInt8 m_nTether;
+ sal_uInt8 m_nTetherWhere;
+ sal_uInt8 m_nFlags;
};
class LwpLayoutRelativity final : public LwpVirtualPiece
{
public:
- LwpLayoutRelativity(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpLayoutRelativity(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual void Parse(IXFStream* pOutputStream) override;
LwpLayoutRelativityGuts& GetRelGuts() { return m_RelGuts; }
+
private:
virtual void Read() override;
virtual ~LwpLayoutRelativity() override;
diff --git a/lotuswordpro/source/filter/lwplnopts.cxx b/lotuswordpro/source/filter/lwplnopts.cxx
index f06774ad184b..566db68b37c6 100644
--- a/lotuswordpro/source/filter/lwplnopts.cxx
+++ b/lotuswordpro/source/filter/lwplnopts.cxx
@@ -56,14 +56,11 @@
#include <lwpglobalmgr.hxx>
#include "lwplnopts.hxx"
-LwpLineNumberOptions::LwpLineNumberOptions(LwpObjectStream* pStrm)
-{
- Read(pStrm);
-}
+LwpLineNumberOptions::LwpLineNumberOptions(LwpObjectStream* pStrm) { Read(pStrm); }
/**
* @descr Read LwpLineNumberOptions from object stream
*/
-void LwpLineNumberOptions::Read(LwpObjectStream *pStrm)
+void LwpLineNumberOptions::Read(LwpObjectStream* pStrm)
{
m_nType = pStrm->QuickReaduInt16();
m_nFlags = pStrm->QuickReaduInt16();
diff --git a/lotuswordpro/source/filter/lwplnopts.hxx b/lotuswordpro/source/filter/lwplnopts.hxx
index a861b311ba64..1608443ee7e3 100644
--- a/lotuswordpro/source/filter/lwplnopts.hxx
+++ b/lotuswordpro/source/filter/lwplnopts.hxx
@@ -70,23 +70,27 @@ class LwpLineNumberOptions final
{
public:
explicit LwpLineNumberOptions(LwpObjectStream* pStrm);
+
private:
sal_uInt16 m_nType;
sal_uInt16 m_nFlags;
sal_uInt16 m_nSeparator;
sal_uInt32 m_nSpacing;
sal_uInt32 m_nDistance;
+
public:
enum
{
- NUMBER_NONE, NUMBER_LINES, NUMBER_TEXTLINESONLY
+ NUMBER_NONE,
+ NUMBER_LINES,
+ NUMBER_TEXTLINESONLY
};
enum
{
- LN_RESETEACHPAGE = 0x01,
- LN_COUNTBLANKLINES = 0x02
+ LN_RESETEACHPAGE = 0x01,
+ LN_COUNTBLANKLINES = 0x02
};
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
void RegisterStyle();
};
#endif
diff --git a/lotuswordpro/source/filter/lwpnotes.cxx b/lotuswordpro/source/filter/lwpnotes.cxx
index b82bd871733f..273013dba18a 100644
--- a/lotuswordpro/source/filter/lwpnotes.cxx
+++ b/lotuswordpro/source/filter/lwpnotes.cxx
@@ -65,14 +65,15 @@
#include <localtime.hxx>
#include <lwptools.hxx>
- LwpFribNote::LwpFribNote(LwpPara* pPara ):LwpFrib(pPara)
+LwpFribNote::LwpFribNote(LwpPara* pPara)
+ : LwpFrib(pPara)
{
}
/**
* @descr read frib information
*/
-void LwpFribNote::Read(LwpObjectStream *pObjStrm, sal_uInt16 /*len*/)
+void LwpFribNote::Read(LwpObjectStream* pObjStrm, sal_uInt16 /*len*/)
{
m_Layout.ReadIndexed(pObjStrm);
}
@@ -83,7 +84,7 @@ void LwpFribNote::Read(LwpObjectStream *pObjStrm, sal_uInt16 /*len*/)
void LwpFribNote::RegisterNewStyle()
{
rtl::Reference<LwpObject> pLayout = m_Layout.obj();
- if(pLayout.is())
+ if (pLayout.is())
{
//register font style
LwpFrib::RegisterStyle(m_pPara->GetFoundry());
@@ -99,22 +100,22 @@ void LwpFribNote::RegisterNewStyle()
void LwpFribNote::XFConvert(XFContentContainer* pCont)
{
LwpNoteLayout* pLayout = dynamic_cast<LwpNoteLayout*>(m_Layout.obj().get());
- if(!pLayout)
+ if (!pLayout)
return;
XFAnnotation* pXFNote = new XFAnnotation;
pXFNote->SetAuthor(pLayout->GetAuthor());
LtTm aTm;
tools::Long nTime = pLayout->GetTime();
- if(LtgLocalTime(nTime, aTm))
+ if (LtgLocalTime(nTime, aTm))
{
pXFNote->SetDate(LwpTools::DateTimeToOUString(aTm));
}
pLayout->XFConvert(pXFNote);
- if(m_pModifiers)
+ if (m_pModifiers)
{
- XFTextSpan *pSpan = new XFTextSpan();
+ XFTextSpan* pSpan = new XFTextSpan();
pSpan->SetStyleName(GetStyleName());
pSpan->Add(pXFNote);
pCont->Add(pSpan);
@@ -123,19 +124,15 @@ void LwpFribNote::XFConvert(XFContentContainer* pCont)
{
pCont->Add(pXFNote);
}
-
}
-LwpNoteLayout::LwpNoteLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpNoteLayout::LwpNoteLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpFrameLayout(objHdr, pStrm)
, m_nTime(0)
{
}
-LwpNoteLayout::~LwpNoteLayout()
-{
-
-}
+LwpNoteLayout::~LwpNoteLayout() {}
/**
* @descr read note layout object
@@ -166,7 +163,7 @@ void LwpNoteLayout::Read()
void LwpNoteLayout::RegisterStyle()
{
LwpVirtualLayout* pTextLayout = GetTextLayout();
- if(pTextLayout)
+ if (pTextLayout)
{
pTextLayout->SetFoundry(GetFoundry());
pTextLayout->DoRegisterStyle();
@@ -176,10 +173,10 @@ void LwpNoteLayout::RegisterStyle()
/**
* @descr convert note
*/
-void LwpNoteLayout::XFConvert(XFContentContainer * pCont)
+void LwpNoteLayout::XFConvert(XFContentContainer* pCont)
{
LwpVirtualLayout* pTextLayout = GetTextLayout();
- if(pTextLayout)
+ if (pTextLayout)
{
pTextLayout->DoXFConvert(pCont);
}
@@ -191,7 +188,7 @@ void LwpNoteLayout::XFConvert(XFContentContainer * pCont)
LwpVirtualLayout* LwpNoteLayout::GetTextLayout()
{
LwpVirtualLayout* pLayout = FindChildByType(LWP_VIEWPORT_LAYOUT);
- if(pLayout)
+ if (pLayout)
{
return pLayout->FindChildByType(LWP_NOTETEXT_LAYOUT);
}
@@ -203,22 +200,23 @@ LwpVirtualLayout* LwpNoteLayout::GetTextLayout()
*/
OUString LwpNoteLayout::GetAuthor()
{
- if(m_UserName.HasValue())
+ if (m_UserName.HasValue())
{
- if(m_UserName.str() != " ")
+ if (m_UserName.str() != " ")
{
return m_UserName.str();
}
}
//if username is null or writerspace, get username from noteheaderlayout
- LwpNoteHeaderLayout* pTextLayout = static_cast<LwpNoteHeaderLayout*>(FindChildByType(LWP_NOTEHEADER_LAYOUT));
- if(pTextLayout)
+ LwpNoteHeaderLayout* pTextLayout
+ = static_cast<LwpNoteHeaderLayout*>(FindChildByType(LWP_NOTEHEADER_LAYOUT));
+ if (pTextLayout)
{
LwpStory* pStory = dynamic_cast<LwpStory*>(pTextLayout->GetContent().obj().get());
- if(pStory)
+ if (pStory)
{
LwpPara* pFirst = dynamic_cast<LwpPara*>(pStory->GetFirstPara().obj().get());
- if(pFirst)
+ if (pFirst)
return pFirst->GetContentText(true);
}
}
@@ -226,14 +224,12 @@ OUString LwpNoteLayout::GetAuthor()
return m_UserName.str();
}
-LwpNoteHeaderLayout::LwpNoteHeaderLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpNoteHeaderLayout::LwpNoteHeaderLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpFrameLayout(objHdr, pStrm)
{
}
-LwpNoteHeaderLayout::~LwpNoteHeaderLayout()
-{
-}
+LwpNoteHeaderLayout::~LwpNoteHeaderLayout() {}
/**
* @descr read note layout object
@@ -245,22 +241,16 @@ void LwpNoteHeaderLayout::Read()
m_pObjStrm->SkipExtra();
}
-void LwpNoteHeaderLayout::RegisterStyle()
-{
-}
+void LwpNoteHeaderLayout::RegisterStyle() {}
-void LwpNoteHeaderLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpNoteHeaderLayout::XFConvert(XFContentContainer* /*pCont*/) {}
-LwpNoteTextLayout::LwpNoteTextLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpNoteTextLayout::LwpNoteTextLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpFrameLayout(objHdr, pStrm)
{
}
-LwpNoteTextLayout::~LwpNoteTextLayout()
-{
-}
+LwpNoteTextLayout::~LwpNoteTextLayout() {}
/**
* @descr read note layout object
@@ -278,30 +268,28 @@ void LwpNoteTextLayout::Read()
void LwpNoteTextLayout::RegisterStyle()
{
rtl::Reference<LwpObject> pContent = m_Content.obj();
- if(pContent.is())
+ if (pContent.is())
{
pContent->SetFoundry(GetFoundry());
pContent->DoRegisterStyle();
}
}
-void LwpNoteTextLayout::XFConvert(XFContentContainer * pCont)
+void LwpNoteTextLayout::XFConvert(XFContentContainer* pCont)
{
rtl::Reference<LwpObject> pContent = m_Content.obj();
- if(pContent.is())
+ if (pContent.is())
{
pContent->DoXFConvert(pCont);
}
}
-LwpViewportLayout::LwpViewportLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpViewportLayout::LwpViewportLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpPlacableLayout(objHdr, pStrm)
{
}
-LwpViewportLayout::~LwpViewportLayout()
-{
-}
+LwpViewportLayout::~LwpViewportLayout() {}
/**
* @descr read note layout object
@@ -313,12 +301,8 @@ void LwpViewportLayout::Read()
m_pObjStrm->SkipExtra();
}
-void LwpViewportLayout::RegisterStyle()
-{
-}
+void LwpViewportLayout::RegisterStyle() {}
-void LwpViewportLayout::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpViewportLayout::XFConvert(XFContentContainer* /*pCont*/) {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpnotes.hxx b/lotuswordpro/source/filter/lwpnotes.hxx
index df79d1b62fcc..73ceb359fae2 100644
--- a/lotuswordpro/source/filter/lwpnotes.hxx
+++ b/lotuswordpro/source/filter/lwpnotes.hxx
@@ -68,13 +68,14 @@
* @brief TAG_NOTE_FRIB object
*
*/
-class LwpFribNote: public LwpFrib
+class LwpFribNote : public LwpFrib
{
public:
- explicit LwpFribNote(LwpPara* pPara );
+ explicit LwpFribNote(LwpPara* pPara);
void Read(LwpObjectStream* pObjStrm, sal_uInt16 len) override;
void RegisterNewStyle();
void XFConvert(XFContentContainer* pCont);
+
private:
LwpObjectID m_Layout;
};
@@ -86,12 +87,12 @@ private:
class LwpNoteLayout final : public LwpFrameLayout
{
public:
- LwpNoteLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpNoteLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpNoteLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_NOTE_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_NOTE_LAYOUT; }
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
- sal_uInt32 GetTime() const { return m_nTime;}
+ sal_uInt32 GetTime() const { return m_nTime; }
OUString GetAuthor();
private:
@@ -106,12 +107,12 @@ private:
* @brief VO_NOTEHEADERLAYOUT object
*
*/
-class LwpNoteHeaderLayout: public LwpFrameLayout
+class LwpNoteHeaderLayout : public LwpFrameLayout
{
public:
- LwpNoteHeaderLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpNoteHeaderLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpNoteHeaderLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_NOTEHEADER_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_NOTEHEADER_LAYOUT; }
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
@@ -123,12 +124,12 @@ protected:
* @brief VO_NOTETEXTLAYOUT object
*
*/
-class LwpNoteTextLayout: public LwpFrameLayout
+class LwpNoteTextLayout : public LwpFrameLayout
{
public:
- LwpNoteTextLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpNoteTextLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpNoteTextLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_NOTETEXT_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_NOTETEXT_LAYOUT; }
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
@@ -140,12 +141,12 @@ protected:
* @brief VO_VPLAYOUT object
*
*/
-class LwpViewportLayout: public LwpPlacableLayout
+class LwpViewportLayout : public LwpPlacableLayout
{
public:
- LwpViewportLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpViewportLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpViewportLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_VIEWPORT_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_VIEWPORT_LAYOUT; }
virtual void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
diff --git a/lotuswordpro/source/filter/lwpnumberingoverride.hxx b/lotuswordpro/source/filter/lwpnumberingoverride.hxx
index b4851a103dec..09975e885763 100644
--- a/lotuswordpro/source/filter/lwpnumberingoverride.hxx
+++ b/lotuswordpro/source/filter/lwpnumberingoverride.hxx
@@ -72,13 +72,13 @@ public:
enum
{
- NO_LEVEL = 0x0001,
- NO_POSITION = 0x0002,
- HEADING = 0x0004,
- SMARTLEVEL = 0x0008
+ NO_LEVEL = 0x0001,
+ NO_POSITION = 0x0002,
+ HEADING = 0x0004,
+ SMARTLEVEL = 0x0008
};
- virtual void Read(LwpObjectStream *pStrm) override;
+ virtual void Read(LwpObjectStream* pStrm) override;
inline sal_uInt16 GetLevel() const;
inline sal_uInt16 GetPosition() const;
@@ -90,24 +90,15 @@ private:
LwpNumberingOverride(LwpNumberingOverride const& rOther);
LwpNumberingOverride& operator=(LwpNumberingOverride const& rOther) = delete;
- sal_uInt16 m_nLevel;
- sal_uInt16 m_nPosition;
+ sal_uInt16 m_nLevel;
+ sal_uInt16 m_nPosition;
};
-inline sal_uInt16 LwpNumberingOverride::GetLevel() const
-{
- return m_nLevel;
-}
+inline sal_uInt16 LwpNumberingOverride::GetLevel() const { return m_nLevel; }
-inline sal_uInt16 LwpNumberingOverride::GetPosition() const
-{
- return m_nPosition;
-}
+inline sal_uInt16 LwpNumberingOverride::GetPosition() const { return m_nPosition; }
-inline bool LwpNumberingOverride::IsHeading() const
-{
- return (m_nValues & HEADING) != 0;
-}
+inline bool LwpNumberingOverride::IsHeading() const { return (m_nValues & HEADING) != 0; }
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpobj.cxx b/lotuswordpro/source/filter/lwpobj.cxx
index 05de5684bdba..c480fd3d0d75 100644
--- a/lotuswordpro/source/filter/lwpobj.cxx
+++ b/lotuswordpro/source/filter/lwpobj.cxx
@@ -60,26 +60,27 @@
* @descr construct lwpobject from stream
*/
LwpObject::LwpObject(LwpObjectHeader objHdr, LwpSvStream* pStrm)
- : m_ObjHdr(objHdr), m_pFoundry(nullptr)
- , m_pStrm(pStrm), m_bRegisteringStyle(false), m_bParsingStyle(false)
+ : m_ObjHdr(objHdr)
+ , m_pFoundry(nullptr)
+ , m_pStrm(pStrm)
+ , m_bRegisteringStyle(false)
+ , m_bParsingStyle(false)
, m_bConvertingContent(false)
{
- m_pObjStrm.reset( new LwpObjectStream(pStrm, m_ObjHdr.IsCompressed(),
- static_cast<sal_uInt16>(m_ObjHdr.GetSize()) ) );
+ m_pObjStrm.reset(new LwpObjectStream(pStrm, m_ObjHdr.IsCompressed(),
+ static_cast<sal_uInt16>(m_ObjHdr.GetSize())));
}
/**
* @descr dtor()
*/
-LwpObject::~LwpObject()
-{
-}
+LwpObject::~LwpObject() {}
/**
* @descr QuickRead template
*/
void LwpObject::QuickRead()
{
Read();
- if(m_pObjStrm)
+ if (m_pObjStrm)
{
m_pObjStrm->ReadComplete();
m_pObjStrm.reset();
@@ -88,24 +89,20 @@ void LwpObject::QuickRead()
/**
* @descr default read function
*/
-void LwpObject::Read()
-{}
+void LwpObject::Read() {}
/**
* @descr default parse function
*/
-void LwpObject::Parse(IXFStream* /*pOutputStream*/)
-{}
+void LwpObject::Parse(IXFStream* /*pOutputStream*/) {}
/**
* @descr default register style function
*/
-void LwpObject::RegisterStyle()
-{}
+void LwpObject::RegisterStyle() {}
/**
* @descr default XFConvert function
* pCont is the XFContentContainer for the object conversion
*/
-void LwpObject::XFConvert(XFContentContainer* /*pCont*/)
-{}
+void LwpObject::XFConvert(XFContentContainer* /*pCont*/) {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpobjhdr.cxx b/lotuswordpro/source/filter/lwpobjhdr.cxx
index d93cf001fd19..13ade159cd82 100644
--- a/lotuswordpro/source/filter/lwpobjhdr.cxx
+++ b/lotuswordpro/source/filter/lwpobjhdr.cxx
@@ -64,12 +64,16 @@
#include <lwpfilehdr.hxx>
LwpObjectHeader::LwpObjectHeader()
- : m_nTag(0), m_ID(), m_nSize(0), m_bCompressed(false)
-{}
+ : m_nTag(0)
+ , m_ID()
+ , m_nSize(0)
+ , m_bCompressed(false)
+{
+}
/**
* @descr read header from stream
*/
-bool LwpObjectHeader::Read(LwpSvStream &rStrm)
+bool LwpObjectHeader::Read(LwpSvStream& rStrm)
{
sal_uInt32 nVersionID = 0;
sal_uInt32 nRefCount = 0;
@@ -78,34 +82,31 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
sal_Int64 nStartPos = rStrm.Tell();
- if ( LwpFileHeader::m_nFileRevision < 0x000B)
+ if (LwpFileHeader::m_nFileRevision < 0x000B)
{
- rStrm.ReadUInt32( m_nTag );
+ rStrm.ReadUInt32(m_nTag);
m_ID.Read(&rStrm);
- rStrm.ReadUInt32( nVersionID );
- rStrm.ReadUInt32( nRefCount );
- rStrm.ReadUInt32( nNextVersionOffset );
+ rStrm.ReadUInt32(nVersionID);
+ rStrm.ReadUInt32(nRefCount);
+ rStrm.ReadUInt32(nNextVersionOffset);
- nHeaderSize = sizeof(m_nTag) + LwpObjectID::DiskSize()
- + sizeof(nVersionID)
- + sizeof(nRefCount)
- + sizeof(nNextVersionOffset)
- + sizeof(m_nSize);
+ nHeaderSize = sizeof(m_nTag) + LwpObjectID::DiskSize() + sizeof(nVersionID)
+ + sizeof(nRefCount) + sizeof(nNextVersionOffset) + sizeof(m_nSize);
- if ((m_nTag == TAG_AMI) || ( LwpFileHeader::m_nFileRevision < 0x0006))
+ if ((m_nTag == TAG_AMI) || (LwpFileHeader::m_nFileRevision < 0x0006))
{
sal_uInt32 nNextVersionID = 0;
- rStrm.ReadUInt32( nNextVersionID );
+ rStrm.ReadUInt32(nNextVersionID);
nHeaderSize += sizeof(nNextVersionID);
}
- rStrm.ReadUInt32( m_nSize );
+ rStrm.ReadUInt32(m_nSize);
}
else
{
sal_uInt8 nFlagBits = 0;
sal_uInt16 VOType = 0;
- rStrm.ReadUInt16( VOType );
- rStrm.ReadUInt8( nFlagBits );
+ rStrm.ReadUInt16(VOType);
+ rStrm.ReadUInt8(nFlagBits);
m_nTag = static_cast<sal_uInt32>(VOType);
m_ID.ReadIndexed(&rStrm);
@@ -116,51 +117,51 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
switch (nFlagBits & VERSION_BITS)
{
case ONE_BYTE_VERSION:
- rStrm.ReadUInt8( tmpByte );
- nVersionID = static_cast<sal_uInt32>( tmpByte );
+ rStrm.ReadUInt8(tmpByte);
+ nVersionID = static_cast<sal_uInt32>(tmpByte);
nHeaderSize++;
break;
case TWO_BYTE_VERSION:
- rStrm.ReadUInt16( tmpShort );
- nVersionID = static_cast<sal_uInt32>( tmpShort );
+ rStrm.ReadUInt16(tmpShort);
+ nVersionID = static_cast<sal_uInt32>(tmpShort);
nHeaderSize += 2;
break;
case FOUR_BYTE_VERSION:
- rStrm.ReadUInt32( nVersionID );
+ rStrm.ReadUInt32(nVersionID);
nHeaderSize += 4;
break;
- case DEFAULT_VERSION: //fall through
+ case DEFAULT_VERSION: //fall through
default:
nVersionID = 2;
- break; // nothing
+ break; // nothing
}
switch (nFlagBits & REFCOUNT_BITS)
{
case ONE_BYTE_REFCOUNT:
- rStrm.ReadUInt8( tmpByte );
- nRefCount = static_cast<sal_uInt32>( tmpByte );
+ rStrm.ReadUInt8(tmpByte);
+ nRefCount = static_cast<sal_uInt32>(tmpByte);
nHeaderSize++;
break;
case TWO_BYTE_REFCOUNT:
- rStrm.ReadUInt16( tmpShort );
- nRefCount = static_cast<sal_uInt32>( tmpShort );
+ rStrm.ReadUInt16(tmpShort);
+ nRefCount = static_cast<sal_uInt32>(tmpShort);
nHeaderSize += 2;
break;
- case FOUR_BYTE_REFCOUNT: //through
+ case FOUR_BYTE_REFCOUNT: //through
default:
- rStrm.ReadUInt32( nRefCount );
+ rStrm.ReadUInt32(nRefCount);
nHeaderSize += 4;
break;
}
if (nFlagBits & HAS_PREVOFFSET)
{
- rStrm.ReadUInt32( nNextVersionOffset );
+ rStrm.ReadUInt32(nNextVersionOffset);
nHeaderSize += 4;
}
else
@@ -169,20 +170,20 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
switch (nFlagBits & SIZE_BITS)
{
case ONE_BYTE_SIZE:
- rStrm.ReadUInt8( tmpByte );
- m_nSize = static_cast<sal_uInt32>( tmpByte );
+ rStrm.ReadUInt8(tmpByte);
+ m_nSize = static_cast<sal_uInt32>(tmpByte);
nHeaderSize++;
break;
case TWO_BYTE_SIZE:
- rStrm.ReadUInt16( tmpShort );
+ rStrm.ReadUInt16(tmpShort);
m_nSize = static_cast<sal_uInt32>(tmpShort);
nHeaderSize += 2;
break;
- case FOUR_BYTE_SIZE: //go through
+ case FOUR_BYTE_SIZE: //go through
default:
- rStrm.ReadUInt32( m_nSize );
+ rStrm.ReadUInt32(m_nSize);
nHeaderSize += 4;
break;
}
diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx
index 767c60931f46..a0a278ec5af7 100644
--- a/lotuswordpro/source/filter/lwpobjid.cxx
+++ b/lotuswordpro/source/filter/lwpobjid.cxx
@@ -64,22 +64,25 @@
#include <lwpglobalmgr.hxx>
LwpObjectID::LwpObjectID()
- :m_nLow(0), m_nHigh(0), m_nIndex(0), m_bIsCompressed(false)
+ : m_nLow(0)
+ , m_nHigh(0)
+ , m_nIndex(0)
+ , m_bIsCompressed(false)
{
}
/**
* @descr Read object id with format: low(4bytes)+high(2bytes) from stream
* for LWP7 record
*/
-void LwpObjectID::Read(LwpSvStream *pStrm)
+void LwpObjectID::Read(LwpSvStream* pStrm)
{
- pStrm->ReadUInt32( m_nLow );
- pStrm->ReadUInt16( m_nHigh );
+ pStrm->ReadUInt32(m_nLow);
+ pStrm->ReadUInt16(m_nHigh);
}
/**
* @descr Read object id with format: low(4bytes)+high(2bytes) from object stream
*/
-sal_uInt32 LwpObjectID::Read(LwpObjectStream *pObj)
+sal_uInt32 LwpObjectID::Read(LwpObjectStream* pObj)
{
m_nLow = pObj->QuickReaduInt32();
m_nHigh = pObj->QuickReaduInt16();
@@ -90,17 +93,17 @@ sal_uInt32 LwpObjectID::Read(LwpObjectStream *pObj)
* if index>0, lowid is get from time table per the index
* else index+lowid+highid
*/
-void LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
+void LwpObjectID::ReadIndexed(LwpSvStream* pStrm)
{
-//note the m_nLow store the index instead of time from the timetable as in LWP
+ //note the m_nLow store the index instead of time from the timetable as in LWP
m_bIsCompressed = false;
- if( LwpFileHeader::m_nFileRevision < 0x000B)
+ if (LwpFileHeader::m_nFileRevision < 0x000B)
{
Read(pStrm);
return;
}
- pStrm->ReadUInt8( m_nIndex );
+ pStrm->ReadUInt8(m_nIndex);
if (m_nIndex)
{
@@ -109,13 +112,13 @@ void LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpObjectFactory* pFactory = pGlobal->GetLwpObjFactory();
LwpIndexManager& rIdxMgr = pFactory->GetIndexManager();
- m_nLow = rIdxMgr.GetObjTime( static_cast<sal_uInt16>(m_nIndex));
+ m_nLow = rIdxMgr.GetObjTime(static_cast<sal_uInt16>(m_nIndex));
}
else
{
- pStrm->ReadUInt32( m_nLow );
+ pStrm->ReadUInt32(m_nLow);
}
- pStrm->ReadUInt16( m_nHigh );
+ pStrm->ReadUInt16(m_nHigh);
DiskSizeIndexed();
}
@@ -124,10 +127,10 @@ void LwpObjectID::ReadIndexed(LwpSvStream *pStrm)
* if index>0, lowid is get from time table per the index
* else index+lowid+highid
*/
-sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream *pStrm)
+sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream* pStrm)
{
m_bIsCompressed = false;
- if(LwpFileHeader::m_nFileRevision < 0x000B)
+ if (LwpFileHeader::m_nFileRevision < 0x000B)
{
return Read(pStrm);
}
@@ -140,7 +143,7 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream *pStrm)
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpObjectFactory* pFactory = pGlobal->GetLwpObjFactory();
LwpIndexManager& rIdxMgr = pFactory->GetIndexManager();
- m_nLow = rIdxMgr.GetObjTime( static_cast<sal_uInt16>(m_nIndex));
+ m_nLow = rIdxMgr.GetObjTime(static_cast<sal_uInt16>(m_nIndex));
}
else
m_nLow = pStrm->QuickReaduInt32();
@@ -153,7 +156,7 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream *pStrm)
* else lowid equals to the lowid of previous low id
* and high id = the high id of previous id + diff +1
*/
-void LwpObjectID::ReadCompressed( LwpObjectStream* pObj, LwpObjectID const &prev )
+void LwpObjectID::ReadCompressed(LwpObjectStream* pObj, LwpObjectID const& prev)
{
sal_uInt8 diff = pObj->QuickReaduInt8();
@@ -164,7 +167,7 @@ void LwpObjectID::ReadCompressed( LwpObjectStream* pObj, LwpObjectID const &prev
else
{
m_nLow = prev.GetLow();
- m_nHigh = prev.GetHigh() + diff +1;
+ m_nHigh = prev.GetHigh() + diff + 1;
}
}
/**
@@ -172,9 +175,7 @@ void LwpObjectID::ReadCompressed( LwpObjectStream* pObj, LwpObjectID const &prev
*/
sal_uInt32 LwpObjectID::DiskSizeIndexed() const
{
- return sizeof(sal_uInt8)
- + ((m_nIndex != 0) ? 0 : sizeof(m_nLow))
- + sizeof(m_nHigh);
+ return sizeof(sal_uInt8) + ((m_nIndex != 0) ? 0 : sizeof(m_nLow)) + sizeof(m_nHigh);
}
/**
* @descr get object from object factory per the object id
@@ -188,9 +189,9 @@ rtl::Reference<LwpObject> LwpObjectID::obj(VO_TYPE tag) const
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpObjectFactory* pObjMgr = pGlobal->GetLwpObjFactory();
rtl::Reference<LwpObject> pObj = pObjMgr->QueryObject(*this);
- if( tag!=VO_INVALID && (pObj.is()) )
+ if (tag != VO_INVALID && (pObj.is()))
{
- if(static_cast<sal_uInt32>(tag) != pObj->GetTag())
+ if (static_cast<sal_uInt32>(tag) != pObj->GetTag())
{
pObj.clear();
}
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 5cd37f191fa3..11cbce4e8c41 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -64,9 +64,12 @@
/**
* @descr ctor() from LwpSvStream
*/
-LwpObjectStream::LwpObjectStream(LwpSvStream *pStrm, bool isCompressed, sal_uInt16 size)
- :m_pContentBuf(nullptr), m_nBufSize(size), m_nReadPos(0),
- m_pStrm(pStrm), m_bCompressed(isCompressed)
+LwpObjectStream::LwpObjectStream(LwpSvStream* pStrm, bool isCompressed, sal_uInt16 size)
+ : m_pContentBuf(nullptr)
+ , m_nBufSize(size)
+ , m_nReadPos(0)
+ , m_pStrm(pStrm)
+ , m_bCompressed(isCompressed)
{
if (size >= IO_BUFFERSIZE)
throw std::range_error("bad Object size");
@@ -84,7 +87,7 @@ void LwpObjectStream::Read2Buffer()
m_nReadPos = 0;
- if( m_bCompressed )
+ if (m_bCompressed)
{
std::unique_ptr<sal_uInt8[]> xCompressBuf(new sal_uInt8[m_nBufSize]);
@@ -94,7 +97,7 @@ void LwpObjectStream::Read2Buffer()
sal_uInt8 pTempDst[IO_BUFFERSIZE];
m_nBufSize = DecompressBuffer(pTempDst, pCompressBuffer, m_nBufSize);
- assert( m_nBufSize < IO_BUFFERSIZE);
+ assert(m_nBufSize < IO_BUFFERSIZE);
m_pContentBuf = AllocBuffer(m_nBufSize);
memcpy(m_pContentBuf, pTempDst, m_nBufSize);
@@ -110,7 +113,7 @@ void LwpObjectStream::Read2Buffer()
*/
sal_uInt8* LwpObjectStream::AllocBuffer(sal_uInt16 size)
{
- if (size<=100)
+ if (size <= 100)
{
return m_SmallBuffer;
}
@@ -120,15 +123,9 @@ sal_uInt8* LwpObjectStream::AllocBuffer(sal_uInt16 size)
/**
* @descr signal complete to release object buffer
*/
-void LwpObjectStream::ReadComplete()
-{
- ReleaseBuffer();
-}
+void LwpObjectStream::ReadComplete() { ReleaseBuffer(); }
-LwpObjectStream::~LwpObjectStream()
-{
- ReleaseBuffer();
-}
+LwpObjectStream::~LwpObjectStream() { ReleaseBuffer(); }
/**
* @descr release object buffer
*/
@@ -138,10 +135,7 @@ void LwpObjectStream::ReleaseBuffer()
m_pContentBuf = nullptr;
}
-sal_uInt16 LwpObjectStream::remainingSize() const
-{
- return m_nBufSize - m_nReadPos;
-}
+sal_uInt16 LwpObjectStream::remainingSize() const { return m_nBufSize - m_nReadPos; }
/**
* @descr read len bytes from object stream to buffer
@@ -149,13 +143,13 @@ sal_uInt16 LwpObjectStream::remainingSize() const
sal_uInt16 LwpObjectStream::QuickRead(void* buf, sal_uInt16 len)
{
memset(buf, 0, len);
- if( len > m_nBufSize - m_nReadPos )
+ if (len > m_nBufSize - m_nReadPos)
{
len = m_nBufSize - m_nReadPos;
}
- if( m_pContentBuf && len)
+ if (m_pContentBuf && len)
{
- memcpy(buf, m_pContentBuf+m_nReadPos, len);
+ memcpy(buf, m_pContentBuf + m_nReadPos, len);
m_nReadPos += len;
}
return len;
@@ -165,14 +159,14 @@ sal_uInt16 LwpObjectStream::QuickRead(void* buf, sal_uInt16 len)
*/
void LwpObjectStream::SeekRel(sal_uInt16 pos)
{
- if( pos > m_nBufSize - m_nReadPos)
+ if (pos > m_nBufSize - m_nReadPos)
pos = m_nBufSize - m_nReadPos;
- m_nReadPos +=pos;
+ m_nReadPos += pos;
}
/**
* @descr Seek to pos in object buffer/buffer
*/
-void LwpObjectStream::Seek( sal_uInt16 pos)
+void LwpObjectStream::Seek(sal_uInt16 pos)
{
if (pos < m_nBufSize)
{
@@ -185,16 +179,16 @@ void LwpObjectStream::Seek( sal_uInt16 pos)
*/
bool LwpObjectStream::QuickReadBool()
{
- SVBT16 aValue = {0};
+ SVBT16 aValue = { 0 };
QuickRead(aValue, sizeof(aValue));
return static_cast<bool>(SVBT16ToUInt16(aValue));
}
/**
* @descr Quick read sal_uInt32
*/
-sal_uInt32 LwpObjectStream::QuickReaduInt32(bool *pFailure)
+sal_uInt32 LwpObjectStream::QuickReaduInt32(bool* pFailure)
{
- SVBT32 aValue = {0};
+ SVBT32 aValue = { 0 };
sal_uInt16 nRead = QuickRead(aValue, sizeof(aValue));
if (pFailure)
*pFailure = (nRead != sizeof(aValue));
@@ -203,9 +197,9 @@ sal_uInt32 LwpObjectStream::QuickReaduInt32(bool *pFailure)
/**
* @descr Quick read sal_uInt32
*/
-sal_uInt16 LwpObjectStream::QuickReaduInt16(bool *pFailure)
+sal_uInt16 LwpObjectStream::QuickReaduInt16(bool* pFailure)
{
- SVBT16 aValue = {0};
+ SVBT16 aValue = { 0 };
sal_uInt16 nRead = QuickRead(aValue, sizeof(aValue));
if (pFailure)
*pFailure = (nRead != sizeof(aValue));
@@ -216,7 +210,7 @@ sal_uInt16 LwpObjectStream::QuickReaduInt16(bool *pFailure)
*/
sal_Int32 LwpObjectStream::QuickReadInt32()
{
- SVBT32 aValue = {0};
+ SVBT32 aValue = { 0 };
QuickRead(aValue, sizeof(aValue));
return static_cast<sal_Int32>(SVBT32ToUInt32(aValue));
}
@@ -225,7 +219,7 @@ sal_Int32 LwpObjectStream::QuickReadInt32()
*/
sal_Int16 LwpObjectStream::QuickReadInt16()
{
- SVBT16 aValue = {0};
+ SVBT16 aValue = { 0 };
QuickRead(aValue, sizeof(aValue));
return static_cast<sal_Int16>(SVBT16ToUInt16(aValue));
@@ -233,7 +227,7 @@ sal_Int16 LwpObjectStream::QuickReadInt16()
/**
* @descr Quick read sal_uInt8
*/
-sal_uInt8 LwpObjectStream::QuickReaduInt8(bool *pFailure)
+sal_uInt8 LwpObjectStream::QuickReaduInt8(bool* pFailure)
{
sal_uInt8 aValue = 0;
sal_uInt16 nRead = QuickRead(&aValue, sizeof(aValue));
@@ -246,8 +240,7 @@ sal_uInt8 LwpObjectStream::QuickReaduInt8(bool *pFailure)
*/
double LwpObjectStream::QuickReadDouble()
{
- union
- {
+ union {
double d;
sal_uInt8 c[8];
} s;
@@ -255,7 +248,7 @@ double LwpObjectStream::QuickReadDouble()
QuickRead(s.c, sizeof(s.c));
#if defined(OSL_BIGENDIAN)
for (size_t i = 0; i < 4; ++i)
- std::swap(s.c[i], s.c[7-i]);
+ std::swap(s.c[i], s.c[7 - i]);
#endif
return s.d;
}
@@ -271,10 +264,7 @@ void LwpObjectStream::SkipExtra()
/**
* @descr check if extra bytes
*/
-sal_uInt16 LwpObjectStream::CheckExtra()
-{
- return QuickReaduInt16();
-}
+sal_uInt16 LwpObjectStream::CheckExtra() { return QuickReaduInt16(); }
/**
* @descr decompress data buffer from pSrc to pDst
* Refer to the CAmiPro40File::DecompressObject(~) in LWP
@@ -294,7 +284,7 @@ sal_uInt16 LwpObjectStream::DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, s
// where zzzzzz is the count - 1 of compressed 0 bytes
Cnt = (*pSrc++ & 0x3F) + 1;
- if (DstSize+Cnt >= IO_BUFFERSIZE)
+ if (DstSize + Cnt >= IO_BUFFERSIZE)
throw BadDecompress();
memset(pDst, 0, Cnt);
pDst += Cnt;
@@ -309,7 +299,7 @@ sal_uInt16 LwpObjectStream::DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, s
// and nnn is the count - 1 of following non-zero bytes
Cnt = ((*pSrc & 0x38) >> 3) + 1;
- if (DstSize+Cnt >= IO_BUFFERSIZE)
+ if (DstSize + Cnt >= IO_BUFFERSIZE)
throw BadDecompress();
memset(pDst, 0, Cnt);
pDst += Cnt;
@@ -318,7 +308,7 @@ sal_uInt16 LwpObjectStream::DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, s
if (Size < Cnt + 1)
throw BadDecompress();
Size -= Cnt + 1;
- if (DstSize+Cnt >= IO_BUFFERSIZE)
+ if (DstSize + Cnt >= IO_BUFFERSIZE)
throw BadDecompress();
memcpy(pDst, pSrc, Cnt);
pDst += Cnt;
@@ -345,7 +335,7 @@ sal_uInt16 LwpObjectStream::DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, s
if (Size < Cnt + 1)
throw BadDecompress();
Size -= Cnt + 1;
- if (DstSize+Cnt >= IO_BUFFERSIZE)
+ if (DstSize + Cnt >= IO_BUFFERSIZE)
throw BadDecompress();
memcpy(pDst, pSrc, Cnt);
pDst += Cnt;
@@ -356,7 +346,6 @@ sal_uInt16 LwpObjectStream::DecompressBuffer(sal_uInt8* pDst, sal_uInt8* pSrc, s
assert(DstSize < IO_BUFFERSIZE);
if (DstSize >= IO_BUFFERSIZE)
throw BadDecompress();
-
}
return static_cast<sal_uInt16>(DstSize);
}
@@ -373,7 +362,7 @@ OUString LwpObjectStream::QuickReadStringPtr()
OUString str;
if (diskSize < sizeof diskSize)
throw std::range_error("Too small size");
- LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
+ LwpTools::QuickReadUnicode(this, str, diskSize - sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
return str;
}
diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx
index 6da021f210d6..10712e294a56 100644
--- a/lotuswordpro/source/filter/lwpoleobject.cxx
+++ b/lotuswordpro/source/filter/lwpoleobject.cxx
@@ -68,9 +68,10 @@
* @param: objHdr - object header, read before entering this function
* @param: pStrm - file stream
*/
-LwpGraphicOleObject::LwpGraphicOleObject(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpGraphicOleObject::LwpGraphicOleObject(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpContent(objHdr, pStrm)
-{}
+{
+}
/**
* @descr: Read GraphicOleObject part
*/
@@ -85,21 +86,21 @@ void LwpGraphicOleObject::Read()
m_pPrevObj.ReadIndexed(m_pObjStrm.get());
}
m_pObjStrm->SkipExtra();
-
}
-void LwpGraphicOleObject::GetGrafOrgSize(double & rWidth, double & rHeight)
+void LwpGraphicOleObject::GetGrafOrgSize(double& rWidth, double& rHeight)
{
rWidth = 0;
rHeight = 0;
}
-void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
+void LwpGraphicOleObject::GetGrafScaledSize(double& fWidth, double& fHeight)
{
GetGrafOrgSize(fWidth, fHeight);
// scaled image size
- double fSclGrafWidth = fWidth;//LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleWidth());
- double fSclGrafHeight = fHeight;//LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleHeight());
+ double fSclGrafWidth = fWidth; //LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleWidth());
+ double fSclGrafHeight
+ = fHeight; //LwpTools::ConvertFromUnitsToMetric(pMyScale->GetScaleHeight());
rtl::Reference<LwpVirtualLayout> xLayout(GetLayout(nullptr));
if (xLayout.is() && xLayout->IsFrame())
@@ -125,8 +126,8 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
double fFrameHeight = LwpTools::ConvertFromUnitsToMetric(pFrameGeo->GetHeight());
// calculate the displayed size of the frame
- double fDisFrameWidth = fFrameWidth - (fLeftMargin+fRightMargin);
- double fDisFrameHeight = fFrameHeight - (fTopMargin+fBottomMargin);
+ double fDisFrameWidth = fFrameWidth - (fLeftMargin + fRightMargin);
+ double fDisFrameHeight = fFrameHeight - (fTopMargin + fBottomMargin);
// get scale mode
sal_uInt16 nScalemode = pMyScale->GetScaleMode();
@@ -137,7 +138,8 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
}
else if (nScalemode & LwpLayoutScale::PERCENTAGE)
{
- double fScalePercentage = static_cast<double>(pMyScale->GetScalePercentage()) / 1000;
+ double fScalePercentage
+ = static_cast<double>(pMyScale->GetScalePercentage()) / 1000;
fSclGrafWidth = fScalePercentage * fWidth;
fSclGrafHeight = fScalePercentage * fHeight;
}
@@ -152,17 +154,17 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
{
if (fHeight == 0.0 || fDisFrameHeight == 0.0)
throw o3tl::divide_by_zero();
- if (fWidth/fHeight >= fDisFrameWidth/fDisFrameHeight)
+ if (fWidth / fHeight >= fDisFrameWidth / fDisFrameHeight)
{
fSclGrafWidth = fDisFrameWidth;
if (fWidth == 0.0)
throw o3tl::divide_by_zero();
- fSclGrafHeight = (fDisFrameWidth/fWidth) * fHeight;
+ fSclGrafHeight = (fDisFrameWidth / fWidth) * fHeight;
}
else
{
fSclGrafHeight = fDisFrameHeight;
- fSclGrafWidth = (fDisFrameHeight/fHeight) * fWidth;
+ fSclGrafWidth = (fDisFrameHeight / fHeight) * fWidth;
}
}
else
@@ -173,8 +175,8 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
}
}
}
- fWidth = fSclGrafWidth ;
- fHeight = fSclGrafHeight ;
+ fWidth = fSclGrafWidth;
+ fHeight = fSclGrafHeight;
}
/**
@@ -182,10 +184,10 @@ void LwpGraphicOleObject::GetGrafScaledSize(double & fWidth, double & fHeight)
* @param: objHdr - object header, read before entering this function
* @param: pStrm - file stream
*/
-LwpOleObject::LwpOleObject(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpOleObject::LwpOleObject(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpGraphicOleObject(objHdr, pStrm)
, cPersistentFlags(0)
- , m_SizeRect(0,0,5,5)
+ , m_SizeRect(0, 0, 5, 5)
{
}
/**
@@ -230,7 +232,6 @@ void LwpOleObject::Read()
m_pObjStrm->QuickReaduInt16();
m_pObjStrm->SkipExtra();
}
-
}
/**
@@ -238,22 +239,16 @@ void LwpOleObject::Read()
* @param: pOutputStream - stream to dump OLE object
* @param: pFrameLayout - framelayout object used to dump OLE object
*/
-void LwpOleObject::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpOleObject::Parse(IXFStream* /*pOutputStream*/) {}
-void LwpOleObject::XFConvert(XFContentContainer * /*pCont*/)
-{
-}
+void LwpOleObject::XFConvert(XFContentContainer* /*pCont*/) {}
-void LwpOleObject::GetGrafOrgSize(double & rWidth, double & rHeight)
+void LwpOleObject::GetGrafOrgSize(double& rWidth, double& rHeight)
{
- rWidth = static_cast<double>(m_SizeRect.GetWidth())/1000;//cm unit
- rHeight = static_cast<double>(m_SizeRect.GetHeight())/1000;//cm unit
+ rWidth = static_cast<double>(m_SizeRect.GetWidth()) / 1000; //cm unit
+ rHeight = static_cast<double>(m_SizeRect.GetHeight()) / 1000; //cm unit
}
-void LwpOleObject::RegisterStyle()
-{
-}
+void LwpOleObject::RegisterStyle() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpoverride.cxx b/lotuswordpro/source/filter/lwpoverride.cxx
index be190b7c8780..928d642d61b0 100644
--- a/lotuswordpro/source/filter/lwpoverride.cxx
+++ b/lotuswordpro/source/filter/lwpoverride.cxx
@@ -103,7 +103,7 @@ void LwpOverride::Override(sal_uInt16 nBits, STATE eState)
{
m_nValues |= nBits;
}
- else /* State == STATE_OFF */
+ else /* State == STATE_OFF */
{
m_nValues &= ~nBits;
}
@@ -132,7 +132,6 @@ void LwpTextLanguageOverride::Read(LwpObjectStream* pStrm)
}
pStrm->SkipExtra();
-
}
/*class LwpTextAttributeOverride*/
@@ -162,10 +161,7 @@ void LwpTextAttributeOverride::Read(LwpObjectStream* pStrm)
pStrm->SkipExtra();
}
-bool LwpTextAttributeOverride::IsHighlight() const
-{
- return (m_nValues & TAO_HIGHLIGHT) != 0;
-}
+bool LwpTextAttributeOverride::IsHighlight() const { return (m_nValues & TAO_HIGHLIGHT) != 0; }
/*class LwpKinsokuOptsOverride*/
LwpKinsokuOptsOverride::LwpKinsokuOptsOverride(LwpKinsokuOptsOverride const& rOther)
@@ -198,16 +194,13 @@ LwpBulletOverride::LwpBulletOverride(LwpBulletOverride const& rOther)
{
}
-LwpBulletOverride* LwpBulletOverride::clone() const
-{
- return new LwpBulletOverride(*this);
-}
+LwpBulletOverride* LwpBulletOverride::clone() const { return new LwpBulletOverride(*this); }
-void LwpBulletOverride::Read(LwpObjectStream * pStrm)
+void LwpBulletOverride::Read(LwpObjectStream* pStrm)
{
if (pStrm->QuickReadBool())
{
- m_bIsNull= false;
+ m_bIsNull = false;
ReadCommon(pStrm);
m_SilverBullet.ReadIndexed(pStrm);
}
@@ -230,13 +223,13 @@ void LwpBulletOverride::OverrideSkip(bool bOver)
void LwpBulletOverride::OverrideRightAligned(bool bOver)
{
- if(bOver)
+ if (bOver)
{
- LwpOverride::Override(BO_RIGHTALIGN,STATE_ON);
+ LwpOverride::Override(BO_RIGHTALIGN, STATE_ON);
}
else
{
- LwpOverride::Override(BO_RIGHTALIGN,STATE_OFF);
+ LwpOverride::Override(BO_RIGHTALIGN, STATE_OFF);
}
}
@@ -247,7 +240,7 @@ void LwpBulletOverride::OverrideSilverBullet(LwpObjectID aID)
m_SilverBullet = aID;
}
- LwpOverride::Override(BO_SILVERBULLET,STATE_ON);
+ LwpOverride::Override(BO_SILVERBULLET, STATE_ON);
}
void LwpBulletOverride::Override(LwpBulletOverride* pOther)
@@ -287,7 +280,6 @@ void LwpBulletOverride::Override(LwpBulletOverride* pOther)
pOther->RevertRightAligned();
}
}
-
}
/*class LwpAlignmentOverride*/
@@ -304,7 +296,7 @@ LwpAlignmentOverride* LwpAlignmentOverride::clone() const
return new LwpAlignmentOverride(*this);
}
-void LwpAlignmentOverride::Read(LwpObjectStream * pStrm)
+void LwpAlignmentOverride::Read(LwpObjectStream* pStrm)
{
if (pStrm->QuickReadBool())
{
@@ -351,31 +343,26 @@ void LwpSpacingCommonOverride::Read(LwpObjectStream* pStrm)
}
/*class LwpSpacingOverride*/
-LwpSpacingOverride::LwpSpacingOverride() :
-m_pSpacing(new LwpSpacingCommonOverride),
-m_pAboveLineSpacing(new LwpSpacingCommonOverride),
-m_pParaSpacingAbove(new LwpSpacingCommonOverride),
-m_pParaSpacingBelow(new LwpSpacingCommonOverride)
+LwpSpacingOverride::LwpSpacingOverride()
+ : m_pSpacing(new LwpSpacingCommonOverride)
+ , m_pAboveLineSpacing(new LwpSpacingCommonOverride)
+ , m_pParaSpacingAbove(new LwpSpacingCommonOverride)
+ , m_pParaSpacingBelow(new LwpSpacingCommonOverride)
{
}
-LwpSpacingOverride::~LwpSpacingOverride()
-{
-}
+LwpSpacingOverride::~LwpSpacingOverride() {}
LwpSpacingOverride::LwpSpacingOverride(LwpSpacingOverride const& rOther)
: LwpOverride(rOther)
{
- m_pSpacing.reset( ::clone(rOther.m_pSpacing.get()) );
- m_pAboveLineSpacing.reset( ::clone(rOther.m_pAboveLineSpacing.get()) );
- m_pParaSpacingAbove.reset( ::clone(rOther.m_pParaSpacingAbove.get()) );
- m_pParaSpacingBelow.reset( ::clone(rOther.m_pParaSpacingBelow.get()) );
+ m_pSpacing.reset(::clone(rOther.m_pSpacing.get()));
+ m_pAboveLineSpacing.reset(::clone(rOther.m_pAboveLineSpacing.get()));
+ m_pParaSpacingAbove.reset(::clone(rOther.m_pParaSpacingAbove.get()));
+ m_pParaSpacingBelow.reset(::clone(rOther.m_pParaSpacingBelow.get()));
}
-LwpSpacingOverride* LwpSpacingOverride::clone() const
-{
- return new LwpSpacingOverride(*this);
-}
+LwpSpacingOverride* LwpSpacingOverride::clone() const { return new LwpSpacingOverride(*this); }
void LwpSpacingOverride::Read(LwpObjectStream* pStrm)
{
@@ -404,10 +391,7 @@ LwpIndentOverride::LwpIndentOverride(LwpIndentOverride const& rOther)
{
}
-LwpIndentOverride* LwpIndentOverride::clone() const
-{
- return new LwpIndentOverride(*this);
-}
+LwpIndentOverride* LwpIndentOverride::clone() const { return new LwpIndentOverride(*this); }
void LwpIndentOverride::Read(LwpObjectStream* pStrm)
{
@@ -425,14 +409,13 @@ void LwpIndentOverride::Read(LwpObjectStream* pStrm)
}
/*class LwpAmikakeOverride*/
-LwpAmikakeOverride::LwpAmikakeOverride() :
-m_pBackgroundStuff(new LwpBackgroundStuff), m_nType(AMIKAKE_NONE)
+LwpAmikakeOverride::LwpAmikakeOverride()
+ : m_pBackgroundStuff(new LwpBackgroundStuff)
+ , m_nType(AMIKAKE_NONE)
{
}
-LwpAmikakeOverride::~LwpAmikakeOverride()
-{
-}
+LwpAmikakeOverride::~LwpAmikakeOverride() {}
LwpAmikakeOverride::LwpAmikakeOverride(LwpAmikakeOverride const& rOther)
: LwpOverride(rOther)
@@ -441,10 +424,7 @@ LwpAmikakeOverride::LwpAmikakeOverride(LwpAmikakeOverride const& rOther)
{
}
-LwpAmikakeOverride* LwpAmikakeOverride::clone() const
-{
- return new LwpAmikakeOverride(*this);
-}
+LwpAmikakeOverride* LwpAmikakeOverride::clone() const { return new LwpAmikakeOverride(*this); }
void LwpAmikakeOverride::Read(LwpObjectStream* pStrm)
{
@@ -485,15 +465,15 @@ void LwpAlignmentOverride::OverrideAlignment(AlignType val)
void LwpIndentOverride::Override(LwpIndentOverride* other)
{
- if(m_nOverride & IO_ALL)
+ if (m_nOverride & IO_ALL)
other->OverrideIndentAll(m_nAll);
- if(m_nOverride & IO_FIRST)
+ if (m_nOverride & IO_FIRST)
other->OverrideIndentFirst(m_nFirst);
- if(m_nOverride & IO_RIGHT)
+ if (m_nOverride & IO_RIGHT)
other->OverrideIndentRight(m_nRight);
- if(m_nOverride & IO_REST)
+ if (m_nOverride & IO_REST)
other->OverrideIndentRest(m_nRest);
- if(m_nOverride & IO_USE_RELATIVE)
+ if (m_nOverride & IO_USE_RELATIVE)
other->OverrideUseRelative(IsUseRelative());
if (m_nOverride & IO_REL_FLAGS)
other->OverrideRelative(GetRelative());
@@ -508,10 +488,7 @@ sal_uInt16 LwpIndentOverride::GetRelative() const
return RELATIVE_REST;
}
-bool LwpIndentOverride::IsUseRelative() const
-{
- return (m_nValues & IO_USE_RELATIVE) != 0;
-}
+bool LwpIndentOverride::IsUseRelative() const { return (m_nValues & IO_USE_RELATIVE) != 0; }
void LwpIndentOverride::OverrideIndentAll(sal_Int32 val)
{
@@ -534,8 +511,8 @@ void LwpIndentOverride::OverrideIndentRight(sal_Int32 val)
void LwpIndentOverride::OverrideIndentRest(sal_Int32 val)
{
m_nRest = val;
-// m_nAll = val;
-// m_nFirst = 0-val;
+ // m_nAll = val;
+ // m_nFirst = 0-val;
m_nOverride |= IO_REST;
}
diff --git a/lotuswordpro/source/filter/lwppagehint.hxx b/lotuswordpro/source/filter/lwppagehint.hxx
index b6119f8582e4..a22bddb76887 100644
--- a/lotuswordpro/source/filter/lwppagehint.hxx
+++ b/lotuswordpro/source/filter/lwppagehint.hxx
@@ -68,8 +68,9 @@
class LwpSLVListHead
{
public:
- LwpSLVListHead(){}
+ LwpSLVListHead() {}
void Read(LwpObjectStream* pObjStrm);
+
private:
LwpObjectID m_ListHead;
};
@@ -77,8 +78,9 @@ private:
class LwpContentHintHead
{
public:
- LwpContentHintHead(){}
+ LwpContentHintHead() {}
void Read(LwpObjectStream* pObjStrm);
+
private:
LwpSLVListHead m_ListHead;
};
@@ -86,8 +88,9 @@ private:
class LwpFootnoteSeenHead
{
public:
- LwpFootnoteSeenHead(){}
+ LwpFootnoteSeenHead() {}
void Read(LwpObjectStream* pObjStrm);
+
private:
LwpSLVListHead m_ListHead;
};
@@ -95,12 +98,13 @@ private:
class LwpPageHint : public LwpDLVList
{
public:
- LwpPageHint(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpPageHint(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
void Parse(IXFStream* pOutputStream) override;
- sal_uInt16 GetPageNumber() const {return m_nPageNumber;}
- LwpObjectID& GetPageLayoutID(){ return m_PageLayout;}
- sal_uInt16 GetLayoutPageNumber() const { return m_nLayoutPageNumber;}
+ sal_uInt16 GetPageNumber() const { return m_nPageNumber; }
+ LwpObjectID& GetPageLayoutID() { return m_PageLayout; }
+ sal_uInt16 GetLayoutPageNumber() const { return m_nLayoutPageNumber; }
+
private:
virtual ~LwpPageHint() override {}
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx
index 0b587c8d0ed6..cc8d6b274360 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -77,7 +77,7 @@
#include <sal/log.hxx>
#include <vcl/print.hxx>
-LwpPageLayout::LwpPageLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpPageLayout::LwpPageLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpLayout(objHdr, pStrm)
, m_nPrinterBin(0)
, m_nBdroffset(0)
@@ -85,9 +85,7 @@ LwpPageLayout::LwpPageLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
{
}
-LwpPageLayout::~LwpPageLayout()
-{
-}
+LwpPageLayout::~LwpPageLayout() {}
void LwpPageLayout::Read()
{
LwpLayout::Read();
@@ -108,17 +106,16 @@ void LwpPageLayout::Read()
m_PaperName.Read(m_pObjStrm.get());
m_pObjStrm->SkipExtra();
}
-
}
void LwpPageLayout::Parse(IXFStream* pOutputStream)
{
//Only parse this layout
rtl::Reference<LwpObject> pStory = m_Content.obj();
- if(pStory.is())
+ if (pStory.is())
{
pStory->SetFoundry(m_pFoundry);
- pStory->DoParse(pOutputStream); //Do not parse the next story
+ pStory->DoParse(pOutputStream); //Do not parse the next story
}
}
@@ -128,13 +125,12 @@ void LwpPageLayout::Parse(IXFStream* pOutputStream)
*/
void LwpPageLayout::ParseMargins(XFPageMaster* pm1)
{
- double fLeft = GetMarginsValue(MARGIN_LEFT);
- double fRight = GetMarginsValue(MARGIN_RIGHT);
+ double fLeft = GetMarginsValue(MARGIN_LEFT);
+ double fRight = GetMarginsValue(MARGIN_RIGHT);
double fTop = GetMarginsValue(MARGIN_TOP);
- double fBottom = GetMarginsValue(MARGIN_BOTTOM);
-
- pm1->SetMargins( fLeft, fRight, fTop, fBottom );
+ double fBottom = GetMarginsValue(MARGIN_BOTTOM);
+ pm1->SetMargins(fLeft, fRight, fTop, fBottom);
}
/**
@@ -151,18 +147,18 @@ void LwpPageLayout::ParseGeometry(XFPageMaster* pm1)
pm1->SetPageWidth( GetGeometryWidth() );
}
*/
- double fWidth =0;
+ double fWidth = 0;
double fHeight = 0;
GetWidthAndHeight(fWidth, fHeight);
- pm1->SetPageWidth( fWidth );
- pm1->SetPageHeight( fHeight );
+ pm1->SetPageWidth(fWidth);
+ pm1->SetPageHeight(fHeight);
}
/**
* @descr: set page watermark
*
*/
-void LwpPageLayout::ParseWaterMark(XFPageMaster *pm1)
+void LwpPageLayout::ParseWaterMark(XFPageMaster* pm1)
{
std::unique_ptr<XFBGImage> xXFBGImage(GetXFBGImage());
if (xXFBGImage)
@@ -175,10 +171,10 @@ void LwpPageLayout::ParseWaterMark(XFPageMaster *pm1)
* @descr: set page columns
*
*/
-void LwpPageLayout::ParseColumns(XFPageMaster * pm1)
+void LwpPageLayout::ParseColumns(XFPageMaster* pm1)
{
XFColumns* pColumns = GetXFColumns();
- if(pColumns)
+ if (pColumns)
{
pm1->SetColumns(pColumns);
}
@@ -188,10 +184,10 @@ void LwpPageLayout::ParseColumns(XFPageMaster * pm1)
* @descr: set page borders
*
*/
-void LwpPageLayout::ParseBorders(XFPageMaster *pm1)
+void LwpPageLayout::ParseBorders(XFPageMaster* pm1)
{
std::unique_ptr<XFBorders> pBordres = GetXFBorders();
- if(pBordres)
+ if (pBordres)
{
pm1->SetBorders(std::move(pBordres));
}
@@ -201,10 +197,10 @@ void LwpPageLayout::ParseBorders(XFPageMaster *pm1)
* @descr: set page shadow
*
*/
-void LwpPageLayout::ParseShadow(XFPageMaster *pm1)
+void LwpPageLayout::ParseShadow(XFPageMaster* pm1)
{
XFShadow* pXFShadow = GetXFShadow();
- if(pXFShadow)
+ if (pXFShadow)
{
pm1->SetShadow(pXFShadow);
}
@@ -245,7 +241,7 @@ void LwpPageLayout::ParseBackGround(XFPageMaster* pm1)
void LwpPageLayout::ParseBackColor(XFPageMaster* pm1)
{
LwpColor* pColor = GetBackColor();
- if(pColor)
+ if (pColor)
{
pm1->SetBackColor(XFColor(pColor->To24Color()));
}
@@ -255,7 +251,7 @@ void LwpPageLayout::ParseBackColor(XFPageMaster* pm1)
* @descr: set page footnote separator information
*
*/
-void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1)
+void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster* pm1)
{
//Get the footnoteoptions for the root document
LwpDocument* pDocument = m_pFoundry ? m_pFoundry->GetDocument() : nullptr;
@@ -264,25 +260,27 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1)
LwpObjectID* pFontnodeId = pDocument->GetValidFootnoteOpts();
- LwpFootnoteOptions* pFootnoteOpts = pFontnodeId ? dynamic_cast<LwpFootnoteOptions*>(pFontnodeId->obj().get()) : nullptr;
- if(!pFootnoteOpts)
+ LwpFootnoteOptions* pFootnoteOpts
+ = pFontnodeId ? dynamic_cast<LwpFootnoteOptions*>(pFontnodeId->obj().get()) : nullptr;
+ if (!pFootnoteOpts)
return;
LwpFootnoteSeparatorOptions& rFootnoteSep = pFootnoteOpts->GetFootnoteSeparator();
//set length
sal_uInt32 nLengthPercent = 100;
double fWidth = 0;
- if(rFootnoteSep.HasSeparator())
+ if (rFootnoteSep.HasSeparator())
{
fWidth = rFootnoteSep.GetTopBorderWidth();
}
- if(rFootnoteSep.HasCustomLength())
+ if (rFootnoteSep.HasCustomLength())
{
const double fMarginWidth = GetMarginWidth();
if (fMarginWidth == 0.0)
throw o3tl::divide_by_zero();
- nLengthPercent = static_cast<sal_uInt32>(100*LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetLength()) / fMarginWidth);
+ nLengthPercent = static_cast<sal_uInt32>(
+ 100 * LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetLength()) / fMarginWidth);
if (nLengthPercent > 100)
nLengthPercent = 100;
}
@@ -290,21 +288,22 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * pm1)
double fBelow = LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetBelow());
LwpColor aColor = rFootnoteSep.GetTopBorderColor();
enumXFAlignType eAlignType = enumXFAlignStart;
- if(rFootnoteSep.GetIndent() > 0)
+ if (rFootnoteSep.GetIndent() > 0)
{
const double fMarginWidth = GetMarginWidth();
if (fMarginWidth == 0.0)
throw o3tl::divide_by_zero();
//SODC don't support indent
- sal_uInt32 nIndentPercent = static_cast<sal_uInt32>(100*LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetIndent()) / fMarginWidth);
+ sal_uInt32 nIndentPercent = static_cast<sal_uInt32>(
+ 100 * LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetIndent()) / fMarginWidth);
if (nIndentPercent + nLengthPercent >= 100)
eAlignType = enumXFAlignEnd;
}
- if(aColor.IsValidColor())
+ if (aColor.IsValidColor())
{
XFColor aXFColor(aColor.To24Color());
- pm1->SetFootNoteSeparator(eAlignType,fWidth, nLengthPercent, fAbove, fBelow, aXFColor);
+ pm1->SetFootNoteSeparator(eAlignType, fWidth, nLengthPercent, fAbove, fBelow, aXFColor);
}
}
@@ -328,14 +327,15 @@ void LwpPageLayout::RegisterStyle()
xpm1->SetTextDir(GetTextDirection());
LwpUseWhen* pUseWhen = GetUseWhen();
- if(IsComplex() ||( pUseWhen && pUseWhen->IsUseOnAllOddPages()))
+ if (IsComplex() || (pUseWhen && pUseWhen->IsUseOnAllOddPages()))
{
xpm1->SetPageUsage(enumXFPageUsageMirror);
}
//Add the page master to stylemanager
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- XFPageMaster* pm1 = static_cast<XFPageMaster*>(pXFStyleManager->AddStyle(std::move(xpm1)).m_pStyle);
+ XFPageMaster* pm1
+ = static_cast<XFPageMaster*>(pXFStyleManager->AddStyle(std::move(xpm1)).m_pStyle);
m_pXFPageMaster = pm1;
OUString pmname = pm1->GetStyleName();
@@ -343,12 +343,13 @@ void LwpPageLayout::RegisterStyle()
std::unique_ptr<XFMasterPage> p1(new XFMasterPage);
p1->SetStyleName(GetName().str());
p1->SetPageMaster(pmname);
- XFMasterPage* p1_added = static_cast<XFMasterPage*>(pXFStyleManager->AddStyle(std::move(p1)).m_pStyle);
+ XFMasterPage* p1_added
+ = static_cast<XFMasterPage*>(pXFStyleManager->AddStyle(std::move(p1)).m_pStyle);
m_StyleName = p1_added->GetStyleName();
//Set footer style
LwpFooterLayout* pLayoutFooter = GetFooterLayout();
- if(pLayoutFooter)
+ if (pLayoutFooter)
{
pLayoutFooter->SetFoundry(m_pFoundry);
pLayoutFooter->RegisterStyle(pm1);
@@ -357,7 +358,7 @@ void LwpPageLayout::RegisterStyle()
//Set header style
LwpHeaderLayout* pLayoutHeader = GetHeaderLayout();
- if(pLayoutHeader)
+ if (pLayoutHeader)
{
pLayoutHeader->SetFoundry(m_pFoundry);
pLayoutHeader->RegisterStyle(pm1);
@@ -385,14 +386,15 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
pm1->SetTextDir(GetTextDirection());
LwpUseWhen* pUseWhen = GetUseWhen();
- if(IsComplex() ||( pUseWhen && pUseWhen->IsUseOnAllOddPages()))
+ if (IsComplex() || (pUseWhen && pUseWhen->IsUseOnAllOddPages()))
{
pm1->SetPageUsage(enumXFPageUsageMirror);
}
//Add the page master to stylemanager
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_pXFPageMaster = static_cast<XFPageMaster*>(pXFStyleManager->AddStyle(std::move(pm1)).m_pStyle);
+ m_pXFPageMaster
+ = static_cast<XFPageMaster*>(pXFStyleManager->AddStyle(std::move(pm1)).m_pStyle);
OUString pmname = m_pXFPageMaster->GetStyleName();
//Add master page
@@ -402,7 +404,7 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
//Set footer style
LwpFooterLayout* pLayoutFooter = GetFooterLayout();
- if(pLayoutFooter)
+ if (pLayoutFooter)
{
pLayoutFooter->SetFoundry(m_pFoundry);
pLayoutFooter->RegisterStyle(m_pXFPageMaster);
@@ -411,7 +413,7 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
//Set header style
LwpHeaderLayout* pLayoutHeader = GetHeaderLayout();
- if(pLayoutHeader)
+ if (pLayoutHeader)
{
pLayoutHeader->SetFoundry(m_pFoundry);
pLayoutHeader->RegisterStyle(m_pXFPageMaster);
@@ -424,33 +426,32 @@ OUString LwpPageLayout::RegisterEndnoteStyle()
* @descr: Whether current page layout has columns
*
*/
-bool LwpPageLayout::HasColumns()
-{
- return GetNumCols() > 1;
-}
+bool LwpPageLayout::HasColumns() { return GetNumCols() > 1; }
/**
* @descr: Whether has filler page text in current page layout
*
*/
-bool LwpPageLayout::HasFillerPageText(LwpFoundry const * pFoundry)
+bool LwpPageLayout::HasFillerPageText(LwpFoundry const* pFoundry)
{
- if(!pFoundry) return false;
+ if (!pFoundry)
+ return false;
bool bFillerPage = false;
LwpLayout::UseWhenType eWhenType = GetUseWhenType();
- if(eWhenType==LwpLayout::StartOnOddPage||eWhenType==LwpLayout::StartOnEvenPage)
+ if (eWhenType == LwpLayout::StartOnOddPage || eWhenType == LwpLayout::StartOnEvenPage)
{
//get the page number that current page layout inserted
- sal_Int32 nPageNumber = GetPageNumber(FIRST_LAYOUTPAGENO)-1;
+ sal_Int32 nPageNumber = GetPageNumber(FIRST_LAYOUTPAGENO) - 1;
- if(nPageNumber>0)
+ if (nPageNumber > 0)
{
- if((eWhenType==LwpLayout::StartOnOddPage)&&(LwpTools::IsOddNumber(nPageNumber)))
+ if ((eWhenType == LwpLayout::StartOnOddPage) && (LwpTools::IsOddNumber(nPageNumber)))
{
bFillerPage = true;
}
- else if((eWhenType==LwpLayout::StartOnEvenPage)&&(LwpTools::IsEvenNumber(nPageNumber)))
+ else if ((eWhenType == LwpLayout::StartOnEvenPage)
+ && (LwpTools::IsEvenNumber(nPageNumber)))
{
bFillerPage = true;
}
@@ -470,16 +471,17 @@ bool LwpPageLayout::HasFillerPageText(LwpFoundry const * pFoundry)
*/
void LwpPageLayout::ConvertFillerPageText(XFContentContainer* pCont)
{
- if(!HasFillerPageText(m_pFoundry))
+ if (!HasFillerPageText(m_pFoundry))
return;
//get fillerpage story from division info
LwpDocument* pDoc = m_pFoundry->GetDocument();
LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pDoc->GetDivInfoID().obj().get());
- LwpStory* pStory = pDivInfo ? dynamic_cast<LwpStory*>(pDivInfo->GetFillerPageTextID().obj().get()) : nullptr;
+ LwpStory* pStory
+ = pDivInfo ? dynamic_cast<LwpStory*>(pDivInfo->GetFillerPageTextID().obj().get()) : nullptr;
//parse fillerpage story
- if(pStory)
+ if (pStory)
{
pStory->XFConvert(pCont);
}
@@ -490,7 +492,7 @@ void LwpPageLayout::ConvertFillerPageText(XFContentContainer* pCont)
*/
void LwpPageLayout::ResetXFColumns()
{
- if(m_pXFPageMaster)
+ if (m_pXFPageMaster)
{
m_pXFPageMaster->SetColumns(nullptr);
}
@@ -498,12 +500,14 @@ void LwpPageLayout::ResetXFColumns()
LwpHeaderLayout* LwpPageLayout::GetHeaderLayout()
{
- rtl::Reference<LwpVirtualLayout> xLay(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLay(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
while (xLay.is())
{
if (xLay->GetLayoutType() == LWP_HEADER_LAYOUT)
return dynamic_cast<LwpHeaderLayout*>(xLay.get());
- rtl::Reference<LwpVirtualLayout> xNext(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xNext(
+ dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
if (xNext == xLay)
{
SAL_WARN("lwp", "loop in layout");
@@ -516,12 +520,14 @@ LwpHeaderLayout* LwpPageLayout::GetHeaderLayout()
LwpFooterLayout* LwpPageLayout::GetFooterLayout()
{
- rtl::Reference<LwpVirtualLayout> xLay(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLay(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
while (xLay.is())
{
if (xLay->GetLayoutType() == LWP_FOOTER_LAYOUT)
return dynamic_cast<LwpFooterLayout*>(xLay.get());
- rtl::Reference<LwpVirtualLayout> xNext(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xNext(
+ dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
if (xNext == xLay)
{
SAL_WARN("lwp", "loop in layout");
@@ -538,16 +544,17 @@ LwpFooterLayout* LwpPageLayout::GetFooterLayout()
*/
LwpPageLayout* LwpPageLayout::GetOddChildLayout()
{
- if(IsComplex())
+ if (IsComplex())
{
- rtl::Reference<LwpVirtualLayout> xLay(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xLay(
+ dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
while (xLay.is())
{
if (xLay->GetLayoutType() == LWP_PAGE_LAYOUT)
{
LwpPageLayout* pPageLayout = static_cast<LwpPageLayout*>(xLay.get());
LwpUseWhen* pUseWhen = pPageLayout->GetUseWhen();
- if(pUseWhen && pUseWhen->IsUseOnAllOddPages())
+ if (pUseWhen && pUseWhen->IsUseOnAllOddPages())
{
return pPageLayout;
}
@@ -586,43 +593,44 @@ sal_Int32 LwpPageLayout::GetPageNumber(sal_uInt16 nLayoutNumber)
if (!pFoundry)
return nPageNumber;
LwpDocument* pDoc = pFoundry->GetDocument();
- LwpDLVListHeadTailHolder* pHeadTail = dynamic_cast<LwpDLVListHeadTailHolder*>(pDoc->GetPageHintsID().obj().get());
- if(!pHeadTail) return nPageNumber;
+ LwpDLVListHeadTailHolder* pHeadTail
+ = dynamic_cast<LwpDLVListHeadTailHolder*>(pDoc->GetPageHintsID().obj().get());
+ if (!pHeadTail)
+ return nPageNumber;
//get first pagehint
LwpPageHint* pPageHint = dynamic_cast<LwpPageHint*>(pHeadTail->GetHead().obj().get());
- while(pPageHint)
+ while (pPageHint)
{
- if(GetObjectID() == pPageHint->GetPageLayoutID())
+ if (GetObjectID() == pPageHint->GetPageLayoutID())
{
sal_uInt16 nNumber = pPageHint->GetPageNumber();
- if(nLayoutNumber==FIRST_LAYOUTPAGENO && pPageHint->GetLayoutPageNumber()==1)
+ if (nLayoutNumber == FIRST_LAYOUTPAGENO && pPageHint->GetLayoutPageNumber() == 1)
{
//get the first page number
nPageNumber = nNumber;
break;
}
- else if( nLayoutNumber ==LAST_LAYOUTPAGENO && nNumber >nPageNumber )
+ else if (nLayoutNumber == LAST_LAYOUTPAGENO && nNumber > nPageNumber)
{
//get the last page number
nPageNumber = nNumber;
- if(pPageHint->GetNext().IsNull())
+ if (pPageHint->GetNext().IsNull())
{
//if is last page number of entire document, return directly
return nPageNumber + pDoc->GetNumberOfPagesBefore();
}
}
- else if(nLayoutNumber > 0 && pPageHint->GetLayoutPageNumber() == nLayoutNumber)
+ else if (nLayoutNumber > 0 && pPageHint->GetLayoutPageNumber() == nLayoutNumber)
{
//get specified page number
nPageNumber = nNumber;
break;
}
-
}
pPageHint = dynamic_cast<LwpPageHint*>(pPageHint->GetNext().obj().get());
}
- if(nPageNumber>=0)
+ if (nPageNumber >= 0)
{
return nPageNumber + 1 + pDoc->GetNumberOfPagesBefore();
}
@@ -637,23 +645,23 @@ void LwpPageLayout::GetWidthAndHeight(double& fWidth, double& fHeight)
{
//use customized size
LwpLayoutGeometry* pLayoutGeo = GetGeometry();
- if(pLayoutGeo)
+ if (pLayoutGeo)
{
fWidth = GetGeometryWidth();
fHeight = GetGeometryHeight();
}
- if(GetUsePrinterSettings())
+ if (GetUsePrinterSettings())
{
//replaced by printer paper size
- ScopedVclPtrInstance< Printer > pPrinter;
+ ScopedVclPtrInstance<Printer> pPrinter;
bool bScreen = pPrinter->IsDisplayPrinter();
- if (!bScreen)//Printer available
+ if (!bScreen) //Printer available
{
Size aPaperSize = pPrinter->GetPaperSize();
- aPaperSize = pPrinter->PixelToLogic( aPaperSize, MapMode( MapUnit::Map10thMM ) );
- fWidth = static_cast<double>(aPaperSize.Width())/100; //cm unit
- fHeight = static_cast<double>(aPaperSize.Height())/100;
+ aPaperSize = pPrinter->PixelToLogic(aPaperSize, MapMode(MapUnit::Map10thMM));
+ fWidth = static_cast<double>(aPaperSize.Width()) / 100; //cm unit
+ fHeight = static_cast<double>(aPaperSize.Height()) / 100;
}
}
@@ -673,7 +681,7 @@ void LwpPageLayout::GetWidthAndHeight(double& fWidth, double& fHeight)
*/
double LwpPageLayout::GetWidth()
{
- double fWidth =0, fHeight = 0;
+ double fWidth = 0, fHeight = 0;
GetWidthAndHeight(fWidth, fHeight);
return fWidth;
}
@@ -684,7 +692,7 @@ double LwpPageLayout::GetWidth()
*/
double LwpPageLayout::GetHeight()
{
- double fWidth =0, fHeight = 0;
+ double fWidth = 0, fHeight = 0;
GetWidthAndHeight(fWidth, fHeight);
return fHeight;
}
@@ -696,9 +704,9 @@ bool LwpPageLayout::operator<(LwpPageLayout& Other)
{
LwpPara* pThisPara = GetPagePosition();
LwpPara* pOtherPara = Other.GetPagePosition();
- if(pThisPara && pOtherPara)
+ if (pThisPara && pOtherPara)
{
- if(pThisPara == pOtherPara)
+ if (pThisPara == pOtherPara)
{
//If the two layouts in the same para, compare which layout is earlied according to frib order
return pThisPara->ComparePagePosition(this, &Other);
@@ -719,37 +727,35 @@ bool LwpPageLayout::operator<(LwpPageLayout& Other)
LwpPara* LwpPageLayout::GetPagePosition()
{
LwpPara* pPara = dynamic_cast<LwpPara*>(GetPosition().obj().get());
- if(pPara)
+ if (pPara)
return pPara;
//Get the position from its related section
LwpFoundry* pFoundry = GetFoundry();
- if(pFoundry)
+ if (pFoundry)
{
LwpSection* pSection = nullptr;
- while( (pSection = pFoundry->EnumSections(pSection)) )
+ while ((pSection = pFoundry->EnumSections(pSection)))
{
- if(pSection->GetPageLayout() == this)
+ if (pSection->GetPageLayout() == this)
return dynamic_cast<LwpPara*>(pSection->GetPosition().obj().get());
}
}
return nullptr;
}
-LwpHeaderLayout::LwpHeaderLayout( LwpObjectHeader const &objHdr, LwpSvStream* pStrm )
+LwpHeaderLayout::LwpHeaderLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpPlacableLayout(objHdr, pStrm)
, m_nBorderOffset(0)
{
}
-LwpHeaderLayout::~LwpHeaderLayout()
-{
-}
+LwpHeaderLayout::~LwpHeaderLayout() {}
void LwpHeaderLayout::Read()
{
LwpPlacableLayout::Read();
- if(LwpFileHeader::m_nFileRevision >= 0x000E)
+ if (LwpFileHeader::m_nFileRevision >= 0x000E)
m_nBorderOffset = m_pObjStrm->QuickReadInt32();
else
m_nBorderOffset = 0;
@@ -779,7 +785,7 @@ void LwpHeaderLayout::RegisterStyle(XFPageMaster* pm1)
void LwpHeaderLayout::ParseMargins(XFHeaderStyle* ph1)
{
//Set height: from top of header to top of body, including the spacing between header and body
- double height = GetGeometryHeight()- GetMarginsValue(MARGIN_TOP);
+ double height = GetGeometryHeight() - GetMarginsValue(MARGIN_TOP);
if (GetIsAutoGrowDown())
{
ph1->SetMinHeight(height);
@@ -790,20 +796,22 @@ void LwpHeaderLayout::ParseMargins(XFHeaderStyle* ph1)
}
//Set left,right,bottom margins
- LwpMiddleLayout* parent = dynamic_cast<LwpMiddleLayout*> (GetParent().obj().get());
+ LwpMiddleLayout* parent = dynamic_cast<LwpMiddleLayout*>(GetParent().obj().get());
//left margin in SODC: the space from the left edge of body to the left edge of header
- double left = GetMarginsValue(MARGIN_LEFT) - (parent ? parent->GetMarginsValue(MARGIN_LEFT) : 0);
- if(left<=0) //The left margin in SODC can not be minus value
+ double left
+ = GetMarginsValue(MARGIN_LEFT) - (parent ? parent->GetMarginsValue(MARGIN_LEFT) : 0);
+ if (left <= 0) //The left margin in SODC can not be minus value
{
left = -1;
}
//left margin in SODC: the space from the right edge of header to the right edge of body
- double right = GetMarginsValue(MARGIN_RIGHT) - (parent ? parent->GetMarginsValue(MARGIN_RIGHT) : 0);
- if(right<=0)//The right margin in SODC can not be minus value
+ double right
+ = GetMarginsValue(MARGIN_RIGHT) - (parent ? parent->GetMarginsValue(MARGIN_RIGHT) : 0);
+ if (right <= 0) //The right margin in SODC can not be minus value
{
right = -1;
}
- ph1->SetMargins( left, right, GetMarginsValue(MARGIN_BOTTOM));
+ ph1->SetMargins(left, right, GetMarginsValue(MARGIN_BOTTOM));
//Word Pro has no dynamic spacing, should be set to false
ph1->SetDynamicSpace(false);
@@ -812,7 +820,7 @@ void LwpHeaderLayout::ParseMargins(XFHeaderStyle* ph1)
void LwpHeaderLayout::ParseBorder(XFHeaderStyle* pHeaderStyle)
{
std::unique_ptr<XFBorders> pBordres = GetXFBorders();
- if(pBordres)
+ if (pBordres)
{
pHeaderStyle->SetBorders(std::move(pBordres));
}
@@ -821,7 +829,7 @@ void LwpHeaderLayout::ParseBorder(XFHeaderStyle* pHeaderStyle)
void LwpHeaderLayout::ParseShadow(XFHeaderStyle* pHeaderStyle)
{
XFShadow* pXFShadow = GetXFShadow();
- if(pXFShadow)
+ if (pXFShadow)
{
pHeaderStyle->SetShadow(pXFShadow);
}
@@ -858,13 +866,13 @@ void LwpHeaderLayout::ParseBackGround(XFHeaderStyle* pHeaderStyle)
void LwpHeaderLayout::ParseBackColor(XFHeaderStyle* pHeaderStyle)
{
LwpColor* pColor = GetBackColor();
- if(pColor)
+ if (pColor)
{
pHeaderStyle->SetBackColor(XFColor(pColor->To24Color()));
}
}
-void LwpHeaderLayout::ParseWaterMark(XFHeaderStyle * pHeaderStyle)
+void LwpHeaderLayout::ParseWaterMark(XFHeaderStyle* pHeaderStyle)
{
std::unique_ptr<XFBGImage> xXFBGImage(GetXFBGImage());
if (xXFBGImage)
@@ -878,7 +886,7 @@ void LwpHeaderLayout::RegisterStyle(XFMasterPage* mp1)
{
rtl::Reference<XFHeader> xHeader(new XFHeader);
rtl::Reference<LwpObject> pStory = m_Content.obj();
- if(pStory.is())
+ if (pStory.is())
{
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
@@ -899,21 +907,19 @@ void LwpHeaderLayout::RegisterStyle(XFMasterPage* mp1)
mp1->SetHeader(xHeader);
}
-LwpFooterLayout::LwpFooterLayout( LwpObjectHeader const &objHdr, LwpSvStream* pStrm )
- : LwpPlacableLayout( objHdr, pStrm )
+LwpFooterLayout::LwpFooterLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpPlacableLayout(objHdr, pStrm)
, m_nBorderOffset(0)
{
}
-LwpFooterLayout::~LwpFooterLayout()
-{
-}
+LwpFooterLayout::~LwpFooterLayout() {}
void LwpFooterLayout::Read()
{
LwpPlacableLayout::Read();
- if(LwpFileHeader::m_nFileRevision >= 0x000E)
+ if (LwpFileHeader::m_nFileRevision >= 0x000E)
m_nBorderOffset = m_pObjStrm->QuickReadInt32();
else
m_nBorderOffset = 0;
@@ -941,10 +947,9 @@ void LwpFooterLayout::RegisterStyle(XFPageMaster* pm1)
void LwpFooterLayout::ParseMargins(XFFooterStyle* pFooterStyle)
{
-
//Set height: from top of header to top of body, including the spacing between header and body
double height = GetGeometryHeight() - GetMarginsValue(MARGIN_BOTTOM);
- if( IsAutoGrowUp() )
+ if (IsAutoGrowUp())
{
pFooterStyle->SetMinHeight(height);
}
@@ -954,18 +959,20 @@ void LwpFooterLayout::ParseMargins(XFFooterStyle* pFooterStyle)
}
//Set left,right,top margins
- LwpMiddleLayout* parent = dynamic_cast<LwpMiddleLayout*> (GetParent().obj().get());
- double left = GetMarginsValue(MARGIN_LEFT) - (parent ? parent->GetMarginsValue(MARGIN_LEFT) : 0);
- if(left<=0) //The left margin in SODC can not be minus value
+ LwpMiddleLayout* parent = dynamic_cast<LwpMiddleLayout*>(GetParent().obj().get());
+ double left
+ = GetMarginsValue(MARGIN_LEFT) - (parent ? parent->GetMarginsValue(MARGIN_LEFT) : 0);
+ if (left <= 0) //The left margin in SODC can not be minus value
{
left = -1;
}
- double right = GetMarginsValue(MARGIN_RIGHT) - (parent ? parent->GetMarginsValue(MARGIN_RIGHT) : 0);
- if(right<=0)//The left margin in SODC can not be minus value
+ double right
+ = GetMarginsValue(MARGIN_RIGHT) - (parent ? parent->GetMarginsValue(MARGIN_RIGHT) : 0);
+ if (right <= 0) //The left margin in SODC can not be minus value
{
right = -1;
}
- pFooterStyle->SetMargins( left, right, GetMarginsValue(MARGIN_TOP));
+ pFooterStyle->SetMargins(left, right, GetMarginsValue(MARGIN_TOP));
//Word Pro has no dynamic spacing, should be set to false
pFooterStyle->SetDynamicSpace(false);
@@ -974,7 +981,7 @@ void LwpFooterLayout::ParseMargins(XFFooterStyle* pFooterStyle)
void LwpFooterLayout::ParseBorder(XFFooterStyle* pFooterStyle)
{
std::unique_ptr<XFBorders> pBordres = GetXFBorders();
- if(pBordres)
+ if (pBordres)
{
pFooterStyle->SetBorders(std::move(pBordres));
}
@@ -983,7 +990,7 @@ void LwpFooterLayout::ParseBorder(XFFooterStyle* pFooterStyle)
void LwpFooterLayout::ParseShadow(XFFooterStyle* pFooterStyle)
{
XFShadow* pXFShadow = GetXFShadow();
- if(pXFShadow)
+ if (pXFShadow)
{
pFooterStyle->SetShadow(pXFShadow);
}
@@ -1019,7 +1026,7 @@ void LwpFooterLayout::ParseBackGround(XFFooterStyle* pFooterStyle)
void LwpFooterLayout::ParseBackColor(XFFooterStyle* pFooterStyle)
{
LwpColor* pColor = GetBackColor();
- if(pColor)
+ if (pColor)
{
pFooterStyle->SetBackColor(XFColor(pColor->To24Color()));
}
@@ -1030,7 +1037,7 @@ void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1)
rtl::Reference<XFFooter> xFooter(new XFFooter);
rtl::Reference<LwpObject> pStory = m_Content.obj(VO_STORY);
//Call the RegisterStyle first to register the styles in footer paras, and then XFConvert()
- if(pStory.is())
+ if (pStory.is())
{
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
@@ -1050,7 +1057,7 @@ void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1)
mp1->SetFooter(xFooter);
}
-void LwpFooterLayout::ParseWaterMark(XFFooterStyle * pFooterStyle)
+void LwpFooterLayout::ParseWaterMark(XFFooterStyle* pFooterStyle)
{
std::unique_ptr<XFBGImage> xXFBGImage(GetXFBGImage());
if (xXFBGImage)
diff --git a/lotuswordpro/source/filter/lwppagelayout.hxx b/lotuswordpro/source/filter/lwppagelayout.hxx
index 68402d3e05fc..0c8142f611c0 100644
--- a/lotuswordpro/source/filter/lwppagelayout.hxx
+++ b/lotuswordpro/source/filter/lwppagelayout.hxx
@@ -60,19 +60,18 @@
#include "lwplayout.hxx"
#include <xfilter/xfmasterpage.hxx>
-
class LwpHeaderLayout;
class LwpFooterLayout;
class LwpPageLayout final : public LwpLayout
{
public:
- LwpPageLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpPageLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpPageLayout() override;
virtual void RegisterStyle() override;
OUString RegisterEndnoteStyle();
virtual void Parse(IXFStream* pOutputStream) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_PAGE_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_PAGE_LAYOUT; }
private:
void Read() override;
@@ -92,59 +91,63 @@ private:
void GetWidthAndHeight(double& fWidth, double& fHeight);
double GetWidth() override;
double GetHeight() override;
- LwpAtomHolder m_PrinterBinName;
- sal_uInt16 m_nPrinterBin;
- sal_Int32 m_nBdroffset;
- LwpAtomHolder m_PaperName;
- XFPageMaster* m_pXFPageMaster;
+ LwpAtomHolder m_PrinterBinName;
+ sal_uInt16 m_nPrinterBin;
+ sal_Int32 m_nBdroffset;
+ LwpAtomHolder m_PaperName;
+ XFPageMaster* m_pXFPageMaster;
+
public:
bool HasColumns();
- bool HasFillerPageText(LwpFoundry const * pFoundry);
+ bool HasFillerPageText(LwpFoundry const* pFoundry);
void ConvertFillerPageText(XFContentContainer* pCont);
void ResetXFColumns();
LwpPageLayout* GetOddChildLayout();
virtual sal_Int32 GetPageNumber(sal_uInt16 nLayoutNumber) override;
- bool operator <(LwpPageLayout& Other);
+ bool operator<(LwpPageLayout& Other);
LwpPara* GetPagePosition();
};
-class LwpHeaderLayout: public LwpPlacableLayout
+class LwpHeaderLayout : public LwpPlacableLayout
{
public:
- LwpHeaderLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpHeaderLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpHeaderLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_HEADER_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_HEADER_LAYOUT; }
using LwpPlacableLayout::RegisterStyle;
- void RegisterStyle( XFPageMaster* pm1 );
- void RegisterStyle( XFMasterPage* mp1 );
+ void RegisterStyle(XFPageMaster* pm1);
+ void RegisterStyle(XFMasterPage* mp1);
+
protected:
void Read() override;
- void ParseMargins( XFHeaderStyle* ph1 );
- void ParseBorder( XFHeaderStyle* ph1 );
- void ParseShadow( XFHeaderStyle* ph1 );
+ void ParseMargins(XFHeaderStyle* ph1);
+ void ParseBorder(XFHeaderStyle* ph1);
+ void ParseShadow(XFHeaderStyle* ph1);
void ParsePatternFill(XFHeaderStyle* ph1);
void ParseBackGround(XFHeaderStyle* ph1);
void ParseBackColor(XFHeaderStyle* ph1);
void ParseWaterMark(XFHeaderStyle* ph1);
+
private:
sal_Int32 m_nBorderOffset;
};
-class LwpFooterLayout: public LwpPlacableLayout
+class LwpFooterLayout : public LwpPlacableLayout
{
public:
- LwpFooterLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpFooterLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpFooterLayout() override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_FOOTER_LAYOUT;}
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_FOOTER_LAYOUT; }
using LwpPlacableLayout::RegisterStyle;
void RegisterStyle(XFPageMaster* pm1);
void RegisterStyle(XFMasterPage* mp1);
+
protected:
void Read() override;
- void ParseMargins( XFFooterStyle* pFooterStyle );
- void ParseBorder( XFFooterStyle* pFooterStyle );
- void ParseShadow( XFFooterStyle* pFooterStyle );
+ void ParseMargins(XFFooterStyle* pFooterStyle);
+ void ParseBorder(XFFooterStyle* pFooterStyle);
+ void ParseShadow(XFFooterStyle* pFooterStyle);
void ParsePatternFill(XFFooterStyle* pFooterStyle);
void ParseBackGround(XFFooterStyle* pFooterStyle);
diff --git a/lotuswordpro/source/filter/lwpparaborderoverride.cxx b/lotuswordpro/source/filter/lwpparaborderoverride.cxx
index c0919cd7a265..dc0a11c8f0e6 100644
--- a/lotuswordpro/source/filter/lwpparaborderoverride.cxx
+++ b/lotuswordpro/source/filter/lwpparaborderoverride.cxx
@@ -68,10 +68,10 @@
LwpParaBorderOverride::LwpParaBorderOverride()
{
- m_pBorderStuff.reset( new LwpBorderStuff() );
- m_pBetweenStuff.reset( new LwpBorderStuff() );
- m_pShadow.reset( new LwpShadow() );
- m_pMargins.reset( new LwpMargins() );
+ m_pBorderStuff.reset(new LwpBorderStuff());
+ m_pBetweenStuff.reset(new LwpBorderStuff());
+ m_pShadow.reset(new LwpShadow());
+ m_pMargins.reset(new LwpMargins());
m_eAboveType = PB_NONE;
m_eBelowType = PB_NONE;
@@ -98,37 +98,34 @@ LwpParaBorderOverride::LwpParaBorderOverride(LwpParaBorderOverride const& rOther
, m_nRightWidth(rOther.m_nRightWidth)
, m_nBetweenMargin(rOther.m_nBetweenMargin)
{
- m_pBorderStuff.reset( ::clone(rOther.m_pBorderStuff.get()) );
- m_pBetweenStuff.reset( ::clone(rOther.m_pBetweenStuff.get()) );
- m_pShadow.reset( ::clone(rOther.m_pShadow.get()) );
- m_pMargins.reset( ::clone(rOther.m_pMargins.get()) );
+ m_pBorderStuff.reset(::clone(rOther.m_pBorderStuff.get()));
+ m_pBetweenStuff.reset(::clone(rOther.m_pBetweenStuff.get()));
+ m_pShadow.reset(::clone(rOther.m_pShadow.get()));
+ m_pMargins.reset(::clone(rOther.m_pMargins.get()));
}
-LwpParaBorderOverride::~LwpParaBorderOverride()
-{
-}
+LwpParaBorderOverride::~LwpParaBorderOverride() {}
LwpParaBorderOverride* LwpParaBorderOverride::clone() const
{
return new LwpParaBorderOverride(*this);
}
-namespace {
-
-LwpParaBorderOverride::BorderWidthType readBorderWidthType(
- LwpObjectStream * stream)
+namespace
+{
+LwpParaBorderOverride::BorderWidthType readBorderWidthType(LwpObjectStream* stream)
{
sal_uInt16 n = stream->QuickReaduInt16();
- if (n > LwpParaBorderOverride::PB_CUSTOMWIDTH) {
+ if (n > LwpParaBorderOverride::PB_CUSTOMWIDTH)
+ {
SAL_WARN("lwp", "bad BorderWidthType " << n);
n = LwpParaBorderOverride::PB_NONE;
}
return static_cast<LwpParaBorderOverride::BorderWidthType>(n);
}
-
}
-void LwpParaBorderOverride::Read(LwpObjectStream *pStrm)
+void LwpParaBorderOverride::Read(LwpObjectStream* pStrm)
{
if (pStrm->QuickReadBool())
{
@@ -142,7 +139,7 @@ void LwpParaBorderOverride::Read(LwpObjectStream *pStrm)
m_eBelowType = readBorderWidthType(pStrm);
m_eRightType = readBorderWidthType(pStrm);
- if( pStrm->CheckExtra() )
+ if (pStrm->CheckExtra())
{
m_pBetweenStuff->Read(pStrm);
@@ -150,7 +147,7 @@ void LwpParaBorderOverride::Read(LwpObjectStream *pStrm)
m_nBetweenWidth = pStrm->QuickReaduInt32();
m_nBetweenMargin = pStrm->QuickReaduInt32();
- if( pStrm->CheckExtra() )
+ if (pStrm->CheckExtra())
{
m_eRightType = readBorderWidthType(pStrm);
m_nRightWidth = pStrm->QuickReaduInt32();
@@ -320,22 +317,22 @@ void LwpParaBorderOverride::Override(LwpParaBorderOverride* pOther)
}
}
-void LwpParaBorderOverride::OverrideBorderStuff(LwpBorderStuff const * pBorderStuff)
+void LwpParaBorderOverride::OverrideBorderStuff(LwpBorderStuff const* pBorderStuff)
{
*m_pBorderStuff = *pBorderStuff;
LwpOverride::Override(PBO_STUFF, STATE_ON);
}
-void LwpParaBorderOverride::OverrideBetweenStuff(LwpBorderStuff const * pBorderStuff)
+void LwpParaBorderOverride::OverrideBetweenStuff(LwpBorderStuff const* pBorderStuff)
{
*m_pBetweenStuff = *pBorderStuff;
LwpOverride::Override(PBO_BETWEENSTUFF, STATE_ON);
}
-void LwpParaBorderOverride::OverrideShadow(LwpShadow const * pShadow)
+void LwpParaBorderOverride::OverrideShadow(LwpShadow const* pShadow)
{
*m_pShadow = *pShadow;
LwpOverride::Override(PBO_SHADOW, STATE_ON);
}
-void LwpParaBorderOverride::OverrideMargins(LwpMargins const * pMargins)
+void LwpParaBorderOverride::OverrideMargins(LwpMargins const* pMargins)
{
*m_pMargins = *pMargins;
LwpOverride::Override(PBO_MARGINS, STATE_ON);
diff --git a/lotuswordpro/source/filter/lwpparastyle.hxx b/lotuswordpro/source/filter/lwpparastyle.hxx
index 28f3eea032c5..c41382c6c0d0 100644
--- a/lotuswordpro/source/filter/lwpparastyle.hxx
+++ b/lotuswordpro/source/filter/lwpparastyle.hxx
@@ -73,17 +73,18 @@ class XFBorders;
class LwpParaStyle : public LwpTextStyle
{
public:
- LwpParaStyle(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpParaStyle(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpParaStyle() override;
- void Read() override;
+ void Read() override;
- void Apply(XFParaStyle *pStrm);
+ void Apply(XFParaStyle* pStrm);
static void ApplyParaBorder(XFParaStyle* pParaStyle, LwpParaBorderOverride* pBorder);
static void ApplyBreaks(XFParaStyle* pParaStyle, const LwpBreaksOverride* pBreaks);
static void ApplyAlignment(XFParaStyle* pParaStyle, const LwpAlignmentOverride* pAlign);
- static void ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, const LwpIndentOverride* pIndent);
+ static void ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle,
+ const LwpIndentOverride* pIndent);
static void ApplySpacing(LwpPara* pPara, XFParaStyle* pParaStyle, LwpSpacingOverride* pSpacing);
static void ApplyTab(XFParaStyle* pParaStyle, LwpTabOverride* pTab);
@@ -98,8 +99,10 @@ public:
LwpTabOverride* GetTabOverride() const;
const LwpBulletOverride& GetBulletOverride() const { return m_BulletOverride; }
LwpNumberingOverride* GetNumberingOverride() const;
+
public:
- static void ApplySubBorder(LwpBorderStuff* pBorderStuff, LwpBorderStuff::BorderType eType, XFBorders* pXFBorders);
+ static void ApplySubBorder(LwpBorderStuff* pBorderStuff, LwpBorderStuff::BorderType eType,
+ XFBorders* pXFBorders);
private:
//style IDs
@@ -112,8 +115,8 @@ private:
LwpObjectID m_TabStyle;
LwpObjectID m_BackgroundStyle;
- LwpKinsokuOptsOverride m_KinsokuOptsOverride;
- LwpBulletOverride m_BulletOverride;
+ LwpKinsokuOptsOverride m_KinsokuOptsOverride;
+ LwpBulletOverride m_BulletOverride;
};
#endif
diff --git a/lotuswordpro/source/filter/lwpproplist.hxx b/lotuswordpro/source/filter/lwpproplist.hxx
index f9f9e4ee14f3..f0ae21451df9 100644
--- a/lotuswordpro/source/filter/lwpproplist.hxx
+++ b/lotuswordpro/source/filter/lwpproplist.hxx
@@ -67,12 +67,13 @@
class LwpPropListElement : public LwpDLVList
{
public:
- LwpPropListElement(LwpObjectHeader const &objHdr, LwpSvStream *pStrm);
+ LwpPropListElement(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
bool IsNamed(const OUString& name);
LwpPropListElement* GetNext();
- const LwpAtomHolder& GetValue() const {return m_Value;}
- const LwpAtomHolder& GetName() const {return m_Name;}
+ const LwpAtomHolder& GetValue() const { return m_Value; }
+ const LwpAtomHolder& GetName() const { return m_Name; }
+
private:
virtual ~LwpPropListElement() override {}
@@ -83,11 +84,12 @@ private:
class LwpPropList : public LwpDLVListHead
{
public:
- LwpPropList(){}
+ LwpPropList() {}
using LwpDLVListHead::Read;
LwpPropListElement* GetFirst();
OUString GetNamedProperty(const OUString& name);
- OUString EnumNamedProperty(OUString& name,OUString& value);
+ OUString EnumNamedProperty(OUString& name, OUString& value);
+
private:
LwpPropListElement* FindPropByName(const OUString& name);
};
diff --git a/lotuswordpro/source/filter/lwpprtinfo.cxx b/lotuswordpro/source/filter/lwpprtinfo.cxx
index 57426569035b..c935d9351dfb 100644
--- a/lotuswordpro/source/filter/lwpprtinfo.cxx
+++ b/lotuswordpro/source/filter/lwpprtinfo.cxx
@@ -56,23 +56,20 @@
#include "lwpprtinfo.hxx"
#include <lwpatomholder.hxx>
-LwpPrinterInfo::LwpPrinterInfo(LwpObjectStream* pStrm)
-{
- Skip(pStrm);
-}
+LwpPrinterInfo::LwpPrinterInfo(LwpObjectStream* pStrm) { Skip(pStrm); }
/**
* @descr skip printer info in VO_DOCUMENT
*/
-void LwpPrinterInfo::Skip(LwpObjectStream *pStrm)
+void LwpPrinterInfo::Skip(LwpObjectStream* pStrm)
{
- /*sal_uInt16 platform =*/ pStrm->QuickReaduInt16();
+ /*sal_uInt16 platform =*/pStrm->QuickReaduInt16();
//Skip the size and the buffer
sal_uInt32 size = pStrm->QuickReaduInt32();
pStrm->SeekRel(static_cast<sal_uInt16>(size));
//Skip other printer info
- pStrm->SeekRel(6*sizeof(sal_uInt16)+sizeof(sal_uInt32)+sizeof(sal_uInt16));
+ pStrm->SeekRel(6 * sizeof(sal_uInt16) + sizeof(sal_uInt32) + sizeof(sal_uInt16));
//Skip the next five LwpAtomHolder
{
@@ -87,7 +84,7 @@ void LwpPrinterInfo::Skip(LwpObjectStream *pStrm)
sal_uInt16 count = pStrm->QuickReaduInt16();
//Skip each selected division
LwpAtomHolder toSkip;
- while(count--)
+ while (count--)
{
toSkip.Skip(pStrm);
pStrm->SkipExtra();
diff --git a/lotuswordpro/source/filter/lwppttntbl.hxx b/lotuswordpro/source/filter/lwppttntbl.hxx
index f74c8f6eda9d..8c59cd3e5768 100644
--- a/lotuswordpro/source/filter/lwppttntbl.hxx
+++ b/lotuswordpro/source/filter/lwppttntbl.hxx
@@ -64,80 +64,81 @@
#include <sal/types.h>
-const sal_uInt8 s_pLwpPatternTab[][8] = { //Id Name
- { 0xDF, 0xAF, 0x77, 0x77, 0x77, 0x77, 0xFA, 0xFD },//0 Transparent
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },//1 SolidForeground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0x7F, 0xFF, 0xF7, 0xFF, 0x7F, 0xFF, 0xF7, 0xFF },//3 BACK_10PCTDOTS(31 GrayScale4thLightest)
- { 0x77, 0xFF, 0xDD, 0xFF, 0x77, 0xFF, 0xDD, 0xFF },//4 BACK_30PCTDOTS(30 GrayScale5thLightest)
- { 0x6F, 0xFF, 0xB5, 0xFF, 0xB5, 0xFF, 0xDA, 0xFF },//5 BACK_50PCTDOTS
- { 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD },//6
- { 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22 },//7
- { 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88 },//8
- { 0x22, 0x00, 0x88, 0x00, 0x22, 0x00, 0x88, 0x00 },//9
- { 0x80, 0x00, 0x08, 0x00, 0x80, 0x00, 0x08, 0x00 },//10
- { 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 },//11
- { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },//12
- { 0xB1, 0x30, 0x03, 0x1B, 0xD8, 0xC0, 0x0C, 0x8D },//13
- { 0x80, 0x10, 0x02, 0x20, 0x01, 0x08, 0x40, 0x04 },//14
- { 0x33, 0x99, 0xCC, 0x66, 0x33, 0x99, 0xCC, 0x66 },//15
- { 0x77, 0xBB, 0xDD, 0xEE, 0x77, 0xBB, 0xDD, 0xEE },//16
- { 0x6F, 0xB7, 0xDB, 0xED, 0xF6, 0x7B, 0xBD, 0xDE },//17
- { 0x5F, 0xAF, 0xD7, 0xEB, 0xF5, 0xFA, 0x7D, 0xBE },//18
- { 0xEA, 0x75, 0xBA, 0x5D, 0xAE, 0x57, 0xAB, 0xD5 },//19
- { 0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE },//20
- { 0xCC, 0x99, 0x33, 0x66, 0xCC, 0x99, 0x33, 0x66 },//21
- { 0xEE, 0xDD, 0xBB, 0x77, 0xEE, 0xDD, 0xBB, 0x77 },//22
- { 0xDE, 0xBD, 0x7B, 0xF6, 0xED, 0xDB, 0xB7, 0x6F },//23
- { 0xFA, 0xF5, 0xEB, 0xD7, 0xAF, 0x5F, 0xBE, 0x7D },//24
- { 0x57, 0xAE, 0x5D, 0xBA, 0x75, 0xEA, 0xD5, 0xAB },//25
- { 0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F },//26
- { 0x44, 0xAA, 0x11, 0xAA, 0x44, 0xAA, 0x11, 0xAA },//27
- { 0xBB, 0x55, 0xEE, 0x55, 0xBB, 0x55, 0xEE, 0x55 },//28
- { 0x7E, 0xBD, 0xDB, 0xE7, 0xE7, 0xDB, 0xBD, 0x7E },//29
- { 0xF9, 0xF6, 0x6F, 0x9F, 0x9F, 0x6F, 0xF6, 0xF9 },//30
- { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF },//31
- { 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00 },//32
- { 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF },//33
- { 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//34
- { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 },//35
- { 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 },//36
- { 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB },//37
- { 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE },//38
- { 0xFF, 0x55, 0xFF, 0x55, 0xFF, 0x55, 0xFF, 0x55 },//39
- { 0xBB, 0xBB, 0x00, 0xBB, 0xBB, 0xBB, 0x00, 0xBB },//40
- { 0x00, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD },//41
- { 0x22, 0x00, 0x20, 0x00, 0xAA, 0x00, 0x20, 0x00 },//42
- { 0x40, 0xA0, 0x00, 0x00, 0x04, 0x0A, 0x00, 0x00 },//43
- { 0x01, 0x80, 0x00, 0x08, 0x10, 0x20, 0x00, 0x02 },//44
- { 0xED, 0xED, 0x0C, 0xC0, 0xDE, 0xDE, 0xC0, 0x0C },//45
- { 0xC1, 0xE2, 0x77, 0x2E, 0x1C, 0x3A, 0x77, 0xA3 },//46
- { 0x00, 0xF7, 0xF7, 0xF7, 0x00, 0x7F, 0x7F, 0x7F },//47
- { 0x7C, 0xBB, 0xC7, 0xEF, 0xDF, 0xBF, 0x7F, 0xFE },//48
- { 0xFF, 0x33, 0xFF, 0xCC, 0xFF, 0x33, 0xFF, 0xCC },//49
- { 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33, 0xCC, 0xCC },//50
- { 0xF0, 0xF0, 0x0F, 0x0F, 0xF0, 0xF0, 0x0F, 0x0F },//51
- { 0xC3, 0xC3, 0xC3, 0xC3, 0x3C, 0x3C, 0x3C, 0x3C },//52
- { 0x33, 0x33, 0xCC, 0xCC, 0x33, 0x33, 0xCC, 0xCC },//53
- { 0x08, 0x08, 0x14, 0x22, 0xC9, 0x22, 0x14, 0x08 },//54
- { 0x0A, 0x04, 0x04, 0x55, 0xA0, 0x40, 0x40, 0x55 },//55
- { 0x01, 0x01, 0x03, 0x84, 0x48, 0x30, 0x0C, 0x02 },//56
- { 0x28, 0xC7, 0x01, 0x01, 0x82, 0x7C, 0x10, 0x10 },//57
- { 0x40, 0x80, 0x01, 0x02, 0x04, 0x8A, 0x55, 0xFF },//58
- { 0xC7, 0xC7, 0xBB, 0x4C, 0x7C, 0x7C, 0xBB, 0xC4 },//59
- { 0x8A, 0x05, 0x02, 0x00, 0x02, 0x05, 0x8A, 0x55 },//60
- { 0x28, 0x44, 0x82, 0x11, 0x00, 0x55, 0x00, 0x11 },//61
- { 0x81, 0x41, 0x60, 0x70, 0x78, 0x70, 0x60, 0x41 },//62
- { 0xEE, 0x57, 0xAB, 0x55, 0xEE, 0x5D, 0xBA, 0x75 },//63
+const sal_uInt8 s_pLwpPatternTab[][8] = {
+ //Id Name
+ { 0xDF, 0xAF, 0x77, 0x77, 0x77, 0x77, 0xFA, 0xFD }, //0 Transparent
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, //1 SolidForeground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0x7F, 0xFF, 0xF7, 0xFF, 0x7F, 0xFF, 0xF7, 0xFF }, //3 BACK_10PCTDOTS(31 GrayScale4thLightest)
+ { 0x77, 0xFF, 0xDD, 0xFF, 0x77, 0xFF, 0xDD, 0xFF }, //4 BACK_30PCTDOTS(30 GrayScale5thLightest)
+ { 0x6F, 0xFF, 0xB5, 0xFF, 0xB5, 0xFF, 0xDA, 0xFF }, //5 BACK_50PCTDOTS
+ { 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD }, //6
+ { 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22 }, //7
+ { 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88 }, //8
+ { 0x22, 0x00, 0x88, 0x00, 0x22, 0x00, 0x88, 0x00 }, //9
+ { 0x80, 0x00, 0x08, 0x00, 0x80, 0x00, 0x08, 0x00 }, //10
+ { 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00 }, //11
+ { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, //12
+ { 0xB1, 0x30, 0x03, 0x1B, 0xD8, 0xC0, 0x0C, 0x8D }, //13
+ { 0x80, 0x10, 0x02, 0x20, 0x01, 0x08, 0x40, 0x04 }, //14
+ { 0x33, 0x99, 0xCC, 0x66, 0x33, 0x99, 0xCC, 0x66 }, //15
+ { 0x77, 0xBB, 0xDD, 0xEE, 0x77, 0xBB, 0xDD, 0xEE }, //16
+ { 0x6F, 0xB7, 0xDB, 0xED, 0xF6, 0x7B, 0xBD, 0xDE }, //17
+ { 0x5F, 0xAF, 0xD7, 0xEB, 0xF5, 0xFA, 0x7D, 0xBE }, //18
+ { 0xEA, 0x75, 0xBA, 0x5D, 0xAE, 0x57, 0xAB, 0xD5 }, //19
+ { 0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE }, //20
+ { 0xCC, 0x99, 0x33, 0x66, 0xCC, 0x99, 0x33, 0x66 }, //21
+ { 0xEE, 0xDD, 0xBB, 0x77, 0xEE, 0xDD, 0xBB, 0x77 }, //22
+ { 0xDE, 0xBD, 0x7B, 0xF6, 0xED, 0xDB, 0xB7, 0x6F }, //23
+ { 0xFA, 0xF5, 0xEB, 0xD7, 0xAF, 0x5F, 0xBE, 0x7D }, //24
+ { 0x57, 0xAE, 0x5D, 0xBA, 0x75, 0xEA, 0xD5, 0xAB }, //25
+ { 0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F }, //26
+ { 0x44, 0xAA, 0x11, 0xAA, 0x44, 0xAA, 0x11, 0xAA }, //27
+ { 0xBB, 0x55, 0xEE, 0x55, 0xBB, 0x55, 0xEE, 0x55 }, //28
+ { 0x7E, 0xBD, 0xDB, 0xE7, 0xE7, 0xDB, 0xBD, 0x7E }, //29
+ { 0xF9, 0xF6, 0x6F, 0x9F, 0x9F, 0x6F, 0xF6, 0xF9 }, //30
+ { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF }, //31
+ { 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00 }, //32
+ { 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF }, //33
+ { 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //34
+ { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 }, //35
+ { 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99 }, //36
+ { 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB, 0xDB }, //37
+ { 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE }, //38
+ { 0xFF, 0x55, 0xFF, 0x55, 0xFF, 0x55, 0xFF, 0x55 }, //39
+ { 0xBB, 0xBB, 0x00, 0xBB, 0xBB, 0xBB, 0x00, 0xBB }, //40
+ { 0x00, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD }, //41
+ { 0x22, 0x00, 0x20, 0x00, 0xAA, 0x00, 0x20, 0x00 }, //42
+ { 0x40, 0xA0, 0x00, 0x00, 0x04, 0x0A, 0x00, 0x00 }, //43
+ { 0x01, 0x80, 0x00, 0x08, 0x10, 0x20, 0x00, 0x02 }, //44
+ { 0xED, 0xED, 0x0C, 0xC0, 0xDE, 0xDE, 0xC0, 0x0C }, //45
+ { 0xC1, 0xE2, 0x77, 0x2E, 0x1C, 0x3A, 0x77, 0xA3 }, //46
+ { 0x00, 0xF7, 0xF7, 0xF7, 0x00, 0x7F, 0x7F, 0x7F }, //47
+ { 0x7C, 0xBB, 0xC7, 0xEF, 0xDF, 0xBF, 0x7F, 0xFE }, //48
+ { 0xFF, 0x33, 0xFF, 0xCC, 0xFF, 0x33, 0xFF, 0xCC }, //49
+ { 0xCC, 0xCC, 0x33, 0x33, 0x33, 0x33, 0xCC, 0xCC }, //50
+ { 0xF0, 0xF0, 0x0F, 0x0F, 0xF0, 0xF0, 0x0F, 0x0F }, //51
+ { 0xC3, 0xC3, 0xC3, 0xC3, 0x3C, 0x3C, 0x3C, 0x3C }, //52
+ { 0x33, 0x33, 0xCC, 0xCC, 0x33, 0x33, 0xCC, 0xCC }, //53
+ { 0x08, 0x08, 0x14, 0x22, 0xC9, 0x22, 0x14, 0x08 }, //54
+ { 0x0A, 0x04, 0x04, 0x55, 0xA0, 0x40, 0x40, 0x55 }, //55
+ { 0x01, 0x01, 0x03, 0x84, 0x48, 0x30, 0x0C, 0x02 }, //56
+ { 0x28, 0xC7, 0x01, 0x01, 0x82, 0x7C, 0x10, 0x10 }, //57
+ { 0x40, 0x80, 0x01, 0x02, 0x04, 0x8A, 0x55, 0xFF }, //58
+ { 0xC7, 0xC7, 0xBB, 0x4C, 0x7C, 0x7C, 0xBB, 0xC4 }, //59
+ { 0x8A, 0x05, 0x02, 0x00, 0x02, 0x05, 0x8A, 0x55 }, //60
+ { 0x28, 0x44, 0x82, 0x11, 0x00, 0x55, 0x00, 0x11 }, //61
+ { 0x81, 0x41, 0x60, 0x70, 0x78, 0x70, 0x60, 0x41 }, //62
+ { 0xEE, 0x57, 0xAB, 0x55, 0xEE, 0x5D, 0xBA, 0x75 }, //63
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },//2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, //2 SolidBackground
};
#endif
diff --git a/lotuswordpro/source/filter/lwpresource.hxx b/lotuswordpro/source/filter/lwpresource.hxx
index 37dfe70e5199..4683fe3e1f41 100644
--- a/lotuswordpro/source/filter/lwpresource.hxx
+++ b/lotuswordpro/source/filter/lwpresource.hxx
@@ -56,12 +56,12 @@
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPRESOURCE_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPRESOURCE_HXX
-#define IMPLEMENTATION_NAME "com.ibm.ILWPImportFilter"
+#define IMPLEMENTATION_NAME "com.ibm.ILWPImportFilter"
-const char STR_WORDPRO[] = "Wordpro";
-const char STR_IMPLEMENTATION_NAME[] = IMPLEMENTATION_NAME;
-const char STR_SERVICE_NAME[] = "com.sun.star.document.ImportFilter";
-const char STR_WRITER_IMPORTER_NAME[] = "com.sun.star.comp.Writer.XMLImporter";
+const char STR_WORDPRO[] = "Wordpro";
+const char STR_IMPLEMENTATION_NAME[] = IMPLEMENTATION_NAME;
+const char STR_SERVICE_NAME[] = "com.sun.star.document.ImportFilter";
+const char STR_WRITER_IMPORTER_NAME[] = "com.sun.star.comp.Writer.XMLImporter";
#endif
diff --git a/lotuswordpro/source/filter/lwpsdwfileloader.cxx b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
index 68dc4d39a3c6..3a7f05bb477a 100644
--- a/lotuswordpro/source/filter/lwpsdwfileloader.cxx
+++ b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
@@ -68,15 +68,13 @@ LwpSdwFileLoader::LwpSdwFileLoader(SvStream* pStream, LwpGraphicObject* pGraphic
pStream->Seek(0);
}
-LwpSdwFileLoader::~LwpSdwFileLoader()
-{
-}
+LwpSdwFileLoader::~LwpSdwFileLoader() {}
/**
* @descr entry of lwp-drawing objects.
* @param pDrawObjVector a container which will contains the created drawing object of XF-Model.
*/
-void LwpSdwFileLoader::CreateDrawObjects(std::vector< rtl::Reference<XFFrame> >* pDrawObjVector)
+void LwpSdwFileLoader::CreateDrawObjects(std::vector<rtl::Reference<XFFrame>>* pDrawObjVector)
{
unsigned char BinSignature[2];
m_pStream->ReadBytes(BinSignature, 2);
@@ -88,11 +86,11 @@ void LwpSdwFileLoader::CreateDrawObjects(std::vector< rtl::Reference<XFFrame> >*
m_pStream->ReadUInt16(nVersion);
m_pStream->Seek(0);
- if (nVersion<0x0102)
+ if (nVersion < 0x0102)
{
assert(false);
}
- if (nVersion>=0x0102)
+ if (nVersion >= 0x0102)
{
LwpSdwGroupLoaderV0102 sdwGroupLoader(m_pStream, m_pGraphicObj);
sdwGroupLoader.BeginDrawObjects(pDrawObjVector);
diff --git a/lotuswordpro/source/filter/lwpsection.cxx b/lotuswordpro/source/filter/lwpsection.cxx
index 81d30c322435..a4bb2567f74f 100644
--- a/lotuswordpro/source/filter/lwpsection.cxx
+++ b/lotuswordpro/source/filter/lwpsection.cxx
@@ -63,9 +63,10 @@
#include "lwpdlvlist.hxx"
#include "lwpsection.hxx"
-LwpOrderedObject::LwpOrderedObject(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpOrderedObject::LwpOrderedObject(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpDLNFVList(objHdr, pStrm)
-{}
+{
+}
/**
* @descr: read object information
@@ -80,16 +81,14 @@ void LwpOrderedObject::Read()
m_pObjStrm->SkipExtra();
}
-LwpSection::LwpSection(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
+LwpSection::LwpSection(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpOrderedObject(objHdr, pStrm)
, m_Flags(0)
-{}
-
-LwpSection::~LwpSection()
{
-
}
+LwpSection::~LwpSection() {}
+
/**
* @descr: read object information
*
@@ -108,21 +107,17 @@ void LwpSection::Read()
* @descr: do nothing
*
*/
-void LwpSection::Parse(IXFStream * /*pOutputStream*/)
-{
-
-}
+void LwpSection::Parse(IXFStream* /*pOutputStream*/) {}
-LwpIndexSection::LwpIndexSection(LwpObjectHeader const &objHdr, LwpSvStream *pStrm)
+LwpIndexSection::LwpIndexSection(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpSection(objHdr, pStrm)
, m_nForm(0)
, m_nFlags(0)
-{}
-
-LwpIndexSection::~LwpIndexSection()
{
}
+LwpIndexSection::~LwpIndexSection() {}
+
/**
* @descr: read object information
*
@@ -139,16 +134,8 @@ void LwpIndexSection::Read()
m_pObjStrm->SkipExtra();
}
-bool LwpIndexSection::IsFormatRunin() const
-{
- return (m_nFlags & RUN_IN) != 0;
-
-}
-
-bool LwpIndexSection::IsFormatSeparator() const
-{
- return (m_nFlags & SEPARATORS) != 0;
+bool LwpIndexSection::IsFormatRunin() const { return (m_nFlags & RUN_IN) != 0; }
-}
+bool LwpIndexSection::IsFormatSeparator() const { return (m_nFlags & SEPARATORS) != 0; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpsection.hxx b/lotuswordpro/source/filter/lwpsection.hxx
index a3678fb0ed89..4f43aea782ae 100644
--- a/lotuswordpro/source/filter/lwpsection.hxx
+++ b/lotuswordpro/source/filter/lwpsection.hxx
@@ -70,12 +70,13 @@ class LwpDLNFVList;
class LwpOrderedObject : public LwpDLNFVList
{
public:
- LwpOrderedObject(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpOrderedObject(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void Read() override;
- LwpObjectID& GetPosition(){ return m_Para;}
- LwpObjectID& GetListList(){ return m_ListList;}
+ LwpObjectID& GetPosition() { return m_Para; }
+ LwpObjectID& GetListList() { return m_ListList; }
+
private:
- LwpObjectID m_ListList;//lwplistlist object,
+ LwpObjectID m_ListList; //lwplistlist object,
LwpObjectID m_Para;
};
@@ -88,20 +89,20 @@ class LwpAtomHolder;
class LwpSection : public LwpOrderedObject
{
public:
- LwpSection(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpSection(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpSection() override;
inline LwpPageLayout* GetPageLayout();
void Parse(IXFStream* pOutputStream) override;
- OUString const & GetSectionName() const {return m_AtomHolder.str();}
+ OUString const& GetSectionName() const { return m_AtomHolder.str(); }
protected:
void Read() override;
+
private:
sal_uInt16 m_Flags;
LwpObjectID m_PageLayout;
LwpColor m_Color;
LwpAtomHolder m_AtomHolder;
-
};
/**
@@ -116,17 +117,20 @@ inline LwpPageLayout* LwpSection::GetPageLayout()
class LwpIndexSection : public LwpSection
{
public:
- LwpIndexSection(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpIndexSection(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpIndexSection() override;
bool IsFormatRunin() const;
bool IsFormatSeparator() const;
+
protected:
void Read() override;
+
private:
- enum{
+ enum
+ {
SEPARATORS = 0x01,
RUN_IN = 0X02,
- };
+ };
LwpAtomHolder m_TextMarker;
LwpAtomHolder m_ParentName;
LwpAtomHolder m_DivisionName;
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx
index 2b56805bf5ba..5c2f51247b31 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.hxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx
@@ -68,19 +68,19 @@
#include <lwpatomholder.hxx>
const sal_uInt16 MAXNUMBERPOSITIONS = 10; //max number of positions
-const sal_uInt16 NUMCHAR_none = 0x00; //none of numberchar
-const sal_uInt16 NUMCHAR_1 = 0x01; //index for numberchar "1"
-const sal_uInt16 NUMCHAR_A = 0x02; //index for numberchar "A"
-const sal_uInt16 NUMCHAR_a = 0x03; //index for numberchar "a"
-const sal_uInt16 NUMCHAR_I = 0x04; //index for numberchar "I"
-const sal_uInt16 NUMCHAR_i = 0x05; //index for numberchar "i"
-const sal_uInt16 NUMCHAR_other= 0x06; //index for numberchar "other"
-const sal_uInt16 NUMCHAR_01 = 0x0B; //index for numberchar "01"
-
-const sal_uInt16 NUMCHAR_Chinese1 = 0x09; //index for numberchar "Ò¼"
-const sal_uInt16 NUMCHAR_Chinese2 = 0x08; //index for numberchar "Ò»"
-const sal_uInt16 NUMCHAR_Chinese3= 0x0A; //index for numberchar "¼×"
-const sal_uInt16 NUMCHAR_Chinese4 = 0x13; //index for numberchar "01" in chinese version
+const sal_uInt16 NUMCHAR_none = 0x00; //none of numberchar
+const sal_uInt16 NUMCHAR_1 = 0x01; //index for numberchar "1"
+const sal_uInt16 NUMCHAR_A = 0x02; //index for numberchar "A"
+const sal_uInt16 NUMCHAR_a = 0x03; //index for numberchar "a"
+const sal_uInt16 NUMCHAR_I = 0x04; //index for numberchar "I"
+const sal_uInt16 NUMCHAR_i = 0x05; //index for numberchar "i"
+const sal_uInt16 NUMCHAR_other = 0x06; //index for numberchar "other"
+const sal_uInt16 NUMCHAR_01 = 0x0B; //index for numberchar "01"
+
+const sal_uInt16 NUMCHAR_Chinese1 = 0x09; //index for numberchar "Ò¼"
+const sal_uInt16 NUMCHAR_Chinese2 = 0x08; //index for numberchar "Ò»"
+const sal_uInt16 NUMCHAR_Chinese3 = 0x0A; //index for numberchar "¼×"
+const sal_uInt16 NUMCHAR_Chinese4 = 0x13; //index for numberchar "01" in chinese version
class LwpAtomHolder;
class LwpPara;
@@ -89,7 +89,7 @@ class LwpFribParaNumber;
class LwpSilverBullet : public LwpDLNFVList
{
public:
- LwpSilverBullet(LwpObjectHeader const & objHdr, LwpSvStream* pStrm);
+ LwpSilverBullet(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpSilverBullet() override;
@@ -103,7 +103,7 @@ public:
const OUString& GetBulletStyleName() const;
- OUString const & GetBulletChar() const;
+ OUString const& GetBulletChar() const;
static OUString GetPrefix() { return OUString(); }
@@ -111,7 +111,7 @@ public:
bool HasName();
- static OUString GetNumCharByStyleID(LwpFribParaNumber const * pParaNumber);
+ static OUString GetNumCharByStyleID(LwpFribParaNumber const* pParaNumber);
inline bool IsLesserLevel(sal_uInt16 nPos);
@@ -126,10 +126,10 @@ public:
OUString GetSectionName() const;
private:
- sal_uInt16 m_nFlags;
- LwpObjectID m_aStory;
- sal_uInt8 m_pResetPositionFlags[MAXNUMBERPOSITIONS];
- sal_uInt32 m_nUseCount;
+ sal_uInt16 m_nFlags;
+ LwpObjectID m_aStory;
+ sal_uInt8 m_pResetPositionFlags[MAXNUMBERPOSITIONS];
+ sal_uInt32 m_nUseCount;
std::unique_ptr<LwpAtomHolder> m_pAtomHolder;
rtl::Reference<LwpPara> m_xBulletPara;
@@ -137,19 +137,16 @@ private:
sal_uInt16 m_pHideLevels[10];
private:
- enum // For m_pResetPositionFlags
+ enum // For m_pResetPositionFlags
{
- LESSERLEVEL = 0x01,
- LESSERSPECIFIC = 0x02,
- NEWDIVISION = 0x04,
- NEWSECTION = 0x08,
- CUMULATIVE = 0x10
+ LESSERLEVEL = 0x01,
+ LESSERSPECIFIC = 0x02,
+ NEWDIVISION = 0x04,
+ NEWSECTION = 0x08,
+ CUMULATIVE = 0x10
};
};
-inline const OUString& LwpSilverBullet::GetBulletStyleName() const
-{
- return m_strStyleName;
-}
+inline const OUString& LwpSilverBullet::GetBulletStyleName() const { return m_strStyleName; }
inline bool LwpSilverBullet::IsLesserLevel(sal_uInt16 nPos)
{
if (nPos < SAL_N_ELEMENTS(m_pResetPositionFlags))
diff --git a/lotuswordpro/source/filter/lwpsortopt.cxx b/lotuswordpro/source/filter/lwpsortopt.cxx
index 790eebb88e55..951439e470be 100644
--- a/lotuswordpro/source/filter/lwpsortopt.cxx
+++ b/lotuswordpro/source/filter/lwpsortopt.cxx
@@ -60,26 +60,23 @@
#include "lwpsortopt.hxx"
-void LwpSortKey::Read(LwpObjectStream *pStrm)
+void LwpSortKey::Read(LwpObjectStream* pStrm)
{
m_nField = pStrm->QuickReaduInt16();
m_nFlag = pStrm->QuickReaduInt16();
m_nWord = pStrm->QuickReaduInt16();
pStrm->SkipExtra();
}
-LwpSortOption::LwpSortOption(LwpObjectStream* pStrm)
-{
- Read(pStrm);
-}
+LwpSortOption::LwpSortOption(LwpObjectStream* pStrm) { Read(pStrm); }
/**
* @descr Read sort option in VO_DOCUMENT from object stream
**/
-void LwpSortOption::Read(LwpObjectStream *pStrm)
+void LwpSortOption::Read(LwpObjectStream* pStrm)
{
m_nCount = pStrm->QuickReaduInt16();
m_nFlags = pStrm->QuickReaduInt16();
m_nText = pStrm->QuickReaduInt8();
- for(LwpSortKey & key : m_Keys)
+ for (LwpSortKey& key : m_Keys)
{
key.Read(pStrm);
}
diff --git a/lotuswordpro/source/filter/lwpsortopt.hxx b/lotuswordpro/source/filter/lwpsortopt.hxx
index 4c0b94aa1c38..54fcba15dbcc 100644
--- a/lotuswordpro/source/filter/lwpsortopt.hxx
+++ b/lotuswordpro/source/filter/lwpsortopt.hxx
@@ -74,8 +74,9 @@ private:
sal_uInt16 m_nField;
sal_uInt16 m_nFlag;
sal_uInt16 m_nWord;
+
public:
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
};
/**
* @brief sort options in VO_DOCUMENT
@@ -85,8 +86,10 @@ class LwpSortOption
{
public:
explicit LwpSortOption(LwpObjectStream* pStrm);
+
public:
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
+
private:
LwpSortKey m_Keys[3];
sal_uInt16 m_nCount;
diff --git a/lotuswordpro/source/filter/lwpstory.hxx b/lotuswordpro/source/filter/lwpstory.hxx
index 3c86e4857298..809cc2bbb0ad 100644
--- a/lotuswordpro/source/filter/lwpstory.hxx
+++ b/lotuswordpro/source/filter/lwpstory.hxx
@@ -71,8 +71,9 @@ class LwpPageLayout;
class LwpStory final : public LwpContent
{
public:
- LwpStory(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpStory(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpStory() override;
+
private:
//File format members:
LwpDLVListHeadTail m_ParaList;
@@ -80,13 +81,13 @@ private:
// for bullet , 05/23/2005
typedef std::pair<OUString, sal_uInt8> NamePosPair;
- std::vector <NamePosPair> m_vBulletStyleNameList;
+ std::vector<NamePosPair> m_vBulletStyleNameList;
// , 02/16/2005
bool m_bPMModified;
- LwpPageLayout* m_pCurrentLayout; //for register page layout style
+ LwpPageLayout* m_pCurrentLayout; //for register page layout style
std::vector<LwpPageLayout*> m_LayoutList;
- LwpLayout* m_pTabLayout; //for register tab style
+ LwpLayout* m_pTabLayout; //for register tab style
bool m_bDropcap;
std::unique_ptr<LwpHyperlinkMgr> m_pHyperlinkMgr;
@@ -106,12 +107,12 @@ public:
void XFConvertFrameInPage(XFContentContainer* pCont);
inline LwpObjectID& GetFirstPara();
inline LwpObjectID& GetLastPara();
- XFContentContainer* GetXFContent();
+ XFContentContainer* GetXFContent();
void AddXFContent(XFContent* pContent);
bool GetDropcapFlag() const { return m_bDropcap; }
LwpPageLayout* GetCurrentLayout() { return m_pCurrentLayout; }
- inline LwpMiddleLayout* GetTabLayout();//for register tab style
+ inline LwpMiddleLayout* GetTabLayout(); //for register tab style
const OUString& GetSectionName() const { return m_CurrSectionName; }
LwpHyperlinkMgr* GetHyperlinkMgr() { return m_pHyperlinkMgr.get(); }
@@ -135,36 +136,18 @@ public:
OUString RegisterFirstFribStyle();
};
-LwpObjectID& LwpStory::GetFirstPara()
-{
- return m_ParaList.GetHead();
-}
-LwpObjectID& LwpStory::GetLastPara()
-{
- return m_ParaList.GetTail();
-}
+LwpObjectID& LwpStory::GetFirstPara() { return m_ParaList.GetHead(); }
+LwpObjectID& LwpStory::GetLastPara() { return m_ParaList.GetTail(); }
LwpMiddleLayout* LwpStory::GetTabLayout()
{
- if(m_pTabLayout)
+ if (m_pTabLayout)
return m_pTabLayout;
return dynamic_cast<LwpMiddleLayout*>(GetLayout(nullptr).get());
}
-void LwpStory::SetPMModified(bool bPMModified)
-{
- m_bPMModified = bPMModified;
-}
-void LwpStory::SetDropcapFlag(bool bFlag)
-{
- m_bDropcap = bFlag;
-}
-void LwpStory::SetTabLayout(LwpLayout* pLayout)
-{
- m_pTabLayout = pLayout;
-}
-void LwpStory::SetSectionName(const OUString& StyleName)
-{
- m_CurrSectionName = StyleName;
-}
+void LwpStory::SetPMModified(bool bPMModified) { m_bPMModified = bPMModified; }
+void LwpStory::SetDropcapFlag(bool bFlag) { m_bDropcap = bFlag; }
+void LwpStory::SetTabLayout(LwpLayout* pLayout) { m_pTabLayout = pLayout; }
+void LwpStory::SetSectionName(const OUString& StyleName) { m_CurrSectionName = StyleName; }
inline void LwpStory::AddBullStyleName2List(const OUString& rStyleName, sal_uInt8 nPos)
{
m_vBulletStyleNameList.push_back(std::make_pair(rStyleName, nPos));
diff --git a/lotuswordpro/source/filter/lwpsvstream.cxx b/lotuswordpro/source/filter/lwpsvstream.cxx
index 4ab5c03c4251..c95279a9f846 100644
--- a/lotuswordpro/source/filter/lwpsvstream.cxx
+++ b/lotuswordpro/source/filter/lwpsvstream.cxx
@@ -58,8 +58,9 @@
const sal_uInt32 LwpSvStream::LWP_STREAM_BASE = 0x0010;
-LwpSvStream::LwpSvStream(SvStream* pStream, LwpSvStream * pCompressed)
- : m_pStream(pStream), m_pCompressedStream(pCompressed)
+LwpSvStream::LwpSvStream(SvStream* pStream, LwpSvStream* pCompressed)
+ : m_pStream(pStream)
+ , m_pCompressedStream(pCompressed)
{
}
@@ -71,50 +72,38 @@ size_t LwpSvStream::Read(void* buf, size_t nBytesToRead)
return m_pStream->ReadBytes(buf, nBytesToRead);
}
-LwpSvStream& LwpSvStream::ReadUInt8( sal_uInt8& rUInt8 )
+LwpSvStream& LwpSvStream::ReadUInt8(sal_uInt8& rUInt8)
{
- m_pStream->ReadUChar( rUInt8 );
+ m_pStream->ReadUChar(rUInt8);
return *this;
}
-LwpSvStream& LwpSvStream::ReadUInt16( sal_uInt16& rUInt16 )
+LwpSvStream& LwpSvStream::ReadUInt16(sal_uInt16& rUInt16)
{
- m_pStream->ReadUInt16( rUInt16 );
+ m_pStream->ReadUInt16(rUInt16);
return *this;
}
-LwpSvStream& LwpSvStream::ReadUInt32( sal_uInt32& rUInt32 )
+LwpSvStream& LwpSvStream::ReadUInt32(sal_uInt32& rUInt32)
{
- m_pStream->ReadUInt32( rUInt32 );
+ m_pStream->ReadUInt32(rUInt32);
return *this;
}
/**
* @descr SeekRel in stream
*/
-void LwpSvStream::SeekRel(sal_Int64 pos)
-{
- m_pStream->SeekRel(pos);
-}
+void LwpSvStream::SeekRel(sal_Int64 pos) { m_pStream->SeekRel(pos); }
/**
* @descr Get the current position in stream
*/
-sal_Int64 LwpSvStream::Tell()
-{
- return m_pStream->Tell();
-}
+sal_Int64 LwpSvStream::Tell() { return m_pStream->Tell(); }
/**
* @descr Seek to pos
*/
-sal_Int64 LwpSvStream::Seek(sal_Int64 pos)
-{
- return m_pStream->Seek(pos);
-}
+sal_Int64 LwpSvStream::Seek(sal_Int64 pos) { return m_pStream->Seek(pos); }
-bool LwpSvStream::CheckSeek(sal_Int64 pos)
-{
- return checkSeek(*m_pStream, pos);
-}
+bool LwpSvStream::CheckSeek(sal_Int64 pos) { return checkSeek(*m_pStream, pos); }
/**
* @descr Return the stream data length
*/
diff --git a/lotuswordpro/source/filter/lwptable.cxx b/lotuswordpro/source/filter/lwptable.cxx
index 143b99ca5ce0..402d8b2f576c 100644
--- a/lotuswordpro/source/filter/lwptable.cxx
+++ b/lotuswordpro/source/filter/lwptable.cxx
@@ -63,42 +63,38 @@
#include <algorithm>
#include <lwpfilehdr.hxx>
- #include "lwptable.hxx"
+#include "lwptable.hxx"
- LwpSuperTable::LwpSuperTable(LwpObjectHeader const &objHdr, LwpSvStream* pStrm):LwpContent(objHdr, pStrm)
-{}
+LwpSuperTable::LwpSuperTable(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpContent(objHdr, pStrm)
+{
+}
-LwpSuperTable::~LwpSuperTable()
-{}
+LwpSuperTable::~LwpSuperTable() {}
void LwpSuperTable::Read()
{
LwpContent::Read();
m_pObjStrm->SkipExtra();
-
}
-void LwpSuperTable::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpSuperTable::Parse(IXFStream* /*pOutputStream*/) {}
+
+void LwpSuperTable::XFConvert(XFContentContainer* /*pCont*/) {}
-void LwpSuperTable::XFConvert(XFContentContainer* /*pCont*/)
+/*****************************************************************************/
+LwpTable::LwpTable(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpContent(objHdr, pStrm)
+ , m_nRow(0)
+ , m_nColumn(0)
+ , m_nHeight(0)
+ , m_nWidth(0)
+ , m_nDefaultAutoGrowRowHeight(0)
+ , m_nAttributes(0)
{
}
-/*****************************************************************************/
- LwpTable::LwpTable(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- : LwpContent(objHdr, pStrm)
- , m_nRow(0)
- , m_nColumn(0)
- , m_nHeight(0)
- , m_nWidth(0)
- , m_nDefaultAutoGrowRowHeight(0)
- , m_nAttributes(0)
-{}
-
-LwpTable::~LwpTable()
-{}
+LwpTable::~LwpTable() {}
void LwpTable::Read()
{
@@ -128,49 +124,39 @@ void LwpTable::Read()
m_pObjStrm->SkipExtra();
}
-bool LwpTable::IsNumberDown() const
-{
- return (m_nAttributes & NUMBER_DOWN) != 0;
-}
+bool LwpTable::IsNumberDown() const { return (m_nAttributes & NUMBER_DOWN) != 0; }
-void LwpTable::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpTable::Parse(IXFStream* /*pOutputStream*/) {}
- LwpSuperTableLayout* LwpTable::GetSuperTableLayout()
+LwpSuperTableLayout* LwpTable::GetSuperTableLayout()
{
LwpTableLayout* pLayout = dynamic_cast<LwpTableLayout*>(m_Layout.obj().get());
- if(pLayout)
+ if (pLayout)
return dynamic_cast<LwpSuperTableLayout*>(pLayout->GetParent().obj().get());
return nullptr;
}
- /*****************************************************************************/
- LwpTableHeading::LwpTableHeading(LwpObjectHeader const &objHdr, LwpSvStream* pStrm):LwpTable(objHdr, pStrm)
-{}
-
-LwpTableHeading::~LwpTableHeading()
-{}
-
-void LwpTableHeading::Read()
+/*****************************************************************************/
+LwpTableHeading::LwpTableHeading(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpTable(objHdr, pStrm)
{
- m_pObjStrm->SkipExtra();
}
-void LwpTableHeading::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+LwpTableHeading::~LwpTableHeading() {}
- /*****************************************************************************/
-LwpParallelColumns::LwpParallelColumns(LwpObjectHeader const &objHdr, LwpSvStream* pStrm):LwpTable(objHdr, pStrm)
-{
-}
+void LwpTableHeading::Read() { m_pObjStrm->SkipExtra(); }
-LwpParallelColumns::~LwpParallelColumns()
+void LwpTableHeading::Parse(IXFStream* /*pOutputStream*/) {}
+
+/*****************************************************************************/
+LwpParallelColumns::LwpParallelColumns(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpTable(objHdr, pStrm)
{
}
+LwpParallelColumns::~LwpParallelColumns() {}
+
void LwpParallelColumns::Read()
{
LwpTable::Read();
@@ -179,18 +165,17 @@ void LwpParallelColumns::Read()
m_pObjStrm->SkipExtra();
}
- /*****************************************************************************/
-LwpGlossary::LwpGlossary(LwpObjectHeader const &objHdr, LwpSvStream* pStrm):LwpParallelColumns(objHdr, pStrm)
+/*****************************************************************************/
+LwpGlossary::LwpGlossary(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpParallelColumns(objHdr, pStrm)
{
}
-LwpGlossary::~LwpGlossary()
-{
-}
+LwpGlossary::~LwpGlossary() {}
sal_uInt16 LwpGlossary::GetNumIndexRows() const
{
if (GetRow() > 0 && GetRow() <= MAX_NUM_ROWS)
- return GetRow() - 1; // Minus one row for repeated heading.
+ return GetRow() - 1; // Minus one row for repeated heading.
return 0;
}
@@ -204,7 +189,7 @@ void LwpGlossary::Read()
if (FiledEntries < NumIndexRows)
{
/* We'll have to do sequential (slow) searches. */
- m_pObjStrm->SeekRel( FiledEntries * sizeof(sal_uInt16));
+ m_pObjStrm->SeekRel(FiledEntries * sizeof(sal_uInt16));
}
else
{
@@ -216,7 +201,7 @@ void LwpGlossary::Read()
m_pObjStrm->QuickReaduInt16();
if (FiledEntries > EntriesRead)
- m_pObjStrm->SeekRel((FiledEntries - EntriesRead)* sizeof(sal_uInt16));
+ m_pObjStrm->SeekRel((FiledEntries - EntriesRead) * sizeof(sal_uInt16));
}
else
m_pObjStrm->SeekRel(FiledEntries * sizeof(sal_uInt16));
diff --git a/lotuswordpro/source/filter/lwptaboverride.cxx b/lotuswordpro/source/filter/lwptaboverride.cxx
index 2401b35f001f..40c34abdc253 100644
--- a/lotuswordpro/source/filter/lwptaboverride.cxx
+++ b/lotuswordpro/source/filter/lwptaboverride.cxx
@@ -15,9 +15,6 @@ LwpTabOverride::LwpTabOverride(LwpTabOverride const& rOther)
{
}
-LwpTabOverride* LwpTabOverride::clone() const
-{
- return new LwpTabOverride(*this);
-}
+LwpTabOverride* LwpTabOverride::clone() const { return new LwpTabOverride(*this); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwptaboverride.hxx b/lotuswordpro/source/filter/lwptaboverride.hxx
index a2ea4b487096..f86de477e84e 100644
--- a/lotuswordpro/source/filter/lwptaboverride.hxx
+++ b/lotuswordpro/source/filter/lwptaboverride.hxx
@@ -66,13 +66,11 @@
class LwpTabOverride final : public LwpOverride
{
public:
- LwpTabOverride()
- {
- }
+ LwpTabOverride() {}
virtual LwpTabOverride* clone() const override;
- virtual void Read(LwpObjectStream *pStrm) override
+ virtual void Read(LwpObjectStream* pStrm) override
{
if (pStrm->QuickReadBool())
{
@@ -93,14 +91,11 @@ private:
LwpObjectID m_aTabRackID;
enum
{
- TO_TABRACK = 0x01
+ TO_TABRACK = 0x01
};
};
-inline LwpObjectID& LwpTabOverride::GetTabRackID()
-{
- return m_aTabRackID;
-}
+inline LwpObjectID& LwpTabOverride::GetTabRackID() { return m_aTabRackID; }
inline void LwpTabOverride::Override(LwpTabOverride* pOther)
{
diff --git a/lotuswordpro/source/filter/lwptblcell.cxx b/lotuswordpro/source/filter/lwptblcell.cxx
index c17c5ed5a3ef..6831dce23af7 100644
--- a/lotuswordpro/source/filter/lwptblcell.cxx
+++ b/lotuswordpro/source/filter/lwptblcell.cxx
@@ -62,13 +62,13 @@
#include <lwpobjid.hxx>
#include "lwptblcell.hxx"
- LwpCellList::LwpCellList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- : LwpDLVList(objHdr, pStrm)
- , cColumn(0)
-{}
+LwpCellList::LwpCellList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLVList(objHdr, pStrm)
+ , cColumn(0)
+{
+}
-LwpCellList::~LwpCellList()
-{}
+LwpCellList::~LwpCellList() {}
void LwpCellList::Read()
{
@@ -88,53 +88,47 @@ void LwpCellList::Read()
LwpObjectID cDependent;
cDependent.ReadIndexed(m_pObjStrm.get());
- cColumn = static_cast<sal_uInt8>(m_pObjStrm->QuickReaduInt16()); // written as a sal_uInt16
-// sal_uInt8 cCellFlags = (sal_uInt8) m_pObjStrm->QuickReaduInt16(); // written as a sal_uInt16
- m_pObjStrm->SeekRel(2);//CellFlags
+ cColumn = static_cast<sal_uInt8>(m_pObjStrm->QuickReaduInt16()); // written as a sal_uInt16
+ // sal_uInt8 cCellFlags = (sal_uInt8) m_pObjStrm->QuickReaduInt16(); // written as a sal_uInt16
+ m_pObjStrm->SeekRel(2); //CellFlags
m_pObjStrm->SkipExtra();
-
}
-void LwpCellList::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpCellList::Parse(IXFStream* /*pOutputStream*/) {}
-void LwpCellList::Convert(XFCell * pCell, LwpTableLayout* /*pCellsMap*/)
+void LwpCellList::Convert(XFCell* pCell, LwpTableLayout* /*pCellsMap*/)
{
LwpObjectID aValueID = cValue;
LwpNumericValue* pValue = dynamic_cast<LwpNumericValue*>(aValueID.obj().get());
if (pValue)
{
- pCell->SetValue( pValue->GetValue() );
+ pCell->SetValue(pValue->GetValue());
}
}
-LwpNumericValue::LwpNumericValue(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpNumericValue::LwpNumericValue(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
, cNumber(0)
-{}
+{
+}
-LwpNumericValue::~LwpNumericValue()
-{}
+LwpNumericValue::~LwpNumericValue() {}
void LwpNumericValue::Read()
{
cNumber = m_pObjStrm->QuickReadDouble();
m_pObjStrm->SkipExtra();
-
}
-void LwpNumericValue::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpNumericValue::Parse(IXFStream* /*pOutputStream*/) {}
-LwpRowList::LwpRowList(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpRowList::LwpRowList(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpDLVList(objHdr, pStrm)
, cRowID(0)
-{}
+{
+}
-LwpRowList::~LwpRowList()
-{}
+LwpRowList::~LwpRowList() {}
void LwpRowList::Read()
{
@@ -151,16 +145,14 @@ void LwpRowList::Read()
m_pObjStrm->SkipExtra();
}
- void LwpRowList::Parse(IXFStream* /*pOutputStream*/)
+void LwpRowList::Parse(IXFStream* /*pOutputStream*/) {}
+
+LwpTableRange::LwpTableRange(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLVList(objHdr, pStrm)
{
}
-LwpTableRange::LwpTableRange(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
- :LwpDLVList(objHdr, pStrm)
-{}
-
-LwpTableRange::~LwpTableRange()
-{}
+LwpTableRange::~LwpTableRange() {}
void LwpTableRange::Read()
{
@@ -171,15 +163,14 @@ void LwpTableRange::Read()
m_pObjStrm->SkipExtra();
}
-void LwpTableRange::Parse(IXFStream* /*pOutputStream*/)
+void LwpTableRange::Parse(IXFStream* /*pOutputStream*/) {}
+
+LwpCellRange::LwpCellRange(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpObject(objHdr, pStrm)
{
}
- LwpCellRange::LwpCellRange(LwpObjectHeader const &objHdr, LwpSvStream* pStrm):LwpObject(objHdr, pStrm)
-{}
-
-LwpCellRange::~LwpCellRange()
-{}
+LwpCellRange::~LwpCellRange() {}
void LwpCellRange::Read()
{
@@ -187,15 +178,14 @@ void LwpCellRange::Read()
m_pObjStrm->SkipExtra();
}
-void LwpCellRange::Parse(IXFStream* /*pOutputStream*/)
+void LwpCellRange::Parse(IXFStream* /*pOutputStream*/) {}
+
+LwpFolder::LwpFolder(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
+ : LwpDLVList(objHdr, pStrm)
{
}
- LwpFolder::LwpFolder(LwpObjectHeader const &objHdr, LwpSvStream* pStrm):LwpDLVList(objHdr, pStrm)
-{}
-
-LwpFolder::~LwpFolder()
-{}
+LwpFolder::~LwpFolder() {}
void LwpFolder::Read()
{
@@ -212,18 +202,16 @@ void LwpFolder::Read()
m_pObjStrm->SkipExtra();
}
-void LwpFolder::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpFolder::Parse(IXFStream* /*pOutputStream*/) {}
-LwpDependent::LwpDependent(LwpObjectHeader const &objHdr, LwpSvStream* pStrm)
+LwpDependent::LwpDependent(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpDLVList(objHdr, pStrm)
, cReferenceOffset(0)
, cFlags(0)
-{}
+{
+}
-LwpDependent::~LwpDependent()
-{}
+LwpDependent::~LwpDependent() {}
void LwpDependent::Read()
{
@@ -231,27 +219,25 @@ void LwpDependent::Read()
cFormulaInfo.ReadIndexed(m_pObjStrm.get());
cReferenceOffset = m_pObjStrm->QuickReaduInt16();
- cFlags = static_cast<sal_uInt8>(m_pObjStrm->QuickReaduInt16()); // Written as lushort.
+ cFlags = static_cast<sal_uInt8>(m_pObjStrm->QuickReaduInt16()); // Written as lushort.
m_pObjStrm->SkipExtra();
}
-void LwpDependent::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpDependent::Parse(IXFStream* /*pOutputStream*/) {}
-void LwpRowSpecifier::QuickRead(LwpObjectStream *pStrm)
+void LwpRowSpecifier::QuickRead(LwpObjectStream* pStrm)
{
cRow = pStrm->QuickReaduInt16();
cQualifier.QuickRead(pStrm);
}
-void LwpColumnSpecifier::QuickRead(LwpObjectStream *pStrm)
+void LwpColumnSpecifier::QuickRead(LwpObjectStream* pStrm)
{
cColumn = static_cast<sal_uInt8>(pStrm->QuickReaduInt16());
cQualifier.QuickRead(pStrm);
}
-void LwpRowColumnQualifier::QuickRead(LwpObjectStream *pStrm)
+void LwpRowColumnQualifier::QuickRead(LwpObjectStream* pStrm)
{
// written as lushort for future flags
cFlags = static_cast<sal_uInt8>(pStrm->QuickReaduInt16());
diff --git a/lotuswordpro/source/filter/lwptoc.hxx b/lotuswordpro/source/filter/lwptoc.hxx
index 8516124c82c0..e22fcecf2878 100644
--- a/lotuswordpro/source/filter/lwptoc.hxx
+++ b/lotuswordpro/source/filter/lwptoc.hxx
@@ -70,22 +70,27 @@ class XFIndex;
class LwpTocSuperLayout final : public LwpSuperTableLayout
{
public:
- LwpTocSuperLayout(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpTocSuperLayout(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
virtual ~LwpTocSuperLayout() override;
void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
- virtual LWP_LAYOUT_TYPE GetLayoutType () override { return LWP_TOC_SUPERTABLE_LAYOUT;}
- virtual void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0, bool bAll = false) override;
+ virtual LWP_LAYOUT_TYPE GetLayoutType() override { return LWP_TOC_SUPERTABLE_LAYOUT; }
+ virtual void XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart = 0, sal_Int32 nEnd = 0,
+ bool bAll = false) override;
+
private:
void Read() override;
bool GetRightAlignPageNumber(sal_uInt16 index);
bool GetUsePageNumber(sal_uInt16 index);
sal_uInt16 GetSeparatorType(sal_uInt16 index);
- LwpTocLevelData * GetSearchLevelPtr(sal_uInt16 index);
- static LwpTocLevelData * GetNextSearchLevelPtr(sal_uInt16 index, LwpTocLevelData * pCurData);
- void AddSourceStyle(XFIndex* pToc, LwpTocLevelData * pLevel, LwpFoundry * pFoundry);
+ LwpTocLevelData* GetSearchLevelPtr(sal_uInt16 index);
+ static LwpTocLevelData* GetNextSearchLevelPtr(sal_uInt16 index, LwpTocLevelData* pCurData);
+ void AddSourceStyle(XFIndex* pToc, LwpTocLevelData* pLevel, LwpFoundry* pFoundry);
- enum {MAX_LEVELS = 9};
+ enum
+ {
+ MAX_LEVELS = 9
+ };
enum
{
TS_NOLEADERS = 0x01,
@@ -118,10 +123,10 @@ private:
CURRENTSECTION = 5
};
- LwpAtomHolder m_TextMarker; /* for selected text */
- LwpAtomHolder m_ParentName; /* for currentleveldivision */
- LwpAtomHolder m_DivisionName; /* for currentdivision&currentsection */
- LwpAtomHolder m_SectionName; /* for currentsection */
+ LwpAtomHolder m_TextMarker; /* for selected text */
+ LwpAtomHolder m_ParentName; /* for currentleveldivision */
+ LwpAtomHolder m_DivisionName; /* for currentdivision&currentsection */
+ LwpAtomHolder m_SectionName; /* for currentsection */
sal_uInt16 m_nFrom;
LwpDLVListHeadTail m_SearchItems;
LwpAtomHolder m_DestName[MAX_LEVELS];
@@ -144,13 +149,14 @@ public:
USETEXT = 0x01,
USENUMBER = 0x02
};
- LwpTocLevelData(LwpObjectHeader const &objHdr, LwpSvStream* pStrm);
+ LwpTocLevelData(LwpObjectHeader const& objHdr, LwpSvStream* pStrm);
void RegisterStyle() override;
virtual void XFConvert(XFContentContainer* pCont) override;
- sal_uInt16 GetLevel() const {return m_nLevel;}
- bool GetUseText() const { return (m_nFlags & USETEXT) != 0;}
- OUString const & GetSearchStyle() const {return m_SearchName.str();}
- bool GetUseLeadingText() const { return (m_nFlags & USENUMBER) != 0;}
+ sal_uInt16 GetLevel() const { return m_nLevel; }
+ bool GetUseText() const { return (m_nFlags & USETEXT) != 0; }
+ OUString const& GetSearchStyle() const { return m_SearchName.str(); }
+ bool GetUseLeadingText() const { return (m_nFlags & USENUMBER) != 0; }
+
private:
virtual ~LwpTocLevelData() override;
diff --git a/lotuswordpro/source/filter/lwpuidoc.cxx b/lotuswordpro/source/filter/lwpuidoc.cxx
index 8e26b0daea37..a65efe558dbb 100644
--- a/lotuswordpro/source/filter/lwpuidoc.cxx
+++ b/lotuswordpro/source/filter/lwpuidoc.cxx
@@ -60,16 +60,15 @@
#include "lwpuidoc.hxx"
-LwpUIDocument::LwpUIDocument(LwpObjectStream *pStrm)
+LwpUIDocument::LwpUIDocument(LwpObjectStream* pStrm)
: m_nFlags(DOC_LOCKED)
{
Read(pStrm);
}
-LwpUIDocument::~LwpUIDocument()
-{}
+LwpUIDocument::~LwpUIDocument() {}
-void LwpUIDocument::Read(LwpObjectStream *pStrm)
+void LwpUIDocument::Read(LwpObjectStream* pStrm)
{
LwpNamedProperties::Read(pStrm);
m_ARMacroOpts.Read(pStrm);
@@ -77,9 +76,9 @@ void LwpUIDocument::Read(LwpObjectStream *pStrm)
m_SheetFullPath.ReadPathAtom(pStrm);
sal_uInt16 saved_flags = pStrm->QuickReaduInt16();
- m_nFlags |= saved_flags;
+ m_nFlags |= saved_flags;
- if(pStrm->CheckExtra())
+ if (pStrm->CheckExtra())
{
m_InitialSaveAsType.Read(pStrm);
pStrm->SkipExtra();
@@ -88,7 +87,7 @@ void LwpUIDocument::Read(LwpObjectStream *pStrm)
/**
* @descr Read macro options from object stream
**/
-void LwpNamedProperties::Read(LwpObjectStream *pStrm)
+void LwpNamedProperties::Read(LwpObjectStream* pStrm)
{
sal_uInt16 numEntries = pStrm->QuickReaduInt16();
@@ -100,7 +99,7 @@ void LwpNamedProperties::Read(LwpObjectStream *pStrm)
/**
* @descr Read macro options from object stream
**/
-void LwpAutoRunMacroOptions::Read(LwpObjectStream *pStrm)
+void LwpAutoRunMacroOptions::Read(LwpObjectStream* pStrm)
{
m_OpenName.ReadPathAtom(pStrm);
m_CloseName.ReadPathAtom(pStrm);
@@ -111,7 +110,7 @@ void LwpAutoRunMacroOptions::Read(LwpObjectStream *pStrm)
/**
* @descr Read merge options from object stream
**/
-void LwpMergeOptions::Read(LwpObjectStream *pStrm)
+void LwpMergeOptions::Read(LwpObjectStream* pStrm)
{
m_RecordFile.ReadPathAtom(pStrm);
m_DescriptionFile.ReadPathAtom(pStrm);
diff --git a/lotuswordpro/source/filter/lwpuidoc.hxx b/lotuswordpro/source/filter/lwpuidoc.hxx
index 21fee29bacb4..055490d7bd59 100644
--- a/lotuswordpro/source/filter/lwpuidoc.hxx
+++ b/lotuswordpro/source/filter/lwpuidoc.hxx
@@ -77,7 +77,7 @@ class LwpNamedProperties
{
public:
LwpNamedProperties() = delete;
- static void Read(LwpObjectStream *pStrm);
+ static void Read(LwpObjectStream* pStrm);
};
/**
* @brief macro options contained in UIDocument structure
@@ -88,14 +88,17 @@ class LwpAutoRunMacroOptions
public:
LwpAutoRunMacroOptions()
: m_OptionFlag(0)
- {}
+ {
+ }
+
private:
LwpAtomHolder m_OpenName;
LwpAtomHolder m_CloseName;
LwpAtomHolder m_NewName;
sal_uInt16 m_OptionFlag;
+
public:
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
};
/**
* @brief Merge options contained in UIDocument structure
@@ -107,15 +110,17 @@ public:
LwpMergeOptions()
: m_nType(0)
, m_nLastActionFlag(0)
- {}
+ {
+ }
+
private:
LwpAtomHolder m_RecordFile;
LwpAtomHolder m_DescriptionFile;
LwpAtomHolder m_Filter;
sal_uInt16 m_nType;
- sal_uInt16 m_nLastActionFlag; // flag remembers last merge action
+ sal_uInt16 m_nLastActionFlag; // flag remembers last merge action
public:
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
};
/**
* @brief UIDocument structure contained in VO_DOCUMENT
@@ -124,18 +129,19 @@ public:
class LwpUIDocument
{
public:
- explicit LwpUIDocument(LwpObjectStream *pStrm);
+ explicit LwpUIDocument(LwpObjectStream* pStrm);
~LwpUIDocument();
+
private:
LwpAutoRunMacroOptions m_ARMacroOpts;
LwpMergeOptions m_MergedOpts;
- LwpAtomHolder m_SheetFullPath; // full path for style sheet
+ LwpAtomHolder m_SheetFullPath; // full path for style sheet
sal_uInt16 m_nFlags;
LwpAtomHolder m_InitialSaveAsType;
enum
{
- DOC_READONLY = 0x01,
- DOC_BLOCKSETS = 0x02,
+ DOC_READONLY = 0x01,
+ DOC_BLOCKSETS = 0x02,
DOC_LOCKED = 0x04,
DOC_ENVELOPE = 0x08,
DOC_EXTERNALFILE = 0x10,
@@ -143,8 +149,9 @@ private:
DOC_ANNOTATEONLY = 0x40,
DOC_CANCELED = 0x80
};
+
public:
- void Read(LwpObjectStream *pStrm);
+ void Read(LwpObjectStream* pStrm);
};
#endif
diff --git a/lotuswordpro/source/filter/lwpusrdicts.cxx b/lotuswordpro/source/filter/lwpusrdicts.cxx
index f4362368469e..d4a74e6f5789 100644
--- a/lotuswordpro/source/filter/lwpusrdicts.cxx
+++ b/lotuswordpro/source/filter/lwpusrdicts.cxx
@@ -61,19 +61,16 @@
#include "lwpusrdicts.hxx"
#include <lwpatomholder.hxx>
-LwpUserDictFiles::LwpUserDictFiles(LwpObjectStream *pStrm)
-{
- Read(pStrm);
-}
+LwpUserDictFiles::LwpUserDictFiles(LwpObjectStream* pStrm) { Read(pStrm); }
/**
* @descr Read UserDictFiles in VO_DOCUMENT
* words are skipped, not parsed yet
**/
-void LwpUserDictFiles::Read(LwpObjectStream *pStrm)
+void LwpUserDictFiles::Read(LwpObjectStream* pStrm)
{
sal_uInt16 cnt = pStrm->QuickReaduInt16();
LwpAtomHolder word;
- while(cnt--)
+ while (cnt--)
{
word.Read(pStrm);
pStrm->SkipExtra();
diff --git a/lotuswordpro/source/filter/lwpvpointer.cxx b/lotuswordpro/source/filter/lwpvpointer.cxx
index 29599e69fc97..c9da88a74dd5 100644
--- a/lotuswordpro/source/filter/lwpvpointer.cxx
+++ b/lotuswordpro/source/filter/lwpvpointer.cxx
@@ -56,25 +56,24 @@
#include "lwpvpointer.hxx"
#include <lwpfilehdr.hxx>
-LwpVersionedPointer::LwpVersionedPointer(LwpObjectHeader const & objHdr, LwpSvStream* pStrm)
+LwpVersionedPointer::LwpVersionedPointer(LwpObjectHeader const& objHdr, LwpSvStream* pStrm)
: LwpObject(objHdr, pStrm)
-{}
+{
+}
void LwpVersionedPointer::Read()
{
m_PointerID.ReadIndexed(m_pObjStrm.get());
- if( LwpFileHeader::m_nFileRevision < 0x0006 )
+ if (LwpFileHeader::m_nFileRevision < 0x0006)
m_pObjStrm->SkipExtra();
}
-void LwpVersionedPointer::Parse(IXFStream* /*pOutputStream*/)
-{
-}
+void LwpVersionedPointer::Parse(IXFStream* /*pOutputStream*/) {}
void LwpVersionedPointer::RegisterStyle()
{
rtl::Reference<LwpObject> pObj = m_PointerID.obj();
- if( pObj.is() )
+ if (pObj.is())
{
pObj->SetFoundry(m_pFoundry);
pObj->DoRegisterStyle();
diff --git a/lotuswordpro/source/filter/tocread.hxx b/lotuswordpro/source/filter/tocread.hxx
index 10e3adc3272a..46c09ee7379e 100644
--- a/lotuswordpro/source/filter/tocread.hxx
+++ b/lotuswordpro/source/filter/tocread.hxx
@@ -62,38 +62,38 @@
namespace OpenStormBento
{
-
class CBenTOCReader
{
public: // Methods
- explicit CBenTOCReader(LtcBenContainer * pContainer)
+ explicit CBenTOCReader(LtcBenContainer* pContainer)
: cpContainer(pContainer)
, cBlockSize(0)
, cCurr(0)
, cTOCSize(0)
- { }
+ {
+ }
BenError ReadLabelAndTOC();
private: // Methods
BenError ReadLabel(tools::ULong* pTOCOffset, tools::ULong* pTOCSize);
- BenError SearchForLabel(BenByte * pLabel);
+ BenError SearchForLabel(BenByte* pLabel);
BenError ReadTOC();
- BenError ReadSegments(CBenValue * pValue, BenByte * pLookAhead);
- BenError ReadSegment(CBenValue * pValue, BenByte * pLookAhead);
+ BenError ReadSegments(CBenValue* pValue, BenByte* pLookAhead);
+ BenError ReadSegment(CBenValue* pValue, BenByte* pLookAhead);
bool CanGetData(tools::ULong Amt);
- BenError GetByte(BenByte * pByte);
- BenError GetDWord(BenDWord * pDWord);
+ BenError GetByte(BenByte* pByte);
+ BenError GetDWord(BenDWord* pDWord);
BenByte GetCode();
BenError GetData(void* pBuffer, tools::ULong Amt);
private: // Data
- LtcBenContainer * cpContainer;
+ LtcBenContainer* cpContainer;
std::unique_ptr<BenByte[]> cpTOC;
tools::ULong cBlockSize;
tools::ULong cCurr;
tools::ULong cTOCSize;
};
-}//end namespace OpenStormBento
+} //end namespace OpenStormBento
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/ut.hxx b/lotuswordpro/source/filter/ut.hxx
index c499e9c7872e..4f5022976df9 100644
--- a/lotuswordpro/source/filter/ut.hxx
+++ b/lotuswordpro/source/filter/ut.hxx
@@ -55,20 +55,18 @@
************************************************************************/
#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_UT_HXX
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_UT_HXX
-# include <sal/types.h>
+#include <sal/types.h>
namespace OpenStormBento
{
+inline sal_uInt16 UtGetIntelWord(sal_uInt8 const* pData) { return pData[0] | pData[1] << 8; }
-inline sal_uInt16 UtGetIntelWord(sal_uInt8 const * pData)
-{ return pData[0] | pData[1] << 8; }
-
-inline sal_uInt32 UtGetIntelDWord(sal_uInt8 const * pData)
-{ return pData[0] | pData[1] << 8 | pData[2] << 16 | pData[3] << 24; }
-
-inline sal_uInt8 UtGetIntelByte(sal_uInt8 const * pData)
-{ return * pData; }
+inline sal_uInt32 UtGetIntelDWord(sal_uInt8 const* pData)
+{
+ return pData[0] | pData[1] << 8 | pData[2] << 16 | pData[3] << 24;
+}
+inline sal_uInt8 UtGetIntelByte(sal_uInt8 const* pData) { return *pData; }
}
#endif
diff --git a/lotuswordpro/source/filter/utbenvs.cxx b/lotuswordpro/source/filter/utbenvs.cxx
index e34a855e00eb..bb515c12fdc6 100644
--- a/lotuswordpro/source/filter/utbenvs.cxx
+++ b/lotuswordpro/source/filter/utbenvs.cxx
@@ -67,13 +67,12 @@ std::size_t LtcUtBenValueStream::GetData(void* pData, std::size_t nSize)
{
size_t AmtRead;
- /*BenError Err = */cpValue->ReadValueData(pData, cCurrentPosition, nSize,
- &AmtRead);
+ /*BenError Err = */ cpValue->ReadValueData(pData, cCurrentPosition, nSize, &AmtRead);
cCurrentPosition += AmtRead;
return AmtRead;
}
- /**
+/**
* Value stream write function, not supported now
* @param pointer of saved buffer
* @param size of buffer to be written
@@ -91,7 +90,7 @@ std::size_t LtcUtBenValueStream::PutData(const void* /*pData*/, std::size_t nSiz
* @param position in value stream
* @return current position in value stream
*/
-sal_uInt64 LtcUtBenValueStream::SeekPos(sal_uInt64 const nPos)
+sal_uInt64 LtcUtBenValueStream::SeekPos(sal_uInt64 const nPos)
{
if (nPos <= m_ulValueLength)
cCurrentPosition = nPos;
@@ -104,7 +103,7 @@ sal_uInt64 LtcUtBenValueStream::SeekPos(sal_uInt64 const nPos)
* @param size of buffer
* @return
*/
- void LtcUtBenValueStream::SetSize( sal_uInt64 /*nSize*/ )
+void LtcUtBenValueStream::SetSize(sal_uInt64 /*nSize*/)
{
//pLtcBenContainer pContainer = cpValue->GetContainer();
//pContainer->GetStream()->SetStreamSize(nSize);
@@ -112,7 +111,7 @@ sal_uInt64 LtcUtBenValueStream::SeekPos(sal_uInt64 const nPos)
/**
* Flush data function, not supported now
*/
-void LtcUtBenValueStream::FlushData()
+void LtcUtBenValueStream::FlushData()
{
/* Because we only support IMPORT filter, FlushData implementation is ignored
It won't bring negative influence to read-only stream object
@@ -123,17 +122,16 @@ void LtcUtBenValueStream::FlushData()
/**
* Construction
*/
-LtcUtBenValueStream::LtcUtBenValueStream(CBenValue * pValue)
- : cpValue(pValue),
+LtcUtBenValueStream::LtcUtBenValueStream(CBenValue* pValue)
+ : cpValue(pValue)
+ ,
// Calculate the length of the whole value stream
- cCurrentPosition(0),
- m_ulValueLength(pValue->GetValueSize())
+ cCurrentPosition(0)
+ , m_ulValueLength(pValue->GetValueSize())
{
}
-LtcUtBenValueStream::~LtcUtBenValueStream()
-{
-}
+LtcUtBenValueStream::~LtcUtBenValueStream() {}
} // end namespace OpenStormBento
diff --git a/lotuswordpro/source/filter/utlist.cxx b/lotuswordpro/source/filter/utlist.cxx
index 8f44cdb2f816..7b0f4c9fe7c0 100644
--- a/lotuswordpro/source/filter/utlist.cxx
+++ b/lotuswordpro/source/filter/utlist.cxx
@@ -56,8 +56,7 @@
#include "utlist.hxx"
namespace OpenStormBento
{
-
-CUtListElmt::CUtListElmt(CUtList * pList)
+CUtListElmt::CUtListElmt(CUtList* pList)
: cpNext(nullptr)
, cpPrev(nullptr)
{
@@ -77,9 +76,9 @@ CUtListElmt::~CUtListElmt()
CUtList::~CUtList()
{
CUtListElmt& rTerminating = GetTerminating();
- for (CUtListElmt * pCurr = GetFirst(); pCurr != &rTerminating; )
+ for (CUtListElmt* pCurr = GetFirst(); pCurr != &rTerminating;)
{
- CUtListElmt * pNext = pCurr->GetNext();
+ CUtListElmt* pNext = pCurr->GetNext();
pCurr->MakeNotOnList();
pCurr = pNext;
}
@@ -90,35 +89,31 @@ CUtList::~CUtList()
// If pCurr is NULL, returns first item in list. Otherwise, returns item
// in list after pCurr or NULL if no more items in list. Terminating item
// is never returned
-CUtListElmt *
-CUtList::GetNextOrNULL(CUtListElmt const * pCurr)
+CUtListElmt* CUtList::GetNextOrNULL(CUtListElmt const* pCurr)
{
- CUtListElmt * pNext;
+ CUtListElmt* pNext;
if (pCurr == nullptr)
pNext = GetFirst();
- else pNext = pCurr->GetNext();
+ else
+ pNext = pCurr->GetNext();
if (pNext == &GetTerminating())
pNext = nullptr;
return pNext;
}
-void
-CUtList::Destroy()
+void CUtList::Destroy()
{
CUtListElmt& rTerminating = GetTerminating();
- for (CUtListElmt * pCurr = GetFirst(); pCurr != &rTerminating; )
+ for (CUtListElmt* pCurr = GetFirst(); pCurr != &rTerminating;)
{
- CUtListElmt * pNext = pCurr->GetNext();
+ CUtListElmt* pNext = pCurr->GetNext();
delete pCurr;
pCurr = pNext;
}
}
-CUtOwningList::~CUtOwningList()
-{
- Destroy();
-}
-}//end namespace OpenStormBento
+CUtOwningList::~CUtOwningList() { Destroy(); }
+} //end namespace OpenStormBento
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/utlist.hxx b/lotuswordpro/source/filter/utlist.hxx
index 3528fcacba47..5820ba1074b6 100644
--- a/lotuswordpro/source/filter/utlist.hxx
+++ b/lotuswordpro/source/filter/utlist.hxx
@@ -58,7 +58,6 @@
namespace OpenStormBento
{
-
class CUtList;
class CUtListElmt
@@ -67,17 +66,18 @@ public: // Methods
CUtListElmt()
: cpNext(nullptr)
, cpPrev(nullptr)
- {}
- explicit CUtListElmt(CUtListElmt * pPrev) { InsertAfter(pPrev); }
- explicit CUtListElmt(CUtList * pList);
+ {
+ }
+ explicit CUtListElmt(CUtListElmt* pPrev) { InsertAfter(pPrev); }
+ explicit CUtListElmt(CUtList* pList);
virtual ~CUtListElmt();
void MakeNotOnList() { cpNext = nullptr; } // Same as Remove but doesn't
- // patch up list
- CUtListElmt * GetNext() const { return cpNext; }
- void SetNext(CUtListElmt * pNext) { cpNext = pNext; }
- CUtListElmt * GetPrev() const { return cpPrev; }
- void SetPrev(CUtListElmt * pPrev) { cpPrev = pPrev; }
- void InsertAfter(CUtListElmt * pPrev)
+ // patch up list
+ CUtListElmt* GetNext() const { return cpNext; }
+ void SetNext(CUtListElmt* pNext) { cpNext = pNext; }
+ CUtListElmt* GetPrev() const { return cpPrev; }
+ void SetPrev(CUtListElmt* pPrev) { cpPrev = pPrev; }
+ void InsertAfter(CUtListElmt* pPrev)
{
cpNext = pPrev->cpNext;
cpPrev = pPrev;
@@ -86,22 +86,23 @@ public: // Methods
}
private: // Data
- CUtListElmt * cpNext;
- CUtListElmt * cpPrev;
+ CUtListElmt* cpNext;
+ CUtListElmt* cpPrev;
};
class CUtList
{
public: // Methods
- CUtList() {
+ CUtList()
+ {
cDummyElmt.SetNext(&cDummyElmt);
cDummyElmt.SetPrev(&cDummyElmt);
}
virtual ~CUtList();
- CUtListElmt * GetFirst() { return cDummyElmt.GetNext(); }
- CUtListElmt * GetLast() { return cDummyElmt.GetPrev(); }
+ CUtListElmt* GetFirst() { return cDummyElmt.GetNext(); }
+ CUtListElmt* GetLast() { return cDummyElmt.GetPrev(); }
CUtListElmt& GetTerminating() { return cDummyElmt; }
- CUtListElmt * GetNextOrNULL(CUtListElmt const * pCurr);
+ CUtListElmt* GetNextOrNULL(CUtListElmt const* pCurr);
void Destroy();
@@ -114,7 +115,7 @@ class CUtOwningList : public CUtList
public: // Methods
virtual ~CUtOwningList() override;
};
-}//end namespace OpenStormBento
+} //end namespace OpenStormBento
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx b/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx
index c0d96851ec8f..c44720a6bd3a 100644
--- a/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx
@@ -60,35 +60,27 @@
#include <xfilter/xfcolstyle.hxx>
#include <xfilter/ixfattrlist.hxx>
-XFColStyle::XFColStyle()
-{
- m_fWidth = 0;
-}
+XFColStyle::XFColStyle() { m_fWidth = 0; }
-XFColStyle::~XFColStyle()
-{
-}
+XFColStyle::~XFColStyle() {}
-enumXFStyle XFColStyle::GetStyleFamily()
-{
- return enumXFStyleTableCol;
-}
+enumXFStyle XFColStyle::GetStyleFamily() { return enumXFStyleTableCol; }
-void XFColStyle::ToXml(IXFStream *pStrm)
+void XFColStyle::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "style:name", GetStyleName() );
- pAttrList->AddAttribute( "style:family", "table-column" );
- pStrm->StartElement( "style:style" );
+ pAttrList->AddAttribute("style:name", GetStyleName());
+ pAttrList->AddAttribute("style:family", "table-column");
+ pStrm->StartElement("style:style");
pAttrList->Clear();
- pAttrList->AddAttribute( "style:column-width", OUString::number(m_fWidth) + "cm" );
- pStrm->StartElement( "style:properties" );
- pStrm->EndElement( "style:properties" );
+ pAttrList->AddAttribute("style:column-width", OUString::number(m_fWidth) + "cm");
+ pStrm->StartElement("style:properties");
+ pStrm->EndElement("style:properties");
- pStrm->EndElement( "style:style" );
+ pStrm->EndElement("style:style");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx b/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
index 343ec4275464..8d669c90ece5 100644
--- a/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
@@ -59,36 +59,32 @@
************************************************************************/
#include <xfilter/xfconfigmanager.hxx>
-XFConfigManager::XFConfigManager()
-{
-}
+XFConfigManager::XFConfigManager() {}
-XFConfigManager::~XFConfigManager()
-{
-}
+XFConfigManager::~XFConfigManager() {}
-void XFConfigManager::SetLineNumberConfig(XFLineNumberConfig *pLNConfig)
+void XFConfigManager::SetLineNumberConfig(XFLineNumberConfig* pLNConfig)
{
- m_pLineNumberConfig.reset( pLNConfig );
+ m_pLineNumberConfig.reset(pLNConfig);
}
-void XFConfigManager::SetFootnoteConfig(XFFootnoteConfig *pFNConfig)
+void XFConfigManager::SetFootnoteConfig(XFFootnoteConfig* pFNConfig)
{
- m_pFootnoteConfig.reset( pFNConfig );
+ m_pFootnoteConfig.reset(pFNConfig);
}
-void XFConfigManager::SetEndnoteConfig(XFEndnoteConfig *pENConfig)
+void XFConfigManager::SetEndnoteConfig(XFEndnoteConfig* pENConfig)
{
- m_pEndnoteConfig.reset( pENConfig );
+ m_pEndnoteConfig.reset(pENConfig);
}
-void XFConfigManager::ToXml(IXFStream *pStrm)
+void XFConfigManager::ToXml(IXFStream* pStrm)
{
- if( m_pLineNumberConfig )
+ if (m_pLineNumberConfig)
AddStyle(std::move(m_pLineNumberConfig));
- if( m_pFootnoteConfig )
+ if (m_pFootnoteConfig)
AddStyle(std::move(m_pFootnoteConfig));
- if( m_pEndnoteConfig )
+ if (m_pEndnoteConfig)
AddStyle(std::move(m_pEndnoteConfig));
XFStyleContainer::ToXml(pStrm);
diff --git a/lotuswordpro/source/filter/xfilter/xfcrossref.cxx b/lotuswordpro/source/filter/xfilter/xfcrossref.cxx
index dfd065a61bd8..e0405261101f 100644
--- a/lotuswordpro/source/filter/xfilter/xfcrossref.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcrossref.cxx
@@ -69,41 +69,32 @@ XFCrossRefStart::XFCrossRefStart()
{
}
-XFCrossRefStart::~XFCrossRefStart()
-{
-}
+XFCrossRefStart::~XFCrossRefStart() {}
-void XFCrossRefStart::ToXml(IXFStream *pStrm)
+void XFCrossRefStart::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- if( m_nType == CROSSREF_TEXT)
+ if (m_nType == CROSSREF_TEXT)
{
- pAttrList->AddAttribute( "text:reference-format","text" );
+ pAttrList->AddAttribute("text:reference-format", "text");
}
- else if( m_nType == CROSSREF_PAGE )
+ else if (m_nType == CROSSREF_PAGE)
{
- pAttrList->AddAttribute( "text:reference-format", "page" );
+ pAttrList->AddAttribute("text:reference-format", "page");
}
- else if( m_nType == CROSSREF_PARANUMBER )
+ else if (m_nType == CROSSREF_PARANUMBER)
{
- pAttrList->AddAttribute( "text:reference-format", "chapter" );
+ pAttrList->AddAttribute("text:reference-format", "chapter");
}
- pAttrList->AddAttribute( "text:ref-name", m_strMarkName);
- pStrm->StartElement( "text:bookmark-ref" );
+ pAttrList->AddAttribute("text:ref-name", m_strMarkName);
+ pStrm->StartElement("text:bookmark-ref");
}
-XFCrossRefEnd::XFCrossRefEnd()
-{
-}
+XFCrossRefEnd::XFCrossRefEnd() {}
-XFCrossRefEnd::~XFCrossRefEnd()
-{
-}
+XFCrossRefEnd::~XFCrossRefEnd() {}
-void XFCrossRefEnd::ToXml(IXFStream *pStrm)
-{
- pStrm->EndElement( "text:bookmark-ref" );
-}
+void XFCrossRefEnd::ToXml(IXFStream* pStrm) { pStrm->EndElement("text:bookmark-ref"); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx
index 045054399510..4f086032f2c2 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx
@@ -65,33 +65,31 @@ XFDrawAreaStyle::XFDrawAreaStyle()
, m_eLineStyle(enumXFAreaLineSingle)
, m_nAngle(0)
, m_fSpace(0.18)
-{}
-
-enumXFStyle XFDrawAreaStyle::GetStyleFamily()
{
- return enumXFStyleArea;
}
-void XFDrawAreaStyle::ToXml(IXFStream *pStrm)
+enumXFStyle XFDrawAreaStyle::GetStyleFamily() { return enumXFStyleArea; }
+
+void XFDrawAreaStyle::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "draw:name", GetStyleName() );
+ pAttrList->AddAttribute("draw:name", GetStyleName());
- if( m_eLineStyle == enumXFAreaLineSingle )
- pAttrList->AddAttribute( "draw:style", "single" );
- else if( m_eLineStyle == enumXFAreaLineCrossed )
- pAttrList->AddAttribute( "draw:style", "double" );
- else if( m_eLineStyle == enumXFAreaLineTriple )
- pAttrList->AddAttribute( "draw:style", "triple" );
+ if (m_eLineStyle == enumXFAreaLineSingle)
+ pAttrList->AddAttribute("draw:style", "single");
+ else if (m_eLineStyle == enumXFAreaLineCrossed)
+ pAttrList->AddAttribute("draw:style", "double");
+ else if (m_eLineStyle == enumXFAreaLineTriple)
+ pAttrList->AddAttribute("draw:style", "triple");
- pAttrList->AddAttribute( "draw:color", m_aLineColor.ToString() );
- pAttrList->AddAttribute( "draw:rotation", OUString::number(m_nAngle*10) );
- pAttrList->AddAttribute( "draw:distance", OUString::number(m_fSpace)+"cm" );
+ pAttrList->AddAttribute("draw:color", m_aLineColor.ToString());
+ pAttrList->AddAttribute("draw:rotation", OUString::number(m_nAngle * 10));
+ pAttrList->AddAttribute("draw:distance", OUString::number(m_fSpace) + "cm");
- pStrm->StartElement( "draw:hatch" );
- pStrm->EndElement( "draw:hatch" );
+ pStrm->StartElement("draw:hatch");
+ pStrm->EndElement("draw:hatch");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx
index 4c9b4e066ba4..575e6184cf43 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx
@@ -69,52 +69,49 @@ XFDrawLineStyle::XFDrawLineStyle()
, m_fSpace(0)
, m_fLength1(0)
, m_fLength2(0)
-{}
-
-enumXFStyle XFDrawLineStyle::GetStyleFamily()
{
- return enumXFStyleStrokeDash;
}
-void XFDrawLineStyle::ToXml(IXFStream *pStrm)
+enumXFStyle XFDrawLineStyle::GetStyleFamily() { return enumXFStyleStrokeDash; }
+
+void XFDrawLineStyle::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "draw:name", GetStyleName());
+ pAttrList->AddAttribute("draw:name", GetStyleName());
//simple place here:
- pAttrList->AddAttribute( "draw:style", "rect");
+ pAttrList->AddAttribute("draw:style", "rect");
- if( m_eLineStyle == enumXFLineDot )
+ if (m_eLineStyle == enumXFLineDot)
{
-
}
- else if( m_eLineStyle == enumXFLineDash )
+ else if (m_eLineStyle == enumXFLineDash)
{
- pAttrList->AddAttribute( "draw:dots1", OUString::number(m_nNumber1));
- pAttrList->AddAttribute( " draw:dots1-length", OUString::number(m_fLength1) + "cm");
+ pAttrList->AddAttribute("draw:dots1", OUString::number(m_nNumber1));
+ pAttrList->AddAttribute(" draw:dots1-length", OUString::number(m_fLength1) + "cm");
- pAttrList->AddAttribute( "draw:dots2", OUString::number(m_nNumber2));
- pAttrList->AddAttribute( " draw:dots2-length", OUString::number(m_fLength2) + "cm");
+ pAttrList->AddAttribute("draw:dots2", OUString::number(m_nNumber2));
+ pAttrList->AddAttribute(" draw:dots2-length", OUString::number(m_fLength2) + "cm");
}
- else if( m_eLineStyle == enumXFLineDotDash )
+ else if (m_eLineStyle == enumXFLineDotDash)
{
- pAttrList->AddAttribute( "draw:dots1", OUString::number(m_nNumber1));
+ pAttrList->AddAttribute("draw:dots1", OUString::number(m_nNumber1));
- pAttrList->AddAttribute( "draw:dots2", OUString::number(m_nNumber2));
- pAttrList->AddAttribute( " draw:dots2-length", OUString::number(m_fLength2) + "cm");
+ pAttrList->AddAttribute("draw:dots2", OUString::number(m_nNumber2));
+ pAttrList->AddAttribute(" draw:dots2-length", OUString::number(m_fLength2) + "cm");
}
- else if( m_eLineStyle == enumXFLineDashDot )
+ else if (m_eLineStyle == enumXFLineDashDot)
{
- pAttrList->AddAttribute( "draw:dots1", OUString::number(m_nNumber1));
- pAttrList->AddAttribute( " draw:dots1-length", OUString::number(m_fLength1) + "cm");
+ pAttrList->AddAttribute("draw:dots1", OUString::number(m_nNumber1));
+ pAttrList->AddAttribute(" draw:dots1-length", OUString::number(m_fLength1) + "cm");
- pAttrList->AddAttribute( "draw:dots2", OUString::number(m_nNumber2));
+ pAttrList->AddAttribute("draw:dots2", OUString::number(m_nNumber2));
}
- pAttrList->AddAttribute( "draw:distance", OUString::number(m_fSpace) + "cm" );
+ pAttrList->AddAttribute("draw:distance", OUString::number(m_fSpace) + "cm");
- pStrm->StartElement( "draw:stroke-dash" );
- pStrm->EndElement( "draw:stroke-dash" );
+ pStrm->StartElement("draw:stroke-dash");
+ pStrm->EndElement("draw:stroke-dash");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx b/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx
index 53fd9ff52180..6f613b1533fd 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx
@@ -60,20 +60,18 @@
#include <xfilter/xfdrawrect.hxx>
#include <xfilter/ixfattrlist.hxx>
-XFDrawRect::XFDrawRect()
-{
-}
+XFDrawRect::XFDrawRect() {}
-void XFDrawRect::ToXml(IXFStream *pStrm)
+void XFDrawRect::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
XFDrawObject::ToXml(pStrm);
- pStrm->StartElement( "draw:rect" );
+ pStrm->StartElement("draw:rect");
ContentToXml(pStrm);
- pStrm->EndElement( "draw:rect" );
+ pStrm->EndElement("draw:rect");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfentry.cxx b/lotuswordpro/source/filter/xfilter/xfentry.cxx
index fb71ff40f7e6..d252cc2bc7cf 100644
--- a/lotuswordpro/source/filter/xfilter/xfentry.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfentry.cxx
@@ -67,40 +67,41 @@
XFEntry::XFEntry()
: m_eType(enumXFEntryTOC)
, m_nOutlineLevel(1)
-{}
+{
+}
-void XFEntry::ToXml(IXFStream *pStrm)
+void XFEntry::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "text:string-value", m_strValue );
+ pAttrList->AddAttribute("text:string-value", m_strValue);
- if( m_eType == enumXFEntryTOC )
+ if (m_eType == enumXFEntryTOC)
{
- pAttrList->AddAttribute( "text:outline-level", OUString::number(m_nOutlineLevel) );
- pStrm->StartElement( "text:toc-mark" );
-// pStrm->Characters(m_strDisplay);
- pStrm->EndElement( "text:toc-mark" );
+ pAttrList->AddAttribute("text:outline-level", OUString::number(m_nOutlineLevel));
+ pStrm->StartElement("text:toc-mark");
+ // pStrm->Characters(m_strDisplay);
+ pStrm->EndElement("text:toc-mark");
}
- else if( m_eType == enumXFEntryAlphabetical )
+ else if (m_eType == enumXFEntryAlphabetical)
{
- pAttrList->AddAttribute( "text:key1", m_strKey1 );
- if( !m_strKey2.isEmpty() )
- pAttrList->AddAttribute( "text:key2", m_strKey2 );
+ pAttrList->AddAttribute("text:key1", m_strKey1);
+ if (!m_strKey2.isEmpty())
+ pAttrList->AddAttribute("text:key2", m_strKey2);
- pStrm->StartElement( "text:alphabetical-index-mark" );
-// pStrm->Characters(m_strDisplay);
- pStrm->EndElement( "text:alphabetical-index-mark" );
+ pStrm->StartElement("text:alphabetical-index-mark");
+ // pStrm->Characters(m_strDisplay);
+ pStrm->EndElement("text:alphabetical-index-mark");
}
- else if( m_eType == enumXFEntryUserIndex )
+ else if (m_eType == enumXFEntryUserIndex)
{
- pAttrList->AddAttribute( "text:outline-level", OUString::number(m_nOutlineLevel) );
- pAttrList->AddAttribute( "text:index-name", m_strName );
+ pAttrList->AddAttribute("text:outline-level", OUString::number(m_nOutlineLevel));
+ pAttrList->AddAttribute("text:index-name", m_strName);
- pStrm->StartElement( "text:user-index-mark" );
-// pStrm->Characters(m_strDisplay);
- pStrm->EndElement( "text:user-index-mark" );
+ pStrm->StartElement("text:user-index-mark");
+ // pStrm->Characters(m_strDisplay);
+ pStrm->EndElement("text:user-index-mark");
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xffontfactory.cxx b/lotuswordpro/source/filter/xfilter/xffontfactory.cxx
index a3eb1d921142..30a682433607 100644
--- a/lotuswordpro/source/filter/xfilter/xffontfactory.cxx
+++ b/lotuswordpro/source/filter/xfilter/xffontfactory.cxx
@@ -59,24 +59,17 @@
************************************************************************/
#include <xfilter/xffontfactory.hxx>
-XFFontFactory::XFFontFactory()
-{
-}
+XFFontFactory::XFFontFactory() {}
-XFFontFactory::~XFFontFactory()
-{
-}
+XFFontFactory::~XFFontFactory() {}
-void XFFontFactory::AddFont(rtl::Reference<XFFont> const & pFont)
-{
- s_aFonts.push_back( pFont );
-}
+void XFFontFactory::AddFont(rtl::Reference<XFFont> const& pFont) { s_aFonts.push_back(pFont); }
-rtl::Reference<XFFont> XFFontFactory::FindSameFont(rtl::Reference<XFFont> const & pFont)
+rtl::Reference<XFFont> XFFontFactory::FindSameFont(rtl::Reference<XFFont> const& pFont)
{
for (auto const& font : s_aFonts)
{
- if( *pFont == *font )
+ if (*pFont == *font)
return font;
}
diff --git a/lotuswordpro/source/filter/xfilter/xflist.cxx b/lotuswordpro/source/filter/xfilter/xflist.cxx
index bb683f13ede3..ae61aef6c961 100644
--- a/lotuswordpro/source/filter/xfilter/xflist.cxx
+++ b/lotuswordpro/source/filter/xfilter/xflist.cxx
@@ -67,32 +67,30 @@ XFList::XFList()
m_bContinueNumber = false;
}
-XFList::~XFList()
-{
-}
+XFList::~XFList() {}
-void XFList::ToXml(IXFStream *pStrm)
+void XFList::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
- assert(nullptr!=pAttrList);
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
+ assert(nullptr != pAttrList);
pAttrList->Clear();
- if( !GetStyleName().isEmpty() )
- pAttrList->AddAttribute( "text:style-name", GetStyleName() );
- if( m_bContinueNumber )
- pAttrList->AddAttribute( "text:continue-numbering", "true" );
+ if (!GetStyleName().isEmpty())
+ pAttrList->AddAttribute("text:style-name", GetStyleName());
+ if (m_bContinueNumber)
+ pAttrList->AddAttribute("text:continue-numbering", "true");
- if( m_bOrdered )
- pStrm->StartElement( "text:ordered-list" );
+ if (m_bOrdered)
+ pStrm->StartElement("text:ordered-list");
else
- pStrm->StartElement( "text:unordered-list" );
+ pStrm->StartElement("text:unordered-list");
XFContentContainer::ToXml(pStrm);
- if( m_bOrdered )
- pStrm->EndElement( "text:ordered-list" );
+ if (m_bOrdered)
+ pStrm->EndElement("text:ordered-list");
else
- pStrm->EndElement( "text:unordered-list" );
+ pStrm->EndElement("text:unordered-list");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
index 8cc28d305e2e..29eb8a9e7b33 100644
--- a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
@@ -61,38 +61,26 @@
#include <xfilter/xffooter.hxx>
#include <xfilter/xfheader.hxx>
-void XFMasterPage::SetHeader(rtl::Reference<XFHeader> const & rHeader)
-{
- m_xHeader = rHeader;
-}
+void XFMasterPage::SetHeader(rtl::Reference<XFHeader> const& rHeader) { m_xHeader = rHeader; }
-void XFMasterPage::SetFooter(rtl::Reference<XFFooter> const & rFooter)
-{
- m_xFooter = rFooter;
-}
+void XFMasterPage::SetFooter(rtl::Reference<XFFooter> const& rFooter) { m_xFooter = rFooter; }
-enumXFStyle XFMasterPage::GetStyleFamily()
-{
- return enumXFStyleMasterPage;
-}
+enumXFStyle XFMasterPage::GetStyleFamily() { return enumXFStyleMasterPage; }
-void XFMasterPage::SetPageMaster(const OUString& pm)
-{
- m_strPageMaster = pm;
-}
+void XFMasterPage::SetPageMaster(const OUString& pm) { m_strPageMaster = pm; }
-void XFMasterPage::ToXml(IXFStream *pStrm)
+void XFMasterPage::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "style:name", m_strStyleName );
- pAttrList->AddAttribute( "style:page-master-name", m_strPageMaster );
- pStrm->StartElement( "style:master-page" );
+ pAttrList->AddAttribute("style:name", m_strStyleName);
+ pAttrList->AddAttribute("style:page-master-name", m_strPageMaster);
+ pStrm->StartElement("style:master-page");
if (m_xHeader)
m_xHeader->ToXml(pStrm);
if (m_xFooter)
m_xFooter->ToXml(pStrm);
- pStrm->EndElement( "style:master-page" );
+ pStrm->EndElement("style:master-page");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfparagraph.cxx b/lotuswordpro/source/filter/xfilter/xfparagraph.cxx
index 0b600cb669a2..bc070e36a23e 100644
--- a/lotuswordpro/source/filter/xfilter/xfparagraph.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfparagraph.cxx
@@ -61,19 +61,11 @@
#include <xfilter/ixfstream.hxx>
#include <xfilter/ixfattrlist.hxx>
-XFParagraph::XFParagraph()
-{
+XFParagraph::XFParagraph() {}
-}
+XFParagraph::~XFParagraph() {}
-XFParagraph::~XFParagraph()
-{
-}
-
-enumXFContent XFParagraph::GetContentType()
-{
- return enumXFContentPara;
-}
+enumXFContent XFParagraph::GetContentType() { return enumXFContentPara; }
/**
* The paragraph object serial function,the output will be like:
@@ -83,25 +75,22 @@ enumXFContent XFParagraph::GetContentType()
* <text:span text:style-name="T1">text content</text:span>
* </text:p>
*/
-void XFParagraph::ToXml(IXFStream *pStrm)
+void XFParagraph::ToXml(IXFStream* pStrm)
{
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
assert(pAttrList);
pAttrList->Clear();
- if( !GetStyleName().isEmpty() )
- pAttrList->AddAttribute( "text:style-name", GetStyleName() );
- pStrm->StartElement( "text:p" );
+ if (!GetStyleName().isEmpty())
+ pAttrList->AddAttribute("text:style-name", GetStyleName());
+ pStrm->StartElement("text:p");
XFContentContainer::ToXml(pStrm);
- pStrm->EndElement( "text:p" );
+ pStrm->EndElement("text:p");
}
-bool XFParagraph::HasContents() const
-{
- return GetCount()>0;
-}
+bool XFParagraph::HasContents() const { return GetCount() > 0; }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx b/lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx
index 5bd78fb82190..6a12bcfc6925 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx
@@ -60,23 +60,19 @@
#include "xfsaxattrlist.hxx"
#include <xmloff/attrlist.hxx>
-XFSaxAttrList::XFSaxAttrList() : m_xSvAttrList(new SvXMLAttributeList())
+XFSaxAttrList::XFSaxAttrList()
+ : m_xSvAttrList(new SvXMLAttributeList())
{
}
-XFSaxAttrList::~XFSaxAttrList()
-{
-}
+XFSaxAttrList::~XFSaxAttrList() {}
void XFSaxAttrList::AddAttribute(const OUString& name, const OUString& value)
{
- m_xSvAttrList->AddAttribute(name,value);
+ m_xSvAttrList->AddAttribute(name, value);
}
-void XFSaxAttrList::Clear()
-{
- m_xSvAttrList->Clear();
-}
+void XFSaxAttrList::Clear() { m_xSvAttrList->Clear(); }
css::uno::Reference<css::xml::sax::XAttributeList> XFSaxAttrList::GetAttributeList() const
{
diff --git a/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx b/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
index 74db79e9b669..4a727727d353 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
@@ -64,7 +64,7 @@
#include <rtl/ref.hxx>
#include <xmloff/attrlist.hxx>
-class XFSaxAttrList : public IXFAttrList
+class XFSaxAttrList : public IXFAttrList
{
public:
XFSaxAttrList();
@@ -73,16 +73,16 @@ public:
public:
//Interface ISaxAttributeList:
- virtual void AddAttribute(const OUString& name, const OUString& value) override;
+ virtual void AddAttribute(const OUString& name, const OUString& value) override;
- virtual void Clear() override;
+ virtual void Clear() override;
css::uno::Reference<css::xml::sax::XAttributeList> GetAttributeList() const;
friend class XFSaxStream;
-private:
- rtl::Reference<SvXMLAttributeList> m_xSvAttrList;
+private:
+ rtl::Reference<SvXMLAttributeList> m_xSvAttrList;
};
#endif //XFSAXATTRLIST_INC
diff --git a/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx b/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
index ecdf4d6e006f..700161df2e2d 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
@@ -75,53 +75,48 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::uno;
-XFSaxStream::XFSaxStream(Reference<XDocumentHandler> const & xHandler)
+XFSaxStream::XFSaxStream(Reference<XDocumentHandler> const& xHandler)
{
m_aHandler = xHandler;
- m_pAttrList.reset(new XFSaxAttrList );
+ m_pAttrList.reset(new XFSaxAttrList);
}
-XFSaxStream::~XFSaxStream()
-{
-}
+XFSaxStream::~XFSaxStream() {}
-void XFSaxStream::StartDocument()
+void XFSaxStream::StartDocument()
{
if (m_aHandler.is())
m_aHandler->startDocument();
}
-void XFSaxStream::EndDocument()
+void XFSaxStream::EndDocument()
{
if (m_aHandler.is())
m_aHandler->endDocument();
}
-void XFSaxStream::StartElement(const OUString& oustr)
+void XFSaxStream::StartElement(const OUString& oustr)
{
if (m_aHandler.is())
- m_aHandler->startElement( oustr, m_pAttrList->GetAttributeList() );
+ m_aHandler->startElement(oustr, m_pAttrList->GetAttributeList());
m_pAttrList->Clear();
}
-void XFSaxStream::EndElement(const OUString& oustr)
+void XFSaxStream::EndElement(const OUString& oustr)
{
if (m_aHandler.is())
m_aHandler->endElement(oustr);
- if( m_pAttrList )
+ if (m_pAttrList)
m_pAttrList->Clear();
}
-void XFSaxStream::Characters(const OUString& oustr)
+void XFSaxStream::Characters(const OUString& oustr)
{
if (m_aHandler.is())
m_aHandler->characters(oustr);
}
-IXFAttrList* XFSaxStream::GetAttrList()
-{
- return m_pAttrList.get();
-}
+IXFAttrList* XFSaxStream::GetAttrList() { return m_pAttrList.get(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfsection.cxx b/lotuswordpro/source/filter/xfilter/xfsection.cxx
index dd503bb6896f..994f9227c780 100644
--- a/lotuswordpro/source/filter/xfilter/xfsection.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsection.cxx
@@ -61,42 +61,36 @@
#include <xfilter/xfglobal.hxx>
#include <xfilter/ixfattrlist.hxx>
-XFSection::XFSection()
-{
- m_strSectionName = XFGlobal::GenSectionName();
-}
+XFSection::XFSection() { m_strSectionName = XFGlobal::GenSectionName(); }
-XFSection::~XFSection()
-{
-}
+XFSection::~XFSection() {}
-void XFSection::ToXml(IXFStream *pStrm)
+void XFSection::ToXml(IXFStream* pStrm)
{
- assert(!m_strSectionName.isEmpty() );
+ assert(!m_strSectionName.isEmpty());
- IXFAttrList *pAttrList = pStrm->GetAttrList();
+ IXFAttrList* pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
OUString style = GetStyleName();
- if( !style.isEmpty() )
- pAttrList->AddAttribute( "text:style-name", style);
+ if (!style.isEmpty())
+ pAttrList->AddAttribute("text:style-name", style);
//section name
- if( !m_strSectionName.isEmpty() )
- pAttrList->AddAttribute( "text:name", m_strSectionName);
+ if (!m_strSectionName.isEmpty())
+ pAttrList->AddAttribute("text:name", m_strSectionName);
- pStrm->StartElement( "text:section" );
- if( !m_strSourceLink.isEmpty() )
+ pStrm->StartElement("text:section");
+ if (!m_strSourceLink.isEmpty())
{
pAttrList->Clear();
- pAttrList->AddAttribute( "xlink:href", m_strSourceLink);
- pAttrList->AddAttribute( "text:filter-name", "wordpro");
- pStrm->StartElement( "text:section-source" );
- pStrm->EndElement( "text:section-source" );
+ pAttrList->AddAttribute("xlink:href", m_strSourceLink);
+ pAttrList->AddAttribute("text:filter-name", "wordpro");
+ pStrm->StartElement("text:section-source");
+ pStrm->EndElement("text:section-source");
}
XFContentContainer::ToXml(pStrm);
- pStrm->EndElement( "text:section" );
-
+ pStrm->EndElement("text:section");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xftabstyle.hxx b/lotuswordpro/source/filter/xfilter/xftabstyle.hxx
index 6a25ddd3a73d..06304d51ce6c 100644
--- a/lotuswordpro/source/filter/xfilter/xftabstyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xftabstyle.hxx
@@ -68,42 +68,33 @@ public:
XFTabStyle();
public:
- void SetTabType(enumXFTab type);
+ void SetTabType(enumXFTab type);
- void SetLength(double len);
+ void SetLength(double len);
- void SetDelimiter(sal_Unicode delimiter);
+ void SetDelimiter(sal_Unicode delimiter);
- void SetLeaderChar(sal_Unicode leader);
+ void SetLeaderChar(sal_Unicode leader);
- virtual void ToXml(IXFStream *pStrm) override;
+ virtual void ToXml(IXFStream* pStrm) override;
private:
- enumXFTab m_eType;
- double m_fLength;
- OUString m_strDelimiter;
- OUString m_strLeader;
+ enumXFTab m_eType;
+ double m_fLength;
+ OUString m_strDelimiter;
+ OUString m_strLeader;
};
-inline void XFTabStyle::SetTabType(enumXFTab type)
-{
- m_eType = type;
-}
+inline void XFTabStyle::SetTabType(enumXFTab type) { m_eType = type; }
-inline void XFTabStyle::SetLength(double len)
-{
- m_fLength = len;
-}
+inline void XFTabStyle::SetLength(double len) { m_fLength = len; }
inline void XFTabStyle::SetDelimiter(sal_Unicode delimiter)
{
m_strDelimiter = OUString(delimiter);
}
-inline void XFTabStyle::SetLeaderChar(sal_Unicode leader)
-{
- m_strLeader = OUString(leader);
-}
+inline void XFTabStyle::SetLeaderChar(sal_Unicode leader) { m_strLeader = OUString(leader); }
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xftextstyle.cxx b/lotuswordpro/source/filter/xfilter/xftextstyle.cxx
index 50eda9fcf761..e70603ab2e4c 100644
--- a/lotuswordpro/source/filter/xfilter/xftextstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftextstyle.cxx
@@ -63,68 +63,58 @@
#include <xfilter/ixfstream.hxx>
#include <xfilter/xffont.hxx>
-XFTextStyle::XFTextStyle()
-{
-}
+XFTextStyle::XFTextStyle() {}
-XFTextStyle::~XFTextStyle()
-{
-}
+XFTextStyle::~XFTextStyle() {}
-void XFTextStyle::SetFont(rtl::Reference<XFFont> const & font)
-{
- m_pFont = font;
-}
+void XFTextStyle::SetFont(rtl::Reference<XFFont> const& font) { m_pFont = font; }
-bool XFTextStyle::Equal(IXFStyle *pStyle)
+bool XFTextStyle::Equal(IXFStyle* pStyle)
{
- if( !pStyle || pStyle->GetStyleFamily() != enumXFStyleText )
+ if (!pStyle || pStyle->GetStyleFamily() != enumXFStyleText)
{
return false;
}
- XFTextStyle *pOther = dynamic_cast<XFTextStyle*>(pStyle);
- if( !pOther )
+ XFTextStyle* pOther = dynamic_cast<XFTextStyle*>(pStyle);
+ if (!pOther)
{
return false;
}
- if( m_pFont.is() )
+ if (m_pFont.is())
{
- if( !pOther->m_pFont.is() )
+ if (!pOther->m_pFont.is())
return false;
- if( *m_pFont != *pOther->m_pFont )
+ if (*m_pFont != *pOther->m_pFont)
return false;
}
- else if( pOther->m_pFont.is() )
+ else if (pOther->m_pFont.is())
return false;
return true;
}
-enumXFStyle XFTextStyle::GetStyleFamily()
-{
- return enumXFStyleText;
-}
+enumXFStyle XFTextStyle::GetStyleFamily() { return enumXFStyleText; }
-void XFTextStyle::ToXml(IXFStream *strm)
+void XFTextStyle::ToXml(IXFStream* strm)
{
- IXFAttrList *pAttrList = strm->GetAttrList();
+ IXFAttrList* pAttrList = strm->GetAttrList();
OUString style = GetStyleName();
pAttrList->Clear();
- if( !style.isEmpty() )
+ if (!style.isEmpty())
pAttrList->AddAttribute("style:name", GetStyleName());
- if( !GetParentStyleName().isEmpty() )
+ if (!GetParentStyleName().isEmpty())
pAttrList->AddAttribute("style:parent-style-name", GetParentStyleName());
- pAttrList->AddAttribute("style:family", "text" );
+ pAttrList->AddAttribute("style:family", "text");
strm->StartElement("style:style");
//Font properties:
pAttrList->Clear();
//font name:
- if( m_pFont.is() )
+ if (m_pFont.is())
m_pFont->ToXml(strm);
strm->StartElement("style:properties");
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index d931dc2b369b..ec3e954aacd4 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -7340,268 +7340,123 @@ linguistic/workben/sprophelp.hxx
linguistic/workben/sreg.cxx
linguistic/workben/sspellimp.cxx
linguistic/workben/sspellimp.hxx
-lotuswordpro/inc/localtime.hxx
-lotuswordpro/inc/lwpatomholder.hxx
-lotuswordpro/inc/lwpbasetype.hxx
lotuswordpro/inc/lwpcolor.hxx
lotuswordpro/inc/lwpdefs.hxx
-lotuswordpro/inc/lwpfilehdr.hxx
lotuswordpro/inc/lwpfont.hxx
lotuswordpro/inc/lwpfoundry.hxx
-lotuswordpro/inc/lwpfrib.hxx
-lotuswordpro/inc/lwpglobalmgr.hxx
lotuswordpro/inc/lwpidxmgr.hxx
-lotuswordpro/inc/lwpobj.hxx
lotuswordpro/inc/lwpobjfactory.hxx
lotuswordpro/inc/lwpobjhdr.hxx
lotuswordpro/inc/lwpobjid.hxx
-lotuswordpro/inc/lwpobjstrm.hxx
lotuswordpro/inc/lwpobjtags.hxx
lotuswordpro/inc/lwpoverride.hxx
-lotuswordpro/inc/lwpsvstream.hxx
lotuswordpro/inc/lwptools.hxx
-lotuswordpro/inc/xfilter/ixfstream.hxx
-lotuswordpro/inc/xfilter/ixfstyle.hxx
-lotuswordpro/inc/xfilter/xfannotation.hxx
-lotuswordpro/inc/xfilter/xfarrowstyle.hxx
-lotuswordpro/inc/xfilter/xfbgimage.hxx
lotuswordpro/inc/xfilter/xfbookmark.hxx
lotuswordpro/inc/xfilter/xfborders.hxx
lotuswordpro/inc/xfilter/xfbreaks.hxx
lotuswordpro/inc/xfilter/xfcell.hxx
-lotuswordpro/inc/xfilter/xfcellstyle.hxx
-lotuswordpro/inc/xfilter/xfchange.hxx
lotuswordpro/inc/xfilter/xfcolor.hxx
-lotuswordpro/inc/xfilter/xfcolstyle.hxx
lotuswordpro/inc/xfilter/xfcolumns.hxx
-lotuswordpro/inc/xfilter/xfconfigmanager.hxx
-lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
-lotuswordpro/inc/xfilter/xfcrossref.hxx
-lotuswordpro/inc/xfilter/xfdatestyle.hxx
lotuswordpro/inc/xfilter/xfdocfield.hxx
-lotuswordpro/inc/xfilter/xfdrawgroup.hxx
lotuswordpro/inc/xfilter/xfdrawlinestyle.hxx
lotuswordpro/inc/xfilter/xfdrawobj.hxx
-lotuswordpro/inc/xfilter/xfdrawpath.hxx
-lotuswordpro/inc/xfilter/xfdrawpolyline.hxx
-lotuswordpro/inc/xfilter/xfdrawrect.hxx
-lotuswordpro/inc/xfilter/xfdrawstyle.hxx
lotuswordpro/inc/xfilter/xfdropcap.hxx
lotuswordpro/inc/xfilter/xfendnote.hxx
-lotuswordpro/inc/xfilter/xfentry.hxx
-lotuswordpro/inc/xfilter/xffloatframe.hxx
lotuswordpro/inc/xfilter/xffont.hxx
-lotuswordpro/inc/xfilter/xffontdecl.hxx
-lotuswordpro/inc/xfilter/xffooter.hxx
-lotuswordpro/inc/xfilter/xffooterstyle.hxx
-lotuswordpro/inc/xfilter/xffootnote.hxx
lotuswordpro/inc/xfilter/xffootnoteconfig.hxx
lotuswordpro/inc/xfilter/xfframe.hxx
lotuswordpro/inc/xfilter/xfframestyle.hxx
-lotuswordpro/inc/xfilter/xfglobal.hxx
-lotuswordpro/inc/xfilter/xfheader.hxx
-lotuswordpro/inc/xfilter/xfheaderstyle.hxx
-lotuswordpro/inc/xfilter/xfhyperlink.hxx
-lotuswordpro/inc/xfilter/xfimagestyle.hxx
lotuswordpro/inc/xfilter/xfindex.hxx
lotuswordpro/inc/xfilter/xfinputlist.hxx
-lotuswordpro/inc/xfilter/xflinebreak.hxx
lotuswordpro/inc/xfilter/xflineheight.hxx
lotuswordpro/inc/xfilter/xflinenumberconfig.hxx
-lotuswordpro/inc/xfilter/xflist.hxx
-lotuswordpro/inc/xfilter/xflistitem.hxx
lotuswordpro/inc/xfilter/xfliststyle.hxx
lotuswordpro/inc/xfilter/xfmargins.hxx
-lotuswordpro/inc/xfilter/xfmasterpage.hxx
lotuswordpro/inc/xfilter/xfnumberstyle.hxx
lotuswordpro/inc/xfilter/xfnumfmt.hxx
-lotuswordpro/inc/xfilter/xfofficemeta.hxx
lotuswordpro/inc/xfilter/xfpadding.hxx
-lotuswordpro/inc/xfilter/xfpagecount.hxx
lotuswordpro/inc/xfilter/xfpagemaster.hxx
-lotuswordpro/inc/xfilter/xfpagenumber.hxx
lotuswordpro/inc/xfilter/xfparastyle.hxx
-lotuswordpro/inc/xfilter/xfplaceholder.hxx
lotuswordpro/inc/xfilter/xfpoint.hxx
lotuswordpro/inc/xfilter/xfrect.hxx
lotuswordpro/inc/xfilter/xfrow.hxx
-lotuswordpro/inc/xfilter/xfrowstyle.hxx
-lotuswordpro/inc/xfilter/xfruby.hxx
-lotuswordpro/inc/xfilter/xfrubystyle.hxx
lotuswordpro/inc/xfilter/xfsaxstream.hxx
-lotuswordpro/inc/xfilter/xfsectionstyle.hxx
lotuswordpro/inc/xfilter/xfshadow.hxx
-lotuswordpro/inc/xfilter/xfstyle.hxx
-lotuswordpro/inc/xfilter/xfstylecont.hxx
lotuswordpro/inc/xfilter/xfstylemanager.hxx
lotuswordpro/inc/xfilter/xftable.hxx
-lotuswordpro/inc/xfilter/xftablestyle.hxx
-lotuswordpro/inc/xfilter/xftabstop.hxx
-lotuswordpro/inc/xfilter/xftextspan.hxx
-lotuswordpro/inc/xfilter/xftextstyle.hxx
lotuswordpro/inc/xfilter/xftimestyle.hxx
-lotuswordpro/inc/xfilter/xfutil.hxx
lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
lotuswordpro/source/filter/LotusWordProImportFilter.cxx
lotuswordpro/source/filter/LotusWordProImportFilter.hxx
lotuswordpro/source/filter/bencont.cxx
-lotuswordpro/source/filter/benlist.cxx
lotuswordpro/source/filter/benname.cxx
-lotuswordpro/source/filter/benobj.cxx
lotuswordpro/source/filter/bento.hxx
lotuswordpro/source/filter/benval.cxx
lotuswordpro/source/filter/clone.hxx
lotuswordpro/source/filter/explode.cxx
-lotuswordpro/source/filter/explode.hxx
-lotuswordpro/source/filter/first.hxx
-lotuswordpro/source/filter/localtime.cxx
-lotuswordpro/source/filter/lwp9reader.cxx
-lotuswordpro/source/filter/lwp9reader.hxx
-lotuswordpro/source/filter/lwpatomholder.cxx
-lotuswordpro/source/filter/lwpbackgroundstuff.cxx
-lotuswordpro/source/filter/lwpbackgroundstuff.hxx
-lotuswordpro/source/filter/lwpbasetype.cxx
lotuswordpro/source/filter/lwpborderstuff.cxx
lotuswordpro/source/filter/lwpborderstuff.hxx
-lotuswordpro/source/filter/lwpbreaksoverride.cxx
-lotuswordpro/source/filter/lwpbreaksoverride.hxx
lotuswordpro/source/filter/lwpbulletstylemgr.cxx
lotuswordpro/source/filter/lwpbulletstylemgr.hxx
lotuswordpro/source/filter/lwpcelllayout.cxx
lotuswordpro/source/filter/lwpcelllayout.hxx
-lotuswordpro/source/filter/lwpcharacterstyle.cxx
lotuswordpro/source/filter/lwpcharacterstyle.hxx
-lotuswordpro/source/filter/lwpcharborderoverride.hxx
-lotuswordpro/source/filter/lwpcharsetmgr.cxx
-lotuswordpro/source/filter/lwpcontent.cxx
lotuswordpro/source/filter/lwpcontent.hxx
-lotuswordpro/source/filter/lwpdivinfo.cxx
-lotuswordpro/source/filter/lwpdivinfo.hxx
lotuswordpro/source/filter/lwpdivopts.cxx
-lotuswordpro/source/filter/lwpdivopts.hxx
-lotuswordpro/source/filter/lwpdlvlist.cxx
-lotuswordpro/source/filter/lwpdlvlist.hxx
-lotuswordpro/source/filter/lwpdoc.cxx
-lotuswordpro/source/filter/lwpdoc.hxx
lotuswordpro/source/filter/lwpdocdata.cxx
lotuswordpro/source/filter/lwpdrawobj.cxx
lotuswordpro/source/filter/lwpdrawobj.hxx
-lotuswordpro/source/filter/lwpdropcapmgr.cxx
-lotuswordpro/source/filter/lwpfilehdr.cxx
-lotuswordpro/source/filter/lwpfilter.cxx
-lotuswordpro/source/filter/lwpfnlayout.cxx
-lotuswordpro/source/filter/lwpfnlayout.hxx
lotuswordpro/source/filter/lwpfont.cxx
-lotuswordpro/source/filter/lwpfootnote.cxx
lotuswordpro/source/filter/lwpfootnote.hxx
lotuswordpro/source/filter/lwpfoundry.cxx
-lotuswordpro/source/filter/lwpframelayout.cxx
-lotuswordpro/source/filter/lwpframelayout.hxx
-lotuswordpro/source/filter/lwpfrib.cxx
-lotuswordpro/source/filter/lwpfribbreaks.cxx
lotuswordpro/source/filter/lwpfribbreaks.hxx
-lotuswordpro/source/filter/lwpfribframe.cxx
-lotuswordpro/source/filter/lwpfribframe.hxx
lotuswordpro/source/filter/lwpfribheader.hxx
-lotuswordpro/source/filter/lwpfribmark.cxx
lotuswordpro/source/filter/lwpfribmark.hxx
lotuswordpro/source/filter/lwpfribptr.cxx
-lotuswordpro/source/filter/lwpfribptr.hxx
-lotuswordpro/source/filter/lwpfribsection.cxx
-lotuswordpro/source/filter/lwpfribtable.cxx
-lotuswordpro/source/filter/lwpfribtable.hxx
lotuswordpro/source/filter/lwpfribtext.cxx
lotuswordpro/source/filter/lwpfribtext.hxx
-lotuswordpro/source/filter/lwpglobalmgr.cxx
lotuswordpro/source/filter/lwpgrfobj.cxx
lotuswordpro/source/filter/lwpgrfobj.hxx
-lotuswordpro/source/filter/lwpholder.cxx
-lotuswordpro/source/filter/lwpholder.hxx
-lotuswordpro/source/filter/lwphyperlinkmgr.cxx
lotuswordpro/source/filter/lwpidxmgr.cxx
-lotuswordpro/source/filter/lwplayout.cxx
lotuswordpro/source/filter/lwplayout.hxx
lotuswordpro/source/filter/lwplayoutdef.hxx
lotuswordpro/source/filter/lwplaypiece.cxx
-lotuswordpro/source/filter/lwplaypiece.hxx
-lotuswordpro/source/filter/lwplnopts.cxx
-lotuswordpro/source/filter/lwplnopts.hxx
lotuswordpro/source/filter/lwpmargins.hxx
lotuswordpro/source/filter/lwpmarker.cxx
lotuswordpro/source/filter/lwpmarker.hxx
-lotuswordpro/source/filter/lwpnotes.cxx
-lotuswordpro/source/filter/lwpnotes.hxx
-lotuswordpro/source/filter/lwpnumberingoverride.hxx
lotuswordpro/source/filter/lwpnumericfmt.cxx
lotuswordpro/source/filter/lwpnumericfmt.hxx
-lotuswordpro/source/filter/lwpobj.cxx
-lotuswordpro/source/filter/lwpobjhdr.cxx
-lotuswordpro/source/filter/lwpobjid.cxx
-lotuswordpro/source/filter/lwpobjstrm.cxx
-lotuswordpro/source/filter/lwpoleobject.cxx
lotuswordpro/source/filter/lwpoleobject.hxx
-lotuswordpro/source/filter/lwpoverride.cxx
-lotuswordpro/source/filter/lwppagehint.hxx
-lotuswordpro/source/filter/lwppagelayout.cxx
-lotuswordpro/source/filter/lwppagelayout.hxx
lotuswordpro/source/filter/lwppara.cxx
lotuswordpro/source/filter/lwppara.hxx
lotuswordpro/source/filter/lwppara1.cxx
-lotuswordpro/source/filter/lwpparaborderoverride.cxx
lotuswordpro/source/filter/lwpparaborderoverride.hxx
lotuswordpro/source/filter/lwpparaproperty.cxx
lotuswordpro/source/filter/lwpparaproperty.hxx
lotuswordpro/source/filter/lwpparastyle.cxx
-lotuswordpro/source/filter/lwpparastyle.hxx
lotuswordpro/source/filter/lwppiece.hxx
lotuswordpro/source/filter/lwpproplist.cxx
-lotuswordpro/source/filter/lwpproplist.hxx
-lotuswordpro/source/filter/lwpprtinfo.cxx
-lotuswordpro/source/filter/lwppttntbl.hxx
-lotuswordpro/source/filter/lwpresource.hxx
lotuswordpro/source/filter/lwprowlayout.cxx
lotuswordpro/source/filter/lwprowlayout.hxx
lotuswordpro/source/filter/lwpsdwdrawheader.hxx
-lotuswordpro/source/filter/lwpsdwfileloader.cxx
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
lotuswordpro/source/filter/lwpsdwrect.cxx
-lotuswordpro/source/filter/lwpsection.cxx
-lotuswordpro/source/filter/lwpsection.hxx
lotuswordpro/source/filter/lwpshadow.hxx
lotuswordpro/source/filter/lwpsilverbullet.cxx
-lotuswordpro/source/filter/lwpsilverbullet.hxx
-lotuswordpro/source/filter/lwpsortopt.cxx
-lotuswordpro/source/filter/lwpsortopt.hxx
lotuswordpro/source/filter/lwpstory.cxx
-lotuswordpro/source/filter/lwpstory.hxx
lotuswordpro/source/filter/lwpstyledef.hxx
-lotuswordpro/source/filter/lwpsvstream.cxx
-lotuswordpro/source/filter/lwptable.cxx
lotuswordpro/source/filter/lwptable.hxx
lotuswordpro/source/filter/lwptablelayout.cxx
lotuswordpro/source/filter/lwptablelayout.hxx
-lotuswordpro/source/filter/lwptaboverride.cxx
-lotuswordpro/source/filter/lwptaboverride.hxx
lotuswordpro/source/filter/lwptabrack.cxx
lotuswordpro/source/filter/lwptabrack.hxx
-lotuswordpro/source/filter/lwptblcell.cxx
lotuswordpro/source/filter/lwptblcell.hxx
lotuswordpro/source/filter/lwptblformula.cxx
lotuswordpro/source/filter/lwptblformula.hxx
lotuswordpro/source/filter/lwptoc.cxx
-lotuswordpro/source/filter/lwptoc.hxx
lotuswordpro/source/filter/lwptools.cxx
-lotuswordpro/source/filter/lwpuidoc.cxx
-lotuswordpro/source/filter/lwpuidoc.hxx
lotuswordpro/source/filter/lwpusewhen.hxx
-lotuswordpro/source/filter/lwpusrdicts.cxx
-lotuswordpro/source/filter/lwpvpointer.cxx
lotuswordpro/source/filter/tocread.cxx
-lotuswordpro/source/filter/tocread.hxx
-lotuswordpro/source/filter/ut.hxx
-lotuswordpro/source/filter/utbenvs.cxx
-lotuswordpro/source/filter/utlist.cxx
-lotuswordpro/source/filter/utlist.hxx
lotuswordpro/source/filter/xfilter/xfbase64.cxx
lotuswordpro/source/filter/xfilter/xfbgimage.cxx
lotuswordpro/source/filter/xfilter/xfborders.cxx
@@ -7609,27 +7464,19 @@ lotuswordpro/source/filter/xfilter/xfcell.cxx
lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
lotuswordpro/source/filter/xfilter/xfchange.cxx
lotuswordpro/source/filter/xfilter/xfcolor.cxx
-lotuswordpro/source/filter/xfilter/xfcolstyle.cxx
lotuswordpro/source/filter/xfilter/xfcolumns.cxx
-lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
-lotuswordpro/source/filter/xfilter/xfcrossref.cxx
lotuswordpro/source/filter/xfilter/xfdate.cxx
lotuswordpro/source/filter/xfilter/xfdatestyle.cxx
lotuswordpro/source/filter/xfilter/xfdocfield.cxx
-lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx
lotuswordpro/source/filter/xfilter/xfdrawareastyle.hxx
lotuswordpro/source/filter/xfilter/xfdrawline.cxx
-lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx
lotuswordpro/source/filter/xfilter/xfdrawobj.cxx
lotuswordpro/source/filter/xfilter/xfdrawpath.cxx
lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx
lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx
-lotuswordpro/source/filter/xfilter/xfdrawrect.cxx
lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
-lotuswordpro/source/filter/xfilter/xfentry.cxx
lotuswordpro/source/filter/xfilter/xffont.cxx
-lotuswordpro/source/filter/xfilter/xffontfactory.cxx
lotuswordpro/source/filter/xfilter/xffontworkstyle.hxx
lotuswordpro/source/filter/xfilter/xfframe.cxx
lotuswordpro/source/filter/xfilter/xfframestyle.cxx
@@ -7637,21 +7484,14 @@ lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
lotuswordpro/source/filter/xfilter/xfimage.cxx
lotuswordpro/source/filter/xfilter/xfimagestyle.cxx
lotuswordpro/source/filter/xfilter/xfindex.cxx
-lotuswordpro/source/filter/xfilter/xflist.cxx
lotuswordpro/source/filter/xfilter/xfliststyle.cxx
lotuswordpro/source/filter/xfilter/xfmargins.cxx
-lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx
lotuswordpro/source/filter/xfilter/xfofficemeta.cxx
lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
-lotuswordpro/source/filter/xfilter/xfparagraph.cxx
lotuswordpro/source/filter/xfilter/xfparastyle.cxx
lotuswordpro/source/filter/xfilter/xfrow.cxx
lotuswordpro/source/filter/xfilter/xfrowstyle.cxx
-lotuswordpro/source/filter/xfilter/xfsaxattrlist.cxx
-lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
-lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
-lotuswordpro/source/filter/xfilter/xfsection.cxx
lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
lotuswordpro/source/filter/xfilter/xfshadow.cxx
lotuswordpro/source/filter/xfilter/xfstyle.cxx
@@ -7660,11 +7500,9 @@ lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
lotuswordpro/source/filter/xfilter/xftable.cxx
lotuswordpro/source/filter/xfilter/xftablestyle.cxx
lotuswordpro/source/filter/xfilter/xftabstyle.cxx
-lotuswordpro/source/filter/xfilter/xftabstyle.hxx
lotuswordpro/source/filter/xfilter/xftextboxstyle.cxx
lotuswordpro/source/filter/xfilter/xftextcontent.cxx
lotuswordpro/source/filter/xfilter/xftextspan.cxx
-lotuswordpro/source/filter/xfilter/xftextstyle.cxx
lotuswordpro/source/filter/xfilter/xftimestyle.cxx
lotuswordpro/source/filter/xfilter/xfutil.cxx
o3tl/qa/cow_wrapper_clients.cxx