core.git: framework/source sc/source
framework/source/uielement/langselectionstatusbarcontroller.cxx |5 - sc/source/ui/docshell/docsh4.cxx| 45 ++ 2 files changed, 33 insertions(+), 17 deletions(-) New commits: commit 64e1a5916367644ad3883a24ab1630d1340603b3 Author: Henry Castro AuthorDate: Wed Jan 17 16:25:41 2024 -0400 Commit: Henry Castro CommitDate: Fri Jan 26 19:41:14 2024 +0100 tdf#127856: fix setting "None" in cell format language Change-Id: I94dc0b1e7f0a52e8fb6da1f9b80456cec696a727 Signed-off-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162244 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 2d56c4186883..f5730ae7ee54 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -190,7 +190,10 @@ void LangSelectionStatusbarController::LangMenu( } else { -xPopupMenu->insertItem( MID_LANG_DEF_NONE, FwkResId(STR_LANGSTATUS_NONE), 0, MID_LANG_DEF_NONE ); +if (bCalc) +xPopupMenu->insertItem( MID_LANG_SEL_NONE, FwkResId(STR_LANGSTATUS_NONE), 0, MID_LANG_SEL_NONE ); +else +xPopupMenu->insertItem( MID_LANG_DEF_NONE, FwkResId(STR_LANGSTATUS_NONE), 0, MID_LANG_DEF_NONE ); if ( sNone == m_aCurLang ) xPopupMenu->checkItem( MID_LANG_DEF_NONE, true ); xPopupMenu->insertItem( MID_LANG_DEF_RESET, FwkResId(STR_RESET_TO_DEFAULT_LANGUAGE), 0, MID_LANG_DEF_RESET ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 82b874391f38..34e69724742c 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1301,28 +1301,41 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (bSelection) { ScTabViewShell* pViewShell = GetBestViewShell(); -const LanguageType nLangType = SvtLanguageTable::GetLanguageType(aLangText); -const SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType); - if (pViewShell) { const ScPatternAttr* pSelAttrs = pViewShell->GetSelectionPattern(); if (pSelAttrs) { const SfxItemSet& rOldSet = pSelAttrs->GetItemSet(); +SfxItemPool* pItemPool = rOldSet.GetPool(); auto pNewSet = std::make_shared(rOldSet); -if (nScriptType == SvtScriptType::LATIN) -pNewSet->Put(SvxLanguageItem(nLangType, - rOldSet.GetPool()->GetWhich(SID_ATTR_CHAR_LANGUAGE))); -if (nScriptType == SvtScriptType::COMPLEX) -pNewSet->Put(SvxLanguageItem(nLangType, - rOldSet.GetPool()->GetWhich(SID_ATTR_CHAR_CTL_LANGUAGE))); -if (nScriptType == SvtScriptType::ASIAN) -pNewSet->Put(SvxLanguageItem(nLangType, - rOldSet.GetPool()->GetWhich(SID_ATTR_CHAR_CJK_LANGUAGE))); - +if (aLangText == "LANGUAGE_NONE") +{ +pNewSet->Put(SvxLanguageItem(LANGUAGE_NONE, + pItemPool->GetWhich(SID_ATTR_CHAR_LANGUAGE))); +pNewSet->Put(SvxLanguageItem(LANGUAGE_NONE, + pItemPool->GetWhich(SID_ATTR_CHAR_CJK_LANGUAGE))); +pNewSet->Put(SvxLanguageItem(LANGUAGE_NONE, + pItemPool->GetWhich(SID_ATTR_CHAR_CTL_LANGUAGE))); +} +else +{ +const LanguageType nLangType = SvtLanguageTable::GetLanguageType(aLangText); +const SvtScriptType nScriptType = + SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType); +if (nScriptType == SvtScriptType::LATIN) +pNewSet->Put(SvxLanguageItem(nLangType, + pItemPool->GetWhich(SID_ATTR_CHAR_LANGUAGE))); +if (nScriptType == SvtScriptType::COMPLEX) +pNewSet->Put(SvxLanguageItem(nLangType, +
core.git: framework/source sc/source
framework/source/uielement/langselectionstatusbarcontroller.cxx |5 sc/source/ui/docshell/docsh4.cxx| 11 -- 2 files changed, 6 insertions(+), 10 deletions(-) New commits: commit 966f075a332b38a2689dad317d5d3c3fa61a1efb Author: Henry Castro AuthorDate: Wed Jan 24 09:51:17 2024 -0400 Commit: Henry Castro CommitDate: Fri Jan 26 19:40:54 2024 +0100 tdf#34142: update status language after the cell format language change Change-Id: Ieb97515cee469a54c5b28ac4477c9d0d78e2974c Signed-off-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162243 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 169583a76fcd..2d56c4186883 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -244,10 +244,7 @@ void LangSelectionStatusbarController::LangMenu( } else if (nId == MID_LANG_DEF_MORE) { -if (bCalc) -aBuff.append( ".uno:FormatCellDialog" ); -else -aBuff.append( ".uno:LanguageStatus?Language:string=*" ); +aBuff.append( ".uno:LanguageStatus?Language:string=*" ); } else if (MID_LANG_PARA_1 <= nId && nId <= MID_LANG_PARA_9) { diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 813d86785a7a..82b874391f38 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1252,12 +1252,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) sal_Int32 nPos = 0; if ( aLangText == "*" ) { -SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); -ScTabViewShell* pSh = GetBestViewShell(); -ScopedVclPtr pDlg(pFact->CreateVclDialog(pSh ? pSh->GetDialogParent() : nullptr, SID_LANGUAGE_OPTIONS)); -pDlg->Execute(); - -rDoc.GetLanguage( eLang, eCjk, eCtl ); +if (ScTabViewShell* pSh = GetBestViewShell()) +{ +pSh->ExecuteCellFormatDlg(rReq, "font"); +pBindings->Invalidate(SID_LANGUAGE_STATUS); +} } else if ( (nPos = aLangText.indexOf(aDocLangPrefix)) != -1 ) {
core.git: framework/source sc/source
framework/source/uielement/langselectionstatusbarcontroller.cxx |2 sc/source/ui/docshell/docsh4.cxx| 30 +- 2 files changed, 30 insertions(+), 2 deletions(-) New commits: commit fbbad70b9437aa2e96f004c530f2d552715cf810 Author: Henry Castro AuthorDate: Wed Dec 27 11:12:16 2023 -0400 Commit: Caolán McNamara CommitDate: Fri Jan 5 18:14:26 2024 +0100 tdf#127856: fix cell selection language Clicking the language in the popup Calc's status bar, it will change the cell range selection language property. Signed-off-by: Henry Castro Change-Id: I1cc218da44eff0a4d3acee7b089e54aaad474379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161371 Tested-by: Jenkins Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index f913688526db..169583a76fcd 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -212,7 +212,7 @@ void LangSelectionStatusbarController::LangMenu( if (MID_LANG_SEL_1 <= nId && nId <= MID_LANG_SEL_9) { -if (bWriter) +if (bWriter || bCalc) aBuff.append( ".uno:LanguageStatus?Language:string=Current_" ); else aBuff.append( ".uno:LanguageStatus?Language:string=Default_" ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 08a37c9e1b62..3e316ce9420f 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1290,7 +1290,35 @@ void ScDocShell::Execute( SfxRequest& rReq ) aLangText = aLangText.replaceAt( nPos, aParagraphLangPrefix.getLength(), u"" ); } -if (bSelection || bParagraph) +if (bSelection) +{ +ScTabViewShell* pViewShell = GetBestViewShell(); +const LanguageType nLangType = SvtLanguageTable::GetLanguageType(aLangText); +const SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(nLangType); + +if (pViewShell) +{ +const ScPatternAttr* pSelAttrs = pViewShell->GetSelectionPattern(); +if (pSelAttrs) +{ +const SfxItemSet& rOldSet = pSelAttrs->GetItemSet(); +auto pNewSet = std::make_shared(rOldSet); + +if (nScriptType == SvtScriptType::LATIN) +pNewSet->Put(SvxLanguageItem(nLangType, + rOldSet.GetPool()->GetWhich(SID_ATTR_CHAR_LANGUAGE))); +if (nScriptType == SvtScriptType::COMPLEX) +pNewSet->Put(SvxLanguageItem(nLangType, + rOldSet.GetPool()->GetWhich(SID_ATTR_CHAR_CJK_LANGUAGE))); +if (nScriptType == SvtScriptType::ASIAN) +pNewSet->Put(SvxLanguageItem(nLangType, + rOldSet.GetPool()->GetWhich(SID_ATTR_CHAR_CTL_LANGUAGE))); + +pViewShell->ApplyAttributes(*pNewSet, rOldSet); +} +} +} +else if (bParagraph) { ScViewData* pViewData = GetViewData(); if (!pViewData)
[Libreoffice-commits] core.git: framework/source sc/source
framework/source/loadenv/loadenv.cxx |4 ++-- sc/source/filter/inc/fapihelper.hxx |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 3c28c44a7acc42e89b4012557ca7e51a870043c8 Author: Andrea Gelmini AuthorDate: Sun Jul 29 19:03:48 2018 +0200 Commit: Jens Carl CommitDate: Sun Jul 29 20:11:35 2018 +0200 Fix typos Change-Id: I246d2f1681a7d833fc5f201bfdbacbe4fc3ae084 Reviewed-on: https://gerrit.libreoffice.org/58286 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 26f51f775049..33d4233cd441 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -601,14 +601,14 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString& // a Filter) can be found, which supports // this URL - it must be a loadable content. // Because both items are registered for types -// its enough to check for frame loaders only. +// it's enough to check for frame loaders only. // Mos of our filters are handled by our global // default loader. But there exist some specialized // loader, which does not work on top of filters! // So it's not enough to search on the filter configuration. // Further it's not enough to search for types! // Because there exist some types, which are referenced by -// other objects ... but not by filters nor frame loaders! +// other objects... but not by filters nor frame loaders! OUString sPROP_TYPES(PROP_TYPES); diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index c4d14a5b9aa2..f94fe6d525cc 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -112,7 +112,7 @@ public: explicit ScfPropertySet( const css::uno::Reference< InterfaceType >& xInterface ) { Set( xInterface ); } ~ScfPropertySet(); -//TOOD: +//TODO: ScfPropertySet(ScfPropertySet const &) = default; ScfPropertySet(ScfPropertySet &&) = default; ScfPropertySet & operator =(ScfPropertySet const &) = default; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits