fdo#76078: LO Crashes while saving the docx file containing only opening brace

- System handles an equation having opening brace and closing brace.
- Whereas it fails to handle equations having only opening brace and no closing
  brace, due to which LO crashes with assertion while exporting.
- Fixed this issue and added unit test case for the same.
- Also fixed the same for closing brace alone.

Reviewed-on: https://gerrit.libreoffice.org/8561
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>

(cherry picked from commit ade1641ab632565820ede720b6151435aca4dd78)
Signed-off-by: Michael Stahl <mstahl@redhat.com>

Conflicts:
	sw/qa/extras/inc/swmodeltestbase.hxx
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I34a8a635b42bfdfac265fb70b977c0001cd2b4ff