View | Details | Raw Unified | Return to issue 18728
Collapse All | Expand All

(-)officecfg/registry/schema/org/openoffice/Office/Calc.xcs (+13 lines)
Lines 1023-1028 Link Here
1023
            <info>
1023
            <info>
1024
                <desc>Contains the dialogs settings.</desc>
1024
                <desc>Contains the dialogs settings.</desc>
1025
            </info>
1025
            </info>
1026
            <group oor:name="DBFImport">
1027
                <info>
1028
                    <desc>Contains settings for DBF Import</desc>
1029
                </info>
1030
                <prop oor:name="CharSet" oor:type="xs:int">
1031
                    <info>
1032
                        <author>muthusuba</author>
1033
                        <desc>Charset/Language</desc>
1034
                        <label>CharSet</label>
1035
                    </info>
1036
                    <value>-1</value>
1037
                </prop>
1038
            </group>
1026
            <group oor:name="CSVImport">
1039
            <group oor:name="CSVImport">
1027
                <info>
1040
                <info>
1028
                    <desc>Contains setting for Text CSV Import</desc>
1041
                    <desc>Contains setting for Text CSV Import</desc>
(-)filtuno.cxx.org (-1 / +55 lines)
Lines 55-62 Link Here
55
55
56
#include <memory>
56
#include <memory>
57
57
58
#include <optutil.hxx>
59
#include <com/sun/star/uno/Any.hxx>
60
#include <com/sun/star/uno/Sequence.hxx>
61
62
58
using namespace ::com::sun::star;
63
using namespace ::com::sun::star;
59
using ::rtl::OUStringBuffer;
64
using ::rtl::OUStringBuffer;
65
using namespace rtl;
66
using namespace com::sun::star::uno;
60
67
61
//------------------------------------------------------------------------
68
//------------------------------------------------------------------------
62
69
Lines 70-77 SC_SIMPLE_SERVICE_INFO( ScFilterOptionsO Link Here
70
#define SC_UNONAME_FILTEROPTIONS	"FilterOptions"
77
#define SC_UNONAME_FILTEROPTIONS	"FilterOptions"
71
#define SC_UNONAME_INPUTSTREAM		"InputStream"
78
#define SC_UNONAME_INPUTSTREAM		"InputStream"
72
79
80
81
#define CHAR_SET                    "CharSet"
82
#define SEP_PATH                    "Office.Calc/Dialogs/DBFImport"
83
84
//------------------------------------------------------------------------
85
86
static void load_CharSet( rtl_TextEncoding &nCharSet )
87
{
88
    sal_Int32 nChar;
89
    Sequence<Any> aValues;
90
    const Any *pProperties;
91
    Sequence<OUString> aNames(1);
92
    OUString* pNames = aNames.getArray();
93
    ScLinkConfigItem aItem( OUString::createFromAscii( SEP_PATH ) );
94
95
    pNames[0] = OUString::createFromAscii( CHAR_SET );
96
    aValues = aItem.GetProperties( aNames );
97
    pProperties = aValues.getConstArray();
98
99
    // Default choice
100
    nCharSet = RTL_TEXTENCODING_IBM_850;
101
102
    if( pProperties[0].hasValue() )
103
    {
104
        pProperties[0] >>= nChar;
105
        if( nChar >= 0)
106
            nCharSet = (rtl_TextEncoding) nChar;
107
    }
108
}
109
110
static void save_CharSet( rtl_TextEncoding nCharSet )
111
{
112
    Sequence<Any> aValues;
113
    Any *pProperties;
114
    Sequence<OUString> aNames(1);
115
    OUString* pNames = aNames.getArray();
116
    ScLinkConfigItem aItem( OUString::createFromAscii( SEP_PATH ) );
117
118
    pNames[0] = OUString::createFromAscii( CHAR_SET );
119
    aValues = aItem.GetProperties( aNames );
120
    pProperties = aValues.getArray();
121
    pProperties[0] <<= (sal_Int32) nCharSet;
122
123
    aItem.PutProperties(aNames, aValues);
124
}
125
73
//------------------------------------------------------------------------
126
//------------------------------------------------------------------------
74
127
75
ScFilterOptionsObj::ScFilterOptionsObj() :
128
ScFilterOptionsObj::ScFilterOptionsObj() :
76
    bExport( sal_False )
129
    bExport( sal_False )
77
{
130
{
Lines 251-257 sal_Int16 SAL_CALL ScFilterOptionsObj::e Link Here
251
                aTitle = ScGlobal::GetRscString( STR_IMPORT_DBF );
305
                aTitle = ScGlobal::GetRscString( STR_IMPORT_DBF );
252
            }
306
            }
253
            // common for dBase import/export
307
            // common for dBase import/export
254
            eEncoding = RTL_TEXTENCODING_IBM_850;
308
            load_CharSet( eEncoding );
255
            bDBEnc = sal_True;
309
            bDBEnc = sal_True;
256
        }
310
        }
257
        else if ( aFilterString == ScDocShell::GetDifFilterName() )
311
        else if ( aFilterString == ScDocShell::GetDifFilterName() )
Lines 283-288 sal_Int16 SAL_CALL ScFilterOptionsObj::e Link Here
283
        if ( pDlg->Execute() == RET_OK )
337
        if ( pDlg->Execute() == RET_OK )
284
        {
338
        {
285
            pDlg->GetImportOptions( aOptions );
339
            pDlg->GetImportOptions( aOptions );
340
            save_CharSet( aOptions.eCharSet );
286
            if ( bAscii )
341
            if ( bAscii )
287
                aFilterOptions = aOptions.BuildString();
342
                aFilterOptions = aOptions.BuildString();
288
            else
343
            else

Return to issue 18728