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
afbfecb7
Kaydet (Commit)
afbfecb7
authored
Ock 02, 2014
tarafından
Oliver-Rainer Wittmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
123944: WW8 import - be tolerant regarding missing list attributes for Styles
üst
00fc5808
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
61 deletions
+144
-61
ww8par.hxx
sw/source/filter/ww8/ww8par.hxx
+53
-12
ww8par3.cxx
sw/source/filter/ww8/ww8par3.cxx
+91
-49
No files found.
sw/source/filter/ww8/ww8par.hxx
Dosyayı görüntüle @
afbfecb7
...
@@ -177,51 +177,92 @@ struct WW8OleMap
...
@@ -177,51 +177,92 @@ struct WW8OleMap
}
}
};
};
typedef
std
::
map
<
sal_uInt16
,
sal_uInt16
>
StyleInList
;
class
SwWW8ImplReader
;
class
SwWW8ImplReader
;
struct
WW8LSTInfo
;
struct
WW8LSTInfo
;
class
WW8ListManager
class
WW8ListManager
{
{
public
:
public
:
WW8ListManager
(
SvStream
&
rSt_
,
SwWW8ImplReader
&
rReader_
);
WW8ListManager
(
SvStream
&
rSt_
,
SwWW8ImplReader
&
rReader_
);
~
WW8ListManager
();
//Min and Max possible List Levels in Word
//Min and Max possible List Levels in Word
enum
ListLevel
{
nMinLevel
=
1
,
nMaxLevel
=
9
};
enum
ListLevel
{
nMinLevel
=
1
,
nMaxLevel
=
9
};
//the rParaSprms returns back the original word paragraph indent
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
//sprms which were attached to the original numbering format
SwNumRule
*
GetNumRuleForActivation
(
sal_uInt16
nLFOPosition
,
const
sal_uInt8
nLevel
,
SwNumRule
*
GetNumRuleForActivation
(
std
::
vector
<
sal_uInt8
>
&
rParaSprms
,
SwTxtNode
*
pNode
=
0
);
sal_uInt16
nLFOPosition
,
const
sal_uInt8
nLevel
,
std
::
vector
<
sal_uInt8
>
&
rParaSprms
,
SwTxtNode
*
pNode
=
0
);
SwNumRule
*
CreateNextRule
(
bool
bSimple
);
SwNumRule
*
CreateNextRule
(
bool
bSimple
);
~
WW8ListManager
();
SwNumRule
*
GetNumRule
(
sal_uInt16
i
);
SwNumRule
*
GetNumRule
(
sal_uInt16
i
);
sal_uInt16
GetWW8LSTInfoNum
()
const
{
return
static_cast
<
sal_uInt16
>
(
maLSTInfos
.
size
());}
sal_uInt16
GetWW8LSTInfoNum
()
const
{
return
static_cast
<
sal_uInt16
>
(
maLSTInfos
.
size
());
}
sal_uInt16
GetPossibleLFOPosition
(
const
sal_uInt16
aStyleID
,
const
sal_uInt8
aGivenLevel
);
private
:
private
:
wwSprmParser
maSprmParser
;
wwSprmParser
maSprmParser
;
SwWW8ImplReader
&
rReader
;
SwWW8ImplReader
&
rReader
;
SwDoc
&
rDoc
;
SwDoc
&
rDoc
;
const
WW8Fib
&
rFib
;
const
WW8Fib
&
rFib
;
SvStream
&
rSt
;
SvStream
&
rSt
;
std
::
vector
<
WW8LSTInfo
*
>
maLSTInfos
;
std
::
vector
<
WW8LSTInfo
*
>
maLSTInfos
;
WW8LFOInfos
*
pLFOInfos
;
// D. aus PLF LFO, sortiert genau wie im WW8 Stream
WW8LFOInfos
*
pLFOInfos
;
// D. aus PLF LFO, sortiert genau wie im WW8 Stream
sal_uInt16
nUniqueList
;
// current number for creating unique list names
sal_uInt16
nUniqueList
;
// current number for creating unique list names
sal_uInt8
*
GrpprlHasSprm
(
sal_uInt16
nId
,
sal_uInt8
&
rSprms
,
sal_uInt8
nLen
);
// Style-ListStyle-relationship
// - needed to determine default ListStyle for a certain Style in case the ListStyle information is missing at the Style
StyleInList
maStyleInList
;
sal_uInt8
*
GrpprlHasSprm
(
sal_uInt16
nId
,
sal_uInt8
&
rSprms
,
sal_uInt8
nLen
);
WW8LSTInfo
*
GetLSTByListId
(
sal_uInt32
nIdLst
)
const
;
WW8LSTInfo
*
GetLSTByListId
(
sal_uInt32
nIdLst
)
const
;
//the rParaSprms returns back the original word paragraph indent
//the rParaSprms returns back the original word paragraph indent
//sprms which are attached to this numbering level
//sprms which are attached to this numbering level
bool
ReadLVL
(
SwNumFmt
&
rNumFmt
,
SfxItemSet
*&
rpItemSet
,
sal_uInt16
nLevelStyle
,
bool
ReadLVL
(
bool
bSetStartNo
,
std
::
deque
<
bool
>
&
rNotReallyThere
,
sal_uInt16
nLevel
,
SwNumFmt
&
rNumFmt
,
SfxItemSet
*&
rpItemSet
,
sal_uInt16
nLevelStyle
,
bool
bSetStartNo
,
std
::
deque
<
bool
>
&
rNotReallyThere
,
sal_uInt16
nLevel
,
std
::
vector
<
sal_uInt8
>
&
rParaSprms
);
std
::
vector
<
sal_uInt8
>
&
rParaSprms
);
// Zeichenattribute aus GrpprlChpx
// Zeichenattribute aus GrpprlChpx
typedef
SfxItemSet
*
WW8aISet
[
nMaxLevel
];
typedef
SfxItemSet
*
WW8aISet
[
nMaxLevel
];
// Zeichen Style Pointer
// Zeichen Style Pointer
typedef
SwCharFmt
*
WW8aCFmt
[
nMaxLevel
];
typedef
SwCharFmt
*
WW8aCFmt
[
nMaxLevel
];
void
AdjustLVL
(
sal_uInt8
nLevel
,
SwNumRule
&
rNumRule
,
WW8aISet
&
rListItemSet
,
void
AdjustLVL
(
WW8aCFmt
&
aCharFmt
,
bool
&
bNewCharFmtCreated
,
sal_uInt8
nLevel
,
String
aPrefix
=
aEmptyStr
);
SwNumRule
&
rNumRule
,
WW8aISet
&
rListItemSet
,
WW8aCFmt
&
aCharFmt
,
bool
&
bNewCharFmtCreated
,
String
aPrefix
=
aEmptyStr
);
//No copying
//No copying
WW8ListManager
(
const
WW8ListManager
&
);
WW8ListManager
(
const
WW8ListManager
&
);
WW8ListManager
&
operator
=
(
const
WW8ListManager
&
);
WW8ListManager
&
operator
=
(
const
WW8ListManager
&
);
sal_uInt16
nLastLFOPosition
;
sal_uInt16
nLastLFOPosition
;
};
};
...
...
sw/source/filter/ww8/ww8par3.cxx
Dosyayı görüntüle @
afbfecb7
...
@@ -1140,10 +1140,18 @@ SwNumRule* WW8ListManager::GetNumRule(sal_uInt16 i)
...
@@ -1140,10 +1140,18 @@ SwNumRule* WW8ListManager::GetNumRule(sal_uInt16 i)
// oeffentliche Methoden /////////////////////////////////////////////////////
// oeffentliche Methoden /////////////////////////////////////////////////////
//
//
WW8ListManager
::
WW8ListManager
(
SvStream
&
rSt_
,
SwWW8ImplReader
&
rReader_
)
WW8ListManager
::
WW8ListManager
(
:
maSprmParser
(
rReader_
.
GetFib
().
GetFIBVersion
()),
rReader
(
rReader_
),
SvStream
&
rSt_
,
rDoc
(
rReader
.
GetDoc
()),
rFib
(
rReader
.
GetFib
()),
rSt
(
rSt_
),
pLFOInfos
(
0
),
SwWW8ImplReader
&
rReader_
)
nUniqueList
(
1
)
:
maSprmParser
(
rReader_
.
GetFib
().
GetFIBVersion
()
)
,
rReader
(
rReader_
)
,
rDoc
(
rReader
.
GetDoc
())
,
rFib
(
rReader
.
GetFib
())
,
rSt
(
rSt_
)
,
maLSTInfos
()
,
pLFOInfos
(
NULL
)
,
nUniqueList
(
1
)
,
maStyleInList
()
{
{
// LST und LFO gibts erst ab WW8
// LST und LFO gibts erst ab WW8
if
(
(
8
>
rFib
.
nVersion
)
if
(
(
8
>
rFib
.
nVersion
)
...
@@ -1323,16 +1331,24 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
...
@@ -1323,16 +1331,24 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
}
}
// und rein ins Merk-Array mit dem Teil
// und rein ins Merk-Array mit dem Teil
WW8LFOInfo
*
pLFOInfo
=
new
WW8LFOInfo
(
aLFO
);
WW8LFOInfo
*
pLFOInfo
=
new
WW8LFOInfo
(
aLFO
);
if
(
pParentListInfo
)
if
(
pParentListInfo
!=
NULL
)
{
{
//Copy the basic paragraph properties for each level from the
//Copy the basic paragraph properties for each level from the
//original list into the list format override levels.
//original list into the list format override levels.
int
nMaxSize
=
pParentListInfo
->
maParaSprms
.
size
();
int
nMaxSize
=
pParentListInfo
->
maParaSprms
.
size
();
pLFOInfo
->
maParaSprms
.
resize
(
nMaxSize
);
pLFOInfo
->
maParaSprms
.
resize
(
nMaxSize
);
for
(
int
i
=
0
;
i
<
nMaxSize
;
++
i
)
for
(
int
i
=
0
;
i
<
nMaxSize
;
++
i
)
{
pLFOInfo
->
maParaSprms
[
i
]
=
pParentListInfo
->
maParaSprms
[
i
];
pLFOInfo
->
maParaSprms
[
i
]
=
pParentListInfo
->
maParaSprms
[
i
];
}
}
pLFOInfos
->
Insert
(
pLFOInfo
,
pLFOInfos
->
Count
());
const
sal_uInt16
nLFOInfoArrayPos
=
pLFOInfos
->
Count
();
for
(
sal_uInt8
j
=
0
;
j
<
nMaxLevel
;
++
j
)
{
maStyleInList
[
pParentListInfo
->
aIdSty
[
j
]]
=
nLFOInfoArrayPos
;
}
}
pLFOInfos
->
Insert
(
pLFOInfo
,
pLFOInfos
->
Count
()
);
bOk
=
true
;
bOk
=
true
;
}
}
}
}
...
@@ -1536,6 +1552,29 @@ WW8ListManager::~WW8ListManager()
...
@@ -1536,6 +1552,29 @@ WW8ListManager::~WW8ListManager()
}
}
}
}
sal_uInt16
WW8ListManager
::
GetPossibleLFOPosition
(
const
sal_uInt16
nStyleID
,
const
sal_uInt8
nGivenListLevel
)
{
sal_uInt16
nPossibleLFOPosition
=
USHRT_MAX
;
StyleInList
::
iterator
aItr
=
maStyleInList
.
find
(
nStyleID
);
if
(
aItr
!=
maStyleInList
.
end
()
&&
aItr
->
second
<
pLFOInfos
->
Count
()
)
{
WW8LFOInfo
*
pLFOInfo
=
pLFOInfos
->
GetObject
(
aItr
->
second
);
WW8LSTInfo
*
pParentListInfo
=
GetLSTByListId
(
pLFOInfo
->
nIdLst
);
if
(
pParentListInfo
!=
NULL
&&
pParentListInfo
->
aIdSty
[
nGivenListLevel
]
==
nStyleID
)
{
nPossibleLFOPosition
=
aItr
->
second
;
}
}
return
nPossibleLFOPosition
;
}
bool
IsEqualFormatting
(
const
SwNumRule
&
rOne
,
const
SwNumRule
&
rTwo
)
bool
IsEqualFormatting
(
const
SwNumRule
&
rOne
,
const
SwNumRule
&
rTwo
)
{
{
bool
bRet
=
bool
bRet
=
...
@@ -1688,10 +1727,12 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
...
@@ -1688,10 +1727,12 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
return
pRet
;
return
pRet
;
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// SwWW8ImplReader: anhaengen einer Liste an einen Style oder Absatz
// SwWW8ImplReader: anhaengen einer Liste an einen Style oder Absatz
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
bool
SwWW8ImplReader
::
SetTxtFmtCollAndListLevel
(
const
SwPaM
&
rRg
,
bool
SwWW8ImplReader
::
SetTxtFmtCollAndListLevel
(
const
SwPaM
&
rRg
,
SwWW8StyInf
&
rStyleInfo
)
SwWW8StyInf
&
rStyleInfo
)
{
{
bool
bRes
=
true
;
bool
bRes
=
true
;
...
@@ -1744,7 +1785,6 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
...
@@ -1744,7 +1785,6 @@ bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg,
void
UseListIndent
(
SwWW8StyInf
&
rStyle
,
const
SwNumFmt
&
rFmt
)
void
UseListIndent
(
SwWW8StyInf
&
rStyle
,
const
SwNumFmt
&
rFmt
)
{
{
// --> OD 2008-06-03 #i86652#
if
(
rFmt
.
GetPositionAndSpaceMode
()
==
SvxNumberFormat
::
LABEL_WIDTH_AND_POSITION
)
if
(
rFmt
.
GetPositionAndSpaceMode
()
==
SvxNumberFormat
::
LABEL_WIDTH_AND_POSITION
)
{
{
const
long
nAbsLSpace
=
rFmt
.
GetAbsLSpace
();
const
long
nAbsLSpace
=
rFmt
.
GetAbsLSpace
();
...
@@ -1755,22 +1795,16 @@ void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
...
@@ -1755,22 +1795,16 @@ void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
rStyle
.
pFmt
->
SetFmtAttr
(
aLR
);
rStyle
.
pFmt
->
SetFmtAttr
(
aLR
);
rStyle
.
bListReleventIndentSet
=
true
;
rStyle
.
bListReleventIndentSet
=
true
;
}
}
// <--
}
}
void
SetStyleIndent
(
SwWW8StyInf
&
rStyle
,
const
SwNumFmt
&
rFmt
)
void
SetStyleIndent
(
SwWW8StyInf
&
rStyle
,
const
SwNumFmt
&
rFmt
)
{
{
// --> OD 2008-06-03 #i86652#
if
(
rFmt
.
GetPositionAndSpaceMode
()
==
SvxNumberFormat
::
LABEL_WIDTH_AND_POSITION
)
if
(
rFmt
.
GetPositionAndSpaceMode
()
==
SvxNumberFormat
::
LABEL_WIDTH_AND_POSITION
)
// <--
{
{
SvxLRSpaceItem
aLR
(
ItemGet
<
SvxLRSpaceItem
>
(
*
rStyle
.
pFmt
,
RES_LR_SPACE
));
SvxLRSpaceItem
aLR
(
ItemGet
<
SvxLRSpaceItem
>
(
*
rStyle
.
pFmt
,
RES_LR_SPACE
));
if
(
rStyle
.
bListReleventIndentSet
)
if
(
rStyle
.
bListReleventIndentSet
)
{
{
// --> OD 2010-05-06 #i103711#
// --> OD 2010-05-11 #i105414#
SyncIndentWithList
(
aLR
,
rFmt
,
false
,
false
);
SyncIndentWithList
(
aLR
,
rFmt
,
false
,
false
);
// <--
}
}
else
else
{
{
...
@@ -1781,7 +1815,9 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
...
@@ -1781,7 +1815,9 @@ void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt)
}
}
}
}
void
SwWW8ImplReader
::
SetStylesList
(
sal_uInt16
nStyle
,
sal_uInt16
nActLFO
,
void
SwWW8ImplReader
::
SetStylesList
(
sal_uInt16
nStyle
,
sal_uInt16
nActLFO
,
sal_uInt8
nActLevel
)
sal_uInt8
nActLevel
)
{
{
SwWW8StyInf
&
rStyleInf
=
pCollA
[
nStyle
];
SwWW8StyInf
&
rStyleInf
=
pCollA
[
nStyle
];
...
@@ -1818,7 +1854,7 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
...
@@ -1818,7 +1854,7 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
}
}
}
}
void
SwWW8ImplReader
::
RegisterNumFmtOnStyle
(
sal_uInt16
nStyle
)
void
SwWW8ImplReader
::
RegisterNumFmtOnStyle
(
sal_uInt16
nStyle
)
{
{
SwWW8StyInf
&
rStyleInf
=
pCollA
[
nStyle
];
SwWW8StyInf
&
rStyleInf
=
pCollA
[
nStyle
];
if
(
rStyleInf
.
bValid
&&
rStyleInf
.
pFmt
)
if
(
rStyleInf
.
bValid
&&
rStyleInf
.
pFmt
)
...
@@ -1858,8 +1894,10 @@ void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle)
...
@@ -1858,8 +1894,10 @@ void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle)
}
}
}
}
void
SwWW8ImplReader
::
RegisterNumFmtOnTxtNode
(
sal_uInt16
nActLFO
,
void
SwWW8ImplReader
::
RegisterNumFmtOnTxtNode
(
sal_uInt8
nActLevel
,
bool
bSetAttr
)
sal_uInt16
nActLFO
,
sal_uInt8
nActLevel
,
bool
bSetAttr
)
{
{
// beachte: die Methode haengt die NumRule an den Text Node, falls
// beachte: die Methode haengt die NumRule an den Text Node, falls
// bSetAttr (dann muessen natuerlich vorher die Listen gelesen sein)
// bSetAttr (dann muessen natuerlich vorher die Listen gelesen sein)
...
@@ -1911,23 +1949,14 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
...
@@ -1911,23 +1949,14 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
}
}
}
}
}
}
// --> OD 2005-10-17 #126238#
// - re-introduce fix for issue #i49037#, which got lost by
// accident on a re-synchronisation on the master.
// if (pTxtNd->IsOutline() && pTxtNd->Len() == 0)
// pTxtNd->SetCounted(false);
// <--
pTxtNd
->
SetAttrListLevel
(
nActLevel
);
pTxtNd
->
SetAttrListLevel
(
nActLevel
);
// --> OD 2005-11-01 #126924#
// - <IsCounted()> state of text node has to be adjusted accordingly.
// - <IsCounted()> state of text node has to be adjusted accordingly.
if
(
/*nActLevel >= 0 &&*/
nActLevel
<
MAXLEVEL
)
if
(
/*nActLevel >= 0 &&*/
nActLevel
<
MAXLEVEL
)
{
{
pTxtNd
->
SetCountedInList
(
true
);
pTxtNd
->
SetCountedInList
(
true
);
}
}
// <--
// --> OD 2009-03-04 #i99822#
// Direct application of the list level formatting no longer
// Direct application of the list level formatting no longer
// needed for list levels of mode LABEL_ALIGNMENT
// needed for list levels of mode LABEL_ALIGNMENT
bool
bApplyListLevelIndentDirectlyAtPara
(
true
);
bool
bApplyListLevelIndentDirectlyAtPara
(
true
);
...
@@ -1981,7 +2010,6 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
...
@@ -1981,7 +2010,6 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
pCtrlStck
->
SetAttr
(
*
pPaM
->
GetPoint
(),
RES_LR_SPACE
);
pCtrlStck
->
SetAttr
(
*
pPaM
->
GetPoint
(),
RES_LR_SPACE
);
}
}
}
}
// <--
}
}
}
}
}
}
...
@@ -2028,21 +2056,35 @@ void SwWW8ImplReader::Read_ListLevel(sal_uInt16, const sal_uInt8* pData,
...
@@ -2028,21 +2056,35 @@ void SwWW8ImplReader::Read_ListLevel(sal_uInt16, const sal_uInt8* pData,
}
}
if
(
WW8ListManager
::
nMaxLevel
<=
nListLevel
)
if
(
WW8ListManager
::
nMaxLevel
<=
nListLevel
)
{
// handle invalid list level value by reseting it
nListLevel
=
WW8ListManager
::
nMaxLevel
;
nListLevel
=
WW8ListManager
::
nMaxLevel
;
else
if
}
(
else
if
(
nLFOPosition
<
USHRT_MAX
(
USHRT_MAX
>
nLFOPosition
)
&&
&&
nListLevel
<
WW8ListManager
::
nMaxLevel
)
(
WW8ListManager
::
nMaxLevel
>
nListLevel
)
)
{
{
RegisterNumFmt
(
nLFOPosition
,
nListLevel
);
RegisterNumFmt
(
nLFOPosition
,
nListLevel
);
// reset kept list attributes
nLFOPosition
=
USHRT_MAX
;
nLFOPosition
=
USHRT_MAX
;
nListLevel
=
WW8ListManager
::
nMaxLevel
;
nListLevel
=
WW8ListManager
::
nMaxLevel
;
}
}
else
if
(
pLstManager
!=
NULL
&&
pAktColl
!=
NULL
)
{
const
sal_uInt16
nPossibleLFOPosition
=
pLstManager
->
GetPossibleLFOPosition
(
nAktColl
,
nListLevel
);
if
(
nPossibleLFOPosition
<
USHRT_MAX
)
{
// temporary register Style without reseting kept list attributes
RegisterNumFmt
(
nPossibleLFOPosition
,
nListLevel
);
}
}
}
}
}
}
void
SwWW8ImplReader
::
Read_LFOPosition
(
sal_uInt16
,
const
sal_uInt8
*
pData
,
void
SwWW8ImplReader
::
Read_LFOPosition
(
sal_uInt16
,
const
sal_uInt8
*
pData
,
short
nLen
)
short
nLen
)
{
{
if
(
pPlcxMan
&&
pPlcxMan
->
GetDoingDrawTextBox
())
if
(
pPlcxMan
&&
pPlcxMan
->
GetDoingDrawTextBox
())
...
@@ -2080,13 +2122,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
...
@@ -2080,13 +2122,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
}
}
else
if
(
SwTxtNode
*
pTxtNode
=
pPaM
->
GetNode
()
->
GetTxtNode
())
else
if
(
SwTxtNode
*
pTxtNode
=
pPaM
->
GetNode
()
->
GetTxtNode
())
{
{
// --> OD 2005-10-21 #i54393#
// - Reset hard set numbering rule at paragraph instead of
// setting hard no numbering.
// pTxtNode->SwCntntNode::SetAttr
// (*GetDfltAttr(RES_PARATR_NUMRULE));
pTxtNode
->
ResetAttr
(
RES_PARATR_NUMRULE
);
pTxtNode
->
ResetAttr
(
RES_PARATR_NUMRULE
);
// <--
pTxtNode
->
SetCountedInList
(
false
);
pTxtNode
->
SetCountedInList
(
false
);
/*
/*
...
@@ -2101,9 +2137,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
...
@@ -2101,9 +2137,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
*/
*/
if
(
pTxtNode
->
IsOutline
())
if
(
pTxtNode
->
IsOutline
())
{
{
// OD 2005-10-21 #i54393#
// It's not needed to call <SetCounted( false )> again - see above.
// --> OD 2005-10-21 #i54393#
// Assure that the numbering rule, which is retrieved at
// Assure that the numbering rule, which is retrieved at
// the paragraph is the outline numbering rule, instead of
// the paragraph is the outline numbering rule, instead of
// incorrectly setting the chosen outline rule.
// incorrectly setting the chosen outline rule.
...
@@ -2114,7 +2147,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
...
@@ -2114,7 +2147,6 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
pTxtNode
->
SetAttr
(
pTxtNode
->
SetAttr
(
SwNumRuleItem
(
rDoc
.
GetOutlineNumRule
()
->
GetName
()
)
);
SwNumRuleItem
(
rDoc
.
GetOutlineNumRule
()
->
GetName
()
)
);
}
}
// <--
}
}
//#94672#
//#94672#
...
@@ -2134,19 +2166,30 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
...
@@ -2134,19 +2166,30 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
indentation. Setting this flag will allow us to recover from this
indentation. Setting this flag will allow us to recover from this
braindeadness
braindeadness
*/
*/
if
(
pAktColl
&&
(
nLFOPosition
==
2047
-
1
))
if
(
pAktColl
&&
(
nLFOPosition
==
2047
-
1
)
)
{
pCollA
[
nAktColl
].
bHasBrokenWW6List
=
true
;
pCollA
[
nAktColl
].
bHasBrokenWW6List
=
true
;
}
// die Streamdaten sind hier 1 basiert, wir ziehen EINS ab
// die Streamdaten sind hier 1 basiert, wir ziehen EINS ab
if
(
USHRT_MAX
>
nLFOPosition
)
if
(
USHRT_MAX
>
nLFOPosition
)
{
{
if
(
nLFOPosition
!=
2047
-
1
)
//Normal ww8+ list behaviour
if
(
nLFOPosition
!=
2047
-
1
)
//Normal ww8+ list behaviour
{
{
if
(
WW8ListManager
::
nMaxLevel
==
nListLevel
)
if
(
nListLevel
==
WW8ListManager
::
nMaxLevel
)
{
nListLevel
=
0
;
nListLevel
=
0
;
if
(
pAktColl
!=
NULL
)
{
// temporary register Style without reseting kept list attributes
RegisterNumFmt
(
nLFOPosition
,
nListLevel
);
}
}
else
if
(
WW8ListManager
::
nMaxLevel
>
nListLevel
)
else
if
(
WW8ListManager
::
nMaxLevel
>
nListLevel
)
{
{
RegisterNumFmt
(
nLFOPosition
,
nListLevel
);
RegisterNumFmt
(
nLFOPosition
,
nListLevel
);
// reset kept list attributes
nLFOPosition
=
USHRT_MAX
;
nLFOPosition
=
USHRT_MAX
;
nListLevel
=
WW8ListManager
::
nMaxLevel
;
nListLevel
=
WW8ListManager
::
nMaxLevel
;
}
}
...
@@ -2154,8 +2197,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
...
@@ -2154,8 +2197,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData,
else
if
(
pPlcxMan
&&
pPlcxMan
->
HasParaSprm
(
0xC63E
))
else
if
(
pPlcxMan
&&
pPlcxMan
->
HasParaSprm
(
0xC63E
))
{
{
/*
/*
#i8114# Horrific backwards compatible ww7- lists in ww8+
#i8114# Horrific backwards compatible ww7- lists in ww8+ docs
docs
*/
*/
Read_ANLevelNo
(
13
/*equiv ww7- sprm no*/
,
&
nListLevel
,
1
);
Read_ANLevelNo
(
13
/*equiv ww7- sprm no*/
,
&
nListLevel
,
1
);
}
}
...
...
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