core.git: svx/source
svx/source/dialog/framelinkarray.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 6f8a73a379d97829080367b21d54f9b5fab781c9 Author: Noel Grandin AuthorDate: Tue May 14 09:08:16 2024 +0200 Commit: Noel Grandin CommitDate: Tue May 14 18:46:48 2024 +0200 tdf#161019 tdf#159846 spreadsheet border rendering regression from commit e27d4cc31e04be4c47b5085dfa2363ee45457e8a Author: Noel Grandin Date: Mon Jun 19 12:23:55 2023 +0200 tdf#150534 reduce the memory consumption of cells when calculating Change-Id: Id8b52a3a0880bbb6a7aff28f55bcd57cb1cae048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167617 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index cada4ee2f882..fbdc727ebf10 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -935,7 +935,7 @@ void Array::SetAddMergedLeftSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAdd return; Cell aTempCell(*pTempCell); aTempCell.mnAddLeft = nAddSize; -mxImpl->PutCell( nCol, nRow, aTempCell ); +mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell ); } } @@ -950,7 +950,7 @@ void Array::SetAddMergedRightSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAd return; Cell aTempCell(*pTempCell); aTempCell.mnAddRight = nAddSize; -mxImpl->PutCell( nCol, nRow, aTempCell ); +mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell ); } } @@ -965,7 +965,7 @@ void Array::SetAddMergedTopSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nAddS return; Cell aTempCell(*pTempCell); aTempCell.mnAddTop = nAddSize; -mxImpl->PutCell( nCol, nRow, aTempCell ); +mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell ); } } @@ -980,7 +980,7 @@ void Array::SetAddMergedBottomSize( sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nA return; Cell aTempCell(*pTempCell); aTempCell.mnAddBottom = nAddSize; -mxImpl->PutCell( nCol, nRow, aTempCell ); +mxImpl->PutCell( aIt.Col(), aIt.Row(), aTempCell ); } }
core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx | 424 +++ 1 file changed, 212 insertions(+), 212 deletions(-) New commits: commit 744dfe387bc7512cd028b1de43b956bd0974377c Author: Noel Grandin AuthorDate: Wed May 8 21:24:11 2024 +0200 Commit: Noel Grandin CommitDate: Sun May 12 09:24:10 2024 +0200 replace createFromAscii with OUString literals in EnhancedCustomShapeTypeNames Change-Id: I69b89d7ee86c1d0b2dbdc4553cc12c01bdd76d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167530 Reviewed-by: Noel Grandin Tested-by: Jenkins diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx index fe1db10f67c3..a6fcb11a60c1 100644 --- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx @@ -304,223 +304,223 @@ namespace { struct ACCNameTypeTable { -const char* pS; -const char* pE; +OUString pS; +OUString pE; }; } -const ACCNameTypeTable pACCNameTypeTableArray[] = +constexpr ACCNameTypeTable pACCNameTypeTableArray[] { -{ "non-primitive", "Non Primitive Shape" }, -{ "rectangle", "Rectangle" }, -{ "round-rectangle", "Rounded Rectangle" }, -{ "ellipse", "Ellipse" }, -{ "diamond", "Diamond" }, -{ "isosceles-triangle", "Triangle" }, -{ "right-triangle", "Right Triangle" }, -{ "parallelogram", "Parallelogram" }, -{ "trapezoid", "Trapezoid" }, -{ "hexagon", "Hexagon" }, -{ "octagon", "Octagon" }, -{ "cross", "Cross" }, -{ "star5", "5-Point Star" }, -{ "right-arrow", "Right Arrow" }, -//{ "mso-spt14", mso_sptThickArrow }, -{ "pentagon-right", "Pentagon" }, -{ "cube", "Cuboid" }, -{ "mso-spt21", "Doorplate" }, -/*{ "mso-spt17", mso_sptBalloon }, -{ "mso-spt18", mso_sptSeal }, -{ "mso-spt19", mso_sptArc }, -{ "mso-spt20", mso_sptLine }, -{ "mso-spt21", mso_sptPlaque }, -{ "can", mso_sptCan },*/ -{ "ring", "Ring" }, -/*{ "mso-spt24", mso_sptTextSimple }, -{ "mso-spt25", mso_sptTextOctagon }, -{ "mso-spt26", mso_sptTextHexagon }, -{ "mso-spt27", mso_sptTextCurve }, -{ "mso-spt28", mso_sptTextWave }, -{ "mso-spt29", mso_sptTextRing }, -{ "mso-spt30", mso_sptTextOnCurve }, -{ "mso-spt31", mso_sptTextOnRing }, -{ "mso-spt32", mso_sptStraightConnector1 }, -{ "mso-spt33", mso_sptBentConnector2 }, -{ "mso-spt34", mso_sptBentConnector3 }, -{ "mso-spt35", mso_sptBentConnector4 }, -{ "mso-spt36", mso_sptBentConnector5 }, -{ "mso-spt37", mso_sptCurvedConnector2 }, -{ "mso-spt38", mso_sptCurvedConnector3 }, -{ "mso-spt39", mso_sptCurvedConnector4 }, -{ "mso-spt40", mso_sptCurvedConnector5 }, -{ "mso-spt41", mso_sptCallout1 }, -{ "mso-spt42", mso_sptCallout2 }, -{ "mso-spt43", mso_sptCallout3 }, -{ "mso-spt44", mso_sptAccentCallout1 }, -{ "mso-spt45", mso_sptAccentCallout2 }, -{ "mso-spt46", mso_sptAccentCallout3 },*/ -{ "line-callout-1", "Line Callout 1" }, -{ "line-callout-2", "Line Callout 2" }, -/*{ "mso-spt49", mso_sptBorderCallout3 }, -{ "mso-spt50", mso_sptAccentBorderCallout1 }, -{ "mso-spt51", mso_sptAccentBorderCallout2 }, -{ "mso-spt52", mso_sptAccentBorderCallout3 }, -{ "mso-spt53", mso_sptRibbon }, -{ "mso-spt54", mso_sptRibbon2 },*/ -{ "chevron", "Chevron" }, -{ "pentagon", "Pentagon" }, -{ "forbidden", "'No' Symbol" }, -{ "star8", "8-Point Star" }, -/*{ "mso-spt59", mso_sptSeal16 }, -{ "mso-spt60", mso_sptSeal32 },*/ -{ "rectangular-callout", "Rectangular Callout" }, -{ "round-rectangular-callout", "Rounded Rectangular Callout" }, -{ "round-callout", "Round Callout" }, -//{ "mso-spt64", mso_sptWave }, -{ "paper", "Folded Corner" }, -{ "left-arrow", "Left Arrow" }, -{ "down-arrow", "Down Arrow" }, -{ "up-arrow", "Up Arrow" }, -{ "left-right-arrow", "Left and Right Arrow" }, -{ "up-down-arrow", "Up and Down Arrow" }, -//{ "mso-spt71", mso_sptIrregularSeal1 }, -{ "bang", "Explosion" }, -{ "lightning", "Lighting Bolt" }, -{ "heart", "Heart" }, -//{ "mso-spt75", mso_sptPictureFrame }, -{ "quad-arrow", "4-Way Arrow" }, -{ "left-arrow-callout", "Left Arrow Callout" }, -{ "right-arrow-callout", "Right Arrow Callout" }, -{ "up-arrow-callout", "Up Arrow Callout" }, -{ "down-arrow-callout", "Down Arrow Callout" }, -{ "left-right-arrow-callout", "Left and Right Arrow Callout" }, -{ "up-down-arrow-callout", "Up and Down Arrow Callout" }, -{ "quad-arrow-callout", "4-Way Arrow Callout" }, -{ "quad-bevel", "Square Bevel" }, -{ "left-bracket", "Left Bracket" }, -{ "right-bracket", "Right Bracket" }, -{ "left-brace", "Left Brace" }, -{ "right-brace", "Right Brace" }, -{ "mso-spt89", "Up and Left Arrow" }, -//{ "mso-spt90", mso_sptBentUpArrow }, -
core.git: svx/source
svx/source/svdraw/presetooxhandleadjustmentrelations.cxx | 493 +++ 1 file changed, 246 insertions(+), 247 deletions(-) New commits: commit 980fb234ca9c380e1560b07a43f16abbcbeb7a8f Author: Noel Grandin AuthorDate: Thu May 2 13:41:38 2024 +0200 Commit: Noel Grandin CommitDate: Sat May 4 08:19:40 2024 +0200 replace createFromAscii with OUString literals in svx Change-Id: Ifefa5d3c26e49e29e476a4faba704ba9b2c7e7e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167062 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx b/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx index 528c8b35cd50..592632dc7196 100644 --- a/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx +++ b/svx/source/svdraw/presetooxhandleadjustmentrelations.cxx @@ -25,7 +25,7 @@ struct HandleAdjRel // Shape name without leading "ooxml-", underscore, zero based handle index // e.g. The third handle in shape of type "ooxml-circularArrow" will be // identified by key "circularArrow_2" -const char* sShape_Handle; +OUString sShape_Handle; // 4 tokens with separator "|" // first: RefX or RefR, na if not exists @@ -35,256 +35,256 @@ struct HandleAdjRel // e.g. The third handle in shape has in the preset // the tag . // The resulting value in the map here is "RefR|adj5|na|na" -const char* sAdjReferences; +OUString sAdjReferences; }; // The array initializer has been extracted from // oox/source/drawingml/customshapes/presetShapeDefinitions.xml // by using an XSLT file. That file is attached to tdf#126512. constexpr HandleAdjRel aHandleAdjRelArray[] -= { { "accentBorderCallout1_0", "RefX|adj2|RefY|adj1" }, -{ "accentBorderCallout1_1", "RefX|adj4|RefY|adj3" }, -{ "accentBorderCallout2_0", "RefX|adj2|RefY|adj1" }, -{ "accentBorderCallout2_1", "RefX|adj4|RefY|adj3" }, -{ "accentBorderCallout2_2", "RefX|adj6|RefY|adj5" }, -{ "accentBorderCallout3_0", "RefX|adj2|RefY|adj1" }, -{ "accentBorderCallout3_1", "RefX|adj4|RefY|adj3" }, -{ "accentBorderCallout3_2", "RefX|adj6|RefY|adj5" }, -{ "accentBorderCallout3_3", "RefX|adj8|RefY|adj7" }, -{ "accentCallout1_0", "RefX|adj2|RefY|adj1" }, -{ "accentCallout1_1", "RefX|adj4|RefY|adj3" }, -{ "accentCallout2_0", "RefX|adj2|RefY|adj1" }, -{ "accentCallout2_1", "RefX|adj4|RefY|adj3" }, -{ "accentCallout2_2", "RefX|adj6|RefY|adj5" }, -{ "accentCallout3_0", "RefX|adj2|RefY|adj1" }, -{ "accentCallout3_1", "RefX|adj4|RefY|adj3" }, -{ "accentCallout3_2", "RefX|adj6|RefY|adj5" }, -{ "accentCallout3_3", "RefX|adj8|RefY|adj7" }, -{ "arc_0", "na|na|RefAngle|adj1" }, -{ "arc_1", "na|na|RefAngle|adj2" }, -{ "bentArrow_0", "RefX|adj1|na|na" }, -{ "bentArrow_1", "na|na|RefY|adj2" }, -{ "bentArrow_2", "RefX|adj3|na|na" }, -{ "bentArrow_3", "RefX|adj4|na|na" }, -{ "bentConnector3_0", "RefX|adj1|na|na" }, -{ "bentConnector4_0", "RefX|adj1|na|na" }, -{ "bentConnector4_1", "na|na|RefY|adj2" }, -{ "bentConnector5_0", "RefX|adj1|na|na" }, -{ "bentConnector5_1", "na|na|RefY|adj2" }, -{ "bentConnector5_2", "RefX|adj3|na|na" }, -{ "bentUpArrow_0", "na|na|RefY|adj1" }, -{ "bentUpArrow_1", "RefX|adj2|na|na" }, -{ "bentUpArrow_2", "na|na|RefY|adj3" }, -{ "bevel_0", "RefX|adj|na|na" }, -{ "blockArc_0", "na|na|RefAngle|adj1" }, -{ "blockArc_1", "RefR|adj3|RefAngle|adj2" }, -{ "borderCallout1_0", "RefX|adj2|RefY|adj1" }, -{ "borderCallout1_1", "RefX|adj4|RefY|adj3" }, -{ "borderCallout2_0", "RefX|adj2|RefY|adj1" }, -{ "borderCallout2_1", "RefX|adj4|RefY|adj3" }, -{ "borderCallout2_2", "RefX|adj6|RefY|adj5" }, -{ "borderCallout3_0", "RefX|adj2|RefY|adj1" }, -{ "borderCallout3_1", "RefX|adj4|RefY|adj3" }, -{ "borderCallout3_2", "RefX|adj6|RefY|adj5" }, -{ "borderCallout3_3", "RefX|adj8|RefY|adj7" }, -{ "bracePair_0", "na|na|RefY|adj" }, -{ "bracketPair_0", "na|na|RefY|adj" }, -{ "callout1_0", "RefX|adj2|RefY|adj1" }, -{ "callout1_1", "RefX|adj4|RefY|adj3" }, -{ "callout2_0", "RefX|adj2|RefY|adj1" }, -{ "callout2_1", "RefX|adj4|RefY|adj3" }, -{ "callout2_2", "RefX|adj6|RefY|adj5" }, -{ "callout3_0", "RefX|adj2|RefY|adj1" }, -{ "callout3_1", "RefX|adj4|RefY|adj3" }, -{ "callout3_2", "RefX|adj6|RefY|adj5" }, -{ "callout3_3", "RefX|adj8|RefY|adj7" }, -{ "can_0", "na|na|RefY|adj" }, -{ "chevron_0", "RefX|adj|na|na" }, -{ "chord_0", "na|na|RefAngle|adj1" }, -{ "chord_1", "na|na|RefAngle|adj2" }, -{ "circularArrow_0", "na|na|RefAngle|adj2" }, -{ "circularArrow_1",
core.git: svx/source
svx/source/form/formcontrolfactory.cxx | 263 - 1 file changed, 128 insertions(+), 135 deletions(-) New commits: commit 544bc99ba834263a6800c05bbd08df3cca3a6e1a Author: Noel Grandin AuthorDate: Thu May 2 13:38:49 2024 +0200 Commit: Noel Grandin CommitDate: Fri May 3 19:34:33 2024 +0200 replace createFromAscii with OUString literals in svx Change-Id: I9d3b6b99ea5ca9f6d17729ae55cd4c3bad75ada1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167061 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index dc879a084802..540c4e80e7de 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -204,135 +204,134 @@ namespace svxform } -const char* aCharacterAndParagraphProperties[] = +constexpr OUString aCharacterAndParagraphProperties[] { -"CharFontName", -"CharFontStyleName", -"CharFontFamily", -"CharFontCharSet", -"CharFontPitch", -"CharColor", -"CharEscapement", -"CharHeight", -"CharUnderline", -"CharWeight", -"CharPosture", -"CharAutoKerning", -"CharBackColor", -"CharBackTransparent", -"CharCaseMap", -"CharCrossedOut", -"CharFlash", -"CharStrikeout", -"CharWordMode", -"CharKerning", -"CharLocale", -"CharKeepTogether", -"CharNoLineBreak", -"CharShadowed", -"CharFontType", -"CharStyleName", -"CharContoured", -"CharCombineIsOn", -"CharCombinePrefix", -"CharCombineSuffix", -"CharEmphasize", -"CharRelief", -"RubyText", -"RubyAdjust", -"RubyCharStyleName", -"RubyIsAbove", -"CharRotation", -"CharRotationIsFitToLine", -"CharScaleWidth", -"HyperLinkURL", -"HyperLinkTarget", -"HyperLinkName", -"VisitedCharStyleName", -"UnvisitedCharStyleName", -"CharEscapementHeight", -"CharNoHyphenation", -"CharUnderlineColor", -"CharUnderlineHasColor", -"CharStyleNames", -"CharHeightAsian", -"CharWeightAsian", -"CharFontNameAsian", -"CharFontStyleNameAsian", -"CharFontFamilyAsian", -"CharFontCharSetAsian", -"CharFontPitchAsian", -"CharPostureAsian", -"CharLocaleAsian", -"ParaIsCharacterDistance", -"ParaIsForbiddenRules", -"ParaIsHangingPunctuation", -"CharHeightComplex", -"CharWeightComplex", -"CharFontNameComplex", -"CharFontStyleNameComplex", -"CharFontFamilyComplex", -"CharFontCharSetComplex", -"CharFontPitchComplex", -"CharPostureComplex", -"CharLocaleComplex", -"ParaAdjust", -"ParaLineSpacing", -"ParaBackColor", -"ParaBackTransparent", -"ParaBackGraphic", -"ParaBackGraphicURL", -"ParaBackGraphicFilter", -"ParaBackGraphicLocation", -"ParaLastLineAdjust", -"ParaExpandSingleWord", -"ParaLeftMargin", -"ParaRightMargin", -"ParaTopMargin", -"ParaBottomMargin", -"ParaLineNumberCount", -"ParaLineNumberStartValue", -"PageDescName", -"PageNumberOffset", -"ParaRegisterModeActive", -"ParaTabStops", -"ParaStyleName", -"DropCapFormat", -"DropCapWholeWord", -"ParaKeepTogether", -"Setting", -"ParaSplit", -"Setting", -"NumberingLevel", -"NumberingRules", -"NumberingStartValue", -"ParaIsNumberingRestart", -"NumberingStyleName", -"ParaOrphans", -"ParaWidows", -"ParaShadowFormat", -"LeftBorder", -"RightBorder", -"TopBorder", -"BottomBorder", -"BorderDistance", -"LeftBorderDistance", -"RightBorderDistance", -"TopBorderDistance", -"BottomBorderDistance", -"BreakType", -"DropCapCharStyleName", -"ParaFirstLineIndent", -"ParaIsAutoFirstLineIndent", -"ParaIsHyphenation", -"ParaHyphenationMaxHyphens", -"ParaHyphenationMaxLeadingChars", -"ParaHyphenationMaxTrailingChars", -
core.git: svx/source
svx/source/xoutdev/xtable.cxx | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) New commits: commit 764f944d55cd21cb9ace6b51e8e173b7a4acd21d Author: Noel Grandin AuthorDate: Wed May 1 20:35:27 2024 +0200 Commit: Noel Grandin CommitDate: Thu May 2 08:20:46 2024 +0200 use more OUString in XPropertyList Change-Id: I775f75c2e56bff36d6de8ddb298d30ffd93a7da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166976 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index e640c18b64e9..e842e5e854cc 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -369,15 +369,15 @@ XPropertyList::CreatePropertyListFromURL( XPropertyListType t, struct { XPropertyListType t; -const char *pExt; -} const pExtnMap[] = { -{ XPropertyListType::Color,"soc" }, -{ XPropertyListType::LineEnd, "soe" }, -{ XPropertyListType::Dash, "sod" }, -{ XPropertyListType::Hatch,"soh" }, -{ XPropertyListType::Gradient, "sog" }, -{ XPropertyListType::Bitmap, "sob" }, -{ XPropertyListType::Pattern, "sop"} +OUString aExt; +} constexpr pExtnMap[] = { +{ XPropertyListType::Color,u"soc"_ustr }, +{ XPropertyListType::LineEnd, u"soe"_ustr }, +{ XPropertyListType::Dash, u"sod"_ustr }, +{ XPropertyListType::Hatch,u"soh"_ustr }, +{ XPropertyListType::Gradient, u"sog"_ustr }, +{ XPropertyListType::Bitmap, u"sob"_ustr }, +{ XPropertyListType::Pattern, u"sop"_ustr} }; OUString XPropertyList::GetDefaultExt( XPropertyListType t ) @@ -385,7 +385,7 @@ OUString XPropertyList::GetDefaultExt( XPropertyListType t ) for (const auto & i : pExtnMap) { if( i.t == t ) -return OUString::createFromAscii( i.pExt ); +return i.aExt; } return OUString(); }
core.git: svx/source
svx/source/dialog/svxruler.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 90548039f09d4bc773bf6879a62d544adfa175db Author: Xisco Fauli AuthorDate: Thu Apr 25 15:52:29 2024 +0200 Commit: Caolán McNamara CommitDate: Thu Apr 25 20:47:41 2024 +0200 svx: Avoid divide by 0 See https://crashreport.libreoffice.org/stats/signature/SvxRuler::UpdateTabs() Change-Id: Ie08c54d1a1b40bcc42da9f81c893f496fff433a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166626 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 6323583fd271..17c4edaa930d 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1033,7 +1033,7 @@ void SvxRuler::UpdateTabs() lCurrentDefTabDist = mxTabStopItem->GetDefaultDistance(); tools::Long nDefTabDist = ConvertHPosPixel(lCurrentDefTabDist); -const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent +const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent || nDefTabDist == 0 ? 0 : static_cast( (lRightIndent - lPosPixel) / nDefTabDist );
core.git: svx/source
svx/source/sdr/overlay/overlayselection.cxx | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) New commits: commit 992c821416817534c53338665e254c0dc554ea51 Author: Mike Kaganski AuthorDate: Sat Apr 20 18:20:13 2024 +0500 Commit: Mike Kaganski CommitDate: Sat Apr 20 16:53:45 2024 +0200 Simplify a bit Change-Id: I824b8670f7f2d6409ae98fe1a107c6c430fc1bfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166371 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 8dafb00778a5..d4a7b45beb8f 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -40,11 +40,7 @@ struct B2DPointCompare { bool operator()(const basegfx::B2DPoint& lhs, const basegfx::B2DPoint& rhs) const { -if (lhs.getX() < rhs.getX()) -return true; -if (lhs.getX() > rhs.getX()) -return false; -return lhs.getY() < rhs.getY(); +return std::make_pair(lhs.getX(), lhs.getY()) < std::make_pair(rhs.getX(), rhs.getY()); } }; @@ -52,11 +48,7 @@ struct B2DPointCompareYThenX { bool operator()(const basegfx::B2DPoint& lhs, const basegfx::B2DPoint& rhs) const { -if (lhs.getY() < rhs.getY()) -return true; -if (lhs.getY() > rhs.getY()) -return false; -return lhs.getX() < rhs.getX(); +return std::make_pair(lhs.getY(), lhs.getX()) < std::make_pair(rhs.getY(), rhs.getX()); } };
core.git: svx/source
svx/source/sdr/overlay/overlayselection.cxx | 141 +--- 1 file changed, 128 insertions(+), 13 deletions(-) New commits: commit e5bc241d197ed946fc4a2ba4901e25c7f82cab85 Author: Noel Grandin AuthorDate: Wed Apr 3 16:12:12 2024 +0200 Commit: Noel Grandin CommitDate: Sat Apr 20 14:55:40 2024 +0200 cool#8571 use better algorithm for generating selection overlay when we know that the selection overlay consists purely of rectanges, we can use a faster algorithm to generate the combined polygon Change-Id: I15129facc6e682261fb59e79cf93b0e9d9e114b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165752 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 9644650263c9..8dafb00778a5 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -31,33 +31,149 @@ #include #include #include +#include +#include +namespace +{ +struct B2DPointCompare +{ +bool operator()(const basegfx::B2DPoint& lhs, const basegfx::B2DPoint& rhs) const +{ +if (lhs.getX() < rhs.getX()) +return true; +if (lhs.getX() > rhs.getX()) +return false; +return lhs.getY() < rhs.getY(); +} +}; + +struct B2DPointCompareYThenX +{ +bool operator()(const basegfx::B2DPoint& lhs, const basegfx::B2DPoint& rhs) const +{ +if (lhs.getY() < rhs.getY()) +return true; +if (lhs.getY() > rhs.getY()) +return false; +return lhs.getX() < rhs.getX(); +} +}; + +} namespace sdr::overlay { -// combine rages geometrically to a single, ORed polygon -static basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const std::vector< basegfx::B2DRange >& rRanges) + +// Combine rectangles geometrically to a single OR'ed polygon. +// Algorithm is from +// "Uniqueness of orthogonal connect-the-dots" Joseph O'Rourke 1988 +// The basic algorithm is: +// Sort points by lowest x, lowest y +// Go through each column and create edges between the vertices 2i and 2i + 1 in that column +// Sort points by lowest y, lowest x +// Go through each row and create edges between the vertices 2i and 2i + 1 in that row. +// +static basegfx::B2DPolyPolygon impCombineRectanglesToPolyPolygon(const std::vector< basegfx::B2DRange >& rRectangles) +{ +o3tl::sorted_vector sort_x; +for (auto const & rRect : rRectangles) { -const sal_uInt32 nCount(rRanges.size()); -basegfx::B2DPolyPolygon aRetval; +auto checkPoint = [_x](double x, double y) +{ +basegfx::B2DPoint pt(x, y); +auto it = sort_x.find(pt); +if (it != sort_x.end()) // Shared vertice, remove it. +sort_x.erase(it); +else +sort_x.insert(pt); +}; +checkPoint(rRect.getMinX(), rRect.getMinY()); +checkPoint(rRect.getMinX(), rRect.getMaxY()); +checkPoint(rRect.getMaxX(), rRect.getMinY()); +checkPoint(rRect.getMaxX(), rRect.getMaxY()); +} + + +o3tl::sorted_vector sort_y; +for (auto const & i : sort_x) +sort_y.insert(i); -for(sal_uInt32 a(0); a < nCount; a++) +std::map edges_h; +std::map edges_v; + +size_t i = 0; +while (i < sort_x.size()) +{ +auto curr_y = sort_y[i].getY(); +while (i < sort_x.size() && sort_y[i].getY() == curr_y) +{ +edges_h[sort_y[i]] = sort_y[i + 1]; +edges_h[sort_y[i + 1]] = sort_y[i]; +i += 2; +} +} +i = 0; +while (i < sort_x.size()) +{ +auto curr_x = sort_x[i].getX(); +while (i < sort_x.size() && sort_x[i].getX() == curr_x) { -const basegfx::B2DPolygon aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a])); +edges_v[sort_x[i]] = sort_x[i + 1]; +edges_v[sort_x[i + 1]] = sort_x[i]; +i += 2; +} +} -if(0 == a) +// Get all the polygons. +basegfx::B2DPolyPolygon aPolyPolygon; +std::vector> tmpPolygon; +while (!edges_h.empty()) +{ +tmpPolygon.clear(); +// We can start with any point. +basegfx::B2DPoint pt = edges_h.begin()->first; +edges_h.erase(edges_h.begin()); +tmpPolygon.push_back({pt, false}); +for (;;) +{ +auto [curr, e] = tmpPolygon.back(); +if (!e) { -aRetval.append(aDiscretePolygon); +auto it =
core.git: svx/source
svx/source/sdr/overlay/overlayselection.cxx | 98 +--- 1 file changed, 48 insertions(+), 50 deletions(-) New commits: commit 7b1405689d4246e0e37e8759f03e1962af964cec Author: Noel Grandin AuthorDate: Fri Apr 19 22:56:04 2024 +0200 Commit: Noel Grandin CommitDate: Sat Apr 20 07:42:08 2024 +0200 reduce the number of drawing primitives we create in OverlaySelection and flatten it a little Change-Id: I3377f832658c504a2541c6994f7386adad06b0e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166321 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 89ef1202e125..9644650263c9 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -92,63 +92,61 @@ namespace sdr::overlay drawinglayer::primitive2d::Primitive2DContainer OverlaySelection::createOverlayObjectPrimitive2DSequence() { drawinglayer::primitive2d::Primitive2DContainer aRetval; -const sal_uInt32 nCount(getRanges().size()); +const sal_uInt32 nCount(maRanges.size()); -if(nCount) -{ -// create range primitives -const bool bInvert(OverlayType::Invert == maLastOverlayType); -basegfx::BColor aRGBColor(getBaseColor().getBColor()); -aRetval.resize(nCount); +if(!nCount) +return aRetval; -if(bInvert) -{ -// force color to white for invert to get a full invert -aRGBColor = basegfx::BColor(1.0, 1.0, 1.0); -} +// create range primitives +const bool bInvert(OverlayType::Invert == maLastOverlayType); +basegfx::BColor aRGBColor(getBaseColor().getBColor()); +if(bInvert) +{ +// force color to white for invert to get a full invert +aRGBColor = basegfx::BColor(1.0, 1.0, 1.0); +} -for(sal_uInt32 a(0);a < nCount; a++) -{ -const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(maRanges[a])); -aRetval[a] = -new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( -basegfx::B2DPolyPolygon(aPolygon), -aRGBColor); -} +basegfx::B2DPolyPolygon aPolyPolygon; +aPolyPolygon.reserve(nCount); +for(sal_uInt32 a(0);a < nCount; a++) + aPolyPolygon.append(basegfx::utils::createPolygonFromRect(maRanges[a])); +aRetval.append( +new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( +std::move(aPolyPolygon), +aRGBColor)); -if(bInvert) +if(bInvert) +{ +// embed all in invert primitive +aRetval = drawinglayer::primitive2d::Primitive2DContainer { +new drawinglayer::primitive2d::InvertPrimitive2D( +std::move(aRetval)) +}; +} +else if(OverlayType::Transparent == maLastOverlayType) +{ +// embed all rectangles in transparent paint +const double fTransparence(mnLastTransparence / 100.0); +drawinglayer::primitive2d::Primitive2DReference aUnifiedTransparence( +new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( +std::move(aRetval), +fTransparence)); + +if(mbBorder) { -// embed all in invert primitive -aRetval = drawinglayer::primitive2d::Primitive2DContainer { -new drawinglayer::primitive2d::InvertPrimitive2D( -std::move(aRetval)) -}; +basegfx::B2DPolyPolygon aBorderPolyPolygon(impCombineRangesToPolyPolygon(maRanges)); +drawinglayer::primitive2d::Primitive2DReference aSelectionOutline( +new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D( +std::move(aBorderPolyPolygon), +aRGBColor)); + +// add both to result +aRetval = drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, aSelectionOutline }; } -else if(OverlayType::Transparent == maLastOverlayType) +else { -// embed all rectangles in transparent paint -const double fTransparence(mnLastTransparence / 100.0); -
core.git: svx/source
svx/source/sdr/contact/viewcontactofsdrole2obj.cxx |4 +--- svx/source/sdr/overlay/overlaybitmapex.cxx |2 +- svx/source/sdr/overlay/overlaytools.cxx|6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) New commits: commit ee9a21da6aa0872855f78a4464d6952e11a9aa54 Author: Aaron Bourdeaux AuthorDate: Fri Mar 29 19:12:59 2024 -0400 Commit: Ilmari Lauhakangas CommitDate: Fri Apr 5 13:15:46 2024 +0200 tdf#160084 Simplify comparison for basegfx::fTools Change-Id: I61bcc0054c71273945d3004839be92a25a26d261 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165563 Tested-by: Jenkins Reviewed-by: Xisco Fauli Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index e6386e7c0a92..0c206f6edb07 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -99,9 +99,7 @@ void ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters(drawinglay const double fWidth(aChartContentRange.getWidth()); const double fHeight(aChartContentRange.getHeight()); -if(!aChartSequence.empty() -&& basegfx::fTools::more(fWidth, 0.0) -&& basegfx::fTools::more(fHeight, 0.0)) +if(!aChartSequence.empty() && fWidth > 0.0 && fHeight > 0.0) { // create embedding transformation basegfx::B2DHomMatrix aEmbed( diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx index 3ffba9e05747..6dc31ff8eb2c 100644 --- a/svx/source/sdr/overlay/overlaybitmapex.cxx +++ b/svx/source/sdr/overlay/overlaybitmapex.cxx @@ -35,7 +35,7 @@ namespace sdr::overlay mfShearX, mfRotation)); -if(basegfx::fTools::more(mfAlpha, 0.0)) +if(mfAlpha > 0.0) { drawinglayer::primitive2d::Primitive2DContainer aNewTransPrimitiveVector { aReference }; aReference = new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aNewTransPrimitiveVector), mfAlpha); diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index 8b857ad53ee8..2755b7fa3030 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -62,7 +62,7 @@ Primitive2DReference OverlayStaticRectanglePrimitive::create2DDecomposition(cons maPosition.getX() - fHalfWidth, maPosition.getY() - fHalfHeight, maPosition.getX() + fHalfWidth, maPosition.getY() + fHalfHeight); -if (!basegfx::fTools::more(getDiscreteUnit(), 0.0) || mfTransparence > 1.0) +if (getDiscreteUnit() <= 0.0 || mfTransparence > 1.0) return nullptr; basegfx::B2DPolygon aPolygon( @@ -138,7 +138,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const { const Size aBitmapSize(getBitmapEx().GetSizePixel()); -if(!aBitmapSize.Width() || !aBitmapSize.Height() || !basegfx::fTools::more(getDiscreteUnit(), 0.0)) +if(!aBitmapSize.Width() || !aBitmapSize.Height() || getDiscreteUnit() <= 0.0) return nullptr; // calculate back from internal bitmap's extreme coordinates (the edges) @@ -287,7 +287,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const Primitive2DReference aRetval; basegfx::B2DRange aInnerRange(getObjectRange()); -if(aInnerRange.isEmpty() || !basegfx::fTools::more(getDiscreteUnit(), 0.0) || getTransparence() > 1.0) +if(aInnerRange.isEmpty() || getDiscreteUnit() <= 0.0 || getTransparence() > 1.0) return nullptr; if (!Application::GetSettings().GetStyleSettings().GetHighContrastMode())
core.git: svx/source
svx/source/unodraw/unoshape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2e6c853b8ecf42f829ec039336bdd7b8574ace2c Author: Andrea Gelmini AuthorDate: Wed Apr 3 12:32:59 2024 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 14:26:51 2024 +0200 Fix typo Change-Id: Ic6416560bf3d404a57acc66cd4f375fe9bfc9c6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165743 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 0d5be8555330..95d6ba37304c 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1681,7 +1681,7 @@ void SAL_CALL SvxShape::setPropertyValues( const css::uno::Sequence< OUString >& } catch (beans::UnknownPropertyException&) { -// ignore, various code likes to opportunisticly set properties on objects that don't support those properties +// ignore, various code likes to opportunistically set properties on objects that don't support those properties } catch (uno::Exception&) {
core.git: svx/source
svx/source/dialog/dlgctrl.cxx |1 - svx/source/dialog/fntctrl.cxx |3 --- svx/source/dialog/searchcharmap.cxx |2 -- svx/source/dialog/srchdlg.cxx |2 -- svx/source/fmcomp/dbaexchange.cxx |1 - svx/source/fmcomp/dbaobjectex.cxx |2 -- svx/source/form/dataaccessdescriptor.cxx|1 - svx/source/form/fmdocumentclassification.cxx|1 - svx/source/form/fmobj.cxx |2 -- svx/source/form/fmshell.cxx |1 - svx/source/form/fmtextcontrolshell.cxx |1 - svx/source/form/fmtools.cxx |4 svx/source/form/fmview.cxx |3 --- svx/source/form/navigatortreemodel.cxx |3 --- svx/source/form/sdbdatacolumn.cxx |2 -- svx/source/form/sqlparserclient.cxx |2 -- svx/source/sidebar/media/MediaPlaybackPanel.hxx |1 - svx/source/sidebar/nbdtmg.cxx |1 - svx/source/table/accessiblecell.cxx |1 - svx/source/table/accessibletableshape.cxx |2 -- svx/source/table/cell.cxx |1 - svx/source/table/cellrange.cxx |1 - svx/source/table/tablecolumns.cxx |1 - svx/source/table/tablelayouter.cxx |1 - svx/source/table/tablerows.cxx |1 - svx/source/table/tableundo.cxx |1 - svx/source/tbxctrls/extrusioncontrols.cxx |1 - svx/source/tbxctrls/fillctrl.cxx|2 -- svx/source/tbxctrls/fontworkgallery.cxx |1 - svx/source/tbxctrls/grafctrl.cxx|2 -- svx/source/tbxctrls/itemwin.cxx |1 - svx/source/tbxctrls/linectrl.cxx|1 - svx/source/tbxctrls/linewidthctrl.cxx |5 - svx/source/toolbars/extrusionbar.cxx|1 - svx/source/toolbars/fontworkbar.cxx |1 - svx/source/unodraw/UnoGraphicExporter.cxx |1 - svx/source/unodraw/tableshape.cxx |3 --- svx/source/unodraw/unoshap2.cxx |1 - svx/source/unodraw/unoshap4.cxx |1 - svx/source/unodraw/unoshape.cxx |1 - svx/source/xml/xmleohlp.cxx |1 - svx/source/xml/xmlxtimp.cxx |1 - 42 files changed, 66 deletions(-) New commits: commit 704e71b9d13054a7e21a037663de4feacae2ef25 Author: Gabor Kelemen AuthorDate: Fri Mar 29 14:09:14 2024 +0100 Commit: Gabor Kelemen CommitDate: Wed Apr 3 08:50:52 2024 +0200 tdf#146619 Drop unused 'using namespace' in: svx/ Change-Id: Ic8b925a3ec55166a9d5da05827d2cb335943b665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165542 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 456a369fcd16..d68a68faa4d3 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -48,7 +48,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; using namespace ::com::sun::star::accessibility; // Control for display and selection of the corner points and diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index b0723c8e65c1..ad9c5fc62c49 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -66,9 +66,6 @@ //an arbitrary number of characters #define TEXT_WIDTH 80 -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; - // small helper functions to set fonts diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index 7284bfd0874b..c1c289d6366d 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -31,8 +31,6 @@ #include -using namespace ::com::sun::star::accessibility; -using namespace ::com::sun::star::uno; using namespace ::com::sun::star; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 93d593d8729f..481124e3c963 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -76,9 +76,7 @@ #include #include -using namespace com::sun::star::i18n; using namespace com::sun::star::uno; -using namespace com::sun::star::accessibility; using namespace com::sun::star; using namespace comphelper; diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index 904740e38877..8b2c869fd611 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -38,7 +38,6 @@ namespace svx using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::sdbc; -using namespace ::com::sun::star::lang; using namespace
core.git: svx/source
svx/source/svdraw/svdpntv.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 053f7f9ff5a475446da2855e2e71f3ea0ef18791 Author: Patrick Luby AuthorDate: Mon Apr 1 10:01:03 2024 -0400 Commit: Patrick Luby CommitDate: Mon Apr 1 19:27:17 2024 +0200 tdf#160444 check device's owner window is a nullptr Since commit 563f7077f1dbce31ff95ee8d2e8d17b629693db1, the device's owner window gets deleted before this object is deleted. Change-Id: I15dc8db60e5520c2f0e73a9a117f25af15845caf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165637 Tested-by: Jenkins Reviewed-by: Patrick Luby diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 86535232d288..09583787fa24 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -858,7 +858,12 @@ void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect) void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice) { // do not erase background, that causes flicker (!) -rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase); +// tdf#160444 check device's owner window is a nullptr +// Since commit 563f7077f1dbce31ff95ee8d2e8d17b629693db1, the +// device's owner window gets deleted before this object is +// deleted. +if (rDevice.GetOwnerWindow()) +rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase); } void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice, const tools::Rectangle& rRect)
core.git: svx/source
svx/source/gallery2/galbrws1.cxx | 25 - svx/source/inc/galbrws1.hxx |1 + 2 files changed, 13 insertions(+), 13 deletions(-) New commits: commit 203b6a00cf5b716cb580d2bd4e9a6071cec23574 Author: Oliver Specht AuthorDate: Tue Mar 19 13:16:07 2024 +0100 Commit: Gabor Kelemen CommitDate: Mon Mar 25 16:59:06 2024 +0100 tdf#160264 Fixed crash in gallery Local gallery themes need an additional listener to prevent deleting the global theme. Change-Id: If6cfcb5a3eeffdc087b089f2151c45b2cff87bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165029 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index c68c2d8ba83e..443d9be4adec 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -256,7 +256,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa void GalleryBrowser1::ImplGetExecuteVector(std::vector& o_aExec) { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); if( !pTheme ) return; @@ -288,14 +288,14 @@ void GalleryBrowser1::ImplGetExecuteVector(std::vector& o_aExec) o_aExec.emplace_back("properties"); -mpGallery->ReleaseTheme( pTheme, *this ); +mpGallery->ReleaseTheme( pTheme, maLocalListner ); } void GalleryBrowser1::ImplGalleryThemeProperties( std::u16string_view rThemeName, bool bCreateNew ) { DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already set!"); mpThemePropsDlgItemSet.reset(new SfxItemSet( SfxGetpApp()->GetPool() )); -GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, *this ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListner ); ImplFillExchangeData( pTheme, *mpExchangeData ); @@ -345,7 +345,7 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties(bool bCreateNew, sal_Int32 n } OUString aThemeName( mpExchangeData->pTheme->GetName() ); -mpGallery->ReleaseTheme( mpExchangeData->pTheme, *this ); +mpGallery->ReleaseTheme( mpExchangeData->pTheme, maLocalListner ); if ( bCreateNew && ( nRet != RET_OK ) ) { @@ -367,13 +367,13 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) { if (rIdent == u"update") { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr aActualizeProgress(pFact->CreateActualizeProgressDialog(mxThemes.get(), pTheme)); aActualizeProgress->Execute(); -mpGallery->ReleaseTheme( pTheme, *this ); +mpGallery->ReleaseTheme( pTheme, maLocalListner ); } else if (rIdent == u"delete") { @@ -384,7 +384,7 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) } else if (rIdent == u"rename") { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); const OUString aOldName( pTheme->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -407,11 +407,11 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) mpGallery->RenameTheme( aOldName, aName ); } } -mpGallery->ReleaseTheme( pTheme, *this ); +mpGallery->ReleaseTheme( pTheme, maLocalListner ); } else if (rIdent == u"assign") { -GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); +GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), maLocalListner ); if (pTheme && !pTheme->IsReadOnly()) { @@ -422,7 +422,7 @@ void GalleryBrowser1::ImplExecute(std::u16string_view rIdent) pTheme->SetId( aDlg->GetId(), true ); } -mpGallery->ReleaseTheme( pTheme, *this ); +mpGallery->ReleaseTheme( pTheme, maLocalListner ); } else if (rIdent == u"properties") { @@ -1500,13 +1500,12 @@ IMPL_LINK(GalleryBrowser1, SelectTbxHdl, weld::Toggleable&, rBox, void) void GalleryBrowser1::FillThemeEntries() { -SfxListener aListener; for (size_t i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; ++i) { const GalleryThemeEntry* pThemeInfo = mpGallery->GetThemeInfo( i ); OUString aThemeName = pThemeInfo->GetThemeName(); //sal_uInt32 nId = pThemeInfo->GetId(); -GalleryTheme* pTheme =
core.git: svx/source
svx/source/inc/celltypes.hxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 7c76332b52d9b3b967beecc1fe163eea783c471e Author: Christopher Loi AuthorDate: Thu Mar 21 05:24:32 2024 -0700 Commit: Ilmari Lauhakangas CommitDate: Thu Mar 21 18:54:30 2024 +0100 tdf#143148: Replace include guards with pragma once Change-Id: I00cee3dc61231a0cc344d404eed4cedda41f4d7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165100 Reviewed-by: Christopher Loi Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/svx/source/inc/celltypes.hxx b/svx/source/inc/celltypes.hxx index f70e386db8a4..7dfc9d10b4df 100644 --- a/svx/source/inc/celltypes.hxx +++ b/svx/source/inc/celltypes.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SVX_SOURCE_INC_CELLTYPES_HXX -#define INCLUDED_SVX_SOURCE_INC_CELLTYPES_HXX +#pragma once #include #include @@ -81,6 +80,4 @@ private: }; } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: svx/source
svx/source/form/fmscriptingenv.cxx | 1055 ++--- 1 file changed, 528 insertions(+), 527 deletions(-) New commits: commit 2ced3022d2c3a534a1e3ac6f5cd12cdf870c2151 Author: Arnaud VERSINI AuthorDate: Tue Dec 26 18:21:29 2023 +0100 Commit: Noel Grandin CommitDate: Wed Mar 13 17:23:22 2024 +0100 svx : use string view to avoid OUString creation Change-Id: I3e3488ed15cf314ff6a666c7ec4bd5b41f96100e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161331 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index db7904174b0a..dd01ddf842bc 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -41,6 +41,7 @@ #include #include +#include using std::pair; @@ -102,7 +103,7 @@ namespace svxform @return if and only if the method is declared oneway, i.e. can be called asynchronously */ -static bool impl_allowAsynchronousCall_nothrow( const OUString& _rListenerType, const OUString& _rMethodName ); +static bool impl_allowAsynchronousCall_nothrow( std::u16string_view _rListenerType, std::u16string_view _rMethodName ); /** determines whether the instance is already disposed */ @@ -140,538 +141,538 @@ namespace svxform } -bool FormScriptListener::impl_allowAsynchronousCall_nothrow( const OUString& _rListenerType, const OUString& _rMethodName ) +bool FormScriptListener::impl_allowAsynchronousCall_nothrow( std::u16string_view _rListenerType, std::u16string_view _rMethodName ) { // This used to be implemented as: // is (_rListenerType + "::" + _rMethodName) a oneway function? // since we got rid of the notion of oneway, this is the list // of oneway methods, autogenerated by postprocessing of // commitdiff 90eac3e69749a9227c4b6902b1f3cef1e338c6d1 -static const o3tl::sorted_vector> delayed_event_listeners{ - pair("com.sun.star.accessibility.XAccessibleComponent","grabFocus"), - pair("com.sun.star.accessibility.XAccessibleEventBroadcaster","addAccessibleEventListener"), - pair("com.sun.star.accessibility.XAccessibleEventBroadcaster","removeAccessibleEventListener"), - pair("com.sun.star.accessibility.XAccessibleSelection","clearAccessibleSelection"), - pair("com.sun.star.accessibility.XAccessibleSelection","selectAllAccessibleChildren"), - pair("com.sun.star.awt.XActionListener","actionPerformed"), - pair("com.sun.star.awt.XActivateListener","windowActivated"), - pair("com.sun.star.awt.XActivateListener","windowDeactivated"), - pair("com.sun.star.awt.XAdjustmentListener","adjustmentValueChanged"), - pair("com.sun.star.awt.XButton","addActionListener"), - pair("com.sun.star.awt.XButton","removeActionListener"), -pair("com.sun.star.awt.XButton","setLabel"), - pair("com.sun.star.awt.XButton","setActionCommand"), - pair("com.sun.star.awt.XCheckBox","addItemListener"), - pair("com.sun.star.awt.XCheckBox","removeItemListener"), -pair("com.sun.star.awt.XCheckBox","setState"), -pair("com.sun.star.awt.XCheckBox","setLabel"), - pair("com.sun.star.awt.XCheckBox","enableTriState"), - pair("com.sun.star.awt.XComboBox","addItemListener"), - pair("com.sun.star.awt.XComboBox","removeItemListener"), - pair("com.sun.star.awt.XComboBox","addActionListener"), - pair("com.sun.star.awt.XComboBox","removeActionListener"), -pair("com.sun.star.awt.XComboBox","addItem"), -pair("com.sun.star.awt.XComboBox","addItems"), - pair("com.sun.star.awt.XComboBox","removeItems"), - pair("com.sun.star.awt.XComboBox","setDropDownLineCount"), -pair("com.sun.star.awt.XControl","setContext"), -pair("com.sun.star.awt.XControl","createPeer"), - pair("com.sun.star.awt.XControl","setDesignMode"), - pair("com.sun.star.awt.XControlContainer","setStatusText"), - pair("com.sun.star.awt.XControlContainer","addControl"), - pair("com.sun.star.awt.XControlContainer","removeControl"), - pair("com.sun.star.awt.XCurrencyField","setValue"), - pair("com.sun.star.awt.XCurrencyField","setMin"), - pair("com.sun.star.awt.XCurrencyField","setMax"), - pair("com.sun.star.awt.XCurrencyField","setFirst"), - pair("com.sun.star.awt.XCurrencyField","setLast"), - pair("com.sun.star.awt.XCurrencyField","setSpinSize"), - pair("com.sun.star.awt.XCurrencyField","setDecimalDigits"), - pair("com.sun.star.awt.XCurrencyField","setStrictFormat"), -
core.git: svx/source
svx/source/svdraw/svdedxv.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit f8bb64a3cffb80793a6b3b9c41f78c5feccb168e Author: Pranam Lashkari AuthorDate: Mon Mar 11 21:03:30 2024 +0530 Commit: Caolán McNamara CommitDate: Mon Mar 11 21:48:33 2024 +0100 LOK: send LOK_CALLBACK_SHAPE_INNER_TEXT info on empty textbox initialization Change-Id: I8bc003f89147c145ec4b1f9a91b6fe82da9f14be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164673 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f60baf1b64fe..799d51f85930 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2513,7 +2513,10 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) Outliner* pTEOutliner = mpTextEditOutlinerView->GetOutliner(); if (pTEOutliner && pTEOutliner->IsModified()) +{ GetModel().SetChanged(); +SetInnerTextAreaForLOKit(); +} ImpMakeTextCursorAreaVisible(); }
core.git: svx/source
svx/source/sdr/properties/textproperties.cxx | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit 6a3b20b14d32922c99df4ad65271499d0a8d663e Author: Noel Grandin AuthorDate: Fri Mar 8 19:51:30 2024 +0200 Commit: Noel Grandin CommitDate: Fri Mar 8 21:38:46 2024 +0100 tdf#158773 do the cheap checks first the HasText() call inside TextProperties::Notify is surprisingly expensive, so only do it when we know we are interested. Shaves 25% off the load time here Change-Id: Iab257add7fd56bf405678944ca8a3482c8f7b142 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164596 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 220d6a528ef1..90c68df3fa2a 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -550,15 +550,15 @@ namespace sdr::properties // call parent AttributeProperties::Notify(rBC, rHint); -SdrTextObj& rObj = static_cast(GetSdrObject()); -if(!rObj.HasText()) -return; - SfxHintId nId(rHint.GetId()); -const svx::ITextProvider& rTextProvider(getTextProvider()); if(SfxHintId::DataChanged == nId && rBC.IsSfxStyleSheet()) { +SdrTextObj& rObj = static_cast(GetSdrObject()); +if(!rObj.HasText()) +return; + +const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nText = rTextProvider.getTextCount(); while (nText--) { @@ -580,6 +580,11 @@ namespace sdr::properties } else if(SfxHintId::Dying == nId && rBC.IsSfxStyleSheet()) { +SdrTextObj& rObj = static_cast(GetSdrObject()); +if(!rObj.HasText()) +return; + +const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nText = rTextProvider.getTextCount(); while (nText--) { @@ -598,6 +603,7 @@ namespace sdr::properties if(aOldName != aNewName) { +const svx::ITextProvider& rTextProvider(getTextProvider()); sal_Int32 nText = rTextProvider.getTextCount(); while (nText--) {
core.git: svx/source
svx/source/sdr/properties/attributeproperties.cxx | 124 +++--- 1 file changed, 66 insertions(+), 58 deletions(-) New commits: commit 4a30c919373940025024442d9607da06258bb552 Author: Noel Grandin AuthorDate: Thu Mar 7 12:48:20 2024 +0200 Commit: Noel Grandin CommitDate: Thu Mar 7 16:50:10 2024 +0100 tdf#158773 reduce dynamic_cast in AttributeProperties::Notify Change-Id: I29143d4908454be819acec16732533ff5caa1055 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164530 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 9fc67078a847..641ebe438154 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -419,84 +419,92 @@ namespace sdr::properties { bool bHintUsed(false); -const SfxStyleSheetHint* pStyleHint = dynamic_cast(); - -if(pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet()) +SfxHintId id = rHint.GetId(); +if (id == SfxHintId::StyleSheetCreated +|| id == SfxHintId::StyleSheetChanged +|| id == SfxHintId::StyleSheetErased +|| id == SfxHintId::StyleSheetModified +|| id == SfxHintId::StyleSheetInDestruction +|| id == SfxHintId::StyleSheetModifiedExtended) { -SdrObject& rObj = GetSdrObject(); -//SdrPage* pPage = rObj.GetPage(); +const SfxStyleSheetHint* pStyleHint = static_cast(); -switch(pStyleHint->GetId()) +if(pStyleHint->GetStyleSheet() == GetStyleSheet()) { -case SfxHintId::StyleSheetCreated : -{ -// cannot happen, nothing to do -break; -} -case SfxHintId::StyleSheetModified: -case SfxHintId::StyleSheetModifiedExtended: -case SfxHintId::StyleSheetChanged : -{ -// notify change -break; -} -case SfxHintId::StyleSheetErased : -case SfxHintId::StyleSheetInDestruction : +SdrObject& rObj = GetSdrObject(); +//SdrPage* pPage = rObj.GetPage(); + +switch(id) { -// Style needs to be exchanged -SfxStyleSheet* pNewStSh = nullptr; -SdrModel& rModel(rObj.getSdrModelFromSdrObject()); - -// Do nothing if object is in destruction, else a StyleSheet may be found from -// a StyleSheetPool which is just being deleted itself. and thus it would be fatal -// to register as listener to that new StyleSheet. -if(!rObj.IsInDestruction()) +case SfxHintId::StyleSheetCreated : { -if(SfxStyleSheet* pStyleSheet = GetStyleSheet()) +// cannot happen, nothing to do +break; +} +case SfxHintId::StyleSheetModified: +case SfxHintId::StyleSheetModifiedExtended: +case SfxHintId::StyleSheetChanged : +{ +// notify change +break; +} +case SfxHintId::StyleSheetErased : +case SfxHintId::StyleSheetInDestruction : +{ +// Style needs to be exchanged +SfxStyleSheet* pNewStSh = nullptr; +SdrModel& rModel(rObj.getSdrModelFromSdrObject()); + +// Do nothing if object is in destruction, else a StyleSheet may be found from +// a StyleSheetPool which is just being deleted itself. and thus it would be fatal +// to register as listener to that new StyleSheet. +if(!rObj.IsInDestruction()) { -pNewStSh = static_cast(rModel.GetStyleSheetPool()->Find( -pStyleSheet->GetParent(), pStyleSheet->GetFamily())); +if(SfxStyleSheet* pStyleSheet = GetStyleSheet()) +{ +pNewStSh = static_cast(rModel.GetStyleSheetPool()->Find( +
core.git: svx/source
svx/source/sdr/contact/viewcontactofgraphic.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 860548e23e2ae737d7bd5840f71f776b1239f997 Author: Mike Kaganski AuthorDate: Thu Mar 7 08:54:59 2024 +0100 Commit: Mike Kaganski CommitDate: Thu Mar 7 10:59:18 2024 +0100 Simplify a comparison Comparing with zero is simple - the implementation of basegfx::fTools::moreOrEqual calls rtl_math_approxEqual eventually, which special-zases zero. Change-Id: I47c6059b56426c93e0c244036edeb5632037e093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164492 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index eee994c583cc..1135bd48bc91 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -112,7 +112,7 @@ namespace sdr::contact const double fOffsetX((aScale.getX() - aPrefSize.getWidth()) / 2.0); const double fOffsetY((aScale.getY() - aPrefSize.getHeight()) / 2.0); -if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0)) +if (fOffsetX >= 0.0 && fOffsetY >= 0.0) { // create the EmptyPresObj fallback visualisation. The fallback graphic // is already provided in rGraphicObject in this case, use it
core.git: svx/source
svx/source/sdr/properties/textproperties.cxx | 60 --- 1 file changed, 27 insertions(+), 33 deletions(-) New commits: commit 3b784236d7c3bf386deeeadcf79d9e9b289bf991 Author: Noel Grandin AuthorDate: Wed Mar 6 14:12:51 2024 +0200 Commit: Noel Grandin CommitDate: Wed Mar 6 19:58:47 2024 +0100 tdf#158773 reduce cost of TextProperties::Notify Shaves 30% off the load time here, by re-arranging the logic so we do th expensive dynamic_cast less often Change-Id: If7a1605994e620dbdb61010506c624cc738359a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164466 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 55b366bdc03b..17f63d044dcf 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -554,50 +554,44 @@ namespace sdr::properties if(!rObj.HasText()) return; +SfxHintId nId(rHint.GetId()); const svx::ITextProvider& rTextProvider(getTextProvider()); -if(dynamic_cast() != nullptr) -{ -SfxHintId nId(rHint.GetId()); -if(SfxHintId::DataChanged == nId) +if(SfxHintId::DataChanged == nId && dynamic_cast() != nullptr) +{ +sal_Int32 nText = rTextProvider.getTextCount(); +while (nText--) { -sal_Int32 nText = rTextProvider.getTextCount(); -while (nText--) -{ -OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); -if( pParaObj ) -pParaObj->ClearPortionInfo(); -} -rObj.SetTextSizeDirty(); - -if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight()) -{ -// here only repaint wanted -rObj.ActionChanged(); -//rObj.BroadcastObjectChange(); -} +OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); +if( pParaObj ) +pParaObj->ClearPortionInfo(); +} +rObj.SetTextSizeDirty(); -// #i101556# content of StyleSheet has changed -> new version -maVersion++; +if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight()) +{ +// here only repaint wanted +rObj.ActionChanged(); +//rObj.BroadcastObjectChange(); } -if(SfxHintId::Dying == nId) +// #i101556# content of StyleSheet has changed -> new version +maVersion++; +} +else if(SfxHintId::Dying == nId && dynamic_cast() != nullptr) +{ +sal_Int32 nText = rTextProvider.getTextCount(); +while (nText--) { -sal_Int32 nText = rTextProvider.getTextCount(); -while (nText--) -{ -OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); -if( pParaObj ) -pParaObj->ClearPortionInfo(); -} +OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject(); +if( pParaObj ) +pParaObj->ClearPortionInfo(); } } -else if(dynamic_cast() != nullptr) +else if (nId == SfxHintId::StyleSheetModified && dynamic_cast() != nullptr) { const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast(); - -if(pExtendedHint -&& SfxHintId::StyleSheetModified == pExtendedHint->GetId()) +if (pExtendedHint) { const OUString& aOldName(pExtendedHint->GetOldName()); OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
core.git: svx/source
svx/source/sdr/properties/customshapeproperties.cxx | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) New commits: commit f1552be34859d92865067c296b328770c83580e7 Author: Noel Grandin AuthorDate: Wed Mar 6 15:09:44 2024 +0200 Commit: Noel Grandin CommitDate: Wed Mar 6 19:27:52 2024 +0100 tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::Notify shaves 2% off the load time Change-Id: Ia7e4747711948ccfeb274cf32028d03486cc14a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164476 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index cbad73ab78c2..c48e4d3833d4 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -205,18 +205,12 @@ namespace sdr::properties TextProperties::Notify( rBC, rHint ); bool bRemoveRenderGeometry = false; -const SfxStyleSheetHint* pStyleHint = dynamic_cast(); -if ( pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet() ) +if (rHint.GetId() == SfxHintId::StyleSheetModified || rHint.GetId() == SfxHintId::StyleSheetChanged) { -switch( pStyleHint->GetId() ) -{ -case SfxHintId::StyleSheetModified : -case SfxHintId::StyleSheetChanged : -bRemoveRenderGeometry = true; -break; -default: break; -} +const SfxStyleSheetHint* pStyleHint = static_cast(); +if ( pStyleHint->GetStyleSheet() == GetStyleSheet() ) +bRemoveRenderGeometry = true; } else if ( rHint.GetId() == SfxHintId::DataChanged ) {
core.git: svx/source
svx/source/form/labelitemwindow.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 82bfc24c9ceb00a730580ad9338ead2f64437d05 Author: Caolán McNamara AuthorDate: Mon Mar 4 10:57:18 2024 + Commit: Caolán McNamara CommitDate: Mon Mar 4 20:26:08 2024 +0100 GLib-GObject-CRITICAL **: gsignal.c:2778: instance X has no handler with id Y Change-Id: I4fbbd4af0ed1605874e2ef2694ecda0a9e107a07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164332 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/form/labelitemwindow.cxx b/svx/source/form/labelitemwindow.cxx index c9afd1534acc..91d9f99c0ce9 100644 --- a/svx/source/form/labelitemwindow.cxx +++ b/svx/source/form/labelitemwindow.cxx @@ -58,7 +58,9 @@ OUString LabelItemWindow::get_label() const { return m_xLabel->get_label(); } void LabelItemWindow::dispose() { +m_xImage.reset(); m_xLabel.reset(); +m_xBox.reset(); InterimItemWindow::dispose(); }
core.git: svx/source
svx/source/svdraw/svdotextdecomposition.cxx | 40 +++- 1 file changed, 33 insertions(+), 7 deletions(-) New commits: commit 5dab4eb854609d5d84bb0bfa918f0a5bf0459b53 Author: Caolán McNamara AuthorDate: Sun Mar 3 14:53:19 2024 + Commit: Caolán McNamara CommitDate: Sun Mar 3 17:42:29 2024 +0100 Resolves: tdf#159696 Small capitals with 'Individual words' underlining Change-Id: I79af3f74ef384f734273b00bddbcfed8952a3ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164303 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 3fe9de6fb7ba..5736f26f51b7 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -327,13 +328,38 @@ namespace const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D* pTCPP = static_cast(pNewPrimitive.get()); -pTCPP->CreateDecorationGeometryContent( -aContainer, -pTCPP->getTextTransform(), -caseMappedText, -rInfo.mnTextStart, -rInfo.mnTextLen, -aDXArray); +if (pTCPP->getWordLineMode()) // single word mode: 'Individual words' in UI +{ +// Split to single word primitives using TextBreakupHelper +drawinglayer::primitive2d::TextBreakupHelper aTextBreakupHelper(*pTCPP); +drawinglayer::primitive2d::Primitive2DContainer aBroken(aTextBreakupHelper.extractResult(drawinglayer::primitive2d::BreakupUnit::Word)); +for (auto& rPortion : aBroken) +{ +assert(rPortion->getPrimitive2DID() == PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D && + "TextBreakupHelper generates same output primitive type as input"); + +const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D* pPortion = +static_cast(rPortion.get()); + +pPortion->CreateDecorationGeometryContent( +aContainer, +pPortion->getTextTransform(), +caseMappedText, +pPortion->getTextPosition(), +pPortion->getTextLength(), +pPortion->getDXArray()); +} +} +else +{ +pTCPP->CreateDecorationGeometryContent( +aContainer, +pTCPP->getTextTransform(), +caseMappedText, +rInfo.mnTextStart, +rInfo.mnTextLen, +aDXArray); +} } pNewPrimitive = new drawinglayer::primitive2d::GroupPrimitive2D(std::move(aContainer));
core.git: svx/source
svx/source/svdraw/svdedxv.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6524ec07b0ff311b1beac7a5b58df763052f2b91 Author: Andrea Gelmini AuthorDate: Sat Mar 2 23:16:01 2024 +0100 Commit: Julien Nabet CommitDate: Sun Mar 3 09:33:25 2024 +0100 Fix typo Change-Id: Ic279c6f88b99caa252872170b3c8bbd2047497ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164297 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 3685cd55a8ef..fb130a16a212 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -136,7 +136,7 @@ IMPL_LINK_NOARG(SdrObjEditView, TextEditUpdate, Timer*, void) // no TextObject, no TextEdit return; -// lauch an ObjectChange: This is the straightforward method +// launch an ObjectChange: This is the straightforward method // to get this broadcasted. We do not risk to set the model // unwantedly to changed, we had a text edit going on already. // This is needed for SlideShow since it is not (yet) using the
core.git: svx/source
svx/source/svdraw/svdmrkv.cxx | 52 +- 1 file changed, 51 insertions(+), 1 deletion(-) New commits: commit 948cd8b9f62e28883b691084a9bb83177422defd Author: Pranam Lashkari AuthorDate: Wed Feb 28 04:55:46 2024 +0530 Commit: Caolán McNamara CommitDate: Fri Mar 1 21:39:07 2024 +0100 LOK: send inner text boundry information of shapes/textbox Sends inner rectangle boundry info as part of LOK_CALLBACK_GRAPHIC_SELECTION message Change-Id: Idc51e807bec01711c8a4326e3193127f0b2cd765 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164124 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index b0784449f159..b9a492aa35ad 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,8 @@ #include #include +#include + #include #include @@ -759,6 +762,30 @@ bool SdrMarkView::dumpGluePointsToJSON(boost::property_tree::ptree& rTree) return result; } +namespace +{ +class TextBoundsExtractor final : public drawinglayer::processor2d::TextExtractor2D +{ +private: +basegfx::B2DRange maTextRange; +void processTextPrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate) override +{ +maTextRange.expand(rCandidate.getB2DRange(getViewInformation2D())); +} +public: +explicit TextBoundsExtractor(const drawinglayer::geometry::ViewInformation2D& rViewInformation) +: drawinglayer::processor2d::TextExtractor2D(rViewInformation) +{ +} + +basegfx::B2DRange getTextBounds(const sdr::contact::ViewObjectContact , sdr::contact::DisplayInfo ) +{ +this->process(rVOC.getPrimitive2DSequence(raDisplayInfo)); +return maTextRange; +} +}; +} + void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const SfxViewShell* pOtherShell) { SfxViewShell* pViewShell = GetSfxViewShell(); @@ -837,6 +864,8 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S bConnectorSelection = dumpGluePointsToJSON(aGluePointsTree); } +SdrPageView* pPageView = GetSdrPageView(); + if (GetMarkedObjectCount()) { SdrMark* pM = GetSdrMarkByIndex(0); @@ -853,6 +882,27 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S + "\",\"type\":" + OString::number(static_cast(pO->GetObjIdentifier(; +if (mpMarkedObj && !pOtherShell) +{ +const sdr::contact::ViewObjectContact& rVOC = mpMarkedObj->GetViewContact().GetViewObjectContact( +pPageView->GetPageWindow(0)->GetObjectContact()); + +sdr::contact::DisplayInfo aDisplayInfo; +TextBoundsExtractor aTextBoundsExtractor(rVOC.GetObjectContact().getViewInformation2D()); +basegfx::B2DRange aRange = aTextBoundsExtractor.getTextBounds(rVOC, aDisplayInfo); +if (!aRange.isEmpty()) { +tools::Rectangle rect(aRange.getMinX(), aRange.getMinY(), aRange.getMaxX(), aRange.getMaxY()); +tools::Rectangle aRangeTWIP = o3tl::convert(rect, o3tl::Length::mm100, o3tl::Length::twip); +OString innerTextInfo = ",\"innerTextRect\":[" + +OString::number(aRangeTWIP.getX()) + "," + +OString::number(aRangeTWIP.getY()) + "," + +OString::number(aRangeTWIP.GetWidth()) + "," + +OString::number(aRangeTWIP.GetHeight()) + "]"; + +aExtraInfo.append(innerTextInfo); +} +} + // In core, the gridOffset is calculated based on the LogicRect's TopLeft coordinate // In online, we have the SnapRect and we calculate it based on its TopLeft coordinate // SnapRect's TopLeft and LogicRect's TopLeft match unless there is rotation @@ -862,7 +912,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S // whether the shape is rotated or not, we will always have the correct gridOffset // Note that the gridOffset is calculated from the first selected obj basegfx::B2DVector aGridOffset(0.0, 0.0); -if(getPossibleGridOffsetForSdrObject(aGridOffset, GetMarkedObjectByIndex(0), GetSdrPageView())) +if(getPossibleGridOffsetForSdrObject(aGridOffset, GetMarkedObjectByIndex(0), pPageView)) { Point p(aGridOffset.getX(), aGridOffset.getY()); if (convertMapMode)
core.git: svx/source
svx/source/tbxctrls/tbcontrl.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit c6d9cc16dbb5fe0d05ce8ca9c4c18b989596e928 Author: Henry Castro AuthorDate: Wed Feb 28 15:59:40 2024 -0400 Commit: Caolán McNamara CommitDate: Thu Feb 29 21:40:54 2024 +0100 svx: fix default locale language string 1) Open a spreadsheet 2) Format a cell with a currency. Example USD $ English (USA) 3) Open the sidebar if it's not opened already 4) Click in the currency dropdown 5) Observe: there is $ (Default) Expected result: USD $ English (USA) Default Signed-off-by: Henry Castro Change-Id: Idf7f4174557e59cb6f5ffd65c25572322a5794ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164123 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index a07a1b752d5d..4a366730b76d 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -4124,12 +4124,19 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols(std::vector& rList, { rCurrencyList.clear(); +constexpr OUString aTwoSpace = u" "_ustr; const NfCurrencyTable& rCurrencyTable = SvNumberFormatter::GetTheCurrencyTable(); sal_uInt16 nCount = rCurrencyTable.size(); sal_uInt16 nStart = 1; -OUString aString( ApplyLreOrRleEmbedding( rCurrencyTable[0].GetSymbol() ) + " " ); +LanguageTag eLangTag = Application::GetSettings().GetLanguageTag(); +OUString aString(ApplyLreOrRleEmbedding(rCurrencyTable[0].GetBankSymbol())); +aString += aTwoSpace; +aString += ApplyLreOrRleEmbedding(rCurrencyTable[0].GetSymbol()); +aString += aTwoSpace; +aString += ApplyLreOrRleEmbedding(SvtLanguageTable::GetLanguageString(eLangTag.getLanguageType())); +aString += aTwoSpace; aString += ApplyLreOrRleEmbedding(SvtLanguageTable::GetLanguageString(rCurrencyTable[0].GetLanguage())); rList.push_back( aString ); @@ -4143,9 +4150,7 @@ void SvxCurrencyToolBoxControl::GetCurrencySymbols(std::vector& rList, } CollatorWrapper aCollator( ::comphelper::getProcessComponentContext() ); -aCollator.loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0 ); - -static constexpr OUString aTwoSpace(u" "_ustr); +aCollator.loadDefaultCollator(eLangTag.getLocale(), 0); for( sal_uInt16 i = 1; i < nCount; ++i ) {
core.git: svx/source
svx/source/sdr/contact/objectcontactofpageview.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit ef6798919a514fc0043f4cd050ffb244696bbda3 Author: Stephan Bergmann AuthorDate: Tue Feb 27 10:27:25 2024 +0100 Commit: Stephan Bergmann CommitDate: Wed Feb 28 08:47:33 2024 +0100 Avoid calling back into an SdrMarkView that is being destroyed The recently added CppunitTest_sc_tiledrendering CPPUNIT_TEST_NAME=testEditShapeText::TestBody had started to cause > svx/source/svdraw/sdrpagewindow.cxx:471:56: runtime error: member call on address 0x51dc4480 which does not point to an object of type 'SdrMarkView' > 0x51dc4480: note: object is of type 'SdrPaintView' > 00 00 00 00 30 1f 13 bc ca 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 > ^~~ > vptr for 'SdrPaintView' > #0 in SdrPageWindow::InvalidatePageWindow(basegfx::B2DRange const&) at svx/source/svdraw/sdrpagewindow.cxx:471:56 > #1 in sdr::contact::ObjectContactOfPageView::InvalidatePartOfView(basegfx::B2DRange const&) const at svx/source/sdr/contact/objectcontactofpageview.cxx:357:29 > #2 in sdr::contact::ViewObjectContact::triggerLazyInvalidate() at svx/source/sdr/contact/viewobjectcontact.cxx:267:28 > #3 in sdr::contact::ObjectContactOfPageView::Invoke() at svx/source/sdr/contact/objectcontactofpageview.cxx:105:29 > #4 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:74:13 > #5 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:72:9 > #6 in SdrPageWindow::ResetObjectContact() at svx/source/svdraw/sdrpagewindow.cxx:520:9 > #7 in SdrPageWindow::~SdrPageWindow() at svx/source/svdraw/sdrpagewindow.cxx:130:5 > #8 in std::default_delete::operator()(SdrPageWindow*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2 > #9 in std::unique_ptr>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4 > #10 in void std::destroy_at>>(std::unique_ptr>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:88:15 > #11 in void std::_Destroy>>(std::unique_ptr>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:149:7 > #12 in void std::_Destroy_aux::__destroy>*>(std::unique_ptr>*, std::unique_ptr>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:163:6 > #13 in void std::_Destroy>*>(std::unique_ptr>*, std::unique_ptr>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:195:7 > #14 in void std::_Destroy>*, std::unique_ptr>>(std::unique_ptr>*, std::unique_ptr>*, std::allocator>>&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/alloc_traits.h:941:7 > #15 in std::__cxx1998::vector>, std::allocator>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_vector.h:732:2 > #16 in std::__debug::vector>, std::allocator>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/debug/vector:245:25 > #17 in SdrPageView::~SdrPageView() at svx/source/svdraw/svdpagv.cxx:122:1 > #18 in std::default_delete::operator()(SdrPageView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2 > #19 in std::__uniq_ptr_impl>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:205:4 > #20 in std::unique_ptr>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:503:7 > #21 in SdrPaintView::ClearPageView() at svx/source/svdraw/svdpntv.cxx:356:20 > #22 in SdrPaintView::~SdrPaintView() at svx/source/svdraw/svdpntv.cxx:189:5 > #23 in SdrSnapView::~SdrSnapView() at svx/source/svdraw/svdsnpv.cxx:199:1 > #24 in SdrMarkView::~SdrMarkView() at svx/source/svdraw/svdmrkv.cxx:197:1 > #25 in SdrEditView::~SdrEditView() at svx/source/svdraw/svdedtv.cxx:126:1 > #26 in SdrPolyEditView::~SdrPolyEditView() at svx/source/svdraw/svdpoev.cxx:58:1 > #27 in SdrGlueEditView::~SdrGlueEditView() at svx/source/svdraw/svdglev.cxx:40:1 > #28 in SdrObjEditView::~SdrObjEditView() at svx/source/svdraw/svdedxv.cxx:101:1 > #29 in SdrExchangeView::~SdrExchangeView() at include/svx/svdxcgv.hxx:27:25 > #30 in SdrDragView::~SdrDragView() at svx/source/svdraw/svddrgv.cxx:69:1 > #31 in SdrCreateView::~SdrCreateView() at
core.git: svx/source
svx/source/dialog/langbox.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit a1a1d8edb9d4a62b747aa7069b3026e2ba75704d Author: Mike Kaganski AuthorDate: Tue Feb 27 01:13:32 2024 +0600 Commit: Mike Kaganski CommitDate: Tue Feb 27 01:57:35 2024 +0100 Another attempt to ensure strict weak ordering when sorting The failure that Stephan noticed turns out to show a problem in the data - the use of the special LANGUAGE_USER_SYSTEM_CONFIG language type value. It should not appear in the sorted part of the list; if needed, it should be added explicitly, like the "default" entry is handled in SvxLanguageBox::SetLanguageList. So simplify the shortcut in GenericFirst::operator() again, and drop the special entries before sorting. Change-Id: If08e0ddbc5b597795e129fa4a2315c54205dab90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163964 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index e8b82e3ac63c..8699a6798d59 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -219,8 +219,8 @@ static void SortLanguages(std::vector& rEntries) bool operator()(const EntryData& e1, const EntryData& e2) const { assert(e1.tag.getLanguage() == e2.tag.getLanguage()); -if (e1.entry.sId == e2.entry.sId || e1.tag.equals(e2.tag)) -return false; // shortcut; make sure to also compare tags, to resolve system locale +if (e1.entry.sId == e2.entry.sId) +return false; // shortcut // Make sure that e.g. generic 'Spanish {es}' goes before 'Spanish (Argentina)'. // We can't depend on MsLangId::getPrimaryLanguage/getSubLanguage, because e.g. @@ -267,7 +267,11 @@ static void SortLanguages(std::vector& rEntries) for (const auto& entry : rEntries) { -LanguageTag tag(LanguageType(entry.sId.toInt32())); +LanguageType languageType(entry.sId.toInt32()); +// Remove LANGUAGE_USER_SYSTEM_CONFIG special entry and friends from the list +if (languageType >= LanguageType(0xFFE0)) +continue; +LanguageTag tag(languageType); langToEntriesMap[tag.getLanguage()].insert({ tag, entry }); // also makes unique }
core.git: svx/source
svx/source/dialog/svxbmpnumvalueset.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit db54b44c15ed234b54ed81998ec824f0770b1b3c Author: Samuel Mehrbrodt AuthorDate: Thu Feb 22 12:42:52 2024 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Feb 26 07:41:41 2024 +0100 Fix indentation Change-Id: If70ef4b92e6998be5d18b8b557fab27c17bb11bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163747 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 802e881ec1da..29dc2ddcc3df 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -440,9 +440,9 @@ void SvxNumValueSet::SetNumberingSettings( SetStyle( GetStyle()|WB_VSCROLL); for ( sal_Int32 i = 0; i < aNum.getLength(); i++ ) { -InsertItem( i + 1, i ); -if( i < 8 ) -SetItemText(i + 1, SvxResId(RID_SVXSTR_SINGLENUM_DESCRIPTIONS[i])); +InsertItem(i + 1, i); +if (i < 8) +SetItemText(i + 1, SvxResId(RID_SVXSTR_SINGLENUM_DESCRIPTIONS[i])); } }
core.git: svx/source
svx/source/sidebar/tools/ValueSetWithTextControl.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 72986a5e505f8b62b30aa890c136e07cef3f9a2b Author: Justin Luth AuthorDate: Sat Feb 24 10:04:13 2024 -0500 Commit: Justin Luth CommitDate: Sat Feb 24 18:14:54 2024 +0100 tdf#159865 tdf#136905 NBB: font looked too small in page size choices This fixes my 24.2 regression from commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2 I considered reverting it, but decided to tweak the font size instead. If I reverted, the size of the choices was displayed in 16pt font. I wanted to keep the sizing as "scientific" as possible, but fixing the rounding issues didn't really make the font stand out as much as desired. In this case, my system font of 11 became 10 for the page size dialog, due to rounding, which is still a significant 10%. Although that still looks too small, it seems fairly close to the other button on the notebook bar, at least to my eyes. But it is definitely smaller/less clear than the "more option" button. Perhaps it has to do with the visible size of a font compared to the full size (with leading)? Fonts are often sized as 11/13 or 12/14 for example. Adding 20% to the font size makes it look about right. In my case, it ends up chosing a font height of 13. Change-Id: Ic0a7296aa74be542e2a38ce52cf5fd23e5d8c7f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163886 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 8919140b5d07..d55740315c99 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -45,8 +45,10 @@ void ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) void ValueSetWithTextControl::SetOptimalDrawingAreaHeight() { const vcl::Font aFont(Application::GetSettings().GetStyleSettings().GetLabelFont()); -const sal_Int32 nRowHeight = aFont.GetFontSize().Height() * 9 / 4; // see UserDraw() -const Size aSize(GetOutputSizePixel().Width(), nRowHeight * maItems.size()); +double fRowHeight = aFont.GetFontSize().Height() * 9 / 4.0; // see UserDraw() +// It still looks too small. Probably the height specified should be the leading point size? +fRowHeight *= 1.2; // add 20% leading +const Size aSize(GetOutputSizePixel().Width(), fRowHeight * maItems.size()); GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height()); SetOutputSizePixel(aSize); }
core.git: svx/source
svx/source/svdraw/svdedxv.cxx | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) New commits: commit 178d8a38e133aebd4cff1af2d2c49aec60468c92 Author: Oliver Specht AuthorDate: Mon Feb 19 09:52:46 2024 +0100 Commit: Thorsten Behrens CommitDate: Tue Feb 20 16:49:37 2024 +0100 Make Clone Formatting in Impress similar to PP In Powerpoint paragraph attributes are only applied from and to fully/multiple selected paragraphs. Change-Id: I7c1f3afb6c0d6fd9b3f8acf34cb5f5b3dcaf22d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163583 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index dbcc73a63cf1..f3f5d4818f20 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2780,7 +2780,7 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor, } } -static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly) +static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly, bool withParagraphAttr = true) { static const WhichRangesContainer gFull( svl::Items); static const WhichRangesContainer gTextOnly( +svl::Items); + +static const WhichRangesContainer gParaTextOnly( svl::Items); -return bTextOnly ? gTextOnly : gFull; +return bTextOnly ? withParagraphAttr ? gParaTextOnly : gTextOnly : gFull; } sal_Int32 SdrObjEditView::TakeFormatPaintBrush(std::shared_ptr& rFormatSet) @@ -2806,12 +2809,14 @@ sal_Int32 SdrObjEditView::TakeFormatPaintBrush(std::shared_ptr& rFor OutlinerView* pOLV = GetTextEditOutlinerView(); +bool isParaSelection = pOLV ? pOLV->GetEditView().IsSelectionFullPara() : false; rFormatSet = std::make_shared(GetModel().GetItemPool(), - GetFormatRangeImpl(pOLV != nullptr)); + GetFormatRangeImpl(pOLV != nullptr, isParaSelection)); if (pOLV) { rFormatSet->Put(pOLV->GetAttribs()); -nDepth = pOLV->GetDepth(); +if (isParaSelection) +nDepth = pOLV->GetDepth(); } else { @@ -2979,10 +2984,11 @@ void SdrObjEditView::ApplyFormatPaintBrush(SfxItemSet& rFormatSet, sal_Int16 nDe const EditEngine& rEditEngine = pOutliner->GetEditEngine(); ESelection aSel(pOLV->GetSelection()); +bool fullParaSelection += aSel.nEndPara != aSel.nStartPara || pOLV->GetEditView().IsSelectionFullPara(); if (!aSel.HasRange()) pOLV->SetSelection(rEditEngine.GetWord(aSel, css::i18n::WordType::DICTIONARY_WORD)); - -const bool bRemoveParaAttribs = !bNoParagraphFormats; +const bool bRemoveParaAttribs = !bNoParagraphFormats && !fullParaSelection; pOLV->RemoveAttribsKeepLanguages(bRemoveParaAttribs); SfxItemSet aSet(pOLV->GetAttribs()); SfxItemSet aPaintSet(CreatePaintSet(GetFormatRangeImpl(true), *aSet.GetPool(),
core.git: svx/source
svx/source/svdraw/svdhdl.cxx | 101 +-- 1 file changed, 51 insertions(+), 50 deletions(-) New commits: commit bac09f76fd903c109b591a7bc15883e5653715ee Author: Noel Grandin AuthorDate: Mon Feb 12 12:54:06 2024 +0200 Commit: Noel Grandin CommitDate: Mon Feb 12 14:58:49 2024 +0100 tdf#159666 Crash when table and line object are selected at the same time before commit e3077168072452fb8f1c0a8afb2992877cb96d1c Author: Noel Grandin Date: Thu Jun 17 09:49:37 2021 +0200 loplugin:finalclasses the cast in const SdrEdgeObj* pEdge = static_cast(m_pObj); would incorrectly cast a SdrTableObj, but it happened to do nothing problematic. After the above commit, the vtable layout changed and it started crashing. Work around it by use dynamic_cast and ignoring objects that are not SdrEdgeObj. Change-Id: Ibe03d4935b8eeb182e037b1648d841e26fa23ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163242 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index ad50c7680a5e..d32d01edb4bc 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1604,66 +1604,67 @@ ImpEdgeHdl::~ImpEdgeHdl() void ImpEdgeHdl::CreateB2dIAObject() { -if(m_nObjHdlNum <= 1 && m_pObj) +if(m_nObjHdlNum > 1 || !m_pObj) { -// first throw away old one -GetRidOfIAObject(); +// call parent +SdrHdl::CreateB2dIAObject(); +return; +} -BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; -BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; +// first throw away old one +GetRidOfIAObject(); -if(m_pHdlList) -{ -SdrMarkView* pView = m_pHdlList->GetView(); +BitmapColorIndex eColIndex = BitmapColorIndex::LightCyan; +BitmapMarkerKind eKindOfMarker = BitmapMarkerKind::Rect_7x7; -if(pView && !pView->areMarkHandlesHidden()) -{ -const SdrEdgeObj* pEdge = static_cast(m_pObj); +if(!m_pHdlList) +return; -if(pEdge->GetConnectedNode(m_nObjHdlNum == 0) != nullptr) -eColIndex = BitmapColorIndex::LightRed; +SdrMarkView* pView = m_pHdlList->GetView(); -if(m_nPPntNum < 2) -{ -// Handle with plus sign inside -eKindOfMarker = BitmapMarkerKind::Circ_7x7; -} +if(!pView || pView->areMarkHandlesHidden()) +return; -SdrPageView* pPageView = pView->GetSdrPageView(); +// tdf#159666 Crash when table and line object are selected at the same time +auto pEdge = dynamic_cast(m_pObj); +if (!pEdge) +return; -if(pPageView) -{ -for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) -{ -const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); - -if(rPageWindow.GetPaintWindow().OutputToWindow()) -{ -const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager(); -if (xManager.is()) -{ -basegfx::B2DPoint aPosition(m_aPos.X(), m_aPos.Y()); -std::unique_ptr pNewOverlayObject(CreateOverlayObject( -aPosition, -eColIndex, -eKindOfMarker)); - -// OVERLAYMANAGER -insertNewlyCreatedOverlayObjectForSdrHdl( -std::move(pNewOverlayObject), -rPageWindow.GetObjectContact(), -*xManager); -} -} -} -} -} -} +if(pEdge->GetConnectedNode(m_nObjHdlNum == 0) != nullptr) +eColIndex = BitmapColorIndex::LightRed; + +if(m_nPPntNum < 2) +{ +// Handle with plus sign inside +eKindOfMarker = BitmapMarkerKind::Circ_7x7; } -else + +SdrPageView* pPageView = pView->GetSdrPageView(); +if(!pPageView) +return; + +for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) { -// call parent -SdrHdl::CreateB2dIAObject(); +const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b); + +if(rPageWindow.GetPaintWindow().OutputToWindow()) +{ +const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager(); +if (xManager.is()) +
core.git: svx/source
svx/source/sdr/contact/viewcontactofsdrpage.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 56517d8a38459f5a9e67327c1ac0dc8bcd07bcb8 Author: Regina Henschel AuthorDate: Fri Feb 9 15:02:41 2024 +0100 Commit: Regina Henschel CommitDate: Sat Feb 10 15:32:30 2024 +0100 tdf#156993 use correct count for ViewContactOfSdrPage The count is used as upper limit in a for-loop in ViewObjectContact::getPrimitive2DSequenceSubHierarchy(). That calls ViewContactOfSdrPage::GetViewContact(). With the wrong count the case 10 was not reached and thus the helplines were not drawn. Change-Id: If606bbb718b1f78a874862217d1e03b02287e848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163192 Tested-by: Jenkins Reviewed-by: Regina Henschel diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 05b045ec473a..c07bcffe762d 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -515,10 +515,10 @@ sal_uInt32 ViewContactOfSdrPage::GetObjectCount() const { // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, // then - depending on if the page has a MasterPage - either MasterPage Hierarchy -// or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines -// (for front and back) which internally are visible or not depending on the current +// or MPBGO. Also OuterPageBorder, InnerPageBorder, PageHierarchy and two pairs of Grid and +// Helplines (for front and back) which internally are visible or not depending on the current // front/back setting for those. -return 10; +return 11; } ViewContact& ViewContactOfSdrPage::GetViewContact(sal_uInt32 nIndex) const
core.git: svx/source
svx/source/dialog/cuicharmap.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit cbcf22eb8748d59857b29a8792377a10fc6c42b2 Author: Oliver Specht AuthorDate: Mon Feb 5 14:26:48 2024 +0100 Commit: Gabor Kelemen CommitDate: Thu Feb 8 18:48:13 2024 +0100 tdf#159572 select font according to recent settings selection of a recently inserted special character applies the stored font to make sure the character is not inserted wit a font that doesn't contain the symbol Change-Id: Id61bfac3a2ff22dbdae8a5b83f000d3f0c3e992b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163004 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/svx/source/dialog/cuicharmap.cxx b/svx/source/dialog/cuicharmap.cxx index 0d73c0d1b6dd..430bf250fdcd 100644 --- a/svx/source/dialog/cuicharmap.cxx +++ b/svx/source/dialog/cuicharmap.cxx @@ -523,6 +523,7 @@ IMPL_LINK(SvxCharacterMap, CharClickHdl, SvxCharView*, rView, void) { rView->GrabFocus(); +SetCharFont(rView->GetFont()); m_aShowChar.SetText( rView->GetText() ); m_aShowChar.SetFont(rView->GetFont()); m_aShowChar.Invalidate();
core.git: svx/source
svx/source/dialog/langbox.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 181f4c5ac9834c15fe0acc4b6e92f064e95ab32c Author: Mike Kaganski AuthorDate: Thu Feb 8 12:34:59 2024 +0600 Commit: Mike Kaganski CommitDate: Thu Feb 8 09:31:46 2024 +0100 Try harder to use strict weak ordering when sorting Special LanguageType referring to a system locale can resolve to some language tag equal to another one, but they still compared inequal in the check at the top of GenericFirst comparator, because only values of LanguageType were compared. This could lead to a failed assertion later, because both could then be ISO locales, and have no country. Change-Id: I62dda8ed6f8b1b4c7ab4957b3eecfdef602b91a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163107 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index f83cc956961e..e8b82e3ac63c 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -219,8 +219,8 @@ static void SortLanguages(std::vector& rEntries) bool operator()(const EntryData& e1, const EntryData& e2) const { assert(e1.tag.getLanguage() == e2.tag.getLanguage()); -if (e1.entry.sId == e2.entry.sId) -return false; // shortcut +if (e1.entry.sId == e2.entry.sId || e1.tag.equals(e2.tag)) +return false; // shortcut; make sure to also compare tags, to resolve system locale // Make sure that e.g. generic 'Spanish {es}' goes before 'Spanish (Argentina)'. // We can't depend on MsLangId::getPrimaryLanguage/getSubLanguage, because e.g.
core.git: svx/source
svx/source/svdraw/svdobj.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b0f9cb252d9dbb932a368a81871d0ba7c396dab8 Author: Mike Kaganski AuthorDate: Sun Feb 4 16:20:42 2024 +0600 Commit: Mike Kaganski CommitDate: Sun Feb 4 12:30:59 2024 +0100 Use constexpr instead of const See commit bf2ae3c25a5da3a323c06fd5f949660ee64f0fa6 for rationale. Change-Id: I456bc7c7124a277b34b6334d16090607e14075e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162969 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 63844301ef1a..10dba8f0ebc7 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -758,7 +758,7 @@ void SdrObject::SetName(const OUString& rStr, const bool bSetChanged) const OUString & SdrObject::GetName() const { -static const OUString EMPTY = u""_ustr; +static constexpr OUString EMPTY = u""_ustr; if(m_pPlusData) {
core.git: svx/source
svx/source/dialog/langbox.cxx | 106 -- 1 file changed, 81 insertions(+), 25 deletions(-) New commits: commit 6e540ab56e397d645b300d6cfbadc5c11a1e8151 Author: Mike Kaganski AuthorDate: Sat Feb 3 16:08:54 2024 +0600 Commit: Mike Kaganski CommitDate: Sun Feb 4 03:39:03 2024 +0100 Make sure to use strict weak ordering when sorting See https://gerrit.libreoffice.org/c/core/+/152676/2#message-ea10fe33b46fee581d47c04d04291a59049d4ac3 The complexity of intended sort requires to split the languages by language groups first, and use the "generic first" comparison only inside groups. As the result, e.g. Aranese and Occitan are grouped together. Change-Id: Ibf11e72c4dfb7876eecea7f3f302c313d153bcbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162947 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 713bf0d34b3f..f83cc956961e 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -17,6 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include +#include + #include #include #include @@ -28,12 +33,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include @@ -190,44 +197,93 @@ void SvxLanguageBox::AddLanguages(const std::vector< LanguageType >& rLanguageTy static void SortLanguages(std::vector& rEntries) { -auto langLess = [](const weld::ComboBoxEntry& e1, const weld::ComboBoxEntry& e2) +struct NaturalStringSorterCompare +{ +bool operator()(const OUString& rLHS, const OUString& rRHS) const +{ +static const auto aSorter = comphelper::string::NaturalStringSorter( +comphelper::getProcessComponentContext(), +Application::GetSettings().GetUILanguageTag().getLocale()); +return aSorter.compare(rLHS, rRHS) < 0; +} +}; + +struct EntryData +{ +LanguageTag tag; +weld::ComboBoxEntry entry; +}; + +struct GenericFirst { -if (e1.sId == e2.sId) -return false; // shortcut -// Make sure that e.g. generic 'Spanish {es}' goes before 'Spanish (Argentina)'. -// We can't depend on MsLangId::getPrimaryLanguage/getSubLanguage, because e.g. -// for generic Bosnian {bs}, the MS-LCID is 0x781A, and getSubLanguage is not 0. -// So we have to do the expensive LanguageTag construction. -LanguageTag lt1(LanguageType(e1.sId.toInt32())), lt2(LanguageType(e2.sId.toInt32())); -if (lt1.getLanguage() == lt2.getLanguage()) +bool operator()(const EntryData& e1, const EntryData& e2) const { -const bool isLangOnly1 = lt1.isIsoLocale() && lt1.getCountry().isEmpty(); -const bool isLangOnly2 = lt2.isIsoLocale() && lt2.getCountry().isEmpty(); +assert(e1.tag.getLanguage() == e2.tag.getLanguage()); +if (e1.entry.sId == e2.entry.sId) +return false; // shortcut + +// Make sure that e.g. generic 'Spanish {es}' goes before 'Spanish (Argentina)'. +// We can't depend on MsLangId::getPrimaryLanguage/getSubLanguage, because e.g. +// for generic Bosnian {bs}, the MS-LCID is 0x781A, and getSubLanguage is not 0. +// So we have to do the expensive LanguageTag construction in EntryData. + +const bool isLangOnly1 = e1.tag.isIsoLocale() && e1.tag.getCountry().isEmpty(); +const bool isLangOnly2 = e2.tag.isIsoLocale() && e2.tag.getCountry().isEmpty(); +assert(!(isLangOnly1 && isLangOnly2)); if (isLangOnly1) { -// lt1 is a generic language-only tag -if (!isLangOnly2) -return true; // lt2 is not +// e1.tag is a generic language-only tag, e2.tag is not +return true; } else if (isLangOnly2) { -// lt2 is a generic language-only tag, lt1 is not +// e2.tag is a generic language-only tag, e1.tag is not return false; } + +// Do a normal string comparison for other cases +return NaturalStringSorterCompare()(e1.entry.sString, e2.entry.sString); } -// Do a normal string comparison for other cases -static const auto aSorter = comphelper::string::NaturalStringSorter( -comphelper::getProcessComponentContext(), -Application::GetSettings().GetUILanguageTag().getLocale()); -return aSorter.compare(e1.sString, e2.sString) < 0; }; +using SortedLangEntries = o3tl::sorted_vector; + +// It is impossible to sort using only GenericFirst comparison: it would
core.git: svx/source
svx/source/form/formcontroller.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit db227dc7d032d642983c313ab74c34a301464c2a Author: Mike Kaganski AuthorDate: Sat Jan 27 08:18:14 2024 +0100 Commit: Mike Kaganski CommitDate: Sat Jan 27 11:07:32 2024 +0100 Avoid incorrect overwrite the value It would ignore the "enabled" state, if it its read-only is false Change-Id: I155a0621d967b1026c7f83316db8b595e9d507c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162613 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 0fb1bd64c942..e39367b98353 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -2125,7 +2125,7 @@ void FormController::setControlLock(const Reference< XControl > & xControl) bool bTouch = true; if (::comphelper::hasProperty(FM_PROP_ENABLED, xSet)) bTouch = ::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ENABLED)); -if (::comphelper::hasProperty(FM_PROP_READONLY, xSet)) +if (bTouch && ::comphelper::hasProperty(FM_PROP_READONLY, xSet)) bTouch = !::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_READONLY)); if (!bTouch)
core.git: svx/source
svx/source/sdr/contact/objectcontactofpageview.cxx |4 ++-- svx/source/tbxctrls/grafctrl.cxx |4 ++-- svx/source/tbxctrls/itemwin.cxx|4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 2822b41dfcd26c6eb9f9ffa89672053663bb26f2 Author: Caolán McNamara AuthorDate: Fri Jan 26 14:05:12 2024 + Commit: Caolán McNamara CommitDate: Fri Jan 26 16:19:53 2024 +0100 just fetch SfxViewShell::Current() once, and as const Change-Id: I3c95622b6de8ff35e53d9879f3de8cf9041887c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162604 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 89b6325cf492..79842eb761b0 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -219,8 +219,8 @@ namespace sdr::contact aNewViewInformation2D.setViewport(aViewRange); aNewViewInformation2D.setVisualizedPage(GetXDrawPageForSdrPage(GetSdrPage())); aNewViewInformation2D.setViewTime(fCurrentTime); -if (SfxViewShell::Current()) - aNewViewInformation2D.setAutoColor(SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR)); +if (const SfxViewShell* pViewShell = SfxViewShell::Current()) + aNewViewInformation2D.setAutoColor(pViewShell->GetColorConfigColor(svtools::DOCCOLOR)); updateViewInformation2D(aNewViewInformation2D); drawinglayer::primitive2d::Primitive2DContainer xPrimitiveSequence; diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index b2daea684b87..6076c7548197 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -355,9 +355,9 @@ IMPL_LINK_NOARG(ImplGrafModeControl, FocusInHdl, weld::Widget&, void) void ImplGrafModeControl::ImplReleaseFocus() { -if( SfxViewShell::Current() ) +if (const SfxViewShell* pViewShell = SfxViewShell::Current()) { -vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow(); +vcl::Window* pShellWnd = pViewShell->GetWindow(); if( pShellWnd ) pShellWnd->GrabFocus(); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 1a9b6d3bcf53..54004f3da511 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -114,9 +114,9 @@ IMPL_LINK_NOARG(SvxMetricField, ModifyHdl, weld::MetricSpinButton&, void) void SvxMetricField::ReleaseFocus_Impl() { -if( SfxViewShell::Current() ) +if (const SfxViewShell* pViewShell = SfxViewShell::Current()) { -vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow(); +vcl::Window* pShellWnd = pViewShell->GetWindow(); if ( pShellWnd ) pShellWnd->GrabFocus(); }
core.git: svx/source
svx/source/accessibility/AccessibleShape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 38f98c60e797753fa54bf3649520995df9861b45 Author: Michael Weghorn AuthorDate: Wed Jan 24 10:19:58 2024 +0100 Commit: Michael Weghorn CommitDate: Wed Jan 24 17:34:58 2024 +0100 svx a11y: Notify listeners when disposing shape In `AccessibleShape::disposing`, call the same method of the base class, i.e. `AccessibleContextBase::disposing`, not `AccessibleContextBase::dispose`. The code was moved from `AccessibleShape::dispose` to `AccessibleShape::disposing` in commit f11b151dc08ccfcb7e78bfd9a24c77670942ea63 Date: Tue Apr 30 13:30:10 2002 + #95585# Moved code from dispose to disposing(). and it seems likely that adjusting the base class method to call was just forgotten/missed. This resulted in the accessible getting disposed without listeners getting notified (since `AccessibleContextBase::disposing` takes care of that). This resulted in a crash for the following scenario with the qt6 VCL plugin when the Orca screen reader is running: 1) start LO Writer 2) click on the "Basic shapes" toolbar button 3) click + drag to insert a shape into the document 4) click somewhere else Backtrace is below. `AtSpiAdaptor::handleMessage` (frame #12 in the bt) checks whether the accessible is valid and returns early otherwise. But since listeners were not notified when the object got disposed, `QtAccessibleEventListener::disposing` wasn't called, which would have taken care of invalidating the `QtAccessibleWidget`, in which case this early return would have happened instead of the crash. This behaves as expected now with this commit in place. stderr output of the crash: terminate called after throwing an instance of 'com::sun::star::lang::DisposedException' Backtrace: Thread 1 received signal SIGABRT, Aborted. __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 44 ./nptl/pthread_kill.c: No such file or directory. (gdb) bt #0 __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 #1 0x7f5bc1ca815f in __pthread_kill_internal (signo=6, threadid=) at ./nptl/pthread_kill.c:78 #2 0x7f5bc1c5a472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x7f5bc1c444b2 in __GI_abort () at ./stdlib/abort.c:79 #4 0x7f5bc18a09eb in () at /lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x7f5bc18affca in () at /lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x7f5bc18b0035 in () at /lib/x86_64-linux-gnu/libstdc++.so.6 #7 0x7f5bc18b0288 in () at /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x7f5bc02b4550 in accessibility::AccessibleContextBase::ThrowIfDisposed() (this=0x55a6fc7e7da0) at .../libreoffice/editeng/source/accessibility/AccessibleContextBase.cxx:494 #9 0x7f5bbcf7d54e in accessibility::AccessibleShape::getAccessibleName() (this=0x55a6fc7e7da0) at .../libreoffice/svx/source/accessibility/AccessibleShape.cxx:280 #10 0x7f5bada62107 in QtAccessibleWidget::text(QAccessible::Text) const (this=0x55a6fad4fe20, text=QAccessible::Name) at .../libreoffice/vcl/qt6/../qt5/QtAccessibleWidget.cxx:362 #11 0x7f5bac5552d2 in AtSpiAdaptor::accessibleInterface(QAccessibleInterface*, QString const&, QDBusMessage const&, QDBusConnection const&) (this=0x55a6f769bce0, interface=0x55a6fad4fe20, function=..., message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1545 #12 0x7f5bac553cce in AtSpiAdaptor::handleMessage(QDBusMessage const&, QDBusConnection const&) (this=0x55a6f769bce0, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1432 #13 0x7f5baaa88943 in QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (this=0x7f5ba4010f30, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448 #14 0x7f5baaa89628 in QDBusActivateObjectEvent::placeMetaCall(QObject*) (this=0x7f5ba4026980) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604 #15 0x7f5bad044013 in QObject::event(QEvent*) (this=0x55a6f769bce0, e=0x7f5ba4026980) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1447 #16 0x7f5bab1a6986 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=0x55a6f631c3e0, receiver=0x55a6f769bce0, e=0x7f5ba4026980) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3298 #17 0x7f5bab1a6797 in QApplication::notify(QObject*, QEvent*)
core.git: svx/source
svx/source/svdraw/svdfmtf.cxx |6 +++--- svx/source/svdraw/svdfmtf.hxx |2 +- svx/source/svdraw/svdmark.cxx |4 ++-- svx/source/svdraw/svdview.cxx |2 +- 4 files changed, 7 insertions(+), 7 deletions(-) New commits: commit e3d03fa00d49c164ec235d77c827109eac522623 Author: AmosAidoo AuthorDate: Mon Jan 22 20:18:14 2024 +0100 Commit: Ilmari Lauhakangas CommitDate: Tue Jan 23 08:04:55 2024 +0100 tdf#114441 convert sal_uLong to appropriate types svdfmtf.cxx and .hxx GetActionSize returns a size_t value The parameter 'a' is compared to a size_t value svdmark.cxx GetOrdNum returns a sal_uInt32 value svdview.cxx GetLineCount returns a sal_uInt32 value Change-Id: I85a0303742607208fdbfb7783e7254847720a2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162416 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 923c40a550fa..0ea228dc4c28 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -114,9 +114,9 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( void ImpSdrGDIMetaFileImport::DoLoopActions(GDIMetaFile const & rMtf, SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport) { -const sal_uLong nCount(rMtf.GetActionSize()); +const size_t nCount = rMtf.GetActionSize(); -for(sal_uLong a(0); a < nCount; a++) +for(size_t a = 0; a < nCount; a++) { MetaAction* pAct = rMtf.GetAction(a); @@ -1219,7 +1219,7 @@ void ImpSdrGDIMetaFileImport::MapScaling() } -void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction const & rAct, GDIMetaFile const & rMtf, sal_uLong& a) // GDIMetaFile* pMtf ) +void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction const & rAct, GDIMetaFile const & rMtf, size_t& a) // GDIMetaFile* pMtf ) { bool aSkipComment = false; diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index 31c325582799..6011293cfe92 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -121,7 +121,7 @@ class ImpSdrGDIMetaFileImport final // #i125211# The MetaCommentAction needs to advance (if used), thus // give current metafile and index which may be changed -void DoAction(MetaCommentAction const & rAct, GDIMetaFile const & rMtf, sal_uLong& a); +void DoAction(MetaCommentAction const & rAct, GDIMetaFile const & rMtf, size_t& a); // missing actions added void DoAction(MetaTextRectAction const & rAct); diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index c6151ccfd89d..fc5d815ab9a2 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -292,8 +292,8 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, bool bChkSort) if(pLastOL == pNewOL) { -const sal_uLong nLastNum(pLastObj!=nullptr ? pLastObj->GetOrdNum() : 0); -const sal_uLong nNewNum(pNewObj !=nullptr ? pNewObj ->GetOrdNum() : 0); +const sal_uInt32 nLastNum(pLastObj!=nullptr ? pLastObj->GetOrdNum() : 0); +const sal_uInt32 nNewNum(pNewObj !=nullptr ? pNewObj ->GetOrdNum() : 0); if(nNewNum < nLastNum) { diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index f88363268c69..c2a919924464 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1244,7 +1244,7 @@ OUString SdrView::GetStatusText() // At the end of a line of any multi-line paragraph, we display the // position of the next line of the same paragraph, if there is one. sal_uInt16 nParaLine = 0; -sal_uLong nParaLineCount = mpTextEditOutliner->GetLineCount(aSel.nEndPara); +sal_uInt32 nParaLineCount = mpTextEditOutliner->GetLineCount(aSel.nEndPara); bool bBrk = false; while (!bBrk) {
core.git: svx/source
svx/source/dialog/ClassificationEditView.hxx |5 + svx/source/dialog/SafeModeDialog.hxx |5 + svx/source/dialog/contimp.hxx|6 +- svx/source/dialog/contwnd.hxx|6 +- svx/source/dialog/crashreportdlg.hxx |5 + 5 files changed, 5 insertions(+), 22 deletions(-) New commits: commit 3f0dd3d635507e4505cab4dac6e493f9dc985c23 Author: AkshayWarrier AuthorDate: Fri Jan 19 16:25:15 2024 +0530 Commit: Ilmari Lauhakangas CommitDate: Fri Jan 19 15:50:28 2024 +0100 tdf#143148 Use pragma once in svx Change-Id: I0317c57ec99a36d9f5153dadb556390a5d8858ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162302 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/svx/source/dialog/ClassificationEditView.hxx b/svx/source/dialog/ClassificationEditView.hxx index 225efe1243db..4e9a036a0989 100644 --- a/svx/source/dialog/ClassificationEditView.hxx +++ b/svx/source/dialog/ClassificationEditView.hxx @@ -8,8 +8,7 @@ * */ -#ifndef INCLUDED_SVX_CLASSIFICATIONEDITVIEW_HXX -#define INCLUDED_SVX_CLASSIFICATIONEDITVIEW_HXX +#pragma once #include #include @@ -49,6 +48,4 @@ public: } // end svx namespace -#endif // INCLUDED_SVX_CLASSIFICATIONEDITVIEW_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index dd7db077e084..1d4df62ff566 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_SVX_SOURCE_DIALOG_SAFEMODEDIALOG_HXX -#define INCLUDED_SVX_SOURCE_DIALOG_SAFEMODEDIALOG_HXX +#pragma once #include #include @@ -61,6 +60,4 @@ private: DECL_LINK(DialogBtnHdl, weld::Button&, void); }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 2bf5aca4d1e8..268e64695249 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX -#define INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX +#pragma once #include #include "contwnd.hxx" @@ -126,7 +125,4 @@ public: void* pEditingObj ); }; - -#endif // INCLUDED_SVX_SOURCE_DIALOG_CONTIMP_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx index 1bad623c05d6..a6b6efff1a7d 100644 --- a/svx/source/dialog/contwnd.hxx +++ b/svx/source/dialog/contwnd.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SVX_SOURCE_DIALOG_CONTWND_HXX -#define INCLUDED_SVX_SOURCE_DIALOG_CONTWND_HXX +#pragma once #include #include @@ -64,7 +63,4 @@ public: voidSetWorkplaceClickHdl( const Link& rLink ) { aWorkplaceClickLink = rLink; } }; - -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx index 3f2d9cb121c5..f7000e88557d 100644 --- a/svx/source/dialog/crashreportdlg.hxx +++ b/svx/source/dialog/crashreportdlg.hxx @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_SVX_SOURCE_DIALOG_CRASHREPORTDLG_HXX -#define INCLUDED_SVX_SOURCE_DIALOG_CRASHREPORTDLG_HXX +#pragma once #include @@ -37,6 +36,4 @@ private: vcl::ILibreOfficeKitNotifier*); }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
core.git: svx/source
svx/source/tbxctrls/tbunosearchcontrollers.cxx | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) New commits: commit 1f540c49e68b28a360ee5c32d60ab1bed3837eec Author: Michael Stahl AuthorDate: Thu Jan 18 13:04:35 2024 +0100 Commit: Michael Stahl CommitDate: Thu Jan 18 15:07:21 2024 +0100 tdf#158277 sw_redlinehide: fix find bar string FindTextFieldControl::SetTextToSelected_Impl() uses the XModel to retrieve the currently selected text, which naturally includes deleted text. Instead, use view API XTextViewCursor to get the visible selected text. (regression from commit ae2232366f00e08c1855667cfaf068269ac9af2f) Change-Id: I302ea90a7407af6e3ae7b62a2f373dccb33b8275 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162245 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 8e833167ea12..f8c4436443bc 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -243,12 +244,21 @@ void FindTextFieldControl::SetTextToSelected_Impl() try { css::uno::Reference xController(m_xFrame->getController(), css::uno::UNO_SET_THROW); -css::uno::Reference xModel(xController->getModel(), css::uno::UNO_SET_THROW); -css::uno::Reference xIndexAccess(xModel->getCurrentSelection(), css::uno::UNO_QUERY_THROW); -if (xIndexAccess->getCount() > 0) +uno::Reference const xTVCS(xController, uno::UNO_QUERY); +if (xTVCS.is()) { -css::uno::Reference xTextRange(xIndexAccess->getByIndex(0), css::uno::UNO_QUERY_THROW); -aString = xTextRange->getString(); +uno::Reference const xTVC(xTVCS->getViewCursor()); +aString = xTVC->getString(); +} +else +{ +uno::Reference xModel(xController->getModel(), uno::UNO_SET_THROW); +uno::Reference xIndexAccess(xModel->getCurrentSelection(), uno::UNO_QUERY_THROW); +if (xIndexAccess->getCount() > 0) +{ +uno::Reference xTextRange(xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW); +aString = xTextRange->getString(); +} } } catch ( ... )
core.git: svx/source
svx/source/dialog/compressgraphicdialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a5a0bb0c6577c82f5e31f1a81e31381fdf6c0c2e Author: Heiko Tietze AuthorDate: Thu Jan 4 12:13:44 2024 +0100 Commit: Heiko Tietze CommitDate: Thu Jan 4 14:00:21 2024 +0100 Resolves tdf#158780 - Enable "Reduce Resolution" by default Change-Id: Ib60f8484ebf6b140c52c7d2b6f190eac9dd3ade1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161612 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 8fcf479d889d..35899bec2f5f 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -45,7 +45,7 @@ namespace { struct memParam { -bool ReduceResolutionCB = false; +bool ReduceResolutionCB = true; int MFNewWidth = 1; int MFNewHeight = 1; bool LosslessRB = true;
core.git: svx/source
svx/source/tbxctrls/SvxColorValueSet.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 327e9592319ddd192de01d1850e404a0918ad130 Author: Julien Nabet AuthorDate: Sun Dec 31 12:27:24 2023 +0100 Commit: Julien Nabet CommitDate: Sun Dec 31 16:27:00 2023 +0100 Replace "size() != 0 with !empty()" (svx) Change-Id: I42c3d2a41bebc4e403180d8b3f8eb73d0d3a2377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161488 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index 4a181730ed97..e72ab98598d6 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -72,7 +72,7 @@ void SvxColorValueSet::addEntriesForXColorList(const XColorList& rXColorList, sa void SvxColorValueSet::addEntriesForColorSet(const std::set& rColorSet, std::u16string_view rNamePrefix) { sal_uInt32 nStartIndex = 1; -if(rNamePrefix.size() != 0) +if(!rNamePrefix.empty()) { for(const auto& rColor : rColorSet) {
core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |4 ++-- svx/source/dialog/ClassificationDialog.cxx | 10 +- svx/source/sdr/primitive2d/sdrdecompositiontools.cxx|4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) New commits: commit b05e660b98d202876806353dff1eb0a5b53e8dec Author: Julien Nabet AuthorDate: Thu Dec 28 14:38:17 2023 +0100 Commit: Julien Nabet CommitDate: Thu Dec 28 15:44:25 2023 +0100 Use emplace_back instead of push_back (svx) Change-Id: Icf796bba7f4dbfea17e13225b03d7b5b507317da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161383 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 2e19aa344ec4..a5f377912c6f 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -437,7 +437,7 @@ static void GetTextAreaOutline( aDXArry[a], aFont.GetFontHeight() ))); - aCharacterData.vOutlines.push_back(tools::PolyPolygon(tools::Polygon(aPolygon))); + aCharacterData.vOutlines.emplace_back(tools::Polygon(aPolygon)); } } else @@ -450,7 +450,7 @@ static void GetTextAreaOutline( aDXArry.empty() ? 10 : aDXArry.back(), aFont.GetFontHeight() ))); - aCharacterData.vOutlines.push_back(tools::PolyPolygon(tools::Polygon(aPolygon))); + aCharacterData.vOutlines.emplace_back(tools::Polygon(aPolygon)); } diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx index 03f38bb2f389..9c39e086edc3 100644 --- a/svx/source/dialog/ClassificationDialog.cxx +++ b/svx/source/dialog/ClassificationDialog.cxx @@ -357,7 +357,7 @@ void ClassificationDialog::readRecentlyUsed() } aWalker.parent(); -aResults.push_back({ eType, sString, sAbbreviatedString, sIdentifier }); +aResults.emplace_back(eType, sString, sAbbreviatedString, sIdentifier); } } aWalker.next(); @@ -541,7 +541,7 @@ std::vector ClassificationDialog::getResult() sWeightProperty = "BOLD"; // Insert into collection OUString sBlank; -aClassificationResults.push_back({ ClassificationType::PARAGRAPH, sWeightProperty, sBlank, sBlank }); +aClassificationResults.emplace_back(ClassificationType::PARAGRAPH, sWeightProperty, sBlank, sBlank); } const SvxFieldItem* pFieldItem = findField(rSection); @@ -554,12 +554,12 @@ std::vector ClassificationDialog::getResult() if (pClassificationField) { -aClassificationResults.push_back({ pClassificationField->meType, pClassificationField->msFullClassName, - pClassificationField->msDescription, pClassificationField->msIdentifier }); + aClassificationResults.emplace_back(pClassificationField->meType, pClassificationField->msFullClassName, + pClassificationField->msDescription, pClassificationField->msIdentifier); } else { -aClassificationResults.push_back({ ClassificationType::TEXT, sDisplayString, sDisplayString, OUString() }); +aClassificationResults.emplace_back(ClassificationType::TEXT, sDisplayString, sDisplayString, OUString()); } } } diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 0994b4a38197..d0ed4839dcfb 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -849,9 +849,9 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const Primitive2DContainer aRetval; for (const auto& xChild : rContentForShadow) { -aRetval.push_back(Primitive2DReference( +aRetval.emplace_back( new ShadowPrimitive2D(aShadowOffset, rShadow.getColor(), rShadow.getBlur(), -Primitive2DContainer({ xChild }; +Primitive2DContainer({ xChild }))); if (rShadow.getTransparence() != 0.0) { Primitive2DContainer aTempContent{ aRetval.back() };
core.git: svx/source sw/source
svx/source/form/datanavi.cxx|2 +- sw/source/uibase/shells/grfshex.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 25d4fae8d3f69dc4d03c1a04233e6ed670742ed5 Author: Caolán McNamara AuthorDate: Sat Dec 23 14:00:26 2023 + Commit: Caolán McNamara CommitDate: Sat Dec 23 16:03:30 2023 +0100 cid#1546064 COPY_INSTEAD_OF_MOVE and cid#1546034 COPY_INSTEAD_OF_MOVE Change-Id: If533400b570f20d80f1c41431ceba81579e0e25d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161242 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 0178a82c5947..9116c0eb075f 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -306,7 +306,7 @@ namespace svxform // tdf#154535 create the OXFormsDescriptor on-demand so we don't cause an unwanted // Binding to be created unless we are forced to. -auto fnCreateFormsDescriptor = [this, szName, xNode, xPropSet](){ +auto fnCreateFormsDescriptor = [this, szName=std::move(szName), xNode=std::move(xNode), xPropSet=std::move(xPropSet)](){ OXFormsDescriptor desc; desc.szName = szName; if (xNode) { diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index 45d40764525b..a9af8799b009 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -80,7 +80,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) css::uno::Reference xDispatchProvider(GetView().GetViewFrame().GetFrame().GetFrameInterface(), css::uno::UNO_QUERY); rtl::Reference xPlayerListener(new avmedia::PlayerListener( -[xDispatchProvider, aURL, bLink](const css::uno::Reference& rPlayer){ +[xDispatchProvider=std::move(xDispatchProvider), aURL, bLink](const css::uno::Reference& rPlayer){ css::awt::Size aSize = rPlayer->getPreferredPlayerWindowSize(); avmedia::MediaWindow::dispatchInsertAVMedia(xDispatchProvider, aSize, aURL, bLink); }));
core.git: svx/source
svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 1582bde861ad8e556fcf06657e7228980ff284e9 Author: Armin Le Grand (allotropia) AuthorDate: Fri Dec 22 17:20:21 2023 +0100 Commit: Armin Le Grand CommitDate: Sat Dec 23 15:49:08 2023 +0100 Add flush mechanism to buffered Primitives III There seem to be problems with re-creation of SdrCustomShapePrimitive2D primitive presentation due to SdrText not being held as uno::Reference everywhere. For now, try if excluding SdrCustomShapePrimitive2D from being flushed helps - may give hints already... Change-Id: I58373f7dcd81dd24fbf7a0687bb782326ad290fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161190 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index b58274106211..19717e2eb121 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -102,8 +102,6 @@ namespace drawinglayer::primitive2d mb3DShape(b3DShape), maTransform(std::move(aTransform)) { -// activate callback to flush buffered decomposition content -setCallbackSeconds(10); } bool SdrCustomShapePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
core.git: svx/source
svx/source/dialog/framelinkarray.cxx | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) New commits: commit f625928c346109216045d08b4dda30dbada005f5 Author: Noel Grandin AuthorDate: Tue Dec 12 15:23:16 2023 +0200 Commit: Noel Grandin CommitDate: Wed Dec 13 08:27:14 2023 +0100 tdf#158636 Wrong border behaviour when cells are merged regression from commit e27d4cc31e04be4c47b5085dfa2363ee45457e8a Author: Noel Grandin Date: Mon Jun 19 12:23:55 2023 +0200 tdf#150534 reduce the memory consumption of cells when calculating where I accidentally removed a line in lclSetMergedRange that set mbMergedOrg to true. And then the singlevalfields plugin spotted that mbMergedOrig had only value, and so it got removed in: commit 884a2cd39a7c0433a5bbbf4e83e2a9b16cdad71c Author: Noel Grandin Date: Fri Jun 30 15:36:51 2023 +0200 loplugin:singlevalfields Change-Id: I9fc057f63e14df36c73d25c421ddbec72f7723e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160619 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 21afef6441f5..fa5829438698 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -64,6 +64,7 @@ public: SvxRotateMode meRotMode; double mfOrientation; +boolmbMergeOrig; boolmbOverlapX; boolmbOverlapY; @@ -88,7 +89,7 @@ public: const Style& GetStyleTLBR() const { return maTLBR; } const Style& GetStyleBLTR() const { return maBLTR; } -boolIsMerged() const { return mbOverlapX || mbOverlapY; } +boolIsMerged() const { return mbMergeOrig || mbOverlapX || mbOverlapY; } boolIsRotated() const { return mfOrientation != 0.0; } voidMirrorSelfX(); @@ -206,6 +207,7 @@ Cell::Cell() : mnAddBottom( 0 ), meRotMode(SvxRotateMode::SVX_ROTATE_MODE_STANDARD ), mfOrientation( 0.0 ), +mbMergeOrig( false ), mbOverlapX( false ), mbOverlapY( false ) { @@ -229,6 +231,7 @@ bool Cell::operator==(const Cell& rOther) const && mnAddBottom == rOther.mnAddBottom && meRotMode == rOther.meRotMode && mfOrientation == rOther.mfOrientation +&& mbMergeOrig == rOther.mbMergeOrig && mbOverlapX == rOther.mbOverlapX && mbOverlapY == rOther.mbOverlapY; } @@ -248,6 +251,7 @@ size_t Cell::hashCode() const o3tl::hash_combine(seed, mnAddBottom); o3tl::hash_combine(seed, meRotMode); o3tl::hash_combine(seed, mfOrientation); +o3tl::hash_combine(seed, mbMergeOrig); o3tl::hash_combine(seed, mbOverlapX); o3tl::hash_combine(seed, mbOverlapY); return seed; @@ -352,7 +356,7 @@ struct ArrayImpl boolHasCellRotation() const; -Cell* createOrFind(const Cell& rCell); +const Cell* createOrFind(const Cell& rCell); }; static void lclSetMergedRange( ArrayImpl& rImpl, CellVec& rCells, sal_Int32 nWidth, sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ) @@ -363,12 +367,14 @@ static void lclSetMergedRange( ArrayImpl& rImpl, CellVec& rCells, sal_Int32 nWid { const Cell* pCell = rCells[ nRow * nWidth + nCol ]; Cell aTempCell(*pCell); +aTempCell.mbMergeOrig = false; aTempCell.mbOverlapX = nCol > nFirstCol; aTempCell.mbOverlapY = nRow > nFirstRow; rCells[ nRow * nWidth + nCol ] = rImpl.createOrFind(aTempCell); } } Cell aTempCell(*rCells[ nFirstRow * nWidth + nFirstCol ]); +aTempCell.mbMergeOrig = true; rCells[ nFirstRow * nWidth + nFirstCol ] = rImpl.createOrFind(aTempCell); } @@ -399,7 +405,7 @@ ArrayImpl::~ArrayImpl() delete pCell; } -Cell* ArrayImpl::createOrFind(const Cell& rCell) +const Cell* ArrayImpl::createOrFind(const Cell& rCell) { auto it = maRegisteredCells.find(const_cast()); if (it != maRegisteredCells.end()) @@ -1142,6 +1148,20 @@ void Array::MirrorSelfX() aNewCells.push_back( mxImpl->createOrFind(aTempCell) ); } } +for( nRow = 0; nRow < mxImpl->mnHeight; ++nRow ) +{ +for( nCol = 0; nCol < mxImpl->mnWidth; ++nCol ) +{ +if( mxImpl->GetCell( nCol, nRow )->mbMergeOrig ) +{ +sal_Int32 nLastCol = mxImpl->GetMergedLastCol( nCol, nRow ); +sal_Int32 nLastRow = mxImpl->GetMergedLastRow( nCol, nRow ); +lclSetMergedRange( *mxImpl, aNewCells, mxImpl->mnWidth, +mxImpl->GetMirrorCol( nLastCol ), nRow, +mxImpl->GetMirrorCol( nCol ), nLastRow ); +} +} +} mxImpl->maCells.swap( aNewCells );
core.git: svx/source
svx/source/dialog/optgrid.cxx | 37 ++--- 1 file changed, 30 insertions(+), 7 deletions(-) New commits: commit 7d5c403f3759b14fe3be206f4c29494799eac2b4 Author: Balazs Varga AuthorDate: Mon Dec 11 10:33:20 2023 +0100 Commit: Balazs Varga CommitDate: Mon Dec 11 15:58:11 2023 +0100 tdf#158473 - UI: Part 55 - Unify lockdown behavior of Options dialog for Calc - Grid Page. Change-Id: Ic29e06c2f1a5e71e1b6236c321cfcb4b1afc39f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160564 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 2226eaa4e23c..6cee157cc005 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -261,7 +262,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) case HTML_MODE: bReadOnly = officecfg::Office::WriterWeb::Grid::Option::SnapToGrid::isReadOnly(); break; case IMPRESS_MODE: bReadOnly = officecfg::Office::Impress::Grid::Option::SnapToGrid::isReadOnly(); break; case DRAW_MODE: bReadOnly = officecfg::Office::Draw::Grid::Option::SnapToGrid::isReadOnly(); break; -default: //TODO Calc +case CALC_MODE: bReadOnly = officecfg::Office::Calc::Grid::Option::SnapToGrid::isReadOnly(); break; +default: break; } m_xCbxUseGridsnap->set_active(pGridAttr->bUseGridsnap); @@ -274,7 +276,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) case HTML_MODE: bReadOnly = officecfg::Office::WriterWeb::Grid::Option::Synchronize::isReadOnly(); break; case IMPRESS_MODE: bReadOnly = officecfg::Office::Impress::Grid::Option::Synchronize::isReadOnly(); break; case DRAW_MODE: bReadOnly = officecfg::Office::Draw::Grid::Option::Synchronize::isReadOnly(); break; -default: //TODO Calc +case CALC_MODE: bReadOnly = officecfg::Office::Calc::Grid::Option::Synchronize::isReadOnly(); break; +default: break; } m_xCbxSynchronize->set_active(pGridAttr->bSynchronize); @@ -287,7 +290,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) case HTML_MODE: bReadOnly = officecfg::Office::WriterWeb::Grid::Option::VisibleGrid::isReadOnly(); break; case IMPRESS_MODE: bReadOnly = officecfg::Office::Impress::Grid::Option::VisibleGrid::isReadOnly(); break; case DRAW_MODE: bReadOnly = officecfg::Office::Draw::Grid::Option::VisibleGrid::isReadOnly(); break; -default: //TODO Calc +case CALC_MODE: bReadOnly = officecfg::Office::Calc::Grid::Option::VisibleGrid::isReadOnly(); break; +default: break; } m_xCbxGridVisible->set_active(pGridAttr->bGridVisible); @@ -318,7 +322,15 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) bReadOnly = officecfg::Office::Draw::Grid::Resolution::XAxis::NonMetric::isReadOnly(); } break; -default: //TODO Calc +case CALC_MODE: +{ +if (lcl_IsMetricSystem()) +bReadOnly = officecfg::Office::Calc::Grid::Resolution::XAxis::Metric::isReadOnly(); +else +bReadOnly = officecfg::Office::Calc::Grid::Resolution::XAxis::NonMetric::isReadOnly(); +} +break; +default: break; } m_xMtrFldDrawX->set_sensitive(!bReadOnly); @@ -344,7 +356,15 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) bReadOnly = officecfg::Office::Draw::Grid::Resolution::YAxis::NonMetric::isReadOnly(); } break; -default: //TODO Calc +case CALC_MODE: +{ +if (lcl_IsMetricSystem()) +bReadOnly = officecfg::Office::Calc::Grid::Resolution::YAxis::Metric::isReadOnly(); +else +bReadOnly = officecfg::Office::Calc::Grid::Resolution::YAxis::NonMetric::isReadOnly(); +} +break; +default: break; } m_xMtrFldDrawY->set_sensitive(!bReadOnly); @@ -359,7 +379,8 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) case HTML_MODE: bReadOnly = officecfg::Office::WriterWeb::Grid::Subdivision::XAxis::isReadOnly(); break; case IMPRESS_MODE: bReadOnly = officecfg::Office::Impress::Grid::Subdivision::XAxis::isReadOnly(); break; case DRAW_MODE: bReadOnly = officecfg::Office::Draw::Grid::Subdivision::XAxis::isReadOnly(); break; -default: //TODO Calc +case CALC_MODE: bReadOnly = officecfg::Office::Calc::Grid::Subdivision::XAxis::isReadOnly();
core.git: svx/source sw/source
svx/source/form/fmshimp.cxx|2 +- sw/source/core/layout/paintfrm.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit cf3dda7c1c1da50db75d4c022bef279149d26636 Author: Caolán McNamara AuthorDate: Sat Dec 9 19:28:18 2023 + Commit: Caolán McNamara CommitDate: Sat Dec 9 21:59:57 2023 +0100 cid#1546275 Using invalid iterator and cid#1545870 Using invalid iterator Change-Id: I7a517fd67d1100a2feebfd3903c1804a2dcc2992 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160514 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index d54c5acaebde..890394856688 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3372,7 +3372,7 @@ void FmXFormShell::CreateExternalView_Lock() // list source MapUString2UstringSeq::const_iterator aCurrentListSource = aRadioListSources.find(rCtrlSource.first); -DBG_ASSERT(aCurrentListSource != aRadioListSources.end(), +assert(aCurrentListSource != aRadioListSources.end() && "FmXFormShell::CreateExternalView : inconsistent radio descriptions !"); pListBoxDescription->Name = FM_PROP_LISTSOURCE; pListBoxDescription->Value <<= (*aCurrentListSource).second; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 0f048c4e805d..8ca5e35d1c84 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2746,8 +2746,8 @@ void SwTabFramePainter::FindStylesForLine( Point& rStartPoint, } aMapIter = maHoriLines.find( rStartPoint.Y() ); -OSL_ENSURE( aMapIter != maHoriLines.end(), "FindStylesForLine: Error" ); -const SwLineEntrySet& rHoriSet = (*aMapIter).second; +assert(aMapIter != maHoriLines.end() && "FindStylesForLine: Error"); +const SwLineEntrySet& rHoriSet = aMapIter->second; for ( const SwLineEntry& rEntry : rHoriSet ) {
[Libreoffice-commits] core.git: svx/source
svx/source/form/fmshimp.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6bc0020108e8b45954727276ba11b462feb9a4bf Author: Julien Nabet AuthorDate: Mon Dec 4 18:23:32 2023 +0100 Commit: Julien Nabet CommitDate: Mon Dec 4 20:28:02 2023 +0100 Put back the message in assert after b50da6f3a9109fc1d4468c15aa7d5c68773ec199 Change-Id: Ie469e94ff51f1ca6dbbd65020f02fe43e0c1608c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160318 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index a71f78f2296b..5dce31f180ba 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -3380,7 +3380,7 @@ void FmXFormShell::CreateExternalView_Lock() // value list MapUString2UstringSeq::const_iterator aCurrentValueList = aRadioValueLists.find(rCtrlSource.first); -assert(aCurrentValueList != aRadioValueLists.end()); +assert(aCurrentValueList != aRadioValueLists.end() && "FmXFormShell::CreateExternalView : inconsistent radio descriptions !"); pListBoxDescription->Name = FM_PROP_STRINGITEMLIST; pListBoxDescription->Value <<= (*aCurrentValueList).second; ++pListBoxDescription;
[Libreoffice-commits] core.git: svx/source
svx/source/form/labelitemwindow.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 48ba98a51f029cd14b5d982dab36eb581d40fef3 Author: Heiko Tietze AuthorDate: Wed Nov 29 14:29:57 2023 +0100 Commit: Heiko Tietze CommitDate: Thu Nov 30 11:41:38 2023 +0100 Resolves tdf#158412 - Don't show chevron in quick find bar Change-Id: I50f0bb7d8a406b77baccc626ca99b656d170ecf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160093 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/svx/source/form/labelitemwindow.cxx b/svx/source/form/labelitemwindow.cxx index 1ccbe6c5d156..c9afd1534acc 100644 --- a/svx/source/form/labelitemwindow.cxx +++ b/svx/source/form/labelitemwindow.cxx @@ -50,7 +50,8 @@ void LabelItemWindow::set_label(const OUString& rLabel, const LabelItemWindowTyp m_xLabel->set_font_color(Color(0x00, 0x47, 0x85)); m_xBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as InfobarType::INFO } -m_xLabel->set_visible(!rLabel.isEmpty()); +m_xLabel->set_visible( +true); // always show and not just if !rLabel.isEmpty() to not make the chevron appear } OUString LabelItemWindow::get_label() const { return m_xLabel->get_label(); }
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/optgrid.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 15ea67e549507f71b4367b7709339e61ba780c92 Author: Andrea Gelmini AuthorDate: Wed Nov 29 14:29:08 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 29 16:49:46 2023 +0100 Remove duplicated include Change-Id: Ieea181852d18be586d50b049c46f2bdc4324183f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160092 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 59bc67b2e26a..c0e6f6ebe03b 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdoashp.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2b62b4021fb91e4f18a0b8eceace52046948a74e Author: Caolán McNamara AuthorDate: Tue Nov 28 09:23:07 2023 + Commit: Caolán McNamara CommitDate: Wed Nov 29 09:38:00 2023 +0100 cid#136 Use of auto that causes a copy Change-Id: Iae373b1aa5c25732b0e459778e4e85a3e96f138c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160013 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 21998ff4e339..eeaa5571576b 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1727,7 +1727,7 @@ SdrGluePoint SdrObjCustomShape::GetVertexGluePoint(sal_uInt16 nPosNum) const } Point aPt; -auto aRectangle = getRectangle(); +tools::Rectangle aRectangle = getRectangle(); switch (nPosNum) { case 0: aPt = aRectangle.TopCenter();aPt.AdjustY( -nWdt ); break;
[Libreoffice-commits] core.git: svx/source vcl/source vcl/workben
svx/source/dialog/_bmpmask.cxx|5 + vcl/source/graphic/GraphicObject2.cxx |2 +- vcl/source/rendercontext/drawmode.cxx |2 +- vcl/workben/vcldemo.cxx |3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) New commits: commit f4edd6258dff38c45e4a6b709e4e1d72a55a446c Author: Noel Grandin AuthorDate: Tue Nov 28 12:43:25 2023 +0200 Commit: Noel Grandin CommitDate: Tue Nov 28 19:55:51 2023 +0100 simplify some BitmapEx constructions using the color bitmap __and__ the alpha from another BitmapEx is equivalent to just doing a straight copy/assign Change-Id: I134ab8a1197ed538823afc4a8cd28b3d5986c6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160019 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 1db7e661cdd7..3e6a56a79f91 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -994,10 +994,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic ) if ( aBitmapEx.GetSizePixel().Width() && aBitmapEx.GetSizePixel().Height() ) { ImpMask( aBitmapEx ); -if ( aGraphic.IsTransparent() ) -aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetAlphaMask() ) ); -else -aGraphic = aBitmapEx; +aGraphic = Graphic( aBitmapEx ); } } } diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx index 02a9374759bf..2f60e315d5ef 100644 --- a/vcl/source/graphic/GraphicObject2.cxx +++ b/vcl/source/graphic/GraphicObject2.cxx @@ -457,7 +457,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, if( rBmpEx.IsAlpha() ) { -aBmpEx2 = BitmapEx( rBmpEx.GetBitmap(), rBmpEx.GetAlphaMask() ); +aBmpEx2 = rBmpEx; } else { diff --git a/vcl/source/rendercontext/drawmode.cxx b/vcl/source/rendercontext/drawmode.cxx index ab3b36e0223d..fd3f29ac275f 100644 --- a/vcl/source/rendercontext/drawmode.cxx +++ b/vcl/source/rendercontext/drawmode.cxx @@ -269,7 +269,7 @@ BitmapEx GetBitmapEx(BitmapEx const& rBitmapEx, DrawModeFlags nDrawMode) } else { -aBmpEx = BitmapEx(aColorBmp, aBmpEx.GetAlphaMask()); +aBmpEx = BitmapEx(aColorBmp); } } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 346de0b52a09..1214a61a9406 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1406,8 +1406,7 @@ public: rDev.DrawBitmap(aBelow, aGrey); aBelow.Move(aGrey.GetSizePixel().Width(),0); -BitmapEx aGreyMask(aSrc.GetBitmap(), - aSrc.GetAlphaMask()); +BitmapEx aGreyMask(aSrc); rDev.DrawBitmapEx(aBelow, aGreyMask); aLocation.Move(aSrc.GetSizePixel().Width()*6,0);
[Libreoffice-commits] core.git: svx/source svx/uiconfig
svx/source/dialog/srchdlg.cxx|1 + svx/source/form/labelitemwindow.cxx |1 + svx/uiconfig/ui/findreplacedialog.ui | 11 ++- svx/uiconfig/ui/labelbox.ui |2 +- 4 files changed, 9 insertions(+), 6 deletions(-) New commits: commit 5a622f1a29d249a512cc24f99d189f748623c678 Author: Heiko Tietze AuthorDate: Tue Nov 28 11:10:58 2023 +0100 Commit: Heiko Tietze CommitDate: Tue Nov 28 14:33:18 2023 +0100 Related tdf#156227 - Find/quickfind design Themed icons look bad when drawn white on light blue; using the same icon as on the infobar makes more sense Change-Id: I6b4fd2bac7dce41b8196c702e0f0dc87712e2b8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160017 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index b5cf7bcf34fd..b1c87a6db7c8 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -344,6 +344,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi m_xSearchLabel->set_font_color(Color(0x00, 0x47, 0x85)); this->SetSearchLabel(""); // hide the message but keep the box height +m_xSearchIcon->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - too large here m_xReplaceTmplLB->make_sorted(); m_xReplaceAttrText->hide(); diff --git a/svx/source/form/labelitemwindow.cxx b/svx/source/form/labelitemwindow.cxx index bdff03e060f2..1ccbe6c5d156 100644 --- a/svx/source/form/labelitemwindow.cxx +++ b/svx/source/form/labelitemwindow.cxx @@ -19,6 +19,7 @@ LabelItemWindow::LabelItemWindow(vcl::Window* pParent, const OUString& rLabel) m_xLabel->set_label(rLabel); m_xImage->hide(); +m_xImage->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - too large here SetOptimalSize(); diff --git a/svx/uiconfig/ui/findreplacedialog.ui b/svx/uiconfig/ui/findreplacedialog.ui index 57a16e666a2f..e915a647f710 100644 --- a/svx/uiconfig/ui/findreplacedialog.ui +++ b/svx/uiconfig/ui/findreplacedialog.ui @@ -290,15 +290,16 @@ True False +center 6 3 3 3 -res/info.png +vcl/res/infobox.png - -Search icon - + +Search icon + @@ -323,7 +324,7 @@ 0 - notification +notification diff --git a/svx/uiconfig/ui/labelbox.ui b/svx/uiconfig/ui/labelbox.ui index f77cd5da7f4e..29210661b91c 100644 --- a/svx/uiconfig/ui/labelbox.ui +++ b/svx/uiconfig/ui/labelbox.ui @@ -15,7 +15,7 @@ 6 3 3 -res/info.png +vcl/res/infobox.png False
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/framelinkarray.cxx | 207 +-- 1 file changed, 104 insertions(+), 103 deletions(-) New commits: commit ac424db10e963864bc5744897561e0bf127a615c Author: Noel Grandin AuthorDate: Thu Nov 23 09:28:46 2023 +0200 Commit: Noel Grandin CommitDate: Thu Nov 23 10:37:23 2023 +0100 re-apply "Work with what we have in ArrayImpl: pointers" re-apply commit f7df46c917533d3ce3528d52f49629fe9f51e67b "Work with what we have in ArrayImpl: pointers", which I somehow managed to revert while preparing commit d9c726beb64968e84d2150824c81dcf0a8b66ec2 "optimise framelinkarray lookup" Change-Id: I05c3da965ef334597f17fea9deded28218b15a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159846 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 3431c861fcfd..21afef6441f5 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -228,6 +228,7 @@ bool Cell::operator==(const Cell& rOther) const && mnAddTop == rOther.mnAddTop && mnAddBottom == rOther.mnAddBottom && meRotMode == rOther.meRotMode +&& mfOrientation == rOther.mfOrientation && mbOverlapX == rOther.mbOverlapX && mbOverlapY == rOther.mbOverlapY; } @@ -246,6 +247,7 @@ size_t Cell::hashCode() const o3tl::hash_combine(seed, mnAddTop); o3tl::hash_combine(seed, mnAddBottom); o3tl::hash_combine(seed, meRotMode); +o3tl::hash_combine(seed, mfOrientation); o3tl::hash_combine(seed, mbOverlapX); o3tl::hash_combine(seed, mbOverlapY); return seed; @@ -321,7 +323,7 @@ struct ArrayImpl sal_Int32 GetIndex( sal_Int32 nCol, sal_Int32 nRow ) const { return nRow * mnWidth + nCol; } -const Cell& GetCell( sal_Int32 nCol, sal_Int32 nRow ) const; +const Cell* GetCell( sal_Int32 nCol, sal_Int32 nRow ) const; voidPutCell( sal_Int32 nCol, sal_Int32 nRow, const Cell& ); sal_Int32 GetMergedFirstCol( sal_Int32 nCol, sal_Int32 nRow ) const; @@ -329,8 +331,8 @@ struct ArrayImpl sal_Int32 GetMergedLastCol( sal_Int32 nCol, sal_Int32 nRow ) const; sal_Int32 GetMergedLastRow( sal_Int32 nCol, sal_Int32 nRow ) const; -const Cell& GetMergedOriginCell( sal_Int32 nCol, sal_Int32 nRow ) const; -const Cell& GetMergedLastCell( sal_Int32 nCol, sal_Int32 nRow ) const; +const Cell* GetMergedOriginCell( sal_Int32 nCol, sal_Int32 nRow ) const; +const Cell* GetMergedLastCell( sal_Int32 nCol, sal_Int32 nRow ) const; boolIsMergedOverlappedLeft( sal_Int32 nCol, sal_Int32 nRow ) const; boolIsMergedOverlappedRight( sal_Int32 nCol, sal_Int32 nRow ) const; @@ -408,9 +410,9 @@ Cell* ArrayImpl::createOrFind(const Cell& rCell) return pRetval; } -const Cell& ArrayImpl::GetCell( sal_Int32 nCol, sal_Int32 nRow ) const +const Cell* ArrayImpl::GetCell( sal_Int32 nCol, sal_Int32 nRow ) const { -return IsValidPos( nCol, nRow ) ? *maCells[ GetIndex( nCol, nRow ) ] : OBJ_CELL_NONE; +return IsValidPos( nCol, nRow ) ? maCells[ GetIndex( nCol, nRow ) ] : _CELL_NONE; } void ArrayImpl::PutCell( sal_Int32 nCol, sal_Int32 nRow, const Cell & rCell ) @@ -422,61 +424,61 @@ void ArrayImpl::PutCell( sal_Int32 nCol, sal_Int32 nRow, const Cell & rCell ) sal_Int32 ArrayImpl::GetMergedFirstCol( sal_Int32 nCol, sal_Int32 nRow ) const { sal_Int32 nFirstCol = nCol; -while( (nFirstCol > 0) && GetCell( nFirstCol, nRow ).mbOverlapX ) --nFirstCol; +while( (nFirstCol > 0) && GetCell( nFirstCol, nRow )->mbOverlapX ) --nFirstCol; return nFirstCol; } sal_Int32 ArrayImpl::GetMergedFirstRow( sal_Int32 nCol, sal_Int32 nRow ) const { sal_Int32 nFirstRow = nRow; -while( (nFirstRow > 0) && GetCell( nCol, nFirstRow ).mbOverlapY ) --nFirstRow; +while( (nFirstRow > 0) && GetCell( nCol, nFirstRow )->mbOverlapY ) --nFirstRow; return nFirstRow; } sal_Int32 ArrayImpl::GetMergedLastCol( sal_Int32 nCol, sal_Int32 nRow ) const { sal_Int32 nLastCol = nCol + 1; -while( (nLastCol < mnWidth) && GetCell( nLastCol, nRow ).mbOverlapX ) ++nLastCol; +while( (nLastCol < mnWidth) && GetCell( nLastCol, nRow )->mbOverlapX ) ++nLastCol; return nLastCol - 1; } sal_Int32 ArrayImpl::GetMergedLastRow( sal_Int32 nCol, sal_Int32 nRow ) const { sal_Int32 nLastRow = nRow + 1; -while( (nLastRow < mnHeight) && GetCell( nCol, nLastRow ).mbOverlapY ) ++nLastRow; +while( (nLastRow < mnHeight) && GetCell( nCol, nLastRow )->mbOverlapY ) ++nLastRow; return nLastRow - 1; } -const Cell& ArrayImpl::GetMergedOriginCell( sal_Int32 nCol, sal_Int32 nRow ) const +const Cell* ArrayImpl::GetMergedOriginCell( sal_Int32 nCol, sal_Int32 nRow
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit f17b89b9e4d1e5c1cf608a2ce1ed218917e3447b Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:16:49 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:04:58 2023 +0100 Fix typo Change-Id: I66cb84da082a7498b1c6a79e989dd94d9f7b1b56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159828 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 2d86e99073c2..2e19aa344ec4 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -832,8 +832,8 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d sal_uInt16 i; for (i = 0; i < nPointCount; i++) { -//Normal vector for a point will be calculated from its neightbour points -//except if is in the start/end of the vector +//Normal vector for a point will be calculated from its neighbour points +//except if it is in the start/end of the vector sal_uInt16 nPointIdx1 = i == 0 ? i : i - 1; sal_uInt16 nPointIdx2 = i == nPointCount - 1 ? i : i + 1;
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8b6e497a3a9c0d3ce054d3516a2646576a5c8247 Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:20:36 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:03:10 2023 +0100 Fix typo Change-Id: I6e6955b18078685ebbe215e496a0b459afb33f27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159833 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index ff6903d1f181..a51e93588582 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -828,7 +828,7 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d vCurOutline.reserve(nPointCount); vNorm.reserve(nPointCount); -// Calculate Normal vectors, and allocate curve datas +// Calculate Normal vectors, and allocate curve data sal_uInt16 i; for (i = 0; i < nPointCount; i++) {
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d2cfc1cbcb70954951a7bd95a95da26233552733 Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:15:08 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:02:50 2023 +0100 Fix typo Change-Id: I034c3b76a8f35700d528b06d7816c0062fe16b86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159822 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 8a2984cbdd10..ff6903d1f181 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -930,7 +930,7 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d // if fAdjust<0, then it means, the text was longer, as // the current outline, so we will skip the text scaling, and -// the text horizontal alignment ajustment +// the text horizontal alignment adjustment // so the text will be rendered just as long as the cureve is. if (fAdjust >= 0) {
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ac2839458c5f497b907506da07dcd1b451b62372 Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:16:24 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:02:11 2023 +0100 Fix typo Change-Id: I3201adc92bec156014b8044371a79a8255c58aa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159827 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 733483e4a75e..8a2984cbdd10 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -903,7 +903,7 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d = nAdjust * (fCurWidth - rParagraph.aBoundRect.GetWidth()) / 2; } else -fAdjust = -1; // we neet tho shrink the text to fit the curve +fAdjust = -1; // we need to shrink the text to fit the curve for ( auto& rCharacter : rParagraph.vCharacters ) {
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 99ef89ba4cd2497f3a46448692a71d98c721ae9e Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:15:56 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:01:54 2023 +0100 Fix typo Change-Id: Id19012a207b6df24188e424414e103c7c3dc3d5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159825 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index ba7b2890f905..733483e4a75e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -784,7 +784,7 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d if ( !vDistances.empty() ) { -// horizontal aligment: how much we have to move text to the right. +// horizontal alignment: how much we have to move text to the right. int nAdjust = -1; switch (eHorzAdjust) {
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c49d688d212fd89daee5563b67b55f687f6d901a Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:16:06 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:01:01 2023 +0100 Fix typo Change-Id: I15170c332c7b9943433fc7113c3b3e8c44c765cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159826 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 47d2c0830e3f..0bbf501835aa 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -867,7 +867,7 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d double fCurvesDist = rTextArea.aBoundRect.GetHeight() / 2.0 + rTextArea.aBoundRect.Top() - rParagraph.aBoundRect.Center().Y(); -// verical alignment adjust +// vertical alignment adjust fCurvesDist -= rTextArea.nHAlignMove; for (i = 0; i < nPointCount; i++)
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 84d8a1caf124a25fb081562e4db32acf19e0f301 Author: Andrea Gelmini AuthorDate: Wed Nov 22 16:15:24 2023 +0100 Commit: Julien Nabet CommitDate: Wed Nov 22 21:00:37 2023 +0100 Fix typo Change-Id: I76ea5af4ec21ca55a2b88f48e6d476feec065349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159823 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 8f2896109e9e..47d2c0830e3f 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -939,7 +939,7 @@ static void FitTextOutlinesToShapeOutlines(const tools::PolyPolygon& aOutlines2d } // 0 <= fM1,fM2 <= 1 should be true, but rounding errors can // make a small mistake. -// make sure they are >0 becuase GetPoint() need that +// make sure they are >0 because GetPoint() need that if (fM1 < 0) fM1 = 0; if (fM2 < 0) fM2 = 0;
[Libreoffice-commits] core.git: svx/source
svx/source/accessibility/ChildrenManagerImpl.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 23e9a4cf1eec75cdd40a695ecae2af9b952178d3 Author: Armin Le Grand (allotropia) AuthorDate: Fri Nov 10 17:59:11 2023 +0100 Commit: Armin Le Grand CommitDate: Fri Nov 10 20:05:11 2023 +0100 tdf#158169 take no actions in disposed incarnation Using the described steps in the bug report it is possible to have an already disposed incarnation of ChildrenManagerImpl that gets called with notifyEvent. If exposed it is necessary not to execute actions, but to inform the caller by triggering a lang::DisposedException(). The SfxBaseModel::notifyEvent that executes this will then remove the instance from it's list. Change-Id: Ie39e37d6e55ea66f441e732b612774b18d7c3ca1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159306 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 96e27c079e9b..5271f1887b83 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -681,6 +681,11 @@ void SAL_CALL ChildrenManagerImpl::notifyEvent ( const document::EventObject& rEventObject) { +// tdf#158169 if we are already disposed, execute no actions, but inform the +// caller that we are disposed +if ( m_bDisposed ) +throw lang::DisposedException(); + if (rEventObject.EventName == "ShapeInserted") AddShape (Reference(rEventObject.Source, uno::UNO_QUERY)); else if (rEventObject.EventName == "ShapeRemoved")
[Libreoffice-commits] core.git: svx/source
svx/source/gallery2/galleryfilestorage.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 1d939b782235a62c965a4c8309869796b5838acf Author: Thorsten Behrens AuthorDate: Sun Nov 5 01:26:46 2023 +0100 Commit: Thorsten Behrens CommitDate: Sun Nov 5 21:21:27 2023 +0100 reprobuild: don't write nondeterministic textencoding No need to write this legacy int16, that we ignore on read anyway. Change-Id: I5ee071aa0562b8e2718a1a83dffc543c9a104360 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158942 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/svx/source/gallery2/galleryfilestorage.cxx b/svx/source/gallery2/galleryfilestorage.cxx index 1838520ec60a..e9a8cd0aa8b6 100644 --- a/svx/source/gallery2/galleryfilestorage.cxx +++ b/svx/source/gallery2/galleryfilestorage.cxx @@ -697,7 +697,8 @@ SvStream& GalleryFileStorage::writeGalleryTheme(SvStream& rOStm, const GalleryTh rOStm.WriteUInt16(0x0004); write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, pThm->GetThemeName(), RTL_TEXTENCODING_UTF8); -rOStm.WriteUInt32(nCount).WriteUInt16(osl_getThreadTextEncoding()); +rOStm.WriteUInt32(nCount); +rOStm.WriteUInt16(RTL_TEXTENCODING_UTF8); // unused on reading for (sal_uInt32 i = 0; i < nCount; i++) {
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit e5675d7e03de5962af8828663529a780ca31dd5b Author: Noel Grandin AuthorDate: Mon Oct 30 10:40:03 2023 +0200 Commit: Noel Grandin CommitDate: Mon Oct 30 14:21:51 2023 +0100 rename mxItemSet->moItemSet in SvxShapeImpl because the improved naming is useful for a bigger patch that I want to land Change-Id: I3acea11288a2e70d6ea91c99b52d3a05916da4d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158643 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 2ce0ed35c3e6..b6ef17b86616 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -111,7 +111,7 @@ class GDIMetaFile; struct SvxShapeImpl { -std::optional mxItemSet; +std::optional moItemSet; SdrObjKind mnObjId; SvxShapeMaster* mpMaster; boolmbDisposing; @@ -1534,11 +1534,11 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& SfxItemSet* pSet; if( mbIsMultiPropertyCall && !bIsNotPersist ) { -if( !mpImpl->mxItemSet ) +if( !mpImpl->moItemSet ) { -mpImpl->mxItemSet.emplace( GetSdrObject()->GetProperties().CreateObjectSpecificItemSet( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool() ) ); +mpImpl->moItemSet.emplace( GetSdrObject()->GetProperties().CreateObjectSpecificItemSet( GetSdrObject()->getSdrModelFromSdrObject().GetItemPool() ) ); } -pSet = &*mpImpl->mxItemSet; +pSet = &*mpImpl->moItemSet; } else { @@ -1713,15 +1713,15 @@ void SAL_CALL SvxShape::setPropertyValues( const css::uno::Sequence< OUString >& } } -if( mpImpl->mxItemSet && HasSdrObject() ) -GetSdrObject()->SetMergedItemSetAndBroadcast( *mpImpl->mxItemSet ); +if( mpImpl->moItemSet && HasSdrObject() ) +GetSdrObject()->SetMergedItemSetAndBroadcast( *mpImpl->moItemSet ); } void SvxShape::endSetPropertyValues() { mbIsMultiPropertyCall = false; -mpImpl->mxItemSet.reset(); +mpImpl->moItemSet.reset(); }
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx |5 - 1 file changed, 5 deletions(-) New commits: commit 123a0ef011f5627b213aef0a20215970ada30fe6 Author: Noel Grandin AuthorDate: Fri Oct 20 10:40:11 2023 +0200 Commit: Noel Grandin CommitDate: Fri Oct 20 13:26:23 2023 +0200 remove SAL_WARN in _setPropertyValue since so much code higher level code is now just asking for random properties and just catching the UnknownPropertyException for the cases where the object does not support that property Change-Id: I9198ec0c540252783015cffa088be30451f92c3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158231 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index c7fb448fe575..45d1589728be 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1506,12 +1506,7 @@ void SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& } if (!pMap) -{ -// reduce log noise by ignoring two properties that higher level code queries for on all objects -SAL_WARN_IF(rPropertyName != "FromWordArt" && rPropertyName != "GraphicColorMode", -"svx.uno", "Unknown Property: " << rPropertyName); throw beans::UnknownPropertyException( rPropertyName, getXWeak()); -} if ((pMap->nFlags & beans::PropertyAttribute::READONLY) != 0) throw beans::PropertyVetoException(
[Libreoffice-commits] core.git: svx/source
svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit f5c4635c8bbd27b06a81bfa8d75f986994065310 Author: Noel Grandin AuthorDate: Thu Oct 19 11:50:57 2023 +0200 Commit: Noel Grandin CommitDate: Thu Oct 19 15:20:57 2023 +0200 tdf#155410 small optimisation Change-Id: I736b5959d52c57ee5e05e349d0c421896229e554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158172 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 42b699374e1c..d95d5fbeb75e 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -90,15 +90,13 @@ namespace sdr::contact if(bIsLine) { // special handling for single line mode (2 points) -const basegfx::B2DPolygon aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0)); -const basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0)); -const basegfx::B2DPoint aEnd(aSubPolygon.getB2DPoint(1)); +const basegfx::B2DPolygon & rSubPolygon(aUnitPolyPolygon.getB2DPolygon(0)); +const basegfx::B2DPoint aStart(rSubPolygon.getB2DPoint(0)); +const basegfx::B2DPoint aEnd(rSubPolygon.getB2DPoint(1)); const basegfx::B2DVector aLine(aEnd - aStart); // #i102548# create new unit polygon for line (horizontal) -basegfx::B2DPolygon aNewPolygon; -aNewPolygon.append(basegfx::B2DPoint(0.0, 0.0)); -aNewPolygon.append(basegfx::B2DPoint(1.0, 0.0)); +static const basegfx::B2DPolygon aNewPolygon{basegfx::B2DPoint(0.0, 0.0), basegfx::B2DPoint(1.0, 0.0)}; aUnitPolyPolygon.setB2DPolygon(0, aNewPolygon); // #i102548# fill objectMatrix with rotation and offset (no shear for lines)
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) New commits: commit 878c2da6d2d5576d6c3266b38eae4ac80bcbe2c1 Author: Caolán McNamara AuthorDate: Mon Oct 16 11:52:11 2023 +0100 Commit: Caolán McNamara CommitDate: Mon Oct 16 17:20:28 2023 +0200 Related: tdf#157726 restore try/catch block before commit de42529ca9107b24b6367b40801300416d4a51a1 Date: Wed Sep 6 14:49:19 2023 +0200 replace svx::PropertyValueProvider with simpler implementation PropertyChangeNotifier::notifyPropertyChange had a try/catch, but afterwards SvxShape::notifyPropertyChange doesn't Change-Id: If78732bea08d0f760b3b616ad55d28d40fa50fcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158026 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 949728d4bf12..c7fb448fe575 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -264,15 +264,23 @@ void SvxShape::notifyPropertyChange(const OUString& rPropName) mpImpl->maPropertyChangeListeners.getContainer( g, OUString() ); if (pPropListeners || pAllListeners) { -// Handle/OldValue not supported -beans::PropertyChangeEvent aEvt; -aEvt.Source = static_cast(this); -aEvt.PropertyName = rPropName; -aEvt.NewValue = getPropertyValue(rPropName); -if (pPropListeners) -pPropListeners->notifyEach( g, ::XPropertyChangeListener::propertyChange, aEvt ); -if (pAllListeners) -pAllListeners->notifyEach( g, ::XPropertyChangeListener::propertyChange, aEvt ); +try +{ +// Handle/OldValue not supported +beans::PropertyChangeEvent aEvt; +aEvt.Source = static_cast(this); +aEvt.PropertyName = rPropName; +aEvt.NewValue = getPropertyValue(rPropName); +if (pPropListeners) +pPropListeners->notifyEach( g, ::XPropertyChangeListener::propertyChange, aEvt ); +if (pAllListeners) +pAllListeners->notifyEach( g, ::XPropertyChangeListener::propertyChange, aEvt ); +} +catch( const Exception& ) +{ +DBG_UNHANDLED_EXCEPTION("svx"); +} + } }
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdhdl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3d1cd490ac0366245c4b55d711611c21149a76e9 Author: Michael Weghorn AuthorDate: Thu Oct 12 18:57:57 2023 +0200 Commit: Michael Weghorn CommitDate: Thu Oct 12 21:10:06 2023 +0200 tdf#141828 svx: Use pointing hand for custom shape handles Use the *pointing* hand cursor (`PointerStyle::RefHand`) instead of the hand symbol cursor (`PointerStyle::Hand`) for handles for custom shape interaction. (S. how `SdrHdlKind::CustomShape1` is only specified in `SdrObjCustomShape::AddToHdlList`, except for read-only switch/cases elsewhere). As mentioned in tdf#141828, this has the advantage that the user can see where the handle is being moved. For gtk3, this doesn't make any difference in practice, because it's using the same cursor type for both, `PointerStyle::RefHand` and `PointerStyle::Hand` (s. `GtkSalDisplay::getCursor`, but the Qt-based VCL plugins (`QtData::getCursor`) and macOS (s. `AquaSalFrame::getCurrentCursor`) make a distinction between them. Change-Id: I5d35481e5c5edc1895a7c4a973315ee6b187b983 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157891 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index deb8da05d9d5..867534e9a08f 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1011,7 +1011,7 @@ PointerStyle SdrHdl::GetPointer() const case SdrHdlKind::Ref2 : ePtr=PointerStyle::RefHand; break; case SdrHdlKind::BezierWeight : ePtr=PointerStyle::MoveBezierWeight; break; case SdrHdlKind::Glue : ePtr=PointerStyle::MovePoint; break; -case SdrHdlKind::CustomShape1 : ePtr=PointerStyle::Hand; break; +case SdrHdlKind::CustomShape1 : ePtr=PointerStyle::RefHand; break; default: break; }
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShape3d.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit cc81d424a29dd4b421bc1775faaa51c58195fadc Author: Julien Nabet AuthorDate: Fri Oct 6 17:29:54 2023 +0200 Commit: Julien Nabet CommitDate: Sat Oct 7 09:57:31 2023 +0200 Related tdf#157532: deal "ShadeMode" for extruded custom shapes via BASIC macro Change-Id: I9ff65f58d48c2b61819533f62c42e2ab07ad4fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157655 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index e543f490ca8a..a401246277cc 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -141,7 +141,16 @@ drawing::ShadeMode GetShadeMode( const SdrCustomShapeGeometryItem& rItem, const drawing::ShadeMode eRet( eDefault ); const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "ShadeMode" ); if ( pAny ) -*pAny >>= eRet; +{ +if (!(*pAny >>= eRet)) +{ +sal_Int32 nEnum = 0; +if(*pAny >>= nEnum) +{ +eRet = static_cast(nEnum); +} +} +} return eRet; }
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShape3d.cxx | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) New commits: commit f1aa554cd0b471e0c9424ece7ab3d9b3d7723a1d Author: Julien Nabet AuthorDate: Fri Oct 6 17:19:28 2023 +0200 Commit: Julien Nabet CommitDate: Fri Oct 6 20:04:01 2023 +0200 tdf#157532: deal "ProjectionMode" for extruded custom shapes via BASIC macro I took example on SdrTextAniDirectionItem::PutValue from svx/source/svdraw/svdattr.cxx Change-Id: I9165b9a310ff6bee287e7fb817502c0c99f0747b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157654 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 468a1c66fa93..e543f490ca8a 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -332,8 +332,17 @@ rtl::Reference EnhancedCustomShape3d::Create3DObject( drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL ); const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" ); -if ( pAny ) -*pAny >>= eProjectionMode; +if (pAny) +{ +if(!(*pAny >>= eProjectionMode)) +{ +sal_Int32 nEnum = 0; +if(*pAny >>= nEnum) +{ +eProjectionMode = static_cast(nEnum); +} +} +} // pShape2d Convert in scenes which include 3D Objects E3dDefaultAttributes a3DDefaultAttr; a3DDefaultAttr.SetDefaultLatheCharacterMode( true );
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdedtv.cxx | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) New commits: commit cb5285d544a355026a38c69ccf5473956d60e4ee Author: Caolán McNamara AuthorDate: Thu Oct 5 21:23:49 2023 +0100 Commit: Caolán McNamara CommitDate: Fri Oct 6 11:45:33 2023 +0200 Related: cool#7373 set name of object before broadcasting ScDrawChanged which adding it to undo does. That way the object already has a name when the navigator looks for the new object's name, and so a drawing shape appears in the navigator when it appears in the document. Change-Id: I47fed30753bc186e462cc5be8f86d51325192da9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157607 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 88589a52271f..8c1c60bba681 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -992,12 +992,6 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser if (!pObj->IsInserted()) { rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE); } -if( IsUndoEnabled()) -{ -bool bDontDeleteReally = true; -EndTextEditCurrentView(bDontDeleteReally); -AddUndo(GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pObj)); -} css::uno::Reference xServices(GetModel().getUnoModel(), css::uno::UNO_QUERY); @@ -1010,6 +1004,13 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser GetModel().EnableUndo(bUndo); } +if( IsUndoEnabled()) +{ +bool bDontDeleteReally = true; +EndTextEditCurrentView(bDontDeleteReally); +AddUndo(GetModel().GetSdrUndoFactory().CreateUndoNewObject(*pObj)); +} + if (!(nOptions & SdrInsertFlags::DONTMARK)) { if (!(nOptions & SdrInsertFlags::ADDMARK)) UnmarkAllObj(); MarkObj(pObj,);
[Libreoffice-commits] core.git: svx/source
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 32 +++- svx/source/sidebar/possize/PosSizePropertyPanel.hxx |7 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) New commits: commit e47c1737d6f1365aa640f1960fb0c9892fde6d77 Author: Caolán McNamara AuthorDate: Tue Oct 3 14:53:17 2023 +0100 Commit: Caolán McNamara CommitDate: Tue Oct 3 21:02:01 2023 +0200 tdf#155756 sidebar properties not displaying height over 100 Change-Id: I5ea2441319e0d7c34ffdcd179d8a82738da4733f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157519 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index c89d1b0b95a6..0024a41458db 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -94,6 +94,7 @@ PosSizePropertyPanel::PosSizePropertyPanel( mlRotY(0), mePoolUnit(), meDlgUnit(FieldUnit::INCH), // #i124409# init with fallback default +mbFieldMetricOutDated(true), maTransfPosXControl(SID_ATTR_TRANSFORM_POS_X, *pBindings, *this), maTransfPosYControl(SID_ATTR_TRANSFORM_POS_Y, *pBindings, *this), maTransfWidthControl(SID_ATTR_TRANSFORM_WIDTH, *pBindings, *this), @@ -686,10 +687,13 @@ void PosSizePropertyPanel::NotifyItemUpdate( break; case SID_ATTR_METRIC: -MetricState( eState, pState ); -UpdateUIScale(); +{ +const Fraction aUIScale(mpView->GetModel().GetUIScale()); +MetricState(eState, pState, aUIScale); +UpdateUIScale(aUIScale); +mbFieldMetricOutDated = false; break; - +} default: break; } @@ -855,7 +859,7 @@ void PosSizePropertyPanel::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) PanelLayout::DumpAsPropertyTree(rJsonWriter); } -void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pState ) +void PosSizePropertyPanel::MetricState(SfxItemState eState, const SfxPoolItem* pState, const Fraction& rUIScale) { bool bPosXBlank = false; bool bPosYBlank = false; @@ -865,7 +869,8 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* // #i124409# use the given Item to get the correct UI unit and initialize it // and the Fields using it FieldUnit eDlgUnit = GetCurrentUnit(eState, pState); -if (eDlgUnit == meDlgUnit) +mbFieldMetricOutDated |= (eDlgUnit != meDlgUnit || maUIScale != rUIScale); +if (!mbFieldMetricOutDated) return; meDlgUnit = eDlgUnit; @@ -880,7 +885,8 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* SetFieldUnit( *mxMtrPosY, meDlgUnit, true ); if(bPosYBlank) mxMtrPosY->set_text(OUString()); -SetPosSizeMinMax(); + +SetPosSizeMinMax(rUIScale); if (mxMtrWidth->get_text().isEmpty()) bWidthBlank = true; @@ -1008,7 +1014,7 @@ void PosSizePropertyPanel::DisableControls() } } -void PosSizePropertyPanel::SetPosSizeMinMax() +void PosSizePropertyPanel::SetPosSizeMinMax(const Fraction& rUIScale) { SdrPageView* pPV = mpView->GetSdrPageView(); if (!pPV) @@ -1021,9 +1027,8 @@ void PosSizePropertyPanel::SetPosSizeMinMax() pPV->LogicToPagePos(aTmpRect2); maWorkArea = vcl::unotools::b2DRectangleFromRectangle(aTmpRect2); -const Fraction aUIScale(mpView->GetModel().GetUIScale()); -TransfrmHelper::ScaleRect( maWorkArea, aUIScale ); -TransfrmHelper::ScaleRect( maRect, aUIScale ); +TransfrmHelper::ScaleRect(maWorkArea, rUIScale); +TransfrmHelper::ScaleRect(maRect, rUIScale); const sal_uInt16 nDigits(mxMtrPosX->get_digits()); TransfrmHelper::ConvertRect( maWorkArea, nDigits, mePoolUnit, meDlgUnit ); @@ -1058,16 +1063,15 @@ void PosSizePropertyPanel::SetPosSizeMinMax() limitWidth(*mxMtrHeight); } -void PosSizePropertyPanel::UpdateUIScale() +void PosSizePropertyPanel::UpdateUIScale(const Fraction& rUIScale) { -const Fraction aUIScale (mpView->GetModel().GetUIScale()); -if (maUIScale == aUIScale) +if (maUIScale == rUIScale) return; // UI scale has changed. // Remember the new UI scale. -maUIScale = aUIScale; +maUIScale = rUIScale; // The content of the position and size boxes is only updated when item changes are notified. // Request such notifications without changing the actual item values. diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 42af309883b2..b57d0bcf7dde 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -128,6 +128,7 @@ private: FractionmaUIScale; MapUnit
[Libreoffice-commits] core.git: svx/source
svx/source/styles/CommonStylePreviewRenderer.cxx | 16 1 file changed, 8 insertions(+), 8 deletions(-) New commits: commit d9eed9b489d8ad208df307588595f3a8d3b7539b Author: Khaled Hosny AuthorDate: Sun Sep 24 18:10:21 2023 +0300 Commit: خالد حسني CommitDate: Sun Sep 24 18:23:47 2023 +0200 tdf#157067: Fix missing background color in style preview Set the colors after setting the font not before as otherwise they seem to get overridden. Change-Id: I258cb762fd2328369bd8adae63e94ec87c666bb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157208 Tested-by: Jenkins Reviewed-by: خالد حسني diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx index c23861e92a72..d92aac21d89c 100644 --- a/svx/source/styles/CommonStylePreviewRenderer.cxx +++ b/svx/source/styles/CommonStylePreviewRenderer.cxx @@ -335,12 +335,6 @@ bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, Rend mrOutputDev.DrawRect(aRectangle); } -if (maFontColor != COL_AUTO) -mrOutputDev.SetTextColor(maFontColor); - -if (maHighlightColor != COL_AUTO) -mrOutputDev.SetTextFillColor(maHighlightColor); - Point aFontDrawPosition = aRectangle.TopLeft(); aFontDrawPosition.AdjustY(mnBaseLine); if (eRenderAlign == RenderAlign::CENTER) @@ -376,10 +370,16 @@ bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, Rend mrOutputDev.Push(vcl::PushFlags::FONT); if (oFont) -{ mrOutputDev.SetFont(*oFont); + +if (maFontColor != COL_AUTO) +mrOutputDev.SetTextColor(maFontColor); + +if (maHighlightColor != COL_AUTO) +mrOutputDev.SetTextFillColor(maHighlightColor); + +if (oFont) oFont->QuickDrawText(, aFontDrawPosition, rText, nStart, nEnd - nStart, {}); -} else mrOutputDev.DrawText(aFontDrawPosition, rText, nStart, nEnd - nStart);
[Libreoffice-commits] core.git: svx/source
svx/source/tbxctrls/tbunocontroller.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 6182deca602d533d1b2e379ba62d890681608144 Author: Szymon Kłos AuthorDate: Sat Sep 9 22:24:07 2023 +0200 Commit: Szymon Kłos CommitDate: Mon Sep 18 18:13:41 2023 +0200 jsdialog: set WindowId for font size combobox this is required to put combobox in correct map for receiveing events from user. without that font size was not possible to be changed from notebookbar in lok Change-Id: Id688b8fc1b3f565278ae651e050d18d75a048103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156783 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157023 Tested-by: Jenkins diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index dfdb431dc504..148098c10e82 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -308,7 +309,7 @@ void SvxFontSizeBox_Impl::SetOptimalSize() SvxFontSizeBox_Impl::SvxFontSizeBox_Impl(vcl::Window* pParent, const uno::Reference& rFrame, FontHeightToolBoxControl& rCtrl) -: InterimItemWindow(pParent, "svx/ui/fontsizebox.ui", "FontSizeBox") +: InterimItemWindow(pParent, "svx/ui/fontsizebox.ui", "FontSizeBox", true, reinterpret_cast(SfxViewShell::Current())) , SvxFontSizeBox_Base(m_xBuilder->weld_combo_box("fontsizecombobox"), rFrame, rCtrl) { }
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdpage.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 17cd1dacf6a4b587b524edc7384ff26990208132 Author: Julien Nabet AuthorDate: Thu Sep 14 22:50:37 2023 +0200 Commit: Noel Grandin CommitDate: Fri Sep 15 13:45:17 2023 +0200 tdf#157174: fix crash when clicking "Print Preview" Don't call Reformat method when treating a virtual SdrObject bt: 4 0x7fd7ff446eb4 in SdrObject::GetBroadcaster() const (this=0x4) at /home/julien/lo/libreoffice/svx/source/svdraw/svdobj.cxx:698 5 0x7fd7ff48eaee in SdrEdgeObj::Reformat() (this=0x564e82ef22d0) at /home/julien/lo/libreoffice/svx/source/svdraw/svdoedge.cxx:1666 6 0x7fd7ff551bd9 in SdrObjList::ImplReformatAllEdgeObjects(SdrObjList const&) (this=0x564e82a371e0, rObjList=...) at /home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:760 7 0x7fd7ff551b38 in SdrObjList::ReformatAllEdgeObjects() (this=0x564e82a371e0) at /home/julien/lo/libreoffice/svx/source/svdraw/svdpage.cxx:744 8 0x7fd7ff3d8d1c in SdrModel::ImpReformatAllEdgeObjects() (this=0x564e7f79dc50) at /home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:752 9 0x7fd7ff3dda3b in SdrModel::setLock(bool) (this=0x564e7f79dc50, bLock=false) at /home/julien/lo/libreoffice/svx/source/svdraw/svdmodel.cxx:1618 10 0x7fd7c58a9a76 in SwView::~SwView() (this=0x564e82e7bb00) at /home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1163 11 0x7fd7c58a9f99 in SwView::~SwView() (this=0x564e82e7bb00) at /home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1122 12 0x7fd801835308 in SfxViewFrame::SwitchToViewShell_Impl(unsigned short, bool) (this=0x564e82b17680, nViewIdOrNo=1, bIsIndex=true) at /home/julien/lo/libreoffice/sfx2/source/view/viewfrm.cxx:2528 See complete bt here: https://bugs.documentfoundation.org/attachment.cgi?id=189470 Change-Id: I4de5127686c01a40c1666f6089efa4fe7a114cd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156934 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 840d9d6cc0e7..8570a2157295 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -754,7 +754,9 @@ void SdrObjList::ImplReformatAllEdgeObjects(const SdrObjList& rObjList) const bool bIsGroup(nullptr != pChildren); if(!bIsGroup) { -if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge) +// Check IsVirtualObj because sometimes we get SwDrawVirtObj here +if (pSdrObject->GetObjIdentifier() == SdrObjKind::Edge + && !pSdrObject->IsVirtualObj()) { SdrEdgeObj* pSdrEdgeObj = static_cast< SdrEdgeObj* >(pSdrObject); pSdrEdgeObj->Reformat();
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 819dec3533750a3a8f483351febe40aae85ca0b7 Author: Noel Grandin AuthorDate: Mon Sep 11 10:29:50 2023 +0200 Commit: Noel Grandin CommitDate: Mon Sep 11 11:49:24 2023 +0200 tdf#157173 Enlarging Fontwork shape replaces used font regression from commit b153d147c9d813f78dd551fc186c261f52c929a1 Author: Noel Grandin Date: Wed Apr 28 15:27:14 2021 +0200 remove support for BITMASK in vcl backends So the code that I removed had if (meFormat == DeviceFormat::BITMASK) SetAntialiasing( AntialiasingFlags::DisableText ); in the VirtualDevice::ImplInitVirDev method. Possibly we will need to make similar fixes in other places that used BITMASK, but this looks like the only spot that really needs it. No idea exactly how this line of code relates to the observed bug though. Change-Id: I858f15cf70a452568128d5b365d9a11f7062 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156815 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index d40d22e987c9..7d7ee4fdbc81 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -230,6 +230,7 @@ static void CalculateHorizontalScalingFactor( ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::WITHOUT_ALPHA); pVirDev->SetMapMode(MapMode(MapUnit::Map100thMM)); pVirDev->SetFont( aFont ); +pVirDev->SetAntialiasing( AntialiasingFlags::DisableText ); if ( nOutlinesCount2d & 1 ) bSingleLineMode = true; @@ -343,6 +344,8 @@ static void GetTextAreaOutline( ScopedVclPtrInstance< VirtualDevice > pVirDev(DeviceFormat::WITHOUT_ALPHA); pVirDev->SetMapMode(MapMode(MapUnit::Map100thMM)); pVirDev->SetFont( aFont ); +pVirDev->SetAntialiasing( AntialiasingFlags::DisableText ); + pVirDev->EnableRTL(); if ( rParagraph.nFrameDirection == SvxFrameDirection::Horizontal_RL_TB ) pVirDev->SetLayoutMode( vcl::text::ComplexTextLayoutFlags::BiDiRtl );
[Libreoffice-commits] core.git: svx/source
svx/source/inc/GraphCtlAccessibleContext.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 0db4cad99ff3746cc39f106a32bf2642628e336b Author: Noel Grandin AuthorDate: Sun Sep 10 12:11:58 2023 +0200 Commit: Noel Grandin CommitDate: Sun Sep 10 18:02:49 2023 +0200 SvxGraphCtrlAccessibleContext does not need to implement XAggreggation Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference const &) final { assert(false); } Change-Id: I4735bb086df297baff3b066a69e817e365007ba5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156791 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index 094d9bd18ba5..3e328e9f89a3 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -21,7 +21,7 @@ #ifndef INCLUDED_SVX_SOURCE_INC_GRAPHCTLACCESSIBLECONTEXT_HXX #define INCLUDED_SVX_SOURCE_INC_GRAPHCTLACCESSIBLECONTEXT_HXX -#include +#include #include #include #include @@ -57,7 +57,7 @@ class SdrView; AccessibleContext service. */ -typedef ::cppu::WeakAggComponentImplHelper7< +typedef ::cppu::WeakComponentImplHelper< css::accessibility::XAccessible, css::accessibility::XAccessibleComponent, css::accessibility::XAccessibleContext,
[Libreoffice-commits] core.git: svx/source
svx/source/table/tablecolumns.hxx |4 ++-- svx/source/table/tablerows.hxx|4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit b7431e530145c543604cf02808e439feca034333 Author: Noel Grandin AuthorDate: Fri Sep 8 14:59:50 2023 +0200 Commit: Noel Grandin CommitDate: Sat Sep 9 13:35:49 2023 +0200 TableColumns does not need to implement XAggreggation Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference const &) final { assert(false); } Change-Id: I650ef48d993450650bfe466ca9d4a9ab32b4493d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156724 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/svx/source/table/tablecolumns.hxx b/svx/source/table/tablecolumns.hxx index 2371ef1ba1b1..1a194033aa8f 100644 --- a/svx/source/table/tablecolumns.hxx +++ b/svx/source/table/tablecolumns.hxx @@ -21,14 +21,14 @@ #define INCLUDED_SVX_SOURCE_TABLE_TABLECOLUMNS_HXX #include -#include +#include #include namespace sdr::table { -class TableColumns : public ::cppu::WeakAggImplHelper1< css::table::XTableColumns > +class TableColumns : public ::cppu::WeakImplHelper< css::table::XTableColumns > { public: explicit TableColumns( TableModelRef xTableModel ); diff --git a/svx/source/table/tablerows.hxx b/svx/source/table/tablerows.hxx index 3141a7aac2c1..ea2cc892186e 100644 --- a/svx/source/table/tablerows.hxx +++ b/svx/source/table/tablerows.hxx @@ -21,13 +21,13 @@ #define INCLUDED_SVX_SOURCE_TABLE_TABLEROWS_HXX #include -#include +#include #include namespace sdr::table { -class TableRows : public ::cppu::WeakAggImplHelper1 +class TableRows : public ::cppu::WeakImplHelper { public: explicit TableRows(TableModelRef xTableModel);
[Libreoffice-commits] core.git: svx/source
svx/source/unogallery/unogalitem.cxx | 14 -- svx/source/unogallery/unogalitem.hxx | 11 --- 2 files changed, 8 insertions(+), 17 deletions(-) New commits: commit 4b814e8db4ce5f233c4bea041f90b6893084ede0 Author: Noel Grandin AuthorDate: Thu Sep 7 09:34:52 2023 +0200 Commit: Noel Grandin CommitDate: Thu Sep 7 18:41:46 2023 +0200 GalleryItem does not need to implement XAggreggation Checked on jenkins using 'make check' and +void SAL_CALL setDelegator(css::uno::Reference const &) final { assert(false); } + Change-Id: I136a7b51ba7d5500876dcd8892f1165334daa15f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156643 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index c08e182a46aa..5e72a25c0a28 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -70,7 +70,7 @@ bool GalleryItem::isValid() const } -uno::Any SAL_CALL GalleryItem::queryAggregation( const uno::Type & rType ) +uno::Any SAL_CALL GalleryItem::queryInterface( const uno::Type & rType ) { uno::Any aAny; @@ -87,29 +87,23 @@ uno::Any SAL_CALL GalleryItem::queryAggregation( const uno::Type & rType ) else if( rType == cppu::UnoType::get()) aAny <<= uno::Reference< beans::XMultiPropertySet >(this); else -aAny = OWeakAggObject::queryAggregation( rType ); +aAny = OWeakObject::queryInterface( rType ); return aAny; } -uno::Any SAL_CALL GalleryItem::queryInterface( const uno::Type & rType ) -{ -return OWeakAggObject::queryInterface( rType ); -} - - void SAL_CALL GalleryItem::acquire() noexcept { -OWeakAggObject::acquire(); +OWeakObject::acquire(); } void SAL_CALL GalleryItem::release() noexcept { -OWeakAggObject::release(); +OWeakObject::release(); } diff --git a/svx/source/unogallery/unogalitem.hxx b/svx/source/unogallery/unogalitem.hxx index 42bc0ba603cf..5674739a8aa7 100644 --- a/svx/source/unogallery/unogalitem.hxx +++ b/svx/source/unogallery/unogalitem.hxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include class GalleryTheme; struct GalleryObject; @@ -34,12 +34,10 @@ namespace unogallery { class GalleryTheme; } namespace unogallery { +typedef ::comphelper::WeakComponentImplHelper GalleryItem_Base; -class GalleryItem final : public ::cppu::OWeakAggObject, -public css::lang::XServiceInfo, -public css::lang::XTypeProvider, -public css::gallery::XGalleryItem, -public ::comphelper::PropertySetHelper +class GalleryItem final : public GalleryItem_Base, + public ::comphelper::PropertySetHelper { friend class ::unogallery::GalleryTheme; @@ -53,7 +51,6 @@ public: private: // XInterface -virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override; virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; virtual void SAL_CALL acquire() noexcept override; virtual void SAL_CALL release() noexcept override;
[Libreoffice-commits] core.git: svx/source
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 300dc54b0424add2dbab5443dcbd46ba12f418fc Author: Sarper Akdemir AuthorDate: Tue Sep 5 17:41:42 2023 +0300 Commit: Sarper Akdemir CommitDate: Tue Sep 5 22:05:16 2023 +0200 related tdf#150557: fix unified transparence initialization with alpha In 98319164284c4a25d6a2313e6b8a35d244d94e91, shadow alpha was passed in to UnifiedTransparencePrimitive2D instead of shadow transparence mistakenly. Fix that and pass shadow transparence instead. Change-Id: Idabedade5d753961648683869cb077de0e4523eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156573 Tested-by: Jenkins Reviewed-by: Sarper Akdemir diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 33e42efc6d23..50f66391d95e 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -856,10 +856,8 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const if (rShadow.getTransparence() != 0.0) { Primitive2DContainer aTempContent{ aRetval.back() }; - -double fShadowAlpha = 1.0 - rShadow.getTransparence(); aRetval.back() = Primitive2DReference(new UnifiedTransparencePrimitive2D( -std::move(aTempContent), fShadowAlpha)); +std::move(aTempContent), rShadow.getTransparence())); } }
[Libreoffice-commits] core.git: svx/source
svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit b5effb66ee1563689c27ff10b682357120ab7786 Author: Samuel Mehrbrodt AuthorDate: Mon Sep 4 11:52:08 2023 +0200 Commit: Samuel Mehrbrodt CommitDate: Mon Sep 4 13:29:08 2023 +0200 tdf#151188 Select correct fill type in sidebar Change-Id: Ic123e6b21009cc57bf1c4b5f4edc6dcd277bae0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156510 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 3659110f16db..9adff2c65dfd 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -1066,10 +1066,14 @@ void AreaPropertyPanelBase::updateFillUseBackground(bool bDisabled, bool bDefaul if (pState) { const XFillUseSlideBackgroundItem* pItem = static_cast(pState); -// When XFillUseSlideBackgroundItem is true, select "Use Background Fill". When false, select "None" +// When XFillUseSlideBackgroundItem is set, select "Use Background Fill". +// When false, select "None" (only if "Use background fill" was selected beforehand) int nPos = pItem->GetValue() ? USE_BACKGROUND : NONE; -mxLbFillType->set_active(nPos); -FillStyleChanged(false); +if ((nPos == NONE && mxLbFillType->get_active() == USE_BACKGROUND) || nPos == USE_BACKGROUND) +{ +mxLbFillType->set_active(nPos); +FillStyleChanged(false); +} } } }
[Libreoffice-commits] core.git: svx/source
svx/source/tbxctrls/Palette.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 2ee60cb3535937eb85b808977a020b55a7123a92 Author: Julien Nabet AuthorDate: Fri Sep 1 15:56:01 2023 +0200 Commit: Julien Nabet CommitDate: Sat Sep 2 08:59:35 2023 +0200 tdf#156126: fix crash when using gpl color palette keep the do/while instead of a plain while since: 1) you'll always got a empty line since aLine isn't initialized 2) some palette may contain empty line eg: "Office 2016" palette from https://extensions.libreoffice.org/en/extensions/show/o2k10-color-palette Change-Id: I2874261b8dd13ce180ed05628b11bd3efce6720c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156421 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx index 8c81eb53167e..b3f1965de31b 100644 --- a/svx/source/tbxctrls/Palette.cxx +++ b/svx/source/tbxctrls/Palette.cxx @@ -262,6 +262,9 @@ void PaletteGPL::LoadPalette() OStringBuffer aLine; do { +if (aLine.isEmpty()) +continue; + if (aLine[0] != '#' && aLine[0] != '\n') { // TODO check if r,g,b are 0<= x <=255, or just clamp?
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5f89cf39c8c6228e3580aa94db4978825ea1fba2 Author: Noel Grandin AuthorDate: Thu Aug 31 14:49:17 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 17:45:07 2023 +0200 improve debug warning message Change-Id: I72f5966a6c144a40d81e479c3d8d27d345064993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156342 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 362c0ba149a6..6bd355391301 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1876,7 +1876,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet const & aSet, const SfxItemProperty } else { -OSL_FAIL("SvxShape::GetAnyForItem() Returnvalue has wrong Type!" ); +SAL_WARN("svx", "SvxShape::GetAnyForItem() Return value has wrong Type, " << pMap->aType << " != " << aAny.getValueType()); } }
[Libreoffice-commits] core.git: svx/source
svx/source/unodraw/unoshape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6baacabbb74171287d449f23cb70bd2523b18039 Author: Noel Grandin AuthorDate: Thu Aug 31 14:16:05 2023 +0200 Commit: Noel Grandin CommitDate: Thu Aug 31 15:39:28 2023 +0200 ignore UnknownPropertyException in SvxShape::setPropertyValues which greatly reduces the log noise when debugging Change-Id: I556fb79c04b23f757b92ed635233d5222c177df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156338 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e3663d024f5e..362c0ba149a6 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1709,7 +1709,7 @@ void SAL_CALL SvxShape::setPropertyValues( const css::uno::Sequence< OUString >& } catch (beans::UnknownPropertyException&) { -DBG_UNHANDLED_EXCEPTION("svx"); +// ignore, various code likes to opportunisticly set properties on objects that don't support those properties } catch (uno::Exception&) {
[Libreoffice-commits] core.git: svx/source
svx/source/theme/ThemeColorChangerCommon.cxx | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 60880c9a7634468a852d4b0bf2d7a69d41ac7d11 Author: Caolán McNamara AuthorDate: Thu Aug 31 09:03:31 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Aug 31 15:23:18 2023 +0200 cid#1542447 Explicit null dereferenced Change-Id: I1de10a8a459175f79bb2b8f796cde287be1945c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156326 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index 5629036f9a68..44f041f5f3b0 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -48,16 +48,16 @@ const SvxColorItem* getColorItem(const editeng::Section& rSection) return nullptr; } -bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView* pView) +bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObject, SdrView& rView) { SdrTextObj* pTextObject = DynCastSdrTextObj(pObject); if (!pTextObject) return false; -pView->SdrBeginTextEdit(pTextObject); +rView.SdrBeginTextEdit(pTextObject); -auto* pOutlinerView = pView->GetTextEditOutlinerView(); +auto* pOutlinerView = rView.GetTextEditOutlinerView(); if (!pOutlinerView) return false; @@ -96,7 +96,7 @@ bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObj } } -pView->SdrEndTextEdit(); +rView.SdrEndTextEdit(); return true; } @@ -165,7 +165,8 @@ void updateSdrObject(model::ColorSet const& rColorSet, SdrObject* pObject, SdrVi if (!pObject) return; -updateEditEngTextSections(rColorSet, pObject, pView); +if (pView) +updateEditEngTextSections(rColorSet, pObject, *pView); updateObjectAttributes(rColorSet, *pObject, pUndoManager); }
[Libreoffice-commits] core.git: svx/source
svx/source/accessibility/AccessibleControlShape.cxx | 44 +++- 1 file changed, 16 insertions(+), 28 deletions(-) New commits: commit aa3eea21fcf302ef4ddbba5841037378945f9d5e Author: Arnaud VERSINI AuthorDate: Sun Aug 27 18:44:21 2023 +0200 Commit: Noel Grandin CommitDate: Sun Aug 27 20:46:23 2023 +0200 svx : replace local function with OUStringLiteral Change-Id: Ica39cd5b6da3c97dd03aa9844e2dd8d99c279697 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156170 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 8fe42db6dada..e625beaec508 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -61,29 +61,18 @@ using namespace ::com::sun::star::container; namespace { -OUString lcl_getNamePropertyName( ) -{ -return "Name"; -} -OUString lcl_getDescPropertyName( ) -{ -return "HelpText"; -} -OUString lcl_getLabelPropertyName( ) -{ -return "Label"; -} -OUString lcl_getLabelControlPropertyName( ) -{ -return "LabelControl"; -} +constexpr OUStringLiteral NAME_PROPERTY_NAME = u"Name"; +constexpr OUStringLiteral DESC_PROPERTY_NAME = u"HelpText"; +constexpr OUStringLiteral LABEL_PROPERTY_NAME = u"Label"; +constexpr OUStringLiteral LABEL_CONTROL_PROPERTY_NAME = u"LabelControl"; + // return the property which should be used as AccessibleName OUString lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI ) { -if ( _rxPSI.is() && _rxPSI->hasPropertyByName( lcl_getLabelPropertyName() ) ) -return lcl_getLabelPropertyName(); +if ( _rxPSI.is() && _rxPSI->hasPropertyByName( LABEL_PROPERTY_NAME ) ) +return LABEL_PROPERTY_NAME; else -return lcl_getNamePropertyName(); +return NAME_PROPERTY_NAME; } // determines whether or not a state which belongs to the inner context needs to be forwarded to the "composed" @@ -325,7 +314,7 @@ OUString case DRAWING_CONTROL: { // check if we can obtain the "Desc" property from the model -OUString sDesc( getControlModelStringProperty( lcl_getDescPropertyName() ) ); +OUString sDesc( getControlModelStringProperty( DESC_PROPERTY_NAME ) ); if ( sDesc.isEmpty() ) { // no -> use the default aDG.Initialize (STR_ObjNameSingulUno); @@ -333,7 +322,7 @@ OUString aDG.AddProperty ( "ControlBorder", DescriptionGenerator::PropertyType::Integer); } // ensure that we are listening to the Name property -m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, true, lcl_getDescPropertyName() ); +m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, true, DESC_PROPERTY_NAME ); } break; @@ -357,14 +346,14 @@ void SAL_CALL AccessibleControlShape::propertyChange( const PropertyChangeEvent& ::osl::MutexGuard aGuard( m_aMutex ); // check if it is the name or the description -if ( _rEvent.PropertyName == lcl_getNamePropertyName() -|| _rEvent.PropertyName == lcl_getLabelPropertyName() ) +if ( _rEvent.PropertyName == NAME_PROPERTY_NAME +|| _rEvent.PropertyName == LABEL_PROPERTY_NAME ) { SetAccessibleName( CreateAccessibleName(), AccessibleContextBase::AutomaticallyCreated); } -else if ( _rEvent.PropertyName == lcl_getDescPropertyName() ) +else if ( _rEvent.PropertyName == DESC_PROPERTY_NAME ) { SetAccessibleDescription( CreateAccessibleDescription(), @@ -612,7 +601,7 @@ void SAL_CALL AccessibleControlShape::disposing() { // ensure we're not listening m_bListeningForName = ensureListeningState( m_bListeningForName, false, lcl_getPreferredAccNameProperty( m_xModelPropsMeta ) ); -m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, false, lcl_getDescPropertyName() ); +m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, false, DESC_PROPERTY_NAME ); if ( m_bMultiplexingStates ) stopStateMultiplexing( ); @@ -843,12 +832,11 @@ AccessibleControlShape* AccessibleControlShape::GetLabeledByControlShape( ) { if(m_xControlModel.is()) { -const OUString& rAccLabelControlProperty = lcl_getLabelControlPropertyName(); Any sCtlLabelBy; // get the "label by" property value of the control -if (::comphelper::hasProperty(rAccLabelControlProperty, m_xControlModel)) +if (::comphelper::hasProperty(LABEL_CONTROL_PROPERTY_NAME, m_xControlModel)) { -sCtlLabelBy =
[Libreoffice-commits] core.git: svx/source
svx/source/theme/ThemeColorChangerCommon.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 0f1eeebfcb6177073ce15ec4a357ab80d6955870 Author: Andrea Gelmini AuthorDate: Fri Aug 25 18:51:07 2023 +0200 Commit: Julien Nabet CommitDate: Sat Aug 26 11:20:34 2023 +0200 Remove duplicated include Change-Id: Ife90baef2ceff442f51c03805eda945b2b2baf34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156118 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index 29d65cdda960..5629036f9a68 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -30,7 +30,6 @@ #include #include -#include using namespace css;
[Libreoffice-commits] core.git: svx/source
svx/source/sdr/contact/viewobjectcontact.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9679bc5f24a8965341840c458ba69479585815f7 Author: Andrea Gelmini AuthorDate: Thu Aug 24 17:14:49 2023 +0200 Commit: Julien Nabet CommitDate: Thu Aug 24 22:13:53 2023 +0200 Fix typo Change-Id: I9d1b0bbd99caa53515b8d8bf7d86723cd51aca6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156059 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 450b8215482e..8482187f959b 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -584,7 +584,7 @@ const basegfx::B2DVector& ViewObjectContact::getGridOffset() const // calculation have changed. E.g. - I saw errors with +/-5740, that // was in the environment of massive external UNO API using LO as // target. -// If condtions for this calculation change, it is usually required to call +// If conditions for this calculation change, it is usually required to call // - ViewObjectContact::resetGridOffset(), or // - ObjectContact::resetAllGridOffsets() or // - ScDrawView::resetGridOffsetsForAllSdrPageViews()
[Libreoffice-commits] core.git: svx/source
svx/source/sdr/contact/viewobjectcontact.cxx | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) New commits: commit 382dfb3e6ee73fc94a556e37d261e8219e08826c Author: Armin Le Grand (allotropia) AuthorDate: Wed Aug 23 16:55:07 2023 +0200 Commit: Armin Le Grand CommitDate: Thu Aug 24 12:34:24 2023 +0200 Reset buffered GridOffset(s) for suspicious values Huge offsets of GridOffset(s) are a hint for error -> usually the conditions for calculation have changed. E.g. - I saw errors with +/-5740, that was in the environment of massive external UNO API using LO as target. If condtions for this calculation change, it is usually required to call - ViewObjectContact::resetGridOffset(), or - ObjectContact::resetAllGridOffsets() or - ScDrawView::resetGridOffsetsForAllSdrPageViews() as it is done e.g. when zoom changes (see ScDrawView::RecalcScale()). Theoretically these resets have to be done for any precondition changed that is used in the calculation of that value (see ScDrawView::calculateGridOffsetForSdrObject). This is not complete and would be hard to do so. Since it is just a buffered value and re-calculation is not expensive (linear O(n)) we can just reset suspicious values here what fixes the problem. Hopefully - when that non-linear ViewTransformation problem for the calc-view gets solved one day - all this can be removed again. For now, let's just reset here and force re-calculation. Added a SAL_WARN to inform about this, too. Change-Id: I09137f7703fd00c2351a288a40bf87a2691ba6e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155983 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 91ee66dff1ae..450b8215482e 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -576,10 +576,39 @@ void ViewObjectContact::getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplay // (->View) that has then all needed information const basegfx::B2DVector& ViewObjectContact::getGridOffset() const { -if(0.0 == maGridOffset.getX() && 0.0 == maGridOffset.getY() && GetObjectContact().supportsGridOffsets()) +if (GetObjectContact().supportsGridOffsets()) { -// create on-demand - GetObjectContact().calculateGridOffsetForViewOjectContact(const_cast(this)->maGridOffset, *this); +if (fabs(maGridOffset.getX()) > 1000.0) +{ +// Huge offsets are a hint for error -> usually the conditions for +// calculation have changed. E.g. - I saw errors with +/-5740, that +// was in the environment of massive external UNO API using LO as +// target. +// If condtions for this calculation change, it is usually required to call +// - ViewObjectContact::resetGridOffset(), or +// - ObjectContact::resetAllGridOffsets() or +// - ScDrawView::resetGridOffsetsForAllSdrPageViews() +// as it is done e.g. when zoom changes (see ScDrawView::RecalcScale()). +// Theoretically these resets have to be done for any precondition +// changed that is used in the calculation of that value (see +// ScDrawView::calculateGridOffsetForSdrObject). +// This is not complete and would be hard to do so. +// Since it is just a buffered value and re-calculation is not +// expensive (linear O(n)) we can just reset suspicious values here. +// Hopefully - when that non-linear ViewTransformation problem for +// the calc-view gets solved one day - all this can be removed +// again. For now, let's just reset here and force re-calculation. +// Add a SAL_WARN to inform about this. +SAL_WARN("svx", "Suspicious GridOffset value resetted (!)"); +const_cast(this)->maGridOffset.setX(0.0); +const_cast(this)->maGridOffset.setY(0.0); +} + +if(0.0 == maGridOffset.getX() && 0.0 == maGridOffset.getY() && GetObjectContact().supportsGridOffsets()) +{ +// create on-demand + GetObjectContact().calculateGridOffsetForViewOjectContact(const_cast(this)->maGridOffset, *this); +} } return maGridOffset;
[Libreoffice-commits] core.git: svx/source
svx/source/form/navigatortree.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit f6e8e1799315fd9494db514d969c24cf0ca46753 Author: Caolán McNamara AuthorDate: Wed Aug 23 16:50:40 2023 +0100 Commit: Caolán McNamara CommitDate: Wed Aug 23 21:08:43 2023 +0200 crashreporting: crash seen in FormNavigator set_text(rVclIter.iter, rText, col); ... m_xTreeView->set_text(*xEntry, pNameChangedHint->GetNewName()); ... m_pNavModel->Broadcast( aNameChangedHint ); Change-Id: I31275dd37de0146eae2ebb0931a5450e34fd21fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155985 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index bf860ce7198d..8ee866edb8d3 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -579,7 +579,8 @@ namespace svxform else if( auto pNameChangedHint = dynamic_cast() ) { std::unique_ptr xEntry = FindEntry(pNameChangedHint->GetEntryData()); -m_xTreeView->set_text(*xEntry, pNameChangedHint->GetNewName()); +if (xEntry) +m_xTreeView->set_text(*xEntry, pNameChangedHint->GetNewName()); } else if( dynamic_cast() ) {
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdotextdecomposition.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 12a754e7bc94e96ac3e8ddb9e62454e7192bd62d Author: Andrea Gelmini AuthorDate: Wed Aug 23 15:14:01 2023 +0200 Commit: Julien Nabet CommitDate: Wed Aug 23 15:48:23 2023 +0200 Fix typo Change-Id: Iaa9fbb1545a2dbe373ba0f71eaf10fe067888ab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155982 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 6a1a54f2321e..cfe4c1b3c3f0 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -322,7 +322,7 @@ namespace drawinglayer::primitive2d::Primitive2DContainer aContainer; aContainer.swap(maTextPortionPrimitives); -// Take any decoration for the whole formatted portion and keep it to get continous over/under/strike-through +// Take any decoration for the whole formatted portion and keep it to get continuous over/under/strike-through if (pNewPrimitive->getPrimitive2DID() == PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D) { const drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D* pTCPP =
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdotextdecomposition.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit 8ec43f37a7a5babe9227a5ca1ea84720fc2e15e5 Author: Caolán McNamara AuthorDate: Mon Aug 21 11:41:26 2023 +0100 Commit: Caolán McNamara CommitDate: Mon Aug 21 14:12:42 2023 +0200 spellchecking wave doesn't extend to the full width of superscript text or subscript, e.g. enter tmalltmalltmalltmalltmalltmalltmall in impress, format character, position, superscript, ok and without this change the wave extends only 80% of the width of the misspelt text Change-Id: I5d3ad61541152199809c950349533ca3fa7ed1c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155890 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 5d7c51208154..66c97d29b9b1 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -168,11 +168,9 @@ namespace // look for proportional font scaling, if necessary, scale accordingly sal_Int8 nPropr(rInfo.mrFont.GetPropr()); -if(100 != nPropr) -{ -const double fFactor(rInfo.mrFont.GetPropr() / 100.0); -aNewTransform.scale(fFactor, fFactor); -} +const double fPropFontFactor(nPropr / 100.0); +if (100 != nPropr) +aNewTransform.scale(fPropFontFactor, fPropFontFactor); // apply font rotate if(rInfo.mrFont.GetOrientation()) @@ -439,7 +437,7 @@ namespace // need to take FontScaling out of values; it's already part of // aNewTransform and would be double applied -const double fFontScaleX(aFontScaling.getX()); +const double fFontScaleX(aFontScaling.getX() * fPropFontFactor); if(!basegfx::fTools::equal(fFontScaleX, 1.0) && !basegfx::fTools::equalZero(fFontScaleX))
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/docrecovery.cxx |4 ++-- svx/source/inc/docrecovery.hxx|2 +- svx/source/unodraw/recoveryui.cxx |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 47cff47966ea2876765bdfb2dfb83eaeb1db1e1a Author: Justin Luth AuthorDate: Thu Aug 10 09:33:26 2023 -0400 Commit: Justin Luth CommitDate: Fri Aug 11 00:11:35 2023 +0200 autorecovery: DLG_RET_OK_AUTOLUNCH => DLG_RET_OK_AUTOLAUNCH Change-Id: I3f1436fa1b8ff5b34c65b103b0dd26dffc0e558d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155566 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index f77418227c78..1e40115270bb 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -607,9 +607,9 @@ IMPL_LINK_NOARG(SaveDialog, OKButtonHdl, weld::Button&, void) xProgress.reset(); // if "CANCEL" => return "CANCEL" -// if "OK" => "AUTOLUNCH" always ! +// if "OK" => request a restart always! if (nResult == DLG_RET_OK) -nResult = DLG_RET_OK_AUTOLUNCH; +nResult = DLG_RET_OK_AUTOLAUNCH; m_xDialog->response(nResult); } diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index 9660f20bef3a..16b8917ee552 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -64,7 +64,7 @@ inline constexpr OUStringLiteral STATEPROP_MODULE = u"Module"; #define DLG_RET_UNKNOWN -1 #define DLG_RET_OK RET_OK #define DLG_RET_CANCEL RET_CANCEL -#define DLG_RET_OK_AUTOLUNCH101 +#define DLG_RET_OK_AUTOLAUNCH 101 // request a restart enum class EDocStates diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 010d901f5dc3..a8e2e9395417 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -256,7 +256,7 @@ bool RecoveryUI::impl_doEmergencySave() // start the dialog short nRet = xDialog->run(); -return (nRet==DLG_RET_OK_AUTOLUNCH); +return (nRet==DLG_RET_OK_AUTOLAUNCH); } bool RecoveryUI::impl_doRecovery()
[Libreoffice-commits] core.git: svx/source
svx/source/tbxctrls/tbxcolorupdate.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f69a98d1175720db3b1ce5f5ae2c7fc0fc35a2b2 Author: Noel Grandin AuthorDate: Mon Aug 7 14:18:16 2023 +0200 Commit: Noel Grandin CommitDate: Mon Aug 7 15:49:24 2023 +0200 tdf#156629 Font,highlighting color buttons in sidebar have white background... ..after transparency -> alpha change regression from commit 81994cb2b8b32453a92bcb011830fcb884f22ff3 Author: Noel Grandin Date: Fri Apr 16 20:33:10 2021 +0200 Convert internal vcl bitmap formats transparency->alpha (II) Change-Id: Id1a578fcd30a9315fd5910ccdbff5d759cba77fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155425 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index edd835736268..970fa40181af 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -213,7 +213,7 @@ namespace svx return; ScopedVclPtr pVirDev(CreateVirtualDevice()); -pVirDev->SetOutputSizePixel(aItemSize); +pVirDev->SetOutputSizePixel(aItemSize, /*bErase*/true, /*bAlphaMaskTransparent*/true); maBmpSize = aItemSize; std::unique_ptr xMetaFile;
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/docrecovery.cxx | 22 +- svx/source/inc/docrecovery.hxx|2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) New commits: commit 6444f5e2c5c8b3d1fac12755af09339083c74055 Author: Justin Luth AuthorDate: Sat Aug 5 16:42:23 2023 -0400 Commit: Justin Luth CommitDate: Sun Aug 6 03:58:21 2023 +0200 tdf#145606 autorecover: skip "Finish" button if all recovered OK. Change-Id: I59036b98b33d85305b13430113a3a3d399dea27d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155379 Reviewed-by: Justin Luth Tested-by: Jenkins diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 6675a05c64ea..f77418227c78 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -737,6 +737,21 @@ RecoveryDialog::~RecoveryDialog() xComp->dispose(); } +bool RecoveryDialog::allSuccessfullyRecovered() +{ +const int c = m_xFileListLB->n_children(); +for (int i = 0; i < c; ++i) +{ +TURLInfo* pInfo = weld::fromId(m_xFileListLB->get_id(i)); +if (!pInfo) +continue; + +if (pInfo->RecoveryState != E_SUCCESSFULLY_RECOVERED) +return false; +} +return true; +} + short RecoveryDialog::execute() { ::SolarMutexGuard aSolarLock; @@ -761,7 +776,12 @@ short RecoveryDialog::execute() Application::Yield(); m_pCore->setUpdateListener(nullptr); -m_eRecoveryState = RecoveryDialog::E_RECOVERY_CORE_DONE; + +// Skip FINISH button if everything was successfully recovered +if (allSuccessfullyRecovered()) +m_eRecoveryState = RecoveryDialog::E_RECOVERY_DONE; +else +m_eRecoveryState = RecoveryDialog::E_RECOVERY_CORE_DONE; return execute(); } diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index d7442d2c7ab1..9660f20bef3a 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -438,6 +438,8 @@ class RecoveryDialog final : public weld::GenericDialogController virtual void stepNext(TURLInfo* pItem) override; virtual void end() override; +bool allSuccessfullyRecovered(); + short execute(); // helper