[Libreoffice-commits] .: 2 commits - cppcanvas/source

2012-04-18 Thread Radek Doulík
 cppcanvas/source/mtfrenderer/emfplus.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 8e92501541dfc374803cde0dec90939cde37348a
Author: Radek Doulik 
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 
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] .: 2 commits - cppcanvas/source cppuhelper/test cui/source dbaccess/source

2012-03-29 Thread Takeshi Abe
 cppcanvas/source/mtfrenderer/implrenderer.cxx|1 -
 cppcanvas/source/mtfrenderer/outdevstate.hxx |1 -
 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx |3 ---
 cppuhelper/test/testimplhelper.cxx   |2 --
 cui/source/customize/acccfg.cxx  |1 -
 cui/source/dialogs/about.cxx |2 --
 cui/source/dialogs/thesdlg.cxx   |1 -
 cui/source/inc/splitcelldlg.hxx  |1 -
 dbaccess/source/core/api/KeySet.cxx  |1 -
 dbaccess/source/core/api/OptimisticSet.cxx   |2 --
 dbaccess/source/core/api/RowSet.cxx  |2 --
 dbaccess/source/core/api/RowSet.hxx  |1 -
 dbaccess/source/core/api/RowSetCache.hxx |1 -
 dbaccess/source/core/api/TableDeco.cxx   |1 -
 dbaccess/source/core/api/querycomposer.cxx   |1 -
 dbaccess/source/core/api/tablecontainer.cxx  |1 -
 dbaccess/source/core/dataaccess/databasedocument.cxx |2 --
 dbaccess/source/core/dataaccess/documentcontainer.cxx|1 -
 dbaccess/source/core/inc/ContainerMediator.hxx   |1 -
 dbaccess/source/core/inc/preparedstatement.hxx   |1 -
 dbaccess/source/core/inc/querycontainer.hxx  |1 -
 dbaccess/source/filter/xml/xmlExport.cxx |1 -
 dbaccess/source/filter/xml/xmlHelper.cxx |1 -
 dbaccess/source/filter/xml/xmlTableFilterList.cxx|1 -
 dbaccess/source/filter/xml/xmlfilter.cxx |1 -
 dbaccess/source/ui/app/AppController.cxx |5 -
 dbaccess/source/ui/app/AppControllerDnD.cxx  |1 -
 dbaccess/source/ui/app/AppControllerGen.cxx  |3 ---
 dbaccess/source/ui/app/AppDetailPageHelper.cxx   |1 -
 dbaccess/source/ui/app/AppDetailView.cxx |1 -
 dbaccess/source/ui/app/AppView.cxx   |1 -
 dbaccess/source/ui/browser/sbagrid.cxx   |2 --
 dbaccess/source/ui/browser/unodatbr.cxx  |2 --
 dbaccess/source/ui/control/toolboxcontroller.cxx |1 -
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx|2 --
 dbaccess/source/ui/dlg/DbAdminImpl.cxx   |5 -
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx  |5 -
 dbaccess/source/ui/dlg/adminpages.cxx|3 ---
 dbaccess/source/ui/dlg/dbadmin.cxx   |3 ---
 dbaccess/source/ui/dlg/directsql.cxx |1 -
 dbaccess/source/ui/dlg/dlgattr.cxx   |2 --
 dbaccess/source/ui/dlg/queryfilter.cxx   |2 --
 dbaccess/source/ui/inc/DExport.hxx   |1 -
 dbaccess/source/ui/inc/WCPage.hxx|1 -
 dbaccess/source/ui/inc/adtabdlg.hxx  |1 -
 dbaccess/source/ui/inc/querycontroller.hxx   |1 -
 dbaccess/source/ui/misc/HtmlReader.cxx   |1 -
 dbaccess/source/ui/misc/WNameMatch.cxx   |1 -
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx |1 -
 dbaccess/source/ui/querydesign/JAccess.cxx   |1 -
 dbaccess/source/ui/querydesign/JoinDesignView.cxx|1 -
 dbaccess/source/ui/querydesign/JoinExchange.cxx  |1 -
 dbaccess/source/ui/querydesign/QTableConnectionData.cxx  |1 -
 dbaccess/source/ui/querydesign/QueryDesignView.cxx   |1 -
 dbaccess/source/ui/querydesign/QueryTableView.cxx|1 -
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx   |1 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx|1 -
 dbaccess/source/ui/relationdesign/RelationController.cxx |1 -
 dbaccess/source/ui/tabledesign/TEditControl.cxx  |1 -
 dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx |1 -
 60 files changed, 90 deletions(-)

New commits:
commit 5d9b072cef8d480c87adfa4c3a980782a17823a1
Author: Takeshi Abe 
Date:   Fri Mar 30 00:42:07 2012 +0900

removed duplicate includes in dbaccess

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 1903110..8fb0d6a 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -56,7 +56,6 @@
 #include "querycomposer.hxx"
 #include "composertools.hxx"
 #include 
-#include 
 #include 
 #include "PrivateRow.hxx"
 
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx 
b/dbaccess/source/core/api/OptimisticSet.cxx
index 99cfcd4..94a568c 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -44,7 +44,6 @@
 #include "dbastrings.hrc"
 #include "apitools.hxx"
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -59,7 +58,6 @@
 #include "querycomposer.hxx"
 #

[Libreoffice-commits] .: 2 commits - cppcanvas/source pyuno/source

2012-03-09 Thread Michael Stahl
 cppcanvas/source/inc/implrenderer.hxx|2 +-
 cppcanvas/source/mtfrenderer/emfplus.cxx |6 +++---
 pyuno/source/module/pyuno.cxx|2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 24b449b7fcaaee20ef8feebfd64fc761535f77a8
Author: Michael Stahl 
Date:   Fri Mar 9 15:35:36 2012 +0100

cppcanvas: processEMFPlus: fix valgrind warning:

When reading EmfPlusRecordTypeDrawImagePoints, handle the variant where
points are stored as 16-bit integers instead of floats correctly.
Found via valgrind on loading bugdoc from fdo#42252.

diff --git a/cppcanvas/source/inc/implrenderer.hxx 
b/cppcanvas/source/inc/implrenderer.hxx
index d41d504..034af02 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -215,7 +215,7 @@ static float GetSwapFloat( SvStream& rSt )
 
 /* EMF+ */
 void ReadRectangle (SvStream& s, float& x, float& y, float &width, 
float& height, sal_uInt32 flags = 0);
-void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags 
= 0);
+void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags);
 void MapToDevice (double &x, double &y);
 ::basegfx::B2DPoint Map (double ix, double iy);
 ::basegfx::B2DSize MapSize (double iwidth, double iheight);
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 953a0c8..4c92728 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1406,9 +1406,9 @@ namespace cppcanvas
 if (unknown == 3) { // it probably means number of 
points defining destination rectangle
 float x1, y1, x2, y2, x3, y3;
 
-ReadPoint (rMF, x1, y1);
-ReadPoint (rMF, x2, y2);
-ReadPoint (rMF, x3, y3);
+ReadPoint (rMF, x1, y1, flags);
+ReadPoint (rMF, x2, y2, flags);
+ReadPoint (rMF, x3, y3, flags);
 
 BitmapEx aBmp( image.graphic.GetBitmapEx () );
 const Rectangle aCropRect 
(::vcl::unotools::pointFromB2DPoint (Map (sx, sy)),
commit 06484b6946ac6a974c24af6624fb75bbe298c1e8
Author: Michael Stahl 
Date:   Fri Mar 9 11:28:28 2012 +0100

fdo#46926: fix the fix for Python 3

Thanks to Maxime de Roucy for the hint that the "cmpfunc" type doesn't 
exist.

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 555fefd..d51ad3b 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -661,7 +661,7 @@ static PyTypeObject PyUNOType =
 (printfunc) 0,
 (getattrfunc) PyUNO_getattr,
 (setattrfunc) PyUNO_setattr,
-(cmpfunc) 0,
+/* this type does not exist in Python 3: (cmpfunc) */ 0,
 (reprfunc) PyUNO_repr,
 0,
 0,
___
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

2012-03-07 Thread Radek Doulík
 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 
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 
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] .: 2 commits - cppcanvas/source svx/source

2011-11-28 Thread Radek Doulík
 cppcanvas/source/mtfrenderer/emfplus.cxx  |   23 ++
 svx/source/customshapes/EnhancedCustomShape2d.cxx |1 
 2 files changed, 24 insertions(+)

New commits:
commit c08d55eccc1b2e26d8d0408d70654751e8672fa7
Author: Radek Doulik 
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 
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; ihttp://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - cppcanvas/source xmloff/source

2011-09-26 Thread Tor Lillqvist
 cppcanvas/source/mtfrenderer/textaction.cxx |4 
 xmloff/source/core/RDFaImportHelper.cxx |7 ++-
 2 files changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 226a5ddda17e4b9c0744b7e3f5203f46a4ba289e
Author: Tor Lillqvist 
Date:   Mon Sep 26 21:35:20 2011 +0300

WaE: control reaches end of non-void function

diff --git a/xmloff/source/core/RDFaImportHelper.cxx 
b/xmloff/source/core/RDFaImportHelper.cxx
index 043b9f7..956021c 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -218,11 +218,8 @@ RDFaReader::ReadCURIE(::rtl::OUString const & i_rCURIE) 
const
 }
 }
 }
-else
-{
-OSL_TRACE( "ReadCURIE: invalid CURIE: no prefix" );
-return ::rtl::OUString();
-}
+OSL_TRACE( "ReadCURIE: invalid CURIE: no prefix" );
+return ::rtl::OUString();
 }
 
 ::std::vector< ::rtl::OUString >
commit e594b27aa841d2c4a0a1861def8ade092eab6c5f
Author: Tor Lillqvist 
Date:   Mon Sep 26 21:14:13 2011 +0300

WaE: control reaches end of non-void function

diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx 
b/cppcanvas/source/mtfrenderer/textaction.cxx
index a80306d..ec353ea 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -2286,12 +2286,8 @@ namespace cppcanvas
 rState ) );
 }
 }
-#if defined __GNUC__
-#if __GNUC__ == 4 && __GNUC_MINOR__ >= 1
 // Unreachable; to avoid bogus warning:
 return ActionSharedPtr();
-#endif
-#endif
 }
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits