[Uml-devel] [Bug 136061] JJ: xml scheme: mixup of attribute names: *color and *colour
Oliver Kellogg
okellogg at users.sourceforge.net
Wed Dec 27 09:08:21 UTC 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=136061
okellogg users sourceforge net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From okellogg users sourceforge net 2006-12-27 10:08 -------
SVN commit 616890 by okellogg:
Apply attachment 19019 from Michael Palomas:
> Changed *colour to *color in UMLWidget::saveToXMI, and in loadFromXMI first
> try to retrieve old british spelling to keep backward compatibility, then
> try with the american one.
BUG:136061
M +1 -0 ChangeLog
M +13 -4 umbrello/umlwidget.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #616889:616890
@ -15,6 +15,7 @
* Association line nodes don't drag along with multiply-selected classes (57878)
* Disappearing parameters when editing class properties (114477)
* Umbrello saves too much copies at xmi (135606)
+* XML scheme: mixup of attribute names: *color and *colour (136061)
* Artifacts of a component diagram are wrongly placed in Deployment View folder (137564)
* Incorrect export to SQL (138139)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlwidget.cpp #616889:616890
@ -949,12 +949,13 @
qElement.setAttribute( "y", getY() );
qElement.setAttribute( "width", getWidth() );
qElement.setAttribute( "height", getHeight() );
- qElement.setAttribute( "usesdiagramfillcolour", m_bUsesDiagramFillColour );
- qElement.setAttribute( "usesdiagramusefillcolour", m_bUsesDiagramUseFillColour );
+ // for consistency the following attributes now use american spelling for "color"
+ qElement.setAttribute( "usesdiagramfillcolor", m_bUsesDiagramFillColour );
+ qElement.setAttribute( "usesdiagramusefillcolor", m_bUsesDiagramUseFillColour );
if (m_bUsesDiagramFillColour) {
- qElement.setAttribute( "fillcolour", "none" );
+ qElement.setAttribute( "fillcolor", "none" );
} else {
- qElement.setAttribute( "fillcolour", m_FillColour.name() );
+ qElement.setAttribute( "fillcolor", m_FillColour.name() );
}
qElement.setAttribute("isinstance", m_bIsInstance);
if (!m_instanceName.isEmpty())
@ -972,9 +973,17 @
QString y = qElement.attribute( "y", "0" );
QString h = qElement.attribute( "height", "0" );
QString w = qElement.attribute( "width", "0" );
+ /*
+ For the next three *color attributes, there was a mixup of american and english spelling for "color".
+ So first we need to keep backward compatibility and try to retrieve the *colour attribute.
+ Next we overwrite this value if we find a *color, otherwise the former *colour is kept.
+ */
QString fillColour = qElement.attribute( "fillcolour", "none" );
+ fillColour = qElement.attribute( "fillcolor", fillColour );
QString usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolour", "1" );
+ usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolor", usesDiagramFillColour );
QString usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolour", "1" );
+ usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolor", usesDiagramUseFillColour );
m_nId = STR2ID(id);
More information about the umbrello-devel
mailing list