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