LibreOffice Module chart2 (master) 1
tp_DataPointOption.cxx
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
21
23#include <svl/eitem.hxx>
24
25namespace chart
26{
28 weld::DialogController* pController,
29 const SfxItemSet& rInAttrs)
30 : SfxTabPage(pPage, pController, "modules/schart/ui/tp_DataPointOption.ui",
31 "tp_DataPointOption", &rInAttrs)
32 , m_xCBHideLegendEntry(m_xBuilder->weld_check_button("CB_LEGEND_ENTRY_HIDDEN"))
33{
34}
35
37
38std::unique_ptr<SfxTabPage> DataPointOptionTabPage::Create(weld::Container* pPage,
39 weld::DialogController* pController,
40 const SfxItemSet* rOutAttrs)
41{
42 return std::make_unique<DataPointOptionTabPage>(pPage, pController, *rOutAttrs);
43}
44
46{
47 if (m_xCBHideLegendEntry->get_visible())
48 rOutAttrs->Put(
50
51 return true;
52}
53
55{
56 if (const SfxBoolItem* pEntryItem
58 {
59 bool bVal = pEntryItem->GetValue();
60 m_xCBHideLegendEntry->set_active(bVal);
61 }
62}
63
64} //namespace chart
65
66/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr TypedWhichId< SfxBoolItem > SCHATTR_HIDE_DATA_POINT_LEGEND_ENTRY(SCHATTR_AXIS_END+5)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
std::unique_ptr< weld::CheckButton > m_xCBHideLegendEntry
virtual bool FillItemSet(SfxItemSet *rOutAttrs) override
virtual void Reset(const SfxItemSet *rInAttrs) override
virtual ~DataPointOptionTabPage() override
DataPointOptionTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)