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
7a246731
Kaydet (Commit)
7a246731
authored
Ara 13, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add ugly hack to work around SvxDrawPage::add only accepting SvxShape
Change-Id: I77c292b088a1a1797fba10cc514167a1f3dca917
üst
ba5285f4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
2 deletions
+36
-2
Library_chartopengl.mk
chart2/Library_chartopengl.mk
+1
-0
OpenglShapeFactory.cxx
chart2/source/view/main/OpenglShapeFactory.cxx
+4
-2
unoshape.hxx
include/svx/unoshape.hxx
+23
-0
unoshap4.cxx
svx/source/unodraw/unoshap4.cxx
+8
-0
No files found.
chart2/Library_chartopengl.mk
Dosyayı görüntüle @
7a246731
...
...
@@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_libraries,chartopengl,\
cppu \
cppuhelper \
sal \
svxcore \
vcl \
$(gb_UWINAPI) \
))
...
...
chart2/source/view/main/OpenglShapeFactory.cxx
Dosyayı görüntüle @
7a246731
...
...
@@ -46,6 +46,7 @@
#include <rtl/math.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
#include <svx/unoshape.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
...
...
@@ -95,7 +96,7 @@ uno::Reference< drawing::XShapes > getChartShape(
xProp
->
getPropertyValue
(
UNO_NAME_MISC_OBJ_NAME
)
>>=
aRet
;
if
(
aRet
.
equals
(
"com.sun.star.chart2.shapes"
)
)
{
xRet
=
uno
::
Reference
<
drawing
::
XShapes
>
(
xShape
,
uno
::
UNO_QUERY
);
xRet
=
dynamic_cast
<
SvxDummyShapeContainer
*>
(
xShape
.
get
())
->
getWrappedShape
(
);
break
;
}
}
...
...
@@ -119,12 +120,13 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape
"com.sun.star.drawing.GraphicObjectShape"
),
uno
::
UNO_QUERY
);
dummy
::
DummyChart
*
pChart
=
new
dummy
::
DummyChart
(
xTarget
);
m_pChart
=
(
void
*
)
pChart
;
SvxDummyShapeContainer
*
pContainer
=
new
SvxDummyShapeContainer
(
pChart
);
xRet
=
pChart
;
#if 0
xRet = new dummy::DummyChart();
m_pChart = (void *)((dummy::DummyChart *)xRet);
#endif
xDrawPage
->
add
(
uno
::
Reference
<
drawing
::
XShape
>
(
xRet
,
uno
::
UNO_QUERY_THROW
)
);
xDrawPage
->
add
(
pContainer
);
}
return
xRet
;
}
...
...
include/svx/unoshape.hxx
Dosyayı görüntüle @
7a246731
...
...
@@ -875,6 +875,29 @@ private:
OUString
referer_
;
};
/*
* This is a really ugly hack for the chart2 OpenGL backend
* SvxShapeGroup::add only accepts objects derived from SvxShape and silently drops
* other objects. This fixes my life time problems but I will burn for it in hell.
*
* The object does nothing and should not be painted. It is just there to ensure that the
* wrapped object is not deleted prematurely.
*/
class
SVX_DLLPUBLIC
SvxDummyShapeContainer
:
public
SvxShape
{
private
:
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
m_xDummyObject
;
public
:
SvxDummyShapeContainer
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
xWrappedObject
);
virtual
~
SvxDummyShapeContainer
()
throw
();
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
getWrappedShape
()
{
return
m_xDummyObject
;
}
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/unodraw/unoshap4.cxx
Dosyayı görüntüle @
7a246731
...
...
@@ -943,4 +943,12 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr
}
}
SvxDummyShapeContainer
::
SvxDummyShapeContainer
(
uno
::
Reference
<
drawing
::
XShapes
>
xObject
)
:
m_xDummyObject
(
xObject
)
{
}
SvxDummyShapeContainer
::~
SvxDummyShapeContainer
()
throw
()
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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