Issue 99218

Summary: Changing shape text by API does not set doc modified
Product: General Reporter: bmarcelly <marcelly.bernard>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: Armin.Le.Grand, elish, issues, jsc, thierry.munoz
Version: current   
Target Milestone: ---   
Hardware: PC   
OS: Windows, all   
Issue Type: DEFECT Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---
Attachments:
Description Flags
Run the macro to change the text in the rectangle. none

Description bmarcelly 2009-02-14 10:33:06 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.
Comment 1 bmarcelly 2009-02-14 10:33:55 UTC
Created attachment 60158 [details]
Run the macro to change the text in the rectangle.
Comment 2 bmarcelly 2009-02-14 10:37:16 UTC
setting version to Current (OOO310m1 does not yet exist)
Comment 3 thorsten.martens 2009-02-16 13:55:29 UTC
TM->JSK: please have a look. thanks !
Comment 4 hans_werner67 2011-03-28 11:53:46 UTC
Assign to new default-assignee
Comment 5 Edwin Sharp 2014-01-31 09:24:06 UTC
Confirmed with
AOO410m1(Build:9750)  -  Rev. 1562493
Rev.1562493
Win 7
Comment 6 Armin Le Grand 2014-02-01 00:48:49 UTC
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...
Comment 7 Armin Le Grand 2014-02-01 00:50:13 UTC
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++