incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svante Schubert <svante.schub...@gmail.com>
Subject Changing default styles
Date Thu, 17 Oct 2013 10:48:50 GMT
Hello  Benson,

Am 16.10.2013 16:26, schrieb Benson Margulies:
> OK, but do you see my overall goal here, which is to change the default
> styles? It's not at all obvious to me how to go about doing that now given
> what you've written.

There is a org.odftoolkit.odfdom.doc.StyleTest.java:

	OdfDocument doc = OdfTextDocument.newTextDocument();
        OdfOfficeStyles styles = doc.getOrCreateDocumentStyles();
        OdfDefaultStyle def = styles.getOrCreateDefaultStyle(OdfStyleFamily.Paragraph);
        def.setProperty(StyleTextPropertiesElement.TextUnderlineColor, "#00FF00");


or another way would be:
	
	OdfDocument doc = OdfTextDocument.newTextDocument();
        OdfOfficeStyles styles = doc.getOrCreateDocumentStyles();
        OdfDefaultStyle def = styles.getOrCreateDefaultStyle(OdfStyleFamily.Paragraph);
        def.setProperty(StyleTextPropertiesElement.TextUnderlineColor, "#00FF00");

(taken from org.odftoolkit.odfdom.doc.OdfDocument.java)


Hope this may help you!
Svante
	


Mime
View raw message