Kaydet (Commit) 6ed7696c authored tarafından Noel Grandin's avatar Noel Grandin

pass AbstractGeometryAttributes around by std::unique_ptr

Change-Id: I6e06c89b5e4b77c8fc5e3e1a6bf7d76d8ebd7810
Reviewed-on: https://gerrit.libreoffice.org/61349
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6203c2b7
......@@ -23,7 +23,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
VbaButton::VbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
VbaButton::VbaButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<AbstractGeometryAttributes> pGeomHelper )
: ButtonImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -29,7 +29,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XCommandButton >
class VbaButton : public ButtonImpl_BASE
{
public:
VbaButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
VbaButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual OUString SAL_CALL getCaption() override;
virtual void SAL_CALL setCaption( const OUString& _caption ) override;
......
......@@ -24,7 +24,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaCheckbox::ScVbaCheckbox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: CheckBoxImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -29,7 +29,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XCheckBox, css::
class ScVbaCheckbox : public CheckBoxImpl_BASE
{
public:
ScVbaCheckbox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaCheckbox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual OUString SAL_CALL getCaption() override;
virtual void SAL_CALL setCaption( const OUString& _caption ) override;
......
......@@ -37,7 +37,8 @@ using namespace ooo::vba;
//SelectedItems list of integer indexes
//StringItemList list of items
ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
mpListHelper.reset( new ListControlHelper( m_xProps ) );
try
......
......@@ -37,7 +37,7 @@ class ScVbaComboBox : public ComboBoxImpl_BASE
OUString sSourceName;
public:
ScVbaComboBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaComboBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual css::uno::Any SAL_CALL getListIndex() override;
......
......@@ -56,11 +56,11 @@ protected:
void fireClickEvent();
public:
ScVbaControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pHelper );
const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pHelper );
virtual ~ScVbaControl() override;
// This class will own the helper, so make sure it is allocated from
// the heap
void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper );
void setGeometryHelper( std::unique_ptr<ov::AbstractGeometryAttributes> pHelper );
// sets the name of the associated library ( used for UserForm controls )
void setLibraryAndCodeName( const OUString& sLibCodeName ) { m_sLibraryAndCodeName = sLibCodeName; }
......
......@@ -31,9 +31,9 @@ ScVbaFrame::ScVbaFrame(
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< uno::XInterface >& xControl,
const uno::Reference< frame::XModel >& xModel,
ov::AbstractGeometryAttributes* pGeomHelper,
std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper,
const css::uno::Reference< css::awt::XControl >& xDialog ) :
FrameImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ),
FrameImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) ),
mxDialog( xDialog )
{
}
......
......@@ -36,7 +36,7 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::uno::XInterface >& xControl,
const css::uno::Reference< css::frame::XModel >& xModel,
ov::AbstractGeometryAttributes* pGeomHelper,
std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper,
const css::uno::Reference< css::awt::XControl >& xDialog );
// XFrame attributes
......
......@@ -22,7 +22,8 @@ using namespace com::sun::star;
using namespace ooo::vba;
ScVbaImage::ScVbaImage( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ImageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaImage::ScVbaImage( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: ImageImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -29,7 +29,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XImage > ImageIm
class ScVbaImage : public ImageImpl_BASE
{
public:
ScVbaImage( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaImage( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
virtual sal_Int32 SAL_CALL getBackColor() override;
virtual void SAL_CALL setBackColor( sal_Int32 nBackColor ) override;
//XHelperInterface
......
......@@ -23,7 +23,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaLabel::ScVbaLabel( const css::uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : LabelImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaLabel::ScVbaLabel( const css::uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: LabelImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -29,7 +29,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XLabel, css::scr
class ScVbaLabel : public LabelImpl_BASE
{
public:
ScVbaLabel( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaLabel( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual css::uno::Any SAL_CALL getValue() override;
virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
......
......@@ -25,8 +25,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper )
: ListBoxImpl_BASE(xParent, xContext, xControl, xModel, pGeomHelper)
ScVbaListBox::ScVbaListBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< css::uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: ListBoxImpl_BASE(xParent, xContext, xControl, xModel, std::move(pGeomHelper))
, m_nIndex(0)
{
mpListHelper.reset( new ListControlHelper( m_xProps ) );
......
......@@ -39,7 +39,7 @@ class ScVbaListBox : public ListBoxImpl_BASE
sal_Int16 m_nIndex;
public:
ScVbaListBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaListBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual css::uno::Any SAL_CALL getListIndex() override;
......
......@@ -57,8 +57,8 @@ ScVbaMultiPage::ScVbaMultiPage(
const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< uno::XInterface >& xControl,
const uno::Reference< frame::XModel >& xModel,
AbstractGeometryAttributes* pGeomHelper) :
MultiPageImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper) :
MultiPageImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -37,7 +37,7 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::uno::XInterface >& xControl,
const css::uno::Reference< css::frame::XModel >& xModel,
ov::AbstractGeometryAttributes* pGeomHelper);
std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper);
// Attributes
virtual sal_Int32 SAL_CALL getValue() override;
......
......@@ -24,7 +24,8 @@ using namespace ooo::vba;
// uno servicename com.sun.star.awt.UnoControlProgressBarMode
const OUString SVALUE( "ProgressValue" );
ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaProgressBar::ScVbaProgressBar( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: ProgressBarImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -31,7 +31,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XProgressBar, cs
class ScVbaProgressBar : public ProgressBarImpl_BASE
{
public:
ScVbaProgressBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaProgressBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual css::uno::Any SAL_CALL getValue() override;
virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
......
......@@ -23,7 +23,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaRadioButton::ScVbaRadioButton( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: RadioButtonImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -28,7 +28,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XRadioButton, cs
class ScVbaRadioButton : public RadioButtonImpl_BASE
{
public:
ScVbaRadioButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaRadioButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual OUString SAL_CALL getCaption() override;
virtual void SAL_CALL setCaption( const OUString& _caption ) override;
......
......@@ -22,7 +22,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<AbstractGeometryAttributes> pGeomHelper )
: ScrollBarImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -31,7 +31,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XScrollBar > Scr
class ScVbaScrollBar : public ScrollBarImpl_BASE
{
public:
ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual css::uno::Any SAL_CALL getValue() override;
virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
......
......@@ -22,7 +22,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper ) : SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<AbstractGeometryAttributes> pGeomHelper )
: SpinButtonImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
}
......
......@@ -29,7 +29,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XSpinButton > Sp
class ScVbaSpinButton : public SpinButtonImpl_BASE
{
public:
ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// Attributes
virtual css::uno::Any SAL_CALL getValue() override;
virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
......
......@@ -22,8 +22,8 @@ using namespace com::sun::star;
using namespace ooo::vba;
VbaSystemAXControl::VbaSystemAXControl( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper )
: SystemAXControlImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
VbaSystemAXControl::VbaSystemAXControl( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<AbstractGeometryAttributes> pGeomHelper )
: SystemAXControlImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
, m_xControlInvocation( xControl, uno::UNO_QUERY_THROW )
{
}
......
......@@ -32,7 +32,7 @@ class VbaSystemAXControl : public SystemAXControlImpl_BASE
css::uno::Reference< css::script::XInvocation > m_xControlInvocation;
public:
VbaSystemAXControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
VbaSystemAXControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
// XInvocation
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) override;
......
......@@ -26,7 +26,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaTextBox::ScVbaTextBox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialog ) : TextBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialog( bDialog )
ScVbaTextBox::ScVbaTextBox( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<AbstractGeometryAttributes> pGeomHelper, bool bDialog )
: TextBoxImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) ), mbDialog( bDialog )
{
}
......
......@@ -31,7 +31,7 @@ class ScVbaTextBox : public TextBoxImpl_BASE
{
bool const mbDialog;
public:
ScVbaTextBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper, bool bDialog = false );
ScVbaTextBox( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper, bool bDialog = false );
// Attributes
virtual css::uno::Any SAL_CALL getValue() override;
virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
......
......@@ -24,7 +24,8 @@
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
: ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) )
{
SAL_INFO("vbahelper", "ScVbaToggleButton(ctor)");
m_xProps->setPropertyValue( "Toggle", uno::makeAny( true ) );
......
......@@ -29,7 +29,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaControl, ov::msforms::XToggleButton, c
class ScVbaToggleButton : public ToggleButtonImpl_BASE
{
public:
ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper );
ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper );
virtual ~ScVbaToggleButton() override;
// Attributes
virtual css::uno::Any SAL_CALL getValue() override;
......
......@@ -31,6 +31,7 @@
#include <basic/sbmeth.hxx>
#include "vbacontrols.hxx"
#include <sal/log.hxx>
#include <o3tl/make_unique.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
......@@ -45,12 +46,14 @@ using namespace ::com::sun::star;
// the models in ControlModels can be accessed by name
// also the XDialog is a XControl ( to access the model above
ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) : ScVbaUserForm_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), static_cast< ooo::vba::AbstractGeometryAttributes* >(nullptr) ), mbDispose( true )
ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext )
: ScVbaUserForm_BASE( getXSomethingFromArgs< XHelperInterface >( aArgs, 0 ), xContext, getXSomethingFromArgs< uno::XInterface >( aArgs, 1 ), getXSomethingFromArgs< frame::XModel >( aArgs, 2 ), nullptr ),
mbDispose( true )
{
m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
setGeometryHelper( new UserFormGeometryHelper( xControl, 0.0, 0.0 ) );
setGeometryHelper( o3tl::make_unique<UserFormGeometryHelper>( xControl, 0.0, 0.0 ) );
if ( aArgs.getLength() >= 4 )
aArgs[ 3 ] >>= m_sLibName;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment