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
a41687b6
Kaydet (Commit)
a41687b6
authored
Eki 21, 2010
tarafından
Katarina Machalkova
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
New files from xlsx-shared-oox-chart-export-part1.diff
üst
9e02fc64
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
661 additions
and
0 deletions
+661
-0
chartexport.hxx
oox/inc/oox/export/chartexport.hxx
+216
-0
ColorPropertySet.cxx
oox/source/export/ColorPropertySet.cxx
+233
-0
ColorPropertySet.hxx
oox/source/export/ColorPropertySet.hxx
+129
-0
SchXMLSeriesHelper.cxx
oox/source/export/SchXMLSeriesHelper.cxx
+0
-0
SchXMLSeriesHelper.hxx
oox/source/export/SchXMLSeriesHelper.hxx
+83
-0
chartexport.cxx
oox/source/export/chartexport.cxx
+0
-0
No files found.
oox/inc/oox/export/chartexport.hxx
0 → 100644
Dosyayı görüntüle @
a41687b6
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile$
* $Revision$
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _OOX_EXPORT_CHART_HXX_
#define _OOX_EXPORT_CHART_HXX_
#include <oox/dllapi.h>
#include <com/sun/star/uno/XReference.hpp>
#include <oox/export/drawingml.hxx>
#include <sax/fshelper.hxx>
#include <vcl/mapmod.hxx>
#include <hash_map>
#include <map>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
chart
{
class
XDiagram
;
class
XChartDocument
;
class
XChartDataArray
;
struct
ChartSeriesAddress
;
}
namespace
chart2
{
class
XDiagram
;
class
XChartDocument
;
class
XDataSeries
;
class
XChartType
;
namespace
data
{
class
XDataProvider
;
class
XDataSequence
;
}
}
namespace
drawing
{
class
XShape
;
class
XShapes
;
}
namespace
task
{
class
XStatusIndicator
;
}
namespace
frame
{
class
XModel
;
}
}}}
namespace
oox
{
namespace
drawingml
{
const
sal_Int32
AXIS_PRIMARY_X
=
1
;
const
sal_Int32
AXIS_PRIMARY_Y
=
2
;
const
sal_Int32
AXIS_PRIMARY_Z
=
3
;
const
sal_Int32
AXIS_SECONDARY_X
=
4
;
const
sal_Int32
AXIS_SECONDARY_Y
=
5
;
struct
AxisIdPair
{
sal_Int32
nAxisType
;
sal_Int32
nAxisId
;
sal_Int32
nCrossAx
;
AxisIdPair
(
sal_Int32
nType
,
sal_Int32
nId
,
sal_Int32
nAx
)
:
nAxisType
(
nType
),
nAxisId
(
nId
),
nCrossAx
(
nAx
)
{}
};
class
OOX_DLLPUBLIC
ChartExport
:
public
DrawingML
{
public
:
// first: data sequence for label, second: data sequence for values.
typedef
::
std
::
vector
<
AxisIdPair
>
AxisVector
;
private
:
sal_Int32
mnXmlNamespace
;
Fraction
maFraction
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>
mxChartModel
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart
::
XDiagram
>
mxDiagram
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XDiagram
>
mxNewDiagram
;
rtl
::
OUString
msTableName
;
rtl
::
OUStringBuffer
msStringBuffer
;
rtl
::
OUString
msString
;
// members filled by InitRangeSegmentationProperties (retrieved from DataProvider)
sal_Bool
mbHasSeriesLabels
;
sal_Bool
mbHasCategoryLabels
;
//if the categories are only automatically generated this will be false
sal_Bool
mbRowSourceColumns
;
rtl
::
OUString
msChartAddress
;
rtl
::
OUString
msTableNumberList
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>
maSequenceMapping
;
//::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataSequence
>
mxCategoriesValues
;
AxisVector
maAxes
;
sal_Bool
mbHasXAxis
;
sal_Bool
mbHasYAxis
;
sal_Bool
mbHasZAxis
;
sal_Bool
mbHasSecondaryXAxis
;
sal_Bool
mbHasSecondaryYAxis
;
sal_Bool
mbIs3DChart
;
private
:
sal_Int32
getChartType
(
);
rtl
::
OUString
parseFormula
(
const
rtl
::
OUString
&
rRange
);
void
InitPlotArea
();
void
_ExportContent
();
void
exportChartSpace
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart
::
XChartDocument
>
rChartDoc
,
sal_Bool
bIncludeTable
);
void
exportChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart
::
XChartDocument
>
rChartDoc
);
void
exportLegend
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart
::
XChartDocument
>
rChartDoc
);
void
exportTitle
(
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
xShape
);
void
exportPlotArea
(
);
void
exportAreaChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportBarChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportBubbleChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportDoughnutChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportLineChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportOfPieChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportPieChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportRadarChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportScatterChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportStockChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportSuffaceChart
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
);
void
exportSeries
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
chart2
::
XChartType
>
xChartType
,
sal_Int32
&
nAttachedAxis
);
void
exportCandleStickSeries
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>
>
&
aSeriesSeq
,
sal_Bool
bJapaneseCandleSticks
,
sal_Int32
&
nAttachedAxis
);
void
exportDataSeq
(
const
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataSequence
>&
xValueSeq
,
sal_Int32
elementTokenId
);
void
exportSeriesText
(
const
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataSequence
>&
xValueSeq
);
void
exportSeriesCategory
(
const
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataSequence
>&
xValueSeq
);
void
exportSeriesValues
(
const
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataSequence
>&
xValueSeq
,
sal_Int32
nValueType
=
XML_val
);
void
exportShapeProps
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
xPropSet
);
void
exportDataPoints
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
xSeriesProperties
,
sal_Int32
nSeriesLength
);
void
exportGrouping
(
sal_Bool
isBar
=
sal_False
);
void
exportMarker
();
void
exportSmooth
();
void
exportFirstSliceAng
();
void
exportAxes
(
);
void
exportXAxis
(
AxisIdPair
aAxisIdPair
);
void
exportYAxis
(
AxisIdPair
aAxisIdPair
);
void
exportAxis
(
AxisIdPair
aAxisIdPair
);
void
_exportAxis
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
xAxisProp
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>&
xAxisTitle
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
xMajorGrid
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>&
xMinorGrid
,
sal_Int32
nAxisType
,
const
char
*
sAxisPos
,
AxisIdPair
aAxisIdPair
);
void
exportAxesId
(
sal_Int32
nAttachedAxis
);
void
exportView3D
();
sal_Bool
isDeep3dChart
();
public
:
ChartExport
(
sal_Int32
nXmlNamespace
,
::
sax_fastparser
::
FSHelperPtr
pFS
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>&
xModel
,
::
oox
::
core
::
XmlFilterBase
*
pFB
=
NULL
,
DocumentType
eDocumentType
=
DOCUMENT_PPTX
);
virtual
~
ChartExport
()
{}
sal_Int32
GetXmlNamespace
()
const
;
ChartExport
&
SetXmlNamespace
(
sal_Int32
nXmlNamespace
);
sal_Int32
GetChartID
(
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>
getModel
(){
return
mxChartModel
;
}
virtual
ChartExport
&
WriteChartObj
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>&
xShape
,
sal_Int32
nChartCount
);
void
ExportContent
();
void
InitRangeSegmentationProperties
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XChartDocument
>
&
xChartDoc
);
};
}}
#endif
/* ndef _OOX_EXPORT_CHART_HXX_ */
oox/source/export/ColorPropertySet.cxx
0 → 100644
Dosyayı görüntüle @
a41687b6
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ColorPropertySet.cxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "ColorPropertySet.hxx"
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/drawing/FillStyle.hpp>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
beans
;
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
rtl
::
OUString
;
using
::
com
::
sun
::
star
::
uno
::
RuntimeException
;
// ================================================================================
namespace
{
class
lcl_ColorPropertySetInfo
:
public
::
cppu
::
WeakImplHelper1
<
XPropertySetInfo
>
{
public
:
lcl_ColorPropertySetInfo
(
bool
bFillColor
);
protected
:
// ____ XPropertySetInfo ____
virtual
Sequence
<
Property
>
SAL_CALL
getProperties
()
throw
(
RuntimeException
);
virtual
Property
SAL_CALL
getPropertyByName
(
const
OUString
&
aName
)
throw
(
UnknownPropertyException
,
RuntimeException
);
virtual
sal_Bool
SAL_CALL
hasPropertyByName
(
const
OUString
&
Name
)
throw
(
RuntimeException
);
private
:
bool
m_bIsFillColor
;
OUString
m_aColorPropName
;
Property
m_aColorProp
;
};
lcl_ColorPropertySetInfo
::
lcl_ColorPropertySetInfo
(
bool
bFillColor
)
:
m_bIsFillColor
(
bFillColor
),
// note: length of FillColor and LineColor is 9
m_aColorPropName
(
(
bFillColor
?
"FillColor"
:
"LineColor"
),
9
,
RTL_TEXTENCODING_ASCII_US
),
m_aColorProp
(
m_aColorPropName
,
-
1
,
::
getCppuType
(
reinterpret_cast
<
const
sal_Int32
*
>
(
0
)),
0
)
{}
Sequence
<
Property
>
SAL_CALL
lcl_ColorPropertySetInfo
::
getProperties
()
throw
(
RuntimeException
)
{
return
Sequence
<
Property
>
(
&
m_aColorProp
,
1
);
}
Property
SAL_CALL
lcl_ColorPropertySetInfo
::
getPropertyByName
(
const
OUString
&
aName
)
throw
(
UnknownPropertyException
,
RuntimeException
)
{
if
(
aName
.
equals
(
m_aColorPropName
))
return
m_aColorProp
;
throw
UnknownPropertyException
(
m_aColorPropName
,
static_cast
<
uno
::
XWeak
*
>
(
this
));
}
sal_Bool
SAL_CALL
lcl_ColorPropertySetInfo
::
hasPropertyByName
(
const
OUString
&
Name
)
throw
(
RuntimeException
)
{
return
Name
.
equals
(
m_aColorPropName
);
}
}
// anonymous namespace
// ================================================================================
namespace
oox
{
namespace
drawingml
{
ColorPropertySet
::
ColorPropertySet
(
sal_Int32
nColor
,
bool
bFillColor
/* = true */
)
:
// note: length of FillColor and LineColor is 9
m_aColorPropName
(
(
bFillColor
?
"FillColor"
:
"LineColor"
),
9
,
RTL_TEXTENCODING_ASCII_US
),
m_nColor
(
nColor
),
m_bIsFillColor
(
bFillColor
),
m_nDefaultColor
(
0x0099ccff
)
// blue 8
{}
ColorPropertySet
::~
ColorPropertySet
()
{}
void
ColorPropertySet
::
setColor
(
sal_Int32
nColor
)
{
m_nColor
=
nColor
;
}
sal_Int32
ColorPropertySet
::
getColor
()
{
return
m_nColor
;
}
// ____ XPropertySet ____
Reference
<
XPropertySetInfo
>
SAL_CALL
ColorPropertySet
::
getPropertySetInfo
()
throw
(
uno
::
RuntimeException
)
{
if
(
!
m_xInfo
.
is
())
m_xInfo
.
set
(
new
lcl_ColorPropertySetInfo
(
m_bIsFillColor
));
return
m_xInfo
;
}
void
SAL_CALL
ColorPropertySet
::
setPropertyValue
(
const
OUString
&
/* aPropertyName */
,
const
uno
::
Any
&
aValue
)
throw
(
UnknownPropertyException
,
PropertyVetoException
,
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
aValue
>>=
m_nColor
;
}
uno
::
Any
SAL_CALL
ColorPropertySet
::
getPropertyValue
(
const
OUString
&
aPropertyName
)
throw
(
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
if
(
aPropertyName
.
equalsAscii
(
"FillStyle"
)
&&
m_bIsFillColor
)
{
::
com
::
sun
::
star
::
drawing
::
FillStyle
aFillStyle
=
::
com
::
sun
::
star
::
drawing
::
FillStyle_SOLID
;
return
uno
::
makeAny
(
aFillStyle
);
}
return
uno
::
makeAny
(
m_nColor
);
}
void
SAL_CALL
ColorPropertySet
::
addPropertyChangeListener
(
const
OUString
&
/* aPropertyName */
,
const
Reference
<
XPropertyChangeListener
>&
/* xListener */
)
throw
(
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
OSL_ENSURE
(
false
,
"Not Implemented"
);
return
;
}
void
SAL_CALL
ColorPropertySet
::
removePropertyChangeListener
(
const
OUString
&
/* aPropertyName */
,
const
Reference
<
XPropertyChangeListener
>&
/* aListener */
)
throw
(
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
OSL_ENSURE
(
false
,
"Not Implemented"
);
return
;
}
void
SAL_CALL
ColorPropertySet
::
addVetoableChangeListener
(
const
OUString
&
/* PropertyName */
,
const
Reference
<
XVetoableChangeListener
>&
/* aListener */
)
throw
(
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
OSL_ENSURE
(
false
,
"Not Implemented"
);
return
;
}
void
SAL_CALL
ColorPropertySet
::
removeVetoableChangeListener
(
const
OUString
&
/* PropertyName */
,
const
Reference
<
XVetoableChangeListener
>&
/* aListener */
)
throw
(
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
OSL_ENSURE
(
false
,
"Not Implemented"
);
return
;
}
// ____ XPropertyState ____
PropertyState
SAL_CALL
ColorPropertySet
::
getPropertyState
(
const
OUString
&
/* PropertyName */
)
throw
(
UnknownPropertyException
,
uno
::
RuntimeException
)
{
return
PropertyState_DIRECT_VALUE
;
}
Sequence
<
PropertyState
>
SAL_CALL
ColorPropertySet
::
getPropertyStates
(
const
Sequence
<
OUString
>&
/* aPropertyName */
)
throw
(
UnknownPropertyException
,
uno
::
RuntimeException
)
{
PropertyState
aState
=
PropertyState_DIRECT_VALUE
;
return
Sequence
<
PropertyState
>
(
&
aState
,
1
);
}
void
SAL_CALL
ColorPropertySet
::
setPropertyToDefault
(
const
OUString
&
PropertyName
)
throw
(
UnknownPropertyException
,
uno
::
RuntimeException
)
{
if
(
PropertyName
.
equals
(
m_aColorPropName
))
m_nColor
=
m_nDefaultColor
;
}
uno
::
Any
SAL_CALL
ColorPropertySet
::
getPropertyDefault
(
const
OUString
&
aPropertyName
)
throw
(
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
if
(
aPropertyName
.
equals
(
m_aColorPropName
))
return
uno
::
makeAny
(
m_nDefaultColor
);
return
uno
::
Any
();
}
}
// namespace chart
}
// namespace xmloff
oox/source/export/ColorPropertySet.hxx
0 → 100644
Dosyayı görüntüle @
a41687b6
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ColorPropertySet.hxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef XMLOFF_COLORPROPERTYSET_HXX
#define XMLOFF_COLORPROPERTYSET_HXX
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
namespace
oox
{
namespace
drawingml
{
class
ColorPropertySet
:
public
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
,
::
com
::
sun
::
star
::
beans
::
XPropertyState
>
{
public
:
// if bFillColor == false, the color is a LineColor
explicit
ColorPropertySet
(
sal_Int32
nColor
,
bool
bFillColor
=
true
);
virtual
~
ColorPropertySet
();
void
setColor
(
sal_Int32
nColor
);
sal_Int32
getColor
();
protected
:
// ____ XPropertySet ____
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
SAL_CALL
getPropertySetInfo
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
setPropertyValue
(
const
::
rtl
::
OUString
&
aPropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
aValue
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
beans
::
PropertyVetoException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
getPropertyValue
(
const
::
rtl
::
OUString
&
PropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
addPropertyChangeListener
(
const
::
rtl
::
OUString
&
aPropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertyChangeListener
>&
xListener
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
removePropertyChangeListener
(
const
::
rtl
::
OUString
&
aPropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertyChangeListener
>&
aListener
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
addVetoableChangeListener
(
const
::
rtl
::
OUString
&
PropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XVetoableChangeListener
>&
aListener
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
removeVetoableChangeListener
(
const
::
rtl
::
OUString
&
PropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XVetoableChangeListener
>&
aListener
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// ____ XPropertyState ____
virtual
::
com
::
sun
::
star
::
beans
::
PropertyState
SAL_CALL
getPropertyState
(
const
::
rtl
::
OUString
&
PropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyState
>
SAL_CALL
getPropertyStates
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>&
aPropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
setPropertyToDefault
(
const
::
rtl
::
OUString
&
PropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
getPropertyDefault
(
const
::
rtl
::
OUString
&
aPropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
private
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
m_xInfo
;
::
rtl
::
OUString
m_aColorPropName
;
sal_Int32
m_nColor
;
bool
m_bIsFillColor
;
sal_Int32
m_nDefaultColor
;
};
}
// namespace chart
}
// namespace xmloff
// XMLOFF_COLORPROPERTYSET_HXX
#endif
oox/source/export/SchXMLSeriesHelper.cxx
0 → 100644
Dosyayı görüntüle @
a41687b6
This diff is collapsed.
Click to expand it.
oox/source/export/SchXMLSeriesHelper.hxx
0 → 100644
Dosyayı görüntüle @
a41687b6
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: SchXMLSeriesHelper.hxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _XMLOFF_SCH_XML_SERIESHELPER_HXX
#define _XMLOFF_SCH_XML_SERIESHELPER_HXX
#include <com/sun/star/chart2/data/XDataSequence.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <com/sun/star/chart2/XDiagram.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <vector>
#include <map>
class
SchXMLSeriesHelper
{
public
:
static
::
std
::
vector
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>
>
getDataSeriesFromDiagram
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDiagram
>
&
xDiagram
);
static
::
std
::
map
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>
,
sal_Int32
>
getDataSeriesIndexMapFromDiagram
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDiagram
>
&
xDiagram
);
static
bool
isCandleStickSeries
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>&
xSeries
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>&
xChartModel
);
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>
getFirstCandleStickSeries
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDiagram
>
&
xDiagram
);
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
createOldAPISeriesPropertySet
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>&
xSeries
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>&
xChartModel
);
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
createOldAPIDataPointPropertySet
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XDataSeries
>&
xSeries
,
sal_Int32
nPointIndex
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>&
xChartModel
);
};
// _XMLOFF_SCH_XML_SERIESHELPER_HXX
#endif
oox/source/export/chartexport.cxx
0 → 100644
Dosyayı görüntüle @
a41687b6
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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