summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-02-16 15:46:51 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-02-16 15:46:51 +0000
commitf27c1413e119134c14eb59b6b76f1e61c28e0263 (patch)
treef8b379616cf98554b678bf84599e0b44ef7d4e02 /configmgr
parentdf44a305a2ef68fb83089f20f141cfbe4581598d (diff)
INTEGRATION: CWS adabas13 (1.2.58); FILE MERGED
2005/01/25 13:13:29 jb 1.2.58.1: #119211# Improve entity handling to support multi-stratum sublayers which have dots in their names
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/localbe/localfilehelper.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/configmgr/source/localbe/localfilehelper.cxx b/configmgr/source/localbe/localfilehelper.cxx
index c7b4349a7d13..3023038f434e 100644
--- a/configmgr/source/localbe/localfilehelper.cxx
+++ b/configmgr/source/localbe/localfilehelper.cxx
@@ -165,8 +165,8 @@ namespace configmgr
}
// ---------------------------------------------------------------------------------------
- static sal_Unicode kComponentSeparator = '.' ;
- static sal_Unicode kPathSeparator = '/' ;
+ static const sal_Unicode kComponentSeparator = '.' ;
+ static const sal_Unicode kPathSeparator = '/' ;
rtl::OUString componentToPath(const rtl::OUString& aComponent)
{
@@ -177,6 +177,24 @@ namespace configmgr
return retCode.makeStringAndClear() ;
}
//------------------------------------------------------------------------------
+ rtl::OUString layeridToPath(const rtl::OUString& aLayerId)
+ {
+ sal_Int32 const nSplit = aLayerId.indexOf(k_cLayerIdSeparator);
+ if (nSplit < 0)
+ return componentToPath(aLayerId);
+
+ rtl::OUString const aComponent= aLayerId.copy(0,nSplit);
+ rtl::OUString const aSubid = aLayerId.copy(nSplit+1);
+
+ rtl::OUStringBuffer retCode ;
+
+ retCode.append(kPathSeparator) ;
+ retCode.append(aComponent.replace(kComponentSeparator, kPathSeparator)) ;
+ retCode.append(kPathSeparator) ;
+ retCode.append(aSubid) ;
+ return retCode.makeStringAndClear() ;
+ }
+ //------------------------------------------------------------------------------
bool checkOptionalArg(rtl::OUString& aArg)
{
if (aArg.getLength() && aArg[0] == sal_Unicode('?'))