[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/xml/xmlxtimp.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1712f4ffd8818188ab59512b151ccd1ad98d45df Author: Noel Grandin AuthorDate: Fri Apr 29 12:32:23 2022 +0200 Commit: Noel Grandin CommitDate: Sat Apr 30 11:37:25 2022 +0200 fix regression in linked bitmap import from commit 0527778df5f1ace8731043d070cf54b7b8648545 Author: Noel Grandin Date: Fri Aug 21 13:19:36 2020 +0200 use fastparser for fill styles spotted dodgy code while doing other work Change-Id: I339e8fbdb9df4d5f17ded76de199a3282f7c2d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133621 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit d606b6bb3e03467fb66a19f0acb85e46b0d4ff41) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133599 diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index f3d0785e0fdb..8abad3101e4a 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -114,7 +114,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > if( aIter.first == XML_ELEMENT(XLINK, XML_HREF) && SvxXMLTableImportContextEnum::Bitmap == meContext ) { -OString rValue = aIter.second; +OString& rValue = aIter.second; if( !rValue.isEmpty() && '#' == rValue[0] ) rValue = rValue.copy( 1 ); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/unodraw/unoshap2.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 8eac5d41fc6d88d5e2942b693ab668f6933a7785 Author: Miklos Vajna AuthorDate: Wed Mar 2 08:19:39 2022 +0100 Commit: Xisco Fauli CommitDate: Wed Mar 2 17:09:05 2022 +0100 svx: the SdrObject of SvxGraphicObject can be nullptr Crashreport: Graphic::GetType() const vcl/inc/impgraph.hxx:122 SvxGraphicObject::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertySimpleEntry const*, com::sun::star::uno::Any&) svx/source/unodraw/unoshap2.cxx:1466 (discriminator 1) SvxShape::_getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1747 non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1732 During SVG export of a selected shape. Change-Id: I29b56d49b0c5418dfe8fec8491ac8667e5ade2ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130740 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130819 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit c1ce7d9f2c4036ae71f8cfa71e4bee4067f4d8d2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130849 Reviewed-by: Xisco Fauli diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 5fa0596ef98c..046034f05550 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1459,7 +1459,8 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte Reference xGraphic; auto pSdrGraphicObject = static_cast(GetSdrObject()); -if (pSdrGraphicObject->GetGraphicObject().GetType() != GraphicType::NONE) +if (pSdrGraphicObject +&& pSdrGraphicObject->GetGraphicObject().GetType() != GraphicType::NONE) xGraphic = pSdrGraphicObject->GetGraphic().GetXGraphic(); rValue <<= xGraphic; break;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/svdraw/svdtrans.cxx | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) New commits: commit b1e3f5d96b1093f42a4558a04ee607b2cde6f4bd Author: Mike Kaganski AuthorDate: Sun Jan 9 15:53:22 2022 +0300 Commit: Xisco Fauli CommitDate: Tue Jan 11 09:58:32 2022 +0100 Slightly optimize code handling angles Change-Id: I8bc10513f6cd704abc7a2bbb17d8d0d8d2628401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128187 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 1bdb4ddfc516d62f482f83fc6191e9585aa4786b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128230 Reviewed-by: Xisco Fauli (cherry picked from commit 6273c0e0de093735396bf1b5a2151da943753eac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128239 diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 39818941667d..0a00b9b44121 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -408,19 +408,13 @@ Degree100 NormAngle18000(Degree100 a) Degree100 NormAngle36000(Degree100 a) { -while (a < 0_deg100) a += 36000_deg100; -while (a >= 36000_deg100) a -= 36000_deg100; +a %= 36000_deg100; +if (a < 0_deg100) +a += 36000_deg100; return a; } -sal_uInt16 GetAngleSector(Degree100 nAngle) -{ -nAngle = NormAngle36000(nAngle); -if (nAngle< 9000_deg100) return 0; -if (nAngle<18000_deg100) return 1; -if (nAngle<27000_deg100) return 2; -return 3; -} +sal_uInt16 GetAngleSector(Degree100 nAngle) { return (NormAngle36000(nAngle) / 9000_deg100).get(); } tools::Long GetLen(const Point& rPnt) {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/svdraw/svdtrans.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit d53def429f39486af22a3ac2a95c057ef9f308eb Author: Noel Grandin AuthorDate: Sat Jan 8 19:06:14 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Jan 10 17:59:07 2022 +0100 tdf#146556 feature 'drag-mirror' is broken regression from commit 11e52fe2979b0947814a49b9c17ec373795cbf8e introduce Degree100 strong_int type where I tried to introduce a more efficient NormAngle36000 calculation, but it produces the wrong answer. Change-Id: Iefeb0849984bc59d3ce9191eaf6f064beba94c59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128143 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 4c4ce3dc2133199f0d804a686a1e0cd0c9124914) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128153 Reviewed-by: Xisco Fauli diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 6af3a49ea873..39818941667d 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -406,13 +406,11 @@ Degree100 NormAngle18000(Degree100 a) return a; } -Degree100 NormAngle36000(Degree100 deg100) +Degree100 NormAngle36000(Degree100 a) { -// do an add because we want -90 to end up as 270 -int a = 36000 + deg100.get(); -a %= 36000; -a = std::abs(a); -return Degree100(a); +while (a < 0_deg100) a += 36000_deg100; +while (a >= 36000_deg100) a -= 36000_deg100; +return a; } sal_uInt16 GetAngleSector(Degree100 nAngle)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/svdraw/svdedtv1.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0dea9b17c6e1207de783ef7fdef8ea67ce4c1516 Author: Julien Nabet AuthorDate: Wed Dec 22 11:52:32 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Dec 23 11:55:23 2021 +0100 tdf#146363: fix crash when changing width/height of text box Regression from e6c7a018a0cfee395ce2886d41c908a2447ef5cc tdf#126180: EndTextEdit on all views before delete/cut slide Just declare and initialize nMarkCount later since calls to methods like ResizeMultMarkedObj or RotateMarkedObj may change the result Change-Id: Ic2a07a6f41b8052dcc3c2736205e1b9c6d538233 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127308 Tested-by: Xisco Fauli Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit aaff8a5cde6b3df9efdf4cf18157c9318c463e1a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127256 diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index e5b7ac5d2fc6..694e55d21dc0 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1533,7 +1533,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin Degree100 nOldRotateAngle=GetMarkedObjRotate(); Degree100 nOldShearAngle=GetMarkedObjShear(); const SdrMarkList& rMarkList=GetMarkedObjectList(); -const size_t nMarkCount=rMarkList.GetMarkCount(); SdrObject* pObj=nullptr; RectPoint eSizePoint=RectPoint::MM; @@ -1745,6 +1744,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin MoveMarkedObj(Size(nPosDX,nPosDY)); } +const size_t nMarkCount=rMarkList.GetMarkCount(); // protect position if(SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_PROTECT_POS, true, &pPoolItem)) {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/fmcomp/gridcell.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit b9ad25f5f60eedd1d81a5869938be04cf63627e4 Author: Caolán McNamara AuthorDate: Tue Dec 14 14:06:28 2021 + Commit: Xisco Fauli CommitDate: Tue Dec 14 18:10:40 2021 +0100 tdf#145999 -1 was the representation of unlimited cell width when using UniString -1 -> 0x i.e. old-time EDIT_NOLIMIT Change-Id: Ie40fa65a88a2b8961d70635ca5e4ec851567e089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126815 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 5090df2372b3..16dc2a448caf 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1175,13 +1175,12 @@ void DbTextField::updateFromModel( Reference< XPropertySet > _rxModel ) _rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText; sal_Int32 nMaxTextLen = m_pEdit->GetMaxTextLen(); -if (nMaxTextLen != 0 && sText.getLength() > nMaxTextLen) +if (nMaxTextLen > 0 && sText.getLength() > nMaxTextLen) { sal_Int32 nDiff = sText.getLength() - nMaxTextLen; sText = sText.replaceAt(sText.getLength() - nDiff,nDiff, OUString()); } - m_pEdit->SetText( sText ); m_pEdit->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) ); } @@ -1191,7 +1190,7 @@ bool DbTextField::commitControl() OUString aText( m_pEdit->GetText( getModelLineEndSetting( m_rColumn.getModel() ) ) ); // we have to check if the length before we can decide if the value was modified sal_Int32 nMaxTextLen = m_pEdit->GetMaxTextLen(); -if (nMaxTextLen != 0) +if (nMaxTextLen > 0) { OUString sOldValue; m_rColumn.getModel()->getPropertyValue( FM_PROP_TEXT ) >>= sOldValue;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/sdr/contact/viewcontact.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 478a6699584d2c837d7142e7c30279fb2d553d9d Author: Miklos Vajna AuthorDate: Fri Dec 3 09:53:41 2021 +0100 Commit: Xisco Fauli CommitDate: Thu Dec 9 12:22:31 2021 +0100 svx: fix crash in ViewContact::ActionChanged() Crashreport: sdr::contact::ViewContact::ActionChanged() svx/source/sdr/contact/viewcontact.cxx:197 (discriminator 2) SdrTextObj::NbcSetOutlinerParaObjectForText(std::unique_ptr >, SdrText*) svx/source/svdraw/svdotext.cxx:1379 sdr::properties::TextProperties::ItemSetChanged(SfxItemSet const&) /usr/include/c++/10/bits/unique_ptr.h:360 sdr::properties::RectangleProperties::ItemSetChanged(SfxItemSet const&) svx/source/sdr/properties/rectangleproperties.cxx:54 Change-Id: I82de3e849cef33d207c8fd5e1c225de78d5f8705 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126562 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 85bc09d05f4824929d5b1381343c3ca75e7f6006) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126518 Reviewed-by: Xisco Fauli diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index 0d1a9f0cb085..1723a6bb91e8 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -194,7 +194,10 @@ void ViewContact::ActionChanged() DBG_ASSERT(pCandidate, "ViewContact::GetViewObjectContact() invalid ViewObjectContactList (!)"); -pCandidate->ActionChanged(); +if (pCandidate) +{ +pCandidate->ActionChanged(); +} } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/tbxctrls/extrusioncontrols.cxx | 53 ++- svx/source/tbxctrls/extrusioncontrols.hxx |4 ++ svx/source/tbxctrls/fontworkgallery.cxx | 57 +- 3 files changed, 94 insertions(+), 20 deletions(-) New commits: commit 37147e03918ed73c34e5a63bf775c98f0b9238ec Author: Caolán McNamara AuthorDate: Mon Oct 25 20:39:41 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 28 14:40:57 2021 +0200 tdf#145296 better fix to launch dialog when active radiobutton is clicked Uses a mouse-release workaround to detect the case of clicking on an already active radiobutton which gives a result basically indistinguishable from the pre 7.2 experience Change-Id: Ic7ac6fa20843466b1d0c77586e25f4aabf814328 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124286 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 6e040da5b1dd..e51c479ffe43 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -341,6 +341,7 @@ ExtrusionDepthWindow::ExtrusionDepthWindow(svt::PopupWindowController* pControl, , meUnit(FieldUnit::NONE) , mfDepth( -1.0 ) , mbSettingValue(false) +, mbCommandDispatched(false) { mxDepth0->connect_toggled(LINK(this, ExtrusionDepthWindow, SelectHdl)); mxDepth1->connect_toggled(LINK(this, ExtrusionDepthWindow, SelectHdl)); @@ -349,6 +350,7 @@ ExtrusionDepthWindow::ExtrusionDepthWindow(svt::PopupWindowController* pControl, mxDepth4->connect_toggled(LINK(this, ExtrusionDepthWindow, SelectHdl)); mxInfinity->connect_toggled(LINK(this, ExtrusionDepthWindow, SelectHdl)); mxCustom->connect_toggled(LINK(this, ExtrusionDepthWindow, SelectHdl)); +mxCustom->connect_mouse_release(LINK(this, ExtrusionDepthWindow, MouseReleaseHdl)); AddStatusListener( gsExtrusionDepth ); AddStatusListener( gsMetricUnit ); @@ -443,23 +445,33 @@ void ExtrusionDepthWindow::statusChanged( } } +void ExtrusionDepthWindow::DispatchDepthDialog() +{ +Sequence< PropertyValue > aArgs( 2 ); +aArgs[0].Name = "Depth"; +aArgs[0].Value <<= mfDepth; +aArgs[1].Name = "Metric"; +aArgs[1].Value <<= static_cast( meUnit ); + +rtl::Reference xControl(mxControl); +xControl->EndPopupMode(); +xControl->dispatchCommand(".uno:ExtrusionDepthDialog", aArgs); +mbCommandDispatched = true; +} + IMPL_LINK(ExtrusionDepthWindow, SelectHdl, weld::Toggleable&, rButton, void) { if (mbSettingValue || !rButton.get_active()) return; +// see MouseReleaseHdl for mbCommandDispatched check, there's no guarantee +// this toggle will happen before that mouse release though it does in +// practice for vcl and gtk +if (mbCommandDispatched) +return; + if (mxCustom->get_active()) -{ -Sequence< PropertyValue > aArgs( 2 ); -aArgs[0].Name = "Depth"; -aArgs[0].Value <<= mfDepth; -aArgs[1].Name = "Metric"; -aArgs[1].Value <<= static_cast( meUnit ); - -rtl::Reference xControl(mxControl); -xControl->EndPopupMode(); -xControl->dispatchCommand(".uno:ExtrusionDepthDialog", aArgs); -} +DispatchDepthDialog(); else { double fDepth; @@ -490,12 +502,31 @@ IMPL_LINK(ExtrusionDepthWindow, SelectHdl, weld::Toggleable&, rButton, void) aArgs[0].Value <<= fDepth; mxControl->dispatchCommand( gsExtrusionDepth, aArgs ); +mbCommandDispatched = true; implSetDepth( fDepth ); mxControl->EndPopupMode(); } } +IMPL_LINK_NOARG(ExtrusionDepthWindow, MouseReleaseHdl, const MouseEvent&, bool) +{ +/* + tdf#145296 if the "custom" radiobutton was presented preselected as + toggled on and the user clicked on it then there's no toggled signal sent + because the item was already toggled on and didn't change state. + + So if that happens launch the custom spacing dialog explicitly here on + mouse release. +*/ +if (mxCustom->get_active() && !mbCommandDispatched) +{ +DispatchDepthDialog(); +return true; +} +return false; +} + // ExtrusionDirectionControl ExtrusionDepthController::ExtrusionDepthController( const Reference< XComponentContext >& rxContext diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index 0f0f54dbf457..7e0043487274 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -104,12 +104,16 @@ private: FieldUnit meUnit; double mfDepth; boolmbSettingValue; +boolmbCommandDispatched; DECL_LINK( SelectHdl, weld::Toggleable&, void ); +DECL_LINK( MouseReleaseHdl, const MouseEvent&, bool ); voidimplFillStrings( FieldUnit eUnit ); vo
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/fmcomp/gridcell.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 8082ff4ab592a63b3546f26b0e9a522fc7e4f8ba Author: Caolán McNamara AuthorDate: Wed Sep 29 09:53:28 2021 +0100 Commit: Michael Stahl CommitDate: Thu Sep 30 11:08:46 2021 +0200 Related: tdf#144139 use the classic size calculation Change-Id: Iac3f9fb9fd6f92f8b17b1f2822dbc9743528cea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122800 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 1fadc6709cfe..3e5796bb5fb6 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1718,10 +1718,16 @@ void DbCheckBox::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) TriState eState = static_cast(m_pWindow.get())->GetState(); MapMode aResMapMode(MapUnit::Map100thMM); +Size aImageSize = rDev.LogicToPixel(Size(300, 300), aResMapMode); Size aBrd1Size = rDev.LogicToPixel(Size(20, 20), aResMapMode); Size aBrd2Size = rDev.LogicToPixel(Size(30, 30), aResMapMode); int nCheckWidth = rDev.LogicToPixel(Size(20, 20), aResMapMode).Width(); -tools::Rectangle aStateRect(rRect); + +tools::Rectangle aStateRect; +aStateRect.SetLeft(rRect.Left() + ((rRect.GetWidth() - aImageSize.Width()) / 2)); +aStateRect.SetTop(rRect.Top() + ((rRect.GetHeight() - aImageSize.Height()) / 2)); +aStateRect.SetRight(aStateRect.Left() + aImageSize.Width() - 1); +aStateRect.SetBottom(aStateRect.Top() + aImageSize.Height() - 1); rDev.Push(); rDev.SetMapMode();
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source vcl/source
svx/source/tbxctrls/tbunosearchcontrollers.cxx |4 ++-- vcl/source/control/edit.cxx|4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) New commits: commit fdfa78e4c9f6087f38720c60373548f0a6481563 Author: Caolán McNamara AuthorDate: Wed Sep 29 12:56:32 2021 +0100 Commit: Xisco Fauli CommitDate: Wed Sep 29 15:45:48 2021 +0200 Resolves: tdf#144783 shift+RETURN not searching backwards In gtk nothing is happening, in gen its searching forwards. Align backends so that Activate is emitted only on a bare return in both and then handle shift+RETURN explicitly for the search widget Change-Id: I142002bbaf6b3aca83800a442096a4b1024fe097 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122748 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index eebb536d6c1b..4156e748456e 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -298,8 +298,8 @@ IMPL_LINK(FindTextFieldControl, KeyInputHdl, const KeyEvent&, rKeyEvent, bool) else if ( bMod1 && nCode == KEY_F ) m_xWidget->select_entry_region(0, -1); -// Execute the search when Ctrl-G or F3 pressed (in addition to ActivateHdl conditions) -else if ( (bMod1 && (KEY_G == nCode)) || (KEY_F3 == nCode) ) +// Execute the search when Ctrl-G, F3 and Shift-RETURN pressed (in addition to ActivateHdl condition which handles bare RETURN) +else if ( (bMod1 && KEY_G == nCode) || (bShift && KEY_RETURN == nCode) || (KEY_F3 == nCode) ) { ActivateFind(bShift); bRet = true; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index f5bf3c47b427..f3fcf87ce751 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1675,10 +1675,8 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) break; case KEY_RETURN: -if (maActivateHdl.IsSet()) -{ +if (maActivateHdl.IsSet() && !rKEvt.GetKeyCode().GetModifier()) bDone = maActivateHdl.Call(*this); -} break; default:
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/fmcomp/gridcell.cxx | 97 - svx/source/inc/gridcell.hxx|1 2 files changed, 97 insertions(+), 1 deletion(-) New commits: commit 8230731a4201419f32e80b22a576e8b2e1350277 Author: Caolán McNamara AuthorDate: Tue Sep 28 17:01:08 2021 +0100 Commit: Michael Stahl CommitDate: Wed Sep 29 10:53:36 2021 +0200 Resolves: tdf#144139 checkboxs in print output shouldn't be themed Change-Id: Ibbde5d64595d2fec1fa63756d628cf295dcdbb78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122792 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 9339a7cba09b..1fadc6709cfe 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1680,7 +1680,23 @@ void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rR CheckBoxControl* pControl = static_cast(m_pPainter.get()); lcl_setCheckBoxState( _rxField, pControl ); -Size aBoxSize = pControl->GetBox().get_preferred_size(); +Size aBoxSize; + +switch (rDev.GetOutDevType()) +{ +case OUTDEV_WINDOW: +case OUTDEV_VIRDEV: +aBoxSize = pControl->GetBox().get_preferred_size(); +break; +case OUTDEV_PRINTER: +case OUTDEV_PDF: +{ +auto nSize = std::min(rRect.GetWidth(), rRect.GetHeight()); +aBoxSize = Size(nSize, nSize); +break; +} +} + tools::Rectangle aRect(Point(rRect.Left() + ((rRect.GetWidth() - aBoxSize.Width()) / 2), rRect.Top() + ((rRect.GetHeight() - aBoxSize.Height()) / 2)), aBoxSize); @@ -1688,6 +1704,85 @@ void DbCheckBox::PaintFieldToCell(OutputDevice& rDev, const tools::Rectangle& rR DbCellControl::PaintFieldToCell(rDev, aRect, _rxField, xFormatter); } +void DbCheckBox::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect) +{ +switch (rDev.GetOutDevType()) +{ +case OUTDEV_WINDOW: +case OUTDEV_VIRDEV: +DbCellControl::PaintCell(rDev, rRect); +break; +case OUTDEV_PRINTER: +case OUTDEV_PDF: +{ +TriState eState = static_cast(m_pWindow.get())->GetState(); + +MapMode aResMapMode(MapUnit::Map100thMM); +Size aBrd1Size = rDev.LogicToPixel(Size(20, 20), aResMapMode); +Size aBrd2Size = rDev.LogicToPixel(Size(30, 30), aResMapMode); +int nCheckWidth = rDev.LogicToPixel(Size(20, 20), aResMapMode).Width(); +tools::Rectangle aStateRect(rRect); + +rDev.Push(); +rDev.SetMapMode(); + +rDev.SetLineColor(); +rDev.SetFillColor(COL_BLACK); +rDev.DrawRect(aStateRect); +aStateRect.AdjustLeft(aBrd1Size.Width()); +aStateRect.AdjustTop(aBrd1Size.Height()); +aStateRect.AdjustRight(-aBrd1Size.Width()); +aStateRect.AdjustBottom(-aBrd1Size.Height()); +if (eState == TRISTATE_INDET) +rDev.SetFillColor(COL_LIGHTGRAY); +else +rDev.SetFillColor(COL_WHITE); +rDev.DrawRect(aStateRect); + +if (eState == TRISTATE_TRUE) +{ +aStateRect.AdjustLeft(aBrd2Size.Width()); +aStateRect.AdjustTop(aBrd2Size.Height()); +aStateRect.AdjustRight(-aBrd2Size.Width()); +aStateRect.AdjustBottom(-aBrd2Size.Height()); +Point aPos11(aStateRect.TopLeft()); +Point aPos12(aStateRect.BottomRight()); +Point aPos21(aStateRect.TopRight()); +Point aPos22(aStateRect.BottomLeft()); +Point aTempPos11(aPos11); +Point aTempPos12(aPos12); +Point aTempPos21(aPos21); +Point aTempPos22(aPos22); +rDev.SetLineColor(COL_BLACK); +int nDX = 0; +for (int i = 0; i < nCheckWidth; i++) +{ +if ( !(i % 2) ) +{ +aTempPos11.setX(aPos11.X() + nDX); +aTempPos12.setX(aPos12.X() + nDX); +aTempPos21.setX(aPos21.X() + nDX); +aTempPos22.setX(aPos22.X() + nDX); +} +else +{ +nDX++; +aTempPos11.setX(aPos11.X() - nDX); +aTempPos12.setX(aPos12.X() - nDX); +aTempPos21.setX(aPos21.X() - nDX); +aTempPos22.setX(aPos22.X() - nDX); +} +rDev.DrawLine(aTempPos11, aTempPos12); +rDev.DrawLine(aTempPos21, aTempPos22); +} +} + +rDev.Pop(); +bre
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/dialog/frmsel.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2b96bf1fd8f4287a06b79dbec14114ca6c035731 Author: Caolán McNamara AuthorDate: Sun Sep 26 15:50:05 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Sep 27 06:52:01 2021 +0200 tdf#144729 create FrameSelectorImpl before setting size request gtk wan't to update some a11y info when we set the new size request but we haven't created the requirements that a11y needs yet. Just move that creation to before the set_size_request #0 std::__cxx1998::vector >::size() const (this=0x720) at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_vector.h:919 #1 0x7fbd40f3fcc2 in svx::FrameSelector::GetEnabledBorderCount() const (this=0x91bafd0) at svx/source/dialog/frmsel.cxx:858 #2 0x7fbd40da76b8 in svx::a11y::AccFrameSelector::getAccessibleChildCount() (this=0x921b190) at svx/source/accessibility/AccessibleFrameSelector.cxx:63 #3 0x7fbd3184930e in AtkListener::updateChildList(com::sun::star::uno::Reference const&) (this=0x91e6200, pContext= uno::Reference to (svx::a11y::AccFrameSelector *) 0x921b1f0) at vcl/unx/gtk3/a11y/atklistener.cxx:149 #4 0x7fbd31849096 in AtkListener::AtkListener(AtkObjectWrapper*) (this=0x91e6200, pWrapper=0x91e60a0) at vcl/unx/gtk3/a11y/atklistener.cxx:56 #5 0x7fbd3186e9ab in atk_object_wrapper_new(com::sun::star::uno::Reference const&, AtkObject*, AtkObject*) (rxAccessible=uno::Reference to (svx::a11y::AccFrameSelector *) 0x921b230, parent=0x9299a40, orig=0x90bedd0) at vcl/unx/gtk3/a11y/atkwrapper.cxx:875 #6 0x7fbd318b3ded in (anonymous namespace)::GtkInstanceDrawingArea::GetAtkObject(_AtkObject*) (this=0x91e5060, pDefaultAccessible=0x90bedd0) at vcl/unx/gtk3/gtkinst.cxx:16918 #7 0x7fbd318b3d21 in (anonymous namespace)::drawing_area_get_accessibity(_GtkWidget*) (pWidget=0x91206f0) at vcl/unx/gtk3/gtkinst.cxx:21555 #8 0x7fbd30fb0bc2 in () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #9 0x7fbd3764b65f in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #10 0x7fbd3765d99b in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #11 0x7fbd37663c6f in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #12 0x7fbd376641df in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #13 0x7fbd3764fcd4 in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #14 0x7fbd3764f50e in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #15 0x7fbd37651d4b in g_object_thaw_notify () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #16 0x7fbd318b86d5 in (anonymous namespace)::GtkInstanceWidget::set_size_request(int, int) (this=0x91e5060, nWidth=137, nHeight=146) at vcl/unx/gtk3/gtkinst.cxx:3475 #17 0x7fbd40f3fa23 in svx::FrameSelector::SetDrawingArea(weld::DrawingArea*) (this=0x91bafd0, pDrawingArea=0x91e5328) at svx/source/dialog/frmsel.cxx:833 #18 0x7fbd3d16d46a in weld::CustomWeld::CustomWeld(weld::Builder&, rtl::OString const&, weld::CustomWidgetController&) (this=0x90e9fd0, rBuilder=..., rDrawingId="framesel", rWidgetController=...) at vcl/source/app/customweld.cxx:28 #19 0x7fbcf08f0c4e in SvxBorderTabPage::SvxBorderTabPage(weld::Container*, weld::DialogController*, SfxItemSet const&) (this=0x91baeb0, pPage=0x90fc550, pController=0x7a4d4b0, rCoreAttrs= SfxItemSet of pool 0x5aea070 with parent 0x5b25658 and Which ranges: [(1, 45), (63, 132), (153, 153), (1014, 1033), (10023, 10023), (10050, 10055), (10057, 10058), (10065, 10065), (10179, 10183), (10451, 10451), (10457, 10457), (10467, 10467), (10591, 10591), (10855, 10855), (11142, 11142), (12065, 12065), (21123, 21123), (21307, 21307), (22401, 22401)] = {...}) at cui/source/tabpages/border.cxx:291 #20 0x7fbcf08fc77f in std::make_unique(weld::Container*&, weld::DialogController*&, SfxItemSet const&) (__args=@0x7ffdac0324e0: 0x90fc550, __args=@0x7ffdac0324d8: 0x7a4d4b0, __args=SfxItemSet of pool 0x5aea070 with parent 0x5b25658 and Which ranges: [(1, 45), (63, 132), (153, 153), (1014, 1033), (10023, 10023), (10050, 10055), (10057, 10058), (10065, 10065), (10179, 10183), (10451, 10451), (10457, 10457), (10467, 10467), (10591, 10591), (10855, 10855), (11142, 11142), (12065, 12065), (21123, 21123), (21307, 21307), (22401, 22401)] = {...}) at /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/unique_ptr.h:962 #21 0x7fbcf08f514f in SvxBorderTabPage::Create(weld::Container*, weld::DialogController*, SfxItemSet const*) (pPage=0x90fc550, pController=0x7a4d4b0, rAttrSet=0x7dca0e0) at cui/source/tabpages/border.cxx:592 Change-Id: I7325970bf0137602007e453e8b7fc43f1e6f36c5 Reviewed-on: https://gerrit.libreoffice.org/c
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/accessibility/AccessibleTextHelper.cxx |4 1 file changed, 4 insertions(+) New commits: commit 04ead124a7ee9a5ced435725966162133147 Author: Michael Stahl AuthorDate: Tue Sep 7 18:55:40 2021 +0200 Commit: Thorsten Behrens CommitDate: Thu Sep 9 10:56:54 2021 +0200 svx: try to avoid crash in AccessibleEditableTextPara There is an out-of-bounds access to a non-existant editengine paragraph: warn:legacy.tools:40400:40400:editeng/source/editeng/editdoc.cxx:1136: Index out of range in Adjust(2) warn:legacy.tools:40400:40400:editeng/source/editeng/editeng.cxx:1984: Paragraph not found: GetWindowPosTopLeft /usr/include/c++/11/debug/vector:438: Error: attempt to subscript container with out-of-bounds index 1, but container only holds 1 elements. 4 ParaPortionList::operator[](int) (this=0x6270d38, nPos=1) at editeng/source/editeng/editdoc.cxx:722 5 ImpEditEngine::CalcParaWidth(int, bool) (this=0x6270ca0, nPara=1, bIgnoreExtraSpace=true) at editeng/source/editeng/impedit2.cxx:3307 6 EditEngine::GetParaBounds(int) (this=0x6264a00, nPara=1) at editeng/source/editeng/editeng.cxx:646 7 Outliner::GetParaBounds(int) const (this=0x30fb510, nParagraph=1) at editeng/source/outliner/outlin2.cxx:414 8 SvxOutlinerForwarder::GetParaBounds(int) const (this=0x3424710, nPara=1) at editeng/source/uno/unoforou.cxx:326 9 SvxAccessibleTextAdapter::GetParaBounds(int) const (this=0x73d7d30, nPara=1) at editeng/source/uno/unoedprx.cxx:757 10 accessibility::AccessibleEditableTextPara::getBounds() (this=0x27c45c0) at editeng/source/accessibility/AccessibleEditableTextPara.cxx:1050 11 accessibility::AccessibleTextHelper_Impl::UpdateBoundRect() (this=0x73d7c90) at svx/source/accessibility/AccessibleTextHelper.cxx:799 12 accessibility::AccessibleTextHelper::UpdateChildren() (this=0x2ae5eb0) at svx/source/accessibility/AccessibleTextHelper.cxx:1658 13 accessibility::AccessibleShape::notifyShapeEvent(com::sun::star::document::EventObject const&) (this=0x73d7690, rEventObject=...) at svx/source/accessibility/AccessibleShape.cxx:926 14 SfxBaseModel::notifyEvent(com::sun::star::document::EventObject const&) const (this=0x2eb1b80, aEvent=...) at sfx2/source/doc/sfxbasemodel.cxx:3341 15 SdXImpressDocument::Notify(SfxBroadcaster&, SfxHint const&) (this=0x2eb1b80, rBC=..., rHint=...) at sd/source/ui/unoidl/unomodel.cxx:408 16 SfxBroadcaster::Broadcast(SfxHint const&) (this=0x2e6f120, rHint=...) at svl/source/notify/SfxBroadcaster.cxx:39 17 SdrObject::BroadcastObjectChange() const (this=0x30fb190) at svx/source/svdraw/svdobj.cxx:1028 18 SdrUndoObjSetText::Undo() (this=0x732acb0) at svx/source/svdraw/svdundo.cxx:1050 19 sd::UndoObjectSetText::Undo() (this=0x732acb0) at sd/source/core/undo/undoobjects.cxx:204 This was replaced when GetTextForwarder() apparently replaced the editengine object or something along those lines: 5 ParaPortionList::Insert(int, ParaPortion&&) (this=0x6270d38, nPos=0, p=...) at editeng/source/editeng/editdoc.cxx:740 6 ImpEditEngine::InitDoc(bool) (this=0x6270ca0, bKeepParaAttribs=true) at editeng/source/editeng/impedit2.cxx:241 7 ImpEditEngine::RemoveText() (this=0x6270ca0) at editeng/source/editeng/impedit2.cxx:678 8 ImpEditEngine::SetText(rtl::OUString const&) (this=0x6270ca0, rText="") at editeng/source/editeng/impedit2.cxx:694 9 ImpEditEngine::SetText(EditTextObject const&) (this=0x6270ca0, rTextObject=...) at editeng/source/editeng/impedit4.cxx:1139 10 EditEngine::SetText(EditTextObject const&) (this=0x6264a00, rTextObject=...) at editeng/source/editeng/editeng.cxx:1535 11 Outliner::SetText(OutlinerParaObject const&) (this=0x30fb510, rPObj=...) at editeng/source/outliner/outliner.cxx:568 12 SvxTextEditSourceImpl::GetBackgroundTextForwarder() (this=0x73d7990) at svx/source/unodraw/unoshtxt.cxx:553 13 SvxTextEditSourceImpl::GetTextForwarder() (this=0x73d7990) at svx/source/unodraw/unoshtxt.cxx:658 14 SvxTextEditSource::GetTextForwarder() (this=0x73c9580) at svx/source/unodraw/unoshtxt.cxx:936 15 SvxEditSourceAdapter::GetTextForwarderAdapter() (this=0x73d7d20) at editeng/source/uno/unoedprx.cxx:324 16 SvxEditSourceAdapter::GetTextForwarder() (this=0x73d7d20) at editeng/source/uno/unoedprx.cxx:339 17 accessibility::AccessibleTextHelper_Impl::GetTextForwarder() const (this=0x73d7c90) at svx/source/accessibility/AccessibleTextHelper.cxx:265 18 accessibility::AccessibleTextHelper_Impl::UpdateVisibleChildren(bool) (this=0x73d7c90, bBroadcastEvents=true) at svx/source/accessibility/AccessibleTextHelper.cxx:750 19 accessibility::AccessibleTextHelper::UpdateChildren() (this=0x2ae5eb0) at svx/source/accessibility/AccessibleTextHelper.cxx:1657 20 accessibility::AccessibleShape::notifyShapeEvent(com::sun::star::document::EventObject const&) (this=0x73d7690, rEventObject=.
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/form/tbxform.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 72fa08057ad46d998f315f17f71c9b8aa65d2e14 Author: Caolán McNamara AuthorDate: Thu Aug 26 15:34:46 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Fri Aug 27 11:21:45 2021 +0200 Resolves: tdf#143159 reserve space for 6 characters/digits Change-Id: I44bcdf55a9b1d34e046b93e6a15f4019a925844d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121059 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 7f354f16d2d0..1d9d386d12f7 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -36,6 +36,8 @@ SvxFmAbsRecWin::SvxFmAbsRecWin(vcl::Window* pParent, SfxToolBoxControl* pControl : RecordItemWindow(pParent) , m_pController(pController) { +m_xWidget->set_width_chars(6); +SetSizePixel(m_xWidget->get_preferred_size()); } void SvxFmAbsRecWin::PositionFired(sal_Int64 nRecord)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/tbxctrls/fillctrl.cxx | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) New commits: commit 36baacbf86f81de457af40a4a91b294136bf8ddc Author: Katarina Behrens AuthorDate: Wed Aug 18 22:21:41 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Thu Aug 26 03:45:19 2021 +0200 tdf#143567: Distinguish bitmap vs. pattern fill style By the time fill style state change (SID_ATTR_FILL_STYLE) happens, the actual bitmap fill may or may not be known. If it is not known, it is impossible to tell whether it is a regular bitmap or a pattern. That's why this toolbar sometimes incorrectly reports bitmap fill instead of pattern one To solve the problem, we adjust fill style listbox selection only later, by the time we know for sure the fill IS a pattern Change-Id: I0aa95c49601d77dca29ab54ad4c056a76a90e049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120687 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 1b06e7e9e8c467de3450077fe8b90be6b7f73e4b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120991 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index ed86f9f3bda1..948a89f6d3d2 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -142,13 +142,6 @@ void SvxFillToolBoxControl::StateChanged( mpLbFillType->set_sensitive(true); drawing::FillStyle eXFS = mpStyleItem->GetValue(); mnLastXFS = sal::static_int_cast< sal_Int32 >(eXFS); - -if (eXFS == drawing::FillStyle_BITMAP && -mpBitmapItem && mpBitmapItem->isPattern() ) -{ -mnLastXFS = sal::static_int_cast(PATTERN); -} - mpLbFillType->set_active(mnLastXFS); if(drawing::FillStyle_NONE == eXFS) @@ -555,6 +548,9 @@ void SvxFillToolBoxControl::Update() } else if (mpBitmapItem && mpBitmapItem->isPattern() && pSh->GetItem(SID_PATTERN_LIST)) { +mnLastXFS = sal::static_int_cast(PATTERN); +mpLbFillType->set_active(mnLastXFS); + SvxFillAttrBox::Fill(*mpLbFillAttr, pSh->GetItem(SID_PATTERN_LIST)->GetPatternList()); const OUString aString(mpBitmapItem->GetName());
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/sidebar/nbdtmg.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9eb836a1a5f0f4522337ff7b87c9a0a4c7e8ca57 Author: Vasily Melenchuk AuthorDate: Mon Aug 23 12:27:20 2021 +0300 Commit: Adolfo Jayme Barrientos CommitDate: Wed Aug 25 07:35:19 2021 +0200 tdf#143990: writer: default value for SetIncludeUpperLevels is 1 Same as in e08fba90 for tdf#143858: zero for SetIncludeUpperLevels has no practical sense, since actually this value is amount of levels to display. Default and minimal value is 1 (current level), zero used only in cases when there should be no numbering. Change-Id: I303386339a9e13944e11d0287c933523c7410b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120863 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 1fd9116fbcd1a8d25f964087cd1d0eb15df8a2d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120889 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index cddac0a5f823..fe3c664c7ebf 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -858,7 +858,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 } } else { -aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 0)); +aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 1)); aFmt.SetCharFormatName(GetNumCharFmtName()); if (isResetSize) aFmt.SetBulletRelSize(100); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/accessibility/ChildrenManagerImpl.cxx | 135 --- 1 file changed, 75 insertions(+), 60 deletions(-) New commits: commit 7ea5763aa766d0b4f25b0f089873dc2c8726cec5 Author: Caolán McNamara AuthorDate: Tue Aug 17 15:43:00 2021 +0100 Commit: Michael Stahl CommitDate: Wed Aug 18 10:15:56 2021 +0200 Resolves: tdf#139220 with ~1000 selected shapes a11y UpdateSelection crawls so fetch the selected shapes once and sort them for quick lookup in the loop over maVisibleChildren. As an side, not changed here, SvxShapeCollection::getByIndex looks suboptimal with a body of std::vector> aElements(maShapeContainer.getElements()); return uno::makeAny(Reference(aElements[Index].get())); Change-Id: Idec7c003e7c5ee02000d4642d4fdb0d940548d97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120583 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 53d1e7596b6b..573427c4714e 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -793,20 +794,6 @@ uno::Reference */ void ChildrenManagerImpl::UpdateSelection() { -Reference xController(maShapeTreeInfo.GetController()); -Reference xSelectionSupplier ( -xController, uno::UNO_QUERY); - -// Try to cast the selection both to a multi selection and to a single -// selection. -Reference xSelectedShapeAccess; -Reference xSelectedShape; -if (xSelectionSupplier.is()) -{ -xSelectedShapeAccess.set( xSelectionSupplier->getSelection(), uno::UNO_QUERY); -xSelectedShape.set( xSelectionSupplier->getSelection(), uno::UNO_QUERY); -} - // Remember the current and new focused shape. AccessibleShape* pCurrentlyFocusedShape = nullptr; AccessibleShape* pNewFocusedShape = nullptr; @@ -815,73 +802,101 @@ void ChildrenManagerImpl::UpdateSelection() VEC_SHAPE vecSelect; int nAddSelect=0; bool bHasSelectedShape=false; -for (const auto& rChild : maVisibleChildren) +if (!maVisibleChildren.empty()) { -AccessibleShape* pAccessibleShape = rChild.GetAccessibleShape(); -if (rChild.mxAccessibleShape.is() && rChild.mxShape.is() && pAccessibleShape!=nullptr) +Reference xController(maShapeTreeInfo.GetController()); +Reference xSelectionSupplier ( +xController, uno::UNO_QUERY); + +// Try to cast the selection both to a multi selection and to a single +// selection. +Reference xSelectedShapeAccess; +Reference xSelectedShape; +if (xSelectionSupplier.is()) { -short nRole = pAccessibleShape->getAccessibleRole(); -bool bDrawShape = ( -nRole == AccessibleRole::GRAPHIC || -nRole == AccessibleRole::EMBEDDED_OBJECT || -nRole == AccessibleRole::SHAPE || -nRole == AccessibleRole::IMAGE_MAP || -nRole == AccessibleRole::TABLE_CELL || -nRole == AccessibleRole::TABLE ); -bool bShapeIsSelected = false; - -// Look up the shape in the (single or multi-) selection. -if (xSelectedShape.is()) +xSelectedShapeAccess.set( xSelectionSupplier->getSelection(), uno::UNO_QUERY); +xSelectedShape.set( xSelectionSupplier->getSelection(), uno::UNO_QUERY); +} + +// tdf#139220 to quickly find if a given drawing::XShape is selected +o3tl::sorted_vector> aSortedSelectedShapes; +if (!xSelectedShape.is() && xSelectedShapeAccess.is()) +{ +sal_Int32 nCount = xSelectedShapeAccess->getCount(); +aSortedSelectedShapes.reserve(nCount); +for (sal_Int32 i = 0; i < nCount; ++i) { -if (rChild.mxShape == xSelectedShape) -{ -bShapeIsSelected = true; -pNewFocusedShape = pAccessibleShape; -} +css::uno::Reference xShape(xSelectedShapeAccess->getByIndex(i), uno::UNO_QUERY); +aSortedSelectedShapes.insert(xShape); } -else if (xSelectedShapeAccess.is()) +} + +for (const auto& rChild : maVisibleChildren) +{ +AccessibleShape* pAccessibleShape = rChild.GetAccessibleShape(); +if (rChild.mxAccessibleShape.is() && rChild.mxShape.is() && pAccessibleShape!=nullptr) { -sal_Int32 nCount=xSelectedShapeAccess->getCount(); -for (sal_Int32 i=0; igetByIndex(i) == rChild.mxShape) +short nRole = pAccessibleShape->getAccessibleRole(); +bool bDrawShape = ( +nRole == A
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/tbxctrls/fillctrl.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 2a01c0b7a621a4f2bb6b25c0ef45897c0124c370 Author: Caolán McNamara AuthorDate: Tue Aug 10 21:58:27 2021 +0100 Commit: Michael Stahl CommitDate: Wed Aug 11 15:15:49 2021 +0200 tdf#143769 don't crash on null XFillColorItem use same solution as: commit 5ee0e6ab93ad791f5e79506efafd16cb7364ffb1 Author: Markus Mohrhard Date: Tue Jul 21 19:01:26 2015 +0200 avoid crash with color listbox for now Change-Id: I36ac6513546961ec8d8d1e9437a8ef88574acbf4 Change-Id: I46c55461e5867431a6e9c838b5ef462f9581eb28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120247 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 5541475c78c8..c8187454888e 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -699,10 +699,11 @@ IMPL_LINK_NOARG(SvxFillToolBoxControl, SelectFillTypeHdl, weld::ComboBox&, void) { mpLbFillAttr->hide(); mpToolBoxColor->show(); -const ::Color aColor = mpColorItem->GetColorValue(); -const XFillColorItem aXFillColorItem( "", aColor ); if (pSh) { +const ::Color aColor = mpColorItem ? mpColorItem->GetColorValue() : COL_AUTO; +const XFillColorItem aXFillColorItem( "", aColor ); + // #i122676# change FillStyle and Color in one call pSh->GetDispatcher()->ExecuteList( SID_ATTR_FILL_COLOR, SfxCallMode::RECORD,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/dialog/hexcolorcontrol.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit cf12ce9224c2f4142e777a5c65a04e48b1bab0a6 Author: Caolán McNamara AuthorDate: Thu Jul 15 12:00:27 2021 +0100 Commit: Michael Stahl CommitDate: Fri Jul 16 17:06:31 2021 +0200 tdf#143327 keep selection bounds on replacing color so select-all and type 'a' will retain cursor at position 1 and delete/backspace keep cursor position in a semi-rational way Change-Id: I802f132e58cea9f111deb1c6d157706d08cb5b81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118921 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/dialog/hexcolorcontrol.cxx b/svx/source/dialog/hexcolorcontrol.cxx index ff9b10ca8da8..fbf6b9ea66d4 100644 --- a/svx/source/dialog/hexcolorcontrol.cxx +++ b/svx/source/dialog/hexcolorcontrol.cxx @@ -63,7 +63,10 @@ void HexColorControl::SetColor(Color nColor) OUString sColor = aBuffer.makeStringAndClear().copy(1); if (sColor == m_xEntry->get_text()) return; +int nStartPos, nEndPos; +m_xEntry->get_selection_bounds(nStartPos, nEndPos); m_xEntry->set_text(sColor); +m_xEntry->select_region(nStartPos, nEndPos); } Color HexColorControl::GetColor() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/dialog/langbox.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 00bfb02010b0ee83c60d7fa80975f37ca8010b2e Author: Eike Rathke AuthorDate: Thu Jul 15 23:53:04 2021 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 16 10:16:39 2021 +0200 Resolves: tdf#143372 Exclude {qtz} KeyID from SvxLanguageBox list Change-Id: I3e52407a33f79713635063ff4ba374267eb98005 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119002 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit da13b76e07231131cb951868a314ee6f51c0f254) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118927 Reviewed-by: Caolán McNamara diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 49f608629890..fcd9c54e3774 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -95,6 +95,7 @@ bool lcl_isPrerequisite( LanguageType nLangType ) nLangType != LANGUAGE_DONTKNOW && nLangType != LANGUAGE_SYSTEM && nLangType != LANGUAGE_NONE && +nLangType != LANGUAGE_USER_KEYID && !MsLangId::isLegacy( nLangType) && MsLangId::getSubLanguage( nLangType); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/accessibility/GraphCtlAccessibleContext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 63c9e69f60b3535afe27fcc989ad122a9c993053 Author: Caolán McNamara AuthorDate: Thu Jul 8 10:04:10 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Jul 8 13:06:04 2021 +0200 return value of PixelToLogic ignored the other uses of SdrObjListPrimitiveHit operate in Logic Position Change-Id: Id6a834a17e6e2252bd4f58d10cd95f7425191203 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118613 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 98484033820e..989be9e6d189 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -177,7 +177,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleAt } Point aPnt( rPoint.X, rPoint.Y ); -mpControl->GetDrawingArea()->get_ref_device().PixelToLogic( aPnt ); +aPnt = mpControl->GetDrawingArea()->get_ref_device().PixelToLogic(aPnt); SdrObject* pObj = nullptr; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/dialog/weldeditview.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit d8dcd706c74b4a0fa420946c707137b097b3c7fe Author: Caolán McNamara AuthorDate: Tue Jun 29 11:20:40 2021 +0100 Commit: Caolán McNamara CommitDate: Tue Jun 29 18:42:22 2021 +0200 Related: tdf#143088 return early on notification from frozen editengine processing EE_NOTIFY_PROCESSNOTIFICATIONS from an EditEngine with an UpdateMode mode of false will just to on to cause AccessibleTextHelper_Impl::GetTextForwarder to throw an exception as a Frozen EditEngine is considered Invalid so return early instead Change-Id: I86f9647b7bf839cf3c7cf2f029be8c7c5aeef1f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118070 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index e89cfe4e71c9..7dd58d31275f 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -908,6 +908,19 @@ WeldTextForwarder::~WeldTextForwarder() IMPL_LINK(WeldTextForwarder, NotifyHdl, EENotify&, rNotify, void) { +if (EditEngine* pEditEngine = m_rEditAcc.GetEditEngine()) +{ +if (rNotify.eNotificationType == EE_NOTIFY_PROCESSNOTIFICATIONS +&& !pEditEngine->GetUpdateMode()) +{ +// tdf#143088 an UpdateMode of false will just to on to cause +// AccessibleTextHelper_Impl::GetTextForwarder to throw an +// exception as a Frozen EditEngine is considered Invalid so return +// early instead +return; +} +} + ::std::unique_ptr aHint = SvxEditSourceHelper::EENotification2Hint(&rNotify); if (aHint) m_rEditSource.GetBroadcaster().Broadcast(*aHint); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source svx/uiconfig
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |2 +- svx/uiconfig/ui/sidebarpossize.ui |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit 1bec8a3d3b16bb8881bd49f58d8786421ff5f839 Author: Katarina Behrens AuthorDate: Fri Jun 18 09:48:25 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Jun 21 05:33:28 2021 +0200 tdf#141311: Rotation spinbox in sidebar used to have 2 decimal places regression from weld-ing (c85fcc6e1994eb8e079aaca85066ab4d67149c15) Change-Id: Iad0725fd4542ecdddb65092846dbf9d103016d9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117408 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 7a717c8b9319edcc12e50ab78554b8e0e7049cbf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117419 Reviewed-by: Adolfo Jayme Barrientos diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 8139b3dc4d69..943117f9a57d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -218,7 +218,7 @@ void PosSizePropertyPanel::Initialize() mxCbxScale->connect_toggled( LINK( this, PosSizePropertyPanel, ClickAutoHdl ) ); //rotation control -mxCtrlDial->SetLinkedField(mxMtrAngle.get()); +mxCtrlDial->SetLinkedField(mxMtrAngle.get(), 2); mxCtrlDial->SetModifyHdl(LINK( this, PosSizePropertyPanel, RotationHdl)); //use same logic as DialControl_Impl::SetSize diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index f608be61a963..f6d92e15c7e6 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -388,6 +388,7 @@ True Select the angle for rotation. True +2 adjustmentSpinDegrees True True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/svdraw/svdetc.cxx | 80 ++- 1 file changed, 27 insertions(+), 53 deletions(-) New commits: commit 894dd4441a8b3a726d3e868a4f3dcc714332e502 Author: Stephan Bergmann AuthorDate: Tue Jun 15 17:57:56 2021 +0200 Commit: Stephan Bergmann CommitDate: Wed Jun 16 13:18:55 2021 +0200 memcpy-param-overlap At least UITest_impress_tests started to fail at > ==608818==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x602ef270,0x602ef276) and [0x602ef274, 0x602ef27a) overlap > #0 in __asan_memcpy at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 > #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned short) at svx/source/svdraw/svdetc.cxx:413:17 > #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdedxv.cxx::19 > #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdcrtv.cxx:883:29 > #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at include/svx/svdview.hxx:193:96 > #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/sdview.cxx:488:28 > #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/drawview.cxx:288:27 > #7 in sd::TextObjectBar::Execute(SfxRequest&) at sd/source/ui/view/drtxtob1.cxx:819:21 > #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1 [...] (followed by > ==647521==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000258856 at pc 0x002f7b0a bp 0x7f7f7a69fdb0 sp 0x7f7f7a69f560 > READ of size 6 at 0x602000258856 thread T9 (cppu_threadpool) > #0 in __asan_memmove at /data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:30:3 > #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned short) at svx/source/svdraw/svdetc.cxx:413:17 > #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdedxv.cxx::19 > #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at svx/source/svdraw/svdcrtv.cxx:883:29 > #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at include/svx/svdview.hxx:193:96 > #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/sdview.cxx:488:28 > #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) at sd/source/ui/view/drawview.cxx:288:27 > #7 in sd::TextObjectBar::Execute(SfxRequest&) at sd/source/ui/view/drtxtob1.cxx:819:21 > #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1 [...] > 0x602000258856 is located 0 bytes to the right of 6-byte region [0x602000258850,0x602000258856) > allocated by thread T9 (cppu_threadpool) here: [...] if the memcpy were replaced with memmove) after 8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which ids in ranges on SfxItemSet creation": Where in the past it had called RemoveWhichRange({10951, 10951, 4007, 4007, 0}, 4007, 4062) and RemoveWhichRange({10950, 10950, 4007, 4007, 0}, 4007, 4062) on wrongly sorted ranges, for which the implementation of RemoveWhichRange happened to work, it now calls RemoveWhichRange({4007, 4007, 10951, 10951, 0}, 4007, 4062) and RemoveWhichRange({4007, 4007, 10950, 10950, 0}, 4007, 4062) on correctly sorted ranges, which uncovered the broken implementation. Given that RemoveWhichRange is presumably not hot (e.g., being called just two times during UITest_impress_tests), turn it into a less sophisticated, but also likely less error-prone algorithm. (Leaving unit tests as a TODO, given that RemoveWhichRange is not currently exported from Library_svxcore, and the existing CppunitTest_svx_unit links against Library_svxcore rather than using gb_CppunitTest_use_library_objects.) Change-Id: I8a1c1d5db8073928ad2f6e88d581f24a0e882925 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117264 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 541f94df85756d3a383b1f9ba49841ca0011b52e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117294 diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 69d0306c77b7..9967376bf078 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -19,6 +19,8 @@ #include +#include + #include #include #include @@ -368,63 +370,35 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool bInklDefaults, bool* pbOnl std::unique_ptr RemoveWhichRange(const sal_uInt16* pOldWhichTable, sal_uInt16 nR
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/svdraw/svdedxv.cxx | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) New commits: commit 556543c7a51214c124ddcbc65db3797a37e0bee2 Author: Stephan Bergmann AuthorDate: Mon Jun 14 16:01:09 2021 +0200 Commit: Stephan Bergmann CommitDate: Mon Jun 14 22:16:01 2021 +0200 global-buffer-overflow ...down in svl::detail::CountRanges during e.g. CppunitTest_sd_tiledrendering, after 8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which ids in ranges on SfxItemSet creation" and 90cb57eb53e28ecb983001bf8f018577abb6d145 "Workaround internal compiler error on tb77" Change-Id: I8ff49384a86676a97ec876ef08426b978e39f6d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117168 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit d3e51bce28a759916e9a3988172ba02b1db66641) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117127 diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c83ae8b1746c..be08b46b1f2e 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2628,16 +2628,33 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor, static const sal_uInt16* GetFormatRangeImpl(bool bTextOnly) { -static const sal_uInt16 gFull[] -= { XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, -XATTRSET_FILL, SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST, -SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, // table cell formats -SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,SDRATTR_TABLE_FIRST, -SDRATTR_TABLE_LAST, EE_PARA_START,EE_PARA_END, -EE_CHAR_START, EE_CHAR_END }; - -static const sal_uInt16 gTextOnly[] = { SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, EE_PARA_START, -EE_PARA_END,EE_CHAR_START, EE_CHAR_END }; +static const sal_uInt16 gFull[] = { XATTR_LINE_FIRST, +XATTR_LINE_LAST, +XATTR_FILL_FIRST, +XATTRSET_FILL, +SDRATTR_SHADOW_FIRST, +SDRATTR_SHADOW_LAST, +SDRATTR_MISC_FIRST, +SDRATTR_MISC_LAST, // table cell formats +SDRATTR_GRAF_FIRST, +SDRATTR_GRAF_LAST, +SDRATTR_TABLE_FIRST, +SDRATTR_TABLE_LAST, +EE_PARA_START, +EE_PARA_END, +EE_CHAR_START, +EE_CHAR_END, +0, +0 }; + +static const sal_uInt16 gTextOnly[] = { SDRATTR_MISC_FIRST, +SDRATTR_MISC_LAST, +EE_PARA_START, +EE_PARA_END, +EE_CHAR_START, +EE_CHAR_END, +0, +0 }; return bTextOnly ? gTextOnly : gFull; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source
svx/source/sidebar/shapes/DefaultShapesPanel.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 29433516e58514b92e3ca3aab965f69c641012a7 Author: Caolán McNamara AuthorDate: Mon Jun 14 14:39:05 2021 +0100 Commit: Xisco Fauli CommitDate: Mon Jun 14 19:33:23 2021 +0200 Resolves: tdf#142767 cannot use itemid of 0 in ValueSets Change-Id: I2c2b655b512e4e7869fe3784f1b073ecdbd0dac9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117122 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 8b97bb5ee4d1..5bdf70ff6e68 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -121,8 +121,8 @@ IMPL_LINK(DefaultShapesPanel, ShapeSelectHdl, ValueSet*, rValueSet, void) { if(rValueSet == aSetMap.first) { -int aSelection = aSetMap.first->GetSelectedItemId(); -comphelper::dispatchCommand(aSetMap.second[aSelection], {}); +sal_uInt16 nSelectionId = aSetMap.first->GetSelectedItemId(); +comphelper::dispatchCommand(aSetMap.second[nSelectionId - 1], {}); } else aSetMap.first->SetNoSelection(); @@ -143,7 +143,8 @@ void DefaultShapesPanel::populateShapes() auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); -aSet.first->InsertItem(i, aSlotImage, sLabel); +sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected +aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits