[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - sw/source
Petr Mladek
pmladek at kemper.freedesktop.org
Fri Jul 8 01:56:38 PDT 2011
sw/source/core/doc/notxtfrm.cxx | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
New commits:
commit c703b311c907b4c97850b5c81ae6a9d3ef47954c
Author: Petr Mladek <pmladek at suse.cz>
Date: Fri Jul 8 10:46:57 2011 +0200
More conservative fix for aliasing problems (fdo#33781)
Inspired by i#99665. It solves the problem where the aliasing caused
problems. It modifies the current aliasing using "byte or" (operator |)
and restores the original aliasing at the end of the "if" block.
Signed-off-by: Roland Baudin <roland65 at free.fr>
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 580000d..15708c7 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#
@@ -953,20 +958,17 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
else if( pOLENd )
{
// Fix for bug fdo#33781
+ const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
{
- pOut->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
- }
+ sal_uInt16 nNewAntialiasingAtOutput = nFormerAntialiasingAtOutput | ANTIALIASING_ENABLE_B2DDRAW;
- // #i99665#
- // Adjust AntiAliasing mode at output device for chart OLE
- const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
- if ( pOLENd->IsChart() &&
- pShell->Imp()->GetDrawView()->IsAntiAliasing() )
- {
- const sal_uInt16 nAntialiasingForChartOLE =
- nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE;
- pOut->SetAntialiasing( nAntialiasingForChartOLE );
+ // #i99665#
+ // Adjust AntiAliasing mode at output device for chart OLE
+ if ( pOLENd->IsChart() )
+ nNewAntialiasingAtOutput |= ANTIALIASING_PIXELSNAPHAIRLINE;
+
+ pOut->SetAntialiasing( nNewAntialiasingAtOutput );
}
// <--
@@ -1012,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 );
- }
- // <--
}
}
commit 262261c39dc68ba7fb8d846fb3dacfa6b4fc98ba
Author: Roland Baudin <roland65 at free.fr>
Date: Fri Jun 17 19:39:55 2011 +0000
Additional fix for bug fdo#33781
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index a5e4f2f..580000d 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -952,6 +952,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
else if( pOLENd )
{
+ // Fix for bug fdo#33781
+ if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
+ {
+ pOut->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
+ }
+
// #i99665#
// Adjust AntiAliasing mode at output device for chart OLE
const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
More information about the Libreoffice-commits
mailing list