Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Rework SCSTR_FIELDSEP so that it is less error-prone | ||
---|---|---|---|
Product: | Calc | Reporter: | Andrea Pescetti <pescetti> |
Component: | save-export | Assignee: | Ariel Constenla-Haile <arielch> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Normal | ||
Priority: | P3 | CC: | issues, liushenf, rb.henschel |
Version: | 3.4.0 | ||
Target Milestone: | 4.0.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Andrea Pescetti
2012-07-22 13:23:11 UTC
(In reply to comment #0) > String SCSTR_FIELDSEP > { > Text = ",\t44\t;\t59\t:\t58\t{$1}\t9\t{$2}\t32 " ; > }; > > String SCSTR_FIELDSEP_TAB > { > Text [ en-US ] = "Tab" ; > }; > > String SCSTR_FIELDSEP_SPACE > { > Text [ en-US ] = "space" ; > }; Looking at it again, it looks less error prone the following: String SCSTR_FIELDSEP { Text = ",\t44\t;\t59\t:\t58\t{%TAB}\t9\t{%SPACE}\t32 " ; }; %TAB and %SPACE as placeholders instead of %1 and %2 don't require to track the placeholder position when replacing: in ScImportOptionsDlg::ScImportOptionsDlg String sFieldSep( ScResId( SCSTR_FIELDSEP ) ); sFieldSep.SearchAndReplaceAscii( "%TAB", String(ScResId(SCSTR_FIELDSEP_TAB)) ); sFieldSep.SearchAndReplaceAscii( "%SPACE", String(ScResId(SCSTR_FIELDSEP_SPACE)) ); // im Ctor-Initializer nicht moeglich (MSC kann das nicht): pFieldSepTab = new ScDelimiterTable( sFieldSep ); SCSTR_FIELDSEP is also used in ScImportAsciiDlg, member variable aFldSepList, which is unused, so I'll remove it. [ariel@localhost sc]$ cd /build/aoo/src/clean/trunk/main/sc [ariel@localhost sc]$ git grep SCSTR_FIELDSEP inc/sc.hrc:#define SCSTR_FIELDSEP (STR_START + 61) source/ui/dbgui/scuiasciiopt.cxx: aFldSepList ( ScResId( SCSTR_FIELDSEP ) ), source/ui/dbgui/scuiimoptdlg.cxx: pFieldSepTab = new ScDelimiterTable( String(ScResId(SCSTR_FIELDSEP)) ); source/ui/src/scstring.src:String SCSTR_FIELDSEP [ariel@localhost sc]$ git grep aFldSepList source/ui/dbgui/scuiasciiopt.cxx: aFldSepList ( ScResId( SCSTR_FIELDSEP ) ), source/ui/inc/asciiopt.hxx://CHINA001 String aFldSepList; source/ui/inc/scuiasciiopt.hxx: String aFldSepList; "arielch" committed SVN revision 1364473 into trunk: #i120341# - Make SCSTR_FIELDSEP less translation-error-prone Fixed in trunk set Target Milestone to AOO 3.5.0 for PM purpose. |