Skip to content

Commit 209fbe2

Browse files
author
Mathias Bauer
committed
CWS changehid: resync to m85
2 parents 659fb7a + 4a60755 commit 209fbe2

File tree

12 files changed

+61
-41
lines changed

12 files changed

+61
-41
lines changed

sw/qa/unoapi/sw.sce

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
-o sw.ParagraphStyle
55
#i111197 -o sw.SwAccessibleDocumentPageView
66
#i86751 -o sw.SwAccessibleDocumentView
7-
#i111185 -o sw.SwAccessibleEndnoteView
7+
-o sw.SwAccessibleEndnoteView
88
-o sw.SwAccessibleFooterView
9-
#i111185 -o sw.SwAccessibleFootnoteView
9+
-o sw.SwAccessibleFootnoteView
1010
-o sw.SwAccessibleHeaderView
1111
#i89022 -o sw.SwAccessiblePageView
1212
-o sw.SwAccessibleParagraphView
@@ -18,25 +18,25 @@
1818
-o sw.SwXAutoTextContainer
1919
-o sw.SwXAutoTextEntry
2020
-o sw.SwXAutoTextGroup
21-
#i111185 -o sw.SwXBodyText
21+
-o sw.SwXBodyText
2222
-o sw.SwXBookmark
2323
-o sw.SwXBookmarks
2424
-o sw.SwXCell
2525
-o sw.SwXCellRange
2626
-o sw.SwXChapterNumbering
27-
#i111185 -o sw.SwXDocumentIndex
28-
#i111185 -o sw.SwXDocumentIndexMark
27+
-o sw.SwXDocumentIndex
28+
-o sw.SwXDocumentIndexMark
2929
-o sw.SwXDocumentIndexes
3030
-o sw.SwXDrawPage
31-
#i111185 -o sw.SwXEndnoteProperties
31+
-o sw.SwXEndnoteProperties
3232
-o sw.SwXFieldEnumeration
3333
-o sw.SwXFieldMaster
34-
#i111185 -o sw.SwXFootnote
35-
#i111185 -o sw.SwXFootnoteProperties
36-
#i111185 -o sw.SwXFootnoteText
37-
#i111185 -o sw.SwXFootnotes
34+
-o sw.SwXFootnote
35+
-o sw.SwXFootnoteProperties
36+
-o sw.SwXFootnoteText
37+
-o sw.SwXFootnotes
3838
-o sw.SwXFrames
39-
#i111185 -o sw.SwXHeadFootText
39+
-o sw.SwXHeadFootText
4040
-o sw.SwXLineNumberingProperties
4141
#i85640 -o sw.SwXMailMerge
4242
-o sw.SwXModule
@@ -51,20 +51,20 @@
5151
#i111190 -o sw.SwXShape
5252
-o sw.SwXStyleFamilies
5353
-o sw.SwXStyleFamily
54-
#i111185 -o sw.SwXTableCellText
54+
-o sw.SwXTableCellText
5555
-o sw.SwXTableColumns
5656
-o sw.SwXTableRows
5757
-o sw.SwXTextColumns
5858
-o sw.SwXTextCursor
5959
#i89021 -o sw.SwXTextDefaults
60-
#i111185 -o sw.SwXTextDocument
60+
-o sw.SwXTextDocument
6161
-o sw.SwXTextEmbeddedObject
6262
-o sw.SwXTextEmbeddedObjects
6363
-o sw.SwXTextField
6464
-o sw.SwXTextFieldMasters
6565
-o sw.SwXTextFieldTypes
6666
-o sw.SwXTextFrame
67-
#i111185 -o sw.SwXTextFrameText
67+
-o sw.SwXTextFrameText
6868
-o sw.SwXTextGraphicObject
6969
-o sw.SwXTextGraphicObjects
7070
#i103696 -o sw.SwXTextPortion

sw/source/core/crsr/findtxt.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353
#include <viewsh.hxx>
5454
#include <vcl/window.hxx>
5555

56-
#define POSTITMGR ((ViewShell*)pNode->GetDoc()->GetDocShell()->GetWrtShell())->GetPostItMgr()
57-
5856
using namespace ::com::sun::star;
5957
using namespace util;
6058

@@ -333,9 +331,13 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
333331

334332
}
335333

334+
SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell();
335+
ViewShell *const pWrtShell = (pDocShell) ? (ViewShell*)(pDocShell->GetWrtShell()) : 0;
336+
SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : 0;
337+
336338
xub_StrLen aStart = 0;
337339
// do we need to finish a note?
338-
if (POSTITMGR->HasActiveSidebarWin())
340+
if (pPostItMgr && pPostItMgr->HasActiveSidebarWin())
339341
{
340342
if (bSearchInNotes)
341343
{
@@ -347,15 +349,15 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
347349
--aNumberPostits;
348350
}
349351
//search inside and finsih and put focus back into the doc
350-
if (POSTITMGR->FinishSearchReplace(rSearchOpt,bSrchForward))
352+
if (pPostItMgr->FinishSearchReplace(rSearchOpt,bSrchForward))
351353
{
352354
bFound = true ;
353355
break;
354356
}
355357
}
356358
else
357359
{
358-
POSTITMGR->SetActiveSidebarWin(0);
360+
pPostItMgr->SetActiveSidebarWin(0);
359361
}
360362
}
361363

@@ -391,7 +393,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
391393
if ( (bSrchForward && (GetPostIt(aLoop + aIgnore,pHts) < pHts->Count()) ) || ( !bSrchForward && (aLoop!=0) ))
392394
{
393395
const SwTxtAttr* pTxtAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)];
394-
if ( POSTITMGR->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
396+
if ( pPostItMgr && pPostItMgr->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
395397
{
396398
bFound = true ;
397399
break;

sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
213213
!GetAnchoredObj().GetLastCharRect().Width() ) ||
214214
!GetAnchoredObj().GetLastTopOfLine() )
215215
{
216-
// --> OD 2004-07-15 #117380# - suppress check for paragraph
217-
// portion information by passing <false> as first parameter
218-
GetAnchoredObj().CheckCharRectAndTopOfLine( false );
216+
// --> OD 2010-07-02 #i111886#
217+
// Check existence of paragraph portion information in order
218+
// to avoid formatting which could cause deletion of follow frames.
219+
GetAnchoredObj().CheckCharRectAndTopOfLine();
220+
// <--
219221
// OD 2005-01-12 - Due to table break algorithm the character
220222
// rectangle can have no height. Thus, check also the width
221223
if ( ( !GetAnchoredObj().GetLastCharRect().Height() &&

sw/source/core/text/txttab.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
194194
}
195195
SwTwips nCount = nSearchPos;
196196

197+
//Minimum tab stop width is 1
198+
if (nDefTabDist <= 0)
199+
nDefTabDist = 1;
200+
197201
nCount /= nDefTabDist;
198202
nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ;
199203
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips:

sw/source/core/unocore/unoidx.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ class SwXDocumentIndex::Impl
367367
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType)))
368368
, m_eTOXType(eType)
369369
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
370-
, m_bIsDescriptor(0 == pBaseSection)
370+
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
371+
, m_bIsDescriptor((0 == pBaseSection) ? true : false)
371372
, m_pDoc(&rDoc)
372373
, m_pProps((m_bIsDescriptor)
373374
? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0))
@@ -1625,7 +1626,9 @@ class SwXDocumentIndexMark::Impl
16251626
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType)))
16261627
, m_eTOXType(eType)
16271628
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
1628-
, m_bIsDescriptor(0 == pMark)
1629+
// #i112513#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
1630+
// , m_bIsDescriptor(0 == pMark)
1631+
, m_bIsDescriptor((0 == pMark) ? true : false)
16291632
, m_TypeDepend(this, pType)
16301633
, m_pTOXMark(pMark)
16311634
, m_pDoc(pDoc)

sw/source/core/unocore/unoparagraph.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ class SwXParagraph::Impl
139139
, m_rThis(rThis)
140140
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
141141
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH))
142-
, m_bIsDescriptor(0 == pTxtNode)
142+
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
143+
, m_bIsDescriptor((0 == pTxtNode) ? true : false)
143144
, m_nSelectionStartPos(nSelStart)
144145
, m_nSelectionEndPos(nSelEnd)
145146
, m_xParentText(xParent)

sw/source/core/unocore/unorefmk.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ class SwXReferenceMark::Impl
6868
SwDoc *const pDoc, SwFmtRefMark const*const pRefMark)
6969
: SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0)
7070
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
71-
, m_bIsDescriptor(0 == pRefMark)
71+
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
72+
, m_bIsDescriptor((0 == pRefMark) ? true : false)
7273
, m_pDoc(pDoc)
7374
, m_pMarkFmt(pRefMark)
7475
{
@@ -762,7 +763,8 @@ class SwXMeta::Impl
762763
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
763764
, m_pTextPortions( pPortions )
764765
, m_bIsDisposed( false )
765-
, m_bIsDescriptor(0 == pMeta)
766+
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
767+
, m_bIsDescriptor((0 == pMeta) ? true : false)
766768
, m_xParentText(xParentText)
767769
, m_Text(rDoc, rThis)
768770
{

sw/source/core/unocore/unosect.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class SwXTextSection::Impl
136136
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION))
137137
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
138138
, m_bIndexHeader(bIndexHeader)
139-
, m_bIsDescriptor(0 == pFmt)
139+
// #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
140+
, m_bIsDescriptor((0 == pFmt) ? true : false)
140141
, m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl())
141142
{
142143
}

sw/source/filter/rtf/rtftbl.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ void SwRTFParser::ReadTable( int nToken )
288288
break;
289289

290290
case RTF_CLMRG:
291-
aMergeBoxes[ nBoxCnt ] = TRUE;
291+
// would crash later on reading \cellx (#i112657#):
292+
// the first cell cannot be merged with earlier ones.
293+
if (nBoxCnt != 0)
294+
{
295+
aMergeBoxes[ nBoxCnt ] = TRUE;
296+
}
292297
break;
293298

294299
case RTF_CELLX:

sw/source/filter/ww8/ww8par2.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,15 +1509,15 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
15091509
return;
15101510
mbHasSpacing=true;
15111511
#ifdef DBG_UTIL
1512-
BYTE nWhichCell =
1513-
#endif
1514-
*pParams++;
1512+
BYTE nWhichCell = *pParams;
15151513
ASSERT(nWhichCell == 0, "Expected cell to be 0!");
1516-
*pParams++; //unknown byte
1514+
#endif
1515+
++pParams; //Skip which cell
1516+
++pParams; //unknown byte
15171517

15181518
BYTE nSideBits = *pParams++;
15191519
ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits");
1520-
*pParams++; //unknown byte
1520+
++pParams; //unknown byte
15211521
USHORT nValue = SVBT16ToShort( pParams );
15221522
for (int i = wwTOP; i <= wwRIGHT; i++)
15231523
{
@@ -1555,18 +1555,18 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
15551555
if (nWhichCell >= MAX_COL + 1)
15561556
return;
15571557

1558-
*pParams++; //unknown byte
1558+
++pParams; //unknown byte
15591559
BYTE nSideBits = *pParams++;
15601560
ASSERT(nSideBits < 0x10, "Unexpected value for nSideBits");
15611561
nOverrideSpacing[nWhichCell] |= nSideBits;
15621562

15631563
ASSERT(nOverrideSpacing[nWhichCell] < 0x10,
15641564
"Unexpected value for nSideBits");
15651565
#ifdef DBG_UTIL
1566-
BYTE nUnknown2 =
1567-
#endif
1568-
*pParams++;
1566+
BYTE nUnknown2 = *pParams;
15691567
ASSERT(nUnknown2 == 0x3, "Unexpected value for spacing2");
1568+
#endif
1569+
++pParams;
15701570
USHORT nValue = SVBT16ToShort( pParams );
15711571

15721572
for (int i=0; i < 4; i++)

0 commit comments

Comments
 (0)