summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-11-03 07:00:05 +0000
committerPascal Junck <pjunck@openoffice.org>2004-11-03 07:00:05 +0000
commitd73824bcc476b6be390a2e6406304b9c9cd7d503 (patch)
treec67fdbff4fe75ff94bfef9adb68df651051f68f9 /shell
parentc564b7aba0e8bb40c380516e1a678b807b06d4d0 (diff)
INTEGRATION: CWS desktintgr03 (1.3.2); FILE MERGED
2004/10/09 09:32:58 deuce 1.3.2.1: Issue number: i35223 Submitted by: Gorden Lin {Gorden.Lin@Sun.com} Reviewed by: Tino Rachui {Tino.Rachui@Sun.com}
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/shlxthandler/infotips/infotips.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index 8f107fa4ae5a..b0f78ee5ce46 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: infotips.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2004-09-08 14:32:12 $
+ * last change: $Author: pjunck $ $Date: 2004-11-03 08:00:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -220,9 +220,19 @@ DWORD getSizeOfFile( char* FileName )
*/
std::wstring formatSizeOfFile( DWORD dwSize )
{
- char *buffer;
+ if ( dwSize < 1000 )
+ {
+ char buffer[3];
+ int dFileSize = dwSize;
+
+ _itoa( dFileSize, buffer, 10 );
+ return StringToWString( buffer ).append(StringToWString("B"));
+ }
+
+ char *buffer=NULL;
int decimal, sign;
double dFileSize = (double)dwSize/(double)KB;
+
buffer = _fcvt( dFileSize, 1, &decimal, &sign );
::std::wstring wsTemp = StringToWString( buffer );