To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=79261
                 Issue #|79261
                 Summary|Setting of "DateMin" of a date control changes the vis
                        |ible Value but not the internal value
               Component|api
                 Version|OOo 2.2
                Platform|All
                     URL|
              OS/Version|All
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|definition
             Assigned to|jsc
             Reported by|mroe





------- Additional comments from [EMAIL PROTECTED] Thu Jul  5 11:47:56 +0000 
2007 -------
A little sample code:

Dim oYear_Format As Object
Dim oDate_Date As Object

Sub ooomr_startDialog()
        Dim oDialog As Object
        Dim oDialogModel As Object

        oDialog = LoadDialog( "Standard", "TestDlg", DialogLibraries )
        oDate_Date = oDialog.getControl( "Date_Date" )
        oDate_Date.setText( "01/01/2000" )
        oYear_Format = oDialog.getControl( "Year_Format" )
        oYear_Format.setText( "2000" )

        oDialog.execute()
        oDialog.dispose()
End Sub

Sub ooomr_YearChanged()
        Dim sYear As String
        Dim lDate As Long
        Dim sString As String
        sYear = oYear_Format.getText()
        If sYear <> "" Then
                lDate = oYear_Format.getModel().getPropertyValue( 
"EffectiveValue" )
                lDate = ( lDate * 10000 ) + 0101
                oDate_Date.getModel().setPropertyValue( "DateMin", lDate )
        Else
                oDate_Date.getModel().setPropertyValue( "DateMin", 20000101 )
        End If
End Sub

If DateMin > actual date of oDate_Date then the visible date will corrected to
date >= DateMin. But the internal values of the date returns furthermore the old
values.

See attached sample document.

mroe

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to