openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1441343 [27/35] - in /openoffice/branches/ia2: ./ ext_libraries/apr-util/ ext_libraries/apr/ ext_sources/ extras/l10n/source/ast/ extras/l10n/source/da/ extras/l10n/source/eu/ extras/l10n/source/gd/ extras/l10n/source/ko/ extras/l10n/sourc...
Date Fri, 01 Feb 2013 08:46:35 GMT
Modified: openoffice/branches/ia2/main/svtools/source/filter/filter.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/filter.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/filter.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/filter.cxx Fri Feb  1 08:46:00 2013
@@ -72,6 +72,7 @@
 #include <rtl/bootstrap.hxx>
 #include <rtl/instance.hxx>
 #include <vcl/metaact.hxx>
+#include <vcl/dibtools.hxx>
 
 #include "SvFilterOptionsDialog.hxx"
 
@@ -1932,7 +1933,7 @@ sal_uInt16 GraphicFilter::ExportGraphic(
 				ResMgr*		pResMgr = CREATERESMGR( svt );
                 sal_Bool    bRleCoding = aConfigItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True );
 				// Wollen wir RLE-Kodiert speichern?
-				aBmp.Write( rOStm, bRleCoding );
+				WriteDIB(aBmp, rOStm, bRleCoding, true);
 				delete pResMgr;
 
 				if( rOStm.GetError() )

Modified: openoffice/branches/ia2/main/svtools/source/filter/wmf/emfwr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/wmf/emfwr.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/wmf/emfwr.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/wmf/emfwr.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -29,6 +27,7 @@
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <vcl/lineinfo.hxx>
+#include <vcl/dibtools.hxx>
 
 // -----------
 // - Defines -
@@ -752,7 +751,7 @@ void EMFWriter::ImplWriteBmpRecord( cons
 		(*mpStm) << (sal_uInt32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
 		ImplWriteSize( rSz );
 
-		rBmp.Write( aMemStm, sal_True, sal_False );
+		WriteDIB(rBmp, aMemStm, true, false);
 
 		sal_uInt32	nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
 		sal_uInt16	nBitCount;

Modified: openoffice/branches/ia2/main/svtools/source/filter/wmf/enhwmf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/wmf/enhwmf.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/wmf/enhwmf.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/wmf/enhwmf.cxx Fri Feb  1 08:46:00 2013
@@ -19,13 +19,13 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
 #include "winmtf.hxx"
 #include <osl/endian.h>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <vcl/dibtools.hxx>
 
 //=========================== GDI-Array ===================================
 
@@ -870,8 +870,9 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 						pWMF->Seek( nStart + offBitsSrc );
 						pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
 						aTmp.Seek( 0 );
-						aBitmap.Read( aTmp, sal_True );
-						// test if it is sensible to crop
+						ReadDIB(aBitmap, aTmp, true);
+						
+                        // test if it is sensible to crop
 						if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && 
 							( xSrc >= 0 ) && ( ySrc >= 0 ) &&
                                 ( xSrc + static_cast< sal_Int32 >(cxSrc) <= static_cast< sal_Int32 >(aBitmap.GetSizePixel().Width()) ) &&
@@ -931,7 +932,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 						pWMF->Seek( nStart + offBitsSrc );
 						pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
 						aTmp.Seek( 0 );
-						aBitmap.Read( aTmp, sal_True );
+						ReadDIB(aBitmap, aTmp, true);
 
 						// test if it is sensible to crop
 						if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && 
@@ -985,7 +986,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 						pWMF->Seek( nStart + offBitsSrc );
 						pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
 						aTmp.Seek( 0 );
-						aBitmap.Read( aTmp, sal_True );
+						ReadDIB(aBitmap, aTmp, true);
 
 						// test if it is sensible to crop
 						if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && 
@@ -1021,6 +1022,16 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 						lfFaceName[ i ] = nChar;
 					}
 					aLogFont.alfFaceName = UniString( lfFaceName );
+
+                    // #121382# Need to apply WorldTransform to FontHeight/Width; this should be completely
+                    // chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but not now due to time
+                    // constraints and dangers
+                    const XForm& rXF = pOut->GetWorldTransform();
+                    const basegfx::B2DHomMatrix aWT(rXF.eM11, rXF.eM21, rXF.eDx, rXF.eM12, rXF.eM22, rXF.eDy);
+                    const basegfx::B2DVector aTransVec(aWT * basegfx::B2DVector(aLogFont.lfWidth, aLogFont.lfHeight));
+                    aLogFont.lfWidth = aTransVec.getX();
+                    aLogFont.lfHeight = aTransVec.getY();
+
 					pOut->CreateObject( nIndex, GDI_FONT, new WinMtfFontStyle( aLogFont ) );
 				}
 			}
@@ -1296,7 +1307,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 					*pWMF >> nTmp32;
 				}
 
-				aBmp.Read( *pWMF, sal_False );
+				ReadDIB(aBmp, *pWMF, false);
 				pBmp = aBmp.AcquireReadAccess();
 				if ( pBmp )
 				{

Modified: openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.cxx Fri Feb  1 08:46:00 2013
@@ -492,8 +492,9 @@ Size WinMtfOutput::ImplMap( const Size& 
 {
 	if ( mnWinExtX && mnWinExtY )
 	{
-		double fWidth = rSz.Width() * maXForm.eM11;
-		double fHeight = rSz.Height() * maXForm.eM22;
+        // #121382# apply the whole WorldTransform, else a rotation will be misinterpreted
+		double fWidth = rSz.Width() * maXForm.eM11 + rSz.Height() * maXForm.eM21;
+		double fHeight = rSz.Width() * maXForm.eM12 + rSz.Height() * maXForm.eM22;
 
 		if ( mnGfxMode == GM_COMPATIBLE )
 		{
@@ -1476,7 +1477,10 @@ void WinMtfOutput::DrawText( Point& rPos
 
 		for( i = 0, nSum = 0; i < nLen; i++ )
 		{
-			sal_Int32 nTemp = ImplMap( Size( pDXArry[ i ], 0 ) ).Width();
+            // #121382# Map DXArray using WorldTransform
+            const Size aSize(ImplMap(Size( pDXArry[i], 0)));
+            const basegfx::B2DVector aVector(aSize.Width(), aSize.Height());
+            const sal_Int32 nTemp(basegfx::fround(aVector.getLength()));
 			nSum += nTemp;
 			pDXArry[ i ] = nSum;
 		}

Modified: openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.hxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/wmf/winmtf.hxx Fri Feb  1 08:46:00 2013
@@ -614,6 +614,7 @@ class WinMtfOutput
 		sal_uInt32			GetMapMode() const { return mnMapMode; };
         void                SetMapMode( sal_uInt32 mnMapMode );
 		void				SetWorldTransform( const XForm& rXForm );
+        const XForm& GetWorldTransform() const { return maXForm; }
 		void				ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode );
 
 		void				Push();

Modified: openoffice/branches/ia2/main/svtools/source/filter/wmf/winwmf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/wmf/winwmf.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/wmf/winwmf.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/wmf/winwmf.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -30,6 +28,7 @@
 #include <rtl/tencinfo.h>
 #include <osl/endian.h>
 #include <vcl/svapp.hxx>
+#include <vcl/dibtools.hxx>
 
 //====================== MS-Windows-defines ===============================
 
@@ -617,7 +616,7 @@ void WMFReader::ReadRecordParams( sal_uI
                 {
 				    Rectangle aDestRect( ReadYX(), aDestSize );
 				    if ( nWinROP != PATCOPY )
-					    aBmp.Read( *pWMF, sal_False );
+					    ReadDIB(aBmp, *pWMF, false);
 
                     // test if it is sensible to crop
                     if ( nSye && nSxe && 
@@ -642,7 +641,7 @@ void WMFReader::ReadRecordParams( sal_uI
 
 			*pWMF >> nFunction >> nFunction;
 
-			aBmp.Read( *pWMF, sal_False );
+			ReadDIB(aBmp, *pWMF, false);
 			pBmp = aBmp.AcquireReadAccess();
 			if ( pBmp )
 			{

Modified: openoffice/branches/ia2/main/svtools/source/filter/wmf/wmfwr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/filter/wmf/wmfwr.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/filter/wmf/wmfwr.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/filter/wmf/wmfwr.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -32,13 +30,11 @@
 #include <rtl/tencinfo.h>
 #include <tools/tenccvt.hxx>
 #include <osl/endian.h>
-#ifndef INCLUDED_I18NUTIL_UNICODE_HXX
 #include <i18nutil/unicode.hxx>	//unicode::getUnicodeScriptType
-#endif
-
 #include <vcl/metric.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <vcl/dibtools.hxx>
 
 //====================== MS-Windows-defines ===============================
 
@@ -937,7 +933,9 @@ void WMFWriter::WMFRecord_StretchDIB( co
 	*pWMF << (long)0 << (long)0; // 8 bytes auffuellen (diese 8 bytes +
 								 // 14 bytes ueberfluessigen FILEHEADER
 								 // = 22 bytes Parameter)
-	*pWMF << rBitmap; // Bitmap schreiben
+    
+    // write bitmap
+    WriteDIB(rBitmap, *pWMF, false, true);
 
 	// Parameter schreiben:
 	nPosEnd=pWMF->Tell();

Modified: openoffice/branches/ia2/main/svtools/source/graphic/graphic.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/graphic/graphic.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/graphic/graphic.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/graphic/graphic.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -31,6 +29,7 @@
 #include <com/sun/star/graphic/XGraphicTransformer.hpp>
 #include <vcl/graph.hxx>
 #include "graphic.hxx"
+#include <vcl/dibtools.hxx>
 
 using namespace com::sun::star;
 
@@ -249,7 +248,8 @@ uno::Sequence< ::sal_Int8 > SAL_CALL Gra
 	if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
 	{
 		SvMemoryStream aMem;
-		aMem << mpGraphic->GetBitmapEx().GetBitmap();
+
+        WriteDIB(mpGraphic->GetBitmapEx().GetBitmap(), aMem, false, true);
 		return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
 	}
 	else
@@ -267,7 +267,8 @@ uno::Sequence< ::sal_Int8 > SAL_CALL Gra
 	if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
 	{
 		SvMemoryStream aMem;
-		aMem << mpGraphic->GetBitmapEx().GetMask();
+
+        WriteDIB(mpGraphic->GetBitmapEx().GetMask(), aMem, false, true);
 		return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() );
 	}
 	else

Modified: openoffice/branches/ia2/main/svtools/source/graphic/provider.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/graphic/provider.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/graphic/provider.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/graphic/provider.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -41,11 +39,11 @@
 #include <vcl/virdev.hxx>
 #include <com/sun/star/io/XStream.hpp>
 #include <com/sun/star/text/GraphicCrop.hpp>
-
 #include "descriptor.hxx"
 #include "graphic.hxx"
 #include <svtools/grfmgr.hxx>
 #include "provider.hxx"
+#include <vcl/dibtools.hxx>
 
 using namespace com::sun::star;
 
@@ -256,15 +254,16 @@ uno::Reference< ::graphic::XGraphic > Gr
     uno::Sequence< sal_Int8 > aMaskSeq( xBtm->getMaskDIB() );
     SvMemoryStream aBmpStream( aBmpSeq.getArray(), aBmpSeq.getLength(), STREAM_READ );
     Bitmap aBmp;
-    aBmpStream >> aBmp;
-    
     BitmapEx aBmpEx;
-    
+
+    ReadDIB(aBmp, aBmpStream, true);
+
     if( aMaskSeq.getLength() )
     {
         SvMemoryStream aMaskStream( aMaskSeq.getArray(), aMaskSeq.getLength(), STREAM_READ );
         Bitmap aMask;
-        aMaskStream >> aMask;
+
+        ReadDIB(aMask, aMaskStream, true);
         aBmpEx = BitmapEx( aBmp, aMask );
     }
     else

Modified: openoffice/branches/ia2/main/svtools/source/misc/transfer.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/misc/transfer.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/misc/transfer.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/misc/transfer.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 #ifdef WNT
@@ -68,6 +66,9 @@
 #include <svtools/imap.hxx>
 #include <svtools/transfer.hxx>
 #include <cstdio>
+#include <vcl/dibtools.hxx>
+#include <vcl/pngread.hxx>
+#include <vcl/pngwrite.hxx>
 
 // --------------
 // - Namespaces -
@@ -370,9 +371,9 @@ Any SAL_CALL TransferableHelper::getTran
 			    GetData( aSubstFlavor );
                 bDone = maAny.hasValue();
             }
-            else if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_BMP, aSubstFlavor ) &&
-                     TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor ) &&
-                     SotExchange::GetFormatDataFlavor( FORMAT_BITMAP, aSubstFlavor ) )
+            else if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_BMP, aSubstFlavor ) 
+                && TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor )
+                && SotExchange::GetFormatDataFlavor(FORMAT_BITMAP, aSubstFlavor))
             {
 			    GetData( aSubstFlavor );
                 bDone = sal_True;
@@ -698,6 +699,7 @@ void TransferableHelper::AddFormat( cons
 		if( FORMAT_BITMAP == aFlavorEx.mnSotId )
 		{
 			AddFormat( SOT_FORMATSTR_ID_BMP );
+			AddFormat( SOT_FORMATSTR_ID_PNG );
 		}
 		else if( FORMAT_GDIMETAFILE == aFlavorEx.mnSotId )
 		{
@@ -798,14 +800,38 @@ sal_Bool TransferableHelper::SetString( 
 
 // -----------------------------------------------------------------------------
 
-sal_Bool TransferableHelper::SetBitmap( const Bitmap& rBitmap, const DataFlavor& )
+sal_Bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataFlavor& rFlavor )
 {
-	if( !rBitmap.IsEmpty() )
+	if( !rBitmapEx.IsEmpty() )
 	{
-		SvMemoryStream aMemStm( 65535, 65535 );
+        SvMemoryStream aMemStm( 65535, 65535 );
 
-		aMemStm << rBitmap;
-		maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
+        if(rFlavor.MimeType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("image/png")))
+        {
+            // write a PNG
+            ::vcl::PNGWriter aPNGWriter(rBitmapEx);
+
+            aPNGWriter.Write(aMemStm);
+        }
+        else
+        {
+            const Bitmap aBitmap(rBitmapEx.GetBitmap());
+
+            if(rBitmapEx.IsTransparent())
+            {
+                const Bitmap aMask(rBitmapEx.GetAlpha().GetBitmap());
+
+                // explicitely use Bitmap::Write with bCompressed = sal_False and bFileHeader = sal_True
+                WriteDIBV5(aBitmap, aMask, aMemStm);
+            }
+            else
+            {
+                // explicitely use Bitmap::Write with bCompressed = sal_False and bFileHeader = sal_True
+                WriteDIB(aBitmap, aMemStm, false, true);
+            }
+        }
+
+        maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) );
 	}
 
 	return( maAny.hasValue() );
@@ -1441,7 +1467,7 @@ void TransferableDataHelper::FillDataFla
 		    rDataFlavorExVector.push_back( aFlavorEx );
 
             // add additional formats for special mime types
-            if( SOT_FORMATSTR_ID_BMP == aFlavorEx.mnSotId )
+            if(SOT_FORMATSTR_ID_BMP == aFlavorEx.mnSotId || SOT_FORMATSTR_ID_PNG == aFlavorEx.mnSotId)
 		    {
 			    if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavorEx ) )
 			    {
@@ -1755,57 +1781,101 @@ sal_Bool TransferableDataHelper::GetStri
 
 // -----------------------------------------------------------------------------
 
-sal_Bool TransferableDataHelper::GetBitmap( SotFormatStringId nFormat, Bitmap& rBmp )
+sal_Bool TransferableDataHelper::GetBitmapEx( SotFormatStringId nFormat, BitmapEx& rBmpEx )
 {
-	DataFlavor aFlavor;
-	return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetBitmap( aFlavor, rBmp ) );
+    if(FORMAT_BITMAP == nFormat)
+    {
+        // try to get PNG first
+        DataFlavor aFlavor;
+
+        if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor))
+        {
+            if(GetBitmapEx(aFlavor, rBmpEx))
+            {
+                return true;
+            }
+        }
+    }
+
+    DataFlavor aFlavor;
+    return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetBitmapEx( aFlavor, rBmpEx ) );
 }
 
 // -----------------------------------------------------------------------------
 
-sal_Bool TransferableDataHelper::GetBitmap( const DataFlavor& rFlavor, Bitmap& rBmp )
+sal_Bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& rBmpEx )
 {
-	SotStorageStreamRef xStm;
-	DataFlavor			aSubstFlavor;
-	sal_Bool			bRet = GetSotStorageStream( rFlavor, xStm );
+    SotStorageStreamRef xStm;
+    DataFlavor aSubstFlavor;
+    bool bRet(GetSotStorageStream(rFlavor, xStm));
 
-	if( bRet )
-	{
-		*xStm >> rBmp;
-		bRet = ( xStm->GetError() == ERRCODE_NONE );
+    if(!bRet && HasFormat(SOT_FORMATSTR_ID_PNG) && SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aSubstFlavor))
+    {
+        // when no direct success, try if PNG is available
+        bRet = GetSotStorageStream(aSubstFlavor, xStm);
+    }
 
-		/* SJ: #110748# At the moment we are having problems with DDB inserted as DIB. The
-		   problem is, that some graphics are inserted much too big because the nXPelsPerMeter
-		   and nYPelsPerMeter of the bitmap fileheader isn't including the correct value.
-		   Due to this reason the following code assumes that bitmaps with a logical size
-		   greater than 50 cm aren't having the correct mapmode set.
-
-		   The following code should be removed if DDBs and DIBs are supported via clipboard
-		   properly.
-		*/
-		if ( bRet )
-		{
-			MapMode aMapMode = rBmp.GetPrefMapMode();
-			if ( aMapMode.GetMapUnit() != MAP_PIXEL )
-			{
-				Size aSize = OutputDevice::LogicToLogic( rBmp.GetPrefSize(), aMapMode, MAP_100TH_MM );
-				if ( ( aSize.Width() > 5000 ) || ( aSize.Height() > 5000 ) )
-					rBmp.SetPrefMapMode( MAP_PIXEL );
-			}
-		}
-	}
+    if(!bRet && HasFormat(SOT_FORMATSTR_ID_BMP) && SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_BMP, aSubstFlavor))
+    {
+        // when no direct success, try if BMP is available
+        bRet = GetSotStorageStream(aSubstFlavor, xStm);
+    }
 
-	if( !bRet &&
-		HasFormat( SOT_FORMATSTR_ID_BMP ) &&
-		SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_BMP, aSubstFlavor ) &&
-		GetSotStorageStream( aSubstFlavor, xStm ) )
-	{
-	    xStm->ResetError();
-		*xStm >> rBmp;
-		bRet = ( xStm->GetError() == ERRCODE_NONE );
-	}
+    if(bRet)
+    {
+        if(rFlavor.MimeType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("image/png")))
+        {
+            // it's a PNG, import to BitmapEx
+            ::vcl::PNGReader aPNGReader(*xStm);
 
-	return bRet;
+            rBmpEx = aPNGReader.Read();
+        }
+        else
+        {
+            Bitmap aBitmap;
+            Bitmap aMask;
+
+            // explicitely use Bitmap::Read with bFileHeader = sal_True
+            ReadDIBV5(aBitmap, aMask, *xStm);
+
+            if(aMask.IsEmpty())
+            {
+                rBmpEx = aBitmap;
+            }
+            else
+            {
+                rBmpEx = BitmapEx(aBitmap, aMask);
+            }
+        }
+
+        bRet = (ERRCODE_NONE == xStm->GetError());
+
+        /* SJ: #110748# At the moment we are having problems with DDB inserted as DIB. The
+           problem is, that some graphics are inserted much too big because the nXPelsPerMeter
+           and nYPelsPerMeter of the bitmap fileheader isn't including the correct value.
+           Due to this reason the following code assumes that bitmaps with a logical size
+           greater than 50 cm aren't having the correct mapmode set.
+        
+           The following code should be removed if DDBs and DIBs are supported via clipboard
+           properly.
+        */
+        if(bRet)
+        {
+            const MapMode aMapMode(rBmpEx.GetPrefMapMode());
+
+            if(MAP_PIXEL != aMapMode.GetMapUnit())
+            {
+                const Size aSize(OutputDevice::LogicToLogic(rBmpEx.GetPrefSize(), aMapMode, MAP_100TH_MM));
+
+                if((aSize.Width() > 5000) || (aSize.Height() > 5000))
+                {
+                    rBmpEx.SetPrefMapMode(MAP_PIXEL);
+                }
+            }
+        }
+    }
+
+    return bRet;
 }
 
 // -----------------------------------------------------------------------------
@@ -1865,8 +1935,22 @@ sal_Bool TransferableDataHelper::GetGDIM
 
 sal_Bool TransferableDataHelper::GetGraphic( SotFormatStringId nFormat, Graphic& rGraphic )
 {
-	DataFlavor aFlavor;
-	return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetGraphic( aFlavor, rGraphic ) );
+    if(FORMAT_BITMAP == nFormat)
+    {
+        // try to get PNG first
+        DataFlavor aFlavor;
+
+        if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor))
+        {
+            if(GetGraphic(aFlavor, rGraphic))
+            {
+                return true;
+            }
+        }
+    }
+
+    DataFlavor aFlavor;
+    return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetGraphic( aFlavor, rGraphic ) );
 }
 
 // -----------------------------------------------------------------------------
@@ -1876,13 +1960,22 @@ sal_Bool TransferableDataHelper::GetGrap
 	DataFlavor	aFlavor;
 	sal_Bool	bRet = sal_False;
 
-	if(	SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavor ) &&
+    if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor) && 
+        TransferableDataHelper::IsEqual(aFlavor, rFlavor))
+	{
+        // try to get PNG first
+		BitmapEx aBmpEx;
+
+		if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) == sal_True )
+			rGraphic = aBmpEx;
+	}
+	else if(SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavor ) &&
 		TransferableDataHelper::IsEqual( aFlavor, rFlavor ) )
 	{
-		Bitmap aBmp;
+		BitmapEx aBmpEx;
 
-		if( ( bRet = GetBitmap( aFlavor, aBmp ) ) == sal_True )
-			rGraphic = aBmp;
+		if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) == sal_True )
+			rGraphic = aBmpEx;
 	}
 	else if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_GDIMETAFILE, aFlavor ) &&
 			 TransferableDataHelper::IsEqual( aFlavor, rFlavor ) )

Modified: openoffice/branches/ia2/main/svtools/source/uno/popupmenucontrollerbase.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svtools/source/uno/popupmenucontrollerbase.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svtools/source/uno/popupmenucontrollerbase.cxx (original)
+++ openoffice/branches/ia2/main/svtools/source/uno/popupmenucontrollerbase.cxx Fri Feb  1 08:46:00 2013
@@ -38,7 +38,6 @@
 #include <com/sun/star/awt/MenuItemStyle.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/awt/XMenuExtended.hpp>
 
 //_________________________________________________________________________________________________________________
 //	includes of other projects
@@ -103,17 +102,9 @@ void PopupMenuControllerBase::throwIfDis
 // protected function
 void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu )
 {
-    VCLXPopupMenu* pPopupMenu = 0;
     if ( rPopupMenu.is() && rPopupMenu->getItemCount() > 0 )
     {
-         pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
-         if ( pPopupMenu )
-         {
-            vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-    
-            PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
-            pVCLPopupMenu->Clear();
-         }
+        rPopupMenu->clear();
     }
 }
 
@@ -151,7 +142,7 @@ void SAL_CALL PopupMenuControllerBase::d
 }
 
 // XMenuListener
-void SAL_CALL PopupMenuControllerBase::highlight( const awt::MenuEvent& ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemHighlighted( const awt::MenuEvent& ) throw (RuntimeException)
 {
 }
 
@@ -163,17 +154,16 @@ void PopupMenuControllerBase::impl_selec
 		_xDispatch->dispatch( aURL, aArgs );
 }
 
-void SAL_CALL PopupMenuControllerBase::select( const awt::MenuEvent& rEvent ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemSelected( const awt::MenuEvent& rEvent ) throw (RuntimeException)
 {
 	throwIfDisposed();
 
     osl::MutexGuard aLock( m_aMutex );
 
-	Reference< awt::XMenuExtended > xExtMenu( m_xPopupMenu, UNO_QUERY );
-	if( xExtMenu.is() )
+	if( m_xPopupMenu.is() )
 	{
 		Sequence<PropertyValue> aArgs;
-		dispatchCommand( xExtMenu->getCommand( rEvent.MenuId ), aArgs );
+		dispatchCommand( m_xPopupMenu->getCommand( rEvent.MenuId ), aArgs );
 	}
 }
 
@@ -208,11 +198,11 @@ IMPL_STATIC_LINK_NOINSTANCE( PopupMenuCo
     return 0;
 }
 
-void SAL_CALL PopupMenuControllerBase::activate( const awt::MenuEvent& ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemActivated( const awt::MenuEvent& ) throw (RuntimeException)
 {
 }
 
-void SAL_CALL PopupMenuControllerBase::deactivate( const awt::MenuEvent& ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemDeactivated( const awt::MenuEvent& ) throw (RuntimeException)
 {
 }
 

Modified: openoffice/branches/ia2/main/svx/inc/galobj.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/galobj.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/galobj.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/galobj.hxx Fri Feb  1 08:46:00 2013
@@ -74,7 +74,7 @@ private:
 
 protected:
 
-	Bitmap					aThumbBmp;
+	BitmapEx				aThumbBmp; // Allow transparence to survive
 	GDIMetaFile				aThumbMtf;
 	INetURLObject			aURL;
 	String					aUserName;
@@ -95,7 +95,7 @@ public:
 	virtual SgaObjKind		GetObjKind() const = 0;
 	virtual sal_uInt16			GetVersion() const = 0;
 
-	virtual Bitmap 			GetThumbBmp() const { return aThumbBmp; }
+	virtual BitmapEx		GetThumbBmp() const { return aThumbBmp; }
 	const GDIMetaFile&		GetThumbMtf() const { return aThumbMtf; }
 	const INetURLObject&	GetURL() const { return aURL; }
 	sal_Bool					IsValid() const { return bIsValid; }
@@ -130,7 +130,7 @@ public:
 	virtual 	   	   ~SgaObjectSound();
 
 	virtual SgaObjKind	GetObjKind() const { return SGA_OBJ_SOUND; }
-	virtual Bitmap 		GetThumbBmp() const;
+	virtual BitmapEx	GetThumbBmp() const;
 	GalSoundType		GetSoundType() const { return eSoundType; }
 };
 
@@ -161,10 +161,6 @@ public:
 	virtual 	   	   ~SgaObjectSvDraw() {};
 
 	virtual SgaObjKind	GetObjKind() const { return SGA_OBJ_SVDRAW; }
-
-public:
-
-    static sal_Bool         DrawCentered( OutputDevice* pOut, const FmFormModel& rModel );
 };
 
 // ----------------

Modified: openoffice/branches/ia2/main/svx/inc/galtheme.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/galtheme.hrc?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/galtheme.hrc (original)
+++ openoffice/branches/ia2/main/svx/inc/galtheme.hrc Fri Feb  1 08:46:00 2013
@@ -25,6 +25,12 @@
 
 #define RID_GALLERYSTR_THEME_START          (6000)
 
+// These defines are used to map gallery names to translated string ressources. Since
+// galleries may be copied from older offices to newer, do *never* change this
+// IDs except adding new ones (and adapting RID_GALLERYSTR_THEME_LAST). The ID
+// *is* written into the binary file *.thm (which is a galler theme combined of
+// three files, *.thm, *.sdv and *.sdg)
+
 #define RID_GALLERYSTR_THEME_3D				(RID_GALLERYSTR_THEME_START + 1)
 #define RID_GALLERYSTR_THEME_ANIMATIONS                 (RID_GALLERYSTR_THEME_START + 2)
 #define RID_GALLERYSTR_THEME_BULLETS                    (RID_GALLERYSTR_THEME_START + 3)
@@ -67,12 +73,12 @@
 #define RID_GALLERYSTR_THEME_FONTWORK					(RID_GALLERYSTR_THEME_START + 37)
 #define RID_GALLERYSTR_THEME_FONTWORK_VERTICAL			(RID_GALLERYSTR_THEME_START + 38)
 
-#define RID_GALLERYSTR_THEME_COMPUTERS                  (RID_GALLERYSTR_THEME_START + 39)
-#define RID_GALLERYSTR_THEME_DIAGRAMS                   (RID_GALLERYSTR_THEME_START + 40)
-#define RID_GALLERYSTR_THEME_ENVIRONMENT                (RID_GALLERYSTR_THEME_START + 41)
-#define RID_GALLERYSTR_THEME_FINANCE                    (RID_GALLERYSTR_THEME_START + 42)
-#define RID_GALLERYSTR_THEME_TRANSPORT                  (RID_GALLERYSTR_THEME_START + 43)
-#define RID_GALLERYSTR_THEME_TXTSHAPES                  (RID_GALLERYSTR_THEME_START + 44)
+#define RID_GALLERYSTR_THEME_COMPUTERS                  (RID_GALLERYSTR_THEME_START + 39)
+#define RID_GALLERYSTR_THEME_DIAGRAMS                   (RID_GALLERYSTR_THEME_START + 40)
+#define RID_GALLERYSTR_THEME_ENVIRONMENT                (RID_GALLERYSTR_THEME_START + 41)
+#define RID_GALLERYSTR_THEME_FINANCE                    (RID_GALLERYSTR_THEME_START + 42)
+#define RID_GALLERYSTR_THEME_TRANSPORT                  (RID_GALLERYSTR_THEME_START + 43)
+#define RID_GALLERYSTR_THEME_TXTSHAPES                  (RID_GALLERYSTR_THEME_START + 44)
 
 #define RID_GALLERYSTR_THEME_FIRST			RID_GALLERYSTR_THEME_3D
 #define RID_GALLERYSTR_THEME_LAST			RID_GALLERYSTR_THEME_TXTSHAPES

Modified: openoffice/branches/ia2/main/svx/inc/svx/fontworkgallery.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/fontworkgallery.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/fontworkgallery.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/fontworkgallery.hxx Fri Feb  1 08:46:00 2013
@@ -107,12 +107,12 @@ class SVX_DLLPUBLIC FontWorkGalleryDialo
 	SdrObject**			mppSdrObject;
 	SdrModel*			mpDestModel;
 
-	void			initfavorites(sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites);
+	void			initFavorites(sal_uInt16 nThemeId);
 	void			insertSelectedFontwork();
 	void			changeText( SdrTextObj* pObj );
-	void			fillFavorites( sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites );
+	void			fillFavorites(sal_uInt16 nThemeId);
 
-	std::vector< Bitmap * > maFavoritesHorizontal;
+	std::vector< BitmapEx> maFavoritesHorizontal;
 
 public:
 	FontWorkGalleryDialog( SdrView* pView, Window* pParent, sal_uInt16 nSID );

Modified: openoffice/branches/ia2/main/svx/inc/svx/gallery.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/gallery.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/gallery.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/gallery.hxx Fri Feb  1 08:46:00 2013
@@ -96,7 +96,7 @@ class FmFormModel;
 class SdrModel;
 class Graphic;
 class FmFormModel;
-class Bitmap;
+class BitmapEx;
 class OutputDevice;
 
 class SVX_DLLPUBLIC GalleryExplorer
@@ -138,10 +138,10 @@ public:
 	static sal_uIntPtr				GetObjCount( sal_uIntPtr nThemeId );
 
 	static sal_Bool					GetGraphicObj( const String& rThemeName, sal_uIntPtr nPos,
-											   Graphic* pGraphic = NULL, Bitmap* pThumb = NULL,
+											   Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL,
 											   sal_Bool bProgess = sal_False );
 	static sal_Bool					GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos,
-											   Graphic* pGraphic = NULL, Bitmap* pThumb = NULL,
+											   Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL,
 											   sal_Bool bProgess = sal_False );
 
 	static sal_Bool					InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic );
@@ -151,9 +151,9 @@ public:
 	static sal_uIntPtr				GetSdrObjCount( sal_uIntPtr nThemeId );
 
 	static sal_Bool					GetSdrObj( const String& rThemeName, sal_uIntPtr nSdrModelPos,
-										   SdrModel* pModel = NULL, Bitmap* pThumb = NULL );
+										   SdrModel* pModel = NULL, BitmapEx* pThumb = NULL );
 	static sal_Bool					GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos,
-										   SdrModel* pModel = NULL, Bitmap* pThumb = NULL );
+										   SdrModel* pModel = NULL, BitmapEx* pThumb = NULL );
 
 	static sal_Bool					InsertSdrObj( const String& rThemeName, FmFormModel& rModel );
 	static sal_Bool					InsertSdrObj( sal_uIntPtr nThemeId, FmFormModel& rModel );
@@ -163,8 +163,6 @@ public:
 
 	static sal_Bool					EndLocking( const String& rThemeName );
 	static sal_Bool					EndLocking( sal_uIntPtr nThemeId );
-
-    static sal_Bool					DrawCentered( OutputDevice* pOut, const FmFormModel& rModel );
 };
 
 #endif // _GALLERY_HXX_

Modified: openoffice/branches/ia2/main/svx/inc/svx/galtheme.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/galtheme.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/galtheme.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/galtheme.hxx Fri Feb  1 08:46:00 2013
@@ -194,7 +194,7 @@ public:
 									return ImplGetGalleryObject( nPos )->aURL;
 								}
 
-	sal_Bool						GetThumb( sal_uIntPtr nPos, Bitmap& rBmp, sal_Bool bProgress = sal_False );
+	sal_Bool						GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool bProgress = sal_False );
 
 	SVX_DLLPUBLIC sal_Bool						GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress = sal_False );
 	SVX_DLLPUBLIC sal_Bool						InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = LIST_APPEND );

Modified: openoffice/branches/ia2/main/svx/inc/svx/svdhdl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/svdhdl.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/svdhdl.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/svdhdl.hxx Fri Feb  1 08:46:00 2013
@@ -138,7 +138,9 @@ enum BitmapMarkerKind
 	AnchorPressedTR,
 
 	// for SJ and the CustomShapeHandles:
-	Customshape1
+	Customshape_7x7,
+	Customshape_9x9,
+	Customshape_11x11
 };
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/ia2/main/svx/inc/svx/svdmodel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/svdmodel.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/svdmodel.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/svdmodel.hxx Fri Feb  1 08:46:00 2013
@@ -742,8 +742,6 @@ public:
 		This returns false if undo was disabled using EnableUndo( false ) and
 		also during the runtime of the Undo() and Redo() methods. */
 	bool IsUndoEnabled() const;
-
-	void SetDrawingLayerPoolDefaults();
 };
 
 typedef tools::WeakReference< SdrModel > SdrModelWeakRef;

Modified: openoffice/branches/ia2/main/svx/inc/svx/svdxcgv.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/svdxcgv.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/svdxcgv.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/svdxcgv.hxx Fri Feb  1 08:46:00 2013
@@ -65,6 +65,7 @@ protected:
 
 public:
 	// Alle markierten Objekte auf dem angegebenen OutputDevice ausgeben.
+    ::std::vector< SdrObject* > GetMarkedObjects() const;
 	virtual void        DrawMarkedObj(OutputDevice& rOut) const;
 
 	// Z.B. fuer's Clipboard, Drag&Drop, ...

Modified: openoffice/branches/ia2/main/svx/inc/svx/xoutbmp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/inc/svx/xoutbmp.hxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/inc/svx/xoutbmp.hxx (original)
+++ openoffice/branches/ia2/main/svx/inc/svx/xoutbmp.hxx Fri Feb  1 08:46:00 2013
@@ -61,19 +61,11 @@ public:
 
 	static GraphicFilter* pGrfFilter;
 
-	static BitmapEx		CreateQuickDrawBitmapEx( const Graphic& rGraphic, const OutputDevice& rCompDev,
-												 const MapMode& rMapMode, const Size& rLogSize,
-												 const Point& rPoint, const Size& rSize );
 	static Graphic		MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags );
 	static Animation	MirrorAnimation( const Animation& rAnimation, sal_Bool bHMirr, sal_Bool bVMirr );
 	static sal_uInt16		WriteGraphic( const Graphic& rGraphic, String& rFileName,
 									  const String& rFilterName, const sal_uIntPtr nFlags = 0L,
 									  const Size* pMtfSize_100TH_MM = NULL );
-	static void			DrawQuickDrawBitmapEx( OutputDevice* pOutDev, const Point& rPt,
-											   const Size& rSize, const BitmapEx& rBmpEx );
-	static void			DrawTiledBitmapEx( OutputDevice* pOutDev, const Point& rStartPt, const Size& rGrfSize,
-										   const Rectangle& rTileRect, const BitmapEx& rBmpEx );
-
 	static sal_uInt16		ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
 									   GraphicFilter& rFilter, const sal_uInt16 nFormat,
 									   const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );

Modified: openoffice/branches/ia2/main/svx/source/customshapes/EnhancedCustomShape2d.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/customshapes/EnhancedCustomShape2d.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/customshapes/EnhancedCustomShape2d.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/customshapes/EnhancedCustomShape2d.cxx Fri Feb  1 08:46:00 2013
@@ -1495,6 +1495,36 @@ void EnhancedCustomShape2d::CreateSubPat
 				}
 				break;
 
+                case QUADRATICCURVETO :
+                {
+                    for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 1 ) < nCoordSize ); i++ )
+                    {
+                        if ( rSrcPt )
+                        {
+                            const Point aPreviousEndPoint(GetPoint( seqCoordinates[ rSrcPt - 1 ], sal_True, sal_True));
+                            const Point aControlQ(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
+                            const Point aEnd(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
+                            const Point aControlA((aPreviousEndPoint + (aControlQ * 2)) / 3);
+                            const Point aControlB(((aControlQ * 2) + aEnd) / 3);
+
+                            DBG_ASSERT(aNewB2DPolygon.count(), "EnhancedCustomShape2d::CreateSubPath: Error in adding Q control point (!)");
+                            aNewB2DPolygon.appendBezierSegment(
+                                basegfx::B2DPoint(aControlA.X(), aControlA.Y()),
+                                basegfx::B2DPoint(aControlB.X(), aControlB.Y()),
+                                basegfx::B2DPoint(aEnd.X(), aEnd.Y()));
+                        }
+                        else // no previous point , do a moveto
+                        {
+                            rSrcPt++; // skip control point
+                            const Point aEnd(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
+
+                            DBG_ASSERT(aNewB2DPolygon.count(), "EnhancedCustomShape2d::CreateSubPath: Error in adding Q control point (!)");
+                            aNewB2DPolygon.append(basegfx::B2DPoint(aEnd.X(), aEnd.Y()));
+                        }
+                    }
+                }
+                break;
+
 				case ANGLEELLIPSE :
 				{
 					if ( nPntCount )

Modified: openoffice/branches/ia2/main/svx/source/dialog/docrecovery.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/dialog/docrecovery.src?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/dialog/docrecovery.src (original)
+++ openoffice/branches/ia2/main/svx/source/dialog/docrecovery.src Fri Feb  1 08:46:00 2013
@@ -371,7 +371,7 @@ TabPage RID_SVXPAGE_ERR_REP_WELCOME
 		Pos = MAP_APPFONT( RECOV_COL1, RECOV_ROW2 );
 		Size = MAP_APPFONT( RECOV_CONTROLWIDTH, (RECOV_ROW7-RECOV_ROW2-RSC_SP_CTRL_Y) );
 		WordBreak = TRUE;
-		Text[ en-US ] = "This error report tool gathers information about how %PRODUCTNAME is working and sends it to Oracle to help improve future versions.\n\nIt's easy - just send the report without any further effort on your part by clicking 'Send' in the next dialog, or you can briefly describe how the error occurred and then click 'Send'. If you want to see the report, click the 'Show Report' button. No data will be sent if you click 'Do Not Send'.\n\nCustomer Privacy\nThe information gathered is limited to data concerning the state of %PRODUCTNAME %PRODUCTVERSION when the error occurred. Other information about passwords or document contents is not collected.\n\nThe information will only be used to improve the quality of %PRODUCTNAME and will not be shared with third parties.\nFor more information on Oracle's privacy policy, visit\nwww.oracle.com/html/services-privacy-policy.html";
+		Text[ en-US ] = "This error report tool gathers information about how %PRODUCTNAME is working and sends it to Apache OpenOffice to help improve future versions.\n\nIt's easy - just send the report without any further effort on your part by clicking 'Send' in the next dialog, or you can briefly describe how the error occurred and then click 'Send'. If you want to see the report, click the 'Show Report' button. No data will be sent if you click 'Do Not Send'.\n\nCustomer Privacy\nThe information gathered is limited to data concerning the state of %PRODUCTNAME %PRODUCTVERSION when the error occurred. Other information about passwords or document contents is not collected.\n\nThe information will only be used to improve the quality of %PRODUCTNAME and will not be shared with third parties.\nFor more information on Apache OpenOffice's privacy policy, visit\nwww.oracle.com/html/services-privacy-policy.html";
 	};
 	FixedLine FL_RECOV_BOTTOM
 	{
@@ -479,7 +479,7 @@ TabPage RID_SVXPAGE_ERR_REP_SEND
         Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW12 );
         Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, RSC_CD_CHECKBOX_HEIGHT );
 		Check = FALSE;
-        Text[ en-US ] = "~I allow Oracle to contact me regarding this report.";
+        Text[ en-US ] = "~I allow Apache OpenOffice to contact me regarding this report.";
 	};
 	FixedText FT_ERRSEND_EMAILADDR
 	{
@@ -647,4 +647,4 @@ ModalDialog RID_SVX_MDLG_ERR_REP_PREVIEW
 		Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
         DefButton = TRUE;
 	};
-};
\ No newline at end of file
+};

Modified: openoffice/branches/ia2/main/svx/source/dialog/sendreportw32.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/dialog/sendreportw32.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/dialog/sendreportw32.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/dialog/sendreportw32.cxx Fri Feb  1 08:46:00 2013
@@ -93,7 +93,7 @@ namespace svx{
 
 			if ( ERROR_SUCCESS == RegReadValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("HTTPProxyServer"),
 				szBuffer,
 				sizeof(szBuffer) ) )
@@ -102,7 +102,7 @@ namespace svx{
 			DWORD	dwProxyPort;
 			if ( ERROR_SUCCESS == RegReadValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("HTTPProxyPort"),
 				&dwProxyPort,
 				sizeof(dwProxyPort) ) )
@@ -113,7 +113,7 @@ namespace svx{
 
 			if ( ERROR_SUCCESS == RegReadValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("ReturnAddress"),
 				szBuffer,
 				sizeof(szBuffer) ) )
@@ -122,7 +122,7 @@ namespace svx{
 			DWORD	fAllowContact = sal_False;
 			RegReadValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("AllowContact"),
 				&fAllowContact,
 				sizeof(fAllowContact) );
@@ -131,7 +131,7 @@ namespace svx{
 			DWORD	uInternetConnection = 0;
 			RegReadValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("HTTPConnection"),
 				&uInternetConnection,
 				sizeof(uInternetConnection) );
@@ -145,7 +145,7 @@ namespace svx{
 			const _TCHAR	*lpHTTPProxyServer = reinterpret_cast<LPCTSTR>(maParams.maHTTPProxyServer.GetBuffer());
 			RegWriteValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("HTTPProxyServer"), REG_SZ,
 				lpHTTPProxyServer,
 				sizeof(TCHAR) * (_tcslen(lpHTTPProxyServer) + 1) );
@@ -155,7 +155,7 @@ namespace svx{
 
 			RegWriteValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("HTTPProxyPort"), REG_DWORD,
 				&dwProxyPort,
 				sizeof(DWORD) );
@@ -163,7 +163,7 @@ namespace svx{
 			DWORD	fAllowContact = IsContactAllowed();
 			RegWriteValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("AllowContact"), REG_DWORD,
 				&fAllowContact,
 				sizeof(DWORD) );
@@ -173,7 +173,7 @@ namespace svx{
 
 			RegWriteValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("HTTPConnection"), REG_DWORD,
 				&uInternetConnection,
 				sizeof(DWORD) );
@@ -181,7 +181,7 @@ namespace svx{
 			const _TCHAR	*lpEmail = reinterpret_cast<LPCTSTR>(GetEMailAddress().GetBuffer());
 			RegWriteValue(
 				HKEY_CURRENT_USER,
-				TEXT("SOFTWARE\\OpenOffice.org\\CrashReport"),
+				TEXT("SOFTWARE\\Apache OpenOffice\\CrashReport"),
 				TEXT("ReturnAddress"), REG_SZ,
 				lpEmail,
 				sizeof(TCHAR) * (_tcslen(lpEmail) + 1) );

Modified: openoffice/branches/ia2/main/svx/source/form/formcontrolfactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/form/formcontrolfactory.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/form/formcontrolfactory.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/form/formcontrolfactory.cxx Fri Feb  1 08:46:00 2013
@@ -464,7 +464,7 @@ namespace svxform
                 {
                     const ::rtl::OUString sScaleModeProperty( RTL_CONSTASCII_USTRINGPARAM( "ScaleMode" ) );
                     if ( xPSI->hasPropertyByName( sScaleModeProperty ) )
-                        _rxControlModel->setPropertyValue( sScaleModeProperty, makeAny( ImageScaleMode::Isotropic ) );
+                        _rxControlModel->setPropertyValue( sScaleModeProperty, makeAny( ImageScaleMode::ISOTROPIC ) );
                 }
                 break;
             }

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galctrl.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galctrl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galctrl.cxx Fri Feb  1 08:46:00 2013
@@ -300,6 +300,16 @@ void GalleryPreview::PreviewMedia( const
 
 // ------------------------------------------------------------------------
 
+void drawCheckered(OutputDevice& rOut, const Point& rPos, const Size& rSize)
+{
+    // draw checkered background
+    static const sal_uInt32 nLen(8);
+    static const Color aW(COL_WHITE);
+    static const Color aG(0xef, 0xef, 0xef);
+
+    rOut.DrawCheckered(rPos, rSize, nLen, aW, aG);
+}
+
 // -------------------
 // - GalleryIconView -
 // -------------------
@@ -364,21 +374,37 @@ void GalleryIconView::UserDraw( const Us
 			const Rectangle&	rRect = rUDEvt.GetRect();
 			OutputDevice*		pDev = rUDEvt.GetDevice();
 			Graphic 			aGraphic;
+            bool bTransparent(false);
 
 			if( pObj->IsThumbBitmap() )
 			{
-				Bitmap aBmp( pObj->GetThumbBmp() );
+				BitmapEx aBitmapEx;
 
 				if( pObj->GetObjKind() == SGA_OBJ_SOUND )
-					aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
-
-				if( ( pDev->GetBitCount() <= 8 ) && ( aBmp.GetBitCount() >= 8 ) )
-					aBmp.Dither( BMP_DITHER_FLOYD );
+                {
+                    Bitmap aTemp = pObj->GetThumbBmp().GetBitmap();
+                    
+                    aTemp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
+                    aBitmapEx = BitmapEx(aTemp);
+                }
+                else
+                {
+                    aBitmapEx = pObj->GetThumbBmp();
+                    bTransparent = aBitmapEx.IsTransparent();
+                }
+
+				if( ( pDev->GetBitCount() <= 8 ) && ( aBitmapEx.GetBitCount() >= 8 ) )
+                {
+					aBitmapEx.Dither( BMP_DITHER_FLOYD );
+                }
 
-				aGraphic = aBmp;
+				aGraphic = aBitmapEx;
 			}
 			else
+            {
 				aGraphic = pObj->GetThumbMtf();
+                bTransparent = true;
+            }
 
 			Size aSize( aGraphic.GetSizePixel( pDev ) );
 
@@ -406,6 +432,12 @@ void GalleryIconView::UserDraw( const Us
 				const Point aPos( ( ( rRect.GetWidth() - aSize.Width() ) >> 1 ) + rRect.Left(),
 								  ( ( rRect.GetHeight() - aSize.Height() ) >> 1 ) + rRect.Top() );
 
+                if(bTransparent)
+                {
+                    // draw checkered background
+                    drawCheckered(*pDev, aPos, aSize);
+                }
+
 				aGraphic.Draw( pDev, aPos, aSize );
 			}
 
@@ -604,13 +636,24 @@ void GalleryListView::PaintField( Output
             {
                 Rectangle       aOutputRect( rRect.TopLeft(), Size( rRect.GetHeight(), rRect.GetHeight() ) );
     			GraphicObject   aGrfObj;
+                bool bTransparent(false);
 
                 if( pObj->GetObjKind() == SGA_OBJ_SOUND )
+                {
                     aGrfObj = Graphic( BitmapEx( GAL_RESID( RID_SVXBMP_GALLERY_MEDIA ) ) );
+                }
                 else if( pObj->IsThumbBitmap() )
-				    aGrfObj = Graphic( pObj->GetThumbBmp() );
+                {
+                    const BitmapEx aBitmapEx(pObj->GetThumbBmp());
+
+                    bTransparent = aBitmapEx.IsTransparent();
+				    aGrfObj = Graphic(aBitmapEx);
+                }
 			    else
+                {
 				    aGrfObj = Graphic( pObj->GetThumbMtf() );
+                    bTransparent = true;
+                }
 
 			    Size aSize( rDev.LogicToPixel( aGrfObj.GetPrefSize(), aGrfObj.GetPrefMapMode() ) );
 
@@ -641,7 +684,13 @@ void GalleryListView::PaintField( Output
 				    const Point aPos( ( ( aOutputRect.GetWidth() - aSize.Width() ) >> 1 ) + aOutputRect.Left(),
 								      ( ( aOutputRect.GetHeight() - aSize.Height() ) >> 1 ) + aOutputRect.Top() );
 
-				    aGrfObj.Draw( &rDev, aPos, aSize );
+                    if(bTransparent)
+                    {
+                        // draw checkered background
+                        drawCheckered(rDev, aPos, aSize);
+                    }
+
+                    aGrfObj.Draw( &rDev, aPos, aSize );
 			    }
 
 			    rDev.DrawText( Point( aOutputRect.Right() + 6, nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE ) );

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx Fri Feb  1 08:46:00 2013
@@ -260,7 +260,7 @@ sal_uIntPtr GalleryExplorer::GetObjCount
 // ------------------------------------------------------------------------
 
 sal_Bool GalleryExplorer::GetGraphicObj( const String& rThemeName, sal_uIntPtr nPos,
-									 Graphic* pGraphic, Bitmap* pThumb,
+									 Graphic* pGraphic, BitmapEx* pThumb,
 									 sal_Bool bProgress )
 {
 	Gallery*	pGal = ImplGetGallery();
@@ -289,7 +289,7 @@ sal_Bool GalleryExplorer::GetGraphicObj(
 // ------------------------------------------------------------------------
 
 sal_Bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos,
-									 Graphic* pGraphic, Bitmap* pThumb,
+									 Graphic* pGraphic, BitmapEx* pThumb,
 									 sal_Bool bProgress )
 {
 	Gallery* pGal = ImplGetGallery();
@@ -362,7 +362,7 @@ sal_uIntPtr GalleryExplorer::GetSdrObjCo
 // ------------------------------------------------------------------------
 
 sal_Bool GalleryExplorer::GetSdrObj( const String& rThemeName, sal_uIntPtr nSdrModelPos,
-								 SdrModel* pModel, Bitmap* pThumb )
+								 SdrModel* pModel, BitmapEx* pThumb )
 {
 	Gallery*	pGal = ImplGetGallery();
 	sal_Bool		bRet = sal_False;
@@ -399,7 +399,7 @@ sal_Bool GalleryExplorer::GetSdrObj( con
 // ------------------------------------------------------------------------
 
 sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos,
-								 SdrModel* pModel, Bitmap* pThumb )
+								 SdrModel* pModel, BitmapEx* pThumb )
 {
 	Gallery* pGal = ImplGetGallery();
 	return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : sal_False );
@@ -504,8 +504,4 @@ sal_Bool GalleryExplorer::EndLocking( sa
 }
 
 // -----------------------------------------------------------------------------
-
-sal_Bool GalleryExplorer::DrawCentered( OutputDevice* pOut, const FmFormModel& rModel )
-{
-	return SgaObjectSvDraw::DrawCentered( pOut, rModel );
-}
+// eof

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galmisc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galmisc.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galmisc.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galmisc.cxx Fri Feb  1 08:46:00 2013
@@ -606,7 +606,7 @@ sal_Bool GalleryTransferable::GetData( c
 	}
 	else if( ( FORMAT_BITMAP == nFormat ) && mpGraphicObject )
 	{
-		bRet = SetBitmap( mpGraphicObject->GetGraphic().GetBitmap(), rFlavor );
+		bRet = SetBitmapEx( mpGraphicObject->GetGraphic().GetBitmapEx(), rFlavor );
 	}
 
 	return bRet;

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx Fri Feb  1 08:46:00 2013
@@ -29,10 +29,8 @@
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <sfx2/objsh.hxx>
 #include <sfx2/docfac.hxx>
-
 #include <comphelper/classids.hxx>
 #include <unotools/pathoptions.hxx>
-
 #include <tools/rcid.h>
 #include <tools/vcompat.hxx>
 #include <vcl/virdev.hxx>
@@ -45,7 +43,7 @@
 #include "galobj.hxx"
 #include <vcl/salbtype.hxx>		// FRound
 #include <vcl/svapp.hxx>
-
+#include <vcl/dibtools.hxx>
 #include "gallerydrawmodel.hxx"
 
 using namespace ::com::sun::star;
@@ -95,7 +93,8 @@ sal_Bool SgaObject::CreateThumb( const G
 		        }
 		    }
 
-			aThumbBmp = aBmpEx.GetBitmap( &aWhite );
+            // take over BitmapEx
+			aThumbBmp = aBmpEx;
 
 			if( ( aBmpSize.Width() <= S_THUMB ) && ( aBmpSize.Height() <= S_THUMB ) )
 			{
@@ -130,7 +129,7 @@ sal_Bool SgaObject::CreateThumb( const G
 			aSize.Height() = (sal_Int32)( S_THUMB / fFactor );
 
         const GraphicConversionParameters aParameters(aSize, false, true, true, true);
-        aThumbBmp = rGraphic.GetBitmap(aParameters);
+        aThumbBmp = rGraphic.GetBitmapEx(aParameters);
 
 		if( !aThumbBmp.IsEmpty() )
 		{
@@ -159,7 +158,7 @@ void SgaObject::WriteData( SvStream& rOu
 		rOut.SetCompressMode( COMPRESSMODE_ZBITMAP );
 		rOut.SetVersion( SOFFICE_FILEFORMAT_50 );
 
-		rOut << aThumbBmp;
+        WriteDIBBitmapEx(aThumbBmp, rOut);
 
 		rOut.SetVersion( nOldVersion );
 		rOut.SetCompressMode( nOldCompressMode );
@@ -183,9 +182,13 @@ void SgaObject::ReadData(SvStream& rIn, 
 	rIn >> nTmp32 >> nTmp16 >> rReadVersion >> nTmp16 >> bIsThumbBmp;
 
 	if( bIsThumbBmp )
-		rIn >> aThumbBmp;
+    {
+        ReadDIBBitmapEx(aThumbBmp, rIn);
+    }
 	else
+    {
 		rIn >> aThumbMtf;
+    }
 
 	rIn >> aTmpStr; aURL = INetURLObject( String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ) );
 }
@@ -354,7 +357,7 @@ SgaObjectSound::~SgaObjectSound()
 
 // ------------------------------------------------------------------------
 
-Bitmap SgaObjectSound::GetThumbBmp() const
+BitmapEx SgaObjectSound::GetThumbBmp() const
 {
 	sal_uInt16 nId;
 
@@ -375,9 +378,8 @@ Bitmap SgaObjectSound::GetThumbBmp() con
 	}
 
 	const BitmapEx  aBmpEx( GAL_RESID( nId ) );
-	const Color     aTransColor( COL_WHITE );
-
-	return aBmpEx.GetBitmap( &aTransColor );
+	
+    return aBmpEx;
 }
 
 // ------------------------------------------------------------------------
@@ -521,24 +523,50 @@ sal_Bool SgaObjectSvDraw::CreateThumb( c
 	sal_Bool		bRet = sal_False;
 
 	if ( CreateIMapGraphic( rModel, aGraphic, aImageMap ) )
+    {
 		bRet = SgaObject::CreateThumb( aGraphic );
+    }
 	else
 	{
-        VirtualDevice aVDev;
-
-        aVDev.SetOutputSizePixel( Size( S_THUMB*2, S_THUMB*2 ) );
+        const FmFormPage* pPage = static_cast< const FmFormPage* >(rModel.GetPage(0));
 
-        bRet = DrawCentered( &aVDev, rModel );
-        if( bRet )
+        if(pPage)
         {
-            aThumbBmp = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() );
+            const Rectangle aObjRect(pPage->GetAllObjBoundRect());
 
-			Size aMS( 2, 2 );
-			BmpFilterParam aParam( aMS );
-			aThumbBmp.Filter( BMP_FILTER_MOSAIC, &aParam );
-			aThumbBmp.Scale( Size( S_THUMB, S_THUMB ) );
+            if(aObjRect.GetWidth() && aObjRect.GetHeight())
+            {
+                VirtualDevice aVDev;
+                FmFormView aView(const_cast< FmFormModel* >(&rModel), &aVDev);
 
-	        aThumbBmp.Convert( BMP_CONVERSION_8BIT_COLORS );
+                aView.ShowSdrPage(const_cast< FmFormPage* >(pPage));
+                aView.MarkAllObj();
+                aThumbBmp = aView.GetMarkedObjBitmapEx();
+
+                const Size aDiscreteSize(aThumbBmp.GetSizePixel());
+
+                if(aDiscreteSize.Width() && aDiscreteSize.Height())
+                {
+                    sal_uInt32 nTargetSizeX(S_THUMB);
+                    sal_uInt32 nTargetSizeY(S_THUMB);
+
+                    if(aDiscreteSize.Width() > aDiscreteSize.Height())
+                    {
+                        nTargetSizeY = (aDiscreteSize.Height() * nTargetSizeX) / aDiscreteSize.Width();
+                    }
+                    else
+                    {
+                        nTargetSizeX = (aDiscreteSize.Width() * nTargetSizeY) / aDiscreteSize.Height();
+                    }
+
+                    if(!!aThumbBmp)
+                    {
+                        aThumbBmp.Scale(Size(nTargetSizeX, nTargetSizeY), BMP_SCALE_BESTQUALITY);
+                        aThumbBmp.Convert(BMP_CONVERSION_8BIT_COLORS);
+                        bRet = true;
+                    }
+                }
+            }
         }
 	}
 
@@ -547,56 +575,6 @@ sal_Bool SgaObjectSvDraw::CreateThumb( c
 
 // ------------------------------------------------------------------------
 
-sal_Bool SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& rModel )
-{
-    const FmFormPage*   pPage = static_cast< const FmFormPage* >( rModel.GetPage( 0 ) );
-    sal_Bool                bRet = sal_False;
-
-    if( pOut && pPage )
-    {
-        const Rectangle aObjRect( pPage->GetAllObjBoundRect() );
-        const Size      aOutSizePix( pOut->GetOutputSizePixel() );
-
-        if( aObjRect.GetWidth() && aObjRect.GetHeight() && aOutSizePix.Width() > 2 && aOutSizePix.Height() > 2 )
-        {
-            FmFormView      aView( const_cast< FmFormModel* >( &rModel ), pOut );
-            MapMode	        aMap( rModel.GetScaleUnit() );
-            Rectangle       aDrawRectPix( Point( 1, 1 ), Size( aOutSizePix.Width() - 2, aOutSizePix.Height() - 2 ) );
-            const double    fFactor  = (double) aObjRect.GetWidth() / aObjRect.GetHeight();
-            Fraction        aFrac( FRound( fFactor < 1. ? aDrawRectPix.GetWidth() * fFactor : aDrawRectPix.GetWidth() ),
-                                   pOut->LogicToPixel( aObjRect.GetSize(), aMap ).Width() );
-
-            aMap.SetScaleX( aFrac );
-            aMap.SetScaleY( aFrac );
-
-            const Size aDrawSize( pOut->PixelToLogic( aDrawRectPix.GetSize(), aMap ) );
-            Point aOrigin( pOut->PixelToLogic( aDrawRectPix.TopLeft(), aMap ) );
-
-            aOrigin.X() += ( ( aDrawSize.Width() - aObjRect.GetWidth() ) >> 1 ) - aObjRect.Left();
-            aOrigin.Y() += ( ( aDrawSize.Height() - aObjRect.GetHeight() ) >> 1 ) - aObjRect.Top();
-            aMap.SetOrigin( aOrigin );
-
-            aView.SetPageVisible( sal_False );
-            aView.SetBordVisible( sal_False );
-            aView.SetGridVisible( sal_False );
-            aView.SetHlplVisible( sal_False );
-            aView.SetGlueVisible( sal_False );
-
-            pOut->Push();
-            pOut->SetMapMode( aMap );
-            aView.ShowSdrPage( const_cast< FmFormPage* >( pPage ));
-            aView.CompleteRedraw( pOut, Rectangle( pOut->PixelToLogic( Point() ), pOut->GetOutputSize() ) );
-            pOut->Pop();
-
-            bRet = sal_True;
-        }
-    }
-
-    return bRet;
-}
-
-// ------------------------------------------------------------------------
-
 void SgaObjectSvDraw::WriteData( SvStream& rOut, const String& rDestDir ) const
 {
 	SgaObject::WriteData( rOut, rDestDir );
@@ -615,3 +593,5 @@ void SgaObjectSvDraw::ReadData( SvStream
 		rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 );
 	}
 }
+
+// eof

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx Fri Feb  1 08:46:00 2013
@@ -790,7 +790,7 @@ GalleryThemeEntry* GalleryTheme::CreateT
 
 // -----------------------------------------------------------------------------
 
-sal_Bool GalleryTheme::GetThumb( sal_uIntPtr nPos, Bitmap& rBmp, sal_Bool )
+sal_Bool GalleryTheme::GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool )
 {
 	SgaObject*	pObj = AcquireObject( nPos );
 	sal_Bool		bRet = sal_False;
@@ -862,9 +862,10 @@ sal_Bool GalleryTheme::GetGraphic( sal_u
 
 				if( pObj )
 				{
-					Bitmap aBmp( pObj->GetThumbBmp() );
-					aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
-					rGraphic = aBmp;
+                    rGraphic = pObj->GetThumbBmp();
+					//Bitmap aBmp( pObj->GetThumbBmp() );
+					//aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
+					//rGraphic = aBmp;
 					ReleaseObject( pObj );
 					bRet = sal_True;
 				}

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galtheme.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galtheme.src?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galtheme.src (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galtheme.src Fri Feb  1 08:46:00 2013
@@ -145,36 +145,36 @@ String RID_GALLERYSTR_THEME_RULERS
 };
 
 // -----------------------------------------------------------------------------
-
-String RID_GALLERYSTR_THEME_COMPUTERS
-{
-       Text [ en-US ] = "Computers";
-};
-
-String RID_GALLERYSTR_THEME_DIAGRAMS
-{
-       Text [ en-US ] = "Diagrams";
-};
-
-String RID_GALLERYSTR_THEME_ENVIRONMENT
-{
-       Text [ en-US ] = "Environment";
-};
-
-String RID_GALLERYSTR_THEME_FINANCE
-{
-       Text [ en-US ] = "Finance";
-};
-
-String RID_GALLERYSTR_THEME_TRANSPORT
-{
-       Text [ en-US ] = "Transport";
-};
-
-String RID_GALLERYSTR_THEME_TXTSHAPES
-{
-       Text [ en-US ] = "Textshapes";
-};
+
+String RID_GALLERYSTR_THEME_COMPUTERS
+{
+       Text [ en-US ] = "Computers";
+};
+
+String RID_GALLERYSTR_THEME_DIAGRAMS
+{
+       Text [ en-US ] = "Diagrams";
+};
+
+String RID_GALLERYSTR_THEME_ENVIRONMENT
+{
+       Text [ en-US ] = "Environment";
+};
+
+String RID_GALLERYSTR_THEME_FINANCE
+{
+       Text [ en-US ] = "Finance";
+};
+
+String RID_GALLERYSTR_THEME_TRANSPORT
+{
+       Text [ en-US ] = "Transport";
+};
+
+String RID_GALLERYSTR_THEME_TXTSHAPES
+{
+       Text [ en-US ] = "Textshapes";
+};
 
 // -----------------------------------------------------------------------------
 

Modified: openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx Fri Feb  1 08:46:00 2013
@@ -179,6 +179,7 @@ namespace sdr
 			const double fCurrentTime(getPrimitiveAnimator().GetTime());
 			OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
             basegfx::B2DRange aViewRange;
+            basegfx::B2DHomMatrix aViewTransformation;
 
 			// create ViewRange
             if(isOutputToRecordingMetaFile())
@@ -228,12 +229,16 @@ namespace sdr
 
 				// transform to world coordinates
                 aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
+
+                // for metafile, leave ViewTransformation empty, but for pixel renderer
+                // get it from OutputDevice
+                aViewTransformation = rTargetOutDev.GetViewTransformation();
 			}
 
 			// update local ViewInformation2D
 			const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D(
 				basegfx::B2DHomMatrix(), 
-				rTargetOutDev.GetViewTransformation(), 
+				aViewTransformation, 
 				aViewRange, 
 				GetXDrawPageForSdrPage(GetSdrPage()),
 				fCurrentTime, 

Modified: openoffice/branches/ia2/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx Fri Feb  1 08:46:00 2013
@@ -165,18 +165,23 @@ namespace sdr
             }
             else
             {
-                static vcl::DeleteOnDeinit<drawinglayer::primitive2d::DiscreteShadow>
-                    aDiscreteShadow(new drawinglayer::primitive2d::DiscreteShadow(
-                        BitmapEx(ResId(SIP_SA_PAGESHADOW35X35, *ImpGetResMgr()))));
-                if (aDiscreteShadow.get() != NULL)
+                static vcl::DeleteOnDeinit< drawinglayer::primitive2d::DiscreteShadow > aDiscreteShadow(
+                    new drawinglayer::primitive2d::DiscreteShadow(
+                        BitmapEx(
+                            ResId(
+                                SIP_SA_PAGESHADOW35X35, 
+                                *ImpGetResMgr()))));
+
+                if(aDiscreteShadow.get())
                 {
                     const drawinglayer::primitive2d::Primitive2DReference xReference(
                         new drawinglayer::primitive2d::DiscreteShadowPrimitive2D(
                             aPageMatrix, 
-                                *aDiscreteShadow.get()));
-                    
+                            *aDiscreteShadow.get()));
+
                     return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
                 }
+
                 return drawinglayer::primitive2d::Primitive2DSequence();
             }
 		}

Modified: openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaymanagerbuffered.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svx.hxx"
 #include <svx/sdr/overlay/overlaymanagerbuffered.hxx>
@@ -33,6 +31,7 @@
 #include <tools/stream.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <vcl/cursor.hxx>
+#include <vcl/dibtools.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -253,7 +252,7 @@ namespace sdr
                 {
                     const Bitmap aBitmap(maBufferDevice.GetBitmap(aTopLeft, aSize));
                     SvFileStream aNew((const String&)String(ByteString( "c:\\test.bmp" ), RTL_TEXTENCODING_UTF8), STREAM_WRITE|STREAM_TRUNC);
-                    aNew << aBitmap;
+                    WriteDIB(aBitmap, aNew, false, true);
                 }
 #endif
             }

Modified: openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaytools.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaytools.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaytools.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sdr/overlay/overlaytools.cxx Fri Feb  1 08:46:00 2013
@@ -67,8 +67,8 @@ namespace drawinglayer
                 // and unrotated, more like a marker
                 const double fLeft(((0.0 - getCenterX()) * getDiscreteUnit()) + getBasePosition().getX());
                 const double fTop(((0.0 - getCenterY()) * getDiscreteUnit()) + getBasePosition().getY());
-                const double fRight((((aBitmapSize.getWidth() - 1.0) - getCenterX()) * getDiscreteUnit()) + getBasePosition().getX());
-                const double fBottom((((aBitmapSize.getHeight() - 1.0) - getCenterY()) * getDiscreteUnit()) + getBasePosition().getY());
+                const double fRight(((aBitmapSize.getWidth() - getCenterX()) * getDiscreteUnit()) + getBasePosition().getX());
+                const double fBottom(((aBitmapSize.getHeight() - getCenterY()) * getDiscreteUnit()) + getBasePosition().getY());
 
                 // create a BitmapPrimitive2D using those positions
 				basegfx::B2DHomMatrix aTransform;

Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdhdl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdhdl.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdhdl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdhdl.cxx Fri Feb  1 08:46:00 2013
@@ -96,18 +96,10 @@ public:
 #define INDIVIDUAL_COUNT    (4)
 
 SdrHdlBitmapSet::SdrHdlBitmapSet(sal_uInt16 nResId)
-:   maMarkersBitmap(),
+:   maMarkersBitmap(ResId(nResId, *ImpGetResMgr())), // just use ressource with alpha channel
     // 14 kinds (BitmapMarkerKind) use index [0..5], 4 extra
     maRealMarkers((KIND_COUNT * INDEX_COUNT) + INDIVIDUAL_COUNT)
 {
-	// #101928# change color used for transparent parts to 0x00ff00ff (ImageList standard)
-	const Color aColTransparent(0x00ff00ff);
-	const Bitmap aBitmap(ResId(nResId, *ImpGetResMgr()));
-    const Bitmap aMask(aBitmap.CreateMask(aColTransparent));
-
-    // create a real BitmapEx with an AlphaMask
-    maMarkersBitmap = BitmapEx(aBitmap, aMask);
-    // maMarkersBitmap = BitmapEx(aBitmap, aColTransparent);
 }
 
 SdrHdlBitmapSet::~SdrHdlBitmapSet()
@@ -171,15 +163,15 @@ const BitmapEx& SdrHdlBitmapSet::GetBitm
                 }
 		    	case 2: 
                 {
-                    return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 78), Size(13, 13))); 
+                    return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 79), Size(13, 13))); 
                 }
 			    case 3: 
                 {
-                    return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 78), Size(13, 13))); 
+                    return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 79), Size(13, 13))); 
                 }
     			case 4: 
                 {
-                    return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 78), Size(13, 13))); 
+                    return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 79), Size(13, 13))); 
                 }
                 default: // case 5: 
                 {
@@ -189,17 +181,19 @@ const BitmapEx& SdrHdlBitmapSet::GetBitm
 		}
 
 		case Circ_7x7: 
+		case Customshape_7x7:
 		{
 			return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7)));
 		}
 
 		case Circ_9x9: 
-		case Customshape1:
+		case Customshape_9x9:
 		{
 			return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9)));
 		}
 
 		case Circ_11x11: 
+		case Customshape_11x11:
 		{
 			return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11)));
 		}
@@ -252,14 +246,14 @@ const BitmapEx& SdrHdlBitmapSet::GetBitm
 		case Anchor: // #101688# AnchorTR for SW
 		case AnchorTR: 
 		{
-			return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 68), Size(24, 23)));
+			return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 68), Size(24, 24)));
 		}
 
 		// #98388# add AnchorPressed to be able to aninate anchor control
 		case AnchorPressed: 
 		case AnchorPressedTR: 
 		{
-			return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(48, 68), Size(24, 23)));
+			return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(48, 68), Size(24, 24)));
 		}
 	}
 
@@ -551,7 +545,7 @@ void SdrHdl::CreateB2dIAObject()
 			// for SJ and the CustomShapeHandles:
 			case HDL_CUSTOMSHAPE1:
 			{
-				eKindOfMarker = Customshape1;
+				eKindOfMarker = (b1PixMore) ? Customshape_9x9 : Customshape_7x7;
 				eColIndex = Yellow;
 				break;
 			}
@@ -626,6 +620,10 @@ BitmapMarkerKind SdrHdl::GetNextBigger(B
 		case Circ_9x9:			eRetval = Circ_11x11;		break;
 		//case Circ_11x11:		eRetval = ;	break;
 		
+		case Customshape_7x7:		eRetval = Customshape_9x9;	    break;
+		case Customshape_9x9:		eRetval = Customshape_11x11;    break;
+		//case Customshape_11x11:	eRetval = ;	break;
+		
 		case Elli_7x9:			eRetval = Elli_9x11;		break;
 		//case Elli_9x11:			eRetval = ;	break;
 		
@@ -685,7 +683,27 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMa
 
 	if(pHdlList->GetHdlSize() > 3)
 	{
-		bForceBiggerSize = sal_True;
+        switch(eKindOfMarker)
+        {
+            case Anchor:
+            case AnchorPressed:
+            case AnchorTR:
+            case AnchorPressedTR:
+            {
+                // #121463# For anchor, do not simply make bigger because of HdlSize,
+                // do it dependent of IsSelected() which Writer can set in drag mode
+                if(IsSelected())
+                {
+                    bForceBiggerSize = sal_True;
+                }
+                break;
+            }
+            default:
+            {
+                bForceBiggerSize = sal_True;
+                break;
+            }
+        }
 	}
 	
 	// #101928# ...for high contrast, too.
@@ -2084,7 +2102,7 @@ SdrHdlList::SdrHdlList(SdrMarkView* pV)
 	bRotateShear = sal_False; 
 	bMoveOutside = sal_False; 
 	bDistortShear = sal_False; 
-	bFineHandles = sal_False;
+	bFineHandles = sal_True;    // new default: Handles are fine handles
 }
 
 SdrHdlList::~SdrHdlList() 

Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdmodel.cxx Fri Feb  1 08:46:00 2013
@@ -2170,18 +2170,6 @@ const ::com::sun::star::uno::Sequence< s
 	return *pSeq;
 }
 
-void SdrModel::SetDrawingLayerPoolDefaults()
-{
-	const String aNullStr;
-	const Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE);
-	const Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING);
-	const XHatch aNullHatch(aNullLineCol);
-
-	pItemPool->SetPoolDefaultItem( XFillColorItem(aNullStr,aNullFillCol) );
-	pItemPool->SetPoolDefaultItem( XFillHatchItem(pItemPool,aNullHatch) );
-	pItemPool->SetPoolDefaultItem( XLineColorItem(aNullStr,aNullLineCol) );
-}
-
 //
 // i120668, move from the header files, add delete action
 //

Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdoashp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdoashp.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdoashp.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdoashp.cxx Fri Feb  1 08:46:00 2013
@@ -645,6 +645,7 @@ SdrObjCustomShape::SdrObjCustomShape() :
 	fObjectRotation( 0.0 ),
 	mpLastShadowGeometry(0L)
 {
+	bClosedObj = true; // custom shapes may be filled
 	bTextFrame = sal_True;
 }
 
@@ -1921,68 +1922,49 @@ void SdrObjCustomShape::NbcRotate( const
 
 void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 )
 {
-	// storing horizontal and vertical flipping without modifying the rotate angle
+    // TTTT: Fix for old mirroring, can be removed again in aw080
+    // storing horizontal and vertical flipping without modifying the rotate angle
+    // decompose other flipping to rotation and MirrorX.
+    long ndx = rRef2.X()-rRef1.X();
+    long ndy = rRef2.Y()-rRef1.Y();
 
-	sal_Bool bHorz = sal_False;
-	sal_Bool bVert = sal_False;
-	if ( rRef1.X() == rRef2.X() )
-		bHorz = sal_True;
-	if ( rRef1.Y() == rRef2.Y() )
-		bVert = sal_True;
-	if ( !bHorz && !bVert )
-		bHorz = bVert = sal_True;
-
-	if ( bHorz || bVert )
-	{
-		SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-
-		/////////////////
-		// "MirroredX" //
-		/////////////////
-		if ( bHorz )
-		{
-			const rtl::OUString	sMirroredX( RTL_CONSTASCII_USTRINGPARAM ( "MirroredX" ) );
-			com::sun::star::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sMirroredX );
-			if ( pAny )
-			{
-				sal_Bool bFlip = sal_Bool();
-				if ( *pAny >>= bFlip )
-				{
-					if ( bFlip )
-						bHorz = sal_False;
-				}
-			}
-			PropertyValue aPropVal;
-			aPropVal.Name = sMirroredX;
-			aPropVal.Value <<= bHorz;
-			aGeometryItem.SetPropertyValue( aPropVal );
-		}
+    if(!ndx) // MirroredX
+    {
+         SetMirroredX(!IsMirroredX());
+         SdrTextObj::NbcMirror( rRef1, rRef2 );
+    }
+    else
+    {
+        if(!ndy)  // MirroredY
+        {
+            SetMirroredY(!IsMirroredY());
+            SdrTextObj::NbcMirror( rRef1, rRef2 );
+        }
+        else // neither horizontal nor vertical
+        {
+            SetMirroredX(!IsMirroredX());
 
-		/////////////////
-		// "MirroredY" //
-		/////////////////
-		if ( bVert )
-		{
-			const rtl::OUString	sMirroredY( RTL_CONSTASCII_USTRINGPARAM ( "MirroredY" ) );
-			com::sun::star::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sMirroredY );
-			if ( pAny )
-			{
-				sal_Bool bFlip = sal_Bool();
-				if ( *pAny >>= bFlip )
-				{
-					if ( bFlip )
-						bVert = sal_False;
-				}
-			}
-			PropertyValue aPropVal;
-			aPropVal.Name = sMirroredY;
-			aPropVal.Value <<= bVert;
-			aGeometryItem.SetPropertyValue( aPropVal );
-		}
-		SetMergedItem( aGeometryItem );
-	}
-	SdrTextObj::NbcMirror( rRef1, rRef2 );
-	InvalidateRenderGeometry();
+            // call parent
+            SdrTextObj::NbcMirror( rRef1, rRef2 );
+
+            // update fObjectRotation
+            long nTextObjRotation = aGeo.nDrehWink;
+            double fWink = nTextObjRotation;
+            
+            fWink /= 100.0;
+            
+            bool bSingleFlip = (IsMirroredX()!= IsMirroredY());
+            
+            fObjectRotation = fmod( bSingleFlip ? -fWink : fWink, 360.0 );
+            
+            if ( fObjectRotation < 0 )
+            {
+                fObjectRotation = 360.0 + fObjectRotation;
+            }
+         }
+    }
+
+    InvalidateRenderGeometry();
 }
 
 void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear )
@@ -1992,21 +1974,25 @@ void SdrObjCustomShape::Shear( const Poi
 }
 void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear )
 {
-	long nDrehWink = aGeo.nDrehWink;
-	if ( nDrehWink )
-	{
-		aGeo.nDrehWink = -nDrehWink;
-		aGeo.RecalcSinCos();
-		NbcRotate( rRef, aGeo.nDrehWink, aGeo.nSin, aGeo.nCos );
-	}
-	SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
-	if ( nDrehWink )
-	{
-		aGeo.nDrehWink = nDrehWink;
-		aGeo.RecalcSinCos();
-		Rotate( rRef, aGeo.nDrehWink, aGeo.nSin, aGeo.nCos );
-	}
-	InvalidateRenderGeometry();
+    // TTTT: Fix for old mirroring, can be removed again in aw080
+     SdrTextObj::NbcShear(rRef,nWink,tn,bVShear);
+
+    // updating fObjectRotation
+    long nTextObjRotation = aGeo.nDrehWink;
+    double fWink = nTextObjRotation;
+
+    fWink /= 100.0;
+
+    bool bSingleFlip = (IsMirroredX()!= IsMirroredY());
+
+    fObjectRotation = fmod( bSingleFlip ? -fWink : fWink, 360.0 );
+
+    if ( fObjectRotation < 0 )
+    {
+        fObjectRotation = 360.0 + fObjectRotation;
+    }
+
+    InvalidateRenderGeometry();
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/ia2/main/svx/source/svdraw/svdograf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/svdraw/svdograf.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/svdraw/svdograf.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/svdraw/svdograf.cxx Fri Feb  1 08:46:00 2013
@@ -737,7 +737,6 @@ void SdrGrafObj::ReleaseGraphicLink()
 
 void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
-	FASTBOOL bAnim = pGraphic->IsAnimated();
 	FASTBOOL bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
 
 	rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
@@ -745,10 +744,10 @@ void SdrGrafObj::TakeObjInfo(SdrObjTrans
 							   aGeo.nDrehWink % 27000 == 0;
 
 	rInfo.bResizePropAllowed = sal_True;
-	rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim;
-	rInfo.bRotate90Allowed = bNoPresGrf && !bAnim;
-	rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim;
-	rInfo.bMirror45Allowed = bNoPresGrf && !bAnim;
+	rInfo.bRotateFreeAllowed = bNoPresGrf;
+	rInfo.bRotate90Allowed = bNoPresGrf;
+	rInfo.bMirrorFreeAllowed = bNoPresGrf;
+	rInfo.bMirror45Allowed = bNoPresGrf;
 	rInfo.bMirror90Allowed = !bEmptyPresObj;
 	rInfo.bTransparenceAllowed = sal_False;
 	rInfo.bGradientAllowed = sal_False;



Mime
View raw message