summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-03 15:53:56 +0100
committerMathias Bauer <mba@openoffice.org>2011-02-03 15:53:56 +0100
commit747861e9ac6e6d4cb70fd89891f855653ee6ea74 (patch)
treece5ec3410e41d5e806026bd298a40980dbea9817 /svx/source/fmcomp
parentece4a30fc61589ead802d834c71369f7196e831d (diff)
parent8cdff22a144e3a0a85b5d0219485ca5ab04aa9cf (diff)
CWS gnumake3: resync to m99
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx37
-rw-r--r--svx/source/fmcomp/gridcell.cxx10
2 files changed, 26 insertions, 21 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 21c27bf0cc..ed752f2feb 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 );
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index d8d07f23f9..cd586a6558 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1193,7 +1193,7 @@ String DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Re
if ( _rxField.is() )
try
{
- aString = getValue( _rxField, xFormatter, m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType);
+ aString = getFormattedValue( _rxField, xFormatter, m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType);
}
catch( const Exception& )
{
@@ -1534,7 +1534,7 @@ String DbFormattedField::GetFormatText(const Reference< ::com::sun::star::sdb::X
// ein double-Feld bindet und als Text formatiert, liefert m_rColumn.IsNumeric() sal_True. Das heisst
// also einfach, dass ich den Inhalt der Variant mittels getDouble abfragen kann, und dann kann
// ich den Rest (die Formatierung) dem FormattedField ueberlassen.
- double dValue = getValue(_rxField, m_rColumn.GetParent().getNullDate(), m_nKeyType);
+ double dValue = getValue( _rxField, m_rColumn.GetParent().getNullDate() );
if (_rxField->wasNull())
return aText;
((FormattedField*)m_pPainter)->SetValue(dValue);
@@ -1578,7 +1578,7 @@ void DbFormattedField::UpdateFromField(const Reference< ::com::sun::star::sdb::X
// ein double-Feld bindet und als Text formatiert, liefert m_rColumn.IsNumeric() sal_True. Das heisst
// also einfach, dass ich den Inhalt der Variant mittels getDouble abfragen kann, und dann kann
// ich den Rest (die Formatierung) dem FormattedField ueberlassen.
- double dValue = getValue(_rxField, m_rColumn.GetParent().getNullDate(), m_nKeyType);
+ double dValue = getValue( _rxField, m_rColumn.GetParent().getNullDate() );
if (_rxField->wasNull())
m_pWindow->SetText(String());
else
@@ -2556,7 +2556,7 @@ String DbComboBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn
if (_rxField.is())
try
{
- aString = getValue( _rxField, xFormatter, m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType );
+ aString = getFormattedValue( _rxField, xFormatter, m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType );
}
catch( const Exception& )
{
@@ -3167,7 +3167,7 @@ void DbFilterField::Update()
while (!xListCursor->isAfterLast() && i++ < SHRT_MAX) // max anzahl eintraege
{
- aStr = getValue(xDataField, xFormatter, aNullDate, nFormatKey, nKeyType);
+ aStr = getFormattedValue(xDataField, xFormatter, aNullDate, nFormatKey, nKeyType);
aStringList.push_back(aStr);
xListCursor->next();
}