[Libreoffice-commits] core.git: 2 commits - sw/source toolkit/source vcl/unx vcl/win
Michael Stahl
mstahl at redhat.com
Fri Jan 23 02:12:13 PST 2015
sw/source/core/frmedt/fefly1.cxx | 7 ++++---
toolkit/source/awt/vclxfont.cxx | 1 +
toolkit/source/awt/vclxgraphics.cxx | 1 +
vcl/unx/gtk/a11y/atkwrapper.cxx | 1 +
vcl/win/source/gdi/winlayout.cxx | 5 +----
5 files changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 91567c26f436ccce0fb60ad6a9671f046a4a68e7
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 23 11:04:05 2015 +0100
calling alloca() requires #include <sal/alloca.h>
Change-Id: I59e5ede0c0cfb10f4196d79ae762132ae4ecb9bb
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index d3b4f27..d937ad4 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -26,6 +26,7 @@
#include <cppuhelper/queryinterface.hxx>
#include <rtl/uuid.h>
#include <rtl/ustring.h>
+#include <sal/alloca.h>
#include <vcl/outdev.hxx>
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 1b11197..cfc6b15 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -26,6 +26,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <rtl/uuid.h>
+#include <sal/alloca.h>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 4f34e0e..6d972ff 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -55,6 +55,7 @@
#include <rtl/ref.hxx>
#include <osl/diagnose.h>
+#include <sal/alloca.h>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/queryinterface.hxx>
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 9db8f43..bcadd8d 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -32,10 +32,7 @@
#include "sallayout.hxx"
#include <cstdio>
-#include <malloc.h>
-#ifndef __MINGW32__
-#define alloca _alloca
-#endif
+#include <sal/alloca.h>
#include <algorithm>
commit c5b6b206c0e80fae7de4d452334541d2198d41ba
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jan 22 23:30:46 2015 +0100
sw: redo check in SwFEShell::FindAnchorPos() a bit (related: fdo#87760)
The only valid non-txtnode return value for the SwPosition is the
unmodified initial value (hopefully).
Change-Id: Ib5789455576a20848dd7f0542bd520aa04040b90
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index bdae991..48f78e6 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -427,11 +427,12 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
Point aTmpPnt( rAbsPos );
GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
- if ( nAnchorId != FLY_AT_CHAR
- || !PosInsideInputFld( aPos ) )
+ if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex()
+ && (nAnchorId != FLY_AT_CHAR || !PosInsideInputFld(aPos)))
{
SwCntntNode* pCNode = aPos.nNode.GetNode().GetCntntNode();
- pTxtFrm = pCNode ? pCNode->getLayoutFrm(GetLayout(), 0, &aPos, false) : NULL;
+ assert(pCNode);
+ pTxtFrm = pCNode->getLayoutFrm(GetLayout(), 0, &aPos, false);
}
}
const SwFrm *pNewAnch = NULL;
More information about the Libreoffice-commits
mailing list