[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: prettyness commits in trunk; (was Re: koffice)
From: Thomas Zander <zander () kde ! org>
Date: 2010-04-17 13:09:13
Message-ID: 201004171509.14945.zander () kde ! org
[Download RAW message or body]
Did svn trunk open up today?
I thought we were in 'bugfixes only' still.
Did I miss something?
On Saturday 17. April 2010 11.43.52 Boudewijn Rempt wrote:
> SVN commit 1115728 by rempt:
>
> warning--
>
> M +1 -1 filters/kspread/gnumeric/gnumericimport.cc
> M +1 -1 filters/kspread/opencalc/opencalcimport.cc
> M +0 -1 kexi/main/printing/kexisimpleprintingengine.cpp
> M +59 -59 kformula/flake/AttributeManager.cpp
> M +0 -1 kpresenter/part/KPrNotes.cpp
> M +0 -1 kspread/PrintSettings.cpp
> M +2 -2 kspread/Sheet.cpp
> M +1 -1 kspread/interfaces/SheetAdaptor.cpp
> M +1 -1 kspread/part/Doc.cpp
> M +1 -1 kword/part/KWDLoader.cpp
> M +0 -1 kword/part/KWPageStyle.cpp
> M +0 -1 kword/part/dialogs/KWStartupWidget.cpp
> M +4 -4 kword/part/tests/TestPageCommands.cpp
> M +1 -1 kword/part/tests/TestPageManager.cpp
> M +2 -1 kword/plugins/scripting/Module.cpp
> M +1 -2 libs/kopageapp/KoPAMasterPage.cpp
> M +0 -6 libs/odf/KoPageLayout.cpp
> M +0 -7 libs/odf/KoPageLayout.h
>
>
> --- trunk/koffice/filters/kspread/gnumeric/gnumericimport.cc
> #1115727:1115728 @@ -893,7 +893,7 @@
> if (!size.isNull())
> paperSize = size.text();
>
> - KoPageLayout pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
> pageLayout.format = KoPageFormat::formatFromString(paperSize);
> pageLayout.orientation = (orientation == "Portrait")
> ? KoPageFormat::Portrait :
> KoPageFormat::Landscape; ---
> trunk/koffice/filters/kspread/opencalc/opencalcimport.cc #1115727:1115728
> @@ -1199,7 +1199,7 @@
> format = QString("%1x%2").arg(width).arg(height);
> kDebug(30518) << " format :" << format;
>
> - KoPageLayout pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
> pageLayout.format = KoPageFormat::formatFromString(format);
> pageLayout.orientation = (orientation == "Portrait")
> ? KoPageFormat::Portrait :
> KoPageFormat::Landscape; ---
> trunk/koffice/kexi/main/printing/kexisimpleprintingengine.cpp
> #1115727:1115728 @@ -48,7 +48,6 @@
>
> KexiSimplePrintingSettings::KexiSimplePrintingSettings()
> {
> - pageLayout = KoPageLayout::standardLayout();
> addPageNumbers = true;
> addDateAndTime = true;
> addTableBorders = false;
> --- trunk/koffice/kformula/flake/AttributeManager.cpp #1115727:1115728
> @@ -26,30 +26,30 @@
> #include <QFontMetricsF>
> #include <QColor>
> #include <kdebug.h>
> -// Copied from koffice KoUnit.h
> +//// Copied from koffice KoUnit.h
> +//
> +//// 1 inch ^= 72 pt
> +//// 1 inch ^= 25.399956 mm (-pedantic ;p)
> +//// 1 pt = 1/12 pi
> +//// 1 pt ^= 0.0077880997 cc
> +//// 1 cc = 12 dd
> +//// Note: I don't use division but multiplication with the inverse value
> +//// because it's faster ;p (Werner)
> +//#define POINT_TO_MM(px) ((px)*0.352777167)
> +//#define MM_TO_POINT(mm) ((mm)*2.83465058)
> +//#define POINT_TO_CM(px) ((px)*0.0352777167)
> +//#define CM_TO_POINT(cm) ((cm)*28.3465058)
> +//#define POINT_TO_DM(px) ((px)*0.00352777167)
> +//#define DM_TO_POINT(dm) ((dm)*283.465058)
> +//#define POINT_TO_INCH(px) ((px)*0.01388888888889)
> +//#define INCH_TO_POINT(inch) ((inch)*72.0)
> +//#define MM_TO_INCH(mm) ((mm)*0.039370147)
> +//#define INCH_TO_MM(inch) ((inch)*25.399956)
> +//#define POINT_TO_PI(px)((px)*0.083333333)
> +//#define POINT_TO_CC(px)((px)*0.077880997)
> +//#define PI_TO_POINT(pi)((pi)*12)
> +//#define CC_TO_POINT(cc)((cc)*12.840103)
>
> -// 1 inch ^= 72 pt
> -// 1 inch ^= 25.399956 mm (-pedantic ;p)
> -// 1 pt = 1/12 pi
> -// 1 pt ^= 0.0077880997 cc
> -// 1 cc = 12 dd
> -// Note: I don't use division but multiplication with the inverse value
> -// because it's faster ;p (Werner)
> -#define POINT_TO_MM(px) ((px)*0.352777167)
> -#define MM_TO_POINT(mm) ((mm)*2.83465058)
> -#define POINT_TO_CM(px) ((px)*0.0352777167)
> -#define CM_TO_POINT(cm) ((cm)*28.3465058)
> -#define POINT_TO_DM(px) ((px)*0.00352777167)
> -#define DM_TO_POINT(dm) ((dm)*283.465058)
> -#define POINT_TO_INCH(px) ((px)*0.01388888888889)
> -#define INCH_TO_POINT(inch) ((inch)*72.0)
> -#define MM_TO_INCH(mm) ((mm)*0.039370147)
> -#define INCH_TO_MM(inch) ((inch)*25.399956)
> -#define POINT_TO_PI(px)((px)*0.083333333)
> -#define POINT_TO_CC(px)((px)*0.077880997)
> -#define PI_TO_POINT(pi)((pi)*12)
> -#define CC_TO_POINT(cc)((cc)*12.840103)
> -
> AttributeManager::AttributeManager()
> {
> m_viewConverter = 0;
> @@ -168,50 +168,50 @@
> case Fraction:
> if( parent->displayStyle() == false )
> return current_scaleLevel+1;
> - else
> - return current_scaleLevel;
> - case Style: {
> + else
> + return current_scaleLevel;
> + case Style: {
> QString tmp = parent->attribute( "scriptlevel" );
> if( tmp.startsWith( '+' ) )
> - return current_scaleLevel + tmp.remove(0,1).toInt();
> - if( tmp.startsWith( '-' ) )
> - return current_scaleLevel - tmp.remove(0,1).toInt();
> + return current_scaleLevel + tmp.remove(0,1).toInt();
> + if( tmp.startsWith( '-' ) )
> + return current_scaleLevel - tmp.remove(0,1).toInt();
> return tmp.toInt();
> - }
> - case MultiScript:
> - return current_scaleLevel + 1;
> - case Table:
> - return current_scaleLevel + 1;
> - default:
> - break;
> + }
> + case MultiScript:
> + return current_scaleLevel + 1;
> + case Table:
> + return current_scaleLevel + 1;
> + default:
> + break;
> }
> if( index == 0) return current_scaleLevel;
> /** Now check for types where the first child isn't scaled, but the
> rest are */ switch(parentType) {
> - case SubScript:
> - case SupScript:
> - case SubSupScript:
> - return current_scaleLevel + 1;
> - case Under:
> - if( boolOf("accentunder", parent) )
> - return current_scaleLevel + 1;
> - else
> - return current_scaleLevel;
> - case Over:
> - if( boolOf("accent", parent) )
> - return current_scaleLevel + 1;
> - else
> - return current_scaleLevel;
> - case UnderOver:
> - if( (index == 1 && boolOf("accentunder", parent)) || (index == 2 &&
> boolOf("accent", parent)) ) - return current_scaleLevel + 1;
> - else
> - return current_scaleLevel;
> - case Root:
> - /* second argument to root is the base */
> - return current_scaleLevel + 1;
> + case SubScript:
> + case SupScript:
> + case SubSupScript:
> + return current_scaleLevel + 1;
> + case Under:
> + if( boolOf("accentunder", parent) )
> + return current_scaleLevel + 1;
> + else
> + return current_scaleLevel;
> + case Over:
> + if( boolOf("accent", parent) )
> + return current_scaleLevel + 1;
> + else
> + return current_scaleLevel;
> + case UnderOver:
> + if( (index == 1 && boolOf("accentunder", parent)) ||
> (index == 2 && boolOf("accent", parent)) ) + return
> current_scaleLevel + 1;
> + else
> + return current_scaleLevel;
> + case Root:
> + /* second argument to root is the base */
> + return current_scaleLevel + 1;
> default:
> - return current_scaleLevel;
> + return current_scaleLevel;
> }
> }
>
> --- trunk/koffice/kpresenter/part/KPrNotes.cpp #1115727:1115728
> @@ -72,7 +72,6 @@
> m_textShape = factory->createDefaultShape(m_doc-
>resourceManager());
> m_textShape->setGeometryProtected(true);
> m_textShape->setAdditionalAttribute( "presentation:class", "notes" );
> - m_pageLayout = KoPageLayout::standardLayout();
> m_textShape->setPosition(QPointF(62.22, 374.46));
> m_textShape->setSize(QSizeF(489.57, 356.37));
>
> --- trunk/koffice/kspread/PrintSettings.cpp #1115727:1115728
> @@ -72,7 +72,6 @@
> PrintSettings::PrintSettings()
>
> : d(new Private)
>
> {
> - d->pageLayout = KoPageLayout::standardLayout();
> d->printGrid = false;
> d->printCharts = true;
> d->printObjects = true;
> --- trunk/koffice/kspread/Sheet.cpp #1115727:1115728
> @@ -2384,7 +2384,7 @@
>
> void Sheet::loadOdfMasterLayoutPage(KoStyleStack &styleStack)
> {
> - KoPageLayout pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
>
> if (styleStack.hasProperty(KoXmlNS::fo, "page-width")) {
> pageLayout.width =
> KoUnit::parseValue(styleStack.property(KoXmlNS::fo, "page-width")); @@
> -3555,7 +3555,7 @@
> // Load the paper layout
> KoXmlElement paper = sheet.namedItem("paper").toElement();
> if (!paper.isNull()) {
> - KoPageLayout pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
> pageLayout.format =
> KoPageFormat::formatFromString(paper.attribute("format"));
> pageLayout.orientation = (paper.attribute("orientation") == "Portrait") ?
> KoPageFormat::Portrait : KoPageFormat::Landscape; ---
> trunk/koffice/kspread/interfaces/SheetAdaptor.cpp #1115727:1115728 @@
> -413,7 +413,7 @@
> float rightBorder, float bottomBoder,
> const QString& format, const QString&
> orientation) {
> - KoPageLayout pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
> pageLayout.format = KoPageFormat::formatFromString(format);
> pageLayout.orientation = (orientation == "Portrait")
> ? KoPageFormat::Portrait :
> KoPageFormat::Landscape; --- trunk/koffice/kspread/part/Doc.cpp
> #1115727:1115728
> @@ -638,7 +638,7 @@
>
> void Doc::loadPaper(KoXmlElement const & paper)
> {
> - KoPageLayout pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
> pageLayout.format =
> KoPageFormat::formatFromString(paper.attribute("format"));
> pageLayout.orientation = (paper.attribute("orientation") == "Portrait") ?
> KoPageFormat::Portrait : KoPageFormat::Landscape; ---
> trunk/koffice/kword/part/KWDLoader.cpp #1115727:1115728
> @@ -83,7 +83,7 @@
>
> emit progressUpdate(5);
>
> - KoPageLayout pgLayout = KoPageLayout::standardLayout();
> + KoPageLayout pgLayout;
> // <PAPER>
> KoXmlElement paper = root.namedItem("PAPER").toElement();
> if (!paper.isNull()) {
> --- trunk/koffice/kword/part/KWPageStyle.cpp #1115727:1115728
> @@ -57,7 +57,6 @@
> footers = KWord::HFTypeNone;
> columns.columns = 1;
> columns.columnSpacing = 17; // ~ 6mm
> - pageLayout = KoPageLayout::standardLayout();
> direction = KoText::AutoDirection;
>
> if (fullPageBackground && !fullPageBackground->deref()) {
> --- trunk/koffice/kword/part/dialogs/KWStartupWidget.cpp
#1115727:1115728
> @@ -34,7 +34,6 @@
> // TODO get unit from config and set it on m_unit
>
> m_columns = columns;
> - m_layout = KoPageLayout::standardLayout();
> m_layout.leftMargin = MM_TO_POINT(30);
> m_layout.rightMargin = MM_TO_POINT(30);
> m_layout.topMargin = MM_TO_POINT(25);
> --- trunk/koffice/kword/part/tests/TestPageCommands.cpp
#1115727:1115728
> @@ -212,7 +212,7 @@
> KWPageStyle style = page.pageStyle();
> style.setHasMainTextFrame(false);
> style.setFootnoteDistance(10);
> - KoPageLayout layout = KoPageLayout::standardLayout();
> + KoPageLayout layout;
> layout.width = 400;
> layout.height = 300;
> layout.leftMargin = 4;
> @@ -358,7 +358,7 @@
> KWPageStyle style = page.pageStyle();
> style.setHasMainTextFrame(false);
> style.setFootnoteDistance(10);
> - KoPageLayout layout = KoPageLayout::standardLayout();
> + KoPageLayout layout;
> layout.width = 400;
> layout.height = 300;
> layout.leftMargin = 4;
> @@ -437,7 +437,7 @@
> KWPageManager *manager = document.pageManager();
>
> KWPageStyle style("pagestyle1");
> - KoPageLayout oldLayout = KoPageLayout::standardLayout();
> + KoPageLayout oldLayout;
> oldLayout.format = KoPageFormat::IsoA4Size;
> oldLayout.width = 101;
> oldLayout.height = 102;
> @@ -464,7 +464,7 @@
> QCOMPARE(page1.pageSide(), KWPage::Right);
>
> // new ;)
> - KoPageLayout newLayout = KoPageLayout::standardLayout();
> + KoPageLayout newLayout;
> newLayout.width = 401;
> newLayout.height = 405;
> newLayout.leftMargin = 11;
> --- trunk/koffice/kword/part/tests/TestPageManager.cpp #1115727:1115728
> @@ -504,7 +504,7 @@
> KWPage page = manager.appendPage();
>
> KWPageStyle style("myStyle");
> - KoPageLayout layout = KoPageLayout::standardLayout();
> + KoPageLayout layout;
> layout.height = 100;
> style.setPageLayout(layout);
> page.setPageStyle(style);
> --- trunk/koffice/kword/plugins/scripting/Module.cpp #1115727:1115728
> @@ -193,7 +193,8 @@
>
> QObject* Module::standardPageLayout()
> {
> - return new PageLayout(this, KoPageLayout::standardLayout());
> + KoPageLayout layout;
> + return new PageLayout(this, layout);
> }
>
> QObject* Module::defaultParagraphStyle()
> --- trunk/koffice/libs/kopageapp/KoPAMasterPage.cpp #1115727:1115728
> @@ -38,7 +38,6 @@
> KoPAMasterPage::KoPAMasterPage()
>
> : KoPAPageBase()
>
> {
> - m_pageLayout = KoPageLayout::standardLayout();
> setName( "Standard" );
> }
>
> @@ -89,7 +88,7 @@
> QString pageLayoutName = element.attributeNS( KoXmlNS::style,
> "page-layout-name" ); const KoOdfStylesReader& styles =
> loadingContext.odfLoadingContext().stylesReader(); const KoXmlElement*
> masterPageStyle = styles.findStyle( pageLayoutName ); - KoPageLayout
> pageLayout = KoPageLayout::standardLayout();
> + KoPageLayout pageLayout;
>
> if ( masterPageStyle ) {
> pageLayout.loadOdf( *masterPageStyle );
> --- trunk/koffice/libs/odf/KoPageLayout.cpp #1115727:1115728
> @@ -137,12 +137,6 @@
> }
> }
>
> -KoPageLayout KoPageLayout::standardLayout()
> -{
> - KoPageLayout layout;
> - return layout;
> -}
> -
> bool KoPageLayout::operator==(const KoPageLayout &l) const
> {
> return qFuzzyCompare(width,l.width)
> --- trunk/koffice/libs/odf/KoPageLayout.h #1115727:1115728
> @@ -102,13 +102,6 @@
> KOODF_EXPORT void loadOdf(const KoXmlElement &style);
>
> /**
> - * @return a page layout with the default page size depending on the
> locale settings, - * default margins (2 cm), and portrait orientation.
> - * Deprecated; just use the constructor
> - */
> - static KOODF_EXPORT KDE_DEPRECATED KoPageLayout
standardLayout();
> -
> - /**
> * Construct a page layout with the default page size depending on the
> locale settings, * default margins (2 cm), and portrait orientation.
> */
--
Thomas Zander
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic