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
ba1ec85d
Kaydet (Commit)
ba1ec85d
authored
Eki 29, 2010
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify migration API, fix typos, and add trace output
üst
49d5bdcf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
44 deletions
+23
-44
migration.hxx
desktop/inc/migration.hxx
+1
-5
app.cxx
desktop/source/app/app.cxx
+2
-3
migration.cxx
desktop/source/migration/migration.cxx
+18
-32
migration_impl.hxx
desktop/source/migration/migration_impl.hxx
+2
-4
No files found.
desktop/
source/migration
/migration.hxx
→
desktop/
inc
/migration.hxx
Dosyayı görüntüle @
ba1ec85d
...
...
@@ -37,11 +37,7 @@ namespace desktop {
class
Migration
{
public
:
// starts the migration process
static
void
doMigration
();
static
void
cancelMigration
();
static
sal_Bool
checkMigration
();
static
rtl
::
OUString
getOldVersionName
();
static
void
migrateSettingsIfNecessary
();
};
}
#endif
...
...
desktop/source/app/app.cxx
Dosyayı görüntüle @
ba1ec85d
...
...
@@ -48,7 +48,7 @@
#include "userinstall.hxx"
#include "desktopcontext.hxx"
#include "exithelper.hxx"
#include "
../migration/
migration.hxx"
#include "migration.hxx"
#include <svtools/javacontext.hxx>
#include <com/sun/star/frame/XSessionManagerListener.hpp>
...
...
@@ -1720,8 +1720,7 @@ void Desktop::Main()
if
(
bAbort
)
return
;
if
(
Migration
::
checkMigration
()
)
Migration
::
doMigration
();
Migration
::
migrateSettingsIfNecessary
();
// keep a language options instance...
pLanguageOptions
.
reset
(
new
SvtLanguageOptions
(
sal_True
));
...
...
desktop/source/migration/migration.cxx
Dosyayı görüntüle @
ba1ec85d
...
...
@@ -214,9 +214,23 @@ static void releaseImpl()
}
}
// static main entry point for the migration process
void
Migration
::
doMigration
()
sal_Bool
MigrationImpl
::
needsMigration
()
{
sal_Bool
bRet
=
sal_False
;
if
(
m_aInfo
.
userdata
.
getLength
()
>
0
&&
!
checkMigrationCompleted
())
return
sal_True
;
OSL_TRACE
(
"Migration %s
\n
"
,
bRet
?
"needed"
:
"not required"
);
return
bRet
;
}
void
Migration
::
migrateSettingsIfNecessary
()
{
if
(
!
getImpl
()
->
needsMigration
()
)
return
;
sal_Bool
bResult
=
sal_False
;
try
{
bResult
=
getImpl
()
->
doMigration
();
...
...
@@ -231,34 +245,6 @@ void Migration::doMigration()
releaseImpl
();
}
void
Migration
::
cancelMigration
()
{
releaseImpl
();
}
sal_Bool
Migration
::
checkMigration
()
{
return
getImpl
()
->
checkMigration
();
}
OUString
Migration
::
getOldVersionName
()
{
return
getImpl
()
->
getOldVersionName
();
}
OUString
MigrationImpl
::
getOldVersionName
()
{
return
m_aInfo
.
productname
;
}
sal_Bool
MigrationImpl
::
checkMigration
()
{
if
(
m_aInfo
.
userdata
.
getLength
()
>
0
&&
!
checkMigrationCompleted
())
return
sal_True
;
else
return
sal_False
;
}
MigrationImpl
::
MigrationImpl
(
const
uno
::
Reference
<
XMultiServiceFactory
>&
xFactory
)
:
m_vrVersions
(
new
strings_v
)
,
m_xFactory
(
xFactory
)
...
...
@@ -708,7 +694,7 @@ strings_vr MigrationImpl::compileFileList()
{
vrInclude
=
applyPatterns
(
*
vrFiles
,
i_migr
->
includeFiles
);
vrExclude
=
applyPatterns
(
*
vrFiles
,
i_migr
->
excludeFiles
);
sub
s
tract
(
*
vrInclude
,
*
vrExclude
);
subtract
(
*
vrInclude
,
*
vrExclude
);
vrResult
->
insert
(
vrResult
->
end
(),
vrInclude
->
begin
(),
vrInclude
->
end
());
i_migr
++
;
}
...
...
@@ -817,7 +803,7 @@ void MigrationImpl::copyConfig() {
}
// removes elements of vector 2 in vector 1
void
MigrationImpl
::
sub
s
tract
(
strings_v
&
va
,
const
strings_v
&
vb_c
)
const
void
MigrationImpl
::
subtract
(
strings_v
&
va
,
const
strings_v
&
vb_c
)
const
{
strings_v
vb
(
vb_c
);
// ensure uniqueness of entries
...
...
desktop/source/migration/migration_impl.hxx
Dosyayı görüntüle @
ba1ec85d
...
...
@@ -213,7 +213,7 @@ private:
strings_vr
compileFileList
();
// helpers
void
sub
s
tract
(
strings_v
&
va
,
const
strings_v
&
vb_c
)
const
;
void
subtract
(
strings_v
&
va
,
const
strings_v
&
vb_c
)
const
;
strings_vr
getAllFiles
(
const
rtl
::
OUString
&
baseURL
)
const
;
strings_vr
applyPatterns
(
const
strings_v
&
vSet
,
const
strings_v
&
vPatterns
)
const
;
NS_UNO
::
Reference
<
NS_CSS
::
container
::
XNameAccess
>
getConfigAccess
(
const
sal_Char
*
path
,
sal_Bool
rw
=
sal_False
);
...
...
@@ -241,10 +241,8 @@ public:
MigrationImpl
(
const
NS_UNO
::
Reference
<
NS_CSS
::
lang
::
XMultiServiceFactory
>&
);
~
MigrationImpl
();
sal_Bool
doMigration
();
sal_Bool
check
Migration
();
sal_Bool
needs
Migration
();
rtl
::
OUString
getOldVersionName
();
};
}
#undef NS_CSS
...
...
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