summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2001-05-04 14:09:29 +0000
committerSven Jacobi <sj@openoffice.org>2001-05-04 14:09:29 +0000
commit0c8a7ec5f5a113d37632206af8605ff8a18792db (patch)
tree7255e91cfd99f3086e34f909252e5f2bef2a360c
parent0d7a8d167d1f06a23c0ceb246748104e83cb09ca (diff)
#85379# added method to set PropertyValues at XPropertySets
-rw-r--r--svx/source/msfilter/msdffimp.cxx42
1 files changed, 40 insertions, 2 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index ef68ecd36c91..ede5479a03f9 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: msdffimp.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: sj $ $Date: 2001-05-02 10:23:16 $
+ * last change: $Author: sj $ $Date: 2001-05-04 15:09:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -5063,3 +5063,41 @@ SdrObject* SvxMSDffManager::GetAutoForm( MSO_SPT eTyp ) const
return pRet;
}
+sal_Bool SvxMSDffManager::SetPropValue(
+ const ::com::sun::star::uno::Any& rAny,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
+ const String& rPropName,
+ sal_Bool bTestPropertyAvailability )
+{
+ sal_Bool bRetValue = sal_True;
+ if ( bTestPropertyAvailability )
+ {
+ bRetValue = sal_False;
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
+ aXPropSetInfo( rXPropSet->getPropertySetInfo() );
+ if ( aXPropSetInfo.is() )
+ bRetValue = aXPropSetInfo->hasPropertyByName( rPropName );
+ }
+ catch( ::com::sun::star::uno::Exception& )
+ {
+ bRetValue = sal_False;
+ }
+ }
+ if ( bRetValue )
+ {
+ try
+ {
+ rXPropSet->setPropertyValue( rPropName, rAny );
+ bRetValue = sal_True;
+ }
+ catch( ::com::sun::star::uno::Exception& )
+ {
+ bRetValue = sal_False;
+ }
+ }
+ return bRetValue;
+}
+
+