summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-27 14:20:45 +0200
committerNoel Grandin <noel@peralex.com>2013-04-23 16:05:56 +0200
commit1165aac95b8e44f41fc16a44bfec4c1c05801ac8 (patch)
tree7887802f0d1ba62ab95bad1c6fe8ebf323c87a91 /forms
parent9ffb86c7e93c1633866ed89f0749831fd7f31a35 (diff)
fdo#46808, convert form::Forms to new style
Change-Id: I966ed18d45dc8a04c97a703d3c83382714025f2c
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/FormsCollection.cxx6
-rw-r--r--forms/source/component/FormsCollection.hxx65
-rw-r--r--forms/source/inc/services.hxx2
-rw-r--r--forms/source/misc/services.cxx5
4 files changed, 71 insertions, 7 deletions
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index f1dfbd688e31..1da85ce08828 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -46,7 +46,7 @@ InterfaceRef SAL_CALL OFormsCollection_CreateInstance(const Reference<XMultiServ
//------------------------------------------------------------------------------
OUString SAL_CALL OFormsCollection::getServiceName() throw(RuntimeException)
{
- return OUString(FRM_SUN_FORMS_COLLECTION);
+ return OUString("com.sun.star.form.Forms");
}
//------------------------------------------------------------------------------
@@ -127,7 +127,7 @@ StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(Runti
{
StringSequence aReturn(2);
- aReturn.getArray()[0] = FRM_SUN_FORMS_COLLECTION;
+ aReturn.getArray()[0] = OUString("com.sun.star.form.Forms");
aReturn.getArray()[1] = OUString("com.sun.star.form.FormComponents");
return aReturn;
@@ -141,7 +141,7 @@ Reference< XCloneable > SAL_CALL OFormsCollection::createClone( ) throw (Runtim
osl_atomic_increment( &pClone->m_refCount );
pClone->clonedFrom( *this );
osl_atomic_decrement( &pClone->m_refCount );
- return pClone;
+ return static_cast<OInterfaceContainer*>(pClone);
}
// OComponentHelper
diff --git a/forms/source/component/FormsCollection.hxx b/forms/source/component/FormsCollection.hxx
index c6c585806584..8c92e7b97f29 100644
--- a/forms/source/component/FormsCollection.hxx
+++ b/forms/source/component/FormsCollection.hxx
@@ -23,6 +23,7 @@
#include <cppuhelper/implbase2.hxx>
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/form/XForms.hpp>
//.........................................................................
namespace frm
@@ -37,7 +38,7 @@ namespace frm
// oder aussen einen Context uebergeben bekommen
//==================================================================
typedef ::cppu::OComponentHelper FormsCollectionComponentBase;
-typedef ::cppu::ImplHelper2< ::com::sun::star::container::XChild
+typedef ::cppu::ImplHelper2< ::com::sun::star::form::XForms
,::com::sun::star::lang::XServiceInfo > OFormsCollection_BASE;
// else MSVC kills itself on some statements
@@ -84,6 +85,68 @@ public:
// prevent method hiding
using OInterfaceContainer::disposing;
+
+ // inheritance ambiguity
+ virtual com::sun::star::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::getElementType(); }
+ virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::hasElements(); }
+ virtual com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& p1) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::getByName(p1); }
+ virtual com::sun::star::uno::Sequence<rtl::OUString> SAL_CALL getElementNames() throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::getElementNames(); }
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& p1) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::hasByName(p1); }
+ virtual void SAL_CALL replaceByName(const rtl::OUString& p1, const com::sun::star::uno::Any& p2) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::replaceByName(p1, p2); }
+ virtual void SAL_CALL insertByName(const rtl::OUString& p1, const com::sun::star::uno::Any& p2) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::insertByName(p1, p2); }
+ virtual void SAL_CALL removeByName(const rtl::OUString& p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::removeByName(p1); }
+ virtual sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::getCount(); }
+ virtual com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 p1) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::getByIndex(p1); }
+ virtual void SAL_CALL replaceByIndex(sal_Int32 p1, const com::sun::star::uno::Any& p2) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::replaceByIndex(p1, p2); }
+ virtual void SAL_CALL insertByIndex(sal_Int32 p1, const com::sun::star::uno::Any& p2) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::insertByIndex(p1, p2); }
+ virtual void removeByIndex(sal_Int32 p1) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::removeByIndex(p1); }
+ virtual com::sun::star::uno::Reference<com::sun::star::container::XEnumeration> SAL_CALL createEnumeration() throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::createEnumeration(); }
+ virtual void SAL_CALL registerScriptEvent(sal_Int32 p1, const com::sun::star::script::ScriptEventDescriptor& p2) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::registerScriptEvent(p1, p2); }
+ virtual void SAL_CALL registerScriptEvents(sal_Int32 p1, const com::sun::star::uno::Sequence<com::sun::star::script::ScriptEventDescriptor>& p2) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::registerScriptEvents(p1, p2); }
+ virtual void SAL_CALL revokeScriptEvent(sal_Int32 p1, const rtl::OUString& p2, const rtl::OUString& p3, const rtl::OUString& p4) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::revokeScriptEvent(p1, p2, p3, p4); }
+ virtual void SAL_CALL revokeScriptEvents(sal_Int32 p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::revokeScriptEvents(p1); }
+ virtual void SAL_CALL insertEntry(sal_Int32 p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::insertEntry(p1); }
+ virtual void SAL_CALL removeEntry(sal_Int32 p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::removeEntry(p1); }
+ virtual com::sun::star::uno::Sequence<com::sun::star::script::ScriptEventDescriptor> SAL_CALL getScriptEvents(sal_Int32 p1) throw (css::uno::RuntimeException)
+ { return OInterfaceContainer::getScriptEvents(p1); }
+ virtual void SAL_CALL attach(sal_Int32 p1, const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& p2, const com::sun::star::uno::Any& p3) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::attach(p1, p2, p3); }
+ virtual void SAL_CALL detach(sal_Int32 p1, const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& p2) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::detach(p1, p2); }
+ virtual void SAL_CALL addScriptListener(const com::sun::star::uno::Reference<com::sun::star::script::XScriptListener>& p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::addScriptListener(p1); }
+ virtual void SAL_CALL removeScriptListener(const com::sun::star::uno::Reference<com::sun::star::script::XScriptListener>& p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::removeScriptListener(p1); }
+ virtual void dispose() throw (css::uno::RuntimeException)
+ { FormsCollectionComponentBase::dispose(); }
+ virtual void addEventListener(const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>& p1) throw (css::uno::RuntimeException)
+ { FormsCollectionComponentBase::addEventListener(p1); }
+ virtual void removeEventListener(const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>& p1) throw (css::uno::RuntimeException)
+ { FormsCollectionComponentBase::removeEventListener(p1); }
+ virtual void addContainerListener(const com::sun::star::uno::Reference<com::sun::star::container::XContainerListener>& p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::addContainerListener(p1); }
+ virtual void removeContainerListener(const com::sun::star::uno::Reference<com::sun::star::container::XContainerListener>& p1) throw (css::uno::RuntimeException)
+ { OInterfaceContainer::removeContainerListener(p1); }
};
//.........................................................................
diff --git a/forms/source/inc/services.hxx b/forms/source/inc/services.hxx
index 57c18771fa92..dc5d4c3789d9 100644
--- a/forms/source/inc/services.hxx
+++ b/forms/source/inc/services.hxx
@@ -181,8 +181,6 @@ namespace frm
#define FRM_SUN_CONTROL_RICHTEXTCONTROL "com.sun.star.form.control.RichTextControl"
#define FRM_SUN_CONTROL_SUBMITBUTTON "com.sun.star.form.control.SubmitButton"
- #define FRM_SUN_FORMS_COLLECTION "com.sun.star.form.Forms"
-
#define BINDABLE_DATABASE_CHECK_BOX "com.sun.star.form.binding.BindableDatabaseCheckBox"
#define BINDABLE_DATABASE_COMBO_BOX "com.sun.star.form.binding.BindableDatabaseComboBox"
#define BINDABLE_DATABASE_FORMATTED_FIELD "com.sun.star.form.binding.BindableDatabaseFormattedField"
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index dfbd656d01a6..29e173c0b255 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -258,7 +258,10 @@ void ensureClassInfos()
// ========================================================================
// = various
- REGISTER_CLASS1(OFormsCollection, FRM_SUN_FORMS_COLLECTION);
+ aServices.realloc(1);
+ aServices.getArray()[0] = OUString("com.sun.star.form.Forms");
+ REGISTER_CLASS_CORE(OFormsCollection);
+
REGISTER_CLASS1(ImageProducer, SRV_AWT_IMAGEPRODUCER);
// ========================================================================