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
0087fb06
Kaydet (Commit)
0087fb06
authored
Eki 14, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#735968 Unchecked dynamic_cast
Change-Id: Idf9b26180f824321bd5e07e9a9360bb9e59472dd
üst
b7f9175e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
xmlimpit.cxx
sw/source/filter/xml/xmlimpit.cxx
+19
-20
No files found.
sw/source/filter/xml/xmlimpit.cxx
Dosyayı görüntüle @
0087fb06
...
...
@@ -229,16 +229,16 @@ struct BoxHolder : private boost::noncopyable
SvxBorderLine
*
pLeft
;
SvxBorderLine
*
pRight
;
explicit
BoxHolder
(
SvxBoxItem
*
p
Box
)
explicit
BoxHolder
(
SvxBoxItem
&
r
Box
)
{
pTop
=
pBox
->
GetTop
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
pBox
->
GetTop
()
);
pBottom
=
pBox
->
GetBottom
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
pBox
->
GetBottom
()
);
pLeft
=
pBox
->
GetLeft
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
pBox
->
GetLeft
()
);
pRight
=
pBox
->
GetRight
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
pBox
->
GetRight
()
);
pTop
=
rBox
.
GetTop
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
rBox
.
GetTop
()
);
pBottom
=
rBox
.
GetBottom
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
rBox
.
GetBottom
()
);
pLeft
=
rBox
.
GetLeft
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
rBox
.
GetLeft
()
);
pRight
=
rBox
.
GetRight
()
==
NULL
?
NULL
:
new
SvxBorderLine
(
*
rBox
.
GetRight
()
);
}
~
BoxHolder
()
...
...
@@ -433,11 +433,10 @@ bool SvXMLImportItemMapper::PutXMLValue(
case
RES_BOX
:
{
SvxBoxItem
*
pBox
=
dynamic_cast
<
SvxBoxItem
*>
(
&
rItem
);
OSL_ENSURE
(
pBox
!=
NULL
,
"Wrong WHich-ID"
);
SvxBoxItem
&
rBox
=
dynamic_cast
<
SvxBoxItem
&>
(
rItem
);
// copy SvxBorderLines
BoxHolder
aBoxes
(
p
Box
);
BoxHolder
aBoxes
(
r
Box
);
sal_Int32
nTemp
;
...
...
@@ -456,16 +455,16 @@ bool SvXMLImportItemMapper::PutXMLValue(
if
(
nMemberId
==
LEFT_BORDER_PADDING
||
nMemberId
==
ALL_BORDER_PADDING
)
pBox
->
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
LEFT
);
rBox
.
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
LEFT
);
if
(
nMemberId
==
RIGHT_BORDER_PADDING
||
nMemberId
==
ALL_BORDER_PADDING
)
pBox
->
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
RIGHT
);
rBox
.
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
RIGHT
);
if
(
nMemberId
==
TOP_BORDER_PADDING
||
nMemberId
==
ALL_BORDER_PADDING
)
pBox
->
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
TOP
);
rBox
.
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
TOP
);
if
(
nMemberId
==
BOTTOM_BORDER_PADDING
||
nMemberId
==
ALL_BORDER_PADDING
)
pBox
->
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
BOTTOM
);
rBox
.
SetDistance
(
(
sal_uInt16
)
nTemp
,
SvxBoxItemLine
::
BOTTOM
);
break
;
case
ALL_BORDER
:
...
...
@@ -578,10 +577,10 @@ bool SvXMLImportItemMapper::PutXMLValue(
break
;
}
pBox
->
SetLine
(
aBoxes
.
pTop
,
SvxBoxItemLine
::
TOP
);
pBox
->
SetLine
(
aBoxes
.
pBottom
,
SvxBoxItemLine
::
BOTTOM
);
pBox
->
SetLine
(
aBoxes
.
pLeft
,
SvxBoxItemLine
::
LEFT
);
pBox
->
SetLine
(
aBoxes
.
pRight
,
SvxBoxItemLine
::
RIGHT
);
rBox
.
SetLine
(
aBoxes
.
pTop
,
SvxBoxItemLine
::
TOP
);
rBox
.
SetLine
(
aBoxes
.
pBottom
,
SvxBoxItemLine
::
BOTTOM
);
rBox
.
SetLine
(
aBoxes
.
pLeft
,
SvxBoxItemLine
::
LEFT
);
rBox
.
SetLine
(
aBoxes
.
pRight
,
SvxBoxItemLine
::
RIGHT
);
bOk
=
true
;
}
...
...
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