drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 2 extensions/source/ole/oleobjw.cxx | 8 filter/uiconfig/ui/pdfgeneralpage.ui | 6 formula/uiconfig/ui/functionpage.ui | 2 helpcontent2 | 2 sc/inc/lookupcache.hxx | 3 sc/qa/unit/ucalc_condformat.cxx | 142 ++++- sc/source/core/data/table2.cxx | 51 ++ sc/source/core/inc/interpre.hxx | 6 sc/source/core/tool/interpr1.cxx | 406 ++-------------- sc/source/core/tool/lookupcache.cxx | 2 sc/uiconfig/scalc/ui/formulacalculationoptions.ui | 8 sc/uiconfig/scalc/ui/functionpanel.ui | 2 svx/uiconfig/ui/accessibilitychecklevel.ui | 4 sw/inc/tgrditem.hxx | 2 sw/source/core/layout/atrfrm.cxx | 20 sw/source/core/layout/pagechg.cxx | 4 sw/source/core/layout/paintfrm.cxx | 2 sw/source/core/text/guess.cxx | 2 sw/source/core/text/inftxt.cxx | 2 sw/source/core/text/itrform2.cxx | 2 sw/source/core/text/pormulti.cxx | 2 sw/source/core/text/portxt.cxx | 4 sw/source/core/txtnode/fntcache.cxx | 8 sw/source/filter/ww8/docxattributeoutput.cxx | 6 sw/source/filter/ww8/ww8atr.cxx | 6 sw/source/filter/ww8/ww8par6.cxx | 10 sw/source/ui/index/cnttab.cxx | 4 sw/source/ui/misc/pggrid.cxx | 14 sw/source/uibase/frmdlg/colex.cxx | 4 sw/source/uibase/utlui/attrdesc.cxx | 6 vcl/source/gdi/pdfwriter_impl.cxx | 6 32 files changed, 331 insertions(+), 417 deletions(-)
New commits: commit 85c8901dc2710e91bccb64cd7d8068441f42f65b Author: Olivier Hallot <[email protected]> AuthorDate: Sat Jan 25 18:50:32 2025 -0300 Commit: Gerrit Code Review <[email protected]> CommitDate: Sat Jan 25 22:50:32 2025 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 8477edf27300030dbdb6393c58430c2e290a2127 - Work on tables for dark mode + Center tables in main displays area + introduce stripes in table Change-Id: Ia27c944fe9a51089385b5c099eed853d467004bb Reviewed-on: https://gerrit.libreoffice.org/c/help/+/180745 Tested-by: Jenkins Reviewed-by: Olivier Hallot <[email protected]> diff --git a/helpcontent2 b/helpcontent2 index 5ef0e0459c7a..8477edf27300 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 5ef0e0459c7a86b8faf74470956a885feec43a35 +Subproject commit 8477edf27300030dbdb6393c58430c2e290a2127 commit a7406b7236703dcd95fbc3a1cd1d4b5efd374aa0 Author: Olivier Hallot <[email protected]> AuthorDate: Sat Jan 25 18:49:27 2025 -0300 Commit: Gerrit Code Review <[email protected]> CommitDate: Sat Jan 25 22:49:27 2025 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 5ef0e0459c7a86b8faf74470956a885feec43a35 - Remove unused transformation on no-script Change-Id: I8e1e5a236fe80993ea8f4a06404d0c3601411a56 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/180744 Reviewed-by: Olivier Hallot <[email protected]> Tested-by: Jenkins diff --git a/helpcontent2 b/helpcontent2 index b3d44a635cf6..5ef0e0459c7a 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit b3d44a635cf6f1dde13883262a259c0d73e020a0 +Subproject commit 5ef0e0459c7a86b8faf74470956a885feec43a35 commit d81fc1367653bba68ea08906364d3792dffc4596 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Jan 25 20:20:52 2025 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Jan 25 22:38:58 2025 +0100 Resolves: tdf#164853 find_if causing copy the pred param of: const std::pair<QueryKey, QueryCriteriaAndResult>& doesn't exactly match what the arg should be, which is const std::pair<const QueryKey, QueryCriteriaAndResult>& so an unecessary copy is silently created, add and use some typedefs to make this more straightforward. seen with: perf record -e mem_load_l3_hit_retired.xsnp_fwd -e mem_load_l3_hit_retired.xsnp_miss on profiling specifically for contested accesses, see tma_contested_accesses in perf -v Change-Id: I1d1a57e49a0f2af8bc57ca22ac4572c0246c719b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180753 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx index 00194ebd162c..bc50045f06a8 100644 --- a/sc/inc/lookupcache.hxx +++ b/sc/inc/lookupcache.hxx @@ -203,7 +203,8 @@ private: } }; - std::unordered_map< QueryKey, QueryCriteriaAndResult, QueryKey::Hash > maQueryMap; + typedef std::unordered_map<QueryKey, QueryCriteriaAndResult, QueryKey::Hash> QueryMap; + QueryMap maQueryMap; ScRange maRange; ScDocument * mpDoc; ScLookupCacheMap & mCacheMap; diff --git a/sc/source/core/tool/lookupcache.cxx b/sc/source/core/tool/lookupcache.cxx index d4c19a3c7e07..c405714f1e34 100644 --- a/sc/source/core/tool/lookupcache.cxx +++ b/sc/source/core/tool/lookupcache.cxx @@ -89,7 +89,7 @@ SCROW ScLookupCache::lookup( const QueryCriteria & rCriteria ) const { // try to find the row index for which we have already performed lookup auto it = std::find_if(maQueryMap.begin(), maQueryMap.end(), - [&rCriteria](const std::pair<QueryKey, QueryCriteriaAndResult>& rEntry) { + [&rCriteria](const QueryMap::value_type& rEntry) { return rEntry.second.maCriteria == rCriteria; }); if (it != maQueryMap.end()) commit 5e03f4d40c14cc79b1f3f790955196a31eec5d3c Author: Patrick Luby <[email protected]> AuthorDate: Sat Jan 25 11:12:12 2025 -0500 Commit: Patrick Luby <[email protected]> CommitDate: Sat Jan 25 20:04:16 2025 +0100 tdf#164223 invert alpha mask for JPEG images Change-Id: I6f1070b8cc38a56168ea5248fa4b011f04d83c71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180746 Reviewed-by: Patrick Luby <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index a284cbbcb541..c66370c31fe5 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9185,7 +9185,11 @@ void PDFWriterImpl::writeJPG( const JPGEmit& rObject ) { BitmapEmit aEmit; aEmit.m_nObject = nMaskObject; - aEmit.m_aBitmap = BitmapEx( rObject.m_aAlphaMask.GetBitmap(), rObject.m_aAlphaMask ); + // tdf#164223 invert alpha mask for JPEG images + AlphaMask aAlpha = rObject.m_aAlphaMask; + if( aAlpha.hasAlpha() ) + aAlpha.Invert(); + aEmit.m_aBitmap = BitmapEx( rObject.m_aAlphaMask.GetBitmap(), aAlpha ); writeBitmapObject( aEmit, true ); } commit 1c763a6b88c2efd425e764778fc8c709387cf2ff Author: Mike Kaganski <[email protected]> AuthorDate: Sat Jan 25 18:50:42 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Sat Jan 25 16:55:16 2025 +0100 tdf#160770: use OUString ctor that takes length, which allows nullptr bstrDescription can obviously be nullptr. Change-Id: I09f368a632143479c165cb0653a33aef26fe0e95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180743 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index d9c0296110fd..e3e5c23357f5 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -430,6 +430,8 @@ void SAL_CALL IUnknownWrapper::setValue( const OUString& aPropertyName, } } +static OUString BStrToOUString(BSTR s) { return OUString(o3tl::toU(s), SysStringLen(s)); } + Any SAL_CALL IUnknownWrapper::getValue( const OUString& aPropertyName ) { if ( ! m_spDispatch ) @@ -539,13 +541,13 @@ Any SAL_CALL IUnknownWrapper::getValue( const OUString& aPropertyName ) case DISP_E_BADPARAMCOUNT: case DISP_E_BADVARTYPE: case DISP_E_EXCEPTION: - throw RuntimeException(OUString(o3tl::toU(excepinfo.bstrDescription))); + throw RuntimeException(BStrToOUString(excepinfo.bstrDescription)); break; case DISP_E_MEMBERNOTFOUND: - throw UnknownPropertyException(OUString(o3tl::toU(excepinfo.bstrDescription))); + throw UnknownPropertyException(BStrToOUString(excepinfo.bstrDescription)); break; default: - throw RuntimeException(OUString(o3tl::toU(excepinfo.bstrDescription))); + throw RuntimeException(BStrToOUString(excepinfo.bstrDescription)); break; } } commit 62a4a9659c914a71c89e90c3a71538d45930597b Author: Xisco Fauli <[email protected]> AuthorDate: Sat Jan 25 12:38:44 2025 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Sat Jan 25 14:29:04 2025 +0100 sc: factor out some more code Change-Id: I604bf182e9ac6f34298f7193cfffd1cc818132b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180738 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 05419ea73f83..a2980401003f 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -735,6 +735,12 @@ private: void ScWrapCols(); void ScWrapRows(); +private: + void ScToColOrRow(bool bCol); + void ScWrapColsOrRows(bool bCols); + void ScTakeOrDrop(bool bTake); + +public: // If upon call rMissingField==true then the database field parameter may be // missing (Xcl DCOUNT() syntax), or may be faked as missing by having the // value 0.0 or being exactly the entire database range reference (old SO diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 7f955bc410f4..f8a77d522590 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -8816,7 +8816,7 @@ static void lcl_FillCell(const ScMatrixRef& pMatSource, const ScMatrixRef& pMatD } } -void ScInterpreter::ScDrop() +void ScInterpreter::ScTakeOrDrop(bool bTake) { sal_uInt8 nParamCount = GetByte(); if (!MustHaveParamCount(nParamCount, 1, 3)) @@ -8883,10 +8883,20 @@ void ScInterpreter::ScDrop() { if (o3tl::make_unsigned(std::abs(nArgCols.value())) < nsC) { - if (nArgCols.value() < 0) - nMaxCol = nsC + nArgCols.value(); + if (bTake) + { + if (nArgCols.value() < 0) + nMinCol = nsC + nArgCols.value(); + else + nMaxCol = nArgCols.value(); + } else - nMinCol = nArgCols.value(); + { + if (nArgCols.value() < 0) + nMaxCol = nsC + nArgCols.value(); + else + nMinCol = nArgCols.value(); + } } } @@ -8896,10 +8906,20 @@ void ScInterpreter::ScDrop() { if (o3tl::make_unsigned(std::abs(nArgRows.value())) < nsR) { - if (nArgRows.value() < 0) - nMaxRow = nsR + nArgRows.value(); + if (bTake) + { + if (nArgRows.value() < 0) + nMinRow = nsR + nArgRows.value(); + else + nMaxRow = nArgRows.value(); + } else - nMinRow = nArgRows.value(); + { + if (nArgRows.value() < 0) + nMaxRow = nsR + nArgRows.value(); + else + nMinRow = nArgRows.value(); + } } } @@ -8940,6 +8960,11 @@ void ScInterpreter::ScDrop() PushMatrix(pResMat); } +void ScInterpreter::ScDrop() +{ + ScTakeOrDrop(/*bTake*/ false); +} + void ScInterpreter::ScExpand() { sal_uInt8 nParamCount = GetByte(); @@ -9063,129 +9088,10 @@ void ScInterpreter::ScExpand() void ScInterpreter::ScTake() { - sal_uInt8 nParamCount = GetByte(); - if (!MustHaveParamCount(nParamCount, 1, 3)) - return; - - // 3rd argument optional - columns - std::optional<sal_Int32> nArgCols; - if (nParamCount == 3) - { - if (!IsMissing()) - nArgCols = GetInt32(); - else - Pop(); - } - - // 2nd argument optional - rows - std::optional<sal_Int32> nArgRows; - if (nParamCount >= 2) - { - if (!IsMissing()) - nArgRows = GetInt32(); - else - Pop(); - } - - // 1st argument: take unique search range - ScMatrixRef pMatSource = nullptr; - SCSIZE nsC = 0, nsR = 0; - switch (GetStackType()) - { - case svSingleRef: - case svDoubleRef: - case svMatrix: - case svExternalSingleRef: - case svExternalDoubleRef: - { - pMatSource = GetMatrix(); - if (!pMatSource) - { - PushIllegalParameter(); - return; - } - - pMatSource->GetDimensions(nsC, nsR); - } - break; - - default: - PushIllegalParameter(); - return; - } - - if (nGlobalError != FormulaError::NONE || nsC < 1 || nsR < 1) - { - PushIllegalArgument(); - return; - } - - std::vector<std::pair<SCSIZE, SCSIZE>> aResPos; - - SCSIZE nMinCol = 0; - SCSIZE nMaxCol = nsC; - if (nArgCols.has_value()) - { - if (o3tl::make_unsigned(std::abs(nArgCols.value())) < nsC) - { - if (nArgCols.value() < 0) - nMinCol = nsC + nArgCols.value(); - else - nMaxCol = nArgCols.value(); - } - } - - SCSIZE nMinRow = 0; - SCSIZE nMaxRow = nsR; - if (nArgRows.has_value()) - { - if (o3tl::make_unsigned(std::abs(nArgRows.value())) < nsR) - { - if (nArgRows.value() < 0) - nMinRow = nsR + nArgRows.value(); - else - nMaxRow = nArgRows.value(); - } - } - - for (SCSIZE col = nMinCol; col < nMaxCol; col++) - { - for (SCSIZE row = nMinRow; row < nMaxRow; row++) - { - aResPos.emplace_back(col, row); - } - } - - // No result - if (aResPos.size() == 0) - { - PushNA(); - return; - } - - SCSIZE nColumns = nMaxCol - nMinCol; - SCSIZE nRows = nMaxRow - nMinRow; - ScMatrixRef pResMat = GetNewMat(nColumns, nRows, /*bEmpty*/true); - if (!pResMat) - { - PushIllegalArgument(); - return; - } - - size_t iPos = 0; - for (SCSIZE col = 0; col < nColumns; ++col) - { - for (SCSIZE row = 0; row < nRows; ++row) - { - lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, col, row); - ++iPos; - } - } - - PushMatrix(pResMat); + ScTakeOrDrop(/*bTake*/ true); } -void ScInterpreter::ScToCol() +void ScInterpreter::ScToColOrRow(bool bCol) { sal_uInt8 nParamCount = GetByte(); if (!MustHaveParamCount(nParamCount, 1, 3)) @@ -9268,8 +9174,10 @@ void ScInterpreter::ScToCol() PushNA(); return; } + SCSIZE nColumns = bCol? 1 : aResPos.size(); + SCSIZE nRows = bCol? aResPos.size() : 1; - ScMatrixRef pResMat = GetNewMat(1, aResPos.size(), /*bEmpty*/true); + ScMatrixRef pResMat = GetNewMat(nColumns, nRows, /*bEmpty*/true); if (!pResMat) { PushIllegalArgument(); @@ -9279,110 +9187,23 @@ void ScInterpreter::ScToCol() // fill result matrix to the same column for (SCSIZE iPos = 0; iPos < aResPos.size(); ++iPos) { - lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, 0, iPos); + if (bCol) + lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, 0, iPos); + else + lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, iPos, 0); } PushMatrix(pResMat); } -void ScInterpreter::ScToRow() +void ScInterpreter::ScToCol() { - sal_uInt8 nParamCount = GetByte(); - if (!MustHaveParamCount(nParamCount, 1, 3)) - return; - - // 3rd argument optional - Scan_by_column: default FALSE - bool bByColumn = false; - if (nParamCount == 3) - bByColumn = GetBoolWithDefault(false); - - // 2nd argument optional - Ignore: default keep all values - IgnoreValues eIgnoreValues = IgnoreValues::DEFAULT; - if (nParamCount >= 2) - { - sal_Int32 k = GetInt32WithDefault(0); - if (k >= 0 && k <= 3) - eIgnoreValues = static_cast<IgnoreValues>(k); - else - { - PushIllegalParameter(); - return; - } - } - - // 1st argument: take torow range - ScMatrixRef pMatSource = nullptr; - SCSIZE nsC = 0, nsR = 0; - switch (GetStackType()) - { - case svSingleRef: - case svDoubleRef: - case svMatrix: - case svExternalSingleRef: - case svExternalDoubleRef: - { - pMatSource = GetMatrix(); - if (!pMatSource) - { - PushIllegalParameter(); - return; - } - - pMatSource->GetDimensions(nsC, nsR); - } - break; - - default: - PushIllegalParameter(); - return; - } - - if (nGlobalError != FormulaError::NONE || nsC < 1 || nsR < 1) - { - PushIllegalArgument(); - return; - } - - std::vector<std::pair<SCSIZE, SCSIZE>> aResPos; - SCSIZE nOut = bByColumn ? nsC : nsR; - SCSIZE nIn = bByColumn ? nsR : nsC; - - for (SCSIZE i = 0; i < nOut; i++) - { - for (SCSIZE j = 0; j < nIn; j++) - { - SCSIZE nCol = bByColumn ? i : j; - SCSIZE nRow = bByColumn ? j : i; - if ((eIgnoreValues == IgnoreValues::ALL || eIgnoreValues == IgnoreValues::BLANKS) && pMatSource->IsEmptyCell(nCol, nRow)) - continue; // Nothing to do - else if ((eIgnoreValues == IgnoreValues::ALL || eIgnoreValues == IgnoreValues::ERRORS) && pMatSource->GetError(nCol, nRow) != FormulaError::NONE) - continue; // Nothing to do - else - aResPos.emplace_back(nCol, nRow); - } - - } - // No result - if (aResPos.size() == 0) - { - PushNA(); - return; - } - - ScMatrixRef pResMat = GetNewMat(aResPos.size(), 1, /*bEmpty*/true); - if (!pResMat) - { - PushIllegalArgument(); - return; - } - - // fill result matrix to the same row - for (SCSIZE iPos = 0; iPos < aResPos.size(); ++iPos) - { - lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, iPos, 0); - } + ScToColOrRow(/*bCol*/ true); +} - PushMatrix(pResMat); +void ScInterpreter::ScToRow() +{ + ScToColOrRow(/*bCol*/ false); } void ScInterpreter::ScUnique() @@ -9718,7 +9539,7 @@ void ScInterpreter::ScSubTotal() PushTokenRef( xRef); } -void ScInterpreter::ScWrapCols() +void ScInterpreter::ScWrapColsOrRows(bool bCols) { sal_uInt8 nParamCount = GetByte(); if (!MustHaveParamCount(nParamCount, 2, 3)) @@ -9732,8 +9553,8 @@ void ScInterpreter::ScWrapCols() bDouble = GetDoubleOrString(fNumber, aString); // 2nd argument - wrap_count - SCSIZE nRows = GetInt32WithDefault(0); - if (nRows <= 0) + SCSIZE nWrap = GetInt32WithDefault(0); + if (nWrap <= 0) { PushIllegalParameter(); return; @@ -9788,142 +9609,57 @@ void ScInterpreter::ScWrapCols() return; } - SCSIZE nCols(std::ceil(aResPos.size() / static_cast<double>(nRows))); - ScMatrixRef pResMat = GetNewMat(nCols, nRows, /*bEmpty*/true); + SCSIZE nCeil = std::ceil(aResPos.size() / static_cast<double>(nWrap)); + SCSIZE nColumns = bCols ? nCeil : nWrap; + SCSIZE nRows = bCols ? nWrap : nCeil; + ScMatrixRef pResMat = GetNewMat(nColumns, nRows, /*bEmpty*/true); if (!pResMat) { PushIllegalArgument(); return; } + if (!bCols) + std::swap(nColumns, nRows); + size_t iPos = 0; - for (SCSIZE col = 0; col < nCols; ++col) + for (SCSIZE col = 0; col < nColumns; ++col) { for (SCSIZE row = 0; row < nRows; ++row) { + SCSIZE nC = bCols ? col : row; + SCSIZE nR = bCols ? row : col; if (iPos < aResPos.size()) { - lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, col, row); + lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, nC, nR); ++iPos; } else if (bDouble.has_value()) { if (bDouble.value()) - pResMat->PutDouble(fNumber, col, row); + pResMat->PutDouble(fNumber, nC, nR); else - pResMat->PutString(aString, col, row); + pResMat->PutString(aString, nC, nR); } else - pResMat->PutError(FormulaError::NotAvailable, col, row); + pResMat->PutError(FormulaError::NotAvailable, nC, nR); } } PushMatrix(pResMat); } -void ScInterpreter::ScWrapRows() +void ScInterpreter::ScWrapCols() { - sal_uInt8 nParamCount = GetByte(); - if (!MustHaveParamCount(nParamCount, 2, 3)) - return; - - // 3rd argument optional - pad_with - std::optional<bool> bDouble; - double fNumber(0.0); - svl::SharedString aString; - if (nParamCount == 3) - bDouble = GetDoubleOrString(fNumber, aString); - - // 2nd argument - wrap_count - SCSIZE nCols = GetInt32WithDefault(0); - if (nCols <= 0) - { - PushIllegalParameter(); - return; - } - - // 1st argument: take range - ScMatrixRef pMatSource = nullptr; - SCSIZE nsC = 0, nsR = 0; - switch (GetStackType()) - { - case svSingleRef: - case svDoubleRef: - case svMatrix: - case svExternalSingleRef: - case svExternalDoubleRef: - { - pMatSource = GetMatrix(); - if (!pMatSource) - { - PushIllegalParameter(); - return; - } - - pMatSource->GetDimensions(nsC, nsR); - } - break; - - default: - PushIllegalParameter(); - return; - } - - if (nGlobalError != FormulaError::NONE || nsC < 1 || nsR < 1 || (nsC > 1 && nsR > 1)) - { - PushIllegalArgument(); - return; - } - - std::vector<std::pair<SCSIZE, SCSIZE>> aResPos; - for (SCSIZE col = 0; col < nsC; col++) - { - for (SCSIZE row = 0; row < nsR; row++) - { - aResPos.emplace_back(col, row); - } - } - - // No result - if (aResPos.size() == 0) - { - PushNA(); - return; - } - - SCSIZE nRows(std::ceil(aResPos.size() / static_cast<double>(nCols))); - ScMatrixRef pResMat = GetNewMat(nCols, nRows, /*bEmpty*/true); - if (!pResMat) - { - PushIllegalArgument(); - return; - } - - size_t iPos = 0; - for (SCSIZE row = 0; row < nRows; ++row) - { - for (SCSIZE col = 0; col < nCols; ++col) - { - if (iPos < aResPos.size()) - { - lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, aResPos[iPos].second, col, row); - ++iPos; - } - else if (bDouble.has_value()) - { - if (bDouble.value()) - pResMat->PutDouble(fNumber, col, row); - else - pResMat->PutString(aString, col, row); - } - else - pResMat->PutError(FormulaError::NotAvailable, col, row); - } - } + ScWrapColsOrRows(/*bCols*/ true); +} - PushMatrix(pResMat); +void ScInterpreter::ScWrapRows() +{ + ScWrapColsOrRows(/*bCols*/ false); } + void ScInterpreter::ScAggregate() { sal_uInt8 nParamCount = GetByte(); commit 94f72a396b1e15e710163c37e175552c59048447 Author: Mike Kaganski <[email protected]> AuthorDate: Sat Jan 25 14:46:32 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Sat Jan 25 12:35:05 2025 +0100 tdf#164793: fix misplaced rounding Regression after commit bc0ab08634f59e1a1814e575fe6ad5e50bf1aee1, where I confused what neede to be rounded. Change-Id: Ib150ea1989ed7241747fe4a89bce051478a54bfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180737 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 579940313d6b..79eba7bb0024 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -797,7 +797,7 @@ void VclPixelProcessor2D::processFillHatchPrimitive2D( maCurrentTransformation * basegfx::B2DVector(rFillHatchAttributes.getDistance(), 0.0)); const sal_uInt32 nDistance(basegfx::fround(aDiscreteDistance.getLength())); const sal_uInt32 nAngle10( - basegfx::rad2deg<10>(basegfx::fround(rFillHatchAttributes.getAngle()))); + basegfx::fround(basegfx::rad2deg<10>(rFillHatchAttributes.getAngle()))); ::Hatch aVCLHatch(eHatchStyle, Color(rFillHatchAttributes.getColor()), nDistance, Degree10(nAngle10)); commit 2d1acf7dd0558f5c2575cef58df7db4e59181a68 Author: Mike Kaganski <[email protected]> AuthorDate: Sat Jan 25 13:06:35 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Sat Jan 25 11:46:52 2025 +0100 tdf#164844: handle colorscale and friends specially when deduplicating CF The conditional formats like colorscale, databar and iconset may take their whole range to calculate their maximum / minimum, and each cell format would depend on the CF range. Thus, automatic merge of ranges of similar CFs when copying/pasting could create unexpected results. E.g., merging CFs of two distinct color scales - one for a range from 1 to 10, and another from 100 to 500 - would change colors on both of them, which is usually not what user wants, even when these ranges are side by side in adjacent columns. On the other hand, users still may want to have a way to expand the range automatically. E.g., when there is a column from A1 to A10 with a colorscale, and the user copies a cell from that range to A11, it is very likely that the intention is to expand the existing CF, not to create a separate colorscale individually for the cell A11. This makes it necessary to create some complexity in deciding when to deduplicate, and when not. This change introduces a function for that, called isRangeDependentFormatNeedDeduplication; and implements some simple algorithm that currently only depends on analysis of the two CFs' ranges. If both ranges are one-dimensional vectors, and the new CF range "continues" the existing range (the edges of the two vectors are adjacent), then it decides to combine them into one expanded CF. Also, if the new range is completely inside the old one (which may easily happen, when a user copies a cell from one place to another inside the same range), it also allows deduplication. In other cases, it rejects deduplication, requiring creation of a new CF. It may be extended as needed. One possible improvement could be e.g. when a user has a two-dimensional colorscale block, and copies some of its rows below, then it would be likely that the intention is to expand the range of existing CF, rather than creating a new one for the expanded range. This would need some specification how to tell this case from others that must not deduplicate. I must note that this problem is indeed difficult: e.g., in Excel, there is also no simple logic around copying such CF. I saw very odd cases, where the copy resulted in merging ranges of existing CF, or in creation of new CF; also, it could even magically add cells to existing CFs without copy - just by entering data below existing CF (and even when there was some gap between the existing CF range and the newly entered data - but not when there was two gaps). So there likely will always be some corner cases where users expect something else. This changes the behavior established in commits 3f614f431475e1bf3bb3bbeac59b0681309628b7 (tdf#95295: don't add duplicate conditional formats, 2017-12-11), 3fa15dd614bd72ddb36dbe033abeef5609d31f38 (tdf#154906 tdf#129813 tdf#129814 sc: fix conditional format color scale, 2023-04-26) and 8af6c46a9c0e86bbbd908e96ff236ad1d6c4ddab (tdf#155319 sc: fix conditional format data bar after copying, 2023-05-22) regarding the mentioned types of CF. Change-Id: Ie94167bbf66e448a6b56ad0962cb38221aa7d4b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180735 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx index 87a169b1a2c5..56ebcd01e3eb 100644 --- a/sc/qa/unit/ucalc_condformat.cxx +++ b/sc/qa/unit/ucalc_condformat.cxx @@ -305,7 +305,7 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testDataBarCondCopyPaste) pDatabar->SetDataBarData(pFormatData); pFormat->AddEntry(pDatabar); - sal_uInt32 nIndex = m_pDoc->AddCondFormat(std::move(pFormat), 0); + sal_uInt32 nIndex0 = m_pDoc->AddCondFormat(std::move(pFormat), 0); ScDocument aClipDoc(SCDOCMODE_CLIP); copyToClip(m_pDoc, aCondFormatRange, &aClipDoc); @@ -313,11 +313,11 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testDataBarCondCopyPaste) ScRange aTargetRange(0, 3, 0, 2, 3, 0); pasteFromClip(m_pDoc, aTargetRange, &aClipDoc); - // Pasting the same conditional format must modify existing format, making its range - // combined of previous range and newly pasted range having the conditional format. - // No new conditional formats must be created. - CPPUNIT_ASSERT_EQUAL(size_t(1), m_pDoc->GetCondFormList(0)->size()); - aRangeList.Join(aTargetRange); + // Pasting the same conditional databar format into a non-adjacent range must create a new + // format. + sal_uInt32 nIndex1 = m_pDoc->GetCondFormat(0, 3, 0)->GetKey(); + CPPUNIT_ASSERT_EQUAL(size_t(2), m_pDoc->GetCondFormList(0)->size()); + aRangeList = aTargetRange; for (SCCOL nCol = 0; nCol < 3; ++nCol) { ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(nCol, 3, 0); @@ -325,13 +325,68 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testDataBarCondCopyPaste) CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); sal_uInt32 nPastedKey = pPastedFormat->GetKey(); - CPPUNIT_ASSERT_EQUAL(nIndex, nPastedKey); + CPPUNIT_ASSERT(nIndex0 != nPastedKey); + CPPUNIT_ASSERT_EQUAL(nIndex1, nPastedKey); const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 3, 0, ATTR_CONDITIONAL); const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); CPPUNIT_ASSERT(pCondFormatItem); CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); - CPPUNIT_ASSERT_EQUAL(nIndex, pCondFormatItem->GetCondFormatData().front()); + CPPUNIT_ASSERT_EQUAL(nPastedKey, pCondFormatItem->GetCondFormatData().front()); + } + + // Now paste next to the previous range (immediately below) + aTargetRange = ScRange(0, 4, 0, 2, 4, 0); + pasteFromClip(m_pDoc, aTargetRange, &aClipDoc); + + // Pasting the same conditional databar format into an adjacent range (not continuing the row) + // must create a new format. + sal_uInt32 nIndex2 = m_pDoc->GetCondFormat(0, 4, 0)->GetKey(); + CPPUNIT_ASSERT_EQUAL(size_t(3), m_pDoc->GetCondFormList(0)->size()); + aRangeList = aTargetRange; + for (SCCOL nCol = 0; nCol < 3; ++nCol) + { + ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(nCol, 4, 0); + CPPUNIT_ASSERT(pPastedFormat); + CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); + + sal_uInt32 nPastedKey = pPastedFormat->GetKey(); + CPPUNIT_ASSERT(nIndex0 != nPastedKey); + CPPUNIT_ASSERT(nIndex1 != nPastedKey); + CPPUNIT_ASSERT_EQUAL(nIndex2, nPastedKey); + + const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 4, 0, ATTR_CONDITIONAL); + const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); + CPPUNIT_ASSERT(pCondFormatItem); + CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); + CPPUNIT_ASSERT_EQUAL(nPastedKey, pCondFormatItem->GetCondFormatData().front()); + } + + // Now paste next to the previous range (immediately to the right) + aTargetRange = ScRange(3, 4, 0, 5, 4, 0); + pasteFromClip(m_pDoc, aTargetRange, &aClipDoc); + + // Pasting the same conditional databar format into an adjacent range (continuing the row) must + // modify existing format, making its range combined of previous range and newly pasted range + // having the conditional format. No new conditional formats must be created. + CPPUNIT_ASSERT_EQUAL(size_t(3), m_pDoc->GetCondFormList(0)->size()); + aRangeList.Join(aTargetRange); + for (SCCOL nCol = 3; nCol < 6; ++nCol) + { + ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(nCol, 4, 0); + CPPUNIT_ASSERT(pPastedFormat); + CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); + + sal_uInt32 nPastedKey = pPastedFormat->GetKey(); + CPPUNIT_ASSERT(nIndex0 != nPastedKey); + CPPUNIT_ASSERT(nIndex1 != nPastedKey); + CPPUNIT_ASSERT_EQUAL(nIndex2, nPastedKey); + + const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 4, 0, ATTR_CONDITIONAL); + const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); + CPPUNIT_ASSERT(pCondFormatItem); + CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); + CPPUNIT_ASSERT_EQUAL(nPastedKey, pCondFormatItem->GetCondFormatData().front()); } m_pDoc->DeleteTab(0); @@ -407,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testColorScaleCondCopyPaste) pColorScaleFormat->AddEntry(pEntryRed); pFormat->AddEntry(pColorScaleFormat); - sal_uInt32 nIndex = m_pDoc->AddCondFormat(std::move(pFormat), 0); + sal_uInt32 nIndex0 = m_pDoc->AddCondFormat(std::move(pFormat), 0); ScDocument aClipDoc(SCDOCMODE_CLIP); copyToClip(m_pDoc, aCondFormatRange, &aClipDoc); @@ -415,11 +470,11 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testColorScaleCondCopyPaste) ScRange aTargetRange(0, 3, 0, 2, 3, 0); pasteFromClip(m_pDoc, aTargetRange, &aClipDoc); - // Pasting the same conditional format must modify existing format, making its range - // combined of previous range and newly pasted range having the conditional format. - // No new conditional formats must be created. - CPPUNIT_ASSERT_EQUAL(size_t(1), m_pDoc->GetCondFormList(0)->size()); - aRangeList.Join(aTargetRange); + // Pasting the same conditional databar format into a non-adjacent range must create a new + // format. + sal_uInt32 nIndex1 = m_pDoc->GetCondFormat(0, 3, 0)->GetKey(); + CPPUNIT_ASSERT_EQUAL(size_t(2), m_pDoc->GetCondFormList(0)->size()); + aRangeList = aTargetRange; for (SCCOL nCol = 0; nCol < 3; ++nCol) { ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(nCol, 3, 0); @@ -427,13 +482,68 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testColorScaleCondCopyPaste) CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); sal_uInt32 nPastedKey = pPastedFormat->GetKey(); - CPPUNIT_ASSERT_EQUAL(nIndex, nPastedKey); + CPPUNIT_ASSERT(nIndex0 != nPastedKey); + CPPUNIT_ASSERT_EQUAL(nIndex1, nPastedKey); const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 3, 0, ATTR_CONDITIONAL); const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); CPPUNIT_ASSERT(pCondFormatItem); CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); - CPPUNIT_ASSERT_EQUAL(sal_uInt32(nIndex), pCondFormatItem->GetCondFormatData().front()); + CPPUNIT_ASSERT_EQUAL(nPastedKey, pCondFormatItem->GetCondFormatData().front()); + } + + // Now paste next to the previous range (immediately below) + aTargetRange = ScRange(0, 4, 0, 2, 4, 0); + pasteFromClip(m_pDoc, aTargetRange, &aClipDoc); + + // Pasting the same conditional databar format into an adjacent range (not continuing the row) + // must create a new format. + sal_uInt32 nIndex2 = m_pDoc->GetCondFormat(0, 4, 0)->GetKey(); + CPPUNIT_ASSERT_EQUAL(size_t(3), m_pDoc->GetCondFormList(0)->size()); + aRangeList = aTargetRange; + for (SCCOL nCol = 0; nCol < 3; ++nCol) + { + ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(nCol, 4, 0); + CPPUNIT_ASSERT(pPastedFormat); + CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); + + sal_uInt32 nPastedKey = pPastedFormat->GetKey(); + CPPUNIT_ASSERT(nIndex0 != nPastedKey); + CPPUNIT_ASSERT(nIndex1 != nPastedKey); + CPPUNIT_ASSERT_EQUAL(nIndex2, nPastedKey); + + const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 4, 0, ATTR_CONDITIONAL); + const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); + CPPUNIT_ASSERT(pCondFormatItem); + CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); + CPPUNIT_ASSERT_EQUAL(nPastedKey, pCondFormatItem->GetCondFormatData().front()); + } + + // Now paste next to the previous range (immediately to the right) + aTargetRange = ScRange(3, 4, 0, 5, 4, 0); + pasteFromClip(m_pDoc, aTargetRange, &aClipDoc); + + // Pasting the same conditional databar format into an adjacent range (continuing the row) must + // modify existing format, making its range combined of previous range and newly pasted range + // having the conditional format. No new conditional formats must be created. + CPPUNIT_ASSERT_EQUAL(size_t(3), m_pDoc->GetCondFormList(0)->size()); + aRangeList.Join(aTargetRange); + for (SCCOL nCol = 3; nCol < 6; ++nCol) + { + ScConditionalFormat* pPastedFormat = m_pDoc->GetCondFormat(nCol, 4, 0); + CPPUNIT_ASSERT(pPastedFormat); + CPPUNIT_ASSERT_EQUAL(aRangeList, pPastedFormat->GetRange()); + + sal_uInt32 nPastedKey = pPastedFormat->GetKey(); + CPPUNIT_ASSERT(nIndex0 != nPastedKey); + CPPUNIT_ASSERT(nIndex1 != nPastedKey); + CPPUNIT_ASSERT_EQUAL(nIndex2, nPastedKey); + + const SfxPoolItem* pItem = m_pDoc->GetAttr(nCol, 4, 0, ATTR_CONDITIONAL); + const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); + CPPUNIT_ASSERT(pCondFormatItem); + CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); + CPPUNIT_ASSERT_EQUAL(nPastedKey, pCondFormatItem->GetCondFormatData().front()); } m_pDoc->DeleteTab(0); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 1c2325ea0912..6b320dd64a95 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -589,6 +589,52 @@ void ScTable::CopyCellToDocument(SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, S namespace { +bool isFormatDependentOnRange(const ScConditionalFormat& rFormat) +{ + for (size_t i = 0; i < rFormat.size(); ++i) + if (auto* entry = rFormat.GetEntry(i)) + if (auto type = entry->GetType(); type == ScFormatEntry::Type::Colorscale + || type == ScFormatEntry::Type::Databar + || type == ScFormatEntry::Type::Iconset) + return true; + return false; +} + +bool isRangeDependentFormatNeedDeduplication(const ScRangeList& rOld, const ScRangeList& rNew) +{ + // Are they two adjacent vectors? + if (rOld.size() == 1 && rNew.size() == 1) + { + // Test vertical vectors + if (rOld[0].aStart.Col() == rOld[0].aEnd.Col() && rNew[0].aStart.Col() == rNew[0].aEnd.Col() + && rNew[0].aStart.Col() == rOld[0].aStart.Col()) + { + if (rOld[0].aEnd.Row() == rNew[0].aStart.Row() - 1 + || rNew[0].aEnd.Row() == rOld[0].aStart.Row() - 1) + { + return true; // Two joining vertical vectors -> merge + } + } + // Test horizontal vectors + if (rOld[0].aStart.Row() == rOld[0].aEnd.Row() && rNew[0].aStart.Row() == rNew[0].aEnd.Row() + && rNew[0].aStart.Row() == rOld[0].aStart.Row()) + { + if (rOld[0].aEnd.Col() == rNew[0].aStart.Col() - 1 + || rNew[0].aEnd.Col() == rOld[0].aStart.Col() - 1) + { + return true; // Two joining horizontal vectors -> merge + } + } + } + + // Is the new one fully included into the old one? + for (auto& range : rNew) + if (!rOld.Contains(range)) + return false; // Different ranges, no deduplication + + return true; // New is completely inside old -> merge (in fact, this means "nothing to do") +} + bool CheckAndDeduplicateCondFormat(ScDocument& rDocument, ScConditionalFormat* pOldFormat, const ScConditionalFormat* pNewFormat, SCTAB nTab) { if (!pOldFormat) @@ -598,6 +644,11 @@ bool CheckAndDeduplicateCondFormat(ScDocument& rDocument, ScConditionalFormat* p { const ScRangeList& rNewRangeList = pNewFormat->GetRange(); ScRangeList& rDstRangeList = pOldFormat->GetRangeList(); + + if (isFormatDependentOnRange(*pOldFormat) + && !isRangeDependentFormatNeedDeduplication(rDstRangeList, rNewRangeList)) + return false; // No deduplication, create new format + for (size_t i = 0; i < rNewRangeList.size(); ++i) { rDstRangeList.Join(rNewRangeList[i]); commit 5247f456e536b7c7687f6c5b97b12c5d45b2f962 Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 24 21:14:37 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Jan 25 11:43:43 2025 +0100 convert SwTextGrid to scoped enum Change-Id: I0c317a0bd1e91ed9399e5436bd2b0d7d26173ffc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180736 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx index 0836fb731d8b..c787b165c7f8 100644 --- a/sw/inc/tgrditem.hxx +++ b/sw/inc/tgrditem.hxx @@ -27,7 +27,7 @@ class IntlWrapper; -enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS }; +enum class SwTextGrid { NONE, LinesOnly, LinesAndChars }; class SW_DLLPUBLIC SwTextGridItem final : public SfxPoolItem { diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index bd5d65a9e9b1..6b438735c810 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2381,7 +2381,7 @@ bool SwFormatLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SwTextGridItem::SwTextGridItem() : SfxPoolItem( RES_TEXTGRID ) , m_aColor( COL_LIGHTGRAY ), m_nLines( 20 ) - , m_nBaseHeight( 400 ), m_nRubyHeight( 200 ), m_eGridType( GRID_NONE ) + , m_nBaseHeight( 400 ), m_nRubyHeight( 200 ), m_eGridType( SwTextGrid::NONE ) , m_bRubyTextBelow( false ), m_bPrintGrid( true ), m_bDisplayGrid( true ) , m_nBaseWidth(400), m_bSnapToChars( true ), m_bSquaredMode(true) { @@ -2452,13 +2452,13 @@ bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const case MID_GRID_TYPE: switch( GetGridType() ) { - case GRID_NONE: + case SwTextGrid::NONE: rVal <<= text::TextGridMode::NONE; break; - case GRID_LINES_ONLY: + case SwTextGrid::LinesOnly: rVal <<= text::TextGridMode::LINES; break; - case GRID_LINES_CHARS: + case SwTextGrid::LinesAndChars: rVal <<= text::TextGridMode::LINES_AND_CHARS; break; default: @@ -2555,13 +2555,13 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) switch( nTmp ) { case text::TextGridMode::NONE: - SetGridType( GRID_NONE ); + SetGridType( SwTextGrid::NONE ); break; case text::TextGridMode::LINES: - SetGridType( GRID_LINES_ONLY ); + SetGridType( SwTextGrid::LinesOnly ); break; case text::TextGridMode::LINES_AND_CHARS: - SetGridType( GRID_LINES_CHARS ); + SetGridType( SwTextGrid::LinesAndChars ); break; default: bRet = false; @@ -2596,7 +2596,7 @@ void SwTextGridItem::SwitchPaperMode(bool bNew) } // use default value when grid is disable - if (m_eGridType == GRID_NONE) + if (m_eGridType == SwTextGrid::NONE) { m_bSquaredMode = bNew; Init(); @@ -2627,7 +2627,7 @@ void SwTextGridItem::Init() m_nLines = 20; m_nBaseHeight = 400; m_nRubyHeight = 200; - m_eGridType = GRID_NONE; + m_eGridType = SwTextGrid::NONE; m_bRubyTextBelow = false; m_bPrintGrid = true; m_bDisplayGrid = true; @@ -2639,7 +2639,7 @@ void SwTextGridItem::Init() m_nLines = 44; m_nBaseHeight = 312; m_nRubyHeight = 0; - m_eGridType = GRID_NONE; + m_eGridType = SwTextGrid::NONE; m_bRubyTextBelow = false; m_bPrintGrid = true; m_bDisplayGrid = true; diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index cc7fac4b1bba..2d61df056784 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -128,7 +128,7 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder SwRectFnSet aRectFnSet(this); tools::Long nSize = aRectFnSet.GetWidth(getFrameArea()); tools::Long nBorder = 0; - if( GRID_LINES_CHARS == pGrid->GetGridType() ) + if( SwTextGrid::LinesAndChars == pGrid->GetGridType() ) { //for textgrid refactor SwDoc *pDoc = GetFormat()->GetDoc(); @@ -2740,7 +2740,7 @@ SwTextGridItem const* GetGridItem(SwPageFrame const*const pPage) { SwTextGridItem const& rGridItem( pPage->GetPageDesc()->GetMaster().GetTextGrid()); - if (GRID_NONE != rGridItem.GetGridType()) + if (SwTextGrid::NONE != rGridItem.GetGridType()) { return &rGridItem; } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index d8b2a541dbf7..39d43341148e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5900,7 +5900,7 @@ void SwPageFrame::PaintGrid( OutputDevice const * pOut, SwRect const &rRect ) co return; bool bGrid = pGrid->GetRubyTextBelow(); - bool bCell = GRID_LINES_CHARS == pGrid->GetGridType(); + bool bCell = SwTextGrid::LinesAndChars == pGrid->GetGridType(); tools::Long nGrid = pGrid->GetBaseHeight(); const SwDoc* pDoc = GetFormat()->GetDoc(); tools::Long nGridWidth = GetGridWidth(*pGrid, *pDoc); diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index 81ca87b15113..680411147a35 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -215,7 +215,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, { SwTextGridItem const*const pGrid( GetGridItem(rInf.GetTextFrame()->FindPageFrame())); - bAddItalic = !pGrid || GRID_LINES_CHARS != pGrid->GetGridType(); + bAddItalic = !pGrid || SwTextGrid::LinesAndChars != pGrid->GetGridType(); } // do not add extra italic value for an isolated blank: diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index df6c455a74eb..ddb68fd8ef4e 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -328,7 +328,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF bool bGridEnabled = false; if (SwTextGridItem const* pGrid = GetGridItem(m_pFrame->FindPageFrame()); pGrid) { - bGridEnabled = (pGrid->GetGridType() != GRID_NONE); + bGridEnabled = (pGrid->GetGridType() != SwTextGrid::NONE); } SetSnapToGrid(m_pFrame->GetTextNodeForParaProps()->GetSwAttrSet().GetParaGrid().GetValue() diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 9c9604873471..8427ceec8757 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -442,7 +442,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) // Asian grid stuff SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); const bool bHasGrid = pGrid && rInf.SnapToGrid() && - GRID_LINES_CHARS == pGrid->GetGridType(); + SwTextGrid::LinesAndChars == pGrid->GetGridType(); const SwDoc & rDoc = rInf.GetTextFrame()->GetDoc(); diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index cdd52ee951fa..50e9a13ebd4a 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -2143,7 +2143,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, bool bRet = false; SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); - const bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType(); + const bool bHasGrid = pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType(); bool bRubyTop = false; diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 8fd5f1c07623..ff8f05e28197 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -656,7 +656,7 @@ TextFrameIndex SwTextPortion::GetSpaceCnt(const SwTextSizeInfo &rInf, if ( rInf.SnapToGrid() ) { SwTextGridItem const*const pGrid(GetGridItem(rInf.GetTextFrame()->FindPageFrame())); - if (pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars()) + if (pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType() && pGrid->IsSnapToChars()) return TextFrameIndex(0); } @@ -696,7 +696,7 @@ SwTwips SwTextPortion::CalcSpacing( tools::Long nSpaceAdd, const SwTextSizeInfo if ( rInf.SnapToGrid() ) { SwTextGridItem const*const pGrid(GetGridItem(rInf.GetTextFrame()->FindPageFrame())); - if (pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars()) + if (pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType() && pGrid->IsSnapToChars()) return 0; } diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 740c419a7d25..cab1e6102a3f 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1021,7 +1021,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); // ASIAN LINE AND CHARACTER GRID MODE - if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() ) + if ( pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType() ) { //for textgrid refactor const SwDoc* pDoc = rInf.GetShell()->GetDoc(); @@ -1663,7 +1663,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) SwFontScript::CJK == rInf.GetFont()->GetActual() ) { SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); - if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() ) + if ( pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType() ) { const SwDoc* pDoc = rInf.GetShell()->GetDoc(); const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); @@ -1810,7 +1810,7 @@ TextFrameIndex SwFntObj::GetModelPositionForViewPoint(SwDrawTextInfo &rInf) rInf.GetFont() && SwFontScript::CJK == rInf.GetFont()->GetActual() ) { SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); - if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() ) + if ( pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType() ) { const SwDoc* pDoc = rInf.GetShell()->GetDoc(); const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); @@ -2086,7 +2086,7 @@ TextFrameIndex SwFont::GetTextBreak(SwDrawTextInfo const & rInf, tools::Long nTe rInf.GetFont() && SwFontScript::CJK == rInf.GetFont()->GetActual() ) { SwTextGridItem const*const pGrid(GetGridItem(rInf.GetFrame()->FindPageFrame())); - if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() ) + if ( pGrid && SwTextGrid::LinesAndChars == pGrid->GetGridType() ) { const SwDoc* pDoc = rInf.GetShell()->GetDoc(); const sal_uInt16 nGridWidth = GetGridWidth(*pGrid, *pDoc); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 5fc619f3ecb2..2f162eabca9c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -10087,13 +10087,13 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid ) switch ( rGrid.GetGridType( ) ) { default: - case GRID_NONE: + case SwTextGrid::NONE: sGridType = "default"; break; - case GRID_LINES_ONLY: + case SwTextGrid::LinesOnly: sGridType = "lines"; break; - case GRID_LINES_CHARS: + case SwTextGrid::LinesAndChars: if ( rGrid.IsSnapToChars( ) ) sGridType = "snapToChars"; else diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 3fbd6d4f4bbd..53a043616d34 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -4301,13 +4301,13 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid ) default: OSL_FAIL("Unknown grid type"); [[fallthrough]]; - case GRID_NONE: + case SwTextGrid::NONE: nGridType = 0; break; - case GRID_LINES_ONLY: + case SwTextGrid::LinesOnly: nGridType = 2; break; - case GRID_LINES_CHARS: + case SwTextGrid::LinesAndChars: if ( rGrid.IsSnapToChars() ) nGridType = 3; else diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 4ba3fb42a401..5423a52f4043 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -236,26 +236,26 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrameFormat &rFormat, const wwSection &r SwTextGridItem aGrid; aGrid.SetDisplayGrid(false); aGrid.SetPrintGrid(false); - SwTextGrid eType=GRID_NONE; + SwTextGrid eType=SwTextGrid::NONE; switch (rSection.maSep.clm) { case 0: - eType = GRID_NONE; + eType = SwTextGrid::NONE; break; default: OSL_ENSURE(false, "Unknown grid type"); [[fallthrough]]; case 3: - eType = GRID_LINES_CHARS; + eType = SwTextGrid::LinesAndChars; aGrid.SetSnapToChars(true); break; case 1: - eType = GRID_LINES_CHARS; + eType = SwTextGrid::LinesAndChars; aGrid.SetSnapToChars(false); break; case 2: - eType = GRID_LINES_ONLY; + eType = SwTextGrid::LinesOnly; break; } diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index d4a97633feb7..743a108e1d73 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -169,9 +169,9 @@ void SwTextGridPage::Reset(const SfxItemSet *rSet) weld::RadioButton* pButton = nullptr; switch(rGridItem.GetGridType()) { - case GRID_NONE : pButton = m_xNoGridRB.get(); break; - case GRID_LINES_ONLY : pButton = m_xLinesGridRB.get(); break; - default: pButton = m_xCharsGridRB.get(); + case SwTextGrid::NONE : pButton = m_xNoGridRB.get(); break; + case SwTextGrid::LinesOnly: pButton = m_xLinesGridRB.get(); break; + default: pButton = m_xCharsGridRB.get(); } pButton->set_active(true); m_xDisplayCB->set_active(rGridItem.IsDisplayGrid()); @@ -225,8 +225,8 @@ DeactivateRC SwTextGridPage::DeactivatePage( SfxItemSet* ) void SwTextGridPage::PutGridItem(SfxItemSet& rSet) { SwTextGridItem aGridItem; - aGridItem.SetGridType(m_xNoGridRB->get_active() ? GRID_NONE : - m_xLinesGridRB->get_active() ? GRID_LINES_ONLY : GRID_LINES_CHARS ); + aGridItem.SetGridType(m_xNoGridRB->get_active() ? SwTextGrid::NONE : + m_xLinesGridRB->get_active() ? SwTextGrid::LinesOnly : SwTextGrid::LinesAndChars ); aGridItem.SetSnapToChars(m_xSnapToCharsCB->get_active()); aGridItem.SetLines( static_cast< sal_Int32 >(m_xLinesPerPageNF->get_value()) ); aGridItem.SetBaseHeight( static_cast< sal_uInt16 >( @@ -247,9 +247,9 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet) rSet.Put(aGridItem); SwView * pView = ::GetActiveView(); - if (pView && aGridItem.GetGridType() != GRID_NONE) + if (pView && aGridItem.GetGridType() != SwTextGrid::NONE) { - if ( aGridItem.GetGridType() == GRID_LINES_CHARS ) + if ( aGridItem.GetGridType() == SwTextGrid::LinesAndChars ) { m_bHRulerChanged = true; } diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx index d8843596d87b..e0aaed8904f1 100644 --- a/sw/source/uibase/frmdlg/colex.cxx +++ b/sw/source/uibase/frmdlg/colex.cxx @@ -495,7 +495,7 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point { SwPageExample::DrawPage(rRenderContext, rOrg, bSecond, bEnabled); - if (!m_pGridItem || !m_pGridItem->GetGridType()) + if (!m_pGridItem || m_pGridItem->GetGridType() == SwTextGrid::NONE) return; //paint the grid now @@ -563,7 +563,7 @@ void SwPageGridExample::DrawPage(vcl::RenderContext& rRenderContext, const Point m_bVertical ? aCharRect.Move(nRubyHeight, 0) : aCharRect.Move(0, nRubyHeight); //vertical lines - bool bBothLines = m_pGridItem->GetGridType() == GRID_LINES_CHARS; + bool bBothLines = m_pGridItem->GetGridType() == SwTextGrid::LinesAndChars; rRenderContext.SetFillColor(COL_TRANSPARENT); sal_Int32 nXMove = m_bVertical ? nLineHeight : 0; sal_Int32 nYMove = m_bVertical ? 0 : nLineHeight; diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 71fdd4ab5436..f134ca7f2707 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -645,13 +645,13 @@ bool SwTextGridItem::GetPresentation switch ( GetGridType() ) { - case GRID_NONE : + case SwTextGrid::NONE : pId = STR_GRID_NONE; break; - case GRID_LINES_ONLY : + case SwTextGrid::LinesOnly : pId = STR_GRID_LINES_ONLY; break; - case GRID_LINES_CHARS : + case SwTextGrid::LinesAndChars : pId = STR_GRID_LINES_CHARS; break; } commit 287941a6cdff79bfacf508e29977efdf00e479c6 Author: Andreas Heinisch <[email protected]> AuthorDate: Sat Jan 25 02:34:18 2025 +0100 Commit: Andreas Heinisch <[email protected]> CommitDate: Sat Jan 25 11:41:14 2025 +0100 tdf#164847 - Update menu items based on concordance file selection Disable/enable the 'Edit' menu option based on the presence of a concordance file during the creation of an alphabetical index. Change-Id: I0a12ee21d32975b7f7962d6205986724e15145bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180734 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <[email protected]> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 4728dcc9ca18..1c1b894fbf29 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1418,6 +1418,8 @@ IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, weld::Toggleable&, rButton, void) m_xUseFFCB->set_sensitive(m_xCollectSameCB->get_active() && !m_xUseDashCB->get_active()); m_xUseDashCB->set_sensitive(m_xCollectSameCB->get_active() && !m_xUseFFCB->get_active()); m_xCaseSensitiveCB->set_sensitive(m_xCollectSameCB->get_active()); + // tdf#164847 - update menu items based on concordance file presence + MenuEnableHdl(*m_xAutoMarkPB); } else if (TOX_ILLUSTRATIONS == aCurType.eType || TOX_TABLES == aCurType.eType @@ -1509,6 +1511,8 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, const OUString&, rIdent, void) if (RET_OK != aAutoMarkDlg.run() && bNew) m_sAutoMarkURL = sSaveAutoMarkURL; } + // tdf#164847 - update menu items based on concordance file presence + MenuEnableHdl(*m_xAutoMarkPB); } class SwTOXWidget commit 0fe8cf893217bb7c443a6e650fa004edbe6fff62 Author: Gabor Kelemen <[email protected]> AuthorDate: Fri Jan 24 18:10:21 2025 +0100 Commit: Gabor Kelemen <[email protected]> CommitDate: Sat Jan 25 10:09:06 2025 +0100 Mark some visible strings in ui files as translatable found with bin/ui-translatable.sh Change-Id: Ibe74635abc54a898c6040d4e62427f749f842474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180722 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui b/filter/uiconfig/ui/pdfgeneralpage.ui index 212631e6c2de..0d8c8983424c 100644 --- a/filter/uiconfig/ui/pdfgeneralpage.ui +++ b/filter/uiconfig/ui/pdfgeneralpage.ui @@ -586,9 +586,9 @@ <items> <item id="17" translatable="yes" context="pdfgeneralpage|pdf_version">PDF 1.7</item> <item id="20" translatable="yes" context="pdfgeneralpage|pdf_version">PDF 2.0</item> - <item id="1" context="pdfgeneralpage|pdf_version">PDF/A-1b (PDF 1.4 base)</item> - <item id="2" context="pdfgeneralpage|pdf_version">PDF/A-2b (PDF 1.7 base)</item> - <item id="3" context="pdfgeneralpage|pdf_version">PDF/A-3b (PDF 1.7 base)</item> + <item id="1" translatable="yes" context="pdfgeneralpage|pdf_version">PDF/A-1b (PDF 1.4 base)</item> + <item id="2" translatable="yes" context="pdfgeneralpage|pdf_version">PDF/A-2b (PDF 1.7 base)</item> + <item id="3" translatable="yes" context="pdfgeneralpage|pdf_version">PDF/A-3b (PDF 1.7 base)</item> <item id="4" translatable="yes" context="pdfgeneralpage|pdf_version">PDF/A-4 (PDF 2.0 base)</item> </items> <accessibility> diff --git a/formula/uiconfig/ui/functionpage.ui b/formula/uiconfig/ui/functionpage.ui index c867539ce6e9..389a1706ee0a 100644 --- a/formula/uiconfig/ui/functionpage.ui +++ b/formula/uiconfig/ui/functionpage.ui @@ -173,7 +173,7 @@ </child> <child> <object class="GtkButton" id="help"> - <property name="label">Help</property> + <property name="label" translatable="yes" context="functionpage|help">Help</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="can-default">True</property> diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui index f425e7ad3e76..6c466d4a962e 100644 --- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui +++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui @@ -136,10 +136,10 @@ <property name="can_focus">False</property> <items> <item id="0" translatable="yes" context="formulacalculationoptions|comboSyntaxRef">Use formula syntax</item> - <item id="1">Calc A1</item> - <item id="2">Excel A1</item> - <item id="3">Excel R1C1</item> - <item id="4">Calc A1 | Excel A1</item> + <item id="1" translatable="yes" context="formulacalculationoptions|comboSyntaxRef">Calc A1</item> + <item id="2" translatable="yes" context="formulacalculationoptions|comboSyntaxRef">Excel A1</item> + <item id="3" translatable="yes" context="formulacalculationoptions|comboSyntaxRef">Excel R1C1</item> + <item id="4" translatable="yes" context="formulacalculationoptions|comboSyntaxRef">Calc A1 | Excel A1</item> </items> </object> <packing> diff --git a/sc/uiconfig/scalc/ui/functionpanel.ui b/sc/uiconfig/scalc/ui/functionpanel.ui index d9c68d35f4cf..8f1d22ab3292 100644 --- a/sc/uiconfig/scalc/ui/functionpanel.ui +++ b/sc/uiconfig/scalc/ui/functionpanel.ui @@ -222,7 +222,7 @@ </child> <child> <object class="GtkButton" id="help"> - <property name="label">Help</property> + <property name="label" translatable="yes" context="functionpanel|help">Help</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="can-default">True</property> diff --git a/svx/uiconfig/ui/accessibilitychecklevel.ui b/svx/uiconfig/ui/accessibilitychecklevel.ui index 20a277a8b448..747013e4a1dd 100644 --- a/svx/uiconfig/ui/accessibilitychecklevel.ui +++ b/svx/uiconfig/ui/accessibilitychecklevel.ui @@ -177,7 +177,7 @@ <object class="GtkLabel" id="expand_direct_formatting_lb"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="label" context="accessibilitychecklevel|expand_direct_formatting_lb">Direct Formatting</property> + <property name="label" translatable="yes" context="accessibilitychecklevel|expand_direct_formatting_lb">Direct Formatting</property> </object> </child> </object> @@ -308,7 +308,7 @@ <object class="GtkLabel" id="expand_other_lb"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="label" context="accessibilitychecklevel|expand_other_lb">Other</property> + <property name="label" translatable="yes" context="accessibilitychecklevel|expand_other_lb">Other</property> </object> </child> </object>
