diff --git a/dictionaries b/dictionaries index 3380b51..d8738db 160000 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 3380b51b42480693d8b3ac97f08c6568a4f73201 +Subproject commit d8738db715233dbd83bff56aa166ae0bdf0a8e18 diff --git a/helpcontent2 b/helpcontent2 index 034f593..78c7e1c 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 034f593c7a63283b361349b152e598ea2ec51b90 +Subproject commit 78c7e1c24aacacfa69c8de3644b154e98d858f7e diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 0296a18..21b9640 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -355,15 +355,19 @@ Rectangle SwTextBoxHelper::getTextRectangle(SwFrameFormat* pShape, bool bAbsolut xLockable->setActionLocks(nLocks); } +SAL_WARN("DBG","::getTextRectangle if not absolute["<GetSnapRect().Center()); Size aSize(pCustomShape->GetLogicRect().GetSize()); +SAL_WARN("DBG"," eventually returning rect["<Which(); + bool bAdjustedH = false; + bool bAdjustedV = false; + int DBGcounter=0; do { +SAL_WARN("DBG","["<<++DBGcounter<<"]::syncFlyFrameAttr for current item nWhich["<GetFrameSize()); Rectangle aRect = getTextRectangle(&rShape, /*bAbsolute=*/false); +SAL_WARN("DBG"," ["<getPropertyMap().getByName( rPropertyName ); +if( rPropertyName == "LeftMargin" || rPropertyName == "RightMargin" || rPropertyName == "TopMargin" || rPropertyName == "BottomMargin" ) + SAL_WARN("DBG","::setPropertyValue setting margins ["<& xGraphicObjectProperties) const { +SAL_WARN("DBG","setting textbox margins L["<setPropertyValue(getPropertyName( PROP_LEFT_MARGIN ), uno::makeAny(nLeftMargin)); xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_RIGHT_MARGIN ), uno::makeAny(nRightMargin)); xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TOP_MARGIN ), uno::makeAny(nTopMargin)); @@ -546,18 +547,22 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) break; case NS_ooxml::LN_CT_EffectExtent_l: m_pImpl->m_oEffectExtentLeft = nIntValue; +SAL_WARN("DBG","::lcl_attribute nLeftMargin["<nLeftMargin<<"] adjusted here by +["<nLeftMargin += oox::drawingml::convertEmuToHmm(nIntValue); break; case NS_ooxml::LN_CT_EffectExtent_t: m_pImpl->m_oEffectExtentTop = nIntValue; +SAL_WARN("DBG","::lcl_attribute nTopMargin["<nTopMargin<<"] adjusted here by +["<nTopMargin += oox::drawingml::convertEmuToHmm(nIntValue); break; case NS_ooxml::LN_CT_EffectExtent_r: m_pImpl->m_oEffectExtentRight = nIntValue; +SAL_WARN("DBG","::lcl_attribute nRightMargin["<nRightMargin<<"] adjusted here by +["<nRightMargin += oox::drawingml::convertEmuToHmm(nIntValue); break; case NS_ooxml::LN_CT_EffectExtent_b: m_pImpl->m_oEffectExtentBottom = nIntValue; +SAL_WARN("DBG","::lcl_attribute nBotMargin["<nBottomMargin<<"] adjusted here by +["<nBottomMargin += oox::drawingml::convertEmuToHmm(nIntValue); break; case NS_ooxml::LN_CT_NonVisualDrawingProps_id:// 90650; @@ -784,7 +789,9 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) if (SdrObject* pShape = GetSdrObjectFromXShape(m_xShape)) nRotation = pShape->GetRotateAngle(); } +SAL_WARN("DBG","::lcl_attribute LN_shape BEFORE m_xShape->setSize size["<setSize(aSize); +SAL_WARN("DBG","::lcl_attribute LN_shape AFTER m_xShape->setSize size["<setPropertyValue("RotateAngle", uno::makeAny(nRotation)); @@ -841,6 +848,8 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) m_pImpl->applyRelativePosition(xShapeProps, /*bRelativeOnly=*/true); xShapeProps->setPropertyValue("SurroundContour", uno::makeAny(m_pImpl->bContour)); +SAL_WARN("DBG","IMPORTANT!! applyMargins affects only the frame (both left and right), not textbox"); +//m_pImpl->nRightMargin=0; m_pImpl->nLeftMargin=0; m_pImpl->nTopMargin=0; m_pImpl->nBottomMargin=0; m_pImpl->applyMargins(xShapeProps); bool bOpaque = m_pImpl->bOpaque && !m_pImpl->rDomainMapper.IsInHeaderFooter(); xShapeProps->setPropertyValue("Opaque", uno::makeAny(bOpaque)); @@ -946,6 +955,7 @@ uno::Reference GraphicImport::GetGraphicObject() void GraphicImport::ProcessShapeOptions(Value& rValue) { sal_Int32 nIntValue = rValue.getInt(); +SAL_WARN("DBG","::ProcessShapeOptions sets margins ["<nShapeOptionType ) { case NS_ooxml::LN_CT_Anchor_distL: @@ -1044,8 +1054,10 @@ void GraphicImport::lcl_sprm(Sprm& rSprm) m_pImpl->nHoriRelation = pHandler->relation(); m_pImpl->nHoriOrient = pHandler->orientation(); m_pImpl->nLeftPosition = pHandler->position(); +SAL_WARN("DBG","::lcl_sprm NotSimplePos -setting Hori relation["<nHoriRelation<<"]/orient["<nHoriOrient<<"] position["<nLeftPosition<<"]"); if (m_pImpl->nHoriRelation == text::RelOrientation::PAGE_FRAME && m_pImpl->nHoriOrient == text::HoriOrientation::RIGHT) { +SAL_WARN("DBG","some kind of right alignment adjustment"); // If the shape is relative from page and aligned to // right, then set the relation to right and clear the // orientation, that provides the same visual result as @@ -1070,6 +1082,7 @@ void GraphicImport::lcl_sprm(Sprm& rSprm) m_pImpl->nVertRelation = pHandler->relation(); m_pImpl->nVertOrient = pHandler->orientation(); m_pImpl->nTopPosition = pHandler->position(); +SAL_WARN("DBG",":lcl_sprm NotSimplePos -setting Vert relation["<nVertRelation<<"]/orient["<nVertOrient<<"] position["<nTopPosition<<"]"); } } }