LibreOffice Module svx (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
FmFormPageImpl Class Referencefinal

#include <fmpgeimp.hxx>

Collaboration diagram for FmFormPageImpl:
[legend]

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
 
FmFormPageImploperator= (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
 
FmFormPagem_rPage
 
Link< FmFormPageImpl &, void > m_aFormsCreationHdl
 
bool m_bFirstActivation
 
bool m_bAttemptedFormCreation
 

Detailed Description

Definition at line 44 of file fmpgeimp.hxx.

Constructor & Destructor Documentation

◆ FmFormPageImpl() [1/2]

FmFormPageImpl::FmFormPageImpl ( FmFormPage _rPage)
explicit

Definition at line 65 of file fmpgeimp.cxx.

◆ ~FmFormPageImpl()

FmFormPageImpl::~FmFormPageImpl ( )

Definition at line 331 of file fmpgeimp.cxx.

References m_xForms, and xCurrentForm.

◆ FmFormPageImpl() [2/2]

FmFormPageImpl::FmFormPageImpl ( const FmFormPageImpl )
privatedelete

Member Function Documentation

◆ findFormForDataSource()

Reference< XForm > FmFormPageImpl::findFormForDataSource ( const css::uno::Reference< css::form::XForm > &  rForm,
const css::uno::Reference< css::sdbc::XDataSource > &  rDatabase,
const OUString &  rCommand,
sal_Int32  nCommandType 
)
private

finds a form with a given data source signature

Parameters
rFormthe form to start the search with. This form, including all possible sub forms, will be examined
rDatabasethe data source which to which the found form must be bound
rCommandthe desired Command property value of the sought-after form
nCommandTypethe 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().

◆ 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().

◆ formModelAssigned()

void FmFormPageImpl::formModelAssigned ( const FmFormObj &  _object)

Definition at line 659 of file fmpgeimp.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControlShapeMap.

◆ formObjectInserted()

void FmFormPageImpl::formObjectInserted ( const FmFormObj &  _object)

Definition at line 678 of file fmpgeimp.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControlShapeMap.

◆ formObjectRemoved()

void FmFormPageImpl::formObjectRemoved ( const FmFormObj &  _object)

Definition at line 696 of file fmpgeimp.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControlShapeMap.

◆ getDefaultForm()

Reference< XForm > FmFormPageImpl::getDefaultForm ( )

◆ getForms()

const Reference< css::form::XForms > & FmFormPageImpl::getForms ( bool  _bForceCreate = true)

◆ hasEverBeenActivated()

bool FmFormPageImpl::hasEverBeenActivated ( ) const
inline

Definition at line 81 of file fmpgeimp.hxx.

References m_bFirstActivation.

◆ impl_createControlShapeMap_nothrow()

Reference< XMap > FmFormPageImpl::impl_createControlShapeMap_nothrow ( )
private

◆ initFrom()

void FmFormPageImpl::initFrom ( FmFormPageImpl i_foreignImpl)

◆ operator=()

FmFormPageImpl & FmFormPageImpl::operator= ( const FmFormPageImpl )
privatedelete

◆ setCurForm()

void FmFormPageImpl::setCurForm ( const css::uno::Reference< css::form::XForm > &  xForm)

Definition at line 351 of file fmpgeimp.cxx.

References xCurrentForm.

◆ SetFormsCreationHdl()

void FmFormPageImpl::SetFormsCreationHdl ( const Link< FmFormPageImpl &, void > &  _rFormsCreationHdl)
inline

Definition at line 86 of file fmpgeimp.hxx.

References m_aFormsCreationHdl.

◆ setHasBeenActivated()

void FmFormPageImpl::setHasBeenActivated ( )
inline

Definition at line 82 of file fmpgeimp.hxx.

References m_bFirstActivation.

◆ setUniqueName()

OUString FmFormPageImpl::setUniqueName ( const css::uno::Reference< css::form::XFormComponent > &  xFormComponent,
const css::uno::Reference< css::form::XForm > &  xControls 
)
static

◆ validateCurForm()

bool FmFormPageImpl::validateCurForm ( )
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>.

Returns
<TRUE> if and only if xCurrentForm is valid.
Available since: \n #i40086#

Definition at line 339 of file fmpgeimp.cxx.

References xCurrentForm.

Referenced by findPlaceInFormComponentHierarchy(), and getDefaultForm().

Member Data Documentation

◆ m_aControlShapeMap

css::uno::WeakReference< css::container::XMap > FmFormPageImpl::m_aControlShapeMap
private

Definition at line 48 of file fmpgeimp.hxx.

Referenced by formModelAssigned(), formObjectInserted(), and formObjectRemoved().

◆ m_aFormsCreationHdl

Link<FmFormPageImpl&,void> FmFormPageImpl::m_aFormsCreationHdl
private

Definition at line 51 of file fmpgeimp.hxx.

Referenced by getForms(), and SetFormsCreationHdl().

◆ m_bAttemptedFormCreation

bool FmFormPageImpl::m_bAttemptedFormCreation
private

Definition at line 54 of file fmpgeimp.hxx.

Referenced by getForms().

◆ m_bFirstActivation

bool FmFormPageImpl::m_bFirstActivation
private

Definition at line 53 of file fmpgeimp.hxx.

Referenced by hasEverBeenActivated(), and setHasBeenActivated().

◆ m_rPage

FmFormPage& FmFormPageImpl::m_rPage
private

◆ m_xForms

css::uno::Reference< css::form::XForms > FmFormPageImpl::m_xForms
private

Definition at line 47 of file fmpgeimp.hxx.

Referenced by getForms(), initFrom(), and ~FmFormPageImpl().

◆ xCurrentForm

css::uno::Reference< css::form::XForm > FmFormPageImpl::xCurrentForm
private

The documentation for this class was generated from the following files: