ooo-build r13796 - in trunk: . patches/dev300



Author: noelpwer
Date: Thu Sep  4 13:42:59 2008
New Revision: 13796
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13796&view=rev

Log:
2008-09-04  Noel Power <noel power novell com>

        * patches/dev300/controls-with-images-in-document.diff: latest  version
        incorporating some more review comments


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/controls-with-images-in-document.diff

Modified: trunk/patches/dev300/controls-with-images-in-document.diff
==============================================================================
--- trunk/patches/dev300/controls-with-images-in-document.diff	(original)
+++ trunk/patches/dev300/controls-with-images-in-document.diff	Thu Sep  4 13:42:59 2008
@@ -119,10 +119,10 @@
      }
  
 diff --git extensions/source/propctrlr/propcontroller.cxx extensions/source/propctrlr/propcontroller.cxx
-index 80c07a6..bc1257d 100644
+index 80c07a6..959177f 100644
 --- extensions/source/propctrlr/propcontroller.cxx
 +++ extensions/source/propctrlr/propcontroller.cxx
-@@ -1384,6 +1384,22 @@ namespace pcr
+@@ -1384,6 +1384,18 @@ namespace pcr
  	{
  		try
  		{
@@ -136,38 +136,23 @@
 +                rtl::OUString sVal;
 +                _rValue >>= sVal;
 +                if ( sVal.equals( sPlcHolder ) )
-+                    // #FIXME ? I wonder is it safe to just return here?
-+                    // For the moment, leave the code path as is, just
-+                    // ensure that the placeholder doesn't get set as
-+                    // the propery value
 +                    bIsPlaceHolderValue = true;
 +            }
              m_sCommittingProperty = rName;
  
              bool bIsActuatingProperty = impl_isActuatingProperty_nothrow( rName );
-@@ -1396,12 +1412,18 @@ namespace pcr
+@@ -1396,8 +1408,9 @@ namespace pcr
              PropertyHandlerRef handler = impl_getHandlerForProperty_throw( rName );
  
  			//////////////////////////////////////////////////////////////////////
-+            Any aNormalizedValue;
- 			// set the value
+-			// set the value
 -            handler->setPropertyValue( rName, _rValue );
-+            if ( !bIsPlaceHolderValue ) // don't set the property with the placeholder value
-+            {
++			// set the value ( only if it's not a placeholder )
++            if ( !bIsPlaceHolderValue )
 +                handler->setPropertyValue( rName, _rValue );
  
--			//////////////////////////////////////////////////////////////////////
--            // re-retrieve the value
--            Any aNormalizedValue = handler->getPropertyValue( rName );
-+			    //////////////////////////////////////////////////////////////////////
-+                // re-retrieve the value
-+                aNormalizedValue = handler->getPropertyValue( rName );
-+            }
-+            else
-+                aNormalizedValue = uno::makeAny( sPlcHolder );
- 
-             // care for any inter-property dependencies
-             if ( bIsActuatingProperty )
+ 			//////////////////////////////////////////////////////////////////////
+             // re-retrieve the value
 diff --git extensions/source/propctrlr/propres.src extensions/source/propctrlr/propres.src
 index 5857d25..59a0ce6 100644
 --- extensions/source/propctrlr/propres.src
@@ -239,7 +224,7 @@
      }
  
 diff --git forms/source/component/ImageControl.cxx forms/source/component/ImageControl.cxx
-index 1ba9f90..53d0626 100644
+index 1ba9f90..f864210 100644
 --- forms/source/component/ImageControl.cxx
 +++ forms/source/component/ImageControl.cxx
 @@ -57,6 +57,7 @@
@@ -250,25 +235,25 @@
  #include <tools/urlobj.hxx>
  #include <tools/stream.hxx>
  #include <tools/debug.hxx>
-@@ -353,9 +354,9 @@ sal_Bool OImageControlModel::handleNewIm
+@@ -353,9 +354,9 @@ sal_Bool OImageControlModel::handleNewImageURL( const ::rtl::OUString& _rURL, Va
      ::std::auto_ptr< SvStream > pImageStream;
      Reference< XInputStream > xImageStream;
  
 -    if ( ::svt::ImageResourceAccess::isImageResourceURL( _rURL ) )
-+    if ( ::svt::GraphicAccess::isSupportedURL( _rURL ) || ::svt::GraphicAccess::isSupportedURL( _rURL ) )
++    if ( ::svt::GraphicAccess::isSupportedURL( _rURL ) )
      {
 -        xImageStream = ::svt::ImageResourceAccess::getImageXStream( getORB(), _rURL );
 +        xImageStream = ::svt::GraphicAccess::getImageXStream( getORB(), _rURL );
      }
      else
      {
-@@ -646,8 +647,18 @@ void OImageControlControl::implInsertGra
+@@ -646,8 +647,18 @@ void OImageControlControl::implInsertGraphics()
  		DBG_ASSERT( xController.is(), "OImageControlControl::implInsertGraphics: invalid file picker!" );
  		if ( xController.is() )
  		{
 +			// we can only give the option to choose a non-linked
 +			// graphic if this control is not bound to a database
-+			// column i.e. if bHasField returns false 
++			// column i.e. if bHasField is false 
 +			// In either case, the 'Link' cb will be checked
 +			Reference<XPropertySet> xBoundField;
 +			if ( hasProperty( PROPERTY_BOUNDFIELD, xSet ) )
@@ -278,11 +263,11 @@
  			xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True));
 -			xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False);
 +			xController->setValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any( true ) );
-+			xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, bHasField );
++			xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, !bHasField );
  		}
  
  		if ( ERRCODE_NONE == aDialog.Execute() )
-@@ -655,8 +666,21 @@ void OImageControlControl::implInsertGra
+@@ -655,8 +666,21 @@ void OImageControlControl::implInsertGraphics()
  			// reset the url property in case it already has the value we're about to set - in this case
  			// our propertyChanged would not get called without this.
  			implClearGraphics( sal_False );
@@ -368,7 +353,7 @@
 index 01fa8ac..05fbe13 100644
 --- forms/source/component/imgprod.cxx
 +++ forms/source/component/imgprod.cxx
-@@ -267,9 +267,9 @@ void ImageProducer::SetImage( const ::rt
+@@ -267,9 +267,9 @@ void ImageProducer::SetImage( const ::rtl::OUString& rPath )
  	mbAsync = sal_False;
  	delete mpStm;
  
@@ -411,7 +396,7 @@
  // --------------------
  // - *_createInstance -
  // --------------------
-@@ -72,7 +74,7 @@ extern "C" void SAL_CALL component_getIm
+@@ -72,7 +74,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char*
  // - component_writeInfo -
  // -----------------------
  
@@ -420,7 +405,7 @@
  {
  	sal_Bool bRet = sal_False;
  
-@@ -105,6 +107,9 @@ extern "C" sal_Bool SAL_CALL component_w
+@@ -105,6 +107,9 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi
  		    
  			for( i = 0; i < aServices.getLength(); i++ )
  		        xNewKey->createKey( aServices.getConstArray()[ i ] );
@@ -430,7 +415,7 @@
  				
  			bRet = true;
  		}
-@@ -121,7 +126,7 @@ extern "C" sal_Bool SAL_CALL component_w
+@@ -121,7 +126,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi
  // - component_getFactory -
  // ------------------------
  
@@ -439,7 +424,7 @@
  {
  	void * pRet = 0;
  	
-@@ -153,7 +158,11 @@ extern "C" void* SAL_CALL component_getF
+@@ -153,7 +158,11 @@ extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void*
  			pRet = xFactory.get();
  		}
  	}
@@ -603,7 +588,7 @@
  // -------------------
  // - GraphicProvider -
  // -------------------
-@@ -159,6 +162,24 @@ uno::Sequence< sal_Int8 > SAL_CALL Graph
+@@ -159,6 +162,24 @@ uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId()
  
  // ------------------------------------------------------------------------------
  
@@ -628,7 +613,7 @@
  uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadMemory( const ::rtl::OUString& rResourceURL ) const
  {
  	uno::Reference< ::graphic::XGraphic > 	xRet;
-@@ -382,9 +403,10 @@ uno::Reference< beans::XPropertySet > SA
+@@ -382,9 +403,10 @@ uno::Reference< beans::XPropertySet > SAL_CALL GraphicProvider::queryGraphicDesc
  	else if( aURL.getLength() )
  	{
  		uno::Reference< ::graphic::XGraphic > xGraphic( implLoadMemory( aURL ) );
@@ -640,7 +625,7 @@
  
          if ( !xGraphic.is() )
              xGraphic = implLoadRepositoryImage( aURL );
-@@ -453,6 +475,9 @@ uno::Reference< ::graphic::XGraphic > SA
+@@ -453,6 +475,9 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
  	else if( aPath.Len() )
  	{
  		xRet = implLoadMemory( aPath );
@@ -899,10 +884,10 @@
  
  #endif
 diff --git svtools/source/control/inettbc.cxx svtools/source/control/inettbc.cxx
-index 9623762..13f00f8 100644
+index 9623762..d94d257 100644
 --- svtools/source/control/inettbc.cxx
 +++ svtools/source/control/inettbc.cxx
-@@ -1079,6 +1076,13 @@ long SvtURLBox::PreNotify( NotifyEvent& 
+@@ -1079,6 +1079,13 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
              SetSelection( Selection( nLen, GetText().Len() ) );
              return TRUE;
          }
@@ -916,7 +901,7 @@
  	}
  
  	return ComboBox::PreNotify( rNEvt );
-@@ -1148,6 +1152,8 @@ String SvtURLBox::GetURL()
+@@ -1148,6 +1155,8 @@ String SvtURLBox::GetURL()
      ::vos::OGuard aGuard( SvtMatchContext_Impl::GetMutex() );
  
      String aText( GetText() );
@@ -1029,7 +1014,7 @@
      ImageProducerControlModel() : mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
      ImageProducerControlModel( const ImageProducerControlModel& _rSource ) : com::sun::star::awt::XImageProducer(), UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
 diff --git toolkit/source/controls/unocontrols.cxx toolkit/source/controls/unocontrols.cxx
-index 821c1b9..24fe231 100644
+index 821c1b9..1e5661b 100644
 --- toolkit/source/controls/unocontrols.cxx
 +++ toolkit/source/controls/unocontrols.cxx
 @@ -37,6 +37,7 @@
@@ -1040,7 +1025,7 @@
  #include <com/sun/star/util/Date.hpp>
  
  
-@@ -576,11 +577,21 @@ uno::Any ImageProducerControlModel::Impl
+@@ -576,11 +577,21 @@ uno::Any ImageProducerControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) co
  
      return UnoControlModel::ImplGetDefaultValue( nPropId );
  }
@@ -1073,7 +1058,7 @@
  
  void SAL_CALL ImageProducerControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception)
  {
-@@ -621,7 +631,7 @@ void SAL_CALL ImageProducerControlModel:
+@@ -621,7 +631,7 @@ void SAL_CALL ImageProducerControlModel::setFastPropertyValue_NoBroadcast( sal_I
                  mbAdjustingGraphic = true;
                  ::rtl::OUString sImageURL;
                  OSL_VERIFY( rValue >>= sImageURL );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]