summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/classes/sbunoobj.cxx4
-rw-r--r--framework/source/dispatch/windowcommanddispatch.cxx12
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx46
-rw-r--r--framework/source/inc/dispatch/windowcommanddispatch.hxx14
-rw-r--r--package/source/manifest/Base64Codec.cxx7
-rw-r--r--sfx2/source/doc/guisaveas.cxx76
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx35
-rw-r--r--toolkit/source/helper/formpdfexport.cxx6
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx9
-rw-r--r--xmloff/source/text/txtparae.cxx6
10 files changed, 104 insertions, 111 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 9fb8b1030da3..438064104fed 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -115,7 +115,7 @@ static char const ID_DBG_PROPERTIES[] = "Dbg_Properties";
static char const ID_DBG_METHODS[] = "Dbg_Methods";
static ::rtl::OUString aSeqLevelStr( RTL_CONSTASCII_USTRINGPARAM("[]") );
-static ::rtl::OUString defaultNameSpace( RTL_CONSTASCII_USTRINGPARAM("ooo.vba") );
+static char const defaultNameSpace[] = "ooo.vba";
// Gets the default property for an uno object. Note: There is some
// redirection built in. The property name specifies the name
@@ -3291,7 +3291,7 @@ VBAConstantHelper::init()
{
Sequence< TypeClass > types(1);
types[ 0 ] = TypeClass_CONSTANTS;
- Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( defaultNameSpace, types, TypeDescriptionSearchDepth_INFINITE );
+ Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( rtl::OUString(defaultNameSpace), types, TypeDescriptionSearchDepth_INFINITE );
if ( !xEnum.is() )
return; //NULL;
diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx
index 470daa07f843..022537c52f87 100644
--- a/framework/source/dispatch/windowcommanddispatch.cxx
+++ b/framework/source/dispatch/windowcommanddispatch.cxx
@@ -60,12 +60,6 @@ namespace framework{
namespace css = ::com::sun::star;
-//_______________________________________________
-// declarations
-
-const ::rtl::OUString WindowCommandDispatch::COMMAND_PREFERENCES(RTL_CONSTASCII_USTRINGPARAM(".uno:OptionsTreeDialog"));
-const ::rtl::OUString WindowCommandDispatch::COMMAND_ABOUTBOX(RTL_CONSTASCII_USTRINGPARAM(".uno:About"));
-
//-----------------------------------------------
WindowCommandDispatch::WindowCommandDispatch(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
const css::uno::Reference< css::frame::XFrame >& xFrame)
@@ -152,16 +146,16 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam)
return 0L;
const int nCommand = pData->GetDialogId();
- ::rtl::OUString sCommand;
+ ::rtl::OUString sCommand;
switch (nCommand)
{
case SHOWDIALOG_ID_PREFERENCES :
- sCommand = WindowCommandDispatch::COMMAND_PREFERENCES;
+ sCommand = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:OptionsTreeDialog"));
break;
case SHOWDIALOG_ID_ABOUT :
- sCommand = WindowCommandDispatch::COMMAND_ABOUTBOX;
+ sCommand = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:About"));
break;
default :
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 5c28d2679ac2..92b5f7f65859 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -60,14 +60,14 @@ const int UIELEMENT_PROPHANDLE_XMENUBAR = 6;
const int UIELEMENT_PROPHANDLE_CONFIGLISTENER = 7;
const int UIELEMENT_PROPHANDLE_NOCLOSE = 8;
const int UIELEMENT_PROPCOUNT = 8;
-const rtl::OUString UIELEMENT_PROPNAME_CONFIGLISTENER( RTL_CONSTASCII_USTRINGPARAM( "ConfigListener" ));
-const rtl::OUString UIELEMENT_PROPNAME_CONFIGSOURCE( RTL_CONSTASCII_USTRINGPARAM( "ConfigurationSource" ));
-const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
-const rtl::OUString UIELEMENT_PROPNAME_PERSISTENT( RTL_CONSTASCII_USTRINGPARAM( "Persistent" ));
-const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" ));
-const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" ));
-const rtl::OUString UIELEMENT_PROPNAME_XMENUBAR( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" ));
-const rtl::OUString UIELEMENT_PROPNAME_NOCLOSE( RTL_CONSTASCII_USTRINGPARAM( "NoClose" ));
+const char UIELEMENT_PROPNAME_CONFIGLISTENER[] = "ConfigListener";
+const char UIELEMENT_PROPNAME_CONFIGSOURCE[] = "ConfigurationSource";
+const char UIELEMENT_PROPNAME_FRAME[] = "Frame";
+const char UIELEMENT_PROPNAME_PERSISTENT[] = "Persistent";
+const char UIELEMENT_PROPNAME_RESOURCEURL[] = "ResourceURL";
+const char UIELEMENT_PROPNAME_TYPE[] = "Type";
+const char UIELEMENT_PROPNAME_XMENUBAR[] = "XMenuBar";
+const char UIELEMENT_PROPNAME_NOCLOSE[] = "NoClose";
using ::rtl::OUString;
using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
@@ -161,19 +161,19 @@ throw ( Exception, RuntimeException )
PropertyValue aPropValue;
if ( aArguments[n] >>= aPropValue )
{
- if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_CONFIGSOURCE ))
+ if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_CONFIGSOURCE)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGSOURCE, aPropValue.Value );
- else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_FRAME ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_FRAME)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_FRAME, aPropValue.Value );
- else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_PERSISTENT ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_PERSISTENT)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_PERSISTENT, aPropValue.Value );
- else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_RESOURCEURL ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_RESOURCEURL)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_RESOURCEURL, aPropValue.Value );
- else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_TYPE ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_TYPE)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_TYPE, aPropValue.Value );
- else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_CONFIGLISTENER ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_CONFIGLISTENER)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_CONFIGLISTENER, aPropValue.Value );
- else if ( aPropValue.Name.equals( UIELEMENT_PROPNAME_NOCLOSE ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UIELEMENT_PROPNAME_NOCLOSE)))
setFastPropertyValue_NoBroadcast( UIELEMENT_PROPHANDLE_NOCLOSE, aPropValue.Value );
}
}
@@ -472,14 +472,14 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE
const com::sun::star::beans::Property pProperties[] =
{
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_CONFIGLISTENER, UIELEMENT_PROPHANDLE_CONFIGLISTENER , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_CONFIGSOURCE , UIELEMENT_PROPHANDLE_CONFIGSOURCE , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_FRAME , UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_NOCLOSE , UIELEMENT_PROPHANDLE_NOCLOSE , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_PERSISTENT , UIELEMENT_PROPHANDLE_PERSISTENT , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL , UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_TYPE , UIELEMENT_PROPHANDLE_TYPE , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
- com::sun::star::beans::Property( UIELEMENT_PROPNAME_XMENUBAR , UIELEMENT_PROPHANDLE_XMENUBAR , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_CONFIGLISTENER), UIELEMENT_PROPHANDLE_CONFIGLISTENER , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_NOCLOSE), UIELEMENT_PROPHANDLE_NOCLOSE , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_PERSISTENT), UIELEMENT_PROPHANDLE_PERSISTENT , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , ::getCppuType((const ::rtl::OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+ com::sun::star::beans::Property( rtl::OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
};
// Use it to initialize sequence!
const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT );
diff --git a/framework/source/inc/dispatch/windowcommanddispatch.hxx b/framework/source/inc/dispatch/windowcommanddispatch.hxx
index 549c6d9e69ae..5315240d7a94 100644
--- a/framework/source/inc/dispatch/windowcommanddispatch.hxx
+++ b/framework/source/inc/dispatch/windowcommanddispatch.hxx
@@ -74,20 +74,6 @@ namespace css = ::com::sun::star;
*/
class WindowCommandDispatch : private ThreadHelpBase
{
- //___________________________________________
- // const
-
- private:
-
- /// dispatch URL to trigger our "Tools->Options" dialog
- static const ::rtl::OUString COMMAND_PREFERENCES;
-
- /// dispatch URL to trigger our About box
- static const ::rtl::OUString COMMAND_ABOUTBOX;
-
- //___________________________________________
- // member
-
private:
/// can be used to create own needed services on demand.
diff --git a/package/source/manifest/Base64Codec.cxx b/package/source/manifest/Base64Codec.cxx
index 66a7f181c0f1..19531005a430 100644
--- a/package/source/manifest/Base64Codec.cxx
+++ b/package/source/manifest/Base64Codec.cxx
@@ -141,9 +141,6 @@ void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Seque
}
}
-const rtl::OUString s2equal(RTL_CONSTASCII_USTRINGPARAM("=="));
-const rtl::OUString s1equal(RTL_CONSTASCII_USTRINGPARAM("="));
-
void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int32 nStart, const rtl::OUString& sString)
{
nLength = 0;
@@ -153,9 +150,9 @@ void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int3
if (nLen != 4)
return;
- if (sString.indexOf(s2equal) == 2)
+ if (sString.indexOfAsciiL(RTL_CONSTASCII_STRINGPARAM("==")) == 2)
nLength = 1;
- else if (sString.indexOf(s1equal) == 3)
+ else if (sString.indexOf('=') == 3)
nLength = 2;
else
nLength = 3;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3b81c1ad34ca..6273b9237c04 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -106,10 +106,10 @@
#define STATUS_SAVEAS 2
#define STATUS_SAVEAS_STANDARDNAME 3
-const ::rtl::OUString aFilterNameString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
-const ::rtl::OUString aFilterOptionsString(RTL_CONSTASCII_USTRINGPARAM("FilterOptions"));
-const ::rtl::OUString aFilterDataString(RTL_CONSTASCII_USTRINGPARAM("FilterData"));
-const ::rtl::OUString aFilterFlagsString(RTL_CONSTASCII_USTRINGPARAM("FilterFlags"));
+const char aFilterNameString[] = "FilterName";
+const char aFilterOptionsString[] = "FilterOptions";
+const char aFilterDataString[] = "FilterData";
+const char aFilterFlagsString[] = "FilterFlags";
using namespace ::com::sun::star;
@@ -711,7 +711,7 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
// check that the old filter is acceptable
::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
- aFilterNameString,
+ rtl::OUString(aFilterNameString),
::rtl::OUString() );
sal_Int8 nResult = CheckFilter( aOldFilterName );
@@ -914,6 +914,8 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
::rtl::OUString aAdjustToType;
+ const ::rtl::OUString sFilterNameString(aFilterNameString);
+
if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) )
{
// it is export, set the preselected filter
@@ -927,7 +929,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
{
uno::Sequence< beans::PropertyValue > aOldFilterProps;
::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
- aFilterNameString,
+ sFilterNameString,
::rtl::OUString() );
if ( !aOldFilterName.isEmpty() )
@@ -1019,11 +1021,15 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// old filter options should be cleared in case different filter is used
::rtl::OUString aFilterFromMediaDescr = GetMediaDescr().getUnpackedValueOrDefault(
- aFilterNameString,
+ sFilterNameString,
::rtl::OUString() );
::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
- aFilterNameString,
+ sFilterNameString,
::rtl::OUString() );
+
+ const ::rtl::OUString sFilterOptionsString(aFilterOptionsString);
+ const ::rtl::OUString sFilterDataString(aFilterDataString);
+
if ( aFilterName.equals( aFilterFromMediaDescr ) )
{
// preserv current settings if any
@@ -1033,32 +1039,32 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
if ( aFilterFromMediaDescr.equals( aOldFilterName ) )
{
::comphelper::SequenceAsHashMap::const_iterator aIter =
- GetDocProps().find( aFilterOptionsString );
+ GetDocProps().find( sFilterOptionsString );
if ( aIter != GetDocProps().end()
- && GetMediaDescr().find( aFilterOptionsString ) == GetMediaDescr().end() )
+ && GetMediaDescr().find( sFilterOptionsString ) == GetMediaDescr().end() )
GetMediaDescr()[aIter->first] = aIter->second;
- aIter = GetDocProps().find( aFilterDataString );
+ aIter = GetDocProps().find( sFilterDataString );
if ( aIter != GetDocProps().end()
- && GetMediaDescr().find( aFilterDataString ) == GetMediaDescr().end() )
+ && GetMediaDescr().find( sFilterDataString ) == GetMediaDescr().end() )
GetMediaDescr()[aIter->first] = aIter->second;
}
}
else
{
- GetMediaDescr().erase( aFilterDataString );
- GetMediaDescr().erase( aFilterOptionsString );
+ GetMediaDescr().erase( sFilterDataString );
+ GetMediaDescr().erase( sFilterOptionsString );
if ( aFilterName.equals( aOldFilterName ) )
{
// merge filter option of the document filter
::comphelper::SequenceAsHashMap::const_iterator aIter =
- GetDocProps().find( aFilterOptionsString );
+ GetDocProps().find( sFilterOptionsString );
if ( aIter != GetDocProps().end() )
GetMediaDescr()[aIter->first] = aIter->second;
- aIter = GetDocProps().find( aFilterDataString );
+ aIter = GetDocProps().find( sFilterDataString );
if ( aIter != GetDocProps().end() )
GetMediaDescr()[aIter->first] = aIter->second;
}
@@ -1082,8 +1088,8 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
aVal >>= bUseFilterOptions;
if ( !bUseFilterOptions )
bUseFilterOptions =
- ( GetMediaDescr().find( aFilterDataString ) == GetMediaDescr().end()
- && GetMediaDescr().find( aFilterOptionsString ) == GetMediaDescr().end() );
+ ( GetMediaDescr().find( sFilterDataString ) == GetMediaDescr().end()
+ && GetMediaDescr().find( sFilterOptionsString ) == GetMediaDescr().end() );
}
catch( const lang::IllegalArgumentException& )
{}
@@ -1095,7 +1101,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// merge in results of the dialog execution
GetMediaDescr()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))] <<=
::rtl::OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ));
- GetMediaDescr()[aFilterNameString] <<= aFilterName;
+ GetMediaDescr()[sFilterNameString] <<= aFilterName;
return bUseFilterOptions;
}
@@ -1430,23 +1436,29 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")),
::rtl::OUString() );
+ const ::rtl::OUString sFilterNameString(aFilterNameString);
+
::rtl::OUString aFilterFromMediaDescr = aModelData.GetMediaDescr().getUnpackedValueOrDefault(
- aFilterNameString,
+ sFilterNameString,
::rtl::OUString() );
::rtl::OUString aOldFilterName = aModelData.GetDocProps().getUnpackedValueOrDefault(
- aFilterNameString,
+ sFilterNameString,
::rtl::OUString() );
sal_Bool bUseFilterOptions = sal_False;
::comphelper::SequenceAsHashMap::const_iterator aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) );
+ const ::rtl::OUString sFilterOptionsString(aFilterOptionsString);
+ const ::rtl::OUString sFilterDataString(aFilterDataString);
+ const ::rtl::OUString sFilterFlagsString(aFilterFlagsString);
+
if ( ( nStoreMode & EXPORT_REQUESTED ) && ( nStoreMode & PDFEXPORT_REQUESTED ) && !( nStoreMode & PDFDIRECTEXPORT_REQUESTED ) )
{
// this is PDF export, the filter options dialog should be shown before the export
- aModelData.GetMediaDescr()[aFilterNameString] <<= aFilterName;
- if ( aModelData.GetMediaDescr().find( aFilterFlagsString ) == aModelData.GetMediaDescr().end()
- && aModelData.GetMediaDescr().find( aFilterOptionsString ) == aModelData.GetMediaDescr().end()
- && aModelData.GetMediaDescr().find( aFilterDataString ) == aModelData.GetMediaDescr().end() )
+ aModelData.GetMediaDescr()[sFilterNameString] <<= aFilterName;
+ if ( aModelData.GetMediaDescr().find( sFilterFlagsString ) == aModelData.GetMediaDescr().end()
+ && aModelData.GetMediaDescr().find( sFilterOptionsString ) == aModelData.GetMediaDescr().end()
+ && aModelData.GetMediaDescr().find( sFilterDataString ) == aModelData.GetMediaDescr().end() )
{
// execute filter options dialog since no options are set in the media descriptor
if ( aModelData.ExecuteFilterDialog_Impl( aFilterName ) )
@@ -1506,7 +1518,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
{
// in case of saving check filter for possible alien warning
::rtl::OUString aSelFilterName = aModelData.GetMediaDescr().getUnpackedValueOrDefault(
- aFilterNameString,
+ sFilterNameString,
::rtl::OUString() );
sal_Int8 nStatusFilterSave = aModelData.CheckFilter( aSelFilterName );
if ( nStatusFilterSave == STATUS_SAVEAS_STANDARDNAME )
@@ -1534,14 +1546,14 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
if ( aFilterFromMediaDescr.equals( aOldFilterName ) )
{
::comphelper::SequenceAsHashMap::const_iterator aIter =
- aModelData.GetDocProps().find( aFilterOptionsString );
+ aModelData.GetDocProps().find( sFilterOptionsString );
if ( aIter != aModelData.GetDocProps().end()
- && aModelData.GetMediaDescr().find( aFilterOptionsString ) == aModelData.GetMediaDescr().end() )
+ && aModelData.GetMediaDescr().find( sFilterOptionsString ) == aModelData.GetMediaDescr().end() )
aModelData.GetMediaDescr()[aIter->first] = aIter->second;
- aIter = aModelData.GetDocProps().find( aFilterDataString );
+ aIter = aModelData.GetDocProps().find( sFilterDataString );
if ( aIter != aModelData.GetDocProps().end()
- && aModelData.GetMediaDescr().find( aFilterDataString ) == aModelData.GetMediaDescr().end() )
+ && aModelData.GetMediaDescr().find( sFilterDataString ) == aModelData.GetMediaDescr().end() )
aModelData.GetMediaDescr()[aIter->first] = aIter->second;
}
}
@@ -1554,12 +1566,12 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL!" );
::comphelper::SequenceAsHashMap::const_iterator aIter =
- aModelData.GetMediaDescr().find( aFilterNameString );
+ aModelData.GetMediaDescr().find( sFilterNameString );
if ( aIter != aModelData.GetMediaDescr().end() )
aIter->second >>= aFilterName;
else
- aModelData.GetMediaDescr()[aFilterNameString] <<= aFilterName;
+ aModelData.GetMediaDescr()[sFilterNameString] <<= aFilterName;
DBG_ASSERT( !aFilterName.isEmpty(), "Illegal filter!" );
}
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 4734df39b541..a6eca2eb1832 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -64,13 +64,13 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-const rtl::OUString sExtrusion( RTL_CONSTASCII_USTRINGPARAM ( "Extrusion" ) );
+const char aExtrusion[] = "Extrusion";
void GetOrigin( SdrCustomShapeGeometryItem& rItem, double& rOriginX, double& rOriginY )
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aOriginParaPair;
const rtl::OUString sOrigin( RTL_CONSTASCII_USTRINGPARAM ( "Origin" ) );
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, sOrigin );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sOrigin );
if ( ! ( pAny && ( *pAny >>= aOriginParaPair ) && ( aOriginParaPair.First.Value >>= rOriginX ) && ( aOriginParaPair.Second.Value >>= rOriginY ) ) )
{
rOriginX = 0.50;
@@ -82,7 +82,7 @@ void GetRotateAngle( SdrCustomShapeGeometryItem& rItem, double& rAngleX, double&
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aRotateAngleParaPair;
const rtl::OUString sRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "RotateAngle" ) );
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, sRotateAngle );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sRotateAngle );
if ( ! ( pAny && ( *pAny >>= aRotateAngleParaPair ) && ( aRotateAngleParaPair.First.Value >>= rAngleX ) && ( aRotateAngleParaPair.Second.Value >>= rAngleY ) ) )
{
rAngleX = 0.0;
@@ -96,7 +96,7 @@ void GetSkew( SdrCustomShapeGeometryItem& rItem, double& rSkewAmount, double& rS
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aSkewParaPair;
const rtl::OUString sSkew( RTL_CONSTASCII_USTRINGPARAM ( "Skew" ) );
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, sSkew );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sSkew );
if ( ! ( pAny && ( *pAny >>= aSkewParaPair ) && ( aSkewParaPair.First.Value >>= rSkewAmount ) && ( aSkewParaPair.Second.Value >>= rSkewAngle ) ) )
{
rSkewAmount = 50;
@@ -110,7 +110,7 @@ void GetExtrusionDepth( SdrCustomShapeGeometryItem& rItem, const double* pMap, d
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aDepthParaPair;
double fDepth = 0, fFraction = 0;
const rtl::OUString sDepth( RTL_CONSTASCII_USTRINGPARAM ( "Depth" ) );
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, sDepth );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sDepth );
if ( pAny && ( *pAny >>= aDepthParaPair ) && ( aDepthParaPair.First.Value >>= fDepth ) && ( aDepthParaPair.Second.Value >>= fFraction ) )
{
rForwardDepth = fDepth * fFraction;
@@ -132,7 +132,7 @@ void GetExtrusionDepth( SdrCustomShapeGeometryItem& rItem, const double* pMap, d
double GetDouble( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPropertyName, double fDefault, const double* pMap )
{
double fRetValue = fDefault;
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, rPropertyName );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), rPropertyName );
if ( pAny )
*pAny >>= fRetValue;
if ( pMap )
@@ -144,7 +144,7 @@ drawing::ShadeMode GetShadeMode( SdrCustomShapeGeometryItem& rItem, const drawin
{
drawing::ShadeMode eRet( eDefault );
const rtl::OUString sShadeMode( RTL_CONSTASCII_USTRINGPARAM ( "ShadeMode" ) );
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, sShadeMode );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sShadeMode );
if ( pAny )
*pAny >>= eRet;
return eRet;
@@ -153,7 +153,7 @@ drawing::ShadeMode GetShadeMode( SdrCustomShapeGeometryItem& rItem, const drawin
sal_Int32 GetInt32( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPropertyName, const sal_Int32 nDefault )
{
sal_Int32 nRetValue = nDefault;
- Any* pAny = rItem.GetPropertyValueByName( sExtrusion, rPropertyName );
+ Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), rPropertyName );
if ( pAny )
*pAny >>= nRetValue;
return nRetValue;
@@ -162,7 +162,7 @@ sal_Int32 GetInt32( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPro
sal_Bool GetBool( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPropertyName, const sal_Bool bDefault )
{
sal_Bool bRetValue = bDefault;
- const Any* pAny = rItem.GetPropertyValueByName( sExtrusion, rPropertyName );
+ const Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), rPropertyName );
if ( pAny )
*pAny >>= bRetValue;
return bRetValue;
@@ -171,7 +171,7 @@ sal_Bool GetBool( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPrope
awt::Point GetPoint( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPropertyName, const awt::Point& rDefault )
{
awt::Point aRetValue( rDefault );
- const Any* pAny = rItem.GetPropertyValueByName( sExtrusion, rPropertyName );
+ const Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), rPropertyName );
if ( pAny )
*pAny >>= aRetValue;
return aRetValue;
@@ -181,7 +181,7 @@ drawing::Position3D GetPosition3D( SdrCustomShapeGeometryItem& rItem, const rtl:
const drawing::Position3D& rDefault, const double* pMap )
{
drawing::Position3D aRetValue( rDefault );
- const Any* pAny = rItem.GetPropertyValueByName( sExtrusion, rPropertyName );
+ const Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), rPropertyName );
if ( pAny )
*pAny >>= aRetValue;
if ( pMap )
@@ -196,7 +196,7 @@ drawing::Position3D GetPosition3D( SdrCustomShapeGeometryItem& rItem, const rtl:
drawing::Direction3D GetDirection3D( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPropertyName, const drawing::Direction3D& rDefault )
{
drawing::Direction3D aRetValue( rDefault );
- const Any* pAny = rItem.GetPropertyValueByName( sExtrusion, rPropertyName );
+ const Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), rPropertyName );
if ( pAny )
*pAny >>= aRetValue;
return aRetValue;
@@ -209,7 +209,7 @@ EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCus
{
SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
const rtl::OUString sProjectionMode( RTL_CONSTASCII_USTRINGPARAM ( "ProjectionMode" ) );
- Any* pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, sProjectionMode );
+ Any* pAny = rGeometryItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sProjectionMode );
if ( pAny )
*pAny >>= eProjectionMode;
@@ -298,7 +298,8 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
pMap = &fMap;
}
}
- if ( GetBool( rGeometryItem, sExtrusion, sal_False ) )
+ const rtl::OUString sExtrusion(aExtrusion);
+ if ( GetBool( rGeometryItem, aExtrusion, sal_False ) )
{
sal_Bool bIsMirroredX = ((SdrObjCustomShape*)pCustomShape)->IsMirroredX();
sal_Bool bIsMirroredY = ((SdrObjCustomShape*)pCustomShape)->IsMirroredY();
@@ -340,7 +341,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL );
const rtl::OUString sProjectionMode( RTL_CONSTASCII_USTRINGPARAM ( "ProjectionMode" ) );
- Any* pAny = rGeometryItem.GetPropertyValueByName( sExtrusion, sProjectionMode );
+ Any* pAny = rGeometryItem.GetPropertyValueByName( aExtrusion, sProjectionMode );
if ( pAny )
*pAny >>= eProjectionMode;
ProjectionType eProjectionType( eProjectionMode == drawing::ProjectionMode_PARALLEL ? PR_PARALLEL : PR_PERSPECTIVE );
@@ -355,8 +356,8 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
sal_Bool bUseTwoFillStyles( sal_False );
drawing::ShadeMode eShadeMode( GetShadeMode( rGeometryItem, drawing::ShadeMode_FLAT ) );
- const rtl::OUString sExtrusionColor( RTL_CONSTASCII_USTRINGPARAM ( "Color" ) );
- sal_Bool bUseExtrusionColor = GetBool( rGeometryItem, sExtrusionColor, sal_False );
+ const rtl::OUString aExtrusionColor( RTL_CONSTASCII_USTRINGPARAM ( "Color" ) );
+ sal_Bool bUseExtrusionColor = GetBool( rGeometryItem, aExtrusionColor, sal_False );
XFillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) );
pScene->GetProperties().SetObjectItem( Svx3DShadeModeItem( 0 ) );
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index 0dd668d049ea..08b9f7083bc3 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -65,7 +65,7 @@ namespace toolkitform
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
- static const ::rtl::OUString FM_PROP_NAME(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ static const char FM_PROP_NAME[] = "Name";
namespace
{
@@ -166,7 +166,7 @@ namespace toolkitform
Reference< XInterface > xNormalizedLookup( _rxRadioModel, UNO_QUERY );
::rtl::OUString sRadioGroupName;
- OSL_VERIFY( _rxRadioModel->getPropertyValue( FM_PROP_NAME ) >>= sRadioGroupName );
+ OSL_VERIFY( _rxRadioModel->getPropertyValue( rtl::OUString(FM_PROP_NAME) ) >>= sRadioGroupName );
Reference< XIndexAccess > xCurrentContainer( xRoot );
sal_Int32 nStartWithChild = 0;
@@ -293,7 +293,7 @@ namespace toolkitform
// --------------------------------
// Name, Description, Text
- OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_NAME ) >>= _rpDescriptor->Name );
+ OSL_VERIFY( xModelProps->getPropertyValue( rtl::OUString(FM_PROP_NAME) ) >>= _rpDescriptor->Name );
static const ::rtl::OUString FM_PROP_HELPTEXT(RTL_CONSTASCII_USTRINGPARAM("HelpText"));
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_HELPTEXT ) >>= _rpDescriptor->Description );
Any aText;
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 57841fa1c296..935ea69e2ca5 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -68,8 +68,8 @@ using ::rtl::OUString;
namespace
{
-const OUString lcl_aLabelPrefix( RTL_CONSTASCII_USTRINGPARAM("label "));
-const OUString lcl_aCategoriesRange( RTL_CONSTASCII_USTRINGPARAM("categories"));
+const char aLabelPrefix[] = "label ";
+const char aCategoriesRange[] = "categories";
typedef ::std::multimap< ::rtl::OUString, ::rtl::OUString >
lcl_tOriginalRangeToInternalRangeMap;
@@ -116,6 +116,9 @@ void lcl_fillRangeMapping(
sal_Int32 nRowOffset = ( rTable.bHasHeaderRow ? 1 : 0 );
sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 );
+ const OUString lcl_aCategoriesRange(aCategoriesRange);
+ const OUString lcl_aLabelPrefix(aLabelPrefix);
+
// Fill range mapping
const size_t nTableRowCount( rTable.aData.size());
for( size_t nRow = 0; nRow < nTableRowCount; ++nRow )
@@ -901,6 +904,8 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
lcl_fillRangeMapping( rTable, aRangeMap, eDataRowSource );
+ const OUString lcl_aCategoriesRange(aCategoriesRange);
+
bool bCategoriesApplied = false;
// translate ranges (using the map created before)
for( tSchXMLLSequencesPerIndex::const_iterator aLSeqIt( rLSequencesPerIndex.begin());
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 029fd97be203..522d43fd558e 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -225,11 +225,7 @@ namespace
framebound_map_t m_vFrameBoundsOf;
const Reference<XEnumerationAccess> m_xEnumAccess;
void Fill(const filter_t& rFilter);
- static const OUString our_sAnchorType;
- static const OUString our_sAnchorFrame;
};
- const OUString BoundFrames::our_sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType"));
- const OUString BoundFrames::our_sAnchorFrame(RTL_CONSTASCII_USTRINGPARAM("AnchorFrame"));
class FieldParamExporter
{
@@ -340,6 +336,8 @@ void BoundFrames::Fill(const filter_t& rFilter)
const Reference< XEnumeration > xEnum = m_xEnumAccess->createEnumeration();
if(!xEnum.is())
return;
+ const OUString our_sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType"));
+ const OUString our_sAnchorFrame(RTL_CONSTASCII_USTRINGPARAM("AnchorFrame"));
while(xEnum->hasMoreElements())
{
Reference<XPropertySet> xPropSet(xEnum->nextElement(), UNO_QUERY);