1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef DBAUI_DLGSAVE_HXX 29 #define DBAUI_DLGSAVE_HXX 30 31 #ifndef _DBASHARED_APITOOLS_HXX_ 32 #include "apitools.hxx" 33 #endif 34 #ifndef _DIALOG_HXX //autogen 35 #include <vcl/dialog.hxx> 36 #endif 37 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ 38 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 39 #endif 40 #ifndef _SV_MSGBOX_HXX 41 #include <vcl/msgbox.hxx> 42 #endif 43 44 namespace com { namespace sun { namespace star { 45 namespace container { 46 class XNameAccess; 47 class XHierarchicalNameAccess; 48 } 49 namespace sdbc { 50 class XDatabaseMetaData; 51 class XConnection; 52 } 53 }}} 54 55 56 #define SAD_DEFAULT 0x0000 57 #define SAD_ADDITIONAL_DESCRIPTION 0x0001 58 59 #define SAD_TITLE_STORE_AS 0x0000 60 #define SAD_TITLE_PASTE_AS 0x0100 61 #define SAD_TITLE_RENAME 0x0200 62 63 class Button; 64 class Edit; 65 namespace dbaui 66 { 67 class OSaveAsDlgImpl; 68 class IObjectNameCheck; 69 class OSaveAsDlg : public ModalDialog 70 { 71 private: 72 OSaveAsDlgImpl* m_pImpl; 73 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; 74 public: 75 OSaveAsDlg( Window * pParent,const sal_Int32& _rType, 76 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, 77 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, 78 const String& rDefault, 79 const IObjectNameCheck& _rObjectNameCheck, 80 sal_Int32 _nFlags = SAD_DEFAULT | SAD_TITLE_STORE_AS); 81 82 OSaveAsDlg( Window* _pParent, 83 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, 84 const String& _rDefault, 85 const String& _sLabel, 86 const IObjectNameCheck& _rObjectNameCheck, 87 sal_Int32 _nFlags = SAD_DEFAULT | SAD_TITLE_STORE_AS); 88 virtual ~OSaveAsDlg(); 89 90 String getName() const; 91 String getCatalog() const; 92 String getSchema() const; 93 private: 94 DECL_LINK(ButtonClickHdl, Button *); 95 DECL_LINK(EditModifyHdl, Edit * ); 96 97 void implInitOnlyTitle(const String& _rLabel); 98 void implInit(); 99 }; 100 } 101 102 #endif // DBAUI_DLGSAVE_HXX 103 104 105 106