diff options
Diffstat (limited to 'sdext/source/pdfimport/wrapper/wrapper.cxx')
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 7d3d68901e37..2d4ad4cd5763 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -494,12 +494,6 @@ void Parser::parseFontFamilyName( FontAttributes& rResult ) const sal_Unicode* pCopy = rResult.familyName.getStr(); sal_Int32 nLen = rResult.familyName.getLength(); - // parse out truetype subsets (e.g. BAAAAA+Thorndale) - if( nLen > 8 && pCopy[6] == '+' ) - { - pCopy += 7; - nLen -= 7; - } // TODO: Looks like this block needs to be refactored while( nLen ) @@ -621,52 +615,6 @@ void Parser::readFont() // extract textual attributes (bold, italic in the name, etc.) parseFontFamilyName(aResult); - // need to read font file? - if( nFileLen ) - { - uno::Sequence<sal_Int8> aFontFile(nFileLen); - readBinaryData( aFontFile ); - - awt::FontDescriptor aFD; - uno::Sequence< uno::Any > aArgs(1); - aArgs[0] <<= aFontFile; - - try - { - uno::Reference< beans::XMaterialHolder > xMat( - m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.awt.FontIdentificator", aArgs, m_xContext ), - uno::UNO_QUERY ); - if( xMat.is() ) - { - uno::Any aRes( xMat->getMaterial() ); - if( aRes >>= aFD ) - { - if (!aFD.Name.isEmpty()) - { - aResult.familyName = aFD.Name; - parseFontFamilyName(aResult); - } - aResult.isBold = (aFD.Weight > 100.0); - aResult.isItalic = (aFD.Slant == awt::FontSlant_OBLIQUE || - aFD.Slant == awt::FontSlant_ITALIC ); - aResult.isUnderline = false; - aResult.size = 0; - } - } - } - catch( uno::Exception& ) - { - } - - if( aResult.familyName.isEmpty() ) - { - // last fallback - aResult.familyName = "Arial"; - aResult.isUnderline = false; - } - - } if (!m_xDev) m_xDev.disposeAndReset(VclPtr<VirtualDevice>::Create()); |