[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - offapi/com sc/source vcl/source

Armin Le Grand alg at apache.org
Wed Jan 15 08:08:39 PST 2014


 offapi/com/sun/star/smarttags/XRangeBasedSmartTagRecognizer.idl |    3 
 sc/source/ui/dbgui/dbnamdlg.cxx                                 |    2 
 vcl/source/gdi/bitmapex.cxx                                     |   74 ++++++----
 3 files changed, 49 insertions(+), 30 deletions(-)

New commits:
commit f3263e7b8bfe740f8e1e7825214e3936cc938ea9
Author: Armin Le Grand <alg at apache.org>
Date:   Wed Jan 15 15:27:52 2014 +0000

    i123690 handle the extremes Width or Height equal one

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index d23946e..bc7c95d 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -1251,53 +1251,73 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame(
             long x(0);
             long y(0);
 
-            // x == 0, y == 0
-            pContent->SetPixel(y, x, aColorTopLeft);
-            pAlpha->SetPixelIndex(y, x, nAlpha);
+            // x == 0, y == 0, top-left corner
+            pContent->SetPixel(0, 0, aColorTopLeft);
+            pAlpha->SetPixelIndex(0, 0, nAlpha);
 
-            for(x = 1; x < nW - 1; x++) // y == 0
+            // y == 0, top line left to right
+            for(x = 1; x < nW - 1; x++)
             {
                 Color aMix(aColorTopLeft);
 
                 aMix.Merge(aColorTopRight, 255 - sal_uInt8((x * 255) / nW));
-                pContent->SetPixel(y, x, aMix);
-                pAlpha->SetPixelIndex(y, x, nAlpha);
+                pContent->SetPixel(0, x, aMix);
+                pAlpha->SetPixelIndex(0, x, nAlpha);
             }
 
-            // x == nW - 1, y == 0
-            pContent->SetPixel(y, x, aColorTopRight);
-            pAlpha->SetPixelIndex(y, x, nAlpha);
+            // x == nW - 1, y == 0, top-right corner
+            // #123690# Caution! When nW is 1, x == nW is possible (!)
+            if(x < nW)
+            {
+                pContent->SetPixel(0, x, aColorTopRight);
+                pAlpha->SetPixelIndex(0, x, nAlpha);
+            }
 
-            for(y = 1; y < nH - 1; y++) // x == 0 and nW - 1
+            // x == 0 and nW - 1, left and right line top-down
+            for(y = 1; y < nH - 1; y++)
             {
                 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);
-            }
+                // #123690# Caution! When nW is 1, x == nW is possible (!)
+                if(x < nW)
+                {
+                    Color aMixB(aColorTopRight);
 
-            x = 0; // x == 0, y == nH - 1
-            pContent->SetPixel(y, x, aColorBottomLeft);
-            pAlpha->SetPixelIndex(y, x, nAlpha);
+                    aMixB.Merge(aColorBottomRight, 255 - sal_uInt8((y * 255) / nH));
+                    pContent->SetPixel(y, x, aMixB);
+                    pAlpha->SetPixelIndex(y, x, nAlpha);
+                }
+            }
 
-            for(x = 1; x < nW - 1; x++) // y == nH - 1
+            // #123690# Caution! When nH is 1, y == nH is possible (!)
+            if(y < nH)
             {
-                Color aMix(aColorBottomLeft);
+                // x == 0, y == nH - 1, bottom-left corner
+                pContent->SetPixel(y, 0, aColorBottomLeft);
+                pAlpha->SetPixelIndex(y, 0, nAlpha);
 
-                aMix.Merge(aColorBottomRight, 255 - sal_uInt8(((x - 0)* 255) / nW));
-                pContent->SetPixel(y, x, aMix);
-                pAlpha->SetPixelIndex(y, x, nAlpha);
-            }
+                // y == nH - 1, bottom line left to right
+                for(x = 1; x < nW - 1; x++)
+                {
+                    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);
+                // x == nW - 1, y == nH - 1, bottom-right corner
+                // #123690# Caution! When nW is 1, x == nW is possible (!)
+                if(x < nW)
+                {
+                    pContent->SetPixel(y, x, aColorBottomRight);
+                    pAlpha->SetPixelIndex(y, x, nAlpha);
+                }
+            }
 
             aContent.ReleaseAccess(pContent);
             aAlpha.ReleaseAccess(pAlpha);
commit 5c1be8b527783b7e72c82d0cf8c3474f80d26ce4
Author: Tsutomu Uchino <hanya at apache.org>
Date:   Wed Jan 15 14:48:44 2014 +0000

    #i121950# remove the document for unused parameter from the document for recognizeTextRange method

diff --git a/offapi/com/sun/star/smarttags/XRangeBasedSmartTagRecognizer.idl b/offapi/com/sun/star/smarttags/XRangeBasedSmartTagRecognizer.idl
index c7671a5..d3a95ba 100644
--- a/offapi/com/sun/star/smarttags/XRangeBasedSmartTagRecognizer.idl
+++ b/offapi/com/sun/star/smarttags/XRangeBasedSmartTagRecognizer.idl
@@ -75,9 +75,6 @@ interface XRangeBasedSmartTagRecognizer: com::sun::star::lang::XInitialization
         @param eDataType
                 This value indicates the type of the passed text.
 
-        @param aLocale
-                Is used to indicate the language of the passed text.
-
         @param xTextMarkup
                 This object is used to submit any recognized smart tags
                 to the calling application.
commit f8be427cd9b311b98e84d673dea15d917acde81c
Author: Tsutomu Uchino <hanya at apache.org>
Date:   Wed Jan 15 14:32:27 2014 +0000

    #i123725# choose by default the following options, Insert or delete cells and Keep formatting options on define database range dialog

diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 76d4c2e..8613ee4 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -208,6 +208,8 @@ __EXPORT ScDbNameDlg::~ScDbNameDlg()
 void ScDbNameDlg::Init()
 {
     aBtnHeader.Check( sal_True );       // Default: mit Spaltenkoepfen
+    aBtnDoSize.Check( sal_True );
+    aBtnKeepFmt.Check( sal_True );
 
     aBtnMore.AddWindow( &aFlOptions );
     aBtnMore.AddWindow( &aBtnHeader );


More information about the Libreoffice-commits mailing list