Clean up function declarations and some unused functions

Change-Id: I47bdc668ecf703d85f4d50c71f1347fb9e8e89d8
This commit is contained in:
Stephan Bergmann 2014-04-14 12:46:40 +02:00
parent 2346c010ea
commit 1d057cca8c
18 changed files with 166 additions and 102 deletions

View file

@ -52,7 +52,7 @@ OCheckBoxControl::OCheckBoxControl(const Reference<XComponentContext>& _rxFactor
}
InterfaceRef SAL_CALL OCheckBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OCheckBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OCheckBoxControl( comphelper::getComponentContext(_rxFactory) ));
}
@ -73,7 +73,7 @@ StringSequence SAL_CALL OCheckBoxControl::getSupportedServiceNames() throw(::com
InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OCheckBoxModel( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -73,7 +73,7 @@ using namespace ::com::sun::star::form::binding;
// class OComboBoxModel
InterfaceRef SAL_CALL OComboBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OComboBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return (*new OComboBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
@ -869,7 +869,7 @@ void SAL_CALL OComboBoxModel::disposing( const EventObject& _rSource ) throw ( R
InterfaceRef SAL_CALL OComboBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OComboBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OComboBoxControl( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -18,6 +18,7 @@
*/
#include "Currency.hxx"
#include "services.hxx"
#include <tools/debug.hxx>
#include <unotools/localedatawrapper.hxx>
#include <vcl/svapp.hxx>

View file

@ -19,6 +19,7 @@
#include "componenttools.hxx"
#include "services.hxx"
#include "DatabaseForm.hxx"
#include "EventThread.hxx"
#include "frm_module.hxx"

View file

@ -18,6 +18,7 @@
*/
#include "Date.hxx"
#include "services.hxx"
#include <tools/debug.hxx>
#include <tools/date.hxx>
#include <connectivity/dbconversion.hxx>

View file

@ -24,6 +24,7 @@
#include "frm_resource.hxx"
#include "property.hrc"
#include "property.hxx"
#include "services.hxx"
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>

View file

@ -40,7 +40,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
InterfaceRef SAL_CALL OFixedTextModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OFixedTextModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OFixedTextModel( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -44,7 +44,7 @@ using namespace ::com::sun::star::util;
InterfaceRef SAL_CALL OGroupBoxModel_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OGroupBoxModel_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory)
{
return *(new OGroupBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
@ -132,7 +132,7 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt
InterfaceRef SAL_CALL OGroupBoxControl_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OGroupBoxControl_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory)
{
return *(new OGroupBoxControl( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -190,15 +190,6 @@ sal_Bool OGroup::operator==( const OGroup& rGroup ) const
return m_aGroupName.equals(rGroup.GetGroupName());
}
class OGroupLess : public ::std::binary_function<OGroup, OGroup, sal_Bool>
{
public:
sal_Bool operator() (const OGroup& lhs, const OGroup& rhs) const
{
return lhs.m_aGroupName < rhs.m_aGroupName;
}
};
Sequence< Reference<XControlModel> > OGroup::GetControlModels() const
{
sal_Int32 nLen = m_aCompArray.size();

View file

@ -41,7 +41,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
InterfaceRef SAL_CALL OHiddenModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OHiddenModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OHiddenModel( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -132,7 +132,7 @@ namespace frm
//= OListBoxModel
InterfaceRef SAL_CALL OListBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OListBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OListBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
@ -1727,7 +1727,7 @@ namespace frm
InterfaceRef SAL_CALL OListBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL OListBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OListBoxControl( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -46,7 +46,7 @@ using namespace ::com::sun::star::form::binding;
InterfaceRef SAL_CALL ORadioButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL ORadioButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new ORadioButtonControl( comphelper::getComponentContext(_rxFactory) ));
}
@ -91,7 +91,7 @@ void SAL_CALL ORadioButtonControl::createPeer(const Reference<starawt::XToolkit>
}
InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new ORadioButtonModel( comphelper::getComponentContext(_rxFactory) ));
}

View file

@ -19,6 +19,7 @@
#include "imgprod.hxx"
#include "services.hxx"
#include <vcl/bmpacc.hxx>
#include <vcl/cvtgrf.hxx>
@ -39,8 +40,6 @@ class ImgProdLockBytes : public SvLockBytes
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xStmRef;
::com::sun::star::uno::Sequence<sal_Int8> maSeq;
ImgProdLockBytes() {};
public:
ImgProdLockBytes( SvStream* pStm, sal_Bool bOwner );

View file

@ -23,6 +23,9 @@
#include <rtl/ustring.hxx>
#include "frm_strings.hxx"
namespace com { namespace sun { namespace star { namespace lang {
class XMultiServiceFactory;
} } } }
namespace frm
{
@ -211,10 +214,154 @@ namespace frm
#define SRV_SDB_ROWSET "com.sun.star.sdb.RowSet"
#define SRV_SDB_CONNECTION "com.sun.star.sdb.Connection"
css::uno::Reference<css::uno::XInterface> SAL_CALL OFixedTextModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ORadioButtonModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ORadioButtonControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OCheckBoxModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OCheckBoxControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OHiddenModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OGroupBoxModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OGroupBoxControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OListBoxControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OListBoxModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OComboBoxControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OComboBoxModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OEditControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OEditModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ONumericControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ONumericModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OPatternControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OPatternModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OCurrencyControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OCurrencyModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ODateControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ODateModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OTimeControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OTimeModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OFormattedControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OFormattedModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OFileControlModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OButtonControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OButtonModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OImageButtonControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OImageButtonModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OImageControlControl_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OImageControlModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OGridControlModel_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
// XForms objects
css::uno::Reference<css::uno::XInterface> SAL_CALL Binding_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL Model_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL XForms_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
// some special handling for the FormattedFieldWrapper which can act as FormattedModel or as EditModel
css::uno::Reference<css::uno::XInterface> SAL_CALL OFormattedFieldWrapper_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
// this is for a service, which is instantiated through the EditModel service name
// and which acts mostly as Edit (mostly means : if somebody uses XPersistObject::read immediately after
// the object was instantiated and the stream contains a FormattedModel, it switches permanently to
// formatted.)
css::uno::Reference<css::uno::XInterface> SAL_CALL
OFormattedFieldWrapper_CreateInstance_ForceFormatted(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL OFormsCollection_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
css::uno::Reference<css::uno::XInterface> SAL_CALL ImageProducer_CreateInstance(
css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory);
} // namespace frm
extern "C" {
void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension();
void SAL_CALL createRegistryInfo_FormOperations();
void SAL_CALL createRegistryInfo_ODatabaseForm();
void SAL_CALL createRegistryInfo_OFilterControl();
void SAL_CALL createRegistryInfo_ONavigationBarControl();
void SAL_CALL createRegistryInfo_ONavigationBarModel();
void SAL_CALL createRegistryInfo_ORichTextControl();
void SAL_CALL createRegistryInfo_ORichTextModel();
void SAL_CALL createRegistryInfo_OScrollBarModel();
void SAL_CALL createRegistryInfo_OSpinButtonModel();
}
#endif // INCLUDED_FORMS_SOURCE_INC_SERVICES_HXX

View file

@ -27,70 +27,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
#define DECLARE_SERVICE_INFO(classImplName) \
namespace frm { \
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL classImplName##_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw (::com::sun::star::uno::RuntimeException); \
}
DECLARE_SERVICE_INFO(OFixedTextModel)
DECLARE_SERVICE_INFO(ORadioButtonModel)
DECLARE_SERVICE_INFO(ORadioButtonControl)
DECLARE_SERVICE_INFO(OCheckBoxModel)
DECLARE_SERVICE_INFO(OCheckBoxControl)
DECLARE_SERVICE_INFO(OHiddenModel)
DECLARE_SERVICE_INFO(OGroupBoxModel)
DECLARE_SERVICE_INFO(OGroupBoxControl)
DECLARE_SERVICE_INFO(OListBoxControl)
DECLARE_SERVICE_INFO(OListBoxModel)
DECLARE_SERVICE_INFO(OComboBoxControl)
DECLARE_SERVICE_INFO(OComboBoxModel)
DECLARE_SERVICE_INFO(OEditControl)
DECLARE_SERVICE_INFO(OEditModel)
DECLARE_SERVICE_INFO(ONumericControl)
DECLARE_SERVICE_INFO(ONumericModel)
DECLARE_SERVICE_INFO(OPatternControl)
DECLARE_SERVICE_INFO(OPatternModel)
DECLARE_SERVICE_INFO(OCurrencyControl)
DECLARE_SERVICE_INFO(OCurrencyModel)
DECLARE_SERVICE_INFO(ODateControl)
DECLARE_SERVICE_INFO(ODateModel)
DECLARE_SERVICE_INFO(OTimeControl)
DECLARE_SERVICE_INFO(OTimeModel)
DECLARE_SERVICE_INFO(OFormattedControl)
DECLARE_SERVICE_INFO(OFormattedModel)
DECLARE_SERVICE_INFO(OFileControlModel)
DECLARE_SERVICE_INFO(OButtonControl)
DECLARE_SERVICE_INFO(OButtonModel)
DECLARE_SERVICE_INFO(OImageButtonControl)
DECLARE_SERVICE_INFO(OImageButtonModel)
DECLARE_SERVICE_INFO(OImageControlControl)
DECLARE_SERVICE_INFO(OImageControlModel)
DECLARE_SERVICE_INFO(OGridControlModel)
// XForms objects
DECLARE_SERVICE_INFO(Binding)
DECLARE_SERVICE_INFO(Model)
DECLARE_SERVICE_INFO(XForms)
// some special handling for the FormattedFieldWrapper which can act as FormattedModel or as EditModel
DECLARE_SERVICE_INFO(OFormattedFieldWrapper)
// this is for a service, which is instantiated through the EditModel service name
// and which acts mostly as Edit (mostly means : if somebody uses XPersistObject::read immediately after
// the object was instantiated and the stream contains a FormattedModel, it switches permanently to
// formatted.)
namespace frm { \
extern Reference< XInterface > SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException); \
}
DECLARE_SERVICE_INFO(OFormsCollection)
DECLARE_SERVICE_INFO(ImageProducer)
static Sequence< OUString > s_aClassImplementationNames;
static Sequence<Sequence< OUString > > s_aClassServiceNames;
static Sequence<sal_Int64> s_aFactories;
@ -279,19 +215,6 @@ void ensureClassInfos()
extern "C"
{
void SAL_CALL createRegistryInfo_ODatabaseForm();
void SAL_CALL createRegistryInfo_OFilterControl();
void SAL_CALL createRegistryInfo_OScrollBarModel();
void SAL_CALL createRegistryInfo_OSpinButtonModel();
void SAL_CALL createRegistryInfo_ONavigationBarModel();
void SAL_CALL createRegistryInfo_ONavigationBarControl();
void SAL_CALL createRegistryInfo_ORichTextModel();
void SAL_CALL createRegistryInfo_ORichTextControl();
void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension();
void SAL_CALL createRegistryInfo_FormOperations();
void SAL_CALL createRegistryInfo_FORMS()
{
static sal_Bool bInit = sal_False;

View file

@ -23,6 +23,7 @@
#include "frm_resource.hxx"
#include "frm_resource.hrc"
#include "frm_module.hxx"
#include "services.hxx"
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>

View file

@ -43,14 +43,12 @@ namespace frm
Reference<XInterface> Model_CreateInstance(
const Reference<XMultiServiceFactory>& )
throw( RuntimeException )
{
return static_cast<XPropertySet*>( static_cast<PropertySetBase*>( new xforms::Model ) );
}
Reference<XInterface> XForms_CreateInstance(
const Reference<XMultiServiceFactory>& )
throw( RuntimeException )
{
return static_cast<XNameContainer*>( new NameContainer<Reference<XPropertySet> >() );
}

View file

@ -23,6 +23,7 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include "extension.hxx"
#include "xpathlib.hxx"
#include "services.hxx"
#include "frm_module.hxx"
using namespace com::sun::star::uno;