summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2007-08-16 16:12:26 +0000
committerSven Jacobi <sj@openoffice.org>2007-08-16 16:12:26 +0000
commit70ba36b0f5a31ecbd6f65d7da1a9560f85030756 (patch)
treeee7eef44e62867b77016d87c81c15bb356d7f8d7
parentusing localized file size separator (diff)
downloadcore-70ba36b0f5a31ecbd6f65d7da1a9560f85030756.tar.gz
core-70ba36b0f5a31ecbd6f65d7da1a9560f85030756.zip
storing setting if newly created document should be opened to configuration
-rw-r--r--sdext/source/minimizer/configurationaccess.cxx4
-rw-r--r--sdext/source/minimizer/impoptimizer.cxx6
-rw-r--r--sdext/source/minimizer/informationdialog.cxx10
-rw-r--r--sdext/source/minimizer/optimizerdialog.cxx22
-rw-r--r--sdext/source/minimizer/optimizerdialogcontrols.cxx8
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.cxx5
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.hxx5
7 files changed, 23 insertions, 37 deletions
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index cc9795c9843e..490f2c241178 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: configurationaccess.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index 587f581d1c5a..f7919db3f4c9 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: impoptimizer.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -770,6 +770,8 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments )
{
InformationDialog aInformationDialog( mxMSF, mxInformationDialog, maSaveAsURL, mbOpenNewDocument, nSourceSize, nDestSize, nEstimatedFileSize );
aInformationDialog.execute();
+ SetStatusValue( TK_OpenNewDocument, Any( mbOpenNewDocument ) );
+ DispatchStatus();
}
if ( maSaveAsURL.getLength() )
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index b7a3ff3cbaf5..10a214da8cf3 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: informationdialog.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sj $ $Date: 2007-05-24 10:08:35 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -290,9 +290,6 @@ void InformationDialog::InitDialog()
Sequence< rtl::OUString > aNames( pNames, nCount );
Sequence< Any > aValues( pValues, nCount );
- sal_Bool bOpenNewDocument = mrbOpenNewDocument;
- setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) );
-
mxDialogModelMultiPropertySet->setPropertyValues( aNames, aValues );
sal_Int64 nSource = mnSourceSize;
@@ -359,6 +356,9 @@ void InformationDialog::InitDialog()
if ( maSaveAsURL.getLength() )
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 ) );
}
// -----------------------------------------------------------------------------
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index 1e4070ffc27b..7586cfec6dbf 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: optimizerdialog.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: sj $ $Date: 2007-08-16 14:33:00 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -287,11 +287,6 @@ void OptimizerDialog::UpdateConfiguration()
}
}
}
-
- // page4
-// aAny = getControlProperty( TKGet( TK_CheckBox0Pg4 ), TKGet( TK_State ) );
-// if ( aAny >>= nInt16 )
-// SetConfigProperty( TK_OpenNewDocument, Any( nInt16 != 0 ) );
}
// -----------------------------------------------------------------------------
@@ -443,6 +438,10 @@ void OptimizerDialog::UpdateStatus( const com::sun::star::uno::Sequence< com::su
if ( *pVal >>= nProgress )
setControlProperty( TKGet( TK_Progress ), TKGet( TK_ProgressValue ), Any( nProgress ) );
}
+ pVal = maStats.GetStatusValue( TK_OpenNewDocument );
+ if ( pVal )
+ SetConfigProperty( TK_OpenNewDocument, *pVal );
+
mxReschedule->reschedule();
}
}
@@ -554,12 +553,6 @@ void ItemListener::itemStateChanged( const ItemEvent& Event )
mrOptimizerDialog.setControlProperty( TKGet( TK_ListBox0Pg3 ), TKGet( TK_Enabled ), Any( nState != 0 ) );
}
break;
- case TK_CheckBox0Pg4 :
- {
- if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
- mrOptimizerDialog.SetConfigProperty( TK_OpenNewDocument, Any( nState != 0 ) );
- }
- break;
case TK_CheckBox1Pg4 :
{
if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
@@ -570,10 +563,7 @@ void ItemListener::itemStateChanged( const ItemEvent& Event )
case TK_RadioButton1Pg4 :
{
if ( xPropertySet->getPropertyValue( TKGet( TK_State ) ) >>= nState )
- {
- mrOptimizerDialog.setControlProperty( TKGet( TK_CheckBox0Pg4 ), TKGet( TK_Enabled ), Any( eControl == TK_RadioButton1Pg4 ) );
mrOptimizerDialog.SetConfigProperty( TK_SaveAs, Any( eControl == TK_RadioButton1Pg4 ? nState != 0 : nState == 0 ) );
- }
}
break;
default:
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index d1eeed8d86f7..38ce7831c20a 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: optimizerdialogcontrols.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -638,7 +638,6 @@ static OUString ImpValueOfInMB( const sal_Int64& rVal, sal_Unicode nSeparator =
void OptimizerDialog::UpdateControlStatesPage4()
{
sal_Bool bSaveAs( GetConfigProperty( TK_SaveAs, sal_True ) );
- sal_Bool bOpenNew( GetConfigProperty( TK_OpenNewDocument, sal_True ) );
if ( mbIsReadonly )
{
setControlProperty( TKGet( TK_RadioButton0Pg4 ), TKGet( TK_State ), Any( (sal_Int16)( sal_False ) ) );
@@ -649,8 +648,6 @@ void OptimizerDialog::UpdateControlStatesPage4()
setControlProperty( TKGet( TK_RadioButton0Pg4 ), TKGet( TK_State ), Any( (sal_Int16)( bSaveAs == sal_False ) ) );
setControlProperty( TKGet( TK_RadioButton1Pg4 ), TKGet( TK_State ), Any( (sal_Int16)( bSaveAs == sal_True ) ) );
}
- setControlProperty( TKGet( TK_CheckBox0Pg4 ), TKGet( TK_State ), Any( (sal_Int16)( bOpenNew ) ) );
- setControlProperty( TKGet( TK_CheckBox0Pg4 ), TKGet( TK_Enabled ), Any( bSaveAs ) );
setControlProperty( TKGet( TK_ComboBox0Pg4 ), TKGet( TK_Enabled ), Any( sal_False ) );
sal_uInt32 w;
@@ -905,7 +902,6 @@ void OptimizerDialog::InitPage4()
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( InsertCheckBox( *this, TKGet( TK_CheckBox0Pg4 ), mxItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X + 14, PAGE_POS_Y + 38, PAGE_WIDTH - 18, 8, 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( InsertFixedText( *this, TKGet( TK_FixedText4Pg4 ), OUString(), PAGE_POS_X + 6, PAGE_POS_Y + 14, PAGE_WIDTH - 12, 8, sal_False, sal_False, mnTabIndex++ ) );
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index 4385c8384b69..5b597ec9199c 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: pppoptimizertoken.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -104,7 +104,6 @@ static const TokenTable pTokenTableArray[] =
{ "Separator0Pg4", TK_Separator0Pg4 },
{ "RadioButton0Pg4", TK_RadioButton0Pg4 },
{ "RadioButton1Pg4", TK_RadioButton1Pg4 },
- { "CheckBox0Pg4", TK_CheckBox0Pg4 },
{ "Separator1Pg4", TK_Separator1Pg4 },
{ "FixedText0Pg4", TK_FixedText0Pg4 },
{ "FixedText1Pg4", TK_FixedText1Pg4 },
diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx
index a182f0afc620..488676439192 100644
--- a/sdext/source/minimizer/pppoptimizertoken.hxx
+++ b/sdext/source/minimizer/pppoptimizertoken.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: pppoptimizertoken.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: sj $ $Date: 2007-08-16 16:08:04 $
+ * last change: $Author: sj $ $Date: 2007-08-16 17:12:26 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -80,7 +80,6 @@ enum PPPOptimizerTokenEnum
TK_Separator0Pg4,
TK_RadioButton0Pg4,
TK_RadioButton1Pg4,
- TK_CheckBox0Pg4,
TK_Separator1Pg4,
TK_FixedText0Pg4,
TK_FixedText1Pg4,