You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/07/22 15:23:11 UTC

[Bug 120341] New: Rework SCSTR_FIELDSEP so that is is less error-prone

https://issues.apache.org/ooo/show_bug.cgi?id=120341

          Priority: P3
            Bug ID: 120341
          Assignee: ooo-issues@incubator.apache.org
           Summary: Rework SCSTR_FIELDSEP so that is is less error-prone
          Severity: normal
        Issue Type: ENHANCEMENT
    Classification: Application
                OS: All
          Reporter: pescetti@apache.org
          Hardware: All
            Status: CONFIRMED
           Version: AOO 3.4.0
         Component: save-export
           Product: spreadsheet

As discussed by Ariel in http://s.apache.org/rMk :

In main/sc/source/ui/src/scstring.src#483

483 String SCSTR_FIELDSEP
484 {
485     Text [ en-US ] = ",\t44\t;\t59\t:\t58\t{Tab}\t9\t{space}\t32 " ;
486 };

It would be better to place markers, remove the localization, and
replace the markers (I guess "Tab" and "space" are already translated
somewhere else, or two new string can be created):

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" ;
};

If someone files a new bug, I [Ariel] can take a look at it.

Note: Bug 120216 is the problem that started this (more general) discussion.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 120341] Rework SCSTR_FIELDSEP so that it is less error-prone

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120341

Andrea Pescetti <pe...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Rework SCSTR_FIELDSEP so    |Rework SCSTR_FIELDSEP so
                   |that is is less error-prone |that it is less error-prone

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 120341] Rework SCSTR_FIELDSEP so that it is less error-prone

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120341

--- Comment #1 from Ariel Constenla-Haile <ar...@apache.org> ---
(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;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 120341] Rework SCSTR_FIELDSEP so that it is less error-prone

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120341

--- Comment #2 from SVN Robot <sv...@dev.null.org> ---
"arielch" committed SVN revision 1364473 into trunk:
#i120341# - Make SCSTR_FIELDSEP less translation-error-prone

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 120341] Rework SCSTR_FIELDSEP so that it is less error-prone

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120341

Ariel Constenla-Haile <ar...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ACCEPTED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Ariel Constenla-Haile <ar...@apache.org> ---
Fixed in trunk

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 120341] Rework SCSTR_FIELDSEP so that it is less error-prone

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120341

Shenfeng Liu <li...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |liushenf@gmail.com
   Target Milestone|---                         |AOO 3.5.0

--- Comment #4 from Shenfeng Liu <li...@gmail.com> ---
set Target Milestone to AOO 3.5.0 for PM purpose.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug 120341] Rework SCSTR_FIELDSEP so that it is less error-prone

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120341

Ariel Constenla-Haile <ar...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |ACCEPTED
                 CC|                            |ooo-issues@incubator.apache
                   |                            |.org
           Assignee|ooo-issues@incubator.apache |arielch@apache.org
                   |.org                        |

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.