summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterPane.cxx
blob: 6c1ccd37744c7e41ccf2179003a2640209ba31bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include "PresenterPane.hxx"
#include "PresenterController.hxx"
#include "PresenterPaintManager.hxx"
#include <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/drawing/CanvasFeature.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <osl/mutex.hxx>

using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;

namespace sdext { namespace presenter {

//===== PresenterPane =========================================================

PresenterPane::PresenterPane (
    const Reference<XComponentContext>& rxContext,
        const ::rtl::Reference<PresenterController>& rpPresenterController)
    : PresenterPaneBase(rxContext, rpPresenterController),
      maBoundingBox()
{
    Reference<lang::XMultiComponentFactory> xFactory (
        mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
    mxPresenterHelper = Reference<drawing::XPresenterHelper>(
        xFactory->createInstanceWithContext(
            OUString("com.sun.star.comp.Draw.PresenterHelper"),
            mxComponentContext),
        UNO_QUERY_THROW);
}

PresenterPane::~PresenterPane()
{
}

//----- XPane -----------------------------------------------------------------

Reference<awt::XWindow> SAL_CALL PresenterPane::getWindow()
    throw (RuntimeException, std::exception)
{
    ThrowIfDisposed();
    return mxContentWindow;
}

Reference<rendering::XCanvas> SAL_CALL PresenterPane::getCanvas()
    throw (RuntimeException, std::exception)
{
    ThrowIfDisposed();
    return mxContentCanvas;
}

//----- XWindowListener -------------------------------------------------------

void SAL_CALL PresenterPane::windowResized (const awt::WindowEvent& rEvent)
    throw (RuntimeException, std::exception)
{
    (void)rEvent;
    PresenterPaneBase::windowResized(rEvent);

    Invalidate(maBoundingBox);

    LayoutContextWindow();
    ToTop();

    UpdateBoundingBox();
    Invalidate(maBoundingBox);
}

void SAL_CALL PresenterPane::windowMoved (const awt::WindowEvent& rEvent)
    throw (RuntimeException, std::exception)
{
    (void)rEvent;
    PresenterPaneBase::windowMoved(rEvent);

    Invalidate(maBoundingBox);

    ToTop();

    UpdateBoundingBox();
    Invalidate(maBoundingBox);
}

void SAL_CALL PresenterPane::windowShown (const lang::EventObject& rEvent)
    throw (RuntimeException, std::exception)
{
    (void)rEvent;
    PresenterPaneBase::windowShown(rEvent);

    ToTop();

    if (mxContentWindow.is())
    {
        LayoutContextWindow();
        mxContentWindow->setVisible(sal_True);
    }

    UpdateBoundingBox();
    Invalidate(maBoundingBox);
}

void SAL_CALL PresenterPane::windowHidden (const lang::EventObject& rEvent)
    throw (RuntimeException, std::exception)
{
    (void)rEvent;
    PresenterPaneBase::windowHidden(rEvent);

    if (mxContentWindow.is())
        mxContentWindow->setVisible(sal_False);
}

//----- XPaintListener --------------------------------------------------------

void SAL_CALL PresenterPane::windowPaint (const awt::PaintEvent& rEvent)
    throw (RuntimeException, std::exception)
{
    (void)rEvent;
    ThrowIfDisposed();

    PaintBorder(rEvent.UpdateRect);
}



void PresenterPane::CreateCanvases (
    const Reference<awt::XWindow>& rxParentWindow,
    const Reference<rendering::XSpriteCanvas>& rxParentCanvas)
{
    if ( ! mxPresenterHelper.is())
        return;
    if ( ! rxParentWindow.is())
        return;
    if ( ! rxParentCanvas.is())
        return;

    mxBorderCanvas = mxPresenterHelper->createSharedCanvas(
        rxParentCanvas,
        rxParentWindow,
        Reference<rendering::XCanvas>(rxParentCanvas, UNO_QUERY),
        rxParentWindow,
        mxBorderWindow);
    mxContentCanvas = mxPresenterHelper->createSharedCanvas(
        rxParentCanvas,
        rxParentWindow,
        Reference<rendering::XCanvas>(rxParentCanvas, UNO_QUERY),
        rxParentWindow,
        mxContentWindow);

    PaintBorder(mxBorderWindow->getPosSize());
}

void PresenterPane::Invalidate (const css::awt::Rectangle& rRepaintBox)
{
    // Invalidate the parent window to be able to invalidate an area outside
    // the current window area.
    mpPresenterController->GetPaintManager()->Invalidate(mxParentWindow, rRepaintBox);
}

void PresenterPane::UpdateBoundingBox()
{
    if (mxBorderWindow.is() && IsVisible())
        maBoundingBox = mxBorderWindow->getPosSize();
    else
        maBoundingBox = awt::Rectangle();
}

} } // end of namespace ::sd::presenter

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
='width: 2.3%;'/> -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
162 files changed, 3061 insertions, 3465 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->