I'm guessing the person you are talking about is a superior officer of the people and of the person who saluted him with the "officer on deck".
If that is the case, then the person who said "officer on deck" was the one who was informing everybody else in the room or vicinity that a superior officer has just entered the vicinity. "Officer on deck" is used to call everyone in the vicinity to stop and drop whatever they are doing and stand in attention to give respect to the officer who has just entered.
Hope this helps. =D
C/COL H. WONG
Battalion Commander
Citizen Army Training
Philippines