diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2023-04-11 21:20:41 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2023-04-20 07:33:22 +0200 |
commit | b12ff94a771db17843f642a82820b2864bec4744 (patch) | |
tree | 0e168ce287301b499ab2fb9d7e5db8022ec13af1 /sw/qa | |
parent | 3ec73488e447a693a14a773a7fb96938036c0324 (diff) |
introduce sw::FrameFormats<>
- a drop-in replacement for SwFrameFormats
- ... but strongly typed sw::FrameFormats<SwTableFormat*> returns
SwTableFormats
- replace in SwDoc for GetTableFormats
- also: use tags to name indices, lose the references to them as members
- add an explicit Rename() member to allow both SwFrameFormats and
sw::FrameFormat<> to be updated if a format is rename. This should be
removed once all SwFrameFormats have been moved to sw::FrameFormats<>.
- Ultimately it seems like a few linear iterations of the table formats
can be replaced with an index-based accesss by name (in a follow-up).
Change-Id: I1c49d64621104c964c95c6da0c84e01ee7f97028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150243
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/layout3.cxx | 2 | ||||
-rw-r--r-- | sw/qa/filter/html/html.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index 824e51b4c710..64d9862ea990 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -1260,7 +1260,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf128959) "portion", "amet commodo magna eros quis urna."); // Also check that the widow control for the paragraph is not turned off: - SwFrameFormats& rTableFormats = *pDocument->GetTableFrameFormats(); + sw::TableFrameFormats& rTableFormats = *pDocument->GetTableFrameFormats(); SwFrameFormat* pTableFormat = rTableFormats[0]; SwTable* pTable = SwTable::FindTable(pTableFormat); const SwTableBox* pCell = pTable->GetTableBox("A1"); diff --git a/sw/qa/filter/html/html.cxx b/sw/qa/filter/html/html.cxx index 2b0c36508378..6cd714bbdd48 100644 --- a/sw/qa/filter/html/html.cxx +++ b/sw/qa/filter/html/html.cxx @@ -236,7 +236,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCenteredTableCSSImport) // Then make sure that the table is centered: SwDoc* pDoc = getSwDoc(); - const SwFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats(); + const sw::TableFrameFormats& rTableFormats = *pDoc->GetTableFrameFormats(); const SwFrameFormat* pTableFormat = rTableFormats[0]; sal_Int16 eHoriOrient = pTableFormat->GetHoriOrient().GetHoriOrient(); // Without the accompanying fix in place, this test would have failed with: |