Profit on sale of investments shall be clasiified as other incomes if the entity is not a finance company and if its a finance company it shall be classified as operating income. (It does not matter whether the investments are sort term/long term as far as accounting is concerned)
Dividend income shall be recognised as other income in case of a non finance company. If the dividends are received in cash, then it does not affect the investments. However, if the dividends are reinvested e.g. mutual funds dividend reinvestment schemes, the income shall be added to the investments carrying value.