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