Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a0956d39
Kaydet (Commit)
a0956d39
authored
Şub 14, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
boost::scoped_array->std::vector
Change-Id: I21aa10e1b4b0aa301f8b3022585e148fb727fbc9
üst
7f126fc8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
precompiled_sm.hxx
starmath/inc/pch/precompiled_sm.hxx
+0
-1
node.cxx
starmath/source/node.cxx
+12
-14
No files found.
starmath/inc/pch/precompiled_sm.hxx
Dosyayı görüntüle @
a0956d39
...
...
@@ -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>
...
...
starmath/source/node.cxx
Dosyayı görüntüle @
a0956d39
...
...
@@ -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
(
p
ColWidth
[
nCol
],
pNode
->
GetItalicWidth
());
aColWidth
[
nCol
]
=
std
::
max
(
a
ColWidth
[
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
()
+
p
ColLeft
[
j
];
aPos
.
X
()
=
rNodeRect
.
GetLeft
()
+
a
ColLeft
[
j
];
break
;
case
RHA_CENTER
:
aPos
.
X
()
=
rNodeRect
.
GetLeft
()
+
p
ColLeft
[
j
]
+
p
ColWidth
[
j
]
/
2
aPos
.
X
()
=
rNodeRect
.
GetLeft
()
+
a
ColLeft
[
j
]
+
a
ColWidth
[
j
]
/
2
-
rNodeRect
.
GetItalicCenterX
();
break
;
case
RHA_RIGHT
:
aPos
.
X
()
=
rNodeRect
.
GetLeft
()
+
p
ColLeft
[
j
]
+
p
ColWidth
[
j
]
-
rNodeRect
.
GetItalicWidth
();
aPos
.
X
()
=
rNodeRect
.
GetLeft
()
+
a
ColLeft
[
j
]
+
a
ColWidth
[
j
]
-
rNodeRect
.
GetItalicWidth
();
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment