filter/source/odfflatxml/OdfFlatXml.cxx | 4 + include/toolkit/awt/vclxaccessiblecomponent.hxx | 15 ++-- lotuswordpro/source/filter/lwplayout.cxx | 5 - lotuswordpro/source/filter/lwplayout.hxx | 14 +++- package/source/zippackage/ZipPackageStream.cxx | 3 reportdesign/inc/ReportDefinition.hxx | 15 +++- reportdesign/source/core/api/ReportDefinition.cxx | 42 ++++++++++++- sc/source/ui/undo/undoblk3.cxx | 6 + toolkit/source/awt/vclxaccessiblecomponent.cxx | 70 +++++++++++----------- xmlhelp/source/cxxhelp/provider/provider.cxx | 2 10 files changed, 122 insertions(+), 54 deletions(-)
New commits: commit bd509c57fe66c69901ed24a46ae835f149d8dcfd Author: Matúš Kukan <[email protected]> Date: Thu Jan 7 21:34:50 2016 +0100 tdf#89236: Don't deflate encrypted document in parallel I see "warn:legacy.osl:22439:1:package/source/zipapi/ZipFile.cxx:583: Can't detect password correctness without digest!" when opening file saved with password. Obviously css::xml::crypto::XDigestContext used in ZipOutputEntry does not work properly when encrypting files in parallel, so don't do that. Change-Id: I4b354535240a4f31a6bc6855cf7f9af527634e7e Reviewed-on: https://gerrit.libreoffice.org/21238 Tested-by: Jenkins <[email protected]> Reviewed-by: Matúš Kukan <[email protected]> (cherry picked from commit eaed822c9cf6b3762f727f1281003dafd300df6d) Reviewed-on: https://gerrit.libreoffice.org/21242 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> (cherry picked from commit fe7d69565866b4b02cde5aebdab4cbc11d00af2b) diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 76d8efc..2ed7f57 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -816,7 +816,8 @@ bool ZipPackageStream::saveChild( } else { - bParallelDeflate = true; + // tdf#89236 Encrypting in parallel does not work + bParallelDeflate = !bToBeEncrypted; // Do not deflate small streams in a thread if (xSeek.is() && xSeek->getLength() < 100000) bParallelDeflate = false; commit fb9888f172b7e41605a107c13420614fe53259e3 Author: Maxim Monastirsky <[email protected]> Date: Thu Dec 24 21:49:23 2015 +0200 tdf#96713 OdfFlatXml: Seek to 0 before reading Similar to tdf#45418. The problem is that sfx2 DocumentInserter code calls SfxMedium::IsStorage, which reads the stream but doesn't correctly seek back to 0. Actually SfxMedium_Impl has 2 members for the input stream, one of SvStream type and another one as Reference<XInputStream>. Turns out that reading with SvStream::Read changes the position in the object referenced by Reference<XInputStream>, but SvStream::Seek doesn't, so Seek(0) doesn't do the desired effect. My current solution is to ensure that we're reading from 0 inside the filter. I think it's a good thing to do anyway, and should be sufficient, given that other filters doesn't seem to be affected by this bug. Change-Id: I49b41077032d3e395c675e4f7824cc778c075473 (cherry picked from commit 5e4124396cafc2b0a435f17a66b33e36303ae4e4) Reviewed-on: https://gerrit.libreoffice.org/20983 Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 47f6e49e2a204a00ac631f9fa021d6320752d039) diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx index 6b75b83..e81eff7 100644 --- a/filter/source/odfflatxml/OdfFlatXml.cxx +++ b/filter/source/odfflatxml/OdfFlatXml.cxx @@ -147,6 +147,10 @@ OdfFlatXml::importer( saxParser->setDocumentHandler(docHandler); try { + css::uno::Reference< css::io::XSeekable > xSeekable( inputStream, css::uno::UNO_QUERY ); + if ( xSeekable.is() ) + xSeekable->seek( 0 ); + saxParser->parseStream(inputSource); } catch (const Exception &exc) commit 4b08660542a647b1ab01ff7c55910f6b914fab0d Author: Eike Rathke <[email protected]> Date: Thu Jan 7 12:11:30 2016 +0100 Resolves: tdf#94208 broadcast fill undo (for deleted cells) Change-Id: I0fb54956bffc77dad4236b326eee3af836017623 (cherry picked from commit ece5cc21aa7814be79016e0d285981c6ced4d9ee) Reviewed-on: https://gerrit.libreoffice.org/21207 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> (cherry picked from commit 81dad223dbfac9352bbfd9333d1ba101d245a15a) diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 764d717..b28f0bb 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -550,6 +550,12 @@ void ScUndoAutoFill::Undo() rDoc.DeleteAreaTab( aWorkRange, IDF_AUTOFILL ); pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, &rDoc ); + // Actually we'd only need to broadcast the cells inserted during + // CopyToDocument(), as DeleteAreaTab() broadcasts deleted cells. For + // this we'd need to either record the span sets or let + // CopyToDocument() broadcast. + BroadcastChanges( aWorkRange); + rDoc.ExtendMerge( aWorkRange, true ); pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags ); } commit b8756d4226a3544f4a90a562726ed5f3c3003c7c Author: Michael Meeks <[email protected]> Date: Mon Jan 4 21:28:59 2016 +0000 tdf#94715 - ensure we remove ourselves from the same event source. Seemingly event removal was not occuring; also clean up historic duplication of UNO and C++ references using rtl::Reference. Reviewed-on: https://gerrit.libreoffice.org/21088 Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Meeks <[email protected]> Conflicts: include/toolkit/awt/vclxaccessiblecomponent.hxx toolkit/source/awt/vclxaccessiblecomponent.cxx Change-Id: I56dfb76501929886f70495804670f8c4f70e796b Reviewed-on: https://gerrit.libreoffice.org/21110 Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 9a22f9f5fe528c7c0f45813a025b377f79c8372e) diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx index 0fdc2a8..f01183f 100644 --- a/include/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx @@ -63,15 +63,16 @@ class TOOLKIT_DLLPUBLIC VCLXAccessibleComponent ,public VCLXAccessibleComponent_BASE { private: - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> mxWindow; - VCLXWindow* mpVCLXindow; + rtl::Reference<VCLXWindow> m_xVCLXWindow; + VclPtr<vcl::Window> m_xEventSource; VCLExternalSolarLock* m_pSolarLock; -protected: - DECL_LINK( WindowEventListener, VclSimpleEvent* ); - DECL_LINK( WindowChildEventListener, VclSimpleEvent* ); + DECL_LINK( WindowEventListener, VclSimpleEvent* ); + DECL_LINK( WindowChildEventListener, VclSimpleEvent* ); + void DisconnectEvents(); +protected: virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ); virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ); @@ -80,10 +81,10 @@ protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& rVclWindowEvent ); public: - VCLXAccessibleComponent( VCLXWindow* pVCLXindow ); + VCLXAccessibleComponent( VCLXWindow* pVCLXWindow ); virtual ~VCLXAccessibleComponent(); - VCLXWindow* GetVCLXWindow() const { return mpVCLXindow; } + VCLXWindow* GetVCLXWindow() const; VclPtr<vcl::Window> GetWindow() const; template< class derived_type > VclPtr< derived_type > GetAs() const { return VclPtr< derived_type >( static_cast< derived_type * >( GetWindow().get() ) ); } diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 9031492..2d50fd5 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -42,35 +42,45 @@ using namespace ::com::sun::star; using namespace ::comphelper; -VCLXAccessibleComponent::VCLXAccessibleComponent( VCLXWindow* pVCLXindow ) +VCLXAccessibleComponent::VCLXAccessibleComponent( VCLXWindow* pVCLXWindow ) : AccessibleExtendedComponentHelper_BASE( new VCLExternalSolarLock() ) , OAccessibleImplementationAccess( ) { - mpVCLXindow = pVCLXindow; - mxWindow = pVCLXindow; + m_xVCLXWindow = pVCLXWindow; m_pSolarLock = static_cast< VCLExternalSolarLock* >( getExternalLock( ) ); - DBG_ASSERT( pVCLXindow->GetWindow(), "VCLXAccessibleComponent - no window!" ); - if ( pVCLXindow->GetWindow() ) + DBG_ASSERT( pVCLXWindow->GetWindow(), "VCLXAccessibleComponent - no window!" ); + m_xEventSource = pVCLXWindow->GetWindow(); + if ( m_xEventSource ) { - pVCLXindow->GetWindow()->AddEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); - pVCLXindow->GetWindow()->AddChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); + m_xEventSource->AddEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); + m_xEventSource->AddChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); } // announce the XAccessible of our creator to the base class - lateInit( pVCLXindow ); + lateInit( pVCLXWindow ); } -VCLXAccessibleComponent::~VCLXAccessibleComponent() +VCLXWindow* VCLXAccessibleComponent::GetVCLXWindow() const { - ensureDisposed(); + return m_xVCLXWindow.get(); +} - if ( mpVCLXindow && mpVCLXindow->GetWindow() ) +void VCLXAccessibleComponent::DisconnectEvents() +{ + if ( m_xEventSource ) { - mpVCLXindow->GetWindow()->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); - mpVCLXindow->GetWindow()->RemoveChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); + m_xEventSource->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); + m_xEventSource->RemoveChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); + m_xEventSource.clear(); } +} + +VCLXAccessibleComponent::~VCLXAccessibleComponent() +{ + ensureDisposed(); + DisconnectEvents(); delete m_pSolarLock; m_pSolarLock = NULL; @@ -104,13 +114,11 @@ uno::Sequence< OUString > VCLXAccessibleComponent::getSupportedServiceNames() th IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclSimpleEvent*, pEvent ) { - DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" ); - - /* Ignore VCLEVENT_WINDOW_ENDPOPUPMODE, because the UNO accessibility wrapper - * might have been destroyed by the previous VCLEventListener (if no AT tool - * is running), e.g. sub-toolbars in impress. - */ - if ( pEvent && pEvent->ISA( VclWindowEvent ) && mxWindow.is() /* #122218# */ && (pEvent->GetId() != VCLEVENT_WINDOW_ENDPOPUPMODE) ) + /* Ignore VCLEVENT_WINDOW_ENDPOPUPMODE, because the UNO accessibility wrapper + * might have been destroyed by the previous VCLEventListener (if no AT tool + * is running), e.g. sub-toolbars in impress. + */ + if ( pEvent && pEvent->ISA( VclWindowEvent ) && m_xVCLXWindow.is() /* #122218# */ && (pEvent->GetId() != VCLEVENT_WINDOW_ENDPOPUPMODE) ) { DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "Window???" ); if( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() || ( pEvent->GetId() == VCLEVENT_OBJECT_DYING ) ) @@ -123,8 +131,7 @@ IMPL_LINK( VCLXAccessibleComponent, WindowEventListener, VclSimpleEvent*, pEvent IMPL_LINK( VCLXAccessibleComponent, WindowChildEventListener, VclSimpleEvent*, pEvent ) { - DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" ); - if ( pEvent && pEvent->ISA( VclWindowEvent ) && mxWindow.is() /* #i68079# */ ) + if ( pEvent && pEvent->ISA( VclWindowEvent ) && m_xVCLXWindow.is() /* #i68079# */ ) { DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "Window???" ); if( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() ) @@ -192,10 +199,8 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind { case VCLEVENT_OBJECT_DYING: { - pAccWindow->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); - pAccWindow->RemoveChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); - mxWindow.clear(); - mpVCLXindow = NULL; + DisconnectEvents(); + m_xVCLXWindow.clear(); } break; case VCLEVENT_WINDOW_CHILDDESTROYED: @@ -344,16 +349,11 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind void VCLXAccessibleComponent::disposing() { - if ( mpVCLXindow && mpVCLXindow->GetWindow() ) - { - mpVCLXindow->GetWindow()->RemoveEventListener( LINK( this, VCLXAccessibleComponent, WindowEventListener ) ); - mpVCLXindow->GetWindow()->RemoveChildEventListener( LINK( this, VCLXAccessibleComponent, WindowChildEventListener ) ); - } + DisconnectEvents(); AccessibleExtendedComponentHelper_BASE::disposing(); - mxWindow.clear(); - mpVCLXindow = NULL; + m_xVCLXWindow.clear(); } VclPtr<vcl::Window> VCLXAccessibleComponent::GetWindow() const @@ -770,8 +770,8 @@ void VCLXAccessibleComponent::grabFocus( ) throw (uno::RuntimeException, std::e OExternalLockGuard aGuard( this ); uno::Reference< accessibility::XAccessibleStateSet > xStates = getAccessibleStateSet(); - if ( mxWindow.is() && xStates.is() && xStates->contains( accessibility::AccessibleStateType::FOCUSABLE ) ) - mxWindow->setFocus(); + if ( m_xVCLXWindow.is() && xStates.is() && xStates->contains( accessibility::AccessibleStateType::FOCUSABLE ) ) + m_xVCLXWindow->setFocus(); } sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( ) throw (uno::RuntimeException, std::exception) commit 3092e9a5a89e53a38c9b6c95a6dc777421c2a205 Author: Maxim Monastirsky <[email protected]> Date: Tue Dec 22 14:40:51 2015 +0200 tdf#92203 OReportDefinition should implement XDocumentEventListener interface ... since 252b0c4364690e00b45175693d35eb64a07324b4 Change-Id: I4101dac0078df7cb06f4d33da2a722cfbafb5608 Reviewed-on: https://gerrit.libreoffice.org/20875 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Michael Stahl <[email protected]> (cherry picked from commit d48370043b3759c79340c162048c5f2b4da394b9) diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index cf3da36..d2432d2b 100644 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -25,6 +25,7 @@ #include "ReportHelperDefines.hxx" #include <com/sun/star/datatransfer/XTransferable.hpp> +#include <com/sun/star/document/XDocumentEventBroadcaster.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/document/XUndoManagerSupplier.hpp> #include <com/sun/star/frame/XModule.hpp> @@ -44,9 +45,9 @@ #include <cppuhelper/propertysetmixin.hxx> #include <svx/unomod.hxx> -#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13 -#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_13 -#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 13 +#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_14 +#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_14 +#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 14 #include <comphelper/implbase_var.hxx> #endif @@ -64,8 +65,9 @@ namespace utl namespace reportdesign { class OReportComponentProperties; - typedef ::comphelper::PartialWeakComponentImplHelper13 < ::com::sun::star::report::XReportDefinition + typedef ::comphelper::PartialWeakComponentImplHelper14< ::com::sun::star::report::XReportDefinition , ::com::sun::star::document::XEventBroadcaster + , ::com::sun::star::document::XDocumentEventBroadcaster , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::frame::XModule , ::com::sun::star::lang::XUnoTunnel @@ -350,6 +352,11 @@ namespace reportdesign // document::XEventListener void SAL_CALL notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException); + // document::XDocumentEventBroadcaster + virtual void SAL_CALL addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& rListener ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& rListener ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL notifyDocumentEvent( const OUString& rEventName, const css::uno::Reference< css::frame::XController2 >& rViewController, const css::uno::Any& rSupplement ) throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XUIConfigurationManagerSupplier virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index a3f4663..40109e0 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -478,6 +478,7 @@ struct OReportDefinitionImpl ::cppu::OInterfaceContainerHelper m_aStorageChangeListeners; ::cppu::OInterfaceContainerHelper m_aCloseListener; ::cppu::OInterfaceContainerHelper m_aModifyListeners; + ::cppu::OInterfaceContainerHelper m_aLegacyEventListeners; ::cppu::OInterfaceContainerHelper m_aDocEventListeners; ::std::vector< uno::Reference< frame::XController> > m_aControllers; uno::Sequence< beans::PropertyValue > m_aArgs; @@ -532,6 +533,7 @@ struct OReportDefinitionImpl :m_aStorageChangeListeners(_aMutex) ,m_aCloseListener(_aMutex) ,m_aModifyListeners(_aMutex) + ,m_aLegacyEventListeners(_aMutex) ,m_aDocEventListeners(_aMutex) ,m_sMimeType(MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII) ,m_sIdentifier(SERVICE_REPORTDEFINITION) @@ -653,6 +655,7 @@ void SAL_CALL OReportDefinition::disposing() lang::EventObject aDisposeEvent( static_cast< ::cppu::OWeakObject* >( this ) ); m_pImpl->m_aModifyListeners.disposeAndClear( aDisposeEvent ); m_pImpl->m_aCloseListener.disposeAndClear( aDisposeEvent ); + m_pImpl->m_aLegacyEventListeners.disposeAndClear( aDisposeEvent ); m_pImpl->m_aDocEventListeners.disposeAndClear( aDisposeEvent ); m_pImpl->m_aStorageChangeListeners.disposeAndClear( aDisposeEvent ); @@ -1849,11 +1852,44 @@ void OReportDefinition::notifyEvent(const OUString& _sEventName) ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); document::EventObject aEvt(*this, _sEventName); aGuard.clear(); - m_pImpl->m_aDocEventListeners.notifyEach(&document::XEventListener::notifyEvent,aEvt); + m_pImpl->m_aLegacyEventListeners.notifyEach(&document::XEventListener::notifyEvent,aEvt); } catch (const uno::Exception&) { } + + notifyDocumentEvent(_sEventName, nullptr, css::uno::Any()); +} + +// document::XDocumentEventBroadcaster +void SAL_CALL OReportDefinition::notifyDocumentEvent( const OUString& rEventName, const uno::Reference< frame::XController2 >& rViewController, const uno::Any& rSupplement ) throw (lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException, std::exception) +{ + try + { + ::osl::ResettableMutexGuard aGuard(m_aMutex); + ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); + document::DocumentEvent aEvt(*this, rEventName, rViewController, rSupplement); + aGuard.clear(); + m_pImpl->m_aDocEventListeners.notifyEach(&document::XDocumentEventListener::documentEventOccured,aEvt); + } + catch (const uno::Exception&) + { + } +} + +void SAL_CALL OReportDefinition::addDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& rListener ) throw (uno::RuntimeException, std::exception) +{ + ::osl::MutexGuard aGuard(m_aMutex); + ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); + if ( rListener.is() ) + m_pImpl->m_aDocEventListeners.addInterface(rListener); +} + +void SAL_CALL OReportDefinition::removeDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& rListener ) throw (uno::RuntimeException, std::exception) +{ + ::osl::MutexGuard aGuard(m_aMutex); + ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); + m_pImpl->m_aDocEventListeners.removeInterface(rListener); } // document::XEventBroadcaster @@ -1862,14 +1898,14 @@ void SAL_CALL OReportDefinition::addEventListener(const uno::Reference< document ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); if ( _xListener.is() ) - m_pImpl->m_aDocEventListeners.addInterface(_xListener); + m_pImpl->m_aLegacyEventListeners.addInterface(_xListener); } void SAL_CALL OReportDefinition::removeEventListener( const uno::Reference< document::XEventListener >& _xListener ) throw (uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); - m_pImpl->m_aDocEventListeners.removeInterface(_xListener); + m_pImpl->m_aLegacyEventListeners.removeInterface(_xListener); } // document::XEventListener commit e96210ffee3a049a9e435e8c52d9c19046ed5c6c Author: Caolán McNamara <[email protected]> Date: Fri Jan 1 16:57:43 2016 +0000 guard against infinite recursion in MarginsSameAsParent (cherry picked from commit e8dc85c2b3fd197aa5d484be3fc2cb25f7bd2412) (cherry picked from commit 54fe17fabaa258a48e18c4a19c29da2d2cf634ca) Change-Id: I09c1ccb850f0cb2365e52ee6ffd293ccf34ad00e Reviewed-on: https://gerrit.libreoffice.org/21033 Tested-by: Jenkins <[email protected]> Reviewed-by: David Tardon <[email protected]> (cherry picked from commit a586293844de4d9c0e36dd20b7c157f19ca60a9e) diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 53e1261..de77f9c 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -79,6 +79,7 @@ LwpVirtualLayout::LwpVirtualLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm) : LwpDLNFPVList(objHdr, pStrm) , m_bGettingHonorProtection(false) + , m_bGettingMarginsSameAsParent(false) , m_bGettingHasProtection(false) , m_bGettingIsProtected(false) , m_bGettingMarginsValue(false) @@ -726,7 +727,7 @@ bool LwpMiddleLayout::MarginsSameAsParent() rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (LwpVirtualLayout* pLay = dynamic_cast<LwpVirtualLayout*>(xBase.get())) { - pLay->MarginsSameAsParent(); + pLay->GetMarginsSameAsParent(); } return LwpVirtualLayout::MarginsSameAsParent(); } @@ -740,7 +741,7 @@ double LwpMiddleLayout::MarginsValue(const sal_uInt8 &nWhichSide) double fValue = 0; if((nWhichSide==MARGIN_LEFT)||(nWhichSide==MARGIN_RIGHT)) { - if ( MarginsSameAsParent() ) + if ( GetMarginsSameAsParent() ) { rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout*>(GetParent().obj().get())); if (xParent.is() && !xParent->IsHeader()) diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx index f540aec..ee46b3d5 100644 --- a/lotuswordpro/source/filter/lwplayout.hxx +++ b/lotuswordpro/source/filter/lwplayout.hxx @@ -100,7 +100,6 @@ class LwpVirtualLayout : public LwpDLNFPVList public: LwpVirtualLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm); virtual ~LwpVirtualLayout(){} - virtual bool MarginsSameAsParent(); inline virtual sal_uInt16 GetNumCols(){return 1;} virtual double GetColWidth(sal_uInt16 nIndex); virtual double GetColGap(sal_uInt16 nIndex); @@ -123,6 +122,15 @@ public: m_bGettingHonorProtection = false; return bRet; } + bool GetMarginsSameAsParent() + { + if (m_bGettingMarginsSameAsParent) + throw std::runtime_error("recursion in layout"); + m_bGettingMarginsSameAsParent = true; + bool bRet = MarginsSameAsParent(); + m_bGettingMarginsSameAsParent = false; + return bRet; + } bool GetIsProtected() { if (m_bGettingIsProtected) @@ -203,8 +211,10 @@ protected: virtual bool HonorProtection(); virtual bool IsProtected(); virtual double MarginsValue(const sal_uInt8& /*nWhichSide*/){return 0;} + virtual bool MarginsSameAsParent(); protected: bool m_bGettingHonorProtection; + bool m_bGettingMarginsSameAsParent; bool m_bGettingHasProtection; bool m_bGettingIsProtected; bool m_bGettingMarginsValue; @@ -318,7 +328,6 @@ class LwpMiddleLayout : public LwpVirtualLayout public: LwpMiddleLayout( LwpObjectHeader &objHdr, LwpSvStream* pStrm ); virtual ~LwpMiddleLayout(); - virtual bool MarginsSameAsParent() SAL_OVERRIDE; virtual double MarginsValue(const sal_uInt8& nWhichSide) SAL_OVERRIDE; virtual double GetExtMarginsValue(const sal_uInt8& nWhichSide) SAL_OVERRIDE; LwpLayoutGeometry* GetGeometry() @@ -375,6 +384,7 @@ public: protected: void Read() SAL_OVERRIDE; + virtual bool MarginsSameAsParent() SAL_OVERRIDE; private: LwpObjectID m_BasedOnStyle; LwpLayoutGeometry* Geometry(); commit 7d146afbf6440c738d82e61974bd3d2bc975e31c Author: Stephan Bergmann <[email protected]> Date: Mon Jan 4 15:14:27 2016 +0100 tdf#96855: Put back assignment of xHierAccess ...that had inadvertently been removed as part of a larger code removal in 6948c546fdc00dddec7d58e03150dcc87921d6b2 "tdf#75637: Resolve help images via a vnd.libreoffice.image UCP" Change-Id: Ic2d5e1a5fa5a10b240bb9e511e6dcb8097e58081 (cherry picked from commit 549e900b4b0047b8cb6c236ea50a3fc046e5fb51) Reviewed-on: https://gerrit.libreoffice.org/21082 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit e4a154790397428f2e2f5bcdf26de407d6b0e2da) diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index 95b1c6d..7f833ff 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -323,6 +323,8 @@ void ContentProvider::init() } OUString productversion( setupversion + " " + setupextension ); + + xHierAccess = getHierAccess( sProvider, "org.openoffice.Office.Common" ); bool showBasic = getBooleanKey(xHierAccess,"Help/ShowBasic"); m_pDatabases = new Databases( showBasic, instPath,
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
