summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2016-05-27 15:37:18 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2016-05-27 15:48:50 +0200
commit51c8d22ec5e4d306f8f64afb355f95a23deb335d (patch)
tree1c3e5e7cfcfbc36ea15324b1704f0ceeb535cfaf /svx
parent0df3760bc2035a54454db9fe2774dca58c58593f (diff)
tdf#93403 check for changed DataSource on all Controls on form reload
1) OBoundControlModel: when reload() asks us to connect to database column, redo it even if it was previously done. 2) FmXGridPeer: when getting Reloaded event that we subscribed to (and specifically from frm::ODatabaseFrom), pass along the event to all columns before we treat it. The columns (controls) are themselves subscribed to it, but they may get the event after us, which means our treatment still uses stale data, which we continue to display. The column controls should continue to subscribe by themselves for the case that they are not in a grid, but direct children of the form. Change-Id: I0cbcf2dc792e8650157a69ddc414d755de0e549a
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index b1460e4e06b5..fbb6d18f221e 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1568,8 +1568,19 @@ void FmXGridPeer::unloading(const EventObject& /*aEvent*/) throw( RuntimeExcepti
}
-void FmXGridPeer::reloaded(const EventObject& /*aEvent*/) throw( RuntimeException, std::exception )
+void FmXGridPeer::reloaded(const EventObject& aEvent) throw( RuntimeException, std::exception )
{
+ {
+ const sal_Int32 cnt = m_xColumns->getCount();
+ for(sal_Int32 i=0; i<cnt; ++i)
+ {
+ Reference< XLoadListener> xll(m_xColumns->getByIndex(i), UNO_QUERY);
+ if(xll.is())
+ {
+ xll->reloaded(aEvent);
+ }
+ }
+ }
updateGrid(m_xCursor);
}