https://issues.apache.org/ooo/show_bug.cgi?id=120064

          Priority: P3
            Bug ID: 120064
          Assignee: [email protected]
           Summary: Properties and attributes conflict each other on
                    tabpage model
          Severity: normal
        Issue Type: DEFECT
    Classification: Code
                OS: All
          Reporter: [email protected]
          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.

Reply via email to