LibreOffice Module svx (master)  1
fmshimp.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 #ifndef INCLUDED_SVX_SOURCE_INC_FMSHIMP_HXX
20 #define INCLUDED_SVX_SOURCE_INC_FMSHIMP_HXX
21 
22 #include <config_options.h>
23 #include <com/sun/star/sdbc/XResultSet.hpp>
24 #include <com/sun/star/container/ContainerEvent.hpp>
25 #include <com/sun/star/container/XContainerListener.hpp>
26 #include <com/sun/star/awt/XControl.hpp>
27 #include <com/sun/star/awt/XControlContainer.hpp>
28 #include <com/sun/star/form/XForm.hpp>
29 #include <com/sun/star/form/runtime/XFormController.hpp>
30 #include <com/sun/star/form/XFormComponent.hpp>
31 #include <com/sun/star/form/NavigationBarMode.hpp>
32 #include <com/sun/star/frame/XFrame.hpp>
33 #include <com/sun/star/view/XSelectionChangeListener.hpp>
34 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
35 #include <com/sun/star/beans/PropertyChangeEvent.hpp>
36 #include <com/sun/star/form/runtime/FeatureState.hpp>
37 #include <tools/diagnose_ex.h>
38 #include <vcl/timer.hxx>
39 #include <vcl/window.hxx>
40 #include <sfx2/shell.hxx>
41 #include <svx/svdmark.hxx>
42 #include <svx/fmsearch.hxx>
43 
44 #include <svx/fmtools.hxx>
45 #include <osl/mutex.hxx>
46 #include <comphelper/container.hxx>
47 #include <cppuhelper/compbase.hxx>
48 #include <unotools/configitem.hxx>
49 #include "formcontrolling.hxx"
51 #include <o3tl/typed_flags_set.hxx>
52 
53 #include <queue>
54 #include <string_view>
55 #include <vector>
56 #include <memory>
57 
58 typedef std::vector< css::uno::Reference< css::form::XForm > > FmFormArray;
59 
60 // catch database exceptions if they occur
61 #define DO_SAFE(statement) try { statement; } catch( const Exception& ) { TOOLS_WARN_EXCEPTION("svx", "unhandled exception (I tried to move a cursor (or something like that).)"); }
62 
63 enum class LoopGridsSync {
64  DISABLE_SYNC = 1,
65  FORCE_SYNC = 2,
66  ENABLE_SYNC = 3
67 };
68 enum class LoopGridsFlags
69 {
70  NONE = 0,
71  DISABLE_ROCTRLR = 4
72 };
73 namespace o3tl
74 {
75  template<> struct typed_flags<LoopGridsFlags> : is_typed_flags<LoopGridsFlags, 0x04> {};
76 }
77 
78 
79 // flags for controlling the behaviour when calling loadForms
80 enum class LoadFormsFlags {
81  Load = 0x0000, // default: simply load
82  Sync = 0x0000, // default: do in synchronous
83  Unload = 0x0001, // unload
84  Async = 0x0002 // do this async
85 };
86 namespace o3tl {
87  template<> struct typed_flags<LoadFormsFlags> : is_typed_flags<LoadFormsFlags, 0x0003> {};
88 }
89 
90 namespace weld {
91  class Menu;
92 }
93 
94 // a class iterating through all fields of a form which are bound to a field
95 // sub forms are ignored, grid columns (where the grid is a direct child of the form) are included
96 class FmXBoundFormFieldIterator : public ::comphelper::IndexAccessIterator
97 {
98 public:
99  FmXBoundFormFieldIterator(const css::uno::Reference< css::uno::XInterface>& _rStartingPoint) : ::comphelper::IndexAccessIterator(_rStartingPoint) { }
100 
101 protected:
102  virtual bool ShouldHandleElement(const css::uno::Reference< css::uno::XInterface>& _rElement) override;
103  virtual bool ShouldStepInto(const css::uno::Reference< css::uno::XInterface>& _rContainer) const override;
104 };
105 
106 class FmFormPage;
107 class FmFormPageImpl;
108 
110 {
114 
115  FmLoadAction( FmFormPage* _pPage, LoadFormsFlags _nFlags, ImplSVEvent * _nEventId )
116  :pPage( _pPage ), nEventId( _nEventId ), nFlags( _nFlags )
117  {
118  }
119 };
120 
121 
123 typedef ::cppu::WeakComponentImplHelper< css::beans::XPropertyChangeListener
124  , css::container::XContainerListener
125  , css::view::XSelectionChangeListener
126  , css::form::XFormControllerListener
128 
129 
131 {
132  using css::beans::XPropertyChangeListener::disposing;
133 protected:
134  FmXFormShell_Base_Disambiguation( ::osl::Mutex& _rMutex );
135  using WeakComponentImplHelperBase::disposing;
136 };
137 
138 
139 namespace svx
140 {
141  class FmTextControlShell;
142 }
143 
144 
146 typedef ::utl::ConfigItem FmXFormShell_CFGBASE;
147 
148 struct SdrViewEvent;
149 class FmFormShell;
150 class FmFormView;
151 class FmFormObj;
152 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) FmXFormShell final : public FmXFormShell_BASE
153  ,public FmXFormShell_CFGBASE
155 {
156  friend class FmFormView;
157  friend class FmXFormView;
158 
159  class SuspendPropertyTracking;
160  friend class SuspendPropertyTracking;
161 
162  // timer for delayed mark
163  Timer m_aMarkTimer;
164  std::vector<SdrObject*> m_arrSearchedControls;
165  // We enable a permanent cursor for the grid we found a searched text, it's disabled in the next "found" event.
166  FmFormArray m_aSearchForms;
167 
168  struct SAL_DLLPRIVATE InvalidSlotInfo {
169  sal_uInt16 id;
170  sal_uInt8 flags;
171  InvalidSlotInfo(sal_uInt16 slotId, sal_uInt8 flgs) : id(slotId), flags(flgs) {};
172  };
173  std::vector<InvalidSlotInfo> m_arrInvalidSlots;
174  // we explicitly switch off the propbrw before leaving the design mode
175  // this flag tells us if we have to switch it on again when reentering
176 
177  css::form::NavigationBarMode m_eNavigate; // kind of navigation
178 
179  // since I want to mark an SdrObject when searching for the treatment of the "found",
180  // I get all relevant objects before yanking up of the search dialog
181  // (the array is thus only valid during the search process)
182  std::vector<tools::Long> m_arrRelativeGridColumn;
183 
184  ::osl::Mutex m_aMutex;
185  ImplSVEvent * m_nInvalidationEvent;
186  ImplSVEvent * m_nActivationEvent;
187  ::std::queue< FmLoadAction >
188  m_aLoadingPages;
189 
191  std::unique_ptr<svx::FmTextControlShell> m_pTextShell;
192 
193  svx::ControllerFeatures m_aActiveControllerFeatures;
194  svx::ControllerFeatures m_aNavControllerFeatures;
195 
196  // current form, controller
197  // only available in the alive mode
198  css::uno::Reference< css::form::runtime::XFormController > m_xActiveController;
199  css::uno::Reference< css::form::runtime::XFormController > m_xNavigationController;
200  css::uno::Reference< css::form::XForm > m_xActiveForm;
201 
202  // current container of a page
203  // only available in the design mode
204  css::uno::Reference< css::container::XIndexAccess> m_xForms;
205 
206  // the currently selected objects, as to be displayed in the property browser
207  InterfaceBag m_aCurrentSelection;
209  css::uno::Reference< css::form::XForm > m_xCurrentForm;
211  InterfaceBag m_aLastKnownMarkedControls;
212 
213 
214  // And this is also for the 'found': When I find in GridControls, I need the column,
215  // but only get the number of the field corresponding to the number of the
216  // column + <offset>, where the offset depends on the position of the GridControl
217  // in the form. So here is a conversion.
218  css::uno::Reference< css::awt::XControlModel> m_xLastGridFound;
219  // the frame we live in
220  css::uno::Reference< css::frame::XFrame> m_xAttachedFrame;
221  // Administration of external form views (see the SID_FM_VIEW_AS_GRID-slot)
222  css::uno::Reference< css::frame::XController > m_xExternalViewController; // the controller for the external form view
223  css::uno::Reference< css::form::runtime::XFormController > m_xExtViewTriggerController; // the nav controller at the time the external display was triggered
224  css::uno::Reference< css::sdbc::XResultSet > m_xExternalDisplayedForm; // the form which the external view is based on
225 
227  m_eDocumentType;
228  sal_Int16 m_nLockSlotInvalidation;
229  bool m_bHadPropertyBrowserInDesignMode : 1;
230 
231  bool m_bTrackProperties : 1;
232  // should I (or the owner of this impl class) take car of the update of the css::beans::Property-Browser?
233 
234  bool m_bUseWizards : 1;
235 
236  bool m_bDatabaseBar : 1; // is there a database bar
237  bool m_bInActivate : 1; // is a controller activated
238  bool m_bSetFocus : 1; // may the focus be changed over
239  bool m_bFilterMode : 1; // is a filter currently set to the controls
240  bool m_bChangingDesignMode:1; // sal_True within SetDesignMode
241  bool m_bPreparedClose : 1; // for the current modification state of the current form
242  // PrepareClose had been called and the user denied to save changes
243  bool m_bFirstActivation : 1; // has the shell ever been activated?
244 
245 public:
246  // attribute access
247  SAL_DLLPRIVATE const css::uno::Reference< css::frame::XFrame >&
248  getHostFrame_Lock() const { return m_xAttachedFrame; }
249  SAL_DLLPRIVATE const css::uno::Reference< css::sdbc::XResultSet >&
250  getExternallyDisplayedForm_Lock() const { return m_xExternalDisplayedForm; }
251 
252  SAL_DLLPRIVATE bool
253  didPrepareClose_Lock() const { return m_bPreparedClose; }
254  SAL_DLLPRIVATE void
255  didPrepareClose_Lock(bool bDid) { m_bPreparedClose = bDid; }
256 
257  SAL_DLLPRIVATE FmXFormShell(FmFormShell& _rShell, SfxViewFrame* _pViewFrame);
258 
259 private:
260  SAL_DLLPRIVATE virtual ~FmXFormShell() override;
261 
262 // EventListener
263  SAL_DLLPRIVATE virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
264 
265 // css::container::XContainerListener
266  SAL_DLLPRIVATE virtual void SAL_CALL elementInserted(const css::container::ContainerEvent& rEvent) override;
267  SAL_DLLPRIVATE virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent& rEvent) override;
268  SAL_DLLPRIVATE virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent& rEvent) override;
269 
270 // XSelectionChangeListener
271  SAL_DLLPRIVATE virtual void SAL_CALL selectionChanged(const css::lang::EventObject& rEvent) override;
272 
273 // css::beans::XPropertyChangeListener
274  SAL_DLLPRIVATE virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override;
275 
276 // css::form::XFormControllerListener
277  SAL_DLLPRIVATE virtual void SAL_CALL formActivated(const css::lang::EventObject& rEvent) override;
278  SAL_DLLPRIVATE virtual void SAL_CALL formDeactivated(const css::lang::EventObject& rEvent) override;
279 
280 // OComponentHelper
281  SAL_DLLPRIVATE virtual void SAL_CALL disposing() override;
282 
283 public:
284  SAL_DLLPRIVATE void EnableTrackProperties_Lock(bool bEnable) { m_bTrackProperties = bEnable; }
285  SAL_DLLPRIVATE bool IsTrackPropertiesEnabled_Lock() const { return m_bTrackProperties; }
286 
287  // activation handling
288  SAL_DLLPRIVATE void viewActivated_Lock(FmFormView& _rCurrentView, bool _bSyncAction = false);
289  SAL_DLLPRIVATE void viewDeactivated_Lock(FmFormView& _rCurrentView, bool _bDeactivateController = true);
290 
291  // IControllerFeatureInvalidation
292  SAL_DLLPRIVATE virtual void invalidateFeatures/*_NoLock*/( const ::std::vector< sal_Int32 >& _rFeatures ) override;
293 
294  SAL_DLLPRIVATE void ExecuteTabOrderDialog_Lock( // execute SID_FM_TAB_DIALOG
295  const css::uno::Reference< css::awt::XTabControllerModel >& _rxForForm
296  );
297 
298  // stuff
299  SAL_DLLPRIVATE void AddElement_Lock(const css::uno::Reference< css::uno::XInterface>& Element);
300  SAL_DLLPRIVATE void RemoveElement_Lock(const css::uno::Reference< css::uno::XInterface>& Element);
301 
305  SAL_DLLPRIVATE void UpdateForms_Lock(bool bInvalidate);
306 
307  SAL_DLLPRIVATE void ExecuteSearch_Lock(); // execute SID_FM_SEARCH
308  SAL_DLLPRIVATE void CreateExternalView_Lock(); // execute SID_FM_VIEW_AS_GRID
309 
310  SAL_DLLPRIVATE bool GetY2KState_Lock(sal_uInt16 & n);
311  SAL_DLLPRIVATE void SetY2KState_Lock(sal_uInt16 n);
312 
313 private:
314  // form handling
316  SAL_DLLPRIVATE void loadForms_Lock( FmFormPage* _pPage, const LoadFormsFlags _nBehaviour );
317  SAL_DLLPRIVATE void smartControlReset( const css::uno::Reference< css::container::XIndexAccess >& _rxModels );
318 
319 
320  SAL_DLLPRIVATE void startListening_Lock();
321  SAL_DLLPRIVATE void stopListening_Lock();
322 
323  SAL_DLLPRIVATE css::uno::Reference< css::awt::XControl >
324  impl_getControl_Lock(
325  const css::uno::Reference< css::awt::XControlModel>& i_rxModel,
326  const FmFormObj& i_rKnownFormObj
327  );
328 
329  // collects in strNames the names of all forms
330  SAL_DLLPRIVATE static void impl_collectFormSearchContexts_nothrow_Lock(
331  const css::uno::Reference< css::uno::XInterface>& _rxStartingPoint,
332  const OUString& _rCurrentLevelPrefix,
333  FmFormArray& _out_rForms,
334  ::std::vector< OUString >& _out_rNames );
335 
339  SAL_DLLPRIVATE bool impl_checkDisposed_Lock() const;
340 
341 public:
342  // method for non design mode (alive mode)
343  SAL_DLLPRIVATE void setActiveController_Lock(const css::uno::Reference< css::form::runtime::XFormController>& _xController, bool _bNoSaveOldContent = false);
344  SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getActiveController_Lock() const { return m_xActiveController; }
345  SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getActiveInternalController_Lock() const { return m_xActiveController == m_xExternalViewController ? m_xExtViewTriggerController : m_xActiveController; }
346  SAL_DLLPRIVATE const css::uno::Reference< css::form::XForm>& getActiveForm_Lock() const { return m_xActiveForm; }
347  SAL_DLLPRIVATE const css::uno::Reference< css::form::runtime::XFormController>& getNavController_Lock() const { return m_xNavigationController; }
348 
349  SAL_DLLPRIVATE const svx::ControllerFeatures& getActiveControllerFeatures_Lock() const
350  { return m_aActiveControllerFeatures; }
351  SAL_DLLPRIVATE const svx::ControllerFeatures& getNavControllerFeatures_Lock() const
352  { return m_aNavControllerFeatures.isAssigned() ? m_aNavControllerFeatures : m_aActiveControllerFeatures; }
353 
358  SAL_DLLPRIVATE bool setCurrentSelection_Lock(const InterfaceBag& rSelection);
359 
362  SAL_DLLPRIVATE bool selectLastMarkedControls_Lock();
363 
366  void getCurrentSelection_Lock(InterfaceBag& /* [out] */ _rSelection) const;
367 
372  SAL_DLLPRIVATE bool setCurrentSelectionFromMark_Lock(const SdrMarkList& rMarkList);
373 
375  SAL_DLLPRIVATE const css::uno::Reference< css::form::XForm >&
376  getCurrentForm_Lock() const { return m_xCurrentForm; }
377  SAL_DLLPRIVATE void forgetCurrentForm_Lock();
379  SAL_DLLPRIVATE bool onlyControlsAreMarked_Lock() const { return !m_aLastKnownMarkedControls.empty(); }
380 
382  SAL_DLLPRIVATE bool isSolelySelected_Lock(
383  const css::uno::Reference< css::uno::XInterface >& _rxObject
384  );
385 
387  SAL_DLLPRIVATE void handleMouseButtonDown_Lock( const SdrViewEvent& _rViewEvent );
389  SAL_DLLPRIVATE void handleShowPropertiesRequest_Lock();
390 
391  SAL_DLLPRIVATE bool hasForms_Lock() const { return m_xForms.is() && m_xForms->getCount() != 0; }
392  SAL_DLLPRIVATE bool hasDatabaseBar_Lock() const { return m_bDatabaseBar; }
393 
394  SAL_DLLPRIVATE void ShowSelectionProperties_Lock(bool bShow);
395  SAL_DLLPRIVATE bool IsPropBrwOpen_Lock() const;
396 
397  SAL_DLLPRIVATE void DetermineSelection_Lock(const SdrMarkList& rMarkList);
398  SAL_DLLPRIVATE void SetSelection_Lock(const SdrMarkList& rMarkList);
399  SAL_DLLPRIVATE void SetSelectionDelayed_Lock();
400 
401  SAL_DLLPRIVATE void SetDesignMode_Lock(bool bDesign);
402 
403  SAL_DLLPRIVATE bool GetWizardUsing_Lock() const { return m_bUseWizards; }
404  SAL_DLLPRIVATE void SetWizardUsing_Lock(bool _bUseThem);
405 
406  // setting the filter mode
407  SAL_DLLPRIVATE bool isInFilterMode_Lock() const { return m_bFilterMode; }
408  SAL_DLLPRIVATE void startFiltering_Lock();
409  SAL_DLLPRIVATE void stopFiltering_Lock(bool bSave);
410 
411  // fills rMenu to be a menu that contains all ControlConversion entries
412  SAL_DLLPRIVATE static void GetConversionMenu_Lock(weld::Menu& rMenu);
413 
415  SAL_DLLPRIVATE bool canConvertCurrentSelectionToControl_Lock(std::string_view rIdent);
417  SAL_DLLPRIVATE void checkControlConversionSlotsForCurrentSelection_Lock(weld::Menu& rMenu);
419  SAL_DLLPRIVATE bool executeControlConversionSlot_Lock(const css::uno::Reference< css::form::XFormComponent >& _rxObject, std::string_view rIdent);
423  SAL_DLLPRIVATE void executeControlConversionSlot_Lock(std::string_view rIdent);
425  SAL_DLLPRIVATE static bool isControlConversionSlot(std::string_view rIdent);
426 
427  SAL_DLLPRIVATE void ExecuteTextAttribute_Lock(SfxRequest& _rReq);
428  SAL_DLLPRIVATE void GetTextAttributeState_Lock(SfxItemSet& _rSet);
429  SAL_DLLPRIVATE bool IsActiveControl_Lock(bool _bCountRichTextOnly) const;
430  SAL_DLLPRIVATE void ForgetActiveControl_Lock();
431  SAL_DLLPRIVATE void SetControlActivationHandler_Lock(const Link<LinkParamNone*,void>& _rHdl);
432 
434  SAL_DLLPRIVATE ::svxform::DocumentType getDocumentType_Lock() const;
435  SAL_DLLPRIVATE bool isEnhancedForm_Lock() const;
436 
438  SAL_DLLPRIVATE bool IsReadonlyDoc_Lock() const;
439 
440  // Setting the curObject/selObject/curForm is delayed (SetSelectionDelayed). With the
441  // following functions this can be inquired/enforced.
442  SAL_DLLPRIVATE inline bool IsSelectionUpdatePending_Lock() const;
443  SAL_DLLPRIVATE void ForceUpdateSelection_Lock();
444 
445  SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel> getContextDocument_Lock() const;
446  SAL_DLLPRIVATE css::uno::Reference< css::form::XForm> getInternalForm_Lock(const css::uno::Reference< css::form::XForm>& _xForm) const;
447  SAL_DLLPRIVATE css::uno::Reference< css::sdbc::XResultSet> getInternalForm_Lock(const css::uno::Reference< css::sdbc::XResultSet>& _xForm) const;
448  // if the form belongs to the controller (extern) displaying a grid, the according internal form will
449  // be displayed, _xForm else
450 
451  // check if the current control of the active controller has the focus
452  SAL_DLLPRIVATE bool HasControlFocus_Lock() const;
453 
454 private:
455  DECL_DLLPRIVATE_LINK(OnFoundData_Lock, FmFoundRecordInformation&, void);
456  DECL_DLLPRIVATE_LINK(OnCanceledNotFound_Lock, FmFoundRecordInformation&, void);
457  DECL_DLLPRIVATE_LINK(OnSearchContextRequest_Lock, FmSearchContext&, sal_uInt32);
458  DECL_DLLPRIVATE_LINK(OnTimeOut_Lock, Timer*, void);
459  DECL_DLLPRIVATE_LINK(OnFirstTimeActivation_Lock, void*, void);
460  DECL_DLLPRIVATE_LINK(OnFormsCreated_Lock, FmFormPageImpl&, void);
461 
462  SAL_DLLPRIVATE void LoopGrids_Lock(LoopGridsSync nSync, LoopGridsFlags nWhat = LoopGridsFlags::NONE);
463 
464  // invalidation of slots
465  SAL_DLLPRIVATE void InvalidateSlot_Lock(sal_Int16 nId, bool bWithId);
466  SAL_DLLPRIVATE void UpdateSlot_Lock(sal_Int16 nId);
467  // locking the invalidation - if the internal locking counter goes to 0, all accumulated slots
468  // are invalidated (asynchronously)
469  SAL_DLLPRIVATE void LockSlotInvalidation_Lock(bool bLock);
470 
471  DECL_DLLPRIVATE_LINK(OnInvalidateSlots_Lock, void*, void);
472 
473  SAL_DLLPRIVATE void CloseExternalFormViewer_Lock();
474  // closes the task-local beamer displaying a grid view for a form
475 
476  // ConfigItem related stuff
477  SAL_DLLPRIVATE virtual void Notify( const css::uno::Sequence< OUString >& _rPropertyNames) override;
478  SAL_DLLPRIVATE void implAdjustConfigCache_Lock();
479 
480  SAL_DLLPRIVATE css::uno::Reference< css::awt::XControlContainer >
481  getControlContainerForView_Lock() const;
482 
485  SAL_DLLPRIVATE void impl_defaultCurrentForm_nothrow_Lock();
486 
490  SAL_DLLPRIVATE void impl_updateCurrentForm_Lock( const css::uno::Reference< css::form::XForm >& _rxNewCurForm );
491 
494  SAL_DLLPRIVATE void impl_switchActiveControllerListening_Lock(const bool _bListen);
495 
498  SAL_DLLPRIVATE void impl_AddElement_nothrow(const css::uno::Reference< css::uno::XInterface>& Element);
499 
502  SAL_DLLPRIVATE void impl_RemoveElement_nothrow_Lock(const css::uno::Reference< css::uno::XInterface>& Element);
503 
504  SAL_DLLPRIVATE virtual void ImplCommit() override;
505 
506  // asynchronous cursor actions/navigation slot handling
507 
508 public:
514  SAL_DLLPRIVATE void ExecuteFormSlot_Lock(sal_Int32 _nSlot);
515 
518  SAL_DLLPRIVATE bool IsFormSlotEnabled( sal_Int32 _nSlot, css::form::runtime::FeatureState* _pCompleteState );
519 
520  SAL_DLLPRIVATE static OString SlotToIdent(sal_uInt16 nSlot);
521 
522 private:
523  DECL_DLLPRIVATE_LINK( OnLoadForms_Lock, void*, void );
524 };
525 
526 
527 inline bool FmXFormShell::IsSelectionUpdatePending_Lock() const
528 {
529  return m_aMarkTimer.IsActive();
530 }
531 
532 
533 // = An iterator that, emanating from an interface, looks for an object whose
534 // = css::beans::Property-Set has a ControlSource and a BoundField property, the
535 // = latter having a non-NULL value. If the interface itself does not meet this
536 // = condition, it is tested whether it is a container (that is, has a
537 // = css::container::XIndexAccess), then it is descended there and the same tried
538 // = for each element of the container (again possibly with descent). If any
539 // = object thereby has the required property, the part with the container test
540 // = for that object is omitted.
541 // =
542 
543 class SearchableControlIterator : public ::comphelper::IndexAccessIterator
544 {
545  OUString m_sCurrentValue;
546  // the current value of the ControlSource css::beans::Property
547 
548 public:
549  const OUString& getCurrentValue() const { return m_sCurrentValue; }
550 
551 public:
552  SearchableControlIterator(css::uno::Reference< css::uno::XInterface> const & xStartingPoint);
553 
554  virtual bool ShouldHandleElement(const css::uno::Reference< css::uno::XInterface>& rElement) override;
555  virtual bool ShouldStepInto(const css::uno::Reference< css::uno::XInterface>& xContainer) const override;
556  virtual void Invalidate() override { IndexAccessIterator::Invalidate(); m_sCurrentValue.clear(); }
557 };
558 
559 #endif // INCLUDED_SVX_SOURCE_INC_FMSHIMP_HXX
560 
561 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString & getCurrentValue() const
Definition: fmshimp.hxx:549
FmXFormShell_Base_Disambiguation FmXFormShell_BASE
Definition: fmshimp.hxx:145
easier access to a FormControllerHelper instance
osl::Mutex m_aMutex
void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
::utl::ConfigItem FmXFormShell_CFGBASE
Definition: fmshimp.hxx:146
::cppu::WeakComponentImplHelper< css::beans::XPropertyChangeListener, css::container::XContainerListener, css::view::XSelectionChangeListener, css::form::XFormControllerListener > FmXFormShell_BD_BASE
Definition: fmshimp.hxx:122
std::vector< css::uno::Reference< css::form::XForm > > FmFormArray
Definition: fmshimp.hxx:58
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames)=0
FmLoadAction(FmFormPage *_pPage, LoadFormsFlags _nFlags, ImplSVEvent *_nEventId)
Definition: fmshimp.hxx:115
virtual void Invalidate() override
Definition: fmshimp.hxx:556
virtual DECL_LISTENERMULTIPLEXER_END void SAL_CALL selectionChanged(const css::lang::EventObject &aEvent) override
LoadFormsFlags
Definition: fmshimp.hxx:80
LoopGridsSync
Definition: fmshimp.hxx:63
FmXBoundFormFieldIterator(const css::uno::Reference< css::uno::XInterface > &_rStartingPoint)
Definition: fmshimp.hxx:99
FmFormPage * pPage
Definition: fmshimp.hxx:111
virtual bool ShouldHandleElement(const css::uno::Reference< css::uno::XInterface > &_rElement) override
Definition: fmshimp.cxx:517
void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
DECL_LISTENERMULTIPLEXER_END void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
Shell * m_pShell
LoadFormsFlags nFlags
Definition: fmshimp.hxx:113
bool empty() const
FmXFormShell_Base_Disambiguation(::osl::Mutex &_rMutex)
Definition: fmshimp.cxx:597
unsigned char sal_uInt8
ImplSVEvent * nEventId
Definition: fmshimp.hxx:112
virtual void ImplCommit()=0
virtual bool ShouldStepInto(const css::uno::Reference< css::uno::XInterface > &_rContainer) const override
Definition: fmshimp.cxx:507
bool isAssigned() const
checks whether the instance is properly assigned to a form and/or controller
LoopGridsFlags
Definition: fmshimp.hxx:68