From 007f16ef7ad40ae932df884ba04f0de71928b852 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 15 May 2012 00:25:35 +0200 Subject: SwTableAutoFmtTbl: try to fix MSVC tinderbox: C:/lo/core/sw/inc\tblafmt.hxx(311) : error C2487: 'boost::ptr_container_detail::reversible_ptr_container::insert' : member of dll interface class may not be declared with dll interface Not really understanding what the problem is here, attempting to fix it by not deriving SwTableAutoFmtTbl from the container, and trying to get that to build somehow resulted in this commit. --- sw/source/ui/table/convert.cxx | 2 +- sw/source/ui/table/tautofmt.cxx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sw/source/ui/table') diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 20d232b7593f..332591f99d9c 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -63,7 +63,7 @@ static sal_Unicode uOther = ','; void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, SwInsertTableOptions& rInsTblOpts, - SwTableAutoFmt *& prTAFmt ) + SwTableAutoFmt const*& prTAFmt ) { if( aTabBtn.IsChecked() ) { diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 3001d20af306..984d09efd8d3 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -259,11 +259,12 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) nIndex = 255; } - for( sal_uInt8 i = 0, nCount = (sal_uInt8)pTableTbl->size(); i < nCount; i++ ) + for (sal_uInt8 i = 0, nCount = static_cast(pTableTbl->size()); + i < nCount; i++) { - SwTableAutoFmt* pFmt = &(*pTableTbl)[ i ]; - aLbFormat.InsertEntry( pFmt->GetName() ); - if( pSelFmt && pFmt->GetName() == pSelFmt->GetName() ) + SwTableAutoFmt const& rFmt = (*pTableTbl)[ i ]; + aLbFormat.InsertEntry(rFmt.GetName()); + if (pSelFmt && rFmt.GetName() == pSelFmt->GetName()) nIndex = i; } @@ -379,7 +380,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) if( (*pTableTbl)[ n ].GetName() > aFormatName ) break; - pTableTbl->insert( pTableTbl->begin() + n, pNewData ); + pTableTbl->InsertAutoFmt(n, pNewData); aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n ); aLbFormat.SelectEntryPos( nDfltStylePos + n ); bFmtInserted = sal_True; @@ -427,7 +428,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) aLbFormat.RemoveEntry( nDfltStylePos + nIndex ); aLbFormat.SelectEntryPos( nDfltStylePos + nIndex-1 ); - pTableTbl->erase( pTableTbl->begin() + nIndex ); + pTableTbl->EraseAutoFmt(nIndex); nIndex--; if( !nIndex ) @@ -486,8 +487,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) break; } - pTableTbl->transfer(pTableTbl->begin() + n, - pTableTbl->begin() + nIndex, *pTableTbl); + pTableTbl->MoveAutoFmt(n, nIndex); aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n ); aLbFormat.SelectEntryPos( nDfltStylePos + n ); -- cgit