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
a3125e80
Kaydet (Commit)
a3125e80
authored
Nis 14, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
switch to IOpenGLRenderer in chart2 2D rendering
Change-Id: If2351186e6e6612a84b1c98c28bbb7f2c3dc49ab
üst
7f6b1560
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
9 deletions
+35
-9
OpenglShapeFactory.cxx
chart2/source/view/main/OpenglShapeFactory.cxx
+33
-7
unoshape.hxx
include/svx/unoshape.hxx
+1
-1
IOpenGLRenderer.hxx
include/vcl/IOpenGLRenderer.hxx
+1
-1
No files found.
chart2/source/view/main/OpenglShapeFactory.cxx
Dosyayı görüntüle @
a3125e80
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include <rtl/math.hxx>
#include <rtl/math.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
#include <svx/svdopath.hxx>
#include <vcl/IOpenGLRenderer.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
...
@@ -67,6 +68,24 @@ extern "C" {
...
@@ -67,6 +68,24 @@ extern "C" {
{
return
new
opengl
::
OpenglShapeFactory
();}
{
return
new
opengl
::
OpenglShapeFactory
();}
}
}
class
OpenGLChartAdapter
:
public
IOpenGLRenderer
{
public
:
OpenGLChartAdapter
(
uno
::
Reference
<
drawing
::
XShapes
>
xShapes
)
:
mxShapes
(
xShapes
)
{}
virtual
~
OpenGLChartAdapter
()
{}
virtual
void
operator
()()
{}
uno
::
Reference
<
drawing
::
XShapes
>
getShapes
()
{
return
mxShapes
;
}
private
:
uno
::
Reference
<
drawing
::
XShapes
>
mxShapes
;
// here to fix lifetime
};
using
dummy
::
DummyXShape
;
using
dummy
::
DummyXShape
;
using
dummy
::
DummyXShapes
;
using
dummy
::
DummyXShapes
;
...
@@ -92,14 +111,16 @@ uno::Reference< drawing::XShapes > getChartShape(
...
@@ -92,14 +111,16 @@ uno::Reference< drawing::XShapes > getChartShape(
{
{
if
(
xShapes
->
getByIndex
(
nN
)
>>=
xShape
)
if
(
xShapes
->
getByIndex
(
nN
)
>>=
xShape
)
{
{
OUString
aRet
;
OUString
aRet
;
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
xProp
->
getPropertyValue
(
UNO_NAME_MISC_OBJ_NAME
)
>>=
aRet
;
xProp
->
getPropertyValue
(
UNO_NAME_MISC_OBJ_NAME
)
>>=
aRet
;
if
(
aRet
.
equals
(
"com.sun.star.chart2.shapes"
)
)
if
(
aRet
.
equals
(
"com.sun.star.chart2.shapes"
)
)
{
{
xRet
=
dynamic_cast
<
SvxDummyShapeContainer
*>
(
xShape
.
get
())
->
getWrappedShape
();
IOpenGLRenderer
*
pRenderer
=
dynamic_cast
<
SvxOpenGLObject
*>
(
xShape
.
get
())
->
getRenderer
();
OpenGLChartAdapter
*
pAdapter
=
dynamic_cast
<
OpenGLChartAdapter
*>
(
pRenderer
);
if
(
pAdapter
)
xRet
=
pAdapter
->
getShapes
();
break
;
break
;
}
}
}
}
...
@@ -121,12 +142,17 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape
...
@@ -121,12 +142,17 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape
uno
::
Reference
<
drawing
::
XShape
>
xTarget
(
m_xShapeFactory
->
createInstance
(
uno
::
Reference
<
drawing
::
XShape
>
xTarget
(
m_xShapeFactory
->
createInstance
(
"com.sun.star.drawing.OpenGLObject"
),
uno
::
UNO_QUERY
);
"com.sun.star.drawing.OpenGLObject"
),
uno
::
UNO_QUERY
);
dummy
::
DummyChart
*
pChart
=
new
dummy
::
DummyChart
(
xTarget
);
uno
::
Reference
<
drawing
::
XShapes
>
xChart
(
new
dummy
::
DummyChart
(
xTarget
));
SvxDummyShapeContainer
*
pContainer
=
new
SvxDummyShapeContainer
(
pChart
);
pContainer
->
setSize
(
awt
::
Size
(
0
,
0
));
xRet
=
pChart
;
xDrawPage
->
add
(
xTarget
);
xDrawPage
->
add
(
xTarget
);
xDrawPage
->
add
(
pContainer
);
uno
::
Any
aName
;
aName
<<=
OUString
(
"com.sun.star.chart2.shapes"
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropSet
(
xTarget
,
uno
::
UNO_QUERY_THROW
);
xPropSet
->
setPropertyValue
(
UNO_NAME_MISC_OBJ_NAME
,
aName
);
SvxOpenGLObject
*
pObj
=
dynamic_cast
<
SvxOpenGLObject
*>
(
xTarget
.
get
());
pObj
->
setRenderer
(
new
OpenGLChartAdapter
(
xChart
));
xRet
=
getChartShape
(
xDrawPage
);
}
}
return
xRet
;
return
xRet
;
}
}
...
...
include/svx/unoshape.hxx
Dosyayı görüntüle @
a3125e80
...
@@ -877,7 +877,7 @@ private:
...
@@ -877,7 +877,7 @@ private:
OUString
referer_
;
OUString
referer_
;
};
};
class
SvxOpenGLObject
:
public
SvxShape
class
S
VX_DLLPUBLIC
S
vxOpenGLObject
:
public
SvxShape
{
{
public
:
public
:
SvxOpenGLObject
(
SdrObject
*
pObj
)
throw
()
:
SvxShape
(
pObj
){}
SvxOpenGLObject
(
SdrObject
*
pObj
)
throw
()
:
SvxShape
(
pObj
){}
...
...
include/vcl/IOpenGLRenderer.hxx
Dosyayı görüntüle @
a3125e80
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
class
IOpenGLRenderer
class
IOpenGLRenderer
{
{
public
:
public
:
virtual
~
IOpenGLRenderer
();
virtual
~
IOpenGLRenderer
()
{}
;
virtual
void
operator
()()
=
0
;
virtual
void
operator
()()
=
0
;
};
};
...
...
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