1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <sal/macros.h>
25 #include "fmPropBrw.hxx"
26 #include "svx/fmresids.hrc"
27 #include "fmservs.hxx"
28 #include "fmshimp.hxx"
29 #include "fmpgeimp.hxx"
31 #include "svx/dialmgr.hxx"
32 #include "svx/fmpage.hxx"
33 #include "svx/fmshell.hxx"
34 #include "svx/sdrpagewindow.hxx"
35 #include "svx/svdpagv.hxx"
36 #include "svx/svxids.hrc"
38 #include <com/sun/star/awt/XLayoutConstrains.hpp>
39 #include <com/sun/star/awt/XControlContainer.hpp>
40 #include <com/sun/star/awt/PosSize.hpp>
41 #include <com/sun/star/beans/PropertyValue.hpp>
42 #include <com/sun/star/container/XChild.hpp>
43 #include <com/sun/star/form/XForm.hpp>
44 #include <com/sun/star/form/FormComponentType.hpp>
45 #include <com/sun/star/form/inspection/DefaultFormComponentInspectorModel.hpp>
46 #include <com/sun/star/frame/Frame.hpp>
47 #include <com/sun/star/inspection/ObjectInspector.hpp>
48 #include <com/sun/star/inspection/ObjectInspectorModel.hpp>
49 #include <com/sun/star/inspection/XObjectInspectorUI.hpp>
50 #include <com/sun/star/inspection/DefaultHelpProvider.hpp>
52 #include <comphelper/processfactory.hxx>
53 #include <comphelper/property.hxx>
54 #include <cppuhelper/component_context.hxx>
55 #include <sfx2/bindings.hxx>
56 #include <sfx2/childwin.hxx>
57 #include <sfx2/dispatch.hxx>
58 #include <sfx2/objitem.hxx>
59 #include <sfx2/objsh.hxx>
60 #include <sfx2/viewfrm.hxx>
61 #include <toolkit/helper/vclunohelper.hxx>
62 #include <tools/debug.hxx>
63 #include <tools/diagnose_ex.h>
64 #include <unotools/confignode.hxx>
65 #include <vcl/stdtext.hxx>
69 using namespace ::com::sun::star
;
70 using namespace ::com::sun::star::uno
;
71 using namespace ::com::sun::star::util
;
72 using namespace ::com::sun::star::inspection
;
73 using namespace ::com::sun::star::form::inspection
;
74 using ::com::sun::star::awt::XWindow
;
79 SFX_IMPL_FLOATINGWINDOW(FmPropBrwMgr
, SID_FM_SHOW_PROPERTIES
)
82 FmPropBrwMgr::FmPropBrwMgr( vcl::Window
* _pParent
, sal_uInt16 _nId
,
83 SfxBindings
* _pBindings
, SfxChildWinInfo
* _pInfo
)
84 :SfxChildWindow(_pParent
, _nId
)
86 pWindow
= VclPtr
<FmPropBrw
>::Create( ::comphelper::getProcessComponentContext(), _pBindings
, this, _pParent
, _pInfo
);
87 eChildAlignment
= SfxChildAlignment::NOALIGNMENT
;
88 static_cast<SfxFloatingWindow
*>(pWindow
.get())->Initialize( _pInfo
);
92 const long STD_WIN_SIZE_X
= 300;
93 const long STD_WIN_SIZE_Y
= 350;
95 const long STD_MIN_SIZE_X
= 250;
96 const long STD_MIN_SIZE_Y
= 250;
98 using namespace ::com::sun::star::uno
;
99 using namespace ::com::sun::star::lang
;
100 using namespace ::com::sun::star::form
;
101 using namespace ::com::sun::star::frame
;
102 using namespace ::com::sun::star::beans
;
103 using namespace ::com::sun::star::container
;
104 using namespace ::svxform
;
106 OUString
GetUIHeadlineName(sal_Int16 nClassId
, const Any
& aUnoObj
)
108 sal_uInt16 nClassNameResourceId
= 0;
112 case FormComponentType::TEXTFIELD
:
114 Reference
< XInterface
> xIFace
;
116 nClassNameResourceId
= RID_STR_PROPTITLE_EDIT
;
118 { // we have a chance to check if it's a formatted field model
119 Reference
< XServiceInfo
> xInfo(xIFace
, UNO_QUERY
);
120 if (xInfo
.is() && (xInfo
->supportsService(FM_SUN_COMPONENT_FORMATTEDFIELD
)))
121 nClassNameResourceId
= RID_STR_PROPTITLE_FORMATTED
;
122 else if (!xInfo
.is())
124 // couldn't distinguish between formatted and edit with the service name, so try with the properties
125 Reference
< XPropertySet
> xProps(xIFace
, UNO_QUERY
);
128 Reference
< XPropertySetInfo
> xPropsInfo
= xProps
->getPropertySetInfo();
129 if (xPropsInfo
.is() && xPropsInfo
->hasPropertyByName(FM_PROP_FORMATSSUPPLIER
))
130 nClassNameResourceId
= RID_STR_PROPTITLE_FORMATTED
;
137 case FormComponentType::COMMANDBUTTON
:
138 nClassNameResourceId
= RID_STR_PROPTITLE_PUSHBUTTON
; break;
139 case FormComponentType::RADIOBUTTON
:
140 nClassNameResourceId
= RID_STR_PROPTITLE_RADIOBUTTON
; break;
141 case FormComponentType::CHECKBOX
:
142 nClassNameResourceId
= RID_STR_PROPTITLE_CHECKBOX
; break;
143 case FormComponentType::LISTBOX
:
144 nClassNameResourceId
= RID_STR_PROPTITLE_LISTBOX
; break;
145 case FormComponentType::COMBOBOX
:
146 nClassNameResourceId
= RID_STR_PROPTITLE_COMBOBOX
; break;
147 case FormComponentType::GROUPBOX
:
148 nClassNameResourceId
= RID_STR_PROPTITLE_GROUPBOX
; break;
149 case FormComponentType::IMAGEBUTTON
:
150 nClassNameResourceId
= RID_STR_PROPTITLE_IMAGEBUTTON
; break;
151 case FormComponentType::FIXEDTEXT
:
152 nClassNameResourceId
= RID_STR_PROPTITLE_FIXEDTEXT
; break;
153 case FormComponentType::GRIDCONTROL
:
154 nClassNameResourceId
= RID_STR_PROPTITLE_DBGRID
; break;
155 case FormComponentType::FILECONTROL
:
156 nClassNameResourceId
= RID_STR_PROPTITLE_FILECONTROL
; break;
157 case FormComponentType::DATEFIELD
:
158 nClassNameResourceId
= RID_STR_PROPTITLE_DATEFIELD
; break;
159 case FormComponentType::TIMEFIELD
:
160 nClassNameResourceId
= RID_STR_PROPTITLE_TIMEFIELD
; break;
161 case FormComponentType::NUMERICFIELD
:
162 nClassNameResourceId
= RID_STR_PROPTITLE_NUMERICFIELD
; break;
163 case FormComponentType::CURRENCYFIELD
:
164 nClassNameResourceId
= RID_STR_PROPTITLE_CURRENCYFIELD
; break;
165 case FormComponentType::PATTERNFIELD
:
166 nClassNameResourceId
= RID_STR_PROPTITLE_PATTERNFIELD
; break;
167 case FormComponentType::IMAGECONTROL
:
168 nClassNameResourceId
= RID_STR_PROPTITLE_IMAGECONTROL
; break;
169 case FormComponentType::HIDDENCONTROL
:
170 nClassNameResourceId
= RID_STR_PROPTITLE_HIDDEN
; break;
171 case FormComponentType::SCROLLBAR
:
172 nClassNameResourceId
= RID_STR_PROPTITLE_SCROLLBAR
; break;
173 case FormComponentType::SPINBUTTON
:
174 nClassNameResourceId
= RID_STR_PROPTITLE_SPINBUTTON
; break;
175 case FormComponentType::NAVIGATIONBAR
:
176 nClassNameResourceId
= RID_STR_PROPTITLE_NAVBAR
; break;
177 case FormComponentType::CONTROL
:
179 nClassNameResourceId
= RID_STR_CONTROL
; break;
182 return SVX_RESSTR(nClassNameResourceId
);
185 FmPropBrw::FmPropBrw( const Reference
< XComponentContext
>& _xORB
, SfxBindings
* _pBindings
,
186 SfxChildWindow
* _pMgr
, vcl::Window
* _pParent
, const SfxChildWinInfo
* _pInfo
)
187 :SfxFloatingWindow(_pBindings
, _pMgr
, _pParent
, WinBits(WB_STDMODELESS
|WB_SIZEABLE
|WB_3DLOOK
|WB_ROLLABLE
) )
188 ,SfxControllerItem(SID_FM_PROPERTY_CONTROL
, *_pBindings
)
189 ,m_bInitialStateChange(true)
190 ,m_bInStateChange( false )
194 ::Size
aPropWinSize(STD_WIN_SIZE_X
,STD_WIN_SIZE_Y
);
195 SetMinOutputSizePixel(::Size(STD_MIN_SIZE_X
,STD_MIN_SIZE_Y
));
196 SetOutputSizePixel(aPropWinSize
);
197 SetUniqueId(UID_FORMPROPBROWSER_FRAME
);
201 // create a frame wrapper for myself
202 m_xMeAsFrame
= Frame::create(m_xORB
);
204 // create an intermediate window, which is to be the container window of the frame
205 // Do *not* use |this| as container window for the frame, this would result in undefined
206 // responsibility for this window (as soon as we initialize a frame with a window, the frame
207 // is responsible for its life time, but |this| is controlled by the belonging SfxChildWindow)
209 VclPtr
<vcl::Window
> pContainerWindow
= VclPtr
<vcl::Window
>::Create( this );
210 pContainerWindow
->Show();
211 m_xFrameContainerWindow
= VCLUnoHelper::GetInterface ( pContainerWindow
);
213 m_xMeAsFrame
->initialize( m_xFrameContainerWindow
);
214 m_xMeAsFrame
->setName("form property browser");
218 OSL_FAIL("FmPropBrw::FmPropBrw: could not create/initialize my frame!");
219 m_xMeAsFrame
.clear();
222 if (m_xMeAsFrame
.is())
223 _pMgr
->SetFrame( Reference
<XFrame
>(m_xMeAsFrame
,UNO_QUERY_THROW
) );
226 if ( m_xBrowserComponentWindow
.is() )
227 m_xBrowserComponentWindow
->setVisible( sal_True
);
230 m_sLastActivePage
= _pInfo
->aExtraString
;
234 void FmPropBrw::Resize()
236 SfxFloatingWindow::Resize();
238 if ( m_xFrameContainerWindow
.is() )
242 ::Size
aOutputSize( GetOutputSizePixel() );
243 m_xFrameContainerWindow
->setPosSize( 0, 0, aOutputSize
.Width(), aOutputSize
.Height(), awt::PosSize::POSSIZE
);
245 catch( const Exception
& )
247 OSL_FAIL( "FmPropBrw::Resize: caught an exception!" );
253 FmPropBrw::~FmPropBrw()
258 void FmPropBrw::dispose()
260 if (m_xBrowserController
.is())
261 implDetachController();
264 // remove our own properties from the component context. We cannot ensure that the component context
265 // is freed (there might be refcount problems :-\), so at least ensure the context itself
266 // does hold the objects anymore
267 Reference
<XNameContainer
> xName(m_xInspectorContext
,uno::UNO_QUERY
);
270 const OUString pProps
[] = { OUString( "ContextDocument" )
271 , OUString( "DialogParentWindow" )
272 , OUString( "ControlContext" )
273 , OUString( "ControlShapeAccess" ) };
274 for ( size_t i
= 0; i
< sizeof(pProps
)/sizeof(pProps
[0]); ++i
)
275 xName
->removeByName( pProps
[i
] );
278 catch (const Exception
& )
280 DBG_UNHANDLED_EXCEPTION();
282 SfxFloatingWindow::dispose();
286 OUString
FmPropBrw::getCurrentPage() const
288 OUString sCurrentPage
;
291 if ( m_xBrowserController
.is() )
293 OSL_VERIFY( m_xBrowserController
->getViewData() >>= sCurrentPage
);
296 if ( sCurrentPage
.isEmpty() )
297 sCurrentPage
= m_sLastActivePage
;
299 catch( const Exception
& )
301 OSL_FAIL( "FmPropBrw::getCurrentPage: caught an exception while retrieving the current page!" );
307 void FmPropBrw::implDetachController()
309 m_sLastActivePage
= getCurrentPage();
311 implSetNewSelection( InterfaceBag() );
313 if ( m_xMeAsFrame
.is() )
317 m_xMeAsFrame
->setComponent(NULL
, NULL
);
319 catch( const Exception
& )
321 OSL_FAIL( "FmPropBrw::implDetachController: caught an exception while resetting the component!" );
325 // we attached a frame to the controller manually, so we need to manually tell it that it's detached, too
326 if ( m_xBrowserController
.is() )
327 m_xBrowserController
->attachFrame( NULL
);
329 m_xBrowserController
.clear();
330 m_xInspectorModel
.clear();
331 m_xMeAsFrame
.clear();
335 bool FmPropBrw::Close()
337 // suspend the controller (it is allowed to veto)
338 if ( m_xMeAsFrame
.is() )
342 Reference
< XController
> xController( m_xMeAsFrame
->getController() );
343 if ( xController
.is() && !xController
->suspend( sal_True
) )
346 catch( const Exception
& )
348 OSL_FAIL( "FmPropBrw::Close: caught an exception while asking the controller!" );
352 implDetachController();
357 // remember our bindings: while we're closed, we're deleted, too, so accessing the bindings after this
359 // 10/19/00 - 79321 - FS
360 SfxBindings
& rBindings
= SfxControllerItem::GetBindings();
362 bool bClose
= SfxFloatingWindow::Close();
366 rBindings
.Invalidate(SID_FM_CTL_PROPERTIES
);
367 rBindings
.Invalidate(SID_FM_PROPERTIES
);
374 bool FmPropBrw::implIsReadOnlyModel() const
378 if ( m_xInspectorModel
.is() )
379 return m_xInspectorModel
->getIsReadOnly();
382 catch( const Exception
& )
384 DBG_UNHANDLED_EXCEPTION();
390 void FmPropBrw::implSetNewSelection( const InterfaceBag
& _rSelection
)
392 if ( m_xBrowserController
.is() )
396 Reference
< XObjectInspector
> xInspector( m_xBrowserController
, UNO_QUERY_THROW
);
398 // tell it the objects to inspect
399 Sequence
< Reference
< XInterface
> > aSelection( _rSelection
.size() );
400 ::std::copy( _rSelection
.begin(), _rSelection
.end(), aSelection
.getArray() );
402 xInspector
->inspect( aSelection
);
404 catch( const VetoException
& )
408 catch( const Exception
& )
410 OSL_FAIL( "FmPropBrw::implSetNewSelection: caught an unexpected exception!" );
414 // set the new title according to the selected object
417 if ( _rSelection
.empty() )
419 sTitle
= SVX_RESSTR(RID_STR_NO_PROPERTIES
);
421 else if ( _rSelection
.size() > 1 )
423 // no form component and (no form or no name) -> Multiselection
424 sTitle
= SVX_RESSTR(RID_STR_PROPERTIES_CONTROL
);
425 sTitle
+= SVX_RESSTR(RID_STR_PROPTITLE_MULTISELECT
);
429 Reference
< XPropertySet
> xSingleSelection( *_rSelection
.begin(), UNO_QUERY
);
430 if ( ::comphelper::hasProperty( FM_PROP_CLASSID
, xSingleSelection
) )
432 sal_Int16 nClassID
= FormComponentType::CONTROL
;
433 xSingleSelection
->getPropertyValue( FM_PROP_CLASSID
) >>= nClassID
;
435 sTitle
= SVX_RESSTR(RID_STR_PROPERTIES_CONTROL
);
436 sTitle
+= GetUIHeadlineName(nClassID
, makeAny(xSingleSelection
));
438 else if ( Reference
< XForm
>( xSingleSelection
, UNO_QUERY
).is() )
439 sTitle
= SVX_RESSTR(RID_STR_PROPERTIES_FORM
);
442 if ( implIsReadOnlyModel() )
443 sTitle
+= SVX_RESSTR(RID_STR_READONLY_VIEW
);
447 // #95343# ---------------------------------
448 Reference
< ::com::sun::star::awt::XLayoutConstrains
> xLayoutConstrains( m_xBrowserController
, UNO_QUERY
);
449 if( xLayoutConstrains
.is() )
451 ::Size aConstrainedSize
;
452 ::com::sun::star::awt::Size aMinSize
= xLayoutConstrains
->getMinimumSize();
454 sal_Int32
nLeft(0), nTop(0), nRight(0), nBottom(0);
455 GetBorder( nLeft
, nTop
, nRight
, nBottom
);
456 aMinSize
.Width
+= nLeft
+ nRight
+ 8;
457 aMinSize
.Height
+= nTop
+ nBottom
+ 8;
459 aConstrainedSize
.setHeight( aMinSize
.Height
);
460 aConstrainedSize
.setWidth( aMinSize
.Width
);
461 SetMinOutputSizePixel( aConstrainedSize
);
462 aConstrainedSize
= GetOutputSizePixel();
463 bool bResize
= false;
464 if( aConstrainedSize
.Width() < aMinSize
.Width
)
466 aConstrainedSize
.setWidth( aMinSize
.Width
);
469 if( aConstrainedSize
.Height() < aMinSize
.Height
)
471 aConstrainedSize
.setHeight( aMinSize
.Height
);
475 SetOutputSizePixel( aConstrainedSize
);
481 void FmPropBrw::FillInfo( SfxChildWinInfo
& rInfo
) const
483 rInfo
.bVisible
= false;
484 rInfo
.aExtraString
= getCurrentPage();
488 IMPL_LINK_NOARG( FmPropBrw
, OnAsyncGetFocus
)
490 if (m_xBrowserComponentWindow
.is())
491 m_xBrowserComponentWindow
->setFocus();
498 static bool lcl_shouldEnableHelpSection( const Reference
< XComponentContext
>& _rxContext
)
500 const OUString
sConfigName( "/org.openoffice.Office.Common/Forms/PropertyBrowser/" );
501 const OUString
sPropertyName( "DirectHelp" );
503 ::utl::OConfigurationTreeRoot
aConfiguration(
504 ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxContext
, sConfigName
) );
506 bool bEnabled
= false;
507 OSL_VERIFY( aConfiguration
.getNodeValue( sPropertyName
) >>= bEnabled
);
512 void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell
* _pFormShell
)
514 // the document in which we live
515 Reference
< XInterface
> xDocument
;
516 if ( _pFormShell
&& _pFormShell
->GetObjectShell() )
517 xDocument
= _pFormShell
->GetObjectShell()->GetModel();
519 // the context of the controls in our document
520 Reference
< awt::XControlContainer
> xControlContext
;
521 if ( _pFormShell
&& _pFormShell
->GetFormView() )
523 SdrPageView
* pPageView
= _pFormShell
->GetFormView()->GetSdrPageView();
527 SdrPageWindow
* pPageWindow
= pPageView
->GetPageWindow(0L);
531 xControlContext
= pPageWindow
->GetControlContainer();
536 // the default parent window for message boxes
537 Reference
< XWindow
> xParentWindow( VCLUnoHelper::GetInterface ( this ) );
539 // the mapping from control models to control shapes
540 Reference
< XMap
> xControlMap
;
541 FmFormPage
* pFormPage
= _pFormShell
? _pFormShell
->GetCurPage() : NULL
;
543 xControlMap
= pFormPage
->GetImpl().getControlToShapeMap();
545 // our own component context
547 // a ComponentContext for the
548 ::cppu::ContextEntry_Init aHandlerContextInfo
[] =
550 ::cppu::ContextEntry_Init( OUString( "ContextDocument" ), makeAny( xDocument
) ),
551 ::cppu::ContextEntry_Init( OUString( "DialogParentWindow" ), makeAny( xParentWindow
) ),
552 ::cppu::ContextEntry_Init( OUString( "ControlContext" ), makeAny( xControlContext
) ),
553 ::cppu::ContextEntry_Init( OUString( "ControlShapeAccess" ), makeAny( xControlMap
) )
555 m_xInspectorContext
.set(
556 ::cppu::createComponentContext( aHandlerContextInfo
, sizeof( aHandlerContextInfo
) / sizeof( aHandlerContextInfo
[0] ),
559 bool bEnableHelpSection
= lcl_shouldEnableHelpSection( m_xORB
);
561 // an object inspector model
564 ? DefaultFormComponentInspectorModel::createWithHelpSection( m_xInspectorContext
, 3, 5 )
565 : DefaultFormComponentInspectorModel::createDefault( m_xInspectorContext
);
567 // an object inspector
568 m_xBrowserController
.set(
569 ObjectInspector::createWithModel(
570 m_xInspectorContext
, m_xInspectorModel
571 ), css::uno::UNO_QUERY
);
573 if ( !m_xBrowserController
.is() )
575 OUString
sServiceName( "com.sun.star.inspection.ObjectInspector" );
576 ShowServiceNotAvailableError( GetParent(), sServiceName
, true );
580 m_xBrowserController
->attachFrame( Reference
<XFrame
>(m_xMeAsFrame
,UNO_QUERY_THROW
) );
581 m_xBrowserComponentWindow
= m_xMeAsFrame
->getComponentWindow();
582 DBG_ASSERT( m_xBrowserComponentWindow
.is(), "FmPropBrw::impl_createPropertyBrowser_throw: attached the controller, but have no component window!" );
585 if ( bEnableHelpSection
)
587 Reference
< XObjectInspector
> xInspector( m_xBrowserController
, UNO_QUERY_THROW
);
588 Reference
< XObjectInspectorUI
> xInspectorUI( xInspector
->getInspectorUI() );
589 Reference
< XInterface
> xDefaultHelpProvider( DefaultHelpProvider::create( m_xInspectorContext
, xInspectorUI
) );
594 void FmPropBrw::impl_ensurePropertyBrowser_nothrow( FmFormShell
* _pFormShell
)
596 // the document in which we live
597 Reference
< XInterface
> xDocument
;
598 SfxObjectShell
* pObjectShell
= _pFormShell
? _pFormShell
->GetObjectShell() : NULL
;
600 xDocument
= pObjectShell
->GetModel();
601 if ( ( xDocument
== m_xLastKnownDocument
) && m_xBrowserController
.is() )
607 // clean up any previous instances of the object inspector
608 if ( m_xMeAsFrame
.is() )
609 m_xMeAsFrame
->setComponent( NULL
, NULL
);
611 ::comphelper::disposeComponent( m_xBrowserController
);
612 m_xBrowserController
.clear();
613 m_xInspectorModel
.clear();
614 m_xBrowserComponentWindow
.clear();
616 // and create a new one
617 impl_createPropertyBrowser_throw( _pFormShell
);
619 catch( const Exception
& )
621 DBG_UNHANDLED_EXCEPTION();
623 m_xLastKnownDocument
= xDocument
;
627 void FmPropBrw::StateChanged(sal_uInt16 nSID
, SfxItemState eState
, const SfxPoolItem
* pState
)
629 if (!pState
|| SID_FM_PROPERTY_CONTROL
!= nSID
)
632 m_bInStateChange
= true;
635 if (eState
>= SfxItemState::DEFAULT
)
637 FmFormShell
* pShell
= PTR_CAST(FmFormShell
, static_cast<const SfxObjectItem
*>(pState
)->GetShell());
638 InterfaceBag aSelection
;
640 pShell
->GetImpl()->getCurrentSelection( aSelection
);
642 impl_ensurePropertyBrowser_nothrow( pShell
);
644 // set the new object to inspect
645 implSetNewSelection( aSelection
);
647 // if this is the first time we're here, some additional things need to be done ...
648 if ( m_bInitialStateChange
)
650 // if we're just newly created, we want to have the focus
651 PostUserEvent( LINK( this, FmPropBrw
, OnAsyncGetFocus
), NULL
, true );
653 // and additionally, we want to show the page which was active during
654 // our previous incarnation
655 if ( !m_sLastActivePage
.isEmpty() )
659 if ( m_xBrowserController
.is() )
660 m_xBrowserController
->restoreViewData( makeAny( m_sLastActivePage
) );
662 catch( const Exception
& )
664 OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
668 m_bInitialStateChange
= false;
674 implSetNewSelection( InterfaceBag() );
679 OSL_FAIL("FmPropBrw::StateChanged: Exception occurred!");
681 m_bInStateChange
= false;
684 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */