Apache OpenOffice (AOO) Bugzilla – Issue 116001
TextFitToSize item can be optimized
Last modified: 2017-05-20 10:44:12 UTC
When saving the SdrTextFitToSizeTypeItem to XML the enum values PROPORTIONAL, ALLLINES and RESIZEATTR are stored as draw:fit-to-size = TRUE. When Reloading such document, only the enum values NONE and PROPORTIONAL are used and set. So it is obvious that this item can and should be optimized: - TextFitToSize at the api should be changed to type bool - The SdrTextFitToSizeTypeItem itsef at the core should be changed to type bool - Each code which takes care of ALLLINES and RESIZEATTR can be removed
Deleting this alignments would make it impossible to import Microsoft Word documents like the attached one.
Created attachment 75286 [details] Document with stretch WordArt and with justify WordArt
AW->SJ: Please evaluate if this is true. If Yes, it needs to be solved by CustomShapes.
We will have no problems. The TextFitToSizeTypeItem can be optimized as I said. The indicated problems from Regina have to be solved otherwise. TextFitToSizeTypeItem != NONE has to display the WordArt stretched -> So it doesn't matter if TextFitToSizeType is an enum or bool. Justified WordArt is an unimplemented feature, this has to be fixed in svx/source/customshapes/enhancedcustomshapefontwork.cxx in GetFontWorkOutline, there SDRTEXTHORZADJUST_BLOCK needs to be supported. At the moment BLOCK is left aligned, which is a bug.
ALG: Checked some aspects; Indeed the property is already a bool in ODF, so no problems there: Also checked all usages, these are indeed all 'booleanized'. Api usage is an enum now, but should be changed to bool, too. Checking some more aspects...
ALG: Adapted all usages to bool, removed unused types, complete build and install, checked load/save of samples using FitToSize, works well. Trying to find more unused parts...
ALG: Found and removed some unused strings, corrected one more place to boolean. Rebuild, works well. Checkin of changes.
"alg" committed SVN revision 1366087 into trunk: #116001# TextToFitSize item/property optimized to boolean
ALG: Done.
The enum TextFitToSizeType belongs to a published API and is not yet marked as [DEPRECATED]. Wouldn't it be the correct way to first mark it as [DEPRECATED] with a comment what is to be used instead?
ALG: Reopening, missing adaptions in binfilter and qadevOOo.
Created attachment 78784 [details] Missing adaptions in binfilter ALG: Added missing adaptions in binfilter for reference
"alg" committed SVN revision 1367187 into trunk: #116001# Reverted revision 1366087
ALG: Reverted 1366087, complete test build. Comitted as revision 1367187. Sorry again for the inconveniecnes. This task may be reactivated for a major release (if wanted at all), all needed changes would be here.
Adjusted issue status to the fact that the commit has been reverted.
Reset the assignee to the default "issues@openoffice.apache.org".