24 #include <com/sun/star/sdb/SQLContext.hpp>
25 #include <com/sun/star/sdbc/XConnection.hpp>
26 #include <com/sun/star/form/XLoadable.hpp>
46 #include <com/sun/star/lang/XServiceInfo.hpp>
47 #include <com/sun/star/awt/XControl.hpp>
51 #include <svx/svxids.hrc>
66 using namespace ::
svx;
84 DBG_ASSERT( dynamic_cast<const FmFormModel*>( pModel) !=
nullptr,
"Wrong model" );
97 DBG_ASSERT( !bInitDesignMode,
"FmFormView::Init: doesn't the model default to FALSE anymore?" );
100 bInitDesignMode =
true;
104 if ( pObjShell && pObjShell->
GetMedium() )
109 bInitDesignMode = aComponentData.
getOrDefault(
"ApplyFormDesignMode", bInitDesignMode );
123 pImpl->notifyViewDying();
141 if (
pImpl->m_pMarkedGrid &&
pImpl->m_pMarkedGrid != pObj )
143 pImpl->m_pMarkedGrid =
nullptr;
144 if (
pImpl->m_xWindow.is() )
147 pImpl->m_xWindow =
nullptr;
163 for ( sal_uInt32 window = 0; window < pPageView->
PageWindowCount(); ++window )
186 const SdrPageWindow* pPageWindow = findPageWindow(
this, pNewWin );
188 pImpl->addWindow( *pPageWindow );
194 const SdrPageWindow* pPageWindow = findPageWindow(
this, pNewWin );
277 if (bForceControlFocus)
312 pFormShellImpl->UpdateForms_Lock(
true);
356 pImpl->addWindow(rPageWindow);
376 return pImpl->implCreateFieldControl( _rColumnDescriptor );
382 return pImpl->implCreateXFormsControl(_rDesc);
394 if (sFieldName.isEmpty() || sObjectName.isEmpty() || sDataSource.isEmpty())
397 ODataAccessDescriptor aColumnDescriptor;
398 aColumnDescriptor.setDataSource(sDataSource);
399 aColumnDescriptor[ DataAccessDescriptorProperty::Command ] <<= sObjectName;
400 aColumnDescriptor[ DataAccessDescriptorProperty::CommandType ] <<= nObjectType;
401 aColumnDescriptor[ DataAccessDescriptorProperty::ColumnName ] <<= sFieldName;
403 return pImpl->implCreateFieldControl( aColumnDescriptor );
422 pImpl->addWindow(rPageWindow);
433 pImpl->removeWindow( xCC );
441 pImpl->suspendTabOrderUpdate();
449 pImpl->resumeTabOrderUpdate();
471 Reference< awt::XWindow > xWindow( pObj->GetUnoControl( *
this, *pWin->
GetOutDev() ), UNO_QUERY );
474 pImpl->m_pMarkedGrid = pObj;
475 pImpl->m_xWindow = xWindow;
503 for (
size_t a = 0;
a < pCurPage->GetObjCount(); ++
a)
506 FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
510 Reference<awt::XControl> xControl = pFormObject->GetUnoControl(*
this, *pWin->
GetOutDev());
533 Reference< css::awt::XControl> xControl(
pImpl->m_xWindow,UNO_QUERY);
534 bool bRet = !xControl.is() || !_xSource.is() || _xSource != xControl->getModel();
559 FmFormObj* pFormObject =
nullptr;
569 Reference< XServiceInfo > xServInfo( pFormObject->GetUnoControlModel(), UNO_QUERY );
571 pFormObject =
nullptr;
582 std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpLabel,
583 std::unique_ptr<SdrUnoObj, SdrObjectFreeOp>& _rpControl )
586 *_pOutDev, _nXOffsetMM, _nYOffsetMM,
587 _rxField, _rxNumberFormats,
588 _nControlObjectID,
u"", _nInventor, _nLabelObjectID,
596 return pImpl->getFormController( _rxForm, _rDevice );
constexpr OUStringLiteral FM_SUN_COMPONENT_GRIDCONTROL
SfxViewFrame * GetViewFrame() const
size_t GetMarkCount() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
virtual void DeleteWindowFromPaintView(OutputDevice *pOldWin) override
void SetDesignMode(bool bOn=true)
virtual bool MouseButtonDown(const MouseEvent &rMEvt, OutputDevice *pWin) override
static const AllSettings & GetSettings()
bool IsDesignMode() const
void HideSdrPage() override
css::uno::Reference< css::awt::XControlContainer > const & GetControlContainer(bool _bCreateIfNecessary=true) const
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
sal_uInt16 GetCode() const
SdrMark * GetMark(size_t nNum) const
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut)
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
void Invalidate(sal_uInt16 nId)
const vcl::I18nHelper & GetUILocaleI18nHelper() const
virtual void MarkListHasChanged() override
SdrPageWindow * GetPageWindow(sal_uInt32 nIndex) const
bool MatchMnemonic(std::u16string_view rString, sal_Unicode cMnemonicChar) const
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
SdrPageView * ShowSdrPage(SdrPage *pPage) override
#define suppress_fun_call_w_exception(expr)
virtual OUString GetText() const
VALUE_TYPE getOrDefault(const OUString &_rValueName, const VALUE_TYPE &_rDefault) const
SdrObject * GetMarkedSdrObj() const
Everything a View needs to know about a selected object.
#define DBG_ASSERT(sCon, aError)
SfxBindings & GetBindings()
const SdrMarkList & GetMarkedObjectList() const
void ActionChanged() const
SfxItemSet * GetItemSet() const
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
SfxViewShell * GetViewShell() const
constexpr sal_uInt16 KEY_RETURN
virtual void KeyInput(const KeyEvent &rKEvt)
const vcl::KeyCode & GetKeyCode() const
Derived class of SdrView to edit 3D objects.
SdrPage * GetPage() const
::OutputDevice const * GetOutDev() const
sal_Unicode GetCharCode() const
SdrPaintWindow & GetPaintWindow() const
bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin) override
virtual void AddWindowToPaintView(OutputDevice *pNewWin, vcl::Window *pWindow) override
std::unique_ptr< SdrObject, SdrObjectFreeOp > SdrObjectUniquePtr
SdrPageView * GetSdrPageView() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
SdrModel * GetModel() const
virtual vcl::Window * GetOwnerWindow() const
OutputDevice & GetOutputDevice() const
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
sal_uInt32 PageWindowCount() const
SfxMedium * GetMedium() const