diff options
Diffstat (limited to 'svx/source/fmcomp/fmgridif.cxx')
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index d6a530db85e3..36c1f0b5e8fb 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -365,7 +365,8 @@ Reference< XInterface > SAL_CALL FmXGridControl_NewInstance_Impl(const Reference DBG_NAME(FmXGridControl ) //------------------------------------------------------------------------------ FmXGridControl::FmXGridControl(const Reference< XMultiServiceFactory >& _rxFactory) - :m_aModifyListeners(*this, GetMutex()) + :UnoControl( _rxFactory) + ,m_aModifyListeners(*this, GetMutex()) ,m_aUpdateListeners(*this, GetMutex()) ,m_aContainerListeners(*this, GetMutex()) ,m_aSelectionListeners(*this, GetMutex()) @@ -1974,10 +1975,12 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V } else if ( 0 == PropertyName.compareTo( FM_PROP_HELPURL ) ) { - INetURLObject aHID( ::comphelper::getString(Value) ); - DBG_ASSERT( aHID.GetProtocol() == INET_PROT_HID, "Wrong HelpURL!" ); + ::rtl::OUString sHelpURL; + OSL_VERIFY( Value >>= sHelpURL ); + INetURLObject aHID( sHelpURL ); if ( aHID.GetProtocol() == INET_PROT_HID ) - pGrid->SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); + sHelpURL = aHID.GetURLPath(); + pGrid->SetHelpId( rtl::OUStringToOString( sHelpURL, RTL_TEXTENCODING_UTF8 ) ); } else if ( 0 == PropertyName.compareTo( FM_PROP_DISPLAYSYNCHRON ) ) { @@ -2073,25 +2076,28 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V } else if ( 0 == PropertyName.compareTo( FM_PROP_HASNAVIGATION ) ) { - if (Value.getValueType() == ::getBooleanCppuType()) - pGrid->EnableNavigationBar(*(sal_Bool*)Value.getValue()); + sal_Bool bValue( sal_True ); + OSL_VERIFY( Value >>= bValue ); + pGrid->EnableNavigationBar( bValue ); } else if ( 0 == PropertyName.compareTo( FM_PROP_RECORDMARKER ) ) { - if (Value.getValueType() == ::getBooleanCppuType()) - pGrid->EnableHandle(*(sal_Bool*)Value.getValue()); + sal_Bool bValue( sal_True ); + OSL_VERIFY( Value >>= bValue ); + pGrid->EnableHandle( bValue ); } else if ( 0 == PropertyName.compareTo( FM_PROP_ENABLED ) ) { - if (Value.getValueType() == ::getBooleanCppuType()) - { - // Im DesignModus nur das Datenfenster disablen - // Sonst kann das Control nicht mehr konfiguriert werden - if (isDesignMode()) - pGrid->GetDataWindow().Enable(*(sal_Bool*)Value.getValue()); - else - pGrid->Enable(*(sal_Bool*)Value.getValue()); - } + sal_Bool bValue( sal_True ); + OSL_VERIFY( Value >>= bValue ); + pGrid->EnableHandle( bValue ); + + // Im DesignModus nur das Datenfenster disablen + // Sonst kann das Control nicht mehr konfiguriert werden + if (isDesignMode()) + pGrid->GetDataWindow().Enable( bValue ); + else + pGrid->Enable( bValue ); } else VCLXWindow::setProperty( PropertyName, Value ); |