The following commit has been merged in the master branch: commit 7fc18065e2b90eaacae527e5954bb8604ce60c07 Author: Rene Engelhard <r...@debian.org> Date: Fri Jul 26 00:13:29 2013 +0200
Revert unwanted revert :) This reverts commit cb0e52eafaa2c610e916e2a164bbf69a4b420a13. diff --git a/patches/revert-ba6478560792e0eec161142c8cfbc0e08cd7a4f5.diff b/patches/revert-ba6478560792e0eec161142c8cfbc0e08cd7a4f5.diff new file mode 100644 index 0000000..b7769da --- /dev/null +++ b/patches/revert-ba6478560792e0eec161142c8cfbc0e08cd7a4f5.diff @@ -0,0 +1,651 @@ +00:54 <@_rene_> shmget_: ping? +00:56 <@_rene_> shmget_: see backlog: +00:56 <@_rene_> 18:50 <@_rene_> sigh. since rc3->rc4 (and/or toolchain updates + I have failing unoapi tests) +00:56 <@_rene_> 18:51 <@_rene_> xmloff, retry, forms, retry sd, retry, ... +00:57 <@_rene_> 18:52 <@_rene_> (actually sfx2_complex right now) +00:57 <@_rene_> 18:53 <@_rene_> http://zyklop.dyndns.org/~rene/sfx2_complex +00:57 <@_rene_> 18:53 <@_rene_> thread #2 is similar everywhere iirc +00:57 <@_rene_> I diff'ed rc3 to rc4 and saw +http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-1-0&id=ba6478560792e0eec161142c8cfbc0e08cd7a4f5 which touched bitmap stuff +00:57 < IZBot> core - Resolves: #i122418# Added workaround to not use GetBitmap + on windows +00:57 < loirkerbot> LibreOffice (core) olivier.hallot * + cui/source/tabpages/tparea.cxx: Small String -> OUString + cleanup +00:57 <@_rene_> shmget_: reverted that one, the checks don't fail anymore +00:58 <@_rene_> thorsten, mmeeks: jfyi +[...] +01:09 -!- ohallot [~Thunderbi@189.122.1.135] has quit [Ping timeout: 240 + seconds] +01:12 -!- ohallot [~Thunderbi@189.122.1.135] has joined #libreoffice-dev +01:13 <@shmget_> _rene_ without it you get + https://www.libreoffice.org/bugzilla/show_bug.cgi?id=67076 +01:13 < IZBot> bug 67076: LibreOffice-UI blocker/high RESOLVED FIXED Colors + aren't displayed in color combobox +01:13 <@_rene_> even on linux? +01:13 <@_rene_> (the commit says "windows", so...) +01:14 <@_rene_> otoh, windows as not the os.. sigh. +01:14 <@shmget_> _rene_ I don't know... that was reported on Mac, and I + bisected it on Mac... +01:14 <@_rene_> hrm. +01:15 * _rene_ tries with his Linux rc3 +01:17 <@_rene_> for example format -> paragraph -> border -> color? +01:17 <@_rene_> (or whatever it's in en_US, de right here in front of me.) +01:17 <@_rene_> that displays colors clicked... +01:18 <@_rene_> in any case, the test shouldn't fail 3+ junit tests ;-) +01:19 <@shmget_> _rene_ format -> character and then the tab where you can + coose the font's colore... pull the drop-down cobobox to + select the colors => the rectangle wihere the color should be + is white or some random crap +01:19 <@_rene_> yep. +01:20 <@_rene_> 01:17 <@_rene_> that displays colors clicked... +01:20 <@_rene_> s/clicked/when clicked/ +01:20 <@_rene_> ii libreoffice-co 1:4.1.0~rc3- amd64 office + productivity suite -- arch +01:21 <@shmget_> well, I think any place taht have a combobox with color in it + is impacgted... so there are many way to go at it :-) +01:21 <@shmget_> _rene_ do you see the same bug in linux ? +01:21 <@_rene_> no, I don't +01:22 <@shmget_> good then you can revert 'locally' without creating a bug + then... +01:22 <@_rene_> yep, that's what I am doing +01:22 <@_rene_> it's still bad +01:23 * _rene_ wonders why it just fails for him or whetver the tests were + even ran on linux + +diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx +index b6c00c2..85aead9 100644 +--- a/include/vcl/bitmap.hxx ++++ b/include/vcl/bitmap.hxx +@@ -821,6 +821,35 @@ public: + const Link* pProgress = NULL ); + + public: ++ /** Draw a blend frame to the Bitmap ++ ++ @param nAlpha ++ The blend value defines how strong the frame will be blended with the ++ existing content, 255 == full coverage, 0 == no frame will be drawn ++ ++ @param aColorTopLeft, aColorBottomRight, aColorTopRight, aColorBottomLeft ++ The colors defining the frame. If the version without aColorTopRight and ++ aColorBottomLeft is used, these colors are linearly interpolated from ++ aColorTopLeft and aColorBottomRight using the width and height of the area ++ ++ @param rTopLeft ++ The start point of the frame in pixels ++ ++ @param rSize ++ The size of the frame in pixels ++ */ ++ void DrawBlendFrame( ++ sal_uInt8 nAlpha = 128, ++ Color aColorTopLeft = Color(COL_WHITE), ++ Color aColorBottomRight = Color(COL_BLACK)); ++ void DrawBlendFrame( ++ const Point& rTopLeft, ++ const Size& rSize, ++ sal_uInt8 nAlpha = 128, ++ Color aColorTopLeft = Color(COL_WHITE), ++ Color aColorTopRight = Color(COL_GRAY), ++ Color aColorBottomRight = Color(COL_BLACK), ++ Color aColorBottomLeft = Color(COL_GRAY)); + + BitmapReadAccess* AcquireReadAccess(); + BitmapWriteAccess* AcquireWriteAccess(); +diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx +index 00a3c4e..ce1b2ae 100644 +--- a/include/vcl/bitmapex.hxx ++++ b/include/vcl/bitmapex.hxx +@@ -395,38 +395,6 @@ public: + const Size &rSize ); + }; + +-// ------------------------------------------------------------------ +-/** Create a blend frame as BitmapEx +- +- @param nAlpha +- The blend value defines how strong the frame will be blended with the +- existing content, 255 == full coverage, 0 == no frame will be drawn +- +- @param aColorTopLeft, aColorBottomRight, aColorTopRight, aColorBottomLeft +- The colors defining the frame. If the version without aColorTopRight and +- aColorBottomLeft is used, these colors are linearly interpolated from +- aColorTopLeft and aColorBottomRight using the width and height of the area +- +- @param rSize +- The size of the frame in pixels +- */ +- +-BitmapEx VCL_DLLPUBLIC createBlendFrame( +- const Size& rSize, +- sal_uInt8 nAlpha, +- Color aColorTopLeft, +- Color aColorBottomRight); +- +-BitmapEx VCL_DLLPUBLIC createBlendFrame( +- const Size& rSize, +- sal_uInt8 nAlpha, +- Color aColorTopLeft, +- Color aColorTopRight, +- Color aColorBottomRight, +- Color aColorBottomLeft); +- +-// ------------------------------------------------------------------ +- + #endif // _SV_BITMAPEX_HXX + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx +index b839b89..37cf887 100644 +--- a/svtools/source/control/ctrlbox.cxx ++++ b/svtools/source/control/ctrlbox.cxx +@@ -307,14 +307,16 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt ) + + if(nEdgeBlendingPercent) + { +- const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); +- const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); +- const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); +- const BitmapEx aBlendFrame(createBlendFrame(aRect.GetSize(), nAlpha, rTopLeft, rBottomRight)); ++ Bitmap aBitmap(rUDEvt.GetDevice()->GetBitmap(aRect.TopLeft(), aRect.GetSize())); + +- if(!aBlendFrame.IsEmpty()) ++ if(!aBitmap.IsEmpty()) + { +- rUDEvt.GetDevice()->DrawBitmapEx(aRect.TopLeft(), aBlendFrame); ++ const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); ++ const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); ++ const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); ++ ++ aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight); ++ rUDEvt.GetDevice()->DrawBitmap(aRect.TopLeft(), aBitmap); + } + } + +diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx +index 75a8d53..9623b29 100644 +--- a/svtools/source/control/valueset.cxx ++++ b/svtools/source/control/valueset.cxx +@@ -341,14 +341,16 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem, Rectangle aRect ) + + if(nEdgeBlendingPercent) + { +- const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); +- const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); +- const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); +- const BitmapEx aBlendFrame(createBlendFrame(aRect.GetSize(), nAlpha, rTopLeft, rBottomRight)); ++ Bitmap aBitmap(maVirDev.GetBitmap(aRect.TopLeft(), aRect.GetSize())); + +- if(!aBlendFrame.IsEmpty()) ++ if(!aBitmap.IsEmpty()) + { +- maVirDev.DrawBitmapEx(aRect.TopLeft(), aBlendFrame); ++ const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); ++ const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); ++ const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); ++ ++ aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight); ++ maVirDev.DrawBitmap(aRect.TopLeft(), aBitmap); + } + } + } +diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx +index 7684ca8..b15bfc3 100644 +--- a/vcl/source/control/ilstbox.cxx ++++ b/vcl/source/control/ilstbox.cxx +@@ -1870,16 +1870,19 @@ void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Boo + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + const sal_uInt16 nEdgeBlendingPercent(GetEdgeBlending() ? rStyleSettings.GetEdgeBlending() : 0); + +- if(nEdgeBlendingPercent && aImgSz.Width() && aImgSz.Height()) ++ if(nEdgeBlendingPercent) + { +- const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); +- const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); +- const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); +- const BitmapEx aBlendFrame(createBlendFrame(aImgSz, nAlpha, rTopLeft, rBottomRight)); ++ const Rectangle aRect(aPtImg, aImgSz); ++ Bitmap aBitmap(GetBitmap(aRect.TopLeft(), aRect.GetSize())); + +- if(!aBlendFrame.IsEmpty()) ++ if(!aBitmap.IsEmpty()) + { +- DrawBitmapEx(aPtImg, aBlendFrame); ++ const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); ++ const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); ++ const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); ++ ++ aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight); ++ DrawBitmap(aRect.TopLeft(), aBitmap); + } + } + } +@@ -2960,14 +2963,17 @@ void ImplWin::DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDraw + + if(nEdgeBlendingPercent) + { +- const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); +- const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); +- const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); +- const BitmapEx aBlendFrame(createBlendFrame(aImgSz, nAlpha, rTopLeft, rBottomRight)); ++ const Rectangle aRect(aPtImg, aImgSz); ++ Bitmap aBitmap(GetBitmap(aRect.TopLeft(), aRect.GetSize())); + +- if(!aBlendFrame.IsEmpty()) ++ if(!aBitmap.IsEmpty()) + { +- DrawBitmapEx(aPtImg, aBlendFrame); ++ const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor()); ++ const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor()); ++ const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100); ++ ++ aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight); ++ DrawBitmap(aRect.TopLeft(), aBitmap); + } + } + } +diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx +index 5defb3e..efe8209 100644 +--- a/vcl/source/gdi/bitmap4.cxx ++++ b/vcl/source/gdi/bitmap4.cxx +@@ -981,6 +981,7 @@ sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* + return bRet; + } + ++ + double* MakeBlurKernel(const double radius, int& rows) { + int intRadius = (int) radius + 1.0; + rows = intRadius * 2 + 1; +@@ -1163,4 +1164,197 @@ bool Bitmap::ImplSeparableUnsharpenFilter(const double radius) { + return true; + } + ++ ++void impMixPixel(BitmapWriteAccess& rAcc, long y, long x, const Color& rColor, sal_uInt8 nAlpha) ++{ ++ const BitmapColor aBitmapColor(rColor); ++ ++ if(nAlpha) ++ { ++ if(255 != nAlpha) ++ { ++ BitmapColor aTarget(rAcc.GetColor(y, x)); ++ ++ aTarget.Merge(aBitmapColor, nAlpha); ++ rAcc.SetPixel(y, x, aTarget); ++ } ++ } ++ else ++ { ++ rAcc.SetPixel(y, x, aBitmapColor); ++ } ++} ++ ++inline bool impVisibleX(long x, const Size& rSizePixel) ++{ ++ return x >= 0 && x < rSizePixel.Width(); ++} ++ ++inline bool impVisibleY(long y, const Size& rSizePixel) ++{ ++ return y >= 0 && y < rSizePixel.Width(); ++} ++ ++inline bool impVisibleXY(long y, long x, const Size& rSizePixel) ++{ ++ return impVisibleX(x, rSizePixel) && impVisibleY(y, rSizePixel); ++} ++ ++void Bitmap::DrawBlendFrame( ++ const Point& rTopLeft, ++ const Size& rSize, ++ sal_uInt8 nAlpha, ++ Color aColorTopLeft, ++ Color aColorTopRight, ++ Color aColorBottomRight, ++ Color aColorBottomLeft) ++{ ++ if(!IsEmpty()) ++ { ++ const Size aSizePixel(GetSizePixel()); ++ ++ if(aSizePixel.Width() && aSizePixel.Height()) ++ { ++ const long nW(rSize.Width()); ++ const long nH(rSize.Height()); ++ ++ if(nW || nH) ++ { ++ BitmapWriteAccess* pAcc = AcquireWriteAccess(); ++ const long nStartX(rTopLeft.X()); ++ const long nStartY(rTopLeft.X()); ++ const long nEndX(rTopLeft.X() + nW); ++ const long nEndY(rTopLeft.X() + nH); ++ long x(nStartX); ++ long y(nStartY); ++ ++ if(pAcc) ++ { ++ if(impVisibleXY(y, x, aSizePixel)) ++ { ++ // x == nStartX, y == nStartY ++ impMixPixel(*pAcc, y, x, aColorTopLeft, nAlpha); ++ } ++ ++ if(impVisibleY(y, aSizePixel)) ++ { ++ for(x = 1; x < nEndX - 1; x++) // y == nStartY ++ { ++ if(impVisibleX(x, aSizePixel)) ++ { ++ Color aMix(aColorTopLeft); ++ aMix.Merge(aColorTopRight, 255 - sal_uInt8(((x - nStartX) * 255) / nW)); ++ impMixPixel(*pAcc, y, x, aMix, nAlpha); ++ } ++ } ++ } ++ else ++ { ++ x = nEndX - 1; ++ } ++ ++ if(impVisibleXY(y, x, aSizePixel)) ++ { ++ // x == nEndX - 1, y == nStartY ++ impMixPixel(*pAcc, y, x, aColorTopRight, nAlpha); ++ } ++ ++ const bool bLeftVisible(impVisibleX(nStartX, aSizePixel)); ++ const bool bRightVisible(impVisibleX(x, aSizePixel)); ++ ++ if(bLeftVisible || bRightVisible) ++ { ++ if(bLeftVisible) ++ { ++ for(y = 1; y < nEndY - 1; y++) // x == nStartX and nEndX-1 ++ { ++ if(impVisibleY(y, aSizePixel)) ++ { ++ Color aMix(aColorTopLeft); ++ aMix.Merge(aColorBottomLeft, 255 - sal_uInt8(((y - nStartY) * 255) / nH)); ++ impMixPixel(*pAcc, y, nStartX, aMix, nAlpha); ++ } ++ } ++ } ++ ++ if(bRightVisible) ++ { ++ for(y = 1; y < nEndY - 1; y++) // x == nStartX and nEndX-1 ++ { ++ if(impVisibleY(y, aSizePixel)) ++ { ++ Color aMix(aColorTopRight); ++ aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((y -nStartY) * 255) / nH)); ++ impMixPixel(*pAcc, y, x, aMix, nAlpha); ++ } ++ } ++ } ++ } ++ else ++ { ++ y = nEndY - 1; ++ } ++ ++ if(impVisibleXY(y, x, aSizePixel)) ++ { ++ x = nStartX; // x == nStartX, y == nEndY-1 ++ impMixPixel(*pAcc, y, x, aColorBottomLeft, nAlpha); ++ } ++ ++ if(impVisibleY(y, aSizePixel)) ++ { ++ for(x = 1; x < nEndX - 1; x++) // y == nEndY-1 ++ { ++ if(impVisibleX(x, aSizePixel)) ++ { ++ Color aMix(aColorBottomLeft); ++ aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((x - nStartX)* 255) / nW)); ++ impMixPixel(*pAcc, y, x, aMix, nAlpha); ++ } ++ } ++ } ++ else ++ { ++ x = nEndX - 1; ++ } ++ ++ if(impVisibleXY(y, x, aSizePixel)) ++ { ++ // x == nEndX - 1, y == nEndY - 1 ++ impMixPixel(*pAcc, y, x, aColorBottomRight, nAlpha); ++ } ++ ++ ReleaseAccess(pAcc); ++ } ++ } ++ } ++ } ++} ++ ++void Bitmap::DrawBlendFrame( ++ sal_uInt8 nAlpha, ++ Color aColorTopLeft, ++ Color aColorBottomRight) ++{ ++ if(!IsEmpty()) ++ { ++ const Point aTopLeft(0, 0); ++ const Size aSize(GetSizePixel()); ++ const sal_uInt32 nW(aSize.Width()); ++ const sal_uInt32 nH(aSize.Height()); ++ ++ if(nW || nH) ++ { ++ Color aColTopRight(aColorTopLeft); ++ Color aColBottomLeft(aColorTopLeft); ++ const sal_uInt32 nDE(nW + nH); ++ ++ aColTopRight.Merge(aColorBottomRight, 255 - sal_uInt8((nW * 255) / nDE)); ++ aColBottomLeft.Merge(aColorBottomRight, 255 - sal_uInt8((nH * 255) / nDE)); ++ ++ DrawBlendFrame(aTopLeft, aSize, nAlpha, aColorTopLeft, aColTopRight, aColorBottomRight, aColBottomLeft); ++ } ++ } ++} ++ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx +index 1266043..fb3cc39 100644 +--- a/vcl/source/gdi/bitmapex.cxx ++++ b/vcl/source/gdi/bitmapex.cxx +@@ -925,153 +925,4 @@ bool BitmapEx::Create( const ::com::sun::star::uno::Reference< + return false; + } + +-// ----------------------------------------------------------------------------- +- +-BitmapEx VCL_DLLPUBLIC createBlendFrame( +- const Size& rSize, +- sal_uInt8 nAlpha, +- Color aColorTopLeft, +- Color aColorBottomRight) +-{ +- const sal_uInt32 nW(rSize.Width()); +- const sal_uInt32 nH(rSize.Height()); +- +- if(nW || nH) +- { +- Color aColTopRight(aColorTopLeft); +- Color aColBottomLeft(aColorTopLeft); +- const sal_uInt32 nDE(nW + nH); +- +- aColTopRight.Merge(aColorBottomRight, 255 - sal_uInt8((nW * 255) / nDE)); +- aColBottomLeft.Merge(aColorBottomRight, 255 - sal_uInt8((nH * 255) / nDE)); +- +- return createBlendFrame(rSize, nAlpha, aColorTopLeft, aColTopRight, aColorBottomRight, aColBottomLeft); +- } +- +- return BitmapEx(); +-} +- +-BitmapEx VCL_DLLPUBLIC createBlendFrame( +- const Size& rSize, +- sal_uInt8 nAlpha, +- Color aColorTopLeft, +- Color aColorTopRight, +- Color aColorBottomRight, +- Color aColorBottomLeft) +-{ +- static Size aLastSize(0, 0); +- static sal_uInt8 nLastAlpha(0); +- static Color aLastColorTopLeft(COL_BLACK); +- static Color aLastColorTopRight(COL_BLACK); +- static Color aLastColorBottomRight(COL_BLACK); +- static Color aLastColorBottomLeft(COL_BLACK); +- static BitmapEx aLastResult; +- +- if(aLastSize == rSize +- && nLastAlpha == nAlpha +- && aLastColorTopLeft == aLastColorTopLeft +- && aLastColorTopRight == aLastColorTopRight +- && aLastColorBottomRight == aLastColorBottomRight +- && aLastColorBottomLeft == aLastColorBottomLeft) +- { +- return aLastResult; +- } +- +- aLastSize = rSize; +- nLastAlpha = nAlpha; +- aLastColorTopLeft = aLastColorTopLeft; +- aLastColorTopRight = aLastColorTopRight; +- aLastColorBottomRight = aLastColorBottomRight; +- aLastColorBottomLeft = aLastColorBottomLeft; +- aLastResult.Clear(); +- +- const long nW(rSize.Width()); +- const long nH(rSize.Height()); +- +- if(nW && nH) +- { +- sal_uInt8 aEraseTrans(0xff); +- Bitmap aContent(rSize, 24); +- AlphaMask aAlpha(rSize, &aEraseTrans); +- +- aContent.Erase(COL_BLACK); +- +- BitmapWriteAccess* pContent = aContent.AcquireWriteAccess(); +- BitmapWriteAccess* pAlpha = aAlpha.AcquireWriteAccess(); +- +- if(pContent && pAlpha) +- { +- long x(0); +- long y(0); +- +- // x == 0, y == 0 +- pContent->SetPixel(y, x, aColorTopLeft); +- pAlpha->SetPixelIndex(y, x, nAlpha); +- +- for(x = 1; x < nW - 1; x++) // y == 0 +- { +- Color aMix(aColorTopLeft); +- +- aMix.Merge(aColorTopRight, 255 - sal_uInt8((x * 255) / nW)); +- pContent->SetPixel(y, x, aMix); +- pAlpha->SetPixelIndex(y, x, nAlpha); +- } +- +- // x == nW - 1, y == 0 +- pContent->SetPixel(y, x, aColorTopRight); +- pAlpha->SetPixelIndex(y, x, nAlpha); +- +- for(y = 1; y < nH - 1; y++) // x == 0 and nW - 1 +- { +- Color aMixA(aColorTopLeft); +- Color aMixB(aColorTopRight); +- +- aMixA.Merge(aColorBottomLeft, 255 - sal_uInt8((y * 255) / nH)); +- pContent->SetPixel(y, 0, aMixA); +- pAlpha->SetPixelIndex(y, 0, nAlpha); +- +- aMixB.Merge(aColorBottomRight, 255 - sal_uInt8((y * 255) / nH)); +- pContent->SetPixel(y, nW - 1, aMixB); +- pAlpha->SetPixelIndex(y, nW - 1, nAlpha); +- } +- +- x = 0; // x == 0, y == nH - 1 +- pContent->SetPixel(y, x, aColorBottomLeft); +- pAlpha->SetPixelIndex(y, x, nAlpha); +- +- for(x = 1; x < nW - 1; x++) // y == nH - 1 +- { +- Color aMix(aColorBottomLeft); +- +- aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((x - 0)* 255) / nW)); +- pContent->SetPixel(y, x, aMix); +- pAlpha->SetPixelIndex(y, x, nAlpha); +- } +- +- // x == nW - 1, y == nH - 1 +- pContent->SetPixel(y, x, aColorBottomRight); +- pAlpha->SetPixelIndex(y, x, nAlpha); +- +- aContent.ReleaseAccess(pContent); +- aAlpha.ReleaseAccess(pAlpha); +- +- aLastResult = BitmapEx(aContent, aAlpha); +- } +- else +- { +- if(pContent) +- { +- aContent.ReleaseAccess(pContent); +- } +- +- if(pAlpha) +- { +- aAlpha.ReleaseAccess(pAlpha); +- } +- } +- } +- +- return aLastResult; +-} +- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx +index 232eedb..e178426 100644 +--- a/vcl/source/gdi/outdev2.cxx ++++ b/vcl/source/gdi/outdev2.cxx +@@ -1151,7 +1151,6 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize, + Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const + { + DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); +- OSL_ENSURE(OUTDEV_PRINTER != GetOutDevType(), "OutputDevice::GetBitmap with sorce type OUTDEV_PRINTER should not be used (!)"); + + Bitmap aBmp; + long nX = ImplLogicXToDevicePixel( rSrcPt.X() ); +@@ -1161,7 +1160,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const + + if ( mpGraphics || ( (OutputDevice*) this )->ImplGetGraphics() ) + { +- if ( nWidth > 0 && nHeight > 0 && nX <= (mnOutWidth + mnOutOffX) && nY <= (mnOutHeight + mnOutOffY)) ++ if ( nWidth && nHeight ) + { + Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); + bool bClipped = false; +@@ -1219,13 +1218,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const + aPosAry.mnDestHeight = nHeight; + + if ( (nWidth > 0) && (nHeight > 0) ) +- { + (((OutputDevice*)&aVDev)->mpGraphics)->CopyBits( &aPosAry, mpGraphics, this, this ); +- } +- else +- { +- OSL_ENSURE(false, "CopyBits with negative width or height (!)"); +- } + + aBmp = aVDev.GetBitmap( Point(), aVDev.GetOutputSizePixel() ); + } diff --git a/patches/series b/patches/series index bc8d93f..0ea38ed 100644 --- a/patches/series +++ b/patches/series @@ -29,3 +29,4 @@ javadoc-optional.diff show-the-startcenter.diff fix-kk-in-lo-xlate-lang.diff hack-interlck_sparc.diff +revert-ba6478560792e0eec161142c8cfbc0e08cd7a4f5.diff -- LibreOffice packaging repository -- To UNSUBSCRIBE, email to debian-openoffice-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1v2tn7-0001ji...@vasks.debian.org