diff options
Diffstat (limited to 'chart2/source/view/inc/LegendEntryProvider.hxx')
-rw-r--r-- | chart2/source/view/inc/LegendEntryProvider.hxx | 57 |
1 files changed, 45 insertions, 12 deletions
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx index 14b6cda47870..1ecc78107d2b 100644 --- a/chart2/source/view/inc/LegendEntryProvider.hxx +++ b/chart2/source/view/inc/LegendEntryProvider.hxx @@ -27,22 +27,58 @@ #ifndef CHART2_VIEW_LEGENDENTRYPROVIDER_HXX #define CHART2_VIEW_LEGENDENTRYPROVIDER_HXX -#include <com/sun/star/chart2/LegendExpansion.hpp> - -#ifndef _COM_SUN_STAR_CHART2_VIEWLEGENDENTRYP_HPP_ -#include <com/sun/star/chart2/ViewLegendEntry.hpp> -#endif +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/chart/ChartLegendExpansion.hpp> +#include <com/sun/star/chart2/XFormattedString.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/drawing/XShapes.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <vector> + namespace chart { +enum LegendSymbolStyle +{ + /** A square box with border. + */ + LegendSymbolStyle_BOX, + + /** A line like with a symbol. + */ + LegendSymbolStyle_LINE, + + /** A bordered circle which has the same bounding-box as the + <member>BOX</member>. + */ + LegendSymbolStyle_CIRCLE +}; + +struct ViewLegendEntry +{ + /** The legend symbol that represents a data series or other + information contained in the legend + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::drawing::XShape > aSymbol; + + /** The descriptive text for a legend entry. + */ + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XFormattedString > > aLabel; +}; + class LegendEntryProvider { public: - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::chart2::ViewLegendEntry > SAL_CALL createLegendEntries( - ::com::sun::star::chart2::LegendExpansion eLegendExpansion, + virtual ::com::sun::star::awt::Size getPreferredLegendKeyAspectRatio()=0; + + virtual std::vector< ViewLegendEntry > createLegendEntries( + const ::com::sun::star::awt::Size& rEntryKeyAspectRatio, + ::com::sun::star::chart::ChartLegendExpansion eLegendExpansion, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTextProperties, const ::com::sun::star::uno::Reference< @@ -51,10 +87,7 @@ public: ::com::sun::star::lang::XMultiServiceFactory >& xShapeFactory, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext - ) - throw (::com::sun::star::uno::RuntimeException) = 0; - -private: + ) = 0; }; } // namespace chart |