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 #ifndef _SWRENAMEXNAMEDDLG_HXX 28 #define _SWRENAMEXNAMEDDLG_HXX 29 30 31 #include <vcl/dialog.hxx> 32 #include <vcl/fixed.hxx> 33 #include <vcl/edit.hxx> 34 #ifndef _SV_BUTTON_HXX //autogen 35 #include <vcl/button.hxx> 36 #endif 37 #include <actctrl.hxx> 38 #include <com/sun/star/frame/XController.hpp> 39 #include <com/sun/star/text/XTextCursor.hpp> 40 #include <com/sun/star/container/XNameAccess.hpp> 41 #include <com/sun/star/awt/XControl.hpp> 42 #include <com/sun/star/container/XNamed.hpp> 43 #include <tools/resary.hxx> 44 #include <swunodef.hxx> 45 46 47 48 /* -----------------09.06.99 14:36------------------- 49 * 50 * --------------------------------------------------*/ 51 class SwRenameXNamedDlg : public ModalDialog 52 { 53 FixedLine aNameFL; 54 FixedText aNewNameFT; 55 NoSpaceEdit aNewNameED; 56 OKButton aOk; 57 CancelButton aCancel; 58 HelpButton aHelp; 59 60 String sRemoveWarning; 61 62 STAR_REFERENCE( container::XNamed ) & xNamed; 63 STAR_REFERENCE( container::XNameAccess ) & xNameAccess; 64 STAR_REFERENCE( container::XNameAccess ) xSecondAccess; 65 STAR_REFERENCE( container::XNameAccess ) xThirdAccess; 66 67 DECL_LINK(OkHdl, OKButton*); 68 DECL_LINK(ModifyHdl, NoSpaceEdit*); 69 70 public: 71 SwRenameXNamedDlg( Window* pParent, 72 STAR_REFERENCE( container::XNamed ) & xNamed, 73 STAR_REFERENCE( container::XNameAccess ) & xNameAccess ); 74 75 void SetForbiddenChars( const String& rSet ) 76 { aNewNameED.SetForbiddenChars( rSet ); } 77 78 void SetAlternativeAccess( 79 STAR_REFERENCE( container::XNameAccess ) & xSecond, 80 STAR_REFERENCE( container::XNameAccess ) & xThird ) 81 { 82 xSecondAccess = xSecond; 83 xThirdAccess = xThird; 84 } 85 }; 86 87 #endif 88