Analysis of three body B -->D^+D^- pi^0 decay