[Libreoffice-commits] core.git: Branch 'aoo/trunk' - comphelper/source filter/source sfx2/source svtools/source sw/source

Jim Jagielski jim at apache.org
Wed Aug 16 22:10:24 UTC 2017


 comphelper/source/container/embeddedobjectcontainer.cxx |    6 ++--
 filter/source/msfilter/svdfppt.cxx                      |    5 ++++
 sfx2/source/appl/linkmgr2.cxx                           |   20 ++++++++--------
 svtools/source/misc/embedhlp.cxx                        |    2 -
 sw/source/filter/ww8/ww8par2.cxx                        |   10 ++++----
 5 files changed, 24 insertions(+), 19 deletions(-)

New commits:
commit c69706339cae9addb482464b03bba7a8b60e13c1
Author: Jim Jagielski <jim at apache.org>
Date:   Wed Aug 16 20:13:07 2017 +0000

    Align w/ AOO414 on these fixes

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 41d93ec3fcd6..8943fd975560 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -127,7 +127,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer()
     pImpl = new EmbedImpl;
     pImpl->mxStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
     pImpl->mbOwnsStorage = true;
-    pImpl->mbUserAllowsLinkUpdate = true;
+    pImpl->mbUserAllowsLinkUpdate = false;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -136,7 +136,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
     pImpl->mbOwnsStorage = false;
-    pImpl->mbUserAllowsLinkUpdate = true;
+    pImpl->mbUserAllowsLinkUpdate = false;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -145,7 +145,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
     pImpl->mbOwnsStorage = false;
-    pImpl->mbUserAllowsLinkUpdate = true;
+    pImpl->mbUserAllowsLinkUpdate = false;
     pImpl->mpTempObjectContainer = 0;
     pImpl->m_xModel = xModel;
 }
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index fbfb1e689dbf..a551f82d12e1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -4383,6 +4383,11 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
                 sal_uInt16 nLevelAnz;
                 rIn >> nLevelAnz;
 
+                if (nLevelAnz > 5)
+                {
+                    throw std::range_error("Bad input file, Too many stylesheet levels");
+                }
+
                 sal_uInt16 nLev = 0;
                 sal_Bool bFirst = sal_True;
                 bFoundTxMasterStyleAtom04 = sal_True;
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 35a69c9b4903..f6b00ded0ea9 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -315,18 +315,18 @@ void LinkManager::UpdateAllLinks(
 
         if( bAskUpdate )
         {
-            int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ) ).Execute();
-            if( RET_YES != nRet )
-            {
-                SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
+            int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_NO, SfxResId( STR_QUERY_UPDATE_LINKS ) ).Execute();
+            SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
 
-                if(pShell)
-                {
-                    comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
-                    rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
-                }
+            if(pShell)
+            {
+                comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
+                rEmbeddedObjectContainer.setUserAllowsLinkUpdate(RET_YES == nRet);
+            }
 
-                return ;        // nothing should be updated
+            if (RET_YES != nRet)
+            {
+                return;     // nothing should be updated
             }
             bAskUpdate = sal_False;     // one time is OK
         }
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 8cfb455ca86a..b9d79a633079 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -709,7 +709,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
     if ( !xStream.is() )
     {
         RTL_LOGFILE_CONTEXT_TRACE( aLog, "getting stream from object" );
-        bool bUserAllowsLinkUpdate(true);
+        bool bUserAllowsLinkUpdate(false);
         const comphelper::EmbeddedObjectContainer* pContainer = GetContainer();
 
         if(pContainer)
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index d432a23a89ee..e0b91b813e96 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -4561,17 +4561,17 @@ void WW8RStyle::ImportOldFormatStyles()
         rSt >> cb;
         nByteCount++;
 
-        aCHPXOffsets[stcp].mnSize = 0;
+        aCHPXOffsets.at(stcp).mnSize = 0;
 
         if (cb != 0xFF)
         {
             sal_uInt8 nRemainder = cb;
 
-            aCHPXOffsets[stcp].mnOffset = rSt.Tell();
-            aCHPXOffsets[stcp].mnSize = nRemainder;
+            aCHPXOffsets.at(stcp).mnOffset = rSt.Tell();
+            aCHPXOffsets.at(stcp).mnSize = nRemainder;
 
-            Word2CHPX aChpx = ReadWord2Chpx(rSt, aCHPXOffsets[stcp].mnOffset,
-                aCHPXOffsets[stcp].mnSize);
+            Word2CHPX aChpx = ReadWord2Chpx(rSt, aCHPXOffsets.at(stcp).mnOffset,
+                aCHPXOffsets.at(stcp).mnSize);
             aConvertedChpx.push_back( ChpxToSprms(aChpx) );
 
             nByteCount += nRemainder;


More information about the Libreoffice-commits mailing list