To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=116192
                 Issue #|116192
                 Summary|[sw] fixed text fields sometimes get updated
               Component|Word processor
                 Version|DEV300m95
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|mst
             Reported by|mst





------- Additional comments from m...@openoffice.org Tue Dec 21 12:09:40 +0000 
2010 -------
the sw complex test TextPortionEnumeration may fail
like this on any test that contains a text field:

I: <__ROOT__>
I:   <TextField>        content: abc
O: <__ROOT__>
O:   <TextField>        content:
text content differs:   expected: abc   actual:
E.

this happens very rarely, maybe 1 in 100 test runs.

the text fields used by the test are AuthorFields that
are fixed and have a content set before insertion.
the content of the fields should never change;
the test fails because it does change.

some printf output from a failed run:

SwXTextField::setPropertyValue: X(0xad974408) (nil) de
SwXTextField::attachToRange: X(0xad974408) 0xafdaf210 de
SwAuthorField::Copy: 0xafdaf210 1 de -> 0xae5f356c 1 de
SwAuthorField::Copy: 0xae5f356c 1 de -> 0xada14f08 1 de
SwAuthorField::Copy: 0xae5f356c 1 de -> 0xae4bf9cc 1 de
SwAuthorField::Copy: 0xae4bf9cc 1 de -> 0xae4bfe2c 1 de
SwAuthorField::Copy: 0xae4bfe2c 1 de -> 0xae5f324c 1 de
SwAuthorField::Expand: 0xae5f324c 1 de
SwAuthorField::Expand: 0xae5f324c 1 de
SwAuthorField::Expand: 0xae5f324c 1 de
SwDoc::SetFixFields: before: 0xae5f324c de
SwDoc::SetFixFields: after: 0xae5f324c
SwAuthorField::Expand: 0xae5f324c 1
SwAuthorField::QueryValue: 0xae5f324c

apparently SwDoc::SetFixFields is the guilty party. 
it sets the expansion of the field to the empty string.

setting a breakpoint on SetFixFields yields this:

(gdb) bt 10
#0  SwDoc::SetFixFields (this=0xb325b514, bOnlyTimeDate=false,
    pNewDateTime=0x0)
    at sw/source/core/doc/docfld.cxx:2080
#1  0xaf0e8e82 in SwEditShell::SetFixFields (this=0xb22e61a8,
    bOnlyTimeDate=0 '\000', pNewDateTime=0x0)
    at sw/source/core/edit/edfld.cxx:539
#2  0xaf877e33 in SwModule::Notify (this=0xb2e38b78, rHint=...)
    at sw/source/ui/app/apphdl.cxx:720
#3  0x00b1ebff in SfxBroadcaster::Broadcast(SfxHint const&) ()
   from
OO_m95_DEV300_li/opt/openoffice.org3/program/../basis-link/program/libsvlli.so
#4  0x05917423 in ?? ()
   from
OO_m95_DEV300_li/opt/openoffice.org3/program/../basis-link/program/libsfxli.so
#5  0x059174c2 in ?? ()
   from
OO_m95_DEV300_li/opt/openoffice.org3/program/../basis-link/program/libsfxli.so
#6  0x012224db in ?? ()
   from
OO_m95_DEV300_li/opt/openoffice.org3/program/../basis-link/program/libvclli.so
#7  0x0123aca3 in Timer::Timeout() ()
   from
OO_m95_DEV300_li/opt/openoffice.org3/program/../basis-link/program/libvclli.so
#8  0x0123b042 in Timer::ImplTimerCallbackProc() ()
   from
OO_m95_DEV300_li/opt/openoffice.org3/program/../basis-link/program/libvclli.so


so this is due to some timeout that sends a event.
SwModule::Notify does this:

    case SFX_EVENT_CREATEDOC:
        // alle FIX-Date/Time Felder auf akt. setzen
        if( pWrtSh )
        {
            SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(), pUpdateDocItem,
SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
            sal_Bool bUpdateFields = sal_True;
            if( pUpdateDocItem &&  pUpdateDocItem->GetValue() ==
document::UpdateDocMode::NO_UPDATE)
                bUpdateFields = sal_False;
            pWrtSh->SetFixFields();         // HERE!
            if(bUpdateFields)

this is apparently sometimes called after content has
already been inserted via the API.
doing this from a timer does not seem to make much sense to me.

---------------------------------------------------------------------
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: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to