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
9d003eca
Kaydet (Commit)
9d003eca
authored
Eyl 03, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert includes/svx/numfmtsh.hxx from String to OUString
Change-Id: I95884864dd943a65cef64262cc9f05b9ceb524b2
üst
f6ada649
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
160 additions
and
188 deletions
+160
-188
numfmt.hxx
cui/source/inc/numfmt.hxx
+2
-2
numfmt.cxx
cui/source/tabpages/numfmt.cxx
+40
-47
numfmtsh.hxx
include/svx/numfmtsh.hxx
+48
-48
numfmtsh.cxx
svx/source/items/numfmtsh.cxx
+70
-91
No files found.
cui/source/inc/numfmt.hxx
Dosyayı görüntüle @
9d003eca
...
@@ -132,10 +132,10 @@ private:
...
@@ -132,10 +132,10 @@ private:
void
Init_Impl
();
void
Init_Impl
();
void
FillCurrencyBox
();
void
FillCurrencyBox
();
void
FillFormatListBox_Impl
(
std
::
vector
<
String
*
>&
rEntries
);
void
FillFormatListBox_Impl
(
std
::
vector
<
OUString
>&
rEntries
);
void
UpdateOptions_Impl
(
sal_Bool
bCheckCatChange
);
void
UpdateOptions_Impl
(
sal_Bool
bCheckCatChange
);
void
UpdateFormatListBox_Impl
(
sal_uInt16
bCat
,
sal_Bool
bUpdateEdit
);
void
UpdateFormatListBox_Impl
(
sal_uInt16
bCat
,
sal_Bool
bUpdateEdit
);
void
DeleteEntryList_Impl
(
std
::
vector
<
String
*
>&
rEntries
);
void
DeleteEntryList_Impl
(
std
::
vector
<
OUString
>&
rEntries
);
void
Obstructing
();
void
Obstructing
();
void
EnableBySourceFormat_Impl
();
void
EnableBySourceFormat_Impl
();
void
SetCategory
(
sal_uInt16
nPos
);
void
SetCategory
(
sal_uInt16
nPos
);
...
...
cui/source/tabpages/numfmt.cxx
Dosyayı görüntüle @
9d003eca
...
@@ -385,10 +385,10 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
...
@@ -385,10 +385,10 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
sal_uInt16
nCatLbSelPos
=
0
;
sal_uInt16
nCatLbSelPos
=
0
;
sal_uInt16
nFmtLbSelPos
=
0
;
sal_uInt16
nFmtLbSelPos
=
0
;
LanguageType
eLangType
=
LANGUAGE_DONTKNOW
;
LanguageType
eLangType
=
LANGUAGE_DONTKNOW
;
std
::
vector
<
String
*>
aFmtEntryList
;
std
::
vector
<
OUString
>
aFmtEntryList
;
SvxNumberValueType
eValType
=
SVX_VALUE_TYPE_UNDEFINED
;
SvxNumberValueType
eValType
=
SVX_VALUE_TYPE_UNDEFINED
;
double
nValDouble
=
0
;
double
nValDouble
=
0
;
String
aValString
;
OUString
aValString
;
SfxItemState
eState
=
rSet
.
GetItemState
(
GetWhich
(
SID_ATTR_NUMBERFORMAT_NOLANGUAGE
),
sal_True
,
&
pItem
);
SfxItemState
eState
=
rSet
.
GetItemState
(
GetWhich
(
SID_ATTR_NUMBERFORMAT_NOLANGUAGE
),
sal_True
,
&
pItem
);
...
@@ -524,7 +524,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
...
@@ -524,7 +524,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
FillCurrencyBox
();
FillCurrencyBox
();
String
aPrevString
;
OU
String
aPrevString
;
Color
*
pDummy
=
NULL
;
Color
*
pDummy
=
NULL
;
pNumFmtShell
->
GetInitSettings
(
nCatLbSelPos
,
eLangType
,
nFmtLbSelPos
,
pNumFmtShell
->
GetInitSettings
(
nCatLbSelPos
,
eLangType
,
nFmtLbSelPos
,
aFmtEntryList
,
aPrevString
,
pDummy
);
aFmtEntryList
,
aPrevString
,
pDummy
);
...
@@ -580,8 +580,6 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
...
@@ -580,8 +580,6 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
// everything disabled except SourceFormat checkbox
// everything disabled except SourceFormat checkbox
EnableBySourceFormat_Impl
();
EnableBySourceFormat_Impl
();
}
}
DeleteEntryList_Impl
(
aFmtEntryList
);
}
}
/*************************************************************************
/*************************************************************************
...
@@ -803,9 +801,9 @@ void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem )
...
@@ -803,9 +801,9 @@ void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem )
}
}
}
}
void
SvxNumberFormatTabPage
::
FillFormatListBox_Impl
(
std
::
vector
<
String
*
>&
rEntries
)
void
SvxNumberFormatTabPage
::
FillFormatListBox_Impl
(
std
::
vector
<
OUString
>&
rEntries
)
{
{
String
*
p
Entry
;
OUString
a
Entry
;
String
aTmpString
;
String
aTmpString
;
Font
aFont
=
m_pLbCategory
->
GetFont
();
Font
aFont
=
m_pLbCategory
->
GetFont
();
size_t
i
=
0
;
size_t
i
=
0
;
...
@@ -832,16 +830,13 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<String*>& rEntr
...
@@ -832,16 +830,13 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<String*>& rEntr
case
CAT_ALL
:
case
CAT_ALL
:
case
CAT_TEXT
:
case
CAT_TEXT
:
case
CAT_NUMBER
:
i
=
1
;
case
CAT_NUMBER
:
i
=
1
;
pEntry
=
rEntries
[
0
];
aEntry
=
rEntries
[
0
];
if
(
pEntry
!=
NULL
)
if
(
nTmpCatPos
==
CAT_TEXT
)
{
aTmpString
=
aEntry
;
if
(
nTmpCatPos
==
CAT_TEXT
)
else
aTmpString
=*
pEntry
;
aTmpString
=
pNumFmtShell
->
GetStandardName
();
else
aPrivCat
=
pNumFmtShell
->
GetCategory4Entry
(
0
);
aTmpString
=
pNumFmtShell
->
GetStandardName
();
m_pLbFormat
->
InsertFontEntry
(
aTmpString
,
aFont
);
aPrivCat
=
pNumFmtShell
->
GetCategory4Entry
(
0
);
m_pLbFormat
->
InsertFontEntry
(
aTmpString
,
aFont
);
}
break
;
break
;
default
:
break
;
default
:
break
;
...
@@ -851,30 +846,28 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<String*>& rEntr
...
@@ -851,30 +846,28 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<String*>& rEntr
{
{
for
(
;
i
<
rEntries
.
size
();
++
i
)
for
(
;
i
<
rEntries
.
size
();
++
i
)
{
{
p
Entry
=
rEntries
[
i
];
a
Entry
=
rEntries
[
i
];
aPrivCat
=
pNumFmtShell
->
GetCategory4Entry
(
static_cast
<
sal_uInt16
>
(
i
)
);
aPrivCat
=
pNumFmtShell
->
GetCategory4Entry
(
static_cast
<
sal_uInt16
>
(
i
)
);
if
(
aPrivCat
!=
CAT_TEXT
)
if
(
aPrivCat
!=
CAT_TEXT
)
{
{
Color
*
pPreviewColor
=
NULL
;
Color
*
pPreviewColor
=
NULL
;
String
aPreviewString
(
GetExpColorString
(
pPreviewColor
,
*
p
Entry
,
aPrivCat
)
);
String
aPreviewString
(
GetExpColorString
(
pPreviewColor
,
a
Entry
,
aPrivCat
)
);
Font
aEntryFont
(
m_pLbFormat
->
GetFont
()
);
Font
aEntryFont
(
m_pLbFormat
->
GetFont
()
);
m_pLbFormat
->
InsertFontEntry
(
aPreviewString
,
aEntryFont
,
pPreviewColor
);
m_pLbFormat
->
InsertFontEntry
(
aPreviewString
,
aEntryFont
,
pPreviewColor
);
}
}
else
else
{
{
m_pLbFormat
->
InsertFontEntry
(
*
p
Entry
,
aFont
);
m_pLbFormat
->
InsertFontEntry
(
a
Entry
,
aFont
);
}
}
}
}
}
}
m_pLbFormat
->
SetUpdateMode
(
sal_True
);
m_pLbFormat
->
SetUpdateMode
(
sal_True
);
DeleteEntryList_Impl
(
rEntries
);
rEntries
.
clear
(
);
}
}
void
SvxNumberFormatTabPage
::
DeleteEntryList_Impl
(
std
::
vector
<
String
*
>&
rEntries
)
void
SvxNumberFormatTabPage
::
DeleteEntryList_Impl
(
std
::
vector
<
OUString
>&
rEntries
)
{
{
for
(
std
::
vector
<
String
*>::
const_iterator
it
(
rEntries
.
begin
());
it
!=
rEntries
.
end
();
++
it
)
delete
*
it
;
rEntries
.
clear
();
rEntries
.
clear
();
}
}
...
@@ -1010,9 +1003,9 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
...
@@ -1010,9 +1003,9 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
sal_Bool
bUpdateEdit
sal_Bool
bUpdateEdit
)
)
{
{
std
::
vector
<
String
*
>
aEntryList
;
std
::
vector
<
OUString
>
aEntryList
;
short
nFmtLbSelPos
=
0
;
short
nFmtLbSelPos
=
0
;
short
nTmpCatPos
;
short
nTmpCatPos
;
if
(
bOneAreaFlag
)
if
(
bOneAreaFlag
)
{
{
...
@@ -1044,7 +1037,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
...
@@ -1044,7 +1037,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
{
{
if
(
bUpdateEdit
)
if
(
bUpdateEdit
)
{
{
String
aFormat
=*
aEntryList
[
nFmtLbSelPos
];
OUString
aFormat
=
aEntryList
[
nFmtLbSelPos
];
m_pEdFormat
->
SetText
(
aFormat
);
m_pEdFormat
->
SetText
(
aFormat
);
m_pFtComment
->
SetText
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
));
m_pFtComment
->
SetText
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
));
}
}
...
@@ -1057,7 +1050,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
...
@@ -1057,7 +1050,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
m_pFtComment
->
SetText
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
));
m_pFtComment
->
SetText
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
));
if
(
pNumFmtShell
->
GetUserDefined4Entry
(
nFmtLbSelPos
))
if
(
pNumFmtShell
->
GetUserDefined4Entry
(
nFmtLbSelPos
))
{
{
if
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
).
Len
()
==
0
)
if
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
).
isEmpty
()
)
{
{
m_pFtComment
->
SetText
(
m_pLbCategory
->
GetEntry
(
1
));
m_pFtComment
->
SetText
(
m_pLbCategory
->
GetEntry
(
1
));
}
}
...
@@ -1076,7 +1069,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
...
@@ -1076,7 +1069,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
m_pFtComment
->
SetText
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
));
m_pFtComment
->
SetText
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
));
if
(
pNumFmtShell
->
GetUserDefined4Entry
(
nFmtLbSelPos
))
if
(
pNumFmtShell
->
GetUserDefined4Entry
(
nFmtLbSelPos
))
{
{
if
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
).
Len
()
==
0
)
if
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
).
isEmpty
()
)
{
{
m_pFtComment
->
SetText
(
m_pLbCategory
->
GetEntry
(
1
));
m_pFtComment
->
SetText
(
m_pLbCategory
->
GetEntry
(
1
));
}
}
...
@@ -1094,7 +1087,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
...
@@ -1094,7 +1087,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
}
}
}
}
DeleteEntryList_Impl
(
aEntryList
);
aEntryList
.
clear
(
);
}
}
...
@@ -1197,7 +1190,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
...
@@ -1197,7 +1190,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
aComment
=
pNumFmtShell
->
GetComment4Entry
(
nSelPos
);
aComment
=
pNumFmtShell
->
GetComment4Entry
(
nSelPos
);
if
(
pNumFmtShell
->
GetUserDefined4Entry
(
nFmtLbSelPos
))
if
(
pNumFmtShell
->
GetUserDefined4Entry
(
nFmtLbSelPos
))
{
{
if
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
).
Len
()
==
0
)
if
(
pNumFmtShell
->
GetComment4Entry
(
nFmtLbSelPos
).
isEmpty
()
)
{
{
aComment
=
m_pLbCategory
->
GetEntry
(
1
);
aComment
=
m_pLbCategory
->
GetEntry
(
1
);
}
}
...
@@ -1281,9 +1274,9 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
...
@@ -1281,9 +1274,9 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
if
(
pIB
==
m_pIbAdd
)
if
(
pIB
==
m_pIbAdd
)
{
// Also called from FillItemSet() if a temporary currency format has
{
// Also called from FillItemSet() if a temporary currency format has
// to be added, not only if the Add button is enabled.
// to be added, not only if the Add button is enabled.
String
aFormat
=
m_pEdFormat
->
GetText
();
OU
String
aFormat
=
m_pEdFormat
->
GetText
();
std
::
vector
<
String
*
>
aEntryList
;
std
::
vector
<
OUString
>
aEntryList
;
std
::
vector
<
String
*
>
a2EntryList
;
std
::
vector
<
OUString
>
a2EntryList
;
sal_uInt16
nCatLbSelPos
=
0
;
sal_uInt16
nCatLbSelPos
=
0
;
short
nFmtLbSelPos
=
SELPOS_NONE
;
short
nFmtLbSelPos
=
SELPOS_NONE
;
xub_StrLen
nErrPos
=
0
;
xub_StrLen
nErrPos
=
0
;
...
@@ -1316,12 +1309,12 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
...
@@ -1316,12 +1309,12 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
if
(
bOneAreaFlag
&&
(
nFixedCategory
!=
nCatLbSelPos
))
if
(
bOneAreaFlag
&&
(
nFixedCategory
!=
nCatLbSelPos
))
{
{
if
(
bAdded
)
DeleteEntryList_Impl
(
aEntryList
);
if
(
bAdded
)
aEntryList
.
clear
(
);
bDeleted
=
pNumFmtShell
->
RemoveFormat
(
aFormat
,
bDeleted
=
pNumFmtShell
->
RemoveFormat
(
aFormat
,
nCatLbSelPos
,
nCatLbSelPos
,
nFmtLbSelPos
,
nFmtLbSelPos
,
a2EntryList
);
a2EntryList
);
if
(
bDeleted
)
DeleteEntryList_Impl
(
a2EntryList
);
if
(
bDeleted
)
a2EntryList
.
clear
(
);
m_pEdFormat
->
GrabFocus
();
m_pEdFormat
->
GrabFocus
();
m_pEdFormat
->
SetSelection
(
Selection
(
(
short
)
nErrPos
,
SELECTION_MAX
)
);
m_pEdFormat
->
SetSelection
(
Selection
(
(
short
)
nErrPos
,
SELECTION_MAX
)
);
nReturn
|=
nReturnOneArea
;
nReturn
|=
nReturnOneArea
;
...
@@ -1364,13 +1357,13 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
...
@@ -1364,13 +1357,13 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
EditHdl_Impl
(
m_pEdFormat
);
EditHdl_Impl
(
m_pEdFormat
);
nReturn
=
((
nReturn
&
nReturnOneArea
)
?
0
:
(
nReturn
&
nReturnChanged
));
nReturn
=
((
nReturn
&
nReturnOneArea
)
?
0
:
(
nReturn
&
nReturnChanged
));
DeleteEntryList_Impl
(
aEntryList
);
aEntryList
.
clear
(
);
DeleteEntryList_Impl
(
a2EntryList
);
a2EntryList
.
clear
(
);
}
}
else
if
(
pIB
==
m_pIbRemove
)
else
if
(
pIB
==
m_pIbRemove
)
{
{
String
aFormat
=
m_pEdFormat
->
GetText
();
OUString
aFormat
=
m_pEdFormat
->
GetText
();
std
::
vector
<
String
*
>
aEntryList
;
std
::
vector
<
OUString
>
aEntryList
;
sal_uInt16
nCatLbSelPos
=
0
;
sal_uInt16
nCatLbSelPos
=
0
;
short
nFmtLbSelPos
=
SELPOS_NONE
;
short
nFmtLbSelPos
=
SELPOS_NONE
;
...
@@ -1384,7 +1377,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
...
@@ -1384,7 +1377,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
{
{
if
(
nFmtLbSelPos
>=
0
&&
static_cast
<
size_t
>
(
nFmtLbSelPos
)
<
aEntryList
.
size
()
)
if
(
nFmtLbSelPos
>=
0
&&
static_cast
<
size_t
>
(
nFmtLbSelPos
)
<
aEntryList
.
size
()
)
{
{
aFormat
=
*
aEntryList
[
nFmtLbSelPos
];
aFormat
=
aEntryList
[
nFmtLbSelPos
];
}
}
FillFormatListBox_Impl
(
aEntryList
);
FillFormatListBox_Impl
(
aEntryList
);
...
@@ -1409,7 +1402,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
...
@@ -1409,7 +1402,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
}
}
EditHdl_Impl
(
m_pEdFormat
);
EditHdl_Impl
(
m_pEdFormat
);
DeleteEntryList_Impl
(
aEntryList
);
aEntryList
.
clear
(
);
}
}
else
if
(
pIB
==
m_pIbInfo
)
else
if
(
pIB
==
m_pIbInfo
)
{
{
...
@@ -1520,7 +1513,7 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl )
...
@@ -1520,7 +1513,7 @@ IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl )
||
(
pOptCtrl
==
m_pBtnNegRed
)
||
(
pOptCtrl
==
m_pBtnNegRed
)
||
(
pOptCtrl
==
m_pBtnThousand
)
)
||
(
pOptCtrl
==
m_pBtnThousand
)
)
{
{
String
aFormat
;
OUString
aFormat
;
sal_Bool
bThousand
=
m_pBtnThousand
->
IsEnabled
()
sal_Bool
bThousand
=
m_pBtnThousand
->
IsEnabled
()
&&
m_pBtnThousand
->
IsChecked
();
&&
m_pBtnThousand
->
IsChecked
();
sal_Bool
bNegRed
=
m_pBtnNegRed
->
IsEnabled
()
sal_Bool
bNegRed
=
m_pBtnNegRed
->
IsEnabled
()
...
@@ -1632,14 +1625,14 @@ String SvxNumberFormatTabPage::GetExpColorString(
...
@@ -1632,14 +1625,14 @@ String SvxNumberFormatTabPage::GetExpColorString(
default
:
nVal
=
0
;
break
;
default
:
nVal
=
0
;
break
;
}
}
String
aPreviewString
;
OU
String
aPreviewString
;
pNumFmtShell
->
MakePrevStringFromVal
(
rFormatStr
,
aPreviewString
,
rpPreviewColor
,
nVal
);
pNumFmtShell
->
MakePrevStringFromVal
(
rFormatStr
,
aPreviewString
,
rpPreviewColor
,
nVal
);
return
aPreviewString
;
return
aPreviewString
;
}
}
void
SvxNumberFormatTabPage
::
MakePreviewText
(
const
String
&
rFormat
)
void
SvxNumberFormatTabPage
::
MakePreviewText
(
const
String
&
rFormat
)
{
{
String
aPreviewString
;
OU
String
aPreviewString
;
Color
*
pPreviewColor
=
NULL
;
Color
*
pPreviewColor
=
NULL
;
pNumFmtShell
->
MakePreviewString
(
rFormat
,
aPreviewString
,
pPreviewColor
);
pNumFmtShell
->
MakePreviewString
(
rFormat
,
aPreviewString
,
pPreviewColor
);
m_pWndPreview
->
NotifyChange
(
aPreviewString
,
pPreviewColor
);
m_pWndPreview
->
NotifyChange
(
aPreviewString
,
pPreviewColor
);
...
@@ -1647,7 +1640,7 @@ void SvxNumberFormatTabPage::MakePreviewText( const String& rFormat )
...
@@ -1647,7 +1640,7 @@ void SvxNumberFormatTabPage::MakePreviewText( const String& rFormat )
void
SvxNumberFormatTabPage
::
ChangePreviewText
(
sal_uInt16
nPos
)
void
SvxNumberFormatTabPage
::
ChangePreviewText
(
sal_uInt16
nPos
)
{
{
String
aPreviewString
;
OU
String
aPreviewString
;
Color
*
pPreviewColor
=
NULL
;
Color
*
pPreviewColor
=
NULL
;
pNumFmtShell
->
FormatChanged
(
nPos
,
aPreviewString
,
pPreviewColor
);
pNumFmtShell
->
FormatChanged
(
nPos
,
aPreviewString
,
pPreviewColor
);
m_pWndPreview
->
NotifyChange
(
aPreviewString
,
pPreviewColor
);
m_pWndPreview
->
NotifyChange
(
aPreviewString
,
pPreviewColor
);
...
...
include/svx/numfmtsh.hxx
Dosyayı görüntüle @
9d003eca
...
@@ -62,13 +62,13 @@ public:
...
@@ -62,13 +62,13 @@ public:
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
const
String
&
rNumStr
);
const
OUString
&
rNumStr
);
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
double
nNumVal
,
double
nNumVal
,
const
String
*
pNumStr
=
NULL
);
const
OUString
*
pNumStr
=
NULL
);
~
SvxNumberFormatShell
();
~
SvxNumberFormatShell
();
...
@@ -76,71 +76,71 @@ public:
...
@@ -76,71 +76,71 @@ public:
static
SvxNumberFormatShell
*
Create
(
SvNumberFormatter
*
pNumFormatter
,
static
SvxNumberFormatShell
*
Create
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
const
String
&
rNumStr
);
const
OUString
&
rNumStr
);
static
SvxNumberFormatShell
*
Create
(
SvNumberFormatter
*
pNumFormatter
,
static
SvxNumberFormatShell
*
Create
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
double
nNumVal
,
double
nNumVal
,
const
String
*
pNumStr
=
NULL
);
const
OUString
*
pNumStr
=
NULL
);
void
GetInitSettings
(
sal_uInt16
&
nCatLbPos
,
void
GetInitSettings
(
sal_uInt16
&
nCatLbPos
,
LanguageType
&
rLangType
,
LanguageType
&
rLangType
,
sal_uInt16
&
nFmtLbSelPos
,
sal_uInt16
&
nFmtLbSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
,
std
::
vector
<
OUString
>&
rFmtEntries
,
String
&
rPrevString
,
OUString
&
rPrevString
,
Color
*&
rpPrevColor
);
Color
*&
rpPrevColor
);
void
CategoryChanged
(
sal_uInt16
nCatLbPos
,
void
CategoryChanged
(
sal_uInt16
nCatLbPos
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
);
std
::
vector
<
OUString
>&
rFmtEntries
);
void
LanguageChanged
(
LanguageType
eLangType
,
void
LanguageChanged
(
LanguageType
eLangType
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
);
std
::
vector
<
OUString
>&
rFmtEntries
);
void
FormatChanged
(
sal_uInt16
nFmtLbPos
,
void
FormatChanged
(
sal_uInt16
nFmtLbPos
,
String
&
rPreviewStr
,
OUString
&
rPreviewStr
,
Color
*&
rpFontColor
);
Color
*&
rpFontColor
);
bool
AddFormat
(
String
&
rFormat
,
bool
AddFormat
(
OUString
&
rFormat
,
xub_StrLen
&
rErrPos
,
xub_StrLen
&
rErrPos
,
sal_uInt16
&
rCatLbSelPos
,
sal_uInt16
&
rCatLbSelPos
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
);
std
::
vector
<
OUString
>&
rFmtEntries
);
bool
RemoveFormat
(
const
String
&
rFormat
,
bool
RemoveFormat
(
const
OUString
&
rFormat
,
sal_uInt16
&
rCatLbSelPos
,
sal_uInt16
&
rCatLbSelPos
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
);
std
::
vector
<
OUString
>&
rFmtEntries
);
void
MakeFormat
(
String
&
rFormat
,
void
MakeFormat
(
OUString
&
rFormat
,
bool
bThousand
,
bool
bThousand
,
bool
bNegRed
,
bool
bNegRed
,
sal_uInt16
nPrecision
,
sal_uInt16
nPrecision
,
sal_uInt16
nLeadingZeroes
,
sal_uInt16
nLeadingZeroes
,
sal_uInt16
nCurrencyEntryPos
);
sal_uInt16
nCurrencyEntryPos
);
void
GetOptions
(
const
String
&
rFormat
,
void
GetOptions
(
const
OU
String
&
rFormat
,
bool
&
rThousand
,
bool
&
rThousand
,
bool
&
rNegRed
,
bool
&
rNegRed
,
sal_uInt16
&
rPrecision
,
sal_uInt16
&
rPrecision
,
sal_uInt16
&
rLeadingZeroes
,
sal_uInt16
&
rLeadingZeroes
,
sal_uInt16
&
rCatLbPos
);
sal_uInt16
&
rCatLbPos
);
void
MakePreviewString
(
const
String
&
rFormatStr
,
void
MakePreviewString
(
const
OU
String
&
rFormatStr
,
String
&
rPreviewStr
,
OU
String
&
rPreviewStr
,
Color
*&
rpFontColor
);
Color
*&
rpFontColor
);
void
MakePrevStringFromVal
(
const
String
&
rFormatStr
,
void
MakePrevStringFromVal
(
const
OU
String
&
rFormatStr
,
String
&
rPreviewStr
,
OU
String
&
rPreviewStr
,
Color
*&
rpFontColor
,
Color
*&
rpFontColor
,
double
nValue
);
double
nValue
);
bool
IsUserDefined
(
const
String
&
rFmtString
);
bool
IsUserDefined
(
const
OU
String
&
rFmtString
);
bool
IsTmpCurrencyFormat
(
const
String
&
rFmtString
);
bool
IsTmpCurrencyFormat
(
const
OU
String
&
rFmtString
);
bool
FindEntry
(
const
String
&
rFmtString
,
sal_uInt32
*
pAt
=
NULL
);
bool
FindEntry
(
const
OU
String
&
rFmtString
,
sal_uInt32
*
pAt
=
NULL
);
void
ValidateNewEntries
(
bool
bValidate
=
true
)
{
bUndoAddList
=
!
bValidate
;
}
void
ValidateNewEntries
(
bool
bValidate
=
true
)
{
bUndoAddList
=
!
bValidate
;
}
size_t
GetUpdateDataCount
()
const
;
size_t
GetUpdateDataCount
()
const
;
...
@@ -153,26 +153,26 @@ public:
...
@@ -153,26 +153,26 @@ public:
/** Returns the name of Standard, General, ... for the
/** Returns the name of Standard, General, ... for the
current language. */
current language. */
String
GetStandardName
()
const
;
OUString
GetStandardName
()
const
;
String
GetComment4Entry
(
short
nEntry
);
OUString
GetComment4Entry
(
short
nEntry
);
short
GetCategory4Entry
(
short
nEntry
);
short
GetCategory4Entry
(
short
nEntry
);
bool
GetUserDefined4Entry
(
short
nEntry
);
bool
GetUserDefined4Entry
(
short
nEntry
);
String
GetFormat4Entry
(
short
nEntry
);
OUString
GetFormat4Entry
(
short
nEntry
);
void
SetComment4Entry
(
short
nEntry
,
String
aCommentString
);
void
SetComment4Entry
(
short
nEntry
,
String
aCommentString
);
void
SetCurrencySymbol
(
sal_uInt16
nPos
);
void
SetCurrencySymbol
(
sal_uInt16
nPos
);
sal_uInt32
GetCurrencySymbol
();
sal_uInt32
GetCurrencySymbol
();
sal_uInt16
FindCurrencyFormat
(
const
String
&
rFmtString
);
sal_uInt16
FindCurrencyFormat
(
const
OU
String
&
rFmtString
);
sal_uInt16
FindCurrencyFormat
(
const
NfCurrencyEntry
*
pTmpCurrencyEntry
,
bool
bTmpBanking
);
sal_uInt16
FindCurrencyFormat
(
const
NfCurrencyEntry
*
pTmpCurrencyEntry
,
bool
bTmpBanking
);
void
SetCurCurrencyEntry
(
NfCurrencyEntry
*
);
void
SetCurCurrencyEntry
(
NfCurrencyEntry
*
);
short
GetListPos4Entry
(
sal_uInt32
nIdx
);
short
GetListPos4Entry
(
sal_uInt32
nIdx
);
short
GetListPos4Entry
(
const
String
&
rFmtString
);
short
GetListPos4Entry
(
const
OU
String
&
rFmtString
);
void
GetCurrencySymbols
(
std
::
vector
<
OUString
>&
rList
,
sal_uInt16
*
pPos
);
void
GetCurrencySymbols
(
std
::
vector
<
OUString
>&
rList
,
sal_uInt16
*
pPos
);
void
GetCurrencySymbols
(
std
::
vector
<
OUString
>&
rList
,
bool
bFlag
);
void
GetCurrencySymbols
(
std
::
vector
<
OUString
>&
rList
,
bool
bFlag
);
sal_uInt16
FindCurrencyTableEntry
(
const
String
&
rFmtString
,
bool
&
bTestBanking
);
sal_uInt16
FindCurrencyTableEntry
(
const
OU
String
&
rFmtString
,
bool
&
bTestBanking
);
bool
IsInTable
(
sal_uInt16
nPos
,
bool
bTmpBanking
,
bool
IsInTable
(
sal_uInt16
nPos
,
bool
bTmpBanking
,
OUString
const
&
rFmtString
);
OUString
const
&
rFmtString
);
...
@@ -184,7 +184,7 @@ private:
...
@@ -184,7 +184,7 @@ private:
SvNumberFormatter
*
pFormatter
;
SvNumberFormatter
*
pFormatter
;
SvNumberFormatTable
*
pCurFmtTable
;
SvNumberFormatTable
*
pCurFmtTable
;
SvxNumberValueType
eValType
;
SvxNumberValueType
eValType
;
String
aValStr
;
OUString
aValStr
;
double
nValNum
;
double
nValNum
;
bool
bUndoAddList
;
bool
bUndoAddList
;
std
::
vector
<
sal_uInt32
>
aAddList
;
std
::
vector
<
sal_uInt32
>
aAddList
;
...
@@ -197,26 +197,26 @@ private:
...
@@ -197,26 +197,26 @@ private:
NfCurrencyEntry
*
pCurCurrencyEntry
;
NfCurrencyEntry
*
pCurCurrencyEntry
;
bool
bBankingSymbol
;
bool
bBankingSymbol
;
sal_uInt16
nCurCurrencyEntryPos
;
sal_uInt16
nCurCurrencyEntryPos
;
std
::
vector
<
String
*>
aCurrencyFormatList
;
std
::
vector
<
OUString
>
aCurrencyFormatList
;
bool
bUseStarFormat
;
bool
bUseStarFormat
;
SVX_DLLPRIVATE
short
FillEntryList_Impl
(
std
::
vector
<
String
*
>&
rList
);
SVX_DLLPRIVATE
short
FillEntryList_Impl
(
std
::
vector
<
OUString
>&
rList
);
SVX_DLLPRIVATE
void
FillEListWithStd_Impl
(
std
::
vector
<
String
*
>&
rList
,
sal_uInt16
aPrivCat
,
short
&
Pos
);
SVX_DLLPRIVATE
void
FillEListWithStd_Impl
(
std
::
vector
<
OUString
>&
rList
,
sal_uInt16
aPrivCat
,
short
&
Pos
);
SVX_DLLPRIVATE
short
FillEListWithFormats_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
nSelPos
,
SVX_DLLPRIVATE
short
FillEListWithFormats_Impl
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
,
NfIndexTableOffset
eOffsetStart
,
NfIndexTableOffset
eOffsetStart
,
NfIndexTableOffset
eOffsetEnd
);
NfIndexTableOffset
eOffsetEnd
);
SVX_DLLPRIVATE
short
FillEListWithDateTime_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithDateTime_Impl
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithCurrency_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithCurrency_Impl
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithSysCurrencys
(
std
::
vector
<
String
*
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithSysCurrencys
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithUserCurrencys
(
std
::
vector
<
String
*
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithUserCurrencys
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
);
SVX_DLLPRIVATE
short
FillEListWithUsD_Impl
(
std
::
vector
<
String
*
>&
rList
,
sal_uInt16
nPrivCat
,
short
Pos
);
SVX_DLLPRIVATE
short
FillEListWithUsD_Impl
(
std
::
vector
<
OUString
>&
rList
,
sal_uInt16
nPrivCat
,
short
Pos
);
SVX_DLLPRIVATE
::
std
::
vector
<
sal_uInt32
>::
iterator
GetRemoved_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
::
std
::
vector
<
sal_uInt32
>::
iterator
GetRemoved_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
bool
IsRemoved_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
bool
IsRemoved_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
::
std
::
vector
<
sal_uInt32
>::
iterator
GetAdded_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
::
std
::
vector
<
sal_uInt32
>::
iterator
GetAdded_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
bool
IsAdded_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
bool
IsAdded_Impl
(
size_t
nKey
);
SVX_DLLPRIVATE
void
GetPreviewString_Impl
(
String
&
rString
,
SVX_DLLPRIVATE
void
GetPreviewString_Impl
(
OU
String
&
rString
,
Color
*&
rpColor
);
Color
*&
rpColor
);
SVX_DLLPRIVATE
void
PosToCategory_Impl
(
sal_uInt16
nPos
,
short
&
rCategory
);
SVX_DLLPRIVATE
void
PosToCategory_Impl
(
sal_uInt16
nPos
,
short
&
rCategory
);
SVX_DLLPRIVATE
void
CategoryToPos_Impl
(
short
nCategory
,
sal_uInt16
&
rPos
);
SVX_DLLPRIVATE
void
CategoryToPos_Impl
(
short
nCategory
,
sal_uInt16
&
rPos
);
...
...
svx/source/items/numfmtsh.cxx
Dosyayı görüntüle @
9d003eca
...
@@ -42,19 +42,19 @@ const double SvxNumberFormatShell::DEFAULT_NUMVALUE = 1234.56789;
...
@@ -42,19 +42,19 @@ const double SvxNumberFormatShell::DEFAULT_NUMVALUE = 1234.56789;
SvxNumberFormatShell
*
SvxNumberFormatShell
::
Create
(
SvNumberFormatter
*
pNumFormatter
,
SvxNumberFormatShell
*
SvxNumberFormatShell
::
Create
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
const
String
&
rNumStr
)
const
OU
String
&
rNumStr
)
{
{
return
new
SvxNumberFormatShell
(
pNumFormatter
,
nFormatKey
,
return
new
SvxNumberFormatShell
(
pNumFormatter
,
nFormatKey
,
eNumValType
,
rNumStr
);
eNumValType
,
rNumStr
);
}
}
SvxNumberFormatShell
*
SvxNumberFormatShell
::
Create
(
SvNumberFormatter
*
pNumFormatter
,
SvxNumberFormatShell
*
SvxNumberFormatShell
::
Create
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
double
nNumVal
,
double
nNumVal
,
const
String
*
pNumStr
)
const
OUString
*
pNumStr
)
{
{
return
new
SvxNumberFormatShell
(
pNumFormatter
,
nFormatKey
,
return
new
SvxNumberFormatShell
(
pNumFormatter
,
nFormatKey
,
eNumValType
,
nNumVal
,
pNumStr
);
eNumValType
,
nNumVal
,
pNumStr
);
...
@@ -63,9 +63,9 @@ SvxNumberFormatShell* SvxNumberFormatShell::Create( SvNumberFormatter* pNumForma
...
@@ -63,9 +63,9 @@ SvxNumberFormatShell* SvxNumberFormatShell::Create( SvNumberFormatter* pNumForma
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
SvxNumberFormatShell
::
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
SvxNumberFormatShell
::
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
const
String
&
rNumStr
)
:
const
OUString
&
rNumStr
)
:
pFormatter
(
pNumFormatter
),
pFormatter
(
pNumFormatter
),
pCurFmtTable
(
NULL
),
pCurFmtTable
(
NULL
),
eValType
(
eNumValType
),
eValType
(
eNumValType
),
...
@@ -86,17 +86,17 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
...
@@ -86,17 +86,17 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter,
case
SVX_VALUE_TYPE_NUMBER
:
case
SVX_VALUE_TYPE_NUMBER
:
case
SVX_VALUE_TYPE_UNDEFINED
:
case
SVX_VALUE_TYPE_UNDEFINED
:
default
:
default
:
aValStr
.
Erase
()
;
aValStr
=
""
;
}
}
}
}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
SvxNumberFormatShell
::
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
SvxNumberFormatShell
::
SvxNumberFormatShell
(
SvNumberFormatter
*
pNumFormatter
,
sal_uInt32
nFormatKey
,
sal_uInt32
nFormatKey
,
SvxNumberValueType
eNumValType
,
SvxNumberValueType
eNumValType
,
double
nNumVal
,
double
nNumVal
,
const
String
*
pNumStr
)
:
const
OUString
*
pNumStr
)
:
pFormatter
(
pNumFormatter
),
pFormatter
(
pNumFormatter
),
pCurFmtTable
(
NULL
),
pCurFmtTable
(
NULL
),
eValType
(
eNumValType
),
eValType
(
eNumValType
),
...
@@ -147,10 +147,6 @@ SvxNumberFormatShell::~SvxNumberFormatShell()
...
@@ -147,10 +147,6 @@ SvxNumberFormatShell::~SvxNumberFormatShell()
for
(
std
::
vector
<
sal_uInt32
>::
const_iterator
it
(
aAddList
.
begin
());
it
!=
aAddList
.
end
();
++
it
)
for
(
std
::
vector
<
sal_uInt32
>::
const_iterator
it
(
aAddList
.
begin
());
it
!=
aAddList
.
end
();
++
it
)
pFormatter
->
DeleteEntry
(
*
it
);
pFormatter
->
DeleteEntry
(
*
it
);
}
}
for
(
std
::
vector
<
String
*>::
const_iterator
it
(
aCurrencyFormatList
.
begin
());
it
!=
aCurrencyFormatList
.
end
();
++
it
)
delete
*
it
;
}
}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
...
@@ -177,7 +173,7 @@ void SvxNumberFormatShell::GetUpdateData( sal_uInt32* pDelArray, const sal_uInt3
...
@@ -177,7 +173,7 @@ void SvxNumberFormatShell::GetUpdateData( sal_uInt32* pDelArray, const sal_uInt3
void
SvxNumberFormatShell
::
CategoryChanged
(
sal_uInt16
nCatLbPos
,
void
SvxNumberFormatShell
::
CategoryChanged
(
sal_uInt16
nCatLbPos
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
)
std
::
vector
<
OUString
>&
rFmtEntries
)
{
{
short
nOldCategory
=
nCurCategory
;
short
nOldCategory
=
nCurCategory
;
PosToCategory_Impl
(
nCatLbPos
,
nCurCategory
);
PosToCategory_Impl
(
nCatLbPos
,
nCurCategory
);
...
@@ -194,7 +190,7 @@ void SvxNumberFormatShell::CategoryChanged( sal_uInt16 nCatLbPos,
...
@@ -194,7 +190,7 @@ void SvxNumberFormatShell::CategoryChanged( sal_uInt16 nCatLbPos,
void
SvxNumberFormatShell
::
LanguageChanged
(
LanguageType
eLangType
,
void
SvxNumberFormatShell
::
LanguageChanged
(
LanguageType
eLangType
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
)
std
::
vector
<
OUString
>&
rFmtEntries
)
{
{
eCurLanguage
=
eLangType
;
eCurLanguage
=
eLangType
;
pCurFmtTable
=
&
(
pFormatter
->
ChangeCL
(
nCurCategory
,
pCurFmtTable
=
&
(
pFormatter
->
ChangeCL
(
nCurCategory
,
...
@@ -206,8 +202,8 @@ void SvxNumberFormatShell::LanguageChanged( LanguageType eLangType,
...
@@ -206,8 +202,8 @@ void SvxNumberFormatShell::LanguageChanged( LanguageType eLangType,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
SvxNumberFormatShell
::
FormatChanged
(
sal_uInt16
nFmtLbPos
,
void
SvxNumberFormatShell
::
FormatChanged
(
sal_uInt16
nFmtLbPos
,
String
&
rPreviewStr
,
OUString
&
rPreviewStr
,
Color
*&
rpFontColor
)
Color
*&
rpFontColor
)
{
{
if
(
static_cast
<
size_t
>
(
nFmtLbPos
)
<
aCurEntryList
.
size
()
)
if
(
static_cast
<
size_t
>
(
nFmtLbPos
)
<
aCurEntryList
.
size
()
)
{
{
...
@@ -221,7 +217,7 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
...
@@ -221,7 +217,7 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
{
{
if
(
static_cast
<
size_t
>
(
nFmtLbPos
)
<
aCurrencyFormatList
.
size
()
)
if
(
static_cast
<
size_t
>
(
nFmtLbPos
)
<
aCurrencyFormatList
.
size
()
)
{
{
MakePrevStringFromVal
(
*
aCurrencyFormatList
[
nFmtLbPos
],
MakePrevStringFromVal
(
aCurrencyFormatList
[
nFmtLbPos
],
rPreviewStr
,
rpFontColor
,
nValNum
);
rPreviewStr
,
rpFontColor
,
nValNum
);
}
}
}
}
...
@@ -229,9 +225,9 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
...
@@ -229,9 +225,9 @@ void SvxNumberFormatShell::FormatChanged( sal_uInt16 nFmtLbPos,
}
}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
bool
SvxNumberFormatShell
::
AddFormat
(
String
&
rFormat
,
xub_StrLen
&
rErrPos
,
bool
SvxNumberFormatShell
::
AddFormat
(
OUString
&
rFormat
,
xub_StrLen
&
rErrPos
,
sal_uInt16
&
rCatLbSelPos
,
short
&
rFmtSelPos
,
sal_uInt16
&
rCatLbSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
)
std
::
vector
<
OUString
>&
rFmtEntries
)
{
{
bool
bInserted
=
false
;
bool
bInserted
=
false
;
sal_uInt32
nAddKey
=
pFormatter
->
GetEntryKey
(
rFormat
,
eCurLanguage
);
sal_uInt32
nAddKey
=
pFormatter
->
GetEntryKey
(
rFormat
,
eCurLanguage
);
...
@@ -303,10 +299,10 @@ bool SvxNumberFormatShell::AddFormat( String& rFormat, xub_StrLen& rErrPos,
...
@@ -303,10 +299,10 @@ bool SvxNumberFormatShell::AddFormat( String& rFormat, xub_StrLen& rErrPos,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
bool
SvxNumberFormatShell
::
RemoveFormat
(
const
String
&
rFormat
,
bool
SvxNumberFormatShell
::
RemoveFormat
(
const
OU
String
&
rFormat
,
sal_uInt16
&
rCatLbSelPos
,
sal_uInt16
&
rCatLbSelPos
,
short
&
rFmtSelPos
,
short
&
rFmtSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
)
std
::
vector
<
OUString
>&
rFmtEntries
)
{
{
sal_uInt32
nDelKey
=
pFormatter
->
GetEntryKey
(
rFormat
,
eCurLanguage
);
sal_uInt32
nDelKey
=
pFormatter
->
GetEntryKey
(
rFormat
,
eCurLanguage
);
...
@@ -339,7 +335,7 @@ bool SvxNumberFormatShell::RemoveFormat( const String& rFormat,
...
@@ -339,7 +335,7 @@ bool SvxNumberFormatShell::RemoveFormat( const String& rFormat,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
SvxNumberFormatShell
::
MakeFormat
(
String
&
rFormat
,
void
SvxNumberFormatShell
::
MakeFormat
(
OU
String
&
rFormat
,
bool
bThousand
,
bool
bNegRed
,
bool
bThousand
,
bool
bNegRed
,
sal_uInt16
nPrecision
,
sal_uInt16
nLeadingZeroes
,
sal_uInt16
nPrecision
,
sal_uInt16
nLeadingZeroes
,
sal_uInt16
nCurrencyPos
)
sal_uInt16
nCurrencyPos
)
...
@@ -347,15 +343,15 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
...
@@ -347,15 +343,15 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
if
(
aCurrencyFormatList
.
size
()
>
static_cast
<
size_t
>
(
nCurrencyPos
)
)
if
(
aCurrencyFormatList
.
size
()
>
static_cast
<
size_t
>
(
nCurrencyPos
)
)
{
{
xub_StrLen
rErrPos
=
0
;
xub_StrLen
rErrPos
=
0
;
std
::
vector
<
String
*
>
aFmtEList
;
std
::
vector
<
OUString
>
aFmtEList
;
sal_uInt32
nFound
=
pFormatter
->
TestNewString
(
*
aCurrencyFormatList
[
nCurrencyPos
],
eCurLanguage
);
sal_uInt32
nFound
=
pFormatter
->
TestNewString
(
aCurrencyFormatList
[
nCurrencyPos
],
eCurLanguage
);
if
(
nFound
==
NUMBERFORMAT_ENTRY_NOT_FOUND
)
if
(
nFound
==
NUMBERFORMAT_ENTRY_NOT_FOUND
)
{
{
sal_uInt16
rCatLbSelPos
=
0
;
sal_uInt16
rCatLbSelPos
=
0
;
short
rFmtSelPos
=
0
;
short
rFmtSelPos
=
0
;
AddFormat
(
*
aCurrencyFormatList
[
nCurrencyPos
],
rErrPos
,
rCatLbSelPos
,
AddFormat
(
aCurrencyFormatList
[
nCurrencyPos
],
rErrPos
,
rCatLbSelPos
,
rFmtSelPos
,
aFmtEList
);
rFmtSelPos
,
aFmtEList
);
}
}
...
@@ -366,8 +362,6 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
...
@@ -366,8 +362,6 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
bThousand
,
bNegRed
,
bThousand
,
bNegRed
,
nPrecision
,
nLeadingZeroes
);
nPrecision
,
nLeadingZeroes
);
}
}
for
(
std
::
vector
<
String
*>::
const_iterator
it
(
aFmtEList
.
begin
());
it
!=
aFmtEList
.
end
();
++
it
)
delete
*
it
;
}
}
else
else
{
{
...
@@ -380,7 +374,7 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
...
@@ -380,7 +374,7 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
SvxNumberFormatShell
::
GetOptions
(
const
String
&
rFormat
,
void
SvxNumberFormatShell
::
GetOptions
(
const
OUString
&
rFormat
,
bool
&
rThousand
,
bool
&
rThousand
,
bool
&
rNegRed
,
bool
&
rNegRed
,
sal_uInt16
&
rPrecision
,
sal_uInt16
&
rPrecision
,
...
@@ -422,9 +416,9 @@ void SvxNumberFormatShell::GetOptions( const String& rFormat,
...
@@ -422,9 +416,9 @@ void SvxNumberFormatShell::GetOptions( const String& rFormat,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
SvxNumberFormatShell
::
MakePreviewString
(
const
String
&
rFormatStr
,
void
SvxNumberFormatShell
::
MakePreviewString
(
const
OU
String
&
rFormatStr
,
String
&
rPreviewStr
,
OU
String
&
rPreviewStr
,
Color
*&
rpFontColor
)
Color
*&
rpFontColor
)
{
{
rpFontColor
=
NULL
;
rpFontColor
=
NULL
;
...
@@ -444,7 +438,7 @@ void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr,
...
@@ -444,7 +438,7 @@ void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr,
// #50441# if a string was set in addition to the value, use it for text formats
// #50441# if a string was set in addition to the value, use it for text formats
bool
bUseText
=
(
eValType
==
SVX_VALUE_TYPE_STRING
||
bool
bUseText
=
(
eValType
==
SVX_VALUE_TYPE_STRING
||
(
aValStr
.
Len
()
&&
(
pFormatter
->
GetType
(
nExistingFormat
)
&
NUMBERFORMAT_TEXT
)
)
);
(
!
aValStr
.
isEmpty
()
&&
(
pFormatter
->
GetType
(
nExistingFormat
)
&
NUMBERFORMAT_TEXT
)
)
);
if
(
bUseText
)
if
(
bUseText
)
{
{
OUString
sTempIn
(
aValStr
);
OUString
sTempIn
(
aValStr
);
...
@@ -466,7 +460,7 @@ void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr,
...
@@ -466,7 +460,7 @@ void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
bool
SvxNumberFormatShell
::
IsUserDefined
(
const
String
&
rFmtString
)
bool
SvxNumberFormatShell
::
IsUserDefined
(
const
OU
String
&
rFmtString
)
{
{
sal_uInt32
nFound
=
pFormatter
->
GetEntryKey
(
rFmtString
,
eCurLanguage
);
sal_uInt32
nFound
=
pFormatter
->
GetEntryKey
(
rFmtString
,
eCurLanguage
);
...
@@ -492,7 +486,7 @@ bool SvxNumberFormatShell::IsUserDefined( const String& rFmtString )
...
@@ -492,7 +486,7 @@ bool SvxNumberFormatShell::IsUserDefined( const String& rFmtString )
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
bool
SvxNumberFormatShell
::
FindEntry
(
const
String
&
rFmtString
,
sal_uInt32
*
pAt
/* = NULL */
)
bool
SvxNumberFormatShell
::
FindEntry
(
const
OU
String
&
rFmtString
,
sal_uInt32
*
pAt
/* = NULL */
)
{
{
bool
bRes
=
false
;
bool
bRes
=
false
;
sal_uInt32
nFound
=
pFormatter
->
TestNewString
(
rFmtString
,
eCurLanguage
);
sal_uInt32
nFound
=
pFormatter
->
TestNewString
(
rFmtString
,
eCurLanguage
);
...
@@ -525,9 +519,9 @@ bool SvxNumberFormatShell::FindEntry( const String& rFmtString, sal_uInt32* pAt
...
@@ -525,9 +519,9 @@ bool SvxNumberFormatShell::FindEntry( const String& rFmtString, sal_uInt32* pAt
void
SvxNumberFormatShell
::
GetInitSettings
(
sal_uInt16
&
nCatLbPos
,
void
SvxNumberFormatShell
::
GetInitSettings
(
sal_uInt16
&
nCatLbPos
,
LanguageType
&
rLangType
,
LanguageType
&
rLangType
,
sal_uInt16
&
nFmtLbSelPos
,
sal_uInt16
&
nFmtLbSelPos
,
std
::
vector
<
String
*
>&
rFmtEntries
,
std
::
vector
<
OUString
>&
rFmtEntries
,
String
&
rPrevString
,
OU
String
&
rPrevString
,
Color
*&
rpPrevColor
)
Color
*&
rpPrevColor
)
{
{
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// Vorbedingung: Zahlenformatierer gefunden
// Vorbedingung: Zahlenformatierer gefunden
...
@@ -562,7 +556,7 @@ void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos,
...
@@ -562,7 +556,7 @@ void SvxNumberFormatShell::GetInitSettings( sal_uInt16& nCatLbPos,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
short
SvxNumberFormatShell
::
FillEntryList_Impl
(
std
::
vector
<
String
*
>&
rList
)
short
SvxNumberFormatShell
::
FillEntryList_Impl
(
std
::
vector
<
OUString
>&
rList
)
{
{
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
* Rueckgabewert ist die Listenposition des aktuellen Formates.
* Rueckgabewert ist die Listenposition des aktuellen Formates.
...
@@ -599,7 +593,7 @@ short SvxNumberFormatShell::FillEntryList_Impl( std::vector<String*>& rList )
...
@@ -599,7 +593,7 @@ short SvxNumberFormatShell::FillEntryList_Impl( std::vector<String*>& rList )
return
nSelPos
;
return
nSelPos
;
}
}
void
SvxNumberFormatShell
::
FillEListWithStd_Impl
(
std
::
vector
<
String
*
>&
rList
,
void
SvxNumberFormatShell
::
FillEListWithStd_Impl
(
std
::
vector
<
OUString
>&
rList
,
sal_uInt16
nPrivCat
,
short
&
nSelPos
)
sal_uInt16
nPrivCat
,
short
&
nSelPos
)
{
{
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
...
@@ -609,9 +603,6 @@ void SvxNumberFormatShell::FillEListWithStd_Impl( std::vector<String*>& rList,
...
@@ -609,9 +603,6 @@ void SvxNumberFormatShell::FillEListWithStd_Impl( std::vector<String*>& rList,
*/
*/
DBG_ASSERT
(
pCurFmtTable
!=
NULL
,
"Unbekanntes Zahlenformat!"
);
DBG_ASSERT
(
pCurFmtTable
!=
NULL
,
"Unbekanntes Zahlenformat!"
);
for
(
std
::
vector
<
String
*>::
const_iterator
it
(
aCurrencyFormatList
.
begin
());
it
!=
aCurrencyFormatList
.
end
();
++
it
)
delete
*
it
;
aCurrencyFormatList
.
clear
();
aCurrencyFormatList
.
clear
();
if
(
nPrivCat
==
CAT_CURRENCY
)
if
(
nPrivCat
==
CAT_CURRENCY
)
...
@@ -665,7 +656,7 @@ void SvxNumberFormatShell::FillEListWithStd_Impl( std::vector<String*>& rList,
...
@@ -665,7 +656,7 @@ void SvxNumberFormatShell::FillEListWithStd_Impl( std::vector<String*>& rList,
}
}
}
}
short
SvxNumberFormatShell
::
FillEListWithFormats_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
SvxNumberFormatShell
::
FillEListWithFormats_Impl
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
,
short
nSelPos
,
NfIndexTableOffset
eOffsetStart
,
NfIndexTableOffset
eOffsetStart
,
NfIndexTableOffset
eOffsetEnd
)
NfIndexTableOffset
eOffsetEnd
)
...
@@ -701,21 +692,19 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl( std::vector<String*>& rLi
...
@@ -701,21 +692,19 @@ short SvxNumberFormatShell::FillEListWithFormats_Impl( std::vector<String*>& rLi
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
String
*
const
pStr
=
new
String
(
aNewFormNInfo
);
if
(
nNFEntry
==
nCurFormatKey
)
if
(
nNFEntry
==
nCurFormatKey
)
{
{
nSelPos
=
(
!
IsRemoved_Impl
(
nNFEntry
)
)
?
aCurEntryList
.
size
()
:
SELPOS_NONE
;
nSelPos
=
(
!
IsRemoved_Impl
(
nNFEntry
)
)
?
aCurEntryList
.
size
()
:
SELPOS_NONE
;
}
}
rList
.
push_back
(
pStr
);
rList
.
push_back
(
aNewFormNInfo
);
aCurEntryList
.
push_back
(
nNFEntry
);
aCurEntryList
.
push_back
(
nNFEntry
);
}
}
return
nSelPos
;
return
nSelPos
;
}
}
short
SvxNumberFormatShell
::
FillEListWithDateTime_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
SvxNumberFormatShell
::
FillEListWithDateTime_Impl
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
)
short
nSelPos
)
{
{
sal_uInt16
nMyType
;
sal_uInt16
nMyType
;
...
@@ -743,14 +732,12 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<String*>& rL
...
@@ -743,14 +732,12 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<String*>& rL
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
String
*
const
pStr
=
new
String
(
aNewFormNInfo
);
if
(
nNFEntry
==
nCurFormatKey
)
if
(
nNFEntry
==
nCurFormatKey
)
{
{
nSelPos
=
(
!
IsRemoved_Impl
(
nNFEntry
)
)
?
aCurEntryList
.
size
()
:
SELPOS_NONE
;
nSelPos
=
(
!
IsRemoved_Impl
(
nNFEntry
)
)
?
aCurEntryList
.
size
()
:
SELPOS_NONE
;
}
}
rList
.
push_back
(
pStr
);
rList
.
push_back
(
aNewFormNInfo
);
aCurEntryList
.
push_back
(
nNFEntry
);
aCurEntryList
.
push_back
(
nNFEntry
);
}
}
}
}
...
@@ -758,7 +745,7 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<String*>& rL
...
@@ -758,7 +745,7 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl( std::vector<String*>& rL
return
nSelPos
;
return
nSelPos
;
}
}
short
SvxNumberFormatShell
::
FillEListWithCurrency_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
SvxNumberFormatShell
::
FillEListWithCurrency_Impl
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
)
short
nSelPos
)
{
{
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
...
@@ -792,7 +779,7 @@ short SvxNumberFormatShell::FillEListWithCurrency_Impl( std::vector<String*>& rL
...
@@ -792,7 +779,7 @@ short SvxNumberFormatShell::FillEListWithCurrency_Impl( std::vector<String*>& rL
}
}
short
SvxNumberFormatShell
::
FillEListWithSysCurrencys
(
std
::
vector
<
String
*
>&
rList
,
short
SvxNumberFormatShell
::
FillEListWithSysCurrencys
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
)
short
nSelPos
)
{
{
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
...
@@ -830,14 +817,12 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<String*>& rLi
...
@@ -830,14 +817,12 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<String*>& rLi
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
String
*
const
pStr
=
new
String
(
aNewFormNInfo
);
if
(
nNFEntry
==
nCurFormatKey
)
if
(
nNFEntry
==
nCurFormatKey
)
{
{
nSelPos
=
(
!
IsRemoved_Impl
(
nNFEntry
)
)
?
aCurEntryList
.
size
()
:
SELPOS_NONE
;
nSelPos
=
(
!
IsRemoved_Impl
(
nNFEntry
)
)
?
aCurEntryList
.
size
()
:
SELPOS_NONE
;
}
}
rList
.
push_back
(
pStr
);
rList
.
push_back
(
aNewFormNInfo
);
aCurEntryList
.
push_back
(
nNFEntry
);
aCurEntryList
.
push_back
(
nNFEntry
);
}
}
...
@@ -873,10 +858,8 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<String*>& rLi
...
@@ -873,10 +858,8 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<String*>& rLi
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
CategoryToPos_Impl
(
nMyCat
,
nMyType
);
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
aNewFormNInfo
=
pNumEntry
->
GetFormatstring
();
String
*
const
pStr
=
new
String
(
aNewFormNInfo
);
if
(
nKey
==
nCurFormatKey
)
nSelPos
=
aCurEntryList
.
size
();
if
(
nKey
==
nCurFormatKey
)
nSelPos
=
aCurEntryList
.
size
();
rList
.
push_back
(
pStr
);
rList
.
push_back
(
aNewFormNInfo
);
aCurEntryList
.
push_back
(
nKey
);
aCurEntryList
.
push_back
(
nKey
);
}
}
}
}
...
@@ -886,7 +869,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<String*>& rLi
...
@@ -886,7 +869,7 @@ short SvxNumberFormatShell::FillEListWithSysCurrencys( std::vector<String*>& rLi
return
nSelPos
;
return
nSelPos
;
}
}
short
SvxNumberFormatShell
::
FillEListWithUserCurrencys
(
std
::
vector
<
String
*
>&
rList
,
short
SvxNumberFormatShell
::
FillEListWithUserCurrencys
(
std
::
vector
<
OUString
>&
rList
,
short
nSelPos
)
short
nSelPos
)
{
{
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
...
@@ -907,7 +890,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
...
@@ -907,7 +890,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
OUString
rSymbol
;
OUString
rSymbol
;
OUString
rBankSymbol
;
OUString
rBankSymbol
;
std
::
vector
<
String
*>
aList
;
std
::
vector
<
OUString
>
aList
;
std
::
vector
<
sal_uInt32
>
aKeyList
;
std
::
vector
<
sal_uInt32
>
aKeyList
;
pFormatter
->
GetNewCurrencySymbolString
(
nCurFormatKey
,
rSymbol
,
pFormatter
->
GetNewCurrencySymbolString
(
nCurFormatKey
,
rSymbol
,
...
@@ -992,7 +975,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
...
@@ -992,7 +975,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
if
(
bInsFlag
)
if
(
bInsFlag
)
{
{
aList
.
push_back
(
new
String
(
aNewFormNInfo
)
);
aList
.
push_back
(
aNewFormNInfo
);
aKeyList
.
push_back
(
nKey
);
aKeyList
.
push_back
(
nKey
);
}
}
}
}
...
@@ -1036,9 +1019,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
...
@@ -1036,9 +1019,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
size_t
j
;
size_t
j
;
for
(
j
=
0
;
j
<
aList
.
size
();
++
j
)
for
(
j
=
0
;
j
<
aList
.
size
();
++
j
)
{
{
const
String
*
pTestStr
=
aList
[
j
];
if
(
aList
[
j
]
==
aInsStr
)
if
(
*
pTestStr
==
aInsStr
)
{
{
bFlag
=
false
;
bFlag
=
false
;
break
;
break
;
...
@@ -1046,7 +1027,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
...
@@ -1046,7 +1027,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
}
}
if
(
bFlag
)
if
(
bFlag
)
{
{
rList
.
push_back
(
new
String
(
aInsStr
)
);
rList
.
push_back
(
aInsStr
);
aCurEntryList
.
insert
(
aCurEntryList
.
begin
()
+
(
nPos
++
),
NUMBERFORMAT_ENTRY_NOT_FOUND
);
aCurEntryList
.
insert
(
aCurEntryList
.
begin
()
+
(
nPos
++
),
NUMBERFORMAT_ENTRY_NOT_FOUND
);
}
}
else
else
...
@@ -1069,7 +1050,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
...
@@ -1069,7 +1050,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
for
(
size_t
i
=
nOldListCount
;
i
<
rList
.
size
();
++
i
)
for
(
size_t
i
=
nOldListCount
;
i
<
rList
.
size
();
++
i
)
{
{
aCurrencyFormatList
.
push_back
(
new
String
(
*
rList
[
i
])
);
aCurrencyFormatList
.
push_back
(
rList
[
i
]
);
if
(
nSelPos
==
SELPOS_NONE
&&
bAdaptSelPos
&&
aCurEntryList
[
i
]
==
nCurFormatKey
)
if
(
nSelPos
==
SELPOS_NONE
&&
bAdaptSelPos
&&
aCurEntryList
[
i
]
==
nCurFormatKey
)
nSelPos
=
i
;
nSelPos
=
i
;
...
@@ -1082,7 +1063,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
...
@@ -1082,7 +1063,7 @@ short SvxNumberFormatShell::FillEListWithUserCurrencys( std::vector<String*>& rL
}
}
short
SvxNumberFormatShell
::
FillEListWithUsD_Impl
(
std
::
vector
<
String
*
>&
rList
,
short
SvxNumberFormatShell
::
FillEListWithUsD_Impl
(
std
::
vector
<
OUString
>&
rList
,
sal_uInt16
nPrivCat
,
short
nSelPos
)
sal_uInt16
nPrivCat
,
short
nSelPos
)
{
{
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
/* Erstellen einer aktuellen Liste von Format-Eintraegen.
...
@@ -1126,10 +1107,8 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<String*>& rList,
...
@@ -1126,10 +1107,8 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<String*>& rList,
}
}
if
(
bFlag
)
if
(
bFlag
)
{
{
String
*
const
pStr
=
new
String
(
aNewFormNInfo
);
if
(
nKey
==
nCurFormatKey
)
nSelPos
=
aCurEntryList
.
size
();
if
(
nKey
==
nCurFormatKey
)
nSelPos
=
aCurEntryList
.
size
();
rList
.
push_back
(
pStr
);
rList
.
push_back
(
aNewFormNInfo
);
aCurEntryList
.
push_back
(
nKey
);
aCurEntryList
.
push_back
(
nKey
);
}
}
}
}
...
@@ -1142,13 +1121,13 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<String*>& rList,
...
@@ -1142,13 +1121,13 @@ short SvxNumberFormatShell::FillEListWithUsD_Impl( std::vector<String*>& rList,
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
SvxNumberFormatShell
::
GetPreviewString_Impl
(
String
&
rString
,
Color
*&
rpColor
)
void
SvxNumberFormatShell
::
GetPreviewString_Impl
(
OU
String
&
rString
,
Color
*&
rpColor
)
{
{
rpColor
=
NULL
;
rpColor
=
NULL
;
// #50441# if a string was set in addition to the value, use it for text formats
// #50441# if a string was set in addition to the value, use it for text formats
bool
bUseText
=
(
eValType
==
SVX_VALUE_TYPE_STRING
||
bool
bUseText
=
(
eValType
==
SVX_VALUE_TYPE_STRING
||
(
aValStr
.
Len
()
&&
(
pFormatter
->
GetType
(
nCurFormatKey
)
&
NUMBERFORMAT_TEXT
)
)
);
(
!
aValStr
.
isEmpty
()
&&
(
pFormatter
->
GetType
(
nCurFormatKey
)
&
NUMBERFORMAT_TEXT
)
)
);
if
(
bUseText
)
if
(
bUseText
)
{
{
...
@@ -1258,8 +1237,8 @@ void SvxNumberFormatShell::CategoryToPos_Impl( short nCategory, sal_uInt16& rPos
...
@@ -1258,8 +1237,8 @@ void SvxNumberFormatShell::CategoryToPos_Impl( short nCategory, sal_uInt16& rPos
#************************************************************************/
#************************************************************************/
void
SvxNumberFormatShell
::
MakePrevStringFromVal
(
void
SvxNumberFormatShell
::
MakePrevStringFromVal
(
const
String
&
rFormatStr
,
const
OU
String
&
rFormatStr
,
String
&
rPreviewStr
,
OU
String
&
rPreviewStr
,
Color
*&
rpFontColor
,
Color
*&
rpFontColor
,
double
nValue
)
double
nValue
)
{
{
...
@@ -1308,10 +1287,10 @@ void SvxNumberFormatShell::SetComment4Entry(short nEntry,String aEntStr)
...
@@ -1308,10 +1287,10 @@ void SvxNumberFormatShell::SetComment4Entry(short nEntry,String aEntStr)
#*
#*
#************************************************************************/
#************************************************************************/
String
SvxNumberFormatShell
::
GetComment4Entry
(
short
nEntry
)
OU
String
SvxNumberFormatShell
::
GetComment4Entry
(
short
nEntry
)
{
{
if
(
nEntry
<
0
)
if
(
nEntry
<
0
)
return
String
();
return
OU
String
();
if
(
static_cast
<
size_t
>
(
nEntry
)
<
aCurEntryList
.
size
())
if
(
static_cast
<
size_t
>
(
nEntry
)
<
aCurEntryList
.
size
())
{
{
...
@@ -1321,7 +1300,7 @@ String SvxNumberFormatShell::GetComment4Entry(short nEntry)
...
@@ -1321,7 +1300,7 @@ String SvxNumberFormatShell::GetComment4Entry(short nEntry)
return
pNumEntry
->
GetComment
();
return
pNumEntry
->
GetComment
();
}
}
return
String
();
return
OU
String
();
}
}
/*************************************************************************
/*************************************************************************
...
@@ -1420,15 +1399,15 @@ bool SvxNumberFormatShell::GetUserDefined4Entry(short nEntry)
...
@@ -1420,15 +1399,15 @@ bool SvxNumberFormatShell::GetUserDefined4Entry(short nEntry)
#*
#*
#************************************************************************/
#************************************************************************/
String
SvxNumberFormatShell
::
GetFormat4Entry
(
short
nEntry
)
OU
String
SvxNumberFormatShell
::
GetFormat4Entry
(
short
nEntry
)
{
{
if
(
nEntry
<
0
)
if
(
nEntry
<
0
)
return
String
();
return
OU
String
();
if
(
!
aCurrencyFormatList
.
empty
()
)
if
(
!
aCurrencyFormatList
.
empty
()
)
{
{
if
(
aCurrencyFormatList
.
size
()
>
static_cast
<
size_t
>
(
nEntry
)
)
if
(
aCurrencyFormatList
.
size
()
>
static_cast
<
size_t
>
(
nEntry
)
)
return
*
aCurrencyFormatList
[
nEntry
];
return
aCurrencyFormatList
[
nEntry
];
}
}
else
else
{
{
...
@@ -1438,7 +1417,7 @@ String SvxNumberFormatShell::GetFormat4Entry(short nEntry)
...
@@ -1438,7 +1417,7 @@ String SvxNumberFormatShell::GetFormat4Entry(short nEntry)
if
(
pNumEntry
!=
NULL
)
if
(
pNumEntry
!=
NULL
)
return
pNumEntry
->
GetFormatstring
();
return
pNumEntry
->
GetFormatstring
();
}
}
return
String
();
return
OU
String
();
}
}
/*************************************************************************
/*************************************************************************
...
@@ -1479,7 +1458,7 @@ short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx)
...
@@ -1479,7 +1458,7 @@ short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx)
return
nSelP
;
return
nSelP
;
}
}
short
SvxNumberFormatShell
::
GetListPos4Entry
(
const
String
&
rFmtString
)
short
SvxNumberFormatShell
::
GetListPos4Entry
(
const
OU
String
&
rFmtString
)
{
{
sal_uInt32
nAt
=
0
;
sal_uInt32
nAt
=
0
;
short
nSelP
=
SELPOS_NONE
;
short
nSelP
=
SELPOS_NONE
;
...
@@ -1493,7 +1472,7 @@ short SvxNumberFormatShell::GetListPos4Entry( const String& rFmtString )
...
@@ -1493,7 +1472,7 @@ short SvxNumberFormatShell::GetListPos4Entry( const String& rFmtString )
{
{
for
(
size_t
i
=
0
;
i
<
aCurrencyFormatList
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
aCurrencyFormatList
.
size
();
i
++
)
{
{
if
(
rFmtString
==
*
aCurrencyFormatList
[
i
])
if
(
rFmtString
==
aCurrencyFormatList
[
i
])
{
{
nSelP
=
static_cast
<
short
>
(
i
);
nSelP
=
static_cast
<
short
>
(
i
);
break
;
break
;
...
@@ -1504,7 +1483,7 @@ short SvxNumberFormatShell::GetListPos4Entry( const String& rFmtString )
...
@@ -1504,7 +1483,7 @@ short SvxNumberFormatShell::GetListPos4Entry( const String& rFmtString )
return
nSelP
;
return
nSelP
;
}
}
String
SvxNumberFormatShell
::
GetStandardName
()
const
OU
String
SvxNumberFormatShell
::
GetStandardName
()
const
{
{
return
pFormatter
->
GetStandardName
(
eCurLanguage
);
return
pFormatter
->
GetStandardName
(
eCurLanguage
);
}
}
...
@@ -1659,7 +1638,7 @@ void SvxNumberFormatShell::SetCurCurrencyEntry(NfCurrencyEntry* pCEntry)
...
@@ -1659,7 +1638,7 @@ void SvxNumberFormatShell::SetCurCurrencyEntry(NfCurrencyEntry* pCEntry)
pCurCurrencyEntry
=
pCEntry
;
pCurCurrencyEntry
=
pCEntry
;
}
}
bool
SvxNumberFormatShell
::
IsTmpCurrencyFormat
(
const
String
&
rFmtString
)
bool
SvxNumberFormatShell
::
IsTmpCurrencyFormat
(
const
OU
String
&
rFmtString
)
{
{
sal_uInt32
nFound
;
sal_uInt32
nFound
;
FindEntry
(
rFmtString
,
&
nFound
);
FindEntry
(
rFmtString
,
&
nFound
);
...
@@ -1671,7 +1650,7 @@ bool SvxNumberFormatShell::IsTmpCurrencyFormat( const String& rFmtString )
...
@@ -1671,7 +1650,7 @@ bool SvxNumberFormatShell::IsTmpCurrencyFormat( const String& rFmtString )
return
false
;
return
false
;
}
}
sal_uInt16
SvxNumberFormatShell
::
FindCurrencyFormat
(
const
String
&
rFmtString
)
sal_uInt16
SvxNumberFormatShell
::
FindCurrencyFormat
(
const
OU
String
&
rFmtString
)
{
{
const
NfCurrencyTable
&
rCurrencyTable
=
SvNumberFormatter
::
GetTheCurrencyTable
();
const
NfCurrencyTable
&
rCurrencyTable
=
SvNumberFormatter
::
GetTheCurrencyTable
();
sal_uInt16
nCount
=
rCurrencyTable
.
size
();
sal_uInt16
nCount
=
rCurrencyTable
.
size
();
...
@@ -1695,7 +1674,7 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const String& rFmtString )
...
@@ -1695,7 +1674,7 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const String& rFmtString )
return
(
sal_uInt16
)
-
1
;
return
(
sal_uInt16
)
-
1
;
}
}
sal_uInt16
SvxNumberFormatShell
::
FindCurrencyTableEntry
(
const
String
&
rFmtString
,
bool
&
bTestBanking
)
sal_uInt16
SvxNumberFormatShell
::
FindCurrencyTableEntry
(
const
OU
String
&
rFmtString
,
bool
&
bTestBanking
)
{
{
sal_uInt16
nPos
=
(
sal_uInt16
)
-
1
;
sal_uInt16
nPos
=
(
sal_uInt16
)
-
1
;
...
@@ -1732,13 +1711,13 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry( const String& rFmtStrin
...
@@ -1732,13 +1711,13 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyTableEntry( const String& rFmtStrin
OUString
_aSymbol
=
pTmpCurrencyEntry
->
BuildSymbolString
(
false
);
OUString
_aSymbol
=
pTmpCurrencyEntry
->
BuildSymbolString
(
false
);
OUString
aBankSymbol
=
pTmpCurrencyEntry
->
BuildSymbolString
(
true
);
OUString
aBankSymbol
=
pTmpCurrencyEntry
->
BuildSymbolString
(
true
);
if
(
rFmtString
.
Search
(
_aSymbol
)
!=
STRING_NOTFOUND
)
if
(
rFmtString
.
indexOf
(
_aSymbol
)
!=
-
1
)
{
{
bTestBanking
=
false
;
bTestBanking
=
false
;
nPos
=
i
;
nPos
=
i
;
break
;
break
;
}
}
else
if
(
rFmtString
.
Search
(
aBankSymbol
)
!=
STRING_NOTFOUND
)
else
if
(
rFmtString
.
indexOf
(
aBankSymbol
)
!=
-
1
)
{
{
bTestBanking
=
true
;
bTestBanking
=
true
;
nPos
=
i
;
nPos
=
i
;
...
...
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