[Libreoffice-commits] core.git: 2 commits - starmath/source sw/source toolkit/source
starmath/source/ElementsDockingWindow.cxx |1 - sw/source/ui/vba/vbaapplication.cxx |4 ++-- toolkit/source/controls/svtxgridcontrol.cxx |1 - 3 files changed, 2 insertions(+), 4 deletions(-) New commits: commit b8b9ad9ade866175d8d7f1b68a465060901efee9 Author: Andrea Gelmini AuthorDate: Sat Aug 6 22:54:04 2022 +0200 Commit: Julien Nabet CommitDate: Sun Aug 7 07:27:12 2022 +0200 Removed duplicated includes Change-Id: Ic981e0916c68181cab7081091303d18c54912377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137912 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 5d7b51de58a6..202396dfc282 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -40,7 +40,6 @@ #include #include -#include namespace { diff --git a/toolkit/source/controls/svtxgridcontrol.cxx b/toolkit/source/controls/svtxgridcontrol.cxx index 1fd7de1f29b1..4911130b9852 100644 --- a/toolkit/source/controls/svtxgridcontrol.cxx +++ b/toolkit/source/controls/svtxgridcontrol.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include "unocontroltablemodel.hxx" #include #include commit 30759b5ce2ef4f915a6f4ba50ce25b602162805c Author: Hannah Meeks AuthorDate: Fri Aug 5 12:00:25 2022 +0100 Commit: Mike Kaganski CommitDate: Sun Aug 7 07:26:56 2022 +0200 VBA conversions inches should be in Change-Id: I130925d9501f8cb4f3f2a8a0894bbf6824cd2eff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137856 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index c95c855c01fd..1a25116448ea 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -448,12 +448,12 @@ float SAL_CALL SwVbaApplication::PointsToPixels( float Pixels, ::sal_Bool fVerti float SAL_CALL SwVbaApplication::InchesToPoints( float Inches ) { -return o3tl::convert(Inches, o3tl::Length::ch, o3tl::Length::pt); +return o3tl::convert(Inches, o3tl::Length::in, o3tl::Length::pt); } float SAL_CALL SwVbaApplication::PointsToInches( float Points ) { -return o3tl::convert(Points, o3tl::Length::pt, o3tl::Length::ch); +return o3tl::convert(Points, o3tl::Length::pt, o3tl::Length::in); } float SAL_CALL SwVbaApplication::MillimetersToPoints( float Millimeters )
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/ww8par.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 641d92a73e5b3d0e062e16ed4b42236e1a4796a5 Author: Caolán McNamara AuthorDate: Sat Aug 6 16:39:22 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 21:58:49 2022 +0200 ofz#49834 Segv on unknown address regression from commit 96fb8f88bd56c113eb23e50d23a038509703c288 Date: Wed Aug 3 15:47:51 2022 +0200 elide some SwNodeIndex temporaries where the SwPam ctor a ended up getting called instead of b a) SwPaM( const SwNode& rNode, sal_Int32 nContent, SwPaM* pRing ) b) SwPaM( const SwNode& rNd, SwNodeOffset nNdOffset, sal_Int32 nContent = 0, SwPaM* pRing = nullptr ); Change-Id: I44e9f98bcbefa72301dc9a434ce5ebe720870cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137902 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 03f3dfe4bec6..f56e4600f29c 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6351,7 +6351,7 @@ bool TestImportDOC(SvStream &rStream, const OUString &rFltName) xDocSh->DoInitNew(); SwDoc *pD = static_cast((&xDocSh))->GetDoc(); -SwPaM aPaM(pD->GetNodes().GetEndOfContent(), -1); +SwPaM aPaM(pD->GetNodes().GetEndOfContent(), SwNodeOffset(-1)); pD->SetInReading(true); bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE; pD->SetInReading(false);
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/ndarr.hxx |2 +- sw/source/core/doc/DocumentLayoutManager.cxx |4 ++-- sw/source/core/doc/doclay.cxx|6 +++--- sw/source/core/doc/docredln.cxx |4 ++-- sw/source/core/docnode/nodes.cxx |2 +- sw/source/core/txtnode/atrftn.cxx|2 +- sw/source/core/undo/untbl.cxx|2 +- sw/source/filter/html/htmltab.cxx|7 +++ sw/source/filter/ww8/ww8par.cxx |2 +- sw/source/filter/xml/xmltbli.cxx |2 +- 10 files changed, 16 insertions(+), 17 deletions(-) New commits: commit 6a590bfe0427ed91fb20f037783ca0335f67cf6c Author: Noel Grandin AuthorDate: Fri Aug 5 20:34:09 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 21:31:17 2022 +0200 make MakeTextSection take a SwNode, not an SwNodeIndex as part of the process of hiding the internals of SwPosition Change-Id: Ia64ddd3e1f34c7c160af0134ef5526faf43108e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137895 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 1b1227549583..cce94857bc3f 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -209,7 +209,7 @@ public: SwTextNode *MakeTextNode( const SwNodeIndex & rWhere, SwTextFormatColl *pColl, bool bNewFrames = true); ///< in ndtxt.cxx -SwStartNode* MakeTextSection( const SwNodeIndex & rWhere, +SwStartNode* MakeTextSection( const SwNode & rWhere, SwStartNodeType eSttNdTyp, SwTextFormatColl *pColl ); diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index 3f49328bf462..2857a9afa17e 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -131,10 +131,10 @@ SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, cons (bHeader ? "Right header" : "Right footer"), m_rDoc.GetDfltFrameFormat() ); -SwNodeIndex aTmpIdx( m_rDoc.GetNodes().GetEndOfAutotext() ); +const SwNode& rEndOfAutotext( m_rDoc.GetNodes().GetEndOfAutotext() ); SwStartNode* pSttNd = m_rDoc.GetNodes().MakeTextSection -( aTmpIdx, +( rEndOfAutotext, bHeader ? SwHeaderStartNode : SwFooterStartNode, m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(o3tl::narrowing( bHeader ? ( eRequest == RndStdIds::HEADERL diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 2e5285fe9c89..9e545a654660 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -773,7 +773,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, pNewSet->Put( std::move(aFrameSize) ); SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection( -SwNodeIndex( rDoc.GetNodes().GetEndOfAutotext() ), +rDoc.GetNodes().GetEndOfAutotext(), SwFlyStartNode, pColl ); pNewSet->Put( SwFormatContent( pSttNd )); @@ -1087,8 +1087,8 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection( -SwNodeIndex( rDoc.GetNodes().GetEndOfAutotext() ), -SwFlyStartNode, pColl ); +rDoc.GetNodes().GetEndOfAutotext(), +SwFlyStartNode, pColl ); pNewFormat = rDoc.MakeFlyFrameFormat( rDoc.GetUniqueFrameName(), rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_FRAME ) ); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index cead2ecf1cba..f298e67598c4 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1531,7 +1531,7 @@ void SwRangeRedline::MoveToSection() ? pCEndNd->GetTextNode()->GetTextColl() : rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD); -pSttNd = rNds.MakeTextSection( SwNodeIndex( rNds.GetEndOfRedlines() ), +pSttNd = rNds.MakeTextSection( rNds.GetEndOfRedlines(), SwNormalStartNode, pColl ); SwTextNode* pTextNd = rNds[ pSttNd->GetIndex() + 1 ]->GetTextNode(); @@ -1598,7 +1598,7 @@ void SwRangeRedline::CopyToSection() ? pCSttNd->GetTextNode()->GetTextColl() : rDoc.getIDocumentStylePoolAccess().GetTextCollFrom
Week 8 - update
Hi, This week I finished off my work on XTable, I added all the padding properties and also added unit conversions to application which I then put in global as well as adding my tests.- https://gerrit.libreoffice.org/c/core/+/137630 https://gerrit.libreoffice.org/c/core/+/137787 https://gerrit.libreoffice.org/c/core/+/137851 https://gerrit.libreoffice.org/c/core/+/137852 I also added a dialogue so that I could more easily see errors - it prints out MsgBox contents for my macros tests if they fail in writer, which is very helpful. - https://gerrit.libreoffice.org/c/core/+/137897 I also had a look at some of my previous XParagraphFormat tests but plan to do some more with this next working week. Hannah
[Libreoffice-commits] core.git: formula/source sc/source
formula/source/core/api/FormulaCompiler.cxx | 11 ++- sc/source/ui/docshell/docsh6.cxx|3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) New commits: commit 0a78f11fdd13d914d5f063007b2df9796e6dce9d Author: Eike Rathke AuthorDate: Fri Aug 5 19:28:50 2022 +0200 Commit: Eike Rathke CommitDate: Sat Aug 6 19:37:38 2022 +0200 Related: tdf#135993 Use ScCompiler to create English OpCodeMap with AddIns ... instead of formula::FormulaCompiler base class that doesn't know anything about AddIns, and copy AddIns along to new resulting native map. Change-Id: I9e4ece2f7450a561ac502ca1dbddaa5a697fa2fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137882 Tested-by: Eike Rathke Reviewed-by: Eike Rathke diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 2b0db73d1a39..591b28744289 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1296,7 +1296,16 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r ) } } -// TODO: maybe copy the external maps too? +// This was meant to copy to native map that does not have AddIn symbols +// but needs them from the source map. It is unclear what should happen if +// the destination already had externals, so do it only if it doesn't. +if (!hasExternals()) +{ +maExternalHashMap = r.maExternalHashMap; +maReverseExternalHashMap = r.maReverseExternalHashMap; +mbCore = r.mbCore; +mbEnglish = r.mbEnglish; +} } diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 738c85110967..caefdfc0fed3 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -445,7 +445,8 @@ void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoadi if (rOpt.GetUseEnglishFuncName()) { // switch native symbols to English. -formula::FormulaCompiler aComp; +ScAddress aAddress; +ScCompiler aComp( *m_pDocument, aAddress); ScCompiler::OpCodeMapPtr xMap = aComp.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH); ScCompiler::SetNativeSymbols(xMap); }
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/addincol.hxx | 10 +- sc/inc/funcdesc.hxx |2 - sc/source/core/data/funcdesc.cxx |4 +- sc/source/core/data/global.cxx |3 + sc/source/core/tool/addincol.cxx | 59 +++ 5 files changed, 48 insertions(+), 30 deletions(-) New commits: commit d778c6fd5c2ba8e27df46ec9e183a61ad29e30d5 Author: Eike Rathke AuthorDate: Fri Aug 5 19:46:07 2022 +0200 Commit: Eike Rathke CommitDate: Sat Aug 6 19:37:55 2022 +0200 Resolves: tdf#135993 Create ScFunctionList and ScFuncDesc with English names Used in Function Wizard and formula tooltips. Without, no matching name is found for AddIn English name and no tooltip/description/arguments are displayed. Change-Id: Ib0cf419c476dae495467c444f1ee1f84a55633a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137883 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx index 14af12006637..bb89f8d3c87a 100644 --- a/sc/inc/addincol.hxx +++ b/sc/inc/addincol.hxx @@ -87,6 +87,7 @@ private: OUStringaLocalName; ///< for display OUStringaUpperName; ///< for entering formulas OUStringaUpperLocal;///< for entering formulas +OUStringaUpperEnglish; ///< for Function Wizard and tooltips OUStringaDescription; css::uno::Reference< css::reflection::XIdlMethod> xFunction; css::uno::Any aObject; @@ -113,6 +114,7 @@ public: const OUString& GetLocalName() const{ return aLocalName; } const OUString& GetUpperName() const{ return aUpperName; } const OUString& GetUpperLocal() const { return aUpperLocal; } +const OUString& GetUpperEnglish() const { return aUpperEnglish; } const css::uno::Reference< css::reflection::XIdlMethod>& GetFunction() const { return xFunction; } const css::uno::Any& GetObject() const { return aObject; } @@ -132,6 +134,9 @@ public: voidSetArguments( tools::Long nNewCount, const ScAddInArgDesc* pNewDescs ); voidSetCallerPos( tools::Long nNewPos ); voidSetCompNames( ::std::vector< LocalizedName >&& rNew ); + +/// Takes care of handling an empty name *after* upper local name was set. +voidSetEnglishName( const OUString& rEnglishName ); }; class SC_DLLPUBLIC ScUnoAddInCollection @@ -175,9 +180,10 @@ public: voidLocalizeString( OUString& rName );///< modify rName - input: exact name tools::LongGetFuncCount(); -boolFillFunctionDesc( tools::Long nFunc, ScFuncDesc& rDesc ); +boolFillFunctionDesc( tools::Long nFunc, ScFuncDesc& rDesc, bool bEnglishFunctionNames ); -static bool FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc ); +static bool FillFunctionDescFromData( const ScUnoAddInFuncData& rFuncData, ScFuncDesc& rDesc, + bool bEnglishFunctionNames ); /// leave rRetExcelName unchanged, if no matching name is found boolGetExcelName( const OUString& rCalcName, LanguageType eDestLang, OUString& rRetExcelName ); /// leave rRetCalcName unchanged, if no matching name is found diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx index 58c6957316b3..0f37e924d941 100644 --- a/sc/inc/funcdesc.hxx +++ b/sc/inc/funcdesc.hxx @@ -241,7 +241,7 @@ public: class ScFunctionList { public: -ScFunctionList(); +explicit ScFunctionList( bool bEnglishFunctionNames ); ~ScFunctionList(); sal_uInt32 GetCount() const diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index dfbfd9a3a78e..c8045e6c1abf 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -397,7 +397,7 @@ bool ScFuncDesc::compareByName(const ScFuncDesc* a, const ScFuncDesc* b) #define ENTRY(CODE) CODE, SAL_N_ELEMENTS(CODE) -ScFunctionList::ScFunctionList() +ScFunctionList::ScFunctionList( bool bEnglishFunctionNames ) { sal_Int32 nMaxFuncNameLen = 0; // Length of longest function name @@ -958,7 +958,7 @@ ScFunctionList::ScFunctionList() pDesc = new ScFuncDesc; pDesc->nFIndex = nNextId++; -if ( pUnoAddIns->FillFunctionDesc( nFunc, *pDesc ) ) +if ( pUnoAddIns->FillFunctionDesc( nFunc, *pDesc, bEnglishFunctionNames ) ) { tmpFuncVector.push_back(pDesc); nStrLen = pDesc->mxFuncName->getLength(); diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index a338c0c76c31..46277a807db0 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -74,6 +74,7 @@ #include #include #include +#include tools:
[Libreoffice-commits] core.git: sw/qa xmloff/source
sw/qa/extras/odfexport/data/section-columns-separator.fodt | 24 sw/qa/extras/odfexport/odfexport2.cxx | 35 + xmloff/source/text/XMLTextColumnsExport.cxx| 13 ++-- 3 files changed, 66 insertions(+), 6 deletions(-) New commits: commit f1f6c82e613ace836aa78a822688721fb7fb5e80 Author: Mike Kaganski AuthorDate: Sat Aug 6 16:50:47 2022 +0300 Commit: Mike Kaganski CommitDate: Sat Aug 6 18:32:03 2022 +0200 tdf#150235: use correct types in XMLTextColumnsExport The types for the properties are defined in css::text::TextColumns servise. But before commit 95ebd24a629b4c8cd62cc20c0701683512cc8fa0 Author Mike Kaganski Date Thu May 27 13:00:10 2021 +0300 editengine-columns: ODF support [API CHANGE] the implementation of the service (SwXTextColumns) used smaller types for some properties. The export code (XMLTextColumnsExport::exportXML) mathced those implementation types. The mentioned commit changed the implementation to use proper types; but the export code wasn't corrected. This fixes the export code. Change-Id: I95838dec382edc61bb2e5b39177bf57a7d79e0bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137900 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sw/qa/extras/odfexport/data/section-columns-separator.fodt b/sw/qa/extras/odfexport/data/section-columns-separator.fodt new file mode 100644 index ..b9c97eb9e38e --- /dev/null +++ b/sw/qa/extras/odfexport/data/section-columns-separator.fodt @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum consequat mi quis pretium semper. Proin luctus orci ac neque venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. Donec blandit auctor arcu, nec pellentesque eros molestie eget. In consectetur aliquam hendrerit. Sed cursus mauris vitae ligula pellentesque, non pellentesque urna aliquet. Fusce placerat mauris enim, nec rutrum purus semper vel. Praesent tincidunt neque eu pellentesque pharetra. Fusce pellentesque est orci. +Integer sodales tincidunt tristique. Sed a metus posuere, adipiscing nunc et, viverra odio. Donec auctor molestie sem, sit amet tristique lectus hendrerit sed. Cras sodales nisl sed orci mattis iaculis. Nunc eget dolor accumsan, pharetra risus a, vestibulum mauris. Nunc vulputate lobortis mollis. Vivamus nec tellus faucibus, tempor magna nec, facilisis felis. Donec commodo enim a vehicula pellentesque. Nullam vehicula vestibulum est vel ultricies. +Aliquam velit massa, laoreet vel leo nec, volutpat facilisis eros. Donec consequat arcu ut diam tempor luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent vitae lacus vel leo sodales pharetra a a nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam luctus tempus nibh, fringilla dictum augue consectetur eget. Curabitur at ante sit amet tortor pharetra molestie eu nec ante. Mauris tincidunt, nibh eu sollicitudin molestie, dolor sapien congue tortor, a pulvinar sapien turpis sed ante. Donec nec est elementum, euismod nulla in, mollis nunc. + + + + \ No newline at end of file diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 30b3791d0dbc..2a2f015f6b84 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -9,6 +9,9 @@ #include +#include +#include +#include #include #include #include @@ -228,6 +231,38 @@ CPPUNIT_TEST_FIXTURE(Test, tdf120972) "char", cDecimal); } +DECLARE_ODFEXPORT_TEST(testSectionColumnSeparator, "section-columns-separator.fodt") +{ +// tdf#150235: due to wrong types used in column export, 'style:height' and 'style:style' +// attributes were exported incorrectly for 'style:column-sep' element +auto xSection = getProperty>(getParagraph(1), "TextSection"); +auto xColumns = getProperty>(xSection, "TextColumns"); +CPPUNIT_ASSERT(xColumns); +CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xColumns->getColumnCount()); + +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 50 +// - Actual : 100 +CPPUNIT_ASSERT_EQUAL(static_cast(50), + getProperty(xColumns, "SeparatorLineRelativeHeight")); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 2 +// - Actual : 0 +CPPUNIT_ASSERT_EQUAL(css::text::ColumnSeparatorStyle::DOTTED, + getProperty(xColumns, "SeparatorLineStyle")); + +// Check the rest of the properties, too +CPPUNIT_ASSERT_EQUAL(true, getProperty(xColumns, "IsAutomatic")); +CPPUNIT_ASSERT_EQUAL(sal_Int32(600), getProperty(xColum
[Libreoffice-commits] core.git: filter/source
filter/source/xsltfilter/LibXSLTTransformer.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit abb3c857bd7f00826e891859f08071f7e112841c Author: Caolán McNamara AuthorDate: Sat Aug 6 15:35:29 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 17:24:58 2022 +0200 crashtesting: keep a reference to the passed in LibXSLTTransformer otherwise, as seen with: soffice --headless --convert-to docx forum-mso-de-42789.docx and error will notify the other thread that the load has ended and the other thread will destroy the passed in LibXSLTTransformer early while this thread assumes it continues to exist Change-Id: Ieea9ecc3439ea73cd0433e5e12b87811906c49aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137901 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx index 6cfaebe69a92..8696bda6a34a 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.hxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx @@ -67,7 +67,7 @@ namespace XSLT static const sal_Int32 OUTPUT_BUFFER_SIZE; static const sal_Int32 INPUT_BUFFER_SIZE; -LibXSLTTransformer* m_transformer; +rtl::Reference m_transformer; Sequence m_readBuf; Sequence m_writeBuf;
[Libreoffice-commits] core.git: vcl/skia
vcl/skia/skia_denylist_vulkan.xml |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 407a61943539063c6d56eab8ab0c1b728dd642af Author: Julien Nabet AuthorDate: Wed Aug 3 21:19:21 2022 +0200 Commit: Julien Nabet CommitDate: Sat Aug 6 16:30:27 2022 +0200 tdf#150232: put Intel Iris driver Skia/Vulkan in denylist for all versions + Nvidia on Windows just for device id "0x1401" in order to not being too restrictive. Change-Id: Ie2cb2c6c6bb50ac6080721230ca3e451e886bb07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137768 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/vcl/skia/skia_denylist_vulkan.xml b/vcl/skia/skia_denylist_vulkan.xml index 63df3938b8a2..39163fc9a71e 100644 --- a/vcl/skia/skia_denylist_vulkan.xml +++ b/vcl/skia/skia_denylist_vulkan.xml @@ -27,7 +27,7 @@ - + @@ -36,6 +36,9 @@ + + +
[Libreoffice-commits] core.git: bin/find-can-be-private-symbols.py toolkit/source
bin/find-can-be-private-symbols.py |1 toolkit/source/awt/vclxtoolkit.cxx | 63 - 2 files changed, 1 insertion(+), 63 deletions(-) New commits: commit b2cdf8a1eac730f74160d7c7a1ab9ec90723 Author: Caolán McNamara AuthorDate: Fri Aug 5 14:51:30 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 16:04:51 2022 +0200 the "CreateWindow" function in svtools is newly removed Change-Id: I6fb569cf293a896c92bec4c6aae647a0bd02d012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137871 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/bin/find-can-be-private-symbols.py b/bin/find-can-be-private-symbols.py index 7203f8ed8c06..2ac7619d9026 100755 --- a/bin/find-can-be-private-symbols.py +++ b/bin/find-can-be-private-symbols.py @@ -182,7 +182,6 @@ with open("bin/find-can-be-private-symbols.functions.results", "wt") as f: elif sym.endswith("component_getFactory"): continue elif sym == "CreateDialogFactory": continue elif sym == "CreateUnoWrapper": continue -elif sym == "CreateWindow": continue elif sym == "ExportDOC": continue elif sym == "ExportPPT": continue elif sym == "ExportRTF": continue diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index da81df17b2dd..18daef169414 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -403,12 +403,6 @@ Size MessBox::GetOptimalSize() const namespace { -extern "C" typedef vcl::Window* (*FN_SvtCreateWindow)( -rtl::Reference* ppNewComp, -const css::awt::WindowDescriptor* pDescriptor, -vcl::Window* pParent, -WinBits nWinBits ); - class Pause : public Idle { public: @@ -440,9 +434,6 @@ class VCLXToolkit : public cppu::BaseMutex, css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard; css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxSelection; -oslModule hSvToolsLib; -FN_SvtCreateWindow fnSvtCreateWindow; - ::comphelper::OInterfaceContainerHelper3 m_aTopWindowListeners; ::comphelper::OInterfaceContainerHelper3 m_aKeyHandlers; ::comphelper::OInterfaceContainerHelper3 m_aFocusListeners; @@ -941,9 +932,6 @@ VCLXToolkit::VCLXToolkit(): m_bEventListener(false), m_bKeyListener(false) { -hSvToolsLib = nullptr; -fnSvtCreateWindow = nullptr; - #ifndef IOS osl::Guard< osl::Mutex > aGuard( getInitMutex() ); nVCLToolkitInstanceCount++; @@ -958,15 +946,6 @@ VCLXToolkit::VCLXToolkit(): void SAL_CALL VCLXToolkit::disposing() { -#ifndef DISABLE_DYNLOADING -if ( hSvToolsLib ) -{ -osl_unloadModule( hSvToolsLib ); -hSvToolsLib = nullptr; -fnSvtCreateWindow = nullptr; -} -#endif - #ifndef IOS { osl::Guard< osl::Mutex > aGuard( getInitMutex() ); @@ -1855,16 +1834,6 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( rtl::Reference* ppNewCom return pNewWindow; } -#ifndef DISABLE_DYNLOADING - -extern "C" { static void thisModule() {} } - -#else - -extern "C" vcl::Window* SAL_CALL CreateWindow( rtl::Reference* ppNewComp, const css::awt::WindowDescriptor* pDescriptor, vcl::Window* pParent, WinBits nWinBits ); - -#endif - css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( const css::awt::WindowDescriptor& rDescriptor, MessBoxStyle nForceMessBoxStyle ) @@ -1893,37 +1862,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( rtl::Reference pNewComp; -vcl::Window* pNewWindow = nullptr; -// Try to create the window with SvTools -// (do this _before_ creating it on our own: The old mechanism (extended toolkit in SvTools) did it this way, -// and we need to stay compatible) -// try to load the lib -if ( !fnSvtCreateWindow -#ifndef DISABLE_DYNLOADING - && !hSvToolsLib -#endif - ) -{ -#ifndef DISABLE_DYNLOADING -OUString aLibName(SVT_DLL_NAME); -hSvToolsLib = osl_loadModuleRelative( -&thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); -if ( hSvToolsLib ) -{ -OUString aFunctionName( "CreateWindow" ); -fnSvtCreateWindow = reinterpret_cast(osl_getFunctionSymbol( hSvToolsLib, aFunctionName.pData )); -} -#else -fnSvtCreateWindow = nullptr; -#endif -} -// ask the SvTool creation function -if ( fnSvtCreateWindow ) -pNewWindow = fnSvtCreateWindow( &pNewComp, &rDescriptor, pParent, nWinBits ); - -// if SvTools could not provide a window, create it ourself -if ( !pNewWindow ) -pNewWindow = ImplCreateWindow( &pNewComp, rDescriptor, pParent, nWinBits, aPair.second ); +vcl::Window* pNewWindow = ImplCreateWindow( &pNewComp, rDescriptor, pParent, nWinBits, aPair.second ); DBG_ASSERT( pNewWindow, "createWindow: Unknown Compone
[Libreoffice-commits] core.git: basctl/source
basctl/source/basicide/bastypes.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit de5135060d01b650b7258c02e847e916ae9541fd Author: Caolán McNamara AuthorDate: Sat Aug 6 12:13:29 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 15:25:52 2022 +0200 cid#1507764 Unintended comparison to logical negation missing - from -> Change-Id: Ieca42cf3fd3e1c10186ba57dd422f3e4ddf9e20a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137898 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 1790c4b5444f..5411b73336bb 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -72,7 +72,7 @@ BaseWindow::~BaseWindow() void BaseWindow::dispose() { -if (pShellVScrollBar && !pShellVScrollBar>isDisposed()) +if (pShellVScrollBar && !pShellVScrollBar->isDisposed()) pShellVScrollBar->SetScrollHdl( Link() ); if (pShellHScrollBar && !pShellHScrollBar->isDisposed()) pShellHScrollBar->SetScrollHdl( Link() );
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/ftnidx.hxx |3 ++- sw/source/core/crsr/trvlfnfl.cxx|4 ++-- sw/source/core/doc/DocumentContentOperationsManager.cxx |2 +- sw/source/core/doc/docftn.cxx |2 +- sw/source/core/doc/ftnidx.cxx |2 +- sw/source/core/docnode/ndsect.cxx |2 +- sw/source/core/docnode/node.cxx |2 +- sw/source/core/undo/undobj.cxx |2 +- 8 files changed, 10 insertions(+), 9 deletions(-) New commits: commit 71ce0e354437db3086d6d746b0e9edbc693ddcca Author: Noel Grandin AuthorDate: Fri Aug 5 16:06:16 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 15:05:36 2022 +0200 make SeekEntry take a SwNode, not an SwNodeIndex as part of the process of hiding the internals of SwPosition Change-Id: Id43211f221f3b90c46629bedec25f9078c7bf9dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137894 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx index 39acdf0a96a0..7d5a22a01359 100644 --- a/sw/inc/ftnidx.hxx +++ b/sw/inc/ftnidx.hxx @@ -27,6 +27,7 @@ class IDocumentRedlineAccess; class SwTextFootnote; class SwNodeIndex; class SwSectionNode; +class SwNode; // Everywhere where NodeIndex is used, the header files missing here // are already included. Therefore put here as defines only and @@ -46,7 +47,7 @@ public: void UpdateFootnote( const SwNodeIndex& rStt ); // Update all from pos. void UpdateAllFootnote(); // Update all footnotes. -SwTextFootnote* SeekEntry( const SwNodeIndex& rIdx, size_t* pPos = nullptr ) const; +SwTextFootnote* SeekEntry( const SwNode& rNd, size_t* pPos = nullptr ) const; }; class SwUpdFootnoteEndNtAtEnd diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 714750477d14..11ede589747c 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -206,7 +206,7 @@ bool SwCursor::GotoNextFootnoteAnchor() return false; } -if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos )) +if( rFootnoteArr.SeekEntry( GetPoint()->GetNode(), &nPos )) { // there is a footnote with this index, so search also for the next one if( nPos < rFootnoteArr.size() ) @@ -278,7 +278,7 @@ bool SwCursor::GotoPrevFootnoteAnchor() return false; } -if( rFootnoteArr.SeekEntry( GetPoint()->nNode, &nPos ) ) +if( rFootnoteArr.SeekEntry( GetPoint()->GetNode(), &nPos ) ) { // there is a footnote with this index, so search also for the next one SwNodeOffset nNdPos = GetPoint()->GetNodeIndex(); diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 37e21b5506c6..b95740932b07 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -976,7 +976,7 @@ namespace { size_t nPos = 0; -rFootnoteArr.SeekEntry( rSttNd, &nPos ); +rFootnoteArr.SeekEntry( rSttNd.GetNode(), &nPos ); SwTextFootnote* pSrch; const SwNode* pFootnoteNd; diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 59ef1da0aede..61dbe5071cd2 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -442,7 +442,7 @@ bool SwDoc::SetCurFootnote( const SwPaM& rPam, const OUString& rNumStr, const sal_Int32 nEndCnt = pEnd->GetContentIndex(); size_t nPos = 0; -rFootnoteArr.SeekEntry( pStt->nNode, &nPos ); +rFootnoteArr.SeekEntry( pStt->GetNode(), &nPos ); std::unique_ptr pUndo; if (GetIDocumentUndoRedo().DoesUndo()) diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index 778a6ed388ee..7a1fb7d89f12 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -405,7 +405,7 @@ void SwFootnoteIdxs::UpdateAllFootnote() aLayout->UpdateFootnoteNums(); } -SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNodeIndex& rPos, size_t* pFndPos ) const +SwTextFootnote* SwFootnoteIdxs::SeekEntry( const SwNode& rPos, size_t* pFndPos ) const { SwNodeOffset nIdx = rPos.GetIndex(); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index a285d0a0829f..a9fa873e7748 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -751,7 +751,7 @@ void sw_DeleteFootnote( SwSectionNode *pNd, SwNodeOffset nStt, SwNodeOffset nEnd return; size_t nPos = 0; -rFootnoteArr.SeekEntry( SwNodeIndex( *pNd ), &nPos ); +rFootnoteArr.SeekEntry( *pNd, &nPos ); SwTextFootnote* pSrch; // Delete all succeeding Footnotes diff --git a/sw/source/core/docnode/node.cxx b
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/com_GCC_defs.mk |1 + 1 file changed, 1 insertion(+) New commits: commit a95bf932ed22abbb346b1d70e3c32578074667f3 Author: Noel Grandin AuthorDate: Sat Aug 6 12:47:22 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 15:05:16 2022 +0200 turn on -Wshadow-all for clang compilers mostly so that it matches the existing behaviour of the GCC compiler, which makes it easier submitting patches when building locally with clang Change-Id: I0197ec61bc97a3899c2b379efa0f2ad8ed028986 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137896 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 004945a32d32..443ff10eaae1 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -70,6 +70,7 @@ gb_CFLAGS_COMMON := \ -Wunreachable-code \ $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX,$(findstring sccache,$(CC))),,-Wunused-macros) \ $(if $(COM_IS_CLANG),-Wembedded-directive) \ + $(if $(COM_IS_CLANG),-Wshadow-all) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ -fno-common \
[Libreoffice-commits] core.git: oovbaapi/ooo sw/source
oovbaapi/ooo/vba/word/XGlobals.idl |9 +++ sw/source/ui/vba/vbaglobals.cxx| 45 + sw/source/ui/vba/vbaglobals.hxx| 10 3 files changed, 64 insertions(+) New commits: commit 5fecf10b9ef6e76aa1d06b7ab350abb5a495dda0 Author: Hannah Meeks AuthorDate: Fri Aug 5 10:48:50 2022 +0100 Commit: Tomaž Vajngerl CommitDate: Sat Aug 6 14:16:50 2022 +0200 VBA Add conversion methods to global Change-Id: I920799321f245c015a527c816272c1038cc04544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137851 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/oovbaapi/ooo/vba/word/XGlobals.idl b/oovbaapi/ooo/vba/word/XGlobals.idl index 9808187a0d9f..8d2ee3900fcc 100644 --- a/oovbaapi/ooo/vba/word/XGlobals.idl +++ b/oovbaapi/ooo/vba/word/XGlobals.idl @@ -37,6 +37,15 @@ interface XGlobals : com::sun::star::uno::XInterface any Dialogs( [in] any Index ); any ListGalleries( [in] any aIndex ); float CentimetersToPoints([in] float Centimeters ); +float PointsToCentimeters( [in] float Points); +float PixelsToPoints( [in] float Pixels, [in] boolean fVertical ); +float PointsToPixels( [in] float Points, [in] boolean fVertical); +float InchesToPoints( [in] float Inches); +float PointsToInches( [in] float Points); +float MillimetersToPoints( [in] float Millimeters ); +float PointsToMillimeters( [in] float Points); +float PicasToPoints( [in] float Picas); +float PointsToPicas( [in] float Points); }; }; }; }; diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index 0e5db3802895..6492b2628d59 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -129,6 +129,51 @@ float SAL_CALL SwVbaGlobals::CentimetersToPoints( float Centimeters ) return getApplication()->CentimetersToPoints( Centimeters ); } +float SAL_CALL SwVbaGlobals::PointsToCentimeters( float Points ) +{ +return getApplication()->PointsToCentimeters( Points ); +} + +float SAL_CALL SwVbaGlobals::PixelsToPoints( float Pixels, ::sal_Bool fVertical ) +{ +return getApplication()->PixelsToPoints( Pixels, fVertical ); +} + +float SAL_CALL SwVbaGlobals::PointsToPixels( float Points, ::sal_Bool fVertical ) +{ +return getApplication()->PointsToPixels( Points, fVertical ); +} + +float SAL_CALL SwVbaGlobals::InchesToPoints( float Inches ) +{ +return getApplication()->InchesToPoints( Inches ); +} + +float SAL_CALL SwVbaGlobals::PointsToInches( float Points ) +{ +return getApplication()->PointsToInches( Points ); +} + +float SAL_CALL SwVbaGlobals::MillimetersToPoints( float Millimeters ) +{ +return getApplication()->MillimetersToPoints( Millimeters ); +} + +float SAL_CALL SwVbaGlobals::PointsToMillimeters( float Points ) +{ +return getApplication()->PointsToMillimeters( Points ); +} + +float SAL_CALL SwVbaGlobals::PicasToPoints( float Picas ) +{ +return getApplication()->PicasToPoints( Picas ); +} + +float SAL_CALL SwVbaGlobals::PointsToPicas( float Points ) +{ +return getApplication()->PointsToPicas( Points ); +} + OUString SwVbaGlobals::getServiceImplName() { diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx index 1d8c0b4f8a2a..af26f1b6256d 100644 --- a/sw/source/ui/vba/vbaglobals.hxx +++ b/sw/source/ui/vba/vbaglobals.hxx @@ -56,6 +56,16 @@ public: virtual css::uno::Any SAL_CALL Dialogs(const css::uno::Any& aIndex) override; virtual css::uno::Any SAL_CALL ListGalleries(const css::uno::Any& aIndex) override; virtual float SAL_CALL CentimetersToPoints(float Centimeters) override; +virtual float SAL_CALL PointsToCentimeters(float Points) override; +virtual float SAL_CALL PixelsToPoints(float Pixels, ::sal_Bool fVertical) override; +virtual float SAL_CALL PointsToPixels(float Pixels, ::sal_Bool fVertical) override; +virtual float SAL_CALL InchesToPoints(float Inches) override; +virtual float SAL_CALL PointsToInches(float Points) override; +virtual float SAL_CALL MillimetersToPoints(float Millimeters) override; +virtual float SAL_CALL PointsToMillimeters(float Points) override; +virtual float SAL_CALL PicasToPoints(float Picas) override; +virtual float SAL_CALL PointsToPicas(float Points) override; + // XMultiServiceFactory virtual css::uno::Sequence SAL_CALL getAvailableServiceNames() override;
[Libreoffice-commits] core.git: sc/source
sc/source/ui/inc/datatableview.hxx | 10 +-- sc/source/ui/miscdlgs/datatableview.cxx | 43 +++- 2 files changed, 28 insertions(+), 25 deletions(-) New commits: commit 6d9ee6444d07bac64b9744b1c9fc7a2519e62965 Author: Caolán McNamara AuthorDate: Fri Aug 5 15:20:03 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:08:46 2022 +0200 tdf#117388 use native scrollbar under gtk in calc data view browser Change-Id: Ia0ab035473da7b5b64e18876bb81e25fd63effda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137877 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/inc/datatableview.hxx b/sc/source/ui/inc/datatableview.hxx index 8eaac9084bbe..fa7be381d3c9 100644 --- a/sc/source/ui/inc/datatableview.hxx +++ b/sc/source/ui/inc/datatableview.hxx @@ -20,6 +20,7 @@ #pragma once #include +#include #include #include #include @@ -79,15 +80,18 @@ class ScDataTableView : public Control VclPtr mpTopLeft; VclPtr mpColView; VclPtr mpRowView; -VclPtr mpVScroll; -VclPtr mpHScroll; +VclPtr mpVScroll; +VclPtr mpHScroll; + +sal_uInt16 mnScrollBarSize; SCROW mnFirstVisibleRow; SCCOL mnFirstVisibleCol; std::unique_ptr mpMouseEvent; -DECL_LINK(ScrollHdl, ScrollBar*, void); +DECL_LINK(VertScrollHdl, weld::Scrollbar&, void); +DECL_LINK(HorzScrollHdl, weld::Scrollbar&, void); public: ScDataTableView(const css::uno::Reference& rParent, diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx index d74df0e81fe4..70fe3dde756e 100644 --- a/sc/source/ui/miscdlgs/datatableview.cxx +++ b/sc/source/ui/miscdlgs/datatableview.cxx @@ -36,7 +36,6 @@ constexpr double nPPTY = 0.0; constexpr sal_uInt16 nRowHeaderWidth = 100; constexpr sal_uInt16 nColHeaderHeight = 20; -constexpr sal_uInt16 nScrollBarSize = 10; ScDataTableColView::ScDataTableColView(vcl::Window* pParent, ScDocument* pDoc, SelectionEngine* pSelectionEngine): ScHeaderControl(pParent, pSelectionEngine, pDoc->MaxCol()+1, false, nullptr), @@ -136,8 +135,9 @@ ScDataTableView::ScDataTableView(const css::uno::Reference &r mpTopLeft(VclPtr::Create(this, WB_SIZEABLE)), mpColView(VclPtr::Create(this, mpDoc.get(), mpSelectionEngine.get())), mpRowView(VclPtr::Create(this, mpDoc.get(), mpSelectionEngine.get())), -mpVScroll(VclPtr::Create(this, WinBits(WB_VSCROLL | WB_DRAG))), -mpHScroll(VclPtr::Create(this, WinBits(WB_HSCROLL | WB_DRAG))), +mpVScroll(VclPtr::Create(this, false)), +mpHScroll(VclPtr::Create(this, true)), +mnScrollBarSize(mpVScroll->GetSizePixel().Width()), mnFirstVisibleRow(0), mnFirstVisibleCol(0) { @@ -147,11 +147,11 @@ ScDataTableView::ScDataTableView(const css::uno::Reference &r mpVScroll->SetRangeMin(0); mpVScroll->SetRangeMax(100); -mpVScroll->SetEndScrollHdl(LINK(this, ScDataTableView, ScrollHdl)); +mpVScroll->SetScrollHdl(LINK(this, ScDataTableView, VertScrollHdl)); mpHScroll->SetRangeMin(0); mpHScroll->SetRangeMax(50); -mpHScroll->SetEndScrollHdl(LINK(this, ScDataTableView, ScrollHdl)); +mpHScroll->SetScrollHdl(LINK(this, ScDataTableView, HorzScrollHdl)); mpTopLeft->Show(); mpColView->Show(); @@ -250,17 +250,17 @@ void ScDataTableView::Resize() { Size aSize = GetSizePixel(); mpTopLeft->setPosSizePixel(0, 0, nRowHeaderWidth, nColHeaderHeight); -mpColView->setPosSizePixel(nRowHeaderWidth, 0, aSize.Width() - nScrollBarSize, nColHeaderHeight); +mpColView->setPosSizePixel(nRowHeaderWidth, 0, aSize.Width() - mnScrollBarSize, nColHeaderHeight); mpRowView->setPosSizePixel(0, nColHeaderHeight, nRowHeaderWidth, aSize.Height()); -mpVScroll->setPosSizePixel(aSize.Width() - nScrollBarSize, nColHeaderHeight, nScrollBarSize, aSize.Height() - nColHeaderHeight - nScrollBarSize); -mpHScroll->setPosSizePixel(nRowHeaderWidth, aSize.Height() - nScrollBarSize, aSize.Width() - nRowHeaderWidth - nScrollBarSize, nScrollBarSize); +mpVScroll->setPosSizePixel(aSize.Width() - mnScrollBarSize, nColHeaderHeight, mnScrollBarSize, aSize.Height() - nColHeaderHeight - mnScrollBarSize); +mpHScroll->setPosSizePixel(nRowHeaderWidth, aSize.Height() - mnScrollBarSize, aSize.Width() - nRowHeaderWidth - mnScrollBarSize, mnScrollBarSize); } void ScDataTableView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRectangle) { Size aSize = GetSizePixel(); -SCCOL nMaxVisibleCol = findColFromPos(aSize.Width() - nScrollBarSize, mpDoc.get(), mnFirstVisibleCol); +SCCOL nMaxVisibleCol = findColFromPos(aSize.Width() - mnScrollBarSize, mpDoc.get(), mnFirstVisibleCol); SCROW nMaxVisibleRow = findRowFromPos(aSize.Height(), mpDoc.get(), mnFirstVisibleRow); ScTableInfo aTableInfo; @@ -300,20 +300,19 @@ void ScDataTableView::getRowRange(SCROW& rStartCol, SCROW& rEndCol) cons
[Libreoffice-commits] core.git: sc/source
sc/source/ui/inc/datatableview.hxx |2 -- sc/source/ui/miscdlgs/datatableview.cxx | 12 +++- 2 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 488b69db9844e40fb432b847a271a92fd9e7414a Author: Caolán McNamara AuthorDate: Fri Aug 5 15:35:51 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:09:29 2022 +0200 ScDataTableView has visible grid in the rectangle at the scrollbar junction so over paint it with the face color, and replace the unusual use of ScrollBarBox as painter for topleft corner with same Change-Id: I922541122d725a2f0db6a1078b953da3156d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137878 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/inc/datatableview.hxx b/sc/source/ui/inc/datatableview.hxx index fa7be381d3c9..2635c7952a9e 100644 --- a/sc/source/ui/inc/datatableview.hxx +++ b/sc/source/ui/inc/datatableview.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "hdrcont.hxx" @@ -77,7 +76,6 @@ class ScDataTableView : public Control { std::shared_ptr mpDoc; std::unique_ptr mpSelectionEngine; -VclPtr mpTopLeft; VclPtr mpColView; VclPtr mpRowView; VclPtr mpVScroll; diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx index 70fe3dde756e..41db482eaf05 100644 --- a/sc/source/ui/miscdlgs/datatableview.cxx +++ b/sc/source/ui/miscdlgs/datatableview.cxx @@ -132,7 +132,6 @@ ScDataTableView::ScDataTableView(const css::uno::Reference &r Control(VCLUnoHelper::GetWindow(rParent)), mpDoc(std::move(pDoc)), mpSelectionEngine(new SelectionEngine(this)), -mpTopLeft(VclPtr::Create(this, WB_SIZEABLE)), mpColView(VclPtr::Create(this, mpDoc.get(), mpSelectionEngine.get())), mpRowView(VclPtr::Create(this, mpDoc.get(), mpSelectionEngine.get())), mpVScroll(VclPtr::Create(this, false)), @@ -141,7 +140,6 @@ ScDataTableView::ScDataTableView(const css::uno::Reference &r mnFirstVisibleRow(0), mnFirstVisibleCol(0) { -mpTopLeft->setPosSizePixel(0, 0, nRowHeaderWidth, nColHeaderHeight); mpColView->setPosSizePixel(nRowHeaderWidth, 0, nRowHeaderWidth, nColHeaderHeight); mpRowView->setPosSizePixel(0, nColHeaderHeight, nRowHeaderWidth, nColHeaderHeight); @@ -153,7 +151,6 @@ ScDataTableView::ScDataTableView(const css::uno::Reference &r mpHScroll->SetRangeMax(50); mpHScroll->SetScrollHdl(LINK(this, ScDataTableView, HorzScrollHdl)); -mpTopLeft->Show(); mpColView->Show(); mpRowView->Show(); mpVScroll->Show(); @@ -167,7 +164,6 @@ ScDataTableView::~ScDataTableView() void ScDataTableView::dispose() { -mpTopLeft.disposeAndClear(); mpColView.disposeAndClear(); mpRowView.disposeAndClear(); mpVScroll.disposeAndClear(); @@ -249,7 +245,6 @@ void ScDataTableView::MouseButtonUp(const MouseEvent& rMEvt) void ScDataTableView::Resize() { Size aSize = GetSizePixel(); -mpTopLeft->setPosSizePixel(0, 0, nRowHeaderWidth, nColHeaderHeight); mpColView->setPosSizePixel(nRowHeaderWidth, 0, aSize.Width() - mnScrollBarSize, nColHeaderHeight); mpRowView->setPosSizePixel(0, nColHeaderHeight, nRowHeaderWidth, aSize.Height()); @@ -274,6 +269,13 @@ void ScDataTableView::Paint(vcl::RenderContext& rRenderContext, const tools::Rec aOutput.DrawDocumentBackground(); aOutput.DrawGrid(rRenderContext, true, false); aOutput.DrawStrings(); + +Color aFaceColor(rRenderContext.GetSettings().GetStyleSettings().GetFaceColor()); +rRenderContext.SetLineColor(aFaceColor); +rRenderContext.SetFillColor(aFaceColor); +rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), Size(nRowHeaderWidth, nColHeaderHeight))); +rRenderContext.DrawRect(tools::Rectangle(Point(aSize.Width() - mnScrollBarSize, aSize.Height() - mnScrollBarSize), Size(mnScrollBarSize, mnScrollBarSize))); + Control::Paint(rRenderContext, rRectangle); }
[Libreoffice-commits] core.git: reportdesign/source
reportdesign/source/ui/inc/ScrollHelper.hxx| 18 +- reportdesign/source/ui/report/ScrollHelper.cxx | 22 +++--- reportdesign/source/ui/report/ViewsWindow.cxx |8 ++-- reportdesign/source/ui/report/dlgedfunc.cxx| 21 + 4 files changed, 39 insertions(+), 30 deletions(-) New commits: commit 800551502416d3d80c8d14a53335dad5190290a4 Author: Caolán McNamara AuthorDate: Fri Aug 5 16:16:53 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:08:15 2022 +0200 tdf#117388 use native scrollbar under gtk in reportdesigner Change-Id: If7a66055dbae6d8ee31768ff438eb8105b8f980f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137880 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index 076943ff76fc..02b34d6e6034 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -16,9 +16,10 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SCROLLHELPER_HXX -#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SCROLLHELPER_HXX +#pragma once + +#include #include #include #include @@ -44,8 +45,8 @@ namespace rptui , public IMarkedSection { private: -VclPtr m_aHScroll; -VclPtr m_aVScroll; +VclPtr m_aHScroll; +VclPtr m_aVScroll; VclPtrm_aCornerWin; // window in the bottom right corner Sizem_aTotalPixelSize; VclPtr m_pParent; @@ -53,10 +54,10 @@ namespace rptui ::rtl::Reference m_pReportDefinitionMultiPlexer; // listener for property changes -DECL_LINK( ScrollHdl, ScrollBar*, void); +DECL_LINK( ScrollHdl, weld::Scrollbar&, void); Size ResizeScrollBars(); void ImplInitSettings(); -void impl_initScrollBar( ScrollBar& _rScrollBar ) const; +void impl_initScrollBar(ScrollAdaptor& rScrollBar) const; OScrollWindowHelper(OScrollWindowHelper const &) = delete; void operator =(OScrollWindowHelper const &) = delete; @@ -79,8 +80,8 @@ namespace rptui PointgetThumbPos() const { return Point(m_aHScroll->GetThumbPos(),m_aVScroll->GetThumbPos())/*m_aScrollOffset*/; } voidsetTotalSize(sal_Int32 _nWidth, sal_Int32 _nHeight); const Size& getTotalSize() const { return m_aTotalPixelSize; } -ScrollBar& GetHScroll() { return *m_aHScroll; } -ScrollBar& GetVScroll() { return *m_aVScroll; } +ScrollAdaptor& GetHScroll() { return *m_aHScroll; } +ScrollAdaptor& GetVScroll() { return *m_aVScroll; } // forwards voidSetMode( DlgEdMode _eMode ); @@ -205,6 +206,5 @@ namespace rptui sal_uInt16 getZoomFactor(SvxZoomType _eType) const; }; } -#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SCROLLHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index bf5f261cfd7f..de342a17807c 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -34,7 +34,7 @@ namespace rptui using namespace ::com::sun::star; -static void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const Size& _aSize,ScrollBar& _rScrollBar) +static void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const Size& _aSize,ScrollAdaptor& _rScrollBar) { _rScrollBar.SetPosSizePixel(_aPos,_aSize); _rScrollBar.SetPageSize( _nNewValue ); @@ -45,8 +45,8 @@ static void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const Size& OScrollWindowHelper::OScrollWindowHelper( ODesignView* _pDesignView) : OScrollWindowHelper_BASE( _pDesignView,WB_DIALOGCONTROL) ,OPropertyChangeListener(m_aMutex) -,m_aHScroll( VclPtr::Create(this, WB_HSCROLL|WB_REPEAT|WB_DRAG) ) -,m_aVScroll( VclPtr::Create(this, WB_VSCROLL|WB_REPEAT|WB_DRAG) ) +,m_aHScroll( VclPtr::Create(this, true) ) +,m_aVScroll( VclPtr::Create(this, false) ) ,m_aCornerWin( VclPtr::Create(this) ) ,m_pParent(_pDesignView) ,m_aReportWindow(VclPtr::Create(this,m_pParent)) @@ -83,20 +83,12 @@ void OScrollWindowHelper::dispose() OScrollWindowHelper_BASE::dispose(); } - -void OScrollWindowHelper::impl_initScrollBar( ScrollBar& _rScrollBar ) const +void OScrollWindowHelper::impl_initScrollBar( ScrollAdaptor& _rScrollBar ) const { -AllSettings aSettings( _rScrollBar.GetSettings() ); -StyleSettings aStyle( aSettings.GetStyl
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/inc/JoinTableView.hxx | 16 +--- dbaccess/source/ui/querydesign/JoinTableView.cxx | 21 + 2 files changed, 22 insertions(+), 15 deletions(-) New commits: commit 59a2650101a0ce711151bfd39af1bbb69f71f318 Author: Caolán McNamara AuthorDate: Fri Aug 5 15:51:46 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:07:49 2022 +0200 tdf#117388 use native scrollbar under gtk in database scrolled window Change-Id: I84486f8c8761b80fc45cdccc620485b67afdd048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137879 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index 80de958ea627..4dedc70e3c6c 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -18,6 +18,7 @@ */ #pragma once +#include #include #include #include @@ -50,8 +51,8 @@ namespace dbaui class OJoinTableView; class OScrollWindowHelper : public vcl::Window { -VclPtr m_aHScrollBar; -VclPtr m_aVScrollBar; +VclPtr m_aHScrollBar; +VclPtr m_aVScrollBar; VclPtrm_pCornerWindow; VclPtr m_pTableView; @@ -68,8 +69,8 @@ namespace dbaui void resetRange(const Point& _aSize); // own methods -ScrollBar& GetHScrollBar() { return *m_aHScrollBar; } -ScrollBar& GetVScrollBar() { return *m_aVScrollBar; } +ScrollAdaptor& GetHScrollBar() { return *m_aHScrollBar; } +ScrollAdaptor& GetVScrollBar() { return *m_aVScrollBar; } }; @@ -121,9 +122,10 @@ namespace dbaui virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; // own methods -ScrollBar& GetHScrollBar() { return static_cast(GetParent())->GetHScrollBar(); } -ScrollBar& GetVScrollBar() { return static_cast(GetParent())->GetVScrollBar(); } -DECL_LINK( ScrollHdl, ScrollBar*, void ); +ScrollAdaptor& GetHScrollBar() { return static_cast(GetParent())->GetHScrollBar(); } +ScrollAdaptor& GetVScrollBar() { return static_cast(GetParent())->GetVScrollBar(); } +DECL_LINK(VertScrollHdl, weld::Scrollbar&, void); +DECL_LINK(HorzScrollHdl, weld::Scrollbar&, void); void DrawConnections(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); void InvalidateConnections(); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 05562813379d..5cd3ec1f41ed 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -66,12 +66,11 @@ using namespace ::com::sun::star::lang; #define TABWIN_HEIGHT_STD 120 OScrollWindowHelper::OScrollWindowHelper( vcl::Window* pParent) : Window( pParent) -,m_aHScrollBar( VclPtr::Create(this, WB_HSCROLL|WB_REPEAT|WB_DRAG) ) -,m_aVScrollBar( VclPtr::Create(this, WB_VSCROLL|WB_REPEAT|WB_DRAG) ) +,m_aHScrollBar( VclPtr::Create(this, true) ) +,m_aVScrollBar( VclPtr::Create(this, false) ) ,m_pCornerWindow(VclPtr::Create(this, WB_3DLOOK)) ,m_pTableView(nullptr) { - // ScrollBars GetHScrollBar().SetRange( Range(0, 1000) ); @@ -106,8 +105,8 @@ void OScrollWindowHelper::setTableView(OJoinTableView* _pTableView) { m_pTableView = _pTableView; // ScrollBars -GetHScrollBar().SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) ); -GetVScrollBar().SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) ); +GetHScrollBar().SetScrollHdl( LINK(m_pTableView, OJoinTableView, HorzScrollHdl) ); +GetVScrollBar().SetScrollHdl( LINK(m_pTableView, OJoinTableView, VertScrollHdl) ); } void OScrollWindowHelper::resetRange(const Point& _aSize) @@ -201,10 +200,16 @@ void OJoinTableView::dispose() vcl::Window::dispose(); } -IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar, void ) +IMPL_LINK(OJoinTableView, HorzScrollHdl, weld::Scrollbar&, rScrollbar, void) +{ +// move all windows +ScrollPane(m_aScrollOffset.X() - rScrollbar.adjustment_get_value(), true, false); +} + +IMPL_LINK(OJoinTableView, VertScrollHdl, weld::Scrollbar&, rScrollbar, void) { // move all windows -ScrollPane( pScrollBar->GetDelta(), (pScrollBar == &GetHScrollBar()), false ); +ScrollPane(m_aScrollOffset.Y() - rScrollbar.adjustment_get_value(), false, false); } void OJoinTableView::Resize() @@ -405,7 +410,7 @@ namespace bool isScrollAllowed( OJoinTableView* _pView,tools::Long nDelta, bool bHoriz) { // adjust ScrollBar-Positions -ScrollBar& rBar = bHoriz ? _pView->GetHScrollBar() : _pView->GetVScrollBar() ; +ScrollAdaptor& rBar = bHoriz ? _pView->GetHScrollBar() : _pView->GetVScrollBar(); tools::Lon
[Libreoffice-commits] core.git: solenv/clang-format svtools/inc svtools/Library_svt.mk svtools/source toolkit/inc toolkit/Library_tk.mk toolkit/source
solenv/clang-format/excludelist | 55 - svtools/Library_svt.mk| 12 - svtools/source/uno/svtxgridcontrol.hxx| 110 -- svtools/source/uno/unoiface.cxx | 50 toolkit/Library_tk.mk | 11 + toolkit/inc/awt/vclxwindows.hxx | 82 + toolkit/inc/controls/table/defaultinputhandler.hxx|5 toolkit/inc/controls/table/gridtablerenderer.hxx |2 toolkit/inc/controls/table/mousefunction.hxx |2 toolkit/inc/controls/table/tablecontrol.hxx |2 toolkit/inc/controls/table/tablecontrolinterface.hxx |4 toolkit/inc/controls/table/tablemodel.hxx | 10 - toolkit/inc/controls/table/tablerenderer.hxx |2 toolkit/inc/controls/table/tablesort.hxx |3 toolkit/source/awt/vclxtoolkit.cxx|9 + toolkit/source/controls/svtxgridcontrol.cxx | 11 + toolkit/source/controls/table/defaultinputhandler.cxx |6 toolkit/source/controls/table/gridtablerenderer.cxx |4 toolkit/source/controls/table/mousefunction.cxx |7 - toolkit/source/controls/table/tablecontrol.cxx|2 toolkit/source/controls/table/tablecontrol_impl.cxx |6 toolkit/source/controls/table/tablecontrol_impl.hxx |4 toolkit/source/controls/table/tabledatawindow.cxx |2 toolkit/source/controls/table/tablegeometry.hxx |4 toolkit/source/controls/unocontroltablemodel.cxx |4 toolkit/source/controls/unocontroltablemodel.hxx |4 toolkit/source/controls/unogridcolumnfacade.hxx |2 27 files changed, 169 insertions(+), 246 deletions(-) New commits: commit 4d96e375c28f9fe2dded40cba4ee8c67f77817f3 Author: Caolán McNamara AuthorDate: Fri Aug 5 14:46:37 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:09:49 2022 +0200 move SVTXGridControl to toolkit Change-Id: I513a2885027d0295f70e7c64269d1653a6c2642b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137870 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 57c338efbd9d..2f49fd77545a 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -11198,15 +11198,6 @@ svl/source/uno/pathservice.cxx svl/unx/source/svdde/ddedummy.cxx svtools/inc/strings.hxx svtools/inc/framestatuslistener.hxx -svtools/inc/table/defaultinputhandler.hxx -svtools/inc/table/gridtablerenderer.hxx -svtools/inc/table/tablecontrol.hxx -svtools/inc/table/tablecontrolinterface.hxx -svtools/inc/table/tableinputhandler.hxx -svtools/inc/table/tablemodel.hxx -svtools/inc/table/tablerenderer.hxx -svtools/inc/table/tablesort.hxx -svtools/inc/table/tabletypes.hxx svtools/langsupport/langsupport.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/brwbox2.cxx @@ -11289,19 +11280,6 @@ svtools/source/svrtf/parrtf.cxx svtools/source/svrtf/rtfkeywd.cxx svtools/source/svrtf/rtfout.cxx svtools/source/svrtf/svparser.cxx -svtools/source/table/cellvalueconversion.cxx -svtools/source/table/cellvalueconversion.hxx -svtools/source/table/defaultinputhandler.cxx -svtools/source/table/gridtablerenderer.cxx -svtools/source/table/mousefunction.cxx -svtools/source/table/mousefunction.hxx -svtools/source/table/tablecontrol.cxx -svtools/source/table/tablecontrol_impl.cxx -svtools/source/table/tablecontrol_impl.hxx -svtools/source/table/tabledatawindow.cxx -svtools/source/table/tabledatawindow.hxx -svtools/source/table/tablegeometry.cxx -svtools/source/table/tablegeometry.hxx svtools/source/uno/addrtempuno.cxx svtools/source/uno/fpicker.cxx svtools/source/uno/fpicker.hxx @@ -11311,14 +11289,8 @@ svtools/source/uno/miscservices.cxx svtools/source/uno/popupmenucontrollerbase.cxx svtools/source/uno/popupwindowcontroller.cxx svtools/source/uno/statusbarcontroller.cxx -svtools/source/uno/svtxgridcontrol.cxx -svtools/source/uno/svtxgridcontrol.hxx svtools/source/uno/toolboxcontroller.cxx -svtools/source/uno/unocontroltablemodel.cxx -svtools/source/uno/unocontroltablemodel.hxx svtools/source/uno/unoevent.cxx -svtools/source/uno/unogridcolumnfacade.cxx -svtools/source/uno/unogridcolumnfacade.hxx svtools/source/uno/unoiface.cxx svtools/source/uno/unoimap.cxx svtools/source/uno/wizard/unowizard.cxx @@ -13646,6 +13618,15 @@ toolkit/inc/controls/roadmapentry.hxx toolkit/inc/controls/stdtabcontroller.hxx toolkit/inc/controls/stdtabcontrollermodel.hxx toolkit/inc/controls/svmedit.hxx +toolkit/inc/controls/table/defaultinputhandler.hxx +toolkit/inc/controls/table/gridtablerenderer.hxx +toolkit/inc/controls/table/tablecontrol.hxx +toolkit/inc/controls/table/tablecontrolinterface.hxx +toolkit/inc/controls/table/tableinputhandler.hxx +toolkit/inc/controls/table/tablemodel.hxx +toolkit/inc/controls/table/tabl
[Libreoffice-commits] core.git: svtools/uiconfig
svtools/uiconfig/ui/scrollbars.ui |2 -- 1 file changed, 2 deletions(-) New commits: commit 528941a3fd01465e638cea86801cf454cc61f807 Author: Caolán McNamara AuthorDate: Fri Aug 5 21:21:57 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:07:24 2022 +0200 Revert "align horz scrollbar to top if assigned more space than it wants" This reverts commit 106bc0fd7a94eb48e8a81be753c156496b83578a. it has an unusual effect in writer on hiding and reshowing scrollbars Change-Id: I0569bf3ddb9b04f1afc6c26add84086bdf4ff5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137886 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svtools/uiconfig/ui/scrollbars.ui b/svtools/uiconfig/ui/scrollbars.ui index c7901e4d32e8..f2c9ac728376 100644 --- a/svtools/uiconfig/ui/scrollbars.ui +++ b/svtools/uiconfig/ui/scrollbars.ui @@ -21,7 +21,6 @@ False -start True vertical adjustment1 @@ -35,7 +34,6 @@ False -start True adjustment2
[Libreoffice-commits] core.git: hwpfilter/source
hwpfilter/source/hwpreader.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit bd13bd144cfa00a52a056a95167c8510c84a0e40 Author: Caolán McNamara AuthorDate: Fri Aug 5 21:19:55 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Aug 6 13:06:40 2022 +0200 ofz#49832 Integer-overflow Change-Id: I35efe0b78546b4804206f78159b2fc18172ca4f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137885 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index ab495315722c..73642b5d63f0 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -575,7 +575,8 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo ) } if( prop->angle > 0 && ( prop->gstyle == 1 || prop->gstyle == 4)) { -int angle = 1800 - prop->angle * 10; +auto normangle = prop->angle % 360; +int angle = 1800 - normangle * 10; mxList->addAttribute( "draw:angle", sXML_CDATA, OUString::number(angle)); } startEl("draw:gradient");
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 1 new defect(s) introduced to LibreOffice found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1507764: Incorrect expression (BAD_COMPARE) /basctl/source/basicide/bastypes.cxx: 75 in basctl::BaseWindow::dispose()() *** CID 1507764: Incorrect expression (BAD_COMPARE) /basctl/source/basicide/bastypes.cxx: 75 in basctl::BaseWindow::dispose()() 69 { 70 disposeOnce(); 71 } 72 73 void BaseWindow::dispose() 74 { >>> CID 1507764: Incorrect expression (BAD_COMPARE) >>> Comparing logical negation "!this->pShellVScrollBar.operator bool()" >>> against "this->isDisposed()" is likely to be incorrect. 75 if (pShellVScrollBar && !pShellVScrollBar>isDisposed()) 76 pShellVScrollBar->SetScrollHdl( Link() ); 77 if (pShellHScrollBar && !pShellHScrollBar->isDisposed()) 78 pShellHScrollBar->SetScrollHdl( Link() ); 79 pShellVScrollBar.clear(); 80 pShellHScrollBar.clear(); To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D7MZ-_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiajJW2Xu1nIbPMJt4rXQkJukVZGuGqIC-2FmAAp0WYsTtT3XHFuF5oKKQfjb14vUaNShw28jhuU5nkJH6vBkUFy3khbjI9tDRq2x39kd-2BnS5k-2FaCqJH7noCAa2ArX-2FJQ4YJuO9uQARRbtzPz0mvqy5ZpatpI-2Fl7SauWetnJ4J3bZ38-3D
[Libreoffice-commits] core.git: include/vbahelper sc/source vbahelper/source
include/vbahelper/vbahelper.hxx |3 --- sc/source/ui/vba/vbasheetobject.cxx | 10 ++ sc/source/ui/vba/vbasheetobjects.cxx | 10 ++ vbahelper/source/vbahelper/vbahelper.cxx | 26 +++--- 4 files changed, 23 insertions(+), 26 deletions(-) New commits: commit ed4ffba1c180c74e3b9c3aadc279ff92bda8ab5a Author: Mike Kaganski AuthorDate: Sat Aug 6 09:28:57 2022 +0300 Commit: Mike Kaganski CommitDate: Sat Aug 6 12:10:19 2022 +0200 Drop some conversion from vbahelper; use usual functions where needed Change-Id: I71bea54f095072a0e403bfc7aa48a0f0f9a0ebaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137891 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx index 07c5fce6ec6b..01366d9ad771 100644 --- a/include/vbahelper/vbahelper.hxx +++ b/include/vbahelper/vbahelper.hxx @@ -121,11 +121,8 @@ namespace ooo::vba /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC OUString getAnyAsString( const css::uno::Any& pvargItem ); VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn); // needs to be in a uno service ( already this code is duplicated in basic ) -VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( const css::uno::Reference< css::awt::XDevice >& xDevice, bool bVertical); VBAHELPER_DLLPUBLIC double PointsToPixels( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, bool bVertical); VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPixels, bool bVertical); -VBAHELPER_DLLPUBLIC sal_Int32 PointsToHmm( double fPoints ); -VBAHELPER_DLLPUBLIC double HmmToPoints( sal_Int32 nHmm ); VBAHELPER_DLLPUBLIC PointerStyle getPointerStyle( const css::uno::Reference< css::frame::XModel >& ); VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, PointerStyle nPointer, bool bOverWrite ); /// @throws css::uno::RuntimeException diff --git a/sc/source/ui/vba/vbasheetobject.cxx b/sc/source/ui/vba/vbasheetobject.cxx index 52513095fac4..ff37ab8addfb 100644 --- a/sc/source/ui/vba/vbasheetobject.cxx +++ b/sc/source/ui/vba/vbasheetobject.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,15 @@ using namespace ::ooo::vba; constexpr OUStringLiteral gaListenerType = u"XActionListener"; constexpr OUStringLiteral gaEventMethod = u"actionPerformed"; +static double HmmToPoints(double nHmm) +{ +return o3tl::convert(nHmm, o3tl::Length::mm100, o3tl::Length::pt); +} + +static sal_Int32 PointsToHmm(double fPoints) +{ +return std::round(o3tl::convert(fPoints, o3tl::Length::pt, o3tl::Length::mm100)); +} ScVbaButtonCharacters::ScVbaButtonCharacters( const uno::Reference< XHelperInterface >& rxParent, diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index 32e025a3ca7e..a6a9a1233b8e 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -19,6 +19,7 @@ #include "vbasheetobjects.hxx" #include +#include #include #include #include @@ -58,9 +59,10 @@ bool lclGetProperty( Type& orValue, const uno::Reference< beans::XPropertySet >& @throws uno::RuntimeException */ -double lclPointsToHmm( const uno::Any& rPoints ) +sal_Int32 lclPointsToHmm( const uno::Any& rPoints ) { -return PointsToHmm( ::rtl::math::approxFloor( rPoints.get< double >() / 0.75 ) * 0.75 ); +return std::round(o3tl::convert(::rtl::math::approxFloor(rPoints.get() / 0.75) * 0.75, +o3tl::Length::pt, o3tl::Length::mm100)); } } // namespace @@ -349,8 +351,8 @@ uno::Any SAL_CALL ScVbaGraphicObjectsBase::Add( const uno::Any& rLeft, const uno /* Extract double values from passed Anys (the lclPointsToHmm() helper function will throw a RuntimeException on any error), and convert from points to 1/100 mm. */ -awt::Point aPos( static_cast(lclPointsToHmm( rLeft )), static_cast(lclPointsToHmm( rTop )) ); -awt::Size aSize( static_cast(lclPointsToHmm( rWidth )), static_cast(lclPointsToHmm( rHeight )) ); +awt::Point aPos( lclPointsToHmm( rLeft ), lclPointsToHmm( rTop ) ); +awt::Size aSize( lclPointsToHmm( rWidth ), lclPointsToHmm( rHeight ) ); // TODO: translate coordinates for RTL sheets if( (aPos.X < 0) || (aPos.Y < 0) || (aSize.Width <= 0) || (aSize.Height <= 0) ) throw uno::RuntimeException(); diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index a6e7ac1da2aa..be4098ce6ae9 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -62,6 +62,7 @@ #include #include #include +#include
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/ndarr.hxx |4 +++- sw/source/core/docnode/ndtbl.cxx |6 ++ sw/source/core/unocore/unotext.cxx | 14 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 36333de160c88a3190d799c031b16e1ef6bcaa86 Author: Noel Grandin AuthorDate: Sat Aug 6 09:37:00 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 12:04:43 2022 +0200 no need to allocate on heap here Change-Id: I889690c136f200cffd0398254ec9935e2027a32c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137893 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 683cfde170bf..1b1227549583 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include "bparr.hxx" #include "ndtyp.hxx" @@ -260,7 +261,8 @@ public: SwTextFormatColl* pTextColl, SwUndoTextToTable* pUndo ); -std::unique_ptr ExpandRangeForTableBox(const SwNodeRange & rRange); +void ExpandRangeForTableBox(const SwNodeRange & rRange, +std::optional& rExpandedRange); /// create a table from a vector of NodeRanges - API support SwTableNode* TextToTable( const TableRanges_t& rTableNodes, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 9f4ff4cacade..9f8ab820b4a0 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1273,7 +1273,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector > return &rNdTable; } -std::unique_ptr SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) +void SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange, std::optional& rExpandedRange) { bool bChanged = false; @@ -1328,10 +1328,8 @@ std::unique_ptr SwNodes::ExpandRangeForTableBox(const SwNodeRange & pNode = &aIndex.GetNode(); } -std::unique_ptr pResult; if (bChanged) -pResult.reset(new SwNodeRange(aNewStart, aNewEnd)); -return pResult; +rExpandedRange.emplace(aNewStart, aNewEnd); } static void diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index d5e2cac57e35..c2440ffb1a8b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1925,23 +1925,23 @@ void SwXText::Impl::ConvertCell( SwNodeRange aTmpRange(aStartCellPam.Start()->nNode, aEndCellPam.End()->nNode); -std::unique_ptr pCorrectedRange = -m_pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange); +std::optional oCorrectedRange; +m_pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange, oCorrectedRange); -if (pCorrectedRange) +if (oCorrectedRange) { -SwPaM aNewStartPaM(pCorrectedRange->aStart, 0); +SwPaM aNewStartPaM(oCorrectedRange->aStart, 0); aStartCellPam = aNewStartPaM; sal_Int32 nEndLen = 0; -SwTextNode * pTextNode = pCorrectedRange->aEnd.GetNode().GetTextNode(); +SwTextNode * pTextNode = oCorrectedRange->aEnd.GetNode().GetTextNode(); if (pTextNode != nullptr) nEndLen = pTextNode->Len(); -SwPaM aNewEndPaM(pCorrectedRange->aEnd, nEndLen); +SwPaM aNewEndPaM(oCorrectedRange->aEnd, nEndLen); aEndCellPam = aNewEndPaM; -pCorrectedRange.reset(); +oCorrectedRange.reset(); } /** check the nodes between start and end
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - .gitignore
.gitignore |1 + 1 file changed, 1 insertion(+) New commits: commit 77db8a49c18260c54717f5151592304cc7029dd2 Author: Stephan Bergmann AuthorDate: Fri Jul 1 15:40:29 2022 +0200 Commit: Pranam Lashkari CommitDate: Sat Aug 6 11:34:40 2022 +0200 Add generated lo.xcent to .gitignore (recently introduced in c78b49ec132eb5126445ebee7d259d3df7fcaa68 "don't specify entitlements that are not used (sdremote w/o bluetooth)") Change-Id: Ied7db52d891e92224bc2be0ad1277f40e5d80b3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136752 Tested-by: Jenkins Reviewed-by: Stephan Bergmann Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137868 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/.gitignore b/.gitignore index 77fdadef0a2f..fdae2d0b034a 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,7 @@ /bin/odfvalidator.sh /bin/officeotron.sh /hardened_runtime.xcent +/lo.xcent /Makefile # make id
[Libreoffice-commits] core.git: formula/source include/formula sc/source
formula/source/core/api/FormulaCompiler.cxx | 143 +++- include/formula/FormulaCompiler.hxx | 42 ++-- sc/source/core/tool/calcconfig.cxx | 13 ++ 3 files changed, 167 insertions(+), 31 deletions(-) New commits: commit 28c4c72a4e81821d9e567757725937f74a6d114f Author: Eike Rathke AuthorDate: Fri Aug 5 12:43:36 2022 +0200 Commit: Eike Rathke CommitDate: Sat Aug 6 11:19:01 2022 +0200 Related: tdf#135993 Destroy temporary OpCodeMap when reading config Initialized at FormulaCompiler base class instance it lacks AddIn mapping and a still existing OpCodeMap prevents necessary reinitialization from derived ScCompiler instance later. Change-Id: I0c2db41dd45829abfb8460730264f097ab76ab2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137881 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index be926e7d521a..2b0db73d1a39 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -823,37 +823,37 @@ FormulaCompiler::OpCodeMapPtr FormulaCompiler::GetOpCodeMap( const sal_Int32 nLa { case FormulaLanguage::ODFF : if (!mxSymbolsODFF) -InitSymbolsODFF(); +InitSymbolsODFF( InitSymbols::INIT); xMap = mxSymbolsODFF; break; case FormulaLanguage::ODF_11 : if (!mxSymbolsPODF) -InitSymbolsPODF(); +InitSymbolsPODF( InitSymbols::INIT); xMap = mxSymbolsPODF; break; case FormulaLanguage::ENGLISH : if (!mxSymbolsEnglish) -InitSymbolsEnglish(); +InitSymbolsEnglish( InitSymbols::INIT); xMap = mxSymbolsEnglish; break; case FormulaLanguage::NATIVE : if (!mxSymbolsNative) -InitSymbolsNative(); +InitSymbolsNative( InitSymbols::INIT); xMap = mxSymbolsNative; break; case FormulaLanguage::XL_ENGLISH: if (!mxSymbolsEnglishXL) -InitSymbolsEnglishXL(); +InitSymbolsEnglishXL( InitSymbols::INIT); xMap = mxSymbolsEnglishXL; break; case FormulaLanguage::OOXML: if (!mxSymbolsOOXML) -InitSymbolsOOXML(); +InitSymbolsOOXML( InitSymbols::INIT); xMap = mxSymbolsOOXML; break; case FormulaLanguage::API : if (!mxSymbolsAPI) -InitSymbolsAPI(); +InitSymbolsAPI( InitSymbols::INIT); xMap = mxSymbolsAPI; break; default: @@ -862,6 +862,62 @@ FormulaCompiler::OpCodeMapPtr FormulaCompiler::GetOpCodeMap( const sal_Int32 nLa return xMap; } +void FormulaCompiler::DestroyOpCodeMap( const sal_Int32 nLanguage ) +{ +using namespace sheet; +switch (nLanguage) +{ +case FormulaLanguage::ODFF : +InitSymbolsODFF( InitSymbols::DESTROY); +break; +case FormulaLanguage::ODF_11 : +InitSymbolsPODF( InitSymbols::DESTROY); +break; +case FormulaLanguage::ENGLISH : +InitSymbolsEnglish( InitSymbols::DESTROY); +break; +case FormulaLanguage::NATIVE : +InitSymbolsNative( InitSymbols::DESTROY); +break; +case FormulaLanguage::XL_ENGLISH: +InitSymbolsEnglishXL( InitSymbols::DESTROY); +break; +case FormulaLanguage::OOXML: +InitSymbolsOOXML( InitSymbols::DESTROY); +break; +case FormulaLanguage::API : +InitSymbolsAPI( InitSymbols::DESTROY); +break; +default: +; // nothing +} +} + +bool FormulaCompiler::HasOpCodeMap( const sal_Int32 nLanguage ) const +{ +using namespace sheet; +switch (nLanguage) +{ +case FormulaLanguage::ODFF : +return InitSymbolsODFF( InitSymbols::ASK); +case FormulaLanguage::ODF_11 : +return InitSymbolsPODF( InitSymbols::ASK); +case FormulaLanguage::ENGLISH : +return InitSymbolsEnglish( InitSymbols::ASK); +case FormulaLanguage::NATIVE : +return InitSymbolsNative( InitSymbols::ASK); +case FormulaLanguage::XL_ENGLISH: +return InitSymbolsEnglishXL( InitSymbols::ASK); +case FormulaLanguage::OOXML: +return InitSymbolsOOXML( InitSymbols::ASK); +case FormulaLanguage::API : +return InitSymbolsAPI( InitSymbols::ASK); +default: +; // nothing +} +return false; +} + OUString FormulaCompiler::FindAddInFunction( const OUString& /*rUpperName*/, bool /*bLocalFirst*/ ) const { return OUString(); @@ -898,12 +954,16 @@ Formula
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/pam.hxx |2 +- sw/source/core/crsr/crsrsh.cxx |6 +++--- sw/source/core/crsr/pam.cxx |8 sw/source/core/crsr/swcrsr.cxx | 12 ++-- sw/source/core/doc/docbm.cxx|2 +- sw/source/core/docnode/ndsect.cxx |8 sw/source/core/docnode/node2lay.cxx |4 ++-- sw/source/core/docnode/nodes.cxx| 10 +- sw/source/filter/basflt/fltshell.cxx|8 sw/source/filter/xml/XMLRedlineImportHelper.cxx |4 ++-- 10 files changed, 32 insertions(+), 32 deletions(-) New commits: commit 7fba323df141be9eddbce39bec0c0f7ee412a7f7 Author: Noel Grandin AuthorDate: Fri Aug 5 15:56:13 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 09:10:42 2022 +0200 make CheckNodesRange take a SwNode, not an SwNodeIndex as part of the process of hiding the internals of SwPosition Change-Id: If8e9426df4b78ebf95bbac54ebfdcff4b19b6292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137874 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 60675cd2aa33..86e4b6fb5226 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -329,7 +329,7 @@ public: SW_DLLPUBLIC std::ostream &operator <<(std::ostream& s, const SwPaM& pam); -bool CheckNodesRange(const SwNodeIndex&, const SwNodeIndex&, bool bChkSection); +bool CheckNodesRange(const SwNode&, const SwNode&, bool bChkSection); #endif // INCLUDED_SW_INC_PAM_HXX diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 99840a2494dc..63cce668c13e 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -837,7 +837,7 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) else { // SSelection over not allowed sections or if in header/footer -> different -if( !CheckNodesRange( aPos.nNode, pCursor->GetMark()->nNode, true ) +if( !CheckNodesRange( aPos.GetNode(), pCursor->GetMark()->GetNode(), true ) || ( pFrame && !pFrame->getFrameArea().Contains( pCursor->GetMkPos() ) )) return bRet; @@ -2343,8 +2343,8 @@ void SwCursorShell::Combine() SwCursorSaveState aSaveState(*m_pStackCursor); // stack cursor & current cursor in same Section? assert(!m_pStackCursor->HasMark() || -CheckNodesRange(m_pStackCursor->GetMark()->nNode, -m_pCurrentCursor->GetPoint()->nNode, true)); +CheckNodesRange(m_pStackCursor->GetMark()->GetNode(), +m_pCurrentCursor->GetPoint()->GetNode(), true)); *m_pStackCursor->GetPoint() = *m_pCurrentCursor->GetPoint(); m_pStackCursor->GetPtPos() = m_pCurrentCursor->GetPtPos(); diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 75e631dea971..f588e12f3d63 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -316,8 +316,8 @@ static bool lcl_ChkOneRange( CHKSECTION eSec, bool bChkSections, * * @return if valid range */ -bool CheckNodesRange( const SwNodeIndex& rStt, - const SwNodeIndex& rEnd, bool bChkSection ) +bool CheckNodesRange( const SwNode& rStt, + const SwNode& rEnd, bool bChkSection ) { const SwNodes& rNds = rStt.GetNodes(); SwNodeOffset nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex(); @@ -369,7 +369,7 @@ SwContentNode* GoNextNds( SwNodeIndex* pIdx, bool bChk ) if( pNd ) { if( bChk && SwNodeOffset(1) != aIdx.GetIndex() - pIdx->GetIndex() && -!CheckNodesRange( *pIdx, aIdx, true ) ) +!CheckNodesRange( pIdx->GetNode(), aIdx.GetNode(), true ) ) pNd = nullptr; else *pIdx = aIdx; @@ -384,7 +384,7 @@ SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk ) if( pNd ) { if( bChk && SwNodeOffset(1) != pIdx->GetIndex() - aIdx.GetIndex() && -!CheckNodesRange( *pIdx, aIdx, true ) ) +!CheckNodesRange( pIdx->GetNode(), aIdx.GetNode(), true ) ) pNd = nullptr; else *pIdx = aIdx; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 9a9361b3957b..30da6b644ea0 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -202,7 +202,7 @@ bool SwTableCursor::IsSelOvrCheck(SwCursorSelOverFlags eFlags) && HasMark() ) { SwNodeIndex aOldPos( rNds, GetSavePos()->nNode ); -if( !CheckNodesRange( aOldPos, GetPoint()->nNode, true )) +if( !CheckNodesRange( aOldPos.GetNode(), GetPoint()->GetNode(), true )) { GetPoint()->nNode = aOldPos; GetPoint()->nContent.Assign( GetContentNode(), GetSavePos()->nContent ); @@ -270,7 +270,7 @@ bool SwCursor::IsSelOvr
[Libreoffice-commits] core.git: sw/source
sw/source/core/crsr/pam.cxx |2 +- sw/source/core/doc/DocumentContentOperationsManager.cxx |2 +- sw/source/core/doc/docfmt.cxx |2 +- sw/source/core/doc/docnum.cxx |4 ++-- sw/source/core/inc/txtfrm.hxx |2 +- sw/source/core/text/txtfrm.cxx |4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) New commits: commit e1340083a8a22df3d834ba252e7947a50afc439e Author: Noel Grandin AuthorDate: Fri Aug 5 15:23:25 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 09:10:23 2022 +0200 make GetFirstAndLastNode take a SwNode, not an SwNodeIndex as part of the process of hiding the internals of SwPosition Change-Id: Ic26ed0fef1d7394ed2673b5949718fe8099b3d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137873 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 3fd8e5ffa072..75e631dea971 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -983,7 +983,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const & { if (i_pLayout && aPos.GetNode().IsTextNode()) { -auto const fal(sw::GetFirstAndLastNode(*pLayout, aPos.nNode)); +auto const fal(sw::GetFirstAndLastNode(*pLayout, aPos.GetNode())); aPos.nNode = bSrchForward ? *fal.second : *fal.first; } diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 409f053ddc99..37e21b5506c6 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1625,7 +1625,7 @@ namespace //local functions originally from docfmt.cxx SwContentNode * pFirstNode(pNode); if (pLayout && pLayout->HasMergedParas()) { -pFirstNode = sw::GetFirstAndLastNode(*pLayout, pStt->nNode).first; +pFirstNode = sw::GetFirstAndLastNode(*pLayout, pStt->GetNode()).first; } SwRegHistory aRegH( pFirstNode, *pFirstNode, pHistory ); bRet = pFirstNode->SetAttr( aNew ) || bRet; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 4462f2b373f5..163fc16e1039 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1692,7 +1692,7 @@ void SwDoc::MoveLeftMargin(const SwPaM& rPam, bool bRight, bool bModulus, SwRegHistory aRegH( pTNd, *pTNd, pHistory ); pTNd->SetAttr( aLS ); -aIdx = *sw::GetFirstAndLastNode(*pLayout, aIdx).second; +aIdx = *sw::GetFirstAndLastNode(*pLayout, aIdx.GetNode()).second; } ++aIdx; } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 422fea98bce9..68e3a4727817 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1830,7 +1830,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM if (pLayout) { std::pair nodes( -sw::GetFirstAndLastNode(*pLayout, rPam.Start()->nNode)); +sw::GetFirstAndLastNode(*pLayout, rPam.Start()->GetNode())); if (nodes.first && nodes.first != &rPam.Start()->GetNode()) { assert(nodes.second); @@ -1849,7 +1849,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM assert(nodes.first->GetIndex() < rPam.Start()->GetNodeIndex()); rPam.Start()->Assign(*nodes.first); } -nodes = sw::GetFirstAndLastNode(*pLayout, rPam.End()->nNode); +nodes = sw::GetFirstAndLastNode(*pLayout, rPam.End()->GetNode()); if (nodes.second && nodes.second != &rPam.End()->GetNode()) { assert(nodes.first); diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index dde60392c8df..9109e949bd80 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -112,7 +112,7 @@ bool IsParaPropsNode(SwRootFrame const& rLayout, SwTextNode const& rNode); SwTextNode * GetParaPropsNode(SwRootFrame const& rLayout, SwNode const& rNode); SwPosition GetParaPropsPos(SwRootFrame const& rLayout, SwPosition const& rPos); std::pair -GetFirstAndLastNode(SwRootFrame const& rLayout, SwNodeIndex const& rPos); +GetFirstAndLastNode(SwRootFrame const& rLayout, SwNode const& rPos); SwTextNode const& GetAttrMerged(SfxItemSet & rFormatSet, SwTextNode const& rNode, SwRootFrame const* pLayout); diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 23e226f87d1c
[Libreoffice-commits] core.git: sw/source
sw/source/core/crsr/crsrsh.cxx |8 sw/source/core/crsr/crstrvl.cxx |2 +- sw/source/core/doc/docfmt.cxx |4 ++-- sw/source/core/doc/docnum.cxx |8 sw/source/core/edit/edattr.cxx |4 ++-- sw/source/core/edit/edfcol.cxx |2 +- sw/source/core/edit/ednumber.cxx| 20 ++-- sw/source/core/inc/txtfrm.hxx |3 ++- sw/source/core/text/txtfrm.cxx |6 +++--- sw/source/core/tox/ToxTextGenerator.cxx |2 +- sw/source/uibase/wrtsh/wrtsh1.cxx | 10 +- 11 files changed, 35 insertions(+), 34 deletions(-) New commits: commit 59b8813606f084d62dbd3debed7f6b468d916459 Author: Noel Grandin AuthorDate: Fri Aug 5 15:04:11 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 09:09:58 2022 +0200 make GetParaPropsNode take a SwNode, not an SwNodeIndex as part of the process of hiding the internals of SwPosition Change-Id: Idefc1cd390c551bf7b54ee122c7fc7e4feb8f45d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137872 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 13779e0b6999..99840a2494dc 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -351,7 +351,7 @@ bool SwCursorShell::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMo )->MapModelToViewPos(*pShellCursor->GetPoint()) == TextFrameIndex(0) && !pShellCursor->IsInFrontOfLabel() && !pShellCursor->HasMark() -&& nullptr != (pTextNd = sw::GetParaPropsNode(*GetLayout(), pShellCursor->GetPoint()->nNode)) +&& nullptr != (pTextNd = sw::GetParaPropsNode(*GetLayout(), pShellCursor->GetPoint()->GetNode())) && pTextNd->HasVisibleNumberingOrBullet()) { SetInFrontOfLabel( true ); @@ -405,7 +405,7 @@ void SwCursorShell::MarkListLevel( const OUString& sListId, void SwCursorShell::UpdateMarkedListLevel() { SwTextNode const*const pTextNd = sw::GetParaPropsNode(*GetLayout(), -GetCursor_()->GetPoint()->nNode); +GetCursor_()->GetPoint()->GetNode()); if ( !pTextNd ) return; @@ -547,7 +547,7 @@ bool SwCursorShell::LRMargin( bool bLeft, bool bAPI) if ( bLeft && !bTableMode && bRet && bWasAtLM && !GetCursor_()->HasMark() ) { const SwTextNode * pTextNd = GetCursor_()->GetNode().GetTextNode(); -assert(sw::GetParaPropsNode(*GetLayout(), GetCursor_()->GetPoint()->nNode) == pTextNd); +assert(sw::GetParaPropsNode(*GetLayout(), GetCursor_()->GetPoint()->GetNode()) == pTextNd); if ( pTextNd && pTextNd->HasVisibleNumberingOrBullet() ) SetInFrontOfLabel( true ); } @@ -769,7 +769,7 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) bOnlyText ? CursorMoveState::SetOnlyText : CursorMoveState::NONE ); aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable(); -SwTextNode const*const pTextNd = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->nNode); +SwTextNode const*const pTextNd = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->GetNode()); if ( pTextNd && !IsTableMode() && // #i37515# No bInFrontOfLabel during selection diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 089314a4b302..bd7535f21c18 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1377,7 +1377,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, && IsAttrAtPos::NumLabel & rContentAtPos.eContentAtPos) { bRet = aTmpState.m_bInNumPortion; -rContentAtPos.aFnd.pNode = sw::GetParaPropsNode(*GetLayout(), aPos.nNode); +rContentAtPos.aFnd.pNode = sw::GetParaPropsNode(*GetLayout(), aPos.GetNode()); Size aSizeLogic(aTmpState.m_nInNumPortionOffset, 0); Size aSizePixel = GetWin()->LogicToPixel(aSizeLogic); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 068a8eed98a7..4462f2b373f5 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1016,7 +1016,7 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* pArgs ) } if (pCNd->IsTextNode()) { -pCNd = sw::GetParaPropsNode(*pPara->pLayout, SwNodeIndex(*pCNd)); +pCNd = sw::GetParaPropsNode(*pPara->pLayout, *pCNd); } } @@ -1656,7 +1656,7 @@ void SwDoc::MoveLeftMargin(const SwPaM& rPam, bool bRight, bool bModulus, SwTextNode* pTNd = aIdx.GetNode().GetTextNode(); if( pTNd ) { -pTNd = sw::GetParaPropsNode(*pLayout, aIdx); +pTNd = sw::GetParaPropsNode(*pLayout, aIdx.GetNode()); SvxLRSpaceItem aLS(pTNd->SwContentNode::GetAttr(RES_LR_SPA
[Libreoffice-commits] core.git: reportdesign/source
reportdesign/source/ui/misc/UITools.cxx | 127 1 file changed, 66 insertions(+), 61 deletions(-) New commits: commit 9a444884c3b221c9bd7b0aa4476c160921c7fc35 Author: Noel Grandin AuthorDate: Fri Aug 5 14:11:41 2022 +0200 Commit: Noel Grandin CommitDate: Sat Aug 6 09:09:33 2022 +0200 tdf#150222 reporbuilder, set font for a text box crashes regression from commit c4cf2e82e8d0aaef9b1daedc033d6edf647e5284 Author: Samuel Mehrbrodt Date: Mon Jun 13 08:53:22 2022 +0200 tdf#128150 Add OOXML import/export for "use background fill" which modified XATTR_FILL_LAST. Ideally, I would just adjust the ranges for the pool, but I can't do that because we are using static defaults, and the range for static defaults has to be contiguous. Also update the aItemInfos array to avoid a DBG_UTIL check that complains about mapping a SID to itself Change-Id: Ie76bdc83fa0a0ad07b6b2afdb678193889373cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137867 Tested-by: Julien Nabet Reviewed-by: Julien Nabet Reviewed-by: Noel Grandin diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index b77f3f77a77b..1c0ca7733e6a 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -120,46 +120,50 @@ #include #include -#define ITEMID_FONT TypedWhichId(XATTR_FILL_LAST + 1) -#define ITEMID_FONTHEIGHT TypedWhichId(XATTR_FILL_LAST + 2) -#define ITEMID_LANGUAGE TypedWhichId(XATTR_FILL_LAST + 3) - -#define ITEMID_POSTURE TypedWhichId(XATTR_FILL_LAST + 4) -#define ITEMID_WEIGHT TypedWhichId(XATTR_FILL_LAST + 5) -#define ITEMID_SHADOWED TypedWhichId(XATTR_FILL_LAST + 6) -#define ITEMID_WORDLINEMODE TypedWhichId(XATTR_FILL_LAST + 7) -#define ITEMID_CONTOUR TypedWhichId(XATTR_FILL_LAST + 8) -#define ITEMID_CROSSEDOUT TypedWhichId(XATTR_FILL_LAST + 9) -#define ITEMID_UNDERLINE TypedWhichId(XATTR_FILL_LAST + 10) - -#define ITEMID_COLOR TypedWhichId(XATTR_FILL_LAST + 11) -#define ITEMID_KERNING TypedWhichId(XATTR_FILL_LAST + 12) -#define ITEMID_CASEMAP TypedWhichId(XATTR_FILL_LAST + 13) - -#define ITEMID_ESCAPEMENT TypedWhichId(XATTR_FILL_LAST + 14) -#define ITEMID_FONTLIST XATTR_FILL_LAST + 15 -#define ITEMID_AUTOKERN TypedWhichId(XATTR_FILL_LAST + 16) -#define ITEMID_COLOR_TABLE TypedWhichId(XATTR_FILL_LAST + 17) -#define ITEMID_BLINK TypedWhichId(XATTR_FILL_LAST + 18) -#define ITEMID_EMPHASISMARK TypedWhichId(XATTR_FILL_LAST + 19) -#define ITEMID_TWOLINES TypedWhichId(XATTR_FILL_LAST + 20) -#define ITEMID_CHARROTATE TypedWhichId(XATTR_FILL_LAST + 21) -#define ITEMID_CHARSCALE_W TypedWhichId(XATTR_FILL_LAST + 22) -#define ITEMID_CHARRELIEF TypedWhichId(XATTR_FILL_LAST + 23) -#define ITEMID_CHARHIDDEN TypedWhichId(XATTR_FILL_LAST + 24) -#define ITEMID_BRUSH TypedWhichId(XATTR_FILL_LAST + 25) -#define ITEMID_HORJUSTIFY TypedWhichId(XATTR_FILL_LAST + 26) -#define ITEMID_VERJUSTIFY TypedWhichId(XATTR_FILL_LAST + 27) -#define ITEMID_FONT_ASIAN TypedWhichId(XATTR_FILL_LAST + 28) -#define ITEMID_FONTHEIGHT_ASIAN TypedWhichId(XATTR_FILL_LAST + 29) -#define ITEMID_LANGUAGE_ASIAN TypedWhichId(XATTR_FILL_LAST + 30) -#define ITEMID_POSTURE_ASIAN TypedWhichId(XATTR_FILL_LAST + 31) -#define ITEMID_WEIGHT_ASIAN TypedWhichId(XATTR_FILL_LAST + 32) -#define ITEMID_FONT_COMPLEX TypedWhichId(XATTR_FILL_LAST + 33) -#define ITEMID_FONTHEIGHT_COMPLEX TypedWhichId(XATTR_FILL_LAST + 34) -#define ITEMID_LANGUAGE_COMPLEX TypedWhichId(XATTR_FILL_LAST + 35) -#define ITEMID_POSTURE_COMPLEX TypedWhichId(XATTR_FILL_LAST + 36) -#define ITEMID_WEIGHT_COMPLEX TypedWhichId(XATTR_FILL_LAST + 37) +/// Note that we deliberately overlap an existing item id, so that we can have contiguous item ids for +/// the static defaults. +#define ITEMID_FIRSTXATTR_FILL_LAST + +#define ITEMID_FONT TypedWhichId(ITEMID_FIRST) +#define ITEMID_FONTHEIGHT TypedWhichId(ITEMID_FIRST + 1) +#define ITEMID_LANGUAGE TypedWhichId(ITEMID_FIRST + 2) + +#define ITEMID_POSTURE TypedWhichId(ITEMID_FIRST + 3) +#define ITEMID_WEIGHT TypedWhichId(ITEMID_FIRST + 4) +#define ITEMID_SHADOWED TypedWhichId(ITEMID_FIRST + 5) +#define ITEMID_WORDLINEMODE TypedWhichId(ITEMID_FIRST + 6) +#define ITE