[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/karbon
From: Jan Hambrecht <jaham () gmx ! net>
Date: 2010-05-05 20:11:59
Message-ID: 20100505201159.5AFF6AC8AC () svn ! kde ! org
[Download RAW message or body]
SVN commit 1123319 by jaham:
correctly save the page layout
CCBUG:236440
M +2 -9 common/KarbonDocument.cpp
M +1 -1 common/KarbonDocument.h
M +1 -1 ui/KarbonPart.cpp
--- trunk/koffice/karbon/common/KarbonDocument.cpp #1123318:1123319
@@ -309,7 +309,7 @@
// ODF saving
//#############################################################################
-bool KarbonDocument::saveOdf(KoDocument::SavingContext &documentContext)
+bool KarbonDocument::saveOdf(KoDocument::SavingContext &documentContext, const KoPageLayout &layout)
{
KoStore * store = documentContext.odfStore.store();
KoXmlWriter* contentWriter = documentContext.odfStore.contentWriter();
@@ -325,14 +325,7 @@
saveOdfStyles(shapeContext);
// save page
- KoPageLayout page;
- page.format = KoPageFormat::defaultFormat();
- page.orientation = KoPageFormat::Portrait;
- page.width = pageSize().width();
- page.height = pageSize().height();
-
- KoGenStyle pageLayout = page.saveOdf();
- QString layoutName = mainStyles.insert(pageLayout, "PL");
+ QString layoutName = mainStyles.insert(layout.saveOdf(), "PL");
KoGenStyle masterPage(KoGenStyle::MasterPageStyle);
masterPage.addAttribute("style:page-layout-name", layoutName);
mainStyles.insert(masterPage, "Default", KoGenStyles::DontAddNumberToName);
--- trunk/koffice/karbon/common/KarbonDocument.h #1123318:1123319
@@ -155,7 +155,7 @@
const QList<KoShape*> shapes() const;
void saveOasis(KoShapeSavingContext & context) const;
- bool saveOdf(KoDocument::SavingContext & documentContext);
+ bool saveOdf(KoDocument::SavingContext & documentContext, const KoPageLayout &layout);
bool loadOasis(const KoXmlElement &element, KoShapeLoadingContext &context);
void loadOdfStyles(KoShapeLoadingContext & context);
void saveOdfStyles(KoShapeSavingContext & context);
--- trunk/koffice/karbon/ui/KarbonPart.cpp #1123318:1123319
@@ -326,7 +326,7 @@
bool KarbonPart::saveOdf(SavingContext &documentContext)
{
- if (! d->document.saveOdf(documentContext))
+ if (! d->document.saveOdf(documentContext, pageLayout()))
return false;
KoStore * store = documentContext.odfStore.store();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic