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
c4e53fad
Kaydet (Commit)
c4e53fad
authored
Eki 29, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1078537 Division or modulo by zero
Change-Id: I63e8168efe169e506b3be65ca150a779404f0885
üst
54ba9587
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
htmltbl.cxx
sw/source/core/doc/htmltbl.cxx
+5
-2
tblrwcl.cxx
sw/source/core/doc/tblrwcl.cxx
+3
-0
ndtbl.cxx
sw/source/core/docnode/ndtbl.cxx
+3
-3
No files found.
sw/source/core/doc/htmltbl.cxx
Dosyayı görüntüle @
c4e53fad
...
...
@@ -40,6 +40,7 @@
#include "htmltbl.hxx"
#include "ndindex.hxx"
#include "switerator.hxx"
#include <o3tl/numeric.hxx>
#include <boost/foreach.hpp>
#ifdef DBG_UTIL
#include "tblrwcl.hxx"
...
...
@@ -1417,10 +1418,12 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
}
OSL_ENSURE
(
nCols
==
nFixedCols
,
"Missed a column!"
);
}
else
else
if
(
nCols
>
0
)
{
if
(
nMax
==
0
)
throw
o3tl
::
divide_by_zero
();
// No. So distribute the space regularly among all columns.
for
(
sal_uInt16
i
=
0
;
i
<
nCols
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nCols
;
++
i
)
{
sal_uLong
nColMax
=
GetColumn
(
i
)
->
GetMax
();
GetColumn
(
i
)
->
SetAbsColWidth
(
...
...
sw/source/core/doc/tblrwcl.cxx
Dosyayı görüntüle @
c4e53fad
...
...
@@ -55,6 +55,7 @@
#include <poolfmt.hxx>
#include <tblrwcl.hxx>
#include <unochart.hxx>
#include <o3tl/numeric.hxx>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/foreach.hpp>
...
...
@@ -1904,6 +1905,8 @@ static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara)
{
nRealSize
=
pCpyPara
->
nNewSize
;
nRealSize
*=
rFndBox
.
GetBox
()
->
GetFrmFmt
()
->
GetFrmSize
().
GetWidth
();
if
(
pCpyPara
->
nOldSize
==
0
)
throw
o3tl
::
divide_by_zero
();
nRealSize
/=
pCpyPara
->
nOldSize
;
}
...
...
sw/source/core/docnode/ndtbl.cxx
Dosyayı görüntüle @
c4e53fad
...
...
@@ -2968,14 +2968,14 @@ bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth )
aPosArr
.
erase
(
aPosArr
.
begin
(),
aPosArr
.
begin
()
+
n
);
m_Boxes
.
erase
(
m_Boxes
.
begin
(),
m_Boxes
.
begin
()
+
n
);
size_t
nSize
=
aPosArr
.
size
();
if
(
nSize
)
size_t
n
Arr
Size
=
aPosArr
.
size
();
if
(
n
Arr
Size
)
{
if
(
nOldWidth
==
0
)
throw
o3tl
::
divide_by_zero
();
// Adapt the positions to the new Size
for
(
n
=
0
;
n
<
nSize
;
++
n
)
for
(
n
=
0
;
n
<
n
Arr
Size
;
++
n
)
{
sal_uLong
nSize
=
nWidth
;
nSize
*=
(
aPosArr
[
n
]
-
nOffset
);
...
...
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