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
7070318e
Kaydet (Commit)
7070318e
authored
Eki 22, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
it builds again
Change-Id: I969ff5ed6fd979e9fd126e8d0b79a518697e7915
üst
e8575148
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
137 additions
and
2 deletions
+137
-2
Library_chartopengl.mk
chart2/Library_chartopengl.mk
+3
-0
AbstractShapeFactory.hxx
chart2/source/view/inc/AbstractShapeFactory.hxx
+2
-0
DummyXShape.hxx
chart2/source/view/inc/DummyXShape.hxx
+74
-0
OpenglShapeFactory.hxx
chart2/source/view/inc/OpenglShapeFactory.hxx
+3
-0
ShapeFactory.hxx
chart2/source/view/inc/ShapeFactory.hxx
+2
-0
ChartView.cxx
chart2/source/view/main/ChartView.cxx
+1
-0
DummyXShape.cxx
chart2/source/view/main/DummyXShape.cxx
+0
-0
OpenglShapeFactory.cxx
chart2/source/view/main/OpenglShapeFactory.cxx
+48
-2
ShapeFactory.cxx
chart2/source/view/main/ShapeFactory.cxx
+4
-0
No files found.
chart2/Library_chartopengl.mk
Dosyayı görüntüle @
7070318e
...
...
@@ -24,6 +24,7 @@ $(eval $(call gb_Library_use_libraries,chartopengl,\
cppu \
cppuhelper \
sal \
vcl \
$(gb_UWINAPI) \
))
...
...
@@ -43,6 +44,8 @@ else ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,chartopengl,\
-ldl \
-lGL \
-lGLU \
-lX11 \
))
endif
...
...
chart2/source/view/inc/AbstractShapeFactory.hxx
Dosyayı görüntüle @
7070318e
...
...
@@ -227,6 +227,8 @@ public:
getOrCreateChartRootShape
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XDrawPage
>&
xPage
)
=
0
;
virtual
void
setPageSize
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
xChartShapes
,
const
com
::
sun
::
star
::
awt
::
Size
&
rSize
)
=
0
;
virtual
void
createSeries
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
&
xTarget
,
...
...
chart2/source/view/inc/DummyXShape.hxx
Dosyayı görüntüle @
7070318e
...
...
@@ -56,6 +56,39 @@
#include <vector>
#include <map>
#include <boost/scoped_ptr.hpp>
#include <GL/gl.h>
#include <GL/glu.h>
#include <vcl/window.hxx>
#include <vcl/syschild.hxx>
#include <vcl/sysdata.hxx>
#if defined( _WIN32 )
#include <GL/glu.h>
#include <GL/glext.h>
#include <GL/wglext.h>
#elif defined( MACOSX )
#include "premac.h"
#include <Cocoa/Cocoa.h>
#include "postmac.h"
#elif defined( UNX )
#include <GL/glu.h>
#include <GL/glext.h>
namespace
unx
{
#include <X11/keysym.h>
#include <X11/X.h>
#define GLX_GLXEXT_PROTOTYPES 1
#include <GL/glx.h>
#include <GL/glxext.h>
}
#endif
class
SystemWindow
;
class
SystemChildWindow
;
using
namespace
com
::
sun
::
star
;
...
...
@@ -354,12 +387,53 @@ private:
class
DummyChart
:
public
DummyXShapes
{
public
:
DummyChart
();
virtual
DummyChart
*
getRootShape
();
OpenglContext
*
getGlContext
()
{
return
mpContext
;
}
virtual
void
SAL_CALL
setPosition
(
const
::
com
::
sun
::
star
::
awt
::
Point
&
aPosition
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
setSize
(
const
::
com
::
sun
::
star
::
awt
::
Size
&
aSize
)
throw
(
::
com
::
sun
::
star
::
beans
::
PropertyVetoException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
private
:
/// Holds the information of our new child window
struct
GLWindow
{
#if defined( _WIN32 )
HWND
hWnd
;
HDC
hDC
;
HGLRC
hRC
;
#elif defined( MACOSX )
#elif defined( UNX )
unx
::
Display
*
dpy
;
int
screen
;
unx
::
Window
win
;
#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
unx
::
GLXFBConfig
fbc
;
#endif
unx
::
XVisualInfo
*
vi
;
unx
::
GLXContext
ctx
;
bool
HasGLXExtension
(
const
char
*
name
)
{
return
gluCheckExtension
(
(
const
GLubyte
*
)
name
,
(
const
GLubyte
*
)
GLXExtensions
);
}
const
char
*
GLXExtensions
;
#endif
unsigned
int
bpp
;
unsigned
int
Width
;
unsigned
int
Height
;
const
GLubyte
*
GLExtensions
;
bool
HasGLExtension
(
const
char
*
name
)
{
return
gluCheckExtension
(
(
const
GLubyte
*
)
name
,
GLExtensions
);
}
}
GLWin
;
/// Holds the information of our new child window
void
createGLContext
();
bool
initWindow
();
bool
initOpengl
();
OpenglContext
*
mpContext
;
boost
::
scoped_ptr
<
Window
>
mpWindow
;
boost
::
scoped_ptr
<
SystemChildWindow
>
pWindow
;
};
class
DummyGroup2D
:
public
DummyXShapes
...
...
chart2/source/view/inc/OpenglShapeFactory.hxx
Dosyayı görüntüle @
7070318e
...
...
@@ -187,6 +187,9 @@ public:
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShapes
>
getOrCreateChartRootShape
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XDrawPage
>&
xPage
);
virtual
void
setPageSize
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
xChartShapes
,
const
com
::
sun
::
star
::
awt
::
Size
&
rSize
);
};
}
...
...
chart2/source/view/inc/ShapeFactory.hxx
Dosyayı görüntüle @
7070318e
...
...
@@ -203,6 +203,8 @@ public:
getOrCreateChartRootShape
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XDrawPage
>&
xPage
);
virtual
void
setPageSize
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShapes
>
xChartShapes
,
const
com
::
sun
::
star
::
awt
::
Size
&
rSize
);
private
:
ShapeFactory
();
...
...
chart2/source/view/main/ChartView.cxx
Dosyayı görüntüle @
7070318e
...
...
@@ -2398,6 +2398,7 @@ void ChartView::createShapes()
{
OSL_FAIL
(
"could not set page size correctly"
);
}
pShapeFactory
->
setPageSize
(
xPageShapes
,
aPageSize
);
{
SolarMutexGuard
aSolarGuard
;
...
...
chart2/source/view/main/DummyXShape.cxx
Dosyayı görüntüle @
7070318e
This diff is collapsed.
Click to expand it.
chart2/source/view/main/OpenglShapeFactory.cxx
Dosyayı görüntüle @
7070318e
...
...
@@ -77,10 +77,56 @@ using dummy::DummyCone;
namespace
opengl
{
namespace
{
uno
::
Reference
<
drawing
::
XShapes
>
getChartShape
(
const
uno
::
Reference
<
drawing
::
XDrawPage
>&
xDrawPage
)
{
uno
::
Reference
<
drawing
::
XShapes
>
xRet
;
uno
::
Reference
<
drawing
::
XShapes
>
xShapes
(
xDrawPage
,
uno
::
UNO_QUERY
);
if
(
xShapes
.
is
()
)
{
sal_Int32
nCount
=
xShapes
->
getCount
();
uno
::
Reference
<
drawing
::
XShape
>
xShape
;
for
(
sal_Int32
nN
=
nCount
;
nN
--
;
)
{
if
(
xShapes
->
getByIndex
(
nN
)
>>=
xShape
)
{
OUString
aRet
;
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
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
);
break
;
}
}
}
}
return
xRet
;
}
}
uno
::
Reference
<
drawing
::
XShapes
>
OpenglShapeFactory
::
getOrCreateChartRootShape
(
const
uno
::
Reference
<
drawing
::
XDrawPage
>&
)
const
uno
::
Reference
<
drawing
::
XDrawPage
>&
xDrawPage
)
{
uno
::
Reference
<
drawing
::
XShapes
>
xRet
(
getChartShape
(
xDrawPage
)
);
if
(
!
xRet
.
is
()
)
{
//create the root shape
xRet
=
new
dummy
::
DummyChart
();
xDrawPage
->
add
(
uno
::
Reference
<
drawing
::
XShape
>
(
xRet
,
uno
::
UNO_QUERY_THROW
));
}
return
xRet
;
}
void
OpenglShapeFactory
::
setPageSize
(
uno
::
Reference
<
drawing
::
XShapes
>
xChartShapes
,
const
awt
::
Size
&
rSize
)
{
return
new
dummy
::
DummyChart
();
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
xChartShapes
,
uno
::
UNO_QUERY_THROW
);
xShape
->
setSize
(
rSize
);
}
// methods for 3D shape creation
...
...
chart2/source/view/main/ShapeFactory.cxx
Dosyayı görüntüle @
7070318e
...
...
@@ -74,6 +74,10 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape(
return
xRet
;
}
void
ShapeFactory
::
setPageSize
(
uno
::
Reference
<
drawing
::
XShapes
>
,
const
awt
::
Size
&
)
{
}
// diverse PolyPolygon create methods
uno
::
Any
createPolyPolygon_Cube
(
...
...
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