Author: alg
Date: Wed Jan 9 17:53:10 2013
New Revision: 1430974
URL: http://svn.apache.org/viewvc?rev=1430974&view=rev
Log:
#121504# corrections, mainly for win version
Modified:
openoffice/branches/alg/clibboard/main/drawinglayer/source/tools/converters.cxx
openoffice/branches/alg/clibboard/main/svtools/source/misc/transfer.cxx
openoffice/branches/alg/clibboard/main/sw/source/ui/dochdl/swdtflvr.cxx
Modified:
openoffice/branches/alg/clibboard/main/drawinglayer/source/tools/converters.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/clibboard/main/drawinglayer/source/tools/converters.cxx?rev=1430974&r1=1430973&r2=1430974&view=diff
==============================================================================
---
openoffice/branches/alg/clibboard/main/drawinglayer/source/tools/converters.cxx
(original)
+++
openoffice/branches/alg/clibboard/main/drawinglayer/source/tools/converters.cxx
Wed Jan 9 17:53:10 2013
@@ -32,6 +32,7 @@
#ifdef DBG_UTIL
#include <tools/stream.hxx>
+#include <vcl/pngwrite.hxx>
#endif
//////////////////////////////////////////////////////////////////////////////
@@ -129,7 +130,8 @@ namespace drawinglayer
if(bDoSaveForVisualControl)
{
SvFileStream aNew((const String&)String(ByteString(
"c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_WRITE|STREAM_TRUNC);
- WriteDIBBitmapEx(aRetval, aNew);
+ ::vcl::PNGWriter aPNGWriter(aRetval);
+ aPNGWriter.Write(aNew);
}
#endif
Modified:
openoffice/branches/alg/clibboard/main/svtools/source/misc/transfer.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/clibboard/main/svtools/source/misc/transfer.cxx?rev=1430974&r1=1430973&r2=1430974&view=diff
==============================================================================
--- openoffice/branches/alg/clibboard/main/svtools/source/misc/transfer.cxx
(original)
+++ openoffice/branches/alg/clibboard/main/svtools/source/misc/transfer.cxx Wed
Jan 9 17:53:10 2013
@@ -371,8 +371,7 @@ Any SAL_CALL TransferableHelper::getTran
GetData( aSubstFlavor );
bDone = maAny.hasValue();
}
- else if((SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_BMP,
aSubstFlavor )
- || (SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG,
aSubstFlavor)))
+ else if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_BMP,
aSubstFlavor )
&& TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor )
&& SotExchange::GetFormatDataFlavor(FORMAT_BITMAP,
aSubstFlavor))
{
@@ -1784,11 +1783,11 @@ sal_Bool TransferableDataHelper::GetStri
sal_Bool TransferableDataHelper::GetBitmapEx( SotFormatStringId nFormat,
BitmapEx& rBmpEx )
{
- DataFlavor aFlavor;
-
if(FORMAT_BITMAP == nFormat)
{
// try to get PNG first
+ DataFlavor aFlavor;
+
if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor))
{
if(GetBitmapEx(aFlavor, rBmpEx))
@@ -1798,6 +1797,7 @@ sal_Bool TransferableDataHelper::GetBitm
}
}
+ DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) &&
GetBitmapEx( aFlavor, rBmpEx ) );
}
@@ -1935,11 +1935,11 @@ sal_Bool TransferableDataHelper::GetGDIM
sal_Bool TransferableDataHelper::GetGraphic( SotFormatStringId nFormat,
Graphic& rGraphic )
{
- DataFlavor aFlavor;
-
if(FORMAT_BITMAP == nFormat)
{
// try to get PNG first
+ DataFlavor aFlavor;
+
if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor))
{
if(GetGraphic(aFlavor, rGraphic))
@@ -1949,6 +1949,7 @@ sal_Bool TransferableDataHelper::GetGrap
}
}
+ DataFlavor aFlavor;
return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) &&
GetGraphic( aFlavor, rGraphic ) );
}
@@ -1959,7 +1960,8 @@ sal_Bool TransferableDataHelper::GetGrap
DataFlavor aFlavor;
sal_Bool bRet = sal_False;
- if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor) &&
TransferableDataHelper::IsEqual(aFlavor, rFlavor))
+ if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor) &&
+ TransferableDataHelper::IsEqual(aFlavor, rFlavor))
{
// try to get PNG first
BitmapEx aBmpEx;
Modified:
openoffice/branches/alg/clibboard/main/sw/source/ui/dochdl/swdtflvr.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/alg/clibboard/main/sw/source/ui/dochdl/swdtflvr.cxx?rev=1430974&r1=1430973&r2=1430974&view=diff
==============================================================================
--- openoffice/branches/alg/clibboard/main/sw/source/ui/dochdl/swdtflvr.cxx
(original)
+++ openoffice/branches/alg/clibboard/main/sw/source/ui/dochdl/swdtflvr.cxx Wed
Jan 9 17:53:10 2013
@@ -543,9 +543,7 @@ sal_Bool SwTransferable::GetData( const
case SOT_FORMATSTR_ID_PNG:
// #126398# Neither pClpBitmap nor pClpGraphic are necessarily set
if( (eBufferType & TRNSFR_GRAPHIC) && (pClpBitmap != 0 ||
pClpGraphic != 0))
- bOK = SetBitmapEx( (pClpBitmap ? pClpBitmap
-
: pClpGraphic)->GetBitmapEx(),
- rFlavor );
+ bOK = SetBitmapEx( (pClpBitmap ? pClpBitmap :
pClpGraphic)->GetBitmapEx(), rFlavor );
break;
case SOT_FORMATSTR_ID_SVIM: