diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py index 8746c479fbbe..cfd8a9e1bec1 100644 --- a/sw/qa/python/check_styles.py +++ b/sw/qa/python/check_styles.py @@ -27,6 +27,16 @@ class CheckStyle(unittest.TestCase): def tearDownClass(cls): cls._uno.tearDown() + def test_TextRangeProperties(self): + xDoc = CheckStyle._uno.openEmptyWriterDoc() + xBodyText = xDoc.getText() + xCursor = xBodyText.createTextCursor() + xBodyText.insertString(xCursor, "Hello world", 0) + xTextRange = list(xBodyText)[0] + pnames = [p.Name for p in xTextRange.PropertySetInfo.Properties] + xTextRange.getPropertyValues(pnames) + xDoc.dispose() + def test_StyleFamilies(self): xDoc = CheckStyle._uno.openEmptyWriterDoc() xStyleFamilies = xDoc.StyleFamilies diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx index 08d9d1e49943..1cc12a5cb170 100644 --- a/sw/source/core/unocore/unomap1.cxx +++ b/sw/source/core/unocore/unomap1.cxx @@ -200,7 +200,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetAutoParaStyleProper { OUString(UNO_NAME_CELL), FN_UNO_CELL, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 }, { OUString(UNO_NAME_TEXT_FRAME), FN_UNO_TEXT_FRAME, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 }, { OUString(UNO_NAME_TEXT_SECTION), FN_UNO_TEXT_SECTION, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 }, - { OUString(UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL), FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL,cppu::UnoType::get(), PROPERTY_NONE, 0}, + { OUString(UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL), FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL,cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0}, { OUString(UNO_NAME_PARA_CONDITIONAL_STYLE_NAME), RES_FRMATR_CONDITIONAL_STYLE_NAME, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0}, { OUString(UNO_NAME_PARA_IS_NUMBERING_RESTART), FN_NUMBER_NEWSTART, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0 }, // TODO add RES_PARATR_LIST_AUTOFMT? diff --git a/sw/source/core/unocore/unomapproperties.hxx b/sw/source/core/unocore/unomapproperties.hxx index aafe8263afbf..c3a7c0c22fb0 100644 --- a/sw/source/core/unocore/unomapproperties.hxx +++ b/sw/source/core/unocore/unomapproperties.hxx @@ -89,7 +89,7 @@ { OUString(UNO_NAME_TEXT_FRAME), FN_UNO_TEXT_FRAME, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 }, \ { OUString(UNO_NAME_TEXT_SECTION), FN_UNO_TEXT_SECTION, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 }, \ { OUString(UNO_NAME_TEXT_PARAGRAPH), FN_UNO_TEXT_PARAGRAPH, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 }, \ - { OUString(UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL), FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL,cppu::UnoType::get(), PROPERTY_NONE, 0}, \ + { OUString(UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL), FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL,cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0}, \ { OUString(UNO_NAME_PARA_CONDITIONAL_STYLE_NAME), FN_UNO_PARA_CONDITIONAL_STYLE_NAME, cppu::UnoType::get(), PropertyAttribute::READONLY, 0}, \ { OUString(UNO_NAME_LIST_ID), FN_UNO_LIST_ID, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0}, \ { OUString(UNO_NAME_PARA_IS_NUMBERING_RESTART), FN_NUMBER_NEWSTART, cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0 }, \