Kaydet (Commit) a32ecb85 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS uno4 (1.13.28); FILE MERGED

2003/05/15 14:40:17 tbe 1.13.28.1: #109067# Performance of Basic Dialog Editor is too slow
üst d95d8d70
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: propbrw.cxx,v $ * $RCSfile: propbrw.cxx,v $
* *
* $Revision: 1.13 $ * $Revision: 1.14 $
* *
* last change: $Author: hr $ $Date: 2003-03-18 16:17:09 $ * last change: $Author: vg $ $Date: 2003-05-22 08:44:12 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -346,11 +346,17 @@ PropBrw::~PropBrw() ...@@ -346,11 +346,17 @@ PropBrw::~PropBrw()
void PropBrw::implDetachController() void PropBrw::implDetachController()
{ {
implSetNewObject(Reference< XPropertySet >()); implSetNewObject( Reference< XPropertySet >() );
if (m_xMeAsFrame.is())
m_xMeAsFrame->setComponent(NULL, NULL); if ( m_xMeAsFrame.is() )
m_xBrowserController = NULL; m_xMeAsFrame->setComponent( NULL, NULL );
m_xMeAsFrame = NULL;
Reference< XController > xAsXController( m_xBrowserController, UNO_QUERY );
if ( xAsXController.is() )
xAsXController->attachFrame( NULL );
m_xBrowserController.clear();
m_xMeAsFrame.clear();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -407,17 +413,17 @@ sal_Bool PropBrw::Close() ...@@ -407,17 +413,17 @@ sal_Bool PropBrw::Close()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void PropBrw::implSetNewObject(const Reference< XPropertySet >& _rxObject) void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
{ {
if (m_xBrowserController.is()) if ( m_xBrowserController.is() )
{ {
m_xBrowserController->setPropertyValue( m_xBrowserController->setPropertyValue(
::rtl::OUString::createFromAscii("IntrospectedObject"), ::rtl::OUString::createFromAscii( "IntrospectedObject" ),
makeAny(_rxObject) makeAny( _rxObject )
); );
// set the new title according to the selected object // set the new title according to the selected object
SetText( GetHeadlineName(_rxObject) ); SetText( GetHeadlineName( _rxObject ) );
} }
} }
...@@ -566,71 +572,67 @@ void PropBrw::Resize() ...@@ -566,71 +572,67 @@ void PropBrw::Resize()
void PropBrw::Update( SdrView* pNewView ) void PropBrw::Update( SdrView* pNewView )
{ {
try try
{ {
if( pView ) if ( pView )
{ {
EndListening( *(pView->GetModel()) ); EndListening( *(pView->GetModel()) );
pView = NULL; pView = NULL;
} }
if( !pNewView ) if ( !pNewView )
return; return;
else else
pView = pNewView; pView = pNewView;
// set focus on initialization // set focus on initialization
if (m_bInitialStateChange) if ( m_bInitialStateChange )
{ {
if (m_xBrowserComponentWindow.is()) if ( m_xBrowserComponentWindow.is() )
m_xBrowserComponentWindow->setFocus(); m_xBrowserComponentWindow->setFocus();
m_bInitialStateChange = sal_False; m_bInitialStateChange = sal_False;
} }
DlgEdObj* pDlgEdObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkList(); const SdrMarkList& rMarkList = pView->GetMarkList();
sal_uInt32 nMarkCount = rMarkList.GetMarkCount(); sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
if (nMarkCount==1) if ( nMarkCount == 1 )
{ {
SdrObject *pObj=rMarkList.GetMark(0)->GetObj(); DlgEdObj* pDlgEdObj = PTR_CAST( DlgEdObj, rMarkList.GetMark(0)->GetObj() );
if ( pDlgEdObj )
if( pObj->IsGroupObject() ) // group object
{ {
implSetNewObject( Reference< XPropertySet> (CreateCompPropSet( rMarkList )) ); if ( pDlgEdObj->IsGroupObject() ) // group object
{
implSetNewObject( Reference< XPropertySet>( CreateCompPropSet( rMarkList ) ) );
}
else // single selection
{
implSetNewObject( Reference< XPropertySet >( pDlgEdObj->GetUnoControlModel(), UNO_QUERY ) );
}
} }
else else
{ {
pDlgEdObj = PTR_CAST(DlgEdObj, rMarkList.GetMark(0)->GetObj()); implSetNewObject( Reference< XPropertySet >() );
if ( pDlgEdObj ) // single selection
{
implSetNewObject(Reference< XPropertySet >(pDlgEdObj->GetUnoControlModel(), UNO_QUERY));
}
else
implSetNewObject(Reference< XPropertySet >());
} }
} }
else if (nMarkCount > 1) // multiple selection else if ( nMarkCount > 1 ) // multiple selection
{ {
implSetNewObject( Reference< XPropertySet> (CreateCompPropSet( rMarkList )) ); implSetNewObject( Reference< XPropertySet>( CreateCompPropSet( rMarkList ) ) );
} }
else else
{ {
EndListening( *(pView->GetModel()) ); EndListening( *(pView->GetModel()) );
pView = NULL; pView = NULL;
implSetNewObject(Reference< XPropertySet >()); implSetNewObject( Reference< XPropertySet >() );
return; return;
} }
StartListening( *(pView->GetModel()) ); StartListening( *(pView->GetModel()) );
} }
catch (Exception&) catch ( Exception& )
{ {
DBG_ERROR("PropBrw::Update: Exception occured!"); DBG_ERROR( "PropBrw::Update: Exception occured!" );
} }
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment