[Libreoffice-commits] libcdr.git: src/lib

Fridrich Å trba fridrich.strba at bluewin.ch
Wed Nov 6 15:55:06 CET 2013


 src/lib/CDROutputElementList.cpp |    6 --
 src/lib/CDROutputElementList.h   |    1 
 src/lib/CDRTransforms.cpp        |   58 -----------------------
 src/lib/CDRTransforms.h          |    8 ---
 src/lib/CDRTypes.cpp             |   97 ---------------------------------------
 src/lib/CDRTypes.h               |   12 ----
 src/lib/libcdr_utils.cpp         |    5 --
 src/lib/libcdr_utils.h           |    1 
 8 files changed, 188 deletions(-)

New commits:
commit 08177147508465da5207bac24661465cf0c39a12
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Nov 6 15:54:40 2013 +0100

    callcatcher action
    
    Change-Id: I4e84acb68b51c9087206dfda37c592229fcc77a7

diff --git a/src/lib/CDROutputElementList.cpp b/src/lib/CDROutputElementList.cpp
index 13b297d..c34224f 100644
--- a/src/lib/CDROutputElementList.cpp
+++ b/src/lib/CDROutputElementList.cpp
@@ -357,12 +357,6 @@ libcdr::CDROutputElementList &libcdr::CDROutputElementList::operator=(const libc
   return *this;
 }
 
-void libcdr::CDROutputElementList::append(const libcdr::CDROutputElementList &elementList)
-{
-  for (std::vector<CDROutputElement *>::const_iterator cstiter = elementList.m_elements.begin(); cstiter != elementList.m_elements.end(); ++cstiter)
-    m_elements.push_back((*cstiter)->clone());
-}
-
 libcdr::CDROutputElementList::~CDROutputElementList()
 {
   for (std::vector<CDROutputElement *>::iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter)
diff --git a/src/lib/CDROutputElementList.h b/src/lib/CDROutputElementList.h
index 536f68c..9c77e9e 100644
--- a/src/lib/CDROutputElementList.h
+++ b/src/lib/CDROutputElementList.h
@@ -48,7 +48,6 @@ public:
   CDROutputElementList(const CDROutputElementList &elementList);
   CDROutputElementList &operator=(const CDROutputElementList &elementList);
   virtual ~CDROutputElementList();
-  void append(const CDROutputElementList &elementList);
   void draw(librevenge::RVNGDrawingInterface *painter) const;
   void addStyle(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec);
   void addPath(const librevenge::RVNGPropertyListVector &propListVec);
diff --git a/src/lib/CDRTransforms.cpp b/src/lib/CDRTransforms.cpp
index 71b87cd..861a5c3 100644
--- a/src/lib/CDRTransforms.cpp
+++ b/src/lib/CDRTransforms.cpp
@@ -172,64 +172,6 @@ void libcdr::CDRTransform::applyToArc(double &rx, double &ry, double &rotation,
   }
 }
 
-double libcdr::CDRTransform::_getScaleX() const
-{
-  double x0 = 0.0;
-  double x1 = 1.0;
-  double y0 = 0.0;
-  double y1 = 0.0;
-  applyToPoint(x0, y0);
-  applyToPoint(x1, y1);
-  return x1 - x0;
-}
-
-double libcdr::CDRTransform::getScaleX() const
-{
-  return fabs(_getScaleX());
-}
-
-bool libcdr::CDRTransform::getFlipX() const
-{
-  return (0 > _getScaleX());
-}
-
-double libcdr::CDRTransform::_getScaleY() const
-{
-  double x0 = 0.0;
-  double x1 = 0.0;
-  double y0 = 0.0;
-  double y1 = 1.0;
-  applyToPoint(x0, y0);
-  applyToPoint(x1, y1);
-  return y1 - y0;
-}
-
-double libcdr::CDRTransform::getScaleY() const
-{
-  return fabs(_getScaleY());
-}
-
-bool libcdr::CDRTransform::getFlipY() const
-{
-  return (0 > _getScaleY());
-}
-
-double libcdr::CDRTransform::getTranslateX() const
-{
-  double x = 0.0;
-  double y = 0.0;
-  applyToPoint(x, y);
-  return x;
-}
-
-double libcdr::CDRTransform::getTranslateY() const
-{
-  double x = 0.0;
-  double y = 0.0;
-  applyToPoint(x, y);
-  return y;
-}
-
 
 libcdr::CDRTransforms::CDRTransforms()
   : m_trafos()
diff --git a/src/lib/CDRTransforms.h b/src/lib/CDRTransforms.h
index 8bcbe34..38697ea 100644
--- a/src/lib/CDRTransforms.h
+++ b/src/lib/CDRTransforms.h
@@ -45,16 +45,8 @@ public:
 
   void applyToPoint(double &x, double &y) const;
   void applyToArc(double &rx, double &ry, double &rotation, bool &sweep, double &endx, double &endy) const;
-  double getScaleX() const;
-  double getScaleY() const;
-  double getTranslateX() const;
-  double getTranslateY() const;
-  bool getFlipX() const;
-  bool getFlipY() const;
 
 private:
-  double _getScaleX() const;
-  double _getScaleY() const;
   double m_v0;
   double m_v1;
   double m_x0;
diff --git a/src/lib/CDRTypes.cpp b/src/lib/CDRTypes.cpp
index c020415..ee98cd4 100644
--- a/src/lib/CDRTypes.cpp
+++ b/src/lib/CDRTypes.cpp
@@ -101,102 +101,5 @@ void libcdr::CDRSplineData::create(libcdr::CDRPath &path) const
     path.appendSplineTo(tmpPoints);
 }
 
-libcdr::CDRCMYKColor::CDRCMYKColor(unsigned colorValue, bool percentage)
-  : c((double)(colorValue & 0xff) / (percentage ? 100.0 : 255.0)),
-    m((double)((colorValue & 0xff00) >> 8) / (percentage ? 100.0 : 255.0)),
-    y((double)((colorValue & 0xff0000) >> 16) / (percentage ? 100.0 : 255.0)),
-    k((double)((colorValue & 0xff000000) >> 24) / (percentage ? 100.0 : 255.0))
-{
-}
-
-void libcdr::CDRCMYKColor::applyTint(double tint)
-{
-  if (tint < 0.0)
-    tint = 0.0;
-  if (tint > 1.0)
-    tint = 1.0;
-  c *= tint;
-  m *= tint;
-  y *= tint;
-  k *= tint;
-}
-
-unsigned libcdr::CDRCMYKColor::getColorValue() const
-{
-  return 0;
-}
-
-
-libcdr::CDRRGBColor::CDRRGBColor(unsigned colorValue)
-  : r((double)(colorValue & 0xff) / 255.0),
-    g((double)((colorValue & 0xff00) >> 8) / 255.0),
-    b((double)((colorValue & 0xff0000) >> 16) / 255.0)
-{
-}
-
-void libcdr::CDRRGBColor::applyTint(double tint)
-{
-  if (tint < 0.0)
-    tint = 0.0;
-  if (tint > 1.0)
-    tint = 1.0;
-  r = 1.0 + r*tint - tint;
-  g = 1.0 + g*tint - tint;
-  b = 1.0 + b*tint - tint;
-}
-
-unsigned libcdr::CDRRGBColor::getColorValue() const
-{
-  return 0;
-}
-
-
-libcdr::CDRLab2Color::CDRLab2Color(unsigned colorValue)
-  : L((double)(colorValue & 0xff)*100.0/255.0),
-    a((double)(signed char)((colorValue & 0xff00) >> 8)),
-    b((double)(signed char)((colorValue & 0xff0000) >> 16))
-{
-}
-
-void libcdr::CDRLab2Color::applyTint(double tint)
-{
-  if (tint < 0.0)
-    tint = 0.0;
-  if (tint > 1.0)
-    tint = 1.0;
-  L = (1.0 - tint)*100.0 + tint*L;
-  a *= tint;
-  b *= tint;
-}
-
-unsigned libcdr::CDRLab2Color::getColorValue() const
-{
-  return 0;
-}
-
-
-libcdr::CDRLab4Color::CDRLab4Color(unsigned colorValue)
-  : L((double)(colorValue & 0xff)*100.0/255.0),
-    a((double)((signed char)(((colorValue & 0xff00) >> 8) - 0x80))),
-    b((double)((signed char)(((colorValue & 0xff0000) >> 16) - 0x80)))
-{
-}
-
-void libcdr::CDRLab4Color::applyTint(double tint)
-{
-  if (tint < 0.0)
-    tint = 0.0;
-  if (tint > 1.0)
-    tint = 1.0;
-  L = (1.0 - tint)*100.0 + tint*L;
-  a *= tint;
-  b *= tint;
-}
-
-unsigned libcdr::CDRLab4Color::getColorValue() const
-{
-  return 0;
-}
-
 
 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/CDRTypes.h b/src/lib/CDRTypes.h
index fbc590c..1df2111 100644
--- a/src/lib/CDRTypes.h
+++ b/src/lib/CDRTypes.h
@@ -306,7 +306,6 @@ struct WaldoRecordType1
 
 struct CDRCMYKColor
 {
-  CDRCMYKColor(unsigned colorValue, bool percentage = true);
   CDRCMYKColor(double cyan, double magenta, double yellow, double black)
     : c(cyan), m(magenta), y(yellow), k(black) {}
   ~CDRCMYKColor() {}
@@ -314,47 +313,36 @@ struct CDRCMYKColor
   double m;
   double y;
   double k;
-  void applyTint(double tint);
-  unsigned getColorValue() const;
 };
 
 struct CDRRGBColor
 {
-  CDRRGBColor(unsigned colorValue);
   CDRRGBColor(double red, double green, double blue)
     : r(red), g(green), b(blue) {}
   ~CDRRGBColor() {}
   double r;
   double g;
   double b;
-  void applyTint(double tint);
-  unsigned getColorValue() const;
 };
 
 struct CDRLab2Color
 {
-  CDRLab2Color(unsigned colorValue);
   CDRLab2Color(double l, double A, double B)
     : L(l), a(A), b(B) {}
   ~CDRLab2Color() {}
   double L;
   double a;
   double b;
-  void applyTint(double tint);
-  unsigned getColorValue() const;
 };
 
 struct CDRLab4Color
 {
-  CDRLab4Color(unsigned colorValue);
   CDRLab4Color(double l, double A, double B)
     : L(l), a(A), b(B) {}
   ~CDRLab4Color() {}
   double L;
   double a;
   double b;
-  void applyTint(double tint);
-  unsigned getColorValue() const;
 };
 
 struct CDRText
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 428ea55..06a37ce 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -302,11 +302,6 @@ void libcdr::writeU32(librevenge::RVNGBinaryData &buffer, const int value)
   buffer.append((unsigned char)((value >> 24) & 0xFF));
 }
 
-void libcdr::writeU8(librevenge::RVNGBinaryData &buffer, const int value)
-{
-  buffer.append((unsigned char)(value & 0xFF));
-}
-
 void libcdr::appendCharacters(librevenge::RVNGString &text, std::vector<unsigned char> characters, unsigned short charset)
 {
   if (characters.empty())
diff --git a/src/lib/libcdr_utils.h b/src/lib/libcdr_utils.h
index fa424e0..b7e8663 100644
--- a/src/lib/libcdr_utils.h
+++ b/src/lib/libcdr_utils.h
@@ -112,7 +112,6 @@ double readFixedPoint(librevenge::RVNGInputStream *input, bool bigEndian=false);
 
 int cdr_round(double d);
 
-void writeU8(librevenge::RVNGBinaryData &buffer, const int value);
 void writeU16(librevenge::RVNGBinaryData &buffer, const int value);
 void writeU32(librevenge::RVNGBinaryData &buffer, const int value);
 void appendCharacters(librevenge::RVNGString &text, std::vector<unsigned char> characters, unsigned short charset);


More information about the Libreoffice-commits mailing list