Apache OpenOffice (AOO) Bugzilla – Issue 99218
Changing shape text by API does not set doc modified
Last modified: 2014-02-01 00:50:13 UTC
Found on OOO310m1 (Build 9384) Next attachment is a document containing a rectangle shape and a small macro. Running the macro changes the text in the shape. However, the "Save" button remains deactivated. The user can close the document, no warning message will appear. Problem found in Calc and Draw documents, so probably general. Regression from 2.4.2. In 3.0.0/3.0.1 changing the text did not update the screen, this has been corrected.
Created attachment 60158 [details] Run the macro to change the text in the rectangle.
setting version to Current (OOO310m1 does not yet exist)
TM->JSK: please have a look. thanks !
Assign to new default-assignee
Confirmed with AOO410m1(Build:9750) - Rev. 1562493 Rev.1562493 Win 7
Checked the code and as I can see currently this is on purpose not setting the model to changed, but only changes the object and graphically updates it. I do not exactly know if changes from macros and thus from the UNO API are intended to set the model to changed, especially as this can be done via UNO API, too - and thus under the macros control. Vice versa would be difficult - many UNO API implementations would have to set back the model to unchanged (not sure if this is possible). Adding a UNO API guru on CC...
To make things easier to find next time, the stack shown to set the text via the macro is > svxcore.dll!SdrObject::ActionChanged() Line 373 C++ svxcore.dll!SdrTextObj::NbcSetOutlinerParaObjectForText(OutlinerParaObject * pTextObject, SdrText * pText) Line 1517 C++ svxcore.dll!SvxTextEditSourceImpl::UpdateData() Line 896 C++ svxcore.dll!SvxTextEditSource::UpdateData() Line 1112 C++ editeng.dll!5670226d() [Frames below may be incorrect and/or missing, no symbols loaded for editeng.dll] svxcore.dll!SvxShapeText::setString(const rtl::OUString & aString) Line 4355 + 0xe bytes C++ sc.dll!ScShapeObj::setString() + 0x3e bytes C++