From 6fc008011e1339681388687833a20c192ef6f938 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 30 Nov 2010 02:16:19 +0100 Subject: Avoid antialiasing for drag rect Fix for fdo#31860 - slide dragging gets horrendously slow on Linux, due to excessive antialiased repaints. Visual difference: zero, no sub-pixel coordinates used. --- sd/source/ui/slidesorter/view/SlsViewOverlay.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sd') diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx index 2ea1b7e74f35..2e22e85803f6 100644 --- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx @@ -201,6 +201,7 @@ SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay) maPosition(0,0), maShapes() { + allowAntiAliase(false); } -- cgit From 07987129c5ca74dfa96e8f483053a482e9111cfb Mon Sep 17 00:00:00 2001 From: camille Date: Mon, 13 Dec 2010 18:30:39 +0100 Subject: Grey as default color for native tables in Impress Default color for native tables in Impress is blue. Most people I heard from are unhappy with it, because it doesn't match the corporate colors, and it's not neutral. To make it worse, if you change the color of the whole table (to white for instance) and insert a new line, it's blue again because it doesn't inherit from the row above. The colors are hardcoded, and, AFAIKT, can't be overriden by a configuration extension. IBM's Symphony has changed this default to white with black borders, which confirms my impression that there is a problem indeed with blue by default. Signed-off-by: Thorsten Behrens --- sd/source/core/drawdoc4.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sd') diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 22270930ed28..ee03c551aec8 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -662,11 +662,11 @@ void SdDrawDocument::CreateDefaultCellStyles() // ---- default -------------------------------------------------- - Any aBlue1( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue1") ), aDefaultCellStyleName, RGB_COLORDATA(153,204,255))); - Any aBlue2( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue2") ), aDefaultCellStyleName, RGB_COLORDATA(0,153,255))); - Any aBlue3( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue3") ), aDefaultCellStyleName, RGB_COLORDATA(0,102,204))); + Any aGray1( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("gray1") ), aDefaultCellStyleName, RGB_COLORDATA(230,230,230))); + Any aGray2( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("gray2") ), aDefaultCellStyleName, RGB_COLORDATA(204,204,204))); + Any aGray3( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("gray3") ), aDefaultCellStyleName, RGB_COLORDATA(179,179,179))); - implCreateTableTemplate( xTableFamily, OUString(RTL_CONSTASCII_USTRINGPARAM("default")), aBlue1, aBlue3, aBlue2 ); + implCreateTableTemplate( xTableFamily, OUString(RTL_CONSTASCII_USTRINGPARAM("default") ), aGray1, aGray3, aGray2 ); // ---- BW ------------------------------------------------ @@ -694,11 +694,11 @@ void SdDrawDocument::CreateDefaultCellStyles() // ---- Gray ------------------------------------------------ - Any aGray1( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("gray1") ), aDefaultCellStyleName, RGB_COLORDATA(230,230,230))); - Any aGray2( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("gray2") ), aDefaultCellStyleName, RGB_COLORDATA(204,204,204))); - Any aGray3( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("gray3") ), aDefaultCellStyleName, RGB_COLORDATA(179,179,179))); + Any aBlue1( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue1") ), aDefaultCellStyleName, RGB_COLORDATA(153,204,255))); + Any aBlue2( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue2") ), aDefaultCellStyleName, RGB_COLORDATA(0,153,255))); + Any aBlue3( implMakeSolidCellStyle( pSSPool, OUString( RTL_CONSTASCII_USTRINGPARAM("blue3") ), aDefaultCellStyleName, RGB_COLORDATA(0,102,204))); - implCreateTableTemplate( xTableFamily, OUString(RTL_CONSTASCII_USTRINGPARAM("gray") ), aGray1, aGray3, aGray2 ); + implCreateTableTemplate( xTableFamily, OUString(RTL_CONSTASCII_USTRINGPARAM("blue")), aBlue1, aBlue3, aBlue2 ); // ---- Sun ------------------------------------------------ -- cgit From 2a8043bab8bcade9b4366598cf25219f9307527f Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Sun, 5 Dec 2010 11:40:40 +0100 Subject: impress206: fixed compiler warning(cherry picked from commit 8df4a00b9bc1739289e45d9f4485f355298a35eb) --- sd/source/filter/eppt/epptso.cxx | 4 ++-- sd/source/filter/ppt/propread.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 91f0ae42d15a..2b7635307661 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -3063,7 +3063,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a continue; } else if ( ( mType == "drawing.OLE2" ) || ( mType == "presentation.OLE2" ) - || ( mType == "presentation.Chart" ) || ( mType == "presentation.Table" ) + || ( mType == "presentation.Chart" ) || ( mType == "presentation.Calc" ) || ( mType == "presentation.OrgChart" ) ) { mpPptEscherEx->OpenContainer( ESCHER_SpContainer ); @@ -3253,7 +3253,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a } } } - else if ( mType == "drawing.Table" ) + else if ( (mType == "drawing.Table") || (mType == "presentation.Table") ) { SvMemoryStream* pTmp = NULL; if ( bEffect && !mbUseNewAnimations ) diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index ebc54c117c2f..e711263291c8 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -100,7 +100,7 @@ static xub_StrLen lcl_getMaxSafeStrLen(sal_uInt32 nSize) if (nSize > STRING_MAXLEN) nSize = STRING_MAXLEN; - return nSize; + return static_cast< xub_StrLen >( nSize ); } BOOL PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign ) -- cgit From 5ba86b4ab27fe4d3b07c2535576eec655558d2d3 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Mon, 6 Dec 2010 13:51:25 +0100 Subject: impress206: #i115898# use updated anchor for group shapes to work around ms office 2010 bug(cherry picked from commit 7736d7e159d0e69ee817def98fefdb216f711ca3) --- sd/source/filter/eppt/epptso.cxx | 19 ++++++++++++------- sd/source/filter/eppt/escherex.cxx | 18 +++++++++++++++--- 2 files changed, 27 insertions(+), 10 deletions(-) mode change 100644 => 100755 sd/source/filter/eppt/escherex.cxx (limited to 'sd') diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 2b7635307661..55f143ee9849 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -3442,7 +3442,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a ImplFlipBoundingBox( aPropOpt ); aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); - mpPptEscherEx->AddClientAnchor( maRect ); + if ( GetCurrentGroupLevel() > 0 ) + mpPptEscherEx->AddChildAnchor( maRect ); + else + mpPptEscherEx->AddClientAnchor( maRect ); if ( pClientData ) { @@ -3512,7 +3515,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a aPropOpt.CreateShapeProperties( mXShape ); aPropOpt.Commit( *mpStrm ); - mpPptEscherEx->AddClientAnchor( maRect ); + if ( GetCurrentGroupLevel() > 0 ) + mpPptEscherEx->AddChildAnchor( maRect ); + else + mpPptEscherEx->AddClientAnchor( maRect ); *mpStrm << (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf ) << (sal_uInt32)pClientTextBox->Tell(); @@ -3659,11 +3665,10 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc aPropOpt.CreateShapeProperties( rXShape ); aPropOpt.Commit( *mpStrm ); aPropOpt2.Commit( *mpStrm, 3, ESCHER_UDefProp ); - mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor ); - *mpStrm << (sal_Int16)maRect.Top() - << (sal_Int16)maRect.Left() - << (sal_Int16)( maRect.GetWidth() + maRect.Left() ) - << (sal_Int16)( maRect.GetHeight() + maRect.Top() ); + if ( GetCurrentGroupLevel() > 0 ) + mpPptEscherEx->AddChildAnchor( maRect ); + else + mpPptEscherEx->AddClientAnchor( maRect ); mpPptEscherEx->CloseContainer(); uno::Reference< table::XCellRange > xCellRange( xTable, uno::UNO_QUERY_THROW ); diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx old mode 100644 new mode 100755 index 2cbde24ebeb9..c40cf5043038 --- a/sd/source/filter/eppt/escherex.cxx +++ b/sd/source/filter/eppt/escherex.cxx @@ -269,9 +269,21 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie else { AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId ); // Flags: Group | HaveAnchor - AddAtom( 8, ESCHER_ClientAnchor ); - PtReplaceOrInsert( ESCHER_Persist_Grouping_Logic | mnGroupLevel, mpOutStrm->Tell() ); - *mpOutStrm << (INT16)aRect.Top() << (INT16)aRect.Left() << (INT16)aRect.Right() << (INT16)aRect.Bottom(); + if ( mnGroupLevel == 1 ) + { + AddAtom( 8, ESCHER_ClientAnchor ); + PtReplaceOrInsert( ESCHER_Persist_Grouping_Logic | mnGroupLevel, mpOutStrm->Tell() ); + *mpOutStrm << (INT16)aRect.Top() << (INT16)aRect.Left() << (INT16)aRect.Right() << (INT16)aRect.Bottom(); + } + else + { + AddAtom( 16, ESCHER_ChildAnchor ); + PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel, mpOutStrm->Tell() ); + *mpOutStrm << (sal_Int32)aRect.Left() + << (sal_Int32)aRect.Top() + << (sal_Int32)aRect.Right() + << (sal_Int32)aRect.Bottom(); + } } if ( pClientData ) { -- cgit From b853aa1b54cc3290ee7cb13014ff8d481f312f47 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Wed, 8 Dec 2010 14:39:25 +0100 Subject: impress207: #i115993# do not insert objects as presentation objects on master pages(cherry picked from commit 056b298538918df97390c645a1a0fb690a89468e) --- sd/source/ui/view/sdview4.cxx | 3 ++- sd/source/ui/view/sdview5.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index c649f4d958a6..0ef9417fed4e 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -100,6 +100,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, SdrGrafObj* pNewGrafObj = NULL; SdrPageView* pPV = GetSdrPageView(); SdrObject* pPickObj = pObj; + const bool bOnMaster = pPV && pPV->GetPage() && pPV->GetPage()->IsMasterPage(); if(pPV && this->ISA(::sd::slidesorter::view::SlideSorterView)) { @@ -116,7 +117,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, if( mnAction == DND_ACTION_LINK && pPickObj && pPV ) { const bool bIsGraphic = pPickObj->ISA( SdrGrafObj ); - if( bIsGraphic || pObj->IsEmptyPresObj() ) + if( bIsGraphic || (pObj->IsEmptyPresObj() && !bOnMaster) ) { if( IsUndoEnabled() ) BegUndo(String(SdResId(STR_INSERTGRAPHIC))); diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx index 2cc5ccad7c4b..c28d2c5658cf 100644 --- a/sd/source/ui/view/sdview5.cxx +++ b/sd/source/ui/view/sdview5.cxx @@ -61,7 +61,7 @@ SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind ) if( pPV ) { SdPage* pPage = static_cast< SdPage* >( pPV->GetPage() ); - if( pPage ) + if( pPage && !pPage->IsMasterPage() ) { // first try selected shape if ( AreObjectsMarked() ) -- cgit From b333904b8d0bf5c201935e3ce6105622995695a7 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 15 Dec 2010 10:04:00 +0100 Subject: This surely shouldn't need executable flag --- sd/source/filter/eppt/escherex.cxx | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 sd/source/filter/eppt/escherex.cxx (limited to 'sd') diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx old mode 100755 new mode 100644 -- cgit