tdf#166011 Implemented style:script-type
Implemented the ODF 1.0 style:script-type text property. This property can be used by documents to influence which script type-dependent attributes are used when rendering certain characters. This implementation uses the following semantics: - If unset, the behavior is as it was in previous versions. - If set to latin, asian, or complex, those characters not mapped by the ODF standard to a script type are treated as latin, asian, or complex, respectively. - If set to ignore, all characters will be treated as latin. This value is intended to be used for interoperability with file formats that don't implement script types (e.g. HTML). Change-Id: If81a1390ee455fd971dea655d161d9c3f44fd08a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186309 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
This commit is contained in:
@@ -307,6 +307,14 @@ public:
|
||||
virtual void SetFont(SvxFont& rFont, OutputDevice* pOutDev) override;
|
||||
};
|
||||
|
||||
class EditCharAttribScriptHint final : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
EditCharAttribScriptHint(SfxItemPool&, const SfxPoolItem&, sal_Int32 nStart, sal_Int32 nEnd);
|
||||
|
||||
virtual void SetFont(SvxFont& rFont, OutputDevice* pOutDev) override;
|
||||
};
|
||||
|
||||
class EditCharAttribTab final : public EditCharAttrib
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -255,6 +255,15 @@ EditCharAttribRuby::EditCharAttribRuby(SfxItemPool& rPool, const SfxPoolItem& rI
|
||||
|
||||
void EditCharAttribRuby::SetFont(SvxFont&, OutputDevice*) {}
|
||||
|
||||
EditCharAttribScriptHint::EditCharAttribScriptHint(SfxItemPool& rPool, const SfxPoolItem& rItem,
|
||||
sal_Int32 nStartIn, sal_Int32 nEndIn)
|
||||
: EditCharAttrib(rPool, rItem, nStartIn, nEndIn)
|
||||
{
|
||||
assert(rItem.Which() == EE_CHAR_SCRIPT_HINT);
|
||||
}
|
||||
|
||||
void EditCharAttribScriptHint::SetFont(SvxFont&, OutputDevice*) {}
|
||||
|
||||
EditCharAttribShadow::EditCharAttribShadow(SfxItemPool& rPool, const SfxPoolItem& rItem, sal_Int32 _nStart, sal_Int32 _nEnd)
|
||||
: EditCharAttrib(rPool, rItem, _nStart, _nEnd)
|
||||
{
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <editeng/charscaleitem.hxx>
|
||||
#include <editeng/charreliefitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
|
||||
#include "impedit.hxx"
|
||||
#include <editeng/editeng.hxx>
|
||||
@@ -183,6 +184,12 @@ struct DebOutBuffer
|
||||
str.append(OString::Concat(descr)
|
||||
+ OUStringToOString(rItem.GetText(), RTL_TEXTENCODING_UTF8));
|
||||
}
|
||||
void append(std::string_view descr, const SvxScriptHintItem& rItem)
|
||||
{
|
||||
str.append(OString::Concat(descr)
|
||||
+ OUStringToOString(SvxScriptHintItem::GetValueText(rItem.GetValue()),
|
||||
RTL_TEXTENCODING_ASCII_US));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -317,6 +324,9 @@ static OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
|
||||
case EE_CHAR_RUBY:
|
||||
buffer.append("Ruby=", rItem.StaticWhichCast(EE_CHAR_RUBY));
|
||||
break;
|
||||
case EE_CHAR_SCRIPT_HINT:
|
||||
buffer.append("ScriptHint=", rItem.StaticWhichCast(EE_CHAR_SCRIPT_HINT));
|
||||
break;
|
||||
}
|
||||
return buffer.str.makeStringAndClear();
|
||||
}
|
||||
|
||||
@@ -313,6 +313,11 @@ EditCharAttrib* MakeCharAttrib( SfxItemPool& rPool, const SfxPoolItem& rAttr, sa
|
||||
return new EditCharAttribRuby(rPool, rAttr, nS, nE);
|
||||
}
|
||||
break;
|
||||
case EE_CHAR_SCRIPT_HINT:
|
||||
{
|
||||
return new EditCharAttribScriptHint(rPool, rAttr, nS, nE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include <editeng/numitem.hxx>
|
||||
#include <editeng/langitem.hxx>
|
||||
#include <editeng/cmapitem.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
#include <editeng/charscaleitem.hxx>
|
||||
#include <editeng/charreliefitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
@@ -156,6 +157,7 @@ ItemInfoPackage& getItemInfoPackageEditEngine()
|
||||
{ EE_CHAR_GRABBAG, new SfxGrabBagItem( EE_CHAR_GRABBAG ), SID_ATTR_CHAR_GRABBAG, SFX_ITEMINFOFLAG_NONE },
|
||||
{ EE_CHAR_BKGCOLOR, new SvxColorItem( COL_AUTO, EE_CHAR_BKGCOLOR ), SID_ATTR_CHAR_BACK_COLOR, SFX_ITEMINFOFLAG_NONE },
|
||||
{ EE_CHAR_RUBY, new SvxRubyItem( EE_CHAR_RUBY ), SID_ATTR_CHAR_RUBY, SFX_ITEMINFOFLAG_NONE },
|
||||
{ EE_CHAR_SCRIPT_HINT, new SvxScriptHintItem( EE_CHAR_SCRIPT_HINT ), SID_ATTR_CHAR_SCRIPT_HINT, SFX_ITEMINFOFLAG_NONE },
|
||||
{ EE_FEATURE_TAB, new SfxVoidItem( EE_FEATURE_TAB ), 0, SFX_ITEMINFOFLAG_NONE },
|
||||
{ EE_FEATURE_LINEBR, new SfxVoidItem( EE_FEATURE_LINEBR ), 0, SFX_ITEMINFOFLAG_NONE },
|
||||
{ EE_FEATURE_NOTCONV, new SvxColorItem( COL_RED, EE_FEATURE_NOTCONV ), SID_ATTR_CHAR_CHARSETCOLOR, SFX_ITEMINFOFLAG_NONE },
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/justifyitem.hxx>
|
||||
#include <editeng/udlnitem.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
|
||||
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
|
||||
#include <com/sun/star/i18n/WordType.hpp>
|
||||
@@ -1744,10 +1745,26 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara )
|
||||
pField = pField->GetEnd() ? pNode->GetCharAttribs().FindNextAttrib( EE_FEATURE_FIELD, pField->GetEnd() ) : nullptr;
|
||||
}
|
||||
|
||||
i18nutil::ScriptHintProvider stScriptHints;
|
||||
const EditCharAttrib* pScriptHint
|
||||
= pNode->GetCharAttribs().FindNextAttrib(EE_CHAR_SCRIPT_HINT, 0);
|
||||
while (pScriptHint)
|
||||
{
|
||||
const auto* pScriptHintValue
|
||||
= static_cast<const SvxScriptHintItem*>(pScriptHint->GetItem());
|
||||
stScriptHints.AddHint(pScriptHintValue->GetValue(), pScriptHint->GetStart(),
|
||||
pScriptHint->GetEnd());
|
||||
|
||||
pScriptHint = pScriptHint->GetEnd() ? pNode->GetCharAttribs().FindNextAttrib(
|
||||
EE_CHAR_SCRIPT_HINT, pScriptHint->GetEnd())
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
const UBiDiLevel nInitialBidiLevel = IsRightToLeft(nPara) ? 1 /*RTL*/ : 0 /*LTR*/;
|
||||
auto pDirScanner = i18nutil::MakeDirectionChangeScanner(aText, nInitialBidiLevel);
|
||||
auto pScriptScanner = i18nutil::MakeScriptChangeScanner(
|
||||
aText, SvtLanguageOptions::GetI18NScriptTypeOfLanguage(GetDefaultLanguage()), *pDirScanner);
|
||||
aText, SvtLanguageOptions::GetI18NScriptTypeOfLanguage(GetDefaultLanguage()), *pDirScanner,
|
||||
stScriptHints);
|
||||
while (!pScriptScanner->AtEnd() || rTypes.empty())
|
||||
{
|
||||
auto stChange = pScriptScanner->Peek();
|
||||
|
||||
@@ -72,12 +72,13 @@
|
||||
#include <editeng/blinkitem.hxx>
|
||||
#include <editeng/emphasismarkitem.hxx>
|
||||
#include <editeng/twolinesitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/charrotateitem.hxx>
|
||||
#include <editeng/charscaleitem.hxx>
|
||||
#include <editeng/charreliefitem.hxx>
|
||||
#include <editeng/rubyitem.hxx>
|
||||
#include <editeng/itemtype.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
#include <editeng/eerdll.hxx>
|
||||
#include <docmodel/color/ComplexColorJSON.hxx>
|
||||
#include <docmodel/uno/UnoComplexColor.hxx>
|
||||
@@ -91,6 +92,7 @@ using namespace ::com::sun::star::text;
|
||||
SfxPoolItem* SvxFontItem::CreateDefault() {return new SvxFontItem(0);}
|
||||
SfxPoolItem* SvxPostureItem::CreateDefault() { return new SvxPostureItem(ITALIC_NONE, 0);}
|
||||
SfxPoolItem* SvxWeightItem::CreateDefault() {return new SvxWeightItem(WEIGHT_NORMAL, 0);}
|
||||
SfxPoolItem* SvxScriptHintItem::CreateDefault() {return new SvxScriptHintItem(0);}
|
||||
SfxPoolItem* SvxFontHeightItem::CreateDefault() {return new SvxFontHeightItem(240, 100, 0);}
|
||||
SfxPoolItem* SvxUnderlineItem::CreateDefault() {return new SvxUnderlineItem(LINESTYLE_NONE, 0);}
|
||||
SfxPoolItem* SvxOverlineItem::CreateDefault() {return new SvxOverlineItem(LINESTYLE_NONE, 0);}
|
||||
@@ -652,6 +654,90 @@ void SvxWeightItem::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
(void)xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
// class SvxScriptHintItem ---------------------------------------------------
|
||||
|
||||
ItemInstanceManager* SvxScriptHintItem::getItemInstanceManager() const
|
||||
{
|
||||
static DefaultItemInstanceManager aInstanceManager(ItemType());
|
||||
return &aInstanceManager;
|
||||
}
|
||||
|
||||
SvxScriptHintItem::SvxScriptHintItem(const sal_uInt16 nId)
|
||||
: SfxEnumItem(nId, i18nutil::ScriptHintType::Automatic)
|
||||
{
|
||||
}
|
||||
|
||||
sal_uInt16 SvxScriptHintItem::GetValueCount() const { return 5; }
|
||||
|
||||
SvxScriptHintItem* SvxScriptHintItem::Clone(SfxItemPool*) const
|
||||
{
|
||||
return new SvxScriptHintItem(*this);
|
||||
}
|
||||
|
||||
bool SvxScriptHintItem::GetPresentation(SfxItemPresentation /*ePres*/, MapUnit /*eCoreUnit*/,
|
||||
MapUnit /*ePresUnit*/, OUString& rText,
|
||||
const IntlWrapper& /*rIntl*/) const
|
||||
{
|
||||
rText = GetValueText(GetValue());
|
||||
return true;
|
||||
}
|
||||
|
||||
OUString SvxScriptHintItem::GetValueText(i18nutil::ScriptHintType eValue)
|
||||
{
|
||||
static const std::array<TranslateId, 5> RID_SVXITEMS_TYPES{
|
||||
{ RID_SVXITEMS_SCRIPTHINTVAL_AUTO, RID_SVXITEMS_SCRIPTHINTVAL_IGNORE,
|
||||
RID_SVXITEMS_SCRIPTHINTVAL_LATIN, RID_SVXITEMS_SCRIPTHINTVAL_ASIAN,
|
||||
RID_SVXITEMS_SCRIPTHINTVAL_COMPLEX }
|
||||
};
|
||||
|
||||
return EditResId(RID_SVXITEMS_TYPES.at(static_cast<size_t>(eValue)));
|
||||
}
|
||||
|
||||
bool SvxScriptHintItem::QueryValue(uno::Any& rVal, sal_uInt8 nMemberId) const
|
||||
{
|
||||
nMemberId &= ~CONVERT_TWIPS;
|
||||
switch (nMemberId)
|
||||
{
|
||||
case MID_SCRIPTHINT:
|
||||
rVal <<= static_cast<sal_uInt16>(GetValue());
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SvxScriptHintItem::PutValue(const uno::Any& rVal, sal_uInt8 nMemberId)
|
||||
{
|
||||
sal_uInt16 nValue = 0;
|
||||
|
||||
nMemberId &= ~CONVERT_TWIPS;
|
||||
switch (nMemberId)
|
||||
{
|
||||
case MID_SCRIPTHINT:
|
||||
if (!(rVal >>= nValue))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ASSERT_CHANGE_REFCOUNTED_ITEM;
|
||||
SetValue(i18nutil::ScriptHintType{ nValue });
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SvxScriptHintItem::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
{
|
||||
(void)xmlTextWriterStartElement(pWriter, BAD_CAST("SvxScriptHintItem"));
|
||||
(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("whichId"), "%d", Which());
|
||||
(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("value"), "%d",
|
||||
static_cast<int>(GetValue()));
|
||||
(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"),
|
||||
BAD_CAST(GetValueText(GetValue()).toUtf8().getStr()));
|
||||
(void)xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
// class SvxFontHeightItem -----------------------------------------------
|
||||
|
||||
ItemInstanceManager* SvxFontHeightItem::getItemInstanceManager() const
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
#include <editeng/editview.hxx>
|
||||
#include <editeng/eeitem.hxx>
|
||||
#include <editeng/fhgtitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/svxenum.hxx>
|
||||
#include <i18nlangtag/lang.h>
|
||||
#include <i18nlangtag/languagetag.hxx>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <editeng/editids.hrc>
|
||||
#include <editeng/editview.hxx>
|
||||
#include <editeng/editstat.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
|
||||
#include <svl/itempool.hxx>
|
||||
#include <svl/itemset.hxx>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <editeng/lspcitem.hxx>
|
||||
#include <editeng/fhgtitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
|
||||
|
||||
namespace frm
|
||||
|
||||
@@ -40,6 +40,17 @@ public:
|
||||
void testRtlRunEmbeddedLtrWeakComplex();
|
||||
void testRtlRunOverrideCJKAsian();
|
||||
void testTdf164493InfiniteLoop();
|
||||
void testHintsDefault();
|
||||
void testHintsParaOnly();
|
||||
void testHintsRunAtStart();
|
||||
void testHintsRunAfterSpace();
|
||||
void testHintsRunsAdjacent();
|
||||
void testHintsRunsSpaced();
|
||||
void testHintIgnore();
|
||||
void testHintLatin();
|
||||
void testHintAsian();
|
||||
void testHintComplex();
|
||||
void testHintMultipleRuns();
|
||||
|
||||
CPPUNIT_TEST_SUITE(ScriptChangeScannerTest);
|
||||
CPPUNIT_TEST(testEmpty);
|
||||
@@ -59,14 +70,27 @@ public:
|
||||
CPPUNIT_TEST(testRtlRunEmbeddedLtrWeakComplex);
|
||||
CPPUNIT_TEST(testRtlRunOverrideCJKAsian);
|
||||
CPPUNIT_TEST(testTdf164493InfiniteLoop);
|
||||
CPPUNIT_TEST(testHintsDefault);
|
||||
CPPUNIT_TEST(testHintsParaOnly);
|
||||
CPPUNIT_TEST(testHintsRunAtStart);
|
||||
CPPUNIT_TEST(testHintsRunAfterSpace);
|
||||
CPPUNIT_TEST(testHintsRunsAdjacent);
|
||||
CPPUNIT_TEST(testHintsRunsSpaced);
|
||||
CPPUNIT_TEST(testHintIgnore);
|
||||
CPPUNIT_TEST(testHintLatin);
|
||||
CPPUNIT_TEST(testHintAsian);
|
||||
CPPUNIT_TEST(testHintComplex);
|
||||
CPPUNIT_TEST(testHintMultipleRuns);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
};
|
||||
|
||||
void ScriptChangeScannerTest::testEmpty()
|
||||
{
|
||||
auto aText = u""_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
|
||||
@@ -76,8 +100,10 @@ void ScriptChangeScannerTest::testEmpty()
|
||||
void ScriptChangeScannerTest::testTrivial()
|
||||
{
|
||||
auto aText = u"Trivial case with a single span of a script"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -91,8 +117,10 @@ void ScriptChangeScannerTest::testTrivial()
|
||||
void ScriptChangeScannerTest::testTrivialAppLang()
|
||||
{
|
||||
auto aText = u"Trivial case with a single span of a script"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::ASIAN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::ASIAN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -107,8 +135,10 @@ void ScriptChangeScannerTest::testWeakAtStart()
|
||||
{
|
||||
// The first-seen script type is used for weak characters at the start
|
||||
auto aText = u"“x”"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::COMPLEX, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::COMPLEX, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -124,8 +154,10 @@ void ScriptChangeScannerTest::testOnlyWeak()
|
||||
{
|
||||
// The application language is used for text containing only weak characters
|
||||
auto aText = u"“”"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::COMPLEX, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::COMPLEX, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::COMPLEX, pScanner->Peek().m_nScriptType);
|
||||
@@ -140,8 +172,10 @@ void ScriptChangeScannerTest::testOnlyWeak()
|
||||
void ScriptChangeScannerTest::testStrongChange()
|
||||
{
|
||||
auto aText = u"wide 廣 vast"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -171,8 +205,10 @@ void ScriptChangeScannerTest::testMongolianAfterNNBSP()
|
||||
{
|
||||
// NNBSP before Mongolian text should be part of the Mongolian run
|
||||
auto aText = u"Before\u202f\u1822\u1822After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -203,8 +239,10 @@ void ScriptChangeScannerTest::testNonspacingMark()
|
||||
// A preceding weak character should be included in the run
|
||||
// of a following non-spacing mark
|
||||
auto aText = u"Before \u0944\u0911\u0911 After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -235,8 +273,10 @@ void ScriptChangeScannerTest::testSmartQuoteCompatibilityCJ()
|
||||
// tdf#166104: Weak-script quotes should take the previously-seen script type
|
||||
|
||||
auto aText = u"Before \u201c水\u201d After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -268,8 +308,10 @@ void ScriptChangeScannerTest::testSmartQuoteCompatibilityComplexAndCJ()
|
||||
// quotes are assigned in the usual greedy way.
|
||||
|
||||
auto aText = u"Before \u201c水\u201d After \u05d0"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -305,8 +347,10 @@ void ScriptChangeScannerTest::testSmartQuoteCompatibilityComplexAndCJ()
|
||||
void ScriptChangeScannerTest::testSmartQuoteCJAtStart()
|
||||
{
|
||||
auto aText = u"“廣”"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
@@ -321,6 +365,7 @@ void ScriptChangeScannerTest::testSmartQuoteCJAtStart()
|
||||
void ScriptChangeScannerTest::testRtlRunTrivial()
|
||||
{
|
||||
auto aText = u"Before אאאאאא after"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
|
||||
CPPUNIT_ASSERT(!pDirScanner->AtEnd());
|
||||
@@ -351,7 +396,8 @@ void ScriptChangeScannerTest::testRtlRunTrivial()
|
||||
|
||||
pDirScanner->Reset();
|
||||
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -380,6 +426,7 @@ void ScriptChangeScannerTest::testRtlRunTrivial()
|
||||
void ScriptChangeScannerTest::testRtlRunEmbeddedComplex()
|
||||
{
|
||||
auto aText = u"Before אא(א\"א)אא after"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
|
||||
CPPUNIT_ASSERT(!pDirScanner->AtEnd());
|
||||
@@ -410,7 +457,8 @@ void ScriptChangeScannerTest::testRtlRunEmbeddedComplex()
|
||||
|
||||
pDirScanner->Reset();
|
||||
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
@@ -439,6 +487,7 @@ void ScriptChangeScannerTest::testRtlRunEmbeddedComplex()
|
||||
void ScriptChangeScannerTest::testRtlRunEmbeddedLtrStrong()
|
||||
{
|
||||
auto aText = u"אאא Inside אאא"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 1);
|
||||
|
||||
CPPUNIT_ASSERT(!pDirScanner->AtEnd());
|
||||
@@ -469,7 +518,8 @@ void ScriptChangeScannerTest::testRtlRunEmbeddedLtrStrong()
|
||||
|
||||
pDirScanner->Reset();
|
||||
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::COMPLEX, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::COMPLEX, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::COMPLEX, pScanner->Peek().m_nScriptType);
|
||||
@@ -498,6 +548,7 @@ void ScriptChangeScannerTest::testRtlRunEmbeddedLtrStrong()
|
||||
void ScriptChangeScannerTest::testRtlRunEmbeddedLtrWeakComplex()
|
||||
{
|
||||
auto aText = u"אאא 123 אאא"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 1);
|
||||
|
||||
CPPUNIT_ASSERT(!pDirScanner->AtEnd());
|
||||
@@ -528,7 +579,8 @@ void ScriptChangeScannerTest::testRtlRunEmbeddedLtrWeakComplex()
|
||||
|
||||
pDirScanner->Reset();
|
||||
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::COMPLEX, pScanner->Peek().m_nScriptType);
|
||||
@@ -545,6 +597,7 @@ void ScriptChangeScannerTest::testRtlRunOverrideCJKAsian()
|
||||
// tdf#163660: Asian-script characters following an RTL override should
|
||||
// still be treated as Asian script, rather than Complex script
|
||||
auto aText = u"一二\u202e三四五"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
|
||||
CPPUNIT_ASSERT(!pDirScanner->AtEnd());
|
||||
@@ -567,7 +620,8 @@ void ScriptChangeScannerTest::testRtlRunOverrideCJKAsian()
|
||||
|
||||
pDirScanner->Reset();
|
||||
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
@@ -601,8 +655,10 @@ void ScriptChangeScannerTest::testTdf164493InfiniteLoop()
|
||||
// U+202E: RIGHT-TO-LEFT OVERRIDE
|
||||
// U+302E: HANGUL SINGLE DOT TONE MARK
|
||||
auto aText = u"\u202e\u302e"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner = MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
@@ -614,6 +670,340 @@ void ScriptChangeScannerTest::testTdf164493InfiniteLoop()
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintsDefault()
|
||||
{
|
||||
ScriptHintProvider stHints;
|
||||
|
||||
stHints.Start();
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Automatic, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(1);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Automatic, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(2);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Automatic, stHints.Peek());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintsParaOnly()
|
||||
{
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Ignore);
|
||||
|
||||
stHints.Start();
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(1);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(2);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintsRunAtStart()
|
||||
{
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Ignore);
|
||||
stHints.AddHint(ScriptHintType::Latin, 0, 3);
|
||||
|
||||
stHints.Start();
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(1);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(2);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(3);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(4);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintsRunAfterSpace()
|
||||
{
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Ignore);
|
||||
stHints.AddHint(ScriptHintType::Latin, 2, 5);
|
||||
|
||||
stHints.Start();
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(1);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(2);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(3);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(4);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(5);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(6);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintsRunsAdjacent()
|
||||
{
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Ignore);
|
||||
stHints.AddHint(ScriptHintType::Latin, 2, 5);
|
||||
stHints.AddHint(ScriptHintType::Complex, 5, 7);
|
||||
|
||||
stHints.Start();
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(1);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(2);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(3);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(4);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(5);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Complex, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(6);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Complex, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(7);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(8);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintsRunsSpaced()
|
||||
{
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Ignore);
|
||||
stHints.AddHint(ScriptHintType::Latin, 2, 5);
|
||||
stHints.AddHint(ScriptHintType::Complex, 7, 9);
|
||||
|
||||
stHints.Start();
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(1);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(2);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(3);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(4);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Latin, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(5);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(6);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(7);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Complex, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(8);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Complex, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(9);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
|
||||
stHints.AdvanceTo(10);
|
||||
CPPUNIT_ASSERT_EQUAL(ScriptHintType::Ignore, stHints.Peek());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintIgnore()
|
||||
{
|
||||
auto aText = u"Before \u201c水\u201d After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Ignore);
|
||||
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintLatin()
|
||||
{
|
||||
auto aText = u"水 \u201c水\u201d After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Latin);
|
||||
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintAsian()
|
||||
{
|
||||
auto aText = u"Before \u201c水\u201d After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Asian);
|
||||
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintComplex()
|
||||
{
|
||||
auto aText = u"Before \u201c水\u201d After"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
stHints.SetParagraphLevelHint(ScriptHintType::Complex);
|
||||
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::COMPLEX, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(9), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::COMPLEX, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(9), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
}
|
||||
|
||||
void ScriptChangeScannerTest::testHintMultipleRuns()
|
||||
{
|
||||
auto aText = u"““““““““““““““““"_ustr;
|
||||
ScriptHintProvider stHints;
|
||||
stHints.AddHint(ScriptHintType::Latin, 3, 5);
|
||||
stHints.AddHint(ScriptHintType::Complex, 7, 9);
|
||||
stHints.AddHint(ScriptHintType::Asian, 11, 13);
|
||||
|
||||
auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
|
||||
auto pScanner
|
||||
= MakeScriptChangeScanner(aText, css::i18n::ScriptType::LATIN, *pDirScanner, stHints);
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::LATIN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::COMPLEX, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(!pScanner->AtEnd());
|
||||
CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, pScanner->Peek().m_nScriptType);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), pScanner->Peek().m_nStartIndex);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), pScanner->Peek().m_nEndIndex);
|
||||
|
||||
pScanner->Advance();
|
||||
|
||||
CPPUNIT_ASSERT(pScanner->AtEnd());
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(ScriptChangeScannerTest);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,44 @@ namespace css = ::com::sun::star;
|
||||
|
||||
namespace i18nutil
|
||||
{
|
||||
void ScriptHintProvider::SetParagraphLevelHint(ScriptHintType eType) { m_eParaHint = eType; }
|
||||
|
||||
void ScriptHintProvider::AddHint(ScriptHintType eType, sal_Int32 nStartIndex, sal_Int32 nEndIndex)
|
||||
{
|
||||
m_aHints.emplace_back(eType, nStartIndex, nEndIndex);
|
||||
}
|
||||
|
||||
void ScriptHintProvider::Start()
|
||||
{
|
||||
m_pCurrIt = m_aHints.begin();
|
||||
m_nCurrIdx = 0;
|
||||
|
||||
m_eCurrHint = m_eParaHint;
|
||||
if (m_pCurrIt != m_aHints.end() && m_pCurrIt->m_nStartIndex == 0 && m_pCurrIt->m_nEndIndex > 0)
|
||||
{
|
||||
m_eCurrHint = m_pCurrIt->m_eType;
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptHintProvider::AdvanceTo(sal_Int32 nNextIdx)
|
||||
{
|
||||
m_nCurrIdx = nNextIdx;
|
||||
|
||||
while (m_pCurrIt != m_aHints.end() && m_nCurrIdx >= m_pCurrIt->m_nEndIndex)
|
||||
{
|
||||
++m_pCurrIt;
|
||||
}
|
||||
|
||||
m_eCurrHint = m_eParaHint;
|
||||
if (m_pCurrIt != m_aHints.end() && m_nCurrIdx >= m_pCurrIt->m_nStartIndex
|
||||
&& m_nCurrIdx < m_pCurrIt->m_nEndIndex)
|
||||
{
|
||||
m_eCurrHint = m_pCurrIt->m_eType;
|
||||
}
|
||||
}
|
||||
|
||||
i18nutil::ScriptHintType ScriptHintProvider::Peek() const { return m_eCurrHint; }
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr sal_uInt32 CHAR_NNBSP = 0x202f;
|
||||
@@ -131,6 +169,7 @@ class GreedyScriptChangeScanner : public ScriptChangeScanner
|
||||
private:
|
||||
ScriptChange m_stCurr;
|
||||
DirectionChangeScanner* m_pDirScanner;
|
||||
ScriptHintProvider* m_pHints;
|
||||
const OUString& m_rText;
|
||||
sal_Int32 m_nIndex = 0;
|
||||
sal_Int32 m_nNextStart = 0;
|
||||
@@ -174,15 +213,46 @@ private:
|
||||
m_pDirScanner->Advance();
|
||||
}
|
||||
|
||||
m_pHints->AdvanceTo(m_nIndex);
|
||||
auto eCurrHint = m_pHints->Peek();
|
||||
|
||||
auto nChar = m_rText.iterateCodePoints(&m_nIndex);
|
||||
nScript = GetScriptClass(nChar);
|
||||
|
||||
// tdf#166011 Apply style:script-type rules per ODF standard:
|
||||
if (eCurrHint == ScriptHintType::Ignore)
|
||||
{
|
||||
// The generic/latin font attributes are always used if the hint is ignore.
|
||||
nScript = css::i18n::ScriptType::LATIN;
|
||||
}
|
||||
else if (nScript == css::i18n::ScriptType::WEAK)
|
||||
{
|
||||
switch (eCurrHint)
|
||||
{
|
||||
case ScriptHintType::Latin:
|
||||
nScript = css::i18n::ScriptType::LATIN;
|
||||
break;
|
||||
|
||||
case ScriptHintType::Asian:
|
||||
nScript = css::i18n::ScriptType::ASIAN;
|
||||
break;
|
||||
|
||||
case ScriptHintType::Complex:
|
||||
nScript = css::i18n::ScriptType::COMPLEX;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// #i16354# Change script type for RTL text to CTL:
|
||||
// 1. All text in RTL runs will use the CTL font
|
||||
// #i89825# change the script type also to CTL (hennerdrewes)
|
||||
// 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!)
|
||||
// tdf#163660 Asian-script characters inside RTL runs should still use Asian font
|
||||
if (bCharIsRtl || (bCharIsRtlOrEmbedded && !bRunHasStrongEmbeddedLTR))
|
||||
if (eCurrHint == ScriptHintType::Automatic
|
||||
&& (bCharIsRtl || (bCharIsRtlOrEmbedded && !bRunHasStrongEmbeddedLTR)))
|
||||
{
|
||||
if (nScript != css::i18n::ScriptType::ASIAN)
|
||||
{
|
||||
@@ -233,8 +303,9 @@ private:
|
||||
|
||||
public:
|
||||
GreedyScriptChangeScanner(const OUString& rText, sal_Int16 nDefaultScriptType,
|
||||
DirectionChangeScanner* pDirScanner)
|
||||
DirectionChangeScanner* pDirScanner, ScriptHintProvider* pHints)
|
||||
: m_pDirScanner(pDirScanner)
|
||||
, m_pHints(pHints)
|
||||
, m_rText(rText)
|
||||
{
|
||||
// tdf#66791: For compatibility with other programs, the Asian script is
|
||||
@@ -261,6 +332,7 @@ public:
|
||||
m_nPrevScript = nDefaultScriptType;
|
||||
}
|
||||
|
||||
m_pHints->Start();
|
||||
Advance();
|
||||
}
|
||||
|
||||
@@ -287,9 +359,10 @@ i18nutil::MakeDirectionChangeScanner(const OUString& rText, sal_uInt8 nInitialDi
|
||||
|
||||
std::unique_ptr<i18nutil::ScriptChangeScanner>
|
||||
i18nutil::MakeScriptChangeScanner(const OUString& rText, sal_Int16 nDefaultScriptType,
|
||||
DirectionChangeScanner& rDirScanner)
|
||||
DirectionChangeScanner& rDirScanner, ScriptHintProvider& rHints)
|
||||
{
|
||||
return std::make_unique<GreedyScriptChangeScanner>(rText, nDefaultScriptType, &rDirScanner);
|
||||
return std::make_unique<GreedyScriptChangeScanner>(rText, nDefaultScriptType, &rDirScanner,
|
||||
&rHints);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
||||
@@ -66,6 +66,7 @@ class SvxULSpaceItem;
|
||||
class SvxWeightItem;
|
||||
class SvxWidowsItem;
|
||||
class SvxWordLineModeItem;
|
||||
class SvxScriptHintItem;
|
||||
|
||||
/*
|
||||
These SID_SVX_START entries came from include/svx/svxids.hrc, avoid
|
||||
@@ -88,7 +89,7 @@ class SvxWordLineModeItem;
|
||||
#define SID_ATTR_CHAR_STRIKEOUT TypedWhichId<SvxCrossedOutItem>( SID_SVX_START + 13 )
|
||||
#define SID_ATTR_CHAR_UNDERLINE TypedWhichId<SvxUnderlineItem>( SID_SVX_START + 14 )
|
||||
#define SID_ATTR_CHAR_FONTHEIGHT TypedWhichId<SvxFontHeightItem>( SID_SVX_START + 15 )
|
||||
// free
|
||||
#define SID_ATTR_CHAR_SCRIPT_HINT TypedWhichId<SvxScriptHintItem>( SID_SVX_START + 16 )
|
||||
#define SID_ATTR_CHAR_COLOR TypedWhichId<SvxColorItem>( SID_SVX_START + 17 )
|
||||
#define SID_ATTR_CHAR_KERNING TypedWhichId<SvxKerningItem>( SID_SVX_START + 18 )
|
||||
#define SID_ATTR_CHAR_CASEMAP TypedWhichId<SvxCaseMapItem>( SID_SVX_START + 19 )
|
||||
|
||||
@@ -125,6 +125,13 @@
|
||||
#define RID_SVXITEMS_STRIKEOUT_SLASH NC_("RID_SVXITEMS_STRIKEOUT_SLASH", "Strike through with slash")
|
||||
#define RID_SVXITEMS_STRIKEOUT_X NC_("RID_SVXITEMS_STRIKEOUT_X", "Strike through with Xes")
|
||||
|
||||
// enum ScriptTypeValue -------------------------------------------------------
|
||||
#define RID_SVXITEMS_SCRIPTHINTVAL_AUTO NC_("RID_SVXITEMS_SCRIPTHINTVAL_AUTO", "Automatic")
|
||||
#define RID_SVXITEMS_SCRIPTHINTVAL_IGNORE NC_("RID_SVXITEMS_SCRIPTHINTVAL_IGNORE", "Ignore")
|
||||
#define RID_SVXITEMS_SCRIPTHINTVAL_LATIN NC_("RID_SVXITEMS_SCRIPTHINTVAL_LATIN", "Latin")
|
||||
#define RID_SVXITEMS_SCRIPTHINTVAL_ASIAN NC_("RID_SVXITEMS_SCRIPTHINTVAL_ASIAN", "Asian")
|
||||
#define RID_SVXITEMS_SCRIPTHINTVAL_COMPLEX NC_("RID_SVXITEMS_SCRIPTHINTVAL_COMPLEX", "Complex")
|
||||
|
||||
// enum CASEMAP ----------------------------------------------------------
|
||||
#define RID_SVXITEMS_CASEMAP_NONE NC_("RID_SVXITEMS_CASEMAP_NONE", "None")
|
||||
#define RID_SVXITEMS_CASEMAP_UPPERCASE NC_("RID_SVXITEMS_CASEMAP_VERSALIEN", "Caps")
|
||||
|
||||
@@ -61,6 +61,7 @@ class SvxNumBulletItem;
|
||||
class SvxJustifyMethodItem;
|
||||
class SvxVerJustifyItem;
|
||||
class SvxRubyItem;
|
||||
class SvxScriptHintItem;
|
||||
|
||||
/*
|
||||
* NOTE: Changes in this file will probably require
|
||||
@@ -129,8 +130,9 @@ inline constexpr TypedWhichId<SvxCaseMapItem> EE_CHAR_CASEMAP (EE
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> EE_CHAR_GRABBAG (EE_CHAR_START+30);
|
||||
inline constexpr TypedWhichId<SvxColorItem> EE_CHAR_BKGCOLOR (EE_CHAR_START+31);
|
||||
inline constexpr TypedWhichId<SvxRubyItem> EE_CHAR_RUBY (EE_CHAR_START+32);
|
||||
inline constexpr TypedWhichId<SvxScriptHintItem> EE_CHAR_SCRIPT_HINT (EE_CHAR_START+33);
|
||||
|
||||
inline constexpr sal_uInt16 EE_CHAR_END (EE_CHAR_START + 32);
|
||||
inline constexpr sal_uInt16 EE_CHAR_END (EE_CHAR_START + 33);
|
||||
|
||||
inline constexpr sal_uInt16 EE_FEATURE_START (EE_CHAR_END + 1);
|
||||
inline constexpr sal_uInt16 EE_FEATURE_TAB (EE_FEATURE_START + 0);
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
#define MID_BOLD 0
|
||||
#define MID_WEIGHT 1
|
||||
|
||||
//SvxScriptHintItem
|
||||
#define MID_SCRIPTHINT 0
|
||||
|
||||
//SvxLanguageItem
|
||||
#define MID_LANG_INT 0
|
||||
#define MID_LANG_LOCALE 1
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <tools/fontenum.hxx>
|
||||
#include <svl/eitem.hxx>
|
||||
#include <editeng/editengdllapi.h>
|
||||
#include <ostream>
|
||||
#include <i18nutil/scriptchangescanner.hxx>
|
||||
|
||||
class EDITENG_DLLPUBLIC SvxScriptHintItem final : public SfxEnumItem<i18nutil::ScriptHintType>
|
||||
{
|
||||
protected:
|
||||
virtual ItemInstanceManager* getItemInstanceManager() const override;
|
||||
|
||||
public:
|
||||
static SfxPoolItem* CreateDefault();
|
||||
|
||||
DECLARE_ITEM_TYPE_FUNCTION(SvxScriptHintItem)
|
||||
SvxScriptHintItem(const sal_uInt16 nId);
|
||||
|
||||
// "pure virtual Methods" from SfxPoolItem + SfxEnumItem
|
||||
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric,
|
||||
MapUnit ePresMetric, OUString& rText,
|
||||
const IntlWrapper&) const override;
|
||||
|
||||
virtual SvxScriptHintItem* Clone(SfxItemPool* pPool = nullptr) const override;
|
||||
static OUString GetValueText(i18nutil::ScriptHintType eValue);
|
||||
virtual sal_uInt16 GetValueCount() const override;
|
||||
|
||||
virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
|
||||
virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
|
||||
|
||||
// enum cast
|
||||
i18nutil::ScriptHintType GetScriptHintValue() const { return GetValue(); }
|
||||
|
||||
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
@@ -16,8 +16,7 @@
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
#ifndef INCLUDED_EDITENG_SCRIPTTYPEITEM_HXX
|
||||
#define INCLUDED_EDITENG_SCRIPTTYPEITEM_HXX
|
||||
#pragma once
|
||||
|
||||
#include <svl/languageoptions.hxx>
|
||||
#include <svl/setitem.hxx>
|
||||
@@ -48,6 +47,4 @@ public:
|
||||
sal_uInt16& rComplex );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
@@ -363,6 +363,8 @@ inline constexpr OUString UNO_NAME_EDIT_CHAR_RUBY_TEXT = u"RubyText"_ustr;
|
||||
inline constexpr OUString UNO_NAME_EDIT_CHAR_RUBY_ADJUST = u"RubyAdjust"_ustr;
|
||||
inline constexpr OUString UNO_NAME_EDIT_CHAR_RUBY_POSITION = u"RubyPosition"_ustr;
|
||||
|
||||
inline constexpr OUString UNO_NAME_EDIT_CHAR_SCRIPT_HINT = u"CharScriptHint"_ustr;
|
||||
|
||||
inline constexpr OUString UNO_NAME_BITMAP = u"Bitmap"_ustr;
|
||||
|
||||
inline constexpr OUString UNO_NAME_LINKDISPLAYNAME = u"LinkDisplayName"_ustr;
|
||||
|
||||
@@ -137,7 +137,8 @@ struct SfxItemPropertyMapEntry;
|
||||
{ u"CharInteropGrabBag"_ustr, EE_CHAR_GRABBAG, cppu::UnoType<css::uno::Sequence<css::beans::PropertyValue >>::get(), 0, 0 }, \
|
||||
{ UNO_NAME_EDIT_CHAR_RUBY_TEXT, EE_CHAR_RUBY, ::cppu::UnoType<OUString>::get(), 0, MID_RUBY_TEXT }, \
|
||||
{ UNO_NAME_EDIT_CHAR_RUBY_ADJUST, EE_CHAR_RUBY, ::cppu::UnoType<sal_Int16>::get(), 0, MID_RUBY_ADJUST }, \
|
||||
{ UNO_NAME_EDIT_CHAR_RUBY_POSITION, EE_CHAR_RUBY, ::cppu::UnoType<sal_Int16>::get(), 0, MID_RUBY_POSITION }
|
||||
{ UNO_NAME_EDIT_CHAR_RUBY_POSITION, EE_CHAR_RUBY, ::cppu::UnoType<sal_Int16>::get(), 0, MID_RUBY_POSITION }, \
|
||||
{ UNO_NAME_EDIT_CHAR_SCRIPT_HINT, EE_CHAR_SCRIPT_HINT, ::cppu::UnoType<sal_Int16>::get(), 0, MID_SCRIPTHINT }
|
||||
|
||||
|
||||
#define SVX_UNOEDIT_FONT_PROPERTIES \
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <i18nutil/i18nutildllapi.h>
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace i18nutil
|
||||
{
|
||||
@@ -29,6 +31,48 @@ struct ScriptChange
|
||||
sal_Int16 m_nScriptType = 0;
|
||||
};
|
||||
|
||||
enum class ScriptHintType : sal_uInt16
|
||||
{
|
||||
Automatic = 0,
|
||||
Ignore = 1,
|
||||
Latin = 2,
|
||||
Asian = 3,
|
||||
Complex = 4
|
||||
};
|
||||
|
||||
struct ScriptHint
|
||||
{
|
||||
sal_Int32 m_nStartIndex = 0;
|
||||
sal_Int32 m_nEndIndex = 0;
|
||||
ScriptHintType m_eType = ScriptHintType::Automatic;
|
||||
|
||||
ScriptHint(ScriptHintType eType, sal_Int32 nStartIndex, sal_Int32 nEndIndex)
|
||||
: m_nStartIndex(nStartIndex)
|
||||
, m_nEndIndex(nEndIndex)
|
||||
, m_eType(eType)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class I18NUTIL_DLLPUBLIC ScriptHintProvider
|
||||
{
|
||||
private:
|
||||
std::vector<ScriptHint> m_aHints;
|
||||
ScriptHintType m_eParaHint = ScriptHintType::Automatic;
|
||||
|
||||
std::vector<ScriptHint>::iterator m_pCurrIt;
|
||||
ScriptHintType m_eCurrHint = ScriptHintType::Automatic;
|
||||
sal_Int32 m_nCurrIdx = 0;
|
||||
|
||||
public:
|
||||
void SetParagraphLevelHint(ScriptHintType eType);
|
||||
void AddHint(ScriptHintType eType, sal_Int32 nStartIndex, sal_Int32 nEndIndex);
|
||||
|
||||
void Start();
|
||||
void AdvanceTo(sal_Int32 nNextIdx);
|
||||
ScriptHintType Peek() const;
|
||||
};
|
||||
|
||||
class I18NUTIL_DLLPUBLIC DirectionChangeScanner
|
||||
{
|
||||
public:
|
||||
@@ -56,7 +100,7 @@ MakeDirectionChangeScanner(const OUString& rWord, sal_uInt8 nInitialDirection);
|
||||
|
||||
I18NUTIL_DLLPUBLIC std::unique_ptr<ScriptChangeScanner>
|
||||
MakeScriptChangeScanner(const OUString& rWord, sal_Int16 nDefaultScriptType,
|
||||
DirectionChangeScanner& rDirScanner);
|
||||
DirectionChangeScanner& rDirScanner, ScriptHintProvider& rHints);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
||||
@@ -425,6 +425,7 @@ enum class SfxItemType : sal_uInt16
|
||||
SvxWritingModeItemType,
|
||||
SvxZoomItemType,
|
||||
SvxZoomSliderItemType,
|
||||
SvxScriptHintItemType,
|
||||
SwAddPrinterItemType,
|
||||
SwChannelBGrfType,
|
||||
SwChannelGGrfType,
|
||||
|
||||
@@ -1706,6 +1706,7 @@ namespace xmloff::token {
|
||||
XML_SCRIPT,
|
||||
XML_SCRIPT_ASIAN,
|
||||
XML_SCRIPT_COMPLEX,
|
||||
XML_SCRIPT_TYPE,
|
||||
XML_SCROLL,
|
||||
XML_SDEV,
|
||||
XML_SEARCH_CRITERIA_MUST_APPLY_TO_WHOLE_CELL,
|
||||
@@ -3582,6 +3583,10 @@ namespace xmloff::token {
|
||||
XML_COLOR_VALUE,
|
||||
XML_COLOR_TYPE,
|
||||
|
||||
XML_LATIN,
|
||||
XML_ASIAN,
|
||||
XML_COMPLEX,
|
||||
|
||||
XML_TOKEN_END
|
||||
};
|
||||
|
||||
|
||||
@@ -301,6 +301,8 @@
|
||||
#define XML_TYPE_HYPHENATION_KEEP_TYPE (XML_TEXT_TYPES_START + 132)
|
||||
#define XML_TYPE_HYPHENATION_KEEP_LINE (XML_TEXT_TYPES_START + 133)
|
||||
|
||||
#define XML_TYPE_TEXT_SCRIPT_TYPE (XML_TEXT_TYPES_START + 134)
|
||||
|
||||
#endif // INCLUDED_XMLOFF_XMLTYPES_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <svx/svdoutl.hxx>
|
||||
#include <svx/sdooitm.hxx>
|
||||
#include <editeng/postitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/shdditem.hxx>
|
||||
#include <editeng/udlnitem.hxx>
|
||||
#include <editeng/wghtitem.hxx>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <svx/hlnkitem.hxx>
|
||||
#include <vcl/EnumContext.hxx>
|
||||
#include <editeng/postitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/shdditem.hxx>
|
||||
#include <editeng/udlnitem.hxx>
|
||||
#include <editeng/wghtitem.hxx>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <editeng/colritem.hxx>
|
||||
#include <editeng/brushitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/shaditem.hxx>
|
||||
#include <editeng/justifyitem.hxx>
|
||||
#include <editeng/fhgtitem.hxx>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <editeng/boxitem.hxx>
|
||||
#include <editeng/fontitem.hxx>
|
||||
#include <editeng/lineitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <svl/srchitem.hxx>
|
||||
#include <sfx2/linkmgr.hxx>
|
||||
#include <sfx2/dispatch.hxx>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <sfx2/dispatch.hxx>
|
||||
#include <editeng/fontitem.hxx>
|
||||
#include <editeng/langitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <i18nutil/transliteration.hxx>
|
||||
#include <svl/itempool.hxx>
|
||||
#include <svl/itemset.hxx>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <sfx2/tplpitem.hxx>
|
||||
#include <editeng/escapementitem.hxx>
|
||||
#include <svx/svdoutl.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/writingmodeitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/fhgtitem.hxx>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <editeng/shdditem.hxx>
|
||||
#include <svx/svdpagv.hxx>
|
||||
#include <editeng/flstitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/writingmodeitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/cmapitem.hxx>
|
||||
|
||||
@@ -5064,7 +5064,7 @@ include/editeng/prntitem.hxx
|
||||
include/editeng/protitem.hxx
|
||||
include/editeng/rsiditem.hxx
|
||||
include/editeng/scriptspaceitem.hxx
|
||||
include/editeng/scripttypeitem.hxx
|
||||
include/editeng/scriptsetitem.hxx
|
||||
include/editeng/shaditem.hxx
|
||||
include/editeng/shdditem.hxx
|
||||
include/editeng/sizeitem.hxx
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <editeng/charhiddenitem.hxx>
|
||||
#include <editeng/langitem.hxx>
|
||||
#include <editeng/colritem.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
|
||||
// implementation of the character attribute methods of SwAttrSet
|
||||
|
||||
@@ -111,6 +112,8 @@ inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( bool bInP ) const
|
||||
{ return Get( RES_CHRATR_RELIEF, bInP ); }
|
||||
inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( bool bInP ) const
|
||||
{ return Get( RES_CHRATR_HIDDEN, bInP ); }
|
||||
inline const SvxScriptHintItem &SwAttrSet::GetCharScriptTypeHint( bool bInP ) const
|
||||
{ return Get( RES_CHRATR_SCRIPT_HINT, bInP ); }
|
||||
|
||||
// implementation of the character attribute methods of SwFormat
|
||||
|
||||
|
||||
+203
-189
@@ -85,6 +85,7 @@ class SvxPrintItem;
|
||||
class SvxProtectItem;
|
||||
class SvxRsidItem;
|
||||
class SvxScriptSpaceItem;
|
||||
class SvxScriptHintItem;
|
||||
class SvxShadowedItem;
|
||||
class SvxShadowItem;
|
||||
class SvxTabStopItem;
|
||||
@@ -196,52 +197,53 @@ inline constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN);
|
||||
// Ranges for the IDs of the format-attributes.
|
||||
// Which-values for character-format attributes.
|
||||
inline constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN);
|
||||
inline constexpr TypedWhichId<SvxCaseMapItem> RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN); // 1
|
||||
inline constexpr TypedWhichId<SvxColorItem> RES_CHRATR_CHARSETCOLOR(2);
|
||||
inline constexpr TypedWhichId<SvxColorItem> RES_CHRATR_COLOR(3);
|
||||
inline constexpr TypedWhichId<SvxContourItem> RES_CHRATR_CONTOUR(4);
|
||||
inline constexpr TypedWhichId<SvxCrossedOutItem> RES_CHRATR_CROSSEDOUT(5);
|
||||
inline constexpr TypedWhichId<SvxEscapementItem> RES_CHRATR_ESCAPEMENT(6);
|
||||
inline constexpr TypedWhichId<SvxFontItem> RES_CHRATR_FONT(7);
|
||||
inline constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_FONTSIZE(8);
|
||||
inline constexpr TypedWhichId<SvxKerningItem> RES_CHRATR_KERNING(9);
|
||||
inline constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_LANGUAGE(10);
|
||||
inline constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_POSTURE(11);
|
||||
inline constexpr TypedWhichId<SfxVoidItem> RES_CHRATR_UNUSED1(12);
|
||||
inline constexpr TypedWhichId<SvxShadowedItem> RES_CHRATR_SHADOWED(13);
|
||||
inline constexpr TypedWhichId<SvxUnderlineItem> RES_CHRATR_UNDERLINE(14);
|
||||
inline constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_WEIGHT(15);
|
||||
inline constexpr TypedWhichId<SvxWordLineModeItem> RES_CHRATR_WORDLINEMODE(16);
|
||||
inline constexpr TypedWhichId<SvxAutoKernItem> RES_CHRATR_AUTOKERN(17);
|
||||
inline constexpr TypedWhichId<SvxBlinkItem> RES_CHRATR_BLINK(18);
|
||||
inline constexpr TypedWhichId<SvxNoHyphenItem> RES_CHRATR_NOHYPHEN(19);
|
||||
inline constexpr TypedWhichId<SfxVoidItem> RES_CHRATR_UNUSED2(20);
|
||||
inline constexpr TypedWhichId<SvxBrushItem> RES_CHRATR_BACKGROUND(21);
|
||||
inline constexpr TypedWhichId<SvxFontItem> RES_CHRATR_CJK_FONT(22);
|
||||
inline constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_CJK_FONTSIZE(23);
|
||||
inline constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_CJK_LANGUAGE(24);
|
||||
inline constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_CJK_POSTURE(25);
|
||||
inline constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_CJK_WEIGHT(26);
|
||||
inline constexpr TypedWhichId<SvxFontItem> RES_CHRATR_CTL_FONT(27);
|
||||
inline constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_CTL_FONTSIZE(28);
|
||||
inline constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_CTL_LANGUAGE(29);
|
||||
inline constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_CTL_POSTURE(30);
|
||||
inline constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_CTL_WEIGHT(31);
|
||||
inline constexpr TypedWhichId<SvxCharRotateItem> RES_CHRATR_ROTATE(32);
|
||||
inline constexpr TypedWhichId<SvxEmphasisMarkItem> RES_CHRATR_EMPHASIS_MARK(33);
|
||||
inline constexpr TypedWhichId<SvxTwoLinesItem> RES_CHRATR_TWO_LINES(34);
|
||||
inline constexpr TypedWhichId<SvxCharScaleWidthItem> RES_CHRATR_SCALEW(35);
|
||||
inline constexpr TypedWhichId<SvxCharReliefItem> RES_CHRATR_RELIEF(36);
|
||||
inline constexpr TypedWhichId<SvxCharHiddenItem> RES_CHRATR_HIDDEN(37);
|
||||
inline constexpr TypedWhichId<SvxOverlineItem> RES_CHRATR_OVERLINE(38);
|
||||
inline constexpr TypedWhichId<SvxRsidItem> RES_CHRATR_RSID(39);
|
||||
inline constexpr TypedWhichId<SvxBoxItem> RES_CHRATR_BOX(40);
|
||||
inline constexpr TypedWhichId<SvxShadowItem> RES_CHRATR_SHADOW(41);
|
||||
inline constexpr TypedWhichId<SvxBrushItem> RES_CHRATR_HIGHLIGHT(42);
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> RES_CHRATR_GRABBAG(43);
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_CHRATR_BIDIRTL(44);
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_CHRATR_IDCTHINT(45);
|
||||
inline constexpr sal_uInt16 RES_CHRATR_END(46);
|
||||
inline constexpr TypedWhichId<SvxCaseMapItem> RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN + 0); // 1
|
||||
inline constexpr TypedWhichId<SvxColorItem> RES_CHRATR_CHARSETCOLOR(RES_CHRATR_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SvxColorItem> RES_CHRATR_COLOR(RES_CHRATR_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SvxContourItem> RES_CHRATR_CONTOUR(RES_CHRATR_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SvxCrossedOutItem> RES_CHRATR_CROSSEDOUT(RES_CHRATR_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SvxEscapementItem> RES_CHRATR_ESCAPEMENT(RES_CHRATR_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SvxFontItem> RES_CHRATR_FONT(RES_CHRATR_BEGIN + 6);
|
||||
inline constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_FONTSIZE(RES_CHRATR_BEGIN + 7);
|
||||
inline constexpr TypedWhichId<SvxKerningItem> RES_CHRATR_KERNING(RES_CHRATR_BEGIN + 8);
|
||||
inline constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_LANGUAGE(RES_CHRATR_BEGIN + 9);
|
||||
inline constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_POSTURE(RES_CHRATR_BEGIN + 10);
|
||||
inline constexpr TypedWhichId<SfxVoidItem> RES_CHRATR_UNUSED1(RES_CHRATR_BEGIN + 11);
|
||||
inline constexpr TypedWhichId<SvxShadowedItem> RES_CHRATR_SHADOWED(RES_CHRATR_BEGIN + 12);
|
||||
inline constexpr TypedWhichId<SvxUnderlineItem> RES_CHRATR_UNDERLINE(RES_CHRATR_BEGIN + 13);
|
||||
inline constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_WEIGHT(RES_CHRATR_BEGIN + 14);
|
||||
inline constexpr TypedWhichId<SvxWordLineModeItem> RES_CHRATR_WORDLINEMODE(RES_CHRATR_BEGIN + 15);
|
||||
inline constexpr TypedWhichId<SvxAutoKernItem> RES_CHRATR_AUTOKERN(RES_CHRATR_BEGIN + 16);
|
||||
inline constexpr TypedWhichId<SvxBlinkItem> RES_CHRATR_BLINK(RES_CHRATR_BEGIN + 17);
|
||||
inline constexpr TypedWhichId<SvxNoHyphenItem> RES_CHRATR_NOHYPHEN(RES_CHRATR_BEGIN + 18);
|
||||
inline constexpr TypedWhichId<SfxVoidItem> RES_CHRATR_UNUSED2(RES_CHRATR_BEGIN + 19);
|
||||
inline constexpr TypedWhichId<SvxBrushItem> RES_CHRATR_BACKGROUND(RES_CHRATR_BEGIN + 20);
|
||||
inline constexpr TypedWhichId<SvxFontItem> RES_CHRATR_CJK_FONT(RES_CHRATR_BEGIN + 21);
|
||||
inline constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_CJK_FONTSIZE(RES_CHRATR_BEGIN + 22);
|
||||
inline constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_CJK_LANGUAGE(RES_CHRATR_BEGIN + 23);
|
||||
inline constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_CJK_POSTURE(RES_CHRATR_BEGIN + 24);
|
||||
inline constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_CJK_WEIGHT(RES_CHRATR_BEGIN + 25);
|
||||
inline constexpr TypedWhichId<SvxFontItem> RES_CHRATR_CTL_FONT(RES_CHRATR_BEGIN + 26);
|
||||
inline constexpr TypedWhichId<SvxFontHeightItem> RES_CHRATR_CTL_FONTSIZE(RES_CHRATR_BEGIN + 27);
|
||||
inline constexpr TypedWhichId<SvxLanguageItem> RES_CHRATR_CTL_LANGUAGE(RES_CHRATR_BEGIN + 28);
|
||||
inline constexpr TypedWhichId<SvxPostureItem> RES_CHRATR_CTL_POSTURE(RES_CHRATR_BEGIN + 29);
|
||||
inline constexpr TypedWhichId<SvxWeightItem> RES_CHRATR_CTL_WEIGHT(RES_CHRATR_BEGIN + 30);
|
||||
inline constexpr TypedWhichId<SvxCharRotateItem> RES_CHRATR_ROTATE(RES_CHRATR_BEGIN + 31);
|
||||
inline constexpr TypedWhichId<SvxEmphasisMarkItem> RES_CHRATR_EMPHASIS_MARK(RES_CHRATR_BEGIN + 32);
|
||||
inline constexpr TypedWhichId<SvxTwoLinesItem> RES_CHRATR_TWO_LINES(RES_CHRATR_BEGIN + 33);
|
||||
inline constexpr TypedWhichId<SvxCharScaleWidthItem> RES_CHRATR_SCALEW(RES_CHRATR_BEGIN + 34);
|
||||
inline constexpr TypedWhichId<SvxCharReliefItem> RES_CHRATR_RELIEF(RES_CHRATR_BEGIN + 35);
|
||||
inline constexpr TypedWhichId<SvxCharHiddenItem> RES_CHRATR_HIDDEN(RES_CHRATR_BEGIN + 36);
|
||||
inline constexpr TypedWhichId<SvxOverlineItem> RES_CHRATR_OVERLINE(RES_CHRATR_BEGIN + 37);
|
||||
inline constexpr TypedWhichId<SvxRsidItem> RES_CHRATR_RSID(RES_CHRATR_BEGIN + 38);
|
||||
inline constexpr TypedWhichId<SvxBoxItem> RES_CHRATR_BOX(RES_CHRATR_BEGIN + 39);
|
||||
inline constexpr TypedWhichId<SvxShadowItem> RES_CHRATR_SHADOW(RES_CHRATR_BEGIN + 40);
|
||||
inline constexpr TypedWhichId<SvxBrushItem> RES_CHRATR_HIGHLIGHT(RES_CHRATR_BEGIN + 41);
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> RES_CHRATR_GRABBAG(RES_CHRATR_BEGIN + 42);
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_CHRATR_BIDIRTL(RES_CHRATR_BEGIN + 43);
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_CHRATR_IDCTHINT(RES_CHRATR_BEGIN + 44);
|
||||
inline constexpr TypedWhichId<SvxScriptHintItem> RES_CHRATR_SCRIPT_HINT(RES_CHRATR_BEGIN + 45);
|
||||
inline constexpr sal_uInt16 RES_CHRATR_END(RES_CHRATR_BEGIN + 46);
|
||||
|
||||
// this Attribute used only in a TextNodes SwpAttr-Array
|
||||
inline constexpr sal_uInt16 RES_TXTATR_BEGIN(RES_CHRATR_END);
|
||||
@@ -263,188 +265,200 @@ inline constexpr sal_uInt16 RES_TXTATR_BEGIN(RES_CHRATR_END);
|
||||
- META and METAFIELD must precede CJK_RUBY and INETFMT
|
||||
*/
|
||||
inline constexpr sal_uInt16 RES_TXTATR_WITHEND_BEGIN(RES_TXTATR_BEGIN);
|
||||
inline constexpr TypedWhichId<SwFormatRefMark> RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN); // 46
|
||||
inline constexpr TypedWhichId<SwTOXMark> RES_TXTATR_TOXMARK(47);
|
||||
inline constexpr TypedWhichId<SwFormatMeta> RES_TXTATR_META(48);
|
||||
inline constexpr TypedWhichId<SwFormatMeta> RES_TXTATR_METAFIELD(49);
|
||||
inline constexpr TypedWhichId<SwFormatAutoFormat> RES_TXTATR_AUTOFMT(50);
|
||||
inline constexpr TypedWhichId<SwFormatINetFormat> RES_TXTATR_INETFMT(51);
|
||||
inline constexpr TypedWhichId<SwFormatCharFormat> RES_TXTATR_CHARFMT(52);
|
||||
inline constexpr TypedWhichId<SwFormatRuby> RES_TXTATR_CJK_RUBY(53);
|
||||
inline constexpr TypedWhichId<SvXMLAttrContainerItem> RES_TXTATR_UNKNOWN_CONTAINER(54);
|
||||
inline constexpr TypedWhichId<SwFormatField> RES_TXTATR_INPUTFIELD(55);
|
||||
inline constexpr TypedWhichId<SwFormatContentControl> RES_TXTATR_CONTENTCONTROL(56);
|
||||
inline constexpr sal_uInt16 RES_TXTATR_WITHEND_END(57);
|
||||
inline constexpr TypedWhichId<SwFormatRefMark> RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN
|
||||
+ 0); // 47
|
||||
inline constexpr TypedWhichId<SwTOXMark> RES_TXTATR_TOXMARK(RES_TXTATR_WITHEND_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SwFormatMeta> RES_TXTATR_META(RES_TXTATR_WITHEND_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SwFormatMeta> RES_TXTATR_METAFIELD(RES_TXTATR_WITHEND_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SwFormatAutoFormat> RES_TXTATR_AUTOFMT(RES_TXTATR_WITHEND_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SwFormatINetFormat> RES_TXTATR_INETFMT(RES_TXTATR_WITHEND_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SwFormatCharFormat> RES_TXTATR_CHARFMT(RES_TXTATR_WITHEND_BEGIN + 6);
|
||||
inline constexpr TypedWhichId<SwFormatRuby> RES_TXTATR_CJK_RUBY(RES_TXTATR_WITHEND_BEGIN + 7);
|
||||
inline constexpr TypedWhichId<SvXMLAttrContainerItem>
|
||||
RES_TXTATR_UNKNOWN_CONTAINER(RES_TXTATR_WITHEND_BEGIN + 8);
|
||||
inline constexpr TypedWhichId<SwFormatField> RES_TXTATR_INPUTFIELD(RES_TXTATR_WITHEND_BEGIN + 9);
|
||||
inline constexpr TypedWhichId<SwFormatContentControl>
|
||||
RES_TXTATR_CONTENTCONTROL(RES_TXTATR_WITHEND_BEGIN + 10);
|
||||
inline constexpr sal_uInt16 RES_TXTATR_WITHEND_END(RES_TXTATR_WITHEND_BEGIN + 11);
|
||||
|
||||
// all TextAttributes without an end
|
||||
inline constexpr sal_uInt16 RES_TXTATR_NOEND_BEGIN(RES_TXTATR_WITHEND_END);
|
||||
inline constexpr TypedWhichId<SwFormatField> RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN); // 57
|
||||
inline constexpr TypedWhichId<SwFormatFlyCnt> RES_TXTATR_FLYCNT(58);
|
||||
inline constexpr TypedWhichId<SwFormatFootnote> RES_TXTATR_FTN(59);
|
||||
inline constexpr TypedWhichId<SwFormatField> RES_TXTATR_ANNOTATION(60);
|
||||
inline constexpr TypedWhichId<SwFormatLineBreak> RES_TXTATR_LINEBREAK(61);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_TXTATR_DUMMY1(62);
|
||||
inline constexpr sal_uInt16 RES_TXTATR_NOEND_END(63);
|
||||
inline constexpr TypedWhichId<SwFormatField> RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN + 0); // 58
|
||||
inline constexpr TypedWhichId<SwFormatFlyCnt> RES_TXTATR_FLYCNT(RES_TXTATR_NOEND_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SwFormatFootnote> RES_TXTATR_FTN(RES_TXTATR_NOEND_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SwFormatField> RES_TXTATR_ANNOTATION(RES_TXTATR_NOEND_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SwFormatLineBreak> RES_TXTATR_LINEBREAK(RES_TXTATR_NOEND_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_TXTATR_DUMMY1(RES_TXTATR_NOEND_BEGIN + 5);
|
||||
inline constexpr sal_uInt16 RES_TXTATR_NOEND_END(RES_TXTATR_NOEND_BEGIN + 6);
|
||||
inline constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END);
|
||||
|
||||
inline constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END);
|
||||
inline constexpr TypedWhichId<SvxLineSpacingItem> RES_PARATR_LINESPACING(RES_PARATR_BEGIN); // 63
|
||||
inline constexpr TypedWhichId<SvxAdjustItem> RES_PARATR_ADJUST(64);
|
||||
inline constexpr TypedWhichId<SvxFormatSplitItem> RES_PARATR_SPLIT(65);
|
||||
inline constexpr TypedWhichId<SvxOrphansItem> RES_PARATR_ORPHANS(66);
|
||||
inline constexpr TypedWhichId<SvxWidowsItem> RES_PARATR_WIDOWS(67);
|
||||
inline constexpr TypedWhichId<SvxTabStopItem> RES_PARATR_TABSTOP(68);
|
||||
inline constexpr TypedWhichId<SvxHyphenZoneItem> RES_PARATR_HYPHENZONE(69);
|
||||
inline constexpr TypedWhichId<SwFormatDrop> RES_PARATR_DROP(70);
|
||||
inline constexpr TypedWhichId<SwRegisterItem> RES_PARATR_REGISTER(71);
|
||||
inline constexpr TypedWhichId<SwNumRuleItem> RES_PARATR_NUMRULE(72);
|
||||
inline constexpr TypedWhichId<SvxScriptSpaceItem> RES_PARATR_SCRIPTSPACE(73);
|
||||
inline constexpr TypedWhichId<SvxHangingPunctuationItem> RES_PARATR_HANGINGPUNCTUATION(74);
|
||||
inline constexpr TypedWhichId<SvxForbiddenRuleItem> RES_PARATR_FORBIDDEN_RULES(75);
|
||||
inline constexpr TypedWhichId<SvxParaVertAlignItem> RES_PARATR_VERTALIGN(76);
|
||||
inline constexpr TypedWhichId<SvxParaGridItem> RES_PARATR_SNAPTOGRID(77);
|
||||
inline constexpr TypedWhichId<SwParaConnectBorderItem> RES_PARATR_CONNECT_BORDER(78);
|
||||
inline constexpr TypedWhichId<SfxUInt16Item> RES_PARATR_OUTLINELEVEL(79);
|
||||
inline constexpr TypedWhichId<SvxRsidItem> RES_PARATR_RSID(80);
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> RES_PARATR_GRABBAG(81);
|
||||
inline constexpr sal_uInt16 RES_PARATR_END(82);
|
||||
inline constexpr TypedWhichId<SvxLineSpacingItem> RES_PARATR_LINESPACING(RES_PARATR_BEGIN
|
||||
+ 0); // 64
|
||||
inline constexpr TypedWhichId<SvxAdjustItem> RES_PARATR_ADJUST(RES_PARATR_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SvxFormatSplitItem> RES_PARATR_SPLIT(RES_PARATR_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SvxOrphansItem> RES_PARATR_ORPHANS(RES_PARATR_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SvxWidowsItem> RES_PARATR_WIDOWS(RES_PARATR_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SvxTabStopItem> RES_PARATR_TABSTOP(RES_PARATR_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SvxHyphenZoneItem> RES_PARATR_HYPHENZONE(RES_PARATR_BEGIN + 6);
|
||||
inline constexpr TypedWhichId<SwFormatDrop> RES_PARATR_DROP(RES_PARATR_BEGIN + 7);
|
||||
inline constexpr TypedWhichId<SwRegisterItem> RES_PARATR_REGISTER(RES_PARATR_BEGIN + 8);
|
||||
inline constexpr TypedWhichId<SwNumRuleItem> RES_PARATR_NUMRULE(RES_PARATR_BEGIN + 9);
|
||||
inline constexpr TypedWhichId<SvxScriptSpaceItem> RES_PARATR_SCRIPTSPACE(RES_PARATR_BEGIN + 10);
|
||||
inline constexpr TypedWhichId<SvxHangingPunctuationItem>
|
||||
RES_PARATR_HANGINGPUNCTUATION(RES_PARATR_BEGIN + 11);
|
||||
inline constexpr TypedWhichId<SvxForbiddenRuleItem> RES_PARATR_FORBIDDEN_RULES(RES_PARATR_BEGIN
|
||||
+ 12);
|
||||
inline constexpr TypedWhichId<SvxParaVertAlignItem> RES_PARATR_VERTALIGN(RES_PARATR_BEGIN + 13);
|
||||
inline constexpr TypedWhichId<SvxParaGridItem> RES_PARATR_SNAPTOGRID(RES_PARATR_BEGIN + 14);
|
||||
inline constexpr TypedWhichId<SwParaConnectBorderItem> RES_PARATR_CONNECT_BORDER(RES_PARATR_BEGIN
|
||||
+ 15);
|
||||
inline constexpr TypedWhichId<SfxUInt16Item> RES_PARATR_OUTLINELEVEL(RES_PARATR_BEGIN + 16);
|
||||
inline constexpr TypedWhichId<SvxRsidItem> RES_PARATR_RSID(RES_PARATR_BEGIN + 17);
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> RES_PARATR_GRABBAG(RES_PARATR_BEGIN + 18);
|
||||
inline constexpr sal_uInt16 RES_PARATR_END(RES_PARATR_BEGIN + 19);
|
||||
|
||||
// list attributes for paragraphs.
|
||||
// intentionally these list attributes are not contained in paragraph styles
|
||||
inline constexpr sal_uInt16 RES_PARATR_LIST_BEGIN(RES_PARATR_END);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN); // 82
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_PARATR_LIST_LEVEL(83);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_PARATR_LIST_ISRESTART(84);
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_PARATR_LIST_RESTARTVALUE(85);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_PARATR_LIST_ISCOUNTED(86);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN + 0); // 83
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_PARATR_LIST_LEVEL(RES_PARATR_LIST_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_PARATR_LIST_ISRESTART(RES_PARATR_LIST_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SfxInt16Item> RES_PARATR_LIST_RESTARTVALUE(RES_PARATR_LIST_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_PARATR_LIST_ISCOUNTED(RES_PARATR_LIST_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SwFormatAutoFormat>
|
||||
RES_PARATR_LIST_AUTOFMT(87); //TypedWhichId<SfxSetItem>(87)
|
||||
inline constexpr sal_uInt16 RES_PARATR_LIST_END(88);
|
||||
RES_PARATR_LIST_AUTOFMT(RES_PARATR_LIST_BEGIN + 5); //TypedWhichId<SfxSetItem>(88)
|
||||
inline constexpr sal_uInt16 RES_PARATR_LIST_END(RES_PARATR_LIST_BEGIN + 6);
|
||||
|
||||
inline constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END);
|
||||
inline constexpr TypedWhichId<SwFormatFillOrder> RES_FILL_ORDER(RES_FRMATR_BEGIN);
|
||||
inline constexpr TypedWhichId<SwFormatFrameSize> RES_FRM_SIZE(89);
|
||||
inline constexpr TypedWhichId<SvxPaperBinItem> RES_PAPER_BIN(90);
|
||||
inline constexpr TypedWhichId<SvxFirstLineIndentItem> RES_MARGIN_FIRSTLINE(91);
|
||||
inline constexpr TypedWhichId<SvxTextLeftMarginItem> RES_MARGIN_TEXTLEFT(92);
|
||||
inline constexpr TypedWhichId<SvxRightMarginItem> RES_MARGIN_RIGHT(93);
|
||||
inline constexpr TypedWhichId<SvxLeftMarginItem> RES_MARGIN_LEFT(94);
|
||||
inline constexpr TypedWhichId<SvxGutterLeftMarginItem> RES_MARGIN_GUTTER(95);
|
||||
inline constexpr TypedWhichId<SvxGutterRightMarginItem> RES_MARGIN_GUTTER_RIGHT(96);
|
||||
inline constexpr TypedWhichId<SvxLRSpaceItem> RES_LR_SPACE(97);
|
||||
inline constexpr TypedWhichId<SvxULSpaceItem> RES_UL_SPACE(98);
|
||||
inline constexpr TypedWhichId<SwFormatPageDesc> RES_PAGEDESC(99);
|
||||
inline constexpr TypedWhichId<SvxFormatBreakItem> RES_BREAK(100);
|
||||
inline constexpr TypedWhichId<SwFormatContent> RES_CNTNT(101);
|
||||
inline constexpr TypedWhichId<SwFormatHeader> RES_HEADER(102);
|
||||
inline constexpr TypedWhichId<SwFormatFooter> RES_FOOTER(103);
|
||||
inline constexpr TypedWhichId<SvxPrintItem> RES_PRINT(104);
|
||||
inline constexpr TypedWhichId<SvxOpaqueItem> RES_OPAQUE(105);
|
||||
inline constexpr TypedWhichId<SvxProtectItem> RES_PROTECT(106);
|
||||
inline constexpr TypedWhichId<SwFormatSurround> RES_SURROUND(107);
|
||||
inline constexpr TypedWhichId<SwFormatVertOrient> RES_VERT_ORIENT(108);
|
||||
inline constexpr TypedWhichId<SwFormatHoriOrient> RES_HORI_ORIENT(109);
|
||||
inline constexpr TypedWhichId<SwFormatAnchor> RES_ANCHOR(110);
|
||||
inline constexpr TypedWhichId<SvxBrushItem> RES_BACKGROUND(111);
|
||||
inline constexpr TypedWhichId<SvxBoxItem> RES_BOX(112);
|
||||
inline constexpr TypedWhichId<SvxShadowItem> RES_SHADOW(113);
|
||||
inline constexpr TypedWhichId<SvxMacroItem> RES_FRMMACRO(114);
|
||||
inline constexpr TypedWhichId<SwFormatCol> RES_COL(115);
|
||||
inline constexpr TypedWhichId<SvxFormatKeepItem> RES_KEEP(116);
|
||||
inline constexpr TypedWhichId<SwFormatURL> RES_URL(117);
|
||||
inline constexpr TypedWhichId<SwFormatEditInReadonly> RES_EDIT_IN_READONLY(118);
|
||||
inline constexpr TypedWhichId<SwFormatLayoutSplit> RES_LAYOUT_SPLIT(119);
|
||||
inline constexpr TypedWhichId<SwFormatChain> RES_CHAIN(120);
|
||||
inline constexpr TypedWhichId<SwTextGridItem> RES_TEXTGRID(121);
|
||||
inline constexpr TypedWhichId<SwFormatLineNumber> RES_LINENUMBER(122);
|
||||
inline constexpr TypedWhichId<SwFormatFootnoteAtTextEnd> RES_FTN_AT_TXTEND(123);
|
||||
inline constexpr TypedWhichId<SwFormatEndAtTextEnd> RES_END_AT_TXTEND(124);
|
||||
inline constexpr TypedWhichId<SwFormatNoBalancedColumns> RES_COLUMNBALANCE(125);
|
||||
inline constexpr TypedWhichId<SvxFrameDirectionItem> RES_FRAMEDIR(126);
|
||||
inline constexpr TypedWhichId<SwHeaderAndFooterEatSpacingItem> RES_HEADER_FOOTER_EAT_SPACING(127);
|
||||
inline constexpr TypedWhichId<SwFormatRowSplit> RES_ROW_SPLIT(128);
|
||||
inline constexpr TypedWhichId<SwFormatFlySplit> RES_FLY_SPLIT(129);
|
||||
inline constexpr TypedWhichId<SwFormatFollowTextFlow> RES_FOLLOW_TEXT_FLOW(130);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_COLLAPSING_BORDERS(131);
|
||||
inline constexpr TypedWhichId<SwFormatWrapInfluenceOnObjPos> RES_WRAP_INFLUENCE_ON_OBJPOS(132);
|
||||
inline constexpr TypedWhichId<SwFormatAutoFormat> RES_AUTO_STYLE(133);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FRMATR_STYLE_NAME(134);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FRMATR_CONDITIONAL_STYLE_NAME(135);
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> RES_FRMATR_GRABBAG(136);
|
||||
inline constexpr TypedWhichId<SdrTextVertAdjustItem> RES_TEXT_VERT_ADJUST(137);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_BACKGROUND_FULL_SIZE(138);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_RTL_GUTTER(139);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_DECORATIVE(140);
|
||||
inline constexpr TypedWhichId<SwFormatWrapTextAtFlyStart> RES_WRAP_TEXT_AT_FLY_START(141);
|
||||
inline constexpr sal_uInt16 RES_FRMATR_END(142);
|
||||
inline constexpr TypedWhichId<SwFormatFillOrder> RES_FILL_ORDER(RES_FRMATR_BEGIN + 0);
|
||||
inline constexpr TypedWhichId<SwFormatFrameSize> RES_FRM_SIZE(RES_FRMATR_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SvxPaperBinItem> RES_PAPER_BIN(RES_FRMATR_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SvxFirstLineIndentItem> RES_MARGIN_FIRSTLINE(RES_FRMATR_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SvxTextLeftMarginItem> RES_MARGIN_TEXTLEFT(RES_FRMATR_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SvxRightMarginItem> RES_MARGIN_RIGHT(RES_FRMATR_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SvxLeftMarginItem> RES_MARGIN_LEFT(RES_FRMATR_BEGIN + 6);
|
||||
inline constexpr TypedWhichId<SvxGutterLeftMarginItem> RES_MARGIN_GUTTER(RES_FRMATR_BEGIN + 7);
|
||||
inline constexpr TypedWhichId<SvxGutterRightMarginItem> RES_MARGIN_GUTTER_RIGHT(RES_FRMATR_BEGIN
|
||||
+ 8);
|
||||
inline constexpr TypedWhichId<SvxLRSpaceItem> RES_LR_SPACE(RES_FRMATR_BEGIN + 9);
|
||||
inline constexpr TypedWhichId<SvxULSpaceItem> RES_UL_SPACE(RES_FRMATR_BEGIN + 10);
|
||||
inline constexpr TypedWhichId<SwFormatPageDesc> RES_PAGEDESC(RES_FRMATR_BEGIN + 11);
|
||||
inline constexpr TypedWhichId<SvxFormatBreakItem> RES_BREAK(RES_FRMATR_BEGIN + 12);
|
||||
inline constexpr TypedWhichId<SwFormatContent> RES_CNTNT(RES_FRMATR_BEGIN + 13);
|
||||
inline constexpr TypedWhichId<SwFormatHeader> RES_HEADER(RES_FRMATR_BEGIN + 14);
|
||||
inline constexpr TypedWhichId<SwFormatFooter> RES_FOOTER(RES_FRMATR_BEGIN + 15);
|
||||
inline constexpr TypedWhichId<SvxPrintItem> RES_PRINT(RES_FRMATR_BEGIN + 16);
|
||||
inline constexpr TypedWhichId<SvxOpaqueItem> RES_OPAQUE(RES_FRMATR_BEGIN + 17);
|
||||
inline constexpr TypedWhichId<SvxProtectItem> RES_PROTECT(RES_FRMATR_BEGIN + 18);
|
||||
inline constexpr TypedWhichId<SwFormatSurround> RES_SURROUND(RES_FRMATR_BEGIN + 19);
|
||||
inline constexpr TypedWhichId<SwFormatVertOrient> RES_VERT_ORIENT(RES_FRMATR_BEGIN + 20);
|
||||
inline constexpr TypedWhichId<SwFormatHoriOrient> RES_HORI_ORIENT(RES_FRMATR_BEGIN + 21);
|
||||
inline constexpr TypedWhichId<SwFormatAnchor> RES_ANCHOR(RES_FRMATR_BEGIN + 22);
|
||||
inline constexpr TypedWhichId<SvxBrushItem> RES_BACKGROUND(RES_FRMATR_BEGIN + 23);
|
||||
inline constexpr TypedWhichId<SvxBoxItem> RES_BOX(RES_FRMATR_BEGIN + 24);
|
||||
inline constexpr TypedWhichId<SvxShadowItem> RES_SHADOW(RES_FRMATR_BEGIN + 25);
|
||||
inline constexpr TypedWhichId<SvxMacroItem> RES_FRMMACRO(RES_FRMATR_BEGIN + 26);
|
||||
inline constexpr TypedWhichId<SwFormatCol> RES_COL(RES_FRMATR_BEGIN + 27);
|
||||
inline constexpr TypedWhichId<SvxFormatKeepItem> RES_KEEP(RES_FRMATR_BEGIN + 28);
|
||||
inline constexpr TypedWhichId<SwFormatURL> RES_URL(RES_FRMATR_BEGIN + 29);
|
||||
inline constexpr TypedWhichId<SwFormatEditInReadonly> RES_EDIT_IN_READONLY(RES_FRMATR_BEGIN + 30);
|
||||
inline constexpr TypedWhichId<SwFormatLayoutSplit> RES_LAYOUT_SPLIT(RES_FRMATR_BEGIN + 31);
|
||||
inline constexpr TypedWhichId<SwFormatChain> RES_CHAIN(RES_FRMATR_BEGIN + 32);
|
||||
inline constexpr TypedWhichId<SwTextGridItem> RES_TEXTGRID(RES_FRMATR_BEGIN + 33);
|
||||
inline constexpr TypedWhichId<SwFormatLineNumber> RES_LINENUMBER(RES_FRMATR_BEGIN + 34);
|
||||
inline constexpr TypedWhichId<SwFormatFootnoteAtTextEnd> RES_FTN_AT_TXTEND(RES_FRMATR_BEGIN + 35);
|
||||
inline constexpr TypedWhichId<SwFormatEndAtTextEnd> RES_END_AT_TXTEND(RES_FRMATR_BEGIN + 36);
|
||||
inline constexpr TypedWhichId<SwFormatNoBalancedColumns> RES_COLUMNBALANCE(RES_FRMATR_BEGIN + 37);
|
||||
inline constexpr TypedWhichId<SvxFrameDirectionItem> RES_FRAMEDIR(RES_FRMATR_BEGIN + 38);
|
||||
inline constexpr TypedWhichId<SwHeaderAndFooterEatSpacingItem>
|
||||
RES_HEADER_FOOTER_EAT_SPACING(RES_FRMATR_BEGIN + 39);
|
||||
inline constexpr TypedWhichId<SwFormatRowSplit> RES_ROW_SPLIT(RES_FRMATR_BEGIN + 40);
|
||||
inline constexpr TypedWhichId<SwFormatFlySplit> RES_FLY_SPLIT(RES_FRMATR_BEGIN + 41);
|
||||
inline constexpr TypedWhichId<SwFormatFollowTextFlow> RES_FOLLOW_TEXT_FLOW(RES_FRMATR_BEGIN + 42);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_COLLAPSING_BORDERS(RES_FRMATR_BEGIN + 43);
|
||||
inline constexpr TypedWhichId<SwFormatWrapInfluenceOnObjPos>
|
||||
RES_WRAP_INFLUENCE_ON_OBJPOS(RES_FRMATR_BEGIN + 44);
|
||||
inline constexpr TypedWhichId<SwFormatAutoFormat> RES_AUTO_STYLE(RES_FRMATR_BEGIN + 45);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FRMATR_STYLE_NAME(RES_FRMATR_BEGIN + 46);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FRMATR_CONDITIONAL_STYLE_NAME(RES_FRMATR_BEGIN
|
||||
+ 47);
|
||||
inline constexpr TypedWhichId<SfxGrabBagItem> RES_FRMATR_GRABBAG(RES_FRMATR_BEGIN + 48);
|
||||
inline constexpr TypedWhichId<SdrTextVertAdjustItem> RES_TEXT_VERT_ADJUST(RES_FRMATR_BEGIN + 49);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_BACKGROUND_FULL_SIZE(RES_FRMATR_BEGIN + 50);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_RTL_GUTTER(RES_FRMATR_BEGIN + 51);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_DECORATIVE(RES_FRMATR_BEGIN + 52);
|
||||
inline constexpr TypedWhichId<SwFormatWrapTextAtFlyStart>
|
||||
RES_WRAP_TEXT_AT_FLY_START(RES_FRMATR_BEGIN + 53);
|
||||
inline constexpr sal_uInt16 RES_FRMATR_END(RES_FRMATR_BEGIN + 54);
|
||||
|
||||
inline constexpr sal_uInt16 RES_GRFATR_BEGIN(RES_FRMATR_END);
|
||||
inline constexpr TypedWhichId<SwMirrorGrf> RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN);
|
||||
inline constexpr TypedWhichId<SwCropGrf> RES_GRFATR_CROPGRF(143);
|
||||
inline constexpr TypedWhichId<SwMirrorGrf> RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN + 0);
|
||||
inline constexpr TypedWhichId<SwCropGrf> RES_GRFATR_CROPGRF(RES_GRFATR_BEGIN + 1);
|
||||
|
||||
inline constexpr TypedWhichId<SwRotationGrf> RES_GRFATR_ROTATION(144);
|
||||
inline constexpr TypedWhichId<SwLuminanceGrf> RES_GRFATR_LUMINANCE(145);
|
||||
inline constexpr TypedWhichId<SwContrastGrf> RES_GRFATR_CONTRAST(146);
|
||||
inline constexpr TypedWhichId<SwChannelRGrf> RES_GRFATR_CHANNELR(147);
|
||||
inline constexpr TypedWhichId<SwChannelGGrf> RES_GRFATR_CHANNELG(148);
|
||||
inline constexpr TypedWhichId<SwChannelBGrf> RES_GRFATR_CHANNELB(149);
|
||||
inline constexpr TypedWhichId<SwGammaGrf> RES_GRFATR_GAMMA(150);
|
||||
inline constexpr TypedWhichId<SwInvertGrf> RES_GRFATR_INVERT(151);
|
||||
inline constexpr TypedWhichId<SwTransparencyGrf> RES_GRFATR_TRANSPARENCY(152);
|
||||
inline constexpr TypedWhichId<SwDrawModeGrf> RES_GRFATR_DRAWMODE(153);
|
||||
inline constexpr TypedWhichId<SwRotationGrf> RES_GRFATR_ROTATION(RES_GRFATR_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SwLuminanceGrf> RES_GRFATR_LUMINANCE(RES_GRFATR_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SwContrastGrf> RES_GRFATR_CONTRAST(RES_GRFATR_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SwChannelRGrf> RES_GRFATR_CHANNELR(RES_GRFATR_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SwChannelGGrf> RES_GRFATR_CHANNELG(RES_GRFATR_BEGIN + 6);
|
||||
inline constexpr TypedWhichId<SwChannelBGrf> RES_GRFATR_CHANNELB(RES_GRFATR_BEGIN + 7);
|
||||
inline constexpr TypedWhichId<SwGammaGrf> RES_GRFATR_GAMMA(RES_GRFATR_BEGIN + 8);
|
||||
inline constexpr TypedWhichId<SwInvertGrf> RES_GRFATR_INVERT(RES_GRFATR_BEGIN + 9);
|
||||
inline constexpr TypedWhichId<SwTransparencyGrf> RES_GRFATR_TRANSPARENCY(RES_GRFATR_BEGIN + 10);
|
||||
inline constexpr TypedWhichId<SwDrawModeGrf> RES_GRFATR_DRAWMODE(RES_GRFATR_BEGIN + 11);
|
||||
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY4(154);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY5(155);
|
||||
inline constexpr sal_uInt16 RES_GRFATR_END(156);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY4(RES_GRFATR_BEGIN + 12);
|
||||
inline constexpr TypedWhichId<SfxBoolItem> RES_GRFATR_DUMMY5(RES_GRFATR_BEGIN + 13);
|
||||
inline constexpr sal_uInt16 RES_GRFATR_END(RES_GRFATR_BEGIN + 14);
|
||||
|
||||
inline constexpr sal_uInt16 RES_BOXATR_BEGIN(RES_GRFATR_END);
|
||||
inline constexpr TypedWhichId<SwTableBoxNumFormat> RES_BOXATR_FORMAT(RES_BOXATR_BEGIN);
|
||||
inline constexpr TypedWhichId<SwTableBoxFormula> RES_BOXATR_FORMULA(157);
|
||||
inline constexpr TypedWhichId<SwTableBoxValue> RES_BOXATR_VALUE(158);
|
||||
inline constexpr sal_uInt16 RES_BOXATR_END(159);
|
||||
inline constexpr TypedWhichId<SwTableBoxNumFormat> RES_BOXATR_FORMAT(RES_BOXATR_BEGIN + 0);
|
||||
inline constexpr TypedWhichId<SwTableBoxFormula> RES_BOXATR_FORMULA(RES_BOXATR_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SwTableBoxValue> RES_BOXATR_VALUE(RES_BOXATR_BEGIN + 2);
|
||||
inline constexpr sal_uInt16 RES_BOXATR_END(RES_BOXATR_BEGIN + 3);
|
||||
|
||||
inline constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END);
|
||||
inline constexpr TypedWhichId<SvXMLAttrContainerItem>
|
||||
RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN);
|
||||
inline constexpr sal_uInt16 RES_UNKNOWNATR_END(160);
|
||||
inline constexpr TypedWhichId<SvXMLAttrContainerItem> RES_UNKNOWNATR_CONTAINER(RES_UNKNOWNATR_BEGIN
|
||||
+ 0);
|
||||
inline constexpr sal_uInt16 RES_UNKNOWNATR_END(RES_UNKNOWNATR_BEGIN + 1);
|
||||
|
||||
inline constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END);
|
||||
|
||||
// Format IDs
|
||||
inline constexpr sal_uInt16 RES_FMT_BEGIN(RES_UNKNOWNATR_END);
|
||||
inline constexpr TypedWhichId<SwCharFormat> RES_CHRFMT(RES_FMT_BEGIN);
|
||||
inline constexpr TypedWhichId<SwFrameFormat> RES_FRMFMT(161);
|
||||
inline constexpr TypedWhichId<SwFlyFrameFormat> RES_FLYFRMFMT(162);
|
||||
inline constexpr TypedWhichId<SwTextFormatColl> RES_TXTFMTCOLL(163);
|
||||
inline constexpr TypedWhichId<SwGrfFormatColl> RES_GRFFMTCOLL(164);
|
||||
inline constexpr TypedWhichId<SwDrawFrameFormat> RES_DRAWFRMFMT(165);
|
||||
inline constexpr TypedWhichId<SwConditionTextFormatColl> RES_CONDTXTFMTCOLL(166);
|
||||
inline constexpr sal_uInt16 RES_FMT_END(167);
|
||||
inline constexpr TypedWhichId<SwCharFormat> RES_CHRFMT(RES_FMT_BEGIN + 0);
|
||||
inline constexpr TypedWhichId<SwFrameFormat> RES_FRMFMT(RES_FMT_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SwFlyFrameFormat> RES_FLYFRMFMT(RES_FMT_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SwTextFormatColl> RES_TXTFMTCOLL(RES_FMT_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SwGrfFormatColl> RES_GRFFMTCOLL(RES_FMT_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<SwDrawFrameFormat> RES_DRAWFRMFMT(RES_FMT_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SwConditionTextFormatColl> RES_CONDTXTFMTCOLL(RES_FMT_BEGIN + 6);
|
||||
inline constexpr sal_uInt16 RES_FMT_END(RES_FMT_BEGIN + 7);
|
||||
|
||||
// ID's for Messages in the Formats
|
||||
inline constexpr sal_uInt16 RES_FORMAT_MSG_BEGIN(RES_FMT_END);
|
||||
inline constexpr sal_uInt16 RES_UPDATEATTR_FMT_CHG(
|
||||
167); // used by SwUpdateAttr just as an ID to communicate what has changed
|
||||
RES_FORMAT_MSG_BEGIN + 0); // used by SwUpdateAttr just as an ID to communicate what has changed
|
||||
inline constexpr sal_uInt16 RES_UPDATEATTR_ATTRSET_CHG(
|
||||
168); // used by SwUpdateAttr just as an ID to communicate what has changed
|
||||
RES_FORMAT_MSG_BEGIN + 1); // used by SwUpdateAttr just as an ID to communicate what has changed
|
||||
inline constexpr sal_uInt16 RES_UPDATEATTR_OBJECTDYING(
|
||||
169); // used by SwUpdateAttr just as an ID to communicate what has changed
|
||||
RES_FORMAT_MSG_BEGIN + 2); // used by SwUpdateAttr just as an ID to communicate what has changed
|
||||
// empty
|
||||
inline constexpr sal_uInt16 RES_FORMAT_MSG_END(190);
|
||||
inline constexpr sal_uInt16 RES_FORMAT_MSG_END(RES_FORMAT_MSG_BEGIN + 3);
|
||||
|
||||
// An ID for the RTF-reader. The stylesheets are treated like attributes,
|
||||
// i.e. there is a StyleSheet-attribute. To avoid collision with other
|
||||
// Which()-values, the value is listed here. (The help system too defines
|
||||
// new attributes!)
|
||||
inline constexpr sal_uInt16 RES_FLTRATTR_BEGIN(RES_FORMAT_MSG_END);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FLTR_BOOKMARK(RES_FLTRATTR_BEGIN);
|
||||
inline constexpr TypedWhichId<SwFltAnchor> RES_FLTR_ANCHOR(191);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FLTR_NUMRULE(192);
|
||||
inline constexpr TypedWhichId<SwFltTOX> RES_FLTR_TOX(193);
|
||||
inline constexpr TypedWhichId<SwFltRedline> RES_FLTR_REDLINE(194);
|
||||
inline constexpr TypedWhichId<CntUInt16Item> RES_FLTR_ANNOTATIONMARK(195);
|
||||
inline constexpr TypedWhichId<SwFltRDFMark> RES_FLTR_RDFMARK(196);
|
||||
inline constexpr sal_uInt16 RES_FLTRATTR_END(197);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FLTR_BOOKMARK(RES_FLTRATTR_BEGIN + 0);
|
||||
inline constexpr TypedWhichId<SwFltAnchor> RES_FLTR_ANCHOR(RES_FLTRATTR_BEGIN + 1);
|
||||
inline constexpr TypedWhichId<SfxStringItem> RES_FLTR_NUMRULE(RES_FLTRATTR_BEGIN + 2);
|
||||
inline constexpr TypedWhichId<SwFltTOX> RES_FLTR_TOX(RES_FLTRATTR_BEGIN + 3);
|
||||
inline constexpr TypedWhichId<SwFltRedline> RES_FLTR_REDLINE(RES_FLTRATTR_BEGIN + 4);
|
||||
inline constexpr TypedWhichId<CntUInt16Item> RES_FLTR_ANNOTATIONMARK(RES_FLTRATTR_BEGIN + 5);
|
||||
inline constexpr TypedWhichId<SwFltRDFMark> RES_FLTR_RDFMARK(RES_FLTRATTR_BEGIN + 6);
|
||||
inline constexpr sal_uInt16 RES_FLTRATTR_END(RES_FLTRATTR_BEGIN + 7);
|
||||
|
||||
inline constexpr sal_uInt16 RES_TBX_DUMMY(RES_FLTRATTR_END + 1);
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
#define RID_CHAR_ROTATION NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Rotation")
|
||||
#define RID_CHAR_ROTATION_IS_FIT_TO_LINE NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Rotation is Fit To Line")
|
||||
#define RID_CHAR_SCALE_WIDTH NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Scale Width")
|
||||
#define RID_CHAR_SCRIPT_HINT NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Script Type Hint")
|
||||
#define RID_CHAR_SHADING_VALUE NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Shading Value")
|
||||
#define RID_CHAR_SHADOW_FORMAT NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Shadow Format")
|
||||
#define RID_CHAR_SHADOWED NC_("RID_ATTRIBUTE_NAMES_MAP", "Char Shadowed")
|
||||
|
||||
@@ -50,6 +50,7 @@ class SvxCharScaleWidthItem;
|
||||
class SvxCharRotateItem;
|
||||
class SvxCharReliefItem;
|
||||
class SvxCharHiddenItem;
|
||||
class SvxScriptHintItem;
|
||||
|
||||
// Frame attributes
|
||||
class SwFormatFillOrder;
|
||||
@@ -241,6 +242,7 @@ public:
|
||||
inline const SvxCharRotateItem &GetCharRotate( bool = true ) const;
|
||||
inline const SvxCharReliefItem &GetCharRelief( bool = true ) const;
|
||||
inline const SvxCharHiddenItem &GetCharHidden( bool = true ) const;
|
||||
inline const SvxScriptHintItem& GetCharScriptTypeHint(bool = true) const;
|
||||
|
||||
// Frame attributes. Implementation in frmatr.hxx.
|
||||
inline const SwFormatFillOrder &GetFillOrder( bool = true ) const;
|
||||
|
||||
@@ -136,6 +136,7 @@ inline constexpr OUString UNO_NAME_CHAR_UNDERLINE_COMPLEX_COLOR = u"CharUnderlin
|
||||
inline constexpr OUString UNO_NAME_CHAR_UNDERLINE_HAS_COLOR = u"CharUnderlineHasColor"_ustr;
|
||||
inline constexpr OUString UNO_NAME_CHAR_ESCAPEMENT = u"CharEscapement"_ustr;
|
||||
inline constexpr OUString UNO_NAME_CHAR_CASE_MAP = u"CharCaseMap"_ustr;
|
||||
inline constexpr OUString UNO_NAME_CHAR_SCRIPT_HINT = u"CharScriptHint"_ustr;
|
||||
inline constexpr OUString UNO_NAME_CHAR_STRIKEOUT = u"CharStrikeout"_ustr;
|
||||
inline constexpr OUString UNO_NAME_CHAR_CROSSED_OUT = u"CharCrossedOut"_ustr;
|
||||
inline constexpr OUString UNO_NAME_CHAR_NO_HYPHENATION = u"CharNoHyphenation"_ustr;
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:creation-date>2025-06-03T21:19:25.463600687</meta:creation-date><dc:date>2025-06-03T21:22:20.559745510</dc:date><meta:editing-duration>PT2M54S</meta:editing-duration><meta:editing-cycles>4</meta:editing-cycles><meta:generator>LibreOfficeDev/25.8.0.0.alpha1$Linux_X86_64 LibreOffice_project/3b18a0e6448ea669f9e1ce167be50183bb21da3b</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="4" meta:word-count="8" meta:character-count="48" meta:non-whitespace-character-count="44"/></office:meta>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Noto Sans1" svg:font-family="'Noto Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Noto Sans2" svg:font-family="'Noto Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="CA" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" fo:hyphenation-keep="auto" loext:hyphenation-keep-type="column" loext:hyphenation-keep-line="false" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="CA" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text"/>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties style:font-name="Noto Sans2" fo:language="en" fo:country="US" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="24pt" style:script-type="complex"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties style:script-type="latin"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
|
||||
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style/>
|
||||
<style:footer-style/>
|
||||
</style:page-layout>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1"/>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
|
||||
</text:sequence-decls>
|
||||
<text:p text:style-name="P1"><text:span>“Test” “Test”</text:span></text:p>
|
||||
<text:p text:style-name="P1"><text:span>“Test” “परीक्षा”</text:span></text:p>
|
||||
<text:p text:style-name="P1"><text:span>“परीक्षा” “Test”</text:span></text:p>
|
||||
<text:p text:style-name="P1"><text:span>“परीक्षा” <text:span text:style-name="T1">“परीक्षा”</text:span></text:span></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -0,0 +1,128 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.text">
|
||||
<office:meta><meta:creation-date>2025-06-03T21:19:25.463600687</meta:creation-date><dc:date>2025-06-06T16:29:30.257240206</dc:date><meta:editing-duration>PT3M39S</meta:editing-duration><meta:editing-cycles>5</meta:editing-cycles><meta:generator>LibreOfficeDev/25.8.0.0.alpha1$Linux_X86_64 LibreOffice_project/937ffa0c72a0eae613db96db2c124a7677dcccdc</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/></office:meta>
|
||||
<office:font-face-decls>
|
||||
<style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Noto Sans1" svg:font-family="'Noto Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Noto Sans2" svg:font-family="'Noto Sans'" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
|
||||
<style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
|
||||
</office:font-face-decls>
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphic">
|
||||
<style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="false"/>
|
||||
<style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:font-independent-line-spacing="false">
|
||||
<style:tab-stops/>
|
||||
</style:paragraph-properties>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="CA" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="paragraph">
|
||||
<style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" fo:hyphenation-keep="auto" loext:hyphenation-keep-type="column" loext:hyphenation-keep-line="false" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
|
||||
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="CA" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table">
|
||||
<style:table-properties table:border-model="collapsing"/>
|
||||
</style:default-style>
|
||||
<style:default-style style:family="table-row">
|
||||
<style:table-row-properties fo:keep-together="auto"/>
|
||||
</style:default-style>
|
||||
<style:style style:name="Standard" style:family="paragraph" style:class="text"/>
|
||||
<text:outline-style style:name="Outline">
|
||||
<text:outline-level-style text:level="1" loext:num-list-format="%1%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="2" loext:num-list-format="%2%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="3" loext:num-list-format="%3%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="4" loext:num-list-format="%4%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="5" loext:num-list-format="%5%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="6" loext:num-list-format="%6%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="7" loext:num-list-format="%7%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="8" loext:num-list-format="%8%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="9" loext:num-list-format="%9%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
<text:outline-level-style text:level="10" loext:num-list-format="%10%" style:num-format="">
|
||||
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
|
||||
<style:list-level-label-alignment text:label-followed-by="listtab"/>
|
||||
</style:list-level-properties>
|
||||
</text:outline-level-style>
|
||||
</text:outline-style>
|
||||
<text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
|
||||
<text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
|
||||
<text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
|
||||
</office:styles>
|
||||
<office:automatic-styles>
|
||||
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
|
||||
<style:text-properties style:font-name="Noto Sans2" fo:language="en" fo:country="US" style:language-asian="zxx" style:country-asian="none" style:font-size-complex="24pt" style:script-type="complex"/>
|
||||
</style:style>
|
||||
<style:style style:name="T1" style:family="text">
|
||||
<style:text-properties style:script-type="latin"/>
|
||||
</style:style>
|
||||
<style:style style:name="gr1" style:family="graphic">
|
||||
<style:graphic-properties draw:stroke="none" svg:stroke-color="#000000" draw:fill="none" draw:fill-color="#ffffff" fo:min-height="10.368cm" loext:decorative="false" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph"/>
|
||||
</style:style>
|
||||
<style:page-layout style:name="pm1">
|
||||
<style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
|
||||
<style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
|
||||
</style:page-layout-properties>
|
||||
<style:header-style/>
|
||||
<style:footer-style/>
|
||||
</style:page-layout>
|
||||
<style:style style:name="dp1" style:family="drawing-page">
|
||||
<style:drawing-page-properties draw:background-size="full"/>
|
||||
</style:style>
|
||||
</office:automatic-styles>
|
||||
<office:master-styles>
|
||||
<style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
|
||||
</office:master-styles>
|
||||
<office:body>
|
||||
<office:text>
|
||||
<text:sequence-decls>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Table"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Text"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
|
||||
</text:sequence-decls>
|
||||
<text:p><draw:frame text:anchor-type="paragraph" draw:z-index="0" draw:name="Text Frame 1" draw:style-name="gr1" draw:text-style-name="P3" svg:width="13.479cm" svg:height="10.369cm" svg:x="0.997cm" svg:y="1.071cm">
|
||||
<draw:text-box>
|
||||
<text:p text:style-name="P1">“Test” “Test”</text:p>
|
||||
<text:p text:style-name="P1">“Test” “परीक्षा”</text:p>
|
||||
<text:p text:style-name="P1">“परीक्षा” “Test”</text:p>
|
||||
<text:p text:style-name="P1">“परीक्षा” <text:span text:style-name="T1">“परीक्षा”</text:span></text:p>
|
||||
</draw:text-box>
|
||||
</draw:frame></text:p>
|
||||
</office:text>
|
||||
</office:body>
|
||||
</office:document>
|
||||
@@ -1518,6 +1518,32 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf71583)
|
||||
assertXPathNodeName(pXmlDoc, "//office:body/office:text/text:p/*[1]", "page-count-range");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf166011)
|
||||
{
|
||||
// Verifies that style:script-type correctly round-trips
|
||||
loadAndReload("tdf166011.fodt");
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "//style:style[@style:name='P1']/style:text-properties", "script-type",
|
||||
u"complex");
|
||||
assertXPath(pXmlDoc, "//style:style[@style:name='T1']/style:text-properties", "script-type",
|
||||
u"latin");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(Test, testTdf166011ee)
|
||||
{
|
||||
// Verifies that style:script-type correctly round-trips with Edit Engine
|
||||
loadAndReload("tdf166011ee.fodt");
|
||||
CPPUNIT_ASSERT_EQUAL(1, getPages());
|
||||
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
|
||||
|
||||
assertXPath(pXmlDoc, "//style:style[@style:name='T1']/style:text-properties", "script-type",
|
||||
u"complex");
|
||||
assertXPath(pXmlDoc, "//style:style[@style:name='T2']/style:text-properties", "script-type",
|
||||
u"latin");
|
||||
}
|
||||
|
||||
} // end of anonymous namespace
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <svx/svxids.hrc>
|
||||
|
||||
#include <editeng/eeitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/wghtitem.hxx>
|
||||
#include <IDocumentDrawModelAccess.hxx>
|
||||
#include <IDocumentRedlineAccess.hxx>
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <svl/grabbagitem.hxx>
|
||||
#include <svl/voiditem.hxx>
|
||||
#include <editeng/scriptspaceitem.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
#include <editeng/shaditem.hxx>
|
||||
#include <editeng/shdditem.hxx>
|
||||
#include <editeng/spltitem.hxx>
|
||||
@@ -329,6 +330,7 @@ ItemInfoPackage& getItemInfoPackageSwAttributes()
|
||||
// CharacterAttr - MSWord weak char direction/script override emulation
|
||||
{ RES_CHRATR_BIDIRTL, new SfxInt16Item( RES_CHRATR_BIDIRTL, sal_Int16(-1) ), 0, SFX_ITEMINFOFLAG_NONE },
|
||||
{ RES_CHRATR_IDCTHINT, new SfxInt16Item( RES_CHRATR_IDCTHINT, sal_Int16(-1) ), 0, SFX_ITEMINFOFLAG_NONE },
|
||||
{ RES_CHRATR_SCRIPT_HINT, new SvxScriptHintItem( RES_CHRATR_SCRIPT_HINT ), SID_ATTR_CHAR_SCRIPT_HINT, SFX_ITEMINFOFLAG_NONE },
|
||||
|
||||
{ RES_TXTATR_REFMARK, new SwFormatRefMark( SwMarkName() ), 0, SFX_ITEMINFOFLAG_NONE },
|
||||
{ RES_TXTATR_TOXMARK, createSwTOXMarkForItemInfoPackage(), 0, SFX_ITEMINFOFLAG_NONE },
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWFNTCCH_HXX
|
||||
#define INCLUDED_SW_SOURCE_CORE_INC_SWFNTCCH_HXX
|
||||
|
||||
#define NUM_DEFAULT_VALUES 39
|
||||
#define NUM_DEFAULT_VALUES 40
|
||||
|
||||
#include "swcache.hxx"
|
||||
#include "swfont.hxx"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#define NUM_ATTRIBUTE_STACKS 45
|
||||
#define NUM_ATTRIBUTE_STACKS 46
|
||||
|
||||
#include <vector>
|
||||
#include <swfntcch.hxx>
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
* stack, the top most attribute on the stack is valid. Because some
|
||||
* kinds of attributes have to be pushed to the same stacks we map their
|
||||
* ids to stack ids
|
||||
* Attention: The first NUM_DEFAULT_VALUES ( defined in swfntcch.hxx )
|
||||
* Attention: Stacks for character attributes (RES_CHRATR_*)
|
||||
* are stored in the defaultitem-cache, if you add one, you have to increase
|
||||
* NUM_DEFAULT_VALUES.
|
||||
* NUM_DEFAULT_VALUES (defined in swfntcch.hxx), and ensure your new stack id
|
||||
* is below this number.
|
||||
* Also adjust NUM_ATTRIBUTE_STACKS in atrhndl.hxx.
|
||||
*/
|
||||
const sal_uInt8 StackPos[ RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN + 1 ] =
|
||||
@@ -114,17 +115,18 @@ const sal_uInt8 StackPos[ RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN + 1 ] =
|
||||
0, // RES_CHRATR_GRABBAG, // 43
|
||||
0, // RES_CHRATR_BIDIRTL, // 44
|
||||
0, // RES_CHRATR_IDCTHINT, // 45
|
||||
39, // RES_TXTATR_REFMARK, // 46
|
||||
40, // RES_TXTATR_TOXMARK, // 47
|
||||
41, // RES_TXTATR_META, // 48
|
||||
41, // RES_TXTATR_METAFIELD, // 49
|
||||
0, // RES_TXTATR_AUTOFMT, // 50
|
||||
0, // RES_TXTATR_INETFMT // 51
|
||||
0, // RES_TXTATR_CHARFMT, // 52
|
||||
42, // RES_TXTATR_CJK_RUBY, // 53
|
||||
0, // RES_TXTATR_UNKNOWN_CONTAINER, // 54
|
||||
43, // RES_TXTATR_INPUTFIELD // 55
|
||||
44, // RES_TXTATR_CONTENTCONTROL // 56
|
||||
39, // RES_CHRATR_SCRIPT_HINT, // 46
|
||||
40, // RES_TXTATR_REFMARK, // 47
|
||||
41, // RES_TXTATR_TOXMARK, // 48
|
||||
42, // RES_TXTATR_META, // 49
|
||||
42, // RES_TXTATR_METAFIELD, // 50
|
||||
0, // RES_TXTATR_AUTOFMT, // 51
|
||||
0, // RES_TXTATR_INETFMT // 52
|
||||
0, // RES_TXTATR_CHARFMT, // 53
|
||||
43, // RES_TXTATR_CJK_RUBY, // 54
|
||||
0, // RES_TXTATR_UNKNOWN_CONTAINER, // 55
|
||||
44, // RES_TXTATR_INPUTFIELD // 56
|
||||
45, // RES_TXTATR_CONTENTCONTROL // 57
|
||||
};
|
||||
|
||||
namespace CharFormat
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <editeng/adjustitem.hxx>
|
||||
#include <editeng/charhiddenitem.hxx>
|
||||
#include <editeng/escapementitem.hxx>
|
||||
#include <editeng/scripthintitem.hxx>
|
||||
#include <svl/asiancfg.hxx>
|
||||
#include <svl/languageoptions.hxx>
|
||||
#include <tools/multisel.hxx>
|
||||
@@ -1291,6 +1292,42 @@ void SwScriptInfo::InitScriptInfoHidden(const SwTextNode& rNode,
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
i18nutil::ScriptHintProvider lcl_FindScriptTypeHintSpans(const SwTextNode& rNode)
|
||||
{
|
||||
i18nutil::ScriptHintProvider stProvider;
|
||||
|
||||
const SvxScriptHintItem* pItem = rNode.GetSwAttrSet().GetItemIfSet(RES_CHRATR_SCRIPT_HINT);
|
||||
if (pItem)
|
||||
{
|
||||
stProvider.SetParagraphLevelHint(pItem->GetValue());
|
||||
}
|
||||
|
||||
const SwpHints* pHints = rNode.GetpSwpHints();
|
||||
if (pHints)
|
||||
{
|
||||
for (size_t nTmp = 0; nTmp < pHints->Count(); ++nTmp)
|
||||
{
|
||||
const SwTextAttr* pTextAttr = pHints->Get(nTmp);
|
||||
const SvxScriptHintItem* pCharItem
|
||||
= CharFormat::GetItem(*pTextAttr, RES_CHRATR_SCRIPT_HINT);
|
||||
if (pCharItem)
|
||||
{
|
||||
const sal_Int32 nSt = pTextAttr->GetStart();
|
||||
const sal_Int32 nEnd = *pTextAttr->End();
|
||||
if (nEnd > nSt)
|
||||
{
|
||||
stProvider.AddHint(pCharItem->GetValue(), nSt, nEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return stProvider;
|
||||
}
|
||||
}
|
||||
|
||||
void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
|
||||
sw::MergedPara const*const pMerged, bool bRTL)
|
||||
{
|
||||
@@ -1394,9 +1431,11 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
|
||||
m_CompressionChanges.end());
|
||||
|
||||
// Construct the script change scanner and advance it to the change range
|
||||
auto stScriptHints = lcl_FindScriptTypeHintSpans(rNode);
|
||||
auto pDirScanner = i18nutil::MakeDirectionChangeScanner(rText, m_nDefaultDir);
|
||||
auto pScriptScanner = i18nutil::MakeScriptChangeScanner(
|
||||
rText, SvtLanguageOptions::GetI18NScriptTypeOfLanguage(GetAppLanguage()), *pDirScanner);
|
||||
rText, SvtLanguageOptions::GetI18NScriptTypeOfLanguage(GetAppLanguage()), *pDirScanner,
|
||||
stScriptHints);
|
||||
while (!pScriptScanner->AtEnd())
|
||||
{
|
||||
if (static_cast<sal_Int32>(nChg) < pScriptScanner->Peek().m_nEndIndex)
|
||||
|
||||
@@ -309,6 +309,7 @@ std::span<const SfxItemPropertyMapEntry> SwUnoPropertyMapProvider::GetAutoCharS
|
||||
{ UNO_NAME_CHAR_BORDER_BOTTOM_COMPLEX_COLOR, RES_CHRATR_BOX, cppu::UnoType<css::util::XComplexColor>::get(), PropertyAttribute::MAYBEVOID, MID_BORDER_BOTTOM_COLOR },
|
||||
{ UNO_NAME_CHAR_SHADOW_FORMAT, RES_CHRATR_SHADOW, cppu::UnoType<css::table::ShadowFormat>::get(), PROPERTY_NONE, CONVERT_TWIPS},
|
||||
{ UNO_NAME_CHAR_STYLE_NAME, RES_TXTATR_CHARFMT, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0 },
|
||||
{ UNO_NAME_CHAR_SCRIPT_HINT, RES_CHRATR_SCRIPT_HINT, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::MAYBEVOID, MID_SCRIPTHINT },
|
||||
};
|
||||
|
||||
return aAutoCharStyleMap;
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
{ UNO_NAME_WRITING_MODE, RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, \
|
||||
{ UNO_NAME_CHAR_SHADING_VALUE, RES_CHRATR_BACKGROUND, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, MID_SHADING_VALUE }, \
|
||||
{ UNO_NAME_PARA_INTEROP_GRAB_BAG, RES_PARATR_GRABBAG, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PROPERTY_NONE, 0 }, \
|
||||
{ UNO_NAME_CHAR_SCRIPT_HINT, RES_CHRATR_SCRIPT_HINT, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::MAYBEVOID, MID_SCRIPTHINT }, \
|
||||
|
||||
#define COMMON_CRSR_PARA_PROPERTIES_WITHOUT_FN \
|
||||
COMMON_CRSR_PARA_PROPERTIES_WITHOUT_FN_01 \
|
||||
|
||||
@@ -3446,6 +3446,7 @@ SwAttrFnTab const aCSS1AttrFnTab = {
|
||||
/* RES_CHRATR_GRABBAG */ nullptr,
|
||||
/* RES_CHRATR_BIDIRTL */ nullptr,
|
||||
/* RES_CHRATR_IDCTHINT */ nullptr,
|
||||
/* RES_CHRATR_SCRIPT_HINT */ nullptr,
|
||||
|
||||
/* RES_TXTATR_REFMARK */ nullptr,
|
||||
/* RES_TXTATR_TOXMARK */ nullptr,
|
||||
|
||||
@@ -3323,6 +3323,7 @@ SwAttrFnTab aHTMLAttrFnTab = {
|
||||
/* RES_CHRATR_GRABBAG */ nullptr,
|
||||
/* RES_CHRATR_BIDIRTL */ nullptr,
|
||||
/* RES_CHRATR_IDCTHINT */ nullptr,
|
||||
/* RES_CHRATR_SCRIPT_HINT */ nullptr,
|
||||
|
||||
/* RES_TXTATR_REFMARK */ nullptr,
|
||||
/* RES_TXTATR_TOXMARK */ nullptr,
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#include <svx/hlnkitem.hxx>
|
||||
#include <sfx2/htmlmode.hxx>
|
||||
#include <editeng/langitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <swundo.hxx>
|
||||
#include <doc.hxx>
|
||||
#include <viewopt.hxx>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <editeng/sizeitem.hxx>
|
||||
#include <editeng/protitem.hxx>
|
||||
#include <svx/flagsdef.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <sfx2/objface.hxx>
|
||||
#include <fmturl.hxx>
|
||||
#include <fmthdft.hxx>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <svx/svxdlg.hxx>
|
||||
#include <sfx2/htmlmode.hxx>
|
||||
#include <editeng/langitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/writingmodeitem.hxx>
|
||||
#include <editeng/eeitem.hxx>
|
||||
#include <editeng/editdata.hxx>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <editeng/editeng.hxx>
|
||||
#include <editeng/editview.hxx>
|
||||
#include <editeng/eeitem.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <sfx2/bindings.hxx>
|
||||
#include <svx/fontwork.hxx>
|
||||
#include <sfx2/request.hxx>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <editeng/boxitem.hxx>
|
||||
#include <editeng/sizeitem.hxx>
|
||||
#include <editeng/svxacorr.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <sfx2/htmlmode.hxx>
|
||||
#include <svtools/htmlcfg.hxx>
|
||||
#include <com/sun/star/embed/Aspects.hpp>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <editeng/escapementitem.hxx>
|
||||
#include <editeng/pmdlitem.hxx>
|
||||
#include <sfx2/htmlmode.hxx>
|
||||
#include <editeng/scripttypeitem.hxx>
|
||||
#include <editeng/scriptsetitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <editeng/cmapitem.hxx>
|
||||
#include <editeng/nhypitem.hxx>
|
||||
|
||||
@@ -172,6 +172,7 @@ static OUString PropertyNametoRID(const OUString& rName)
|
||||
{ "CharRotation", RID_CHAR_ROTATION },
|
||||
{ "CharRotationIsFitToLine", RID_CHAR_ROTATION_IS_FIT_TO_LINE },
|
||||
{ "CharScaleWidth", RID_CHAR_SCALE_WIDTH },
|
||||
{ "CharScriptHint", RID_CHAR_SCRIPT_HINT },
|
||||
{ "CharShadingValue", RID_CHAR_SHADING_VALUE },
|
||||
{ "CharShadowFormat", RID_CHAR_SHADOW_FORMAT },
|
||||
{ "CharShadowed", RID_CHAR_SHADOWED },
|
||||
|
||||
@@ -112,6 +112,7 @@ inline constexpr OUString PROP_CharRightBorderDistance = u"CharRightBorderDistan
|
||||
inline constexpr OUString PROP_CharRotation = u"CharRotation"_ustr;
|
||||
inline constexpr OUString PROP_CharRotationIsFitToLine = u"CharRotationIsFitToLine"_ustr;
|
||||
inline constexpr OUString PROP_CharScaleWidth = u"CharScaleWidth"_ustr;
|
||||
inline constexpr OUString PROP_CharScriptHint = u"CharScriptHint"_ustr;
|
||||
inline constexpr OUString PROP_CharShadingValue = u"CharShadingValue"_ustr;
|
||||
inline constexpr OUString PROP_CharShadowFormat = u"CharShadowFormat"_ustr;
|
||||
inline constexpr OUString PROP_CharShadowed = u"CharShadowed"_ustr;
|
||||
|
||||
@@ -1719,6 +1719,7 @@ namespace xmloff::token {
|
||||
TOKEN( "script", XML_SCRIPT ),
|
||||
TOKEN( "script-asian", XML_SCRIPT_ASIAN ),
|
||||
TOKEN( "script-complex", XML_SCRIPT_COMPLEX ),
|
||||
TOKEN( "script-type", XML_SCRIPT_TYPE ),
|
||||
TOKEN( "scroll", XML_SCROLL ),
|
||||
TOKEN( "sdev", XML_SDEV ),
|
||||
TOKEN( "search-criteria-must-apply-to-whole-cell", XML_SEARCH_CRITERIA_MUST_APPLY_TO_WHOLE_CELL ),
|
||||
@@ -3584,6 +3585,10 @@ namespace xmloff::token {
|
||||
TOKEN("color-value", XML_COLOR_VALUE),
|
||||
TOKEN("color-type", XML_COLOR_TYPE),
|
||||
|
||||
TOKEN("latin", XML_LATIN),
|
||||
TOKEN("asian", XML_ASIAN),
|
||||
TOKEN("complex", XML_COMPLEX),
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
{ 0, nullptr, std::nullopt, XML_TOKEN_END }
|
||||
#else
|
||||
|
||||
@@ -122,6 +122,12 @@ SvXMLEnumMapEntry<sal_uInt16> const pXML_VertPos_Enum[] =
|
||||
{ XML_TOKEN_INVALID, 0 }
|
||||
};
|
||||
|
||||
SvXMLEnumMapEntry<sal_uInt16> const pXML_ScriptType_Enum[] = { { XML_IGNORE, 1U },
|
||||
{ XML_LATIN, 2U },
|
||||
{ XML_ASIAN, 3U },
|
||||
{ XML_COMPLEX, 4U },
|
||||
{ XML_TOKEN_INVALID, 0U } };
|
||||
|
||||
typedef std::map<sal_Int32, const XMLPropertyHandler*> CacheMap;
|
||||
|
||||
struct XMLPropertyHandlerFactory::Impl
|
||||
@@ -481,6 +487,10 @@ std::unique_ptr<XMLPropertyHandler> XMLPropertyHandlerFactory::CreatePropertyHan
|
||||
case XML_TYPE_COMPLEX_COLOR:
|
||||
pPropHdl.reset(new XMLComplexColorHandler);
|
||||
break;
|
||||
case XML_TYPE_TEXT_SCRIPT_TYPE:
|
||||
pPropHdl = std::make_unique<XMLConstantsPropertyHandler>(pXML_ScriptType_Enum,
|
||||
XML_TOKEN_INVALID);
|
||||
break;
|
||||
}
|
||||
|
||||
return pPropHdl;
|
||||
|
||||
@@ -486,6 +486,8 @@ XMLPropertyMapEntry constexpr aXMLParaPropMap[] =
|
||||
MAP_EXT( PROP_ParaWordSpacingMinimum, XML_NAMESPACE_LO_EXT, XML_WORD_SPACING_MINIMUM, XML_TYPE_PROP_PARAGRAPH|XML_TYPE_PERCENT16, 0 ),
|
||||
MAP_EXT( PROP_ParaWordSpacingMaximum, XML_NAMESPACE_LO_EXT, XML_WORD_SPACING_MAXIMUM, XML_TYPE_PROP_PARAGRAPH|XML_TYPE_PERCENT16, 0 ),
|
||||
|
||||
MT_ED( PROP_CharScriptHint, XML_NAMESPACE_STYLE, XML_SCRIPT_TYPE, XML_TYPE_TEXT_SCRIPT_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
|
||||
|
||||
M_END()
|
||||
};
|
||||
|
||||
@@ -702,6 +704,8 @@ XMLPropertyMapEntry constexpr aXMLTextPropMap[] =
|
||||
MT_ED( PROP_ParaIsForbiddenRules, XML_NAMESPACE_STYLE, XML_LINE_BREAK, XML_TYPE_TEXT_LINE_BREAK, 0 ),
|
||||
MT_E( PROP_TabStopDistance, XML_NAMESPACE_STYLE, XML_TAB_STOP_DISTANCE, XML_TYPE_MEASURE, 0 ),
|
||||
|
||||
MT_ED( PROP_CharScriptHint, XML_NAMESPACE_STYLE, XML_SCRIPT_TYPE, XML_TYPE_TEXT_SCRIPT_TYPE|MID_FLAG_MERGE_PROPERTY, 0 ),
|
||||
|
||||
M_END()
|
||||
};
|
||||
|
||||
|
||||
@@ -1619,6 +1619,7 @@ score-spaces
|
||||
script
|
||||
script-asian
|
||||
script-complex
|
||||
script-type
|
||||
scroll
|
||||
sdev
|
||||
search-criteria-must-apply-to-whole-cell
|
||||
@@ -3324,4 +3325,7 @@ gradient-stop
|
||||
opacity-stop
|
||||
color-value
|
||||
color-type
|
||||
latin
|
||||
asian
|
||||
complex
|
||||
TOKEN_END_DUMMY
|
||||
|
||||
Reference in New Issue
Block a user