From cb14cc6c1631d0679a544f428919e938623471ab Mon Sep 17 00:00:00 2001 From: Sven Jacobi Date: Thu, 16 Aug 2007 15:08:05 +0000 Subject: using localized file size separator --- sdext/source/minimizer/configurationaccess.cxx | 8 ++++---- sdext/source/minimizer/impoptimizer.cxx | 6 +++--- sdext/source/minimizer/optimizerdialogcontrols.cxx | 19 +++++++++++++------ sdext/source/minimizer/pppoptimizertoken.cxx | 5 +++-- sdext/source/minimizer/pppoptimizertoken.hxx | 5 +++-- .../Office/extension/SunPresentationMinimizer.xcu | 4 ++++ .../Office/extension/SunPresentationMinimizer.xcs | 3 +++ 7 files changed, 33 insertions(+), 17 deletions(-) diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index 599c59a8cd85..cc9795c9843e 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -4,9 +4,9 @@ * * $RCSfile: configurationaccess.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: sj $ $Date: 2007-05-24 10:08:35 $ + * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -177,8 +177,8 @@ sal_Bool OptimizerSettings::operator==( const OptimizerSettings& rOptimizerSetti && ( rOptimizerSettings.mnOLEOptimizationType == mnOLEOptimizationType ) && ( rOptimizerSettings.mbDeleteUnusedMasterPages == mbDeleteUnusedMasterPages ) && ( rOptimizerSettings.mbDeleteHiddenSlides == mbDeleteHiddenSlides ) - && ( rOptimizerSettings.mbDeleteNotesPages == mbDeleteNotesPages ) - && ( rOptimizerSettings.mbOpenNewDocument == mbOpenNewDocument ); + && ( rOptimizerSettings.mbDeleteNotesPages == mbDeleteNotesPages ); +// && ( rOptimizerSettings.mbOpenNewDocument == mbOpenNewDocument ); } diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 9e4816c26acb..587f581d1c5a 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -4,9 +4,9 @@ * * $RCSfile: impoptimizer.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: sj $ $Date: 2007-05-24 10:08:35 $ + * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -578,7 +578,7 @@ ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxMSF, const R mbDeleteUnusedMasterPages ( sal_False ), mbDeleteHiddenSlides ( sal_False ), mbDeleteNotesPages ( sal_False ), - mbOpenNewDocument ( sal_False ) + mbOpenNewDocument ( sal_True ) { } diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index 5faa179617cb..d1eeed8d86f7 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -4,9 +4,9 @@ * * $RCSfile: optimizerdialogcontrols.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sj $ $Date: 2007-08-16 14:33:00 $ + * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -619,15 +619,18 @@ void OptimizerDialog::InitPage3() // ----------------------------------------------------------------------------- -static OUString ImpValueOfInMB( const sal_Int64& rVal ) +static OUString ImpValueOfInMB( const sal_Int64& rVal, sal_Unicode nSeparator = '.' ) { double fVal( static_cast( rVal ) ); fVal /= ( 1 << 20 ); fVal += 0.05; rtl::OUStringBuffer aVal( OUString::valueOf( fVal ) ); sal_Int32 nX( OUString( aVal.getStr() ).indexOf( '.', 0 ) ); - if ( nX > 0 ) + if ( nX >= 0 ) + { aVal.setLength( nX + 2 ); + aVal.setCharAt( nX, nSeparator ); + } aVal.append( OUString::createFromAscii( " MB" ) ); return aVal.makeStringAndClear(); } @@ -858,8 +861,12 @@ void OptimizerDialog::UpdateControlStatesPage4() } nEstimatedFileSize = static_cast< sal_Int64 >( fE ); } - setControlProperty( TKGet( TK_FixedText7Pg4 ), TKGet( TK_Label ), Any( ImpValueOfInMB( nCurrentFileSize ) ) ); - setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Label ), Any( ImpValueOfInMB( nEstimatedFileSize ) ) ); + sal_Unicode nSeparator = '.'; + OUString aStr( getString( STR_FILESIZESEPARATOR ) ); + if ( aStr.getLength() ) + nSeparator = aStr[ 0 ]; + setControlProperty( TKGet( TK_FixedText7Pg4 ), TKGet( TK_Label ), Any( ImpValueOfInMB( nCurrentFileSize, nSeparator ) ) ); + setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Label ), Any( ImpValueOfInMB( nEstimatedFileSize, nSeparator ) ) ); SetConfigProperty( TK_EstimatedFileSize, Any( nEstimatedFileSize ) ); } diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx index 0bf84ddb7ac0..4385c8384b69 100644 --- a/sdext/source/minimizer/pppoptimizertoken.cxx +++ b/sdext/source/minimizer/pppoptimizertoken.cxx @@ -4,9 +4,9 @@ * * $RCSfile: pppoptimizertoken.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sj $ $Date: 2007-08-15 16:38:45 $ + * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -306,6 +306,7 @@ static const TokenTable pTokenTableArray[] = { "STR_DELETING_SLIDES", STR_DELETING_SLIDES }, { "STR_OPTIMIZING_GRAPHICS", STR_OPTIMIZING_GRAPHICS }, { "STR_CREATING_OLE_REPLACEMENTS",STR_CREATING_OLE_REPLACEMENTS }, + { "STR_FileSizeSeparator", STR_FILESIZESEPARATOR }, { "Last", TK_Last }, { "NotFound", TK_NotFound } diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx index 3d29e60dc551..a182f0afc620 100644 --- a/sdext/source/minimizer/pppoptimizertoken.hxx +++ b/sdext/source/minimizer/pppoptimizertoken.hxx @@ -4,9 +4,9 @@ * * $RCSfile: pppoptimizertoken.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sj $ $Date: 2007-08-15 16:38:45 $ + * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -282,6 +282,7 @@ enum PPPOptimizerTokenEnum STR_DELETING_SLIDES, STR_OPTIMIZING_GRAPHICS, STR_CREATING_OLE_REPLACEMENTS, + STR_FILESIZESEPARATOR, TK_Last, TK_NotFound diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu index 80c5346b53ab..6da7aa124f38 100644 --- a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu +++ b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu @@ -299,6 +299,10 @@ Sun, Sun Microsystems, le logo Sun, Java et StarOffice sont des marques de fabri Creating replacement graphics for OLE objects... Ersatzdarstellungen für OLE-Objekte erzeugen... + + . + , + diff --git a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs index 8af140158551..68f45c7fc567 100644 --- a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs +++ b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs @@ -311,6 +311,9 @@ This distribution may include materials developed by third parties. Sun, Sun Mic Creating replacement graphics for OLE objects... + + . + -- cgit