~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kpresenter/part/KPrMasterPage.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include "pagelayout/KPrPageLayouts.h"
23
23
#include <KoXmlNS.h>
 
24
//#include <KoResourceManager.h>
 
25
#include "KPresenter.h"
24
26
#include <KoPALoadingContext.h>
 
27
#include <KoOdfWorkaround.h>
25
28
#include <kdebug.h>
26
29
 
27
30
KPrMasterPage::KPrMasterPage()
37
40
    return KoPageApp::Slide;
38
41
}
39
42
 
 
43
bool KPrMasterPage::loadOdf(const KoXmlElement &element, KoShapeLoadingContext &context)
 
44
{
 
45
#ifndef NWORKAROUND_ODF_BUGS
 
46
    KoOdfWorkaround::setFixPresentationPlaceholder(true, context);
 
47
#endif
 
48
    bool retval = KoPAPageBase::loadOdf(element, context);
 
49
#ifndef NWORKAROUND_ODF_BUGS
 
50
    KoOdfWorkaround::setFixPresentationPlaceholder(false, context);
 
51
#endif
 
52
    return retval;
 
53
}
 
54
 
40
55
void KPrMasterPage::loadOdfPageExtra( const KoXmlElement &element, KoPALoadingContext & loadingContext )
41
56
{
42
57
    // the layout needs to be loaded after the shapes are already loaded so the initialization of the data works
43
58
    KPrPageLayout * layout = 0;
44
59
    if ( element.hasAttributeNS( KoXmlNS::presentation, "presentation-page-layout-name" ) ) {
45
 
        KPrPageLayouts * layouts = dynamic_cast<KPrPageLayouts *>( loadingContext.dataCenter( PageLayouts ) );
 
60
        KPrPageLayouts *layouts = loadingContext.documentResourceManager()->resource(KPresenter::PageLayouts).value<KPrPageLayouts*>();
46
61
        Q_ASSERT( layouts );
47
62
        if ( layouts ) {
48
63
            QString layoutName = element.attributeNS( KoXmlNS::presentation, "presentation-page-layout-name" );