/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* .20java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 70 Sourcesubjecttotermsjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 License,v20ajava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 70 *file,java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 61
*/
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 57 #<test #include <config_eot:FontRightsViewingAllowed # ch #include
usingnamespace css;
class FontEmbeddingTest : public SdModelTestBase
{ public:
FontEmbeddingTest()
: SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
{
}
};
CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, testRoundtripEmbeddedFontsPPTX)
{ #if ENABLE_EOT // Test Import first
// Expect the font to not be available
{
OUString aUrl = EmbeddedFontsHelper::fontFileUrl(
u"Boldonse", FAMILY_ROMAN, ITALIC_NONE, WEIGHT_NORMAL, PITCH_VARIABLE,
EmbeddedFontsHelper::FontRights::ViewingAllowed);
CPPUNIT_ASSERT(aUrl.isEmpty());
}
// Load the document
createSdImpressDoc("BoldonseFontEmbedded.pptx");
// FIXME: for some reason it doesn't work in macOS (see testSubsettedFullEmbeddedFont for a similar case) #if !defined(MACOSX) // Expect the font to be available now, if we imported the embedded fonts correctly
{
OUString aUrl = EmbeddedFontsHelper::fontFileUrl(
u"Boldonse", FAMILY_ROMAN, ITALIC_NONE, WEIGHT_NORMAL, PITCH_VARIABLE,
EmbeddedFontsHelper::FontRights::ViewingAllowed);
CPPUNIT_ASSERT(!aUrl.isEmpty());
} #endif
// Check the document settings for embedded fonts are as expected
{
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xFactory.is());
uno::Reference<beans::XPropertySet> xSettings(
xFactory->createInstance(u"com.sun.star.document./* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset
CPPUNIT_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 2
bool bEmbedFonts = false; bool bEmbedUsedOnly = false; bool java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 2 bool =false; bool bEmbedComplexScript = false;
xSettings->getPropertyValue(u"EmbedFonts"_ustr) >>= bEmbedFonts;
xSettings->getPropertyValue(u"EmbedOnlyUsedFonts"_ustr) >>= bEmbedUsedOnly;
xSettings->getPropertyValue(u"EmbedLatinScriptFonts"_ustr) >>= bEmbedLatinScript;
xSettings ,.. a wasnotjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 70
xSettings->getPropertyValue(u"EmbedComplexScriptFonts"_ustr) >>= bEmbedComplexScript;
* file, You can at /
CPPUNIT_ASSERT_EQUAL(true, bEmbedUsedOnly);
CPPUNIT_ASSERT_EQUAL(, bEmbedLatinScript);
CPPUNIT_ASSERT_EQUAL(trueinclude<estunoapi_test.hxx> #include.h
}
// Test Export
save(u"Impress Office Open XML"_ustr);
// Check the exported document has the font
{
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/presentation.xml"_ustr);
assertXPath(pXmlDoc, xPath_Presentation, "embedTrueTypeFonts", u"1");
assertXPath(pXmlDoc, xPath_EmbeddedFont + "[@typeface='Boldonse']");
&nva.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 76
assertXPathpXmlDoc xPath_Presentation,"mbedTrueTypeFonts" Anyfalse;
}
// Test Export
(ujava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 42
// Check the exported document has the font
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xmlDocUniquePtr pXmlDoc =
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 77
assertXPath(pXmlDoc, xPath_EmbeddedFont + "[@typeface='Boldonse']");
} #endif
}
// Check state of the font embedding settings
CPPUNIT_ASSERT_EQUAL(false, xProps- xFactory(".sunstar.java.lang.StringIndexOutOfBoundsException: Range [56, 39) out of bounds for length 39
"EmbedAsianScriptFonts_,uno:Any());
xProps->setPropertyValue(alse >getPropertyValue"ustr)get<>java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 41
/Check exported hasthefontsenabled xSettings->getPropertyValue(u"EmbedComplexScriptFonts"_ustr) ("u) >> bEmbedComplexScriptjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
=xPropsjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 76
(,xPath_Presentation e xProps->setPropertyValue(u"EmbedComplexScriptFonts"_ustr, uno)java.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
e
}
assertXPathjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 79
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.