summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/drformsh.cxx
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-08-13 20:12:30 +0000
committerjp <jp@openoffice.org>2001-08-13 20:12:30 +0000
commit1f6ef83d39fdb5b2967c086d9b2238522643e166 (patch)
tree868fdf1cf2bfa649a52d183293e3df06c07e9a02 /sw/source/ui/shells/drformsh.cxx
parent2fba3047844b10428fa7ffdc1cf8a877b7a5051d (diff)
Bug #90815#: Execute - use hasPropertyState
Diffstat (limited to 'sw/source/ui/shells/drformsh.cxx')
-rw-r--r--sw/source/ui/shells/drformsh.cxx44
1 files changed, 25 insertions, 19 deletions
diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx
index eccfd0ef37ed..51758f03bfdc 100644
--- a/sw/source/ui/shells/drformsh.cxx
+++ b/sw/source/ui/shells/drformsh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: drformsh.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:46 $
+ * last change: $Author: jp $ $Date: 2001-08-13 21:12:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -165,30 +165,33 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY);
- uno::Any aTmp;
-
// Darf man eine URL an dem Objekt setzen?
+ OUString sTargetURL( C2U( "TargetURL" ));
uno::Reference< beans::XPropertySetInfo > xPropInfoSet = xPropSet->getPropertySetInfo();
- beans::Property aProp = xPropInfoSet->getPropertyByName( C2U("TargetURL" ));
- if (aProp.Name.getLength())
+ if( xPropInfoSet->hasPropertyByName( sTargetURL ))
{
- // Ja!
- aTmp <<= OUString(rHLinkItem.GetName());
- xPropSet->setPropertyValue(C2U("Label"), aTmp );
+ beans::Property aProp = xPropInfoSet->getPropertyByName( sTargetURL );
+ if( aProp.Name.getLength() )
+ {
+ uno::Any aTmp;
+ // Ja!
+ aTmp <<= OUString(rHLinkItem.GetName());
+ xPropSet->setPropertyValue(C2U("Label"), aTmp );
- aTmp <<= OUString(INetURLObject::RelToAbs(rHLinkItem.GetURL()));
- xPropSet->setPropertyValue( C2U("TargetURL"), aTmp );
+ aTmp <<= OUString(INetURLObject::RelToAbs(rHLinkItem.GetURL()));
+ xPropSet->setPropertyValue( sTargetURL, aTmp );
- if( rHLinkItem.GetTargetFrame().Len() )
- {
- aTmp <<= OUString(rHLinkItem.GetTargetFrame());
- xPropSet->setPropertyValue( C2U("TargetFrame"), aTmp );
- }
+ if( rHLinkItem.GetTargetFrame().Len() )
+ {
+ aTmp <<= OUString(rHLinkItem.GetTargetFrame());
+ xPropSet->setPropertyValue( C2U("TargetFrame"), aTmp );
+ }
- form::FormButtonType eButtonType = form::FormButtonType_URL;
- aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0));
- xPropSet->setPropertyValue( C2U("ButtonType"), aTmp );
+ form::FormButtonType eButtonType = form::FormButtonType_URL;
+ aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0));
+ xPropSet->setPropertyValue( C2U("ButtonType"), aTmp );
+ }
}
}
}
@@ -309,6 +312,9 @@ SwDrawFormShell::~SwDrawFormShell()
Source Code Control System - History
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/18 17:14:46 hr
+ initial import
+
Revision 1.19 2000/09/18 16:06:03 willem.vandorp
OpenOffice header added.