Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_SW_SOURCE_UI_INC_SWRENAMEXNAMEDDLG_HXX
20 : #define INCLUDED_SW_SOURCE_UI_INC_SWRENAMEXNAMEDDLG_HXX
21 :
22 : #include <vcl/dialog.hxx>
23 : #include <vcl/fixed.hxx>
24 : #include <vcl/edit.hxx>
25 : #include <vcl/button.hxx>
26 : #include <actctrl.hxx>
27 : #include <com/sun/star/frame/XController.hpp>
28 : #include <com/sun/star/text/XTextCursor.hpp>
29 : #include <com/sun/star/container/XNameAccess.hpp>
30 : #include <com/sun/star/awt/XControl.hpp>
31 : #include <com/sun/star/container/XNamed.hpp>
32 :
33 0 : class SwRenameXNamedDlg : public ModalDialog
34 : {
35 : NoSpaceEdit* m_pNewNameED;
36 : OKButton* m_pOk;
37 :
38 : OUString m_sRemoveWarning;
39 :
40 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed;
41 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess;
42 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xSecondAccess;
43 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xThirdAccess;
44 :
45 : DECL_LINK(OkHdl, void *);
46 : DECL_LINK(ModifyHdl, NoSpaceEdit*);
47 :
48 : public:
49 : SwRenameXNamedDlg( Window* pParent,
50 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
51 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess );
52 :
53 0 : void SetForbiddenChars(const OUString& rSet)
54 : {
55 0 : m_pNewNameED->SetForbiddenChars(rSet);
56 0 : }
57 :
58 0 : void SetAlternativeAccess(
59 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xSecond,
60 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xThird )
61 : {
62 0 : xSecondAccess = xSecond;
63 0 : xThirdAccess = xThird;
64 0 : }
65 : };
66 :
67 : #endif
68 :
69 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|