Issue 122906 - Paste Special dialog shows blank entry for Writer document
Summary: Paste Special dialog shows blank entry for Writer document
Status: CONFIRMED
Alias: None
Product: Native-Lang
Classification: NLC
Component: ja (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Normal
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-31 06:03 UTC by hanya
Modified: 2013-12-04 10:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2013-07-31 06:03:25 UTC
It seems this problem happen when app.src#STR_WRITER_DOCUMENT_FULLTYPE.string.text string contains multi byte characters (or non Ascii 7 bit).
How to reproduce: 
1. Create new Writer document
2. Input something like abc
3. Select them and copy by Ctrl + C
4. Push Ctrl + Shift + V to open paste special dialog
-> First entry of the listbox is "OpenOffice Writer" for en-US locale
But on ja and ru, blank entry is shown.
I tried de localized one having "%PRODUCTNAME %PRODUCTVERSION Textdokument" as the string too, it was ok.

When I change the string above changed from "%PRODUCTNAME %PRODUCTVERSION テキストドキュメント" to "%PRODUCTNAME %PRODUCTVERSION Text Document" in localized sdf file, 
the entry shows the same one from en-US.

When I debug on ja locale, "if ( rHelper.HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) )" is false in SvPasteObjectDialog::GetFormat function. And TransferableObjectDescriptor aDesc is still empty.
But for en-US, it has the object descriptor and aDesc contains the information.
Comment 1 hanya 2013-12-04 10:15:10 UTC
In TransferableDataHelper::FillDataFlavorExVector function, 
com.sun.star.datatransfer.MimeContentTypeFactory service is used to get 
XMimeContentType interface from mime type representation in string format such as 

application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";classname="8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6";typename="OpenOffice 4.1.0 Text Document";viewaspect="1";width="16999";height="2995";posx="0";posy="0"

createMimeContentType method of MimeContentTypeFactory tries to create new 
instance of CMimeContentType class that parses the mime type description.
In the parse step, each characters in the mime description are checked in the 
TOKEN defined as ASCII range characters.

When STR_WRITER_DOCUMENT_FULLTYPE resource is translated, "typename" of the 
string representation of the mime type might contain non ASCII range characters.
And CMimeContentType class failed to parse the mime type in CMimeContentType::type method.