diff options
author | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-02-03 12:49:56 +0100 |
---|---|---|
committer | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-02-03 12:49:56 +0100 |
commit | 293b43ae4de478c550c8461de164f7cb8883daab (patch) | |
tree | 2571846610af8731f7b28c78eefdb55449aceed0 /svx/source/fmcomp/fmgridif.cxx | |
parent | 9073d77706b0b8c32f63a5ebd2954e1d4c0a3ce9 (diff) | |
parent | a1a2a5a68046e75aba3dfd6ba06083a314f12182 (diff) |
chart52: merge with DEV300_m99
Diffstat (limited to 'svx/source/fmcomp/fmgridif.cxx')
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 37 |
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 ); |