no need to allocate these separately
they are all one or two words in size Change-Id: I09a0392f8d0b067a3a8e4105568b578ef4795c58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -70,7 +70,6 @@
|
||||
#include <unordered_map>
|
||||
#include <memory>
|
||||
|
||||
|
||||
class LwpDocument;
|
||||
class LwpBookMark;
|
||||
|
||||
@@ -257,12 +256,12 @@ public:
|
||||
LwpObjectID * GetDefaultTextStyle() ;
|
||||
private:
|
||||
std::unique_ptr<LwpStyleManager> m_xStyleMgr;
|
||||
std::unique_ptr<LwpDropcapMgr> m_xDropcapMgr;
|
||||
LwpDropcapMgr m_aDropcapMgr;
|
||||
std::unique_ptr<LwpBulletStyleMgr> m_xBulletStyleMgr;
|
||||
public:
|
||||
LwpStyleManager* GetStyleManager() { return m_xStyleMgr.get(); }
|
||||
LwpBookMark* GetBookMark(LwpObjectID objMarker);
|
||||
LwpDropcapMgr* GetDropcapMgr() { return m_xDropcapMgr.get(); }
|
||||
LwpDropcapMgr& GetDropcapMgr() { return m_aDropcapMgr; }
|
||||
LwpContent* EnumContents(LwpContent* pContent);
|
||||
LwpSection* EnumSections(LwpSection* pSection);
|
||||
LwpBulletStyleMgr* GetBulletStyleMgr() { return m_xBulletStyleMgr.get(); }
|
||||
|
||||
@@ -101,7 +101,7 @@ void LwpDocument::Read()
|
||||
LwpUIDocument aUIDoc(m_pObjStrm.get());
|
||||
}
|
||||
|
||||
m_xLnOpts.reset(new LwpLineNumberOptions(m_pObjStrm.get()));
|
||||
m_oLnOpts.emplace(m_pObjStrm.get());
|
||||
|
||||
//Skip LwpUserDictFiles
|
||||
{
|
||||
@@ -350,9 +350,9 @@ void LwpDocument::RegisterGraphicsStyles()
|
||||
*/
|
||||
void LwpDocument::RegisterLinenumberStyles()
|
||||
{
|
||||
if (!m_xLnOpts)
|
||||
if (!m_oLnOpts)
|
||||
return;
|
||||
m_xLnOpts->RegisterStyle();
|
||||
m_oLnOpts->RegisterStyle();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "lwplnopts.hxx"
|
||||
#include "lwpdlvlist.hxx"
|
||||
#include <lwpfoundry.hxx>
|
||||
#include <optional>
|
||||
|
||||
class IXFStream;
|
||||
class LwpVirtualLayout;
|
||||
@@ -93,7 +94,7 @@ private:
|
||||
DOC_CHILDDOC = 0x00000800UL
|
||||
};
|
||||
|
||||
std::unique_ptr<LwpLineNumberOptions> m_xLnOpts;
|
||||
std::optional<LwpLineNumberOptions> m_oLnOpts;
|
||||
|
||||
LwpObjectID m_DivOpts;
|
||||
LwpObjectID m_FootnoteOpts;
|
||||
|
||||
@@ -79,7 +79,6 @@ LwpFoundry::LwpFoundry(LwpObjectStream *pStrm, LwpDocument* pDoc)
|
||||
, m_bRegisteredAll(false)
|
||||
{
|
||||
Read(pStrm);
|
||||
m_xDropcapMgr.reset(new LwpDropcapMgr);
|
||||
m_xBulletStyleMgr.reset(new LwpBulletStyleMgr);
|
||||
m_xBulletStyleMgr->SetFoundry(this);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ void LwpFribPtr::XFConvert()
|
||||
if (pLayout.is() && pLayout->GetTag() == VO_DROPCAPLAYOUT)
|
||||
{
|
||||
LwpFoundry* pFoundry = m_pPara->GetFoundry();
|
||||
LwpDropcapMgr* pMgr = pFoundry ? pFoundry->GetDropcapMgr() : nullptr;
|
||||
LwpDropcapMgr* pMgr = pFoundry ? &pFoundry->GetDropcapMgr() : nullptr;
|
||||
if (pMgr)
|
||||
pMgr->SetXFPara(m_pXFPara.get());
|
||||
}
|
||||
|
||||
@@ -530,7 +530,6 @@ rtl::Reference<LwpVirtualLayout> LwpHeadLayout::FindEnSuperTableLayout()
|
||||
|
||||
LwpLayoutStyle::LwpLayoutStyle()
|
||||
: m_nStyleDefinition(0)
|
||||
, m_pDescription(new LwpAtomHolder)
|
||||
, m_nKey(0)
|
||||
{
|
||||
}
|
||||
@@ -540,7 +539,7 @@ LwpLayoutStyle::~LwpLayoutStyle() {}
|
||||
void LwpLayoutStyle::Read(LwpObjectStream* pStrm)
|
||||
{
|
||||
m_nStyleDefinition = pStrm->QuickReaduInt32();
|
||||
m_pDescription->Read(pStrm);
|
||||
m_aDescription.Read(pStrm);
|
||||
if (pStrm->CheckExtra())
|
||||
{
|
||||
m_nKey = pStrm->QuickReaduInt16();
|
||||
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
void Read(LwpObjectStream* pStrm);
|
||||
private:
|
||||
sal_uInt32 m_nStyleDefinition;
|
||||
std::unique_ptr<LwpAtomHolder> m_pDescription;
|
||||
LwpAtomHolder m_aDescription;
|
||||
sal_uInt16 m_nKey;
|
||||
};
|
||||
|
||||
|
||||
@@ -744,7 +744,7 @@ void LwpPara::ParseDropcapContent()
|
||||
{
|
||||
if (!GetFoundry())
|
||||
return;
|
||||
XFParagraph* pDropcap = GetFoundry()->GetDropcapMgr()->GetXFPara();
|
||||
XFParagraph* pDropcap = GetFoundry()->GetDropcapMgr().GetXFPara();
|
||||
if (pDropcap)
|
||||
{
|
||||
m_Fribs.SetXFPara(pDropcap);
|
||||
|
||||
@@ -74,7 +74,6 @@ LwpSilverBullet::LwpSilverBullet(LwpObjectHeader const & objHdr, LwpSvStream* pS
|
||||
: LwpDLNFVList(objHdr, pStrm)
|
||||
, m_nFlags(0)
|
||||
, m_nUseCount(0)
|
||||
, m_pAtomHolder(new LwpAtomHolder)
|
||||
{
|
||||
memset(m_pHideLevels, 0, sizeof(m_pHideLevels));
|
||||
}
|
||||
@@ -103,7 +102,7 @@ void LwpSilverBullet::Read()
|
||||
|
||||
m_nUseCount = m_pObjStrm->QuickReaduInt32();
|
||||
|
||||
m_pAtomHolder->Read(m_pObjStrm.get());
|
||||
m_aAtomHolder.Read(m_pObjStrm.get());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,7 +130,7 @@ private:
|
||||
LwpObjectID m_aStory;
|
||||
sal_uInt8 m_pResetPositionFlags[MAXNUMBERPOSITIONS];
|
||||
sal_uInt32 m_nUseCount;
|
||||
std::unique_ptr<LwpAtomHolder> m_pAtomHolder;
|
||||
LwpAtomHolder m_aAtomHolder;
|
||||
|
||||
rtl::Reference<LwpPara> m_xBulletPara;
|
||||
OUString m_strStyleName;
|
||||
|
||||
Reference in New Issue
Block a user