[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - sfx2/source slideshow/source svx/source wizards/com

Andre Fischer af at apache.org
Tue Jul 9 05:07:53 PDT 2013


 sfx2/source/sidebar/Theme.cxx                            |   14 +++++++++-----
 slideshow/source/engine/slideshowimpl.cxx                |   12 ++++++++++++
 svx/source/sidebar/text/TextPropertyPanel.hrc            |    2 +-
 wizards/com/sun/star/wizards/common/NumberFormatter.java |    3 ++-
 4 files changed, 24 insertions(+), 7 deletions(-)

New commits:
commit f6159d52f0423808eaddc9b5f3906cfc3e6baa0b
Author: Andre Fischer <af at apache.org>
Date:   Tue Jul 9 09:45:08 2013 +0000

    122707: Show a frame around toolbars in sidebar panels.

diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index cce2663..f9d5132 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -424,28 +424,32 @@ void Theme::UpdateTheme (void)
         */
 
         // Gradient style
+        Color aGradientStop2 (aBaseBackgroundColor);
+        aGradientStop2.IncreaseLuminance(17);
+        Color aToolBoxBorderColor (aBaseBackgroundColor);
+        aToolBoxBorderColor.DecreaseLuminance(12);
         setPropertyValue(
             maPropertyIdToNameMap[Paint_ToolBoxBackground],
             Any(Tools::VclToAwtGradient(Gradient(
                         GRADIENT_LINEAR,
-                        Color(0xf2f2f2),
-                        Color(0xfefefe)
+                        aBaseBackgroundColor.GetRGBColor(),
+                        aGradientStop2.GetRGBColor()
                         ))));
         setPropertyValue(
             maPropertyIdToNameMap[Paint_ToolBoxBorderTopLeft],
             mbIsHighContrastMode
                 ? Any(util::Color(sal_uInt32(0x00ff00)))
-                : Any(util::Color(sal_uInt32(0xf2f2f2))));
+                : Any(util::Color(aToolBoxBorderColor.GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Paint_ToolBoxBorderCenterCorners],
             mbIsHighContrastMode
                 ? Any(util::Color(sal_uInt32(0x00ff00)))
-                : Any(util::Color(sal_uInt32(0xf2f2f2))));
+                : Any(util::Color(aToolBoxBorderColor.GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Paint_ToolBoxBorderBottomRight],
             mbIsHighContrastMode
                 ? Any(util::Color(sal_uInt32(0x00ff00)))
-                : Any(util::Color(sal_uInt32(0xf2f2f2))));
+                : Any(util::Color(aToolBoxBorderColor.GetRGBColor())));
         setPropertyValue(
             maPropertyIdToNameMap[Rect_ToolBoxPadding],
             Any(awt::Rectangle(2,2,2,2)));
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hrc b/svx/source/sidebar/text/TextPropertyPanel.hrc
index e07f6dd..49834ad 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hrc
+++ b/svx/source/sidebar/text/TextPropertyPanel.hrc
@@ -45,7 +45,7 @@
 #define X0                      SECTIONPAGE_MARGIN_HORIZONTAL
 #define X1                      SECTIONPAGE_MARGIN_HORIZONTAL + 1 + TOOLBOX_ITEM_WIDTH * 2  + 4
 #define X2                      (PROPERTYPAGE_WIDTH - (FONTSIZE_WIDTH))
-#define X3                      (X2 - (TOOLBOX_ITEM_DD_WIDTH) - 2)
+#define X3                      (X2 - (TOOLBOX_ITEM_DD_WIDTH) - 3)
 
 #define FIRST_LINE_Y            SECTIONPAGE_MARGIN_VERTICAL_TOP
 #define SECOND_LINE_Y           FIRST_LINE_Y + CBOX_HEIGHT + CONTROL_SPACING_VERTICAL  + 1
commit 58eca806173ea9ede4efda89a96996d147227473
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Jul 9 09:29:13 2013 +0000

    i118671 take emergency exit when local slideshow is disposed from executing macros

diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 5876b6b..e3c317c 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -2051,6 +2051,18 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
 
             // process queues
             maEventQueue.process();
+
+            // #118671# the call above may execute a macro bound to an object. In
+            // that case this macro may have destroyed this local sliseshow so that it
+            // is disposed (see bugdoc at task). In that case, detect this and exit
+            // gently from this slideshow. Do not forget to disable the scoped
+            // call to mpPresTimer, this will be deleted if we are disposed.
+            if (isDisposed())
+            {
+                scopeGuard.dismiss();
+                return false;
+            }
+
             maActivitiesQueue.process();
 
             // commit frame to screen
commit 4ddd844cc1f7d8c76f48bd5c434eeda7d5fe1704
Author: Herbert Dürr <hdu at apache.org>
Date:   Tue Jul 9 08:48:59 2013 +0000

    #i122603# fix database wizard's use of the Numberformatter
    
    Patch by: Tsutomu Uchino <hanya.runo at gmail.com>
    Review by: Herbert Durr <hdu at apache.org>
    
    When the setNumberFormat method is called from DBColumn::initializeNumberFormat
    method the number formatter is the document's one and the passed arguments
    are from the database column.
    
    Before the format key is set to the table cell, the format key from the
    column is used to generate the new key on the number format supplier.
    Therefore setting the cell's FormatsSupplier property is not required
    as the document's one is used.
    
    As the same setNumberFormat method is called from other wizards the line
    is not removed but only active if the property exists.

diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java
index 0878239..b34596a 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.java
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java
@@ -197,7 +197,8 @@ public class NumberFormatter
             Locale oLocale = (Locale) Helper.getUnoPropertyValue(xNumberFormat, "Locale");
             int NewFormatKey = defineNumberFormat(FormatString, oLocale);
             XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, _xFormatObject);
-            xPSet.setPropertyValue("FormatsSupplier", _oNumberFormatter.xNumberFormatter.getNumberFormatsSupplier());
+            if (xPSet.getPropertySetInfo().hasPropertyByName("FormatsSupplier"))
+                xPSet.setPropertyValue("FormatsSupplier", _oNumberFormatter.xNumberFormatter.getNumberFormatsSupplier());
             if (xPSet.getPropertySetInfo().hasPropertyByName("NumberFormat"))
             {
                 xPSet.setPropertyValue("NumberFormat", new Integer(NewFormatKey));


More information about the Libreoffice-commits mailing list