How to change default color and font for graphical objects in calc

In the default template for Calc, the graphical objects like rectangles, ovals, etc have a lighter blue as default color and Liberation Serif 12 as the default font.

How can I change the color and the font in such objects that the change remains in the template?

Searching the AskLibO and the help wiki did not bring up any information.

Any hint is appreciated!

I do not believe this is currently possible, as Calc only supports Cell and Page styles (not Graphics styles as Draw / Impress do). In basic terms the Graphics category of styles would need to be added to Calc in order for a template to be able to store this information.

The default line / area colour for graphics and the font for paragraph text in a graphic do appear to be stored as a style, however as changes are only possible on a per-object basis these are stored as direct formatting. For example, the graphic object and related paragraph information for a basic rectangle with some text in it:

<draw:rect draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P1" svg:width="4.983cm" svg:height="2.603cm" svg:x="4.571cm" svg:y="1.941cm">
    <text:p text:style-name="P1">text</text:p>

… has corresponding default entries in content.xml:

<style:style style:name="gr1" style:family="graphic">
    <style:graphic-properties draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle"/>
<style:style style:name="P1" style:family="paragraph">
    <style:paragraph-properties fo:text-align="center"/>

These definitions do not store the default attributes such as colour and font, which appear instead to come from the corresponding family style definition in styles.xml:

<style:default-style style:family="graphic">
    <style:graphic-properties svg:stroke-color="#3465af" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm"/>
    <style:paragraph-properties style:text-autospace="ideograph-alpha" style:punctuation-wrap="simple" style:line-break="strict" style:writing-mode="page" style:font-independent-line-spacing="false">
    <style:text-properties style:use-window-font-color="true" fo:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable" fo:font-size="12pt" fo:language="en" fo:country="AU" style:letter-kerning="true" style:font-name-asian="Segoe UI" style:font-size-asian="24pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Tahoma" style:font-size-complex="24pt" style:language-complex="hi" style:country-complex="IN"/>

In this instance the default line colour is #3465af, the default area colour is #729fcf, and the default font is Times New Roman. The only method available in Calc to change these attributes is via direct formatting. Changing the line / area colour results in the corresponding gr1 entry in content.xml being amended to reflect the colour changes and a new gr2 entry being created to again point to the default style. Conversely changing the font results in a new P2 entry created in content.xml to reflect the font change. This is inconsistent, but perhaps simply a reflection of how these changes are handled for convenience.

Please file an enhancement bug and provide as much information about this new feature as possible. Don’t forget to mark your bug as an ‘enhancement’. The QA team will be happy to help you triage your feature request in the bugtracker.

Please post a link to any bugs you file in a comment below using the format “fdo#123456”. Thanks.