The "stock" version of libreoffice that comes with ubuntu 12.04 is version 3.5 and Ubuntu 14.04 is 4.2.8.2. The commands below will install a later stable version.
sudo add-apt-repository ppa:libreoffice/libreoffice-4-4 -ysudo apt-get updatesudo apt-get upgrade -y
Once that is finished, if you open up the Writer program and click Help->About to find out which version you have installed.
download file now