19#ifndef INCLUDED_VBAHELPER_VBAHELPER_HXX
20#define INCLUDED_VBAHELPER_VBAHELPER_HXX
25#include <com/sun/star/lang/IllegalArgumentException.hpp>
26#include <com/sun/star/uno/Any.hxx>
27#include <com/sun/star/uno/Reference.hxx>
28#include <com/sun/star/uno/Sequence.hxx>
30#include <rtl/ustring.hxx>
38 namespace awt {
class XControl; }
39 namespace awt {
class XDevice; }
40 namespace awt {
class XUnitConversion; }
41 namespace awt {
class XWindow; }
42 namespace beans {
class XIntrospectionAccess; }
44 namespace beans {
struct PropertyValue; }
45 namespace drawing {
class XShape; }
46 namespace frame {
class XModel; }
47 namespace script {
class XTypeConverter; }
49 namespace uno {
class XComponentContext; }
60 css::uno::Reference< T >
getXSomethingFromArgs( css::uno::Sequence< css::uno::Any >
const & args, sal_Int32 nPos,
bool bCanBeNull =
true )
62 if (
args.getLength() < (
nPos + 1) )
63 throw css::lang::IllegalArgumentException();
64 css::uno::Reference< T > aSomething(
args[
nPos ], css::uno::UNO_QUERY );
65 if ( !bCanBeNull && !aSomething.is() )
66 throw css::lang::IllegalArgumentException();
70 class XHelperInterface;
79 css::uno::Reference< css::frame::XModel >
getCurrentDoc(
const OUString& sKey );
95 VBAHELPER_DLLPUBLIC void dispatchRequests (
const css::uno::Reference< css::frame::XModel>& xModel,
const OUString & aUrl,
const css::uno::Sequence< css::beans::PropertyValue >& sProps );
106 VBAHELPER_DLLPUBLIC void PrintOutHelper(
SfxViewShell const * pViewShell,
const css::uno::Any& From,
const css::uno::Any& To,
const css::uno::Any& Copies,
const css::uno::Any& Preview,
const css::uno::Any& ActivePrinter,
const css::uno::Any& PrintToFile,
const css::uno::Any& Collate,
const css::uno::Any& PrToFileName,
bool bSelection );
149 void setInPoints(
double points) ;
150 double getInHundredthsOfOneMillimeter()
const;
151 static sal_Int32 getInHundredthsOfOneMillimeter(
double points);
152 static double getInPoints(
int _hmm);
178 css::uno::Reference< css::drawing::XShape >
xShape;
182 ShapeHelper( css::uno::Reference< css::drawing::XShape > _xShape);
184 double getHeight()
const;
185 void setHeight(
double _fheight);
186 double getWidth()
const;
187 void setWidth(
double _fWidth);
188 double getLeft()
const;
189 void setLeft(
double _fLeft);
190 double getTop()
const;
191 void setTop(
double _fTop);
199 virtual double getLeft()
const override;
200 virtual void setLeft(
double nLeft )
override;
201 virtual double getTop()
const override;
202 virtual void setTop(
double nTop )
override;
203 virtual double getHeight()
const override;
204 virtual void setHeight(
double nHeight )
override;
205 virtual double getWidth()
const override;
206 virtual void setWidth(
double nWidth)
override;
210#define VBA_LEFT "PositionX"
211#define VBA_TOP "PositionY"
217 const css::uno::Reference< css::awt::XControl >& xControl,
218 double fOffsetX,
double fOffsetY );
219 virtual double getLeft()
const override;
220 virtual void setLeft(
double fLeft )
override;
221 virtual double getTop()
const override;
222 virtual void setTop(
double fTop )
override;
223 virtual double getWidth()
const override;
224 virtual void setWidth(
double fWidth )
override;
225 virtual double getHeight()
const override;
226 virtual void setHeight(
double fHeight )
override;
227 virtual double getInnerWidth()
const override;
228 virtual void setInnerWidth(
double fWidth )
override;
229 virtual double getInnerHeight()
const override;
230 virtual void setInnerHeight(
double fHeight )
override;
231 virtual double getOffsetX()
const override;
232 virtual double getOffsetY()
const override;
235 double implGetPos(
bool bPosY )
const;
236 void implSetPos(
double fPos,
bool bPosY );
237 double implGetSize(
bool bHeight,
bool bOuter )
const;
238 void implSetSize(
double fSize,
bool bHeight,
bool bOuter );
253 static OUString
getUniqueName(
const css::uno::Sequence< OUString >& _slist,
const OUString& _sElementName, std::u16string_view _sSuffixSeparator);
254 static OUString
getUniqueName(
const css::uno::Sequence< OUString >& _slist,
const OUString& _sElementName, std::u16string_view _sSuffixSeparator, sal_Int32 _nStartSuffix );
256 static sal_Int32 FieldInList(
const css::uno::Sequence< OUString >& SearchList,
const OUString& SearchString );
264 static void basicexception(
const css::uno::Exception&
ex,
ErrCode err, std::u16string_view );
267 static void basicexception(
ErrCode err, std::u16string_view additionalArgument );
270 static void basicexception(
const css::uno::Exception&
ex );
virtual double getLeft() const =0
virtual void setLeft(double)=0
virtual void setInnerHeight(double)
virtual double getOffsetX() const
virtual void setInnerWidth(double)
virtual double getOffsetY() const
virtual double getTop() const =0
virtual double getInnerWidth() const
virtual void setHeight(double)=0
virtual ~AbstractGeometryAttributes()
virtual void setTop(double)=0
virtual double getHeight() const =0
virtual double getInnerHeight() const
virtual void setWidth(double)=0
virtual double getWidth() const =0
ShapeHelper m_aShapeHelper
static OUString getUniqueName(const css::uno::Sequence< OUString > &_slist, const OUString &_sElementName, std::u16string_view _sSuffixSeparator)
static OUString getUniqueName(const css::uno::Sequence< OUString > &_slist, const OUString &_sElementName, std::u16string_view _sSuffixSeparator, sal_Int32 _nStartSuffix)
css::uno::Reference< css::drawing::XShape > xShape
class SAL_NO_VTABLE XPropertySet
double PixelsToPoints(const css::uno::Reference< css::awt::XDevice > &xDevice, double fPixels, bool bVertical)
bool extractBoolFromAny(const uno::Any &rAny)
css::uno::Reference< T > getXSomethingFromArgs(css::uno::Sequence< css::uno::Any > const &args, sal_Int32 nPos, bool bCanBeNull=true)
sal_Int32 XLRGBToOORGB(sal_Int32 nCol)
void PrintOutHelper(SfxViewShell const *pViewShell, const uno::Any &From, const uno::Any &To, const uno::Any &Copies, const uno::Any &Preview, const uno::Any &, const uno::Any &, const uno::Any &Collate, const uno::Any &PrToFileName, bool bUseSelection)
uno::Reference< script::XTypeConverter > const & getTypeConverter(const uno::Reference< uno::XComponentContext > &xContext)
void PrintPreviewHelper(const css::uno::Any &, SfxViewShell const *pViewShell)
uno::Any getPropertyValue(const uno::Sequence< beans::PropertyValue > &aProp, const OUString &aName)
void WaitUntilPreviewIsClosed(SfxViewFrame *pViewFrame)
void setCursorHelper(const uno::Reference< frame::XModel > &xModel, PointerStyle nPointer, bool bOverWrite)
uno::Reference< frame::XModel > getCurrentDoc(const OUString &sKey)
uno::Reference< frame::XModel > getCurrentExcelDoc(const uno::Reference< uno::XComponentContext > &xContext)
OUString VBAToRegexp(const OUString &rIn)
uno::Reference< XHelperInterface > getUnoDocModule(std::u16string_view aModName, SfxObjectShell const *pShell)
uno::Reference< frame::XModel > getThisWordDoc(const uno::Reference< uno::XComponentContext > &xContext)
uno::Reference< beans::XIntrospectionAccess > getIntrospectionAccess(const uno::Any &aObject)
void setOrAppendPropertyValue(uno::Sequence< beans::PropertyValue > &aProp, const OUString &aName, const uno::Any &aValue)
OUString extractStringFromAny(const uno::Any &rAny, bool bUppercaseBool)
void dispatchExecute(SfxViewShell const *pViewShell, sal_uInt16 nSlot)
SfxObjectShell * getSfxObjShell(const uno::Reference< frame::XModel > &xModel)
double PointsToPixels(const css::uno::Reference< css::awt::XDevice > &xDevice, double fPoints, bool bVertical)
uno::Reference< XHelperInterface > getVBADocument(const uno::Reference< frame::XModel > &xModel)
PointerStyle getPointerStyle(const uno::Reference< frame::XModel > &xModel)
bool setPropertyValue(uno::Sequence< beans::PropertyValue > &aProp, const OUString &aName, const uno::Any &aValue)
OUString getAnyAsString(const uno::Any &pvargItem)
void setDefaultPropByIntrospection(const uno::Any &aObj, const uno::Any &aValue)
uno::Reference< frame::XModel > getCurrentWordDoc(const uno::Reference< uno::XComponentContext > &xContext)
void dispatchRequests(const uno::Reference< frame::XModel > &xModel, const OUString &aUrl, const uno::Sequence< beans::PropertyValue > &sProps)
sal_Int32 OORGBToXLRGB(sal_Int32 nCol)
bool executeRunTimeLibrary(const std::u16string_view &rSbRtl_command, SbxArray *pParameters)
uno::Reference< frame::XModel > getThisExcelDoc(const uno::Reference< uno::XComponentContext > &xContext)
#define VBAHELPER_DLLPUBLIC