diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-04-12 09:23:33 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-04-12 10:10:19 -0300 |
commit | 139b5e76721c685abdbb51a317c3804ffd9cafcb (patch) | |
tree | cdde769cc7220d90b587a27a32e37fd0eb7d2c93 | |
parent | 43aabb908e3dacd1b1b2effb215b04147de4016e (diff) |
More RTL_CONSTASCII_USTRINGPARAM removals
module sd/../ui
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 21 | ||||
-rw-r--r-- | sd/source/ui/table/tablefunction.cxx | 4 |
7 files changed, 34 insertions, 51 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index d556c5ccf2fe..eaed94acbbc1 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx @@ -144,8 +144,7 @@ BitmapCache::BitmapCache (const sal_Int32 nMaximalNormalCacheSize) mnMaximalNormalCacheSize = nMaximalNormalCacheSize; else { - Any aCacheSize (CacheConfiguration::Instance()->GetValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CacheSize")))); + Any aCacheSize (CacheConfiguration::Instance()->GetValue("CacheSize")); if (aCacheSize.has<sal_Int32>()) aCacheSize >>= mnMaximalNormalCacheSize; } diff --git a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx index 3a59eca04647..94f13437beae 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx @@ -96,16 +96,15 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH BitmapCache& rCache, sal_Int32 nMaximalCacheSize) { - static const ::rtl::OUString sNone (RTL_CONSTASCII_USTRINGPARAM("None")); - static const ::rtl::OUString sCompress (RTL_CONSTASCII_USTRINGPARAM("Compress")); - static const ::rtl::OUString sErase (RTL_CONSTASCII_USTRINGPARAM("Erase")); - static const ::rtl::OUString sResolution (RTL_CONSTASCII_USTRINGPARAM("ResolutionReduction")); - static const ::rtl::OUString sPNGCompression (RTL_CONSTASCII_USTRINGPARAM("PNGCompression")); + static const ::rtl::OUString sNone ("None"); + static const ::rtl::OUString sCompress ("Compress"); + static const ::rtl::OUString sErase ("Erase"); + static const ::rtl::OUString sResolution ("ResolutionReduction"); + static const ::rtl::OUString sPNGCompression ("PNGCompression"); ::boost::shared_ptr<BitmapCompressor> pCompressor; ::rtl::OUString sCompressionPolicy(sPNGCompression); - Any aCompressionPolicy (CacheConfiguration::Instance()->GetValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CompressionPolicy")))); + Any aCompressionPolicy (CacheConfiguration::Instance()->GetValue("CompressionPolicy")); if (aCompressionPolicy.has<rtl::OUString>()) aCompressionPolicy >>= sCompressionPolicy; if (sCompressionPolicy == sNone) @@ -119,8 +118,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<CacheCompactor> pCompactor (NULL); ::rtl::OUString sCompactionPolicy(sCompress); - Any aCompactionPolicy (CacheConfiguration::Instance()->GetValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CompactionPolicy")))); + Any aCompactionPolicy (CacheConfiguration::Instance()->GetValue("CompactionPolicy")); if (aCompactionPolicy.has<rtl::OUString>()) aCompactionPolicy >>= sCompactionPolicy; if (sCompactionPolicy == sNone) diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx index fce57b114170..95c0bab2d814 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx @@ -82,14 +82,9 @@ Timer CacheConfiguration::maReleaseTimer; CacheConfiguration::CacheConfiguration (void) { // Get the cache size from configuration. - const ::rtl::OUString sConfigurationProviderServiceName( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider")); - const ::rtl::OUString sPathToImpressConfigurationRoot( - RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Impress/")); - const ::rtl::OUString sPathToNode( - RTL_CONSTASCII_USTRINGPARAM( - "MultiPaneGUI/SlideSorter/PreviewCache")); + const ::rtl::OUString sConfigurationProviderServiceName("com.sun.star.configuration.ConfigurationProvider"); + const ::rtl::OUString sPathToImpressConfigurationRoot("/org.openoffice.Office.Impress/"); + const ::rtl::OUString sPathToNode("MultiPaneGUI/SlideSorter/PreviewCache"); try { @@ -104,25 +99,24 @@ CacheConfiguration::CacheConfiguration (void) // Obtain access to Impress configuration. Sequence<Any> aCreationArguments(3); aCreationArguments[0] = makeAny(beans::PropertyValue( - ::rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("nodepath")), + "nodepath", 0, makeAny(sPathToImpressConfigurationRoot), beans::PropertyState_DIRECT_VALUE)); aCreationArguments[1] = makeAny(beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("depth")), + "depth", 0, makeAny((sal_Int32)-1), beans::PropertyState_DIRECT_VALUE)); aCreationArguments[2] = makeAny(beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("lazywrite")), + "lazywrite", 0, makeAny(true), beans::PropertyState_DIRECT_VALUE)); - ::rtl::OUString sAccessService (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationAccess"))); + Reference<XInterface> xRoot (xProvider->createInstanceWithArguments( - sAccessService, aCreationArguments)); + "com.sun.star.configuration.ConfigurationAccess", + aCreationArguments)); if ( ! xRoot.is()) return; Reference<container::XHierarchicalNameAccess> xHierarchy (xRoot, UNO_QUERY); diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index e40c7bdf2c5a..028b8bf1c9b7 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -57,18 +57,15 @@ QueueProcessor::QueueProcessor ( { // Look into the configuration if there for overriding values. ::com::sun::star::uno::Any aTimeBetweenReqeusts; - aTimeBetweenReqeusts = CacheConfiguration::Instance()->GetValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TimeBetweenHighPriorityRequests"))); + aTimeBetweenReqeusts = CacheConfiguration::Instance()->GetValue("TimeBetweenHighPriorityRequests"); if (aTimeBetweenReqeusts.has<sal_Int32>()) aTimeBetweenReqeusts >>= mnTimeBetweenHighPriorityRequests; - aTimeBetweenReqeusts = CacheConfiguration::Instance()->GetValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TimeBetweenLowPriorityRequests"))); + aTimeBetweenReqeusts = CacheConfiguration::Instance()->GetValue("TimeBetweenLowPriorityRequests"); if (aTimeBetweenReqeusts.has<sal_Int32>()) aTimeBetweenReqeusts >>= mnTimeBetweenLowPriorityRequests; - aTimeBetweenReqeusts = CacheConfiguration::Instance()->GetValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TimeBetweenRequestsDuringShow"))); + aTimeBetweenReqeusts = CacheConfiguration::Instance()->GetValue("TimeBetweenRequestsDuringShow"); if (aTimeBetweenReqeusts.has<sal_Int32>()) aTimeBetweenReqeusts >>= mnTimeBetweenRequestsWhenNotIdle; diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx index a79ddaf4aa94..15da3fc3b6ba 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx @@ -202,9 +202,7 @@ CacheKey RequestQueue::GetFront (void) ::osl::MutexGuard aGuard (maMutex); if (mpRequestQueue->empty()) - throw ::com::sun::star::uno::RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "RequestQueue::GetFront(): queue is empty")), + throw ::com::sun::star::uno::RuntimeException("RequestQueue::GetFront(): queue is empty", NULL); return mpRequestQueue->begin()->maKey; @@ -218,9 +216,7 @@ RequestPriorityClass RequestQueue::GetFrontPriorityClass (void) ::osl::MutexGuard aGuard (maMutex); if (mpRequestQueue->empty()) - throw ::com::sun::star::uno::RuntimeException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "RequestQueue::GetFrontPriorityClass(): queue is empty")), + throw ::com::sun::star::uno::RuntimeException("RequestQueue::GetFrontPriorityClass(): queue is empty", NULL); return mpRequestQueue->begin()->meClass; diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 2263f8df1767..112be1084539 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -62,7 +62,6 @@ #include "sdresid.hxx" #include "EventMultiplexer.hxx" -#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) ) using ::rtl::OUString; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -87,12 +86,12 @@ static const OUString* getPropertyNames() static const OUString gPropNames[ CB_BANDED_COLUMNS-CB_HEADER_ROW+1 ] = { - C2U( "UseFirstRowStyle" ), - C2U( "UseLastRowStyle" ), - C2U( "UseBandingRowStyle" ), - C2U( "UseFirstColumnStyle" ), - C2U( "UseLastColumnStyle" ), - C2U( "UseBandingColumnStyle" ) + "UseFirstRowStyle" , + "UseLastRowStyle" , + "UseBandingRowStyle" , + "UseFirstColumnStyle" , + "UseLastColumnStyle" , + "UseBandingColumnStyle" }; return &gPropNames[0]; } @@ -101,7 +100,7 @@ static const OUString* getPropertyNames() TableDesignPane::TableDesignPane( ::Window* pParent, ViewShellBase& rBase, bool bModal ) : Control( pParent, SdResId(DLG_TABLEDESIGNPANE) ) , mrBase( rBase ) -, msTableTemplate( RTL_CONSTASCII_USTRINGPARAM( "TableTemplate" ) ) +, msTableTemplate( "TableTemplate" ) , mbModal( bModal ) , mbStyleSelected( false ) , mbOptionsChanged( false ) @@ -146,7 +145,7 @@ TableDesignPane::TableDesignPane( ::Window* pParent, ViewShellBase& rBase, bool Reference< XController > xController( mrBase.GetController(), UNO_QUERY_THROW ); Reference< XStyleFamiliesSupplier > xFamiliesSupp( xController->getModel(), UNO_QUERY_THROW ); Reference< XNameAccess > xFamilies( xFamiliesSupp->getStyleFamilies() ); - const OUString sFamilyName( RTL_CONSTASCII_USTRINGPARAM("table" ) ); + const OUString sFamilyName( "table" ); mxTableFamily = Reference< XIndexAccess >( xFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); } @@ -494,7 +493,7 @@ void TableDesignPane::updateControls() sal_uInt16 nSelection = 0; if( mxSelectedTable.is() ) { - Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "TableTemplate" ) ) ), UNO_QUERY ); + Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( OUString( "TableTemplate" ) ), UNO_QUERY ); if( xNamed.is() ) { const OUString sStyleName( xNamed->getName() ); @@ -870,7 +869,7 @@ void TableDesignPane::FillDesignPreviewControl() Reference< XPropertySet > xPageSet( mxView->getCurrentPage(), UNO_QUERY ); if( xPageSet.is() ) { - const OUString sIsBackgroundDark( RTL_CONSTASCII_USTRINGPARAM( "IsBackgroundDark" ) ); + const OUString sIsBackgroundDark( "IsBackgroundDark" ); xPageSet->getPropertyValue(sIsBackgroundDark) >>= bIsPageDark; } } diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 5ca59e1f9db8..10066a9cc729 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -97,9 +97,9 @@ static void apply_table_style( SdrTableObj* pObj, SdrModel* pModel, const OUStri Reference< XNameAccess > xPool( dynamic_cast< XNameAccess* >( pModel->GetStyleSheetPool() ) ); if( xPool.is() ) try { - const OUString sFamilyName( RTL_CONSTASCII_USTRINGPARAM( "table" ) ); + const OUString sFamilyName("table" ); Reference< XNameContainer > xTableFamily( xPool->getByName( sFamilyName ), UNO_QUERY_THROW ); - OUString aStdName( RTL_CONSTASCII_USTRINGPARAM("default") ); + OUString aStdName( "default" ); if( !sTableStyle.isEmpty() ) aStdName = sTableStyle; Reference< XIndexAccess > xStyle( xTableFamily->getByName( aStdName ), UNO_QUERY_THROW ); |