Tag: cws_src680_dba22b
User: fs      
Date: 2006/12/18 03:03:04

Modified:
   dba/dbaccess/source/ui/dlg/detailpages.cxx

Log:
 RESYNC: (1.41-1.42); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/ui/dlg/
=======================================

File [changed]: detailpages.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/detailpages.cxx?r1=1.41.54.2&r2=1.41.54.3
Delta lines:  +3 -58
--------------------
--- detailpages.cxx     5 Dec 2006 15:48:40 -0000       1.41.54.2
+++ detailpages.cxx     18 Dec 2006 11:03:02 -0000      1.41.54.3
@@ -364,59 +364,7 @@
                if ( !m_pDSFixedLine )
                        m_pDSFixedLine = new FixedLine(this, 
ResId(FL_DATAHANDLING));
        }
-       // 
-----------------------------------------------------------------------
-       namespace
-       {
-               void adjustCharSets( const SfxItemSet& _rSet, const 
OCharsetDisplay& _rCharSets, ListBox* _pCharsets )
-               {
-                       // determine the type of the current URL
-                       DATASOURCE_TYPE eDSType = DST_UNKNOWN;
-
-                       SFX_ITEMSET_GET(_rSet, pConnectUrl, SfxStringItem, 
DSID_CONNECTURL, sal_True);
-                       SFX_ITEMSET_GET(_rSet, pTypesItem, 
DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
-                       ODsnTypeCollection* pTypeCollection = pTypesItem ? 
pTypesItem->getCollection() : NULL;
-                       if (pTypeCollection && pConnectUrl && 
pConnectUrl->GetValue().Len())
-                               eDSType = 
pTypeCollection->getType(pConnectUrl->GetValue());
-
-                       // the only type we're interested in is DBASE
-                       if ( DST_DBASE == eDSType )
-                       {
-                               // for this type, we need to exclude all 
encodings which do not have a fixed character
-                               // length (such as UTF-8)
-                               rtl_TextEncodingInfo aEncodingInfo; 
aEncodingInfo.StructSize = sizeof( rtl_TextEncodingInfo );
-
-                               OCharsetDisplay::const_iterator aLoop = 
_rCharSets.begin();
-                               OCharsetDisplay::const_iterator aLoopEnd = 
_rCharSets.end();
-                               while ( aLoop != aLoopEnd )
-                               {
-                                       rtl_TextEncoding eEncoding = 
(*aLoop).getEncoding();
-                                       sal_Bool bAllowIt = sal_False;
-                                       if ( RTL_TEXTENCODING_DONTKNOW == 
eEncoding )
-                                               bAllowIt = sal_True;
-                                       else
-                                       {
-                                               // check if we should include 
the current encoding in the list
-                                               OSL_VERIFY( 
rtl_getTextEncodingInfo( eEncoding, &aEncodingInfo ) );
-                                               bAllowIt = 
aEncodingInfo.MinimumCharSize == aEncodingInfo.MaximumCharSize;
-                                       }
-
-                                       // get the display name for the 
encoding to check if we currently include it in the list
-                                       String sDisplayName = 
(*aLoop).getDisplayName();
-                                       const sal_Bool bHaveIt = 
LISTBOX_ENTRY_NOTFOUND != _pCharsets->GetEntryPos( sDisplayName );
-                                       if ( bAllowIt != bHaveIt )
-                                       {       // we need to adjust the list
-                                               if ( !bAllowIt )
-                                                       
_pCharsets->RemoveEntry( sDisplayName );
-                                               else
-                                                       
_pCharsets->InsertEntry( sDisplayName );
-                                       }
 
-                                       // next
-                                       ++aLoop;
-                               }
-                       }
-               }
-       }
        // 
-----------------------------------------------------------------------
        void OCommonBehaviourTabPage::fillWindows(::std::vector< 
ISaveValueWrapper* >& _rControlList)
        {
@@ -594,9 +542,6 @@
 
                        if ((m_nControlFlags & CBTP_USE_CHARSET) == 
CBTP_USE_CHARSET)
                        {
-                               // adjust the list of available character sets 
according to the data source type
-                               adjustCharSets( _rSet, m_aCharsets, m_pCharset 
);
-
                                OCharsetDisplay::const_iterator aFind = 
m_aCharsets.findIanaName( pCharsetItem->GetValue() );
                                if (aFind == m_aCharsets.end())
                                {




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to