Files
wxWidgets/src/xrc/xmladv.cpp
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

82 lines
2.2 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: src/xrc/xmladv.cpp
// Purpose: Parts of wxXRC library depending on wxAdv: they must not be in
// xmlres.cpp itself or it becomes impossible to use wxXRC without
// linking wxAdv even if the latter is not used at all.
// Author: Vadim Zeitlin (extracted from src/xrc/xmlres.cpp)
// Created: 2008-08-02
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_XRC
#include "wx/xrc/xmlres.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif // WX_PRECOMP
#include "wx/animate.h"
#include "wx/scopedptr.h"
// ============================================================================
// implementation
// ============================================================================
#if wxUSE_ANIMATIONCTRL
wxAnimation* wxXmlResourceHandlerImpl::GetAnimation(const wxString& param)
{
const wxString name = GetParamValue(param);
if ( name.empty() )
return NULL;
// load the animation from file
wxScopedPtr<wxAnimation> ani(new wxAnimation);
#if wxUSE_FILESYSTEM
wxFSFile * const
fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE);
if ( fsfile )
{
ani->Load(*fsfile->GetStream());
delete fsfile;
}
#else
ani->LoadFile(name);
#endif
if ( !ani->IsOk() )
{
ReportParamError
(
param,
wxString::Format("cannot create animation from \"%s\"", name)
);
return NULL;
}
return ani.release();
}
#endif // wxUSE_ANIMATIONCTRL
#endif // wxUSE_XRC