Kaydet (Commit) 9c403292 authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Caolán McNamara

Convert chart data source tab page & dialog to .ui

Conflicts:
	chart2/source/controller/dialogs/dlg_DataSource.cxx
	chart2/source/controller/inc/dlg_DataSource.hxx

Change-Id: Ic3e3adc578156161f16254862e1ca33a8ad9e1f6
Reviewed-on: https://gerrit.libreoffice.org/7255Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 92bede39
......@@ -35,7 +35,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
chart2/source/controller/dialogs/Strings.src \
chart2/source/controller/dialogs/Strings_Statistic.src \
chart2/source/controller/dialogs/tp_ChartType.src \
chart2/source/controller/dialogs/tp_DataSource.src \
))
$(eval $(call gb_SrsTarget_add_nonlocalizable_files,chart2/res,\
......
......@@ -107,7 +107,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/dialogs/dlg_ShapeParagraph \
chart2/source/controller/dialogs/dlg_View3D \
chart2/source/controller/dialogs/ObjectNameProvider \
chart2/source/controller/dialogs/RangeEdit \
chart2/source/controller/dialogs/RangeSelectionButton \
chart2/source/controller/dialogs/RangeSelectionHelper \
chart2/source/controller/dialogs/RangeSelectionListener \
......
......@@ -50,6 +50,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/tp_axisLabel \
chart2/uiconfig/ui/tp_AxisPositions \
chart2/uiconfig/ui/tp_DataLabel \
chart2/uiconfig/ui/tp_DataSource \
chart2/uiconfig/ui/tp_ErrorBars \
chart2/uiconfig/ui/tp_LegendPosition \
chart2/uiconfig/ui/tp_PolarOptions \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#include "RangeEdit.hxx"
namespace chart
{
// class RangeEdit
RangeEdit::RangeEdit( Window* pParent, const ResId& rResId):
Edit( pParent , rResId )
{
EnableUpdateData( 1000 );
}
RangeEdit::~RangeEdit()
{
}
void RangeEdit::SetKeyInputHdl( const Link& rKeyInputLink )
{
m_aKeyInputLink = rKeyInputLink;
}
void RangeEdit::KeyInput( const KeyEvent& rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( !rKeyCode.GetModifier() && rKeyCode.GetCode() == KEY_F2 )
{
if ( m_aKeyInputLink.IsSet() )
{
m_aKeyInputLink.Call( NULL );
}
}
else
Edit::KeyInput( rKEvt );
}
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -44,8 +44,6 @@
#define TP_SCALE 903
#define TP_AXIS_POSITIONS 904
#define TP_CHARTTYPE 910
#define TP_RANGECHOOSER 911
#define TP_DATA_SOURCE 914
#define TP_3D_SCENEGEOMETRY 915
#define TP_3D_SCENEAPPEARANCE 916
......
......@@ -18,7 +18,6 @@
*/
#include "dlg_DataSource.hxx"
#include "dlg_DataSource.hrc"
#include "Strings.hrc"
#include "ResId.hxx"
#include "ChartTypeTemplateProvider.hxx"
......@@ -124,6 +123,12 @@ void DataSourceTabControl::EnableTabToggling()
sal_uInt16 DataSourceDialog::m_nLastPageId = 0;
enum DataSourceDialogPages
{
TP_RANGECHOOSER = 1,
TP_DATA_SOURCE = 2
};
DataSourceDialog::DataSourceDialog(Window * pParent,
const Reference< XChartDocument > & xChartDocument,
const Reference< uno::XComponentContext > & xContext)
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#include "ResourceIds.hrc"
#define TABCTRL 1
#define BTN_OK 1
#define BTN_CANCEL 2
#define BTN_HELP 3
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#include "ResourceIds.hrc"
#define FT_CAPTION_FOR_WIZARD 1
#define FT_SERIES 10
#define LB_SERIES 20
#define BTN_ADD 30
#define BTN_REMOVE 40
#define FT_ROLE 50
#define LB_ROLE 60
#define FT_RANGE 70
#define EDT_RANGE 80
#define IMB_RANGE_MAIN 90
#define FT_CATEGORIES 110
#define FT_DATALABELS 111
#define EDT_CATEGORIES 120
#define IMB_RANGE_CAT 130
#define BTN_UP 140
#define BTN_DOWN 150
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -46,8 +46,6 @@
#include <vector>
#include "RangeSelectionListener.hxx"
#include "RangeSelectionButton.hxx"
#include "RangeEdit.hxx"
namespace chart
{
......@@ -126,26 +124,26 @@ protected:
void fillRoleListBox();
private:
FixedText m_aFT_CAPTION;
FixedText m_aFT_SERIES;
boost::scoped_ptr< SvTreeListBox > m_apLB_SERIES;
PushButton m_aBTN_ADD;
PushButton m_aBTN_REMOVE;
PushButton m_aBTN_UP;
PushButton m_aBTN_DOWN;
FixedText m_aFT_ROLE;
SvTabListBox m_aLB_ROLE;
FixedText m_aFT_RANGE;
RangeEdit m_aEDT_RANGE;
RangeSelectionButton m_aIMB_RANGE_MAIN;
FixedText m_aFT_CATEGORIES;
FixedText m_aFT_DATALABELS;//used for xy charts
RangeEdit m_aEDT_CATEGORIES;
RangeSelectionButton m_aIMB_RANGE_CAT;
OUString m_aFixedTextRange;
FixedText* m_pFT_CAPTION;
FixedText* m_pFT_SERIES;
SvTreeListBox* m_pLB_SERIES;
PushButton* m_pBTN_ADD;
PushButton* m_pBTN_REMOVE;
PushButton* m_pBTN_UP;
PushButton* m_pBTN_DOWN;
FixedText* m_pFT_ROLE;
SvTabListBox* m_pLB_ROLE;
FixedText* m_pFT_RANGE;
Edit* m_pEDT_RANGE;
PushButton* m_pIMB_RANGE_MAIN;
FixedText* m_pFT_CATEGORIES;
FixedText* m_pFT_DATALABELS;//used for xy charts
Edit* m_pEDT_CATEGORIES;
PushButton* m_pIMB_RANGE_CAT;
OUString m_aFixedTextRange;
ChartTypeTemplateProvider * m_pTemplateProvider;
DialogModel & m_rDialogModel;
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#include "tp_DataSource.hrc"
#include "HelpIds.hrc"
TabPage TP_DATA_SOURCE
{
HelpID = "chart2:TabPage:TP_DATA_SOURCE";
Hide = TRUE;
Size = MAP_APPFONT ( 248, 140 );
SVLook = TRUE ;
// ----------------------------------------
FixedText FT_CAPTION_FOR_WIZARD
{
Pos = MAP_APPFONT ( 5 , 8 ) ;
Size = MAP_APPFONT ( 238 , 10 ) ;
Text [ en-US ] = "Customize data ranges for individual data series" ;
};
FixedText FT_SERIES
{
Pos = MAP_APPFONT ( 6 , 22 );
Size = MAP_APPFONT ( 72 , 8 );
Text [ en-US ] = "Data ~series";
};
Control LB_SERIES
{
HelpID = HID_SCH_SERIES_LIST ;
Border = TRUE;
TabStop = TRUE;
// DropDown = FALSE;
Pos = MAP_APPFONT ( 6 , 32 );
Size = MAP_APPFONT ( 72 , 69 );
};
FixedText FT_ROLE
{
Pos = MAP_APPFONT ( 82 , 22 );
Size = MAP_APPFONT ( 160 , 8 );
Text [ en-US ] = "~Data ranges";
};
Control LB_ROLE
{
HelpID = HID_SCH_DATA_RANGES_LIST ;
Border = TRUE;
TabStop = TRUE;
Pos = MAP_APPFONT ( 82 , 32 );
Size = MAP_APPFONT ( 160 , 43 );
};
// ----------------------------------------
FixedText FT_RANGE
{
Pos = MAP_APPFONT ( 82 , 79 );
Size = MAP_APPFONT ( 160 , 8 );
Text [ en-US ] = "Ran~ge for %VALUETYPE";
};
Edit EDT_RANGE
{
HelpID = "chart2:Edit:TP_DATA_SOURCE:EDT_RANGE";
Border = TRUE;
TabStop = TRUE;
Pos = MAP_APPFONT ( 82 , 89 );
Size = MAP_APPFONT ( 144 , 12 );
};
ImageButton IMB_RANGE_MAIN
{
HelpID = "chart2:ImageButton:TP_DATA_SOURCE:IMB_RANGE_MAIN";
TabStop = TRUE;
Pos = MAP_APPFONT ( 228 , 88 );
Size = MAP_APPFONT ( 14 , 14 );
};
// ----------------------------------------
FixedText FT_CATEGORIES
{
Pos = MAP_APPFONT ( 82 , 107 );
Size = MAP_APPFONT ( 160 , 8 );
Text [ en-US ] = "~Categories";
};
FixedText FT_DATALABELS
{
Pos = MAP_APPFONT ( 82 , 107 );
Size = MAP_APPFONT ( 160 , 8 );
Text [ en-US ] = "Data ~labels" ;
};
Edit EDT_CATEGORIES
{
HelpID = "chart2:Edit:TP_DATA_SOURCE:EDT_CATEGORIES";
Border = TRUE;
TabStop = TRUE;
Pos = MAP_APPFONT ( 82 , 117 );
Size = MAP_APPFONT ( 144 , 12 );
};
ImageButton IMB_RANGE_CAT
{
HelpID = "chart2:ImageButton:TP_DATA_SOURCE:IMB_RANGE_CAT";
TabStop = TRUE;
Pos = MAP_APPFONT ( 228 , 116 );
Size = MAP_APPFONT ( 14 , 14 );
};
// ----------------------------------------
PushButton BTN_ADD
{
HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_ADD";
TabStop = TRUE;
Disable = FALSE;
Pos = MAP_APPFONT ( 6 , 105 );
Size = MAP_APPFONT ( 54 , 14 );
Text [ en-US ] = "~Add";
};
PushButton BTN_REMOVE
{
HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_REMOVE";
TabStop = TRUE;
Disable = TRUE;
Pos = MAP_APPFONT ( 6 , 121 );
Size = MAP_APPFONT ( 54 , 14 );
Text [ en-US ] = "~Remove";
};
// Note: Text is only a black triangle symbol
PushButton BTN_UP
{
HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_UP";
TabStop = TRUE;
Disable = TRUE;
Pos = MAP_APPFONT ( 64 , 105 );
Size = MAP_APPFONT ( 14 , 14 );
};
// Note: Text is only a black triangle symbol
PushButton BTN_DOWN
{
HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_DOWN";
TabStop = TRUE;
Disable = TRUE;
Pos = MAP_APPFONT ( 64 , 121 );
Size = MAP_APPFONT ( 14 , 14 );
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <vcl/layout.hxx>
#include "tp_DataSourceControls.hxx"
using namespace ::com::sun::star;
......@@ -30,12 +31,18 @@ namespace chart
SeriesEntry::~SeriesEntry()
{}
SeriesListBox::SeriesListBox( Window* pParent, const ResId & rResId ) :
SvTreeListBox( pParent, rResId )
SeriesListBox::SeriesListBox(Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
{}
SeriesListBox::~SeriesListBox()
{}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSeriesListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = 0;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
return new SeriesListBox(pParent, nWinStyle);
}
SvTreeListEntry* SeriesListBox::CreateEntry() const
{
......
......@@ -38,21 +38,16 @@ public:
virtual ~SeriesEntry();
/// the corresponding data series
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XDataSeries >
m_xDataSeries;
::com::sun::star::uno::Reference<::com::sun::star::chart2::XDataSeries > m_xDataSeries;
/// the chart type that contains the series (via XDataSeriesContainer)
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartType >
m_xChartType;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > m_xChartType;
};
class SeriesListBox : public ::SvTreeListBox
{
public:
explicit SeriesListBox( Window* pParent, const ResId & rResId );
~SeriesListBox( );
explicit SeriesListBox(Window* pParent, WinBits nStyle);
virtual SvTreeListEntry* CreateEntry() const;
};
......
......@@ -23,7 +23,6 @@
#include "RangeSelectionListener.hxx"
#include "RangeSelectionButton.hxx"
#include "TabPageNotifiable.hxx"
#include "RangeEdit.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/data/XDataProvider.hpp>
......
......@@ -26,8 +26,6 @@
#define HID_SCH_CTL_TYPE "CHART2_HID_SCH_CTL_TYPE"
#define HID_SCH_CTL_VARIANT "CHART2_HID_SCH_CTL_VARIANT"
#define HID_SCH_NUM_OF_LINES "CHART2_HID_SCH_NUM_OF_LINES"
#define HID_SCH_SERIES_LIST "CHART2_HID_SCH_SERIES_LIST"
#define HID_SCH_DATA_RANGES_LIST "CHART2_HID_SCH_DATA_RANGES_LIST"
//
#define HID_SCH_TBI_DATA_INSERT_ROW "CHART2_HID_SCH_TBI_DATA_INSERT_ROW"
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGEEDIT_HXX
#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RANGEEDIT_HXX
#include <vcl/edit.hxx>
#include <vcl/accel.hxx>
#include <tools/link.hxx>
namespace chart
{
class RangeEdit : public Edit
{
public:
explicit RangeEdit( Window* pParent, const ResId& rResId);
virtual ~RangeEdit();
// KeyInput method
void SetKeyInputHdl( const Link& rKeyInputLink );
virtual void KeyInput( const KeyEvent& rKEvt );
private:
Link m_aKeyInputLink;
};
} //namespace chart
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,6 +26,7 @@
// header for class OKButton
#include <vcl/button.hxx>
#include "TabPageNotifiable.hxx"
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Fri Jan 10 20:18:05 2014 -->
<!-- Generated with glade 3.16.0 on Fri Jan 17 15:55:31 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="DataRangeDialog">
......@@ -69,17 +69,7 @@
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
<placeholder/>
</child>
</object>
</child>
......
This diff is collapsed.
......@@ -426,6 +426,9 @@
</properties>
</glade-widget-class>
<glade-widget-class title="Chart Series ListBox" name="chartcontrollerlo-SeriesListBox"
generic-name="Chart Series ListBox" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="DD ListBox" name="swuilo-DDListBox"
generic-name="DD ListBox" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment