summaryrefslogtreecommitdiffstats
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-14 20:40:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-15 00:44:53 +0000
commita0956d3960422c6804a749ababc58964522f8d66 (patch)
treeae6f96d9e4e01b41233caf4c16e9053f52970251 /starmath
parenttdf#87574 - Outline numbering "None" is not retained in docx (diff)
downloadcore-a0956d3960422c6804a749ababc58964522f8d66.tar.gz
core-a0956d3960422c6804a749ababc58964522f8d66.zip
boost::scoped_array->std::vector
Change-Id: I21aa10e1b4b0aa301f8b3022585e148fb727fbc9
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/pch/precompiled_sm.hxx1
-rw-r--r--starmath/source/node.cxx26
2 files changed, 12 insertions, 15 deletions
diff --git a/starmath/inc/pch/precompiled_sm.hxx b/starmath/inc/pch/precompiled_sm.hxx
index 31dce9f84cc3..5f9ad05f4a47 100644
--- a/starmath/inc/pch/precompiled_sm.hxx
+++ b/starmath/inc/pch/precompiled_sm.hxx
@@ -16,7 +16,6 @@
#include "svx/modctrl.hxx"
#include "tools/rcid.h"
-#include <boost/scoped_array.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index c55b69184779..5669ba14c7d4 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -36,8 +36,7 @@
#include <math.h>
#include <float.h>
-#include <boost/scoped_array.hpp>
-
+#include <vector>
SmNode::SmNode(SmNodeType eNodeType, const SmToken &rNodeToken)
: aNodeToken( rNodeToken )
@@ -2558,9 +2557,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// initialize array that is to hold the maximum widths of all
// elements (subnodes) in that column.
- boost::scoped_array<long> pColWidth(new long[nNumCols]);
- for (j = 0; j < nNumCols; j++)
- pColWidth[j] = 0;
+ std::vector<long> aColWidth(nNumCols);
// arrange subnodes and calculate the aboves arrays contents
sal_uInt16 nNodes = GetNumSubNodes();
@@ -2571,7 +2568,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
pNode->Arrange(rDev, rFormat);
int nCol = nIdx % nNumCols;
- pColWidth[nCol] = std::max(pColWidth[nCol], pNode->GetItalicWidth());
+ aColWidth[nCol] = std::max(aColWidth[nCol], pNode->GetItalicWidth());
}
}
@@ -2584,11 +2581,12 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nVerDist = nNormDist * rFormat.GetDistance(DIS_MATRIXROW) / 100L;
// build array that holds the leftmost position for each column
- boost::scoped_array<long> pColLeft(new long[nNumCols]);
+ std::vector<long> aColLeft(nNumCols);
long nX = 0;
for (j = 0; j < nNumCols; j++)
- { pColLeft[j] = nX;
- nX += pColWidth[j] + nHorDist;
+ {
+ aColLeft[j] = nX;
+ nX += aColWidth[j] + nHorDist;
}
Point aPos, aDelta;
@@ -2614,16 +2612,16 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// and horizontal alignment
switch (eHorAlign)
{ case RHA_LEFT:
- aPos.X() = rNodeRect.GetLeft() + pColLeft[j];
+ aPos.X() = rNodeRect.GetLeft() + aColLeft[j];
break;
case RHA_CENTER:
- aPos.X() = rNodeRect.GetLeft() + pColLeft[j]
- + pColWidth[j] / 2
+ aPos.X() = rNodeRect.GetLeft() + aColLeft[j]
+ + aColWidth[j] / 2
- rNodeRect.GetItalicCenterX();
break;
case RHA_RIGHT:
- aPos.X() = rNodeRect.GetLeft() + pColLeft[j]
- + pColWidth[j] - rNodeRect.GetItalicWidth();
+ aPos.X() = rNodeRect.GetLeft() + aColLeft[j]
+ + aColWidth[j] - rNodeRect.GetItalicWidth();
break;
}