[Libreoffice-commits] libvisio.git: 16 commits - src/lib src/test

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Aug 3 17:00:22 UTC 2019


 src/lib/Makefile.am      |    1 
 src/lib/VSDFieldList.cpp |    4 
 src/lib/VSDParser.cpp    |   18 ++++
 src/lib/VSDParser.h      |    1 
 src/lib/VSDStyles.cpp    |  200 +++++++++++++++++++++++++++++++++++++++++++++++
 src/lib/VSDStyles.h      |   10 ++
 src/lib/VSDTypes.cpp     |   80 ++++++++++++++++++
 src/lib/VSDTypes.h       |    6 +
 src/test/importtest.cpp  |   64 +++++++--------
 9 files changed, 349 insertions(+), 35 deletions(-)

New commits:
commit 8480dedbe1a5fd27df4c0bfc0ecbb868ad081a8b
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:59:23 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:59:52 2019 +0200

    WaE: implicitly-declared Pointer::operator= is deprecated
    
    Change-Id: I1a092b3e976bd31b1764698001b9f320757d2cc4

diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 03b24fd..5ad8aa3 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -23,6 +23,24 @@
 #include "VSDStylesCollector.h"
 #include "VSDMetaData.h"
 
+namespace libvisio
+{
+
+const Pointer &Pointer::operator=(const Pointer &ptr)
+{
+  if (this != &ptr)
+  {
+    Type = ptr.Type;
+    Offset = ptr.Offset;
+    Length = ptr.Length;
+    Format = ptr.Format;
+    ListSize = ptr.ListSize;
+  }
+  return *this;
+}
+
+}
+
 libvisio::VSDParser::VSDParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter, librevenge::RVNGInputStream *container)
   : m_input(input), m_painter(painter), m_container(container), m_header(), m_collector(nullptr), m_shapeList(), m_currentLevel(0),
     m_stencils(), m_currentStencil(nullptr), m_shape(), m_isStencilStarted(false), m_isInStyles(false),
diff --git a/src/lib/VSDParser.h b/src/lib/VSDParser.h
index be8515b..e8fd64c 100644
--- a/src/lib/VSDParser.h
+++ b/src/lib/VSDParser.h
@@ -37,6 +37,7 @@ struct Pointer
     : Type(0), Offset(0), Length(0), Format(0), ListSize(0) {}
   Pointer(const Pointer &ptr)
     : Type(ptr.Type), Offset(ptr.Offset), Length(ptr.Length), Format(ptr.Format), ListSize(ptr.ListSize) {}
+  const Pointer &operator=(const Pointer &ptr);
   unsigned Type;
   unsigned Offset;
   unsigned Length;
commit 3a1c047b8de4c354b4fb866a7c14012e124067ee
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:56:11 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:56:44 2019 +0200

    WaE: implicitly-declared VSDOptionalFillStyle::operator= is deprecated
    
    Change-Id: Iabc5a0e4fa4b223fd39405829257cce35d44d92e

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 7c9d339..c04ea1a 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -87,6 +87,26 @@ const VSDLineStyle &VSDLineStyle::operator=(const VSDLineStyle &style)
   return *this;
 }
 
+const VSDOptionalFillStyle &VSDOptionalFillStyle::operator=(const VSDOptionalFillStyle &style)
+{
+  if (this != &style)
+  {
+    fgColour = style.fgColour;
+    bgColour = style.bgColour;
+    pattern = style.pattern;
+    fgTransparency = style.fgTransparency;
+    bgTransparency = style.bgTransparency;
+    shadowFgColour = style.shadowFgColour;
+    shadowPattern = style.shadowPattern;
+    shadowOffsetX = style.shadowOffsetX;
+    shadowOffsetY = style.shadowOffsetY;
+    qsFillColour = style.qsFillColour;
+    qsShadowColour = style.qsShadowColour;
+    qsFillMatrix = style.qsFillMatrix;
+  }
+  return *this;
+}
+
 const VSDFillStyle &VSDFillStyle::operator=(const VSDFillStyle &style)
 {
   if (this != &style)
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 338d641..dc229af 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -130,6 +130,7 @@ struct VSDOptionalFillStyle
     qsFillColour(style.qsFillColour), qsShadowColour(style.qsShadowColour),
     qsFillMatrix(style.qsFillMatrix) {}
   ~VSDOptionalFillStyle() {}
+  const VSDOptionalFillStyle &operator=(const VSDOptionalFillStyle &style);
   void override(const VSDOptionalFillStyle &style)
   {
     ASSIGN_OPTIONAL(style.pattern, pattern);
commit f860cf6342530b80248f9c054fa16d1b293509a0
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:50:01 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:54:00 2019 +0200

    WaE: implicitly-declared VSDTextBlockStyle::operator= is deprecated
    
    Change-Id: Ic482a4bdd3386504ec65fb04c5d302bc2218ecf9

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 3bf28ca..7c9d339 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -216,6 +216,23 @@ const VSDOptionalTextBlockStyle &VSDOptionalTextBlockStyle::operator=(const VSDO
   return *this;
 }
 
+const VSDTextBlockStyle &VSDTextBlockStyle::operator=(const VSDTextBlockStyle &style)
+{
+  if (this != &style)
+  {
+    leftMargin = style.leftMargin;
+    rightMargin = style.rightMargin;
+    topMargin = style.topMargin;
+    bottomMargin = style.bottomMargin;
+    verticalAlign = style.verticalAlign;
+    isTextBkgndFilled = style.isTextBkgndFilled;
+    textBkgndColour = style.textBkgndColour;
+    defaultTabStop = style.defaultTabStop;
+    textDirection = style.textDirection;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 32d4957..338d641 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -513,6 +513,7 @@ struct VSDTextBlockStyle
     bottomMargin(style.bottomMargin), verticalAlign(style.verticalAlign), isTextBkgndFilled(style.isTextBkgndFilled),
     textBkgndColour(style.textBkgndColour), defaultTabStop(style.defaultTabStop), textDirection(style.textDirection) {}
   ~VSDTextBlockStyle() {}
+  const VSDTextBlockStyle &operator=(const VSDTextBlockStyle &style);
   void override(const VSDOptionalTextBlockStyle &style, const VSDXTheme * /* theme */)
   {
     ASSIGN_OPTIONAL(style.leftMargin, leftMargin);
commit d8f9af1e0e06f2439c1737312744f0b6f83e60ab
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:48:43 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:54:00 2019 +0200

    WaE: implicitly-declared VSDOptionalTextBlockStyle::operator= is deprecated
    
    Change-Id: Idfc7955fb75afd14cec262f8815d3cb1cebe3900

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 2807c5d..3bf28ca 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -199,6 +199,23 @@ const VSDParaStyle &VSDParaStyle::operator=(const VSDParaStyle &style)
   return *this;
 }
 
+const VSDOptionalTextBlockStyle &VSDOptionalTextBlockStyle::operator=(const VSDOptionalTextBlockStyle &style)
+{
+  if (this != &style)
+  {
+    leftMargin = style.leftMargin;
+    rightMargin = style.rightMargin;
+    topMargin = style.topMargin;
+    bottomMargin = style.bottomMargin;
+    verticalAlign = style.verticalAlign;
+    isTextBkgndFilled = style.isTextBkgndFilled;
+    textBkgndColour = style.textBkgndColour;
+    defaultTabStop = style.defaultTabStop;
+    textDirection = style.textDirection;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 616be38..32d4957 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -474,6 +474,7 @@ struct VSDOptionalTextBlockStyle
     isTextBkgndFilled(style.isTextBkgndFilled), textBkgndColour(style.textBkgndColour),
     defaultTabStop(style.defaultTabStop), textDirection(style.textDirection) {}
   ~VSDOptionalTextBlockStyle() {}
+  const VSDOptionalTextBlockStyle &operator=(const VSDOptionalTextBlockStyle &style);
   void override(const VSDOptionalTextBlockStyle &style)
   {
     ASSIGN_OPTIONAL(style.leftMargin, leftMargin);
commit 7af74e2dcda9e31369b57e84b7e3f0341401e653
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:46:44 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:54:00 2019 +0200

    WaE: implicitly-declared VSDParaStyle::operator= is deprecated
    
    Change-Id: I4b6e91f40cfb24f4492eb75f5b8ffff53fbddf7f

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index addf1f0..2807c5d 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -177,6 +177,28 @@ const VSDOptionalParaStyle &VSDOptionalParaStyle::operator=(const VSDOptionalPar
   return *this;
 }
 
+const VSDParaStyle &VSDParaStyle::operator=(const VSDParaStyle &style)
+{
+  if (this != &style)
+  {
+    charCount = style.charCount;
+    indFirst = style.indFirst;
+    indLeft = style.indLeft;
+    indRight = style.indRight;
+    spLine = style.spLine;
+    spBefore = style.spBefore;
+    spAfter = style.spAfter;
+    align = style.align;
+    bullet = style.bullet;
+    bulletStr = style.bulletStr;
+    bulletFont = style.bulletFont;
+    bulletFontSize = style.bulletFontSize;
+    textPosAfterBullet = style.textPosAfterBullet;
+    flags = style.flags;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 0ee5f84..616be38 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -422,6 +422,7 @@ struct VSDParaStyle
     bullet(style.bullet), bulletStr(style.bulletStr), bulletFont(style.bulletFont),
     bulletFontSize(style.bulletFontSize), textPosAfterBullet(style.textPosAfterBullet), flags(style.flags) {}
   ~VSDParaStyle() {}
+  const VSDParaStyle &operator=(const VSDParaStyle &style);
   void override(const VSDOptionalParaStyle &style, const VSDXTheme * /* theme */)
   {
     ASSIGN_OPTIONAL(style.indFirst, indFirst);
commit 59be5ee54f84a3cf481a5d9dd02c78241327daaf
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:44:57 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:54:00 2019 +0200

    WaE: implicitly-declared VSDOptionalParaStyle::operator= is deprecated
    
    Change-Id: Ide41be4bbae843c0f96240efcb0d85f60b6f37ec

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 0268e6f..addf1f0 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -155,6 +155,28 @@ const VSDCharStyle &VSDCharStyle::operator=(const VSDCharStyle &style)
   return *this;
 }
 
+const VSDOptionalParaStyle &VSDOptionalParaStyle::operator=(const VSDOptionalParaStyle &style)
+{
+  if (this != &style)
+  {
+    charCount = style.charCount;
+    indFirst = style.indFirst;
+    indLeft = style.indLeft;
+    indRight = style.indRight;
+    spLine = style.spLine;
+    spBefore = style.spBefore;
+    spAfter = style.spAfter;
+    align = style.align;
+    bullet = style.bullet;
+    bulletStr = style.bulletStr;
+    bulletFont = style.bulletFont;
+    bulletFontSize = style.bulletFontSize;
+    textPosAfterBullet = style.textPosAfterBullet;
+    flags = style.flags;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 092e283..0ee5f84 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -372,6 +372,7 @@ struct VSDOptionalParaStyle
     bulletFontSize(style.bulletFontSize), textPosAfterBullet(style.textPosAfterBullet),
     flags(style.flags) {}
   ~VSDOptionalParaStyle() {}
+  const VSDOptionalParaStyle &operator=(const VSDOptionalParaStyle &style);
   void override(const VSDOptionalParaStyle &style)
   {
     ASSIGN_OPTIONAL(style.indFirst, indFirst);
commit 8f3932b2cf4d550787546feea93bf9c45278d36b
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:44:23 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:54:00 2019 +0200

    WaE: implicitly-declared VSDCharStyle::operator= is deprecated
    
    Change-Id: Iaa5ac6e94bb53afebc9a09c42134cd64583cfc43

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 103f927..0268e6f 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -131,6 +131,30 @@ const VSDOptionalCharStyle &VSDOptionalCharStyle::operator=(const VSDOptionalCha
   return *this;
 }
 
+const VSDCharStyle &VSDCharStyle::operator=(const VSDCharStyle &style)
+{
+  if (this != &style)
+  {
+    charCount = style.charCount;
+    font = style.font;
+    colour = style.colour;
+    size = style.size;
+    bold = style.bold;
+    italic = style.italic;
+    underline = style.underline;
+    doubleunderline = style.doubleunderline;
+    strikeout = style.strikeout;
+    doublestrikeout = style.doublestrikeout;
+    allcaps = style.allcaps;
+    initcaps = style.initcaps;
+    smallcaps = style.smallcaps;
+    superscript = style.superscript;
+    subscript = style.subscript;
+    scaleWidth = style.scaleWidth;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 2ef6a23..092e283 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -312,6 +312,7 @@ struct VSDCharStyle
     smallcaps(style.smallcaps), superscript(style.superscript),
     subscript(style.subscript), scaleWidth(style.scaleWidth) {}
   ~VSDCharStyle() {}
+  const VSDCharStyle &operator=(const VSDCharStyle &style);
   void override(const VSDOptionalCharStyle &style, const VSDXTheme * /* theme */)
   {
     ASSIGN_OPTIONAL(style.font, font);
commit 129afac556b38de50abdba5a3267ef88561418ac
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:39:40 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:53:59 2019 +0200

    WaE: implicitly-declared VSDOptionalCharStyle::operator= is deprecated
    
    Change-Id: I1729b9229bc01062486f9e124c3d3f13f6aaacf8

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index ee48226..103f927 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -107,6 +107,30 @@ const VSDFillStyle &VSDFillStyle::operator=(const VSDFillStyle &style)
   return *this;
 }
 
+const VSDOptionalCharStyle &VSDOptionalCharStyle::operator=(const VSDOptionalCharStyle &style)
+{
+  if (this != &style)
+  {
+    charCount = style.charCount;
+    font = style.font;
+    colour = style.colour;
+    size = style.size;
+    bold = style.bold;
+    italic = style.italic;
+    underline = style.underline;
+    doubleunderline = style.doubleunderline;
+    strikeout = style.strikeout;
+    doublestrikeout = style.doublestrikeout;
+    allcaps = style.allcaps;
+    initcaps = style.initcaps;
+    smallcaps = style.smallcaps;
+    superscript = style.superscript;
+    subscript = style.subscript;
+    scaleWidth = style.scaleWidth;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index b793cbb..2ef6a23 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -250,6 +250,7 @@ struct VSDOptionalCharStyle
     allcaps(style.allcaps), initcaps(style.initcaps), smallcaps(style.smallcaps),
     superscript(style.superscript), subscript(style.subscript), scaleWidth(style.scaleWidth) {}
   ~VSDOptionalCharStyle() {}
+  const VSDOptionalCharStyle &operator=(const VSDOptionalCharStyle &style);
   void override(const VSDOptionalCharStyle &style)
   {
     ASSIGN_OPTIONAL(style.font, font);
commit 4136243660429bc2f9775847e3992b7446f2805b
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:37:24 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:51:15 2019 +0200

    WaE: implicitly-declared VSDFillStyle::operator= is deprecated
    
    Change-Id: Ie3ca69e7386ebbf04f7b5972f3ed96139e26015c

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 1ea27a9..ee48226 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -87,6 +87,26 @@ const VSDLineStyle &VSDLineStyle::operator=(const VSDLineStyle &style)
   return *this;
 }
 
+const VSDFillStyle &VSDFillStyle::operator=(const VSDFillStyle &style)
+{
+  if (this != &style)
+  {
+    fgColour = style.fgColour;
+    bgColour = style.bgColour;
+    pattern = style.pattern;
+    fgTransparency = style.fgTransparency;
+    bgTransparency = style.bgTransparency;
+    shadowFgColour = style.shadowFgColour;
+    shadowPattern = style.shadowPattern;
+    shadowOffsetX = style.shadowOffsetX;
+    shadowOffsetY = style.shadowOffsetY;
+    qsFillColour = style.qsFillColour;
+    qsShadowColour = style.qsShadowColour;
+    qsFillMatrix = style.qsFillMatrix;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 38f3b6d..b793cbb 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -180,6 +180,7 @@ struct VSDFillStyle
     qsFillColour(style.qsFillColour), qsShadowColour(style.qsShadowColour),
     qsFillMatrix(style.qsFillMatrix) {}
   ~VSDFillStyle() {}
+  const VSDFillStyle &operator=(const VSDFillStyle &style);
   void override(const VSDOptionalFillStyle &style, const VSDXTheme *theme)
   {
     ASSIGN_OPTIONAL(style.pattern, pattern);
commit ee13a1bffa6d78924d1d2312abc5d86078b2b251
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:36:00 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:40:27 2019 +0200

    WaE: implicitly-declared VSDLineStyle::operator= is deprecated
    
    Change-Id: I6760c2d8bd4bb85e0d760abdb86beea45e4fffeb

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index a64e5ea..1ea27a9 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -70,6 +70,23 @@ const VSDOptionalLineStyle &VSDOptionalLineStyle::operator=(const VSDOptionalLin
   return *this;
 }
 
+const VSDLineStyle &VSDLineStyle::operator=(const VSDLineStyle &style)
+{
+  if (this != &style)
+  {
+    width = style.width;
+    colour = style.colour;
+    pattern = style.pattern;
+    startMarker = style.startMarker;
+    endMarker = style.endMarker;
+    cap = style.cap;
+    rounding = style.rounding;
+    qsLineColour = style.qsLineColour;
+    qsLineMatrix = style.qsLineMatrix;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index 0e45cd2..38f3b6d 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -77,6 +77,7 @@ struct VSDLineStyle
     rounding(style.rounding), qsLineColour(style.qsLineColour),
     qsLineMatrix(style.qsLineMatrix) {}
   ~VSDLineStyle() {}
+  const VSDLineStyle &operator=(const VSDLineStyle &style);
   void override(const VSDOptionalLineStyle &style, const VSDXTheme *theme)
   {
     ASSIGN_OPTIONAL(style.width, width);
commit b1abd7606f21dbad9119788087c373f3caae171a
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:34:45 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:40:25 2019 +0200

    WaE: implicitly-declared VSDOptionalLineStyle::operator= is deprecated
    
    Change-Id: I599cc0a57aad586def69f548955800082a5a4bdf

diff --git a/src/lib/VSDStyles.cpp b/src/lib/VSDStyles.cpp
index 9a3d400..a64e5ea 100644
--- a/src/lib/VSDStyles.cpp
+++ b/src/lib/VSDStyles.cpp
@@ -53,6 +53,23 @@ T getOptionalStyle(const std::map<unsigned, unsigned> &styleMasters, const std::
 
 }
 
+const VSDOptionalLineStyle &VSDOptionalLineStyle::operator=(const VSDOptionalLineStyle &style)
+{
+  if (this != &style)
+  {
+    width = style.width;
+    colour = style.colour;
+    pattern = style.pattern;
+    startMarker = style.startMarker;
+    endMarker = style.endMarker;
+    cap = style.cap;
+    rounding = style.rounding;
+    qsLineColour = style.qsLineColour;
+    qsLineMatrix = style.qsLineMatrix;
+  }
+  return *this;
+}
+
 }
 
 libvisio::VSDStyles::VSDStyles() :
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index fbf6adc..0e45cd2 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -37,6 +37,7 @@ struct VSDOptionalLineStyle
     endMarker(style.endMarker), cap(style.cap), rounding(style.rounding), qsLineColour(style.qsLineColour),
     qsLineMatrix(style.qsLineMatrix) {}
   ~VSDOptionalLineStyle() {}
+  const VSDOptionalLineStyle &operator=(const VSDOptionalLineStyle &style);
   void override(const VSDOptionalLineStyle &style)
   {
     ASSIGN_OPTIONAL(style.width, width);
diff --git a/src/lib/VSDTypes.cpp b/src/lib/VSDTypes.cpp
index 5739939..7b75fac 100644
--- a/src/lib/VSDTypes.cpp
+++ b/src/lib/VSDTypes.cpp
@@ -31,6 +31,21 @@ const XForm &XForm::operator=(const XForm &xform)
   return *this;
 }
 
+const NURBSData &NURBSData::operator=(const NURBSData &data)
+{
+  if (this != &data)
+  {
+    lastKnot = data.lastKnot;
+    degree = data.degree;
+    xType = data.xType;
+    yType = data.yType;
+    knots = data.knots;
+    weights = data.weights;
+    points = data.points;
+  }
+  return *this;
+}
+
 const VSDName &VSDName::operator=(const VSDName &name)
 {
   if (this != &name)
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index 721d7c9..75b9fdd 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -117,6 +117,7 @@ struct NURBSData
       knots(data.knots),
       weights(data.weights),
       points(data.points) {}
+  const NURBSData &operator=(const NURBSData &data);
 };
 
 struct PolylineData
commit 3c9fca3cc5349bd91369ea6cc32da37d52290d8b
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:27:42 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:27:42 2019 +0200

    WaE: implicitly-declared VSDBullet::operator= is deprecated
    
    Change-Id: Ib3f64f30ffe1616c08bb383ed1c462da6d4a31bc

diff --git a/src/lib/VSDTypes.cpp b/src/lib/VSDTypes.cpp
index 4483f25..5739939 100644
--- a/src/lib/VSDTypes.cpp
+++ b/src/lib/VSDTypes.cpp
@@ -48,6 +48,18 @@ const VSDMisc &VSDMisc::operator=(const VSDMisc &misc)
   return *this;
 }
 
+const VSDBullet &VSDBullet::operator=(const VSDBullet &bullet)
+{
+  if (this != &bullet)
+  {
+    m_bulletStr = bullet.m_bulletStr;
+    m_bulletFont = bullet.m_bulletFont;
+    m_bulletFontSize = bullet.m_bulletFontSize;
+    m_textPosAfterBullet = bullet.m_textPosAfterBullet;
+  }
+  return *this;
+}
+
 } // namespace libvisio
 
 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index 35e8cf1..721d7c9 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -252,6 +252,7 @@ struct VSDBullet
     m_bulletFont(bullet.m_bulletFont),
     m_bulletFontSize(bullet.m_bulletFontSize),
     m_textPosAfterBullet(bullet.m_textPosAfterBullet) {}
+  const VSDBullet &operator=(const VSDBullet &bullet);
   inline bool operator==(const VSDBullet &bullet) const
   {
     return ((m_bulletStr == bullet.m_bulletStr) &&
commit 4dfbf7940eb0821c76e2b66b5f27ae9eed31220b
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:25:00 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:25:00 2019 +0200

    WaE: implicitly-declared XForm::operator= is deprecated
    
    Change-Id: I60e9d0bc7f148f3289552d0169b6cebfba8edee4

diff --git a/src/lib/VSDTypes.cpp b/src/lib/VSDTypes.cpp
index 0b2182f..4483f25 100644
--- a/src/lib/VSDTypes.cpp
+++ b/src/lib/VSDTypes.cpp
@@ -12,6 +12,25 @@
 namespace libvisio
 {
 
+const XForm &XForm::operator=(const XForm &xform)
+{
+  if (this != &xform)
+  {
+    pinX = xform.pinX;
+    pinY = xform.pinY;
+    height = xform.height;
+    width = xform.width;
+    pinLocX = xform.pinLocX;
+    pinLocY = xform.pinLocY;
+    angle = xform.angle;
+    flipX = xform.flipX;
+    flipY = xform.flipY;
+    x = xform.x;
+    y = xform.y;
+  }
+  return *this;
+}
+
 const VSDName &VSDName::operator=(const VSDName &name)
 {
   if (this != &name)
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index adf62a3..35e8cf1 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -38,7 +38,7 @@ struct XForm
   XForm(const XForm &xform) : pinX(xform.pinX), pinY(xform.pinY), height(xform.height),
     width(xform.width), pinLocX(xform.pinLocX), pinLocY(xform.pinLocY), angle(xform.angle),
     flipX(xform.flipX), flipY(xform.flipY), x(xform.x), y(xform.y) {}
-
+  const XForm &operator=(const XForm &xform);
 };
 
 struct XForm1D
commit a7455c5213007603bd6b129288cf00569e4817b8
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:15:48 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:21:46 2019 +0200

    WaE: implicitly-declared VSDMisc::operator= is deprecated
    
    Change-Id: I02ff6e1dc02c58ea9fcf26aaacfef245f66fe61a

diff --git a/src/lib/VSDTypes.cpp b/src/lib/VSDTypes.cpp
index 70b9890..0b2182f 100644
--- a/src/lib/VSDTypes.cpp
+++ b/src/lib/VSDTypes.cpp
@@ -22,6 +22,13 @@ const VSDName &VSDName::operator=(const VSDName &name)
   return *this;
 }
 
+const VSDMisc &VSDMisc::operator=(const VSDMisc &misc)
+{
+  if (this != &misc)
+    m_hideText = misc.m_hideText;
+  return *this;
+}
+
 } // namespace libvisio
 
 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index 7e75ee4..adf62a3 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -213,6 +213,7 @@ struct VSDMisc
   bool m_hideText;
   VSDMisc() : m_hideText(false) {}
   VSDMisc(const VSDMisc &misc) : m_hideText(misc.m_hideText) {}
+  const VSDMisc &operator=(const VSDMisc &misc);
 };
 
 struct VSDTabStop
commit dfed7b1e459f3bde8dcbb997e5664deeff9e338d
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:12:55 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:20:24 2019 +0200

    WaE: implicitly-declared VSDName::operator= is deprecated
    
    Change-Id: Ic99122062fc314a3ae6e3b904e4415f8b276f646

diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index d8a798e..e6212e8 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -65,6 +65,7 @@ libvisio_internal_la_SOURCES = \
 	VSDStyles.h \
 	VSDStylesCollector.cpp \
 	VSDStylesCollector.h \
+	VSDTypes.cpp \
 	VSDTypes.h \
 	VSDXMLHelper.cpp \
 	VSDXMLHelper.h \
diff --git a/src/lib/VSDTypes.cpp b/src/lib/VSDTypes.cpp
new file mode 100644
index 0000000..70b9890
--- /dev/null
+++ b/src/lib/VSDTypes.cpp
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * This file is part of the libvisio project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "VSDTypes.h"
+
+namespace libvisio
+{
+
+const VSDName &VSDName::operator=(const VSDName &name)
+{
+  if (this != &name)
+  {
+    m_data = name.m_data;
+    m_format = name.m_format;
+  }
+  return *this;
+}
+
+} // namespace libvisio
+
+/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/VSDTypes.h b/src/lib/VSDTypes.h
index fbcb65d..7e75ee4 100644
--- a/src/lib/VSDTypes.h
+++ b/src/lib/VSDTypes.h
@@ -183,6 +183,7 @@ public:
       m_format(format) {}
   VSDName() : m_data(), m_format(VSD_TEXT_ANSI) {}
   VSDName(const VSDName &name) : m_data(name.m_data), m_format(name.m_format) {}
+  const VSDName &operator=(const VSDName &name);
   bool empty() const
   {
     return !m_data.size();
commit 95ccb8facab44862b12f69eac9b52ede02a1a55d
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Sat Aug 3 18:13:29 2019 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Sat Aug 3 18:13:34 2019 +0200

    astyle
    
    Change-Id: I2d5fac3180897b3a35fa62edf8dddb545b3595be

diff --git a/src/lib/VSDFieldList.cpp b/src/lib/VSDFieldList.cpp
index b936535..f16b5f2 100644
--- a/src/lib/VSDFieldList.cpp
+++ b/src/lib/VSDFieldList.cpp
@@ -71,7 +71,7 @@ librevenge::RVNGString libvisio::VSDNumericField::datetimeToString(const char *f
 // This method is copied from:
 // https://sourceforge.net/p/libwpd/librevenge/ci/master/tree/src/lib/RVNGProperty.cpp#l35
 // to avoid ABI breakage. If upstream file was modified, please update method accordingly.
-static librevenge::RVNGString doubleToString(const double value, const char* format, const char* postfix)
+static librevenge::RVNGString doubleToString(const double value, const char *format, const char *postfix)
 {
   librevenge::RVNGString tempString;
   if (value < 0.0001 && value > -0.0001)
@@ -154,7 +154,7 @@ double convertNumber(const unsigned short cellType, const double number)
   }
 }
 
-const char* getUnitString(const unsigned short cellType)
+const char *getUnitString(const unsigned short cellType)
 {
   switch (cellType)
   {
diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
index 468f362..0e54d41 100644
--- a/src/test/importtest.cpp
+++ b/src/test/importtest.cpp
@@ -117,38 +117,38 @@ librevenge::RVNGString getXPathContent(xmlDocPtr doc, const librevenge::RVNGStri
   xmlXPathObjectPtr xpathobject = getXPathNode(doc, xpath);
   switch (xpathobject->type)
   {
-      case XPATH_UNDEFINED:
-          CPPUNIT_FAIL("Undefined XPath type");
-      case XPATH_NODESET:
-      {
-          xmlNodeSetPtr nodeset = xpathobject->nodesetval;
-
-          librevenge::RVNGString message("XPath '");
-          message.append(xpath);
-          message.append("': not found.");
-          CPPUNIT_ASSERT_MESSAGE(message.cstr(), xmlXPathNodeSetGetLength(nodeset) > 0);
-
-          xmlNodePtr xmlnode = nodeset->nodeTab[0];
-          xmlNodePtr xmlchild = xmlnode->children;
-          librevenge::RVNGString s;
-          while (xmlchild && xmlchild->type != XML_TEXT_NODE)
-              xmlchild = xmlchild->next;
-          if (xmlchild && xmlchild->type == XML_TEXT_NODE)
-              s = (reinterpret_cast<char *>((xmlnode->children[0]).content));
-          xmlXPathFreeObject(xpathobject);
-          return s;
-      }
-      case XPATH_BOOLEAN:
-          return xpathobject->boolval ? librevenge::RVNGString("true") : librevenge::RVNGString("false");
-      case XPATH_STRING:
-          return librevenge::RVNGString(reinterpret_cast<char *>(xpathobject->stringval));
-      case XPATH_NUMBER:
-      case XPATH_POINT:
-      case XPATH_RANGE:
-      case XPATH_LOCATIONSET:
-      case XPATH_USERS:
-      case XPATH_XSLT_TREE:
-          CPPUNIT_FAIL("Unsupported XPath type");
+  case XPATH_UNDEFINED:
+    CPPUNIT_FAIL("Undefined XPath type");
+  case XPATH_NODESET:
+  {
+    xmlNodeSetPtr nodeset = xpathobject->nodesetval;
+
+    librevenge::RVNGString message("XPath '");
+    message.append(xpath);
+    message.append("': not found.");
+    CPPUNIT_ASSERT_MESSAGE(message.cstr(), xmlXPathNodeSetGetLength(nodeset) > 0);
+
+    xmlNodePtr xmlnode = nodeset->nodeTab[0];
+    xmlNodePtr xmlchild = xmlnode->children;
+    librevenge::RVNGString s;
+    while (xmlchild && xmlchild->type != XML_TEXT_NODE)
+      xmlchild = xmlchild->next;
+    if (xmlchild && xmlchild->type == XML_TEXT_NODE)
+      s = (reinterpret_cast<char *>((xmlnode->children[0]).content));
+    xmlXPathFreeObject(xpathobject);
+    return s;
+  }
+  case XPATH_BOOLEAN:
+    return xpathobject->boolval ? librevenge::RVNGString("true") : librevenge::RVNGString("false");
+  case XPATH_STRING:
+    return librevenge::RVNGString(reinterpret_cast<char *>(xpathobject->stringval));
+  case XPATH_NUMBER:
+  case XPATH_POINT:
+  case XPATH_RANGE:
+  case XPATH_LOCATIONSET:
+  case XPATH_USERS:
+  case XPATH_XSLT_TREE:
+    CPPUNIT_FAIL("Unsupported XPath type");
   }
 
   CPPUNIT_FAIL("Invalid XPath type");


More information about the Libreoffice-commits mailing list