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
4e0744b0
Kaydet (Commit)
4e0744b0
authored
Eyl 22, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unwind one level of cluttering indirection
Change-Id: Iceaed0e5490b6002c1421d74dfb8f2d0ba38cbf5
üst
8da21eca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
substitutepathvars.cxx
framework/source/services/substitutepathvars.cxx
+27
-27
No files found.
framework/source/services/substitutepathvars.cxx
Dosyayı görüntüle @
4e0744b0
...
@@ -262,7 +262,7 @@ public:
...
@@ -262,7 +262,7 @@ public:
protected
:
protected
:
DECL_LINK
(
implts_ConfigurationNotify
,
void
*
);
DECL_LINK
(
implts_ConfigurationNotify
,
void
*
);
void
SetPredefinedPathVariables
(
PredefinedPathVariables
&
);
void
SetPredefinedPathVariables
();
OUString
ConvertOSLtoUCBURL
(
const
OUString
&
aOSLCompliantURL
)
const
;
OUString
ConvertOSLtoUCBURL
(
const
OUString
&
aOSLCompliantURL
)
const
;
// Special case (transient) values can change during runtime!
// Special case (transient) values can change during runtime!
...
@@ -723,7 +723,7 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XComponentCon
...
@@ -723,7 +723,7 @@ SubstitutePathVariables::SubstitutePathVariables( const Reference< XComponentCon
{
{
int
i
;
int
i
;
SetPredefinedPathVariables
(
m_aPreDefVars
);
SetPredefinedPathVariables
();
m_aImpl
.
GetSharePointsRules
(
m_aSubstVarMap
);
m_aImpl
.
GetSharePointsRules
(
m_aSubstVarMap
);
// Init the predefined/fixed variable to index hash map
// Init the predefined/fixed variable to index hash map
...
@@ -1235,12 +1235,12 @@ throw ( NoSuchElementException, RuntimeException )
...
@@ -1235,12 +1235,12 @@ throw ( NoSuchElementException, RuntimeException )
}
}
}
}
void
SubstitutePathVariables
::
SetPredefinedPathVariables
(
PredefinedPathVariables
&
aPreDefPathVariables
)
void
SubstitutePathVariables
::
SetPredefinedPathVariables
()
{
{
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
]
=
"$BRAND_BASE_DIR"
;
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
]
=
"$BRAND_BASE_DIR"
;
rtl
::
Bootstrap
::
expandMacros
(
rtl
::
Bootstrap
::
expandMacros
(
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
]);
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
]);
// Get inspath and userpath from bootstrap mechanism in every case as file URL
// Get inspath and userpath from bootstrap mechanism in every case as file URL
::
utl
::
Bootstrap
::
PathStatus
aState
;
::
utl
::
Bootstrap
::
PathStatus
aState
;
...
@@ -1252,66 +1252,66 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
...
@@ -1252,66 +1252,66 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable
// of the setup. Then no user installation was required.)
// of the setup. Then no user installation was required.)
//Therefore we do not assert here.
//Therefore we do not assert here.
if
(
aState
==
::
utl
::
Bootstrap
::
PATH_EXISTS
)
{
if
(
aState
==
::
utl
::
Bootstrap
::
PATH_EXISTS
)
{
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
]
=
ConvertOSLtoUCBURL
(
sVal
);
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
]
=
ConvertOSLtoUCBURL
(
sVal
);
}
}
// Set $(inst), $(instpath), $(insturl)
// Set $(inst), $(instpath), $(insturl)
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_INSTPATH
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_INSTPATH
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
];
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_INSTURL
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_INSTPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_INSTURL
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_INSTPATH
];
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_INST
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_INSTPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_INST
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_INSTPATH
];
// New variable of hierachy service (#i32656#)
// New variable of hierachy service (#i32656#)
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_BASEINSTURL
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_INSTPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_BASEINSTURL
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_INSTPATH
];
// Set $(user), $(userpath), $(userurl)
// Set $(user), $(userpath), $(userurl)
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_USERURL
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_USERURL
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
];
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_USER
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_USER
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
];
// New variable of hierachy service (#i32656#)
// New variable of hierachy service (#i32656#)
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_USERDATAURL
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_USERDATAURL
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_USERPATH
];
// Detect the program directory
// Detect the program directory
// Set $(prog), $(progpath), $(progurl)
// Set $(prog), $(progpath), $(progurl)
INetURLObject
aProgObj
(
INetURLObject
aProgObj
(
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
]
);
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_BRANDBASEURL
]
);
if
(
!
aProgObj
.
HasError
()
&&
aProgObj
.
insertName
(
OUString
(
LIBO_BIN_FOLDER
)
)
)
if
(
!
aProgObj
.
HasError
()
&&
aProgObj
.
insertName
(
OUString
(
LIBO_BIN_FOLDER
)
)
)
{
{
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_PROGPATH
]
=
aProgObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
);
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_PROGPATH
]
=
aProgObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
);
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_PROGURL
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_PROGPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_PROGURL
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_PROGPATH
];
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_PROG
]
=
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_PROGPATH
];
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_PROG
]
=
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_PROGPATH
];
}
}
// Detect the language type of the current office
// Detect the language type of the current office
aPreDefPathVariable
s
.
m_eLanguageType
=
LANGUAGE_ENGLISH_US
;
m_aPreDefVar
s
.
m_eLanguageType
=
LANGUAGE_ENGLISH_US
;
OUString
aLocaleStr
(
utl
::
ConfigManager
::
getLocale
()
);
OUString
aLocaleStr
(
utl
::
ConfigManager
::
getLocale
()
);
aPreDefPathVariable
s
.
m_eLanguageType
=
LanguageTag
::
convertToLanguageTypeWithFallback
(
aLocaleStr
);
m_aPreDefVar
s
.
m_eLanguageType
=
LanguageTag
::
convertToLanguageTypeWithFallback
(
aLocaleStr
);
// We used to have an else branch here with a SAL_WARN, but that
// We used to have an else branch here with a SAL_WARN, but that
// always fired in some unit tests when this code was built with
// always fired in some unit tests when this code was built with
// debug=t, so it seems fairly pointless, especially as
// debug=t, so it seems fairly pointless, especially as
//
aPreDefPathVariable
s.m_eLanguageType has been initialized to a
//
m_aPreDefVar
s.m_eLanguageType has been initialized to a
// default value above anyway.
// default value above anyway.
// Set $(vlang)
// Set $(vlang)
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_VLANG
]
=
aLocaleStr
;
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_VLANG
]
=
aLocaleStr
;
// Set $(langid)
// Set $(langid)
aPreDefPathVariables
.
m_FixedVar
[
PREDEFVAR_LANGID
]
=
OUString
::
number
(
aPreDefPathVariable
s
.
m_eLanguageType
);
m_aPreDefVars
.
m_FixedVar
[
PREDEFVAR_LANGID
]
=
OUString
::
number
(
m_aPreDefVar
s
.
m_eLanguageType
);
// Set the other pre defined path variables
// Set the other pre defined path variables
// Set $(work)
// Set $(work)
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_WORK
]
=
GetWorkVariableValue
();
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_WORK
]
=
GetWorkVariableValue
();
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_HOME
]
=
GetHomeVariableValue
();
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_HOME
]
=
GetHomeVariableValue
();
// Set $(workdirurl) this is the value of the path PATH_WORK which doesn't make sense
// Set $(workdirurl) this is the value of the path PATH_WORK which doesn't make sense
// anymore because the path settings service has this value! It can deliver this value more
// anymore because the path settings service has this value! It can deliver this value more
// quickly than the substitution service!
// quickly than the substitution service!
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_WORKDIRURL
]
=
GetWorkPath
();
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_WORKDIRURL
]
=
GetWorkPath
();
// Set $(path) variable
// Set $(path) variable
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_PATH
]
=
GetPathVariableValue
();
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_PATH
]
=
GetPathVariableValue
();
// Set $(temp)
// Set $(temp)
OUString
aTmp
;
OUString
aTmp
;
osl
::
FileBase
::
getTempDirURL
(
aTmp
);
osl
::
FileBase
::
getTempDirURL
(
aTmp
);
aPreDefPathVariable
s
.
m_FixedVar
[
PREDEFVAR_TEMP
]
=
ConvertOSLtoUCBURL
(
aTmp
);
m_aPreDefVar
s
.
m_FixedVar
[
PREDEFVAR_TEMP
]
=
ConvertOSLtoUCBURL
(
aTmp
);
}
}
struct
Instance
{
struct
Instance
{
...
...
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