20#include <config_features.h>
27#include <osl/diagnose.h>
29#include <com/sun/star/form/FormButtonType.hpp>
30#include <com/sun/star/beans/XPropertySet.hpp>
31#include <com/sun/star/awt/XControlModel.hpp>
36#include <document.hxx>
37#include <drawview.hxx>
43 const OUString& rTarget,
44 const Point* pInsPos )
66 SdrObjKind::FormButton);
69 OSL_ENSURE( pUnoCtrl,
"no SdrUnoObj");
74 OSL_ENSURE( xControlModel.is(),
"UNO control without model" );
75 if( !xControlModel.is() )
78 uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY );
80 xPropSet->setPropertyValue(
"Label",
uno::Any(rName) );
83 xPropSet->setPropertyValue(
"TargetURL",
uno::Any(aTmp) );
90 xPropSet->setPropertyValue(
"ButtonType",
uno::Any(form::FormButtonType_URL) );
92#if HAVE_FEATURE_AVMEDIA
95 xPropSet->setPropertyValue(
"DispatchURLInternal",
uno::Any(
true) );
static OUString GetAbsURL(std::u16string_view rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
tools::Long AdjustX(tools::Long nHorzMove)
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
SfxObjectShell * GetDocumentShell() const
bool InsertObjectSafe(SdrObject *pObj, SdrPageView &rPV)
void InsertURLButton(const OUString &rName, const OUString &rURL, const OUString &rTarget, const Point *pInsPos)
void ErrorMessage(TranslateId pGlobStrId)
Point GetInsertPos() const
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
ScDrawView * GetScDrawView()
ScDocument & GetDocument() const
ScDBFunc * GetView() const
static rtl::Reference< SdrObject > MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
OUString GetBaseURL(bool bForSaving=false)
SfxMedium * GetMedium() const
constexpr tools::Long Width() const
Point PixelToLogic(const Point &rDevicePt) const