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
a9b3b64a
Kaydet (Commit)
a9b3b64a
authored
Ara 27, 2011
tarafından
Brad Sowden
Kaydeden (comit)
Jan Holesovsky
Ara 30, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#38831 Convert some SvStrings to std::vector (part 2)
üst
d8f2a82f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
65 deletions
+43
-65
gloshdl.cxx
sw/source/ui/dochdl/gloshdl.cxx
+3
-5
glosbib.hxx
sw/source/ui/inc/glosbib.hxx
+1
-2
glosdoc.hxx
sw/source/ui/inc/glosdoc.hxx
+3
-3
glosbib.cxx
sw/source/ui/misc/glosbib.cxx
+4
-6
glosdoc.cxx
sw/source/ui/misc/glosdoc.cxx
+25
-41
glossary.cxx
sw/source/ui/misc/glossary.cxx
+2
-3
gloslst.cxx
sw/source/ui/utlui/gloslst.cxx
+5
-5
No files found.
sw/source/ui/dochdl/gloshdl.cxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -38,8 +38,6 @@
...
@@ -38,8 +38,6 @@
#include <svl/macitem.hxx>
#include <svl/macitem.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfile.hxx>
#define _SVSTDARR_STRINGS
#include <svl/svstdarr.hxx>
#include <svl/urihelper.hxx>
#include <svl/urihelper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <poolfmt.hxx>
#include <poolfmt.hxx>
...
@@ -138,13 +136,13 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlw
...
@@ -138,13 +136,13 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlw
String
sCurBase
=
aTemp
.
getBase
();
String
sCurBase
=
aTemp
.
getBase
();
aTemp
.
removeSegment
();
aTemp
.
removeSegment
();
const
String
sCurEntryPath
=
aTemp
.
GetMainURL
(
INetURLObject
::
NO_DECODE
);
const
String
sCurEntryPath
=
aTemp
.
GetMainURL
(
INetURLObject
::
NO_DECODE
);
const
SvStrings
*
pPathArr
=
rStatGlossaries
.
GetPathArray
();
const
std
::
vector
<
String
*>
*
pPathArr
=
rStatGlossaries
.
GetPathArray
();
sal_uInt16
nCurrentPath
=
USHRT_MAX
;
sal_uInt16
nCurrentPath
=
USHRT_MAX
;
for
(
sal_uInt16
nPath
=
0
;
nPath
<
pPathArr
->
Count
();
nPath
++
)
for
(
size_t
nPath
=
0
;
nPath
<
pPathArr
->
size
();
nPath
++
)
{
{
if
(
sCurEntryPath
==
*
(
*
pPathArr
)[
nPath
])
if
(
sCurEntryPath
==
*
(
*
pPathArr
)[
nPath
])
{
{
nCurrentPath
=
nPath
;
nCurrentPath
=
static_cast
<
sal_uInt16
>
(
nPath
)
;
break
;
break
;
}
}
}
}
...
...
sw/source/ui/inc/glosbib.hxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
#include <vector>
#include <vector>
class
SwGlossaryHdl
;
class
SwGlossaryHdl
;
class
SvStrings
;
class
FEdit
:
public
Edit
class
FEdit
:
public
Edit
{
{
...
@@ -104,7 +103,7 @@ protected:
...
@@ -104,7 +103,7 @@ protected:
public
:
public
:
SwGlossaryGroupDlg
(
Window
*
pParent
,
SwGlossaryGroupDlg
(
Window
*
pParent
,
const
SvStrings
*
pPathArr
,
const
std
::
vector
<
String
*>
*
pPathArr
,
SwGlossaryHdl
*
pGlosHdl
);
SwGlossaryHdl
*
pGlosHdl
);
~
SwGlossaryGroupDlg
();
~
SwGlossaryGroupDlg
();
...
...
sw/source/ui/inc/glosdoc.hxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -66,7 +66,7 @@ class SW_DLLPUBLIC SwGlossaries
...
@@ -66,7 +66,7 @@ class SW_DLLPUBLIC SwGlossaries
String
m_aPath
;
String
m_aPath
;
String
m_sOldErrPath
;
String
m_sOldErrPath
;
String
m_sErrPath
;
String
m_sErrPath
;
SvStrings
*
m_p
PathArr
;
std
::
vector
<
String
*>
m_a
PathArr
;
SvStrings
*
m_pGlosArr
;
SvStrings
*
m_pGlosArr
;
sal_Bool
m_bError
;
sal_Bool
m_bError
;
...
@@ -141,8 +141,8 @@ public:
...
@@ -141,8 +141,8 @@ public:
void
SaveGroupDoc
(
const
String
&
rGrpName
,
const
String
&
rLongName
);
void
SaveGroupDoc
(
const
String
&
rGrpName
,
const
String
&
rLongName
);
void
UpdateGlosPath
(
sal_Bool
bFull
);
void
UpdateGlosPath
(
sal_Bool
bFull
);
void
ShowError
();
void
ShowError
();
inline
sal_uLong
IsGlosPathErr
()
{
return
m_bError
;
}
inline
sal_uLong
IsGlosPathErr
()
{
return
m_bError
;
}
const
SvStrings
*
GetPathArray
()
const
{
return
m_pPathArr
;
}
const
std
::
vector
<
String
*>*
GetPathArray
()
const
{
return
&
m_aPathArr
;
}
};
};
...
...
sw/source/ui/misc/glosbib.cxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
#undef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
#endif
#define _SVSTDARR_STRINGS
#include <tools/urlobj.hxx>
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/msgbox.hxx>
...
@@ -59,7 +58,7 @@
...
@@ -59,7 +58,7 @@
#define RENAME_TOKEN_DELIM (sal_Unicode)1
#define RENAME_TOKEN_DELIM (sal_Unicode)1
SwGlossaryGroupDlg
::
SwGlossaryGroupDlg
(
Window
*
pParent
,
SwGlossaryGroupDlg
::
SwGlossaryGroupDlg
(
Window
*
pParent
,
const
SvStrings
*
pPathArr
,
const
std
::
vector
<
String
*>
*
pPathArr
,
SwGlossaryHdl
*
pHdl
)
:
SwGlossaryHdl
*
pHdl
)
:
SvxStandardDialog
(
pParent
,
SW_RES
(
DLG_BIB_BASE
)),
SvxStandardDialog
(
pParent
,
SW_RES
(
DLG_BIB_BASE
)),
aBibFT
(
this
,
SW_RES
(
FT_BIB
)),
aBibFT
(
this
,
SW_RES
(
FT_BIB
)),
...
@@ -81,8 +80,6 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
...
@@ -81,8 +80,6 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
pRenamedArr
(
0
),
pRenamedArr
(
0
),
pGlosHdl
(
pHdl
)
pGlosHdl
(
pHdl
)
{
{
sal_uInt16
i
;
FreeResource
();
FreeResource
();
long
nTabs
[]
=
long
nTabs
[]
=
...
@@ -100,7 +97,8 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
...
@@ -100,7 +97,8 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aNameED
.
SetModifyHdl
(
LINK
(
this
,
SwGlossaryGroupDlg
,
ModifyHdl
));
aNameED
.
SetModifyHdl
(
LINK
(
this
,
SwGlossaryGroupDlg
,
ModifyHdl
));
aPathLB
.
SetSelectHdl
(
LINK
(
this
,
SwGlossaryGroupDlg
,
ModifyHdl
));
aPathLB
.
SetSelectHdl
(
LINK
(
this
,
SwGlossaryGroupDlg
,
ModifyHdl
));
aRenamePB
.
SetClickHdl
(
LINK
(
this
,
SwGlossaryGroupDlg
,
RenameHdl
));
aRenamePB
.
SetClickHdl
(
LINK
(
this
,
SwGlossaryGroupDlg
,
RenameHdl
));
for
(
i
=
0
;
i
<
pPathArr
->
Count
();
i
++
)
for
(
size_t
i
=
0
;
i
<
pPathArr
->
size
();
i
++
)
{
{
String
sPath
(
*
(
*
pPathArr
)[
i
]);
String
sPath
(
*
(
*
pPathArr
)[
i
]);
INetURLObject
aTempURL
(
sPath
);
INetURLObject
aTempURL
(
sPath
);
...
@@ -119,7 +117,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
...
@@ -119,7 +117,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aPathLB
.
Enable
(
sal_True
);
aPathLB
.
Enable
(
sal_True
);
const
sal_uInt16
nCount
=
pHdl
->
GetGroupCnt
();
const
sal_uInt16
nCount
=
pHdl
->
GetGroupCnt
();
for
(
i
=
0
;
i
<
nCount
;
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
{
{
String
sTitle
;
String
sTitle
;
String
sGroup
=
pHdl
->
GetGroupName
(
i
,
&
sTitle
);
String
sGroup
=
pHdl
->
GetGroupName
(
i
,
&
sTitle
);
...
...
sw/source/ui/misc/glosdoc.cxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -144,7 +144,7 @@ sal_Bool SwGlossaries::FindGroupName(String & rGroup)
...
@@ -144,7 +144,7 @@ sal_Bool SwGlossaries::FindGroupName(String & rGroup)
String
sTemp
(
GetGroupName
(
i
));
String
sTemp
(
GetGroupName
(
i
));
sal_uInt16
nPath
=
(
sal_uInt16
)
sTemp
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nPath
=
(
sal_uInt16
)
sTemp
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
if
(
!
SWUnoHelper
::
UCB_IsCaseSensitiveFileName
(
*
(
*
m_pPathArr
)
[
nPath
]
)
if
(
!
SWUnoHelper
::
UCB_IsCaseSensitiveFileName
(
*
m_aPathArr
[
nPath
]
)
&&
rSCmp
.
isEqual
(
rGroup
,
sTemp
.
GetToken
(
0
,
GLOS_DELIM
)
)
)
&&
rSCmp
.
isEqual
(
rGroup
,
sTemp
.
GetToken
(
0
,
GLOS_DELIM
)
)
)
{
{
rGroup
=
sTemp
;
rGroup
=
sTemp
;
...
@@ -218,9 +218,9 @@ void SwGlossaries::PutGroupDoc(SwTextBlocks *pBlock) {
...
@@ -218,9 +218,9 @@ void SwGlossaries::PutGroupDoc(SwTextBlocks *pBlock) {
sal_Bool
SwGlossaries
::
NewGroupDoc
(
String
&
rGroupName
,
const
String
&
rTitle
)
sal_Bool
SwGlossaries
::
NewGroupDoc
(
String
&
rGroupName
,
const
String
&
rTitle
)
{
{
sal_uInt16
nNewPath
=
(
sal_uInt16
)
rGroupName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nNewPath
=
(
sal_uInt16
)
rGroupName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
if
(
nNewPath
>=
m_pPathArr
->
Count
()
)
if
(
static_cast
<
size_t
>
(
nNewPath
)
>=
m_aPathArr
.
size
()
)
return
sal_False
;
return
sal_False
;
String
sNewFilePath
(
*
(
*
m_pPathArr
)
[
nNewPath
]);
String
sNewFilePath
(
*
m_aPathArr
[
nNewPath
]);
String
sNewGroup
=
lcl_CheckFileName
(
sNewFilePath
,
rGroupName
.
GetToken
(
0
,
GLOS_DELIM
));
String
sNewGroup
=
lcl_CheckFileName
(
sNewFilePath
,
rGroupName
.
GetToken
(
0
,
GLOS_DELIM
));
sNewGroup
+=
GLOS_DELIM
;
sNewGroup
+=
GLOS_DELIM
;
sNewGroup
+=
rGroupName
.
GetToken
(
1
,
GLOS_DELIM
);
sNewGroup
+=
rGroupName
.
GetToken
(
1
,
GLOS_DELIM
);
...
@@ -244,9 +244,9 @@ sal_Bool SwGlossaries::RenameGroupDoc(
...
@@ -244,9 +244,9 @@ sal_Bool SwGlossaries::RenameGroupDoc(
{
{
sal_Bool
bRet
=
sal_False
;
sal_Bool
bRet
=
sal_False
;
sal_uInt16
nOldPath
=
(
sal_uInt16
)
rOldGroup
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nOldPath
=
(
sal_uInt16
)
rOldGroup
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
if
(
nOldPath
<
m_pPathArr
->
Count
()
)
if
(
static_cast
<
size_t
>
(
nOldPath
)
<
m_aPathArr
.
size
()
)
{
{
String
sOldFileURL
(
*
(
*
m_pPathArr
)
[
nOldPath
]);
String
sOldFileURL
(
*
m_aPathArr
[
nOldPath
]);
sOldFileURL
+=
INET_PATH_TOKEN
;
sOldFileURL
+=
INET_PATH_TOKEN
;
sOldFileURL
+=
rOldGroup
.
GetToken
(
0
,
GLOS_DELIM
);
sOldFileURL
+=
rOldGroup
.
GetToken
(
0
,
GLOS_DELIM
);
sOldFileURL
+=
SwGlossaries
::
GetExtension
();
sOldFileURL
+=
SwGlossaries
::
GetExtension
();
...
@@ -255,9 +255,9 @@ sal_Bool SwGlossaries::RenameGroupDoc(
...
@@ -255,9 +255,9 @@ sal_Bool SwGlossaries::RenameGroupDoc(
if
(
bExist
)
if
(
bExist
)
{
{
sal_uInt16
nNewPath
=
(
sal_uInt16
)
rNewGroup
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nNewPath
=
(
sal_uInt16
)
rNewGroup
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
if
(
nNewPath
<
m_pPathArr
->
Count
()
)
if
(
static_cast
<
size_t
>
(
nNewPath
)
<
m_aPathArr
.
size
()
)
{
{
String
sNewFilePath
(
*
(
*
m_pPathArr
)
[
nNewPath
]);
String
sNewFilePath
(
*
m_aPathArr
[
nNewPath
]);
String
sNewFileName
=
lcl_CheckFileName
(
String
sNewFileName
=
lcl_CheckFileName
(
sNewFilePath
,
rNewGroup
.
GetToken
(
0
,
GLOS_DELIM
));
sNewFilePath
,
rNewGroup
.
GetToken
(
0
,
GLOS_DELIM
));
const
sal_uInt16
nFileNameLen
=
sNewFileName
.
Len
();
const
sal_uInt16
nFileNameLen
=
sNewFileName
.
Len
();
...
@@ -304,9 +304,9 @@ sal_Bool SwGlossaries::RenameGroupDoc(
...
@@ -304,9 +304,9 @@ sal_Bool SwGlossaries::RenameGroupDoc(
sal_Bool
SwGlossaries
::
DelGroupDoc
(
const
String
&
rName
)
sal_Bool
SwGlossaries
::
DelGroupDoc
(
const
String
&
rName
)
{
{
sal_uInt16
nPath
=
(
sal_uInt16
)
rName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nPath
=
(
sal_uInt16
)
rName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
if
(
nPath
>=
m_pPathArr
->
Count
()
)
if
(
static_cast
<
size_t
>
(
nPath
)
>=
m_aPathArr
.
size
()
)
return
sal_False
;
return
sal_False
;
String
sFileURL
(
*
(
*
m_pPathArr
)
[
nPath
]);
String
sFileURL
(
*
m_aPathArr
[
nPath
]);
String
aTmp
(
rName
.
GetToken
(
0
,
GLOS_DELIM
));
String
aTmp
(
rName
.
GetToken
(
0
,
GLOS_DELIM
));
String
aName
(
aTmp
);
String
aName
(
aTmp
);
aName
+=
GLOS_DELIM
;
aName
+=
GLOS_DELIM
;
...
@@ -324,9 +324,6 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
...
@@ -324,9 +324,6 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
return
bRemoved
;
return
bRemoved
;
}
}
/*------------------------------------------------------------------------
Description: DTOR
------------------------------------------------------------------------*/
SwGlossaries
::~
SwGlossaries
()
SwGlossaries
::~
SwGlossaries
()
{
{
sal_uInt16
nCount
=
m_pGlosArr
?
m_pGlosArr
->
Count
()
:
0
;
sal_uInt16
nCount
=
m_pGlosArr
?
m_pGlosArr
->
Count
()
:
0
;
...
@@ -337,14 +334,11 @@ SwGlossaries::~SwGlossaries()
...
@@ -337,14 +334,11 @@ SwGlossaries::~SwGlossaries()
String
*
pTmp
=
(
*
m_pGlosArr
)[
i
];
String
*
pTmp
=
(
*
m_pGlosArr
)[
i
];
delete
pTmp
;
delete
pTmp
;
}
}
nCount
=
m_pPathArr
?
m_pPathArr
->
Count
()
:
0
;
for
(
i
=
0
;
i
<
nCount
;
++
i
)
for
(
std
::
vector
<
String
*>::
const_iterator
it
(
m_aPathArr
.
begin
());
it
!=
m_aPathArr
.
end
();
++
it
)
{
delete
*
it
;
String
*
pTmp
=
(
*
m_pPathArr
)[
i
];
delete
pTmp
;
}
delete
m_pGlosArr
;
delete
m_pGlosArr
;
delete
m_pPathArr
;
InvalidateUNOOjects
();
InvalidateUNOOjects
();
}
}
...
@@ -356,9 +350,9 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
...
@@ -356,9 +350,9 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
{
{
sal_uInt16
nPath
=
(
sal_uInt16
)
rName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nPath
=
(
sal_uInt16
)
rName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
SwTextBlocks
*
pTmp
=
0
;
SwTextBlocks
*
pTmp
=
0
;
if
(
nPath
<
m_pPathArr
->
Count
()
)
if
(
static_cast
<
size_t
>
(
nPath
)
<
m_aPathArr
.
size
()
)
{
{
String
sFileURL
(
*
(
*
m_pPathArr
)
[
nPath
]);
String
sFileURL
(
*
m_aPathArr
[
nPath
]);
String
aTmp
(
rName
.
GetToken
(
0
,
GLOS_DELIM
));
String
aTmp
(
rName
.
GetToken
(
0
,
GLOS_DELIM
));
aTmp
+=
SwGlossaries
::
GetExtension
();
aTmp
+=
SwGlossaries
::
GetExtension
();
sFileURL
+=
INET_PATH_TOKEN
;
sFileURL
+=
INET_PATH_TOKEN
;
...
@@ -395,19 +389,18 @@ SvStrings* SwGlossaries::GetNameList()
...
@@ -395,19 +389,18 @@ SvStrings* SwGlossaries::GetNameList()
{
{
m_pGlosArr
=
new
SvStrings
;
m_pGlosArr
=
new
SvStrings
;
String
sExt
(
SwGlossaries
::
GetExtension
()
);
String
sExt
(
SwGlossaries
::
GetExtension
()
);
for
(
s
al_uInt16
i
=
0
;
i
<
m_pPathArr
->
Count
();
i
++
)
for
(
s
ize_t
i
=
0
;
i
<
m_aPathArr
.
size
();
++
i
)
{
{
SvStrings
aFiles
(
16
,
16
);
SvStrings
aFiles
(
16
,
16
);
SWUnoHelper
::
UCB_GetFileListOfFolder
(
*
(
*
m_pPathArr
)[
i
],
aFiles
,
SWUnoHelper
::
UCB_GetFileListOfFolder
(
*
m_aPathArr
[
i
],
aFiles
,
&
sExt
);
&
sExt
);
for
(
sal_uInt16
nFiles
=
0
,
nFEnd
=
aFiles
.
Count
();
for
(
sal_uInt16
nFiles
=
0
,
nFEnd
=
aFiles
.
Count
();
nFiles
<
nFEnd
;
++
nFiles
)
nFiles
<
nFEnd
;
++
nFiles
)
{
{
String
*
pTitle
=
aFiles
[
nFiles
];
String
*
pTitle
=
aFiles
[
nFiles
];
String
sName
(
pTitle
->
Copy
(
0
,
pTitle
->
Len
()
-
sExt
.
Len
()
));
String
sName
(
pTitle
->
Copy
(
0
,
pTitle
->
Len
()
-
sExt
.
Len
()
));
sName
+=
GLOS_DELIM
;
sName
+=
GLOS_DELIM
;
sName
+=
String
::
CreateFromInt32
(
i
);
sName
+=
String
::
CreateFromInt32
(
static_cast
<
sal_Int16
>
(
i
)
);
m_pGlosArr
->
Insert
(
new
String
(
sName
),
m_pGlosArr
->
Count
()
);
m_pGlosArr
->
Insert
(
new
String
(
sName
),
m_pGlosArr
->
Count
()
);
// don't need any more these pointers
// don't need any more these pointers
...
@@ -426,14 +419,9 @@ SvStrings* SwGlossaries::GetNameList()
...
@@ -426,14 +419,9 @@ SvStrings* SwGlossaries::GetNameList()
return
m_pGlosArr
;
return
m_pGlosArr
;
}
}
/*------------------------------------------------------------------------
Description: CTOR
------------------------------------------------------------------------*/
SwGlossaries
::
SwGlossaries
()
:
SwGlossaries
::
SwGlossaries
()
:
m_pPathArr
(
0
),
m_pGlosArr
(
0
)
m_pGlosArr
(
0
)
{
{
m_pPathArr
=
new
SvStrings
;
UpdateGlosPath
(
sal_True
);
UpdateGlosPath
(
sal_True
);
}
}
...
@@ -460,18 +448,14 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
...
@@ -460,18 +448,14 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
if
(
bFull
||
bPathChanged
)
if
(
bFull
||
bPathChanged
)
{
{
m_aPath
=
aNewPath
;
m_aPath
=
aNewPath
;
sal_uInt16
nCount
=
m_pPathArr
?
m_pPathArr
->
Count
()
:
0
;
sal_uInt16
i
;
for
(
i
=
nCount
;
i
;
--
i
)
for
(
std
::
vector
<
String
*>::
const_iterator
it
(
m_aPathArr
.
begin
());
it
!=
m_aPathArr
.
end
();
++
it
)
{
delete
*
it
;
String
*
pTmp
=
(
*
m_pPathArr
)[
i
-
1
];
m_aPathArr
.
clear
();
m_pPathArr
->
Remove
(
i
-
1
);
delete
pTmp
;
}
sal_uInt16
nTokenCount
=
m_aPath
.
GetTokenCount
(
SVT_SEARCHPATH_DELIMITER
);
sal_uInt16
nTokenCount
=
m_aPath
.
GetTokenCount
(
SVT_SEARCHPATH_DELIMITER
);
SvStrings
aDirArr
;
SvStrings
aDirArr
;
for
(
i
=
0
;
i
<
nTokenCount
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nTokenCount
;
i
++
)
{
{
String
sPth
(
m_aPath
.
GetToken
(
i
,
SVT_SEARCHPATH_DELIMITER
));
String
sPth
(
m_aPath
.
GetToken
(
i
,
SVT_SEARCHPATH_DELIMITER
));
sPth
=
URIHelper
::
SmartRel2Abs
(
sPth
=
URIHelper
::
SmartRel2Abs
(
...
@@ -490,7 +474,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
...
@@ -490,7 +474,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
m_sErrPath
+=
String
(
aTemp
.
GetFull
());
m_sErrPath
+=
String
(
aTemp
.
GetFull
());
}
}
else
else
m_
pPathArr
->
Insert
(
new
String
(
sPth
),
m_pPathArr
->
Count
(
));
m_
aPathArr
.
push_back
(
new
String
(
sPth
));
}
}
aDirArr
.
DeleteAndDestroy
(
0
,
aDirArr
.
Count
());
aDirArr
.
DeleteAndDestroy
(
0
,
aDirArr
.
Count
());
...
@@ -510,7 +494,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
...
@@ -510,7 +494,7 @@ void SwGlossaries::UpdateGlosPath(sal_Bool bFull)
if
(
m_pGlosArr
)
if
(
m_pGlosArr
)
{
{
for
(
i
=
0
;
i
<
m_pGlosArr
->
Count
();
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
m_pGlosArr
->
Count
();
++
i
)
{
{
delete
(
String
*
)(
*
m_pGlosArr
)[
i
];
delete
(
String
*
)(
*
m_pGlosArr
)[
i
];
}
}
...
...
sw/source/ui/misc/glossary.cxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#endif
#endif
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGS
#include <hintids.hxx>
#include <hintids.hxx>
#include <vcl/menu.hxx>
#include <vcl/menu.hxx>
...
@@ -941,8 +940,8 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
...
@@ -941,8 +940,8 @@ void SwGlTreeListBox::RequestHelp( const HelpEvent& rHEvt )
if
(
!
GetParent
(
pEntry
))
if
(
!
GetParent
(
pEntry
))
{
{
GroupUserData
*
pData
=
(
GroupUserData
*
)
pEntry
->
GetUserData
();
GroupUserData
*
pData
=
(
GroupUserData
*
)
pEntry
->
GetUserData
();
const
SvStrings
*
pPathArr
=
::
GetGlossaries
()
->
GetPathArray
();
const
std
::
vector
<
String
*>
*
pPathArr
=
::
GetGlossaries
()
->
GetPathArray
();
if
(
pPathArr
->
Count
()
)
if
(
!
pPathArr
->
empty
()
)
{
{
sMsg
=
(
*
(
*
pPathArr
)[
pData
->
nPathIdx
]);
sMsg
=
(
*
(
*
pPathArr
)[
pData
->
nPathIdx
]);
sMsg
+=
INET_PATH_TOKEN
;
sMsg
+=
INET_PATH_TOKEN
;
...
...
sw/source/ui/utlui/gloslst.cxx
Dosyayı görüntüle @
a9b3b64a
...
@@ -291,7 +291,7 @@ void SwGlossaryList::Update()
...
@@ -291,7 +291,7 @@ void SwGlossaryList::Update()
ClearGroups
();
ClearGroups
();
}
}
SwGlossaries
*
pGlossaries
=
::
GetGlossaries
();
SwGlossaries
*
pGlossaries
=
::
GetGlossaries
();
const
SvStrings
*
pPathArr
=
pGlossaries
->
GetPathArray
();
const
std
::
vector
<
String
*>
*
pPathArr
=
pGlossaries
->
GetPathArray
();
String
sExt
(
SwGlossaries
::
GetExtension
()
);
String
sExt
(
SwGlossaries
::
GetExtension
()
);
if
(
!
bFilled
)
if
(
!
bFilled
)
{
{
...
@@ -300,7 +300,7 @@ void SwGlossaryList::Update()
...
@@ -300,7 +300,7 @@ void SwGlossaryList::Update()
{
{
String
sGrpName
=
pGlossaries
->
GetGroupName
(
i
);
String
sGrpName
=
pGlossaries
->
GetGroupName
(
i
);
sal_uInt16
nPath
=
(
sal_uInt16
)
sGrpName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
sal_uInt16
nPath
=
(
sal_uInt16
)
sGrpName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
if
(
nPath
<
pPathArr
->
Count
()
)
if
(
static_cast
<
size_t
>
(
nPath
)
<
pPathArr
->
size
()
)
{
{
AutoTextGroup
*
pGroup
=
new
AutoTextGroup
;
AutoTextGroup
*
pGroup
=
new
AutoTextGroup
;
pGroup
->
sName
=
sGrpName
;
pGroup
->
sName
=
sGrpName
;
...
@@ -322,7 +322,7 @@ void SwGlossaryList::Update()
...
@@ -322,7 +322,7 @@ void SwGlossaryList::Update()
}
}
else
else
{
{
for
(
sal_uInt16
nPath
=
0
;
nPath
<
pPathArr
->
Count
();
nPath
++
)
for
(
size_t
nPath
=
0
;
nPath
<
pPathArr
->
size
();
nPath
++
)
{
{
SvStringsDtor
aFoundGroupNames
;
SvStringsDtor
aFoundGroupNames
;
SvStrings
aFiles
(
16
,
16
);
SvStrings
aFiles
(
16
,
16
);
...
@@ -341,7 +341,7 @@ void SwGlossaryList::Update()
...
@@ -341,7 +341,7 @@ void SwGlossaryList::Update()
aFoundGroupNames
.
Insert
(
new
String
(
sName
),
aFoundGroupNames
.
Insert
(
new
String
(
sName
),
aFoundGroupNames
.
Count
());
aFoundGroupNames
.
Count
());
sName
+=
GLOS_DELIM
;
sName
+=
GLOS_DELIM
;
sName
+=
String
::
CreateFromInt32
(
nPath
);
sName
+=
String
::
CreateFromInt32
(
static_cast
<
sal_uInt16
>
(
nPath
)
);
AutoTextGroup
*
pFound
=
FindGroup
(
sName
);
AutoTextGroup
*
pFound
=
FindGroup
(
sName
);
if
(
!
pFound
)
if
(
!
pFound
)
{
{
...
@@ -372,7 +372,7 @@ void SwGlossaryList::Update()
...
@@ -372,7 +372,7 @@ void SwGlossaryList::Update()
GLOS_DELIM
).
ToInt32
();
GLOS_DELIM
).
ToInt32
();
// nur die Gruppen werden geprueft, die fuer den
// nur die Gruppen werden geprueft, die fuer den
// aktuellen Teilpfad registriert sind
// aktuellen Teilpfad registriert sind
if
(
nGroupPath
==
nPath
)
if
(
nGroupPath
==
static_cast
<
sal_uInt16
>
(
nPath
)
)
{
{
sal_Bool
bFound
=
sal_False
;
sal_Bool
bFound
=
sal_False
;
String
sCompareGroup
=
pGroup
->
sName
.
GetToken
(
0
,
GLOS_DELIM
);
String
sCompareGroup
=
pGroup
->
sName
.
GetToken
(
0
,
GLOS_DELIM
);
...
...
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