20 #include <config_features.h>
28 #include <com/sun/star/form/FormButtonType.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 #include <com/sun/star/awt/XControlModel.hpp>
35 #include <document.hxx>
36 #include <drawview.hxx>
37 #include <globstr.hrc>
42 const OUString& rTarget,
43 const Point* pInsPos )
52 ErrorMessage(STR_PROTECTIONERR);
68 OSL_ENSURE( pUnoCtrl,
"no SdrUnoObj");
73 OSL_ENSURE( xControlModel.is(),
"UNO control without model" );
74 if( !xControlModel.is() )
77 uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
79 xPropSet->setPropertyValue(
"Label",
uno::Any(rName) );
82 xPropSet->setPropertyValue(
"TargetURL",
uno::Any(aTmp) );
84 if( !rTarget.isEmpty() )
86 xPropSet->setPropertyValue(
"TargetFrame",
uno::Any(rTarget) );
89 xPropSet->setPropertyValue(
"ButtonType",
uno::Any(form::FormButtonType_URL) );
91 #if HAVE_FEATURE_AVMEDIA
94 xPropSet->setPropertyValue(
"DispatchURLInternal",
uno::Any(
true) );
102 aPos = GetInsertPos();
105 Size aSize = GetActiveWin()->PixelToLogic(
Size(140, 20));
108 aPos.AdjustX( -(aSize.
Width()) );
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
static SdrObject * MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
ScDocument & GetDocument() const
static OUString GetAbsURL(OUString const &rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
tools::Long Width() const
OUString GetBaseURL(bool bForSaving=false)
virtual void SetLogicRect(const tools::Rectangle &rRect)
ScDBFunc * GetView() const
bool InsertObjectSafe(SdrObject *pObj, SdrPageView &rPV)
ScDrawView * GetScDrawView()
SdrPageView * GetSdrPageView() const
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
SfxObjectShell * GetDocumentShell() const
void InsertURLButton(const OUString &rName, const OUString &rURL, const OUString &rTarget, const Point *pInsPos)
SdrModel * GetModel() const
SfxMedium * GetMedium() const