summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-07-08 13:33:39 +0000
committerOliver Bolte <obo@openoffice.org>2009-07-08 13:33:39 +0000
commit48c373cbc74460b51336e6da53e3c47f4fa69cf7 (patch)
tree29b2b17884d69be557d22515498ef0f6b1ad0812 /svx/source/sdr
parent3caba386de1dd78c0273d7210b01d643e4d00163 (diff)
CWS-TOOLING: integrate CWS dba311a
2009-07-03 13:24:10 +0200 msc r273691 : #i100000# 2009-06-24 11:31:54 +0200 fs r273323 : line ends 2009-06-24 11:30:25 +0200 fs r273322 : line ends 2009-06-09 07:29:25 +0200 oj r272747 : #i102557# default 2nd table 2009-06-08 15:59:51 +0200 fs r272737 : #i102089# PrintOrPreviewContact: do not create a Primitive2DSequence for non-printable controls 2009-06-05 11:22:36 +0200 fs r272673 : #i102090# do not 'paint' controls which are in alive mode, and manually switched to invisible 2009-06-02 11:44:34 +0200 oj r272490 : #i102409# correct deletion in array list
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx25
1 files changed, 18 insertions, 7 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 43114516c7..1673c52722 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1257,18 +1257,16 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
bool ViewObjectContactOfUnoControl_Impl::isPrintableControl() const
{
- if ( !m_aControl.is() )
+ SdrUnoObj* pUnoObject( NULL );
+ if ( !getUnoObject( pUnoObject ) )
return false;
bool bIsPrintable = false;
try
{
- Reference< XPropertySet > xModelProperties( m_aControl.getModel(), UNO_QUERY );
- Reference< XPropertySetInfo > xPropertyInfo( xModelProperties.is() ? xModelProperties->getPropertySetInfo() : Reference< XPropertySetInfo >() );
- const ::rtl::OUString sPrintablePropertyName( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) );
-
- if ( xPropertyInfo.is() && xPropertyInfo->hasPropertyByName( sPrintablePropertyName ) )
- OSL_VERIFY( xModelProperties->getPropertyValue( sPrintablePropertyName ) >>= bIsPrintable );
+ Reference< XPropertySet > xModelProperties( pUnoObject->GetUnoControlModel(), UNO_QUERY_THROW );
+ static const ::rtl::OUString s_sPrintablePropertyName( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) );
+ OSL_VERIFY( xModelProperties->getPropertyValue( s_sPrintablePropertyName ) >>= bIsPrintable );
}
catch( const Exception& )
{
@@ -1601,6 +1599,11 @@ namespace sdr { namespace contact {
Reference< XControlModel > xControlModel(rViewContactOfUnoControl.GetSdrUnoObj().GetUnoControlModel());
const ControlHolder& rControl(m_pImpl->getExistentControl());
+ // ignore existing controls which are in alive mode and manually switched to "invisible"
+ // #102090# / 2009-06-05 / frank.schoenheit@sun.com
+ if ( rControl.is() && !rControl.isDesignMode() && !rControl.isVisible() )
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
// check if we already have a XControl.
if(xControlModel.is() && rControl.is())
{
@@ -1721,6 +1724,14 @@ namespace sdr { namespace contact {
DBG_DTOR( UnoControlPrintOrPreviewContact, NULL );
}
+ //--------------------------------------------------------------------
+ drawinglayer::primitive2d::Primitive2DSequence UnoControlPrintOrPreviewContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const
+ {
+ if ( !m_pImpl->isPrintableControl() )
+ return drawinglayer::primitive2d::Primitive2DSequence();
+ return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo );
+ }
+
//====================================================================
//= UnoControlPDFExportContact
//====================================================================