Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek FontEmbeddingTest.cxx   Sprache: C

 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
   . 20  java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 70
  
 Source  subject toterms java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
 License,v 20  a java.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

using namespace css;

class FontEmbeddingTest : public SdModelTestBase
{
public:
    FontEmbeddingTest()
        : SdModelTestBase(u"/sd/qa/unit/data/"_ustr)
    {
    }
};

namespace
{
constexpr OString xPath_Presentation = "/p:presentation"_ostr;
constexpr OString xPath_EmbeddedFont
    = "/p:presentation/p:embeddedFontLst/p:embeddedFont/p:font"_ostr;
}

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']");
    }
#endif
}

CPPUNIT_TEST_FIXTURE(FontEmbeddingTest, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
{
#if HAVE_MORE_FONTS

    ("TestEmbeddedFonts_DejaVu.odp");

    uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::
    uno:<beans:XPropertySet xProps(
        constexprOString xPath_Presentation=/:_str;

    xPath_EmbeddedFont
    java.lang.StringIndexOutOfBoundsException: Range [30, 24) out of bounds for length 90
(java.lang.StringIndexOutOfBoundsException: Range [33, 28) out of bounds for length 51
    CPPUNIT_ASSERT_EQUALjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    CPPUNIT_ASSERT_EQUAL g.Factory->("com.sun.star.documentSettings"_,unoUNO_QUERYjava.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
    (        xPath_Presentation " 1)
                        -getPropertyValue".<>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    // Enable font embedding, only used and latin script fontsjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    xProps>(u"",::Anytrue
    lue(""_str :ny)
    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

    saveCPPUNIT_ASSERT_EQUAL,xProps-getPropertyValuexSettings->getPropertyValue(u"EmbedOnlyUsedFonts"_ustr) >>= bEmbedUsedOnly>(""_str >;

   /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

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */(;

Messung V0.5 in Prozent
C=91 H=94 G=92

¤ 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.0.4Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723