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

Michael Stahl mstahl at redhat.com
Mon Jul 8 10:10:47 PDT 2013


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

New commits:
commit 170edbcf85fd77ab9b3470bf7a727dadb377a416
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/4774
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index c6af316..9c30418 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1374,9 +1374,10 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::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 540c190..def9202 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1568,7 +1568,9 @@ void SAL_CALL SfxBaseModel::storeSelf( const    uno::Sequence< beans::PropertyVa
             // 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( ::rtl::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