diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-09 15:10:53 +0000 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 19:22:11 +0000 |
commit | 2be5e763d2e03bffc692d40106212fe52a7b7304 (patch) | |
tree | aa48f22ad675d740dec598d4474126c0d2455472 /framework | |
parent | b3caa0eb0d85718aab4c3b37d73755f930433eed (diff) |
Resolves: tdf#66237 set layout manager the way it used to
model Frame::setLayoutManager after the Frame::impl_setPropertyValue handler
for FRAME_PROPHANDLE_LAYOUTMANAGER which used to be used before
commit b248624126c271c88381d3dad6e04fc954f65779
Date: Fri Mar 22 09:24:15 2013 +0200
fdo#46808, Convert frame::Frame to new style
i.e.
- Reference< XPropertySet > xFrameProps( m_xFrame, UNO_QUERY_THROW );
- xFrameProps->setPropertyValue( OUString( "LayoutManager" ), makeAny(Reference< XLayoutManager >()) );
+ m_xFrame->setLayoutManager( Reference< XLayoutManager >() );
Change-Id: I00f1a2cb8e4fafc6d484634619cbeaf58c603d87
(cherry picked from commit 6851074c8a515ec5a7856d4b744e3425c8829a29)
Reviewed-on: https://gerrit.libreoffice.org/34094
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/frame.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 09e5104652f6..88de578a07ba 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1947,7 +1947,18 @@ void SAL_CALL Frame::setLayoutManager(const css::uno::Reference<css::uno::XInter { checkDisposed(); SolarMutexGuard g; - m_xLayoutManager.set(p1, css::uno::UNO_QUERY); + + css::uno::Reference<css::frame::XLayoutManager2> xOldLayoutManager = m_xLayoutManager; + css::uno::Reference<css::frame::XLayoutManager2> xNewLayoutManager(p1, css::uno::UNO_QUERY); + + if (xOldLayoutManager != xNewLayoutManager) + { + m_xLayoutManager = xNewLayoutManager; + if (xOldLayoutManager.is()) + disableLayoutManager(xOldLayoutManager); + if (xNewLayoutManager.is()) + lcl_enableLayoutManager(xNewLayoutManager, this); + } } css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL Frame::getPropertySetInfo() |