From 5cb5c24cc6087e8fc692b5c45248a574801bc2c3 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Wed, 13 Aug 2014 17:31:57 +0200 Subject: RID_SCDLG_DAPISERVICE conversion to .ui Change-Id: I4194af3033f6591c7a8ca219aebf2ef816edcd63 Reviewed-on: https://gerrit.libreoffice.org/10915 Reviewed-by: David Tardon Tested-by: David Tardon --- sc/AllLangResTarget_sc.mk | 1 - sc/UIConfig_scalc.mk | 1 + sc/source/ui/dbgui/dapidata.cxx | 1 - sc/source/ui/dbgui/dapitype.cxx | 40 ++--- sc/source/ui/dbgui/dapitype.hrc | 36 ---- sc/source/ui/dbgui/dapitype.src | 131 -------------- sc/source/ui/inc/dapitype.hxx | 19 +- sc/uiconfig/scalc/ui/dapiservicedialog.ui | 280 ++++++++++++++++++++++++++++++ 8 files changed, 300 insertions(+), 209 deletions(-) delete mode 100644 sc/source/ui/dbgui/dapitype.hrc delete mode 100644 sc/source/ui/dbgui/dapitype.src create mode 100644 sc/uiconfig/scalc/ui/dapiservicedialog.ui (limited to 'sc') diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index 4f8a080d66dc..d41a13fbee6d 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -47,7 +47,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/navipi/navipi.src \ sc/source/ui/styleui/scstyles.src \ sc/source/ui/dbgui/pvfundlg.src \ - sc/source/ui/dbgui/dapitype.src \ sc/source/ui/drawfunc/drformsh.src \ sc/source/ui/drawfunc/objdraw.src \ sc/source/ui/miscdlgs/retypepassdlg.src \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 0833dc1518c8..1dc9bc4ade57 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -76,6 +76,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/correlationdialog \ sc/uiconfig/scalc/ui/covariancedialog \ sc/uiconfig/scalc/ui/createnamesdialog \ + sc/uiconfig/scalc/ui/dapiservicedialog \ sc/uiconfig/scalc/ui/databaroptions \ sc/uiconfig/scalc/ui/datafielddialog \ sc/uiconfig/scalc/ui/datafieldoptionsdialog \ diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx index a8e4765c49f1..95ca794d69ff 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -35,7 +35,6 @@ using namespace com::sun::star; #include "dapidata.hxx" #include "scresid.hxx" #include "sc.hrc" -#include "dapitype.hrc" #include "miscuno.hxx" #include "dpsdbtab.hxx" diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx index 29c418d0cb30..4d50ebd96bf6 100644 --- a/sc/source/ui/dbgui/dapitype.cxx +++ b/sc/source/ui/dbgui/dapitype.cxx @@ -22,7 +22,6 @@ #include "dapitype.hxx" #include "scresid.hxx" #include "sc.hrc" -#include "dapitype.hrc" using namespace com::sun::star; @@ -96,33 +95,22 @@ IMPL_LINK( ScDataPilotSourceTypeDlg, RadioClickHdl, RadioButton*, pBtn ) ScDataPilotServiceDlg::ScDataPilotServiceDlg( Window* pParent, const uno::Sequence& rServices ) : - ModalDialog ( pParent, ScResId( RID_SCDLG_DAPISERVICE ) ), - - aFlFrame ( this, ScResId( FL_FRAME ) ), - aFtService ( this, ScResId( FT_SERVICE ) ), - aLbService ( this, ScResId( LB_SERVICE ) ), - aFtSource ( this, ScResId( FT_SOURCE ) ), - aEdSource ( this, ScResId( ED_SOURCE ) ), - aFtName ( this, ScResId( FT_NAME ) ), - aEdName ( this, ScResId( ED_NAME ) ), - aFtUser ( this, ScResId( FT_USER ) ), - aEdUser ( this, ScResId( ED_USER ) ), - aFtPasswd ( this, ScResId( FT_PASSWD ) ), - aEdPasswd ( this, ScResId( ED_PASSWD ) ), - aBtnOk ( this, ScResId( BTN_OK ) ), - aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ) + ModalDialog ( pParent, "DapiserviceDialog", "modules/scalc/ui/dapiservicedialog.ui" ) { + get(m_pLbService, "service"); + get(m_pEdSource, "source"); + get(m_pEdName, "name"); + get(m_pEdUser, "user"); + get(m_pEdPasswd, "password"); + long nCount = rServices.getLength(); const OUString* pArray = rServices.getConstArray(); for (long i=0; iInsertEntry( aName ); } - aLbService.SelectEntryPos( 0 ); - - FreeResource(); + m_pLbService->SelectEntryPos( 0 ); } ScDataPilotServiceDlg::~ScDataPilotServiceDlg() @@ -131,27 +119,27 @@ ScDataPilotServiceDlg::~ScDataPilotServiceDlg() OUString ScDataPilotServiceDlg::GetServiceName() const { - return aLbService.GetSelectEntry(); + return m_pLbService->GetSelectEntry(); } OUString ScDataPilotServiceDlg::GetParSource() const { - return aEdSource.GetText(); + return m_pEdSource->GetText(); } OUString ScDataPilotServiceDlg::GetParName() const { - return aEdName.GetText(); + return m_pEdName->GetText(); } OUString ScDataPilotServiceDlg::GetParUser() const { - return aEdUser.GetText(); + return m_pEdUser->GetText(); } OUString ScDataPilotServiceDlg::GetParPass() const { - return aEdPasswd.GetText(); + return m_pEdPasswd->GetText(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/dapitype.hrc b/sc/source/ui/dbgui/dapitype.hrc deleted file mode 100644 index 424a222ae177..000000000000 --- a/sc/source/ui/dbgui/dapitype.hrc +++ /dev/null @@ -1,36 +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 . - */ - -#define BTN_OK 1 -#define BTN_CANCEL 2 -#define BTN_HELP 3 - -#define FL_FRAME 8 -#define FT_SERVICE 9 -#define LB_SERVICE 10 -#define FT_SOURCE 11 -#define ED_SOURCE 12 -#define FT_NAME 13 -#define ED_NAME 14 -#define FT_USER 15 -#define ED_USER 16 -#define FT_PASSWD 17 -#define ED_PASSWD 18 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/dapitype.src b/sc/source/ui/dbgui/dapitype.src deleted file mode 100644 index 316093533d62..000000000000 --- a/sc/source/ui/dbgui/dapitype.src +++ /dev/null @@ -1,131 +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 "sc.hrc" -#include "dapitype.hrc" - -ModalDialog RID_SCDLG_DAPISERVICE -{ - OutputSize = TRUE ; - HelpId = HID_DATAPILOT_SERVICE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 241 , 94 ) ; - Moveable = TRUE ; - Closeable = FALSE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 185 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 185 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 185 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedText FT_SERVICE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "~Service"; - }; - ListBox LB_SERVICE - { - HelpID = "sc:ListBox:RID_SCDLG_DAPISERVICE:LB_SERVICE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 56 , 12 ) ; - Size = MAP_APPFONT ( 120 , 80 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_SOURCE - { - Pos = MAP_APPFONT ( 12 , 30 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "So~urce"; - }; - Edit ED_SOURCE - { - HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_SOURCE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 56 , 28 ) ; - Size = MAP_APPFONT ( 120 , 12 ) ; - TabStop = TRUE ; - }; - FixedText FT_NAME - { - Pos = MAP_APPFONT ( 12 , 46 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "~Name"; - }; - Edit ED_NAME - { - HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_NAME"; - Border = TRUE ; - Pos = MAP_APPFONT ( 56 , 44 ) ; - Size = MAP_APPFONT ( 120 , 12 ) ; - TabStop = TRUE ; - }; - FixedText FT_USER - { - Pos = MAP_APPFONT ( 12 , 62 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "Us~er"; - }; - Edit ED_USER - { - HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_USER"; - Border = TRUE ; - Pos = MAP_APPFONT ( 56 , 60 ) ; - Size = MAP_APPFONT ( 120 , 12 ) ; - TabStop = TRUE ; - }; - FixedText FT_PASSWD - { - Pos = MAP_APPFONT ( 12 , 78 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "~Password"; - }; - Edit ED_PASSWD - { - HelpID = "sc:Edit:RID_SCDLG_DAPISERVICE:ED_PASSWD"; - Border = TRUE ; - Pos = MAP_APPFONT ( 56 , 76 ) ; - Size = MAP_APPFONT ( 120 , 12 ) ; - TabStop = TRUE ; - PassWord = TRUE ; - }; - FixedLine FL_FRAME - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 173 , 8 ) ; - Text [ en-US ] = "Selection"; - }; - Text [ en-US ] = "External Source"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx index 2ab44ba0d661..e3e3180313b2 100644 --- a/sc/source/ui/inc/dapitype.hxx +++ b/sc/source/ui/inc/dapitype.hxx @@ -53,20 +53,11 @@ private: class ScDataPilotServiceDlg : public ModalDialog { private: - FixedLine aFlFrame; - FixedText aFtService; - ListBox aLbService; - FixedText aFtSource; - Edit aEdSource; - FixedText aFtName; - Edit aEdName; - FixedText aFtUser; - Edit aEdUser; - FixedText aFtPasswd; - Edit aEdPasswd; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + ListBox *m_pLbService; + Edit *m_pEdSource; + Edit *m_pEdName; + Edit *m_pEdUser; + Edit *m_pEdPasswd; public: ScDataPilotServiceDlg( Window* pParent, diff --git a/sc/uiconfig/scalc/ui/dapiservicedialog.ui b/sc/uiconfig/scalc/ui/dapiservicedialog.ui new file mode 100644 index 000000000000..167defd0295c --- /dev/null +++ b/sc/uiconfig/scalc/ui/dapiservicedialog.ui @@ -0,0 +1,280 @@ + + + + + False + True + True + 6 + External Source + dialog + + + False + True + True + 12 + + + False + vertical + start + + + gtk-ok + False + True + True + True + False + True + + + False + True + 0 + + + + + gtk-cancel + False + True + True + True + False + True + + + False + True + 1 + + + + + gtk-help + False + True + True + True + False + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + True + False + True + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + True + True + 6 + 6 + + + True + False + start + 0 + _Service + True + + + 0 + 0 + 1 + 1 + + + + + True + False + start + 0 + So_urce + True + + + 0 + 1 + 1 + 1 + + + + + True + False + start + 0 + _Name + True + + + 0 + 2 + 1 + 1 + + + + + True + False + start + 0 + Us_er + True + + + 0 + 3 + 1 + 1 + + + + + True + False + start + 0 + _Password + True + + + 0 + 4 + 1 + 1 + + + + + True + True + True + + + + 1 + 4 + 1 + 1 + + + + + True + True + True + + + + 1 + 3 + 1 + 1 + + + + + True + True + True + + + + 1 + 2 + 1 + 1 + + + + + True + True + True + + + + 1 + 1 + 1 + 1 + + + + + True + False + True + + + 1 + 0 + 1 + 1 + + + + + + + + + True + False + Selection + + + + + + + + True + True + 1 + + + + + + ok + cancel + help + + + -- cgit