fdo#77039: Fill the match string even if the raw string is empty.

And in case of an empty string, call svl::SharedString::getEmptyString()
to get an empty shared string instance.

(cherry picked from commit 50708577850544920c746ebc382d47275452a761)

Conflicts:
	sc/source/core/tool/queryparam.cxx

Change-Id: I0923e59f03468790270de8ef22323c0cedad002f
Reviewed-on: https://gerrit.libreoffice.org/9155
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 9f115c83fe94b0ed86562906f9d96465e59ec761)
Reviewed-on: https://gerrit.libreoffice.org/9164
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>