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

Markus Mohrhard markus.mohrhard at collabora.co.uk
Thu Mar 6 10:19:16 PST 2014


 chart2/source/view/main/DummyXShape.cxx  |   38 ++++++++++++++-----------------
 chart2/source/view/main/OpenGLRender.cxx |    4 +--
 oox/source/token/namespaces.pl           |    1 
 3 files changed, 21 insertions(+), 22 deletions(-)

New commits:
commit 3871223bee2fcf7968d522a56e4062098a1e5633
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Mar 6 19:11:02 2014 +0100

    add the xml strict namespaces to misc/namespaces.txt
    
    Change-Id: Ie83b5c94f1f002851bff3b39b1d9b676a3e44aa1

diff --git a/oox/source/token/namespaces.pl b/oox/source/token/namespaces.pl
index b7f6083..faeaad9 100644
--- a/oox/source/token/namespaces.pl
+++ b/oox/source/token/namespaces.pl
@@ -89,6 +89,7 @@ foreach( keys( %namespaces ) )
     print( NAMEFILE "{ $id, \"$namespaces{$_}\" },\n" );
     print( NAMEFILE_STRICT "{ $id, \"$namespaces_strict{$_}\" },\n" );
     print( TXTFILE "$id $_ $namespaces{$_}\n" );
+    print( TXTFILE "$id $_ $namespaces_strict{$_}\n" );
     ++$i;
 }
 
commit 1ba322b968c4060a40c44e2f6dd910ad3e2e8419
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Mar 6 16:59:38 2014 +0100

    fix the translation angle calculation
    
    Change-Id: If4b392f5f8dc4e67d00c6000dcf48a6c1f30db36

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index dff7ff9..7c8932d 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -1298,7 +1298,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx& rBitmapEx, const awt::Point&
     }
 
     TextInfo aTextInfo;
-    aTextInfo.rotation = -(double)rotation * GL_PI / 18000.0f;
+    aTextInfo.rotation = -(double)rotation / 360.0 * 2* GL_PI;
     aTextInfo.vertex[0] = rTrans.Line1.Column3 / OPENGL_SCALE_VALUE;
     aTextInfo.vertex[1] = rTrans.Line2.Column3 / OPENGL_SCALE_VALUE;
     aTextInfo.vertex[2] = m_fZStep;
@@ -1351,7 +1351,7 @@ int OpenGLRender::RenderTextShape()
         {
             SAL_WARN("chart2.opengl", "rotation: " << textInfo.rotation);
         }
-        PosVecf3 angle = {0.0f, float(textInfo.rotation), float(textInfo.rotation)};
+        PosVecf3 angle = {0.0f, 0.0f, float(textInfo.rotation)};
         PosVecf3 scale = {1.0, 1.0, 1.0f};
         MoveModelf(trans, angle, scale);
         m_MVP = m_Projection * m_View * m_Model;
commit 58274bb9c1d231c804319ef337fc412ece2f9f8c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Mar 6 16:58:48 2014 +0100

    make many SAL_WARN in chart2.opengl simple SAL_INFO
    
    Change-Id: I786361b2adaec2c4c156162ff8c3f6b743275961

diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 9f8db07..02bafff 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -113,7 +113,7 @@ struct PrintProperties
 #if ENABLE_DEBUG_PROPERTIES
     void operator()(const std::pair<OUString, uno::Any>& rProp)
     {
-        SAL_WARN("chart2.opengl", "Property: " << rProp.first);
+        SAL_INFO("chart2.opengl.properties", "Property: " << rProp.first);
     }
 #else
     void operator()(const std::pair<OUString, uno::Any>&)
@@ -186,18 +186,18 @@ void SAL_CALL DummyXShape::setPropertyValue( const OUString& rName, const uno::A
             lang::IllegalArgumentException, lang::WrappedTargetException,
             uno::RuntimeException, std::exception)
 {
-    SAL_WARN("chart2", "DummyXShape::setProperty: " << rName << " " << "Any");
+    SAL_INFO("chart2", "DummyXShape::setProperty: " << rName << " " << "Any");
     maProperties[rName] = rValue;
     if(rName == "Transformation")
     {
-        SAL_WARN("chart2.opengl", "Transformation");
+        SAL_INFO("chart2.opengl", "Transformation");
     }
 }
 
 uno::Any SAL_CALL DummyXShape::getPropertyValue( const OUString& rName )
     throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
 {
-    SAL_WARN("chart2.opengl", "DummyXShape::getPropertyValue: " << rName);
+    SAL_INFO("chart2.opengl", "DummyXShape::getPropertyValue: " << rName);
     std::map<OUString, uno::Any>::iterator itr = maProperties.find(rName);
     if(itr != maProperties.end())
         return itr->second;
@@ -393,7 +393,7 @@ DummyPieSegment2D::DummyPieSegment2D(double fUnitCircleStartAngleDegree, double
 
 void DummyPieSegment2D::render()
 {
-    SAL_WARN("chart2.opengl", "render DummyPieSegment2D");
+    SAL_INFO("chart2.opengl", "render DummyPieSegment2D");
     DummyChart* pChart = getRootShape();
 
     while(mfUnitCircleWidthAngleDegree>360)
@@ -450,7 +450,7 @@ DummyArea2D::DummyArea2D(const drawing::PointSequenceSequence& rShape):
 
 void DummyArea2D::render()
 {
-    SAL_WARN("chart2.opengl", "render DummyArea2D");
+    SAL_INFO("chart2.opengl", "render DummyArea2D");
     DummyChart* pChart = getRootShape();
     sal_Int32 nPointssCount = maShapes.getLength();
     for(sal_Int32 i = 0; i < nPointssCount; i++)
@@ -502,7 +502,7 @@ DummyCircle::DummyCircle(const awt::Point& rPos, const awt::Size& rSize)
 
 void DummyCircle::render()
 {
-    SAL_WARN("chart2.opengl", "render DummyCircle");
+    SAL_INFO("chart2.opengl", "render DummyCircle");
     debugProperties(maProperties);
     DummyChart* pChart = getRootShape();
 
@@ -581,7 +581,7 @@ DummyLine2D::DummyLine2D(const awt::Size& rSize, const awt::Point& rPosition)
 
 void DummyLine2D::render()
 {
-    SAL_WARN("chart2.opengl", "rendering line 2D");
+    SAL_INFO("chart2.opengl", "rendering line 2D");
     debugProperties(maProperties);
     DummyChart* pChart = getRootShape();
 
@@ -631,7 +631,7 @@ void DummyLine2D::render()
         sal_Int32 nWidth = cow.get<sal_Int32>();
         pChart->m_GLRender.SetLine2DWidth(nWidth);
 
-        SAL_WARN("chart2.opengl", "width = " << nWidth);
+        SAL_INFO("chart2.opengl", "width = " << nWidth);
     }
     else
         SAL_WARN("chart2.opengl", "no line width set");
@@ -671,7 +671,7 @@ DummyRectangle::DummyRectangle(const awt::Size& rSize, const awt::Point& rPoint,
 
 void DummyRectangle::render()
 {
-    SAL_WARN("chart2.opengl", "render DummyRectangle");
+    SAL_INFO("chart2.opengl", "render DummyRectangle");
     debugProperties(maProperties);
     DummyChart* pChart = getRootShape();
     std::map< OUString, uno::Any >::const_iterator itr = maProperties.find("Invisible");
@@ -838,7 +838,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames,
 
 void DummyText::render()
 {
-    SAL_WARN("chart2.opengl", "render DummyText");
+    SAL_INFO("chart2.opengl", "render DummyText");
     debugProperties(maProperties);
 
     DummyChart* pChart = getRootShape();
@@ -848,7 +848,7 @@ void DummyText::render()
         maProperties.find("Transformation");
     if(itr != maProperties.end())
     {
-        SAL_WARN("chart2.opengl", "found a transformation");
+        SAL_INFO("chart2.opengl", "found a transformation");
         if(itr->second.hasValue())
         {
             aTransformation = itr->second.get<drawing::HomogenMatrix3>();
@@ -868,8 +868,7 @@ void SAL_CALL DummyText::setPropertyValue( const OUString& rName, const uno::Any
             lang::IllegalArgumentException, lang::WrappedTargetException,
             uno::RuntimeException, std::exception)
 {
-    SAL_WARN("chart2.opengl", "property value set after image has been created");
-    SAL_WARN("chart2.opengl", rName);
+    SAL_INFO("chart2.opengl", "property value set after image has been created");
     DummyXShape::setPropertyValue(rName, rValue);
 }
 
@@ -1085,7 +1084,7 @@ uno::Any SAL_CALL DummyXShapes::getByIndex(sal_Int32 nIndex)
 
 void DummyXShapes::render()
 {
-    SAL_WARN("chart2.opengl", "render DummyShapes");
+    SAL_INFO("chart2.opengl", "render DummyShapes");
     for(std::vector<DummyXShape*>::iterator itr = maShapes.begin(),
             itrEnd = maShapes.end(); itr != itrEnd; ++itr)
     {
@@ -1338,7 +1337,7 @@ debug_callback(GLenum source, GLenum type, GLuint id,
 
 bool DummyChart::initOpengl()
 {
-    SAL_WARN("chart2.opengl", "DummyChart::initOpengl----start");
+    SAL_INFO("chart2.opengl", "DummyChart::initOpengl----start");
     initWindow();
     mpWindow->setPosSizePixel(0,0,0,0);
     GLWin.Width = 0;
@@ -1482,8 +1481,7 @@ bool DummyChart::initOpengl()
     glMaterialfv(GL_FRONT,GL_DIFFUSE,materialDiffuse);
     glEnable(GL_LIGHT0);
     glEnable(GL_NORMALIZE);
-    SAL_WARN("chart2.opengl", "DummyChart::initOpengl----end");
-//    mpWindow->Show(1, 1);
+    SAL_INFO("chart2.opengl", "DummyChart::initOpengl----end");
     return true;
 }
 
@@ -1492,7 +1490,7 @@ DummyChart::DummyChart(uno::Reference< drawing::XShape > xTarget):
     mpWindow(new Window(0, WB_NOBORDER|WB_NODIALOGCONTROL)),
     m_GLRender(xTarget)
 {
-    SAL_WARN("chart2.opengl", "DummyXShape::DummyChart()-----test: ");
+    SAL_INFO("chart2.opengl", "DummyXShape::DummyChart()-----test: ");
     setName("com.sun.star.chart2.shapes");
     createGLContext();
 }
@@ -1527,7 +1525,7 @@ void SAL_CALL DummyChart::setSize( const awt::Size& aSize )
 
 void DummyChart::render()
 {
-    SAL_WARN("chart2.opengl", "render chart");
+    SAL_INFO("chart2.opengl", "render chart");
     m_GLRender.prepareToRender();
 #if 0
     m_GLRender.renderDebug();


More information about the Libreoffice-commits mailing list