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
a7530de8
Kaydet (Commit)
a7530de8
authored
May 07, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of MSWordStyles
Change-Id: I9cd8474c658643d1f6044ecf6c56efdd42530979
üst
fbd85c25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
wrtw8sty.cxx
sw/source/filter/ww8/wrtw8sty.cxx
+19
-19
wrtww8.hxx
sw/source/filter/ww8/wrtww8.hxx
+4
-4
No files found.
sw/source/filter/ww8/wrtw8sty.cxx
Dosyayı görüntüle @
a7530de8
...
...
@@ -152,8 +152,8 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport, bool bListStyles )
(
bListStyles
?
m_rExport
.
m_pDoc
->
GetNumRuleTbl
().
size
()
-
1
:
0
);
// somewhat generous ( free for up to 15 )
pFmtA
=
new
SwFmt
*
[
nAlloc
];
memset
(
pFmtA
,
0
,
nAlloc
*
sizeof
(
SwFmt
*
)
);
m_
pFmtA
=
new
SwFmt
*
[
nAlloc
];
memset
(
m_
pFmtA
,
0
,
nAlloc
*
sizeof
(
SwFmt
*
)
);
BuildStylesTable
();
BuildStyleIds
();
...
...
@@ -161,15 +161,15 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport, bool bListStyles )
MSWordStyles
::~
MSWordStyles
()
{
delete
[]
pFmtA
;
delete
[]
m_
pFmtA
;
}
// Sty_SetWWSlot() dependencies for the styles -> zero is allowed
sal_uInt16
MSWordStyles
::
GetSlot
(
const
SwFmt
*
pFmt
)
const
{
sal_uInt16
n
;
for
(
n
=
0
;
n
<
nUsedSlots
;
n
++
)
if
(
pFmtA
[
n
]
==
pFmt
)
for
(
n
=
0
;
n
<
m_
nUsedSlots
;
n
++
)
if
(
m_
pFmtA
[
n
]
==
pFmt
)
return
n
;
return
0xfff
;
// 0xfff: WW: zero
}
...
...
@@ -196,7 +196,7 @@ sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
break
;
default
:
nRet
=
nUsedSlots
++
;
nRet
=
m_
nUsedSlots
++
;
break
;
}
return
nRet
;
...
...
@@ -274,14 +274,14 @@ sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt )
void
MSWordStyles
::
BuildStylesTable
()
{
nUsedSlots
=
WW8_RESERVED_SLOTS
;
// soviele sind reserviert fuer
m_
nUsedSlots
=
WW8_RESERVED_SLOTS
;
// soviele sind reserviert fuer
// Standard und HeadingX u.a.
const
SwCharFmts
&
rArr
=
*
m_rExport
.
m_pDoc
->
GetCharFmts
();
// first CharFmt
// das Default-ZeichenStyle ( 0 ) wird nicht mit ausgegeben !
for
(
sal_uInt16
n
=
1
;
n
<
rArr
.
size
();
n
++
)
{
SwCharFmt
*
pFmt
=
rArr
[
n
];
pFmtA
[
BuildGetSlot
(
*
pFmt
)
]
=
pFmt
;
m_
pFmtA
[
BuildGetSlot
(
*
pFmt
)
]
=
pFmt
;
}
const
SwTxtFmtColls
&
rArr2
=
*
m_rExport
.
m_pDoc
->
GetTxtFmtColls
();
// then TxtFmtColls
...
...
@@ -289,7 +289,7 @@ void MSWordStyles::BuildStylesTable()
for
(
sal_uInt16
n
=
1
;
n
<
rArr2
.
size
();
n
++
)
{
SwTxtFmtColl
*
pFmt
=
rArr2
[
n
];
pFmtA
[
BuildGetSlot
(
*
pFmt
)
]
=
pFmt
;
m_
pFmtA
[
BuildGetSlot
(
*
pFmt
)
]
=
pFmt
;
}
if
(
!
m_bListStyles
)
...
...
@@ -313,11 +313,11 @@ void MSWordStyles::BuildStyleIds()
m_aStyleIds
.
push_back
(
"Normal"
);
aUsed
.
insert
(
"normal"
);
for
(
sal_uInt16
n
=
1
;
n
<
nUsedSlots
;
++
n
)
for
(
sal_uInt16
n
=
1
;
n
<
m_
nUsedSlots
;
++
n
)
{
OUString
aName
;
if
(
pFmtA
[
n
])
aName
=
pFmtA
[
n
]
->
GetName
();
if
(
m_
pFmtA
[
n
])
aName
=
m_
pFmtA
[
n
]
->
GetName
();
else
if
(
m_aNumRules
.
find
(
n
)
!=
m_aNumRules
.
end
())
aName
=
m_aNumRules
[
n
]
->
GetName
();
OStringBuffer
aStyleIdBuf
(
aName
.
getLength
());
...
...
@@ -623,9 +623,9 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos )
// Check if we still have a clash, in which case we add a suffix
for
(
int
nSuffix
=
0
;
;
++
nSuffix
)
{
bool
clash
=
false
;
for
(
sal_uInt16
n
=
1
;
n
<
nUsedSlots
;
++
n
)
if
(
pFmtA
[
n
]
&&
pFmtA
[
n
]
->
GetName
().
equalsIgnoreAsciiCase
(
aName
)
)
for
(
sal_uInt16
n
=
1
;
n
<
m_
nUsedSlots
;
++
n
)
if
(
m_
pFmtA
[
n
]
&&
m_
pFmtA
[
n
]
->
GetName
().
equalsIgnoreAsciiCase
(
aName
)
)
{
clash
=
true
;
break
;
...
...
@@ -704,17 +704,17 @@ void MSWordStyles::OutputStylesTable()
// so simply if there are more styles, don't export those
// Implementing check for all exports DOCX, DOC, RTF
sal_uInt16
nLimit
=
MSWORD_MAX_STYLES_LIMIT
;
nUsedSlots
=
(
nLimit
>
nUsedSlots
)
?
nUsedSlots
:
nLimit
;
m_nUsedSlots
=
(
nLimit
>
m_nUsedSlots
)
?
m_
nUsedSlots
:
nLimit
;
for
(
n
=
0
;
n
<
nUsedSlots
;
n
++
)
for
(
n
=
0
;
n
<
m_
nUsedSlots
;
n
++
)
{
if
(
m_aNumRules
.
find
(
n
)
!=
m_aNumRules
.
end
())
OutputStyle
(
m_aNumRules
[
n
],
n
);
else
OutputStyle
(
pFmtA
[
n
],
n
);
OutputStyle
(
m_
pFmtA
[
n
],
n
);
}
m_rExport
.
AttrOutput
().
EndStyles
(
nUsedSlots
);
m_rExport
.
AttrOutput
().
EndStyles
(
m_
nUsedSlots
);
m_rExport
.
m_bStyDef
=
false
;
}
...
...
sw/source/filter/ww8/wrtww8.hxx
Dosyayı görüntüle @
a7530de8
...
...
@@ -1543,8 +1543,8 @@ public:
class
MSWordStyles
{
MSWordExportBase
&
m_rExport
;
SwFmt
**
pFmtA
;
///< Slot <-> Character and paragraph style array (0 for list styles).
sal_uInt16
nUsedSlots
;
SwFmt
**
m_
pFmtA
;
///< Slot <-> Character and paragraph style array (0 for list styles).
sal_uInt16
m_
nUsedSlots
;
bool
m_bListStyles
;
///< If list styles are requested to be exported as well.
std
::
map
<
sal_uInt16
,
const
SwNumRule
*>
m_aNumRules
;
///< Slot <-> List style map.
...
...
@@ -1559,7 +1559,7 @@ class MSWordStyles
/// Get slot number during building the style table.
sal_uInt16
BuildGetSlot
(
const
SwFmt
&
rFmt
);
sal_uInt16
BuildGetSlot
(
const
SwNumRule
&
/*rNumRule*/
)
{
return
nUsedSlots
++
;}
sal_uInt16
BuildGetSlot
(
const
SwNumRule
&
/*rNumRule*/
)
{
return
m_
nUsedSlots
++
;}
/// Return information about one style.
void
GetStyleData
(
SwFmt
*
pFmt
,
bool
&
bFmtColl
,
sal_uInt16
&
nBase
,
sal_uInt16
&
nNext
);
...
...
@@ -1591,7 +1591,7 @@ public:
/// Get styleId of the nId-th style (nId is its position in pFmtA).
OString
GetStyleId
(
sal_uInt16
nId
)
const
;
const
SwFmt
*
GetSwFmt
(
sal_uInt16
nId
)
const
{
return
pFmtA
[
nId
];
}
const
SwFmt
*
GetSwFmt
(
sal_uInt16
nId
)
const
{
return
m_
pFmtA
[
nId
];
}
/// Get numbering rule of the nId-th style
const
SwNumRule
*
GetSwNumRule
(
sal_uInt16
nId
)
const
;
};
...
...
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