[ooo-build-commit] Branch 'ooo/OOO310' - svx/inc svx/source

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Jul 8 18:00:26 PDT 2009


 svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx |    2 +
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx  |   25 ++++++++++----
 2 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 48c373cbc74460b51336e6da53e3c47f4fa69cf7
Author: Oliver Bolte <obo at openoffice.org>
Date:   Wed Jul 8 13:33:39 2009 +0000

    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

diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
index 5b7103e..1ace59a 100644
--- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -165,6 +165,8 @@ namespace sdr { namespace contact {
         UnoControlPrintOrPreviewContact();                                                 // never implemented
         UnoControlPrintOrPreviewContact( const UnoControlPrintOrPreviewContact& );            // never implemented
         UnoControlPrintOrPreviewContact& operator=( const UnoControlPrintOrPreviewContact& ); // never implemented
+
+        virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const;
     };
 
     //====================================================================
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 4311451..1673c52 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 at 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
     //====================================================================


More information about the ooo-build-commit mailing list