1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dapitype.cxx,v $
10 * $Revision: 1.7.32.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sc.hxx"
34 #undef SC_DLLIMPLEMENTATION
38 //------------------------------------------------------------------
40 #include "dapitype.hxx"
41 #include "scresid.hxx"
43 #include "dapitype.hrc"
45 using namespace com::sun::star
;
47 //-------------------------------------------------------------------------
49 ScDataPilotSourceTypeDlg::ScDataPilotSourceTypeDlg( Window
* pParent
, BOOL bEnableExternal
) :
50 ModalDialog ( pParent
, ScResId( RID_SCDLG_DAPITYPE
) ),
52 aFlFrame ( this, ScResId( FL_FRAME
) ),
53 aBtnSelection ( this, ScResId( BTN_SELECTION
) ),
54 aBtnDatabase ( this, ScResId( BTN_DATABASE
) ),
55 aBtnExternal ( this, ScResId( BTN_EXTERNAL
) ),
56 aBtnOk ( this, ScResId( BTN_OK
) ),
57 aBtnCancel ( this, ScResId( BTN_CANCEL
) ),
58 aBtnHelp ( this, ScResId( BTN_HELP
) )
61 aBtnExternal
.Disable();
63 aBtnSelection
.Check();
68 ScDataPilotSourceTypeDlg::~ScDataPilotSourceTypeDlg()
72 BOOL
ScDataPilotSourceTypeDlg::IsDatabase() const
74 return aBtnDatabase
.IsChecked();
77 BOOL
ScDataPilotSourceTypeDlg::IsExternal() const
79 return aBtnExternal
.IsChecked();
82 //-------------------------------------------------------------------------
84 ScDataPilotServiceDlg::ScDataPilotServiceDlg( Window
* pParent
,
85 const uno::Sequence
<rtl::OUString
>& rServices
) :
86 ModalDialog ( pParent
, ScResId( RID_SCDLG_DAPISERVICE
) ),
88 aFlFrame ( this, ScResId( FL_FRAME
) ),
89 aFtService ( this, ScResId( FT_SERVICE
) ),
90 aLbService ( this, ScResId( LB_SERVICE
) ),
91 aFtSource ( this, ScResId( FT_SOURCE
) ),
92 aEdSource ( this, ScResId( ED_SOURCE
) ),
93 aFtName ( this, ScResId( FT_NAME
) ),
94 aEdName ( this, ScResId( ED_NAME
) ),
95 aFtUser ( this, ScResId( FT_USER
) ),
96 aEdUser ( this, ScResId( ED_USER
) ),
97 aFtPasswd ( this, ScResId( FT_PASSWD
) ),
98 aEdPasswd ( this, ScResId( ED_PASSWD
) ),
99 aBtnOk ( this, ScResId( BTN_OK
) ),
100 aBtnCancel ( this, ScResId( BTN_CANCEL
) ),
101 aBtnHelp ( this, ScResId( BTN_HELP
) )
103 long nCount
= rServices
.getLength();
104 const rtl::OUString
* pArray
= rServices
.getConstArray();
105 for (long i
=0; i
<nCount
; i
++)
107 String aName
= pArray
[i
];
108 aLbService
.InsertEntry( aName
);
110 aLbService
.SelectEntryPos( 0 );
115 ScDataPilotServiceDlg::~ScDataPilotServiceDlg()
119 String
ScDataPilotServiceDlg::GetServiceName() const
121 return aLbService
.GetSelectEntry();
124 String
ScDataPilotServiceDlg::GetParSource() const
126 return aEdSource
.GetText();
129 String
ScDataPilotServiceDlg::GetParName() const
131 return aEdName
.GetText();
134 String
ScDataPilotServiceDlg::GetParUser() const
136 return aEdUser
.GetText();
139 String
ScDataPilotServiceDlg::GetParPass() const
141 return aEdPasswd
.GetText();