2010-10-12 15:59:00 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-05-22 16:39:03 +00:00
|
|
|
|
|
|
|
#include "res_BarGeometry.hxx"
|
2018-11-05 21:01:23 +00:00
|
|
|
#include <ResId.hxx>
|
|
|
|
#include <chart.hrc>
|
2007-05-22 16:39:03 +00:00
|
|
|
|
|
|
|
namespace chart
|
|
|
|
{
|
|
|
|
|
2018-10-15 11:14:02 +01:00
|
|
|
BarGeometryResources::BarGeometryResources(weld::Builder* pBuilder)
|
|
|
|
: m_xFT_Geometry(pBuilder->weld_label("shapeft"))
|
|
|
|
, m_xLB_Geometry(pBuilder->weld_tree_view("shape"))
|
2007-05-22 16:39:03 +00:00
|
|
|
{
|
2018-11-05 21:01:23 +00:00
|
|
|
for (size_t i = 0; i < SAL_N_ELEMENTS(CHART_TYPE); ++i)
|
|
|
|
m_xLB_Geometry->append_text(SchResId(CHART_TYPE[i]));
|
2018-10-15 11:14:02 +01:00
|
|
|
m_xLB_Geometry->set_size_request(-1, m_xLB_Geometry->get_height_rows(4));
|
2007-05-22 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
2018-10-15 11:14:02 +01:00
|
|
|
void BarGeometryResources::connect_changed(const Link<weld::TreeView&,void>& rLink)
|
2007-05-22 16:39:03 +00:00
|
|
|
{
|
2018-10-15 11:14:02 +01:00
|
|
|
m_xLB_Geometry->connect_changed(rLink);
|
2007-05-22 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
2018-10-15 11:14:02 +01:00
|
|
|
void BarGeometryResources::show( bool bShow )
|
2007-05-22 16:39:03 +00:00
|
|
|
{
|
2018-10-15 11:14:02 +01:00
|
|
|
m_xFT_Geometry->show( bShow );
|
|
|
|
m_xLB_Geometry->show( bShow );
|
2007-05-22 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
2018-10-15 11:14:02 +01:00
|
|
|
void BarGeometryResources::set_sensitive( bool bEnable )
|
2007-05-22 16:39:03 +00:00
|
|
|
{
|
2018-10-15 11:14:02 +01:00
|
|
|
m_xFT_Geometry->set_sensitive( bEnable );
|
|
|
|
m_xLB_Geometry->set_sensitive( bEnable );
|
2007-05-22 16:39:03 +00:00
|
|
|
}
|
2014-03-03 09:19:35 +00:00
|
|
|
|
2018-10-15 11:14:02 +01:00
|
|
|
sal_Int32 BarGeometryResources::get_selected_index() const
|
2007-05-22 16:39:03 +00:00
|
|
|
{
|
2018-10-15 11:14:02 +01:00
|
|
|
return m_xLB_Geometry->get_selected_index();
|
2007-05-22 16:39:03 +00:00
|
|
|
}
|
2014-03-03 09:19:35 +00:00
|
|
|
|
2018-10-15 11:14:02 +01:00
|
|
|
void BarGeometryResources::select(sal_Int32 nPos)
|
2007-05-22 16:39:03 +00:00
|
|
|
{
|
2018-10-15 11:14:02 +01:00
|
|
|
if (nPos < m_xLB_Geometry->n_children())
|
|
|
|
m_xLB_Geometry->select(nPos);
|
2007-05-22 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} //namespace chart
|
|
|
|
|
2010-10-12 15:59:00 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|