summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp/fmgridif.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/fmcomp/fmgridif.cxx')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx37
1 files changed, 21 insertions, 16 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index d6a530db85e3..783e07c3a2ed 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1974,10 +1974,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 +2075,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 );