diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-02 13:45:57 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-02 13:45:57 -0500 |
commit | 0188ebf354cb2776f9d846a5f03b07f8bedf348e (patch) | |
tree | 8344ddf70202669555ec7a07012357c87d36d765 /sdext/source/pdfimport | |
parent | 081dc5afdef4a84d60a57ff549f70071b1d26eda (diff) |
targeted string re-work
Change-Id: I88cdf9d4c3faab75a80ff72e4268748296a09e50
Diffstat (limited to 'sdext/source/pdfimport')
-rw-r--r-- | sdext/source/pdfimport/test/tests.cxx | 6 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.cxx | 6 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/imagecontainer.cxx | 2 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 38 |
4 files changed, 24 insertions, 28 deletions
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 11af7d33dbaa..c00d72e6fdc2 100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -130,7 +130,7 @@ namespace rtl::math::approxEqual(m_aHyperlinkBounds.Y1,386.0) && rtl::math::approxEqual(m_aHyperlinkBounds.X2,166.7) && rtl::math::approxEqual(m_aHyperlinkBounds.Y2,406.2) ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Correct hyperlink URI", m_aURI, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://download.openoffice.org/")) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Correct hyperlink URI", m_aURI, ::rtl::OUString("http://download.openoffice.org/") ); const char* sText = " \n \nThis is a testtext\nNew paragraph,\nnew line\n" "Hyperlink, this is\n?\nThis is more text\noutline mode\n?\nNew paragraph\n"; @@ -388,7 +388,7 @@ namespace virtual void endText() { - m_aTextOut.append( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")) ); + m_aTextOut.append( ::rtl::OUString("\n") ); } virtual void drawMask(const uno::Sequence<beans::PropertyValue>& xBitmap, @@ -511,7 +511,7 @@ namespace virtual rtl::OUString SAL_CALL getPackageLocation(rtl::OUString const&) throw() { - rtl::OUString const aLocation(RTL_CONSTASCII_USTRINGPARAM(PDFIMPORT_EXECUTABLE_LOCATION)); + rtl::OUString const aLocation(PDFIMPORT_EXECUTABLE_LOCATION); return aLocation; } diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 29138785ee60..45e40c31b8b5 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -61,7 +61,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > { Reference< XComponentContext > xContext( this->m_rProcessor.m_xContext, uno::UNO_SET_THROW ); Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")), xContext); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString("com.sun.star.i18n.BreakIterator"), xContext); mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY ); } @@ -74,7 +74,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassi { Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW ); Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.CharacterClassification")), xContext); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString("com.sun.star.i18n.CharacterClassification"), xContext); mxCharClass = uno::Reference< i18n::XCharacterClassification >( xInterface, uno::UNO_QUERY ); } return mxCharClass; @@ -114,7 +114,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons PropertyMap aProps; if( elem.StyleId != -1 ) { - aProps[ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text:style-name" ) ) ] = + aProps[ rtl::OUString( "text:style-name" ) ] = m_rEmitContext.rStyles.getStyleName( elem.StyleId ); } diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx index d6ab30407512..b2666e9dfcba 100644 --- a/sdext/source/pdfimport/tree/imagecontainer.cxx +++ b/sdext/source/pdfimport/tree/imagecontainer.cxx @@ -138,7 +138,7 @@ void ImageContainer::writeBase64EncodedStream( ImageId nId, EmitContext& rContex std::find_if(pAry,pAry+nLen, boost::bind(comphelper::TPropertyValueEqualFunctor(), _1, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputSequence"))))); + rtl::OUString("InputSequence")))); OSL_ENSURE( pValue != pAry+nLen, "InputSequence not found" ); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 71c05384763e..772dac337c68 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -594,7 +594,7 @@ void Parser::readFont() { uno::Reference< beans::XMaterialHolder > xMat( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.FontIdentificator" ) ), + rtl::OUString( "com.sun.star.awt.FontIdentificator" ), aArgs, m_xContext ), uno::UNO_QUERY ); @@ -620,7 +620,7 @@ void Parser::readFont() if( aResult.familyName.isEmpty() ) { // last fallback - aResult.familyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Arial" ) ); + aResult.familyName = ::rtl::OUString( "Arial" ); aResult.isUnderline = false; } @@ -634,17 +634,13 @@ void Parser::readFont() uno::Sequence<beans::PropertyValue> Parser::readImageImpl() { static const rtl::OString aJpegMarker( "JPEG" ); - static const rtl::OString aPbmMarker( "PBM" ); - static const rtl::OString aPpmMarker( "PPM" ); - static const rtl::OString aPngMarker( "PNG" ); - static const rtl::OUString aJpegFile( - RTL_CONSTASCII_USTRINGPARAM( "DUMMY.JPEG" )); - static const rtl::OUString aPbmFile( - RTL_CONSTASCII_USTRINGPARAM( "DUMMY.PBM" )); - static const rtl::OUString aPpmFile( - RTL_CONSTASCII_USTRINGPARAM( "DUMMY.PPM" )); - static const rtl::OUString aPngFile( - RTL_CONSTASCII_USTRINGPARAM( "DUMMY.PNG" )); + static const rtl::OString aPbmMarker( "PBM" ); + static const rtl::OString aPpmMarker( "PPM" ); + static const rtl::OString aPngMarker( "PNG" ); + static const rtl::OUString aJpegFile( "DUMMY.JPEG" ); + static const rtl::OUString aPbmFile( "DUMMY.PBM" ); + static const rtl::OUString aPpmFile( "DUMMY.PPM" ); + static const rtl::OUString aPngFile( "DUMMY.PNG" ); rtl::OString aToken = readNextToken(); const sal_Int32 nImageSize( readInt32() ); @@ -672,19 +668,19 @@ uno::Sequence<beans::PropertyValue> Parser::readImageImpl() uno::Reference< uno::XComponentContext > xContext( m_xContext, uno::UNO_SET_THROW ); uno::Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), uno::UNO_SET_THROW ); uno::Reference< io::XInputStream > xDataStream( xFactory->createInstanceWithArgumentsAndContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.SequenceInputStream" ) ), + ::rtl::OUString( "com.sun.star.io.SequenceInputStream" ), aStreamCreationArgs, m_xContext ), uno::UNO_QUERY_THROW ); uno::Sequence<beans::PropertyValue> aSequence(3); - aSequence[0] = beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")), + aSequence[0] = beans::PropertyValue( ::rtl::OUString("URL"), 0, uno::makeAny(aFileName), beans::PropertyState_DIRECT_VALUE ); - aSequence[1] = beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")), + aSequence[1] = beans::PropertyValue( ::rtl::OUString("InputStream"), 0, uno::makeAny( xDataStream ), beans::PropertyState_DIRECT_VALUE ); - aSequence[2] = beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputSequence")), + aSequence[2] = beans::PropertyValue( ::rtl::OUString("InputSequence"), 0, uno::makeAny(aDataSequence), beans::PropertyState_DIRECT_VALUE ); @@ -997,19 +993,19 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR if( checkEncryption( aSysUPath, xIHdl, aPwd, bIsEncrypted, aDocName ) == false ) return false; - rtl::OUStringBuffer converterURL = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("xpdfimport")); + rtl::OUStringBuffer converterURL = rtl::OUString("xpdfimport"); // retrieve package location url (xpdfimport executable is located there) // --------------------------------------------------- uno::Reference<deployment::XPackageInformationProvider> xProvider( xContext->getValueByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.deployment.PackageInformationProvider"))), + rtl::OUString("/singletons/com.sun.star.deployment.PackageInformationProvider")), uno::UNO_QUERY); if( xProvider.is() ) { converterURL.insert( 0, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"))); + rtl::OUString("/")); converterURL.insert( 0, xProvider->getPackageLocation( @@ -1022,7 +1018,7 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR sal_uInt32 nEnv = 0; #if defined UNX && ! defined MACOSX - rtl::OUString aStr( RTL_CONSTASCII_USTRINGPARAM( "$URE_LIB_DIR" ) ); + rtl::OUString aStr( "$URE_LIB_DIR" ); rtl_bootstrap_expandMacros( &aStr.pData ); rtl::OUString aSysPath; osl_getSystemPathFromFileURL( aStr.pData, &aSysPath.pData ); |