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
e1823a9f
Kaydet (Commit)
e1823a9f
authored
Mar 26, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add a boolean "RoundedRectangle" property to the GL 3D chart.
Change-Id: I3cb23461718c5713c1e76d0b37d92b3e7849d13b
üst
1f5659fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
4 deletions
+107
-4
GL3DBarChartType.cxx
chart2/source/model/template/GL3DBarChartType.cxx
+92
-0
GL3DBarChartType.hxx
chart2/source/model/template/GL3DBarChartType.hxx
+15
-4
No files found.
chart2/source/model/template/GL3DBarChartType.cxx
Dosyayı görüntüle @
e1823a9f
...
...
@@ -9,11 +9,84 @@
#include "GL3DBarChartType.hxx"
#include <servicenames_charttypes.hxx>
#include <PropertyHelper.hxx>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
using
namespace
com
::
sun
::
star
;
namespace
chart
{
namespace
{
enum
{
PROP_GL3DCHARTTYPE_ROUNDED_RECTANGLE
};
struct
DefaultsInitializer
{
tPropertyValueMap
*
operator
()()
{
static
tPropertyValueMap
aStaticDefaults
;
if
(
aStaticDefaults
.
empty
())
addDefaults
(
aStaticDefaults
);
return
&
aStaticDefaults
;
}
private
:
void
addDefaults
(
tPropertyValueMap
&
rOutMap
)
{
PropertyHelper
::
setPropertyValueDefault
(
rOutMap
,
PROP_GL3DCHARTTYPE_ROUNDED_RECTANGLE
,
false
);
}
};
struct
Defaults
:
public
rtl
::
StaticAggregate
<
tPropertyValueMap
,
DefaultsInitializer
>
{};
struct
InfoHelperInitializer
{
cppu
::
OPropertyArrayHelper
*
operator
()()
{
static
cppu
::
OPropertyArrayHelper
aHelper
(
getProperties
());
return
&
aHelper
;
}
uno
::
Sequence
<
beans
::
Property
>
getProperties
()
{
uno
::
Sequence
<
beans
::
Property
>
aRet
(
1
);
aRet
[
0
]
=
beans
::
Property
(
"RoundedRectangle"
,
PROP_GL3DCHARTTYPE_ROUNDED_RECTANGLE
,
::
getCppuBooleanType
(),
beans
::
PropertyAttribute
::
BOUND
|
beans
::
PropertyAttribute
::
MAYBEDEFAULT
);
return
aRet
;
}
};
struct
InfoHelper
:
public
rtl
::
StaticAggregate
<
cppu
::
OPropertyArrayHelper
,
InfoHelperInitializer
>
{};
struct
ChartTypeInfoInitializer
{
uno
::
Reference
<
beans
::
XPropertySetInfo
>*
operator
()()
{
static
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xPropertySetInfo
;
if
(
!
xPropertySetInfo
.
is
())
xPropertySetInfo
=
cppu
::
OPropertySetHelper
::
createPropertySetInfo
(
*
InfoHelper
::
get
());
return
&
xPropertySetInfo
;
}
};
struct
ChartTypeInfo
:
public
rtl
::
StaticAggregate
<
uno
::
Reference
<
beans
::
XPropertySetInfo
>
,
ChartTypeInfoInitializer
>
{};
}
GL3DBarChartType
::
GL3DBarChartType
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
)
:
ChartType
(
xContext
)
{
...
...
@@ -50,6 +123,25 @@ GL3DBarChartType::createClone()
return
uno
::
Reference
<
util
::
XCloneable
>
(
new
GL3DBarChartType
(
*
this
));
}
css
::
uno
::
Any
GL3DBarChartType
::
GetDefaultValue
(
sal_Int32
nHandle
)
const
throw
(
css
::
beans
::
UnknownPropertyException
)
{
const
tPropertyValueMap
&
rDefaults
=
*
Defaults
::
get
();
tPropertyValueMap
::
const_iterator
it
=
rDefaults
.
find
(
nHandle
);
return
it
==
rDefaults
.
end
()
?
uno
::
Any
()
:
it
->
second
;
}
cppu
::
IPropertyArrayHelper
&
GL3DBarChartType
::
getInfoHelper
()
{
return
*
InfoHelper
::
get
();
}
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySetInfo
>
GL3DBarChartType
::
getPropertySetInfo
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
*
ChartTypeInfo
::
get
();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
chart2/source/model/template/GL3DBarChartType.hxx
Dosyayı görüntüle @
e1823a9f
...
...
@@ -33,11 +33,22 @@ protected:
GL3DBarChartType
(
const
GL3DBarChartType
&
rOther
);
virtual
OUString
SAL_CALL
getChartType
()
throw
(
c
om
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
);
throw
(
c
ss
::
uno
::
RuntimeException
,
std
::
exception
);
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
util
::
XCloneable
>
SAL_CALL
createClone
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
);
virtual
css
::
uno
::
Reference
<
css
::
util
::
XCloneable
>
SAL_CALL
createClone
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
);
// OPropertySet
virtual
css
::
uno
::
Any
GetDefaultValue
(
sal_Int32
nHandle
)
const
throw
(
css
::
beans
::
UnknownPropertyException
);
virtual
cppu
::
IPropertyArrayHelper
&
SAL_CALL
getInfoHelper
();
// XPropertySet
virtual
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySetInfo
>
SAL_CALL
getPropertySetInfo
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
);
};
}
...
...
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