core.git: Branch 'distro/collabora/co-24.04' - svx/source
svx/source/sdr/properties/pageproperties.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 709b56249f8544b0b246ceebffc628ba77753dc9 Author: Mike Kaganski AuthorDate: Fri May 31 11:58:53 2024 +0500 Commit: Miklos Vajna CommitDate: Fri May 31 16:57:19 2024 +0200 tdf#161354: drop incorrect assertion Change-Id: I49eb5c52ef843f4615f1cf1549cd59c365e5ce1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168277 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit be2638603b85974cc452e3d453f4adb9d9f5d97f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168207 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx index 011ab2192d70..79129497efdd 100644 --- a/svx/source/sdr/properties/pageproperties.cxx +++ b/svx/source/sdr/properties/pageproperties.cxx @@ -99,7 +99,7 @@ namespace sdr::properties void PageProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/) { -assert(!"PageProperties::SetObjectItemSet() should never be called"); +// This can be called e.g. when positioning the slide using dialog in Notes view } } // end of namespace
core.git: Branch 'distro/collabora/co-24.04' - svx/source
svx/source/svdraw/svdedxv.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 5c4e77c839988838ead659b9986da8dfebfcf7e0 Author: Pranam Lashkari AuthorDate: Mon Mar 11 21:03:30 2024 +0530 Commit: Caolán McNamara CommitDate: Mon Mar 11 21:48:48 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/+/164663 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 0efdd449e00e..4afe96b4c657 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2426,7 +2426,10 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) Outliner* pTEOutliner = mpTextEditOutlinerView->GetOutliner(); if (pTEOutliner && pTEOutliner->IsModified()) +{ GetModel().SetChanged(); +SetInnerTextAreaForLOKit(); +} ImpMakeTextCursorAreaVisible(); }
core.git: Branch 'distro/collabora/co-24.04' - svx/source
svx/source/svdraw/svdmrkv.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 663d61986cb529644fbc2385638e95b77b41d245 Author: Pranam Lashkari AuthorDate: Mon Mar 11 19:19:01 2024 +0530 Commit: Caolán McNamara CommitDate: Mon Mar 11 20:42:20 2024 +0100 LOK: don't send empty callback for LOK LOK_CALLBACK_SHAPE_INNER_TEXT Change-Id: Id0a3a84fcadc1ab216b856760fd168b23bed2827 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164660 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 477fb573d722..38e13d8e3857 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -817,8 +817,9 @@ void SdrMarkView::SetInnerTextAreaForLOKit() const if (!comphelper::LibreOfficeKit::isActive()) return; SfxViewShell* pViewShell = GetSfxViewShell(); -if (pViewShell) -pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_SHAPE_INNER_TEXT, CreateInnerTextRectString()); +OString sRectString = CreateInnerTextRectString(); +if (pViewShell && !sRectString.isEmpty()) +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_SHAPE_INNER_TEXT, sRectString); } void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const SfxViewShell* pOtherShell)
core.git: Branch 'distro/collabora/co-24.04' - svx/source
svx/source/svdraw/svdmrkv.cxx | 52 +- 1 file changed, 51 insertions(+), 1 deletion(-) New commits: commit b203c6561a9bc5830f1d3faa74358a9484331918 Author: Pranam Lashkari AuthorDate: Wed Feb 28 04:55:46 2024 +0530 Commit: Caolán McNamara CommitDate: Fri Mar 1 10:42:19 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/+/163982 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index b0784449f159..8128de702dfd 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, true) +{ +} + +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: Branch 'distro/collabora/co-24.04' - svx/source
svx/source/tbxctrls/tbcontrl.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 6566304e4d6ea8fe45c08678d455db77edd14009 Author: Henry Castro AuthorDate: Wed Feb 28 15:59:40 2024 -0400 Commit: Caolán McNamara CommitDate: Thu Feb 29 18:43:06 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/+/164109 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d3f89aad706c..e4c2c68ff93d 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 ) {