summaryrefslogtreecommitdiffstats
path: root/sw/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/docnew.cxx59
-rw-r--r--sw/source/core/doc/notxtfrm.cxx31
-rw-r--r--sw/source/core/docnode/ndcopy.cxx13
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
4 files changed, 60 insertions, 45 deletions
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 85f3b33ae9c9..a7a9a6e0b94b 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -909,39 +909,40 @@ void SwDoc::UpdateLinks( sal_Bool bUI )
{
SfxObjectCreateMode eMode;
sal_uInt16 nLinkMode = getLinkUpdateMode( true );
- sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
- if( GetDocShell() &&
- (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
- GetLinkManager().GetLinks().Count() &&
- SFX_CREATE_MODE_INTERNAL !=
- ( eMode = GetDocShell()->GetCreateMode()) &&
- SFX_CREATE_MODE_ORGANIZER != eMode &&
- SFX_CREATE_MODE_PREVIEW != eMode &&
- !GetDocShell()->IsPreview() )
- {
- ViewShell* pVSh = 0;
- sal_Bool bAskUpdate = nLinkMode == MANUAL;
- sal_Bool bUpdate = sal_True;
- switch(nUpdateDocMode)
- {
- case document::UpdateDocMode::NO_UPDATE: bUpdate = sal_False;break;
- case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; break;
- case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; break;
- }
- if( bUpdate && (bUI || !bAskUpdate) )
+ if ( GetDocShell()) {
+ sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
+ if( (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
+ GetLinkManager().GetLinks().Count() &&
+ SFX_CREATE_MODE_INTERNAL !=
+ ( eMode = GetDocShell()->GetCreateMode()) &&
+ SFX_CREATE_MODE_ORGANIZER != eMode &&
+ SFX_CREATE_MODE_PREVIEW != eMode &&
+ !GetDocShell()->IsPreview() )
{
- SfxMedium* pMedium = GetDocShell()->GetMedium();
- SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : 0;
- Window* pDlgParent = pFrm ? &pFrm->GetWindow() : 0;
- if( GetCurrentViewShell() && !GetEditShell( &pVSh ) && !pVSh ) //swmod 071108//swmod 071225
+ ViewShell* pVSh = 0;
+ sal_Bool bAskUpdate = nLinkMode == MANUAL;
+ sal_Bool bUpdate = sal_True;
+ switch(nUpdateDocMode)
{
- ViewShell aVSh( *this, 0, 0 );
+ case document::UpdateDocMode::NO_UPDATE: bUpdate = sal_False;break;
+ case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; break;
+ case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; break;
+ }
+ if( bUpdate && (bUI || !bAskUpdate) )
+ {
+ SfxMedium* pMedium = GetDocShell()->GetMedium();
+ SfxFrame* pFrm = pMedium ? pMedium->GetLoadTargetFrame() : 0;
+ Window* pDlgParent = pFrm ? &pFrm->GetWindow() : 0;
+ if( GetCurrentViewShell() && !GetEditShell( &pVSh ) && !pVSh ) //swmod 071108//swmod 071225
+ {
+ ViewShell aVSh( *this, 0, 0 );
- SET_CURR_SHELL( &aVSh );
- GetLinkManager().UpdateAllLinks( bAskUpdate , sal_True, sal_False, pDlgParent );
+ SET_CURR_SHELL( &aVSh );
+ GetLinkManager().UpdateAllLinks( bAskUpdate , sal_True, sal_False, pDlgParent );
+ }
+ else
+ GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
}
- else
- GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
}
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index fb8355880843..4d707dfd7f4f 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -819,9 +819,10 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( pGrfNd )
{
// Fix for bug fdo#33781
+ const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
{
- pOut->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+ pOut->SetAntialiasing( nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW );
}
sal_Bool bForceSwap = sal_False, bContinue = sal_True;
@@ -938,8 +939,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( bSwapped && bPrn )
bForceSwap = sal_True;
}
+
if( bForceSwap )
pGrfNd->SwapOut();
+
+ if ( pShell->Imp()->GetDrawView()->IsAntiAliasing() )
+ pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
}
else if( bIsChart
//charts must be painted resolution dependent!! #i82893#, #i75867#
@@ -952,15 +957,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
else if( pOLENd )
{
- // #i99665#
- // Adjust AntiAliasing mode at output device for chart OLE
+ // Fix for bug fdo#33781
const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
- if ( pOLENd->IsChart() &&
- pShell->Imp()->GetDrawView()->IsAntiAliasing() )
+ if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
{
- const sal_uInt16 nAntialiasingForChartOLE =
- nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE;
- pOut->SetAntialiasing( nAntialiasingForChartOLE );
+ sal_uInt16 nNewAntialiasingAtOutput = nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW;
+
+ // #i99665#
+ // Adjust AntiAliasing mode at output device for chart OLE
+ if ( pOLENd->IsChart() )
+ nNewAntialiasingAtOutput |= ANTIALIASING_PIXELSNAPHAIRLINE;
+
+ pOut->SetAntialiasing( nNewAntialiasingAtOutput );
}
// <--
@@ -1006,13 +1014,8 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
((SwFEShell*)pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm());
}
- // #i99665#
- if ( pOLENd->IsChart() &&
- pShell->Imp()->GetDrawView()->IsAntiAliasing() )
- {
+ if ( pShell->Imp()->GetDrawView()->IsAntiAliasing() )
pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
- }
- // <--
}
}
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 090c9654b501..d9e9a4977794 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -186,14 +186,25 @@ namespace
// Explicitly try to get exactly the same name as in the source
// because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
+
+ // copying additional attributes for bookmarks or fieldmarks
::sw::mark::IBookmark* const pNewBookmark =
dynamic_cast< ::sw::mark::IBookmark* const >(pNewMark);
- if(pNewBookmark) /* copying additional attributes for bookmarks */
+ if(pNewBookmark)
{
const ::sw::mark::IBookmark* const pOldBookmark = dynamic_cast< const ::sw::mark::IBookmark* >(pMark);
pNewBookmark->SetKeyCode(pOldBookmark->GetKeyCode());
pNewBookmark->SetShortName(pOldBookmark->GetShortName());
}
+ ::sw::mark::IFieldmark* const pNewFieldmark =
+ dynamic_cast< ::sw::mark::IFieldmark* const >(pNewMark);
+ if(pNewFieldmark)
+ {
+ const ::sw::mark::IFieldmark* const pOldFieldmark = dynamic_cast< const ::sw::mark::IFieldmark* >(pMark);
+ pNewFieldmark->SetFieldname(pOldFieldmark->GetFieldname());
+ pNewFieldmark->SetFieldHelptext(pOldFieldmark->GetFieldHelptext());
+ }
+
::sfx2::Metadatable const*const pMetadatable(
dynamic_cast< ::sfx2::Metadatable const* >(pMark));
::sfx2::Metadatable *const pNewMetadatable(
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 608ecb57ddd5..61b3a0504a96 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2701,7 +2701,7 @@ void SwPageFrm::UpdateFtnNum()
SwPageFrm* pPage = pTmpBoss->FindPageFrm();
pFtn = NULL;
lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
- SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
+ SwFtnContFrm *pCont = pTmpBoss ? pTmpBoss->FindNearestFtnCont() : NULL;
if ( pCont )
pFtn = (SwFtnFrm*)pCont->Lower();
}