Kaydet (Commit) b1b309c9 authored tarafından Rafael Dominguez's avatar Rafael Dominguez Kaydeden (comit) Luboš Luňák

Replace deprecated List for vector in SdTransferable.

üst 77f8397f
......@@ -142,9 +142,6 @@ SdTransferable::~SdTransferable()
ObjectReleased();
for( void* p = maPageBookmarks.First(); p; p = maPageBookmarks.Next() )
delete static_cast< String* >( p );
if( mbOwnView )
delete mpSdViewIntern;
......@@ -712,7 +709,7 @@ void SdTransferable::SetObjectDescriptor( const TransferableObjectDescriptor& rO
// -----------------------------------------------------------------------------
void SdTransferable::SetPageBookmarks( const List& rPageBookmarks, sal_Bool bPersistent )
void SdTransferable::SetPageBookmarks( const std::vector<rtl::OUString> &rPageBookmarks, sal_Bool bPersistent )
{
if( mpSourceDoc )
{
......@@ -723,20 +720,19 @@ void SdTransferable::SetPageBookmarks( const List& rPageBookmarks, sal_Bool bPer
mpPageDocShell = NULL;
for( void* p = maPageBookmarks.First(); p; p = maPageBookmarks.Next() )
delete static_cast< String* >( p );
maPageBookmarks.clear();
if( bPersistent )
{
std::vector<rtl::OUString> aExchangeList;
mpSdDrawDocument->CreateFirstPages(mpSourceDoc);
mpSdDrawDocument->InsertBookmarkAsPage( const_cast< List* >( &rPageBookmarks ), NULL, sal_False, sal_True, 1, sal_True, mpSourceDoc->GetDocSh(), sal_True, sal_True, sal_False );
mpSdDrawDocument->InsertBookmarkAsPage( rPageBookmarks, aExchangeList, sal_False, sal_True, 1, sal_True,
mpSourceDoc->GetDocSh(), sal_True, sal_True, sal_False );
}
else
{
mpPageDocShell = mpSourceDoc->GetDocSh();
for( sal_uLong i = 0; i < rPageBookmarks.Count(); i++ )
maPageBookmarks.Insert( new String( *static_cast< String* >( rPageBookmarks.GetObject( i ) ) ), LIST_APPEND );
maPageBookmarks = rPageBookmarks;
}
if( mpSdViewIntern && mpSdDrawDocument )
......
......@@ -76,10 +76,10 @@ public:
sal_Bool HasSourceDoc( const SdDrawDocument* pDoc ) const { return( mpSourceDoc == pDoc ); }
void SetPageBookmarks( const List& rPageBookmarks, sal_Bool bPersistent );
void SetPageBookmarks( const std::vector<rtl::OUString>& rPageBookmarks, sal_Bool bPersistent );
sal_Bool IsPageTransferable() const { return mbPageTransferable; }
sal_Bool HasPageBookmarks() const { return( mpPageDocShell && ( maPageBookmarks.Count() > 0 ) ); }
const List& GetPageBookmarks() const { return maPageBookmarks; }
sal_Bool HasPageBookmarks() const { return( mpPageDocShell && ( !maPageBookmarks.empty() ) ); }
const std::vector<rtl::OUString>& GetPageBookmarks() const { return maPageBookmarks; }
::sd::DrawDocShell* GetPageDocShell() const { return mpPageDocShell; }
sal_Bool SetTableRTF( SdDrawDocument*, const ::com::sun::star::datatransfer::DataFlavor& );
......@@ -104,7 +104,7 @@ private:
SfxObjectShellRef maDocShellRef;
::sd::DrawDocShell* mpPageDocShell;
List maPageBookmarks;
std::vector<rtl::OUString> maPageBookmarks;
TransferableDataHelper* mpOLEDataHelper;
TransferableObjectDescriptor* mpObjDesc;
const ::sd::View* mpSdView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment