LibreOffice Module svx (master) 1
|
#include <fmpgeimp.hxx>
Public Member Functions | |
FmFormPageImpl (FmFormPage &_rPage) | |
~FmFormPageImpl () | |
void | initFrom (FmFormPageImpl &i_foreignImpl) |
void | setCurForm (const css::uno::Reference< css::form::XForm > &xForm) |
css::uno::Reference< css::form::XForm > | getDefaultForm () |
css::uno::Reference< css::form::XForm > | findPlaceInFormComponentHierarchy (const css::uno::Reference< css::form::XFormComponent > &rContent, const css::uno::Reference< css::sdbc::XDataSource > &rDatabase=css::uno::Reference< css::sdbc::XDataSource >(), const OUString &rDBTitle=OUString(), const OUString &rCursorSource=OUString(), sal_Int32 nCommandType=0) |
finds a place in the form component hierarchy where to insert the given component More... | |
bool | hasEverBeenActivated () const |
void | setHasBeenActivated () |
const css::uno::Reference< css::form::XForms > & | getForms (bool _bForceCreate=true) |
void | SetFormsCreationHdl (const Link< FmFormPageImpl &, void > &_rFormsCreationHdl) |
void | formObjectInserted (const FmFormObj &_object) |
void | formObjectRemoved (const FmFormObj &_object) |
void | formModelAssigned (const FmFormObj &_object) |
Static Public Member Functions | |
static OUString | setUniqueName (const css::uno::Reference< css::form::XFormComponent > &xFormComponent, const css::uno::Reference< css::form::XForm > &xControls) |
Private Member Functions | |
css::uno::Reference< css::form::XForm > | findFormForDataSource (const css::uno::Reference< css::form::XForm > &rForm, const css::uno::Reference< css::sdbc::XDataSource > &rDatabase, const OUString &rCommand, sal_Int32 nCommandType) |
finds a form with a given data source signature More... | |
bool | validateCurForm () |
returns an object mapping from control models to drawing shapes. More... | |
css::uno::Reference< css::container::XMap > | impl_createControlShapeMap_nothrow () |
FmFormPageImpl (const FmFormPageImpl &)=delete | |
FmFormPageImpl & | operator= (const FmFormPageImpl &)=delete |
Private Attributes | |
css::uno::Reference< css::form::XForm > | xCurrentForm |
css::uno::Reference< css::form::XForms > | m_xForms |
css::uno::WeakReference< css::container::XMap > | m_aControlShapeMap |
FmFormPage & | m_rPage |
Link< FmFormPageImpl &, void > | m_aFormsCreationHdl |
bool | m_bFirstActivation |
bool | m_bAttemptedFormCreation |
Definition at line 44 of file fmpgeimp.hxx.
|
explicit |
Definition at line 65 of file fmpgeimp.cxx.
FmFormPageImpl::~FmFormPageImpl | ( | ) |
Definition at line 331 of file fmpgeimp.cxx.
References m_xForms, and xCurrentForm.
|
privatedelete |
|
private |
finds a form with a given data source signature
rForm | the form to start the search with. This form, including all possible sub forms, will be examined |
rDatabase | the data source which to which the found form must be bound |
rCommand | the desired Command property value of the sought-after form |
nCommandType | the desired CommandType property value of the sought-after form |
Definition at line 537 of file fmpgeimp.cxx.
References Any, Exception, findFormForDataSource(), FM_PROP_ACTIVE_CONNECTION, FM_PROP_COMMAND, FM_PROP_COMMANDTYPE, FM_PROP_DATASOURCE, FM_PROP_NAME, i, isEmbeddedInDatabase(), nCount, nType, and TOOLS_WARN_EXCEPTION.
Referenced by findFormForDataSource(), and findPlaceInFormComponentHierarchy().
Reference< css::form::XForm > FmFormPageImpl::findPlaceInFormComponentHierarchy | ( | const css::uno::Reference< css::form::XFormComponent > & | rContent, |
const css::uno::Reference< css::sdbc::XDataSource > & | rDatabase = css::uno::Reference< css::sdbc::XDataSource>() , |
||
const OUString & | rDBTitle = OUString() , |
||
const OUString & | rCursorSource = OUString() , |
||
sal_Int32 | nCommandType = 0 |
||
) |
finds a place in the form component hierarchy where to insert the given component
Note that no actual insertion happens, this is the responsibility of the caller (as the caller might decide on a suitable place where in the returned container the insertion should happen).
Definition at line 443 of file fmpgeimp.cxx.
References SdrModel::AddUndo(), Any, aStr, SdrModel::BegUndo(), createInstance(), DBG_ASSERT, SdrModel::EndUndo(), Exception, findFormForDataSource(), FM_PROP_COMMAND, FM_PROP_COMMANDTYPE, FM_PROP_DATASOURCE, FM_PROP_NAME, FM_PROP_URL, FM_SUN_COMPONENT_FORM, getDefaultForm(), getForms(), SdrPage::getSdrModelFromSdrPage(), i, FmUndoContainerAction::Inserted, SdrModel::IsUndoEnabled(), m_rPage, nCount, sName, SvxResId(), validateCurForm(), and xCurrentForm.
Referenced by FmXUndoEnvironment::Inserted().
void FmFormPageImpl::formModelAssigned | ( | const FmFormObj & | _object | ) |
Definition at line 659 of file fmpgeimp.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControlShapeMap.
void FmFormPageImpl::formObjectInserted | ( | const FmFormObj & | _object | ) |
Definition at line 678 of file fmpgeimp.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControlShapeMap.
void FmFormPageImpl::formObjectRemoved | ( | const FmFormObj & | _object | ) |
Definition at line 696 of file fmpgeimp.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControlShapeMap.
Reference< XForm > FmFormPageImpl::getDefaultForm | ( | ) |
Definition at line 357 of file fmpgeimp.cxx.
References SdrModel::AddUndo(), Any, aStr, SdrModel::BegUndo(), createInstance(), DBG_UNHANDLED_EXCEPTION, SdrModel::EndUndo(), Exception, FM_PROP_COMMANDTYPE, FM_PROP_NAME, FM_SUN_COMPONENT_FORM, getForms(), SdrPage::getSdrModelFromSdrPage(), FmUndoContainerAction::Inserted, SdrModel::IsUndoEnabled(), m_rPage, sName, SvxResId(), validateCurForm(), and xCurrentForm.
Referenced by findPlaceInFormComponentHierarchy().
const Reference< css::form::XForms > & FmFormPageImpl::getForms | ( | bool | _bForceCreate = true | ) |
Definition at line 300 of file fmpgeimp.cxx.
References FmXUndoEnvironment::AddForms(), Link< typename Arg, typename Ret >::Call(), SfxObjectShell::GetModel(), FmFormModel::GetObjectShell(), comphelper::getProcessComponentContext(), SdrPage::getSdrModelFromSdrPage(), FmFormModel::GetUndoEnv(), Link< typename Arg, typename Ret >::IsSet(), m_aFormsCreationHdl, m_bAttemptedFormCreation, m_rPage, and m_xForms.
Referenced by findPlaceInFormComponentHierarchy(), getDefaultForm(), and initFrom().
|
inline |
Definition at line 81 of file fmpgeimp.hxx.
References m_bFirstActivation.
|
private |
Definition at line 270 of file fmpgeimp.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, comphelper::getProcessComponentContext(), SdrObjListIter::IsMore(), m_rPage, and SdrObjListIter::Next().
void FmFormPageImpl::initFrom | ( | FmFormPageImpl & | i_foreignImpl | ) |
Definition at line 147 of file fmpgeimp.cxx.
References assignment, DBG_UNHANDLED_EXCEPTION, Exception, FmForm, getForms(), SdrObjListIter::IsMore(), m_rPage, m_xForms, SdrObjListIter::Next(), and SAL_WARN.
|
privatedelete |
void FmFormPageImpl::setCurForm | ( | const css::uno::Reference< css::form::XForm > & | xForm | ) |
Definition at line 351 of file fmpgeimp.cxx.
References xCurrentForm.
|
inline |
Definition at line 86 of file fmpgeimp.hxx.
References m_aFormsCreationHdl.
|
inline |
Definition at line 82 of file fmpgeimp.hxx.
References m_bFirstActivation.
|
static |
Definition at line 618 of file fmpgeimp.cxx.
References Any, DBG_UNHANDLED_EXCEPTION, Exception, FM_PROP_CLASSID, FM_PROP_NAME, and sName.
Referenced by FmXUndoEnvironment::Inserted(), and svxform::NavigatorTree::NewControl().
|
private |
returns an object mapping from control models to drawing shapes.
validates whether <member>xCurrentForm</member> is still valid and to be used
There are situations where our current form becomes invalid, without us noticing this. Thus, every method which accesses <member>xCurrentForm</member> should beforehand validate the current form by calling this method.
If <member>xCurrentForm</member> is not valid anymore, it is reset to <NULL>.
Definition at line 339 of file fmpgeimp.cxx.
References xCurrentForm.
Referenced by findPlaceInFormComponentHierarchy(), and getDefaultForm().
|
private |
Definition at line 48 of file fmpgeimp.hxx.
Referenced by formModelAssigned(), formObjectInserted(), and formObjectRemoved().
|
private |
Definition at line 51 of file fmpgeimp.hxx.
Referenced by getForms(), and SetFormsCreationHdl().
|
private |
Definition at line 54 of file fmpgeimp.hxx.
Referenced by getForms().
|
private |
Definition at line 53 of file fmpgeimp.hxx.
Referenced by hasEverBeenActivated(), and setHasBeenActivated().
|
private |
Definition at line 50 of file fmpgeimp.hxx.
Referenced by findPlaceInFormComponentHierarchy(), getDefaultForm(), getForms(), impl_createControlShapeMap_nothrow(), and initFrom().
|
private |
Definition at line 47 of file fmpgeimp.hxx.
Referenced by getForms(), initFrom(), and ~FmFormPageImpl().
|
private |
Definition at line 46 of file fmpgeimp.hxx.
Referenced by findPlaceInFormComponentHierarchy(), getDefaultForm(), setCurForm(), validateCurForm(), and ~FmFormPageImpl().