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 #include -#include - -#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 ); - } + 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); + } - sal_Bool IsCol() { return aBtnCol.IsChecked(); } - sal_Bool IsRow() { return aBtnRow.IsChecked(); } + 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 @@ + + + + + + False + 6 + Change Source Data Range + normal + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + 6 + + + First _column as label + True + True + False + True + 0 + True + + + 0 + 0 + 1 + 1 + + + + + First _row as label + True + True + False + True + 0 + True + + + 0 + 1 + 1 + 1 + + + + + + + + + True + False + Labels + + + + + + + + False + True + 1 + + + + + + help + + +