summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp/gridcell.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/fmcomp/gridcell.cxx')
-rw-r--r--svx/source/fmcomp/gridcell.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 7da52af19012..2da40fa9b03c 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1150,10 +1150,22 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle&
OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
{
+ if (!_rxField.is())
+ return OUString();
+
const css::uno::Reference<css::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
FormattedColumnValue fmter( xFormatter, xPS );
- return fmter.getFormattedValue();
+ try
+ {
+ return fmter.getFormattedValue();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return OUString();
+
}