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

List:       koffice-devel
Subject:    Re: Review Request: Hard coded default text style (font family,
From:       Pierre Stirnweiss <pierre.stirnweiss () t-online ! de>
Date:       2009-03-15 13:17:17
Message-ID: 200903151417.18035.pierre.stirnweiss () t-online ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Le dimanche 15 mars 2009 12:38:59, Pierre Stirnweiss a écrit :
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/312/
> -----------------------------------------------------------
>
> Review request for KOffice.
>
>
> Summary
> -------
>
> This patch adds hard coded values for text style. These are used if the odf
> file does not set these in any way and if defaultstyles.xml is not
> provided. It also adds a test for nestedSpans
>
>
> Diffs
> -----
>
>   trunk/koffice/plugins/textshape/tests/TestLists.cpp 939486
>   trunk/koffice/libs/odf/KoOdfLoadingContext.cpp 939486
>   trunk/koffice/libs/kotext/opendocument/tests/TestLoading.cpp 939486
>   trunk/koffice/libs/kotext/styles/KoCharacterStyle.h 939486
>   trunk/koffice/libs/kotext/styles/KoCharacterStyle.cpp 939486
>
> Diff: http://reviewboard.kde.org/r/312/diff
>
>
> Testing
> -------
>
> libs/kotext/opendocument/tests/TestLoading and
> plugins/textshape/tests/TestDocumentLayout both succeed. also tested an odp
> Thorsten provided, which works.
>
>
> Thanks,
>
> Pierre

There are two missing files to the above diff. I still have not managed to have 
created files show up in the diff. These should go to 
libs/kotext/opendocument/tests/data/TextContents/Paragraph

Pierre

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'DejaVu Sans'; font-size:10pt; \
font-weight:400; font-style:normal;">Le dimanche 15 mars 2009 12:38:59, Pierre \
Stirnweiss a écrit :<br> &gt; \
-----------------------------------------------------------<br> &gt; This is an \
automatically generated e-mail. To reply, visit:<br> &gt; \
http://reviewboard.kde.org/r/312/<br> &gt; \
-----------------------------------------------------------<br> &gt;<br>
&gt; Review request for KOffice.<br>
&gt;<br>
&gt;<br>
&gt; Summary<br>
&gt; -------<br>
&gt;<br>
&gt; This patch adds hard coded values for text style. These are used if the odf<br>
&gt; file does not set these in any way and if defaultstyles.xml is not<br>
&gt; provided. It also adds a test for nestedSpans<br>
&gt;<br>
&gt;<br>
&gt; Diffs<br>
&gt; -----<br>
&gt;<br>
&gt;   trunk/koffice/plugins/textshape/tests/TestLists.cpp 939486<br>
&gt;   trunk/koffice/libs/odf/KoOdfLoadingContext.cpp 939486<br>
&gt;   trunk/koffice/libs/kotext/opendocument/tests/TestLoading.cpp 939486<br>
&gt;   trunk/koffice/libs/kotext/styles/KoCharacterStyle.h 939486<br>
&gt;   trunk/koffice/libs/kotext/styles/KoCharacterStyle.cpp 939486<br>
&gt;<br>
&gt; Diff: http://reviewboard.kde.org/r/312/diff<br>
&gt;<br>
&gt;<br>
&gt; Testing<br>
&gt; -------<br>
&gt;<br>
&gt; libs/kotext/opendocument/tests/TestLoading and<br>
&gt; plugins/textshape/tests/TestDocumentLayout both succeed. also tested an odp<br>
&gt; Thorsten provided, which works.<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Pierre<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>There are two missing files to the above diff. I still \
have not managed to have created files show up in the diff. These should go to \
libs/kotext/opendocument/tests/data/TextContents/Paragraph<br> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"><br></p>Pierre</p></body></html>


["nestedSpan.qs" (text/x-csrc)]

// this is very similar to boldAndItalic.qs

include("common.qs");

var italicsmallFormat = QTextCharFormat.clone(defaultTextFormat);
italicsmallFormat.setFontPointSize(10);
italicsmallFormat.setFontItalic(true);

var italicDefaultFormat = QTextCharFormat.clone(defaultTextFormat);
italicDefaultFormat.setFontItalic(true);

var smallFormat = QTextCharFormat.clone(defaultTextFormat);
smallFormat.setFontPointSize(10);

cursor.insertText("In this paragraph ", defaultTextFormat);
cursor.insertText("these words are small", smallFormat);
cursor.insertText(" and ", defaultTextFormat);
cursor.insertText("these words are italic", italicDefaultFormat);
cursor.insertText(".", defaultTextFormat);
cursor.insertBlock(defaultTextFormat);
cursor.insertText("In this paragraph ", defaultTextFormat);
cursor.insertText("these words are small and ", smallFormat);
cursor.insertText("these words are small and italic", italicsmallFormat);
cursor.insertText(".", defaultTextFormat);

document;

["nestedSpan.odt" (application/vnd.oasis.opendocument.text)]

_______________________________________________
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