[Libreoffice-commits] .: 2 commits - cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 8e92501541dfc374803cde0dec90939cde37348a Author: Radek Doulik r...@novell.com Date: Wed Apr 18 15:40:05 2012 +0200 added debug message for unsupported cases diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index b5ce688..d4a99ec 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1447,6 +1447,8 @@ namespace cppcanvas } else { EMFP_DEBUG (printf (EMF+ DrawImagePoints TODO (fixme)\n)); } +} else { +EMFP_DEBUG (printf (EMF+ DrawImagePoints TODO (fixme) - possibly unsupported source units for crop rectangle\n)); } break; } commit 695d82b63dc5e332f5fb9574c8e5f089369dfcd8 Author: Radek Doulik r...@novell.com Date: Wed Apr 18 15:36:33 2012 +0200 SrcRect for SrcUnit = 2 is in pixels, don't Map it diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 0d8005c..b5ce688 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1420,8 +1420,8 @@ namespace cppcanvas ReadPoint (rMF, x3, y3, flags); BitmapEx aBmp( image.graphic.GetBitmapEx () ); -const Rectangle aCropRect (::vcl::unotools::pointFromB2DPoint (Map (sx, sy)), - ::vcl::unotools::sizeFromB2DSize (MapSize(sw, sh))); +const Rectangle aCropRect (::vcl::unotools::pointFromB2DPoint (basegfx::B2DPoint (sx, sy)), + ::vcl::unotools::sizeFromB2DSize (basegfx::B2DSize(sw, sh))); aBmp.Crop( aCropRect ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 41c4585504f38a4b0eeb164f317ab71a7a742dd5 Author: Radek Doulik r...@novell.com Date: Wed Apr 18 19:17:11 2012 +0200 tune the guessed position a bit, so that it works better with test documents diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 88d281a..f0c272c 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1512,7 +1512,7 @@ namespace cppcanvas TextActionFactory::createTextAction( // position is just rough guess for now // we should calculate it exactly from layoutRect or font -::vcl::unotools::pointFromB2DPoint ( Map( lx + 0.35*cellSize, ly + cellSize ) ), +::vcl::unotools::pointFromB2DPoint ( Map( lx + 0.15*cellSize, ly + cellSize ) ), ::Size(), ::Color(), ::Size(), ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: cppcanvas/source
cppcanvas/source/mtfrenderer/emfplus.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit e94e669bd3499827f19585b704e7c0ef4f21bd13 Author: Radek Doulik r...@novell.com Date: Fri Apr 13 16:24:25 2012 +0200 set minimal width if pen width is set to zero diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 8409d7f..0d8005c 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -608,7 +608,8 @@ namespace cppcanvas void SetStrokeAttributes (rendering::StrokeAttributes rStrokeAttributes, ImplRenderer rR, const OutDevState rState) { -rStrokeAttributes.StrokeWidth = (rState.mapModeTransform * rR.MapSize (width, 0)).getX (); +EMFP_DEBUG (if (width == 0.0) printf (EMF+\tTODO: pen with zero width - using minimal which might not be correct\n)); +rStrokeAttributes.StrokeWidth = (rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX (); } void Read (SvStream s, ImplRenderer rR, sal_Int32, sal_Int32 ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: canvas/source
canvas/source/cairo/cairo_canvashelper.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit f0a5e147eb9ae4a343f51eda20126488347e66f8 Author: Radek Doulik r...@novell.com Date: Thu Apr 12 10:07:03 2012 +0200 add .5 to control points coordinates after transformation - otherwise we might end up with wrong coordinates - fixes fdo#38580 diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index c04ac93..b75efda 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -1024,6 +1024,9 @@ namespace cairocanvas nBX = aB.getX(); nBY = aB.getY(); +cairo_matrix_transform_point( aOrigMatrix, nAX, nAY ); +cairo_matrix_transform_point( aOrigMatrix, nBX, nBY ); + if( aOperation == Stroke ) { nAX += 0.5; @@ -1031,8 +1034,7 @@ namespace cairocanvas nBX += 0.5; nBY += 0.5; } -cairo_matrix_transform_point( aOrigMatrix, nAX, nAY ); -cairo_matrix_transform_point( aOrigMatrix, nBX, nBY ); + cairo_curve_to( pCairo, nAX, nAY, nBX, nBY, nX, nY ); } else ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 3 commits - svtools/source vcl/win
svtools/source/filter/wmf/enhwmf.cxx |5 - svtools/source/filter/wmf/winmtf.cxx |4 vcl/win/source/gdi/salbmp.cxx| 17 - 3 files changed, 20 insertions(+), 6 deletions(-) New commits: commit 7564b2c1092eeb7969577769b82a4c537e37206f Author: Radek Doulik r...@novell.com Date: Thu Mar 29 14:33:00 2012 +0200 emf+ on win: implement bitmap creation from bitmapcanvas diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 0cc5bb0..ab42393 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -31,6 +31,7 @@ #include vcl/bitmap.hxx // for BitmapSystemData #include vcl/salbtype.hxx +#include com/sun/star/beans/XFastPropertySet.hpp #include win/wincomp.hxx #include win/salgdi.h @@ -267,8 +268,22 @@ bool WinSalBitmap::Create( const SalBitmap rSSalBmp, sal_uInt16 nNewBitCount ) // -- -bool WinSalBitmap::Create( const ::com::sun::star::uno::Reference ::com::sun::star::rendering::XBitmapCanvas /*xBitmapCanvas*/, Size /*rSize*/, bool /*bMask*/ ) +bool WinSalBitmap::Create( const ::com::sun::star::uno::Reference ::com::sun::star::rendering::XBitmapCanvas xBitmapCanvas, Size /*rSize*/, bool bMask ) { +::com::sun::star::uno::Reference ::com::sun::star::beans::XFastPropertySet +xFastPropertySet( xBitmapCanvas, ::com::sun::star::uno::UNO_QUERY ); + +if( xFastPropertySet.get() ) { +::com::sun::star::uno::Sequence ::com::sun::star::uno::Any args; + +if( xFastPropertySet-getFastPropertyValue(bMask ? 2 : 1) = args ) { +sal_Int64 aHBmp64; + +if( args[0] = aHBmp64 ) { +return Create( HBITMAP(aHBmp64), false, false ); +} +} +} return false; } commit e0a43983faff4982ddfd151b0ae4c28623edf894 Author: Radek Doulik r...@novell.com Date: Thu Mar 29 14:31:14 2012 +0200 emf+ on win: flush the header stream, so that it doesn't look like empty diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx index d9597ff..6abf445 100644 --- a/svtools/source/filter/wmf/winmtf.cxx +++ b/svtools/source/filter/wmf/winmtf.cxx @@ -2228,6 +2228,10 @@ void WinMtfOutput::PassEMFPlusHeaderInfo() // rotate and scale operations mem one zero zero one zero zero; +// need to flush the stream, otherwise GetEndOfData will return 0 +// on windows where the function parameters are probably resolved in reverse order +mem.Flush(); + mpGDIMetaFile-AddAction( new MetaCommentAction( EMF_PLUS_HEADER_INFO, 0, (const sal_uInt8*) mem.GetData(), mem.GetEndOfData() ) ); mpGDIMetaFile-UseCanvas( sal_True ); } commit 48f0a248cf8313f0341e2e6171f518d01d83478d Author: Radek Doulik r...@novell.com Date: Thu Mar 29 14:30:45 2012 +0200 emf+ on win: enable emf+ parsing diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx index 9664b09..b81d973 100644 --- a/svtools/source/filter/wmf/enhwmf.cxx +++ b/svtools/source/filter/wmf/enhwmf.cxx @@ -440,12 +440,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() sal_BoolbFlag(sal_False), bStatus = ReadHeader(); sal_BoolbHaveDC = false; -#ifdef UNX static sal_Bool bEnableEMFPlus = ( getenv( EMF_PLUS_DISABLE ) == NULL ); -#else -// TODO: make it possible to disable emf+ on windows -static sal_Bool bEnableEMFPlus = sal_False; -#endif while( bStatus nRecordCount-- pWMF-good()) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - canvas/inc canvas/source
canvas/inc/canvas/base/sprite.hxx |2 +- canvas/inc/canvas/spriteredrawmanager.hxx |2 +- canvas/source/tools/spriteredrawmanager.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 8f769141f35f18782f3e43862baedf40d3ce19c6 Author: Thorsten Behrens tbehr...@suse.com Date: Wed Feb 22 00:31:30 2012 +0100 Fix fdo#45219 wrong transparency for animated objects. With the attachement from said bug, and cairocanvas, sprites are displayed multiple times above each other (which, for semi- transparent sprites, lead to incorrect overall transparency) diff --git a/canvas/inc/canvas/base/sprite.hxx b/canvas/inc/canvas/base/sprite.hxx index bb3d655..38a2270 100644 --- a/canvas/inc/canvas/base/sprite.hxx +++ b/canvas/inc/canvas/base/sprite.hxx @@ -103,7 +103,7 @@ namespace canvas /** Functor providing a StrictWeakOrdering for sprite references */ -struct SpriteComparator +struct SpriteWeakOrder { bool operator()( const Sprite::Reference rLHS, const Sprite::Reference rRHS ) diff --git a/canvas/inc/canvas/spriteredrawmanager.hxx b/canvas/inc/canvas/spriteredrawmanager.hxx index 3bf4ca6..9dc2099 100644 --- a/canvas/inc/canvas/spriteredrawmanager.hxx +++ b/canvas/inc/canvas/spriteredrawmanager.hxx @@ -361,7 +361,7 @@ namespace canvas ::std::sort( aSortedUpdateSprites.begin(), aSortedUpdateSprites.end(), - SpriteComparator() ); + SpriteWeakOrder() ); if( isAreaUpdateOpaque( rUpdateArea, nNumSprites ) ) diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index 2af5b34..06d6127 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -233,7 +233,7 @@ namespace canvas // in line with the problem of having sprite state available // for the frame before the last frame; plus, it avoids // frequent locks of the object mutices -SpriteComparator aSpriteComparator; +SpriteWeakOrder aSpriteComparator; // put all sprites that have changed content into update areas ListOfSprites::const_iterator aCurrSprite( maSprites.begin() ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - cppcanvas/source svtools/source
cppcanvas/source/inc/implrenderer.hxx|2 +- cppcanvas/source/mtfrenderer/emfplus.cxx | 18 -- svtools/source/filter/wmf/winwmf.cxx |8 ++-- 3 files changed, 19 insertions(+), 9 deletions(-) New commits: commit 0d396171b6345e6077dd85dc7ff6d9f9fdcd523d Author: Radek Doulik r...@novell.com Date: Wed Mar 7 16:58:37 2012 +0100 workaround for buggy metafile images diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index c93c83c..d41d504 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -271,7 +271,7 @@ static float GetSwapFloat( SvStream rSt ) ActionVector::const_iterator o_rRangeBegin, ActionVector::const_iterator o_rRangeEnd ) const; -void processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags); +void processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags, sal_Bool bUseWholeStream = sal_False); void processEMFPlus( MetaCommentAction* pAct, const ActionFactoryParameters rFactoryParms, OutDevState rState, const CanvasSharedPtr rCanvas ); void EMFPPlusFillPolygon (::basegfx::B2DPolyPolygon polygon, const ActionFactoryParameters rParms, OutDevState rState, const CanvasSharedPtr rCanvas, bool isColor, sal_uInt32 brushIndexOrColor); diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 8ccb75b..953a0c8 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -717,7 +717,7 @@ namespace cppcanvas Graphic graphic; -void Read (SvMemoryStream s) +void Read (SvMemoryStream s, sal_Bool bUseWholeStream) { sal_uInt32 header, unknown; @@ -742,13 +742,19 @@ namespace cppcanvas EMFP_DEBUG (printf (EMF+\tmetafile type: %d dataSize: %d\n, mfType, mfSize)); GraphicFilter filter; -SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), mfSize, STREAM_READ); +// workaround buggy metafiles, which have wrong mfSize set (n#705956 for example) +SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : mfSize, STREAM_READ); filter.ImportGraphic (graphic, String (), mfStream); // debug code - write the stream to debug file /tmp/emf-stream.emf EMFP_DEBUG(mfStream.Seek(0); - SvFileStream file( UniString::CreateFromAscii( /tmp/emf-embedded-stream.emf ), STREAM_WRITE | STREAM_TRUNC ); + static int emfp_debug_stream_numnber = 0; + UniString emfp_debug_filename = UniString::CreateFromAscii( /tmp/emf-embedded-stream ); + emfp_debug_filename.Append( UniString::CreateFromInt32( emfp_debug_stream_numnber++ )); + emfp_debug_filename.Append( UniString::CreateFromAscii( .emf )); + + SvFileStream file( emfp_debug_filename, STREAM_WRITE | STREAM_TRUNC ); mfStream file; file.Flush(); @@ -1087,7 +1093,7 @@ namespace cppcanvas } } -void ImplRenderer::processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags) +void ImplRenderer::processObjectRecord(SvMemoryStream rObjectStream, sal_uInt16 flags, sal_Bool bUseWholeStream) { sal_uInt32 index; @@ -1142,7 +1148,7 @@ namespace cppcanvas { EMFPImage *image; aObjects [index] = image = new EMFPImage (); -image-Read (rObjectStream); +image-Read (rObjectStream, bUseWholeStream); break; } @@ -1193,7 +1199,7 @@ namespace cppcanvas if (mbMultipart) { EMFP_DEBUG (printf (EMF+ multipart record flags: %04hx\n, mMFlags)); mMStream.Seek (0); -processObjectRecord (mMStream, mMFlags); +processObjectRecord (mMStream, mMFlags, sal_True); } mbMultipart = false; } commit d86d122a986292d76fe0a57c6285667356ee5170 Author: Radek Doulik r...@novell.com Date: Wed Mar 7 16:52:22 2012 +0100 allow wmf header to be placed on position aligned to 4 bytes - because there are such buggy emf files flying around (n#705956) diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx index 43cf34b..13f8fee 100644 --- a/svtools/source/filter/wmf/winwmf.cxx +++ b/svtools/source/filter/wmf/winwmf.cxx
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textcharacterproperties.cxx |2 +- oox/source/drawingml/textparagraph.cxx |9 - oox/source/drawingml/textparagraphproperties.cxx |2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 101fd1733000b4f8dae5fa39b6657531a21769ea Author: Felix Zhang fezh...@suse.com Date: Fri Mar 2 18:17:29 2012 +0800 n719988, n734733: Bullet should have same color as following text by default diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index adfa2fe..e7c6bb8 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -69,7 +69,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties rSource moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); } -void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFilterBase rFilter, bool bUseOptional ) const +void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFilterBase rFilter, bool bUseOptional ) const { OUString aFontName; sal_Int16 nFontPitch = 0; diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 689ab90..63a2845 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -28,6 +28,7 @@ #include oox/drawingml/textparagraph.hxx #include oox/drawingml/drawingmltypes.hxx +#include oox/drawingml/textcharacterproperties.hxx #include rtl/ustring.hxx #include oox/helper/propertyset.hxx @@ -111,8 +112,14 @@ void TextParagraph::insertAt( float fCharacterSize = nCharHeight 0 ? GetFontHeight( nCharHeight ) : 18; if ( pTextParagraphStyle.get() ) { -pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize ); +pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_True, fCharacterSize ); fCharacterSize = pTextParagraphStyle-getCharHeightPoints( fCharacterSize ); + +// bullets have same color as following texts by default +if( !aioBulletList.hasProperty( PROP_BulletColor ) maRuns.size() 0 + (*maRuns.begin())-getTextCharacterProperties().maCharColor.isUsed() ) +aioBulletList[ PROP_BulletColor ] = (*maRuns.begin())-getTextCharacterProperties().maCharColor.getColor( rFilterBase.getGraphicHelper() ); + maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, pTextParagraphStyle-getBulletList(), sal_True, fCharacterSize ); } diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 6eea22f..5df6bfe 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -433,6 +433,8 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p rioBulletMap[ PROP_FirstLineOffset ] = static_cast sal_Int32 ( *noFirstLineIndentation ); noFirstLineIndentation = boost::optional sal_Int32 ( 0 ); } +if ( nNumberingType != NumberingType::BITMAP !rioBulletMap.hasProperty( PROP_BulletColor )) +rioBulletMap[ PROP_BulletColor ] = static_cast sal_Int32 ( maTextCharacterProperties.maCharColor.getColor( pFilterBase-getGraphicHelper())); } if ( bApplyBulletMap ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapes/generatePresetsPPTXs.pl | 25 +++--- 1 file changed, 20 insertions(+), 5 deletions(-) New commits: commit e3c0a952a7607436224fe57f9e1665597702f6b2 Author: Radek Doulik r...@novell.com Date: Fri Mar 2 20:40:04 2012 +0100 generate more pptx test documents with preset shapes - before we only generated custom shapes used as presets definition - preset-*.pptx documents might be used for testing the presets diff --git a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl index c9eb314..28127f8 100755 --- a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl +++ b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl @@ -29,10 +29,17 @@ sub generatePPTX mkdir (pptx); system (unzip -qq -o -d cshape cshape.pptx); - generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml); + # custom shape(s) slide with preset definition + generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml, 0); $pptx = ../pptx/cshape- . (defined $type ? $type : all) . .pptx; system (cd cshape\nrm -rf . $pptx . \nzip -q -r . $pptx . .\ncd ..); + + # preset(s) slide, for testing + generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml, 1); + + $pptx = ../pptx/preset-cshape- . (defined $type ? $type : all) . .pptx; + system (cd cshape\nrm -rf . $pptx . \nzip -q -r . $pptx . .\ncd ..); } sub loadShapes() @@ -79,6 +86,7 @@ sub generateSlide $shapes = shift; $type = shift; $file = shift; + $preset = shift; open (OUT, $file); @@ -132,11 +140,18 @@ sub generateSlide a:off x=\ . (35 + $col++*$size) . \ y=\ . (45 + $row*$size) . \/ a:ext cx=\ . (4*$size/5) . \ cy=\ . (4*$size/5) . \/ /a:xfrm - a:custGeom ; - print OUT @{$shapes-{$shape}}; - print OUT /a:custGeom - a:solidFill + if ($preset) { + print OUT a:prstGeom prst=\ . $shape . \a:avLst//a:prstGeom +; + } else { + print OUT a:custGeom +; + print OUT @{$shapes-{$shape}}; + print OUT /a:custGeom +; + } + print OUT a:solidFill a:srgbClr val=\7F\/ /a:solidFill a:ln w=\19080\ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: basegfx/inc basegfx/source
basegfx/inc/basegfx/polygon/b3dpolygontools.hxx | 26 basegfx/source/polygon/b3dpolygontools.cxx | 146 2 files changed, 1 insertion(+), 171 deletions(-) New commits: commit 0aaecbac864b0c0e3ddb72355e416db0b4f72a77 Author: Björgvin Ragnarsson nifgr...@gmail.com Date: Wed Feb 15 01:04:12 2012 + Removed unused code. diff --git a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx index 2cd8ec9..defaae8 100644 --- a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx @@ -59,7 +59,6 @@ namespace basegfx // Get successor and predecessor indices. Returning the same index means there // is none. Same for successor. -BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B3DPolygon rCandidate); BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B3DPolygon rCandidate); // Get orientation of Polygon @@ -71,15 +70,9 @@ namespace basegfx // get normal vector of polygon BASEGFX_DLLPUBLIC B3DVector getNormal(const B3DPolygon rCandidate); -// get normal vector of positive oriented polygon -BASEGFX_DLLPUBLIC B3DVector getPositiveOrientedNormal(const B3DPolygon rCandidate); - // get signed area of polygon BASEGFX_DLLPUBLIC double getSignedArea(const B3DPolygon rCandidate); -// get area of polygon -BASEGFX_DLLPUBLIC double getArea(const B3DPolygon rCandidate); - // get signed area of polygon BASEGFX_DLLPUBLIC double getSignedArea(const B3DPolygon rCandidate); @@ -97,11 +90,6 @@ namespace basegfx // using getLength(...) BASEGFX_DLLPUBLIC B3DPoint getPositionAbsolute(const B3DPolygon rCandidate, double fDistance, double fLength = 0.0); -// get position on polygon for relative given distance in range [0.0 .. 1.0]. If -// length is given, it is assumed the correct polygon length, if 0.0 it is calculated -// using getLength(...) -BASEGFX_DLLPUBLIC B3DPoint getPositionRelative(const B3DPolygon rCandidate, double fDistance, double fLength = 0.0); - /** Apply given LineDashing to given polygon For a description see applyLineDashing in b2dpolygontoos.hxx @@ -143,15 +131,8 @@ namespace basegfx // fDistance, and the sphere around both points with radius fDistance. BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B3DPoint rEdgeStart, const B3DPoint rEdgeEnd, const B3DPoint rTestPosition, double fDistance); -// test if point is inside epsilon-range around the given Polygon. Can be used -// for HitTesting. The epsilon-range is defined to be the cylinder centered to -// the given edge, using radius fDistance, and the sphere around both points with radius fDistance. -BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B3DPolygon rCandidate, const B3DPoint rTestPosition, double fDistance); - -// isInside tests for B3DPoint and other B3DPolygon. On border is not inside as long as -// not true is given in bWithBorder flag. +// isInside tests for B3DPoint. On border is not inside as long as not true is given in bWithBorder flag. BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon rCandidate, const B3DPoint rPoint, bool bWithBorder = false); -BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon rCandidate, const B3DPolygon rPolygon, bool bWithBorder = false); // calculates if given point is on given line, taking care of the numerical epsilon BASEGFX_DLLPUBLIC bool isPointOnLine(const B3DPoint rStart, const B3DPoint rEnd, const B3DPoint rCandidate, bool bWithPoints = false); @@ -164,14 +145,9 @@ namespace basegfx // and a line given by start and end point BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPlane(const B3DVector rPlaneNormal, const B3DPoint rPlanePoint, const B3DPoint rEdgeStart, const B3DPoint rEdgeEnd, double fCut); -// helper to get a fCut position between a 3d Polygon -// and a line given by start and end point -BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPolygon(const B3DPolygon rCandidate, const B3DPoint rEdgeStart, const B3DPoint rEdgeEnd, double fCut); - // // comparators with tolerance for 3D Polygons BASEGFX_DLLPUBLIC bool equal(const B3DPolygon rCandidateA, const B3DPolygon rCandidateB, const double rfSmallValue); -BASEGFX_DLLPUBLIC bool equal(const B3DPolygon rCandidateA, const B3DPolygon rCandidateB); /** snap some polygon coordinates to discrete coordinates diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index fda58fb..b31712a 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++
[Libreoffice-commits] .: 2 commits - extensions/source forms/source
extensions/source/propctrlr/formmetadata.cxx |6 - forms/source/component/DatabaseForm.cxx | 127 --- forms/source/component/ListBox.cxx | 46 - 3 files changed, 85 insertions(+), 94 deletions(-) New commits: commit 7212cc8081216a3b7d626dc81be077d0522e3737 Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Wed Feb 15 15:29:55 2012 +0100 Translate German comments diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index d678f51..3796d79 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -493,12 +493,12 @@ ODatabaseForm::~ODatabaseForm() // - ::rtl::OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const ReferenceXControl SubmitButton, const ::com::sun::star::awt::MouseEvent MouseEvt) { -// Liste von successful Controls fuellen +// Fill List of successful Controls HtmlSuccessfulObjList aSuccObjList; FillSuccessfulList( aSuccObjList, SubmitButton, MouseEvt ); -// Liste zu ::rtl::OUString zusammensetzen +// Aggregate Liste to ::rtl::OUString ::rtl::OUStringBuffer aResult; ::rtl::OUString aName; ::rtl::OUString aValue; @@ -512,8 +512,7 @@ ODatabaseForm::~ODatabaseForm() aValue = pSuccObj-aValue; if( pSuccObj-nRepresentation == SUCCESSFUL_REPRESENT_FILE !aValue.isEmpty() ) { -// Bei File-URLs wird der Dateiname und keine URL uebertragen, -// weil Netscape dies so macht. +// For File URLs we transfer the file name and not a URL, because Netscape does it like that INetURLObject aURL; aURL.SetSmartProtocol(INET_PROT_FILE); aURL.SetSmartURL(aValue); @@ -554,17 +553,17 @@ ODatabaseForm::~ODatabaseForm() Sequencesal_Int8 ODatabaseForm::GetDataMultiPartEncoded(const ReferenceXControl SubmitButton, const ::com::sun::star::awt::MouseEvent MouseEvt, ::rtl::OUString rContentType) { -// Parent erzeugen +// Create Parent INetMIMEMessage aParent; aParent.EnableAttachChild( INETMSG_MULTIPART_FORM_DATA ); -// Liste von successful Controls fuellen +// Fill List of successful Controls HtmlSuccessfulObjList aSuccObjList; FillSuccessfulList( aSuccObjList, SubmitButton, MouseEvt ); -// Liste zu ::rtl::OUString zusammensetzen +// Aggregate Liste to ::rtl::OUString ::rtl::OUString aResult; for ( HtmlSuccessfulObjListIterator pSuccObj = aSuccObjList.begin(); pSuccObj aSuccObjList.end(); @@ -578,15 +577,15 @@ Sequencesal_Int8 ODatabaseForm::GetDataMultiPartEncoded(const ReferenceXContr } -// Liste loeschen +// Delete List aSuccObjList.clear(); -// Fuer Parent MessageStream erzeugen +// Create MessageStream for parent INetMIMEMessageStream aMessStream; aMessStream.SetSourceMessage( aParent ); aMessStream.GenerateHeader( sal_False ); -// MessageStream in SvStream kopieren +// Copy MessageStream to SvStream SvMemoryStream aMemStream; char* pBuf = new char[1025]; int nRead; @@ -622,12 +621,11 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList rList, const Referenc if (!xComponentSet.is()) return; -// MIB 25.6.98: Geschachtelte Formulare abfangen ... oder muesste -// man sie submitten? +// MIB 25.6.98: Catch nested Forms Geschachtelte; or would we need to submit them? if (!hasProperty(PROPERTY_CLASSID, xComponentSet)) return; -// Namen ermitteln +// Get names if (!hasProperty(PROPERTY_NAME, xComponentSet)) return; @@ -637,7 +635,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList rList, const Referenc xComponentSet-getPropertyValue( PROPERTY_NAME ) = aName; if( aName.isEmpty() nClassId != FormComponentType::IMAGEBUTTON) return; -else// Name um den Prefix erweitern +else// Extend name with the prefix aName = rNamePrefix + aName; switch( nClassId ) @@ -645,8 +643,8 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList rList, const Referenc // Buttons case FormComponentType::COMMANDBUTTON: { -// Es wird nur der gedrueckte Submit-Button ausgewertet -// MIB: Sofern ueberhaupt einer uebergeben wurde +// We only evaluate the pressed Submit button +// MIB: If one is passed at all if( rxSubmitButton.is() ) { ReferenceXPropertySet xSubmitButtonComponent(rxSubmitButton-getModel(), UNO_QUERY); @@ -663,8 +661,8 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList rList, const Referenc // ImageButtons case FormComponentType::IMAGEBUTTON: { -// Es wird nur der gedrueckte Submit-Button
[Libreoffice-commits] .: svx/inc svx/source unusedcode.easy
svx/inc/svx/xtable.hxx|1 - svx/source/xoutdev/xtable.cxx | 15 --- unusedcode.easy |1 - 3 files changed, 17 deletions(-) New commits: commit 8af1b357b1c87c9f3eea7660881b2ffacc133f58 Author: Santiago Martinez smvar...@gmail.com Date: Mon Feb 13 21:52:07 2012 +0100 Remove unused code. diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx index a5f2197..eaca035 100644 --- a/svx/inc/svx/xtable.hxx +++ b/svx/inc/svx/xtable.hxx @@ -238,7 +238,6 @@ protected: XPropertyList( XPropertyListType t, const String rPath, XOutdevItemPool* pXPool = NULL ); -voidClear(); public: virtual ~XPropertyList(); diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index 1eedd7a..9d18cc0 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -91,21 +91,6 @@ XPropertyList::~XPropertyList() SfxItemPool::Free(pXPool); } -void XPropertyList::Clear() -{ -for( size_t i = 0, n = aList.size(); i n; ++i ) { -delete aList[ i ]; -} -aList.clear(); -if( pBmpList ) -{ -for ( size_t i = 0, n = pBmpList-size(); i n; ++i ) { -delete (*pBmpList)[ i ]; -} -pBmpList-clear(); -} -} - long XPropertyList::Count() const { if( bListDirty ) diff --git a/unusedcode.easy b/unusedcode.easy index 5142e88..95f65eb 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -622,7 +622,6 @@ XMLTextListAutoStylePoolNames_Impl::Remove(rtl::OUString*) XMLTextListAutoStylePool_Impl::GetPos(XMLTextListAutoStylePoolEntry_Impl const*) const XMLTextListAutoStylePool_Impl::Remove(XMLTextListAutoStylePoolEntry_Impl*) XMLVisAreaContext::XMLVisAreaContext(SvXMLImport, unsigned short, rtl::OUString const, com::sun::star::uno::Referencecom::sun::star::xml::sax::XAttributeList const, Rectangle, short) -XPropertyList::Clear() XWindowItem::XWindowItem(unsigned short, Window*) XWindowItem::XWindowItem(unsigned short, com::sun::star::uno::Referencecom::sun::star::awt::XWindow) XclExpFontBuffer::Insert(ScPatternAttr const, short, XclExpColorType, bool) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source
connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit d951032005eabd1beb49b3c4c47ab560143e9ae9 Author: Lionel Elie Mamane lio...@mamane.lu Date: Thu Feb 9 18:34:04 2012 +0100 fdo#45249 declare support for Core SQL - Base allows user aggregate functions diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index d2e4927..b2afc79 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -724,7 +724,12 @@ sal_Bool DatabaseMetaData::supportsMinimumSQLGrammar( ) throw (SQLException, Ru sal_Bool DatabaseMetaData::supportsCoreSQLGrammar( ) throw (SQLException, RuntimeException) { // LEM: jdbc driver says not, although the comments in it seem old -return sal_False; +// fdo#45249 Base query design won't use any aggregate function +// (except COUNT(*) unless we say yes, so say yes. +// Actually, Base assumes *also* support for aggregate functions collect, fusion, intersection +// as soon as supportsCoreSQLGrammar() returns true. +// Those are *not* Core SQL, though. They are in optional feature S271 Basic multiset support +return sal_True; } sal_Bool DatabaseMetaData::supportsExtendedSQLGrammar( ) throw (SQLException, RuntimeException) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source
connectivity/source/drivers/postgresql/pq_databasemetadata.cxx | 57 ++ 1 file changed, 38 insertions(+), 19 deletions(-) New commits: commit 994429954aadbfce3a744391dbcd31dabf045633 Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Feb 1 17:18:48 2012 +0100 postgres getColumns: skip dropped columns, make ORDINAL_POSITION consecutive diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index b2afc79..d58cdbe 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1408,6 +1408,9 @@ static bool isSystemColumn( const OUString columnName ) // is not exported by the postgres header const static int PQ_VARHDRSZ = sizeof( sal_Int32 ); +// Oh, quelle horreur +// LEM TODO: Need to severely rewrite that! +// should probably just do the same as ODBC or JDBC drivers... static void extractPrecisionAndScale( sal_Int32 dataType, sal_Int32 atttypmod, sal_Int32 *precision, sal_Int32 *scale ) { @@ -1511,7 +1514,6 @@ static void columnMetaData2DatabaseTypeDescription( { (void) catalog; // LEM TODO: review in comparison with JDBC driver -// OK, confirmed it does not return consecutive values in ORDINAL_POSITION; needs to be fixed. Statics statics = getStatics(); // continue ! @@ -1531,7 +1533,9 @@ static void columnMetaData2DatabaseTypeDescription( } // ignore catalog, as a single pq connection -// does not support multiple catalogs eitherway +// does not support multiple catalogs anyway +// We don't use information_schema.columns because it contains +// only the columns the current user has any privilege over. // 1. TABLE_CAT string = table catalog (may be NULL) // = not supported @@ -1562,9 +1566,7 @@ static void columnMetaData2DatabaseTypeDescription( // NULLABLE_UNKNOWN - nullability unknown // = pg_attribute.attnotnull // 12. REMARKS string = comment describing column (may be NULL ) -// = Don't know, there does not seem to exist something like -// that in postgres -// LEM TODO: comments exist, find how to retrieve them easily +// = pg_description.description // 13. COLUMN_DEF string = default value (may be NULL) // = pg_type.typdefault // 14. SQL_DATA_TYPE long = unused @@ -1592,11 +1594,10 @@ static void columnMetaData2DatabaseTypeDescription( pg_attribute.atttypmod,// 5 pg_attribute.attnotnull, // 6 pg_type.typdefault,// 7 -pg_attribute.attnum, // 8 -pg_type.typtype, // 9 -pg_attrdef.adsrc, // 10 -pg_description.description, // 11 -pg_type.typbasetype// 12 +pg_type.typtype, // 8 +pg_attrdef.adsrc, // 9 +pg_description.description,// 10 +pg_type.typbasetype// 11 FROM pg_class, pg_attribute LEFT JOIN pg_attrdef ON pg_attribute.attrelid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum LEFT JOIN pg_description ON pg_attribute.attrelid = pg_description.objoid AND pg_attribute.attnum=pg_description.objsubid, @@ -1604,6 +1605,7 @@ static void columnMetaData2DatabaseTypeDescription( WHERE pg_attribute.attrelid = pg_class.oid AND pg_attribute.atttypid = pg_type.oid AND pg_class.relnamespace = pg_namespace.oid + AND NOT pg_attribute.attisdropped AND pg_namespace.nspname LIKE ? AND pg_class.relname LIKE ? AND pg_attribute.attname LIKE ? @@ -1623,31 +1625,47 @@ static void columnMetaData2DatabaseTypeDescription( Reference XStatement domainTypeStmt = m_origin-createStatement(); columnMetaData2DatabaseTypeDescription( domainMap, rs, domainTypeStmt ); +unsigned int colNum; +OUString sSchema( ASCII_STR(#invalid#) ); +OUString sTable( ASCII_STR(#invalid#) ); + while( rs-next() ) { OUString columnName = xRow-getString(3); if( m_pSettings-showSystemColumns || ! isSystemColumn( columnName ) ) { +OUString sNewSchema( xRow-getString(1) ); +OUString sNewTable( xRow-getString(2) ); +if ( sNewSchema != sSchema || sNewTable != sTable ) +{ +colNum = 1; +sSchema = sNewSchema; +sTable = sNewTable; +} +else +++colNum; sal_Int32 precision, scale, type; Sequence Any row( 18 );
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source
connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b5bd15f28b8abd2f452773422265a7f7166812b1 Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Feb 1 18:38:13 2012 +0100 pgsql getColumns: order by columns, not by their concatenation... diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx index d58cdbe..7f8249c 100644 --- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx @@ -1609,7 +1609,7 @@ static void columnMetaData2DatabaseTypeDescription( AND pg_namespace.nspname LIKE ? AND pg_class.relname LIKE ? AND pg_attribute.attname LIKE ? -ORDER BY pg_namespace.nspname || pg_class.relname || pg_attribute.attnum +ORDER BY pg_namespace.nspname, pg_class.relname, pg_attribute.attnum ) ); Reference XParameters parameters( statement, UNO_QUERY_THROW ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/source
vcl/source/gdi/gdimtf.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 9b20b8e9c6a177b98b86f227e2e5d056563ec9d5 Author: Radek Doulik r...@novell.com Date: Wed Jan 25 09:29:00 2012 +0100 Revert fix rendering of metafiles embedded in emf+ This reverts commit f7b6cd87f78b786b59984e5b3c8a5a78f0ed7a94. diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 49d3bbb..f6cb49c 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 ); -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++ ) +for( size_t nCurPos = nCurrentActionElement; nCurPos nPos; nCurPos++ ) +{ +if( !Hook() ) { 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 ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) +if( bUseCanvas !pMtf ImplPlayWithRenderer( pOut, rPos, aDestSize ) ) return; Size aTmpPrefSize( pOut-LogicToPixel( GetPrefSize(), aDrawMap ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ppt/pptshape.cxx | 40 1 file changed, 36 insertions(+), 4 deletions(-) New commits: commit 229b0cc0029e93fa808624d8aa4dcfa2e289b1aa Author: Radek Doulik r...@novell.com Date: Mon Jan 16 15:37:23 2012 +0100 handle [more] placeholder shapes in Layout slides - import them as outliner shapes, so that they don't appear on regular slides - choose appropriate placeholder shapes on regular slides (Table, Picture, Chart, Media) diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index dfb4a38..17ceb30 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -126,7 +126,7 @@ void PPTShape::addShape( const awt::Rectangle* pShapeRect, ::oox::drawingml::ShapeIdMap* pShapeMap ) { -OSL_TRACE(add shape id: %s location: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? master : meShapeLocation == Slide ? slide : other); +OSL_TRACE(add shape id: %s location: %s subtype: %d service: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? master : meShapeLocation == Slide ? slide : meShapeLocation == Layout ? layout : other, mnSubType, rtl::OUStringToOString(msServiceName, RTL_TEXTENCODING_UTF8 ).getStr()); // only placeholder from layout are being inserted if ( mnSubType ( meShapeLocation == Master ) ) return; @@ -142,6 +142,7 @@ void PPTShape::addShape( if ( sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GraphicObjectShape)) sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.OLE2Shape)) ) { +const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) ); OSL_TRACE(has master: %p, rSlidePersist.getMasterPersist().get()); switch( mnSubType ) { @@ -166,7 +167,6 @@ void PPTShape::addShape( break; case XML_obj : { -const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) ); sServiceName = sOutlinerShapeService; aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getBodyTextStyle() : rSlidePersist.getBodyTextStyle(); } @@ -174,7 +174,6 @@ void PPTShape::addShape( case XML_body : { const rtl::OUString sNotesShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.NotesShape ) ); -const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) ); if ( rSlidePersist.isNotesPage() ) { sServiceName = sNotesShapeService; @@ -221,8 +220,41 @@ void PPTShape::addShape( sServiceName = sPageShapeService; } break; - +case XML_chart : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sChartService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.ChartShape ) ); +sServiceName = sChartService; +} +break; +case XML_tbl : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sTableService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.TableShape ) ); +sServiceName = sTableService; +} +break; +case XML_pic : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sGraphicObjectService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.GraphicObjectShape ) ); +sServiceName = sGraphicObjectService; +} +break; +case XML_media : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sMediaService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.MediaShape ) ); +sServiceName =
[Libreoffice-commits] .: 2 commits - svx/source tools/inc tools/source
svx/source/customshapes/EnhancedCustomShape2d.cxx |6 +++--- tools/inc/tools/poly.hxx |3 ++- tools/source/generic/poly.cxx |5 - 3 files changed, 9 insertions(+), 5 deletions(-) New commits: commit 1e47b40c79ddb1d3d16d1521a5d8b5960cd37661 Author: Radek Doulik r...@novell.com Date: Thu Jan 12 11:07:51 2012 +0100 fix ooxml custom shapes with 360 degree arcs diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 948fff5..ee8a365 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1407,7 +1407,7 @@ void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274 pObj-SetMergedItem( aLineEndCenter ); } -basegfx::B2DPolygon CreateArc( const Rectangle rRect, const Point rStart, const Point rEnd, const sal_Bool bClockwise ) +basegfx::B2DPolygon CreateArc( const Rectangle rRect, const Point rStart, const Point rEnd, const sal_Bool bClockwise, sal_Bool bFullCircle = sal_False ) { Rectangle aRect( rRect ); Point aStart( rStart ); @@ -1430,7 +1430,7 @@ basegfx::B2DPolygon CreateArc( const Rectangle rRect, const Point rStart, cons } } -Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC ); +Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle ); basegfx::B2DPolygon aRetval; if ( bClockwise ) @@ -1757,7 +1757,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16 rSrcPt, sal_uInt16 rSegm OSL_TRACE(ARCANGLETO rect: %d, %d x %d, %d start: %d, %d end: %d, %d clockwise: %d, aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom(), aStartPoint.X(), aStartPoint.Y(), aEndPoint.X(), aEndPoint.Y(), bClockwise); -aNewB2DPolygon.append(CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise)); +aNewB2DPolygon.append(CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint fSwingAngle F_PI)); } rSrcPt += 2; commit 72c50c235447f293a3772105fdfdd4f45d09ff9e Author: Radek Doulik r...@novell.com Date: Thu Jan 12 11:06:11 2012 +0100 make it possible to create 360 degrees arc (circle) diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index 5923266..480b357 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -140,7 +140,8 @@ public: sal_uInt16 nPoints = 0 ); Polygon( const Rectangle rBound, const Point rStart, const Point rEnd, - PolyStyle ePolyStyle = POLY_ARC ); + PolyStyle ePolyStyle = POLY_ARC, + sal_Bool bWholeCircle = sal_False ); Polygon( const Point rBezPt1, const Point rCtrlPt1, const Point rBezPt2, const Point rCtrlPt2, sal_uInt16 nPoints = 0 ); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index fa2d1f5..8c64a9f 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -510,7 +510,7 @@ Polygon::Polygon( const Point rCenter, long nRadX, long nRadY, sal_uInt16 nPoin // --- Polygon::Polygon( const Rectangle rBound, - const Point rStart, const Point rEnd, PolyStyle eStyle ) + const Point rStart, const Point rEnd, PolyStyle eStyle, sal_Bool bFullCircle ) { DBG_CTOR( Polygon, NULL ); @@ -547,6 +547,9 @@ Polygon::Polygon( const Rectangle rBound, if( fDiff 0. ) fDiff += F_2PI; +if ( bFullCircle ) +fDiff = F_2PI; + // Punktanzahl proportional verkleinern ( fDiff / (2PI) ); // ist eingentlich nur fuer einen Kreis richtig; wir // machen es hier aber trotzdem ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - svx/source tools/inc tools/source
svx/source/customshapes/EnhancedCustomShape2d.cxx |6 +++--- tools/inc/tools/poly.hxx |3 ++- tools/source/generic/poly.cxx |5 - 3 files changed, 9 insertions(+), 5 deletions(-) New commits: commit 1ceb8e1878be513f260c6d7fbe7066627fca0693 Author: Radek Doulik r...@novell.com Date: Thu Jan 12 11:07:51 2012 +0100 fix ooxml custom shapes with 360 degree arcs diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 948fff5..ee8a365 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1407,7 +1407,7 @@ void EnhancedCustomShape2d::SwapStartAndEndArrow( SdrObject* pObj ) //#108274 pObj-SetMergedItem( aLineEndCenter ); } -basegfx::B2DPolygon CreateArc( const Rectangle rRect, const Point rStart, const Point rEnd, const sal_Bool bClockwise ) +basegfx::B2DPolygon CreateArc( const Rectangle rRect, const Point rStart, const Point rEnd, const sal_Bool bClockwise, sal_Bool bFullCircle = sal_False ) { Rectangle aRect( rRect ); Point aStart( rStart ); @@ -1430,7 +1430,7 @@ basegfx::B2DPolygon CreateArc( const Rectangle rRect, const Point rStart, cons } } -Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC ); +Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle ); basegfx::B2DPolygon aRetval; if ( bClockwise ) @@ -1757,7 +1757,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16 rSrcPt, sal_uInt16 rSegm OSL_TRACE(ARCANGLETO rect: %d, %d x %d, %d start: %d, %d end: %d, %d clockwise: %d, aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom(), aStartPoint.X(), aStartPoint.Y(), aEndPoint.X(), aEndPoint.Y(), bClockwise); -aNewB2DPolygon.append(CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise)); +aNewB2DPolygon.append(CreateArc( aRect, bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, bClockwise, aStartPoint == aEndPoint fSwingAngle F_PI)); } rSrcPt += 2; commit e4cd111fae5f9b781471d4150915bb189eff90ef Author: Radek Doulik r...@novell.com Date: Thu Jan 12 11:06:11 2012 +0100 make it possible to create 360 degrees arc (circle) diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index 5923266..480b357 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -140,7 +140,8 @@ public: sal_uInt16 nPoints = 0 ); Polygon( const Rectangle rBound, const Point rStart, const Point rEnd, - PolyStyle ePolyStyle = POLY_ARC ); + PolyStyle ePolyStyle = POLY_ARC, + sal_Bool bWholeCircle = sal_False ); Polygon( const Point rBezPt1, const Point rCtrlPt1, const Point rBezPt2, const Point rCtrlPt2, sal_uInt16 nPoints = 0 ); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index f062b9e..14b34d3 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -510,7 +510,7 @@ Polygon::Polygon( const Point rCenter, long nRadX, long nRadY, sal_uInt16 nPoin // --- Polygon::Polygon( const Rectangle rBound, - const Point rStart, const Point rEnd, PolyStyle eStyle ) + const Point rStart, const Point rEnd, PolyStyle eStyle, sal_Bool bFullCircle ) { DBG_CTOR( Polygon, NULL ); @@ -547,6 +547,9 @@ Polygon::Polygon( const Rectangle rBound, if( fDiff 0. ) fDiff += F_2PI; +if ( bFullCircle ) +fDiff = F_2PI; + // Punktanzahl proportional verkleinern ( fDiff / (2PI) ); // ist eingentlich nur fuer einen Kreis richtig; wir // machen es hier aber trotzdem ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - oox/source
oox/source/drawingml/customshapegeometry.cxx | 11 ++-- oox/source/drawingml/customshapepresets1.cxx | 22 +++-- oox/source/drawingml/customshapepresets2.cxx | 22 +++-- oox/source/drawingml/customshapepresets3.cxx | 22 +++-- oox/source/drawingml/customshapepresets5.cxx | 66 +-- 5 files changed, 55 insertions(+), 88 deletions(-) New commits: commit d0521e28a12e6fbba70d6d866ba37fb6565701f9 Author: Radek Doulik r...@novell.com Date: Tue Jan 10 13:09:51 2012 +0100 pptx: regenerate presets after custom shapes moveto/close fix diff --git a/oox/source/drawingml/customshapepresets1.cxx b/oox/source/drawingml/customshapepresets1.cxx index d0b5c42..4013557 100644 --- a/oox/source/drawingml/customshapepresets1.cxx +++ b/oox/source/drawingml/customshapepresets1.cxx @@ -12524,7 +12524,7 @@ void CustomShapeProperties::initializePresetsMap1() } { aPropSequence [1].Name = CREATE_OUSTRING (Segments); -Sequence EnhancedCustomShapeSegment aSegmentSeq (13); +Sequence EnhancedCustomShapeSegment aSegmentSeq (12); { EnhancedCustomShapeSegment aSegment; aSegment.Command = 1; @@ -12557,51 +12557,45 @@ void CustomShapeProperties::initializePresetsMap1() } { EnhancedCustomShapeSegment aSegment; -aSegment.Command = 4; -aSegment.Count = 0; -aSegmentSeq [5] = aSegment; -} -{ -EnhancedCustomShapeSegment aSegment; aSegment.Command = 2; aSegment.Count = 1; -aSegmentSeq [6] = aSegment; +aSegmentSeq [5] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 6; aSegment.Count = 0; -aSegmentSeq [7] = aSegment; +aSegmentSeq [6] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 5; aSegment.Count = 0; -aSegmentSeq [8] = aSegment; +aSegmentSeq [7] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 1; aSegment.Count = 1; -aSegmentSeq [9] = aSegment; +aSegmentSeq [8] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 2; aSegment.Count = 1; -aSegmentSeq [10] = aSegment; +aSegmentSeq [9] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 6; aSegment.Count = 0; -aSegmentSeq [11] = aSegment; +aSegmentSeq [10] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 5; aSegment.Count = 0; -aSegmentSeq [12] = aSegment; +aSegmentSeq [11] = aSegment; } aPropSequence [1].Value = makeAny (aSegmentSeq); } diff --git a/oox/source/drawingml/customshapepresets2.cxx b/oox/source/drawingml/customshapepresets2.cxx index 9cccf75..8f6a98b 100644 --- a/oox/source/drawingml/customshapepresets2.cxx +++ b/oox/source/drawingml/customshapepresets2.cxx @@ -16609,7 +16609,7 @@ void CustomShapeProperties::initializePresetsMap2() } { aPropSequence [1].Name = CREATE_OUSTRING (Segments); -Sequence EnhancedCustomShapeSegment aSegmentSeq (14); +Sequence EnhancedCustomShapeSegment aSegmentSeq (13); { EnhancedCustomShapeSegment aSegment; aSegment.Command = 1; @@ -16648,51 +16648,45 @@ void CustomShapeProperties::initializePresetsMap2() } { EnhancedCustomShapeSegment aSegment; -aSegment.Command = 4; -aSegment.Count = 0; -aSegmentSeq [6] = aSegment; -} -{ -EnhancedCustomShapeSegment aSegment; aSegment.Command = 2; aSegment.Count = 1; -aSegmentSeq [7] = aSegment; +aSegmentSeq [6] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 6; aSegment.Count = 0; -aSegmentSeq [8] = aSegment; +aSegmentSeq [7] = aSegment; } { EnhancedCustomShapeSegment aSegment; aSegment.Command = 5; aSegment.Count = 0; -aSegmentSeq [9] = aSegment; +
[Libreoffice-commits] .: svx/source
svx/source/customshapes/EnhancedCustomShape2d.cxx | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) New commits: commit 250f84daf8f443bf436e0a86c9a718c37749971a Author: Radek Doulik r...@novell.com Date: Wed Jan 4 15:05:32 2012 +0100 implemented QUADRATICCURVETO case of custom shape paths - convert them to cubic beziers, which we have in basegfx diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 2b2078a..0d9f9a3 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1637,10 +1637,20 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16 rSrcPt, sal_uInt16 rSegm } break; -case QUADRATICCURVETO : // TODO +case QUADRATICCURVETO : for ( sal_Int32 i(0L); ( i nPntCount ) ( rSrcPt + 1 nCoordSize ); i++ ) { -rSrcPt += 2; +const Point aControl(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True )); +const Point aEnd(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True )); + +basegfx::B2DPoint aStartPointB2D( aNewB2DPolygon.getB2DPoint(aNewB2DPolygon.count() - 1 ) ); +Point aStartPoint( aStartPointB2D.getX(), aStartPointB2D.getY() ); + +DBG_ASSERT(aNewB2DPolygon.count(), EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)); +aNewB2DPolygon.appendBezierSegment( +basegfx::B2DPoint(aStartPoint.X() + 2.0*(aControl.X() - aStartPoint.X())/3.0, aStartPoint.Y() + 2.0*(aControl.Y() - aStartPoint.Y())/3.0), +basegfx::B2DPoint(aEnd.X() + 2.0*(aControl.X() - aEnd.X())/3.0, aEnd.Y() + 2.0*(aControl.Y() - aEnd.Y())/3.0), +basegfx::B2DPoint(aEnd.X(), aEnd.Y())); } break; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svx/source
svx/source/customshapes/EnhancedCustomShape2d.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8edd479f579afe9b26790c99a9a6648261aec4e3 Author: Radek Doulik r...@novell.com Date: Wed Jan 4 15:27:27 2012 +0100 move the assert checking the polygon count higher - so that it is called before accessing polygon points diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 0d9f9a3..f1fbf44 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1643,10 +1643,10 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16 rSrcPt, sal_uInt16 rSegm const Point aControl(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True )); const Point aEnd(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True )); +DBG_ASSERT(aNewB2DPolygon.count(), EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)); basegfx::B2DPoint aStartPointB2D( aNewB2DPolygon.getB2DPoint(aNewB2DPolygon.count() - 1 ) ); Point aStartPoint( aStartPointB2D.getX(), aStartPointB2D.getY() ); -DBG_ASSERT(aNewB2DPolygon.count(), EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)); aNewB2DPolygon.appendBezierSegment( basegfx::B2DPoint(aStartPoint.X() + 2.0*(aControl.X() - aStartPoint.X())/3.0, aStartPoint.Y() + 2.0*(aControl.Y() - aStartPoint.Y())/3.0), basegfx::B2DPoint(aEnd.X() + 2.0*(aControl.X() - aEnd.X())/3.0, aEnd.Y() + 2.0*(aControl.Y() - aEnd.Y())/3.0), ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - oox/source
oox/source/drawingml/customshapegeometry.cxx |2 +- oox/source/drawingml/customshapepresets1.cxx |2 +- oox/source/drawingml/customshapepresets2.cxx |4 ++-- oox/source/drawingml/customshapepresets4.cxx |2 +- oox/source/drawingml/customshapepresets6.cxx |6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) New commits: commit ec2d500c094c1c64c9b0dc4e90d0943d06349e77 Author: Radek Doulik r...@novell.com Date: Wed Jan 4 16:08:25 2012 +0100 regenerated custom shape presets with fixed ssd* constants diff --git a/oox/source/drawingml/customshapepresets1.cxx b/oox/source/drawingml/customshapepresets1.cxx index faf8841..beebc82 100644 --- a/oox/source/drawingml/customshapepresets1.cxx +++ b/oox/source/drawingml/customshapepresets1.cxx @@ -16003,7 +16003,7 @@ void CustomShapeProperties::initializePresetsMap1() aStringSequence[79] = CREATE_OUSTRING (?15 +?75 -0); aStringSequence[80] = CREATE_OUSTRING (?26 +?76 -0); aStringSequence[81] = CREATE_OUSTRING (?26 +0-?38 ); -aStringSequence[82] = CREATE_OUSTRING (min(logwidth,logheight)/50); +aStringSequence[82] = CREATE_OUSTRING (min(logwidth,logheight)/2); aStringSequence[83] = CREATE_OUSTRING (logheight); aStringSequence[84] = CREATE_OUSTRING (logwidth); aPropertyMap [PROP_Equations] = aStringSequence; diff --git a/oox/source/drawingml/customshapepresets2.cxx b/oox/source/drawingml/customshapepresets2.cxx index 2dda792..36d79b5 100644 --- a/oox/source/drawingml/customshapepresets2.cxx +++ b/oox/source/drawingml/customshapepresets2.cxx @@ -3433,7 +3433,7 @@ void CustomShapeProperties::initializePresetsMap2() aStringSequence[101] = CREATE_OUSTRING (?17 +?97 -0); aStringSequence[102] = CREATE_OUSTRING (?32 +?98 -0); aStringSequence[103] = CREATE_OUSTRING (?32 +0-?48 ); -aStringSequence[104] = CREATE_OUSTRING (min(logwidth,logheight)/50); +aStringSequence[104] = CREATE_OUSTRING (min(logwidth,logheight)/2); aStringSequence[105] = CREATE_OUSTRING (logheight); aStringSequence[106] = CREATE_OUSTRING (logwidth); aPropertyMap [PROP_Equations] = aStringSequence; @@ -17494,7 +17494,7 @@ void CustomShapeProperties::initializePresetsMap2() } { Sequence OUString aStringSequence (18); -aStringSequence[0] = CREATE_OUSTRING (min(logwidth,logheight)/54); +aStringSequence[0] = CREATE_OUSTRING (min(logwidth,logheight)/6); aStringSequence[1] = CREATE_OUSTRING (logwidth+0-?0 ); aStringSequence[2] = CREATE_OUSTRING (logheight+0-?0 ); aStringSequence[3] = CREATE_OUSTRING (?0 *29289/10); diff --git a/oox/source/drawingml/customshapepresets4.cxx b/oox/source/drawingml/customshapepresets4.cxx index 185cec2..f99ad2c 100644 --- a/oox/source/drawingml/customshapepresets4.cxx +++ b/oox/source/drawingml/customshapepresets4.cxx @@ -7628,7 +7628,7 @@ void CustomShapeProperties::initializePresetsMap4() aStringSequence[4] = CREATE_OUSTRING (logheight*?0 /10); aStringSequence[5] = CREATE_OUSTRING (?1 *?3 /10); aStringSequence[6] = CREATE_OUSTRING (logwidth+0-?5 ); -aStringSequence[7] = CREATE_OUSTRING (min(logwidth,logheight)/56); +aStringSequence[7] = CREATE_OUSTRING (min(logwidth,logheight)/8); aStringSequence[8] = CREATE_OUSTRING (0+?7 -0); aStringSequence[9] = CREATE_OUSTRING (540*1/14); aStringSequence[10] = CREATE_OUSTRING (?7 *tan(pi*(?9 )/1080)); diff --git a/oox/source/drawingml/customshapepresets6.cxx b/oox/source/drawingml/customshapepresets6.cxx index b100a29..77d7145 100644 --- a/oox/source/drawingml/customshapepresets6.cxx +++ b/oox/source/drawingml/customshapepresets6.cxx @@ -693,9 +693,9 @@ void CustomShapeProperties::initializePresetsMap6() aStringSequence[13] = CREATE_OUSTRING (logwidth+0-?12 ); aStringSequence[14] = CREATE_OUSTRING (logheight); aStringSequence[15] = CREATE_OUSTRING (logwidth); -aStringSequence[16] = CREATE_OUSTRING (min(logwidth,logheight)/80); -aStringSequence[17] = CREATE_OUSTRING (min(logwidth,logheight)/64); -aStringSequence[18] = CREATE_OUSTRING (min(logwidth,logheight)/56); +aStringSequence[16] = CREATE_OUSTRING (min(logwidth,logheight)/32); +aStringSequence[17] = CREATE_OUSTRING (min(logwidth,logheight)/16); +aStringSequence[18] = CREATE_OUSTRING (min(logwidth,logheight)/8); aPropertyMap [PROP_Equations] = aStringSequence; } { commit 7f1fbec21e94b4074fb53d8614c1392863e510a3 Author: Radek Doulik r...@novell.com Date: Wed Jan 4 16:07:59 2012 +0100 PPTX: fix ssd* constants import for drawingml formulas diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index cd75285..6e93cdd 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@
[Libreoffice-commits] .: oox/inc oox/source
oox/inc/oox/drawingml/customshapeproperties.hxx |2 ++ oox/source/drawingml/customshapeproperties.cxx |1 + oox/source/drawingml/shape.cxx |6 ++ oox/source/token/properties.txt |1 + 4 files changed, 10 insertions(+) New commits: commit 8d691a2d94d2b2be3ad3fc0a44d2abc387d7b6c2 Author: Felix Zhang fezh...@suse.com Date: Tue Dec 13 12:07:20 2011 +0800 import text body rotation property of custom shape diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index d5ae9a5..004d771 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -136,6 +136,7 @@ public: std::vector com::sun::star::drawing::EnhancedCustomShapeSegment getSegments(){ return maSegments; }; voidsetMirroredX( sal_Bool bMirroredX ) { mbMirroredX = bMirroredX; }; voidsetMirroredY( sal_Bool bMirroredY ) { mbMirroredY = bMirroredY; }; +voidsetTextRotateAngle( sal_Int32 nAngle ) { mnTextRotateAngle = nAngle; }; double getValue( const std::vector CustomShapeGuide , sal_uInt32 nIndex ) const; static sal_Int32 SetCustomShapeGuideValue( std::vector CustomShapeGuide rGuideList, const CustomShapeGuide rGuide ); @@ -157,6 +158,7 @@ private: maSegments; sal_BoolmbMirroredX; sal_BoolmbMirroredY; +sal_Int32 mnTextRotateAngle; typedef boost::unordered_map sal_Int32, PropertyMap PresetsMap; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index c433d76..12a7f29 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -186,6 +186,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); +aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d716823..a261eb9 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -528,6 +528,12 @@ Reference XShape Shape::createAndInsert( mpCustomShapePropertiesPtr-setMirroredX( sal_True ); if ( mbFlipV ) mpCustomShapePropertiesPtr-setMirroredY( sal_True ); +if( mpTextBody.get() ) +{ +sal_Int32 nTextRotateAngle = static_cast sal_Int32 ( mpTextBody-getTextProperties().moRotation.get( 0 ) ); +mpCustomShapePropertiesPtr-setTextRotateAngle( -nTextRotateAngle / 6 ); +} + OSL_TRACE(==cscode== shape name: '%s', rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); mpCustomShapePropertiesPtr-pushToPropSet( rFilterBase, xSet, mxShape ); } diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index d071a22..65d2cb0 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -458,6 +458,7 @@ TextLeftDistance TextLowerDistance TextOverlap TextRightDistance +TextRotateAngle TextRotation TextUpperDistance TextVerticalAdjust ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/inc oox/source
oox/inc/oox/drawingml/customshapeproperties.hxx |2 ++ oox/source/drawingml/customshapeproperties.cxx |1 + oox/source/drawingml/shape.cxx |6 ++ oox/source/token/properties.txt |1 + 4 files changed, 10 insertions(+) New commits: commit 35c9b832bfdd964c02a9c9a50810126e317ca08c Author: Felix Zhang fezh...@suse.com Date: Tue Dec 13 12:07:20 2011 +0800 import text body rotation property of custom shape diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index d5ae9a5..004d771 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -136,6 +136,7 @@ public: std::vector com::sun::star::drawing::EnhancedCustomShapeSegment getSegments(){ return maSegments; }; voidsetMirroredX( sal_Bool bMirroredX ) { mbMirroredX = bMirroredX; }; voidsetMirroredY( sal_Bool bMirroredY ) { mbMirroredY = bMirroredY; }; +voidsetTextRotateAngle( sal_Int32 nAngle ) { mnTextRotateAngle = nAngle; }; double getValue( const std::vector CustomShapeGuide , sal_uInt32 nIndex ) const; static sal_Int32 SetCustomShapeGuideValue( std::vector CustomShapeGuide rGuideList, const CustomShapeGuide rGuide ); @@ -157,6 +158,7 @@ private: maSegments; sal_BoolmbMirroredX; sal_BoolmbMirroredY; +sal_Int32 mnTextRotateAngle; typedef boost::unordered_map sal_Int32, PropertyMap PresetsMap; diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index c433d76..12a7f29 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -186,6 +186,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); +aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d716823..a261eb9 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -528,6 +528,12 @@ Reference XShape Shape::createAndInsert( mpCustomShapePropertiesPtr-setMirroredX( sal_True ); if ( mbFlipV ) mpCustomShapePropertiesPtr-setMirroredY( sal_True ); +if( mpTextBody.get() ) +{ +sal_Int32 nTextRotateAngle = static_cast sal_Int32 ( mpTextBody-getTextProperties().moRotation.get( 0 ) ); +mpCustomShapePropertiesPtr-setTextRotateAngle( -nTextRotateAngle / 6 ); +} + OSL_TRACE(==cscode== shape name: '%s', rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); mpCustomShapePropertiesPtr-pushToPropSet( rFilterBase, xSet, mxShape ); } diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index d071a22..65d2cb0 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -458,6 +458,7 @@ TextLeftDistance TextLowerDistance TextOverlap TextRightDistance +TextRotateAngle TextRotation TextUpperDistance TextVerticalAdjust ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapeproperties.cxx | 16 oox/source/drawingml/shapepropertiescontext.cxx |1 + 2 files changed, 1 insertion(+), 16 deletions(-) New commits: commit 748a636b5150dbab9d92832bd0f422f57b406114 Author: Radek Doulik r...@novell.com Date: Wed Dec 14 15:05:15 2011 +0100 use custom shapes for curved connector shapes - they looks correctly visually, we can make then connector shapes once we have new implementation diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 12a7f29..3f3bcdb 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -126,22 +126,6 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) static const OUString sBentConnector5 = CREATE_OUSTRING( mso-spt36 ); sType = sBentConnector5; } break; -case XML_curvedConnector2: { -static const OUString sCurvedConnector2 = CREATE_OUSTRING( mso-spt37 ); -sType = sCurvedConnector2; -} break; -case XML_curvedConnector3: { -static const OUString sCurvedConnector3 = CREATE_OUSTRING( mso-spt38 ); -sType = sCurvedConnector3; -} break; -case XML_curvedConnector4: { -static const OUString sCurvedConnector4 = CREATE_OUSTRING( mso-spt39 ); -sType = sCurvedConnector4; -} break; -case XML_curvedConnector5: { -static const OUString sCurvedConnector5 = CREATE_OUSTRING( mso-spt40 ); -sType = sCurvedConnector5; -} break; default: break; } diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index 1d2a216..7f862e4 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -88,6 +88,7 @@ Reference XFastContextHandler ShapePropertiesContext::createFastChildContext( mrShape.getServiceName() = sLineShape; } if( ( nToken = XML_bentConnector2 nToken = XML_bentConnector5 ) || +( nToken = XML_curvedConnector2 nToken = XML_curvedConnector5 ) || nToken == XML_straightConnector1 ) { static const OUString sCustomShape( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.drawing.CustomShape ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - oox/source
oox/source/drawingml/customshapepresets1.cxx | 20 ++-- oox/source/drawingml/customshapepresets2.cxx |4 ++-- oox/source/drawingml/customshapepresets3.cxx | 18 +- oox/source/drawingml/customshapepresets4.cxx | 14 +++--- oox/source/drawingml/customshapepresets5.cxx |8 oox/source/drawingml/customshapeproperties.cxx | 10 ++ 6 files changed, 38 insertions(+), 36 deletions(-) New commits: commit cd77642f2b2aa9a0f07a7b161b16b34d2b511828 Author: Radek Doulik r...@novell.com Date: Mon Dec 12 15:04:36 2011 +0100 pptx: updated custom shapes presets after latest fix in equations import diff --git a/oox/source/drawingml/customshapepresets1.cxx b/oox/source/drawingml/customshapepresets1.cxx index 2075b4e..faf8841 100644 --- a/oox/source/drawingml/customshapepresets1.cxx +++ b/oox/source/drawingml/customshapepresets1.cxx @@ -6312,8 +6312,8 @@ void CustomShapeProperties::initializePresetsMap1() aStringSequence[183] = CREATE_OUSTRING (?16 *cos(pi*(?4 )/1080)); aStringSequence[184] = CREATE_OUSTRING (?15 *(cos(atan2(?182 ,?183 ; aStringSequence[185] = CREATE_OUSTRING (?16 *(sin(atan2(?182 ,?183 ; -aStringSequence[186] = CREATE_OUSTRING (?21 +?123 -0); -aStringSequence[187] = CREATE_OUSTRING (?23 +?124 -0); +aStringSequence[186] = CREATE_OUSTRING (?21 +?184 -0); +aStringSequence[187] = CREATE_OUSTRING (?23 +?185 -0); aStringSequence[188] = CREATE_OUSTRING (?4 +0-540); aStringSequence[189] = CREATE_OUSTRING (?49 +540-0); aStringSequence[190] = CREATE_OUSTRING (?49 +1080-0); @@ -7568,14 +7568,14 @@ void CustomShapeProperties::initializePresetsMap1() aStringSequence[42] = CREATE_OUSTRING (?29 +0-?40 ); aStringSequence[43] = CREATE_OUSTRING (sqrt(?41 *?41 +?42 *?42 +0*0)); aStringSequence[44] = CREATE_OUSTRING ((1080*atan2(?41 ,?42 ))/pi); -aStringSequence[45] = CREATE_OUSTRING (?4 *sin(pi*(?0 )/1080)); -aStringSequence[46] = CREATE_OUSTRING (?4 *cos(pi*(?0 )/1080)); +aStringSequence[45] = CREATE_OUSTRING (?4 *sin(pi*(?44 )/1080)); +aStringSequence[46] = CREATE_OUSTRING (?4 *cos(pi*(?44 )/1080)); aStringSequence[47] = CREATE_OUSTRING (?39 +?45 -0); aStringSequence[48] = CREATE_OUSTRING (?40 +?46 -0); aStringSequence[49] = CREATE_OUSTRING (?27 +0-?45 ); aStringSequence[50] = CREATE_OUSTRING (?29 +0-?46 ); -aStringSequence[51] = CREATE_OUSTRING (?3 *sin(pi*(?0 )/1080)); -aStringSequence[52] = CREATE_OUSTRING (?3 *cos(pi*(?0 )/1080)); +aStringSequence[51] = CREATE_OUSTRING (?3 *sin(pi*(?44 )/1080)); +aStringSequence[52] = CREATE_OUSTRING (?3 *cos(pi*(?44 )/1080)); aStringSequence[53] = CREATE_OUSTRING (?48 +?51 -0); aStringSequence[54] = CREATE_OUSTRING (?47 +0-?52 ); aStringSequence[55] = CREATE_OUSTRING (?50 +?51 -0); @@ -7608,14 +7608,14 @@ void CustomShapeProperties::initializePresetsMap1() aStringSequence[82] = CREATE_OUSTRING (?69 +0-?80 ); aStringSequence[83] = CREATE_OUSTRING (sqrt(?81 *?81 +?82 *?82 +0*0)); aStringSequence[84] = CREATE_OUSTRING ((1080*atan2(?81 ,?82 ))/pi); -aStringSequence[85] = CREATE_OUSTRING (?4 *sin(pi*(?1 )/1080)); -aStringSequence[86] = CREATE_OUSTRING (?4 *cos(pi*(?1 )/1080)); +aStringSequence[85] = CREATE_OUSTRING (?4 *sin(pi*(?84 )/1080)); +aStringSequence[86] = CREATE_OUSTRING (?4 *cos(pi*(?84 )/1080)); aStringSequence[87] = CREATE_OUSTRING (?79 +?85 -0); aStringSequence[88] = CREATE_OUSTRING (?80 +?86 -0); aStringSequence[89] = CREATE_OUSTRING (?68 +0-?85 ); aStringSequence[90] = CREATE_OUSTRING (?69 +0-?86 ); -aStringSequence[91] = CREATE_OUSTRING (?3 *sin(pi*(?1 )/1080)); -aStringSequence[92] = CREATE_OUSTRING (?3 *cos(pi*(?1 )/1080)); +aStringSequence[91] = CREATE_OUSTRING (?3 *sin(pi*(?84 )/1080)); +aStringSequence[92] = CREATE_OUSTRING (?3 *cos(pi*(?84 )/1080)); aStringSequence[93] = CREATE_OUSTRING (?88 +?91 -0); aStringSequence[94] = CREATE_OUSTRING (?87 +0-?92 ); aStringSequence[95] = CREATE_OUSTRING (?90 +?91 -0); diff --git a/oox/source/drawingml/customshapepresets2.cxx b/oox/source/drawingml/customshapepresets2.cxx index 58f62ff..2dda792 100644 --- a/oox/source/drawingml/customshapepresets2.cxx +++ b/oox/source/drawingml/customshapepresets2.cxx @@ -14498,7 +14498,7 @@ void CustomShapeProperties::initializePresetsMap2() aStringSequence[12] = CREATE_OUSTRING ((1+?11 )/12); aStringSequence[13] = CREATE_OUSTRING (?12 *logwidth/1); aStringSequence[14] = CREATE_OUSTRING (?12 *logheight/1); -aStringSequence[15] = CREATE_OUSTRING (logwidth+0-?10 ); +
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source svx/source
oox/source/drawingml/shape.cxx| 22 -- svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 11 - 2 files changed, 16 insertions(+), 17 deletions(-) New commits: commit dc20e891db2065aa14ea5eac1ea4b57a1b9da644 Author: Muthu Subramanian sumu...@suse.com Date: Thu Dec 8 16:47:56 2011 +0530 n#719989: Rotation needs to be done post flipping. diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 2b81eac..d716823 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -509,18 +509,6 @@ Reference XShape Shape::createAndInsert( aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr ); aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr ); -// Moved here because the properties like Flip needs to be applied before -// applying the rotation property -if( bIsCustomShape ) -{ -if ( mbFlipH ) -mpCustomShapePropertiesPtr-setMirroredX( sal_True ); -if ( mbFlipV ) -mpCustomShapePropertiesPtr-setMirroredY( sal_True ); -OSL_TRACE(==cscode== shape name: '%s', rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); -mpCustomShapePropertiesPtr-pushToPropSet( rFilterBase, xSet, mxShape ); -} - // applying autogrowheight property before setting shape size, because // the shape size might be changed if currently autogrowheight is true // we must also check that the PropertySet supports the property. @@ -534,6 +522,16 @@ Reference XShape Shape::createAndInsert( if( aServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GroupShape)) ) PropertySet( xSet ).setProperties( aShapeProps ); +if( bIsCustomShape ) +{ +if ( mbFlipH ) +mpCustomShapePropertiesPtr-setMirroredX( sal_True ); +if ( mbFlipV ) +mpCustomShapePropertiesPtr-setMirroredY( sal_True ); +OSL_TRACE(==cscode== shape name: '%s', rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); +mpCustomShapePropertiesPtr-pushToPropSet( rFilterBase, xSet, mxShape ); +} + // in some cases, we don't have any text body. if( getTextBody() ) { diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index de53ed6..a92a962 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -315,11 +315,6 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende } pRenderedShape-Shear( pSdrObjCustomShape-GetSnapRect().Center(), nShearWink, nTan, sal_False); } -if( nRotateAngle ) -{ -double a = nRotateAngle * F_PI18000; -pRenderedShape-NbcRotate( pSdrObjCustomShape-GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); -} if ( bFlipV ) { Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) 1 ); @@ -332,6 +327,12 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende Point aBottom( aTop.X(), aTop.Y() + 1000 ); pRenderedShape-NbcMirror( aTop, aBottom ); } +// Note that the rotation needs be done after flipping +if( nRotateAngle ) +{ +double a = nRotateAngle * F_PI18000; +pRenderedShape-NbcRotate( pSdrObjCustomShape-GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); +} pRenderedShape-NbcSetStyleSheet( pSdrObjCustomShape-GetStyleSheet(), sal_True ); pRenderedShape-RecalcSnapRect(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - oox/source
oox/source/drawingml/customshapeproperties.cxx | 77 ++--- 1 file changed, 68 insertions(+), 9 deletions(-) New commits: commit e9877935b0d09c7a8321632632c440496a957b0c Author: Radek Doulik r...@novell.com Date: Wed Dec 7 13:37:12 2011 +0100 pptx: make sure we set right type for connector shapes diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index e0c1fd7..77eb296 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -167,8 +167,10 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi OSL_TRACE(connector shape: %s (%d), USS(sConnectorShapeType), mnShapePresetType); //const uno::Reference drawing::XShape xShape( xPropSet, UNO_QUERY ); Reference drawing::XEnhancedCustomShapeDefaulter xDefaulter( xShape, UNO_QUERY ); -if( xDefaulter.is() ) +if( xDefaulter.is() ) { xDefaulter-createCustomShapeDefaults( sConnectorShapeType ); +aPropertyMap[ PROP_Type ] = Any( sConnectorShapeType ); +} } else if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end()) { @@ -229,7 +231,10 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi } else if ( aGeoPropSeq[ i ].Name.equals( sType ) ) { -aGeoPropSeq[ i ].Value = CREATE_OUSTRING( ooxml-CustomShape ); +if ( sConnectorShapeType.getLength() 0 ) +aGeoPropSeq[ i ].Value = sConnectorShapeType; +else +aGeoPropSeq[ i ].Value = CREATE_OUSTRING( ooxml-CustomShape ); } } } commit f0bf2a2ae95ddad3d08ddd1413ec56bf04224a94 Author: Radek Doulik r...@novell.com Date: Thu Dec 1 12:13:33 2011 +0100 do not use new presets for connector shapes - until we have better implementation diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 322043d..e0c1fd7 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -97,6 +97,56 @@ sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector Cu CustomShapeProperties::PresetsMap CustomShapeProperties::maPresetsMap; +static OUString GetConnectorShapeType( sal_Int32 nType ) +{ +OSL_TRACE(GetConnectorShapeType preset: %d %d, nType, XML_straightConnector1); + +OUString sType; +switch( nType ) +{ +case XML_straightConnector1: { +static const OUString sStraightConnector1 = CREATE_OUSTRING( mso-spt32 ); +sType = sStraightConnector1; +} break; +case XML_bentConnector2: { +static const OUString sBentConnector2 = CREATE_OUSTRING( mso-spt33 ); +sType = sBentConnector2; +} break; +case XML_bentConnector3: { +static const OUString sBentConnector3 = CREATE_OUSTRING( mso-spt34 ); +sType = sBentConnector3; +} break; +case XML_bentConnector4: { +static const OUString sBentConnector4 = CREATE_OUSTRING( mso-spt35 ); +sType = sBentConnector4; +} break; +case XML_bentConnector5: { +static const OUString sBentConnector5 = CREATE_OUSTRING( mso-spt36 ); +sType = sBentConnector5; +} break; +case XML_curvedConnector2: { +static const OUString sCurvedConnector2 = CREATE_OUSTRING( mso-spt37 ); +sType = sCurvedConnector2; +} break; +case XML_curvedConnector3: { +static const OUString sCurvedConnector3 = CREATE_OUSTRING( mso-spt38 ); +sType = sCurvedConnector3; +} break; +case XML_curvedConnector4: { +static const OUString sCurvedConnector4 = CREATE_OUSTRING( mso-spt39 ); +sType = sCurvedConnector4; +} break; +case XML_curvedConnector5: { +static const OUString sCurvedConnector5 = CREATE_OUSTRING( mso-spt40 ); +sType = sCurvedConnector5; +} break; +default: +break; +} +return sType; +} + + void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFilterBase */, const Reference XPropertySet xPropSet, const Reference XShape xShape ) { @@ -110,7 +160,18 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi PropertyMap aPropertyMap; PropertySet aPropSet( xPropSet ); -if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end()) { +OUString sConnectorShapeType = GetConnectorShapeType(
[Libreoffice-commits] .: 2 commits - cppcanvas/source svx/source
cppcanvas/source/mtfrenderer/emfplus.cxx | 23 ++ svx/source/customshapes/EnhancedCustomShape2d.cxx |1 2 files changed, 24 insertions(+) New commits: commit c08d55eccc1b2e26d8d0408d70654751e8672fa7 Author: Radek Doulik r...@novell.com Date: Fri Nov 25 16:12:42 2011 +0100 make sure the bOOXMLShape flag is initialized diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 8e25997..12fb3e4 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -694,6 +694,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : nCoordTop ( 0 ), nCoordWidth ( 21600 ), nCoordHeight( 21600 ), +bOOXMLShape ( sal_False ), nXRef ( 0x8000 ), nYRef ( 0x8000 ), nFlags ( 0 ), commit d169860411a7fea060079d8ca27797b10af44732 Author: Radek Doulik r...@novell.com Date: Wed Nov 16 09:23:39 2011 +0100 more debug info for emf+ rendering - path diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index fe5a129..91c9560 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -207,6 +207,7 @@ namespace cppcanvas if ((pPointTypes [i] 0x07) == 3) { if (((i - last_normal )% 3) == 1) { polygon.setNextControlPoint (p - 1, mapped); +EMFP_DEBUG (printf (polygon append next: %d mapped: %f,%f\n, p - 1, mapped.getX (), mapped.getY ())); continue; } else if (((i - last_normal) % 3) == 2) { prev = mapped; @@ -217,14 +218,17 @@ namespace cppcanvas last_normal = i; } polygon.append (mapped); +EMFP_DEBUG (printf (polygon append point: %f,%f mapped: %f,%f\n, pPoints [i*2], pPoints [i*2 + 1], mapped.getX (), mapped.getY ())); if (hasPrev) { polygon.setPrevControlPoint (p, prev); +EMFP_DEBUG (printf (polygon append prev: %d mapped: %f,%f\n, p, prev.getX (), prev.getY ())); hasPrev = false; } p ++; if (pPointTypes (pPointTypes [i] 0x80)) { // closed polygon polygon.setClosed (true); aPolygon.append (polygon); +EMFP_DEBUG (printf (close polygon\n)); last_normal = i + 1; p = 0; polygon.clear (); @@ -234,6 +238,25 @@ namespace cppcanvas if (polygon.count ()) aPolygon.append (polygon); +EMFP_DEBUG ( +for (unsigned int i=0; iaPolygon.count(); i++) { +polygon = aPolygon.getB2DPolygon(i); +printf (polygon: %d\n, i); +for (unsigned int j=0; jpolygon.count(); j++) { +::basegfx::B2DPoint point = polygon.getB2DPoint(j); +printf (point: %f,%f\n, point.getX(), point.getY()); +if (polygon.isPrevControlPointUsed(j)) { +point = polygon.getPrevControlPoint(j); +printf (prev: %f,%f\n, point.getX(), point.getY()); +} +if (polygon.isNextControlPointUsed(j)) { +point = polygon.getNextControlPoint(j); +printf (next: %f,%f\n, point.getX(), point.getY()); +} +} +} +); + return aPolygon; } }; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sax/source
sax/source/tools/converter.cxx | 43 + 1 file changed, 43 insertions(+) New commits: commit f970963fd7438fe4a026febf2046a2f4430d0a9f Author: Radek Doulik r...@novell.com Date: Mon Nov 28 17:50:25 2011 +0100 added conversion from MeasureUnit::CM diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index e9a08c4..198ea4d 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -1966,6 +1966,49 @@ double Converter::GetConversionFactor(::rtl::OUStringBuffer rUnit, sal_Int16 nS } break; } +case MeasureUnit::CM: +{ +switch(nTargetUnit) +{ +case MeasureUnit::MM_100TH: +{ +fRetval = .001; +break; +} +case MeasureUnit::MM_10TH: +{ +fRetval = .01; +break; +} +case MeasureUnit::MM: +{ +fRetval = .1; +psUnit = gpsMM; +break; +} +case MeasureUnit::CM: +{ +break; +} +case MeasureUnit::POINT: +{ +// 0.01pt = 0.35 mm/100 (exactly) +fRetval = 2.54 / 72.0; +psUnit = gpsPT; +break; +} +case MeasureUnit::INCH: +default: +{ +OSL_ENSURE( MeasureUnit::INCH == nTargetUnit, output unit not supported for cm values); +// 0.0001in = 0.254 mm/100 (exactly) +fRetval = 2.54; +psUnit = gpsINCH; +break; +} +} +break; +} default: OSL_ENSURE(false, sax::Converter::GetConversionFactor(): source unit not supported); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraphproperties.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a8bdbeb1a819c0296940b4dd882890be16ec4cba Author: Radek Doulik r...@novell.com Date: Tue Nov 8 15:40:31 2011 +0100 fixed regression, set the left paragraph margin diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index f7168c1..b6c9178 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -456,7 +456,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p } } if ( noParaLeftMargin ) -aPropSet.setProperty( PROP_ParaLeftMargin, sal_Int32(0) /**noParaLeftMargin*/ ); +aPropSet.setProperty( PROP_ParaLeftMargin, sal_Int32( *noParaLeftMargin ) ); if ( noFirstLineIndentation ) aPropSet.setProperty( PROP_ParaFirstLineIndent, *noFirstLineIndentation ); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: postprocess/packcomponents
postprocess/packcomponents/makefile.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 87268f254f460b39a41b153fd6e66a9974ca63c3 Author: Radek Doulik r...@novell.com Date: Wed Oct 19 17:09:55 2011 +0200 make the 3D transitions work again diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index 07d6ccf..b983928 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -239,7 +239,7 @@ my_components += kdebe1 my_components += kde4be1 .END -.IF $(ENABLE_OGL) == TRUE +.IF $(ENABLE_OPENGL) == TRUE my_components += component/slideshow/source/engine/OGLTrans/ogltrans .END ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits