[umbrello] [Bug 56184] Support loading of foreign XMI file formats

Oliver Kellogg bugzilla_noreply at kde.org
Sat Jan 15 15:39:43 GMT 2022


https://bugs.kde.org/show_bug.cgi?id=56184

--- Comment #102 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit d0ba65c0e86a0a5913153b5380aeb2dec1dd2dff by Oliver Kellogg.
Committed on 15/01/2022 at 15:39.
Pushed by okellogg into branch 'master'.

Followup to https://bugs.kde.org/show_bug.cgi?id=56184#c60 : Establish basic
loading of UML2 files from OMG and PapyrusUML

umbrello/umldoc.cpp
- In function encoding(QIODevice&),
  1) in the interest of best effort give a more optimistic result value,
     meaning that if no encoding info is found then return ENC_UNICODE;
  2) reduce code to only test for processing instruction; there is
     little gain in more intricate tests given 1).
- In function loadFromXMI(QIODevice&, short) :
  - Do not return false if no <XMI> or <xmi:XMI> element is found.
    Reason: According to the XMI standard this element is optional.
  - If no <XMI> or <xmi:XMI> element is found then
    - if the tag stripped of XML namespace is "Model" or "Package" then
      call loadUMLObjectsFromXMI(root);
    - otherwise print an error "Unrecognized outer element" and return
      false.

umbrello/umlmodel/attribute.cpp function load1
- In case m_SecondaryId.isEmpty() while-loop :
  - Change the if-statement testing m_SecondaryId.isEmpty() to test
    !m_SecondaryId.isEmpty() with `break' to save an indentation level.
  - If href is non empty then
    - require the xmi:type to contain "PrimitiveTypes";
    - improve extraction of type name from the primitive type XMI ID.
  - More work is needed. Known shortcoming: The attribute or attribute
    type does not reliably show up in the list view, for unknown reason.

M  +158  -196  umbrello/umldoc.cpp
M  +41   -24   umbrello/umlmodel/attribute.cpp

https://invent.kde.org/sdk/umbrello/commit/d0ba65c0e86a0a5913153b5380aeb2dec1dd2dff

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list