tdf#154933 Rename "Text Body" para style to "Body Text"
- Change only the UI name, leaving the programmatic name which used by ODF and UNO API unchanged. - DOCX shouldn't be affected either, as that style is mapped to Word's "Text Body". - RTF export used to use the UI name (at least in 7.5). Which means that files created in older LO will show 2 styles for old and new names (same would happen also with files created with a different UI language). It seems to be no longer the case in current master. Change-Id: I8a4866d5db5f964a5d45071fb09a99ed4996fae4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151653 Tested-by: Maxim Monastirsky <momonasmon@gmail.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
This commit is contained in:
parent
1e885b09f9
commit
c83d241eff
9 changed files with 15 additions and 15 deletions
|
@ -73,10 +73,10 @@
|
|||
#define STR_POOLFRM_LABEL NC_("STR_POOLFRM_LABEL", "Labels")
|
||||
// Template names
|
||||
#define STR_POOLCOLL_STANDARD NC_("STR_POOLCOLL_STANDARD", "Default Paragraph Style")
|
||||
#define STR_POOLCOLL_TEXT NC_("STR_POOLCOLL_TEXT", "Text Body")
|
||||
#define STR_POOLCOLL_TEXT NC_("STR_POOLCOLL_TEXT", "Body Text")
|
||||
#define STR_POOLCOLL_TEXT_IDENT NC_("STR_POOLCOLL_TEXT_IDENT", "First Line Indent")
|
||||
#define STR_POOLCOLL_TEXT_NEGIDENT NC_("STR_POOLCOLL_TEXT_NEGIDENT", "Hanging Indent")
|
||||
#define STR_POOLCOLL_TEXT_MOVE NC_("STR_POOLCOLL_TEXT_MOVE", "Text Body Indent")
|
||||
#define STR_POOLCOLL_TEXT_MOVE NC_("STR_POOLCOLL_TEXT_MOVE", "Body Text, Indented")
|
||||
#define STR_POOLCOLL_GREETING NC_("STR_POOLCOLL_GREETING", "Complimentary Close")
|
||||
#define STR_POOLCOLL_SIGNATURE NC_("STR_POOLCOLL_SIGNATURE", "Signature")
|
||||
#define STR_POOLCOLL_HEADLINE_BASE NC_("STR_POOLCOLL_HEADLINE_BASE", "Heading")
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always"/>
|
||||
<style:text-properties style:font-name="Liberation Sans" fo:font-size="14pt" style:font-name-asian="DejaVu Sans Mono" style:font-size-asian="14pt" style:font-name-complex="DejaVu Sans" style:font-size-complex="14pt"/>
|
||||
</style:style>
|
||||
<style:style style:name="Text Body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
|
||||
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm"/>
|
||||
<style:map style:condition="table-header()" style:apply-style-name="Addressee"/>
|
||||
<style:map style:condition="table()" style:apply-style-name="Bibliography_20_1"/>
|
||||
|
|
|
@ -1271,7 +1271,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103091)
|
|||
// check that all conditional paragraph style conditions are imported
|
||||
uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
|
||||
uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(
|
||||
"Text Body"), uno::UNO_QUERY);
|
||||
"Text body"), uno::UNO_QUERY);
|
||||
auto conditions(getProperty<uno::Sequence<beans::NamedValue>>(xStyle1, "ParaStyleConditions"));
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(28), conditions.getLength());
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{\s4\fi0\li0\ri0\sb0\sa0\sl200\slmult0\cf0\f3\fs36\b0\ulnone\strike0\i0\outl0\shad0\kerning1\f4\f2\fs36\fs36\b0\b0\i0\i0\accnone\olnone\sbasedon1\snext4 Object without fill;}
|
||||
{\s5\fi0\li0\ri0\sb0\sa0\sl200\slmult0\cf0\f3\fs36\b0\ulnone\strike0\i0\outl0\shad0\kerning1\f4\f2\fs36\fs36\b0\b0\i0\i0\accnone\olnone\sbasedon1\snext5 Object with no fill and no line;}
|
||||
{\s6\fi0\li0\ri0\sb0\sa0\sl200\slmult0\cf0\f3\fs36\b0\ulnone\strike0\i0\outl0\shad0\kerning1\f4\f2\fs36\fs36\b0\b0\i0\i0\accnone\olnone\sbasedon1\snext6 Text;}
|
||||
{\s7\fi0\li0\ri0\sb0\sa0\sl200\slmult0\cf0\f3\fs132\b0\ulnone\strike0\i0\outl0\shad0\kerning1\f4\f2\fs136\fs136\b0\b0\i0\i0\accnone\olnone\sbasedon1\snext7 Text Body;}
|
||||
{\s7\fi0\li0\ri0\sb0\sa0\sl200\slmult0\cf0\f3\fs132\b0\ulnone\strike0\i0\outl0\shad0\kerning1\f4\f2\fs136\fs136\b0\b0\i0\i0\accnone\olnone\sbasedon1\snext7 Body Text;}
|
||||
{\s8\fi0\li0\ri0\sb0\sa0\sl200\slmult0\ql\cf0\f3\fs36\b0\ulnone\strike0\i0\outl0\shad0\kerning1\f4\f2\fs36\fs36\b0\b0\i0\i0\accnone\olnone\sbasedon1\snext8 Text body justified;}}
|
||||
{\*\EditEnginePoolDefaults\ltrpar\fi0\li0\ri0\fi0\li0\ri0\sb0\sa0\sl0\slmult0\ql\cf0\f0\fs48\b0\ulnone\strike0\i0\outl0\shad0\kerning0\expndtw0\f1\f2\fs48\fs48\b0\b0\i0\i0\accnone\olnone}
|
||||
\deftab709
|
||||
|
|
|
@ -625,7 +625,7 @@ DECLARE_RTFEXPORT_TEST(testFdo69384, "fdo69384-paste.rtf")
|
|||
getStyles("ParagraphStyles")->getByName("Text body justified");
|
||||
// Ensure default styles were modified, vs testFdo69384Inserted where it is not
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(
|
||||
getStyles("ParagraphStyles")->getByName("Text Body"), uno::UNO_QUERY);
|
||||
getStyles("ParagraphStyles")->getByName("Text body"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(68.f, getProperty<float>(xPropertySet, "CharHeight"));
|
||||
}
|
||||
|
||||
|
@ -640,7 +640,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo69384Inserted)
|
|||
// During insert of the RTF document we do not change pre-existing styles
|
||||
// vs testFdo69384 where it is
|
||||
uno::Reference<beans::XPropertySet> xPropertySet(
|
||||
getStyles("ParagraphStyles")->getByName("Text Body"), uno::UNO_QUERY);
|
||||
getStyles("ParagraphStyles")->getByName("Text body"), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(12.f, getProperty<float>(xPropertySet, "CharHeight"));
|
||||
}
|
||||
|
||||
|
|
|
@ -3604,7 +3604,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testCondCollCopy)
|
|||
// Given a document with a custom Text Body cond style:
|
||||
SwXTextDocument* pXTextDocument = createDoc("cond-coll-copy.odt");
|
||||
uno::Sequence<beans::PropertyValue> aPropertyValues
|
||||
= { comphelper::makePropertyValue("Style", OUString("Text Body")),
|
||||
= { comphelper::makePropertyValue("Style", OUString("Text body")),
|
||||
comphelper::makePropertyValue("FamilyName", OUString("ParagraphStyles")) };
|
||||
dispatchCommand(mxComponent, ".uno:StyleApply", aPropertyValues);
|
||||
SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
|
||||
|
|
|
@ -154,7 +154,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
|
|||
SwDoc* pDoc = getSwDoc();
|
||||
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
|
||||
//Getting some paragraph style
|
||||
SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName(u"Text Body");
|
||||
SwTextFormatColl* pTextFormat = pDoc->FindTextFormatCollByName(u"Body Text");
|
||||
const SwAttrSet& rAttrSet = pTextFormat->GetAttrSet();
|
||||
std::unique_ptr<SfxItemSet> pNewSet = rAttrSet.Clone();
|
||||
sal_uInt16 initialCount = pNewSet->Count();
|
||||
|
@ -175,7 +175,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
|
|||
//Setting the updated item set on the style
|
||||
pDoc->ChgFormat(*pTextFormat, *pNewSet);
|
||||
//Checking the Changes
|
||||
SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName(u"Text Body");
|
||||
SwTextFormatColl* pTextFormat2 = pDoc->FindTextFormatCollByName(u"Body Text");
|
||||
const SwAttrSet& rAttrSet2 = pTextFormat2->GetAttrSet();
|
||||
const SvxAdjustItem& rAdjustItem2 = rAttrSet2.GetAdjust();
|
||||
SvxAdjust Adjust2 = rAdjustItem2.GetAdjust();
|
||||
|
@ -183,7 +183,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
|
|||
CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust2);
|
||||
//Undo the changes
|
||||
rUndoManager.Undo();
|
||||
SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName(u"Text Body");
|
||||
SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName(u"Body Text");
|
||||
const SwAttrSet& rAttrSet3 = pTextFormat3->GetAttrSet();
|
||||
const SvxAdjustItem& rAdjustItem3 = rAttrSet3.GetAdjust();
|
||||
SvxAdjust Adjust3 = rAdjustItem3.GetAdjust();
|
||||
|
@ -191,7 +191,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
|
|||
CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust3);
|
||||
//Redo the changes
|
||||
rUndoManager.Redo();
|
||||
SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName(u"Text Body");
|
||||
SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName(u"Body Text");
|
||||
const SwAttrSet& rAttrSet4 = pTextFormat4->GetAttrSet();
|
||||
const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust();
|
||||
SvxAdjust Adjust4 = rAdjustItem4.GetAdjust();
|
||||
|
@ -199,7 +199,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf79236)
|
|||
CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust4);
|
||||
//Undo the changes
|
||||
rUndoManager.Undo();
|
||||
SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName(u"Text Body");
|
||||
SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName(u"Body Text");
|
||||
const SwAttrSet& rAttrSet5 = pTextFormat5->GetAttrSet();
|
||||
const SvxAdjustItem& rAdjustItem5 = rAttrSet5.GetAdjust();
|
||||
SvxAdjust Adjust5 = rAdjustItem5.GetAdjust();
|
||||
|
|
|
@ -110,7 +110,7 @@ class styleNavigator(UITestCase):
|
|||
self.assertEqual(3, len(xParStyle.getChildren()))
|
||||
self.assertEqual("Default Paragraph Style\t", get_state_as_dict(xParStyle.getChild('0'))['Text'])
|
||||
self.assertEqual(140, len(xParStyle.getChild('0').getChildren()))
|
||||
self.assertEqual("Text Body\t", get_state_as_dict(xParStyle.getChild('1'))['Text'])
|
||||
self.assertEqual("Body Text\t", get_state_as_dict(xParStyle.getChild('1'))['Text'])
|
||||
self.assertEqual(6, len(xParStyle.getChild('1').getChildren()))
|
||||
|
||||
xCustomStyle = xParStyle.getChild('2')
|
||||
|
|
|
@ -110,7 +110,7 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString const & aName)
|
|||
}
|
||||
{
|
||||
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
|
||||
renderPreview(pStyleManager, *pVirtualDev, u"Text Body", nTextBodyHeight, aRenderRect);
|
||||
renderPreview(pStyleManager, *pVirtualDev, u"Body Text", nTextBodyHeight, aRenderRect);
|
||||
}
|
||||
|
||||
return pVirtualDev->GetBitmapEx(Point(), aSize);
|
||||
|
|
Loading…
Reference in a new issue