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
6401ca33
Kaydet (Commit)
6401ca33
authored
Kas 06, 2011
tarafından
Daisuke Nishino
Kaydeden (comit)
Caolán McNamara
Kas 07, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of SvStringsSort
üst
0a590fc4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
44 additions
and
71 deletions
+44
-71
svstdarr.hxx
svl/inc/svl/svstdarr.hxx
+0
-5
svarray.cxx
svl/source/memtools/svarray.cxx
+0
-1
inettype.cxx
svl/source/misc/inettype.cxx
+28
-44
doc.hxx
sw/inc/doc.hxx
+1
-2
editsh.hxx
sw/inc/editsh.hxx
+1
-2
doctxm.cxx
sw/source/core/doc/doctxm.cxx
+4
-5
edtox.cxx
sw/source/core/edit/edtox.cxx
+1
-2
swuiidxmrk.cxx
sw/source/ui/index/swuiidxmrk.cxx
+9
-5
unusedcode.easy
unusedcode.easy
+0
-5
No files found.
svl/inc/svl/svstdarr.hxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -57,11 +57,6 @@ SV_DECL_PTRARR_DEL_VISIBILITY( SvStringsDtor, StringPtr, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_STRINGSDTOR_DECL
#endif
#ifndef _SVSTDARR_STRINGSSORT_DECL
SV_DECL_PTRARR_SORT_VISIBILITY
(
SvStringsSort
,
StringPtr
,
1
,
1
,
SVL_DLLPUBLIC
)
#define _SVSTDARR_STRINGSSORT_DECL
#endif
#ifndef _SVSTDARR_STRINGSSORTDTOR_DECL
SV_DECL_PTRARR_SORT_DEL_VISIBILITY
(
SvStringsSortDtor
,
StringPtr
,
1
,
1
,
SVL_DLLPUBLIC
)
#define _SVSTDARR_STRINGSSORTDTOR_DECL
...
...
svl/source/memtools/svarray.cxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -63,7 +63,6 @@ sal_uInt16 SvPtrarr::GetPos( const VoidPtr& aElement ) const
SV_IMPL_PTRARR
(
SvStrings
,
StringPtr
)
SV_IMPL_PTRARR
(
SvStringsDtor
,
StringPtr
)
SV_IMPL_OP_PTRARR_SORT
(
SvStringsSort
,
StringPtr
)
SV_IMPL_OP_PTRARR_SORT
(
SvStringsSortDtor
,
StringPtr
)
// ---------------- strings -------------------------------------
...
...
svl/source/misc/inettype.cxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -34,6 +34,8 @@
#include <svl/inettype.hxx>
#include <svl/svl.hrc>
#include <boost/ptr_container/ptr_map.hpp>
#include "getstringresource.hxx"
#ifndef _SVSTDARR_STRINGSSORT_DECL
...
...
@@ -62,30 +64,33 @@ struct TypeIDMapEntry
};
//============================================================================
struct
TypeNameMapEntry
:
public
UniString
struct
TypeNameMapEntry
{
UniString
m_aExtension
;
INetContentType
m_eTypeID
;
TypeNameMapEntry
(
const
UniString
&
rType
)
:
UniString
(
rType
),
m_eTypeID
(
CONTENT_TYPE_UNKNOWN
)
{}
TypeNameMapEntry
()
:
m_eTypeID
(
CONTENT_TYPE_UNKNOWN
)
{}
};
//============================================================================
struct
ExtensionMapEntry
:
public
UniString
struct
ExtensionMapEntry
{
INetContentType
m_eTypeID
;
ExtensionMapEntry
(
const
UniString
&
rExt
)
:
UniString
(
rExt
),
m_eTypeID
(
CONTENT_TYPE_UNKNOWN
)
{}
ExtensionMapEntry
()
:
m_eTypeID
(
CONTENT_TYPE_UNKNOWN
)
{}
};
//============================================================================
class
Registration
{
typedef
boost
::
ptr_map
<
UniString
,
TypeNameMapEntry
>
TypeNameMap
;
typedef
boost
::
ptr_map
<
UniString
,
ExtensionMapEntry
>
ExtensionMap
;
Table
m_aTypeIDMap
;
// map TypeID to TypeName, Presentation
SvStringsSort
m_aTypeNameMap
;
// map TypeName to TypeID, Extension
SvStringsSort
m_aExtensionMap
;
// map Extension to TypeID
TypeNameMap
m_aTypeNameMap
;
// map TypeName to TypeID, Extension
ExtensionMap
m_aExtensionMap
;
// map Extension to TypeID
sal_uInt32
m_nNextDynamicID
;
public
:
...
...
@@ -527,15 +532,6 @@ Registration::~Registration()
delete
static_cast
<
TypeIDMapEntry
*
>
(
m_aTypeIDMap
.
GetObject
(
i
));
}
m_aTypeIDMap
.
Clear
();
{
for
(
sal_uInt16
i
=
0
;
i
<
m_aTypeNameMap
.
Count
();
++
i
)
delete
static_cast
<
TypeNameMapEntry
*
>
(
m_aTypeNameMap
.
GetObject
(
i
));
}
m_aTypeNameMap
.
Remove
(
sal_uInt16
(
0
),
m_aTypeNameMap
.
Count
());
{
for
(
sal_uInt16
i
=
0
;
i
<
m_aExtensionMap
.
Count
();
++
i
)
delete
static_cast
<
ExtensionMapEntry
*
>
(
m_aExtensionMap
.
GetObject
(
i
));
}
m_aExtensionMap
.
Remove
(
sal_uInt16
(
0
),
m_aExtensionMap
.
Count
());
}
//============================================================================
...
...
@@ -545,12 +541,10 @@ TypeNameMapEntry * Registration::getExtensionEntry(UniString const &
{
UniString
aTheTypeName
=
rTypeName
;
aTheTypeName
.
ToLowerAscii
();
sal_uInt16
nPos
;
Registration
&
rRegistration
=
theRegistration
::
get
();
if
(
rRegistration
.
m_aTypeNameMap
.
Seek_Entry
(
&
aTheTypeName
,
&
nPos
))
return
static_cast
<
TypeNameMapEntry
*
>
(
rRegistration
.
m_aTypeNameMap
.
GetObject
(
nPos
));
typename
TypeNameMap
::
iterator
it
=
rRegistration
.
m_aTypeNameMap
.
find
(
aTheTypeName
);
if
(
it
!=
rRegistration
.
m_aTypeNameMap
.
end
())
return
it
->
second
;
return
0
;
}
...
...
@@ -581,18 +575,17 @@ INetContentType Registration::RegisterContentType(UniString const & rTypeName,
pTypeIDMapEntry
->
m_aSystemFileType
=
*
pSystemFileType
;
rRegistration
.
m_aTypeIDMap
.
Insert
(
eTypeID
,
pTypeIDMapEntry
);
TypeNameMapEntry
*
pTypeNameMapEntry
=
new
TypeNameMapEntry
(
aTheTypeName
);
std
::
auto_ptr
<
TypeNameMapEntry
>
pTypeNameMapEntry
(
new
TypeNameMapEntry
()
);
if
(
pExtension
)
pTypeNameMapEntry
->
m_aExtension
=
*
pExtension
;
pTypeNameMapEntry
->
m_eTypeID
=
eTypeID
;
rRegistration
.
m_aTypeNameMap
.
Insert
(
pTypeNameMapEntry
);
rRegistration
.
m_aTypeNameMap
.
insert
(
aTheTypeName
,
pTypeNameMapEntry
);
if
(
pExtension
)
{
ExtensionMapEntry
*
pExtensionMapEntry
=
new
ExtensionMapEntry
(
*
pExtension
);
std
::
auto_ptr
<
ExtensionMapEntry
>
pExtensionMapEntry
(
new
ExtensionMapEntry
());
pExtensionMapEntry
->
m_eTypeID
=
eTypeID
;
rRegistration
.
m_aExtensionMap
.
Insert
(
pExtensionMapEntry
);
rRegistration
.
m_aExtensionMap
.
insert
(
*
pExtension
,
pExtensionMapEntry
);
}
return
eTypeID
;
...
...
@@ -606,13 +599,10 @@ INetContentType Registration::GetContentType(UniString const & rTypeName)
UniString
aTheTypeName
=
rTypeName
;
aTheTypeName
.
ToLowerAscii
();
sal_uInt16
nPos
;
return
rRegistration
.
m_aTypeNameMap
.
Seek_Entry
(
&
aTheTypeName
,
&
nPos
)
?
static_cast
<
TypeNameMapEntry
*
>
(
rRegistration
.
m_aTypeNameMap
.
GetObject
(
nPos
))
->
m_eTypeID
:
CONTENT_TYPE_UNKNOWN
;
typename
TypeNameMap
::
iterator
it
=
rRegistration
.
m_aTypeNameMap
.
find
(
aTheTypeName
);
return
it
!=
rRegistration
.
m_aTypeNameMap
.
end
()
?
it
->
second
->
m_eTypeID
:
CONTENT_TYPE_UNKNOWN
;
}
//============================================================================
...
...
@@ -646,16 +636,10 @@ INetContentType Registration::GetContentType4Extension(UniString const &
{
Registration
&
rRegistration
=
theRegistration
::
get
();
sal_uInt16
nPos
;
return
rRegistration
.
m_aExtensionMap
.
Seek_Entry
(
const_cast
<
UniString
*
>
(
&
rExtension
),
&
nPos
)
?
static_cast
<
ExtensionMapEntry
*
>
(
rRegistration
.
m_aExtensionMap
.
GetObject
(
nPos
))
->
m_eTypeID
:
CONTENT_TYPE_UNKNOWN
;
typename
ExtensionMap
::
iterator
it
=
rRegistration
.
m_aExtensionMap
.
find
(
rExtension
);
return
it
!=
rRegistration
.
m_aExtensionMap
.
end
()
?
it
->
second
->
m_eTypeID
:
CONTENT_TYPE_UNKNOWN
;
}
//============================================================================
...
...
sw/inc/doc.hxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -109,7 +109,6 @@ class SdrUndoAction;
class
VirtualDevice
;
class
SfxPrinter
;
class
SvNumberFormatter
;
class
SvStringsSort
;
class
SvxMacro
;
class
SvxMacroTableDtor
;
class
SwAutoCompleteWord
;
...
...
@@ -1408,7 +1407,7 @@ public:
void
SetDefaultTOXBase
(
const
SwTOXBase
&
rBase
);
// Key for management of index.
sal_uInt16
GetTOIKeys
(
SwTOIKeyType
eTyp
,
SvStringsSort
&
rArr
)
const
;
sal_uInt16
GetTOIKeys
(
SwTOIKeyType
eTyp
,
std
::
vector
<
String
>
&
rArr
)
const
;
// Sort table text.
sal_Bool
SortTbl
(
const
SwSelBoxes
&
rBoxes
,
const
SwSortOptions
&
);
...
...
sw/inc/editsh.hxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -66,7 +66,6 @@ class SwNewDBMgr;
struct
SwDocStat
;
class
SvStringsDtor
;
class
SvStringsSort
;
class
SwAutoCompleteWord
;
class
SwFmtRefMark
;
...
...
@@ -416,7 +415,7 @@ public:
void
ApplyAutoMark
();
// Key for managing index.
sal_uInt16
GetTOIKeys
(
SwTOIKeyType
eTyp
,
SvStringsSort
&
rArr
)
const
;
sal_uInt16
GetTOIKeys
(
SwTOIKeyType
eTyp
,
std
::
vector
<
String
>
&
rArr
)
const
;
void
SetOutlineNumRule
(
const
SwNumRule
&
);
const
SwNumRule
*
GetOutlineNumRule
()
const
;
...
...
sw/source/core/doc/doctxm.cxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -104,10 +104,9 @@ typedef LinkStruct* LinkStructPtr;
SV_DECL_PTRARR
(
LinkStructArr
,
LinkStructPtr
,
0
,
5
)
SV_IMPL_PTRARR
(
LinkStructArr
,
LinkStructPtr
)
sal_uInt16
SwDoc
::
GetTOIKeys
(
SwTOIKeyType
eTyp
,
SvStringsSort
&
rArr
)
const
sal_uInt16
SwDoc
::
GetTOIKeys
(
SwTOIKeyType
eTyp
,
std
::
vector
<
String
>
&
rArr
)
const
{
if
(
rArr
.
Count
()
)
rArr
.
Remove
(
sal_uInt16
(
0
),
rArr
.
Count
()
);
rArr
.
clear
();
// dann mal ueber den Pool und alle Primary oder Secondary heraussuchen
const
SwTxtTOXMark
*
pMark
;
...
...
@@ -129,10 +128,10 @@ sal_uInt16 SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
pStr
=
&
((
SwTOXMark
*
)
pItem
)
->
GetSecondaryKey
();
if
(
pStr
->
Len
()
)
rArr
.
Insert
(
(
StringPtr
)
pStr
);
rArr
.
push_back
(
*
pStr
);
}
return
rArr
.
Count
();
return
rArr
.
size
();
}
/*--------------------------------------------------------------------
...
...
sw/source/core/edit/edtox.cxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -62,7 +62,6 @@
#include <statstr.hrc>
#include <bookmrk.hxx>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
i18n
;
using
namespace
::
com
::
sun
::
star
::
lang
;
...
...
@@ -254,7 +253,7 @@ const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
Beschreibung: Schluessel fuer Stichwortverzeichnisse verwalten
--------------------------------------------------------------------*/
sal_uInt16
SwEditShell
::
GetTOIKeys
(
SwTOIKeyType
eTyp
,
SvStringsSort
&
rArr
)
const
sal_uInt16
SwEditShell
::
GetTOIKeys
(
SwTOIKeyType
eTyp
,
std
::
vector
<
String
>
&
rArr
)
const
{
return
GetDoc
()
->
GetTOIKeys
(
eTyp
,
rArr
);
}
...
...
sw/source/ui/index/swuiidxmrk.cxx
Dosyayı görüntüle @
6401ca33
...
...
@@ -253,15 +253,19 @@ void SwIndexMarkDlg::InitControls()
aTypeDCB
.
InsertEntry
(
pSh
->
GetTOXType
(
TOX_USER
,
i
)
->
GetTypeName
()
);
// read keywords primary
SvStringsSort
aArr
;
std
::
vector
<
String
>
aArr
;
nCount
=
pSh
->
GetTOIKeys
(
TOI_PRIMARY
,
aArr
);
for
(
i
=
0
;
i
<
nCount
;
++
i
)
aKeyDCB
.
InsertEntry
(
*
aArr
[
i
]
);
std
::
sort
(
aArr
.
begin
(),
aArr
.
end
());
for
(
typename
std
::
vector
<
String
>::
iterator
it
=
aArr
.
begin
();
it
!=
aArr
.
end
();
++
it
)
{
aKeyDCB
.
InsertEntry
(
*
it
);
}
// read keywords secondary
nCount
=
pSh
->
GetTOIKeys
(
TOI_SECONDARY
,
aArr
);
for
(
i
=
0
;
i
<
nCount
;
++
i
)
aKey2DCB
.
InsertEntry
(
*
aArr
[
i
]
);
std
::
sort
(
aArr
.
begin
(),
aArr
.
end
());
for
(
typename
std
::
vector
<
String
>::
iterator
it
=
aArr
.
begin
();
it
!=
aArr
.
end
();
++
it
)
{
aKey2DCB
.
InsertEntry
(
*
it
);
}
UpdateLanguageDependenciesForPhoneticReading
();
...
...
unusedcode.easy
Dosyayı görüntüle @
6401ca33
...
...
@@ -738,11 +738,6 @@ SvStringsISort::Insert(SvStringsISort const*, unsigned short, unsigned short)
SvStringsISort::Remove(String* const&, unsigned short)
SvStringsISort::Remove(unsigned short, unsigned short)
SvStringsISortDtor::Insert(String* const*, unsigned short)
SvStringsSort::DeleteAndDestroy(unsigned short, unsigned short)
SvStringsSort::Insert(String* const&, unsigned short&)
SvStringsSort::Insert(String* const*, unsigned short)
SvStringsSort::Insert(SvStringsSort const*, unsigned short, unsigned short)
SvStringsSort::Remove(String* const&, unsigned short)
SvStringsSortDtor::Insert(String* const&, unsigned short&)
SvStringsSortDtor::Insert(String* const*, unsigned short)
SvStringsSortDtor::Insert(SvStringsSortDtor const*, unsigned short, unsigned short)
...
...
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