Issue 103918 - file path(japanese) in the function is url encoded(binary hex).
Summary: file path(japanese) in the function is url encoded(binary hex).
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOO310m11
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords: oooqa, regression
: 102868 (view as issue list)
Depends on:
Blocks: 101565 112830
  Show dependency tree
 
Reported: 2009-07-31 06:03 UTC by aizuwakamatsucity
Modified: 2013-08-07 15:15 UTC (History)
7 users (show)

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


Attachments
filepath_sample(japanese directry) (6.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-07-31 06:04 UTC, aizuwakamatsucity
no flags Details
patch to fix this (1.15 KB, patch)
2009-08-06 05:48 UTC, kyoshida
no flags Details | Diff
revised patch (3.53 KB, patch)
2009-08-10 18:40 UTC, kyoshida
no flags Details | Diff
revised patch (12.62 KB, patch)
2009-08-11 03:38 UTC, kyoshida
no flags Details | Diff
another revised patch, to fix incorrect encoding for Excel A1 and R1C1 syntax (1.15 KB, patch)
2009-08-11 14:03 UTC, kyoshida
no flags Details | Diff
this is the patch I meant to attach (13.00 KB, patch)
2009-08-12 13:54 UTC, kyoshida
no flags Details | Diff
testcase, referring doc (11.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-08-12 16:57 UTC, ooo
no flags Details
testcase, referred doc (6.77 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-08-12 16:59 UTC, ooo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aizuwakamatsucity 2009-07-31 06:03:13 UTC
Upper filepath is replaced as under filepath. 

='file:///d:/リンクテストフォルダ/リンクテストシート.ods'#$Sheet1.a1

='file:///d:/%E3%83%AA%E3%83%B3%E3%82%AF%E3%83%86%E3%82%B9%E3%83%88%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80/%E3%83%AA%E3%83%B3%E3%82%AF%E3%83%86%E3%82%B9%E3%83%88%E3%82%B7%E3%83%BC%E3%83%88.ods'#$Sheet1.A1

It is too long and it makes so many error cell Sometime.
Comment 1 aizuwakamatsucity 2009-07-31 06:04:43 UTC
Created attachment 63874 [details]
filepath_sample(japanese directry)
Comment 2 lohmaier 2009-08-05 18:59:08 UTC
I can confirm that the URL is represented in the encoded form,
but I cannot see a problem with it. Yes, it is longer, but that by itself
doesn't make any calculations fail.

Do you have an example where there's a problem because of this?

Using the decoded URL for display would be an RFE, not a defect.

(note: the files are not utf-8 encoded in the zip)
Comment 3 aizuwakamatsucity 2009-08-06 03:11:31 UTC
In OOo3.0.0-OOo3.0.1, the URLencode problem doesn't happen. 
The problem is only OOo3.1 have. 

*Upper formula become lower formula.(after reopen.)
 The last part of file path is deleted.

=VLOOKUP("リンクテスト文字列";'D:\リンクテストフォルダ\長い事業名のフォルダ:あ
ああああああああああああああああああああああああ\コピー ~ 長い事業名のフォル
ダ:あああああああああああああああああああああああああ\コピー ~ コピー ~ 長い
事業名のフォルダ:あああああああああああああああああああああああああ\コピー ~
コピー ~ コピー ~ 長い事業名のフォルダ:あああああああああああああああああああ
ああああああ\リンクテストシート.ods'#$Sheet1.A1:A1;1)
=VLOOKUP("リンクテスト文字列";'file:///D:/%E3%83%AA%E3%83%B3%E3%82%AF%E3%83%86
%E3%82%B9%E3%83%88%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80/%E9%95%B7%E3%81%84%E4%BA%8B%E6%A5%AD%E5%90%8D%E3%81%AE%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%EF%BC%9A%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%82%E3%81%8;1)


and...It is difficult for me to make zip of UTF8. 
Comment 4 kyoshida 2009-08-06 05:45:01 UTC
Yup, I can confirm this.  External ref URI's are not decoded when displayed.
Comment 5 kyoshida 2009-08-06 05:48:17 UTC
Created attachment 63978 [details]
patch to fix this
Comment 6 kyoshida 2009-08-06 05:49:46 UTC
This patch probably fixes it.  All file URIs are internally stored hex-encoded,
and we just forgot to decode them when displaying them.
Comment 7 lohmaier 2009-08-06 14:30:50 UTC
patch doesn't need needmoreinfo, removing keyword (thanks for the patch)
Comment 8 kpalagin 2009-08-06 15:04:47 UTC
Is it the same as
http://qa.openoffice.org/issues/show_bug.cgi?id=102868 ?
Comment 9 lohmaier 2009-08-06 15:09:40 UTC
*** Issue 102868 has been marked as a duplicate of this issue. ***
Comment 10 lohmaier 2009-08-06 15:12:13 UTC
as mentioned by kpalagin: regression (was already fixed in the past with issue
75893) - adding dr (author of fix of the old issue), fst from the other issue to cc
Comment 11 uwe.luebbers 2009-08-06 15:53:56 UTC
set target
Comment 12 mdenisov 2009-08-07 03:53:56 UTC
What about patch for Windows?
Comment 13 kyoshida 2009-08-10 18:40:32 UTC
Created attachment 64039 [details]
revised patch
Comment 14 kyoshida 2009-08-10 18:52:40 UTC
The revised patch is safer in that the decoding of URI's is only done when
displaying formulas while in the .ods files all instances of external ref URI's
remain encoded.  This is the current behavior as of 3.1, so there is a lesser
chance of introducing a regression with this change.

Comment 15 kyoshida 2009-08-11 03:38:49 UTC
Created attachment 64058 [details]
revised patch
Comment 16 kyoshida 2009-08-11 03:47:18 UTC
further revised the patch, to leave the document URL hex-encoded while the sheet
names are left raw-unicode.  This is the behavior of DEV300_m37; the milestone
before the external ref re-work was integrated.

I've also tested range names' ODF export.  Range names use ODF's bracket
notation, and the external doc URIs are always encoded.  I made sure that my
patch didn't change that behavior.

This patch also fixes one regression I just happened to discover during my
investigation, where updating the external document upon file load failed to
update the chart objects that reference it.  This was unintentionally introduced
by the fix for issue 103317.

Comment 17 kyoshida 2009-08-11 03:49:17 UTC
>further revised the patch, to leave the document URL hex-encoded while the sheet
names are left raw-unicode.  This is the behavior of DEV300_m37; the milestone
before the external ref re-work was integrated.

I forgot to say that this is for chart objects.
Comment 18 ooo 2009-08-11 12:04:39 UTC
Grabbing issue.
Comment 19 kyoshida 2009-08-11 14:03:22 UTC
Created attachment 64067 [details]
another revised patch, to fix incorrect encoding for Excel A1 and R1C1 syntax
Comment 20 kyoshida 2009-08-11 14:05:26 UTC
@er: my last patch didn't decode URIs when the formula syntax is set to Excel A1
or R1C1.  Other than that, this patch is identical to the last one.
Comment 21 kyoshida 2009-08-11 16:36:53 UTC
perhaps issue 103918 is of interest.
Comment 22 kyoshida 2009-08-11 16:38:06 UTC
>perhaps issue 103918 is of interest.

I meant, issue 104166.  A circular reference here. ;-)
Comment 23 uwe.luebbers 2009-08-11 16:42:17 UTC
changed target milestone
Comment 24 ooo 2009-08-12 12:01:38 UTC
@kohei:
The last patch clashes with the changes of the previous patch in both sections.
It would decode the name unconditionally and ignore the bEncodeUrl argument for
both, ConventionXL::makeExternalDocStr() and
ConventionOOO_A1::makeExternalSingleRefStr(). What was the intention?
Comment 25 kyoshida 2009-08-12 13:53:03 UTC
@er: looks like I've attached the wrong version of the patch.  Let me attach the
correct patch.
Comment 26 kyoshida 2009-08-12 13:54:57 UTC
Created attachment 64093 [details]
this is the patch I meant to attach
Comment 27 kyoshida 2009-08-12 13:58:59 UTC
@er: yeah, sorry about the hiccup. ;-)  Please ignore the patch I attached in
desc20.  The patch I just attached should be identical to the one in desc16,
except for the four hunks within ConventionXL_A1 and ConventionXL_R1C1.
Comment 28 frank 2009-08-12 14:09:31 UTC
removed me from CC
Comment 29 ooo 2009-08-12 15:11:10 UTC
Yep, better ;-)

In cws calcextref311:

revision 274897
sc/inc/compiler.hxx
sc/inc/externalrefmgr.hxx
sc/source/core/data/cell2.cxx
sc/source/core/tool/compiler.cxx
sc/source/core/tool/rangeutl.cxx
sc/source/core/tool/reftokenhelper.cxx
sc/source/core/tool/token.cxx
sc/source/ui/docshell/externalrefmgr.cxx

Changed a use of MAXSTRLEN in sc/source/core/data/cell2.cxx
ScEditCell::GetString() to the value 256 it previously had, used in caching raw
strings of rich text for formulas.
Comment 30 ooo 2009-08-12 15:51:30 UTC
Actually the change is in revision 274901, r274897 was a bad commit to
tags/OOO310_m18 ...
Comment 31 ooo 2009-08-12 16:57:58 UTC
Created attachment 64101 [details]
testcase, referring doc
Comment 32 ooo 2009-08-12 16:59:51 UTC
Created attachment 64102 [details]
testcase, referred doc
Comment 33 ooo 2009-08-12 17:09:32 UTC
The attached filepath_sample.zip may not work, depending on the encoding the
target system uses. Attached referring.ods and "referred with spaces.ods" as
another testcase.

Open referring.ods, with OOO310_m18 the references in B3:B6 contain
referred%20with%20spaces.ods, updating the link refreshes the data, but not the
chart. Double clicking the chart makes it lose its data range. These issues are
fixed with the change, the name is displayed as "referred with spaces.ods"
Comment 34 ooo 2009-08-12 17:58:57 UTC
Reassigning to QA for verification.
Comment 35 oc 2009-08-14 11:22:22 UTC
verified in internal build cws_calcextref311
Comment 36 ooo 2009-09-05 17:37:28 UTC
Merged to cws dr69 as dr68ooo311 was not cloned (issue 104156)

revision 275847
sc/inc/compiler.hxx
sc/inc/externalrefmgr.hxx
sc/source/core/data/cell2.cxx
sc/source/core/tool/compiler.cxx
sc/source/core/tool/rangeutl.cxx
sc/source/core/tool/reftokenhelper.cxx
sc/source/core/tool/token.cxx
sc/source/ui/docshell/externalrefmgr.cxx
Comment 37 oc 2009-09-11 12:50:08 UTC
also verified in internal build cws_dr69
Comment 38 thorsten.ziehm 2010-06-07 11:49:11 UTC
This issue is closed automatically. It is in state 'verified/fixed' since 2
releases (OOo 3.1.1 and OOo 3.2). The policy [1] indicates that such older
issues should be closed.

If this issue still occur in a current build (OOo 3.2.1 or >DEV300m80) please
reopen the issue and set the target accordingly.

[1] : http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues