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
67f899e1
Kaydet (Commit)
67f899e1
authored
Kas 07, 2012
tarafından
Caolán McNamara
Kaydeden (comit)
Michael Meeks
Kas 08, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: fdo#56460 don't crash on close of files with custom shapes
Change-Id: Ib9e7cdae3c7facb59c4630ca21c252698170379e
üst
6a0ba09f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
30 deletions
+14
-30
svdoashp.hxx
svx/inc/svx/svdoashp.hxx
+3
-1
svdoashp.cxx
svx/source/svdraw/svdoashp.cxx
+11
-29
No files found.
svx/inc/svx/svdoashp.hxx
Dosyayı görüntüle @
67f899e1
...
...
@@ -101,10 +101,12 @@ public:
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShape
>
mXRenderedCustomShape
;
mutable
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XCustomShapeEngine
>
mxCustomShapeEngine
;
// #i37011# render geometry shadow
SdrObject
*
mpLastShadowGeometry
;
static
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XCustomShapeEngine
>
GetCustomShapeEngine
(
const
SdrObjCustomShape
*
pCustomShape
)
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XCustomShapeEngine
>
GetCustomShapeEngine
()
const
;
// SVX_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > >
// SdrObjCustomShape::GetInteraction( const SdrObjCustomShape* pCustomShape ) const;
...
...
svx/source/svdraw/svdoashp.cxx
Dosyayı görüntüle @
67f899e1
...
...
@@ -96,13 +96,6 @@ using namespace ::com::sun::star::lang;
using
namespace
::
com
::
sun
::
star
::
beans
;
using
namespace
::
com
::
sun
::
star
::
drawing
;
// A simple one item cache really helps here ...
namespace
{
static
const
SdrObjCustomShape
*
g_pLastCacheShape
;
static
Reference
<
XCustomShapeEngine
>
g_xLastCacheShapeEngine
;
}
static
void
lcl_ShapeSegmentFromBinary
(
EnhancedCustomShapeSegment
&
rSegInfo
,
sal_uInt16
nSDat
)
{
switch
(
nSDat
>>
8
)
...
...
@@ -405,21 +398,18 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
////////////////////////////////////////////////////////////////////////////////////////////////////
Reference
<
XCustomShapeEngine
>
SdrObjCustomShape
::
GetCustomShapeEngine
(
const
SdrObjCustomShape
*
pCustomShape
)
Reference
<
XCustomShapeEngine
>
SdrObjCustomShape
::
GetCustomShapeEngine
(
)
const
{
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
;
// We get dozens of back-to-back calls for the same shape
if
(
pCustomShape
==
g_pLastCacheShape
)
return
g_xLastCacheShapeEngine
;
if
(
mxCustomShapeEngine
.
is
())
return
mxCustomShapeEngine
;
String
aEngine
(((
SdrCustomShapeEngineItem
&
)
pCustomShape
->
GetMergedItem
(
SDRATTR_CUSTOMSHAPE_ENGINE
)).
GetValue
());
String
aEngine
(((
SdrCustomShapeEngineItem
&
)
GetMergedItem
(
SDRATTR_CUSTOMSHAPE_ENGINE
)).
GetValue
());
if
(
!
aEngine
.
Len
()
)
aEngine
=
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.drawing.EnhancedCustomShapeEngine"
)
);
Reference
<
XMultiServiceFactory
>
xFactory
(
::
comphelper
::
getProcessServiceFactory
()
);
Reference
<
XShape
>
aXShape
=
GetXShapeForSdrObject
(
(
SdrObjCustomShape
*
)
pCustomShape
);
Reference
<
XShape
>
aXShape
=
GetXShapeForSdrObject
(
const_cast
<
SdrObjCustomShape
*>
(
this
)
);
if
(
aXShape
.
is
()
)
{
if
(
aEngine
.
Len
()
&&
xFactory
.
is
()
)
...
...
@@ -431,21 +421,18 @@ Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine( const S
aArgument
[
0
]
<<=
aPropValues
;
Reference
<
XInterface
>
xInterface
(
xFactory
->
createInstanceWithArguments
(
aEngine
,
aArgument
)
);
if
(
xInterface
.
is
()
)
xCustomShapeEngine
=
Reference
<
XCustomShapeEngine
>
(
xInterface
,
UNO_QUERY
);
m
xCustomShapeEngine
=
Reference
<
XCustomShapeEngine
>
(
xInterface
,
UNO_QUERY
);
}
}
g_pLastCacheShape
=
pCustomShape
;
g_xLastCacheShapeEngine
=
xCustomShapeEngine
;
return
xCustomShapeEngine
;
return
mxCustomShapeEngine
;
}
const
SdrObject
*
SdrObjCustomShape
::
GetSdrObjectFromCustomShape
()
const
{
if
(
!
mXRenderedCustomShape
.
is
()
)
{
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
GetCustomShapeEngine
(
this
)
);
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
GetCustomShapeEngine
()
);
if
(
xCustomShapeEngine
.
is
()
)
((
SdrObjCustomShape
*
)
this
)
->
mXRenderedCustomShape
=
xCustomShapeEngine
->
render
();
}
...
...
@@ -577,7 +564,7 @@ sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const
{
sal_Bool
bRet
=
sal_False
;
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
GetCustomShapeEngine
(
this
)
);
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
GetCustomShapeEngine
()
);
if
(
xCustomShapeEngine
.
is
()
)
{
awt
::
Rectangle
aR
(
xCustomShapeEngine
->
getTextBounds
()
);
...
...
@@ -592,7 +579,7 @@ sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const
basegfx
::
B2DPolyPolygon
SdrObjCustomShape
::
GetLineGeometry
(
const
SdrObjCustomShape
*
pCustomShape
,
const
sal_Bool
bBezierAllowed
)
{
basegfx
::
B2DPolyPolygon
aRetval
;
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
GetCustomShapeEngine
(
pCustomShape
)
);
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
pCustomShape
->
GetCustomShapeEngine
(
)
);
if
(
xCustomShapeEngine
.
is
()
)
{
com
::
sun
::
star
::
drawing
::
PolyPolygonBezierCoords
aBezierCoords
=
xCustomShapeEngine
->
getLineGeometry
();
...
...
@@ -616,7 +603,7 @@ std::vector< SdrCustomShapeInteraction > SdrObjCustomShape::GetInteractionHandle
std
::
vector
<
SdrCustomShapeInteraction
>
xRet
;
try
{
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
GetCustomShapeEngine
(
pCustomShape
)
);
Reference
<
XCustomShapeEngine
>
xCustomShapeEngine
(
pCustomShape
->
GetCustomShapeEngine
(
)
);
if
(
xCustomShapeEngine
.
is
()
)
{
int
i
;
...
...
@@ -865,11 +852,6 @@ SdrObjCustomShape::SdrObjCustomShape() :
SdrObjCustomShape
::~
SdrObjCustomShape
()
{
if
(
this
==
g_pLastCacheShape
)
{
g_pLastCacheShape
=
NULL
;
g_xLastCacheShapeEngine
.
clear
();
}
// delete buffered display geometry
InvalidateRenderGeometry
();
}
...
...
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