[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit e49eb6c9968f3ccc4e24c3f0444221c20aefb7aa Author: Michael Weghorn AuthorDate: Thu Sep 5 19:09:09 2019 +0200 Commit: Thorsten Behrens CommitDate: Thu Sep 12 07:37:01 2019 +0200 tdf#126184 Use max paper dimensions to calculate clip region Assuming at least A4 for the page size isn't enough if e.g. A2 or larger is used, so too much was clipped in that case. Therefore, use the the maximum paper width/height instead, which is 6 m by default. This is still far from the 19 km that caused tdf#63955 and I cannot reproduce tdf#63955 with that new limit. A big thanks to Regina Henschel for the great analysis in tdf#126184! (Side note: Comments 18 and 19 in tdf#63955 suggest to do the whole clipping elsewhere, so if anybody wants to take a look at this...) Change-Id: Iccacad621675df6c7b4477182d7332c4a3d67139 Reviewed-on: https://gerrit.libreoffice.org/78690 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 1dccd6814f1fe7a06f3168d01d18d347269cd3c1) Reviewed-on: https://gerrit.libreoffice.org/78759 (cherry picked from commit 859f49294ad95d3a6596e135e550253155d6517b) Reviewed-on: https://gerrit.libreoffice.org/78790 Reviewed-by: Michael Weghorn diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 9005b67a3fb4..b9f3950772f2 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -19,6 +19,7 @@ #include +#include #include #include #include @@ -104,11 +105,14 @@ namespace sdr //would not over flow into a tiny clip region if (nPageWidth < SAL_MAX_INT32/2 && nPageHeight < SAL_MAX_INT32/2) { -//But, see tdf#97276 and tdf#98366. Don't clip too much if the +//But, see tdf#97276, tdf#126184 and tdf#98366. Don't clip too much if the //underlying page dimension is unknown or a paste document //where the page sizes use the odd default of 10x10 -nPageWidth = std::max(21000, nPageWidth); -nPageHeight = std::max(29700, nPageHeight); +const SvtOptionsDrawinglayer aDrawinglayerOpt; +const sal_Int32 nMaxPaperWidth = aDrawinglayerOpt.GetMaximumPaperWidth() * 1000; +const sal_Int32 nMaxPaperHeight = aDrawinglayerOpt.GetMaximumPaperHeight() * 1000; +nPageWidth = std::max(nPageWidth, nMaxPaperWidth); +nPageHeight = std::max(nPageHeight, nMaxPaperHeight); basegfx::B2DRange aClipRange(-nPageWidth, -nPageHeight, nPageWidth*2, nPageHeight*2); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/svdraw/svdopath.cxx | 71 + 1 file changed, 44 insertions(+), 27 deletions(-) New commits: commit 46c7341014870b4d2c9babd91c14dfed4422f93a Author: Regina Henschel AuthorDate: Wed Aug 21 14:11:23 2019 +0200 Commit: Caolán McNamara CommitDate: Thu Aug 22 20:39:24 2019 +0200 tdf#126271 Revert "tdf120965 Simplify SdrPathObj::AddToHdlList()" This reverts commit 26001f4f84b0d921c8612d56613735ba5314. Change-Id: Ib4df476b405e65be9203ab376c9c68b03198c040 Reviewed-on: https://gerrit.libreoffice.org/77882 Tested-by: Regina Henschel Reviewed-by: Regina Henschel (cherry picked from commit 59189f3e02acbdf4e5bbd35fc278252b30022f43) Reviewed-on: https://gerrit.libreoffice.org/77940 Tested-by: Jenkins diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 63481a141248..eda7c34db46a 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -2008,45 +2008,62 @@ void SdrPathObj::AddToHdlList(SdrHdlList& rHdlList) const void SdrPathObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const { -// exclude some error situations -const XPolyPolygon aPathPolyPolygon(GetPathPoly()); +// keep old stuff to be able to keep old SdrHdl stuff, too +const XPolyPolygon aOldPathPolygon(GetPathPoly()); +sal_uInt16 nPnt = static_cast(rHdl.GetPointNum()); sal_uInt16 nPolyNum = static_cast(rHdl.GetPolyNum()); -if (nPolyNum>=aPathPolyPolygon.Count()) -return; -const XPolygon& rXPoly = aPathPolyPolygon[nPolyNum]; -sal_uInt16 nPntCount = rXPoly.GetPointCount(); -if (nPntCount<=0) +if (nPolyNum>=aOldPathPolygon.Count()) return; -sal_uInt16 nPnt = static_cast(rHdl.GetPointNum()); -if (nPnt>=nPntCount) -return; +const XPolygon& rXPoly = aOldPathPolygon[nPolyNum]; +sal_uInt16 nPntMax = rXPoly.GetPointCount(); -if (rXPoly.IsControl(nPnt)) +if (nPntMax<=0) +return; +nPntMax--; +if (nPnt>nPntMax) return; -// segment before -if (nPnt==0 && IsClosed()) -nPnt=nPntCount-1; -if (nPnt>0 && rXPoly.IsControl(nPnt-1)) +// calculate the number of plus points +sal_uInt16 nCnt = 0; +if (rXPoly.GetFlags(nPnt)!=PolyFlags::Control) { -std::unique_ptr pHdl(new SdrHdlBezWgt()); -pHdl->SetPos(rXPoly[nPnt-1]); -pHdl->SetPointNum(nPnt-1); -pHdl->SetSourceHdlNum(rHdl.GetSourceHdlNum()); -pHdl->SetPlusHdl(true); -rHdlList.AddHdl(std::move(pHdl)); +if (nPnt==0 && IsClosed()) +nPnt=nPntMax; +if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control) +nCnt++; +if (nPnt==nPntMax && IsClosed()) +nPnt=0; +if (nPnt(rHdl.GetPointNum()); std::unique_ptr pHdl(new SdrHdlBezWgt()); -pHdl->SetPos(rXPoly[nPnt+1]); -pHdl->SetPointNum(nPnt+1); +pHdl->SetPolyNum(rHdl.GetPolyNum()); + +if (nPnt==0 && IsClosed()) +nPnt=nPntMax; +if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control && nPlusNum==0) +{ +pHdl->SetPos(rXPoly[nPnt-1]); +pHdl->SetPointNum(nPnt-1); +} +else +{ +if (nPnt==nPntMax && IsClosed()) +nPnt=0; +if (nPntSetPos(rXPoly[nPnt+1]); +pHdl->SetPointNum(nPnt+1); +} +} + pHdl->SetSourceHdlNum(rHdl.GetSourceHdlNum()); pHdl->SetPlusHdl(true); rHdlList.AddHdl(std::move(pHdl)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/svdraw/svdotext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7ac1a9f5b0903af5d7ef1e14aa49f9b7ed3fda48 Author: Xisco Fauli AuthorDate: Thu Jun 27 17:26:34 2019 +0200 Commit: Xisco Faulí CommitDate: Fri Jun 28 12:38:03 2019 +0200 tdf#126137: Do not dereference non-existing Object Regression from dfefe448c41921f2f1e54d3f69b8b9e89031d055 Use same logic as in c28ec6d9fbb21b363102faac0171de2754ea5d75 Change-Id: Ia489eb61873d38c31729fedb853b11570e562123 Reviewed-on: https://gerrit.libreoffice.org/74811 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit b653f21313f3b8ff9da99897e3a0c2df4a685b60) Reviewed-on: https://gerrit.libreoffice.org/74827 Reviewed-by: Michael Stahl diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index da6a4280a1eb..814b7a9e4f17 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1044,7 +1044,7 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj) { pNewOutlinerParaObject = pEO->CreateParaObject(); } -else +else if (nullptr != rObj.getActiveText()->GetOutlinerParaObject()) { pNewOutlinerParaObject.reset( new OutlinerParaObject(*rObj.getActiveText()->GetOutlinerParaObject()) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/dialog/measctrl.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 85f61124eade5c9a06be8a693403af141461e18b Author: Caolán McNamara AuthorDate: Sat Jun 22 21:00:20 2019 +0100 Commit: Xisco Faulí CommitDate: Tue Jun 25 10:23:27 2019 +0200 Resolves: tdf#126039 erase old content before drawing new content Change-Id: I0006467f5c172b6a0cb8b9bc4c9a0181fd57a8ac Reviewed-on: https://gerrit.libreoffice.org/74585 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 1e641d6b5d42..21935c85c70b 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -76,6 +76,9 @@ SvxXMeasurePreview::~SvxXMeasurePreview() void SvxXMeasurePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { + rRenderContext.SetBackground(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); +rRenderContext.Erase(); + rRenderContext.Push(PushFlags::MAPMODE); rRenderContext.SetMapMode(m_aMapMode); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/unodraw/UnoGraphicExporter.cxx | 66 +++--- 1 file changed, 35 insertions(+), 31 deletions(-) New commits: commit fd4324c64a6919ef46328608b447decc5c5f2d49 Author: Xisco Fauli AuthorDate: Mon Jun 3 16:36:23 2019 +0200 Commit: Caolán McNamara CommitDate: Sat Jun 8 18:56:47 2019 +0200 tdf#125062: distort hairline borders only if selection is used Regression from 046df0a876b3d948bb1e14443c00c180bc8cccaa Use the fix for tdf#105998 only when 'selection' option is checked in the save dialog Change-Id: I8c4127c780736408e905ead48e0d3ee6ae149197 Reviewed-on: https://gerrit.libreoffice.org/73391 Reviewed-by: Xisco Faulí Tested-by: Xisco Faulí (cherry picked from commit 6c31c2b01dd32cc7ba1230f2c4a98b8f7def219b) Reviewed-on: https://gerrit.libreoffice.org/73559 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 80ff5b14c23b..1e111f7d2ab6 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -178,7 +178,7 @@ namespace { /** creates a bitmap that is optionally transparent from a metafile */ -BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, const Size* pSize ) +BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf,bool bIsSelection, const Size* pSize ) { // use new primitive conversion tooling basegfx::B2DRange aRange(basegfx::B2DPoint(0.0, 0.0)); @@ -211,35 +211,39 @@ namespace { if(!aRect.IsEmpty()) { -// tdf#105998 Correct the Metafile using information from it's real sizes measured -// using rMtf.GetBoundRect above and a copy -const Size aOnePixelInMtf( -Application::GetDefaultDevice()->PixelToLogic( -Size(1, 1), -rMtf.GetPrefMapMode())); GDIMetaFile aMtf(rMtf); -const Size aHalfPixelInMtf( -(aOnePixelInMtf.getWidth() + 1) / 2, -(aOnePixelInMtf.getHeight() + 1) / 2); -const bool bHairlineBR( -!aHairlineRect.IsEmpty() && (aRect.Right() == aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom())); - -// Move the content to (0,0), usually TopLeft ist slightly -// negative. For better visualization, add a half pixel, too -aMtf.Move( -aHalfPixelInMtf.getWidth() - aRect.Left(), -aHalfPixelInMtf.getHeight() - aRect.Top()); - -// Do not Scale, but set the PrefSize. Some levels deeper the -// MetafilePrimitive will add a mapping to the decomposition -// (and possibly a clipping) to map the graphic content to -// a unit coordinate system. -// Size is the measured size plus one pixel if needed (bHairlineBR) -// and the moved half pixwel from above -aMtf.SetPrefSize( -Size( -aRect.getWidth() + (bHairlineBR ? aOnePixelInMtf.getWidth() : 0) + aHalfPixelInMtf.getWidth(), -aRect.getHeight() + (bHairlineBR ? aOnePixelInMtf.getHeight() : 0) + aHalfPixelInMtf.getHeight())); + +if (bIsSelection) +{ +// tdf#105998 Correct the Metafile using information from it's real sizes measured +// using rMtf.GetBoundRect above and a copy +const Size aOnePixelInMtf( +Application::GetDefaultDevice()->PixelToLogic( +Size(1, 1), +rMtf.GetPrefMapMode())); +const Size aHalfPixelInMtf( +(aOnePixelInMtf.getWidth() + 1) / 2, +(aOnePixelInMtf.getHeight() + 1) / 2); +const bool bHairlineBR( +!aHairlineRect.IsEmpty() && (aRect.Right() == aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom())); + +// Move the content to (0,0), usually TopLeft ist slightly +// negative. For better visualization, add a half pixel, too +aMtf.Move( +aHalfPixelInMtf.getWidth() - aRect.Left(), +aHalfPixelInMtf.getHeight() - aRect.Top()); + +// Do not Scale, but set the PrefSize. Some levels deeper the +// MetafilePrimitive will add a mapping to the decomposition +// (and possibly a clipping) to map the graphic content to +// a unit coordinate system. +// Size is the measured size plus one pixel if needed (bHairlineBR) +// and the moved half pixwel from above +aMtf.SetPrefSize( +Size( +aRect.getWidth() + (bHairlineBR ?
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/items/pageitem.cxx | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) New commits: commit c25b5c2c3d019f1a282ba3fe65eb577ff1c8870b Author: Caolán McNamara AuthorDate: Fri May 17 15:44:02 2019 +0100 Commit: Caolán McNamara CommitDate: Sat May 18 10:41:34 2019 +0200 Resolves: tdf#125104 crash on getting text desc of numbering this seems to have been wrong for a very long time, but we used to get away with it back in the .src era with presumably amusingly random strings from other parts of the ui shown in the summary of changes are of the organizer page of the dialog Change-Id: If223182170ba8519d7899f8044f01c2a12f4e391 Reviewed-on: https://gerrit.libreoffice.org/72491 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index bbf80d45d5c0..9f6c9a4ac3a1 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -22,10 +22,15 @@ #include #include +#include #include +#include #include +#include #include #include +#include +#include #include #include #include @@ -95,6 +100,26 @@ static const char* RID_SVXITEMS_PAGE_NUMS[] = RID_SVXITEMS_PAGE_NUM_NONE }; +namespace +{ +OUString GetNumberingDescription(SvxNumType eNumType) +{ +// classic ones, keep displaying the old name +if (eNumType <= css::style::NumberingType::NUMBER_NONE) +return SvxResId(RID_SVXITEMS_PAGE_NUMS[eNumType]); +// new ones, reuse the text used in the numbering dropdown list +sal_uInt32 n = SvxNumberingTypeTable::FindIndex(eNumType); +if (n != RESARRAY_INDEX_NOTFOUND) +return SvxNumberingTypeTable::GetString(n); +css::uno::Reference xContext = comphelper::getProcessComponentContext(); +css::uno::Reference xDefNum = css::text::DefaultNumberingProvider::create(xContext); +css::uno::Reference xInfo(xDefNum, css::uno::UNO_QUERY); +if (!xInfo.is()) +return OUString(); +return xInfo->getNumberingIdentifier(eNumType); +} +} + bool SvxPageItem::GetPresentation ( SfxItemPresentation ePres, @@ -114,8 +139,7 @@ bool SvxPageItem::GetPresentation { rText = aDescName + cpDelimTmp; } -assert(eNumType <= css::style::NumberingType::NUMBER_NONE && "enum overflow"); -rText += SvxResId(RID_SVXITEMS_PAGE_NUMS[eNumType]) + cpDelimTmp; +rText += GetNumberingDescription(eNumType) + cpDelimTmp; if ( bLandscape ) rText += SvxResId(RID_SVXITEMS_PAGE_LAND_TRUE); else @@ -134,8 +158,7 @@ bool SvxPageItem::GetPresentation { rText += aDescName + cpDelimTmp; } -assert(eNumType <= css::style::NumberingType::NUMBER_NONE && "enum overflow"); -rText += SvxResId(RID_SVXITEMS_PAGE_NUMS[eNumType]) + cpDelimTmp; +rText += GetNumberingDescription(eNumType) + cpDelimTmp; if ( bLandscape ) rText += SvxResId(RID_SVXITEMS_PAGE_LAND_TRUE); else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/svdraw/svdundo.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 709fc73b2c538f0c15d8c94ffeb5d8234a00a01d Author: Caolán McNamara AuthorDate: Thu Apr 4 12:22:06 2019 +0100 Commit: Xisco Faulí CommitDate: Mon Apr 8 11:53:31 2019 +0200 Resolves: tdf#120754 on undoing an obj insert use its current ordinal there may have been changes not caught by undo to the object's ordinal, so on use of RemoveObject (or ReplaceObject) call GetOrdNum on the object to get its current position within its parent. We can keep nOrdNum for the desired dest position within the parent for InsertObject Change-Id: I3bdabf387dd630fc1fadaaa1f3d8c05e93865e4f Reviewed-on: https://gerrit.libreoffice.org/70253 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 107bd1a0ad05..3cd1fa98d393 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -708,7 +708,7 @@ void SdrUndoRemoveObj::Redo() { ImplUnmarkObject( pObj ); E3DModifySceneSnapRectUpdater aUpdater(pObj); -pObjList->RemoveObject(nOrdNum); +pObjList->RemoveObject(pObj->GetOrdNum()); } // Trigger PageChangeCall @@ -730,7 +730,7 @@ void SdrUndoInsertObj::Undo() { ImplUnmarkObject( pObj ); -SdrObject* pChkObj= pObjList->RemoveObject(nOrdNum); +SdrObject* pChkObj= pObjList->RemoveObject(pObj->GetOrdNum()); DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj"); } } @@ -886,7 +886,7 @@ void SdrUndoReplaceObj::Undo() SetNewOwner(true); ImplUnmarkObject( pNewObj ); -pObjList->ReplaceObject(pObj,nOrdNum); +pObjList->ReplaceObject(pObj,pNewObj->GetOrdNum()); } else { @@ -904,7 +904,7 @@ void SdrUndoReplaceObj::Redo() SetNewOwner(false); ImplUnmarkObject( pObj ); -pObjList->ReplaceObject(pNewObj,nOrdNum); +pObjList->ReplaceObject(pNewObj,pObj->GetOrdNum()); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/unodraw/unoshtxt.cxx | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) New commits: commit 6f90915f039ebd8f931cb16239756236bdae8a01 Author: Caolán McNamara AuthorDate: Wed Feb 27 17:21:22 2019 + Commit: Michael Stahl CommitDate: Wed Mar 6 11:35:04 2019 +0100 tdf#123470 textforwarder has stale view of SdrTextObj When we save the document we get a SwXShape for the SdrObject and call getShapeText on it, which creates a TextForwarder for it. The SwXShape is temporary and is discarded afterwards. If we modify the text and save again we get a new SwXShape and a new TextForwarder. If a11y is active, then when the textbox is inserted a11y gets a SwXShape for the object and the SwXShape stays alive while the a11y view of the Sdrobject stays around. The SdrObject will keep a weak ref to the current SwXShape for it, so on save we get the already existing SwXShape instead of a new one. On the first save this is ok, as the TextForwarder is created on demand. On the second save, the problem is that the SvxTextEditSourceImpl of the TextForwarded was initially created without a SdrView so its in sort of a "snapshot" mode, so first time the text is queried, that sticks as the result. So a cached text forwarder cannot be trusted when its for a SdrTextObj that's being edited and HasView is false Change-Id: Ib3d500752f1876086ef1996885a2b86b581f5bc4 Reviewed-on: https://gerrit.libreoffice.org/68475 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 287d2bd18b42..9f9429e2ed26 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -654,10 +654,26 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder() return GetBackgroundTextForwarder(); } else +{ +// tdf#123470 if the text edit mode of the shape is active, then we +// cannot trust a previously cached TextForwarder state as the text may +// be out of date, so force a refetch in that case. +if (IsEditMode()) +{ +assert(!mbForwarderIsEditMode); // because without a view there is no other option except !mbForwarderIsEditMode +bool bTextEditActive = false; +SdrTextObj* pTextObj = dynamic_cast(mpObject); +// similar to the GetBackgroundTextForwarder check, see if the text edit is active +if (pTextObj && pTextObj->getActiveText() == mpText && pTextObj->GetEditOutlinerParaObject()) +bTextEditActive = true; // text edit active +if (bTextEditActive) +mbDataValid = false; +} + return GetBackgroundTextForwarder(); +} } - std::unique_ptr SvxTextEditSourceImpl::CreateViewForwarder() { if( mpView->GetTextEditOutlinerView() && mpObject ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/xml/xmlgrhlp.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 36f027769ea6aaabb5e993a321d7a56775d4bee1 Author: Bartosz Kosiorek AuthorDate: Mon Mar 4 23:46:52 2019 +0100 Commit: Bartosz Kosiorek CommitDate: Wed Mar 6 01:16:21 2019 +0100 tdf#123452 EMF Re-enable compression for image/x-emf files Change-Id: I9fd801d5eef6c65f8e68e30723415da7b493d767 Reviewed-on: https://gerrit.libreoffice.org/68716 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit df22e97db5b7608b6d53b15b86b5a83610f9c87b) Reviewed-on: https://gerrit.libreoffice.org/68729 Reviewed-by: Bartosz Kosiorek diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 3a4dc4a4493f..4e99e87b21a5 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -731,6 +731,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Referencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source sw/source
svx/source/dialog/hdft.cxx |2 - sw/source/uibase/docvw/HeaderFooterWin.cxx | 52 +++-- 2 files changed, 14 insertions(+), 40 deletions(-) New commits: commit 7d7396d096369be06e7de3df566c5da7b25ef2c7 Author: Aditya AuthorDate: Sun Feb 24 21:17:14 2019 +0530 Commit: Michael Stahl CommitDate: Fri Mar 1 14:53:35 2019 +0100 tdf#116382 Replace old dialog in header and footer drop-down menu Remove the Background tabpage in "Border/Background" dialog accessed from Border and Background menu item in Header/Footer drop-down list and replace it with the tabpages "Area" and "Transparency" of the dialog accessed from Page Style > Header > "More.." button. The old dialog does not have the tabpages "Area" and "Transparency". In simpler words, the patch is to match both the dialogs when accessed in two different ways. Reviewed-on: https://gerrit.libreoffice.org/67483 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit 55042cb54fea5f7ad777c03af9bf8197127b6736) Change-Id: Ib84435854389360eba41aecb8578a9a67a92ca1e Reviewed-on: https://gerrit.libreoffice.org/68545 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 20c1bcdbd7a4..c4d79ddd25ae 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -88,7 +88,7 @@ namespace svx { { bool bRes = false; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); -ScopedVclPtr pDlg(pFact->CreateSvxBorderBackgroundDlg(pParent, *pBBSet, false /*bEnableDrawingLayerFillStyles*/)); +ScopedVclPtr pDlg(pFact->CreateSvxBorderBackgroundDlg(pParent, *pBBSet, true /*bEnableDrawingLayerFillStyles*/)); if ( pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet() ) { SfxItemIter aIter( *pDlg->GetOutputItemSet() ); diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 84927a6a8d13..1cb1dbd77a6a 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -11,6 +11,8 @@ #include #include +#include +#include #include #include #include @@ -414,47 +416,19 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent) SwFrameFormat* pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetFooter().GetFooterFormat() ); if ( m_bIsHeader ) pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetHeader().GetHeaderFormat() ); +SfxItemSet aSet( pHFFormat->GetAttrSet() ); -SfxItemPool* pPool = pHFFormat->GetAttrSet().GetPool(); -SfxItemSet aSet( -*pPool, -svl::Items< -RES_BACKGROUND, RES_SHADOW, -SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{}); - -aSet.Put( pHFFormat->GetAttrSet() ); - -// Create a box info item... needed by the dialog -SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER ); -const SfxPoolItem *pBoxInfo; -if ( SfxItemState::SET == pHFFormat->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER, -true, ) ) -aBoxInfo = *static_cast(pBoxInfo); - -aBoxInfo.SetTable( false ); -aBoxInfo.SetDist( true); -aBoxInfo.SetMinDist( false ); -aBoxInfo.SetDefDist( MIN_BORDER_DIST ); -aBoxInfo.SetValid( SvxBoxInfoItemValidFlags::DISABLE ); -aSet.Put( aBoxInfo ); - -if (svx::ShowBorderBackgroundDlg(GetFrameWeld(), )) +// Items to hand over XPropertyList things like XColorList, +// XHatchList, XGradientList, and XBitmapList to the Area TabPage: +aSet.MergeRange( SID_COLOR_TABLE, SID_PATTERN_LIST ); +// create needed items for XPropertyList entries from the DrawModel so that +// the Area TabPage can access them + rSh.GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems( aSet ); + +if (svx::ShowBorderBackgroundDlg( GetFrameWeld(), ) ) { -const SfxPoolItem* pItem; -if ( SfxItemState::SET == aSet.GetItemState( RES_BACKGROUND, false, ) ) { -pHFFormat->SetFormatAttr( *pItem ); -rView.GetDocShell()->SetModified(); -} - -if ( SfxItemState::SET == aSet.GetItemState( RES_BOX, false, ) ) { -pHFFormat->SetFormatAttr( *pItem ); -rView.GetDocShell()->SetModified(); -} - -if ( SfxItemState::SET == aSet.GetItemState( RES_SHADOW, false, ) ) { -pHFFormat->SetFormatAttr( *pItem ); -rView.GetDocShell()->SetModified(); -} +pHFFormat->SetFormatAttr( aSet ); +rView.GetDocShell()->SetModified(); } } else if (rIdent == "delete")
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/unodraw/unoprov.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 20efd8050649c0b2f90233efa2c177b256d51f11 Author: Mark Hung AuthorDate: Sun Feb 17 09:29:16 2019 +0800 Commit: Michael Stahl CommitDate: Tue Feb 19 18:31:36 2019 +0100 svx: allow UINameSingular property. UINameSingular is used in the title of the animation effect. It was missed in media objects, contorl objects, frames, tables, etc., causing the title of the animation effect to become just a number without prefixing object type before it. Change-Id: I7446d59b1b80102c34b8326e20927f60ad24da25 Reviewed-on: https://gerrit.libreoffice.org/67934 Tested-by: Jenkins Reviewed-by: Mark Hung (cherry picked from commit b295921c4a78be42f815c6d6e708c931c1ee73ec) Reviewed-on: https://gerrit.libreoffice.org/68015 Reviewed-by: Michael Stahl diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 64e2649d7d7c..a3c02ecf9074 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -466,6 +466,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxPluginPropertyMap() { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL, cppu::UnoType::get(), 0, 0 }, { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA, cppu::UnoType::get(), 0, 0}, +{ OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, // #i68101# { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType::get(),0, 0}, { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType::get(),0, 0}, @@ -500,6 +501,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxFramePropertyMap() { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL, cppu::UnoType::get(), 0, 0 }, { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA, cppu::UnoType::get(), 0, 0}, +{ OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, // #i68101# { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType::get(),0, 0}, { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType::get(),0, 0}, @@ -533,6 +535,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxAppletPropertyMap() { OUString("LinkURL"), OWN_ATTR_OLE_LINKURL, cppu::UnoType::get(), 0, 0 }, { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, { OUString("VisibleArea"), OWN_ATTR_OLE_VISAREA, cppu::UnoType::get(), 0, 0}, +{ OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, // #i68101# { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType::get(),0, 0}, { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType::get(),0, 0}, @@ -586,6 +589,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxControlShapePropertyMap() { OUString("UserDefinedAttributes"),SDRATTR_XMLATTRIBUTES, cppu::UnoType::get(),0, 0}, {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType::get(),0, 0}, { OUString(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, +{ OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, // #i68101# { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , cppu::UnoType::get(),0, 0}, { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , cppu::UnoType::get(),0, 0}, @@ -698,6 +702,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxMediaShapePropertyMap() { OUString(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, cppu::UnoType::get(),0, 0}, { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, cppu::UnoType::get(),0, 0}, {
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/items/numfmtsh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1e66a07e648d1203f5a599d19da1227be008f276 Author: Eike Rathke AuthorDate: Fri Feb 8 20:46:36 2019 +0100 Commit: Xisco Faulí CommitDate: Mon Feb 11 12:07:33 2019 +0100 Resolves: tdf#123122 category is just one bit, date+time is two bits set DATE|TIME != DATE ... Regression from commit e85966450b770e1169f113183ce1a9a9f4dcc507 CommitDate: Wed Oct 3 12:08:55 2018 +0200 Related: tdf#119613 tdf#118127 suppress duplicated builtins, rework All cat Change-Id: If500dbeae00805f04f61586730479901b27d3901 Reviewed-on: https://gerrit.libreoffice.org/67554 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 8e12e3300592438b06b5649deaf84574de5066ba) Reviewed-on: https://gerrit.libreoffice.org/67575 Reviewed-by: Xisco Faulí diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 2bf80b4cb33f..e23f27b95026 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -1037,7 +1037,7 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl(std::vector& rList, { const SvNumberformat* pNumEntry = it->second; -if (bCategoryMatch && pNumEntry->GetMaskedType() != eCategory) +if (bCategoryMatch && (pNumEntry->GetMaskedType() & eCategory) != eCategory) continue; // for; type does not match category if not ALL const bool bUserDefined = bool(pNumEntry->GetType() & SvNumFormatType::DEFINED); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/fmcomp/gridctrl.cxx | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) New commits: commit 106e7acab6e31e1e0cee40716335f2b758d6186b Author: Caolán McNamara AuthorDate: Wed Feb 6 14:27:25 2019 + Commit: Miklos Vajna CommitDate: Fri Feb 8 15:47:56 2019 +0100 tdf#115941 use same font statusbar does for form navigator bar now that we have it the same height as a statusbar Change-Id: I0d5ee3f8dc57e94be5d45581bc4382e3448353c3 Reviewed-on: https://gerrit.libreoffice.org/67462 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 9a923e1ce53753bb8538054fd1658a67ca0ff354) Reviewed-on: https://gerrit.libreoffice.org/67487 Reviewed-by: Miklos Vajna diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 997250cf8ea9..ea37f509f0af 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -434,14 +434,9 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() sal_uInt16 nX = 1; sal_uInt16 nY = 0; -// Is the font of this edit larger than the field? -if (m_aAbsolute->GetTextHeight() > nH) { -vcl::Font aApplFont (m_aAbsolute->GetFont()); -const Size pointAbsoluteSize(m_aAbsolute->PixelToLogic( Size( 0, nH - 2 ), MapMode(MapUnit::MapPoint) )); -aApplFont.SetFontSize( pointAbsoluteSize ); +vcl::Font aApplFont(GetSettings().GetStyleSettings().GetToolFont()); m_aAbsolute->SetControlFont( aApplFont ); - aApplFont.SetTransparent( true ); m_aRecordText->SetControlFont( aApplFont ); m_aRecordOf->SetControlFont( aApplFont ); @@ -817,7 +812,7 @@ void DbGridControl::NavigationBar::StateChanged(StateChangedType nType) Fraction aZoom = GetZoom(); // not all of these controls need to know the new zoom, but to be sure ... -vcl::Font aFont(GetSettings().GetStyleSettings().GetFieldFont()); +vcl::Font aFont(GetSettings().GetStyleSettings().GetToolFont()); if (IsControlFont()) aFont.Merge(GetControlFont()); @@ -1115,7 +1110,7 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) { if ( m_bNavigationBar ) { -vcl::Font aFont = m_aBar->GetSettings().GetStyleSettings().GetFieldFont(); +vcl::Font aFont = m_aBar->GetSettings().GetStyleSettings().GetToolFont(); if ( IsControlFont() ) m_aBar->SetControlFont( GetControlFont() ); else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/dialog/framelinkarray.cxx | 47 +++ 1 file changed, 32 insertions(+), 15 deletions(-) New commits: commit 49fbb60d32a7e6ebfce4a6f4754f1bc51c6bf264 Author: Ilhan Yesil AuthorDate: Tue Nov 13 11:20:15 2018 +0100 Commit: Thorsten Behrens CommitDate: Tue Jan 29 12:44:51 2019 +0100 tdf#116051 Right border visible after hiding neighbour column Added an else statement to take into account that a hidden column has a neighboured left column with a right border. Change-Id: Ia415d422dd2fa305604e48cce55661408b835ea6 Reviewed-on: https://gerrit.libreoffice.org/63326 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 392729c735bb82eecf29bae5527ec786ca293f34) Reviewed-on: https://gerrit.libreoffice.org/67058 Reviewed-by: Thorsten Behrens diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 0281c0300bfd..30f611927341 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -1060,28 +1060,30 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( basegfx::B2DVector aX(basegfx::utils::getColumn(aCoordinateSystem, 0)); basegfx::B2DVector aY(basegfx::utils::getColumn(aCoordinateSystem, 1)); +// get needed local values +basegfx::B2DPoint aOrigin(basegfx::utils::getColumn(aCoordinateSystem, 2)); +const bool bOverlapX(rCell.mbOverlapX); +const bool bFirstCol(nCol == nFirstCol); + +// handle rotation: If cell is rotated, handle lower/right edge inside +// this local geometry due to the created CoordinateSystem already representing +// the needed transformations. +const bool bRotated(rCell.IsRotated()); + +// Additionally avoid double-handling by suppressing handling when self not rotated, +// but above/left is rotated and thus already handled. Two directly connected +// rotated will paint/create both edges, they might be rotated differently. +const bool bSupressLeft(!bRotated && nCol > nFirstCol && CELL(nCol - 1, nRow).IsRotated()); +const bool bSuppressAbove(!bRotated && nRow > nFirstRow && CELL(nCol, nRow - 1).IsRotated()); + if(!aX.equalZero() && !aY.equalZero()) { -// get needed local values -basegfx::B2DPoint aOrigin(basegfx::utils::getColumn(aCoordinateSystem, 2)); -const bool bOverlapX(rCell.mbOverlapX); +// additionally needed local values const bool bOverlapY(rCell.mbOverlapY); -const bool bFirstCol(nCol == nFirstCol); const bool bLastCol(nCol == nLastCol); const bool bFirstRow(nRow == nFirstRow); const bool bLastRow(nRow == nLastRow); -// handle rotation: If cell is rotated, handle lower/right edge inside -// this local geometry due to the created CoordinateSystem already representing -// the needed transformations. -const bool bRotated(rCell.IsRotated()); - -// Additionally avoid double-handling by suppressing handling when self not rotated, -// but above/left is rotated and thus already handled. Two directly connected -// rotated will paint/create both edges, they might be rotated differently. -const bool bSuppressAbove(!bRotated && nRow > nFirstRow && CELL(nCol, nRow - 1).IsRotated()); -const bool bSupressLeft(!bRotated && nCol > nFirstCol && CELL(nCol - 1, nRow).IsRotated()); - // create upper line for this Cell if ((!bOverlapY // true for first line in merged cells or cells || bFirstRow) // true for non_Calc usages of this tooling @@ -1220,6 +1222,21 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( } } } +else +{ +// create left line for this Cell +if ((!bOverlapX // true for first column in merged cells or cells +|| bFirstCol) // true for non_Calc usages of this tooling +&& !bSupressLeft) // true when left is not rotated, so edge is already handled (see bRotated) +{ +const Style& rLeft(GetCellStyleLeft(nCol, nRow)); + +if (rLeft.IsUsed()) +{ +HelperCreateVerticalEntry(*this, rLeft, nCol, nRow, aOrigin, aX, aY, *aData.get(), true, pForceColor); +} +} +} } } ___ Libreoffice-commits mailing
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/form/fmshell.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 0f86aa5dec8ec6961736f66ef83f049fa2049982 Author: Caolán McNamara AuthorDate: Mon Jan 28 17:09:33 2019 + Commit: Xisco Faulí CommitDate: Tue Jan 29 10:46:48 2019 +0100 Resolves: tdf#123019 give modal dialog a parent Change-Id: I669d8cb18ed78fcdb50aa3f452661500d75ad880 Reviewed-on: https://gerrit.libreoffice.org/67022 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 3404c091c21c..a149925dd7be 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -245,7 +245,10 @@ bool FmFormShell::PrepareClose(bool bUI) if ( bModified && bUI ) { -std::unique_ptr xBuilder(Application::CreateBuilder(nullptr, "svx/ui/savemodifieddialog.ui")); +SfxViewShell* pShell = GetViewShell(); +vcl::Window* pShellWnd = pShell ? pShell->GetWindow() : nullptr; +weld::Widget* pFrameWeld = pShellWnd ? pShellWnd->GetFrameWeld() : nullptr; +std::unique_ptr xBuilder(Application::CreateBuilder(pFrameWeld, "svx/ui/savemodifieddialog.ui")); std::unique_ptr xQry(xBuilder->weld_message_dialog("SaveModifiedDialog")); switch (xQry->run()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/tbxctrls/tbcontrl.cxx |8 1 file changed, 8 deletions(-) New commits: commit 274d7f1e387fa318ac30146a434857ff5bd7bf79 Author: Caolán McNamara AuthorDate: Tue Jan 15 09:48:14 2019 + Commit: Xisco Faulí CommitDate: Tue Jan 15 17:18:00 2019 +0100 Resolves: tdf#122700 cannot change shadow color Change-Id: Iee42beb96ff4d059c685173fdde453981b300b3c Reviewed-on: https://gerrit.libreoffice.org/66361 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 3100fc2b567d..c748507a1fc8 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1605,10 +1605,6 @@ IMPL_LINK(SvxColorWindow, SelectHdl, ValueSet*, pColorSet, void) VclPtr xThis(this); NamedColor aNamedColor = GetSelectEntryColor(pColorSet); -/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() calls. -This instance may be deleted in the meantime (i.e. when a dialog is opened -while in Dispatch()), accessing members will crash in this case. */ -pColorSet->SetNoSelection(); if ( pColorSet != mpRecentColorSet ) { @@ -1628,10 +1624,6 @@ IMPL_LINK(SvxColorWindow, SelectHdl, ValueSet*, pColorSet, void) IMPL_LINK(ColorWindow, SelectHdl, SvtValueSet*, pColorSet, void) { NamedColor aNamedColor = GetSelectEntryColor(pColorSet); -/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() calls. -This instance may be deleted in the meantime (i.e. when a dialog is opened -while in Dispatch()), accessing members will crash in this case. */ -pColorSet->SetNoSelection(); if (pColorSet != mxRecentColorSet.get()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source sw/qa
svx/source/unodraw/unoshape.cxx | 59 --- sw/qa/extras/ooxmlimport/ooxmlimport.cxx |3 + 2 files changed, 56 insertions(+), 6 deletions(-) New commits: commit e42e3f3f28691de2ed8132564066bc3007eac651 Author: Armin Le Grand AuthorDate: Thu Dec 20 16:24:33 2018 +0100 Commit: Thorsten Behrens CommitDate: Fri Dec 21 23:05:38 2018 +0100 tdf#119180 Use 100th_mm in UNO API implementation Since SvxShape::GetBitmap is UNO API implementation the results have to be in 100th_mm, that is how UNO API is defined. Adapted Bitmap creation common case to do so using primitve embedding if source is not 100_th_mm. Also added a shortcut if object in question already is a SdrGrafObj and contains a Bitmap. Needed to update the checksum of a graphic for testN777345. Change-Id: I995100406a262e2872597dc64e943271e92eb4cb Reviewed-on: https://gerrit.libreoffice.org/65505 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit df57d50e00820d59b2b7104b6e59883405d0f183) Reviewed-on: https://gerrit.libreoffice.org/65523 Tested-by: Xisco Faulí Reviewed-by: Thorsten Behrens diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index b89188720c65..4430da8af9c9 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -87,6 +87,7 @@ #include #include #include +#include #include @@ -691,14 +692,35 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const return aAny; } +// tdf#119180 If we do not ask for Metafile and we access a SdrGrafObj, +// and content exists and is a Bitmap, take the shortcut. +// Do *not* do this for Metafile - as can be seen, requested in that case +// is a byte-sequence of a saved WMF format file (see below) +if(!bMetaFile) +{ +const SdrGrafObj* pSdrGrafObj(dynamic_cast(GetSdrObject())); + +if(nullptr != pSdrGrafObj) +{ + const Graphic& rGraphic(pSdrGrafObj->GetGraphic()); + +if(GraphicType::Bitmap == rGraphic.GetType()) +{ +Reference< awt::XBitmap > xBmp( rGraphic.GetXGraphic(), UNO_QUERY ); +aAny <<= xBmp; + +return aAny; +} +} +} + // tdf#118662 instead of creating an E3dView instance every time to paint // a single SdrObject, use the existing SdrObject::SingleObjectPainter to // use less resources and runtime -ScopedVclPtrInstance< VirtualDevice > pVDev; -const tools::Rectangle aBoundRect(GetSdrObject()->GetCurrentBoundRect()); - if(bMetaFile) { +ScopedVclPtrInstance< VirtualDevice > pVDev; +const tools::Rectangle aBoundRect(GetSdrObject()->GetCurrentBoundRect()); GDIMetaFile aMtf; pVDev->SetMapMode(MapMode(MapUnit::Map100thMM)); @@ -727,17 +749,44 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const } else { -const drawinglayer::primitive2d::Primitive2DContainer xPrimitives( +drawinglayer::primitive2d::Primitive2DContainer xPrimitives( GetSdrObject()->GetViewContact().getViewIndependentPrimitive2DContainer()); if(!xPrimitives.empty()) { const drawinglayer::geometry::ViewInformation2D aViewInformation2D; -const basegfx::B2DRange aRange( +basegfx::B2DRange aRange( xPrimitives.getB2DRange(aViewInformation2D)); if(!aRange.isEmpty()) { +const MapUnit aSourceMapUnit(GetSdrObject()->getSdrModelFromSdrObject().GetScaleUnit()); + +if(MapUnit::Map100thMM != aSourceMapUnit) +{ +// tdf#119180 This is UNO API and thus works in 100th_mm, +// so if the MapMode from the used SdrModel is *not* equal +// to Map100thMM we need to embed the primitives to an adapting +// homogen transformation for correct values +const basegfx::B2DHomMatrix aMapTransform( +OutputDevice::LogicToLogic( +MapMode(aSourceMapUnit), +MapMode(MapUnit::Map100thMM))); + +// Embed primitives to get them in 100th mm +const drawinglayer::primitive2d::Primitive2DReference xEmbedRef( +new drawinglayer::primitive2d::TransformPrimitive2D( +aMapTransform, +xPrimitives)); + +xPrimitives = drawinglayer::primitive2d::Primitive2DContainer { xEmbedRef }; + +// Update basegfx::B2DRange aRange, too. Here we have the +// choice of transforming the existing value or get newly by +// again using
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/tbxctrls/tbcontrl.cxx | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit 57abe1bb3b56c754db0045a8c55c3a8d3d75803e Author: Caolán McNamara AuthorDate: Fri Dec 21 13:16:14 2018 + Commit: Caolán McNamara CommitDate: Fri Dec 21 16:43:14 2018 +0100 Resolves: tdf#120885 Crash on choosing 'more styles' switching to the sidebar destroys the control currently active, just post the event to happen on the next event loop Change-Id: I3e9b629821fa43d8f29e419e72f66ed46d72fdbb Reviewed-on: https://gerrit.libreoffice.org/65542 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index a379d919f268..3100fc2b567d 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -179,6 +179,7 @@ private: static bool AdjustFontForItemHeight(OutputDevice* pDevice, tools::Rectangle const & rTextRect, long nHeight); voidSetOptimalSize(); DECL_LINK( MenuSelectHdl, Menu *, bool ); +DECL_STATIC_LINK(SvxStyleBox_Impl, ShowMoreHdl, void*, void); }; class SvxFontNameBox_Impl : public FontNameBox @@ -431,6 +432,16 @@ IMPL_LINK( SvxStyleBox_Impl, MenuSelectHdl, Menu*, pMenu, bool) return false; } +IMPL_STATIC_LINK_NOARG(SvxStyleBox_Impl, ShowMoreHdl, void*, void) +{ +SfxViewFrame* pViewFrm = SfxViewFrame::Current(); +DBG_ASSERT( pViewFrm, "SvxStyleBox_Impl::Select(): no viewframe" ); +if (!pViewFrm) +return; +pViewFrm->ShowChildWindow(SID_SIDEBAR); +::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel", pViewFrm->GetFrame().GetFrameInterface()); +} + void SvxStyleBox_Impl::Select() { // Tell base class about selection so that AT get informed about it. @@ -454,11 +465,7 @@ void SvxStyleBox_Impl::Select() } else if( aSearchEntry == aMoreKey && GetSelectedEntryPos() == ( GetEntryCount() - 1 ) ) { -SfxViewFrame* pViewFrm = SfxViewFrame::Current(); -DBG_ASSERT( pViewFrm, "SvxStyleBox_Impl::Select(): no viewframe" ); -pViewFrm->ShowChildWindow( SID_SIDEBAR ); -::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel", - pViewFrm->GetFrame().GetFrameInterface()); +Application::PostUserEvent(LINK(nullptr, SvxStyleBox_Impl, ShowMoreHdl)); //tdf#113214 change text back to previous entry SetText(GetSavedValue()); bDoIt = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/form/navigatortree.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 303043243d603c7fe70d6f23a8a6e11762fa28f4 Author: Noel Grandin AuthorDate: Wed Dec 19 09:25:59 2018 +0200 Commit: Noel Grandin CommitDate: Wed Dec 19 11:19:54 2018 +0100 tdf#122127 Crash in FORM EDIT using drag drop to move control in dataform regression from commit 2629aac31142449312f77c5843ea209cc810acb4 Date: Tue Oct 23 09:47:10 2018 +0200 clang-tidy performance-unnecessary-copy-init in svx Change-Id: I4210c328145d062d8b72f09dcff3280e11c6bc36 Reviewed-on: https://gerrit.libreoffice.org/65394 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 7d8bce646d53d77405b45a50fc6e889ccd0c10e9) Reviewed-on: https://gerrit.libreoffice.org/65399 Reviewed-by: Xisco Faulí Tested-by: Xisco Faulí diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 2a44e7d9953a..df5188783619 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1009,7 +1009,7 @@ namespace svxform DBG_ASSERT( DND_ACTION_COPY != _nAction, "NavigatorTree::implExecuteDataTransfer: somebody changed the logics!" ); // list of dragged entries -const ListBoxEntrySet& aDropped = _rData.selected(); +const ListBoxEntrySet aDropped = _rData.selected(); DBG_ASSERT(!aDropped.empty(), "NavigatorTree::implExecuteDataTransfer: no entries!"); // shell and model ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit b3eb3ef769642b2fa5b9453a8900bcb944643215 Author: Sumit Chauhan AuthorDate: Sun Dec 16 14:24:39 2018 +0530 Commit: Heiko Tietze CommitDate: Mon Dec 17 10:21:09 2018 +0100 tdf#121638 , Different angle shown between sidebar & size and position dialog Bug solved , Changed the nTmp = 360+nTmp ,if nTmp <0. Change-Id: I855e634540c55ab91e8bbe5824014d304d87c8e9 Reviewed-on: https://gerrit.libreoffice.org/65211 Tested-by: Jenkins Reviewed-by: Heiko Tietze (cherry picked from commit 294c38229a37604fe2d0d82a6ebc7bcd086963f4) Reviewed-on: https://gerrit.libreoffice.org/65224 Tested-by: Xisco Faulí diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 1afdf1e725b9..667e7834caa2 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -682,6 +682,7 @@ void PosSizePropertyPanel::NotifyItemUpdate( if(pItem) { long nTmp = pItem->GetValue(); +nTmp = nTmp < 0 ? 36000+nTmp : nTmp; mpMtrAngle->SetValue( nTmp ); mpDial->SetRotation( nTmp ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/dialog/charmap.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit f477d24127aacc849757f245a9bbd8a4c8561a6d Author: Caolán McNamara AuthorDate: Mon Dec 10 14:06:09 2018 + Commit: Caolán McNamara CommitDate: Mon Dec 10 22:04:01 2018 +0100 Resolves: tdf#121946 first time draw uses gray bg Change-Id: Ia0491eebe8fa7ea2c2377ca96c758c681da5470a Reviewed-on: https://gerrit.libreoffice.org/64876 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 0d8a869a63d6..81ecf1f30320 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -624,6 +624,7 @@ void SvxShowCharSet::InitSettings(vcl::RenderContext& rRenderContext) if (mbUpdateBackground) { rRenderContext.SetBackground(rStyleSettings.GetWindowColor()); +rRenderContext.Erase(); mbUpdateBackground = false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/dialog/langbox.cxx | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit aaf7e843900b5fb995a7188f527552bd616baf9e Author: Caolán McNamara AuthorDate: Mon Dec 10 11:09:14 2018 + Commit: Caolán McNamara CommitDate: Mon Dec 10 14:56:55 2018 +0100 Resolves: tdf#121520 duplicate languages in dropdown Change-Id: I5bbde305bf06ac1f754f24eb93e89cb3d9cf6058 Reviewed-on: https://gerrit.libreoffice.org/64869 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 69d1ab3a03af..fedbe1a5c4c1 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -551,12 +551,15 @@ void LanguageBox::AddLanguages(const std::vector< LanguageType >& rLanguageTypes if (lcl_isScriptTypeRequested( nLang, nLangList)) { int nAt = ImplTypeToPos(nLang); -if (nAt == -1) -{ -rEntries.push_back(BuildEntry(nLang)); -if (rEntries.back().sString.isEmpty()) -rEntries.pop_back(); -} +if (nAt != -1) +continue; +weld::ComboBoxEntry aNewEntry(BuildEntry(nLang)); +if (aNewEntry.sString.isEmpty()) +continue; +if (std::find_if(rEntries.begin(), rEntries.end(), + [=](const weld::ComboBoxEntry& rEntry){ return rEntry.sId == aNewEntry.sId; }) != rEntries.end()) +continue; +rEntries.push_back(aNewEntry); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/svdraw/svdpage.cxx | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) New commits: commit be3b9945edc1ef767400fc143494a96c76712041 Author: Armin Le Grand AuthorDate: Wed Dec 5 10:56:29 2018 +0100 Commit: Thorsten Behrens CommitDate: Fri Dec 7 10:19:27 2018 +0100 tdf#121022 Do change parent of SdrObj early Need to change parent of an SdrObject in the according SdrObjList methods before calling InsertedStateChange - that one relies on asking for the parent of the SdrObject Change-Id: I8c4d39190cafe889b27975941d72afca870e2ce5 Reviewed-on: https://gerrit.libreoffice.org/64608 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit b38f856f234f364199d306226875471ed589b764) Reviewed-on: https://gerrit.libreoffice.org/64706 Tested-by: Xisco Faulí Reviewed-by: Thorsten Behrens diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index c56b06d6c954..3706eee5a2c9 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -384,8 +384,14 @@ SdrObject* SdrObjList::NbcRemoveObject(size_t nObjNum) pObj->GetViewContact().flushViewObjectContacts(); DBG_ASSERT(pObj->IsInserted(),"The object does not have the status Inserted."); -pObj->InsertedStateChange(); // calls UserCall, among other + +// tdf#121022 Do first remove from SdrObjList - InsertedStateChange +// relies now on IsInserted which uses getParentSdrObjListFromSdrObject SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); + +// calls UserCall, among other +pObj->InsertedStateChange(); + if (!mbObjOrdNumsDirty) { // optimizing for the case that the last object has to be removed @@ -426,9 +432,13 @@ SdrObject* SdrObjList::RemoveObject(size_t nObjNum) pObj->getSdrModelFromSdrObject().SetChanged(); -pObj->InsertedStateChange(); // calls, among other things, the UserCall +// tdf#121022 Do first remove from SdrObjList - InsertedStateChange +// relies now on IsInserted which uses getParentSdrObjListFromSdrObject SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); +// calls, among other things, the UserCall +pObj->InsertedStateChange(); + if (!mbObjOrdNumsDirty) { // optimization for the case that the last object is removed @@ -475,18 +485,28 @@ SdrObject* SdrObjList::ReplaceObject(SdrObject* pNewObj, size_t nObjNum) pObj->getSdrModelFromSdrObject().Broadcast(aHint); } -pObj->InsertedStateChange(); +// Change parent and replace in SdrObjList SetParentAtSdrObjectFromSdrObjList(*pObj, nullptr); ReplaceObjectInContainer(*pNewObj,nObjNum); -// flushViewObjectContacts() clears the VOC's and those invalidate +// tdf#121022 InsertedStateChange uses the parent +// to detect if pObj is inserted or not, so have to call +// it *after* changing these settings, else a obviously wrong +// 'SdrUserCallType::Inserted' would be sent +pObj->InsertedStateChange(); + +// flushViewObjectContacts() clears the VOC's and those +// trigger the evtl. needed invalidate(s) pObj->GetViewContact().flushViewObjectContacts(); +// Setup data at new SdrObject - it already *is* inserted to +// the SdrObjList due to 'ReplaceObjectInContainer' above pNewObj->SetOrdNum(nObjNum); SetParentAtSdrObjectFromSdrObjList(*pNewObj, this); // Inform the parent about change to allow invalidations at -// evtl. existing parent visualisations +// evtl. existing parent visualisations, but also react on +// newly inserted SdrObjects (as e.g. GraphCtrlUserCall does) impChildInserted(*pNewObj); pNewObj->InsertedStateChange(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/unodraw/unoshape.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit d4190685ac208677bc77f66976287dda0360c42d Author: Markus Mohrhard AuthorDate: Fri Nov 23 01:21:29 2018 +0100 Commit: Caolán McNamara CommitDate: Fri Nov 23 10:35:33 2018 +0100 tdf#114836, only set changed SfxItemSet properties By always setting all existing properties again the calls started to differ between XMultiPropertySet::setPropertyValues and XPropertySet::setPropertyValue. This patch reduces the changes in the called methods. We can not avoid slight differences but at least the risk is minimized that something is unexpectedly changed. Change-Id: I5866db7be2829e6aba930f620f45db655df4e3f7 Reviewed-on: https://gerrit.libreoffice.org/63854 Tested-by: Jenkins Reviewed-by: Markus Mohrhard (cherry picked from commit 80cf278d365a2d357c70b8c28947c91fa97e7a99) Reviewed-on: https://gerrit.libreoffice.org/63856 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 5314fffc2050..b89188720c65 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1623,7 +1623,11 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& { if( mpImpl->mpItemSet == nullptr ) { -mpImpl->mpItemSet = GetSdrObject()->GetMergedItemSet().Clone(); +mpImpl->mpItemSet.reset(new SfxItemSet( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool(), {{pMap->nWID, pMap->nWID}})); +} +else +{ +mpImpl->mpItemSet->MergeRange(pMap->nWID, pMap->nWID); } pSet = mpImpl->mpItemSet.get(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/form/fmexpl.cxx |3 ++- svx/source/form/navigatortree.cxx |4 ++-- svx/source/form/navigatortreemodel.cxx |4 ++-- svx/source/inc/fmexpl.hxx |2 +- 4 files changed, 7 insertions(+), 6 deletions(-) New commits: commit c4b76e9cb2cddfcc758a6459255bf3c1704ad990 Author: Noel Grandin AuthorDate: Wed Nov 21 10:22:39 2018 +0200 Commit: Noel Grandin CommitDate: Wed Nov 21 13:56:22 2018 +0100 tdf#121540 crash deleting a form from form navigator regression from commit eec9f6c8b928de38dd9e683f46bfab00f3243048 Date: Mon Jun 4 15:01:43 2018 +0200 loplugin:useuniqueptr in FmEntryDataList and rename the method to make the it's operation clearer Reviewed-on: https://gerrit.libreoffice.org/63694 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 2edc8c53433be4423d7b009c9f60ed732d554816) Change-Id: Ife366f02c3d8907c397345d825ef7d1721d8930c Reviewed-on: https://gerrit.libreoffice.org/63704 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 8fec9e0f5798..8f636b92d962 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -132,13 +132,14 @@ FmEntryDataList::~FmEntryDataList() } -void FmEntryDataList::remove( FmEntryData* pItem ) +void FmEntryDataList::removeNoDelete( FmEntryData* pItem ) { auto aEnd = maEntryDataList.end(); for ( auto it = maEntryDataList.begin(); it != aEnd; ++it ) { if ( it->get() == pItem ) { +it->release(); maEntryDataList.erase( it ); return; } diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 29392f811489..2a44e7d9953a 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1053,9 +1053,9 @@ namespace svxform // remove from parent if (pCurrentParentUserData) -pCurrentParentUserData->GetChildList()->remove( pCurrentUserData ); +pCurrentParentUserData->GetChildList()->removeNoDelete( pCurrentUserData ); else -GetNavModel()->GetRootList()->remove( pCurrentUserData ); +GetNavModel()->GetRootList()->removeNoDelete( pCurrentUserData ); // remove from container sal_Int32 nIndex = getElementPos(xContainer, xCurrentChild); diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 62ce8a327dc0..c178c68b6439 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -415,10 +415,10 @@ namespace svxform // remove from parent if (pFolder) -pFolder->GetChildList()->remove( pEntry ); +pFolder->GetChildList()->removeNoDelete( pEntry ); else { -GetRootList()->remove( pEntry ); +GetRootList()->removeNoDelete( pEntry ); // If root has no more form, reset CurForm at shell if ( !GetRootList()->size() ) diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 4f26008fa054..6e751c2921f8 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -197,7 +197,7 @@ public: { return maEntryDataList.at(Index).get(); } size_t size() const { return maEntryDataList.size(); } -voidremove( FmEntryData* pItem ); +voidremoveNoDelete( FmEntryData* pItem ); voidinsert( std::unique_ptr pItem, size_t Index ); voidclear(); }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/dialog/charmap.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit c763002727049752879dd81daf6ee59a8a9d0da9 Author: Caolán McNamara AuthorDate: Mon Nov 19 14:21:10 2018 + Commit: Caolán McNamara CommitDate: Mon Nov 19 22:05:55 2018 +0100 tdf#121232 set a size request that will result in a 0 m_nXGap by default Change-Id: I25ce389bd46beff2dd9b0507581736f2f9511383 Reviewed-on: https://gerrit.libreoffice.org/63575 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 1b78839c4f97..0d8a869a63d6 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -82,8 +82,16 @@ SvxShowCharSet::SvxShowCharSet(std::unique_ptr pScrolledWi void SvxShowCharSet::SetDrawingArea(weld::DrawingArea* pDrawingArea) { CustomWidgetController::SetDrawingArea(pDrawingArea); -mxScrollArea->set_size_request(COLUMN_COUNT * pDrawingArea->get_approximate_digit_width() * 4, - ROW_COUNT * pDrawingArea->get_text_height() * 2); + +Size aSize(COLUMN_COUNT * pDrawingArea->get_approximate_digit_width() * 5.25, + ROW_COUNT * pDrawingArea->get_text_height() * 2); + +nX = aSize.Width() / COLUMN_COUNT; +nY = aSize.Height() / ROW_COUNT; + +// tdf#121232 set a size request that will result in a 0 m_nXGap by default +mxScrollArea->set_size_request(COLUMN_COUNT * nX + mxScrollArea->get_vscroll_width() + 2, + ROW_COUNT * nY); } void SvxShowCharSet::init() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svx/source
svx/source/tbxctrls/tbcontrl.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 6fe56989cfe0c4aa58cd8532db9cfdb5116f2a73 Author: Maxim Monastirsky AuthorDate: Fri Nov 9 01:36:33 2018 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Nov 19 13:43:25 2018 +0100 tdf#121267 Handle missing diagonal borders Regression of 9125a4f3f63a7f49fd307908c181e999120063e0 ("Use FeatureStateEvent directly for status updates"). Change-Id: I57856c5707fffcf84f95afa9ef80a394b550c56f Reviewed-on: https://gerrit.libreoffice.org/63497 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky (cherry picked from commit f162066d9df814086c92fa008c563ffc08daaf98) Reviewed-on: https://gerrit.libreoffice.org/63551 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 2a50eb6329b7..f4d85d734526 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1952,8 +1952,13 @@ bool BorderColorStatus::statusChanged( const css::frame::FeatureStateEvent& rEve else { css::table::BorderLine2 aTable; -if ( rEvent.IsEnabled && ( rEvent.State >>= aTable ) ) -aColor = Color(aTable.Color); +if ( rEvent.IsEnabled ) +rEvent.State >>= aTable; + +SvxBorderLine aLine; +SvxBoxItem::LineToSvxLine( aTable, aLine, false ); +if ( !aLine.isEmpty() ) +aColor = aLine.GetColor(); if ( rEvent.FeatureURL.Complete == ".uno:BorderTLBR" ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits