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
7bef4fe2
Kaydet (Commit)
7bef4fe2
authored
Tem 13, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Tem 17, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL( SwFmtCollConditions) to boost::ptr_vector
Change-Id: I45c66246de9d5608b630ceeb11535faf28f9c073
üst
22faf843
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
24 deletions
+20
-24
fmtcol.hxx
sw/inc/fmtcol.hxx
+2
-3
fmtcol.cxx
sw/source/core/doc/fmtcol.cxx
+14
-17
xmlfmt.cxx
sw/source/filter/xml/xmlfmt.cxx
+2
-2
xmltexte.cxx
sw/source/filter/xml/xmltexte.cxx
+2
-2
No files found.
sw/inc/fmtcol.hxx
Dosyayı görüntüle @
7bef4fe2
...
@@ -28,10 +28,10 @@
...
@@ -28,10 +28,10 @@
#ifndef _FMTCOL_HXX
#ifndef _FMTCOL_HXX
#define _FMTCOL_HXX
#define _FMTCOL_HXX
#include <svl/svarray.hxx>
#include "swdllapi.h"
#include "swdllapi.h"
#include <format.hxx>
#include <format.hxx>
#include <swtypes.hxx> // For MAXLEVEL.
#include <swtypes.hxx> // For MAXLEVEL.
#include <boost/ptr_container/ptr_vector.hpp>
class
SwDoc
;
// For friend.
class
SwDoc
;
// For friend.
...
@@ -231,8 +231,7 @@ public:
...
@@ -231,8 +231,7 @@ public:
void
RegisterToFormat
(
SwFmt
&
);
void
RegisterToFormat
(
SwFmt
&
);
};
};
typedef
SwCollCondition
*
SwCollConditionPtr
;
class
SwFmtCollConditions
:
public
boost
::
ptr_vector
<
SwCollCondition
>
{};
SV_DECL_PTRARR_DEL
(
SwFmtCollConditions
,
SwCollConditionPtr
,
0
)
class
SW_DLLPUBLIC
SwConditionTxtFmtColl
:
public
SwTxtFmtColl
class
SW_DLLPUBLIC
SwConditionTxtFmtColl
:
public
SwTxtFmtColl
{
{
...
...
sw/source/core/doc/fmtcol.cxx
Dosyayı görüntüle @
7bef4fe2
...
@@ -48,8 +48,6 @@ TYPEINIT1( SwGrfFmtColl, SwFmtColl );
...
@@ -48,8 +48,6 @@ TYPEINIT1( SwGrfFmtColl, SwFmtColl );
TYPEINIT1
(
SwConditionTxtFmtColl
,
SwTxtFmtColl
);
TYPEINIT1
(
SwConditionTxtFmtColl
,
SwTxtFmtColl
);
TYPEINIT1
(
SwCollCondition
,
SwClient
);
TYPEINIT1
(
SwCollCondition
,
SwClient
);
SV_IMPL_PTRARR
(
SwFmtCollConditions
,
SwCollConditionPtr
);
namespace
TxtFmtCollFunc
namespace
TxtFmtCollFunc
{
{
...
@@ -576,36 +574,36 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition(
...
@@ -576,36 +574,36 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition(
const
SwCollCondition
*
pFnd
=
0
;
const
SwCollCondition
*
pFnd
=
0
;
sal_uInt16
n
;
sal_uInt16
n
;
for
(
n
=
0
;
n
<
aCondColls
.
Count
();
++
n
)
for
(
n
=
0
;
n
<
aCondColls
.
size
();
++
n
)
if
(
*
(
pFnd
=
aCondColls
[
n
])
==
rCond
)
if
(
*
(
pFnd
=
&
aCondColls
[
n
])
==
rCond
)
break
;
break
;
return
n
<
aCondColls
.
Count
()
?
pFnd
:
0
;
return
n
<
aCondColls
.
size
()
?
pFnd
:
0
;
}
}
void
SwConditionTxtFmtColl
::
InsertCondition
(
const
SwCollCondition
&
rCond
)
void
SwConditionTxtFmtColl
::
InsertCondition
(
const
SwCollCondition
&
rCond
)
{
{
for
(
sal_uInt16
n
=
0
;
n
<
aCondColls
.
Count
();
++
n
)
for
(
sal_uInt16
n
=
0
;
n
<
aCondColls
.
size
();
++
n
)
if
(
*
aCondColls
[
n
]
==
rCond
)
if
(
aCondColls
[
n
]
==
rCond
)
{
{
aCondColls
.
DeleteAndDestroy
(
n
);
aCondColls
.
erase
(
aCondColls
.
begin
()
+
n
);
break
;
break
;
}
}
// Not found -> so insert it
// Not found -> so insert it
SwCollCondition
*
pNew
=
new
SwCollCondition
(
rCond
);
SwCollCondition
*
pNew
=
new
SwCollCondition
(
rCond
);
aCondColls
.
Insert
(
pNew
,
aCondColls
.
Count
()
);
aCondColls
.
push_back
(
pNew
);
}
}
sal_Bool
SwConditionTxtFmtColl
::
RemoveCondition
(
const
SwCollCondition
&
rCond
)
sal_Bool
SwConditionTxtFmtColl
::
RemoveCondition
(
const
SwCollCondition
&
rCond
)
{
{
sal_Bool
bRet
=
sal_False
;
sal_Bool
bRet
=
sal_False
;
for
(
sal_uInt16
n
=
0
;
n
<
aCondColls
.
Count
();
++
n
)
for
(
sal_uInt16
n
=
0
;
n
<
aCondColls
.
size
();
++
n
)
if
(
*
aCondColls
[
n
]
==
rCond
)
if
(
aCondColls
[
n
]
==
rCond
)
{
{
aCondColls
.
DeleteAndDestroy
(
n
);
aCondColls
.
erase
(
aCondColls
.
begin
()
+
n
);
bRet
=
sal_True
;
bRet
=
sal_True
;
}
}
...
@@ -615,12 +613,11 @@ sal_Bool SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond )
...
@@ -615,12 +613,11 @@ sal_Bool SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond )
void
SwConditionTxtFmtColl
::
SetConditions
(
const
SwFmtCollConditions
&
rCndClls
)
void
SwConditionTxtFmtColl
::
SetConditions
(
const
SwFmtCollConditions
&
rCndClls
)
{
{
// Copy the Conditions, but first delete the old ones
// Copy the Conditions, but first delete the old ones
if
(
aCondColls
.
Count
()
)
aCondColls
.
clear
();
aCondColls
.
DeleteAndDestroy
(
0
,
aCondColls
.
Count
()
);
SwDoc
&
rDoc
=
*
GetDoc
();
SwDoc
&
rDoc
=
*
GetDoc
();
for
(
sal_uInt16
n
=
0
;
n
<
rCndClls
.
Count
();
++
n
)
for
(
sal_uInt16
n
=
0
;
n
<
rCndClls
.
size
();
++
n
)
{
{
SwCollCondition
*
pFnd
=
rCndClls
[
n
];
const
SwCollCondition
*
pFnd
=
&
rCndClls
[
n
];
SwTxtFmtColl
*
pTmpColl
=
pFnd
->
GetTxtFmtColl
()
SwTxtFmtColl
*
pTmpColl
=
pFnd
->
GetTxtFmtColl
()
?
rDoc
.
CopyTxtColl
(
*
pFnd
->
GetTxtFmtColl
()
)
?
rDoc
.
CopyTxtColl
(
*
pFnd
->
GetTxtFmtColl
()
)
:
0
;
:
0
;
...
@@ -631,7 +628,7 @@ void SwConditionTxtFmtColl::SetConditions( const SwFmtCollConditions& rCndClls )
...
@@ -631,7 +628,7 @@ void SwConditionTxtFmtColl::SetConditions( const SwFmtCollConditions& rCndClls )
else
else
pNew
=
new
SwCollCondition
(
pTmpColl
,
pFnd
->
GetCondition
(),
pNew
=
new
SwCollCondition
(
pTmpColl
,
pFnd
->
GetCondition
(),
pFnd
->
GetSubCondition
()
);
pFnd
->
GetSubCondition
()
);
aCondColls
.
Insert
(
pNew
,
n
);
aCondColls
.
push_back
(
pNew
);
}
}
}
}
//#outline level, zhaojianwei
//#outline level, zhaojianwei
...
...
sw/source/filter/xml/xmlfmt.cxx
Dosyayı görüntüle @
7bef4fe2
...
@@ -1055,9 +1055,9 @@ void SwXMLImport::UpdateTxtCollConditions( SwDoc *pDoc )
...
@@ -1055,9 +1055,9 @@ void SwXMLImport::UpdateTxtCollConditions( SwDoc *pDoc )
const
SwFmtCollConditions
&
rConditions
=
const
SwFmtCollConditions
&
rConditions
=
((
const
SwConditionTxtFmtColl
*
)
pColl
)
->
GetCondColls
();
((
const
SwConditionTxtFmtColl
*
)
pColl
)
->
GetCondColls
();
sal_Bool
bSendModify
=
sal_False
;
sal_Bool
bSendModify
=
sal_False
;
for
(
sal_uInt16
j
=
0
;
j
<
rConditions
.
Count
()
&&
!
bSendModify
;
j
++
)
for
(
sal_uInt16
j
=
0
;
j
<
rConditions
.
size
()
&&
!
bSendModify
;
j
++
)
{
{
const
SwCollCondition
&
rCond
=
*
rConditions
[
j
];
const
SwCollCondition
&
rCond
=
rConditions
[
j
];
switch
(
rCond
.
GetCondition
()
)
switch
(
rCond
.
GetCondition
()
)
{
{
case
PARA_IN_TABLEHEAD
:
case
PARA_IN_TABLEHEAD
:
...
...
sw/source/filter/xml/xmltexte.cxx
Dosyayı görüntüle @
7bef4fe2
...
@@ -115,9 +115,9 @@ void SwXMLTextParagraphExport::exportStyleContent(
...
@@ -115,9 +115,9 @@ void SwXMLTextParagraphExport::exportStyleContent(
{
{
const
SwFmtCollConditions
&
rConditions
=
const
SwFmtCollConditions
&
rConditions
=
((
const
SwConditionTxtFmtColl
*
)
pColl
)
->
GetCondColls
();
((
const
SwConditionTxtFmtColl
*
)
pColl
)
->
GetCondColls
();
for
(
sal_uInt16
i
=
0
;
i
<
rConditions
.
Count
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
rConditions
.
size
();
i
++
)
{
{
const
SwCollCondition
&
rCond
=
*
rConditions
[
i
];
const
SwCollCondition
&
rCond
=
rConditions
[
i
];
enum
XMLTokenEnum
eFunc
=
XML_TOKEN_INVALID
;
enum
XMLTokenEnum
eFunc
=
XML_TOKEN_INVALID
;
OUStringBuffer
sBuffer
(
20
);
OUStringBuffer
sBuffer
(
20
);
...
...
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