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