Remove RTL_CONSTASCII_STRINGPARAM (unotools)

Change-Id: I2911e50ddcd007d80498b9d65efd14368ac3baca
This commit is contained in:
Chr. Rossmanith
2013-03-10 20:44:01 +01:00
parent 0b4b37ac7b
commit 407b51db18
22 changed files with 280 additions and 303 deletions

View File

@@ -72,13 +72,11 @@ namespace utl
namespace namespace
{ {
rtl::OUString makeImplName() OUString makeImplName()
{ {
rtl::OUString uri; OUString uri;
rtl::Bootstrap::get( rtl::Bootstrap::get( OUString("BRAND_BASE_DIR"), uri);
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BRAND_BASE_DIR")), return uri + "/program/" + BOOTSTRAP_DATA_NAME;
uri);
return uri + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/program/" BOOTSTRAP_DATA_NAME));
} }
} }
@@ -426,7 +424,7 @@ Bootstrap::PathStatus implGetBootstrapFile(rtl::Bootstrap& _rData, Bootstrap::Im
static static
Bootstrap::PathStatus implGetVersionFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rVersionFile) Bootstrap::PathStatus implGetVersionFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rVersionFile)
{ {
OUString const csVersionFileItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_VERSIONFILE)); OUString const csVersionFileItem(BOOTSTRAP_ITEM_VERSIONFILE);
_rData.getFrom(csVersionFileItem,_rVersionFile.path); _rData.getFrom(csVersionFileItem,_rVersionFile.path);
@@ -569,7 +567,7 @@ static Bootstrap::FailureCode describeError(OUStringBuffer& _rBuf, Bootstrap::Im
OUString Bootstrap::getProductKey() OUString Bootstrap::getProductKey()
{ {
OUString const csProductKeyItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_PRODUCT_KEY)); OUString const csProductKeyItem(BOOTSTRAP_ITEM_PRODUCT_KEY);
OUString const sDefaultProductKey = getExecutableBaseName(); OUString const sDefaultProductKey = getExecutableBaseName();
@@ -579,7 +577,7 @@ OUString Bootstrap::getProductKey()
OUString Bootstrap::getProductKey(OUString const& _sDefault) OUString Bootstrap::getProductKey(OUString const& _sDefault)
{ {
OUString const csProductKeyItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_PRODUCT_KEY)); OUString const csProductKeyItem(BOOTSTRAP_ITEM_PRODUCT_KEY);
return data().getBootstrapValue( csProductKeyItem, _sDefault ); return data().getBootstrapValue( csProductKeyItem, _sDefault );
} }
@@ -598,7 +596,7 @@ OUString Bootstrap::getBuildVersion(OUString const& _sDefault)
OUString Bootstrap::getBuildIdData(OUString const& _sDefault) OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
{ {
OUString const csBuildIdItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_BUILDID)); OUString const csBuildIdItem(BOOTSTRAP_ITEM_BUILDID);
OUString sBuildId; OUString sBuildId;
// read buildid from version.ini (versionrc), if it doesn't exist or buildid is empty // read buildid from version.ini (versionrc), if it doesn't exist or buildid is empty
@@ -632,7 +630,7 @@ PathStatus Bootstrap::locateUserInstallation(OUString& _rURL)
PathStatus Bootstrap::locateUserData(OUString& _rURL) PathStatus Bootstrap::locateUserData(OUString& _rURL)
{ {
OUString const csUserDirItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_USERDIR)); OUString const csUserDirItem(BOOTSTRAP_ITEM_USERDIR);
rtl::Bootstrap aData( data().getImplName() ); rtl::Bootstrap aData( data().getImplName() );
@@ -642,7 +640,7 @@ PathStatus Bootstrap::locateUserData(OUString& _rURL)
} }
else else
{ {
OUString const csUserDir(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_DIRNAME_USERDIR)); OUString const csUserDir(BOOTSTRAP_DIRNAME_USERDIR);
return getDerivedPath(_rURL, data().aUserInstall_ ,csUserDir, aData, csUserDirItem); return getDerivedPath(_rURL, data().aUserInstall_ ,csUserDir, aData, csUserDirItem);
} }
} }
@@ -692,8 +690,8 @@ Bootstrap::Status Bootstrap::checkBootstrapStatus(rtl::OUString& _rDiagnosticMes
bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData) bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData)
{ {
OUString const csBaseInstallItem( RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_BASEINSTALLATION) ); OUString const csBaseInstallItem( BOOTSTRAP_ITEM_BASEINSTALLATION );
OUString const csBaseInstallDefault( RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_DEFAULT_BASEINSTALL) ); OUString const csBaseInstallDefault( BOOTSTRAP_DEFAULT_BASEINSTALL );
_rData.getFrom(csBaseInstallItem, aBaseInstall_.path, csBaseInstallDefault); _rData.getFrom(csBaseInstallItem, aBaseInstall_.path, csBaseInstallDefault);
@@ -707,7 +705,7 @@ bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData)
bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData) bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData)
{ {
OUString const csUserInstallItem( RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_USERINSTALLATION) ); OUString const csUserInstallItem( BOOTSTRAP_ITEM_USERINSTALLATION );
if (_rData.getFrom(csUserInstallItem, aUserInstall_.path)) if (_rData.getFrom(csUserInstallItem, aUserInstall_.path))
{ {
@@ -719,12 +717,12 @@ bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData)
aUserInstall_.status = DATA_MISSING; aUserInstall_.status = DATA_MISSING;
// .. or this - look for a single-user user directory ? // .. or this - look for a single-user user directory ?
OUString const csUserDirItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_USERDIR)); OUString const csUserDirItem(BOOTSTRAP_ITEM_USERDIR);
OUString sDummy; OUString sDummy;
// look for $BASEINSTALLATION/user only if default UserDir setting is used // look for $BASEINSTALLATION/user only if default UserDir setting is used
if (! _rData.getFrom(csUserDirItem, sDummy)) if (! _rData.getFrom(csUserDirItem, sDummy))
{ {
OUString const csUserDir(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_DIRNAME_USERDIR)); OUString const csUserDir(BOOTSTRAP_DIRNAME_USERDIR);
if ( PATH_EXISTS == getDerivedPath(sDummy, aBaseInstall_, csUserDir, _rData, csUserDirItem) ) if ( PATH_EXISTS == getDerivedPath(sDummy, aBaseInstall_, csUserDir, _rData, csUserDirItem) )
aUserInstall_ = aBaseInstall_; aUserInstall_ = aBaseInstall_;
@@ -789,11 +787,9 @@ OUString Bootstrap::Impl::getBootstrapValue(OUString const& _sName, OUString con
sal_Bool Bootstrap::Impl::getVersionValue(OUString const& _sName, OUString& _rValue, OUString const& _sDefault) const sal_Bool Bootstrap::Impl::getVersionValue(OUString const& _sName, OUString& _rValue, OUString const& _sDefault) const
{ {
// try to open version.ini (versionrc) // try to open version.ini (versionrc)
rtl::OUString uri; OUString uri;
rtl::Bootstrap::get( rtl::Bootstrap::get( OUString("BRAND_BASE_DIR"), uri);
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BRAND_BASE_DIR")), uri); rtl::Bootstrap aData( uri + "/program/" + SAL_CONFIGFILE("version") );
rtl::Bootstrap aData( uri +
OUString(RTL_CONSTASCII_USTRINGPARAM("/program/" SAL_CONFIGFILE("version"))) );
if ( aData.getHandle() == NULL ) if ( aData.getHandle() == NULL )
// version.ini (versionrc) doesn't exist // version.ini (versionrc) doesn't exist
return sal_False; return sal_False;

View File

@@ -39,17 +39,17 @@ using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::beans ; using namespace ::com::sun::star::beans ;
#define ROOTNODE_CMDOPTIONS OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Commands/Execute" )) #define ROOTNODE_CMDOPTIONS OUString("Office.Commands/Execute")
#define PATHDELIMITER OUString(RTL_CONSTASCII_USTRINGPARAM("/" )) #define PATHDELIMITER OUString("/")
#define SETNODE_DISABLED OUString(RTL_CONSTASCII_USTRINGPARAM("Disabled" )) #define SETNODE_DISABLED OUString("Disabled")
#define PROPERTYNAME_CMD OUString(RTL_CONSTASCII_USTRINGPARAM("Command" )) #define PROPERTYNAME_CMD OUString("Command")
// Method to retrieve a hash code from a string. May be we have to change it to decrease collisions in the hash map // Method to retrieve a hash code from a string. May be we have to change it to decrease collisions in the hash map
struct OUStringHashCode struct OUStringHashCode
{ {
size_t operator()( const ::rtl::OUString& sString ) const size_t operator()( const OUString& sString ) const
{ {
return sString.hashCode(); return sString.hashCode();
} }
@@ -235,7 +235,7 @@ SvtCommandOptions_Impl::SvtCommandOptions_Impl()
// Enable notification mechanism of ouer baseclass. // Enable notification mechanism of ouer baseclass.
// We need it to get information about changes outside these class on ouer used configuration keys! */ // We need it to get information about changes outside these class on ouer used configuration keys! */
Sequence< OUString > aNotifySeq( 1 ); Sequence< OUString > aNotifySeq( 1 );
aNotifySeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Disabled" )); aNotifySeq[0] = "Disabled";
EnableNotification( aNotifySeq, sal_True ); EnableNotification( aNotifySeq, sal_True );
} }

View File

@@ -42,9 +42,9 @@ using namespace ::osl;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
#define ROOTNODE_OPTIONS OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Compatibility/" ) ) #define ROOTNODE_OPTIONS OUString( "Office.Compatibility/" )
#define PATHDELIMITER OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) #define PATHDELIMITER OUString( "/" )
#define SETNODE_ALLFILEFORMATS OUString( RTL_CONSTASCII_USTRINGPARAM( "AllFileFormats" ) ) #define SETNODE_ALLFILEFORMATS OUString( "AllFileFormats" )
#define PROPERTYNAME_NAME COMPATIBILITY_PROPERTYNAME_NAME #define PROPERTYNAME_NAME COMPATIBILITY_PROPERTYNAME_NAME
#define PROPERTYNAME_MODULE COMPATIBILITY_PROPERTYNAME_MODULE #define PROPERTYNAME_MODULE COMPATIBILITY_PROPERTYNAME_MODULE

View File

@@ -66,19 +66,16 @@ getConfigurationProvider() {
return css::configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() ); return css::configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() );
} }
rtl::OUString getConfigurationString( OUString getConfigurationString(OUString const & module, OUString const & path)
rtl::OUString const & module, rtl::OUString const & path)
{ {
css::uno::Sequence< css::uno::Any > args(1); css::uno::Sequence< css::uno::Any > args(1);
args[0] <<= css::beans::NamedValue( args[0] <<= css::beans::NamedValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), OUString("nodepath"),
css::uno::makeAny(module)); css::uno::makeAny(module));
return return
css::uno::Reference< css::container::XHierarchicalNameAccess >( css::uno::Reference< css::container::XHierarchicalNameAccess >(
getConfigurationProvider()->createInstanceWithArguments( getConfigurationProvider()->createInstanceWithArguments(
rtl::OUString( OUString("com.sun.star.configuration.ConfigurationAccess"),
RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.ConfigurationAccess")),
args), args),
css::uno::UNO_QUERY_THROW)-> css::uno::UNO_QUERY_THROW)->
getByHierarchicalName(path).get< rtl::OUString >(); getByHierarchicalName(path).get< rtl::OUString >();
@@ -90,77 +87,70 @@ struct theConfigManager:
} }
rtl::OUString utl::ConfigManager::getAboutBoxProductVersion() { OUString utl::ConfigManager::getAboutBoxProductVersion() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString( OUString("Product/ooSetupVersionAboutBox"));
RTL_CONSTASCII_USTRINGPARAM("Product/ooSetupVersionAboutBox")));
} }
rtl::OUString utl::ConfigManager::getAboutBoxProductVersionSuffix() { OUString utl::ConfigManager::getAboutBoxProductVersionSuffix() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString( OUString("Product/ooSetupVersionAboutBoxSuffix"));
RTL_CONSTASCII_USTRINGPARAM("Product/ooSetupVersionAboutBoxSuffix")));
} }
rtl::OUString utl::ConfigManager::getDefaultCurrency() { OUString utl::ConfigManager::getDefaultCurrency() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooSetupCurrency"))); OUString("L10N/ooSetupCurrency"));
} }
rtl::OUString utl::ConfigManager::getLocale() { OUString utl::ConfigManager::getLocale() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale"))); OUString("L10N/ooLocale"));
} }
rtl::OUString utl::ConfigManager::getProductExtension() { OUString utl::ConfigManager::getProductExtension() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Product/ooSetupExtension"))); OUString("Product/ooSetupExtension"));
} }
rtl::OUString utl::ConfigManager::getProductName() { OUString utl::ConfigManager::getProductName() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Product/ooName"))); OUString("Product/ooName"));
} }
rtl::OUString utl::ConfigManager::getProductVersion() { OUString utl::ConfigManager::getProductVersion() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Product/ooSetupVersion"))); OUString("Product/ooSetupVersion"));
} }
rtl::OUString utl::ConfigManager::getProductXmlFileFormat() { OUString utl::ConfigManager::getProductXmlFileFormat() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString( OUString("Product/ooXMLFileFormatName"));
RTL_CONSTASCII_USTRINGPARAM("Product/ooXMLFileFormatName")));
} }
rtl::OUString utl::ConfigManager::getProductXmlFileFormatVersion() { OUString utl::ConfigManager::getProductXmlFileFormatVersion() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString( OUString("Product/ooXMLFileFormatVersion"));
RTL_CONSTASCII_USTRINGPARAM("Product/ooXMLFileFormatVersion")));
} }
rtl::OUString utl::ConfigManager::getVendor() { OUString utl::ConfigManager::getVendor() {
return getConfigurationString( return getConfigurationString(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")), OUString("/org.openoffice.Setup"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Product/ooVendor"))); OUString("Product/ooVendor"));
} }
rtl::OUString utl::ConfigManager::getWriterCompatibilityVersionOOo_1_1() { OUString utl::ConfigManager::getWriterCompatibilityVersionOOo_1_1() {
return getConfigurationString( return getConfigurationString(
rtl::OUString( OUString("/org.openoffice.Office.Compatibility"),
RTL_CONSTASCII_USTRINGPARAM( OUString("WriterCompatibilityVersion/OOo11"));
"/org.openoffice.Office.Compatibility")),
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("WriterCompatibilityVersion/OOo11")));
} }
void utl::ConfigManager::storeConfigItems() { void utl::ConfigManager::storeConfigItems() {
@@ -175,21 +165,16 @@ css::uno::Reference< css::container::XHierarchicalNameAccess >
utl::ConfigManager::acquireTree(utl::ConfigItem & item) { utl::ConfigManager::acquireTree(utl::ConfigItem & item) {
css::uno::Sequence< css::uno::Any > args(1); css::uno::Sequence< css::uno::Any > args(1);
args[0] <<= css::beans::NamedValue( args[0] <<= css::beans::NamedValue(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), OUString("nodepath"),
css::uno::makeAny( css::uno::makeAny(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.")) + OUString("/org.openoffice.") + item.GetSubTreeName()));
item.GetSubTreeName()));
if ((item.GetMode() & CONFIG_MODE_ALL_LOCALES) != 0) { if ((item.GetMode() & CONFIG_MODE_ALL_LOCALES) != 0) {
args.realloc(2); args.realloc(2);
args[1] <<= css::beans::NamedValue( args[1] <<= css::beans::NamedValue(OUString("locale"), css::uno::makeAny(OUString("*")));
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("locale")),
css::uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"))));
} }
return css::uno::Reference< css::container::XHierarchicalNameAccess >( return css::uno::Reference< css::container::XHierarchicalNameAccess >(
getConfigurationProvider()->createInstanceWithArguments( getConfigurationProvider()->createInstanceWithArguments(
rtl::OUString( OUString("com.sun.star.configuration.ConfigurationUpdateAccess"),
RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.configuration.ConfigurationUpdateAccess")),
args), args),
css::uno::UNO_QUERY_THROW); css::uno::UNO_QUERY_THROW);
} }

View File

@@ -45,13 +45,13 @@ void lcl_resolveCharEntities(OUString & aLocalString)
do do
{ {
sal_Unicode ch = 0; sal_Unicode ch = 0;
if (aLocalString.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("&amp;"),nEscapePos)) if (aLocalString.match("&amp;",nEscapePos))
ch = '&'; ch = '&';
else if (aLocalString.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("&apos;"),nEscapePos)) else if (aLocalString.match("&apos;",nEscapePos))
ch = '\''; ch = '\'';
else if (aLocalString.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("&quot;"),nEscapePos)) else if (aLocalString.match("&quot;",nEscapePos))
ch = '"'; ch = '"';
OSL_ENSURE(ch,"Configuration path contains '&' that is not part of a valid character escape"); OSL_ENSURE(ch,"Configuration path contains '&' that is not part of a valid character escape");
@@ -256,7 +256,7 @@ OUString lcl_wrapName(const OUString& _sContent, const OUString& _sType)
rtl::OUStringBuffer aNormalized(_sType.getLength() + _sContent.getLength() + 4); // reserve approximate size initially rtl::OUStringBuffer aNormalized(_sType.getLength() + _sContent.getLength() + 4); // reserve approximate size initially
// prefix: type, opening bracket and quote // prefix: type, opening bracket and quote
aNormalized.append( _sType ).appendAscii( RTL_CONSTASCII_STRINGPARAM("['") ); aNormalized.append( _sType ).append( "['" );
// content: copy over each char and handle escaping // content: copy over each char and handle escaping
for(const sal_Unicode* pCur = pBeginContent; pCur != pEndContent; ++pCur) for(const sal_Unicode* pCur = pBeginContent; pCur != pEndContent; ++pCur)
@@ -264,16 +264,16 @@ OUString lcl_wrapName(const OUString& _sContent, const OUString& _sType)
// append (escape if needed) // append (escape if needed)
switch(*pCur) switch(*pCur)
{ {
case sal_Unicode('&') : aNormalized.appendAscii( RTL_CONSTASCII_STRINGPARAM("&amp;") ); break; case sal_Unicode('&') : aNormalized.append( "&amp;" ); break;
case sal_Unicode('\''): aNormalized.appendAscii( RTL_CONSTASCII_STRINGPARAM("&apos;") ); break; case sal_Unicode('\''): aNormalized.append( "&apos;" ); break;
case sal_Unicode('\"'): aNormalized.appendAscii( RTL_CONSTASCII_STRINGPARAM("&quot;") ); break; case sal_Unicode('\"'): aNormalized.append( "&quot;" ); break;
default: aNormalized.append( *pCur ); default: aNormalized.append( *pCur );
} }
} }
// suffix: closing quote and bracket // suffix: closing quote and bracket
aNormalized.appendAscii( RTL_CONSTASCII_STRINGPARAM("']") ); aNormalized.append( "']" );
return aNormalized.makeStringAndClear(); return aNormalized.makeStringAndClear();
} }
@@ -282,7 +282,7 @@ OUString lcl_wrapName(const OUString& _sContent, const OUString& _sType)
OUString wrapConfigurationElementName(OUString const& _sElementName) OUString wrapConfigurationElementName(OUString const& _sElementName)
{ {
return lcl_wrapName(_sElementName, OUString(RTL_CONSTASCII_USTRINGPARAM("*")) ); return lcl_wrapName(_sElementName, "*" );
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@@ -260,7 +260,7 @@ SvtDefaultOptions_Impl::SvtDefaultOptions_Impl() : ConfigItem( "Office.Common/Pa
aTempStr = aPathOpt.SubstituteVariable( aList[ nPosition ] ); aTempStr = aPathOpt.SubstituteVariable( aList[ nPosition ] );
aFullPath += aTempStr; aFullPath += aTempStr;
if ( nPosition < nCount-1 ) if ( nPosition < nCount-1 )
aFullPath += OUString( RTL_CONSTASCII_USTRINGPARAM(";") ); aFullPath += ";";
} }
} }
else else

View File

@@ -39,12 +39,12 @@ using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::beans ; using namespace ::com::sun::star::beans ;
#define ROOTNODE_MENUS OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Menus/" )) #define ROOTNODE_MENUS OUString("Office.Common/Menus/")
#define PATHDELIMITER OUString(RTL_CONSTASCII_USTRINGPARAM("/" )) #define PATHDELIMITER OUString("/")
#define SETNODE_NEWMENU OUString(RTL_CONSTASCII_USTRINGPARAM("New" )) #define SETNODE_NEWMENU OUString("New")
#define SETNODE_WIZARDMENU OUString(RTL_CONSTASCII_USTRINGPARAM("Wizard" )) #define SETNODE_WIZARDMENU OUString("Wizard")
#define SETNODE_HELPBOOKMARKS OUString(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarks" )) #define SETNODE_HELPBOOKMARKS OUString("HelpBookmarks")
#define PROPERTYNAME_URL DYNAMICMENU_PROPERTYNAME_URL #define PROPERTYNAME_URL DYNAMICMENU_PROPERTYNAME_URL
#define PROPERTYNAME_TITLE DYNAMICMENU_PROPERTYNAME_TITLE #define PROPERTYNAME_TITLE DYNAMICMENU_PROPERTYNAME_TITLE
@@ -58,8 +58,8 @@ using namespace ::com::sun::star::beans ;
#define OFFSET_IMAGEIDENTIFIER 2 #define OFFSET_IMAGEIDENTIFIER 2
#define OFFSET_TARGETNAME 3 #define OFFSET_TARGETNAME 3
#define PATHPREFIX_SETUP OUString(RTL_CONSTASCII_USTRINGPARAM("m" )) #define PATHPREFIX_SETUP OUString("m")
#define PATHPREFIX_USER OUString(RTL_CONSTASCII_USTRINGPARAM("u" )) #define PATHPREFIX_USER OUString("u")
/*-**************************************************************************************************************** /*-****************************************************************************************************************
@descr struct to hold information about one menu entry. @descr struct to hold information about one menu entry.
@@ -146,7 +146,7 @@ class SvtDynMenu
sal_Int32 nStep = 0; sal_Int32 nStep = 0;
Sequence< PropertyValue > lProperties ( PROPERTYCOUNT ); Sequence< PropertyValue > lProperties ( PROPERTYCOUNT );
Sequence< Sequence< PropertyValue > > lResult ( nSetupCount+nUserCount ); Sequence< Sequence< PropertyValue > > lResult ( nSetupCount+nUserCount );
OUString sSeperator ( RTL_CONSTASCII_USTRINGPARAM("private:separator") ); OUString sSeperator ( "private:separator" );
OUString sEmpty ; OUString sEmpty ;
const vector< SvtDynMenuEntry >* pList = &lSetupEntries; const vector< SvtDynMenuEntry >* pList = &lSetupEntries;

View File

@@ -40,10 +40,10 @@ using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star; using namespace ::com::sun::star;
#define ROOTNODE_EVENTS OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Events/ApplicationEvents" )) #define ROOTNODE_EVENTS OUString("Office.Events/ApplicationEvents")
#define PATHDELIMITER OUString(RTL_CONSTASCII_USTRINGPARAM("/")) #define PATHDELIMITER OUString("/")
#define SETNODE_BINDINGS OUString(RTL_CONSTASCII_USTRINGPARAM("Bindings" )) #define SETNODE_BINDINGS OUString("Bindings")
#define PROPERTYNAME_BINDINGURL OUString(RTL_CONSTASCII_USTRINGPARAM("BindingURL")) #define PROPERTYNAME_BINDINGURL OUString("BindingURL")
const char* pEventAsciiNames[] = const char* pEventAsciiNames[] =
{ {
@@ -81,34 +81,34 @@ GlobalEventConfig_Impl::GlobalEventConfig_Impl()
: ConfigItem( ROOTNODE_EVENTS, CONFIG_MODE_IMMEDIATE_UPDATE ) : ConfigItem( ROOTNODE_EVENTS, CONFIG_MODE_IMMEDIATE_UPDATE )
{ {
// the supported event names // the supported event names
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_STARTAPP] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_STARTAPP] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CLOSEAPP] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CLOSEAPP] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_DOCCREATED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_DOCCREATED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CREATEDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CREATEDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_LOADFINISHED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_LOADFINISHED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_OPENDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_OPENDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_PREPARECLOSEDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_PREPARECLOSEDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CLOSEDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CLOSEDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEDOCDONE] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEDOCDONE] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEDOCFAILED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEDOCFAILED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEASDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEASDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEASDOCDONE] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEASDOCDONE] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEASDOCFAILED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVEASDOCFAILED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVETODOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVETODOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVETODOCDONE] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVETODOCDONE] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVETODOCFAILED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_SAVETODOCFAILED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_ACTIVATEDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_ACTIVATEDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_DEACTIVATEDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_DEACTIVATEDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_PRINTDOC] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_PRINTDOC] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_VIEWCREATED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_VIEWCREATED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_PREPARECLOSEVIEW] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_PREPARECLOSEVIEW] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CLOSEVIEW] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_CLOSEVIEW] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_MODIFYCHANGED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_MODIFYCHANGED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_TITLECHANGED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_TITLECHANGED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_VISAREACHANGED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_VISAREACHANGED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_MODECHANGED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_MODECHANGED] ) );
m_supportedEvents.push_back(::rtl::OUString::createFromAscii( pEventAsciiNames[STR_EVENT_STORAGECHANGED] ) ); m_supportedEvents.push_back(OUString::createFromAscii( pEventAsciiNames[STR_EVENT_STORAGECHANGED] ) );
initBindingInfo(); initBindingInfo();
@@ -116,7 +116,7 @@ GlobalEventConfig_Impl::GlobalEventConfig_Impl()
// Enable notification mechanism of our baseclass. // Enable notification mechanism of our baseclass.
// We need it to get information about changes outside these class on our used configuration keys! */ // We need it to get information about changes outside these class on our used configuration keys! */
Sequence< OUString > aNotifySeq( 1 ); Sequence< OUString > aNotifySeq( 1 );
aNotifySeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Events" )); aNotifySeq[0] = OUString( "Events" );
EnableNotification( aNotifySeq, sal_True ); EnableNotification( aNotifySeq, sal_True );
} }
@@ -174,8 +174,8 @@ void GlobalEventConfig_Impl::Commit()
ClearNodeSet( SETNODE_BINDINGS ); ClearNodeSet( SETNODE_BINDINGS );
Sequence< beans::PropertyValue > seqValues( 1 ); Sequence< beans::PropertyValue > seqValues( 1 );
OUString sNode; OUString sNode;
static const OUString sPrefix(SETNODE_BINDINGS + PATHDELIMITER + OUString(RTL_CONSTASCII_USTRINGPARAM("BindingType['"))); static const OUString sPrefix(SETNODE_BINDINGS + PATHDELIMITER + OUString("BindingType['"));
static const OUString sPostfix(OUString(RTL_CONSTASCII_USTRINGPARAM("']")) + PATHDELIMITER + PROPERTYNAME_BINDINGURL); static const OUString sPostfix(OUString("']") + PATHDELIMITER + PROPERTYNAME_BINDINGURL);
//step through the list of events //step through the list of events
for(int i=0;it!=it_end;++it,++i) for(int i=0;it!=it_end;++it,++i)
{ {
@@ -256,9 +256,9 @@ Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (c
{ {
Any aRet; Any aRet;
Sequence< beans::PropertyValue > props(2); Sequence< beans::PropertyValue > props(2);
props[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("EventType")); props[0].Name = OUString("EventType");
props[0].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("Script")); props[0].Value <<= OUString("Script");
props[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Script")); props[1].Name = OUString("Script");
EventBindingHash::const_iterator it = m_eventBindingHash.find( aName ); EventBindingHash::const_iterator it = m_eventBindingHash.find( aName );
if( it != m_eventBindingHash.end() ) if( it != m_eventBindingHash.end() )
{ {

View File

@@ -37,12 +37,12 @@ using namespace ::rtl ;
using namespace ::osl ; using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
#define ROOTNODE_SECURITY OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Security")) #define ROOTNODE_SECURITY OUString("Office.Security")
#define SECURE_EXTENSIONS_SET OUString(RTL_CONSTASCII_USTRINGPARAM("SecureExtensions")) #define SECURE_EXTENSIONS_SET OUString("SecureExtensions")
#define EXTENSION_PROPNAME OUString(RTL_CONSTASCII_USTRINGPARAM("/Extension")) #define EXTENSION_PROPNAME OUString("/Extension")
#define PROPERTYNAME_HYPERLINKS_OPEN OUString(RTL_CONSTASCII_USTRINGPARAM("Hyperlinks/Open")) #define PROPERTYNAME_HYPERLINKS_OPEN OUString("Hyperlinks/Open")
#define PROPERTYHANDLE_HYPERLINKS_OPEN 0 #define PROPERTYHANDLE_HYPERLINKS_OPEN 0
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::uno ;
struct OUStringHashCode struct OUStringHashCode
{ {
size_t operator()( const ::rtl::OUString& sString ) const size_t operator()( const OUString& sString ) const
{ {
return sString.hashCode(); return sString.hashCode();
} }

View File

@@ -111,13 +111,12 @@ DefaultFontConfiguration::DefaultFontConfiguration()
m_xConfigProvider = theDefaultProvider::get( xContext ); m_xConfigProvider = theDefaultProvider::get( xContext );
Sequence< Any > aArgs(1); Sequence< Any > aArgs(1);
PropertyValue aVal; PropertyValue aVal;
aVal.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); aVal.Name = OUString( "nodepath" );
aVal.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.VCL/DefaultFonts" ) ); aVal.Value <<= OUString( "/org.openoffice.VCL/DefaultFonts" );
aArgs.getArray()[0] <<= aVal; aArgs.getArray()[0] <<= aVal;
m_xConfigAccess = m_xConfigAccess =
Reference< XNameAccess >( Reference< XNameAccess >(
m_xConfigProvider->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( m_xConfigProvider->createInstanceWithArguments( OUString( "com.sun.star.configuration.ConfigurationAccess" ),
"com.sun.star.configuration.ConfigurationAccess" )),
aArgs ), aArgs ),
UNO_QUERY ); UNO_QUERY );
if( m_xConfigAccess.is() ) if( m_xConfigAccess.is() )
@@ -242,7 +241,7 @@ OUString DefaultFontConfiguration::getDefaultFont( const Locale& rLocale, int nT
} }
if( aRet.isEmpty() ) if( aRet.isEmpty() )
{ {
aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); aLocale.Language = OUString( "en" );
aRet = tryLocale( aLocale, aType ); aRet = tryLocale( aLocale, aType );
} }
return aRet; return aRet;
@@ -272,15 +271,13 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
#define FALLBACKFONT_UI_SANS_CHINTRD "Andale Sans UI;Arial Unicode MS;AR PL Mingti2L Big5;AR PL KaitiM Big5;Kai;PMingLiU;MingLiU;Ming;Lucida Sans Unicode;gnu-unifont;Interface User;" #define FALLBACKFONT_UI_SANS_CHINTRD "Andale Sans UI;Arial Unicode MS;AR PL Mingti2L Big5;AR PL KaitiM Big5;Kai;PMingLiU;MingLiU;Ming;Lucida Sans Unicode;gnu-unifont;Interface User;"
// optimize font list for some locales, as long as Andale Sans UI does not support them // optimize font list for some locales, as long as Andale Sans UI does not support them
if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ar" ) ) || if( aLocale.Language == "ar" || aLocale.Language == "he" || aLocale.Language == "iw" )
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "he" ) ) ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "iw" ) ) )
{ {
return rtl::OUString(FALLBACKFONT_UI_SANS_ARABIC); return OUString(FALLBACKFONT_UI_SANS_ARABIC);
} }
else if ( aLocale.Language == "th" ) else if ( aLocale.Language == "th" )
{ {
return rtl::OUString(FALLBACKFONT_UI_SANS_THAI); return OUString(FALLBACKFONT_UI_SANS_THAI);
} }
else if ( aLocale.Language == "ko" ) else if ( aLocale.Language == "ko" )
{ {
@@ -297,22 +294,22 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
return aFallBackKoreanLocalized.makeStringAndClear(); return aFallBackKoreanLocalized.makeStringAndClear();
} }
else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cs" ) ) || else if( aLocale.Language == "cs" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hu" ) ) || aLocale.Language == "hu" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "pl" ) ) || aLocale.Language == "pl" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ro" ) ) || aLocale.Language == "ro" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "rm" ) ) || aLocale.Language == "rm" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hr" ) ) || aLocale.Language == "hr" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sk" ) ) || aLocale.Language == "sk" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sl" ) ) || aLocale.Language == "sl" ||
aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sb" ) ) ) aLocale.Language == "sb")
{ {
return rtl::OUString(FALLBACKFONT_UI_SANS_LATIN2); return OUString(FALLBACKFONT_UI_SANS_LATIN2);
} }
else if (MsLangId::isTraditionalChinese(aLocale)) else if (MsLangId::isTraditionalChinese(aLocale))
return rtl::OUString(FALLBACKFONT_UI_SANS_CHINTRD); return OUString(FALLBACKFONT_UI_SANS_CHINTRD);
else if (MsLangId::isSimplifiedChinese(aLocale)) else if (MsLangId::isSimplifiedChinese(aLocale))
return rtl::OUString(FALLBACKFONT_UI_SANS_CHINSIM); return OUString(FALLBACKFONT_UI_SANS_CHINSIM);
else if ( aLocale.Language == "ja" ) else if ( aLocale.Language == "ja" )
{ {
// we need localized names for japanese fonts // we need localized names for japanese fonts
@@ -379,13 +376,12 @@ FontSubstConfiguration::FontSubstConfiguration() :
m_xConfigProvider = theDefaultProvider::get( xContext ); m_xConfigProvider = theDefaultProvider::get( xContext );
Sequence< Any > aArgs(1); Sequence< Any > aArgs(1);
PropertyValue aVal; PropertyValue aVal;
aVal.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); aVal.Name = OUString( "nodepath" );
aVal.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.VCL/FontSubstitutions" ) ); aVal.Value <<= OUString( "/org.openoffice.VCL/FontSubstitutions" );
aArgs.getArray()[0] <<= aVal; aArgs.getArray()[0] <<= aVal;
m_xConfigAccess = m_xConfigAccess =
Reference< XNameAccess >( Reference< XNameAccess >(
m_xConfigProvider->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( m_xConfigProvider->createInstanceWithArguments( OUString( "com.sun.star.configuration.ConfigurationAccess" ),
"com.sun.star.configuration.ConfigurationAccess" )),
aArgs ), aArgs ),
UNO_QUERY ); UNO_QUERY );
if( m_xConfigAccess.is() ) if( m_xConfigAccess.is() )
@@ -1092,13 +1088,13 @@ void FontSubstConfiguration::readLocaleSubst( const com::sun::star::lang::Locale
it->second.aSubstAttributes.reserve( nFonts ); it->second.aSubstAttributes.reserve( nFonts );
// strings for subst retrieval, construct only once // strings for subst retrieval, construct only once
OUString aSubstFontsStr ( RTL_CONSTASCII_USTRINGPARAM( "SubstFonts" ) ); OUString aSubstFontsStr ( "SubstFonts" );
OUString aSubstFontsMSStr ( RTL_CONSTASCII_USTRINGPARAM( "SubstFontsMS" ) ); OUString aSubstFontsMSStr ( "SubstFontsMS" );
OUString aSubstFontsPSStr ( RTL_CONSTASCII_USTRINGPARAM( "SubstFontsPS" ) ); OUString aSubstFontsPSStr ( "SubstFontsPS" );
OUString aSubstFontsHTMLStr ( RTL_CONSTASCII_USTRINGPARAM( "SubstFontsHTML" ) ); OUString aSubstFontsHTMLStr ( "SubstFontsHTML" );
OUString aSubstWeightStr ( RTL_CONSTASCII_USTRINGPARAM( "FontWeight" ) ); OUString aSubstWeightStr ( "FontWeight" );
OUString aSubstWidthStr ( RTL_CONSTASCII_USTRINGPARAM( "FontWidth" ) ); OUString aSubstWidthStr ( "FontWidth" );
OUString aSubstTypeStr ( RTL_CONSTASCII_USTRINGPARAM( "FontType" ) ); OUString aSubstTypeStr ( "FontType" );
for( int i = 0; i < nFonts; i++ ) for( int i = 0; i < nFonts; i++ )
{ {
Reference< XNameAccess > xFont; Reference< XNameAccess > xFont;
@@ -1188,7 +1184,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const String& rFontNam
else if( !aLocale.Country.isEmpty() ) else if( !aLocale.Country.isEmpty() )
aLocale.Country = OUString(); aLocale.Country = OUString();
else if( aLocale.Language != "en" ) else if( aLocale.Language != "en" )
aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); aLocale.Language = OUString( "en" );
else else
aLocale.Language = OUString(); aLocale.Language = OUString();
} }

View File

@@ -34,11 +34,11 @@ using namespace ::rtl ;
using namespace ::osl ; using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
#define ROOTNODE_FONT OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Font" )) #define ROOTNODE_FONT OUString("Office.Common/Font")
#define PROPERTYNAME_REPLACEMENTTABLE OUString(RTL_CONSTASCII_USTRINGPARAM("Substitution/Replacement" )) #define PROPERTYNAME_REPLACEMENTTABLE OUString("Substitution/Replacement")
#define PROPERTYNAME_FONTHISTORY OUString(RTL_CONSTASCII_USTRINGPARAM("View/History" )) #define PROPERTYNAME_FONTHISTORY OUString("View/History")
#define PROPERTYNAME_FONTWYSIWYG OUString(RTL_CONSTASCII_USTRINGPARAM("View/ShowFontBoxWYSIWYG" )) #define PROPERTYNAME_FONTWYSIWYG OUString("View/ShowFontBoxWYSIWYG")
#define PROPERTYHANDLE_REPLACEMENTTABLE 0 #define PROPERTYHANDLE_REPLACEMENTTABLE 0
#define PROPERTYHANDLE_FONTHISTORY 1 #define PROPERTYHANDLE_FONTHISTORY 1

View File

@@ -41,16 +41,16 @@ using namespace ::std ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
using namespace ::com::sun::star::beans ; using namespace ::com::sun::star::beans ;
#define ROOTNODE_INTERNAL OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Internal" )) #define ROOTNODE_INTERNAL OUString("Office.Common/Internal")
#define DEFAULT_SLOTCFG sal_False #define DEFAULT_SLOTCFG sal_False
#define DEFAULT_SENDCRASHMAIL sal_False #define DEFAULT_SENDCRASHMAIL sal_False
#define DEFAULT_USEMAILUI sal_True #define DEFAULT_USEMAILUI sal_True
#define DEFAULT_CURRENTTEMPURL OUString(RTL_CONSTASCII_USTRINGPARAM("")) #define DEFAULT_CURRENTTEMPURL OUString("")
#define FIXPROPERTYNAME_SLOTCFG OUString(RTL_CONSTASCII_USTRINGPARAM("Slot" )) #define FIXPROPERTYNAME_SLOTCFG OUString("Slot")
#define FIXPROPERTYNAME_SENDCRASHMAIL OUString(RTL_CONSTASCII_USTRINGPARAM("SendCrashMail" )) #define FIXPROPERTYNAME_SENDCRASHMAIL OUString("SendCrashMail")
#define FIXPROPERTYNAME_USEMAILUI OUString(RTL_CONSTASCII_USTRINGPARAM("UseMailUI" )) #define FIXPROPERTYNAME_USEMAILUI OUString("UseMailUI")
#define FIXPROPERTYNAME_CURRENTTEMPURL OUString(RTL_CONSTASCII_USTRINGPARAM("CurrentTempURL" )) #define FIXPROPERTYNAME_CURRENTTEMPURL OUString("CurrentTempURL")
#define FIXPROPERTYHANDLE_SLOTCFG 0 #define FIXPROPERTYHANDLE_SLOTCFG 0
#define FIXPROPERTYHANDLE_SENDCRASHMAIL 1 #define FIXPROPERTYHANDLE_SENDCRASHMAIL 1

View File

@@ -895,7 +895,7 @@ sal_Bool SvtLinguConfig::GetElementNamesFor(
try try
{ {
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW );
rElementNames = xNA->getElementNames(); rElementNames = xNA->getElementNames();
bSuccess = true; bSuccess = true;
@@ -917,10 +917,10 @@ sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
try try
{ {
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rSetEntry ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rSetEntry ), uno::UNO_QUERY_THROW );
if (xNA->getByName( rtl::OUString(aG_SupportedDictionaryFormats) ) >>= rFormatList) if (xNA->getByName( OUString(aG_SupportedDictionaryFormats) ) >>= rFormatList)
bSuccess = true; bSuccess = true;
DBG_ASSERT( rFormatList.getLength(), "supported dictionary format list is empty" ); DBG_ASSERT( rFormatList.getLength(), "supported dictionary format list is empty" );
} }
@@ -953,8 +953,8 @@ static bool lcl_GetFileUrlFromOrigin(
bool bSuccess = false; bool bSuccess = false;
if (!rOrigin.isEmpty()) if (!rOrigin.isEmpty())
{ {
rtl::OUString aURL( rOrigin ); OUString aURL( rOrigin );
if (( aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( EXPAND_PROTOCOL )) == 0 ) && if (( aURL.compareTo( EXPAND_PROTOCOL ) == 0 ) &&
rxMacroExpander.is() ) rxMacroExpander.is() )
{ {
// cut protocol // cut protocol
@@ -964,7 +964,7 @@ static bool lcl_GetFileUrlFromOrigin(
// expand macro string // expand macro string
aURL = rxMacroExpander->expandMacros( aMacro ); aURL = rxMacroExpander->expandMacros( aMacro );
bool bIsFileUrl = aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( FILE_PROTOCOL )) == 0; bool bIsFileUrl = aURL.compareTo( FILE_PROTOCOL ) == 0;
if (bIsFileUrl) if (bIsFileUrl)
{ {
rFileUrl = aURL; rFileUrl = aURL;
@@ -994,17 +994,17 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry(
try try
{ {
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(aG_Dictionaries)), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString(aG_Dictionaries)), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW );
// read group data... // read group data...
uno::Sequence< rtl::OUString > aLocations; uno::Sequence< OUString > aLocations;
rtl::OUString aFormatName; OUString aFormatName;
uno::Sequence< rtl::OUString > aLocaleNames; uno::Sequence< OUString > aLocaleNames;
bSuccess = (xNA->getByName( rtl::OUString(aG_Locations) ) >>= aLocations) && bSuccess = (xNA->getByName( OUString(aG_Locations) ) >>= aLocations) &&
(xNA->getByName( rtl::OUString(aG_Format) ) >>= aFormatName) && (xNA->getByName( OUString(aG_Format) ) >>= aFormatName) &&
(xNA->getByName( rtl::OUString(aG_Locales) ) >>= aLocaleNames); (xNA->getByName( OUString(aG_Locales) ) >>= aLocaleNames);
DBG_ASSERT( aLocations.getLength(), "Dictionary locations not set" ); DBG_ASSERT( aLocations.getLength(), "Dictionary locations not set" );
DBG_ASSERT( !aFormatName.isEmpty(), "Dictionary format name not set" ); DBG_ASSERT( !aFormatName.isEmpty(), "Dictionary format name not set" );
DBG_ASSERT( aLocaleNames.getLength(), "No locales set for the dictionary" ); DBG_ASSERT( aLocaleNames.getLength(), "No locales set for the dictionary" );
@@ -1042,8 +1042,8 @@ uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
try try
{ {
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW );
xNA->getByName( rtl::OUString(aG_DisabledDictionaries) ) >>= aResult; xNA->getByName( OUString(aG_DisabledDictionaries) ) >>= aResult;
} }
catch (uno::Exception &) catch (uno::Exception &)
{ {
@@ -1052,7 +1052,7 @@ uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
} }
std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionariesByFormat( std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionariesByFormat(
const rtl::OUString &rFormatName ) const OUString &rFormatName )
{ {
std::vector< SvtLinguConfigDictionaryEntry > aRes; std::vector< SvtLinguConfigDictionaryEntry > aRes;
if (rFormatName.isEmpty()) if (rFormatName.isEmpty())
@@ -1115,13 +1115,13 @@ uno::Reference< util::XChangesBatch > SvtLinguConfig::GetMainUpdateAccess() cons
// get configuration update access // get configuration update access
beans::PropertyValue aValue; beans::PropertyValue aValue;
aValue.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); aValue.Name = OUString("nodepath");
aValue.Value = uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Linguistic"))); aValue.Value = uno::makeAny(OUString("org.openoffice.Office.Linguistic"));
uno::Sequence< uno::Any > aProps(1); uno::Sequence< uno::Any > aProps(1);
aProps[0] <<= aValue; aProps[0] <<= aValue;
m_xMainUpdateAccess = uno::Reference< util::XChangesBatch >( m_xMainUpdateAccess = uno::Reference< util::XChangesBatch >(
xConfigurationProvider->createInstanceWithArguments( xConfigurationProvider->createInstanceWithArguments(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess")), aProps), OUString("com.sun.star.configuration.ConfigurationUpdateAccess"), aProps),
uno::UNO_QUERY_THROW ); uno::UNO_QUERY_THROW );
} }
catch (uno::Exception &) catch (uno::Exception &)
@@ -1141,16 +1141,16 @@ rtl::OUString SvtLinguConfig::GetVendorImageUrl_Impl(
try try
{ {
uno::Reference< container::XNameAccess > xImagesNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xImagesNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xImagesNA.set( xImagesNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Images"))), uno::UNO_QUERY_THROW ); xImagesNA.set( xImagesNA->getByName(OUString("Images")), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNA( xImagesNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceNameEntries"))), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xNA( xImagesNA->getByName(OUString("ServiceNameEntries")), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rServiceImplName ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rServiceImplName ), uno::UNO_QUERY_THROW );
uno::Any aAny(xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VendorImagesNode")))); uno::Any aAny(xNA->getByName(OUString("VendorImagesNode")));
rtl::OUString aVendorImagesNode; rtl::OUString aVendorImagesNode;
if (aAny >>= aVendorImagesNode) if (aAny >>= aVendorImagesNode)
{ {
xNA = xImagesNA; xNA = xImagesNA;
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VendorImages"))), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString("VendorImages")), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( aVendorImagesNode ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( aVendorImagesNode ), uno::UNO_QUERY_THROW );
aAny = xNA->getByName( rImageName ); aAny = xNA->getByName( rImageName );
rtl::OUString aTmp; rtl::OUString aTmp;
@@ -1220,10 +1220,10 @@ bool SvtLinguConfig::HasGrammarChecker() const
try try
{ {
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager")) ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( OUString("ServiceManager") ), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GrammarCheckerList")) ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( OUString("GrammarCheckerList") ), uno::UNO_QUERY_THROW );
uno::Sequence< rtl::OUString > aElementNames( xNA->getElementNames() ); uno::Sequence< OUString > aElementNames( xNA->getElementNames() );
bRes = aElementNames.getLength() > 0; bRes = aElementNames.getLength() > 0;
} }
catch (const uno::Exception&) catch (const uno::Exception&)

View File

@@ -33,12 +33,12 @@ using namespace ::rtl ;
using namespace ::osl ; using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
#define ROOTNODE_LOCALISATION OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/View/Localisation")) #define ROOTNODE_LOCALISATION OUString("Office.Common/View/Localisation")
#define DEFAULT_AUTOMNEMONIC sal_False #define DEFAULT_AUTOMNEMONIC sal_False
#define DEFAULT_DIALOGSCALE 0 #define DEFAULT_DIALOGSCALE 0
#define PROPERTYNAME_AUTOMNEMONIC OUString(RTL_CONSTASCII_USTRINGPARAM("AutoMnemonic" )) #define PROPERTYNAME_AUTOMNEMONIC OUString("AutoMnemonic")
#define PROPERTYNAME_DIALOGSCALE OUString(RTL_CONSTASCII_USTRINGPARAM("DialogScale" )) #define PROPERTYNAME_DIALOGSCALE OUString("DialogScale")
#define PROPERTYHANDLE_AUTOMNEMONIC 0 #define PROPERTYHANDLE_AUTOMNEMONIC 0
#define PROPERTYHANDLE_DIALOGSCALE 1 #define PROPERTYHANDLE_DIALOGSCALE 1

View File

@@ -72,7 +72,7 @@ public:
}; };
SfxMiscCfg::SfxMiscCfg() : SfxMiscCfg::SfxMiscCfg() :
ConfigItem(OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common")) ), ConfigItem(OUString("Office.Common") ),
bPaperSize(sal_False), bPaperSize(sal_False),
bPaperOrientation (sal_False), bPaperOrientation (sal_False),
bNotFound (sal_False), bNotFound (sal_False),
@@ -119,10 +119,10 @@ const Sequence<OUString> SfxMiscCfg::GetPropertyNames()
{ {
const OUString pProperties[] = const OUString pProperties[] =
{ {
OUString(RTL_CONSTASCII_USTRINGPARAM("Print/Warning/PaperSize")), OUString("Print/Warning/PaperSize"),
OUString(RTL_CONSTASCII_USTRINGPARAM("Print/Warning/PaperOrientation")), OUString("Print/Warning/PaperOrientation"),
OUString(RTL_CONSTASCII_USTRINGPARAM("Print/Warning/NotFound")), OUString("Print/Warning/NotFound"),
OUString(RTL_CONSTASCII_USTRINGPARAM("DateFormat/TwoDigitYear")) OUString("DateFormat/TwoDigitYear")
}; };
const Sequence< OUString > seqPropertyNames( pProperties, 4 ); const Sequence< OUString > seqPropertyNames( pProperties, 4 );
return seqPropertyNames; return seqPropertyNames;

View File

@@ -1209,9 +1209,9 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByShortName(const ::
{ {
if ( sName == "swriter" ) if ( sName == "swriter" )
return E_WRITER; return E_WRITER;
if (sName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("swriter/Web"))) // sometimes they are registerd for swriter/web :-( if (sName.equalsIgnoreAsciiCase("swriter/Web")) // sometimes they are registerd for swriter/web :-(
return E_WRITERWEB; return E_WRITERWEB;
if (sName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("swriter/GlobalDocument"))) // sometimes they are registerd for swriter/globaldocument :-( if (sName.equalsIgnoreAsciiCase("swriter/GlobalDocument")) // sometimes they are registerd for swriter/globaldocument :-(
return E_WRITERGLOBAL; return E_WRITERGLOBAL;
if ( sName == "scalc" ) if ( sName == "scalc" )
return E_CALC; return E_CALC;

View File

@@ -35,11 +35,11 @@ using namespace com::sun::star::uno;
using ::rtl::OUString; using ::rtl::OUString;
#define CFG_FILENAME OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.OptionsDialog" ) ) #define CFG_FILENAME OUString( "Office.OptionsDialog" )
#define ROOT_NODE OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsDialogGroups" ) ) #define ROOT_NODE OUString( "OptionsDialogGroups" )
#define PAGES_NODE OUString( RTL_CONSTASCII_USTRINGPARAM( "Pages" ) ) #define PAGES_NODE OUString( "Pages" )
#define OPTIONS_NODE OUString( RTL_CONSTASCII_USTRINGPARAM( "Options" ) ) #define OPTIONS_NODE OUString( "Options" )
#define PROPERTY_HIDE OUString( RTL_CONSTASCII_USTRINGPARAM( "Hide" ) ) #define PROPERTY_HIDE OUString( "Hide" )
static SvtOptionsDlgOptions_Impl* pOptions = NULL; static SvtOptionsDlgOptions_Impl* pOptions = NULL;
static sal_Int32 nRefCount = 0; static sal_Int32 nRefCount = 0;
@@ -95,7 +95,7 @@ namespace
SvtOptionsDlgOptions_Impl::SvtOptionsDlgOptions_Impl() SvtOptionsDlgOptions_Impl::SvtOptionsDlgOptions_Impl()
: ConfigItem( OUString( CFG_FILENAME ) ), : ConfigItem( OUString( CFG_FILENAME ) ),
m_sPathDelimiter( RTL_CONSTASCII_USTRINGPARAM( "/" ) ), m_sPathDelimiter( "/" ),
m_aOptionNodeList( OptionNodeList() ) m_aOptionNodeList( OptionNodeList() )
{ {

View File

@@ -36,13 +36,13 @@ using namespace ::rtl ;
using namespace ::osl ; using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
#define ROOTNODE_START OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Print")) #define ROOTNODE_START OUString("Office.Common/Print")
#define PROPERTYNAME_PAPERSIZE OUString(RTL_CONSTASCII_USTRINGPARAM("Warning/PaperSize")) #define PROPERTYNAME_PAPERSIZE OUString("Warning/PaperSize")
#define PROPERTYNAME_PAPERORIENTATION OUString(RTL_CONSTASCII_USTRINGPARAM("Warning/PaperOrientation")) #define PROPERTYNAME_PAPERORIENTATION OUString("Warning/PaperOrientation")
#define PROPERTYNAME_NOTFOUND OUString(RTL_CONSTASCII_USTRINGPARAM("Warning/NotFound")) #define PROPERTYNAME_NOTFOUND OUString("Warning/NotFound")
#define PROPERTYNAME_TRANSPARENCY OUString(RTL_CONSTASCII_USTRINGPARAM("Warning/Transparency")) #define PROPERTYNAME_TRANSPARENCY OUString("Warning/Transparency")
#define PROPERTYNAME_PRINTINGMODIFIESDOCUMENT OUString(RTL_CONSTASCII_USTRINGPARAM("PrintingModifiesDocument")) #define PROPERTYNAME_PRINTINGMODIFIESDOCUMENT OUString("PrintingModifiesDocument")
#define PROPERTYHANDLE_PAPERSIZE 0 #define PROPERTYHANDLE_PAPERSIZE 0
#define PROPERTYHANDLE_PAPERORIENTATION 1 #define PROPERTYHANDLE_PAPERORIENTATION 1

View File

@@ -44,11 +44,11 @@ using namespace ::rtl ;
using namespace ::osl ; using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
#define ROOTNODE_SECURITY OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Security/Scripting")) #define ROOTNODE_SECURITY OUString("Office.Common/Security/Scripting")
#define DEFAULT_SECUREURL Sequence< OUString >() #define DEFAULT_SECUREURL Sequence< OUString >()
#define DEFAULT_TRUSTEDAUTHORS Sequence< SvtSecurityOptions::Certificate >() #define DEFAULT_TRUSTEDAUTHORS Sequence< SvtSecurityOptions::Certificate >()
// xmlsec05 depricated // xmlsec05 deprecated
#define DEFAULT_STAROFFICEBASIC eALWAYS_EXECUTE #define DEFAULT_STAROFFICEBASIC eALWAYS_EXECUTE
#define CSTR_SECUREURL "SecureURL" #define CSTR_SECUREURL "SecureURL"
@@ -66,37 +66,37 @@ using namespace ::com::sun::star::uno ;
#define CSTR_TRUSTEDAUTHOR_SERIALNUMBER "SerialNumber" #define CSTR_TRUSTEDAUTHOR_SERIALNUMBER "SerialNumber"
#define CSTR_TRUSTEDAUTHOR_RAWDATA "RawData" #define CSTR_TRUSTEDAUTHOR_RAWDATA "RawData"
#define PROPERTYNAME_SECUREURL OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_SECUREURL )) #define PROPERTYNAME_SECUREURL OUString(CSTR_SECUREURL)
#define PROPERTYNAME_DOCWARN_SAVEORSEND OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_DOCWARN_SAVEORSEND )) #define PROPERTYNAME_DOCWARN_SAVEORSEND OUString(CSTR_DOCWARN_SAVEORSEND)
#define PROPERTYNAME_DOCWARN_SIGNING OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_DOCWARN_SIGNING )) #define PROPERTYNAME_DOCWARN_SIGNING OUString(CSTR_DOCWARN_SIGNING)
#define PROPERTYNAME_DOCWARN_PRINT OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_DOCWARN_PRINT )) #define PROPERTYNAME_DOCWARN_PRINT OUString(CSTR_DOCWARN_PRINT)
#define PROPERTYNAME_DOCWARN_CREATEPDF OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_DOCWARN_CREATEPDF )) #define PROPERTYNAME_DOCWARN_CREATEPDF OUString(CSTR_DOCWARN_CREATEPDF)
#define PROPERTYNAME_DOCWARN_REMOVEPERSONALINFO OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_DOCWARN_REMOVEPERSONALINFO )) #define PROPERTYNAME_DOCWARN_REMOVEPERSONALINFO OUString(CSTR_DOCWARN_REMOVEPERSONALINFO)
#define PROPERTYNAME_DOCWARN_RECOMMENDPASSWORD OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_DOCWARN_RECOMMENDPASSWORD )) #define PROPERTYNAME_DOCWARN_RECOMMENDPASSWORD OUString(CSTR_DOCWARN_RECOMMENDPASSWORD)
#define PROPERTYNAME_CTRLCLICK_HYPERLINK OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_CTRLCLICK_HYPERLINK )) #define PROPERTYNAME_CTRLCLICK_HYPERLINK OUString(CSTR_CTRLCLICK_HYPERLINK)
#define PROPERTYNAME_MACRO_SECLEVEL OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_MACRO_SECLEVEL )) #define PROPERTYNAME_MACRO_SECLEVEL OUString(CSTR_MACRO_SECLEVEL)
#define PROPERTYNAME_MACRO_TRUSTEDAUTHORS OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_MACRO_TRUSTEDAUTHORS )) #define PROPERTYNAME_MACRO_TRUSTEDAUTHORS OUString(CSTR_MACRO_TRUSTEDAUTHORS)
#define PROPERTYNAME_MACRO_DISABLE OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_MACRO_DISABLE )) #define PROPERTYNAME_MACRO_DISABLE OUString(CSTR_MACRO_DISABLE)
#define PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_TRUSTEDAUTHOR_SUBJECTNAME)) #define PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME OUString(CSTR_TRUSTEDAUTHOR_SUBJECTNAME)
#define PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_TRUSTEDAUTHOR_SERIALNUMBER)) #define PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER OUString(CSTR_TRUSTEDAUTHOR_SERIALNUMBER)
#define PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA OUString(RTL_CONSTASCII_USTRINGPARAM(CSTR_TRUSTEDAUTHOR_RAWDATA)) #define PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA OUString(CSTR_TRUSTEDAUTHOR_RAWDATA)
// xmlsec05 depricated // xmlsec05 deprecated
#define PROPERTYNAME_STAROFFICEBASIC OUString(RTL_CONSTASCII_USTRINGPARAM("OfficeBasic" )) #define PROPERTYNAME_STAROFFICEBASIC OUString("OfficeBasic")
#define PROPERTYNAME_EXECUTEPLUGINS OUString(RTL_CONSTASCII_USTRINGPARAM("ExecutePlugins" )) #define PROPERTYNAME_EXECUTEPLUGINS OUString("ExecutePlugins")
#define PROPERTYNAME_WARNINGENABLED OUString(RTL_CONSTASCII_USTRINGPARAM("Warning" )) #define PROPERTYNAME_WARNINGENABLED OUString("Warning")
#define PROPERTYNAME_CONFIRMATIONENABLED OUString(RTL_CONSTASCII_USTRINGPARAM("Confirmation" )) #define PROPERTYNAME_CONFIRMATIONENABLED OUString("Confirmation")
// xmlsec05 depricated // xmlsec05 deprecated
#define PROPERTYHANDLE_SECUREURL 0 #define PROPERTYHANDLE_SECUREURL 0
// xmlsec05 depricated // xmlsec05 deprecated
#define PROPERTYHANDLE_STAROFFICEBASIC 1 #define PROPERTYHANDLE_STAROFFICEBASIC 1
#define PROPERTYHANDLE_EXECUTEPLUGINS 2 #define PROPERTYHANDLE_EXECUTEPLUGINS 2
#define PROPERTYHANDLE_WARNINGENABLED 3 #define PROPERTYHANDLE_WARNINGENABLED 3
#define PROPERTYHANDLE_CONFIRMATIONENABLED 4 #define PROPERTYHANDLE_CONFIRMATIONENABLED 4
// xmlsec05 depricated // xmlsec05 deprecated
#define PROPERTYHANDLE_DOCWARN_SAVEORSEND 5 #define PROPERTYHANDLE_DOCWARN_SAVEORSEND 5
#define PROPERTYHANDLE_DOCWARN_SIGNING 6 #define PROPERTYHANDLE_DOCWARN_SIGNING 6
@@ -236,7 +236,7 @@ private:
sal_Bool m_bRODisableMacros; sal_Bool m_bRODisableMacros;
// xmlsec05 depricated // xmlsec05 deprecated
EBasicSecurityMode m_eBasicMode; EBasicSecurityMode m_eBasicMode;
sal_Bool m_bExecutePlugins; sal_Bool m_bExecutePlugins;
sal_Bool m_bWarning; sal_Bool m_bWarning;
@@ -281,7 +281,7 @@ SvtSecurityOptions_Impl::SvtSecurityOptions_Impl()
,m_bROTrustedAuthors ( CFG_READONLY_DEFAULT ) ,m_bROTrustedAuthors ( CFG_READONLY_DEFAULT )
,m_bRODisableMacros ( sal_True ) // currently is not intended to be changed ,m_bRODisableMacros ( sal_True ) // currently is not intended to be changed
// xmlsec05 depricated // xmlsec05 deprecated
, m_eBasicMode ( DEFAULT_STAROFFICEBASIC ) , m_eBasicMode ( DEFAULT_STAROFFICEBASIC )
, m_bExecutePlugins ( sal_True ) , m_bExecutePlugins ( sal_True )
, m_bWarning ( sal_True ) , m_bWarning ( sal_True )
@@ -290,7 +290,7 @@ SvtSecurityOptions_Impl::SvtSecurityOptions_Impl()
, m_bROWarning ( CFG_READONLY_DEFAULT ) , m_bROWarning ( CFG_READONLY_DEFAULT )
, m_bROExecutePlugins ( CFG_READONLY_DEFAULT ) , m_bROExecutePlugins ( CFG_READONLY_DEFAULT )
, m_bROBasicMode ( CFG_READONLY_DEFAULT ) , m_bROBasicMode ( CFG_READONLY_DEFAULT )
// xmlsec05 depricated // xmlsec05 deprecated
{ {
Sequence< OUString > seqNames = GetPropertyNames ( ); Sequence< OUString > seqNames = GetPropertyNames ( );
@@ -411,7 +411,7 @@ void SvtSecurityOptions_Impl::SetProperty( sal_Int32 nProperty, const Any& rValu
break; break;
// xmlsec05 depricated // xmlsec05 deprecated
case PROPERTYHANDLE_STAROFFICEBASIC: case PROPERTYHANDLE_STAROFFICEBASIC:
{ {
sal_Int32 nMode = 0; sal_Int32 nMode = 0;
@@ -438,7 +438,7 @@ void SvtSecurityOptions_Impl::SetProperty( sal_Int32 nProperty, const Any& rValu
m_bROConfirmation = bRO; m_bROConfirmation = bRO;
} }
break; break;
// xmlsec05 depricated // xmlsec05 deprecated
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
@@ -460,7 +460,7 @@ void SvtSecurityOptions_Impl::LoadAuthors( void )
sal_Int32 i1; sal_Int32 i1;
sal_Int32 i2; sal_Int32 i2;
OUString aSep( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); OUString aSep( "/" );
for( i1 = 0, i2 = 0 ; i1 < c1 ; ++i1 ) for( i1 = 0, i2 = 0 ; i1 < c1 ; ++i1 )
{ {
lAllAuthors[ i2 ] = PROPERTYNAME_MACRO_TRUSTEDAUTHORS + aSep + lAuthors[ i1 ] + aSep + PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME; lAllAuthors[ i2 ] = PROPERTYNAME_MACRO_TRUSTEDAUTHORS + aSep + lAuthors[ i1 ] + aSep + PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME;
@@ -525,7 +525,7 @@ sal_Int32 SvtSecurityOptions_Impl::GetHandle( const OUString& rName )
else if( rName.compareToAscii( CSTR_MACRO_DISABLE ) == 0 ) else if( rName.compareToAscii( CSTR_MACRO_DISABLE ) == 0 )
nHandle = PROPERTYHANDLE_MACRO_DISABLE; nHandle = PROPERTYHANDLE_MACRO_DISABLE;
// xmlsec05 depricated // xmlsec05 deprecated
else if( rName == PROPERTYNAME_STAROFFICEBASIC ) else if( rName == PROPERTYNAME_STAROFFICEBASIC )
nHandle = PROPERTYHANDLE_STAROFFICEBASIC; nHandle = PROPERTYHANDLE_STAROFFICEBASIC;
else if( rName == PROPERTYNAME_EXECUTEPLUGINS ) else if( rName == PROPERTYNAME_EXECUTEPLUGINS )
@@ -534,7 +534,7 @@ sal_Int32 SvtSecurityOptions_Impl::GetHandle( const OUString& rName )
nHandle = PROPERTYHANDLE_WARNINGENABLED; nHandle = PROPERTYHANDLE_WARNINGENABLED;
else if( rName == PROPERTYNAME_CONFIRMATIONENABLED ) else if( rName == PROPERTYNAME_CONFIRMATIONENABLED )
nHandle = PROPERTYHANDLE_CONFIRMATIONENABLED; nHandle = PROPERTYHANDLE_CONFIRMATIONENABLED;
// xmlsec05 depricated // xmlsec05 deprecated
else else
nHandle = PROPERTYHANDLE_INVALID; nHandle = PROPERTYHANDLE_INVALID;
@@ -741,7 +741,7 @@ void SvtSecurityOptions_Impl::Commit()
break; break;
// xmlsec05 depricated // xmlsec05 deprecated
case PROPERTYHANDLE_STAROFFICEBASIC: case PROPERTYHANDLE_STAROFFICEBASIC:
{ {
bDone = !m_bROBasicMode; bDone = !m_bROBasicMode;
@@ -770,7 +770,7 @@ void SvtSecurityOptions_Impl::Commit()
lValues[ nRealCount ] <<= m_bConfirmation; lValues[ nRealCount ] <<= m_bConfirmation;
} }
break; break;
// xmlsec05 depricated // xmlsec05 deprecated
default: default:
@@ -829,7 +829,7 @@ sal_Bool SvtSecurityOptions_Impl::IsReadOnly( SvtSecurityOptions::EOption eOptio
break; break;
// xmlsec05 depricated // xmlsec05 deprecated
case SvtSecurityOptions::E_BASICMODE: case SvtSecurityOptions::E_BASICMODE:
bReadonly = m_bROBasicMode; bReadonly = m_bROBasicMode;
break; break;
@@ -842,7 +842,7 @@ sal_Bool SvtSecurityOptions_Impl::IsReadOnly( SvtSecurityOptions::EOption eOptio
case SvtSecurityOptions::E_CONFIRMATION: case SvtSecurityOptions::E_CONFIRMATION:
bReadonly = m_bROConfirmation; bReadonly = m_bROConfirmation;
break; break;
// xmlsec05 depricated // xmlsec05 deprecated
default: default:
@@ -894,12 +894,12 @@ sal_Bool SvtSecurityOptions_Impl::IsSecureURL( const OUString& sURL ,
if( !sReferer.isEmpty() ) if( !sReferer.isEmpty() )
{ {
// Search in internal list // Search in internal list
::rtl::OUString sRef = sReferer.toAsciiLowerCase(); OUString sRef = sReferer.toAsciiLowerCase();
sal_uInt32 nCount = m_seqSecureURLs.getLength(); sal_uInt32 nCount = m_seqSecureURLs.getLength();
for( sal_uInt32 nItem=0; nItem<nCount; ++nItem ) for( sal_uInt32 nItem=0; nItem<nCount; ++nItem )
{ {
OUString sCheckURL = m_seqSecureURLs[nItem].toAsciiLowerCase(); OUString sCheckURL = m_seqSecureURLs[nItem].toAsciiLowerCase();
sCheckURL += OUString(RTL_CONSTASCII_USTRINGPARAM("*")); sCheckURL += "*";
if( WildCard( sCheckURL ).Matches( sRef ) == sal_True ) if( WildCard( sCheckURL ).Matches( sRef ) == sal_True )
{ {
bState = sal_True; bState = sal_True;
@@ -1154,7 +1154,7 @@ Mutex& SvtSecurityOptions::GetInitMutex()
// xmlsec05 depricated // xmlsec05 deprecated
EBasicSecurityMode SvtSecurityOptions_Impl::GetBasicMode() const EBasicSecurityMode SvtSecurityOptions_Impl::GetBasicMode() const
{ {

View File

@@ -106,14 +106,14 @@ public:
}; };
#define ROOTNODE_SYSLOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("Setup/L10N")) #define ROOTNODE_SYSLOCALE OUString("Setup/L10N")
#define PROPERTYNAME_LOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale")) #define PROPERTYNAME_LOCALE OUString("ooSetupSystemLocale")
#define PROPERTYNAME_UILOCALE OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")) #define PROPERTYNAME_UILOCALE OUString("ooLocale")
#define PROPERTYNAME_CURRENCY OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupCurrency")) #define PROPERTYNAME_CURRENCY OUString("ooSetupCurrency")
#define PROPERTYNAME_DECIMALSEPARATOR OUString(RTL_CONSTASCII_USTRINGPARAM("DecimalSeparatorAsLocale")) #define PROPERTYNAME_DECIMALSEPARATOR OUString("DecimalSeparatorAsLocale")
#define PROPERTYNAME_DATEPATTERNS OUString(RTL_CONSTASCII_USTRINGPARAM("DateAcceptancePatterns")) #define PROPERTYNAME_DATEPATTERNS OUString("DateAcceptancePatterns")
#define PROPERTYNAME_IGNORELANGCHANGE OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreLanguageChange")) #define PROPERTYNAME_IGNORELANGCHANGE OUString("IgnoreLanguageChange")
#define PROPERTYHANDLE_LOCALE 0 #define PROPERTYHANDLE_LOCALE 0
#define PROPERTYHANDLE_UILOCALE 1 #define PROPERTYHANDLE_UILOCALE 1

View File

@@ -36,10 +36,10 @@ using namespace ::rtl ;
using namespace ::osl ; using namespace ::osl ;
using namespace ::com::sun::star::uno ; using namespace ::com::sun::star::uno ;
#define ROOTNODE_WORKINGSET OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/WorkingSet")) #define ROOTNODE_WORKINGSET OUString("Office.Common/WorkingSet")
#define DEFAULT_WINDOWLIST Sequence< OUString >() #define DEFAULT_WINDOWLIST Sequence< OUString >()
#define PROPERTYNAME_WINDOWLIST OUString(RTL_CONSTASCII_USTRINGPARAM("WindowList" )) #define PROPERTYNAME_WINDOWLIST OUString("WindowList")
#define PROPERTYHANDLE_WINDOWLIST 0 #define PROPERTYHANDLE_WINDOWLIST 0

View File

@@ -229,7 +229,7 @@ void SAL_CALL OReadAccelatorDocumentHandler::endDocument(void)
if ( m_nElementDepth > 0 ) if ( m_nElementDepth > 0 )
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "A closing element is missing!" )); aErrorMessage += "A closing element is missing!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
} }
@@ -247,7 +247,7 @@ throw( SAXException, RuntimeException )
if ( m_bAcceleratorMode ) if ( m_bAcceleratorMode )
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Accelerator list used twice!" )); aErrorMessage += "Accelerator list used twice!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
else else
@@ -259,7 +259,7 @@ throw( SAXException, RuntimeException )
if ( !m_bAcceleratorMode ) if ( !m_bAcceleratorMode )
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Accelerator list element has to be used before!" )); aErrorMessage += "Accelerator list element has to be used before!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
else else
@@ -289,7 +289,7 @@ throw( SAXException, RuntimeException )
else else
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Unknown element found!" )); aErrorMessage += "Unknown element found!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
} }
@@ -312,7 +312,7 @@ void SAL_CALL OReadAccelatorDocumentHandler::endElement( const OUString& aName )
if ( !m_bAcceleratorMode ) if ( !m_bAcceleratorMode )
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Accelerator list used twice!" )); aErrorMessage += "Accelerator list used twice!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
} }
@@ -321,14 +321,14 @@ void SAL_CALL OReadAccelatorDocumentHandler::endElement( const OUString& aName )
if ( !m_bItemCloseExpected ) if ( !m_bItemCloseExpected )
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Closing accelerator item element expected!" )); aErrorMessage += "Closing accelerator item element expected!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
} }
else else
{ {
OUString aErrorMessage = getErrorLineString(); OUString aErrorMessage = getErrorLineString();
aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Unknown closing element found!" )); aErrorMessage += "Unknown closing element found!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
} }
} }
@@ -340,7 +340,7 @@ OWriteAccelatorDocumentHandler::OWriteAccelatorDocumentHandler(
m_xWriteDocumentHandler( xDocumentHandler ), m_xWriteDocumentHandler( xDocumentHandler ),
m_aWriteAcceleratorList( aWriteAcceleratorList ) m_aWriteAcceleratorList( aWriteAcceleratorList )
{ {
m_aAttributeType = OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA )); m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA );
} }
OWriteAccelatorDocumentHandler::~OWriteAccelatorDocumentHandler() OWriteAccelatorDocumentHandler::~OWriteAccelatorDocumentHandler()
@@ -354,14 +354,14 @@ void OWriteAccelatorDocumentHandler::WriteAcceleratorDocument()
Reference< XAttributeList > rList( (XAttributeList *)pList , UNO_QUERY ); Reference< XAttributeList > rList( (XAttributeList *)pList , UNO_QUERY );
m_xWriteDocumentHandler->startDocument(); m_xWriteDocumentHandler->startDocument();
m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_ACCELERATORLIST )), rList ); m_xWriteDocumentHandler->startElement( OUString( ELEMENT_ACCELERATORLIST ), rList );
m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
std::list< SvtAcceleratorConfigItem>::const_iterator p; std::list< SvtAcceleratorConfigItem>::const_iterator p;
for ( p = m_aWriteAcceleratorList.begin(); p != m_aWriteAcceleratorList.end(); ++p ) for ( p = m_aWriteAcceleratorList.begin(); p != m_aWriteAcceleratorList.end(); ++p )
WriteAcceleratorItem( *p ); WriteAcceleratorItem( *p );
m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_ACCELERATORLIST )) ); m_xWriteDocumentHandler->endElement( OUString( ELEMENT_ACCELERATORLIST ) );
m_xWriteDocumentHandler->endDocument(); m_xWriteDocumentHandler->endDocument();
} }
@@ -374,26 +374,26 @@ void OWriteAccelatorDocumentHandler::WriteAcceleratorItem(
// set attributes // set attributes
pAcceleratorAttributes->addAttribute( pAcceleratorAttributes->addAttribute(
OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_KEYCODE )), OUString( ATTRIBUTE_KEYCODE ),
m_aAttributeType, m_aAttributeType,
OUString::valueOf( aAcceleratorItem.nCode )); OUString::valueOf( aAcceleratorItem.nCode ));
pAcceleratorAttributes->addAttribute( pAcceleratorAttributes->addAttribute(
OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_MODIFIER )), OUString( ATTRIBUTE_MODIFIER ),
m_aAttributeType, m_aAttributeType,
OUString::valueOf( aAcceleratorItem.nModifier )); OUString::valueOf( aAcceleratorItem.nModifier ));
pAcceleratorAttributes->addAttribute( pAcceleratorAttributes->addAttribute(
OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL )), OUString( ATTRIBUTE_URL ),
m_aAttributeType, m_aAttributeType,
aAcceleratorItem.aCommand ); aAcceleratorItem.aCommand );
// write start element // write start element
m_xWriteDocumentHandler->startElement( m_xWriteDocumentHandler->startElement(
OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_ACCELERATORITEM )), OUString( ELEMENT_ACCELERATORITEM ),
xAcceleratorAttrList ); xAcceleratorAttrList );
m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_ACCELERATORITEM )) ); m_xWriteDocumentHandler->endElement( OUString( ELEMENT_ACCELERATORITEM ) );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */