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
5253b04c
Kaydet (Commit)
5253b04c
authored
Nis 20, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
OUString: constify, avoid temporaries and concatenated appends
Change-Id: I0282183ab961784623b537a3f0531dd793d05f81
üst
a106a847
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
optload.cxx
sw/source/ui/config/optload.cxx
+14
-17
No files found.
sw/source/ui/config/optload.cxx
Dosyayı görüntüle @
5253b04c
...
@@ -85,7 +85,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet)
...
@@ -85,7 +85,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet)
SvxStringArray
aMetricArr
(
SW_RES
(
STR_ARR_METRIC
)
);
SvxStringArray
aMetricArr
(
SW_RES
(
STR_ARR_METRIC
)
);
for
(
sal_uInt32
i
=
0
;
i
<
aMetricArr
.
Count
();
++
i
)
for
(
sal_uInt32
i
=
0
;
i
<
aMetricArr
.
Count
();
++
i
)
{
{
OUString
sMetric
=
aMetricArr
.
GetStringByPos
(
i
);
const
OUString
sMetric
=
aMetricArr
.
GetStringByPos
(
i
);
FieldUnit
eFUnit
=
(
FieldUnit
)
aMetricArr
.
GetValue
(
i
);
FieldUnit
eFUnit
=
(
FieldUnit
)
aMetricArr
.
GetValue
(
i
);
switch
(
eFUnit
)
switch
(
eFUnit
)
...
@@ -537,8 +537,8 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
...
@@ -537,8 +537,8 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
SetOptions
(
nPos
++
,
GRAPHIC_CAP
);
SetOptions
(
nPos
++
,
GRAPHIC_CAP
);
// get Productname and -version
// get Productname and -version
OUString
sWithoutVersion
(
utl
::
ConfigManager
::
getProductName
()
);
const
OUString
sWithoutVersion
(
utl
::
ConfigManager
::
getProductName
()
);
OUString
sComplete
(
const
OUString
sComplete
(
sWithoutVersion
+
" "
+
sWithoutVersion
+
" "
+
utl
::
ConfigManager
::
getProductVersion
()
);
utl
::
ConfigManager
::
getProductVersion
()
);
...
@@ -639,7 +639,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
...
@@ -639,7 +639,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
else
else
m_pCategoryBox
->
SetText
(
m_sNone
);
m_pCategoryBox
->
SetText
(
m_sNone
);
if
(
!
pOpt
->
GetCategory
().
isEmpty
()
&&
if
(
!
pOpt
->
GetCategory
().
isEmpty
()
&&
m_pCategoryBox
->
GetEntryPos
(
OUString
(
pOpt
->
GetCategory
()
))
==
COMBOBOX_ENTRY_NOTFOUND
)
m_pCategoryBox
->
GetEntryPos
(
pOpt
->
GetCategory
(
))
==
COMBOBOX_ENTRY_NOTFOUND
)
m_pCategoryBox
->
InsertEntry
(
pOpt
->
GetCategory
());
m_pCategoryBox
->
InsertEntry
(
pOpt
->
GetCategory
());
if
(
m_pCategoryBox
->
GetText
().
isEmpty
())
if
(
m_pCategoryBox
->
GetText
().
isEmpty
())
{
{
...
@@ -719,13 +719,13 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
...
@@ -719,13 +719,13 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
InsCaptionOpt
*
pOpt
=
(
InsCaptionOpt
*
)
pEntry
->
GetUserData
();
InsCaptionOpt
*
pOpt
=
(
InsCaptionOpt
*
)
pEntry
->
GetUserData
();
pOpt
->
UseCaption
()
=
m_pCheckLB
->
IsChecked
(
m_pCheckLB
->
GetModel
()
->
GetAbsPos
(
pEntry
));
pOpt
->
UseCaption
()
=
m_pCheckLB
->
IsChecked
(
m_pCheckLB
->
GetModel
()
->
GetAbsPos
(
pEntry
));
OUString
aName
(
m_pCategoryBox
->
GetText
()
);
const
OUString
aName
(
m_pCategoryBox
->
GetText
()
);
if
(
aName
==
m_sNone
)
if
(
aName
==
m_sNone
)
pOpt
->
SetCategory
(
aEmptyOUStr
);
pOpt
->
SetCategory
(
""
);
else
else
pOpt
->
SetCategory
(
comphelper
::
string
::
strip
(
aName
,
' '
));
pOpt
->
SetCategory
(
comphelper
::
string
::
strip
(
aName
,
' '
));
pOpt
->
SetNumType
((
sal_uInt16
)(
sal_uLong
)
m_pFormatBox
->
GetEntryData
(
m_pFormatBox
->
GetSelectEntryPos
()));
pOpt
->
SetNumType
((
sal_uInt16
)(
sal_uLong
)
m_pFormatBox
->
GetEntryData
(
m_pFormatBox
->
GetSelectEntryPos
()));
pOpt
->
SetCaption
(
m_pTextEdit
->
IsEnabled
()
?
m_pTextEdit
->
GetText
()
:
OUString
(
aEmptyOUStr
)
);
pOpt
->
SetCaption
(
m_pTextEdit
->
IsEnabled
()
?
m_pTextEdit
->
GetText
()
:
OUString
()
);
pOpt
->
SetPos
(
m_pPosBox
->
GetSelectEntryPos
());
pOpt
->
SetPos
(
m_pPosBox
->
GetSelectEntryPos
());
sal_Int32
nPos
=
m_pLbLevel
->
GetSelectEntryPos
();
sal_Int32
nPos
=
m_pLbLevel
->
GetSelectEntryPos
();
sal_Int32
nLevel
=
(
nPos
>
0
&&
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
?
nPos
-
1
:
MAXLEVEL
;
sal_Int32
nLevel
=
(
nPos
>
0
&&
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
?
nPos
-
1
:
MAXLEVEL
;
...
@@ -733,7 +733,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
...
@@ -733,7 +733,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
pOpt
->
SetSeparator
(
m_pEdDelim
->
GetText
());
pOpt
->
SetSeparator
(
m_pEdDelim
->
GetText
());
pOpt
->
SetNumSeparator
(
m_pNumberingSeparatorED
->
GetText
());
pOpt
->
SetNumSeparator
(
m_pNumberingSeparatorED
->
GetText
());
if
(
!
m_pCharStyleLB
->
GetSelectEntryPos
())
if
(
!
m_pCharStyleLB
->
GetSelectEntryPos
())
pOpt
->
SetCharacterStyle
(
aEmptyOUStr
);
pOpt
->
SetCharacterStyle
(
""
);
else
else
pOpt
->
SetCharacterStyle
(
m_pCharStyleLB
->
GetSelectEntry
());
pOpt
->
SetCharacterStyle
(
m_pCharStyleLB
->
GetSelectEntry
());
pOpt
->
CopyAttributes
()
=
m_pApplyBorderCB
->
IsChecked
();
pOpt
->
CopyAttributes
()
=
m_pApplyBorderCB
->
IsChecked
();
...
@@ -742,7 +742,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
...
@@ -742,7 +742,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
IMPL_LINK_NOARG
(
SwCaptionOptPage
,
ModifyHdl
)
IMPL_LINK_NOARG
(
SwCaptionOptPage
,
ModifyHdl
)
{
{
OUString
sFldTypeName
=
m_pCategoryBox
->
GetText
();
const
OUString
sFldTypeName
=
m_pCategoryBox
->
GetText
();
SfxSingleTabDialog
*
pDlg
=
dynamic_cast
<
SfxSingleTabDialog
*>
(
GetParentDialog
());
SfxSingleTabDialog
*
pDlg
=
dynamic_cast
<
SfxSingleTabDialog
*>
(
GetParentDialog
());
PushButton
*
pBtn
=
pDlg
?
pDlg
->
GetOKButton
()
:
NULL
;
PushButton
*
pBtn
=
pDlg
?
pDlg
->
GetOKButton
()
:
NULL
;
...
@@ -800,16 +800,14 @@ void SwCaptionOptPage::DrawSample()
...
@@ -800,16 +800,14 @@ void SwCaptionOptPage::DrawSample()
if
(
!
bOrderNumberingFirst
)
if
(
!
bOrderNumberingFirst
)
{
{
// category
// category
aStr
+=
m_pCategoryBox
->
GetText
();
aStr
+=
m_pCategoryBox
->
GetText
()
+
" "
;
aStr
+=
" "
;
}
}
SwWrtShell
*
pSh
=
::
GetActiveWrtShell
();
SwWrtShell
*
pSh
=
::
GetActiveWrtShell
();
OUString
sFldTypeName
(
m_pCategoryBox
->
GetText
()
);
if
(
pSh
)
if
(
pSh
)
{
{
SwSetExpFieldType
*
pFldType
=
(
SwSetExpFieldType
*
)
pMgr
->
GetFldType
(
SwSetExpFieldType
*
pFldType
=
(
SwSetExpFieldType
*
)
pMgr
->
GetFldType
(
RES_SETEXPFLD
,
sFldTypeName
);
RES_SETEXPFLD
,
m_pCategoryBox
->
GetText
()
);
if
(
pFldType
&&
pFldType
->
GetOutlineLvl
()
<
MAXLEVEL
)
if
(
pFldType
&&
pFldType
->
GetOutlineLvl
()
<
MAXLEVEL
)
{
{
sal_uInt8
nLvl
=
pFldType
->
GetOutlineLvl
();
sal_uInt8
nLvl
=
pFldType
->
GetOutlineLvl
();
...
@@ -817,10 +815,10 @@ void SwCaptionOptPage::DrawSample()
...
@@ -817,10 +815,10 @@ void SwCaptionOptPage::DrawSample()
for
(
sal_uInt8
i
=
0
;
i
<=
nLvl
;
++
i
)
for
(
sal_uInt8
i
=
0
;
i
<=
nLvl
;
++
i
)
aNumVector
.
push_back
(
1
);
aNumVector
.
push_back
(
1
);
OUString
sNumber
(
pSh
->
GetOutlineNumRule
()
->
MakeNumString
(
const
OUString
sNumber
(
pSh
->
GetOutlineNumRule
()
->
MakeNumString
(
aNumVector
,
sal_False
));
aNumVector
,
sal_False
));
if
(
!
sNumber
.
isEmpty
()
)
if
(
!
sNumber
.
isEmpty
()
)
(
aStr
+=
sNumber
)
+=
pFldType
->
GetDelimiter
();
aStr
+=
sNumber
+
pFldType
->
GetDelimiter
();
}
}
}
}
...
@@ -839,8 +837,7 @@ void SwCaptionOptPage::DrawSample()
...
@@ -839,8 +837,7 @@ void SwCaptionOptPage::DrawSample()
//#i61007# order of captions
//#i61007# order of captions
if
(
bOrderNumberingFirst
)
if
(
bOrderNumberingFirst
)
{
{
aStr
+=
m_pNumberingSeparatorED
->
GetText
();
aStr
+=
m_pNumberingSeparatorED
->
GetText
()
+
m_pCategoryBox
->
GetText
();
aStr
+=
m_pCategoryBox
->
GetText
();
}
}
aStr
+=
m_pTextEdit
->
GetText
();
aStr
+=
m_pTextEdit
->
GetText
();
}
}
...
...
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