summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-06-11 13:57:34 +0000
committerOliver Bolte <obo@openoffice.org>2007-06-11 13:57:34 +0000
commitcb8cd3c3f0b8a6b3dc92e5b94c9b574364f92e56 (patch)
treedf7ead93fbfb0901fb68b6f0a1985b29919cebfe /chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
parent875bb9ec43f4a07aebb9b7811f92304b7e7884d7 (diff)
INTEGRATION: CWS chart05 (1.2.2); FILE MERGED
2007/05/30 12:20:30 iha 1.2.2.1: #i77915# 3D xy chart should be deep - don't crash when chart class is missing in xml chart context
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index 21f087b8ea3d..1cf2a75d8e58 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: WrappedNumberFormatProperty.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: vg $ $Date: 2007-05-22 17:22:23 $
+ * last change: $Author: obo $ $Date: 2007-06-11 14:57:34 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -39,6 +39,11 @@
#include "WrappedNumberFormatProperty.hxx"
#include "macros.hxx"
+// header for define DBG_ERROR
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
@@ -92,6 +97,11 @@ void WrappedNumberFormatProperty::setPropertyValue( const Any& rOuterValue, cons
Any WrappedNumberFormatProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
+ if( !xInnerPropertySet.is() )
+ {
+ DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::getPropertyValue");
+ return Any();
+ }
Any aRet( xInnerPropertySet->getPropertyValue( m_aInnerName ));
if( !aRet.hasValue() )
{
@@ -134,6 +144,12 @@ WrappedLinkNumberFormatProperty::~WrappedLinkNumberFormatProperty()
void WrappedLinkNumberFormatProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
+ if( !xInnerPropertySet.is() )
+ {
+ DBG_ERROR("missing xInnerPropertySet in WrappedNumberFormatProperty::setPropertyValue");
+ return;
+ }
+
bool bLinkFormat;
if( rOuterValue >>= bLinkFormat )
{