[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2009-07-22 22:01:07
Message-ID: 1248300067.120038.31643.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1001327 by rempt:
make karbon compile
M +11 -9 karbon/ui/KarbonPart.cpp
M +6 -0 libs/main/KoDocument.cpp
M +1 -0 libs/main/KoDocument.h
--- trunk/koffice/karbon/ui/KarbonPart.cpp #1001326:1001327
@@ -146,11 +146,13 @@
initConfig();
// set as default paper
- m_pageLayout.format = KoPageFormat::defaultFormat();
- m_pageLayout.orientation = KoPageFormat::Portrait;
- m_pageLayout.width = MM_TO_POINT( KoPageFormat::width( m_pageLayout.format, \
m_pageLayout.orientation ) );
- m_pageLayout.height = MM_TO_POINT( KoPageFormat::height( m_pageLayout.format, \
m_pageLayout.orientation ) );
- setPageSize( QSizeF( m_pageLayout.width, m_pageLayout.height ) );
+ KoPageLayout pl = pageLayout();
+ pl.format = KoPageFormat::defaultFormat();
+ pl.orientation = KoPageFormat::Portrait;
+ pl.width = MM_TO_POINT( KoPageFormat::width( pageLayout().format, \
pageLayout().orientation ) ); + pl.height = MM_TO_POINT( KoPageFormat::height( \
pageLayout().format, pageLayout().orientation ) ); + setPageSize( QSizeF( \
pl.width, pl.height ) ); + setPageLayout(pl);
}
KarbonPart::~KarbonPart()
@@ -160,8 +162,8 @@
void KarbonPart::setPageLayout( const KoPageLayout& layout )
{
- m_pageLayout = layout;
- setPageSize( QSizeF( m_pageLayout.width, m_pageLayout.height ) );
+ setPageLayout(layout);
+ setPageSize( QSizeF( layout.width, layout.height ) );
}
KoView* KarbonPart::createViewInstance( QWidget* parent )
@@ -243,8 +245,8 @@
{
const KoXmlElement *style = odfStore.styles().findStyle(
master->attributeNS( KoXmlNS::style, "page-layout-name", QString() ) );
- m_pageLayout.loadOdf( *style );
- setPageSize( QSizeF( m_pageLayout.width, m_pageLayout.height ) );
+ pageLayout().loadOdf( *style );
+ setPageSize( QSizeF( pageLayout().width, pageLayout().height ) );
}
else
{
--- trunk/koffice/libs/main/KoDocument.cpp #1001326:1001327
@@ -2175,6 +2175,12 @@
return d->pageLayout;
}
+void KoDocument::setPageLayout(KoPageLayout pageLayout)
+{
+ d->pageLayout = pageLayout;
+}
+
+
KoUnit KoDocument::unit() const
{
return d->unit;
--- trunk/koffice/libs/main/KoDocument.h #1001326:1001327
@@ -614,6 +614,7 @@
* @see KoPageLayout
*/
virtual KoPageLayout pageLayout(int pageNumber = 0) const;
+ void setPageLayout(KoPageLayout pageLayout);
/**
* Performs a cleanup of unneeded backup files
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic