[Libreoffice-commits] core.git: 3 commits - chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Thu Mar 13 09:03:04 PDT 2014


 chart2/source/view/inc/DummyXShape.hxx  |    2 ++
 chart2/source/view/main/DummyXShape.cxx |   27 ++++++++++++++++++++++++---
 2 files changed, 26 insertions(+), 3 deletions(-)

New commits:
commit 60747a3ce2a80ed950f269e1a267754254b6c693
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Mar 13 16:59:35 2014 +0100

    fix transparence of bubble color
    
    Change-Id: Ib2edf99ff4f48c12a946878740ad5d64d7deffb2

diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 39a3553..35716c3 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -547,7 +547,7 @@ void DummyCircle::render()
     if(itr != maProperties.end())
     {
         sal_Int32 nTrans = itr->second.get<sal_Int32>();
-        nAlpha = static_cast<sal_uInt8>(nTrans & 0xFF);
+        nAlpha = 255 - static_cast<sal_uInt8>(nTrans & 0xFF);
     }
 
     itr = maProperties.find("FillColor");
commit c219d1b932ae223d7241cac9ad8747f3ec70252a
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Mar 13 15:58:19 2014 +0100

    don't reposition several times in complex hierarchies
    
    We moved the object several times if the object was behind several group
    shapes.
    
    Change-Id: I984d6e9208f8924a9968820cf6f95fbb663062b6

diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index 6021139..cf19ff5 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -199,6 +199,8 @@ public:
      */
     virtual void render();
 
+    const com::sun::star::awt::Point& getPos(); // internal API
+
 protected:
 
     std::map<OUString, uno::Any> maProperties;
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 3d24fcd..39a3553 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -182,6 +182,11 @@ awt::Point SAL_CALL DummyXShape::getPosition()
     return maPosition;
 }
 
+const awt::Point& DummyXShape::getPos()
+{
+    return maPosition;
+}
+
 void SAL_CALL DummyXShape::setPosition( const awt::Point& rPoint )
     throw(uno::RuntimeException, std::exception)
 {
@@ -1004,8 +1009,8 @@ void SAL_CALL DummyGroup2D::setPosition( const awt::Point& rPos )
     for(std::vector<DummyXShape*>::const_iterator itr = maShapes.begin(),
             itrEnd = maShapes.end(); itr != itrEnd; ++itr)
     {
-        awt::Point aPos = (*itr)->getPosition();
-        awt::Point aNewPos( rPos.X + aPos.X, rPos.Y + aPos.Y);
+        const awt::Point& rOldPos = (*itr)->getPos();
+        awt::Point aNewPos( rPos.X + rOldPos.X, rPos.Y + rOldPos.Y);
         (*itr)->setPosition(aNewPos);
     }
 }
commit 92928f99f83f453a00de4f6c41ca0daa7d37f7d4
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Mar 13 15:57:33 2014 +0100

    add some debug helpers
    
    Change-Id: I03d8baab55548fde1e34b55927fd5dcf9cff58a9

diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 5a817a4..3d24fcd 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -48,6 +48,22 @@ namespace chart {
 
 namespace dummy {
 
+#if 0
+
+std::ostream& operator<<(std::ostream& rStrm, const awt::Point& rPoint)
+{
+    rStrm << rPoint.X << "," << rPoint.Y;
+    return rStrm;
+}
+
+std::ostream& operator<<(std::ostream& rStrm, const awt::Size& rSize)
+{
+    rStrm << rSize.Width << "," << rSize.Height;
+    return rStrm;
+}
+
+#endif
+
 bool TextCache::hasEntry(const TextCacheKey& rKey)
 {
     return maCache.find(rKey) != maCache.end();


More information about the Libreoffice-commits mailing list