summaryrefslogtreecommitdiff
path: root/svx/source/inc/fmvwimp.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/inc/fmvwimp.hxx')
-rw-r--r--svx/source/inc/fmvwimp.hxx61
1 files changed, 42 insertions, 19 deletions
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index 1d38ee835b13..12965c07ad3b 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -30,9 +30,10 @@
#ifndef _SVX_FMVWIMP_HXX
#define _SVX_FMVWIMP_HXX
-#include <comphelper/stl_types.hxx>
-
+#include "svx/svdmark.hxx"
+#include "fmdocumentclassification.hxx"
+/** === begin UNO includes === **/
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
@@ -42,12 +43,16 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/awt/XFocusListener.hpp>
#include <com/sun/star/sdb/SQLErrorEvent.hpp>
+#include <com/sun/star/sdbc/XDataSource.hpp>
+/** === end UNO includes === **/
+
+#include <comphelper/stl_types.hxx>
#include <tools/link.hxx>
#include <tools/string.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
#include <comphelper/uno3.hxx>
-#include <svx/svdmark.hxx>
+#include <comphelper/componentcontext.hxx>
//class SdrPageViewWinRec;
class SdrPageWindow;
@@ -85,12 +90,12 @@ class FmXPageViewWinRec : public ::cppu::WeakImplHelper1< ::com::sun::star::cont
::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > > m_aControllerList;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > m_xControlContainer;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ ::comphelper::ComponentContext m_aContext;
FmXFormView* m_pViewImpl;
Window* m_pWindow;
public:
- FmXPageViewWinRec( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
+ FmXPageViewWinRec( const ::comphelper::ComponentContext& _rContext,
const SdrPageWindow&, FmXFormView* pView);
//const SdrPageViewWinRec*, FmXFormView* pView);
~FmXPageViewWinRec();
@@ -144,14 +149,16 @@ class FmXFormView : public ::cppu::WeakImplHelper3<
class ObjectRemoveListener;
friend class ObjectRemoveListener;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ ::comphelper::ComponentContext m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> m_xWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xLastCreatedControlModel;
FmFormObj* m_pMarkedGrid;
FmFormView* m_pView;
sal_uIntPtr m_nActivationEvent;
sal_uIntPtr m_nErrorMessageEvent; // event for an asynchronous error message. See also m_aAsyncError
sal_uIntPtr m_nAutoFocusEvent; // event for asynchronously setting the focus to a control
+ sal_uIntPtr m_nControlWizardEvent; // event for asynchronously setting the focus to a control
::com::sun::star::sdb::SQLErrorEvent
m_aAsyncError; // error event which is to be displayed asyn. See m_nErrorMessageEvent.
@@ -172,8 +179,7 @@ class FmXFormView : public ::cppu::WeakImplHelper3<
void removeGridWindowListening();
protected:
- FmXFormView(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
- FmFormView* _pView);
+ FmXFormView( const ::comphelper::ComponentContext& _rContext, FmFormView* _pView );
~FmXFormView();
void saveMarkList( sal_Bool _bSmartUnmark = sal_True );
@@ -210,8 +216,6 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController >
getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() { return m_xORB; }
-
// activation handling
inline bool hasEverBeenActivated( ) const { return !m_bFirstActivation; }
inline void setHasBeenActivated( ) { m_bFirstActivation = false; }
@@ -229,6 +233,8 @@ public:
*/
void resumeTabOrderUpdate();
+ void onCreatedFormObject( FmFormObj& _rFormObject );
+
private:
FmWinRecList::iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC );
//void addWindow(const SdrPageViewWinRec*);
@@ -240,27 +246,40 @@ private:
SdrObject* implCreateFieldControl( const ::svx::ODataAccessDescriptor& _rColumnDescriptor );
SdrObject* implCreateXFormsControl( const ::svx::OXFormsDescriptor &_rDesc );
- /// does some initializations to the newly created control model, returns the ClassId
- sal_Int16 implInitializeNewControlModel( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel, const SdrObject* _pObject ) const;
-
- static void createControlLabelPair(
- SdrView* _pView,
- OutputDevice* _pOutDev,
+ static bool createControlLabelPair(
+ const ::comphelper::ComponentContext& _rContext,
+ OutputDevice& _rOutDev,
sal_Int32 _nXOffsetMM,
sal_Int32 _nYOffsetMM,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats,
- sal_uInt16 _nObjID,
+ sal_uInt16 _nControlObjectID,
const ::rtl::OUString& _rFieldPostfix,
UINT32 _nInventor,
- UINT16 _nIndent,
+ UINT16 _nLabelObjectID,
SdrPage* _pLabelPage,
- SdrPage* _pPage,
+ SdrPage* _pControlPage,
SdrModel* _pModel,
SdrUnoObj*& _rpLabel,
SdrUnoObj*& _rpControl
);
+ bool createControlLabelPair(
+ OutputDevice& _rOutDev,
+ sal_Int32 _nXOffsetMM,
+ sal_Int32 _nYOffsetMM,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats,
+ sal_uInt16 _nControlObjectID,
+ const ::rtl::OUString& _rFieldPostfix,
+ SdrUnoObj*& _rpLabel,
+ SdrUnoObj*& _rpControl,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource >& _rxDataSource = NULL,
+ const ::rtl::OUString& _rDataSourceName = ::rtl::OUString(),
+ const ::rtl::OUString& _rCommand= ::rtl::OUString(),
+ const sal_Int32 _nCommandType = -1
+ );
+
void ObjectRemovedInAliveMode(const SdrObject* pObject);
// asynchronously displays an error message. See also OnDelayedErrorMessage.
@@ -274,6 +293,10 @@ private:
DECL_LINK( OnActivate, void* );
DECL_LINK( OnAutoFocus, void* );
DECL_LINK( OnDelayedErrorMessage, void* );
+ DECL_LINK( OnStartControlWizard, void* );
+
+private:
+ ::svxform::DocumentType impl_getDocumentType() const;
};