odf

package module
v0.0.0-...-fd12db2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: BSD-2-Clause Imports: 11 Imported by: 1

README

odf_Report_Generator

This library generates Report from ODF template document. Labels in template document are replaced to generate Report document. Remaining of portions of the document are not modified.

working

Implemented following

  • Header
  • Paragraph
  • TextSpan
  • List
  • Table

Documentation

Overview

/////////////////////

			<text:p text:style-name="P7">
               <text:span text:style-name="T5">hghgy</text:span>
          </text:p>

///////////////////

/////////////////////

			<text:p text:style-name="P7">
               <text:span text:style-name="T5">hghgy</text:span>
          </text:p>

///////////////////

Index

Constants

View Source
const (
	BOLD      = iota // BOLD = 0
	ITALIC           // ITALIC = 1
	UNDERLINE        // uNDERLINE = 2
)

Variables

This section is empty.

Functions

func MergeStyles

func MergeStyles(style1 *xmlDB.Database, style2 *xmlDB.Database)

func ProcessOdtfile

func ProcessOdtfile(Inputfile string, Outputfile string, Note *Notes)

Types

type Article

type Article struct {
	Content *xmlDB.Database
	Nodeid  int
}

func (*Article) AddContentArticle

func (Art *Article) AddContentArticle(Nodeid int)
type Header struct {
	NodeId  int
	StyleId int
	Note    *Notes
}

func (*Header) AddText

func (Head *Header) AddText(text string, textspanstyle string) *TextSpan

func (*Header) Style

func (Head *Header) Style() string

type List

type List struct {
	NodeId      int
	Note        *Notes
	ListStyleId int
}

func (*List) AddItemPara

func (List *List) AddItemPara(style string) *Paragraph

func (*List) Style

func (List *List) Style() string

type Notes

type Notes struct {
	Content *xmlDB.Database

	Officeautostyleid   int
	Officestyleid       int
	OrginalPictureFiles []string
	NewPictureFiles     []string
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase() *Notes

func (*Notes) CreateArticle

func (Note *Notes) CreateArticle(Nodeid int, name string) *Article

func (*Notes) CreateArticleFromTemplate

func (Note *Notes) CreateArticleFromTemplate(Inputfile string, ArtName string) *Article

*below function is not complete*

func (*Notes) IncludeStyle

func (Note *Notes) IncludeStyle(Nodeid int)

func (*Notes) InsertSubNode

func (Note *Notes) InsertSubNode(NodeId int, xmlstring string) int

func (*Notes) NewBulletinList

func (Note *Notes) NewBulletinList(Style string) *List

func (*Notes) NewHeader1

func (Note *Notes) NewHeader1(level int, Style string) *Header

func (*Notes) NewNumberedList

func (Note *Notes) NewNumberedList(Style string) *List

func (*Notes) NewParagraph

func (Note *Notes) NewParagraph(Style string) *Paragraph

func (*Notes) NewPicture

func (Note *Notes) NewPicture(Style string, PicFile string) *Picture

func (*Notes) NewTable

func (Note *Notes) NewTable(noofcols int, noofrows int, Style string) *Table

func (*Notes) NewTextSpan

func (Note1 *Notes) NewTextSpan(text string, Style string) *TextSpan

func (*Notes) WritetoScratchpad

func (Note *Notes) WritetoScratchpad(xmlstring string) int

type Odt

type Odt struct {
	Content *xmlDB.Database
}

func (*Odt) CreateMarkerNodes

func (Doc *Odt) CreateMarkerNodes()

func (*Odt) ImportAutoStyles

func (Doc *Odt) ImportAutoStyles(Note *Notes)

func (*Odt) ImportStyles

func (Doc *Odt) ImportStyles(Note *Notes)

func (*Odt) ReplaceMarkers

func (Doc *Odt) ReplaceMarkers(Note *Notes)

type Paragraph

type Paragraph struct {
	NodeId  int
	StyleId int
	Note    *Notes
}

func (*Paragraph) AddListStyleName

func (Para *Paragraph) AddListStyleName(value string)

func (*Paragraph) AddText

func (Para *Paragraph) AddText(text string, textspanstyle string) *TextSpan

func (*Paragraph) AddTextSpan

func (Para *Paragraph) AddTextSpan(textspan *TextSpan)

func (*Paragraph) GetPlainText

func (Para *Paragraph) GetPlainText() string

func (*Paragraph) SetFontSize

func (Para *Paragraph) SetFontSize(size int)

func (*Paragraph) SetFontType

func (Para *Paragraph) SetFontType(fontname string)

func (*Paragraph) SetLineHeight

func (Para *Paragraph) SetLineHeight(height int)

func (*Paragraph) SetMargins

func (Para *Paragraph) SetMargins(top int, bottom int)

func (*Paragraph) Style

func (Para *Paragraph) Style() string

func (*Paragraph) ToBold

func (Para *Paragraph) ToBold()

func (*Paragraph) ToItalic

func (Para *Paragraph) ToItalic()

func (*Paragraph) ToUnderLine

func (Para *Paragraph) ToUnderLine()

func (*Paragraph) Wrap

func (Para *Paragraph) Wrap(pic *Picture)

type Picture

type Picture struct {
	NodeId  int
	StyleId int
	Note    *Notes
}

func (*Picture) SetSize

func (Pict *Picture) SetSize(ht int, wdth int)

func (*Picture) Style

func (Pict *Picture) Style() string

type Table

type Table struct {
	NodeId        int
	TableStyleId  int
	ColumnStyleId int
	CellStyleId   int
	Note          *Notes
	// contains filtered or unexported fields
}

func (*Table) AddItemPara

func (Table *Table) AddItemPara(rowno int, colno int, style string) *Paragraph

type TextSpan

type TextSpan struct {
	NodeId  int
	StyleId int
	Note    *Notes
}

func (*TextSpan) Style

func (Text *TextSpan) Style() string

func (*TextSpan) ToBold

func (Text *TextSpan) ToBold()

func (*TextSpan) ToItalic

func (Text *TextSpan) ToItalic()

func (*TextSpan) ToNormal

func (Text *TextSpan) ToNormal()

func (*TextSpan) ToUnderLine

func (Text *TextSpan) ToUnderLine()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL