Code Monkey home page Code Monkey logo

Comments (3)

tbaliance avatar tbaliance commented on May 13, 2024

@kendrickkesley This is because of the dirty flag in:

func (r Run) AddFieldWithFormatting(code string, fmt string) {
	ic := r.newIC()
	ic.FldChar = wml.NewCT_FldChar()
	ic.FldChar.FldCharTypeAttr = wml.ST_FldCharTypeBegin
	ic.FldChar.DirtyAttr = &sharedTypes.ST_OnOff{}
	ic.FldChar.DirtyAttr.Bool = gooxml.Bool(true)

I added this originally as the fields I was using (e.g. TOC) required the update to generate the content, otherwise the table of contents would be blank. It looks like in your case, it's not absolutely needed.

I'm not sure of the best way to fix this, either a flag to indicate if the field should be marked as dirty or a separate method. I'll look into it, but if you need a quick fix setting DirtyAttr to nil through the X() method should work.

from unioffice.

kkesley avatar kkesley commented on May 13, 2024

Thanks! @tbaliance btw I'm updating the library with dep ensure -update baliance.com/gooxml but it still uses AddFieldWithFormatting(code string, fmt string). but if I use go get, it's picking the right version. do you know why it happens?

from unioffice.

tzneal avatar tzneal commented on May 13, 2024

@kendrickkesley Yeah, I didn't tag a new release which is what dep uses. I'll tag one now.

from unioffice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.