[Libreoffice-commits] libvisio.git: src/lib

Fridrich Å trba fridrich.strba at bluewin.ch
Fri Jul 19 04:47:27 PDT 2013


 src/lib/VDXParser.cpp        |   13 -
 src/lib/VSDXMLParserBase.cpp |   28 ---
 src/lib/VSDXParser.cpp       |   15 -
 src/lib/tokens.txt           |  400 -------------------------------------------
 4 files changed, 456 deletions(-)

New commits:
commit e8a2a552019b2697662ca62975c21c760fe5a8b8
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Fri Jul 19 13:46:59 2013 +0200

    Speed-up the xml parser a tiny bit by mapping only used tokens

diff --git a/src/lib/VDXParser.cpp b/src/lib/VDXParser.cpp
index 649cd81..bef0b59 100644
--- a/src/lib/VDXParser.cpp
+++ b/src/lib/VDXParser.cpp
@@ -442,11 +442,6 @@ void libvisio::VDXParser::readFillAndShadow(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readDoubleData(shadowOffsetY, reader);
       break;
-    case XML_SHDWFOREGNDTRANS:
-    case XML_SHDWBKGNDTRANS:
-    case XML_SHAPESHDWTYPE:
-    case XML_SHAPESHDWOBLIQUEANGLE:
-    case XML_SHAPESHDWSCALEFACTOR:
     default:
       break;
     }
@@ -546,7 +541,6 @@ void libvisio::VDXParser::readXFormData(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readBoolData(m_shape.m_xform.flipY, reader);
       break;
-    case XML_RESIZEMODE:
     default:
       break;
     }
@@ -681,13 +675,6 @@ void libvisio::VDXParser::readPageProps(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readDoubleData(drawingScale, reader);
       break;
-    case XML_DRAWINGSIZETYPE:
-    case XML_DRAWINGSCALETYPE:
-    case XML_INHIBITSNAP:
-    case XML_UIVISIBILITY:
-    case XML_SHDWTYPE:
-    case XML_SHDWOBLIQUEANGLE:
-    case XML_SHDWSCALEFACTOR:
     default:
       break;
     }
diff --git a/src/lib/VSDXMLParserBase.cpp b/src/lib/VSDXMLParserBase.cpp
index 0812429..4dee1cd 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -1367,24 +1367,6 @@ void libvisio::VSDXMLParserBase::readCharIX(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         readBoolData(doublestrikeout, reader);
       break;
-    case XML_RTLTEXT:
-      break;
-    case XML_USEVERTICAL:
-      break;
-    case XML_LETTERSPACE:
-      break;
-    case XML_COLORTRANS:
-      break;
-    case XML_ASIANFONT:
-      break;
-    case XML_COMPLEXSCRIPTFONT:
-      break;
-    case XML_LOCALIZEFONT:
-      break;
-    case XML_COMPLEXSCRIPTSIZE:
-      break;
-    case XML_LANGID:
-      break;
     default:
       break;
     }
@@ -1471,16 +1453,6 @@ void libvisio::VSDXMLParserBase::readParaIX(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readByteData(align, reader);
       break;
-    case XML_BULLET:
-      break;
-    case XML_BULLETSTR:
-      break;
-    case XML_BULLETFONT:
-      break;
-    case XML_BULLETFONTSIZE:
-      break;
-    case XML_TEXTPOSAFTERBULLET:
-      break;
     case XML_FLAGS:
       if (XML_READER_TYPE_ELEMENT == tokenType)
         readUnsignedData(flags, reader);
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
index ad93585..b1dee7d 100644
--- a/src/lib/VSDXParser.cpp
+++ b/src/lib/VSDXParser.cpp
@@ -649,13 +649,6 @@ void libvisio::VSDXParser::readPageSheetProperties(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readDoubleData(drawingScale, reader);
       break;
-    case XML_DRAWINGSIZETYPE:
-    case XML_DRAWINGSCALETYPE:
-    case XML_INHIBITSNAP:
-    case XML_UIVISIBILITY:
-    case XML_SHDWTYPE:
-    case XML_SHDWOBLIQUEANGLE:
-    case XML_SHDWSCALEFACTOR:
     default:
       break;
     }
@@ -860,12 +853,6 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         readCharacter(reader);
       break;
-    case XML_SHDWFOREGNDTRANS:
-    case XML_SHDWBKGNDTRANS:
-    case XML_SHAPESHDWTYPE:
-    case XML_SHAPESHDWOBLIQUEANGLE:
-    case XML_SHAPESHDWSCALEFACTOR:
-    case XML_TEXTBKGNDTRANS:
     default:
       break;
     }
@@ -1184,8 +1171,6 @@ void libvisio::VSDXParser::readShapeProperties(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readBoolData(m_shape.m_misc.m_hideText, reader);
       break;
-    case XML_RESIZEMODE:
-      break;
     default:
       if (XML_SECTION == tokenClass && XML_READER_TYPE_ELEMENT == tokenType)
         ret = skipSection(reader);
diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt
index 2db637c..88bdc2c 100644
--- a/src/lib/tokens.txt
+++ b/src/lib/tokens.txt
@@ -1,157 +1,29 @@
 A
-Act
-Action
-Active
-AddMarkup
-Address
-ADOData
-Align
-AlignBottom
-AlignCenter
-AlignLeft
-Alignment
-AlignMiddle
-AlignRight
-AlignTop
-AlternateNames
 Angle
-Annotation
 ArcTo
-AsianFont
-AttachedToolbars
-AuthorEntry
-AuthorList
-AutoGen
-AutoLinkComparison
-AvenueSizeX
-AvenueSizeY
-AvoidPageBreaks
 B
 BeginArrow
-BeginArrowSize
-BeginGroup
-BeginX
-BeginY
-BegTrigger
-BlockSizeX
-BlockSizeY
-Blur
 BottomMargin
-Brightness
-BuildNumberCreated
-BuildNumberEdited
-Bullet
-BulletFont
-BulletFontSize
-BulletStr
-ButtonFace
 C
-Calendar
-CanGlue
 Case
-Category
 Cell
-CellDef
-CenterX
-CenterY
 Char
 Character
-Checked
 Color
 ColorEntry
 Colors
-ColorTrans
-Comment
-CommentEntry
-CommentList
-Comments
-Company
-ComplexScriptFont
-ComplexScriptSize
-ConFixedCode
-ConLineJumpCode
-ConLineJumpDirX
-ConLineJumpDirY
-ConLineJumpStyle
-ConLineRouteExt
-Connect
-Connection
-ConnectionABCD
-Connects
-Contrast
-Control
-Copyright
 cp
-Creator
-CtrlAsInput
-CurrentIndex
-CustomMenusFile
-CustomProp
-CustomProps
-CustomToolbarsFile
 D
-Data1
-Data2
-Data3
-DataColumn
-DataColumns
-DataConnection
-DataConnections
-DataRecordSet
-DataRecordSets
-Date
 DblUnderline
-Default
 DefaultTabStop
-Denoise
-Desc
-Description
-DirX
-DirY
-Disabled
-DisplayLevel
-DisplayMode
-DocLangID
-DocProps
-DocumentProperties
-DocumentSettings
-DocumentSheet
-DontMoveChildren
 DoubleStrikethrough
-DrawingResizeType
 DrawingScale
-DrawingScaleType
-DrawingSizeType
-DropOnPageScale
-DynamicGridEnabled
-DynamicsOff
-DynFeedback
 E
-EditMode
 Ellipse
 EllipticalArcTo
-EmailRoutingData
-EnableFillProps
-EnableGrid
-EnableLineProps
-EnableTextProps
 EndArrow
-EndArrowSize
-EndTrigger
-EndX
-EndY
-Event
-EventDblClick
-EventDrop
-EventItem
-EventList
-EventMultiDrop
-EventXFMod
-Extensions
-ExtraInfo
 FaceName
 FaceNames
-Field
 Fill
 FillBkgnd
 FillBkgndTrans
@@ -159,47 +31,18 @@ FillForegnd
 FillForegndTrans
 FillPattern
 Flags
-fld
 FlipX
 FlipY
-FlyoutChild
 Font
-FontEntry
-Fonts
 FontScale
-FooterCenter
-FooterLeft
-FooterMargin
-FooterRight
 Foreign
 ForeignData
-Format
-Frame
-FunctionDef
-Gamma
 Geom
 Geometry
-Glue
-GlueSettings
-GlueType
-Group
-HeaderCenter
-HeaderFooter
-HeaderFooterFont
-HeaderLeft
-HeaderMargin
-HeaderRight
 Height
-Help
-HelpTopic
-HideForApply
 HideText
 Highlight
 HorzAlign
-Hyperlink
-HyperlinkBase
-Icon
-Image
 ImgHeight
 ImgOffsetX
 ImgOffsetY
@@ -208,280 +51,75 @@ IndFirst
 IndLeft
 IndRight
 InfiniteLine
-InhibitSnap
-Initials
-Invisible
-IsDropSource
-IsDropTarget
-IsSnapTarget
-Issue
-Issues
-IssueTarget
-IsTextEditTarget
-Keywords
-Label
-LangID
-Layer
-LayerMem
-LayerMember
-Layout
-Leader
 LeftMargin
-Letterspace
 Line
-LineAdjustFrom
-LineAdjustTo
 LineCap
 LineColor
-LineColorTrans
-LineJumpCode
-LineJumpFactorX
-LineJumpFactorY
-LineJumpStyle
 LinePattern
-LineRouteExt
 LineTo
-LineToLineX
-LineToLineY
-LineToNodeX
-LineToNodeY
 LineWeight
-Locale
-LocalizeBulletFont
-LocalizeFont
-LocalizeMerge
-Lock
-LockAspect
-LockBegin
-LockCalcWH
-LockCrop
-LockCustProp
-LockDelete
-LockEnd
-LockFormat
-LockFromGroupFormat
-LockGroup
-LockHeight
-LockMoveX
-LockMoveY
-LockPreview
-LockRotate
-LockSelect
-LockTextEdit
-LockThemeColors
-LockThemeEffects
-LockVtxEdit
-LockWidth
 LocPinX
 LocPinY
-Manager
-MarkerIndex
 Master
-MasterContents
 Masters
-MasterShortcut
-Menu
 Misc
 MoveTo
-Name
-NameUniv
-NewWindow
-NoAlignBox
-NoCtlHandles
 NoFill
 NoLine
-NoLiveDynamics
-NonPrinting
-NoObjHandles
-NoQuickDrag
 NoShow
-NoSnap
 NURBSTo
-ObjectKind
-ObjType
-OnPage
-OutputFormat
 Overline
 Page
-PageBottomMargin
-PageColor
-PageContents
 PageHeight
-PageLayout
-PageLeftMargin
-PageLineJumpDirX
-PageLineJumpDirY
 PageProps
-PageRightMargin
 Pages
 PageScale
-PageShapeSplit
 PageSheet
-PagesX
-PagesY
-PageTopMargin
 PageWidth
-PaperHeight
-PaperKind
-PaperSize
-PaperSource
-PaperWidth
 Para
 Paragraph
-Perpendicular
 PinX
 PinY
-PlaceDepth
-PlaceFlip
-PlaceStyle
-PlowCode
 PolylineTo
 Pos
-Position
 pp
-PreviewPicture
-PreviewQuality
-PreviewScope
-PrimaryKey
-Print
-PrintCenteredH
-PrintCenteredV
-PrintFitOnPages
-PrintGrid
-PrintLandscape
-PrintPageOrientation
-PrintPagesAcross
-PrintPagesDown
-PrintProps
-PrintScale
-PrintSetup
-Prompt
-Prop
-ProtectBkgnds
-Protection
-ProtectMasters
-ProtectShapes
-ProtectStyles
-PublishedPage
-PublishSettings
-ReadOnly
-RefBy
-RefreshableData
-RefreshConflict
 Rel
-Relationships
 RelCubBezTo
 RelEllipticalArcTo
 RelLineTo
 RelMoveTo
 RelQuadBezTo
 ResizeMode
-ResizePage
-Reviewer
-ReviewerID
-RibbonX
 RightMargin
-Rounding
-RouteStyle
 Row
-RowDef
-RowKeyValue
-RowMap
-RTLText
-Rule
-RuleFilter
-RuleInfo
-RulerGrid
-RuleSet
-RuleSetFlags
-RuleSets
-RuleTest
-ScaleX
-ScaleY
-Scratch
 Section
-SectionDef
-SelectMode
 Shape
-ShapeFixedCode
-ShapeKeywords
-ShapePermeablePlace
-ShapePermeableX
-ShapePermeableY
-ShapePlaceFlip
-ShapePlaceStyle
-ShapePlowCode
-ShapeRouteStyle
 Shapes
-ShapeShdwObliqueAngle
 ShapeShdwOffsetX
 ShapeShdwOffsetY
-ShapeShdwScaleFactor
-ShapeShdwType
-ShapeSplit
-ShapeSplittable
-Sharpen
 ShdwBkgnd
-ShdwBkgndTrans
 ShdwForegnd
-ShdwForegndTrans
-ShdwObliqueAngle
 ShdwOffsetX
 ShdwOffsetY
 ShdwPattern
-ShdwScaleFactor
-ShdwType
-ShowConnectionPoints
-ShowGrid
-ShowGuides
-ShowPageBreaks
-ShowRulers
 Size
-SmartTagDef
-Snap
-SnapAngle
-SnapAngles
-SnapExtensions
-SnapSettings
 SolutionXML
-SortKey
 SpAfter
 SpBefore
 SpLine
 SplineKnot
 SplineStart
-Status
-StencilGroup
-StencilGroupPos
 Strikethru
 Style
-StyleProp
 StyleSheet
 StyleSheets
-SubAddress
-Subject
-Tab
-Tabs
-TabSplitterPos
-TagName
-Template
 Text
 TextBkgnd
 TextBkgndTrans
 TextBlock
 TextDirection
-TextPosAfterBullet
 TextXForm
-TheData
-TheText
-TimeCreated
-TimeEdited
-TimePrinted
-TimeSaved
-Title
 TopMargin
-tp
-Transparency
 TxtAngle
 TxtHeight
 TxtLocPinX
@@ -489,46 +127,8 @@ TxtLocPinY
 TxtPinX
 TxtPinY
 TxtWidth
-Type
-UICat
-UICod
-UIFmt
-UIVisibility
-UpdateAlignBox
-User
-UserCustomUI
-UseVertical
-Validation
-ValidationProperties
-Value
-VBProjectData
-Verify
 VerticalAlign
-ViewMarkup
-Visible
-VisioDocument
-WalkPreference
 Width
-Window
-Windows
 X
-XCon
-XDyn
 XForm
-XForm1D
-XGridDensity
-XGridOrigin
-XGridSpacing
-XJustify
-XProp
-XRulerDensity
-XRulerOrigin
 Y
-YCon
-YDyn
-YGridDensity
-YGridOrigin
-YGridSpacing
-YJustify
-YRulerDensity
-YRulerOrigin


More information about the Libreoffice-commits mailing list