summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-07-08 18:26:47 +0200
committerPetr Mladek <pmladek@suse.cz>2013-07-09 09:12:34 +0000
commit3d34cb44ec61b9840415bb08c3bf38513409e254 (patch)
tree7fdf8bea04e100f5117933a6bb518948471b9f9d
parentaa690363c51c43a281b06953627d335c31a0111d (diff)
fdo#65055: sfx: fix automatic version on close
The parameter "FailOnWarning" is passed around better now, so it arrives in SfxBaseModel::storeSelf() which considers it illegal. (regression from e2799d253b1dc62967693aa5bccd7360a9520967) Change-Id: I2a51a2ecc24e6de506e1840bd28cbe157a8ad6a5 (cherry picked from commit 969bc572441ef8fd43cd7d350a533ffd715b74d3) Reviewed-on: https://gerrit.libreoffice.org/4773 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit 6eb2fdb168c6e6da6c30b71eb80c759c553f1770) Reviewed-on: https://gerrit.libreoffice.org/4775 Reviewed-by: David Tardon <dtardon@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--sfx2/source/doc/guisaveas.cxx5
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
2 files changed, 6 insertions, 3 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a2701549606a..b6c995cc4f22 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1456,9 +1456,10 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
{
aModelData.GetStorable2()->storeSelf( aModelData.GetMediaDescr().getAsConstPropertyValueList() );
}
- catch( const lang::IllegalArgumentException& )
+ catch (const lang::IllegalArgumentException& e)
{
- OSL_FAIL( "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" );
+ SAL_WARN("sfx", "Ignoring parameters! "
+ "ModelData considers this illegal: " << e.Message);
aModelData.GetStorable()->store();
}
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index d5d5814d8fa9..6fc3521c8dcb 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1572,7 +1572,9 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
// check that only acceptable parameters are provided here
if ( aSeqArgs[nInd].Name != "VersionComment" && aSeqArgs[nInd].Name != "Author"
&& aSeqArgs[nInd].Name != "InteractionHandler" && aSeqArgs[nInd].Name != "StatusIndicator"
- && aSeqArgs[nInd].Name != "VersionMajor" && aSeqArgs[nInd].Name != "CheckIn" )
+ && aSeqArgs[nInd].Name != "VersionMajor"
+ && aSeqArgs[nInd].Name != "FailOnWarning"
+ && aSeqArgs[nInd].Name != "CheckIn" )
{
m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "unexpected parameter for storeSelf, might be no problem if SaveAs is executed." ) );
m_pData->m_pObjectShell->StoreLog();