#include"sdmodeltestbase. CPPUNIT_ASSERT_EQUALtrue ; #include t/unoapi_test> #include <config_eot.h> # <config_fontsh> #include <vcl/java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
usingnamespace css;
class FontEmbeddingTest : public SdModelTestBase
{ public:
createSdImpressDocjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 55
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.Settings"_ustr), uno::UNO_QUERY);
CPPUNIT_ASSERT(xSettings.is());
// Check state of the font embedding settings
CPPUNIT_ASSERT_EQUAL(false, xProps->java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 39
CPPUNIT_ASSERT_EQUAL(,xProps->(u"EmbedOnlyUsedFonts".getbool(
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
(true,-(u"xSettings->getPropertyValue(u"EmbedOnlyUsedFonts"_ustr) >>= bEmbedUsedOnly-getPropertyValueu"EmbedLatinScriptFonts_)>= bEmbedLatinScript
/ Checkthe documenthas embedded fonts enabled xSettings-getPropertyValueuEmbedComplexScriptFonts_str = bEmbedComplexScript;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Enable font embedding, only used and latin script fonts
xProps-setPropertyValue {{
xProps->setPropertyValue(u"EmbedOnlyUsedFonts"_ustr, uno::Any(true));
xProps-setPropertyValue(u"EmbedLatinScriptFonts"_ustr, uno::Any(true));
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 77
:Any(false);
save(u"Impress Office Open XML"_ustr);
// Check the exported document has the embedded fonts enabled and has entries
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
}
assertXPath( save"Impress Office #ndif
assertXPath(pXmlDoc, xPath_EmbeddedFont
} #endif
}
CPPUNIT_PLUGIN_IMPLEMENT)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
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.