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_UIBASE_INC_SWRENAMEXNAMEDDLG_HXX
20 : #define INCLUDED_SW_SOURCE_UIBASE_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 : class SwRenameXNamedDlg : public ModalDialog
34 : {
35 : VclPtr<Edit> m_pNewNameED;
36 : TextFilter m_aTextFilter;
37 : VclPtr<OKButton> m_pOk;
38 :
39 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed;
40 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess;
41 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xSecondAccess;
42 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xThirdAccess;
43 :
44 : DECL_LINK(OkHdl, void *);
45 : DECL_LINK(ModifyHdl, Edit*);
46 :
47 : public:
48 : SwRenameXNamedDlg( vcl::Window* pParent,
49 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
50 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess );
51 : virtual ~SwRenameXNamedDlg();
52 : virtual void dispose() SAL_OVERRIDE;
53 :
54 0 : void SetForbiddenChars(const OUString& rSet)
55 : {
56 0 : m_aTextFilter.SetForbiddenChars(rSet);
57 0 : }
58 :
59 0 : void SetAlternativeAccess(
60 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xSecond,
61 : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xThird )
62 : {
63 0 : xSecondAccess = xSecond;
64 0 : xThirdAccess = xThird;
65 0 : }
66 : };
67 :
68 : #endif
69 :
70 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|