[Libreoffice-commits] core.git: vbahelper/source

Stephan Bergmann sbergman at redhat.com
Mon Sep 15 01:07:01 PDT 2014


 vbahelper/source/msforms/vbabutton.cxx       |    2 +-
 vbahelper/source/msforms/vbacheckbox.cxx     |    2 +-
 vbahelper/source/msforms/vbacombobox.cxx     |    2 +-
 vbahelper/source/msforms/vbaframe.cxx        |    2 +-
 vbahelper/source/msforms/vbalabel.cxx        |    2 +-
 vbahelper/source/msforms/vbalistbox.cxx      |    2 +-
 vbahelper/source/msforms/vbanewfont.cxx      |    9 ---------
 vbahelper/source/msforms/vbanewfont.hxx      |    7 +------
 vbahelper/source/msforms/vbaradiobutton.cxx  |    2 +-
 vbahelper/source/msforms/vbatextbox.cxx      |    2 +-
 vbahelper/source/msforms/vbatogglebutton.cxx |    2 +-
 11 files changed, 10 insertions(+), 24 deletions(-)

New commits:
commit 82a72bb848c4fc343a9095953242eca03d943780
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Sep 15 10:04:11 2014 +0200

    VbaNewFont apparently does not inherit XHelperInterface
    
    ...and thus should simply derive from WeakImplHelper1 instead of
    InheritedHelperInterfaceImpl1?
    
    Change-Id: I0cb023a905e93bf9c223676c964f039ac7eee7e0

diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx
index 5220822..0738333 100644
--- a/vbahelper/source/msforms/vbabutton.cxx
+++ b/vbahelper/source/msforms/vbabutton.cxx
@@ -105,7 +105,7 @@ void SAL_CALL VbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::Ru
 
 uno::Reference< msforms::XNewFont > SAL_CALL VbaButton::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 OUString
diff --git a/vbahelper/source/msforms/vbacheckbox.cxx b/vbahelper/source/msforms/vbacheckbox.cxx
index 8d97a75..75c3d21e 100644
--- a/vbahelper/source/msforms/vbacheckbox.cxx
+++ b/vbahelper/source/msforms/vbacheckbox.cxx
@@ -79,7 +79,7 @@ ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeExcept
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaCheckbox::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 OUString
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx
index 3f2c0df..dc7189b 100644
--- a/vbahelper/source/msforms/vbacombobox.cxx
+++ b/vbahelper/source/msforms/vbacombobox.cxx
@@ -245,7 +245,7 @@ sal_Int32 SAL_CALL ScVbaComboBox::getTextLength() throw (uno::RuntimeException,
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaComboBox::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 OUString
diff --git a/vbahelper/source/msforms/vbaframe.cxx b/vbahelper/source/msforms/vbaframe.cxx
index 0047fdd..756b82d 100644
--- a/vbahelper/source/msforms/vbaframe.cxx
+++ b/vbahelper/source/msforms/vbaframe.cxx
@@ -75,7 +75,7 @@ void SAL_CALL ScVbaFrame::setBorderStyle( sal_Int32 /*nBorderStyle*/ ) throw (un
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaFrame::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 // XFrame methods
diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx
index ce943e7..fc62e69 100644
--- a/vbahelper/source/msforms/vbalabel.cxx
+++ b/vbahelper/source/msforms/vbalabel.cxx
@@ -70,7 +70,7 @@ ScVbaLabel::setAccelerator( const OUString& /*_accelerator*/ ) throw (::com::sun
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaLabel::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 OUString ScVbaLabel::getServiceImplName()
diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx
index 4916018..38effb8 100644
--- a/vbahelper/source/msforms/vbalistbox.cxx
+++ b/vbahelper/source/msforms/vbalistbox.cxx
@@ -274,7 +274,7 @@ ScVbaListBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) t
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaListBox::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 OUString
diff --git a/vbahelper/source/msforms/vbanewfont.cxx b/vbahelper/source/msforms/vbanewfont.cxx
index d051c1b..5778845 100644
--- a/vbahelper/source/msforms/vbanewfont.cxx
+++ b/vbahelper/source/msforms/vbanewfont.cxx
@@ -30,10 +30,7 @@ using namespace ::ooo::vba;
 
 
 VbaNewFont::VbaNewFont(
-        const uno::Reference< XHelperInterface >& rxParent,
-        const uno::Reference< uno::XComponentContext >& rxContext,
         const uno::Reference< beans::XPropertySet >& rxModelProps ) throw (uno::RuntimeException) :
-    VbaNewFont_BASE( rxParent, rxContext ),
     mxProps( rxModelProps, uno::UNO_SET_THROW )
 {
 }
@@ -132,10 +129,4 @@ void SAL_CALL VbaNewFont::setStrikethrough( sal_Bool bStrikethrough ) throw (uno
     mxProps->setPropertyValue( "FontStrikeout" ,uno::Any( bStrikethrough ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) );
 }
 
-// XHelperInterface
-
-VBAHELPER_IMPL_XHELPERINTERFACE( VbaNewFont, "ooo.vba.msforms.NewFont" )
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/msforms/vbanewfont.hxx b/vbahelper/source/msforms/vbanewfont.hxx
index c7fd671..546cb52 100644
--- a/vbahelper/source/msforms/vbanewfont.hxx
+++ b/vbahelper/source/msforms/vbanewfont.hxx
@@ -25,14 +25,12 @@
 
 
 
-typedef InheritedHelperInterfaceImpl1< ov::msforms::XNewFont > VbaNewFont_BASE;
+typedef cppu::WeakImplHelper1< ov::msforms::XNewFont > VbaNewFont_BASE;
 
 class VbaNewFont : public VbaNewFont_BASE
 {
 public:
     VbaNewFont(
-        const css::uno::Reference< ov::XHelperInterface >& rxParent,
-        const css::uno::Reference< css::uno::XComponentContext >& rxContext,
         const css::uno::Reference< css::beans::XPropertySet >& rxModelProps ) throw (css::uno::RuntimeException);
 
     // XNewFont attributes
@@ -53,9 +51,6 @@ public:
     virtual sal_Bool SAL_CALL getStrikethrough() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL setStrikethrough( sal_Bool bStrikethrough ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
-    // XHelperInterface
-    VBAHELPER_DECL_XHELPERINTERFACE
-
 private:
     css::uno::Reference< css::beans::XPropertySet > mxProps;
 };
diff --git a/vbahelper/source/msforms/vbaradiobutton.cxx b/vbahelper/source/msforms/vbaradiobutton.cxx
index cfdfcf1..612371c 100644
--- a/vbahelper/source/msforms/vbaradiobutton.cxx
+++ b/vbahelper/source/msforms/vbaradiobutton.cxx
@@ -87,7 +87,7 @@ ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExceptio
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaRadioButton::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 OUString
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx
index 583ad8b..004b9d1 100644
--- a/vbahelper/source/msforms/vbatextbox.cxx
+++ b/vbahelper/source/msforms/vbatextbox.cxx
@@ -133,7 +133,7 @@ sal_Int32 SAL_CALL ScVbaTextBox::getTextLength() throw (uno::RuntimeException, s
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaTextBox::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 sal_Int32 SAL_CALL ScVbaTextBox::getBackColor() throw (uno::RuntimeException, std::exception)
diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx
index e0d87aa..f108bac 100644
--- a/vbahelper/source/msforms/vbatogglebutton.cxx
+++ b/vbahelper/source/msforms/vbatogglebutton.cxx
@@ -130,7 +130,7 @@ void SAL_CALL ScVbaToggleButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw
 
 uno::Reference< msforms::XNewFont > SAL_CALL ScVbaToggleButton::getFont() throw (uno::RuntimeException, std::exception)
 {
-    return new VbaNewFont( this, mxContext, m_xProps );
+    return new VbaNewFont( m_xProps );
 }
 
 sal_Bool SAL_CALL ScVbaToggleButton::getLocked() throw (uno::RuntimeException, std::exception)


More information about the Libreoffice-commits mailing list