openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1468299 [4/5] - 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...
Date Tue, 16 Apr 2013 03:55:36 GMT
Modified: openoffice/trunk/main/sdext/source/minimizer/optimizerdialog.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/optimizerdialog.hxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/optimizerdialog.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/optimizerdialog.hxx Tue Apr 16 03:55:34 2013
@@ -51,6 +51,8 @@
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XDesktop.hpp>
 #include <com/sun/star/awt/PushButtonType.hpp>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase1.hxx>
 
 #define MAX_STEP		4
 #define OD_DIALOG_WIDTH	330
@@ -66,36 +68,47 @@
 // -------------------
 // - OPTIMIZERDIALOG -
 // -------------------
-class OptimizerDialog : public UnoDialog, public ConfigurationAccess
+
+typedef ::cppu::WeakImplHelper5<
+    com::sun::star::frame::XStatusListener,
+    com::sun::star::awt::XSpinListener,
+    com::sun::star::awt::XItemListener,
+    com::sun::star::awt::XActionListener,
+    com::sun::star::awt::XTextListener > OptimizerDialog_Base;
+
+class OptimizerDialog : public UnoDialog, public ConfigurationAccess, public OptimizerDialog_Base
 {
 public :
 
-	OptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame,
-		com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > rxStatusDispatcher );
+    OptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
+                     const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame,
+                     const com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rxParent );
     ~OptimizerDialog();
 
-	sal_Bool				execute();
+    virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& aState ) throw (::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aSource ) throw (::com::sun::star::uno::RuntimeException);
 
-	sal_Int16				mnCurrentStep;
-	sal_Int16				mnTabIndex;
-	sal_Bool				mbIsReadonly;
+    virtual void SAL_CALL up( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+    virtual void SAL_CALL down( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+    virtual void SAL_CALL first( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+    virtual void SAL_CALL last( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+    virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+    virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
+    virtual void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
 
-private :
-	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
-	com::sun::star::uno::Reference< com::sun::star::frame::XFrame >			mxFrame;
+	sal_Bool				execute();
 
+private :
+    com::sun::star::uno::Reference< com::sun::star::frame::XFrame >         mxFrame;
+    sal_Int16               mnCurrentStep;
+    sal_Int16               mnTabIndex;
+    sal_Bool                mbIsReadonly;
+    com::sun::star::uno::Reference< com::sun::star::frame::XModel >         mxModel;
 	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >		mxRoadmapControl;
 	com::sun::star::uno::Reference< com::sun::star::uno::XInterface >		mxRoadmapControlModel;
 
-	com::sun::star::uno::Reference< com::sun::star::awt::XItemListener >	mxItemListener;
-	com::sun::star::uno::Reference< com::sun::star::awt::XActionListener >	mxActionListener;
-	com::sun::star::uno::Reference< com::sun::star::awt::XActionListener >	mxActionListenerListBox0Pg0;
-	com::sun::star::uno::Reference< com::sun::star::awt::XTextListener >	mxTextListenerFormattedField0Pg1;
-	com::sun::star::uno::Reference< com::sun::star::awt::XTextListener >	mxTextListenerComboBox0Pg1;
-	com::sun::star::uno::Reference< com::sun::star::awt::XSpinListener >	mxSpinListenerFormattedField0Pg1;
-	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >		mxStatusDispatcher;
-
 	std::vector< std::vector< rtl::OUString > > maControlPages;
+    OptimizationStats maStats;
 
 	void InitDialog();
 	void InitRoadmap();
@@ -113,133 +126,90 @@ private :
 
 	void ActivatePage( sal_Int16 nStep );
 	void DeactivatePage( sal_Int16 nStep );
-	void InsertRoadmapItem( const sal_Int32 nIndex, const sal_Bool bEnabled, const rtl::OUString& rLabel, const sal_Int32 nItemID );
-
-public :
-
-	OptimizationStats maStats;
-
-	void UpdateStatus( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rStatus );
-
-	// the ConfigurationAccess is updated to actual control settings
-	void UpdateConfiguration();
-
-	void EnablePage( sal_Int16 nStep );
-	void DisablePage( sal_Int16 nStep );
-
-	void SwitchPage( sal_Int16 nNewStep );
-	void UpdateControlStates( sal_Int16 nStep = -1 );
-
-	rtl::OUString GetSelectedString( PPPOptimizerTokenEnum eListBox );
-	com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >& GetStatusDispatcher() { return mxStatusDispatcher; };
-	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 ItemListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XItemListener >
-{
-public:
-	ItemListener( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
-
-    virtual void SAL_CALL itemStateChanged( const ::com::sun::star::awt::ItemEvent& 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:
-
-	OptimizerDialog& mrOptimizerDialog;
-};
-
-// -----------------------------------------------------------------------------
-
-class ActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
-{
-public:
-	ActionListener( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
-
-    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:
-	
-	OptimizerDialog& mrOptimizerDialog;
-};
-
-// -----------------------------------------------------------------------------
-
-class ActionListenerListBox0Pg0 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
-{
-public:
-	ActionListenerListBox0Pg0( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
-
-    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:
-	
-	OptimizerDialog& mrOptimizerDialog;
-};
-
-// -----------------------------------------------------------------------------
-
-class TextListenerFormattedField0Pg1 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XTextListener >
-{
-public:
-	TextListenerFormattedField0Pg1( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
-
-    virtual void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& 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:
-	
-	OptimizerDialog& mrOptimizerDialog;
-};
-
-// -----------------------------------------------------------------------------
-
-class TextListenerComboBox0Pg1 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XTextListener >
-{
-public:
-	TextListenerComboBox0Pg1( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
-
-    virtual void SAL_CALL textChanged( const ::com::sun::star::awt::TextEvent& 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:
-	
-	OptimizerDialog& mrOptimizerDialog;
+    void EnablePage( sal_Int16 nStep );
+    void DisablePage( sal_Int16 nStep );
+    void SwitchPage( sal_Int16 nNewStep );
+
+    // the ConfigurationAccess is updated to actual control settings
+    void UpdateConfiguration();
+    void UpdateStatus( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rStatus );
+    void UpdateControlStates( sal_Int16 nStep = -1 );
+
+    rtl::OUString GetSelectedString( PPPOptimizerTokenEnum eListBox );
+    void ImplSetBold( const rtl::OUString& rControl );
+    void InsertRoadmapItem( const sal_Int32 nIndex,
+                            const sal_Bool bEnabled,
+                            const rtl::OUString& rLabel,
+                            const sal_Int32 nItemID );
+    rtl::OUString ImplInsertSeparator( const rtl::OUString& rControlName,
+                                       sal_Int32 nOrientation,
+                                       sal_Int32 nPosX,
+                                       sal_Int32 nPosY,
+                                       sal_Int32 nWidth,
+                                       sal_Int32 nHeight );
+    rtl::OUString ImplInsertButton( const rtl::OUString& rControlName,
+                                    const rtl::OUString& rHelpURL,
+                                    sal_Int32 nXPos,
+                                    sal_Int32 nYPos,
+                                    sal_Int32 nWidth,
+                                    sal_Int32 nHeight,
+                                    sal_Int16 nTabIndex,
+                                    sal_Bool bEnabled,
+                                    sal_Int32 nResID,
+                                    sal_Int16 nPushButtonType );
+    rtl::OUString ImplInsertFixedText( const rtl::OUString& rControlName,
+                                       const rtl::OUString& rLabel,
+                                       sal_Int32 nXPos,
+                                       sal_Int32 nYPos,
+                                       sal_Int32 nWidth,
+                                       sal_Int32 nHeight,
+                                       sal_Bool bMultiLine,
+                                       sal_Bool bBold,
+                                       sal_Int16 nTabIndex );
+    rtl::OUString ImplInsertCheckBox( 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 );
+    rtl::OUString ImplInsertFormattedField( const rtl::OUString& rControlName,
+                                            const rtl::OUString& rHelpURL,
+                                            sal_Int32 nXPos,
+                                            sal_Int32 nYPos,
+                                            sal_Int32 nWidth,
+                                            double fEffectiveMin,
+                                            double fEffectiveMax,
+                                            sal_Int16 nTabIndex );
+    rtl::OUString ImplInsertComboBox( const rtl::OUString& rControlName,
+                                      const rtl::OUString& rHelpURL,
+                                      const sal_Bool bEnabled,
+                                      const com::sun::star::uno::Sequence< rtl::OUString >& rItemList,
+                                      sal_Int32 nXPos,
+                                      sal_Int32 nYPos,
+                                      sal_Int32 nWidth,
+                                      sal_Int32 nHeight,
+                                      sal_Int16 nTabIndex,
+                                      bool bListen = true );
+    rtl::OUString ImplInsertRadioButton( 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_Bool bMultiLine,
+                                         sal_Int16 nTabIndex );
+    rtl::OUString ImplInsertListBox( const rtl::OUString& rControlName,
+                                     const rtl::OUString& rHelpURL,
+                                     const sal_Bool bEnabled,
+                                     const com::sun::star::uno::Sequence< rtl::OUString >& rItemList,
+                                     sal_Int32 nXPos,
+                                     sal_Int32 nYPos,
+                                     sal_Int32 nWidth,
+                                     sal_Int32 nHeight,
+                                     sal_Int16 nTabIndex );
 };
 
-// -----------------------------------------------------------------------------
-
-class SpinListenerFormattedField0Pg1 : public ::cppu::WeakImplHelper1< com::sun::star::awt::XSpinListener >
-{
-public:
-	SpinListenerFormattedField0Pg1( OptimizerDialog& rOptimizerDialog ) : mrOptimizerDialog( rOptimizerDialog ){};
-
-    virtual void SAL_CALL up( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL down( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL first( const ::com::sun::star::awt::SpinEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL last( const ::com::sun::star::awt::SpinEvent& 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:
-	
-	OptimizerDialog& mrOptimizerDialog;
-};
-
-// -----------------------------------------------------------------------------
-
-class HelpCloseListener : public ::cppu::WeakImplHelper1< com::sun::star::util::XCloseListener >
-{
-public:
-	HelpCloseListener( com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rXFrame ) : mrXFrame( rXFrame ){};
-
-	virtual void SAL_CALL addCloseListener(const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException );
-	virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL notifyClosing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
-	virtual void SAL_CALL queryClosing( const com::sun::star::lang::EventObject& aEvent, sal_Bool bDeliverOwnership ) throw (com::sun::star::uno::RuntimeException, com::sun::star::util::CloseVetoException) ;
-    virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException) ;
-
-private:
-	
-	com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& mrXFrame;
-};
-
-
 #endif // OPTIMIZERDIALOG_HXX

Modified: openoffice/trunk/main/sdext/source/minimizer/optimizerdialogcontrols.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/optimizerdialogcontrols.cxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/optimizerdialogcontrols.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/optimizerdialogcontrols.cxx Tue Apr 16 03:55:34 2013
@@ -25,6 +25,8 @@
 #include "precompiled_sdext.hxx"
 
 #include "optimizerdialog.hxx"
+#include "minimizer.hrc"
+#include "helpid.hrc"
 
 // -------------------
 // - OptimizerDialog -
@@ -41,7 +43,6 @@
 #endif
 #include <rtl/ustrbuf.hxx>
 
-using namespace ::rtl;
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
@@ -53,22 +54,29 @@ using namespace ::com::sun::star::drawin
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
 
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
 // -----------------------------------------------------------------------------
 
-void SetBold( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControl )
+void OptimizerDialog::ImplSetBold( const rtl::OUString& rControl )
 {
 	FontDescriptor aFontDescriptor;
-	if ( rOptimizerDialog.getControlProperty( rControl, TKGet( TK_FontDescriptor ) ) >>= aFontDescriptor )
+	if ( getControlProperty( rControl, TKGet( TK_FontDescriptor ) ) >>= aFontDescriptor )
 	{
 		aFontDescriptor.Weight = FontWeight::BOLD;
-		rOptimizerDialog.setControlProperty( rControl, TKGet( TK_FontDescriptor ), Any( aFontDescriptor ) );
+		setControlProperty( rControl, TKGet( TK_FontDescriptor ), Any( aFontDescriptor ) );
 	}
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, sal_Int32 nOrientation,
-						sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
+rtl::OUString OptimizerDialog::ImplInsertSeparator(
+    const OUString& rControlName,
+    sal_Int32 nOrientation,
+    sal_Int32 nPosX,
+    sal_Int32 nPosY,
+    sal_Int32 nWidth,
+    sal_Int32 nHeight )
 {
 	OUString pNames[] = {
 		TKGet( TK_Height ),
@@ -91,19 +99,29 @@ rtl::OUString InsertSeparator( Optimizer
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	rOptimizerDialog.insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ),
+	insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ),
 		rControlName, aNames, aValues );
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener,
-	sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, sal_Bool bEnabled, PPPOptimizerTokenEnum nResID, sal_Int16 nPushButtonType )
+rtl::OUString OptimizerDialog::ImplInsertButton(
+    const OUString& rControlName,
+    const rtl::OUString& rHelpURL,
+    sal_Int32 nXPos,
+    sal_Int32 nYPos,
+    sal_Int32 nWidth,
+    sal_Int32 nHeight,
+    sal_Int16 nTabIndex,
+    sal_Bool bEnabled,
+    sal_Int32 nResID,
+    sal_Int16 nPushButtonType )
 {
 	OUString pNames[] = {
 		TKGet( TK_Enabled ),
 		TKGet( TK_Height ),
+        TKGet( TK_HelpURL ),
 		TKGet( TK_Label ),
 		TKGet( TK_PositionX ),
 		TKGet( TK_PositionY ),
@@ -115,7 +133,8 @@ rtl::OUString InsertButton( OptimizerDia
 	Any	pValues[] = {
 		Any( bEnabled  ),
 		Any( nHeight ),
-		Any( rOptimizerDialog.getString( nResID ) ),
+        Any( rHelpURL ),
+		Any( getString( nResID ) ),
 		Any( nXPos ),
 		Any( nYPos ),
 		Any( nPushButtonType ),
@@ -129,14 +148,22 @@ rtl::OUString InsertButton( OptimizerDia
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	rOptimizerDialog.insertButton( rControlName, xActionListener, aNames, aValues );
+	insertButton( rControlName, this, aNames, aValues );
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControlName, const OUString& rLabel,
-								sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Bool bBold, sal_Int16 nTabIndex )
+rtl::OUString OptimizerDialog::ImplInsertFixedText(
+    const rtl::OUString& rControlName,
+    const OUString& rLabel,
+    sal_Int32 nXPos,
+    sal_Int32 nYPos,
+    sal_Int32 nWidth,
+    sal_Int32 nHeight,
+    sal_Bool bMultiLine,
+    sal_Bool bBold,
+    sal_Int16 nTabIndex )
 {
 	OUString pNames[] = {
 		TKGet( TK_Height ),
@@ -163,21 +190,28 @@ rtl::OUString InsertFixedText( Optimizer
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	rOptimizerDialog.insertFixedText( rControlName, aNames, aValues );
+	insertFixedText( rControlName, aNames, aValues );
 	if ( bBold )
-		SetBold( rOptimizerDialog, rControlName );
+		ImplSetBold( rControlName );
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, 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 )
+rtl::OUString OptimizerDialog::ImplInsertCheckBox(
+    const OUString& rControlName,
+    const OUString& rLabel,
+    const rtl::OUString& rHelpURL,
+    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 ),
@@ -188,6 +222,7 @@ rtl::OUString InsertCheckBox( OptimizerD
 	Any	pValues[] = {
 		Any( sal_True ),
 		Any( nHeight ),
+        Any( rHelpURL ),
 		Any( rLabel ),
 		Any( nXPos ),
 		Any( nYPos ),
@@ -200,23 +235,29 @@ rtl::OUString InsertCheckBox( OptimizerD
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	Reference< XCheckBox > xCheckBox( rOptimizerDialog.insertCheckBox( rControlName, aNames, aValues ) );
-	if ( xItemListener.is() )
-		xCheckBox->addItemListener( xItemListener );
+	Reference< XCheckBox > xCheckBox( insertCheckBox( rControlName, aNames, aValues ) );
+    xCheckBox->addItemListener( this );
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
-		const Reference< XTextListener > xTextListener, const Reference< XSpinListener > xSpinListener, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth,
-			double fEffectiveMin, double fEffectiveMax, sal_Int16 nTabIndex )
+rtl::OUString OptimizerDialog::ImplInsertFormattedField(
+    const OUString& rControlName,
+    const rtl::OUString& rHelpURL,
+    sal_Int32 nXPos,
+    sal_Int32 nYPos,
+    sal_Int32 nWidth,
+    double fEffectiveMin,
+    double fEffectiveMax,
+    sal_Int16 nTabIndex )
 {
 	OUString pNames[] = {
 		TKGet( TK_EffectiveMax ),
 		TKGet( TK_EffectiveMin ),
 		TKGet( TK_Enabled ),
 		TKGet( TK_Height ),
+        TKGet( TK_HelpURL ),
 		TKGet( TK_PositionX ),
 		TKGet( TK_PositionY ),
 		TKGet( TK_Repeat ),
@@ -230,6 +271,7 @@ rtl::OUString InsertFormattedField( Opti
 		Any( fEffectiveMin ),
 		Any( sal_True ),
 		Any( (sal_Int32)12 ),
+        Any( rHelpURL ),
 		Any( nXPos ),
 		Any( nYPos ),
 		Any( (sal_Bool)sal_True ),
@@ -243,27 +285,33 @@ rtl::OUString InsertFormattedField( Opti
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertFormattedField( rControlName, aNames, aValues ), UNO_QUERY_THROW );
-	if ( xTextListener.is() )
-		xTextComponent->addTextListener( xTextListener );
-	if ( xSpinListener.is() )
-	{
-		Reference< XSpinField > xSpinField( xTextComponent, UNO_QUERY_THROW );
-		xSpinField->addSpinListener( xSpinListener );
-	}
+	Reference< XTextComponent > xTextComponent( insertFormattedField( rControlName, aNames, aValues ), UNO_QUERY_THROW );
+    xTextComponent->addTextListener( this );
+    Reference< XSpinField > xSpinField( xTextComponent, UNO_QUERY_THROW );
+    xSpinField->addSpinListener( this );
+
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
-	const Reference< XTextListener > xTextListener, const sal_Bool bEnabled, const Sequence< OUString >& rItemList,
-		sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
+rtl::OUString OptimizerDialog::ImplInsertComboBox(
+    const OUString& rControlName,
+    const rtl::OUString& rHelpURL,
+    const sal_Bool bEnabled,
+    const Sequence< OUString >& rItemList,
+    sal_Int32 nXPos,
+    sal_Int32 nYPos,
+    sal_Int32 nWidth,
+    sal_Int32 nHeight,
+    sal_Int16 nTabIndex,
+    bool bListen )
 {
 	OUString pNames[] = {
 		TKGet( TK_Dropdown ),
 		TKGet( TK_Enabled ),
 		TKGet( TK_Height ),
+        TKGet( TK_HelpURL ),
 		TKGet( TK_LineCount ),
 		TKGet( TK_PositionX ),
 		TKGet( TK_PositionY ),
@@ -276,6 +324,7 @@ rtl::OUString InsertComboBox( OptimizerD
 		Any( sal_True ),
 		Any( bEnabled ),
 		Any( nHeight ),
+        Any( rHelpURL ),
 		Any( (sal_Int16)8),
 		Any( nXPos ),
 		Any( nYPos ),
@@ -289,19 +338,28 @@ rtl::OUString InsertComboBox( OptimizerD
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	Reference< XTextComponent > xTextComponent( rOptimizerDialog.insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW );
-	if ( xTextListener.is() )
-		xTextComponent->addTextListener( xTextListener );
+	Reference< XTextComponent > xTextComponent( insertComboBox( rControlName, aNames, aValues ), UNO_QUERY_THROW );
+    if ( bListen )
+        xTextComponent->addTextListener( this );
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::OUString& rControlName, const Reference< XItemListener > xItemListener,
-	const OUString& rLabel, sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
+rtl::OUString OptimizerDialog::ImplInsertRadioButton(
+    const rtl::OUString& rControlName,
+    const OUString& rLabel,
+    const rtl::OUString& rHelpURL,
+    sal_Int32 nXPos,
+    sal_Int32 nYPos,
+    sal_Int32 nWidth,
+    sal_Int32 nHeight,
+    sal_Bool bMultiLine,
+    sal_Int16 nTabIndex )
 {
 	OUString pNames[] = {
 		TKGet( TK_Height ),
+        TKGet( TK_HelpURL ),
 		TKGet( TK_Label ),
 		TKGet( TK_MultiLine ),
 		TKGet( TK_PositionX ),
@@ -312,6 +370,7 @@ rtl::OUString InsertRadioButton( Optimiz
 
 	Any	pValues[] = {
 		Any( nHeight ),
+        Any( rHelpURL ),
 		Any( rLabel ),
 		Any( bMultiLine ),
 		Any( nXPos ),
@@ -325,22 +384,29 @@ rtl::OUString InsertRadioButton( Optimiz
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	Reference< XRadioButton > xRadioButton( rOptimizerDialog.insertRadioButton( rControlName, aNames, aValues ) );
-	if ( xItemListener.is() )
-		xRadioButton->addItemListener( xItemListener );
+	Reference< XRadioButton > xRadioButton( insertRadioButton( rControlName, aNames, aValues ) );
+    xRadioButton->addItemListener( this );
 	return rControlName;
 }
 
 // -----------------------------------------------------------------------------
 
-rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& rControlName,
-	const Reference< XActionListener > xActionListener, const sal_Bool bEnabled, const Sequence< OUString >& rItemList,
-		sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex )
+rtl::OUString OptimizerDialog::ImplInsertListBox(
+    const OUString& rControlName,
+    const rtl::OUString& rHelpURL,
+    const sal_Bool bEnabled,
+    const Sequence< OUString >& rItemList,
+    sal_Int32 nXPos,
+    sal_Int32 nYPos,
+    sal_Int32 nWidth,
+    sal_Int32 nHeight,
+    sal_Int16 nTabIndex )
 {
 	OUString pNames[] = {
 		TKGet( TK_Dropdown ),
 		TKGet( TK_Enabled ),
 		TKGet( TK_Height ),
+        TKGet( TK_HelpURL ),
 		TKGet( TK_LineCount ),
 		TKGet( TK_MultiSelection ),
 		TKGet( TK_PositionX ),
@@ -354,6 +420,7 @@ rtl::OUString InsertListBox( OptimizerDi
 		Any( sal_True ),
 		Any( bEnabled ),
 		Any( nHeight ),
+        Any( rHelpURL ),
 		Any( (sal_Int16)8),
 		Any( sal_False ),
 		Any( nXPos ),
@@ -368,9 +435,8 @@ rtl::OUString InsertListBox( OptimizerDi
 	Sequence< rtl::OUString >	aNames( pNames, nCount );
 	Sequence< Any >				aValues( pValues, nCount );
 
-	Reference< XListBox > xListBox( rOptimizerDialog.insertListBox( rControlName, aNames, aValues ) );
-	if ( xListBox.is() )
-		xListBox->addActionListener( xActionListener );
+	Reference< XListBox > xListBox( insertListBox( rControlName, aNames, aValues ) );
+    xListBox->addActionListener( this );
 	return rControlName;
 }
 
@@ -383,14 +449,14 @@ void OptimizerDialog::InitNavigationBar(
     sal_Int32	nNextPosX = nFinishPosX - 6 - BUTTON_WIDTH;
     sal_Int32	nBackPosX = nNextPosX - 3 - BUTTON_WIDTH;
 
-	InsertSeparator( *this, TKGet( TK_lnNavSep1 ), 0, 0, DIALOG_HEIGHT - 26, OD_DIALOG_WIDTH, 1 );
-	InsertSeparator( *this, TKGet( TK_lnNavSep2 ), 1, 85, 0, 1, BUTTON_POS_Y - 6 );
+	ImplInsertSeparator( TKGet( TK_lnNavSep1 ), 0, 0, DIALOG_HEIGHT - 26, OD_DIALOG_WIDTH, 1 );
+	ImplInsertSeparator( TKGet( TK_lnNavSep2 ), 1, 85, 0, 1, BUTTON_POS_Y - 6 );
 
-	InsertButton( *this, TKGet( TK_btnNavHelp ), mxActionListener, 8, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_HELP, PushButtonType_STANDARD );
-	InsertButton( *this, TKGet( TK_btnNavBack ), mxActionListener, nBackPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_False, STR_BACK, PushButtonType_STANDARD );
-	InsertButton( *this, TKGet( TK_btnNavNext ), mxActionListener, nNextPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_NEXT, PushButtonType_STANDARD );
-	InsertButton( *this, TKGet( TK_btnNavFinish ), mxActionListener, nFinishPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_FINISH, PushButtonType_STANDARD );
-	InsertButton( *this, TKGet( TK_btnNavCancel ), mxActionListener, nCancelPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_CANCEL, PushButtonType_STANDARD );
+	ImplInsertButton( TKGet( TK_btnNavHelp ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_HELP ), 8, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_HELP, PushButtonType_HELP );
+	ImplInsertButton( TKGet( TK_btnNavBack ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_BACK ), nBackPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_False, STR_BACK, PushButtonType_STANDARD );
+	ImplInsertButton( TKGet( TK_btnNavNext ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_NEXT ), nNextPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_NEXT, PushButtonType_STANDARD );
+	ImplInsertButton( TKGet( TK_btnNavFinish ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_FINISH ), nFinishPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_FINISH, PushButtonType_STANDARD );
+	ImplInsertButton( TKGet( TK_btnNavCancel ), HID( HID_SDEXT_MINIMIZER_WIZ_PB_CANCEL ), nCancelPosX, BUTTON_POS_Y, BUTTON_WIDTH, BUTTON_HEIGHT, mnTabIndex++, sal_True, STR_CANCEL, PushButtonType_STANDARD );
 
 	setControlProperty( TKGet( TK_btnNavNext ), TKGet( TK_DefaultButton ), Any( sal_True ) );
 }
@@ -433,12 +499,12 @@ void OptimizerDialog::InitPage0()
 {
 	Sequence< OUString > aItemList;
 	std::vector< rtl::OUString > aControlList;
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg0 ), getString( STR_INTRODUCTION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg0 ), getString( STR_INTRODUCTION_T ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 100, sal_True, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator1Pg0 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 66, PAGE_WIDTH - 12, 1 ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText2Pg0 ), getString( STR_CHOSE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 60, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertListBox(  *this, TKGet( TK_ListBox0Pg0 ), mxActionListenerListBox0Pg0, sal_True, aItemList, PAGE_POS_X + 6, DIALOG_HEIGHT - 48, ( OD_DIALOG_WIDTH - 50 ) - ( PAGE_POS_X + 6 ), 12, mnTabIndex++ ) );
-	aControlList.push_back( InsertButton( *this, TKGet( TK_Button0Pg0 ), mxActionListener, OD_DIALOG_WIDTH - 46, DIALOG_HEIGHT - 49, 40, 14, mnTabIndex++, sal_True, STR_REMOVE, PushButtonType_STANDARD ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg0 ), getString( STR_INTRODUCTION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg0 ), getString( STR_INTRODUCTION_T ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 100, sal_True, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator1Pg0 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 66, PAGE_WIDTH - 12, 1 ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText2Pg0 ), getString( STR_CHOSE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 60, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertListBox(  TKGet( TK_ListBox0Pg0 ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP1_LB_SETTINGS),sal_True, aItemList, PAGE_POS_X + 6, DIALOG_HEIGHT - 48, ( OD_DIALOG_WIDTH - 50 ) - ( PAGE_POS_X + 6 ), 12, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertButton( TKGet( TK_Button0Pg0 ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP1_PB_DELSETTS ),OD_DIALOG_WIDTH - 46, DIALOG_HEIGHT - 49, 40, 14, mnTabIndex++, sal_True, STR_REMOVE, PushButtonType_STANDARD ) );
 	maControlPages.push_back( aControlList );
 	DeactivatePage( 0 );
 	UpdateControlStatesPage0();
@@ -459,7 +525,7 @@ void OptimizerDialog::UpdateControlState
 void OptimizerDialog::InitPage1()
 {
 	Sequence< OUString > aCustomShowList;
-	Reference< XModel > xModel( mxController->getModel() );
+	Reference< XModel > xModel( mxModel );
 	if ( xModel.is() )
 	{
 		Reference< XCustomPresentationSupplier > aXCPSup( xModel, UNO_QUERY_THROW );
@@ -468,12 +534,12 @@ void OptimizerDialog::InitPage1()
             aCustomShowList = aXCont->getElementNames();
 	}
 	std::vector< rtl::OUString > aControlList;
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg3 ), getString( STR_CHOOSE_SLIDES ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox0Pg3 ), mxItemListener, getString( STR_DELETE_MASTER_PAGES ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox2Pg3 ), mxItemListener, getString( STR_DELETE_HIDDEN_SLIDES ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox3Pg3 ), mxItemListener, getString( STR_CUSTOM_SHOW ), PAGE_POS_X + 6, PAGE_POS_Y + 42, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
-	aControlList.push_back( InsertListBox(  *this, TKGet( TK_ListBox0Pg3 ), mxActionListener, sal_True, aCustomShowList, PAGE_POS_X + 14, PAGE_POS_Y + 54, 150, 12, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox1Pg3 ), mxItemListener, getString( STR_DELETE_NOTES_PAGES ), PAGE_POS_X + 6, PAGE_POS_Y + 70, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg3 ), getString( STR_CHOOSE_SLIDES ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox0Pg3 ), getString( STR_DELETE_MASTER_PAGES ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_MASTERPAGES ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox2Pg3 ), getString( STR_DELETE_HIDDEN_SLIDES ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_HIDDENSLIDES ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox3Pg3 ), getString( STR_CUSTOM_SHOW ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_CUSTOMSHOW ), PAGE_POS_X + 6, PAGE_POS_Y + 42, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertListBox(  TKGet( TK_ListBox0Pg3 ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP2_LB_CUSTOMSHOW),sal_True, aCustomShowList, PAGE_POS_X + 14, PAGE_POS_Y + 54, 150, 12, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox1Pg3 ), getString( STR_DELETE_NOTES_PAGES ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP2_CB_NOTES ), PAGE_POS_X + 6, PAGE_POS_Y + 70, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
 	maControlPages.push_back( aControlList );
 	DeactivatePage( 1 );
 
@@ -535,15 +601,15 @@ void OptimizerDialog::InitPage2()
 	aResolutionItemList[ 3 ] = getString( STR_IMAGE_RESOLUTION_3 ).getToken( 1, ';', nI3 );
 
 	std::vector< rtl::OUString > aControlList;
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg1 ), getString( STR_GRAPHIC_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
-	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton0Pg1 ), mxItemListener, getString( STR_LOSSLESS_COMPRESSION ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton1Pg1 ), mxItemListener, getString( STR_JPEG_COMPRESSION ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg1 ), getString( STR_QUALITY ), PAGE_POS_X + 20, PAGE_POS_Y + 40, 72, 8, sal_False, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFormattedField( *this, TKGet( TK_FormattedField0Pg1 ), mxTextListenerFormattedField0Pg1, mxSpinListenerFormattedField0Pg1, PAGE_POS_X + 106, PAGE_POS_Y + 38, 50, 0, 100, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText2Pg1 ), getString( STR_IMAGE_RESOLUTION ), PAGE_POS_X + 6, PAGE_POS_Y + 54, 94, 8, sal_False, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertComboBox(  *this, TKGet( TK_ComboBox0Pg1 ), mxTextListenerComboBox0Pg1, sal_True, aResolutionItemList, PAGE_POS_X + 106, PAGE_POS_Y + 52, 100, 12, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox1Pg1 ), mxItemListener, getString( STR_REMOVE_CROP_AREA ), PAGE_POS_X + 6, PAGE_POS_Y + 68, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox2Pg1 ), mxItemListener, getString( STR_EMBED_LINKED_GRAPHICS ), PAGE_POS_X + 6, PAGE_POS_Y + 82, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg1 ), getString( STR_GRAPHIC_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton0Pg1 ), getString( STR_LOSSLESS_COMPRESSION ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_LOSSLESS ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton1Pg1 ), getString( STR_JPEG_COMPRESSION ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_RB_JPEG ), PAGE_POS_X + 6, PAGE_POS_Y + 28, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg1 ), getString( STR_QUALITY ), PAGE_POS_X + 20, PAGE_POS_Y + 40, 72, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFormattedField( TKGet( TK_FormattedField0Pg1 ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_MF_QUALITY ), PAGE_POS_X + 106, PAGE_POS_Y + 38, 50, 0, 100, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText2Pg1 ), getString( STR_IMAGE_RESOLUTION ), PAGE_POS_X + 6, PAGE_POS_Y + 54, 94, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertComboBox(  TKGet( TK_ComboBox0Pg1 ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_LB_DPI ), sal_True, aResolutionItemList, PAGE_POS_X + 106, PAGE_POS_Y + 52, 100, 12, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox1Pg1 ), getString( STR_REMOVE_CROP_AREA ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_CROP ), PAGE_POS_X + 6, PAGE_POS_Y + 68, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox2Pg1 ), getString( STR_EMBED_LINKED_GRAPHICS ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP3_CB_LINKS ), PAGE_POS_X + 6, PAGE_POS_Y + 82, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
 	maControlPages.push_back( aControlList );
 	DeactivatePage( 2 );
 	UpdateControlStatesPage2();
@@ -565,7 +631,7 @@ void OptimizerDialog::UpdateControlState
 void OptimizerDialog::InitPage3()
 {
 	int nOLECount = 0;
-	Reference< XModel > xModel( mxController->getModel() );
+	Reference< XModel > xModel( mxModel );
 	Reference< XDrawPagesSupplier > xDrawPagesSupplier( xModel, UNO_QUERY_THROW );
 	Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
 	for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
@@ -581,11 +647,11 @@ void OptimizerDialog::InitPage3()
 	}
 
 	std::vector< rtl::OUString > aControlList;
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg2 ), getString( STR_OLE_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox0Pg2 ), mxItemListener, getString( STR_OLE_REPLACE ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
-	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton0Pg2 ), mxItemListener, getString( STR_ALL_OLE_OBJECTS ), PAGE_POS_X + 14, PAGE_POS_Y + 28, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton1Pg2 ), mxItemListener, getString( STR_ALIEN_OLE_OBJECTS_ONLY ), PAGE_POS_X + 14, PAGE_POS_Y + 40, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg2 ), nOLECount ? getString( STR_OLE_OBJECTS_DESC ) : getString( STR_NO_OLE_OBJECTS_DESC ), PAGE_POS_X + 6, PAGE_POS_Y + 64, PAGE_WIDTH - 22, 50, sal_True, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg2 ), getString( STR_OLE_OPTIMIZATION ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox0Pg2 ), getString( STR_OLE_REPLACE ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP4_CB_OLE ), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton0Pg2 ), getString( STR_ALL_OLE_OBJECTS ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP4_RB_ALLOLE), PAGE_POS_X + 14, PAGE_POS_Y + 28, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton1Pg2 ), getString( STR_ALIEN_OLE_OBJECTS_ONLY ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP4_RB_NOTODF),PAGE_POS_X + 14, PAGE_POS_Y + 40, PAGE_WIDTH - 22, 8, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg2 ), nOLECount ? getString( STR_OLE_OBJECTS_DESC ) : getString( STR_NO_OLE_OBJECTS_DESC ), PAGE_POS_X + 6, PAGE_POS_Y + 64, PAGE_WIDTH - 22, 50, sal_True, sal_False, mnTabIndex++ ) );
 	maControlPages.push_back( aControlList );
 	DeactivatePage( 3 );
 	UpdateControlStatesPage3();
@@ -683,7 +749,7 @@ void OptimizerDialog::UpdateControlState
 	if ( aCustomShowName.getLength() )
 	{
 		std::vector< Reference< XDrawPage > > vNonUsedPageList;
-		PageCollector::CollectNonCustomShowPages( mxController->getModel(), aCustomShowName, vNonUsedPageList );
+		PageCollector::CollectNonCustomShowPages( mxModel, aCustomShowName, vNonUsedPageList );
 		nDeletedSlides += vNonUsedPageList.size();
 	}
 	if ( GetConfigProperty( TK_DeleteHiddenSlides, sal_False ) )
@@ -691,7 +757,7 @@ void OptimizerDialog::UpdateControlState
 		if ( aCustomShowName.getLength() )
 		{
 			std::vector< Reference< XDrawPage > > vUsedPageList;
-			PageCollector::CollectCustomShowPages( mxController->getModel(), aCustomShowName, vUsedPageList );
+			PageCollector::CollectCustomShowPages( mxModel, aCustomShowName, vUsedPageList );
 			std::vector< Reference< XDrawPage > >::iterator aIter( vUsedPageList.begin() );
 			while( aIter != vUsedPageList.end() )
 			{
@@ -708,7 +774,7 @@ void OptimizerDialog::UpdateControlState
 		}
 		else
 		{
-			Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
+			Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxModel, UNO_QUERY_THROW );
 			Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
 			for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
 			{
@@ -728,8 +794,8 @@ void OptimizerDialog::UpdateControlState
 	if ( GetConfigProperty( TK_DeleteUnusedMasterPages, sal_False ) )
 	{
 		std::vector< PageCollector::MasterPageEntity > aMasterPageList;
-		PageCollector::CollectMasterPages( mxController->getModel(), aMasterPageList );
-		Reference< XMasterPagesSupplier > xMasterPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
+		PageCollector::CollectMasterPages( mxModel, aMasterPageList );
+		Reference< XMasterPagesSupplier > xMasterPagesSupplier( mxModel, UNO_QUERY_THROW );
 		Reference< XDrawPages > xMasterPages( xMasterPagesSupplier->getMasterPages(), UNO_QUERY_THROW );
 		std::vector< PageCollector::MasterPageEntity >::iterator aIter( aMasterPageList.begin() );
 		while( aIter != aMasterPageList.end() )
@@ -756,7 +822,7 @@ void OptimizerDialog::UpdateControlState
 	sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) );
 	GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, sal_False ),
 										nImageResolution, GetConfigProperty( TK_EmbedLinkedGraphics, sal_True ) );
-	GraphicCollector::CountGraphics( mxMSF, mxController->getModel(), aGraphicSettings, nGraphics );
+	GraphicCollector::CountGraphics( mxContext, mxModel, aGraphicSettings, nGraphics );
 	if ( nGraphics > 1 )
 	{
 		OUString aStr( getString( STR_OPTIMIZE_IMAGES ) );
@@ -781,7 +847,7 @@ void OptimizerDialog::UpdateControlState
 	if ( GetConfigProperty( TK_OLEOptimization, sal_False ) )
 	{
 		sal_Int32 nOLEReplacements = 0;
-		Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
+		Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxModel, UNO_QUERY_THROW );
 		Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
 		for ( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
 		{
@@ -812,7 +878,7 @@ void OptimizerDialog::UpdateControlState
 
 	sal_Int64 nCurrentFileSize = 0;
 	sal_Int64 nEstimatedFileSize = 0;
-	Reference< XStorable > xStorable( mxController->getModel(), UNO_QUERY );
+	Reference< XStorable > xStorable( mxModel, UNO_QUERY );
 	if ( xStorable.is() && xStorable->hasLocation() )
 		nCurrentFileSize = PPPOptimizer::GetFileSize( xStorable->getLocation() );
 
@@ -856,7 +922,7 @@ void OptimizerDialog::InitPage4()
 
 		Any	pValues[] = {
 			Any( (sal_Int32)12 ),
-			Any( TKGet( STR_SAVE_AS ) ),
+			Any( OUString( RTL_CONSTASCII_USTRINGPARAM("STR_SAVE_AS") ) ),//TODO
 			Any( (sal_Int32)( PAGE_POS_X + 6 ) ),
 			Any( (sal_Int32)( DIALOG_HEIGHT - 75 ) ),
 			Any( (sal_Int32)( 0 ) ),
@@ -872,30 +938,35 @@ void OptimizerDialog::InitPage4()
 		Reference< XMultiPropertySet > xMultiPropertySet( insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlProgressBarModel" ) ),
 			TKGet( TK_Progress ), aNames, aValues ), UNO_QUERY );
 	}
-	Reference< XTextListener > xTextListener;
+
 	Sequence< OUString > aItemList;
 	std::vector< rtl::OUString > aControlList;
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText0Pg4 ), getString( STR_SUMMARY_TITLE ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
-//	aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator0Pg4 ), 0, PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 1 ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText0Pg4 ), getString( STR_SUMMARY_TITLE ), PAGE_POS_X, PAGE_POS_Y, PAGE_WIDTH, 8, sal_False, sal_True, mnTabIndex++ ) );
+//	aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator0Pg4 ), 0, PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 1 ) );
 
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText4Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText5Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 22, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText6Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 30, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText4Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText5Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 22, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText6Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 30, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
 
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText2Pg4 ), getString( STR_CURRENT_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 50, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText7Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 50, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText2Pg4 ), getString( STR_CURRENT_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 50, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText7Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 50, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
 	setControlProperty( TKGet( TK_FixedText7Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText3Pg4 ), getString( STR_ESTIMATED_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 58, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText8Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 58, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText3Pg4 ), getString( STR_ESTIMATED_FILESIZE ), PAGE_POS_X + 6, PAGE_POS_Y + 58, 88, 8, sal_False, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText8Pg4 ), OUString(), PAGE_POS_X + 100, PAGE_POS_Y + 58, 30, 8, sal_False, sal_False, mnTabIndex++ ) );
 	setControlProperty( TKGet( TK_FixedText8Pg4 ), TKGet( TK_Align ), Any( static_cast< short >( 2 ) ) );
 
-	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton0Pg4 ), mxItemListener, getString(  STR_APPLY_TO_CURRENT ), PAGE_POS_X + 6, PAGE_POS_Y + 78, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertRadioButton( *this, TKGet( TK_RadioButton1Pg4 ), mxItemListener, getString( STR_SAVE_AS ), PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
-	aControlList.push_back( InsertFixedText( *this, TKGet( TK_FixedText1Pg4 ), OUString(), PAGE_POS_X + 6, DIALOG_HEIGHT - 87, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton0Pg4 ), getString(  STR_APPLY_TO_CURRENT ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_CURDOC),PAGE_POS_X + 6, PAGE_POS_Y + 78, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertRadioButton( TKGet( TK_RadioButton1Pg4 ), getString( STR_SAVE_AS ), HID(HID_SDEXT_MINIMIZER_WIZ_STEP5_RB_NEWDOC),PAGE_POS_X + 6, PAGE_POS_Y + 90, PAGE_WIDTH - 12, 8, sal_False, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertFixedText( TKGet( TK_FixedText1Pg4 ), OUString(), PAGE_POS_X + 6, DIALOG_HEIGHT - 87, PAGE_WIDTH - 12, 8, sal_True, sal_False, mnTabIndex++ ) );
 	aControlList.push_back( TKGet( TK_Progress ) );
-	aControlList.push_back( InsertSeparator( *this, TKGet( TK_Separator1Pg4 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 58, PAGE_WIDTH - 12, 1 ) );
-	aControlList.push_back( InsertCheckBox(  *this, TKGet( TK_CheckBox1Pg4 ), mxItemListener, getString( STR_SAVE_SETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 47, 100, 8, mnTabIndex++ ) );
-	aControlList.push_back( InsertComboBox(  *this, TKGet( TK_ComboBox0Pg4 ), xTextListener, sal_True, aItemList, PAGE_POS_X + 106, DIALOG_HEIGHT - 48, 100, 12, mnTabIndex++ ) );
+	aControlList.push_back( ImplInsertSeparator( TKGet( TK_Separator1Pg4 ), 0, PAGE_POS_X + 6, DIALOG_HEIGHT - 58, PAGE_WIDTH - 12, 1 ) );
+	aControlList.push_back( ImplInsertCheckBox(  TKGet( TK_CheckBox1Pg4 ), getString( STR_SAVE_SETTINGS ), HID( HID_SDEXT_MINIMIZER_WIZ_STEP5_CB_SAVESETTINGS ), PAGE_POS_X + 6, DIALOG_HEIGHT - 47, 100, 8, mnTabIndex++ ) );
+    // don't listen to this
+	aControlList.push_back(
+        ImplInsertComboBox(
+            TKGet( TK_ComboBox0Pg4 ),  HID( HID_SDEXT_MINIMIZER_WIZ_STEP5_LB_SETTINGSNAME ),sal_True, aItemList, 
+            PAGE_POS_X + 106, DIALOG_HEIGHT - 48, 100, 12, mnTabIndex++ , 
+            false) );
 	maControlPages.push_back( aControlList );
 	DeactivatePage( 4 );
 

Modified: openoffice/trunk/main/sdext/source/minimizer/pagecollector.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pagecollector.cxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pagecollector.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pagecollector.cxx Tue Apr 16 03:55:34 2013
@@ -33,7 +33,6 @@
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/container/XIndexContainer.hpp>
 
-using namespace ::rtl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::awt;
@@ -43,6 +42,8 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::presentation;
 
+using ::rtl::OUString;
+
 void PageCollector::CollectCustomShowPages( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rxModel, const rtl::OUString& rCustomShowName, std::vector< Reference< XDrawPage > >& rUsedPageList )
 {
 	try

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.cxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.cxx Tue Apr 16 03:55:34 2013
@@ -30,28 +30,32 @@
 
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
-using namespace ::rtl;
+#define SERVICE_NAME "com.sun.star.comp.PPPOptimizer"
+
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 
-#define SERVICE_NAME "com.sun.star.comp.PPPOptimizer"
+using ::rtl::OUString;
 
 // ----------------
 // - PPPOptimizer -
 // ----------------
 
-PPPOptimizer::PPPOptimizer( const Reference< XComponentContext > &rxMSF ) :
-    mxMSF( rxMSF )
+PPPOptimizer::PPPOptimizer( const Reference< XComponentContext > &rxContext ) :
+    mxContext( rxContext )
 {
+    OSL_TRACE("PPPOptimizer::PPPOptimizer");
 }
 
 // -----------------------------------------------------------------------------
 
 PPPOptimizer::~PPPOptimizer()
 {
+    OSL_TRACE("PPPOptimizer::~PPPOptimizer");
 }
 
 // -----------------------------------------------------------------------------
@@ -61,6 +65,7 @@ PPPOptimizer::~PPPOptimizer()
 void SAL_CALL PPPOptimizer::initialize( const Sequence< Any >& aArguments )
 	throw ( Exception, RuntimeException )
 {
+    OSL_TRACE("PPPOptimizer::initialize");
 	if( aArguments.getLength() != 1 )
 		throw IllegalArgumentException();
 
@@ -130,6 +135,7 @@ Sequence< Reference< com::sun::star::fra
 void SAL_CALL PPPOptimizer::dispatch( const URL& rURL, const Sequence< PropertyValue >& lArguments )
     throw( RuntimeException )
 {
+    OSL_TRACE("PPPOptimizer::dispatch");
 	if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.PPPOptimizer:" ) == 0 ) )
 	{
 		if ( rURL.Path.compareToAscii( "optimize" ) == 0 )
@@ -139,7 +145,7 @@ void SAL_CALL PPPOptimizer::dispatch( co
 			{
 				try
 				{
-					ImpOptimizer aOptimizer( mxMSF, xModel );
+					ImpOptimizer aOptimizer( mxContext, xModel );
 					aOptimizer.Optimize( lArguments );
 				}
 				catch( Exception& )

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.hxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizer.hxx Tue Apr 16 03:55:34 2013
@@ -43,12 +43,12 @@ class PPPOptimizer : public cppu::WeakIm
 									com::sun::star::frame::XDispatchProvider,
 									com::sun::star::frame::XDispatch >
 {
-	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
+	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
 	com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
 
 public:
 
-				PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
+				PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
 	virtual		~PPPOptimizer();
 
 	// XInitialization

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.cxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.cxx Tue Apr 16 03:55:34 2013
@@ -27,30 +27,40 @@
 #include "pppoptimizerdialog.hxx" 
 #include "optimizerdialog.hxx" 
 
-using namespace ::rtl;
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <rtl/strbuf.hxx>
+#include <rtl/ref.hxx>
+
+#define SERVICE_NAME "com.sun.star.ui.dialogs.PresentationMinimizerDialog"
+#define IMPLEMENTATION_NAME "com.sun.star.comp.ui.dialogs.PresentationMinimizerDialog"
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 
-#define SERVICE_NAME "com.sun.star.comp.SunPresentationMinimizer"
-#include <rtl/ustrbuf.hxx>
+using ::rtl::OUString;
+using ::com::sun::star::awt::XWindow;
+using ::com::sun::star::awt::XWindowPeer;
 
 // ----------------------
 // - PPPOptimizerDialog -
 // ----------------------
 
-PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &rxMSF ) :
-    mxMSF( rxMSF ),
-	mpOptimizerDialog( NULL )
+PPPOptimizerDialog::PPPOptimizerDialog(
+    const Reference< XComponentContext > &rxContext ) 
+    : m_xContext( rxContext )
+    , mbInitialized( false )
 {
+    OSL_TRACE("PPPOptimizerDialog::PPPOptimizerDialog");
 }
 
 // -----------------------------------------------------------------------------
 
 PPPOptimizerDialog::~PPPOptimizerDialog()
 {
+    OSL_TRACE("PPPOptimizerDialog::~PPPOptimizerDialog");
 }
 
 // -----------------------------------------------------------------------------
@@ -60,12 +70,60 @@ PPPOptimizerDialog::~PPPOptimizerDialog(
 void SAL_CALL PPPOptimizerDialog::initialize( const Sequence< Any >& aArguments )
 	throw ( Exception, RuntimeException )
 {
-	if( aArguments.getLength() != 1 ) 
-		throw IllegalArgumentException();
-
-	aArguments[ 0 ] >>= mxFrame;
-	if ( mxFrame.is() )
-		mxController = mxFrame->getController();
+    OSL_TRACE("PPPOptimizerDialog::initialize");
+    osl::ResettableMutexGuard aGuard( m_aMutex );
+    if ( mbInitialized )
+        throw RuntimeException(
+            OUString( RTL_CONSTASCII_USTRINGPARAM(
+                "PPPOptimizerDialog has already been initialized!") ), 
+                    Reference< XInterface >() );
+    aGuard.clear();
+
+    Reference< XFrame > xFrame;
+    Reference< XController > xController;
+    Reference< XModel > xModel;
+    Reference< XWindow > xWindow;
+
+    const Any *pAny = aArguments.getConstArray();
+    const Any *pEnd = pAny + aArguments.getLength();
+    for ( ; pAny != pEnd && !xFrame.is() && !xWindow.is(); pAny++ )
+    {
+        if ( ( *pAny >>= xFrame ) && xFrame.is() )
+        {
+            xWindow = xFrame->getContainerWindow();
+        }
+        else if ( ( *pAny >>= xController ) && xController.is() )
+        {
+            xFrame = xController->getFrame();
+            if ( xFrame.is() )
+                xWindow = xFrame->getContainerWindow();
+        }
+        else if ( ( *pAny >>= xModel ) && xModel.is() )
+        {
+            xController = xModel->getCurrentController();
+            if ( xController.is() )
+            {
+                xFrame = xController->getFrame();
+                if ( xFrame.is() )
+                    xWindow = xFrame->getContainerWindow();
+            }
+        }
+        else
+            *pAny >>= xWindow;
+    }
+
+    if ( !xFrame.is() )
+        throw IllegalArgumentException(
+            OUString( RTL_CONSTASCII_USTRINGPARAM(
+                "PPPOptimizerDialog must be initialized with an "
+                "XFrame, XController or XModel!") ), 
+                    Reference< XInterface >(), 0 );
+
+    aGuard.reset();
+    mxFrame = xFrame;
+    mxParentWindow.set( xWindow, UNO_QUERY );
+    mbInitialized = true;
+    aGuard.clear();
 }
 
 // -----------------------------------------------------------------------------
@@ -90,110 +148,48 @@ Sequence< OUString > SAL_CALL PPPOptimiz
 	return PPPOptimizerDialog_getSupportedServiceNames();
 }
 
-// -----------------------------------------------------------------------------
-// XDispatchProvider
-// -----------------------------------------------------------------------------
 
-Reference< com::sun::star::frame::XDispatch > SAL_CALL PPPOptimizerDialog::queryDispatch(
-	const URL& aURL, const ::rtl::OUString& /* aTargetFrameName */, sal_Int32 /* nSearchFlags */ ) throw( RuntimeException )
+void SAL_CALL PPPOptimizerDialog::setTitle( const ::rtl::OUString& aTitle )
+throw (::com::sun::star::uno::RuntimeException)
 {
-	Reference < XDispatch > xRet;
-    if ( aURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) == 0 )
-		xRet = this;
-
-	return xRet;
+    osl::MutexGuard aGuard( m_aMutex );
+    msTitle = aTitle;
 }
 
-//------------------------------------------------------------------------------
+::sal_Int16 SAL_CALL PPPOptimizerDialog::execute(  )
+throw (::com::sun::star::uno::RuntimeException)
+{
+    OSL_TRACE("PPPOptimizerDialog::execute");
+    sal_Int16 aRet = ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
+
+    osl::ClearableMutexGuard aGuard( m_aMutex );
+    bool bInit( mbInitialized );
+    Reference< XFrame > xFrame( mxFrame );
+    Reference< XWindowPeer > xParent( mxParentWindow );
+    aGuard.clear();
+
+    if ( !bInit || !xFrame.is() || !xParent.is() )
+        throw RuntimeException();
+    try
+    {
+        OptimizerDialog *pDialog(
+            new OptimizerDialog( m_xContext, xFrame, xParent ) );
+        pDialog->setTitle( msTitle );
+        aRet = pDialog->execute();
+        delete pDialog;
+    }
+    catch( ... )
+    {
+    }
 
-Sequence< Reference< com::sun::star::frame::XDispatch > > SAL_CALL PPPOptimizerDialog::queryDispatches(
-	const Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( RuntimeException )
-{
-	Sequence< Reference< com::sun::star::frame::XDispatch> > aReturn( aDescripts.getLength() );
-	Reference< com::sun::star::frame::XDispatch>* pReturn = aReturn.getArray();
-	const com::sun::star::frame::DispatchDescriptor* pDescripts = aDescripts.getConstArray();
-	for (sal_Int16 i = 0; i < aDescripts.getLength(); ++i, ++pReturn, ++pDescripts )
-	{
-		*pReturn = queryDispatch( pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags );
-	}
-	return aReturn;
-}
-
-// -----------------------------------------------------------------------------
-// XDispatch
-// -----------------------------------------------------------------------------
-
-void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
-											const Sequence< PropertyValue >& rArguments )
-    throw( RuntimeException )
-{
-	sal_Int64 nFileSizeSource = 0;
-	sal_Int64 nFileSizeDest = 0;
-
-	if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) == 0 ) )
-	{
-		if ( rURL.Path.compareToAscii( "execute" ) == 0 )
-		{
-			sal_Bool bDialogExecuted = sal_False;
-
-			try
-			{
-				mpOptimizerDialog = new OptimizerDialog( mxMSF, mxFrame, this );
-				bDialogExecuted = mpOptimizerDialog->execute();
-
-				const Any* pVal( mpOptimizerDialog->maStats.GetStatusValue( TK_FileSizeSource ) );
-				if ( pVal )
-					*pVal >>= nFileSizeSource;
-				pVal = mpOptimizerDialog->maStats.GetStatusValue( TK_FileSizeDestination );
-				if ( pVal )
-					*pVal >>= nFileSizeDest;
-
-				if ( nFileSizeSource && nFileSizeDest )
-				{
-					rtl::OUStringBuffer sBuf( rtl::OUString::createFromAscii( "Your Presentation has been minimized from:" ) );
-					sBuf.append( rtl::OUString::valueOf( nFileSizeSource >> 10 ) );
-					sBuf.append( rtl::OUString::createFromAscii( "KB to " ) );
-					sBuf.append( rtl::OUString::valueOf( nFileSizeDest >> 10 ) );
-					sBuf.append( rtl::OUString::createFromAscii( "KB." ) );
-					OUString sResult( sBuf.makeStringAndClear() );
-//					mpOptimizerDialog->showMessageBox( sResult, sResult, sal_False );
-				}
-				delete mpOptimizerDialog, mpOptimizerDialog = NULL;
-			}
-			catch( ... )
-			{
-
-			}
-		}
-		else if ( rURL.Path.compareToAscii( "statusupdate" ) == 0 )
-		{
-			if ( mpOptimizerDialog )
-				mpOptimizerDialog->UpdateStatus( rArguments );
-		}
-	}
-}
-
-//===============================================
-void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusListener >&, const URL& )
-	throw( RuntimeException )
-{
-    // TODO
-	// OSL_ENSURE( sal_False, "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" );
-}
-
-//===============================================
-void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatusListener >&, const URL& )
-    throw( RuntimeException )
-{
-    // TODO
-    // OSL_ENSURE( sal_False, "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" );
+    return aRet;
 }
 
 // -----------------------------------------------------------------------------
 
 OUString PPPOptimizerDialog_getImplementationName()
 {
-	return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.SunPresentationMinimizerImp" ) );
+	return OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
 }
 
 Sequence< OUString > PPPOptimizerDialog_getSupportedServiceNames() 

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.hxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizerdialog.hxx Tue Apr 16 03:55:34 2013
@@ -31,41 +31,46 @@
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
-#ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#endif
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/frame/XController.hpp>
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <cppuhelper/implbase4.hxx>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/basemutex.hxx>
 
 // ----------------------
 // - PPPOptimizerDialog -
 // ----------------------
 
-class OptimizerDialog;
-class PPPOptimizerDialog : public	::cppu::WeakImplHelper4<
+class PPPOptimizerDialog :  protected ::cppu::BaseMutex,
+                            public	::cppu::WeakImplHelper3<
 									com::sun::star::lang::XInitialization,
 									com::sun::star::lang::XServiceInfo,
-									com::sun::star::frame::XDispatchProvider,
-									com::sun::star::frame::XDispatch >
+                                    com::sun::star::ui::dialogs::XExecutableDialog >
 {
-	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::frame::XController > mxController;
-
-	OptimizerDialog*	mpOptimizerDialog;
+private:
+	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
+    bool mbInitialized;
+    com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
+	com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > mxParentWindow;
+    rtl::OUString msTitle;
 
 public:
 
-	PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
+	PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
 	virtual	~PPPOptimizerDialog();
 
 	// XInitialization
 	void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
 		throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException );
 
+    virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
+    virtual ::sal_Int16 SAL_CALL execute(  ) throw (::com::sun::star::uno::RuntimeException);
+
 	// XServiceInfo
     virtual ::rtl::OUString SAL_CALL getImplementationName()
         throw( com::sun::star::uno::RuntimeException );
@@ -75,26 +80,6 @@ public:
 
 	virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
         throw( com::sun::star::uno::RuntimeException );
-
-	// XDispatchProvider
-	virtual com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(
-		const com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags )
-			throw(com::sun::star::uno::RuntimeException);
-
-	virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(
-		const com::sun::star::uno::Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( com::sun::star::uno::RuntimeException );
-
-    // XDispatch
-    virtual void SAL_CALL dispatch( const com::sun::star::util::URL& aURL,
-										const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lArguments )
-        throw( com::sun::star::uno::RuntimeException );
-
-    virtual void SAL_CALL addStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
-												const com::sun::star::util::URL& aURL )
-        throw( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL removeStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
-												const com::sun::star::util::URL& aURL )
-        throw( com::sun::star::uno::RuntimeException );
 };
 
 rtl::OUString PPPOptimizerDialog_getImplementationName();

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.cxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.cxx Tue Apr 16 03:55:34 2013
@@ -49,7 +49,7 @@ struct TokenTable
 	const char*						    pS;
 	PPPOptimizerTokenEnum				pE;
 };
-																																																					
+
 static const TokenTable pTokenTableArray[] = 
 {
 	{ "rdmNavi",			TK_rdmNavi },
@@ -112,7 +112,6 @@ static const TokenTable pTokenTableArray
 	{ "Alpha",				TK_Alpha },
 	{ "Animated",			TK_Animated },
 	{ "Background",			TK_Background },
-	{ "BitmapPath",			TK_BitmapPath },
 	{ "Border",				TK_Border },
 	{ "Closeable",			TK_Closeable },
 	{ "ColorMode",			TK_ColorMode },
@@ -146,11 +145,11 @@ static const TokenTable pTokenTableArray
 	{ "GraphicURL",			TK_GraphicURL },
 	{ "GraphicStreamURL",	TK_GraphicStreamURL },
 	{ "Height",				TK_Height },
-	{ "HelpFile",			TK_HelpFile },
+    { "HelpURL",            TK_HelpURL },
 	{ "Hidden",				TK_Hidden },
 	{ "ID",					TK_ID },
 	{ "ImageURL",			TK_ImageURL },
-	{ "InformationDialog",	TK_InformationDialog },
+	{ "ParentWindow",	    TK_ParentWindow },// TODO move it
 	{ "InputStream",		TK_InputStream },
 	{ "Interlaced",			TK_Interlaced },
 	{ "IsInternal",			TK_IsInternal },
@@ -186,7 +185,7 @@ static const TokenTable pTokenTableArray
 	{ "Spin",				TK_Spin },
 	{ "Step",				TK_Step },
 	{ "State",				TK_State },
-	{ "StatusDispatcher",	TK_StatusDispatcher },
+	{ "StatusListener",	    TK_StatusListener },
 	{ "StringItemList",		TK_StringItemList },
 	{ "Strings",			TK_Strings },
 	{ "TabIndex",			TK_TabIndex },
@@ -226,8 +225,8 @@ static const TokenTable pTokenTableArray
 	{ "CurrentGraphicObject",TK_CurrentGraphicObject },
 	{ "OLEObjects",			TK_OLEObjects },
 	{ "CurrentOLEObject",	TK_CurrentOLEObject },
-
-	{ "STR_SUN_OPTIMIZATION_WIZARD2",STR_SUN_OPTIMIZATION_WIZARD2 },
+#if 0
+	{ "STR_PRESENTATION_MINIMIZER",STR_PRESENTATION_MINIMIZER },
 	{ "STR_STEPS",					STR_STEPS },
 	{ "STR_HELP",					STR_HELP },
 	{ "STR_BACK",					STR_BACK },
@@ -292,7 +291,7 @@ static const TokenTable pTokenTableArray
 	{ "STR_OPTIMIZING_GRAPHICS",	STR_OPTIMIZING_GRAPHICS },
 	{ "STR_CREATING_OLE_REPLACEMENTS",STR_CREATING_OLE_REPLACEMENTS },
 	{ "STR_FileSizeSeparator",		STR_FILESIZESEPARATOR },
-	
+#endif
 	{ "Last",				TK_Last }, 
 	{ "NotFound",			TK_NotFound }
 };

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.hxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.hxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizertoken.hxx Tue Apr 16 03:55:34 2013
@@ -88,7 +88,6 @@ enum PPPOptimizerTokenEnum
 	TK_Alpha,
 	TK_Animated,
 	TK_Background,
-	TK_BitmapPath,
 	TK_Border,
 	TK_Closeable,
 	TK_ColorMode,
@@ -122,11 +121,11 @@ enum PPPOptimizerTokenEnum
 	TK_GraphicURL,
 	TK_GraphicStreamURL,
 	TK_Height,
-	TK_HelpFile,
+    TK_HelpURL,
 	TK_Hidden,
 	TK_ID,
 	TK_ImageURL,
-	TK_InformationDialog,
+	TK_ParentWindow,
 	TK_InputStream,
 	TK_Interlaced,
 	TK_IsInternal,
@@ -162,7 +161,7 @@ enum PPPOptimizerTokenEnum
 	TK_Spin,
 	TK_Step,
 	TK_State,
-	TK_StatusDispatcher,
+	TK_StatusListener,
 	TK_StringItemList,
 	TK_Strings,
 	TK_TabIndex,
@@ -202,8 +201,8 @@ enum PPPOptimizerTokenEnum
 	TK_CurrentGraphicObject,
 	TK_OLEObjects,
 	TK_CurrentOLEObject,
-
-	STR_SUN_OPTIMIZATION_WIZARD2,
+#if 0
+	STR_PRESENTATION_MINIMIZER,
 	STR_STEPS,
 	STR_HELP,
 	STR_BACK,
@@ -268,7 +267,7 @@ enum PPPOptimizerTokenEnum
 	STR_OPTIMIZING_GRAPHICS,
 	STR_CREATING_OLE_REPLACEMENTS,
 	STR_FILESIZESEPARATOR,
-
+#endif
 	TK_Last, 
 	TK_NotFound
 };

Modified: openoffice/trunk/main/sdext/source/minimizer/pppoptimizeruno.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sdext/source/minimizer/pppoptimizeruno.cxx?rev=1468299&r1=1468298&r2=1468299&view=diff
==============================================================================
--- openoffice/trunk/main/sdext/source/minimizer/pppoptimizeruno.cxx (original)
+++ openoffice/trunk/main/sdext/source/minimizer/pppoptimizeruno.cxx Tue Apr 16 03:55:34 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,110 +7,66 @@
  * 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 <stdio.h>
-#include <osl/mutex.hxx>
-#include <osl/thread.h>
+#include "pppoptimizer.hxx"
+#include "pppoptimizerdialog.hxx"
+
 #include <cppuhelper/factory.hxx>
-#include <pppoptimizer.hxx>
-#include <pppoptimizerdialog.hxx>
+#include <cppuhelper/implementationentry.hxx>
 
-using namespace ::rtl;
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
 
-extern "C"
+namespace sdext_presentation_minimizer
 {
-    void SAL_CALL component_getImplementationEnvironment(
-	    const sal_Char ** ppEnvTypeName, uno_Environment ** )
+    static struct cppu::ImplementationEntry g_entries[] =
     {
-	    *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-    }
+        {
+            PPPOptimizer_createInstance,
+            PPPOptimizer_getImplementationName,
+            PPPOptimizer_getSupportedServiceNames,
+            cppu::createSingleComponentFactory,
+            0,
+            0
+        },
+        {
+            PPPOptimizerDialog_createInstance,
+            PPPOptimizerDialog_getImplementationName,
+            PPPOptimizer_getSupportedServiceNames,
+            cppu::createSingleComponentFactory,
+            0,
+            0
+        },
+        { 0, 0, 0, 0, 0, 0 }
+    };
+}
 
-    // -------------------------------------------------------------------------
-    
-    sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
+extern "C"
+{
+    SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+        const sal_Char **ppEnvTypeName, uno_Environment **/*ppEnv*/ )
     {
-	    if (pRegistryKey)
-	    {
-		    try
-		    {
-                Reference< XRegistryKey >   xNewKey;
-                sal_Int32                   nPos;
-
-                xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizer_getImplementationName() );
-                xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
-                const Sequence< OUString > & rSNL1 = PPPOptimizer_getSupportedServiceNames();
-			    const OUString * pArray1 = rSNL1.getConstArray();
-			    for ( nPos = rSNL1.getLength(); nPos--; )
-				    xNewKey->createKey( pArray1[nPos] );
-
-                xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizerDialog_getImplementationName() ); 
-                xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
-			    const Sequence< OUString > & rSNL2 = PPPOptimizerDialog_getSupportedServiceNames();
-			    const OUString * pArray2 = rSNL2.getConstArray();
-			    for ( nPos = rSNL2.getLength(); nPos--; )
-				    xNewKey->createKey( pArray2[nPos] );
-
-			    return sal_True;
-		    }
-		    catch (InvalidRegistryException &)
-		    {
-			    OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
-		    }
-	    }
-	    return sal_False;
+        *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
     }
 
-    // -------------------------------------------------------------------------
-
-    void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
+    SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
+        const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey )
     {
-        OUString    aImplName( OUString::createFromAscii( pImplName ) );
-	    void*       pRet = 0;
-
-        if( pServiceManager )
-        {
-            Reference< XSingleComponentFactory > xFactory;
-            if( aImplName.equals( PPPOptimizer_getImplementationName() ) )
-	        {
-		        xFactory = createSingleComponentFactory(
-						PPPOptimizer_createInstance,
-						OUString::createFromAscii( pImplName ), 
-						PPPOptimizer_getSupportedServiceNames() );
-
-	        }
-            else if( aImplName.equals( PPPOptimizerDialog_getImplementationName() ) )
-	        {
-				xFactory = createSingleComponentFactory(
-						PPPOptimizerDialog_createInstance,
-                        OUString::createFromAscii( pImplName ),
-						PPPOptimizerDialog_getSupportedServiceNames() );
-	        }
-            if( xFactory.is() )
-            {
-			    xFactory->acquire();
-                pRet = xFactory.get();
-            }
-        }
-	    return pRet;
+        return ::cppu::component_getFactoryHelper( pImplName,
+                pServiceManager,
+                pRegistryKey ,
+                sdext_presentation_minimizer::g_entries );
     }
 }



Mime
View raw message