summaryrefslogtreecommitdiff
path: root/patches/vba/vba-fix-control-shape-geom-fix.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/vba/vba-fix-control-shape-geom-fix.diff')
-rw-r--r--patches/vba/vba-fix-control-shape-geom-fix.diff233
1 files changed, 0 insertions, 233 deletions
diff --git a/patches/vba/vba-fix-control-shape-geom-fix.diff b/patches/vba/vba-fix-control-shape-geom-fix.diff
deleted file mode 100644
index 71049740d..000000000
--- a/patches/vba/vba-fix-control-shape-geom-fix.diff
+++ /dev/null
@@ -1,233 +0,0 @@
-diff --git sc/source/ui/vba/vbashape.cxx sc/source/ui/vba/vbashape.cxx
-index a8d9e82..eb31a64 100644
---- sc/source/ui/vba/vbashape.cxx
-+++ sc/source/ui/vba/vbashape.cxx
-@@ -53,6 +53,7 @@ using namespace ::vos;
- ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, sal_Int32 nType ) throw( lang::IllegalArgumentException ) : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType )
- {
- m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
-+ m_pShapeHelper.reset( new ShapeHelper( m_xShape ) );
- addListeners();
- }
-
-@@ -179,59 +180,49 @@ ScVbaShape::setName( const rtl::OUString& _name ) throw (uno::RuntimeException)
- double SAL_CALL
- ScVbaShape::getHeight() throw (uno::RuntimeException)
- {
-- return Millimeter::getInPoints( m_xShape->getSize().Height );
-+ return m_pShapeHelper->getHeight();
- }
-
- void SAL_CALL
- ScVbaShape::setHeight( double _height ) throw (uno::RuntimeException)
- {
-- awt::Size aSize( m_xShape->getSize() );
-- aSize.Height = Millimeter::getInHundredthsOfOneMillimeter( _height );
-- m_xShape->setSize( aSize );
-+ m_pShapeHelper->setHeight( _height );
- }
-
- double SAL_CALL
- ScVbaShape::getWidth() throw (uno::RuntimeException)
- {
-- return Millimeter::getInPoints( m_xShape->getSize().Width );
-+ return m_pShapeHelper->getWidth();
- }
-
- void SAL_CALL
- ScVbaShape::setWidth( double _width ) throw (uno::RuntimeException)
- {
-- awt::Size aSize( m_xShape->getSize() );
-- aSize.Width = Millimeter::getInHundredthsOfOneMillimeter( _width );
-- m_xShape->setSize( aSize );
-+ m_pShapeHelper->setWidth( _width );
- }
-
- double SAL_CALL
- ScVbaShape::getLeft() throw (uno::RuntimeException)
- {
-- return Millimeter::getInPoints( m_xShape->getPosition().X );
-+ return m_pShapeHelper->getLeft();
- }
-
- void SAL_CALL
- ScVbaShape::setLeft( double _left ) throw (uno::RuntimeException)
- {
-- awt::Point oldPosition;
-- oldPosition = m_xShape->getPosition();
-- oldPosition.X = Millimeter::getInHundredthsOfOneMillimeter( _left );
-- m_xShape->setPosition( oldPosition );
-+ m_pShapeHelper->setLeft( _left );
- }
-
- double SAL_CALL
- ScVbaShape::getTop() throw (uno::RuntimeException)
- {
-- return Millimeter::getInPoints( m_xShape->getPosition().Y );
-+ return m_pShapeHelper->getTop();
- }
-
- void SAL_CALL
- ScVbaShape::setTop( double _top ) throw (uno::RuntimeException)
- {
-- awt::Point oldPosition;
-- oldPosition = m_xShape->getPosition();
-- oldPosition.Y = Millimeter::getInHundredthsOfOneMillimeter( _top );
-- m_xShape->setPosition( oldPosition );
-+ return m_pShapeHelper->setTop( _top );
- }
-
- sal_Bool SAL_CALL
-diff --git sc/source/ui/vba/vbashape.hxx sc/source/ui/vba/vbashape.hxx
-index d896a3d..eb48b93 100644
---- sc/source/ui/vba/vbashape.hxx
-+++ sc/source/ui/vba/vbashape.hxx
-@@ -47,9 +47,9 @@ typedef InheritedHelperInterfaceImpl< ListeningShape > ScVbaShape_BASE;
-
- class ScVbaShape : public ScVbaShape_BASE
- {
--friend class ConcreteXShapeHelper; // perhaps an accessor would be better
- private:
- protected:
-+ std::auto_ptr< ov::ShapeHelper > m_pShapeHelper;
- css::uno::Reference< css::drawing::XShape > m_xShape;
- css::uno::Reference< css::drawing::XShapes > m_xShapes;
- css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
-diff --git vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/inc/vbahelper/vbahelper.hxx
-index cfc8ee0..5749839 100644
---- vbahelper/inc/vbahelper/vbahelper.hxx
-+++ vbahelper/inc/vbahelper/vbahelper.hxx
-@@ -46,6 +46,7 @@
- #include <vcl/pointr.hxx>
- #define VBAHELPER_DLLIMPLEMENTATION
- #include <vbahelper/vbadllapi.h>
-+#include <memory>
- namespace css = ::com::sun::star;
-
- namespace ooo
-@@ -132,10 +133,34 @@ namespace msforms {
- class XShape;
- }
-
-+class VBAHELPER_DLLPUBLIC ShapeHelper
-+{
-+protected:
-+ css::uno::Reference< css::drawing::XShape > xShape;
-+public:
-+ ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape) throw (css::script::BasicErrorException );
-+
-+ double getHeight();
-+
-+ void setHeight(double _fheight) throw ( css::script::BasicErrorException );
-+
-+ double getWidth();
-+
-+ void setWidth(double _fWidth) throw ( css::script::BasicErrorException );
-+
-+ double getLeft();
-+
-+ void setLeft(double _fLeft);
-+
-+ double getTop();
-+
-+ void setTop(double _fTop);
-+};
-+
- class VBAHELPER_DLLPUBLIC ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes
- {
-+ std::auto_ptr< ShapeHelper > m_pShapeHelper;
- 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();
- virtual void setLeft( double nLeft );
-@@ -164,30 +189,6 @@ public:
- virtual void setWidth( double nWidth);
- };
-
--class VBAHELPER_DLLPUBLIC ShapeHelper
--{
--protected:
-- css::uno::Reference< css::drawing::XShape > xShape;
--public:
-- ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape) throw (css::script::BasicErrorException );
--
-- double getHeight();
--
-- void setHeight(double _fheight) throw ( css::script::BasicErrorException );
--
-- double getWidth();
--
-- void setWidth(double _fWidth) throw ( css::script::BasicErrorException );
--
-- double getLeft();
--
-- void setLeft(double _fLeft);
--
-- double getTop();
--
-- void setTop(double _fTop);
--};
--
- class VBAHELPER_DLLPUBLIC ContainerUtilities
- {
-
-diff --git vbahelper/source/vbahelper/vbahelper.cxx vbahelper/source/vbahelper/vbahelper.cxx
-index bc66be6..b95ccf1 100644
---- vbahelper/source/vbahelper/vbahelper.cxx
-+++ vbahelper/source/vbahelper/vbahelper.cxx
-@@ -818,8 +818,7 @@ double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double
-
- ConcreteXShapeGeometryAttributes::ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape )
- {
--// #FIXME needs to be an instantiable service
--// m_xShape = new ScVbaShape( xContext, xShape );
-+ m_pShapeHelper.reset( new ShapeHelper( xShape ) );
- }
-
- static uno::Reference< frame::XController > lcl_getCurrentController()
-@@ -1002,36 +1001,36 @@ UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComp
-
- double ConcreteXShapeGeometryAttributes::getLeft()
- {
-- return m_xShape->getLeft();
-+ return m_pShapeHelper->getLeft();
- }
- void ConcreteXShapeGeometryAttributes::setLeft( double nLeft )
- {
-- m_xShape->setLeft( nLeft );
-+ m_pShapeHelper->setLeft( nLeft );
- }
- double ConcreteXShapeGeometryAttributes::getTop()
- {
-- return m_xShape->getTop();
-+ return m_pShapeHelper->getTop();
- }
- void ConcreteXShapeGeometryAttributes::setTop( double nTop )
- {
-- m_xShape->setTop( nTop );
-+ m_pShapeHelper->setTop( nTop );
- }
-
- double ConcreteXShapeGeometryAttributes::getHeight()
- {
-- return m_xShape->getHeight();
-+ return m_pShapeHelper->getHeight();
- }
- void ConcreteXShapeGeometryAttributes::setHeight( double nHeight )
- {
-- m_xShape->setHeight( nHeight );
-+ m_pShapeHelper->setHeight( nHeight );
- }
- double ConcreteXShapeGeometryAttributes::getWidth()
- {
-- return m_xShape->getWidth();
-+ return m_pShapeHelper->getWidth();
- }
- void ConcreteXShapeGeometryAttributes::setWidth( double nWidth)
- {
-- m_xShape->setHeight( nWidth );
-+ m_pShapeHelper->setWidth( nWidth );
- }
-
-