2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-27 16:10:40 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-11-26 18:46:46 +00:00
|
|
|
|
2006-09-16 17:15:03 +00:00
|
|
|
|
2007-01-23 07:54:19 +00:00
|
|
|
#include "drawdoc.hxx"
|
|
|
|
#include "cusshow.hxx"
|
2012-08-08 12:29:34 +02:00
|
|
|
#include "customshowlist.hxx"
|
2007-01-23 07:54:19 +00:00
|
|
|
|
2008-04-03 12:23:35 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::presentation;
|
|
|
|
|
2007-01-23 07:54:19 +00:00
|
|
|
/** replaces a slide from all custom shows with a new one or removes a slide from
|
|
|
|
all custom shows if pNewPage is 0.
|
|
|
|
*/
|
|
|
|
void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdPage* pNewPage )
|
|
|
|
{
|
|
|
|
if ( mpCustomShowList )
|
|
|
|
{
|
2012-08-08 12:29:34 +02:00
|
|
|
for (sal_uLong i = 0; i < mpCustomShowList->size(); i++)
|
2007-01-23 07:54:19 +00:00
|
|
|
{
|
2012-08-08 12:29:34 +02:00
|
|
|
SdCustomShow* pCustomShow = (*mpCustomShowList)[i];
|
2012-01-31 21:38:43 +04:00
|
|
|
pCustomShow->ReplacePage(pOldPage, pNewPage);
|
2007-01-23 07:54:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-04-03 12:23:35 +00:00
|
|
|
extern Reference< XPresentation2 > CreatePresentation( const SdDrawDocument& rDocument );
|
|
|
|
|
|
|
|
const Reference< XPresentation2 >& SdDrawDocument::getPresentation() const
|
|
|
|
{
|
|
|
|
if( !mxPresentation.is() )
|
|
|
|
{
|
|
|
|
const_cast< SdDrawDocument* >( this )->mxPresentation = CreatePresentation(*this);
|
|
|
|
}
|
|
|
|
return mxPresentation;
|
|
|
|
}
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|