diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-15 20:49:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-16 09:56:14 +0100 |
commit | 2d120265135748f286992ec1300fd016eb3ee878 (patch) | |
tree | 59dab3c6e8a7d7011d52c3774daf9e0c67c36f1d /filter | |
parent | 46b3202bf883618f1585850191c19776861013ed (diff) |
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@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/icgm/actimpr.cxx | 11 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/outact.hxx | 2 |
2 files changed, 11 insertions, 2 deletions
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; |