fix negative error bar range export, fdo#75510

Change-Id: Icca2f9fc26b15b968a940e5c73f7ad3781f75e94
add test for fdo#75510

Change-Id: I76cb1008138f7b79223330d4a24d45a026d1118f
Avoid possible resource leaks by boost::scoped_array

Change-Id: I5a73d3410262c830795c8b132227fcff5f5127e3