drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 16 + framework/source/layoutmanager/layoutmanager.cxx | 1 svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 23 ++ svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 12 + sw/inc/IDocumentContentOperations.hxx | 2 sw/inc/doc.hxx | 5 sw/source/core/doc/doclay.cxx | 101 +++++------ sw/source/core/frmedt/fecopy.cxx | 7 sw/source/core/frmedt/fefly1.cxx | 2 sw/source/core/unocore/unodraw.cxx | 2 sw/source/filter/html/htmldraw.cxx | 2 sw/source/filter/rtf/swparrtf.cxx | 4 sw/source/filter/ww8/ww8graf.cxx | 4 sw/source/filter/ww8/ww8graf2.cxx | 2 sw/source/filter/ww8/ww8par4.cxx | 2 vcl/aqua/source/gdi/ctlayout.cxx | 62 ++---- 16 files changed, 147 insertions(+), 100 deletions(-)
New commits: commit 0a0bcaaec8c80bce3bd83c2e3d3aa1b0001bd91f Author: Armin Le Grand <a...@apache.org> Date: Tue Feb 18 16:37:20 2014 +0000 i124073 choose a more compiler-independent way of construction diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index 7bbe180..5803670 100755 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -759,9 +759,23 @@ namespace drawinglayer basegfx::B2DPolygon aMaskPolygon(basegfx::tools::createUnitPolygon()); aMaskPolygon.transform(rTransform); - aRetval[0] = new MaskPrimitive2D( + // #124073# the clde below was compiler-dependent. Normally, + // a compiler will + // - alloc mem + // - ececute the constructor + // - do the assignment + // but the mac compiler does alloc-assign-constructor, thus + // modifying aRetval[0] befure aRetval gets used in the + // constructor. This creates an endless loop in the primitive + // stack. Thus do it the safe way. + // + // aRetval[0] = new MaskPrimitive2D( + // basegfx::B2DPolyPolygon(aMaskPolygon), + // aRetval); + MaskPrimitive2D* pMaskPrimitive2D = new MaskPrimitive2D( basegfx::B2DPolyPolygon(aMaskPolygon), aRetval); + aRetval[0] = pMaskPrimitive2D; } #ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE } commit be899f92bafeac8dbb02732de5249c7fa7a1f08d Author: Herbert Dürr <h...@apache.org> Date: Tue Feb 18 15:32:46 2014 +0000 #i124233# fix CoreText justification of text with trailing spaces the fix works also for EditEngine by ignoring Writer's halfspace magic. TODO: replace that halfspace magic with a generic solution. diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx index 11df073..3ec11c9 100644 --- a/vcl/aqua/source/gdi/ctlayout.cxx +++ b/vcl/aqua/source/gdi/ctlayout.cxx @@ -72,7 +72,6 @@ private: // cached details about the resulting layout // mutable members since these details are all lazy initialized mutable double mfCachedWidth; // cached value of resulting typographical width - mutable double mfTrailingSpaceWidth; // in Pixels // x-offset relative to layout origin // currently only used in RTL-layouts @@ -89,7 +88,6 @@ CTLayout::CTLayout( const CTTextStyle* pTextStyle ) , mnTrailingSpaces( 0 ) , mfFontScale( pTextStyle->mfFontScale ) , mfCachedWidth( -1 ) -, mfTrailingSpaceWidth( 0 ) , mnBaseAdv( 0 ) { CFRetain( mpTextStyle->GetStyleDict() ); @@ -146,60 +144,49 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs ) return; const DynCoreTextSyms& rCT = DynCoreTextSyms::get(); - // CoreText fills trailing space during justification so we have to - // take that into account when requesting CT to justify something - mfTrailingSpaceWidth = rCT.LineGetTrailingWhitespaceWidth( mpCTLine ); - const int nTrailingSpaceWidth = rint( mfFontScale * mfTrailingSpaceWidth ); - int nOrigWidth = GetTextWidth(); int nPixelWidth = rArgs.mnLayoutWidth; - if( nPixelWidth ) - { - nPixelWidth -= nTrailingSpaceWidth; - if( nPixelWidth <= 0) - return; - } - else if( rArgs.mpDXArray ) + if( rArgs.mpDXArray ) { // for now we are only interested in the layout width // TODO: use all mpDXArray elements for layouting - nPixelWidth = rArgs.mpDXArray[ mnCharCount - 1 - mnTrailingSpaces ]; + nPixelWidth = rArgs.mpDXArray[ mnCharCount-1 ]; } // short-circuit when justifying an all-whitespace string if( mnTrailingSpaces >= mnCharCount) { - mfCachedWidth = mfTrailingSpaceWidth = nPixelWidth / mfFontScale; + mfCachedWidth = nPixelWidth / mfFontScale; return; } - // in RTL-layouts trailing spaces are leftmost - // TODO: use BiDi-algorithm to thoroughly check this assumption - if( rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL) - mnBaseAdv = nTrailingSpaceWidth; - // return early if there is nothing to do if( nPixelWidth <= 0 ) return; // HACK: justification requests which change the width by just one pixel are probably // #i86038# introduced by lossy conversions between integer based coordinate system + const int nOrigWidth = GetTextWidth(); if( (nOrigWidth >= nPixelWidth-1) && (nOrigWidth <= nPixelWidth+1) ) return; // if the text to be justified has whitespace in it then // - Writer goes crazy with its HalfSpace magic - // - LayoutEngine handles spaces specially (in particular at the text start or end) + // - CoreText handles spaces specially (in particular at the text end) if( mnTrailingSpaces ) { - // adjust for Writer's SwFntObj::DrawText() Halfspace magic at the text end - std::vector<sal_Int32> aOrigDXAry; - aOrigDXAry.resize( mnCharCount); - FillDXArray( &aOrigDXAry[0] ); - int nLastCharSpace = rArgs.mpDXArray[ mnCharCount-1-mnTrailingSpaces ] - - aOrigDXAry[ mnCharCount-1-mnTrailingSpaces ]; - nPixelWidth -= nLastCharSpace; - if( nPixelWidth < 0 ) + int nTrailingSpaceWidth = 0; + if( rArgs.mpDXArray) { + const int nFullPixWidth = nPixelWidth; + nPixelWidth = rArgs.mpDXArray[ mnCharCount-1-mnTrailingSpaces ]; + nTrailingSpaceWidth = nFullPixWidth - nPixelWidth; + } else { + const double fTrailingSpaceWidth = rCT.LineGetTrailingWhitespaceWidth( mpCTLine ); + nTrailingSpaceWidth = rint(fTrailingSpaceWidth); + } + nPixelWidth -= nTrailingSpaceWidth; + if( nPixelWidth <= 0 ) return; + // recreate the CoreText line layout without trailing spaces CFRelease( mpCTLine ); CFStringRef aCFText = CFStringCreateWithCharactersNoCopy( NULL, rArgs.mpStr + mnMinCharPos, @@ -208,9 +195,15 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs ) mpCTLine = CTLineCreateWithAttributedString( pAttrStr ); CFRelease( aCFText); CFRelease( pAttrStr ); + + // in RTL-layouts trailing spaces are leftmost + // TODO: use BiDi-algorithm to thoroughly check this assumption + if( rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL) + mnBaseAdv = nTrailingSpaceWidth; } - CTLineRef pNewCTLine = rCT.LineCreateJustifiedLine( mpCTLine, 1.0, nPixelWidth / mfFontScale ); + const double fAdjustedWidth = nPixelWidth / mfFontScale; + CTLineRef pNewCTLine = rCT.LineCreateJustifiedLine( mpCTLine, 1.0, fAdjustedWidth ); if( !pNewCTLine ) { // CTLineCreateJustifiedLine can and does fail // handle failure by keeping the unjustified layout // TODO: a better solution such as @@ -221,8 +214,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs ) } CFRelease( mpCTLine ); mpCTLine = pNewCTLine; - mfCachedWidth = -1; // TODO: can we set it directly to target width we requested? For now we re-measure - mfTrailingSpaceWidth = 0; + mfCachedWidth = fAdjustedWidth; } // ----------------------------------------------------------------------- @@ -404,8 +396,8 @@ long CTLayout::FillDXArray( sal_Int32* pDXArray ) const CTRunRef pGlyphRun = (CTRunRef)CFArrayGetValueAtIndex( aGlyphRuns, nRunIndex ); const CFIndex nGlyphCount = CTRunGetGlyphCount( pGlyphRun ); const CFRange aFullRange = CFRangeMake( 0, nGlyphCount ); - aSizeVec.reserve( nGlyphCount ); - aIndexVec.reserve( nGlyphCount ); + aSizeVec.resize( nGlyphCount ); + aIndexVec.resize( nGlyphCount ); CTRunGetAdvances( pGlyphRun, aFullRange, &aSizeVec[0] ); CTRunGetStringIndices( pGlyphRun, aFullRange, &aIndexVec[0] ); for( int i = 0; i != nGlyphCount; ++i ) { commit 7e5783030c82f8ec87b88899869e9152cf5c3271 Author: Andre Fischer <a...@apache.org> Date: Tue Feb 18 14:17:32 2014 +0000 124216: Detect changes of the UI scale. diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index e59b562..a329fef 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -996,6 +996,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( case SID_ATTR_METRIC: MetricState( eState, pState ); + UpdateUIScale(); break; default: @@ -1350,6 +1351,28 @@ void PosSizePropertyPanel::DisableControls() } + + +void PosSizePropertyPanel::UpdateUIScale (void) +{ + const Fraction aUIScale (mpView->GetModel()->GetUIScale()); + if (maUIScale != aUIScale) + { + // UI scale has changed. + + // Remember the new UI scale. + maUIScale = aUIScale; + + // The content of the position and size boxes is only updated when item changes are notified. + // Request such notifications without changing the actual item values. + GetBindings()->Invalidate(SID_ATTR_TRANSFORM_POS_X, sal_True, sal_False); + GetBindings()->Invalidate(SID_ATTR_TRANSFORM_POS_Y, sal_True, sal_False); + GetBindings()->Invalidate(SID_ATTR_TRANSFORM_WIDTH, sal_True, sal_False); + GetBindings()->Invalidate(SID_ATTR_TRANSFORM_HEIGHT, sal_True, sal_False); + } +} + + } } // end of namespace svx::sidebar // eof diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 1a5412e..095c8a1 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -184,6 +184,18 @@ private: void DisableControls(); void AdaptWidthHeightScalePosition(bool bOriginal); void AdaptAngleFlipDialPosition(bool bOriginal); + + /** Check if the UI scale has changed and handle such a change. + UI scale is an SD only feature. The UI scale is represented by items + ATTR_OPTIONS_SCALE_X and + ATTR_OPTIONS_SCALE_Y. + As we have no direct access (there is no dependency of svx on sd) we have to + use a small trick (aka hack): + a) call this method whenever a change of the metric item is notified, + b) check if the UI scale has changed (strangely, the UI scale value is available at the SdrModel. + c) invalidate the items for position and size to trigger notifications of their current values. + */ + void UpdateUIScale (void); }; commit 28c0c081d07e5a49ccd238e7f4e882347ab3690c Author: Oliver-Rainer Wittmann <o...@apache.org> Date: Tue Feb 18 11:47:13 2014 +0000 124188: <SwDoc::InsertDrawObj(..)> - assure correct insertion of text attribute for as-character anchored drawing objects Thx to Andre for his deep analysis. diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index e82b3f8..b6fa207 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -138,7 +138,7 @@ public: /** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel angemeldet sein. */ - virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0; + virtual SwDrawFrmFmt* InsertDrawObj( const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet& rFlyAttrSet ) = 0; /** Einfuegen von OLE-Objecten. */ diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index d18e58b..38802a3 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -891,7 +891,10 @@ public: const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*); virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*); - virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*); + virtual SwDrawFrmFmt* InsertDrawObj( + const SwPaM &rRg, + SdrObject& rDrawObj, + const SfxItemSet& rFlyAttrSet ); virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index ba7e59b..577b367 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -923,57 +923,49 @@ if( GetIDocumentUndoRedo().DoesUndo() ) } - //Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel - // angemeldet sein. -SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg, - SdrObject& rDrawObj, - const SfxItemSet* pFlyAttrSet, - SwFrmFmt* pDefFmt ) +// Insert drawing object, which has to be already inserted in the DrawModel +SwDrawFrmFmt* SwDoc::InsertDrawObj( + const SwPaM &rRg, + SdrObject& rDrawObj, + const SfxItemSet& rFlyAttrSet ) { - SwDrawFrmFmt *pFmt = MakeDrawFrmFmt( aEmptyStr, - pDefFmt ? pDefFmt : GetDfltFrmFmt() ); + SwDrawFrmFmt* pFmt = MakeDrawFrmFmt( aEmptyStr, GetDfltFrmFmt() ); const SwFmtAnchor* pAnchor = 0; - if( pFlyAttrSet ) - { - pFlyAttrSet->GetItemState( RES_ANCHOR, sal_False, - (const SfxPoolItem**)&pAnchor ); - pFmt->SetFmtAttr( *pFlyAttrSet ); - } - - RndStdIds eAnchorId = pAnchor ? pAnchor->GetAnchorId() - : pFmt->GetAnchor().GetAnchorId(); + rFlyAttrSet.GetItemState( RES_ANCHOR, sal_False, (const SfxPoolItem**) &pAnchor ); + pFmt->SetFmtAttr( rFlyAttrSet ); - // Anker noch nicht gesetzt ? - // DrawObjecte duerfen niemals in Kopf-/Fusszeilen landen. + RndStdIds eAnchorId = pAnchor != NULL ? pAnchor->GetAnchorId() : pFmt->GetAnchor().GetAnchorId(); const bool bIsAtCntnt = (FLY_AT_PAGE != eAnchorId); const SwNodeIndex* pChkIdx = 0; - if( !pAnchor ) + if ( pAnchor == NULL ) { pChkIdx = &rRg.GetPoint()->nNode; } - else if( bIsAtCntnt ) + else if ( bIsAtCntnt ) { - pChkIdx = pAnchor->GetCntntAnchor() - ? &pAnchor->GetCntntAnchor()->nNode - : &rRg.GetPoint()->nNode; + pChkIdx = + pAnchor->GetCntntAnchor() ? &pAnchor->GetCntntAnchor()->nNode : &rRg.GetPoint()->nNode; } - // OD 24.06.2003 #108784# - allow drawing objects in header/footer, but - // control objects aren't allowed in header/footer. - if( pChkIdx && - ::CheckControlLayer( &rDrawObj ) && - IsInHeaderFooter( *pChkIdx ) ) + // allow drawing objects in header/footer, but control objects aren't allowed in header/footer. + if( pChkIdx != NULL + && ::CheckControlLayer( &rDrawObj ) + && IsInHeaderFooter( *pChkIdx ) ) { - pFmt->SetFmtAttr( SwFmtAnchor( eAnchorId = FLY_AT_PAGE ) ); + // apply at-page anchor format + eAnchorId = FLY_AT_PAGE; + pFmt->SetFmtAttr( SwFmtAnchor( eAnchorId ) ); } - else if( !pAnchor || (bIsAtCntnt && !pAnchor->GetCntntAnchor() )) + else if( pAnchor == NULL + || ( bIsAtCntnt + && pAnchor->GetCntntAnchor() == NULL ) ) { - // dann setze ihn, wird im Undo gebraucht - SwFmtAnchor aAnch( pAnchor ? *pAnchor : pFmt->GetAnchor() ); + // apply anchor format + SwFmtAnchor aAnch( pAnchor != NULL ? *pAnchor : pFmt->GetAnchor() ); eAnchorId = aAnch.GetAnchorId(); - if( FLY_AT_FLY == eAnchorId ) + if ( eAnchorId == FLY_AT_FLY ) { SwPosition aPos( *rRg.GetNode()->FindFlyStartNode() ); aAnch.SetAnchor( &aPos ); @@ -981,39 +973,50 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg, else { aAnch.SetAnchor( rRg.GetPoint() ); - if ( FLY_AT_PAGE == eAnchorId ) + if ( eAnchorId == FLY_AT_PAGE ) { - eAnchorId = rDrawObj.ISA( SdrUnoObj ) - ? FLY_AS_CHAR : FLY_AT_PARA; + eAnchorId = rDrawObj.ISA( SdrUnoObj ) ? FLY_AS_CHAR : FLY_AT_PARA; aAnch.SetType( eAnchorId ); } } pFmt->SetFmtAttr( aAnch ); } - // bei als Zeichen gebundenen Draws das Attribut im Absatz setzen - if ( FLY_AS_CHAR == eAnchorId ) + // insert text attribute for as-character anchored drawing object + if ( eAnchorId == FLY_AS_CHAR ) { - xub_StrLen nStt = rRg.GetPoint()->nContent.GetIndex(); - SwFmtFlyCnt aFmt( pFmt ); - rRg.GetPoint()->nNode.GetNode().GetTxtNode()->InsertItem( - aFmt, nStt, nStt ); + bool bAnchorAtPageAsFallback = true; + const SwFmtAnchor& rDrawObjAnchorFmt = pFmt->GetAnchor(); + if ( rDrawObjAnchorFmt.GetCntntAnchor() != NULL ) + { + SwTxtNode* pAnchorTxtNode = + rDrawObjAnchorFmt.GetCntntAnchor()->nNode.GetNode().GetTxtNode(); + if ( pAnchorTxtNode != NULL ) + { + const xub_StrLen nStt = rDrawObjAnchorFmt.GetCntntAnchor()->nContent.GetIndex(); + SwFmtFlyCnt aFmt( pFmt ); + pAnchorTxtNode->InsertItem( aFmt, nStt, nStt ); + bAnchorAtPageAsFallback = false; + } + } + + if ( bAnchorAtPageAsFallback ) + { + ASSERT( false, "SwDoc::InsertDrawObj(..) - missing content anchor for as-character anchored drawing object --> anchor at-page" ); + pFmt->SetFmtAttr( SwFmtAnchor( FLY_AT_PAGE ) ); + } } SwDrawContact* pContact = new SwDrawContact( pFmt, &rDrawObj ); - // ggfs. Frames anlegen - if( GetCurrentViewShell() ) + if ( GetCurrentViewShell() ) { + // create layout representation pFmt->MakeFrms(); - // --> OD 2005-02-09 #i42319# - follow-up of #i35635# - // move object to visible layer - // --> OD 2007-07-10 #i79391# if ( pContact->GetAnchorFrm() ) { pContact->MoveObjToVisibleLayer( &rDrawObj ); } - // <-- } if (GetIDocumentUndoRedo().DoesUndo()) diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 2ad6706..660b147 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -211,7 +211,7 @@ sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt ) pClpDoc->CloneSdrObj( *pObj, sal_False, sal_True ); SwPaM aTemp(aPos); - pClpDoc->Insert(aTemp, *pNew, &aSet, NULL); + pClpDoc->InsertDrawObj(aTemp, *pNew, aSet ); } else { @@ -396,8 +396,7 @@ sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, aSet.Put( aAnchor ); SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove && GetDoc() == pDestDoc, sal_True ); - pFmt = pDestDoc->Insert( *pDestShell->GetCrsr(), - *pNew, &aSet, NULL ); + pFmt = pDestDoc->InsertDrawObj( *pDestShell->GetCrsr(), *pNew, aSet ); } else pFmt = pDestDoc->CopyLayoutFmt( *pFmt, aAnchor, true, true ); @@ -1456,7 +1455,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt ) DelSelectedObj(); - pFmt = GetDoc()->Insert( *GetCrsr(), *pNewObj, &aFrmSet, NULL ); + pFmt = GetDoc()->InsertDrawObj( *GetCrsr(), *pNewObj, aFrmSet ); } else { diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 502975e..2bc9e1f 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -965,7 +965,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, ::lcl_FindAnchorPos( *this, *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet ); } // insert drawing object into the document creating a new <SwDrawFrmFmt> instance - SwDrawFrmFmt* pFmt = GetDoc()->Insert( aPam, rDrawObj, &rFlyAttrSet, 0 ); + SwDrawFrmFmt* pFmt = GetDoc()->InsertDrawObj( aPam, rDrawObj, rFlyAttrSet ); // move object to visible layer SwContact* pContact = static_cast<SwContact*>(rDrawObj.GetUserCall()); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 6839590..7cc73e4 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -759,7 +759,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) if ( !pTemp ) pTemp = pPam; UnoActionContext aAction(pDoc); - pDoc->Insert( *pTemp, *pObj, &aSet, NULL ); + pDoc->InsertDrawObj( *pTemp, *pObj, aSet ); SwFrmFmt* pFmt = ::FindFrmFmt( pObj ); if(pFmt) pFmt->Add(pShape); diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx index b354426..f287a1c 100644 --- a/sw/source/filter/html/htmldraw.cxx +++ b/sw/source/filter/html/htmldraw.cxx @@ -220,7 +220,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, } aFrmSet.Put( aAnchor ); - pDoc->Insert( *pPam, *pNewDrawObj, &aFrmSet, NULL ); + pDoc->InsertDrawObj( *pPam, *pNewDrawObj, aFrmSet ); } /* */ diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index ae7c826..f63a4cc 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1311,7 +1311,7 @@ void SwRTFParser::ReadDrawingObject() pStroke->SetSnapRect(aRect); - /* SwFrmFmt* pRetFrmFmt = */pDoc->Insert(*pPam, *pStroke, &aFlySet, NULL); + /* SwFrmFmt* pRetFrmFmt = */pDoc->InsertDrawObj(*pPam, *pStroke, aFlySet ); } } @@ -1343,7 +1343,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder) SdrPage* pDrawPg = pDrawModel->GetPage(0); pDrawPg->InsertObject(pStroke); pDrawPg->SetObjectOrdNum(pStroke->GetOrdNum(), _nZOrder); - /* SwFrmFmt* pRetFrmFmt = */pDoc->Insert(*pPam, *pStroke, &aFlySet, NULL); + /* SwFrmFmt* pRetFrmFmt = */pDoc->InsertDrawObj(*pPam, *pStroke, aFlySet ); } ::basegfx::B2DPoint rotate(const ::basegfx::B2DPoint& rStart, const ::basegfx::B2DPoint& rEnd) diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 77b2638..3e19201 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1409,7 +1409,7 @@ void SwWW8ImplReader::ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp ) if (SdrObject *pObject = ReadGrafPrimitive( nLeft, &aDo, aSet )) { pWWZOrder->InsertDrawingObject(pObject, SVBT16ToShort(aDo.dhgt)); - SwFrmFmt *pFrm = rDoc.Insert( *pPaM, *pObject, &aSet, NULL); + SwFrmFmt *pFrm = rDoc.InsertDrawObj( *pPaM, *pObject, aSet ); pObject->SetMergedItemSet(aSet); pAnchorStck->AddAnchor(*pPaM->GetPoint(), pFrm); } @@ -2839,7 +2839,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) pWWZOrder->InsertTextLayerObject(pObject); } - pRetFrmFmt = rDoc.Insert(*pPaM, *pObject, &aFlySet, NULL); + pRetFrmFmt = rDoc.InsertDrawObj(*pPaM, *pObject, aFlySet ); ASSERT(pRetFrmFmt->GetAnchor().GetAnchorId() == eAnchor, "Not the anchor type requested!"); diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 7a308d3..b98c8c1 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -696,7 +696,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, } } else - pRet = rDoc.Insert(*pPaM, *pObject, &aAttrSet, NULL); + pRet = rDoc.InsertDrawObj(*pPaM, *pObject, aAttrSet ); } } diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 68e01eb..a67d924 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -310,7 +310,7 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf, SdrObject::Free( pRet ); // das brauchen wir nicht mehr } else - pFmt = rDoc.Insert(*pPaM, *pRet, pFlySet, NULL); + pFmt = rDoc.InsertDrawObj(*pPaM, *pRet, *pFlySet ); } else if ( GRAPHIC_GDIMETAFILE == aGraph.GetType() || commit 0e90517f3dd568cfe2be4bf8c256b94c9401d046 Author: Andre Fischer <a...@apache.org> Date: Tue Feb 18 09:21:55 2014 +0000 122576: Reset the docking area acceptor in the destructor. diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e2fadb1..7d8b77c 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -181,6 +181,7 @@ LayoutManager::~LayoutManager() { Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); m_aAsyncLayoutTimer.Stop(); + setDockingAreaAcceptor(NULL); } // Internal helper function
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits