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
1ca93889
Kaydet (Commit)
1ca93889
authored
Ock 06, 2018
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz#4976 Integer-overflow
Change-Id: Iefba0ea6122bd9b1dde59f33c0c67077fecb7eca
üst
6484dcf4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
lwpoverride.hxx
lotuswordpro/inc/lwpoverride.hxx
+9
-2
lwpparastyle.cxx
lotuswordpro/source/filter/lwpparastyle.cxx
+1
-1
No files found.
lotuswordpro/inc/lwpoverride.hxx
Dosyayı görüntüle @
1ca93889
...
...
@@ -63,6 +63,7 @@
#include "lwpobjid.hxx"
#include "lwptools.hxx"
#include <o3tl/safeint.hxx>
#include <memory>
class
LwpObjectStream
;
...
...
@@ -434,11 +435,17 @@ private:
inline
double
LwpIndentOverride
::
GetFirst
()
const
{
return
LwpTools
::
ConvertToMetric
(
LwpTools
::
ConvertFromUnits
(
m_nFirst
-
m_nRest
));
sal_Int32
nRes
;
if
(
o3tl
::
checked_sub
(
m_nFirst
,
m_nRest
,
nRes
))
throw
std
::
range_error
(
"bad len"
);
return
LwpTools
::
ConvertToMetric
(
LwpTools
::
ConvertFromUnits
(
nRes
));
}
inline
double
LwpIndentOverride
::
GetLeft
()
const
{
return
LwpTools
::
ConvertToMetric
(
LwpTools
::
ConvertFromUnits
(
m_nAll
+
m_nRest
));
sal_Int32
nRes
;
if
(
o3tl
::
checked_add
(
m_nAll
,
m_nRest
,
nRes
))
throw
std
::
range_error
(
"bad len"
);
return
LwpTools
::
ConvertToMetric
(
LwpTools
::
ConvertFromUnits
(
nRes
));
}
inline
double
LwpIndentOverride
::
GetRight
()
const
{
...
...
lotuswordpro/source/filter/lwpparastyle.cxx
Dosyayı görüntüle @
1ca93889
...
...
@@ -457,7 +457,7 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden
else
if
(
relative
==
LwpIndentOverride
::
RELATIVE_REST
)
Amount
+=
pParentIndent
->
GetMRest
();
pTotalIndent
->
SetMAll
(
o3tl
::
saturating_add
(
Amount
,
pTotalIndent
->
GetMAll
()));
pTotalIndent
->
SetMRight
(
pParentIndent
->
GetMRight
()
+
pTotalIndent
->
GetMRight
(
));
pTotalIndent
->
SetMRight
(
o3tl
::
saturating_add
(
pParentIndent
->
GetMRight
(),
pTotalIndent
->
GetMRight
()
));
pParaStyle
->
SetIndent
(
pTotalIndent
->
GetFirst
());
pParaStyle
->
SetMargins
(
pTotalIndent
->
GetLeft
(),
pTotalIndent
->
GetRight
());
...
...
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