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
d9da04dd
Kaydet (Commit)
d9da04dd
authored
Eki 15, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some string clean-up
Change-Id: Ic046150605c599746ed3235c04bcbc981e18e589
üst
57af2ee9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
42 deletions
+18
-42
download.cxx
extensions/source/update/check/download.cxx
+3
-3
updatecheckconfig.cxx
extensions/source/update/check/updatecheckconfig.cxx
+2
-5
updatehdl.cxx
extensions/source/update/check/updatehdl.cxx
+13
-33
updatehdl.hxx
extensions/source/update/check/updatehdl.hxx
+0
-1
No files found.
extensions/source/update/check/download.cxx
Dosyayı görüntüle @
d9da04dd
...
...
@@ -201,17 +201,17 @@ Download::getProxyForURL(const OUString& rURL, OString& rHost, sal_Int32& rPort)
sal_Int32
nProxyType
=
aValue
.
get
<
sal_Int32
>
();
if
(
0
!=
nProxyType
)
// type 0 means "direct connection to the internet
{
if
(
rURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"http:"
)
)
)
if
(
rURL
.
startsWith
(
"http:"
)
)
{
rHost
=
getStringValue
(
xNameAccess
,
"ooInetHTTPProxyName"
);
rPort
=
getInt32Value
(
xNameAccess
,
"ooInetHTTPProxyPort"
);
}
else
if
(
rURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"https:"
)
)
)
else
if
(
rURL
.
startsWith
(
"https:"
)
)
{
rHost
=
getStringValue
(
xNameAccess
,
"ooInetHTTPSProxyName"
);
rPort
=
getInt32Value
(
xNameAccess
,
"ooInetHTTPSProxyPort"
);
}
else
if
(
rURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"ftp:"
)
)
)
else
if
(
rURL
.
startsWith
(
"ftp:"
)
)
{
rHost
=
getStringValue
(
xNameAccess
,
"ooInetFTPProxyName"
);
rPort
=
getInt32Value
(
xNameAccess
,
"ooInetFTPProxyPort"
);
...
...
extensions/source/update/check/updatecheckconfig.cxx
Dosyayı görüntüle @
d9da04dd
...
...
@@ -592,16 +592,13 @@ UpdateCheckConfig::commitChanges()
for
(
sal_Int32
i
=
0
;
i
<
nChanges
;
++
i
)
{
aChangesSet
[
i
].
Accessor
>>=
aString
;
// FIXME: use non IgnoreAsciiCase version as soon as it becomes available
if
(
aString
.
endsWithIgnoreAsciiCaseAsciiL
(
AUTOCHECK_ENABLED
"']"
,
sizeof
(
AUTOCHECK_ENABLED
)
+
1
)
)
if
(
aString
.
endsWith
(
AUTOCHECK_ENABLED
"']"
)
)
{
sal_Bool
bEnabled
=
sal_False
;
aChangesSet
[
i
].
Element
>>=
bEnabled
;
m_rListener
->
autoCheckStatusChanged
(
sal_True
==
bEnabled
);
}
// FIXME: use non IgnoreAsciiCase version as soon as it becomes available
else
if
(
aString
.
endsWithIgnoreAsciiCaseAsciiL
(
CHECK_INTERVAL
"']"
,
sizeof
(
CHECK_INTERVAL
)
+
1
)
)
else
if
(
aString
.
endsWith
(
CHECK_INTERVAL
"']"
)
)
{
m_rListener
->
autoCheckIntervalChanged
();
}
...
...
extensions/source/update/check/updatehdl.cxx
Dosyayı görüntüle @
d9da04dd
...
...
@@ -610,20 +610,6 @@ void UpdateHandler::updateState( UpdateState eState )
meLastState
=
eState
;
}
//--------------------------------------------------------------------
void
UpdateHandler
::
searchAndReplaceAll
(
OUString
&
rText
,
const
OUString
&
rWhat
,
const
OUString
&
rWith
)
const
{
sal_Int32
nIndex
=
rText
.
indexOf
(
rWhat
);
while
(
nIndex
!=
-
1
)
{
rText
=
rText
.
replaceAt
(
nIndex
,
rWhat
.
getLength
(),
rWith
);
nIndex
=
rText
.
indexOf
(
rWhat
,
nIndex
);
}
}
//--------------------------------------------------------------------
OUString
UpdateHandler
::
loadString
(
const
uno
::
Reference
<
resource
::
XResourceBundle
>
xBundle
,
sal_Int32
nResourceId
)
const
...
...
@@ -646,14 +632,11 @@ OUString UpdateHandler::loadString( const uno::Reference< resource::XResourceBun
OUString
UpdateHandler
::
substVariables
(
const
OUString
&
rSource
)
const
{
OUString
sString
(
rSource
);
searchAndReplaceAll
(
sString
,
"%NEXTVERSION"
,
msNextVersion
);
searchAndReplaceAll
(
sString
,
"%DOWNLOAD_PATH"
,
msDownloadPath
);
searchAndReplaceAll
(
sString
,
"%FILE_NAME"
,
msDownloadFile
);
searchAndReplaceAll
(
sString
,
"%PERCENT"
,
OUString
::
number
(
mnPercent
)
);
return
sString
;
return
rSource
.
replaceAll
(
"%NEXTVERSION"
,
msNextVersion
)
.
replaceAll
(
"%DOWNLOAD_PATH"
,
msDownloadPath
)
.
replaceAll
(
"%FILE_NAME"
,
msDownloadFile
)
.
replaceAll
(
"%PERCENT"
,
OUString
::
number
(
mnPercent
)
);
}
//--------------------------------------------------------------------
...
...
@@ -866,13 +849,9 @@ void UpdateHandler::setFullVersion( OUString& rString )
OUString
aProductVersion
;
xNameAccess
->
getByName
(
"ooSetupVersion"
)
>>=
aProductVersion
;
sal_Int32
nVerIndex
=
rString
.
indexOf
(
aProductVersion
);
if
(
nVerIndex
!=
-
1
)
{
OUString
aProductFullVersion
;
xNameAccess
->
getByName
(
"ooSetupVersionAboutBox"
)
>>=
aProductFullVersion
;
rString
=
rString
.
replaceAt
(
nVerIndex
,
aProductVersion
.
getLength
(),
aProductFullVersion
);
}
OUString
aProductFullVersion
;
xNameAccess
->
getByName
(
"ooSetupVersionAboutBox"
)
>>=
aProductFullVersion
;
rString
=
rString
.
replaceFirst
(
aProductVersion
,
aProductFullVersion
);
}
//--------------------------------------------------------------------
...
...
@@ -996,10 +975,11 @@ bool UpdateHandler::showWarning( const OUString &rWarningText,
//--------------------------------------------------------------------
bool
UpdateHandler
::
showOverwriteWarning
(
const
OUString
&
rFileName
)
const
{
OUString
aMsg
(
msReloadWarning
);
searchAndReplaceAll
(
aMsg
,
"%FILENAME"
,
rFileName
);
searchAndReplaceAll
(
aMsg
,
"%DOWNLOAD_PATH"
,
msDownloadPath
);
return
showWarning
(
aMsg
,
msReloadContinue
,
msReloadReload
);
return
showWarning
(
(
msReloadWarning
.
replaceAll
(
"%FILENAME"
,
rFileName
)
.
replaceAll
(
"%DOWNLOAD_PATH"
,
msDownloadPath
)),
msReloadContinue
,
msReloadReload
);
}
//--------------------------------------------------------------------
...
...
extensions/source/update/check/updatehdl.hxx
Dosyayı görüntüle @
d9da04dd
...
...
@@ -156,7 +156,6 @@ private:
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
NamedValue
>
const
&
rProps
);
void
setFullVersion
(
OUString
&
rString
);
void
searchAndReplaceAll
(
OUString
&
rText
,
const
OUString
&
rWhat
,
const
OUString
&
rWith
)
const
;
public
:
UpdateHandler
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
,
...
...
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