https://bugs.documentfoundation.org/show_bug.cgi?id=145552

Julien Nabet <serval2...@yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |serval2...@yahoo.fr
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Julien Nabet <serval2...@yahoo.fr> ---
Searching about "No corresponding column type could be found for column", I
found:
dbaccess/inc/strings.hrc:307:#define STR_UNKNOWN_TYPE_FOUND                    
 NC_("STR_UNKNOWN_TYPE_FOUND", "No corresponding column type could be found for
column '#1'." )

>From STR_UNKNOWN_TYPE_FOUND:
1525 void OCopyTableWizard::showColumnTypeNotSupported(std::u16string_view
_rColumnName)
1526 {
1527     OUString sMessage( DBA_RES( STR_UNKNOWN_TYPE_FOUND ) );
1528     sMessage = sMessage.replaceFirst("#1",_rColumnName);
1529     showError(sMessage);
1530 }

on gdb, when putting a break in the function, I got:

#0 
dbaui::OCopyTableWizard::showColumnTypeNotSupported(std::basic_string_view<char16_t,
std::char_traits<char16_t> >) (this=0x49e76c0, _rColumnName=u"Photo") at
dbaccess/source/ui/misc/WCopyTable.cxx:1527
#1  0x00007fdd6ebf268d in
dbaui::OWizColumnSelect::createNewColumn(weld::TreeView*,
dbaui::OFieldDescription const*, std::__debug::vector<rtl::OUString,
std::allocator<rtl::OUString> >&, rtl::OUString const&, rtl::OUString const&,
int, comphelper::UStringMixEqual const&)
    (this=0x64609b0, _pListbox=0x4ccd020, _pSrcField=0x5ae0460,
_rRightColumns=std::__debug::vector of length 3, capacity 4 = {...},
_sColumnName="Photo", _sExtraChars="#@", _nMaxNameLen=64, _aCase=...)
    at dbaccess/source/ui/misc/WColumnSelect.cxx:297
#2  0x00007fdd6ebf147b in dbaui::OWizColumnSelect::moveColumn(weld::TreeView*,
weld::TreeView const*, std::__debug::vector<rtl::OUString,
std::allocator<rtl::OUString> >&, rtl::OUString const&, rtl::OUString const&,
int, comphelper::UStringMixEqual const&)
    (this=0x64609b0, _pRight=0x4ccd020, _pLeft=0x55f2270,
_rRightColumns=std::__debug::vector of length 3, capacity 4 = {...},
_sColumnName="Photo", _sExtraChars="#@", _nMaxNameLen=64, _aCase=...)
    at dbaccess/source/ui/misc/WColumnSelect.cxx:312
#3  0x00007fdd6ebf1081 in
dbaui::OWizColumnSelect::ButtonClickHdl(weld::Button&) (this=0x64609b0,
rButton=...) at dbaccess/source/ui/misc/WColumnSelect.cxx:213
#4  0x00007fdd6ebefc70 in
dbaui::OWizColumnSelect::LinkStubButtonClickHdl(void*, weld::Button&)
(instance=0x64609b0, data=...) at dbaccess/source/ui/misc/WColumnSelect.cxx:158

when taking a look at frame 1, I see:
    274 void OWizColumnSelect::createNewColumn( weld::TreeView* _pListbox,
    275                                         OFieldDescription const *
_pSrcField,
    276                                         std::vector< OUString>&
_rRightColumns,
    277                                         const OUString&  _sColumnName,
    278                                         const OUString&  _sExtraChars,
    279                                         sal_Int32              
_nMaxNameLen,
    280                                         const
::comphelper::UStringMixEqual& _aCase)
    281 {
    282     OUString sConvertedName =
m_pParent->convertColumnName(TMultiListBoxEntryFindFunctor(&_rRightColumns,_aCase),
    283                                                                
_sColumnName,
    284                                                                
_sExtraChars,
    285                                                                
_nMaxNameLen);
    286     OFieldDescription* pNewField = new OFieldDescription(*_pSrcField);
    287     pNewField->SetName(sConvertedName);
    288     bool bNotConvert = true;
    289    
pNewField->SetType(m_pParent->convertType(_pSrcField->getSpecialTypeInfo(),bNotConvert));
    290     if ( !m_pParent->supportsPrimaryKey() )
    291         pNewField->SetPrimaryKey(false);
    292 
    293    
_pListbox->append(OUString::number(reinterpret_cast<sal_Int64>(pNewField)),
sConvertedName);
    294     _rRightColumns.push_back(sConvertedName);
    295 
    296     if ( !bNotConvert )
    297         m_pParent->showColumnTypeNotSupported(sConvertedName);
    298 }

which shows that we must dig into "convertType" since it's the only one which
can modify bNotConvert to false  (see
https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/misc/WCopyTable.cxx?r=8ee18d0b&mo=51518&fi=1408#1408).

This method can call until 3 times getTypeInfoFromType (see
https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/misc/UITools.cxx?r=8a017d25#263)

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

Reply via email to