[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/libs
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2008-08-24 11:58:06
Message-ID: 1219579086.939449.20365.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 851707 by zachmann:

o Fix qreal conversion error. These needs to be double


 M  +1 -1      kotext/KoText.h  
 M  +2 -2      kotext/KoTextBlockBorderData.h  
 M  +1 -1      kotext/KoTextEditingPlugin.cpp  
 M  +3 -3      kotext/styles/KoCharacterStyle.cpp  
 M  +1 -1      kotext/styles/KoCharacterStyle.h  
 M  +4 -4      kotext/styles/KoParagraphStyle.cpp  
 M  +8 -8      kotext/styles/KoParagraphStyle.h  
 M  +2 -2      kotext/tests/kobordertest.cpp  
 M  +1 -1      store/KoXmlWriter.cpp  
 M  +1 -1      store/tests/xmlwritertest.cpp  


--- trunk/koffice/libs/kotext/KoText.h #851706:851707
@@ -60,7 +60,7 @@
         qreal position;    ///< distance in point from the start of the text-shape
         QTextOption::TabType type;       ///< Determine which type is used.
         QChar delimiter;    ///< If type is DelimitorTab; tab until this char was \
                found in the text.
-        KoCharacterStyle::LineType leaderType; // none/single/qreal
+        KoCharacterStyle::LineType leaderType; // none/single/double
         KoCharacterStyle::LineStyle leaderStyle; // solid/dotted/dash/...
         KoCharacterStyle::LineWeight leaderWeight; // \
auto/bold/thin/length/percentage/...  qreal leaderWidth; // the width value if \
                length/percentage
--- trunk/koffice/libs/kotext/KoTextBlockBorderData.h #851706:851707
@@ -75,8 +75,8 @@
      * @param style the border style for this side.
      * @param width the thickness of the border-line.
      * @param color the property for the color of the border-line(s).
-     * @param space the amount of spacing between the outer border and the inner \
                border in case of style being qreal
-     * @param innerWidth the thickness of the inner border-line in case of style \
being qreal +     * @param space the amount of spacing between the outer border and \
the inner border in case of style being double  +     * @param innerWidth the \
                thickness of the inner border-line in case of style being double
      */
     void setEdge(Side side, const QTextBlockFormat &bf, KoParagraphStyle::Property \
                style,
             KoParagraphStyle::Property width, KoParagraphStyle::Property color,
--- trunk/koffice/libs/kotext/KoTextEditingPlugin.cpp #851706:851707
@@ -51,7 +51,7 @@
     QString::Iterator iter = string.begin();
     while(iter != string.end()) {
         if(iter->isSpace()) {
-            if(space) ;// qreal spaces belong to the previous word
+            if(space) ;// double spaces belong to the previous word
             else if(pos < cursorPosition)
                 cursor.setPosition(pos + block.position() + 1); // +1 because we \
don't want to set it on the space itself  else
--- trunk/koffice/libs/kotext/styles/KoCharacterStyle.cpp #851706:851707
@@ -192,7 +192,7 @@
     
     if (fixedType == "single")
         lineType = KoCharacterStyle::SingleLine;
-    else if (fixedType == "qreal")
+    else if (fixedType == "double")
         lineType = KoCharacterStyle::DoubleLine;
     
     if ( fixedStyle == "solid" )
@@ -243,7 +243,7 @@
         case KoCharacterStyle::SingleLine:
             return "single";
         case KoCharacterStyle::DoubleLine:
-            return "qreal";
+            return "double";
         default:
             return "";
     }
@@ -707,7 +707,7 @@
                       && (styleStack.property( KoXmlNS::fo, "score-spaces") == \
                "false");
     if( styleStack.hasProperty( KoXmlNS::style, "text-crossing-out" )) { // 3.10.6
         QString strikeOutType = styleStack.property( KoXmlNS::style, \
                "text-crossing-out" );
-        if( strikeOutType =="qreal-line")
+        if( strikeOutType =="double-line")
             m_strikeOutType = S_DOUBLE;
         else if( strikeOutType =="single-line")
             m_strikeOutType = S_SIMPLE;
--- trunk/koffice/libs/kotext/styles/KoCharacterStyle.h #851706:851707
@@ -75,7 +75,7 @@
         InlineInstanceId = 577297549 // Internal: Reserved for \
KoInlineTextObjectManager  };
 
-    /// list of possible line type : no line, single line, qreal line
+    /// list of possible line type : no line, single line, double line
     enum LineType {
         NoLineType,
         SingleLine,
--- trunk/koffice/libs/kotext/styles/KoParagraphStyle.cpp #851706:851707
@@ -218,7 +218,7 @@
         return KoParagraphStyle::BorderDashDotPattern;
     if ( borderstyle == "dot-dot-dash" )
         return KoParagraphStyle::BorderDashDotDotPattern;
-    if ( borderstyle == "qreal" )
+    if ( borderstyle == "double" )
         return KoParagraphStyle::BorderDouble;
     if ( borderstyle == "groove" ) // NOT OASIS COMPATIBLE
         return KoParagraphStyle::BorderGroove;
@@ -241,7 +241,7 @@
         case KoParagraphStyle::BorderDashDotDotPattern:
             return QString("dot-dot-dash"); // not odf
         case KoParagraphStyle::BorderDouble:
-            return QString("qreal");
+            return QString("double");
         case KoParagraphStyle::BorderGroove:
             return QString("groove");
         case KoParagraphStyle::BorderRidge:
@@ -951,7 +951,7 @@
             } else {
                 if ( leaderType == "single" )
                     tab.leaderType = KoCharacterStyle::SingleLine;
-                else if ( leaderType == "qreal" )
+                else if ( leaderType == "double" )
                     tab.leaderType = KoCharacterStyle::DoubleLine;
                 // change default leaderStyle
                 tab.leaderStyle = KoCharacterStyle::SolidLine;
@@ -1503,7 +1503,7 @@
         tabTypeMap[QTextOption::DelimiterTab] = "char";
         leaderTypeMap[KoCharacterStyle::NoLineType] = "none";
         leaderTypeMap[KoCharacterStyle::SingleLine] = "single";
-        leaderTypeMap[KoCharacterStyle::DoubleLine] = "qreal";
+        leaderTypeMap[KoCharacterStyle::DoubleLine] = "double";
         leaderStyleMap[KoCharacterStyle::NoLineStyle] = "none";
         leaderStyleMap[KoCharacterStyle::SolidLine] = "solid";
         leaderStyleMap[KoCharacterStyle::DottedLine] = "dotted";
--- trunk/koffice/libs/kotext/styles/KoParagraphStyle.h #851706:851707
@@ -82,23 +82,23 @@
         RightPadding,   ///< distance between text and border
         BottomPadding,   ///< distance between text and border
         LeftBorderWidth,        ///< The thickness of the border, or 0 if there is \
                no border
-        LeftInnerBorderWidth,   ///< In case of style being 'qreal' the thickness of \
                the inner border line
-        LeftBorderSpacing,      ///< In case of style being 'qreal' the space \
between the inner and outer border lines +        LeftInnerBorderWidth,   ///< In \
case of style being 'double' the thickness of the inner border line +        \
LeftBorderSpacing,      ///< In case of style being 'double' the space between the \
inner and outer border lines  LeftBorderStyle,        ///< The border style. (see \
BorderStyle)  LeftBorderColor,        ///< The border Color
         TopBorderWidth,         ///< The thickness of the border, or 0 if there is \
                no border
-        TopInnerBorderWidth,    ///< In case of style being 'qreal' the thickness of \
                the inner border line
-        TopBorderSpacing,       ///< In case of style being 'qreal' the space \
between the inner and outer border lines +        TopInnerBorderWidth,    ///< In \
case of style being 'double' the thickness of the inner border line +        \
TopBorderSpacing,       ///< In case of style being 'double' the space between the \
inner and outer border lines  TopBorderStyle,         ///< The border style. (see \
BorderStyle)  TopBorderColor,         ///< The border Color
         RightBorderWidth,       ///< The thickness of the border, or 0 if there is \
                no border
-        RightInnerBorderWidth,  ///< In case of style being 'qreal' the thickness of \
                the inner border line
-        RightBorderSpacing,     ///< In case of style being 'qreal' the space \
between the inner and outer border lines +        RightInnerBorderWidth,  ///< In \
case of style being 'double' the thickness of the inner border line +        \
RightBorderSpacing,     ///< In case of style being 'double' the space between the \
inner and outer border lines  RightBorderStyle,       ///< The border style. (see \
BorderStyle)  RightBorderColor,       ///< The border Color
         BottomBorderWidth,      ///< The thickness of the border, or 0 if there is \
                no border
-        BottomInnerBorderWidth, ///< In case of style being 'qreal' the thickness of \
                the inner border line
-        BottomBorderSpacing,    ///< In case of style being 'qreal' the space \
between the inner and outer border lines +        BottomInnerBorderWidth, ///< In \
case of style being 'double' the thickness of the inner border line +        \
BottomBorderSpacing,    ///< In case of style being 'double' the space between the \
inner and outer border lines  BottomBorderStyle,      ///< The border style. (see \
BorderStyle)  BottomBorderColor,      ///< The border Color
 
--- trunk/koffice/libs/kotext/tests/kobordertest.cpp #851706:851707
@@ -98,7 +98,7 @@
         w->m_bottomBorder.color = Qt::green;
     }
     {
-        // Third square, with qreal borders
+        // Third square, with double borders
         MyWidget* w2 = new MyWidget(zh, grid);
         w2->m_leftBorder.setPenWidth( 2 );
         w2->m_leftBorder.setStyle( KoBorder::DOUBLE_LINE );
@@ -113,7 +113,7 @@
         w2->m_bottomBorder.setStyle( KoBorder::DOUBLE_LINE );
     }
     {
-        // Fourth square, with qreal borders
+        // Fourth square, with double borders
         MyWidget* w2 = new MyWidget(zh, grid);
         w2->m_leftBorder.setPenWidth( 1 );
         w2->m_leftBorder.setStyle( KoBorder::DOUBLE_LINE );
--- trunk/koffice/libs/store/KoXmlWriter.cpp #851706:851707
@@ -366,7 +366,7 @@
 {
     startElement( "config:config-item" );
     addAttribute( "config:name", configName );
-    addAttribute( "config:type", "qreal" );
+    addAttribute( "config:type", "double" );
     addTextNode( QString::number( value ) );
     endElement();
 }
--- trunk/koffice/libs/store/tests/xmlwritertest.cpp #851706:851707
@@ -157,7 +157,7 @@
     TEST_END( "test config", "<r>\n"
                              " <config:config-item config:name=\"TestConfigBool\" \
                config:type=\"boolean\">true</config:config-item>\n"
                              " <config:config-item config:name=\"TestConfigInt\" \
                config:type=\"int\">1</config:config-item>\n"
-                             " <config:config-item config:name=\"TestConfigDouble\" \
config:type=\"qreal\">5</config:config-item>\n" +                             " \
<config:config-item config:name=\"TestConfigDouble\" \
config:type=\"double\">5</config:config-item>\n"  "</r>\n" );
 
     speedTest();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic