[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/svdraw/svdundo.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 891eb765c393c0f113e87c0949da9bc01f97584d Author: Caolán McNamara AuthorDate: Thu Apr 4 12:22:06 2019 +0100 Commit: Michael Stahl CommitDate: Wed Apr 10 11:51:09 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/70409 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index b70efa10699c..d5cc99c4d808 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -723,7 +723,7 @@ void SdrUndoRemoveObj::Redo() { ImplUnmarkObject( pObj ); E3DModifySceneSnapRectUpdater aUpdater(pObj); -pObjList->RemoveObject(nOrdNum); +pObjList->RemoveObject(pObj->GetOrdNum()); } // Trigger PageChangeCall @@ -745,7 +745,7 @@ void SdrUndoInsertObj::Undo() { ImplUnmarkObject( pObj ); -SdrObject* pChkObj= pObjList->RemoveObject(nOrdNum); +SdrObject* pChkObj= pObjList->RemoveObject(pObj->GetOrdNum()); DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj"); } } @@ -901,7 +901,7 @@ void SdrUndoReplaceObj::Undo() SetNewOwner(true); ImplUnmarkObject( pNewObj ); -pObjList->ReplaceObject(pObj,nOrdNum); +pObjList->ReplaceObject(pObj,pNewObj->GetOrdNum()); } else { @@ -919,7 +919,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-1' - svx/source
svx/source/xml/xmlgrhlp.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 0c0cdc8e3fa4566e8f2aee77a584b4ee43faaa2d Author: Bartosz Kosiorek AuthorDate: Mon Mar 4 23:46:52 2019 +0100 Commit: Bartosz Kosiorek CommitDate: Thu Mar 7 21:25: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 (cherry picked from commit 36f027769ea6aaabb5e993a321d7a56775d4bee1) Reviewed-on: https://gerrit.libreoffice.org/68730 diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 3ebb6730b928..ebcf2334a3b6 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -742,6 +742,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Referencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 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 01d140e2205306159da57b9ec703e1a54802115c Author: Aditya AuthorDate: Sun Feb 24 21:17:14 2019 +0530 Commit: Michael Stahl CommitDate: Fri Mar 1 14:53:39 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. Change-Id: Ib84435854389360eba41aecb8578a9a67a92ca1e Reviewed-on: https://gerrit.libreoffice.org/67483 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit 55042cb54fea5f7ad777c03af9bf8197127b6736) Reviewed-on: https://gerrit.libreoffice.org/68546 Reviewed-by: Michael Stahl diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index d23ad52bc89e..661638412180 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 e1c157ee3afe..824abf938b79 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( this, ) ) +// 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( this, )) { -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-1' - svx/source
svx/source/form/fmshell.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 13d62e9c6dec6ea90bb34b1dc4cc2aa52c4bea36 Author: Caolán McNamara AuthorDate: Mon Jan 28 17:09:33 2019 + Commit: Xisco Faulí CommitDate: Tue Jan 29 10:47:11 2019 +0100 Resolves: tdf#123019 give modal dialog a parent Change-Id: I669d8cb18ed78fcdb50aa3f452661500d75ad880 Reviewed-on: https://gerrit.libreoffice.org/67023 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 4a77bfc43496..f52118659376 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -247,7 +247,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-1' - svx/source
svx/source/tbxctrls/tbcontrl.cxx | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit 93f26a66a4f6a13beb053edbdba9f906370bf968 Author: Caolán McNamara AuthorDate: Fri Dec 21 13:16:14 2018 + Commit: Michael Stahl CommitDate: Fri Jan 11 18:38:02 2019 +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/65543 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index ee7028e439a6..be87dcab605e 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -177,6 +177,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 @@ -429,6 +430,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. @@ -452,11 +463,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-1' - svx/source
svx/source/unodraw/unoshape.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit b3af23568f9b9b444ae09f2a1ab4a61d212b422a Author: Markus Mohrhard AuthorDate: Fri Nov 23 01:21:29 2018 +0100 Commit: Caolán McNamara CommitDate: Fri Nov 23 10:35:18 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/63857 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 f2bfa4f94bd8..1a187f773d64 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1687,7 +1687,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-1' - svx/source
svx/source/tbxctrls/tbcontrl.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit d01ad3a3c715900de6448c3010d41f3b75fb6103 Author: Maxim Monastirsky AuthorDate: Fri Nov 9 01:36:33 2018 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Nov 19 13:43:58 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/63552 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d7c5031004da..ee7028e439a6 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1958,8 +1958,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
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/svdraw/svdobj.cxx | 57 +-- 1 file changed, 55 insertions(+), 2 deletions(-) New commits: commit f05a551a6b49916241696481567e32b320c6749b Author: Armin Le Grand AuthorDate: Wed Oct 31 20:47:49 2018 +0100 Commit: Thorsten Behrens CommitDate: Thu Nov 1 19:35:10 2018 +0100 tdf#120728 support SvxShape for SdrShape if not inserted Added a fallback to allow correct SvxShape construction when SdrObject is not yet inserted - or has no SdrPage yet. This is needed ue to the paradigm change that a SdrObject only has a SdrPage when it is inserted. For more info and a discussion, see added comments. Change-Id: I2c1a4b1bbb531501ee73ab1c98c13321c5c0b050 Reviewed-on: https://gerrit.libreoffice.org/62710 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit 52bbb04f1e39b2d778275c91f77b6c0714ecd0d0) Reviewed-on: https://gerrit.libreoffice.org/62738 Tested-by: Xisco Faulí Reviewed-by: Thorsten Behrens diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 5b313c907358..7300dbe2f5b8 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2815,9 +2815,58 @@ css::uno::Reference< css::uno::XInterface > SdrObject::getUnoShape() if( !xShape.is() ) { OSL_ENSURE( mpSvxShape == nullptr, "SdrObject::getUnoShape: XShape already dead, but still an IMPL pointer!" ); -if ( getSdrPageFromSdrObject() ) + +// try to access SdrPage from this SdrObject. This will only exist if the SdrObject is +// inserted in a SdrObjList (page/group/3dScene) +SdrPage* pPageCandidate(getSdrPageFromSdrObject()); + +// tdf#12152, tdf#120728 +// +// With the paradigm change to only get a SdrPage for a SdrObject when the SdrObject +// is *inserted*, the functionality for creating 1:1 associated UNO API implementation +// SvxShapes was partially broken: The used ::CreateShape relies on the SvxPage being +// derived and the CreateShape method overloaded, implementing additional SdrInventor +// types as needed. +// +// The fallback to use SvxDrawPage::CreateShapeByTypeAndInventor is a trap: It's only +// a static fallback that handles the SdrInventor types SdrInventor::E3d and +// SdrInventor::Default. Due to that, e.g. the ReportDesigner broke in various conditions. +// +// That again has to do with the ReportDesigner being implemented using the UNO API +// aspects of SdrObjects early during their construction, not just after these are +// inserted to a SdrPage - but that is not illegal or wrong, the SdrObject exists already. +// +// As a current solution, use the (now always available) SdrModel and any of the +// existing SdrPages. The only important thing is to get a SdrPage where ::CreateShape is +// overloaded and implemented as needed. +// +// Note for the future: +// In a more ideal world there would be only one factory method for creating SdrObjects (not +// ::CreateShape and ::CreateShapeByTypeAndInventor). This also would not be placed at +// SdrPage/SvxPage at all, but at the Model where it belongs - where else would you expect +// objects for the current Model to be constructed? To have this at the Page only would make +// sense if different shapes would need to be constructed for different Pages in the same Model +// - this is never the case. +// At that Model extended functionality for that factory (or overloads and implementations) +// should be placed. But to be realistic, migrating the factories to Model now is too much +// work - maybe over time when melting SdrObject/SvxObject one day... +if(nullptr == pPageCandidate) +{ +// If not inserted, alternatively access a SdrPage using the SdrModel. There is +// no reason not to create and return a UNO API XShape when the SdrObject is not +// inserted - it may be in construction. Main paradigm is that it exists. +if(0 != getSdrModelFromSdrObject().GetPageCount()) +{ +// Take 1st SdrPage. That may be e.g. a special page (in SD), but the +// to-be-used method ::CreateShape will be correctly overloaded in +// all cases +pPageCandidate = getSdrModelFromSdrObject().GetPage(0); +} +} + +if(nullptr != pPageCandidate) { -uno::Reference< uno::XInterface > xPage( getSdrPageFromSdrObject()->getUnoPage() ); +uno::Reference< uno::XInterface > xPage(pPageCandidate->getUnoPage()); if( xPage.is() ) { SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation(xPage); @@
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/fmcomp/gridctrl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 21fc0ce61a25a7ab6f9bb83cecfd880f17033c4e Author: Lionel Elie Mamane AuthorDate: Thu Oct 4 16:16:46 2018 +0200 Commit: Caolán McNamara CommitDate: Thu Oct 11 10:01:20 2018 +0200 tdf#119564 column id is not always the same as position GetColumnAtXPosPixel returns the column position (index in mvCols vector), _not_ the column id! These differ in particular when some columns are hidden. Change-Id: Ifc068bd3cc090969278f10e48d9d7d3f8a682e13 Reviewed-on: https://gerrit.libreoffice.org/60975 Tested-by: Jenkins Reviewed-by: Lionel Elie Mamane (cherry picked from commit 2f792ac91fdaaea1df38e64833dd1c258bb41c03) Reviewed-on: https://gerrit.libreoffice.org/61619 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 2048e63e7a35..eb81535f5018 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2774,7 +2774,7 @@ bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId) return (_nRow >= 0) && (_nRow < GetRowCount()) && (_nColId != HandleColumnId) -&& (_nColId <= ColCount()); +&& (GetModelColumnPos(_nColId) != GRID_COLUMN_NOT_FOUND); } void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId) @@ -2821,7 +2821,7 @@ void DbGridControl::Command(const CommandEvent& rEvt) } } -sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); +sal_uInt16 nColId = GetColumnId(GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X())); long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y()); if (nColId == HandleColumnId) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/dialog/srchdlg.cxx | 66 +++--- 1 file changed, 55 insertions(+), 11 deletions(-) New commits: commit 7dbe17d5a6b866cca9b81418f3f0cd1d32214265 Author: Caolán McNamara AuthorDate: Thu Oct 4 15:37:14 2018 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sun Oct 7 21:41:09 2018 +0200 Resolves: tdf#106340 resize dialog when search/replace labels are shown/hidden Change-Id: I1e20807f613a73c7dbefcb8e331f99d484eb5c04 Reviewed-on: https://gerrit.libreoffice.org/61394 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 6a999380ee7a..ec59bef81287 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1103,6 +1103,8 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, memcpy( pImpl->pRanges.get(), pTmp, sizeof(sal_uInt16) * nCnt ); } +bool bSetOptimalLayoutSize = false; + // See to it that are the texts of the attributes are correct OUString aDesc; @@ -1119,7 +1121,11 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, if ( !aDesc.isEmpty() ) { -m_pSearchAttrText->Show(); +if (!m_pSearchAttrText->IsVisible()) +{ +m_pSearchAttrText->Show(); +bSetOptimalLayoutSize = true; +} bFormat |= true; } } @@ -1138,11 +1144,18 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, if ( !aDesc.isEmpty() ) { -m_pReplaceAttrText->Show(); +if (!m_pReplaceAttrText->IsVisible()) +{ +m_pReplaceAttrText->Show(); +bSetOptimalLayoutSize = true; +} bFormat |= true; } } } + +if (bSetOptimalLayoutSize) +setOptimalLayoutSize(); } @@ -1569,8 +1582,12 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, Button*, void) if(!sDesc.isEmpty()) { -m_pSearchAttrText->Show(); -m_pReplaceAttrText->Show(); +if (!m_pReplaceAttrText->IsVisible() || !m_pReplaceAttrText->IsVisible()) +{ +m_pSearchAttrText->Show(); +m_pReplaceAttrText->Show(); +setOptimalLayoutSize(); +} } } m_pFormatBtn->Disable(); @@ -1596,8 +1613,12 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl, Button*, void) if(!sDesc.isEmpty()) { -m_pSearchAttrText->Show(); -m_pReplaceAttrText->Show(); +if (!m_pReplaceAttrText->IsVisible() || !m_pReplaceAttrText->IsVisible()) +{ +m_pSearchAttrText->Show(); +m_pReplaceAttrText->Show(); +setOptimalLayoutSize(); +} } EnableControl_Impl(m_pFormatBtn); @@ -2093,19 +2114,32 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl, Button*, void) bFormat = false; m_pLayoutBtn->Check( false ); +bool bSetOptimalLayoutSize = false; + if ( bSearch ) { pSearchList->Clear(); m_pSearchAttrText->SetText( "" ); -m_pSearchAttrText->Hide(); +if (m_pSearchAttrText->IsVisible()) +{ +m_pSearchAttrText->Hide(); +bSetOptimalLayoutSize = true; +} } else { pReplaceList->Clear(); m_pReplaceAttrText->SetText( "" ); -m_pReplaceAttrText->Hide(); +if (m_pReplaceAttrText->IsVisible()) +{ +m_pReplaceAttrText->Hide(); +bSetOptimalLayoutSize = true; +} } +if (bSetOptimalLayoutSize) +setOptimalLayoutSize(); + pImpl->bSaveToModule = false; TemplateHdl_Impl(m_pLayoutBtn); pImpl->bSaveToModule = true; @@ -2221,24 +2255,34 @@ void SvxSearchDialog::PaintAttrText_Impl() if ( !bFormat && !aDesc.isEmpty() ) bFormat = true; +bool bSetOptimalLayoutSize = false; + if ( bSearch ) { m_pSearchAttrText->SetText( aDesc ); -if(!aDesc.isEmpty()) +if (!aDesc.isEmpty() && !m_pSearchAttrText->IsVisible()) +{ m_pSearchAttrText->Show(); +bSetOptimalLayoutSize = true; +} FocusHdl_Impl(*m_pSearchLB); } else { m_pReplaceAttrText->SetText( aDesc ); -if(!aDesc.isEmpty()) +if (!aDesc.isEmpty() && !m_pReplaceAttrText->IsVisible()) +{ m_pReplaceAttrText->Show(); +bSetOptimalLayoutSize = true; +} FocusHdl_Impl(*m_pReplaceLB); } -} +if (bSetOptimalLayoutSize) +setOptimalLayoutSize(); +} void
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/sdr/properties/properties.cxx | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) New commits: commit ffdf0f99bd459e0f422592de373d0ec6a0d9926c Author: Armin Le Grand AuthorDate: Tue Jul 17 18:39:23 2018 +0200 Commit: Caolán McNamara CommitDate: Thu Oct 4 11:06:46 2018 +0200 tdf#118139 Set Default StyleSheet only when available Change-Id: Id8643895add3181c41737249326bb49e1a2c2493 Reviewed-on: https://gerrit.libreoffice.org/57582 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit 7d2668517b68f9a7f056a993e53b4dd80838a4f9) Reviewed-on: https://gerrit.libreoffice.org/61315 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index bdaaec8d..61929a9b498a 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -43,8 +43,17 @@ namespace sdr void BaseProperties::applyDefaultStyleSheetFromSdrModel() { -// do not delete hard attributes when setting dsefault Style - SetStyleSheet(GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet(), true); +SfxStyleSheet* pDefaultStyleSheet(GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet()); + +// tdf#118139 Only do this when StyleSheet really differs. It may e.g. +// be the case that nullptr == pDefaultStyleSheet and there is none set yet, +// so indeed no need to set it (needed for some strange old MSWord2003 +// documents with CustomShape-'Group' and added Text-Frames, see task description) +if(pDefaultStyleSheet != GetStyleSheet()) +{ +// do not delete hard attributes when setting dsefault Style +SetStyleSheet(pDefaultStyleSheet, true); +} } const SdrObject& BaseProperties::GetSdrObject() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/table/cell.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 7239716e4307a348d818606340e34b4fc6ceb282 Author: Armin Le Grand AuthorDate: Wed Jul 4 09:45:45 2018 +0200 Commit: Caolán McNamara CommitDate: Thu Oct 4 11:04:59 2018 +0200 tdf#118199 avoid double dispose actions Cell::dispose may be (and gets in this case) called multiple times. Do not double-cleanup stuff. Change-Id: Icb907968e8211eb4ba0bbb1c4d060eb8be9a874a Reviewed-on: https://gerrit.libreoffice.org/56924 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit ea39c41fdf63191579d25f327db81db14862251c) Reviewed-on: https://gerrit.libreoffice.org/61318 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 8eadbd453804..e402c483a5ba 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -442,8 +442,13 @@ void Cell::dispose() mxTable.clear(); } -mpProperties.reset(); -SetOutlinerParaObject( nullptr ); +// tdf#118199 avoid double dispose, detect by using mpProperties +// as indicator. Only use SetOutlinerParaObject once +if( mpProperties ) +{ +mpProperties.reset(); +SetOutlinerParaObject( nullptr ); +} } void Cell::merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx | 35 -- svx/source/svdraw/svditer.cxx |8 +++ 2 files changed, 29 insertions(+), 14 deletions(-) New commits: commit 316281cf1d888a4bac9f1e40e92c66405480249c Author: Armin Le Grand AuthorDate: Tue Jul 17 10:20:04 2018 +0200 Commit: Thorsten Behrens CommitDate: Wed Oct 3 10:28:53 2018 +0200 tdf#118498 Correct CustomShape 3D Visualization Change-Id: Ic312190616044f37fd92464ad605c6e0cdd5cc4d Reviewed-on: https://gerrit.libreoffice.org/57547 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit ee71c3def71508d1fc3e110659c7ed7aa0ba2238) Reviewed-on: https://gerrit.libreoffice.org/61207 Reviewed-by: Thorsten Behrens diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 8cabe8d261bf..10089a8b0dd0 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -125,22 +125,29 @@ namespace sdr // Hack for calc, transform position of object according // to current zoom so as objects relative position to grid // appears stable +// : Need to check what *exactly* this is doing - in it's current +// form it's indeed pretty much a 'hack' as mentioned above and massively +// in the way for future changes... const_cast< SdrObject* >( pSdrObjRepresentation )->SetGridOffset( aGridOff ); -SdrObjListIter aIterator(*pSdrObjRepresentation); -while(aIterator.IsMore()) -{ -SdrObject& rCandidate = *aIterator.Next(); -// apply offset to each part -rCandidate.SetGridOffset( aGridOff ); -if(!b3DShape && dynamic_cast< E3dObject* >()) -{ -b3DShape = true; -} - -const drawinglayer::primitive2d::Primitive2DContainer xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DContainer()); -xGroup.insert(xGroup.end(), xNew.begin(), xNew.end()); -} +// tdf#118498 The processing of SdrObjListIter for SdrIterMode::DeepNoGroups +// did change for 3D-Objects, it now correctly enters and iterates the +// SdrObjects in the E3dScene (same as for SdrObjGroup). This is more correct +// as the old version which just checked for dynamic_cast +// and *only* entered these, ignoring E3dScene as grouping-object. +// But how to fix that? Taking back the SdrObjListIter change would be easy, but +// not correct. After checking ViewContactOfE3dScene and ViewContactOfGroup +// I see that both traverse their children by themselves (on VC-Level, +// see createViewIndependentPrimitive2DSequence implementations and usage of +// GetObjectCount()). Thus in principle iterating here (esp. 'deep') seems to +// be wrong anyways, it might have even created wrong and double geometries +// (only with complex CustomShapes with multiple representation SdrObects and +// only visible when transparency involved, but runtime-expensive). +// Thus: Just do not iterate, will check behaviour deeply. +b3DShape = (nullptr != dynamic_cast< const E3dObject* >(pSdrObjRepresentation)); +const drawinglayer::primitive2d::Primitive2DContainer xNew( + pSdrObjRepresentation->GetViewContact().getViewIndependentPrimitive2DContainer()); +xGroup.insert(xGroup.end(), xNew.begin(), xNew.end()); } if(bHasText || !xGroup.empty()) diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx index 2e8b8a8e1035..45134a7fb86e 100644 --- a/svx/source/svdraw/svditer.cxx +++ b/svx/source/svdraw/svditer.cxx @@ -123,6 +123,14 @@ void SdrObjListIter::ImpProcessMarkList(const SdrMarkList& rMarkList, SdrIterMod void SdrObjListIter::ImpProcessObj(const SdrObject& rSdrObject, SdrIterMode eMode) { +// : Note: The behaviour has changed here, it will now deep-iterate +// for SdrObjGroup and E3dScene. Old version only deep-dived for SdrObjGroup, +// E3dScene was just added flat. This is now more correct, but potentially +// there will exist code in the 3D area that *self-iterates* with local +// functions/methods due to this iterator was not doing the expected thing. +// These will be difficult to find, but in most cases should do no harm, +// but cost runtime. Will need to have an eye on this aspect on continued +// changes...
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/form/formcontroller.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 8dbcd72f83e2317dd40c0fa605fd26b3f6a2616b Author: Julien Nabet AuthorDate: Tue Oct 2 20:40:24 2018 +0200 Commit: Julien Nabet CommitDate: Wed Oct 3 05:12:54 2018 +0200 tdf#120245: Accept to insert empty field with 'not null' database constraint See https://bugs.documentfoundation.org/show_bug.cgi?id=120245#c4 Change-Id: I9ac852a83e0a57c34ef3640bf0fb0e6a3394db63 Reviewed-on: https://gerrit.libreoffice.org/61269 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 881f1ec84967..f3a10ee3c0da 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3730,8 +3730,7 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent if ( rColInfo.bReadOnly ) continue; -if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() - && rColInfo.nNullable != ColumnValue::NO_NULLS ) +if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() ) { continue; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/sdr/properties/measureproperties.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit a3fa7c4e04c489f8d8ec6db3385e965900d801a3 Author: Armin Le Grand AuthorDate: Sun Sep 16 10:49:42 2018 +0200 Commit: Armin Le Grand CommitDate: Mon Sep 17 11:27:34 2018 +0200 tdf#118203 Avoid endless recussion in MeasureObject Change-Id: I1e6fff80e7b6d36830f61387cc5245fc54877d95 Reviewed-on: https://gerrit.libreoffice.org/60546 Tested-by: Jenkins Reviewed-by: Julien Nabet Reviewed-by: Armin Le Grand (cherry picked from commit d357e50fa1734da0bf341dbd49fc0596011bdfe3) Reviewed-on: https://gerrit.libreoffice.org/60557 Tested-by: Xisco Faulí diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx index ddf0159437b9..a62f49ae0d59 100644 --- a/svx/source/sdr/properties/measureproperties.cxx +++ b/svx/source/sdr/properties/measureproperties.cxx @@ -88,15 +88,15 @@ namespace sdr // get access to dimension line object SdrMeasureObj& rObj = static_cast(GetSdrObject()); +// call parent +TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); + // local changes // mark dimension line text as changed (dirty) in the dimension line object rObj.SetTextDirty(); // tdf#98525 ask the dimension line object to redraw the changed text rObj.UndirtyText(); - -// call parent -TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr); } void MeasureProperties::ForceDefaultAttributes() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/form/formcontroller.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 3448ca93eb46365d05387f7f3512c706bdb987c4 Author: Julien Nabet AuthorDate: Thu Sep 6 20:52:26 2018 +0200 Commit: Julien Nabet CommitDate: Fri Sep 7 12:00:24 2018 +0200 tdf#75341: fix condition to approve row (form) Considering rColInfo.nNullable != ColumnValue::NO_NULLS is ok to approve row isn't sufficient in the case the field is "Input required" in form. Change-Id: I27c57fe8ce5afac97eb0650f9370c85f1421 Reviewed-on: https://gerrit.libreoffice.org/60109 (cherry picked from commit dbb444e4ed7c19a11733ce8438bbb6546d42f852) Reviewed-on: https://gerrit.libreoffice.org/60125 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index c302f4dee524..881f1ec84967 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3723,8 +3723,6 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent for ( size_t col = 0; col < colCount; ++col ) { const ColumnInfo& rColInfo = m_pColumnInfoCache->getColumnInfo( col ); -if ( rColInfo.nNullable != ColumnValue::NO_NULLS ) -continue; if ( rColInfo.bAutoIncrement ) continue; @@ -3732,8 +3730,11 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent if ( rColInfo.bReadOnly ) continue; -if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() ) +if ( !rColInfo.xFirstControlWithInputRequired.is() && !rColInfo.xFirstGridWithInputRequiredColumn.is() + && rColInfo.nNullable != ColumnValue::NO_NULLS ) +{ continue; +} // TODO: in case of binary fields, this "getString" below is extremely expensive if ( !rColInfo.xColumn->getString().isEmpty() || !rColInfo.xColumn->wasNull() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/form/formcontroller.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit c9d15d30b66102aff3f3e10bb8243edf2ab77334 Author: Julien Nabet AuthorDate: Wed Sep 5 23:25:36 2018 +0200 Commit: Lionel Elie Mamane CommitDate: Fri Sep 7 10:16:23 2018 +0200 tdf#91837: fix deinitializeControls (forms) m_bControlsInitialized wasn't ever reset to false Change-Id: I9f7bd6504ccaa0a41c9cb075c1ba33436f0f97dc Reviewed-on: https://gerrit.libreoffice.org/60059 (cherry picked from commit d80b3235cc106e17a0c10dea44e8afa8db724400) Reviewed-on: https://gerrit.libreoffice.org/60065 Reviewed-by: Lionel Elie Mamane Tested-by: Lionel Elie Mamane diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 19b11f16caa1..c302f4dee524 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -325,6 +325,7 @@ void ColumnInfoCache::deinitializeControls() { lcl_resetColumnControlInfo( *col ); } +m_bControlsInitialized = 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-1' - svx/source
svx/source/dialog/dlgctrl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b50e03fd9b56bcedf1dcc7ccfd16b223e39271bc Author: Caolán McNamara AuthorDate: Tue Aug 28 17:20:21 2018 +0100 Commit: Caolán McNamara CommitDate: Tue Aug 28 20:47:36 2018 +0200 tdf#119122 first (5%) pattern initially drawn with too many black cells pattern of area tab, pattern subtab of e.g. format page and in the pattern editor the 5% style is shown wrong, clicking ona different pattern and then back may make it draw correct a problem since... commit 6fbb6d80fe6203ff6f84ee85ca625b6e60bf5bae Date: Fri Feb 16 16:13:38 2018 +0200 use std::array in createHistorical8x8FromArray to make the assumption about the size of the array obvious in the code. Change-Id: I882384a13dedc7a14b63b3b8a9b764a4367b7cc6 Reviewed-on: https://gerrit.libreoffice.org/59726 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index f5ec3b570d93..2aa91452c139 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1282,7 +1282,7 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectan //Draw Rectangles (squares) rRenderContext.SetLineColor(); -sal_uInt16 nLastPixel = maPixelData[0]; +sal_uInt16 nLastPixel = maPixelData[0] ? 0 : 1; for (i = 0; i < nLines; i++) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/unodraw/unoshape.cxx | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) New commits: commit 876a433607831f5c82bb952582c151ac653841e7 Author: Caolán McNamara AuthorDate: Tue Aug 14 21:05:16 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Aug 16 22:20:25 2018 +0200 Resolves: tdf#114427 crash when basic used to dispose shape Change-Id: Ia078a0f4262fbe18b6cf463dbff33df1d4fd0a95 Reviewed-on: https://gerrit.libreoffice.org/59037 Tested-by: Xisco Faulí Tested-by: Jenkins 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 1ea93dde6d34..c1fc65092c6d 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1339,37 +1339,38 @@ void SAL_CALL SvxShape::dispose() if ( HasSdrObject() ) { -EndListening( GetSdrObject()->getSdrModelFromSdrObject() ); +SdrObject* pObject = GetSdrObject(); + +EndListening( pObject->getSdrModelFromSdrObject() ); bool bFreeSdrObject = false; -if ( GetSdrObject()->IsInserted() && GetSdrObject()->GetPage() ) +if ( pObject->IsInserted() && pObject->GetPage() ) { OSL_ENSURE( HasSdrObjectOwnership(), "SvxShape::dispose: is the below code correct?" ); // normally, we are allowed to free the SdrObject only if we have its ownership. // Why isn't this checked here? -SdrPage* pPage = GetSdrObject()->GetPage(); +SdrPage* pPage = pObject->GetPage(); // delete the SdrObject from the page const size_t nCount = pPage->GetObjCount(); for ( size_t nNum = 0; nNum < nCount; ++nNum ) { -if ( pPage->GetObj( nNum ) == GetSdrObject() ) +if ( pPage->GetObj( nNum ) == pObject ) { -OSL_VERIFY( pPage->RemoveObject( nNum ) == GetSdrObject() ); +OSL_VERIFY( pPage->RemoveObject( nNum ) == pObject ); bFreeSdrObject = true; break; } } } -GetSdrObject()->setUnoShape(nullptr); +pObject->setUnoShape(nullptr); if ( bFreeSdrObject ) { // in case we have the ownership of the SdrObject, a Free // would do nothing. So ensure the ownership is reset. mpImpl->mbHasSdrObjectOwnership = false; -SdrObject* pObject = GetSdrObject(); SdrObject::Free( pObject ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/sidebar/line/LinePropertyPanel.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 24e3426546718a9df1c0066b1f955b1d0fe4d4ea Author: Xisco Fauli AuthorDate: Wed Aug 8 19:07:06 2018 +0200 Commit: Xisco Faulí CommitDate: Wed Aug 15 11:57:20 2018 +0200 tdf#101254: Enable arrowheads in sidebar for draws It's enabled in Line and Filling toolbar so do the same in the sidebar Change-Id: Icc64705268a9efb46ab463131ddf486dad12f085 Reviewed-on: https://gerrit.libreoffice.org/58747 Reviewed-by: Julien Nabet Tested-by: Julien Nabet Tested-by: Jenkins Reviewed-by: Xisco Faulí (cherry picked from commit ffc61735fe804913e55db45ae4d533c8980c2e6a) Reviewed-on: https://gerrit.libreoffice.org/58754 diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index d48dd7afac7e..1ea655b733a6 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -188,6 +188,7 @@ void LinePropertyPanel::HandleContextChange( { case CombinedEnumContext(Application::Calc, Context::DrawLine): case CombinedEnumContext(Application::DrawImpress, Context::DrawLine): +case CombinedEnumContext(Application::DrawImpress, Context::Draw): case CombinedEnumContext(Application::WriterVariants, Context::Draw): // TODO : Implement DrawLine context in Writer bShowArrows = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/svdraw/svdopath.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit eabb2bf06aba0de81a6d1e7715859fa63379325b Author: Caolán McNamara AuthorDate: Mon Aug 13 09:20:19 2018 +0100 Commit: Christian Lohmaier CommitDate: Tue Aug 14 14:06:56 2018 +0200 crashtesting: empty B2DRange range turned into oversized Rectangle with document ooo47086-1.xls Change-Id: Ia43b6b3e3951875280892138c7068348f1b56a7c Reviewed-on: https://gerrit.libreoffice.org/58921 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index c1ff60b573cd..dd4b02e4bb8b 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1659,6 +1659,9 @@ static tools::Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPoly { basegfx::B2DRange aRange(basegfx::utils::getRange(rPolyPolygon)); +if (aRange.isEmpty()) +return tools::Rectangle(); + return tools::Rectangle( FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source sw/source
svx/source/dialog/txencbox.cxx |4 +++- sw/source/ui/dialog/ascfldlg.cxx |2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) New commits: commit 1e749e8c7dd59f4c90ec72e2e092cacac71acc40 Author: Caolán McNamara AuthorDate: Mon Aug 13 10:37:19 2018 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Aug 13 21:09:56 2018 +0200 Reslves: tdf#119212 sort character sets and save useritem Change-Id: I92f00bd982ab00571148c0e74cd9c8772451a246 Reviewed-on: https://gerrit.libreoffice.org/58922 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index b4e446aeee3f..4b6adfc28890 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -226,6 +226,7 @@ void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc ) TextEncodingBox::TextEncodingBox(weld::ComboBoxText* pControl) : m_xControl(pControl) { +m_xControl->make_sorted(); } TextEncodingBox::~TextEncodingBox() @@ -235,6 +236,7 @@ TextEncodingBox::~TextEncodingBox() void TextEncodingBox::FillFromTextEncodingTable( bool bExcludeImportSubsets ) { +m_xControl->freeze(); const sal_uInt32 nCount = SAL_N_ELEMENTS(RID_SVXSTR_TEXTENCODING_TABLE); for (sal_uInt32 j = 0; j < nCount; ++j) { @@ -255,9 +257,9 @@ void TextEncodingBox::FillFromTextEncodingTable( if ( bInsert ) InsertTextEncoding(nEnc, SvxResId(RID_SVXSTR_TEXTENCODING_TABLE[j].first)); } +m_xControl->thaw(); } - void TextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, const OUString& rEntry ) { diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 01a5f1139982..5c780926ae43 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -251,6 +251,8 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh, SwAsciiFilterDlg::~SwAsciiFilterDlg() { +SvtViewOptions aDlgOpt(EViewType::Dialog, OStringToOUString(m_xDialog->get_help_id(), RTL_TEXTENCODING_UTF8)); +aDlgOpt.SetUserItem("UserItem", uno::makeAny(m_sExtraData)); } void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source vcl/opengl
svx/source/svdraw/svdograf.cxx |3 +++ vcl/opengl/salbmp.cxx |6 ++ 2 files changed, 9 insertions(+) New commits: commit d575d17a30c9cc2b517be0ce3661530add4a138c Author: Miklos Vajna AuthorDate: Wed Jul 25 17:02:21 2018 +0200 Commit: Michael Stahl CommitDate: Thu Jul 26 11:28:21 2018 +0200 tdf#118860 svx opengl: avoid SalBitmap creation without solar mutex The bugdoc has 2 slides. When switching to the second slide, the graphic is loaded in the background, but OpenGLSalBitmap::Create() can't work correctly if the caller doesn't own the solar mutex. This already asserts in OpenGLContext::prepareForYield() in a less obvious way. Focus on the correctness, so just hold the solar mutex during the whole ImportGrpahic() call. If it turns out that the purpose of running this on a thread is to avoid synchronous network traffic, then the data could be first copied to a memory stream, and only then take the lock + import the graphic. (cherry picked from commit 919ccaba419531d689231b76a43ab29c6a9ec65a) Change-Id: I88203c12b4e7a5f2b689928c01e2ba953c5b13c5 Reviewed-on: https://gerrit.libreoffice.org/58038 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index aa3df15dcd43..04f7cef91680 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -94,6 +94,9 @@ const Graphic ImpLoadLinkedGraphic( const OUString& aFileName, const OUString& a aFilterData[ 0 ].Name = "CreateNativeLink"; aFilterData[ 0 ].Value <<= true; +// Need to own the solar mutex while creating a SalBitmap. +SolarMutexGuard aGuard; + // #i123042# for e.g SVG the path is needed, so hand it over here. I have no real idea // what consequences this may have; maybe this is not handed over by purpose here. Not // handing it over means that any GraphicFormat that internally needs a path as base diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index caade8ceacce..33fc720ef497 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -117,6 +117,7 @@ OpenGLSalBitmap::~OpenGLSalBitmap() bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long nWidth, long nHeight ) { +DBG_TESTSOLARMUTEX(); static const BitmapPalette aEmptyPalette; OpenGLVCLContextZone aContextZone; @@ -160,6 +161,7 @@ bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, long bool OpenGLSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rBitmapPalette ) { +DBG_TESTSOLARMUTEX(); OpenGLVCLContextZone aContextZone; Destroy(); @@ -185,16 +187,19 @@ bool OpenGLSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapP bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp ) { +DBG_TESTSOLARMUTEX(); return Create( rSalBmp, rSalBmp.GetBitCount() ); } bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ) { +DBG_TESTSOLARMUTEX(); return Create( rSalBmp, pGraphics ? pGraphics->GetBitCount() : rSalBmp.GetBitCount() ); } bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount ) { +DBG_TESTSOLARMUTEX(); OpenGLZone aZone; // check that carefully only in the debug mode @@ -233,6 +238,7 @@ bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount bool OpenGLSalBitmap::Create( const css::uno::Reference< css::rendering::XBitmapCanvas >& /*xBitmapCanvas*/, Size& /*rSize*/, bool /*bMask*/ ) { +DBG_TESTSOLARMUTEX(); // TODO Is this method needed? return 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-1' - svx/source
svx/source/form/datanavi.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 9b18192fc3af465fb424dd8d5a81cd46fc3331b6 Author: Caolán McNamara AuthorDate: Wed Jul 25 10:18:56 2018 +0100 Commit: Eike Rathke CommitDate: Thu Jul 26 00:49:54 2018 +0200 Resolves: tdf#118862 new instances cannot be edited Change-Id: I9b10ff4f043949c7140852ac9ad9106ca611c98c Reviewed-on: https://gerrit.libreoffice.org/57961 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 2446606e373d..bb4732cd945c 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1760,7 +1760,7 @@ namespace svxform bool DataNavigatorWindow::IsAdditionalPage(sal_uInt16 nId) const { -return m_pTabCtrl->GetPagePos(nId) >= 3; +return m_pTabCtrl->GetPageName(nId).isEmpty(); } IMPL_LINK( DataNavigatorWindow, MenuActivateHdl, MenuButton *, pBtn, void ) @@ -1914,8 +1914,10 @@ namespace svxform XFormsPage* pPage = GetCurrentPage( nId ); DBG_ASSERT( pPage, "DataNavigatorWindow::SetPageModel(): no page" ); if (IsAdditionalPage(nId) || m_pTabCtrl->GetPageName(nId) == "instance") +{ // instance page nPagePos = m_pTabCtrl->GetPagePos( nId ); +} m_bIsNotifyDisabled = true; OUString sText = pPage->SetModel( xFormsModel, nPagePos ); m_bIsNotifyDisabled = 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-1' - svx/source
svx/source/table/cell.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 1663326d292a6ed89215b7a188054a2e27d7832f Author: Armin Le Grand AuthorDate: Wed Jul 18 13:53:38 2018 +0200 Commit: Armin Le Grand CommitDate: Thu Jul 19 11:29:34 2018 +0200 tdf#118354 Do not dereference non-exsisting Object Change-Id: Ie7323302f3b29dfc19b26e2185321c2e609cab2b Reviewed-on: https://gerrit.libreoffice.org/57629 Tested-by: Jenkins Reviewed-by: Armin Le Grand Reviewed-on: https://gerrit.libreoffice.org/57711 diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index b1364f6d60ff..8eadbd453804 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -511,7 +511,14 @@ void Cell::replaceContentAndFormating( const CellRef& xSourceCell ) if( xSourceCell.is() && mpProperties ) { mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() ); -SetOutlinerParaObject( new OutlinerParaObject(*xSourceCell->GetOutlinerParaObject()) ); + +// tdf#118354 OutlinerParaObject may be nullptr, do not dereference when +// not set (!) +if(nullptr != xSourceCell->GetOutlinerParaObject()) +{ +SetOutlinerParaObject( new OutlinerParaObject(*xSourceCell->GetOutlinerParaObject()) ); +} + SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() ); SdrTableObj& rSourceTableObj = dynamic_cast< SdrTableObj& >( xSourceCell->GetObject() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source xmloff/source
svx/source/svdraw/svdograf.cxx |5 - xmloff/source/draw/SignatureLineContext.cxx |7 +++ 2 files changed, 11 insertions(+), 1 deletion(-) New commits: commit 0f530cb9fb086e058ba2946e8f956b33924e82f4 Author: Samuel Mehrbrodt Date: Mon Jun 18 11:46:10 2018 +0200 tdf#117904 Don't allow copying signed shapes Instead just copy the "unsigned" graphic Change-Id: I5183b0b33be0469dceaace142d73aa403cc32ef2 Reviewed-on: https://gerrit.libreoffice.org/56472 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 79e434948d65dd9eba150bc986e968bcb3754631) Reviewed-on: https://gerrit.libreoffice.org/56510 Reviewed-by: Thorsten Behrens diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 1f623faeffe9..d336c9634d42 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -885,7 +885,6 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj ) return *this; SdrRectObj::operator=( rObj ); -mpGraphicObject->SetGraphic( rObj.GetGraphic(), () ); aFileName = rObj.aFileName; aFilterName = rObj.aFilterName; bMirrored = rObj.bMirrored; @@ -899,6 +898,10 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj ) mbIsSignatureLineShowSignDate = rObj.mbIsSignatureLineShowSignDate; mbIsSignatureLineCanAddComment = rObj.mbIsSignatureLineCanAddComment; mpSignatureLineUnsignedGraphic = rObj.mpSignatureLineUnsignedGraphic; +if (mbIsSignatureLine && rObj.mpSignatureLineUnsignedGraphic) +mpGraphicObject->SetGraphic(rObj.mpSignatureLineUnsignedGraphic); +else +mpGraphicObject->SetGraphic( rObj.GetGraphic(), () ); if( rObj.IsLinkedGraphic() ) { diff --git a/xmloff/source/draw/SignatureLineContext.cxx b/xmloff/source/draw/SignatureLineContext.cxx index 3adc70dd779c..445d9c73c2bc 100644 --- a/xmloff/source/draw/SignatureLineContext.cxx +++ b/xmloff/source/draw/SignatureLineContext.cxx @@ -100,6 +100,13 @@ SignatureLineContext::SignatureLineContext(SvXMLImport& rImport, sal_uInt16 nPrf "No InvalidSignatureLineImage!"); xGraphic = xSignatureInfo[i].InvalidSignatureLineImage; } + +// Save unsigned graphic +Reference xUnsignedGraphic; +xPropSet->getPropertyValue("Graphic") >>= xUnsignedGraphic; +if (xUnsignedGraphic.is()) +xPropSet->setPropertyValue("SignatureLineUnsignedImage", Any(xUnsignedGraphic)); + xPropSet->setPropertyValue("Graphic", Any(xGraphic)); break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source vcl/unx
svx/source/dialog/langbox.cxx |6 ++ vcl/unx/gtk3/gtk3gtkinst.cxx | 18 -- 2 files changed, 22 insertions(+), 2 deletions(-) New commits: commit 5ec647b773670191d51b03b7f668024c046643d8 Author: Caolán McNamara Date: Mon Jun 25 17:20:37 2018 +0100 Resolves: tdf#118356 freeze/thaw mass language additions Change-Id: Ifdc2247594d3ddeea0ca7b3b97eb6e392c54f95b Reviewed-on: https://gerrit.libreoffice.org/56410 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 9ccee3b41728..94b2aeccd0fa 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -654,6 +654,8 @@ void LanguageBox::SetLanguageList( SvxLanguageListFlags nLangList, { nCount = SvtLanguageTable::GetLanguageEntryCount(); } + +m_xControl->freeze(); for ( sal_uInt32 i = 0; i < nCount; i++ ) { LanguageType nLangType; @@ -691,6 +693,8 @@ void LanguageBox::SetLanguageList( SvxLanguageListFlags nLangList, if (bHasLangNone) InsertLanguage( LANGUAGE_NONE ); + +m_xControl->thaw(); } int LanguageBox::ImplTypeToPos(LanguageType eType) const @@ -758,6 +762,7 @@ LanguageBox::LanguageBox(weld::ComboBoxText* pControl) m_xControl->make_sorted(); m_xControl->connect_changed(LINK(this, LanguageBox, ChangeHdl)); +m_xControl->freeze(); sal_uInt32 nCount = SvtLanguageTable::GetLanguageEntryCount(); for (sal_uInt32 i = 0; i < nCount; ++i) { @@ -774,6 +779,7 @@ LanguageBox::LanguageBox(weld::ComboBoxText* pControl) InsertLanguage(nLangType); } +m_xControl->thaw(); } SvxLanguageBox::SvxLanguageBox( vcl::Window* pParent, WinBits nBits ) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index e454c58df342..1d2c8d272b83 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3465,6 +3465,7 @@ public: { disable_notify_events(); g_object_ref(m_pListStore); +gtk_widget_freeze_child_notify(GTK_WIDGET(m_pTreeView)); gtk_tree_view_set_model(m_pTreeView, nullptr); enable_notify_events(); } @@ -3473,6 +3474,7 @@ public: { disable_notify_events(); gtk_tree_view_set_model(m_pTreeView, GTK_TREE_MODEL(m_pListStore)); +gtk_widget_thaw_child_notify(GTK_WIDGET(m_pTreeView)); g_object_unref(m_pListStore); enable_notify_events(); } @@ -4480,12 +4482,24 @@ public: virtual void freeze() override { -//do nothing for now +gtk_widget_freeze_child_notify(GTK_WIDGET(m_pComboBoxText)); +if (m_xSorter) +{ +GtkTreeModel* pModel = gtk_combo_box_get_model(GTK_COMBO_BOX(m_pComboBoxText)); +GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(pModel); +gtk_tree_sortable_set_sort_column_id(pSortable, GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING); +} } virtual void thaw() override { -//do nothing for now +if (m_xSorter) +{ +GtkTreeModel* pModel = gtk_combo_box_get_model(GTK_COMBO_BOX(m_pComboBoxText)); +GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(pModel); +gtk_tree_sortable_set_sort_column_id(pSortable, 0, GTK_SORT_ASCENDING); +} +gtk_widget_thaw_child_notify(GTK_WIDGET(m_pComboBoxText)); } virtual ~GtkInstanceComboBoxText() override ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source svx/uiconfig
svx/source/inc/DefaultShapesPanel.hxx|3 svx/source/sidebar/shapes/DefaultShapesPanel.cxx |2 svx/uiconfig/ui/defaultshapespanel.ui| 549 +++ 3 files changed, 272 insertions(+), 282 deletions(-) New commits: commit 4b1490406d5ff419f632b581bed9744291600dc0 Author: heiko tietze Date: Wed Jun 13 13:11:50 2018 +0200 tdf#118110 - Mouse wheel should work with the shapes desk scrollwindow removed Change-Id: Id38dd75120effe63314fb3665417c728f3822712 Reviewed-on: https://gerrit.libreoffice.org/55748 Tested-by: Jenkins Reviewed-by: Heiko Tietze (cherry picked from commit dc5a7f14cb44c06c19772249973d06df1f4eccaa) Reviewed-on: https://gerrit.libreoffice.org/55797 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/svx/source/inc/DefaultShapesPanel.hxx b/svx/source/inc/DefaultShapesPanel.hxx index 3759b1d859cd..d2e94258b965 100644 --- a/svx/source/inc/DefaultShapesPanel.hxx +++ b/svx/source/inc/DefaultShapesPanel.hxx @@ -60,7 +60,6 @@ private: VclPtr mpCalloutSet; VclPtr mpStarSet; VclPtr mp3DObjectSet; -VclPtr mpScrollWindow; Reference< XFrame > mxFrame; std::map, std::map> mpShapesSetMap; @@ -74,4 +73,4 @@ private: #endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 671eeeba55b4..1f8c2d10b58c 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -34,7 +34,6 @@ DefaultShapesPanel::DefaultShapesPanel ( SvxShapeCommandsMap(), mxFrame(rxFrame) { -get(mpScrollWindow, "scrolledwindow1"); get(mpLineArrowSet, "LinesArrows"); get(mpCurveSet, "Curves"); get(mpConnectorSet, "Connectors"); @@ -92,7 +91,6 @@ void DefaultShapesPanel::Initialize() void DefaultShapesPanel::dispose() { mpShapesSetMap.clear(); -mpScrollWindow.clear(); mpLineArrowSet.clear(); mpCurveSet.clear(); mpConnectorSet.clear(); diff --git a/svx/uiconfig/ui/defaultshapespanel.ui b/svx/uiconfig/ui/defaultshapespanel.ui index e211bdf62a84..6350f9b82220 100644 --- a/svx/uiconfig/ui/defaultshapespanel.ui +++ b/svx/uiconfig/ui/defaultshapespanel.ui @@ -1,5 +1,5 @@ - + @@ -16,391 +16,384 @@ vertical 12 - + True -True -in +False - + True False +vertical +3 - + True False -vertical -3 +0 +none - + True False -0 -none +12 - + +50 True False -12 - - -50 -True -False - - - - - - -True -False -Lines Arrows - - - - -True -True -0 - + + +True +False +Lines Arrows + + + + + + + +True +True +0 + + + + +True +False +0 +none - + True False -0 -none +12
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/dialog/charmap.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit b8bfa9051242393cc940382fd2a2f34af4db11af Author: Caolán McNamara Date: Tue Jun 5 16:49:11 2018 +0100 Resolves: tdf#116876 don't reselect index on resize if it wouldn't change selecting the index sets it as active and updates the previews, so if its an inactive index and resize happens, leave it as inactive but selected Change-Id: If823f6b3e8f2ee4e77ba5e5d0202d72893ed614c Reviewed-on: https://gerrit.libreoffice.org/55345 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 8b568d80269a..1d8d286d03cc 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -680,7 +680,8 @@ void SvxShowCharSet::RecalculateFont(vcl::RenderContext& rRenderContext) // restore last selected unicode int nMapIndex = mxFontCharMap->GetIndexFromChar(getSelectedChar()); -SelectIndex(nMapIndex); +if (nMapIndex != nSelectedIndex) +SelectIndex(nMapIndex); // rearrange CharSet element in sync with nX- and nY-multiples Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/dialog/rubydialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b2a47dd3c63e38c2e37ee8036ee1cddb3bb4c695 Author: Mark Hung Date: Sun May 27 21:22:38 2018 +0800 svx/sw: set ruby position correctly in the ruby dialog. Change-Id: I7ddce601bd7204e5696b601c6f8cd16619017aa2 Reviewed-on: https://gerrit.libreoffice.org/54881 Tested-by: Jenkins Reviewed-by: Mark Hung (cherry picked from commit 45cdce55093abb742e4e51de7a1542edd9b9e7b2) Reviewed-on: https://gerrit.libreoffice.org/55077 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 5981a76d2910..7d173aaa0974 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -501,7 +501,7 @@ void SvxRubyDialog::Update() else m_pAdjustLB->SetNoSelection(); if (nPosition > -1) -m_pPositionLB->SelectEntryPos(nPosition ? 1 : 0); +m_pPositionLB->SelectEntryPos(nPosition); if (!nLen || (bCharStyleEqual && sCharStyleName.isEmpty())) sCharStyleName = "Rubies"; if (!sCharStyleName.isEmpty()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/tbxctrls/tbcontrl.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit d406785b057811e49e74abd62c45abe8fcaa782d Author: Caolán McNamara Date: Thu May 31 13:49:40 2018 +0100 tdf#117537 block rentry to CheckAndMarkUnknownFont Change-Id: I70e75a39d13e93e929c7aef5407b1100bb2a7c12 Reviewed-on: https://gerrit.libreoffice.org/55130 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 41145935cf5f..ae103afddc21 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -193,6 +193,7 @@ private: Reference< XDispatchProvider > m_xDispatchProvider; Reference< XFrame >m_xFrame; boolmbEndPreview; +boolmbCheckingUnknownFont; voidReleaseFocus_Impl(); voidEnableControls_Impl(); @@ -971,7 +972,8 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference< bRelease ( true ), m_xDispatchProvider( rDispatchProvider ), m_xFrame (_xFrame), -mbEndPreview(false) +mbEndPreview(false), +mbCheckingUnknownFont(false) { SetOptimalSize(); EnableControls_Impl(); @@ -1003,6 +1005,9 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event, { if( event.GetId() != VclEventId::EditModify ) return; +if (mbCheckingUnknownFont) //tdf#117537 block rentry +return; +mbCheckingUnknownFont = true; OUString fontname = GetSubEdit()->GetText(); lcl_GetDocFontList( , this ); // If the font is unknown, show it in italic. @@ -1025,6 +1030,7 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event, SetQuickHelpText( SvxResId( RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE )); } } +mbCheckingUnknownFont = false; } void SvxFontNameBox_Impl::Update( const css::awt::FontDescriptor* pFontDesc ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/core/graphichelper.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 41b0c3c789c3423b2e25fd3e219e1c631883fdf5 Author: Marco Cecchetti Date: Tue May 15 11:13:05 2018 +0200 tdf#117172 - Image context menu Save fails to do anything Change-Id: I5c0980d85ef5ed050bfafbc368576c5ad72a80a7 Reviewed-on: https://gerrit.libreoffice.org/54359 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 796bee47e90efee7c076f6acdc2a95004ed081d0) Reviewed-on: https://gerrit.libreoffice.org/54930 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index 355ba12fcec9..4c01c13191ac 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -331,6 +331,13 @@ OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGra return sPath; } } +else +{ +XOutBitmap::WriteGraphic( rGraphic, sPath, aFilter, +XOutFlags::DontExpandFilename | +XOutFlags::DontAddExtension | +XOutFlags::UseNativeIfPossible ); +} } } return OUString(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/dialog/dlgctrl.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ee74e5638ace7daca188c55c29957ce92b289fbb Author: Caolán McNamara Date: Mon May 28 09:08:26 2018 +0100 coverity#1435838 Uninitialized scalar field Change-Id: I76446f3d70f3385b78ee382b265439765176f4f5 Reviewed-on: https://gerrit.libreoffice.org/54966 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 3f72131aa1bd..eee6d668d1e0 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -626,6 +626,7 @@ BitmapEx& RectCtl::GetRectBitmap() RectCtl::RectCtl(SvxTabPage* pPage, RectPoint eRpt, sal_uInt16 nBorder) : m_pPage(pPage) , nBorderWidth(Application::GetDefaultDevice()->LogicToPixel(Size(nBorder, 0), MapMode(MapUnit::Map100thMM)).Width()) +, eRP(eRpt) , eDefRP(eRpt) , pBitmap(nullptr) , m_nState(CTL_STATE::NONE) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - svx/source
svx/source/dialog/charmap.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit aa9eaa396ef7bbe6955bb1053e4f76121ea38923 Author: Caolán McNamara Date: Mon May 28 09:10:09 2018 +0100 coverity#1435837 Uninitialized scalar field Change-Id: Ie2d78756019fe48167515c6022cd564a969cd90e Reviewed-on: https://gerrit.libreoffice.org/54937 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 fa9c3cebede3..0288524a6466 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -68,6 +68,8 @@ SvxShowCharSet::SvxShowCharSet(weld::ScrolledWindow* pScrolledWindow, const VclP : mxVirDev(rVirDev) , mxScrollArea(pScrolledWindow) , mxContext(comphelper::getProcessComponentContext()) +, nX(0) +, nY(0) , maFontSize(0, 0) , maPosition(0,0) , mbRecalculateFont(true) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits