ooo-build r12190 - in branches/sled-10-sp2-ooo-build-2-4: . patches/src680



Author: pmladek
Date: Wed Apr 16 17:50:02 2008
New Revision: 12190
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12190&view=rev

Log:
2008-04-16  Kohei Yoshida  <kyoshida novell com>

	* patches/src680/sfx2-always-allow-save-document.diff: fixed handling of
	read-only document which might cause crash, per upstream comment in 
	i#5226.



Modified:
   branches/sled-10-sp2-ooo-build-2-4/ChangeLog
   branches/sled-10-sp2-ooo-build-2-4/patches/src680/sfx2-always-allow-save-document.diff

Modified: branches/sled-10-sp2-ooo-build-2-4/patches/src680/sfx2-always-allow-save-document.diff
==============================================================================
--- branches/sled-10-sp2-ooo-build-2-4/patches/src680/sfx2-always-allow-save-document.diff	(original)
+++ branches/sled-10-sp2-ooo-build-2-4/patches/src680/sfx2-always-allow-save-document.diff	Wed Apr 16 17:50:02 2008
@@ -1,39 +1,44 @@
-? sfx2/sfx2.vpj
-Index: sfx2/source/doc/guisaveas.cxx
-===================================================================
-RCS file: /cvs/framework/sfx2/source/doc/guisaveas.cxx,v
-retrieving revision 1.31
-diff -u -r1.31 guisaveas.cxx
---- sfx2/source/doc/guisaveas.cxx	26 Nov 2007 16:47:57 -0000	1.31
-+++ sfx2/source/doc/guisaveas.cxx	2 Feb 2008 03:46:35 -0000
-@@ -679,8 +679,9 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sfx2.vpj sfx2.clean/source/doc/guisaveas.cxx sfx2/source/doc/guisaveas.cxx
+--- sfx2.clean/source/doc/guisaveas.cxx	2008-04-10 10:27:24.000000000 -0400
++++ sfx2/source/doc/guisaveas.cxx	2008-04-10 10:39:17.000000000 -0400
+@@ -678,10 +678,6 @@ sal_Int8 ModelData_Impl::CheckStateForSa
+ 	if ( GetMediaDescr().size() != aAcceptedArgs.size() )
  		GetMediaDescr() = aAcceptedArgs;
  
-     // the document must be modified
+-    // the document must be modified
 -    if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
 -		return STATUS_NO_ACTION;
-+// always allow save (kohei)
-+//  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() )
-Index: sfx2/source/doc/objserv.cxx
-===================================================================
-RCS file: /cvs/framework/sfx2/source/doc/objserv.cxx,v
-retrieving revision 1.101
-diff -u -r1.101 objserv.cxx
---- sfx2/source/doc/objserv.cxx	21 Nov 2007 16:47:51 -0000	1.101
-+++ sfx2/source/doc/objserv.cxx	2 Feb 2008 03:46:35 -0000
-@@ -1058,8 +1058,9 @@
- 					if ( !bMediumRO && GetMedium() && IsModified() )
- 						rSet.Put(SfxStringItem(
- 							nWhich, String(SfxResId(STR_SAVEDOC))));
+ 		return STATUS_SAVEAS;
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sfx2.vpj sfx2.clean/source/doc/objserv.cxx sfx2/source/doc/objserv.cxx
+--- sfx2.clean/source/doc/objserv.cxx	2008-04-10 10:27:24.000000000 -0400
++++ sfx2/source/doc/objserv.cxx	2008-04-10 10:37:02.000000000 -0400
+@@ -1052,17 +1052,15 @@ void SfxObjectShell::GetState_Impl(SfxIt
+ 						rSet.DisableItem( nWhich );
+ 					break;
+ 				}
+-			case SID_SAVEDOC:
+-	            {
+-					BOOL bMediumRO = IsReadOnlyMedium();
+-					if ( !bMediumRO && GetMedium() && IsModified() )
+-						rSet.Put(SfxStringItem(
+-							nWhich, String(SfxResId(STR_SAVEDOC))));
 -					else
 -                    	rSet.DisableItem(nWhich);
-+// always allow save (kohei)
-+//                  else
-+//                      rSet.DisableItem(nWhich);
- 				}
- 				break;
- 
+-				}
+-				break;
+-
++            case SID_SAVEDOC:
++            {
++                BOOL bMediumRO = IsReadOnlyMedium();
++                if ( !bMediumRO && GetMedium() )
++                    rSet.Put(SfxStringItem( nWhich, String(SfxResId(STR_SAVEDOC))));
++                else
++                    rSet.DisableItem(nWhich);
++            }
++            break;
+ 			case SID_DOCINFO:
+ 				if ( 0 != ( pImp->eFlags & SFXOBJECTSHELL_NODOCINFO ) )
+ 					rSet.DisableItem( nWhich );



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