[groonga-commit:2575] ranguba/chupatext [master] support OpenDocument Text.

null+ranguba at clear-code.com null+ranguba at clear-code.com
Sun Dec 19 01:12:19 EST 2010


Kouhei Sutou	2010-12-19 06:12:19 +0000 (Sun, 19 Dec 2010)

  New Revision: fe3bf1dde73799c8a829181a499973b3afef5c60

  Log:
    support OpenDocument Text.

  Added files:
    test/fixtures/open_document_text/1.2.fodt
    test/fixtures/open_document_text/1.2.odt
    test/fixtures/open_document_text/1.2_ja.fodt
    test/fixtures/open_document_text/1.2_ja.odt
    test/fixtures/open_document_text/Makefile.am
    test/test_open_document_text.c
  Modified files:
    configure.ac
    modules/ruby/lib/chupatext/decomposers/office.rb
    test/Makefile.am
    test/fixtures/Makefile.am

  Modified: configure.ac (+1 -0)
===================================================================
--- configure.ac    2010-12-19 05:56:33 +0000 (67e13ca)
+++ configure.ac    2010-12-19 06:12:19 +0000 (5000d2c)
@@ -359,6 +359,7 @@ AC_CONFIG_FILES([Makefile
 		 test/fixtures/Makefile
 		 test/fixtures/html/Makefile
 		 test/fixtures/word/Makefile
+		 test/fixtures/open_document_text/Makefile
 		 test/ruby/Makefile
 		 modules/Makefile
 		 modules/excel/Makefile

  Modified: modules/ruby/lib/chupatext/decomposers/office.rb (+4 -0)
===================================================================
--- modules/ruby/lib/chupatext/decomposers/office.rb    2010-12-19 05:56:33 +0000 (8bfca9b)
+++ modules/ruby/lib/chupatext/decomposers/office.rb    2010-12-19 06:12:19 +0000 (b243f84)
@@ -248,6 +248,10 @@ EOS
       mime_types "application/msword"
       mime_types "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
 
+      mime_types "application/vnd.oasis.opendocument.text"
+      mime_types "application/vnd.oasis.opendocument.text-flat-xml"
+
+
       mime_types "application/vnd.ms-powerpoint"
       mime_types "application/vnd.openxmlformats-officedocument.presentationml.presentation"
 

  Modified: test/Makefile.am (+2 -0)
===================================================================
--- test/Makefile.am    2010-12-19 05:56:33 +0000 (6bf9471)
+++ test/Makefile.am    2010-12-19 06:12:19 +0000 (554ce5a)
@@ -26,6 +26,7 @@ noinst_LTLIBRARIES =				\
 	test_bin_chupatext.la			\
 	test_utils.la				\
 	test_mail.la				\
+	test_open_document_text.la		\
 	$(EMPTY)
 
 if SUPPORT_PDF
@@ -87,6 +88,7 @@ test_gz_la_SOURCES = test_gz.c
 test_zip_la_SOURCES = test_zip.c
 test_html_la_SOURCES = test_html.c
 test_mail_la_SOURCES = test_mail.c
+test_open_document_text_la_SOURCES = test_open_document_text.c
 test_bin_chupatext_la_SOURCES = test_bin_chupatext.c
 test_utils_la_SOURCES = test_utils.c
 

  Modified: test/fixtures/Makefile.am (+2 -1)
===================================================================
--- test/fixtures/Makefile.am    2010-12-19 05:56:33 +0000 (bf0c3e3)
+++ test/fixtures/Makefile.am    2010-12-19 06:12:19 +0000 (1af56c2)
@@ -1,6 +1,7 @@
 SUBDIRS =					\
 	html					\
-	word
+	word					\
+	open_document_text
 EXTRA_DIST =					\
 	sample.pdf				\
 	sample.ppt				\

  Added: test/fixtures/open_document_text/1.2.fodt (+438 -0) 100644
===================================================================
--- /dev/null
+++ test/fixtures/open_document_text/1.2.fodt    2010-12-19 06:12:19 +0000 (7f493d9)
@@ -0,0 +1,438 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+                 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+                 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+                 xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+                 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+                 xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+                 xmlns:xlink="http://www.w3.org/1999/xlink"
+                 xmlns:dc="http://purl.org/dc/elements/1.1/"
+                 xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+                 xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+                 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+                 xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+                 xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+                 xmlns:math="http://www.w3.org/1998/Math/MathML"
+                 xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+                 xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+                 xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+                 xmlns:ooo="http://openoffice.org/2004/office"
+                 xmlns:ooow="http://openoffice.org/2004/writer"
+                 xmlns:oooc="http://openoffice.org/2004/calc"
+                 xmlns:dom="http://www.w3.org/2001/xml-events"
+                 xmlns:xforms="http://www.w3.org/2002/xforms"
+                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                 xmlns:rpt="http://openoffice.org/2005/report"
+                 xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
+                 xmlns:xhtml="http://www.w3.org/1999/xhtml"
+                 xmlns:grddl="http://www.w3.org/2003/g/data-view#"
+                 xmlns:officeooo="http://openoffice.org/2009/office"
+                 xmlns:tableooo="http://openoffice.org/2009/table"
+                 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"
+                 xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
+                 xmlns:css3t="http://www.w3.org/TR/css3-text/"
+                 office:version="1.2"
+                 grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"
+                 office:mimetype="application/vnd.oasis.opendocument.text">
+   <office:meta>
+      <meta:creation-date>2010-12-19T14:37:56</meta:creation-date>
+      <meta:editing-cycles>5</meta:editing-cycles>
+      <meta:editing-duration>P2171DT9H34M49S</meta:editing-duration>
+      <meta:generator>LibreOffice/3.3$Unix OpenOffice.org_project/330m9$Build-1</meta:generator>
+      <dc:date>2010-12-19T15:10:34</dc:date>
+      
+      <meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0"
+                               meta:page-count="1"
+                               meta:paragraph-count="1"
+                               meta:word-count="6"
+                               meta:character-count="38"/>
+   </office:meta>
+   <office:settings>
+      <config:config-item-set config:name="ooo:view-settings">
+         <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+         <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+         <config:config-item config:name="ViewAreaWidth" config:type="long">19452</config:config-item>
+         <config:config-item config:name="ViewAreaHeight" config:type="long">15020</config:config-item>
+         <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+         <config:config-item-map-indexed config:name="Views">
+            <config:config-item-map-entry>
+               <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+               <config:config-item config:name="ViewLeft" config:type="long">9110</config:config-item>
+               <config:config-item config:name="ViewTop" config:type="long">3002</config:config-item>
+               <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+               <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+               <config:config-item config:name="VisibleRight" config:type="long">19450</config:config-item>
+               <config:config-item config:name="VisibleBottom" config:type="long">15018</config:config-item>
+               <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+               <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
+               <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+               <config:config-item config:name="ZoomFactor" config:type="short">120</config:config-item>
+               <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+            </config:config-item-map-entry>
+         </config:config-item-map-indexed>
+      </config:config-item-set>
+      <config:config-item-set config:name="ooo:configuration-settings">
+         <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="Rsid" config:type="int">549135</config:config-item>
+         <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+         <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+         <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+         <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="RsidRoot" config:type="int">85976</config:config-item>
+         <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+         <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+         <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintFaxName" config:type="string"/>
+         <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+         <config:config-item config:name="PrinterName" config:type="string"/>
+         <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+         <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+         <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+         <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+      </config:config-item-set>
+   </office:settings>
+   <office:scripts>
+      <office:script script:language="ooo:Basic">
+         <ooo:libraries/>
+      </office:script>
+   </office:scripts>
+   <office:font-face-decls>
+      <style:font-face style:name="FreeSans1" svg:font-family="FreeSans"/>
+      <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'"
+                       style:font-family-generic="roman"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="Liberation Serif1"
+                       svg:font-family="'Liberation Serif', 'Times New Roman'"
+                       style:font-family-generic="roman"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans', Arial"
+                       style:font-family-generic="swiss"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="FreeSans" svg:font-family="FreeSans"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="unifont" svg:font-family="unifont"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="ヒラギノ明朝 Pro W3" svg:font-family="'ヒラギノ明朝 Pro W3'"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+   </office:font-face-decls>
+   <office:styles>
+      <style:default-style style:family="graphic">
+         <style:graphic-properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm"
+                                   draw:start-line-spacing-horizontal="0.283cm"
+                                   draw:start-line-spacing-vertical="0.283cm"
+                                   draw:end-line-spacing-horizontal="0.283cm"
+                                   draw:end-line-spacing-vertical="0.283cm"
+                                   style:flow-with-text="false"/>
+         <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict"
+                                     style:writing-mode="lr-tb"
+                                     style:font-independent-line-spacing="false">
+            <style:tab-stops/>
+         </style:paragraph-properties>
+         <style:text-properties style:use-window-font-color="true" fo:font-size="12pt" fo:language="en"
+                                fo:country="US"
+                                style:letter-kerning="true"
+                                style:font-size-asian="10.5pt"
+                                style:language-asian="ja"
+                                style:country-asian="JP"
+                                style:font-size-complex="12pt"
+                                style:language-complex="hi"
+                                style:country-complex="IN"/>
+      </style:default-style>
+      <style:default-style style:family="paragraph">
+         <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha"
+                                     style:punctuation-wrap="hanging"
+                                     style:line-break="strict"
+                                     style:tab-stop-distance="1.251cm"
+                                     style:writing-mode="page"/>
+         <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif"
+                                fo:font-size="12pt"
+                                fo:language="en"
+                                fo:country="US"
+                                style:letter-kerning="true"
+                                style:font-name-asian="ヒラギノ明朝 Pro W3"
+                                style:font-size-asian="10.5pt"
+                                style:language-asian="ja"
+                                style:country-asian="JP"
+                                style:font-name-complex="FreeSans"
+                                style:font-size-complex="12pt"
+                                style:language-complex="hi"
+                                style:country-complex="IN"
+                                fo:hyphenate="false"
+                                fo:hyphenation-remain-char-count="2"
+                                fo:hyphenation-push-char-count="2"/>
+      </style:default-style>
+      <style:default-style style:family="table">
+         <style:table-properties table:border-model="collapsing"/>
+      </style:default-style>
+      <style:default-style style:family="table-row">
+         <style:table-row-properties fo:keep-together="auto"/>
+      </style:default-style>
+      <style:style style:name="Standard" style:family="paragraph" style:default-outline-level=""
+                   style:class="text">
+         <style:paragraph-properties fo:text-align="start" style:justify-single-word="false" fo:orphans="0"
+                                     fo:widows="0"
+                                     fo:hyphenation-ladder-count="no-limit"
+                                     style:writing-mode="lr-tb">
+            <style:tab-stops>
+               <style:tab-stop style:position="1.251cm"/>
+            </style:tab-stops>
+         </style:paragraph-properties>
+         <style:text-properties fo:color="#00000a" style:font-name="Liberation Serif1" fo:font-size="12pt"
+                                fo:language="en"
+                                fo:country="US"
+                                style:font-name-asian="unifont"
+                                style:font-size-asian="12pt"
+                                style:language-asian="zh"
+                                style:country-asian="CN"
+                                style:font-name-complex="FreeSans"
+                                style:font-size-complex="12pt"
+                                style:language-complex="hi"
+                                style:country-complex="IN"
+                                fo:hyphenate="false"
+                                fo:hyphenation-remain-char-count="2"
+                                fo:hyphenation-push-char-count="2"/>
+      </style:style>
+      <style:style style:name="Heading" style:family="paragraph"
+                   style:parent-style-name="Standard"
+                   style:next-style-name="Text_20_body"
+                   style:default-outline-level=""
+                   style:class="text">
+         <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always"/>
+         <style:text-properties style:font-name="Liberation Sans" fo:font-size="14pt"
+                                style:font-name-asian="unifont"
+                                style:font-size-asian="14pt"
+                                style:font-name-complex="FreeSans"
+                                style:font-size-complex="14pt"/>
+      </style:style>
+      <style:style style:name="Text_20_body" style:display-name="Text body"
+                   style:family="paragraph"
+                   style:parent-style-name="Standard"
+                   style:default-outline-level=""
+                   style:class="text">
+         <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/>
+      </style:style>
+      <style:style style:name="List" style:family="paragraph"
+                   style:parent-style-name="Text_20_body"
+                   style:default-outline-level=""
+                   style:class="list">
+         <style:text-properties style:font-size-asian="12pt" style:font-name-complex="FreeSans1"/>
+      </style:style>
+      <style:style style:name="Caption" style:family="paragraph"
+                   style:parent-style-name="Standard"
+                   style:default-outline-level=""
+                   style:class="extra">
+         <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" text:number-lines="false"
+                                     text:line-number="0"/>
+         <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt"
+                                style:font-style-asian="italic"
+                                style:font-name-complex="FreeSans1"
+                                style:font-size-complex="12pt"
+                                style:font-style-complex="italic"/>
+      </style:style>
+      <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard"
+                   style:default-outline-level=""
+                   style:class="index">
+         <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+         <style:text-properties style:font-size-asian="12pt" style:font-name-complex="FreeSans1"/>
+      </style:style>
+      <style:style style:name="Absatz-Standardschriftart" style:family="text"/>
+      <text:outline-style style:name="Outline">
+         <text:outline-level-style text:level="1" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.762cm"
+                                                 fo:text-indent="-0.762cm"
+                                                 fo:margin-left="0.762cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="2" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.016cm"
+                                                 fo:text-indent="-1.016cm"
+                                                 fo:margin-left="1.016cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="3" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm"
+                                                 fo:text-indent="-1.27cm"
+                                                 fo:margin-left="1.27cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="4" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.524cm"
+                                                 fo:text-indent="-1.524cm"
+                                                 fo:margin-left="1.524cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="5" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.778cm"
+                                                 fo:text-indent="-1.778cm"
+                                                 fo:margin-left="1.778cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="6" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.032cm"
+                                                 fo:text-indent="-2.032cm"
+                                                 fo:margin-left="2.032cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="7" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.286cm"
+                                                 fo:text-indent="-2.286cm"
+                                                 fo:margin-left="2.286cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="8" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm"
+                                                 fo:text-indent="-2.54cm"
+                                                 fo:margin-left="2.54cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="9" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.794cm"
+                                                 fo:text-indent="-2.794cm"
+                                                 fo:margin-left="2.794cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="10" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.048cm"
+                                                 fo:text-indent="-3.048cm"
+                                                 fo:margin-left="3.048cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+      </text:outline-style>
+      <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0"
+                                text:footnotes-position="page"
+                                text:start-numbering-at="document"/>
+      <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+      <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1"
+                                        text:number-position="left"
+                                        text:increment="5"/>
+   </office:styles>
+   <office:automatic-styles>
+      <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard"
+                   style:master-page-name="">
+         <style:paragraph-properties style:page-number="auto"/>
+      </style:style>
+      <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"
+                   style:master-page-name="Standard">
+         <style:paragraph-properties style:page-number="auto"/>
+      </style:style>
+      <style:style style:name="T1" style:family="text">
+         <style:text-properties officeooo:rsid="00020379"/>
+      </style:style>
+      <style:style style:name="T2" style:family="text">
+         <style:text-properties officeooo:rsid="0003b404"/>
+      </style:style>
+      <style:style style:name="T3" style:family="text">
+         <style:text-properties officeooo:rsid="0004f213"/>
+      </style:style>
+      <style:style style:name="T4" style:family="text">
+         <style:text-properties officeooo:rsid="0008610f"/>
+      </style:style>
+      <style:page-layout style:name="pm1">
+         <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1"
+                                       style:print-orientation="portrait"
+                                       fo:margin-top="2cm"
+                                       fo:margin-bottom="2cm"
+                                       fo:margin-left="2cm"
+                                       fo:margin-right="2cm"
+                                       style:writing-mode="lr-tb"
+                                       style:layout-grid-color="#c0c0c0"
+                                       style:layout-grid-lines="40"
+                                       style:layout-grid-base-height="0.423cm"
+                                       style:layout-grid-ruby-height="0.212cm"
+                                       style:layout-grid-mode="none"
+                                       style:layout-grid-ruby-below="false"
+                                       style:layout-grid-print="false"
+                                       style:layout-grid-display="false"
+                                       style:footnote-max-height="0cm">
+            <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm"
+                                style:distance-after-sep="0.101cm"
+                                style:adjustment="left"
+                                style:rel-width="25%"
+                                style:color="#000000"/>
+         </style:page-layout-properties>
+         <style:header-style/>
+         <style:footer-style/>
+      </style:page-layout>
+   </office:automatic-styles>
+   <office:master-styles>
+      <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+   </office:master-styles>
+   <office:body>
+      <office:text>
+         <text:sequence-decls>
+            <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+            <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+            <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+            <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+         </text:sequence-decls>
+         <text:p text:style-name="P2">Sample of <text:span text:style-name="T1">OpenDocument </text:span>
+            <text:span text:style-name="T3">Text </text:span>
+            <text:span text:style-name="T2">1.2</text:span> 
+            <text:span text:style-name="T4">(flat)</text:span>
+         </text:p>
+      </office:text>
+   </office:body>
+</office:document>
\ No newline at end of file

  Added: test/fixtures/open_document_text/1.2.odt (+0 -0) 100644
===================================================================
(Binary files differ)

  Added: test/fixtures/open_document_text/1.2_ja.fodt (+462 -0) 100644
===================================================================
--- /dev/null
+++ test/fixtures/open_document_text/1.2_ja.fodt    2010-12-19 06:12:19 +0000 (f42b2e8)
@@ -0,0 +1,462 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+                 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+                 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+                 xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+                 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+                 xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+                 xmlns:xlink="http://www.w3.org/1999/xlink"
+                 xmlns:dc="http://purl.org/dc/elements/1.1/"
+                 xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+                 xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+                 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+                 xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+                 xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+                 xmlns:math="http://www.w3.org/1998/Math/MathML"
+                 xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+                 xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+                 xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+                 xmlns:ooo="http://openoffice.org/2004/office"
+                 xmlns:ooow="http://openoffice.org/2004/writer"
+                 xmlns:oooc="http://openoffice.org/2004/calc"
+                 xmlns:dom="http://www.w3.org/2001/xml-events"
+                 xmlns:xforms="http://www.w3.org/2002/xforms"
+                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                 xmlns:rpt="http://openoffice.org/2005/report"
+                 xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
+                 xmlns:xhtml="http://www.w3.org/1999/xhtml"
+                 xmlns:grddl="http://www.w3.org/2003/g/data-view#"
+                 xmlns:officeooo="http://openoffice.org/2009/office"
+                 xmlns:tableooo="http://openoffice.org/2009/table"
+                 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"
+                 xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
+                 xmlns:css3t="http://www.w3.org/TR/css3-text/"
+                 office:version="1.2"
+                 grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"
+                 office:mimetype="application/vnd.oasis.opendocument.text">
+   <office:meta>
+      <meta:creation-date>2010-09-06T13:10:34</meta:creation-date>
+      <meta:initial-creator>Nobuyoshi Nakada</meta:initial-creator>
+      <meta:editing-cycles>3</meta:editing-cycles>
+      <meta:editing-duration>P23DT22H13M8S</meta:editing-duration>
+      <meta:generator>LibreOffice/3.3$Unix OpenOffice.org_project/330m9$Build-1</meta:generator>
+      <dc:date>2010-12-19T15:10:18</dc:date>
+      
+      <meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0"
+                               meta:page-count="1"
+                               meta:paragraph-count="2"
+                               meta:word-count="13"
+                               meta:character-count="76"/>
+   </office:meta>
+   <office:settings>
+      <config:config-item-set config:name="ooo:view-settings">
+         <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+         <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+         <config:config-item config:name="ViewAreaWidth" config:type="long">19452</config:config-item>
+         <config:config-item config:name="ViewAreaHeight" config:type="long">15020</config:config-item>
+         <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+         <config:config-item-map-indexed config:name="Views">
+            <config:config-item-map-entry>
+               <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+               <config:config-item config:name="ViewLeft" config:type="long">7893</config:config-item>
+               <config:config-item config:name="ViewTop" config:type="long">3496</config:config-item>
+               <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+               <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+               <config:config-item config:name="VisibleRight" config:type="long">19450</config:config-item>
+               <config:config-item config:name="VisibleBottom" config:type="long">15018</config:config-item>
+               <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+               <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
+               <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+               <config:config-item config:name="ZoomFactor" config:type="short">120</config:config-item>
+               <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+            </config:config-item-map-entry>
+         </config:config-item-map-indexed>
+      </config:config-item-set>
+      <config:config-item-set config:name="ooo:configuration-settings">
+         <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="Rsid" config:type="int">1974276</config:config-item>
+         <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+         <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+         <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+         <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="RsidRoot" config:type="int">1660399</config:config-item>
+         <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="AddParaTableSpacing" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CurrentDatabaseDataSource" config:type="string"/>
+         <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+         <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintFaxName" config:type="string"/>
+         <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+         <config:config-item config:name="PrinterName" config:type="string"/>
+         <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+         <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+         <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+         <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+         <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+         <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+      </config:config-item-set>
+   </office:settings>
+   <office:scripts>
+      <office:script script:language="ooo:Basic">
+         <ooo:libraries/>
+      </office:script>
+   </office:scripts>
+   <office:font-face-decls>
+      <style:font-face style:name="FreeSans1" svg:font-family="FreeSans"/>
+      <style:font-face style:name="Bitstream Vera Serif" svg:font-family="'Bitstream Vera Serif'"
+                       style:font-family-generic="roman"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'"
+                       style:font-family-generic="roman"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="VL Pゴシック" svg:font-family="'VL Pゴシック'"
+                       style:font-family-generic="roman"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="Takao Pゴシック" svg:font-family="'Takao Pゴシック'"
+                       style:font-family-generic="swiss"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="FreeSans" svg:font-family="FreeSans"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="Takao Pゴシック1" svg:font-family="'Takao Pゴシック'"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="VL Pゴシック1" svg:font-family="'VL Pゴシック'"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+      <style:font-face style:name="ヒラギノ明朝 Pro W3" svg:font-family="'ヒラギノ明朝 Pro W3'"
+                       style:font-family-generic="system"
+                       style:font-pitch="variable"/>
+   </office:font-face-decls>
+   <office:styles>
+      <style:default-style style:family="graphic">
+         <style:graphic-properties draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm"
+                                   draw:start-line-spacing-horizontal="0.283cm"
+                                   draw:start-line-spacing-vertical="0.283cm"
+                                   draw:end-line-spacing-horizontal="0.283cm"
+                                   draw:end-line-spacing-vertical="0.283cm"
+                                   style:flow-with-text="false"/>
+         <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict"
+                                     style:writing-mode="lr-tb"
+                                     style:font-independent-line-spacing="false">
+            <style:tab-stops/>
+         </style:paragraph-properties>
+         <style:text-properties style:use-window-font-color="true" fo:font-size="12pt" fo:language="en"
+                                fo:country="US"
+                                style:letter-kerning="true"
+                                style:font-size-asian="10.5pt"
+                                style:language-asian="ja"
+                                style:country-asian="JP"
+                                style:font-size-complex="12pt"
+                                style:language-complex="hi"
+                                style:country-complex="IN"/>
+      </style:default-style>
+      <style:default-style style:family="paragraph">
+         <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha"
+                                     style:punctuation-wrap="hanging"
+                                     style:line-break="strict"
+                                     style:tab-stop-distance="1.251cm"
+                                     style:writing-mode="page"/>
+         <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif"
+                                fo:font-size="12pt"
+                                fo:language="en"
+                                fo:country="US"
+                                style:letter-kerning="true"
+                                style:font-name-asian="ヒラギノ明朝 Pro W3"
+                                style:font-size-asian="10.5pt"
+                                style:language-asian="ja"
+                                style:country-asian="JP"
+                                style:font-name-complex="FreeSans"
+                                style:font-size-complex="12pt"
+                                style:language-complex="hi"
+                                style:country-complex="IN"
+                                fo:hyphenate="false"
+                                fo:hyphenation-remain-char-count="2"
+                                fo:hyphenation-push-char-count="2"/>
+      </style:default-style>
+      <style:default-style style:family="table">
+         <style:table-properties table:border-model="collapsing"/>
+      </style:default-style>
+      <style:default-style style:family="table-row">
+         <style:table-row-properties fo:keep-together="auto"/>
+      </style:default-style>
+      <style:style style:name="Standard" style:family="paragraph" style:default-outline-level=""
+                   style:class="text">
+         <style:paragraph-properties fo:text-align="start" style:justify-single-word="false" fo:orphans="0"
+                                     fo:widows="0"
+                                     fo:hyphenation-ladder-count="no-limit"
+                                     style:writing-mode="lr-tb">
+            <style:tab-stops>
+               <style:tab-stop style:position="1.251cm"/>
+            </style:tab-stops>
+         </style:paragraph-properties>
+         <style:text-properties fo:color="#00000a" style:font-name="Bitstream Vera Serif" fo:font-size="12pt"
+                                fo:language="en"
+                                fo:country="US"
+                                style:font-name-asian="VL Pゴシック1"
+                                style:font-size-asian="12pt"
+                                style:language-asian="ja"
+                                style:country-asian="JP"
+                                style:font-name-complex="Takao Pゴシック1"
+                                style:font-size-complex="12pt"
+                                style:language-complex="hi"
+                                style:country-complex="IN"
+                                fo:hyphenate="false"
+                                fo:hyphenation-remain-char-count="2"
+                                fo:hyphenation-push-char-count="2"/>
+      </style:style>
+      <style:style style:name="Heading" style:family="paragraph"
+                   style:parent-style-name="Standard"
+                   style:next-style-name="Text_20_body"
+                   style:default-outline-level=""
+                   style:class="text">
+         <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always"/>
+         <style:text-properties style:font-name="Takao Pゴシック" fo:font-size="14pt"
+                                style:font-name-asian="Takao Pゴシック1"
+                                style:font-size-asian="14pt"
+                                style:font-name-complex="Takao Pゴシック1"
+                                style:font-size-complex="14pt"/>
+      </style:style>
+      <style:style style:name="Text_20_body" style:display-name="Text body"
+                   style:family="paragraph"
+                   style:parent-style-name="Standard"
+                   style:default-outline-level=""
+                   style:class="text">
+         <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/>
+      </style:style>
+      <style:style style:name="List" style:family="paragraph"
+                   style:parent-style-name="Text_20_body"
+                   style:default-outline-level=""
+                   style:class="list">
+         <style:text-properties style:font-size-asian="12pt" style:font-name-complex="FreeSans1"/>
+      </style:style>
+      <style:style style:name="Caption" style:family="paragraph"
+                   style:parent-style-name="Standard"
+                   style:default-outline-level=""
+                   style:class="extra">
+         <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" text:number-lines="false"
+                                     text:line-number="0"/>
+         <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt"
+                                style:font-style-asian="italic"
+                                style:font-name-complex="FreeSans1"
+                                style:font-size-complex="12pt"
+                                style:font-style-complex="italic"/>
+      </style:style>
+      <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard"
+                   style:default-outline-level=""
+                   style:class="index">
+         <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+         <style:text-properties style:font-size-asian="12pt" style:font-name-complex="FreeSans1"/>
+      </style:style>
+      <style:style style:name="Absatz-Standardschriftart" style:family="text"/>
+      <style:style style:name="WW-Absatz-Standardschriftart" style:family="text"/>
+      <text:outline-style style:name="Outline">
+         <text:outline-level-style text:level="1" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.762cm"
+                                                 fo:text-indent="-0.762cm"
+                                                 fo:margin-left="0.762cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="2" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.016cm"
+                                                 fo:text-indent="-1.016cm"
+                                                 fo:margin-left="1.016cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="3" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm"
+                                                 fo:text-indent="-1.27cm"
+                                                 fo:margin-left="1.27cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="4" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.524cm"
+                                                 fo:text-indent="-1.524cm"
+                                                 fo:margin-left="1.524cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="5" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.778cm"
+                                                 fo:text-indent="-1.778cm"
+                                                 fo:margin-left="1.778cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="6" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.032cm"
+                                                 fo:text-indent="-2.032cm"
+                                                 fo:margin-left="2.032cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="7" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.286cm"
+                                                 fo:text-indent="-2.286cm"
+                                                 fo:margin-left="2.286cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="8" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm"
+                                                 fo:text-indent="-2.54cm"
+                                                 fo:margin-left="2.54cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="9" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.794cm"
+                                                 fo:text-indent="-2.794cm"
+                                                 fo:margin-left="2.794cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+         <text:outline-level-style text:level="10" style:num-format="">
+            <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+               <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.048cm"
+                                                 fo:text-indent="-3.048cm"
+                                                 fo:margin-left="3.048cm"/>
+            </style:list-level-properties>
+         </text:outline-level-style>
+      </text:outline-style>
+      <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0"
+                                text:footnotes-position="page"
+                                text:start-numbering-at="document"/>
+      <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+      <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1"
+                                        text:number-position="left"
+                                        text:increment="5"/>
+   </office:styles>
+   <office:automatic-styles>
+      <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard"
+                   style:master-page-name="">
+         <style:paragraph-properties style:page-number="auto"/>
+      </style:style>
+      <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"
+                   style:master-page-name="Standard">
+         <style:paragraph-properties style:page-number="auto"/>
+      </style:style>
+      <style:style style:name="T1" style:family="text">
+         <style:text-properties style:font-name="VL Pゴシック"/>
+      </style:style>
+      <style:style style:name="T2" style:family="text">
+         <style:text-properties style:font-name="VL Pゴシック" officeooo:rsid="001b32d6"
+                                style:font-name-asian="VL Pゴシック1"/>
+      </style:style>
+      <style:style style:name="T3" style:family="text">
+         <style:text-properties style:font-name="VL Pゴシック" officeooo:rsid="001c48c8"
+                                style:font-name-asian="VL Pゴシック1"/>
+      </style:style>
+      <style:style style:name="T4" style:family="text">
+         <style:text-properties style:font-name="VL Pゴシック" officeooo:rsid="001e2004"
+                                style:font-name-asian="VL Pゴシック1"/>
+      </style:style>
+      <style:style style:name="T5" style:family="text">
+         <style:text-properties officeooo:rsid="001b32d6"/>
+      </style:style>
+      <style:style style:name="T6" style:family="text">
+         <style:text-properties officeooo:rsid="001c48c8"/>
+      </style:style>
+      <style:style style:name="T7" style:family="text">
+         <style:text-properties officeooo:rsid="001e2004"/>
+      </style:style>
+      <style:page-layout style:name="pm1">
+         <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1"
+                                       style:print-orientation="portrait"
+                                       fo:margin-top="2cm"
+                                       fo:margin-bottom="2cm"
+                                       fo:margin-left="2cm"
+                                       fo:margin-right="2cm"
+                                       style:writing-mode="lr-tb"
+                                       style:layout-grid-color="#c0c0c0"
+                                       style:layout-grid-lines="40"
+                                       style:layout-grid-base-height="0.423cm"
+                                       style:layout-grid-ruby-height="0.212cm"
+                                       style:layout-grid-mode="none"
+                                       style:layout-grid-ruby-below="false"
+                                       style:layout-grid-print="false"
+                                       style:layout-grid-display="false"
+                                       style:footnote-max-height="0cm">
+            <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm"
+                                style:distance-after-sep="0.101cm"
+                                style:adjustment="left"
+                                style:rel-width="25%"
+                                style:color="#000000"/>
+         </style:page-layout-properties>
+         <style:header-style/>
+         <style:footer-style/>
+      </style:page-layout>
+   </office:automatic-styles>
+   <office:master-styles>
+      <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+   </office:master-styles>
+   <office:body>
+      <office:text>
+         <text:sequence-decls>
+            <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+            <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+            <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+            <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+         </text:sequence-decls>
+         <text:p text:style-name="P2">Sample of <text:span text:style-name="T5">OpenDocument </text:span>
+            <text:span text:style-name="T6">Text 1.2 </text:span>
+            <text:span text:style-name="T7">(flat)</text:span> 
+         </text:p>
+         <text:p text:style-name="Standard">
+            <text:span text:style-name="T2">OpenDocument </text:span>
+            <text:span text:style-name="T3">Text 1.2 </text:span>
+            <text:span text:style-name="T4">(flat)</text:span>
+            <text:span text:style-name="T1">の日本語サンプル</text:span> 
+         </text:p>
+      </office:text>
+   </office:body>
+</office:document>
\ No newline at end of file

  Added: test/fixtures/open_document_text/1.2_ja.odt (+0 -0) 100644
===================================================================
(Binary files differ)

  Added: test/fixtures/open_document_text/Makefile.am (+5 -0) 100644
===================================================================
--- /dev/null
+++ test/fixtures/open_document_text/Makefile.am    2010-12-19 06:12:19 +0000 (c2fa93e)
@@ -0,0 +1,5 @@
+EXTRA_DIST =					\
+	1.2.doc					\
+	1.2.fdoc				\
+	1.2_ja.doc				\
+	1.2_ja.fdoc

  Added: test/test_open_document_text.c (+68 -0) 100644
===================================================================
--- /dev/null
+++ test/test_open_document_text.c    2010-12-19 06:12:19 +0000 (43e6779)
@@ -0,0 +1,68 @@
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*- */
+/*
+ *  Copyright (C) 2010  Kouhei Sutou <kou at clear-code.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ *  MA  02110-1301  USA
+ */
+
+#include "chupa_test_util.h"
+
+void test_1_2(void);
+void test_1_2_ja(void);
+void test_1_2_flat(void);
+void test_1_2_ja_flat(void);
+
+void
+setup(void)
+{
+    chupa_test_setup("open_document_text");
+}
+
+void
+teardown(void)
+{
+    chupa_test_teardown();
+}
+
+void
+test_1_2(void)
+{
+    cut_assert_equal_string("Sample of OpenDocument Text 1.2",
+                            decompose("1.2.odt"));
+}
+
+void
+test_1_2_ja(void)
+{
+    cut_assert_equal_string("Sample of OpenDocument Text 1.2\n"
+                            "OpenDocument Text 1.2 の日本語サンプル\n",
+                            decompose("1.2_ja.odt"));
+}
+
+void
+test_1_2_flat(void)
+{
+    cut_assert_equal_string("Sample of OpenDocument Text 1.2 (flat)",
+                            decompose("1.2.fodt"));
+}
+
+void
+test_1_2_ja_flat(void)
+{
+    cut_assert_equal_string("Sample of OpenDocument Text 1.2 (flat)\n"
+                            "OpenDocument Text 1.2 (flat) の日本語サンプル\n",
+                            decompose("1.2_ja.fodt"));
+}



More information about the groonga-commit mailing list