[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 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 3adf09263022041cf9b42b86bc30b62c03271c79 Author: Caolán McNamara AuthorDate: Tue Oct 3 14:53:17 2023 +0100 Commit: Andras Timar CommitDate: Wed Oct 11 17:31:47 2023 +0200 tdf#155756 sidebar properties not displaying height over 100 Change-Id: I5ea2441319e0d7c34ffdcd179d8a82738da4733f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157530 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157587 Reviewed-by: Caolán McNamara (cherry picked from commit e181518492a69ec853e15813b362bf245ac2fad6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157770 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 7d829d324aab..45da8c792ed6 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
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdedtv.cxx | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) New commits: commit aaa86a71ddf1e351117f24edcabd2342dae11bdd Author: Caolán McNamara AuthorDate: Thu Oct 5 21:23:49 2023 +0100 Commit: Tomaž Vajngerl CommitDate: Wed Oct 11 00:03:41 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/+/157608 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 58812d849403..c93e2d950793 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -995,12 +995,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); @@ -1013,6 +1007,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: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/form/fmundo.cxx | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit b5f8a4e20a248e7966b49bf973c481cb44fe1273 Author: Caolán McNamara AuthorDate: Sat Oct 7 15:57:19 2023 +0100 Commit: Noel Grandin CommitDate: Sun Oct 8 17:31:34 2023 +0200 cid#1547086 Logically dead code since: commit 757a73379dba01fde853443a09583d862c404531 Date: Fri Oct 6 09:31:28 2023 +0100 Related: cool#7373 add an SfxHintId::ThisIsAnSfxEventHint luckily this is the only use of SfxHintId::NONE so easy to audit Change-Id: Id593eb3b2c2d26c9552aa7bf6033afd4f3112120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157626 Tested-by: Jenkins CollaboraOffice Reviewed-by: Noel Grandin diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index facf627a7b1c..cd742ef0f3b5 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -307,26 +307,26 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) break; } } -else if (rHint.GetId() != SfxHintId::NONE) +else if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint) { -switch (rHint.GetId()) +switch (static_cast(rHint).GetEventId()) { -case SfxHintId::Dying: -dispose(); -rModel.SetObjectShell( nullptr ); -break; -case SfxHintId::ModeChanged: +case SfxEventHintId::CreateDoc: +case SfxEventHintId::OpenDoc: ModeChanged(); break; default: break; } } -else if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint) +else if (rHint.GetId() != SfxHintId::NONE) { -switch (static_cast(rHint).GetEventId()) +switch (rHint.GetId()) { -case SfxEventHintId::CreateDoc: -case SfxEventHintId::OpenDoc: +case SfxHintId::Dying: +dispose(); +rModel.SetObjectShell( nullptr ); +break; +case SfxHintId::ModeChanged: ModeChanged(); break; default: break;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/tbxctrls/tbunocontroller.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 24500143f2ec472afc47ff13acecafc39700c3f2 Author: Szymon Kłos AuthorDate: Sat Sep 9 22:24:07 2023 +0200 Commit: Szymon Kłos CommitDate: Mon Sep 11 09:03:04 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 diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 191dfd4cc9be..62f7608bbf5f 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -313,7 +314,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: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/theme/ThemeColorChangerCommon.cxx | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 6d2633b37dabfad4ea1ea82041f8ae60a56cafd8 Author: Caolán McNamara AuthorDate: Thu Aug 31 09:03:31 2023 +0100 Commit: Tomaž Vajngerl CommitDate: Thu Aug 31 18:31:31 2023 +0200 cid#1542447 Explicit null dereferenced Change-Id: I1de10a8a459175f79bb2b8f796cde287be1945c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156228 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/theme/ThemeColorChangerCommon.cxx b/svx/source/theme/ThemeColorChangerCommon.cxx index 29d65cdda960..fab4835684a1 100644 --- a/svx/source/theme/ThemeColorChangerCommon.cxx +++ b/svx/source/theme/ThemeColorChangerCommon.cxx @@ -49,16 +49,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; @@ -97,7 +97,7 @@ bool updateEditEngTextSections(model::ColorSet const& rColorSet, SdrObject* pObj } } -pView->SdrEndTextEdit(); +rView.SdrEndTextEdit(); return true; } @@ -166,7 +166,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: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdotextdecomposition.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit 9f544a913622a89f5fbbdf6a07aa4e9ee19af959 Author: Caolán McNamara AuthorDate: Mon Aug 21 11:41:26 2023 +0100 Commit: Andras Timar CommitDate: Sat Aug 26 11:30:47 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 (cherry picked from commit 8ec43f37a7a5babe9227a5ca1ea84720fc2e15e5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155924 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar 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: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/form/navigatortree.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 02701941e31d98635fca511a6a149533a4a32a1c Author: Caolán McNamara AuthorDate: Wed Aug 23 16:50:40 2023 +0100 Commit: Andras Timar CommitDate: Sat Aug 26 11:06:25 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/+/155991 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index de7dba8bca95..ac30d749949b 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: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/tbxctrls/PaletteManager.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 9b4988b022fc76dee9f2a6f77bc9a0e2c37e4d5c Author: Tomaž Vajngerl AuthorDate: Tue Jul 4 00:37:30 2023 +0900 Commit: Miklos Vajna CommitDate: Fri Aug 25 10:31:07 2023 +0200 svx: PaletteManager - remove printf Change-Id: I7d631352d423b6465d8bea4b09561f33d2ad98f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153936 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit cbc45a7f713ea1f2c44ed27b371e342ed7547e05) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156069 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index f43bd984bcf9..bd2914fc2003 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -431,8 +431,6 @@ void PaletteManager::DispatchColorCommand(const OUString& aCommand, const NamedC comphelper::makePropertyValue(aObj.GetURLPath()+ ".Color", sal_Int32(rColor.m_aColor)), }; -printf ("Sending: %s\n", aObj.GetURLPath().toUtf8().getStr()); - if (rColor.m_nThemeIndex != -1) { model::ComplexColor aComplexColor;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/dialog/ThemeDialog.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit b0a33352536e251598c6cc5ac1f69bfd043e6ba2 Author: Gülşah Köse AuthorDate: Mon Jul 17 11:27:08 2023 +0300 Commit: Gülşah Köse CommitDate: Wed Aug 9 14:42:44 2023 +0200 Prevent to open multiple Theme Color Edit dialog Signed-off-by: Gülşah Köse Change-Id: Ibf4db096b44ce941140a12d003b89b636f5e7224 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154514 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit e73b2bc4e6fdaba3098fa2c701342e1df112514c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155401 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/dialog/ThemeDialog.cxx b/svx/source/dialog/ThemeDialog.cxx index 29d12f25c779..ab743b0df4bd 100644 --- a/svx/source/dialog/ThemeDialog.cxx +++ b/svx/source/dialog/ThemeDialog.cxx @@ -89,7 +89,10 @@ void ThemeDialog::runThemeColorEditDialog() std::shared_ptr xKeepAlive(shared_from_this()); weld::DialogController::runAsync(pDialog, [this, xKeepAlive, pDialog](sal_uInt32 nResult) { if (nResult != RET_OK) +{ +mxAdd->set_sensitive(true); return; +} auto aColorSet = pDialog->getColorSet(); if (!aColorSet.getName().isEmpty()) { @@ -103,6 +106,7 @@ void ThemeDialog::runThemeColorEditDialog() mpCurrentColorSet = std::make_shared(maColorSets[maColorSets.size() - 1]); } +mxAdd->set_sensitive(true); }); } @@ -111,6 +115,7 @@ IMPL_LINK(ThemeDialog, ButtonClicked, weld::Button&, rButton, void) if (mpCurrentColorSet && mxAdd.get() == ) { runThemeColorEditDialog(); +mxAdd->set_sensitive(false); } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/dialog/ThemeDialog.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 78bf71884946456e5c072add9a83ad486b5f79e6 Author: Noel Grandin AuthorDate: Mon Jul 24 10:16:11 2023 +0200 Commit: Tomaž Vajngerl CommitDate: Mon Jul 24 12:45:02 2023 +0200 fix COOL crash in theme dialog ==3975==ERROR: AddressSanitizer: heap-use-after-free /opt/collaboraoffice/program/libmergedlo.so std::vector >::clear() /home/collabora/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1248 /opt/collaboraoffice/program/libmergedlo.so operator() /home/collabora/online-buildscripts/staging/builddir/libreoffice/svx/source/dialog/ThemeDialog.cxx:96 /opt/collaboraoffice/program/libmergedlo.so std::function::operator()(int) const /home/collabora/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706 /opt/collaboraoffice/program/libmergedlo.so Dialog::EndDialog(long) /home/collabora/online-buildscripts/staging/builddir/libreoffice/vcl/source/window/dialog.cxx:1192 /opt/collaboraoffice/program/libmergedlo.so jsdialog::ExecuteAction(std::__cxx11::basic_string, std::allocator > const&, rtl::OString const&, std::map, std::allocator > >&) /home/collabora/online-buildscripts/staging/builddir/libreoffice/vcl/jsdialog/executor.cxx:566 /opt/collaboraoffice/program/libmergedlo.so lcl_sendDialogEvent(unsigned long long, char const*) /home/collabora/online-buildscripts/staging/builddir/libreoffice/desktop/source/lib/init.cxx:4735 /usr/bin/coolforkit lok::Document::sendDialogEvent(unsigned long long, char const*) /home/collabora/online-buildscripts/staging/builddir/libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:323 /usr/bin/coolforkit Change-Id: I7b34c9649c96f6745c2230ac347644fb45ec7f6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154836 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/dialog/ThemeDialog.cxx b/svx/source/dialog/ThemeDialog.cxx index 8af6f5975df2..29d12f25c779 100644 --- a/svx/source/dialog/ThemeDialog.cxx +++ b/svx/source/dialog/ThemeDialog.cxx @@ -86,7 +86,8 @@ IMPL_LINK_NOARG(ThemeDialog, SelectItem, ValueSet*, void) void ThemeDialog::runThemeColorEditDialog() { auto pDialog = std::make_shared(mpWindow, *mpCurrentColorSet); -weld::DialogController::runAsync(pDialog, [this, pDialog](sal_uInt32 nResult) { +std::shared_ptr xKeepAlive(shared_from_this()); +weld::DialogController::runAsync(pDialog, [this, xKeepAlive, pDialog](sal_uInt32 nResult) { if (nResult != RET_OK) return; auto aColorSet = pDialog->getColorSet();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdotextdecomposition.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 4feaac8430f75e2bf0c1b9a94a0d30ef568d5ba1 Author: Khaled Hosny AuthorDate: Mon Jun 26 11:18:58 2023 +0300 Commit: Andras Timar CommitDate: Thu Jun 29 13:40:51 2023 +0200 tdf#156050: Fix how misspelling line is calculated for RTL text Partially revert: commit 74b6c5ea3c333de7c5e7ef8636732edadd9083f2 Author: Khaled Hosny Date: Thu Jun 8 16:41:18 2023 +0300 tdf#151968: Fix vertical position of RTL spelling wavy line Instead of changing how fStart and fEnd are calculated, calculate them like before then swap them. This seems to be more reliable, and matches what we do in Writer. Change-Id: Ia15408881666a86151a12fcf016cc81c1568f7e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153572 Tested-by: Jenkins Reviewed-by: خالد حسني (cherry picked from commit 2ef138de767c312188d41a7f206234eafac3108b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153597 Reviewed-by: Michael Stahl diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 726ee850eb8b..5d7c51208154 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -427,12 +427,14 @@ namespace // full portion width const double fTextWidth(aDXArray[aDXArray.size() - 1]); +fStart = fTextWidth - fStart; +fEnd = fTextWidth - fEnd; + // tdf#151968 // if start < end, OutputDevice::DrawWaveLine() will // think it is a rotated line, so we swap fStart and // fEnd to avoid this. -fStart = fTextWidth - fEnd; -fEnd = fTextWidth - fStart; +std::swap(fStart, fEnd); } // need to take FontScaling out of values; it's already part of
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/tbxctrls/PaletteManager.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b62c2b10066638b7f545865a608b5c197b1c1224 Author: Tomaž Vajngerl AuthorDate: Fri Jun 23 00:01:19 2023 +0900 Commit: Michael Meeks CommitDate: Thu Jun 22 17:28:45 2023 +0200 fix crash in PaletteManager triggered by the color picker The code expects the SfxObjectShell::GetThemeColors() always returns a current set of theme colors, but then for some modules we return nullptr. Change-Id: I4096b75942d818965cedf43f35444faeb870cb74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153463 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 082b07f94c92..f43bd984bcf9 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -210,6 +210,9 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet ) rColorSet.Clear(); sal_uInt16 nItemId = 0; +if (!pColorSet) +return; + svx::ThemeColorPaletteManager aThemeColorManager(pColorSet); moThemePaletteCollection = aThemeColorManager.generate();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/tbxctrls/StylesPreviewWindow.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit bd2b39f6a710aa0d3d280b574926bd248e3416b0 Author: Caolán McNamara AuthorDate: Fri Jun 9 15:50:07 2023 +0100 Commit: Andras Timar CommitDate: Sat Jun 10 19:31:20 2023 +0200 global Timer has have SetStatic() set to avoid teardown problem on macOs seen as: libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument during build-time cppunit tests Change-Id: Ida0520a5213b8c923aae884a29c9324b3a9fae16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152801 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index 283c19363932..43e1c9b4f90b 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -77,6 +77,7 @@ private: { // a generous 30 secs SetTimeout(3); +SetStatic(); } virtual void Invoke() override { StylePreviewCache::gJsonStylePreviewCache.clear(); } };
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/tbxctrls/StylesPreviewWindow.cxx | 40 1 file changed, 35 insertions(+), 5 deletions(-) New commits: commit 9f3ffba983baf924a892d7ec6c102686fd7259c9 Author: Caolán McNamara AuthorDate: Wed Jun 7 20:43:12 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Jun 8 09:34:37 2023 +0200 Related: CollaboraOnline#6511 hold json preview cache longer due to oddities related to tdf155720 the notebookbar the cache is hooked to can be torn down and replaced if the 1st session is interacted with while multiple other users join. So count goes to 0 just at the wrong time to trigger throwing away the cache and forcing regeneration. An Idle doesn't suffice here. https: //github.com/CollaboraOnline/online/issues/6511 Change-Id: I148c99115fc497e34bf8920b6f59adc47605b8a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152663 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index f4dd77dd4fb5..283c19363932 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -68,35 +68,65 @@ namespace { class StylePreviewCache { +private: +class JsonStylePreviewCacheClear final : public Timer +{ +public: +JsonStylePreviewCacheClear() +: Timer("Json Style Preview Cache clear callback") +{ +// a generous 30 secs +SetTimeout(3); +} +virtual void Invoke() override { StylePreviewCache::gJsonStylePreviewCache.clear(); } +}; + static std::map> gStylePreviewCache; static std::map gJsonStylePreviewCache; static int gStylePreviewCacheClients; +static JsonStylePreviewCacheClear gJsonIdleClear; public: static std::map>& Get() { return gStylePreviewCache; } static std::map& GetJson() { return gJsonStylePreviewCache; } -static void ClearCache() +static void ClearCache(bool bHard) { for (auto& aPreview : gStylePreviewCache) aPreview.second.disposeAndClear(); gStylePreviewCache.clear(); -gJsonStylePreviewCache.clear(); +if (bHard) +{ +StylePreviewCache::gJsonStylePreviewCache.clear(); +gJsonIdleClear.Stop(); +} +else +{ +// tdf#155720 don't immediately clear the json representation +gJsonIdleClear.Start(); +} +} + +static void RegisterClient() +{ +if (!gStylePreviewCacheClients) +gJsonIdleClear.Stop(); +gStylePreviewCacheClients++; } -static void RegisterClient() { gStylePreviewCacheClients++; } static void UnregisterClient() { gStylePreviewCacheClients--; if (!gStylePreviewCacheClients) -ClearCache(); +ClearCache(false); } }; std::map> StylePreviewCache::gStylePreviewCache; std::map StylePreviewCache::gJsonStylePreviewCache; int StylePreviewCache::gStylePreviewCacheClients; +StylePreviewCache::JsonStylePreviewCacheClear StylePreviewCache::gJsonIdleClear; } StyleStatusListener::StyleStatusListener( @@ -143,7 +173,7 @@ StylePoolChangeListener::~StylePoolChangeListener() void StylePoolChangeListener::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) { if (rHint.GetId() == SfxHintId::StyleSheetModified) -StylePreviewCache::ClearCache(); +StylePreviewCache::ClearCache(true); m_pPreviewControl->RequestStylesListUpdate(); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/tbxctrls/StylesPreviewWindow.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7925c5d445870a5021761ef55c0c1c5314ecfae9 Author: Caolán McNamara AuthorDate: Sat Jun 3 15:23:15 2023 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 3 21:16:18 2023 +0200 perf: use freeze/thaw around block insert of multiple icons into the style preview widget in the tabbed view |--1.67%--StylesListUpdateTask::Invoke | StylesPreviewWindow_Base::UpdateStylesList | weld::IconView::append (inlined) | JSIconView::insert | | | |--1.58%--SalInstanceIconView::insert | | | | | |--1.19%--SvTreeListBox::Insert | | | SvTreeList::Insert | | | SvTreeList::Broadcast (inlined) | | | SvTreeListBox::ModelNotification Change-Id: I1c1058324a056e7c8fb42f31c5b4919fcc5870e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152538 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index cd65ff839b1d..81f8a5f8c71f 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -541,6 +541,7 @@ void StylesPreviewWindow_Base::UpdateStylesList() } } +m_xStylesView->freeze(); m_xStylesView->clear(); for (const auto& rStyle : m_aAllStyles) { @@ -548,6 +549,7 @@ void StylesPreviewWindow_Base::UpdateStylesList() m_xStylesView->append(rStyle.first, rStyle.second, pImg); } +m_xStylesView->thaw(); } StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/inc/StylesPreviewWindow.hxx |3 +++ svx/source/tbxctrls/StylesPreviewWindow.cxx | 28 ++-- 2 files changed, 25 insertions(+), 6 deletions(-) New commits: commit a0a20a7e2ba19c1b6eedd9aaa5a41e7a6e93c95b Author: Szymon Kłos AuthorDate: Fri Jun 2 14:07:03 2023 +0200 Commit: Caolán McNamara CommitDate: Fri Jun 2 15:39:14 2023 +0200 Styles preview widget should cache images Change-Id: I3ee370e5d3ef4227681c4a973ac6f24f9aa241e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152556 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/svx/source/inc/StylesPreviewWindow.hxx b/svx/source/inc/StylesPreviewWindow.hxx index 354b99673dbe..33aaf513f28d 100644 --- a/svx/source/inc/StylesPreviewWindow.hxx +++ b/svx/source/inc/StylesPreviewWindow.hxx @@ -121,11 +121,14 @@ public: void Select(const OUString& rStyleName); void RequestStylesListUpdate(); +static VclPtr GetCachedPreview(const std::pair& rStyle); private: void UpdateStylesList(); void UpdateSelection(); bool Command(const CommandEvent& rEvent); + +static std::map> aPreviewCache; }; class StylesPreviewWindow_Impl final : public InterimItemWindow, public StylesPreviewWindow_Base diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index 8f5dfea0b2c8..d5e6791cb412 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -60,6 +60,8 @@ #include +std::map> StylesPreviewWindow_Base::aPreviewCache; + StyleStatusListener::StyleStatusListener( StylesPreviewWindow_Base* pPreviewControl, const css::uno::Reference& xDispatchProvider) @@ -460,6 +462,25 @@ void StylesListUpdateTask::Invoke() m_rStylesList.UpdateSelection(); } +VclPtr +StylesPreviewWindow_Base::GetCachedPreview(const std::pair& rStyle) +{ +if (aPreviewCache.find(rStyle.second) != aPreviewCache.end()) +return aPreviewCache[rStyle.second]; +else +{ +VclPtr pImg = VclPtr::Create(); +const Size aSize(100, 30); +pImg->SetOutputSizePixel(aSize); + +StyleItemController aStyleController(rStyle); +aStyleController.Paint(*pImg); +aPreviewCache[rStyle.second] = pImg; + +return pImg; +} +} + void StylesPreviewWindow_Base::UpdateStylesList() { m_aAllStyles = m_aDefaultStyles; @@ -487,12 +508,7 @@ void StylesPreviewWindow_Base::UpdateStylesList() m_xStylesView->clear(); for (const auto& rStyle : m_aAllStyles) { -ScopedVclPtr pImg = VclPtr::Create(); -const Size aSize(100, 30); -pImg->SetOutputSizePixel(aSize); - -StyleItemController aStyleController(rStyle); -aStyleController.Paint(*pImg); +VclPtr pImg = GetCachedPreview(rStyle); m_xStylesView->append(rStyle.first, rStyle.second, pImg); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdotext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 3e418c2a92f0c3fb95929245421b0387976b64c2 Author: Tomaž Vajngerl AuthorDate: Sat Apr 29 11:05:00 2023 +0900 Commit: Tomaž Vajngerl CommitDate: Sat Apr 29 11:17:23 2023 +0200 Prevent to get 0 font size in the auto-fitting algorithm When the text box is empty, the size of the box can be returned as (0,0) so the auto-fitting algorithm will calculate the scaling to 0%, which means the text is shrinked to very small size or is invisible. This change fixes the issue so that if the size is (0,0) we just return and leave the scaling at 100%. Change-Id: Ie359461f23a1f7a496eb03b5670f588ad48bbf49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151178 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit fd99725abdeea92e8cd46bb3e8e6fdcad8180e8a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151179 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index c49de7fddfae..afe2b7ac4d2c 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1360,6 +1360,9 @@ void SdrTextObj::autoFitTextForCompatibility(SdrOutliner& rOutliner, const Size& } Size aCurrentTextBoxSize = rOutliner.CalcTextSizeNTP(); +if (aCurrentTextBoxSize.Height() == 0) +return; + tools::Long nExtendTextBoxBy = -50; aCurrentTextBoxSize.extendBy(0, nExtendTextBoxBy); double fCurrentFitFactor = double(rTextBoxSize.Height()) / aCurrentTextBoxSize.Height();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source svx/uiconfig
svx/source/dialog/ThemeDialog.cxx |4 +++- svx/uiconfig/ui/themedialog.ui|2 -- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 6696854514eaf06c07171ebb56ab58765275e4f3 Author: Tomaž Vajngerl AuthorDate: Thu Apr 27 20:31:05 2023 +0900 Commit: Tomaž Vajngerl CommitDate: Thu Apr 27 20:36:37 2023 +0900 disable dbl-click in ThemeDialog in LOK, remove the dialog size The double click in THemeDialog exits the dialog automatically, but this causes a crash in online, so disable it there. No need to set the theme dialog size to a certain fixed value so we don't add white space. Change-Id: I555a631b7d0c515ec326c3654138982c59d3f021 diff --git a/svx/source/dialog/ThemeDialog.cxx b/svx/source/dialog/ThemeDialog.cxx index c440292b723d..01f88fa036ed 100644 --- a/svx/source/dialog/ThemeDialog.cxx +++ b/svx/source/dialog/ThemeDialog.cxx @@ -15,6 +15,7 @@ #include #include #include +#include namespace svx { @@ -65,7 +66,8 @@ void ThemeDialog::initColorSets() IMPL_LINK_NOARG(ThemeDialog, DoubleClickValueSetHdl, ValueSet*, void) { SelectItem(nullptr); -m_xDialog->response(RET_OK); +if (!comphelper::LibreOfficeKit::isActive()) +m_xDialog->response(RET_OK); } IMPL_LINK_NOARG(ThemeDialog, SelectItem, ValueSet*, void) diff --git a/svx/uiconfig/ui/themedialog.ui b/svx/uiconfig/ui/themedialog.ui index 80bbcc5fca67..6895f51dff24 100644 --- a/svx/uiconfig/ui/themedialog.ui +++ b/svx/uiconfig/ui/themedialog.ui @@ -3,8 +3,6 @@ -640 -480 False True True
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/sidebar/nbdtmg.cxx | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) New commits: commit 312fd13f30e20c435370d8a11cf4123a25988f52 Author: Justin Luth AuthorDate: Tue Jan 3 10:56:40 2023 -0500 Commit: Justin Luth CommitDate: Fri Apr 21 00:03:15 2023 +0200 tdf#56258 svx: use last defined locale-outline for remaining levels When applying an outline numbering choice (one of the 8 predefined per-locale definitions) the toolbar/sidebar would only affect the spacing of 0 - 5 of the defined locale-levels, and only changed the num type of the remainder. Well, that can easily look bad if the indenting and spacing is only partially modified. [The Bullets and Numbering dialog outline grid does not affect spacing at all. That can be better or much worse, depending on the situation.] This "Outline Format" button is normally turned off on Writer's Formatting toolbar. You need to go to Tools - Customize - Toolbars to turn it on. It only seems to work for Writer - it was grayed out/disabled in Draw even when I had it show up in the toolbar. So almost nobody have ever seen or used this I expect. However, I think it is important to get this working, because I want to use this grid-choice code path to be usable for the B dialog as well, although that could upset people who already have their spacing right and just want to change the digits. In any case, this nbdtimg DOES already change some spacing, so it should be either all or none. Change-Id: Ib54b6ffe3497f09f0c57ff2db1ec2a946f692fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150660 Tested-by: Justin Luth Reviewed-by: Justin Luth diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 241b91673836..a4def326c80b 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -590,11 +590,14 @@ void OutlineTypeMgr::Init() pItemArr->sDescription = SvxResId( TranslateId(RID_SVXSTR_OUTLINENUM_DESCRIPTION_0.mpContext, id.getStr()) ); pItemArr->pNumSettingsArr = new NumSettingsArr_Impl; Reference xLevel = aOutlineAccess.getConstArray()[nItem]; -for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 5; nLevel++) +for(sal_Int32 nLevel = 0; nLevel < SVX_MAX_NUM; nLevel++) { -Any aValueAny = xLevel->getByIndex(nLevel); +// use the last locale-defined level for all remaining levels. +sal_Int32 nLocaleLevel = std::min(nLevel, xLevel->getCount() - 1); Sequence aLevelProps; -aValueAny >>= aLevelProps; +if (nLocaleLevel >= 0) +xLevel->getByIndex(nLocaleLevel) >>= aLevelProps; + NumSettings_Impl* pNew = lcl_CreateNumberingSettingsPtr(aLevelProps); const SvxNumberFormat& aNumFmt( aDefNumRule.GetLevel( nLevel) ); pNew->eLabelFollowedBy = aNumFmt.GetLabelFollowedBy(); @@ -618,7 +621,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m { bool bNotMatch = false; OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[iDex]; -sal_uInt16 nCount = pItemArr->pNumSettingsArr->size(); +sal_uInt16 nCount = pItemArr ? pItemArr->pNumSettingsArr->size() : 0; for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++) { NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get(); @@ -633,7 +636,9 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m sal_UCS4 cChar = aFmt.GetBulletChar(); sal_UCS4 ccChar -= _pSet->sBulletChar.iterateCodePoints(::temporary(sal_Int32(0))); += _pSet->sBulletChar.isEmpty() + ? 0 + : _pSet->sBulletChar.iterateCodePoints(::temporary(sal_Int32(0))); if ( !((cChar == ccChar) && _pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdpntv.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4712901a3f0c1ba796a0f516c468650ef31a4f7b Author: Szymon Kłos AuthorDate: Tue Feb 14 10:50:46 2023 +0100 Commit: Szymon Kłos CommitDate: Wed Apr 12 07:32:07 2023 +0200 lok: draw textboxes under edit This fixes bug in impress: - open in 2 views - start editing textbox in 2. view on 2. slide - start editing textbox in 1. view on 1. slide Result: slide 2 textbox was dissapearing We need to allow drawing textboxes edited by other views so if we select non-editor for rendering we will see the full content. It was regression from commit e496b55a592caf0ca07f5477285a72d50cee6501 lok: masterpage: don't render text edits from different mode Change-Id: I7645496aec77d11d16621129dd6644d3b54a6010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146999 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150096 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index c7e04008d6c3..580c6d484709 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -647,7 +647,7 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFo static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow); } -if (comphelper::LibreOfficeKit::isActive() && mbPaintTextEdit && pPageView) +if (comphelper::LibreOfficeKit::isActive() && pPageView) { // Look for active text edits in other views showing the same page, // and show them as well. Show only if Page/MasterPage mode is matching.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/dialog/svxruler.cxx |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) New commits: commit bc36476a50687a31e2934a5b52502f2f24424ce1 Author: Sarper Akdemir AuthorDate: Tue Feb 28 23:03:12 2023 +0300 Commit: Sarper Akdemir CommitDate: Tue Mar 28 14:54:50 2023 + related tdf#102261: consider ParaTabStopDefaultDistance in SvxRuler If there's a paragraph scoped tab default distance defined, use that as the default tab distance in the SvxRuler instead of the document wide setting. Change-Id: I9b0e7d0db0b25aee08bd27948b2e462b4a4ee496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148060 Tested-by: Jenkins Reviewed-by: Sarper Akdemir Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149513 Tested-by: Sarper Akdemir diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index be53a0c91c58..671afa9f6737 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1027,7 +1027,10 @@ void SvxRuler::UpdateTabs() const tools::Long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab; const tools::Long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight()); -tools::Long nDefTabDist = ConvertHPosPixel(lDefTabDist); +tools::Long lCurrentDefTabDist = lDefTabDist; +if(mxTabStopItem->GetDefaultDistance()) +lCurrentDefTabDist = mxTabStopItem->GetDefaultDistance(); +tools::Long nDefTabDist = ConvertHPosPixel(lCurrentDefTabDist); const sal_uInt16 nDefTabBuf = lPosPixel > lRightIndent || lLastTab > lRightIndent ? 0 @@ -1063,13 +1066,13 @@ void SvxRuler::UpdateTabs() } // Adjust to previous-to-first default tab stop -lLastTabOffsetLogic -= lLastTabOffsetLogic % lDefTabDist; +lLastTabOffsetLogic -= lLastTabOffsetLogic % lCurrentDefTabDist; // fill the rest with default Tabs for (j = 0; j < nDefTabBuf; ++j) { //simply add the default distance to the last position -lLastTabOffsetLogic += lDefTabDist; +lLastTabOffsetLogic += lCurrentDefTabDist; if (bRTL) { mpTabs[nTabCount + TAB_GAP].nPos =
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source vcl/inc vcl/jsdialog
svx/source/tbxctrls/tbcontrl.cxx |3 +++ vcl/inc/jsdialog/jsdialogbuilder.hxx |2 ++ vcl/jsdialog/jsdialogbuilder.cxx | 33 ++--- 3 files changed, 35 insertions(+), 3 deletions(-) New commits: commit 41a1a2f04301dc22b156b4e11767859e40473897 Author: Szymon Kłos AuthorDate: Mon Mar 6 11:33:08 2023 +0100 Commit: Szymon Kłos CommitDate: Tue Mar 7 09:16:45 2023 + jsdialog: don't close dialog on tab page destroy was closing the whole dialog on tab switch in Format -> Characters -> Highlight when switching to "None" also avoid sending multiple "full updates" by using the same builder for sending message Change-Id: I4540c9c857acf2b9f40482678a30335edc24e7cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148304 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b1f54a303e13..b19b3db94f40 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1607,6 +1607,9 @@ Color SvxStyleBox_Base::TestColorsVisible(const Color , const Color IMPL_LINK(SvxStyleBox_Base, DumpAsPropertyTreeHdl, tools::JsonWriter&, rJsonWriter, void) { +if (!m_xWidget) +return; + { auto entriesNode = rJsonWriter.startNode("entries"); for (int i = 0, nEntryCount = m_xWidget->get_count(); i < nEntryCount; ++i) diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index f9dea1a3987d..96455be71797 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -223,6 +223,8 @@ class JSInstanceBuilder final : public SalInstanceBuilder, public JSDialogSender bool m_bIsNotebookbar; /// used to detect when we have to send Full Update in container handler bool m_bSentInitialUpdate; +/// is true for tabpages, prevents from closing parent window on destroy +bool m_bIsNestedBuilder; /// When LOKNotifier is set by jsdialogs code we need to release it VclPtr m_aWindowToRelease; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index db2481897fa3..355a4d45c45a 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -510,6 +510,7 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) , m_bSentInitialUpdate(false) +, m_bIsNestedBuilder(false) , m_aWindowToRelease(nullptr) { // when it is a popup we initialize sender in weld_popover @@ -543,6 +544,7 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) , m_bSentInitialUpdate(false) +, m_bIsNestedBuilder(false) , m_aWindowToRelease(nullptr) { vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -586,6 +588,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) , m_bSentInitialUpdate(false) +, m_bIsNestedBuilder(false) , m_aWindowToRelease(nullptr) { vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -616,6 +619,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) , m_bSentInitialUpdate(false) +, m_bIsNestedBuilder(false) , m_aWindowToRelease(nullptr) { vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -667,6 +671,13 @@ JSInstanceBuilder::CreateFormulabarBuilder(vcl::Window* pParent, const OUString& JSInstanceBuilder::~JSInstanceBuilder() { +// tab page closed -> refresh parent window +if (m_bIsNestedBuilder && m_sTypeOfJSON == "dialog") +{ +sendFullUpdate(true); +flush(); +} + if (m_sTypeOfJSON == "popup") sendClosePopup(m_nWindowId); @@ -909,15 +920,31 @@ std::unique_ptr JSInstanceBuilder::weld_message_dialog(cons std::unique_ptr JSInstanceBuilder::weld_container(const OString& id) { vcl::Window* pContainer = m_xBuilder->get(id); -auto pWeldWidget = std::make_unique(this, pContainer, this, false); +auto pWeldWidget += pContainer ? std::make_unique(this, pContainer, this, false) : nullptr; if (pWeldWidget) RememberWidget(id, pWeldWidget.get()); -if (!m_bSentInitialUpdate) +if (!m_bSentInitialUpdate && pContainer) { m_bSentInitialUpdate = true; -sendFullUpdate(); + +// use parent builder to send update - avoid multiple calls from many builders +vcl::Window* pParent = pContainer->GetParent(); +std::string sId = std::to_string(m_nWindowId); +while (pParent + && !FindWeldWidgetsMap( + sId,
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdomedia.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4023eec345eb210b053a708f3b253c54fdea123c Author: Tor Lillqvist AuthorDate: Tue Oct 25 11:37:42 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 07:56:36 2023 + Guard against no HAVE_FEATURE_AVMEDIA in one more place This change was said to fix the build of the iOS app in co-22.05, but I am not sure if it actually is needed for that here in co-23.05. Still, this seems like the proper thing to do? Change-Id: I4a9e6f18e7b17664e5aed36233d5ccde44cf1194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141796 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146736 diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9b17b7bf278a..c63df5d8b69e 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -474,6 +474,7 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper void SdrMediaObj::notifyPropertiesForLOKit() { +#if HAVE_FEATURE_AVMEDIA if (!m_xImpl->m_MediaProperties.getTempURL().isEmpty()) { const auto mediaId = reinterpret_cast(this); @@ -491,6 +492,7 @@ void SdrMediaObj::notifyPropertiesForLOKit() SfxLokHelper::notifyMediaUpdate(json); } +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/sidebar/area/AreaPropertyPanelBase.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 1aa01d562118a78a3e183e35a619b5fe1a9268cf Author: Gülşah Köse AuthorDate: Thu Jan 19 18:10:11 2023 +0300 Commit: Andras Timar CommitDate: Fri Feb 3 23:29:39 2023 +0100 Hide fill Attribute widget if fill style is none When Fill style is none we can not use fill attribute element. So It is better to hide. Change-Id: I88d5e49448040b3afa18fbf66377d254716e7415 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145817 Tested-by: Jenkins Tested-by: Pedro Silva Reviewed-by: Pedro Silva Reviewed-by: Mike Kaganski diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index 996026d1fa6c..220e3f04b829 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -876,8 +876,7 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, bool bDefaultOrSet, default: case drawing::FillStyle_NONE: { -mxLbFillAttr->set_active(-1); -mxLbFillAttr->set_sensitive(false); +mxLbFillAttr->hide(); // "Use slide background" also uses FillStyle_NONE internally, // don't switch listbox in that case (will be handled by updateFillUseBackground) nPos = meLastXFS == USE_BACKGROUND ? USE_BACKGROUND : NONE;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/styles/ColorSets.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 126018f3dee60462207380eba017d0fac6d6b0f8 Author: Andrea Gelmini AuthorDate: Sat Jan 14 18:49:26 2023 +0100 Commit: Tomaž Vajngerl CommitDate: Fri Jan 20 07:16:26 2023 + Typo in "code" Not sure about this... Change-Id: I8aebfdf48dc7dc2bdbce180fa2f1bd3305489a24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145516 Tested-by: Jenkins Reviewed-by: Julien Nabet Reviewed-by: Tomaž Vajngerl (cherry picked from commit 92e6cd75a3599d3d411d123bd1e691ec447fa563) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145856 Tested-by: Tomaž Vajngerl diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx index 439c63d1ee35..66a5e3e91016 100644 --- a/svx/source/styles/ColorSets.cxx +++ b/svx/source/styles/ColorSets.cxx @@ -252,7 +252,7 @@ void ColorSets::init() maColorSets.push_back(aColorSet); } { -ColorSet aColorSet("Forrest"); +ColorSet aColorSet("Forest"); aColorSet.add(model::ThemeColorType::Dark1, 0x00); aColorSet.add(model::ThemeColorType::Light1, 0xFF); aColorSet.add(model::ThemeColorType::Dark2, 0x00);