summaryrefslogtreecommitdiffstats
path: root/scribus
diff options
context:
space:
mode:
authorjghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>2012-03-02 22:11:35 +0000
committerjghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>2012-03-02 22:11:35 +0000
commitaab0967bb981583c227e7ef53a3c45f0d65c0692 (patch)
tree9b2b4fa0761d5cd1e975593839402e1fb7cf5d29 /scribus
parent9d7e0e8caaeded58d349a897664c20261a7feaea (diff)
downloadscribus-aab0967bb981583c227e7ef53a3c45f0d65c0692.tar.gz
scribus-aab0967bb981583c227e7ef53a3c45f0d65c0692.tar.xz
scribus-aab0967bb981583c227e7ef53a3c45f0d65c0692.zip
#10614: combo boxes display random characters prior to selecting an option
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17351 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus')
-rw-r--r--scribus/pdflib_core.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/scribus/pdflib_core.cpp b/scribus/pdflib_core.cpp
index aa1e17f..cd4bf31 100644
--- a/scribus/pdflib_core.cpp
+++ b/scribus/pdflib_core.cpp
@@ -355,7 +355,7 @@ QByteArray PDFLibCore::EncodeUTF16(const QString &in)
QString tmp = in;
QByteArray cres = ucs2Codec->fromUnicode( tmp );
#ifndef WORDS_BIGENDIAN
- // on little endian systems we ned to swap bytes:
+ // on little endian systems we need to swap bytes:
uchar sw;
for(int d = 0; d < cres.size()-1; d += 2)
{
@@ -5799,15 +5799,12 @@ bool PDFLibCore::PDF_Annotation(PageItem *ite, uint)
break;
case 5:
case 6:
- PutDoc("/FT /Ch\n/V (");
- if (bmst.count() > 0)
- PutDoc(bmst[0]);
- PutDoc(")\n/DV ");
- cnx = "(";
- if (bmstUtf16.count() > 0)
- cnx += bmstUtf16[0];
- cnx += ")";
- PutDoc(EncStringUTF16(cnx,annotationObj)+"\n");
+ cnx = "(%1)";
+ cnx = cnx.arg((bmstUtf16.count() > 0) ? bmstUtf16[0] : "");
+ cnx = EncStringUTF16(cnx, annotationObj);
+ PutDoc("/FT /Ch\n");
+ PutDoc("/V " + cnx + "\n");
+ PutDoc("/DV " + cnx + "\n");
PutDoc("/Opt [ ");
for (int bmc = 0; bmc < bmstUtf16.count(); ++bmc)
PutDoc(EncStringUTF16("("+bmstUtf16[bmc]+")",annotationObj)+"\n");