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
f256fafd
Kaydet (Commit)
f256fafd
authored
Ara 16, 2016
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: Sw*Contact::GetAnchoredObj() convert to assert and simplify
Change-Id: I0aa18fafd1759cd7c4d2ada18120fa8b97b353a4
üst
68a1a7a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
28 deletions
+18
-28
dcontact.cxx
sw/source/core/draw/dcontact.cxx
+18
-28
No files found.
sw/source/core/draw/dcontact.cxx
Dosyayı görüntüle @
f256fafd
...
...
@@ -400,21 +400,15 @@ SwFlyDrawContact::~SwFlyDrawContact()
}
// #i26791#
const
SwAnchoredObject
*
SwFlyDrawContact
::
GetAnchoredObj
(
const
SdrObject
*
_pSdrObj
)
const
const
SwAnchoredObject
*
SwFlyDrawContact
::
GetAnchoredObj
(
const
SdrObject
*
pSdrObj
)
const
{
OSL_ENSURE
(
_pSdrObj
,
"<SwFlyDrawContact::GetAnchoredObj(..)> - no object provided"
);
OSL_ENSURE
(
dynamic_cast
<
const
SwVirtFlyDrawObj
*>
(
_pSdrObj
)
!=
nullptr
,
"<SwFlyDrawContact::GetAnchoredObj(..)> - wrong object type object provided"
);
assert
(
GetUserCall
(
_pSdrObj
)
==
this
&&
assert
(
pSdrObj
);
assert
(
dynamic_cast
<
const
SwVirtFlyDrawObj
*>
(
pSdrObj
)
!=
nullptr
);
assert
(
GetUserCall
(
pSdrObj
)
==
this
&&
"<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belong to this contact"
);
const
SwAnchoredObject
*
pRetAnchoredObj
=
nullptr
;
if
(
const
SwVirtFlyDrawObj
*
pFlyDrawObj
=
dynamic_cast
<
const
SwVirtFlyDrawObj
*>
(
_pSdrObj
))
{
pRetAnchoredObj
=
pFlyDrawObj
->
GetFlyFrame
();
}
const
SwAnchoredObject
*
const
pRetAnchoredObj
=
static_cast
<
const
SwVirtFlyDrawObj
*>
(
pSdrObj
)
->
GetFlyFrame
();
return
pRetAnchoredObj
;
}
...
...
@@ -642,36 +636,32 @@ void SwDrawContact::GetTextObjectsFromFormat( std::list<SdrTextObj*>& rTextObjec
}
// #i26791#
const
SwAnchoredObject
*
SwDrawContact
::
GetAnchoredObj
(
const
SdrObject
*
_
pSdrObj
)
const
const
SwAnchoredObject
*
SwDrawContact
::
GetAnchoredObj
(
const
SdrObject
*
pSdrObj
)
const
{
// handle default parameter value
if
(
!
_pSdrObj
)
if
(
!
pSdrObj
)
{
_
pSdrObj
=
GetMaster
();
pSdrObj
=
GetMaster
();
}
OSL_ENSURE
(
_pSdrObj
,
"<SwDrawContact::GetAnchoredObj(..)> - no object provided"
);
OSL_ENSURE
(
dynamic_cast
<
const
SwDrawVirtObj
*>
(
_pSdrObj
)
!=
nullptr
||
(
dynamic_cast
<
const
SdrVirtObj
*>
(
_pSdrObj
)
==
nullptr
&&
dynamic_cast
<
const
SwDrawVirtObj
*>
(
_pSdrObj
)
==
nullptr
),
"<SwDrawContact::GetAnchoredObj(..)> - wrong object type object provided"
);
OSL_ENSURE
(
GetUserCall
(
_pSdrObj
)
==
this
||
_pSdrObj
==
GetMaster
(),
assert
(
pSdrObj
);
assert
(
dynamic_cast
<
const
SwDrawVirtObj
*>
(
pSdrObj
)
!=
nullptr
||
dynamic_cast
<
const
SdrVirtObj
*>
(
pSdrObj
)
==
nullptr
);
assert
((
GetUserCall
(
pSdrObj
)
==
this
||
pSdrObj
==
GetMaster
())
&&
"<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact"
);
const
SwAnchoredObject
*
pRetAnchoredObj
=
nullptr
;
if
(
_pSdrObj
)
if
(
dynamic_cast
<
const
SwDrawVirtObj
*>
(
pSdrObj
)
!=
nullptr
)
{
if
(
dynamic_cast
<
const
SwDrawVirtObj
*>
(
_pSdrObj
)
!=
nullptr
)
{
pRetAnchoredObj
=
&
(
static_cast
<
const
SwDrawVirtObj
*>
(
_pSdrObj
)
->
GetAnchoredObj
());
pRetAnchoredObj
=
&
(
static_cast
<
const
SwDrawVirtObj
*>
(
pSdrObj
)
->
GetAnchoredObj
());
}
else
if
(
dynamic_cast
<
const
SdrVirtObj
*>
(
_pSdrObj
)
==
nullptr
&&
dynamic_cast
<
const
SwDrawVirtObj
*>
(
_pSdrObj
)
==
nullptr
)
else
{
assert
(
dynamic_cast
<
const
SdrVirtObj
*>
(
pSdrObj
)
==
nullptr
);
pRetAnchoredObj
=
&
maAnchoredDrawObj
;
}
}
return
pRetAnchoredObj
;
}
...
...
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