diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-11 16:42:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-11 20:21:52 +0000 |
commit | 604426cc41770a4af56e1fa8ac1337db34ef32cc (patch) | |
tree | 3e38d19f78b971d62be6cec9daa4bf1c7b4857c6 /sc | |
parent | 0b9aa86ec7896775f026ee1a117a014fa8c95581 (diff) |
convert change chart data source dialog to .ui
Change-Id: Iecccfbcd6b1eaec9d14c594812293c3e2acfda46
Diffstat (limited to 'sc')
-rw-r--r-- | sc/AllLangResTarget_sc.mk | 1 | ||||
-rw-r--r-- | sc/UIConfig_scalc.mk | 1 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 1 | ||||
-rw-r--r-- | sc/inc/scabstdlg.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/corodlg.hxx | 49 | ||||
-rw-r--r-- | sc/source/ui/src/miscdlgs.src | 68 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/changesourcedialog.ui | 149 |
10 files changed, 169 insertions, 120 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index 7625aeff8147..6d0c2a80d3a4 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -41,7 +41,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/src/sc.src \ sc/source/ui/src/hdrcont.src \ sc/source/ui/src/scerrors.src \ - sc/source/ui/src/miscdlgs.src \ sc/source/ui/src/scstring.src \ sc/source/ui/src/filter.src \ sc/source/ui/src/condformatdlg.src \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 28709b54f70c..f68519bd3e77 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -64,6 +64,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/allheaderfooterdialog \ sc/uiconfig/scalc/ui/analysisofvariancedialog \ sc/uiconfig/scalc/ui/cellprotectionpage \ + sc/uiconfig/scalc/ui/changesourcedialog \ sc/uiconfig/scalc/ui/chardialog \ sc/uiconfig/scalc/ui/colorrowdialog \ sc/uiconfig/scalc/ui/colwidthdialog \ diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index c0a35e0ecc4c..1c4a3708844b 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1043,7 +1043,6 @@ #define RID_SCDLG_CONTACTS (SC_DIALOGS_START + 78) #define RID_SCPAGE_STAT (SC_DIALOGS_START + 79) -#define RID_SCDLG_CHARTCOLROW (SC_DIALOGS_START + 80) #define RID_SCDLG_AREAS (SC_DIALOGS_START + 81) // popup for drop-mode in navigator diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 39fd50cc7b84..4df250c9c67f 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -338,7 +338,6 @@ public: ScDocument* pDoc, int nId) = 0; virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, - int nId, sal_Bool bCol = false, sal_Bool bRow = false) = 0; diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 381e8681de67..ba419fe5b62a 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -638,23 +638,11 @@ AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( W } AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent, - int nId, sal_Bool bCol , sal_Bool bRow) { - ScColRowLabelDlg* pDlg=NULL; - switch ( nId ) - { - case RID_SCDLG_CHARTCOLROW : - pDlg = new ScColRowLabelDlg( pParent, bCol,bRow ); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractScColRowLabelDlg_Impl( pDlg ); - return 0; + ScColRowLabelDlg* pDlg = new ScColRowLabelDlg( pParent, bCol,bRow ); + return new AbstractScColRowLabelDlg_Impl( pDlg ); } AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const OUString& rExtendText, const OUString& rCurrentText ) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 141fd5e04d20..c58bf4fc069d 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -407,7 +407,6 @@ public: ScDocument* pDoc, int nId); virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, - int nId, sal_Bool bCol = false, sal_Bool bRow = false); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 6cbd08b38822..b0d4d309f4ab 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -332,7 +332,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScColRowLabelDlg* pDlg = pFact->CreateScColRowLabelDlg( pParent, RID_SCDLG_CHARTCOLROW, bRowHeaders, bColHeaders); + AbstractScColRowLabelDlg* pDlg = pFact->CreateScColRowLabelDlg(pParent, bRowHeaders, bColHeaders); OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx index a59edfe85d76..2b9f812226e0 100644 --- a/sc/source/ui/inc/corodlg.hxx +++ b/sc/source/ui/inc/corodlg.hxx @@ -22,47 +22,30 @@ #include <vcl/dialog.hxx> #include <vcl/button.hxx> -#include <vcl/fixed.hxx> - -#include "sc.hrc" -#include "scresid.hxx" - -//------------------------------------------------------------------------ class ScColRowLabelDlg : public ModalDialog { public: - ScColRowLabelDlg( Window* pParent, - sal_Bool bCol = false, - sal_Bool bRow = false ) - : ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ), - aFlColRow ( this, ScResId(6) ), - aBtnRow ( this, ScResId(2) ), - aBtnCol ( this, ScResId(1) ), - aBtnOk ( this, ScResId(3) ), - aBtnCancel ( this, ScResId(4) ), - aBtnHelp ( this, ScResId(5) ) - { - FreeResource(); - aBtnCol.Check( bCol ); - aBtnRow.Check( bRow ); - } - - sal_Bool IsCol() { return aBtnCol.IsChecked(); } - sal_Bool IsRow() { return aBtnRow.IsChecked(); } + ScColRowLabelDlg(Window* pParent, + bool bCol = false, + bool bRow = false) + : ModalDialog(pParent, "ChangeSourceDialog", + "modules/scalc/ui/changesourcedialog.ui") + { + get(m_pBtnRow, "row"); + get(m_pBtnCol, "col"); + m_pBtnCol->Check(bCol); + m_pBtnRow->Check(bRow); + } + + bool IsCol() const { return m_pBtnCol->IsChecked(); } + bool IsRow() const { return m_pBtnRow->IsChecked(); } private: - FixedLine aFlColRow; - CheckBox aBtnRow; - CheckBox aBtnCol; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + CheckBox* m_pBtnRow; + CheckBox* m_pBtnCol; }; - #endif - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src deleted file mode 100644 index 20206df16b74..000000000000 --- a/sc/source/ui/src/miscdlgs.src +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- 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 "miscdlgs.hrc" - -ModalDialog RID_SCDLG_CHARTCOLROW -{ - HelpID = "sc:ModalDialog:RID_SCDLG_CHARTCOLROW"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 191 , 63 ) ; - Moveable = TRUE ; - CheckBox 1 - { - HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:1"; - Pos = MAP_APPFONT ( 12 , 28 ) ; - Size = MAP_APPFONT ( 114 , 10 ) ; - Text [ en-US ] = "First ~column as label" ; - }; - CheckBox 2 - { - HelpID = "sc:CheckBox:RID_SCDLG_CHARTCOLROW:2"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 114 , 10 ) ; - Text [ en-US ] = "First ~row as label" ; - }; - FixedLine 6 - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 123 , 8 ) ; - Text [ en-US ] = "Labels" ; - }; - OKButton 3 - { - Pos = MAP_APPFONT ( 135 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton 4 - { - Pos = MAP_APPFONT ( 135 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton 5 - { - Pos = MAP_APPFONT ( 135 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - Text [ en-US ] = "Change Source Data Range" ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/uiconfig/scalc/ui/changesourcedialog.ui b/sc/uiconfig/scalc/ui/changesourcedialog.ui new file mode 100644 index 000000000000..a6c370d7d02f --- /dev/null +++ b/sc/uiconfig/scalc/ui/changesourcedialog.ui @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="ChangeSourceDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Change Source Data Range</property> + <property name="type_hint">normal</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkCheckButton" id="col"> + <property name="label" translatable="yes">First _column as label</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="row"> + <property name="label" translatable="yes">First _row as label</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Labels</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> |