summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/msfilter/msdffimp.cxx6
-rw-r--r--include/filter/msfilter/msdffimp.hxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx30
-rw-r--r--sw/source/filter/ww8/ww8par.cxx6
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
5 files changed, 16 insertions, 30 deletions
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 ),
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 581d5586a78b..f56738e0050a 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -228,7 +228,7 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
std::optional<sal_uInt32> nXRelTo;
sal_uInt32 nYAlign;
std::optional<sal_uInt32> nYRelTo;
- sal_uInt32 nLayoutInTableCell;
+ sal_uInt32 nGroupShapeBooleanProperties;
ShapeFlag nFlags;
sal_Int32 nDxTextLeft; ///< distance of text box from surrounding shape
sal_Int32 nDyTextTop;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 113016dc036b..3cb0aebf6bc8 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2402,7 +2402,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec& rRecord, WW8_FS
if (m_nInTable &&
(eHoriRel == text::RelOrientation::FRAME || eHoriRel == text::RelOrientation::CHAR) &&
rFSPA.nwr == 3 &&
- !IsObjectLayoutInTableCell(rRecord.nLayoutInTableCell))
+ !IsObjectLayoutInTableCell(rRecord.nGroupShapeBooleanProperties))
{
eHoriRel = text::RelOrientation::PAGE_PRINT_AREA;
}
@@ -2452,7 +2452,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec& rRecord, WW8_FS
}
// #i84783#
-bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const
+bool SwWW8ImplReader::IsObjectLayoutInTableCell(const sal_uInt32 nGroupShapeBooleanProperties) const
{
bool bIsObjectLayoutInTableCell = false;
@@ -2474,7 +2474,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable
case 0x0000: // version 8 aka Microsoft Word 97
{
bIsObjectLayoutInTableCell = false;
- OSL_ENSURE( nLayoutInTableCell == 0xFFFFFFFF,
+ OSL_ENSURE(nGroupShapeBooleanProperties == 0,
"no explicit object attribute layout in table cell expected." );
}
break;
@@ -2485,23 +2485,11 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable
case 0xC000: // version 14 aka Microsoft Word 2010
case 0xE000: // version 15 aka Microsoft Word 2013
{
- // #i98037#
- // adjustment of conditions needed after deeper analysis of
- // certain test cases.
- if ( nLayoutInTableCell == 0xFFFFFFFF || // no explicit attribute value given
- nLayoutInTableCell == 0x80008000 ||
- ( nLayoutInTableCell & 0x02000000 &&
- !(nLayoutInTableCell & 0x80000000 ) ) )
- {
- bIsObjectLayoutInTableCell = true;
- }
- else
- {
- // Documented in [MS-ODRAW], 2.3.4.44 "Group Shape Boolean Properties".
- bool fUsefLayoutInCell = (nLayoutInTableCell & 0x80000000) >> 31;
- bool fLayoutInCell = (nLayoutInTableCell & 0x8000) >> 15;
- bIsObjectLayoutInTableCell = fUsefLayoutInCell && fLayoutInCell;
- }
+ // Documented in [MS-ODRAW], 2.3.4.44 "Group Shape Boolean Properties".
+ bool fUsefLayoutInCell = (nGroupShapeBooleanProperties & 0x80000000) >> 31;
+ bool fLayoutInCell = (nGroupShapeBooleanProperties & 0x8000) >> 15;
+ // If unspecified, defaults to true
+ bIsObjectLayoutInTableCell = !fUsefLayoutInCell || fLayoutInCell;
}
break;
default:
@@ -2696,7 +2684,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( tools::Long nGrafAnchorCp )
return nullptr;
}
const bool bLayoutInTableCell =
- m_nInTable && IsObjectLayoutInTableCell( pRecord->nLayoutInTableCell );
+ m_nInTable && IsObjectLayoutInTableCell(pRecord->nGroupShapeBooleanProperties);
// #i18732# - Switch on 'follow text flow', if object is laid out
// inside table cell
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 2e764b755ae6..5bcf33eba878 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -626,9 +626,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
maShapeRecords.Current()->nRecLen,
pImpRec->pClientDataBuffer, pImpRec->nClientDataLen );
- // process user (== Winword) defined parameters in 0xF122 record
- // #i84783# - set special value to determine, if property is provided or not.
- pImpRec->nLayoutInTableCell = 0xFFFFFFFF;
+ pImpRec->nGroupShapeBooleanProperties = 0;
if( maShapeRecords.SeekToContent( rSt,
DFF_msofbtUDefProp,
@@ -660,7 +658,7 @@ SdrObject* SwMSDffManager::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
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 4315dbc15716..8d05ea2f3260 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1718,7 +1718,7 @@ private:
// #i84783#
// determine object attribute "Layout in Table Cell"
- bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
+ bool IsObjectLayoutInTableCell(const sal_uInt32 nGroupShapeBooleanProperties) const;
void ReadGlobalTemplateSettings( std::u16string_view sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap );
SwWW8ImplReader(const SwWW8ImplReader &) = delete;
SwWW8ImplReader& operator=(const SwWW8ImplReader&) = delete;