summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-01-15 16:47:42 +0100
committerKurt Zenker <kz@openoffice.org>2010-01-15 16:47:42 +0100
commit6f6f7b9cc8dffeea37add3b00c283292b2034b4c (patch)
tree1f82d39a03932d63f11c3fa69d35e3e93bcceeee /svx/source/sdr
parent3894ee4d0cd901835d9147bc11093f47f4b10292 (diff)
parentba9aa9c427a21feeabf448846ac68db800ec0316 (diff)
CWS-TOOLING: integrate CWS printerpullpages
Diffstat (limited to 'svx/source/sdr')
-rwxr-xr-x[-rw-r--r--]svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx12
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx49
2 files changed, 44 insertions, 17 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index b785b2285873..244fea07285f 100644..100755
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -40,6 +40,8 @@
#include <svx/svdoole2.hxx>
#include <svx/svdview.hxx>
+#include "fmobj.hxx"
+
//////////////////////////////////////////////////////////////////////////////
namespace sdr
@@ -91,8 +93,9 @@ namespace sdr
const bool bHideOle(rSdrView.getHideOle());
const bool bHideChart(rSdrView.getHideChart());
const bool bHideDraw(rSdrView.getHideDraw());
+ const bool bHideFormControl(rSdrView.getHideFormControl());
- if(bHideOle || bHideChart || bHideDraw)
+ if(bHideOle || bHideChart || bHideDraw || bHideFormControl)
{
if(OBJ_OLE2 == rObject.GetObjIdentifier())
{
@@ -123,8 +126,13 @@ namespace sdr
}
else
{
+ const bool bIsFormControl = dynamic_cast< const FmFormObj * >( &rObject ) != 0;
+ if(bIsFormControl && bHideFormControl)
+ {
+ return false;
+ }
// any other draw object
- if(bHideDraw)
+ if(!bIsFormControl && bHideDraw)
{
return false;
}
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 224327f01a8b..5f7bf41386e0 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -351,6 +351,12 @@ namespace sdr { namespace contact {
if ( !_rControl.is() )
return;
+ #if OSL_DEBUG_LEVEL > 0
+ ::basegfx::B2DTuple aViewScale, aViewTranslate;
+ double nViewRotate(0), nViewShearX(0);
+ _rViewTransformation.decompose( aViewScale, aViewTranslate, nViewRotate, nViewShearX );
+ #endif
+
// transform the logic bound rect, using the view transformation, to pixel coordinates
::basegfx::B2DPoint aTopLeft( _rLogicBoundingRect.Left(), _rLogicBoundingRect.Top() );
aTopLeft *= _rViewTransformation;
@@ -615,7 +621,7 @@ namespace sdr { namespace contact {
Failure of this method will be reported via an assertion in a non-product version.
*/
- bool ensureControl();
+ bool ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL );
/** returns our XControl, if it already has been created
@@ -658,6 +664,8 @@ namespace sdr { namespace contact {
IPageViewAccess& _rPageView,
const OutputDevice& _rDevice,
const SdrUnoObj& _rUnoObject,
+ const basegfx::B2DHomMatrix& _rInitialViewTransformation,
+ const basegfx::B2DHomMatrix& _rInitialZoomNormalization,
ControlHolder& _out_rControl
);
@@ -832,7 +840,11 @@ namespace sdr { namespace contact {
/** ensures that we have a control for the given PageView/OutputDevice
*/
- bool impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice );
+ bool impl_ensureControl_nothrow(
+ IPageViewAccess& _rPageView,
+ const OutputDevice& _rDevice,
+ const basegfx::B2DHomMatrix& _rInitialViewTransformation
+ );
/** retrieves the device which a PageView belongs to, starting from its ObjectContactOfPageView
@@ -1018,8 +1030,8 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
void ViewObjectContactOfUnoControl_Impl::positionAndZoomControl( const basegfx::B2DHomMatrix& _rViewTransformation ) const
{
- OSL_PRECOND( ( m_pOutputDeviceForWindow != NULL ) && m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no output device or no control!" );
- if ( ( m_pOutputDeviceForWindow == NULL ) || !m_aControl.is() )
+ OSL_PRECOND( m_aControl.is(), "ViewObjectContactOfUnoControl_Impl::positionAndZoomControl: no output device or no control!" );
+ if ( !m_aControl.is() )
return;
try
@@ -1039,7 +1051,7 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::ensureControl()
+ bool ViewObjectContactOfUnoControl_Impl::ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL )
{
OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::ensureControl: already disposed()" );
if ( impl_isDisposed_nofail() )
@@ -1049,16 +1061,20 @@ namespace sdr { namespace contact {
if ( pPageViewContact )
{
SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ const OutputDevice& rDevice( impl_getPageViewOutputDevice_nothrow( *pPageViewContact ) );
return impl_ensureControl_nothrow(
aPVAccess,
- impl_getPageViewOutputDevice_nothrow( *pPageViewContact )
+ rDevice,
+ _pInitialViewTransformationOrNULL ? *_pInitialViewTransformationOrNULL : rDevice.GetViewTransformation()
);
}
DummyPageViewAccess aNoPageView;
+ const OutputDevice& rDevice( impl_getOutputDevice_throw() );
return impl_ensureControl_nothrow(
aNoPageView,
- impl_getOutputDevice_throw()
+ rDevice,
+ _pInitialViewTransformationOrNULL ? *_pInitialViewTransformationOrNULL : rDevice.GetViewTransformation()
);
}
@@ -1101,7 +1117,8 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- bool ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice )
+ bool ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow( IPageViewAccess& _rPageView, const OutputDevice& _rDevice,
+ const basegfx::B2DHomMatrix& _rInitialViewTransformation )
{
if ( m_bCreatingControl )
{
@@ -1145,7 +1162,7 @@ namespace sdr { namespace contact {
return false;
ControlHolder aControl;
- if ( !createControlForDevice( _rPageView, _rDevice, *pUnoObject, aControl ) )
+ if ( !createControlForDevice( _rPageView, _rDevice, *pUnoObject, _rInitialViewTransformation, m_aZoomLevelNormalization, aControl ) )
return false;
m_pOutputDeviceForWindow = &_rDevice;
@@ -1180,7 +1197,8 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
bool ViewObjectContactOfUnoControl_Impl::createControlForDevice( IPageViewAccess& _rPageView,
- const OutputDevice& _rDevice, const SdrUnoObj& _rUnoObject, ControlHolder& _out_rControl )
+ const OutputDevice& _rDevice, const SdrUnoObj& _rUnoObject, const basegfx::B2DHomMatrix& _rInitialViewTransformation,
+ const basegfx::B2DHomMatrix& _rInitialZoomNormalization, ControlHolder& _out_rControl )
{
_out_rControl.clear();
@@ -1204,8 +1222,8 @@ namespace sdr { namespace contact {
UnoControlContactHelper::adjustControlGeometry_throw(
_out_rControl,
_rUnoObject.GetLogicRect(),
- _rDevice.GetViewTransformation(),
- _rDevice.GetInverseViewTransformation()
+ _rInitialViewTransformation,
+ _rInitialZoomNormalization
);
// #107049# set design mode before peer is created,
@@ -1650,7 +1668,7 @@ namespace sdr { namespace contact {
#endif
// force control here to make it a VCL ChildWindow. Will be fetched
// and used below by getExistentControl()
- m_pVOCImpl->ensureControl();
+ m_pVOCImpl->ensureControl( &_rViewInformation.getObjectToViewTransformation() );
impl_positionAndZoomControl( _rViewInformation );
// get needed data
@@ -1709,7 +1727,7 @@ namespace sdr { namespace contact {
Reference< XControl > ViewObjectContactOfUnoControl::getControl()
{
VOCGuard aGuard( *m_pImpl );
- m_pImpl->ensureControl();
+ m_pImpl->ensureControl( NULL );
return m_pImpl->getExistentControl().getControl();
}
@@ -1720,7 +1738,8 @@ namespace sdr { namespace contact {
ControlHolder aControl;
InvisibleControlViewAccess aSimulatePageView( _inout_ControlContainer );
- OSL_VERIFY( ViewObjectContactOfUnoControl_Impl::createControlForDevice( aSimulatePageView, _rWindow, _rUnoObject, aControl ) );
+ OSL_VERIFY( ViewObjectContactOfUnoControl_Impl::createControlForDevice( aSimulatePageView, _rWindow, _rUnoObject,
+ _rWindow.GetViewTransformation(), _rWindow.GetInverseViewTransformation(), aControl ) );
return aControl.getControl();
}