[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 7 commits - extensions/source lotuswordpro/source oox/source sfx2/source vcl/win
Tor Lillqvist
tml at collabora.com
Thu Dec 10 07:09:19 PST 2015
extensions/source/plugin/base/xplugin.cxx | 11 ++++++++---
extensions/source/plugin/inc/plugin/win/sysplug.hxx | 3 +++
extensions/source/plugin/win/sysplug.cxx | 10 +++++++++-
lotuswordpro/source/filter/lwpfilter.cxx | 2 +-
lotuswordpro/source/filter/lwptabrack.cxx | 7 +++++--
oox/source/export/chartexport.cxx | 2 +-
sfx2/source/sidebar/ControllerItem.cxx | 1 +
vcl/win/source/gdi/winlayout.cxx | 3 ++-
8 files changed, 30 insertions(+), 9 deletions(-)
New commits:
commit 4fbc1875a1a44efaf852fecf1fe997f28a4063cb
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Dec 7 14:01:39 2015 +0200
tdf#96070: Just give up on glyph caching for non-horizontal text
Change-Id: I60f54523f927e97d739a4c735e54b2cc3400aff3
Reviewed-on: https://gerrit.libreoffice.org/20436
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit 3b74c0f8b750cfe89598358fba811f4900287b64)
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index abbdc5a..3f5a78c 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -371,7 +371,8 @@ bool ImplWinFontEntry::AddChunkOfGlyphs(int nGlyphIndex, const WinLayout& rLayou
aChunk.mbVertical = false;
}
- if (aChunk.mbVertical && aLogfont.lfEscapement != 2700)
+ // Don't even try to handle non-horizontal text
+ if (aChunk.mbVertical || aLogfont.lfEscapement != 0)
return false;
OpenGLCompatibleDC aDC(rGraphics, 0, 0, nBitmapWidth, nBitmapHeight);
commit a1195d9f66c93f229623f14b6ec6d302f3035bce
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 8 17:32:13 2015 +0100
tdf#62381: Stop using NPAPI plugin when NP_Initialize fails
(...in the Windows-specific code path)
Change-Id: I5984ecd88a12d3f22aecaa685bd552f4235fb13d
(cherry picked from commit 00daa67d745ae84ed15d3f210001193c6e950144)
Reviewed-on: https://gerrit.libreoffice.org/20474
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 448fec81bf45e0e74be887d139519a3c403c625e)
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 9933739..c1a25dc 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -548,9 +548,14 @@ void XPlugin_Impl::loadPlugin()
return;
#elif defined WNT
- PluginComm* pComm = new PluginComm_Impl( m_aDescription.Mimetype,
- m_aDescription.PluginName,
- (HWND)pEnvData->hWnd );
+ PluginComm* pComm;
+ try {
+ pComm = new PluginComm_Impl(
+ m_aDescription.Mimetype, m_aDescription.PluginName,
+ (HWND)pEnvData->hWnd);
+ } catch (PluginComm_Impl::CannotInitializeException &) {
+ return;
+ }
#endif
setPluginComm( pComm );
diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
index 555d400..bd4ff2c 100644
--- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx
+++ b/extensions/source/plugin/inc/plugin/win/sysplug.hxx
@@ -86,6 +86,8 @@ class PluginComm_Impl :
virtual long doIt();
public:
+ struct CannotInitializeException {};
+
PluginComm_Impl( const OUString& rMIME, const OUString& rName, HWND hWnd );
virtual ~PluginComm_Impl();
@@ -114,6 +116,7 @@ public:
virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue );
private:
+ void shutdown();
BOOL retrieveFunction( TCHAR const * pName, void** ppFunc ) const;
private:
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index d34c800..eb14ec0 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -98,12 +98,20 @@ PluginComm_Impl::PluginComm_Impl( const OUString& /*rMIME*/, const OUString& rNa
"### version failure!" );
m_eCall = eNP_Initialize;
- execute();
+ if (execute() != NPERR_NO_ERROR) {
+ shutdown();
+ throw CannotInitializeException();
+ }
}
PluginComm_Impl::~PluginComm_Impl()
{
+ shutdown();
+}
+
+void PluginComm_Impl::shutdown()
+{
if (_plDLL)
{
// NPP_Shutdown();
commit 939441c78c3486801b14ea50753fbe7eb41f9ecf
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Dec 8 22:11:13 2015 +0100
lotuswordpro: GCC 4.6 seems to need stdexcept included
Change-Id: I30bbf7bab8cb37422fd20a25741e564500faa31c
(cherry picked from commit 742c2370566bf1e7caa7403c99f088a79ae146fa)
(cherry picked from commit 819f33e67cfdfea8358bce3f80230bced72696a6)
diff --git a/lotuswordpro/source/filter/lwptabrack.cxx b/lotuswordpro/source/filter/lwptabrack.cxx
index 8295796..0dac754 100644
--- a/lotuswordpro/source/filter/lwptabrack.cxx
+++ b/lotuswordpro/source/filter/lwptabrack.cxx
@@ -61,6 +61,8 @@
#include "lwpobjstrm.hxx"
#include "lwpslvlist.hxx"
+#include <stdexcept>
+
LwpTab::LwpTab()
{
m_nX = 0;
commit 73f34be13a92654c58eb5ce29b4b3ae17bd11404
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 8 20:38:44 2015 +0000
valgrind: jump or move depends on uninitialised value
Change-Id: I02e507f4b7d78efacc5b735ca24adb83633749b9
(cherry picked from commit dcbef55a111405b4540856bf6910f81bce9785bb)
Reviewed-on: https://gerrit.libreoffice.org/20479
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit ca57260f3e95dfd6c111dd1ffd4711d6c8ac6dca)
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index 8f93df0..c77d2de 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -148,8 +148,8 @@ using namespace OpenStormBento;
{
SvStream * pDecompressed = NULL;
- sal_uInt32 nTag;
pStream->Seek(0x10);
+ sal_uInt32 nTag(0);
pStream->ReadUInt32( nTag );
if (nTag != 0x3750574c) // "LWP7"
{
commit 0ef1d4375c6360fa988287c8dd71d6a9b5a16b2a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 8 14:20:52 2015 +0000
guard against corrupt m_nNumTabs
Change-Id: I41b8514a127d463ac951e5855f09416fa0456b1b
(cherry picked from commit 85a2cd37fc60cd53a892b27a18d4b5272988361c)
(cherry picked from commit 34a03c676e618200292f187f8f96b74f23c962b5)
Reviewed-on: https://gerrit.libreoffice.org/20471
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
(cherry picked from commit 6729683506b4307dfc3d881413917af08b94ade6)
diff --git a/lotuswordpro/source/filter/lwptabrack.cxx b/lotuswordpro/source/filter/lwptabrack.cxx
index 5c3eb44..8295796 100644
--- a/lotuswordpro/source/filter/lwptabrack.cxx
+++ b/lotuswordpro/source/filter/lwptabrack.cxx
@@ -86,11 +86,12 @@ LwpTabRack::LwpTabRack(LwpObjectHeader objHdr, LwpSvStream* pStrm):LwpObject(obj
void LwpTabRack::Read()
{
-// LwpObjectID m_NextID;
m_NextID.ReadIndexed(m_pObjStrm);
m_nNumTabs = m_pObjStrm->QuickReaduInt16();
- for( int i=0; i<m_nNumTabs; i++ )
+ if (m_nNumTabs > MaxTabs)
+ throw std::out_of_range("corrupt LwpTabRack");
+ for (int i=0; i<m_nNumTabs; ++i)
{
m_aTabs[i].Read(m_pObjStrm);
m_pObjStrm->SkipExtra();
commit 182b1d788b8219452a30bcdf23d2de67c7d873a3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 8 11:47:52 2015 +0100
Missing delete
Change-Id: I8ba75fcd2f98a49fe9d620af6b248f32911d7fe8
(cherry picked from commit de7018f755af0b2372c0e261f53d57de6cf77c38)
Reviewed-on: https://gerrit.libreoffice.org/20464
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 2ecbb6a54b08a20639de560e5fd77d9a487f74e3)
diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx
index 22dd244..87d5039 100644
--- a/sfx2/source/sidebar/ControllerItem.cxx
+++ b/sfx2/source/sidebar/ControllerItem.cxx
@@ -166,6 +166,7 @@ void ControllerItem::RequestUpdate()
SfxPoolItem* pState = NULL;
const SfxItemState eState (GetBindings().QueryState(GetId(), pState));
mrItemUpdateReceiver.NotifyItemUpdate(GetId(), eState, pState, IsEnabled(eState));
+ delete pState;
}
void ControllerItem::NotifyFrameContextChange()
commit 5020f7691d08471580b60937ea063f10b260379a
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Jun 5 17:27:01 2015 +0300
WaE: ‘nLocalAttachedAxis’ may be used uninitialized in this function
Change-Id: I74f4c4507bbe6abe7618ca41764715b3b5c68b5b
(cherry picked from commit 20d8267ac702ec6e910481c14eb46c6431a40fe9)
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 23e6789dfc7c5a7cd0693fad573540519784bd91)
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 0889275..e9200fd 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2050,7 +2050,7 @@ void ChartExport::exportSeries( Reference<chart2::XChartType> xChartType,
Reference<XPropertySet> xPropSet(xDataSeries, UNO_QUERY_THROW);
if( GetProperty( xPropSet, "AttachedAxisIndex") )
{
- sal_Int32 nLocalAttachedAxis;
+ sal_Int32 nLocalAttachedAxis = 0;
mAny >>= nLocalAttachedAxis;
rAttachedAxis = translateFromChart2AxisIndexToOox(nLocalAttachedAxis);
}
More information about the Libreoffice-commits
mailing list