From 19a5e50955ecc8da7ff5dbdfb9f47352d851ee1d Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 8 Feb 2022 08:06:52 +0200 Subject: related tdf#79186 filter: value is more than just LayoutInCell nGroupShapeBooleanProperties contains 16 shape properties and 16 flags to indicate whether they are to be used or not. Up till now, only fLayoutInCell has been used by LO, but it handles far more than that, so lets change the code (now that we have the documentation for it) to make it clear that this could be useful for further compatibility fixes. There is no need to determine whether the setting has been provided or not - since a zero default indicates everything in this bit-set should be ignored. The naming and the if clause in ww8graf.cxx suggests that reverse engineering didn't really grasp how this worked, so I took the liberty of removing all of that awkwardness, and verified that at least several associated document from the OOo Apache bugtracker still worked. =============================================================== https://docs.microsoft.com/en-us/openspecs/office_file_formats /ms-odraw/a0ae6aa5-16e4-4550-87a2-b8ca180c7fd7 fLayoutInCell (1 bit): A bit that specifies whether this shape is displayed inside a table cell. If fUsefLayoutInCell equals 0x0, this value MUST be ignored. The default value for this property is 0x1. Change-Id: I82f80123a7419a83737b796f253406576732b6c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129657 Tested-by: Jenkins Reviewed-by: Justin Luth --- filter/source/msfilter/msdffimp.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'filter') diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 8832617a4e58..a0ecad074ac6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5158,7 +5158,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, case 0x0392: pImpRec->nYRelTo = nUDData; break; - case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break; + case 0x03BF: pImpRec->nGroupShapeBooleanProperties = nUDData; break; case 0x0393: // This seems to correspond to o:hrpct from .docx (even including // the difference that it's in 0.1% even though the .docx spec @@ -7413,7 +7413,7 @@ SvxMSDffImportRec::SvxMSDffImportRec() nClientDataLen( 0 ), nXAlign( 0 ), // position n cm from left nYAlign( 0 ), // position n cm below - nLayoutInTableCell( 0 ), // element is laid out in table cell + nGroupShapeBooleanProperties(0), // 16 settings: LayoutInCell/AllowOverlap/BehindDocument... nFlags( ShapeFlag::NONE ), nDxTextLeft( 144 ), nDyTextTop( 72 ), @@ -7450,7 +7450,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy) nXRelTo( rCopy.nXRelTo ), nYAlign( rCopy.nYAlign ), nYRelTo( rCopy.nYRelTo ), - nLayoutInTableCell( rCopy.nLayoutInTableCell ), + nGroupShapeBooleanProperties(rCopy.nGroupShapeBooleanProperties), nFlags( rCopy.nFlags ), nDxTextLeft( rCopy.nDxTextLeft ), nDyTextTop( rCopy.nDyTextTop ), -- cgit