Branch data 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 : :
20 : : #ifndef _BASCTL_PROPBRW_HXX
21 : : #define _BASCTL_PROPBRW_HXX
22 : :
23 : : #include <com/sun/star/beans/XPropertySet.hpp>
24 : : #include <comphelper/stl_types.hxx>
25 : : #include <sfx2/basedlgs.hxx>
26 : : #include <sfx2/dockwin.hxx>
27 : : #include <svl/lstner.hxx>
28 : : #include <svx/svdmark.hxx>
29 : :
30 : : //============================================================================
31 : : // PropBrwMgr
32 : : //============================================================================
33 : :
34 : 0 : class PropBrwMgr : public SfxChildWindow
35 : : {
36 : : public:
37 : : PropBrwMgr(Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo);
38 : : SFX_DECL_CHILDWINDOW(PropBrwMgr);
39 : : };
40 : :
41 : : //============================================================================
42 : : // PropBrw
43 : : //============================================================================
44 : :
45 : : class SfxBindings;
46 : : class SdrView;
47 : :
48 : : class PropBrw : public SfxDockingWindow , public SfxListener, public SfxBroadcaster
49 : : {
50 : : private:
51 : : bool m_bInitialStateChange;
52 : :
53 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
54 : : m_xORB;
55 : : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
56 : : m_xMeAsFrame;
57 : : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
58 : : m_xBrowserController;
59 : : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
60 : : m_xBrowserComponentWindow;
61 : : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
62 : : m_xContextDocument;
63 : :
64 : : protected:
65 : : SdrView* pView;
66 : : virtual void Resize();
67 : : virtual void FillInfo( SfxChildWinInfo& rInfo ) const;
68 : : virtual sal_Bool Close();
69 : :
70 : : DECLARE_STL_VECTOR(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>, InterfaceArray);
71 : :
72 : : ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >
73 : : CreateMultiSelectionSequence( const SdrMarkList& _rMarkList );
74 : : void implSetNewObjectSequence( const ::com::sun::star::uno::Sequence
75 : : < ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rObjectSeq );
76 : :
77 : : void implSetNewObject(
78 : : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
79 : :
80 : : ::rtl::OUString GetHeadlineName(
81 : : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
82 : :
83 : : public:
84 : : PropBrw( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
85 : : SfxBindings *pBindings,
86 : : PropBrwMgr* pMgr,
87 : : Window* pParent,
88 : : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument
89 : : );
90 : : virtual ~PropBrw();
91 : : using Window::Update;
92 : : // note: changing the Context document to an instance other than the one given in the ctor is not supported
93 : : // currently
94 : : void Update( const SfxViewShell* _pShell );
95 : : SdrView* GetCurView() const { return pView; }
96 : :
97 : : private:
98 : : void ImplUpdate( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument, SdrView* pView );
99 : : void ImplDestroyController();
100 : : void ImplReCreateController();
101 : : };
102 : :
103 : : #endif // _BASCTL_PROPBRW_HXX
104 : :
105 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|