1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SWRENAMEXNAMEDDLG_HXX
24 #define _SWRENAMEXNAMEDDLG_HXX
25 
26 
27 #include <vcl/dialog.hxx>
28 #include <vcl/fixed.hxx>
29 #include <vcl/edit.hxx>
30 #ifndef _SV_BUTTON_HXX //autogen
31 #include <vcl/button.hxx>
32 #endif
33 #include <actctrl.hxx>
34 #include <com/sun/star/frame/XController.hpp>
35 #include <com/sun/star/text/XTextCursor.hpp>
36 #include <com/sun/star/container/XNameAccess.hpp>
37 #include <com/sun/star/awt/XControl.hpp>
38 #include <com/sun/star/container/XNamed.hpp>
39 #include <tools/resary.hxx>
40 #include <swunodef.hxx>
41 
42 
43 
44 /* -----------------09.06.99 14:36-------------------
45  *
46  * --------------------------------------------------*/
47 class SwRenameXNamedDlg : public ModalDialog
48 {
49 	FixedLine       aNameFL;
50 	FixedText		aNewNameFT;
51 	NoSpaceEdit 	aNewNameED;
52 	OKButton 		aOk;
53 	CancelButton 	aCancel;
54 	HelpButton		aHelp;
55 
56 	String 			sRemoveWarning;
57 
58 	STAR_REFERENCE( container::XNamed ) & 	xNamed;
59 	STAR_REFERENCE( container::XNameAccess ) & xNameAccess;
60 	STAR_REFERENCE( container::XNameAccess )   xSecondAccess;
61 	STAR_REFERENCE( container::XNameAccess )   xThirdAccess;
62 
63 	DECL_LINK(OkHdl, OKButton*);
64 	DECL_LINK(ModifyHdl, NoSpaceEdit*);
65 
66 public:
67 	SwRenameXNamedDlg( Window* pParent,
68 					STAR_REFERENCE( container::XNamed ) & xNamed,
69 					STAR_REFERENCE( container::XNameAccess ) & xNameAccess );
70 
SetForbiddenChars(const String & rSet)71 	void	SetForbiddenChars( const String& rSet )
72 		{ aNewNameED.SetForbiddenChars( rSet ); }
73 
SetAlternativeAccess(STAR_REFERENCE (container::XNameAccess)& xSecond,STAR_REFERENCE (container::XNameAccess)& xThird)74 	void SetAlternativeAccess(
75 			STAR_REFERENCE( container::XNameAccess ) & xSecond,
76 			STAR_REFERENCE( container::XNameAccess ) & xThird )
77 	{
78 		xSecondAccess = xSecond;
79 		xThirdAccess = xThird;
80 	}
81 };
82 
83 #endif
84