LibreOffice Module chart2 (master) 1
VLegend.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <Legend.hxx>
22
23#include <com/sun/star/uno/Reference.hxx>
24#include <rtl/ref.hxx>
25#include <svx/unoshape.hxx>
26#include <vector>
27
28namespace chart { class ChartModel; }
29namespace com::sun::star::awt { struct Rectangle; }
30namespace com::sun::star::awt { struct Size; }
31namespace com::sun::star::chart2 { class XLegend; }
32namespace com::sun::star::drawing { class XShape; }
33namespace com::sun::star::drawing { class XShapes; }
34namespace com::sun::star::lang { class XMultiServiceFactory; }
35namespace com::sun::star::uno { class XComponentContext; }
36
37namespace chart
38{
39
40class Legend;
41class LegendEntryProvider;
42
44{
45public:
47 const css::uno::Reference< css::uno::XComponentContext > & xContext,
48 std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
50 ChartModel& rModel );
51
52 void setDefaultWritingMode( sal_Int16 nDefaultWritingMode );
53
54 void createShapes( const css::awt::Size & rAvailableSpace,
55 const css::awt::Size & rPageSize,
56 css::awt::Size & rDefaultLegendSize );
57
67 void changePosition(
68 css::awt::Rectangle & rOutAvailableSpace,
69 const css::awt::Size & rReferenceSize,
70 const css::awt::Size & rDefaultLegendSize );
71
72 static bool isVisible(
73 const rtl::Reference< ::chart::Legend > & xLegend );
74
75private:
79
80 ChartModel& mrModel;
81
82 css::uno::Reference< css::uno::XComponentContext > m_xContext;
83
84 std::vector< LegendEntryProvider* > m_aLegendEntryProviderList;
85
86 sal_Int16 m_nDefaultWritingMode;//to be used when writing mode is set to page
87};
88
89} //namespace chart
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void setDefaultWritingMode(sal_Int16 nDefaultWritingMode)
Definition: VLegend.cxx:898
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: VLegend.hxx:82
rtl::Reference<::chart::Legend > m_xLegend
Definition: VLegend.hxx:77
void createShapes(const css::awt::Size &rAvailableSpace, const css::awt::Size &rPageSize, css::awt::Size &rDefaultLegendSize)
Definition: VLegend.cxx:921
std::vector< LegendEntryProvider * > m_aLegendEntryProviderList
Definition: VLegend.hxx:84
VLegend(rtl::Reference< ::chart::Legend > xLegend, const css::uno::Reference< css::uno::XComponentContext > &xContext, std::vector< LegendEntryProvider * > &&rLegendEntryProviderList, rtl::Reference< SvxShapeGroupAnyD > xTargetPage, ChartModel &rModel)
Definition: VLegend.cxx:883
ChartModel & mrModel
Definition: VLegend.hxx:80
sal_Int16 m_nDefaultWritingMode
Definition: VLegend.hxx:86
rtl::Reference< SvxShapeGroup > m_xShape
Definition: VLegend.hxx:78
static bool isVisible(const rtl::Reference< ::chart::Legend > &xLegend)
Definition: VLegend.cxx:903
rtl::Reference< SvxShapeGroupAnyD > m_xTarget
Definition: VLegend.hxx:76
void changePosition(css::awt::Rectangle &rOutAvailableSpace, const css::awt::Size &rReferenceSize, const css::awt::Size &rDefaultLegendSize)
Sets the position according to its internal anchor.
Definition: VLegend.cxx:1053