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
08fdc4f3
Kaydet (Commit)
08fdc4f3
authored
Kas 27, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
simplify options here
Change-Id: I9faa4ea8aec6ecd439751323b76bf2d8b071e4ac
üst
0168313e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
41 deletions
+25
-41
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+25
-41
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
08fdc4f3
...
@@ -212,49 +212,33 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
...
@@ -212,49 +212,33 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
std
::
exception
)
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
if
(
IsValid
()
&&
!
rURL
.
isEmpty
())
if
(
!
IsValid
()
||
rURL
.
isEmpty
())
throw
uno
::
RuntimeException
();
SwgReaderOption
aOpt
;
aOpt
.
SetFrameFormats
(
true
);
aOpt
.
SetTextFormats
(
true
);
aOpt
.
SetPageDescs
(
true
);
aOpt
.
SetNumRules
(
true
);
aOpt
.
SetMerge
(
false
);
for
(
const
auto
&
rProperty
:
aOptions
)
{
{
bool
bLoadStyleText
=
true
;
if
(
rProperty
.
Value
.
getValueType
()
!=
cppu
::
UnoType
<
bool
>::
get
())
bool
bLoadStylePage
=
true
;
continue
;
bool
bLoadStyleOverwrite
=
true
;
const
bool
bValue
=
rProperty
.
Value
.
get
<
bool
>
();
bool
bLoadStyleNumbering
=
true
;
if
(
rProperty
.
Name
==
UNO_NAME_OVERWRITE_STYLES
)
bool
bLoadStyleFrame
=
true
;
aOpt
.
SetMerge
(
!
bValue
);
else
if
(
rProperty
.
Name
==
UNO_NAME_LOAD_NUMBERING_STYLES
)
int
nCount
=
aOptions
.
getLength
();
aOpt
.
SetNumRules
(
bValue
);
const
beans
::
PropertyValue
*
pArray
=
aOptions
.
getConstArray
();
else
if
(
rProperty
.
Name
==
UNO_NAME_LOAD_PAGE_STYLES
)
for
(
int
i
=
0
;
i
<
nCount
;
i
++
)
aOpt
.
SetPageDescs
(
bValue
);
{
else
if
(
rProperty
.
Name
==
UNO_NAME_LOAD_FRAME_STYLES
)
const
uno
::
Any
*
pVal
=
&
pArray
[
i
].
Value
;
aOpt
.
SetFrameFormats
(
bValue
);
if
(
pVal
->
getValueType
()
==
cppu
::
UnoType
<
bool
>::
get
()
)
else
if
(
rProperty
.
Name
==
UNO_NAME_LOAD_TEXT_STYLES
)
{
aOpt
.
SetTextFormats
(
bValue
);
const
OUString
sName
=
pArray
[
i
].
Name
;
bool
bVal
=
*
static_cast
<
sal_Bool
const
*>
(
pVal
->
getValue
());
if
(
sName
==
UNO_NAME_OVERWRITE_STYLES
)
bLoadStyleOverwrite
=
bVal
;
else
if
(
sName
==
UNO_NAME_LOAD_NUMBERING_STYLES
)
bLoadStyleNumbering
=
bVal
;
else
if
(
sName
==
UNO_NAME_LOAD_PAGE_STYLES
)
bLoadStylePage
=
bVal
;
else
if
(
sName
==
UNO_NAME_LOAD_FRAME_STYLES
)
bLoadStyleFrame
=
bVal
;
else
if
(
sName
==
UNO_NAME_LOAD_TEXT_STYLES
)
bLoadStyleText
=
bVal
;
}
}
SwgReaderOption
aOpt
;
aOpt
.
SetFrameFormats
(
bLoadStyleFrame
);
aOpt
.
SetTextFormats
(
bLoadStyleText
);
aOpt
.
SetPageDescs
(
bLoadStylePage
);
aOpt
.
SetNumRules
(
bLoadStyleNumbering
);
aOpt
.
SetMerge
(
!
bLoadStyleOverwrite
);
sal_uLong
nErr
=
m_pDocShell
->
LoadStylesFromFile
(
rURL
,
aOpt
,
true
);
if
(
nErr
)
throw
io
::
IOException
();
}
}
else
const
sal_uLong
nErr
=
m_pDocShell
->
LoadStylesFromFile
(
rURL
,
aOpt
,
true
);
throw
uno
::
RuntimeException
();
if
(
nErr
)
throw
io
::
IOException
();
}
}
uno
::
Sequence
<
beans
::
PropertyValue
>
SwXStyleFamilies
::
getStyleLoaderOptions
()
uno
::
Sequence
<
beans
::
PropertyValue
>
SwXStyleFamilies
::
getStyleLoaderOptions
()
...
...
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