[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/dialogs/SpellDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bfe8263b6d4ebfe11f380fb5f87d07f127a67f9a Author: Michael Weghorn AuthorDate: Thu Mar 17 08:26:59 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Mar 21 17:44:54 2022 +0100 Call corresponding base class method in SpellDialog::Deactivate At a quick glance, the fact that `SpellDialog::Deactivate` previously did the same as `SpellDialog::Activate` looks like a copy-paste mistake; both were added in commit 5261417cbb3051b812164838d19c0f748573df45 Date: Fri Jun 14 21:56:44 2019 +0100 weld SpellDialog Change-Id: Ib06d19e46470141d5bfcfc7e790160c1879b6a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131598 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 5aa42d256fa5081d79da3eb21ddd8000d7b6cc1c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131861 diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 7b17b25e71f2..02f1fc85212f 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -945,7 +945,7 @@ void SpellDialog::Activate() void SpellDialog::Deactivate() { -SfxModelessDialogController::Activate(); +SfxModelessDialogController::Deactivate(); ToplevelFocusChanged(); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/tabpages/tpcolor.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit c0658e3e60daae59058734a13127fb6af38f2e21 Author: Caolán McNamara AuthorDate: Fri Dec 3 14:09:33 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Sun Dec 5 18:05:47 2021 +0100 some translations are searched for in the wrong .mo since... commit c895a6d8298a349784cd0aafff4bf518ac8d0a7d Date: Fri May 15 10:51:10 2020 +0200 Resolves tdf#132799 - Deleting of colors unclear Tooltips added for disabled states those ones are in cui.mo (CuiResId) not svx (SvxResId) which is more obvious now we only SVXSTR for strings in svx Change-Id: I595bd5aadd8ead18291ff818405bec594c8d32db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126292 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 7be82dca2676..962439c51d70 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -126,7 +126,7 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* // disable modify buttons // Color palettes can't be modified m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR1) ); // disable preset color values m_xRGBpreset->set_sensitive(false); @@ -369,7 +369,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void) m_xValSetColorList->InsertItem( nId + 1 , aCurrentColor, aName ); m_xValSetColorList->SelectItem( nId + 1 ); m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR2) ); ImpColorCountChanged(); } @@ -428,7 +428,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl, weld::Button&, void) else { m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR2) ); } } @@ -464,7 +464,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, weld::ComboBox&, void) if (nPos != 0) { m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR1) ); } m_xValSetColorList->Resize(); @@ -494,14 +494,14 @@ IMPL_LINK(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, void) else { m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR1) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR1) ); } } if (pValSet == m_xValSetRecentList.get()) { m_xValSetColorList->SetNoSelection(); m_xBtnDelete->set_sensitive(false); -m_xBtnDelete->set_tooltip_text( SvxResId(RID_SVXSTR_DELETEUSERCOLOR2) ); +m_xBtnDelete->set_tooltip_text( CuiResId(RID_SVXSTR_DELETEUSERCOLOR2) ); } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/options/optgdlg.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit c9bfb849aef0de759edcd5f3137ff07d913a1cf5 Author: Gabor Kelemen AuthorDate: Mon Nov 1 19:14:06 2021 +0100 Commit: Xisco Fauli CommitDate: Mon Nov 15 12:41:18 2021 +0100 tdf#145128 "Perform file extension check" should be disabled if finalized Change-Id: I7181ab8dde28fd5580a90fb267b31eaffd6a9878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124567 Tested-by: Jenkins Reviewed-by: Andras Timar (cherry picked from commit a2f0d457c8addeeef768a93f6a174617094a0254) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124850 Reviewed-by: Xisco Fauli diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index baa96ad3166c..161a47de401d 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -336,6 +336,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) m_xPerformFileExtCheck->set_active( officecfg::Office::Common::Misc::PerformFileExtCheck::get()); m_xPerformFileExtCheck->save_state(); + m_xPerformFileExtCheck->set_sensitive(!officecfg::Office::Common::Misc::PerformFileExtCheck::isReadOnly()); #endif }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/tabpages/align.cxx | 59 +++--- 1 file changed, 44 insertions(+), 15 deletions(-) New commits: commit 2c59baecb325211e5f01878b517265ce658de4fc Author: Caolán McNamara AuthorDate: Mon Nov 1 14:53:49 2021 + Commit: Michael Stahl CommitDate: Tue Nov 2 09:52:10 2021 +0100 tdf#138698 remove/ignore 'distributed' if feature is unknown which it is in dbaccess. Its is a calc feature added at... commit 755ad6834625488c5d31d4bacc9370eae7ffd8f3 Date: Tue Oct 5 11:15:56 2010 -0400 Ported calc-distributed-cell-text-*.diff from ooo-build. Change-Id: I1e8856e2ab635d270a487f5a68ac5c386f46a080 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124473 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 5937a2b28995..97226ccec1a4 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -58,7 +58,7 @@ namespace { template void lcl_MaybeResetAlignToDistro( -weld::ComboBox& rLB, sal_uInt16 nListPos, const SfxItemSet& rCoreAttrs, sal_uInt16 nWhichAlign, sal_uInt16 nWhichJM, JustEnumType eBlock) +weld::ComboBox& rLB, sal_uInt16 nListId, const SfxItemSet& rCoreAttrs, sal_uInt16 nWhichAlign, sal_uInt16 nWhichJM, JustEnumType eBlock) { const SfxPoolItem* pItem; if (rCoreAttrs.GetItemState(nWhichAlign, true, ) != SfxItemState::SET) @@ -80,14 +80,19 @@ void lcl_MaybeResetAlignToDistro( if (eMethod == SvxCellJustifyMethod::Distribute) { // Select the 'distribute' entry in the specified list box. -rLB.set_active(nListPos); +rLB.set_active_id(OUString::number(nListId)); } } -void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, const SfxItemSet& rOldSet, sal_uInt16 nWhichJM, const weld::ComboBox& rLB, sal_uInt16 nListPos) +void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, const SfxItemSet& rOldSet, sal_uInt16 nWhichJM, const weld::ComboBox& rLB, sal_uInt16 nListId) { +// tdf#138698 unsupported, e.g. dbaccess +if (rLB.find_id(OUString::number(nListId)) == -1) +return; + +// feature supported , e.g. calc SvxCellJustifyMethod eJM = SvxCellJustifyMethod::Auto; -if (rLB.get_active() == nListPos) +if (rLB.get_active_id().toInt32() == nListId) eJM = SvxCellJustifyMethod::Distribute; // tdf#129300 If it would create no change, don't force it @@ -617,19 +622,43 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) } } - // Special treatment for distributed alignment; we need to set the justify // method to 'distribute' to distinguish from the normal justification. +sal_uInt16 nHorJustifyMethodWhich = GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD); +SfxItemState eHorJustifyMethodState = pCoreAttrs->GetItemState(nHorJustifyMethodWhich); +if (eHorJustifyMethodState == SfxItemState::UNKNOWN) +{ +// feature unknown, e.g. dbaccess, remove the option +int nDistribId = m_xLbHorAlign->find_id(OUString::number(ALIGNDLG_HORALIGN_DISTRIBUTED)); +if (nDistribId != -1) +m_xLbHorAlign->remove(nDistribId); +} +else +{ +// feature known, e.g. calc +lcl_MaybeResetAlignToDistro( +*m_xLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED, *pCoreAttrs, +GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY), nHorJustifyMethodWhich, +SvxCellHorJustify::Block); +} -lcl_MaybeResetAlignToDistro( -*m_xLbHorAlign, ALIGNDLG_HORALIGN_DISTRIBUTED, *pCoreAttrs, -GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY), GetWhich(SID_ATTR_ALIGN_HOR_JUSTIFY_METHOD), -SvxCellHorJustify::Block); - -lcl_MaybeResetAlignToDistro( -*m_xLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED, *pCoreAttrs, -GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY), GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY_METHOD), -SvxCellVerJustify::Block); +sal_uInt16 nVerJustifyMethodWhich = GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY_METHOD); +SfxItemState eVerJustifyMethodState = pCoreAttrs->GetItemState(nVerJustifyMethodWhich); +if (eVerJustifyMethodState == SfxItemState::UNKNOWN) +{ +// feature unknown, e.g. dbaccess, remove the option +int nDistribId = m_xLbVerAlign->find_id(OUString::number(ALIGNDLG_VERALIGN_DISTRIBUTED)); +if (nDistribId != -1) +m_xLbVerAlign->remove(nDistribId); +} +else +{ +// feature known, e.g. calc +lcl_MaybeResetAlignToDistro( +*m_xLbVerAlign, ALIGNDLG_VERALIGN_DISTRIBUTED, *pCoreAttrs, +GetWhich(SID_ATTR_ALIGN_VER_JUSTIFY), nVerJustifyMethodWhich, +SvxCellVerJustify::Block); +} m_xLbHorAlign->save_value(); m_xLbFrameDir->save_value(); @@ -670,7 +699,7 @@ void AlignmentTabPage::InitVsRefEgde() void AlignmentTabPage::UpdateEnableControls() { -const sal_Int32 nHorAlign =
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/dialogs/scriptdlg.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 149df697ec2f4db0be891becef217312ded3ab88 Author: Caolán McNamara AuthorDate: Fri Oct 29 12:39:22 2021 +0100 Commit: Michael Stahl CommitDate: Mon Nov 1 12:14:13 2021 +0100 Related: tdf#145377 call select handler if restoring previously selected script Change-Id: Ibab3e920e6830c86bb6bfba070f14ca8a153c25f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124200 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index b000b4b34ecf..b840911a3797 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1082,7 +1082,10 @@ void SvxScriptOrgDialog::RestorePreviousSelection() } if (xEntry) +{ m_xScriptsBox->set_cursor(*xEntry); +ScriptSelectHdl(*m_xScriptsBox); +} } namespace {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/dialogs/scriptdlg.cxx |9 + cui/source/inc/scriptdlg.hxx |1 + 2 files changed, 6 insertions(+), 4 deletions(-) New commits: commit 68e3ed223eec7ccfe1a0a1f0cd8e09b88ca9e313 Author: Caolán McNamara AuthorDate: Fri Oct 29 12:54:26 2021 +0100 Commit: Michael Stahl CommitDate: Mon Nov 1 12:10:00 2021 +0100 Resolves: tdf#145377 don't use dismissed dialog as parent for error dialogs the script dialog is dismissed before the error dialogs get executed Change-Id: I9e143a7e65077d09f436c4744759c78a9970f1d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124467 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 1258ee54d432..b000b4b34ecf 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -372,6 +372,7 @@ CuiInputDialog::CuiInputDialog(weld::Window * pParent, InputDialogMode nMode) SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, const OUString& language) : SfxDialogController(pParent, "cui/ui/scriptorganizer.ui", "ScriptOrganizerDialog") +, m_pParent(pParent) , m_sLanguage(language) , m_delErrStr(CuiResId(RID_SVXSTR_DELFAILED)) , m_delErrTitleStr(CuiResId(RID_SVXSTR_DELFAILED_TITLE)) @@ -622,19 +623,19 @@ IMPL_LINK(SvxScriptOrgDialog, ButtonHdl, weld::Button&, rButton, void) } catch ( reflection::InvocationTargetException& ite ) { -SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(ite)); +SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(ite)); } catch ( provider::ScriptFrameworkErrorException& ite ) { -SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(ite)); +SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(ite)); } catch ( RuntimeException& re ) { -SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(re)); +SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(re)); } catch ( Exception& e ) { -SvxScriptErrorDialog::ShowAsyncErrorDialog(getDialog(), css::uno::Any(e)); +SvxScriptErrorDialog::ShowAsyncErrorDialog(m_pParent, css::uno::Any(e)); } } StoreCurrentSelection(); diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 6a1cbd15ae5c..954f3d90e191 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -77,6 +77,7 @@ public: class SvxScriptOrgDialog : public SfxDialogController { protected: +weld::Window* m_pParent; OUString m_sLanguage; static Selection_hash m_lastSelection; const OUString m_delErrStr;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/options/treeopt.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 755679765e43762251393e51f4b852aace56df92 Author: Caolán McNamara AuthorDate: Thu Oct 14 21:10:38 2021 +0100 Commit: Xisco Fauli CommitDate: Mon Oct 18 10:00:39 2021 +0200 tdf#144691 apply the language change SYNCHRON so it will be seen during apply otherwise the restore of state from the document takes place before the document has seen the language change Change-Id: I08e74d99bec3d88914caa9a2c83602c32e277ac0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123628 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index e7bf078bcae4..f7f29998a4a1 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1281,17 +1281,17 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet) pItem = nullptr; if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_LANGUAGE, false, )) { -pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { pItem }); +pDispatch->ExecuteList(pItem->Which(), SfxCallMode::SYNCHRON, { pItem }); bSaveSpellCheck = true; } if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE, false, )) { -pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { pItem }); +pDispatch->ExecuteList(pItem->Which(), SfxCallMode::SYNCHRON, { pItem }); bSaveSpellCheck = true; } if(SfxItemState::SET == rSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE, false, )) { -pDispatch->ExecuteList(pItem->Which(), SfxCallMode::ASYNCHRON, { pItem }); +pDispatch->ExecuteList(pItem->Which(), SfxCallMode::SYNCHRON, { pItem }); bSaveSpellCheck = true; }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/dialogs/tipofthedaydlg.cxx | 10 +- cui/source/inc/tipofthedaydlg.hxx |1 - 2 files changed, 5 insertions(+), 6 deletions(-) New commits: commit 9108fc6fe0b21ba06f155942f556275219f4eac0 Author: Heiko Tietze AuthorDate: Thu Oct 7 11:13:49 2021 +0200 Commit: Michael Stahl CommitDate: Fri Oct 8 10:20:25 2021 +0200 Resolves tdf#144693 - TipOfTheDay does not progress Follow-up to I94cd34aa031e133d8c229a0de78582fda1dbdf4a Change-Id: I29a91a188fb9783074491271c37b49a1f2cf13ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123206 Tested-by: Jenkins Reviewed-by: Heiko Tietze (cherry picked from commit 1b6b2eff9ac386fd994e3ae120882f646268a80b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123158 Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/tipofthedaydlg.cxx b/cui/source/dialogs/tipofthedaydlg.cxx index c4d1f876f935..34193bff90de 100644 --- a/cui/source/dialogs/tipofthedaydlg.cxx +++ b/cui/source/dialogs/tipofthedaydlg.cxx @@ -73,19 +73,19 @@ TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent) } const auto t0 = std::chrono::system_clock::now().time_since_epoch(); -m_nDay = std::chrono::duration_cast(t0).count() / 24; +sal_Int32 nDay = std::chrono::duration_cast(t0).count() / 24; +//show next tip after one day +if (nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get()) +m_nCurrentTip++; // save this time to the config now instead of in the dtor otherwise we // end up with multiple copies of this dialog every time we open a new // document if the first one isn't closed std::shared_ptr xChanges( comphelper::ConfigurationChanges::create()); -officecfg::Office::Common::Misc::LastTipOfTheDayShown::set(m_nDay, xChanges); +officecfg::Office::Common::Misc::LastTipOfTheDayShown::set(nDay, xChanges); xChanges->commit(); -if (m_nDay > officecfg::Office::Common::Misc::LastTipOfTheDayShown::get()) -m_nCurrentTip++; - UpdateTip(); } diff --git a/cui/source/inc/tipofthedaydlg.hxx b/cui/source/inc/tipofthedaydlg.hxx index f5f0ef999420..69af1996e454 100644 --- a/cui/source/inc/tipofthedaydlg.hxx +++ b/cui/source/inc/tipofthedaydlg.hxx @@ -36,7 +36,6 @@ private: std::unique_ptr m_pPreview; sal_Int32 m_nCurrentTip; -sal_Int32 m_nDay; void UpdateTip(); DECL_LINK(OnNextClick, weld::Button&, void); DECL_LINK(OnLinkClick, weld::LinkButton&, bool);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source sw/qa sw/source
cui/source/tabpages/numpages.cxx|2 sw/qa/uitest/writer_tests7/tdf144439.py | 111 sw/source/ui/misc/outline.cxx |7 -- 3 files changed, 115 insertions(+), 5 deletions(-) New commits: commit a913789e2f59bd38fd7c2f5e6325846f4365b696 Author: Vasily Melenchuk AuthorDate: Fri Sep 24 15:57:07 2021 +0300 Commit: Xisco Fauli CommitDate: Tue Oct 5 10:19:15 2021 +0200 tdf#144439: generate list format string on level change Changed values for included upper levels should cause generation of new list format string. Same applies to outlines editing. Change-Id: I90e19d6b5169f68c83ae3e55ec41b9016623d8ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122590 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123073 diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 8c14c9607fe1..5cad832dba79 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1616,6 +1616,8 @@ IMPL_LINK(SvxNumOptionsTabPage, AllLevelHdl_Impl, weld::SpinButton&, rBox, void) { SvxNumberFormat aNumFmt(pActNum->GetLevel(e)); aNumFmt.SetIncludeUpperLevels(static_cast(std::min(rBox.get_value(), int(e + 1))) ); +// Set the same prefix/suffix to generate list format with changed IncludedUpperLevels +aNumFmt.SetListFormat(aNumFmt.GetPrefix(), aNumFmt.GetSuffix(), e); pActNum->SetLevel(e, aNumFmt); } nMask <<= 1; diff --git a/sw/qa/uitest/writer_tests7/tdf144439.py b/sw/qa/uitest/writer_tests7/tdf144439.py new file mode 100644 index ..21992c1cb859 --- /dev/null +++ b/sw/qa/uitest/writer_tests7/tdf144439.py @@ -0,0 +1,111 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +from uitest.framework import UITestCase +from uitest.uihelper.common import type_text, select_by_text, select_pos, get_state_as_dict + +class tdf144439(UITestCase): + +def test_tdf144439_list(self): +self.ui_test.create_doc_in_start_center("writer") +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +# Enter some text +type_text(xWriterEdit, "List item") +# Apply numbering +self.xUITest.executeCommand(".uno:DefaultNumbering") +# Increase level up to 2 +self.xUITest.executeCommand(".uno:IncrementIndent") + + self.ui_test.execute_dialog_through_command(".uno:BulletsAndNumberingDialog") +# Select custom tab +xDialog = self.xUITest.getTopFocusWindow() +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "5") + +# Select numbering +xNumFmt = xDialog.getChild("numfmtlb") +select_by_text(xNumFmt, "1, 2, 3, ...") + +# Increase number of sublevels to show +xSubLevels = xDialog.getChild("sublevels") +xSubLevels.executeAction("UP", tuple()) + +xOkBtn = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOkBtn) + +document = self.ui_test.get_component() +Paragraphs = document.Text.createEnumeration() +Para1 = Paragraphs.nextElement() +self.assertEqual(Para1.String, "List item") +self.assertEqual(Para1.getPropertyValue("ListLabelString"), "1.1.") + +self.ui_test.close_doc() + +def test_tdf144439_outline(self): +self.ui_test.create_doc_in_start_center("writer") +xWriterDoc = self.xUITest.getTopFocusWindow() +xWriterEdit = xWriterDoc.getChild("writer_edit") +# Enter some text +type_text(xWriterEdit, "Outline2") +# Apply outline level 2 (as a style) + self.xUITest.executeCommand(".uno:StyleApply?Style:string=Heading%202:string=ParagraphStyles") + + self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog") +# Select level "2" +xDialog = self.xUITest.getTopFocusWindow() +xLevel = xDialog.getChild("level") +xLevel2 = xLevel.getChild("1") +xLevel2.executeAction("SELECT", tuple()) +self.assertEqual("2", get_state_as_dict(xLevel)['SelectEntryText']) + +# Select custom tab +xTab = xDialog.getChild("tabcontrol") +select_pos(xTab, "0") + +# Select numbering +xNumFmt = xDialog.getChild("numbering") +select_by_text(xNumFmt, "1, 2, 3, ...") + +# Increase number of sublevels to show +xSubLevels = xDialog.getChild("sublevelsnf") +xSubLevels.executeAction("UP", tuple()) + +xOkBtn = xDialog.getChild("ok") +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/options/optgdlg.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 2adcd82658f8c536e8288b4906b005b8ebe3fbb8 Author: Eike Rathke AuthorDate: Mon Sep 13 16:24:23 2021 +0200 Commit: Xisco Fauli CommitDate: Mon Sep 13 18:28:33 2021 +0200 Explicitly set cursor position for x11 'gen' backend, tdf#144457 follow-up ... (and other backends?) Change-Id: If45b83080aa2df50ef27ad282eb6fa1d4a022703 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122037 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 37e2e99f7a3018dce0337b582b139d41e1e81a9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122059 Reviewed-by: Xisco Fauli diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 4d376043ced7..baa96ad3166c 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1783,7 +1783,13 @@ IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, weld::Entry&, rEd, void ) } } if (bModified) -rEd.set_text(aBuf.makeStringAndClear()); // This even keeps the cursor position so all good. +{ +// gtk3 keeps the cursor position on equal length set_text() but at +// least the 'gen' backend does not and resets to 0. +const int nCursorPos = rEd.get_position(); +rEd.set_text(aBuf.makeStringAndClear()); +rEd.set_position(nCursorPos); +} if (bValid) rEd.set_message_type(weld::EntryMessageType::Normal); else
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/options/optgdlg.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit aa2ebf7d77527a12246797f637a06af0e9dea5f9 Author: Eike Rathke AuthorDate: Sun Sep 12 17:47:35 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Mon Sep 13 03:04:17 2021 +0200 Resolves: tdf#144457 Use weld::set_text() instead of replace_selection() ... to replace entire field with modified text, instead of inserting the text at the cursor position without selection, thus effectively duplicating it (modulo modification). Fallout from commit 08101a1ab3b5d7c41488e93a2af518462286844f CommitDate: Tue Jul 30 14:04:17 2019 +0200 weld OfaLanguagesTabPage that did if (bModified) -{ -// Do not use SetText(...,GetSelection()) because internally the -// reference's pointer of the selection is obtained resulting in the -// entire text being selected at the end. -Selection aSelection( rEd.GetSelection()); -rEd.SetText( aBuf.makeStringAndClear(), aSelection); -} +rEd.replace_selection(aBuf.makeStringAndClear()); replacing the workaround needed for the old toolkit with something similar from the new toolkit but behaving differently.. Change-Id: I9ff325eecd747bbecb36eb2a1150ae4472e475e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122000 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit db90a6cedbc261ad711ff13c4f69db65946486da) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121978 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index fd79d34926f1..4d376043ced7 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1783,7 +1783,7 @@ IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, weld::Entry&, rEd, void ) } } if (bModified) -rEd.replace_selection(aBuf.makeStringAndClear()); +rEd.set_text(aBuf.makeStringAndClear()); // This even keeps the cursor position so all good. if (bValid) rEd.set_message_type(weld::EntryMessageType::Normal); else
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/dialogs/SpellDialog.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 58d98eda287b68404c98900f65b146f53b016778 Author: Michael Stahl AuthorDate: Wed Sep 8 12:00:22 2021 +0200 Commit: Thorsten Behrens CommitDate: Thu Sep 9 10:57:25 2021 +0200 cui: fix spell check dialog pointlessly modifying text shape In Impress, closing the spell check dialog without doing any changes will replace the entire text of a shape, creating an sd::UndoObjectSetText and messing up the formatting. Apparently in commit bbb1428e3666acc7503d86704bbf1e1a4ac04795 a check of the modified flag was removed, but it's not obvious why, so add it back, which appears to fix the problem. Change-Id: I8ce6c75f097baa82f11f7b1c813262845001ae7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121807 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 73c8bd42650dafc38c87b5e6dc1ef222d4f6175c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121768 Reviewed-by: Thorsten Behrens diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index b583fa03768e..7b17b25e71f2 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -904,7 +904,10 @@ IMPL_LINK_NOARG(SpellDialog, ModifyHdl, LinkParamNone*, void) IMPL_LINK_NOARG(SpellDialog, CancelHdl, weld::Button&, void) { //apply changes and ignored text parts first - if there are any -rParent.ApplyChangedSentence(m_xSentenceED->CreateSpellPortions(), false); +if (m_xSentenceED->IsModified()) +{ +rParent.ApplyChangedSentence(m_xSentenceED->CreateSpellPortions(), false); +} Close(); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/tabpages/transfrm.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 53b534991b9eb516aac019a02b61d7b1dc9db28e Author: Caolán McNamara AuthorDate: Mon Aug 16 15:58:11 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Tue Aug 17 15:13:49 2021 +0200 Resolves: tdf#143785 save/restore SdrModel::IsChanged Change-Id: I253915c359cf72f80b21e21ff34e0ee406e5b3a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120550 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 6dc23567639bebf18ceb8d9a3721228bffe14202) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120577 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 94ff0ef49d20..ae844703ef67 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -648,6 +648,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) *pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj())); //save geometry +const bool bOrigModelChangeState = pView->GetModel()->IsChanged(); SdrCustomShapeGeometryItem aInitialGeometry(rSdrObjCustomShape.GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY)); EnhancedCustomShape2d aShape(rSdrObjCustomShape); @@ -691,6 +692,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) //restore geometry rSdrObjCustomShape.SetMergedItem(aInitialGeometry); +pView->GetModel()->SetChanged(bOrigModelChangeState); } for (int i = 0; i < 2; ++i)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/tabpages/numpages.cxx | 16 1 file changed, 12 insertions(+), 4 deletions(-) New commits: commit ec29cffe003f987a4d329b9467efb30bde39c66b Author: Andreas Heinisch AuthorDate: Thu Jul 1 11:59:35 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Jul 7 22:01:02 2021 +0200 tdf#114070 - Only show the last name of the filename without its extension In the bullets and numbering dialog, don't show the filename including its extension in the tooltip of the image. Change-Id: I2a37f79e8c57d3126e6607f01756771857440faa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118215 Tested-by: Jenkins Reviewed-by: Andreas Heinisch (cherry picked from commit 226f7e2ab96fce33a2705ad91ef0d539a6bad7b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118415 Reviewed-by: Xisco Fauli diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index a0d360622d0b..47542d147853 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -746,8 +746,12 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(weld::Container* pPage, weld::DialogC m_xExamplesVS->InsertItem( i + 1, i); INetURLObject aObj(grfName); -if(aObj.GetProtocol() == INetProtocol::File) -grfName = aObj.PathToFileName(); +if (aObj.GetProtocol() == INetProtocol::File) +{ +// tdf#114070 - only show the last name of the filename without its extension +aObj.removeExtension(); +grfName = aObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous); +} m_xExamplesVS->SetItemText( i + 1, grfName ); ++i; @@ -981,8 +985,12 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi { m_xExamplesVS->InsertItem( i + 1, i); INetURLObject aObj(grfName); -if(aObj.GetProtocol() == INetProtocol::File) -grfName = aObj.PathToFileName(); +if (aObj.GetProtocol() == INetProtocol::File) +{ +// tdf#114070 - only show the last name of the filename without its extension +aObj.removeExtension(); +grfName = aObj.GetLastName(INetURLObject::DecodeMechanism::Unambiguous); +} m_xExamplesVS->SetItemText( i + 1, grfName ); ++i; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source editeng/source include/editeng include/xmloff offapi/com schema/libreoffice sd/source svx/source sw/qa sw/source writerfilter/sour
cui/source/tabpages/numpages.cxx| 41 ++- editeng/source/items/numitem.cxx| 49 include/editeng/numitem.hxx |4 include/xmloff/xmltoken.hxx |1 offapi/com/sun/star/style/NumberingLevel.idl| 21 +++ schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |9 + sd/source/ui/dlg/BulletAndPositionDlg.cxx | 18 +-- svx/source/sidebar/nbdtmg.cxx | 10 - sw/qa/extras/odfexport/data/listformat.docx |binary sw/qa/extras/odfexport/data/listformat.odt |binary sw/qa/extras/odfexport/odfexport.cxx|2 sw/qa/extras/odfexport/odfexport2.cxx | 66 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |8 - sw/qa/extras/rtfexport/rtfexport.cxx|2 sw/qa/extras/ww8export/ww8export2.cxx | 18 --- sw/qa/extras/ww8export/ww8export3.cxx |6 - sw/qa/python/check_cross_references.py | 21 ++- sw/source/core/doc/number.cxx | 14 -- sw/source/filter/ww8/wrtw8num.cxx |2 sw/source/filter/ww8/ww8par3.cxx|4 sw/source/ui/misc/outline.cxx |4 writerfilter/source/dmapper/NumberingManager.cxx| 14 +- xmloff/source/core/xmltoken.cxx |1 xmloff/source/style/xmlnume.cxx | 24 +--- xmloff/source/style/xmlnumi.cxx | 27 xmloff/source/token/tokens.txt |1 26 files changed, 251 insertions(+), 116 deletions(-) New commits: commit 9987b518fca1476bd0ce8c86bcf6ac7c81f7b580 Author: Vasily Melenchuk AuthorDate: Mon Jun 14 14:27:56 2021 +0300 Commit: Thorsten Behrens CommitDate: Tue Jun 29 19:02:20 2021 +0200 new ODF numbered list parameter loext:num-list-format Instead of style:num-prefix and style:num-suffix new list format is much more flexible for storing list multilevel numberings. Now it is possible to have not just prefix/suffix but any random separators between levels, arbitrary levels order, etc. Internal LO format for list format is changed: instead of placeholders like %1, %2, etc we right now use %1%, %2%... Reason: for ODT documents, having more than 9 levels there is ambiguity in "%10": it is "%1" followed by "0" suffix, or "%10"? Aux changes: * removed zero width space hack: since format string is always defined this hack is interfering with standard list numbers printing (see changes in ooxmlexport14.cxx, ww8export3.cxx tests) * changed cross-references values to lists: they are now including full list label string: previously this was bit self-contradictory (see changes in odfexport.cxx and check_cross_references.py tests) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: I9696cc4846375c5f6222539aeaadbca5ae58ce27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117156 Tested-by: Jenkins Reviewed-by: Michael Stahl Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118040 Reviewed-by: Vasily Melenchuk diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index fbeb40aa4b3d..32063c6f1c5d 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -314,14 +314,8 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) { SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType(eNewType); -if(cLocalPrefix == ' ') -aFmt.SetPrefix( "" ); -else -aFmt.SetPrefix(_pSet->sPrefix); -if(cLocalSuffix == ' ') -aFmt.SetSuffix( "" ); -else -aFmt.SetSuffix(_pSet->sSuffix); +aFmt.SetListFormat(cLocalPrefix == ' ' ? "" : _pSet->sPrefix, + cLocalSuffix == ' ' ? "" : _pSet->sSuffix, i); aFmt.SetCharFormatName(""); aFmt.SetBulletRelSize(100); pActNum->SetLevel(i, aFmt); @@ -459,8 +453,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, void) SvxNumberFormat aFmt(pActNum->GetLevel(i)); aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL ); // #i93908# clear suffix for bullet lists -aFmt.SetPrefix( OUString() ); -aFmt.SetSuffix( OUString() ); +aFmt.SetListFormat("", "", i); aFmt.SetBulletFont(); aFmt.SetBulletChar(cChar );