[Libreoffice-commits] core.git: Branch 'libreoffice-4-1-0' - sfx2/source

Michael Stahl mstahl at redhat.com
Tue Jul 9 02:12:56 PDT 2013


 sfx2/source/doc/guisaveas.cxx    |    5 +++--
 sfx2/source/doc/sfxbasemodel.cxx |    4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 3d34cb44ec61b9840415bb08c3bf38513409e254
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 8 18:26:47 2013 +0200

    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 at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    (cherry picked from commit 6eb2fdb168c6e6da6c30b71eb80c759c553f1770)
    Reviewed-on: https://gerrit.libreoffice.org/4775
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a270154..b6c995c 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 d5d5814..6fc3521 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();


More information about the Libreoffice-commits mailing list