ooo-build r11633 - in trunk: . patches/src680



Author: jholesovsky
Date: Tue Feb 19 18:51:07 2008
New Revision: 11633
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11633&view=rev

Log:
2008-02-19  Jan Holesovsky  <kendy suse cz>

        * patches/src680/gnome-vfs-properties.diff,
          patches/src680/apply: Show the correct size in File -> Properties
          for documents accessed through gnome-vfs.


Added:
   trunk/patches/src680/gnome-vfs-properties.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Tue Feb 19 18:51:07 2008
@@ -562,6 +562,9 @@
 # Keep the file read/write after reload
 gnome-vfs-reload.diff, n#264140, jholesov
 
+# Show the file size in the Properties dialog
+gnome-vfs-properties.diff, n#264585, jholesov
+
 [ GnomeVFS >= ooh680-m4 ]
 # WebDAV locking
 # It is in this section because it needs part of the gvfs-related patches

Added: trunk/patches/src680/gnome-vfs-properties.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/gnome-vfs-properties.diff	Tue Feb 19 18:51:07 2008
@@ -0,0 +1,61 @@
+diff --git sfx2/source/bastyp/helper.cxx sfx2/source/bastyp/helper.cxx
+index eda78c5..e9470a9 100644
+--- sfx2/source/bastyp/helper.cxx
++++ sfx2/source/bastyp/helper.cxx
+@@ -836,16 +836,15 @@ ErrCode SfxContentHelper::QueryDiskSpace( const String& rPath, sal_Int64& rFreeB
+ 
+ // -----------------------------------------------------------------------
+ 
+-ULONG SfxContentHelper::GetSize( const String& rContent )
++sal_Int64 SfxContentHelper::GetSize( const String& rContent )
+ {
+-	ULONG nSize = 0;
+-	sal_Int64 nTemp = 0;
++	sal_Int64 nSize = -1;
+     INetURLObject aObj( rContent );
+     DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
+ 	try
+ 	{
+ 		::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
+-		aCnt.getPropertyValue( OUString::createFromAscii( "Size" ) ) >>= nTemp;
++		aCnt.getPropertyValue( OUString::createFromAscii( "Size" ) ) >>= nSize;
+ 	}
+ 	catch( ucb::CommandAbortedException& )
+ 	{
+@@ -855,7 +854,6 @@ ULONG SfxContentHelper::GetSize( const String& rContent )
+ 	{
+ 		DBG_ERRORFILE( "Any other exception" );
+ 	}
+-	nSize = (UINT32)nTemp;
+ 	return nSize;
+ }
+ 
+diff --git sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dinfdlg.cxx
+index d770459..6fb37c7 100644
+--- sfx2/source/dialog/dinfdlg.cxx
++++ sfx2/source/dialog/dinfdlg.cxx
+@@ -904,8 +904,9 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
+ 
+ 	// Bestimmung von Groesse und Typ
+ 	String aSizeText( aUnknownSize );
+-	if ( aURL.GetProtocol() == INET_PROT_FILE )
+-		aSizeText = CreateSizeText( SfxContentHelper::GetSize( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) );
++	sal_Int64 nSize = SfxContentHelper::GetSize( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
++	if ( nSize >= 0 )
++		aSizeText = CreateSizeText( static_cast< ULONG >( nSize ) );
+ 	aShowSizeFT.SetText( aSizeText );
+ 
+ 	String aDescription = SvFileInformationManager::GetDescription( INetURLObject(rMainURL) );
+diff --git sfx2/source/inc/helper.hxx sfx2/source/inc/helper.hxx
+index 040aaa7..41ab691 100644
+--- sfx2/source/inc/helper.hxx
++++ sfx2/source/inc/helper.hxx
+@@ -78,7 +78,7 @@ public:
+ 
+ 	static sal_Bool				MakeFolder( const String& rFolder );
+ 	static ErrCode				QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
+-	static ULONG				GetSize( const String& rContent );
++	static sal_Int64			GetSize( const String& rContent );
+ 	static sal_Bool				IsYounger( const String& rIsYoung, const String& rIsOlder );
+ 
+ 	// please don't use this!



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