You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2013/03/26 13:56:58 UTC
svn commit: r1461102 [2/4] - in /openoffice/trunk/main: ./
default_images/minimizer/ default_images/res/commandimagelist/
helpcontent2/prj/ helpcontent2/source/text/simpress/
helpcontent2/source/text/simpress/minimizer/ helpcontent2/util/simpress/
offi...
Modified: openoffice/trunk/main/sdext/source/minimizer/graphiccollector.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/graphiccollector.cxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/graphiccollector.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/graphiccollector.cxx Tue Mar 26 12:56:56 2013
@@ -35,6 +35,7 @@
#include "impoptimizer.hxx"
+using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
@@ -44,8 +45,6 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::presentation;
-using ::rtl::OUString;
-
const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentContext >& rxFact )
{
static DeviceInfo aDeviceInfo;
@@ -96,7 +95,7 @@ void ImpAddEntity( std::vector< GraphicC
}
}
-void ImpAddGraphicEntity( const Reference< XComponentContext >& rxContext, Reference< XShape >& rxShape, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
+void ImpAddGraphicEntity( const Reference< XComponentContext >& rxMSF, Reference< XShape >& rxShape, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
{
Reference< XGraphic > xGraphic;
Reference< XPropertySet > xShapePropertySet( rxShape, UNO_QUERY_THROW );
@@ -115,7 +114,7 @@ void ImpAddGraphicEntity( const Referenc
// calculating the logical size, as if there were no cropping
if ( aGraphicCropLogic.Left || aGraphicCropLogic.Right || aGraphicCropLogic.Top || aGraphicCropLogic.Bottom )
{
- awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
+ awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
if ( aSize100thMM.Width && aSize100thMM.Height )
{
awt::Size aCropSize( aSize100thMM.Width - ( aGraphicCropLogic.Left + aGraphicCropLogic.Right ),
@@ -134,7 +133,7 @@ void ImpAddGraphicEntity( const Referenc
}
}
-void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxContext, const Reference< XPropertySet >& rxPropertySet, const awt::Size& rLogicalSize,
+void ImpAddFillBitmapEntity( const Reference< XComponentContext >& rxMSF, const Reference< XPropertySet >& rxPropertySet, const awt::Size& rLogicalSize,
std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, const GraphicSettings& rGraphicSettings, const Reference< XPropertySet >& rxPagePropertySet )
{
try
@@ -172,7 +171,7 @@ void ImpAddFillBitmapEntity( const Refer
{
if ( !aSize.Width || !aSize.Height )
{
- awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
+ awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
if ( aSize100thMM.Width && aSize100thMM.Height )
aLogicalSize = aSize100thMM;
}
@@ -206,7 +205,7 @@ void ImpAddFillBitmapEntity( const Refer
}
}
-void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxContext, const Reference< XDrawPage >& rxDrawPage, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
+void ImpCollectBackgroundGraphic( const Reference< XComponentContext >& rxMSF, const Reference< XDrawPage >& rxDrawPage, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
{
try
{
@@ -217,14 +216,14 @@ void ImpCollectBackgroundGraphic( const
Reference< XPropertySet > xBackgroundPropSet;
if ( xPropertySet->getPropertyValue( TKGet( TK_Background ) ) >>= xBackgroundPropSet )
- ImpAddFillBitmapEntity( rxContext, xBackgroundPropSet, aLogicalSize, rGraphicEntities, rGraphicSettings, xPropertySet );
+ ImpAddFillBitmapEntity( rxMSF, xBackgroundPropSet, aLogicalSize, rGraphicEntities, rGraphicSettings, xPropertySet );
}
catch( Exception& )
{
}
}
-void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxContext, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
+void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxMSF, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities )
{
for ( sal_Int32 i = 0; i < rxShapes->getCount(); i++ )
{
@@ -237,18 +236,18 @@ void ImpCollectGraphicObjects( const Ref
if ( sShapeType == sGroupShape )
{
Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
- ImpCollectGraphicObjects( rxContext, xShapes, rGraphicSettings, rGraphicEntities );
+ ImpCollectGraphicObjects( rxMSF, xShapes, rGraphicSettings, rGraphicEntities );
continue;
}
if ( sShapeType == sGraphicObjectShape )
- ImpAddGraphicEntity( rxContext, xShape, rGraphicSettings, rGraphicEntities );
+ ImpAddGraphicEntity( rxMSF, xShape, rGraphicSettings, rGraphicEntities );
// now check for a fillstyle
Reference< XPropertySet > xEmptyPagePropSet;
Reference< XPropertySet > xShapePropertySet( xShape, UNO_QUERY_THROW );
awt::Size aLogicalSize( xShape->getSize() );
- ImpAddFillBitmapEntity( rxContext, xShapePropertySet, aLogicalSize, rGraphicEntities, rGraphicSettings, xEmptyPagePropSet );
+ ImpAddFillBitmapEntity( rxMSF, xShapePropertySet, aLogicalSize, rGraphicEntities, rGraphicSettings, xEmptyPagePropSet );
}
catch( Exception& )
{
@@ -256,7 +255,7 @@ void ImpCollectGraphicObjects( const Ref
}
}
-awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext >& rxContext, const Reference< XGraphic >& rxGraphic )
+awt::Size GraphicCollector::GetOriginalSize( const Reference< XComponentContext >& rxMSF, const Reference< XGraphic >& rxGraphic )
{
awt::Size aSize100thMM( 0, 0 );
Reference< XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
@@ -267,7 +266,7 @@ awt::Size GraphicCollector::GetOriginalS
awt::Size aSourceSizePixel( 0, 0 );
if ( xGraphicPropertySet->getPropertyValue( TKGet( TK_SizePixel ) ) >>= aSourceSizePixel )
{
- const DeviceInfo& rDeviceInfo( GraphicCollector::GetDeviceInfo( rxContext ) );
+ const DeviceInfo& rDeviceInfo( GraphicCollector::GetDeviceInfo( rxMSF ) );
if ( rDeviceInfo.PixelPerMeterX && rDeviceInfo.PixelPerMeterY )
{
aSize100thMM.Width = static_cast< sal_Int32 >( ( aSourceSizePixel.Width * 100000.0 ) / rDeviceInfo.PixelPerMeterX );
@@ -279,7 +278,7 @@ awt::Size GraphicCollector::GetOriginalS
return aSize100thMM;
}
-void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel,
+void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel,
const GraphicSettings& rGraphicSettings, std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
{
try
@@ -290,24 +289,24 @@ void GraphicCollector::CollectGraphics(
for ( i = 0; i < xDrawPages->getCount(); i++ )
{
Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
- ImpCollectBackgroundGraphic( rxContext, xDrawPage, rGraphicSettings, rGraphicList );
+ ImpCollectBackgroundGraphic( rxMSF, xDrawPage, rGraphicSettings, rGraphicList );
Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
- ImpCollectGraphicObjects( rxContext, xDrawShapes, rGraphicSettings, rGraphicList );
+ ImpCollectGraphicObjects( rxMSF, xDrawShapes, rGraphicSettings, rGraphicList );
Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
- ImpCollectBackgroundGraphic( rxContext, xNotesPage, rGraphicSettings, rGraphicList );
+ ImpCollectBackgroundGraphic( rxMSF, xNotesPage, rGraphicSettings, rGraphicList );
Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
- ImpCollectGraphicObjects( rxContext, xNotesShapes, rGraphicSettings, rGraphicList );
+ ImpCollectGraphicObjects( rxMSF, xNotesShapes, rGraphicSettings, rGraphicList );
}
Reference< XMasterPagesSupplier > xMasterPagesSupplier( rxModel, UNO_QUERY_THROW );
Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
for ( i = 0; i < xMasterPages->getCount(); i++ )
{
Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
- ImpCollectBackgroundGraphic( rxContext, xMasterPage, rGraphicSettings, rGraphicList );
+ ImpCollectBackgroundGraphic( rxMSF, xMasterPage, rGraphicSettings, rGraphicList );
Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
- ImpCollectGraphicObjects( rxContext, xMasterPageShapes, rGraphicSettings, rGraphicList );
+ ImpCollectGraphicObjects( rxMSF, xMasterPageShapes, rGraphicSettings, rGraphicList );
}
std::vector< GraphicCollector::GraphicEntity >::iterator aGraphicIter( rGraphicList.begin() );
@@ -349,7 +348,7 @@ void GraphicCollector::CollectGraphics(
}
}
-void ImpCountGraphicObjects( const Reference< XComponentContext >& rxContext, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
+void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const Reference< XShapes >& rxShapes, const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
{
for ( sal_Int32 i = 0; i < rxShapes->getCount(); i++ )
{
@@ -362,7 +361,7 @@ void ImpCountGraphicObjects( const Refer
if ( sShapeType == sGroupShape )
{
Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
- ImpCountGraphicObjects( rxContext, xShapes, rGraphicSettings, rnGraphics );
+ ImpCountGraphicObjects( rxMSF, xShapes, rGraphicSettings, rnGraphics );
continue;
}
@@ -391,7 +390,7 @@ void ImpCountGraphicObjects( const Refer
}
}
-void ImpCountBackgroundGraphic( const Reference< XComponentContext >& /* rxContext */, const Reference< XDrawPage >& rxDrawPage,
+void ImpCountBackgroundGraphic( const Reference< XComponentContext >& /* rxMSF */, const Reference< XDrawPage >& rxDrawPage,
const GraphicSettings& /* rGraphicSettings */, sal_Int32& rnGraphics )
{
try
@@ -419,7 +418,7 @@ void ImpCountBackgroundGraphic( const Re
}
}
-void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel,
+void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel,
const GraphicSettings& rGraphicSettings, sal_Int32& rnGraphics )
{
try
@@ -430,24 +429,24 @@ void GraphicCollector::CountGraphics( co
for ( i = 0; i < xDrawPages->getCount(); i++ )
{
Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
- ImpCountBackgroundGraphic( rxContext, xDrawPage, rGraphicSettings, rnGraphics );
+ ImpCountBackgroundGraphic( rxMSF, xDrawPage, rGraphicSettings, rnGraphics );
Reference< XShapes > xDrawShapes( xDrawPage, UNO_QUERY_THROW );
- ImpCountGraphicObjects( rxContext, xDrawShapes, rGraphicSettings, rnGraphics );
+ ImpCountGraphicObjects( rxMSF, xDrawShapes, rGraphicSettings, rnGraphics );
Reference< XPresentationPage > xPresentationPage( xDrawPage, UNO_QUERY_THROW );
Reference< XDrawPage > xNotesPage( xPresentationPage->getNotesPage() );
- ImpCountBackgroundGraphic( rxContext, xNotesPage, rGraphicSettings, rnGraphics );
+ ImpCountBackgroundGraphic( rxMSF, xNotesPage, rGraphicSettings, rnGraphics );
Reference< XShapes > xNotesShapes( xNotesPage, UNO_QUERY_THROW );
- ImpCountGraphicObjects( rxContext, xNotesShapes, rGraphicSettings, rnGraphics );
+ ImpCountGraphicObjects( rxMSF, xNotesShapes, rGraphicSettings, rnGraphics );
}
Reference< XMasterPagesSupplier > xMasterPagesSupplier( rxModel, UNO_QUERY_THROW );
Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
for ( i = 0; i < xMasterPages->getCount(); i++ )
{
Reference< XDrawPage > xMasterPage( xMasterPages->getByIndex( i ), UNO_QUERY_THROW );
- ImpCountBackgroundGraphic( rxContext, xMasterPage, rGraphicSettings, rnGraphics );
+ ImpCountBackgroundGraphic( rxMSF, xMasterPage, rGraphicSettings, rnGraphics );
Reference< XShapes > xMasterPageShapes( xMasterPage, UNO_QUERY_THROW );
- ImpCountGraphicObjects( rxContext, xMasterPageShapes, rGraphicSettings, rnGraphics );
+ ImpCountGraphicObjects( rxMSF, xMasterPageShapes, rGraphicSettings, rnGraphics );
}
}
catch ( Exception& )
Modified: openoffice/trunk/main/sdext/source/minimizer/graphiccollector.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/graphiccollector.hxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/graphiccollector.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/graphiccollector.hxx Tue Mar 26 12:56:56 2013
@@ -82,14 +82,14 @@ class GraphicCollector
};
static const com::sun::star::awt::DeviceInfo& GetDeviceInfo( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxFact );
- static com::sun::star::awt::Size GetOriginalSize( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
+ static com::sun::star::awt::Size GetOriginalSize( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
const com::sun::star::uno::Reference< com::sun::star::graphic::XGraphic >& rxGraphic );
// collecting graphic instances, the downside of this method is that every graphic is swapped in
- static void CollectGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
+ static void CollectGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
const GraphicSettings& rGraphicSettings, std::vector< GraphicEntity >& io_rGraphicList );
// counting graphics without swapping in graphics
- static void CountGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
+ static void CountGraphics( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel,
const GraphicSettings& rGraphicSettings, sal_Int32& rGraphics );
};
Modified: openoffice/trunk/main/sdext/source/minimizer/impoptimizer.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/impoptimizer.cxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/impoptimizer.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/impoptimizer.cxx Tue Mar 26 12:56:56 2013
@@ -30,8 +30,8 @@
#include "pagecollector.hxx"
#include "informationdialog.hxx"
-#include "minimizer.hrc"
-
+#include <unotools/localfilehelper.hxx>
+#include <unotools/processfactory.hxx>
#include <vector>
#include "com/sun/star/util/URL.hpp"
#include "com/sun/star/util/XURLTransformer.hpp"
@@ -43,9 +43,12 @@
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/frame/XStorable.hpp>
+#ifndef _COM_SUN_STAR_FRAME_FrameSearchFlag_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
+#include <unotools/configmgr.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
@@ -58,7 +61,9 @@
#include <com/sun/star/presentation/XPresentationPage.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
+#ifndef _COM_SUN_STAR_UNO_RUNTIME_EXCEPTION_HPP_
#include <com/sun/star/uno/RuntimeException.hpp>
+#endif
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/graphic/GraphicType.hpp>
@@ -68,6 +73,7 @@
#include <com/sun/star/util/URL.hpp>
using namespace ::std;
+using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::awt;
@@ -82,8 +88,6 @@ using namespace ::com::sun::star::docume
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::presentation;
-using ::rtl::OUString;
-
void ImpExtractCustomShow( const Reference< XModel >& rxModel, const OUString& rCustomShowName )
{
vector< Reference< XDrawPage > > vNonUsedPageList;
@@ -262,7 +266,7 @@ void ImpCompressGraphic( Reference< XGra
}
}
-Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& rxContext,
+Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& rxMSF,
const Reference< XGraphic >& xGraphic, const awt::Size& aLogicalSize, const text::GraphicCrop& aGraphicCropLogic,
const GraphicSettings& rGraphicSettings )
{
@@ -297,7 +301,7 @@ Reference< XGraphic > ImpCompressGraphic
// cropping has to be removed from SourceSizePixel
if ( aGraphicCropLogic.Left || aGraphicCropLogic.Top || aGraphicCropLogic.Right || aGraphicCropLogic.Bottom )
{
- const awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
+ const awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
if ( bRemoveCropArea )
bNeedsOptimizing = sal_True;
@@ -346,9 +350,9 @@ Reference< XGraphic > ImpCompressGraphic
}
if ( bNeedsOptimizing && aDestSizePixel.Width && aDestSizePixel.Height )
{
- Reference< XStream > xTempFile( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxContext ), UNO_QUERY_THROW );
+ Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW );
Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
- Reference< XGraphicProvider > xGraphicProvider( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxContext ), UNO_QUERY_THROW );
+ Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW );
ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, bRemoveCropArea, aGraphicCropLogic );
Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
@@ -366,9 +370,9 @@ Reference< XGraphic > ImpCompressGraphic
else // this is a metafile
{
rtl::OUString aDestMimeType( aSourceMimeType );
- Reference< XStream > xTempFile( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxContext ), UNO_QUERY_THROW );
+ Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW );
Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() );
- Reference< XGraphicProvider > xGraphicProvider( rxContext->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxContext ), UNO_QUERY_THROW );
+ Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW );
ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, sal_False, aGraphicCropLogic );
Reference< XInputStream > xInputStream( xTempFile->getInputStream() );
Reference< XSeekable > xSeekable( xInputStream, UNO_QUERY_THROW );
@@ -386,7 +390,7 @@ Reference< XGraphic > ImpCompressGraphic
return xNewGraphic;
}
-void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentContext >& rxContext, const GraphicSettings& rGraphicSettings,
+void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentContext >& rxMSF, const GraphicSettings& rGraphicSettings,
std::vector< GraphicCollector::GraphicEntity >& rGraphicList )
{
try
@@ -421,8 +425,8 @@ void CompressGraphics( ImpOptimizer& rOp
if ( xGraphic.is() )
{
Reference< XPropertySet > xNewGraphicPropertySet( xGraphic, UNO_QUERY_THROW );
- awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxContext, xGraphic ) );
- Reference< XGraphic > xNewGraphic( ImpCompressGraphic( rxContext, xGraphic, aGraphicIter->maLogicalSize, aGraphicIter->maGraphicCropLogic, aGraphicSettings ) );
+ awt::Size aSize100thMM( GraphicCollector::GetOriginalSize( rxMSF, xGraphic ) );
+ Reference< XGraphic > xNewGraphic( ImpCompressGraphic( rxMSF, xGraphic, aGraphicIter->maLogicalSize, aGraphicIter->maGraphicCropLogic, aGraphicSettings ) );
if ( xNewGraphic.is() )
{
// applying graphic to each user
@@ -442,7 +446,7 @@ void CompressGraphics( ImpOptimizer& rOp
text::GraphicCrop aGraphicCropLogic( 0, 0, 0, 0 );
if ( !aGraphicSettings.mbRemoveCropArea )
{
- awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxContext, xNewGraphic ) );
+ awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxMSF, xNewGraphic ) );
aGraphicCropLogic.Left = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Left * ((double)aNewSize.Width / (double)aSize100thMM.Width));
aGraphicCropLogic.Top = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Top * ((double)aNewSize.Height / (double)aSize100thMM.Height));
aGraphicCropLogic.Right = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Right * ((double)aNewSize.Width / (double)aSize100thMM.Width));
@@ -493,8 +497,8 @@ void CompressGraphics( ImpOptimizer& rOp
// - ImpOptimizer -
// ----------------
-ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxContext, const Reference< XModel >& rxModel ) :
- mxContext ( rxContext ),
+ImpOptimizer::ImpOptimizer( const Reference< XComponentContext >& rxMSF, const Reference< XModel >& rxModel ) :
+ mxMSF ( rxMSF ),
mxModel ( rxModel ),
mbJPEGCompression ( sal_False ),
mnJPEGQuality ( 90 ),
@@ -508,35 +512,30 @@ ImpOptimizer::ImpOptimizer( const Refere
mbDeleteNotesPages ( sal_False ),
mbOpenNewDocument ( sal_True )
{
- OSL_TRACE("ImpOptimizer::ImpOptimizer");
- Reference< XController > xController( mxModel->getCurrentController() );
- if (xController.is() )
- mxFrame.set( xController->getFrame() );
}
// -----------------------------------------------------------------------------
ImpOptimizer::~ImpOptimizer()
{
- OSL_TRACE("ImpOptimizer::~ImpOptimizer");
}
// -----------------------------------------------------------------------------
void ImpOptimizer::DispatchStatus()
{
- if ( mxStatusListener.is() )
+ if ( mxStatusDispatcher.is() )
{
- FeatureStateEvent aState;
- aState.IsEnabled = sal_True;
- aState.State <<= GetStatusSequence();
- mxStatusListener->statusChanged( aState );
+ URL aURL;
+ aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) );
+ aURL.Path = OUString( RTL_CONSTASCII_USTRINGPARAM( "statusupdate" ) );
+ mxStatusDispatcher->dispatch( aURL, GetStatusSequence() );
}
}
// -----------------------------------------------------------------------------
-sal_Bool ImpOptimizer::ImplOptimize()
+sal_Bool ImpOptimizer::Optimize()
{
if ( maCustomShowName.getLength() )
@@ -545,7 +544,7 @@ sal_Bool ImpOptimizer::ImplOptimize()
if ( mbDeleteUnusedMasterPages )
{
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 40 ) ) );
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DELETING_SLIDES ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_DELETING_SLIDES ) ) );
DispatchStatus();
ImpDeleteUnusedMasterPages( mxModel );
}
@@ -553,14 +552,14 @@ sal_Bool ImpOptimizer::ImplOptimize()
if ( mbDeleteHiddenSlides )
{
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 40 ) ) );
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DELETING_SLIDES ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_DELETING_SLIDES ) ) );
DispatchStatus();
ImpDeleteHiddenSlides( mxModel );
}
if ( mbDeleteNotesPages )
{
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DELETING_SLIDES ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_DELETING_SLIDES ) ) );
DispatchStatus();
ImpDeleteNotesPages( mxModel );
}
@@ -568,7 +567,7 @@ sal_Bool ImpOptimizer::ImplOptimize()
if ( mbOLEOptimization )
{
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 45 ) ) );
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_CREATING_OLE_REPLACEMENTS ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_CREATING_OLE_REPLACEMENTS ) ) );
DispatchStatus();
ImpConvertOLE( mxModel, mnOLEOptimizationType );
}
@@ -576,13 +575,13 @@ sal_Bool ImpOptimizer::ImplOptimize()
if ( mbJPEGCompression || mbRemoveCropArea || mnImageResolution )
{
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 50 ) ) );
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_OPTIMIZING_GRAPHICS ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_OPTIMIZING_GRAPHICS ) ) );
DispatchStatus();
std::vector< GraphicCollector::GraphicEntity > aGraphicList;
GraphicSettings aGraphicSettings( mbJPEGCompression, mnJPEGQuality, mbRemoveCropArea, mnImageResolution, mbEmbedLinkedGraphics );
- GraphicCollector::CollectGraphics( mxContext, mxModel, aGraphicSettings, aGraphicList );
- CompressGraphics( *this, mxContext, aGraphicSettings, aGraphicList );
+ GraphicCollector::CollectGraphics( mxMSF, mxModel, aGraphicSettings, aGraphicList );
+ CompressGraphics( *this, mxMSF, aGraphicSettings, aGraphicList );
}
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 100 ) ) );
DispatchStatus();
@@ -613,12 +612,10 @@ static void DispatchURL( Reference< XCom
sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
{
- OSL_TRACE("ImpOptimizer::Optimize");
sal_Bool bRet = sal_True;
if ( mxModel.is() )
{
- Reference< XWindowPeer > xParentWindow;
sal_Int64 nEstimatedFileSize = 0;
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 0 ) ) );
DispatchStatus();
@@ -628,8 +625,8 @@ sal_Bool ImpOptimizer::Optimize( const S
{
switch( TKGet( rArguments[ i ].Name ) )
{
- case TK_StatusListener : rArguments[ i ].Value >>= mxStatusListener; break;
- case TK_ParentWindow: rArguments[ i ].Value >>= xParentWindow; break;
+ case TK_StatusDispatcher : rArguments[ i ].Value >>= mxStatusDispatcher; break;
+ case TK_InformationDialog: rArguments[ i ].Value >>= mxInformationDialog; break;
case TK_Settings :
{
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aSettings;
@@ -671,7 +668,7 @@ sal_Bool ImpOptimizer::Optimize( const S
{
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 10 ) ) );
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DUPLICATING_PRESENTATION ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_DUPLICATING_PRESENTATION ) ) );
DispatchStatus();
Reference< XStorable >xStorable( mxModel, UNO_QUERY );
@@ -693,11 +690,11 @@ sal_Bool ImpOptimizer::Optimize( const S
nSourceSize = PPPOptimizer::GetFileSize( maSaveAsURL );
SetStatusValue( TK_Progress, Any( static_cast< sal_Int32 >( 30 ) ) );
- SetStatusValue( TK_Status, Any( ConfigurationAccess::getString( STR_DUPLICATING_PRESENTATION ) ) );
+ SetStatusValue( TK_Status, Any( TKGet( STR_DUPLICATING_PRESENTATION ) ) );
DispatchStatus();
- Reference< XDesktop > xDesktop( mxContext->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ), mxContext ), UNO_QUERY );
+ Reference< XDesktop > xDesktop( mxMSF->getServiceManager()->createInstanceWithContext(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ), mxMSF ), UNO_QUERY );
Reference< XFrame > xFrame( xDesktop, UNO_QUERY );
xSelf = xFrame->findFrame( TKGet( TK__blank ), FrameSearchFlag::CREATE );
Reference< XComponentLoader > xComponentLoader( xSelf, UNO_QUERY );
@@ -715,15 +712,15 @@ sal_Bool ImpOptimizer::Optimize( const S
if ( xStorable.is() && !xStorable->isReadonly() )
{
mxModel->lockControllers();
- bRet = ImplOptimize();
+ bRet = Optimize();
mxModel->unlockControllers();
// clearing undo stack:
- Reference< XFrame > xFrame( mxFrame );
+ Reference< XFrame > xFrame( xSelf.is() ? xSelf : mxInformationDialog );
if ( xFrame.is() )
{
const OUString sSlot( RTL_CONSTASCII_USTRINGPARAM( "slot:27115" ) );
- DispatchURL( mxContext, sSlot, xFrame );
+ DispatchURL( mxMSF, sSlot, xFrame );
}
}
@@ -736,11 +733,9 @@ sal_Bool ImpOptimizer::Optimize( const S
}
}
- if ( xParentWindow.is() )
+ if ( mxInformationDialog.is() )
{
- InformationDialog aInformationDialog(
- mxContext, xParentWindow, maSaveAsURL, mbOpenNewDocument,
- nSourceSize, nDestSize, nEstimatedFileSize );
+ InformationDialog aInformationDialog( mxMSF, mxInformationDialog, maSaveAsURL, mbOpenNewDocument, nSourceSize, nDestSize, nEstimatedFileSize );
aInformationDialog.execute();
SetStatusValue( TK_OpenNewDocument, Any( mbOpenNewDocument ) );
DispatchStatus();
Modified: openoffice/trunk/main/sdext/source/minimizer/impoptimizer.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/impoptimizer.hxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/impoptimizer.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/impoptimizer.hxx Tue Mar 26 12:56:56 2013
@@ -35,7 +35,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/awt/XWindowPeer.hpp>
class Point;
class Size;
@@ -48,9 +47,9 @@ class ImpOptimizer : public Optimization
{
private:
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
- com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > mxStatusListener;
+ com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > mxStatusDispatcher;
sal_Bool mbJPEGCompression;
sal_Int32 mnJPEGQuality;
@@ -67,9 +66,9 @@ private:
rtl::OUString maFilterName;
sal_Bool mbOpenNewDocument;
- com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
+ com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxInformationDialog;
- sal_Bool ImplOptimize();
+ sal_Bool Optimize();
public:
Modified: openoffice/trunk/main/sdext/source/minimizer/informationdialog.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/informationdialog.cxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/informationdialog.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/informationdialog.cxx Tue Mar 26 12:56:56 2013
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,38 +7,31 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
+
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sdext.hxx"
#include "informationdialog.hxx"
#include "optimizationstats.hxx"
-#include "minimizer.hrc"
-#include "helpid.hrc"
-
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <com/sun/star/awt/XUnitConversion.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
-#include <com/sun/star/graphic/GraphicType.hpp>
#include <rtl/ustrbuf.hxx>
#include "com/sun/star/util/URL.hpp"
#include "com/sun/star/util/XURLTransformer.hpp"
-#include <com/sun/star/util/MeasureUnit.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
#define DIALOG_WIDTH 240
#define DIALOG_HEIGHT 80
@@ -50,6 +43,7 @@
// - INFORMATIONDIALOG -
// ---------------------
+using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::ui;
@@ -62,19 +56,12 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::script;
using namespace ::com::sun::star::container;
-using ::rtl::OUString;
+
// -----------------------------------------------------------------------------
-Reference< XFixedText > InformationDialog::InsertFixedText(
- const rtl::OUString& rControlName,
- const OUString& rLabel,
- sal_Int32 nXPos,
- sal_Int32 nYPos,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Bool bMultiLine,
- sal_Int16 nTabIndex )
+rtl::OUString InsertFixedText( InformationDialog& rInformationDialog, const rtl::OUString& rControlName, const OUString& rLabel,
+ sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
{
OUString pNames[] = {
TKGet( TK_Height ),
@@ -101,10 +88,12 @@ Reference< XFixedText > InformationDialo
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
- return insertFixedText( rControlName, aNames, aValues );
+ rInformationDialog.insertFixedText( rControlName, aNames, aValues );
+ return rControlName;
}
-Reference< XControl > InformationDialog::InsertImage(
+rtl::OUString InsertImage(
+ InformationDialog& rInformationDialog,
const OUString& rControlName,
const OUString& rURL,
sal_Int32 nPosX,
@@ -135,23 +124,17 @@ Reference< XControl > InformationDialog:
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
- return insertImage( rControlName, aNames, aValues );
+ rInformationDialog.insertImage( rControlName, aNames, aValues );
+ return rControlName;
}
-Reference< XCheckBox > InformationDialog::InsertCheckBox(
- const OUString& rControlName,
- const OUString& rLabel,
- const OUString& rHelpURL,
- sal_Int32 nXPos,
- sal_Int32 nYPos,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Int16 nTabIndex )
+rtl::OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString& rControlName,
+ const Reference< XItemListener > xItemListener, const OUString& rLabel,
+ sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
{
OUString pNames[] = {
TKGet( TK_Enabled ),
TKGet( TK_Height ),
- TKGet( TK_HelpURL ),
TKGet( TK_Label ),
TKGet( TK_PositionX ),
TKGet( TK_PositionY ),
@@ -162,7 +145,6 @@ Reference< XCheckBox > InformationDialog
Any pValues[] = {
Any( sal_True ),
Any( nHeight ),
- Any( rHelpURL ),
Any( rLabel ),
Any( nXPos ),
Any( nYPos ),
@@ -175,17 +157,14 @@ Reference< XCheckBox > InformationDialog
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
- return insertCheckBox( rControlName, aNames, aValues );
+ Reference< XCheckBox > xCheckBox( rInformationDialog.insertCheckBox( rControlName, aNames, aValues ) );
+ if ( xItemListener.is() )
+ xCheckBox->addItemListener( xItemListener );
+ return rControlName;
}
-Reference< XButton > InformationDialog::InsertButton(
- const OUString& rControlName,
- sal_Int32 nXPos,
- sal_Int32 nYPos,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Int16 nTabIndex,
- sal_Int32 nResID )
+rtl::OUString InsertButton( InformationDialog& rInformationDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener,
+ sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, PPPOptimizerTokenEnum nResID )
{
OUString pNames[] = {
TKGet( TK_Enabled ),
@@ -201,7 +180,7 @@ Reference< XButton > InformationDialog::
Any pValues[] = {
Any( sal_True ),
Any( nHeight ),
- Any( getString( nResID ) ),
+ Any( rInformationDialog.getString( nResID ) ),
Any( nXPos ),
Any( nYPos ),
Any( static_cast< sal_Int16 >( PushButtonType_OK ) ),
@@ -215,7 +194,8 @@ Reference< XButton > InformationDialog::
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
- return insertButton( rControlName, Reference< XActionListener >(), aNames, aValues );
+ rInformationDialog.insertButton( rControlName, xActionListener, aNames, aValues );
+ return rControlName;
}
@@ -241,7 +221,6 @@ void InformationDialog::InitDialog()
OUString pNames[] = {
TKGet( TK_Closeable ),
TKGet( TK_Height ),
- TKGet( TK_HelpURL ),
TKGet( TK_Moveable ),
TKGet( TK_PositionX ),
TKGet( TK_PositionY ),
@@ -251,11 +230,10 @@ void InformationDialog::InitDialog()
Any pValues[] = {
Any( sal_True ),
Any( nDialogHeight ),
- Any( HID( HID_SDEXT_MINIMIZER_INFOBOX_DLG ) ),
Any( sal_True ),
Any( sal_Int32( 245 ) ),
Any( sal_Int32( 115 ) ),
- Any( getString( STR_INFO_DIALOG ) ),
+ Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
Any( sal_Int32( DIALOG_WIDTH ) ) };
sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
@@ -268,30 +246,30 @@ void InformationDialog::InitDialog()
sal_Int64 nSource = mnSourceSize;
sal_Int64 nDest = mnDestSize;
- sal_Int32 nInfoStrResId( STR_INFO_1 );
+ PPPOptimizerTokenEnum eInfoString( STR_INFO_1 );
if ( mnSourceSize )
{
if ( mnDestSize )
- nInfoStrResId = STR_INFO_1;
+ eInfoString = STR_INFO_1;
else
{
- nInfoStrResId = STR_INFO_2;
+ eInfoString = STR_INFO_2;
nDest = mnApproxSize;
}
}
else if ( mnDestSize )
- nInfoStrResId = STR_INFO_3;
+ eInfoString = STR_INFO_3;
else
{
- nInfoStrResId = STR_INFO_4;
+ eInfoString = STR_INFO_4;
nDest = mnApproxSize;
}
rtl::OUString aTitle;
if ( maSaveAsURL.getLength() )
{
- Reference< XURLTransformer > xURLTransformer( mxContext->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ), mxContext ), UNO_QUERY );
+ Reference< XURLTransformer > xURLTransformer( mxMSF->getServiceManager()->createInstanceWithContext(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ), mxMSF ), UNO_QUERY );
if ( xURLTransformer.is() )
{
util::URL aURL, aPresentationURL;
@@ -307,7 +285,7 @@ void InformationDialog::InitDialog()
}
}
- OUString aInfoString( getString( nInfoStrResId ) );
+ OUString aInfoString( getString( eInfoString ) );
const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) );
const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) );
const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) );
@@ -324,106 +302,38 @@ void InformationDialog::InitDialog()
if ( k >= 0 )
aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle );
-
- Reference< XControl > xImageCtrl = InsertImage( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "aboutimage" ) ),
+ com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener;
+ InsertImage( *this,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "aboutimage" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:standardimage/query" ) ),
- 3, 3, 25, 25, sal_False );
- Reference< XControl > xFixedText( InsertFixedText( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ), UNO_QUERY);
-
+ 5, 5, 25, 25, sal_False );
+ InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 );
if ( maSaveAsURL.getLength() )
- mxCheckBox = InsertCheckBox( TKGet( TK_OpenNewDocument ),
- getString( STR_AUTOMATICALLY_OPEN ),
- HID( HID_SDEXT_MINIMIZER_INFOBOX_CB_OPENNEW ),
- PAGE_POS_X, 42,
- PAGE_WIDTH, 8, 1 );
- Reference< XControl> xButtonCtrl( InsertButton( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "button" ) ), DIALOG_WIDTH / 2 - 15, nDialogHeight - 20, 30, 14, 2, STR_OK ), UNO_QUERY );
+ InsertCheckBox( *this, TKGet( TK_OpenNewDocument ), xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 );
+ InsertButton( *this, rtl::OUString( rtl::OUString::createFromAscii( "button" ) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK );
sal_Bool bOpenNewDocument = mrbOpenNewDocument;
setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) );
-
- sal_Int32 nX, nY, nDlgWidth;
- Size aSize3( 3, 3 );
- Reference< XUnitConversion > xUnitConverter( mxDialogWindow, UNO_QUERY_THROW );
- aSize3 = xUnitConverter->convertSizeToPixel( aSize3, util::MeasureUnit::APPFONT );
- nX = nY = aSize3.Width;
-
- Reference< XPropertySet > xImageProps (xImageCtrl->getModel(), UNO_QUERY_THROW );
- Reference< graphic::XGraphic > xGraphic(
- xImageProps->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic") ) ), UNO_QUERY_THROW );
- if ( xGraphic.is() && xGraphic->getType() != graphic::GraphicType::EMPTY )
- {
- Size aSizePixel;
- Rectangle aPosSizePixel;
- Reference< XPropertySet > xGraphicProps( xGraphic, UNO_QUERY_THROW );
- xGraphicProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SizePixel"))) >>= aSizePixel;
- Reference< XWindow > xImage (xImageCtrl->getPeer(), UNO_QUERY_THROW );
-
- xImage->setPosSize( nX, nY,
- aSizePixel.Width,
- aSizePixel.Height,
- awt::PosSize::POSSIZE );
-
- nX += aSizePixel.Width + aSize3.Width;
-
- Reference< XWindow > xLabel ( xFixedText->getPeer(), UNO_QUERY_THROW );
- aPosSizePixel = xLabel->getPosSize();
- xLabel->setPosSize( nX, nY,
- aPosSizePixel.Width,
- aPosSizePixel.Height,
- awt::PosSize::POSSIZE );
-
- nDlgWidth = nX + aPosSizePixel.Width + aSize3.Width;
- nY += aPosSizePixel.Height + aSize3.Height;
-
- if ( mxCheckBox.is() )
- {
- Reference< XControl > xCheckBoxCtrl( mxCheckBox, UNO_QUERY_THROW );
- Reference< XWindow > xCheckBox( xCheckBoxCtrl->getPeer(), UNO_QUERY_THROW );
- Rectangle aCBSize = xCheckBox->getPosSize();
- xCheckBox->setPosSize( nX, nY,
- aPosSizePixel.Width,
- aCBSize.Height ,
- awt::PosSize::POSSIZE);
- nY += aCBSize.Height + aSize3.Height;
- }
-
- nY += aSize3.Height;
- Reference< XWindow > xButton ( xButtonCtrl->getPeer(), UNO_QUERY_THROW );
- aPosSizePixel = xButton->getPosSize();
- xButton->setPosSize( nDlgWidth / 2 - aPosSizePixel.Width / 2,
- nY ,
- aPosSizePixel.Width,
- aPosSizePixel.Height,
- awt::PosSize::POSSIZE );
- nY += aPosSizePixel.Height + aSize3.Height;
- mxDialogWindow->setPosSize( 0, 0, nDlgWidth, nY, awt::PosSize::SIZE );
- }
-
- centerDialog();
}
// -----------------------------------------------------------------------------
-InformationDialog::InformationDialog(
- const Reference< XComponentContext > &rxContext,
- const Reference< XWindowPeer>& rxParent,
- const rtl::OUString& rSaveAsURL,
- sal_Bool& rbOpenNewDocument,
- const sal_Int64& rSourceSize,
- const sal_Int64& rDestSize,
- const sal_Int64& rApproxSize )
-: UnoDialog( rxContext, rxParent ),
- ConfigurationAccess( rxContext, NULL ),
- mxContext( rxContext ),
+InformationDialog::InformationDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame, const rtl::OUString& rSaveAsURL, sal_Bool& rbOpenNewDocument, const sal_Int64& rSourceSize, const sal_Int64& rDestSize, const sal_Int64& rApproxSize ) :
+ UnoDialog( rxMSF, rxFrame ),
+ ConfigurationAccess( rxMSF, NULL ),
+ mxMSF( rxMSF ),
+ mxFrame( rxFrame ),
+ mxActionListener( new OKActionListener( *this ) ),
mnSourceSize( rSourceSize ),
mnDestSize( rDestSize ),
mnApproxSize( rApproxSize ),
mrbOpenNewDocument( rbOpenNewDocument ),
maSaveAsURL( rSaveAsURL )
{
- OSL_TRACE( "InformationDialog::InformationDialog" );
- createWindowPeer();
+ Reference< XFrame > xFrame( mxController->getFrame() );
+ Reference< XWindow > xContainerWindow( xFrame->getContainerWindow() );
+ Reference< XWindowPeer > xWindowPeer( xContainerWindow, UNO_QUERY_THROW );
+ createWindowPeer( xWindowPeer );
InitDialog();
}
@@ -432,23 +342,38 @@ InformationDialog::InformationDialog(
InformationDialog::~InformationDialog()
{
- OSL_TRACE( "InformationDialog::~InformationDialog" );
}
// -----------------------------------------------------------------------------
sal_Bool InformationDialog::execute()
{
- OSL_TRACE( "InformationDialog::execute" );
UnoDialog::execute();
- if ( maSaveAsURL.getLength() && mxCheckBox.is() )
+ if ( maSaveAsURL.getLength() )
{
- sal_Bool bOpenNewDocument = static_cast< sal_Bool >( mxCheckBox->getState() );
- mrbOpenNewDocument = bOpenNewDocument;
+ sal_Int16 nInt16 = 0;
+ Any aAny( getControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ) ) );
+ if ( aAny >>= nInt16 )
+ {
+ sal_Bool bOpenNewDocument = static_cast< sal_Bool >( nInt16 );
+ mrbOpenNewDocument = bOpenNewDocument;
+ }
}
-
- endExecute( sal_True );
return mbStatus;
}
+// -----------------------------------------------------------------------------
+
+void OKActionListener::actionPerformed( const ActionEvent& rEvent )
+ throw ( com::sun::star::uno::RuntimeException )
+{
+ if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString::createFromAscii( "button" ) ) )
+ {
+ mrInformationDialog.endExecute( sal_True );
+ }
+}
+void OKActionListener::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
+ throw ( com::sun::star::uno::RuntimeException )
+{
+}
Modified: openoffice/trunk/main/sdext/source/minimizer/informationdialog.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/informationdialog.hxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/informationdialog.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/informationdialog.hxx Tue Mar 26 12:56:56 2013
@@ -46,68 +46,49 @@
// ---------------------
// - InformationDialog -
// ---------------------
-
-class InformationDialog : public UnoDialog
- , public ConfigurationAccess
+class InformationDialog : public UnoDialog, public ConfigurationAccess
{
public :
- InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
- const com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rxParent,
- const rtl::OUString& rSaveAsURL,
- sal_Bool& bOpenNewDocument,
- const sal_Int64& nSourceSize,
- const sal_Int64& nDestSize,
- const sal_Int64& nApproxDest );
+ InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
+ com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const rtl::OUString& rSaveAsURL,
+ sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
~InformationDialog();
sal_Bool execute();
+
private :
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
- sal_Int64 mnSourceSize;
- sal_Int64 mnDestSize;
- sal_Int64 mnApproxSize;
- sal_Bool& mrbOpenNewDocument;
- const rtl::OUString& maSaveAsURL;
- com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > mxCheckBox;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
+ com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
+ com::sun::star::uno::Reference< com::sun::star::io::XStream > mxTempFile;
+
+ com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
void InitDialog();
- com::sun::star::uno::Reference< com::sun::star::awt::XFixedText > InsertFixedText(
- const rtl::OUString& rControlName,
- const rtl::OUString& rLabel,
- sal_Int32 nXPos,
- sal_Int32 nYPos,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Bool bMultiLine,
- sal_Int16 nTabIndex );
- com::sun::star::uno::Reference< com::sun::star::awt::XControl > InsertImage(
- const rtl::OUString& rControlName,
- const rtl::OUString& rURL,
- sal_Int32 nPosX,
- sal_Int32 nPosY,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Bool bScale );
- com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > InsertCheckBox(
- const rtl::OUString& rControlName,
- const rtl::OUString& rLabel,
- const rtl::OUString& rHelpURL,
- sal_Int32 nXPos,
- sal_Int32 nYPos,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Int16 nTabIndex );
- com::sun::star::uno::Reference< com::sun::star::awt::XButton > InsertButton(
- const rtl::OUString& rControlName,
- sal_Int32 nXPos,
- sal_Int32 nYPos,
- sal_Int32 nWidth,
- sal_Int32 nHeight,
- sal_Int16 nTabIndex,
- sal_Int32 nResID );
+ sal_Int64 mnSourceSize;
+ sal_Int64 mnDestSize;
+ sal_Int64 mnApproxSize;
+ sal_Bool& mrbOpenNewDocument;
+ const rtl::OUString& maSaveAsURL;
+
+public :
+
+ com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
+ const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
+};
+
+class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
+{
+public:
+ OKActionListener( InformationDialog& rInformationDialog ) : mrInformationDialog( rInformationDialog ){};
+
+ virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
+private:
+
+ InformationDialog& mrInformationDialog;
};
#endif
Modified: openoffice/trunk/main/sdext/source/minimizer/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/makefile.mk?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/makefile.mk (original)
+++ openoffice/trunk/main/sdext/source/minimizer/makefile.mk Tue Mar 26 12:56:56 2013
@@ -1,5 +1,5 @@
#**************************************************************
-#
+#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -7,91 +7,143 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#
+#
#**************************************************************
+
+
PRJ=..$/..
PRJNAME=sdext
-TARGET=PresentationMinimizer
-EXTENSIONNAME=$(TARGET)
-
+TARGET=SunPresentationMinimizer
GEN_HID=FALSE
ENABLE_EXCEPTIONS=TRUE
# --- Settings ----------------------------------
.INCLUDE : settings.mk
-
.IF "$(L10N_framework)"==""
+.INCLUDE : $(PRJ)$/source$/minimizer$/minimizer.pmk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+# set in minimizer.pmk
+#EXTENSIONNAME:=PresentationMinimizer
+EXTENSION_ZIPNAME:=presentation-minimizer
+
+.IF "$(ENABLE_MINIMIZER)" != "YES"
+@all:
+ @echo "Presentation Minimizer build disabled."
+.ENDIF
DLLPRE=
# --- Files -------------------------------------
-SLOFILES=\
- $(SLO)$/unodialog.obj \
- $(SLO)$/optimizerdialog.obj \
- $(SLO)$/informationdialog.obj \
- $(SLO)$/fileopendialog.obj \
- $(SLO)$/optimizerdialogcontrols.obj \
- $(SLO)$/configurationaccess.obj \
- $(SLO)$/impoptimizer.obj \
- $(SLO)$/pppoptimizer.obj \
- $(SLO)$/pppoptimizeruno.obj \
- $(SLO)$/pppoptimizertoken.obj \
- $(SLO)$/pppoptimizerdialog.obj \
- $(SLO)$/optimizationstats.obj \
- $(SLO)$/graphiccollector.obj \
- $(SLO)$/pagecollector.obj \
+SLOFILES= $(SLO)$/unodialog.obj \
+ $(SLO)$/optimizerdialog.obj \
+ $(SLO)$/optimizerdialogcontrols.obj \
+ $(SLO)$/configurationaccess.obj \
+ $(SLO)$/impoptimizer.obj \
+ $(SLO)$/pppoptimizer.obj \
+ $(SLO)$/pppoptimizeruno.obj \
+ $(SLO)$/pppoptimizertoken.obj \
+ $(SLO)$/pppoptimizerdialog.obj \
+ $(SLO)$/fileopendialog.obj \
+ $(SLO)$/optimizationstats.obj \
+ $(SLO)$/graphiccollector.obj \
+ $(SLO)$/pagecollector.obj \
+ $(SLO)$/informationdialog.obj
# --- Library -----------------------------------
-SHL1TARGET= $(TARGET).uno
+SHL1TARGET= $(TARGET).uno
-SHL1STDLIBS=\
- $(CPPUHELPERLIB)\
- $(CPPULIB)\
- $(SALLIB)
+SHL1STDLIBS= $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB)
SHL1DEPN=
-SHL1IMPLIB=i$(SHL1TARGET)
-SHL1LIBS=$(SLB)$/$(TARGET).lib
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1RPATH=OXT
-DEF1NAME=$(SHL1TARGET)
-
-# ------------------------------------------------------------------------------
-
-# Resource files
-
-SRS1NAME=minimizer
-SRC1FILES = \
- minimizer.src \
-
-SRSFILELIST=\
- $(SRS)$/minimizer.srs \
-
-RESLIB1NAME=minimizer
-RESLIB1SRSFILES= $(SRSFILELIST)
+SHL1IMPLIB= i$(SHL1TARGET)
+SHL1LIBS= $(SLB)$/$(TARGET).lib
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+SHL1VERSIONMAP=$(SOLARENV)/src/reg-component.map
+SHL1RPATH= OXT
+DEF1NAME= $(SHL1TARGET)
+
+COMPONENT_XCU_REPLACEMENT=s/@MINIMIZEREXTENSIONPRODUCTNAME@/Presentation Minimizer/g
+
+COMPONENT_MERGED_XCU= \
+ $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Addons.xcu \
+ $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/ProtocolHandler.xcu \
+ $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcu
+
+COMPONENT_FILES= \
+ $(EXTENSIONDIR)$/registry$/schema$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcs
+
+# native libraries
+COMPONENT_LIBRARIES= \
+ $(EXTENSIONDIR)$/SunPresentationMinimizer.uno$(DLLPOST)
+
+# rather freestyle or common to all?
+COMPONENT_BITMAPS= \
+ $(EXTENSIONDIR)$/bitmaps$/opt_16.png \
+ $(EXTENSIONDIR)$/bitmaps$/opt_26.png \
+ $(EXTENSIONDIR)$/bitmaps$/opt_16_h.png \
+ $(EXTENSIONDIR)$/bitmaps$/opt_26_h.png \
+ $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80.png \
+ $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80_h.png
+
+COMPONENT_IMAGES=\
+ $(EXTENSIONDIR)$/bitmaps$/extension_32.png \
+ $(EXTENSIONDIR)$/bitmaps$/extension_32_h.png
+
+# rather freestyle or common to all?
+COMPONENT_HELP= \
+ $(EXTENSIONDIR)$/help$/help_de.odt \
+ $(EXTENSIONDIR)$/help$/help_en-US.odt \
+ $(EXTENSIONDIR)$/help$/component.txt
+
+# make sure to add your custom files here
+EXTENSION_PACKDEPS=$(COMPONENT_BITMAPS) $(COMPONENT_IMAGES) $(COMPONENT_HELP)
+
+ZIP2TARGET= presentation_minimizer_develop
+.IF "$(WITH_LANG)"!=""
+ZIP2DIR= $(MISC)/$(EXTENSIONNAME)_in/merge
+.ELSE # "$(WITH_LANG)"!=""
+ZIP2DIR= registry/data
+.ENDIF # "$(WITH_LANG)"!=""
+ZIP2EXT= .zip
+ZIP2FLAGS=-r
+ZIP2LIST= \
+ org/openoffice/Office/Addons.xcu \
+ org/openoffice/Office/extension/*.xcu
# --- Targets ----------------------------------
+.INCLUDE : extension_pre.mk
+
.ENDIF # L10N_framework
.INCLUDE : target.mk
+.IF "$(L10N_framework)"==""
+.INCLUDE : extension_post.mk
-ALLTAR : $(MISC)/PresentationMinimizer.component
+$(COMPONENT_BITMAPS) : $(SOLARSRC)$/$(RSCDEFIMG)$/minimizer$/$$(@:f)
+ @@-$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@
+
+$(COMPONENT_IMAGES) : $(SOLARSRC)$/$(RSCDEFIMG)$/desktop$/res$/$$(@:f)
+ @@-$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@
+
+$(COMPONENT_HELP) : help$/$$(@:f)
+ @@-$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@
-$(MISC)/PresentationMinimizer.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt PresentationMinimizer.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt PresentationMinimizer.component
+.ENDIF # L10N_framework
Modified: openoffice/trunk/main/sdext/source/minimizer/optimizationstats.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/optimizationstats.cxx?rev=1461102&r1=1461101&r2=1461102&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/optimizationstats.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/optimizationstats.cxx Tue Mar 26 12:56:56 2013
@@ -31,14 +31,13 @@
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::beans;
-using ::rtl::OUString;
-
// -----------------------------------------------------------------------------
OptimizationStats::OptimizationStats()