LibreOffice Module svx (master) 1
|
Public Member Functions | |
ViewObjectContactOfUnoControl_Impl (ViewObjectContactOfUnoControl *_pAntiImpl) | |
ViewObjectContactOfUnoControl_Impl (const ViewObjectContactOfUnoControl_Impl &)=delete | |
ViewObjectContactOfUnoControl_Impl & | operator= (const ViewObjectContactOfUnoControl_Impl &)=delete |
void | dispose () |
disposes the instance, which is nonfunctional afterwards More... | |
bool | isDisposed () const |
determines whether the instance is disposed More... | |
SdrUnoObj * | getUnoObject () const |
returns the SdrUnoObject associated with the ViewContact More... | |
void | ensureControl (const basegfx::B2DHomMatrix *_pInitialViewTransformationOrNULL) |
ensures that we have an ->XControl More... | |
const ControlHolder & | getExistentControl () const |
returns our XControl, if it already has been created More... | |
bool | hasControl () const |
void | positionAndZoomControl (const basegfx::B2DHomMatrix &_rViewTransformation) const |
positions our XControl according to the geometry settings in the SdrUnoObj, modified by the given transformation, and sets proper zoom settings according to our device More... | |
bool | isPrintableControl () const |
determines whether or not our control is printable More... | |
void | setControlDesignMode (bool _bDesignMode) const |
sets the design mode on the control, or at least remembers the flag for the time the control is created More... | |
bool | isControlVisible () const |
determines whether our control is currently visible @nofail More... | |
const ViewContactOfUnoControl & | getViewContact () const |
Static Public Member Functions | |
static bool | createControlForDevice (IPageViewAccess const &_rPageView, const OutputDevice &_rDevice, const SdrUnoObj &_rUnoObject, const basegfx::B2DHomMatrix &_rInitialViewTransformation, const basegfx::B2DHomMatrix &_rInitialZoomNormalization, ControlHolder &_out_rControl) |
creates an XControl for the given device and SdrUnoObj More... | |
Protected Member Functions | |
virtual | ~ViewObjectContactOfUnoControl_Impl () override |
virtual void SAL_CALL | disposing (const EventObject &Source) override |
virtual void SAL_CALL | windowResized (const WindowEvent &e) override |
virtual void SAL_CALL | windowMoved (const WindowEvent &e) override |
virtual void SAL_CALL | windowShown (const EventObject &e) override |
virtual void SAL_CALL | windowHidden (const EventObject &e) override |
virtual void SAL_CALL | propertyChange (const PropertyChangeEvent &evt) override |
virtual void SAL_CALL | modeChanged (const ModeChangeEvent &_rSource) override |
virtual void SAL_CALL | elementInserted (const css::container::ContainerEvent &Event) override |
virtual void SAL_CALL | elementRemoved (const css::container::ContainerEvent &Event) override |
virtual void SAL_CALL | elementReplaced (const css::container::ContainerEvent &Event) override |
Private Types | |
enum | ViewControlMode { eDesign , eAlive , eUnknown } |
Private Member Functions | |
bool | impl_getPageView_nothrow (SdrPageView *&_out_rpPageView) |
retrieves the SdrPageView which our associated SdrPageViewWindow belongs to More... | |
void | impl_adjustControlVisibilityToLayerVisibility_throw () |
adjusts the control visibility so it respects its layer's visibility More... | |
void | impl_switchControlListening_nothrow (bool _bStart) |
starts or stops listening at various aspects of our control More... | |
void | impl_switchContainerListening_nothrow (bool _bStart) |
starts or stops listening at our control container More... | |
void | impl_switchDesignModeListening_nothrow (bool _bStart) |
starts or stops listening at the control for design-mode relevant facets More... | |
void | impl_switchPropertyListening_nothrow (bool _bStart) |
starts or stops listening for all properties at our control More... | |
void | impl_dispose_nothrow (bool _bAlsoDisposeControl) |
disposes the instance More... | |
bool | impl_isDisposed_nofail () const |
determines whether the instance is disposed @nofail More... | |
bool | impl_isControlDesignMode_nothrow () const |
determines whether the control currently is in design mode More... | |
bool | impl_ensureControl_nothrow (IPageViewAccess const &_rPageView, const OutputDevice &_rDevice, const basegfx::B2DHomMatrix &_rInitialViewTransformation) |
ensures that we have a control for the given PageView/OutputDevice More... | |
const OutputDevice & | impl_getOutputDevice_throw () const |
Static Private Member Functions | |
static void | impl_adjustControlVisibilityToLayerVisibility_throw (const ControlHolder &_rxControl, const SdrUnoObj &_rUnoObject, IPageViewAccess const &_rPageView, bool _bIsCurrentlyVisible, bool _bForce) |
adjusts the control visibility so it respects its layer's visibility More... | |
Private Attributes | |
ViewObjectContactOfUnoControl * | m_pAntiImpl |
the instance whose IMPL we are More... | |
bool | m_bCreatingControl |
are we currently inside impl_ensureControl_nothrow? More... | |
ControlHolder | m_aControl |
the control we're responsible for More... | |
Reference< XContainer > | m_xContainer |
the ControlContainer where we inserted our control More... | |
VclPtr< OutputDevice > | m_pOutputDeviceForWindow |
the output device for which the control was created More... | |
bool | m_bControlIsVisible |
flag indicating whether the control is currently visible More... | |
bool | m_bIsDesignModeListening |
are we currently listening at a design mode control? More... | |
ViewControlMode | m_eControlDesignMode |
is the control currently in design mode? More... | |
::basegfx::B2DHomMatrix | m_aZoomLevelNormalization |
Definition at line 504 of file viewobjectcontactofunocontrol.cxx.
Enumerator | |
---|---|
eDesign | |
eAlive | |
eUnknown |
Definition at line 532 of file viewobjectcontactofunocontrol.cxx.
|
explicit |
Definition at line 841 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, basegfx::B2DHomMatrix::decompose(), eUnknown, OutputDevice::GetInverseViewTransformation(), OutputDevice::GetMapMode(), MapMode::GetScaleX(), MapMode::GetScaleY(), impl_getOutputDevice_throw(), m_aZoomLevelNormalization, m_pAntiImpl, and basegfx::B2DHomMatrix::set().
|
delete |
|
overrideprotectedvirtual |
Definition at line 872 of file viewobjectcontactofunocontrol.cxx.
References dispose(), and impl_isDisposed_nofail().
|
static |
creates an XControl for the given device and SdrUnoObj
Definition at line 1079 of file viewobjectcontactofunocontrol.cxx.
References sdr::contact::UnoControlContactHelper::adjustControlGeometry_throw(), Any, SdrModel::AreControlsThemed(), DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, sdr::contact::UnoControlContactHelper::disposeAndClearControl_nothrow(), Exception, SdrTextObj::GetLogicRect(), SdrObject::getSdrModelFromSdrObject(), SdrUnoObj::GetUnoControlModel(), SdrUnoObj::GetUnoControlTypeName(), and impl_adjustControlVisibilityToLayerVisibility_throw().
Referenced by sdr::contact::ViewObjectContactOfUnoControl::getTemporaryControlForWindow(), and impl_ensureControl_nothrow().
void sdr::contact::ViewObjectContactOfUnoControl_Impl::dispose | ( | void | ) |
disposes the instance, which is nonfunctional afterwards
Definition at line 907 of file viewobjectcontactofunocontrol.cxx.
References impl_dispose_nothrow().
Referenced by ~ViewObjectContactOfUnoControl_Impl().
|
overrideprotectedvirtual |
Definition at line 1304 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, impl_dispose_nothrow(), m_aControl, m_xContainer, and Source.
|
overrideprotectedvirtual |
Definition at line 1398 of file viewobjectcontactofunocontrol.cxx.
|
overrideprotectedvirtual |
Definition at line 1404 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, impl_dispose_nothrow(), m_aControl, and m_xContainer.
|
overrideprotectedvirtual |
Definition at line 1418 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, ENSURE_OR_THROW, impl_isControlDesignMode_nothrow(), impl_switchControlListening_nothrow(), m_aControl, m_bControlIsVisible, m_pAntiImpl, m_pOutputDeviceForWindow, m_xContainer, and sdr::contact::ViewObjectContactOfUnoControl::onControlChangedOrModified().
void sdr::contact::ViewObjectContactOfUnoControl_Impl::ensureControl | ( | const basegfx::B2DHomMatrix * | _pInitialViewTransformationOrNULL | ) |
ensures that we have an ->XControl
Must only be called if a control is needed when no DisplayInfo is present, yet.
For creating a control, an ->OutputDevice is needed, and an ->SdrPageView. Both will be obtained from a ->ObjectContactOfPageView. So, if our (anti-impl's) object contact is not a ->ObjectContactOfPageView, this method fill fail.
Failure of this method will be reported via an assertion in a non-product version.
Definition at line 950 of file viewobjectcontactofunocontrol.cxx.
References sdr::contact::ViewObjectContact::GetObjectContact(), SdrPageWindow::GetPageView(), sdr::contact::ViewObjectContactOfSdrObj::getPageViewOutputDevice(), sdr::contact::ObjectContactOfPageView::GetPageWindow(), OutputDevice::GetViewTransformation(), impl_ensureControl_nothrow(), impl_getOutputDevice_throw(), impl_isDisposed_nofail(), and m_pAntiImpl.
|
inline |
returns our XControl, if it already has been created
If you want to ensure that the control exists before accessing it, use ->ensureControl
Definition at line 580 of file viewobjectcontactofunocontrol.cxx.
References m_aControl.
SdrUnoObj * sdr::contact::ViewObjectContactOfUnoControl_Impl::getUnoObject | ( | ) | const |
returns the SdrUnoObject associated with the ViewContact
@precond We're not disposed.
Definition at line 914 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, sdr::contact::ViewObjectContact::GetViewContact(), impl_isDisposed_nofail(), m_pAntiImpl, and sdr::contact::ViewContact::TryToGetSdrObject().
Referenced by impl_adjustControlVisibilityToLayerVisibility_throw(), impl_ensureControl_nothrow(), isPrintableControl(), and positionAndZoomControl().
|
inline |
Definition at line 622 of file viewobjectcontactofunocontrol.cxx.
References ENSURE_OR_THROW, sdr::contact::ViewObjectContact::GetViewContact(), impl_isDisposed_nofail(), and m_pAntiImpl.
|
inline |
Definition at line 583 of file viewobjectcontactofunocontrol.cxx.
References m_aControl.
|
private |
adjusts the control visibility so it respects its layer's visibility
@precond ->m_aControl is not <NULL>
@precond We're not disposed.
@precond We really belong to an SdrPageViewWindow. There are instance for which this might not be true, but those instances should never have a need to call this method.
Definition at line 1163 of file viewobjectcontactofunocontrol.cxx.
References getUnoObject(), impl_adjustControlVisibilityToLayerVisibility_throw(), impl_getPageView_nothrow(), m_aControl, and m_bControlIsVisible.
Referenced by createControlForDevice(), impl_adjustControlVisibilityToLayerVisibility_throw(), and modeChanged().
|
staticprivate |
adjusts the control visibility so it respects its layer's visibility
The control must never be visible if it's in design mode. In alive mode, it must be visibility if and only it's on a visible layer.
_rxControl | the control whose visibility is to be adjusted |
_rPageView | provides access to the attributes of the SdrPageView which the control finally belongs to |
_rUnoObject | our SdrUnoObj |
_bIsCurrentlyVisible | determines whether the control is currently visible. Note that this is only a shortcut for querying _rxControl for the XWindow2 interface, and calling isVisible at this interface. This shortcut has been chosen since the caller usually already has this information. If _bForce is <TRUE>, _bIsCurrentlyVisible is ignored. |
_bForce | set to <TRUE> if you want to force a ->XWindow::setVisible call, no matter if the control visibility is already correct |
@precond We're not disposed.
Definition at line 1181 of file viewobjectcontactofunocontrol.cxx.
References SdrObject::GetLayer(), and SdrObject::IsVisible().
|
private |
disposes the instance
_bAlsoDisposeControl | determines whether the XControl should be disposed, too |
Definition at line 883 of file viewobjectcontactofunocontrol.cxx.
References sdr::contact::UnoControlContactHelper::disposeAndClearControl_nothrow(), impl_isDisposed_nofail(), impl_switchContainerListening_nothrow(), impl_switchControlListening_nothrow(), m_aControl, m_bControlIsVisible, m_pAntiImpl, m_pOutputDeviceForWindow, and m_xContainer.
Referenced by dispose(), disposing(), and elementRemoved().
|
private |
ensures that we have a control for the given PageView/OutputDevice
Definition at line 1002 of file viewobjectcontactofunocontrol.cxx.
References createControlForDevice(), DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, sdr::contact::UnoControlContactHelper::disposeAndClearControl_nothrow(), eAlive, eDesign, Exception, VclPtr< class reference_type >::get(), OutputDevice::GetOwnerWindow(), getUnoObject(), impl_switchContainerListening_nothrow(), impl_switchControlListening_nothrow(), m_aControl, m_aZoomLevelNormalization, m_bControlIsVisible, m_bCreatingControl, m_eControlDesignMode, m_pOutputDeviceForWindow, and m_xContainer.
Referenced by ensureControl().
|
private |
Definition at line 979 of file viewobjectcontactofunocontrol.cxx.
References ENSURE_OR_THROW, sdr::contact::ViewObjectContact::GetObjectContact(), sdr::contact::ViewObjectContactOfSdrObj::getPageViewOutputDevice(), m_pAntiImpl, and sdr::contact::ObjectContact::TryToGetOutputDevice().
Referenced by ensureControl(), and ViewObjectContactOfUnoControl_Impl().
|
private |
retrieves the SdrPageView which our associated SdrPageViewWindow belongs to
out_rpPageView | a reference to a pointer holding, upon return, the desired SdrPageView |
@precond We really belong to an SdrPageViewWindow. Perhaps (I'm not sure ATM :) there are instance for which this might not be true, but those instances should never have a need to call this method.
@precond We're not disposed.
@postcond The method expects success, if it returns with <FALSE>, this will have been asserted.
@nothrow
Definition at line 1146 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, sdr::contact::ViewObjectContact::GetObjectContact(), SdrPageWindow::GetPageView(), sdr::contact::ObjectContactOfPageView::GetPageWindow(), impl_isDisposed_nofail(), and m_pAntiImpl.
Referenced by impl_adjustControlVisibilityToLayerVisibility_throw().
|
inlineprivate |
determines whether the control currently is in design mode
@precond The design mode must already be known. It is known when we first had access to an SdrPageView (which carries this flag), or somebody explicitly set it from outside.
Definition at line 767 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, eDesign, eUnknown, and m_eControlDesignMode.
Referenced by elementReplaced(), impl_switchControlListening_nothrow(), modeChanged(), propertyChange(), and setControlDesignMode().
|
inlineprivate |
determines whether the instance is disposed @nofail
Definition at line 758 of file viewobjectcontactofunocontrol.cxx.
References m_pAntiImpl.
Referenced by ensureControl(), getUnoObject(), getViewContact(), impl_dispose_nothrow(), impl_getPageView_nothrow(), isDisposed(), propertyChange(), and ~ViewObjectContactOfUnoControl_Impl().
|
private |
starts or stops listening at our control container
@precond ->m_xContainer is not <NULL>
Definition at line 1202 of file viewobjectcontactofunocontrol.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_xContainer.
Referenced by impl_dispose_nothrow(), and impl_ensureControl_nothrow().
|
private |
starts or stops listening at various aspects of our control
@precond ->m_aControl is not <NULL>
Definition at line 1222 of file viewobjectcontactofunocontrol.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, impl_isControlDesignMode_nothrow(), impl_switchDesignModeListening_nothrow(), and m_aControl.
Referenced by elementReplaced(), impl_dispose_nothrow(), and impl_ensureControl_nothrow().
|
private |
starts or stops listening at the control for design-mode relevant facets
Definition at line 1253 of file viewobjectcontactofunocontrol.cxx.
References impl_switchPropertyListening_nothrow(), and m_bIsDesignModeListening.
Referenced by impl_switchControlListening_nothrow(), and modeChanged().
|
private |
starts or stops listening for all properties at our control
_bStart | determines whether to start or to stop listening |
@precond ->m_aControl is not <NULL>
Definition at line 1263 of file viewobjectcontactofunocontrol.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and m_aControl.
Referenced by impl_switchDesignModeListening_nothrow().
|
inline |
determines whether our control is currently visible @nofail
Definition at line 608 of file viewobjectcontactofunocontrol.cxx.
References m_bControlIsVisible.
|
inline |
determines whether the instance is disposed
Definition at line 554 of file viewobjectcontactofunocontrol.cxx.
References impl_isDisposed_nofail().
bool sdr::contact::ViewObjectContactOfUnoControl_Impl::isPrintableControl | ( | ) | const |
determines whether or not our control is printable
Effectively, this method returns the value of the "Printable" property of the control's model. If we have no control, <FALSE> is returned.
Definition at line 1284 of file viewobjectcontactofunocontrol.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, SdrUnoObj::GetUnoControlModel(), and getUnoObject().
|
overrideprotectedvirtual |
Definition at line 1376 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, eAlive, eDesign, Exception, impl_adjustControlVisibilityToLayerVisibility_throw(), impl_isControlDesignMode_nothrow(), impl_switchDesignModeListening_nothrow(), and m_eControlDesignMode.
|
delete |
void sdr::contact::ViewObjectContactOfUnoControl_Impl::positionAndZoomControl | ( | const basegfx::B2DHomMatrix & | _rViewTransformation | ) | const |
positions our XControl according to the geometry settings in the SdrUnoObj, modified by the given transformation, and sets proper zoom settings according to our device
@precond ->m_pOutputDeviceForWindow and ->m_aControl are not <NULL>
Definition at line 926 of file viewobjectcontactofunocontrol.cxx.
References sdr::contact::UnoControlContactHelper::adjustControlGeometry_throw(), DBG_UNHANDLED_EXCEPTION, Exception, SdrTextObj::GetLogicRect(), getUnoObject(), m_aControl, and m_aZoomLevelNormalization.
|
overrideprotectedvirtual |
Definition at line 1355 of file viewobjectcontactofunocontrol.cxx.
References DBG_ASSERT, impl_isControlDesignMode_nothrow(), impl_isDisposed_nofail(), m_aControl, m_pAntiImpl, and sdr::contact::ViewObjectContactOfUnoControl::propertyChange().
void sdr::contact::ViewObjectContactOfUnoControl_Impl::setControlDesignMode | ( | bool | _bDesignMode | ) | const |
sets the design mode on the control, or at least remembers the flag for the time the control is created
Definition at line 1453 of file viewobjectcontactofunocontrol.cxx.
References DBG_UNHANDLED_EXCEPTION, eAlive, eDesign, eUnknown, Exception, impl_isControlDesignMode_nothrow(), m_aControl, and m_eControlDesignMode.
|
overrideprotectedvirtual |
Definition at line 1348 of file viewobjectcontactofunocontrol.cxx.
References m_bControlIsVisible.
|
overrideprotectedvirtual |
Definition at line 1335 of file viewobjectcontactofunocontrol.cxx.
|
overrideprotectedvirtual |
Definition at line 1329 of file viewobjectcontactofunocontrol.cxx.
|
overrideprotectedvirtual |
Definition at line 1341 of file viewobjectcontactofunocontrol.cxx.
References m_bControlIsVisible.
|
private |
the control we're responsible for
Definition at line 518 of file viewobjectcontactofunocontrol.cxx.
Referenced by disposing(), elementRemoved(), elementReplaced(), getExistentControl(), hasControl(), impl_adjustControlVisibilityToLayerVisibility_throw(), impl_dispose_nothrow(), impl_ensureControl_nothrow(), impl_switchControlListening_nothrow(), impl_switchPropertyListening_nothrow(), positionAndZoomControl(), propertyChange(), and setControlDesignMode().
|
private |
Definition at line 541 of file viewobjectcontactofunocontrol.cxx.
Referenced by impl_ensureControl_nothrow(), positionAndZoomControl(), and ViewObjectContactOfUnoControl_Impl().
|
private |
flag indicating whether the control is currently visible
Definition at line 527 of file viewobjectcontactofunocontrol.cxx.
Referenced by elementReplaced(), impl_adjustControlVisibilityToLayerVisibility_throw(), impl_dispose_nothrow(), impl_ensureControl_nothrow(), isControlVisible(), windowHidden(), and windowShown().
|
private |
are we currently inside impl_ensureControl_nothrow?
Definition at line 515 of file viewobjectcontactofunocontrol.cxx.
Referenced by impl_ensureControl_nothrow().
|
private |
are we currently listening at a design mode control?
Definition at line 530 of file viewobjectcontactofunocontrol.cxx.
Referenced by impl_switchDesignModeListening_nothrow().
|
mutableprivate |
is the control currently in design mode?
Definition at line 539 of file viewobjectcontactofunocontrol.cxx.
Referenced by impl_ensureControl_nothrow(), impl_isControlDesignMode_nothrow(), modeChanged(), and setControlDesignMode().
|
private |
the instance whose IMPL we are
Definition at line 512 of file viewobjectcontactofunocontrol.cxx.
Referenced by elementReplaced(), ensureControl(), getUnoObject(), getViewContact(), impl_dispose_nothrow(), impl_getOutputDevice_throw(), impl_getPageView_nothrow(), impl_isDisposed_nofail(), propertyChange(), and ViewObjectContactOfUnoControl_Impl().
|
private |
the output device for which the control was created
Definition at line 524 of file viewobjectcontactofunocontrol.cxx.
Referenced by elementReplaced(), impl_dispose_nothrow(), and impl_ensureControl_nothrow().
|
private |
the ControlContainer where we inserted our control
Definition at line 521 of file viewobjectcontactofunocontrol.cxx.
Referenced by disposing(), elementRemoved(), elementReplaced(), impl_dispose_nothrow(), impl_ensureControl_nothrow(), and impl_switchContainerListening_nothrow().