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