diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-01-19 17:22:04 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2013-01-21 23:23:21 +0000 |
commit | c870545523a84c10a0f8ca909bb696fab2869ab6 (patch) | |
tree | e49f2c450a6a563ff8903b70ca43231e5697272a /filter | |
parent | 188c2d34422936a6a19dcbb7ffc3e77bfebaee33 (diff) |
Remove more STRINGPARAM macros from filter
Also, remove some chained appends, and sanitize some functions call.
Change-Id: I5bfed073bd84e4dee4bc7e7b4715e413859beb50
Reviewed-on: https://gerrit.libreoffice.org/1772
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/basecontainer.cxx | 17 | ||||
-rw-r--r-- | filter/source/config/cache/contenthandlerfactory.cxx | 10 | ||||
-rw-r--r-- | filter/source/config/cache/filtercache.cxx | 42 | ||||
-rw-r--r-- | filter/source/config/cache/frameloaderfactory.cxx | 10 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 14 | ||||
-rw-r--r-- | filter/source/flash/swfdialog.cxx | 6 | ||||
-rw-r--r-- | filter/source/flash/swfexporter.cxx | 88 | ||||
-rw-r--r-- | filter/source/flash/swffilter.cxx | 6 | ||||
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 18 | ||||
-rw-r--r-- | filter/source/graphicfilter/egif/egif.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 35 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/actimpr.cxx | 90 |
12 files changed, 160 insertions, 178 deletions
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index 431bac69a3c7..8e65caa3a15f 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -133,8 +133,7 @@ void BaseContainer::impl_initFlushMode() if (!m_pFlushCache) m_pFlushCache = m_rCache->clone(); if (!m_pFlushCache) - throw css::uno::RuntimeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant create write copy of internal used cache on demand." )), + throw css::uno::RuntimeException( "Cant create write copy of internal used cache on demand.", dynamic_cast< css::container::XNameAccess* >(this)); // <- SAFE } @@ -203,8 +202,7 @@ void SAL_CALL BaseContainer::insertByName(const ::rtl::OUString& sItem , css::uno::RuntimeException ) { if (sItem.isEmpty()) - throw css::lang::IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "empty value not allowed as item name." )), + throw css::lang::IllegalArgumentException("empty value not allowed as item name.", static_cast< css::container::XNameContainer* >(this), 1); @@ -267,8 +265,7 @@ void SAL_CALL BaseContainer::replaceByName(const ::rtl::OUString& sItem , css::uno::RuntimeException ) { if (sItem.isEmpty()) - throw css::lang::IllegalArgumentException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "empty value not allowed as item name." )), + throw css::lang::IllegalArgumentException("empty value not allowed as item name.", static_cast< css::container::XNameContainer* >(this), 1); @@ -307,8 +304,7 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const ::rtl::OUString& sItem) css::uno::RuntimeException ) { if (sItem.isEmpty()) - throw css::container::NoSuchElementException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "An empty item cant be part of this cache!" )), + throw css::container::NoSuchElementException( "An empty item cant be part of this cache!", css::uno::Reference< css::uno::XInterface >(static_cast< css::container::XNameAccess* >(this), css::uno::UNO_QUERY)); css::uno::Any aValue; @@ -506,7 +502,7 @@ void SAL_CALL BaseContainer::flush() if (!m_pFlushCache) throw css::lang::WrappedTargetRuntimeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant guarantee cache consistency. Special flush container does not exists!" )), + "Cant guarantee cache consistency. Special flush container does not exists!", dynamic_cast< css::container::XNameAccess* >(this), css::uno::Any()); @@ -528,8 +524,7 @@ void SAL_CALL BaseContainer::flush() // user whish to repair it now and calls flush() // later again ... - throw css::lang::WrappedTargetRuntimeException( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flush rejected by internal container." )), + throw css::lang::WrappedTargetRuntimeException( "Flush rejected by internal container.", dynamic_cast< css::container::XNameAccess* >(this), css::uno::makeAny(ex)); } diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index 2733d22aefd8..6916c9d33be4 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -146,17 +146,17 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL ContentHandlerFactory::getAvailab -::rtl::OUString ContentHandlerFactory::impl_getImplementationName() +OUString ContentHandlerFactory::impl_getImplementationName() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.ContentHandlerFactory" )); + return OUString( "com.sun.star.comp.filter.config.ContentHandlerFactory" ); } -css::uno::Sequence< ::rtl::OUString > ContentHandlerFactory::impl_getSupportedServiceNames() +css::uno::Sequence< OUString > ContentHandlerFactory::impl_getSupportedServiceNames() { - css::uno::Sequence< ::rtl::OUString > lServiceNames(1); - lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ContentHandlerFactory" )); + css::uno::Sequence< OUString > lServiceNames(1); + lServiceNames[0] = "com.sun.star.frame.ContentHandlerFactory"; return lServiceNames; } diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 3e512edc0417..19aba9281b6a 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -671,8 +671,8 @@ void FilterCache::impl_flushByList(const css::uno::Reference< css::container::XN // special case. no exception - but not a valid item => set must be finalized or mandatory! // Reject flush operation by throwing an exception. At least one item couldnt be flushed. if (!xItem.is()) - throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant add item. Set is finalized or mandatory!" )), - css::uno::Reference< css::uno::XInterface >() ); + throw css::uno::Exception("Cant add item. Set is finalized or mandatory!", + css::uno::Reference< css::uno::XInterface >()); CacheItemList::const_iterator pItem = rCache.find(sItem); impl_saveItem(xItem, eType, pItem->second); @@ -688,8 +688,8 @@ void FilterCache::impl_flushByList(const css::uno::Reference< css::container::XN // special case. no exception - but not a valid item => it must be finalized or mandatory! // Reject flush operation by throwing an exception. At least one item couldnt be flushed. if (!xItem.is()) - throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change item. Its finalized or mandatory!" )), - css::uno::Reference< css::uno::XInterface >() ); + throw css::uno::Exception("Cant change item. Its finalized or mandatory!", + css::uno::Reference< css::uno::XInterface >()); CacheItemList::const_iterator pItem = rCache.find(sItem); impl_saveItem(xItem, eType, pItem->second); @@ -782,8 +782,8 @@ const CacheItemList& FilterCache::impl_getItemList(EItemType eType) const } - throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown sub container requested." )), - css::uno::Reference< css::uno::XInterface >() ); + throw css::uno::Exception("unknown sub container requested.", + css::uno::Reference< css::uno::XInterface >()); // <- SAFE ---------------------------------- } @@ -802,8 +802,8 @@ CacheItemList& FilterCache::impl_getItemList(EItemType eType) } - throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown sub container requested." )), - css::uno::Reference< css::uno::XInterface >() ); + throw css::uno::Exception("unknown sub container requested.", + css::uno::Reference< css::uno::XInterface >()); // <- SAFE ---------------------------------- } @@ -825,7 +825,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig return m_xConfigTypes; sPath = CFGPACKAGE_TD_TYPES; pConfig = &m_xConfigTypes; - sRtlLog = ::rtl::OString("framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_TYPES)"); + sRtlLog = "framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_TYPES)"; } break; @@ -835,7 +835,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig return m_xConfigFilters; sPath = CFGPACKAGE_TD_FILTERS; pConfig = &m_xConfigFilters; - sRtlLog = ::rtl::OString("framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_FILTERS)"); + sRtlLog = "framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_FILTERS)"; } break; @@ -845,7 +845,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig return m_xConfigOthers; sPath = CFGPACKAGE_TD_OTHERS; pConfig = &m_xConfigOthers; - sRtlLog = ::rtl::OString("framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_OTHERS)"); + sRtlLog = "framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_OTHERS)"; } break; @@ -855,11 +855,11 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig // the old configuration format only. Its not cached! sPath = CFGPACKAGE_TD_OLD; pConfig = &xOld; - sRtlLog = ::rtl::OString("framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_OLD)"); + sRtlLog = "framework (as96863) ::FilterCache::impl_openconfig(E_PROVIDER_OLD)"; } break; - default : throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "These configuration node isnt supported here for open!" )), 0); + default : throw css::uno::Exception("These configuration node isnt supported here for open!", 0); } { @@ -1035,7 +1035,7 @@ void FilterCache::impl_validateAndOptimize() throw css::document::CorruptedFilterConfigurationException( "filter configuration: the list of types or filters is empty", css::uno::Reference< css::uno::XInterface >(), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The list of types or filters is empty." ))); + "The list of types or filters is empty." ); } // Create a log for all detected problems, which @@ -1334,7 +1334,7 @@ void FilterCache::impl_addItem2FlushList( EItemType eType, pList = &m_lChangedDetectServices; break; - default : throw css::uno::Exception(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unsupported item type" )), 0); + default : throw css::uno::Exception("unsupported item type", 0); } OUStringList::const_iterator pItem = ::std::find(pList->begin(), pList->end(), sItem); @@ -2343,9 +2343,7 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe css::uno::Reference< css::container::XNameAccess > xItem; xSet->getByName(sItem) >>= xItem; if (!xItem.is()) - throw css::uno::Exception( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant read old item." )), - css::uno::Reference< css::uno::XInterface >()); + throw css::uno::Exception("Cant read old item.", css::uno::Reference< css::uno::XInterface >()); CacheItem aItem; aItem[PROPNAME_NAME] <<= sItem; @@ -2359,16 +2357,14 @@ CacheItem FilterCache::impl_readOldItem(const css::uno::Reference< css::containe // Data ::rtl::OUString sData; OUStringList lData; - xItem->getByName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Data" ))) >>= sData; + xItem->getByName( "Data" ) >>= sData; lData = impl_tokenizeString(sData, (sal_Unicode)','); if ( (sData.isEmpty()) || (lData.size()<1 ) ) { - throw css::uno::Exception( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant read old item property DATA." )), - css::uno::Reference< css::uno::XInterface >()); + throw css::uno::Exception( "Cant read old item property DATA.", css::uno::Reference< css::uno::XInterface >()); } sal_Int32 nProp = 0; @@ -2465,7 +2461,7 @@ sal_Bool FilterCache::impl_isModuleInstalled(const ::rtl::OUString& sModule) m_xModuleCfg = css::uno::Reference< css::container::XNameAccess >( ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office/Factories" )), + "org.openoffice.Setup/Office/Factories", ::comphelper::ConfigurationHelper::E_READONLY), css::uno::UNO_QUERY_THROW); } diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx index 2f25149218f7..c3344d9ff499 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -143,17 +143,17 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL FrameLoaderFactory::getAvailableS -::rtl::OUString FrameLoaderFactory::impl_getImplementationName() +OUString FrameLoaderFactory::impl_getImplementationName() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.FrameLoaderFactory" )); + return OUString( "com.sun.star.comp.filter.config.FrameLoaderFactory" ); } -css::uno::Sequence< ::rtl::OUString > FrameLoaderFactory::impl_getSupportedServiceNames() +css::uno::Sequence< OUString > FrameLoaderFactory::impl_getSupportedServiceNames() { - css::uno::Sequence< ::rtl::OUString > lServiceNames(1); - lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.FrameLoaderFactory" )); + css::uno::Sequence< OUString > lServiceNames(1); + lServiceNames[0] = "com.sun.star.frame.FrameLoaderFactory"; return lServiceNames; } diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 0732f06b5e5d..ca19fe078c62 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -242,7 +242,7 @@ struct EqualByName : public std::binary_function<FlatDetectionInfo, FlatDetectio ::rtl::OUString sURL = stlDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(), ::rtl::OUString()); #if OSL_DEBUG_LEVEL > 0 - if (stlDescriptor.find(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FileName" ))) != stlDescriptor.end()) + if (stlDescriptor.find( "FileName" ) != stlDescriptor.end()) OSL_FAIL("Detect using of deprecated and already unsupported MediaDescriptor property \"FileName\"!"); #endif @@ -1136,7 +1136,7 @@ void TypeDetection::impl_seekStreamToZero(comphelper::MediaDescriptor& rDescript if ( (sURL.isEmpty() ) || // "non existing file" ? (!xStream.is() ) || // non existing file ! - (sURL.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("private:stream"))) // not a good idea .-) + (sURL.equalsIgnoreAsciiCase("private:stream")) // not a good idea .-) ) return ::rtl::OUString(); @@ -1263,17 +1263,17 @@ sal_Bool TypeDetection::impl_validateAndSetFilterOnDescriptor( ::comphelper -::rtl::OUString TypeDetection::impl_getImplementationName() +OUString TypeDetection::impl_getImplementationName() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.filter.config.TypeDetection" )); + return OUString( "com.sun.star.comp.filter.config.TypeDetection" ); } -css::uno::Sequence< ::rtl::OUString > TypeDetection::impl_getSupportedServiceNames() +css::uno::Sequence< OUString > TypeDetection::impl_getSupportedServiceNames() { - css::uno::Sequence< ::rtl::OUString > lServiceNames(1); - lServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" )); + css::uno::Sequence< OUString > lServiceNames(1); + lServiceNames[0] = OUString( "com.sun.star.document.TypeDetection" ); return lServiceNames; } diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index 1480afeb2421..ba3a51ed8adc 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star::document; OUString SWFDialog_getImplementationName () throw (RuntimeException) { - return OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); + return OUString ( SERVICE_NAME ); } // ----------------------------------------------------------------------------- @@ -67,7 +67,7 @@ Sequence< OUString > SAL_CALL SWFDialog_getSupportedServiceNames() { Sequence < OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); + pArray[0] = OUString ( SERVICE_NAME ); return aRet; } @@ -239,7 +239,7 @@ Sequence< PropertyValue > SAL_CALL SWFDialog::getPropertyValues() if( i == nCount ) maMediaDescriptor.realloc( ++nCount ); - maMediaDescriptor[ i ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) ); + maMediaDescriptor[ i ].Name = "FilterData"; maMediaDescriptor[ i ].Value <<= maFilterData; return maMediaDescriptor; diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index 6b065ce8e952..29da268065ab 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -38,7 +38,6 @@ #include "swfexporter.hxx" #include "swfwriter.hxx" -using rtl::OUString; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::presentation; @@ -127,7 +126,7 @@ sal_Bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOut { Reference< XServiceInfo > xDocServInfo( xDoc, UNO_QUERY ); if( xDocServInfo.is() ) - mbPresentation = xDocServInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument"))) ; + mbPresentation = xDocServInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ); Reference< XDrawPagesSupplier > xDrawPagesSupplier(xDoc, UNO_QUERY); if(!xDrawPagesSupplier.is()) @@ -143,8 +142,8 @@ sal_Bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOut Reference< XPropertySet > xProp( xDrawPage, UNO_QUERY ); try { - xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= mnDocWidth; - xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ) ) >>= mnDocHeight; + xProp->getPropertyValue( "Width" ) >>= mnDocWidth; + xProp->getPropertyValue( "Height" ) >>= mnDocHeight; sal_Int32 nOutputWidth = 14400; sal_Int32 nOutputHeight = (nOutputWidth * mnDocHeight ) / mnDocWidth; @@ -160,7 +159,7 @@ sal_Bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOut const sal_Int32 nPageCount = xDrawPages->getCount(); sal_uInt16 nPage; if ( xStatusIndicator.is() ) - xStatusIndicator->start(OUString( RTL_CONSTASCII_USTRINGPARAM( "Macromedia Flash (SWF)" )), nPageCount); + xStatusIndicator->start( "Macromedia Flash (SWF)", nPageCount); for( nPage = 0; nPage < nPageCount; nPage++) { mnPageNumber = nPage + 1; @@ -176,7 +175,7 @@ sal_Bool FlashExporter::exportAll( Reference< XComponent > xDoc, Reference< XOut if( mbPresentation ) { sal_Bool bVisible = sal_False; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Visible") ) ) >>= bVisible; + xPropSet->getPropertyValue( "Visible" ) >>= bVisible; if( !bVisible ) continue; } @@ -241,8 +240,8 @@ sal_Bool FlashExporter::exportSlides( Reference< XDrawPage > xDrawPage, Referenc { if( NULL == mpWriter ) { - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= mnDocWidth; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ) ) >>= mnDocHeight; + xPropSet->getPropertyValue( "Width" ) >>= mnDocWidth; + xPropSet->getPropertyValue( "Height" ) >>= mnDocHeight; mpWriter = new Writer( 14400, 10800, mnDocWidth, mnDocHeight, mnJPEGcompressMode ); } @@ -250,7 +249,7 @@ sal_Bool FlashExporter::exportSlides( Reference< XDrawPage > xDrawPage, Referenc if( mbPresentation ) { sal_Bool bVisible = sal_False; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Visible") ) ) >>= bVisible; + xPropSet->getPropertyValue( "Visible" ) >>= bVisible; if( !bVisible ) return sal_False; } @@ -275,8 +274,8 @@ sal_uInt16 FlashExporter::exportBackgrounds( Reference< XDrawPage > xDrawPage, R if( NULL == mpWriter ) { - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= mnDocWidth; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ) ) >>= mnDocHeight; + xPropSet->getPropertyValue( "Width" ) >>= mnDocWidth; + xPropSet->getPropertyValue( "Height" ) >>= mnDocHeight; mpWriter = new Writer( 14400, 10800, mnDocWidth, mnDocHeight, mnJPEGcompressMode ); } @@ -307,8 +306,8 @@ sal_uInt16 FlashExporter::exportBackgrounds( Reference< XDrawPage > xDrawPage, s if( mbPresentation ) { - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("IsBackgroundVisible") ) ) >>= bBackgroundVisible; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("IsBackgroundObjectsVisible") ) ) >>= bBackgroundObjectsVisible; + xPropSet->getPropertyValue( "IsBackgroundVisible" ) >>= bBackgroundVisible; + xPropSet->getPropertyValue( "IsBackgroundObjectsVisible" ) >>= bBackgroundObjectsVisible; } @@ -536,7 +535,7 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) { // skip empty presentation objects sal_Bool bEmpty = sal_False; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ) ) >>= bEmpty; + xPropSet->getPropertyValue( "IsEmptyPresentationObject" ) >>= bEmpty; if( bEmpty ) return; @@ -545,12 +544,12 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) if( bMaster ) { OUString aShapeType( xShape->getShapeType() ); - if( (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.TitleTextShape" ))) || - (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.OutlinerShape" ))) || - (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.HeaderShape" ))) || - (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.FooterShape" ))) || - (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.SlideNumberShape" ))) || - (0 == aShapeType.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.DateTimeShape" )))) + if( (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.TitleTextShape" )) || + (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.OutlinerShape" )) || + (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.HeaderShape" )) || + (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.FooterShape" )) || + (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.SlideNumberShape" )) || + (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.DateTimeShape" ))) return; } } @@ -563,7 +562,7 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) try { com::sun::star::awt::Rectangle aBoundRect; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("BoundRect") ) ) >>= aBoundRect; + xPropSet->getPropertyValue( "BoundRect" ) >>= aBoundRect; ShapeInfo* pShapeInfo = new ShapeInfo(); pShapeInfo->mnX = aBoundRect.X; @@ -573,23 +572,20 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) if( mbPresentation ) { - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Bookmark") ) ) >>= pShapeInfo->maBookmark; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("DimColor") ) ) >>= pShapeInfo->mnDimColor; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("DimHide") ) ) >>= pShapeInfo->mbDimHide; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("DimPrevious") ) ) >>= pShapeInfo->mbDimPrev; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Effect") ) ) >>= pShapeInfo->meEffect; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PlayFull") ) ) >>= pShapeInfo->mbPlayFull; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PresentationOrder") ) ) >>= pShapeInfo->mnPresOrder; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Sound") ) ) >>= pShapeInfo->maSoundURL; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("SoundOn") ) ) >>= pShapeInfo->mbSoundOn; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Speed") ) ) >>= pShapeInfo->meEffectSpeed; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("TextEffect") ) ) >>= pShapeInfo->meTextEffect; - xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("TransparentColor") ) ) >>= pShapeInfo->mnBlueScreenColor; + xPropSet->getPropertyValue( "Bookmark" ) >>= pShapeInfo->maBookmark; + xPropSet->getPropertyValue( "DimColor" ) >>= pShapeInfo->mnDimColor; + xPropSet->getPropertyValue( "DimHide" ) >>= pShapeInfo->mbDimHide; + xPropSet->getPropertyValue( "DimPrevious" ) >>= pShapeInfo->mbDimPrev; + xPropSet->getPropertyValue( "Effect" ) >>= pShapeInfo->meEffect; + xPropSet->getPropertyValue( "PlayFull" ) >>= pShapeInfo->mbPlayFull; + xPropSet->getPropertyValue( "PresentationOrder" ) >>= pShapeInfo->mnPresOrder; + xPropSet->getPropertyValue( "Sound" ) >>= pShapeInfo->maSoundURL; + xPropSet->getPropertyValue( "SoundOn" ) >>= pShapeInfo->mbSoundOn; + xPropSet->getPropertyValue( "Speed" ) >>= pShapeInfo->meEffectSpeed; + xPropSet->getPropertyValue( "TextEffect" ) >>= pShapeInfo->meTextEffect; + xPropSet->getPropertyValue( "TransparentColor" ) >>= pShapeInfo->mnBlueScreenColor; } -// long ZOrder; -// xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ) ) >>= ZOrder; - GDIMetaFile aMtf; Reference< XComponent > xComponent( xShape, UNO_QUERY ); @@ -639,7 +635,7 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster ) bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile& rMtf, bool bOnlyBackground /* = false */, bool bExportAsJPEG /* = false */) { if( !mxGraphicExporter.is() ) - mxGraphicExporter = Reference< XExporter >::query( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ) ); + mxGraphicExporter = Reference< XExporter >::query( mxMSF->createInstance( "com.sun.star.drawing.GraphicExportFilter" ) ); Reference< XFilter > xFilter( mxGraphicExporter, UNO_QUERY ); @@ -647,32 +643,32 @@ bool FlashExporter::getMetaFile( Reference< XComponent >&xComponent, GDIMetaFile aFile.EnableKillingFile(); Sequence< PropertyValue > aFilterData(bExportAsJPEG ? 3 : 2); - aFilterData[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("Version") ); + aFilterData[0].Name = "Version"; aFilterData[0].Value <<= (sal_Int32)6000; - aFilterData[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("PageNumber") ); + aFilterData[1].Name = "PageNumber"; aFilterData[1].Value <<= mnPageNumber; if(bExportAsJPEG) { - aFilterData[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("Translucent") ); + aFilterData[2].Name = "Translucent"; aFilterData[2].Value <<= (sal_Bool)sal_True; } Sequence< PropertyValue > aDescriptor( bOnlyBackground ? 4 : 3 ); - aDescriptor[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") ); + aDescriptor[0].Name = "FilterName"; // AS: If we've been asked to export as an image, then use the BMP filter. // Otherwise, use SVM. This is useful for things that don't convert well as // metafiles, like the occasional OLE object. - aDescriptor[0].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM(bExportAsJPEG ? "PNG" : "SVM") ); + aDescriptor[0].Value <<= bExportAsJPEG ? OUString("PNG") : OUString("SVM"); - aDescriptor[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("URL") ); - aDescriptor[1].Value <<= OUString( aFile.GetURL() ); - aDescriptor[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") ); + aDescriptor[1].Name = "URL"; + aDescriptor[1].Value <<= OUString(aFile.GetURL()); + aDescriptor[2].Name = "FilterData"; aDescriptor[2].Value <<= aFilterData; if( bOnlyBackground ) { - aDescriptor[3].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("ExportOnlyBackground") ); + aDescriptor[3].Name = "ExportOnlyBackground"; aDescriptor[3].Value <<= (sal_Bool)bOnlyBackground; } mxGraphicExporter->setSourceDocument( xComponent ); diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index 7f5037cf9865..210d1633d22b 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -329,7 +329,7 @@ sal_Bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue const sal_Int32 nPageCount = xDrawPages->getCount(); if ( mxStatusIndicator.is() ) - mxStatusIndicator->start(OUString( RTL_CONSTASCII_USTRINGPARAM( "Saving :" )), nPageCount); + mxStatusIndicator->start( "Saving :", nPageCount); for(sal_Int32 nPage = 0; nPage < nPageCount; nPage++) { @@ -451,7 +451,7 @@ void SAL_CALL FlashExportFilter::initialize( const ::com::sun::star::uno::Sequen OUString FlashExportFilter_getImplementationName () throw (RuntimeException) { - return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Impress.FlashExportFilter" ) ); + return OUString ( "com.sun.star.comp.Impress.FlashExportFilter" ); } // ----------------------------------------------------------------------------- @@ -471,7 +471,7 @@ Sequence< OUString > SAL_CALL FlashExportFilter_getSupportedServiceNames( ) { Sequence < OUString > aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) ); + pArray[0] = OUString ( SERVICE_NAME ); return aRet; } #undef SERVICE_NAME diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index ce664477136c..fd0b91e92df2 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -866,12 +866,12 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali Sequence< PropertyValue > aFilterData(nJPEGQualityLevel != -1); if( nJPEGQualityLevel != -1 ) { - aFilterData[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("Quality")); + aFilterData[0].Name = "Quality"; aFilterData[0].Value <<= nJPEGQualityLevel; } if( aFilter.ExportGraphic( aGraphic, String(), aDstStm, - aFilter.GetExportFormatNumberForShortName( OUString( RTL_CONSTASCII_USTRINGPARAM( JPG_SHORTNAME ) ) ), &aFilterData ) == ERRCODE_NONE ) + aFilter.GetExportFormatNumberForShortName( OUString(JPG_SHORTNAME) ), &aFilterData ) == ERRCODE_NONE ) { pJpgData = reinterpret_cast<const sal_uInt8*>(aDstStm.GetData()); nJpgDataLength = aDstStm.Seek( STREAM_SEEK_TO_END ); @@ -1640,7 +1640,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) const sal_uInt8* pData = pA->GetData(); String aSkipComment; - if( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")) ) + if( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) { const MetaGradientExAction* pGradAction = NULL; sal_Bool bDone = sal_False; @@ -1652,7 +1652,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) if( pAction->GetType() == META_GRADIENTEX_ACTION ) pGradAction = (const MetaGradientExAction*) pAction; else if( ( pAction->GetType() == META_COMMENT_ACTION ) && - ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_END")) ) ) + ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) ) { bDone = sal_True; } @@ -1661,8 +1661,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) if( pGradAction ) Impl_writeGradientEx( pGradAction->GetPolyPolygon(), pGradAction->GetGradient()); } - else if( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_BEGIN")) && - pData ) + else if( pA->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_BEGIN") && pData ) { // this comment encapsulates all high level information for a filling that caused @@ -1685,15 +1684,14 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) pAction = rMtf.GetAction( i ); if( ( pAction->GetType() == META_COMMENT_ACTION ) && - ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_END")) ) ) + ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) ) { bDone = sal_True; } } } } - else if( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHSTROKE_SEQ_BEGIN")) && - pData ) + else if( pA->GetComment().equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_BEGIN") && pData ) { // this comment encapsulates all high level information for a filling that caused @@ -1716,7 +1714,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) pAction = rMtf.GetAction( i ); if( ( pAction->GetType() == META_COMMENT_ACTION ) && - ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XPATHSTROKE_SEQ_END")) ) ) + ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_END") ) ) { bDone = sal_True; } diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index 93be78ca2d55..5593941cd702 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -108,7 +108,7 @@ sal_Bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterC m_pAcc = NULL; if ( pFilterConfigItem ) - nInterlaced = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ); + nInterlaced = pFilterConfigItem->ReadInt32( "Interlaced", 0 ); m_rGIF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index d3e0aa9fe4d5..9405328dd688 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -298,10 +298,10 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi if( pResMgr ) { - String aPreviewStr( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ); - String aVersionStr( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ); - String aColorStr( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ); - String aComprStr( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ); + String aPreviewStr( "Preview" ); + String aVersionStr( "Version" ); + String aColorStr( "ColorFormat" ); + String aComprStr( "CompressionMode" ); #ifdef UNX // don't put binary tiff preview ahead of postscript code by default on unix as ghostscript is unable to read it mnPreview = pFilterConfigItem->ReadInt32( aPreviewStr, 0 ); #else @@ -316,7 +316,7 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi #else mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 1 ) == 1; #endif - String sTextMode( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ); + String sTextMode( "TextMode" ); mnTextMode = pFilterConfigItem->ReadInt32( sTextMode, 0 ); if ( mnTextMode > 2 ) mnTextMode = 0; @@ -468,12 +468,9 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview ) ImplWriteLong( aSizePoint.Width() ); ImplWriteLong( aSizePoint.Height() ,PS_RET ); ImplWriteLine( "%%Pages: 0" ); - ::rtl::OUStringBuffer aCreator; - aCreator.appendAscii( RTL_CONSTASCII_STRINGPARAM( "%%Creator: " ) ); - aCreator.append( utl::ConfigManager::getProductName() ); - aCreator.appendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) ); - aCreator.append( utl::ConfigManager::getProductVersion() ); - ImplWriteLine( ::rtl::OUStringToOString( aCreator.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr() ); + OUString aCreator( "%%Creator: " + utl::ConfigManager::getProductName() + " " + + utl::ConfigManager::getProductVersion() ); + ImplWriteLine( OUStringToOString( aCreator, RTL_TEXTENCODING_UTF8 ).getStr() ); ImplWriteLine( "%%Title: none" ); ImplWriteLine( "%%CreationDate: none" ); @@ -1222,7 +1219,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case META_COMMENT_ACTION: { const MetaCommentAction* pA = (const MetaCommentAction*) pMA; - if ( pA->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_BEGIN")) ) + if ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) { const MetaGradientExAction* pGradAction = NULL; while( ++nCurAction < nCount ) @@ -1231,7 +1228,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) if( pAction->GetType() == META_GRADIENTEX_ACTION ) pGradAction = (const MetaGradientExAction*) pAction; else if( ( pAction->GetType() == META_COMMENT_ACTION ) && - ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("XGRAD_SEQ_END")) ) ) + ( ( (const MetaCommentAction*) pAction )->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) ) { break; } @@ -1239,7 +1236,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) if( pGradAction ) ImplWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), rVDev ); } - else if ( pA->GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_END")) ) + else if ( pA->GetComment().equals("XPATHFILL_SEQ_END") ) { if ( aFillPath.Count() ) { @@ -1256,9 +1253,9 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) sal_Bool bSkipSequence = sal_False; rtl::OString sSeqEnd; - if( pA->GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM( "XPATHSTROKE_SEQ_BEGIN" )) ) + if( pA->GetComment().equals( "XPATHSTROKE_SEQ_BEGIN" ) ) { - sSeqEnd = rtl::OString(RTL_CONSTASCII_STRINGPARAM("XPATHSTROKE_SEQ_END")); + sSeqEnd = "XPATHSTROKE_SEQ_END"; SvtGraphicStroke aStroke; aMemStm >> aStroke; @@ -1292,9 +1289,9 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) ImplPolyLine( aPath ); } } - else if (pA->GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_BEGIN"))) + else if (pA->GetComment().equals("XPATHFILL_SEQ_BEGIN")) { - sSeqEnd = rtl::OString(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_END")); + sSeqEnd = "XPATHFILL_SEQ_END"; SvtGraphicFill aFill; aMemStm >> aFill; switch( aFill.getFillType() ) @@ -1363,7 +1360,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) break; case META_COMMENT_ACTION : { - if (((const MetaCommentAction*)pAction)->GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM("XPATHFILL_SEQ_END"))) + if (((const MetaCommentAction*)pAction)->GetComment().equals("XPATHFILL_SEQ_END")) bOk = sal_False; } break; diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 6075a4f89ea0..049bcd5a82db 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -117,11 +117,11 @@ void CGMImpressOutAct::ImplSetOrientation( FloatPoint& rRefPoint, double& rOrien { uno::Any aAny; aAny <<= (sal_Int32)rRefPoint.X; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointX" )), aAny ); + maXPropSet->setPropertyValue( "RotationPointX", aAny ); aAny <<= (sal_Int32)rRefPoint.Y; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointY" )), aAny ); + maXPropSet->setPropertyValue( "RotationPointY", aAny ); aAny <<= (sal_Int32)( rOrientation * 100.0 ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )), aAny ); + maXPropSet->setPropertyValue( "RotateAngle", aAny ); } // --------------------------------------------------------------- @@ -149,10 +149,10 @@ void CGMImpressOutAct::ImplSetLineBundle() fLineWidth = mpCGM->pElement->aLineBundle.nLineWidth; aAny <<= (sal_Int32)nLineColor; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny ); + maXPropSet->setPropertyValue( "LineColor", aAny ); aAny <<= (sal_Int32)fLineWidth; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny ); + maXPropSet->setPropertyValue( "LineWidth", aAny ); switch( eLineType ) { @@ -173,12 +173,12 @@ void CGMImpressOutAct::ImplSetLineBundle() break; } aAny <<= eLS; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )), aAny ); + maXPropSet->setPropertyValue( "LineStyle", aAny ); if ( eLS == drawing::LineStyle_DASH ) { drawing::LineDash aLineDash( drawing::DashStyle_RECTRELATIVE, 1, 50, 3, 33, 100 ); aAny <<= aLineDash; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineDash" )), aAny ); + maXPropSet->setPropertyValue( "LineDash", aAny ); } }; @@ -231,7 +231,7 @@ void CGMImpressOutAct::ImplSetFillBundle() nHatchIndex = (sal_uInt32)mpCGM->pElement->aFillBundle.nFillHatchIndex; aAny <<= (sal_Int32)nFillColor; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillColor" )), aAny ); + maXPropSet->setPropertyValue( "FillColor", aAny ); switch ( eFillStyle ) { @@ -279,27 +279,27 @@ void CGMImpressOutAct::ImplSetFillBundle() if ( eFS == drawing::FillStyle_GRADIENT ) { aAny <<= *mpGradient; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" )), aAny ); + maXPropSet->setPropertyValue( "FillGradient", aAny ); } aAny <<= eFS; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), aAny ); + maXPropSet->setPropertyValue( "FillStyle", aAny ); eLS = drawing::LineStyle_NONE; if ( eFillStyle == FIS_HOLLOW ) { eLS = drawing::LineStyle_SOLID; aAny <<= (sal_Int32)nFillColor; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny ); + maXPropSet->setPropertyValue( "LineColor", aAny ); aAny <<= (sal_Int32)0; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny ); + maXPropSet->setPropertyValue( "LineWidth", aAny ); } else if ( eEdgeType != ET_NONE ) { aAny <<= (sal_Int32)nEdgeColor; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny ); + maXPropSet->setPropertyValue( "LineColor", aAny ); aAny <<= (sal_Int32)fEdgeWidth; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny ); + maXPropSet->setPropertyValue( "LineWidth", aAny ); switch( eEdgeType ) { @@ -319,7 +319,7 @@ void CGMImpressOutAct::ImplSetFillBundle() } aAny <<= eLS; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )), aAny ); + maXPropSet->setPropertyValue( "LineStyle", aAny ); if ( eFS == drawing::FillStyle_HATCH ) { @@ -348,7 +348,7 @@ void CGMImpressOutAct::ImplSetFillBundle() aHatch.Angle = 15 * ( ( nHatchIndex & 0x1f ) - 5 ); } aAny <<= aHatch; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillHatch" )), aAny ); + maXPropSet->setPropertyValue( "FillHatch", aAny ); } }; @@ -370,7 +370,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty nTextColor = mpCGM->pElement->aTextBundle.GetColor(); aAny <<= (sal_Int32)nTextColor; - rProperty->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" )), aAny ); + rProperty->setPropertyValue( "CharColor", aAny ); sal_uInt32 nFontType = 0; awt::FontDescriptor aFontDescriptor; @@ -393,7 +393,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty aFontDescriptor.Underline = awt::FontUnderline::SINGLE; } aAny <<= aFontDescriptor; - rProperty->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" )), aAny ); + rProperty->setPropertyValue( "FontDescriptor", aAny ); }; // --------------------------------------------------------------- @@ -472,7 +472,7 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect ) { if ( mnGroupActCount != ( mpCGM->mnActCount - 1 ) ) // POWERPOINT HACK !!! { - if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.RectangleShape" )) ) ) + if ( ImplCreateShape( "com.sun.star.drawing.RectangleShape" ) ) { awt::Size aSize( (long)(rFloatRect.Right - rFloatRect.Left ), (long)(rFloatRect.Bottom-rFloatRect.Top ) ); maXShape->setSize( aSize ); @@ -486,11 +486,11 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect ) void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation ) { - if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EllipseShape" )) ) ) + if ( ImplCreateShape( "com.sun.star.drawing.EllipseShape" ) ) { drawing::CircleKind eCircleKind = drawing::CircleKind_FULL; uno::Any aAny( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )), aAny ); + maXPropSet->setPropertyValue( "CircleKind", aAny ); long nXSize = (long)( rSize.X * 2.0 ); // Merkwuerdigkes Verhalten bei einer awt::Size von 0 long nYSize = (long)( rSize.Y * 2.0 ); @@ -514,7 +514,7 @@ void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, doub void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation, sal_uInt32 nType, double& fStartAngle, double& fEndAngle ) { - if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EllipseShape" )) ) ) + if ( ImplCreateShape( "com.sun.star.drawing.EllipseShape" ) ) { uno::Any aAny; drawing::CircleKind eCircleKind; @@ -553,11 +553,11 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize else { aAny.setValue( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )), aAny ); + maXPropSet->setPropertyValue( "CircleKind", aAny ); aAny <<= (sal_Int32)( (long)( fStartAngle * 100 ) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleStartAngle" )), aAny ); + maXPropSet->setPropertyValue( "CircleStartAngle", aAny ); aAny <<= (sal_Int32)( (long)( fEndAngle * 100 ) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleEndAngle" )), aAny ); + maXPropSet->setPropertyValue( "CircleEndAngle", aAny ); } maXShape->setPosition( awt::Point( (long)( rCenter.X - rSize.X ), (long)( rCenter.Y - rSize.Y ) ) ); if ( rOrientation != 0 ) @@ -576,7 +576,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize ImplSetLineBundle(); drawing::FillStyle eFillStyle = drawing::FillStyle_NONE; aAny.setValue( &eFillStyle, ::getCppuType((const drawing::FillStyle*)0) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), aAny ); + maXPropSet->setPropertyValue( "FillStyle", aAny ); } } } @@ -604,7 +604,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) mpCGM->ImplMapX( fdx ); mpCGM->ImplMapY( fdy ); - if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicObjectShape" )) ) ) + if ( ImplCreateShape( "com.sun.star.drawing.GraphicObjectShape" ) ) { maXShape->setSize( awt::Size( (long)fdx, (long)fdy ) ); maXShape->setPosition( awt::Point( (long)aOrigin.X, (long)aOrigin.Y ) ); @@ -617,7 +617,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) uno::Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( BitmapEx( *( pBmpDesc->mpBitmap ) ) ) ); uno::Any aAny; aAny <<= xBitmap; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicObjectFillBitmap" )), aAny ); + maXPropSet->setPropertyValue( "GraphicObjectFillBitmap", aAny ); } } @@ -629,7 +629,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly ) { sal_uInt16 nPoints = rPoly.GetSize(); - if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PolyPolygonShape" )) ) ) + if ( ( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.PolyPolygonShape" ) ) { drawing::PointSequenceSequence aRetval; @@ -650,7 +650,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly ) uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aParam ); + maXPropSet->setPropertyValue( "PolyPolygon", aParam ); ImplSetFillBundle(); } }; @@ -662,7 +662,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) { sal_uInt16 nPoints = rPoly.GetSize(); - if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PolyLineShape" )) ) ) + if ( ( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.PolyLineShape" ) ) { drawing::PointSequenceSequence aRetval; @@ -683,7 +683,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aParam ); + maXPropSet->setPropertyValue( "PolyPolygon", aParam ); ImplSetLineBundle(); } }; @@ -693,7 +693,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) { sal_uInt16 nPoints = rPolygon.GetSize(); - if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OpenBezierShape" )) ) ) + if ( ( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.OpenBezierShape" ) ) { drawing::PolyPolygonBezierCoords aRetval; @@ -718,7 +718,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) } uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygonBezier" )), aParam ); + maXPropSet->setPropertyValue( "PolyPolygonBezier", aParam ); ImplSetLineBundle(); } }; @@ -728,7 +728,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) { sal_uInt32 nNumPolys = rPolyPolygon.Count(); - if ( nNumPolys && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ClosedBezierShape" )) ) ) + if ( nNumPolys && ImplCreateShape( "com.sun.star.drawing.ClosedBezierShape" ) ) { drawing::PolyPolygonBezierCoords aRetval; @@ -763,7 +763,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) } uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygonBezier" )), aParam); + maXPropSet->setPropertyValue( "PolyPolygonBezier", aParam); ImplSetFillBundle(); } }; @@ -772,7 +772,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag ) { - if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TextShape" )) ) ) + if ( ImplCreateShape( "com.sun.star.drawing.TextShape" ) ) { uno::Any aAny; long nWidth = rTextSize.Width; @@ -825,17 +825,17 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha if ( nOrientation ) { aAny <<= (sal_Int32)( aTextPos.X ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointX" )), aAny ); + maXPropSet->setPropertyValue( "RotationPointX", aAny ); aAny <<= (sal_Int32)( aTextPos.Y + nHeight ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointY" )), aAny ); + maXPropSet->setPropertyValue( "RotationPointY", aAny ); aAny <<= (sal_Int32)( (sal_Int32)( nOrientation * 100 ) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )), aAny ); + maXPropSet->setPropertyValue( "RotateAngle", aAny ); } if ( nWidth == -1 ) { sal_Bool bTrue( sal_True ); aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0 )); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowWidth" )), aAny ); + maXPropSet->setPropertyValue( "TextAutoGrowWidth", aAny ); drawing::TextAdjust eTextAdjust; switch ( mpCGM->pElement->eTextAlignmentH ) @@ -853,13 +853,13 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha break; } aAny <<= eTextAdjust; - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" )), aAny ); + maXPropSet->setPropertyValue( "TextHorizontalAdjust", aAny ); } if ( nHeight == -1 ) { sal_Bool bTrue = sal_True; aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0) ); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowHeight" )), aAny ); + maXPropSet->setPropertyValue( "TextAutoGrowHeight", aAny ); } uno::Reference< text::XText > xText; uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) )); @@ -895,13 +895,13 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha aAny <<= (sal_Int16)style::HorizontalAlignment_CENTER; break; } - aCursorPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" )), aAny ); + aCursorPropSet->setPropertyValue( "ParaAdjust", aAny ); } if ( nWidth > 0 && nHeight > 0 ) // restricted text { sal_Bool bTrue = sal_True; aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0)); - maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextFitToSize" )), aAny ); + maXPropSet->setPropertyValue( "TextFitToSize", aAny ); } aCursorText->setString( aStr ); aXTextCursor->gotoEnd( sal_True ); |