LibreOffice Module svx (master) 1
fmview.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SVX_FMVIEW_HXX
21#define INCLUDED_SVX_FMVIEW_HXX
22
23#include <svx/view3d.hxx>
24#include <svx/svxdllapi.h>
25
26namespace com::sun::star {
27 namespace beans {
28 class XPropertySet;
29 }
30 namespace util {
31 class XNumberFormats;
32 }
33}
34
35class OutputDevice;
36class FmFormObj;
37class FmFormPage;
38class FmFormShell;
39class FmXFormView;
40
41namespace svx {
42 class ODataAccessDescriptor;
43 struct OXFormsDescriptor;
44}
45
46class SdrUnoObj;
47namespace com::sun::star::form {
48 class XForm;
49 namespace runtime {
50 class XFormController;
51 }
52}
53
55{
58
59 void Init();
60
61public:
63 SdrModel& rSdrModel,
64 OutputDevice* pOut);
65
66 virtual ~FmFormView() override;
67
74 rtl::Reference<SdrObject> CreateFieldControl(std::u16string_view rFieldDesc) const;
75
79
82 rtl::Reference<SdrObject> CreateXFormsControl( const svx::OXFormsDescriptor &_rDesc );
83
84 virtual void MarkListHasChanged() override;
85 virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* pWindow) override;
86 virtual void DeleteDeviceFromPaintView(OutputDevice& rOldDev) override;
87
88 static void createControlLabelPair(
89 OutputDevice const * _pOutDev,
90 sal_Int32 _nXOffsetMM,
91 sal_Int32 _nYOffsetMM,
92 const css::uno::Reference< css::beans::XPropertySet >& _rxField,
93 const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats,
94 SdrObjKind _nControlObjectID,
95 SdrInventor _nInventor,
96 SdrObjKind _nLabelObjectID,
97
98 // tdf#118963 Need a SdrModel for SdrObject creation. To make the
99 // demand clear, hand over a SdrMldel&
100 SdrModel& _rModel,
101
103 rtl::Reference<SdrUnoObj>& _rpControl
104 );
105
106 virtual SdrPageView* ShowSdrPage(SdrPage* pPage) override;
107 virtual void HideSdrPage() override;
108
109 virtual bool MouseButtonDown( const MouseEvent& _rMEvt, OutputDevice* _pWin ) override;
110
113 SVX_DLLPRIVATE void GrabFirstControlFocus();
114
117 SVX_DLLPRIVATE css::uno::Reference< css::form::runtime::XFormController >
118 GetFormController( const css::uno::Reference< css::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;
119
120 // SdrView
121 bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
122
124 FmFormPage* GetCurPage();
125
126 SVX_DLLPRIVATE void ActivateControls(SdrPageView const *);
127 SVX_DLLPRIVATE void DeactivateControls(SdrPageView const *);
128
129 SVX_DLLPRIVATE void ChangeDesignMode(bool bDesign);
130
131 SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl.get(); }
132 SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return pFormShell; }
133
134 struct FormShellAccess { friend class FmFormShell; private: FormShellAccess() { } };
135 void SetFormShell( FmFormShell* pShell, FormShellAccess ) { pFormShell = pShell; }
136
137 struct ImplAccess { friend class FmXFormView; private: ImplAccess() { } };
138 void SetMoveOutside( bool _bMoveOutside, ImplAccess ) { E3dView::SetMoveOutside( _bMoveOutside ); }
139 void InsertControlContainer(const css::uno::Reference< css::awt::XControlContainer >& xCC);
140 void RemoveControlContainer(const css::uno::Reference< css::awt::XControlContainer >& xCC);
141
142 virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut) override;
143 virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer) override;
144
146 SVX_DLLPRIVATE bool checkUnMarkAll(const css::uno::Reference< css::uno::XInterface >& _xSource);
147
148private:
149 SVX_DLLPRIVATE FmFormObj* getMarkedGrid() const;
150 protected:
152};
153
154#endif // _FML_FMVIEW_HXX
155
156/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Derived class of SdrView to edit 3D objects.
Definition: view3d.hxx:42
void SetMoveOutside(bool _bMoveOutside, ImplAccess)
Definition: fmview.hxx:138
SVX_DLLPRIVATE const OutputDevice * GetActualOutDev() const
Definition: fmview.hxx:145
FmFormShell * pFormShell
Definition: fmview.hxx:57
void SetFormShell(FmFormShell *pShell, FormShellAccess)
Definition: fmview.hxx:135
rtl::Reference< SdrObject > CreateFieldControl(const svx::ODataAccessDescriptor &_rColumnDescriptor)
create a control pair (label/bound control) for the database field description given.
rtl::Reference< FmXFormView > pImpl
Definition: fmview.hxx:56
SVX_DLLPRIVATE FmXFormView * GetImpl() const
Definition: fmview.hxx:131
SVX_DLLPRIVATE FmFormShell * GetFormShell() const
Definition: fmview.hxx:132
void SetMoveOutside(bool bOn)
Definition: svdmrkv.cxx:2724
virtual void DeleteDeviceFromPaintView(OutputDevice &rOldWin) override
Definition: svdedxv.cxx:2498
void HideSdrPage() override
Definition: svdedxv.cxx:199
SdrPageView * ShowSdrPage(SdrPage *pPage) override
Definition: svdedxv.cxx:131
virtual void AddDeviceToPaintView(OutputDevice &rNewDev, vcl::Window *pWindow) override
Definition: svdedxv.cxx:2486
virtual void MarkListHasChanged() override
Definition: svdedxv.cxx:2656
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:377
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut)
Definition: svdpntv.cxx:583
VclPtr< OutputDevice > mpActualOutDev
Definition: svdpntv.hxx:126
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:615
virtual bool MouseButtonDown(const MouseEvent &rMEvt, OutputDevice *pWin) override
Definition: svdview.cxx:196
bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin) override
Definition: svdview.cxx:160
class encapsulating the css::sdb::DataAccessDescriptor service.
void Init()
class SAL_NO_VTABLE XPropertySet
Definition: xmlexchg.hxx:28
SdrInventor
Definition: svdobj.hxx:99
SdrObjKind
Definition: svdobjkind.hxx:25
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35