If you buy
shares quoted cum dividend, i.e., before the ex dividend date, you will receive an upcoming already - declared dividend.
Buyers of
shares quoted cum rights, i.e., before the ex-rights date, are entitled to forthcoming already - declared rights.