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
4449da41
Kaydet (Commit)
4449da41
authored
Haz 10, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Haz 12, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(SvxNumSettingsArr_Impl) to boost::ptr_vector
Change-Id: I1d53e6815c4da5ef5f525dbc11bca73723bb3bd2
üst
bbe2cb40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
18 deletions
+14
-18
numpages.hxx
cui/source/inc/numpages.hxx
+2
-3
numpages.cxx
cui/source/tabpages/numpages.cxx
+12
-15
No files found.
cui/source/inc/numpages.hxx
Dosyayı görüntüle @
4449da41
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
// include ---------------------------------------------------------------
// include ---------------------------------------------------------------
#include <vector>
#include <vector>
#include <boost/ptr_container/ptr_vector.hpp>
#include <sfx2/tabdlg.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/group.hxx>
#include <vcl/group.hxx>
...
@@ -41,7 +42,6 @@
...
@@ -41,7 +42,6 @@
#include <vcl/field.hxx>
#include <vcl/field.hxx>
#include <editeng/numdef.hxx>
#include <editeng/numdef.hxx>
#include <svtools/ctrlbox.hxx>
#include <svtools/ctrlbox.hxx>
#include <svl/svarray.hxx>
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
class
SvxNumRule
;
class
SvxNumRule
;
...
@@ -68,8 +68,7 @@ struct SvxNumSettings_Impl
...
@@ -68,8 +68,7 @@ struct SvxNumSettings_Impl
{}
{}
};
};
typedef
SvxNumSettings_Impl
*
SvxNumSettings_ImplPtr
;
typedef
boost
::
ptr_vector
<
SvxNumSettings_Impl
>
SvxNumSettingsArr_Impl
;
SV_DECL_PTRARR_DEL
(
SvxNumSettingsArr_Impl
,
SvxNumSettings_ImplPtr
,
8
)
//------------------------------------------------
//------------------------------------------------
...
...
cui/source/tabpages/numpages.cxx
Dosyayı görüntüle @
4449da41
...
@@ -89,8 +89,6 @@ using namespace com::sun::star::container;
...
@@ -89,8 +89,6 @@ using namespace com::sun::star::container;
using
namespace
com
::
sun
::
star
::
style
;
using
namespace
com
::
sun
::
star
::
style
;
using
rtl
::
OUString
;
using
rtl
::
OUString
;
SV_IMPL_PTRARR
(
SvxNumSettingsArr_Impl
,
SvxNumSettings_ImplPtr
);
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_SINGLENUM 1
#define NUM_PAGETYPE_SINGLENUM 1
#define NUM_PAGETYPE_NUM 2
#define NUM_PAGETYPE_NUM 2
...
@@ -119,10 +117,10 @@ Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider()
...
@@ -119,10 +117,10 @@ Reference<XDefaultNumberingProvider> lcl_GetNumberingProvider()
return
xRet
;
return
xRet
;
}
}
SvxNumSettings_Impl
Ptr
lcl_CreateNumSettingsPtr
(
const
Sequence
<
PropertyValue
>&
rLevelProps
)
SvxNumSettings_Impl
*
lcl_CreateNumSettingsPtr
(
const
Sequence
<
PropertyValue
>&
rLevelProps
)
{
{
const
PropertyValue
*
pValues
=
rLevelProps
.
getConstArray
();
const
PropertyValue
*
pValues
=
rLevelProps
.
getConstArray
();
SvxNumSettings_Impl
Ptr
pNew
=
new
SvxNumSettings_Impl
;
SvxNumSettings_Impl
*
pNew
=
new
SvxNumSettings_Impl
;
for
(
sal_Int32
j
=
0
;
j
<
rLevelProps
.
getLength
();
j
++
)
for
(
sal_Int32
j
=
0
;
j
<
rLevelProps
.
getLength
();
j
++
)
{
{
if
(
pValues
[
j
].
Name
==
cNumberingType
)
if
(
pValues
[
j
].
Name
==
cNumberingType
)
...
@@ -238,8 +236,8 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
...
@@ -238,8 +236,8 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
const
Sequence
<
PropertyValue
>*
pValuesArr
=
aNumberings
.
getConstArray
();
const
Sequence
<
PropertyValue
>*
pValuesArr
=
aNumberings
.
getConstArray
();
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
{
{
SvxNumSettings_Impl
Ptr
pNew
=
lcl_CreateNumSettingsPtr
(
pValuesArr
[
i
]);
SvxNumSettings_Impl
*
pNew
=
lcl_CreateNumSettingsPtr
(
pValuesArr
[
i
]);
aNumSettingsArr
.
Insert
(
pNew
,
aNumSettingsArr
.
Count
()
);
aNumSettingsArr
.
push_back
(
pNew
);
}
}
}
}
catch
(
Exception
&
)
catch
(
Exception
&
)
...
@@ -255,7 +253,6 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
...
@@ -255,7 +253,6 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
delete
pActNum
;
delete
pActNum
;
delete
pExamplesVS
;
delete
pExamplesVS
;
delete
pSaveNum
;
delete
pSaveNum
;
aNumSettingsArr
.
DeleteAndDestroy
(
0
,
aNumSettingsArr
.
Count
());
}
}
SfxTabPage
*
SvxSingleNumPickTabPage
::
Create
(
Window
*
pParent
,
SfxTabPage
*
SvxSingleNumPickTabPage
::
Create
(
Window
*
pParent
,
...
@@ -352,10 +349,10 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl)
...
@@ -352,10 +349,10 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl)
bPreset
=
sal_False
;
bPreset
=
sal_False
;
bModified
=
sal_True
;
bModified
=
sal_True
;
sal_uInt16
nIdx
=
pExamplesVS
->
GetSelectItemId
()
-
1
;
sal_uInt16
nIdx
=
pExamplesVS
->
GetSelectItemId
()
-
1
;
DBG_ASSERT
(
aNumSettingsArr
.
Count
()
>
nIdx
,
"wrong index"
);
DBG_ASSERT
(
aNumSettingsArr
.
size
()
>
nIdx
,
"wrong index"
);
if
(
aNumSettingsArr
.
Count
()
<=
nIdx
)
if
(
aNumSettingsArr
.
size
()
<=
nIdx
)
return
0
;
return
0
;
SvxNumSettings_Impl
Ptr
_pSet
=
aNumSettingsArr
.
GetObject
(
nIdx
)
;
SvxNumSettings_Impl
*
_pSet
=
&
aNumSettingsArr
[
nIdx
]
;
sal_Int16
eNewType
=
_pSet
->
nNumberType
;
sal_Int16
eNewType
=
_pSet
->
nNumberType
;
const
sal_Unicode
cLocalPrefix
=
!
_pSet
->
sPrefix
.
isEmpty
()
?
_pSet
->
sPrefix
.
getStr
()[
0
]
:
0
;
const
sal_Unicode
cLocalPrefix
=
!
_pSet
->
sPrefix
.
isEmpty
()
?
_pSet
->
sPrefix
.
getStr
()[
0
]
:
0
;
const
sal_Unicode
cLocalSuffix
=
!
_pSet
->
sSuffix
.
isEmpty
()
?
_pSet
->
sSuffix
.
getStr
()[
0
]
:
0
;
const
sal_Unicode
cLocalSuffix
=
!
_pSet
->
sSuffix
.
isEmpty
()
?
_pSet
->
sSuffix
.
getStr
()[
0
]
:
0
;
...
@@ -606,8 +603,8 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent,
...
@@ -606,8 +603,8 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent,
Any
aValueAny
=
xLevel
->
getByIndex
(
nLevel
);
Any
aValueAny
=
xLevel
->
getByIndex
(
nLevel
);
Sequence
<
PropertyValue
>
aLevelProps
;
Sequence
<
PropertyValue
>
aLevelProps
;
aValueAny
>>=
aLevelProps
;
aValueAny
>>=
aLevelProps
;
SvxNumSettings_Impl
Ptr
pNew
=
lcl_CreateNumSettingsPtr
(
aLevelProps
);
SvxNumSettings_Impl
*
pNew
=
lcl_CreateNumSettingsPtr
(
aLevelProps
);
rItemArr
.
Insert
(
pNew
,
rItemArr
.
Count
()
);
rItemArr
.
push_back
(
pNew
);
}
}
}
}
}
}
...
@@ -725,11 +722,11 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl)
...
@@ -725,11 +722,11 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl)
SvxNumSettingsArr_Impl
&
rItemArr
=
aNumSettingsArrays
[
pExamplesVS
->
GetSelectItemId
()
-
1
];
SvxNumSettingsArr_Impl
&
rItemArr
=
aNumSettingsArrays
[
pExamplesVS
->
GetSelectItemId
()
-
1
];
Font
&
rActBulletFont
=
lcl_GetDefaultBulletFont
();
Font
&
rActBulletFont
=
lcl_GetDefaultBulletFont
();
SvxNumSettings_Impl
Ptr
pLevelSettings
=
0
;
SvxNumSettings_Impl
*
pLevelSettings
=
0
;
for
(
sal_uInt16
i
=
0
;
i
<
pActNum
->
GetLevelCount
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
pActNum
->
GetLevelCount
();
i
++
)
{
{
if
(
rItemArr
.
Count
()
>
i
)
if
(
rItemArr
.
size
()
>
i
)
pLevelSettings
=
rItemArr
[
i
];
pLevelSettings
=
&
rItemArr
[
i
];
if
(
!
pLevelSettings
)
if
(
!
pLevelSettings
)
break
;
break
;
SvxNumberFormat
aFmt
(
pActNum
->
GetLevel
(
i
));
SvxNumberFormat
aFmt
(
pActNum
->
GetLevel
(
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