summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorTibor Nagy <tibor.nagy.extern@allotropia.de>2024-08-22 21:34:34 +0200
committerNagy Tibor <tibor.nagy.extern@allotropia.de>2024-08-23 16:25:43 +0200
commit54374c97b86730d97f5ad622dc88c0798af4be1c (patch)
tree5850a89ee5859f9b65c2808bd950a6a9efe0db9d /vcl/source/gdi
parent3b4a8406c2e7f4f6a7ac43e192fdb8ef266d4b6d (diff)
tdf#159895 sw: fix "Stack empty" error in tagged PDF export
Change-Id: I8a2e0d51d1cfe6d4b517f193c73e512600638cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172302 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 434156491703..d986c93c3de3 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4364,20 +4364,12 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
Font aFont = drawFieldBorder( rBox, rWidget, rSettings );
sal_Int32 nBest = getSystemFont( aFont );
- beginRedirect( pListBoxStream, rBox.m_aRect );
-
setLineColor( COL_TRANSPARENT );
setFillColor( replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) );
drawRectangle( rBox.m_aRect );
- // empty appearance, see createDefaultEditAppearance for reference
- writeBuffer( "/Tx BMC\nEMC\n" );
-
- endRedirect();
pop();
- rBox.m_aAppearances[ "N"_ostr ][ "Standard"_ostr ] = pListBoxStream;
-
// prepare DA string
OStringBuffer aDA( 256 );
// prepare DA string
@@ -4394,6 +4386,13 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
aDA.append( ' ' );
m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetFontHeight() ), aDA );
aDA.append( " Tf" );
+
+ beginRedirect(pListBoxStream, rBox.m_aRect);
+ // empty appearance, see createDefaultEditAppearance for reference
+ writeBuffer("/Tx BMC\nEMC\n");
+ endRedirect();
+
+ rBox.m_aAppearances["N"_ostr]["Standard"_ostr] = pListBoxStream;
rBox.m_aDAString = aDA.makeStringAndClear();
}