Link to home
Start Free TrialLog in
Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Office theme XML - turning DrawingML lines off (setting to "none")

I am developing an Office theme and I need the lines to be invisible/off/none.

Since the Office docs use the Open XML standard which includes drawingml is there a way to set the three line styles in the theme1.xml file to be off? If I set the weight to 0, this is reflected in the Office app format pane when using the custom theme.thmx file but the line is still visible in the document.

This is the extract from my theme1.xml file, extracted from the .thmx archive:

<a:lnStyleLst>
	<a:ln w="0" cap="flat" cmpd="sng" algn="ctr">
		<a:solidFill>
			<a:srgbClr val="830051" />
		</a:solidFill>
		<a:prstDash val="solid" />
	</a:ln>
		<a:ln w="0" cap="flat" cmpd="sng" algn="ctr">
			<a:solidFill>
				<a:srgbClr val="830051" />
			</a:solidFill>
			<a:prstDash val="solid" />
		</a:ln>
	<a:ln w="0" cap="flat" cmpd="sng" algn="ctr">
		<a:solidFill>
			<a:srgbClr val="830051" />
		</a:solidFill>
		<a:prstDash val="solid" />
	</a:ln>
</a:lnStyleLst>

Open in new window


Is there a "none" value for this line?

<a:prstDash val="solid" />

Open in new window


Or some other way to turn lines off? I also tried setting the line to it's minimum 0.25pt (3175 EMUs) and the colour to the same as the shape fill but that didn't work either!
Avatar of Echo_S
Echo_S
Flag of United States of America image

What exactly are you trying to turn the lines off on, Jamie? "Off on," lol. Where are you trying to remove the lines? There are three line styles -- you have a subtle, moderate and intense option, so there are 3 line styles in the theme1.xml.

The shapes, etc., in the galleries are made up of different combinations of subtle, moderate and intense lines, fills and effects. And you don't get a straight subtle line + subtle fill + subtle effect; instead you get crazy combinations ... and others that can't really be changed. Like that 2nd row of shape styles? I think (off the top of my head) that white line can't really be removed from the interface. (But I could be misremembering.)
Oh, sorry, you know about the 3 line styles -- you just said that. I missed it, oops.
Avatar of Jamie Garroch (MVP)

ASKER

Hi Echo. Yep, it's those three definitions of the line style that I'm trying to use and did some reading to find out how they are used to make the gallery combos.

It just got weirder. If I set a line width for the moderate line style (which I can see in the autoshape style gallery), it is adhered to when inserting new SmartArt with the default gallery combo-style Simple Fill.

But If I try to set a colour or transparency for that same line definition, SmartArt appears to ignore these parameters UNTIL, I open the format pane in PowerPoint and change the line width. Then, all of a sudden, I can observer the other custom theme settings switching over in the PowerPoint UI (I used colour and transparency for my test). I can also see the outline colour changing to an unspecified black when changing the width under certain conditions. All very odd.

It's as if the "Office" SmartArt has schizophrenia! I say "Office" because the SmartArt sub-component shapes are Office shapes which are different to PowerPoint shapes. I asked my MSFT contact if they'd be interested in receiving documented feedback on these behaviours and am awaiting a response.

Of course I haven't succeeded in setting the line to off or hiding it using transparency or fudging it by setting the colour to the same as the shape fill. I have a sneaking suspicion that the DrawingML standard doesn't support line="none" so MSFT have probably had to add the "none" feature in their apps, independently of the standard. After all, why would one define a line in markup and then disable it?!
Yup. Those combinations of styles for line/fill/effect are extremely frustrating.

So you're specifically trying to do this with SmartArt? Man, SmartArt is a different animal altogether. I'm sorry I can't help you with the line=none part, but I seem to recall that you can't set a fill to none for certain objects in code (probably Drawing ML objects, lol), so I suspect you are correct.
I'm developing an add-in for a client that wants each of the 150+ SmartArt layouts to be individually styled to a corporate design, automatically as the user inserts them! It's working on 2013, 2010 but alas not 100% on 2007 as SmartArt is read-only from a programming perspective. And then they want a Mac solution. I thought the theme XML may be a [partial] solution but seems not. My head aches...

Thanks Echo. Always good to chat to you!
Oh, yuck, Good luck with that! Sorry -- I'm of no help at all. But yes, always good to chat with you! :-)

Oh, here's a thought -- I assume you've looked into the GLOX and GCSX files? Wonder if you could set the line to the background color in a custom GCSX file and then reference that from the add-in?

Suspect you've already read this, but just in case ...
 https://msdn.microsoft.com/en-us/library/office/gg583880(v=office.14).aspx
Hmm. I did look at GLOX a long time ago with a view to creating custom SmartArt layouts but hadn't thought about it for styling. I'm not sure it's possible to restyle existing Office SmartArt this way because the GLOX files aren't distributed but I am going to go back and have a second read with a different head on (once I have purchased that upgraded head!).
Yeah, you'd have to get IT to deploy GLOX and GCSX files. Or why not deploy them as part of the add-in installation? Your MSI should be able to place those easily enough.
Your idea is to modify the default GLOX/GCSX files right? If so, what I meant was that they are not available to "extract" from the standard MSO installation so I would need to get a copy of them from somewhere all in order to modify them prior to deployment (and I'm not sure if that would mean they would then appear in the UI twice!). It used to be possible to download them for 2007 but there doesn't appear to be an MSDN download resource for 2013/2010.
ASKER CERTIFIED SOLUTION
Avatar of Echo_S
Echo_S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial