[Libreoffice-commits] core.git: 16 commits - chart2/qa chart2/source qadevOOo/objdsc sc/qa sc/source sfx2/source test/source xmloff/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Apr 30 17:34:58 PDT 2014


 chart2/qa/extras/chart2import.cxx                           |   27 +
 chart2/qa/extras/data/ods/error_bar_properties.ods          |binary
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx   |    2 
 chart2/source/tools/ErrorBar.cxx                            |    2 
 chart2/source/view/inc/GL3DRenderer.hxx                     |   23 -
 chart2/source/view/main/GL3DRenderer.cxx                    |  183 +++++-------
 qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDiagram.csv |    1 
 sc/qa/unit/data/contentCSV/new_cond_format_test_sheet2.csv  |    3 
 sc/qa/unit/data/xlsx/new_cond_format_test.xlsx              |binary
 sc/qa/unit/subsequent_export-test.cxx                       |   17 -
 sc/qa/unit/ucalc.cxx                                        |   38 ++
 sc/qa/unit/ucalc.hxx                                        |    2 
 sc/source/filter/excel/xecontent.cxx                        |    4 
 sfx2/source/doc/SfxDocumentMetaData.cxx                     |    2 
 test/source/bootstrapfixture.cxx                            |    2 
 xmloff/source/chart/SchXMLPlotAreaContext.cxx               |   15 
 16 files changed, 199 insertions(+), 122 deletions(-)

New commits:
commit 37555c895319cef08e652dfe259ec50696def779
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 1 00:26:03 2014 +0200

    remove unused code
    
    actually I don't want to see the BMP code ever again!!
    
    Change-Id: Ia5be607399238e7e71399d109b2cfbfa889e29d1

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index b25f4a3..e89ff49 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -1314,22 +1314,7 @@ int OpenGL3DRenderer::ProcessExtrude3DPickingBox()
     //read pixel to get the index
     Point select = Point(m_aMPos.X(), m_aMPos.Y());
     sal_uInt8 selectColor[4] = {0};
-#if 0
-    int picWidth = m_iWidth - select.X();
-    int picHeight = m_iHeight - select.Y();
-    picWidth = (picWidth - 1) & ~3;
-    picHeight = (picHeight - 1) & ~3;
-    sal_uInt8 *outBuf = (sal_uInt8 *)malloc(picWidth * picHeight * 3 + BMP_HEADER_LEN);
-    CreateBMPHeader(outBuf, picWidth, picHeight);
-    cout << "picWidth = " << picWidth << ", picHeight = " << picHeight << endl;
-    glReadPixels(select.X(), select.Y(), picWidth, picHeight, GL_RGB, GL_UNSIGNED_BYTE, outBuf + BMP_HEADER_LEN);
-    char fileName[256] = {0};
-    sprintf(fileName, "D:\\boundbox.bmp");
-    FILE *pfile = fopen(fileName,"wb");
-    fwrite(outBuf, picWidth * picHeight * 3 + BMP_HEADER_LEN, 1, pfile);
-    fclose(pfile);
-    cout << "select.x = " << select.X() << ", select.y = " << select.Y() << ", width = " << m_iWidth << ", height = " << m_iHeight << endl;
-#endif
+
     glReadPixels(select.X(), select.Y(), 1, 1, GL_RGB, GL_UNSIGNED_BYTE, selectColor);
     int selectID = GetIndexByColor(selectColor[0], selectColor[1], selectColor[2]);
 //    printf("selectColor[0] = %d, selectColor[1] = %d, selectColor[2] = %d, selectID = %d\n", selectColor[0], selectColor[1], selectColor[2], selectID);
commit 1e1c793ab4db7221d4c7591ddba8b998fdeade7c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 1 00:24:26 2014 +0200

    some small clean-up in new OGL 3D renderer
    
    Change-Id: I0415aac374fa9c09c0556147cf07b31d13af46e1

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index e3a1c10..b25f4a3 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -89,7 +89,6 @@ OpenGL3DRenderer::OpenGL3DRenderer():
     }
 
     m_uiSelectFrameCounter = 0;
-
 }
 
 void OpenGL3DRenderer::LoadShaders()
@@ -134,7 +133,6 @@ void OpenGL3DRenderer::init()
 
 
     m_3DProjection = glm::perspective(30.0f, (float)m_iWidth / (float)m_iHeight, 0.01f, 2000.0f);
-
 }
 
 int OpenGL3DRenderer::AddVertexData(GLuint vertexBuf)
@@ -167,14 +165,18 @@ int OpenGL3DRenderer::AddIndexData(GLuint indexBuf)
 bool OpenGL3DRenderer::GetSimilarVertexIndex(PackedVertex & packed,
     std::map<PackedVertex,unsigned short> & VertexToOutIndex,
     unsigned short & result
-    ){
-        std::map<PackedVertex,unsigned short>::iterator it = VertexToOutIndex.find(packed);
-        if ( it == VertexToOutIndex.end() ){
-            return false;
-        }else{
-            result = it->second;
-            return true;
-        }
+    )
+{
+    std::map<PackedVertex,unsigned short>::iterator it = VertexToOutIndex.find(packed);
+    if ( it == VertexToOutIndex.end() )
+    {
+        return false;
+    }
+    else
+    {
+        result = it->second;
+        return true;
+    }
 }
 
 void OpenGL3DRenderer::SetVertex(PackedVertex &packed,
@@ -783,16 +785,16 @@ void OpenGL3DRenderer::EndAddShapePolygon3DObject()
 }
 
 void OpenGL3DRenderer::AddPolygon3DObjectNormalPoint(float x, float y, float z)
- {
+{
     if (m_Polygon3DInfo.fillStyle)
     {
         if (!m_Polygon3DInfo.normals)
         {
             m_Polygon3DInfo.normals = new Normals3D;
         }
-         m_Polygon3DInfo.normals->push_back(glm::vec3(x, -y, z));
+        m_Polygon3DInfo.normals->push_back(glm::vec3(x, -y, z));
     }
- }
+}
 
 void OpenGL3DRenderer::EndAddPolygon3DObjectNormalPoint()
 {
@@ -866,14 +868,12 @@ void OpenGL3DRenderer::EndAddPolygon3DObjectPoint()
             #endif
             m_bCameraUpdated = true;
         }
-
     }
     m_Polygon3DInfo.vertices = NULL;
 }
 
 void OpenGL3DRenderer::AddShape3DExtrudeObject(sal_Int32 color,sal_Int32 specular,float xTransform,float yTransform,float zTransform)
 {
-
     //color
     m_Extrude3DInfo.extrudeColor = glm::vec4((float)(((color) & 0x00FF0000) >> 16) / 255.0f,
                                              (float)(((color) & 0x0000FF00) >> 8) / 255.0f,
@@ -1047,6 +1047,7 @@ int OpenGL3DRenderer::RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D)
         m_TranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z));
         m_Model = m_TranslationMatrix * scale;
     }
+
     if (extrude3D.reverse)
     {
         glm::mat4 reverseMatrix = glm::translate(glm::vec3(0.0, -1.0, 0.0));
@@ -1068,6 +1069,7 @@ int OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D)
     PosVecf3 trans = {extrude3D.xTransform,//m_Extrude3DInfo.xTransform + 140,
                       -extrude3D.yTransform,
                       extrude3D.zTransform};
+
     if (actualYTrans < 0.0f)
     {
         // the height of rounded corner is higher than the cube than use the org scale matrix
commit 7f28c821fec267bea33f34bf423b22d8fb6e010e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 1 00:20:50 2014 +0200

    more type correctness in new code
    
    Change-Id: If6ba00dd10ef0c565c63d559e63ea4135ab4eea4

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 39d55bc..e3a1c10 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -193,8 +193,8 @@ void OpenGL3DRenderer::SetVertex(PackedVertex &packed,
     { // If not, it needs to be added in the output data.
         vertex.push_back(packed.position);
         normal.push_back(packed.normal);
-        unsigned short newindex = (unsigned short)vertex.size() - 1;
-        indeices .push_back( newindex );
+        size_t newindex = vertex.size() - 1;
+        indeices.push_back( newindex );
         VertexToOutIndex[ packed ] = newindex;
     }
 }
@@ -224,7 +224,7 @@ void OpenGL3DRenderer::CreateActualRoundedCube(float fRadius, int iSubDivY, int
     {
         m_RoundBarMesh.iElementStartIndices[k] = indeices[k].size();
     }
-    for (unsigned int i = 0; i < vertices.size(); i += 3)
+    for (size_t i = 0; i < vertices.size(); i += 3)
     {
         for (int k = 0; k < 3; k++)
         {
@@ -538,7 +538,6 @@ int OpenGL3DRenderer::GenerateRoundCornerBar(std::vector<glm::vec3> &vertices, s
     return iFacesAdded;
 }
 
-
 void OpenGL3DRenderer::GetFreq()
 {
 #if 0
@@ -560,10 +559,9 @@ double OpenGL3DRenderer::GetTime()
 
 int OpenGL3DRenderer::RenderLine3D(Polygon3DInfo &polygon)
 {
-    int listNum;
-    listNum = polygon.verticesList.size();
+    size_t listNum = polygon.verticesList.size();
     glUseProgram(m_CommonProID);
-    for (int i = 0; i < listNum; i++)
+    for (size_t i = 0; i < listNum; i++)
     {
         //move the circle to the pos, and scale using the xScale and Y scale
         Vertices3D *pointList = polygon.verticesList.front();
@@ -607,9 +605,8 @@ int OpenGL3DRenderer::RenderLine3D(Polygon3DInfo &polygon)
 
 int OpenGL3DRenderer::RenderPolygon3D(Polygon3DInfo &polygon)
 {
-    int verticesNum, normalsNum;
-    verticesNum = polygon.verticesList.size();
-    normalsNum = polygon.normalsList.size();
+    size_t verticesNum = polygon.verticesList.size();
+    size_t normalsNum = polygon.normalsList.size();
     //check whether the number of vertices and normals are equal
     if (verticesNum != normalsNum)
     {
@@ -624,7 +621,7 @@ int OpenGL3DRenderer::RenderPolygon3D(Polygon3DInfo &polygon)
     glUseProgram(m_3DProID);
     glUniformMatrix4fv(m_3DViewID, 1, GL_FALSE, &m_3DView[0][0]);
     glUniformMatrix4fv(m_3DProjectionID, 1, GL_FALSE, &m_3DProjection[0][0]);
-    for (int i = 0; i < verticesNum; i++)
+    for (size_t i = 0; i < verticesNum; i++)
     {
         //move the circle to the pos, and scale using the xScale and Y scale
         Vertices3D *pointList = polygon.verticesList.front();
@@ -689,8 +686,8 @@ int OpenGL3DRenderer::RenderPolygon3DObject()
         return 0;
     }
     glDepthMask(GL_FALSE);
-    int polygonNum = m_Polygon3DInfoList.size();
-    for (int i = 0; i < polygonNum; i++)
+    size_t polygonNum = m_Polygon3DInfoList.size();
+    for (size_t i = 0; i < polygonNum; i++)
     {
         Polygon3DInfo &polygon = m_Polygon3DInfoList.front();
         if (polygon.lineOnly || (!polygon.fillStyle))
@@ -737,7 +734,6 @@ void OpenGL3DRenderer::SetLightInfo(bool lightOn, sal_Int32 color, const glm::ve
         m_LightsInfo.light[m_LightsInfo.lightNum].lightPower = 1.0;
         m_LightsInfo.lightNum++;
     }
-
 }
 
 void OpenGL3DRenderer::AddShapePolygon3DObject(sal_Int32 color,bool lineOnly,sal_Int32 lineColor,long fillStyle,sal_Int32 specular)
@@ -822,7 +818,7 @@ void OpenGL3DRenderer::EndAddPolygon3DObjectPoint()
 {
     m_Polygon3DInfo.verticesList.push_back(m_Polygon3DInfo.vertices);
     //get the buttom surface to calc the camera org, just for the demo
-    if ((m_Polygon3DInfo.vertices->size()) && (!m_bCameraUpdated))
+    if (m_Polygon3DInfo.vertices->size() && !m_bCameraUpdated)
     {
         float minX = m_Polygon3DInfo.vertices->at(0).x;
         float maxX = m_Polygon3DInfo.vertices->at(0).x;
@@ -830,7 +826,7 @@ void OpenGL3DRenderer::EndAddPolygon3DObjectPoint()
         float maxZ = m_Polygon3DInfo.vertices->at(0).z;
         float maxY = m_Polygon3DInfo.vertices->at(0).y;
         float minY = m_Polygon3DInfo.vertices->at(0).y;
-        for (unsigned int i = 1; i < m_Polygon3DInfo.vertices->size(); i++)
+        for (size_t i = 1; i < m_Polygon3DInfo.vertices->size(); i++)
         {
             minX = std::min(minX, m_Polygon3DInfo.vertices->at(i).x);
             maxX = std::max(maxX, m_Polygon3DInfo.vertices->at(i).x);
@@ -1150,8 +1146,8 @@ int OpenGL3DRenderer::RenderExtrude3DObject()
                             (void*)0            // array buffer offset
                             );
     glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_CubeElementBuf);
-    int extrude3DNum = m_Extrude3DList.size();
-    for (int i = 0; i < extrude3DNum; i++)
+    size_t extrude3DNum = m_Extrude3DList.size();
+    for (size_t i = 0; i < extrude3DNum; i++)
     {
         Extrude3DInfo extrude3DInfo = m_Extrude3DList[i];
         glBindBuffer(GL_UNIFORM_BUFFER, m_3DUBOBuffer);
@@ -1244,9 +1240,9 @@ int OpenGL3DRenderer::ProcessUnrenderedShape()
 
 glm::vec4 OpenGL3DRenderer::GetColorByIndex(int index)
 {
-    int r = index & 0xFF;
-    int g = (index >> 8) & 0xFF;
-    int b = (index >> 16) & 0xFF;
+    sal_uInt8 r = index & 0xFF;
+    sal_uInt8 g = (index >> 8) & 0xFF;
+    sal_uInt8 b = (index >> 16) & 0xFF;
     return glm::vec4(((float)r) / 255.0, ((float)g) / 255.0, ((float)b) / 255.0, 1.0);
 }
 
commit f49f5e160ee0fc5cad527ef76b1e399c39a31051
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 1 00:13:41 2014 +0200

    use sal_ types for variables with fixed width
    
    Change-Id: I3a6be24b839633c3864a8961ade06fa59717335a

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 81e780c..39d55bc 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -979,6 +979,7 @@ int OpenGL3DRenderer::Update3DUniformBlock()
     glBindBuffer(GL_UNIFORM_BUFFER, 0);
     return 0;
 }
+
 int OpenGL3DRenderer::RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D, int surIndex)
 {
     float xzScale = extrude3D.xRange[1] - extrude3D.xRange[0];
@@ -1249,7 +1250,7 @@ glm::vec4 OpenGL3DRenderer::GetColorByIndex(int index)
     return glm::vec4(((float)r) / 255.0, ((float)g) / 255.0, ((float)b) / 255.0, 1.0);
 }
 
-int OpenGL3DRenderer::GetIndexByColor(int r, int g, int b)
+sal_uInt32 OpenGL3DRenderer::GetIndexByColor(sal_uInt32 r, sal_uInt32 g, sal_uInt32 b)
 {
     return r | (g << 8) | (b << 16);
 }
commit 9c5dd8be10560a10f1abd85e869d9989be162b48
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 1 00:04:23 2014 +0200

    remove the need for using namespace std;
    
    Change-Id: Ibb0d3031fc8ec986d6d2d9c7b178418b4dd37811

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 9d4cda1..81e780c 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -23,7 +23,6 @@
 #define GL_PI 3.14159f
 #define RGB_WHITE (0xFF | (0xFF << 8) | (0xFF << 16))
 
-using namespace std;
 using namespace com::sun::star;
 
 namespace chart {
@@ -180,9 +179,9 @@ bool OpenGL3DRenderer::GetSimilarVertexIndex(PackedVertex & packed,
 
 void OpenGL3DRenderer::SetVertex(PackedVertex &packed,
     std::map<PackedVertex,unsigned short> &VertexToOutIndex,
-    vector<glm::vec3> &vertex,
-    vector<glm::vec3> &normal,
-    vector<unsigned short> &indeices)
+    std::vector<glm::vec3> &vertex,
+    std::vector<glm::vec3> &normal,
+    std::vector<unsigned short> &indeices)
 {
     unsigned short index;
     bool found = GetSimilarVertexIndex(packed, VertexToOutIndex, index);
@@ -209,13 +208,13 @@ void OpenGL3DRenderer::CreateActualRoundedCube(float fRadius, int iSubDivY, int
     float topThreshold = height - 2 * fRadius;
     float bottomThreshold = fRadius;
 
-    vector<glm::vec3> vertices;
-    vector<glm::vec3> normals;
+    std::vector<glm::vec3> vertices;
+    std::vector<glm::vec3> normals;
     GenerateRoundCornerBar(vertices, normals, fRadius, iSubDivY, iSubDivZ, width, height, depth);
     std::map<PackedVertex,unsigned short> VertexToOutIndex;
     glm::vec3 actualVerteices[3];
     glm::vec3 actualNormals[3];
-    vector<unsigned short> indeices[5];
+    std::vector<unsigned short> indeices[5];
     glm::vec3 externSurNormal;
     glm::mat4 corrctCoord = glm::translate(glm::vec3(width / 2.0f, height / 2.0f  - fRadius, depth / 2.0f));
     m_RoundBarMesh.topThreshold = topThreshold;
@@ -232,8 +231,8 @@ void OpenGL3DRenderer::CreateActualRoundedCube(float fRadius, int iSubDivY, int
             actualVerteices[k] = glm::vec3(corrctCoord * glm::vec4(vertices[i + k], 1.0));
             actualNormals[k] = normals[i + k];
         }
-        float maxY = max(max(actualVerteices[0].y, actualVerteices[1].y), actualVerteices[2].y);
-        float minY = min(min(actualVerteices[0].y, actualVerteices[1].y), actualVerteices[2].y);
+        float maxY = std::max(std::max(actualVerteices[0].y, actualVerteices[1].y), actualVerteices[2].y);
+        float minY = std::min(std::min(actualVerteices[0].y, actualVerteices[1].y), actualVerteices[2].y);
         int surfaceIndex = (minY >= topThreshold - 0.001) ? TOP_SURFACE : ((maxY <= bottomThreshold + 0.001) ? BOTTOM_SURFACE : MIDDLE_SURFACE);
         for (int k = 0; k < 3; k++)
         {
@@ -269,7 +268,7 @@ void OpenGL3DRenderer::CreateActualRoundedCube(float fRadius, int iSubDivY, int
     VertexToOutIndex.clear();
 }
 
-int OpenGL3DRenderer::GenerateRoundCornerBar(vector<glm::vec3> &vertices, vector<glm::vec3> &normals, float fRadius, int iSubDivY, int iSubDivZ, float width, float height, float depth)
+int OpenGL3DRenderer::GenerateRoundCornerBar(std::vector<glm::vec3> &vertices, std::vector<glm::vec3> &normals, float fRadius, int iSubDivY, int iSubDivZ, float width, float height, float depth)
 {
     //float fAddAngleY = 360.0f/float(iSubDivY), fAddAngleZ = 180.0f/float(iSubDivZ);
     float fAddAngleY = 360.0f/float(iSubDivY), fAddAngleZ = 180.0f/float(iSubDivZ);
@@ -814,8 +813,8 @@ void OpenGL3DRenderer::AddPolygon3DObjectPoint(float x, float y, float z)
     float actualX = x - (float)m_iWidth / 2;
     float actualY = y  - (float)m_iHeight / 2;
     float actualZ = z;
-    float maxCoord = max(actualX, max(actualY, actualZ));
-    m_fZmax = max(maxCoord, m_fZmax);
+    float maxCoord = std::max(actualX, std::max(actualY, actualZ));
+    m_fZmax = std::max(maxCoord, m_fZmax);
     m_Polygon3DInfo.vertices->push_back(glm::vec3(actualX, -actualY, actualZ));
 }
 
@@ -833,12 +832,12 @@ void OpenGL3DRenderer::EndAddPolygon3DObjectPoint()
         float minY = m_Polygon3DInfo.vertices->at(0).y;
         for (unsigned int i = 1; i < m_Polygon3DInfo.vertices->size(); i++)
         {
-            minX = min(minX, m_Polygon3DInfo.vertices->at(i).x);
-            maxX = max(maxX, m_Polygon3DInfo.vertices->at(i).x);
-            minZ = min(minZ, m_Polygon3DInfo.vertices->at(i).z);
-            maxZ = max(maxZ, m_Polygon3DInfo.vertices->at(i).z);
-            minY = min(minY, m_Polygon3DInfo.vertices->at(i).y);
-            maxY = max(maxY, m_Polygon3DInfo.vertices->at(i).y);
+            minX = std::min(minX, m_Polygon3DInfo.vertices->at(i).x);
+            maxX = std::max(maxX, m_Polygon3DInfo.vertices->at(i).x);
+            minZ = std::min(minZ, m_Polygon3DInfo.vertices->at(i).z);
+            maxZ = std::max(maxZ, m_Polygon3DInfo.vertices->at(i).z);
+            minY = std::min(minY, m_Polygon3DInfo.vertices->at(i).y);
+            maxY = std::max(maxY, m_Polygon3DInfo.vertices->at(i).y);
         }
 
         if (maxY == minY)
@@ -920,10 +919,10 @@ void OpenGL3DRenderer::AddExtrude3DObjectPoint(float x, float y, float z)
         m_Extrude3DInfo.yRange[0] = y;
         m_Extrude3DInfo.yRange[1] = y;
     }
-    m_Extrude3DInfo.xRange[0] = min(m_Extrude3DInfo.xRange[0], x);
-    m_Extrude3DInfo.xRange[1] = max(m_Extrude3DInfo.xRange[1], x);
-    m_Extrude3DInfo.yRange[0] = min(m_Extrude3DInfo.yRange[0], y);
-    m_Extrude3DInfo.yRange[1] = max(m_Extrude3DInfo.yRange[1], y);
+    m_Extrude3DInfo.xRange[0] = std::min(m_Extrude3DInfo.xRange[0], x);
+    m_Extrude3DInfo.xRange[1] = std::max(m_Extrude3DInfo.xRange[1], x);
+    m_Extrude3DInfo.yRange[0] = std::min(m_Extrude3DInfo.yRange[0], y);
+    m_Extrude3DInfo.yRange[1] = std::max(m_Extrude3DInfo.yRange[1], y);
     m_iPointNum++;
 }
 
@@ -950,7 +949,7 @@ int OpenGL3DRenderer::Init3DUniformBlock()
     glGenBuffers(1, &m_3DUBOBuffer);
     glBindBuffer(GL_UNIFORM_BUFFER, m_3DUBOBuffer);
     CHECK_GL_ERROR();
-    m_3DActualSizeLight = ((nBlockDataSizeLight / nUniformBufferAlignSize) + min(nBlockDataSizeLight % nUniformBufferAlignSize, 1)) * nUniformBufferAlignSize;
+    m_3DActualSizeLight = ((nBlockDataSizeLight / nUniformBufferAlignSize) + std::min(nBlockDataSizeLight % nUniformBufferAlignSize, 1)) * nUniformBufferAlignSize;
 //    cout << "nBlockDataSizeMertrial = " << nBlockDataSizeMertrial << ", nBlockDataSizeLight = " << nBlockDataSizeLight << ", m_3DActualSizeLight = " << m_3DActualSizeLight << endl;
     int dataSize = m_3DActualSizeLight + nBlockDataSizeMertrial;
     glBufferData(GL_UNIFORM_BUFFER, dataSize, NULL, GL_DYNAMIC_DRAW);
@@ -958,7 +957,7 @@ int OpenGL3DRenderer::Init3DUniformBlock()
     CHECK_GL_ERROR();
     glUniformBlockBinding(m_3DProID, a3DLightBlockIndex, 0);
 
-    glBindBufferRange(GL_UNIFORM_BUFFER, 1, m_3DUBOBuffer, ((nBlockDataSizeLight / nUniformBufferAlignSize) + min(nBlockDataSizeLight % nUniformBufferAlignSize, 1)) * nUniformBufferAlignSize, nBlockDataSizeMertrial);
+    glBindBufferRange(GL_UNIFORM_BUFFER, 1, m_3DUBOBuffer, ((nBlockDataSizeLight / nUniformBufferAlignSize) + std::min(nBlockDataSizeLight % nUniformBufferAlignSize, 1)) * nUniformBufferAlignSize, nBlockDataSizeMertrial);
     glUniformBlockBinding(m_3DProID, a3DMaterialBlockIndex, 1);
     //for the light source uniform, we must calc the offset of each element
     CHECK_GL_ERROR();
commit c23c32f1bf6bccce49473fd713782c885985581f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 1 00:02:27 2014 +0200

    remove OPENGL_SCALE_VALUE that makes no sense without XShape
    
    Change-Id: I1f8874d4d9fd5323fac9c31b9b5334b3d193cd63

diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 508ea796..9d4cda1 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -21,7 +21,6 @@
 #include "glm/gtc/matrix_inverse.hpp"
 
 #define GL_PI 3.14159f
-#define OPENGL_SCALE_VALUE 20
 #define RGB_WHITE (0xFF | (0xFF << 8) | (0xFF << 16))
 
 using namespace std;
@@ -812,9 +811,9 @@ void OpenGL3DRenderer::AddPolygon3DObjectPoint(float x, float y, float z)
     {
         m_Polygon3DInfo.vertices = new Vertices3D;
     }
-    float actualX = (x / OPENGL_SCALE_VALUE) - ((float)m_iWidth / 2);
-    float actualY = (y / OPENGL_SCALE_VALUE) - ((float)m_iHeight / 2);
-    float actualZ = z / OPENGL_SCALE_VALUE;
+    float actualX = x - (float)m_iWidth / 2;
+    float actualY = y  - (float)m_iHeight / 2;
+    float actualZ = z;
     float maxCoord = max(actualX, max(actualY, actualZ));
     m_fZmax = max(maxCoord, m_fZmax);
     m_Polygon3DInfo.vertices->push_back(glm::vec3(actualX, -actualY, actualZ));
@@ -899,9 +898,9 @@ void OpenGL3DRenderer::AddShape3DExtrudeObject(sal_Int32 color,sal_Int32 specula
 
     m_Extrude3DInfo.material.shininess = 1.0f;
 
-    m_Extrude3DInfo.xTransform = xTransform / OPENGL_SCALE_VALUE - ((float)m_iWidth / 2);
-    m_Extrude3DInfo.yTransform = yTransform / OPENGL_SCALE_VALUE - ((float)m_iHeight / 2);
-    m_Extrude3DInfo.zTransform = zTransform / OPENGL_SCALE_VALUE;
+    m_Extrude3DInfo.xTransform = xTransform - ((float)m_iWidth / 2);
+    m_Extrude3DInfo.yTransform = yTransform - ((float)m_iHeight / 2);
+    m_Extrude3DInfo.zTransform = zTransform;
 }
 
 void OpenGL3DRenderer::EndAddShape3DExtrudeObject()
@@ -912,22 +911,19 @@ void OpenGL3DRenderer::EndAddShape3DExtrudeObject()
 
 void OpenGL3DRenderer::AddExtrude3DObjectPoint(float x, float y, float z)
 {
-    float actualX = (x / OPENGL_SCALE_VALUE);
-    float actualY = (y / OPENGL_SCALE_VALUE);
-    float actualZ = z / OPENGL_SCALE_VALUE;
-    float maxCoord = max(actualX, max(actualY, actualZ));
-    m_fZmax = max(maxCoord, m_fZmax);
+    float maxCoord = std::max(x, std::max(y, z));
+    m_fZmax = std::max(maxCoord, m_fZmax);
     if (m_iPointNum == 0)
     {
-        m_Extrude3DInfo.xRange[0] = actualX;
-        m_Extrude3DInfo.xRange[1] = actualX;
-        m_Extrude3DInfo.yRange[0] = actualY;
-        m_Extrude3DInfo.yRange[1] = actualY;
+        m_Extrude3DInfo.xRange[0] = x;
+        m_Extrude3DInfo.xRange[1] = x;
+        m_Extrude3DInfo.yRange[0] = y;
+        m_Extrude3DInfo.yRange[1] = y;
     }
-    m_Extrude3DInfo.xRange[0] = min(m_Extrude3DInfo.xRange[0], actualX);
-    m_Extrude3DInfo.xRange[1] = max(m_Extrude3DInfo.xRange[1], actualX);
-    m_Extrude3DInfo.yRange[0] = min(m_Extrude3DInfo.yRange[0], actualY);
-    m_Extrude3DInfo.yRange[1] = max(m_Extrude3DInfo.yRange[1], actualY);
+    m_Extrude3DInfo.xRange[0] = min(m_Extrude3DInfo.xRange[0], x);
+    m_Extrude3DInfo.xRange[1] = max(m_Extrude3DInfo.xRange[1], x);
+    m_Extrude3DInfo.yRange[0] = min(m_Extrude3DInfo.yRange[0], y);
+    m_Extrude3DInfo.yRange[1] = max(m_Extrude3DInfo.yRange[1], y);
     m_iPointNum++;
 }
 
@@ -1318,7 +1314,7 @@ int OpenGL3DRenderer::ProcessExtrude3DPickingBox()
     glDisableVertexAttribArray(m_2DVertexID);
     glUseProgram(0);
     //read pixel to get the index
-    Point select = Point(m_aMPos.X() / OPENGL_SCALE_VALUE, m_aMPos.Y() / OPENGL_SCALE_VALUE);
+    Point select = Point(m_aMPos.X(), m_aMPos.Y());
     sal_uInt8 selectColor[4] = {0};
 #if 0
     int picWidth = m_iWidth - select.X();
commit 83c4db6dd6dc153d35dcf15186444e9e9a171074
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Apr 30 23:54:57 2014 +0200

    pass large objects by const reference and not by value
    
    Change-Id: I43cfb31ffb268313940a92e80275d70fa8a2333a

diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx
index 3ed67a9..7af602f 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -149,15 +149,18 @@ public:
     void LoadShaders();
     void init();
 
-    void Set3DSenceInfo(glm::vec3 cameraUp,glm::mat4 D3DTrasform,bool twoSidesLighting,sal_Int32 color);
-    void SetLightInfo(bool lightOn,sal_Int32 color,glm::vec4 direction);
-    void AddShapePolygon3DObject(sal_Int32 color,bool lineOnly,sal_Int32 lineColor,long fillStyle,sal_Int32 specular);
+    void Set3DSenceInfo(const glm::vec3& cameraUp, const glm::mat4& D3DTrasform,
+            bool twoSidesLighting, sal_Int32 color);
+    void SetLightInfo(bool lightOn, sal_Int32 color, const glm::vec4& direction);
+    void AddShapePolygon3DObject(sal_Int32 color, bool lineOnly, sal_Int32 lineColor,
+            long fillStyle, sal_Int32 specular);
     void EndAddShapePolygon3DObject();
     void AddPolygon3DObjectNormalPoint(float x, float y, float z);
     void EndAddPolygon3DObjectNormalPoint();
     void AddPolygon3DObjectPoint(float x, float y, float z);
     void EndAddPolygon3DObjectPoint();
-    void AddShape3DExtrudeObject(sal_Int32 color,sal_Int32 specular,float xTransform,float yTransform,float zTransform);
+    void AddShape3DExtrudeObject(sal_Int32 color, sal_Int32 specular, float xTransform,
+            float yTransform, float zTransform);
     void EndAddShape3DExtrudeObject();
     void AddExtrude3DObjectPoint(float x, float y, float z);
     void EndAddExtrude3DObjectPoint();
@@ -177,12 +180,12 @@ private:
     int Update3DUniformBlock();
     int RenderExtrude3DObject();
     int RenderFPS(float fps);
-    int RenderText(::rtl::OUString &string, com::sun::star::awt::Point aPos);
-    int RenderExtrudeSurface(Extrude3DInfo extrude3D);
-    int RenderExtrudeTopSurface(Extrude3DInfo extrude3D);
-    int RenderExtrudeMiddleSurface(Extrude3DInfo extrude3D);
-    int RenderExtrudeBottomSurface(Extrude3DInfo extrude3D);
-    int RenderExtrudeFlatSurface(Extrude3DInfo extrude3D, int surIndex);
+    int RenderText(const ::rtl::OUString& string, com::sun::star::awt::Point aPos);
+    int RenderExtrudeSurface(const Extrude3DInfo& extrude3D);
+    int RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D);
+    int RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D);
+    int RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D);
+    int RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D, int surIndex);
     int ProcessUnrenderedShape();
     glm::vec4 GetColorByIndex(int index);
     int GetIndexByColor(int r, int g, int b);
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 03a2161..508ea796 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -710,7 +710,7 @@ int OpenGL3DRenderer::RenderPolygon3DObject()
     return 0;
 }
 
-void OpenGL3DRenderer::Set3DSenceInfo(glm::vec3 cameraUp,glm::mat4 D3DTrasform,bool twoSidesLighting,sal_Int32 color)
+void OpenGL3DRenderer::Set3DSenceInfo(const glm::vec3& cameraUp, const glm::mat4& D3DTrasform, bool twoSidesLighting, sal_Int32 color)
 {
 
     m_CameraInfo.cameraUp = cameraUp;
@@ -727,7 +727,7 @@ void OpenGL3DRenderer::Set3DSenceInfo(glm::vec3 cameraUp,glm::mat4 D3DTrasform,b
     m_LightsInfo.lightNum = 0;
 }
 
-void OpenGL3DRenderer::SetLightInfo(bool lightOn,sal_Int32 color,glm::vec4 direction)
+void OpenGL3DRenderer::SetLightInfo(bool lightOn, sal_Int32 color, const glm::vec4& direction)
 {
     if (lightOn)
     {
@@ -984,7 +984,7 @@ int OpenGL3DRenderer::Update3DUniformBlock()
     glBindBuffer(GL_UNIFORM_BUFFER, 0);
     return 0;
 }
-int OpenGL3DRenderer::RenderExtrudeFlatSurface(Extrude3DInfo extrude3D, int surIndex)
+int OpenGL3DRenderer::RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D, int surIndex)
 {
     float xzScale = extrude3D.xRange[1] - extrude3D.xRange[0];
     PosVecf3 trans = {extrude3D.xTransform,//m_Extrude3DInfo.xTransform + 140,
@@ -1001,7 +1001,7 @@ int OpenGL3DRenderer::RenderExtrudeFlatSurface(Extrude3DInfo extrude3D, int surI
     return 0;
 }
 
-int OpenGL3DRenderer::RenderExtrudeBottomSurface(Extrude3DInfo extrude3D)
+int OpenGL3DRenderer::RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D)
 {
     float xzScale = extrude3D.xRange[1] - extrude3D.xRange[0];
     float yScale = extrude3D.yRange[1] - extrude3D.yRange[0];
@@ -1033,7 +1033,7 @@ int OpenGL3DRenderer::RenderExtrudeBottomSurface(Extrude3DInfo extrude3D)
     return 0;
 }
 
-int OpenGL3DRenderer::RenderExtrudeMiddleSurface(Extrude3DInfo extrude3D)
+int OpenGL3DRenderer::RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D)
 {
     float xzScale = extrude3D.xRange[1] - extrude3D.xRange[0];
     float yScale = extrude3D.yRange[1] - extrude3D.yRange[0];
@@ -1068,7 +1068,7 @@ int OpenGL3DRenderer::RenderExtrudeMiddleSurface(Extrude3DInfo extrude3D)
     return 0;
 }
 
-int OpenGL3DRenderer::RenderExtrudeTopSurface(Extrude3DInfo extrude3D)
+int OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D)
 {
     float xzScale = extrude3D.xRange[1] - extrude3D.xRange[0];
     float yScale = extrude3D.yRange[1] - extrude3D.yRange[0];
@@ -1105,7 +1105,7 @@ int OpenGL3DRenderer::RenderExtrudeTopSurface(Extrude3DInfo extrude3D)
     return 0;
 }
 
-int OpenGL3DRenderer::RenderExtrudeSurface(Extrude3DInfo extrude3D)
+int OpenGL3DRenderer::RenderExtrudeSurface(const Extrude3DInfo& extrude3D)
 {
     glUniformMatrix4fv(m_3DViewID, 1, GL_FALSE, &m_3DView[0][0]);
     glUniformMatrix4fv(m_3DProjectionID, 1, GL_FALSE, &m_3DProjection[0][0]);
@@ -1184,7 +1184,7 @@ void OpenGL3DRenderer::SetClickPos(Point aMPos)
     m_aMPos = aMPos;
 }
 
-int OpenGL3DRenderer::RenderText(::rtl::OUString &, awt::Point )
+int OpenGL3DRenderer::RenderText(const ::rtl::OUString& , awt::Point )
 {
     //TODO: moggi: disabled for now
     /*
commit 9b8c33ecc561bf8685614ec61d709c8001901fb6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Apr 30 23:19:32 2014 +0200

    Revert "temporarily disable failing chart2 ChXDiagram RegressionCurves test"
    
    This reverts commit 6be6700edb3b704d62d8b331ba95f227617c57d3.

diff --git a/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDiagram.csv b/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDiagram.csv
index 8976f4a..6fa7833 100644
--- a/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDiagram.csv
+++ b/qadevOOo/objdsc/sch/com.sun.star.comp.office.ChXDiagram.csv
@@ -73,6 +73,7 @@
 "ChXDiagram";"com::sun::star::chart::ChartStatistics";"PercentageError"
 "ChXDiagram";"com::sun::star::chart::ChartStatistics";"ErrorMargin"
 "ChXDiagram";"com::sun::star::chart::ChartStatistics";"ErrorIndicator"
+"ChXDiagram";"com::sun::star::chart::ChartStatistics";"RegressionCurves"
 "ChXDiagram";"com::sun::star::chart::X3DDisplay";"getWall()"
 "ChXDiagram";"com::sun::star::chart::X3DDisplay";"getFloor()"
 "ChXDiagram";"com::sun::star::chart::StackableDiagram";"Percent"
commit e0dcb2260e75935fcebd0774ea51568666874e95
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Apr 30 02:33:02 2014 +0200

    be explicit about text rotations, fdo#70670
    
    Change-Id: I5090a49c2383e6a30165a8eca22b527972c0f507

diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 0599503..bed0350 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -502,7 +502,7 @@ const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties()
     ::std::vector< ::chart::WrappedProperty* > aWrappedProperties;
 
     aWrappedProperties.push_back( new WrappedTitleStringProperty( m_spChart2ModelContact->m_xContext ) );
-    aWrappedProperties.push_back( new WrappedTextRotationProperty( m_eTitleType==TitleHelper::Y_AXIS_TITLE || m_eTitleType==TitleHelper::X_AXIS_TITLE ) );
+    aWrappedProperties.push_back( new WrappedTextRotationProperty( true ) );
     aWrappedProperties.push_back( new WrappedStackedTextProperty() );
     WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
     WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
commit 046f71a2151b247181685471a20f8e90d95085f1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Apr 30 01:53:50 2014 +0200

    it should not be a warning
    
    Change-Id: I1cb1413a1ebae4fbb3d43acf5fe15d6ad81db5bb

diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 2256481..d21a85c 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -537,7 +537,7 @@ textToDateTime(css::util::DateTime & io_rdt, const OUString& i_text) throw ()
     if (::sax::Converter::parseDateTime(io_rdt, 0, i_text)) {
         return true;
     } else {
-        SAL_WARN("sfx.doc", "Invalid date: " << i_text);
+        SAL_INFO("sfx.doc", "Invalid date: " << i_text);
         return false;
     }
 }
commit 5d185dc3b443a99dad0b192319c22dca615ce51d
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Apr 30 01:38:44 2014 +0200

    add test for fdo#78041
    
    Change-Id: I08d30102b2218584af2fb800a657728bec42ec18

diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 4d7f4b0..c30f201 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -18,12 +18,15 @@
 #include <com/sun/star/chart2/XInternalDataProvider.hpp>
 #include <com/sun/star/chart/XChartDataArray.hpp>
 
+#include <com/sun/star/util/Color.hpp>
+
 class Chart2ImportTest : public ChartTest
 {
 public:
     void Fdo60083();
     void testSteppedLines();
     void testErrorBarRange();
+    void testErrorBarFormatting();
     void testODSChartSeries();
     void testXLSXChartSeries();
     void testXLSChartSeries();
@@ -41,6 +44,7 @@ public:
     CPPUNIT_TEST(Fdo60083);
     CPPUNIT_TEST(testSteppedLines);
     CPPUNIT_TEST(testErrorBarRange);
+    CPPUNIT_TEST(testErrorBarFormatting);
     CPPUNIT_TEST(testODSChartSeries);
     CPPUNIT_TEST(testXLSXChartSeries);
     CPPUNIT_TEST(testXLSChartSeries);
@@ -147,6 +151,29 @@ void Chart2ImportTest::testErrorBarRange()
     CPPUNIT_ASSERT_EQUAL(aRangePos, OUString("$Sheet1.$C$2:$C$4"));
 }
 
+void Chart2ImportTest::testErrorBarFormatting()
+{
+    load("/chart2/qa/extras/data/ods/", "error_bar_properties.ods");
+    uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet( 0, mxComponent );
+    CPPUNIT_ASSERT(xChartDoc.is());
+
+    Reference< chart2::XDataSeries > xDataSeries = getDataSeriesFromDoc( xChartDoc, 0 );
+    CPPUNIT_ASSERT( xDataSeries.is() );
+
+    Reference< beans::XPropertySet > xPropSet( xDataSeries, UNO_QUERY_THROW );
+    CPPUNIT_ASSERT( xPropSet.is() );
+
+    // test that y error bars are there
+    Reference< beans::XPropertySet > xErrorBarYProps;
+    xPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
+    CPPUNIT_ASSERT(xErrorBarYProps.is());
+
+    util::Color aColor;
+    xErrorBarYProps->getPropertyValue("LineColor") >>= aColor;
+    sal_uInt32 nColorValue = aColor;
+    CPPUNIT_ASSERT_EQUAL(sal_uInt32(0xff3333), nColorValue);
+}
+
 // stepped line interpolation
 void Chart2ImportTest::testSteppedLines()
 {
diff --git a/chart2/qa/extras/data/ods/error_bar_properties.ods b/chart2/qa/extras/data/ods/error_bar_properties.ods
new file mode 100644
index 0000000..056be88
Binary files /dev/null and b/chart2/qa/extras/data/ods/error_bar_properties.ods differ
commit 200963d3019b7d296f4e22c5e6874eef8b84012b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Apr 30 01:20:36 2014 +0200

    set graphic properties for error bars during import, fdo#78041
    
    Change-Id: I43138745b074dcacdafa090d97eeb9aa2ccecf78

diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index c500ddd..c751886 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -167,7 +167,7 @@ void ErrorBar::setPropertyValue( const OUString& rPropName, const uno::Any& rAny
     else if(rPropName == "ShowNegativeError")
         rAny >>= mbShowNegativeError;
     else if(rPropName == "ErrorBarRangePositive" || rPropName == "ErrorBarRangeNegative")
-        throw uno::RuntimeException("read-only property", static_cast< uno::XWeak*>(this));
+        throw beans::UnknownPropertyException("read-only property", static_cast< uno::XWeak*>(this));
     else
         LineProperties::setPropertyValue(rPropName, rAny);
 
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index ef6ef13..c1045a9 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -1011,6 +1011,19 @@ SchXMLStatisticsObjectContext::~SchXMLStatisticsObjectContext()
 
 namespace {
 
+void SetErrorBarStyleProperties( const OUString& rStyleName, uno::Reference< beans::XPropertySet > xBarProp,
+                                        SchXMLImportHelper& rImportHelper )
+{
+    const SvXMLStylesContext* pStylesCtxt = rImportHelper.GetAutoStylesContext();
+    const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(rImportHelper.GetChartFamilyID(),
+            rStyleName);
+
+    XMLPropStyleContext * pSeriesStyleContext =
+        const_cast< XMLPropStyleContext * >( dynamic_cast< const XMLPropStyleContext * >( pStyle ));
+
+    pSeriesStyleContext->FillPropertySet( xBarProp );
+}
+
 void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Reference< beans::XPropertySet> xBarProp,
                                             SchXMLImportHelper& rImportHelper, OUString& aPosRange, OUString& aNegRange)
 {
@@ -1177,6 +1190,8 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
                     xBarProp->setPropertyValue("ShowNegativeError",uno::makeAny(sal_True));
 
                     // first import defaults from parent style
+                    SetErrorBarStyleProperties( maSeriesStyleName, xBarProp, mrImportHelper );
+                    SetErrorBarStyleProperties( sAutoStyleName, xBarProp, mrImportHelper );
                     SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
                     SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
 
commit 90511600040cdaafb4ceb1cfb7d31752b56185ca
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 29 21:13:15 2014 +0200

    fix spelling error
    
    Change-Id: If6c318f1a1f74a39083bf83eed2f80aca1e27bc5

diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index aacfa8e..5473c2d 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -175,7 +175,7 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
         sal_Int32 nIndex = aContentOUString.lastIndexOf("Grand total of errors in submitted package: ");
         if(nIndex == -1)
         {
-            SAL_WARN("test", "no summery line");
+            SAL_WARN("test", "no summary line");
         }
         else
         {
commit 3cca2dca62b19242a5b421f938443eabcd24b671
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 29 21:12:16 2014 +0200

    add test for fdo#75168
    
    Change-Id: Iffb07d98333667837a7a2bba00e2d667d49bb709

diff --git a/sc/qa/unit/data/contentCSV/new_cond_format_test_sheet2.csv b/sc/qa/unit/data/contentCSV/new_cond_format_test_sheet2.csv
new file mode 100644
index 0000000..b35f4e5
--- /dev/null
+++ b/sc/qa/unit/data/contentCSV/new_cond_format_test_sheet2.csv
@@ -0,0 +1,3 @@
+2.00,2
+1,1.00
+4.00,3
diff --git a/sc/qa/unit/data/xlsx/new_cond_format_test.xlsx b/sc/qa/unit/data/xlsx/new_cond_format_test.xlsx
index f5a6977..0750188 100644
Binary files a/sc/qa/unit/data/xlsx/new_cond_format_test.xlsx and b/sc/qa/unit/data/xlsx/new_cond_format_test.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 82edb80..cf1233b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -265,10 +265,19 @@ void ScExportTest::testConditionalFormatExportXLSX()
     ScDocShellRef xDocSh = saveAndReload(&(*xShell), XLSX);
     CPPUNIT_ASSERT(xDocSh.Is());
     ScDocument* pDoc = xDocSh->GetDocument();
-    OUString aCSVFile("new_cond_format_test.");
-    OUString aCSVPath;
-    createCSVPath( aCSVFile, aCSVPath );
-    testCondFile(aCSVPath, pDoc, 0);
+    {
+        OUString aCSVFile("new_cond_format_test.");
+        OUString aCSVPath;
+        createCSVPath( aCSVFile, aCSVPath );
+        testCondFile(aCSVPath, pDoc, 0);
+    }
+    {
+        OUString aCSVFile("new_cond_format_test_sheet2.");
+        OUString aCSVPath;
+        createCSVPath( aCSVFile, aCSVPath );
+        testCondFile(aCSVPath, pDoc, 1);
+    }
+
 
     xDocSh->DoClose();
 }
commit 3629fac93ee96a3778bb9a7a63150b35c5d9bc3c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 29 20:37:36 2014 +0200

    escape conditional formatting formulas during xlsx export, fdo#75168
    
    Change-Id: I9ebdb2315b51c2b53d8cfa0486b3ec22a8e0d88d

diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 290f79f..af726b2 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -937,13 +937,13 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
     if(!IsTextRule(eOperation) && !IsTopBottomRule(eOperation))
     {
         rWorksheet->startElement( XML_formula, FSEND );
-        rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(),
+        rWorksheet->writeEscaped(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(),
                     mrFormatEntry.CreateTokenArry(0)));
         rWorksheet->endElement( XML_formula );
         if (bFmla2)
         {
             rWorksheet->startElement( XML_formula, FSEND );
-            rWorksheet->write(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(),
+            rWorksheet->writeEscaped(XclXmlUtils::ToOUString( GetRoot().GetDoc(), mrFormatEntry.GetValidSrcPos(),
                         mrFormatEntry.CreateTokenArry(1)));
             rWorksheet->endElement( XML_formula );
         }
commit e9a9adf0bdc05bf2d80632a56db794c7fa12209e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Apr 29 12:30:04 2014 +0200

    add unit test for fdo#77984
    
    Change-Id: Iab081d779a959c9ebe8a2721b146ebe0b3e97099

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 48e25b6..70e7f7b 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -46,6 +46,8 @@
 #include "columniterator.hxx"
 #include "types.hxx"
 #include "conditio.hxx"
+#include "colorscale.hxx"
+#include "fillinfo.hxx"
 #include "globstr.hrc"
 #include "tokenarray.hxx"
 #include "scopetools.hxx"
@@ -5728,6 +5730,42 @@ void Test::testCondCopyPaste()
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testIconSet()
+{
+    m_pDoc->InsertTab(0, "Test");
+    ScConditionalFormatList* pList = m_pDoc->GetCondFormList(0);
+
+    ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc);
+    ScRangeList aRangeList(ScRange(0,0,0,0,0,0));
+    pFormat->AddRange(aRangeList);
+
+    ScIconSetFormat* pEntry = new ScIconSetFormat(m_pDoc);
+    ScIconSetFormatData* pData = new ScIconSetFormatData;
+    pData->maEntries.push_back(new ScColorScaleEntry(0, COL_BLUE));
+    pData->maEntries.push_back(new ScColorScaleEntry(1, COL_GREEN));
+    pData->maEntries.push_back(new ScColorScaleEntry(2, COL_RED));
+    pEntry->SetIconSetData(pData);
+
+    m_pDoc->AddCondFormatData(pFormat->GetRange(), 0, 1);
+    pList->InsertNew(pFormat);
+
+    struct {
+        double nVal; sal_Int32 nIndex;
+    } aTests[] = {
+        { -1.0, 0 },
+        { 0.0, 0 },
+        { 1.0, 1 },
+        { 2.0, 2 },
+        { 3.0, 2 }
+    };
+    for(size_t i = 0; i < SAL_N_ELEMENTS(aTests); ++i)
+    {
+        m_pDoc->SetValue(0,0,0,aTests[i].nVal);
+        ScIconSetInfo* pInfo = pEntry->GetIconSetInfo(ScAddress(0,0,0));
+        CPPUNIT_ASSERT_EQUAL(aTests[i].nIndex, pInfo->nIconIndex);
+    }
+}
+
 void Test::testImportStream()
 {
     sc::AutoCalcSwitch aAC(*m_pDoc, true); // turn on auto calc.
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 06bab38..c26a433 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -341,6 +341,7 @@ public:
     void testCondFormatInsertRow();
     void testCondFormatInsertCol();
     void testCondCopyPaste();
+    void testIconSet();
 
     void testImportStream();
     void testDeleteContents();
@@ -494,6 +495,7 @@ public:
     CPPUNIT_TEST(testCondFormatInsertRow);
     CPPUNIT_TEST(testCondFormatInsertCol);
     CPPUNIT_TEST(testCondCopyPaste);
+    CPPUNIT_TEST(testIconSet);
     CPPUNIT_TEST(testImportStream);
     CPPUNIT_TEST(testDeleteContents);
     CPPUNIT_TEST(testTransliterateText);


More information about the Libreoffice-commits mailing list