summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbahelper.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-13 13:03:24 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-13 13:03:24 +0000
commit90e0834d5612cf75e9a21b3a6bab10f6a98ac053 (patch)
treee81fbf0a382cf14023e45571b6f6e48396a52659 /sc/source/ui/vba/vbahelper.hxx
parent6fed8a270237f81690addb2f5853e372535d66a9 (diff)
CWS-TOOLING: integrate CWS npower11
2009-01-21 11:00:00 +0100 npower r266639 : replace ScAddress::CONV_XL_R1C1 with formula::FormulaGrammar::CONV_XL_R1C1 2009-01-21 10:58:33 +0100 npower r266638 : fixup access for changes to compiler.[ch]xx 2009-01-21 10:57:46 +0100 npower r266637 : replace the static with non-static member ( to align with the latest m39 ) changes 2009-01-20 11:53:52 +0100 npower r266562 : CWS-TOOLING: rebase CWS npower11 to trunk@266428 (milestone: DEV300:m39) 2009-01-09 23:31:00 +0100 cloph r266122 : fix typo (missing "="), initialize variables to avoid WaE breakage 2009-01-09 11:57:20 +0100 npower r266071 : wae Mac OSX gcc-4.0.1 (PPC) 2009-01-08 11:09:49 +0100 npower r265986 : wae - Mac OSX gcc-4.0.1 (PPC) 2009-01-07 10:33:20 +0100 npower r265952 : wae Mac OSX gcc-4.0.1 2008-12-18 19:14:10 +0100 npower r265712 : wae for wntmsci12 target 2008-12-17 16:14:54 +0100 npower r265640 : add Outline property for Font, also remove growing list of friend classes for ScCellRangeObj and replace by a single class. 2008-12-17 16:11:02 +0100 npower r265639 : fix path variable for 3.1, also tweak the unix logs 2008-12-11 02:39:58 +0100 hanbo r265233 : fix the vba/vba namespace of constants 2008-11-25 17:05:39 +0100 npower r264317 : namespace changes 2008-11-25 14:12:37 +0100 npower r264308 : revert changes made by mistake when migrating cws 2008-11-25 13:30:59 +0100 npower r264296 : i#93944# namespace changes 2008-11-25 13:29:25 +0100 npower r264293 : i#93944# namespace changes 2008-11-25 13:27:08 +0100 npower r264289 : i#93944# namespace changes 2008-11-24 18:24:17 +0100 npower r264263 : svn migration 2008-11-24 18:22:47 +0100 npower r264262 : not needed anymore 2008-11-24 18:21:23 +0100 npower r264261 : svn migration 2008-11-24 18:18:31 +0100 npower r264260 : svn migration
Diffstat (limited to 'sc/source/ui/vba/vbahelper.hxx')
-rw-r--r--sc/source/ui/vba/vbahelper.hxx95
1 files changed, 92 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbahelper.hxx b/sc/source/ui/vba/vbahelper.hxx
index ed55d490b371..3def6b078096 100644
--- a/sc/source/ui/vba/vbahelper.hxx
+++ b/sc/source/ui/vba/vbahelper.hxx
@@ -31,20 +31,25 @@
#define SC_VBA_HELPER_HXX
#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/beans/XIntrospectionAccess.hpp>
#include <com/sun/star/script/BasicErrorException.hpp>
#include <com/sun/star/script/XTypeConverter.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XDevice.hpp>
#include <basic/sberrors.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <docsh.hxx>
+#include <sfx2/dispatch.hxx>
+#include <ooo/vba/msforms/XShape.hpp>
+#include "cellsuno.hxx"
namespace css = ::com::sun::star;
-namespace org
+namespace ooo
{
- namespace openoffice
+ namespace vba
{
template < class T >
css::uno::Reference< T > getXSomethingFromArgs( css::uno::Sequence< css::uno::Any > const & args, sal_Int32 nPos, bool bCanBeNull = true ) throw (css::lang::IllegalArgumentException)
@@ -56,10 +61,12 @@ namespace org
throw css::lang::IllegalArgumentException();
return aSomething;
}
+ css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess( const css::uno::Any& aObject ) throw (css::uno::RuntimeException);
css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl) ;
void dispatchRequests (css::uno::Reference< css::frame::XModel>& xModel,rtl::OUString & aUrl, css::uno::Sequence< css::beans::PropertyValue >& sProps ) ;
+ void dispatchExecute(css::uno::Reference< css::frame::XModel>& xModel, USHORT nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON );
void implnCopy();
void implnPaste();
void implnCut();
@@ -79,6 +86,7 @@ namespace org
// contains an empty object reference
const css::uno::Any& aNULL();
void PrintOutHelper( 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, css::uno::Reference< css::frame::XModel >& xModel, sal_Bool bSelection );
+ void PrintPreviewHelper( const css::uno::Any& EnableChanges, css::uno::Reference< css::frame::XModel >& xModel );
rtl::OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException );
rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic )
@@ -86,6 +94,13 @@ namespace org
double PointsToPixels( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
+
+class ScVbaCellRangeAccess
+{
+public:
+ static SfxItemSet* GetDataSet( ScCellRangeObj* pRangeObj );
+};
+
class Millimeter
{
//Factor to translate between points and hundredths of millimeters:
@@ -136,6 +151,80 @@ public:
return points;
}
};
+
+class AbstractGeometryAttributes // probably should replace the ShapeHelper below
+{
+public:
+ virtual ~AbstractGeometryAttributes() {}
+ virtual double getLeft() = 0;
+ virtual void setLeft( double ) = 0;
+ virtual double getTop() = 0;
+ virtual void setTop( double ) = 0;
+ virtual double getHeight() = 0;
+ virtual void setHeight( double ) = 0;
+ virtual double getWidth() = 0;
+ virtual void setWidth( double ) = 0;
+};
+
+class ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
+{
+public:
+ css::uno::Reference< ooo::vba::msforms::XShape > m_xShape;
+ ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape );
+ virtual double getLeft()
+ {
+ return m_xShape->getLeft();
+ }
+ virtual void setLeft( double nLeft )
+ {
+ m_xShape->setLeft( nLeft );
+ }
+ virtual double getTop()
+ {
+ return m_xShape->getTop();
+ }
+ virtual void setTop( double nTop )
+ {
+ m_xShape->setTop( nTop );
+ }
+
+ virtual double getHeight()
+ {
+ return m_xShape->getHeight();
+ }
+ virtual void setHeight( double nHeight )
+ {
+ m_xShape->setHeight( nHeight );
+ }
+ virtual double getWidth()
+ {
+ return m_xShape->getWidth();
+ }
+ virtual void setWidth( double nWidth)
+ {
+ m_xShape->setHeight( nWidth );
+ }
+
+
+};
+#define VBA_LEFT "PositionX"
+#define VBA_TOP "PositionY"
+class UserFormGeometryHelper : public AbstractGeometryAttributes
+{
+
+ css::uno::Reference< css::beans::XPropertySet > mxModel;
+public:
+ UserFormGeometryHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::awt::XControl >& xControl );
+ virtual double getLeft();
+ virtual void setLeft( double nLeft );
+ virtual double getTop();
+ virtual void setTop( double nTop );
+ virtual double getHeight();
+ virtual void setHeight( double nHeight );
+ virtual double getWidth();
+ virtual void setWidth( double nWidth);
+};
+
class ShapeHelper
{
protected:
@@ -250,7 +339,7 @@ public:
} // openoffice
} // org
-namespace oo = org::openoffice;
+namespace ov = ooo::vba;
#ifdef DEBUG
# define SC_VBA_FIXME(a) OSL_TRACE( a )