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