[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - sw/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Thu Dec 10 01:03:19 PST 2009
sw/source/core/doc/docnew.cxx | 3 +-
sw/source/core/view/vprint.cxx | 59 +++++++++++++++++++++++++++++++----------
2 files changed, 48 insertions(+), 14 deletions(-)
New commits:
commit 7f8a85b3eb5448ca716f17131872a740f4bec454
Author: Oliver Bolte <obo at openoffice.org>
Date: Wed Dec 9 09:26:11 2009 +0000
CWS-TOOLING: integrate CWS os139
2009-12-03 10:21:21 +0100 os r277706 : #i107401# page number of page bound frames fixed
2009-11-30 13:44:26 +0100 dr r277673 : #i107275# accept OPCODE_SEP and OPCODE_LIST as range list separator
2009-11-30 13:28:12 +0100 dr r277672 : #i107275# ScRefTokenHelper::compileRangeRepresentation - allow parentheses enclosing the entire expression
2009-11-27 14:45:30 +0100 os r277669 : #i101821# find correct frame and SwPageFrame to print (or PDF export) selections
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 70a86d9..140697d 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1418,7 +1418,7 @@ void SwDoc::Paste( const SwDoc& rSource )
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
if( FLY_PAGE == aAnchor.GetAnchorId() )
{
- aAnchor.SetPageNum( aAnchor.GetPageNum() + /*nStartPageNumber - */1 );
+ aAnchor.SetPageNum( aAnchor.GetPageNum() /*+ nStartPageNumber - */);
}
else
continue;
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 3ae5a3b..af51815 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -776,16 +776,32 @@ SwDoc * ViewShell::CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef &rDocShellR
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
}
- // Die Y-Position der ersten Selektion
- const Point aSelPoint = pFESh->IsTableMode() ?
- pFESh->GetTableCrsr()->GetSttPos() :
- pFirstCrsr->GetSttPos();
+ Point aSelPoint;
+ if( pFESh->IsTableMode() )
+ {
+ SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
+
+ const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
+ const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
+ if( pCntntFrm )
+ {
+ SwRect aCharRect;
+ SwCrsrMoveState aTmpState( MV_NONE );
+ pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
+ aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
+ }
+ }
+ else
+ {
+ aSelPoint = pFirstCrsr->GetSttPos();
+ }
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
+ ASSERT( pPage, "no page found!" );
- // und ihren Seitendescribtor
- const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() );
+ // get page descriptor - fall back to the first one if pPage could not be found
+ const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
+ pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
{ // Am letzten Absatz die Absatzattribute richten:
@@ -868,15 +884,32 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
// Die Y-Position der ersten Selektion
// Die Y-Position der ersten Selektion
- const Point aSelPoint = pFESh->IsTableMode() ?
- pFESh->GetTableCrsr()->GetSttPos() :
- pFirstCrsr->GetSttPos();
+ Point aSelPoint;
+ if( pFESh->IsTableMode() )
+ {
+ SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
+
+ const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
+ const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
+ if( pCntntFrm )
+ {
+ SwRect aCharRect;
+ SwCrsrMoveState aTmpState( MV_NONE );
+ pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
+ aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
+ }
+ }
+ else
+ {
+ aSelPoint = pFirstCrsr->GetSttPos();
+ }
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
+ ASSERT( pPage, "no page found!" );
- // und ihren Seitendescribtor
- const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() );
+ // get page descriptor - fall back to the first one if pPage could not be found
+ const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
+ pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
{ // Am letzten Absatz die Absatzattribute richten:
commit 59e1ea50c1ec0cf98ee34582e0a51b14cdf0ca2f
Author: Oliver Bolte <obo at openoffice.org>
Date: Wed Dec 9 08:32:23 2009 +0000
CWS-TOOLING: integrate CWS fwk129
2009-12-07 14:19:39 +0100 mba r277741 : #i106367#: typo again
2009-12-02 10:32:30 +0100 jsk r277700 : fwk129: #i105719 - Fixed file size, wording and timing
2009-11-25 13:25:48 +0100 mav r277632 : #i107047# let the temporary stream be flushed in time
2009-11-25 13:17:36 +0100 mav r277631 : #i105719# switch to temporary file ealier to allow storing to the same location
2009-11-23 14:47:02 +0100 mav r277596 : #i105343# no outdated info in the buffer
2009-11-23 14:09:49 +0100 os r277595 : #i107064# copy styles in SwDoc::CreateCopy()
2009-11-23 10:38:29 +0100 mba r277592 : #i104338#: fix build without Java
2009-11-20 10:22:11 +0100 cd r277572 : #i107003# Make toolbar invisible before calling doLazyDelete. This prevents possible crashes in scenarios where a modal dialog is visible.
2009-11-19 18:30:33 +0100 mav r277569 : #i107035# let the temporary file be removed after the stream has been closed
2009-11-19 18:06:21 +0100 mba r277565 : #i106390#: crash caused by optimization
2009-11-19 17:58:34 +0100 mba r277564 : #i106367#: typo prevents correct asian language fallback
2009-11-19 17:57:16 +0100 mba r277563 : #i106390#: crash caused by optimization
2009-11-19 16:35:41 +0100 nn r277561 : #i106854# get source stream directly from document's storage instead of a temporary SfxMedium
2009-11-19 12:36:38 +0100 mav r277558 : #i106854# check the date of the original file
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index eb208db..70a86d9 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1353,6 +1353,7 @@ SwDoc* SwDoc::CreateCopy() const
ResetModified();
*/
+ pRet->ReplaceStyles( *(SwDoc*)this );
//copy content
pRet->Paste( *this );
return pRet;
More information about the ooo-build-commit
mailing list