<commit_before>/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: AnimationSchemesPane.cxx,v $
 *
 *  $Revision: 1.6 $
 *
 *  last change: $Author: kz $ $Date: 2006-12-12 16:50:19 $
 *
 *  The Contents of this file are made available subject to
 *  the terms of GNU Lesser General Public License Version 2.1.
 *
 *
 *    GNU Lesser General Public License Version 2.1
 *    =============================================
 *    Copyright 2005 by Sun Microsystems, Inc.
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License version 2.1, as published by the Free Software Foundation.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public
 *    License along with this library; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *    MA  02111-1307  USA
 *
 ************************************************************************/

// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include "AnimationSchemesPane.hxx"
#include "AnimationSchemesPane.hrc"
#include "CustomAnimation.hrc"

#include "TransitionPreset.hxx"
#include "sdresid.hxx"
#include "ViewShellBase.hxx"
#include "DrawDocShell.hxx"
#include "SlideSorterViewShell.hxx"
#include "PaneManager.hxx"
#include "drawdoc.hxx"
#include "filedlg.hxx"
#include "strings.hrc"
#include "EventMultiplexer.hxx"

#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif

#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
#endif
#ifndef _GALLERY_HXX_
#include <svx/gallery.hxx>
#endif
#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <svtools/pathoptions.hxx>
#endif
#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
#endif
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
#endif

#include <algorithm>


using namespace ::com::sun::star;

using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::rtl::OUString;
using ::com::sun::star::uno::RuntimeException;

// ______________________
//
// Local Helper Functions
// ______________________

namespace
{

::sd::slidesorter::SlideSorterViewShell * lcl_getSlideSorterViewShell( ::sd::ViewShellBase& rBase )
{
    // Find a slide sorter to get the selection from.  When one is
    // displayed in the center pane use that.  Otherwise use the one in
    // the left pane.
    ::sd::ViewShell * pSlideSorter =
        rBase.GetPaneManager().GetViewShell( ::sd::PaneManager::PT_CENTER );

    if( pSlideSorter &&
        pSlideSorter->GetShellType() != ::sd::ViewShell::ST_SLIDE_SORTER )
    {
        pSlideSorter =
            rBase.GetPaneManager().GetViewShell( ::sd::PaneManager::PT_LEFT );
    }

    if( pSlideSorter &&
        pSlideSorter->GetShellType() != ::sd::ViewShell::ST_SLIDE_SORTER )
        pSlideSorter = 0;

    ::sd::slidesorter::SlideSorterViewShell * pSlideSorterViewShell =
          dynamic_cast< ::sd::slidesorter::SlideSorterViewShell * >( pSlideSorter );

    return pSlideSorterViewShell;
}

::std::vector< SdPage * > lcl_getSelectedPages( ::sd::ViewShellBase& rBase )
{
    ::sd::slidesorter::SlideSorterViewShell * pSlideSorterViewShell =
          lcl_getSlideSorterViewShell( rBase );
    DBG_ASSERT( pSlideSorterViewShell, "No Slide-Sorter available" );
    ::std::vector< SdPage * > aSelectedPages;

    if( pSlideSorterViewShell )
    {
        pSlideSorterViewShell->GetSelectedPages( aSelectedPages );
    }

    return aSelectedPages;
}

// void lcl_ApplyToPages( ::std::vector< SdPage * > aPages, const ::sd::impl::TransitionEffect & rEffect )
// {
//     ::std::vector< SdPage * >::const_iterator aIt( aPages.begin());
//     const ::std::vector< SdPage * >::const_iterator aEndIt( aPages.end());
//     for( ; aIt != aEndIt; ++aIt )
//     {
//         rEffect.applyTo( *(*aIt) );
//     }
// }

} // anonymous namespace

namespace sd
{<commit_msg>INTEGRATION: CWS components1 (1.4.98); FILE MERGED 2007/01/25 13:48:51 af 172.16.31.10: RESYNC: (1.5-1.6); FILE MERGED 2006/09/25 16:50:11 af 172.16.58.3: RESYNC: (1.4-1.5); FILE MERGED 2006/08/22 09:26:38 af 192.168.127.12: #i68075# Using SlideSorterViewShell::GetSlideSorter() instead of local method.<commit_after>/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: AnimationSchemesPane.cxx,v $
 *
 *  $Revision: 1.7 $
 *
 *  last change: $Author: rt $ $Date: 2007-04-03 15:37:17 $
 *
 *  The Contents of this file are made available subject to
 *  the terms of GNU Lesser General Public License Version 2.1.
 *
 *
 *    GNU Lesser General Public License Version 2.1
 *    =============================================
 *    Copyright 2005 by Sun Microsystems, Inc.
 *    901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License version 2.1, as published by the Free Software Foundation.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public
 *    License along with this library; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *    MA  02111-1307  USA
 *
 ************************************************************************/

// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include "AnimationSchemesPane.hxx"
#include "AnimationSchemesPane.hrc"
#include "CustomAnimation.hrc"

#include "TransitionPreset.hxx"
#include "sdresid.hxx"
#include "ViewShellBase.hxx"
#include "DrawDocShell.hxx"
#include "SlideSorterViewShell.hxx"
#include "drawdoc.hxx"
#include "filedlg.hxx"
#include "strings.hrc"
#include "EventMultiplexer.hxx"

#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif

#ifndef _SVT_CONTROLDIMS_HRC_
#include <svtools/controldims.hrc>
#endif
#ifndef _GALLERY_HXX_
#include <svx/gallery.hxx>
#endif
#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <svtools/pathoptions.hxx>
#endif
#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
#endif
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
#endif

#include <algorithm>


using namespace ::com::sun::star;

using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::rtl::OUString;
using ::com::sun::star::uno::RuntimeException;

// ______________________
//
// Local Helper Functions
// ______________________

namespace
{


::std::vector< SdPage * > lcl_getSelectedPages( ::sd::ViewShellBase& rBase )
{
    ::sd::slidesorter::SlideSorterViewShell * pSlideSorterViewShell =
        ::sd::slidesorter::SlideSorterViewShell::GetSlideSorter(rBase);
    DBG_ASSERT( pSlideSorterViewShell, "No Slide-Sorter available" );
    ::std::vector< SdPage * > aSelectedPages;

    if( pSlideSorterViewShell )
    {
        pSlideSorterViewShell->GetSelectedPages( aSelectedPages );
    }

    return aSelectedPages;
}

// void lcl_ApplyToPages( ::std::vector< SdPage * > aPages, const ::sd::impl::TransitionEffect & rEffect )
// {
//     ::std::vector< SdPage * >::const_iterator aIt( aPages.begin());
//     const ::std::vector< SdPage * >::const_iterator aEndIt( aPages.end());
//     for( ; aIt != aEndIt; ++aIt )
//     {
//         rEffect.applyTo( *(*aIt) );
//     }
// }

} // anonymous namespace

namespace sd
{
{'fraction_non_alphanumeric': 0.1629014531688851, 'fraction_numerical': 0.02259128098668946, 'mean_word_length': 4.277061855670103, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2552100', 'n_tokens_mistral': 2826, 'n_tokens_neox': 2636, 'n_words': 682}