[Libreoffice-commits] .: 13 commits - sw/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Oct 13 06:00:33 PDT 2010
sw/source/core/doc/number.cxx | 9 ++++++-
sw/source/core/docnode/ndtbl.cxx | 8 +++++-
sw/source/filter/rtf/rtfnum.cxx | 8 +++---
sw/source/filter/ww8/ww8par3.cxx | 4 ++-
sw/source/filter/ww8/ww8scan.cxx | 12 ++++++++-
sw/source/ui/docvw/edtwin.cxx | 47 +++++++++++++++++++++++++++++++++++----
sw/source/ui/uno/unotxdoc.cxx | 6 ++++
7 files changed, 80 insertions(+), 14 deletions(-)
New commits:
commit d1e59f999923e818b594616f8e6187e384f30007
Merge: 1f56d1f... 14f8ec5...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Oct 13 14:39:55 2010 +0200
Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/writer
commit 1f56d1f41b8812e861dd0b9b288e12b9122dde9d
Merge: 8bc0e77... 31f654d...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Wed Oct 13 11:45:37 2010 +0200
Merge commit 'ooo/OOO330_m10'
commit 31f654d334dd2a59df0cf203ebc91660f52ba104
Merge: b0ca12d... 6c08555...
Author: obo <obo at openoffice.org>
Date: Fri Oct 8 09:00:32 2010 +0200
CWS-TOOLING: integrate CWS sw33bf11
commit b0ca12db0c6f617a00dc50cc9eec19b1f1929e2b
Merge: 62af314... ae7968a...
Author: obo <obo at openoffice.org>
Date: Fri Oct 8 08:45:29 2010 +0200
CWS-TOOLING: integrate CWS hb22
commit 62af3142336936135e3c7ae1107324b8adf9e552
Merge: 3e90c83... 1d69427...
Author: obo <obo at openoffice.org>
Date: Fri Oct 8 08:00:07 2010 +0200
CWS-TOOLING: integrate CWS dba33j
commit 6c0855538c2e10a05c049abc2f8dcb56554f6dd6
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date: Fri Oct 1 15:13:01 2010 +0200
sw33bf11: #i114875# - method <SwXTextDocument::getRenderer(..)> - consider brochure print correctly in fix for issue i114210
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 0ea6f0f..46bb39c 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -2858,7 +2858,11 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
{
// --> TL, OD 2010-09-07 #i114210#
// determine the correct page number from the renderer index
- const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ];
+ // --> OD 2010-10-01 #i114875
+ // consider brochure print
+ const USHORT nPage = bPrintProspect
+ ? nRenderer + 1
+ : m_pRenderData->GetPagesToPrint()[ nRenderer ];
// <--
// get paper tray to use ...
commit 1d6942781ac24451d2bae028b075057f7985d960
Merge: 0173b35... 5fd7c99...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date: Mon Sep 20 23:17:40 2010 +0200
dba33j: merge after pulling OOO330.m8
commit ae7968a673f66a17a9a17858688ed4db6505a4eb
Merge: 51eb362... 5fd7c99...
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date: Mon Sep 20 17:13:53 2010 +0200
merged OOO330_m8
commit 51eb3620e42b8399843ac0287d3054463af2c8db
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date: Mon Sep 20 16:52:57 2010 +0200
#b6986082# InsBoxen: Do not insert a new cell beyond the end
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 77d98ab..7e81a41 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -334,7 +334,13 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
new SwEndNode( aEndIdx, *pSttNd );
pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
- pLine->GetTabBoxes().C40_INSERT( SwTableBox, pPrvBox, nInsPos + n );
+
+ SwTableBoxes & rTabBoxes = pLine->GetTabBoxes();
+ USHORT nRealInsPos = nInsPos + n;
+ if (nRealInsPos > rTabBoxes.Count())
+ nRealInsPos = rTabBoxes.Count();
+
+ rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos );
//if( NO_NUMBERING == pTxtColl->GetOutlineLevel()//#outline level,zhaojianwei
if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei
commit 0173b351547dab06dfb268e29130d60184893bef
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date: Thu Sep 16 15:24:15 2010 +0200
dba33j: #i114522# method <SwEditWin::MouseMove(..)> on moving anchor handle: Use adjusted position for hit test on handle, because hit test based on primitives now has problem with floating point operations (0 becomes -1,77e-15)
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 9ab1e77..6578142 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -193,15 +193,51 @@ class SwAnchorMarker
SdrHdl* pHdl;
Point aHdlPos;
Point aLastPos;
+ // --> OD 2010-09-16 #i114522#
+ bool bTopRightHandle;
+ // <--
public:
- SwAnchorMarker( SdrHdl* pH ) :
- pHdl( pH ), aHdlPos( pH->GetPos() ), aLastPos( pH->GetPos() ) {}
+ SwAnchorMarker( SdrHdl* pH )
+ : pHdl( pH )
+ , aHdlPos( pH->GetPos() )
+ , aLastPos( pH->GetPos() )
+ // --> OD 2010-09-16 #i114522#
+ , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR )
+ // <--
+ {}
const Point& GetLastPos() const { return aLastPos; }
void SetLastPos( const Point& rNew ) { aLastPos = rNew; }
void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); }
const Point& GetPos() { return pHdl->GetPos(); }
const Point& GetHdlPos() { return aHdlPos; }
- void ChgHdl( SdrHdl* pNew ) { pHdl = pNew; }
+ void ChgHdl( SdrHdl* pNew )
+ {
+ pHdl = pNew;
+ // --> OD 2010-09-16 #i114522#
+ if ( pHdl )
+ {
+ bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR);
+ }
+ // <--
+ }
+ // --> OD 2010-09-16 #i114522#
+ const Point GetPosForHitTest( const OutputDevice& rOut )
+ {
+ Point aHitTestPos( GetPos() );
+ aHitTestPos = rOut.LogicToPixel( aHitTestPos );
+ if ( bTopRightHandle )
+ {
+ aHitTestPos += Point( -1, 1 );
+ }
+ else
+ {
+ aHitTestPos += Point( 1, 1 );
+ }
+ aHitTestPos = rOut.PixelToLogic( aHitTestPos );
+
+ return aHitTestPos;
+ }
+ // <--
};
struct QuickHelpData
@@ -3609,7 +3645,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
// So the pAnchorMarker has to find the right SdrHdl, if it's
// the old one, it will find it with position aOld, if this one
// is destroyed, it will find a new one at position GetHdlPos().
- Point aOld = pAnchorMarker->GetPos();
+ // --> OD 2010-09-16 #i114522#
+// const Point aOld = pAnchorMarker->GetPos();
+ const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) );
+ // <--
Point aNew = rSh.FindAnchorPos( aDocPt );
SdrHdl* pHdl;
if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )||
commit 53ecd0aafe1ae5d2583ca5c9b70834f74ff97e22
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date: Fri Sep 10 17:37:04 2010 +0200
#b6983105# applied patch and verified
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index fb565ea..8f5031c 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1400,7 +1400,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
pLFOInfo->pNumRule->Set(aLFOLVL.nLevel, aNumFmt);
}
bLVLOk = true;
- pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL;
+
+ if (nMaxLevel > aLFOLVL.nLevel)
+ pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL;
}
if( !bLVLOk )
break;
commit 85bf95a2fa8796da2578456519dcbbcc3f75e1a3
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date: Fri Sep 10 11:45:14 2010 +0200
#b6983098# applied patch
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 8ca3f12..36ef485 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -7179,8 +7179,16 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
for (i=0; i < nMaxLeading; ++i)
rgxchLPunct[i] = Get_Short(pData);
- rgxchFPunct[cchFollowingPunct]=0;
- rgxchLPunct[cchLeadingPunct]=0;
+ if (cchFollowingPunct >= 0 && cchFollowingPunct < nMaxFollowing)
+ rgxchFPunct[cchFollowingPunct]=0;
+ else
+ rgxchFPunct[nMaxFollowing - 1]=0;
+
+ if (cchLeadingPunct >= 0 && cchLeadingPunct < nMaxLeading)
+ rgxchLPunct[cchLeadingPunct]=0;
+ else
+ rgxchLPunct[nMaxLeading - 1]=0;
+
}
void WW8DopTypography::WriteToMem(BYTE *&pData) const
commit 9bd6527559cf12ef7b04761212e26149e1a229a7
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date: Wed Sep 8 17:52:18 2010 +0200
#b6983101#: applied patch and did some additional robustness checks
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index ed1d795..24c2d8d 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -101,8 +101,15 @@ const SwNumFmt& SwNumRule::Get( USHORT i ) const
const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const
{
+ const SwNumFmt * pResult = NULL;
+
ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL);
- return aFmts[ i ];
+ if ( i < MAXLEVEL && eRuleType < RULE_END)
+ {
+ pResult = aFmts[ i ];
+ }
+
+ return pResult;
}
// --> OD 2008-07-08 #i91400#
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index 3d77f13..e470238 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -806,8 +806,8 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
// suche die Rule - steht unter Nummer 3
nListNo = 3;
bContinus = FALSE;
- nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
- : BYTE( nTokenValue - 1 );
+ nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1
+ : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 ));
}
else
{
@@ -815,9 +815,9 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
{
case RTF_PNLVL: nListNo = 3;
bContinus = FALSE;
- nLevel = MAXLEVEL <= nTokenValue
+ nLevel = MAXLEVEL <= (unsigned long) nTokenValue
? MAXLEVEL - 1
- : BYTE( nTokenValue-1 );
+ : (!nTokenValue ? 0 : BYTE( nTokenValue-1 ));
break;
case RTF_PNLVLBODY:
More information about the Libreoffice-commits
mailing list