summaryrefslogtreecommitdiff
path: root/editeng/qa
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-28 14:41:12 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-28 14:48:11 -0400
commit6a4dd39379a8521a3c870d46b9702e0597a3333f (patch)
treef9df11fee5cc108ef70391eaf000af02b1bdf73c /editeng/qa
parent53bb6c9871482e6d1cac133d79eb9c58f8109fc8 (diff)
Rename SectionAttribute to Section.
It fits better this way. Change-Id: I139de7858e999a6dd26633a548c47634dfad8a65
Diffstat (limited to 'editeng/qa')
-rw-r--r--editeng/qa/unit/core-test.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index ebe7b54aef11..b1c100c48380 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -23,7 +23,7 @@
#include "editeng/unofield.hxx"
#include "editeng/wghtitem.hxx"
#include "editeng/postitem.hxx"
-#include "editeng/sectionattribute.hxx"
+#include "editeng/section.hxx"
#include "editeng/editobj.hxx"
#include <com/sun/star/text/textfield/Type.hpp>
@@ -342,7 +342,7 @@ void Test::testAutocorrect()
}
}
-bool hasBold(const editeng::SectionAttribute& rSecAttr)
+bool hasBold(const editeng::Section& rSecAttr)
{
std::vector<const SfxPoolItem*>::const_iterator it = rSecAttr.maAttributes.begin(), itEnd = rSecAttr.maAttributes.end();
for (; it != itEnd; ++it)
@@ -359,7 +359,7 @@ bool hasBold(const editeng::SectionAttribute& rSecAttr)
return false;
}
-bool hasItalic(const editeng::SectionAttribute& rSecAttr)
+bool hasItalic(const editeng::Section& rSecAttr)
{
std::vector<const SfxPoolItem*>::const_iterator it = rSecAttr.maAttributes.begin(), itEnd = rSecAttr.maAttributes.end();
for (; it != itEnd; ++it)
@@ -397,14 +397,14 @@ void Test::testSectionAttributes()
aEngine.QuickSetAttribs(*pSet, ESelection(0,3,0,9)); // 'bbbccc'
boost::scoped_ptr<EditTextObject> pEditText(aEngine.CreateTextObject());
CPPUNIT_ASSERT_MESSAGE("Failed to create text object.", pEditText.get());
- std::vector<editeng::SectionAttribute> aAttrs;
- pEditText->GetAllSectionAttributes(aAttrs);
+ std::vector<editeng::Section> aAttrs;
+ pEditText->GetAllSections(aAttrs);
// Now, we should have a total of 3 sections.
CPPUNIT_ASSERT_MESSAGE("There should be 3 sections.", aAttrs.size() == 3);
// First section should be 0-3 of paragraph 0, and it should only have boldness applied.
- const editeng::SectionAttribute* pSecAttr = &aAttrs[0];
+ const editeng::Section* pSecAttr = &aAttrs[0];
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pSecAttr->mnParagraph);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pSecAttr->mnStart);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pSecAttr->mnEnd);
@@ -447,13 +447,13 @@ void Test::testSectionAttributes()
boost::scoped_ptr<EditTextObject> pEditText(aEngine.CreateTextObject());
CPPUNIT_ASSERT_MESSAGE("Failed to create text object.", pEditText.get());
- std::vector<editeng::SectionAttribute> aAttrs;
- pEditText->GetAllSectionAttributes(aAttrs);
+ std::vector<editeng::Section> aAttrs;
+ pEditText->GetAllSections(aAttrs);
size_t nSecCountCheck = 5;
CPPUNIT_ASSERT_EQUAL(nSecCountCheck, aAttrs.size());
// 1st, 3rd and 5th sections should correspond with 1st, 3rd and 5th paragraphs.
- const editeng::SectionAttribute* pSecAttr = &aAttrs[0];
+ const editeng::Section* pSecAttr = &aAttrs[0];
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pSecAttr->mnParagraph);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pSecAttr->mnStart);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pSecAttr->mnEnd);