LibreOffice Module svx (master)  1
fmview.cxx
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 #include <sfx2/docfile.hxx>
21 #ifdef REFERENCE
22 #undef REFERENCE
23 #endif
24 #include <com/sun/star/sdb/SQLContext.hpp>
25 #include <com/sun/star/sdbc/XConnection.hpp>
26 #include <com/sun/star/form/XLoadable.hpp>
27 #include <fmvwimp.hxx>
28 #include <sfx2/objsh.hxx>
29 #include <sfx2/viewsh.hxx>
30 #include <sfx2/viewfrm.hxx>
31 #include <sfx2/bindings.hxx>
32 #include <fmobj.hxx>
33 #include <svx/svditer.hxx>
34 #include <svx/svdpagv.hxx>
35 #include <svx/fmview.hxx>
36 #include <svx/fmmodel.hxx>
37 #include <svx/fmpage.hxx>
38 #include <svx/fmshell.hxx>
39 #include <fmshimp.hxx>
40 #include <fmservs.hxx>
41 #include <fmundo.hxx>
45 #include <com/sun/star/lang/XServiceInfo.hpp>
46 #include <com/sun/star/awt/XControl.hpp>
47 #include <tools/debug.hxx>
48 #include <svx/sdrpagewindow.hxx>
49 #include <svx/sdrpaintwindow.hxx>
50 #include <svx/svxids.hrc>
51 #include <vcl/i18nhelp.hxx>
52 #include <vcl/window.hxx>
53 
54 using namespace ::com::sun::star;
55 using namespace ::com::sun::star::uno;
56 using namespace ::com::sun::star::lang;
57 using namespace ::com::sun::star::sdbc;
58 using namespace ::com::sun::star::sdb;
59 using namespace ::com::sun::star::beans;
60 using namespace ::com::sun::star::container;
61 using namespace ::com::sun::star::form;
62 using namespace ::com::sun::star::util;
63 using namespace ::svxform;
64 using namespace ::svx;
65 
67  SdrModel& rSdrModel,
68  OutputDevice* pOut)
69 : E3dView(rSdrModel, pOut)
70 {
71  Init();
72 }
73 
75 {
76  pFormShell = nullptr;
77  pImpl = new FmXFormView(this);
78 
79  // set model
80  SdrModel* pModel = GetModel();
81 
82  DBG_ASSERT( dynamic_cast<const FmFormModel*>( pModel) != nullptr, "Wrong model" );
83  FmFormModel* pFormModel = dynamic_cast<FmFormModel*>(pModel);
84  if( !pFormModel )
85  return;
86 
87  // get DesignMode from model
88  bool bInitDesignMode = pFormModel->GetOpenInDesignMode();
89  if ( pFormModel->OpenInDesignModeIsDefaulted( ) )
90  { // this means that nobody ever explicitly set this on the model, and the model has never
91  // been loaded from a stream.
92  // This means this is a newly created document. This means, we want to have it in design
93  // mode by default (though a newly created model returns true for GetOpenInDesignMode).
94  // We _want_ to have this because it makes a lot of hacks following the original fix
95  DBG_ASSERT( !bInitDesignMode, "FmFormView::Init: doesn't the model default to FALSE anymore?" );
96  // if this asserts, either the on-construction default in the model has changed (then this here
97  // may not be necessary anymore), or we're not dealing with a new document...
98  bInitDesignMode = true;
99  }
100 
101  SfxObjectShell* pObjShell = pFormModel->GetObjectShell();
102  if ( pObjShell && pObjShell->GetMedium() )
103  {
104  const SfxPoolItem *pItem=nullptr;
105  if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET )
106  {
107  ::comphelper::NamedValueCollection aComponentData( static_cast<const SfxUnoAnyItem*>(pItem)->GetValue() );
108  bInitDesignMode = aComponentData.getOrDefault( "ApplyFormDesignMode", bInitDesignMode );
109  }
110  }
111 
112  // this will be done in the shell
113  // bDesignMode = !bInitDesignMode; // forces execution of SetDesignMode
114  SetDesignMode( bInitDesignMode );
115 }
116 
117 
119 {
120  if( pFormShell )
121  pFormShell->SetView( nullptr );
122 
123  pImpl->notifyViewDying();
124 }
125 
126 
128 {
129  SdrPageView* pPageView = GetSdrPageView();
130  FmFormPage* pCurPage = pPageView ? dynamic_cast<FmFormPage*>( pPageView->GetPage() ) : nullptr;
131  return pCurPage;
132 }
133 
134 
136 {
138 
139  if ( !(pFormShell && IsDesignMode()) )
140  return;
141 
142  FmFormObj* pObj = getMarkedGrid();
143  if ( pImpl->m_pMarkedGrid && pImpl->m_pMarkedGrid != pObj )
144  {
145  pImpl->m_pMarkedGrid = nullptr;
146  if ( pImpl->m_xWindow.is() )
147  {
148  pImpl->m_xWindow->removeFocusListener(pImpl);
149  pImpl->m_xWindow = nullptr;
150  }
151  SetMoveOutside(false);
152  //OLMRefreshAllIAOManagers();
153  }
154 
155  pFormShell->GetImpl()->SetSelectionDelayed_Lock();
156 }
157 
158 namespace
159 {
160  const SdrPageWindow* findPageWindow( const SdrPaintView* _pView, OutputDevice const * _pWindow )
161  {
162  SdrPageView* pPageView = _pView->GetSdrPageView();
163  if(pPageView)
164  {
165  for ( sal_uInt32 window = 0; window < pPageView->PageWindowCount(); ++window )
166  {
167  const SdrPageWindow* pPageWindow = pPageView->GetPageWindow( window );
168  if ( !pPageWindow || &pPageWindow->GetPaintWindow().GetOutputDevice() != _pWindow )
169  continue;
170 
171  return pPageWindow;
172  }
173  }
174  return nullptr;
175  }
176 }
177 
178 
180 {
181  E3dView::AddWindowToPaintView(pNewWin, pWindow);
182 
183  if ( !pNewWin )
184  return;
185 
186  // look up the PageViewWindow for the newly inserted window, and care for it
187  // #i39269# / 2004-12-20 / frank.schoenheit@sun.com
188  const SdrPageWindow* pPageWindow = findPageWindow( this, pNewWin );
189  if ( pPageWindow )
190  pImpl->addWindow( *pPageWindow );
191 }
192 
193 
195 {
196  const SdrPageWindow* pPageWindow = findPageWindow( this, pNewWin );
197  if ( pPageWindow )
198  pImpl->removeWindow( pPageWindow->GetControlContainer() );
199 
201 }
202 
203 
205 {
206  if (bDesign == IsDesignMode())
207  return;
208 
209  FmFormModel* pModel = dynamic_cast<FmFormModel*>( GetModel() );
210  if (pModel)
211  { // For the duration of the transition the Undo-Environment is disabled. This ensures that non-transient Properties can
212  // also be changed (this should be done with care and also reversed before switching the mode back. An example is the
213  // setting of the maximal length of the text by FmXEditModel on its control.)
214  pModel->GetUndoEnv().Lock();
215  }
216 
217  // --- 1. deactivate all controls if we are switching to design mode
218  if ( bDesign )
220 
221  // --- 2. simulate a deactivation (the shell will handle some things there ...?)
222  if ( pFormShell && pFormShell->GetImpl() )
223  pFormShell->GetImpl()->viewDeactivated_Lock(*this);
224  else
225  pImpl->Deactivate();
226 
227  // --- 3. activate all controls, if we're switching to alive mode
228  if ( !bDesign )
230 
231  // --- 4. load resp. unload the forms
232  FmFormPage* pCurPage = GetCurPage();
233  if ( pCurPage )
234  {
235  if ( pFormShell && pFormShell->GetImpl() )
236  pFormShell->GetImpl()->loadForms_Lock(pCurPage, (bDesign ? LoadFormsFlags::Unload : LoadFormsFlags::Load));
237  }
238 
239  // --- 5. base class functionality
240  SetDesignMode( bDesign );
241 
242  // --- 6. simulate an activation (the shell will handle some things there ...?)
243  OSL_PRECOND( pFormShell && pFormShell->GetImpl(), "FmFormView::ChangeDesignMode: is this really allowed? No shell?" );
244  if ( pFormShell && pFormShell->GetImpl() )
245  pFormShell->GetImpl()->viewActivated_Lock(*this);
246  else
247  pImpl->Activate();
248 
249  if ( pCurPage )
250  {
251  if ( bDesign )
252  {
253  if ( GetActualOutDev() && GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW )
254  {
255  const vcl::Window* pWindow = GetActualOutDev()->GetOwnerWindow();
256  const_cast< vcl::Window* >( pWindow )->GrabFocus();
257  }
258 
259  // redraw UNO objects
260  if ( GetSdrPageView() )
261  {
262  SdrObjListIter aIter(pCurPage);
263  while( aIter.IsMore() )
264  {
265  SdrObject* pObj = aIter.Next();
266  if (pObj && pObj->IsUnoObj())
267  {
268  // For redraw just use ActionChanged()
269  // pObj->BroadcastObjectChange();
270  pObj->ActionChanged();
271  }
272  }
273  }
274  }
275  else
276  {
277  // set the auto focus to the first control (if indicated by the model to do so)
278  bool bForceControlFocus = pModel && pModel->GetAutoControlFocus();
279  if (bForceControlFocus)
280  pImpl->AutoFocus();
281  }
282  }
283 
284  // Unlock Undo-Environment
285  if (pModel)
286  pModel->GetUndoEnv().UnLock();
287 }
288 
289 
291 {
292  if ( !IsDesignMode() )
293  pImpl->AutoFocus();
294 }
295 
296 
298 {
299  SdrPageView* pPV = E3dView::ShowSdrPage(pPage);
300 
301  if (pPage)
302  {
303  if (!IsDesignMode())
304  {
305  // creating the controllers
306  ActivateControls(pPV);
307 
308  // Deselect all
309  UnmarkAll();
310  }
311  else if ( pFormShell && pFormShell->IsDesignMode() )
312  {
313  FmXFormShell* pFormShellImpl = pFormShell->GetImpl();
314  pFormShellImpl->UpdateForms_Lock(true);
315 
316  // so that the form navigator can react to the pagechange
317  pFormShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_FMEXPLORER_CONTROL, true);
318 
319  pFormShellImpl->SetSelection_Lock(GetMarkedObjectList());
320  }
321  }
322 
323  // notify our shell that we have been activated
324  if ( pFormShell && pFormShell->GetImpl() )
325  pFormShell->GetImpl()->viewActivated_Lock(*this);
326  else
327  pImpl->Activate();
328 
329  return pPV;
330 }
331 
332 
334 {
335  // --- 1. deactivate controls
336  if ( !IsDesignMode() )
338 
339  // --- 2. tell the shell the view is (going to be) deactivated
340  if ( pFormShell && pFormShell->GetImpl() )
341  pFormShell->GetImpl()->viewDeactivated_Lock(*this);
342  else
343  pImpl->Deactivate();
344 
345  // --- 3. base class behavior
347 }
348 
349 
351 {
352  if (!pPageView)
353  return;
354 
355  for (sal_uInt32 i = 0; i < pPageView->PageWindowCount(); ++i)
356  {
357  const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(i);
358  pImpl->addWindow(rPageWindow);
359  }
360 }
361 
362 
364 {
365  if( !pPageView )
366  return;
367 
368  for (sal_uInt32 i = 0; i < pPageView->PageWindowCount(); ++i)
369  {
370  const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(i);
371  pImpl->removeWindow(rPageWindow.GetControlContainer() );
372  }
373 }
374 
375 
376 SdrObjectUniquePtr FmFormView::CreateFieldControl( const ODataAccessDescriptor& _rColumnDescriptor )
377 {
378  return pImpl->implCreateFieldControl( _rColumnDescriptor );
379 }
380 
381 
382 SdrObjectUniquePtr FmFormView::CreateXFormsControl( const OXFormsDescriptor &_rDesc )
383 {
384  return pImpl->implCreateXFormsControl(_rDesc);
385 }
386 
387 
388 SdrObjectUniquePtr FmFormView::CreateFieldControl(const OUString& rFieldDesc) const
389 {
390  sal_Int32 nIdx{ 0 };
391  OUString sDataSource = rFieldDesc.getToken(0, u'\x000B', nIdx);
392  OUString sObjectName = rFieldDesc.getToken(0, u'\x000B', nIdx);
393  sal_uInt16 nObjectType = static_cast<sal_uInt16>(rFieldDesc.getToken(0, u'\x000B', nIdx).toInt32());
394  OUString sFieldName = rFieldDesc.getToken(0, u'\x000B', nIdx);
395 
396  if (sFieldName.isEmpty() || sObjectName.isEmpty() || sDataSource.isEmpty())
397  return nullptr;
398 
399  ODataAccessDescriptor aColumnDescriptor;
400  aColumnDescriptor.setDataSource(sDataSource);
401  aColumnDescriptor[ DataAccessDescriptorProperty::Command ] <<= sObjectName;
402  aColumnDescriptor[ DataAccessDescriptorProperty::CommandType ] <<= nObjectType;
403  aColumnDescriptor[ DataAccessDescriptorProperty::ColumnName ] <<= sFieldName;
404 
405  return pImpl->implCreateFieldControl( aColumnDescriptor );
406 }
407 
408 
409 void FmFormView::InsertControlContainer(const Reference< css::awt::XControlContainer > & xCC)
410 {
411  if( IsDesignMode() )
412  return;
413 
414  SdrPageView* pPageView = GetSdrPageView();
415  if( !pPageView )
416  return;
417 
418  for( sal_uInt32 i = 0; i < pPageView->PageWindowCount(); i++ )
419  {
420  const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(i);
421 
422  if( rPageWindow.GetControlContainer( false ) == xCC )
423  {
424  pImpl->addWindow(rPageWindow);
425  break;
426  }
427  }
428 }
429 
430 
431 void FmFormView::RemoveControlContainer(const Reference< css::awt::XControlContainer > & xCC)
432 {
433  if( !IsDesignMode() )
434  {
435  pImpl->removeWindow( xCC );
436  }
437 }
438 
439 
441 {
442  SdrPaintWindow* pPaintWindow = E3dView::BeginCompleteRedraw( pOut );
443  pImpl->suspendTabOrderUpdate();
444  return pPaintWindow;
445 }
446 
447 
448 void FmFormView::EndCompleteRedraw( SdrPaintWindow& rPaintWindow, bool bPaintFormLayer )
449 {
450  E3dView::EndCompleteRedraw( rPaintWindow, bPaintFormLayer );
451  pImpl->resumeTabOrderUpdate();
452 }
453 
454 
455 bool FmFormView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
456 {
457  bool bDone = false;
458  const vcl::KeyCode& rKeyCode = rKEvt.GetKeyCode();
459  if ( IsDesignMode()
460  && rKeyCode.GetCode() == KEY_RETURN
461  )
462  {
463  // RETURN alone enters grid controls, for keyboard accessibility
464  if ( pWin
465  && !rKeyCode.IsShift()
466  && !rKeyCode.IsMod1()
467  && !rKeyCode.IsMod2()
468  )
469  {
470  FmFormObj* pObj = getMarkedGrid();
471  if ( pObj )
472  {
473  Reference< awt::XWindow > xWindow( pObj->GetUnoControl( *this, *pWin->GetOutDev() ), UNO_QUERY );
474  if ( xWindow.is() )
475  {
476  pImpl->m_pMarkedGrid = pObj;
477  pImpl->m_xWindow = xWindow;
478  // add as listener to get notified when ESC will be pressed inside the grid
479  pImpl->m_xWindow->addFocusListener(pImpl);
480  SetMoveOutside(true);
481  //OLMRefreshAllIAOManagers();
482  xWindow->setFocus();
483  bDone = true;
484  }
485  }
486  }
487  // Alt-RETURN alone shows the properties of the selection
488  if ( pFormShell
489  && pFormShell->GetImpl()
490  && !rKeyCode.IsShift()
491  && !rKeyCode.IsMod1()
492  && rKeyCode.IsMod2()
493  )
494  {
495  pFormShell->GetImpl()->handleShowPropertiesRequest_Lock();
496  }
497 
498  }
499 
500  // tdf#139804 Allow selecting form controls with Alt-<Mnemonic>
501  if (rKeyCode.IsMod2() && rKeyCode.GetCode())
502  {
503  if (FmFormPage* pCurPage = GetCurPage())
504  {
505  for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
506  {
507  SdrObject* pObj = pCurPage->GetObj(a);
508  FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
509  if (!pFormObject)
510  continue;
511 
512  Reference<awt::XControl> xControl = pFormObject->GetUnoControl(*this, *pWin->GetOutDev());
513  if (!xControl.is())
514  continue;
516  VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
517  if (rI18nHelper.MatchMnemonic(pWindow->GetText(), rKEvt.GetCharCode()))
518  {
519  pWindow->GrabFocus();
520  pWindow->KeyInput(rKEvt);
521  bDone = true;
522  break;
523  }
524  }
525  }
526  }
527 
528  if ( !bDone )
529  bDone = E3dView::KeyInput(rKEvt,pWin);
530  return bDone;
531 }
532 
533 bool FmFormView::checkUnMarkAll(const Reference< XInterface >& _xSource)
534 {
535  Reference< css::awt::XControl> xControl(pImpl->m_xWindow,UNO_QUERY);
536  bool bRet = !xControl.is() || !_xSource.is() || _xSource != xControl->getModel();
537  if ( bRet )
538  UnmarkAll();
539 
540  return bRet;
541 }
542 
543 
545 {
546  bool bReturn = E3dView::MouseButtonDown( _rMEvt, _pWin );
547 
548  if ( pFormShell && pFormShell->GetImpl() )
549  {
550  SdrViewEvent aViewEvent;
551  PickAnything( _rMEvt, SdrMouseEventKind::BUTTONDOWN, aViewEvent );
552  pFormShell->GetImpl()->handleMouseButtonDown_Lock(aViewEvent);
553  }
554 
555  return bReturn;
556 }
557 
558 
559 FmFormObj* FmFormView::getMarkedGrid() const
560 {
561  FmFormObj* pFormObject = nullptr;
562  const SdrMarkList& rMarkList = GetMarkedObjectList();
563  if ( 1 == rMarkList.GetMarkCount() )
564  {
565  SdrMark* pMark = rMarkList.GetMark(0);
566  if ( pMark )
567  {
568  pFormObject = FmFormObj::GetFormObject( pMark->GetMarkedSdrObj() );
569  if ( pFormObject )
570  {
571  Reference< XServiceInfo > xServInfo( pFormObject->GetUnoControlModel(), UNO_QUERY );
572  if ( !xServInfo.is() || !xServInfo->supportsService( FM_SUN_COMPONENT_GRIDCONTROL ) )
573  pFormObject = nullptr;
574  }
575  }
576  }
577  return pFormObject;
578 }
579 
580 void FmFormView::createControlLabelPair( OutputDevice const * _pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM,
581  const Reference< XPropertySet >& _rxField, const Reference< XNumberFormats >& _rxNumberFormats,
582  SdrObjKind _nControlObjectID, SdrInventor _nInventor, SdrObjKind _nLabelObjectID,
583  SdrModel& _rModel,
584  std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,
585  std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl )
586 {
588  *_pOutDev, _nXOffsetMM, _nYOffsetMM,
589  _rxField, _rxNumberFormats,
590  _nControlObjectID, u"", _nInventor, _nLabelObjectID,
591  _rModel,
592  _rpLabel, _rpControl
593  );
594 }
595 
596 Reference< runtime::XFormController > FmFormView::GetFormController( const Reference< XForm >& _rxForm, const OutputDevice& _rDevice ) const
597 {
598  return pImpl->getFormController( _rxForm, _rDevice );
599 }
600 
601 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SVX_DLLPRIVATE bool checkUnMarkAll(const css::uno::Reference< css::uno::XInterface > &_xSource)
Definition: fmview.cxx:533
SfxViewFrame * GetViewFrame() const
SVX_DLLPRIVATE void ActivateControls(SdrPageView const *)
Definition: fmview.cxx:350
static void createControlLabelPair(OutputDevice const *_pOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM, const css::uno::Reference< css::beans::XPropertySet > &_rxField, const css::uno::Reference< css::util::XNumberFormats > &_rxNumberFormats, SdrObjKind _nControlObjectID, SdrInventor _nInventor, SdrObjKind _nLabelObjectID, SdrModel &_rModel, std::unique_ptr< SdrUnoObj, SdrObjectFreeOp > &_rpLabel, std::unique_ptr< SdrUnoObj, SdrObjectFreeOp > &_rpControl)
Definition: fmview.cxx:580
size_t GetMarkCount() const
Definition: svdmark.hxx:178
virtual void DeleteWindowFromPaintView(OutputDevice *pOldWin) override
Definition: svdedxv.cxx:2327
void SetDesignMode(bool bOn=true)
Definition: svdmrkv.cxx:2678
virtual bool MouseButtonDown(const MouseEvent &rMEvt, OutputDevice *pWin) override
Definition: svdview.cxx:201
FmXFormShell * GetImpl() const
Definition: fmshell.hxx:118
std::string GetValue
SVX_DLLPRIVATE const OutputDevice * GetActualOutDev() const
Definition: fmview.hxx:145
FmFormShell * pFormShell
Definition: fmview.hxx:57
VALUE_TYPE getOrDefault(const char *_pAsciiValueName, const VALUE_TYPE &_rDefault) const
static const AllSettings & GetSettings()
bool IsDesignMode() const
Definition: svdmrkv.hxx:235
void HideSdrPage() override
Definition: svdedxv.cxx:195
css::uno::Reference< css::awt::XControlContainer > const & GetControlContainer(bool _bCreateIfNecessary=true) const
SVX_DLLPRIVATE void GrabFirstControlFocus()
grab the focus to the first form control on the view
Definition: fmview.cxx:290
virtual SdrPageView * ShowSdrPage(SdrPage *pPage) override
Definition: fmview.cxx:297
sal_uInt16 GetCode() const
SdrInventor
Definition: svdobj.hxx:99
SdrMark * GetMark(size_t nNum) const
Definition: svdmark.cxx:230
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut)
Definition: svdpntv.cxx:579
bool GetAutoControlFocus() const
Definition: fmmodel.hxx:64
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
Definition: svdview.cxx:254
void Invalidate(sal_uInt16 nId)
SVX_DLLPRIVATE void ChangeDesignMode(bool bDesign)
Definition: fmview.cxx:204
const vcl::I18nHelper & GetUILocaleI18nHelper() const
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer) override
Definition: fmview.cxx:448
SdrObjKind
Definition: svdobjkind.hxx:24
virtual void MarkListHasChanged() override
Definition: svdedxv.cxx:2484
virtual void DeleteWindowFromPaintView(OutputDevice *pOldWin) override
Definition: fmview.cxx:194
SdrObjectUniquePtr CreateXFormsControl(const svx::OXFormsDescriptor &_rDesc)
create a control pair (label/bound control) for the xforms description given.
Definition: fmview.cxx:382
SdrPageWindow * GetPageWindow(sal_uInt32 nIndex) const
Definition: svdpagv.cxx:83
void RemoveControlContainer(const css::uno::Reference< css::awt::XControlContainer > &xCC)
Definition: fmview.cxx:431
bool IsMore() const
Definition: svditer.hxx:62
OUTDEV_WINDOW
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
FmXUndoEnvironment & GetUndoEnv()
Definition: fmmodel.cxx:204
SdrPageView * ShowSdrPage(SdrPage *pPage) override
Definition: svdedxv.cxx:127
void InsertControlContainer(const css::uno::Reference< css::awt::XControlContainer > &xCC)
Definition: fmview.cxx:409
virtual OUString GetText() const
void UnmarkAll()
Definition: svdview.cxx:1386
FmFormView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: fmview.cxx:66
void SetView(FmFormView *pView)
Definition: fmshell.cxx:1141
bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin) override
Definition: fmview.cxx:455
SdrObject * GetMarkedSdrObj() const
Definition: svdmark.hxx:68
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:44
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
int i
uno_Any a
SfxBindings & GetBindings()
bool GetOpenInDesignMode() const
Definition: fmmodel.hxx:61
const SdrMarkList & GetMarkedObjectList() const
Definition: svdmrkv.hxx:251
void ActionChanged() const
Definition: svdobj.cxx:263
bool OpenInDesignModeIsDefaulted()
check whether the OpenInDesignMode has been set explicitly or been loaded () or if it still ha...
Definition: fmmodel.cxx:150
void SetMoveOutside(bool _bMoveOutside, ImplAccess)
Definition: fmview.hxx:138
float u
virtual ~FmFormView() override
Definition: fmview.cxx:118
rtl::Reference< FmXFormView > pImpl
Definition: fmview.hxx:56
SfxItemSet * GetItemSet() const
virtual bool MouseButtonDown(const MouseEvent &_rMEvt, OutputDevice *_pWin) override
Definition: fmview.cxx:544
Abstract DrawObject.
Definition: svdobj.hxx:259
void GrabFocus()
bool MatchMnemonic(const OUString &rString, sal_Unicode cMnemonicChar) const
SfxViewShell * GetViewShell() const
constexpr sal_uInt16 KEY_RETURN
FmFormPage * GetCurPage()
shortcut to "GetSdrPageView() ? PTR_CAST( FmFormPage, GetSdrPageView() ) : NULL"
Definition: fmview.cxx:127
virtual void KeyInput(const KeyEvent &rKEvt)
SdrObject * Next()
Definition: svditer.hxx:63
const vcl::KeyCode & GetKeyCode() const
bool IsUnoObj() const
Definition: svdobj.hxx:746
Derived class of SdrView to edit 3D objects.
Definition: view3d.hxx:41
bool IsShift() const
virtual void MarkListHasChanged() override
Definition: fmview.cxx:135
SdrPage * GetPage() const
Definition: svdpagv.hxx:166
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut) override
Definition: fmview.cxx:440
SdrObjectUniquePtr CreateFieldControl(const OUString &rFieldDesc) const
create a control pair (label/bound control) for the database field description given.
Definition: fmview.cxx:388
#define FM_SUN_COMPONENT_GRIDCONTROL
Definition: fmservs.hxx:63
::OutputDevice const * GetOutDev() const
sal_Unicode GetCharCode() const
void Init()
Definition: fmview.cxx:74
virtual bool IsDesignMode() const override
Definition: fmshell.hxx:158
bool IsMod1() const
SdrPaintWindow & GetPaintWindow() const
bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin) override
Definition: svdview.cxx:165
virtual void AddWindowToPaintView(OutputDevice *pNewWin, vcl::Window *pWindow) override
Definition: svdedxv.cxx:2316
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
Definition: svdobj.hxx:97
virtual void AddWindowToPaintView(OutputDevice *pNewWin, vcl::Window *pWindow) override
Definition: fmview.cxx:179
SVX_DLLPRIVATE void DeactivateControls(SdrPageView const *)
Definition: fmview.cxx:363
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:299
virtual void HideSdrPage() override
Definition: fmview.cxx:333
class FmSearchEngine - Impl class for FmSearchDialog
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:368
SVX_DLLPRIVATE FmFormObj * getMarkedGrid() const
Definition: fmview.cxx:559
SdrModel * GetModel() const
Definition: svdpntv.hxx:260
virtual vcl::Window * GetOwnerWindow() const
SVX_DLLPRIVATE css::uno::Reference< css::form::runtime::XFormController > GetFormController(const css::uno::Reference< css::form::XForm > &_rxForm, const OutputDevice &_rDevice) const
returns the form controller for a given form and a given device
Definition: fmview.cxx:596
OutputDevice & GetOutputDevice() const
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:611
static bool createControlLabelPair(OutputDevice const &_rOutDev, sal_Int32 _nXOffsetMM, sal_Int32 _nYOffsetMM, const css::uno::Reference< css::beans::XPropertySet > &_rxField, const css::uno::Reference< css::util::XNumberFormats > &_rxNumberFormats, SdrObjKind _nControlObjectID, std::u16string_view _rFieldPostfix, SdrInventor _nInventor, SdrObjKind _nLabelObjectID, SdrModel &_rModel, std::unique_ptr< SdrUnoObj, SdrObjectFreeOp > &_rpLabel, std::unique_ptr< SdrUnoObj, SdrObjectFreeOp > &_rpControl)
SfxObjectShell * GetObjectShell() const
Definition: fmmodel.hxx:58
bool IsMod2() const
sal_uInt32 PageWindowCount() const
Definition: svdpagv.hxx:89
SfxMedium * GetMedium() const