summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/IDocumentContentOperations.hxx11
-rw-r--r--sw/inc/doc.hxx7
-rw-r--r--sw/source/core/doc/docedt.cxx68
-rw-r--r--sw/source/core/doc/docnum.cxx6
-rw-r--r--sw/source/core/doc/docredln.cxx7
-rw-r--r--sw/source/core/draw/dcontact.cxx9
-rw-r--r--sw/source/core/layout/colfrm.cxx11
-rw-r--r--sw/source/core/layout/fly.cxx12
-rw-r--r--sw/source/core/layout/pagechg.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx7
-rw-r--r--sw/source/core/text/txtfrm.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx17
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx20
-rw-r--r--sw/source/core/view/viewsh.cxx20
-rw-r--r--sw/source/ui/inc/insrc.hxx85
-rw-r--r--sw/source/ui/table/insrc.cxx94
-rw-r--r--sw/source/ui/table/insrc.hrc43
-rw-r--r--sw/source/ui/table/insrc.src155
-rw-r--r--sw/source/ui/uiview/pview.cxx13
19 files changed, 144 insertions, 447 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index 67250574a7..a2e094373a 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,9 +85,14 @@
*/
virtual bool DelFullPara(SwPaM&) = 0;
- /** komplett loeschen eines Bereiches
+ /** complete delete of a given PaM
+
+ OD 2009-08-20 #i100466#
+ Add optional parameter <bForceJoinNext>, default value <false>
+ Needed for hiding of deletion redlines
*/
- virtual bool DeleteAndJoin(SwPaM&) = 0;
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false ) = 0;
/** verschieben eines Bereiches
*/
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 19c36b1c91..1066d07d70 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -882,7 +882,12 @@ public:
virtual void DeleteSection(SwNode* pNode);
virtual bool Delete(SwPaM&);
virtual bool DelFullPara(SwPaM&);
- virtual bool DeleteAndJoin(SwPaM&);
+ // --> OD 2009-08-20 #i100466#
+ // Add optional parameter <bForceJoinNext>, default value <false>
+ // Needed for hiding of deletion redlines
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false );
+ // <--
virtual bool Move(SwPaM&, SwPosition&, SwMoveFlags);
virtual bool Move(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 0c434ecbb8..620424ac8a 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1219,20 +1219,11 @@ bool SwDoc::Move( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
{
if( pTNd->CanJoinNext())
{
- SwTxtNode *pNextTNd = 0;
- if( !pTNd->Len() )
- {
- SwNodeIndex aTmpIdx( *pTNd, 1 );
- pNextTNd = aTmpIdx.GetNode().GetTxtNode();
- }
- if( pNextTNd )
- {
- if( !bNullCntnt )
- pSavePam->Move( fnMoveForward, fnGoCntnt );
- pNextTNd->JoinPrev();
- }
- else
- pTNd->JoinNext();
+ // --> OD 2009-08-20 #i100466#
+ // Always join next, because <pTNd> has to stay as it is.
+ // A join previous from its next would more or less delete <pTNd>
+ pTNd->JoinNext();
+ // <--
bRemove = false;
}
}
@@ -1602,12 +1593,26 @@ void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev )
}
pDoc->CorrRel( aIdx, *rPam.GetPoint(), 0, sal_True );
+ // --> OD 2009-08-20 #i100466#
+ // adjust given <rPam>, if it does not belong to the cursors
+ if ( pDelNd == rPam.GetBound( sal_True ).nContent.GetIdxReg() )
+ {
+ rPam.GetBound( sal_True ) = SwPosition( SwNodeIndex( *pTxtNd ), SwIndex( pTxtNd ) );
+ }
+ if( pDelNd == rPam.GetBound( sal_False ).nContent.GetIdxReg() )
+ {
+ rPam.GetBound( sal_False ) = SwPosition( SwNodeIndex( *pTxtNd ), SwIndex( pTxtNd ) );
+ }
+ // <--
pTxtNd->JoinNext();
}
}
}
-bool SwDoc::DeleteAndJoin( SwPaM & rPam )
+// OD 2009-08-20 #i100466#
+// Add handling of new optional parameter <bForceJoinNext>
+bool SwDoc::DeleteAndJoin( SwPaM & rPam,
+ const bool bForceJoinNext )
{
if( lcl_StrLenOverFlow( rPam ) )
return sal_False;
@@ -1656,7 +1661,12 @@ SetRedlineMode( eOld );
sal_Bool bJoinTxt, bJoinPrev;
lcl_GetJoinFlags( rPam, bJoinTxt, bJoinPrev );
-
+ // --> OD 2009-08-20 #i100466#
+ if ( bForceJoinNext )
+ {
+ bJoinPrev = sal_False;
+ }
+ // <--
{
// dann eine Kopie vom Cursor erzeugen um alle Pams aus den
// anderen Sichten aus dem Loeschbereich zu verschieben
@@ -1881,7 +1891,7 @@ void lcl_syncGrammarError( SwTxtNode &rTxtNode, linguistic2::ProofreadingResult&
uno::Any SwDoc::Spell( SwPaM& rPaM,
uno::Reference< XSpellChecker1 > &xSpeller,
sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
- bool bGrammarCheck,
+ bool bGrammarCheck,
SwConversionArgs *pConvArgs ) const
{
SwPosition* pSttPos = rPaM.Start(), *pEndPos = rPaM.End();
@@ -1897,7 +1907,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
else
pSpellArgs = new SwSpellArgs( xSpeller,
pSttPos->nNode.GetNode().GetTxtNode(), pSttPos->nContent,
- pEndPos->nNode.GetNode().GetTxtNode(), pEndPos->nContent,
+ pEndPos->nNode.GetNode().GetTxtNode(), pEndPos->nContent,
bGrammarCheck );
ULONG nCurrNd = pSttPos->nNode.GetIndex();
@@ -1957,11 +1967,11 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
if( aOrigPos != *aCrsr.GetPoint() )
{
nBeginGrammarCheck = aCrsr.GetPoint()->nContent.GetIndex();
- }
+ }
}
nEndGrammarCheck = pSpellArgs->pEndNode == pNd ? pSpellArgs->pEndIdx->GetIndex() : ((SwTxtNode*)pNd)->GetTxt().Len();
}
-
+
xub_StrLen nSpellErrorPosition = ((SwTxtNode*)pNd)->GetTxt().Len();
if( (!pConvArgs &&
((SwTxtNode*)pNd)->Spell( pSpellArgs )) ||
@@ -1973,12 +1983,12 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
pEndPos->nNode = nCurrNd;
nCurrNd = nEndNd;
if( pSpellArgs )
- nSpellErrorPosition = pSpellArgs->pStartIdx->GetIndex() > pSpellArgs->pEndIdx->GetIndex() ?
- pSpellArgs->pEndIdx->GetIndex() :
+ nSpellErrorPosition = pSpellArgs->pStartIdx->GetIndex() > pSpellArgs->pEndIdx->GetIndex() ?
+ pSpellArgs->pEndIdx->GetIndex() :
pSpellArgs->pStartIdx->GetIndex();
}
-
-
+
+
if( pSpellArgs && pSpellArgs->bIsGrammarCheck )
{
uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( GetGCIterator() );
@@ -1992,7 +2002,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
((SwTxtNode*)pNd)->BuildConversionMap( aExpandText );
// get XFlatParagraph to use...
uno::Reference< text::XFlatParagraph > xFlatPara = new SwXFlatParagraph( *((SwTxtNode*)pNd), aExpandText, pConversionMap );
-
+
// get error position of cursor in XFlatParagraph
sal_Int32 nGrammarErrorPosInText;
linguistic2::ProofreadingResult aResult;
@@ -2000,11 +2010,11 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
do
{
nGrammarErrorPosInText = ModelToViewHelper::ConvertToViewPosition( pConversionMap, nBeginGrammarCheck );
- aResult = xGCIterator->checkSentenceAtPosition(
+ aResult = xGCIterator->checkSentenceAtPosition(
xDoc, xFlatPara, aExpandText, lang::Locale(), nBeginGrammarCheck, -1, -1 );
-
+
lcl_syncGrammarError( *((SwTxtNode*)pNd), aResult, nBeginGrammarCheck, pConversionMap );
-
+
// get suggestions to use for the specific error position
nGrammarErrors = aResult.aErrors.getLength();
// if grammar checking doesn't have any progress then quit
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 30aa235f88..97333d063e 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1080,10 +1080,8 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
// <--
}
- // --> OD 2006-01-13 #i60395#
- // It's not allowed to apply the outline numbering rule as hard attribute
- // to document content - typically paragraphs.
- if ( bSetItem && pNew != GetOutlineNumRule() )
+ // --> OD 2009-08-18 #i103817#
+ if ( bSetItem )
// <--
{
Insert( rPam, SwNumRuleItem( pNew->GetName() ), 0 );
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index d83860947e..4c3f1b3900 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -3488,7 +3488,12 @@ void SwRedline::DelCopyOfSection()
}
if( pCSttNd && pCEndNd )
- pDoc->DeleteAndJoin( aPam );
+ {
+ // --> OD 2009-08-20 #i100466#
+ // force a <join next> on <delete and join> operation
+ pDoc->DeleteAndJoin( aPam, true );
+ // <--
+ }
else if( pCSttNd || pCEndNd )
{
if( pCSttNd && !pCEndNd )
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 6712f04080..93f83256a9 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -1653,7 +1653,12 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
ASSERT( maAnchoredDrawObj.DrawObj(), "SwDrawContact::Modify: no draw object here?" );
if ( maAnchoredDrawObj.DrawObj() )
- maAnchoredDrawObj.DrawObj()->getShapePropertyChangeNotifier().notifyPropertyChange( ::svx::eTextShapeAnchorType );
+ {
+ // --> OD 2009-07-10 #i102752#
+ // assure that a ShapePropertyChangeNotifier exists
+ maAnchoredDrawObj.DrawObj()->notifyShapePropertyChange( ::svx::eTextShapeAnchorType );
+ // <--
+ }
}
}
}
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index c4f8923507..8515889c10 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -213,6 +213,15 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
{
if ( rOld.GetNumCols() <= 1 && rNew.GetNumCols() <= 1 && !bChgFtn )
return;
+ // --> OD 2009-08-12 #i97379#
+ // If current lower is a no text frame, then columns are not allowed
+ if ( Lower() && Lower()->IsNoTxtFrm() &&
+ rNew.GetNumCols() > 1 )
+ {
+ return;
+ }
+ // <--
+
USHORT nNewNum, nOldNum = 1;
if( Lower() && Lower()->IsColumnFrm() )
{
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 140e1470e1..8899002e4e 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -250,6 +250,18 @@ void SwFlyFrm::InsertCnt()
// OD 2004-02-12 #110582#-2
void SwFlyFrm::InsertColumns()
{
+ // --> OD 2009-08-12 #i97379#
+ // Check, if column are allowed.
+ // Columns are not allowed for fly frames, which represent graphics or embedded objects.
+ const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
+ ASSERT( rCntnt.GetCntntIdx(), "<SwFlyFrm::InsertColumns()> - no content prepared." );
+ SwNodeIndex aFirstCntnt( *(rCntnt.GetCntntIdx()), 1 );
+ if ( aFirstCntnt.GetNode().IsNoTxtNode() )
+ {
+ return;
+ }
+ // <--
+
const SwFmtCol &rCol = GetFmt()->GetCol();
if ( rCol.GetNumCols() > 1 )
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index e1c1055638..cf45cba307 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2062,6 +2062,10 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
pAnchoredDrawObj->DrawObj()->SetAnchorPos( aNewAnchorPos );
pAnchoredDrawObj->SetLastObjRect( pAnchoredDrawObj->GetObjRect().SVRect() );
}
+ // --> OD 2009-08-20 #i92511#
+ // cache for object rectangle inclusive spaces has to be invalidated.
+ pAnchoredObj->InvalidateObjRectWithSpaces();
+ // <--
}
}
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 6f6759f1cf..0ba077e799 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2103,6 +2103,11 @@ void SwTabFrm::MakeAll()
{
bMovedFwd = TRUE;
bCalcLowers = TRUE;
+ // --> OD 2009-08-12 #i99267#
+ // reset <bSplit> after forward move to assure that follows
+ // can be joined, if further space is available.
+ bSplit = FALSE;
+ // <--
}
Point aOldPos( (Frm().*fnRect->fnGetPos)() );
@@ -2148,7 +2153,7 @@ void SwTabFrm::MakeAll()
{
// HB #i101593# no optimization as it leeds to not layouting certain nested tables
// const BOOL bOptLower = (Frm().*fnRect->fnGetHeight)() == 0;
- const BOOL bOptLower = FALSE;
+ const BOOL bOptLower = FALSE;
const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)();
const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)();
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 64f9fd1c7f..5bceef690f 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1040,7 +1040,7 @@ void SwTxtFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
_InvalidateRange( SwCharRange( nPos, nLen) );
MSHORT nTmp = ((SwUpdateAttr*)pNew)->nWhichAttr;
- if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_AUTOFMT ||
+ if( ! nTmp || RES_TXTATR_CHARFMT == nTmp || RES_TXTATR_AUTOFMT == nTmp ||
RES_FMT_CHG == nTmp || RES_ATTRSET_CHG == nTmp )
{
SET_WRONG( nPos, nPos + nLen, false )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ba271beb34..201ac8049a 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2271,17 +2271,6 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
if (sNumRuleName.Len() > 0)
{
pRet = GetDoc()->FindNumRulePtr( sNumRuleName );
- // --> OD 2006-01-13 #i60395#
- // It's not allowed to apply the outline numbering rule as hard
- // attribute to a paragraph.
- // Because currently not all situation are known, in which such
- // a situation is triggered, it's asserted in order to find these.
- ASSERT( !pRet || !HasSwAttrSet() ||
- pRet != GetDoc()->GetOutlineNumRule() ||
- SFX_ITEM_SET !=
- GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE ),
- "<SwTxtNode::_GetNumRule(..)> - found outline numbering rule as hard attribute at a paragraph. This isn't allowed. It's a serious defect, please inform OD" );
- // <--
}
else // numbering is turned off
bNoNumRule = true;
@@ -2556,8 +2545,8 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
return pNode;
SwTxtFmtColl *pNextColl = &pColl->GetNextTxtFmtColl();
- ChgFmtColl( pNextColl );
-
+ // --> OD 2009-08-12 #i101870#
+ // perform action on different paragraph styles before applying the new paragraph style
if (pNextColl != pColl)
{
// --> OD 2007-07-10 #i75353#
@@ -2573,6 +2562,8 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
}
// <--
}
+ // <--
+ ChgFmtColl( pNextColl );
return pNode;
}
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 2aacded41e..a6ef83aea1 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -527,8 +527,8 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
}
}
- eNewState =
- aCharStyles.getLength() ?
+ eNewState =
+ aCharStyles.getLength() ?
PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;;
if(pAny)
(*pAny) <<= aCharStyles;
@@ -585,9 +585,9 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
if(pSwNum)
{
+ SwDoc* pDoc = rPam.GetDoc();
if(pSwNum->GetNumRule())
{
- SwDoc* pDoc = rPam.GetDoc();
SwNumRule aRule(*pSwNum->GetNumRule());
const String* pNewCharStyles = pSwNum->GetNewCharStyleNames();
const String* pBulletFontNames = pSwNum->GetBulletFontNames();
@@ -680,7 +680,6 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
}
else if(pSwNum->GetCreatedNumRuleName().Len())
{
- SwDoc* pDoc = rPam.GetDoc();
UnoActionContext aAction(pDoc);
SwNumRule* pRule = pDoc->FindNumRulePtr( pSwNum->GetCreatedNumRuleName() );
if(!pRule)
@@ -690,6 +689,17 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
pDoc->SetNumRule( rPam, *pRule, false );
// <--
}
+ // --> OD 2009-08-18 #i103817#
+ // outline numbering
+ else
+ {
+ UnoActionContext aAction(pDoc);
+ SwNumRule* pRule = pDoc->GetOutlineNumRule();
+ if(!pRule)
+ throw RuntimeException();
+ pDoc->SetNumRule( rPam, *pRule, false );
+ }
+ // <--
}
}
else if(rValue.getValueType() == ::getVoidCppuType())
@@ -1037,7 +1047,7 @@ SwAnyMapHelper::~SwAnyMapHelper()
{
delete ( aIt->second );
++aIt;
- }
+ }
}
/*-- 19.02.2009 09:27:26---------------------------------------------------
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index e284204796..9021e67c00 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1347,7 +1347,15 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
// #i75172# isolated static conditions
const bool bOnlyYScroll(!lXDiff && Abs(lYDiff) != 0 && Abs(lYDiff) < lMax);
const bool bAllowedWithChildWindows(GetWin()->GetWindowClipRegionPixel(WINDOW_GETCLIPREGION_NOCHILDREN|WINDOW_GETCLIPREGION_NULL).IsNull());
+// --> OD 2009-08-12 #i98766# - disable smooth scrolling for Mac port builds
+#ifdef QUARTZ
+ const bool bSmoothScrollAllowed(false);
+ (void) bOnlyYScroll;
+ (void) bAllowedWithChildWindows;
+#else
const bool bSmoothScrollAllowed(bOnlyYScroll && bEnableSmooth && GetViewOptions()->IsSmoothScroll() && bAllowedWithChildWindows);
+#endif
+// <-
const bool bIAmCursorShell(ISA(SwCrsrShell));
(void) bIAmCursorShell;
@@ -1744,7 +1752,7 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
// (3) expand DLPostPaint2 with a flag to signal if FormControl paints shall
// be done or not
//
- // Currently, (3) will be the best possible solution. It will keep overlay and
+ // Currently, (3) will be the best possible solution. It will keep overlay and
// buffering intact and work without MapMode for single pages. In the medium
// to long run, (1) will need to be used and the bool bPaintFormLayer needs
// to be removed again
@@ -1971,6 +1979,11 @@ void ViewShell::Paint(const Rectangle &rRect)
//angemeldet hat, so muessen Repaints ausgeloest werden.
if ( !CheckInvalidForPaint( aRect ) )
{
+ // --> OD 2009-08-12 #i101192#
+ // start Pre/PostPaint encapsulation to avoid screen blinking
+ const Region aRepaintRegion(aRect.SVRect());
+ DLPrePaint2(aRepaintRegion);
+ // <--
PaintDesktop( aRect );
//Falls sinnvoll gleich das alte InvalidRect verarbeiten bzw.
//vernichten.
@@ -1979,6 +1992,10 @@ void ViewShell::Paint(const Rectangle &rRect)
ViewShell::bLstAct = TRUE;
GetLayout()->Paint( aRect );
ViewShell::bLstAct = FALSE;
+ // --> OD 2009-08-12 #i101192#
+ // end Pre/PostPaint encapsulation
+ DLPostPaint2(true);
+ // <--
}
//delete pSaveHdl;
@@ -2721,4 +2738,3 @@ const IDocumentOutlineNodes* ViewShell::getIDocumentOutlineNodesAccess() const
return pDoc;
}
// <--
-
diff --git a/sw/source/ui/inc/insrc.hxx b/sw/source/ui/inc/insrc.hxx
deleted file mode 100644
index 025a027923..0000000000
--- a/sw/source/ui/inc/insrc.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: insrc.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _INSRC_HXX
-#define _INSRC_HXX
-
-#include <svx/stddlg.hxx>
-
-#ifndef _FIXED_HXX //autogen
-#include <vcl/fixed.hxx>
-#endif
-
-#ifndef _FIELD_HXX //autogen
-#include <vcl/field.hxx>
-#endif
-
-#ifndef _BUTTON_HXX //autogen
-#include <vcl/button.hxx>
-#endif
-
-#ifndef _GROUP_HXX //autogen
-#include <vcl/group.hxx>
-#endif
-#include <tools/string.hxx>
-
-#ifndef _BUTTON_HXX //autogen
-#include <vcl/button.hxx>
-#endif
-
-class SwView;
-class SwInsRowColDlg : public SvxStandardDialog
-{
- FixedText aCount;
- NumericField aCountEdit;
- FixedLine aInsFL;
-
- RadioButton aBeforeBtn;
- RadioButton aAfterBtn;
- FixedLine aPosFL;
-
- String aRow;
- String aCol;
-
- OKButton aOKBtn;
- CancelButton aCancelBtn;
- HelpButton aHelpBtn;
-
- SwView& rView;
- BOOL bColumn;
-
-protected:
- virtual void Apply();
-
-public:
- SwInsRowColDlg( SwView& rView, BOOL bCol );
-};
-
-#endif
-
diff --git a/sw/source/ui/table/insrc.cxx b/sw/source/ui/table/insrc.cxx
deleted file mode 100644
index 387678dec8..0000000000
--- a/sw/source/ui/table/insrc.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: insrc.cxx,v $
- * $Revision: 1.10 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-#ifdef SW_DLLIMPLEMENTATION
-#undef SW_DLLIMPLEMENTATION
-#endif
-
-
-#include <sfx2/dispatch.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
-
-#include "cmdid.h"
-#include "swtypes.hxx"
-#include "insrc.hxx"
-#include "view.hxx"
-#include "table.hrc"
-#include "insrc.hrc"
-
-void SwInsRowColDlg::Apply()
-{
- USHORT nSlot = bColumn ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
- SfxUInt16Item aCountItem( nSlot, static_cast< UINT16 >(aCountEdit.GetValue()) );
- SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, aAfterBtn.IsChecked() );
- rView.GetViewFrame()->GetDispatcher()->Execute( nSlot,
- SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
- &aCountItem, &aAfter, 0L);
-}
-
-
-
-SwInsRowColDlg::SwInsRowColDlg(SwView& rVw, BOOL bCol )
- : SvxStandardDialog( rVw.GetWindow(), SW_RES(DLG_INS_ROW_COL) ),
- aCount( this, SW_RES( FT_COUNT ) ),
- aCountEdit( this, SW_RES( ED_COUNT ) ),
- aInsFL( this, SW_RES( FL_INS ) ),
- aBeforeBtn( this, SW_RES( CB_POS_BEFORE ) ),
- aAfterBtn( this, SW_RES( CB_POS_AFTER ) ),
- aPosFL( this, SW_RES( FL_POS ) ),
- aRow(SW_RES(STR_ROW)),
- aCol(SW_RES(STR_COL)),
- aOKBtn( this, SW_RES( BT_OK ) ),
- aCancelBtn( this, SW_RES( BT_CANCEL ) ),
- aHelpBtn( this, SW_RES( BT_HELP ) ),
- rView(rVw),
- bColumn( bCol )
-{
- FreeResource();
- String aTmp( GetText() );
- if( bColumn )
- {
- aTmp += aCol;
- SetHelpId( FN_TABLE_INSERT_COL_DLG );
- }
- else
- {
- aTmp += aRow;
- SetHelpId( FN_TABLE_INSERT_ROW_DLG );
- }
- SetText( aTmp );
-}
-
-
-
-
diff --git a/sw/source/ui/table/insrc.hrc b/sw/source/ui/table/insrc.hrc
deleted file mode 100644
index 133bcf70c3..0000000000
--- a/sw/source/ui/table/insrc.hrc
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: insrc.hrc,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#define FT_COUNT 1
-#define ED_COUNT 2
-#define FL_INS 3
-
-#define CB_POS_BEFORE 10
-#define CB_POS_AFTER 11
-#define FL_POS 12
-
-#define STR_ROW 20
-#define STR_COL 21
-
-#define BT_OK 100
-#define BT_CANCEL 101
-#define BT_HELP 102
diff --git a/sw/source/ui/table/insrc.src b/sw/source/ui/table/insrc.src
deleted file mode 100644
index 49eda12dc9..0000000000
--- a/sw/source/ui/table/insrc.src
+++ /dev/null
@@ -1,155 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: insrc.src,v $
- * $Revision: 1.32 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "table.hrc"
-#include "insrc.hrc"
-#include "helpid.h"
- // #define DLG_INS_ROW_COL 256
-ModalDialog DLG_INS_ROW_COL
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 136 , 84 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Einfügen : Einf³gen */
- Text [ en-US ] = "Insert" ;
- Moveable = TRUE ;
- OKButton BT_OK
- {
- Pos = MAP_APPFONT ( 80 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BT_CANCEL
- {
- Pos = MAP_APPFONT ( 80 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BT_HELP
- {
- Pos = MAP_APPFONT ( 80 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- RadioButton CB_POS_BEFORE
- {
- Pos = MAP_APPFONT ( 12 , 49 ) ;
- Size = MAP_APPFONT ( 56 , 10 ) ;
- Text [ en-US ] = "~Before" ;
- TabStop = TRUE ;
- };
- RadioButton CB_POS_AFTER
- {
- Pos = MAP_APPFONT ( 12 , 62 ) ;
- Size = MAP_APPFONT ( 56 , 10 ) ;
- Text [ en-US ] = "A~fter" ;
- TabStop = TRUE ;
- Check = TRUE ;
- };
- NumericField ED_COUNT
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 44 , 14 ) ;
- Size = MAP_APPFONT ( 24 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 99 ;
- Value = 1 ;
- First = 1 ;
- Last = 5 ;
- };
- FixedLine FL_INS
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 68 , 8 ) ;
- Text [ en-US ] = "Insert" ;
- };
- FixedLine FL_POS
- {
- Pos = MAP_APPFONT ( 6 , 38 ) ;
- Size = MAP_APPFONT ( 68 , 8 ) ;
- Text [ en-US ] = "Position";
- };
- FixedText FT_COUNT
- {
- Pos = MAP_APPFONT ( 12 , 16 ) ;
- Size = MAP_APPFONT ( 30 , 8 ) ;
- Text [ en-US ] = "~Number" ;
- Left = TRUE ;
- };
- String STR_ROW
- {
- Text [ en-US ] = " Rows" ;
- };
- String STR_COL
- {
- Text [ en-US ] = " Columns" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 9838061807..c6b6be2a11 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -2304,13 +2304,11 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
aDocSz = rSz;
- // die neue Anzahl von Seiten bestimmen
- USHORT nNewCnt = GetViewShell()->GetNumPages();
- if( nNewCnt == mnPageCount )
- return;
+ // --> OD 2009-08-20 #i96726#
+ // Due to the multiple page layout it is needed to trigger recalculation
+ // of the page preview layout, even if the count of pages is not changing.
+ mnPageCount = GetViewShell()->GetNumPages();
- // dann eine neue Startseite berechnen
- mnPageCount = nNewCnt;
if( aVisArea.GetWidth() )
{
ChgPage( SwPagePreViewWin::MV_CALC, TRUE );
@@ -2318,6 +2316,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
aViewWin.Invalidate();
}
+ // <--
}
/*--------------------------------------------------------------------