[Libreoffice-commits] core.git: 2 commits - sw/qa sw/source
Michael Stahl
mstahl at redhat.com
Wed Oct 5 21:56:33 UTC 2016
sw/qa/extras/odfimport/data/tdf103025.odt |binary
sw/qa/extras/odfimport/odfimport.cxx | 9 +++++++++
sw/source/core/doc/docbm.cxx | 3 ---
sw/source/core/layout/pagechg.cxx | 16 ----------------
4 files changed, 9 insertions(+), 19 deletions(-)
New commits:
commit f933da55797566cf725e35ab0df17e91c7d5598f
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Oct 5 23:09:25 2016 +0200
tdf#103025 sw: don't format header/footer in SwPageFrame::PreparePage()
This has always been dead code because it used wrong constants
FRMTYPE_HEADER|FRMTYPE_FOOTER which is actually Page|Column and
SwPageFrame and SwColumnFrame are not direct children of SwPageFrame.
Then commit 901e5c3a21a1299d10c44bc844246fe8c329bb82 fixed the
constants but somehow the early formatting of header/footer results
in wrong expansion of variable text fields, so just remove this code.
Change-Id: I0af13168970f26355a1b247e071235166d08b7a4
diff --git a/sw/qa/extras/odfimport/data/tdf103025.odt b/sw/qa/extras/odfimport/data/tdf103025.odt
new file mode 100644
index 0000000..bd1e573
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf103025.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index ceb5572..e8bc1cf 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -631,6 +631,15 @@ DECLARE_ODFIMPORT_TEST(testBnc800714, "bnc800714.fodt")
CPPUNIT_ASSERT(getProperty<bool>(getParagraph(2), "ParaKeepTogether"));
}
+DECLARE_ODFIMPORT_TEST(testTdf103025, "tdf103025.odt")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-01"), parseDump("/root/page[1]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-01"), parseDump("/root/page[2]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-02"), parseDump("/root/page[3]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-03"), parseDump("/root/page[4]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+ CPPUNIT_ASSERT_EQUAL(OUString("2014-03"), parseDump("/root/page[5]/header/tab[2]/row[2]/cell[3]/txt/Special", "rText"));
+}
+
DECLARE_ODFIMPORT_TEST(testTdf76322_columnBreakInHeader, "tdf76322_columnBreakInHeader.docx")
{
// column breaks were ignored. First line should start in column 2
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 50d910b..720a541 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -467,22 +467,6 @@ void SwPageFrame::PreparePage( bool bFootnote )
if ( GetPrev() && static_cast<SwPageFrame*>(GetPrev())->IsEmptyPage() )
lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), static_cast<SwPageFrame*>(GetPrev()) );
lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), this );
-
- // format footer/ header
- SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(Lower());
- while ( pLow )
- {
- if ( pLow->GetType() & (SwFrameType::Header|SwFrameType::Footer) )
- {
- SwContentFrame *pContent = pLow->ContainsContent();
- while ( pContent && pLow->IsAnLower( pContent ) )
- {
- pContent->OptCalc(); // not the predecessors
- pContent = pContent->GetNextContentFrame();
- }
- }
- pLow = static_cast<SwLayoutFrame*>(pLow->GetNext());
- }
}
}
commit 4e48432decd5c04c61bced9db71e866b54370ac3
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Oct 5 12:32:49 2016 +0200
sw: remove correctMarksAbsolute pre-condition check for now...
... in case the post-condition check fails it can be added for debugging.
Change-Id: Id3ee0895af598080a8bda10e8e9edff883188cbc
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 25f6b80..854ad5e 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -569,9 +569,6 @@ namespace sw { namespace mark
const SwPosition& rNewPos,
const sal_Int32 nOffset)
{
- SAL_INFO("sw.core", "correctMarksAbsolute entry");
- lcl_DebugMarks(m_vAllMarks);
-
const SwNode* const pOldNode = &rOldNode.GetNode();
SwPosition aNewPos(rNewPos);
aNewPos.nContent += nOffset;
More information about the Libreoffice-commits
mailing list