From 426077fbea57facf9907cff2431d8f669713d6da Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 16 Apr 2014 12:11:39 +0200 Subject: fdo#77027: add some comments to prevent such oversights Change-Id: I381c9738bba3e422e01324fa0c781c857db3d360 --- xmloff/source/draw/XMLGraphicsDefaultStyle.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xmloff') diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index afbe5797bf7f..9753a3fe0b8a 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -125,6 +125,11 @@ void XMLGraphicsDefaultStyle::SetDefaults() xDefaults->setPropertyValue("IsFollowingTextFlow", uno::makeAny(true)); } + // NOTE: the only reason why it's legal to check "==" (not "<") against + // arbitrary versions here is that the default value of these attributes + // is not defined by ODF, therefore it is implementation-defined + // (and we of course must not override any attributes that are actually + // in the document, so check for that) bool const bIsAOO4( GetImport().getGeneratorVersion() >= SvXMLImport::AOO_40x && GetImport().getGeneratorVersion() <= SvXMLImport::AOO_4x); -- cgit