Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
82af1483
Kaydet (Commit)
82af1483
authored
Mar 22, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
annoying PATHES->PATHS typos
üst
8a233f17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
32 deletions
+26
-32
pathsettings.hxx
framework/inc/services/pathsettings.hxx
+1
-3
pathsettings.cxx
framework/source/services/pathsettings.cxx
+25
-29
No files found.
framework/inc/services/pathsettings.hxx
Dosyayı görüntüle @
82af1483
...
...
@@ -63,7 +63,6 @@
/* enable it if you whish to migrate old user settings (using the old cfg schema) on demand ....
disable it in case only the new schema must be used.
*/
#define MIGRATE_OLD_USER_PATHES
namespace
framework
{
...
...
@@ -213,10 +212,9 @@ class PathSettings : public css::lang::XTypeProvider ,
/** filter "real user defined paths" from the old configuration schema
and set it as UserPaths on the new schema.
Can be removed with new major release ... */
#ifdef MIGRATE_OLD_USER_PATHES
void
impl_mergeOldUserPaths
(
PathSettings
::
PathInfo
&
rPath
,
const
OUStringList
&
lOld
);
#endif
/** reload one path directly from the new configuration schema (because
it was updated by any external code) */
...
...
framework/source/services/pathsettings.cxx
Dosyayı görüntüle @
82af1483
...
...
@@ -63,7 +63,7 @@
// ______________________________________________
// non exported const
const
::
rtl
::
OUString
CFGPROP_USERPATH
E
S
(
RTL_CONSTASCII_USTRINGPARAM
(
"UserPaths"
));
const
::
rtl
::
OUString
CFGPROP_USERPATHS
(
RTL_CONSTASCII_USTRINGPARAM
(
"UserPaths"
));
const
::
rtl
::
OUString
CFGPROP_WRITEPATH
(
RTL_CONSTASCII_USTRINGPARAM
(
"WritePath"
));
/*
...
...
@@ -73,13 +73,13 @@ const ::rtl::OUString CFGPROP_WRITEPATH(RTL_CONSTASCII_USTRINGPARAM("WritePath")
3 : write path "Template_write" string
*/
const
::
rtl
::
OUString
POSTFIX_INTERNAL_PATH
E
S
(
RTL_CONSTASCII_USTRINGPARAM
(
"_internal"
));
const
::
rtl
::
OUString
POSTFIX_USER_PATH
E
S
(
RTL_CONSTASCII_USTRINGPARAM
(
"_user"
));
const
::
rtl
::
OUString
POSTFIX_INTERNAL_PATHS
(
RTL_CONSTASCII_USTRINGPARAM
(
"_internal"
));
const
::
rtl
::
OUString
POSTFIX_USER_PATHS
(
RTL_CONSTASCII_USTRINGPARAM
(
"_user"
));
const
::
rtl
::
OUString
POSTFIX_WRITE_PATH
(
RTL_CONSTASCII_USTRINGPARAM
(
"_writable"
));
const
sal_Int32
IDGROUP_OLDSTYLE
=
0
;
const
sal_Int32
IDGROUP_INTERNAL_PATH
E
S
=
1
;
const
sal_Int32
IDGROUP_USER_PATH
E
S
=
2
;
const
sal_Int32
IDGROUP_INTERNAL_PATHS
=
1
;
const
sal_Int32
IDGROUP_USER_PATHS
=
2
;
const
sal_Int32
IDGROUP_WRITE_PATH
=
3
;
const
sal_Int32
IDGROUP_COUNT
=
4
;
...
...
@@ -270,7 +270,7 @@ OUStringList PathSettings::impl_readOldFormat(const ::rtl::OUString& sPath)
// NO substitution here ! It's done outside ...
PathSettings
::
PathInfo
PathSettings
::
impl_readNewFormat
(
const
::
rtl
::
OUString
&
sPath
)
{
const
static
::
rtl
::
OUString
CFGPROP_INTERNALPATH
E
S
(
RTL_CONSTASCII_USTRINGPARAM
(
"InternalPaths"
));
const
static
::
rtl
::
OUString
CFGPROP_INTERNALPATHS
(
RTL_CONSTASCII_USTRINGPARAM
(
"InternalPaths"
));
const
static
::
rtl
::
OUString
CFGPROP_ISSINGLEPATH
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsSinglePath"
));
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
xCfg
=
fa_getCfgNew
();
...
...
@@ -283,11 +283,11 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const ::rtl::OUString& s
// read internal path list
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
xIPath
;
xPath
->
getByName
(
CFGPROP_INTERNALPATH
E
S
)
>>=
xIPath
;
xPath
->
getByName
(
CFGPROP_INTERNALPATHS
)
>>=
xIPath
;
aPathVal
.
lInternalPaths
<<
xIPath
->
getElementNames
();
// read user defined path list
aPathVal
.
lUserPaths
<<
xPath
->
getByName
(
CFGPROP_USERPATH
E
S
);
aPathVal
.
lUserPaths
<<
xPath
->
getByName
(
CFGPROP_USERPATHS
);
// read the writeable path
xPath
->
getByName
(
CFGPROP_WRITEPATH
)
>>=
aPathVal
.
sWritePath
;
...
...
@@ -332,7 +332,7 @@ void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
{
::
comphelper
::
ConfigurationHelper
::
writeRelativeKey
(
xCfgNew
,
aResubstPath
.
sPathName
,
CFGPROP_USERPATH
E
S
,
CFGPROP_USERPATHS
,
css
::
uno
::
makeAny
(
aResubstPath
.
lUserPaths
.
getAsConstList
()));
}
...
...
@@ -360,7 +360,6 @@ void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
}
//-----------------------------------------------------------------------------
#ifdef MIGRATE_OLD_USER_PATHES
void
PathSettings
::
impl_mergeOldUserPaths
(
PathSettings
::
PathInfo
&
rPath
,
const
OUStringList
&
lOld
)
{
...
...
@@ -389,7 +388,6 @@ void PathSettings::impl_mergeOldUserPaths( PathSettings::PathInfo& rPath,
}
}
}
#endif // MIGRATE_OLD_USER_PATHES
//-----------------------------------------------------------------------------
PathSettings
::
EChangeOp
PathSettings
::
impl_updatePath
(
const
::
rtl
::
OUString
&
sPath
,
...
...
@@ -420,7 +418,6 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const ::rtl::OUString& sPa
catch
(
const
css
::
uno
::
Exception
&
)
{
throw
;
}
#ifdef MIGRATE_OLD_USER_PATHES
try
{
// migration of old user defined values on demand
...
...
@@ -441,7 +438,6 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const ::rtl::OUString& sPa
// will be normal .-)
catch
(
const
css
::
uno
::
Exception
&
)
{}
#endif // MIGRATE_OLD_USER_PATHES
PathSettings
::
PathHash
::
iterator
pPath
=
m_lPaths
.
find
(
sPath
);
if
(
eOp
==
PathSettings
::
E_UNDEFINED
)
...
...
@@ -504,8 +500,8 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const ::rtl::OUString& sPa
css
::
uno
::
Sequence
<
sal_Int32
>
PathSettings
::
impl_mapPathName2IDList
(
const
::
rtl
::
OUString
&
sPath
)
{
::
rtl
::
OUString
sOldStyleProp
=
sPath
;
::
rtl
::
OUString
sInternalProp
=
sPath
+
POSTFIX_INTERNAL_PATH
E
S
;
::
rtl
::
OUString
sUserProp
=
sPath
+
POSTFIX_USER_PATH
E
S
;
::
rtl
::
OUString
sInternalProp
=
sPath
+
POSTFIX_INTERNAL_PATHS
;
::
rtl
::
OUString
sUserProp
=
sPath
+
POSTFIX_USER_PATHS
;
::
rtl
::
OUString
sWriteProp
=
sPath
+
POSTFIX_WRITE_PATH
;
// Attention: The default set of IDs is fix and must follow these schema.
...
...
@@ -518,8 +514,8 @@ css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(const ::rt
css
::
uno
::
Sequence
<
sal_Int32
>
lIDs
(
IDGROUP_COUNT
);
lIDs
[
0
]
=
IDGROUP_OLDSTYLE
;
lIDs
[
1
]
=
IDGROUP_INTERNAL_PATH
E
S
;
lIDs
[
2
]
=
IDGROUP_USER_PATH
E
S
;
lIDs
[
1
]
=
IDGROUP_INTERNAL_PATHS
;
lIDs
[
2
]
=
IDGROUP_USER_PATHS
;
lIDs
[
3
]
=
IDGROUP_WRITE_PATH
;
sal_Int32
c
=
m_lPropDesc
.
getLength
();
...
...
@@ -532,10 +528,10 @@ css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(const ::rt
lIDs
[
IDGROUP_OLDSTYLE
]
=
rProp
.
Handle
;
else
if
(
rProp
.
Name
.
equals
(
sInternalProp
))
lIDs
[
IDGROUP_INTERNAL_PATH
E
S
]
=
rProp
.
Handle
;
lIDs
[
IDGROUP_INTERNAL_PATHS
]
=
rProp
.
Handle
;
else
if
(
rProp
.
Name
.
equals
(
sUserProp
))
lIDs
[
IDGROUP_USER_PATH
E
S
]
=
rProp
.
Handle
;
lIDs
[
IDGROUP_USER_PATHS
]
=
rProp
.
Handle
;
else
if
(
rProp
.
Name
.
equals
(
sWriteProp
))
lIDs
[
IDGROUP_WRITE_PATH
]
=
rProp
.
Handle
;
...
...
@@ -586,7 +582,7 @@ void PathSettings::impl_notifyPropListener( PathSettings::EChangeOp /*eOp*/
}
break
;
case
IDGROUP_INTERNAL_PATH
E
S
:
case
IDGROUP_INTERNAL_PATHS
:
{
if
(
pPathOld
)
lOldVals
[
0
]
<<=
pPathOld
->
lInternalPaths
.
getAsConstList
();
...
...
@@ -595,7 +591,7 @@ void PathSettings::impl_notifyPropListener( PathSettings::EChangeOp /*eOp*/
}
break
;
case
IDGROUP_USER_PATH
E
S
:
case
IDGROUP_USER_PATHS
:
{
if
(
pPathOld
)
lOldVals
[
0
]
<<=
pPathOld
->
lUserPaths
.
getAsConstList
();
...
...
@@ -768,7 +764,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
++
i
;
pProp
=
&
(
m_lPropDesc
[
i
]);
pProp
->
Name
=
rPath
.
sPathName
+
POSTFIX_INTERNAL_PATH
E
S
;
pProp
->
Name
=
rPath
.
sPathName
+
POSTFIX_INTERNAL_PATHS
;
pProp
->
Handle
=
i
;
pProp
->
Type
=
::
getCppuType
((
css
::
uno
::
Sequence
<
::
rtl
::
OUString
>*
)
0
);
pProp
->
Attributes
=
css
::
beans
::
PropertyAttribute
::
BOUND
|
...
...
@@ -776,7 +772,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
++
i
;
pProp
=
&
(
m_lPropDesc
[
i
]);
pProp
->
Name
=
rPath
.
sPathName
+
POSTFIX_USER_PATH
E
S
;
pProp
->
Name
=
rPath
.
sPathName
+
POSTFIX_USER_PATHS
;
pProp
->
Handle
=
i
;
pProp
->
Type
=
::
getCppuType
((
css
::
uno
::
Sequence
<
::
rtl
::
OUString
>*
)
0
);
pProp
->
Attributes
=
css
::
beans
::
PropertyAttribute
::
BOUND
;
...
...
@@ -819,13 +815,13 @@ css::uno::Any PathSettings::impl_getPathValue(sal_Int32 nID) const
}
break
;
case
IDGROUP_INTERNAL_PATH
E
S
:
case
IDGROUP_INTERNAL_PATHS
:
{
aVal
<<=
pPath
->
lInternalPaths
.
getAsConstList
();
}
break
;
case
IDGROUP_USER_PATH
E
S
:
case
IDGROUP_USER_PATHS
:
{
aVal
<<=
pPath
->
lUserPaths
.
getAsConstList
();
}
...
...
@@ -886,7 +882,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
}
break
;
case
IDGROUP_INTERNAL_PATH
E
S
:
case
IDGROUP_INTERNAL_PATHS
:
{
if
(
aChangePath
.
bIsSinglePath
)
{
...
...
@@ -906,7 +902,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
}
break
;
case
IDGROUP_USER_PATH
E
S
:
case
IDGROUP_USER_PATHS
:
{
if
(
aChangePath
.
bIsSinglePath
)
{
...
...
@@ -982,10 +978,10 @@ sal_Bool PathSettings::impl_isValidPath(const ::rtl::OUString& sPath) const
{
sal_Int32
i
=
-
1
;
i
=
sPropName
.
indexOf
(
POSTFIX_INTERNAL_PATH
E
S
);
i
=
sPropName
.
indexOf
(
POSTFIX_INTERNAL_PATHS
);
if
(
i
>
-
1
)
return
sPropName
.
copy
(
0
,
i
);
i
=
sPropName
.
indexOf
(
POSTFIX_USER_PATH
E
S
);
i
=
sPropName
.
indexOf
(
POSTFIX_USER_PATHS
);
if
(
i
>
-
1
)
return
sPropName
.
copy
(
0
,
i
);
i
=
sPropName
.
indexOf
(
POSTFIX_WRITE_PATH
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment