[Libreoffice-commits] .: 2 commits - svx/source sw/source
svx/source/tbxctrls/linectrl.cxx |4 ++-- svx/source/tbxctrls/tbcontrl.cxx |6 +++--- sw/source/filter/ww8/ww8par.hxx |1 + sw/source/filter/ww8/ww8par6.cxx | 19 ++- 4 files changed, 20 insertions(+), 10 deletions(-) New commits: commit a482b89e4d9c41b6f7c1616d193ac6cde05a69a7 Author: Caolán McNamara Date: Mon Apr 2 20:57:02 2012 +0100 Resolves: fdo#48096 torn off popups trigger keyboard focus problems diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index c81177e..ccc047c 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -379,7 +379,7 @@ SvxLineEndWindow::SvxLineEndWindow( const String& rWndTitle ) : SfxPopupWindow( nSlotId, rFrame, -WinBits( WB_STDPOPUP ) ), +WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ), aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), nCols ( 2 ), nLines ( 12 ), @@ -400,7 +400,7 @@ SvxLineEndWindow::SvxLineEndWindow( SfxPopupWindow( nSlotId, rFrame, pParentWindow, -WinBits( WB_STDPOPUP ) ), +WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ), aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), nCols ( 2 ), nLines ( 12 ), diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index cb56fac..f9f25a8 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -822,7 +822,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, Window* pParentWindow, const ::Color rLastColor ) : -SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ), +SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ), theSlotId( nSlotId ), aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ), @@ -1049,7 +1049,7 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : -SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ), +SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ), aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), bParagraphMode(sal_False) @@ -1326,7 +1326,7 @@ Color lcl_mediumColor( Color aMain, Color /*aDefault*/ ) SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : -SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_AUTOSIZE ) ), +SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION | WB_AUTOSIZE ) ), m_aLineStyleLb( this ) { try commit b89e0c5b56e50ff62d0e5defdf9fe92620cc877a Author: Caolán McNamara Date: Mon Apr 2 16:56:54 2012 +0100 split out ContextualSpacing diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index b86c5b6..7b4ec8e 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1588,6 +1588,7 @@ public: // eigentlich private, geht aber leider nur public void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen ); void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen); void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen); +void Read_ParaContextualSpacing( sal_uInt16 nId, const sal_uInt8* pData, short nLen ); void Read_LineSpace(sal_uInt16, const sal_uInt8*, short nLen ); void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen); void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 65cea9d..33baeb7 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4177,7 +4177,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_UL_SPACE ); return; } -short nPara = ((nId == 0x246D) ? SVBT16ToShort( pData ) : (0 != *pData)); +short nPara = SVBT16ToShort( pData ); if( nPara < 0 ) nPara = -nPara; @@ -4195,9 +4195,6 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe case 0xA414: aUL.SetLower( nPara ); break; -case 0x246D: -aUL.SetContextValue( nPara ); -
[Libreoffice-commits] .: 2 commits - svx/source tools/inc tools/source
svx/source/customshapes/EnhancedCustomShape2d.cxx |6 +++--- tools/inc/tools/poly.hxx |3 ++- tools/source/generic/poly.cxx |5 - 3 files changed, 9 insertions(+), 5 deletions(-) New commits: commit 1e47b40c79ddb1d3d16d1521a5d8b5960cd37661 Author: Radek Doulik Date: Thu Jan 12 11:07:51 2012 +0100 fix ooxml custom shapes with 360 degree arcs diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 948fff5..ee8a365 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1407,7 +1407,7 @@ void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274 pObj->SetMergedItem( aLineEndCenter ); } -basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, const sal_Bool bClockwise ) +basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, const sal_Bool bClockwise, sal_Bool bFullCircle = sal_False ) { Rectangle aRect( rRect ); Point aStart( rStart ); @@ -1430,7 +1430,7 @@ basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStart, cons } } -Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC ); +Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle ); basegfx::B2DPolygon aRetval; if ( bClockwise ) @@ -1757,7 +1757,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm OSL_TRACE("ARCANGLETO rect: %d, %d x %d, %d start: %d, %d end: %d, %d clockwise: %d", aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom(), aStartPoint.X(), aStartPoint.Y(), aEndPoint.X(), aEndPoint.Y(), bClockwise); -aNewB2DPolygon.append(CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise)); +aNewB2DPolygon.append(CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint && fSwingAngle > F_PI)); } rSrcPt += 2; commit 72c50c235447f293a3772105fdfdd4f45d09ff9e Author: Radek Doulik Date: Thu Jan 12 11:06:11 2012 +0100 make it possible to create 360 degrees arc (circle) diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index 5923266..480b357 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -140,7 +140,8 @@ public: sal_uInt16 nPoints = 0 ); Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, - PolyStyle ePolyStyle = POLY_ARC ); + PolyStyle ePolyStyle = POLY_ARC, + sal_Bool bWholeCircle = sal_False ); Polygon( const Point& rBezPt1, const Point& rCtrlPt1, const Point& rBezPt2, const Point& rCtrlPt2, sal_uInt16 nPoints = 0 ); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index fa2d1f5..8c64a9f 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -510,7 +510,7 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoin // --- Polygon::Polygon( const Rectangle& rBound, - const Point& rStart, const Point& rEnd, PolyStyle eStyle ) + const Point& rStart, const Point& rEnd, PolyStyle eStyle, sal_Bool bFullCircle ) { DBG_CTOR( Polygon, NULL ); @@ -547,6 +547,9 @@ Polygon::Polygon( const Rectangle& rBound, if( fDiff < 0. ) fDiff += F_2PI; +if ( bFullCircle ) +fDiff = F_2PI; + // Punktanzahl proportional verkleinern ( fDiff / (2PI) ); // ist eingentlich nur fuer einen Kreis richtig; wir // machen es hier aber trotzdem ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - svx/source writerfilter/source
svx/source/unodraw/unoshape.cxx|5 - writerfilter/source/filter/RtfFilter.cxx |7 ++- writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +- 3 files changed, 11 insertions(+), 3 deletions(-) New commits: commit e846db644868651556b38f91737b81c43f3c4f3c Author: Cédric Bosdonnat Date: Wed Nov 23 11:22:28 2011 +0100 RTF: OLE object import with graphic result fixed, the file can now be opened diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 2a46fb0..2e31bc7 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -597,7 +597,7 @@ int RTFDocumentImpl::resolvePict(bool bInline) m_xContext), uno::UNO_QUERY_THROW); uno::Reference xGraphic = xGraphicProvider->queryGraphic(aMediaProperties); - xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap")), uno::Any(xGraphic)); + xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Graphic")), uno::Any(xGraphic)); RTFValue::Pointer_t pShapeValue(new RTFValue(xShape)); m_aObjectAttributes->push_back(make_pair(NS_ooxml::LN_shape, pShapeValue)); commit a45c82f930c1224928fd0a8f9ca3690ddd162366 Author: Cédric Bosdonnat Date: Tue Nov 22 18:01:32 2011 +0100 Show some exception message when getting one in RtfFilter diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e3bfaf3..b676551 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1720,7 +1720,10 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const throw beans::UnknownPropertyException(); if( (pMap->nFlags & beans::PropertyAttribute::READONLY ) != 0 ) -throw beans::PropertyVetoException(); +throw beans::PropertyVetoException( rtl::OUString::createFromAscii( +OSL_FORMAT( "Readonly property can't be set: %s", +rtl::OUStringToOString( rPropertyName, RTL_TEXTENCODING_UTF8 ).getStr() ) ), +uno::Reference< drawing::XShape >( this ) ); mpModel->SetChanged(); diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 4b214ab..8786539 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -99,8 +99,13 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri #endif return sal_True; } -catch (const uno::Exception&) +catch (const uno::Exception& e) { +#if OSL_DEBUG_LEVEL > 1 +OSL_TRACE( "Exception caught: %s", +rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); +#endif +(void)e; return sal_False; } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - svx/source
svx/source/unodraw/UnoGraphicExporter.cxx | 84 -- 1 file changed, 36 insertions(+), 48 deletions(-) New commits: commit da5ec5d1e0823cf53f3f70c074cd3d314b89d4e3 Author: Ivan Timofeev Date: Mon Nov 7 09:01:50 2011 +0400 use boost::scoped_ptr diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 0b60214..c0b66a4 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -724,15 +724,14 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, Size aNewSize; // create a view -SdrView*pView; - +boost::scoped_ptr< SdrView > pView; if( PTR_CAST( FmFormModel, mpDoc ) ) { -pView = new FmFormView( PTR_CAST( FmFormModel, mpDoc ), &aVDev ); +pView.reset(new FmFormView( PTR_CAST( FmFormModel, mpDoc ), &aVDev )); } else { -pView = new SdrView( mpDoc, &aVDev ); +pView.reset(new SdrView( mpDoc, &aVDev )); } pView->SetBordVisible( sal_False ); @@ -773,7 +772,6 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, aGraphic = Graphic(aMtf); pView->HideSdrPage(); -delete pView; if( rSettings.mbTranslucent ) { commit bc858110c2c8c7292a19ed849fd190b2d4aad0b7 Author: Ivan Timofeev Date: Mon Nov 7 08:57:49 2011 +0400 cppcheck: drop redundant check diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 956773a..0b60214 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -739,51 +739,41 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, pView->SetPageVisible( sal_False ); pView->ShowSdrPage( pPage ); -if ( pView && pPage ) -{ -pView->SetBordVisible( sal_False ); -pView->SetPageVisible( sal_False ); -pView->ShowSdrPage( pPage ); - -const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() ); -aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(), - aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() ); -const Rectangle aClipRect( aNewOrg, aNewSize ); -MapMode aVMap( aMap ); - -aVDev.Push(); -aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) ); -aVDev.SetRelativeMapMode( aVMap ); -aVDev.IntersectClipRegion( aClipRect ); - -// Use new StandardCheckVisisbilityRedirector -ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage ); - -pView->CompleteRedraw(&aVDev, Region(Rectangle(Point(), aNewSize)), &aRedirector); - -aVDev.Pop(); - -aMtf.Stop(); -aMtf.WindStart(); -aMtf.SetPrefMapMode( aMap ); -aMtf.SetPrefSize( aNewSize ); - -// AW: Here the current version was filtering out the META_CLIPREGION_ACTIONs -// from the metafile. I asked some other developers why this was done, but no -// one knew a direct reason. Since it's in for long time, it may be an old -// piece of code. MetaFiles save and load ClipRegions with polygons with preserving -// the polygons, so a resolution-indepent roundtrip is supported. Removed this -// code since it destroys some MetaFiles where ClipRegions are used. Anyways, -// just filtering them out is a hack, at least the encapsulated content would need -// to be clipped geometrically. -aGraphic = Graphic(aMtf); -} - -if ( pView ) -{ -pView->HideSdrPage(); -delete pView; -} +const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() ); +aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(), + aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() ); +const Rectangle aClipRect( aNewOrg, aNewSize ); +MapMode aVMap( aMap ); + +aVDev.Push(); +aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) ); +
[Libreoffice-commits] .: 2 commits - svx/source
svx/source/fmcomp/fmgridif.cxx | 63 - 1 file changed, 31 insertions(+), 32 deletions(-) New commits: commit 3a183d773f837a57671377a22808f66b2ff535ca Author: Lionel Elie Mamane Date: Tue Nov 1 08:04:28 2011 +0100 translate comments diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 1240562..1367c9f 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -527,8 +527,8 @@ void SAL_CALL FmXGridControl::createPeer(const Reference< ::com::sun::star::awt: if (!getPeer().is()) { mbCreatingPeer = sal_True; -// mbCreatingPeer is virtually the same as m_nPeerCreationLevel, but it's the base class' method -// to prevent recursion. +// mbCreatingPeer is virtually the same as m_nPeerCreationLevel, but it's the base class' method +// to prevent recursion. Window* pParentWin = NULL; if (rParentPeer.is()) @@ -542,19 +542,17 @@ void SAL_CALL FmXGridControl::createPeer(const Reference< ::com::sun::star::awt: DBG_ASSERT(pPeer != NULL, "FmXGridControl::createPeer : imp_CreatePeer didn't return a peer !"); setPeer( pPeer ); -// lesen der properties aus dem model +// reading the properties from the model // ++m_nPeerCreationLevel; updateFromModel(); -// folgendes unschoene Szenario : updateFromModel fuehrt zu einem propertiesChanged am Control, -// das stellt fest, dass sich eine 'kritische' Property geaendert hat (zum Beispiel "Border") und -// legt daraufhin eine neue Peer an, was wieder hier im createPeer landet, wir legen also eine -// zweite FmXGridPeer an und initialisieren die. Dann kommen wir in der ersten Inkarnation aus -// dem updsateFromModel raus und arbeiten dort weiter mit dem pPeer, das jetzt eigentlich schon -// veraltet ist (da ja in der zweiten Inkarnation eine andere Peer angelegt wurde). -// Deswegen also der Aufwand mit dem PeerCreationLevel, das stellt sicher, dass wir die in dem -// tiefsten Level angelegte Peer wirklich verwenden, sie aber erst im top-level -// initialisieren. +// consider the following ugly scenario: updateFromModel leads to a propertiesChanges on the Control, +// which determines, dat a "critical" property has changed (e.g. "Border") and therefore starts a new +// Peer, which lands again here in createPeerm we also start a second FmXGridPeer and initialise it. +// Then we exit from the first incarnation's updateFromModel and continue working with the pPeer, +// that is in fact now already obsolete (as another peer is being started in the second incarnation). +// Therefore the effort with the PeerCreationLevel, which ensures that we really use the Peer +// created at the deepest level, but first initialise it in the top-level. // if (--m_nPeerCreationLevel == 0) { DBG_ASSERT(getPeer().is(), "FmXGridControl::createPeer : something went wrong ... no top level peer !"); @@ -601,9 +599,9 @@ void SAL_CALL FmXGridControl::createPeer(const Reference< ::com::sun::star::awt: // forward the design mode sal_Bool bForceAlivePeer = m_bInDraw && !maComponentInfos.bVisible; -// (we force a alive-mode peer if we're in "draw", cause in this case the peer will be used for drawing in -// foreign devices. We ensure this with the visibility check as an living peer is assumed to be noncritical -// only if invisible) +// (we force an alive-mode peer if we're in "draw", cause in this case the peer will be used for drawing in +// foreign devices. We ensure this with the visibility check as an living peer is assumed to be noncritical +// only if invisible) Any aOldCursorBookmark; if (!mbDesignMode || bForceAlivePeer) { @@ -1145,7 +1143,7 @@ FmXGridPeer::FmXGridPeer(const Reference< XMultiServiceFactory >& _rxFactory) ,m_pGridListener(NULL) ,m_xServiceFactory(_rxFactory) { -// nach diesem Constructor muss Create gerufen werden ! +// Create must be called after this constructure m_pGridListener = new GridListenerDelegator( this ); } @@ -1167,7 +1165,7 @@ void FmXGridPeer::Create(Window* pParent, WinBits nStyle) // want to hear about row selections pWin->setGridListener( m_pGridListener ); -// Init muß immer aufgerufen werden +// Init must always be called pWin->Init(); pWin->SetComponentInterface(this); @@ -1392,7 +1390,7 @@ Sequence< Any > SAL_CALL FmXGridPeer::queryFieldData( sal_Int32 nRow, const Type DbGridRowRef xPaintRow = pGrid->GetPaintRow(); ENSURE_OR_THROW( xPaintRow.Is(), "invalid paint row" ); -// die Columns des Controls brauche ich fuer GetF