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

Convert chart data labels tabpage to .ui

Change-Id: I6ffd992fe8a2cb290c8f8992922f0e54276e6ae1
Reviewed-on: https://gerrit.libreoffice.org/7124Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6c5c79e2
...@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\ ...@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
chart2/source/controller/dialogs/Strings_Statistic.src \ chart2/source/controller/dialogs/Strings_Statistic.src \
chart2/source/controller/dialogs/tp_AxisLabel.src \ chart2/source/controller/dialogs/tp_AxisLabel.src \
chart2/source/controller/dialogs/tp_ChartType.src \ chart2/source/controller/dialogs/tp_ChartType.src \
chart2/source/controller/dialogs/tp_DataLabel.src \
chart2/source/controller/dialogs/tp_DataSource.src \ chart2/source/controller/dialogs/tp_DataSource.src \
chart2/source/controller/dialogs/tp_ErrorBars.src \ chart2/source/controller/dialogs/tp_ErrorBars.src \
chart2/source/controller/dialogs/tp_PointGeometry.src \ chart2/source/controller/dialogs/tp_PointGeometry.src \
......
...@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ ...@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/tp_3D_SceneIllumination \ chart2/uiconfig/ui/tp_3D_SceneIllumination \
chart2/uiconfig/ui/tp_axisLabel \ chart2/uiconfig/ui/tp_axisLabel \
chart2/uiconfig/ui/tp_AxisPositions \ chart2/uiconfig/ui/tp_AxisPositions \
chart2/uiconfig/ui/tp_DataLabel \
chart2/uiconfig/ui/tp_LegendPosition \ chart2/uiconfig/ui/tp_LegendPosition \
chart2/uiconfig/ui/tp_SeriesToAxis \ chart2/uiconfig/ui/tp_SeriesToAxis \
chart2/uiconfig/ui/tp_Scale \ chart2/uiconfig/ui/tp_Scale \
......
...@@ -31,7 +31,7 @@ DataLabelsDialog::DataLabelsDialog(Window* pWindow, const SfxItemSet& rInAttrs, ...@@ -31,7 +31,7 @@ DataLabelsDialog::DataLabelsDialog(Window* pWindow, const SfxItemSet& rInAttrs,
m_aBtnOK(this, SchResId(BTN_OK)), m_aBtnOK(this, SchResId(BTN_OK)),
m_aBtnCancel(this, SchResId(BTN_CANCEL)), m_aBtnCancel(this, SchResId(BTN_CANCEL)),
m_aBtnHelp(this, SchResId(BTN_HELP)), m_aBtnHelp(this, SchResId(BTN_HELP)),
m_apDataLabelResources( new DataLabelResources(this,rInAttrs) ), m_apDataLabelResources( new oldDataLabelResources(this,rInAttrs) ),
m_rInAttrs(rInAttrs) m_rInAttrs(rInAttrs)
{ {
FreeResource(); FreeResource();
......
...@@ -19,15 +19,19 @@ ...@@ -19,15 +19,19 @@
#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_DATALABEL_HXX #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_DATALABEL_HXX
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_DATALABEL_HXX #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_DATALABEL_HXX
#define NUMBER_SEPARATORS 4
#include "res_TextSeparator.hxx" #include "res_TextSeparator.hxx"
// header for class CheckBox // header for class CheckBox
#include <vcl/button.hxx> #include <vcl/button.hxx>
#include <vcl/layout.hxx>
// header for class SfxItemSet // header for class SfxItemSet
#include <svl/itemset.hxx> #include <svl/itemset.hxx>
#include "TextDirectionListBox.hxx" #include "TextDirectionListBox.hxx"
#include <svx/dialcontrol.hxx> #include <svx/dialcontrol.hxx>
#include <svx/wrapfield.hxx> #include <svx/wrapfield.hxx>
#include <sfx2/tabdlg.hxx>
class SvNumberFormatter; class SvNumberFormatter;
...@@ -37,7 +41,7 @@ namespace chart ...@@ -37,7 +41,7 @@ namespace chart
class DataLabelResources class DataLabelResources
{ {
public: public:
DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs ); DataLabelResources( SfxTabPage* pParent, const SfxItemSet& rInAttrs );
virtual ~DataLabelResources(); virtual ~DataLabelResources();
sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const; sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const;
...@@ -45,6 +49,64 @@ public: ...@@ -45,6 +49,64 @@ public:
void SetNumberFormatter( SvNumberFormatter* pFormatter ); void SetNumberFormatter( SvNumberFormatter* pFormatter );
private:
CheckBox* m_pCBNumber;
PushButton* m_pPB_NumberFormatForValue;
CheckBox* m_pCBPercent;
PushButton* m_pPB_NumberFormatForPercent;
CheckBox* m_pCBCategory;
CheckBox* m_pCBSymbol;
// TextSeparatorResources m_aSeparatorResources;
VclHBox* m_pSeparatorResources;
ListBox* m_pLB_Separator;
OUString m_aEntryMap[NUMBER_SEPARATORS];
VclHBox* m_pBxLabelPlacement;
ListBox* m_pLB_LabelPlacement;
VclHBox* m_pBxOrientation;
svx::DialControl* m_pDC_Dial;
FixedText* m_pFT_Dial;
svx::WrapField* m_pNF_Degrees;
VclHBox* m_pBxTextDirection;
TextDirectionListBox* m_pLB_TextDirection;
::std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap;
::std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap;
SvNumberFormatter* m_pNumberFormatter;
bool m_bNumberFormatMixedState;
bool m_bPercentFormatMixedState;
sal_uLong m_nNumberFormatForValue;
sal_uLong m_nNumberFormatForPercent;
bool m_bSourceFormatMixedState;
bool m_bPercentSourceMixedState;
bool m_bSourceFormatForValue;
bool m_bSourceFormatForPercent;
SfxTabPage* m_pWindow;
SfxItemPool* m_pPool;
DECL_LINK(NumberFormatDialogHdl, PushButton * );
DECL_LINK(CheckHdl, CheckBox* );
void EnableControls();
};
class oldDataLabelResources
{
public:
oldDataLabelResources( Window* pParent, const SfxItemSet& rInAttrs );
virtual ~oldDataLabelResources();
sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const;
void Reset(const SfxItemSet& rInAttrs);
void SetNumberFormatter( SvNumberFormatter* pFormatter );
private: private:
CheckBox m_aCBNumber; CheckBox m_aCBNumber;
PushButton m_aPB_NumberFormatForValue; PushButton m_aPB_NumberFormatForValue;
...@@ -87,7 +149,6 @@ private: ...@@ -87,7 +149,6 @@ private:
DECL_LINK(CheckHdl, CheckBox* ); DECL_LINK(CheckHdl, CheckBox* );
void EnableControls(); void EnableControls();
}; };
} //namespace chart } //namespace chart
#endif #endif
......
...@@ -26,18 +26,19 @@ namespace chart ...@@ -26,18 +26,19 @@ namespace chart
{ {
DataLabelsTabPage::DataLabelsTabPage(Window* pWindow, const SfxItemSet& rInAttrs) : DataLabelsTabPage::DataLabelsTabPage(Window* pWindow, const SfxItemSet& rInAttrs) :
SfxTabPage(pWindow, SchResId(TP_DATA_DESCR), rInAttrs), SfxTabPage(pWindow
m_aDataLabelResources(this, rInAttrs) , "tp_DataLabel"
, "modules/schart/ui/tp_DataLabel.ui"
, rInAttrs)
, m_aDataLabelResources(this, rInAttrs)
{ {
FreeResource();
} }
DataLabelsTabPage::~DataLabelsTabPage() DataLabelsTabPage::~DataLabelsTabPage()
{ {
} }
SfxTabPage* DataLabelsTabPage::Create(Window* pWindow, SfxTabPage* DataLabelsTabPage::Create(Window* pWindow, const SfxItemSet& rOutAttrs)
const SfxItemSet& rOutAttrs)
{ {
return new DataLabelsTabPage(pWindow, rOutAttrs); return new DataLabelsTabPage(pWindow, rOutAttrs);
} }
......
/* -*- 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 "HelpIds.hrc"
#include "TabPages.hrc"
#include "res_DataLabel.hrc"
TabPage TP_DATA_DESCR
{
Hide = TRUE ;
HelpID = HID_SCH_DATA_DESCR ;
SVLook = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
RESOURCE_DATALABEL( 6, 8 )
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#ifndef CHART_HELPIDS_HRC #ifndef CHART_HELPIDS_HRC
#define CHART_HELPIDS_HRC #define CHART_HELPIDS_HRC
#define HID_SCH_DATA_DESCR "CHART2_HID_SCH_DATA_DESCR"
#define HID_SCH_WIN_DOCUMENT "CHART2_HID_SCH_WIN_DOCUMENT" #define HID_SCH_WIN_DOCUMENT "CHART2_HID_SCH_WIN_DOCUMENT"
#define HID_SCH_CTL_DATA "CHART2_HID_SCH_CTL_DATA" #define HID_SCH_CTL_DATA "CHART2_HID_SCH_CTL_DATA"
......
...@@ -33,14 +33,14 @@ class SvNumberFormatter; ...@@ -33,14 +33,14 @@ class SvNumberFormatter;
namespace chart namespace chart
{ {
class DataLabelResources; class oldDataLabelResources;
class DataLabelsDialog : public ModalDialog class DataLabelsDialog : public ModalDialog
{ {
private: private:
OKButton m_aBtnOK; OKButton m_aBtnOK;
CancelButton m_aBtnCancel; CancelButton m_aBtnCancel;
HelpButton m_aBtnHelp; HelpButton m_aBtnHelp;
::std::auto_ptr< DataLabelResources > m_apDataLabelResources; ::std::auto_ptr< oldDataLabelResources > m_apDataLabelResources;
const SfxItemSet& m_rInAttrs; const SfxItemSet& m_rInAttrs;
......
This diff is collapsed.
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