summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAnshu <anshukhare50@gmail.com>2021-03-07 23:39:32 +0530
committerMike Kaganski <mike.kaganski@collabora.com>2021-03-29 14:08:10 +0200
commita56aa46fcc62227df7dc9a8fa04205e8ff5ed2a1 (patch)
tree04fdc8d9ae2afb74b52109dbafba560dd951ed9b /sw
parente2581a9a20112af171ec22ad23d52671f8f94c94 (diff)
tdf#101965 : Add No List default in Styles deck in sidebar
Change-Id: I167b379f31809bc252d3c091d0f545f8c2a3f13e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112143 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/poolfmt.hxx3
-rw-r--r--sw/inc/strings.hrc1
-rw-r--r--sw/qa/python/check_styles.py2
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx1
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx1
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx3
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx1
-rw-r--r--sw/source/uibase/app/docst.cxx5
-rw-r--r--sw/uiconfig/swriter/ui/numparapage.ui2
9 files changed, 15 insertions, 4 deletions
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
index 56f787d5e46a..358747e37808 100644
--- a/sw/inc/poolfmt.hxx
+++ b/sw/inc/poolfmt.hxx
@@ -185,7 +185,8 @@ RES_POOLPAGE_END
enum RES_POOL_NUMRULE_TYPE
{
RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE,
-RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN, ///< NumRule Numbering 123.
+RES_POOLNUMRULE_NOLIST = RES_POOLNUMRULE_BEGIN,
+RES_POOLNUMRULE_NUM1, ///< NumRule Numbering 123.
RES_POOLNUMRULE_NUM2, ///< NumRule Numbering ABC.
RES_POOLNUMRULE_NUM3, ///< NumRule Numbering abc.
RES_POOLNUMRULE_NUM4, ///< NumRule Numbering IVX.
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index e234e3162949..f9914efa4742 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -211,6 +211,7 @@
#define STR_POOLPAGE_ENDNOTE NC_("STR_POOLPAGE_ENDNOTE", "Endnote")
#define STR_POOLPAGE_LANDSCAPE NC_("STR_POOLPAGE_LANDSCAPE", "Landscape")
// Numbering rules
+#define STR_POOLNUMRULE_NOLIST NC_("STR_POOLNUMRULE_NOLIST", "No List")
#define STR_POOLNUMRULE_NUM1 NC_("STR_POOLNUMRULE_NUM1", "Numbering 123")
#define STR_POOLNUMRULE_NUM2 NC_("STR_POOLNUMRULE_NUM2", "Numbering ABC")
#define STR_POOLNUMRULE_NUM3 NC_("STR_POOLNUMRULE_NUM3", "Numbering abc")
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index c2ae21cf9899..48a46a770988 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -159,7 +159,7 @@ class CheckStyle(unittest.TestCase):
def test_NumberingFamily(self):
xDoc = CheckStyle._uno.openEmptyWriterDoc()
xNumberingStyles = xDoc.StyleFamilies["NumberingStyles"]
- vEmptyDocStyles = ['List 1', 'List 2', 'List 3', 'List 4', 'List 5', 'Numbering 123', 'Numbering ABC', 'Numbering abc', 'Numbering IVX', 'Numbering ivx']
+ vEmptyDocStyles = ['No List','List 1', 'List 2', 'List 3', 'List 4', 'List 5', 'Numbering 123', 'Numbering ABC', 'Numbering abc', 'Numbering IVX', 'Numbering ivx']
self.__test_StyleFamily(xNumberingStyles, vEmptyDocStyles, "SwXStyle")
self.__test_StyleFamilyIndex(xNumberingStyles, vEmptyDocStyles, "SwXStyle")
self.__test_StyleFamilyInsert(xDoc, xNumberingStyles, vEmptyDocStyles, "com.sun.star.style.NumberingStyle", "com.sun.star.style.CharacterStyle")
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index b2f2b09e1b54..7fa92a05befe 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -516,6 +516,7 @@ static const char* STR_POOLPAGE_ARY[] =
static const char* STR_POOLNUMRULE_NUM_ARY[] =
{
// Numbering styles
+ STR_POOLNUMRULE_NOLIST,
STR_POOLNUMRULE_NUM1,
STR_POOLNUMRULE_NUM2,
STR_POOLNUMRULE_NUM3,
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index b7753c33773a..7635a9771e8c 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -709,6 +709,7 @@ const std::vector<OUString>& SwStyleNameMapper::GetPageDescProgNameArray()
const std::vector<OUString>& SwStyleNameMapper::GetNumRuleProgNameArray()
{
static const std::vector<OUString> s_aNumRuleProgNameArray = {
+ "No List",
"Numbering 123", // STR_POOLNUMRULE_PRGM_NUM1
"Numbering ABC",
"Numbering abc",
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index e64932300c3b..336669241daa 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -215,7 +215,8 @@ void SwParaDlg::PageCreated(const OString& rId, SfxTabPage& rPage)
aNames.insert(pBase->GetName());
pBase = pPool->Next();
}
- for(const auto& rName : aNames)
+ aNames.erase("No List");
+ for (const auto& rName : aNames)
rBox.append_text(rName);
}
// inits for Area and Transparency TabPages
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index ff6dd3e6bb45..7c6ac6406fe3 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -460,6 +460,7 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage
aNames.insert(pBase->GetName());
pBase = pPool->Next();
}
+ aNames.erase("No List");
for(std::set<OUString>::const_iterator it = aNames.begin(); it != aNames.end(); ++it)
rBox.append_text(*it);
}
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 99939d0b5155..ac044a5589a0 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -1159,6 +1159,11 @@ SfxStyleFamily SwDocShell::ApplyStyles(const OUString &rName, SfxStyleFamily nFa
// reset indent attribute on applying list style
// continue list of list style
const SwNumRule* pNumRule = pStyle->GetNumRule();
+ if (pNumRule->GetName() == "No List")
+ {
+ SfxViewFrame::Current()->GetDispatcher()->Execute(FN_NUM_BULLET_OFF);
+ break;
+ }
const OUString sListIdForStyle =pNumRule->GetDefaultListId();
pSh->SetCurNumRule( *pNumRule, false, sListIdForStyle, true );
break;
diff --git a/sw/uiconfig/swriter/ui/numparapage.ui b/sw/uiconfig/swriter/ui/numparapage.ui
index ff1c1a817062..cb8f931c21da 100644
--- a/sw/uiconfig/swriter/ui/numparapage.ui
+++ b/sw/uiconfig/swriter/ui/numparapage.ui
@@ -144,7 +144,7 @@
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes" context="numparapage|comboLB_NUMBER_STYLE">Assigned List Style</property>
<items>
- <item translatable="yes" context="numparapage|comboLB_NUMBER_STYLE">None</item>
+ <item translatable="yes" context="numparapage|comboLB_NUMBER_STYLE">No List</item>
</items>
<child internal-child="accessible">
<object class="AtkObject" id="comboLB_NUMBER_STYLE-atkobject">