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
2149e924
Kaydet (Commit)
2149e924
authored
Kas 01, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1000600 Division or modulo by float zero
Change-Id: If39679b54ef1bb0a7af794c2f7a6186ebd69c2e0
üst
169bc7c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
DomainMapperTableManager.cxx
writerfilter/source/dmapper/DomainMapperTableManager.cxx
+18
-11
No files found.
writerfilter/source/dmapper/DomainMapperTableManager.cxx
Dosyayı görüntüle @
2149e924
...
...
@@ -741,20 +741,27 @@ void DomainMapperTableManager::endOfRowAction()
sal_Int16
nLastRelPos
=
0
;
sal_uInt32
nBorderGridIndex
=
m_nGridBefore
;
::
std
::
vector
<
sal_Int32
>::
const_iterator
aSpansIter
=
pCurrentSpans
->
begin
(
)
;
for
(
sal_uInt32
nBorder
=
0
;
nBorder
<
m_nCell
.
back
(
)
-
1
;
++
nBorder
)
size_t
nWidthsBound
=
m_nCell
.
back
(
)
-
1
;
if
(
nWidthsBound
)
{
double
fGridWidth
=
0.
;
for
(
sal_Int32
nGridCount
=
*
aSpansIter
;
nGridCount
>
0
;
--
nGridCount
)
fGridWidth
+=
(
*
pTableGrid
.
get
())[
nBorderGridIndex
++
];
if
(
nFullWidthRelative
==
0
)
throw
std
::
range_error
(
"divide by zero"
);
sal_Int16
nRelPos
=
sal
::
static_int_cast
<
sal_Int16
>
((
fGridWidth
*
10000
)
/
nFullWidthRelative
);
::
std
::
vector
<
sal_Int32
>::
const_iterator
aSpansIter
=
pCurrentSpans
->
begin
(
);
for
(
sal_uInt32
nBorder
=
0
;
nBorder
<
nWidthsBound
;
++
nBorder
)
{
double
fGridWidth
=
0.
;
for
(
sal_Int32
nGridCount
=
*
aSpansIter
;
nGridCount
>
0
;
--
nGridCount
)
fGridWidth
+=
(
*
pTableGrid
.
get
())[
nBorderGridIndex
++
];
pSeparators
[
nBorder
].
Position
=
nRelPos
+
nLastRelPos
;
pSeparators
[
nBorder
].
IsVisible
=
sal_True
;
nLastRelPos
=
nLastRelPos
+
nRelPos
;
++
aSpansIter
;
sal_Int16
nRelPos
=
sal
::
static_int_cast
<
sal_Int16
>
((
fGridWidth
*
10000
)
/
nFullWidthRelative
);
pSeparators
[
nBorder
].
Position
=
nRelPos
+
nLastRelPos
;
pSeparators
[
nBorder
].
IsVisible
=
sal_True
;
nLastRelPos
=
nLastRelPos
+
nRelPos
;
++
aSpansIter
;
}
}
TablePropertyMapPtr
pPropMap
(
new
TablePropertyMap
);
pPropMap
->
Insert
(
PROP_TABLE_COLUMN_SEPARATORS
,
uno
::
makeAny
(
aSeparators
)
);
...
...
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