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
0644a206
Kaydet (Commit)
0644a206
authored
Nis 05, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of copy&paste by moving code from WW8Export to MSWordExportBase
Change-Id: I1a36fb3d20d1e67484668b7ba8feb1c96505af59
üst
e63950dc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
73 deletions
+9
-73
docxexport.cxx
sw/source/filter/ww8/docxexport.cxx
+0
-60
docxexport.hxx
sw/source/filter/ww8/docxexport.hxx
+0
-5
wrtww8.cxx
sw/source/filter/ww8/wrtww8.cxx
+3
-3
wrtww8.hxx
sw/source/filter/ww8/wrtww8.hxx
+6
-5
No files found.
sw/source/filter/ww8/docxexport.cxx
Dosyayı görüntüle @
0644a206
...
@@ -528,66 +528,6 @@ void DocxExport::WritePostitFields()
...
@@ -528,66 +528,6 @@ void DocxExport::WritePostitFields()
}
}
}
}
int
DocxExport
::
CollectGrfsOfBullets
()
{
m_vecBulletPic
.
clear
();
if
(
pDoc
)
{
int
nCountRule
=
pDoc
->
GetNumRuleTbl
().
size
();
for
(
int
n
=
0
;
n
<
nCountRule
;
++
n
)
{
const
SwNumRule
&
rRule
=
*
(
pDoc
->
GetNumRuleTbl
().
at
(
n
)
);
sal_uInt16
nLevels
=
rRule
.
IsContinusNum
()
?
1
:
9
;
for
(
sal_uInt16
nLvl
=
0
;
nLvl
<
nLevels
;
++
nLvl
)
{
const
SwNumFmt
&
rFmt
=
rRule
.
Get
(
nLvl
);
if
(
SVX_NUM_BITMAP
!=
rFmt
.
GetNumberingType
())
{
continue
;
}
const
Graphic
*
pGraf
=
rFmt
.
GetBrush
()
?
rFmt
.
GetBrush
()
->
GetGraphic
()
:
0
;
if
(
pGraf
)
{
bool
bHas
=
false
;
for
(
unsigned
i
=
0
;
i
<
m_vecBulletPic
.
size
();
++
i
)
{
if
(
m_vecBulletPic
[
i
]
->
GetChecksum
()
==
pGraf
->
GetChecksum
())
{
bHas
=
true
;
break
;
}
}
if
(
!
bHas
)
{
m_vecBulletPic
.
push_back
(
pGraf
);
}
}
}
}
}
return
m_vecBulletPic
.
size
();
}
int
DocxExport
::
GetGrfIndex
(
const
SvxBrushItem
&
rBrush
)
{
int
nIndex
=
-
1
;
if
(
rBrush
.
GetGraphic
()
)
{
for
(
unsigned
i
=
0
;
i
<
m_vecBulletPic
.
size
();
++
i
)
{
if
(
m_vecBulletPic
[
i
]
->
GetChecksum
()
==
rBrush
.
GetGraphic
()
->
GetChecksum
())
{
nIndex
=
i
;
break
;
}
}
}
return
nIndex
;
}
void
DocxExport
::
BulletDefinitions
()
void
DocxExport
::
BulletDefinitions
()
{
{
for
(
size_t
i
=
0
;
i
<
m_vecBulletPic
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
m_vecBulletPic
.
size
();
++
i
)
...
...
sw/source/filter/ww8/docxexport.hxx
Dosyayı görüntüle @
0644a206
...
@@ -85,8 +85,6 @@ class DocxExport : public MSWordExportBase
...
@@ -85,8 +85,6 @@ class DocxExport : public MSWordExportBase
DocxSettingsData
settings
;
DocxSettingsData
settings
;
std
::
vector
<
const
Graphic
*>
m_vecBulletPic
;
public
:
public
:
DocxExportFilter
&
GetFilter
()
{
return
*
m_pFilter
;
};
DocxExportFilter
&
GetFilter
()
{
return
*
m_pFilter
;
};
...
@@ -148,9 +146,6 @@ public:
...
@@ -148,9 +146,6 @@ public:
void
WriteOutliner
(
const
OutlinerParaObject
&
rOutliner
,
sal_uInt8
nTyp
);
void
WriteOutliner
(
const
OutlinerParaObject
&
rOutliner
,
sal_uInt8
nTyp
);
int
CollectGrfsOfBullets
();
int
GetGrfIndex
(
const
SvxBrushItem
&
rBrush
);
protected
:
protected
:
/// Format-dependant part of the actual export.
/// Format-dependant part of the actual export.
virtual
void
ExportDocument_Impl
();
virtual
void
ExportDocument_Impl
();
...
...
sw/source/filter/ww8/wrtww8.cxx
Dosyayı görüntüle @
0644a206
...
@@ -1406,7 +1406,7 @@ void WW8Export::AppendBookmark( const rtl::OUString& rName, bool bSkip )
...
@@ -1406,7 +1406,7 @@ void WW8Export::AppendBookmark( const rtl::OUString& rName, bool bSkip )
}
}
// #i120928 collect all the graphics of bullets applied to paragraphs
// #i120928 collect all the graphics of bullets applied to paragraphs
int
WW8Export
::
CollectGrfsOfBullets
()
const
int
MSWordExportBase
::
CollectGrfsOfBullets
()
{
{
m_vecBulletPic
.
clear
();
m_vecBulletPic
.
clear
();
...
@@ -1505,8 +1505,8 @@ void WW8Export::OutGrfBullets(const sw::Frame & rFrame)
...
@@ -1505,8 +1505,8 @@ void WW8Export::OutGrfBullets(const sw::Frame & rFrame)
Set_UInt8
(
pArr
,
nAttrMagicIdx
++
);
Set_UInt8
(
pArr
,
nAttrMagicIdx
++
);
pChpPlc
->
AppendFkpEntry
(
Strm
().
Tell
(),
static_cast
<
short
>
(
pArr
-
aArr
),
aArr
);
pChpPlc
->
AppendFkpEntry
(
Strm
().
Tell
(),
static_cast
<
short
>
(
pArr
-
aArr
),
aArr
);
}
}
//Achieve the index position
int
WW8Export
::
GetGrfIndex
(
const
SvxBrushItem
&
rBrush
)
int
MSWordExportBase
::
GetGrfIndex
(
const
SvxBrushItem
&
rBrush
)
{
{
int
nIndex
=
-
1
;
int
nIndex
=
-
1
;
if
(
rBrush
.
GetGraphic
()
)
if
(
rBrush
.
GetGraphic
()
)
...
...
sw/source/filter/ww8/wrtww8.hxx
Dosyayı görüntüle @
0644a206
...
@@ -747,6 +747,8 @@ public:
...
@@ -747,6 +747,8 @@ public:
const
SfxPoolItem
*
HasItem
(
sal_uInt16
nWhich
)
const
;
const
SfxPoolItem
*
HasItem
(
sal_uInt16
nWhich
)
const
;
/// Returns the index of a picture bullet, used in numberings.
int
GetGrfIndex
(
const
SvxBrushItem
&
rBrush
);
protected
:
protected
:
/// Format-dependant part of the actual export.
/// Format-dependant part of the actual export.
...
@@ -784,7 +786,6 @@ protected:
...
@@ -784,7 +786,6 @@ protected:
/// Return value indicates if an inherited outline numbering is suppressed.
/// Return value indicates if an inherited outline numbering is suppressed.
virtual
bool
DisallowInheritingOutlineNumbering
(
const
SwFmt
&
rFmt
)
=
0
;
virtual
bool
DisallowInheritingOutlineNumbering
(
const
SwFmt
&
rFmt
)
=
0
;
protected
:
/// Output SwStartNode
/// Output SwStartNode
virtual
void
OutputStartNode
(
const
SwStartNode
&
);
virtual
void
OutputStartNode
(
const
SwStartNode
&
);
...
@@ -823,6 +824,10 @@ protected:
...
@@ -823,6 +824,10 @@ protected:
const
NfKeywordTable
&
GetNfKeywordTable
();
const
NfKeywordTable
&
GetNfKeywordTable
();
/// Populates m_vecBulletPic with all the bullet graphics used by numberings.
int
CollectGrfsOfBullets
();
std
::
vector
<
const
Graphic
*>
m_vecBulletPic
;
///< Vector to record all the graphics of bullets
public
:
public
:
MSWordExportBase
(
SwDoc
*
pDocument
,
SwPaM
*
pCurrentPam
,
SwPaM
*
pOriginalPam
);
MSWordExportBase
(
SwDoc
*
pDocument
,
SwPaM
*
pCurrentPam
,
SwPaM
*
pOriginalPam
);
virtual
~
MSWordExportBase
();
virtual
~
MSWordExportBase
();
...
@@ -912,8 +917,6 @@ public:
...
@@ -912,8 +917,6 @@ public:
sal_uInt8
bWrtWW8
:
1
;
///< Write WW95 (false) or WW97 (true) file format
sal_uInt8
bWrtWW8
:
1
;
///< Write WW95 (false) or WW97 (true) file format
mutable
std
::
vector
<
const
Graphic
*>
m_vecBulletPic
;
///< Vector to record all the graphics of bullets
protected
:
protected
:
SwWW8Writer
*
m_pWriter
;
///< Pointer to the writer
SwWW8Writer
*
m_pWriter
;
///< Pointer to the writer
WW8AttributeOutput
*
m_pAttrOutput
;
///< Converting attributes to stream data
WW8AttributeOutput
*
m_pAttrOutput
;
///< Converting attributes to stream data
...
@@ -1009,9 +1012,7 @@ public:
...
@@ -1009,9 +1012,7 @@ public:
virtual
void
AppendBookmark
(
const
rtl
::
OUString
&
rName
,
bool
bSkip
=
false
);
virtual
void
AppendBookmark
(
const
rtl
::
OUString
&
rName
,
bool
bSkip
=
false
);
virtual
void
ExportGrfBullet
(
const
SwTxtNode
&
rNd
);
virtual
void
ExportGrfBullet
(
const
SwTxtNode
&
rNd
);
int
CollectGrfsOfBullets
()
const
;
void
OutGrfBullets
(
const
sw
::
Frame
&
rFrame
);
void
OutGrfBullets
(
const
sw
::
Frame
&
rFrame
);
int
GetGrfIndex
(
const
SvxBrushItem
&
rBrush
);
void
MoveFieldMarks
(
sal_uLong
nFrom
,
sal_uLong
nTo
);
void
MoveFieldMarks
(
sal_uLong
nFrom
,
sal_uLong
nTo
);
...
...
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