[Libreoffice-commits] core.git: lotuswordpro/inc

2023-04-03 Thread jpuronah (via logerrit)
 lotuswordpro/inc/localtime.hxx  |5 +
 lotuswordpro/inc/lwpatomholder.hxx  |5 +
 lotuswordpro/inc/lwpbasetype.hxx|5 +
 lotuswordpro/inc/lwpbookmarkmgr.hxx |4 +---
 4 files changed, 4 insertions(+), 15 deletions(-)

New commits:
commit 6201b6468f53338f833dd93809cb4a78458114aa
Author: jpuronah 
AuthorDate: Mon Apr 3 11:21:23 2023 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Mon Apr 3 12:32:47 2023 +0200

tdf#143148: Use pragma once instead of include guards

Change-Id: I8369e0bdb6a01838d87e7cddc1cbaed911fe461a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149952
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/lotuswordpro/inc/localtime.hxx b/lotuswordpro/inc/localtime.hxx
index a9fac8ceaf74..e0106f2304c4 100644
--- a/lotuswordpro/inc/localtime.hxx
+++ b/lotuswordpro/inc/localtime.hxx
@@ -53,8 +53,7 @@
  *
  *
  /
-#ifndef INCLUDED_LOTUSWORDPRO_INC_LOCALTIME_HXX
-#define INCLUDED_LOTUSWORDPRO_INC_LOCALTIME_HXX
+#pragma once
 
 #include 
 
@@ -83,6 +82,4 @@ struct LtTm
 bool LtgGmTime(tools::Long rtime, LtTm& rtm);
 bool LtgLocalTime(tools::Long rtime, LtTm& rtm);
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/lwpatomholder.hxx 
b/lotuswordpro/inc/lwpatomholder.hxx
index 321b5cb8f20d..9cf65973de11 100644
--- a/lotuswordpro/inc/lwpatomholder.hxx
+++ b/lotuswordpro/inc/lwpatomholder.hxx
@@ -53,8 +53,7 @@
  *
  *
  /
-#ifndef INCLUDED_LOTUSWORDPRO_INC_LWPATOMHOLDER_HXX
-#define INCLUDED_LOTUSWORDPRO_INC_LWPATOMHOLDER_HXX
+#pragma once
 
 #include 
 #include "lwpdefs.hxx"
@@ -81,6 +80,4 @@ public:
 };
 inline bool LwpAtomHolder::HasValue() const { return (m_nAtom != BAD_ATOM); }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/lwpbasetype.hxx b/lotuswordpro/inc/lwpbasetype.hxx
index c000501c511a..d91eab833882 100644
--- a/lotuswordpro/inc/lwpbasetype.hxx
+++ b/lotuswordpro/inc/lwpbasetype.hxx
@@ -59,8 +59,7 @@
  *  PanoseNumber, Point
  /
 
-#ifndef INCLUDED_LOTUSWORDPRO_INC_LWPBASETYPE_HXX
-#define INCLUDED_LOTUSWORDPRO_INC_LWPBASETYPE_HXX
+#pragma once
 
 #include "lwpobjstrm.hxx"
 #include 
@@ -122,6 +121,4 @@ private:
 void LwpPoint::SetX(sal_Int32 nX) { m_nX = nX; }
 void LwpPoint::SetY(sal_Int32 nY) { m_nY = nY; }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/inc/lwpbookmarkmgr.hxx 
b/lotuswordpro/inc/lwpbookmarkmgr.hxx
index 3cc02b121a66..7d5490cc6cad 100644
--- a/lotuswordpro/inc/lwpbookmarkmgr.hxx
+++ b/lotuswordpro/inc/lwpbookmarkmgr.hxx
@@ -58,8 +58,7 @@
  *  For LWP filter architecture prototype
  /
 
-#ifndef INCLUDED_LOTUSWORDPRO_INC_LWPBOOKMARKMGR_HXX
-#define INCLUDED_LOTUSWORDPRO_INC_LWPBOOKMARKMGR_HXX
+#pragma once
 
 #include 
 
@@ -83,5 +82,4 @@ private:
 std::map> m_MapEnd;
 };
 
-#endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: lotuswordpro/inc

2022-01-16 Thread Caolán McNamara (via logerrit)
 lotuswordpro/inc/xfilter/xfdrawgroup.hxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit aa460a757431afc7408d08569142e6c0e3f6f301
Author: Caolán McNamara 
AuthorDate: Sun Jan 16 14:21:09 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Jan 16 16:41:26 2022 +0100

ofz#43689 Null-dereference

Change-Id: I6edb50b3c281d50187d8965ce9665a9aae0e9098
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128478
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx 
b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
index 81f7f8cc781a..b5e1f367c837 100644
--- a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
@@ -72,7 +72,10 @@
 class XFDrawGroup : public XFDrawObject
 {
 public:
-XFDrawGroup() {}
+XFDrawGroup()
+: m_aChildren(new XFContentContainer)
+{
+}
 
 public:
 using XFDrawObject::Add;


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2022-01-07 Thread Caolán McNamara (via logerrit)
 lotuswordpro/inc/xfilter/xfdrawstyle.hxx   |2 ++
 lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx |   11 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit a6415004630c28ac4c0a64b83d8f0fd5c77a6a31
Author: Caolán McNamara 
AuthorDate: Fri Jan 7 14:21:12 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 7 21:01:17 2022 +0100

ofz#43388 Direct-leak

Change-Id: I5d410461d7b4e8466533fc4186ee77ec99fae089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128123
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx 
b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
index a426dc99e1d8..b732fbf9c439 100644
--- a/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawstyle.hxx
@@ -131,6 +131,8 @@ private:
 double m_fArrowEndSize;
 bool m_bArrowStartCenter;
 bool m_bArrowEndCenter;
+bool m_bLineStyleRegistered;
+bool m_bAreaStyleRegistered;
 };
 
 inline void XFDrawStyle::SetArrowStart(const OUString& start, double size)
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
index 62abd3afbc11..f824dd5a8793 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
@@ -71,11 +71,18 @@ XFDrawStyle::XFDrawStyle()
 , m_fArrowEndSize(0.3)
 , m_bArrowStartCenter(false)
 , m_bArrowEndCenter(false)
+, m_bLineStyleRegistered(false)
+, m_bAreaStyleRegistered(false)
 {}
 
 XFDrawStyle::~XFDrawStyle()
 {
-//don't delete m_pLineStyle, it was managed by XFStyleManager.
+// normally don't delete m_pLineStyle, it was managed by XFStyleManager.
+if (!m_bLineStyleRegistered)
+delete m_pLineStyle;
+// normally don't delete m_pAreaStyle, it was managed by XFStyleManager.
+if (!m_bAreaStyleRegistered)
+delete m_pAreaStyle;
 }
 
 voidXFDrawStyle::SetLineStyle(double width, XFColor color)
@@ -104,6 +111,7 @@ voidXFDrawStyle::SetLineDashStyle(enumXFLineStyle 
style, double len1, double
 m_pLineStyle->SetDot2Length(len2);
 m_pLineStyle->SetSpace(space);
 XFStyleManager* pXFStyleManager = 
LwpGlobalMgr::GetInstance()->GetXFStyleManager();
+m_bLineStyleRegistered = true;
 pXFStyleManager->AddStyle(std::unique_ptr(m_pLineStyle));
 }
 
@@ -143,6 +151,7 @@ voidXFDrawStyle::SetAreaLineStyle(enumXFAreaLineStyle 
style, sal_Int32 angle
 m_pAreaStyle->SetLineSpace(space);
 m_pAreaStyle->SetLineColor(lineColor);
 XFStyleManager* pXFStyleManager = 
LwpGlobalMgr::GetInstance()->GetXFStyleManager();
+m_bAreaStyleRegistered = true;
 pXFStyleManager->AddStyle(std::unique_ptr(m_pAreaStyle));
 }
 


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2021-09-22 Thread Stephan Bergmann (via logerrit)
 lotuswordpro/inc/lwptools.hxx   |3 ++-
 lotuswordpro/source/filter/lwptools.cxx |5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit f8b6d1a2f48ce259ba2e75d41777293dfe23ab11
Author: Stephan Bergmann 
AuthorDate: Wed Sep 22 21:24:51 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Sep 22 23:22:54 2021 +0200

Extend loplugin:stringviewparam to starts/endsWith: lotuswordpro

Change-Id: Ia58c031d1157af271c664948946fa5d8d17a2323
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122493
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/lotuswordpro/inc/lwptools.hxx b/lotuswordpro/inc/lwptools.hxx
index 3ac63055b740..753a9bacdd06 100644
--- a/lotuswordpro/inc/lwptools.hxx
+++ b/lotuswordpro/inc/lwptools.hxx
@@ -69,6 +69,7 @@
 #include "xfilter/xftimestyle.hxx"
 #include 
 #include 
+#include 
 
 // 01/19/2005
 const sal_uInt32 UNITS_PER_INCH = 65536L * 72L;
@@ -97,7 +98,7 @@ public:
 inline static bool IsOddNumber(sal_uInt16 nNumber);
 inline static bool IsEvenNumber(sal_uInt16 nNumber);
 
-static bool isFileUrl(const OString& fileName);
+static bool isFileUrl(std::string_view fileName);
 static OUString convertToFileUrl(const OString& fileName);
 static OUStringDateTimeToOUString(const LtTm& dt);
 
diff --git a/lotuswordpro/source/filter/lwptools.cxx 
b/lotuswordpro/source/filter/lwptools.cxx
index 254d7fc7f6eb..9af6d1b4ffb3 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -60,6 +60,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -195,9 +196,9 @@ bool LwpTools::IsUnicodePacked(LwpObjectStream* pObjStrm, 
sal_uInt16 len)
 return false;
 }
 
-bool LwpTools::isFileUrl(const OString )
+bool LwpTools::isFileUrl(std::string_view fileName)
 {
-return fileName.startsWith("file://");
+return o3tl::starts_with(fileName, "file://");
 }
 
 OUString LwpTools::convertToFileUrl(const OString )


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2021-08-31 Thread Caolán McNamara (via logerrit)
 lotuswordpro/inc/lwpsvstream.hxx   |1 +
 lotuswordpro/source/filter/lwpidxmgr.cxx   |   10 ++
 lotuswordpro/source/filter/lwpobjhdr.cxx   |2 +-
 lotuswordpro/source/filter/lwpsvstream.cxx |2 ++
 4 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 312161673912bc60865493635f9820d11f2c58f3
Author: Caolán McNamara 
AuthorDate: Tue Aug 31 09:37:31 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue Aug 31 20:35:42 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

Change-Id: I4298dfeafab0fe296a970fce024cc25572e3a2b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121388
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/lwpsvstream.hxx b/lotuswordpro/inc/lwpsvstream.hxx
index a962f6e599d6..3cca958bb142 100644
--- a/lotuswordpro/inc/lwpsvstream.hxx
+++ b/lotuswordpro/inc/lwpsvstream.hxx
@@ -75,6 +75,7 @@ public:
 sal_uInt64 remainingSize();
 sal_Int64 Seek(sal_Int64 pos);
 bool CheckSeek(sal_Int64 pos);
+bool good() const;
 
 LwpSvStream& ReadUInt8(sal_uInt8& rUInt8);
 LwpSvStream& ReadUInt16(sal_uInt16& rUInt16);
diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx 
b/lotuswordpro/source/filter/lwpidxmgr.cxx
index 504533fb27cc..e9f34bf956d1 100644
--- a/lotuswordpro/source/filter/lwpidxmgr.cxx
+++ b/lotuswordpro/source/filter/lwpidxmgr.cxx
@@ -88,7 +88,8 @@ void LwpIndexManager::Read(LwpSvStream* pStrm)
 {
 //Read index obj
 LwpObjectHeader ObjHdr;
-ObjHdr.Read(*pStrm);
+if (!ObjHdr.Read(*pStrm))
+throw BadRead();
 std::unique_ptr xObjStrm(new LwpObjectStream(pStrm, 
ObjHdr.IsCompressed(),
 static_cast(ObjHdr.GetSize(;
 
@@ -224,9 +225,9 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* 
pObjStrm)
  */
 void LwpIndexManager::ReadObjIndex( LwpSvStream *pStrm )
 {
-
 LwpObjectHeader ObjHdr;
-ObjHdr.Read(*pStrm);
+if (!ObjHdr.Read(*pStrm))
+throw BadRead();
 LwpObjectStream aObjStrm(pStrm, ObjHdr.IsCompressed(),
 static_cast(ObjHdr.GetSize()) );
 
@@ -246,7 +247,8 @@ void LwpIndexManager::ReadObjIndex( LwpSvStream *pStrm )
 void LwpIndexManager::ReadLeafIndex( LwpSvStream *pStrm )
 {
 LwpObjectHeader ObjHdr;
-ObjHdr.Read(*pStrm);
+if (!ObjHdr.Read(*pStrm))
+throw BadRead();
 LwpObjectStream aObjStrm( pStrm, ObjHdr.IsCompressed(),
 static_cast(ObjHdr.GetSize()) );
 
diff --git a/lotuswordpro/source/filter/lwpobjhdr.cxx 
b/lotuswordpro/source/filter/lwpobjhdr.cxx
index aeb5c895fc11..37e3e077eaa3 100644
--- a/lotuswordpro/source/filter/lwpobjhdr.cxx
+++ b/lotuswordpro/source/filter/lwpobjhdr.cxx
@@ -195,7 +195,7 @@ bool LwpObjectHeader::Read(LwpSvStream& rStrm)
 }
 }
 sal_Int64 nEndPos = rStrm.Tell();
-return (nStartPos + nHeaderSize == nEndPos);
+return rStrm.good() && (nStartPos + nHeaderSize == nEndPos);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpsvstream.cxx 
b/lotuswordpro/source/filter/lwpsvstream.cxx
index dfd18168a728..7e485014c2de 100644
--- a/lotuswordpro/source/filter/lwpsvstream.cxx
+++ b/lotuswordpro/source/filter/lwpsvstream.cxx
@@ -90,6 +90,8 @@ LwpSvStream& LwpSvStream::ReadUInt32(sal_uInt32& rUInt32)
 return *this;
 }
 
+bool LwpSvStream::good() const { return m_pStream->good(); }
+
 /**
  * @descr   SeekRel in stream
 */


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/qa lotuswordpro/source

2021-08-26 Thread Caolán McNamara (via logerrit)
 lotuswordpro/inc/xfilter/xftable.hxx |2 +
 lotuswordpro/qa/cppunit/data/fail/ofz35646-1.lwp |binary
 lotuswordpro/source/filter/xfilter/xfcell.cxx|2 -
 lotuswordpro/source/filter/xfilter/xftable.cxx   |   32 ++-
 4 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit b67f42c4c2906b7059b93d748c8efccd588b1e1c
Author: Caolán McNamara 
AuthorDate: Wed Aug 25 17:42:17 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 26 09:56:08 2021 +0200

ofz#35646 Indirect-leak

Change-Id: Ie79d9c49b6beef04ab111a63166abc7f093ad36b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121041
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xftable.hxx 
b/lotuswordpro/inc/xfilter/xftable.hxx
index f36a1f295be6..ce292f3a258c 100644
--- a/lotuswordpro/inc/xfilter/xftable.hxx
+++ b/lotuswordpro/inc/xfilter/xftable.hxx
@@ -115,6 +115,8 @@ private:
 OUString   m_strDefCellStyle;
 OUString   m_strDefRowStyle;
 OUString   m_strDefColStyle;
+
+bool ContainsTable(const XFTable* pTable) const;
 };
 
 inline void XFTable::SetTableName(const OUString& name)
diff --git a/lotuswordpro/qa/cppunit/data/fail/ofz35646-1.lwp 
b/lotuswordpro/qa/cppunit/data/fail/ofz35646-1.lwp
new file mode 100644
index ..5db8cea8c5bd
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/ofz35646-1.lwp 
differ
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx 
b/lotuswordpro/source/filter/xfilter/xfcell.cxx
index bbfde6eab9f3..dfc5889db652 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx
@@ -157,7 +157,7 @@ OUString   XFCell::GetCellName()
 return name;
 }
 
-voidXFCell::ToXml(IXFStream *pStrm)
+void XFCell::ToXml(IXFStream *pStrm)
 {
 IXFAttrList *pAttrList = pStrm->GetAttrList();
 
diff --git a/lotuswordpro/source/filter/xfilter/xftable.cxx 
b/lotuswordpro/source/filter/xfilter/xftable.cxx
index 6acb1b21a35f..4326f218b1e2 100644
--- a/lotuswordpro/source/filter/xfilter/xftable.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftable.cxx
@@ -81,6 +81,30 @@ voidXFTable::SetColumnStyle(sal_Int32 col, const 
OUString& style)
 m_aColumns[col] = style;
 }
 
+bool XFTable::ContainsTable(const XFTable* pTable) const
+{
+for (auto const& elem : m_aRows)
+{
+const XFRow *pRow = elem.second.get();
+
+for (sal_Int32 i = 0; i < pRow->GetCellCount(); ++i)
+{
+const XFCell* pCell = pRow->GetCell(i + 1); //starts at 1, not 0
+if (const XFTable* pSubTable = pCell->GetSubTable())
+{
+if (pSubTable == pTable)
+return true;
+if (pTable->ContainsTable(pTable))
+return true;
+}
+if (pCell->HierarchyContains(pTable))
+return true;
+}
+}
+
+return false;
+}
+
 void XFTable::AddRow(rtl::Reference const & rRow)
 {
 assert(rRow);
@@ -88,8 +112,14 @@ void XFTable::AddRow(rtl::Reference const & rRow)
 for (sal_Int32 i = 0; i < rRow->GetCellCount(); ++i)
 {
 XFCell* pFirstCell = rRow->GetCell(i + 1); //starts at 1, not 0
-if (pFirstCell->GetSubTable() == this || 
pFirstCell->HierarchyContains(this))
+if (const XFTable* pSubTable = pFirstCell->GetSubTable())
+{
+if (pSubTable == this || pSubTable->ContainsTable(this))
+throw std::runtime_error("table is a subtable of itself");
+}
+if (pFirstCell->HierarchyContains(this))
 throw std::runtime_error("table is a subtable of itself");
+
 }
 
 int row = rRow->GetRow();


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/Library_lwpft.mk lotuswordpro/source

2021-04-26 Thread Caolán McNamara (via logerrit)
 lotuswordpro/Library_lwpft.mk |2 +
 lotuswordpro/inc/xfilter/xfcell.hxx   |2 +
 lotuswordpro/source/filter/lwprowlayout.cxx   |7 +---
 lotuswordpro/source/filter/lwptablelayout.cxx |   17 +--
 lotuswordpro/source/filter/lwptablelayout.hxx |   38 +++---
 5 files changed, 48 insertions(+), 18 deletions(-)

New commits:
commit 1388540fe16d0843de18a3d14bedbf2e0b6d8d49
Author: Caolán McNamara 
AuthorDate: Sun Apr 25 20:41:02 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Apr 26 14:56:21 2021 +0200

Revert "ofz#27296 Out-of-memory and ofz#27384 Indirect-leak"

This reverts commit c80c8ac4eb58812c1b72aa0b0cef01ebb5337359.

it seems blameless after all

Change-Id: If0f95da5ee7f91fde0b679c9314e3da07f7779f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114631
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk
index f35568d3647b..5965b385e1bc 100644
--- a/lotuswordpro/Library_lwpft.mk
+++ b/lotuswordpro/Library_lwpft.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
i18nlangtag \
 sfx \
 sot \
+svl \
 svt \
 svxcore \
 tl \
@@ -37,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
 
 $(eval $(call gb_Library_use_externals,lwpft,\
boost_headers \
+   mdds_headers \
 icui18n \
 icuuc \
 icu_headers \
diff --git a/lotuswordpro/inc/xfilter/xfcell.hxx 
b/lotuswordpro/inc/xfilter/xfcell.hxx
index 81ab8aa59028..1e75107019de 100644
--- a/lotuswordpro/inc/xfilter/xfcell.hxx
+++ b/lotuswordpro/inc/xfilter/xfcell.hxx
@@ -63,6 +63,7 @@
 
 #include 
 #include 
+#include 
 
 class XFTable;
 class XFRow;
@@ -71,6 +72,7 @@ class XFRow;
  * @descr   Table cell object.
  */
 class XFCell : public XFContentContainer
+ , public SfxBroadcaster
 {
 public:
 XFCell();
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx 
b/lotuswordpro/source/filter/lwprowlayout.cxx
index 3321f294469e..9590e41d9670 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -238,9 +238,7 @@ void LwpRowLayout::ConvertRow(rtl::Reference const 
& pXFTable,sal_uInt8
 m_ConnCellList[nMarkConnCell]->GetColID());
 
 //set all cell in this merge cell to cellsmap
-for (sal_uInt16 nRowLoop = crowid; nRowLoop < nRowMark; nRowLoop++)
-for (sal_uInt16 nColLoop = i; nColLoop < nColID+1; nColLoop++)
-pTableLayout->SetCellsMap(nRowLoop,nColLoop, 
xXFCell.get());
+pTableLayout->SetCellsMap(crowid, i, nRowMark - 1, nColID, 
xXFCell.get());
 
 i += m_ConnCellList[nMarkConnCell]->GetNumcols();
 nMarkConnCell = 
FindNextMarkConnCell(static_cast(nMarkConnCell),nEndCol);
@@ -433,8 +431,7 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference 
const & pXFTable, sa
 }
 xRow->AddCell(xCell);
 
-for (sal_uInt8 j=nCellStartCol;j<=nCellEndCol;j++)
-pTableLayout->SetCellsMap(crowid,j, xCell.get());//set to cellsmap
+pTableLayout->SetCellsMap(crowid, nCellStartCol, crowid, nCellEndCol, 
xCell.get()); //set to cellsmap
 }
 
 pXFTable->AddRow(xRow);
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx 
b/lotuswordpro/source/filter/lwptablelayout.cxx
index 1deb854f333c..4f2c4c8d30ca 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1415,10 +1415,10 @@ void 
LwpTableLayout::ConvertDefaultRow(rtl::Reference const & pXFTable,
  * @param   nRow - row id
  * @param   nCol - column id
  */
-void LwpTableLayout::SetCellsMap(sal_uInt16 nRow, sal_uInt8 nCol, XFCell* 
pXFCell)
+void LwpTableLayout::SetCellsMap(sal_uInt16 nRow1, sal_uInt8 nCol1,
+ sal_uInt16 nRow2, sal_uInt8 nCol2, XFCell* 
pXFCell)
 {
-// combine the 16bit nRow and 8bit nCol into a single 32bit number
-m_CellsMap.insert(std::make_pair((nRow << 8) | nCol, pXFCell));
+m_CellsMap.insert({{nRow1, nCol1}, {nRow2, nCol2}}, pXFCell);
 }
 
 /**
@@ -1429,13 +1429,12 @@ void LwpTableLayout::SetCellsMap(sal_uInt16 nRow, 
sal_uInt8 nCol, XFCell* pXFCel
  */
 XFCell* LwpTableLayout::GetCellsMap(sal_uInt16 nRow, sal_uInt8 nCol)
 {
-RowCol pos = (nRow << 8) | nCol;
-auto iter =  m_CellsMap.find(pos);
-if (iter == m_CellsMap.end())
-return nullptr;
-return iter->second;
+auto results = m_CellsMap.search({{nRow, nCol}, {nRow, nCol}}, 
rt_type::search_type::overlap);
+if (results.begin() == results.end())
+   return nullptr;
+// return the last thing inserted for this position
+return std::prev(results.end())->GetCell();
 }
-
 /**
  * @descr   Get row layout by row id
  * @param   nRow - row id
diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/Library_lwpft.mk lotuswordpro/source

2021-04-17 Thread Caolán McNamara (via logerrit)
 lotuswordpro/Library_lwpft.mk |2 -
 lotuswordpro/inc/xfilter/xfcell.hxx   |2 -
 lotuswordpro/source/filter/lwprowlayout.cxx   |7 +++-
 lotuswordpro/source/filter/lwptablelayout.cxx |   17 ++-
 lotuswordpro/source/filter/lwptablelayout.hxx |   38 ++
 5 files changed, 18 insertions(+), 48 deletions(-)

New commits:
commit c80c8ac4eb58812c1b72aa0b0cef01ebb5337359
Author: Caolán McNamara 
AuthorDate: Sat Apr 17 19:41:35 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sat Apr 17 22:16:22 2021 +0200

ofz#27296 Out-of-memory and ofz#27384 Indirect-leak

Revert "ofz#27012 detect deletion of XFCell"

This reverts commit e40d28d65222ba462c20ede17da5ef54751932e3.

and

Revert "ofz#26357 Timeout in lwpfuzzer, 12s -> 1.3s"

This reverts commit 473c1b05f7a7a5500a2e15b911263b546792b013.

Change-Id: Ia4d37148745259a285523b1b45ca9838c4122b89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114234
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk
index 5965b385e1bc..f35568d3647b 100644
--- a/lotuswordpro/Library_lwpft.mk
+++ b/lotuswordpro/Library_lwpft.mk
@@ -27,7 +27,6 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
i18nlangtag \
 sfx \
 sot \
-svl \
 svt \
 svxcore \
 tl \
@@ -38,7 +37,6 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
 
 $(eval $(call gb_Library_use_externals,lwpft,\
boost_headers \
-   mdds_headers \
 icui18n \
 icuuc \
 icu_headers \
diff --git a/lotuswordpro/inc/xfilter/xfcell.hxx 
b/lotuswordpro/inc/xfilter/xfcell.hxx
index 1e75107019de..81ab8aa59028 100644
--- a/lotuswordpro/inc/xfilter/xfcell.hxx
+++ b/lotuswordpro/inc/xfilter/xfcell.hxx
@@ -63,7 +63,6 @@
 
 #include 
 #include 
-#include 
 
 class XFTable;
 class XFRow;
@@ -72,7 +71,6 @@ class XFRow;
  * @descr   Table cell object.
  */
 class XFCell : public XFContentContainer
- , public SfxBroadcaster
 {
 public:
 XFCell();
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx 
b/lotuswordpro/source/filter/lwprowlayout.cxx
index 9590e41d9670..3321f294469e 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -238,7 +238,9 @@ void LwpRowLayout::ConvertRow(rtl::Reference const 
& pXFTable,sal_uInt8
 m_ConnCellList[nMarkConnCell]->GetColID());
 
 //set all cell in this merge cell to cellsmap
-pTableLayout->SetCellsMap(crowid, i, nRowMark - 1, nColID, 
xXFCell.get());
+for (sal_uInt16 nRowLoop = crowid; nRowLoop < nRowMark; nRowLoop++)
+for (sal_uInt16 nColLoop = i; nColLoop < nColID+1; nColLoop++)
+pTableLayout->SetCellsMap(nRowLoop,nColLoop, 
xXFCell.get());
 
 i += m_ConnCellList[nMarkConnCell]->GetNumcols();
 nMarkConnCell = 
FindNextMarkConnCell(static_cast(nMarkConnCell),nEndCol);
@@ -431,7 +433,8 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference 
const & pXFTable, sa
 }
 xRow->AddCell(xCell);
 
-pTableLayout->SetCellsMap(crowid, nCellStartCol, crowid, nCellEndCol, 
xCell.get()); //set to cellsmap
+for (sal_uInt8 j=nCellStartCol;j<=nCellEndCol;j++)
+pTableLayout->SetCellsMap(crowid,j, xCell.get());//set to cellsmap
 }
 
 pXFTable->AddRow(xRow);
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx 
b/lotuswordpro/source/filter/lwptablelayout.cxx
index 4f2c4c8d30ca..1deb854f333c 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1415,10 +1415,10 @@ void 
LwpTableLayout::ConvertDefaultRow(rtl::Reference const & pXFTable,
  * @param   nRow - row id
  * @param   nCol - column id
  */
-void LwpTableLayout::SetCellsMap(sal_uInt16 nRow1, sal_uInt8 nCol1,
- sal_uInt16 nRow2, sal_uInt8 nCol2, XFCell* 
pXFCell)
+void LwpTableLayout::SetCellsMap(sal_uInt16 nRow, sal_uInt8 nCol, XFCell* 
pXFCell)
 {
-m_CellsMap.insert({{nRow1, nCol1}, {nRow2, nCol2}}, pXFCell);
+// combine the 16bit nRow and 8bit nCol into a single 32bit number
+m_CellsMap.insert(std::make_pair((nRow << 8) | nCol, pXFCell));
 }
 
 /**
@@ -1429,12 +1429,13 @@ void LwpTableLayout::SetCellsMap(sal_uInt16 nRow1, 
sal_uInt8 nCol1,
  */
 XFCell* LwpTableLayout::GetCellsMap(sal_uInt16 nRow, sal_uInt8 nCol)
 {
-auto results = m_CellsMap.search({{nRow, nCol}, {nRow, nCol}}, 
rt_type::search_type::overlap);
-if (results.begin() == results.end())
-   return nullptr;
-// return the last thing inserted for this position
-return std::prev(results.end())->GetCell();
+RowCol pos = (nRow << 8) | nCol;
+auto iter =  m_CellsMap.find(pos);
+if (iter == m_CellsMap.end())
+return nullptr;
+return iter->second;
 }
+
 /**
  * @descr   Get row 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2020-11-24 Thread Noel (via logerrit)
 lotuswordpro/inc/lwpfoundry.hxx   |2 +-
 lotuswordpro/source/filter/lwpfoundry.cxx |2 +-
 lotuswordpro/source/filter/lwpfribsection.cxx |6 +++---
 lotuswordpro/source/filter/lwptoc.cxx |4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit a153ece6da428f137d5161f853825239d5fe4582
Author: Noel 
AuthorDate: Tue Nov 24 11:07:05 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 24 14:17:03 2020 +0100

FindActuralStyleName->FindActualStyleName

Change-Id: I25e021caeb1c71529350df95099fb344edfd5b81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106482
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/lwpfoundry.hxx b/lotuswordpro/inc/lwpfoundry.hxx
index 6f5776d3c286..73d03a6642f9 100644
--- a/lotuswordpro/inc/lwpfoundry.hxx
+++ b/lotuswordpro/inc/lwpfoundry.hxx
@@ -268,7 +268,7 @@ public:
 LwpBulletStyleMgr* GetBulletStyleMgr() { return m_xBulletStyleMgr.get(); }
 
 LwpObjectID* FindParaStyleByName(std::u16string_view name);
-OUString FindActuralStyleName(const OUString& name);
+OUString FindActualStyleName(const OUString& name);
 };
 
 class LwpStyleManager
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx 
b/lotuswordpro/source/filter/lwpfoundry.cxx
index 5c3d12524fdb..07a5c872a45d 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -286,7 +286,7 @@ LwpObjectID * 
LwpFoundry::FindParaStyleByName(std::u16string_view name)
 * @descr:   Get style name registered according the original style name
 *
 */
-OUString LwpFoundry::FindActuralStyleName(const OUString& name)
+OUString LwpFoundry::FindActualStyleName(const OUString& name)
 {
 LwpObjectID* pID = FindParaStyleByName(name);
 if(pID)
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx 
b/lotuswordpro/source/filter/lwpfribsection.cxx
index 0e0e34df16f9..f411a8bbb957 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -177,7 +177,7 @@ void LwpFribSection::ParseSection()
 void LwpFribSection::SetDefaultAlphaIndex(XFIndex* pXFIndex)
 {
 LwpFoundry* pFoundry = m_pPara->GetFoundry();
-OUString styleName = pFoundry->FindActuralStyleName("Separator");
+OUString styleName = pFoundry->FindActualStyleName("Separator");
 
 LwpIndexSection* pIndexSection = 
dynamic_cast(m_Section.obj().get());
 XFIndexTemplate* pTemplateSep = new XFIndexTemplate();
@@ -189,7 +189,7 @@ void LwpFribSection::SetDefaultAlphaIndex(XFIndex* pXFIndex)
 //pXFIndex->AddTemplate("separator","Separator",pTemplateSep);
 pXFIndex->AddTemplate("separator", styleName, pTemplateSep);
 
-styleName = pFoundry->FindActuralStyleName("Primary");
+styleName = pFoundry->FindActualStyleName("Primary");
 
 XFIndexTemplate* pTemplate1 = new XFIndexTemplate();
 pTemplate1->AddEntry(enumXFIndexTemplateText, "");
@@ -218,7 +218,7 @@ void LwpFribSection::SetDefaultAlphaIndex(XFIndex* pXFIndex)
 {
 //pXFIndex->AddTemplate(OUString::number(2),"Secondary",pTemplate2);
 //pXFIndex->AddTemplate(OUString::number(3),"Secondary",pTemplate3);
-styleName = pFoundry->FindActuralStyleName("Secondary");
+styleName = pFoundry->FindActualStyleName("Secondary");
 pXFIndex->AddTemplate(OUString::number(2), styleName, pTemplate2);
 pXFIndex->AddTemplate(OUString::number(3), styleName, pTemplate3);
 }
diff --git a/lotuswordpro/source/filter/lwptoc.cxx 
b/lotuswordpro/source/filter/lwptoc.cxx
index 30de25746d6c..9268f8e33106 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -222,7 +222,7 @@ void  LwpTocSuperLayout::XFConvert(XFContentContainer* 
pCont)
 pTemplate->AddEntry(enumXFIndexTemplatePage, "TOC Page 
Number Text Style");
 }
 
-xToc->AddTemplate(OUString::number(static_cast(i)), 
 m_pFoundry->FindActuralStyleName(pLevel->GetSearchStyle()), pTemplate);
+xToc->AddTemplate(OUString::number(static_cast(i)), 
 m_pFoundry->FindActualStyleName(pLevel->GetSearchStyle()), pTemplate);
 bInserted = true;
 }
 
@@ -320,7 +320,7 @@ void LwpTocSuperLayout::AddSourceStyle(XFIndex* pToc, 
LwpTocLevelData * pLevel,
 LwpDocument * pDoc = pFoundry->GetDocument();
 if (pDoc && pDoc->IsChildDoc())
 {
-OUString sSodcStyleName = 
pFoundry->FindActuralStyleName(sLwpStyleName);
+OUString sSodcStyleName = pFoundry->FindActualStyleName(sLwpStyleName);
 pToc->AddTocSource(pLevel->GetLevel(), sSodcStyleName);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source solenv/clang-format

2020-11-18 Thread Philipp Hofer (via logerrit)
 lotuswordpro/inc/localtime.hxx |   20 
 lotuswordpro/inc/lwpatomholder.hxx |   18 
 lotuswordpro/inc/lwpbasetype.hxx   |   15 
 lotuswordpro/inc/lwpfilehdr.hxx|   14 
 lotuswordpro/inc/lwpfrib.hxx   |   37 -
 lotuswordpro/inc/lwpglobalmgr.hxx  |   16 
 lotuswordpro/inc/lwpobj.hxx|   15 
 lotuswordpro/inc/lwpobjstrm.hxx|   30 -
 lotuswordpro/inc/lwpsvstream.hxx   |   20 
 lotuswordpro/inc/xfilter/ixfstream.hxx |   14 
 lotuswordpro/inc/xfilter/ixfstyle.hxx  |   22 
 lotuswordpro/inc/xfilter/xfannotation.hxx  |   32 -
 lotuswordpro/inc/xfilter/xfarrowstyle.hxx  |   52 -
 lotuswordpro/inc/xfilter/xfbgimage.hxx |   32 -
 lotuswordpro/inc/xfilter/xfcellstyle.hxx   |   33 -
 lotuswordpro/inc/xfilter/xfchange.hxx  |   35 -
 lotuswordpro/inc/xfilter/xfcolstyle.hxx|   20 
 lotuswordpro/inc/xfilter/xfconfigmanager.hxx   |   12 
 lotuswordpro/inc/xfilter/xfcontentcontainer.hxx|   20 
 lotuswordpro/inc/xfilter/xfcrossref.hxx|   18 
 lotuswordpro/inc/xfilter/xfdatestyle.hxx   |   52 -
 lotuswordpro/inc/xfilter/xfdrawgroup.hxx   |   21 
 lotuswordpro/inc/xfilter/xfdrawpath.hxx|   27 
 lotuswordpro/inc/xfilter/xfdrawpolyline.hxx|   10 
 lotuswordpro/inc/xfilter/xfdrawrect.hxx|   14 
 lotuswordpro/inc/xfilter/xfdrawstyle.hxx   |   31 -
 lotuswordpro/inc/xfilter/xfentry.hxx   |   37 -
 lotuswordpro/inc/xfilter/xffloatframe.hxx  |9 
 lotuswordpro/inc/xfilter/xffontdecl.hxx|   10 
 lotuswordpro/inc/xfilter/xffooter.hxx  |   12 
 lotuswordpro/inc/xfilter/xffooterstyle.hxx |   11 
 lotuswordpro/inc/xfilter/xffootnote.hxx|   36 -
 lotuswordpro/inc/xfilter/xfglobal.hxx  |   40 -
 lotuswordpro/inc/xfilter/xfheader.hxx  |   13 
 lotuswordpro/inc/xfilter/xfheaderstyle.hxx |   36 -
 lotuswordpro/inc/xfilter/xfhyperlink.hxx   |   59 --
 lotuswordpro/inc/xfilter/xfimagestyle.hxx  |   30 -
 lotuswordpro/inc/xfilter/xflinebreak.hxx   |   10 
 lotuswordpro/inc/xfilter/xflist.hxx|   22 
 lotuswordpro/inc/xfilter/xflistitem.hxx|   36 -
 lotuswordpro/inc/xfilter/xfmasterpage.hxx  |   10 
 lotuswordpro/inc/xfilter/xfofficemeta.hxx  |   22 
 lotuswordpro/inc/xfilter/xfpagecount.hxx   |   10 
 lotuswordpro/inc/xfilter/xfpagenumber.hxx  |   21 
 lotuswordpro/inc/xfilter/xfplaceholder.hxx |   53 -
 lotuswordpro/inc/xfilter/xfrowstyle.hxx|   22 
 lotuswordpro/inc/xfilter/xfruby.hxx|   40 -
 lotuswordpro/inc/xfilter/xfrubystyle.hxx   |   31 -
 lotuswordpro/inc/xfilter/xfsectionstyle.hxx|   16 
 lotuswordpro/inc/xfilter/xfstyle.hxx   |   24 
 lotuswordpro/inc/xfilter/xfstylecont.hxx   |   27 
 lotuswordpro/inc/xfilter/xftablestyle.hxx  |   32 -
 lotuswordpro/inc/xfilter/xftabstop.hxx |   10 
 lotuswordpro/inc/xfilter/xftextspan.hxx|   15 
 lotuswordpro/inc/xfilter/xftextstyle.hxx   |   18 
 lotuswordpro/inc/xfilter/xfutil.hxx|   26 
 lotuswordpro/source/filter/benlist.cxx |   23 
 lotuswordpro/source/filter/benobj.cxx  |   15 
 lotuswordpro/source/filter/explode.hxx |   37 -
 lotuswordpro/source/filter/first.hxx   |6 
 lotuswordpro/source/filter/localtime.cxx   |   32 -
 lotuswordpro/source/filter/lwp9reader.cxx  |   58 +-
 lotuswordpro/source/filter/lwp9reader.hxx  |8 
 lotuswordpro/source/filter/lwpatomholder.cxx   |   18 
 lotuswordpro/source/filter/lwpbackgroundstuff.cxx  |   28 -
 lotuswordpro/source/filter/lwpbackgroundstuff.hxx  |   12 
 lotuswordpro/source/filter/lwpbasetype.cxx |   14 
 lotuswordpro/source/filter/lwpbreaksoverride.cxx   |   29 -
 lotuswordpro/source/filter/lwpbreaksoverride.hxx   |   41 -
 lotuswordpro/source/filter/lwpcharacterstyle.cxx   |   28 -
 lotuswordpro/source/filter/lwpcharborderoverride.hxx   |   14 
 lotuswordpro/source/filter/lwpcharsetmgr.cxx   |   53 -
 lotuswordpro/source/filter/lwpcontent.cxx  |   15 
 lotuswordpro/source/filter/lwpdivinfo.cxx  |   20 
 lotuswordpro/source/filter/lwpdivinfo.hxx  |   21 
 lotuswordpro/source/filter/lwpdivopts.hxx  |   10 
 lotuswordpro/source/filter/lwpdlvlist.cxx  |   51 -
 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/Library_lwpft.mk lotuswordpro/source

2020-11-06 Thread Caolán McNamara (via logerrit)
 lotuswordpro/Library_lwpft.mk |1 
 lotuswordpro/inc/xfilter/xfcell.hxx   |2 +
 lotuswordpro/source/filter/lwptablelayout.cxx |2 -
 lotuswordpro/source/filter/lwptablelayout.hxx |   30 +-
 4 files changed, 33 insertions(+), 2 deletions(-)

New commits:
commit e40d28d65222ba462c20ede17da5ef54751932e3
Author: Caolán McNamara 
AuthorDate: Fri Nov 6 10:35:31 2020 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 6 15:01:21 2020 +0100

ofz#27012 detect deletion of XFCell

Change-Id: I22aabfcbb43c09ab174176a2a2898b4bf0b55afc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105395
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk
index e7536e9f7a64..5965b385e1bc 100644
--- a/lotuswordpro/Library_lwpft.mk
+++ b/lotuswordpro/Library_lwpft.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
i18nlangtag \
 sfx \
 sot \
+svl \
 svt \
 svxcore \
 tl \
diff --git a/lotuswordpro/inc/xfilter/xfcell.hxx 
b/lotuswordpro/inc/xfilter/xfcell.hxx
index 81ab8aa59028..1e75107019de 100644
--- a/lotuswordpro/inc/xfilter/xfcell.hxx
+++ b/lotuswordpro/inc/xfilter/xfcell.hxx
@@ -63,6 +63,7 @@
 
 #include 
 #include 
+#include 
 
 class XFTable;
 class XFRow;
@@ -71,6 +72,7 @@ class XFRow;
  * @descr   Table cell object.
  */
 class XFCell : public XFContentContainer
+ , public SfxBroadcaster
 {
 public:
 XFCell();
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx 
b/lotuswordpro/source/filter/lwptablelayout.cxx
index b6a61d9198ce..f49c3f01dc68 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -1433,7 +1433,7 @@ XFCell* LwpTableLayout::GetCellsMap(sal_uInt16 nRow, 
sal_uInt8 nCol)
 if (results.begin() == results.end())
return nullptr;
 // return the last thing inserted for this position
-return *std::prev(results.end());
+return std::prev(results.end())->GetCell();
 }
 /**
  * @descr   Get row layout by row id
diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx 
b/lotuswordpro/source/filter/lwptablelayout.hxx
index fe8312414587..ca4d46812e55 100644
--- a/lotuswordpro/source/filter/lwptablelayout.hxx
+++ b/lotuswordpro/source/filter/lwptablelayout.hxx
@@ -63,6 +63,8 @@
 
 #include "lwplayout.hxx"
 #include 
+#include 
+#include 
 
 #include 
 
@@ -96,6 +98,31 @@ struct TableConvertAttempt
 }
 };
 
+class XFCellListener : public SfxListener
+{
+public:
+XFCellListener(XFCell* pCell)
+: m_pCell(pCell)
+{
+if (m_pCell)
+StartListening(*m_pCell);
+}
+
+XFCell* GetCell()
+{
+return m_pCell;
+}
+
+private:
+XFCell* m_pCell;
+
+virtual void Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) override
+{
+if (rHint.GetId() == SfxHintId::Dying)
+m_pCell = nullptr;
+}
+};
+
 /**
  * @brief
  * VO_TABLELAYOUT object and functions for registering styles and converting 
tables
@@ -167,11 +194,12 @@ private:
 rtl::Reference m_pXFTable;
 bool m_bConverted;
 
-using rt_type = mdds::rtree;
+using rt_type = mdds::rtree;
 rt_type m_CellsMap;
 
 void PutCellVals(LwpFoundry* pFoundry, LwpObjectID aTableID);
 };
+
 /**
  * @brief
  * VO_SUPERTABLELAYOUT object
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc odk/examples odk/source offapi/com oox/source pyuno/IwyuFilter_pyuno.yaml qadevOOo/tests ridljar/com sc/inc stoc/source svtools/source svx/source sw/qa

2020-08-21 Thread Andrea Gelmini (via logerrit)
 lotuswordpro/inc/xfilter/xfpadding.hxx 
   |2 +-
 
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
 |2 +-
 odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java 
   |2 +-
 odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile 
   |2 +-
 odk/source/com/sun/star/lib/loader/InstallationFinder.java 
   |2 +-
 offapi/com/sun/star/chart2/Symbol.idl  
   |2 +-
 offapi/com/sun/star/deployment/XPackageRegistry.idl
   |2 +-
 offapi/com/sun/star/security/ExtAltNameType.idl
   |2 +-
 offapi/com/sun/star/xml/sax/InputSource.idl
   |2 +-
 oox/source/export/drawingml.cxx
   |2 +-
 oox/source/ole/axcontrol.cxx   
   |2 +-
 pyuno/IwyuFilter_pyuno.yaml
   |2 +-
 qadevOOo/tests/java/ifc/sdbc/_XCloseable.java  
   |2 +-
 qadevOOo/tests/java/ifc/ucb/_XCommandProcessor.java
   |2 +-
 qadevOOo/tests/java/mod/_svx/SvxUnoText.java   
   |2 +-
 ridljar/com/sun/star/lib/util/DisposeListener.java 
   |2 +-
 sc/inc/funcdesc.hxx
   |2 +-
 stoc/source/servicemanager/servicemanager.cxx  
   |4 ++--
 svtools/source/config/apearcfg.cxx 
   |8 
 svtools/source/config/menuoptions.cxx  
   |2 +-
 svx/source/fmcomp/gridcell.cxx 
   |2 +-
 svx/source/xoutdev/_xpoly.cxx  
   |4 ++--
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
   |2 +-
 23 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit a33a8f221626bb833cae5c916f096c12a4226f77
Author: Andrea Gelmini 
AuthorDate: Thu Aug 20 12:50:00 2020 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 21 18:18:36 2020 +0200

Fix typos

Change-Id: I8dc0cdcfe6bd90efc596df28e6c6d968b92618b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101098
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/lotuswordpro/inc/xfilter/xfpadding.hxx 
b/lotuswordpro/inc/xfilter/xfpadding.hxx
index 69e30723b822..6276a8623de7 100644
--- a/lotuswordpro/inc/xfilter/xfpadding.hxx
+++ b/lotuswordpro/inc/xfilter/xfpadding.hxx
@@ -70,7 +70,7 @@
 
 /**
  * @brief
- * Padings for paragraph,frame,...
+ * Paddings for paragraph,frame, ...
  */
 class XFPadding
 {
diff --git 
a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
 
b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
index e85570b49555..fb1edb6b8fbb 100644
--- 
a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
+++ 
b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/Makefile
@@ -32,7 +32,7 @@
 # 
 #**
 
-# Builds the ProtoclHandlerAddon Java component example of the SDK.
+# Builds the ProtocolHandlerAddon Java component example of the SDK.
 
 PRJ=../../../../..
 SETTINGS=$(PRJ)/settings
diff --git a/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java 
b/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
index b2108db18deb..5061a4b3668f 100644
--- a/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
@@ -126,7 +126,7 @@ public class ControlAndSelectDemo
 XController xController = xModel.getCurrentController();
 XSelectionSupplier xSelectionSupplier =UnoRuntime.queryInterface( 
XSelectionSupplier.class, xController );
 // take care to use the global service factory only and not the one
-// that is provided by the component if you create the 
ShapeColletion
+// that is provided by the component if you create the 
ShapeCollection
 XShapes xSelection = UnoRuntime.queryInterface( XShapes.class,
 xOfficeContext.getServiceManager().createInstanceWithContext(
 "com.sun.star.drawing.ShapeCollection", xOfficeContext ) );
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile 
b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile
index b4179de724b2..5b0462b25e05 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile
+++ 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2020-07-29 Thread Caolán McNamara (via logerrit)
 lotuswordpro/inc/xfilter/xfcontentcontainer.hxx   |2 +
 lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx |   18 ++
 lotuswordpro/source/filter/xfilter/xftable.cxx|2 -
 3 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit b1dc1c740e37639bb309f4aa6a1c2567f99083fc
Author: Caolán McNamara 
AuthorDate: Wed Jul 29 13:51:14 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jul 29 16:15:34 2020 +0200

ofz#24404 row insert attempt in table with same table already in the row

Change-Id: I0f52de029600b182e479af3bdf56da7ea2c2ef01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99691
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx 
b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
index f3a843f1481f..e8ad3347ebab 100644
--- a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
+++ b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
@@ -125,6 +125,8 @@ public:
  */
 virtual void ToXml(IXFStream *pStrm) override;
 
+bool HierarchyContains(const XFContent *pContent) const;
+
 private:
 std::vector< rtl::Reference >m_aContents;
 };
diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx 
b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
index b64ad72721a4..14aaea9515df 100644
--- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
@@ -80,6 +80,24 @@ void XFContentContainer::Add(const OUString& text)
 Add(xTC.get());
 }
 
+bool XFContentContainer::HierarchyContains(const XFContent *pContent) const
+{
+if (pContent == this)
+return true;
+
+for (int i = 0, nCount = GetCount(); i < nCount; i++)
+{
+rtl::Reference xContent = GetContent(i);
+if (xContent.get() == pContent)
+return true;
+const XFContentContainer *pChildCont = dynamic_cast(xContent.get());
+if (pChildCont && pChildCont->HierarchyContains(pContent))
+return true;
+}
+
+return false;
+}
+
 int XFContentContainer::GetCount() const
 {
 return m_aContents.size();
diff --git a/lotuswordpro/source/filter/xfilter/xftable.cxx 
b/lotuswordpro/source/filter/xfilter/xftable.cxx
index 07da1a57d4fc..6acb1b21a35f 100644
--- a/lotuswordpro/source/filter/xfilter/xftable.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftable.cxx
@@ -88,7 +88,7 @@ void XFTable::AddRow(rtl::Reference const & rRow)
 for (sal_Int32 i = 0; i < rRow->GetCellCount(); ++i)
 {
 XFCell* pFirstCell = rRow->GetCell(i + 1); //starts at 1, not 0
-if (pFirstCell->GetSubTable() == this)
+if (pFirstCell->GetSubTable() == this || 
pFirstCell->HierarchyContains(this))
 throw std::runtime_error("table is a subtable of itself");
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/IwyuFilter_lotuswordpro.yaml lotuswordpro/source

2020-04-21 Thread Gabor Kelemen (via logerrit)
 lotuswordpro/IwyuFilter_lotuswordpro.yaml   |   69 +++--
 lotuswordpro/inc/lwpheader.hxx  |   80 
 lotuswordpro/source/filter/LotusWordProImportFilter.hxx |3 
 lotuswordpro/source/filter/bencont.cxx  |1 
 lotuswordpro/source/filter/bento.hxx|4 
 lotuswordpro/source/filter/first.hxx|3 
 lotuswordpro/source/filter/lwp9reader.hxx   |2 
 lotuswordpro/source/filter/lwpbulletstylemgr.cxx|1 
 lotuswordpro/source/filter/lwpbulletstylemgr.hxx|3 
 lotuswordpro/source/filter/lwpcelllayout.cxx|2 
 lotuswordpro/source/filter/lwpcelllayout.hxx|5 -
 lotuswordpro/source/filter/lwpcharacterstyle.hxx|1 
 lotuswordpro/source/filter/lwpcharsetmgr.hxx|2 
 lotuswordpro/source/filter/lwpcontent.hxx   |4 
 lotuswordpro/source/filter/lwpdivinfo.cxx   |1 
 lotuswordpro/source/filter/lwpdivinfo.hxx   |4 
 lotuswordpro/source/filter/lwpdivopts.hxx   |6 -
 lotuswordpro/source/filter/lwpdoc.cxx   |4 
 lotuswordpro/source/filter/lwpdoc.hxx   |7 -
 lotuswordpro/source/filter/lwpdrawobj.hxx   |3 
 lotuswordpro/source/filter/lwpfnlayout.hxx  |1 
 lotuswordpro/source/filter/lwpframelayout.cxx   |1 
 lotuswordpro/source/filter/lwpframelayout.hxx   |3 
 lotuswordpro/source/filter/lwpfribbreaks.cxx|1 
 lotuswordpro/source/filter/lwpfribbreaks.hxx|1 
 lotuswordpro/source/filter/lwpfribframe.hxx |1 
 lotuswordpro/source/filter/lwpfribmark.hxx  |1 
 lotuswordpro/source/filter/lwpgrfobj.hxx|3 
 lotuswordpro/source/filter/lwphyperlinkmgr.hxx  |2 
 lotuswordpro/source/filter/lwplayout.cxx|1 
 lotuswordpro/source/filter/lwplayout.hxx|5 -
 lotuswordpro/source/filter/lwplnopts.hxx|3 
 lotuswordpro/source/filter/lwpmarker.hxx|2 
 lotuswordpro/source/filter/lwpnumericfmt.cxx|1 
 lotuswordpro/source/filter/lwpnumericfmt.hxx|3 
 lotuswordpro/source/filter/lwpobjfactory.cxx|1 
 lotuswordpro/source/filter/lwpoleobject.hxx |7 -
 lotuswordpro/source/filter/lwppagehint.hxx  |1 
 lotuswordpro/source/filter/lwppagelayout.cxx|1 
 lotuswordpro/source/filter/lwppara.cxx  |1 
 lotuswordpro/source/filter/lwppara.hxx  |6 -
 lotuswordpro/source/filter/lwppara1.cxx |1 
 lotuswordpro/source/filter/lwpparaproperty.hxx  |7 +
 lotuswordpro/source/filter/lwpparastyle.hxx |1 
 lotuswordpro/source/filter/lwppiece.hxx |2 
 lotuswordpro/source/filter/lwpproplist.hxx  |1 
 lotuswordpro/source/filter/lwpprtinfo.cxx   |1 
 lotuswordpro/source/filter/lwpprtinfo.hxx   |1 
 lotuswordpro/source/filter/lwppttntbl.hxx   |2 
 lotuswordpro/source/filter/lwpsdwdrawheader.hxx |4 
 lotuswordpro/source/filter/lwpsdwfileloader.hxx |4 
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx   |2 
 lotuswordpro/source/filter/lwpsdwrect.cxx   |1 
 lotuswordpro/source/filter/lwpsdwrect.hxx   |2 
 lotuswordpro/source/filter/lwpsilverbullet.cxx  |1 
 lotuswordpro/source/filter/lwpsilverbullet.hxx  |5 -
 lotuswordpro/source/filter/lwpsortopt.hxx   |3 
 lotuswordpro/source/filter/lwpstory.hxx |1 
 lotuswordpro/source/filter/lwptable.cxx |1 
 lotuswordpro/source/filter/lwptable.hxx |3 
 lotuswordpro/source/filter/lwptablelayout.cxx   |2 
 lotuswordpro/source/filter/lwptablelayout.hxx   |1 
 lotuswordpro/source/filter/lwptblcell.cxx   |1 
 lotuswordpro/source/filter/lwptblcell.hxx   |3 
 lotuswordpro/source/filter/lwptblformula.hxx|5 +
 lotuswordpro/source/filter/lwpuidoc.hxx |3 
 lotuswordpro/source/filter/lwpusewhen.hxx   |3 
 lotuswordpro/source/filter/lwpusrdicts.hxx  |2 
 lotuswordpro/source/filter/tocread.cxx  |3 
 lotuswordpro/source/filter/tocread.hxx  |4 
 lotuswordpro/source/filter/utlist.hxx   |2 
 lotuswordpro/source/filter/xfilter/xfbase64.hxx |2 
 lotuswordpro/source/filter/xfilter/xffontworkstyle.hxx  |3 
 lotuswordpro/source/filter/xfilter/xfimage.cxx  |1 
 lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx|1 
 lotuswordpro/source/filter/xfilter/xftabstyle.hxx   |2 
 76 files changed, 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/IwyuFilter_lotuswordpro.yaml lotuswordpro/source

2020-04-06 Thread Gabor Kelemen (via logerrit)
 lotuswordpro/IwyuFilter_lotuswordpro.yaml  |   69 +
 lotuswordpro/inc/lwpatomholder.hxx |2 
 lotuswordpro/inc/lwpbasetype.hxx   |2 
 lotuswordpro/inc/lwpbookmarkmgr.hxx|5 -
 lotuswordpro/inc/lwpchangemgr.hxx  |5 -
 lotuswordpro/inc/lwpcolor.hxx  |2 
 lotuswordpro/inc/lwpdocdata.hxx|3 
 lotuswordpro/inc/lwpfont.hxx   |6 -
 lotuswordpro/inc/lwpfoundry.hxx|6 -
 lotuswordpro/inc/lwpfrib.hxx   |3 
 lotuswordpro/inc/lwpglobalmgr.hxx  |2 
 lotuswordpro/inc/lwpidxmgr.hxx |4 
 lotuswordpro/inc/lwpobj.hxx|2 
 lotuswordpro/inc/lwpobjfactory.hxx |3 
 lotuswordpro/inc/lwpobjhdr.hxx |3 
 lotuswordpro/inc/lwpobjid.hxx  |3 
 lotuswordpro/inc/lwpobjstrm.hxx|7 +
 lotuswordpro/inc/lwpsvstream.hxx   |4 
 lotuswordpro/inc/lwptools.hxx  |3 
 lotuswordpro/inc/xfilter/ixfstyle.hxx  |4 
 lotuswordpro/inc/xfilter/xfannotation.hxx  |4 
 lotuswordpro/inc/xfilter/xfarrowstyle.hxx  |1 
 lotuswordpro/inc/xfilter/xfborders.hxx |3 
 lotuswordpro/inc/xfilter/xfbreaks.hxx  |4 
 lotuswordpro/inc/xfilter/xfcell.hxx|1 
 lotuswordpro/inc/xfilter/xfchange.hxx  |1 
 lotuswordpro/inc/xfilter/xfcolor.hxx   |2 
 lotuswordpro/inc/xfilter/xfcolumns.hxx |3 
 lotuswordpro/inc/xfilter/xfconfigmanager.hxx   |1 
 lotuswordpro/inc/xfilter/xfcontent.hxx |1 
 lotuswordpro/inc/xfilter/xfdate.hxx|2 
 lotuswordpro/inc/xfilter/xfdatestyle.hxx   |2 
 lotuswordpro/inc/xfilter/xfdefs.hxx|2 
 lotuswordpro/inc/xfilter/xfdocfield.hxx|1 
 lotuswordpro/inc/xfilter/xfdrawgroup.hxx   |1 
 lotuswordpro/inc/xfilter/xfdrawobj.hxx |2 
 lotuswordpro/inc/xfilter/xfdrawpolygon.hxx |1 
 lotuswordpro/inc/xfilter/xfdropcap.hxx |4 
 lotuswordpro/inc/xfilter/xfendnote.hxx |2 
 lotuswordpro/inc/xfilter/xfendnoteconfig.hxx   |2 
 lotuswordpro/inc/xfilter/xffloatframe.hxx  |1 
 lotuswordpro/inc/xfilter/xffont.hxx|3 
 lotuswordpro/inc/xfilter/xffontdecl.hxx|2 
 lotuswordpro/inc/xfilter/xffontfactory.hxx |1 
 lotuswordpro/inc/xfilter/xffooter.hxx  |3 
 lotuswordpro/inc/xfilter/xffootnote.hxx|2 
 lotuswordpro/inc/xfilter/xffootnoteconfig.hxx  |1 
 lotuswordpro/inc/xfilter/xfframe.hxx   |1 
 lotuswordpro/inc/xfilter/xfframestyle.hxx  |1 
 lotuswordpro/inc/xfilter/xfglobal.hxx  |   10 --
 lotuswordpro/inc/xfilter/xfheader.hxx  |4 
 lotuswordpro/inc/xfilter/xfhyperlink.hxx   |4 
 lotuswordpro/inc/xfilter/xfimagestyle.hxx  |1 
 lotuswordpro/inc/xfilter/xfindex.hxx   |1 
 lotuswordpro/inc/xfilter/xfinputlist.hxx   |2 
 lotuswordpro/inc/xfilter/xflinebreak.hxx   |2 
 lotuswordpro/inc/xfilter/xflineheight.hxx  |4 
 lotuswordpro/inc/xfilter/xflinenumberconfig.hxx|1 
 lotuswordpro/inc/xfilter/xflist.hxx|1 
 lotuswordpro/inc/xfilter/xflistitem.hxx|3 
 lotuswordpro/inc/xfilter/xfliststyle.hxx   |3 
 lotuswordpro/inc/xfilter/xfmargins.hxx |2 
 lotuswordpro/inc/xfilter/xfmasterpage.hxx  |3 
 lotuswordpro/inc/xfilter/xfnumberstyle.hxx |1 
 lotuswordpro/inc/xfilter/xfnumfmt.hxx  |3 
 lotuswordpro/inc/xfilter/xfofficemeta.hxx  |2 
 lotuswordpro/inc/xfilter/xfpadding.hxx |3 
 lotuswordpro/inc/xfilter/xfpagecount.hxx   |3 
 lotuswordpro/inc/xfilter/xfpagemaster.hxx  |1 
 lotuswordpro/inc/xfilter/xfpagenumber.hxx  |1 
 lotuswordpro/inc/xfilter/xfparagraph.hxx   |2 
 lotuswordpro/inc/xfilter/xfparastyle.hxx   |1 
 lotuswordpro/inc/xfilter/xfplaceholder.hxx |1 
 lotuswordpro/inc/xfilter/xfrow.hxx |1 
 lotuswordpro/inc/xfilter/xfruby.hxx|1 
 lotuswordpro/inc/xfilter/xfrubystyle.hxx   |2 
 lotuswordpro/inc/xfilter/xfsaxstream.hxx   |5 -
 lotuswordpro/inc/xfilter/xfsection.hxx   

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source solenv/clang-format

2020-03-02 Thread Muhammet Kara (via logerrit)
 lotuswordpro/inc/lwpbookmarkmgr.hxx   |5 +-
 lotuswordpro/inc/lwpchangemgr.hxx |7 +--
 lotuswordpro/inc/lwpdocdata.hxx   |   11 +++-
 lotuswordpro/inc/lwpdropcapmgr.hxx|3 -
 lotuswordpro/inc/xfilter/ixfattrlist.hxx  |8 +--
 lotuswordpro/inc/xfilter/xfcontent.hxx|9 ++--
 lotuswordpro/inc/xfilter/xfdate.hxx   |8 +--
 lotuswordpro/inc/xfilter/xfdefs.hxx   |   14 +++---
 lotuswordpro/inc/xfilter/xfdrawline.hxx   |6 +-
 lotuswordpro/inc/xfilter/xfdrawpolygon.hxx|2 
 lotuswordpro/inc/xfilter/xfendnoteconfig.hxx  |3 -
 lotuswordpro/inc/xfilter/xffontfactory.hxx|8 +--
 lotuswordpro/inc/xfilter/xfimage.hxx  |8 +--
 lotuswordpro/inc/xfilter/xfparagraph.hxx  |7 +--
 lotuswordpro/inc/xfilter/xfsection.hxx|6 +-
 lotuswordpro/inc/xfilter/xftextboxstyle.hxx   |3 -
 lotuswordpro/inc/xfilter/xftextcontent.hxx|8 +--
 lotuswordpro/source/filter/bentoid.hxx|3 -
 lotuswordpro/source/filter/lwparrowstyles.hxx |   10 ++--
 lotuswordpro/source/filter/lwpbackgroundoverride.cxx  |2 
 lotuswordpro/source/filter/lwpbackgroundoverride.hxx  |7 +--
 lotuswordpro/source/filter/lwpbookmarkmgr.cxx |8 +--
 lotuswordpro/source/filter/lwpchangemgr.cxx   |   12 ++---
 lotuswordpro/source/filter/lwpcharborderoverride.cxx  |4 -
 lotuswordpro/source/filter/lwpcharsetmgr.hxx  |8 +--
 lotuswordpro/source/filter/lwpcolor.cxx   |8 +--
 lotuswordpro/source/filter/lwpfilter.hxx  |3 -
 lotuswordpro/source/filter/lwpfribsection.hxx |9 ++--
 lotuswordpro/source/filter/lwphyperlinkmgr.hxx|7 +--
 lotuswordpro/source/filter/lwpnumberingoverride.cxx   |5 +-
 lotuswordpro/source/filter/lwpobjfactory.cxx  |   40 +++---
 lotuswordpro/source/filter/lwppagehint.cxx|8 +--
 lotuswordpro/source/filter/lwpprtinfo.hxx |2 
 lotuswordpro/source/filter/lwpsdwfileloader.hxx   |5 +-
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx |6 +-
 lotuswordpro/source/filter/lwpsdwrect.hxx |8 +--
 lotuswordpro/source/filter/lwpusrdicts.hxx|4 -
 lotuswordpro/source/filter/lwpverdocument.cxx |9 ++--
 lotuswordpro/source/filter/lwpverdocument.hxx |3 -
 lotuswordpro/source/filter/lwpvpointer.hxx|5 +-
 lotuswordpro/source/filter/xfilter/xfbase64.hxx   |2 
 lotuswordpro/source/filter/xfilter/xffloatframe.cxx   |8 +--
 lotuswordpro/source/filter/xfilter/xffontdecl.cxx |1 
 lotuswordpro/source/filter/xfilter/xfglobal.cxx   |8 +--
 solenv/clang-format/blacklist |   22 -
 45 files changed, 154 insertions(+), 179 deletions(-)

New commits:
commit 1f84470abc6087fc6a3d01defae5043772bdd95e
Author: Muhammet Kara 
AuthorDate: Sun Mar 1 15:51:15 2020 +0300
Commit: Muhammet Kara 
CommitDate: Mon Mar 2 13:26:02 2020 +0100

clang-format lotuswordpro with under 5-percent lines of change

Files which could become clang-format conformant with
under 5-percent lines of change relative to the total
count of lines in the file are found by using bin/find-clang-format.py,
and fixed with /opt/lo/bin/clang-format -i 

There will be follow-up patches to fix all 'under-5-percent' files.

Change-Id: I4527dcc9aaabd1fba3363c0aa2bf3217e42ef45e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89776
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/lotuswordpro/inc/lwpbookmarkmgr.hxx 
b/lotuswordpro/inc/lwpbookmarkmgr.hxx
index 926d4e391934..9dbeb344e262 100644
--- a/lotuswordpro/inc/lwpbookmarkmgr.hxx
+++ b/lotuswordpro/inc/lwpbookmarkmgr.hxx
@@ -69,11 +69,12 @@
 class LwpBookmarkMgr
 {
 public:
-void AddXFBookmarkEnd(const OUString& sName,XFBookmarkEnd* pMark);
-void AddXFBookmarkStart(const OUString& sName,XFBookmarkStart* pMark);
+void AddXFBookmarkEnd(const OUString& sName, XFBookmarkEnd* pMark);
+void AddXFBookmarkStart(const OUString& sName, XFBookmarkStart* pMark);
 bool FindBookmark(const OUString& sName);
 ~LwpBookmarkMgr();
 LwpBookmarkMgr();
+
 private:
 std::map> m_MapStart;
 std::map> m_MapEnd;
diff --git a/lotuswordpro/inc/lwpchangemgr.hxx 
b/lotuswordpro/inc/lwpchangemgr.hxx
index bbf00ba1ad49..fb39042aa232 100644
--- a/lotuswordpro/inc/lwpchangemgr.hxx
+++ b/lotuswordpro/inc/lwpchangemgr.hxx
@@ -81,10 +81,11 @@ public:
 void SetHeadFootChange(XFContentContainer* pCont);
 ~LwpChangeMgr();
 LwpChangeMgr();
+
 private:
-std::map* m_pFribMap;
-std::map m_DocFribMap;
-std::map m_HeadFootFribMap;
+std::map* m_pFribMap;
+std::map m_DocFribMap;
+ 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/qa lotuswordpro/source

2020-01-20 Thread Caolán McNamara (via logerrit)
 lotuswordpro/inc/xfilter/xfcontent.hxx|3 ---
 lotuswordpro/qa/cppunit/data/pass/tdf129993-2.lwp |binary
 lotuswordpro/qa/cppunit/data/pass/tdf71147-1.lwp  |binary
 lotuswordpro/source/filter/lwptablelayout.cxx |2 +-
 lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx |3 ---
 5 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 0453eb32b9055fe27fcb7b9cef22c46d32e59196
Author: Caolán McNamara 
AuthorDate: Mon Jan 20 19:45:26 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 20 21:54:35 2020 +0100

Resolves: tdf#130093 some lwp file not loading

Change-Id: I2be53792f0fadcf1ca0e99c8f9fab7305d0fcddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87100
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xfcontent.hxx 
b/lotuswordpro/inc/xfilter/xfcontent.hxx
index 8cb5be5da2c6..ca5bfc4a9da3 100644
--- a/lotuswordpro/inc/xfilter/xfcontent.hxx
+++ b/lotuswordpro/inc/xfilter/xfcontent.hxx
@@ -105,7 +105,6 @@ public:
 protected:
 XFContent()
 : m_bDoingToXml(false)
-, m_bInserted(false)
 {
 }
 
@@ -116,8 +115,6 @@ protected:
 OUString m_strStyleName;
 private:
 bool m_bDoingToXml;
-public:
-bool m_bInserted;
 };
 
 #endif
diff --git a/lotuswordpro/qa/cppunit/data/pass/tdf129993-2.lwp 
b/lotuswordpro/qa/cppunit/data/pass/tdf129993-2.lwp
new file mode 100644
index ..0f0645e3ba77
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/pass/tdf129993-2.lwp 
differ
diff --git a/lotuswordpro/qa/cppunit/data/pass/tdf71147-1.lwp 
b/lotuswordpro/qa/cppunit/data/pass/tdf71147-1.lwp
new file mode 100644
index ..fc351f434dde
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/pass/tdf71147-1.lwp 
differ
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx 
b/lotuswordpro/source/filter/lwptablelayout.cxx
index a49c4375858b..e1647dd34511 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -834,7 +834,7 @@ void LwpTableLayout::Read()
 void LwpTableLayout::XFConvert(XFContentContainer* pCont)
 {
 if (!m_pXFTable)
-throw std::runtime_error("missing table");
+return;
 pCont->Add(m_pXFTable.get());
 }
 /**
diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx 
b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
index c8e8de733027..b64ad72721a4 100644
--- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
@@ -70,9 +70,6 @@ XFContentContainer::~XFContentContainer()
 
 void XFContentContainer::Add(XFContent *pContent)
 {
-if (pContent->m_bInserted)
-throw std::runtime_error("already inserted");
-pContent->m_bInserted = true;
 m_aContents.emplace_back(pContent);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc

2019-12-20 Thread Noel Grandin (via logerrit)
 lotuswordpro/inc/lwpfoundry.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 75a665874afa5b12a0e3e84d61baf286786578f1
Author: Noel Grandin 
AuthorDate: Wed Dec 18 09:20:55 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 20 12:21:06 2019 +0100

loplugin:duplicate-defines

already defined in lwpobjtags.hxx

Change-Id: I6ef609c82a38d5b6503dbec2ac3f34def99590f6
Reviewed-on: https://gerrit.libreoffice.org/85552
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/lwpfoundry.hxx b/lotuswordpro/inc/lwpfoundry.hxx
index ae91294885b2..a625ac6ff50f 100644
--- a/lotuswordpro/inc/lwpfoundry.hxx
+++ b/lotuswordpro/inc/lwpfoundry.hxx
@@ -75,7 +75,6 @@ class LwpBookMark;
 
 #include 
 #include 
-#define TAG_USER_VERSION0x72655655UL// "UVer"
 
 class LwpVersionManager
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc

2018-12-17 Thread Libreoffice Gerrit user
 lotuswordpro/inc/xfilter/xfcellstyle.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 80d44971b6e857a40f2716645fb22b84ac15deef
Author: Andrea Gelmini 
AuthorDate: Mon Dec 17 11:20:03 2018 +
Commit: Julien Nabet 
CommitDate: Tue Dec 18 07:04:15 2018 +0100

Fix typo

Change-Id: Ifdeeb0b5d8e07af3d38f57a70d6ac334dfc30d37
Reviewed-on: https://gerrit.libreoffice.org/65209
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx 
b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index 8e0fc8c5dd7a..ff081b58a97c 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -108,10 +108,10 @@ public:
 voidSetAlignType(enumXFAlignType hori, enumXFAlignType vert);
 
 /**
- * @descr:  The borders is complex,so you have to create one before use.
-Very few paragraphs will readly have borders property,this way
+ * @descr:  The borders are complex, so you have to create one before use.
+Very few paragraphs will already have borders property, this 
way
 we can save much memory.
- * @param:  pBorders borders of the paragraph,please reference the 
XFBorders.
+ * @param:  pBorders borders of the paragraph, please reference the 
XFBorders.
  */
 voidSetBorders(XFBorders *pBorders);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-12-05 Thread Libreoffice Gerrit user
 lotuswordpro/inc/xfilter/xfglobal.hxx   |3 ---
 lotuswordpro/source/filter/xfilter/xfglobal.cxx |8 
 2 files changed, 11 deletions(-)

New commits:
commit 38e358585591dbfcfc532ee2b4fc1de0f5962ee7
Author: Noel Grandin 
AuthorDate: Wed Dec 5 11:00:02 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 5 13:11:03 2018 +0100

loplugin:singlevalfields in lotuswordpro

Change-Id: I1fe56271bfcbbc8aba023047b0888f75dd6ce886
Reviewed-on: https://gerrit.libreoffice.org/64600
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/xfilter/xfglobal.hxx 
b/lotuswordpro/inc/xfilter/xfglobal.hxx
index 088e24611124..30bea2c5be94 100644
--- a/lotuswordpro/inc/xfilter/xfglobal.hxx
+++ b/lotuswordpro/inc/xfilter/xfglobal.hxx
@@ -135,12 +135,9 @@ public:
 public:
 static int  s_nSectionID;
 static int  s_nFrameID;
-static int  s_nGraphID;
-static int  s_nTableID;
 static int  s_nNoteID;
 static int  s_nStrokeDashID;
 static int  s_nAreaID;
-static int s_nObjID;
 static int s_nImageID;
 };
 
diff --git a/lotuswordpro/source/filter/xfilter/xfglobal.cxx 
b/lotuswordpro/source/filter/xfilter/xfglobal.cxx
index 160dfba4907a..36649937dcab 100644
--- a/lotuswordpro/source/filter/xfilter/xfglobal.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfglobal.cxx
@@ -63,16 +63,10 @@
 #include 
 
 int XFGlobal::s_nFrameID = 1;
-int XFGlobal::s_nGraphID = 1;
 int XFGlobal::s_nSectionID = 1;
-int XFGlobal::s_nTableID = 1;
 int XFGlobal::s_nNoteID = 1;
 int XFGlobal::s_nStrokeDashID = 1;
 int XFGlobal::s_nAreaID = 1;
-
-//For chart object, /2005/2
-int XFGlobal::s_nObjID = 1;
-
 int XFGlobal::s_nImageID = 1;
 
 OUString XFGlobal::GenSectionName()
@@ -123,11 +117,9 @@ voidXFGlobal::Reset()
 {
 s_nSectionID = 1;
 s_nFrameID = 1;
-s_nTableID = 1;
 s_nNoteID = 1;
 s_nStrokeDashID = 1;
 s_nAreaID = 1;
-s_nObjID = 1;
 }
 
 voidXFGlobalReset()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-09-26 Thread Libreoffice Gerrit user
 lotuswordpro/inc/xfilter/xfindex.hxx   |2 +-
 lotuswordpro/source/filter/xfilter/xfindex.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 60296b288961e154c0828f61be23ab7f9c294e49
Author: Andrea Gelmini 
AuthorDate: Wed Sep 26 16:40:34 2018 +0200
Commit: Julien Nabet 
CommitDate: Wed Sep 26 21:16:42 2018 +0200

Fix typo

Not so sure, but anyway, let's see what the gods say.

Change-Id: I5abffb27f8d124c34b50a3591de1ffc8c64fa13a
Reviewed-on: https://gerrit.libreoffice.org/60994
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/lotuswordpro/inc/xfilter/xfindex.hxx 
b/lotuswordpro/inc/xfilter/xfindex.hxx
index ace8353be3f6..9cd469662916 100644
--- a/lotuswordpro/inc/xfilter/xfindex.hxx
+++ b/lotuswordpro/inc/xfilter/xfindex.hxx
@@ -55,7 +55,7 @@
  /
 /*
  * @file
- * Represente index source,index body and index index entry.
+ * Represents index source, index body and index entry.
  /
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFINDEX_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFINDEX_HXX
diff --git a/lotuswordpro/source/filter/xfilter/xfindex.cxx 
b/lotuswordpro/source/filter/xfilter/xfindex.cxx
index 8ef69ef6b70f..f141a0e46b10 100644
--- a/lotuswordpro/source/filter/xfilter/xfindex.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfindex.cxx
@@ -55,7 +55,7 @@
  /
 /*
  * @file
- * Represente index source,index body and index index entry.
+ * Represents index source, index body and index entry.
  /
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-07-27 Thread Libreoffice Gerrit user
 lotuswordpro/inc/lwpatomholder.hxx   |1 -
 lotuswordpro/inc/xfilter/ixfstyle.hxx|6 ++
 lotuswordpro/inc/xfilter/xfliststyle.hxx |5 +
 lotuswordpro/inc/xfilter/xfstyle.hxx |5 +
 lotuswordpro/inc/xfilter/xftextstyle.hxx |5 +
 lotuswordpro/source/filter/lwpatomholder.cxx |2 --
 lotuswordpro/source/filter/lwpnumericfmt.cxx |3 ---
 lotuswordpro/source/filter/lwpnumericfmt.hxx |1 -
 8 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit aa84f1458f422c1acf38b53a3e3138cd0e84e313
Author: Stephan Bergmann 
AuthorDate: Thu Jul 26 13:49:35 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 27 08:20:53 2018 +0200

lotuswordpro: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)

...by explicitly defaulting the copy/move functions (and, where needed in 
turn,
also a default ctor) for classes that have a user-declared dtor that does
nothing other than an implicitly-defined one would do, but needs to be user-
declared because it is virtual and potentially serves as a key function to
emit the vtable, or is non-public, etc.; and by removing explicitly user-
provided functions that do the same as their implicitly-defined 
counterparts,
but may prevent implicitly declared copy functions from being defined as 
non-
deleted in the future.  (Even if such a user-provided function was declared
non-inline in an include file, the apparently-used implicitly-defined copy
functions are already include, so why bother with non-inline functions.)

Change-Id: I725d60235b72e4eec59809e2d09bfab9a2f7c416
Reviewed-on: https://gerrit.libreoffice.org/58097
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/lotuswordpro/inc/lwpatomholder.hxx 
b/lotuswordpro/inc/lwpatomholder.hxx
index 3e373f7265b9..b038289a2d6b 100644
--- a/lotuswordpro/inc/lwpatomholder.hxx
+++ b/lotuswordpro/inc/lwpatomholder.hxx
@@ -66,7 +66,6 @@ class LwpAtomHolder
 {
 public:
 LwpAtomHolder();
-~LwpAtomHolder();
 private:
 sal_Int32   m_nAtom;
 sal_Int32   m_nAssocAtom;
diff --git a/lotuswordpro/inc/xfilter/ixfstyle.hxx 
b/lotuswordpro/inc/xfilter/ixfstyle.hxx
index defbc45471eb..2f5fabaf4cb4 100644
--- a/lotuswordpro/inc/xfilter/ixfstyle.hxx
+++ b/lotuswordpro/inc/xfilter/ixfstyle.hxx
@@ -68,6 +68,12 @@
 class IXFStyle
 {
 public:
+IXFStyle() = default;
+IXFStyle(IXFStyle const &) = default;
+IXFStyle(IXFStyle &&) = default;
+IXFStyle & operator =(IXFStyle const &) = default;
+IXFStyle & operator =(IXFStyle &&) = default;
+
 virtual ~IXFStyle(){}
 /**
  * @descr:  return the style name.
diff --git a/lotuswordpro/inc/xfilter/xfliststyle.hxx 
b/lotuswordpro/inc/xfilter/xfliststyle.hxx
index 24838063ae38..f4abb93a5b10 100644
--- a/lotuswordpro/inc/xfilter/xfliststyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfliststyle.hxx
@@ -88,6 +88,11 @@ public:
 
 virtual ~XFListLevel(){}
 
+XFListLevel(XFListLevel const &) = default;
+XFListLevel(XFListLevel &&) = default;
+XFListLevel & operator =(XFListLevel const &) = default;
+XFListLevel & operator =(XFListLevel &&) = default;
+
 voidSetListlevelType(enumXFListLevel type);
 
 voidSetLevel(sal_Int16 level);
diff --git a/lotuswordpro/inc/xfilter/xfstyle.hxx 
b/lotuswordpro/inc/xfilter/xfstyle.hxx
index 1e82c92e9642..493f000c60a7 100644
--- a/lotuswordpro/inc/xfilter/xfstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfstyle.hxx
@@ -73,6 +73,11 @@ public:
 
 virtual ~XFStyle() override;
 
+XFStyle(XFStyle const &) = default;
+XFStyle(XFStyle &&) = default;
+XFStyle & operator =(XFStyle const &) = default;
+XFStyle & operator =(XFStyle &&) = default;
+
 public:
 /**
  * @descr   get style name.
diff --git a/lotuswordpro/inc/xfilter/xftextstyle.hxx 
b/lotuswordpro/inc/xfilter/xftextstyle.hxx
index 24653ebbcf94..6b7711e5066e 100644
--- a/lotuswordpro/inc/xfilter/xftextstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xftextstyle.hxx
@@ -78,6 +78,11 @@ public:
 
 virtual ~XFTextStyle() override;
 
+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.
diff --git a/lotuswordpro/source/filter/lwpatomholder.cxx 
b/lotuswordpro/source/filter/lwpatomholder.cxx
index a9a25173460c..582d8fee2780 100644
--- a/lotuswordpro/source/filter/lwpatomholder.cxx
+++ b/lotuswordpro/source/filter/lwpatomholder.cxx
@@ -62,8 +62,6 @@ LwpAtomHolder::LwpAtomHolder()
 : m_nAtom(0), m_nAssocAtom(0)
 {}
 
-LwpAtomHolder::~LwpAtomHolder()
-{}
 /**
  * @descr   read atomholder from object stream
  *  the default encoding used in Word Pro is 1252
diff --git a/lotuswordpro/source/filter/lwpnumericfmt.cxx 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-06-25 Thread Noel Grandin
 lotuswordpro/inc/xfilter/xfstylemanager.hxx   |2 +-
 lotuswordpro/source/filter/xfilter/xfstylemanager.cxx |   11 +++
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 879c455e49a28831fab1477d5ced65a69e5c2918
Author: Noel Grandin 
Date:   Fri Jun 22 13:40:49 2018 +0200

loplugin:useuniqueptr in XFStyleManager

Change-Id: I6fccaef0778ce02fc6d6daaa2fdb31af9ea1c19f
Reviewed-on: https://gerrit.libreoffice.org/56334
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/xfilter/xfstylemanager.hxx 
b/lotuswordpro/inc/xfilter/xfstylemanager.hxx
index f9e9d9411055..163ceafad865 100644
--- a/lotuswordpro/inc/xfilter/xfstylemanager.hxx
+++ b/lotuswordpro/inc/xfilter/xfstylemanager.hxx
@@ -133,7 +133,7 @@ private:
 XFStyleContainers_aTableCellStyles;
 XFStyleContainers_aTableRowStyles;
 XFStyleContainers_aTableColStyles;
-IXFStyle*s_pOutlineStyle;
+std::unique_ptr s_pOutlineStyle;
 XFStyleContainer s_aRubyStyles;
 };
 
diff --git a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx 
b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
index 74a05f265a9b..84dcb725e969 100644
--- a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
@@ -80,11 +80,7 @@ XFStyleManager::~XFStyleManager()
 
 voidXFStyleManager::Reset()
 {
-if( s_pOutlineStyle )
-{
-delete s_pOutlineStyle;
-s_pOutlineStyle = nullptr;
-}
+s_pOutlineStyle.reset();
 
 s_aStdTextStyles.Reset();
 s_aStdParaStyles.Reset();
@@ -203,8 +199,7 @@ IXFStyleRet 
XFStyleManager::AddStyle(std::unique_ptr pStyle)
 }
 else if( pStyle->GetStyleFamily() == enumXFStyleOutline )
 {
-delete s_pOutlineStyle;
-s_pOutlineStyle = pStyle.release();
+s_pOutlineStyle = std::move(pStyle);
 }
 else if( pStyle->GetStyleFamily() == enumXFStyleStrokeDash )
 {
@@ -265,7 +260,7 @@ IXFStyle*   XFStyleManager::FindStyle(const OUString& name)
 if( pStyle )
 return pStyle;
 if(s_pOutlineStyle && s_pOutlineStyle->GetStyleName() == name )
-return s_pOutlineStyle;
+return s_pOutlineStyle.get();
 pStyle = s_aStdStrokeDashStyles.FindStyle(name);
 if( pStyle )
 return pStyle;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-04-03 Thread Noel Grandin
 lotuswordpro/inc/lwpfoundry.hxx|2 
 lotuswordpro/inc/xfilter/xfdatestyle.hxx   |   40 +--
 lotuswordpro/inc/xfilter/xfstylecont.hxx   |5 
 lotuswordpro/inc/xfilter/xfstylemanager.hxx|2 
 lotuswordpro/source/filter/lwparrowstyles.hxx  |   16 -
 lotuswordpro/source/filter/lwpbulletstylemgr.cxx   |9 
 lotuswordpro/source/filter/lwpcelllayout.cxx   |6 
 lotuswordpro/source/filter/lwpcharacterstyle.cxx   |4 
 lotuswordpro/source/filter/lwpdrawobj.cxx  |   69 +++---
 lotuswordpro/source/filter/lwpfoundry.cxx  |6 
 lotuswordpro/source/filter/lwpframelayout.cxx  |4 
 lotuswordpro/source/filter/lwpfrib.cxx |   26 +-
 lotuswordpro/source/filter/lwpfribbreaks.cxx   |8 
 lotuswordpro/source/filter/lwpfribframe.cxx|4 
 lotuswordpro/source/filter/lwpfribmark.cxx |  190 -
 lotuswordpro/source/filter/lwpfribsection.cxx  |   10 
 lotuswordpro/source/filter/lwpfribtable.cxx|2 
 lotuswordpro/source/filter/lwpfribtext.cxx |8 
 lotuswordpro/source/filter/lwpgrfobj.cxx   |6 
 lotuswordpro/source/filter/lwppagelayout.cxx   |8 
 lotuswordpro/source/filter/lwppara.cxx |   18 -
 lotuswordpro/source/filter/lwppara1.cxx|   16 -
 lotuswordpro/source/filter/lwpparastyle.cxx|2 
 lotuswordpro/source/filter/lwprowlayout.cxx|9 
 lotuswordpro/source/filter/lwpsilverbullet.cxx |2 
 lotuswordpro/source/filter/lwpstory.cxx|4 
 lotuswordpro/source/filter/lwptablelayout.cxx  |   12 -
 lotuswordpro/source/filter/lwptoc.cxx  |4 
 lotuswordpro/source/filter/lwpverdocument.cxx  |4 
 lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx |6 
 lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx |4 
 lotuswordpro/source/filter/xfilter/xfparastyle.cxx |   12 -
 lotuswordpro/source/filter/xfilter/xfstylecont.cxx |   31 --
 lotuswordpro/source/filter/xfilter/xfstylemanager.cxx  |   50 ++--
 34 files changed, 293 insertions(+), 306 deletions(-)

New commits:
commit 86e54f2d757fe300ba634cdcbf0ee8a589dbc2ae
Author: Noel Grandin 
Date:   Tue Apr 3 11:36:57 2018 +0200

loplugin:useuniqueptr in XFStyleContainer

Change-Id: I0a9765ab4107a534f211e3531f7948516f1a0c02
Reviewed-on: https://gerrit.libreoffice.org/52297
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/lwpfoundry.hxx b/lotuswordpro/inc/lwpfoundry.hxx
index 30b604b295fa..96c487c35c98 100644
--- a/lotuswordpro/inc/lwpfoundry.hxx
+++ b/lotuswordpro/inc/lwpfoundry.hxx
@@ -300,7 +300,7 @@ private:
 LwpStyleMap m_StyleList;
 public:
 void SetFoundry(LwpFoundry* pFoundry){m_pFoundry = pFoundry;}
-void AddStyle(LwpObjectID styleObjID, IXFStyle* pStyle);
+void AddStyle(LwpObjectID styleObjID, std::unique_ptr pStyle);
 IXFStyle* GetStyle(const LwpObjectID );
 };
 #endif
diff --git a/lotuswordpro/inc/xfilter/xfdatestyle.hxx 
b/lotuswordpro/inc/xfilter/xfdatestyle.hxx
index 6b1b2aa0223b..a292a8fdd5fc 100644
--- a/lotuswordpro/inc/xfilter/xfdatestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfdatestyle.hxx
@@ -122,83 +122,83 @@ inline void XFDatePart::SetTexture(bool bTexture)
 
 inline void XFDateStyle::AddYear( bool bLongFmt )
 {
-XFDatePart  *part = new XFDatePart();
+std::unique_ptr part(new XFDatePart());
 part->SetPartType(enumXFDateYear);
 part->SetLongFmt(bLongFmt);
-m_aParts.AddStyle(part);
+m_aParts.AddStyle(std::move(part));
 }
 
 inline void XFDateStyle::AddMonth( bool bLongFmt, bool bTexture  )
 {
-XFDatePart  *part = new XFDatePart();
+std::unique_ptr part(new XFDatePart());
 part->SetPartType(enumXFDateMonth);
 part->SetLongFmt(bLongFmt);
 part->SetTexture(bTexture);
-m_aParts.AddStyle(part);
+m_aParts.AddStyle(std::move(part));
 }
 
 inline void XFDateStyle::AddMonthDay( bool bLongFmt )
 {
-XFDatePart  *part = new XFDatePart();
+std::unique_ptr part(new XFDatePart());
 part->SetPartType(enumXFDateMonthDay);
 part->SetLongFmt(bLongFmt);
-m_aParts.AddStyle(part);
+m_aParts.AddStyle(std::move(part));
 }
 
 inline void XFDateStyle::AddWeekDay( bool bLongFmt )
 {
-XFDatePart  *part = new XFDatePart();
+std::unique_ptr part(new XFDatePart());
 part->SetPartType(enumXFDateWeekDay);
 part->SetLongFmt(bLongFmt);
-m_aParts.AddStyle(part);
+m_aParts.AddStyle(std::move(part));
 }
 
 inline void XFDateStyle::AddEra()
 {
-XFDatePart  *part = new XFDatePart();
+std::unique_ptr part(new XFDatePart());
 part->SetPartType(enumXFDateEra);
 part->SetLongFmt(false);
-m_aParts.AddStyle(part);
+

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-03-22 Thread Caolán McNamara
 lotuswordpro/inc/lwpbookmarkmgr.hxx   |4 +--
 lotuswordpro/source/filter/lwpbookmarkmgr.cxx |   29 +++---
 2 files changed, 15 insertions(+), 18 deletions(-)

New commits:
commit 4829542997ddd3f32a834b460a077bbe2ffbdf95
Author: Caolán McNamara 
Date:   Thu Mar 22 10:35:18 2018 +

ofz#7063 ensure lifecycle

Change-Id: I18d62bc3bd409ca65c85ea47e8d5b3930481edf9
Reviewed-on: https://gerrit.libreoffice.org/51731
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/lwpbookmarkmgr.hxx 
b/lotuswordpro/inc/lwpbookmarkmgr.hxx
index 08ea7e35c803..926d4e391934 100644
--- a/lotuswordpro/inc/lwpbookmarkmgr.hxx
+++ b/lotuswordpro/inc/lwpbookmarkmgr.hxx
@@ -75,8 +75,8 @@ public:
 ~LwpBookmarkMgr();
 LwpBookmarkMgr();
 private:
-std::map m_MapStart;
-std::map m_MapEnd;
+std::map m_MapStart;
+std::map m_MapEnd;
 };
 
 #endif
diff --git a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx 
b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
index fdfed20edf6c..3ce1ef05355e 100644
--- a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
+++ b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx
@@ -57,44 +57,41 @@
 
 void LwpBookmarkMgr::AddXFBookmarkStart(const OUString& sName,XFBookmarkStart* 
pMark)
 {
-std::map::iterator iter;
-iter = m_MapStart.find(sName);
+auto iter = m_MapStart.find(sName);
 if (iter == m_MapStart.end())//not find
 {
 m_MapStart[sName] = pMark;
 }
 else //have exist the same bookmark name
 {
-XFBookmarkStart* pFind = iter->second;
-OUString totalName = pFind->GetDivision() + ":";
-totalName += pFind->GetName();
-pFind->SetName(totalName);
-m_MapStart[totalName] = pFind;
+auto xFind = iter->second;
+OUString totalName = xFind->GetDivision() + ":";
+totalName += xFind->GetName();
+xFind->SetName(totalName);
+m_MapStart[totalName] = xFind;
 m_MapStart[sName] = pMark;
 }
 }
 void LwpBookmarkMgr::AddXFBookmarkEnd(const OUString& sName,XFBookmarkEnd* 
pMark)
 {
-std::map::iterator iter;
-iter = m_MapEnd.find(sName);
+auto iter = m_MapEnd.find(sName);
 if (iter == m_MapEnd.end())//not find
 {
 m_MapEnd[sName] = pMark;
 }
 else //have exist the same bookmark name
 {
-XFBookmarkEnd* pFind = iter->second;
-OUString totalName = pFind->GetDivision() + ":";
-totalName += pFind->GetName();
-pFind->SetName(totalName);
-m_MapEnd[totalName] = pFind;
+auto xFind = iter->second;
+OUString totalName = xFind->GetDivision() + ":";
+totalName += xFind->GetName();
+xFind->SetName(totalName);
+m_MapEnd[totalName] = xFind;
 m_MapEnd[sName] = pMark;
 }
 }
 bool LwpBookmarkMgr::FindBookmark(const OUString& sName)
 {
-std::map::iterator iter;
-iter = m_MapStart.find(sName);
+auto iter = m_MapStart.find(sName);
 return iter != m_MapStart.end();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc

2018-03-07 Thread Andrea Gelmini
 lotuswordpro/inc/xfilter/xfbgimage.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 973c8d3b6200eea388b6e2217647110a10e1c391
Author: Andrea Gelmini 
Date:   Tue Mar 6 23:20:54 2018 +0100

Fix typo

Change-Id: Iacb4f5f93f6b2b9a06148844210784045f09d053
Reviewed-on: https://gerrit.libreoffice.org/50850
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/lotuswordpro/inc/xfilter/xfbgimage.hxx 
b/lotuswordpro/inc/xfilter/xfbgimage.hxx
index 8940cfe41ea3..ea14229f4cc3 100644
--- a/lotuswordpro/inc/xfilter/xfbgimage.hxx
+++ b/lotuswordpro/inc/xfilter/xfbgimage.hxx
@@ -83,7 +83,7 @@ public:
 voidSetImageData(sal_uInt8 const *buf, int len);
 
 /**
- * @descr   Set the iamge position type.
+ * @descr   Set the image position type.
  */
 voidSetPosition(enumXFAlignType horiAlign = enumXFAlignCenter, 
enumXFAlignType vertAlign = enumXFAlignCenter);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-03-06 Thread Caolán McNamara
 lotuswordpro/inc/xfilter/xfcellstyle.hxx |4 +-
 lotuswordpro/inc/xfilter/xfframestyle.hxx|2 -
 lotuswordpro/inc/xfilter/xfheaderstyle.hxx   |2 -
 lotuswordpro/inc/xfilter/xfpagemaster.hxx|2 -
 lotuswordpro/inc/xfilter/xfparastyle.hxx |2 -
 lotuswordpro/inc/xfilter/xftablestyle.hxx|2 -
 lotuswordpro/source/filter/lwpbackgroundstuff.cxx|   12 +++---
 lotuswordpro/source/filter/lwpbackgroundstuff.hxx|2 -
 lotuswordpro/source/filter/lwpcelllayout.cxx |   12 +++---
 lotuswordpro/source/filter/lwpframelayout.cxx|   12 +++---
 lotuswordpro/source/filter/lwplayout.cxx |   15 +++
 lotuswordpro/source/filter/lwplayout.hxx |4 +-
 lotuswordpro/source/filter/lwppagelayout.cxx |   36 +--
 lotuswordpro/source/filter/lwppara.cxx   |4 +-
 lotuswordpro/source/filter/lwptablelayout.cxx|   12 +++---
 lotuswordpro/source/filter/xfilter/xfcellstyle.cxx   |   20 --
 lotuswordpro/source/filter/xfilter/xfframestyle.cxx  |4 +-
 lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx |4 +-
 lotuswordpro/source/filter/xfilter/xfpagemaster.cxx  |4 +-
 lotuswordpro/source/filter/xfilter/xfparastyle.cxx   |4 +-
 lotuswordpro/source/filter/xfilter/xftablestyle.cxx  |4 +-
 21 files changed, 80 insertions(+), 83 deletions(-)

New commits:
commit 6e32cf8b654abc103f3f742b7b7ae0fff0e64f69
Author: Caolán McNamara 
Date:   Tue Mar 6 09:46:35 2018 +

ofz: memory leak

Change-Id: Ida561d59f5fbd2b4dff5d0ef355a21a344a2afd2
Reviewed-on: https://gerrit.libreoffice.org/50808
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx 
b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index 6dc5724e7784..82730ed4005f 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -124,7 +124,7 @@ public:
 /**
  * descr:   set cell background image.
  */
-voidSetBackImage(XFBGImage *pImage);
+voidSetBackImage(std::unique_ptr& rImage);
 
 virtual enumXFStyle GetStyleFamily() override;
 
@@ -139,7 +139,7 @@ private:
 
 double  m_fTextIndent;
 XFColor m_aBackColor;
-XFBGImage   *m_pBackImage;
+std::unique_ptr m_xBackImage;
 XFMargins   m_aMargin;
 XFPadding   m_aPadding;
 rtl::Reference m_pFont;
diff --git a/lotuswordpro/inc/xfilter/xfframestyle.hxx 
b/lotuswordpro/inc/xfilter/xfframestyle.hxx
index 6fa40fe0bca0..20ec941fa6de 100644
--- a/lotuswordpro/inc/xfilter/xfframestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfframestyle.hxx
@@ -115,7 +115,7 @@ public:
 /**
  * @descr:  set the background image of the frame.
  */
-voidSetBackImage(XFBGImage *iamge);
+voidSetBackImage(std::unique_ptr& rImage);
 
 /**
  * @descr:  set the background color of the frame.
diff --git a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx 
b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
index 3207694bcb51..6bc8dd6f1977 100644
--- a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
@@ -107,7 +107,7 @@ public:
  */
 voidSetBorders(XFBorders *pBorders);
 
-voidSetBackImage(XFBGImage *image);
+voidSetBackImage(std::unique_ptr& rImage);
 
 /**
  * @descr   Set header background color.
diff --git a/lotuswordpro/inc/xfilter/xfpagemaster.hxx 
b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
index 1de301d54125..ee326a88ab2c 100644
--- a/lotuswordpro/inc/xfilter/xfpagemaster.hxx
+++ b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
@@ -96,7 +96,7 @@ public:
 
 voidSetBackColor(XFColor color);
 
-voidSetBackImage(XFBGImage *image);
+voidSetBackImage(std::unique_ptr& rImage);
 
 voidSetColumns(XFColumns *pColumns);
 
diff --git a/lotuswordpro/inc/xfilter/xfparastyle.hxx 
b/lotuswordpro/inc/xfilter/xfparastyle.hxx
index 2efced099158..051901381734 100644
--- a/lotuswordpro/inc/xfilter/xfparastyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfparastyle.hxx
@@ -190,7 +190,7 @@ public:
  * @descr   Set background image of the paragraph.
  * @param   image the background image to set.
  */
-voidSetBackImage(XFBGImage *image);
+voidSetBackImage(std::unique_ptr& rImage);
 
 /**
  * descrYou can only set one break property for every para style 
object.
diff --git a/lotuswordpro/inc/xfilter/xftablestyle.hxx 
b/lotuswordpro/inc/xfilter/xftablestyle.hxx
index 55b318c4f0a9..7fff8c45e6ad 100644
--- a/lotuswordpro/inc/xfilter/xftablestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xftablestyle.hxx
@@ -84,7 +84,7 @@ public:
 
 voidSetBackColor(XFColor const & color);
 
-voidSetBackImage(XFBGImage *pImage);
+void

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-03-05 Thread Noel Grandin
 lotuswordpro/inc/xfilter/xfconfigmanager.hxx   |7 +++--
 lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx |   21 -
 2 files changed, 10 insertions(+), 18 deletions(-)

New commits:
commit fe40724421b8c1f197871702a42d2a633209
Author: Noel Grandin 
Date:   Thu Mar 1 11:17:05 2018 +0200

loplugin:useuniqueptr in XFConfigManager

Change-Id: Ia442d2dba8c6fdf577c6cdc950d518cc863d6e0e
Reviewed-on: https://gerrit.libreoffice.org/50741
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/xfilter/xfconfigmanager.hxx 
b/lotuswordpro/inc/xfilter/xfconfigmanager.hxx
index ded25e948ff1..d33779a64007 100644
--- a/lotuswordpro/inc/xfilter/xfconfigmanager.hxx
+++ b/lotuswordpro/inc/xfilter/xfconfigmanager.hxx
@@ -65,6 +65,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
  * @brief
@@ -100,9 +101,9 @@ public:
 virtual voidToXml(IXFStream *pStrm) override;
 
 private:
-XFLineNumberConfig  *m_pLineNumberConfig;
-XFFootnoteConfig*m_pFootnoteConfig;
-XFEndnoteConfig *m_pEndnoteConfig;
+std::unique_ptr m_pLineNumberConfig;
+std::unique_ptr   m_pFootnoteConfig;
+std::unique_ptrm_pEndnoteConfig;
 };
 
 #endif
diff --git a/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx 
b/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
index 00d2b3c12fa7..8592a0604723 100644
--- a/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
@@ -69,43 +69,34 @@ XFConfigManager::XFConfigManager()
 
 XFConfigManager::~XFConfigManager()
 {
-delete m_pEndnoteConfig;
-delete m_pFootnoteConfig;
-delete m_pLineNumberConfig;
 }
 
 void XFConfigManager::SetLineNumberConfig(XFLineNumberConfig *pLNConfig)
 {
-delete m_pLineNumberConfig;
-m_pLineNumberConfig = pLNConfig;
+m_pLineNumberConfig.reset( pLNConfig );
 }
 
 voidXFConfigManager::SetFootnoteConfig(XFFootnoteConfig *pFNConfig)
 {
-delete m_pFootnoteConfig;
-m_pFootnoteConfig = pFNConfig;
+m_pFootnoteConfig.reset( pFNConfig );
 }
 
 voidXFConfigManager::SetEndnoteConfig(XFEndnoteConfig *pENConfig)
 {
-delete m_pEndnoteConfig;
-m_pEndnoteConfig = pENConfig;
+m_pEndnoteConfig.reset( pENConfig );
 }
 
 voidXFConfigManager::ToXml(IXFStream *pStrm)
 {
 if( m_pLineNumberConfig )
-AddStyle(m_pLineNumberConfig);
+AddStyle(m_pLineNumberConfig.release());
 if( m_pFootnoteConfig )
-AddStyle(m_pFootnoteConfig);
+AddStyle(m_pFootnoteConfig.release());
 if( m_pEndnoteConfig )
-AddStyle(m_pEndnoteConfig);
+AddStyle(m_pEndnoteConfig.release());
 
 XFStyleContainer::ToXml(pStrm);
 XFStyleContainer::Reset();
-m_pLineNumberConfig = nullptr;
-m_pFootnoteConfig = nullptr;
-m_pEndnoteConfig = nullptr;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-03-04 Thread Noel Grandin
 lotuswordpro/inc/lwpoverride.hxx   |   16 
 lotuswordpro/source/filter/lwpoverride.cxx |   16 
 2 files changed, 12 insertions(+), 20 deletions(-)

New commits:
commit 7d782a4b8b70a8846f78d71632f679f80f9208a5
Author: Noel Grandin 
Date:   Thu Mar 1 10:52:31 2018 +0200

loplugin:useuniqueptr in LwpSpacingOverride

Change-Id: I1f71c1e35c49b99c9fde1fe43fc9f5717158355e
Reviewed-on: https://gerrit.libreoffice.org/50737
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/lwpoverride.hxx b/lotuswordpro/inc/lwpoverride.hxx
index c5f616a15dad..19d059616b87 100644
--- a/lotuswordpro/inc/lwpoverride.hxx
+++ b/lotuswordpro/inc/lwpoverride.hxx
@@ -356,19 +356,19 @@ public:
 
 void Override(LwpSpacingOverride* other);
 
-LwpSpacingCommonOverride* GetSpacing(){return m_pSpacing;}
-LwpSpacingCommonOverride* GetAboveLineSpacing(){return 
m_pAboveLineSpacing;}
-LwpSpacingCommonOverride* GetAboveSpacing(){return m_pParaSpacingAbove;}
-LwpSpacingCommonOverride* GetBelowSpacing(){return m_pParaSpacingBelow;}
+LwpSpacingCommonOverride* GetSpacing(){return m_pSpacing.get();}
+LwpSpacingCommonOverride* GetAboveLineSpacing(){return 
m_pAboveLineSpacing.get();}
+LwpSpacingCommonOverride* GetAboveSpacing(){return 
m_pParaSpacingAbove.get();}
+LwpSpacingCommonOverride* GetBelowSpacing(){return 
m_pParaSpacingBelow.get();}
 
 private:
 LwpSpacingOverride(LwpSpacingOverride const& rOther);
 LwpSpacingOverride& operator=(LwpSpacingOverride const& rOther) = delete;
 
-LwpSpacingCommonOverride*   m_pSpacing;
-LwpSpacingCommonOverride*   m_pAboveLineSpacing;
-LwpSpacingCommonOverride*   m_pParaSpacingAbove;
-LwpSpacingCommonOverride*   m_pParaSpacingBelow;
+std::unique_ptr   m_pSpacing;
+std::unique_ptr   m_pAboveLineSpacing;
+std::unique_ptr   m_pParaSpacingAbove;
+std::unique_ptr   m_pParaSpacingBelow;
 };
 
 class LwpIndentOverride final : public LwpOverride
diff --git a/lotuswordpro/source/filter/lwpoverride.cxx 
b/lotuswordpro/source/filter/lwpoverride.cxx
index 5c4a1002aebc..fff586d6f4f9 100644
--- a/lotuswordpro/source/filter/lwpoverride.cxx
+++ b/lotuswordpro/source/filter/lwpoverride.cxx
@@ -359,10 +359,6 @@ m_pParaSpacingBelow(new LwpSpacingCommonOverride)
 
 LwpSpacingOverride::~LwpSpacingOverride()
 {
-delete m_pSpacing;
-delete m_pAboveLineSpacing;
-delete m_pParaSpacingAbove;
-delete m_pParaSpacingBelow;
 }
 
 LwpSpacingOverride::LwpSpacingOverride(LwpSpacingOverride const& rOther)
@@ -372,14 +368,10 @@ LwpSpacingOverride::LwpSpacingOverride(LwpSpacingOverride 
const& rOther)
 , m_pParaSpacingAbove(nullptr)
 , m_pParaSpacingBelow(nullptr)
 {
-std::unique_ptr 
pSpacing(::clone(rOther.m_pSpacing));
-std::unique_ptr 
pAboveLineSpacing(::clone(rOther.m_pAboveLineSpacing));
-std::unique_ptr 
pParaSpacingAbove(::clone(rOther.m_pParaSpacingAbove));
-std::unique_ptr 
pParaSpacingBelow(::clone(rOther.m_pParaSpacingBelow));
-m_pSpacing = pSpacing.release();
-m_pAboveLineSpacing = pAboveLineSpacing.release();
-m_pParaSpacingAbove = pParaSpacingAbove.release();
-m_pParaSpacingBelow = pParaSpacingBelow.release();
+m_pSpacing.reset( ::clone(rOther.m_pSpacing.get()) );
+m_pAboveLineSpacing.reset( ::clone(rOther.m_pAboveLineSpacing.get()) );
+m_pParaSpacingAbove.reset( ::clone(rOther.m_pParaSpacingAbove.get()) );
+m_pParaSpacingBelow.reset( ::clone(rOther.m_pParaSpacingBelow.get()) );
 }
 
 LwpSpacingOverride* LwpSpacingOverride::clone() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/qa lotuswordpro/source

2018-02-12 Thread Caolán McNamara
 lotuswordpro/inc/xfilter/xfcontent.hxx|3 +++
 lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp   |binary
 lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx |9 ++---
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 22fc8c634c5f9b09d45aff0403503f4d8226328d
Author: Caolán McNamara 
Date:   Mon Feb 12 14:01:20 2018 +

ofz#6208 Indirect-leak

Change-Id: I8d6761bd951cc1ddd4a45eabb26428bc40c2271a
Reviewed-on: https://gerrit.libreoffice.org/49600
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/xfilter/xfcontent.hxx 
b/lotuswordpro/inc/xfilter/xfcontent.hxx
index 611f9daaa719..38021b4fcd7a 100644
--- a/lotuswordpro/inc/xfilter/xfcontent.hxx
+++ b/lotuswordpro/inc/xfilter/xfcontent.hxx
@@ -105,6 +105,7 @@ public:
 protected:
 XFContent()
 : m_bDoingToXml(false)
+, m_bInserted(false)
 {
 }
 
@@ -115,6 +116,8 @@ protected:
 OUString m_strStyleName;
 private:
 bool m_bDoingToXml;
+public:
+bool m_bInserted;
 };
 
 #endif
diff --git a/lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp 
b/lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp
new file mode 100644
index ..5b068065a1f0
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp 
differ
diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx 
b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
index 67dc59017343..b1398bc023cd 100644
--- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx
@@ -68,8 +68,11 @@ XFContentContainer::~XFContentContainer()
 {
 }
 
-voidXFContentContainer::Add(XFContent *pContent)
+void XFContentContainer::Add(XFContent *pContent)
 {
+if (pContent->m_bInserted)
+throw std::runtime_error("already inserted");
+pContent->m_bInserted = true;
 m_aContents.emplace_back(pContent);
 }
 
@@ -80,12 +83,12 @@ void XFContentContainer::Add(const OUString& text)
 Add(xTC.get());
 }
 
-int XFContentContainer::GetCount() const
+int XFContentContainer::GetCount() const
 {
 return m_aContents.size();
 }
 
-voidXFContentContainer::Reset()
+void XFContentContainer::Reset()
 {
 m_aContents.clear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc vcl/unx

2018-02-12 Thread Andrea Gelmini
 lotuswordpro/inc/xfilter/xfcontentcontainer.hxx |2 +-
 vcl/unx/generic/gdi/gdiimpl.cxx |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 89202f2d76a92866ed3f3887d690e4fc45658e22
Author: Andrea Gelmini 
Date:   Sat Feb 10 01:32:52 2018 +0100

Fix typos

Change-Id: Ia01f85e87706b02ffb816b3385765e2729dafa02
Reviewed-on: https://gerrit.libreoffice.org/49585
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx 
b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
index 08a12d9b14ed..f3a843f1481f 100644
--- a/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
+++ b/lotuswordpro/inc/xfilter/xfcontentcontainer.hxx
@@ -92,7 +92,7 @@ public:
 rtl::Reference GetLastContent();
 voidRemoveLastContent();
 /**
- * @descr   convience function for add text content.
+ * @descr   convenience function for add text content.
  */
 voidAdd(const OUString& text);
 
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 342edf526e57..823d4ca9018d 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -1589,7 +1589,7 @@ bool X11SalGraphicsImpl::drawPolyLine(
 const SalColor aKeepBrushColor = mnBrushColor;
 mnBrushColor = mnPenColor;
 
-// #i11575#desc5#b adjust B2D tesselation result to raster positions
+// #i11575#desc5#b adjust B2D tessellation result to raster positions
 basegfx::B2DPolygon aPolygon = rPolygon;
 const double fHalfWidth = 0.5 * rLineWidth.getX();
 
@@ -1601,12 +1601,12 @@ bool X11SalGraphicsImpl::drawPolyLine(
 bool bDrawnOk = true;
 if( bIsHairline )
 {
-// hairlines can benefit from a simplified tesselation
+// hairlines can benefit from a simplified tessellation
 // e.g. for hairlines the linejoin style can be ignored
 basegfx::B2DTrapezoidVector aB2DTrapVector;
 basegfx::utils::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, 
aPolygon, rLineWidth.getX() );
 
-// draw tesselation result
+// draw tessellation result
 const int nTrapCount = aB2DTrapVector.size();
 if( nTrapCount > 0 )
 bDrawnOk = drawFilledTrapezoids( [0], nTrapCount, 
fTransparency );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-01-21 Thread Caolán McNamara
 lotuswordpro/inc/lwpsvstream.hxx   |4 +--
 lotuswordpro/source/filter/bencont.cxx |   11 --
 lotuswordpro/source/filter/bento.hxx   |   31 ++---
 lotuswordpro/source/filter/benval.cxx  |   16 +++---
 lotuswordpro/source/filter/lwpsvstream.cxx |2 -
 lotuswordpro/source/filter/tocread.cxx |4 +--
 lotuswordpro/source/filter/utbenvs.cxx |5 
 7 files changed, 34 insertions(+), 39 deletions(-)

New commits:
commit 6a0fb0debf67e63e0b52f3a8255773679c254c4e
Author: Caolán McNamara 
Date:   Sat Jan 20 20:42:37 2018 +

align types

Change-Id: I6080d92ec26f9ee9bf3eb4319a36c10ae38caca2
Reviewed-on: https://gerrit.libreoffice.org/48253
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/lwpsvstream.hxx b/lotuswordpro/inc/lwpsvstream.hxx
index d39aee929e7b..7b119403d761 100644
--- a/lotuswordpro/inc/lwpsvstream.hxx
+++ b/lotuswordpro/inc/lwpsvstream.hxx
@@ -67,8 +67,8 @@ class LwpSvStream
 {
 public:
 LwpSvStream(SvStream* pStream, LwpSvStream * pCompressed = nullptr);
-sal_Int32 Read( void* bytes, sal_Int32 nBytesToRead );
-void SeekRel( sal_Int64 pos );
+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);
diff --git a/lotuswordpro/source/filter/bencont.cxx 
b/lotuswordpro/source/filter/bencont.cxx
index 7340f046fa53..6a03ba73a8f3 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -170,8 +170,8 @@ LtcBenContainer::LtcBenContainer(LwpSvStream * pStream)
 *   @param  number of bytes read
 *   @return BenError
 */
-BenError LtcBenContainer::Read(void * pBuffer, unsigned long MaxSize,
-  unsigned long * pAmtRead)
+BenError LtcBenContainer::Read(void * pBuffer, size_t MaxSize,
+  size_t* pAmtRead)
 {
 *pAmtRead = cpStream->Read(pBuffer, MaxSize);
 return BenErr_OK;
@@ -182,11 +182,10 @@ BenError LtcBenContainer::Read(void * pBuffer, unsigned 
long MaxSize,
 *   @param  number of bytes to be read
 *   @return BenError
 */
-BenError LtcBenContainer::ReadKnownSize(void * pBuffer, unsigned long Amt)
+BenError LtcBenContainer::ReadKnownSize(void * pBuffer, size_t Amt)
 {
-sal_uLong ulLength;
-ulLength = cpStream->Read(pBuffer, Amt);
-if(ulLength == Amt)
+size_t ulLength = cpStream->Read(pBuffer, Amt);
+if (ulLength == Amt)
 {
 return BenErr_OK;
 }
diff --git a/lotuswordpro/source/filter/bento.hxx 
b/lotuswordpro/source/filter/bento.hxx
index 069a408cbc5d..322653aee938 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -128,13 +128,13 @@ class CBenValueSegment;
 class CBenNamedObject;
 class CBenPropertyName;
 
-typedef unsigned char BenByte;
-typedef unsigned short BenWord;
-typedef unsigned long BenDWord;
+typedef sal_uInt8 BenByte;
+typedef sal_uInt16 BenWord;
+typedef sal_uInt32 BenDWord;
 
-typedef unsigned long BenContainerPos;
-typedef unsigned long BenObjectID;
-typedef unsigned long BenGeneration;
+typedef sal_uInt32 BenContainerPos;
+typedef sal_uInt32 BenObjectID;
+typedef sal_uInt32 BenGeneration;
 
 sal_uLong BenOpenContainer(LwpSvStream * pStream, LtcBenContainer ** 
ppContainer);
 
@@ -187,10 +187,9 @@ protected: // Overridden methods
 
 private: // Data
 CBenValue * cpValue;
-unsigned long cCurrentPosition;
+size_t cCurrentPosition;
 
 sal_uLong m_ulValueLength;  // Added by , sum of length of all 
sub-valuesegments
-//  voidGetAmountLeft(sal_uLong * pAmtLeft);useless in SODC
 };
 
 class LtcBenContainer
@@ -210,9 +209,9 @@ public: // Internal methods
 ~LtcBenContainer();
 
 sal_uLong remainingSize() const;
-BenError Read(void * pBuffer, unsigned long MaxSize,
-  unsigned long * pAmtRead);
-BenError ReadKnownSize(void * pBuffer, unsigned long Amt);
+BenError Read(void * pBuffer, size_t MaxSize,
+  size_t* pAmtRead);
+BenError ReadKnownSize(void * pBuffer, size_t Amt);
 BenError SeekToPosition(BenContainerPos Pos);
 BenError SeekFromEnd(long Offset);
 
@@ -253,9 +252,9 @@ private: // Data
 class CBenValue : public CBenIDListElmt
 {
 public:
-unsigned long GetValueSize();
+size_t GetValueSize();
 void ReadValueData(void * pBuffer,
-  unsigned long Offset, unsigned long MaxSize, unsigned long * pAmtRead);
+  size_t Offset, size_t MaxSize, size_t* pAmtRead);
 
 CBenProperty * BEN_EXPORT GetProperty() { return cpProperty; }
 
@@ -309,7 +308,7 @@ class CBenValueSegment : public CUtListElmt
 {
 public: // Internal methods
 CBenValueSegment(CBenValue * pValue, BenContainerPos Pos,
-  unsigned long Size) : CUtListElmt(>GetValueSegments())
+  size_t Size) : CUtListElmt(>GetValueSegments())
 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-01-16 Thread Caolán McNamara
 lotuswordpro/inc/lwpsvstream.hxx   |3 ++-
 lotuswordpro/source/filter/lwp9reader.cxx  |   24 ++--
 lotuswordpro/source/filter/lwp9reader.hxx  |6 +++---
 lotuswordpro/source/filter/lwpfilter.cxx   |7 +--
 lotuswordpro/source/filter/lwpsvstream.cxx |9 +++--
 5 files changed, 31 insertions(+), 18 deletions(-)

New commits:
commit 575aac6ddbed1eba9c2941e0b31ac5ae08eed58d
Author: Caolán McNamara 
Date:   Tue Jan 16 15:58:44 2018 +

ofz#5420 Out-of-memory

Change-Id: I22166a14a03e5e803f8f032034e05a2da501379f
Reviewed-on: https://gerrit.libreoffice.org/48008
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/lwpsvstream.hxx b/lotuswordpro/inc/lwpsvstream.hxx
index f151dafc982e..d39aee929e7b 100644
--- a/lotuswordpro/inc/lwpsvstream.hxx
+++ b/lotuswordpro/inc/lwpsvstream.hxx
@@ -70,7 +70,8 @@ public:
 sal_Int32 Read( void* bytes, sal_Int32 nBytesToRead );
 void SeekRel( sal_Int64 pos );
 sal_Int64 Tell();
-sal_Int64 Seek( sal_Int64 pos );
+sal_Int64 Seek(sal_Int64 pos);
+bool CheckSeek(sal_Int64 pos);
 
 LwpSvStream& ReadUInt8( sal_uInt8& rUInt8 );
 LwpSvStream& ReadUInt16( sal_uInt16& rUInt16 );
diff --git a/lotuswordpro/source/filter/lwp9reader.cxx 
b/lotuswordpro/source/filter/lwp9reader.cxx
index 60a2911a7ca9..e278fc8e1a88 100644
--- a/lotuswordpro/source/filter/lwp9reader.cxx
+++ b/lotuswordpro/source/filter/lwp9reader.cxx
@@ -75,20 +75,22 @@ Lwp9Reader::Lwp9Reader (LwpSvStream* pInputStream, 
IXFStream* pStream)
 /**
  * @descr   The entrance of Word Pro 9 import filter.
  **/
-void Lwp9Reader::Read()
+bool Lwp9Reader::Read()
 {
+bool bRet = true;
 LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(m_pDocStream);
 try
 {
 m_pObjMgr = pGlobal->GetLwpObjFactory();
 
-ReadFileHeader();
 //Does not support Word Pro 96 and previous versions
-if(LwpFileHeader::m_nFileRevision>=0x000B)
+if (ReadFileHeader() && LwpFileHeader::m_nFileRevision>=0x000B)
 {
 ReadIndex();
-ParseDocument();
+bRet = ParseDocument();
 }
+else
+bRet = false;
 }
 catch(...)
 {
@@ -96,14 +98,16 @@ void Lwp9Reader::Read()
 throw;
 }
 LwpGlobalMgr::DeleteInstance();
+return bRet;
 }
 
 /**
  * @descr   Read the LWP7 object.
  */
-void Lwp9Reader::ReadFileHeader()
+bool Lwp9Reader::ReadFileHeader()
 {
-m_pDocStream->Seek(LwpSvStream::LWP_STREAM_BASE);
+if (!m_pDocStream->CheckSeek(LwpSvStream::LWP_STREAM_BASE))
+return false;
 
 //Remember to initialize the LwpFileHeader::m_nFileRevision first.
 LwpFileHeader::m_nFileRevision = 0;
@@ -112,8 +116,7 @@ void Lwp9Reader::ReadFileHeader()
 objHdr.Read(*m_pDocStream);
 sal_Int64 pos = m_pDocStream->Tell();
 m_LwpFileHdr.Read(m_pDocStream);
-m_pDocStream->Seek(pos+objHdr.GetSize());
-
+return m_pDocStream->CheckSeek(pos + objHdr.GetSize());
 }
 
 /**
@@ -131,7 +134,7 @@ void Lwp9Reader::ReadIndex()
 /**
  * @descr   Parse all document content
 */
-void Lwp9Reader::ParseDocument()
+bool Lwp9Reader::ParseDocument()
 {
 WriteDocHeader();
 
@@ -139,7 +142,7 @@ void Lwp9Reader::ParseDocument()
 LwpDocument* doc = dynamic_cast ( 
m_LwpFileHdr.GetDocID().obj().get() );
 
 if (!doc)
-return;
+return false;
 
 //Parse Doc Data
 LwpDocData *pDocData = 
dynamic_cast(doc->GetDocData().obj().get());
@@ -165,6 +168,7 @@ void Lwp9Reader::ParseDocument()
 m_pStream->EndElement("office:body");
 
 WriteDocEnd();
+return true;
 }
 
 /**
diff --git a/lotuswordpro/source/filter/lwp9reader.hxx 
b/lotuswordpro/source/filter/lwp9reader.hxx
index 731d940c1a71..b3bb40c968e3 100644
--- a/lotuswordpro/source/filter/lwp9reader.hxx
+++ b/lotuswordpro/source/filter/lwp9reader.hxx
@@ -74,13 +74,13 @@ private:
 IXFStream*m_pStream;
 LwpObjectFactory* m_pObjMgr;
 LwpFileHeader m_LwpFileHdr; //LWP7 object
-void ReadFileHeader();
+bool ReadFileHeader();
 void ReadIndex();
-void ParseDocument();
+bool ParseDocument();
 void WriteDocHeader();
 void WriteDocEnd();
 public:
-void Read();
+bool Read();
 };
 #endif
 
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx 
b/lotuswordpro/source/filter/lwpfilter.cxx
index 3b37ac1d9e94..a6ac2ee17caa 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -183,6 +183,7 @@ bool Decompress(SvStream *pCompressed, SvStream * & 
pOutDecompressed)
 }
 int ReadWordproFile(SvStream , 
uno::Reference const & xHandler)
 {
+int nRet = 0;
 try
 {
 LwpSvStream *pRawLwpSvStream = nullptr;
@@ -211,13 +212,15 @@ int ReadWordproFile(SvStream , 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-01-12 Thread Caolán McNamara
 lotuswordpro/inc/lwpfrib.hxx|4 
 lotuswordpro/source/filter/lwpchangemgr.cxx |2 ++
 lotuswordpro/source/filter/lwpfrib.cxx  |   18 +-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit b39f962e0be52f0d8380e1662f88a2f627fbfb89
Author: Caolán McNamara 
Date:   Fri Jan 12 09:43:41 2018 +

ofz#5254 Bad-cast

Change-Id: I318d441d841dd4c783f87ac2f3f699852e8b1039
Reviewed-on: https://gerrit.libreoffice.org/47796
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/lotuswordpro/inc/lwpfrib.hxx b/lotuswordpro/inc/lwpfrib.hxx
index 4e824c0002f4..6ff3cad39a98 100644
--- a/lotuswordpro/inc/lwpfrib.hxx
+++ b/lotuswordpro/inc/lwpfrib.hxx
@@ -97,6 +97,7 @@ public:
 OUString GetEditor();
 XFColor GetHighlightColor();
 protected:
+std::map* m_pFribMap;
 LwpPara* m_pPara;
 LwpFrib* m_pNext;
 sal_uInt8 m_nFribType;
@@ -119,6 +120,9 @@ public:
 REV_INSERT =0,
 REV_DELETE = 1,
 };
+
+void Register(std::map* pFribMap);
+void Deregister();
 private:
 static void ReadModifiers(LwpObjectStream* pObjStrm,ModifierInfo* 
pModInfo);
 protected:
diff --git a/lotuswordpro/source/filter/lwpchangemgr.cxx 
b/lotuswordpro/source/filter/lwpchangemgr.cxx
index e08ee979869d..c04241aaccb4 100644
--- a/lotuswordpro/source/filter/lwpchangemgr.cxx
+++ b/lotuswordpro/source/filter/lwpchangemgr.cxx
@@ -89,6 +89,7 @@ LwpChangeMgr::LwpChangeMgr()
 m_pFribMap = _DocFribMap;
 m_ChangeList.clear();
 }
+
 LwpChangeMgr::~LwpChangeMgr()
 {
 m_pFribMap=nullptr;
@@ -102,6 +103,7 @@ void LwpChangeMgr::AddChangeFrib(LwpFrib* pFrib)
 m_nCounter++;
 OUString sID = "ct"+ OUString::number(m_nCounter);
 m_pFribMap->insert(std::pair(pFrib,sID));
+pFrib->Register(m_pFribMap);
 }
 
 OUString LwpChangeMgr::GetChangeID(LwpFrib* pFrib)
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx 
b/lotuswordpro/source/filter/lwpfrib.cxx
index f9b3ad759d3c..919b257be043 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -87,7 +87,8 @@
 
 
 LwpFrib::LwpFrib(LwpPara* pPara)
-: m_pPara(pPara)
+: m_pFribMap(nullptr)
+, m_pPara(pPara)
 , m_pNext(nullptr)
 , m_nFribType(0)
 , m_pModifiers(nullptr)
@@ -100,6 +101,7 @@ LwpFrib::LwpFrib(LwpPara* pPara)
 
 LwpFrib::~LwpFrib()
 {
+Deregister();
 }
 
 LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, 
sal_uInt8 fribtag,sal_uInt8 editID)
@@ -447,4 +449,18 @@ XFColor LwpFrib::GetHighlightColor()
 return pGlobal->GetHighlightColor(m_nEditor);
 }
 
+void LwpFrib::Register(std::map* pFribMap)
+{
+m_pFribMap = pFribMap;
+}
+
+void LwpFrib::Deregister()
+{
+if (m_pFribMap)
+{
+m_pFribMap->erase(this);
+m_pFribMap = nullptr;
+}
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2018-01-06 Thread Caolán McNamara
 lotuswordpro/inc/lwpoverride.hxx|   11 +--
 lotuswordpro/source/filter/lwpparastyle.cxx |2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 1ca9388900b8cf4aa1ae67533432acf37a94281e
Author: Caolán McNamara 
Date:   Sat Jan 6 20:00:05 2018 +

ofz#4976 Integer-overflow

Change-Id: Iefba0ea6122bd9b1dde59f33c0c67077fecb7eca

diff --git a/lotuswordpro/inc/lwpoverride.hxx b/lotuswordpro/inc/lwpoverride.hxx
index d9df79894382..c5f616a15dad 100644
--- a/lotuswordpro/inc/lwpoverride.hxx
+++ b/lotuswordpro/inc/lwpoverride.hxx
@@ -63,6 +63,7 @@
 
 #include "lwpobjid.hxx"
 #include "lwptools.hxx"
+#include 
 #include 
 
 class LwpObjectStream;
@@ -434,11 +435,17 @@ private:
 
 inline double LwpIndentOverride::GetFirst() const
 {
-return 
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nFirst-m_nRest));
+sal_Int32 nRes;
+if (o3tl::checked_sub(m_nFirst, m_nRest, nRes))
+throw std::range_error("bad len");
+return LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(nRes));
 }
 inline double LwpIndentOverride::GetLeft() const
 {
-return 
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nAll+m_nRest));
+sal_Int32 nRes;
+if (o3tl::checked_add(m_nAll, m_nRest, nRes))
+throw std::range_error("bad len");
+return LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(nRes));
 }
 inline double LwpIndentOverride::GetRight() const
 {
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx 
b/lotuswordpro/source/filter/lwpparastyle.cxx
index b0d19ecc8b06..651de9b73d13 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -457,7 +457,7 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* 
pParaStyle, LwpInden
 else if (relative == LwpIndentOverride::RELATIVE_REST)
 Amount += pParentIndent->GetMRest();
 pTotalIndent->SetMAll(o3tl::saturating_add(Amount, 
pTotalIndent->GetMAll()));
-pTotalIndent->SetMRight(pParentIndent->GetMRight()+ 
pTotalIndent->GetMRight());
+
pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), 
pTotalIndent->GetMRight()));
 
 pParaStyle->SetIndent(pTotalIndent->GetFirst());
 pParaStyle->SetMargins(pTotalIndent->GetLeft(), 
pTotalIndent->GetRight());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2017-11-01 Thread Noel Grandin
 lotuswordpro/inc/lwpbasetype.hxx|4 
 lotuswordpro/inc/lwpfoundry.hxx |9 -
 lotuswordpro/inc/lwpidxmgr.hxx  |6 
 lotuswordpro/inc/lwpobjfactory.hxx  |4 
 lotuswordpro/inc/lwpoverride.hxx|   64 ++
 lotuswordpro/inc/xfilter/xfnumberstyle.hxx  |   27 +---
 lotuswordpro/source/filter/LotusWordProImportFilter.hxx |5 
 lotuswordpro/source/filter/lwp9reader.hxx   |3 
 lotuswordpro/source/filter/lwpbreaksoverride.hxx|7 -
 lotuswordpro/source/filter/lwpcelllayout.hxx|4 
 lotuswordpro/source/filter/lwpcharborderoverride.hxx|7 -
 lotuswordpro/source/filter/lwpfootnote.hxx  |5 
 lotuswordpro/source/filter/lwpholder.hxx|   12 -
 lotuswordpro/source/filter/lwplayout.hxx|4 
 lotuswordpro/source/filter/lwplaypiece.hxx  |   99 +++-
 lotuswordpro/source/filter/lwplnopts.hxx|5 
 lotuswordpro/source/filter/lwpnotes.hxx |5 
 lotuswordpro/source/filter/lwpnumberingoverride.hxx |8 -
 lotuswordpro/source/filter/lwpnumericfmt.hxx|   11 -
 lotuswordpro/source/filter/lwppagelayout.hxx|6 
 lotuswordpro/source/filter/lwppara.hxx  |   14 +-
 lotuswordpro/source/filter/lwpparaborderoverride.hxx|9 -
 lotuswordpro/source/filter/lwpstory.hxx |3 
 lotuswordpro/source/filter/lwptable.hxx |8 -
 lotuswordpro/source/filter/lwptaboverride.hxx   |7 -
 lotuswordpro/source/filter/lwptblcell.hxx   |   55 
 lotuswordpro/source/filter/lwptblformula.hxx|8 -
 lotuswordpro/source/filter/lwptoc.hxx   |6 
 lotuswordpro/source/filter/lwpvpointer.hxx  |5 
 29 files changed, 167 insertions(+), 243 deletions(-)

New commits:
commit bbf1312b2d775a851a38290e3c12c677f6acbfde
Author: Noel Grandin 
Date:   Tue Oct 31 16:04:38 2017 +0200

loplugin:finalclasses in lotuswordpro

Change-Id: I09a570741f5801980ae07fb90835e543519df046
Reviewed-on: https://gerrit.libreoffice.org/44135
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/lotuswordpro/inc/lwpbasetype.hxx b/lotuswordpro/inc/lwpbasetype.hxx
index 7da677280c4c..99f33050b2fe 100644
--- a/lotuswordpro/inc/lwpbasetype.hxx
+++ b/lotuswordpro/inc/lwpbasetype.hxx
@@ -101,7 +101,7 @@ private:
 /**
  * @brief   point class
 */
-class LwpPoint
+class LwpPoint final
 {
 public:
 LwpPoint();
@@ -111,7 +111,7 @@ public:
 sal_Int32 GetY() const {return m_nY;}
 inline void SetX(sal_Int32 nX);
 inline void SetY(sal_Int32 nY);
-protected:
+private:
 sal_Int32 m_nX;
 sal_Int32 m_nY;
 };
diff --git a/lotuswordpro/inc/lwpfoundry.hxx b/lotuswordpro/inc/lwpfoundry.hxx
index 7c5ff3bee569..30b604b295fa 100644
--- a/lotuswordpro/inc/lwpfoundry.hxx
+++ b/lotuswordpro/inc/lwpfoundry.hxx
@@ -177,17 +177,16 @@ public:
 
 class LwpOrderedObject;
 class LwpListList;
-class LwpOrderedObjectManager
+class LwpOrderedObjectManager final
 {
 public:
 LwpOrderedObjectManager(){}
-protected:
-LwpObjectID m_Head;
-public:
 void Read(LwpObjectStream *pStrm);
 LwpOrderedObject* Enumerate(LwpOrderedObject* pLast);
-protected:
+private:
 LwpListList* GetNextActiveListList(LwpListList* pLast);
+
+LwpObjectID m_Head;
 };
 
 class LwpStyleManager;
diff --git a/lotuswordpro/inc/lwpidxmgr.hxx b/lotuswordpro/inc/lwpidxmgr.hxx
index 21f902a76cda..fc01fed425a4 100644
--- a/lotuswordpro/inc/lwpidxmgr.hxx
+++ b/lotuswordpro/inc/lwpidxmgr.hxx
@@ -77,11 +77,11 @@ struct LwpKey
 /**
  * @brief   LwpIndexManager, to read all index records and maintain the index 
information
 */
-class LwpIndexManager
+class LwpIndexManager final
 {
 public:
 LwpIndexManager();
-protected:
+private:
 static const sal_uInt8 MAXOBJECTIDS;
 std::vector m_ObjectKeys;  //the  ordered vector
 std::vector m_RootObjs;//For those object ids in 
RootObjIndex
@@ -93,7 +93,7 @@ protected:
 
 sal_uInt32 m_ChildIndex[256];   //Offset of leaf index
 sal_uInt16 m_nLeafCount;
-protected:
+
 void ReadRootData(LwpObjectStream *pObjStrm );  //Read root index data
 
 //Add new method to handle ObjIndex
diff --git a/lotuswordpro/inc/lwpobjfactory.hxx 
b/lotuswordpro/inc/lwpobjfactory.hxx
index 37c3c3a48420..f3a00e1f769c 100644
--- a/lotuswordpro/inc/lwpobjfactory.hxx
+++ b/lotuswordpro/inc/lwpobjfactory.hxx
@@ -77,11 +77,10 @@
 /**
  * @brief   object factory used for lwp object creation and maintenance
 */
-class LwpObjectFactory
+class LwpObjectFactory final
 {
 public:
 explicit LwpObjectFactory(LwpSvStream* pSvStream);
-public:
 ~LwpObjectFactory();
 
 //For object 

[Libreoffice-commits] core.git: lotuswordpro/inc

2017-10-19 Thread Stephan Bergmann
 lotuswordpro/inc/xfilter/xfcellstyle.hxx|2 +-
 lotuswordpro/inc/xfilter/xfcolor.hxx|2 +-
 lotuswordpro/inc/xfilter/xfdrawgroup.hxx|2 +-
 lotuswordpro/inc/xfilter/xfdrawpolygon.hxx  |2 +-
 lotuswordpro/inc/xfilter/xffloatframe.hxx   |2 +-
 lotuswordpro/inc/xfilter/xffontfactory.hxx  |2 +-
 lotuswordpro/inc/xfilter/xffooterstyle.hxx  |4 ++--
 lotuswordpro/inc/xfilter/xfframe.hxx|2 +-
 lotuswordpro/inc/xfilter/xfframestyle.hxx   |2 +-
 lotuswordpro/inc/xfilter/xfheaderstyle.hxx  |4 ++--
 lotuswordpro/inc/xfilter/xfimage.hxx|2 +-
 lotuswordpro/inc/xfilter/xfimagestyle.hxx   |4 ++--
 lotuswordpro/inc/xfilter/xfindex.hxx|2 +-
 lotuswordpro/inc/xfilter/xfpagemaster.hxx   |2 +-
 lotuswordpro/inc/xfilter/xfparastyle.hxx|2 +-
 lotuswordpro/inc/xfilter/xfsectionstyle.hxx |2 +-
 lotuswordpro/inc/xfilter/xfstylemanager.hxx |2 +-
 lotuswordpro/inc/xfilter/xftable.hxx|4 ++--
 lotuswordpro/inc/xfilter/xftablestyle.hxx   |2 +-
 lotuswordpro/inc/xfilter/xftextboxstyle.hxx |2 +-
 20 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 5d0f517e3a7e1f199f8ed068e9107efa308a1885
Author: Stephan Bergmann 
Date:   Tue Oct 17 18:00:56 2017 +0200

Make include files found through -Ilotuswordpro/inc

...instead of implicitly next to the including file, in preparation of
loplugin:includeform

Change-Id: I4a666e8cd1cd3b1bf67af697be02879217dbc83a
Reviewed-on: https://gerrit.libreoffice.org/43560
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx 
b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index c2d631859f8e..ead57146a8da 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -66,7 +66,7 @@
 
 #include "xfilter/xfstyle.hxx"
 #include "xfilter/xfcolor.hxx"
-#include "xfmargins.hxx"
+#include "xfilter/xfmargins.hxx"
 #include "xfilter/xfpadding.hxx"
 #include "xfilter/xfshadow.hxx"
 
diff --git a/lotuswordpro/inc/xfilter/xfcolor.hxx 
b/lotuswordpro/inc/xfilter/xfcolor.hxx
index d095e68dae0f..dcc7ea047e35 100644
--- a/lotuswordpro/inc/xfilter/xfcolor.hxx
+++ b/lotuswordpro/inc/xfilter/xfcolor.hxx
@@ -60,7 +60,7 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLOR_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLOR_HXX
 
-#include "xfglobal.hxx"
+#include "xfilter/xfglobal.hxx"
 
 /**
  * @brief
diff --git a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx 
b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
index be3ca3f17899..3874ec1f713b 100644
--- a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
@@ -61,7 +61,7 @@
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWGROUP_HXX
 
 #include "xfilter/xfdrawobj.hxx"
-#include "xfframe.hxx"
+#include "xfilter/xfframe.hxx"
 #include "xfilter/xfcontentcontainer.hxx"
 
 /**
diff --git a/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx 
b/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
index 2d3a4509a284..929f21072375 100644
--- a/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
@@ -60,7 +60,7 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYGON_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYGON_HXX
 
-#include "xfdrawpolyline.hxx"
+#include "xfilter/xfdrawpolyline.hxx"
 #include 
 
 /**
diff --git a/lotuswordpro/inc/xfilter/xffloatframe.hxx 
b/lotuswordpro/inc/xfilter/xffloatframe.hxx
index 812de6335383..9f01e551d8d4 100644
--- a/lotuswordpro/inc/xfilter/xffloatframe.hxx
+++ b/lotuswordpro/inc/xfilter/xffloatframe.hxx
@@ -60,7 +60,7 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFLOATFRAME_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFLOATFRAME_HXX
 
-#include "xfframe.hxx"
+#include "xfilter/xfframe.hxx"
 #include 
 
 /**
diff --git a/lotuswordpro/inc/xfilter/xffontfactory.hxx 
b/lotuswordpro/inc/xfilter/xffontfactory.hxx
index ff357ba186dc..47bc5db7b561 100644
--- a/lotuswordpro/inc/xfilter/xffontfactory.hxx
+++ b/lotuswordpro/inc/xfilter/xffontfactory.hxx
@@ -64,7 +64,7 @@
 
 #include 
 
-#include "xfglobal.hxx"
+#include "xfilter/xfglobal.hxx"
 #include "xfilter/xffont.hxx"
 #include 
 
diff --git a/lotuswordpro/inc/xfilter/xffooterstyle.hxx 
b/lotuswordpro/inc/xfilter/xffooterstyle.hxx
index 1e633fd442be..b3cc2a1a7d7c 100644
--- a/lotuswordpro/inc/xfilter/xffooterstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xffooterstyle.hxx
@@ -60,8 +60,8 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTERSTYLE_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTERSTYLE_HXX
 
-#include "xfheaderstyle.hxx"
-#include "xfmargins.hxx"
+#include "xfilter/xfheaderstyle.hxx"
+#include "xfilter/xfmargins.hxx"
 
 class XFFooterStyle : public XFHeaderStyle
 {
diff --git a/lotuswordpro/inc/xfilter/xfframe.hxx 
b/lotuswordpro/inc/xfilter/xfframe.hxx
index a651e4cbdbad..b67fac5f6c2f 100644
--- 

[Libreoffice-commits] core.git: lotuswordpro/inc lotuswordpro/source

2017-10-19 Thread Noel Grandin
 lotuswordpro/inc/xfilter/xfliststyle.hxx   |3 
 lotuswordpro/source/filter/xfilter/xfliststyle.cxx |   75 +++--
 2 files changed, 30 insertions(+), 48 deletions(-)

New commits:
commit f47804d56270ef4f0ee000bb6a1dfb45fa9bc4ac
Author: Noel Grandin 
Date:   Wed Oct 18 15:54:05 2017 +0200

use std::unique_ptr in lotuswordpro

Change-Id: I9f3e8de3284899376c7db55c3ea6f16023acc40f
Reviewed-on: https://gerrit.libreoffice.org/43526
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/lotuswordpro/inc/xfilter/xfliststyle.hxx 
b/lotuswordpro/inc/xfilter/xfliststyle.hxx
index c51ef7079664..fd993c322ea0 100644
--- a/lotuswordpro/inc/xfilter/xfliststyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfliststyle.hxx
@@ -64,6 +64,7 @@
 #include "xfilter/xfstyle.hxx"
 #include "xfilter/xfnumfmt.hxx"
 #include "unicode/utypes.h"
+#include 
 #include 
 
 class IXFStream;
@@ -214,7 +215,7 @@ public:
 virtual voidToXml(IXFStream *pStrm) override;
 
 private:
-XFListLevel *m_pListLevels[10];
+std::unique_ptr m_pListLevels[10];
 };
 
 inline void XFListLevel::SetListlevelType(enumXFListLevel type)
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
index 78463a943c56..844f65bd1a5b 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
@@ -156,12 +156,12 @@ XFListStyle::XFListStyle()
 
 for( int i=0; i<10; i++ )
 {
-m_pListLevels[i] = new XFListlevelNumber();
+m_pListLevels[i].reset(new XFListlevelNumber());
 m_pListLevels[i]->SetListlevelType(enumXFListLevelNumber);
 m_pListLevels[i]->SetMinLabelWidth(0.499);
 m_pListLevels[i]->SetIndent(0.501*(i+1));
 m_pListLevels[i]->SetLevel(i+1);
-static_cast(m_pListLevels[i])->SetNumFmt(nf);
+static_cast(m_pListLevels[i].get())->SetNumFmt(nf);
 }
 }
 
@@ -172,16 +172,16 @@ XFListStyle::XFListStyle(const XFListStyle& 
other):XFStyle(other)
 const enumXFListLevel type = other.m_pListLevels[i]->m_eListType;
 if( type == enumXFListLevelNumber )
 {
-XFListlevelNumber *pNum = 
static_cast(other.m_pListLevels[i]);
-m_pListLevels[i] = new XFListlevelNumber(*pNum);
+XFListlevelNumber *pNum = 
static_cast(other.m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListlevelNumber(*pNum));
 }
 else if( type == enumXFListLevelBullet )
 {
-XFListLevelBullet *pBullet = 
static_cast(other.m_pListLevels[i]);
-m_pListLevels[i] = new XFListLevelBullet(*pBullet);
+XFListLevelBullet *pBullet = 
static_cast(other.m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListLevelBullet(*pBullet));
 }
 else
-m_pListLevels[i] = nullptr;
+m_pListLevels[i].reset();
 }
 }
 
@@ -192,45 +192,39 @@ XFListStyle& XFListStyle::operator=(const XFListStyle& 
other)
 const enumXFListLevel type = other.m_pListLevels[i]->m_eListType;
 if( type == enumXFListLevelNumber )
 {
-XFListlevelNumber *pNum = 
static_cast(m_pListLevels[i]);
-m_pListLevels[i] = new XFListlevelNumber(*pNum);
+XFListlevelNumber *pNum = 
static_cast(m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListlevelNumber(*pNum));
 }
 else if( type == enumXFListLevelBullet )
 {
-XFListLevelBullet *pBullet = 
static_cast(m_pListLevels[i]);
-m_pListLevels[i] = new XFListLevelBullet(*pBullet);
+XFListLevelBullet *pBullet = 
static_cast(m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListLevelBullet(*pBullet));
 }
 else
-m_pListLevels[i] = nullptr;
+m_pListLevels[i].reset();
 }
 return *this;
 }
 
 XFListStyle::~XFListStyle()
 {
-for(XFListLevel* p : m_pListLevels)
-{
-delete p;
-}
 }
 
 voidXFListStyle::SetDisplayLevel(sal_Int32 level, sal_Int16 nDisplayLevel)
 {
 assert(level>=1&<=10);
 
-XFListLevel *pLevel = m_pListLevels[level-1];
+XFListLevel *pLevel = m_pListLevels[level-1].get();
 if( !pLevel )
 {
-pLevel = new XFListlevelNumber();
+m_pListLevels[level-1].reset(new XFListlevelNumber());
+pLevel = m_pListLevels[level-1].get();
 pLevel->SetListlevelType(enumXFListLevelNumber);
 pLevel->SetLevel(level+1);
 pLevel->SetMinLabelWidth(0.499);
 pLevel->SetIndent(0.501*(level+1));
-pLevel->SetDisplayLevel(nDisplayLevel);
-