[Libreoffice-commits] core.git: Changes to 'refs/changes/54/2754/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/51/2751/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/51/2751/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/54/2754/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/50/2750/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/39/2839/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/52/2752/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/49/2749/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/00/600/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/52/2752/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/49/2749/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/52/2752/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/53/2753/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/53/2753/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/tags/distro/suse/suse-3-6'
Tag 'distro/suse/suse-3-6' created by Andras Timar ati...@suse.com at 2012-10-16 01:12 -0700 SUSE 3.6-0 Changes since libreoffice-3.6.2.2-136: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: avmedia/README canvas/README cppcanvas/README oox/README sd/README slideshow/README vcl/README
avmedia/README | 17 - canvas/README| 20 + cppcanvas/README |4 + oox/README | 185 +++ sd/README| 19 + slideshow/README |9 ++ vcl/README | 65 +++ 7 files changed, 318 insertions(+), 1 deletion(-) New commits: commit 4a9a2c0ed10608d1afcaebaf8bd25059b7a3f4be Author: Radek Doulik r...@novell.com Date: Mon Jul 8 18:56:33 2013 +0200 Turn Radek's notes into README files. Change-Id: I904142622ac37b394ddedf62bb7d9c099fc9cab4 diff --git a/avmedia/README b/avmedia/README index ad8120b..32155b2 100644 --- a/avmedia/README +++ b/avmedia/README @@ -7,4 +7,19 @@ streaming has to be wrapped around it via temp files. Also provides (in source/framework/mediacontrol.cxx) an implementation of the graphical media playback control that appears in the toolbar / mediaobject bar when media is selected under the .uno:AVMediaToolBox -item. \ No newline at end of file +item. + +== avmedia/gstreamer == + +The avmedia component is implementation of manager service defined in +offapi/com/sun/star/media/. Radek has added implementation based on +gstreamer so that we can add audio and video files into impress +presentation on Linux with gstreamer. + +The implementation is pretty straightforward, sometimes it has +problems when gstreamer installation is incomplete. + +In the beginning the media files were not embedded, Thorsten added +support for that later. + +FUTURE work: it might be worthwhile to revamp the avmedia UI diff --git a/canvas/README b/canvas/README index 0110f5a..2fb141c 100644 --- a/canvas/README +++ b/canvas/README @@ -24,3 +24,23 @@ presentation framework with a fully independent UNO component, and it is based on the canvas. Some features used there are only available from canvas, like double-buffering, and hardware-accelerated alpha-blending (currently not on all platforms). + +== Cairo canvas == + +cairo canvas is one of backends of canvas component. canvas is mostly +used for slideshow rendering and also for emf+ rendering. we hoped it +will even be used by drawing layer, but it didn't happen (yet?) for +API look at offapi/com/sun/star/rendering/, the implementation is in +canvas and cppcanvas modules. + +cairo canvas backend uses cairo library for rendering. main advantage +is support of alpha transparency and in some cases accelerated +rendering. + +the backend itself is quite old and stable, not many changes in that +area lately, mostly changes for emf+ rendering, communication with +vcl and bugfixes + +FUTURE work: look at cairo canvas and situation when it is used +(mostly slideshow). TODO there still might be more cases when we +can save some roundtrips when exchanging data with vcl. diff --git a/cppcanvas/README b/cppcanvas/README index 246cb2d..1e90831 100644 --- a/cppcanvas/README +++ b/cppcanvas/README @@ -1 +1,5 @@ Helper C++ classes for [[canvas]], plus a GDIMetaFile-to-XCanvas converter. + +== EMF+ == + +For cppcanvas/source/mtfrenderer, see the README in vcl (the EMF+ part). diff --git a/oox/README b/oox/README index 43b60bd..a1972fa 100644 --- a/oox/README +++ b/oox/README @@ -2,3 +2,188 @@ Support for Office Open XML, the office XML-format designed by Microsoft. See also: [http://wiki.services.openoffice.org/wiki/OOX] + +== DrawingML Custom shapes and presets == + +custom shapes are part of DrawingML and are different to binary ppt +and VML in older formats, so we needed to add new code to work with +these. the import happens in oox/source/drawingml, where they are +imported as LO's enhanced custom shape's. see +offapi/com/sun/star/drawing/CustomShape.idl and +offapi/com/sun/star/drawing/EnhancedCustomShape*.idl + +the export is quite behind now, as it was done before we started work +on fully supporting drawingml custom shapes. (see FUTURE WORK below) + +example of drawingml preset: + + a:prstGeom prst=star5 + a:avLst/ + /a:prstGeom + +example of drawingml custom shape (equal to star5 preset): + + avLst xmlns=http://schemas.openxmlformats.org/drawingml/2006/main; + gd name=adj fmla=val 19098 / + gd name=hf fmla=val 105146 / + gd name=vf fmla=val 110557 / + /avLst + gdLst xmlns=http://schemas.openxmlformats.org/drawingml/2006/main; + gd name=a fmla=pin 0 adj 5 / + gd name=swd2 fmla=*/ wd2 hf 10 / + gd name=shd2 fmla=*/ hd2 vf 10 / + gd name=svc fmla=*/ vc vf 10 / + gd name=dx1 fmla=cos swd2 108 / + gd name=dx2 fmla=cos swd2 1836 / + gd name=dy1 fmla=sin shd2 108 / + gd name=dy2 fmla=sin shd2 1836 / + gd name=x1 fmla=+- hc 0 dx1 / + gd name=x2 fmla=+- hc 0 dx2 / + gd name=x3 fmla=+- hc dx2 0 / + gd name=x4 fmla=+- hc dx1 0 / + gd name=y1 fmla=+- svc 0 dy1 / + gd name=y2 fmla=+- svc 0 dy2 / + gd name=iwd2 fmla=*/ swd2 a 5 / + gd name=ihd2 fmla=*/ shd2 a 5 / + gd name=sdx1 fmla=cos iwd2 2052
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - vcl/inc vcl/source
vcl/inc/vcl/gdimtf.hxx |2 +- vcl/source/gdi/gdimtf.cxx | 15 +-- vcl/source/gdi/pdfwriter_impl2.cxx |2 +- 3 files changed, 11 insertions(+), 8 deletions(-) New commits: commit 3553fa71b695c6c354872a77747ac4eb4bbff364 Author: Radek Doulik r...@novell.com Date: Mon Apr 29 00:00:00 2013 +0200 Fix bnc#795857 Use correct sizes for EMF+ bitmap rendering Fix pdf export wrong size issues for embedded EMF+ images. (cherry picked from commit 4c676625d4016d428e9becd5512b7cfc8b0c4b24) Conflicts: vcl/inc/vcl/gdimtf.hxx vcl/source/gdi/gdimtf.cxx Signed-off-by: Michael Meeks michael.me...@suse.com Conflicts: vcl/source/gdi/gdimtf.cxx Change-Id: I998c9535bde32fc9f452d61d7cb7609c95f5528d diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx index ecefb90..90fce69 100644 --- a/vcl/inc/vcl/gdimtf.hxx +++ b/vcl/inc/vcl/gdimtf.hxx @@ -124,7 +124,7 @@ private: const OutputDevice rMapDev, const PolyPolygon rPolyPoly, const Gradient rGrad ); -SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rDestSize ); +SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rLogicDestSize ); SAL_DLLPRIVATE void ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct, OutputDevice* pOut ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 42ed63c..172b477 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -399,7 +399,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); -if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { +if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSize() ) ) { size_t i = 0; for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) { @@ -428,13 +428,13 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) } } -// - -bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rDestSize ) +bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rLogicDestSize ) { if (!bUseCanvas) return false; +Size rDestSize( pOut-LogicToPixel( rLogicDestSize ) ); + const Window* win = dynamic_cast Window* ( pOut ); if (!win) @@ -500,7 +500,10 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, S Bitmap aMask( pSalMask ); AlphaMask aAlphaMask( aMask ); BitmapEx aBitmapEx( aBitmap, aAlphaMask ); -pOut-DrawBitmapEx( rPos, aBitmapEx ); +if ( pOut-GetMapMode() == MAP_PIXEL ) +pOut-DrawBitmapEx( rPos, aBitmapEx ); +else +pOut-DrawBitmapEx( rPos, rLogicDestSize, aBitmapEx ); return true; } @@ -606,7 +609,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( ImplPlayWithRenderer( pOut, rPos, rSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index beee461..8579168 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -769,7 +769,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile i_rMtf, vcl::PDFExtOutDevDa const MetaBmpAction* pA = (const MetaBmpAction*) pAction; BitmapEx aBitmapEx( pA-GetBitmap() ); Size aSize( OutputDevice::LogicToLogic( aBitmapEx.GetPrefSize(), -aBitmapEx.GetPrefMapMode(), pDummyVDev-GetMapMode() ) ); + aBitmapEx.GetPrefMapMode(), pDummyVDev-GetMapMode() ) ); if( ! ( aSize.Width() aSize.Height() ) ) aSize = pDummyVDev-PixelToLogic( aBitmapEx.GetSizePixel() ); implWriteBitmapEx( pA-GetPoint(), aSize, aBitmapEx, pDummyVDev, i_rContext ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/gdimtf.hxx |2 +- vcl/source/gdi/gdimtf.cxx | 15 ++- vcl/source/gdi/pdfwriter_impl2.cxx |2 +- 3 files changed, 12 insertions(+), 7 deletions(-) New commits: commit c47f0903fe0fb2f743d179d1ac9a2dcdfb19af10 Author: Radek Doulik r...@novell.com Date: Mon Apr 29 00:00:00 2013 +0200 Fix bnc#795857 Use correct sizes for EMF+ bitmap rendering Fix pdf export wrong size issues for embedded EMF+ images. Change-Id: I998c9535bde32fc9f452d61d7cb7609c95f5528d (cherry picked from commit 4c676625d4016d428e9becd5512b7cfc8b0c4b24) Conflicts: vcl/inc/vcl/gdimtf.hxx vcl/source/gdi/gdimtf.cxx diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index bbdf141..c790acd 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -111,7 +111,7 @@ private: const OutputDevice rMapDev, const PolyPolygon rPolyPoly, const Gradient rGrad ); -SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rDestSize ); +SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rLogicDestSize ); SAL_DLLPRIVATE void ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct, OutputDevice* pOut ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 223fd65..5fdcba0 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -355,7 +355,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); -if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { +if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSize() ) ) { size_t i = 0; for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) { @@ -384,11 +384,13 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) } } -bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rDestSize ) +bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, Size rLogicDestSize ) { if (!bUseCanvas) return false; +Size rDestSize( pOut-LogicToPixel( rLogicDestSize ) ); + const Window* win = dynamic_cast Window* ( pOut ); if (!win) @@ -433,7 +435,7 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, S uno::Any aAny = xFastPropertySet-getFastPropertyValue( 0 ); BitmapEx* pBitmapEx = (BitmapEx*) *reinterpret_castconst sal_Int64*(aAny.getValue()); if( pBitmapEx ) { -pOut-DrawBitmapEx( rPos, *pBitmapEx ); +pOut-DrawBitmapEx( rPos, rLogicDestSize, *pBitmapEx ); delete pBitmapEx; return true; } @@ -445,7 +447,10 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, S if( pSalBmp-Create( xBitmapCanvas, aSize ) ) { Bitmap aBitmap( pSalBmp ); -pOut-DrawBitmap( rPos, aBitmap ); +if ( pOut-GetMapMode() == MAP_PIXEL ) +pOut-DrawBitmap( rPos, aBitmap ); +else +pOut-DrawBitmap( rPos, rLogicDestSize, aBitmap ); return true; } @@ -549,7 +554,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( ImplPlayWithRenderer( pOut, rPos, rSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 7775741..a8e0d7d 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -774,7 +774,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile i_rMtf, vcl::PDFExtOutDevDa const MetaBmpAction* pA = (const MetaBmpAction*) pAction; BitmapEx aBitmapEx( pA-GetBitmap() ); Size aSize( OutputDevice::LogicToLogic( aBitmapEx.GetPrefSize(), -aBitmapEx.GetPrefMapMode(), pDummyVDev-GetMapMode() ) ); + aBitmapEx.GetPrefMapMode(), pDummyVDev-GetMapMode() ) ); if( ! ( aSize.Width() aSize.Height() ) ) aSize = pDummyVDev
[Libreoffice-commits] core.git: sd/README
sd/README | 21 + 1 file changed, 21 insertions(+) New commits: commit bde563d87f2b2b7b133ddb7a8c71bbd66b2a78e5 Author: Radek Doulik r...@novell.com Date: Sat May 4 11:26:38 2013 +0200 add more description about sd module and important presentation filters Change-Id: I0a3684c21554a87109e653a5aae9cb53c98c098b diff --git a/sd/README b/sd/README index 963e7bd..a64dbd4 100644 --- a/sd/README +++ b/sd/README @@ -1,3 +1,24 @@ The core directory for the impress/draw applications. Think of impress as a hack on top of draw. + + +sd module contains impress/draw specific code, non-shared UI and part +of ppt and pptx filter, few other filters too. + +the slideshow UI lives here as well, the slideshow engine is in +slideshow module though (including the 3D transitions engine +slideshow/source/engine/OGLTrans). + +the most used filters are ODF's odp, binary ppt and OOXML's +pptx. their locations are listed bellow: + + * odp import and export filters are in xmloff module (mostly xmloff/source/draw) + + * ppt import is in sd/source/filter/ppt (big shared chunks are also in svx) + * ppt export is in sd/source/filter/eppt (big shared chunks are also in svx) + + * pptx import is in oox/source/ppt (and uses a lot of + oox/source/drawingml and oox/source/*) + * pptx export is in sd/source/filter/eppt (mostly in pptx-* source + files) and shared part is in oox/source/export ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - 3 commits - xmloff/inc xmloff/source
xmloff/inc/EnhancedCustomShapeToken.hxx |2 xmloff/inc/xmloff/xmltoken.hxx |1 xmloff/source/core/xmltoken.cxx |1 xmloff/source/draw/EnhancedCustomShapeToken.cxx |2 xmloff/source/draw/shapeexport4.cxx | 64 -- xmloff/source/draw/ximpcustomshape.cxx | 68 6 files changed, 132 insertions(+), 6 deletions(-) New commits: commit d101eac309d15fdf6031be898823b3f8d1e4911a Author: Radek Doulik r...@novell.com Date: Fri Feb 1 12:25:23 2013 +0100 export darken/darkeless/lighten/lightenless commands Change-Id: I4531ab82a52e3da41f12409185f7c0730381aa23 diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 7b80346..41f3652 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -425,6 +425,30 @@ void ImpExportEnhancedPath( SvXMLExport rExport, i += 2; } break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKEN : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'H' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'I' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'J' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'K' ); +else +bNeedExtended = true; +break; default : // ups, seems to be something wrong { aSegment.Count = 1; diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index bbd85a3..39221f7 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -711,6 +711,34 @@ void GetEnhancedPath( std::vector com::sun::star::beans::PropertyValue rDest nIndex++; } break; +case 'H' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKEN; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'I' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'J' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'K' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS; +nParametersNeeded = 0; +nIndex++; +} +break; case 'W' : { nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO; commit 6016589874e419a4a276041b2361400fbabc568f Author: Radek Doulik r...@novell.com Date: Thu Jan 31 12:05:50 2013 +0100 export subpath sizes (these are for example in pptx custom shape presets) Change-Id: Iab21d0845d0cb6e4dadeffb5f7b9ebab1e4b955a diff --git a/xmloff/inc/EnhancedCustomShapeToken.hxx b/xmloff/inc/EnhancedCustomShapeToken.hxx index 66b9737..755db2f 100644 --- a/xmloff/inc/EnhancedCustomShapeToken.hxx +++ b/xmloff/inc/EnhancedCustomShapeToken.hxx @@ -93,6 +93,7 @@ namespace xmloff { namespace EnhancedCustomShapeToken { EAS_handle_polar, EAS_handle_radius_range_minimum, EAS_handle_radius_range_maximum, +EAS_sub_view_size, EAS_CustomShapeEngine, EAS_CustomShapeData, @@ -154,6 +155,7 @@ namespace xmloff { namespace EnhancedCustomShapeToken { EAS_SameLetterHeights, EAS_Position, EAS_AdjustmentValues, +EAS_SubViewSize, EAS_Last, EAS_NotFound diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index dca9fcf..8c3be4e 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -1733,6 +1733,7 @@ namespace
[Libreoffice-commits] core.git: 2 commits - svx/source
svx/source/svdraw/svdoashp.cxx |5 - svx/source/svdraw/svdorect.cxx |2 +- 2 files changed, 1 insertion(+), 6 deletions(-) New commits: commit 9d073bcba10b9cbcd56ad58cf5b19bbb129567a8 Author: Radek Doulik r...@novell.com Date: Fri Apr 5 14:45:18 2013 +0200 revert that change and to it at custom shapes level to allow primitive rectangles still be used Revert disable round corners for rectangle shape. fixes fdo#39907 This reverts commit 0c7bbbe9da7602f5d72aecd481f6d26d9af217f0. diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 2e0feac..a60894e 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -184,7 +184,7 @@ void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec rInfo) const rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); rInfo.bShearAllowed =bNoTextFrame; -rInfo.bEdgeRadiusAllowed=sal_False; +rInfo.bEdgeRadiusAllowed=sal_True; bool bCanConv=!HasText() || ImpCanConvTextToCurve(); if (bCanConv !bNoTextFrame !HasText()) { commit e59a5cad25a93e190957120dc7b42fe9c34a13e1 Author: Radek Doulik r...@novell.com Date: Fri Apr 5 14:43:55 2013 +0200 do not allow bEdgeRadiusAllowed to be set to true - as it cannot be exported to ODF - fixes fdo#39907 Change-Id: Ic5d3f60d588698e48da600bd13df9e1e4fae17cd diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 7bc80fd..fe89dae 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1409,11 +1409,6 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec rInfo) const { rInfo.bShearAllowed = aInfo.bShearAllowed; } - -if(rInfo.bEdgeRadiusAllowed != aInfo.bEdgeRadiusAllowed) -{ -rInfo.bEdgeRadiusAllowed = aInfo.bEdgeRadiusAllowed; -} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 2 commits - xmloff/inc xmloff/source
xmloff/inc/EnhancedCustomShapeToken.hxx |2 xmloff/inc/xmloff/xmltoken.hxx |1 xmloff/source/core/xmltoken.cxx |1 xmloff/source/draw/EnhancedCustomShapeToken.cxx |2 xmloff/source/draw/shapeexport4.cxx | 42 ++ xmloff/source/draw/ximpcustomshape.cxx | 68 6 files changed, 116 insertions(+) New commits: commit 7ec5d3c8080862bb94f8efe5ee0bf688ba78d82f Author: Radek Doulik r...@novell.com Date: Fri Feb 1 12:25:23 2013 +0100 export darken/darkeless/lighten/lightenless commands Change-Id: I4531ab82a52e3da41f12409185f7c0730381aa23 diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 1bb5481..ce504fe 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -413,6 +413,30 @@ void ImpExportEnhancedPath( SvXMLExport rExport, i += 2; } break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKEN : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'H' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'I' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'J' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'K' ); +else +bNeedExtended = true; +break; default : // ups, seems to be something wrong { aSegment.Count = 1; diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index a3406ed..1a280ef 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -702,6 +702,34 @@ void GetEnhancedPath( std::vector com::sun::star::beans::PropertyValue rDest nIndex++; } break; +case 'H' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKEN; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'I' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'J' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'K' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS; +nParametersNeeded = 0; +nIndex++; +} +break; case 'W' : { nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO; commit 7c5d35a66ef78837aa6fdc02eea723ce8ef012fa Author: Radek Doulik r...@novell.com Date: Thu Jan 31 12:05:50 2013 +0100 export subpath sizes (these are for example in pptx custom shape presets) Change-Id: Iab21d0845d0cb6e4dadeffb5f7b9ebab1e4b955a diff --git a/xmloff/inc/EnhancedCustomShapeToken.hxx b/xmloff/inc/EnhancedCustomShapeToken.hxx index 39a5faf..42d95ab 100644 --- a/xmloff/inc/EnhancedCustomShapeToken.hxx +++ b/xmloff/inc/EnhancedCustomShapeToken.hxx @@ -84,6 +84,7 @@ namespace xmloff { namespace EnhancedCustomShapeToken { EAS_handle_polar, EAS_handle_radius_range_minimum, EAS_handle_radius_range_maximum, +EAS_sub_view_size, EAS_CustomShapeEngine, EAS_CustomShapeData, @@ -145,6 +146,7 @@ namespace xmloff { namespace EnhancedCustomShapeToken { EAS_SameLetterHeights, EAS_Position, EAS_AdjustmentValues, +EAS_SubViewSize, EAS_Last, EAS_NotFound diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index f5b89a6..74b78f3 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -1732,6 +1732,7 @@ namespace xmloff { namespace
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdorect.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0c7bbbe9da7602f5d72aecd481f6d26d9af217f0 Author: Radek Doulik r...@novell.com Date: Thu Apr 4 13:33:34 2013 +0200 disable round corners for rectangle shape. fixes fdo#39907 Change-Id: I4930ff1123783c434859434fef5983455a1e72f5 diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index a60894e..2e0feac 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -184,7 +184,7 @@ void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec rInfo) const rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); rInfo.bShearAllowed =bNoTextFrame; -rInfo.bEdgeRadiusAllowed=sal_True; +rInfo.bEdgeRadiusAllowed=sal_False; bool bCanConv=!HasText() || ImpCanConvTextToCurve(); if (bCanConv !bNoTextFrame !HasText()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 4 commits - canvas/source oox/inc oox/source vcl/inc vcl/source vcl/unx
canvas/source/cairo/cairo_canvasbitmap.cxx| 30 - canvas/source/cairo/cairo_canvasbitmap.hxx|4 canvas/source/cairo/cairo_xlib_cairo.cxx |7 + canvas/source/cairo/cairo_xlib_cairo.hxx |1 oox/inc/oox/drawingml/theme.hxx |3 oox/source/drawingml/fillproperties.cxx |3 oox/source/drawingml/graphicshapecontext.cxx |3 oox/source/drawingml/shape.cxx| 18 +-- oox/source/drawingml/theme.cxx|5 oox/source/drawingml/themeelementscontext.cxx | 12 +- vcl/inc/salbmp.hxx|2 vcl/inc/unx/salbmp.h |7 + vcl/inc/unx/salgdi.h |5 vcl/inc/vcl/bitmap.hxx|3 vcl/source/gdi/bitmap.cxx | 13 ++ vcl/source/gdi/gdimtf.cxx | 10 - vcl/source/helper/canvastools.cxx | 25 vcl/unx/generic/gdi/salbmp.cxx| 18 ++- vcl/unx/generic/gdi/salgdi2.cxx | 151 ++ 19 files changed, 225 insertions(+), 95 deletions(-) New commits: commit 6b8e311ddc633bb13053d13c5d0f29240039846b Author: Radek Doulik r...@novell.com Date: Thu Mar 14 09:36:43 2013 +0100 pass argb32 pixmaps from vcl to canvas, avoiding costly x11 roundtrips - fixes also problem with emf+ rendering for slideshow Change-Id: Icb894d3f37b29f23d3f267c944d827eefbf47fda diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx index 91f6194..c0759c0 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.cxx +++ b/canvas/source/cairo/cairo_canvasbitmap.cxx @@ -134,6 +134,30 @@ namespace cairocanvas return maCanvasHelper.repaint( pSurface, viewState, renderState ); } +void SAL_CALL CanvasBitmap::setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any rAny ) throw (uno::RuntimeException) +{ +sal_Int64 nPointer; + +if ( nHandle == 0 ) +{ +rAny = nPointer; + +if ( nPointer ) +{ +::Bitmap *pBitmap = reinterpret_cast ::Bitmap* ( nPointer ); + +mpBufferSurface = createSurface( *pBitmap ); +mpBufferCairo = mpBufferSurface-getCairo(); + +::Size aSize( pBitmap-GetSizePixel() ); +maSize = ::basegfx::B2ISize( aSize.getWidth(), aSize.getHeight() ); + +maCanvasHelper.setSize( maSize ); +maCanvasHelper.setSurface( mpBufferSurface, mbHasAlpha ); +} +} +} + uno::Any SAL_CALL CanvasBitmap::getFastPropertyValue( sal_Int32 nHandle ) throw (uno::RuntimeException) { uno::Any aRV( sal_Int32(0) ); @@ -152,10 +176,11 @@ namespace cairocanvas #ifdef CAIRO_HAS_XLIB_SURFACE X11Surface* pXlibSurface=dynamic_castX11Surface*(mpBufferSurface.get()); OSL_ASSERT(pXlibSurface); -uno::Sequence uno::Any args( 3 ); +uno::Sequence uno::Any args( 4 ); args[0] = uno::Any( false ); // do not call XFreePixmap on it args[1] = uno::Any( pXlibSurface-getPixmap()-mhDrawable ); args[2] = uno::Any( sal_Int32( pXlibSurface-getDepth() ) ); +args[3] = uno::Any( sal_Int64( pXlibSurface-getVisual () ) ); aRV = uno::Any( args ); #elif defined CAIRO_HAS_QUARTZ_SURFACE @@ -180,7 +205,7 @@ namespace cairocanvas case 2: { #ifdef CAIRO_HAS_XLIB_SURFACE -uno::Sequence uno::Any args( 3 ); +uno::Sequence uno::Any args( 4 ); SurfaceSharedPtr pAlphaSurface = mpSurfaceProvider-createSurface( maSize, CAIRO_CONTENT_COLOR ); CairoSharedPtr pAlphaCairo = pAlphaSurface-getCairo(); X11Surface* pXlibSurface=dynamic_castX11Surface*(pAlphaSurface.get()); @@ -199,6 +224,7 @@ namespace cairocanvas args[0] = uno::Any( true ); args[1] = ::com::sun::star::uno::Any( pPixmap-mhDrawable ); args[2] = ::com::sun::star::uno::Any( sal_Int32( pXlibSurface-getDepth () ) ); +args[3] = ::com::sun::star::uno::Any( sal_Int64( pXlibSurface-getVisual () ) ); pPixmap-clear(); // caller takes ownership of pixmap // return pixmap and alphachannel pixmap - it will be used in BitmapEx diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index b1d669e..bef03f5 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -115,14 +115,14 @@ namespace cairocanvas // 2nd the pixmap handle // 3rd the pixmap depth virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com
[Libreoffice-commits] core.git: cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx|8 ++ cppcanvas/source/mtfrenderer/emfplus.cxx | 85 ++- 2 files changed, 67 insertions(+), 26 deletions(-) New commits: commit 8b1eac4a14e38913b8b33c0aeb98ea702589 Author: Radek Doulik r...@novell.com Date: Fri Mar 22 20:54:03 2013 +0100 implemented BeginContainerNoParams and EndContainer records - plus a bit of refactoring to reuse code Change-Id: I416d2c47800752a27e2dc79f9b55b096e641062f diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 4537368..addcdc2 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -174,6 +174,8 @@ static float GetSwapFloat( SvStream rSt ) OutDevState aDevState; } EmfPlusGraphicState; +typedef ::std::mapint,EmfPlusGraphicState GraphicStateMap; + class ImplRenderer : public virtual Renderer, protected CanvasGraphicHelper { public: @@ -215,6 +217,8 @@ static float GetSwapFloat( SvStream rSt ) void MapToDevice (double x, double y); ::basegfx::B2DPoint Map (double ix, double iy); ::basegfx::B2DSize MapSize (double iwidth, double iheight); +void GraphicStatePush (GraphicStateMap map, sal_Int32 index, OutDevState rState); +void GraphicStatePop (GraphicStateMap map, sal_Int32 index, OutDevState rState); private: // default: disabled copy/assignment @@ -300,8 +304,8 @@ static float GetSwapFloat( SvStream rSt ) sal_uInt16 mMFlags; SvMemoryStream mMStream; /* emf+ graphic state stack */ -::std::mapint,EmfPlusGraphicState mGSStack; -typedef ::std::mapint,EmfPlusGraphicState::iterator EPGSSIter; +GraphicStateMap mGSStack; +GraphicStateMap mGSContainerStack; }; diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 8989113..5cf3264 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -69,6 +69,8 @@ #define EmfPlusRecordTypeSetCompositingQuality 16420 #define EmfPlusRecordTypeSave 16421 #define EmfPlusRecordTypeRestore 16422 +#define EmfPlusRecordTypeBeginContainerNoParams 16424 +#define EmfPlusRecordTypeEndContainer 16425 #define EmfPlusRecordTypeSetWorldTransform 16426 #define EmfPlusRecordTypeResetWorldTransform 16427 #define EmfPlusRecordTypeMultiplyWorldTransform 16428 @@ -1221,6 +1223,43 @@ namespace cppcanvas return cellSize; } +void ImplRenderer::GraphicStatePush(GraphicStateMap map, sal_Int32 index, OutDevState rState) +{ +GraphicStateMap::iterator iter = map.find( index ); + +if ( iter != map.end() ) +{ +EmfPlusGraphicState state = iter-second; +map.erase( iter ); + +EMFP_DEBUG (printf (stack index: %d found and erased\n, index)); +} + +EmfPlusGraphicState state; + +state.aWorldTransform = aWorldTransform; +state.aDevState = rState; + +map[ index ] = state; +} + +void ImplRenderer::GraphicStatePop(GraphicStateMap map, sal_Int32 index, OutDevState rState) +{ +GraphicStateMap::iterator iter = map.find( index ); + +if ( iter != map.end() ) +{ +EMFP_DEBUG (printf (stack index: %d found\n, index)); + +EmfPlusGraphicState state = iter-second; + +aWorldTransform = state.aWorldTransform; +rState.clip = state.aDevState.clip; +rState.clipRect = state.aDevState.clipRect; +rState.xClipPoly = state.aDevState.xClipPoly; +} +} + void ImplRenderer::processEMFPlus( MetaCommentAction* pAct, const ActionFactoryParameters rFactoryParms, OutDevState rState, const CanvasSharedPtr rCanvas ) { @@ -1677,46 +1716,44 @@ namespace cppcanvas EMFP_DEBUG (printf (EMF+ Save stack index: %d\n, stackIndex)); -EPGSSIter aIter = mGSStack.find( stackIndex ); - -if ( aIter != mGSStack.end() ) -{ -EmfPlusGraphicState aState = aIter-second; -mGSStack.erase( aIter ); +GraphicStatePush( mGSStack, stackIndex, rState ); -EMFP_DEBUG (printf (stack index: %d found and erased\n, stackIndex)); -} +break; +} +case EmfPlusRecordTypeRestore: +{ +sal_uInt32 stackIndex; -EmfPlusGraphicState aState
[Libreoffice-commits] core.git: cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx| 12 ++ cppcanvas/source/inc/outdevstate.hxx | 126 +++ cppcanvas/source/mtfrenderer/emfplus.cxx | 49 ++ cppcanvas/source/mtfrenderer/outdevstate.hxx | 126 --- 4 files changed, 184 insertions(+), 129 deletions(-) New commits: commit 69b19ba284a1589a9e85b259dfe327cb7ee9d618 Author: Radek Doulik r...@novell.com Date: Tue Mar 19 13:17:42 2013 +0100 implemented EmfPlusRecordTypeSave and EmfPlusRecordTypeRestore records Change-Id: Iac87870c0f50a74b7f4db4c674adcded1494c055 diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index c2902d6..4537368 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -28,8 +28,10 @@ #include canvasgraphichelper.hxx #include action.hxx +#include outdevstate.hxx #include vector +#include map class GDIMetaFile; class VirtualDevice; @@ -166,6 +168,12 @@ static float GetSwapFloat( SvStream rSt ) } }; +// EMF+ +typedef struct { +XForm aWorldTransform; +OutDevState aDevState; +} EmfPlusGraphicState; + class ImplRenderer : public virtual Renderer, protected CanvasGraphicHelper { public: @@ -278,7 +286,6 @@ static float GetSwapFloat( SvStream rSt ) sal_Int32 nOriginY; sal_Int32 nHDPI; sal_Int32 nVDPI; -::PolyPolygon aClippingPolygon; /* EMF+ emf header info */ sal_Int32 nFrameLeft; sal_Int32 nFrameTop; @@ -292,6 +299,9 @@ static float GetSwapFloat( SvStream rSt ) boolmbMultipart; sal_uInt16 mMFlags; SvMemoryStream mMStream; +/* emf+ graphic state stack */ +::std::mapint,EmfPlusGraphicState mGSStack; +typedef ::std::mapint,EmfPlusGraphicState::iterator EPGSSIter; }; diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx new file mode 100644 index 000..26e1026 --- /dev/null +++ b/cppcanvas/source/inc/outdevstate.hxx @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef _CPPCANVAS_OUTDEVSTATE_HXX +#define _CPPCANVAS_OUTDEVSTATE_HXX + +#include com/sun/star/uno/Reference.hxx +#include com/sun/star/uno/Sequence.hxx + +#include com/sun/star/rendering/StringContext.hpp +#include com/sun/star/rendering/RenderState.hpp +#include com/sun/star/rendering/XPolyPolygon2D.hpp +#include com/sun/star/rendering/XCanvasFont.hpp +#include com/sun/star/rendering/TextDirection.hpp +#include basegfx/matrix/b2dhommatrix.hxx +#include basegfx/polygon/b2dpolypolygon.hxx +#include vcl/fntstyle.hxx +#include vcl/vclenum.hxx +#include vcl/outdev.hxx + + +namespace cppcanvas +{ +namespace internal +{ +struct OutDevState +{ +OutDevState() : +clip(), +clipRect(), +xClipPoly(), + +lineColor(), +fillColor(), +textColor(), +textFillColor(), +textLineColor(), + +xFont(), +transform(), +mapModeTransform(), +fontRotation(0.0), + +textEmphasisMarkStyle(EMPHASISMARK_NONE), +pushFlags(PUSH_ALL), + textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT), +textAlignment(0), // TODO(Q2): Synchronize with implrenderer + // and possibly new rendering::TextAlignment +textReliefStyle(RELIEF_NONE), +textOverlineStyle(UNDERLINE_NONE), +textUnderlineStyle(UNDERLINE_NONE), +textStrikeoutStyle(STRIKEOUT_NONE), +textReferencePoint(ALIGN_BASELINE), + +isTextOutlineModeSet( false ), +isTextEffectShadowSet( false
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx| 12 ++ cppcanvas/source/inc/outdevstate.hxx | 126 +++ cppcanvas/source/mtfrenderer/emfplus.cxx | 49 ++ cppcanvas/source/mtfrenderer/outdevstate.hxx | 126 --- 4 files changed, 184 insertions(+), 129 deletions(-) New commits: commit 5a86702e13b3654982f1ee84da981d7fb8c442c5 Author: Radek Doulik r...@novell.com Date: Tue Mar 19 13:17:42 2013 +0100 implemented EmfPlusRecordTypeSave and EmfPlusRecordTypeRestore records Change-Id: Iac87870c0f50a74b7f4db4c674adcded1494c055 Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index c2902d6..4537368 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -28,8 +28,10 @@ #include canvasgraphichelper.hxx #include action.hxx +#include outdevstate.hxx #include vector +#include map class GDIMetaFile; class VirtualDevice; @@ -166,6 +168,12 @@ static float GetSwapFloat( SvStream rSt ) } }; +// EMF+ +typedef struct { +XForm aWorldTransform; +OutDevState aDevState; +} EmfPlusGraphicState; + class ImplRenderer : public virtual Renderer, protected CanvasGraphicHelper { public: @@ -278,7 +286,6 @@ static float GetSwapFloat( SvStream rSt ) sal_Int32 nOriginY; sal_Int32 nHDPI; sal_Int32 nVDPI; -::PolyPolygon aClippingPolygon; /* EMF+ emf header info */ sal_Int32 nFrameLeft; sal_Int32 nFrameTop; @@ -292,6 +299,9 @@ static float GetSwapFloat( SvStream rSt ) boolmbMultipart; sal_uInt16 mMFlags; SvMemoryStream mMStream; +/* emf+ graphic state stack */ +::std::mapint,EmfPlusGraphicState mGSStack; +typedef ::std::mapint,EmfPlusGraphicState::iterator EPGSSIter; }; diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx new file mode 100644 index 000..26e1026 --- /dev/null +++ b/cppcanvas/source/inc/outdevstate.hxx @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef _CPPCANVAS_OUTDEVSTATE_HXX +#define _CPPCANVAS_OUTDEVSTATE_HXX + +#include com/sun/star/uno/Reference.hxx +#include com/sun/star/uno/Sequence.hxx + +#include com/sun/star/rendering/StringContext.hpp +#include com/sun/star/rendering/RenderState.hpp +#include com/sun/star/rendering/XPolyPolygon2D.hpp +#include com/sun/star/rendering/XCanvasFont.hpp +#include com/sun/star/rendering/TextDirection.hpp +#include basegfx/matrix/b2dhommatrix.hxx +#include basegfx/polygon/b2dpolypolygon.hxx +#include vcl/fntstyle.hxx +#include vcl/vclenum.hxx +#include vcl/outdev.hxx + + +namespace cppcanvas +{ +namespace internal +{ +struct OutDevState +{ +OutDevState() : +clip(), +clipRect(), +xClipPoly(), + +lineColor(), +fillColor(), +textColor(), +textFillColor(), +textLineColor(), + +xFont(), +transform(), +mapModeTransform(), +fontRotation(0.0), + +textEmphasisMarkStyle(EMPHASISMARK_NONE), +pushFlags(PUSH_ALL), + textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT), +textAlignment(0), // TODO(Q2): Synchronize with implrenderer + // and possibly new rendering::TextAlignment +textReliefStyle(RELIEF_NONE), +textOverlineStyle(UNDERLINE_NONE), +textUnderlineStyle(UNDERLINE_NONE), +textStrikeoutStyle(STRIKEOUT_NONE), +textReferencePoint(ALIGN_BASELINE), + +isTextOutlineModeSet( false
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-2' - cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx| 12 ++ cppcanvas/source/inc/outdevstate.hxx | 126 +++ cppcanvas/source/mtfrenderer/emfplus.cxx | 49 ++ cppcanvas/source/mtfrenderer/outdevstate.hxx | 126 --- 4 files changed, 184 insertions(+), 129 deletions(-) New commits: commit af837e0fd656859e6c0a11020ea3556bfe984d06 Author: Radek Doulik r...@novell.com Date: Tue Mar 19 13:17:42 2013 +0100 implemented EmfPlusRecordTypeSave and EmfPlusRecordTypeRestore records Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch (cherry picked from commit 5a86702e13b3654982f1ee84da981d7fb8c442c5) Change-Id: Iac87870c0f50a74b7f4db4c674adcded1494c055 Reviewed-on: https://gerrit.libreoffice.org/2839 Reviewed-by: Noel Power noel.po...@suse.com Reviewed-by: Michael Meeks michael.me...@suse.com Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index c2902d6..4537368 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -28,8 +28,10 @@ #include canvasgraphichelper.hxx #include action.hxx +#include outdevstate.hxx #include vector +#include map class GDIMetaFile; class VirtualDevice; @@ -166,6 +168,12 @@ static float GetSwapFloat( SvStream rSt ) } }; +// EMF+ +typedef struct { +XForm aWorldTransform; +OutDevState aDevState; +} EmfPlusGraphicState; + class ImplRenderer : public virtual Renderer, protected CanvasGraphicHelper { public: @@ -278,7 +286,6 @@ static float GetSwapFloat( SvStream rSt ) sal_Int32 nOriginY; sal_Int32 nHDPI; sal_Int32 nVDPI; -::PolyPolygon aClippingPolygon; /* EMF+ emf header info */ sal_Int32 nFrameLeft; sal_Int32 nFrameTop; @@ -292,6 +299,9 @@ static float GetSwapFloat( SvStream rSt ) boolmbMultipart; sal_uInt16 mMFlags; SvMemoryStream mMStream; +/* emf+ graphic state stack */ +::std::mapint,EmfPlusGraphicState mGSStack; +typedef ::std::mapint,EmfPlusGraphicState::iterator EPGSSIter; }; diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx new file mode 100644 index 000..26e1026 --- /dev/null +++ b/cppcanvas/source/inc/outdevstate.hxx @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef _CPPCANVAS_OUTDEVSTATE_HXX +#define _CPPCANVAS_OUTDEVSTATE_HXX + +#include com/sun/star/uno/Reference.hxx +#include com/sun/star/uno/Sequence.hxx + +#include com/sun/star/rendering/StringContext.hpp +#include com/sun/star/rendering/RenderState.hpp +#include com/sun/star/rendering/XPolyPolygon2D.hpp +#include com/sun/star/rendering/XCanvasFont.hpp +#include com/sun/star/rendering/TextDirection.hpp +#include basegfx/matrix/b2dhommatrix.hxx +#include basegfx/polygon/b2dpolypolygon.hxx +#include vcl/fntstyle.hxx +#include vcl/vclenum.hxx +#include vcl/outdev.hxx + + +namespace cppcanvas +{ +namespace internal +{ +struct OutDevState +{ +OutDevState() : +clip(), +clipRect(), +xClipPoly(), + +lineColor(), +fillColor(), +textColor(), +textFillColor(), +textLineColor(), + +xFont(), +transform(), +mapModeTransform(), +fontRotation(0.0), + +textEmphasisMarkStyle(EMPHASISMARK_NONE), +pushFlags(PUSH_ALL), + textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT), +textAlignment(0), // TODO(Q2): Synchronize with implrenderer
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-2' - cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) New commits: commit 38fc2a552a79adc7945eab9dc4e534653cdad553 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 14:48:05 2013 +0100 implemented EmfPlusRecordTypeFillEllipse record (cherry picked from commit cf6b2f0ecef2c23c24114ca1a1609a4a81ade8a1) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: Id9362d05ddae2066f2fa289640f447393d7cda84 Reviewed-on: https://gerrit.libreoffice.org/2749 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org (cherry picked from commit f820b5b5b97fff0393a2c346f579384e63f7c2db) Reviewed-on: https://gerrit.libreoffice.org/2750 Reviewed-by: Michael Meeks michael.me...@suse.com Reviewed-by: Joren De Cuyper joren.libreoff...@telenet.be diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 1dbbd82..383ce31 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -53,6 +53,8 @@ #define EmfPlusRecordTypeFillRects 16394 #define EmfPlusRecordTypeFillPolygon 16396 #define EmfPlusRecordTypeDrawLines 16397 +#define EmfPlusRecordTypeFillEllipse 16398 +#define EmfPlusRecordTypeDrawEllipse 16399 #define EmfPlusRecordTypeFillPie 16400 #define EmfPlusRecordTypeFillPath 16404 #define EmfPlusRecordTypeDrawPath 16405 @@ -1289,7 +1291,31 @@ namespace cppcanvas EMFP_DEBUG (printf (EMF+ FillPath slot: %u\n, (unsigned int)index)); -EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); +EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); +} +break; +case EmfPlusRecordTypeFillEllipse: +{ +sal_uInt32 index = flags 0xff; +sal_uInt32 brushIndexOrColor; + +rMF brushIndexOrColor; + +EMFP_DEBUG (printf (EMF+ FillEllipse slot: %u\n, (unsigned int)index)); + +float dx, dy, dw, dh; + +ReadRectangle (rMF, dx, dy, dw, dh, flags 0x4000); + +EMFP_DEBUG (printf (EMF+ RectData: %f,%f %fx%f\n, dx, dy, dw, dh)); + +B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); +B2DSize mappedSize( MapSize (dw/2, dh/2)); + +::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) ); + +EMFPPlusFillPolygon( polyPolygon, + rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor ); } break; case EmfPlusRecordTypeFillRects: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-2' - cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx|1 cppcanvas/source/mtfrenderer/emfplus.cxx | 80 +-- 2 files changed, 47 insertions(+), 34 deletions(-) New commits: commit f89ec4131475a8d0876d68522601585b28a2a6a8 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 15:30:40 2013 +0100 implemented EmfPlusRecordTypeDrawEllipse record (cherry picked from commit fa109b4603f06533a63ee19518c482a23976bfe8) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: If8d7c210e437a041f3202c09f3d26d621b5af748 ops, fix build (cherry picked from commit ebebb309403498a9438a908a26248b05cc855879) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: If72f3c1e0d7a14779074d898c4d1eb0fe8f07871 Reviewed-on: https://gerrit.libreoffice.org/2751 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org (cherry picked from commit 46d4224d1ac0ae4aab52c3bb7f4f844928cce260) Reviewed-on: https://gerrit.libreoffice.org/2752 diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 7d82ea7..c2902d6 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -264,6 +264,7 @@ static float GetSwapFloat( SvStream rSt ) /* EMF+ */ void processEMFPlus( MetaCommentAction* pAct, const ActionFactoryParameters rFactoryParms, OutDevState rState, const CanvasSharedPtr rCanvas ); double setFont( sal_uInt8 objectId, const ActionFactoryParameters rParms, OutDevState rState ); +void EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, sal_uInt32 penIndex); void EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, bool isColor, sal_uInt32 brushIndexOrColor); ActionVector maActions; diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 383ce31..de5c480 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1092,6 +1092,41 @@ namespace cppcanvas } } +void ImplRenderer::EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, +OutDevState rState, const CanvasSharedPtr rCanvas, sal_uInt32 penIndex) +{ +EMFPPen* pen = (EMFPPen*) aObjects [penIndex 0xff]; + +SAL_WARN_IF( !pen, cppcanvas, emf+ missing pen ); + +if (pen) +{ +rState.isFillColorSet = false; +rState.isLineColorSet = true; +rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen-GetColor (), + rCanvas-getUNOCanvas ()-getDevice()-getDeviceColorSpace()); + +polygon.transform( rState.mapModeTransform ); +rendering::StrokeAttributes aStrokeAttributes; + +pen-SetStrokeAttributes (aStrokeAttributes, *this, rState); + +ActionSharedPtr pPolyAction( + internal::PolyPolyActionFactory::createPolyPolyAction( + polygon, rParms.mrCanvas, rState, aStrokeAttributes ) ); + +if( pPolyAction ) +{ +maActions.push_back( +MtfAction( + pPolyAction, + rParms.mrCurrActionIndex ) ); + +rParms.mrCurrActionIndex += pPolyAction-getActionCount()-1; +} +} +} + void ImplRenderer::processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags, sal_uInt32 dataSize, sal_Bool bUseWholeStream) { sal_uInt32 index; @@ -1294,14 +1329,15 @@ namespace cppcanvas EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); } break; +case EmfPlusRecordTypeDrawEllipse: case EmfPlusRecordTypeFillEllipse: { -sal_uInt32 index = flags 0xff; sal_uInt32 brushIndexOrColor; -rMF brushIndexOrColor; +if ( type == EmfPlusRecordTypeFillEllipse ) +rMF brushIndexOrColor
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-2' - cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx | 39 +++ 1 file changed, 34 insertions(+), 5 deletions(-) New commits: commit 2d2644e5efdec703ff87562f98ff4ebb9aec2320 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 16:07:53 2013 +0100 implemented EmfPlusRecordTypeSetClipRect record (cherry picked from commit f2d9db4ef951d04c63733b08dd8746c196dd5f05) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: I0778cf44a1f4e920e723c17c34f6de4f8eed2342 Reviewed-on: https://gerrit.libreoffice.org/2753 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org (cherry picked from commit 4c0bfbd4126e377e06d6a48c2bfcc56ffa422740) Reviewed-on: https://gerrit.libreoffice.org/2754 diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index de5c480..491b085 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -72,6 +72,7 @@ #define EmfPlusRecordTypeResetWorldTransform 16427 #define EmfPlusRecordTypeMultiplyWorldTransform 16428 #define EmfPlusRecordTypeSetPageTransform 16432 +#define EmfPlusRecordTypeSetClipRect 16434 #define EmfPlusRecordTypeSetClipPath 16435 #define EmfPlusRecordTypeSetClipRegion 16436 #define EmfPlusRecordTypeDrawDriverString 16438 @@ -1697,30 +1698,58 @@ namespace cppcanvas aWorldTransform.eDx, aWorldTransform.eDy)); break; } +case EmfPlusRecordTypeSetClipRect: +{ +int combineMode = (flags 8) 0xf; + +EMFP_DEBUG (printf (EMF+ SetClipRect combine mode: %d\n, combineMode)); +EMFP_DEBUG (if ( combineMode 1 ) printf (EMF+ TODO combine mode 1\n)); + +float dx, dy, dw, dh; + +ReadRectangle (rMF, dx, dy, dw, dh, false); + +EMFP_DEBUG (printf (EMF+ RectData: %f,%f %fx%f\n, dx, dy, dw, dh)); + +B2DPoint mappedPoint (Map (dx, dy)); +B2DSize mappedSize( MapSize (dw, dh)); + +::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(), + mappedPoint.getX() + mappedSize.getX(), + mappedPoint.getY() + mappedSize.getY() ) ) ) ); + +updateClipping (polyPolygon, rFactoryParms, combineMode == 1); + +break; +} case EmfPlusRecordTypeSetClipPath: { -EMFP_DEBUG (printf (EMF+ SetClipPath\n)); +int combineMode = (flags 8) 0xf; + +EMFP_DEBUG (printf (EMF+ SetClipPath combine mode: %d\n, combineMode)); EMFP_DEBUG (printf (EMF+\tpath in slot: %d\n, flags 0xff)); EMFPPath path = *(EMFPPath*) aObjects [flags 0xff]; ::basegfx::B2DPolyPolygon clipPoly (path.GetPolygon (*this)); clipPoly.transform (rState.mapModeTransform); -updateClipping (clipPoly, rFactoryParms, false); +updateClipping (clipPoly, rFactoryParms, combineMode == 1); break; } case EmfPlusRecordTypeSetClipRegion: { +int combineMode = (flags 8) 0xf; + EMFP_DEBUG (printf (EMF+ SetClipRegion\n)); -EMFP_DEBUG (printf (EMF+\tregion in slot: %d combine mode: %d\n, flags 0xff, (flags 0xff00) 8)); +EMFP_DEBUG (printf (EMF+\tregion in slot: %d combine mode: %d\n, flags 0xff, combineMode)); EMFPRegion *region = (EMFPRegion*)aObjects [flags 0xff]; // reset clip if (region region-parts == 0 region-initialState == EmfPlusRegionInitialStateInfinite) { -updateClipping (::basegfx::B2DPolyPolygon (), rFactoryParms, false); +updateClipping (::basegfx::B2DPolyPolygon (), rFactoryParms, combineMode == 1); } else { EMFP_DEBUG (printf (EMF+\tTODO\n)); -} +} break; } case EmfPlusRecordTypeDrawDriverString: { ___ Libreoffice-commits
[Libreoffice-commits] core.git: cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx | 26 ++ 1 file changed, 26 insertions(+) New commits: commit cf6b2f0ecef2c23c24114ca1a1609a4a81ade8a1 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 14:48:05 2013 +0100 implemented EmfPlusRecordTypeFillEllipse record Change-Id: Id9362d05ddae2066f2fa289640f447393d7cda84 diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 6712031..8424597 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -53,6 +53,8 @@ #define EmfPlusRecordTypeFillRects 16394 #define EmfPlusRecordTypeFillPolygon 16396 #define EmfPlusRecordTypeDrawLines 16397 +#define EmfPlusRecordTypeFillEllipse 16398 +#define EmfPlusRecordTypeDrawEllipse 16399 #define EmfPlusRecordTypeFillPie 16400 #define EmfPlusRecordTypeFillPath 16404 #define EmfPlusRecordTypeDrawPath 16405 @@ -1296,6 +1298,30 @@ namespace cppcanvas EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); } break; +case EmfPlusRecordTypeFillEllipse: +{ +sal_uInt32 index = flags 0xff; +sal_uInt32 brushIndexOrColor; + +rMF brushIndexOrColor; + +EMFP_DEBUG (printf (EMF+ FillEllipse slot: %u\n, (unsigned int)index)); + +float dx, dy, dw, dh; + +ReadRectangle (rMF, dx, dy, dw, dh, flags 0x4000); + +EMFP_DEBUG (printf (EMF+ RectData: %f,%f %fx%f\n, dx, dy, dw, dh)); + +B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); +B2DSize mappedSize( MapSize (dw/2, dh/2)); + +::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) ); + +EMFPPlusFillPolygon( polyPolygon, + rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor ); +} +break; case EmfPlusRecordTypeFillRects: { EMFP_DEBUG (printf (EMF+ FillRects\n)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) New commits: commit f820b5b5b97fff0393a2c346f579384e63f7c2db Author: Radek Doulik r...@novell.com Date: Fri Mar 15 14:48:05 2013 +0100 implemented EmfPlusRecordTypeFillEllipse record (cherry picked from commit cf6b2f0ecef2c23c24114ca1a1609a4a81ade8a1) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: Id9362d05ddae2066f2fa289640f447393d7cda84 Reviewed-on: https://gerrit.libreoffice.org/2749 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 1dbbd82..383ce31 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -53,6 +53,8 @@ #define EmfPlusRecordTypeFillRects 16394 #define EmfPlusRecordTypeFillPolygon 16396 #define EmfPlusRecordTypeDrawLines 16397 +#define EmfPlusRecordTypeFillEllipse 16398 +#define EmfPlusRecordTypeDrawEllipse 16399 #define EmfPlusRecordTypeFillPie 16400 #define EmfPlusRecordTypeFillPath 16404 #define EmfPlusRecordTypeDrawPath 16405 @@ -1289,7 +1291,31 @@ namespace cppcanvas EMFP_DEBUG (printf (EMF+ FillPath slot: %u\n, (unsigned int)index)); -EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); +EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); +} +break; +case EmfPlusRecordTypeFillEllipse: +{ +sal_uInt32 index = flags 0xff; +sal_uInt32 brushIndexOrColor; + +rMF brushIndexOrColor; + +EMFP_DEBUG (printf (EMF+ FillEllipse slot: %u\n, (unsigned int)index)); + +float dx, dy, dw, dh; + +ReadRectangle (rMF, dx, dy, dw, dh, flags 0x4000); + +EMFP_DEBUG (printf (EMF+ RectData: %f,%f %fx%f\n, dx, dy, dw, dh)); + +B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); +B2DSize mappedSize( MapSize (dw/2, dh/2)); + +::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) ); + +EMFPPlusFillPolygon( polyPolygon, + rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor ); } break; case EmfPlusRecordTypeFillRects: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx|1 cppcanvas/source/mtfrenderer/emfplus.cxx | 79 ++- 2 files changed, 47 insertions(+), 33 deletions(-) New commits: commit fa109b4603f06533a63ee19518c482a23976bfe8 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 15:30:40 2013 +0100 implemented EmfPlusRecordTypeDrawEllipse record Change-Id: If8d7c210e437a041f3202c09f3d26d621b5af748 diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 7d82ea7..c2902d6 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -264,6 +264,7 @@ static float GetSwapFloat( SvStream rSt ) /* EMF+ */ void processEMFPlus( MetaCommentAction* pAct, const ActionFactoryParameters rFactoryParms, OutDevState rState, const CanvasSharedPtr rCanvas ); double setFont( sal_uInt8 objectId, const ActionFactoryParameters rParms, OutDevState rState ); +void EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, sal_uInt32 penIndex); void EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, bool isColor, sal_uInt32 brushIndexOrColor); ActionVector maActions; diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index f8ae8c3..5864182 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1096,6 +1096,41 @@ namespace cppcanvas } } +void ImplRenderer::EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, +OutDevState rState, const CanvasSharedPtr rCanvas, sal_uInt32 penIndex) +{ +EMFPPen* pen = (EMFPPen*) aObjects [penIndex 0xff]; + +SAL_WARN_IF( !pen, cppcanvas, emf+ missing pen ); + +if (pen) +{ +rState.isFillColorSet = false; +rState.isLineColorSet = true; +rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen-GetColor (), + rCanvas-getUNOCanvas ()-getDevice()-getDeviceColorSpace()); + +polygon.transform( rState.mapModeTransform ); +rendering::StrokeAttributes aStrokeAttributes; + +pen-SetStrokeAttributes (aStrokeAttributes, *this, rState); + +ActionSharedPtr pPolyAction( + internal::PolyPolyActionFactory::createPolyPolyAction( + polygon, rParms.mrCanvas, rState, aStrokeAttributes ) ); + +if( pPolyAction ) +{ +maActions.push_back( +MtfAction( + pPolyAction, + rParms.mrCurrActionIndex ) ); + +rParms.mrCurrActionIndex += pPolyAction-getActionCount()-1; +} +} +} + void ImplRenderer::processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags, sal_uInt32 dataSize, sal_Bool bUseWholeStream) { sal_uInt32 index; @@ -1298,13 +1333,15 @@ namespace cppcanvas EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); } break; +case EmfPlusRecordTypeDrawEllipse: case EmfPlusRecordTypeFillEllipse: { sal_uInt32 brushIndexOrColor; -rMF brushIndexOrColor; +if ( type == EmfPlusRecordTypeFillEllipse ) +rMF brushIndexOrColorOrPen; -EMFP_DEBUG (printf (EMF+ FillEllipse slot: %u\n, static_castunsigned(flags 0xff))); +EMFP_DEBUG (printf (EMF+ %sEllipse slot: %u\n, type == EmfPlusRecordTypeFillEllipse ? Fill : Draw, static_castunsigned(flags 0xff))); float dx, dy, dw, dh; @@ -1317,8 +1354,12 @@ namespace cppcanvas ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) ); -EMFPPlusFillPolygon( polyPolygon, - rFactoryParms, rState, rCanvas
[Libreoffice-commits] core.git: cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ebebb309403498a9438a908a26248b05cc855879 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 15:34:26 2013 +0100 ops, fix build Change-Id: If72f3c1e0d7a14779074d898c4d1eb0fe8f07871 diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 5864182..7389e23 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1339,7 +1339,7 @@ namespace cppcanvas sal_uInt32 brushIndexOrColor; if ( type == EmfPlusRecordTypeFillEllipse ) -rMF brushIndexOrColorOrPen; +rMF brushIndexOrColor; EMFP_DEBUG (printf (EMF+ %sEllipse slot: %u\n, type == EmfPlusRecordTypeFillEllipse ? Fill : Draw, static_castunsigned(flags 0xff))); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - cppcanvas/source
cppcanvas/source/inc/implrenderer.hxx|1 cppcanvas/source/mtfrenderer/emfplus.cxx | 80 +-- 2 files changed, 47 insertions(+), 34 deletions(-) New commits: commit 46d4224d1ac0ae4aab52c3bb7f4f844928cce260 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 15:30:40 2013 +0100 implemented EmfPlusRecordTypeDrawEllipse record (cherry picked from commit fa109b4603f06533a63ee19518c482a23976bfe8) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: If8d7c210e437a041f3202c09f3d26d621b5af748 ops, fix build (cherry picked from commit ebebb309403498a9438a908a26248b05cc855879) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: If72f3c1e0d7a14779074d898c4d1eb0fe8f07871 Reviewed-on: https://gerrit.libreoffice.org/2751 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 7d82ea7..c2902d6 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -264,6 +264,7 @@ static float GetSwapFloat( SvStream rSt ) /* EMF+ */ void processEMFPlus( MetaCommentAction* pAct, const ActionFactoryParameters rFactoryParms, OutDevState rState, const CanvasSharedPtr rCanvas ); double setFont( sal_uInt8 objectId, const ActionFactoryParameters rParms, OutDevState rState ); +void EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, sal_uInt32 penIndex); void EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, bool isColor, sal_uInt32 brushIndexOrColor); ActionVector maActions; diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 383ce31..de5c480 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1092,6 +1092,41 @@ namespace cppcanvas } } +void ImplRenderer::EMFPPlusDrawPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, +OutDevState rState, const CanvasSharedPtr rCanvas, sal_uInt32 penIndex) +{ +EMFPPen* pen = (EMFPPen*) aObjects [penIndex 0xff]; + +SAL_WARN_IF( !pen, cppcanvas, emf+ missing pen ); + +if (pen) +{ +rState.isFillColorSet = false; +rState.isLineColorSet = true; +rState.lineColor = ::vcl::unotools::colorToDoubleSequence (pen-GetColor (), + rCanvas-getUNOCanvas ()-getDevice()-getDeviceColorSpace()); + +polygon.transform( rState.mapModeTransform ); +rendering::StrokeAttributes aStrokeAttributes; + +pen-SetStrokeAttributes (aStrokeAttributes, *this, rState); + +ActionSharedPtr pPolyAction( + internal::PolyPolyActionFactory::createPolyPolyAction( + polygon, rParms.mrCanvas, rState, aStrokeAttributes ) ); + +if( pPolyAction ) +{ +maActions.push_back( +MtfAction( + pPolyAction, + rParms.mrCurrActionIndex ) ); + +rParms.mrCurrActionIndex += pPolyAction-getActionCount()-1; +} +} +} + void ImplRenderer::processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags, sal_uInt32 dataSize, sal_Bool bUseWholeStream) { sal_uInt32 index; @@ -1294,14 +1329,15 @@ namespace cppcanvas EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])-GetPolygon (*this), rFactoryParms, rState, rCanvas, flags 0x8000, brushIndexOrColor); } break; +case EmfPlusRecordTypeDrawEllipse: case EmfPlusRecordTypeFillEllipse: { -sal_uInt32 index = flags 0xff; sal_uInt32 brushIndexOrColor; -rMF brushIndexOrColor; +if ( type == EmfPlusRecordTypeFillEllipse ) +rMF brushIndexOrColor; -EMFP_DEBUG (printf (EMF+ FillEllipse slot: %u\n, (unsigned int)index)); +EMFP_DEBUG (printf
[Libreoffice-commits] core.git: cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx | 37 +++ 1 file changed, 33 insertions(+), 4 deletions(-) New commits: commit f2d9db4ef951d04c63733b08dd8746c196dd5f05 Author: Radek Doulik r...@novell.com Date: Fri Mar 15 16:07:53 2013 +0100 implemented EmfPlusRecordTypeSetClipRect record Change-Id: I0778cf44a1f4e920e723c17c34f6de4f8eed2342 diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 7389e23..011a204 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -72,6 +72,7 @@ #define EmfPlusRecordTypeResetWorldTransform 16427 #define EmfPlusRecordTypeMultiplyWorldTransform 16428 #define EmfPlusRecordTypeSetPageTransform 16432 +#define EmfPlusRecordTypeSetClipRect 16434 #define EmfPlusRecordTypeSetClipPath 16435 #define EmfPlusRecordTypeSetClipRegion 16436 #define EmfPlusRecordTypeDrawDriverString 16438 @@ -1701,27 +1702,55 @@ namespace cppcanvas aWorldTransform.eDx, aWorldTransform.eDy)); break; } +case EmfPlusRecordTypeSetClipRect: +{ +int combineMode = (flags 8) 0xf; + +EMFP_DEBUG (printf (EMF+ SetClipRect combine mode: %d\n, combineMode)); +EMFP_DEBUG (if ( combineMode 1 ) printf (EMF+ TODO combine mode 1\n)); + +float dx, dy, dw, dh; + +ReadRectangle (rMF, dx, dy, dw, dh, false); + +EMFP_DEBUG (printf (EMF+ RectData: %f,%f %fx%f\n, dx, dy, dw, dh)); + +B2DPoint mappedPoint (Map (dx, dy)); +B2DSize mappedSize( MapSize (dw, dh)); + +::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::tools::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(), + mappedPoint.getX() + mappedSize.getX(), + mappedPoint.getY() + mappedSize.getY() ) ) ) ); + +updateClipping (polyPolygon, rFactoryParms, combineMode == 1); + +break; +} case EmfPlusRecordTypeSetClipPath: { -EMFP_DEBUG (printf (EMF+ SetClipPath\n)); +int combineMode = (flags 8) 0xf; + +EMFP_DEBUG (printf (EMF+ SetClipPath combine mode: %d\n, combineMode)); EMFP_DEBUG (printf (EMF+\tpath in slot: %d\n, flags 0xff)); EMFPPath path = *(EMFPPath*) aObjects [flags 0xff]; ::basegfx::B2DPolyPolygon clipPoly (path.GetPolygon (*this)); clipPoly.transform (rState.mapModeTransform); -updateClipping (clipPoly, rFactoryParms, false); +updateClipping (clipPoly, rFactoryParms, combineMode == 1); break; } case EmfPlusRecordTypeSetClipRegion: { +int combineMode = (flags 8) 0xf; + EMFP_DEBUG (printf (EMF+ SetClipRegion\n)); -EMFP_DEBUG (printf (EMF+\tregion in slot: %d combine mode: %d\n, flags 0xff, (flags 0xff00) 8)); +EMFP_DEBUG (printf (EMF+\tregion in slot: %d combine mode: %d\n, flags 0xff, combineMode)); EMFPRegion *region = (EMFPRegion*)aObjects [flags 0xff]; // reset clip if (region region-parts == 0 region-initialState == EmfPlusRegionInitialStateInfinite) { -updateClipping (::basegfx::B2DPolyPolygon (), rFactoryParms, false); +updateClipping (::basegfx::B2DPolyPolygon (), rFactoryParms, combineMode == 1); } else { EMFP_DEBUG (printf (EMF+\tTODO\n)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - 2 commits - canvas/source vcl/inc vcl/source vcl/unx
canvas/source/cairo/cairo_canvasbitmap.cxx | 30 + canvas/source/cairo/cairo_canvasbitmap.hxx |4 canvas/source/cairo/cairo_xlib_cairo.cxx |7 + canvas/source/cairo/cairo_xlib_cairo.hxx |1 vcl/inc/salbmp.hxx |2 vcl/inc/unx/salbmp.h |7 + vcl/inc/unx/salgdi.h |5 vcl/inc/vcl/bitmap.hxx |3 vcl/source/gdi/bitmap.cxx | 13 ++ vcl/source/gdi/gdimtf.cxx | 10 - vcl/source/helper/canvastools.cxx | 25 vcl/unx/generic/gdi/salbmp.cxx | 18 ++- vcl/unx/generic/gdi/salgdi2.cxx| 149 - 13 files changed, 191 insertions(+), 83 deletions(-) New commits: commit c6c0e73e0fda18b7bb37685ab8f8630e15bb427a Author: Radek Doulik r...@novell.com Date: Thu Mar 14 09:36:43 2013 +0100 pass argb32 pixmaps from vcl to canvas, avoiding costly x11 roundtrips - fixes also problem with emf+ rendering for slideshow Change-Id: Icb894d3f37b29f23d3f267c944d827eefbf47fda diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx index 1d62554..949a9ca 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.cxx +++ b/canvas/source/cairo/cairo_canvasbitmap.cxx @@ -143,6 +143,30 @@ namespace cairocanvas return maCanvasHelper.repaint( pSurface, viewState, renderState ); } +void SAL_CALL CanvasBitmap::setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any rAny ) throw (uno::RuntimeException) +{ +sal_Int64 nPointer; + +if ( nHandle == 0 ) +{ +rAny = nPointer; + +if ( nPointer ) +{ +::Bitmap *pBitmap = reinterpret_cast ::Bitmap* ( nPointer ); + +mpBufferSurface = createSurface( *pBitmap ); +mpBufferCairo = mpBufferSurface-getCairo(); + +::Size aSize( pBitmap-GetSizePixel() ); +maSize = ::basegfx::B2ISize( aSize.getWidth(), aSize.getHeight() ); + +maCanvasHelper.setSize( maSize ); +maCanvasHelper.setSurface( mpBufferSurface, mbHasAlpha ); +} +} +} + uno::Any SAL_CALL CanvasBitmap::getFastPropertyValue( sal_Int32 nHandle ) throw (uno::RuntimeException) { uno::Any aRV( sal_Int32(0) ); @@ -161,10 +185,11 @@ namespace cairocanvas #ifdef CAIRO_HAS_XLIB_SURFACE X11Surface* pXlibSurface=dynamic_castX11Surface*(mpBufferSurface.get()); OSL_ASSERT(pXlibSurface); -uno::Sequence uno::Any args( 3 ); +uno::Sequence uno::Any args( 4 ); args[0] = uno::Any( false ); // do not call XFreePixmap on it args[1] = uno::Any( pXlibSurface-getPixmap()-mhDrawable ); args[2] = uno::Any( sal_Int32( pXlibSurface-getDepth() ) ); +args[3] = uno::Any( sal_Int64( pXlibSurface-getVisual () ) ); aRV = uno::Any( args ); #elif defined CAIRO_HAS_QUARTZ_SURFACE @@ -189,7 +214,7 @@ namespace cairocanvas case 2: { #ifdef CAIRO_HAS_XLIB_SURFACE -uno::Sequence uno::Any args( 3 ); +uno::Sequence uno::Any args( 4 ); SurfaceSharedPtr pAlphaSurface = mpSurfaceProvider-createSurface( maSize, CAIRO_CONTENT_COLOR ); CairoSharedPtr pAlphaCairo = pAlphaSurface-getCairo(); X11Surface* pXlibSurface=dynamic_castX11Surface*(pAlphaSurface.get()); @@ -208,6 +233,7 @@ namespace cairocanvas args[0] = uno::Any( true ); args[1] = ::com::sun::star::uno::Any( pPixmap-mhDrawable ); args[2] = ::com::sun::star::uno::Any( sal_Int32( pXlibSurface-getDepth () ) ); +args[3] = ::com::sun::star::uno::Any( sal_Int64( pXlibSurface-getVisual () ) ); pPixmap-clear(); // caller takes ownership of pixmap // return pixmap and alphachannel pixmap - it will be used in BitmapEx diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index 1626c92..523228c 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -124,14 +124,14 @@ namespace cairocanvas // 2nd the pixmap handle // 3rd the pixmap depth virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException); -virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any) throw (::com::sun::star::uno::RuntimeException) {} +virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any) throw (::com::sun::star::uno::RuntimeException); private
[Libreoffice-commits] core.git: vcl/inc vcl/source vcl/unx
vcl/inc/salbmp.hxx |2 vcl/inc/unx/salbmp.h|3 vcl/inc/unx/salgdi.h|5 + vcl/source/gdi/gdimtf.cxx | 10 -- vcl/unx/generic/gdi/salbmp.cxx |2 vcl/unx/generic/gdi/salgdi2.cxx | 147 ++-- 6 files changed, 97 insertions(+), 72 deletions(-) New commits: commit 46e53913e9dcc84ffed8fb5f1b4959c70c7e5649 Author: Radek Doulik r...@novell.com Date: Thu Mar 7 13:31:34 2013 +0100 fix canvas bitmap rendering (argb32 pixmaps) fixes color issue in n#780830 Change-Id: I5242bbb171ba21da43e535255b7e9dd73c1d4930 diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx index 99b5e6a..03f9af9 100644 --- a/vcl/inc/salbmp.hxx +++ b/vcl/inc/salbmp.hxx @@ -47,6 +47,8 @@ public: virtual boolCreate( const ::com::sun::star::uno::Reference ::com::sun::star::rendering::XBitmapCanvas xBitmapCanvas, Size rSize, bool bMask = false ) = 0; +virtual boolHasAlpha() const { return false; } +virtual voidSetHasAlpha( bool ) { } virtual voidDestroy() = 0; virtual SizeGetSize() const = 0; virtual sal_uInt16 GetBitCount() const = 0; diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h index 866412d..6973507 100644 --- a/vcl/inc/unx/salbmp.h +++ b/vcl/inc/unx/salbmp.h @@ -74,6 +74,7 @@ private: BitmapBuffer* mpDIB; ImplSalDDB* mpDDB; boolmbGrey; +boolmbHasAlpha; public: @@ -148,6 +149,8 @@ public: virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ); virtual voidReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); virtual boolGetSystemData( BitmapSystemData rData ); +virtual boolHasAlpha() const { return mbHasAlpha; } +virtual voidSetHasAlpha( bool bHasAlpha ) { mbHasAlpha = bHasAlpha; } }; // -- diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index f1039e9..3684dd0 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -324,6 +324,11 @@ public: const SalBitmap rSourceBitmap, const SalBitmap rAlphaBitmap ); +booldrawAlphaBitmapOpt( const SalTwoRect, +const SalBitmap rSourceBitmap, +const SalBitmap rAlphaBitmap, +bool bUseAlphaBitmap = true ); + virtual booldrawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index bf19753..a561d64 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -496,20 +496,16 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point rPos, S } SalBitmap* pSalBmp = ImplGetSVData()-mpDefInst-CreateSalBitmap(); -SalBitmap* pSalMask = ImplGetSVData()-mpDefInst-CreateSalBitmap(); +pSalBmp-SetHasAlpha( true ); -if( pSalBmp-Create( xBitmapCanvas, aSize ) pSalMask-Create( xBitmapCanvas, aSize, true ) ) +if( pSalBmp-Create( xBitmapCanvas, aSize ) ) { Bitmap aBitmap( pSalBmp ); -Bitmap aMask( pSalMask ); -AlphaMask aAlphaMask( aMask ); -BitmapEx aBitmapEx( aBitmap, aAlphaMask ); -pOut-DrawBitmapEx( rPos, aBitmapEx ); +pOut-DrawBitmap( rPos, aBitmap ); return true; } delete pSalBmp; -delete pSalMask; } } } diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index aee24dd..faa04c7 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -42,6 +42,7 @@ #include unx/salbmp.h #include unx/salinst.h #include unx/x11/xlimits.hxx +#include xrender_peer.hxx #if defined HAVE_VALGRIND_HEADERS #include valgrind/memcheck.h @@ -65,6 +66,7 @@ X11SalBitmap::X11SalBitmap() : mpDIB( NULL ) , mpDDB( NULL ) , mbGrey( false ) +, mbHasAlpha( false ) { } diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index 97d1924..4684842 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -495,7 +495,10 @@ void X11SalGraphics::drawBitmap( const SalTwoRect* pPosAry, const SalBitmap rSa XChangeGC( pXDisp, aGC, nValues, aNewVal ); } -static_castconst X11SalBitmap
[Libreoffice-commits] core.git: 2 commits - sd/source xmloff/source
sd/source/ui/unoidl/unomodel.cxx | 58 + xmloff/source/draw/sdxmlexp.cxx | 68 +++ xmloff/source/draw/sdxmlexp_impl.hxx |1 3 files changed, 112 insertions(+), 15 deletions(-) New commits: commit b40bcde076f9fabf24810d2520e878d604d99637 Author: Radek Doulik r...@novell.com Date: Fri Mar 1 13:03:06 2013 +0100 finish font embedding, use the new Fonts document property Change-Id: I4cd6b8c11fb1efe9f97d2c5e474bd0bdcc9ed505 diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index ca33ff0..5ffed47 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1806,6 +1806,12 @@ void SdXMLExport::_ExportMeta() // +void SdXMLExport::_ExportFontDecls() +{ +GetFontAutoStylePool(); // make sure the pool is created +SvXMLExport::_ExportFontDecls(); +} + void SdXMLExport::_ExportContent() { // export pres:header-decl, pres:footer-decl and pres:date-time-decl elements @@ -2807,25 +2813,25 @@ uno::Reference uno::XInterface SAL_CALL classname##_createInstance(const uno: } SERVICE( XMLImpressExportOasis, com.sun.star.comp.Impress.XMLOasisExporter, XMLImpressExportOasis, sal_False, EXPORT_OASIS|EXPORT_META|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_SETTINGS|EXPORT_FONTDECLS|EXPORT_EMBEDDED ); -SERVICE( XMLImpressStylesExportOasis, com.sun.star.comp.Impress.XMLOasisStylesExporter, XMLImpressStylesExportOasis, sal_False, EXPORT_OASIS|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES ); +SERVICE( XMLImpressStylesExportOasis, com.sun.star.comp.Impress.XMLOasisStylesExporter, XMLImpressStylesExportOasis, sal_False, EXPORT_OASIS|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_FONTDECLS ); SERVICE( XMLImpressContentExportOasis, com.sun.star.comp.Impress.XMLOasisContentExporter, XMLImpressContentExportOasis, sal_False, EXPORT_OASIS|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_FONTDECLS ); SERVICE( XMLImpressMetaExportOasis, com.sun.star.comp.Impress.XMLOasisMetaExporter, XMLImpressMetaExportOasis, sal_False, EXPORT_OASIS|EXPORT_META ); SERVICE( XMLImpressSettingsExportOasis, com.sun.star.comp.Impress.XMLOasisSettingsExporter, XMLImpressSettingsExportOasis, sal_False, EXPORT_OASIS|EXPORT_SETTINGS ); SERVICE( XMLImpressExportOOO, com.sun.star.comp.Impress.XMLExporter, XMLImpressExportOOO, sal_False, EXPORT_META|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_SETTINGS|EXPORT_FONTDECLS|EXPORT_EMBEDDED ); -SERVICE( XMLImpressStylesExportOOO, com.sun.star.comp.Impress.XMLStylesExporter, XMLImpressStylesExportOOO, sal_False, EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES ); +SERVICE( XMLImpressStylesExportOOO, com.sun.star.comp.Impress.XMLStylesExporter, XMLImpressStylesExportOOO, sal_False, EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_FONTDECLS ); SERVICE( XMLImpressContentExportOOO, com.sun.star.comp.Impress.XMLContentExporter, XMLImpressContentExportOOO, sal_False, EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_FONTDECLS ); SERVICE( XMLImpressMetaExportOOO, com.sun.star.comp.Impress.XMLMetaExporter, XMLImpressMetaExportOOO, sal_False, EXPORT_META ); SERVICE( XMLImpressSettingsExportOOO, com.sun.star.comp.Impress.XMLSettingsExporter, XMLImpressSettingsExportOOO, sal_False, EXPORT_SETTINGS ); SERVICE( XMLDrawExportOasis, com.sun.star.comp.Draw.XMLOasisExporter, XMLDrawExportOasis, sal_True, EXPORT_OASIS|EXPORT_META|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_SETTINGS|EXPORT_FONTDECLS|EXPORT_EMBEDDED ); -SERVICE( XMLDrawStylesExportOasis, com.sun.star.comp.Draw.XMLOasisStylesExporter, XMLDrawStylesExportOasis, sal_True, EXPORT_OASIS|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES ); +SERVICE( XMLDrawStylesExportOasis, com.sun.star.comp.Draw.XMLOasisStylesExporter, XMLDrawStylesExportOasis, sal_True, EXPORT_OASIS|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_FONTDECLS ); SERVICE( XMLDrawContentExportOasis, com.sun.star.comp.Draw.XMLOasisContentExporter, XMLDrawContentExportOasis, sal_True, EXPORT_OASIS|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_FONTDECLS ); SERVICE( XMLDrawMetaExportOasis, com.sun.star.comp.Draw.XMLOasisMetaExporter, XMLDrawMetaExportOasis, sal_True, EXPORT_OASIS|EXPORT_META ); SERVICE( XMLDrawSettingsExportOasis, com.sun.star.comp.Draw.XMLOasisSettingsExporter, XMLDrawSettingsExportOasis, sal_True, EXPORT_OASIS|EXPORT_SETTINGS ); SERVICE( XMLDrawExportOOO, com.sun.star.comp.Draw.XMLExporter, XMLDrawExportOOO, sal_True, EXPORT_META|EXPORT_STYLES|EXPORT_MASTERSTYLES|EXPORT_AUTOSTYLES|EXPORT_CONTENT|EXPORT_SCRIPTS|EXPORT_SETTINGS|EXPORT_FONTDECLS|EXPORT_EMBEDDED ); -SERVICE( XMLDrawStylesExportOOO
[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - drawinglayer/source
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit b50c8f2cbc477a784dec00be1a91e4743bd2cf8a Author: Radek Doulik r...@novell.com Date: Fri Dec 14 12:09:36 2012 +0100 fix emf+ rendering Change-Id: Ib49898362f7e648a8ce9c27b5e5b4f0b2ad93afd diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index b78ac5b..f9d583d 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1631,8 +1631,9 @@ namespace drawinglayer case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D : { static bool bUseMetaFilePrimitiveDecomposition(true); +const primitive2d::MetafilePrimitive2D aMetafile = static_cast const primitive2d::MetafilePrimitive2D (rCandidate); -if(bUseMetaFilePrimitiveDecomposition) +if(bUseMetaFilePrimitiveDecomposition !aMetafile.getMetaFile().GetUseCanvas()) { // use new Metafile decomposition process(rCandidate.get2DDecomposition(getViewInformation2D())); @@ -1640,7 +1641,7 @@ namespace drawinglayer else { // direct draw of MetaFile, use default pocessing -RenderMetafilePrimitive2D(static_cast const primitive2d::MetafilePrimitive2D (rCandidate)); +RenderMetafilePrimitive2D(aMetafile); } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/filter/wmf/winwmf.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 199f0edc93e25ff8144f16599184049573154232 Author: Radek Doulik r...@novell.com Date: Mon Feb 25 12:53:56 2013 +0100 allow WMF's with missing EOF record Change-Id: Ifb38336863979890f1bc3de779d82454b4a5c185 diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index ecdf04d..97a705b 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -1188,7 +1188,7 @@ void WMFReader::ReadWMF() || pWMF-IsEof() ) { -if( pWMF-IsEof() ) +if( pWMF-IsEof() nPos != nEndPos) pWMF-SetError( SVSTREAM_FILEFORMAT_ERROR ); break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/inc sd/source
sd/inc/drawdoc.hxx |5 + sd/source/core/drawdoc.cxx |1 + sd/source/ui/docshell/docshel4.cxx | 13 + sd/source/ui/inc/DrawDocShell.hxx |2 ++ sd/source/ui/unoidl/UnoDocumentSettings.cxx | 21 - 5 files changed, 41 insertions(+), 1 deletion(-) New commits: commit 64cdf8072a79491903c5d1b107c6486b33da04d3 Author: Radek Doulik r...@novell.com Date: Fri Feb 22 12:03:54 2013 +0100 added EmbedFonts property, added File/Properties/Font tab Change-Id: Id2a812c4b5347e2851149a1bd46eaec4b40d0f12 diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 2ab95ab..56bab28 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -188,6 +188,8 @@ private: std::vector rtl::OUString maAnnotationAuthors; +boolmbUseEmbedFonts; + protected: virtual ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface createUnoModel(); @@ -557,6 +559,9 @@ public: sal_uInt16 GetAnnotationAuthorIndex( const rtl::OUString rAuthor ); +bool IsUsingEmbededFonts() { return mbUseEmbedFonts; } +void SetIsUsingEmbededFonts( bool bUse ) { mbUseEmbedFonts = bUse; } + private: /** This member stores the printer independent layout mode. Please refer to memberSetPrinterIndependentLayout()/member for its diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 18a04bd..5b7d3e4 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -163,6 +163,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) , mpLocale(NULL) , mpDrawPageListWatcher(0) , mpMasterPageListWatcher(0) +, mbUseEmbedFonts(false) { mpDrawPageListWatcher = ::std::auto_ptrImpDrawPageListWatcher( new ImpDrawPageListWatcher(*this)); diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 936e86e..195ca1c 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -29,6 +29,7 @@ #include svl/aeitem.hxx #include svl/flagitem.hxx #include sot/storage.hxx +#include sfx2/dinfdlg.hxx #include sfx2/docfile.hxx #include sfx2/docfilt.hxx #include sfx2/dispatch.hxx @@ -997,6 +998,18 @@ void DrawDocShell::OpenBookmark( const String rBookmarkURL ) ( mpViewShell ? mpViewShell-GetViewFrame() : SfxViewFrame::Current() )-GetBindings().Execute( SID_OPENHYPERLINK, ppArgs ); } +SfxDocumentInfoDialog* DrawDocShell::CreateDocumentInfoDialog( ::Window *pParent, const SfxItemSet rSet ) +{ +SfxDocumentInfoDialog* pDlg = new SfxDocumentInfoDialog( pParent, rSet ); +DrawDocShell* pDocSh = PTR_CAST(DrawDocShell,SfxObjectShell::Current()); + +if( pDocSh == this ) +{ +pDlg-AddFontTabPage(); +} +return pDlg; +} + } // end of namespace sd /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index bcf7d4a..eb75a3c 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -98,6 +98,8 @@ public: virtual SizeGetFirstPageSize(); virtual voidFillClass(SvGlobalName* pClassName, sal_uInt32* pFormat, String* pAppName, String* pFullTypeName, String* pShortTypeName, sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const; virtual voidSetModified( sal_Bool = sal_True ); +virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( ::Window *pParent, + const SfxItemSet rSet ); using SotObject::GetInterface; using SfxObjectShell::GetVisArea; diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index c83a3f8..7c3ba84 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -141,7 +141,7 @@ enum SdDocumentSettingsPropertyHandles HANDLE_PRINTER_INDEPENDENT_LAYOUT // #i33095# ,HANDLE_LOAD_READONLY, HANDLE_SAVE_VERSION -,HANDLE_SLIDESPERHANDOUT, HANDLE_HANDOUTHORIZONTAL +,HANDLE_SLIDESPERHANDOUT, HANDLE_HANDOUTHORIZONTAL, HANDLE_EMBED_FONTS }; #define MID_PRINTER 1 @@ -202,6 +202,7 @@ enum SdDocumentSettingsPropertyHandles // -- #i33095# { MAP_LEN(LoadReadonly), HANDLE_LOAD_READONLY, ::getBooleanCppuType(),0, 0 }, { MAP_LEN(SaveVersionOnClose),HANDLE_SAVE_VERSION, ::getBooleanCppuType(),0, 0 }, +{ MAP_LEN(EmbedFonts),HANDLE_EMBED_FONTS, ::getBooleanCppuType(),0, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; @@ -902,6 +903,18 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c } break; +case HANDLE_EMBED_FONTS
[Libreoffice-commits] core.git: xmloff/source
xmloff/source/draw/sdxmlexp.cxx | 13 + xmloff/source/draw/sdxmlexp_impl.hxx |1 + 2 files changed, 14 insertions(+) New commits: commit f0cd6fe9075cd0aa00162474784ad804a07ed138 Author: Radek Doulik r...@novell.com Date: Fri Feb 22 18:06:18 2013 +0100 use document settings / embed fonts when exporting odp Change-Id: I9e8db1ae08b570f093b13d50bfde823c85cdba95 diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index d33db72..441dbf0 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2901,4 +2901,17 @@ OUString SAL_CALL SdXMLExport::getImplementationName() throw( uno::RuntimeExcept } } +XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool() +{ +bool bEmbedFonts = false; +Reference lang::XMultiServiceFactory xFac( GetModel(), UNO_QUERY ); +if( xFac.is() ) +{ +Reference beans::XPropertySet xProps( xFac-createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.document.Settings ) ) ), UNO_QUERY ); +if( xProps.is() ) +xProps-getPropertyValue(EmbedFonts) = bEmbedFonts; +} +return new XMLFontAutoStylePool( *this, bEmbedFonts ); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index 166f573..cc5a5ed 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.hxx @@ -174,6 +174,7 @@ class SdXMLExport : public SvXMLExport protected: virtual void GetViewSettings(com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue aProps); virtual void GetConfigurationSettings(com::sun::star::uno::Sequencecom::sun::star::beans::PropertyValue aProps); +virtual XMLFontAutoStylePool* CreateFontAutoStylePool(); public: SdXMLExport( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - sfx2/source svl/source xmloff/source
sfx2/source/appl/sfxhelp.cxx | 43 ++- sfx2/source/bastyp/helper.cxx| 10 sfx2/source/inc/helper.hxx |4 +-- svl/source/items/custritm.cxx| 16 ++--- xmloff/source/draw/sdxmlimp.cxx | 11 xmloff/source/draw/sdxmlimp_impl.hxx |1 6 files changed, 45 insertions(+), 40 deletions(-) New commits: commit eb451cbc1aa2f96b1a913d85823ef27275ad367b Author: Radek Doulik r...@novell.com Date: Fri Feb 22 18:15:22 2013 +0100 set document settings / embed fonts when importing odp Change-Id: Ib7160c3b00399e704cd02a41735b0ff4f13d8554 diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 6797c73..3c86883 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -1068,4 +1068,15 @@ void SdXMLImport::AddDateTimeDecl( const ::rtl::OUString rName, const ::rtl::OU return aDecl.maStrText; } +void SdXMLImport::NotifyEmbeddedFontRead() +{ +uno::Reference lang::XMultiServiceFactory xFac( GetModel(), uno::UNO_QUERY ); +if( xFac.is() ) +{ +uno::Reference beans::XPropertySet xProps( xFac-createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.document.Settings ) ) ), uno::UNO_QUERY ); +if( xProps.is() ) +xProps-setPropertyValue(EmbedFonts, uno::makeAny( true ) ); +} +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index dbede52..43ba353 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -310,6 +310,7 @@ public: ::rtl::OUString GetFooterDecl( const ::rtl::OUString rName ) const; ::rtl::OUString GetDateTimeDecl( const ::rtl::OUString rName, sal_Bool rbFixed, ::rtl::OUString rDateTimeFormat ); +virtual void NotifyEmbeddedFontRead() SAL_OVERRIDE; }; #endif // _SDXMLIMP_HXX commit 046ad9ffad7b4647fcc66291dec73bbb67a7fe85 Author: Ivan Timofeev timofeev@gmail.com Date: Fri Feb 22 21:09:12 2013 +0400 fix string conversion in 1da3af5f1eb6a32fd0ab10da7cf2f8ddb298a3a1 Change-Id: I683002c12f9bb8f053dafea70c889a2881a70b99 diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx index 3b3128d..d44b43c 100644 --- a/svl/source/items/custritm.cxx +++ b/svl/source/items/custritm.cxx @@ -54,19 +54,9 @@ int CntUnencodedStringItem::Compare(SfxPoolItem const rWith) const DBG_CHKTHIS(CntUnencodedStringItem, 0); DBG_ASSERT(rWith.ISA(CntUnencodedStringItem), CntUnencodedStringItem::Compare(): Bad type); -switch (m_aValue.compareTo(static_cast CntUnencodedStringItem const * ( - rWith)- - m_aValue)) -{ -case COMPARE_LESS: -return -1; - -case COMPARE_EQUAL: -return 0; - -default: // COMPARE_GREATER -return 1; -} +sal_Int32 nCmp = m_aValue.compareTo( +static_cast CntUnencodedStringItem const * (rWith)-m_aValue); +return (nCmp == 0) ? 0 : (nCmp 0) ? -1 : 1; } // commit 3a5ae29f0d2f4467ec75803d6e3b5b461672428a Author: Ivan Timofeev timofeev@gmail.com Date: Fri Feb 22 15:19:38 2013 +0400 String - OUString Change-Id: I5b577a8e0675d7849ca22e24bb99ee2d8602ae6a diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index fa346a8..6b6aeea 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -126,12 +126,12 @@ static OUString HelpLocaleString() if (!osl::DirectoryItem::get(sHelpPath, aDirItem) == osl::FileBase::E_None) { bOk = false; -String sLang(aLocaleStr); -xub_StrLen nSepPos = sLang.Search( '-' ); -if (nSepPos != STRING_NOTFOUND) +OUString sLang(aLocaleStr); +sal_Int32 nSepPos = sLang.indexOf( '-' ); +if (nSepPos != -1) { bOk = true; -sLang = sLang.Copy( 0, nSepPos ); +sLang = sLang.copy( 0, nSepPos ); sHelpPath = aBaseInstallPath + OUString::createFromAscii(szHelpPath) + sLang; if (!osl::DirectoryItem::get(sHelpPath, aDirItem) == osl::FileBase::E_None) @@ -185,7 +185,7 @@ sal_Bool GetHelpAnchor_Impl( const OUString _rURL, OUString _rAnchor ) if ( !sAnchor.isEmpty() ) { -_rAnchor = String( sAnchor ); +_rAnchor = sAnchor; bRet = sal_True; } } @@ -307,7 +307,7 @@ public: ~SfxHelp_Impl(); SfxHelpOptions_Impl*GetOptions(); -static String GetHelpText( const OUString
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - xmloff/source
xmloff/source/core/xmlexp.cxx |3 ++- xmloff/source/draw/sdxmlexp.cxx|5 - xmloff/source/draw/shapeexport4.cxx|5 - xmloff/source/draw/ximpcustomshape.cxx |7 +++ 4 files changed, 13 insertions(+), 7 deletions(-) New commits: commit b86778cb002d7302d26e0dfe12c3bee3eeefc5d7 Author: Radek Doulik r...@novell.com Date: Thu Jul 19 11:06:50 2012 +0200 odf: export arcangleto commands in enhanced path (use drawooo namespace) Change-Id: I43a2c08ee8dfc0abe4d05579b837b5be0944c0fe (cherry picked from commit d8720d4e390143279ccae8eed05decf54240e8fa) Signed-off-by: David Tardon dtar...@redhat.com diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 9dc41e6..553395f 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -376,7 +376,8 @@ void SvXMLExport::_InitCtor() GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT); mpNamespaceMap-Add( GetXMLToken(XML_NP_CALC_EXT), GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT); - +mpNamespaceMap-Add( +GetXMLToken(XML_NP_DRAW_EXT), GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT); } } if( (getExportFlags() (EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 ) diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index ce4d418..8927e92 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -641,11 +641,6 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference lang::XComponent GetXMLToken(XML_NP_OFFICE_EXT), GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT); - -_GetNamespaceMap().Add( -GetXMLToken(XML_NP_DRAW_EXT), -GetXMLToken(XML_N_DRAW_EXT), -XML_NAMESPACE_DRAW_EXT); } GetShapeExport()-enableLayerExport(); diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index aa4701d..43e75f9 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -329,6 +329,7 @@ void ImpExportEnhancedPath( SvXMLExport rExport, rtl::OUString aStr; rtl::OUStringBuffer aStrBuffer; +sal_uInt16 aNamespace = XML_NAMESPACE_DRAW; sal_Int32 i, j, k, l; @@ -413,6 +414,8 @@ void ImpExportEnhancedPath( SvXMLExport rExport, aStrBuffer.append( (sal_Unicode)'Y' ); nParameter = 1; break; case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO : aStrBuffer.append( (sal_Unicode)'Q' ); nParameter = 2; break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO : +aStrBuffer.append( (sal_Unicode)'G' ); nParameter = 2; aNamespace = XML_NAMESPACE_DRAW_EXT; break; default : // ups, seems to be something wrong { @@ -442,7 +445,7 @@ void ImpExportEnhancedPath( SvXMLExport rExport, } } aStr = aStrBuffer.makeStringAndClear(); -rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ENHANCED_PATH, aStr ); +rExport.AddAttribute( aNamespace, XML_ENHANCED_PATH, aStr ); } void ImpExportEnhancedGeometry( SvXMLExport rExport, const uno::Reference beans::XPropertySet xPropSet ) diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index 0736fe3..f8966a1 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -667,6 +667,13 @@ void GetEnhancedPath( std::vector com::sun::star::beans::PropertyValue rDest nIndex++; } break; +case 'G' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO; +nParametersNeeded = 2; +nIndex++; +} +break; case 'W' : { nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source
oox/source/export/drawingml.cxx | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) New commits: commit 2e14a8bf03cefe831eb7694ea903115bc4b61ecf Author: Radek Doulik r...@novell.com Date: Fri Feb 8 15:52:41 2013 +0100 fix invalid USS macro use, the result is for immediate use in calls - otherwise it will became invalid immediately as in this case and contain some random value from stack Change-Id: I9e9e9660ec5d391549b16c6a0510c97cc11e7442 diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8389b3a..ccf25b9 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -779,20 +779,15 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs } if( GETAD( CharFontName ) ) { -const char* typeface = NULL; const char* pitch = NULL; const char* charset = NULL; OUString usTypeface; mAny = usTypeface; -String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); -if( aSubstName.Len() ) -typeface = USS( aSubstName ); -else -typeface = USS( usTypeface ); +OUString aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); mpFS-singleElementNS( XML_a, XML_latin, - XML_typeface, typeface, + XML_typeface, USS(aSubstName.getLength() ? aSubstName : usTypeface), XML_pitchFamily, pitch, XML_charset, charset, FSEND ); @@ -805,14 +800,10 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs OUString usTypeface; mAny = usTypeface; -String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); -if( aSubstName.Len() ) -typeface = USS( aSubstName ); -else -typeface = USS( usTypeface ); +OUString aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | SUBSFONT_MS ) ); mpFS-singleElementNS( XML_a, bComplex ? XML_cs : XML_ea, - XML_typeface, typeface, + XML_typeface, USS(aSubstName.getLength() ? aSubstName : usTypeface), XML_pitchFamily, pitch, XML_charset, charset, FSEND ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: xmloff/source
xmloff/source/draw/shapeexport4.cxx| 24 xmloff/source/draw/ximpcustomshape.cxx | 28 2 files changed, 52 insertions(+) New commits: commit 143ecebc73e84dfcafdc2577f811152b4a415fde Author: Radek Doulik r...@novell.com Date: Fri Feb 1 12:25:23 2013 +0100 export darken/darkeless/lighten/lightenless commands Change-Id: I4531ab82a52e3da41f12409185f7c0730381aa23 diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 1bb5481..ce504fe 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -413,6 +413,30 @@ void ImpExportEnhancedPath( SvXMLExport rExport, i += 2; } break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKEN : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'H' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'I' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'J' ); +else +bNeedExtended = true; +break; +case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS : +if ( bExtended ) +aStrBuffer.append( (sal_Unicode)'K' ); +else +bNeedExtended = true; +break; default : // ups, seems to be something wrong { aSegment.Count = 1; diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index a3406ed..1a280ef 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -702,6 +702,34 @@ void GetEnhancedPath( std::vector com::sun::star::beans::PropertyValue rDest nIndex++; } break; +case 'H' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKEN; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'I' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'J' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN; +nParametersNeeded = 0; +nIndex++; +} +break; +case 'K' : +{ +nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS; +nParametersNeeded = 0; +nIndex++; +} +break; case 'W' : { nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: pptx import filter
Hi Jean-Tiare, On Sun, 2012-08-19 at 10:25 -0400, Jean-Tiare LE BIGOT wrote: Hi all, Thanks for the tip. I spend hours tracing the bug with GDB but I stuck. I can not figure out where to fix it. Here is the situation: I have a pptx file with - title (fine) - 4 items in a list (buggy) In Powerpoint, all the text in the list is 18p but a signe word is 8p. In Impress, the begin of the text is 20p, the word at 8p is 8p an the remaining text is 8p also. After bisecting the pptx file, it appears that there is an empty span at the very beginning of the first list item. It's size is set to 20p. The only other span with a size specified is the one at 8p. All other elements have no size information on them. When an element has no size specified, it is imported with the same size as the immediate previous element whereas it should take the default size specified in the theme. In my case, the size is specified in the MasterSlide-OtherStyle-lvl1pPr. in the import filter, there is a file oox/source/drawingml/textrun.cxx:63 This is the only line where the size appears to be used in a computation. Ideed, manually forcing the size to 18 when at 0 fixes the problem for me. But... It's really not the right place nor the right way to do it since it would orverride the theme... I also know the themes in the master slide are imported properly. I also traced the code down to pptshape.cxx where the text seems to be imported into the core. I obviously missed something... My question is: where can I fix this you run into quite complex area. The text list style can be set from many sources (presentation style, master style, theme, placeholders, with various precedence). I think ppt/pptshape.cxx and drawingml/shape.cxx are right places to look at. I would start at Shape::createAndInsert and look where the wrong size appears and try to find where it comes from and/or if the master style was applied. Cheers Radek Thanks a lot for your help (and patient reading) Le 2012-08-17 15:31, Miklos Vajna a écrit : On Fri, Aug 17, 2012 at 03:54:25PM +0200, Jean-Tiare LE BIGOT ad...@jtlebi.fr wrote: Is there anyone already working on the pptx import filter ? I'd like to work on the font size import. Is there any code shared between the pptx/docx/... filters ? Hi, Look under the oox/ module, that's shared between docx/xlsx/pptx. Miklos ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] Get rid of icc module
On Sun, 2012-06-03 at 22:29 +0200, Fridrich Strba wrote: Hello, What do you think about this patch that gets rid of the icc module and generates the sRGB icc profile when needed using lcms2 that is part of LO anyway. I would not mind this to be part of 3.6, but then do you people object? Looks OK to me. I have used lcms2 few times and it always worked great. Makes sense to use it when we already link with it. Cheers Radek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PUSHED] Re: [PATCH] Fix autogen.sh configuration when ACLOCAL_FLAGS are non-empty
Hi Ruslan, thanks for your patch. Pushed. Cheers Radek On Fri, 2012-05-11 at 22:31 +0400, Ruslan Kabatsayev wrote: Hello all. Current autogen.sh only sets -I ./m4 when ACLOCAL_FLAGS are empty, leading to problems with expansion of libo_MINGW_CHECK_DLL macro. As people on IRC have said, it should append this option to existing flags. So, I'm attaching a patch which fixes this. Regards, Ruslan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] export correct alpha information to xlsx
Hi Markus, could you please send me the document you use to test you patch so that I can look at it? I have checked tools/color.hxx and the transparency is indeed 255 for full transparency, so if the method you fixed outputs alpha then your patch looks correct. Cheers Radek On Sun, 2012-05-13 at 13:44 +0200, Markus Mohrhard wrote: Hey, while investigating some problems around color scale export to xlsx I came across a difference between an original excel document and our exported version of the document. It seems that we are always missing to export the right alpha information or I'm just not understanding the file correctly. It seems that excel opens both versions correctly but that makes it even more mysterious for me. Does anyone have an idea if this patch is correct? At least the color information looks the same between both versions. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: fdo #36946 -- categories for slide transitions in impress -- where to implement categorisation
Hi Andrzej, thanks a lot for looking into this! On Tue, 2012-04-03 at 15:51 +0200, Andrzej J. R. Hunt wrote: Hi, I'm currently working on adding categories to the transitions viewable in the Impress GUI (https://bugs.freedesktop.org/show_bug.cgi?id=36946). I'm not sure how best to assign categories to the transitions. The list of transitions is in xml/transitions.xml, which is loaded by source/core/TransitionPreset.cxx. Initially I used the transition-type (mnTransition) as the category, which does work, but results in too many categories, many of which should be joined into one. Therefore I'd like to create new UI categories, but don't know where I should do this. Yup, having fewer categories makes sense. Powerpoint 2010 has only 3 categories too. I could assign the categories directly in the transitions.xml file (which would require some changes to the code importing this file, including changes in xmloff), or I could write a new method in the TransitionPreset class that contains a list of which transition types map to which UI categories (much simpler to write, but less elegant in the case that someone adds more transitions to the file). Which of these options should I choose, or is there a better way that I could do this? I would prefer adding the information into transitions.xml. Otherwise it would be less clear when adding new transitions. Cheers Radek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [REVIEW-3-5][CHERRY-PICKED-3-5] Fix fdo#45219 wrong transparency for animated objects.
Hi Thorsten, looks good, cherry picked an pushed. Cheers Radek On Fri, 2012-03-16 at 18:26 +0100, Thorsten Behrens wrote: Hi there, http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c7e061997202df9e602e209cf40c61606582e8e fixes the most obvious glitch in fdo#45219 - multiple paints of the same sprite on top of each other, killing the hue for transparent objects. (std::unique in this case _needs_ to eliminate duplicate, but otherwise equal-under-SpriteWeakOrder entries. Also, std::unique wants a BinaryPredicate, not a StrictWeakOrder. Note further that the used rtl::Reference does have a working operator==) Cheers, -- Thorsten ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [REVIEW 3-5] Custom Shapes compile speedup ...
Hi Michael, thanks. The patch looks good to me. Pushed. It doesn't change the properties data, so it shouldn't break anything. I guess I will cook another sample document containing all presets for easier future testing. Cheers Radek On Fri, 2012-03-02 at 17:44 +, Michael Meeks wrote: Hi guys, I'd like to propose this for cherry-picking: http://cgit.freedesktop.org/libreoffice/core/commit/?id=f291fb57d087de41385a22dfacd8b694d8b9abc7 the rather large and tedious patch it generates is this: http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4157cefc5416ebea75a460e7dbff91293bff321 Which also needs picking. Wrt. compile times here is what it does for me: Linux Windows VM Before: 1m13.067s 23m10.179 After: 0m16.993s0m5.808 So - it really did turn out to be faster to fix than to compile ;-) Of course, prolly I -totally- broke it, but it still loads the nice customshapes-all document (at least for me) - I'd like Radek to review it before we go anywhere. I'm just poking to see if I can squeeze a bit more time space out of this, but I'm fairly confident that this is the major win. HTH, Michael. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [REVIEW 3-5] Custom Shapes compile speedup ...
Hi again, On Fri, 2012-03-02 at 19:51 +0100, Radek Doulik wrote: Hi Michael, thanks. The patch looks good to me. Pushed. It doesn't change the properties data, so it shouldn't break anything. I guess I will cook another sample document containing all presets for easier future testing. pushed change to PPTXs generator. We now generate preset-cshape-*.pptx documents as well, which might come handy when testing. All the presets indeed look OK, so I guess no harm was done ;-) http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3c0a952a7607436224fe57f9e1665597702f6b2 Cheers Radek Cheers Radek On Fri, 2012-03-02 at 17:44 +, Michael Meeks wrote: Hi guys, I'd like to propose this for cherry-picking: http://cgit.freedesktop.org/libreoffice/core/commit/?id=f291fb57d087de41385a22dfacd8b694d8b9abc7 the rather large and tedious patch it generates is this: http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4157cefc5416ebea75a460e7dbff91293bff321 Which also needs picking. Wrt. compile times here is what it does for me: Linux Windows VM Before: 1m13.067s 23m10.179 After: 0m16.993s0m5.808 So - it really did turn out to be faster to fix than to compile ;-) Of course, prolly I -totally- broke it, but it still loads the nice customshapes-all document (at least for me) - I'd like Radek to review it before we go anywhere. I'm just poking to see if I can squeeze a bit more time space out of this, but I'm fairly confident that this is the major win. HTH, Michael. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PUSHED] Re: [PATCH] Remove unused code
Hi Björgvin, looks good to me. Pushed. Thanks! Cheers Radek On Wed, 2012-02-15 at 01:10 +, Björgvin Ragnarsson wrote: Hi, Attached is a patch for removal of unused code in files core/basegfx/source/polygon/b3dpolygontools.cxx and core/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx thanks, Björgvin ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[PUSHED] Re: [PATCH] Translate German comments
Hi Philipp, looks good. Pushed. Thanks! Happy to not have to translate these comments when run into them :-) Cheers Radek On Wed, 2012-02-15 at 15:36 +0100, Philipp Weissenbacher wrote: Hi all, Lionel, Here are the files you mentioned earlier. Hope quality didn't suffer with this quick job. You might want to take a look at line num 2185 in DatabaseForm.cxx. Looks like commented out code. If you still find any German strings, please contact me and I'll help you. Cheers, Philipp ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] Help - minor updates
Hi Stanislav, thanks for your patches! One thing I noticed, is it possible to replace StarOffice with LibreOffice instead of OpenOffice in patch #3? Cheers Radek On Sun, 2012-02-12 at 20:14 +0100, Stanislav Horáček wrote: Hello, I noticed several parts where current help didn't correspond with the latest UI (3.5.0). Some small patches are attached. Greetings, Stan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] Help - minor updates
Hi Stanislav, On Tue, 2012-02-14 at 16:00 +0100, Stanislav Horáček wrote: thanks for your patches! One thing I noticed, is it possible to replace StarOffice with LibreOffice instead of OpenOffice in patch #3? Hi, I think it is not good idea, because the text is related to version 1.1 and there was no LibreOffice 1.1. Makes sense, thanks for clarification. Pushed. (master and 3-5 branches) Cheers Radek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] Remove unused code
Hi Santiago, thanks for you patch, pushed. Cheers Radek On Mon, 2012-02-13 at 21:55 +0100, Santiago Martinez wrote: This patch removes unused code as listed in unusedcode.easy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [EasyHack] #44681 port to CLucene from java/Lucene
Hi Gert, thanks for looking into this. On Fri, 2012-02-10 at 23:11 +0100, Gert van Valkenhoef wrote: Dear LibreOffice developers, Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44681 Attached are initial implementations of the HelpIndexer and HelpSearch in C++ using CLucene, to replace the Java implementations using Lucene. The code that interfaces with Lucene to do the indexing and searching is complete. I have a test set up where I create an index with both the HelpIndexerTool.jar and the C++ indexer, and search it using the C++ searcher. These give identical results. Thus, luckily, the index format is compatible between CLucene and Java Lucene. I've also looked into where the HelpIndexerTool is currently used, and found these: - xmlhelp/source/cxxhelp/provider/databases.cxx: * In extension mode (enabled by HelpIndexer), through XInvocation * Does not ZIP the result - helpcontent2/util/target.pmk * Called as a command-line tool * ZIPs the result, but already has an alternative code path to do it (the final .ELSE) Based on this, it looks like the Java HelpIndexerTool is a lot more complex than it needs to be, and does a few things that are better handled by other tools. Especially the extension mode seems to be a relic of the convoluted code path (through XInvocation etc.) and doesn't do much more than suppressing error messages. In addition, couldn't the ZIP creation just always be replaced by this alternative code path? Its well possible that I missed a few things here. Not sure, probably best if you try it or maybe someone else who knows that part will answer. If extension mode and ZIP archiving are not needed, the implementation is complete, and the remaining work would be integrating with the build process. Here are a couple of caveats and/or questions related to that: * This implementation is using the master branch of CLucene's git, with clucene-contribs-lib enabled (for CJK support). The released version of CLucene is compatible with Lucene 1.9.x, whereas LibreOffice uses Lucene 2.3. * Can someone help to figure out how to make CLucene part of the LO build process? CLucene is using CMake and there seems to be no way to 'make install' the clucene-contribs-lib, so this might be tricky. This usually done like this, you either use system libraries if available or build the package (CLucene in this case) inside LO build tree. Look into configure.in, search for cairo for example. Cairo is graphic library where we link against system one or build one inside LO. Giving Cc to _rene_ and pmladek who know a lot about build process. Cheers Radek * I'm not sure exactly how to make my code build as part of the LO build, but could probably figure it out as long as the previous point is addressed. * CLucene (like Java) uses wide characters throughout, and defines it's own TCHAR type for that. Can we make this play nice with how LO handles strings? * I'm using some Unix headers, are these available on windows or should I use some kind of LO equivalent of them? * I tried replacing the HelpIndexerTool in helpcontent2/util/target.pmk, which seems to work fine, except that I'm returning an error code when the content/caption directory doesn't exist (unlike HelpIndexerTool), which breaks on shared. I hope this is useful (and not too verbose :-P). Best regards, Gert van Valkenhoef ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] [REVIEW:3-5] PostgreSQL getColumns()
Hi, looks OK to me. I have cherry-picked it from master, because the attached patch didn't apply. Pushed. Thanks. Cheers Radek On Thu, 2012-02-09 at 19:27 +0100, Lionel Elie Mamane wrote: getColumns() is a XDatabaseMetadata interface function to get the list of columns of a table and info on these columns. The PostgreSQL-SDBC implementation in 3.5.0 has a couple of bugs fixed by the attached patch. - If the table previously had a column that has since been dropped (removed), the numbering of the columns has a hole, and in some circumstances the dropped column is still shown by getColumns(). Still shown fixed by + AND NOT pg_attribute.attisdropped which is the boolean in the PostgreSQL internals that says this column has been dropped, don't show it anymore. Numbering had a hole was because it was using attnum, the internal PostgreSQL numbering of columns. But this internal numbering is not contiguous, as the number of dropped columns are *not* recycled. This is fixed by: * Removing attnum from the query we send to PostgreSQL. * Adapt column numbers (shifted by one) every time a column (after attnum) is read. * Generate our own numbering and put that in the result. Note that #invalid# cannot be a table or schema name: character '#' is not allowed. - Entries were sorted by the concatenation (?) of schema name, table name, column name. In rare cases, this could lead to wrong order, and is slower anyway. Example: library, book, bookID library, bookShelf, bookShelfID library, book, XID is sorted in this order by concatenation, but in this (correct) order when sorting by column: library, book, bookID library, book, XID library, bookShelf, bookShelfID || is the SQL string concatenation operator. I don't have a smoking gun fdo# of a point and click user-visible bug of this, partially because our internal code is suspicious about some of this data... See lcl_sanitizeColumnDescs in connectivity/source/commontools/TTableHelper.cxx. But I consider Base also as a programming platform, user code (scripts) is allowed to call any function in XDatabaseMetadata with any arguments, and giving a wrong result (data) back is a bug in itself. So I'd like to have this all fixed in libreoffice-3-5, too. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [PATCH] [REVIEW:3-5] PostgreSQL getColumns()
On Mon, 2012-02-13 at 18:08 +0100, Lionel Elie Mamane wrote: On Mon, Feb 13, 2012 at 05:39:51PM +0100, Radek Doulik wrote: looks OK to me. I have cherry-picked it from master, because the attached patch didn't apply. Oh, sorry, some difference between my work tree and pristine libreoffice-3-5 must have made a mess. The sorted by concatenation problem is commit 0adf5eed03d7a0f14d73c23bceb13b7a8cc693e4 in master, but was grouped in my patch. Could you please cherry-pick it, too? Thanks. OK. Pushed. Thanks! Cheers Radek On Thu, 2012-02-09 at 19:27 +0100, Lionel Elie Mamane wrote: getColumns() is a XDatabaseMetadata interface function to get the list of columns of a table and info on these columns. The PostgreSQL-SDBC implementation in 3.5.0 has a couple of bugs fixed by the attached patch. - If the table previously had a column that has since been dropped (removed), the numbering of the columns has a hole, and in some circumstances the dropped column is still shown by getColumns(). - Entries were sorted by the concatenation (?) of schema name, table name, column name. In rare cases, this could lead to wrong order, and is slower anyway. Example: library, book, bookID library, bookShelf, bookShelfID library, book, XID is sorted in this order by concatenation, but in this (correct) order when sorting by column: library, book, bookID library, book, XID library, bookShelf, bookShelfID || is the SQL string concatenation operator. I don't have a smoking gun fdo# of a point and click user-visible bug of this, partially because our internal code is suspicious about some of this data... See lcl_sanitizeColumnDescs in connectivity/source/commontools/TTableHelper.cxx. But I consider Base also as a programming platform, user code (scripts) is allowed to call any function in XDatabaseMetadata with any arguments, and giving a wrong result (data) back is a bug in itself. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: vcl/source fix rendering of metafiles embedded in emf+
Hi Stephan, I am unable to reproduce it here. Do you have some other way to reproduce it other then make check? I am attaching updated patch with fixed loop. Please could you try it? Cheers Radek On Wed, 2012-01-25 at 10:42 +0100, Stephan Bergmann wrote: One thing I did notice with the first hunk of your patch is that it moved pAction = NextAction(); outside the for loop -- but that looks irrelevant to the problem at hand, as ImplPlayWithRenderer appears to always return true in the newly introduced if here. Also, forms_unoapi now triggers lots of warn:legacy.osl:10979:9:/data/lo/core/cppcanvas/source/mtfrenderer/implrenderer.cxx:2715: Unknown meta action type encountered from within ImplPlayWithRenderer and at least once triggers that function's catch (RuntimeException) block with an exception with message basegfx::B2DPolyPolygon cppcanvas::tools::createTextLinesPolyPolygon(basegfx::B2DPoint, const double, const cppcanvas::tools::TextLineInfo), ::cppcanvas::internal::createTextLinesPolyPolygon(): Unexpected strikeout case -- anomalies the original code did not exhibit. Stephan diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index e9ac49e..1f7a670 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -406,29 +406,31 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) pOut-SetLayoutMode( 0 ); pOut-SetDigitLanguage( 0 ); -for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) -{ -if( !Hook() ) +OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); +if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { +for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) { -MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); -if( pAction-GetType() == META_COMMENT_ACTION -pCommentAct-GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM(DELEGATE_PLUGGABLE_RENDERER)) ) -{ -ImplDelegate2PluggableRenderer(pCommentAct, pOut); -} -else +if( !Hook() ) { -pAction-Execute( pOut ); +MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); +if( pAction-GetType() == META_COMMENT_ACTION +pCommentAct-GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM(DELEGATE_PLUGGABLE_RENDERER)) ) +{ +ImplDelegate2PluggableRenderer(pCommentAct, pOut); +} +else +{ +pAction-Execute( pOut ); +} + +// flush output from time to time +if( i++ nSyncCount ) +( (Window*) pOut )-Flush(), i = 0; } -// flush output from time to time -if( i++ nSyncCount ) -( (Window*) pOut )-Flush(), i = 0; +pAction = NextAction(); } - -pAction = NextAction(); } - pOut-Pop(); } } @@ -608,7 +610,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( bUseCanvas !pMtf ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( bUseCanvas ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: vcl/source fix rendering of metafiles embedded in emf+
Hi Stefan, I have reverted the patch and will try to replicate the problem and fix it. Thanks for info and sorry for the trouble. Cheers Radek On Tue, 2012-01-24 at 22:11 +0100, Stephan Bergmann wrote: Radek, bisecting showed me that it is this commit that causes my machine to become unresponsive (as the involved soffice.bin process keeps growing in size, apparently without limit) when executing the forms_unoapi test (during make check) -- and it is also most likely this commit that causes the current failures of the Linux-RHEL6-x86_64@14-with-check tinderbox when executing the same test. Though what's the problem is beyond me for tonight... -Stephan On 01/24/2012 01:42 PM, Radek Doulík wrote: vcl/source/gdi/gdimtf.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit f7b6cd87f78b786b59984e5b3c8a5a78f0ed7a94 Author: Radek Doulikr...@novell.com Date: Tue Jan 24 13:39:25 2012 +0100 fix rendering of metafiles embedded in emf+ diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 38d66ed..1395fe6 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -406,9 +406,9 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) pOut-SetLayoutMode( 0 ); pOut-SetDigitLanguage( 0 ); -for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) -{ -if( !Hook() ) +OSL_TRACE(GDIMetaFile::Play on device of size: %d x %d, pOut-GetOutputSizePixel().Width(), pOut-GetOutputSizePixel().Height()); +if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut-GetOutputSizePixel() ) ) { +for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) { MetaCommentAction* pCommentAct = static_castMetaCommentAction*(pAction); if( pAction-GetType() == META_COMMENT_ACTION @@ -608,7 +608,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point rPos, { GDIMetaFile*pMtf = pOut-GetConnectMetaFile(); -if( bUseCanvas !pMtf ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( bUseCanvas ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] [PUSHED] Re: [REVIEW 3-5] fdo#43705: fix incomplete updating of the page preview pane in Draw
Hi Ivan, the patch looks good to me. Pushed. Cheers Radek On Sun, 2012-01-22 at 15:35 +0400, Ivan Timofeev wrote: Hi, https://bugs.freedesktop.org/show_bug.cgi?id=43705 (regression since 3.4) The fix for review: http://cgit.freedesktop.org/libreoffice/core/commit/?id=799f2de5d1085d845ec498af0a7932965c42ed68 Thanks, Ivan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [REVIEW:3-4, 3-4-5] crash in LO 3.4.5 rc1 : fdo40253
On Mon, 2012-01-02 at 11:31 +0100, Petr Mladek wrote: Jean-Baptiste Faure píše v Po 26. 12. 2011 v 10:51 +0100: Hi, Bug fdo40253 seems to be fixed in LO 3.5.0 beta2+ but still crashes LO 3.4.5 rc1. I don't know which commit solved this but is it possible to backport the fix to 3.4.5 ? Looks good to me too. Cheers Radek I guess that it has been fixed by http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbaadd31d3ff53f18a7b8d2b0af947328dc81d91 It looks good and pretty safe to me. Similar thing is done also in SdrTableObj::setTableStyle. Thorsten, is it ok for you to add it into 3.4.5 release? Best Regards, Petr ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [REVIEW] 4 minutes 27 seconds - 11 seconds
Hi Caolán, the patch looks good to me. I am also surprised by the speedup (given that it always inserts at the end of the vector array in your case). Hard to check without the actual document. Might be problem in std::vector not detecting that the rest of reserved space doesn't need to be moved or something? You might try to load the document into valgrinded libreoffice just to be sure that it doesn't mess memory. Cheers Radek On Tue, 2011-07-12 at 09:27 +0100, Caolán McNamara wrote: cmc-thb: I had some .doc documents which were awesomely slow to load up, apparently because some polygons had to be split up into large polypolygons due to a custom dashed line in use to draw them or something of that nature. Could you double check my change to basegfx2 http://cgit.freedesktop.org/libreoffice/libs-gui/commit/?id=2f580a32ad5dbb46cd3897316a12aea032b9e10e I'm *sure* its good, but the scale of speed-up from 4 minutes 27 seconds to 11 seconds is massively more than I expected. Especially as the insert point is at the end, rather than at the beginning or middle which would have required a lot of memmove type operations. C. (gcc/libstdcx++ 4.6.0, CXXFLAGS=-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4,selinux enabled) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Replace List with std::vector
Hi Joseph, On Thu, 2011-06-23 at 20:41 -0700, Joseph Powers wrote: Ok, this patch compiles fine; however, I can't find where it's used. Also, I think it's unused; it looks a lot like leftovers of when OpenOffice had a web browser. If some can verify, that it's trash, a few pointers in to how to remove it would be nice. It looks like libs-gui/uui/source/services.cxx registers the component and sets up the factory for generating the dialogs. Because it's a component system, I'm not sure how to unplug it and/or verify how it would be used. the code looks dead to me as well, but I am also not sure. It was imported in 2000 and no real changes were done to it later - I mean the cookiedlg.cxx. You might try to find out places where the component is instantiated and check whether cookie dialog is still used. I tried quickly to look it up and found few .java sources, but it will need closer look I am afraid. I am Cc-ing Thorsten, maybe he knows more about history of that part. Looking at your patch I wonder if you should delete pCookies at the end of _handleCookiesRequest method. It is created in this part: @@ -84,7 +72,7 @@ handleCookiesRequest_( rContinuations) SAL_THROW((uno::RuntimeException)) { -CookieList aCookies; +CntHTTPCookieList_impl* pCookies = new CntHTTPCookieList_impl(); for (sal_Int32 i = 0; i rRequest.Cookies.getLength(); ++i) { try Cheers Radek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Moving misplaced Compatibility options from ScDocOptions to ScAppOptions
Hi Albert, I think it would be best if Kohei can review your patch. He is on vacation right know and should be back in the end of next week. I am Ccing him so that it is not lost. Thanks a lot for your patch! Cheers Radek On Sat, 2011-06-25 at 23:44 +0200, Albert Thuswaldner wrote: Hi Submitting a patch for review. This one moves the misplaced Compatibility options from ScDocOptions to ScAppOptions. Please let me know if you want me to improve some parts of it. The rational behind this move, see: http://lists.freedesktop.org/archives/libreoffice/2011-May/013087.html See also: http://lists.freedesktop.org/archives/libreoffice/2011-June/thread.html#14140 Once you are happy with it you can commit the patch under the terms of MPL 1.1 / GPLv3+ / LGPLv3+ triple license. Then I will do the same for the formula options. /Albert ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] impress: after adding a new animation, scroll down to it in the list.
Hi Luke, thanks for your patch! On Fri, 2011-06-24 at 17:38 +1200, Luke Symes wrote: Hi there, This is a one-line patch to impress to make the animation list scroll down to show a newly added animation. Previously we didn't scroll the list at all. I think better way of doing it might be diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index cfb8463..f7d5b2b 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -533,6 +533,7 @@ void CustomAnimationList::select( CustomAnimationEffectPtr pEffect, bool bSelect if( pEntry-getEffect() == pEffect ) { Select( pEntry, bSelect ); +MakeVisible( pEntry ); break; } pEntry = static_cast CustomAnimationListEntry* (Next( pEntry )); At least I am not reaching the part you modified when adding custom animation thru custom animation pane (using the add button and custom animation dialog). If we move it to the loop, it will be reached always when selecting an entry - the select method is called recursively when adding new pEntry in: if( !pEntry bSelect ) { append( pEffect ); select( pEffect ); } I wonder how do you reach that part of code? Cheers Radek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] [PUSHED:master] Fix for Bug 37484 - On any animation change, current position in list is lost
On Wed, 2011-06-22 at 05:03 -0600, Tor Lillqvist wrote: Thanks. If these work fine on Linux (i.e. X11), they can't be awfully broken on other windowing systems either, I hope. Pushed to master. I run into a crash on startup in that part. I quickly fixed it, but it might be better if you check that it plays nicely with your new code. Or maybe make the ScrollToAbsPos not crash when called with unexpected values, -1 for example. It was happening when starting impress without loading presentation. I guess you checked it only while loading presentation containing custom animations? Cheers Radek the quick fix: commit 4be38046a5c2576b5b97ac47f7c0ea17444524ea Author: Radek Doulik r...@novell.com Date: Fri Jun 24 17:10:22 2011 +0200 quick fix to avoid crash on impress's start diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 196fc53..cfb8463 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -742,7 +742,7 @@ void CustomAnimationList::update() // An entry has moved down out of view; scroll down one. ScrollToAbsPos( nFirstVis + 1 ); } -else +else if ( nFirstVis != -1 ) { // The selection is still in view, or it hasn't moved. ScrollToAbsPos( nFirstVis ); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Removed never defined _ENABLE_CUR_DIR
Hi Christina, your patch looks good, thanks! Pushed. Cheers Radek On Tue, 2011-03-22 at 19:28 +0100, Christina Roßmanith wrote: Hi, I've continued code cleanup and removed #ifdef'ed blocks because _ENABLE_CUR_DIR is never #defined. Christina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [REVIEW] Temp fix for n#651250 / deb#612940
On Wed, 2011-02-23 at 07:59 +0100, Thorsten Behrens wrote: Hi, attached patch fixes the non-working media during Impress slideshow, by disabling two patches. The real fix is slightly more involved, and prolly not a good idea for distros that want to release 3.3.1 timely. Please review, and commit to -3-3 Looks good, committed. I wonder if you might want to push the real fix on 3-3 so that it is tested and released the next month? Cheers Radek ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] REVIEW: EMF+ disable on Win32 ...
Hi, the patch looks OK to me. Cheers Radek On Fri, 2011-02-11 at 12:17 +, Michael Meeks wrote: Hi guys, Talking to Radek (wrt. the EMF+ previews missing in action - ie. we just get white images (apparently)) - from bug: https://bugs.freedesktop.org/show_bug.cgi?id=33785 It seems that the quick workaround is appended; diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx index cc50b1b..1dd5c64 100644 --- a/svtools/source/filter.vcl/wmf/enhwmf.cxx +++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx @@ -348,7 +348,7 @@ BOOL EnhWMFReader::ReadEnhWMF() static sal_Bool bEnableEMFPlus = ( getenv( EMF_PLUS_DISABLE ) == NULL ); #else // TODO: make it possible to disable emf+ on windows -static sal_Bool bEnableEMFPlus = sal_True; +static sal_Bool bEnableEMFPlus = sal_False; #endif while( bStatus nRecordCount-- ) And hopefully, then we will fall back (where it is present) to the EMF (not EMF+) or WMF preview instead. Jesus - it'd be wonderful if you could do a test of that (?) otherwise, other reviews appreciated. Tor - rumour has it that you looked at getting this working on Windows, the interaction is with vcl/source/gdi/gdimtf.cxx incidentally and some UNO-ised canvas pieces I guess. Thanks, Michael. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [REVIEW] More reviews for fdo#33108 fix please
Hi Thorsten, the patch looks OK to me. Cheers Radek On Mon, 2011-01-17 at 18:51 +0100, Thorsten Behrens wrote: Hi, Lubos fixed an ugly crasher in vcl via fdo#33108 - I've stripped the patch down to the absolute minimum, and would be ok for taking that for -3-3-0 - any further reviews, please? Cheers, -- Thorsten ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [REVIEW] Fixes for i116318 and i116371
Hi Thorsten, the patch looks OK and safe to me. Cheers Radek On Mon, 2011-01-17 at 15:45 +0100, Thorsten Behrens wrote: Hi, would you please review attached patches for 3-3-0 - they're extracted from OOo's calc65 CWS, which'll go into RC10. Both are tested work fine for me - they're safe in a sense that they'll definitely not make matters worse. ;) Cheers, -- Thorsten ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] new cppcheck cleaning in svx
Hi Julien, thanks for your patches. They look OK so I pushed them. Cheers Radek On Thu, 2010-12-30 at 00:51 +0100, Julien Nabet wrote: Hello, Here are 2 new patches for cppcheck cleaning in svx Compiling was ok Remarks : I had this with the last git version of cppcheck : 1) [./svdotxln.cxx:67]: (style) The class 'ImpSdrObjTextLink' does not have a constructor. but we can read this on the file : class ImpSdrObjTextLink: public ::sfx2::SvBaseLink { SdrTextObj* pSdrObj; public: ImpSdrObjTextLink( SdrTextObj* pObj1 ) : ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, FORMAT_FILE ), pSdrObj( pObj1 ) {} ... It seems there is a constructor, doesn't it ? So either if it's a false positive and i do a tracker or it's ok and i would need some explanation (please ! :-) ). 2) in view3d.cxx, I've got this : [./view3d.cxx:299]: (style) Variable 'pM' is assigned a value that is never used but either pM should be used (and i don't know how) or pM is useless and this entire line too : pM = GetSdrMarkByIndex(nObjs); 3) Checking ./gridctrl.cxx... [./gridctrl.cxx:3720]: (error) Possible null pointer dereference: pListeners - otherwise it is redundant to check if pListeners is null at line 3722 but I don't know what to do with this. There are still some cppcheck in svx, i hope to correct all of them soon. Julien (LGPLv3+ / MPL) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Fix Gallery module
Hi KAMI, thanks for the patch. Looks good so I pushed it. Cheers Radek On Tue, 2010-12-21 at 02:50 +0100, Kálmán „KAMI” Szalai wrote: Trivial patch to fix some gallery file assign problem. -- KAMI911Best regards, Kálmán „KAMI” Szalai | 神 | kami911 [at] gmail [dot] com My favorite projects: OxygenOffice Professional - office suite - for everybody | Magyarul - In Hungarian Blog | Support Follow me, if you can ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] remove dead codes never passed through even in case of MACOSX
Hi Takeshi, On Wed, 2010-12-22 at 17:21 +0900, Takeshi Abe wrote: Hi, Still loitering on EasyHack 3.7, I encountered dead codes as attached. They seems safely removable because if -psn given, the call of InterpretCommandLineParameter() will catch it and return sal_True, so the lines in question will be never passed through. It looks odd noneththeless. Any thought? couldn't be then typo in InterpretCommandLineParameter? maybe it should #ifndef it in case of MACOSX, so that the other part makes sense? I don't have any OOo CVS tree at hand now, but Thorsten might know. Cheers Radek Cheers, -- Takeshi Abe differences between files attachment (0001-remove-dead-codes-never-passed-through-even-in-case-.patch) From f06b3e31df80d48a1eb773acfea7563377928dba Mon Sep 17 00:00:00 2001 From: Takeshi Abe t...@fixedpoint.jp Date: Wed, 22 Dec 2010 16:33:34 +0900 Subject: [PATCH] remove dead codes never passed through even in case of MACOSX --- desktop/source/app/cmdlineargs.cxx | 20 1 files changed, 0 insertions(+), 20 deletions(-) diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 97a9fb9..f9ac187 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -280,26 +280,6 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier supplier ) bStartEvent = sal_False; bDisplaySpec = sal_False; } - -#ifdef MACOSX -/* #i84053# ignore -psn on Mac - Platform dependent #ifdef here is ugly, however this is currently - the only platform dependent parameter. Should more appear - we should find a better solution -*/ -else if ( aArg.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(-psn))) -{ -// finder argument from MacOSX -bOpenEvent = sal_False; - bPrintEvent = sal_False; -bForceOpenEvent = sal_False; -bPrintToEvent = sal_False; -bForceNewEvent = sal_False; -bViewEvent = sal_False; -bStartEvent = sal_False; -bDisplaySpec = sal_False; -} -#endif else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(-convert-to))) { bOpenEvent = sal_False; ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [PATCH] Remove unused code
On Wed, 2010-12-22 at 12:00 +0100, Radek Doulik wrote: On Wed, 2010-12-22 at 11:29 +0100, Radek Doulik wrote: Hi Anders, thanks for your patch. Looks good to me so I pushed it. It contains sd/ module changes only though, so maybe you forget the ure part? ops, sorry. I managed to miss it when reading your mail, I will review it as well. pushed it too. Thanks once more! Cheers Radek Cheers Radek Cheers Radek On Wed, 2010-12-22 at 08:31 +0100, Anders Jonsson wrote: Some more unused code, this time in ure and impress. All code has been commented out at least since 2005. Anders Jonsson (LGPLv3+,MPL) ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice