2006-08-15 04:37:41 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 16:19:12 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
2008-04-10 16:19:12 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
2008-04-10 16:19:12 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
2008-04-10 16:19:12 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
2008-04-10 16:19:12 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
2008-04-10 16:19:12 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2006-08-15 04:37:41 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 22:15:56 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_svx.hxx"
|
|
|
|
|
2006-08-15 04:37:41 -05:00
|
|
|
// === includes (declaration) ============================================
|
2010-04-20 08:55:51 -05:00
|
|
|
#include "svx/databaseregistrationui.hxx"
|
2006-08-15 04:37:41 -05:00
|
|
|
|
|
|
|
// === includes (UNO) ====================================================
|
|
|
|
// === /includes (UNO) ===================================================
|
|
|
|
|
|
|
|
// === includes (project) ================================================
|
2007-06-27 10:59:44 -05:00
|
|
|
#include <svx/svxdlg.hxx>
|
2006-08-15 04:37:41 -05:00
|
|
|
#ifndef _SVX_DIALOGS_HRC
|
2007-06-27 10:59:44 -05:00
|
|
|
#include <svx/dialogs.hrc>
|
2006-08-15 04:37:41 -05:00
|
|
|
#endif
|
2009-05-06 05:59:57 -05:00
|
|
|
//#include "connpooloptions.hxx"
|
2006-08-15 04:37:41 -05:00
|
|
|
// === /includes (project) ===============================================
|
|
|
|
|
|
|
|
// === includes (global) =================================================
|
|
|
|
#include <sfx2/app.hxx>
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/itemset.hxx>
|
2006-08-15 04:37:41 -05:00
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
// === /includes (global) ================================================
|
|
|
|
|
|
|
|
namespace svx
|
|
|
|
{
|
2011-01-10 09:11:35 -06:00
|
|
|
sal_uInt16 administrateDatabaseRegistration( Window* _parentWindow )
|
2006-08-15 04:37:41 -05:00
|
|
|
{
|
2011-01-10 09:11:35 -06:00
|
|
|
sal_uInt16 nResult = RET_CANCEL;
|
2006-08-15 04:37:41 -05:00
|
|
|
|
|
|
|
SfxItemSet aRegistrationItems( SFX_APP()->GetPool(), SID_SB_DB_REGISTER, SID_SB_DB_REGISTER, 0 );
|
|
|
|
|
|
|
|
SvxAbstractDialogFactory* pDialogFactory = SvxAbstractDialogFactory::Create();
|
2009-05-06 05:59:57 -05:00
|
|
|
::std::auto_ptr< SfxAbstractDialog > pDialog;
|
2006-08-15 04:37:41 -05:00
|
|
|
if ( pDialogFactory )
|
2009-05-06 05:59:57 -05:00
|
|
|
pDialog.reset( pDialogFactory->CreateSfxDialog( _parentWindow, aRegistrationItems, NULL, RID_SFXPAGE_DBREGISTER ) );
|
2006-08-15 04:37:41 -05:00
|
|
|
if ( pDialog.get() )
|
|
|
|
nResult = pDialog->Execute();
|
|
|
|
|
|
|
|
return nResult;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace svx
|