[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Tue Jan 16 08:56:36 UTC 2018
filter/source/graphicfilter/icgm/actimpr.cxx | 11 +++++++++--
filter/source/graphicfilter/icgm/outact.hxx | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 2d120265135748f286992ec1300fd016eb3ee878
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 15 20:49:56 2018 +0000
ofz#5336 Timeout
lock the shapes during import and unlock afterwards
Change-Id: I4f6246f152ee548efb647e8a2d43294c6d34f2a2
Reviewed-on: https://gerrit.libreoffice.org/47920
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index b83f3c617d9f..8c38babec87e 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -50,7 +50,6 @@
#include "main.hxx"
#include "outact.hxx"
-
using namespace ::com::sun::star;
CGMImpressOutAct::CGMImpressOutAct(CGM& rCGM, const uno::Reference< frame::XModel > & rModel)
@@ -86,6 +85,8 @@ CGMImpressOutAct::CGMImpressOutAct(CGM& rCGM, const uno::Reference< frame::XMode
CGMImpressOutAct::~CGMImpressOutAct()
{
+ for (auto &a : maLockedNewXShapes)
+ a->removeActionLock();
}
bool CGMImpressOutAct::ImplInitPage()
@@ -111,6 +112,12 @@ bool CGMImpressOutAct::ImplCreateShape( const OUString& rType )
if ( maXShape.is() && maXPropSet.is() )
{
maXShapes->add( maXShape );
+ uno::Reference<document::XActionLockable> xLockable(maXShape, uno::UNO_QUERY);
+ if (xLockable)
+ {
+ xLockable->addActionLock();
+ maLockedNewXShapes.push_back(xLockable);
+ }
return true;
}
return false;
@@ -797,7 +804,7 @@ void CGMImpressOutAct::DrawText( awt::Point const & rTextPos, awt::Size const &
uno::Any aFirstQuery( maXShape->queryInterface( cppu::UnoType<text::XText>::get()));
if( aFirstQuery >>= xText )
{
- OUString aStr(pString, rtl_str_getLength(pString), RTL_TEXTENCODING_ASCII_US);
+ OUString aStr(pString, strlen(pString), RTL_TEXTENCODING_ASCII_US);
uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() );
{
diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx
index 98f02a6e124f..4ec1090e5185 100644
--- a/filter/source/graphicfilter/icgm/outact.hxx
+++ b/filter/source/graphicfilter/icgm/outact.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_OUTACT_HXX
#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/document/XActionLockable.hpp>
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XShape.hpp>
@@ -64,6 +65,7 @@ class CGMImpressOutAct
css::uno::Reference< css::beans::XPropertySet > maXPropSet;
css::uno::Reference< css::drawing::XShapes > maXShapes;
+ std::vector<css::uno::Reference<css::document::XActionLockable>> maLockedNewXShapes;
sal_uInt32 nFinalTextCount;
More information about the Libreoffice-commits
mailing list