summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-07-13 14:54:15 +0200
committerKurt Zenker <kz@openoffice.org>2010-07-13 14:54:15 +0200
commit6b874cf26290c3c34d0593a429d2073645cc4fc5 (patch)
treedf4549652f3eb28b8daf7c77971f843da8b93b80
parent01ede6790d338aa2b10327a0691f2bb168d53312 (diff)
parent310e75a6575826c9b42bb45a0f79cc281c842803 (diff)
CWS-TOOLING: integrate CWS sw33bf06_OOO330ooo/OOO330_m1
-rw-r--r--sw/qa/unoapi/sw.sce28
-rw-r--r--sw/source/core/crsr/findtxt.cxx14
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx8
-rw-r--r--sw/source/core/text/txttab.cxx4
-rw-r--r--sw/source/core/unocore/unoidx.cxx7
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx3
-rw-r--r--sw/source/core/unocore/unorefmk.cxx6
-rw-r--r--sw/source/core/unocore/unosect.cxx3
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx7
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx2
10 files changed, 51 insertions, 31 deletions
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
index e57a6643cd..0f1092af8a 100644
--- a/sw/qa/unoapi/sw.sce
+++ b/sw/qa/unoapi/sw.sce
@@ -4,9 +4,9 @@
-o sw.ParagraphStyle
#i111197 -o sw.SwAccessibleDocumentPageView
#i86751 -o sw.SwAccessibleDocumentView
-#i111185 -o sw.SwAccessibleEndnoteView
+-o sw.SwAccessibleEndnoteView
-o sw.SwAccessibleFooterView
-#i111185 -o sw.SwAccessibleFootnoteView
+-o sw.SwAccessibleFootnoteView
-o sw.SwAccessibleHeaderView
#i89022 -o sw.SwAccessiblePageView
-o sw.SwAccessibleParagraphView
@@ -18,25 +18,25 @@
-o sw.SwXAutoTextContainer
-o sw.SwXAutoTextEntry
-o sw.SwXAutoTextGroup
-#i111185 -o sw.SwXBodyText
+-o sw.SwXBodyText
-o sw.SwXBookmark
-o sw.SwXBookmarks
-o sw.SwXCell
-o sw.SwXCellRange
-o sw.SwXChapterNumbering
-#i111185 -o sw.SwXDocumentIndex
-#i111185 -o sw.SwXDocumentIndexMark
+-o sw.SwXDocumentIndex
+-o sw.SwXDocumentIndexMark
-o sw.SwXDocumentIndexes
-o sw.SwXDrawPage
-#i111185 -o sw.SwXEndnoteProperties
+-o sw.SwXEndnoteProperties
-o sw.SwXFieldEnumeration
-o sw.SwXFieldMaster
-#i111185 -o sw.SwXFootnote
-#i111185 -o sw.SwXFootnoteProperties
-#i111185 -o sw.SwXFootnoteText
-#i111185 -o sw.SwXFootnotes
+-o sw.SwXFootnote
+-o sw.SwXFootnoteProperties
+-o sw.SwXFootnoteText
+-o sw.SwXFootnotes
-o sw.SwXFrames
-#i111185 -o sw.SwXHeadFootText
+-o sw.SwXHeadFootText
-o sw.SwXLineNumberingProperties
#i85640 -o sw.SwXMailMerge
-o sw.SwXModule
@@ -51,20 +51,20 @@
#i111190 -o sw.SwXShape
-o sw.SwXStyleFamilies
-o sw.SwXStyleFamily
-#i111185 -o sw.SwXTableCellText
+-o sw.SwXTableCellText
-o sw.SwXTableColumns
-o sw.SwXTableRows
-o sw.SwXTextColumns
-o sw.SwXTextCursor
#i89021 -o sw.SwXTextDefaults
-#i111185 -o sw.SwXTextDocument
+-o sw.SwXTextDocument
-o sw.SwXTextEmbeddedObject
-o sw.SwXTextEmbeddedObjects
-o sw.SwXTextField
-o sw.SwXTextFieldMasters
-o sw.SwXTextFieldTypes
-o sw.SwXTextFrame
-#i111185 -o sw.SwXTextFrameText
+-o sw.SwXTextFrameText
-o sw.SwXTextGraphicObject
-o sw.SwXTextGraphicObjects
#i103696 -o sw.SwXTextPortion
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 0097c225ae..814fd21bbf 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -53,8 +53,6 @@
#include <viewsh.hxx>
#include <vcl/window.hxx>
-#define POSTITMGR ((ViewShell*)pNode->GetDoc()->GetDocShell()->GetWrtShell())->GetPostItMgr()
-
using namespace ::com::sun::star;
using namespace util;
@@ -333,9 +331,13 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
+ SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell();
+ ViewShell *const pWrtShell = (pDocShell) ? (ViewShell*)(pDocShell->GetWrtShell()) : 0;
+ SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : 0;
+
xub_StrLen aStart = 0;
// do we need to finish a note?
- if (POSTITMGR->HasActiveSidebarWin())
+ if (pPostItMgr && pPostItMgr->HasActiveSidebarWin())
{
if (bSearchInNotes)
{
@@ -347,7 +349,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
--aNumberPostits;
}
//search inside and finsih and put focus back into the doc
- if (POSTITMGR->FinishSearchReplace(rSearchOpt,bSrchForward))
+ if (pPostItMgr->FinishSearchReplace(rSearchOpt,bSrchForward))
{
bFound = true ;
break;
@@ -355,7 +357,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
else
{
- POSTITMGR->SetActiveSidebarWin(0);
+ pPostItMgr->SetActiveSidebarWin(0);
}
}
@@ -391,7 +393,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
if ( (bSrchForward && (GetPostIt(aLoop + aIgnore,pHts) < pHts->Count()) ) || ( !bSrchForward && (aLoop!=0) ))
{
const SwTxtAttr* pTxtAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)];
- if ( POSTITMGR->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
+ if ( pPostItMgr && pPostItMgr->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
{
bFound = true ;
break;
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 01bf45871b..c2c1c2ad1d 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -213,9 +213,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
!GetAnchoredObj().GetLastCharRect().Width() ) ||
!GetAnchoredObj().GetLastTopOfLine() )
{
- // --> OD 2004-07-15 #117380# - suppress check for paragraph
- // portion information by passing <false> as first parameter
- GetAnchoredObj().CheckCharRectAndTopOfLine( false );
+ // --> OD 2010-07-02 #i111886#
+ // Check existence of paragraph portion information in order
+ // to avoid formatting which could cause deletion of follow frames.
+ GetAnchoredObj().CheckCharRectAndTopOfLine();
+ // <--
// OD 2005-01-12 - Due to table break algorithm the character
// rectangle can have no height. Thus, check also the width
if ( ( !GetAnchoredObj().GetLastCharRect().Height() &&
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 9a1c66aac6..7f9bf2fcf4 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -194,6 +194,10 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
SwTwips nCount = nSearchPos;
+ //Minimum tab stop width is 1
+ if (nDefTabDist <= 0)
+ nDefTabDist = 1;
+
nCount /= nDefTabDist;
nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ;
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips:
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 1c24d55c89..2a9ea3c792 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -367,7 +367,8 @@ public:
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType)))
, m_eTOXType(eType)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pBaseSection)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pBaseSection) ? true : false)
, m_pDoc(&rDoc)
, m_pProps((m_bIsDescriptor)
? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0))
@@ -1625,7 +1626,9 @@ public:
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType)))
, m_eTOXType(eType)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pMark)
+// #i112513#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
+// , m_bIsDescriptor(0 == pMark)
+ , m_bIsDescriptor((0 == pMark) ? true : false)
, m_TypeDepend(this, pType)
, m_pTOXMark(pMark)
, m_pDoc(pDoc)
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index cda9c822ad..194f66a795 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -139,7 +139,8 @@ public:
, m_rThis(rThis)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH))
- , m_bIsDescriptor(0 == pTxtNode)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pTxtNode) ? true : false)
, m_nSelectionStartPos(nSelStart)
, m_nSelectionEndPos(nSelEnd)
, m_xParentText(xParent)
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 244bc8dc5e..d088b6ca26 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -68,7 +68,8 @@ public:
SwDoc *const pDoc, SwFmtRefMark const*const pRefMark)
: SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pRefMark)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pRefMark) ? true : false)
, m_pDoc(pDoc)
, m_pMarkFmt(pRefMark)
{
@@ -762,7 +763,8 @@ public:
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
, m_pTextPortions( pPortions )
, m_bIsDisposed( false )
- , m_bIsDescriptor(0 == pMeta)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pMeta) ? true : false)
, m_xParentText(xParentText)
, m_Text(rDoc, rThis)
{
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 92fad90e82..6514ca6579 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -136,7 +136,8 @@ public:
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION))
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
, m_bIndexHeader(bIndexHeader)
- , m_bIsDescriptor(0 == pFmt)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pFmt) ? true : false)
, m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl())
{
}
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index c3a89f70be..67dcd3f797 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -288,7 +288,12 @@ void SwRTFParser::ReadTable( int nToken )
break;
case RTF_CLMRG:
- aMergeBoxes[ nBoxCnt ] = TRUE;
+ // would crash later on reading \cellx (#i112657#):
+ // the first cell cannot be merged with earlier ones.
+ if (nBoxCnt != 0)
+ {
+ aMergeBoxes[ nBoxCnt ] = TRUE;
+ }
break;
case RTF_CELLX:
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index 8b0f029336..bd613fc7c0 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource,
SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
: SvxEditSource()
, mrSidebarTxtControl( rSidebarTxtControl )
- , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
, mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
{
if ( mrSidebarTxtControl.GetTextView() )