incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120064] New: Properties and attributes conflict each other on tabpage model
Date Sat, 23 Jun 2012 07:31:04 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120064

          Priority: P3
            Bug ID: 120064
          Assignee: ooo-issues@incubator.apache.org
           Summary: Properties and attributes conflict each other on
                    tabpage model
          Severity: normal
        Issue Type: DEFECT
    Classification: Code
                OS: All
          Reporter: hanya.runo@gmail.com
          Hardware: All
            Status: CONFIRMED
           Version: AOO 3.4.0
         Component: code
           Product: framework

Tabpage, instance of UnoControlTabPageModel class implements
css::awt::tab::XTabPageModel interface 
having some attributes. 
And the class declares properties undefined in IDL: Title, ToolTip, ImageURL
and Enabled.
These property names conflict with attribute names of XTabPageModel interface. 

Some invocation base bride prefer to set/get value as property on objects. 
Properties can be set/get by css::beans::XPropertySet interface but 
attributes can not, except for using reflection mechanism.

When tabpage is inserted to the tabpage container, title, image url and other 
values are taken by attributes of XTabPageModel interface declared by parent
class. But properties are declared in the child class.


Sub TabPageTest2
  DialogLibraries.loadLibrary("Standard")
  d = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
  dialogModel = d.getModel()

  tabContainerModel =
dialogModel.createInstance("com.sun.star.awt.tab.UnoControlTabPageContainerModel")
  tabContainerModel.setPropertyValues(_
    Array("Height", "PositionX", "PositionY", "Width"), Array(100, 5, 5, 100))
  dialogModel.insertByName("tabpages", tabContainerModel)

  tabPageModel = tabContainerModel.createTabPage(1)
  tabPageModel.Title = "Bar"
  tabContainerModel.insertByIndex(0, tabPageModel)

  tabPageModel = tabContainerModel.createTabPage(2)
  tabPageModel.Title = "Foo"
  tabPageModel.ImageURL = "file:///home/user/icons/add.png"
  tabPageModel.Tooltip = "FOO"
  tabContainerModel.insertByIndex(1, tabPageModel)

  d.execute()
  d.dispose()
End Sub

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

Mime
View raw message