You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2017/08/16 20:13:07 UTC

svn commit: r1805237 - in /openoffice/trunk/main: comphelper/source/container/embeddedobjectcontainer.cxx filter/source/msfilter/svdfppt.cxx sfx2/source/appl/linkmgr2.cxx svtools/source/misc/embedhlp.cxx sw/source/filter/ww8/ww8par2.cxx

Author: jim
Date: Wed Aug 16 20:13:07 2017
New Revision: 1805237

URL: http://svn.apache.org/viewvc?rev=1805237&view=rev
Log:
Align w/ AOO414 on these fixes

Modified:
    openoffice/trunk/main/comphelper/source/container/embeddedobjectcontainer.cxx
    openoffice/trunk/main/filter/source/msfilter/svdfppt.cxx
    openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx
    openoffice/trunk/main/svtools/source/misc/embedhlp.cxx
    openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx

Modified: openoffice/trunk/main/comphelper/source/container/embeddedobjectcontainer.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/comphelper/source/container/embeddedobjectcontainer.cxx?rev=1805237&r1=1805236&r2=1805237&view=diff
==============================================================================
--- openoffice/trunk/main/comphelper/source/container/embeddedobjectcontainer.cxx (original)
+++ openoffice/trunk/main/comphelper/source/container/embeddedobjectcontainer.cxx Wed Aug 16 20:13:07 2017
@@ -127,7 +127,7 @@ EmbeddedObjectContainer::EmbeddedObjectC
     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::EmbeddedObjectC
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
     pImpl->mbOwnsStorage = false;
-    pImpl->mbUserAllowsLinkUpdate = true;
+    pImpl->mbUserAllowsLinkUpdate = false;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -145,7 +145,7 @@ EmbeddedObjectContainer::EmbeddedObjectC
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
     pImpl->mbOwnsStorage = false;
-    pImpl->mbUserAllowsLinkUpdate = true;
+    pImpl->mbUserAllowsLinkUpdate = false;
     pImpl->mpTempObjectContainer = 0;
     pImpl->m_xModel = xModel;
 }

Modified: openoffice/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1805237&r1=1805236&r2=1805237&view=diff
==============================================================================
--- openoffice/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ openoffice/trunk/main/filter/source/msfilter/svdfppt.cxx Wed Aug 16 20:13:07 2017
@@ -4383,6 +4383,11 @@ PPTStyleSheet::PPTStyleSheet( const DffR
 				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;

Modified: openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx?rev=1805237&r1=1805236&r2=1805237&view=diff
==============================================================================
--- openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx (original)
+++ openoffice/trunk/main/sfx2/source/appl/linkmgr2.cxx Wed Aug 16 20:13:07 2017
@@ -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
 		}

Modified: openoffice/trunk/main/svtools/source/misc/embedhlp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/misc/embedhlp.cxx?rev=1805237&r1=1805236&r2=1805237&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/misc/embedhlp.cxx (original)
+++ openoffice/trunk/main/svtools/source/misc/embedhlp.cxx Wed Aug 16 20:13:07 2017
@@ -709,7 +709,7 @@ SvStream* EmbeddedObjectRef::GetGraphicS
     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)

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx?rev=1805237&r1=1805236&r2=1805237&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8par2.cxx Wed Aug 16 20:13:07 2017
@@ -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;