summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/inc/LegendHelper.hxx42
1 files changed, 17 insertions, 25 deletions
diff --git a/chart2/source/inc/LegendHelper.hxx b/chart2/source/inc/LegendHelper.hxx
index 7bba1a1bff8e..634eae92033c 100644
--- a/chart2/source/inc/LegendHelper.hxx
+++ b/chart2/source/inc/LegendHelper.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: LegendHelper.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 00:41:51 $
+ * last change: $Author: vg $ $Date: 2007-05-22 18:18:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -40,9 +40,6 @@
#include <rtl/ustring.hxx>
#endif
-#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
-#include <com/sun/star/frame/XModel.hpp>
-#endif
#ifndef _COM_SUN_STAR_CHART2_XLEGEND_HPP_
#include <com/sun/star/chart2/XLegend.hpp>
#endif
@@ -50,6 +47,13 @@
#include <com/sun/star/chart2/XDiagram.hpp>
#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include <com/sun/star/uno/XComponentContext.hpp>
+#endif
+
//.............................................................................
namespace chart
{
@@ -62,31 +66,19 @@ namespace chart
class LegendHelper
{
public:
- static rtl::OUString getIdentifierForLegend();
-
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XLegend >
getLegend( const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XModel >& xModel );
-
- /** fills the legend given with XChartTypeGroup elements as XLegendEntry
- objects.
-
- Note: In, e.g., a standard bar chart the legend contains only one entry,
- which is the chart type group. To display all series in the legend, you
- have to get all XDataSeries in the tree starting at the chart type group
- */
- static void defaultFillEmptyLegend(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XLegend > & xLegend,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > & xDiagram );
+ ::com::sun::star::frame::XModel >& xModel
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& xContext = 0
+ , bool bCreate = false );
- /** removes all legend entries
+ /** returns <FALSE/>, if either there is no legend at the diagram, or there
+ is a legend which has a "Show" property of value <FALSE/>. Otherwise,
+ <TRUE/> is returned.
*/
- static void flushLegend(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XLegend > & xLegend );
+ static bool hasLegend( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > & xDiagram );
};
//.............................................................................