diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index b158f443e3d9..2827567d89f1 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -39,7 +39,7 @@ enum class DocumentSettingId ADD_FLY_OFFSETS, ADD_VERTICAL_FLY_OFFSETS, - ALLOW_SPACING_WITHOUT_BORDERS, + ALLOW_PADDING_WITHOUT_BORDERS, OLD_NUMBERING, ADD_EXT_LEADING, diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 0055c7da3799..78201b61016a 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -55,7 +55,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) mbAddFlyOffsets(false), mbAddVerticalFlyOffsets(false), - mbAllowSpacingWithoutBorders( false ), + mbAllowPaddingWithoutBorders( false ), mbUseHiResolutionVirtualDevice(true), mbMathBaselineAlignment(false), // default for *old* documents is 'off' mbStylesNoDefault(false), @@ -147,7 +147,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const case DocumentSettingId::TAB_COMPAT: return mbTabCompat; //(n8Dummy1 & DUMMY_TAB_COMPAT); case DocumentSettingId::ADD_FLY_OFFSETS: return mbAddFlyOffsets; //(n8Dummy2 & DUMMY_ADD_FLY_OFFSETS); case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS: return mbAddVerticalFlyOffsets; - case DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS: return mbAllowSpacingWithoutBorders; + case DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS: return mbAllowPaddingWithoutBorders; case DocumentSettingId::ADD_EXT_LEADING: return mbAddExternalLeading; //(n8Dummy2 & DUMMY_ADD_EXTERNAL_LEADING); case DocumentSettingId::USE_VIRTUAL_DEVICE: return mbUseVirtualDevice; //(n8Dummy1 & DUMMY_USE_VIRTUAL_DEVICE); case DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE: return mbUseHiResolutionVirtualDevice; //(n8Dummy2 & DUMMY_USE_HIRES_VIR_DEV); @@ -223,8 +223,8 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS: mbAddVerticalFlyOffsets = value; break; - case DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS: - mbAllowSpacingWithoutBorders = value; + case DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS: + mbAllowPaddingWithoutBorders = value; break; case DocumentSettingId::ADD_EXT_LEADING: mbAddExternalLeading = value; diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx index 3f40a0a207ff..6927f83db287 100644 --- a/sw/source/core/inc/DocumentSettingManager.hxx +++ b/sw/source/core/inc/DocumentSettingManager.hxx @@ -109,7 +109,7 @@ class DocumentSettingManager : bool mbUseVirtualDevice : 1; bool mbAddFlyOffsets : 1; bool mbAddVerticalFlyOffsets : 1; - bool mbAllowSpacingWithoutBorders : 1; // tdf#41542 + bool mbAllowPaddingWithoutBorders : 1; // tdf#41542 bool mbAddExternalLeading : 1; bool mbUseHiResolutionVirtualDevice : 1; bool mbOldLineSpacing : 1; // #i11859# diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index ade02ed453f3..a3635bc95209 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1829,15 +1829,14 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor) m_bCachedJoinedWithPrev = false; m_bCachedJoinedWithNext = false; - bool bAllowSpacingWithoutBorders = false; + bool bAllowPaddingWithoutBorders = false; if( (pConstructor->GetType() & SwFrameType::Fly) && pConstructor->IsLayoutFrame() && pConstructor->GetLower() && pConstructor->GetLower()->IsTextFrame() ) { - const SwFrameFormat* pFormat = static_cast(pConstructor)->GetFormat(); - bAllowSpacingWithoutBorders = pFormat->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS); + bAllowPaddingWithoutBorders = pConstructor->getRootFrame()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS); } - m_bBorderDist = bool(pConstructor->GetType() & SwFrameType::Cell) || bAllowSpacingWithoutBorders; + m_bBorderDist = bool(pConstructor->GetType() & SwFrameType::Cell) || bAllowPaddingWithoutBorders; } SwBorderAttrs::~SwBorderAttrs() diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 9dd13c1b619a..b0fc04ae49ef 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1967,7 +1967,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, sal_Int32 nLineWidth=0; const SfxPoolItem* pItem; bool bFirstLine = true; - const bool bAllowSpacingWithoutBorders = rFormat.getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS); + const bool bAllowPaddingWithoutBorders = rFormat.getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS); if (SfxItemState::SET == rFormat.GetItemState(RES_BOX, true, &pItem)) { static const o3tl::enumarray aExhperProp = @@ -2035,7 +2035,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu( static_cast(pItem)->GetDistance( n ) )); } - else if( bAllowSpacingWithoutBorders ) + else if( bAllowPaddingWithoutBorders ) { rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(static_cast(pItem)->GetDistance( n )) ); } @@ -2046,7 +2046,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, if( bFirstLine ) // no valid line found { rPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 ); - if( !bAllowSpacingWithoutBorders ) + if( !bAllowPaddingWithoutBorders ) { rPropOpt.AddOpt( ESCHER_Prop_dyTextTop, 0 ); rPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, 0 ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f1647b852cc4..d42e3c909b57 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1959,7 +1959,7 @@ void SwWW8ImplReader::ImportDop() m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_MARGIN, true); m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL, true); m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, true); - m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS, true); + m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS, true); // COMPATIBILITY FLAGS END diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index b804f20f5e25..3d6cebefe5f8 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -90,7 +90,7 @@ enum SwDocumentSettingsPropertyHandles HANDLE_IS_LABEL_DOC, HANDLE_IS_ADD_FLY_OFFSET, HANDLE_IS_ADD_VERTICAL_FLY_OFFSET, - HANDLE_ALLOW_SPACING_WITHOUT_BORDERS, + HANDLE_ALLOW_PADDING_WITHOUT_BORDERS, HANDLE_IS_ADD_EXTERNAL_LEADING, HANDLE_OLD_NUMBERING, HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, @@ -167,7 +167,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo() { OUString("IsLabelDocument"), HANDLE_IS_LABEL_DOC, cppu::UnoType::get(), 0}, { OUString("AddFrameOffsets"), HANDLE_IS_ADD_FLY_OFFSET, cppu::UnoType::get(), 0}, { OUString("AddVerticalFrameOffsets"), HANDLE_IS_ADD_VERTICAL_FLY_OFFSET, cppu::UnoType::get(), 0}, - { OUString("AllowSpacingWithoutBorders"), HANDLE_ALLOW_SPACING_WITHOUT_BORDERS, cppu::UnoType::get(), 0}, + { OUString("AllowPaddingWithoutBorders"), HANDLE_ALLOW_PADDING_WITHOUT_BORDERS, cppu::UnoType::get(), 0}, { OUString("AddExternalLeading"), HANDLE_IS_ADD_EXTERNAL_LEADING, cppu::UnoType::get(), 0}, { OUString("UseOldNumbering"), HANDLE_OLD_NUMBERING, cppu::UnoType::get(), 0}, { OUString("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, cppu::UnoType::get(), 0}, @@ -569,10 +569,10 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS, bTmp); } break; - case HANDLE_ALLOW_SPACING_WITHOUT_BORDERS: + case HANDLE_ALLOW_PADDING_WITHOUT_BORDERS: { bool bTmp = *o3tl::doAccess(rValue); - mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS, bTmp); + mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS, bTmp); } break; case HANDLE_IS_ADD_EXTERNAL_LEADING: @@ -1063,9 +1063,9 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS); } break; - case HANDLE_ALLOW_SPACING_WITHOUT_BORDERS: + case HANDLE_ALLOW_PADDING_WITHOUT_BORDERS: { - rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_SPACING_WITHOUT_BORDERS); + rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS); } break; case HANDLE_IS_ADD_EXTERNAL_LEADING: diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 8552fe1de860..c59718f85a2f 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -299,7 +299,7 @@ void WriterFilter::setTargetDocument(const uno::Reference< lang::XComponent >& x xSettings->setPropertyValue("TabOverMargin", uno::makeAny(true)); xSettings->setPropertyValue("TreatSingleColumnBreakAsPageBreak", uno::makeAny(true)); xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(true)); - xSettings->setPropertyValue("AllowSpacingWithoutBorders", uno::makeAny(true)); + xSettings->setPropertyValue("AllowPaddingWithoutBorders", uno::makeAny(true)); } void WriterFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)