Changeset View
Changeset View
Standalone View
Standalone View
src/renderer/odtframe/KoOdtFrameReportDocument.cpp
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 65 | { | |||
---|---|---|---|---|---|
94 | delete oasisStore.store(); | 94 | delete oasisStore.store(); | ||
95 | return ok ? QFile::NoError : QFile::WriteError; | 95 | return ok ? QFile::NoError : QFile::WriteError; | ||
96 | 96 | | |||
97 | } | 97 | } | ||
98 | 98 | | |||
99 | void KoOdtFrameReportDocument::createStyles(KoGenStyles *coll) | 99 | void KoOdtFrameReportDocument::createStyles(KoGenStyles *coll) | ||
100 | { | 100 | { | ||
101 | // convert to inches | 101 | // convert to inches | ||
102 | qreal pw = m_pageOptions.widthPx() / KReportDpi::dpiX(); | 102 | qreal pw = m_pageOptions.widthPx() / KReportPrivate::dpiX(); | ||
103 | qreal ph = m_pageOptions.heightPx() / KReportDpi::dpiY(); | 103 | qreal ph = m_pageOptions.heightPx() / KReportPrivate::dpiY(); | ||
104 | qreal topMargin = m_pageOptions.getMarginTop() / KReportDpi::dpiY(); | 104 | qreal topMargin = m_pageOptions.getMarginTop() / KReportPrivate::dpiY(); | ||
105 | qreal bottomMargin = m_pageOptions.getMarginBottom() / KReportDpi::dpiY(); | 105 | qreal bottomMargin = m_pageOptions.getMarginBottom() / KReportPrivate::dpiY(); | ||
106 | qreal leftMargin = m_pageOptions.getMarginLeft() / KReportDpi::dpiX(); | 106 | qreal leftMargin = m_pageOptions.getMarginLeft() / KReportPrivate::dpiX(); | ||
107 | qreal rightMargin = m_pageOptions.getMarginRight() / KReportDpi::dpiX(); | 107 | qreal rightMargin = m_pageOptions.getMarginRight() / KReportPrivate::dpiX(); | ||
108 | QString orientation = m_pageOptions.isPortrait() ? "portrait" : "landscape"; | 108 | QString orientation = m_pageOptions.isPortrait() ? "portrait" : "landscape"; | ||
109 | 109 | | |||
110 | //kreportDebug()<<"Page:"<<pw<<ph<<orientation; | 110 | //kreportDebug()<<"Page:"<<pw<<ph<<orientation; | ||
111 | //kreportDebug()<<"Margin:"<<topMargin<<bottomMargin<<leftMargin<<rightMargin; | 111 | //kreportDebug()<<"Margin:"<<topMargin<<bottomMargin<<leftMargin<<rightMargin; | ||
112 | KoGenStyle page(KoGenStyle::PageLayoutStyle, "page-layout"); | 112 | KoGenStyle page(KoGenStyle::PageLayoutStyle, "page-layout"); | ||
113 | page.addProperty("style:num-format", "1"); | 113 | page.addProperty("style:num-format", "1"); | ||
114 | page.addProperty("style:print-orientation", orientation); | 114 | page.addProperty("style:print-orientation", orientation); | ||
115 | page.addProperty("style:writing-mode", "lr-tb"); | 115 | page.addProperty("style:writing-mode", "lr-tb"); | ||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |