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



Author: kyoshida
Date: Fri Jan  2 20:03:56 2009
New Revision: 14988
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14988&view=rev

Log:
2009-01-02  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/always-allow-save-document-sfx2.diff: the intended fix
	was not really applied.  The save icon was always enabled in Calc, but 
	the actual save only happened only when the document was modified.
	I really fixed it this time. (n#450789)


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/always-allow-save-document-sfx2.diff

Modified: trunk/patches/dev300/always-allow-save-document-sfx2.diff
==============================================================================
--- trunk/patches/dev300/always-allow-save-document-sfx2.diff	(original)
+++ trunk/patches/dev300/always-allow-save-document-sfx2.diff	Fri Jan  2 20:03:56 2009
@@ -1,5 +1,5 @@
 diff --git sfx2/inc/sfx2/objsh.hxx sfx2/inc/sfx2/objsh.hxx
-index 84ef6a5..f7c76ed 100644
+index f365bbf..c65280b 100644
 --- sfx2/inc/sfx2/objsh.hxx
 +++ sfx2/inc/sfx2/objsh.hxx
 @@ -203,6 +203,10 @@ enum SfxTitleQuery
@@ -13,7 +13,7 @@
  
  class SfxToolBoxConfig;
  struct TransferableObjectDescriptor;
-@@ -349,6 +353,7 @@ public:
+@@ -350,6 +354,7 @@ public:
      virtual sal_Bool            SwitchPersistance(
  									const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
      virtual void                UpdateLinks();
@@ -22,7 +22,7 @@
      sal_Bool                    SaveChildren(BOOL bObjectsOnly=FALSE);
      sal_Bool                    SaveAsChildren( SfxMedium &rMedium );
 diff --git sfx2/source/doc/guisaveas.cxx sfx2/source/doc/guisaveas.cxx
-index 049f9b7..38f0b8d 100644
+index 049f9b7..da8f008 100644
 --- sfx2/source/doc/guisaveas.cxx
 +++ sfx2/source/doc/guisaveas.cxx
 @@ -597,6 +597,7 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
@@ -33,10 +33,13 @@
  
  	if ( GetMediaDescr().find( aVersionCommentString ) != GetMediaDescr().end() )
  	{
-@@ -620,6 +621,27 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
-     if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
- 		return STATUS_NO_ACTION;
- 
+@@ -616,9 +617,26 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
+ 	if ( GetMediaDescr().size() != aAcceptedArgs.size() )
+ 		GetMediaDescr() = aAcceptedArgs;
+ 
+-    // the document must be modified
+-    if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
+-		return STATUS_NO_ACTION;
 +    // the document must be modified unless the always-save flag is set.
 +    sal_Bool bAlwaysAllowSave = sal_False;
 +    uno::Reference<beans::XPropertySet> xPropSet(m_xModel, uno::UNO_QUERY);
@@ -57,15 +60,14 @@
 +        if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
 +            return STATUS_NO_ACTION;
 +    }
-+
+ 
      // if the document is readonly or a new one a SaveAs operation must be used
      if ( !GetStorable()->hasLocation() || GetStorable()->isReadonly() )
- 		return STATUS_SAVEAS;
 diff --git sfx2/source/doc/objserv.cxx sfx2/source/doc/objserv.cxx
-index cad7a9c..8f8773e 100644
+index 1d114cb..204dd55 100644
 --- sfx2/source/doc/objserv.cxx
 +++ sfx2/source/doc/objserv.cxx
-@@ -975,8 +975,9 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
+@@ -988,8 +988,9 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
  				}
  			case SID_SAVEDOC:
  	            {
@@ -78,10 +80,10 @@
  							nWhich, String(SfxResId(STR_SAVEDOC))));
  					else
 diff --git sfx2/source/doc/objstor.cxx sfx2/source/doc/objstor.cxx
-index 70eac6f..3081012 100644
+index e82361c..a060ddc 100644
 --- sfx2/source/doc/objstor.cxx
 +++ sfx2/source/doc/objstor.cxx
-@@ -3618,6 +3618,11 @@ void SfxObjectShell::UpdateLinks()
+@@ -3825,6 +3825,11 @@ void SfxObjectShell::UpdateLinks()
  {
  }
  



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